@jdanino/inertiajs-tables-laravel-query-builder 3.0.0 → 3.0.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.
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 l, normalizeClass as k, unref as e, withModifiers as F, withDirectives as E, vShow as A, resolveDynamicComponent as M, toDisplayString as v, createCommentVNode as x, computed as $, Fragment as B, renderList as P, createTextVNode as j, createVNode as D, nextTick as we, provide as xe, onUnmounted as ke, Transition as _e } from "vue";
|
|
2
2
|
import { createPopper as $e } from "@popperjs/core/lib/popper-lite";
|
|
3
3
|
import Ce from "@popperjs/core/lib/modifiers/preventOverflow";
|
|
4
4
|
import Se from "@popperjs/core/lib/modifiers/flip";
|
|
@@ -9,7 +9,7 @@ import U from "qs";
|
|
|
9
9
|
import Oe from "lodash-es/clone";
|
|
10
10
|
import je from "lodash-es/filter";
|
|
11
11
|
import Te from "lodash-es/findKey";
|
|
12
|
-
import
|
|
12
|
+
import T from "lodash-es/forEach";
|
|
13
13
|
import Le from "lodash-es/isEqual";
|
|
14
14
|
import Ve from "lodash-es/map";
|
|
15
15
|
import Me from "lodash-es/pickBy";
|
|
@@ -65,7 +65,7 @@ const ze = {
|
|
|
65
65
|
function t() {
|
|
66
66
|
f.value = !f.value;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function r() {
|
|
69
69
|
f.value = !1;
|
|
70
70
|
}
|
|
71
71
|
J(f, () => {
|
|
@@ -77,18 +77,18 @@ const ze = {
|
|
|
77
77
|
placement: n.placement,
|
|
78
78
|
modifiers: [Se, Ce]
|
|
79
79
|
});
|
|
80
|
-
}), p({ hide:
|
|
80
|
+
}), p({ hide: r });
|
|
81
81
|
const O = z("activeClasses");
|
|
82
|
-
return (q, y) => (o(), _(ze, { do:
|
|
82
|
+
return (q, y) => (o(), _(ze, { do: r }, {
|
|
83
83
|
default: C(() => [
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
l("div", Ie, [
|
|
85
|
+
l("button", {
|
|
86
86
|
ref_key: "button",
|
|
87
87
|
ref: u,
|
|
88
88
|
type: "button",
|
|
89
89
|
dusk: s.dusk,
|
|
90
90
|
disabled: s.disabled,
|
|
91
|
-
class:
|
|
91
|
+
class: k(["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
92
|
[e(O).border]: n.active,
|
|
93
93
|
"border-gray-300": !n.active,
|
|
94
94
|
"cursor-not-allowed": n.disabled
|
|
@@ -98,16 +98,16 @@ const ze = {
|
|
|
98
98
|
}, [
|
|
99
99
|
w(q.$slots, "button")
|
|
100
100
|
], 10, Re),
|
|
101
|
-
|
|
101
|
+
E(l("div", {
|
|
102
102
|
ref_key: "tooltip",
|
|
103
103
|
ref: m,
|
|
104
104
|
class: "absolute z-10"
|
|
105
105
|
}, [
|
|
106
|
-
|
|
106
|
+
l("div", De, [
|
|
107
107
|
w(q.$slots, "default")
|
|
108
108
|
])
|
|
109
109
|
], 512), [
|
|
110
|
-
[
|
|
110
|
+
[A, f.value]
|
|
111
111
|
])
|
|
112
112
|
])
|
|
113
113
|
]),
|
|
@@ -118,11 +118,11 @@ const ze = {
|
|
|
118
118
|
key: 0,
|
|
119
119
|
fill: "currentColor",
|
|
120
120
|
d: "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z"
|
|
121
|
-
},
|
|
121
|
+
}, Ge = {
|
|
122
122
|
key: 1,
|
|
123
123
|
fill: "currentColor",
|
|
124
124
|
d: "M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"
|
|
125
|
-
},
|
|
125
|
+
}, He = {
|
|
126
126
|
key: 2,
|
|
127
127
|
fill: "currentColor",
|
|
128
128
|
d: "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"
|
|
@@ -139,22 +139,22 @@ const ze = {
|
|
|
139
139
|
function f() {
|
|
140
140
|
p.cell.sortable && p.cell.onSort(p.cell.key);
|
|
141
141
|
}
|
|
142
|
-
return (d, t) =>
|
|
143
|
-
(o(), _(
|
|
142
|
+
return (d, t) => E((o(), i("th", null, [
|
|
143
|
+
(o(), _(M(s.cell.sortable ? "button" : "div"), {
|
|
144
144
|
class: "py-3 px-6 w-full",
|
|
145
145
|
dusk: s.cell.sortable ? `sort-${s.cell.key}` : null,
|
|
146
146
|
onClick: F(f, ["prevent"])
|
|
147
147
|
}, {
|
|
148
148
|
default: C(() => [
|
|
149
|
-
|
|
149
|
+
l("span", Ee, [
|
|
150
150
|
w(d.$slots, "label", {}, () => [
|
|
151
|
-
|
|
151
|
+
l("span", Ae, v(s.cell.label), 1)
|
|
152
152
|
]),
|
|
153
153
|
w(d.$slots, "sort", {}, () => [
|
|
154
154
|
s.cell.sortable ? (o(), i("svg", {
|
|
155
155
|
key: 0,
|
|
156
156
|
"aria-hidden": "true",
|
|
157
|
-
class:
|
|
157
|
+
class: k(["w-3 h-3 ml-2", {
|
|
158
158
|
"text-gray-400": !s.cell.sorted,
|
|
159
159
|
[e(n).text]: s.cell.sorted
|
|
160
160
|
}]),
|
|
@@ -162,17 +162,17 @@ const ze = {
|
|
|
162
162
|
viewBox: "0 0 320 512",
|
|
163
163
|
sorted: s.cell.sorted
|
|
164
164
|
}, [
|
|
165
|
-
s.cell.sorted ?
|
|
166
|
-
s.cell.sorted === "asc" ? (o(), i("path",
|
|
167
|
-
s.cell.sorted === "desc" ? (o(), i("path",
|
|
168
|
-
], 10, We)) :
|
|
165
|
+
s.cell.sorted ? x("", !0) : (o(), i("path", Ne)),
|
|
166
|
+
s.cell.sorted === "asc" ? (o(), i("path", Ge)) : x("", !0),
|
|
167
|
+
s.cell.sorted === "desc" ? (o(), i("path", He)) : x("", !0)
|
|
168
|
+
], 10, We)) : x("", !0)
|
|
169
169
|
])
|
|
170
170
|
])
|
|
171
171
|
]),
|
|
172
172
|
_: 3
|
|
173
173
|
}, 8, ["dusk", "onClick"]))
|
|
174
174
|
], 512)), [
|
|
175
|
-
[
|
|
175
|
+
[A, !s.cell.hidden]
|
|
176
176
|
]);
|
|
177
177
|
}
|
|
178
178
|
}, Z = {
|
|
@@ -189,10 +189,10 @@ const ze = {
|
|
|
189
189
|
function de() {
|
|
190
190
|
return Z.translations;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Hs(s, p) {
|
|
193
193
|
Z.translations[s] = p;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ks(s) {
|
|
196
196
|
Z.translations = s;
|
|
197
197
|
}
|
|
198
198
|
const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
@@ -223,25 +223,25 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
223
223
|
setup(s) {
|
|
224
224
|
const p = s, n = de(), f = $(() => {
|
|
225
225
|
let d = [...p.options];
|
|
226
|
-
return d.push(parseInt(p.value)), qe(d).sort((t,
|
|
226
|
+
return d.push(parseInt(p.value)), qe(d).sort((t, r) => t - r);
|
|
227
227
|
});
|
|
228
228
|
return (d, t) => (o(), i("select", {
|
|
229
229
|
name: "per_page",
|
|
230
230
|
dusk: s.dusk,
|
|
231
231
|
value: s.value,
|
|
232
232
|
class: "block focus:ring-indigo-500 focus:border-indigo-500 min-w-max shadow-sm text-sm border-gray-300 rounded-md",
|
|
233
|
-
onChange: t[0] || (t[0] = (
|
|
233
|
+
onChange: t[0] || (t[0] = (r) => s.onChange(r.target.value))
|
|
234
234
|
}, [
|
|
235
|
-
(o(!0), i(B, null, P(e(f), (
|
|
236
|
-
key:
|
|
237
|
-
value:
|
|
238
|
-
}, v(
|
|
235
|
+
(o(!0), i(B, null, P(e(f), (r) => (o(), i("option", {
|
|
236
|
+
key: r,
|
|
237
|
+
value: r
|
|
238
|
+
}, v(r) + " " + v(e(n).per_page), 9, Ue))), 128))
|
|
239
239
|
], 40, Qe));
|
|
240
240
|
}
|
|
241
241
|
}, Ye = {
|
|
242
242
|
key: 0,
|
|
243
243
|
class: "bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6"
|
|
244
|
-
}, Je = { key: 0 }, Xe = /* @__PURE__ */
|
|
244
|
+
}, Je = { key: 0 }, Xe = /* @__PURE__ */ l("svg", {
|
|
245
245
|
xmlns: "http://www.w3.org/2000/svg",
|
|
246
246
|
class: "h-5 w-5 text-gray-400",
|
|
247
247
|
fill: "none",
|
|
@@ -249,12 +249,12 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
249
249
|
stroke: "currentColor",
|
|
250
250
|
"stroke-width": "2"
|
|
251
251
|
}, [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ l("path", {
|
|
253
253
|
"stroke-linecap": "round",
|
|
254
254
|
"stroke-linejoin": "round",
|
|
255
255
|
d: "M7 16l-4-4m0 0l4-4m-4 4h18"
|
|
256
256
|
})
|
|
257
|
-
], -1), Ze = { class: "hidden sm:inline ml-2" }, et = { class: "hidden sm:inline mr-2" }, tt = /* @__PURE__ */
|
|
257
|
+
], -1), Ze = { class: "hidden sm:inline ml-2" }, et = { class: "hidden sm:inline mr-2" }, tt = /* @__PURE__ */ l("svg", {
|
|
258
258
|
xmlns: "http://www.w3.org/2000/svg",
|
|
259
259
|
class: "h-5 w-5 text-gray-400",
|
|
260
260
|
fill: "none",
|
|
@@ -262,7 +262,7 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
262
262
|
stroke: "currentColor",
|
|
263
263
|
"stroke-width": "2"
|
|
264
264
|
}, [
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ l("path", {
|
|
266
266
|
"stroke-linecap": "round",
|
|
267
267
|
"stroke-linejoin": "round",
|
|
268
268
|
d: "M17 8l4 4m0 0l-4 4m4-4H3"
|
|
@@ -273,24 +273,24 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
273
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 = {
|
|
274
274
|
class: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px",
|
|
275
275
|
"aria-label": "Pagination"
|
|
276
|
-
}, it = { class: "sr-only" }, ct = /* @__PURE__ */
|
|
276
|
+
}, it = { class: "sr-only" }, ct = /* @__PURE__ */ l("svg", {
|
|
277
277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
278
278
|
class: "h-5 w-5",
|
|
279
279
|
viewBox: "0 0 20 20",
|
|
280
280
|
fill: "currentColor"
|
|
281
281
|
}, [
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ l("path", {
|
|
283
283
|
"fill-rule": "evenodd",
|
|
284
284
|
d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",
|
|
285
285
|
"clip-rule": "evenodd"
|
|
286
286
|
})
|
|
287
|
-
], -1), dt = { class: "sr-only" }, ht = /* @__PURE__ */
|
|
287
|
+
], -1), dt = { class: "sr-only" }, ht = /* @__PURE__ */ l("svg", {
|
|
288
288
|
xmlns: "http://www.w3.org/2000/svg",
|
|
289
289
|
class: "h-5 w-5",
|
|
290
290
|
viewBox: "0 0 20 20",
|
|
291
291
|
fill: "currentColor"
|
|
292
292
|
}, [
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ l("path", {
|
|
294
294
|
"fill-rule": "evenodd",
|
|
295
295
|
d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
|
|
296
296
|
"clip-rule": "evenodd"
|
|
@@ -327,36 +327,37 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
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),
|
|
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.value.total > 1), t = $(() => p.meta), r = $(() => "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
331
|
return (O, q) => e(d) ? (o(), i("nav", Ye, [
|
|
332
|
-
|
|
332
|
+
j(v(e(d)) + " ", 1),
|
|
333
|
+
!s.hasData || e(t).total < 1 ? (o(), i("p", Je, v(e(n).no_results_found), 1)) : x("", !0),
|
|
333
334
|
s.hasData ? (o(), i("div", {
|
|
334
335
|
key: 1,
|
|
335
|
-
class:
|
|
336
|
+
class: k(["flex-1 flex justify-between", { "sm:hidden": e(f) }])
|
|
336
337
|
}, [
|
|
337
|
-
(o(), _(
|
|
338
|
-
class:
|
|
339
|
-
"cursor-not-allowed text-gray-400": !e(
|
|
340
|
-
"text-gray-700 hover:text-gray-500": e(
|
|
338
|
+
(o(), _(M(e(r) ? "a" : "div"), {
|
|
339
|
+
class: k([{
|
|
340
|
+
"cursor-not-allowed text-gray-400": !e(r),
|
|
341
|
+
"text-gray-700 hover:text-gray-500": e(r)
|
|
341
342
|
}, "relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md bg-white"]),
|
|
342
|
-
href: e(
|
|
343
|
-
dusk: e(
|
|
344
|
-
onClick: q[0] || (q[0] = F((y) => s.onClick(e(
|
|
343
|
+
href: e(r),
|
|
344
|
+
dusk: e(r) ? "pagination-simple-previous" : null,
|
|
345
|
+
onClick: q[0] || (q[0] = F((y) => s.onClick(e(r)), ["prevent"]))
|
|
345
346
|
}, {
|
|
346
347
|
default: C(() => [
|
|
347
348
|
Xe,
|
|
348
|
-
|
|
349
|
+
l("span", Ze, v(e(n).previous), 1)
|
|
349
350
|
]),
|
|
350
351
|
_: 1
|
|
351
352
|
}, 8, ["class", "href", "dusk"])),
|
|
352
|
-
|
|
353
|
+
D(ce, {
|
|
353
354
|
dusk: "per-page-mobile",
|
|
354
355
|
value: e(m),
|
|
355
356
|
options: s.perPageOptions,
|
|
356
357
|
"on-change": s.onPerPageChange
|
|
357
358
|
}, null, 8, ["value", "options", "on-change"]),
|
|
358
|
-
(o(), _(
|
|
359
|
-
class:
|
|
359
|
+
(o(), _(M(e(u) ? "a" : "div"), {
|
|
360
|
+
class: k([{
|
|
360
361
|
"cursor-not-allowed text-gray-400": !e(u),
|
|
361
362
|
"text-gray-700 hover:text-gray-500": e(u)
|
|
362
363
|
}, "ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md bg-white"]),
|
|
@@ -365,68 +366,68 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
365
366
|
onClick: q[1] || (q[1] = F((y) => s.onClick(e(u)), ["prevent"]))
|
|
366
367
|
}, {
|
|
367
368
|
default: C(() => [
|
|
368
|
-
|
|
369
|
+
l("span", et, v(e(n).next), 1),
|
|
369
370
|
tt
|
|
370
371
|
]),
|
|
371
372
|
_: 1
|
|
372
373
|
}, 8, ["class", "href", "dusk"]))
|
|
373
|
-
], 2)) :
|
|
374
|
+
], 2)) : x("", !0),
|
|
374
375
|
s.hasData && e(f) ? (o(), i("div", st, [
|
|
375
|
-
|
|
376
|
-
|
|
376
|
+
l("div", lt, [
|
|
377
|
+
D(ce, {
|
|
377
378
|
dusk: "per-page-full",
|
|
378
379
|
value: e(m),
|
|
379
380
|
options: s.perPageOptions,
|
|
380
381
|
"on-change": s.onPerPageChange
|
|
381
382
|
}, null, 8, ["value", "options", "on-change"]),
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
383
|
+
l("p", rt, [
|
|
384
|
+
l("span", nt, v(e(t).from), 1),
|
|
385
|
+
j(" " + v(e(n).to) + " ", 1),
|
|
386
|
+
l("span", at, v(e(t).to), 1),
|
|
387
|
+
j(" " + v(e(n).of) + " ", 1),
|
|
388
|
+
l("span", ot, v(e(t).total), 1),
|
|
389
|
+
j(" " + v(e(n).results), 1)
|
|
389
390
|
])
|
|
390
391
|
]),
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
(o(), _(
|
|
394
|
-
class:
|
|
395
|
-
"cursor-not-allowed text-gray-400": !e(
|
|
396
|
-
"text-gray-500 hover:bg-gray-50": e(
|
|
392
|
+
l("div", null, [
|
|
393
|
+
l("nav", ut, [
|
|
394
|
+
(o(), _(M(e(r) ? "a" : "div"), {
|
|
395
|
+
class: k([{
|
|
396
|
+
"cursor-not-allowed text-gray-400": !e(r),
|
|
397
|
+
"text-gray-500 hover:bg-gray-50": e(r)
|
|
397
398
|
}, "relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium"]),
|
|
398
|
-
href: e(
|
|
399
|
-
dusk: e(
|
|
400
|
-
onClick: q[2] || (q[2] = F((y) => s.onClick(e(
|
|
399
|
+
href: e(r),
|
|
400
|
+
dusk: e(r) ? "pagination-previous" : null,
|
|
401
|
+
onClick: q[2] || (q[2] = F((y) => s.onClick(e(r)), ["prevent"]))
|
|
401
402
|
}, {
|
|
402
403
|
default: C(() => [
|
|
403
|
-
|
|
404
|
+
l("span", it, v(e(n).previous), 1),
|
|
404
405
|
ct
|
|
405
406
|
]),
|
|
406
407
|
_: 1
|
|
407
408
|
}, 8, ["class", "href", "dusk"])),
|
|
408
|
-
(o(!0), i(B, null, P(e(t).links, (y,
|
|
409
|
+
(o(!0), i(B, null, P(e(t).links, (y, V) => (o(), i("div", { key: V }, [
|
|
409
410
|
w(O.$slots, "link", {}, () => [
|
|
410
|
-
!isNaN(y.label) || y.label === "..." ? (o(), _(
|
|
411
|
+
!isNaN(y.label) || y.label === "..." ? (o(), _(M(y.url ? "a" : "div"), {
|
|
411
412
|
key: 0,
|
|
412
413
|
href: y.url,
|
|
413
414
|
dusk: y.url ? `pagination-${y.label}` : null,
|
|
414
|
-
class:
|
|
415
|
+
class: k(["relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700", {
|
|
415
416
|
"cursor-not-allowed": !y.url,
|
|
416
417
|
"hover:bg-gray-50": y.url,
|
|
417
418
|
"bg-gray-100": y.active
|
|
418
419
|
}]),
|
|
419
|
-
onClick: F((
|
|
420
|
+
onClick: F((L) => s.onClick(y.url), ["prevent"])
|
|
420
421
|
}, {
|
|
421
422
|
default: C(() => [
|
|
422
|
-
|
|
423
|
+
j(v(y.label), 1)
|
|
423
424
|
]),
|
|
424
425
|
_: 2
|
|
425
|
-
}, 1032, ["href", "dusk", "class", "onClick"])) :
|
|
426
|
+
}, 1032, ["href", "dusk", "class", "onClick"])) : x("", !0)
|
|
426
427
|
])
|
|
427
428
|
]))), 128)),
|
|
428
|
-
(o(), _(
|
|
429
|
-
class:
|
|
429
|
+
(o(), _(M(e(u) ? "a" : "div"), {
|
|
430
|
+
class: k([{
|
|
430
431
|
"cursor-not-allowed text-gray-400": !e(u),
|
|
431
432
|
"text-gray-500 hover:bg-gray-50": e(u)
|
|
432
433
|
}, "relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium"]),
|
|
@@ -435,23 +436,23 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
435
436
|
onClick: q[3] || (q[3] = F((y) => s.onClick(e(u)), ["prevent"]))
|
|
436
437
|
}, {
|
|
437
438
|
default: C(() => [
|
|
438
|
-
|
|
439
|
+
l("span", dt, v(e(n).next), 1),
|
|
439
440
|
ht
|
|
440
441
|
]),
|
|
441
442
|
_: 1
|
|
442
443
|
}, 8, ["class", "href", "dusk"]))
|
|
443
444
|
])
|
|
444
445
|
])
|
|
445
|
-
])) :
|
|
446
|
-
])) :
|
|
446
|
+
])) : x("", !0)
|
|
447
|
+
])) : x("", !0);
|
|
447
448
|
}
|
|
448
|
-
}, pt = /* @__PURE__ */
|
|
449
|
+
}, pt = /* @__PURE__ */ l("svg", {
|
|
449
450
|
xmlns: "http://www.w3.org/2000/svg",
|
|
450
451
|
class: "h-5 w-5 text-gray-400",
|
|
451
452
|
viewBox: "0 0 20 20",
|
|
452
453
|
fill: "currentColor"
|
|
453
454
|
}, [
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ l("path", {
|
|
455
456
|
"fill-rule": "evenodd",
|
|
456
457
|
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",
|
|
457
458
|
"clip-rule": "evenodd"
|
|
@@ -493,20 +494,20 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
493
494
|
pt
|
|
494
495
|
]),
|
|
495
496
|
default: C(() => [
|
|
496
|
-
|
|
497
|
-
(o(!0), i(B, null, P(s.searchInputs, (
|
|
497
|
+
l("div", vt, [
|
|
498
|
+
(o(!0), i(B, null, P(s.searchInputs, (r, u) => (o(), i("button", {
|
|
498
499
|
key: u,
|
|
499
|
-
dusk: `add-search-row-${
|
|
500
|
+
dusk: `add-search-row-${r.key}`,
|
|
500
501
|
class: "text-left w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900",
|
|
501
502
|
role: "menuitem",
|
|
502
|
-
onClick: F((m) => f(
|
|
503
|
-
}, v(
|
|
503
|
+
onClick: F((m) => f(r.key), ["prevent"])
|
|
504
|
+
}, v(r.label), 9, gt))), 128))
|
|
504
505
|
])
|
|
505
506
|
]),
|
|
506
507
|
_: 1
|
|
507
508
|
}, 8, ["disabled"]));
|
|
508
509
|
}
|
|
509
|
-
}, bt = /* @__PURE__ */
|
|
510
|
+
}, bt = /* @__PURE__ */ l("path", { d: "M10 12a2 2 0 100-4 2 2 0 000 4z" }, null, -1), yt = /* @__PURE__ */ l("path", {
|
|
510
511
|
"fill-rule": "evenodd",
|
|
511
512
|
d: "M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",
|
|
512
513
|
"clip-rule": "evenodd"
|
|
@@ -518,7 +519,7 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
518
519
|
"aria-orientation": "horizontal",
|
|
519
520
|
"aria-labelledby": "toggle-columns-menu",
|
|
520
521
|
class: "min-w-max"
|
|
521
|
-
}, kt = { class: "px-2" }, _t = { class: "divide-y divide-gray-200" }, $t = { class: "text-sm text-gray-900" }, Ct = ["aria-pressed", "aria-labelledby", "aria-describedby", "dusk", "onClick"], St = /* @__PURE__ */
|
|
522
|
+
}, kt = { class: "px-2" }, _t = { class: "divide-y divide-gray-200" }, $t = { class: "text-sm text-gray-900" }, Ct = ["aria-pressed", "aria-labelledby", "aria-describedby", "dusk", "onClick"], St = /* @__PURE__ */ l("span", { class: "sr-only" }, "Column status", -1), qt = {
|
|
522
523
|
__name: "TableColumns",
|
|
523
524
|
props: {
|
|
524
525
|
columns: {
|
|
@@ -544,7 +545,7 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
544
545
|
button: C(() => [
|
|
545
546
|
(o(), i("svg", {
|
|
546
547
|
xmlns: "http://www.w3.org/2000/svg",
|
|
547
|
-
class:
|
|
548
|
+
class: k(["h-5 w-5", {
|
|
548
549
|
"text-gray-400": !s.hasHiddenColumns,
|
|
549
550
|
[e(n).text]: s.hasHiddenColumns
|
|
550
551
|
}]),
|
|
@@ -553,17 +554,17 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
553
554
|
}, wt, 2))
|
|
554
555
|
]),
|
|
555
556
|
default: C(() => [
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
(o(!0), i(B, null, P(p.columns, (t,
|
|
560
|
-
key:
|
|
557
|
+
l("div", xt, [
|
|
558
|
+
l("div", kt, [
|
|
559
|
+
l("ul", _t, [
|
|
560
|
+
(o(!0), i(B, null, P(p.columns, (t, r) => E((o(), i("li", {
|
|
561
|
+
key: r,
|
|
561
562
|
class: "py-2 flex items-center justify-between"
|
|
562
563
|
}, [
|
|
563
|
-
|
|
564
|
-
|
|
564
|
+
l("p", $t, v(t.label), 1),
|
|
565
|
+
l("button", {
|
|
565
566
|
type: "button",
|
|
566
|
-
class:
|
|
567
|
+
class: k(["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
568
|
"bg-green-500": !t.hidden,
|
|
568
569
|
"bg-gray-200": t.hidden
|
|
569
570
|
}]),
|
|
@@ -574,16 +575,16 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
574
575
|
onClick: F((u) => s.onChange(t.key, t.hidden), ["prevent"])
|
|
575
576
|
}, [
|
|
576
577
|
St,
|
|
577
|
-
|
|
578
|
+
l("span", {
|
|
578
579
|
"aria-hidden": "true",
|
|
579
|
-
class:
|
|
580
|
+
class: k([{
|
|
580
581
|
"translate-x-5": !t.hidden,
|
|
581
582
|
"translate-x-0": t.hidden
|
|
582
583
|
}, "inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"])
|
|
583
584
|
}, null, 2)
|
|
584
585
|
], 10, Ct)
|
|
585
586
|
])), [
|
|
586
|
-
[
|
|
587
|
+
[A, t.can_be_hidden]
|
|
587
588
|
])), 128))
|
|
588
589
|
])
|
|
589
590
|
])
|
|
@@ -592,7 +593,7 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
592
593
|
_: 1
|
|
593
594
|
}, 8, ["active"]));
|
|
594
595
|
}
|
|
595
|
-
}, Ft = /* @__PURE__ */
|
|
596
|
+
}, Ft = /* @__PURE__ */ l("path", {
|
|
596
597
|
"fill-rule": "evenodd",
|
|
597
598
|
d: "M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z",
|
|
598
599
|
"clip-rule": "evenodd"
|
|
@@ -602,7 +603,7 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
602
603
|
role: "menu",
|
|
603
604
|
"aria-orientation": "horizontal",
|
|
604
605
|
"aria-labelledby": "filter-menu",
|
|
605
|
-
class: "min-w-
|
|
606
|
+
class: "min-w-[320px]"
|
|
606
607
|
}, Ot = { class: "text-xs uppercase tracking-wide bg-gray-100 p-3" }, jt = { class: "p-2" }, Tt = ["name", "value", "onChange"], Lt = ["value"], Vt = {
|
|
607
608
|
__name: "TableFilter",
|
|
608
609
|
props: {
|
|
@@ -629,7 +630,7 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
629
630
|
button: C(() => [
|
|
630
631
|
(o(), i("svg", {
|
|
631
632
|
xmlns: "http://www.w3.org/2000/svg",
|
|
632
|
-
class:
|
|
633
|
+
class: k(["h-5 w-5", {
|
|
633
634
|
"text-gray-400": !s.hasEnabledFilters,
|
|
634
635
|
[e(p).text]: s.hasEnabledFilters
|
|
635
636
|
}]),
|
|
@@ -638,22 +639,22 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
638
639
|
}, Bt, 2))
|
|
639
640
|
]),
|
|
640
641
|
default: C(() => [
|
|
641
|
-
|
|
642
|
+
l("div", Pt, [
|
|
642
643
|
(o(!0), i(B, null, P(s.filters, (d, t) => (o(), i("div", { key: t }, [
|
|
643
|
-
|
|
644
|
-
|
|
644
|
+
l("h3", Ot, v(d.label), 1),
|
|
645
|
+
l("div", jt, [
|
|
645
646
|
d.type === "select" ? (o(), i("select", {
|
|
646
647
|
key: 0,
|
|
647
648
|
name: d.key,
|
|
648
649
|
value: d.value,
|
|
649
650
|
class: "block focus:ring-indigo-500 focus:border-indigo-500 w-full shadow-sm text-sm border-gray-300 rounded-md",
|
|
650
|
-
onChange: (
|
|
651
|
+
onChange: (r) => s.onFilterChange(d.key, r.target.value)
|
|
651
652
|
}, [
|
|
652
|
-
(o(!0), i(B, null, P(d.options, (
|
|
653
|
+
(o(!0), i(B, null, P(d.options, (r, u) => (o(), i("option", {
|
|
653
654
|
key: u,
|
|
654
655
|
value: u
|
|
655
|
-
}, v(
|
|
656
|
-
], 40, Tt)) :
|
|
656
|
+
}, v(r), 9, Lt))), 128))
|
|
657
|
+
], 40, Tt)) : x("", !0)
|
|
657
658
|
])
|
|
658
659
|
]))), 128))
|
|
659
660
|
])
|
|
@@ -661,24 +662,24 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
661
662
|
_: 1
|
|
662
663
|
}, 8, ["active"]));
|
|
663
664
|
}
|
|
664
|
-
}, Mt = { class: "flex items-center justify-start my-3 text-sm" }, zt = { class: "flex items-center" }, It = /* @__PURE__ */
|
|
665
|
+
}, Mt = { class: "flex items-center justify-start my-3 text-sm" }, zt = { class: "flex items-center" }, It = /* @__PURE__ */ l("svg", {
|
|
665
666
|
xmlns: "http://www.w3.org/2000/svg",
|
|
666
667
|
class: "h-5 w-5 text-gray-300",
|
|
667
668
|
viewBox: "0 0 20 20",
|
|
668
669
|
fill: "currentColor"
|
|
669
670
|
}, [
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ l("path", {
|
|
671
672
|
"fill-rule": "evenodd",
|
|
672
673
|
d: "M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z",
|
|
673
674
|
"clip-rule": "evenodd"
|
|
674
675
|
})
|
|
675
|
-
], -1), Rt = { class: "text-gray-400 ml-1" }, Dt = ["textContent"], Et = ["onClick"], At = { class: "ml-1" }, Wt = /* @__PURE__ */
|
|
676
|
+
], -1), Rt = { class: "text-gray-400 ml-1" }, Dt = ["textContent"], Et = ["onClick"], At = { class: "ml-1" }, Wt = /* @__PURE__ */ l("path", {
|
|
676
677
|
"fill-rule": "evenodd",
|
|
677
678
|
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",
|
|
678
679
|
"clip-rule": "evenodd"
|
|
679
680
|
}, null, -1), Nt = [
|
|
680
681
|
Wt
|
|
681
|
-
],
|
|
682
|
+
], Gt = {
|
|
682
683
|
__name: "TableActiveFilters",
|
|
683
684
|
props: {
|
|
684
685
|
filters: {
|
|
@@ -692,29 +693,29 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
692
693
|
},
|
|
693
694
|
setup(s) {
|
|
694
695
|
const p = s, n = z("activeClasses"), f = $(() => p.filters.filter((t) => t.value !== null)), d = $(() => f.value.length);
|
|
695
|
-
return (t,
|
|
696
|
-
|
|
696
|
+
return (t, r) => (o(), i("div", Mt, [
|
|
697
|
+
l("div", zt, [
|
|
697
698
|
It,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
699
|
+
l("span", Rt, [
|
|
700
|
+
j(v(e(d)) + " active ", 1),
|
|
701
|
+
l("span", {
|
|
701
702
|
textContent: v(e(d) === 1 ? "filter" : "filters")
|
|
702
703
|
}, null, 8, Dt),
|
|
703
|
-
|
|
704
|
+
j(":")
|
|
704
705
|
])
|
|
705
706
|
]),
|
|
706
707
|
(o(!0), i(B, null, P(e(f), (u) => (o(), i("button", {
|
|
707
708
|
key: u.label,
|
|
708
|
-
class:
|
|
709
|
+
class: k(["block group ml-3 flex items-center justify-between px-2 py-1 rounded bg-gray-100", `hover:${e(n).text}`]),
|
|
709
710
|
onClick: (m) => s.onFilterChange(u.key, null)
|
|
710
711
|
}, [
|
|
711
|
-
|
|
712
|
-
class:
|
|
712
|
+
l("span", {
|
|
713
|
+
class: k(["capitalize text-gray-500", `group-hover:${e(n).text}`])
|
|
713
714
|
}, v(u.label.replace("_", " ")), 3),
|
|
714
|
-
|
|
715
|
-
|
|
715
|
+
j(":"),
|
|
716
|
+
l("span", At, v(u.options[u.value]), 1),
|
|
716
717
|
(o(), i("svg", {
|
|
717
|
-
class:
|
|
718
|
+
class: k([`group-hover:${e(n).text}`, "h-4 w-4 ml-1 text-gray-400"]),
|
|
718
719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
719
720
|
viewBox: "0 0 20 20",
|
|
720
721
|
fill: "currentColor"
|
|
@@ -722,14 +723,14 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
722
723
|
], 10, Et))), 128))
|
|
723
724
|
]));
|
|
724
725
|
}
|
|
725
|
-
},
|
|
726
|
-
/* @__PURE__ */
|
|
726
|
+
}, Ht = { class: "relative" }, Kt = ["placeholder", "value"], Qt = /* @__PURE__ */ l("div", { class: "absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none" }, [
|
|
727
|
+
/* @__PURE__ */ l("svg", {
|
|
727
728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
728
729
|
class: "w-5 h-5 text-gray-400",
|
|
729
730
|
viewBox: "0 0 20 20",
|
|
730
731
|
fill: "currentColor"
|
|
731
732
|
}, [
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ l("path", {
|
|
733
734
|
"fill-rule": "evenodd",
|
|
734
735
|
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",
|
|
735
736
|
"clip-rule": "evenodd"
|
|
@@ -755,9 +756,9 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
755
756
|
},
|
|
756
757
|
setup(s) {
|
|
757
758
|
const p = z("activeClasses");
|
|
758
|
-
return (n, f) => (o(), i("div",
|
|
759
|
-
|
|
760
|
-
class:
|
|
759
|
+
return (n, f) => (o(), i("div", Ht, [
|
|
760
|
+
l("input", {
|
|
761
|
+
class: k(["block w-full text-sm border-gray-300 rounded-md shadow-sm pl-9", [e(p).focusRing, e(p).focusBorder]]),
|
|
761
762
|
placeholder: s.label,
|
|
762
763
|
value: s.value,
|
|
763
764
|
type: "text",
|
|
@@ -767,25 +768,25 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
767
768
|
Qt
|
|
768
769
|
]));
|
|
769
770
|
}
|
|
770
|
-
}, Yt = { class: "flex rounded-md shadow-sm relative mt-3" }, Jt = ["for"], Xt = /* @__PURE__ */
|
|
771
|
+
}, Yt = { class: "flex rounded-md shadow-sm relative mt-3" }, Jt = ["for"], Xt = /* @__PURE__ */ l("svg", {
|
|
771
772
|
xmlns: "http://www.w3.org/2000/svg",
|
|
772
773
|
class: "h-5 w-5 mr-2 text-gray-400",
|
|
773
774
|
viewBox: "0 0 20 20",
|
|
774
775
|
fill: "currentColor"
|
|
775
776
|
}, [
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
+
/* @__PURE__ */ l("path", {
|
|
777
778
|
"fill-rule": "evenodd",
|
|
778
779
|
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",
|
|
779
780
|
"clip-rule": "evenodd"
|
|
780
781
|
})
|
|
781
|
-
], -1), Zt = ["id", "name", "value", "onInput"], es = { class: "absolute inset-y-0 right-0 pr-3 flex items-center" }, ts = ["dusk", "onClick"], ss = /* @__PURE__ */
|
|
782
|
+
], -1), Zt = ["id", "name", "value", "onInput"], es = { class: "absolute inset-y-0 right-0 pr-3 flex items-center" }, ts = ["dusk", "onClick"], ss = /* @__PURE__ */ l("span", { class: "sr-only" }, "Remove search", -1), ls = /* @__PURE__ */ l("svg", {
|
|
782
783
|
xmlns: "http://www.w3.org/2000/svg",
|
|
783
784
|
class: "h-5 w-5",
|
|
784
785
|
fill: "none",
|
|
785
786
|
viewBox: "0 0 24 24",
|
|
786
787
|
stroke: "currentColor"
|
|
787
788
|
}, [
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ l("path", {
|
|
789
790
|
"stroke-linecap": "round",
|
|
790
791
|
"stroke-linejoin": "round",
|
|
791
792
|
"stroke-width": "2",
|
|
@@ -821,22 +822,22 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
821
822
|
return p.forcedVisibleSearchInputs.includes(t);
|
|
822
823
|
}
|
|
823
824
|
return J(p.forcedVisibleSearchInputs, (t) => {
|
|
824
|
-
const
|
|
825
|
-
!
|
|
826
|
-
const u = Fe(f.value, (m) => m.__vnode.key ===
|
|
825
|
+
const r = t.length > 0 ? t[t.length - 1] : null;
|
|
826
|
+
!r || we().then(() => {
|
|
827
|
+
const u = Fe(f.value, (m) => m.__vnode.key === r);
|
|
827
828
|
u && u.focus();
|
|
828
829
|
});
|
|
829
|
-
}, { immediate: !0 }), (t,
|
|
830
|
+
}, { immediate: !0 }), (t, r) => (o(!0), i(B, null, P(s.searchInputs, (u, m) => E((o(), i("div", {
|
|
830
831
|
key: m,
|
|
831
832
|
class: "px-4 sm:px-0"
|
|
832
833
|
}, [
|
|
833
|
-
|
|
834
|
-
|
|
834
|
+
l("div", Yt, [
|
|
835
|
+
l("label", {
|
|
835
836
|
for: u.key,
|
|
836
837
|
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"
|
|
837
838
|
}, [
|
|
838
839
|
Xt,
|
|
839
|
-
|
|
840
|
+
l("span", null, v(u.label), 1)
|
|
840
841
|
], 8, Jt),
|
|
841
842
|
(o(), i("input", {
|
|
842
843
|
id: u.key,
|
|
@@ -849,8 +850,8 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
849
850
|
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",
|
|
850
851
|
onInput: (O) => s.onChange(u.key, O.target.value)
|
|
851
852
|
}, null, 40, Zt)),
|
|
852
|
-
|
|
853
|
-
|
|
853
|
+
l("div", es, [
|
|
854
|
+
l("button", {
|
|
854
855
|
class: "rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",
|
|
855
856
|
dusk: `remove-search-row-${u.key}`,
|
|
856
857
|
onClick: F((O) => s.onRemove(u.key), ["prevent"])
|
|
@@ -858,21 +859,21 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
858
859
|
])
|
|
859
860
|
])
|
|
860
861
|
])), [
|
|
861
|
-
[
|
|
862
|
+
[A, u.value !== null || d(u.key)]
|
|
862
863
|
])), 128));
|
|
863
864
|
}
|
|
864
|
-
}, as = /* @__PURE__ */
|
|
865
|
+
}, as = /* @__PURE__ */ l("svg", {
|
|
865
866
|
xmlns: "http://www.w3.org/2000/svg",
|
|
866
867
|
class: "h-5 w-5 mr-2 text-gray-400",
|
|
867
868
|
viewBox: "0 0 20 20",
|
|
868
869
|
fill: "currentColor"
|
|
869
870
|
}, [
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ l("path", {
|
|
871
872
|
"fill-rule": "evenodd",
|
|
872
873
|
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",
|
|
873
874
|
"clip-rule": "evenodd"
|
|
874
875
|
})
|
|
875
|
-
], -1), os = /* @__PURE__ */
|
|
876
|
+
], -1), os = /* @__PURE__ */ l("span", null, "Reset", -1), us = [
|
|
876
877
|
as,
|
|
877
878
|
os
|
|
878
879
|
], is = {
|
|
@@ -901,9 +902,9 @@ const Qe = ["dusk", "value"], Ue = ["value"], ce = {
|
|
|
901
902
|
}, 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
903
|
function gs(s, p) {
|
|
903
904
|
return o(), i("div", hs, [
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
905
|
+
l("div", fs, [
|
|
906
|
+
l("div", ps, [
|
|
907
|
+
l("div", vs, [
|
|
907
908
|
w(s.$slots, "default")
|
|
908
909
|
])
|
|
909
910
|
])
|
|
@@ -913,13 +914,15 @@ function gs(s, p) {
|
|
|
913
914
|
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 = {
|
|
914
915
|
key: 0,
|
|
915
916
|
class: "order-2 sm:order-1"
|
|
916
|
-
}, xs = {
|
|
917
|
-
key: 1,
|
|
918
|
-
class: "flex flex-row order-1 w-full mb-2 sm:w-auto sm:flex-grow sm:order-2 sm:mb-0"
|
|
919
|
-
}, ks = {
|
|
917
|
+
}, xs = { class: "flex flex-row order-1 w-full mb-2 sm:w-auto sm:flex-grow sm:order-2 sm:mb-0" }, ks = {
|
|
920
918
|
key: 0,
|
|
921
919
|
class: "order-5 ml-auto sm:order-3"
|
|
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"],
|
|
920
|
+
}, _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"], Fs = { key: 0 }, Bs = /* @__PURE__ */ l("td", {
|
|
921
|
+
class: "px-6 py-4 text-sm text-gray-500 whitespace-nowrap text-center",
|
|
922
|
+
colspan: 100
|
|
923
|
+
}, " Geen resultaten gevonden. ", -1), Ps = [
|
|
924
|
+
Bs
|
|
925
|
+
], Qs = {
|
|
923
926
|
__name: "Table",
|
|
924
927
|
props: {
|
|
925
928
|
inertia: {
|
|
@@ -978,6 +981,11 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
978
981
|
focusBorder: "focus:border-indigo-500"
|
|
979
982
|
};
|
|
980
983
|
}
|
|
984
|
+
},
|
|
985
|
+
showGlobalSearch: {
|
|
986
|
+
type: [Boolean, String],
|
|
987
|
+
default: !0,
|
|
988
|
+
required: !1
|
|
981
989
|
}
|
|
982
990
|
},
|
|
983
991
|
emits: ["rowClick"],
|
|
@@ -987,16 +995,16 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
987
995
|
const f = S(0), d = Be(), t = $(() => {
|
|
988
996
|
let a = d.props.queryBuilderProps ? d.props.queryBuilderProps[n.name] || {} : {};
|
|
989
997
|
return a._updates = f.value, a;
|
|
990
|
-
}),
|
|
998
|
+
}), r = 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), V = $(() => 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 ? {
|
|
991
999
|
...n.resource.meta,
|
|
992
1000
|
next_page_url: n.resource.links.next,
|
|
993
1001
|
prev_page_url: n.resource.links.prev
|
|
994
|
-
} : "meta" in n.resource ? n.resource.meta : n.resource),
|
|
1002
|
+
} : "meta" in n.resource ? n.resource.meta : n.resource), L = $(() => y.value.length > 0 || V.value.total > 0);
|
|
995
1003
|
function he(a, c) {
|
|
996
1004
|
p("rowClick", a, c);
|
|
997
1005
|
}
|
|
998
1006
|
function fe(a) {
|
|
999
|
-
m.value = m.value.filter((c) => c != a),
|
|
1007
|
+
m.value = m.value.filter((c) => c != a), W(a, null);
|
|
1000
1008
|
}
|
|
1001
1009
|
function ee(a) {
|
|
1002
1010
|
m.value.push(a);
|
|
@@ -1009,69 +1017,69 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1009
1017
|
return !0;
|
|
1010
1018
|
const h = n.name === "default" ? "" : n.name + "_";
|
|
1011
1019
|
let g = !1;
|
|
1012
|
-
return
|
|
1020
|
+
return T(["filter", "columns", "cursor", "sort"], (b) => {
|
|
1013
1021
|
const R = a[h + b];
|
|
1014
1022
|
b === "sort" && R === t.value.defaultSort || R !== void 0 && (g = !0);
|
|
1015
1023
|
}), g;
|
|
1016
1024
|
});
|
|
1017
1025
|
function te() {
|
|
1018
|
-
m.value = [],
|
|
1019
|
-
|
|
1020
|
-
}),
|
|
1021
|
-
|
|
1022
|
-
}),
|
|
1023
|
-
|
|
1024
|
-
}),
|
|
1026
|
+
m.value = [], T(r.value.filters, (a, c) => {
|
|
1027
|
+
r.value.filters[c].value = null;
|
|
1028
|
+
}), T(r.value.searchInputs, (a, c) => {
|
|
1029
|
+
r.value.searchInputs[c].value = null;
|
|
1030
|
+
}), T(r.value.columns, (a, c) => {
|
|
1031
|
+
r.value.columns[c].hidden = a.can_be_hidden ? !t.value.defaultVisibleToggleableColumns.includes(a.key) : !1;
|
|
1032
|
+
}), r.value.sort = null, r.value.cursor = null, r.value.page = 1;
|
|
1025
1033
|
}
|
|
1026
1034
|
const se = {};
|
|
1027
|
-
function
|
|
1035
|
+
function W(a, c) {
|
|
1028
1036
|
clearTimeout(se[a]), se[a] = setTimeout(() => {
|
|
1029
|
-
|
|
1037
|
+
H.value && n.preventOverlappingRequests && H.value.cancel();
|
|
1030
1038
|
const h = I("searchInputs", a);
|
|
1031
|
-
|
|
1039
|
+
r.value.searchInputs[h].value = c, r.value.cursor = null, r.value.page = 1;
|
|
1032
1040
|
}, n.inputDebounceMs);
|
|
1033
1041
|
}
|
|
1034
1042
|
function le(a) {
|
|
1035
|
-
|
|
1043
|
+
W("global", a);
|
|
1036
1044
|
}
|
|
1037
1045
|
function N(a, c) {
|
|
1038
1046
|
const h = I("filters", a);
|
|
1039
|
-
|
|
1047
|
+
r.value.filters[h].value = c, r.value.cursor = null, r.value.page = 1;
|
|
1040
1048
|
}
|
|
1041
1049
|
function re(a) {
|
|
1042
|
-
|
|
1050
|
+
r.value.cursor = null, r.value.perPage = a, r.value.page = 1;
|
|
1043
1051
|
}
|
|
1044
1052
|
function I(a, c) {
|
|
1045
|
-
return Te(
|
|
1053
|
+
return Te(r.value[a], (h) => h.key == c);
|
|
1046
1054
|
}
|
|
1047
1055
|
function ne(a, c) {
|
|
1048
1056
|
const h = I("columns", a);
|
|
1049
|
-
|
|
1057
|
+
r.value.columns[h].hidden = !c;
|
|
1050
1058
|
}
|
|
1051
1059
|
function ve() {
|
|
1052
1060
|
let a = {};
|
|
1053
|
-
return
|
|
1061
|
+
return T(r.value.searchInputs, (c) => {
|
|
1054
1062
|
c.value !== null && (a[c.key] = c.value);
|
|
1055
|
-
}),
|
|
1063
|
+
}), T(r.value.filters, (c) => {
|
|
1056
1064
|
c.value !== null && (a[c.key] = c.value);
|
|
1057
1065
|
}), a;
|
|
1058
1066
|
}
|
|
1059
1067
|
function ge() {
|
|
1060
|
-
const a =
|
|
1068
|
+
const a = r.value.columns;
|
|
1061
1069
|
let c = je(a, (g) => !g.hidden), h = Ve(c, (g) => g.key).sort();
|
|
1062
1070
|
return Le(h, t.value.defaultVisibleToggleableColumns) ? {} : h;
|
|
1063
1071
|
}
|
|
1064
1072
|
function me() {
|
|
1065
1073
|
const a = ve(), c = ge(), h = {};
|
|
1066
1074
|
Object.keys(a).length > 0 && (h.filter = a), Object.keys(c).length > 0 && (h.columns = c);
|
|
1067
|
-
const g =
|
|
1075
|
+
const g = r.value.cursor, b = r.value.page, R = r.value.sort, ie = r.value.perPage;
|
|
1068
1076
|
return g && (h.cursor = g), b > 1 && (h.page = b), ie > 1 && (h.perPage = ie), R && (h.sort = R), h;
|
|
1069
1077
|
}
|
|
1070
1078
|
function be() {
|
|
1071
1079
|
const a = U.parse(location.search.substring(1)), c = n.name === "default" ? "" : n.name + "_";
|
|
1072
|
-
|
|
1080
|
+
T(["filter", "columns", "cursor", "sort"], (g) => {
|
|
1073
1081
|
delete a[c + g];
|
|
1074
|
-
}), delete a[u.value],
|
|
1082
|
+
}), delete a[u.value], T(me(), (g, b) => {
|
|
1075
1083
|
b === "page" ? a[u.value] = g : b === "perPage" ? a.perPage = g : a[c + b] = g;
|
|
1076
1084
|
});
|
|
1077
1085
|
let h = U.stringify(a, {
|
|
@@ -1083,7 +1091,7 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1083
1091
|
});
|
|
1084
1092
|
return (!h || h === u.value + "=1") && (h = ""), h;
|
|
1085
1093
|
}
|
|
1086
|
-
const
|
|
1094
|
+
const G = S(!1), H = S(null);
|
|
1087
1095
|
function K(a) {
|
|
1088
1096
|
!a || Pe.get(
|
|
1089
1097
|
a,
|
|
@@ -1093,16 +1101,16 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1093
1101
|
preserveState: !0,
|
|
1094
1102
|
preserveScroll: n.preserveScroll !== !1,
|
|
1095
1103
|
onBefore() {
|
|
1096
|
-
|
|
1104
|
+
G.value = !0;
|
|
1097
1105
|
},
|
|
1098
1106
|
onCancelToken(c) {
|
|
1099
|
-
|
|
1107
|
+
H.value = c;
|
|
1100
1108
|
},
|
|
1101
1109
|
onFinish() {
|
|
1102
|
-
|
|
1110
|
+
G.value = !1;
|
|
1103
1111
|
},
|
|
1104
1112
|
onSuccess() {
|
|
1105
|
-
if ("queryBuilderProps" in d.props && (
|
|
1113
|
+
if ("queryBuilderProps" in d.props && (r.value.cursor = t.value.cursor, r.value.page = t.value.page), n.preserveScroll === "table-top") {
|
|
1106
1114
|
const h = O.value.getBoundingClientRect().top + window.pageYOffset + -8;
|
|
1107
1115
|
window.scrollTo({ top: h });
|
|
1108
1116
|
}
|
|
@@ -1111,7 +1119,7 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1111
1119
|
}
|
|
1112
1120
|
);
|
|
1113
1121
|
}
|
|
1114
|
-
J(
|
|
1122
|
+
J(r, () => {
|
|
1115
1123
|
K(location.pathname + "?" + be());
|
|
1116
1124
|
}, { deep: !0 });
|
|
1117
1125
|
const ae = () => {
|
|
@@ -1123,11 +1131,11 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1123
1131
|
document.removeEventListener("success", ae);
|
|
1124
1132
|
});
|
|
1125
1133
|
function oe(a) {
|
|
1126
|
-
|
|
1134
|
+
r.value.sort == a ? r.value.sort = `-${a}` : r.value.sort = a, r.value.cursor = null, r.value.page = 1;
|
|
1127
1135
|
}
|
|
1128
1136
|
function Q(a) {
|
|
1129
1137
|
const c = I("columns", a);
|
|
1130
|
-
return !
|
|
1138
|
+
return !r.value.columns[c].hidden;
|
|
1131
1139
|
}
|
|
1132
1140
|
function ue(a) {
|
|
1133
1141
|
const c = I("columns", a), h = Oe(t.value.columns[c]);
|
|
@@ -1140,9 +1148,9 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1140
1148
|
ref: O,
|
|
1141
1149
|
key: `table-${s.name}`,
|
|
1142
1150
|
dusk: `table-${s.name}`,
|
|
1143
|
-
class:
|
|
1151
|
+
class: k(["min-w-0", { "opacity-75": G.value }])
|
|
1144
1152
|
}, [
|
|
1145
|
-
|
|
1153
|
+
l("div", ys, [
|
|
1146
1154
|
e(t).hasFilters ? (o(), i("div", ws, [
|
|
1147
1155
|
w(a.$slots, "tableFilter", {
|
|
1148
1156
|
hasFilters: e(t).hasFilters,
|
|
@@ -1150,36 +1158,37 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1150
1158
|
filters: e(t).filters,
|
|
1151
1159
|
onFilterChange: N
|
|
1152
1160
|
}, () => [
|
|
1153
|
-
|
|
1161
|
+
e(L) ? (o(), _(Vt, {
|
|
1162
|
+
key: 0,
|
|
1154
1163
|
"has-enabled-filters": e(t).hasEnabledFilters,
|
|
1155
1164
|
filters: e(t).filters,
|
|
1156
1165
|
"on-filter-change": N
|
|
1157
|
-
}, null, 8, ["has-enabled-filters", "filters"])
|
|
1166
|
+
}, null, 8, ["has-enabled-filters", "filters"])) : x("", !0)
|
|
1158
1167
|
])
|
|
1159
|
-
])) :
|
|
1160
|
-
|
|
1168
|
+
])) : x("", !0),
|
|
1169
|
+
l("div", xs, [
|
|
1161
1170
|
w(a.$slots, "tableGlobalSearch", {
|
|
1162
1171
|
hasGlobalSearch: e(t).globalSearch,
|
|
1163
1172
|
label: e(t).globalSearch ? e(t).globalSearch.label : null,
|
|
1164
1173
|
value: e(t).globalSearch ? e(t).globalSearch.value : null,
|
|
1165
1174
|
onChange: le
|
|
1166
1175
|
}, () => [
|
|
1167
|
-
e(t).globalSearch ? (o(), _(Ut, {
|
|
1176
|
+
s.showGlobalSearch && e(t).globalSearch && e(L) ? (o(), _(Ut, {
|
|
1168
1177
|
key: 0,
|
|
1169
1178
|
class: "flex-grow",
|
|
1170
1179
|
label: e(t).globalSearch.label,
|
|
1171
1180
|
value: e(t).globalSearch.value,
|
|
1172
1181
|
"on-change": le
|
|
1173
|
-
}, null, 8, ["label", "value"])) :
|
|
1182
|
+
}, null, 8, ["label", "value"])) : x("", !0)
|
|
1174
1183
|
])
|
|
1175
|
-
])
|
|
1184
|
+
]),
|
|
1176
1185
|
w(a.$slots, "tableReset", {
|
|
1177
1186
|
canBeReset: "canBeReset",
|
|
1178
1187
|
onClick: te
|
|
1179
1188
|
}, () => [
|
|
1180
1189
|
e(pe) ? (o(), i("div", ks, [
|
|
1181
|
-
|
|
1182
|
-
])) :
|
|
1190
|
+
D(is, { "on-click": te })
|
|
1191
|
+
])) : x("", !0)
|
|
1183
1192
|
]),
|
|
1184
1193
|
w(a.$slots, "tableAddSearchRow", {
|
|
1185
1194
|
hasSearchInputs: e(t).hasSearchInputs,
|
|
@@ -1187,13 +1196,13 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1187
1196
|
searchInputs: e(t).searchInputsWithoutGlobal,
|
|
1188
1197
|
onAdd: ee
|
|
1189
1198
|
}, () => [
|
|
1190
|
-
e(t).hasSearchInputs ? (o(), _(mt, {
|
|
1199
|
+
s.showGlobalSearch && e(t).hasSearchInputs && e(L) ? (o(), _(mt, {
|
|
1191
1200
|
key: 0,
|
|
1192
1201
|
class: "order-3 sm:order-4",
|
|
1193
1202
|
"search-inputs": e(t).searchInputsWithoutGlobal,
|
|
1194
1203
|
"has-search-inputs-without-value": e(t).hasSearchInputsWithoutValue,
|
|
1195
1204
|
"on-add": ee
|
|
1196
|
-
}, null, 8, ["search-inputs", "has-search-inputs-without-value"])) :
|
|
1205
|
+
}, null, 8, ["search-inputs", "has-search-inputs-without-value"])) : x("", !0)
|
|
1197
1206
|
]),
|
|
1198
1207
|
w(a.$slots, "tableColumns", {
|
|
1199
1208
|
hasColumns: e(t).hasToggleableColumns,
|
|
@@ -1207,42 +1216,42 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1207
1216
|
columns: e(t).columns,
|
|
1208
1217
|
"has-hidden-columns": e(t).hasHiddenColumns,
|
|
1209
1218
|
"on-change": ne
|
|
1210
|
-
}, null, 8, ["columns", "has-hidden-columns"])) :
|
|
1219
|
+
}, null, 8, ["columns", "has-hidden-columns"])) : x("", !0)
|
|
1211
1220
|
])
|
|
1212
1221
|
]),
|
|
1213
1222
|
w(a.$slots, "tableSearchRows", {
|
|
1214
1223
|
hasSearchRowsWithValue: e(t).hasSearchInputsWithValue,
|
|
1215
1224
|
searchInputs: e(t).searchInputsWithoutGlobal,
|
|
1216
1225
|
forcedVisibleSearchInputs: m.value,
|
|
1217
|
-
onChange:
|
|
1226
|
+
onChange: W
|
|
1218
1227
|
}, () => [
|
|
1219
1228
|
e(t).hasSearchInputsWithValue || m.value.length > 0 ? (o(), _(ns, {
|
|
1220
1229
|
key: 0,
|
|
1221
1230
|
"search-inputs": e(t).searchInputsWithoutGlobal,
|
|
1222
1231
|
"forced-visible-search-inputs": m.value,
|
|
1223
|
-
"on-change":
|
|
1232
|
+
"on-change": W,
|
|
1224
1233
|
"on-remove": fe
|
|
1225
|
-
}, null, 8, ["search-inputs", "forced-visible-search-inputs"])) :
|
|
1234
|
+
}, null, 8, ["search-inputs", "forced-visible-search-inputs"])) : x("", !0)
|
|
1226
1235
|
]),
|
|
1227
|
-
e(t).hasEnabledFilters ? (o(), _(
|
|
1236
|
+
e(t).hasEnabledFilters ? (o(), _(Gt, {
|
|
1228
1237
|
key: 0,
|
|
1229
1238
|
filters: e(t).filters,
|
|
1230
1239
|
"on-filter-change": N
|
|
1231
|
-
}, null, 8, ["filters"])) :
|
|
1232
|
-
w(a.$slots, "tableWrapper", { meta: e(
|
|
1233
|
-
|
|
1234
|
-
class:
|
|
1240
|
+
}, null, 8, ["filters"])) : x("", !0),
|
|
1241
|
+
w(a.$slots, "tableWrapper", { meta: e(V) }, () => [
|
|
1242
|
+
D(ms, {
|
|
1243
|
+
class: k({ "mt-3": !e(q) })
|
|
1235
1244
|
}, {
|
|
1236
1245
|
default: C(() => [
|
|
1237
1246
|
w(a.$slots, "table", {}, () => [
|
|
1238
|
-
|
|
1239
|
-
|
|
1247
|
+
l("table", _s, [
|
|
1248
|
+
l("thead", $s, [
|
|
1240
1249
|
w(a.$slots, "head", {
|
|
1241
1250
|
show: Q,
|
|
1242
1251
|
sortBy: oe,
|
|
1243
1252
|
header: ue
|
|
1244
1253
|
}, () => [
|
|
1245
|
-
|
|
1254
|
+
l("tr", Cs, [
|
|
1246
1255
|
(o(!0), i(B, null, P(e(t).columns, (h) => (o(), _(Ke, {
|
|
1247
1256
|
key: `table-${s.name}-header-${h.key}`,
|
|
1248
1257
|
cell: ue(h.key)
|
|
@@ -1250,43 +1259,44 @@ const ms = /* @__PURE__ */ cs(ds, [["render", gs]]), bs = ["dusk"], ys = { class
|
|
|
1250
1259
|
])
|
|
1251
1260
|
])
|
|
1252
1261
|
]),
|
|
1253
|
-
|
|
1262
|
+
l("tbody", Ss, [
|
|
1254
1263
|
w(a.$slots, "body", { show: Q }, () => [
|
|
1255
1264
|
(o(!0), i(B, null, P(e(y), (h, g) => (o(), i("tr", {
|
|
1256
1265
|
key: `table-${s.name}-row-${g}`,
|
|
1257
|
-
class:
|
|
1266
|
+
class: k(["", {
|
|
1258
1267
|
"bg-gray-50": s.striped && g % 2,
|
|
1259
1268
|
"hover:bg-gray-100": s.striped,
|
|
1260
1269
|
"hover:bg-gray-50": !s.striped
|
|
1261
1270
|
}]),
|
|
1262
1271
|
onClick: (b) => he(h, g)
|
|
1263
1272
|
}, [
|
|
1264
|
-
(o(!0), i(B, null, P(e(t).columns, (b) =>
|
|
1273
|
+
(o(!0), i(B, null, P(e(t).columns, (b) => E((o(), i("td", {
|
|
1265
1274
|
key: `table-${s.name}-row-${g}-column-${b.key}`,
|
|
1266
1275
|
class: "px-6 py-4 text-sm text-gray-500 whitespace-nowrap"
|
|
1267
1276
|
}, [
|
|
1268
1277
|
w(a.$slots, `cell(${b.key})`, { item: h }, () => [
|
|
1269
|
-
|
|
1278
|
+
j(v(h[b.key]), 1)
|
|
1270
1279
|
])
|
|
1271
1280
|
])), [
|
|
1272
|
-
[
|
|
1281
|
+
[A, Q(b.key)]
|
|
1273
1282
|
])), 128))
|
|
1274
1283
|
], 10, qs))), 128))
|
|
1275
|
-
])
|
|
1284
|
+
]),
|
|
1285
|
+
e(L) ? x("", !0) : (o(), i("tr", Fs, Ps))
|
|
1276
1286
|
])
|
|
1277
1287
|
])
|
|
1278
1288
|
]),
|
|
1279
1289
|
w(a.$slots, "pagination", {
|
|
1280
1290
|
onClick: K,
|
|
1281
|
-
hasData: e(
|
|
1282
|
-
meta: e(
|
|
1291
|
+
hasData: e(L),
|
|
1292
|
+
meta: e(V),
|
|
1283
1293
|
perPageOptions: e(t).perPageOptions,
|
|
1284
1294
|
onPerPageChange: re
|
|
1285
1295
|
}, () => [
|
|
1286
|
-
|
|
1296
|
+
D(ft, {
|
|
1287
1297
|
"on-click": K,
|
|
1288
|
-
"has-data": e(
|
|
1289
|
-
meta: e(
|
|
1298
|
+
"has-data": e(L),
|
|
1299
|
+
meta: e(V),
|
|
1290
1300
|
"per-page-options": e(t).perPageOptions,
|
|
1291
1301
|
"on-per-page-change": re
|
|
1292
1302
|
}, null, 8, ["has-data", "meta", "per-page-options"])
|
|
@@ -1306,7 +1316,7 @@ export {
|
|
|
1306
1316
|
Ke as HeaderCell,
|
|
1307
1317
|
ze as OnClickOutside,
|
|
1308
1318
|
ft as Pagination,
|
|
1309
|
-
|
|
1319
|
+
Qs as Table,
|
|
1310
1320
|
mt as TableAddSearchRow,
|
|
1311
1321
|
qt as TableColumns,
|
|
1312
1322
|
Vt as TableFilter,
|
|
@@ -1315,6 +1325,6 @@ export {
|
|
|
1315
1325
|
ns as TableSearchRows,
|
|
1316
1326
|
ms as TableWrapper,
|
|
1317
1327
|
de as getTranslations,
|
|
1318
|
-
|
|
1319
|
-
|
|
1328
|
+
Hs as setTranslation,
|
|
1329
|
+
Ks as setTranslations
|
|
1320
1330
|
};
|