@jdanino/inertiajs-tables-laravel-query-builder 2.2.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { createPopper as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { ref as S, onMounted as Y, onBeforeUnmount as ye, openBlock as o, createElementBlock as i, renderSlot as w, watch as J, inject as z, createBlock as _, withCtx as C, createElementVNode as r, normalizeClass as x, unref as e, withModifiers as F, withDirectives as D, vShow as E, resolveDynamicComponent as V, toDisplayString as v, createCommentVNode as k, computed as $, Fragment as B, renderList as P, createVNode as M, createTextVNode as T, nextTick as we, provide as xe, onUnmounted as ke, Transition as _e } from "vue";
|
|
2
|
+
import { createPopper as $e } from "@popperjs/core/lib/popper-lite";
|
|
3
|
+
import Ce from "@popperjs/core/lib/modifiers/preventOverflow";
|
|
4
|
+
import Se from "@popperjs/core/lib/modifiers/flip";
|
|
5
|
+
import qe from "lodash-es/uniq";
|
|
6
|
+
import Fe from "lodash-es/find";
|
|
7
|
+
import { usePage as Be, router as Pe } from "@inertiajs/vue3";
|
|
7
8
|
import U from "qs";
|
|
8
9
|
import Oe from "lodash-es/clone";
|
|
9
10
|
import je from "lodash-es/filter";
|
|
@@ -11,8 +12,8 @@ import Te from "lodash-es/findKey";
|
|
|
11
12
|
import j from "lodash-es/forEach";
|
|
12
13
|
import Le from "lodash-es/isEqual";
|
|
13
14
|
import Ve from "lodash-es/map";
|
|
14
|
-
import
|
|
15
|
-
const
|
|
15
|
+
import Me from "lodash-es/pickBy";
|
|
16
|
+
const ze = {
|
|
16
17
|
__name: "OnClickOutside",
|
|
17
18
|
props: {
|
|
18
19
|
do: {
|
|
@@ -20,22 +21,22 @@ const Me = {
|
|
|
20
21
|
required: !0
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const p =
|
|
24
|
+
setup(s) {
|
|
25
|
+
const p = s, n = S(null), f = S(null);
|
|
25
26
|
return Y(() => {
|
|
26
27
|
n.value = (d) => {
|
|
27
28
|
d.target === f.value || f.value.contains(d.target) || p.do();
|
|
28
29
|
}, document.addEventListener("click", n.value), document.addEventListener("touchstart", n.value);
|
|
29
|
-
}),
|
|
30
|
+
}), ye(() => {
|
|
30
31
|
document.removeEventListener("click", n.value), document.removeEventListener("touchstart", n.value);
|
|
31
|
-
}), (d,
|
|
32
|
+
}), (d, t) => (o(), i("div", {
|
|
32
33
|
ref_key: "root",
|
|
33
34
|
ref: f
|
|
34
35
|
}, [
|
|
35
|
-
|
|
36
|
+
w(d.$slots, "default")
|
|
36
37
|
], 512));
|
|
37
38
|
}
|
|
38
|
-
},
|
|
39
|
+
}, Ie = { class: "relative" }, Re = ["dusk", "disabled", "onClick"], De = { class: "mt-2 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5" }, X = {
|
|
39
40
|
__name: "ButtonWithDropdown",
|
|
40
41
|
props: {
|
|
41
42
|
placement: {
|
|
@@ -59,51 +60,51 @@ const Me = {
|
|
|
59
60
|
required: !1
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
|
-
setup(
|
|
63
|
-
const n =
|
|
64
|
-
function
|
|
63
|
+
setup(s, { expose: p }) {
|
|
64
|
+
const n = s, f = S(!1), d = S(null);
|
|
65
|
+
function t() {
|
|
65
66
|
f.value = !f.value;
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function l() {
|
|
68
69
|
f.value = !1;
|
|
69
70
|
}
|
|
70
71
|
J(f, () => {
|
|
71
72
|
d.value.update();
|
|
72
73
|
});
|
|
73
|
-
const
|
|
74
|
+
const u = S(null), m = S(null);
|
|
74
75
|
Y(() => {
|
|
75
|
-
d.value =
|
|
76
|
+
d.value = $e(u.value, m.value, {
|
|
76
77
|
placement: n.placement,
|
|
77
|
-
modifiers: [
|
|
78
|
+
modifiers: [Se, Ce]
|
|
78
79
|
});
|
|
79
|
-
}), p({ hide:
|
|
80
|
-
const
|
|
81
|
-
return (q,
|
|
82
|
-
default:
|
|
83
|
-
r("div",
|
|
80
|
+
}), p({ hide: l });
|
|
81
|
+
const O = z("activeClasses");
|
|
82
|
+
return (q, y) => (o(), _(ze, { do: l }, {
|
|
83
|
+
default: C(() => [
|
|
84
|
+
r("div", Ie, [
|
|
84
85
|
r("button", {
|
|
85
86
|
ref_key: "button",
|
|
86
|
-
ref:
|
|
87
|
+
ref: u,
|
|
87
88
|
type: "button",
|
|
88
|
-
dusk:
|
|
89
|
-
disabled:
|
|
90
|
-
class:
|
|
91
|
-
[e(
|
|
89
|
+
dusk: s.dusk,
|
|
90
|
+
disabled: s.disabled,
|
|
91
|
+
class: x(["w-full bg-white border rounded-md shadow-sm px-4 py-2 inline-flex justify-center text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", {
|
|
92
|
+
[e(O).border]: n.active,
|
|
92
93
|
"border-gray-300": !n.active,
|
|
93
94
|
"cursor-not-allowed": n.disabled
|
|
94
95
|
}]),
|
|
95
96
|
"aria-haspopup": "true",
|
|
96
|
-
onClick:
|
|
97
|
+
onClick: F(t, ["prevent"])
|
|
97
98
|
}, [
|
|
98
|
-
|
|
99
|
+
w(q.$slots, "button")
|
|
99
100
|
], 10, Re),
|
|
100
101
|
D(r("div", {
|
|
101
102
|
ref_key: "tooltip",
|
|
102
|
-
ref:
|
|
103
|
+
ref: m,
|
|
103
104
|
class: "absolute z-10"
|
|
104
105
|
}, [
|
|
105
106
|
r("div", De, [
|
|
106
|
-
|
|
107
|
+
w(q.$slots, "default")
|
|
107
108
|
])
|
|
108
109
|
], 512), [
|
|
109
110
|
[E, f.value]
|
|
@@ -133,45 +134,45 @@ const Me = {
|
|
|
133
134
|
required: !0
|
|
134
135
|
}
|
|
135
136
|
},
|
|
136
|
-
setup(
|
|
137
|
-
const p =
|
|
137
|
+
setup(s) {
|
|
138
|
+
const p = s, n = z("activeClasses");
|
|
138
139
|
function f() {
|
|
139
140
|
p.cell.sortable && p.cell.onSort(p.cell.key);
|
|
140
141
|
}
|
|
141
|
-
return (d,
|
|
142
|
-
(o(),
|
|
142
|
+
return (d, t) => D((o(), i("th", null, [
|
|
143
|
+
(o(), _(V(s.cell.sortable ? "button" : "div"), {
|
|
143
144
|
class: "py-3 px-6 w-full",
|
|
144
|
-
dusk:
|
|
145
|
-
onClick:
|
|
145
|
+
dusk: s.cell.sortable ? `sort-${s.cell.key}` : null,
|
|
146
|
+
onClick: F(f, ["prevent"])
|
|
146
147
|
}, {
|
|
147
|
-
default:
|
|
148
|
+
default: C(() => [
|
|
148
149
|
r("span", Ee, [
|
|
149
|
-
|
|
150
|
-
r("span", Ae,
|
|
150
|
+
w(d.$slots, "label", {}, () => [
|
|
151
|
+
r("span", Ae, v(s.cell.label), 1)
|
|
151
152
|
]),
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
w(d.$slots, "sort", {}, () => [
|
|
154
|
+
s.cell.sortable ? (o(), i("svg", {
|
|
154
155
|
key: 0,
|
|
155
156
|
"aria-hidden": "true",
|
|
156
|
-
class:
|
|
157
|
-
"text-gray-400": !
|
|
158
|
-
[e(n).text]:
|
|
157
|
+
class: x(["w-3 h-3 ml-2", {
|
|
158
|
+
"text-gray-400": !s.cell.sorted,
|
|
159
|
+
[e(n).text]: s.cell.sorted
|
|
159
160
|
}]),
|
|
160
161
|
xmlns: "http://www.w3.org/2000/svg",
|
|
161
162
|
viewBox: "0 0 320 512",
|
|
162
|
-
sorted:
|
|
163
|
+
sorted: s.cell.sorted
|
|
163
164
|
}, [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
], 10, We)) :
|
|
165
|
+
s.cell.sorted ? k("", !0) : (o(), i("path", Ne)),
|
|
166
|
+
s.cell.sorted === "asc" ? (o(), i("path", He)) : k("", !0),
|
|
167
|
+
s.cell.sorted === "desc" ? (o(), i("path", Ge)) : k("", !0)
|
|
168
|
+
], 10, We)) : k("", !0)
|
|
168
169
|
])
|
|
169
170
|
])
|
|
170
171
|
]),
|
|
171
172
|
_: 3
|
|
172
173
|
}, 8, ["dusk", "onClick"]))
|
|
173
174
|
], 512)), [
|
|
174
|
-
[E, !
|
|
175
|
+
[E, !s.cell.hidden]
|
|
175
176
|
]);
|
|
176
177
|
}
|
|
177
178
|
}, Z = {
|
|
@@ -185,16 +186,16 @@ const Me = {
|
|
|
185
186
|
to: "to"
|
|
186
187
|
}
|
|
187
188
|
};
|
|
188
|
-
function
|
|
189
|
+
function de() {
|
|
189
190
|
return Z.translations;
|
|
190
191
|
}
|
|
191
|
-
function
|
|
192
|
-
Z.translations[
|
|
192
|
+
function Ws(s, p) {
|
|
193
|
+
Z.translations[s] = p;
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
-
Z.translations =
|
|
195
|
+
function Ns(s) {
|
|
196
|
+
Z.translations = s;
|
|
196
197
|
}
|
|
197
|
-
const Qe = ["dusk", "value"], Ue = ["value"],
|
|
198
|
+
const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
198
199
|
__name: "PerPageSelector",
|
|
199
200
|
props: {
|
|
200
201
|
dusk: {
|
|
@@ -219,22 +220,22 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
219
220
|
required: !0
|
|
220
221
|
}
|
|
221
222
|
},
|
|
222
|
-
setup(
|
|
223
|
-
const p =
|
|
223
|
+
setup(s) {
|
|
224
|
+
const p = s, n = de(), f = $(() => {
|
|
224
225
|
let d = [...p.options];
|
|
225
|
-
return d.push(parseInt(p.value)),
|
|
226
|
+
return d.push(parseInt(p.value)), qe(d).sort((t, l) => t - l);
|
|
226
227
|
});
|
|
227
|
-
return (d,
|
|
228
|
+
return (d, t) => (o(), i("select", {
|
|
228
229
|
name: "per_page",
|
|
229
|
-
dusk:
|
|
230
|
-
value:
|
|
230
|
+
dusk: s.dusk,
|
|
231
|
+
value: s.value,
|
|
231
232
|
class: "block focus:ring-indigo-500 focus:border-indigo-500 min-w-max shadow-sm text-sm border-gray-300 rounded-md",
|
|
232
|
-
onChange:
|
|
233
|
+
onChange: t[0] || (t[0] = (l) => s.onChange(l.target.value))
|
|
233
234
|
}, [
|
|
234
|
-
(o(!0),
|
|
235
|
-
key:
|
|
236
|
-
value:
|
|
237
|
-
},
|
|
235
|
+
(o(!0), i(B, null, P(e(f), (l) => (o(), i("option", {
|
|
236
|
+
key: l,
|
|
237
|
+
value: l
|
|
238
|
+
}, v(l) + " " + v(e(n).per_page), 9, Ue))), 128))
|
|
238
239
|
], 40, Qe));
|
|
239
240
|
}
|
|
240
241
|
}, Ye = {
|
|
@@ -269,10 +270,10 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
269
270
|
], -1), st = {
|
|
270
271
|
key: 2,
|
|
271
272
|
class: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"
|
|
272
|
-
}, lt = { class: "flex flex-row space-x-4 items-center flex-grow" }, rt = { class: "hidden lg:block text-sm text-gray-700 flex-grow" }, nt = { class: "font-medium" }, at = { class: "font-medium" }, ot = { class: "font-medium" },
|
|
273
|
+
}, lt = { class: "flex flex-row space-x-4 items-center flex-grow" }, rt = { class: "hidden lg:block text-sm text-gray-700 flex-grow" }, nt = { class: "font-medium" }, at = { class: "font-medium" }, ot = { class: "font-medium" }, ut = {
|
|
273
274
|
class: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px",
|
|
274
275
|
"aria-label": "Pagination"
|
|
275
|
-
},
|
|
276
|
+
}, it = { class: "sr-only" }, ct = /* @__PURE__ */ r("svg", {
|
|
276
277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
277
278
|
class: "h-5 w-5",
|
|
278
279
|
viewBox: "0 0 20 20",
|
|
@@ -325,124 +326,124 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
325
326
|
required: !1
|
|
326
327
|
}
|
|
327
328
|
},
|
|
328
|
-
setup(
|
|
329
|
-
const p =
|
|
330
|
-
return (
|
|
331
|
-
!
|
|
332
|
-
|
|
329
|
+
setup(s) {
|
|
330
|
+
const p = s, n = de(), f = $(() => "links" in t.value ? t.value.links.length > 0 : !1), d = $(() => Object.keys(t.value).length > 0), t = $(() => p.meta), l = $(() => "prev_page_url" in t.value ? t.value.prev_page_url : null), u = $(() => "next_page_url" in t.value ? t.value.next_page_url : null), m = $(() => parseInt(t.value.per_page));
|
|
331
|
+
return (O, q) => e(d) ? (o(), i("nav", Ye, [
|
|
332
|
+
!s.hasData || e(t).total < 1 ? (o(), i("p", Je, v(e(n).no_results_found), 1)) : k("", !0),
|
|
333
|
+
s.hasData ? (o(), i("div", {
|
|
333
334
|
key: 1,
|
|
334
|
-
class:
|
|
335
|
+
class: x(["flex-1 flex justify-between", { "sm:hidden": e(f) }])
|
|
335
336
|
}, [
|
|
336
|
-
(o(),
|
|
337
|
-
class:
|
|
338
|
-
"cursor-not-allowed text-gray-400": !e(
|
|
339
|
-
"text-gray-700 hover:text-gray-500": e(
|
|
337
|
+
(o(), _(V(e(l) ? "a" : "div"), {
|
|
338
|
+
class: x([{
|
|
339
|
+
"cursor-not-allowed text-gray-400": !e(l),
|
|
340
|
+
"text-gray-700 hover:text-gray-500": e(l)
|
|
340
341
|
}, "relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md bg-white"]),
|
|
341
|
-
href: e(
|
|
342
|
-
dusk: e(
|
|
343
|
-
onClick: q[0] || (q[0] =
|
|
342
|
+
href: e(l),
|
|
343
|
+
dusk: e(l) ? "pagination-simple-previous" : null,
|
|
344
|
+
onClick: q[0] || (q[0] = F((y) => s.onClick(e(l)), ["prevent"]))
|
|
344
345
|
}, {
|
|
345
|
-
default:
|
|
346
|
+
default: C(() => [
|
|
346
347
|
Xe,
|
|
347
|
-
r("span", Ze,
|
|
348
|
+
r("span", Ze, v(e(n).previous), 1)
|
|
348
349
|
]),
|
|
349
350
|
_: 1
|
|
350
351
|
}, 8, ["class", "href", "dusk"])),
|
|
351
|
-
|
|
352
|
+
M(ce, {
|
|
352
353
|
dusk: "per-page-mobile",
|
|
353
|
-
value: e(
|
|
354
|
-
options:
|
|
355
|
-
"on-change":
|
|
354
|
+
value: e(m),
|
|
355
|
+
options: s.perPageOptions,
|
|
356
|
+
"on-change": s.onPerPageChange
|
|
356
357
|
}, null, 8, ["value", "options", "on-change"]),
|
|
357
|
-
(o(),
|
|
358
|
-
class:
|
|
359
|
-
"cursor-not-allowed text-gray-400": !e(
|
|
360
|
-
"text-gray-700 hover:text-gray-500": e(
|
|
358
|
+
(o(), _(V(e(u) ? "a" : "div"), {
|
|
359
|
+
class: x([{
|
|
360
|
+
"cursor-not-allowed text-gray-400": !e(u),
|
|
361
|
+
"text-gray-700 hover:text-gray-500": e(u)
|
|
361
362
|
}, "ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md bg-white"]),
|
|
362
|
-
href: e(
|
|
363
|
-
dusk: e(
|
|
364
|
-
onClick: q[1] || (q[1] =
|
|
363
|
+
href: e(u),
|
|
364
|
+
dusk: e(u) ? "pagination-simple-next" : null,
|
|
365
|
+
onClick: q[1] || (q[1] = F((y) => s.onClick(e(u)), ["prevent"]))
|
|
365
366
|
}, {
|
|
366
|
-
default:
|
|
367
|
-
r("span", et,
|
|
367
|
+
default: C(() => [
|
|
368
|
+
r("span", et, v(e(n).next), 1),
|
|
368
369
|
tt
|
|
369
370
|
]),
|
|
370
371
|
_: 1
|
|
371
372
|
}, 8, ["class", "href", "dusk"]))
|
|
372
|
-
], 2)) :
|
|
373
|
-
|
|
373
|
+
], 2)) : k("", !0),
|
|
374
|
+
s.hasData && e(f) ? (o(), i("div", st, [
|
|
374
375
|
r("div", lt, [
|
|
375
|
-
|
|
376
|
+
M(ce, {
|
|
376
377
|
dusk: "per-page-full",
|
|
377
|
-
value: e(
|
|
378
|
-
options:
|
|
379
|
-
"on-change":
|
|
378
|
+
value: e(m),
|
|
379
|
+
options: s.perPageOptions,
|
|
380
|
+
"on-change": s.onPerPageChange
|
|
380
381
|
}, null, 8, ["value", "options", "on-change"]),
|
|
381
382
|
r("p", rt, [
|
|
382
|
-
r("span", nt,
|
|
383
|
-
T(" " +
|
|
384
|
-
r("span", at,
|
|
385
|
-
T(" " +
|
|
386
|
-
r("span", ot,
|
|
387
|
-
T(" " +
|
|
383
|
+
r("span", nt, v(e(t).from), 1),
|
|
384
|
+
T(" " + v(e(n).to) + " ", 1),
|
|
385
|
+
r("span", at, v(e(t).to), 1),
|
|
386
|
+
T(" " + v(e(n).of) + " ", 1),
|
|
387
|
+
r("span", ot, v(e(t).total), 1),
|
|
388
|
+
T(" " + v(e(n).results), 1)
|
|
388
389
|
])
|
|
389
390
|
]),
|
|
390
391
|
r("div", null, [
|
|
391
|
-
r("nav",
|
|
392
|
-
(o(),
|
|
393
|
-
class:
|
|
394
|
-
"cursor-not-allowed text-gray-400": !e(
|
|
395
|
-
"text-gray-500 hover:bg-gray-50": e(
|
|
392
|
+
r("nav", ut, [
|
|
393
|
+
(o(), _(V(e(l) ? "a" : "div"), {
|
|
394
|
+
class: x([{
|
|
395
|
+
"cursor-not-allowed text-gray-400": !e(l),
|
|
396
|
+
"text-gray-500 hover:bg-gray-50": e(l)
|
|
396
397
|
}, "relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium"]),
|
|
397
|
-
href: e(
|
|
398
|
-
dusk: e(
|
|
399
|
-
onClick: q[2] || (q[2] =
|
|
398
|
+
href: e(l),
|
|
399
|
+
dusk: e(l) ? "pagination-previous" : null,
|
|
400
|
+
onClick: q[2] || (q[2] = F((y) => s.onClick(e(l)), ["prevent"]))
|
|
400
401
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
r("span",
|
|
402
|
+
default: C(() => [
|
|
403
|
+
r("span", it, v(e(n).previous), 1),
|
|
403
404
|
ct
|
|
404
405
|
]),
|
|
405
406
|
_: 1
|
|
406
407
|
}, 8, ["class", "href", "dusk"])),
|
|
407
|
-
(o(!0),
|
|
408
|
-
|
|
409
|
-
!isNaN(
|
|
408
|
+
(o(!0), i(B, null, P(e(t).links, (y, L) => (o(), i("div", { key: L }, [
|
|
409
|
+
w(O.$slots, "link", {}, () => [
|
|
410
|
+
!isNaN(y.label) || y.label === "..." ? (o(), _(V(y.url ? "a" : "div"), {
|
|
410
411
|
key: 0,
|
|
411
|
-
href:
|
|
412
|
-
dusk:
|
|
413
|
-
class:
|
|
414
|
-
"cursor-not-allowed": !
|
|
415
|
-
"hover:bg-gray-50":
|
|
416
|
-
"bg-gray-100":
|
|
412
|
+
href: y.url,
|
|
413
|
+
dusk: y.url ? `pagination-${y.label}` : null,
|
|
414
|
+
class: x(["relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700", {
|
|
415
|
+
"cursor-not-allowed": !y.url,
|
|
416
|
+
"hover:bg-gray-50": y.url,
|
|
417
|
+
"bg-gray-100": y.active
|
|
417
418
|
}]),
|
|
418
|
-
onClick:
|
|
419
|
+
onClick: F((W) => s.onClick(y.url), ["prevent"])
|
|
419
420
|
}, {
|
|
420
|
-
default:
|
|
421
|
-
T(
|
|
421
|
+
default: C(() => [
|
|
422
|
+
T(v(y.label), 1)
|
|
422
423
|
]),
|
|
423
424
|
_: 2
|
|
424
|
-
}, 1032, ["href", "dusk", "class", "onClick"])) :
|
|
425
|
+
}, 1032, ["href", "dusk", "class", "onClick"])) : k("", !0)
|
|
425
426
|
])
|
|
426
427
|
]))), 128)),
|
|
427
|
-
(o(),
|
|
428
|
-
class:
|
|
429
|
-
"cursor-not-allowed text-gray-400": !e(
|
|
430
|
-
"text-gray-500 hover:bg-gray-50": e(
|
|
428
|
+
(o(), _(V(e(u) ? "a" : "div"), {
|
|
429
|
+
class: x([{
|
|
430
|
+
"cursor-not-allowed text-gray-400": !e(u),
|
|
431
|
+
"text-gray-500 hover:bg-gray-50": e(u)
|
|
431
432
|
}, "relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium"]),
|
|
432
|
-
href: e(
|
|
433
|
-
dusk: e(
|
|
434
|
-
onClick: q[3] || (q[3] =
|
|
433
|
+
href: e(u),
|
|
434
|
+
dusk: e(u) ? "pagination-next" : null,
|
|
435
|
+
onClick: q[3] || (q[3] = F((y) => s.onClick(e(u)), ["prevent"]))
|
|
435
436
|
}, {
|
|
436
|
-
default:
|
|
437
|
-
r("span", dt,
|
|
437
|
+
default: C(() => [
|
|
438
|
+
r("span", dt, v(e(n).next), 1),
|
|
438
439
|
ht
|
|
439
440
|
]),
|
|
440
441
|
_: 1
|
|
441
442
|
}, 8, ["class", "href", "dusk"]))
|
|
442
443
|
])
|
|
443
444
|
])
|
|
444
|
-
])) :
|
|
445
|
-
])) :
|
|
445
|
+
])) : k("", !0)
|
|
446
|
+
])) : k("", !0);
|
|
446
447
|
}
|
|
447
448
|
}, pt = /* @__PURE__ */ r("svg", {
|
|
448
449
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -455,12 +456,12 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
455
456
|
d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",
|
|
456
457
|
"clip-rule": "evenodd"
|
|
457
458
|
})
|
|
458
|
-
], -1),
|
|
459
|
+
], -1), vt = {
|
|
459
460
|
role: "menu",
|
|
460
461
|
"aria-orientation": "horizontal",
|
|
461
462
|
"aria-labelledby": "add-search-input-menu",
|
|
462
463
|
class: "min-w-max"
|
|
463
|
-
},
|
|
464
|
+
}, gt = ["dusk", "onClick"], mt = {
|
|
464
465
|
__name: "TableAddSearchRow",
|
|
465
466
|
props: {
|
|
466
467
|
searchInputs: {
|
|
@@ -476,30 +477,30 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
476
477
|
required: !0
|
|
477
478
|
}
|
|
478
479
|
},
|
|
479
|
-
setup(
|
|
480
|
-
const p =
|
|
480
|
+
setup(s) {
|
|
481
|
+
const p = s, n = S(null);
|
|
481
482
|
function f(d) {
|
|
482
483
|
p.onAdd(d), n.value.hide();
|
|
483
484
|
}
|
|
484
|
-
return (d,
|
|
485
|
+
return (d, t) => (o(), _(X, {
|
|
485
486
|
ref_key: "dropdown",
|
|
486
487
|
ref: n,
|
|
487
488
|
dusk: "add-search-row-dropdown",
|
|
488
|
-
disabled: !
|
|
489
|
+
disabled: !s.hasSearchInputsWithoutValue,
|
|
489
490
|
class: "w-auto"
|
|
490
491
|
}, {
|
|
491
|
-
button:
|
|
492
|
+
button: C(() => [
|
|
492
493
|
pt
|
|
493
494
|
]),
|
|
494
|
-
default:
|
|
495
|
-
r("div",
|
|
496
|
-
(o(!0),
|
|
497
|
-
key:
|
|
498
|
-
dusk: `add-search-row-${
|
|
495
|
+
default: C(() => [
|
|
496
|
+
r("div", vt, [
|
|
497
|
+
(o(!0), i(B, null, P(s.searchInputs, (l, u) => (o(), i("button", {
|
|
498
|
+
key: u,
|
|
499
|
+
dusk: `add-search-row-${l.key}`,
|
|
499
500
|
class: "text-left w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900",
|
|
500
501
|
role: "menuitem",
|
|
501
|
-
onClick:
|
|
502
|
-
},
|
|
502
|
+
onClick: F((m) => f(l.key), ["prevent"])
|
|
503
|
+
}, v(l.label), 9, gt))), 128))
|
|
503
504
|
])
|
|
504
505
|
]),
|
|
505
506
|
_: 1
|
|
@@ -533,56 +534,56 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
533
534
|
required: !0
|
|
534
535
|
}
|
|
535
536
|
},
|
|
536
|
-
setup(
|
|
537
|
-
const p =
|
|
538
|
-
return (f, d) => (o(),
|
|
537
|
+
setup(s) {
|
|
538
|
+
const p = s, n = z("activeClasses");
|
|
539
|
+
return (f, d) => (o(), _(X, {
|
|
539
540
|
placement: "bottom-end",
|
|
540
541
|
dusk: "columns-dropdown",
|
|
541
|
-
active:
|
|
542
|
+
active: s.hasHiddenColumns
|
|
542
543
|
}, {
|
|
543
|
-
button:
|
|
544
|
-
(o(),
|
|
544
|
+
button: C(() => [
|
|
545
|
+
(o(), i("svg", {
|
|
545
546
|
xmlns: "http://www.w3.org/2000/svg",
|
|
546
|
-
class:
|
|
547
|
-
"text-gray-400": !
|
|
548
|
-
[e(n).text]:
|
|
547
|
+
class: x(["h-5 w-5", {
|
|
548
|
+
"text-gray-400": !s.hasHiddenColumns,
|
|
549
|
+
[e(n).text]: s.hasHiddenColumns
|
|
549
550
|
}]),
|
|
550
551
|
viewBox: "0 0 20 20",
|
|
551
552
|
fill: "currentColor"
|
|
552
553
|
}, wt, 2))
|
|
553
554
|
]),
|
|
554
|
-
default:
|
|
555
|
+
default: C(() => [
|
|
555
556
|
r("div", xt, [
|
|
556
557
|
r("div", kt, [
|
|
557
558
|
r("ul", _t, [
|
|
558
|
-
(o(!0),
|
|
559
|
-
key:
|
|
559
|
+
(o(!0), i(B, null, P(p.columns, (t, l) => D((o(), i("li", {
|
|
560
|
+
key: l,
|
|
560
561
|
class: "py-2 flex items-center justify-between"
|
|
561
562
|
}, [
|
|
562
|
-
r("p", $t,
|
|
563
|
+
r("p", $t, v(t.label), 1),
|
|
563
564
|
r("button", {
|
|
564
565
|
type: "button",
|
|
565
|
-
class:
|
|
566
|
-
"bg-green-500": !
|
|
567
|
-
"bg-gray-200":
|
|
566
|
+
class: x(["ml-4 relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500", {
|
|
567
|
+
"bg-green-500": !t.hidden,
|
|
568
|
+
"bg-gray-200": t.hidden
|
|
568
569
|
}]),
|
|
569
|
-
"aria-pressed": !
|
|
570
|
-
"aria-labelledby": `toggle-column-${
|
|
571
|
-
"aria-describedby": `toggle-column-${
|
|
572
|
-
dusk: `toggle-column-${
|
|
573
|
-
onClick:
|
|
570
|
+
"aria-pressed": !t.hidden,
|
|
571
|
+
"aria-labelledby": `toggle-column-${t.key}`,
|
|
572
|
+
"aria-describedby": `toggle-column-${t.key}`,
|
|
573
|
+
dusk: `toggle-column-${t.key}`,
|
|
574
|
+
onClick: F((u) => s.onChange(t.key, t.hidden), ["prevent"])
|
|
574
575
|
}, [
|
|
575
576
|
St,
|
|
576
577
|
r("span", {
|
|
577
578
|
"aria-hidden": "true",
|
|
578
|
-
class:
|
|
579
|
-
"translate-x-5": !
|
|
580
|
-
"translate-x-0":
|
|
579
|
+
class: x([{
|
|
580
|
+
"translate-x-5": !t.hidden,
|
|
581
|
+
"translate-x-0": t.hidden
|
|
581
582
|
}, "inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"])
|
|
582
583
|
}, null, 2)
|
|
583
584
|
], 10, Ct)
|
|
584
585
|
])), [
|
|
585
|
-
[E,
|
|
586
|
+
[E, t.can_be_hidden]
|
|
586
587
|
])), 128))
|
|
587
588
|
])
|
|
588
589
|
])
|
|
@@ -618,41 +619,41 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
618
619
|
required: !0
|
|
619
620
|
}
|
|
620
621
|
},
|
|
621
|
-
setup(
|
|
622
|
-
const p =
|
|
623
|
-
return (n, f) => (o(),
|
|
622
|
+
setup(s) {
|
|
623
|
+
const p = z("activeClasses");
|
|
624
|
+
return (n, f) => (o(), _(X, {
|
|
624
625
|
placement: "bottom-end",
|
|
625
626
|
dusk: "filters-dropdown",
|
|
626
|
-
active:
|
|
627
|
+
active: s.hasEnabledFilters
|
|
627
628
|
}, {
|
|
628
|
-
button:
|
|
629
|
-
(o(),
|
|
629
|
+
button: C(() => [
|
|
630
|
+
(o(), i("svg", {
|
|
630
631
|
xmlns: "http://www.w3.org/2000/svg",
|
|
631
|
-
class:
|
|
632
|
-
"text-gray-400": !
|
|
633
|
-
[e(p).text]:
|
|
632
|
+
class: x(["h-5 w-5", {
|
|
633
|
+
"text-gray-400": !s.hasEnabledFilters,
|
|
634
|
+
[e(p).text]: s.hasEnabledFilters
|
|
634
635
|
}]),
|
|
635
636
|
viewBox: "0 0 20 20",
|
|
636
637
|
fill: "currentColor"
|
|
637
638
|
}, Bt, 2))
|
|
638
639
|
]),
|
|
639
|
-
default:
|
|
640
|
+
default: C(() => [
|
|
640
641
|
r("div", Pt, [
|
|
641
|
-
(o(!0),
|
|
642
|
-
r("h3", Ot,
|
|
642
|
+
(o(!0), i(B, null, P(s.filters, (d, t) => (o(), i("div", { key: t }, [
|
|
643
|
+
r("h3", Ot, v(d.label), 1),
|
|
643
644
|
r("div", jt, [
|
|
644
|
-
d.type === "select" ? (o(),
|
|
645
|
+
d.type === "select" ? (o(), i("select", {
|
|
645
646
|
key: 0,
|
|
646
647
|
name: d.key,
|
|
647
648
|
value: d.value,
|
|
648
649
|
class: "block focus:ring-indigo-500 focus:border-indigo-500 w-full shadow-sm text-sm border-gray-300 rounded-md",
|
|
649
|
-
onChange: (
|
|
650
|
+
onChange: (l) => s.onFilterChange(d.key, l.target.value)
|
|
650
651
|
}, [
|
|
651
|
-
(o(!0),
|
|
652
|
-
key:
|
|
653
|
-
value:
|
|
654
|
-
},
|
|
655
|
-
], 40, Tt)) :
|
|
652
|
+
(o(!0), i(B, null, P(d.options, (l, u) => (o(), i("option", {
|
|
653
|
+
key: u,
|
|
654
|
+
value: u
|
|
655
|
+
}, v(l), 9, Lt))), 128))
|
|
656
|
+
], 40, Tt)) : k("", !0)
|
|
656
657
|
])
|
|
657
658
|
]))), 128))
|
|
658
659
|
])
|
|
@@ -660,7 +661,7 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
660
661
|
_: 1
|
|
661
662
|
}, 8, ["active"]));
|
|
662
663
|
}
|
|
663
|
-
},
|
|
664
|
+
}, Mt = { class: "flex items-center justify-start my-3 text-sm" }, zt = { class: "flex items-center" }, It = /* @__PURE__ */ r("svg", {
|
|
664
665
|
xmlns: "http://www.w3.org/2000/svg",
|
|
665
666
|
class: "h-5 w-5 text-gray-300",
|
|
666
667
|
viewBox: "0 0 20 20",
|
|
@@ -689,31 +690,31 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
689
690
|
required: !0
|
|
690
691
|
}
|
|
691
692
|
},
|
|
692
|
-
setup(
|
|
693
|
-
const p =
|
|
694
|
-
return (
|
|
695
|
-
r("div",
|
|
696
|
-
|
|
693
|
+
setup(s) {
|
|
694
|
+
const p = s, n = z("activeClasses"), f = $(() => p.filters.filter((t) => t.value !== null)), d = $(() => f.value.length);
|
|
695
|
+
return (t, l) => (o(), i("div", Mt, [
|
|
696
|
+
r("div", zt, [
|
|
697
|
+
It,
|
|
697
698
|
r("span", Rt, [
|
|
698
|
-
T(
|
|
699
|
+
T(v(e(d)) + " active ", 1),
|
|
699
700
|
r("span", {
|
|
700
|
-
textContent:
|
|
701
|
+
textContent: v(e(d) === 1 ? "filter" : "filters")
|
|
701
702
|
}, null, 8, Dt),
|
|
702
703
|
T(":")
|
|
703
704
|
])
|
|
704
705
|
]),
|
|
705
|
-
(o(!0),
|
|
706
|
-
key:
|
|
707
|
-
class:
|
|
708
|
-
onClick: (
|
|
706
|
+
(o(!0), i(B, null, P(e(f), (u) => (o(), i("button", {
|
|
707
|
+
key: u.label,
|
|
708
|
+
class: x(["block group ml-3 flex items-center justify-between px-2 py-1 rounded bg-gray-100", `hover:${e(n).text}`]),
|
|
709
|
+
onClick: (m) => s.onFilterChange(u.key, null)
|
|
709
710
|
}, [
|
|
710
711
|
r("span", {
|
|
711
|
-
class:
|
|
712
|
-
},
|
|
712
|
+
class: x(["capitalize text-gray-500", `group-hover:${e(n).text}`])
|
|
713
|
+
}, v(u.label.replace("_", " ")), 3),
|
|
713
714
|
T(":"),
|
|
714
|
-
r("span", At,
|
|
715
|
-
(o(),
|
|
716
|
-
class:
|
|
715
|
+
r("span", At, v(u.options[u.value]), 1),
|
|
716
|
+
(o(), i("svg", {
|
|
717
|
+
class: x([`group-hover:${e(n).text}`, "h-4 w-4 ml-1 text-gray-400"]),
|
|
717
718
|
xmlns: "http://www.w3.org/2000/svg",
|
|
718
719
|
viewBox: "0 0 20 20",
|
|
719
720
|
fill: "currentColor"
|
|
@@ -752,16 +753,16 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
752
753
|
required: !0
|
|
753
754
|
}
|
|
754
755
|
},
|
|
755
|
-
setup(
|
|
756
|
-
const p =
|
|
757
|
-
return (n, f) => (o(),
|
|
756
|
+
setup(s) {
|
|
757
|
+
const p = z("activeClasses");
|
|
758
|
+
return (n, f) => (o(), i("div", Gt, [
|
|
758
759
|
r("input", {
|
|
759
|
-
class:
|
|
760
|
-
placeholder:
|
|
761
|
-
value:
|
|
760
|
+
class: x(["block w-full text-sm border-gray-300 rounded-md shadow-sm pl-9", [e(p).focusRing, e(p).focusBorder]]),
|
|
761
|
+
placeholder: s.label,
|
|
762
|
+
value: s.value,
|
|
762
763
|
type: "text",
|
|
763
764
|
name: "global",
|
|
764
|
-
onInput: f[0] || (f[0] = (d) =>
|
|
765
|
+
onInput: f[0] || (f[0] = (d) => s.onChange(d.target.value))
|
|
765
766
|
}, null, 42, Kt),
|
|
766
767
|
Qt
|
|
767
768
|
]));
|
|
@@ -813,51 +814,51 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
813
814
|
required: !0
|
|
814
815
|
}
|
|
815
816
|
},
|
|
816
|
-
setup(
|
|
817
|
-
const p =
|
|
818
|
-
let f =
|
|
819
|
-
function d(
|
|
820
|
-
return p.forcedVisibleSearchInputs.includes(
|
|
817
|
+
setup(s) {
|
|
818
|
+
const p = s, n = { el: S([]) };
|
|
819
|
+
let f = $(() => n.el.value);
|
|
820
|
+
function d(t) {
|
|
821
|
+
return p.forcedVisibleSearchInputs.includes(t);
|
|
821
822
|
}
|
|
822
|
-
return J(p.forcedVisibleSearchInputs, (
|
|
823
|
-
const
|
|
824
|
-
!
|
|
825
|
-
const
|
|
826
|
-
|
|
823
|
+
return J(p.forcedVisibleSearchInputs, (t) => {
|
|
824
|
+
const l = t.length > 0 ? t[t.length - 1] : null;
|
|
825
|
+
!l || we().then(() => {
|
|
826
|
+
const u = Fe(f.value, (m) => m.__vnode.key === l);
|
|
827
|
+
u && u.focus();
|
|
827
828
|
});
|
|
828
|
-
}, { immediate: !0 }), (
|
|
829
|
-
key:
|
|
829
|
+
}, { immediate: !0 }), (t, l) => (o(!0), i(B, null, P(s.searchInputs, (u, m) => D((o(), i("div", {
|
|
830
|
+
key: m,
|
|
830
831
|
class: "px-4 sm:px-0"
|
|
831
832
|
}, [
|
|
832
833
|
r("div", Yt, [
|
|
833
834
|
r("label", {
|
|
834
|
-
for:
|
|
835
|
+
for: u.key,
|
|
835
836
|
class: "inline-flex items-center px-4 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 text-sm"
|
|
836
837
|
}, [
|
|
837
838
|
Xt,
|
|
838
|
-
r("span", null,
|
|
839
|
+
r("span", null, v(u.label), 1)
|
|
839
840
|
], 8, Jt),
|
|
840
|
-
(o(),
|
|
841
|
-
id:
|
|
841
|
+
(o(), i("input", {
|
|
842
|
+
id: u.key,
|
|
842
843
|
ref_for: !0,
|
|
843
844
|
ref: n.el,
|
|
844
|
-
key:
|
|
845
|
-
name:
|
|
846
|
-
value:
|
|
845
|
+
key: u.key,
|
|
846
|
+
name: u.key,
|
|
847
|
+
value: u.value,
|
|
847
848
|
type: "text",
|
|
848
849
|
class: "flex-1 min-w-0 block w-full px-3 py-2 rounded-none rounded-r-md focus:ring-indigo-500 focus:border-indigo-500 text-sm border-gray-300",
|
|
849
|
-
onInput: (
|
|
850
|
+
onInput: (O) => s.onChange(u.key, O.target.value)
|
|
850
851
|
}, null, 40, Zt)),
|
|
851
852
|
r("div", es, [
|
|
852
853
|
r("button", {
|
|
853
854
|
class: "rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",
|
|
854
|
-
dusk: `remove-search-row-${
|
|
855
|
-
onClick:
|
|
855
|
+
dusk: `remove-search-row-${u.key}`,
|
|
856
|
+
onClick: F((O) => s.onRemove(u.key), ["prevent"])
|
|
856
857
|
}, rs, 8, ts)
|
|
857
858
|
])
|
|
858
859
|
])
|
|
859
860
|
])), [
|
|
860
|
-
[E,
|
|
861
|
+
[E, u.value !== null || d(u.key)]
|
|
861
862
|
])), 128));
|
|
862
863
|
}
|
|
863
864
|
}, as = /* @__PURE__ */ r("svg", {
|
|
@@ -871,10 +872,10 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
871
872
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
872
873
|
"clip-rule": "evenodd"
|
|
873
874
|
})
|
|
874
|
-
], -1), os = /* @__PURE__ */ r("span", null, "Reset", -1),
|
|
875
|
+
], -1), os = /* @__PURE__ */ r("span", null, "Reset", -1), us = [
|
|
875
876
|
as,
|
|
876
877
|
os
|
|
877
|
-
],
|
|
878
|
+
], is = {
|
|
878
879
|
__name: "TableReset",
|
|
879
880
|
props: {
|
|
880
881
|
onClick: {
|
|
@@ -882,34 +883,34 @@ const Qe = ["dusk", "value"], Ue = ["value"], de = {
|
|
|
882
883
|
required: !0
|
|
883
884
|
}
|
|
884
885
|
},
|
|
885
|
-
setup(
|
|
886
|
-
return (p, n) => (o(),
|
|
886
|
+
setup(s) {
|
|
887
|
+
return (p, n) => (o(), i("button", {
|
|
887
888
|
ref: "button",
|
|
888
889
|
type: "button",
|
|
889
890
|
dusk: "reset-table",
|
|
890
891
|
class: "w-full bg-white border rounded-md shadow-sm px-4 py-2 inline-flex justify-center text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 border-gray-300",
|
|
891
892
|
"aria-haspopup": "true",
|
|
892
|
-
onClick: n[0] || (n[0] =
|
|
893
|
-
},
|
|
893
|
+
onClick: n[0] || (n[0] = F((...f) => s.onClick && s.onClick(...f), ["prevent"]))
|
|
894
|
+
}, us, 512));
|
|
894
895
|
}
|
|
895
|
-
}, cs = (
|
|
896
|
-
const n =
|
|
896
|
+
}, cs = (s, p) => {
|
|
897
|
+
const n = s.__vccOpts || s;
|
|
897
898
|
for (const [f, d] of p)
|
|
898
899
|
n[f] = d;
|
|
899
900
|
return n;
|
|
900
|
-
}, ds = {}, hs = { class: "flex flex-col" }, fs = { class: "-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8" }, ps = { class: "py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8" },
|
|
901
|
-
function
|
|
902
|
-
return o(),
|
|
901
|
+
}, ds = {}, hs = { class: "flex flex-col" }, fs = { class: "-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8" }, ps = { class: "py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8" }, vs = { class: "shadow border-b border-gray-200 relative" };
|
|
902
|
+
function gs(s, p) {
|
|
903
|
+
return o(), i("div", hs, [
|
|
903
904
|
r("div", fs, [
|
|
904
905
|
r("div", ps, [
|
|
905
|
-
r("div",
|
|
906
|
-
|
|
906
|
+
r("div", vs, [
|
|
907
|
+
w(s.$slots, "default")
|
|
907
908
|
])
|
|
908
909
|
])
|
|
909
910
|
])
|
|
910
911
|
]);
|
|
911
912
|
}
|
|
912
|
-
const ms = /* @__PURE__ */ cs(ds, [["render",
|
|
913
|
+
const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class: "flex flex-row flex-wrap justify-start space-x-2 sm:flex-nowrap" }, ws = {
|
|
913
914
|
key: 0,
|
|
914
915
|
class: "order-2 sm:order-1"
|
|
915
916
|
}, xs = {
|
|
@@ -918,7 +919,7 @@ const ms = /* @__PURE__ */ cs(ds, [["render", vs]]), bs = ["dusk"], ys = { class
|
|
|
918
919
|
}, ks = {
|
|
919
920
|
key: 0,
|
|
920
921
|
class: "order-5 ml-auto sm:order-3"
|
|
921
|
-
}, _s = { class: "min-w-full bg-white divide-y divide-gray-200" }, $s = { class: "bg-gray-50" }, Cs = { class: "px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase" }, Ss = { class: "bg-white divide-y divide-gray-200" }, qs = ["onClick"],
|
|
922
|
+
}, _s = { class: "min-w-full bg-white divide-y divide-gray-200" }, $s = { class: "bg-gray-50" }, Cs = { class: "px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase" }, Ss = { class: "bg-white divide-y divide-gray-200" }, qs = ["onClick"], Hs = {
|
|
922
923
|
__name: "Table",
|
|
923
924
|
props: {
|
|
924
925
|
inertia: {
|
|
@@ -980,71 +981,71 @@ const ms = /* @__PURE__ */ cs(ds, [["render", vs]]), bs = ["dusk"], ys = { class
|
|
|
980
981
|
}
|
|
981
982
|
},
|
|
982
983
|
emits: ["rowClick"],
|
|
983
|
-
setup(
|
|
984
|
-
const n =
|
|
985
|
-
|
|
986
|
-
const f =
|
|
987
|
-
let a = d.
|
|
988
|
-
return a._updates =
|
|
989
|
-
}), l =
|
|
984
|
+
setup(s, { emit: p }) {
|
|
985
|
+
const n = s;
|
|
986
|
+
xe("activeClasses", n.activeClasses);
|
|
987
|
+
const f = S(0), d = Be(), t = $(() => {
|
|
988
|
+
let a = d.props.queryBuilderProps ? d.props.queryBuilderProps[n.name] || {} : {};
|
|
989
|
+
return a._updates = f.value, a;
|
|
990
|
+
}), l = S(t.value), u = $(() => t.value.pageName), m = S([]), O = S(null), q = $(() => !(t.value.hasToggleableColumns || t.value.hasFilters || t.value.hasSearchInputs || t.value.globalSearch)), y = $(() => Object.keys(n.resource).length === 0 ? n.data : "data" in n.resource ? n.resource.data : n.resource), L = $(() => Object.keys(n.resource).length === 0 ? n.meta : "links" in n.resource && "meta" in n.resource && Object.keys(n.resource.links).length === 4 && "next" in n.resource.links && "prev" in n.resource.links ? {
|
|
990
991
|
...n.resource.meta,
|
|
991
992
|
next_page_url: n.resource.links.next,
|
|
992
993
|
prev_page_url: n.resource.links.prev
|
|
993
|
-
} : "meta" in n.resource ? n.resource.meta : n.resource),
|
|
994
|
-
function
|
|
994
|
+
} : "meta" in n.resource ? n.resource.meta : n.resource), W = $(() => y.value.length > 0 || L.value.total > 0);
|
|
995
|
+
function he(a, c) {
|
|
995
996
|
p("rowClick", a, c);
|
|
996
997
|
}
|
|
997
|
-
function
|
|
998
|
-
|
|
998
|
+
function fe(a) {
|
|
999
|
+
m.value = m.value.filter((c) => c != a), A(a, null);
|
|
999
1000
|
}
|
|
1000
|
-
function
|
|
1001
|
-
|
|
1001
|
+
function ee(a) {
|
|
1002
|
+
m.value.push(a);
|
|
1002
1003
|
}
|
|
1003
|
-
const
|
|
1004
|
-
if (
|
|
1004
|
+
const pe = $(() => {
|
|
1005
|
+
if (m.value.length > 0)
|
|
1005
1006
|
return !0;
|
|
1006
1007
|
const a = U.parse(location.search.substring(1));
|
|
1007
|
-
if (a[
|
|
1008
|
+
if (a[u.value] > 1)
|
|
1008
1009
|
return !0;
|
|
1009
1010
|
const h = n.name === "default" ? "" : n.name + "_";
|
|
1010
|
-
let
|
|
1011
|
-
return j(["filter", "columns", "cursor", "sort"], (
|
|
1012
|
-
const R = a[h +
|
|
1013
|
-
|
|
1014
|
-
}),
|
|
1011
|
+
let g = !1;
|
|
1012
|
+
return j(["filter", "columns", "cursor", "sort"], (b) => {
|
|
1013
|
+
const R = a[h + b];
|
|
1014
|
+
b === "sort" && R === t.value.defaultSort || R !== void 0 && (g = !0);
|
|
1015
|
+
}), g;
|
|
1015
1016
|
});
|
|
1016
|
-
function
|
|
1017
|
-
|
|
1017
|
+
function te() {
|
|
1018
|
+
m.value = [], j(l.value.filters, (a, c) => {
|
|
1018
1019
|
l.value.filters[c].value = null;
|
|
1019
1020
|
}), j(l.value.searchInputs, (a, c) => {
|
|
1020
1021
|
l.value.searchInputs[c].value = null;
|
|
1021
1022
|
}), j(l.value.columns, (a, c) => {
|
|
1022
|
-
l.value.columns[c].hidden = a.can_be_hidden ? !
|
|
1023
|
+
l.value.columns[c].hidden = a.can_be_hidden ? !t.value.defaultVisibleToggleableColumns.includes(a.key) : !1;
|
|
1023
1024
|
}), l.value.sort = null, l.value.cursor = null, l.value.page = 1;
|
|
1024
1025
|
}
|
|
1025
|
-
const
|
|
1026
|
-
function
|
|
1027
|
-
clearTimeout(
|
|
1026
|
+
const se = {};
|
|
1027
|
+
function A(a, c) {
|
|
1028
|
+
clearTimeout(se[a]), se[a] = setTimeout(() => {
|
|
1028
1029
|
G.value && n.preventOverlappingRequests && G.value.cancel();
|
|
1029
|
-
const h =
|
|
1030
|
+
const h = I("searchInputs", a);
|
|
1030
1031
|
l.value.searchInputs[h].value = c, l.value.cursor = null, l.value.page = 1;
|
|
1031
1032
|
}, n.inputDebounceMs);
|
|
1032
1033
|
}
|
|
1033
|
-
function
|
|
1034
|
-
|
|
1034
|
+
function le(a) {
|
|
1035
|
+
A("global", a);
|
|
1035
1036
|
}
|
|
1036
1037
|
function N(a, c) {
|
|
1037
|
-
const h =
|
|
1038
|
+
const h = I("filters", a);
|
|
1038
1039
|
l.value.filters[h].value = c, l.value.cursor = null, l.value.page = 1;
|
|
1039
1040
|
}
|
|
1040
|
-
function
|
|
1041
|
+
function re(a) {
|
|
1041
1042
|
l.value.cursor = null, l.value.perPage = a, l.value.page = 1;
|
|
1042
1043
|
}
|
|
1043
|
-
function
|
|
1044
|
+
function I(a, c) {
|
|
1044
1045
|
return Te(l.value[a], (h) => h.key == c);
|
|
1045
1046
|
}
|
|
1046
|
-
function
|
|
1047
|
-
const h =
|
|
1047
|
+
function ne(a, c) {
|
|
1048
|
+
const h = I("columns", a);
|
|
1048
1049
|
l.value.columns[h].hidden = !c;
|
|
1049
1050
|
}
|
|
1050
1051
|
function ve() {
|
|
@@ -1055,36 +1056,36 @@ const ms = /* @__PURE__ */ cs(ds, [["render", vs]]), bs = ["dusk"], ys = { class
|
|
|
1055
1056
|
c.value !== null && (a[c.key] = c.value);
|
|
1056
1057
|
}), a;
|
|
1057
1058
|
}
|
|
1058
|
-
function
|
|
1059
|
+
function ge() {
|
|
1059
1060
|
const a = l.value.columns;
|
|
1060
|
-
let c = je(a, (
|
|
1061
|
-
return Le(h,
|
|
1061
|
+
let c = je(a, (g) => !g.hidden), h = Ve(c, (g) => g.key).sort();
|
|
1062
|
+
return Le(h, t.value.defaultVisibleToggleableColumns) ? {} : h;
|
|
1062
1063
|
}
|
|
1063
|
-
function
|
|
1064
|
-
const a = ve(), c =
|
|
1064
|
+
function me() {
|
|
1065
|
+
const a = ve(), c = ge(), h = {};
|
|
1065
1066
|
Object.keys(a).length > 0 && (h.filter = a), Object.keys(c).length > 0 && (h.columns = c);
|
|
1066
|
-
const
|
|
1067
|
-
return
|
|
1067
|
+
const g = l.value.cursor, b = l.value.page, R = l.value.sort, ie = l.value.perPage;
|
|
1068
|
+
return g && (h.cursor = g), b > 1 && (h.page = b), ie > 1 && (h.perPage = ie), R && (h.sort = R), h;
|
|
1068
1069
|
}
|
|
1069
|
-
function
|
|
1070
|
+
function be() {
|
|
1070
1071
|
const a = U.parse(location.search.substring(1)), c = n.name === "default" ? "" : n.name + "_";
|
|
1071
|
-
j(["filter", "columns", "cursor", "sort"], (
|
|
1072
|
-
delete a[c +
|
|
1073
|
-
}), delete a[
|
|
1074
|
-
|
|
1072
|
+
j(["filter", "columns", "cursor", "sort"], (g) => {
|
|
1073
|
+
delete a[c + g];
|
|
1074
|
+
}), delete a[u.value], j(me(), (g, b) => {
|
|
1075
|
+
b === "page" ? a[u.value] = g : b === "perPage" ? a.perPage = g : a[c + b] = g;
|
|
1075
1076
|
});
|
|
1076
1077
|
let h = U.stringify(a, {
|
|
1077
|
-
filter(
|
|
1078
|
-
return typeof
|
|
1078
|
+
filter(g, b) {
|
|
1079
|
+
return typeof b == "object" && b !== null ? Me(b) : b;
|
|
1079
1080
|
},
|
|
1080
1081
|
skipNulls: !0,
|
|
1081
1082
|
strictNullHandling: !0
|
|
1082
1083
|
});
|
|
1083
|
-
return (!h || h ===
|
|
1084
|
+
return (!h || h === u.value + "=1") && (h = ""), h;
|
|
1084
1085
|
}
|
|
1085
|
-
const H =
|
|
1086
|
+
const H = S(!1), G = S(null);
|
|
1086
1087
|
function K(a) {
|
|
1087
|
-
!a ||
|
|
1088
|
+
!a || Pe.get(
|
|
1088
1089
|
a,
|
|
1089
1090
|
{},
|
|
1090
1091
|
{
|
|
@@ -1101,193 +1102,193 @@ const ms = /* @__PURE__ */ cs(ds, [["render", vs]]), bs = ["dusk"], ys = { class
|
|
|
1101
1102
|
H.value = !1;
|
|
1102
1103
|
},
|
|
1103
1104
|
onSuccess() {
|
|
1104
|
-
if ("queryBuilderProps" in d.
|
|
1105
|
-
const h =
|
|
1105
|
+
if ("queryBuilderProps" in d.props && (l.value.cursor = t.value.cursor, l.value.page = t.value.page), n.preserveScroll === "table-top") {
|
|
1106
|
+
const h = O.value.getBoundingClientRect().top + window.pageYOffset + -8;
|
|
1106
1107
|
window.scrollTo({ top: h });
|
|
1107
1108
|
}
|
|
1108
|
-
|
|
1109
|
+
f.value++;
|
|
1109
1110
|
}
|
|
1110
1111
|
}
|
|
1111
1112
|
);
|
|
1112
1113
|
}
|
|
1113
1114
|
J(l, () => {
|
|
1114
|
-
K(location.pathname + "?" +
|
|
1115
|
+
K(location.pathname + "?" + be());
|
|
1115
1116
|
}, { deep: !0 });
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1117
|
+
const ae = () => {
|
|
1118
|
+
f.value++;
|
|
1118
1119
|
};
|
|
1119
1120
|
Y(() => {
|
|
1120
|
-
document.addEventListener("
|
|
1121
|
-
}),
|
|
1122
|
-
document.removeEventListener("
|
|
1121
|
+
document.addEventListener("success", ae);
|
|
1122
|
+
}), ke(() => {
|
|
1123
|
+
document.removeEventListener("success", ae);
|
|
1123
1124
|
});
|
|
1124
|
-
function
|
|
1125
|
+
function oe(a) {
|
|
1125
1126
|
l.value.sort == a ? l.value.sort = `-${a}` : l.value.sort = a, l.value.cursor = null, l.value.page = 1;
|
|
1126
1127
|
}
|
|
1127
1128
|
function Q(a) {
|
|
1128
|
-
const c =
|
|
1129
|
+
const c = I("columns", a);
|
|
1129
1130
|
return !l.value.columns[c].hidden;
|
|
1130
1131
|
}
|
|
1131
1132
|
function ue(a) {
|
|
1132
|
-
const c =
|
|
1133
|
-
return h.onSort =
|
|
1133
|
+
const c = I("columns", a), h = Oe(t.value.columns[c]);
|
|
1134
|
+
return h.onSort = oe, h;
|
|
1134
1135
|
}
|
|
1135
|
-
return (a, c) => (o(),
|
|
1136
|
-
default:
|
|
1137
|
-
(o(),
|
|
1136
|
+
return (a, c) => (o(), _(_e, null, {
|
|
1137
|
+
default: C(() => [
|
|
1138
|
+
(o(), i("fieldset", {
|
|
1138
1139
|
ref_key: "tableFieldset",
|
|
1139
|
-
ref:
|
|
1140
|
-
key: `table-${
|
|
1141
|
-
dusk: `table-${
|
|
1142
|
-
class:
|
|
1140
|
+
ref: O,
|
|
1141
|
+
key: `table-${s.name}`,
|
|
1142
|
+
dusk: `table-${s.name}`,
|
|
1143
|
+
class: x(["min-w-0", { "opacity-75": H.value }])
|
|
1143
1144
|
}, [
|
|
1144
1145
|
r("div", ys, [
|
|
1145
|
-
e(
|
|
1146
|
-
|
|
1147
|
-
hasFilters: e(
|
|
1148
|
-
hasEnabledFilters: e(
|
|
1149
|
-
filters: e(
|
|
1146
|
+
e(t).hasFilters ? (o(), i("div", ws, [
|
|
1147
|
+
w(a.$slots, "tableFilter", {
|
|
1148
|
+
hasFilters: e(t).hasFilters,
|
|
1149
|
+
hasEnabledFilters: e(t).hasEnabledFilters,
|
|
1150
|
+
filters: e(t).filters,
|
|
1150
1151
|
onFilterChange: N
|
|
1151
1152
|
}, () => [
|
|
1152
|
-
|
|
1153
|
-
"has-enabled-filters": e(
|
|
1154
|
-
filters: e(
|
|
1153
|
+
M(Vt, {
|
|
1154
|
+
"has-enabled-filters": e(t).hasEnabledFilters,
|
|
1155
|
+
filters: e(t).filters,
|
|
1155
1156
|
"on-filter-change": N
|
|
1156
1157
|
}, null, 8, ["has-enabled-filters", "filters"])
|
|
1157
1158
|
])
|
|
1158
|
-
])) :
|
|
1159
|
-
e(
|
|
1160
|
-
|
|
1161
|
-
hasGlobalSearch: e(
|
|
1162
|
-
label: e(
|
|
1163
|
-
value: e(
|
|
1164
|
-
onChange:
|
|
1159
|
+
])) : k("", !0),
|
|
1160
|
+
e(t).globalSearch ? (o(), i("div", xs, [
|
|
1161
|
+
w(a.$slots, "tableGlobalSearch", {
|
|
1162
|
+
hasGlobalSearch: e(t).globalSearch,
|
|
1163
|
+
label: e(t).globalSearch ? e(t).globalSearch.label : null,
|
|
1164
|
+
value: e(t).globalSearch ? e(t).globalSearch.value : null,
|
|
1165
|
+
onChange: le
|
|
1165
1166
|
}, () => [
|
|
1166
|
-
e(
|
|
1167
|
+
e(t).globalSearch ? (o(), _(Ut, {
|
|
1167
1168
|
key: 0,
|
|
1168
1169
|
class: "flex-grow",
|
|
1169
|
-
label: e(
|
|
1170
|
-
value: e(
|
|
1171
|
-
"on-change":
|
|
1172
|
-
}, null, 8, ["label", "value"])) :
|
|
1170
|
+
label: e(t).globalSearch.label,
|
|
1171
|
+
value: e(t).globalSearch.value,
|
|
1172
|
+
"on-change": le
|
|
1173
|
+
}, null, 8, ["label", "value"])) : k("", !0)
|
|
1173
1174
|
])
|
|
1174
|
-
])) :
|
|
1175
|
-
|
|
1175
|
+
])) : k("", !0),
|
|
1176
|
+
w(a.$slots, "tableReset", {
|
|
1176
1177
|
canBeReset: "canBeReset",
|
|
1177
|
-
onClick:
|
|
1178
|
+
onClick: te
|
|
1178
1179
|
}, () => [
|
|
1179
|
-
e(
|
|
1180
|
-
|
|
1181
|
-
])) :
|
|
1180
|
+
e(pe) ? (o(), i("div", ks, [
|
|
1181
|
+
M(is, { "on-click": te })
|
|
1182
|
+
])) : k("", !0)
|
|
1182
1183
|
]),
|
|
1183
|
-
|
|
1184
|
-
hasSearchInputs: e(
|
|
1185
|
-
hasSearchInputsWithoutValue: e(
|
|
1186
|
-
searchInputs: e(
|
|
1187
|
-
onAdd:
|
|
1184
|
+
w(a.$slots, "tableAddSearchRow", {
|
|
1185
|
+
hasSearchInputs: e(t).hasSearchInputs,
|
|
1186
|
+
hasSearchInputsWithoutValue: e(t).hasSearchInputsWithoutValue,
|
|
1187
|
+
searchInputs: e(t).searchInputsWithoutGlobal,
|
|
1188
|
+
onAdd: ee
|
|
1188
1189
|
}, () => [
|
|
1189
|
-
e(
|
|
1190
|
+
e(t).hasSearchInputs ? (o(), _(mt, {
|
|
1190
1191
|
key: 0,
|
|
1191
1192
|
class: "order-3 sm:order-4",
|
|
1192
|
-
"search-inputs": e(
|
|
1193
|
-
"has-search-inputs-without-value": e(
|
|
1194
|
-
"on-add":
|
|
1195
|
-
}, null, 8, ["search-inputs", "has-search-inputs-without-value"])) :
|
|
1193
|
+
"search-inputs": e(t).searchInputsWithoutGlobal,
|
|
1194
|
+
"has-search-inputs-without-value": e(t).hasSearchInputsWithoutValue,
|
|
1195
|
+
"on-add": ee
|
|
1196
|
+
}, null, 8, ["search-inputs", "has-search-inputs-without-value"])) : k("", !0)
|
|
1196
1197
|
]),
|
|
1197
|
-
|
|
1198
|
-
hasColumns: e(
|
|
1199
|
-
columns: e(
|
|
1200
|
-
hasHiddenColumns: e(
|
|
1201
|
-
onChange:
|
|
1198
|
+
w(a.$slots, "tableColumns", {
|
|
1199
|
+
hasColumns: e(t).hasToggleableColumns,
|
|
1200
|
+
columns: e(t).columns,
|
|
1201
|
+
hasHiddenColumns: e(t).hasHiddenColumns,
|
|
1202
|
+
onChange: ne
|
|
1202
1203
|
}, () => [
|
|
1203
|
-
e(
|
|
1204
|
+
e(t).hasToggleableColumns ? (o(), _(qt, {
|
|
1204
1205
|
key: 0,
|
|
1205
1206
|
class: "order-4 sm:order-5",
|
|
1206
|
-
columns: e(
|
|
1207
|
-
"has-hidden-columns": e(
|
|
1208
|
-
"on-change":
|
|
1209
|
-
}, null, 8, ["columns", "has-hidden-columns"])) :
|
|
1207
|
+
columns: e(t).columns,
|
|
1208
|
+
"has-hidden-columns": e(t).hasHiddenColumns,
|
|
1209
|
+
"on-change": ne
|
|
1210
|
+
}, null, 8, ["columns", "has-hidden-columns"])) : k("", !0)
|
|
1210
1211
|
])
|
|
1211
1212
|
]),
|
|
1212
|
-
|
|
1213
|
-
hasSearchRowsWithValue: e(
|
|
1214
|
-
searchInputs: e(
|
|
1215
|
-
forcedVisibleSearchInputs:
|
|
1216
|
-
onChange:
|
|
1213
|
+
w(a.$slots, "tableSearchRows", {
|
|
1214
|
+
hasSearchRowsWithValue: e(t).hasSearchInputsWithValue,
|
|
1215
|
+
searchInputs: e(t).searchInputsWithoutGlobal,
|
|
1216
|
+
forcedVisibleSearchInputs: m.value,
|
|
1217
|
+
onChange: A
|
|
1217
1218
|
}, () => [
|
|
1218
|
-
e(
|
|
1219
|
+
e(t).hasSearchInputsWithValue || m.value.length > 0 ? (o(), _(ns, {
|
|
1219
1220
|
key: 0,
|
|
1220
|
-
"search-inputs": e(
|
|
1221
|
-
"forced-visible-search-inputs":
|
|
1222
|
-
"on-change":
|
|
1223
|
-
"on-remove":
|
|
1224
|
-
}, null, 8, ["search-inputs", "forced-visible-search-inputs"])) :
|
|
1221
|
+
"search-inputs": e(t).searchInputsWithoutGlobal,
|
|
1222
|
+
"forced-visible-search-inputs": m.value,
|
|
1223
|
+
"on-change": A,
|
|
1224
|
+
"on-remove": fe
|
|
1225
|
+
}, null, 8, ["search-inputs", "forced-visible-search-inputs"])) : k("", !0)
|
|
1225
1226
|
]),
|
|
1226
|
-
e(
|
|
1227
|
+
e(t).hasEnabledFilters ? (o(), _(Ht, {
|
|
1227
1228
|
key: 0,
|
|
1228
|
-
filters: e(
|
|
1229
|
+
filters: e(t).filters,
|
|
1229
1230
|
"on-filter-change": N
|
|
1230
|
-
}, null, 8, ["filters"])) :
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
class:
|
|
1231
|
+
}, null, 8, ["filters"])) : k("", !0),
|
|
1232
|
+
w(a.$slots, "tableWrapper", { meta: e(L) }, () => [
|
|
1233
|
+
M(ms, {
|
|
1234
|
+
class: x({ "mt-3": !e(q) })
|
|
1234
1235
|
}, {
|
|
1235
|
-
default:
|
|
1236
|
-
|
|
1236
|
+
default: C(() => [
|
|
1237
|
+
w(a.$slots, "table", {}, () => [
|
|
1237
1238
|
r("table", _s, [
|
|
1238
1239
|
r("thead", $s, [
|
|
1239
|
-
|
|
1240
|
+
w(a.$slots, "head", {
|
|
1240
1241
|
show: Q,
|
|
1241
|
-
sortBy:
|
|
1242
|
+
sortBy: oe,
|
|
1242
1243
|
header: ue
|
|
1243
1244
|
}, () => [
|
|
1244
1245
|
r("tr", Cs, [
|
|
1245
|
-
(o(!0),
|
|
1246
|
-
key: `table-${
|
|
1246
|
+
(o(!0), i(B, null, P(e(t).columns, (h) => (o(), _(Ke, {
|
|
1247
|
+
key: `table-${s.name}-header-${h.key}`,
|
|
1247
1248
|
cell: ue(h.key)
|
|
1248
1249
|
}, null, 8, ["cell"]))), 128))
|
|
1249
1250
|
])
|
|
1250
1251
|
])
|
|
1251
1252
|
]),
|
|
1252
1253
|
r("tbody", Ss, [
|
|
1253
|
-
|
|
1254
|
-
(o(!0),
|
|
1255
|
-
key: `table-${
|
|
1256
|
-
class:
|
|
1257
|
-
"bg-gray-50":
|
|
1258
|
-
"hover:bg-gray-100":
|
|
1259
|
-
"hover:bg-gray-50": !
|
|
1254
|
+
w(a.$slots, "body", { show: Q }, () => [
|
|
1255
|
+
(o(!0), i(B, null, P(e(y), (h, g) => (o(), i("tr", {
|
|
1256
|
+
key: `table-${s.name}-row-${g}`,
|
|
1257
|
+
class: x(["", {
|
|
1258
|
+
"bg-gray-50": s.striped && g % 2,
|
|
1259
|
+
"hover:bg-gray-100": s.striped,
|
|
1260
|
+
"hover:bg-gray-50": !s.striped
|
|
1260
1261
|
}]),
|
|
1261
|
-
onClick: (
|
|
1262
|
+
onClick: (b) => he(h, g)
|
|
1262
1263
|
}, [
|
|
1263
|
-
(o(!0),
|
|
1264
|
-
key: `table-${
|
|
1264
|
+
(o(!0), i(B, null, P(e(t).columns, (b) => D((o(), i("td", {
|
|
1265
|
+
key: `table-${s.name}-row-${g}-column-${b.key}`,
|
|
1265
1266
|
class: "px-6 py-4 text-sm text-gray-500 whitespace-nowrap"
|
|
1266
1267
|
}, [
|
|
1267
|
-
|
|
1268
|
-
T(
|
|
1268
|
+
w(a.$slots, `cell(${b.key})`, { item: h }, () => [
|
|
1269
|
+
T(v(h[b.key]), 1)
|
|
1269
1270
|
])
|
|
1270
1271
|
])), [
|
|
1271
|
-
[E, Q(
|
|
1272
|
+
[E, Q(b.key)]
|
|
1272
1273
|
])), 128))
|
|
1273
1274
|
], 10, qs))), 128))
|
|
1274
1275
|
])
|
|
1275
1276
|
])
|
|
1276
1277
|
])
|
|
1277
1278
|
]),
|
|
1278
|
-
|
|
1279
|
+
w(a.$slots, "pagination", {
|
|
1279
1280
|
onClick: K,
|
|
1280
|
-
hasData: e(
|
|
1281
|
-
meta: e(
|
|
1282
|
-
perPageOptions: e(
|
|
1283
|
-
onPerPageChange:
|
|
1281
|
+
hasData: e(W),
|
|
1282
|
+
meta: e(L),
|
|
1283
|
+
perPageOptions: e(t).perPageOptions,
|
|
1284
|
+
onPerPageChange: re
|
|
1284
1285
|
}, () => [
|
|
1285
|
-
|
|
1286
|
+
M(ft, {
|
|
1286
1287
|
"on-click": K,
|
|
1287
|
-
"has-data": e(
|
|
1288
|
-
meta: e(
|
|
1289
|
-
"per-page-options": e(
|
|
1290
|
-
"on-per-page-change":
|
|
1288
|
+
"has-data": e(W),
|
|
1289
|
+
meta: e(L),
|
|
1290
|
+
"per-page-options": e(t).perPageOptions,
|
|
1291
|
+
"on-per-page-change": re
|
|
1291
1292
|
}, null, 8, ["has-data", "meta", "per-page-options"])
|
|
1292
1293
|
])
|
|
1293
1294
|
]),
|
|
@@ -1303,17 +1304,17 @@ const ms = /* @__PURE__ */ cs(ds, [["render", vs]]), bs = ["dusk"], ys = { class
|
|
|
1303
1304
|
export {
|
|
1304
1305
|
X as ButtonWithDropdown,
|
|
1305
1306
|
Ke as HeaderCell,
|
|
1306
|
-
|
|
1307
|
+
ze as OnClickOutside,
|
|
1307
1308
|
ft as Pagination,
|
|
1308
|
-
|
|
1309
|
+
Hs as Table,
|
|
1309
1310
|
mt as TableAddSearchRow,
|
|
1310
1311
|
qt as TableColumns,
|
|
1311
1312
|
Vt as TableFilter,
|
|
1312
1313
|
Ut as TableGlobalSearch,
|
|
1313
|
-
|
|
1314
|
+
is as TableReset,
|
|
1314
1315
|
ns as TableSearchRows,
|
|
1315
1316
|
ms as TableWrapper,
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1317
|
+
de as getTranslations,
|
|
1318
|
+
Ws as setTranslation,
|
|
1319
|
+
Ns as setTranslations
|
|
1319
1320
|
};
|