vs-datatable 1.0.0 → 1.1.1
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/components/VsDataTable.vue.d.ts +13 -32
- package/dist/components/VsDataTableBody.vue.d.ts +58 -0
- package/dist/components/VsDataTableFilterDropdown.vue.d.ts +0 -1
- package/dist/components/VsDataTableHeader.vue.d.ts +71 -0
- package/dist/components/VsDataTableToolbar.vue.d.ts +26 -0
- package/dist/composables/useDataTable.d.ts +8 -9
- package/dist/index.css +1 -1
- package/dist/vs-datatable.es.js +1372 -1222
- package/dist/vs-datatable.umd.js +2 -2
- package/package.json +7 -4
- package/plugins/export/VsDataTableExportDropdown.vue +48 -0
- package/plugins/export/index.ts +22 -0
- package/plugins/export/shims-xlsx.d.ts +1 -0
- package/plugins/export/useDataTableExport.ts +37 -0
- package/dist/App_OLD.vue.d.ts +0 -2
- package/dist/api/mock/paymentMethods.d.ts +0 -1
- package/dist/api/mock/paymentStatuses.d.ts +0 -1
- package/dist/components/DropDownButton.vue.d.ts +0 -2
- package/dist/views/DemoLayout.vue.d.ts +0 -3
- package/src/styles/base_OLD.scss +0 -1089
package/dist/vs-datatable.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './index.css';function
|
|
1
|
+
import { defineComponent as _, computed as T, createElementBlock as w, openBlock as h, createElementVNode as g, createCommentVNode as P, Fragment as K, renderList as j, normalizeClass as W, toDisplayString as D, unref as R, mergeProps as xt, renderSlot as N, ref as L, watch as G, createVNode as X, withModifiers as le, withCtx as H, withDirectives as U, vModelText as oe, nextTick as Ct, onMounted as st, onUnmounted as lt, createBlock as de, Teleport as kt, Transition as Rt, vModelSelect as Me, normalizeStyle as St, createSlots as Ie, createTextVNode as je, isRef as ye, shallowRef as at, useAttrs as Tt, onBeforeMount as $t, normalizeProps as ze, guardReactiveProps as Ze } from "vue";
|
|
2
|
+
import './index.css';function Vt(e, t) {
|
|
3
3
|
return t.split(".").reduce((n, o) => n?.[o], e) ?? "";
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function Q(e, t, n = "id") {
|
|
6
6
|
return typeof n == "function" ? n(e, t) : e[n] || t;
|
|
7
7
|
}
|
|
8
8
|
function rt(e, t, n = "id") {
|
|
9
9
|
return t.some(
|
|
10
|
-
(o) =>
|
|
10
|
+
(o) => Q(o, -1, n) === Q(e, -1, n)
|
|
11
11
|
);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Ot(e, t, n) {
|
|
14
14
|
return e.length + (t ? 1 : 0) + (n ? 1 : 0);
|
|
15
15
|
}
|
|
16
16
|
function At(e, t) {
|
|
@@ -18,39 +18,39 @@ function At(e, t) {
|
|
|
18
18
|
const n = (o, s) => s.split(".").reduce((l, a) => l?.[a], o) ?? "";
|
|
19
19
|
return [...e].sort((o, s) => {
|
|
20
20
|
for (const { field: l, order: a } of t) {
|
|
21
|
-
const r = n(o, l),
|
|
22
|
-
if (r !==
|
|
23
|
-
return a === "asc" ? r >
|
|
21
|
+
const r = n(o, l), u = n(s, l);
|
|
22
|
+
if (r !== u)
|
|
23
|
+
return a === "asc" ? r > u ? 1 : -1 : r < u ? 1 : -1;
|
|
24
24
|
}
|
|
25
25
|
return 0;
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Et(e, t, n) {
|
|
29
29
|
if (!n) return e;
|
|
30
30
|
const o = (t - 1) * n, s = o + n;
|
|
31
31
|
return e.slice(o, s);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Pt(e, t, n) {
|
|
34
34
|
const o = (e - 1) * t + 1, s = Math.min(e * t, n);
|
|
35
35
|
return { start: o, end: s };
|
|
36
36
|
}
|
|
37
37
|
function it(e, t) {
|
|
38
38
|
return Math.ceil(e / t);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Qe(e, t, n) {
|
|
41
41
|
if (!t || t.trim() === "") return e;
|
|
42
42
|
const o = t.toLowerCase();
|
|
43
43
|
return e.filter((s) => Object.values(s).some(
|
|
44
44
|
(l) => String(l ?? "").toLowerCase().includes(o)
|
|
45
45
|
));
|
|
46
46
|
}
|
|
47
|
-
const
|
|
47
|
+
const Dt = ["id"], Lt = ["disabled"], Ft = {
|
|
48
48
|
key: 1,
|
|
49
49
|
class: "vs-pagination-ellipsis"
|
|
50
|
-
},
|
|
50
|
+
}, Bt = ["id", "onClick"], Mt = {
|
|
51
51
|
key: 2,
|
|
52
52
|
class: "vs-pagination-ellipsis"
|
|
53
|
-
}, Nt = ["disabled"],
|
|
53
|
+
}, Nt = ["disabled"], It = /* @__PURE__ */ _({
|
|
54
54
|
__name: "VsPagination",
|
|
55
55
|
props: {
|
|
56
56
|
modelValue: {},
|
|
@@ -62,104 +62,71 @@ const $t = ["id"], Dt = ["disabled"], Ft = {
|
|
|
62
62
|
},
|
|
63
63
|
emits: ["update:modelValue", "pageChanged"],
|
|
64
64
|
setup(e, { emit: t }) {
|
|
65
|
-
const n = e, o = t, s = n.maxVisible ?? 3, l =
|
|
65
|
+
const n = e, o = t, s = n.maxVisible ?? 3, l = T({
|
|
66
66
|
get: () => n.modelValue,
|
|
67
67
|
set: (v) => {
|
|
68
68
|
o("update:modelValue", v), o("pageChanged", v);
|
|
69
69
|
}
|
|
70
|
-
}), a =
|
|
70
|
+
}), a = T(() => l.value <= Math.floor(s / 2) ? 1 : l.value >= u.value - Math.floor(s / 2) ? Math.max(u.value - s + 1, 1) : l.value - Math.floor(s / 2)), r = T(() => Math.min(a.value + s - 1, u.value)), u = T(() => it(n.totalRecords, n.rowsPerPage)), c = T(() => {
|
|
71
71
|
const v = [];
|
|
72
|
-
for (let
|
|
73
|
-
v.push(
|
|
72
|
+
for (let d = a.value; d <= r.value; d++)
|
|
73
|
+
v.push(d);
|
|
74
74
|
return v;
|
|
75
|
-
}),
|
|
76
|
-
v >= 1 && v <=
|
|
77
|
-
},
|
|
75
|
+
}), f = (v) => {
|
|
76
|
+
v >= 1 && v <= u.value && (l.value = v);
|
|
77
|
+
}, i = () => {
|
|
78
78
|
l.value > 1 && l.value--;
|
|
79
|
-
},
|
|
80
|
-
l.value <
|
|
79
|
+
}, m = () => {
|
|
80
|
+
l.value < u.value && l.value++;
|
|
81
81
|
};
|
|
82
|
-
return (v,
|
|
82
|
+
return (v, d) => (h(), w("div", {
|
|
83
83
|
class: "vs-pagination",
|
|
84
84
|
id: e.tablename + "-pagination"
|
|
85
85
|
}, [
|
|
86
|
-
|
|
87
|
-
onClick:
|
|
86
|
+
g("button", {
|
|
87
|
+
onClick: i,
|
|
88
88
|
type: "button",
|
|
89
89
|
class: "vs-pagination-button vs-pagination-nav",
|
|
90
90
|
disabled: l.value === 1
|
|
91
|
-
}, " ‹‹ ", 8,
|
|
92
|
-
a.value > 1 ? (
|
|
91
|
+
}, " ‹‹ ", 8, Lt),
|
|
92
|
+
a.value > 1 ? (h(), w("button", {
|
|
93
93
|
key: 0,
|
|
94
94
|
type: "button",
|
|
95
95
|
class: "vs-pagination-button",
|
|
96
|
-
onClick:
|
|
97
|
-
}, " 1 ")) :
|
|
98
|
-
a.value > 2 ? (
|
|
99
|
-
(
|
|
100
|
-
key:
|
|
96
|
+
onClick: d[0] || (d[0] = (p) => f(1))
|
|
97
|
+
}, " 1 ")) : P("", !0),
|
|
98
|
+
a.value > 2 ? (h(), w("span", Ft, "...")) : P("", !0),
|
|
99
|
+
(h(!0), w(K, null, j(c.value, (p) => (h(), w("button", {
|
|
100
|
+
key: p,
|
|
101
101
|
type: "button",
|
|
102
102
|
class: W([
|
|
103
103
|
"vs-pagination-button",
|
|
104
|
-
{ "vs-active": l.value ===
|
|
104
|
+
{ "vs-active": l.value === p }
|
|
105
105
|
]),
|
|
106
|
-
id: e.tablename + "-page-" +
|
|
107
|
-
onClick: (
|
|
108
|
-
},
|
|
109
|
-
r.value <
|
|
110
|
-
r.value <
|
|
106
|
+
id: e.tablename + "-page-" + p,
|
|
107
|
+
onClick: (b) => f(p)
|
|
108
|
+
}, D(p), 11, Bt))), 128)),
|
|
109
|
+
r.value < u.value - 1 ? (h(), w("span", Mt, "...")) : P("", !0),
|
|
110
|
+
r.value < u.value ? (h(), w("button", {
|
|
111
111
|
key: 3,
|
|
112
112
|
type: "button",
|
|
113
113
|
class: "vs-pagination-button",
|
|
114
|
-
onClick:
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
onClick:
|
|
114
|
+
onClick: d[1] || (d[1] = (p) => f(u.value))
|
|
115
|
+
}, D(u.value), 1)) : P("", !0),
|
|
116
|
+
g("button", {
|
|
117
|
+
onClick: m,
|
|
118
118
|
type: "button",
|
|
119
119
|
class: "vs-pagination-button vs-pagination-nav",
|
|
120
|
-
disabled: l.value ===
|
|
120
|
+
disabled: l.value === u.value
|
|
121
121
|
}, " ›› ", 8, Nt)
|
|
122
|
-
], 8,
|
|
122
|
+
], 8, Dt));
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), ne = (e, t) => {
|
|
125
125
|
const n = e.__vccOpts || e;
|
|
126
126
|
for (const [o, s] of t)
|
|
127
127
|
n[o] = s;
|
|
128
128
|
return n;
|
|
129
|
-
}, qt = /* @__PURE__ */
|
|
130
|
-
__name: "VsSearch",
|
|
131
|
-
props: {
|
|
132
|
-
modelValue: {},
|
|
133
|
-
placeholder: {}
|
|
134
|
-
},
|
|
135
|
-
emits: ["update:modelValue", "inputTyped"],
|
|
136
|
-
setup(e, { emit: t }) {
|
|
137
|
-
const n = t, o = (s) => {
|
|
138
|
-
const l = s.target;
|
|
139
|
-
n("update:modelValue", l.value), n("inputTyped", l.value);
|
|
140
|
-
};
|
|
141
|
-
return (s, l) => (g(), y("div", It, [
|
|
142
|
-
l[0] || (l[0] = h("div", { class: "vs-search-icon" }, [
|
|
143
|
-
h("svg", {
|
|
144
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
145
|
-
height: "22px",
|
|
146
|
-
viewBox: "0 -960 960 960",
|
|
147
|
-
width: "22px",
|
|
148
|
-
fill: "#e3e3e3"
|
|
149
|
-
}, [
|
|
150
|
-
h("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" })
|
|
151
|
-
])
|
|
152
|
-
], -1)),
|
|
153
|
-
h("input", {
|
|
154
|
-
type: "text",
|
|
155
|
-
class: "vs-search-input",
|
|
156
|
-
placeholder: e.placeholder,
|
|
157
|
-
value: e.modelValue,
|
|
158
|
-
onInput: o
|
|
159
|
-
}, null, 40, Wt)
|
|
160
|
-
]));
|
|
161
|
-
}
|
|
162
|
-
}), Kt = /* @__PURE__ */ ye(Ht, [["__scopeId", "data-v-60b73b45"]]), Ut = { class: "vs-rows-per-page" }, jt = ["value"], zt = ["value"], Zt = /* @__PURE__ */ fe({
|
|
129
|
+
}, qt = /* @__PURE__ */ ne(It, [["__scopeId", "data-v-b327b254"]]), Ht = { class: "vs-rows-per-page" }, Kt = ["value"], Wt = ["value"], Ut = /* @__PURE__ */ _({
|
|
163
130
|
__name: "VsRowsPerPage",
|
|
164
131
|
props: {
|
|
165
132
|
modelValue: {},
|
|
@@ -171,42 +138,42 @@ const $t = ["id"], Dt = ["disabled"], Ft = {
|
|
|
171
138
|
const r = Number(a.target.value);
|
|
172
139
|
o("update:modelValue", r), o("rowsPerPageChanged", r);
|
|
173
140
|
};
|
|
174
|
-
return (a, r) => (
|
|
175
|
-
r[0] || (r[0] =
|
|
176
|
-
|
|
141
|
+
return (a, r) => (h(), w("div", Ht, [
|
|
142
|
+
r[0] || (r[0] = g("span", { class: "vs-rows-label" }, "Items Per Page", -1)),
|
|
143
|
+
g("select", {
|
|
177
144
|
class: "vs-items-dropdown",
|
|
178
145
|
value: e.modelValue,
|
|
179
146
|
onChange: l
|
|
180
147
|
}, [
|
|
181
|
-
(
|
|
182
|
-
key:
|
|
183
|
-
value:
|
|
184
|
-
},
|
|
185
|
-
], 40,
|
|
148
|
+
(h(!0), w(K, null, j(R(s), (u) => (h(), w("option", {
|
|
149
|
+
key: u,
|
|
150
|
+
value: u
|
|
151
|
+
}, D(u), 9, Wt))), 128))
|
|
152
|
+
], 40, Kt)
|
|
186
153
|
]));
|
|
187
154
|
}
|
|
188
|
-
}),
|
|
155
|
+
}), jt = /* @__PURE__ */ ne(Ut, [["__scopeId", "data-v-0c2bdd9c"]]), Te = Math.min, re = Math.max, $e = Math.round, Re = Math.floor, Y = (e) => ({
|
|
189
156
|
x: e,
|
|
190
157
|
y: e
|
|
191
|
-
}),
|
|
158
|
+
}), zt = {
|
|
192
159
|
left: "right",
|
|
193
160
|
right: "left",
|
|
194
161
|
bottom: "top",
|
|
195
162
|
top: "bottom"
|
|
196
|
-
},
|
|
163
|
+
}, Zt = {
|
|
197
164
|
start: "end",
|
|
198
165
|
end: "start"
|
|
199
166
|
};
|
|
200
|
-
function
|
|
201
|
-
return
|
|
167
|
+
function Xe(e, t, n) {
|
|
168
|
+
return re(e, Te(t, n));
|
|
202
169
|
}
|
|
203
|
-
function
|
|
170
|
+
function Ee(e, t) {
|
|
204
171
|
return typeof e == "function" ? e(t) : e;
|
|
205
172
|
}
|
|
206
|
-
function
|
|
173
|
+
function ie(e) {
|
|
207
174
|
return e.split("-")[0];
|
|
208
175
|
}
|
|
209
|
-
function
|
|
176
|
+
function Pe(e) {
|
|
210
177
|
return e.split("-")[1];
|
|
211
178
|
}
|
|
212
179
|
function ut(e) {
|
|
@@ -215,48 +182,48 @@ function ut(e) {
|
|
|
215
182
|
function ct(e) {
|
|
216
183
|
return e === "y" ? "height" : "width";
|
|
217
184
|
}
|
|
218
|
-
const
|
|
219
|
-
function
|
|
220
|
-
return
|
|
185
|
+
const Qt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
186
|
+
function se(e) {
|
|
187
|
+
return Qt.has(ie(e)) ? "y" : "x";
|
|
221
188
|
}
|
|
222
189
|
function dt(e) {
|
|
223
|
-
return ut(
|
|
190
|
+
return ut(se(e));
|
|
224
191
|
}
|
|
225
|
-
function
|
|
192
|
+
function Xt(e, t, n) {
|
|
226
193
|
n === void 0 && (n = !1);
|
|
227
|
-
const o =
|
|
194
|
+
const o = Pe(e), s = dt(e), l = ct(s);
|
|
228
195
|
let a = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
229
|
-
return t.reference[l] > t.floating[l] && (a =
|
|
196
|
+
return t.reference[l] > t.floating[l] && (a = Ve(a)), [a, Ve(a)];
|
|
230
197
|
}
|
|
231
|
-
function
|
|
232
|
-
const t =
|
|
233
|
-
return [
|
|
198
|
+
function Yt(e) {
|
|
199
|
+
const t = Ve(e);
|
|
200
|
+
return [qe(e), t, qe(t)];
|
|
234
201
|
}
|
|
235
|
-
function
|
|
236
|
-
return e.replace(/start|end/g, (t) =>
|
|
202
|
+
function qe(e) {
|
|
203
|
+
return e.replace(/start|end/g, (t) => Zt[t]);
|
|
237
204
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
205
|
+
const Ye = ["left", "right"], Ge = ["right", "left"], Gt = ["top", "bottom"], Jt = ["bottom", "top"];
|
|
206
|
+
function _t(e, t, n) {
|
|
240
207
|
switch (e) {
|
|
241
208
|
case "top":
|
|
242
209
|
case "bottom":
|
|
243
|
-
return n ? t ?
|
|
210
|
+
return n ? t ? Ge : Ye : t ? Ye : Ge;
|
|
244
211
|
case "left":
|
|
245
212
|
case "right":
|
|
246
|
-
return t ?
|
|
213
|
+
return t ? Gt : Jt;
|
|
247
214
|
default:
|
|
248
215
|
return [];
|
|
249
216
|
}
|
|
250
217
|
}
|
|
251
|
-
function
|
|
252
|
-
const s =
|
|
253
|
-
let l =
|
|
254
|
-
return s && (l = l.map((a) => a + "-" + s), t && (l = l.concat(l.map(
|
|
218
|
+
function en(e, t, n, o) {
|
|
219
|
+
const s = Pe(e);
|
|
220
|
+
let l = _t(ie(e), n === "start", o);
|
|
221
|
+
return s && (l = l.map((a) => a + "-" + s), t && (l = l.concat(l.map(qe)))), l;
|
|
255
222
|
}
|
|
256
|
-
function
|
|
257
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
223
|
+
function Ve(e) {
|
|
224
|
+
return e.replace(/left|right|bottom|top/g, (t) => zt[t]);
|
|
258
225
|
}
|
|
259
|
-
function
|
|
226
|
+
function tn(e) {
|
|
260
227
|
return {
|
|
261
228
|
top: 0,
|
|
262
229
|
right: 0,
|
|
@@ -265,15 +232,15 @@ function ln(e) {
|
|
|
265
232
|
...e
|
|
266
233
|
};
|
|
267
234
|
}
|
|
268
|
-
function
|
|
269
|
-
return typeof e != "number" ?
|
|
235
|
+
function nn(e) {
|
|
236
|
+
return typeof e != "number" ? tn(e) : {
|
|
270
237
|
top: e,
|
|
271
238
|
right: e,
|
|
272
239
|
bottom: e,
|
|
273
240
|
left: e
|
|
274
241
|
};
|
|
275
242
|
}
|
|
276
|
-
function
|
|
243
|
+
function Oe(e) {
|
|
277
244
|
const {
|
|
278
245
|
x: t,
|
|
279
246
|
y: n,
|
|
@@ -291,36 +258,36 @@ function Pe(e) {
|
|
|
291
258
|
y: n
|
|
292
259
|
};
|
|
293
260
|
}
|
|
294
|
-
function
|
|
261
|
+
function Je(e, t, n) {
|
|
295
262
|
let {
|
|
296
263
|
reference: o,
|
|
297
264
|
floating: s
|
|
298
265
|
} = e;
|
|
299
|
-
const l =
|
|
266
|
+
const l = se(t), a = dt(t), r = ct(a), u = ie(t), c = l === "y", f = o.x + o.width / 2 - s.width / 2, i = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
|
|
300
267
|
let v;
|
|
301
|
-
switch (
|
|
268
|
+
switch (u) {
|
|
302
269
|
case "top":
|
|
303
270
|
v = {
|
|
304
|
-
x:
|
|
271
|
+
x: f,
|
|
305
272
|
y: o.y - s.height
|
|
306
273
|
};
|
|
307
274
|
break;
|
|
308
275
|
case "bottom":
|
|
309
276
|
v = {
|
|
310
|
-
x:
|
|
277
|
+
x: f,
|
|
311
278
|
y: o.y + o.height
|
|
312
279
|
};
|
|
313
280
|
break;
|
|
314
281
|
case "right":
|
|
315
282
|
v = {
|
|
316
283
|
x: o.x + o.width,
|
|
317
|
-
y:
|
|
284
|
+
y: i
|
|
318
285
|
};
|
|
319
286
|
break;
|
|
320
287
|
case "left":
|
|
321
288
|
v = {
|
|
322
289
|
x: o.x - s.width,
|
|
323
|
-
y:
|
|
290
|
+
y: i
|
|
324
291
|
};
|
|
325
292
|
break;
|
|
326
293
|
default:
|
|
@@ -329,73 +296,73 @@ function et(e, t, n) {
|
|
|
329
296
|
y: o.y
|
|
330
297
|
};
|
|
331
298
|
}
|
|
332
|
-
switch (
|
|
299
|
+
switch (Pe(t)) {
|
|
333
300
|
case "start":
|
|
334
|
-
v[a] -=
|
|
301
|
+
v[a] -= m * (n && c ? -1 : 1);
|
|
335
302
|
break;
|
|
336
303
|
case "end":
|
|
337
|
-
v[a] +=
|
|
304
|
+
v[a] += m * (n && c ? -1 : 1);
|
|
338
305
|
break;
|
|
339
306
|
}
|
|
340
307
|
return v;
|
|
341
308
|
}
|
|
342
|
-
const
|
|
309
|
+
const on = async (e, t, n) => {
|
|
343
310
|
const {
|
|
344
311
|
placement: o = "bottom",
|
|
345
312
|
strategy: s = "absolute",
|
|
346
313
|
middleware: l = [],
|
|
347
314
|
platform: a
|
|
348
|
-
} = n, r = l.filter(Boolean),
|
|
349
|
-
let
|
|
315
|
+
} = n, r = l.filter(Boolean), u = await (a.isRTL == null ? void 0 : a.isRTL(t));
|
|
316
|
+
let c = await a.getElementRects({
|
|
350
317
|
reference: e,
|
|
351
318
|
floating: t,
|
|
352
319
|
strategy: s
|
|
353
320
|
}), {
|
|
354
|
-
x:
|
|
355
|
-
y:
|
|
356
|
-
} =
|
|
357
|
-
for (let
|
|
321
|
+
x: f,
|
|
322
|
+
y: i
|
|
323
|
+
} = Je(c, o, u), m = o, v = {}, d = 0;
|
|
324
|
+
for (let p = 0; p < r.length; p++) {
|
|
358
325
|
const {
|
|
359
|
-
name:
|
|
360
|
-
fn:
|
|
361
|
-
} = r[
|
|
362
|
-
x:
|
|
363
|
-
y:
|
|
364
|
-
data:
|
|
326
|
+
name: b,
|
|
327
|
+
fn: C
|
|
328
|
+
} = r[p], {
|
|
329
|
+
x: k,
|
|
330
|
+
y: S,
|
|
331
|
+
data: O,
|
|
365
332
|
reset: A
|
|
366
|
-
} = await
|
|
367
|
-
x:
|
|
368
|
-
y:
|
|
333
|
+
} = await C({
|
|
334
|
+
x: f,
|
|
335
|
+
y: i,
|
|
369
336
|
initialPlacement: o,
|
|
370
|
-
placement:
|
|
337
|
+
placement: m,
|
|
371
338
|
strategy: s,
|
|
372
339
|
middlewareData: v,
|
|
373
|
-
rects:
|
|
340
|
+
rects: c,
|
|
374
341
|
platform: a,
|
|
375
342
|
elements: {
|
|
376
343
|
reference: e,
|
|
377
344
|
floating: t
|
|
378
345
|
}
|
|
379
346
|
});
|
|
380
|
-
|
|
347
|
+
f = k ?? f, i = S ?? i, v = {
|
|
381
348
|
...v,
|
|
382
|
-
[
|
|
383
|
-
...v[
|
|
384
|
-
...
|
|
349
|
+
[b]: {
|
|
350
|
+
...v[b],
|
|
351
|
+
...O
|
|
385
352
|
}
|
|
386
|
-
}, A &&
|
|
353
|
+
}, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (m = A.placement), A.rects && (c = A.rects === !0 ? await a.getElementRects({
|
|
387
354
|
reference: e,
|
|
388
355
|
floating: t,
|
|
389
356
|
strategy: s
|
|
390
357
|
}) : A.rects), {
|
|
391
|
-
x:
|
|
392
|
-
y:
|
|
393
|
-
} =
|
|
358
|
+
x: f,
|
|
359
|
+
y: i
|
|
360
|
+
} = Je(c, m, u)), p = -1);
|
|
394
361
|
}
|
|
395
362
|
return {
|
|
396
|
-
x:
|
|
397
|
-
y:
|
|
398
|
-
placement:
|
|
363
|
+
x: f,
|
|
364
|
+
y: i,
|
|
365
|
+
placement: m,
|
|
399
366
|
strategy: s,
|
|
400
367
|
middlewareData: v
|
|
401
368
|
};
|
|
@@ -409,43 +376,43 @@ async function ft(e, t) {
|
|
|
409
376
|
platform: l,
|
|
410
377
|
rects: a,
|
|
411
378
|
elements: r,
|
|
412
|
-
strategy:
|
|
379
|
+
strategy: u
|
|
413
380
|
} = e, {
|
|
414
|
-
boundary:
|
|
415
|
-
rootBoundary:
|
|
416
|
-
elementContext:
|
|
417
|
-
altBoundary:
|
|
381
|
+
boundary: c = "clippingAncestors",
|
|
382
|
+
rootBoundary: f = "viewport",
|
|
383
|
+
elementContext: i = "floating",
|
|
384
|
+
altBoundary: m = !1,
|
|
418
385
|
padding: v = 0
|
|
419
|
-
} =
|
|
420
|
-
element: (n = await (l.isElement == null ? void 0 : l.isElement(
|
|
421
|
-
boundary:
|
|
422
|
-
rootBoundary:
|
|
423
|
-
strategy:
|
|
424
|
-
})),
|
|
386
|
+
} = Ee(t, e), d = nn(v), b = r[m ? i === "floating" ? "reference" : "floating" : i], C = Oe(await l.getClippingRect({
|
|
387
|
+
element: (n = await (l.isElement == null ? void 0 : l.isElement(b))) == null || n ? b : b.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(r.floating)),
|
|
388
|
+
boundary: c,
|
|
389
|
+
rootBoundary: f,
|
|
390
|
+
strategy: u
|
|
391
|
+
})), k = i === "floating" ? {
|
|
425
392
|
x: o,
|
|
426
393
|
y: s,
|
|
427
394
|
width: a.floating.width,
|
|
428
395
|
height: a.floating.height
|
|
429
|
-
} : a.reference,
|
|
396
|
+
} : a.reference, S = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(r.floating)), O = await (l.isElement == null ? void 0 : l.isElement(S)) ? await (l.getScale == null ? void 0 : l.getScale(S)) || {
|
|
430
397
|
x: 1,
|
|
431
398
|
y: 1
|
|
432
399
|
} : {
|
|
433
400
|
x: 1,
|
|
434
401
|
y: 1
|
|
435
|
-
}, A =
|
|
402
|
+
}, A = Oe(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
436
403
|
elements: r,
|
|
437
|
-
rect:
|
|
438
|
-
offsetParent:
|
|
439
|
-
strategy:
|
|
440
|
-
}) :
|
|
404
|
+
rect: k,
|
|
405
|
+
offsetParent: S,
|
|
406
|
+
strategy: u
|
|
407
|
+
}) : k);
|
|
441
408
|
return {
|
|
442
|
-
top: (
|
|
443
|
-
bottom: (A.bottom -
|
|
444
|
-
left: (
|
|
445
|
-
right: (A.right -
|
|
409
|
+
top: (C.top - A.top + d.top) / O.y,
|
|
410
|
+
bottom: (A.bottom - C.bottom + d.bottom) / O.y,
|
|
411
|
+
left: (C.left - A.left + d.left) / O.x,
|
|
412
|
+
right: (A.right - C.right + d.right) / O.x
|
|
446
413
|
};
|
|
447
414
|
}
|
|
448
|
-
const
|
|
415
|
+
const sn = function(e) {
|
|
449
416
|
return e === void 0 && (e = {}), {
|
|
450
417
|
name: "flip",
|
|
451
418
|
options: e,
|
|
@@ -456,105 +423,105 @@ const un = function(e) {
|
|
|
456
423
|
middlewareData: l,
|
|
457
424
|
rects: a,
|
|
458
425
|
initialPlacement: r,
|
|
459
|
-
platform:
|
|
460
|
-
elements:
|
|
426
|
+
platform: u,
|
|
427
|
+
elements: c
|
|
461
428
|
} = t, {
|
|
462
|
-
mainAxis:
|
|
463
|
-
crossAxis:
|
|
464
|
-
fallbackPlacements:
|
|
429
|
+
mainAxis: f = !0,
|
|
430
|
+
crossAxis: i = !0,
|
|
431
|
+
fallbackPlacements: m,
|
|
465
432
|
fallbackStrategy: v = "bestFit",
|
|
466
|
-
fallbackAxisSideDirection:
|
|
467
|
-
flipAlignment:
|
|
468
|
-
...
|
|
469
|
-
} =
|
|
433
|
+
fallbackAxisSideDirection: d = "none",
|
|
434
|
+
flipAlignment: p = !0,
|
|
435
|
+
...b
|
|
436
|
+
} = Ee(e, t);
|
|
470
437
|
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
471
438
|
return {};
|
|
472
|
-
const
|
|
473
|
-
!
|
|
474
|
-
const
|
|
475
|
-
let
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
478
|
-
|
|
439
|
+
const C = ie(s), k = se(r), S = ie(r) === r, O = await (u.isRTL == null ? void 0 : u.isRTL(c.floating)), A = m || (S || !p ? [Ve(r)] : Yt(r)), M = d !== "none";
|
|
440
|
+
!m && M && A.push(...en(r, p, d, O));
|
|
441
|
+
const $ = [r, ...A], x = await ft(t, b), y = [];
|
|
442
|
+
let I = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
443
|
+
if (f && y.push(x[C]), i) {
|
|
444
|
+
const te = Xt(s, a, O);
|
|
445
|
+
y.push(x[te[0]], x[te[1]]);
|
|
479
446
|
}
|
|
480
|
-
if (
|
|
447
|
+
if (I = [...I, {
|
|
481
448
|
placement: s,
|
|
482
|
-
overflows:
|
|
483
|
-
}], !
|
|
484
|
-
var
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
449
|
+
overflows: y
|
|
450
|
+
}], !y.every((te) => te <= 0)) {
|
|
451
|
+
var ce, Ce;
|
|
452
|
+
const te = (((ce = l.flip) == null ? void 0 : ce.index) || 0) + 1, he = $[te];
|
|
453
|
+
if (he && (!(i === "alignment" ? k !== se(he) : !1) || // We leave the current main axis only if every placement on that axis
|
|
487
454
|
// overflows the main axis.
|
|
488
|
-
|
|
455
|
+
I.every((V) => se(V.placement) === k ? V.overflows[0] > 0 : !0)))
|
|
489
456
|
return {
|
|
490
457
|
data: {
|
|
491
|
-
index:
|
|
492
|
-
overflows:
|
|
458
|
+
index: te,
|
|
459
|
+
overflows: I
|
|
493
460
|
},
|
|
494
461
|
reset: {
|
|
495
|
-
placement:
|
|
462
|
+
placement: he
|
|
496
463
|
}
|
|
497
464
|
};
|
|
498
|
-
let
|
|
499
|
-
if (!
|
|
465
|
+
let B = (Ce = I.filter((E) => E.overflows[0] <= 0).sort((E, V) => E.overflows[1] - V.overflows[1])[0]) == null ? void 0 : Ce.placement;
|
|
466
|
+
if (!B)
|
|
500
467
|
switch (v) {
|
|
501
468
|
case "bestFit": {
|
|
502
|
-
var
|
|
503
|
-
const
|
|
504
|
-
if (
|
|
505
|
-
const
|
|
506
|
-
return
|
|
469
|
+
var ke;
|
|
470
|
+
const E = (ke = I.filter((V) => {
|
|
471
|
+
if (M) {
|
|
472
|
+
const F = se(V.placement);
|
|
473
|
+
return F === k || // Create a bias to the `y` side axis due to horizontal
|
|
507
474
|
// reading directions favoring greater width.
|
|
508
|
-
|
|
475
|
+
F === "y";
|
|
509
476
|
}
|
|
510
477
|
return !0;
|
|
511
|
-
}).map((
|
|
512
|
-
|
|
478
|
+
}).map((V) => [V.placement, V.overflows.filter((F) => F > 0).reduce((F, we) => F + we, 0)]).sort((V, F) => V[1] - F[1])[0]) == null ? void 0 : ke[0];
|
|
479
|
+
E && (B = E);
|
|
513
480
|
break;
|
|
514
481
|
}
|
|
515
482
|
case "initialPlacement":
|
|
516
|
-
|
|
483
|
+
B = r;
|
|
517
484
|
break;
|
|
518
485
|
}
|
|
519
|
-
if (s !==
|
|
486
|
+
if (s !== B)
|
|
520
487
|
return {
|
|
521
488
|
reset: {
|
|
522
|
-
placement:
|
|
489
|
+
placement: B
|
|
523
490
|
}
|
|
524
491
|
};
|
|
525
492
|
}
|
|
526
493
|
return {};
|
|
527
494
|
}
|
|
528
495
|
};
|
|
529
|
-
},
|
|
530
|
-
async function
|
|
496
|
+
}, ln = /* @__PURE__ */ new Set(["left", "top"]);
|
|
497
|
+
async function an(e, t) {
|
|
531
498
|
const {
|
|
532
499
|
placement: n,
|
|
533
500
|
platform: o,
|
|
534
501
|
elements: s
|
|
535
|
-
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a =
|
|
502
|
+
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = ie(n), r = Pe(n), u = se(n) === "y", c = ln.has(a) ? -1 : 1, f = l && u ? -1 : 1, i = Ee(t, e);
|
|
536
503
|
let {
|
|
537
|
-
mainAxis:
|
|
504
|
+
mainAxis: m,
|
|
538
505
|
crossAxis: v,
|
|
539
|
-
alignmentAxis:
|
|
540
|
-
} = typeof
|
|
541
|
-
mainAxis:
|
|
506
|
+
alignmentAxis: d
|
|
507
|
+
} = typeof i == "number" ? {
|
|
508
|
+
mainAxis: i,
|
|
542
509
|
crossAxis: 0,
|
|
543
510
|
alignmentAxis: null
|
|
544
511
|
} : {
|
|
545
|
-
mainAxis:
|
|
546
|
-
crossAxis:
|
|
547
|
-
alignmentAxis:
|
|
512
|
+
mainAxis: i.mainAxis || 0,
|
|
513
|
+
crossAxis: i.crossAxis || 0,
|
|
514
|
+
alignmentAxis: i.alignmentAxis
|
|
548
515
|
};
|
|
549
|
-
return r && typeof
|
|
550
|
-
x: v *
|
|
551
|
-
y:
|
|
516
|
+
return r && typeof d == "number" && (v = r === "end" ? d * -1 : d), u ? {
|
|
517
|
+
x: v * f,
|
|
518
|
+
y: m * c
|
|
552
519
|
} : {
|
|
553
|
-
x:
|
|
554
|
-
y: v *
|
|
520
|
+
x: m * c,
|
|
521
|
+
y: v * f
|
|
555
522
|
};
|
|
556
523
|
}
|
|
557
|
-
const
|
|
524
|
+
const rn = function(e) {
|
|
558
525
|
return e === void 0 && (e = 0), {
|
|
559
526
|
name: "offset",
|
|
560
527
|
options: e,
|
|
@@ -565,18 +532,18 @@ const fn = function(e) {
|
|
|
565
532
|
y: l,
|
|
566
533
|
placement: a,
|
|
567
534
|
middlewareData: r
|
|
568
|
-
} = t,
|
|
535
|
+
} = t, u = await an(t, e);
|
|
569
536
|
return a === ((n = r.offset) == null ? void 0 : n.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
|
|
570
|
-
x: s +
|
|
571
|
-
y: l +
|
|
537
|
+
x: s + u.x,
|
|
538
|
+
y: l + u.y,
|
|
572
539
|
data: {
|
|
573
|
-
...
|
|
540
|
+
...u,
|
|
574
541
|
placement: a
|
|
575
542
|
}
|
|
576
543
|
};
|
|
577
544
|
}
|
|
578
545
|
};
|
|
579
|
-
},
|
|
546
|
+
}, un = function(e) {
|
|
580
547
|
return e === void 0 && (e = {}), {
|
|
581
548
|
name: "shift",
|
|
582
549
|
options: e,
|
|
@@ -589,93 +556,93 @@ const fn = function(e) {
|
|
|
589
556
|
mainAxis: l = !0,
|
|
590
557
|
crossAxis: a = !1,
|
|
591
558
|
limiter: r = {
|
|
592
|
-
fn: (
|
|
559
|
+
fn: (b) => {
|
|
593
560
|
let {
|
|
594
|
-
x:
|
|
595
|
-
y:
|
|
596
|
-
} =
|
|
561
|
+
x: C,
|
|
562
|
+
y: k
|
|
563
|
+
} = b;
|
|
597
564
|
return {
|
|
598
|
-
x:
|
|
599
|
-
y:
|
|
565
|
+
x: C,
|
|
566
|
+
y: k
|
|
600
567
|
};
|
|
601
568
|
}
|
|
602
569
|
},
|
|
603
|
-
...
|
|
604
|
-
} =
|
|
570
|
+
...u
|
|
571
|
+
} = Ee(e, t), c = {
|
|
605
572
|
x: n,
|
|
606
573
|
y: o
|
|
607
|
-
},
|
|
608
|
-
let v =
|
|
574
|
+
}, f = await ft(t, u), i = se(ie(s)), m = ut(i);
|
|
575
|
+
let v = c[m], d = c[i];
|
|
609
576
|
if (l) {
|
|
610
|
-
const
|
|
611
|
-
v =
|
|
577
|
+
const b = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", k = v + f[b], S = v - f[C];
|
|
578
|
+
v = Xe(k, v, S);
|
|
612
579
|
}
|
|
613
580
|
if (a) {
|
|
614
|
-
const
|
|
615
|
-
|
|
581
|
+
const b = i === "y" ? "top" : "left", C = i === "y" ? "bottom" : "right", k = d + f[b], S = d - f[C];
|
|
582
|
+
d = Xe(k, d, S);
|
|
616
583
|
}
|
|
617
|
-
const
|
|
584
|
+
const p = r.fn({
|
|
618
585
|
...t,
|
|
619
|
-
[
|
|
620
|
-
[
|
|
586
|
+
[m]: v,
|
|
587
|
+
[i]: d
|
|
621
588
|
});
|
|
622
589
|
return {
|
|
623
|
-
...
|
|
590
|
+
...p,
|
|
624
591
|
data: {
|
|
625
|
-
x:
|
|
626
|
-
y:
|
|
592
|
+
x: p.x - n,
|
|
593
|
+
y: p.y - o,
|
|
627
594
|
enabled: {
|
|
628
|
-
[
|
|
629
|
-
[
|
|
595
|
+
[m]: l,
|
|
596
|
+
[i]: a
|
|
630
597
|
}
|
|
631
598
|
}
|
|
632
599
|
};
|
|
633
600
|
}
|
|
634
601
|
};
|
|
635
602
|
};
|
|
636
|
-
function
|
|
603
|
+
function De() {
|
|
637
604
|
return typeof window < "u";
|
|
638
605
|
}
|
|
639
|
-
function
|
|
606
|
+
function ge(e) {
|
|
640
607
|
return vt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
641
608
|
}
|
|
642
609
|
function q(e) {
|
|
643
610
|
var t;
|
|
644
611
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
645
612
|
}
|
|
646
|
-
function
|
|
613
|
+
function ee(e) {
|
|
647
614
|
var t;
|
|
648
615
|
return (t = (vt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
649
616
|
}
|
|
650
617
|
function vt(e) {
|
|
651
|
-
return
|
|
618
|
+
return De() ? e instanceof Node || e instanceof q(e).Node : !1;
|
|
652
619
|
}
|
|
653
|
-
function
|
|
654
|
-
return
|
|
620
|
+
function z(e) {
|
|
621
|
+
return De() ? e instanceof Element || e instanceof q(e).Element : !1;
|
|
655
622
|
}
|
|
656
|
-
function
|
|
657
|
-
return
|
|
623
|
+
function J(e) {
|
|
624
|
+
return De() ? e instanceof HTMLElement || e instanceof q(e).HTMLElement : !1;
|
|
658
625
|
}
|
|
659
|
-
function
|
|
660
|
-
return !
|
|
626
|
+
function _e(e) {
|
|
627
|
+
return !De() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
|
|
661
628
|
}
|
|
662
|
-
const
|
|
663
|
-
function
|
|
629
|
+
const cn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
630
|
+
function xe(e) {
|
|
664
631
|
const {
|
|
665
632
|
overflow: t,
|
|
666
633
|
overflowX: n,
|
|
667
634
|
overflowY: o,
|
|
668
635
|
display: s
|
|
669
|
-
} =
|
|
670
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
636
|
+
} = Z(e);
|
|
637
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !cn.has(s);
|
|
671
638
|
}
|
|
672
|
-
const
|
|
673
|
-
function
|
|
674
|
-
return
|
|
639
|
+
const dn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
640
|
+
function fn(e) {
|
|
641
|
+
return dn.has(ge(e));
|
|
675
642
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
678
|
-
return
|
|
643
|
+
const vn = [":popover-open", ":modal"];
|
|
644
|
+
function Le(e) {
|
|
645
|
+
return vn.some((t) => {
|
|
679
646
|
try {
|
|
680
647
|
return e.matches(t);
|
|
681
648
|
} catch {
|
|
@@ -683,34 +650,34 @@ function _e(e) {
|
|
|
683
650
|
}
|
|
684
651
|
});
|
|
685
652
|
}
|
|
686
|
-
const
|
|
687
|
-
function
|
|
688
|
-
const t =
|
|
689
|
-
return
|
|
653
|
+
const mn = ["transform", "translate", "scale", "rotate", "perspective"], pn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], gn = ["paint", "layout", "strict", "content"];
|
|
654
|
+
function Ke(e) {
|
|
655
|
+
const t = We(), n = z(e) ? Z(e) : e;
|
|
656
|
+
return mn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || pn.some((o) => (n.willChange || "").includes(o)) || gn.some((o) => (n.contain || "").includes(o));
|
|
690
657
|
}
|
|
691
|
-
function
|
|
692
|
-
let t =
|
|
693
|
-
for (;
|
|
694
|
-
if (
|
|
658
|
+
function hn(e) {
|
|
659
|
+
let t = ae(e);
|
|
660
|
+
for (; J(t) && !pe(t); ) {
|
|
661
|
+
if (Ke(t))
|
|
695
662
|
return t;
|
|
696
|
-
if (
|
|
663
|
+
if (Le(t))
|
|
697
664
|
return null;
|
|
698
|
-
t =
|
|
665
|
+
t = ae(t);
|
|
699
666
|
}
|
|
700
667
|
return null;
|
|
701
668
|
}
|
|
702
|
-
function
|
|
669
|
+
function We() {
|
|
703
670
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
704
671
|
}
|
|
705
|
-
const
|
|
706
|
-
function
|
|
707
|
-
return
|
|
672
|
+
const wn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
673
|
+
function pe(e) {
|
|
674
|
+
return wn.has(ge(e));
|
|
708
675
|
}
|
|
709
|
-
function
|
|
676
|
+
function Z(e) {
|
|
710
677
|
return q(e).getComputedStyle(e);
|
|
711
678
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
679
|
+
function Fe(e) {
|
|
680
|
+
return z(e) ? {
|
|
714
681
|
scrollLeft: e.scrollLeft,
|
|
715
682
|
scrollTop: e.scrollTop
|
|
716
683
|
} : {
|
|
@@ -718,189 +685,189 @@ function Me(e) {
|
|
|
718
685
|
scrollTop: e.scrollY
|
|
719
686
|
};
|
|
720
687
|
}
|
|
721
|
-
function
|
|
722
|
-
if (
|
|
688
|
+
function ae(e) {
|
|
689
|
+
if (ge(e) === "html")
|
|
723
690
|
return e;
|
|
724
691
|
const t = (
|
|
725
692
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
726
693
|
e.assignedSlot || // DOM Element detected.
|
|
727
694
|
e.parentNode || // ShadowRoot detected.
|
|
728
|
-
|
|
729
|
-
|
|
695
|
+
_e(e) && e.host || // Fallback.
|
|
696
|
+
ee(e)
|
|
730
697
|
);
|
|
731
|
-
return
|
|
698
|
+
return _e(t) ? t.host : t;
|
|
732
699
|
}
|
|
733
|
-
function
|
|
734
|
-
const t =
|
|
735
|
-
return
|
|
700
|
+
function mt(e) {
|
|
701
|
+
const t = ae(e);
|
|
702
|
+
return pe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : J(t) && xe(t) ? t : mt(t);
|
|
736
703
|
}
|
|
737
|
-
function
|
|
704
|
+
function be(e, t, n) {
|
|
738
705
|
var o;
|
|
739
706
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
740
|
-
const s =
|
|
707
|
+
const s = mt(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = q(s);
|
|
741
708
|
if (l) {
|
|
742
|
-
const r =
|
|
743
|
-
return t.concat(a, a.visualViewport || [],
|
|
709
|
+
const r = He(a);
|
|
710
|
+
return t.concat(a, a.visualViewport || [], xe(s) ? s : [], r && n ? be(r) : []);
|
|
744
711
|
}
|
|
745
|
-
return t.concat(s,
|
|
712
|
+
return t.concat(s, be(s, [], n));
|
|
746
713
|
}
|
|
747
|
-
function
|
|
714
|
+
function He(e) {
|
|
748
715
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
749
716
|
}
|
|
750
|
-
function
|
|
751
|
-
const t =
|
|
717
|
+
function pt(e) {
|
|
718
|
+
const t = Z(e);
|
|
752
719
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
753
|
-
const s =
|
|
720
|
+
const s = J(e), l = s ? e.offsetWidth : n, a = s ? e.offsetHeight : o, r = $e(n) !== l || $e(o) !== a;
|
|
754
721
|
return r && (n = l, o = a), {
|
|
755
722
|
width: n,
|
|
756
723
|
height: o,
|
|
757
724
|
$: r
|
|
758
725
|
};
|
|
759
726
|
}
|
|
760
|
-
function
|
|
761
|
-
return
|
|
727
|
+
function Ue(e) {
|
|
728
|
+
return z(e) ? e : e.contextElement;
|
|
762
729
|
}
|
|
763
|
-
function
|
|
764
|
-
const t =
|
|
765
|
-
if (!
|
|
730
|
+
function ve(e) {
|
|
731
|
+
const t = Ue(e);
|
|
732
|
+
if (!J(t))
|
|
766
733
|
return Y(1);
|
|
767
734
|
const n = t.getBoundingClientRect(), {
|
|
768
735
|
width: o,
|
|
769
736
|
height: s,
|
|
770
737
|
$: l
|
|
771
|
-
} =
|
|
772
|
-
let a = (l ?
|
|
738
|
+
} = pt(t);
|
|
739
|
+
let a = (l ? $e(n.width) : n.width) / o, r = (l ? $e(n.height) : n.height) / s;
|
|
773
740
|
return (!a || !Number.isFinite(a)) && (a = 1), (!r || !Number.isFinite(r)) && (r = 1), {
|
|
774
741
|
x: a,
|
|
775
742
|
y: r
|
|
776
743
|
};
|
|
777
744
|
}
|
|
778
|
-
const
|
|
779
|
-
function
|
|
745
|
+
const yn = /* @__PURE__ */ Y(0);
|
|
746
|
+
function gt(e) {
|
|
780
747
|
const t = q(e);
|
|
781
|
-
return !
|
|
748
|
+
return !We() || !t.visualViewport ? yn : {
|
|
782
749
|
x: t.visualViewport.offsetLeft,
|
|
783
750
|
y: t.visualViewport.offsetTop
|
|
784
751
|
};
|
|
785
752
|
}
|
|
786
|
-
function
|
|
753
|
+
function bn(e, t, n) {
|
|
787
754
|
return t === void 0 && (t = !1), !n || t && n !== q(e) ? !1 : t;
|
|
788
755
|
}
|
|
789
|
-
function
|
|
756
|
+
function ue(e, t, n, o) {
|
|
790
757
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
791
|
-
const s = e.getBoundingClientRect(), l =
|
|
758
|
+
const s = e.getBoundingClientRect(), l = Ue(e);
|
|
792
759
|
let a = Y(1);
|
|
793
|
-
t && (o ?
|
|
794
|
-
const r =
|
|
795
|
-
let
|
|
760
|
+
t && (o ? z(o) && (a = ve(o)) : a = ve(e));
|
|
761
|
+
const r = bn(l, n, o) ? gt(l) : Y(0);
|
|
762
|
+
let u = (s.left + r.x) / a.x, c = (s.top + r.y) / a.y, f = s.width / a.x, i = s.height / a.y;
|
|
796
763
|
if (l) {
|
|
797
|
-
const
|
|
798
|
-
let
|
|
799
|
-
for (;
|
|
800
|
-
const
|
|
801
|
-
|
|
764
|
+
const m = q(l), v = o && z(o) ? q(o) : o;
|
|
765
|
+
let d = m, p = He(d);
|
|
766
|
+
for (; p && o && v !== d; ) {
|
|
767
|
+
const b = ve(p), C = p.getBoundingClientRect(), k = Z(p), S = C.left + (p.clientLeft + parseFloat(k.paddingLeft)) * b.x, O = C.top + (p.clientTop + parseFloat(k.paddingTop)) * b.y;
|
|
768
|
+
u *= b.x, c *= b.y, f *= b.x, i *= b.y, u += S, c += O, d = q(p), p = He(d);
|
|
802
769
|
}
|
|
803
770
|
}
|
|
804
|
-
return
|
|
805
|
-
width:
|
|
806
|
-
height:
|
|
807
|
-
x:
|
|
808
|
-
y:
|
|
771
|
+
return Oe({
|
|
772
|
+
width: f,
|
|
773
|
+
height: i,
|
|
774
|
+
x: u,
|
|
775
|
+
y: c
|
|
809
776
|
});
|
|
810
777
|
}
|
|
811
|
-
function
|
|
812
|
-
const n =
|
|
813
|
-
return t ? t.left + n :
|
|
778
|
+
function Be(e, t) {
|
|
779
|
+
const n = Fe(e).scrollLeft;
|
|
780
|
+
return t ? t.left + n : ue(ee(e)).left + n;
|
|
814
781
|
}
|
|
815
|
-
function
|
|
816
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
782
|
+
function ht(e, t) {
|
|
783
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Be(e, n), s = n.top + t.scrollTop;
|
|
817
784
|
return {
|
|
818
785
|
x: o,
|
|
819
786
|
y: s
|
|
820
787
|
};
|
|
821
788
|
}
|
|
822
|
-
function
|
|
789
|
+
function xn(e) {
|
|
823
790
|
let {
|
|
824
791
|
elements: t,
|
|
825
792
|
rect: n,
|
|
826
793
|
offsetParent: o,
|
|
827
794
|
strategy: s
|
|
828
795
|
} = e;
|
|
829
|
-
const l = s === "fixed", a =
|
|
796
|
+
const l = s === "fixed", a = ee(o), r = t ? Le(t.floating) : !1;
|
|
830
797
|
if (o === a || r && l)
|
|
831
798
|
return n;
|
|
832
|
-
let
|
|
799
|
+
let u = {
|
|
833
800
|
scrollLeft: 0,
|
|
834
801
|
scrollTop: 0
|
|
835
|
-
},
|
|
836
|
-
const
|
|
837
|
-
if ((
|
|
838
|
-
const v =
|
|
839
|
-
|
|
802
|
+
}, c = Y(1);
|
|
803
|
+
const f = Y(0), i = J(o);
|
|
804
|
+
if ((i || !i && !l) && ((ge(o) !== "body" || xe(a)) && (u = Fe(o)), J(o))) {
|
|
805
|
+
const v = ue(o);
|
|
806
|
+
c = ve(o), f.x = v.x + o.clientLeft, f.y = v.y + o.clientTop;
|
|
840
807
|
}
|
|
841
|
-
const
|
|
808
|
+
const m = a && !i && !l ? ht(a, u) : Y(0);
|
|
842
809
|
return {
|
|
843
|
-
width: n.width *
|
|
844
|
-
height: n.height *
|
|
845
|
-
x: n.x *
|
|
846
|
-
y: n.y *
|
|
810
|
+
width: n.width * c.x,
|
|
811
|
+
height: n.height * c.y,
|
|
812
|
+
x: n.x * c.x - u.scrollLeft * c.x + f.x + m.x,
|
|
813
|
+
y: n.y * c.y - u.scrollTop * c.y + f.y + m.y
|
|
847
814
|
};
|
|
848
815
|
}
|
|
849
|
-
function
|
|
816
|
+
function Cn(e) {
|
|
850
817
|
return Array.from(e.getClientRects());
|
|
851
818
|
}
|
|
852
|
-
function
|
|
853
|
-
const t =
|
|
854
|
-
let a = -n.scrollLeft +
|
|
819
|
+
function kn(e) {
|
|
820
|
+
const t = ee(e), n = Fe(e), o = e.ownerDocument.body, s = re(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), l = re(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
821
|
+
let a = -n.scrollLeft + Be(e);
|
|
855
822
|
const r = -n.scrollTop;
|
|
856
|
-
return
|
|
823
|
+
return Z(o).direction === "rtl" && (a += re(t.clientWidth, o.clientWidth) - s), {
|
|
857
824
|
width: s,
|
|
858
825
|
height: l,
|
|
859
826
|
x: a,
|
|
860
827
|
y: r
|
|
861
828
|
};
|
|
862
829
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
865
|
-
const n = q(e), o =
|
|
866
|
-
let l = o.clientWidth, a = o.clientHeight, r = 0,
|
|
830
|
+
const et = 25;
|
|
831
|
+
function Rn(e, t) {
|
|
832
|
+
const n = q(e), o = ee(e), s = n.visualViewport;
|
|
833
|
+
let l = o.clientWidth, a = o.clientHeight, r = 0, u = 0;
|
|
867
834
|
if (s) {
|
|
868
835
|
l = s.width, a = s.height;
|
|
869
|
-
const
|
|
870
|
-
(!
|
|
836
|
+
const f = We();
|
|
837
|
+
(!f || f && t === "fixed") && (r = s.offsetLeft, u = s.offsetTop);
|
|
871
838
|
}
|
|
872
|
-
const
|
|
873
|
-
if (
|
|
874
|
-
const
|
|
875
|
-
|
|
876
|
-
} else
|
|
839
|
+
const c = Be(o);
|
|
840
|
+
if (c <= 0) {
|
|
841
|
+
const f = o.ownerDocument, i = f.body, m = getComputedStyle(i), v = f.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, d = Math.abs(o.clientWidth - i.clientWidth - v);
|
|
842
|
+
d <= et && (l -= d);
|
|
843
|
+
} else c <= et && (l += c);
|
|
877
844
|
return {
|
|
878
845
|
width: l,
|
|
879
846
|
height: a,
|
|
880
847
|
x: r,
|
|
881
|
-
y:
|
|
848
|
+
y: u
|
|
882
849
|
};
|
|
883
850
|
}
|
|
884
|
-
const
|
|
885
|
-
function
|
|
886
|
-
const n =
|
|
851
|
+
const Sn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
852
|
+
function Tn(e, t) {
|
|
853
|
+
const n = ue(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, l = J(e) ? ve(e) : Y(1), a = e.clientWidth * l.x, r = e.clientHeight * l.y, u = s * l.x, c = o * l.y;
|
|
887
854
|
return {
|
|
888
855
|
width: a,
|
|
889
856
|
height: r,
|
|
890
|
-
x:
|
|
891
|
-
y:
|
|
857
|
+
x: u,
|
|
858
|
+
y: c
|
|
892
859
|
};
|
|
893
860
|
}
|
|
894
|
-
function
|
|
861
|
+
function tt(e, t, n) {
|
|
895
862
|
let o;
|
|
896
863
|
if (t === "viewport")
|
|
897
|
-
o =
|
|
864
|
+
o = Rn(e, n);
|
|
898
865
|
else if (t === "document")
|
|
899
|
-
o =
|
|
900
|
-
else if (
|
|
901
|
-
o =
|
|
866
|
+
o = kn(ee(e));
|
|
867
|
+
else if (z(t))
|
|
868
|
+
o = Tn(t, n);
|
|
902
869
|
else {
|
|
903
|
-
const s =
|
|
870
|
+
const s = gt(e);
|
|
904
871
|
o = {
|
|
905
872
|
x: t.x - s.x,
|
|
906
873
|
y: t.y - s.y,
|
|
@@ -908,110 +875,110 @@ function ot(e, t, n) {
|
|
|
908
875
|
height: t.height
|
|
909
876
|
};
|
|
910
877
|
}
|
|
911
|
-
return
|
|
878
|
+
return Oe(o);
|
|
912
879
|
}
|
|
913
|
-
function
|
|
914
|
-
const n =
|
|
915
|
-
return n === t || !
|
|
880
|
+
function wt(e, t) {
|
|
881
|
+
const n = ae(e);
|
|
882
|
+
return n === t || !z(n) || pe(n) ? !1 : Z(n).position === "fixed" || wt(n, t);
|
|
916
883
|
}
|
|
917
|
-
function
|
|
884
|
+
function $n(e, t) {
|
|
918
885
|
const n = t.get(e);
|
|
919
886
|
if (n)
|
|
920
887
|
return n;
|
|
921
|
-
let o =
|
|
922
|
-
const l =
|
|
923
|
-
let a = l ?
|
|
924
|
-
for (;
|
|
925
|
-
const r =
|
|
926
|
-
!
|
|
888
|
+
let o = be(e, [], !1).filter((r) => z(r) && ge(r) !== "body"), s = null;
|
|
889
|
+
const l = Z(e).position === "fixed";
|
|
890
|
+
let a = l ? ae(e) : e;
|
|
891
|
+
for (; z(a) && !pe(a); ) {
|
|
892
|
+
const r = Z(a), u = Ke(a);
|
|
893
|
+
!u && r.position === "fixed" && (s = null), (l ? !u && !s : !u && r.position === "static" && !!s && Sn.has(s.position) || xe(a) && !u && wt(e, a)) ? o = o.filter((f) => f !== a) : s = r, a = ae(a);
|
|
927
894
|
}
|
|
928
895
|
return t.set(e, o), o;
|
|
929
896
|
}
|
|
930
|
-
function
|
|
897
|
+
function Vn(e) {
|
|
931
898
|
let {
|
|
932
899
|
element: t,
|
|
933
900
|
boundary: n,
|
|
934
901
|
rootBoundary: o,
|
|
935
902
|
strategy: s
|
|
936
903
|
} = e;
|
|
937
|
-
const a = [...n === "clippingAncestors" ?
|
|
938
|
-
const
|
|
939
|
-
return
|
|
940
|
-
},
|
|
904
|
+
const a = [...n === "clippingAncestors" ? Le(t) ? [] : $n(t, this._c) : [].concat(n), o], r = a[0], u = a.reduce((c, f) => {
|
|
905
|
+
const i = tt(t, f, s);
|
|
906
|
+
return c.top = re(i.top, c.top), c.right = Te(i.right, c.right), c.bottom = Te(i.bottom, c.bottom), c.left = re(i.left, c.left), c;
|
|
907
|
+
}, tt(t, r, s));
|
|
941
908
|
return {
|
|
942
|
-
width:
|
|
943
|
-
height:
|
|
944
|
-
x:
|
|
945
|
-
y:
|
|
909
|
+
width: u.right - u.left,
|
|
910
|
+
height: u.bottom - u.top,
|
|
911
|
+
x: u.left,
|
|
912
|
+
y: u.top
|
|
946
913
|
};
|
|
947
914
|
}
|
|
948
|
-
function
|
|
915
|
+
function On(e) {
|
|
949
916
|
const {
|
|
950
917
|
width: t,
|
|
951
918
|
height: n
|
|
952
|
-
} =
|
|
919
|
+
} = pt(e);
|
|
953
920
|
return {
|
|
954
921
|
width: t,
|
|
955
922
|
height: n
|
|
956
923
|
};
|
|
957
924
|
}
|
|
958
|
-
function
|
|
959
|
-
const o =
|
|
925
|
+
function An(e, t, n) {
|
|
926
|
+
const o = J(t), s = ee(t), l = n === "fixed", a = ue(e, !0, l, t);
|
|
960
927
|
let r = {
|
|
961
928
|
scrollLeft: 0,
|
|
962
929
|
scrollTop: 0
|
|
963
930
|
};
|
|
964
|
-
const
|
|
965
|
-
function
|
|
966
|
-
|
|
931
|
+
const u = Y(0);
|
|
932
|
+
function c() {
|
|
933
|
+
u.x = Be(s);
|
|
967
934
|
}
|
|
968
935
|
if (o || !o && !l)
|
|
969
|
-
if ((
|
|
970
|
-
const v =
|
|
971
|
-
|
|
972
|
-
} else s &&
|
|
973
|
-
l && !o && s &&
|
|
974
|
-
const
|
|
936
|
+
if ((ge(t) !== "body" || xe(s)) && (r = Fe(t)), o) {
|
|
937
|
+
const v = ue(t, !0, l, t);
|
|
938
|
+
u.x = v.x + t.clientLeft, u.y = v.y + t.clientTop;
|
|
939
|
+
} else s && c();
|
|
940
|
+
l && !o && s && c();
|
|
941
|
+
const f = s && !o && !l ? ht(s, r) : Y(0), i = a.left + r.scrollLeft - u.x - f.x, m = a.top + r.scrollTop - u.y - f.y;
|
|
975
942
|
return {
|
|
976
|
-
x:
|
|
977
|
-
y:
|
|
943
|
+
x: i,
|
|
944
|
+
y: m,
|
|
978
945
|
width: a.width,
|
|
979
946
|
height: a.height
|
|
980
947
|
};
|
|
981
948
|
}
|
|
982
|
-
function
|
|
983
|
-
return
|
|
949
|
+
function Ne(e) {
|
|
950
|
+
return Z(e).position === "static";
|
|
984
951
|
}
|
|
985
|
-
function
|
|
986
|
-
if (!
|
|
952
|
+
function nt(e, t) {
|
|
953
|
+
if (!J(e) || Z(e).position === "fixed")
|
|
987
954
|
return null;
|
|
988
955
|
if (t)
|
|
989
956
|
return t(e);
|
|
990
957
|
let n = e.offsetParent;
|
|
991
|
-
return
|
|
958
|
+
return ee(e) === n && (n = n.ownerDocument.body), n;
|
|
992
959
|
}
|
|
993
|
-
function
|
|
960
|
+
function yt(e, t) {
|
|
994
961
|
const n = q(e);
|
|
995
|
-
if (
|
|
962
|
+
if (Le(e))
|
|
996
963
|
return n;
|
|
997
|
-
if (!
|
|
998
|
-
let s =
|
|
999
|
-
for (; s && !
|
|
1000
|
-
if (
|
|
964
|
+
if (!J(e)) {
|
|
965
|
+
let s = ae(e);
|
|
966
|
+
for (; s && !pe(s); ) {
|
|
967
|
+
if (z(s) && !Ne(s))
|
|
1001
968
|
return s;
|
|
1002
|
-
s =
|
|
969
|
+
s = ae(s);
|
|
1003
970
|
}
|
|
1004
971
|
return n;
|
|
1005
972
|
}
|
|
1006
|
-
let o =
|
|
1007
|
-
for (; o &&
|
|
1008
|
-
o =
|
|
1009
|
-
return o &&
|
|
973
|
+
let o = nt(e, t);
|
|
974
|
+
for (; o && fn(o) && Ne(o); )
|
|
975
|
+
o = nt(o, t);
|
|
976
|
+
return o && pe(o) && Ne(o) && !Ke(o) ? n : o || hn(e) || n;
|
|
1010
977
|
}
|
|
1011
|
-
const
|
|
1012
|
-
const t = this.getOffsetParent ||
|
|
978
|
+
const En = async function(e) {
|
|
979
|
+
const t = this.getOffsetParent || yt, n = this.getDimensions, o = await n(e.floating);
|
|
1013
980
|
return {
|
|
1014
|
-
reference:
|
|
981
|
+
reference: An(e.reference, await t(e.floating), e.strategy),
|
|
1015
982
|
floating: {
|
|
1016
983
|
x: 0,
|
|
1017
984
|
y: 0,
|
|
@@ -1020,119 +987,119 @@ const Fn = async function(e) {
|
|
|
1020
987
|
}
|
|
1021
988
|
};
|
|
1022
989
|
};
|
|
1023
|
-
function
|
|
1024
|
-
return
|
|
1025
|
-
}
|
|
1026
|
-
const
|
|
1027
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1028
|
-
getDocumentElement:
|
|
1029
|
-
getClippingRect:
|
|
1030
|
-
getOffsetParent:
|
|
1031
|
-
getElementRects:
|
|
1032
|
-
getClientRects:
|
|
1033
|
-
getDimensions:
|
|
1034
|
-
getScale:
|
|
1035
|
-
isElement:
|
|
1036
|
-
isRTL:
|
|
990
|
+
function Pn(e) {
|
|
991
|
+
return Z(e).direction === "rtl";
|
|
992
|
+
}
|
|
993
|
+
const Dn = {
|
|
994
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: xn,
|
|
995
|
+
getDocumentElement: ee,
|
|
996
|
+
getClippingRect: Vn,
|
|
997
|
+
getOffsetParent: yt,
|
|
998
|
+
getElementRects: En,
|
|
999
|
+
getClientRects: Cn,
|
|
1000
|
+
getDimensions: On,
|
|
1001
|
+
getScale: ve,
|
|
1002
|
+
isElement: z,
|
|
1003
|
+
isRTL: Pn
|
|
1037
1004
|
};
|
|
1038
1005
|
function bt(e, t) {
|
|
1039
1006
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1040
1007
|
}
|
|
1041
|
-
function
|
|
1008
|
+
function Ln(e, t) {
|
|
1042
1009
|
let n = null, o;
|
|
1043
|
-
const s =
|
|
1010
|
+
const s = ee(e);
|
|
1044
1011
|
function l() {
|
|
1045
1012
|
var r;
|
|
1046
1013
|
clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
|
|
1047
1014
|
}
|
|
1048
|
-
function a(r,
|
|
1049
|
-
r === void 0 && (r = !1),
|
|
1050
|
-
const
|
|
1051
|
-
left:
|
|
1052
|
-
top:
|
|
1053
|
-
width:
|
|
1015
|
+
function a(r, u) {
|
|
1016
|
+
r === void 0 && (r = !1), u === void 0 && (u = 1), l();
|
|
1017
|
+
const c = e.getBoundingClientRect(), {
|
|
1018
|
+
left: f,
|
|
1019
|
+
top: i,
|
|
1020
|
+
width: m,
|
|
1054
1021
|
height: v
|
|
1055
|
-
} =
|
|
1056
|
-
if (r || t(), !
|
|
1022
|
+
} = c;
|
|
1023
|
+
if (r || t(), !m || !v)
|
|
1057
1024
|
return;
|
|
1058
|
-
const
|
|
1059
|
-
rootMargin: -
|
|
1060
|
-
threshold:
|
|
1025
|
+
const d = Re(i), p = Re(s.clientWidth - (f + m)), b = Re(s.clientHeight - (i + v)), C = Re(f), S = {
|
|
1026
|
+
rootMargin: -d + "px " + -p + "px " + -b + "px " + -C + "px",
|
|
1027
|
+
threshold: re(0, Te(1, u)) || 1
|
|
1061
1028
|
};
|
|
1062
|
-
let
|
|
1063
|
-
function A(
|
|
1064
|
-
const
|
|
1065
|
-
if (
|
|
1066
|
-
if (!
|
|
1029
|
+
let O = !0;
|
|
1030
|
+
function A(M) {
|
|
1031
|
+
const $ = M[0].intersectionRatio;
|
|
1032
|
+
if ($ !== u) {
|
|
1033
|
+
if (!O)
|
|
1067
1034
|
return a();
|
|
1068
|
-
|
|
1035
|
+
$ ? a(!1, $) : o = setTimeout(() => {
|
|
1069
1036
|
a(!1, 1e-7);
|
|
1070
1037
|
}, 1e3);
|
|
1071
1038
|
}
|
|
1072
|
-
|
|
1039
|
+
$ === 1 && !bt(c, e.getBoundingClientRect()) && a(), O = !1;
|
|
1073
1040
|
}
|
|
1074
1041
|
try {
|
|
1075
1042
|
n = new IntersectionObserver(A, {
|
|
1076
|
-
...
|
|
1043
|
+
...S,
|
|
1077
1044
|
// Handle <iframe>s
|
|
1078
1045
|
root: s.ownerDocument
|
|
1079
1046
|
});
|
|
1080
1047
|
} catch {
|
|
1081
|
-
n = new IntersectionObserver(A,
|
|
1048
|
+
n = new IntersectionObserver(A, S);
|
|
1082
1049
|
}
|
|
1083
1050
|
n.observe(e);
|
|
1084
1051
|
}
|
|
1085
1052
|
return a(!0), l;
|
|
1086
1053
|
}
|
|
1087
|
-
function
|
|
1054
|
+
function Fn(e, t, n, o) {
|
|
1088
1055
|
o === void 0 && (o = {});
|
|
1089
1056
|
const {
|
|
1090
1057
|
ancestorScroll: s = !0,
|
|
1091
1058
|
ancestorResize: l = !0,
|
|
1092
1059
|
elementResize: a = typeof ResizeObserver == "function",
|
|
1093
1060
|
layoutShift: r = typeof IntersectionObserver == "function",
|
|
1094
|
-
animationFrame:
|
|
1095
|
-
} = o,
|
|
1096
|
-
|
|
1097
|
-
s &&
|
|
1061
|
+
animationFrame: u = !1
|
|
1062
|
+
} = o, c = Ue(e), f = s || l ? [...c ? be(c) : [], ...be(t)] : [];
|
|
1063
|
+
f.forEach((C) => {
|
|
1064
|
+
s && C.addEventListener("scroll", n, {
|
|
1098
1065
|
passive: !0
|
|
1099
|
-
}), l &&
|
|
1066
|
+
}), l && C.addEventListener("resize", n);
|
|
1100
1067
|
});
|
|
1101
|
-
const
|
|
1102
|
-
let
|
|
1103
|
-
a && (v = new ResizeObserver((
|
|
1104
|
-
let [
|
|
1105
|
-
|
|
1106
|
-
var
|
|
1107
|
-
(
|
|
1068
|
+
const i = c && r ? Ln(c, n) : null;
|
|
1069
|
+
let m = -1, v = null;
|
|
1070
|
+
a && (v = new ResizeObserver((C) => {
|
|
1071
|
+
let [k] = C;
|
|
1072
|
+
k && k.target === c && v && (v.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1073
|
+
var S;
|
|
1074
|
+
(S = v) == null || S.observe(t);
|
|
1108
1075
|
})), n();
|
|
1109
|
-
}),
|
|
1110
|
-
let
|
|
1111
|
-
|
|
1112
|
-
function
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1076
|
+
}), c && !u && v.observe(c), v.observe(t));
|
|
1077
|
+
let d, p = u ? ue(e) : null;
|
|
1078
|
+
u && b();
|
|
1079
|
+
function b() {
|
|
1080
|
+
const C = ue(e);
|
|
1081
|
+
p && !bt(p, C) && n(), p = C, d = requestAnimationFrame(b);
|
|
1115
1082
|
}
|
|
1116
1083
|
return n(), () => {
|
|
1117
|
-
var
|
|
1118
|
-
|
|
1119
|
-
s &&
|
|
1120
|
-
}),
|
|
1084
|
+
var C;
|
|
1085
|
+
f.forEach((k) => {
|
|
1086
|
+
s && k.removeEventListener("scroll", n), l && k.removeEventListener("resize", n);
|
|
1087
|
+
}), i?.(), (C = v) == null || C.disconnect(), v = null, u && cancelAnimationFrame(d);
|
|
1121
1088
|
};
|
|
1122
1089
|
}
|
|
1123
|
-
const
|
|
1090
|
+
const Bn = rn, Mn = un, Nn = sn, In = (e, t, n) => {
|
|
1124
1091
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1125
|
-
platform:
|
|
1092
|
+
platform: Dn,
|
|
1126
1093
|
...n
|
|
1127
1094
|
}, l = {
|
|
1128
1095
|
...s.platform,
|
|
1129
1096
|
_c: o
|
|
1130
1097
|
};
|
|
1131
|
-
return
|
|
1098
|
+
return on(e, t, {
|
|
1132
1099
|
...s,
|
|
1133
1100
|
platform: l
|
|
1134
1101
|
});
|
|
1135
|
-
},
|
|
1102
|
+
}, Ae = {
|
|
1136
1103
|
text: (e, t, n) => {
|
|
1137
1104
|
const o = String(e[t] ?? "").toLowerCase(), s = (n.value ?? "").toLowerCase().trim();
|
|
1138
1105
|
if (!s && !["empty", "notEmpty"].includes(n.operator ?? "")) return !0;
|
|
@@ -1208,15 +1175,15 @@ const qn = fn, In = vn, Wn = un, Hn = (e, t, n) => {
|
|
|
1208
1175
|
const o = e[t];
|
|
1209
1176
|
if (typeof n.filterFn == "function")
|
|
1210
1177
|
return n.filterFn(o, n.value, e);
|
|
1211
|
-
if (n.filterKey && Object.prototype.hasOwnProperty.call(
|
|
1212
|
-
const s =
|
|
1178
|
+
if (n.filterKey && Object.prototype.hasOwnProperty.call(Ae, n.filterKey)) {
|
|
1179
|
+
const s = Ae[n.filterKey];
|
|
1213
1180
|
if (typeof s == "function")
|
|
1214
1181
|
return s(e, t, n);
|
|
1215
1182
|
}
|
|
1216
1183
|
return !0;
|
|
1217
1184
|
}
|
|
1218
1185
|
};
|
|
1219
|
-
function
|
|
1186
|
+
function me(e, t) {
|
|
1220
1187
|
const n = {
|
|
1221
1188
|
operator: t?.operator,
|
|
1222
1189
|
value: t?.value ?? null
|
|
@@ -1245,7 +1212,7 @@ function he(e, t) {
|
|
|
1245
1212
|
throw new Error(`Unsupported filter type: ${e}`);
|
|
1246
1213
|
}
|
|
1247
1214
|
}
|
|
1248
|
-
function
|
|
1215
|
+
function ot(e) {
|
|
1249
1216
|
switch (e.type) {
|
|
1250
1217
|
case "text":
|
|
1251
1218
|
return e.operator ? ["empty", "notEmpty"].includes(e.operator || "") ? !0 : !!e.value?.trim() : !1;
|
|
@@ -1261,7 +1228,7 @@ function Kn(e) {
|
|
|
1261
1228
|
return !1;
|
|
1262
1229
|
}
|
|
1263
1230
|
}
|
|
1264
|
-
const
|
|
1231
|
+
const qn = _({
|
|
1265
1232
|
name: "VsDFlex",
|
|
1266
1233
|
inheritAttrs: !1,
|
|
1267
1234
|
props: {
|
|
@@ -1274,7 +1241,7 @@ const Un = fe({
|
|
|
1274
1241
|
},
|
|
1275
1242
|
setup(e, { attrs: t }) {
|
|
1276
1243
|
const n = (s, l) => `${s}-${l}`;
|
|
1277
|
-
return { flexClasses:
|
|
1244
|
+
return { flexClasses: T(() => {
|
|
1278
1245
|
const s = ["vs-d-flex"];
|
|
1279
1246
|
return e.direction && s.push(n("vs-row", e.direction)), e.justify && s.push(n("vs-justify", e.justify)), e.align && s.push(n("vs-align", e.align)), e.wrap !== void 0 && s.push(e.wrap ? "vs-wrap" : "vs-nowrap"), e.gap && s.push(n("vs-gap", e.gap)), Object.entries(e.responsive || {}).forEach(([l, a]) => {
|
|
1280
1247
|
const r = l + ":";
|
|
@@ -1283,25 +1250,25 @@ const Un = fe({
|
|
|
1283
1250
|
}), attrs: t };
|
|
1284
1251
|
}
|
|
1285
1252
|
});
|
|
1286
|
-
function
|
|
1287
|
-
return
|
|
1288
|
-
|
|
1253
|
+
function Hn(e, t, n, o, s, l) {
|
|
1254
|
+
return h(), w("div", xt({ class: e.flexClasses }, e.attrs), [
|
|
1255
|
+
N(e.$slots, "default")
|
|
1289
1256
|
], 16);
|
|
1290
1257
|
}
|
|
1291
|
-
const
|
|
1258
|
+
const fe = /* @__PURE__ */ ne(qn, [["render", Hn]]), Kn = { class: "vs-multiselect" }, Wn = { class: "vs-multiselect-actions" }, Un = {
|
|
1292
1259
|
key: 0,
|
|
1293
1260
|
class: "vs-py-4 vs-text-center vs-text-primary"
|
|
1294
|
-
},
|
|
1261
|
+
}, jn = {
|
|
1295
1262
|
key: 1,
|
|
1296
1263
|
class: "vs-multiselect-options"
|
|
1297
|
-
},
|
|
1264
|
+
}, zn = ["onClick"], Zn = { class: "option-label" }, Qn = {
|
|
1298
1265
|
key: 0,
|
|
1299
1266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1300
1267
|
class: "check-icon",
|
|
1301
1268
|
fill: "none",
|
|
1302
1269
|
viewBox: "0 0 24 24",
|
|
1303
1270
|
stroke: "currentColor"
|
|
1304
|
-
},
|
|
1271
|
+
}, Xn = /* @__PURE__ */ _({
|
|
1305
1272
|
__name: "VsMultiSelect",
|
|
1306
1273
|
props: {
|
|
1307
1274
|
columnData: {},
|
|
@@ -1310,39 +1277,39 @@ const pe = /* @__PURE__ */ ye(Un, [["render", jn]]), zn = { class: "vs-multisele
|
|
|
1310
1277
|
},
|
|
1311
1278
|
emits: ["update:modelValue"],
|
|
1312
1279
|
setup(e, { emit: t }) {
|
|
1313
|
-
const n = e, o = t, s =
|
|
1280
|
+
const n = e, o = t, s = L(""), l = L([...n.modelValue ?? []]), a = T(() => {
|
|
1314
1281
|
const v = new Set(n.columnData.filter(Boolean));
|
|
1315
1282
|
return Array.from(v);
|
|
1316
|
-
}), r =
|
|
1283
|
+
}), r = T(() => {
|
|
1317
1284
|
const v = s.value.toLowerCase();
|
|
1318
|
-
return a.value.filter((
|
|
1319
|
-
}),
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1322
|
-
},
|
|
1285
|
+
return a.value.filter((d) => d.toString().toLowerCase().includes(v));
|
|
1286
|
+
}), u = T(() => l.value.length), c = T(() => a.value.length - l.value.length), f = (v) => {
|
|
1287
|
+
const d = l.value.indexOf(v);
|
|
1288
|
+
d > -1 ? l.value.splice(d, 1) : l.value.push(v), o("update:modelValue", [...l.value]);
|
|
1289
|
+
}, i = () => {
|
|
1323
1290
|
l.value = [...a.value], o("update:modelValue", [...l.value]);
|
|
1324
|
-
},
|
|
1291
|
+
}, m = () => {
|
|
1325
1292
|
l.value = [], o("update:modelValue", []);
|
|
1326
1293
|
};
|
|
1327
|
-
return
|
|
1294
|
+
return G(
|
|
1328
1295
|
() => n.modelValue,
|
|
1329
1296
|
(v) => {
|
|
1330
1297
|
l.value = [...v || []];
|
|
1331
1298
|
}
|
|
1332
|
-
), (v,
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
onClick:
|
|
1336
|
-
}, "Select All (" +
|
|
1337
|
-
|
|
1338
|
-
onClick:
|
|
1339
|
-
}, "Deselect All (" +
|
|
1299
|
+
), (v, d) => (h(), w("div", Kn, [
|
|
1300
|
+
g("div", Wn, [
|
|
1301
|
+
g("button", {
|
|
1302
|
+
onClick: le(i, ["stop"])
|
|
1303
|
+
}, "Select All (" + D(c.value) + ")", 1),
|
|
1304
|
+
g("button", {
|
|
1305
|
+
onClick: le(m, ["stop"])
|
|
1306
|
+
}, "Deselect All (" + D(u.value) + ")", 1)
|
|
1340
1307
|
]),
|
|
1341
|
-
|
|
1342
|
-
default:
|
|
1343
|
-
U(
|
|
1308
|
+
X(fe, { direction: "row" }, {
|
|
1309
|
+
default: H(() => [
|
|
1310
|
+
U(g("input", {
|
|
1344
1311
|
type: "text",
|
|
1345
|
-
"onUpdate:modelValue":
|
|
1312
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => s.value = p),
|
|
1346
1313
|
placeholder: "Search...",
|
|
1347
1314
|
class: "vs-multiselect-search vs-w-full"
|
|
1348
1315
|
}, null, 512), [
|
|
@@ -1351,48 +1318,48 @@ const pe = /* @__PURE__ */ ye(Un, [["render", jn]]), zn = { class: "vs-multisele
|
|
|
1351
1318
|
]),
|
|
1352
1319
|
_: 1
|
|
1353
1320
|
}),
|
|
1354
|
-
e.isLoading ? (
|
|
1355
|
-
(
|
|
1356
|
-
key:
|
|
1357
|
-
onClick:
|
|
1358
|
-
class: W({ selected: l.value.includes(
|
|
1321
|
+
e.isLoading ? (h(), w("div", Un, "Loading options...")) : (h(), w("ul", jn, [
|
|
1322
|
+
(h(!0), w(K, null, j(r.value, (p) => (h(), w("li", {
|
|
1323
|
+
key: p,
|
|
1324
|
+
onClick: le((b) => f(p), ["stop"]),
|
|
1325
|
+
class: W({ selected: l.value.includes(p) })
|
|
1359
1326
|
}, [
|
|
1360
|
-
|
|
1361
|
-
l.value.includes(
|
|
1362
|
-
|
|
1327
|
+
g("span", Zn, D(p), 1),
|
|
1328
|
+
l.value.includes(p) ? (h(), w("svg", Qn, [...d[1] || (d[1] = [
|
|
1329
|
+
g("path", {
|
|
1363
1330
|
"stroke-linecap": "round",
|
|
1364
1331
|
"stroke-linejoin": "round",
|
|
1365
1332
|
"stroke-width": "2",
|
|
1366
1333
|
d: "M5 13l4 4L19 7"
|
|
1367
1334
|
}, null, -1)
|
|
1368
|
-
])])) :
|
|
1369
|
-
], 10,
|
|
1335
|
+
])])) : P("", !0)
|
|
1336
|
+
], 10, zn))), 128))
|
|
1370
1337
|
]))
|
|
1371
1338
|
]));
|
|
1372
1339
|
}
|
|
1373
|
-
}),
|
|
1374
|
-
function
|
|
1375
|
-
const t =
|
|
1340
|
+
}), Se = /* @__PURE__ */ new Map();
|
|
1341
|
+
function Yn(e) {
|
|
1342
|
+
const t = L(e.columnData || []), n = L(!1), o = () => n.value = !0, s = () => n.value = !1;
|
|
1376
1343
|
async function l(r = !1) {
|
|
1377
1344
|
if (!e.asyncOptions) return;
|
|
1378
|
-
const
|
|
1379
|
-
if (!r &&
|
|
1380
|
-
t.value =
|
|
1345
|
+
const u = e.cacheKey ?? "default";
|
|
1346
|
+
if (!r && Se.has(u)) {
|
|
1347
|
+
t.value = Se.get(u);
|
|
1381
1348
|
return;
|
|
1382
1349
|
}
|
|
1383
1350
|
try {
|
|
1384
1351
|
o();
|
|
1385
|
-
const
|
|
1386
|
-
t.value =
|
|
1387
|
-
} catch (
|
|
1388
|
-
console.error("Failed to load async filter options:",
|
|
1352
|
+
const c = await e.asyncOptions(), f = Array.isArray(c) ? c : [];
|
|
1353
|
+
t.value = f, Se.set(u, f);
|
|
1354
|
+
} catch (c) {
|
|
1355
|
+
console.error("Failed to load async filter options:", c);
|
|
1389
1356
|
} finally {
|
|
1390
1357
|
s();
|
|
1391
1358
|
}
|
|
1392
1359
|
}
|
|
1393
1360
|
function a() {
|
|
1394
1361
|
const r = e.cacheKey ?? "default";
|
|
1395
|
-
|
|
1362
|
+
Se.delete(r);
|
|
1396
1363
|
}
|
|
1397
1364
|
return {
|
|
1398
1365
|
columnOrAsyncOptions: t,
|
|
@@ -1401,34 +1368,34 @@ function to(e) {
|
|
|
1401
1368
|
loadAsyncOptions: l
|
|
1402
1369
|
};
|
|
1403
1370
|
}
|
|
1404
|
-
const
|
|
1371
|
+
const Gn = {
|
|
1405
1372
|
key: 0,
|
|
1406
1373
|
class: "vs-filter-text"
|
|
1407
|
-
},
|
|
1374
|
+
}, Jn = {
|
|
1408
1375
|
key: 0,
|
|
1409
1376
|
class: "vs-pb-sm"
|
|
1410
|
-
},
|
|
1377
|
+
}, _n = ["value"], eo = {
|
|
1411
1378
|
key: 1,
|
|
1412
1379
|
class: "vs-filter-multi"
|
|
1413
|
-
},
|
|
1380
|
+
}, to = {
|
|
1414
1381
|
key: 2,
|
|
1415
1382
|
class: "vs-filter-range"
|
|
1416
|
-
},
|
|
1383
|
+
}, no = {
|
|
1417
1384
|
key: 0,
|
|
1418
1385
|
class: "vs-pb-sm"
|
|
1419
|
-
},
|
|
1386
|
+
}, oo = ["value"], so = { key: 1 }, lo = { class: "vs-operator-fixed" }, ao = { key: 4 }, ro = {
|
|
1420
1387
|
key: 3,
|
|
1421
1388
|
class: "vs-filter-date"
|
|
1422
|
-
},
|
|
1389
|
+
}, io = {
|
|
1423
1390
|
key: 0,
|
|
1424
1391
|
class: "vs-pb-sm"
|
|
1425
|
-
},
|
|
1392
|
+
}, uo = ["value"], co = { key: 1 }, fo = { class: "vs-operator-fixed" }, vo = {
|
|
1426
1393
|
key: 4,
|
|
1427
1394
|
class: "vs-muted vs-text-center vs-pt-sm"
|
|
1428
|
-
},
|
|
1395
|
+
}, mo = {
|
|
1429
1396
|
key: 4,
|
|
1430
1397
|
class: "vs-filter-actions"
|
|
1431
|
-
},
|
|
1398
|
+
}, po = /* @__PURE__ */ _({
|
|
1432
1399
|
__name: "VsDataTableFilterDropdown",
|
|
1433
1400
|
props: {
|
|
1434
1401
|
modelValue: {},
|
|
@@ -1436,13 +1403,12 @@ const no = {
|
|
|
1436
1403
|
field: {},
|
|
1437
1404
|
visible: { type: Boolean },
|
|
1438
1405
|
operators: {},
|
|
1439
|
-
anchorEl: {},
|
|
1440
1406
|
columnData: { default: () => [] },
|
|
1441
1407
|
asyncOptions: {}
|
|
1442
1408
|
},
|
|
1443
1409
|
emits: ["update:modelValue", "apply", "clear", "open", "close"],
|
|
1444
1410
|
setup(e, { emit: t }) {
|
|
1445
|
-
const n = e, o = t, { columnOrAsyncOptions: s, isLoading: l, loadAsyncOptions: a } =
|
|
1411
|
+
const n = e, o = t, { columnOrAsyncOptions: s, isLoading: l, loadAsyncOptions: a } = Yn({
|
|
1446
1412
|
asyncOptions: n.asyncOptions,
|
|
1447
1413
|
columnData: n.columnData,
|
|
1448
1414
|
cacheKey: n.field
|
|
@@ -1462,8 +1428,8 @@ const no = {
|
|
|
1462
1428
|
"date-range": ["between", "equals", "notEqual", "before", "after", "empty", "notEmpty"],
|
|
1463
1429
|
custom: []
|
|
1464
1430
|
};
|
|
1465
|
-
function
|
|
1466
|
-
switch (
|
|
1431
|
+
function u($) {
|
|
1432
|
+
switch ($) {
|
|
1467
1433
|
case "notEqual":
|
|
1468
1434
|
return "Not Equal";
|
|
1469
1435
|
case "greaterThan":
|
|
@@ -1481,363 +1447,741 @@ const no = {
|
|
|
1481
1447
|
case "notEmpty":
|
|
1482
1448
|
return "Not Empty";
|
|
1483
1449
|
default:
|
|
1484
|
-
return
|
|
1450
|
+
return $.charAt(0).toUpperCase() + $.slice(1);
|
|
1485
1451
|
}
|
|
1486
1452
|
}
|
|
1487
|
-
const
|
|
1488
|
-
|
|
1453
|
+
const c = T(() => n.type === "custom" ? [] : n.operators?.length ? n.operators : r[n.type]), f = L(null), i = L(null), m = L(), v = L(!1);
|
|
1454
|
+
G(
|
|
1489
1455
|
() => n.visible,
|
|
1490
|
-
async (
|
|
1491
|
-
v.value =
|
|
1456
|
+
async ($) => {
|
|
1457
|
+
v.value = !!$, v.value ? (await Ct(), S(), n.asyncOptions && a()) : O();
|
|
1492
1458
|
},
|
|
1493
1459
|
{ immediate: !0 }
|
|
1494
1460
|
);
|
|
1495
|
-
const
|
|
1496
|
-
|
|
1461
|
+
const d = L(me(n.type, n.modelValue));
|
|
1462
|
+
G(
|
|
1497
1463
|
() => n.modelValue,
|
|
1498
|
-
(
|
|
1499
|
-
|
|
1464
|
+
($) => {
|
|
1465
|
+
d.value = me(n.type, $);
|
|
1500
1466
|
},
|
|
1501
1467
|
{ immediate: !0 }
|
|
1502
1468
|
);
|
|
1503
|
-
function
|
|
1469
|
+
function p() {
|
|
1504
1470
|
o("open");
|
|
1505
1471
|
}
|
|
1472
|
+
function b() {
|
|
1473
|
+
o("update:modelValue", { ...d.value }), o("apply", { ...d.value });
|
|
1474
|
+
}
|
|
1506
1475
|
function C() {
|
|
1507
|
-
o("update:modelValue", { ...
|
|
1476
|
+
d.value = me(n.type), o("update:modelValue", { ...d.value }), o("clear"), k();
|
|
1508
1477
|
}
|
|
1509
1478
|
function k() {
|
|
1510
|
-
u.value = he(n.type), o("update:modelValue", { ...u.value }), o("clear"), S();
|
|
1511
|
-
}
|
|
1512
|
-
function S() {
|
|
1513
1479
|
o("close");
|
|
1514
1480
|
}
|
|
1515
|
-
function
|
|
1516
|
-
!
|
|
1517
|
-
|
|
1481
|
+
function S() {
|
|
1482
|
+
!f.value || !i.value || (m.value = Fn(f.value, i.value, () => {
|
|
1483
|
+
In(f.value, i.value, {
|
|
1518
1484
|
placement: "bottom-start",
|
|
1519
|
-
middleware: [
|
|
1520
|
-
}).then(({ x:
|
|
1521
|
-
Object.assign(
|
|
1522
|
-
left: `${
|
|
1523
|
-
top: `${
|
|
1485
|
+
middleware: [Bn(6), Nn(), Mn({ padding: 8 })]
|
|
1486
|
+
}).then(({ x: $, y: x }) => {
|
|
1487
|
+
Object.assign(i.value.style, {
|
|
1488
|
+
left: `${$}px`,
|
|
1489
|
+
top: `${x}px`,
|
|
1524
1490
|
position: "absolute",
|
|
1525
1491
|
zIndex: 2e3
|
|
1526
1492
|
});
|
|
1527
1493
|
});
|
|
1528
1494
|
}));
|
|
1529
1495
|
}
|
|
1530
|
-
function
|
|
1531
|
-
|
|
1496
|
+
function O() {
|
|
1497
|
+
m.value?.(), m.value = void 0;
|
|
1532
1498
|
}
|
|
1533
|
-
function A(
|
|
1534
|
-
const
|
|
1535
|
-
v.value &&
|
|
1499
|
+
function A($) {
|
|
1500
|
+
const x = $.target;
|
|
1501
|
+
v.value && f.value && i.value && !f.value.contains(x) && !i.value.contains(x) && k();
|
|
1536
1502
|
}
|
|
1537
|
-
function
|
|
1538
|
-
|
|
1503
|
+
function M($) {
|
|
1504
|
+
$.key === "Escape" && v.value && k();
|
|
1539
1505
|
}
|
|
1540
|
-
return
|
|
1541
|
-
document.addEventListener("click", A), document.addEventListener("keydown",
|
|
1542
|
-
}),
|
|
1543
|
-
document.removeEventListener("click", A), document.removeEventListener("keydown",
|
|
1544
|
-
}), (
|
|
1545
|
-
|
|
1506
|
+
return st(() => {
|
|
1507
|
+
document.addEventListener("click", A), document.addEventListener("keydown", M);
|
|
1508
|
+
}), lt(() => {
|
|
1509
|
+
document.removeEventListener("click", A), document.removeEventListener("keydown", M), O();
|
|
1510
|
+
}), ($, x) => (h(), w(K, null, [
|
|
1511
|
+
g("span", {
|
|
1546
1512
|
ref_key: "referenceRef",
|
|
1547
|
-
ref:
|
|
1548
|
-
class: W(["vs-column-filter", {
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1513
|
+
ref: f,
|
|
1514
|
+
class: W(["vs-column-filter", {
|
|
1515
|
+
"is-active": R(ot)(d.value),
|
|
1516
|
+
"in-active": !R(ot)(d.value)
|
|
1517
|
+
}]),
|
|
1518
|
+
onClick: le(p, ["stop"])
|
|
1519
|
+
}, [...x[13] || (x[13] = [
|
|
1520
|
+
g("svg", {
|
|
1552
1521
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1553
1522
|
height: "24px",
|
|
1554
1523
|
viewBox: "0 -960 960 960",
|
|
1555
1524
|
width: "24px",
|
|
1556
|
-
fill: "
|
|
1525
|
+
fill: "currentColor"
|
|
1557
1526
|
}, [
|
|
1558
|
-
|
|
1527
|
+
g("path", { d: "M440-160q-17 0-28.5-11.5T400-200v-240L168-736q-15-20-4.5-42t36.5-22h560q26 0 36.5 22t-4.5 42L560-440v240q0 17-11.5 28.5T520-160h-80Zm40-308 198-252H282l198 252Zm0 0Z" })
|
|
1559
1528
|
], -1)
|
|
1560
1529
|
])], 2),
|
|
1561
|
-
(
|
|
1562
|
-
|
|
1563
|
-
default:
|
|
1564
|
-
v.value ? (
|
|
1530
|
+
(h(), de(kt, { to: "body" }, [
|
|
1531
|
+
X(Rt, { name: "fade" }, {
|
|
1532
|
+
default: H(() => [
|
|
1533
|
+
v.value ? (h(), w("div", {
|
|
1565
1534
|
key: 0,
|
|
1566
1535
|
ref_key: "floatingRef",
|
|
1567
|
-
ref:
|
|
1536
|
+
ref: i,
|
|
1568
1537
|
class: "vs-filter-dropdown",
|
|
1569
1538
|
style: { position: "absolute", "z-index": "1000" },
|
|
1570
|
-
onClick:
|
|
1539
|
+
onClick: x[12] || (x[12] = le(() => {
|
|
1571
1540
|
}, ["stop"]))
|
|
1572
1541
|
}, [
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
U(
|
|
1576
|
-
"onUpdate:modelValue":
|
|
1542
|
+
d.value.type === "text" ? (h(), w("div", Gn, [
|
|
1543
|
+
c.value.length > 1 ? (h(), w("div", Jn, [
|
|
1544
|
+
U(g("select", {
|
|
1545
|
+
"onUpdate:modelValue": x[0] || (x[0] = (y) => d.value.operator = y),
|
|
1577
1546
|
class: "vs-operator-select vs-mx-auto vs-w-full"
|
|
1578
1547
|
}, [
|
|
1579
|
-
(
|
|
1580
|
-
key:
|
|
1581
|
-
value:
|
|
1582
|
-
},
|
|
1548
|
+
(h(!0), w(K, null, j(c.value, (y) => (h(), w("option", {
|
|
1549
|
+
key: y,
|
|
1550
|
+
value: y
|
|
1551
|
+
}, D(u(y)), 9, _n))), 128))
|
|
1583
1552
|
], 512), [
|
|
1584
|
-
[
|
|
1553
|
+
[Me, d.value.operator]
|
|
1585
1554
|
])
|
|
1586
|
-
])) :
|
|
1587
|
-
|
|
1555
|
+
])) : P("", !0),
|
|
1556
|
+
X(fe, {
|
|
1588
1557
|
direction: "row",
|
|
1589
1558
|
class: "mb-6"
|
|
1590
1559
|
}, {
|
|
1591
|
-
default:
|
|
1592
|
-
U(
|
|
1560
|
+
default: H(() => [
|
|
1561
|
+
U(g("input", {
|
|
1593
1562
|
type: "text",
|
|
1594
|
-
"onUpdate:modelValue":
|
|
1563
|
+
"onUpdate:modelValue": x[1] || (x[1] = (y) => d.value.value = y),
|
|
1595
1564
|
placeholder: "Search...",
|
|
1596
1565
|
class: "vs-input vs-mx-auto vs-w-full"
|
|
1597
1566
|
}, null, 512), [
|
|
1598
|
-
[oe,
|
|
1567
|
+
[oe, d.value.value]
|
|
1599
1568
|
])
|
|
1600
1569
|
]),
|
|
1601
1570
|
_: 1
|
|
1602
1571
|
})
|
|
1603
|
-
])) :
|
|
1604
|
-
e.asyncOptions ? (
|
|
1572
|
+
])) : d.value.type === "multi-select" ? (h(), w("div", eo, [
|
|
1573
|
+
e.asyncOptions ? (h(), w("button", {
|
|
1605
1574
|
key: 0,
|
|
1606
|
-
onClick:
|
|
1607
|
-
}, "🔄 Reload")) :
|
|
1608
|
-
|
|
1609
|
-
isLoading:
|
|
1610
|
-
columnData:
|
|
1611
|
-
modelValue:
|
|
1612
|
-
"onUpdate:modelValue":
|
|
1575
|
+
onClick: x[2] || (x[2] = (y) => R(a)(!0))
|
|
1576
|
+
}, "🔄 Reload")) : P("", !0),
|
|
1577
|
+
X(Xn, {
|
|
1578
|
+
isLoading: R(l),
|
|
1579
|
+
columnData: R(s),
|
|
1580
|
+
modelValue: d.value.value,
|
|
1581
|
+
"onUpdate:modelValue": x[3] || (x[3] = (y) => d.value.value = y),
|
|
1613
1582
|
placeholder: "Select values..."
|
|
1614
1583
|
}, null, 8, ["isLoading", "columnData", "modelValue"])
|
|
1615
|
-
])) :
|
|
1616
|
-
|
|
1617
|
-
U(
|
|
1618
|
-
"onUpdate:modelValue":
|
|
1584
|
+
])) : d.value.type === "number-range" ? (h(), w("div", to, [
|
|
1585
|
+
c.value.length > 1 ? (h(), w("div", no, [
|
|
1586
|
+
U(g("select", {
|
|
1587
|
+
"onUpdate:modelValue": x[4] || (x[4] = (y) => d.value.operator = y),
|
|
1619
1588
|
class: "vs-operator-select vs-w-full"
|
|
1620
1589
|
}, [
|
|
1621
|
-
(
|
|
1622
|
-
key:
|
|
1623
|
-
value:
|
|
1624
|
-
},
|
|
1590
|
+
(h(!0), w(K, null, j(c.value, (y) => (h(), w("option", {
|
|
1591
|
+
key: y,
|
|
1592
|
+
value: y
|
|
1593
|
+
}, D(u(y)), 9, oo))), 128))
|
|
1625
1594
|
], 512), [
|
|
1626
|
-
[
|
|
1595
|
+
[Me, d.value.operator]
|
|
1627
1596
|
])
|
|
1628
|
-
])) : (
|
|
1629
|
-
|
|
1597
|
+
])) : (h(), w("div", so, [
|
|
1598
|
+
g("span", lo, D(d.value.operator), 1)
|
|
1630
1599
|
])),
|
|
1631
|
-
|
|
1600
|
+
d.value.operator === "between" ? (h(), de(fe, {
|
|
1632
1601
|
key: 2,
|
|
1633
1602
|
justify: "between",
|
|
1634
1603
|
align: "center",
|
|
1635
1604
|
gap: "4",
|
|
1636
1605
|
class: "mb-6"
|
|
1637
1606
|
}, {
|
|
1638
|
-
default:
|
|
1639
|
-
U(
|
|
1607
|
+
default: H(() => [
|
|
1608
|
+
U(g("input", {
|
|
1640
1609
|
type: "number",
|
|
1641
|
-
"onUpdate:modelValue":
|
|
1610
|
+
"onUpdate:modelValue": x[5] || (x[5] = (y) => d.value.min = y),
|
|
1642
1611
|
placeholder: "Min",
|
|
1643
1612
|
class: "vs-input vs-w-full"
|
|
1644
1613
|
}, null, 512), [
|
|
1645
1614
|
[
|
|
1646
1615
|
oe,
|
|
1647
|
-
|
|
1616
|
+
d.value.min,
|
|
1648
1617
|
void 0,
|
|
1649
1618
|
{ number: !0 }
|
|
1650
1619
|
]
|
|
1651
1620
|
]),
|
|
1652
|
-
|
|
1653
|
-
U(
|
|
1621
|
+
x[14] || (x[14] = g("span", null, "-", -1)),
|
|
1622
|
+
U(g("input", {
|
|
1654
1623
|
type: "number",
|
|
1655
|
-
"onUpdate:modelValue":
|
|
1624
|
+
"onUpdate:modelValue": x[6] || (x[6] = (y) => d.value.max = y),
|
|
1656
1625
|
placeholder: "Max",
|
|
1657
1626
|
class: "vs-input vs-w-full"
|
|
1658
1627
|
}, null, 512), [
|
|
1659
1628
|
[
|
|
1660
1629
|
oe,
|
|
1661
|
-
|
|
1630
|
+
d.value.max,
|
|
1662
1631
|
void 0,
|
|
1663
1632
|
{ number: !0 }
|
|
1664
1633
|
]
|
|
1665
1634
|
])
|
|
1666
1635
|
]),
|
|
1667
1636
|
_: 1
|
|
1668
|
-
})) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(
|
|
1637
|
+
})) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(d.value.operator || "") ? (h(), de(fe, {
|
|
1669
1638
|
key: 3,
|
|
1670
1639
|
direction: "row"
|
|
1671
1640
|
}, {
|
|
1672
|
-
default:
|
|
1673
|
-
U(
|
|
1641
|
+
default: H(() => [
|
|
1642
|
+
U(g("input", {
|
|
1674
1643
|
type: "number",
|
|
1675
|
-
"onUpdate:modelValue":
|
|
1644
|
+
"onUpdate:modelValue": x[7] || (x[7] = (y) => d.value.value = y),
|
|
1676
1645
|
placeholder: "Enter number",
|
|
1677
1646
|
class: "vs-input vs-w-full"
|
|
1678
1647
|
}, null, 512), [
|
|
1679
1648
|
[
|
|
1680
1649
|
oe,
|
|
1681
|
-
|
|
1650
|
+
d.value.value,
|
|
1682
1651
|
void 0,
|
|
1683
1652
|
{ number: !0 }
|
|
1684
1653
|
]
|
|
1685
1654
|
])
|
|
1686
1655
|
]),
|
|
1687
1656
|
_: 1
|
|
1688
|
-
})) : ["empty", "notEmpty"].includes(
|
|
1689
|
-
|
|
1690
|
-
])])) :
|
|
1691
|
-
])) :
|
|
1692
|
-
|
|
1693
|
-
U(
|
|
1694
|
-
"onUpdate:modelValue":
|
|
1657
|
+
})) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (h(), w("div", ao, [...x[15] || (x[15] = [
|
|
1658
|
+
g("div", { class: "vs-muted vs-text-center vs-pt-sm" }, "No input required", -1)
|
|
1659
|
+
])])) : P("", !0)
|
|
1660
|
+
])) : d.value.type === "date-range" ? (h(), w("div", ro, [
|
|
1661
|
+
c.value.length > 1 ? (h(), w("div", io, [
|
|
1662
|
+
U(g("select", {
|
|
1663
|
+
"onUpdate:modelValue": x[8] || (x[8] = (y) => d.value.operator = y),
|
|
1695
1664
|
class: "vs-operator-select vs-w-full"
|
|
1696
1665
|
}, [
|
|
1697
|
-
(
|
|
1698
|
-
key:
|
|
1699
|
-
value:
|
|
1700
|
-
},
|
|
1666
|
+
(h(!0), w(K, null, j(c.value, (y) => (h(), w("option", {
|
|
1667
|
+
key: y,
|
|
1668
|
+
value: y
|
|
1669
|
+
}, D(u(y)), 9, uo))), 128))
|
|
1701
1670
|
], 512), [
|
|
1702
|
-
[
|
|
1671
|
+
[Me, d.value.operator]
|
|
1703
1672
|
])
|
|
1704
|
-
])) : (
|
|
1705
|
-
|
|
1673
|
+
])) : (h(), w("div", co, [
|
|
1674
|
+
g("span", fo, D(d.value.operator), 1)
|
|
1706
1675
|
])),
|
|
1707
|
-
|
|
1676
|
+
d.value.operator === "between" ? (h(), de(fe, {
|
|
1708
1677
|
key: 2,
|
|
1709
1678
|
justify: "between",
|
|
1710
1679
|
align: "center",
|
|
1711
1680
|
gap: "4",
|
|
1712
1681
|
class: "mb-6"
|
|
1713
1682
|
}, {
|
|
1714
|
-
default:
|
|
1715
|
-
U(
|
|
1683
|
+
default: H(() => [
|
|
1684
|
+
U(g("input", {
|
|
1716
1685
|
type: "date",
|
|
1717
|
-
"onUpdate:modelValue":
|
|
1686
|
+
"onUpdate:modelValue": x[9] || (x[9] = (y) => d.value.start = y),
|
|
1718
1687
|
class: "vs-input vs-w-full"
|
|
1719
1688
|
}, null, 512), [
|
|
1720
|
-
[oe,
|
|
1689
|
+
[oe, d.value.start]
|
|
1721
1690
|
]),
|
|
1722
|
-
|
|
1723
|
-
U(
|
|
1691
|
+
x[16] || (x[16] = g("span", null, "-", -1)),
|
|
1692
|
+
U(g("input", {
|
|
1724
1693
|
type: "date",
|
|
1725
|
-
"onUpdate:modelValue":
|
|
1694
|
+
"onUpdate:modelValue": x[10] || (x[10] = (y) => d.value.end = y),
|
|
1726
1695
|
class: "vs-input vs-w-full"
|
|
1727
1696
|
}, null, 512), [
|
|
1728
|
-
[oe,
|
|
1697
|
+
[oe, d.value.end]
|
|
1729
1698
|
])
|
|
1730
1699
|
]),
|
|
1731
1700
|
_: 1
|
|
1732
|
-
})) : ["equals", "notEqual", "before", "after"].includes(
|
|
1701
|
+
})) : ["equals", "notEqual", "before", "after"].includes(d.value.operator || "") ? (h(), de(fe, {
|
|
1733
1702
|
key: 3,
|
|
1734
1703
|
direction: "row",
|
|
1735
1704
|
class: "vs-filter-single-date"
|
|
1736
1705
|
}, {
|
|
1737
|
-
default:
|
|
1738
|
-
U(
|
|
1706
|
+
default: H(() => [
|
|
1707
|
+
U(g("input", {
|
|
1739
1708
|
type: "date",
|
|
1740
|
-
"onUpdate:modelValue":
|
|
1709
|
+
"onUpdate:modelValue": x[11] || (x[11] = (y) => d.value.value = y),
|
|
1741
1710
|
class: "vs-input vs-w-full"
|
|
1742
1711
|
}, null, 512), [
|
|
1743
|
-
[oe,
|
|
1712
|
+
[oe, d.value.value]
|
|
1744
1713
|
])
|
|
1745
1714
|
]),
|
|
1746
1715
|
_: 1
|
|
1747
|
-
})) : ["empty", "notEmpty"].includes(
|
|
1748
|
-
])) :
|
|
1749
|
-
|
|
1750
|
-
|
|
1716
|
+
})) : ["empty", "notEmpty"].includes(d.value.operator || "") ? (h(), w("div", vo, " No date input required ")) : P("", !0)
|
|
1717
|
+
])) : P("", !0),
|
|
1718
|
+
d.value.type !== "custom" ? (h(), w("div", mo, [
|
|
1719
|
+
g("button", {
|
|
1751
1720
|
class: "vs-btn vs-btn-primary",
|
|
1752
|
-
onClick:
|
|
1721
|
+
onClick: b
|
|
1753
1722
|
}, "Apply"),
|
|
1754
|
-
|
|
1723
|
+
g("button", {
|
|
1755
1724
|
class: "vs-btn vs-btn-secondary",
|
|
1756
|
-
onClick:
|
|
1725
|
+
onClick: C
|
|
1757
1726
|
}, "Clear")
|
|
1758
|
-
])) :
|
|
1759
|
-
|
|
1760
|
-
filter:
|
|
1761
|
-
apply:
|
|
1762
|
-
clear:
|
|
1727
|
+
])) : P("", !0),
|
|
1728
|
+
N($.$slots, "custom", {
|
|
1729
|
+
filter: d.value,
|
|
1730
|
+
apply: b,
|
|
1731
|
+
clear: C
|
|
1763
1732
|
}, void 0, !0)
|
|
1764
|
-
], 512)) :
|
|
1733
|
+
], 512)) : P("", !0)
|
|
1765
1734
|
]),
|
|
1766
1735
|
_: 3
|
|
1767
1736
|
})
|
|
1768
1737
|
]))
|
|
1769
1738
|
], 64));
|
|
1770
1739
|
}
|
|
1771
|
-
}),
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1740
|
+
}), go = /* @__PURE__ */ ne(po, [["__scopeId", "data-v-1e9d83a6"]]), ho = {
|
|
1741
|
+
key: 0,
|
|
1742
|
+
class: "vs-expand-column",
|
|
1743
|
+
style: { width: "5%" }
|
|
1744
|
+
}, wo = {
|
|
1745
|
+
key: 1,
|
|
1746
|
+
class: "vs-checkbox-column",
|
|
1747
|
+
style: { width: "5%" }
|
|
1748
|
+
}, yo = { class: "vs-checkbox" }, bo = ["id", "checked", "indeterminate"], xo = ["for"], Co = ["onClick"], ko = { class: "vs-header-content" }, Ro = { class: "vs-header-label" }, So = {
|
|
1749
|
+
key: 0,
|
|
1750
|
+
class: "vs-sort-icons"
|
|
1751
|
+
}, To = {
|
|
1752
|
+
key: 1,
|
|
1753
|
+
class: "vs-sort-priority"
|
|
1754
|
+
}, $o = /* @__PURE__ */ _({
|
|
1755
|
+
__name: "VsDataTableHeader",
|
|
1756
|
+
props: {
|
|
1757
|
+
columns: {},
|
|
1758
|
+
expandable: { type: Boolean },
|
|
1759
|
+
isItemSelectedControlled: { type: Boolean },
|
|
1760
|
+
isAllChecked: { type: Boolean },
|
|
1761
|
+
isSomeChecked: { type: Boolean },
|
|
1762
|
+
tablename: {},
|
|
1763
|
+
sortHelpers: {},
|
|
1764
|
+
filters: {},
|
|
1765
|
+
anchorEl: {},
|
|
1766
|
+
rows: {},
|
|
1767
|
+
headerClass: {}
|
|
1768
|
+
},
|
|
1769
|
+
emits: ["toggleAll", "applyFilter", "clearFilter", "update:filters"],
|
|
1770
|
+
setup(e, { emit: t }) {
|
|
1771
|
+
const n = e, o = t;
|
|
1772
|
+
function s(c) {
|
|
1773
|
+
o("toggleAll", c);
|
|
1774
|
+
}
|
|
1775
|
+
const l = T({
|
|
1776
|
+
get: () => n.filters,
|
|
1777
|
+
set: (c) => o("update:filters", c)
|
|
1778
|
+
}), a = L(null);
|
|
1779
|
+
function r(c) {
|
|
1780
|
+
a.value = c;
|
|
1781
|
+
}
|
|
1782
|
+
function u(c) {
|
|
1783
|
+
a.value === c && (a.value = null);
|
|
1784
|
+
}
|
|
1785
|
+
return (c, f) => (h(), w("thead", null, [
|
|
1786
|
+
g("tr", null, [
|
|
1787
|
+
e.expandable ? (h(), w("th", ho)) : P("", !0),
|
|
1788
|
+
e.isItemSelectedControlled ? (h(), w("th", wo, [
|
|
1789
|
+
g("div", yo, [
|
|
1790
|
+
g("input", {
|
|
1791
|
+
type: "checkbox",
|
|
1792
|
+
id: e.tablename + "-main-checkbox",
|
|
1793
|
+
checked: e.isAllChecked,
|
|
1794
|
+
indeterminate: e.isSomeChecked,
|
|
1795
|
+
onChange: s
|
|
1796
|
+
}, null, 40, bo),
|
|
1797
|
+
g("label", {
|
|
1798
|
+
for: e.tablename + "-main-checkbox"
|
|
1799
|
+
}, null, 8, xo)
|
|
1800
|
+
])
|
|
1801
|
+
])) : P("", !0),
|
|
1802
|
+
(h(!0), w(K, null, j(e.columns, (i) => (h(), w("th", {
|
|
1803
|
+
key: i.field,
|
|
1804
|
+
onClick: (m) => i.sortable ? e.sortHelpers.handleSort(i.field, m) : null,
|
|
1805
|
+
style: St({ width: i.width + "%" }),
|
|
1806
|
+
class: W([i.sortable ? "vs-sortable" : "", e.headerClass])
|
|
1807
|
+
}, [
|
|
1808
|
+
N(c.$slots, `header-${i.field}`, { column: i }, () => [
|
|
1809
|
+
g("div", ko, [
|
|
1810
|
+
g("span", Ro, D(i.label), 1),
|
|
1811
|
+
i.sortable ? (h(), w("div", So, [
|
|
1812
|
+
g("span", {
|
|
1813
|
+
class: W(["vs-sort-icon vs-sort-asc", {
|
|
1814
|
+
"vs-active": e.sortHelpers.isColumnSorted(i.field) && e.sortHelpers.getSortOrder(i.field) === "asc"
|
|
1815
|
+
}])
|
|
1816
|
+
}, [...f[0] || (f[0] = [
|
|
1817
|
+
g("svg", {
|
|
1818
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1819
|
+
height: "24px",
|
|
1820
|
+
viewBox: "0 -960 960 960",
|
|
1821
|
+
width: "24px",
|
|
1822
|
+
fill: "var(--vs-gray-800)"
|
|
1823
|
+
}, [
|
|
1824
|
+
g("path", { d: "m280-400 200-200 200 200H280Z" })
|
|
1825
|
+
], -1)
|
|
1826
|
+
])], 2),
|
|
1827
|
+
g("span", {
|
|
1828
|
+
class: W(["vs-sort-icon vs-sort-desc", {
|
|
1829
|
+
"vs-active": e.sortHelpers.isColumnSorted(i.field) && e.sortHelpers.getSortOrder(i.field) === "desc"
|
|
1830
|
+
}])
|
|
1831
|
+
}, [...f[1] || (f[1] = [
|
|
1832
|
+
g("svg", {
|
|
1833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1834
|
+
height: "24px",
|
|
1835
|
+
viewBox: "0 -960 960 960",
|
|
1836
|
+
width: "24px"
|
|
1837
|
+
}, [
|
|
1838
|
+
g("path", { d: "M480-360 280-560h400L480-360Z" })
|
|
1839
|
+
], -1)
|
|
1840
|
+
])], 2)
|
|
1841
|
+
])) : P("", !0),
|
|
1842
|
+
e.sortHelpers.getSortPriority(i.field) !== null ? (h(), w("span", To, D(e.sortHelpers.getSortPriority(i.field)), 1)) : P("", !0),
|
|
1843
|
+
i.filter ? (h(), de(go, {
|
|
1844
|
+
key: 2,
|
|
1845
|
+
type: i.filter.type,
|
|
1846
|
+
"async-options": i.filter.asyncOptions,
|
|
1847
|
+
field: i.field,
|
|
1848
|
+
operators: i.filter.operators,
|
|
1849
|
+
modelValue: l.value[i.field],
|
|
1850
|
+
"onUpdate:modelValue": (m) => l.value[i.field] = m,
|
|
1851
|
+
visible: a.value === i.field,
|
|
1852
|
+
"column-data": e.rows.map((m) => m[i.field]),
|
|
1853
|
+
onApply: (m) => {
|
|
1854
|
+
o("applyFilter", i.field, m);
|
|
1855
|
+
},
|
|
1856
|
+
onClear: () => {
|
|
1857
|
+
o("clearFilter", i.field);
|
|
1858
|
+
},
|
|
1859
|
+
onClose: (m) => u(i.field),
|
|
1860
|
+
onOpen: (m) => r(i.field)
|
|
1861
|
+
}, Ie({ _: 2 }, [
|
|
1862
|
+
i.filter.custom ? {
|
|
1863
|
+
name: "custom",
|
|
1864
|
+
fn: H(({ filter: m, apply: v, clear: d }) => [
|
|
1865
|
+
N(c.$slots, i.filter.custom, {
|
|
1866
|
+
filter: m,
|
|
1867
|
+
apply: v,
|
|
1868
|
+
clear: d
|
|
1869
|
+
}, void 0, !0)
|
|
1870
|
+
]),
|
|
1871
|
+
key: "0"
|
|
1872
|
+
} : void 0
|
|
1873
|
+
]), 1032, ["type", "async-options", "field", "operators", "modelValue", "onUpdate:modelValue", "visible", "column-data", "onApply", "onClear", "onClose", "onOpen"])) : P("", !0)
|
|
1874
|
+
])
|
|
1875
|
+
], !0)
|
|
1876
|
+
], 14, Co))), 128))
|
|
1877
|
+
])
|
|
1878
|
+
]));
|
|
1879
|
+
}
|
|
1880
|
+
}), Vo = /* @__PURE__ */ ne($o, [["__scopeId", "data-v-1776a5d5"]]), Oo = { key: 0 }, Ao = ["colspan"], Eo = { key: 1 }, Po = ["colspan"], Do = { class: "vs-no-data-message" }, Lo = { class: "vs-no-data-description" }, Fo = ["onClick"], Bo = ["aria-expanded", "aria-controls", "onClick"], Mo = { key: 0 }, No = { key: 1 }, Io = { class: "vs-checkbox" }, qo = ["id", "value", "checked", "onChange"], Ho = ["for"], Ko = {
|
|
1881
|
+
key: 0,
|
|
1882
|
+
class: "vs-row-expanded"
|
|
1883
|
+
}, Wo = ["colspan"], Uo = {
|
|
1884
|
+
key: 1,
|
|
1885
|
+
class: "vs-expanded-content"
|
|
1886
|
+
}, jo = /* @__PURE__ */ _({
|
|
1887
|
+
__name: "VsDataTableBody",
|
|
1888
|
+
props: {
|
|
1889
|
+
loading: { type: Boolean },
|
|
1890
|
+
loadingText: {},
|
|
1891
|
+
noDataText: {},
|
|
1892
|
+
noDataDescription: {},
|
|
1893
|
+
paginatedRows: {},
|
|
1894
|
+
totalColumns: {},
|
|
1895
|
+
expandable: { type: Boolean },
|
|
1896
|
+
isItemSelectedControlled: { type: Boolean },
|
|
1897
|
+
selectedItems: {},
|
|
1898
|
+
tablename: {},
|
|
1899
|
+
columns: {},
|
|
1900
|
+
rowKey: { type: [String, Function] },
|
|
1901
|
+
rowClass: {},
|
|
1902
|
+
cellClass: {},
|
|
1903
|
+
hasRowClick: { type: Boolean },
|
|
1904
|
+
getRowKey: { type: Function },
|
|
1905
|
+
getValue: { type: Function },
|
|
1906
|
+
isRowExpanded: { type: Function },
|
|
1907
|
+
isRowLoading: { type: Function },
|
|
1908
|
+
toggleRowExpansion: { type: Function },
|
|
1909
|
+
toggleRow: { type: Function },
|
|
1910
|
+
isRowSelected: { type: Function }
|
|
1911
|
+
},
|
|
1912
|
+
emits: ["row-click"],
|
|
1913
|
+
setup(e, { emit: t }) {
|
|
1914
|
+
const n = e, o = T(() => n.rowKey ?? "id");
|
|
1915
|
+
return (s, l) => (h(), w("tbody", null, [
|
|
1916
|
+
e.loading ? (h(), w("tr", Oo, [
|
|
1917
|
+
g("td", {
|
|
1918
|
+
colspan: e.totalColumns,
|
|
1919
|
+
class: "vs-loading"
|
|
1920
|
+
}, [
|
|
1921
|
+
l[2] || (l[2] = g("div", { class: "vs-spinner" }, null, -1)),
|
|
1922
|
+
g("span", null, D(e.loadingText), 1)
|
|
1923
|
+
], 8, Ao)
|
|
1924
|
+
])) : e.paginatedRows.length ? (h(!0), w(K, { key: 2 }, j(e.paginatedRows, (a, r) => (h(), w(K, {
|
|
1925
|
+
key: e.getRowKey(a, r)
|
|
1926
|
+
}, [
|
|
1927
|
+
g("tr", {
|
|
1928
|
+
class: W([
|
|
1929
|
+
e.rowClass,
|
|
1930
|
+
{ "vs-row-clickable": e.hasRowClick },
|
|
1931
|
+
{ "vs-row-selected": e.isRowSelected(a, e.selectedItems, o.value) }
|
|
1932
|
+
]),
|
|
1933
|
+
onClick: (u) => s.$emit("row-click", a, r)
|
|
1934
|
+
}, [
|
|
1935
|
+
e.expandable ? (h(), w("td", {
|
|
1936
|
+
key: 0,
|
|
1937
|
+
class: "vs-expand-column",
|
|
1938
|
+
onClick: l[0] || (l[0] = le(() => {
|
|
1939
|
+
}, ["stop"]))
|
|
1940
|
+
}, [
|
|
1941
|
+
g("button", {
|
|
1942
|
+
class: "vs-expand-btn",
|
|
1943
|
+
type: "button",
|
|
1944
|
+
"aria-expanded": e.isRowExpanded(a, r),
|
|
1945
|
+
"aria-controls": `row-details-${e.getRowKey(a, r)}`,
|
|
1946
|
+
onClick: le((u) => e.toggleRowExpansion(a, r), ["stop"])
|
|
1947
|
+
}, [
|
|
1948
|
+
e.isRowExpanded(a, r) ? (h(), w("span", Mo, [...l[4] || (l[4] = [
|
|
1949
|
+
g("svg", {
|
|
1950
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1951
|
+
height: "24px",
|
|
1952
|
+
viewBox: "0 -960 960 960",
|
|
1953
|
+
width: "24px",
|
|
1954
|
+
fill: "var(--vs-gray-800)"
|
|
1955
|
+
}, [
|
|
1956
|
+
g("path", { d: "M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z" })
|
|
1957
|
+
], -1)
|
|
1958
|
+
])])) : (h(), w("span", No, [...l[5] || (l[5] = [
|
|
1959
|
+
g("svg", {
|
|
1960
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1961
|
+
height: "24px",
|
|
1962
|
+
viewBox: "0 -960 960 960",
|
|
1963
|
+
width: "24px",
|
|
1964
|
+
fill: "var(--vs-gray-800)"
|
|
1965
|
+
}, [
|
|
1966
|
+
g("path", { d: "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" })
|
|
1967
|
+
], -1)
|
|
1968
|
+
])]))
|
|
1969
|
+
], 8, Bo)
|
|
1970
|
+
])) : P("", !0),
|
|
1971
|
+
e.isItemSelectedControlled ? (h(), w("td", {
|
|
1972
|
+
key: 1,
|
|
1973
|
+
onClick: l[1] || (l[1] = le(() => {
|
|
1974
|
+
}, ["stop"])),
|
|
1975
|
+
class: "vs-checkbox-column"
|
|
1976
|
+
}, [
|
|
1977
|
+
g("div", Io, [
|
|
1978
|
+
g("input", {
|
|
1979
|
+
type: "checkbox",
|
|
1980
|
+
id: e.tablename + "-checkbox-" + e.getRowKey(a, r),
|
|
1981
|
+
value: a,
|
|
1982
|
+
checked: e.selectedItems.some((u, c) => e.getRowKey(u, c) === e.getRowKey(a, r)),
|
|
1983
|
+
onChange: (u) => e.toggleRow(a, r)
|
|
1984
|
+
}, null, 40, qo),
|
|
1985
|
+
g("label", {
|
|
1986
|
+
for: e.tablename + "-checkbox-" + e.getRowKey(a, r)
|
|
1987
|
+
}, null, 8, Ho)
|
|
1988
|
+
])
|
|
1989
|
+
])) : P("", !0),
|
|
1990
|
+
(h(!0), w(K, null, j(e.columns, (u) => (h(), w("td", {
|
|
1991
|
+
key: u.field,
|
|
1992
|
+
class: W(e.cellClass)
|
|
1993
|
+
}, [
|
|
1994
|
+
N(s.$slots, `cell-${u.field}`, {
|
|
1995
|
+
item: a,
|
|
1996
|
+
value: e.getValue(a, u.field),
|
|
1997
|
+
column: u,
|
|
1998
|
+
index: r
|
|
1999
|
+
}, () => [
|
|
2000
|
+
je(D(e.getValue(a, u.field)), 1)
|
|
2001
|
+
], !0)
|
|
2002
|
+
], 2))), 128))
|
|
2003
|
+
], 10, Fo),
|
|
2004
|
+
e.expandable ? (h(), w(K, { key: 0 }, [
|
|
2005
|
+
e.isRowExpanded(a, r) ? (h(), w("tr", Ko, [
|
|
2006
|
+
g("td", {
|
|
2007
|
+
colspan: e.totalColumns,
|
|
2008
|
+
class: "vs-expanded-cell"
|
|
2009
|
+
}, [
|
|
2010
|
+
e.isRowLoading(a, r) ? N(s.$slots, "row-expanded-loader", {
|
|
2011
|
+
key: 0,
|
|
2012
|
+
item: a,
|
|
2013
|
+
index: r
|
|
2014
|
+
}, () => [
|
|
2015
|
+
l[6] || (l[6] = g("div", { class: "vs-loader-bar" }, [
|
|
2016
|
+
g("div", { class: "vs-loader-bar-inner" })
|
|
2017
|
+
], -1))
|
|
2018
|
+
], !0) : (h(), w("div", Uo, [
|
|
2019
|
+
N(s.$slots, "row-expanded", {
|
|
2020
|
+
item: a,
|
|
2021
|
+
index: r
|
|
2022
|
+
}, () => [
|
|
2023
|
+
l[7] || (l[7] = je(" Expanded details for row ", -1)),
|
|
2024
|
+
g("b", null, D(e.getRowKey(a, r)), 1)
|
|
2025
|
+
], !0)
|
|
2026
|
+
]))
|
|
2027
|
+
], 8, Wo)
|
|
2028
|
+
])) : P("", !0)
|
|
2029
|
+
], 64)) : P("", !0)
|
|
2030
|
+
], 64))), 128)) : (h(), w("tr", Eo, [
|
|
2031
|
+
g("td", {
|
|
2032
|
+
colspan: e.totalColumns,
|
|
2033
|
+
class: "vs-no-data"
|
|
2034
|
+
}, [
|
|
2035
|
+
N(s.$slots, "no-data", {}, () => [
|
|
2036
|
+
l[3] || (l[3] = g("div", { class: "vs-no-data-icon" }, [
|
|
2037
|
+
g("svg", {
|
|
2038
|
+
viewBox: "0 0 24 24",
|
|
2039
|
+
fill: "currentColor"
|
|
2040
|
+
}, [
|
|
2041
|
+
g("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" })
|
|
2042
|
+
])
|
|
2043
|
+
], -1)),
|
|
2044
|
+
g("div", Do, D(e.noDataText), 1),
|
|
2045
|
+
g("div", Lo, D(e.noDataDescription), 1)
|
|
2046
|
+
], !0)
|
|
2047
|
+
], 8, Po)
|
|
2048
|
+
]))
|
|
2049
|
+
]));
|
|
2050
|
+
}
|
|
2051
|
+
}), zo = /* @__PURE__ */ ne(jo, [["__scopeId", "data-v-149f0fb5"]]), Zo = { class: "vs-search" }, Qo = ["placeholder", "value"], Xo = /* @__PURE__ */ _({
|
|
2052
|
+
__name: "VsSearch",
|
|
2053
|
+
props: {
|
|
2054
|
+
modelValue: {},
|
|
2055
|
+
placeholder: {}
|
|
2056
|
+
},
|
|
2057
|
+
emits: ["update:modelValue", "inputTyped"],
|
|
2058
|
+
setup(e, { emit: t }) {
|
|
2059
|
+
const n = t, o = (s) => {
|
|
2060
|
+
const l = s.target;
|
|
2061
|
+
n("update:modelValue", l.value), n("inputTyped", l.value);
|
|
2062
|
+
};
|
|
2063
|
+
return (s, l) => (h(), w("div", Zo, [
|
|
2064
|
+
l[0] || (l[0] = g("div", { class: "vs-search-icon" }, [
|
|
2065
|
+
g("svg", {
|
|
2066
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2067
|
+
height: "22px",
|
|
2068
|
+
viewBox: "0 -960 960 960",
|
|
2069
|
+
width: "22px",
|
|
2070
|
+
fill: "#e3e3e3"
|
|
2071
|
+
}, [
|
|
2072
|
+
g("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" })
|
|
2073
|
+
])
|
|
2074
|
+
], -1)),
|
|
2075
|
+
g("input", {
|
|
2076
|
+
type: "text",
|
|
2077
|
+
class: "vs-search-input",
|
|
2078
|
+
placeholder: e.placeholder,
|
|
2079
|
+
value: e.modelValue,
|
|
2080
|
+
onInput: o
|
|
2081
|
+
}, null, 40, Qo)
|
|
2082
|
+
]));
|
|
2083
|
+
}
|
|
2084
|
+
}), Yo = /* @__PURE__ */ ne(Xo, [["__scopeId", "data-v-60b73b45"]]), Go = { class: "vs-datatable-toolbar vs-layout-row" }, Jo = { class: "vs-layout-start" }, _o = {
|
|
2085
|
+
key: 0,
|
|
2086
|
+
class: "vs-search-container"
|
|
2087
|
+
}, es = { class: "vs-layout-end" }, ts = /* @__PURE__ */ _({
|
|
2088
|
+
__name: "VsDataTableToolbar",
|
|
2089
|
+
props: {
|
|
2090
|
+
showSearch: { type: Boolean },
|
|
2091
|
+
searchQuery: {},
|
|
2092
|
+
searchPlaceholder: {},
|
|
2093
|
+
searchClass: {}
|
|
2094
|
+
},
|
|
2095
|
+
emits: ["update:searchQuery", "search"],
|
|
2096
|
+
setup(e, { emit: t }) {
|
|
2097
|
+
const n = t, o = (s) => {
|
|
2098
|
+
n("update:searchQuery", s), n("search", s);
|
|
2099
|
+
};
|
|
2100
|
+
return (s, l) => (h(), w("div", Go, [
|
|
2101
|
+
g("div", Jo, [
|
|
2102
|
+
e.showSearch ? (h(), w("div", _o, [
|
|
2103
|
+
X(Yo, {
|
|
2104
|
+
"model-value": e.searchQuery,
|
|
2105
|
+
"onUpdate:modelValue": o,
|
|
2106
|
+
placeholder: e.searchPlaceholder,
|
|
2107
|
+
class: W(e.searchClass)
|
|
2108
|
+
}, null, 8, ["model-value", "placeholder", "class"])
|
|
2109
|
+
])) : P("", !0),
|
|
2110
|
+
N(s.$slots, "left", {}, void 0, !0)
|
|
2111
|
+
]),
|
|
2112
|
+
g("div", es, [
|
|
2113
|
+
N(s.$slots, "right", {}, void 0, !0)
|
|
2114
|
+
])
|
|
2115
|
+
]));
|
|
2116
|
+
}
|
|
2117
|
+
}), ns = /* @__PURE__ */ ne(ts, [["__scopeId", "data-v-8524b8f7"]]);
|
|
2118
|
+
function os(e, t, n) {
|
|
2119
|
+
const o = L(1), s = L(e.sort ? [...e.sort] : []);
|
|
2120
|
+
G(
|
|
1775
2121
|
() => e.sort,
|
|
1776
|
-
(
|
|
1777
|
-
|
|
2122
|
+
(i) => {
|
|
2123
|
+
i && (s.value = [...i]);
|
|
1778
2124
|
},
|
|
1779
2125
|
{ deep: !0 }
|
|
1780
2126
|
);
|
|
1781
|
-
const l =
|
|
2127
|
+
const l = T(
|
|
1782
2128
|
() => e.serverOptions?.sort ?? s.value ?? []
|
|
1783
2129
|
);
|
|
1784
2130
|
return {
|
|
1785
|
-
// processedRows,
|
|
1786
2131
|
activeSort: l,
|
|
1787
2132
|
sortHelpers: {
|
|
1788
|
-
isColumnSorted: (
|
|
1789
|
-
getSortPriority: (
|
|
1790
|
-
const
|
|
1791
|
-
return
|
|
2133
|
+
isColumnSorted: (i) => l.value.some((m) => m.field === i),
|
|
2134
|
+
getSortPriority: (i) => {
|
|
2135
|
+
const m = l.value.find((v) => v.field === i);
|
|
2136
|
+
return m ? m.priority ?? null : null;
|
|
1792
2137
|
},
|
|
1793
|
-
getSortOrder: (
|
|
1794
|
-
handleSort: (
|
|
1795
|
-
let v = [];
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
p.shiftKey ? u === -1 ? v.push({ field: c, order: "asc" }) : v[u]?.order === "asc" ? v[u].order = "desc" : v.splice(u, 1) : u === -1 ? v = [{ field: c, order: "asc" }] : v[u]?.order === "asc" ? v = [{ field: c, order: "desc" }] : v = [], v = v.map((m, C) => ({ ...m, priority: C + 1 })), e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, sort: v }) : t("update:sort", v), n.value = o.value, t("sortChanged", { sort: v });
|
|
2138
|
+
getSortOrder: (i) => l.value.find((m) => m.field === i)?.order ?? null,
|
|
2139
|
+
handleSort: (i, m) => {
|
|
2140
|
+
let v = [...s.value];
|
|
2141
|
+
const d = v.findIndex((p) => p.field === i);
|
|
2142
|
+
m.shiftKey ? d === -1 ? v.push({ field: i, order: "asc" }) : v[d]?.order === "asc" ? v[d].order = "desc" : v.splice(d, 1) : d === -1 ? v = [{ field: i, order: "asc" }] : v[d]?.order === "asc" ? v = [{ field: i, order: "desc" }] : v = [], v = v.map((p, b) => ({ ...p, priority: b + 1 })), s.value = [...v], e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, sort: v }) : t("update:sort", v), n.value = o.value, t("sortChanged", { sort: v });
|
|
1799
2143
|
}
|
|
1800
2144
|
}
|
|
1801
2145
|
};
|
|
1802
2146
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const l =
|
|
2147
|
+
function ss(e, t, n, o, s) {
|
|
2148
|
+
const l = T({
|
|
1805
2149
|
get: () => e.serverItemsLength !== void 0 ? e.serverItemsLength : s.value.length,
|
|
1806
|
-
set: (
|
|
1807
|
-
e.serverItemsLength !== void 0 && t("update:serverItemsLength",
|
|
2150
|
+
set: (f) => {
|
|
2151
|
+
e.serverItemsLength !== void 0 && t("update:serverItemsLength", f);
|
|
1808
2152
|
}
|
|
1809
|
-
}), a =
|
|
2153
|
+
}), a = T({
|
|
1810
2154
|
get: () => e.serverOptions?.page ?? n.value,
|
|
1811
|
-
set: (
|
|
1812
|
-
e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, page:
|
|
2155
|
+
set: (f) => {
|
|
2156
|
+
e.serverOptions ? t("update:serverOptions", { ...e.serverOptions, page: f }) : n.value = f;
|
|
1813
2157
|
}
|
|
1814
|
-
}), r =
|
|
1815
|
-
const
|
|
1816
|
-
return
|
|
1817
|
-
}),
|
|
1818
|
-
e.serverOptions && t("update:serverOptions", { ...e.serverOptions, page:
|
|
2158
|
+
}), r = T(() => {
|
|
2159
|
+
const f = o.value;
|
|
2160
|
+
return Pt(n.value, f, l.value);
|
|
2161
|
+
}), u = (f) => {
|
|
2162
|
+
e.serverOptions && t("update:serverOptions", { ...e.serverOptions, page: f }), t("pageUpdated", f);
|
|
1819
2163
|
};
|
|
1820
2164
|
return {
|
|
1821
2165
|
currentPage: a,
|
|
1822
2166
|
totalRecords: l,
|
|
1823
2167
|
recordRange: r,
|
|
1824
|
-
handlePageChange:
|
|
2168
|
+
handlePageChange: u,
|
|
1825
2169
|
paginationHelpers: {
|
|
1826
2170
|
page: n,
|
|
1827
2171
|
totalRecords: l,
|
|
1828
2172
|
recordRange: r,
|
|
1829
|
-
handlePageChange:
|
|
2173
|
+
handlePageChange: u
|
|
1830
2174
|
}
|
|
1831
2175
|
};
|
|
1832
2176
|
}
|
|
1833
|
-
function
|
|
1834
|
-
const s =
|
|
2177
|
+
function ls(e, t, n, o) {
|
|
2178
|
+
const s = T({
|
|
1835
2179
|
get: () => o.value,
|
|
1836
2180
|
set: (a) => o.value = a
|
|
1837
2181
|
});
|
|
1838
|
-
return
|
|
1839
|
-
const r = e.serverItemsLength ?? e.rows.length,
|
|
1840
|
-
n.value >
|
|
2182
|
+
return G(o, (a) => {
|
|
2183
|
+
const r = e.serverItemsLength ?? e.rows.length, u = it(r, a);
|
|
2184
|
+
n.value > u ? n.value = u || 1 : n.value < 1 && (n.value = 1);
|
|
1841
2185
|
}), {
|
|
1842
2186
|
vsRowsPerPage: s,
|
|
1843
2187
|
handleRowsPerPage: (a) => {
|
|
@@ -1845,7 +2189,7 @@ function Ro(e, t, n, o) {
|
|
|
1845
2189
|
}
|
|
1846
2190
|
};
|
|
1847
2191
|
}
|
|
1848
|
-
function
|
|
2192
|
+
function as(e, t) {
|
|
1849
2193
|
const n = (a) => {
|
|
1850
2194
|
t.value = a, e("inputTyped", a);
|
|
1851
2195
|
};
|
|
@@ -1864,117 +2208,117 @@ function So(e, t) {
|
|
|
1864
2208
|
}
|
|
1865
2209
|
};
|
|
1866
2210
|
}
|
|
1867
|
-
function
|
|
1868
|
-
const n =
|
|
2211
|
+
function rs(e, t) {
|
|
2212
|
+
const n = L([]), o = L(/* @__PURE__ */ new Map()), s = T({
|
|
1869
2213
|
get: () => e.expanded ?? n.value,
|
|
1870
|
-
set: (
|
|
1871
|
-
e.expanded !== void 0 ? t("update:expanded",
|
|
2214
|
+
set: (f) => {
|
|
2215
|
+
e.expanded !== void 0 ? t("update:expanded", f) : n.value = f;
|
|
1872
2216
|
}
|
|
1873
2217
|
});
|
|
1874
|
-
function l(
|
|
1875
|
-
return typeof e.rowKey == "function" ? e.rowKey(
|
|
2218
|
+
function l(f, i) {
|
|
2219
|
+
return typeof e.rowKey == "function" ? e.rowKey(f, i) : typeof e.rowKey == "string" && f[e.rowKey] !== void 0 ? f[e.rowKey] : i;
|
|
1876
2220
|
}
|
|
1877
|
-
function a(
|
|
1878
|
-
const
|
|
1879
|
-
return s.value.includes(
|
|
2221
|
+
function a(f, i) {
|
|
2222
|
+
const m = l(f, i);
|
|
2223
|
+
return s.value.includes(m);
|
|
1880
2224
|
}
|
|
1881
|
-
function r(
|
|
1882
|
-
const
|
|
1883
|
-
let
|
|
1884
|
-
v ? (
|
|
2225
|
+
function r(f, i) {
|
|
2226
|
+
const m = l(f, i), v = s.value.includes(m);
|
|
2227
|
+
let d;
|
|
2228
|
+
v ? (d = s.value.filter((p) => p !== m), t("collapseRow", { row: f, index: i, rowId: m })) : (d = e.accordion ? [m] : [...s.value, m], t("expandRow", { row: f, index: i, rowId: m })), s.value = d;
|
|
1885
2229
|
}
|
|
1886
|
-
function
|
|
1887
|
-
const
|
|
1888
|
-
return o.value.get(
|
|
2230
|
+
function u(f, i) {
|
|
2231
|
+
const m = l(f, i);
|
|
2232
|
+
return o.value.get(m) === !0;
|
|
1889
2233
|
}
|
|
1890
|
-
function f
|
|
1891
|
-
o.value.set(
|
|
2234
|
+
function c(f, i) {
|
|
2235
|
+
o.value.set(f, i);
|
|
1892
2236
|
}
|
|
1893
2237
|
return {
|
|
1894
2238
|
expandedRows: s,
|
|
1895
2239
|
isRowExpanded: a,
|
|
1896
2240
|
toggleRowExpansion: r,
|
|
1897
2241
|
getRowId: l,
|
|
1898
|
-
setRowLoading:
|
|
1899
|
-
isRowLoading:
|
|
2242
|
+
setRowLoading: c,
|
|
2243
|
+
isRowLoading: u
|
|
1900
2244
|
};
|
|
1901
2245
|
}
|
|
1902
|
-
function
|
|
1903
|
-
const o =
|
|
1904
|
-
const
|
|
1905
|
-
if (!
|
|
1906
|
-
const
|
|
1907
|
-
if (
|
|
1908
|
-
return
|
|
1909
|
-
if (
|
|
1910
|
-
const
|
|
1911
|
-
return typeof
|
|
2246
|
+
function is(e, t, n) {
|
|
2247
|
+
const o = L({}), s = T(() => n?.serverMode ? e.value : e.value.filter((r) => t.every((u) => {
|
|
2248
|
+
const c = o.value[u.field];
|
|
2249
|
+
if (!c || !c.type) return !0;
|
|
2250
|
+
const f = r[u.field];
|
|
2251
|
+
if (u.filter?.filterFn)
|
|
2252
|
+
return u.filter.filterFn(f, c.value, r);
|
|
2253
|
+
if (c.type === "custom" && u.filter?.filterKey) {
|
|
2254
|
+
const m = Ae[u.filter.filterKey];
|
|
2255
|
+
return typeof m == "function" ? m(r, u.field, c) : !0;
|
|
1912
2256
|
}
|
|
1913
|
-
const
|
|
1914
|
-
return typeof
|
|
2257
|
+
const i = Ae[c.type];
|
|
2258
|
+
return typeof i == "function" ? i(r, u.field, c) : !0;
|
|
1915
2259
|
})));
|
|
1916
|
-
|
|
2260
|
+
G(
|
|
1917
2261
|
o,
|
|
1918
2262
|
(r) => {
|
|
1919
2263
|
if (n?.serverMode && n.onServerFilter) {
|
|
1920
|
-
const
|
|
1921
|
-
(
|
|
1922
|
-
if (!
|
|
1923
|
-
const
|
|
1924
|
-
type:
|
|
1925
|
-
operator:
|
|
2264
|
+
const u = Object.entries(r).reduce(
|
|
2265
|
+
(c, [f, i]) => {
|
|
2266
|
+
if (!i?.type) return c;
|
|
2267
|
+
const m = {
|
|
2268
|
+
type: i.type,
|
|
2269
|
+
operator: i.operator
|
|
1926
2270
|
};
|
|
1927
|
-
switch (
|
|
2271
|
+
switch (i.type) {
|
|
1928
2272
|
case "text":
|
|
1929
|
-
f
|
|
1930
|
-
...
|
|
1931
|
-
value:
|
|
2273
|
+
c[f] = {
|
|
2274
|
+
...m,
|
|
2275
|
+
value: i.value ?? null
|
|
1932
2276
|
};
|
|
1933
2277
|
break;
|
|
1934
2278
|
case "multi-select":
|
|
1935
|
-
f
|
|
1936
|
-
...
|
|
1937
|
-
value:
|
|
2279
|
+
c[f] = {
|
|
2280
|
+
...m,
|
|
2281
|
+
value: i.value ?? []
|
|
1938
2282
|
};
|
|
1939
2283
|
break;
|
|
1940
2284
|
case "number-range":
|
|
1941
|
-
f
|
|
1942
|
-
...
|
|
1943
|
-
value:
|
|
1944
|
-
min:
|
|
1945
|
-
max:
|
|
2285
|
+
c[f] = {
|
|
2286
|
+
...m,
|
|
2287
|
+
value: i.value ?? null,
|
|
2288
|
+
min: i.min ?? null,
|
|
2289
|
+
max: i.max ?? null
|
|
1946
2290
|
};
|
|
1947
2291
|
break;
|
|
1948
2292
|
case "date-range":
|
|
1949
|
-
f
|
|
1950
|
-
...
|
|
1951
|
-
value:
|
|
1952
|
-
start:
|
|
1953
|
-
end:
|
|
2293
|
+
c[f] = {
|
|
2294
|
+
...m,
|
|
2295
|
+
value: i.value ?? null,
|
|
2296
|
+
start: i.start ?? null,
|
|
2297
|
+
end: i.end ?? null
|
|
1954
2298
|
};
|
|
1955
2299
|
break;
|
|
1956
2300
|
case "custom":
|
|
1957
|
-
f
|
|
1958
|
-
...
|
|
1959
|
-
value:
|
|
1960
|
-
filterKey:
|
|
2301
|
+
c[f] = {
|
|
2302
|
+
...m,
|
|
2303
|
+
value: i.value,
|
|
2304
|
+
filterKey: i.filterKey
|
|
1961
2305
|
};
|
|
1962
2306
|
break;
|
|
1963
2307
|
}
|
|
1964
|
-
return
|
|
2308
|
+
return c;
|
|
1965
2309
|
},
|
|
1966
2310
|
{}
|
|
1967
2311
|
);
|
|
1968
|
-
n.onServerFilter(
|
|
2312
|
+
n.onServerFilter(u);
|
|
1969
2313
|
}
|
|
1970
2314
|
},
|
|
1971
2315
|
{ deep: !0 }
|
|
1972
2316
|
);
|
|
1973
|
-
function l(r,
|
|
1974
|
-
|
|
2317
|
+
function l(r, u, c) {
|
|
2318
|
+
u ? o.value[r] = me(u.type, u) : c && (o.value[r] = me(c));
|
|
1975
2319
|
}
|
|
1976
|
-
function a(r,
|
|
1977
|
-
|
|
2320
|
+
function a(r, u) {
|
|
2321
|
+
u ? o.value[r] = me(u) : delete o.value[r];
|
|
1978
2322
|
}
|
|
1979
2323
|
return {
|
|
1980
2324
|
filters: o,
|
|
@@ -1983,99 +2327,97 @@ function Vo(e, t, n) {
|
|
|
1983
2327
|
clearFilter: a
|
|
1984
2328
|
};
|
|
1985
2329
|
}
|
|
1986
|
-
function
|
|
1987
|
-
const n =
|
|
1988
|
-
|
|
2330
|
+
function us(e, t) {
|
|
2331
|
+
const n = ye(e.rows) ? e.rows : at(e.rows), o = L(1), s = L(e.serverOptions?.rowsPerPage ?? e.rowsPerPage), l = L(""), { isRowExpanded: a, toggleRowExpansion: r, getRowId: u, setRowLoading: c, isRowLoading: f } = rs(e, t), { filters: i, filteredData: m, setFilter: v, clearFilter: d } = is(
|
|
2332
|
+
T(() => R(n)),
|
|
1989
2333
|
e.columns,
|
|
1990
2334
|
{
|
|
1991
2335
|
serverMode: !!e.serverOptions,
|
|
1992
|
-
onServerFilter(
|
|
1993
|
-
t("filterChange",
|
|
2336
|
+
onServerFilter(y) {
|
|
2337
|
+
t("filterChange", y);
|
|
1994
2338
|
}
|
|
1995
2339
|
}
|
|
1996
|
-
), { activeSort:
|
|
2340
|
+
), { activeSort: p, sortHelpers: b } = os(e, t, o), { onInputTyped: C } = as(t, l), { totalRecords: k, recordRange: S, handlePageChange: O } = ss(
|
|
1997
2341
|
e,
|
|
1998
2342
|
t,
|
|
1999
|
-
n,
|
|
2000
2343
|
o,
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2344
|
+
s,
|
|
2345
|
+
T(() => $.value)
|
|
2346
|
+
), { handleRowsPerPage: A } = ls(e, t, o, s), M = T(() => {
|
|
2347
|
+
let y = m.value;
|
|
2348
|
+
return l.value && (y = Qe(y, l.value)), y;
|
|
2349
|
+
}), $ = T(() => {
|
|
2350
|
+
let y = M.value;
|
|
2351
|
+
return e.serverOptions || (l.value && (y = Qe(y, l.value)), p.value.length && (y = At(y, p.value))), y = y.map((I, ce) => ({
|
|
2352
|
+
...I,
|
|
2353
|
+
isExpanded: a(I, ce)
|
|
2010
2354
|
// pass index here
|
|
2011
|
-
})),
|
|
2012
|
-
});
|
|
2013
|
-
ne(d, () => {
|
|
2014
|
-
n.value = 1;
|
|
2015
|
-
}, { deep: !0 }), ne(s, () => {
|
|
2016
|
-
n.value = 1;
|
|
2355
|
+
})), y;
|
|
2017
2356
|
});
|
|
2018
|
-
|
|
2019
|
-
|
|
2357
|
+
G([i, l], () => o.value = 1, { deep: !0 });
|
|
2358
|
+
const x = T(
|
|
2359
|
+
() => Et($.value, o.value, s.value)
|
|
2020
2360
|
);
|
|
2021
|
-
return {
|
|
2361
|
+
return G(n, (y) => {
|
|
2362
|
+
Array.isArray(y) && y.length > 1e3 && console.log(`[useDataTable] Large dataset updated (${y.length} rows)`);
|
|
2363
|
+
}), {
|
|
2022
2364
|
// Pagination
|
|
2023
|
-
page:
|
|
2365
|
+
page: o,
|
|
2024
2366
|
totalRecords: k,
|
|
2025
2367
|
recordRange: S,
|
|
2026
|
-
handlePageChange:
|
|
2027
|
-
rowsPerPage:
|
|
2028
|
-
handleRowsPerPage:
|
|
2368
|
+
handlePageChange: O,
|
|
2369
|
+
rowsPerPage: s,
|
|
2370
|
+
handleRowsPerPage: A,
|
|
2029
2371
|
// Sorting
|
|
2030
|
-
processedRows:
|
|
2031
|
-
paginatedRows:
|
|
2032
|
-
sortHelpers:
|
|
2372
|
+
processedRows: $,
|
|
2373
|
+
paginatedRows: x,
|
|
2374
|
+
sortHelpers: b,
|
|
2033
2375
|
// Search
|
|
2034
|
-
searchQuery:
|
|
2376
|
+
searchQuery: l,
|
|
2035
2377
|
onInputTyped: C,
|
|
2036
2378
|
// Expandable
|
|
2037
|
-
isRowExpanded:
|
|
2038
|
-
toggleRowExpansion:
|
|
2039
|
-
getRowId:
|
|
2040
|
-
setRowLoading:
|
|
2379
|
+
isRowExpanded: a,
|
|
2380
|
+
toggleRowExpansion: r,
|
|
2381
|
+
getRowId: u,
|
|
2382
|
+
setRowLoading: c,
|
|
2041
2383
|
isRowLoading: f,
|
|
2042
2384
|
// Column filters
|
|
2043
|
-
filters:
|
|
2044
|
-
filteredData:
|
|
2045
|
-
setFilter:
|
|
2046
|
-
clearFilter:
|
|
2385
|
+
filters: i,
|
|
2386
|
+
filteredData: m,
|
|
2387
|
+
setFilter: v,
|
|
2388
|
+
clearFilter: d
|
|
2047
2389
|
};
|
|
2048
2390
|
}
|
|
2049
|
-
function
|
|
2050
|
-
const n =
|
|
2051
|
-
|
|
2391
|
+
function cs(e, t) {
|
|
2392
|
+
const n = L(e.itemSelected || []);
|
|
2393
|
+
G(
|
|
2052
2394
|
() => e.itemSelected,
|
|
2053
|
-
(
|
|
2054
|
-
|
|
2395
|
+
(p) => {
|
|
2396
|
+
p ? n.value = [...p] : n.value = [];
|
|
2055
2397
|
},
|
|
2056
2398
|
{ immediate: !0, deep: !0 }
|
|
2057
2399
|
);
|
|
2058
|
-
const o =
|
|
2400
|
+
const o = T({
|
|
2059
2401
|
get: () => n.value,
|
|
2060
|
-
set: (
|
|
2061
|
-
n.value =
|
|
2402
|
+
set: (p) => {
|
|
2403
|
+
n.value = p, t("update:itemSelected", p);
|
|
2062
2404
|
}
|
|
2063
|
-
}), s =
|
|
2405
|
+
}), s = T(() => e.itemSelected !== null), l = T(
|
|
2064
2406
|
() => e.rows.length > 0 && o.value.length === e.rows.length
|
|
2065
|
-
), a =
|
|
2066
|
-
(
|
|
2067
|
-
(
|
|
2407
|
+
), a = T(() => !e.rows.length || !o.value.length ? !1 : !l.value && e.rows.some(
|
|
2408
|
+
(p, b) => o.value.some(
|
|
2409
|
+
(C, k) => Q(C, k, e.rowKey) === Q(p, b, e.rowKey)
|
|
2068
2410
|
)
|
|
2069
|
-
)), r = (
|
|
2070
|
-
const
|
|
2411
|
+
)), r = (p, b) => {
|
|
2412
|
+
const C = Q(p, b, e.rowKey);
|
|
2071
2413
|
o.value.some(
|
|
2072
|
-
(
|
|
2414
|
+
(S, O) => Q(S, O, e.rowKey) === C
|
|
2073
2415
|
) ? (o.value = o.value.filter(
|
|
2074
|
-
(
|
|
2075
|
-
), t("rowDeselected",
|
|
2076
|
-
},
|
|
2077
|
-
const
|
|
2078
|
-
o.value =
|
|
2416
|
+
(S, O) => Q(S, O, e.rowKey) !== C
|
|
2417
|
+
), t("rowDeselected", p, b)) : (o.value = [...o.value, p], t("rowSelected", p, b));
|
|
2418
|
+
}, u = (p) => {
|
|
2419
|
+
const b = p.target;
|
|
2420
|
+
o.value = b.checked ? [...e.rows] : [], t("allRowsSelected", o.value);
|
|
2079
2421
|
};
|
|
2080
2422
|
return {
|
|
2081
2423
|
selectedItems: o,
|
|
@@ -2083,15 +2425,15 @@ function Eo(e, t) {
|
|
|
2083
2425
|
isAllChecked: l,
|
|
2084
2426
|
isSomeChecked: a,
|
|
2085
2427
|
toggleRow: r,
|
|
2086
|
-
toggleAll:
|
|
2087
|
-
selectRow: (
|
|
2088
|
-
rt(
|
|
2428
|
+
toggleAll: u,
|
|
2429
|
+
selectRow: (p, b) => {
|
|
2430
|
+
rt(p, o.value, e.rowKey) || (o.value = [...o.value, p], t("rowSelected", p, b));
|
|
2089
2431
|
},
|
|
2090
|
-
deselectRow: (
|
|
2091
|
-
const
|
|
2432
|
+
deselectRow: (p, b) => {
|
|
2433
|
+
const C = Q(p, b, e.rowKey);
|
|
2092
2434
|
o.value = o.value.filter(
|
|
2093
|
-
(
|
|
2094
|
-
), t("rowDeselected",
|
|
2435
|
+
(k, S) => Q(k, S, e.rowKey) !== C
|
|
2436
|
+
), t("rowDeselected", p, b);
|
|
2095
2437
|
},
|
|
2096
2438
|
selectAll: () => {
|
|
2097
2439
|
o.value = [...e.rows], t("allRowsSelected", o.value);
|
|
@@ -2108,40 +2450,17 @@ function Eo(e, t) {
|
|
|
2108
2450
|
isAllChecked: l,
|
|
2109
2451
|
isSomeChecked: a,
|
|
2110
2452
|
toggleRow: r,
|
|
2111
|
-
toggleAll:
|
|
2453
|
+
toggleAll: u
|
|
2112
2454
|
}
|
|
2113
2455
|
};
|
|
2114
2456
|
}
|
|
2115
|
-
const
|
|
2116
|
-
key: 0,
|
|
2117
|
-
class: "vs-search-container"
|
|
2118
|
-
}, Do = {
|
|
2457
|
+
const ds = { class: "vs-datatable" }, fs = {
|
|
2119
2458
|
ref: "tableResponsiveRef",
|
|
2120
2459
|
class: "vs-table-wrapper"
|
|
2121
|
-
},
|
|
2122
|
-
key: 0,
|
|
2123
|
-
class: "vs-expand-column",
|
|
2124
|
-
style: { width: "5%" }
|
|
2125
|
-
}, _o = {
|
|
2126
|
-
key: 1,
|
|
2127
|
-
class: "vs-checkbox-column",
|
|
2128
|
-
style: { width: "5%" }
|
|
2129
|
-
}, Mo = { class: "vs-checkbox" }, No = ["id", "checked", "indeterminate"], Bo = ["for"], qo = ["onClick"], Io = { class: "vs-header-content" }, Wo = { class: "vs-header-label" }, Ho = {
|
|
2130
|
-
key: 0,
|
|
2131
|
-
class: "vs-sort-icons"
|
|
2132
|
-
}, Ko = {
|
|
2133
|
-
key: 1,
|
|
2134
|
-
class: "vs-sort-priority"
|
|
2135
|
-
}, Uo = { key: 0 }, jo = ["colspan"], zo = { key: 1 }, Zo = ["colspan"], Xo = { class: "vs-no-data-message" }, Yo = { class: "vs-no-data-description" }, Qo = ["onClick"], Go = ["aria-expanded", "aria-controls", "onClick"], Jo = { key: 0 }, es = { key: 1 }, ts = { class: "vs-checkbox" }, ns = ["id", "value", "checked", "onChange"], os = ["for"], ss = {
|
|
2136
|
-
key: 0,
|
|
2137
|
-
class: "vs-row-expanded"
|
|
2138
|
-
}, ls = ["colspan"], as = {
|
|
2139
|
-
key: 1,
|
|
2140
|
-
class: "vs-expanded-content"
|
|
2141
|
-
}, rs = {
|
|
2460
|
+
}, vs = {
|
|
2142
2461
|
key: 0,
|
|
2143
2462
|
class: "vs-table-footer"
|
|
2144
|
-
},
|
|
2463
|
+
}, ms = { class: "vs-footer-left" }, ps = { class: "vs-table-info" }, gs = /* @__PURE__ */ _({
|
|
2145
2464
|
__name: "VsDataTable",
|
|
2146
2465
|
props: {
|
|
2147
2466
|
rows: { default: () => [] },
|
|
@@ -2177,340 +2496,171 @@ const Ao = { class: "vs-datatable" }, Po = { class: "vs-layout-row" }, Lo = { cl
|
|
|
2177
2496
|
},
|
|
2178
2497
|
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"],
|
|
2179
2498
|
setup(e, { expose: t, emit: n }) {
|
|
2180
|
-
const o = e, s =
|
|
2181
|
-
|
|
2182
|
-
|
|
2499
|
+
const o = e, s = at(o.rows);
|
|
2500
|
+
G(
|
|
2501
|
+
() => o.rows,
|
|
2502
|
+
(B) => {
|
|
2503
|
+
s.value = B;
|
|
2504
|
+
},
|
|
2505
|
+
{ deep: !1 }
|
|
2506
|
+
);
|
|
2507
|
+
const l = n, a = Tt(), r = T(() => !!a.onRowClick), {
|
|
2508
|
+
page: u,
|
|
2509
|
+
rowsPerPage: c,
|
|
2183
2510
|
totalRecords: f,
|
|
2184
|
-
recordRange:
|
|
2185
|
-
handlePageChange:
|
|
2186
|
-
handleRowsPerPage:
|
|
2187
|
-
paginatedRows:
|
|
2188
|
-
sortHelpers:
|
|
2189
|
-
searchQuery:
|
|
2511
|
+
recordRange: i,
|
|
2512
|
+
handlePageChange: m,
|
|
2513
|
+
handleRowsPerPage: v,
|
|
2514
|
+
paginatedRows: d,
|
|
2515
|
+
sortHelpers: p,
|
|
2516
|
+
searchQuery: b,
|
|
2190
2517
|
onInputTyped: C,
|
|
2191
2518
|
isRowExpanded: k,
|
|
2192
2519
|
toggleRowExpansion: S,
|
|
2193
|
-
setRowLoading:
|
|
2194
|
-
isRowLoading:
|
|
2195
|
-
filters:
|
|
2196
|
-
setFilter:
|
|
2197
|
-
clearFilter:
|
|
2198
|
-
} =
|
|
2199
|
-
selectedItems:
|
|
2200
|
-
isItemSelectedControlled:
|
|
2201
|
-
isAllChecked:
|
|
2202
|
-
isSomeChecked:
|
|
2203
|
-
toggleAll:
|
|
2204
|
-
toggleRow:
|
|
2205
|
-
} =
|
|
2206
|
-
() =>
|
|
2207
|
-
)
|
|
2208
|
-
function J($) {
|
|
2209
|
-
X.value = $;
|
|
2210
|
-
}
|
|
2211
|
-
function B($) {
|
|
2212
|
-
X.value === $ && (X.value = null);
|
|
2213
|
-
}
|
|
2520
|
+
setRowLoading: O,
|
|
2521
|
+
isRowLoading: A,
|
|
2522
|
+
filters: M,
|
|
2523
|
+
setFilter: $,
|
|
2524
|
+
clearFilter: x
|
|
2525
|
+
} = us({ ...o, rows: s.value }, l), {
|
|
2526
|
+
selectedItems: y,
|
|
2527
|
+
isItemSelectedControlled: I,
|
|
2528
|
+
isAllChecked: ce,
|
|
2529
|
+
isSomeChecked: Ce,
|
|
2530
|
+
toggleAll: ke,
|
|
2531
|
+
toggleRow: te
|
|
2532
|
+
} = cs(o, l), he = T(
|
|
2533
|
+
() => Ot(o.columns, I.value, o.expandable)
|
|
2534
|
+
);
|
|
2214
2535
|
return t({
|
|
2215
2536
|
toggleRowExpansion: S,
|
|
2216
|
-
setRowLoading:
|
|
2217
|
-
}),
|
|
2218
|
-
|
|
2537
|
+
setRowLoading: O
|
|
2538
|
+
}), st(() => {
|
|
2539
|
+
l("tableMounted");
|
|
2219
2540
|
try {
|
|
2220
|
-
|
|
2221
|
-
} catch (
|
|
2222
|
-
|
|
2541
|
+
l("dataLoaded", o.rows);
|
|
2542
|
+
} catch (B) {
|
|
2543
|
+
l("dataError", B);
|
|
2223
2544
|
}
|
|
2224
|
-
}),
|
|
2225
|
-
|
|
2226
|
-
}),
|
|
2227
|
-
|
|
2228
|
-
}), (
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
ee($.$slots, "filterArea", {}, void 0, !0)
|
|
2240
|
-
])) : D("", !0)
|
|
2545
|
+
}), lt(() => {
|
|
2546
|
+
l("tableUnmounted");
|
|
2547
|
+
}), $t(() => {
|
|
2548
|
+
l("tableBeforeMount");
|
|
2549
|
+
}), (B, E) => (h(), w("div", ds, [
|
|
2550
|
+
X(ns, {
|
|
2551
|
+
"show-search": e.showSearch,
|
|
2552
|
+
"search-query": R(b),
|
|
2553
|
+
"onUpdate:searchQuery": E[0] || (E[0] = (V) => ye(b) ? b.value = V : null),
|
|
2554
|
+
onSearch: R(C),
|
|
2555
|
+
"search-placeholder": e.searchPlaceholder,
|
|
2556
|
+
"search-class": e.searchClass
|
|
2557
|
+
}, {
|
|
2558
|
+
left: H(() => [
|
|
2559
|
+
N(B.$slots, "filterAreaLeft", {}, void 0, !0)
|
|
2241
2560
|
]),
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2561
|
+
right: H(() => [
|
|
2562
|
+
N(B.$slots, "filterAreaRight", {}, void 0, !0)
|
|
2563
|
+
]),
|
|
2564
|
+
_: 3
|
|
2565
|
+
}, 8, ["show-search", "search-query", "onSearch", "search-placeholder", "search-class"]),
|
|
2566
|
+
g("div", {
|
|
2245
2567
|
class: W(["vs-table-container", e.containerClass])
|
|
2246
2568
|
}, [
|
|
2247
|
-
|
|
2248
|
-
|
|
2569
|
+
g("div", fs, [
|
|
2570
|
+
g("table", {
|
|
2249
2571
|
class: W(["vs-table", e.tableClass])
|
|
2250
2572
|
}, [
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
b.filter ? (g(), ve(xo, {
|
|
2311
|
-
key: 2,
|
|
2312
|
-
type: b.filter.type,
|
|
2313
|
-
"async-options": b.filter.asyncOptions,
|
|
2314
|
-
field: b.field,
|
|
2315
|
-
operators: b.filter.operators,
|
|
2316
|
-
modelValue: x(A)[b.field],
|
|
2317
|
-
"onUpdate:modelValue": (T) => x(A)[b.field] = T,
|
|
2318
|
-
visible: X.value === b.field,
|
|
2319
|
-
"anchor-el": xe.value,
|
|
2320
|
-
"column-data": e.rows.map((T) => T[b.field]),
|
|
2321
|
-
onApply: (T) => {
|
|
2322
|
-
x(N)(b.field, T), r.value = 1;
|
|
2323
|
-
},
|
|
2324
|
-
onClear: () => {
|
|
2325
|
-
x(P)(b.field), r.value = 1;
|
|
2326
|
-
},
|
|
2327
|
-
onClose: (T) => B(b.field),
|
|
2328
|
-
onOpen: (T) => J(b.field)
|
|
2329
|
-
}, Tt({ _: 2 }, [
|
|
2330
|
-
b.filter.custom ? {
|
|
2331
|
-
name: "custom",
|
|
2332
|
-
fn: se(({ filter: T, apply: I, clear: Be }) => [
|
|
2333
|
-
ee($.$slots, b.filter.custom, {
|
|
2334
|
-
filter: T,
|
|
2335
|
-
apply: I,
|
|
2336
|
-
clear: Be
|
|
2337
|
-
}, void 0, !0)
|
|
2338
|
-
]),
|
|
2339
|
-
key: "0"
|
|
2340
|
-
} : void 0
|
|
2341
|
-
]), 1032, ["type", "async-options", "field", "operators", "modelValue", "onUpdate:modelValue", "visible", "anchor-el", "column-data", "onApply", "onClear", "onClose", "onOpen"])) : D("", !0)
|
|
2342
|
-
])
|
|
2343
|
-
], !0)
|
|
2344
|
-
], 14, qo))), 128))
|
|
2345
|
-
])
|
|
2346
|
-
]),
|
|
2347
|
-
h("tbody", null, [
|
|
2348
|
-
e.loading ? (g(), y("tr", Uo, [
|
|
2349
|
-
h("td", {
|
|
2350
|
-
colspan: K.value,
|
|
2351
|
-
class: "vs-loading"
|
|
2352
|
-
}, [
|
|
2353
|
-
O[9] || (O[9] = h("div", { class: "vs-spinner" }, null, -1)),
|
|
2354
|
-
h("span", null, F(e.loadingText), 1)
|
|
2355
|
-
], 8, jo)
|
|
2356
|
-
])) : x(v).length ? (g(!0), y(H, { key: 2 }, te(x(v), (b, T) => (g(), y(H, {
|
|
2357
|
-
key: x(M)(b, T)
|
|
2358
|
-
}, [
|
|
2359
|
-
h("tr", {
|
|
2360
|
-
class: W([
|
|
2361
|
-
e.rowClass,
|
|
2362
|
-
{ "vs-row-clickable": a.value },
|
|
2363
|
-
{ "vs-row-selected": x(rt)(b, x(w), e.rowKey) }
|
|
2364
|
-
]),
|
|
2365
|
-
onClick: (I) => $.$emit("rowClick", b, T)
|
|
2366
|
-
}, [
|
|
2367
|
-
e.expandable ? (g(), y("td", {
|
|
2368
|
-
key: 0,
|
|
2369
|
-
class: "vs-expand-column",
|
|
2370
|
-
onClick: O[2] || (O[2] = ae(() => {
|
|
2371
|
-
}, ["stop"]))
|
|
2372
|
-
}, [
|
|
2373
|
-
h("button", {
|
|
2374
|
-
class: "vs-expand-btn",
|
|
2375
|
-
type: "button",
|
|
2376
|
-
"aria-expanded": x(k)(b, T),
|
|
2377
|
-
"aria-controls": `row-details-${x(M)(b, T)}`,
|
|
2378
|
-
onClick: ae((I) => x(S)(b, T), ["stop"])
|
|
2379
|
-
}, [
|
|
2380
|
-
x(k)(b, T) ? (g(), y("span", Jo, [...O[11] || (O[11] = [
|
|
2381
|
-
h("svg", {
|
|
2382
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2383
|
-
height: "24px",
|
|
2384
|
-
viewBox: "0 -960 960 960",
|
|
2385
|
-
width: "24px",
|
|
2386
|
-
fill: "var(--vs-gray-800)"
|
|
2387
|
-
}, [
|
|
2388
|
-
h("path", { d: "M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z" })
|
|
2389
|
-
], -1)
|
|
2390
|
-
])])) : (g(), y("span", es, [...O[12] || (O[12] = [
|
|
2391
|
-
h("svg", {
|
|
2392
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2393
|
-
height: "24px",
|
|
2394
|
-
viewBox: "0 -960 960 960",
|
|
2395
|
-
width: "24px",
|
|
2396
|
-
fill: "var(--vs-gray-800)"
|
|
2397
|
-
}, [
|
|
2398
|
-
h("path", { d: "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" })
|
|
2399
|
-
], -1)
|
|
2400
|
-
])]))
|
|
2401
|
-
], 8, Go)
|
|
2402
|
-
])) : D("", !0),
|
|
2403
|
-
x(R) ? (g(), y("td", {
|
|
2404
|
-
key: 1,
|
|
2405
|
-
onClick: O[3] || (O[3] = ae(() => {
|
|
2406
|
-
}, ["stop"])),
|
|
2407
|
-
class: "vs-checkbox-column"
|
|
2408
|
-
}, [
|
|
2409
|
-
h("div", ts, [
|
|
2410
|
-
h("input", {
|
|
2411
|
-
type: "checkbox",
|
|
2412
|
-
id: e.tablename + "-checkbox-" + x(M)(b, T),
|
|
2413
|
-
value: b,
|
|
2414
|
-
checked: x(w).some((I, Be) => x(M)(I, Be) === x(M)(b, T)),
|
|
2415
|
-
onChange: (I) => x(Se)(b, T)
|
|
2416
|
-
}, null, 40, ns),
|
|
2417
|
-
h("label", {
|
|
2418
|
-
for: e.tablename + "-checkbox-" + x(M)(b, T)
|
|
2419
|
-
}, null, 8, os)
|
|
2420
|
-
])
|
|
2421
|
-
])) : D("", !0),
|
|
2422
|
-
(g(!0), y(H, null, te(e.columns, (I) => (g(), y("td", {
|
|
2423
|
-
key: I.field,
|
|
2424
|
-
class: W(e.cellClass)
|
|
2425
|
-
}, [
|
|
2426
|
-
ee($.$slots, `cell-${I.field}`, {
|
|
2427
|
-
item: b,
|
|
2428
|
-
value: x(Xe)(b, I.field),
|
|
2429
|
-
column: I,
|
|
2430
|
-
index: T
|
|
2431
|
-
}, () => [
|
|
2432
|
-
Ze(F(x(Xe)(b, I.field)), 1)
|
|
2433
|
-
], !0)
|
|
2434
|
-
], 2))), 128))
|
|
2435
|
-
], 10, Qo),
|
|
2436
|
-
e.expandable ? (g(), y(H, { key: 0 }, [
|
|
2437
|
-
x(k)(b, T) ? (g(), y("tr", ss, [
|
|
2438
|
-
h("td", {
|
|
2439
|
-
colspan: K.value,
|
|
2440
|
-
class: "vs-expanded-cell"
|
|
2441
|
-
}, [
|
|
2442
|
-
x(L)(b, T) ? ee($.$slots, "row-expanded-loader", {
|
|
2443
|
-
key: 0,
|
|
2444
|
-
item: b,
|
|
2445
|
-
index: T
|
|
2446
|
-
}, () => [
|
|
2447
|
-
O[13] || (O[13] = h("div", { class: "vs-loader-bar" }, [
|
|
2448
|
-
h("div", { class: "vs-loader-bar-inner" })
|
|
2449
|
-
], -1))
|
|
2450
|
-
], !0) : (g(), y("div", as, [
|
|
2451
|
-
ee($.$slots, "row-expanded", {
|
|
2452
|
-
item: b,
|
|
2453
|
-
index: T
|
|
2454
|
-
}, () => [
|
|
2455
|
-
O[14] || (O[14] = Ze(" Expanded details for row ", -1)),
|
|
2456
|
-
h("b", null, F(x(M)(b, T)), 1)
|
|
2457
|
-
], !0)
|
|
2458
|
-
]))
|
|
2459
|
-
], 8, ls)
|
|
2460
|
-
])) : D("", !0)
|
|
2461
|
-
], 64)) : D("", !0)
|
|
2462
|
-
], 64))), 128)) : (g(), y("tr", zo, [
|
|
2463
|
-
h("td", {
|
|
2464
|
-
colspan: K.value,
|
|
2465
|
-
class: "vs-no-data"
|
|
2466
|
-
}, [
|
|
2467
|
-
ee($.$slots, "no-data", {}, () => [
|
|
2468
|
-
O[10] || (O[10] = h("div", { class: "vs-no-data-icon" }, [
|
|
2469
|
-
h("svg", {
|
|
2470
|
-
viewBox: "0 0 24 24",
|
|
2471
|
-
fill: "currentColor"
|
|
2472
|
-
}, [
|
|
2473
|
-
h("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" })
|
|
2474
|
-
])
|
|
2475
|
-
], -1)),
|
|
2476
|
-
h("div", Xo, F(e.noDataText), 1),
|
|
2477
|
-
h("div", Yo, F(e.noDataDescription), 1)
|
|
2478
|
-
], !0)
|
|
2479
|
-
], 8, Zo)
|
|
2480
|
-
]))
|
|
2481
|
-
])
|
|
2573
|
+
X(Vo, {
|
|
2574
|
+
columns: e.columns,
|
|
2575
|
+
expandable: e.expandable,
|
|
2576
|
+
"is-item-selected-controlled": R(I),
|
|
2577
|
+
"is-all-checked": R(ce),
|
|
2578
|
+
"is-some-checked": R(Ce),
|
|
2579
|
+
tablename: e.tablename,
|
|
2580
|
+
"sort-helpers": R(p),
|
|
2581
|
+
filters: R(M),
|
|
2582
|
+
"onUpdate:filters": E[1] || (E[1] = (V) => ye(M) ? M.value = V : null),
|
|
2583
|
+
rows: e.rows,
|
|
2584
|
+
"header-class": e.headerClass,
|
|
2585
|
+
onToggleAll: R(ke),
|
|
2586
|
+
onApplyFilter: E[2] || (E[2] = (V, F) => {
|
|
2587
|
+
R($)(V, F), u.value = 1;
|
|
2588
|
+
}),
|
|
2589
|
+
onClearFilter: E[3] || (E[3] = (V) => {
|
|
2590
|
+
R(x)(V), u.value = 1;
|
|
2591
|
+
})
|
|
2592
|
+
}, Ie({ _: 2 }, [
|
|
2593
|
+
j(B.$slots, (V, F) => ({
|
|
2594
|
+
name: F,
|
|
2595
|
+
fn: H((we) => [
|
|
2596
|
+
N(B.$slots, F, ze(Ze(we)), void 0, !0)
|
|
2597
|
+
])
|
|
2598
|
+
}))
|
|
2599
|
+
]), 1032, ["columns", "expandable", "is-item-selected-controlled", "is-all-checked", "is-some-checked", "tablename", "sort-helpers", "filters", "rows", "header-class", "onToggleAll"]),
|
|
2600
|
+
X(zo, {
|
|
2601
|
+
loading: e.loading,
|
|
2602
|
+
"loading-text": e.loadingText,
|
|
2603
|
+
"no-data-text": e.noDataText,
|
|
2604
|
+
"no-data-description": e.noDataDescription,
|
|
2605
|
+
"paginated-rows": R(d),
|
|
2606
|
+
"total-columns": he.value,
|
|
2607
|
+
expandable: e.expandable,
|
|
2608
|
+
"is-item-selected-controlled": R(I),
|
|
2609
|
+
"selected-items": R(y),
|
|
2610
|
+
tablename: e.tablename,
|
|
2611
|
+
columns: e.columns,
|
|
2612
|
+
"row-key": e.rowKey,
|
|
2613
|
+
"row-class": e.rowClass,
|
|
2614
|
+
"cell-class": e.cellClass,
|
|
2615
|
+
"has-row-click": r.value,
|
|
2616
|
+
"get-row-key": R(Q),
|
|
2617
|
+
"get-value": R(Vt),
|
|
2618
|
+
"is-row-expanded": R(k),
|
|
2619
|
+
"is-row-loading": R(A),
|
|
2620
|
+
"toggle-row-expansion": R(S),
|
|
2621
|
+
"toggle-row": R(te),
|
|
2622
|
+
"is-row-selected": R(rt),
|
|
2623
|
+
onRowClick: E[4] || (E[4] = (V, F) => B.$emit("rowClick", V, F))
|
|
2624
|
+
}, Ie({ _: 2 }, [
|
|
2625
|
+
j(B.$slots, (V, F) => ({
|
|
2626
|
+
name: F,
|
|
2627
|
+
fn: H((we) => [
|
|
2628
|
+
N(B.$slots, F, ze(Ze(we)), void 0, !0)
|
|
2629
|
+
])
|
|
2630
|
+
}))
|
|
2631
|
+
]), 1032, ["loading", "loading-text", "no-data-text", "no-data-description", "paginated-rows", "total-columns", "expandable", "is-item-selected-controlled", "selected-items", "tablename", "columns", "row-key", "row-class", "cell-class", "has-row-click", "get-row-key", "get-value", "is-row-expanded", "is-row-loading", "toggle-row-expansion", "toggle-row", "is-row-selected"])
|
|
2482
2632
|
], 2)
|
|
2483
2633
|
], 512)
|
|
2484
2634
|
], 2),
|
|
2485
|
-
e.showFooter ? (
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
modelValue:
|
|
2489
|
-
"onUpdate:modelValue":
|
|
2490
|
-
onRowsPerPageChanged:
|
|
2635
|
+
e.showFooter ? (h(), w("div", vs, [
|
|
2636
|
+
g("div", ms, [
|
|
2637
|
+
X(jt, {
|
|
2638
|
+
modelValue: R(c),
|
|
2639
|
+
"onUpdate:modelValue": E[5] || (E[5] = (V) => ye(c) ? c.value = V : null),
|
|
2640
|
+
onRowsPerPageChanged: R(v)
|
|
2491
2641
|
}, null, 8, ["modelValue", "onRowsPerPageChanged"]),
|
|
2492
|
-
|
|
2493
|
-
|
|
2642
|
+
E[7] || (E[7] = g("div", { class: "vs-divider" }, null, -1)),
|
|
2643
|
+
g("div", ps, D(R(i).start < 1 ? 0 : R(i).start) + " - " + D(R(i).end) + " of " + D(R(f)) + " " + D(e.entriesText), 1)
|
|
2494
2644
|
]),
|
|
2495
|
-
|
|
2496
|
-
modelValue:
|
|
2497
|
-
"onUpdate:modelValue":
|
|
2498
|
-
totalRecords:
|
|
2499
|
-
rowsPerPage:
|
|
2645
|
+
X(qt, {
|
|
2646
|
+
modelValue: R(u),
|
|
2647
|
+
"onUpdate:modelValue": E[6] || (E[6] = (V) => ye(u) ? u.value = V : null),
|
|
2648
|
+
totalRecords: R(f),
|
|
2649
|
+
rowsPerPage: R(c),
|
|
2500
2650
|
maxVisible: e.maxVisiblePages,
|
|
2501
2651
|
tablename: e.tablename,
|
|
2502
2652
|
class: W(e.paginationClass),
|
|
2503
|
-
onPageChanged:
|
|
2653
|
+
onPageChanged: R(m)
|
|
2504
2654
|
}, null, 8, ["modelValue", "totalRecords", "rowsPerPage", "maxVisible", "tablename", "class", "onPageChanged"])
|
|
2505
|
-
])) :
|
|
2655
|
+
])) : P("", !0)
|
|
2506
2656
|
]));
|
|
2507
2657
|
}
|
|
2508
|
-
}),
|
|
2658
|
+
}), hs = /* @__PURE__ */ ne(gs, [["__scopeId", "data-v-4da895c0"]]), ys = {
|
|
2509
2659
|
install(e) {
|
|
2510
|
-
e.component("VsDataTable",
|
|
2660
|
+
e.component("VsDataTable", hs);
|
|
2511
2661
|
}
|
|
2512
2662
|
};
|
|
2513
2663
|
export {
|
|
2514
|
-
|
|
2515
|
-
|
|
2664
|
+
hs as VsDataTable,
|
|
2665
|
+
ys as default
|
|
2516
2666
|
};
|