@espresso-lab/mantine-data-table 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1804 -1505
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -1
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { c as e } from "react/compiler-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import n, { Fragment as r, createContext as i, createElement as a, useCallback as o, useContext as s, useEffect as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
4
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
5
|
+
import { Accordion as g, ActionIcon as _, Alert as v, Box as y, Button as b, Center as x, Checkbox as S, Collapse as C, Divider as w, Flex as T, Group as E, Indicator as D, Loader as O, Menu as k, MenuDropdown as A, MenuItem as j, MenuTarget as M, Modal as N, NumberInput as P, Pagination as ee, Popover as F, PopoverDropdown as I, PopoverTarget as L, ScrollArea as R, Select as te, Skeleton as ne, Stack as re, Stepper as z, Table as ie, TableTd as ae, TableTfoot as oe, TableTh as B, TableThead as se, TableTr as V, Tabs as ce, Text as H, TextInput as le, Textarea as ue, Title as de, createSafeContext as U, parseThemeColor as fe, rem as pe, useDirection as me, useMantineTheme as he } from "@mantine/core";
|
|
6
|
+
import { DateInput as ge } from "@mantine/dates";
|
|
7
|
+
import { useForm as _e } from "@mantine/form";
|
|
8
|
+
import { IconCaretDownFilled as ve, IconChevronRight as ye, IconDotsVertical as be, IconFilter as xe, IconInfoCircle as Se, IconPencil as Ce, IconRefresh as we, IconSortAscending as Te, IconSortDescending as Ee, IconTrash as De } from "@tabler/icons-react";
|
|
9
|
+
import { useClickOutside as Oe, useDisclosure as ke, useLocalStorage as Ae, useMediaQuery as je, useMergedRef as Me, useTimeout as Ne } from "@mantine/hooks";
|
|
9
10
|
//#region node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
10
11
|
var Pe = class {
|
|
11
12
|
constructor() {
|
|
@@ -98,21 +99,21 @@ function Ve(e) {
|
|
|
98
99
|
function He(e, t) {
|
|
99
100
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
+
function W(e, t) {
|
|
102
103
|
return typeof e == "function" ? e(t) : e;
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
+
function G(e, t) {
|
|
105
106
|
return typeof e == "function" ? e(t) : e;
|
|
106
107
|
}
|
|
107
108
|
function Ue(e) {
|
|
108
|
-
return JSON.stringify(e, (e, t) =>
|
|
109
|
+
return JSON.stringify(e, (e, t) => Je(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
|
|
109
110
|
}
|
|
110
111
|
var We = Object.prototype.hasOwnProperty;
|
|
111
112
|
function Ge(e, t, n = 0) {
|
|
112
113
|
if (e === t) return e;
|
|
113
114
|
if (n > 500) return t;
|
|
114
|
-
let r =
|
|
115
|
-
if (!r && !(
|
|
115
|
+
let r = qe(e) && qe(t);
|
|
116
|
+
if (!r && !(Je(e) && Je(t))) return t;
|
|
116
117
|
let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
|
|
117
118
|
for (let l = 0; l < o; l++) {
|
|
118
119
|
let o = r ? l : a[l], u = e[o], d = t[o];
|
|
@@ -129,25 +130,25 @@ function Ge(e, t, n = 0) {
|
|
|
129
130
|
}
|
|
130
131
|
return i === o && c === i ? e : s;
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
+
function Ke(e, t) {
|
|
133
134
|
if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
134
135
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
135
136
|
return !0;
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
+
function qe(e) {
|
|
138
139
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
-
if (!
|
|
141
|
+
function Je(e) {
|
|
142
|
+
if (!Ye(e)) return !1;
|
|
142
143
|
let t = e.constructor;
|
|
143
144
|
if (t === void 0) return !0;
|
|
144
145
|
let n = t.prototype;
|
|
145
|
-
return !(!
|
|
146
|
+
return !(!Ye(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
146
147
|
}
|
|
147
|
-
function
|
|
148
|
+
function Ye(e) {
|
|
148
149
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
+
function K(e, t, n) {
|
|
151
152
|
if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
|
|
152
153
|
if (n.structuralSharing !== !1) {
|
|
153
154
|
if (process.env.NODE_ENV !== "production") try {
|
|
@@ -281,16 +282,16 @@ var tt = et(), nt = new class extends Pe {
|
|
|
281
282
|
}();
|
|
282
283
|
//#endregion
|
|
283
284
|
//#region node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
284
|
-
function
|
|
285
|
+
function q(e) {
|
|
285
286
|
return (e ?? "online") === "online" ? nt.isOnline() : !0;
|
|
286
287
|
}
|
|
287
288
|
//#endregion
|
|
288
289
|
//#region node_modules/@tanstack/query-core/build/modern/query.js
|
|
289
|
-
function
|
|
290
|
+
function J(e, t) {
|
|
290
291
|
return {
|
|
291
292
|
fetchFailureCount: 0,
|
|
292
293
|
fetchFailureReason: null,
|
|
293
|
-
fetchStatus:
|
|
294
|
+
fetchStatus: q(t.networkMode) ? "fetching" : "paused",
|
|
294
295
|
...e === void 0 && {
|
|
295
296
|
error: null,
|
|
296
297
|
status: "pending"
|
|
@@ -299,7 +300,7 @@ function it(e, t) {
|
|
|
299
300
|
}
|
|
300
301
|
//#endregion
|
|
301
302
|
//#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
302
|
-
var
|
|
303
|
+
var rt = class extends Pe {
|
|
303
304
|
constructor(e, t) {
|
|
304
305
|
super(), this.options = t, this.#e = e, this.#s = null, this.#o = Qe(), this.bindMethods(), this.setOptions(t);
|
|
305
306
|
}
|
|
@@ -322,36 +323,36 @@ var at = class extends Pe {
|
|
|
322
323
|
this.refetch = this.refetch.bind(this);
|
|
323
324
|
}
|
|
324
325
|
onSubscribe() {
|
|
325
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
326
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), at(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
|
|
326
327
|
}
|
|
327
328
|
onUnsubscribe() {
|
|
328
329
|
this.hasListeners() || this.destroy();
|
|
329
330
|
}
|
|
330
331
|
shouldFetchOnReconnect() {
|
|
331
|
-
return
|
|
332
|
+
return ot(this.#t, this.options, this.options.refetchOnReconnect);
|
|
332
333
|
}
|
|
333
334
|
shouldFetchOnWindowFocus() {
|
|
334
|
-
return
|
|
335
|
+
return ot(this.#t, this.options, this.options.refetchOnWindowFocus);
|
|
335
336
|
}
|
|
336
337
|
destroy() {
|
|
337
338
|
this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
|
|
338
339
|
}
|
|
339
340
|
setOptions(e) {
|
|
340
341
|
let t = this.options, n = this.#t;
|
|
341
|
-
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
|
342
|
-
this.#S(), this.#t.setOptions(this.options), t._defaulted && !
|
|
342
|
+
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof G(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
|
|
343
|
+
this.#S(), this.#t.setOptions(this.options), t._defaulted && !Ke(this.options, t) && this.#e.getQueryCache().notify({
|
|
343
344
|
type: "observerOptionsUpdated",
|
|
344
345
|
query: this.#t,
|
|
345
346
|
observer: this
|
|
346
347
|
});
|
|
347
348
|
let r = this.hasListeners();
|
|
348
|
-
r &&
|
|
349
|
+
r && st(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || G(this.options.enabled, this.#t) !== G(t.enabled, this.#t) || W(this.options.staleTime, this.#t) !== W(t.staleTime, this.#t)) && this.#g();
|
|
349
350
|
let i = this.#_();
|
|
350
|
-
r && (this.#t !== n ||
|
|
351
|
+
r && (this.#t !== n || G(this.options.enabled, this.#t) !== G(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
|
|
351
352
|
}
|
|
352
353
|
getOptimisticResult(e) {
|
|
353
354
|
let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
|
|
354
|
-
return
|
|
355
|
+
return Y(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
|
|
355
356
|
}
|
|
356
357
|
getCurrentResult() {
|
|
357
358
|
return this.#r;
|
|
@@ -385,7 +386,7 @@ var at = class extends Pe {
|
|
|
385
386
|
}
|
|
386
387
|
#g() {
|
|
387
388
|
this.#b();
|
|
388
|
-
let e =
|
|
389
|
+
let e = W(this.options.staleTime, this.#t);
|
|
389
390
|
if (Ze.isServer() || this.#r.isStale || !Ve(e)) return;
|
|
390
391
|
let t = He(this.#r.dataUpdatedAt, e) + 1;
|
|
391
392
|
this.#d = Le.setTimeout(() => {
|
|
@@ -396,7 +397,7 @@ var at = class extends Pe {
|
|
|
396
397
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
397
398
|
}
|
|
398
399
|
#v(e) {
|
|
399
|
-
this.#x(), this.#p = e, !(Ze.isServer() ||
|
|
400
|
+
this.#x(), this.#p = e, !(Ze.isServer() || G(this.options.enabled, this.#t) === !1 || !Ve(this.#p) || this.#p === 0) && (this.#f = Le.setInterval(() => {
|
|
400
401
|
(this.options.refetchIntervalInBackground || Fe.isFocused()) && this.#h();
|
|
401
402
|
}, this.#p));
|
|
402
403
|
}
|
|
@@ -412,10 +413,10 @@ var at = class extends Pe {
|
|
|
412
413
|
createResult(e, t) {
|
|
413
414
|
let n = this.#t, r = this.options, i = this.#r, a = this.#i, o = this.#a, s = e === n ? this.#n : e.state, { state: c } = e, l = { ...c }, u = !1, d;
|
|
414
415
|
if (t._optimisticResults) {
|
|
415
|
-
let i = this.hasListeners(), a = !i &&
|
|
416
|
+
let i = this.hasListeners(), a = !i && at(e, t), o = i && st(e, n, t, r);
|
|
416
417
|
(a || o) && (l = {
|
|
417
418
|
...l,
|
|
418
|
-
...
|
|
419
|
+
...J(c.data, e.options)
|
|
419
420
|
}), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
|
|
420
421
|
}
|
|
421
422
|
let { error: f, errorUpdatedAt: p, status: m } = l;
|
|
@@ -423,11 +424,11 @@ var at = class extends Pe {
|
|
|
423
424
|
let h = !1;
|
|
424
425
|
if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
|
|
425
426
|
let e;
|
|
426
|
-
i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d =
|
|
427
|
+
i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d = K(i?.data, e, t), u = !0);
|
|
427
428
|
}
|
|
428
429
|
if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
|
|
429
430
|
else try {
|
|
430
|
-
this.#c = t.select, d = t.select(d), d =
|
|
431
|
+
this.#c = t.select, d = t.select(d), d = K(i?.data, d, t), this.#l = d, this.#s = null;
|
|
431
432
|
} catch (e) {
|
|
432
433
|
this.#s = e;
|
|
433
434
|
}
|
|
@@ -455,10 +456,10 @@ var at = class extends Pe {
|
|
|
455
456
|
isPaused: l.fetchStatus === "paused",
|
|
456
457
|
isPlaceholderData: u,
|
|
457
458
|
isRefetchError: v && b,
|
|
458
|
-
isStale:
|
|
459
|
+
isStale: ct(e, t),
|
|
459
460
|
refetch: this.refetch,
|
|
460
461
|
promise: this.#o,
|
|
461
|
-
isEnabled:
|
|
462
|
+
isEnabled: G(t.enabled, e) !== !1
|
|
462
463
|
};
|
|
463
464
|
if (this.options.experimental_prefetchInRender) {
|
|
464
465
|
let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
|
|
@@ -482,7 +483,7 @@ var at = class extends Pe {
|
|
|
482
483
|
}
|
|
483
484
|
updateResult() {
|
|
484
485
|
let e = this.#r, t = this.createResult(this.#t, this.options);
|
|
485
|
-
this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !
|
|
486
|
+
this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !Ke(t, e) && (this.#r = t, this.#C({ listeners: (() => {
|
|
486
487
|
if (!e) return !0;
|
|
487
488
|
let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
|
|
488
489
|
if (n === "all" || !n && !this.#m.size) return !0;
|
|
@@ -513,31 +514,31 @@ var at = class extends Pe {
|
|
|
513
514
|
});
|
|
514
515
|
}
|
|
515
516
|
};
|
|
516
|
-
function
|
|
517
|
-
return
|
|
517
|
+
function it(e, t) {
|
|
518
|
+
return G(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && G(t.retryOnMount, e) === !1);
|
|
518
519
|
}
|
|
519
|
-
function
|
|
520
|
-
return
|
|
520
|
+
function at(e, t) {
|
|
521
|
+
return it(e, t) || e.state.data !== void 0 && ot(e, t, t.refetchOnMount);
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
-
if (
|
|
523
|
+
function ot(e, t, n) {
|
|
524
|
+
if (G(t.enabled, e) !== !1 && W(t.staleTime, e) !== "static") {
|
|
524
525
|
let r = typeof n == "function" ? n(e) : n;
|
|
525
|
-
return r === "always" || r !== !1 &&
|
|
526
|
+
return r === "always" || r !== !1 && ct(e, t);
|
|
526
527
|
}
|
|
527
528
|
return !1;
|
|
528
529
|
}
|
|
529
|
-
function
|
|
530
|
-
return (e !== t ||
|
|
530
|
+
function st(e, t, n, r) {
|
|
531
|
+
return (e !== t || G(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ct(e, n);
|
|
531
532
|
}
|
|
532
|
-
function
|
|
533
|
-
return
|
|
533
|
+
function ct(e, t) {
|
|
534
|
+
return G(t.enabled, e) !== !1 && e.isStaleByTime(W(t.staleTime, e));
|
|
534
535
|
}
|
|
535
|
-
function
|
|
536
|
-
return !
|
|
536
|
+
function Y(e, t) {
|
|
537
|
+
return !Ke(e.getCurrentResult(), t);
|
|
537
538
|
}
|
|
538
539
|
//#endregion
|
|
539
540
|
//#region node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
540
|
-
function
|
|
541
|
+
function lt() {
|
|
541
542
|
return {
|
|
542
543
|
context: void 0,
|
|
543
544
|
data: void 0,
|
|
@@ -552,7 +553,7 @@ function K() {
|
|
|
552
553
|
}
|
|
553
554
|
//#endregion
|
|
554
555
|
//#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
|
|
555
|
-
var
|
|
556
|
+
var ut = class extends Pe {
|
|
556
557
|
#e;
|
|
557
558
|
#t = void 0;
|
|
558
559
|
#n;
|
|
@@ -565,7 +566,7 @@ var ft = class extends Pe {
|
|
|
565
566
|
}
|
|
566
567
|
setOptions(e) {
|
|
567
568
|
let t = this.options;
|
|
568
|
-
this.options = this.#e.defaultMutationOptions(e),
|
|
569
|
+
this.options = this.#e.defaultMutationOptions(e), Ke(this.options, t) || this.#e.getMutationCache().notify({
|
|
569
570
|
type: "observerOptionsUpdated",
|
|
570
571
|
mutation: this.#n,
|
|
571
572
|
observer: this
|
|
@@ -587,7 +588,7 @@ var ft = class extends Pe {
|
|
|
587
588
|
return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
|
|
588
589
|
}
|
|
589
590
|
#i() {
|
|
590
|
-
let e = this.#n?.state ??
|
|
591
|
+
let e = this.#n?.state ?? lt();
|
|
591
592
|
this.#t = {
|
|
592
593
|
...e,
|
|
593
594
|
isPending: e.status === "pending",
|
|
@@ -635,21 +636,21 @@ var ft = class extends Pe {
|
|
|
635
636
|
});
|
|
636
637
|
});
|
|
637
638
|
}
|
|
638
|
-
},
|
|
639
|
-
let n =
|
|
640
|
-
if (
|
|
639
|
+
}, dt = t.createContext(void 0), ft = (e) => {
|
|
640
|
+
let n = t.useContext(dt);
|
|
641
|
+
if (e) return e;
|
|
641
642
|
if (!n) throw Error("No QueryClient set, use QueryClientProvider to set one");
|
|
642
643
|
return n;
|
|
643
|
-
},
|
|
644
|
-
|
|
645
|
-
}), [
|
|
646
|
-
value:
|
|
644
|
+
}, pt = ({ client: e, children: n }) => (t.useEffect(() => (e.mount(), () => {
|
|
645
|
+
e.unmount();
|
|
646
|
+
}), [e]), /* @__PURE__ */ m(dt.Provider, {
|
|
647
|
+
value: e,
|
|
647
648
|
children: n
|
|
648
|
-
})),
|
|
649
|
-
|
|
649
|
+
})), mt = t.createContext(!1), ht = () => t.useContext(mt);
|
|
650
|
+
mt.Provider;
|
|
650
651
|
//#endregion
|
|
651
652
|
//#region node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
652
|
-
function
|
|
653
|
+
function gt() {
|
|
653
654
|
let e = !1;
|
|
654
655
|
return {
|
|
655
656
|
clearReset: () => {
|
|
@@ -661,62 +662,62 @@ function _t() {
|
|
|
661
662
|
isReset: () => e
|
|
662
663
|
};
|
|
663
664
|
}
|
|
664
|
-
var
|
|
665
|
+
var X = t.createContext(gt()), _t = () => t.useContext(X), vt = (e, t, n) => {
|
|
665
666
|
let r = n?.state.error && typeof e.throwOnError == "function" ? Xe(e.throwOnError, [n.state.error, n]) : e.throwOnError;
|
|
666
667
|
(e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
|
|
667
|
-
},
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
}, [
|
|
671
|
-
},
|
|
668
|
+
}, yt = (e) => {
|
|
669
|
+
t.useEffect(() => {
|
|
670
|
+
e.clearReset();
|
|
671
|
+
}, [e]);
|
|
672
|
+
}, bt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Xe(n, [e.error, r])), xt = (e) => {
|
|
672
673
|
if (e.suspense) {
|
|
673
674
|
let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
|
|
674
675
|
e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
|
|
675
676
|
}
|
|
676
|
-
},
|
|
677
|
+
}, St = (e, t) => e.isLoading && e.isFetching && !t, Ct = (e, t) => e?.suspense && t.isPending, wt = (e, t, n) => t.fetchOptimistic(e).catch(() => {
|
|
677
678
|
n.clearReset();
|
|
678
679
|
});
|
|
679
680
|
//#endregion
|
|
680
681
|
//#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
681
|
-
function
|
|
682
|
-
if (process.env.NODE_ENV !== "production" && (typeof
|
|
683
|
-
let i =
|
|
682
|
+
function Tt(e, n, r) {
|
|
683
|
+
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e))) throw Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
|
|
684
|
+
let i = ht(), a = _t(), o = ft(r), s = o.defaultQueryOptions(e);
|
|
684
685
|
o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);
|
|
685
686
|
let c = o.getQueryCache().get(s.queryHash);
|
|
686
687
|
process.env.NODE_ENV !== "production" && (s.queryFn || console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`));
|
|
687
|
-
let l =
|
|
688
|
-
s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0,
|
|
689
|
-
let u = !o.getQueryCache().get(s.queryHash), [d] =
|
|
690
|
-
if (
|
|
688
|
+
let l = e.subscribed !== !1;
|
|
689
|
+
s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, xt(s), vt(s, a, c), yt(a);
|
|
690
|
+
let u = !o.getQueryCache().get(s.queryHash), [d] = t.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
|
|
691
|
+
if (t.useSyncExternalStore(t.useCallback((e) => {
|
|
691
692
|
let t = p ? d.subscribe(tt.batchCalls(e)) : Be;
|
|
692
693
|
return d.updateResult(), t;
|
|
693
|
-
}, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()),
|
|
694
|
+
}, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), t.useEffect(() => {
|
|
694
695
|
d.setOptions(s);
|
|
695
|
-
}, [s, d]),
|
|
696
|
-
if (
|
|
696
|
+
}, [s, d]), Ct(s, f)) throw wt(s, d, a);
|
|
697
|
+
if (bt({
|
|
697
698
|
result: f,
|
|
698
699
|
errorResetBoundary: a,
|
|
699
700
|
throwOnError: s.throwOnError,
|
|
700
701
|
query: c,
|
|
701
702
|
suspense: s.suspense
|
|
702
703
|
})) throw f.error;
|
|
703
|
-
return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !Ze.isServer() &&
|
|
704
|
+
return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !Ze.isServer() && St(f, i) && (u ? wt(s, d, a) : c?.promise)?.catch(Be).finally(() => {
|
|
704
705
|
d.updateResult();
|
|
705
706
|
}), s.notifyOnChangeProps ? f : d.trackResult(f);
|
|
706
707
|
}
|
|
707
708
|
//#endregion
|
|
708
709
|
//#region node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
709
|
-
function
|
|
710
|
-
return
|
|
710
|
+
function Et(e, t) {
|
|
711
|
+
return Tt(e, rt, t);
|
|
711
712
|
}
|
|
712
713
|
//#endregion
|
|
713
714
|
//#region node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
714
|
-
function
|
|
715
|
-
let r =
|
|
716
|
-
|
|
717
|
-
i.setOptions(
|
|
718
|
-
}, [i,
|
|
719
|
-
let a =
|
|
715
|
+
function Dt(e, n) {
|
|
716
|
+
let r = ft(n), [i] = t.useState(() => new ut(r, e));
|
|
717
|
+
t.useEffect(() => {
|
|
718
|
+
i.setOptions(e);
|
|
719
|
+
}, [i, e]);
|
|
720
|
+
let a = t.useSyncExternalStore(t.useCallback((e) => i.subscribe(tt.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = t.useCallback((e, t) => {
|
|
720
721
|
i.mutate(e, t).catch(Be);
|
|
721
722
|
}, [i]);
|
|
722
723
|
if (a.error && Xe(i.options.throwOnError, [a.error])) throw a.error;
|
|
@@ -728,79 +729,84 @@ function kt(t, n) {
|
|
|
728
729
|
}
|
|
729
730
|
//#endregion
|
|
730
731
|
//#region src/Context/DataTableContext.tsx
|
|
731
|
-
var
|
|
732
|
-
function
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
});
|
|
732
|
+
var Ot = i(void 0), kt = async () => ({ "Content-Type": "application/json" });
|
|
733
|
+
function At(t) {
|
|
734
|
+
let n = e(10), { children: r, baseUrl: i, queryClient: a, getHeaders: o } = t, s = o === void 0 ? kt : o, c;
|
|
735
|
+
n[0] !== i || n[1] !== s || n[2] !== a ? (c = {
|
|
736
|
+
baseUrl: i,
|
|
737
|
+
queryClient: a,
|
|
738
|
+
getHeaders: s
|
|
739
|
+
}, n[0] = i, n[1] = s, n[2] = a, n[3] = c) : c = n[3];
|
|
740
|
+
let l;
|
|
741
|
+
n[4] !== r || n[5] !== a ? (l = /* @__PURE__ */ m(pt, {
|
|
742
|
+
client: a,
|
|
743
|
+
children: r
|
|
744
|
+
}), n[4] = r, n[5] = a, n[6] = l) : l = n[6];
|
|
745
|
+
let u;
|
|
746
|
+
return n[7] !== c || n[8] !== l ? (u = /* @__PURE__ */ m(Ot.Provider, {
|
|
747
|
+
value: c,
|
|
748
|
+
children: l
|
|
749
|
+
}), n[7] = c, n[8] = l, n[9] = u) : u = n[9], u;
|
|
744
750
|
}
|
|
745
751
|
//#endregion
|
|
746
752
|
//#region src/Hooks/useDataTable.ts
|
|
747
|
-
function
|
|
748
|
-
let e =
|
|
753
|
+
function jt() {
|
|
754
|
+
let e = s(Ot);
|
|
749
755
|
if (!e) throw Error("useDataTable must be used within a DataTableProvider");
|
|
750
756
|
return e;
|
|
751
757
|
}
|
|
752
758
|
//#endregion
|
|
753
759
|
//#region src/Hooks/useApi.ts
|
|
754
|
-
var
|
|
760
|
+
var Mt = class extends Error {
|
|
755
761
|
status;
|
|
756
762
|
violations;
|
|
757
763
|
constructor(e, t, n) {
|
|
758
764
|
super(e), this.name = "ApiError", this.status = t, this.violations = n;
|
|
759
765
|
}
|
|
760
766
|
};
|
|
761
|
-
function
|
|
762
|
-
return e instanceof
|
|
767
|
+
function Nt(e) {
|
|
768
|
+
return e instanceof Mt ? e.violations : void 0;
|
|
763
769
|
}
|
|
764
|
-
async function
|
|
770
|
+
async function Pt(e, t) {
|
|
765
771
|
let n = await fetch(e, t);
|
|
766
772
|
if (n.status >= 400) {
|
|
767
773
|
let e = await n.text();
|
|
768
|
-
if (!e) throw new
|
|
774
|
+
if (!e) throw new Mt(`HTTP ${n.status}: ${n.statusText}`, n.status);
|
|
769
775
|
let t = null;
|
|
770
776
|
try {
|
|
771
777
|
t = JSON.parse(e);
|
|
772
778
|
} catch {
|
|
773
|
-
throw new
|
|
779
|
+
throw new Mt(e, n.status);
|
|
774
780
|
}
|
|
775
781
|
let r = Array.isArray(t?.violations) ? t.violations.filter((e) => e?.field && e?.message).map((e) => ({
|
|
776
782
|
field: String(e.field),
|
|
777
783
|
message: String(e.message)
|
|
778
784
|
})) : void 0;
|
|
779
|
-
throw new
|
|
785
|
+
throw new Mt(t?.message ?? t?.error ?? t?.title ?? e, n.status, r);
|
|
780
786
|
}
|
|
781
787
|
return n;
|
|
782
788
|
}
|
|
783
789
|
var Ft = (e) => e.map((e) => e.toString());
|
|
784
790
|
async function It(e, t) {
|
|
785
|
-
return (await
|
|
791
|
+
return (await Pt(e, {
|
|
786
792
|
method: "GET",
|
|
787
793
|
headers: await t()
|
|
788
794
|
})).json();
|
|
789
795
|
}
|
|
790
796
|
async function Lt(e, t, n) {
|
|
791
|
-
return (await
|
|
797
|
+
return (await Pt(`${e}/${t}`, {
|
|
792
798
|
method: "GET",
|
|
793
799
|
headers: await n()
|
|
794
800
|
})).json();
|
|
795
801
|
}
|
|
796
802
|
async function Rt(e, t, n) {
|
|
797
|
-
await
|
|
803
|
+
await Pt(`${e}/${t}`, {
|
|
798
804
|
method: "DELETE",
|
|
799
805
|
headers: await n()
|
|
800
806
|
});
|
|
801
807
|
}
|
|
802
808
|
async function zt(e, t, n) {
|
|
803
|
-
let r = await
|
|
809
|
+
let r = await Pt(e, {
|
|
804
810
|
method: "POST",
|
|
805
811
|
headers: await n(),
|
|
806
812
|
body: JSON.stringify(t)
|
|
@@ -808,7 +814,7 @@ async function zt(e, t, n) {
|
|
|
808
814
|
return r.status === 204 ? t : r.json();
|
|
809
815
|
}
|
|
810
816
|
async function Bt(e, t, n, r) {
|
|
811
|
-
let i = await
|
|
817
|
+
let i = await Pt(t, {
|
|
812
818
|
method: e,
|
|
813
819
|
headers: await n(),
|
|
814
820
|
body: r ? JSON.stringify(r) : void 0
|
|
@@ -816,55 +822,84 @@ async function Bt(e, t, n, r) {
|
|
|
816
822
|
if (i.status !== 204) return i.json();
|
|
817
823
|
}
|
|
818
824
|
async function Vt(e, t, n) {
|
|
819
|
-
let r = await
|
|
825
|
+
let r = await Pt(`${e}/${t.id}`, {
|
|
820
826
|
method: "PUT",
|
|
821
827
|
headers: await n(),
|
|
822
828
|
body: JSON.stringify(t)
|
|
823
829
|
});
|
|
824
830
|
return r.status === 204 ? t : r.json();
|
|
825
831
|
}
|
|
826
|
-
function Ht(
|
|
827
|
-
let { baseUrl:
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
832
|
+
function Ht(t, n, r) {
|
|
833
|
+
let i = e(14), { baseUrl: a, getHeaders: o } = jt(), s;
|
|
834
|
+
if (i[0] !== r || i[1] !== n) {
|
|
835
|
+
let e;
|
|
836
|
+
i[3] === r ? e = i[4] : (e = r?.toString(), i[3] = r, i[4] = e), s = [...Ft(n), String(e)], i[0] = r, i[1] = n, i[2] = s;
|
|
837
|
+
} else s = i[2];
|
|
838
|
+
let c;
|
|
839
|
+
i[5] !== t || i[6] !== a || i[7] !== o || i[8] !== r ? (c = () => Lt(`${a}${t}`, r, o), i[5] = t, i[6] = a, i[7] = o, i[8] = r, i[9] = c) : c = i[9];
|
|
840
|
+
let l = !!r, u;
|
|
841
|
+
return i[10] !== s || i[11] !== c || i[12] !== l ? (u = {
|
|
842
|
+
queryKey: s,
|
|
843
|
+
queryFn: c,
|
|
844
|
+
enabled: l
|
|
845
|
+
}, i[10] = s, i[11] = c, i[12] = l, i[13] = u) : u = i[13], Et(u);
|
|
846
|
+
}
|
|
847
|
+
function Ut(t, n, r) {
|
|
848
|
+
let i = e(10), a = r === void 0 ? !0 : r, { baseUrl: o, getHeaders: s } = jt(), c;
|
|
849
|
+
i[0] === n ? c = i[1] : (c = Ft(n), i[0] = n, i[1] = c);
|
|
850
|
+
let l;
|
|
851
|
+
i[2] !== t || i[3] !== o || i[4] !== s ? (l = () => It(`${o}${t}`, s), i[2] = t, i[3] = o, i[4] = s, i[5] = l) : l = i[5];
|
|
852
|
+
let u;
|
|
853
|
+
return i[6] !== a || i[7] !== c || i[8] !== l ? (u = {
|
|
854
|
+
queryKey: c,
|
|
855
|
+
queryFn: l,
|
|
856
|
+
enabled: a
|
|
857
|
+
}, i[6] = a, i[7] = c, i[8] = l, i[9] = u) : u = i[9], Et(u);
|
|
841
858
|
}
|
|
842
859
|
function Wt(e, t, n) {
|
|
843
860
|
return Promise.all([e.invalidateQueries({ queryKey: Ft(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
|
|
844
861
|
}
|
|
845
|
-
function Gt(
|
|
846
|
-
let { baseUrl:
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
let
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
862
|
+
function Gt(t, n, r) {
|
|
863
|
+
let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } = jt(), c;
|
|
864
|
+
i[0] === n ? c = i[1] : (c = Ft(n), i[0] = n, i[1] = c);
|
|
865
|
+
let l;
|
|
866
|
+
i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) => zt(`${a}${t}`, e, s), i[2] = t, i[3] = a, i[4] = s, i[5] = l) : l = i[5];
|
|
867
|
+
let u;
|
|
868
|
+
i[6] !== r || i[7] !== o || i[8] !== n ? (u = () => Wt(o, n, r), i[6] = r, i[7] = o, i[8] = n, i[9] = u) : u = i[9];
|
|
869
|
+
let d;
|
|
870
|
+
return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
|
|
871
|
+
mutationKey: c,
|
|
872
|
+
mutationFn: l,
|
|
873
|
+
onSettled: u
|
|
874
|
+
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Dt(d);
|
|
875
|
+
}
|
|
876
|
+
function Kt(t, n, r) {
|
|
877
|
+
let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } = jt(), c;
|
|
878
|
+
i[0] === n ? c = i[1] : (c = Ft(n), i[0] = n, i[1] = c);
|
|
879
|
+
let l;
|
|
880
|
+
i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) => Vt(`${a}${t}`, e, s), i[2] = t, i[3] = a, i[4] = s, i[5] = l) : l = i[5];
|
|
881
|
+
let u;
|
|
882
|
+
i[6] !== r || i[7] !== o || i[8] !== n ? (u = () => Wt(o, n, r), i[6] = r, i[7] = o, i[8] = n, i[9] = u) : u = i[9];
|
|
883
|
+
let d;
|
|
884
|
+
return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
|
|
885
|
+
mutationKey: c,
|
|
886
|
+
mutationFn: l,
|
|
887
|
+
onSettled: u
|
|
888
|
+
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Dt(d);
|
|
889
|
+
}
|
|
890
|
+
function qt(t, n, r) {
|
|
891
|
+
let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } = jt(), c;
|
|
892
|
+
i[0] === n ? c = i[1] : (c = Ft(n), i[0] = n, i[1] = c);
|
|
893
|
+
let l;
|
|
894
|
+
i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) => Rt(`${a}${t}`, e, s), i[2] = t, i[3] = a, i[4] = s, i[5] = l) : l = i[5];
|
|
895
|
+
let u;
|
|
896
|
+
i[6] !== r || i[7] !== o || i[8] !== n ? (u = () => Wt(o, n, r), i[6] = r, i[7] = o, i[8] = n, i[9] = u) : u = i[9];
|
|
897
|
+
let d;
|
|
898
|
+
return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
|
|
899
|
+
mutationKey: c,
|
|
900
|
+
mutationFn: l,
|
|
901
|
+
onSettled: u
|
|
902
|
+
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Dt(d);
|
|
868
903
|
}
|
|
869
904
|
//#endregion
|
|
870
905
|
//#region src/DataTable/EntityForm.tsx
|
|
@@ -889,200 +924,238 @@ function Qt(e, t) {
|
|
|
889
924
|
}
|
|
890
925
|
var $t = (e) => e.split(".").pop() ?? e;
|
|
891
926
|
function en(e, t) {
|
|
892
|
-
return Object.fromEntries((
|
|
927
|
+
return Object.fromEntries((Nt(e) ?? []).filter((e) => t.has($t(e.field))).map((e) => [$t(e.field), e.message]));
|
|
893
928
|
}
|
|
894
929
|
function tn(e, t) {
|
|
895
|
-
let n =
|
|
930
|
+
let n = Nt(e);
|
|
896
931
|
if (!n) return e?.message;
|
|
897
932
|
let r = n.filter((e) => !t.has($t(e.field)));
|
|
898
933
|
return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
|
|
899
934
|
}
|
|
900
|
-
function nn(
|
|
901
|
-
let
|
|
935
|
+
function nn(t) {
|
|
936
|
+
let n = e(46), { fields: i, steps: a, record: o, recordId: s, submitting: l, error: u, onPersist: d, onClose: g } = t, [_, y] = f(0), [x, C] = f(!1), w;
|
|
937
|
+
n[0] === i ? w = n[1] : (w = Yt(i), n[0] = i, n[1] = w);
|
|
938
|
+
let T;
|
|
939
|
+
n[2] === i ? T = n[3] : (T = Xt(i), n[2] = i, n[3] = T);
|
|
940
|
+
let D;
|
|
941
|
+
n[4] !== w || n[5] !== T ? (D = {
|
|
902
942
|
mode: "uncontrolled",
|
|
903
|
-
initialValues:
|
|
904
|
-
validate:
|
|
905
|
-
});
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
943
|
+
initialValues: w,
|
|
944
|
+
validate: T
|
|
945
|
+
}, n[4] = w, n[5] = T, n[6] = D) : D = n[6];
|
|
946
|
+
let O = _e(D), k;
|
|
947
|
+
n[7] !== i || n[8] !== O || n[9] !== o ? (k = () => {
|
|
948
|
+
if (o) {
|
|
949
|
+
let e = Qt(o, i);
|
|
950
|
+
O.initialize(e), O.setValues(e);
|
|
910
951
|
}
|
|
911
|
-
}, [
|
|
912
|
-
let
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
let
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
952
|
+
}, n[7] = i, n[8] = O, n[9] = o, n[10] = k) : k = n[10];
|
|
953
|
+
let A;
|
|
954
|
+
n[11] === o ? A = n[12] : (A = [o], n[11] = o, n[12] = A), c(k, A);
|
|
955
|
+
let j, M, N, ee, F;
|
|
956
|
+
if (n[13] !== _ || n[14] !== u || n[15] !== i || n[16] !== O || n[17] !== g || n[18] !== d || n[19] !== s || n[20] !== a) {
|
|
957
|
+
let e = new Set(i.map(cn)), t = tn(u, e), o = [...new Set(i.filter(sn).map(on))];
|
|
958
|
+
j = o.length > 0, M = _ === o.length - 1;
|
|
959
|
+
let c;
|
|
960
|
+
n[26] !== O || n[27] !== s ? (c = function(e) {
|
|
961
|
+
let t = O.getValues();
|
|
962
|
+
if (e.conditional && !e.conditional(t)) return null;
|
|
963
|
+
let n = Jt(e, t), r = O.getInputProps(e.id);
|
|
964
|
+
switch (e.type) {
|
|
965
|
+
case "number": return /* @__PURE__ */ m(P, {
|
|
966
|
+
decimalSeparator: ",",
|
|
967
|
+
thousandSeparator: ".",
|
|
968
|
+
label: e.column.title,
|
|
969
|
+
placeholder: e.placeholder ?? "",
|
|
970
|
+
required: n,
|
|
971
|
+
...r
|
|
972
|
+
}, O.key(e.id));
|
|
973
|
+
case "date": return /* @__PURE__ */ m(ge, {
|
|
974
|
+
valueFormat: "DD.MM.YYYY",
|
|
975
|
+
clearable: !0,
|
|
976
|
+
label: e.column.title,
|
|
977
|
+
placeholder: e.placeholder ?? "",
|
|
978
|
+
required: n,
|
|
979
|
+
...r
|
|
980
|
+
}, O.key(e.id));
|
|
981
|
+
case "boolean": return /* @__PURE__ */ m(S, {
|
|
982
|
+
mt: "md",
|
|
983
|
+
label: e.column.title,
|
|
984
|
+
required: n,
|
|
985
|
+
...O.getInputProps(e.id, { type: "checkbox" })
|
|
986
|
+
}, O.key(e.id));
|
|
987
|
+
case "textarea": return /* @__PURE__ */ m(ue, {
|
|
988
|
+
minRows: 3,
|
|
989
|
+
autosize: !0,
|
|
990
|
+
label: e.column.title,
|
|
991
|
+
placeholder: e.placeholder ?? "",
|
|
992
|
+
required: n,
|
|
993
|
+
...r
|
|
994
|
+
}, O.key(e.id));
|
|
995
|
+
case "custom": return e.render?.({
|
|
996
|
+
...t,
|
|
997
|
+
...s != null && { id: s }
|
|
998
|
+
}, O.setValues, C, {
|
|
999
|
+
error: r.error,
|
|
1000
|
+
required: n
|
|
1001
|
+
});
|
|
1002
|
+
default: return /* @__PURE__ */ m(le, {
|
|
1003
|
+
type: e.id.includes("email") ? "email" : void 0,
|
|
1004
|
+
label: e.column.title,
|
|
1005
|
+
placeholder: e.placeholder ?? "",
|
|
1006
|
+
required: n,
|
|
1007
|
+
...r
|
|
1008
|
+
}, O.key(e.id));
|
|
1009
|
+
}
|
|
1010
|
+
}, n[26] = O, n[27] = s, n[28] = c) : c = n[28];
|
|
1011
|
+
let l = c, f;
|
|
1012
|
+
n[29] !== i || n[30] !== l ? (f = (e) => (e === void 0 ? i : i.filter((t) => t.step === e)).map((e) => /* @__PURE__ */ m(r, { children: l(e) }, e.id)), n[29] = i, n[30] = l, n[31] = f) : f = n[31];
|
|
1013
|
+
let p = f;
|
|
1014
|
+
F = t && /* @__PURE__ */ m(v, {
|
|
1015
|
+
variant: "outline",
|
|
1016
|
+
color: "red",
|
|
1017
|
+
title: "Fehler aufgetreten",
|
|
1018
|
+
mb: "lg",
|
|
1019
|
+
children: t
|
|
1020
|
+
}), N = O.onSubmit(async (t) => {
|
|
1021
|
+
let n = Zt(t);
|
|
974
1022
|
try {
|
|
975
|
-
await
|
|
976
|
-
} catch (
|
|
977
|
-
let
|
|
978
|
-
Object.keys(
|
|
1023
|
+
await d(n);
|
|
1024
|
+
} catch (t) {
|
|
1025
|
+
let n = en(t, e);
|
|
1026
|
+
Object.keys(n).length > 0 && O.setErrors(n);
|
|
979
1027
|
return;
|
|
980
1028
|
}
|
|
981
|
-
|
|
982
|
-
}),
|
|
983
|
-
|
|
984
|
-
active: u,
|
|
1029
|
+
j && !M ? y(an) : (O.setInitialValues(n), O.reset(), g());
|
|
1030
|
+
}), ee = j ? /* @__PURE__ */ m(z, {
|
|
1031
|
+
active: _,
|
|
985
1032
|
size: "sm",
|
|
986
|
-
children:
|
|
987
|
-
...
|
|
988
|
-
children:
|
|
1033
|
+
children: o.map((e) => /* @__PURE__ */ m(z.Step, {
|
|
1034
|
+
...a?.[e - 1] ? { label: a[e - 1].label } : {},
|
|
1035
|
+
children: p(e)
|
|
989
1036
|
}, e))
|
|
990
|
-
}) :
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1037
|
+
}) : p(), n[13] = _, n[14] = u, n[15] = i, n[16] = O, n[17] = g, n[18] = d, n[19] = s, n[20] = a, n[21] = j, n[22] = M, n[23] = N, n[24] = ee, n[25] = F;
|
|
1038
|
+
} else j = n[21], M = n[22], N = n[23], ee = n[24], F = n[25];
|
|
1039
|
+
let I;
|
|
1040
|
+
n[32] !== _ || n[33] !== j || n[34] !== x || n[35] !== M || n[36] !== g || n[37] !== l ? (I = !x && /* @__PURE__ */ h(E, {
|
|
1041
|
+
mt: "md",
|
|
1042
|
+
justify: "end",
|
|
1043
|
+
children: [/* @__PURE__ */ m(b, {
|
|
1044
|
+
variant: "outline",
|
|
1045
|
+
onClick: () => j && _ > 0 ? y(rn) : g(),
|
|
1046
|
+
children: j && _ > 0 ? "Zurück" : "Abbrechen"
|
|
1047
|
+
}), /* @__PURE__ */ m(b, {
|
|
1048
|
+
type: "submit",
|
|
1049
|
+
loading: l,
|
|
1050
|
+
children: j && !M ? "Weiter" : "Speichern"
|
|
1002
1051
|
})]
|
|
1003
|
-
})]
|
|
1052
|
+
}), n[32] = _, n[33] = j, n[34] = x, n[35] = M, n[36] = g, n[37] = l, n[38] = I) : I = n[38];
|
|
1053
|
+
let L;
|
|
1054
|
+
n[39] !== N || n[40] !== ee || n[41] !== I ? (L = /* @__PURE__ */ h("form", {
|
|
1055
|
+
onSubmit: N,
|
|
1056
|
+
children: [ee, I]
|
|
1057
|
+
}), n[39] = N, n[40] = ee, n[41] = I, n[42] = L) : L = n[42];
|
|
1058
|
+
let R;
|
|
1059
|
+
return n[43] !== L || n[44] !== F ? (R = /* @__PURE__ */ h(p, { children: [F, L] }), n[43] = L, n[44] = F, n[45] = R) : R = n[45], R;
|
|
1060
|
+
}
|
|
1061
|
+
function rn(e) {
|
|
1062
|
+
return e - 1;
|
|
1063
|
+
}
|
|
1064
|
+
function an(e) {
|
|
1065
|
+
return e + 1;
|
|
1066
|
+
}
|
|
1067
|
+
function on(e) {
|
|
1068
|
+
return e.step;
|
|
1069
|
+
}
|
|
1070
|
+
function sn(e) {
|
|
1071
|
+
return typeof e.step == "number";
|
|
1072
|
+
}
|
|
1073
|
+
function cn(e) {
|
|
1074
|
+
return String(e.id);
|
|
1004
1075
|
}
|
|
1005
1076
|
//#endregion
|
|
1006
1077
|
//#region src/DataTable/CreateModal.tsx
|
|
1007
|
-
function
|
|
1008
|
-
let
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1078
|
+
function ln(t) {
|
|
1079
|
+
let n = e(13), { fields: r, onClose: i, queryKey: a, connectedQueryKeys: o, apiPath: s, steps: c, onCreated: l } = t, [u, d] = f(), { mutateAsync: p, isPending: h, error: g } = Gt(s, a, o), { mutateAsync: _, isPending: v, error: y } = Kt(s, a, o), b;
|
|
1080
|
+
n[0] !== p || n[1] !== l || n[2] !== u || n[3] !== _ ? (b = async (e) => {
|
|
1081
|
+
if (u != null) await _({
|
|
1082
|
+
...e,
|
|
1083
|
+
id: u
|
|
1084
|
+
});
|
|
1085
|
+
else {
|
|
1086
|
+
let t = await p(e);
|
|
1087
|
+
d(t.id), l?.(t.id);
|
|
1088
|
+
}
|
|
1089
|
+
}, n[0] = p, n[1] = l, n[2] = u, n[3] = _, n[4] = b) : b = n[4];
|
|
1090
|
+
let x = b, S = h || v, C = g ?? y, w;
|
|
1091
|
+
return n[5] !== r || n[6] !== i || n[7] !== x || n[8] !== u || n[9] !== c || n[10] !== S || n[11] !== C ? (w = /* @__PURE__ */ m(nn, {
|
|
1092
|
+
fields: r,
|
|
1093
|
+
steps: c,
|
|
1094
|
+
recordId: u,
|
|
1095
|
+
submitting: S,
|
|
1096
|
+
error: C,
|
|
1097
|
+
onPersist: x,
|
|
1098
|
+
onClose: i
|
|
1099
|
+
}), n[5] = r, n[6] = i, n[7] = x, n[8] = u, n[9] = c, n[10] = S, n[11] = C, n[12] = w) : w = n[12], w;
|
|
1027
1100
|
}
|
|
1028
1101
|
//#endregion
|
|
1029
1102
|
//#region node_modules/clsx/dist/clsx.mjs
|
|
1030
|
-
function
|
|
1103
|
+
function un(e) {
|
|
1031
1104
|
var t, n, r = "";
|
|
1032
1105
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1033
1106
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1034
1107
|
var i = e.length;
|
|
1035
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
1108
|
+
for (t = 0; t < i; t++) e[t] && (n = un(e[t])) && (r && (r += " "), r += n);
|
|
1036
1109
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
1037
1110
|
return r;
|
|
1038
1111
|
}
|
|
1039
|
-
function
|
|
1040
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
1112
|
+
function Z() {
|
|
1113
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = un(e)) && (r && (r += " "), r += t);
|
|
1041
1114
|
return r;
|
|
1042
1115
|
}
|
|
1043
1116
|
//#endregion
|
|
1044
1117
|
//#region node_modules/mantine-datatable/dist/index.mjs
|
|
1045
|
-
function
|
|
1046
|
-
return e ?
|
|
1118
|
+
function Q(e, t, n) {
|
|
1119
|
+
return e ? fe({
|
|
1047
1120
|
color: typeof e == "object" ? e[n] : e,
|
|
1048
1121
|
theme: t
|
|
1049
1122
|
}).value : void 0;
|
|
1050
1123
|
}
|
|
1051
|
-
function
|
|
1124
|
+
function dn({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor: i, stripedColor: a, highlightOnHoverColor: o }) {
|
|
1052
1125
|
return {
|
|
1053
|
-
"--mantine-datatable-color-light":
|
|
1054
|
-
"--mantine-datatable-color-dark":
|
|
1055
|
-
"--mantine-datatable-background-color-light":
|
|
1056
|
-
"--mantine-datatable-background-color-dark":
|
|
1057
|
-
"--mantine-datatable-border-color-light":
|
|
1058
|
-
"--mantine-datatable-border-color-dark":
|
|
1059
|
-
"--mantine-datatable-row-border-color-light":
|
|
1060
|
-
"--mantine-datatable-row-border-color-dark":
|
|
1061
|
-
"--mantine-datatable-striped-color-light":
|
|
1062
|
-
"--mantine-datatable-striped-color-dark":
|
|
1063
|
-
"--mantine-datatable-highlight-on-hover-color-light":
|
|
1064
|
-
"--mantine-datatable-highlight-on-hover-color-dark":
|
|
1126
|
+
"--mantine-datatable-color-light": Q(t, e, "light"),
|
|
1127
|
+
"--mantine-datatable-color-dark": Q(t, e, "dark"),
|
|
1128
|
+
"--mantine-datatable-background-color-light": Q(n, e, "light"),
|
|
1129
|
+
"--mantine-datatable-background-color-dark": Q(n, e, "dark"),
|
|
1130
|
+
"--mantine-datatable-border-color-light": Q(r, e, "light"),
|
|
1131
|
+
"--mantine-datatable-border-color-dark": Q(r, e, "dark"),
|
|
1132
|
+
"--mantine-datatable-row-border-color-light": Q(i, e, "light"),
|
|
1133
|
+
"--mantine-datatable-row-border-color-dark": Q(i, e, "dark"),
|
|
1134
|
+
"--mantine-datatable-striped-color-light": Q(a, e, "light"),
|
|
1135
|
+
"--mantine-datatable-striped-color-dark": Q(a, e, "dark"),
|
|
1136
|
+
"--mantine-datatable-highlight-on-hover-color-light": Q(o, e, "light"),
|
|
1137
|
+
"--mantine-datatable-highlight-on-hover-color-dark": Q(o, e, "dark")
|
|
1065
1138
|
};
|
|
1066
1139
|
}
|
|
1067
|
-
function
|
|
1140
|
+
function fn({ theme: e, paginationActiveTextColor: t, paginationActiveBackgroundColor: n }) {
|
|
1068
1141
|
return {
|
|
1069
|
-
"--mantine-datatable-pagination-active-text-color-light":
|
|
1070
|
-
"--mantine-datatable-pagination-active-text-color-dark":
|
|
1071
|
-
"--mantine-datatable-pagination-active-background-color-light":
|
|
1072
|
-
"--mantine-datatable-pagination-active-background-color-dark":
|
|
1142
|
+
"--mantine-datatable-pagination-active-text-color-light": Q(t, e, "light"),
|
|
1143
|
+
"--mantine-datatable-pagination-active-text-color-dark": Q(t, e, "dark"),
|
|
1144
|
+
"--mantine-datatable-pagination-active-background-color-light": Q(n, e, "light"),
|
|
1145
|
+
"--mantine-datatable-pagination-active-background-color-dark": Q(n, e, "dark")
|
|
1073
1146
|
};
|
|
1074
1147
|
}
|
|
1075
|
-
function
|
|
1148
|
+
function pn({ theme: e, color: t, backgroundColor: n }) {
|
|
1076
1149
|
return {
|
|
1077
|
-
"--mantine-datatable-row-color-light":
|
|
1078
|
-
"--mantine-datatable-row-color-dark":
|
|
1079
|
-
"--mantine-datatable-row-background-color-light":
|
|
1080
|
-
"--mantine-datatable-row-background-color-dark":
|
|
1150
|
+
"--mantine-datatable-row-color-light": Q(t, e, "light"),
|
|
1151
|
+
"--mantine-datatable-row-color-dark": Q(t, e, "dark"),
|
|
1152
|
+
"--mantine-datatable-row-background-color-light": Q(n, e, "light"),
|
|
1153
|
+
"--mantine-datatable-row-background-color-dark": Q(n, e, "dark")
|
|
1081
1154
|
};
|
|
1082
1155
|
}
|
|
1083
|
-
var [
|
|
1084
|
-
let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth:
|
|
1085
|
-
return
|
|
1156
|
+
var [mn, hn] = U("useDataTableColumnsContext must be used within DataTableColumnProvider"), gn = (e) => {
|
|
1157
|
+
let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth: d, setMultipleColumnWidths: p, resetColumnsWidth: h, beginResize: g, endResize: _, pinnedMap: v } = e, [y, b] = f(""), [x, S] = f("");
|
|
1158
|
+
return m(mn, {
|
|
1086
1159
|
value: {
|
|
1087
1160
|
sourceColumn: y,
|
|
1088
1161
|
setSourceColumn: b,
|
|
@@ -1105,8 +1178,8 @@ var [ln, un] = fe("useDataTableColumnsContext must be used within DataTableColum
|
|
|
1105
1178
|
resetColumnsOrder: c,
|
|
1106
1179
|
resetColumnsToggle: l,
|
|
1107
1180
|
resetColumnsPinning: u,
|
|
1108
|
-
setColumnWidth:
|
|
1109
|
-
setMultipleColumnWidths:
|
|
1181
|
+
setColumnWidth: d,
|
|
1182
|
+
setMultipleColumnWidths: p,
|
|
1110
1183
|
resetColumnsWidth: h,
|
|
1111
1184
|
beginResize: g,
|
|
1112
1185
|
endResize: _
|
|
@@ -1114,14 +1187,14 @@ var [ln, un] = fe("useDataTableColumnsContext must be used within DataTableColum
|
|
|
1114
1187
|
children: t
|
|
1115
1188
|
});
|
|
1116
1189
|
};
|
|
1117
|
-
function
|
|
1118
|
-
return
|
|
1190
|
+
function _n() {
|
|
1191
|
+
return m("tr", {
|
|
1119
1192
|
className: "mantine-datatable-empty-row",
|
|
1120
|
-
children:
|
|
1193
|
+
children: m("td", {})
|
|
1121
1194
|
});
|
|
1122
1195
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return
|
|
1196
|
+
function vn() {
|
|
1197
|
+
return h("svg", {
|
|
1125
1198
|
width: "24",
|
|
1126
1199
|
height: "24",
|
|
1127
1200
|
viewBox: "0 0 24 24",
|
|
@@ -1131,26 +1204,26 @@ function pn() {
|
|
|
1131
1204
|
strokeLinecap: "round",
|
|
1132
1205
|
strokeLinejoin: "round",
|
|
1133
1206
|
children: [
|
|
1134
|
-
|
|
1207
|
+
m("path", {
|
|
1135
1208
|
stroke: "none",
|
|
1136
1209
|
d: "M0 0h24v24H0z",
|
|
1137
1210
|
fill: "none"
|
|
1138
1211
|
}),
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1212
|
+
m("path", { d: "M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74" }),
|
|
1213
|
+
m("path", { d: "M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6" }),
|
|
1214
|
+
m("path", { d: "M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4" }),
|
|
1215
|
+
m("path", { d: "M3 3l18 18" })
|
|
1143
1216
|
]
|
|
1144
1217
|
});
|
|
1145
1218
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return
|
|
1219
|
+
function yn({ icon: e, text: t, active: n, children: r }) {
|
|
1220
|
+
return m(x, {
|
|
1148
1221
|
className: "mantine-datatable-empty-state",
|
|
1149
1222
|
"data-active": n || void 0,
|
|
1150
|
-
children: r ||
|
|
1223
|
+
children: r || h(p, { children: [e || m("div", {
|
|
1151
1224
|
className: "mantine-datatable-empty-state-icon",
|
|
1152
|
-
children:
|
|
1153
|
-
}),
|
|
1225
|
+
children: m(vn, {})
|
|
1226
|
+
}), m(H, {
|
|
1154
1227
|
component: "div",
|
|
1155
1228
|
size: "sm",
|
|
1156
1229
|
c: "dimmed",
|
|
@@ -1158,63 +1231,63 @@ function mn({ icon: e, text: t, active: n, children: r }) {
|
|
|
1158
1231
|
})] })
|
|
1159
1232
|
});
|
|
1160
1233
|
}
|
|
1161
|
-
function
|
|
1234
|
+
function bn(e) {
|
|
1162
1235
|
let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
|
|
1163
1236
|
return `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
|
|
1164
1237
|
}
|
|
1165
|
-
function
|
|
1238
|
+
function xn(e, t, n) {
|
|
1166
1239
|
return !Array.isArray(e) || n && !e.every(n) ? t : e;
|
|
1167
1240
|
}
|
|
1168
|
-
function
|
|
1241
|
+
function Sn(e) {
|
|
1169
1242
|
return typeof e == "object" && !!e && typeof e.accessor == "string";
|
|
1170
1243
|
}
|
|
1171
|
-
function
|
|
1244
|
+
function Cn(e, t, n) {
|
|
1172
1245
|
return e.filter((e) => !t.map(n).includes(n(e)));
|
|
1173
1246
|
}
|
|
1174
|
-
function
|
|
1247
|
+
function wn(e, t) {
|
|
1175
1248
|
return e.filter((e, n, r) => n === r.findIndex((n) => t(e) === t(n)));
|
|
1176
1249
|
}
|
|
1177
|
-
function
|
|
1250
|
+
function Tn(e, t) {
|
|
1178
1251
|
return t ? t.match(/([^[.\]])+/g).reduce((e, t) => e && e[t], e) : void 0;
|
|
1179
1252
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return typeof t == "string" ?
|
|
1253
|
+
function $(e, t) {
|
|
1254
|
+
return typeof t == "string" ? Tn(e, t) : t(e);
|
|
1182
1255
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 +
|
|
1256
|
+
function En(e) {
|
|
1257
|
+
return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + En(e.groups) : 1));
|
|
1185
1258
|
}
|
|
1186
|
-
function
|
|
1259
|
+
function Dn(e) {
|
|
1187
1260
|
let t = [];
|
|
1188
|
-
for (let n of e) n.columns && n.columns.length > 0 ? t.push(...n.columns.filter((e) => e != null)) : n.groups && n.groups.length > 0 && t.push(...
|
|
1261
|
+
for (let n of e) n.columns && n.columns.length > 0 ? t.push(...n.columns.filter((e) => e != null)) : n.groups && n.groups.length > 0 && t.push(...Dn(n.groups));
|
|
1189
1262
|
return t.filter((e) => e != null);
|
|
1190
1263
|
}
|
|
1191
|
-
function
|
|
1192
|
-
return e.columns && e.columns.length > 0 ? e.columns.filter((e, n) => e.hidden ? !1 : t ? t[n] !== !1 : !0).length : e.groups && e.groups.length > 0 ? e.groups.reduce((e, n) => e +
|
|
1264
|
+
function On(e, t) {
|
|
1265
|
+
return e.columns && e.columns.length > 0 ? e.columns.filter((e, n) => e.hidden ? !1 : t ? t[n] !== !1 : !0).length : e.groups && e.groups.length > 0 ? e.groups.reduce((e, n) => e + On(n, t), 0) : 0;
|
|
1193
1266
|
}
|
|
1194
|
-
function
|
|
1267
|
+
function kn(e, t, n = 0) {
|
|
1195
1268
|
if (n === t) return [...e];
|
|
1196
1269
|
let r = [];
|
|
1197
|
-
for (let i of e) i.groups && i.groups.length > 0 && r.push(...
|
|
1270
|
+
for (let i of e) i.groups && i.groups.length > 0 && r.push(...kn(i.groups, t, n + 1));
|
|
1198
1271
|
return r;
|
|
1199
1272
|
}
|
|
1200
|
-
function
|
|
1273
|
+
function An(e, t, n) {
|
|
1201
1274
|
return n ? !e || t : !1;
|
|
1202
1275
|
}
|
|
1203
|
-
function
|
|
1204
|
-
let r =
|
|
1276
|
+
function jn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1277
|
+
let r = u(() => t.map((e) => ({
|
|
1205
1278
|
accessor: e.accessor,
|
|
1206
1279
|
defaultPinned: e.pinned,
|
|
1207
1280
|
pinnable: !!e.pinnable,
|
|
1208
1281
|
pinned: e.pinned
|
|
1209
|
-
})), [t]), [i, a] =
|
|
1282
|
+
})), [t]), [i, a] = Ae({
|
|
1210
1283
|
key: e ? `${e}-columns-pinning` : "",
|
|
1211
1284
|
defaultValue: e ? r : void 0,
|
|
1212
1285
|
getInitialValueInEffect: n
|
|
1213
|
-
}), o =
|
|
1214
|
-
function
|
|
1286
|
+
}), o = xn(i, r, Sn);
|
|
1287
|
+
function s(t) {
|
|
1215
1288
|
e && a(typeof t == "function" ? (e) => t(e ?? r) : t);
|
|
1216
1289
|
}
|
|
1217
|
-
let
|
|
1290
|
+
let l = u(() => {
|
|
1218
1291
|
if (!o) return r;
|
|
1219
1292
|
let e = [];
|
|
1220
1293
|
return o.forEach((n) => {
|
|
@@ -1232,37 +1305,37 @@ function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1232
1305
|
t,
|
|
1233
1306
|
r
|
|
1234
1307
|
]);
|
|
1235
|
-
|
|
1236
|
-
e && o && JSON.stringify(
|
|
1308
|
+
c(() => {
|
|
1309
|
+
e && o && JSON.stringify(l) !== JSON.stringify(o) && a(l);
|
|
1237
1310
|
}, [
|
|
1238
1311
|
e,
|
|
1239
|
-
|
|
1312
|
+
l,
|
|
1240
1313
|
o,
|
|
1241
1314
|
a
|
|
1242
1315
|
]);
|
|
1243
1316
|
let d = () => {
|
|
1244
|
-
|
|
1317
|
+
s(r);
|
|
1245
1318
|
};
|
|
1246
1319
|
return e ? {
|
|
1247
|
-
columnsPinning:
|
|
1248
|
-
setColumnsPinning:
|
|
1320
|
+
columnsPinning: l,
|
|
1321
|
+
setColumnsPinning: s,
|
|
1249
1322
|
resetColumnsPinning: d
|
|
1250
1323
|
} : {
|
|
1251
1324
|
columnsPinning: r,
|
|
1252
|
-
setColumnsPinning:
|
|
1325
|
+
setColumnsPinning: s,
|
|
1253
1326
|
resetColumnsPinning: d
|
|
1254
1327
|
};
|
|
1255
1328
|
}
|
|
1256
|
-
function
|
|
1257
|
-
let r =
|
|
1329
|
+
function Mn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1330
|
+
let r = u(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = Ae({
|
|
1258
1331
|
key: e ? `${e}-columns-order` : "",
|
|
1259
1332
|
defaultValue: e ? r : void 0,
|
|
1260
1333
|
getInitialValueInEffect: n
|
|
1261
|
-
}), o =
|
|
1262
|
-
function
|
|
1334
|
+
}), o = xn(i, r, (e) => typeof e == "string");
|
|
1335
|
+
function s(t) {
|
|
1263
1336
|
e && a(t);
|
|
1264
1337
|
}
|
|
1265
|
-
let
|
|
1338
|
+
let l = u(() => {
|
|
1266
1339
|
if (!o) return r;
|
|
1267
1340
|
let e = [];
|
|
1268
1341
|
return o.forEach((n) => {
|
|
@@ -1275,36 +1348,36 @@ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1275
1348
|
t,
|
|
1276
1349
|
r
|
|
1277
1350
|
]);
|
|
1278
|
-
|
|
1279
|
-
e && o && JSON.stringify(
|
|
1351
|
+
c(() => {
|
|
1352
|
+
e && o && JSON.stringify(l) !== JSON.stringify(o) && a(l);
|
|
1280
1353
|
}, [
|
|
1281
1354
|
e,
|
|
1282
|
-
|
|
1355
|
+
l,
|
|
1283
1356
|
o,
|
|
1284
1357
|
a
|
|
1285
1358
|
]);
|
|
1286
1359
|
let d = () => {
|
|
1287
|
-
|
|
1360
|
+
s(r);
|
|
1288
1361
|
};
|
|
1289
1362
|
return e ? {
|
|
1290
|
-
columnsOrder:
|
|
1291
|
-
setColumnsOrder:
|
|
1363
|
+
columnsOrder: l,
|
|
1364
|
+
setColumnsOrder: s,
|
|
1292
1365
|
resetColumnsOrder: d
|
|
1293
1366
|
} : {
|
|
1294
1367
|
columnsOrder: o,
|
|
1295
|
-
setColumnsOrder:
|
|
1368
|
+
setColumnsOrder: s,
|
|
1296
1369
|
resetColumnsOrder: d
|
|
1297
1370
|
};
|
|
1298
1371
|
}
|
|
1299
|
-
function
|
|
1300
|
-
let i =
|
|
1372
|
+
function Nn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
|
|
1373
|
+
let i = u(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), a = o(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [s, l] = Ae({
|
|
1301
1374
|
key: e ? `${e}-columns-width` : "",
|
|
1302
|
-
defaultValue: e ?
|
|
1375
|
+
defaultValue: e ? a() : void 0,
|
|
1303
1376
|
getInitialValueInEffect: n
|
|
1304
|
-
}), p =
|
|
1305
|
-
|
|
1377
|
+
}), p = xn(s, [], (e) => typeof e == "object" && !!e), [m, h] = f(() => e && p.length > 0 ? p : a()), [g, _] = f(!1), v = d(!1);
|
|
1378
|
+
c(() => {
|
|
1306
1379
|
e && (!p || p.length === 0 || h(p));
|
|
1307
|
-
}, [e, p]),
|
|
1380
|
+
}, [e, p]), c(() => {
|
|
1308
1381
|
h((e) => {
|
|
1309
1382
|
let n = new Set(t.filter((e) => e.accessor !== "__selection__").map((e) => String(e.accessor))), r = e.filter((e) => n.has(Object.keys(e)[0])), i = new Set(r.map((e) => Object.keys(e)[0])), a = !1;
|
|
1310
1383
|
for (let e of t) {
|
|
@@ -1315,29 +1388,29 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
|
|
|
1315
1388
|
return r.length !== e.length || a ? r : e;
|
|
1316
1389
|
});
|
|
1317
1390
|
}, [t]);
|
|
1318
|
-
let y =
|
|
1391
|
+
let y = o((e) => {
|
|
1319
1392
|
let t = e.filter((e) => e.accessor !== "__selection__");
|
|
1320
1393
|
t.length !== 0 && (v.current = !0, h((e) => e.map((e) => {
|
|
1321
1394
|
let n = Object.keys(e)[0], r = t.find((e) => e.accessor === n);
|
|
1322
1395
|
return r ? { [n]: r.width } : e;
|
|
1323
1396
|
})));
|
|
1324
1397
|
}, []);
|
|
1325
|
-
|
|
1326
|
-
!e || !v.current || g || (v.current = !1,
|
|
1398
|
+
c(() => {
|
|
1399
|
+
!e || !v.current || g || (v.current = !1, l(m));
|
|
1327
1400
|
}, [
|
|
1328
1401
|
e,
|
|
1329
1402
|
m,
|
|
1330
1403
|
g,
|
|
1331
|
-
|
|
1404
|
+
l
|
|
1332
1405
|
]);
|
|
1333
|
-
let b =
|
|
1406
|
+
let b = o((e, t) => {
|
|
1334
1407
|
y([{
|
|
1335
1408
|
accessor: e,
|
|
1336
1409
|
width: t
|
|
1337
1410
|
}]);
|
|
1338
|
-
}, [y]), x =
|
|
1411
|
+
}, [y]), x = o((e) => {
|
|
1339
1412
|
y(e);
|
|
1340
|
-
}, [y]), S =
|
|
1413
|
+
}, [y]), S = o(() => {
|
|
1341
1414
|
_(!0);
|
|
1342
1415
|
let e = r?.current;
|
|
1343
1416
|
if (!e) return;
|
|
@@ -1351,7 +1424,7 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
|
|
|
1351
1424
|
n.push({ [t]: `${r}px` });
|
|
1352
1425
|
}
|
|
1353
1426
|
v.current = !0, h(n);
|
|
1354
|
-
}, [r]), C =
|
|
1427
|
+
}, [r]), C = o(() => {
|
|
1355
1428
|
_(!1);
|
|
1356
1429
|
}, []);
|
|
1357
1430
|
return {
|
|
@@ -1359,12 +1432,12 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
|
|
|
1359
1432
|
setColumnsWidth: y,
|
|
1360
1433
|
setColumnWidth: b,
|
|
1361
1434
|
setMultipleColumnWidths: x,
|
|
1362
|
-
resetColumnsWidth:
|
|
1363
|
-
let e =
|
|
1435
|
+
resetColumnsWidth: o(() => {
|
|
1436
|
+
let e = a();
|
|
1364
1437
|
v.current = !0, h(e), _(!1);
|
|
1365
|
-
}, [
|
|
1438
|
+
}, [a]),
|
|
1366
1439
|
hasResizableColumns: i,
|
|
1367
|
-
allResizableWidthsInitial:
|
|
1440
|
+
allResizableWidthsInitial: u(() => {
|
|
1368
1441
|
if (!i) return !1;
|
|
1369
1442
|
let e = t.filter((e) => e.resizable && !e.hidden && e.accessor !== "__selection__");
|
|
1370
1443
|
return m.filter((t) => {
|
|
@@ -1379,27 +1452,27 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
|
|
|
1379
1452
|
t,
|
|
1380
1453
|
m
|
|
1381
1454
|
]),
|
|
1382
|
-
measureAndSetColumnWidths:
|
|
1455
|
+
measureAndSetColumnWidths: o(() => {}, []),
|
|
1383
1456
|
isResizing: g,
|
|
1384
1457
|
beginResize: S,
|
|
1385
1458
|
endResize: C
|
|
1386
1459
|
};
|
|
1387
1460
|
}
|
|
1388
|
-
function
|
|
1389
|
-
let r =
|
|
1461
|
+
function Pn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1462
|
+
let r = u(() => t?.map((e) => ({
|
|
1390
1463
|
accessor: e.accessor,
|
|
1391
1464
|
defaultToggle: e.defaultToggle || !0,
|
|
1392
1465
|
toggleable: e.toggleable,
|
|
1393
1466
|
toggled: e.defaultToggle === void 0 ? !0 : e.defaultToggle
|
|
1394
|
-
})), [t]), [i, a] =
|
|
1467
|
+
})), [t]), [i, a] = Ae({
|
|
1395
1468
|
key: e ? `${e}-columns-toggle` : "",
|
|
1396
1469
|
defaultValue: e ? r : void 0,
|
|
1397
1470
|
getInitialValueInEffect: n
|
|
1398
|
-
}), o =
|
|
1399
|
-
function
|
|
1471
|
+
}), o = xn(i, r, Sn);
|
|
1472
|
+
function s(t) {
|
|
1400
1473
|
e && a(t);
|
|
1401
1474
|
}
|
|
1402
|
-
let
|
|
1475
|
+
let l = u(() => {
|
|
1403
1476
|
if (!o) return r;
|
|
1404
1477
|
let e = [];
|
|
1405
1478
|
return o.forEach((n) => {
|
|
@@ -1417,47 +1490,47 @@ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1417
1490
|
t,
|
|
1418
1491
|
r
|
|
1419
1492
|
]);
|
|
1420
|
-
|
|
1421
|
-
e && o && JSON.stringify(
|
|
1493
|
+
c(() => {
|
|
1494
|
+
e && o && JSON.stringify(l) !== JSON.stringify(o) && a(l);
|
|
1422
1495
|
}, [
|
|
1423
1496
|
e,
|
|
1424
|
-
|
|
1497
|
+
l,
|
|
1425
1498
|
o,
|
|
1426
1499
|
a
|
|
1427
1500
|
]);
|
|
1428
1501
|
let d = () => {
|
|
1429
|
-
|
|
1502
|
+
s(r);
|
|
1430
1503
|
};
|
|
1431
1504
|
return e ? {
|
|
1432
|
-
columnsToggle:
|
|
1433
|
-
setColumnsToggle:
|
|
1505
|
+
columnsToggle: l,
|
|
1506
|
+
setColumnsToggle: s,
|
|
1434
1507
|
resetColumnsToggle: d
|
|
1435
1508
|
} : {
|
|
1436
1509
|
columnsToggle: o,
|
|
1437
|
-
setColumnsToggle:
|
|
1510
|
+
setColumnsToggle: s,
|
|
1438
1511
|
resetColumnsToggle: d
|
|
1439
1512
|
};
|
|
1440
1513
|
}
|
|
1441
|
-
var
|
|
1442
|
-
let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } =
|
|
1514
|
+
var Fn = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
|
|
1515
|
+
let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = Mn({
|
|
1443
1516
|
key: e,
|
|
1444
1517
|
columns: t,
|
|
1445
1518
|
getInitialValueInEffect: n
|
|
1446
|
-
}), { columnsToggle: c, setColumnsToggle:
|
|
1519
|
+
}), { columnsToggle: c, setColumnsToggle: l, resetColumnsToggle: d } = Pn({
|
|
1447
1520
|
key: e,
|
|
1448
1521
|
columns: t,
|
|
1449
1522
|
getInitialValueInEffect: n
|
|
1450
|
-
}), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } =
|
|
1523
|
+
}), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = jn({
|
|
1451
1524
|
key: e,
|
|
1452
1525
|
columns: t,
|
|
1453
1526
|
getInitialValueInEffect: n
|
|
1454
|
-
}), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } =
|
|
1527
|
+
}), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = Nn({
|
|
1455
1528
|
key: e,
|
|
1456
1529
|
columns: t,
|
|
1457
1530
|
getInitialValueInEffect: n,
|
|
1458
1531
|
headerRef: r,
|
|
1459
1532
|
scrollViewportRef: i
|
|
1460
|
-
}), E =
|
|
1533
|
+
}), E = u(() => {
|
|
1461
1534
|
let e;
|
|
1462
1535
|
e = a ? a.map((e) => t.find((t) => t.accessor === e)).map((e) => {
|
|
1463
1536
|
let t = f.find((t) => t.accessor === e?.accessor), n = e?.pinnable ? t?.pinned : e?.pinned;
|
|
@@ -1488,7 +1561,7 @@ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
|
|
|
1488
1561
|
c,
|
|
1489
1562
|
f,
|
|
1490
1563
|
h
|
|
1491
|
-
]), D =
|
|
1564
|
+
]), D = u(() => {
|
|
1492
1565
|
let e = E.filter((e) => !e.hidden && e.accessor !== "__selection__");
|
|
1493
1566
|
return e.length === 0 ? !1 : e.every((e) => typeof e.width == "string" && /px$/.test(e.width));
|
|
1494
1567
|
}, [E]);
|
|
@@ -1498,7 +1571,7 @@ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
|
|
|
1498
1571
|
columnsOrder: a,
|
|
1499
1572
|
resetColumnsOrder: s,
|
|
1500
1573
|
columnsToggle: c,
|
|
1501
|
-
setColumnsToggle:
|
|
1574
|
+
setColumnsToggle: l,
|
|
1502
1575
|
resetColumnsToggle: d,
|
|
1503
1576
|
columnsPinning: f,
|
|
1504
1577
|
setColumnsPinning: p,
|
|
@@ -1513,7 +1586,7 @@ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
|
|
|
1513
1586
|
measureAndSetColumnWidths: S,
|
|
1514
1587
|
isResizing: C,
|
|
1515
1588
|
isLocked: D,
|
|
1516
|
-
tableWidth:
|
|
1589
|
+
tableWidth: u(() => {
|
|
1517
1590
|
if (!D) return null;
|
|
1518
1591
|
let e = 0;
|
|
1519
1592
|
for (let t of E) {
|
|
@@ -1528,16 +1601,16 @@ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
|
|
|
1528
1601
|
beginResize: w,
|
|
1529
1602
|
endResize: T
|
|
1530
1603
|
};
|
|
1531
|
-
},
|
|
1532
|
-
function
|
|
1533
|
-
let t =
|
|
1604
|
+
}, In = typeof window < "u" ? l : c;
|
|
1605
|
+
function Ln(e) {
|
|
1606
|
+
let t = d(e);
|
|
1534
1607
|
return t.current = e, t;
|
|
1535
1608
|
}
|
|
1536
|
-
var
|
|
1537
|
-
function
|
|
1609
|
+
var Rn = "--mantine-datatable-header-height", zn = "--mantine-datatable-footer-height", Bn = "--mantine-datatable-selection-column-width", Vn = "--mantine-datatable-last-row-border-bottom";
|
|
1610
|
+
function Hn(e, t, n) {
|
|
1538
1611
|
e?.style.setProperty(t, n);
|
|
1539
1612
|
}
|
|
1540
|
-
function
|
|
1613
|
+
function Un(e) {
|
|
1541
1614
|
let t = e.borderBoxSize?.[0] || e.contentBoxSize?.[0];
|
|
1542
1615
|
return t ? {
|
|
1543
1616
|
width: t.inlineSize,
|
|
@@ -1547,35 +1620,35 @@ function Ln(e) {
|
|
|
1547
1620
|
height: e.contentRect.height
|
|
1548
1621
|
};
|
|
1549
1622
|
}
|
|
1550
|
-
function
|
|
1623
|
+
function Wn(e, t, n) {
|
|
1551
1624
|
if (e) {
|
|
1552
1625
|
let r = new ResizeObserver((e) => {
|
|
1553
1626
|
let n = e[0];
|
|
1554
|
-
n && t(
|
|
1627
|
+
n && t(Un(n));
|
|
1555
1628
|
});
|
|
1556
1629
|
return r.observe(e), () => {
|
|
1557
1630
|
r.disconnect(), n();
|
|
1558
1631
|
};
|
|
1559
1632
|
}
|
|
1560
1633
|
}
|
|
1561
|
-
function
|
|
1634
|
+
function Gn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
1562
1635
|
let n = {
|
|
1563
|
-
root:
|
|
1564
|
-
table:
|
|
1565
|
-
scrollViewport:
|
|
1566
|
-
header:
|
|
1567
|
-
footer:
|
|
1568
|
-
selectionColumnHeader:
|
|
1569
|
-
}, { root: r, table: i, scrollViewport:
|
|
1636
|
+
root: d(null),
|
|
1637
|
+
table: d(null),
|
|
1638
|
+
scrollViewport: d(null),
|
|
1639
|
+
header: d(null),
|
|
1640
|
+
footer: d(null),
|
|
1641
|
+
selectionColumnHeader: d(null)
|
|
1642
|
+
}, { root: r, table: i, scrollViewport: a, header: s, footer: l, selectionColumnHeader: u } = n, f = Ln({ withRowBorders: t }), p = Ln(e), m = d(() => {}), h = d(() => {}), g = o((e) => {
|
|
1570
1643
|
p.current.onScroll?.(e), m.current();
|
|
1571
1644
|
}, []);
|
|
1572
|
-
return
|
|
1573
|
-
|
|
1574
|
-
}, () =>
|
|
1575
|
-
|
|
1576
|
-
}, () =>
|
|
1577
|
-
|
|
1578
|
-
}, () =>
|
|
1645
|
+
return c(() => Wn(s.current, (e) => {
|
|
1646
|
+
Hn(r.current, Rn, `${e.height}px`);
|
|
1647
|
+
}, () => Hn(r.current, Rn, "0")), [s.current]), c(() => Wn(l.current, (e) => {
|
|
1648
|
+
Hn(r.current, zn, `${e.height}px`);
|
|
1649
|
+
}, () => Hn(r.current, zn, "0")), [l.current]), c(() => Wn(u.current, (e) => {
|
|
1650
|
+
Hn(r.current, Bn, `${e.width}px`);
|
|
1651
|
+
}, () => Hn(r.current, Bn, "0")), [u.current]), In(() => {
|
|
1579
1652
|
if (typeof window > "u") return;
|
|
1580
1653
|
let e = {
|
|
1581
1654
|
top: !0,
|
|
@@ -1589,60 +1662,60 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1589
1662
|
width: 0,
|
|
1590
1663
|
height: 0
|
|
1591
1664
|
};
|
|
1592
|
-
function
|
|
1665
|
+
function o(t, n) {
|
|
1593
1666
|
let i = e[t];
|
|
1594
|
-
return e[t] = n,
|
|
1667
|
+
return e[t] = n, Hn(r.current, `--mantine-datatable-${t}-shadow-opacity`, n ? "0" : "1"), i;
|
|
1595
1668
|
}
|
|
1596
1669
|
function s() {
|
|
1597
1670
|
let e = t.height - n.height, i = e < 0;
|
|
1598
|
-
|
|
1671
|
+
Hn(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), Hn(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
|
|
1599
1672
|
}
|
|
1600
1673
|
function c() {
|
|
1601
|
-
f.current.withRowBorders && t.height < n.height ?
|
|
1674
|
+
f.current.withRowBorders && t.height < n.height ? Hn(r.current, Vn, `${pe("1px")} solid var(--mantine-datatable-border-color)`) : Hn(r.current, Vn, "unset");
|
|
1602
1675
|
}
|
|
1603
1676
|
h.current = c;
|
|
1604
1677
|
function l() {
|
|
1605
|
-
let e = p.current, r =
|
|
1678
|
+
let e = p.current, r = a.current, i = r?.scrollTop ?? 0, s = r?.scrollLeft ?? 0, c = i === 0, l = t.height - i - n.height < 1, u = o("top", c), d = o("bottom", l);
|
|
1606
1679
|
c && c !== u && e.onScrollToTop?.(), l && l !== d && e.onScrollToBottom?.();
|
|
1607
1680
|
let f = r ? getComputedStyle(r).direction === "rtl" : !1, m = (r?.scrollWidth ?? 0) - n.width, h, g;
|
|
1608
1681
|
if (f) {
|
|
1609
1682
|
let e = Math.abs(s);
|
|
1610
1683
|
g = e < 1, h = m - e < 1;
|
|
1611
1684
|
} else h = s < 1, g = t.width - s - n.width < 1;
|
|
1612
|
-
let _ =
|
|
1685
|
+
let _ = o("left", h), v = o("right", g);
|
|
1613
1686
|
h && h !== _ && e.onScrollToLeft?.(), g && g !== v && e.onScrollToRight?.();
|
|
1614
1687
|
}
|
|
1615
1688
|
m.current = l;
|
|
1616
1689
|
let u = new ResizeObserver((e) => {
|
|
1617
1690
|
for (let r of e) switch (r.target.tagName) {
|
|
1618
1691
|
case "TABLE":
|
|
1619
|
-
t =
|
|
1692
|
+
t = Un(r);
|
|
1620
1693
|
break;
|
|
1621
1694
|
case "DIV":
|
|
1622
|
-
n =
|
|
1695
|
+
n = Un(r);
|
|
1623
1696
|
break;
|
|
1624
1697
|
}
|
|
1625
1698
|
l(), s(), c();
|
|
1626
1699
|
});
|
|
1627
|
-
return u.observe(i.current), u.observe(
|
|
1700
|
+
return u.observe(i.current), u.observe(a.current), () => {
|
|
1628
1701
|
u.disconnect();
|
|
1629
1702
|
};
|
|
1630
|
-
}, []),
|
|
1703
|
+
}, []), In(() => {
|
|
1631
1704
|
h.current();
|
|
1632
1705
|
}, [t]), {
|
|
1633
1706
|
refs: n,
|
|
1634
1707
|
onScroll: g
|
|
1635
1708
|
};
|
|
1636
1709
|
}
|
|
1637
|
-
function
|
|
1638
|
-
let [l, u] =
|
|
1639
|
-
if (!
|
|
1640
|
-
let
|
|
1641
|
-
if (!
|
|
1642
|
-
let
|
|
1710
|
+
function Kn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: a, pinLastColumn: s }) {
|
|
1711
|
+
let [l, u] = f(/* @__PURE__ */ new Map()), d = o(() => {
|
|
1712
|
+
if (!a && !s && !e.some((e) => e.pinned)) return;
|
|
1713
|
+
let o = t.current ?? n.current;
|
|
1714
|
+
if (!o) return;
|
|
1715
|
+
let c = !!t.current, l = c ? o.querySelector("tr:last-of-type") : o.querySelector("tr:first-of-type");
|
|
1643
1716
|
if (!l) return;
|
|
1644
|
-
let d = getComputedStyle(
|
|
1645
|
-
if (
|
|
1717
|
+
let d = getComputedStyle(o).direction === "rtl", f = /* @__PURE__ */ new Map();
|
|
1718
|
+
if (c) l.querySelectorAll("th[data-accessor]").forEach((e) => {
|
|
1646
1719
|
let t = e.dataset.accessor;
|
|
1647
1720
|
if (t) {
|
|
1648
1721
|
let n = e.getBoundingClientRect().width;
|
|
@@ -1660,13 +1733,13 @@ function Bn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
|
|
|
1660
1733
|
}
|
|
1661
1734
|
let p = 0;
|
|
1662
1735
|
if (i) {
|
|
1663
|
-
let e = r.current ??
|
|
1736
|
+
let e = r.current ?? o.querySelector(c ? ".mantine-datatable-header-selector-cell" : ".mantine-datatable-row-selector-cell");
|
|
1664
1737
|
e && (p = e.getBoundingClientRect().width);
|
|
1665
1738
|
}
|
|
1666
1739
|
let m = e.filter((e) => !e.hidden && f.has(String(e.accessor))).map((e) => String(e.accessor)), h = /* @__PURE__ */ new Map();
|
|
1667
1740
|
for (let t of e) {
|
|
1668
1741
|
let e = String(t.accessor);
|
|
1669
|
-
m.includes(e) && (t.pinned ? h.set(e, t.pinned) :
|
|
1742
|
+
m.includes(e) && (t.pinned ? h.set(e, t.pinned) : a && e === m[0] && !h.has(e) ? h.set(e, "left") : s && e === m[m.length - 1] && !h.has(e) && h.set(e, "right"));
|
|
1670
1743
|
}
|
|
1671
1744
|
let g = m.filter((e) => h.get(e) === "left"), _ = m.filter((e) => h.get(e) === "right"), v = /* @__PURE__ */ new Map(), y = p;
|
|
1672
1745
|
g.forEach((e, t) => {
|
|
@@ -1699,39 +1772,39 @@ function Bn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
|
|
|
1699
1772
|
t,
|
|
1700
1773
|
n,
|
|
1701
1774
|
r,
|
|
1702
|
-
|
|
1703
|
-
|
|
1775
|
+
a,
|
|
1776
|
+
s
|
|
1704
1777
|
]);
|
|
1705
|
-
return
|
|
1706
|
-
if (!
|
|
1778
|
+
return c(() => {
|
|
1779
|
+
if (!a && !s && !e.some((e) => e.pinned)) return;
|
|
1707
1780
|
let r = t.current ?? n.current;
|
|
1708
1781
|
if (!r) return;
|
|
1709
|
-
let i = !!t.current,
|
|
1710
|
-
if (!
|
|
1711
|
-
let
|
|
1712
|
-
return
|
|
1713
|
-
|
|
1714
|
-
}), () =>
|
|
1782
|
+
let i = !!t.current, o = i ? r.querySelector("tr:last-of-type") : r.querySelector("tr:first-of-type");
|
|
1783
|
+
if (!o) return;
|
|
1784
|
+
let c = new ResizeObserver(d);
|
|
1785
|
+
return o.querySelectorAll(i ? "th" : "td").forEach((e) => {
|
|
1786
|
+
c.observe(e);
|
|
1787
|
+
}), () => c.disconnect();
|
|
1715
1788
|
}, [
|
|
1716
1789
|
t,
|
|
1717
1790
|
n,
|
|
1718
|
-
|
|
1719
|
-
]),
|
|
1791
|
+
d
|
|
1792
|
+
]), In(d, [d]), {
|
|
1720
1793
|
pinnedMap: l,
|
|
1721
1794
|
hasLeftPinned: [...l.values()].some((e) => e.logicalSide === "left"),
|
|
1722
1795
|
hasRightPinned: [...l.values()].some((e) => e.logicalSide === "right")
|
|
1723
1796
|
};
|
|
1724
1797
|
}
|
|
1725
|
-
function
|
|
1726
|
-
let [t, n] =
|
|
1727
|
-
return
|
|
1798
|
+
function qn(e) {
|
|
1799
|
+
let [t, n] = f(null);
|
|
1800
|
+
return c(() => {
|
|
1728
1801
|
n(null);
|
|
1729
1802
|
}, [e?.join(":") || ""]), {
|
|
1730
1803
|
lastSelectionChangeIndex: t,
|
|
1731
1804
|
setLastSelectionChangeIndex: n
|
|
1732
1805
|
};
|
|
1733
1806
|
}
|
|
1734
|
-
function
|
|
1807
|
+
function Jn(e, t) {
|
|
1735
1808
|
let n = () => {
|
|
1736
1809
|
t(e.map((e) => e.matches));
|
|
1737
1810
|
}, r = e.map((e) => {
|
|
@@ -1747,48 +1820,48 @@ function Hn(e, t) {
|
|
|
1747
1820
|
});
|
|
1748
1821
|
};
|
|
1749
1822
|
}
|
|
1750
|
-
function
|
|
1823
|
+
function Yn(e, t) {
|
|
1751
1824
|
return t || (typeof window < "u" && "matchMedia" in window ? e.map((e) => window.matchMedia(e).matches) : e.map(() => !1));
|
|
1752
1825
|
}
|
|
1753
|
-
function
|
|
1754
|
-
let [r, i] =
|
|
1755
|
-
return
|
|
1756
|
-
if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)),
|
|
1826
|
+
function Xn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
|
|
1827
|
+
let [r, i] = f(n ? t : Yn(e, t)), a = d(null);
|
|
1828
|
+
return c(() => {
|
|
1829
|
+
if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)), Jn(a.current, (e) => {
|
|
1757
1830
|
i(e);
|
|
1758
1831
|
});
|
|
1759
1832
|
}, [e]), r;
|
|
1760
1833
|
}
|
|
1761
|
-
function
|
|
1762
|
-
let t =
|
|
1763
|
-
return
|
|
1834
|
+
function Zn(e) {
|
|
1835
|
+
let t = he();
|
|
1836
|
+
return Xn(u(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), u(() => e.map(() => !0), [e]));
|
|
1764
1837
|
}
|
|
1765
|
-
function
|
|
1766
|
-
let t =
|
|
1838
|
+
function Qn(e) {
|
|
1839
|
+
let t = he();
|
|
1767
1840
|
return je((typeof e == "function" ? e(t) : e) || "", !0);
|
|
1768
1841
|
}
|
|
1769
|
-
function
|
|
1842
|
+
function $n({ rowExpansion: e, records: t, idAccessor: n }) {
|
|
1770
1843
|
let r = [];
|
|
1771
1844
|
if (e && t) {
|
|
1772
1845
|
let { trigger: i, allowMultiple: a, initiallyExpanded: o } = e;
|
|
1773
|
-
t && i === "always" ? r = t.map((e) =>
|
|
1846
|
+
t && i === "always" ? r = t.map((e) => $(e, n)) : o && (r = t.filter((e, t) => o({
|
|
1774
1847
|
record: e,
|
|
1775
1848
|
index: t
|
|
1776
|
-
})).map((e) =>
|
|
1849
|
+
})).map((e) => $(e, n)), a || (r = [r[0]]));
|
|
1777
1850
|
}
|
|
1778
|
-
let i, a, o =
|
|
1851
|
+
let i, a, o = f(r);
|
|
1779
1852
|
if (e) {
|
|
1780
1853
|
let { expandable: t, trigger: r, allowMultiple: s, collapseProps: c, content: l } = e;
|
|
1781
1854
|
e.expanded ? {recordIds: i, onRecordIdsChange: a} = e.expanded : [i, a] = o;
|
|
1782
|
-
let u = (e) => a?.(i.filter((t) => t !==
|
|
1855
|
+
let u = (e) => a?.(i.filter((t) => t !== $(e, n)));
|
|
1783
1856
|
return {
|
|
1784
1857
|
expandOnClick: r !== "always" && r !== "never",
|
|
1785
|
-
isRowExpanded: (e) => r === "always" ? !0 : i.includes(
|
|
1858
|
+
isRowExpanded: (e) => r === "always" ? !0 : i.includes($(e, n)),
|
|
1786
1859
|
isExpandable: ({ record: e, index: n }) => t ? t({
|
|
1787
1860
|
record: e,
|
|
1788
1861
|
index: n
|
|
1789
1862
|
}) : !0,
|
|
1790
1863
|
expandRow: (e) => {
|
|
1791
|
-
let t =
|
|
1864
|
+
let t = $(e, n);
|
|
1792
1865
|
a?.(s ? [...i, t] : [t]);
|
|
1793
1866
|
},
|
|
1794
1867
|
collapseRow: u,
|
|
@@ -1801,30 +1874,30 @@ function qn({ rowExpansion: e, records: t, idAccessor: n }) {
|
|
|
1801
1874
|
};
|
|
1802
1875
|
}
|
|
1803
1876
|
}
|
|
1804
|
-
function
|
|
1805
|
-
let [n, r] =
|
|
1806
|
-
return
|
|
1807
|
-
e ? (
|
|
1877
|
+
function er(e, t) {
|
|
1878
|
+
let [n, r] = f(e), [i, a] = f(e), o = Ne(() => r(!0), 0), s = Ne(() => a(!1), t || 200);
|
|
1879
|
+
return c(() => {
|
|
1880
|
+
e ? (s.clear(), a(!0), o.start()) : (o.clear(), r(!1), s.start());
|
|
1808
1881
|
}, [
|
|
1809
1882
|
o,
|
|
1810
|
-
|
|
1883
|
+
s,
|
|
1811
1884
|
e
|
|
1812
1885
|
]), {
|
|
1813
1886
|
expanded: n,
|
|
1814
1887
|
visible: i
|
|
1815
1888
|
};
|
|
1816
1889
|
}
|
|
1817
|
-
var
|
|
1818
|
-
function
|
|
1819
|
-
return
|
|
1890
|
+
var tr = "mantine-datatable-nowrap", nr = "mantine-datatable-ellipsis", rr = "mantine-datatable-pointer-cursor", ir = "mantine-datatable-context-menu-cursor", ar = "mantine-datatable-text-selection-disabled", or = "mantine-datatable-text-align-left", sr = "mantine-datatable-text-align-center", cr = "mantine-datatable-text-align-right";
|
|
1891
|
+
function lr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
|
|
1892
|
+
return Qn(r) ? m(B, {
|
|
1820
1893
|
"data-pinned": n?.position,
|
|
1821
1894
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
1822
|
-
className:
|
|
1823
|
-
[
|
|
1824
|
-
[
|
|
1825
|
-
[
|
|
1826
|
-
[
|
|
1827
|
-
[
|
|
1895
|
+
className: Z({
|
|
1896
|
+
[tr]: a || o,
|
|
1897
|
+
[nr]: o,
|
|
1898
|
+
[or]: s === "left",
|
|
1899
|
+
[sr]: s === "center",
|
|
1900
|
+
[cr]: s === "right"
|
|
1828
1901
|
}, e),
|
|
1829
1902
|
style: [
|
|
1830
1903
|
{
|
|
@@ -1842,24 +1915,24 @@ function rr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
|
|
|
1842
1915
|
children: i
|
|
1843
1916
|
}) : null;
|
|
1844
1917
|
}
|
|
1845
|
-
function
|
|
1846
|
-
return
|
|
1918
|
+
function ur({ shadowVisible: e }) {
|
|
1919
|
+
return m(B, {
|
|
1847
1920
|
className: "mantine-datatable-footer-selector-placeholder-cell",
|
|
1848
1921
|
"data-shadow-visible": e || void 0
|
|
1849
1922
|
});
|
|
1850
1923
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
1924
|
+
function dr({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
|
|
1925
|
+
return m(oe, {
|
|
1853
1926
|
ref: s,
|
|
1854
|
-
className:
|
|
1927
|
+
className: Z("mantine-datatable-footer", e),
|
|
1855
1928
|
style: t,
|
|
1856
|
-
children:
|
|
1929
|
+
children: h(V, { children: [a && m(ur, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
|
|
1857
1930
|
if (e) return null;
|
|
1858
1931
|
let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
|
|
1859
1932
|
...r,
|
|
1860
1933
|
...t
|
|
1861
1934
|
};
|
|
1862
|
-
return
|
|
1935
|
+
return m(lr, {
|
|
1863
1936
|
pinnedInfo: i.get(String(n)),
|
|
1864
1937
|
className: l,
|
|
1865
1938
|
style: u,
|
|
@@ -1873,8 +1946,8 @@ function ar({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedM
|
|
|
1873
1946
|
})] })
|
|
1874
1947
|
});
|
|
1875
1948
|
}
|
|
1876
|
-
function
|
|
1877
|
-
let g =
|
|
1949
|
+
function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, className: a, style: o }, pinnedInfo: s, maxDepth: c, currentDepth: l, previousGroups: d, isLastGroup: f, withColumnBorders: p = !1, totalTableColumns: h }) {
|
|
1950
|
+
let g = u(() => t && t.length > 0 ? t : n && n.length > 0 ? Dn([{
|
|
1878
1951
|
id: e,
|
|
1879
1952
|
columns: t,
|
|
1880
1953
|
groups: n
|
|
@@ -1882,7 +1955,7 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1882
1955
|
t,
|
|
1883
1956
|
n,
|
|
1884
1957
|
e
|
|
1885
|
-
]), _ =
|
|
1958
|
+
]), _ = Zn(u(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = u(() => On({
|
|
1886
1959
|
id: e,
|
|
1887
1960
|
columns: t,
|
|
1888
1961
|
groups: n
|
|
@@ -1891,16 +1964,16 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1891
1964
|
t,
|
|
1892
1965
|
n,
|
|
1893
1966
|
_
|
|
1894
|
-
]), y =
|
|
1895
|
-
return v > 0 ?
|
|
1967
|
+
]), y = u(() => d.reduce((e, t) => e + On(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - l, x = An(f, y + v < h, p);
|
|
1968
|
+
return v > 0 ? m(B, {
|
|
1896
1969
|
colSpan: v,
|
|
1897
1970
|
rowSpan: b > 1 ? b : void 0,
|
|
1898
1971
|
"data-pinned": s?.position,
|
|
1899
1972
|
"data-pinned-shadow": s?.isBoundary ? s.position : void 0,
|
|
1900
|
-
className:
|
|
1901
|
-
[
|
|
1902
|
-
[
|
|
1903
|
-
[
|
|
1973
|
+
className: Z("mantine-datatable-column-group-header-cell", {
|
|
1974
|
+
[or]: i === "left",
|
|
1975
|
+
[sr]: i === "center",
|
|
1976
|
+
[cr]: i === "right",
|
|
1904
1977
|
"mantine-datatable-column-group-header-cell--needs-border": x
|
|
1905
1978
|
}, a),
|
|
1906
1979
|
style: [o, s && {
|
|
@@ -1908,11 +1981,11 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1908
1981
|
[s.position]: s.offset,
|
|
1909
1982
|
overflow: "visible"
|
|
1910
1983
|
}],
|
|
1911
|
-
children: r ??
|
|
1984
|
+
children: r ?? bn(e)
|
|
1912
1985
|
}) : null;
|
|
1913
1986
|
}
|
|
1914
|
-
function
|
|
1915
|
-
return
|
|
1987
|
+
function pr() {
|
|
1988
|
+
return h("svg", {
|
|
1916
1989
|
width: "14",
|
|
1917
1990
|
height: "14",
|
|
1918
1991
|
viewBox: "0 0 24 24",
|
|
@@ -1921,15 +1994,15 @@ function sr() {
|
|
|
1921
1994
|
fill: "none",
|
|
1922
1995
|
strokeLinecap: "round",
|
|
1923
1996
|
strokeLinejoin: "round",
|
|
1924
|
-
children: [
|
|
1997
|
+
children: [m("path", {
|
|
1925
1998
|
stroke: "none",
|
|
1926
1999
|
d: "M0 0h24v24H0z",
|
|
1927
2000
|
fill: "none"
|
|
1928
|
-
}),
|
|
2001
|
+
}), m("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" })]
|
|
1929
2002
|
});
|
|
1930
2003
|
}
|
|
1931
|
-
function
|
|
1932
|
-
return
|
|
2004
|
+
function mr() {
|
|
2005
|
+
return h("svg", {
|
|
1933
2006
|
width: "14",
|
|
1934
2007
|
height: "14",
|
|
1935
2008
|
viewBox: "0 0 24 24",
|
|
@@ -1938,20 +2011,20 @@ function cr() {
|
|
|
1938
2011
|
fill: "none",
|
|
1939
2012
|
strokeLinecap: "round",
|
|
1940
2013
|
strokeLinejoin: "round",
|
|
1941
|
-
children: [
|
|
2014
|
+
children: [m("path", {
|
|
1942
2015
|
stroke: "none",
|
|
1943
2016
|
d: "M0 0h24v24H0z",
|
|
1944
2017
|
fill: "none"
|
|
1945
|
-
}),
|
|
2018
|
+
}), m("path", {
|
|
1946
2019
|
d: "M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",
|
|
1947
2020
|
strokeWidth: "0",
|
|
1948
2021
|
fill: "currentColor"
|
|
1949
2022
|
})]
|
|
1950
2023
|
});
|
|
1951
2024
|
}
|
|
1952
|
-
function
|
|
1953
|
-
let [i, { close: a, toggle: o }] =
|
|
1954
|
-
return r && (c = void 0),
|
|
2025
|
+
function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
|
|
2026
|
+
let [i, { close: a, toggle: o }] = ke(!1), s = t ? mr : pr, c = Oe(a);
|
|
2027
|
+
return r && (c = void 0), h(F, {
|
|
1955
2028
|
withArrow: !0,
|
|
1956
2029
|
shadow: "md",
|
|
1957
2030
|
trapFocus: !0,
|
|
@@ -1959,7 +2032,7 @@ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
|
|
|
1959
2032
|
opened: i,
|
|
1960
2033
|
onClose: a,
|
|
1961
2034
|
onDismiss: a,
|
|
1962
|
-
children: [
|
|
2035
|
+
children: [m(L, { children: m(_, {
|
|
1963
2036
|
className: "mantine-datatable-header-cell-filter-action-icon",
|
|
1964
2037
|
"data-active": t || void 0,
|
|
1965
2038
|
size: "sm",
|
|
@@ -1968,8 +2041,8 @@ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
|
|
|
1968
2041
|
e.preventDefault(), o();
|
|
1969
2042
|
},
|
|
1970
2043
|
onKeyDown: (e) => e.stopPropagation(),
|
|
1971
|
-
children:
|
|
1972
|
-
}) }),
|
|
2044
|
+
children: m(s, {})
|
|
2045
|
+
}) }), m(I, {
|
|
1973
2046
|
ref: c,
|
|
1974
2047
|
onClick: (e) => e.stopPropagation(),
|
|
1975
2048
|
onKeyDown: (e) => e.stopPropagation(),
|
|
@@ -1977,8 +2050,8 @@ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
|
|
|
1977
2050
|
})]
|
|
1978
2051
|
});
|
|
1979
2052
|
}
|
|
1980
|
-
function
|
|
1981
|
-
return
|
|
2053
|
+
function gr() {
|
|
2054
|
+
return h("svg", {
|
|
1982
2055
|
width: "14",
|
|
1983
2056
|
height: "14",
|
|
1984
2057
|
viewBox: "0 0 24 24",
|
|
@@ -1988,19 +2061,19 @@ function ur() {
|
|
|
1988
2061
|
strokeLinecap: "round",
|
|
1989
2062
|
strokeLinejoin: "round",
|
|
1990
2063
|
children: [
|
|
1991
|
-
|
|
2064
|
+
m("path", {
|
|
1992
2065
|
stroke: "none",
|
|
1993
2066
|
d: "M0 0h24v24H0z",
|
|
1994
2067
|
fill: "none"
|
|
1995
2068
|
}),
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2069
|
+
m("path", { d: "M5 12l14 0" }),
|
|
2070
|
+
m("path", { d: "M5 12l6 6" }),
|
|
2071
|
+
m("path", { d: "M5 12l6 -6" })
|
|
1999
2072
|
]
|
|
2000
2073
|
});
|
|
2001
2074
|
}
|
|
2002
|
-
function
|
|
2003
|
-
return
|
|
2075
|
+
function _r() {
|
|
2076
|
+
return h("svg", {
|
|
2004
2077
|
width: "14",
|
|
2005
2078
|
height: "14",
|
|
2006
2079
|
viewBox: "0 0 24 24",
|
|
@@ -2010,19 +2083,19 @@ function dr() {
|
|
|
2010
2083
|
strokeLinecap: "round",
|
|
2011
2084
|
strokeLinejoin: "round",
|
|
2012
2085
|
children: [
|
|
2013
|
-
|
|
2086
|
+
m("path", {
|
|
2014
2087
|
stroke: "none",
|
|
2015
2088
|
d: "M0 0h24v24H0z",
|
|
2016
2089
|
fill: "none"
|
|
2017
2090
|
}),
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2091
|
+
m("path", { d: "M5 12l14 0" }),
|
|
2092
|
+
m("path", { d: "M19 12l-6 6" }),
|
|
2093
|
+
m("path", { d: "M19 12l-6 -6" })
|
|
2021
2094
|
]
|
|
2022
2095
|
});
|
|
2023
2096
|
}
|
|
2024
|
-
function
|
|
2025
|
-
return
|
|
2097
|
+
function vr() {
|
|
2098
|
+
return h("svg", {
|
|
2026
2099
|
width: "14",
|
|
2027
2100
|
height: "14",
|
|
2028
2101
|
viewBox: "0 0 24 24",
|
|
@@ -2032,19 +2105,19 @@ function fr() {
|
|
|
2032
2105
|
strokeLinecap: "round",
|
|
2033
2106
|
strokeLinejoin: "round",
|
|
2034
2107
|
children: [
|
|
2035
|
-
|
|
2108
|
+
m("path", {
|
|
2036
2109
|
stroke: "none",
|
|
2037
2110
|
d: "M0 0h24v24H0z",
|
|
2038
2111
|
fill: "none"
|
|
2039
2112
|
}),
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2113
|
+
m("path", { d: "M9 4v6l-2 4v2h10v-2l-2-4v-6" }),
|
|
2114
|
+
m("path", { d: "M12 16v5" }),
|
|
2115
|
+
m("path", { d: "M8 4h8" })
|
|
2043
2116
|
]
|
|
2044
2117
|
});
|
|
2045
2118
|
}
|
|
2046
|
-
function
|
|
2047
|
-
return
|
|
2119
|
+
function yr() {
|
|
2120
|
+
return h("svg", {
|
|
2048
2121
|
width: "14",
|
|
2049
2122
|
height: "14",
|
|
2050
2123
|
viewBox: "0 0 24 24",
|
|
@@ -2054,126 +2127,126 @@ function pr() {
|
|
|
2054
2127
|
strokeLinecap: "round",
|
|
2055
2128
|
strokeLinejoin: "round",
|
|
2056
2129
|
children: [
|
|
2057
|
-
|
|
2130
|
+
m("path", {
|
|
2058
2131
|
stroke: "none",
|
|
2059
2132
|
d: "M0 0h24v24H0z",
|
|
2060
2133
|
fill: "none"
|
|
2061
2134
|
}),
|
|
2062
|
-
|
|
2063
|
-
|
|
2135
|
+
m("path", { d: "M18 6l-12 12" }),
|
|
2136
|
+
m("path", { d: "M6 6l12 12" })
|
|
2064
2137
|
]
|
|
2065
2138
|
});
|
|
2066
2139
|
}
|
|
2067
|
-
function
|
|
2068
|
-
let [n, r] =
|
|
2140
|
+
function br({ currentPinned: e, onPinChange: t }) {
|
|
2141
|
+
let [n, r] = f(!1), i = d(null), [a, s] = f(!1), l = o(() => {
|
|
2069
2142
|
if (i.current) {
|
|
2070
2143
|
let e = getComputedStyle(i.current).direction;
|
|
2071
|
-
|
|
2144
|
+
s(e === "rtl");
|
|
2072
2145
|
}
|
|
2073
2146
|
}, []);
|
|
2074
|
-
|
|
2147
|
+
In(() => {
|
|
2075
2148
|
l();
|
|
2076
|
-
}, [l]),
|
|
2149
|
+
}, [l]), c(() => {
|
|
2077
2150
|
n && l();
|
|
2078
2151
|
}, [n, l]);
|
|
2079
|
-
let
|
|
2080
|
-
return
|
|
2152
|
+
let u = a ? "right" : "left", p = a ? "left" : "right", g = e === u, v = e === p;
|
|
2153
|
+
return h(F, {
|
|
2081
2154
|
opened: n,
|
|
2082
2155
|
onChange: r,
|
|
2083
2156
|
position: "bottom",
|
|
2084
2157
|
withArrow: !0,
|
|
2085
2158
|
shadow: "sm",
|
|
2086
|
-
children: [
|
|
2159
|
+
children: [m(F.Target, { children: m(x, {
|
|
2087
2160
|
ref: i,
|
|
2088
2161
|
className: "mantine-datatable-header-cell-pinnable-icon",
|
|
2089
2162
|
role: "button",
|
|
2090
2163
|
"aria-label": "Pin column",
|
|
2091
2164
|
onMouseEnter: () => r(!0),
|
|
2092
2165
|
onMouseLeave: () => r(!1),
|
|
2093
|
-
children:
|
|
2166
|
+
children: m(_, {
|
|
2094
2167
|
size: "xs",
|
|
2095
2168
|
variant: "light",
|
|
2096
2169
|
onClick: (e) => e.stopPropagation(),
|
|
2097
|
-
children:
|
|
2170
|
+
children: m(vr, {})
|
|
2098
2171
|
})
|
|
2099
|
-
}) }),
|
|
2172
|
+
}) }), m(F.Dropdown, {
|
|
2100
2173
|
onClick: (e) => e.stopPropagation(),
|
|
2101
2174
|
onMouseEnter: () => r(!0),
|
|
2102
2175
|
onMouseLeave: () => r(!1),
|
|
2103
2176
|
className: "mantine-datatable-pinnable-dropdown",
|
|
2104
|
-
children:
|
|
2177
|
+
children: h(E, {
|
|
2105
2178
|
gap: 4,
|
|
2106
2179
|
children: [
|
|
2107
|
-
|
|
2180
|
+
m(_, {
|
|
2108
2181
|
size: "sm",
|
|
2109
|
-
variant:
|
|
2110
|
-
onClick: () => t(
|
|
2182
|
+
variant: g ? "filled" : "light",
|
|
2183
|
+
onClick: () => t(g ? void 0 : u),
|
|
2111
2184
|
"aria-label": "Pin left",
|
|
2112
|
-
children:
|
|
2185
|
+
children: m(gr, {})
|
|
2113
2186
|
}),
|
|
2114
|
-
|
|
2187
|
+
m(_, {
|
|
2115
2188
|
size: "sm",
|
|
2116
2189
|
variant: v ? "filled" : "light",
|
|
2117
|
-
onClick: () => t(v ? void 0 :
|
|
2190
|
+
onClick: () => t(v ? void 0 : p),
|
|
2118
2191
|
"aria-label": "Pin right",
|
|
2119
|
-
children:
|
|
2192
|
+
children: m(_r, {})
|
|
2120
2193
|
}),
|
|
2121
|
-
e &&
|
|
2194
|
+
e && m(_, {
|
|
2122
2195
|
size: "sm",
|
|
2123
2196
|
variant: "light",
|
|
2124
2197
|
color: "red",
|
|
2125
2198
|
onClick: () => t(void 0),
|
|
2126
2199
|
"aria-label": "Unpin",
|
|
2127
|
-
children:
|
|
2200
|
+
children: m(yr, {})
|
|
2128
2201
|
})
|
|
2129
2202
|
]
|
|
2130
2203
|
})
|
|
2131
2204
|
})]
|
|
2132
2205
|
});
|
|
2133
2206
|
}
|
|
2134
|
-
var
|
|
2135
|
-
let { accessor: t, columnRef: n } = e, [r, i] =
|
|
2207
|
+
var xr = 50, Sr = (e) => {
|
|
2208
|
+
let { accessor: t, columnRef: n } = e, [r, i] = f(!1), a = d(0), s = d({
|
|
2136
2209
|
current: 0,
|
|
2137
2210
|
next: 0
|
|
2138
|
-
}), { dir: c } =
|
|
2211
|
+
}), { dir: c } = me(), l = c === "rtl", { setMultipleColumnWidths: u, beginResize: p, endResize: h } = hn(), g = o((e) => {
|
|
2139
2212
|
if (e.preventDefault(), e.stopPropagation(), !n.current) return;
|
|
2140
|
-
let r = n.current,
|
|
2141
|
-
for (;
|
|
2142
|
-
let e =
|
|
2213
|
+
let r = n.current, o = r.nextElementSibling;
|
|
2214
|
+
for (; o;) {
|
|
2215
|
+
let e = o.getAttribute("data-accessor");
|
|
2143
2216
|
if (e && e !== "__selection__") break;
|
|
2144
|
-
|
|
2217
|
+
o = o.nextElementSibling;
|
|
2145
2218
|
}
|
|
2146
|
-
if (!
|
|
2147
|
-
let c =
|
|
2219
|
+
if (!o) return;
|
|
2220
|
+
let c = o.getAttribute("data-accessor");
|
|
2148
2221
|
if (!c) return;
|
|
2149
|
-
let
|
|
2150
|
-
|
|
2151
|
-
current:
|
|
2152
|
-
next:
|
|
2222
|
+
let d = r.offsetWidth, f = o.offsetWidth;
|
|
2223
|
+
p(), i(!0), a.current = e.clientX, s.current = {
|
|
2224
|
+
current: d,
|
|
2225
|
+
next: f
|
|
2153
2226
|
};
|
|
2154
|
-
let
|
|
2155
|
-
let n = e.clientX -
|
|
2227
|
+
let m = (e) => {
|
|
2228
|
+
let n = e.clientX - a.current;
|
|
2156
2229
|
l && (n = -n);
|
|
2157
|
-
let r = s.current.current -
|
|
2158
|
-
|
|
2230
|
+
let r = s.current.current - xr, i = s.current.next - xr, o = Math.max(-r, Math.min(n, i)), d = s.current.current + o, f = s.current.next - o;
|
|
2231
|
+
u([{
|
|
2159
2232
|
accessor: t,
|
|
2160
|
-
width: `${
|
|
2233
|
+
width: `${d}px`
|
|
2161
2234
|
}, {
|
|
2162
2235
|
accessor: c,
|
|
2163
|
-
width: `${
|
|
2236
|
+
width: `${f}px`
|
|
2164
2237
|
}]);
|
|
2165
2238
|
}, g = () => {
|
|
2166
|
-
i(!1), document.body.style.cursor = "initial", document.body.style.userSelect = "initial", h(), document.removeEventListener("mousemove",
|
|
2239
|
+
i(!1), document.body.style.cursor = "initial", document.body.style.userSelect = "initial", h(), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", g);
|
|
2167
2240
|
};
|
|
2168
|
-
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove",
|
|
2241
|
+
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", m), document.addEventListener("mouseup", g);
|
|
2169
2242
|
}, [
|
|
2170
2243
|
t,
|
|
2171
2244
|
n,
|
|
2172
2245
|
l,
|
|
2173
|
-
|
|
2174
|
-
|
|
2246
|
+
u,
|
|
2247
|
+
p,
|
|
2175
2248
|
h
|
|
2176
|
-
]), _ =
|
|
2249
|
+
]), _ = o(() => {
|
|
2177
2250
|
if (!n.current) return;
|
|
2178
2251
|
let e = n.current.nextElementSibling, r = [{
|
|
2179
2252
|
accessor: t,
|
|
@@ -2186,13 +2259,13 @@ var hr = 50, gr = (e) => {
|
|
|
2186
2259
|
width: "auto"
|
|
2187
2260
|
});
|
|
2188
2261
|
}
|
|
2189
|
-
|
|
2262
|
+
u(r);
|
|
2190
2263
|
}, [
|
|
2191
2264
|
t,
|
|
2192
2265
|
n,
|
|
2193
|
-
|
|
2266
|
+
u
|
|
2194
2267
|
]);
|
|
2195
|
-
return
|
|
2268
|
+
return m("div", {
|
|
2196
2269
|
className: "mantine-datatable-header-resizable-handle",
|
|
2197
2270
|
style: { cursor: r ? "col-resize" : void 0 },
|
|
2198
2271
|
onMouseDown: g,
|
|
@@ -2201,8 +2274,8 @@ var hr = 50, gr = (e) => {
|
|
|
2201
2274
|
title: "Drag to resize column, double-click to reset"
|
|
2202
2275
|
});
|
|
2203
2276
|
};
|
|
2204
|
-
function
|
|
2205
|
-
return
|
|
2277
|
+
function Cr() {
|
|
2278
|
+
return h("svg", {
|
|
2206
2279
|
width: "14",
|
|
2207
2280
|
height: "14",
|
|
2208
2281
|
viewBox: "0 0 24 24",
|
|
@@ -2212,19 +2285,19 @@ function _r() {
|
|
|
2212
2285
|
strokeLinecap: "round",
|
|
2213
2286
|
strokeLinejoin: "round",
|
|
2214
2287
|
children: [
|
|
2215
|
-
|
|
2288
|
+
m("path", {
|
|
2216
2289
|
stroke: "none",
|
|
2217
2290
|
d: "M0 0h24v24H0z",
|
|
2218
2291
|
fill: "none"
|
|
2219
2292
|
}),
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2293
|
+
m("path", { d: "M8 7l4 -4l4 4" }),
|
|
2294
|
+
m("path", { d: "M8 17l4 4l4 -4" }),
|
|
2295
|
+
m("path", { d: "M12 3l0 18" })
|
|
2223
2296
|
]
|
|
2224
2297
|
});
|
|
2225
2298
|
}
|
|
2226
|
-
function
|
|
2227
|
-
return
|
|
2299
|
+
function wr() {
|
|
2300
|
+
return h("svg", {
|
|
2228
2301
|
width: "14",
|
|
2229
2302
|
height: "14",
|
|
2230
2303
|
viewBox: "0 0 24 24",
|
|
@@ -2234,19 +2307,19 @@ function vr() {
|
|
|
2234
2307
|
strokeLinecap: "round",
|
|
2235
2308
|
strokeLinejoin: "round",
|
|
2236
2309
|
children: [
|
|
2237
|
-
|
|
2310
|
+
m("path", {
|
|
2238
2311
|
stroke: "none",
|
|
2239
2312
|
d: "M0 0h24v24H0z",
|
|
2240
2313
|
fill: "none"
|
|
2241
2314
|
}),
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2315
|
+
m("path", { d: "M12 5l0 14" }),
|
|
2316
|
+
m("path", { d: "M16 9l-4 -4" }),
|
|
2317
|
+
m("path", { d: "M8 9l4 -4" })
|
|
2245
2318
|
]
|
|
2246
2319
|
});
|
|
2247
2320
|
}
|
|
2248
|
-
function
|
|
2249
|
-
return
|
|
2321
|
+
function Tr() {
|
|
2322
|
+
return h("svg", {
|
|
2250
2323
|
width: "14",
|
|
2251
2324
|
height: "14",
|
|
2252
2325
|
viewBox: "0 0 24 24",
|
|
@@ -2256,66 +2329,66 @@ function yr() {
|
|
|
2256
2329
|
strokeLinecap: "round",
|
|
2257
2330
|
strokeLinejoin: "round",
|
|
2258
2331
|
children: [
|
|
2259
|
-
|
|
2332
|
+
m("path", {
|
|
2260
2333
|
stroke: "none",
|
|
2261
2334
|
d: "M0 0h24v24H0z",
|
|
2262
2335
|
fill: "none"
|
|
2263
2336
|
}),
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2337
|
+
m("path", { d: "M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
|
|
2338
|
+
m("path", { d: "M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
|
|
2339
|
+
m("path", { d: "M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
|
|
2340
|
+
m("path", { d: "M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
|
|
2341
|
+
m("path", { d: "M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
|
|
2342
|
+
m("path", { d: "M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" })
|
|
2270
2343
|
]
|
|
2271
2344
|
});
|
|
2272
2345
|
}
|
|
2273
|
-
function
|
|
2274
|
-
let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning:
|
|
2275
|
-
if (!
|
|
2276
|
-
let
|
|
2346
|
+
function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: u, sortIcons: p, textAlign: g, width: v, sortStatus: b, onSortStatusChange: S, filter: C, filterPopoverProps: w, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
|
|
2347
|
+
let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: ee, setColumnsPinning: F } = hn(), [I, L] = f(!1), R = d(null), te = ee?.find((e) => e.accessor === r)?.pinned;
|
|
2348
|
+
if (!Qn(i)) return null;
|
|
2349
|
+
let ne = a ?? bn(r), re = typeof ne == "string" ? ne : void 0, z = o && S ? (e) => {
|
|
2277
2350
|
e?.defaultPrevented || S({
|
|
2278
2351
|
sortKey: k,
|
|
2279
2352
|
columnAccessor: r,
|
|
2280
|
-
direction:
|
|
2353
|
+
direction: b?.columnAccessor === r ? b.direction === "asc" ? "desc" : "asc" : b?.direction ?? "asc"
|
|
2281
2354
|
});
|
|
2282
|
-
} : void 0,
|
|
2355
|
+
} : void 0, ie = (e) => {
|
|
2283
2356
|
e.stopPropagation(), A(r), L(!1);
|
|
2284
|
-
},
|
|
2357
|
+
}, ae = (e) => {
|
|
2285
2358
|
e.preventDefault(), j(r), L(!0);
|
|
2286
2359
|
}, oe = () => {
|
|
2287
2360
|
j(r), L(!1), M();
|
|
2288
2361
|
}, se = () => {
|
|
2289
2362
|
L(!0);
|
|
2290
|
-
},
|
|
2363
|
+
}, V = () => {
|
|
2291
2364
|
L(!1);
|
|
2292
|
-
},
|
|
2365
|
+
}, ce = (e) => {
|
|
2293
2366
|
e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
|
|
2294
2367
|
...e,
|
|
2295
2368
|
toggled: !1
|
|
2296
2369
|
} : e));
|
|
2297
|
-
},
|
|
2298
|
-
|
|
2370
|
+
}, H = (e) => {
|
|
2371
|
+
F((t) => t.map((t) => t.accessor === r ? {
|
|
2299
2372
|
...t,
|
|
2300
2373
|
pinned: e
|
|
2301
2374
|
} : t));
|
|
2302
2375
|
};
|
|
2303
|
-
return
|
|
2376
|
+
return h(B, {
|
|
2304
2377
|
"data-accessor": r,
|
|
2305
2378
|
"data-pinned": n?.position,
|
|
2306
2379
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
2307
|
-
className:
|
|
2380
|
+
className: Z({
|
|
2308
2381
|
"mantine-datatable-header-cell-sortable": o,
|
|
2309
2382
|
"mantine-datatable-header-cell-toggleable": c,
|
|
2310
2383
|
"mantine-datatable-header-cell-pinnable": l,
|
|
2311
|
-
"mantine-datatable-header-cell-resizable":
|
|
2384
|
+
"mantine-datatable-header-cell-resizable": u
|
|
2312
2385
|
}, e),
|
|
2313
2386
|
style: [
|
|
2314
2387
|
{
|
|
2315
|
-
width:
|
|
2316
|
-
...
|
|
2317
|
-
minWidth:
|
|
2318
|
-
maxWidth:
|
|
2388
|
+
width: v,
|
|
2389
|
+
...u ? {} : {
|
|
2390
|
+
minWidth: v,
|
|
2391
|
+
maxWidth: v
|
|
2319
2392
|
}
|
|
2320
2393
|
},
|
|
2321
2394
|
t,
|
|
@@ -2327,100 +2400,100 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2327
2400
|
],
|
|
2328
2401
|
role: o ? "button" : void 0,
|
|
2329
2402
|
tabIndex: o ? 0 : void 0,
|
|
2330
|
-
onClick:
|
|
2331
|
-
onKeyDown: (e) => e.key === "Enter" &&
|
|
2403
|
+
onClick: z,
|
|
2404
|
+
onKeyDown: (e) => e.key === "Enter" && z?.(),
|
|
2332
2405
|
ref: R,
|
|
2333
|
-
children: [
|
|
2406
|
+
children: [h(E, {
|
|
2334
2407
|
className: "mantine-datatable-header-cell-sortable-group",
|
|
2335
2408
|
justify: "space-between",
|
|
2336
2409
|
wrap: "nowrap",
|
|
2337
2410
|
children: [
|
|
2338
|
-
|
|
2411
|
+
h(T, {
|
|
2339
2412
|
align: "center",
|
|
2340
2413
|
w: "100%",
|
|
2341
|
-
className:
|
|
2414
|
+
className: Z({
|
|
2342
2415
|
"mantine-datatable-header-cell-draggable": s,
|
|
2343
2416
|
"mantine-datatable-header-cell-drag-over": I
|
|
2344
2417
|
}),
|
|
2345
2418
|
draggable: s,
|
|
2346
|
-
onDragStart: s ?
|
|
2419
|
+
onDragStart: s ? ie : void 0,
|
|
2347
2420
|
onDragEnter: s ? se : void 0,
|
|
2348
|
-
onDragOver: s ?
|
|
2421
|
+
onDragOver: s ? ae : void 0,
|
|
2349
2422
|
onDrop: s ? oe : void 0,
|
|
2350
|
-
onDragLeave: s ?
|
|
2351
|
-
children: [s ?
|
|
2423
|
+
onDragLeave: s ? V : void 0,
|
|
2424
|
+
children: [s ? m(x, {
|
|
2352
2425
|
role: "img",
|
|
2353
2426
|
"aria-label": "Drag column",
|
|
2354
|
-
children:
|
|
2427
|
+
children: m(_, {
|
|
2355
2428
|
className: "mantine-datatable-header-cell-draggable-action-icon",
|
|
2356
2429
|
variant: "subtle",
|
|
2357
2430
|
size: "xs",
|
|
2358
2431
|
onClick: (e) => {
|
|
2359
2432
|
e.stopPropagation();
|
|
2360
2433
|
},
|
|
2361
|
-
children:
|
|
2434
|
+
children: m(Tr, {})
|
|
2362
2435
|
})
|
|
2363
|
-
}) : null,
|
|
2364
|
-
className:
|
|
2365
|
-
[
|
|
2366
|
-
[
|
|
2367
|
-
[
|
|
2368
|
-
},
|
|
2369
|
-
title:
|
|
2370
|
-
children:
|
|
2436
|
+
}) : null, m(y, {
|
|
2437
|
+
className: Z("mantine-datatable-header-cell-sortable-text", {
|
|
2438
|
+
[or]: g === "left",
|
|
2439
|
+
[sr]: g === "center",
|
|
2440
|
+
[cr]: g === "right"
|
|
2441
|
+
}, tr, nr),
|
|
2442
|
+
title: re,
|
|
2443
|
+
children: ne
|
|
2371
2444
|
})]
|
|
2372
2445
|
}),
|
|
2373
|
-
l ?
|
|
2374
|
-
currentPinned:
|
|
2375
|
-
onPinChange:
|
|
2446
|
+
l ? m(br, {
|
|
2447
|
+
currentPinned: te,
|
|
2448
|
+
onPinChange: H
|
|
2376
2449
|
}) : null,
|
|
2377
|
-
c ?
|
|
2450
|
+
c ? m(x, {
|
|
2378
2451
|
className: "mantine-datatable-header-cell-toggleable-icon",
|
|
2379
2452
|
role: "img",
|
|
2380
2453
|
"aria-label": "Toggle column",
|
|
2381
|
-
children:
|
|
2454
|
+
children: m(_, {
|
|
2382
2455
|
size: "xs",
|
|
2383
2456
|
variant: "light",
|
|
2384
|
-
onClick:
|
|
2385
|
-
children:
|
|
2457
|
+
onClick: ce,
|
|
2458
|
+
children: m(yr, {})
|
|
2386
2459
|
})
|
|
2387
2460
|
}) : null,
|
|
2388
|
-
o ||
|
|
2389
|
-
className:
|
|
2461
|
+
o || b?.columnAccessor === r ? b?.columnAccessor === r ? m(x, {
|
|
2462
|
+
className: Z("mantine-datatable-header-cell-sortable-icon", { "mantine-datatable-header-cell-sortable-icon-reversed": b.direction === "desc" }),
|
|
2390
2463
|
role: "img",
|
|
2391
|
-
"aria-label": `Sorted ${
|
|
2392
|
-
children:
|
|
2393
|
-
}) :
|
|
2464
|
+
"aria-label": `Sorted ${b.direction === "desc" ? "descending" : "ascending"}`,
|
|
2465
|
+
children: p?.sorted || m(wr, {})
|
|
2466
|
+
}) : m(x, {
|
|
2394
2467
|
className: "mantine-datatable-header-cell-sortable-unsorted-icon",
|
|
2395
2468
|
role: "img",
|
|
2396
2469
|
"aria-label": "Not sorted",
|
|
2397
|
-
children:
|
|
2470
|
+
children: p?.unsorted || m(Cr, {})
|
|
2398
2471
|
}) : null,
|
|
2399
|
-
C ?
|
|
2400
|
-
filterPopoverProps:
|
|
2472
|
+
C ? m(hr, {
|
|
2473
|
+
filterPopoverProps: w,
|
|
2401
2474
|
isActive: !!O,
|
|
2402
2475
|
filterPopoverDisableClickOutside: D,
|
|
2403
2476
|
children: C
|
|
2404
2477
|
}) : null
|
|
2405
2478
|
]
|
|
2406
|
-
}),
|
|
2479
|
+
}), u && r !== "__selection__" ? m(Sr, {
|
|
2407
2480
|
accessor: r,
|
|
2408
2481
|
columnRef: R
|
|
2409
2482
|
}) : null]
|
|
2410
2483
|
});
|
|
2411
2484
|
}
|
|
2412
|
-
function
|
|
2485
|
+
function Dr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
|
|
2413
2486
|
let u = !o.disabled;
|
|
2414
|
-
return
|
|
2487
|
+
return m(B, {
|
|
2415
2488
|
ref: l,
|
|
2416
|
-
className:
|
|
2489
|
+
className: Z("mantine-datatable-header-selector-cell", { [rr]: n === "cell" && u }, e),
|
|
2417
2490
|
style: t,
|
|
2418
2491
|
rowSpan: c,
|
|
2419
2492
|
"data-shadow-visible": r || void 0,
|
|
2420
2493
|
"data-accessor": "__selection__",
|
|
2421
2494
|
onClick: n === "cell" && u ? s : void 0,
|
|
2422
|
-
children:
|
|
2423
|
-
classNames: u ? { input:
|
|
2495
|
+
children: m(S, {
|
|
2496
|
+
classNames: u ? { input: rr } : void 0,
|
|
2424
2497
|
checked: i,
|
|
2425
2498
|
indeterminate: a,
|
|
2426
2499
|
onChange: s,
|
|
@@ -2429,7 +2502,7 @@ function xr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i,
|
|
|
2429
2502
|
})
|
|
2430
2503
|
});
|
|
2431
2504
|
}
|
|
2432
|
-
function
|
|
2505
|
+
function Or(e, t) {
|
|
2433
2506
|
let n = (e.columns ?? []).filter((e) => !e.hidden).map((e) => String(e.accessor)), r = n.map((e) => t.get(e)).filter(Boolean);
|
|
2434
2507
|
if (r.length === 0 || r.length !== n.length) return;
|
|
2435
2508
|
let i = new Set(r.map((e) => e.logicalSide));
|
|
@@ -2442,44 +2515,44 @@ function Sr(e, t) {
|
|
|
2442
2515
|
isBoundary: l?.isBoundary ?? !1
|
|
2443
2516
|
};
|
|
2444
2517
|
}
|
|
2445
|
-
function
|
|
2446
|
-
let
|
|
2518
|
+
function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r, sortIcons: i, onSortStatusChange: a, columns: o, defaultColumnProps: s, groups: c, pinnedMap: l, selectionTrigger: u, selectionVisible: d, selectionChecked: p, selectionIndeterminate: g, onSelectionChange: _, selectionCheckboxProps: v, selectorCellShadowVisible: y, selectionColumnClassName: b, selectionColumnStyle: x, withColumnBorders: C = !1, ref: w }) {
|
|
2519
|
+
let T = c ? En(c) : 0, D = T > 0 ? T + 1 : 1, O = d ? m(Dr, {
|
|
2447
2520
|
ref: e,
|
|
2448
2521
|
className: b,
|
|
2449
|
-
style:
|
|
2522
|
+
style: x,
|
|
2450
2523
|
trigger: u,
|
|
2451
2524
|
shadowVisible: y,
|
|
2452
|
-
checked:
|
|
2525
|
+
checked: p,
|
|
2453
2526
|
indeterminate: g,
|
|
2454
2527
|
checkboxProps: v,
|
|
2455
2528
|
onChange: _,
|
|
2456
2529
|
rowSpan: c ? D : void 0
|
|
2457
|
-
}) : null, { columnsToggle: k, setColumnsToggle: A } =
|
|
2458
|
-
className:
|
|
2530
|
+
}) : null, { columnsToggle: k, setColumnsToggle: A } = hn(), [j, M] = f(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? bn(String(e))])) : void 0, ee = h(se, {
|
|
2531
|
+
className: Z("mantine-datatable-header", t),
|
|
2459
2532
|
style: n,
|
|
2460
2533
|
ref: w,
|
|
2461
2534
|
onContextMenu: N ? (e) => {
|
|
2462
2535
|
e.preventDefault(), M((e) => !e);
|
|
2463
2536
|
} : void 0,
|
|
2464
|
-
children: [c && Array.from({ length:
|
|
2465
|
-
let n =
|
|
2466
|
-
return
|
|
2537
|
+
children: [c && Array.from({ length: T }, (e, t) => {
|
|
2538
|
+
let n = kn(c, t);
|
|
2539
|
+
return h(V, { children: [t === 0 && O, n.map((e, r) => m(fr, {
|
|
2467
2540
|
group: e,
|
|
2468
|
-
pinnedInfo:
|
|
2469
|
-
maxDepth:
|
|
2541
|
+
pinnedInfo: Or(e, l),
|
|
2542
|
+
maxDepth: T,
|
|
2470
2543
|
currentDepth: t,
|
|
2471
2544
|
previousGroups: n.slice(0, r),
|
|
2472
2545
|
isLastGroup: r === n.length - 1,
|
|
2473
2546
|
withColumnBorders: C,
|
|
2474
2547
|
totalTableColumns: o.length
|
|
2475
2548
|
}, e.id))] }, `group-depth-${t}`);
|
|
2476
|
-
}),
|
|
2549
|
+
}), h(V, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
|
|
2477
2550
|
if (e) return null;
|
|
2478
|
-
let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title:
|
|
2551
|
+
let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title: p, sortable: h, draggable: g, toggleable: _, pinnable: v, resizable: y, titleClassName: b, titleStyle: x, filter: S, filterPopoverProps: C, filterPopoverDisableClickOutside: w, filtering: T, sortKey: E } = {
|
|
2479
2552
|
...s,
|
|
2480
2553
|
...t
|
|
2481
2554
|
};
|
|
2482
|
-
return
|
|
2555
|
+
return m(Er, {
|
|
2483
2556
|
accessor: c,
|
|
2484
2557
|
pinnedInfo: l.get(String(c)),
|
|
2485
2558
|
className: b,
|
|
@@ -2487,7 +2560,7 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2487
2560
|
visibleMediaQuery: u,
|
|
2488
2561
|
textAlign: d,
|
|
2489
2562
|
width: f,
|
|
2490
|
-
title:
|
|
2563
|
+
title: p,
|
|
2491
2564
|
sortable: h,
|
|
2492
2565
|
draggable: g,
|
|
2493
2566
|
toggleable: _,
|
|
@@ -2504,13 +2577,13 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2504
2577
|
}, c);
|
|
2505
2578
|
})] })]
|
|
2506
2579
|
});
|
|
2507
|
-
return N ?
|
|
2580
|
+
return N ? h(F, {
|
|
2508
2581
|
position: "bottom",
|
|
2509
2582
|
withArrow: !0,
|
|
2510
2583
|
shadow: "md",
|
|
2511
2584
|
opened: j,
|
|
2512
2585
|
onChange: M,
|
|
2513
|
-
children: [
|
|
2586
|
+
children: [m(L, { children: ee }), m(I, { children: m(re, { children: k.filter((e) => e.toggleable).map((e) => m(E, { children: m(S, {
|
|
2514
2587
|
classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
|
|
2515
2588
|
size: "xs",
|
|
2516
2589
|
label: P[e.accessor],
|
|
@@ -2522,21 +2595,21 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2522
2595
|
} : n));
|
|
2523
2596
|
}
|
|
2524
2597
|
}) }, e.accessor)) }) })]
|
|
2525
|
-
}) :
|
|
2598
|
+
}) : ee;
|
|
2526
2599
|
}
|
|
2527
|
-
function
|
|
2528
|
-
return
|
|
2529
|
-
className:
|
|
2600
|
+
function Ar({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
|
|
2601
|
+
return m(x, {
|
|
2602
|
+
className: Z("mantine-datatable-loader", { "mantine-datatable-loader-fetching": e }),
|
|
2530
2603
|
style: [{ backdropFilter: n ? `blur(${n}px)` : void 0 }],
|
|
2531
|
-
children: e && (t ||
|
|
2604
|
+
children: e && (t || m(O, {
|
|
2532
2605
|
size: r,
|
|
2533
2606
|
type: i,
|
|
2534
2607
|
color: a
|
|
2535
2608
|
}))
|
|
2536
2609
|
});
|
|
2537
2610
|
}
|
|
2538
|
-
function
|
|
2539
|
-
return
|
|
2611
|
+
function jr() {
|
|
2612
|
+
return h("svg", {
|
|
2540
2613
|
width: "14",
|
|
2541
2614
|
height: "14",
|
|
2542
2615
|
viewBox: "0 0 24 24",
|
|
@@ -2546,58 +2619,58 @@ function Tr() {
|
|
|
2546
2619
|
strokeLinecap: "round",
|
|
2547
2620
|
strokeLinejoin: "round",
|
|
2548
2621
|
children: [
|
|
2549
|
-
|
|
2622
|
+
m("path", {
|
|
2550
2623
|
stroke: "none",
|
|
2551
2624
|
d: "M0 0h24v24H0z",
|
|
2552
2625
|
fill: "none"
|
|
2553
2626
|
}),
|
|
2554
|
-
|
|
2555
|
-
|
|
2627
|
+
m("path", { d: "M8 9l4 -4l4 4" }),
|
|
2628
|
+
m("path", { d: "M16 15l-4 4l-4 -4" })
|
|
2556
2629
|
]
|
|
2557
2630
|
});
|
|
2558
2631
|
}
|
|
2559
|
-
var
|
|
2560
|
-
xs:
|
|
2561
|
-
sm:
|
|
2562
|
-
md:
|
|
2563
|
-
lg:
|
|
2564
|
-
xl:
|
|
2632
|
+
var Mr = {
|
|
2633
|
+
xs: pe(22),
|
|
2634
|
+
sm: pe(26),
|
|
2635
|
+
md: pe(32),
|
|
2636
|
+
lg: pe(38),
|
|
2637
|
+
xl: pe(44)
|
|
2565
2638
|
};
|
|
2566
|
-
function
|
|
2567
|
-
return
|
|
2639
|
+
function Nr({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
|
|
2640
|
+
return h(E, {
|
|
2568
2641
|
gap: "xs",
|
|
2569
|
-
children: [
|
|
2642
|
+
children: [m(H, {
|
|
2570
2643
|
component: "div",
|
|
2571
2644
|
size: e,
|
|
2572
2645
|
children: t
|
|
2573
|
-
}),
|
|
2646
|
+
}), h(k, {
|
|
2574
2647
|
withinPortal: !0,
|
|
2575
2648
|
withArrow: !0,
|
|
2576
2649
|
offset: 2,
|
|
2577
2650
|
classNames: { arrow: "mantine-datatable-page-size-selector-menu-arrow" },
|
|
2578
|
-
children: [
|
|
2651
|
+
children: [m(M, { children: m(b, {
|
|
2579
2652
|
size: e,
|
|
2580
2653
|
variant: "default",
|
|
2581
2654
|
classNames: { section: "mantine-datatable-page-size-selector-button-icon" },
|
|
2582
|
-
rightSection:
|
|
2655
|
+
rightSection: m(jr, {}),
|
|
2583
2656
|
style: [{ fontWeight: "normal" }, (t) => ({
|
|
2584
|
-
height:
|
|
2657
|
+
height: Mr[e],
|
|
2585
2658
|
paddingLeft: t.spacing[e],
|
|
2586
2659
|
paddingRight: t.spacing[e]
|
|
2587
2660
|
})],
|
|
2588
2661
|
children: r
|
|
2589
|
-
}) }),
|
|
2662
|
+
}) }), m(A, { children: n.map((t) => {
|
|
2590
2663
|
let n = t === r;
|
|
2591
|
-
return
|
|
2592
|
-
className:
|
|
2593
|
-
style: [{ height:
|
|
2664
|
+
return m(j, {
|
|
2665
|
+
className: Z({ "mantine-datatable-page-size-selector-active": n }),
|
|
2666
|
+
style: [{ height: Mr[e] }, n && (i || a) ? (e) => fn({
|
|
2594
2667
|
theme: e,
|
|
2595
2668
|
paginationActiveTextColor: i,
|
|
2596
2669
|
paginationActiveBackgroundColor: a
|
|
2597
2670
|
}) : void 0],
|
|
2598
2671
|
disabled: n,
|
|
2599
2672
|
onClick: () => o(t),
|
|
2600
|
-
children:
|
|
2673
|
+
children: m(H, {
|
|
2601
2674
|
component: "div",
|
|
2602
2675
|
size: e,
|
|
2603
2676
|
children: t
|
|
@@ -2607,40 +2680,40 @@ function Dr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
|
|
|
2607
2680
|
})]
|
|
2608
2681
|
});
|
|
2609
2682
|
}
|
|
2610
|
-
function
|
|
2683
|
+
function Pr({ className: e, style: t, fetching: n, page: r, onPageChange: i, paginationWithEdges: a, paginationWithControls: o, paginationActiveTextColor: s, paginationActiveBackgroundColor: c, paginationSize: l, loadingText: u, noRecordsText: d, paginationText: f, totalRecords: g, recordsPerPage: _, onRecordsPerPageChange: v, recordsPerPageLabel: b, recordsPerPageOptions: x, recordsLength: S, horizontalSpacing: C, paginationWrapBreakpoint: w, getPaginationControlProps: T, getPaginationItemProps: E, renderPagination: D }) {
|
|
2611
2684
|
let O;
|
|
2612
2685
|
if (g) {
|
|
2613
2686
|
let e = (r - 1) * _ + 1;
|
|
2614
|
-
O =
|
|
2687
|
+
O = f({
|
|
2615
2688
|
from: e,
|
|
2616
2689
|
to: e + (S || 0) - 1,
|
|
2617
2690
|
totalRecords: g
|
|
2618
2691
|
});
|
|
2619
2692
|
} else O = n ? u : d;
|
|
2620
|
-
let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !
|
|
2621
|
-
Text: (e) =>
|
|
2693
|
+
let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !Qn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${pe(w)}rem` : e[w] || w})`), N = {
|
|
2694
|
+
Text: (e) => m(H, {
|
|
2622
2695
|
component: "div",
|
|
2623
2696
|
className: "mantine-datatable-pagination-text",
|
|
2624
2697
|
size: l,
|
|
2625
2698
|
...e,
|
|
2626
2699
|
children: O
|
|
2627
2700
|
}),
|
|
2628
|
-
PageSizeSelector: (e) => x ?
|
|
2701
|
+
PageSizeSelector: (e) => x ? m(Nr, {
|
|
2629
2702
|
activeTextColor: s,
|
|
2630
2703
|
activeBackgroundColor: c,
|
|
2631
2704
|
size: l,
|
|
2632
2705
|
label: b,
|
|
2633
2706
|
values: x,
|
|
2634
2707
|
value: _,
|
|
2635
|
-
onChange:
|
|
2708
|
+
onChange: v,
|
|
2636
2709
|
...e
|
|
2637
2710
|
}) : null,
|
|
2638
|
-
Pagination: (e) =>
|
|
2711
|
+
Pagination: (e) => m(ee, {
|
|
2639
2712
|
classNames: {
|
|
2640
|
-
root:
|
|
2713
|
+
root: Z("mantine-datatable-pagination-pages", { "mantine-datatable-pagination-pages-fetching": n || !S }),
|
|
2641
2714
|
control: "mantine-datatable-pagination-pages-control"
|
|
2642
2715
|
},
|
|
2643
|
-
style: s || c ? (e) =>
|
|
2716
|
+
style: s || c ? (e) => fn({
|
|
2644
2717
|
theme: e,
|
|
2645
2718
|
paginationActiveTextColor: s,
|
|
2646
2719
|
paginationActiveBackgroundColor: c
|
|
@@ -2655,7 +2728,7 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2655
2728
|
getItemProps: E,
|
|
2656
2729
|
...e
|
|
2657
2730
|
})
|
|
2658
|
-
},
|
|
2731
|
+
}, P = {
|
|
2659
2732
|
state: {
|
|
2660
2733
|
paginationSize: l,
|
|
2661
2734
|
page: r,
|
|
@@ -2670,34 +2743,34 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2670
2743
|
},
|
|
2671
2744
|
actions: {
|
|
2672
2745
|
setPage: (e) => i?.(e),
|
|
2673
|
-
setRecordsPerPage:
|
|
2746
|
+
setRecordsPerPage: v ? (e) => v(e) : void 0
|
|
2674
2747
|
},
|
|
2675
2748
|
Controls: N
|
|
2676
2749
|
};
|
|
2677
|
-
return
|
|
2750
|
+
return m(y, {
|
|
2678
2751
|
px: C ?? "xs",
|
|
2679
2752
|
py: "xs",
|
|
2680
|
-
className:
|
|
2753
|
+
className: Z("mantine-datatable-pagination", e),
|
|
2681
2754
|
style: [{ flexDirection: M ? "column" : "row" }, t],
|
|
2682
|
-
children: typeof D == "function" ? D(
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2755
|
+
children: typeof D == "function" ? D(P) : h(p, { children: [
|
|
2756
|
+
m(N.Text, {}),
|
|
2757
|
+
m(N.PageSizeSelector, {}),
|
|
2758
|
+
m(N.Pagination, {})
|
|
2686
2759
|
] })
|
|
2687
2760
|
});
|
|
2688
2761
|
}
|
|
2689
|
-
function
|
|
2690
|
-
return
|
|
2762
|
+
function Fr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, record: i, index: a, onClick: o, onDoubleClick: s, onContextMenu: c, noWrap: l, ellipsis: u, textAlign: d, width: f, accessor: p, render: h, defaultRender: g, customCellAttributes: _ }) {
|
|
2763
|
+
return Qn(r) ? m(ae, {
|
|
2691
2764
|
"data-pinned": n?.position,
|
|
2692
2765
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
2693
|
-
className:
|
|
2694
|
-
[
|
|
2695
|
-
[
|
|
2696
|
-
[
|
|
2697
|
-
[
|
|
2698
|
-
[
|
|
2699
|
-
[
|
|
2700
|
-
[
|
|
2766
|
+
className: Z({
|
|
2767
|
+
[tr]: l || u,
|
|
2768
|
+
[nr]: u,
|
|
2769
|
+
[rr]: o || s,
|
|
2770
|
+
[ir]: c,
|
|
2771
|
+
[or]: d === "left",
|
|
2772
|
+
[sr]: d === "center",
|
|
2773
|
+
[cr]: d === "right"
|
|
2701
2774
|
}, e),
|
|
2702
2775
|
style: [
|
|
2703
2776
|
{
|
|
@@ -2716,46 +2789,46 @@ function kr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
|
|
|
2716
2789
|
onDoubleClick: s,
|
|
2717
2790
|
onContextMenu: c,
|
|
2718
2791
|
..._?.(i, a),
|
|
2719
|
-
children: h ? h(i, a) : g ? g(i, a,
|
|
2792
|
+
children: h ? h(i, a) : g ? g(i, a, p) : Tn(i, p)
|
|
2720
2793
|
}) : null;
|
|
2721
2794
|
}
|
|
2722
|
-
function
|
|
2723
|
-
let { expanded: i, visible: a } =
|
|
2724
|
-
return a ?
|
|
2795
|
+
function Ir({ open: e, colSpan: t, content: n, collapseProps: r }) {
|
|
2796
|
+
let { expanded: i, visible: a } = er(e, r?.transitionDuration);
|
|
2797
|
+
return a ? h(p, { children: [m(V, {}), m(V, { children: m(ae, {
|
|
2725
2798
|
className: "mantine-datatable-row-expansion-cell",
|
|
2726
2799
|
colSpan: t,
|
|
2727
|
-
children:
|
|
2800
|
+
children: m(C, {
|
|
2728
2801
|
expanded: i,
|
|
2729
2802
|
...r,
|
|
2730
|
-
children:
|
|
2803
|
+
children: m("div", {
|
|
2731
2804
|
className: "mantine-datatable-row-expansion-cell-content",
|
|
2732
2805
|
children: n()
|
|
2733
2806
|
})
|
|
2734
2807
|
})
|
|
2735
2808
|
}) })] }) : null;
|
|
2736
2809
|
}
|
|
2737
|
-
function
|
|
2810
|
+
function Lr({ className: e, style: t, record: n, index: r, trigger: i, onChange: a, withRightShadow: o, checkboxProps: s, getCheckboxProps: c, ...l }) {
|
|
2738
2811
|
let u = {
|
|
2739
2812
|
...s,
|
|
2740
2813
|
...c(n, r)
|
|
2741
2814
|
}, d = !l.disabled && !u.disabled, f = (e) => {
|
|
2742
2815
|
e.stopPropagation(), i === "cell" && d && a?.(e);
|
|
2743
2816
|
};
|
|
2744
|
-
return
|
|
2745
|
-
className:
|
|
2817
|
+
return m(ae, {
|
|
2818
|
+
className: Z("mantine-datatable-row-selector-cell", { [rr]: i === "cell" && d }, e),
|
|
2746
2819
|
style: t,
|
|
2747
2820
|
"data-shadow-visible": o || void 0,
|
|
2748
2821
|
onClick: f,
|
|
2749
|
-
children:
|
|
2750
|
-
classNames: d ? { input:
|
|
2822
|
+
children: m(S, {
|
|
2823
|
+
classNames: d ? { input: rr } : void 0,
|
|
2751
2824
|
onChange: a,
|
|
2752
2825
|
...l,
|
|
2753
2826
|
...u
|
|
2754
2827
|
})
|
|
2755
2828
|
});
|
|
2756
2829
|
}
|
|
2757
|
-
function
|
|
2758
|
-
let M =
|
|
2830
|
+
function Rr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap: i, defaultColumnRender: a, selectionTrigger: o, selectionVisible: s, selectionChecked: c, onSelectionChange: l, isRecordSelectable: u, selectionCheckboxProps: d, getSelectionCheckboxProps: f, onClick: g, onDoubleClick: _, onContextMenu: v, onCellClick: y, onCellDoubleClick: b, onCellContextMenu: x, expansion: S, customAttributes: C, color: w, backgroundColor: T, className: E, style: D, selectorCellShadowVisible: O, selectionColumnClassName: k, selectionColumnStyle: A, rowFactory: j }) {
|
|
2831
|
+
let M = h(p, { children: [s && m(Lr, {
|
|
2759
2832
|
className: k,
|
|
2760
2833
|
style: A,
|
|
2761
2834
|
record: e,
|
|
@@ -2766,14 +2839,14 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2766
2839
|
disabled: !l || (u ? !u(e, t) : !1),
|
|
2767
2840
|
onChange: l,
|
|
2768
2841
|
checkboxProps: d,
|
|
2769
|
-
getCheckboxProps:
|
|
2842
|
+
getCheckboxProps: f
|
|
2770
2843
|
}), n.map(({ hidden: n, hiddenContent: o, ...s }, c) => {
|
|
2771
2844
|
if (n || o) return null;
|
|
2772
|
-
let { accessor: l, visibleMediaQuery: u, textAlign: d, noWrap: f, ellipsis:
|
|
2845
|
+
let { accessor: l, visibleMediaQuery: u, textAlign: d, noWrap: f, ellipsis: p, width: h, render: g, cellsClassName: _, cellsStyle: v, customCellAttributes: S } = {
|
|
2773
2846
|
...r,
|
|
2774
2847
|
...s
|
|
2775
2848
|
};
|
|
2776
|
-
return
|
|
2849
|
+
return m(Fr, {
|
|
2777
2850
|
pinnedInfo: i.get(String(l)),
|
|
2778
2851
|
className: typeof _ == "function" ? _(e, t) : _,
|
|
2779
2852
|
style: v?.(e, t),
|
|
@@ -2804,13 +2877,13 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2804
2877
|
accessor: l,
|
|
2805
2878
|
textAlign: d,
|
|
2806
2879
|
noWrap: f,
|
|
2807
|
-
ellipsis:
|
|
2880
|
+
ellipsis: p,
|
|
2808
2881
|
width: h,
|
|
2809
2882
|
render: g,
|
|
2810
2883
|
defaultRender: a,
|
|
2811
2884
|
customCellAttributes: S
|
|
2812
2885
|
}, l);
|
|
2813
|
-
})] }), N = S &&
|
|
2886
|
+
})] }), N = S && m(Ir, {
|
|
2814
2887
|
colSpan: n.filter(({ hidden: e }) => !e).length + +!!s,
|
|
2815
2888
|
open: S.isRowExpanded(e),
|
|
2816
2889
|
content: S.content({
|
|
@@ -2818,7 +2891,7 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2818
2891
|
index: t
|
|
2819
2892
|
}),
|
|
2820
2893
|
collapseProps: S.collapseProps
|
|
2821
|
-
}), P =
|
|
2894
|
+
}), P = zr({
|
|
2822
2895
|
record: e,
|
|
2823
2896
|
index: t,
|
|
2824
2897
|
selectionChecked: c,
|
|
@@ -2838,17 +2911,17 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2838
2911
|
rowProps: P,
|
|
2839
2912
|
children: M,
|
|
2840
2913
|
expandedElement: N
|
|
2841
|
-
}) :
|
|
2914
|
+
}) : h(p, { children: [m(V, {
|
|
2842
2915
|
...P,
|
|
2843
2916
|
children: M
|
|
2844
2917
|
}), N] });
|
|
2845
2918
|
}
|
|
2846
|
-
function
|
|
2919
|
+
function zr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClick: i, onContextMenu: a, expansion: o, customAttributes: s, color: c, backgroundColor: l, className: u, style: d }) {
|
|
2847
2920
|
return {
|
|
2848
|
-
className:
|
|
2921
|
+
className: Z("mantine-datatable-row", { [rr]: r || i || o?.isExpandable({
|
|
2849
2922
|
record: e,
|
|
2850
2923
|
index: t
|
|
2851
|
-
}) && o?.expandOnClick }, { [
|
|
2924
|
+
}) && o?.expandOnClick }, { [ir]: a }, typeof u == "function" ? u(e, t) : u),
|
|
2852
2925
|
"data-selected": n || void 0,
|
|
2853
2926
|
onClick: (n) => {
|
|
2854
2927
|
if (o) {
|
|
@@ -2876,7 +2949,7 @@ function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
|
|
|
2876
2949
|
}) : void 0,
|
|
2877
2950
|
style: [c || l ? (n) => {
|
|
2878
2951
|
let r = c?.(e, t), i = l?.(e, t);
|
|
2879
|
-
return
|
|
2952
|
+
return pn({
|
|
2880
2953
|
theme: n,
|
|
2881
2954
|
color: r,
|
|
2882
2955
|
backgroundColor: i
|
|
@@ -2885,8 +2958,8 @@ function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
|
|
|
2885
2958
|
...s?.(e, t) ?? {}
|
|
2886
2959
|
};
|
|
2887
2960
|
}
|
|
2888
|
-
function
|
|
2889
|
-
return
|
|
2961
|
+
function Br({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
|
|
2962
|
+
return h(R, {
|
|
2890
2963
|
...a,
|
|
2891
2964
|
viewportRef: i,
|
|
2892
2965
|
classNames: {
|
|
@@ -2898,263 +2971,263 @@ function Pr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
|
|
|
2898
2971
|
onScrollPositionChange: n,
|
|
2899
2972
|
children: [
|
|
2900
2973
|
r,
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2974
|
+
m(y, { className: Z("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-top-shadow") }),
|
|
2975
|
+
m("div", { className: Z("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-left-shadow", { "mantine-datatable-scroll-area-shadow-behind": e }) }),
|
|
2976
|
+
m("div", { className: Z("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-right-shadow", { "mantine-datatable-scroll-area-shadow-behind": t }) }),
|
|
2977
|
+
m(y, { className: Z("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-bottom-shadow") })
|
|
2905
2978
|
]
|
|
2906
2979
|
});
|
|
2907
2980
|
}
|
|
2908
|
-
function
|
|
2909
|
-
let
|
|
2981
|
+
function Vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: a, shadow: s, verticalAlign: f = "center", fetching: p, columns: g, storeColumnsKey: _, groups: v, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: ee, sortIcons: F, onSortStatusChange: I, horizontalSpacing: L, page: R, onPageChange: te, totalRecords: ne, recordsPerPage: re, onRecordsPerPageChange: z, recordsPerPageOptions: ae, recordsPerPageLabel: oe = "Records per page", paginationWithEdges: B, paginationWithControls: se, paginationActiveTextColor: V, paginationActiveBackgroundColor: ce, paginationSize: H = "sm", paginationText: le = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: ue = "sm", getPaginationControlProps: de = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: U, renderPagination: fe, loaderBackgroundBlur: pe, customLoader: me, loaderSize: he, loaderType: ge, loaderColor: _e, loadingText: ve = "...", emptyState: ye, noRecordsText: be = "No records", noRecordsIcon: xe, highlightOnHover: Se, striped: Ce, noHeader: we, onRowClick: Te, onRowDoubleClick: Ee, onRowContextMenu: De, onCellClick: Oe, onCellDoubleClick: ke, onCellContextMenu: Ae, onScroll: je, onScrollToTop: Ne, onScrollToBottom: Pe, onScrollToLeft: Fe, onScrollToRight: Ie, c: Le, backgroundColor: Re, borderColor: ze, rowBorderColor: Be, stripedColor: Ve, highlightOnHoverColor: He, rowColor: W, rowBackgroundColor: G, rowExpansion: Ue, rowClassName: We, rowStyle: Ge, customRowAttributes: Ke, scrollViewportRef: qe, scrollAreaProps: Je, tableRef: Ye, bodyRef: K, m: Xe, my: Ze, mx: Qe, mt: $e, mb: et, ml: tt, mr: nt, className: q, classNames: J, style: rt, styles: it, rowFactory: at, tableWrapper: ot, ...st }) {
|
|
2982
|
+
let ct = u(() => v ? Dn(v) : g, [g, v]), { refs: Y, onScroll: lt } = Gn({
|
|
2910
2983
|
scrollCallbacks: {
|
|
2911
|
-
onScroll:
|
|
2912
|
-
onScrollToTop:
|
|
2913
|
-
onScrollToBottom:
|
|
2914
|
-
onScrollToLeft:
|
|
2915
|
-
onScrollToRight:
|
|
2984
|
+
onScroll: je,
|
|
2985
|
+
onScrollToTop: Ne,
|
|
2986
|
+
onScrollToBottom: Pe,
|
|
2987
|
+
onScrollToLeft: Fe,
|
|
2988
|
+
onScrollToRight: Ie
|
|
2916
2989
|
},
|
|
2917
|
-
withRowBorders:
|
|
2918
|
-
}),
|
|
2990
|
+
withRowBorders: st.withRowBorders
|
|
2991
|
+
}), ut = Fn({
|
|
2919
2992
|
key: _,
|
|
2920
|
-
columns:
|
|
2921
|
-
headerRef:
|
|
2922
|
-
scrollViewportRef:
|
|
2923
|
-
}),
|
|
2924
|
-
rowExpansion:
|
|
2993
|
+
columns: ct,
|
|
2994
|
+
headerRef: Y.header,
|
|
2995
|
+
scrollViewportRef: Y.scrollViewport
|
|
2996
|
+
}), dt = ut.effectiveColumns, ft = Me(Y.table, Ye), pt = Me(Y.scrollViewport, qe), mt = d(null), ht = Me(mt, K), gt = $n({
|
|
2997
|
+
rowExpansion: Ue,
|
|
2925
2998
|
records: T,
|
|
2926
2999
|
idAccessor: w
|
|
2927
|
-
}), { pinnedMap:
|
|
2928
|
-
columns:
|
|
2929
|
-
theadRef:
|
|
2930
|
-
tbodyRef:
|
|
2931
|
-
selectionColumnHeaderRef:
|
|
3000
|
+
}), { pinnedMap: X, hasLeftPinned: _t, hasRightPinned: vt } = Kn({
|
|
3001
|
+
columns: dt,
|
|
3002
|
+
theadRef: Y.header,
|
|
3003
|
+
tbodyRef: mt,
|
|
3004
|
+
selectionColumnHeaderRef: Y.selectionColumnHeader,
|
|
2932
3005
|
selectionVisible: !!D,
|
|
2933
3006
|
pinFirstColumn: b,
|
|
2934
3007
|
pinLastColumn: x
|
|
2935
|
-
}),
|
|
2936
|
-
|
|
2937
|
-
}, [
|
|
2938
|
-
s(() => {
|
|
2939
|
-
Ct.current !== R && (St.current = !0, wt.current = T, Ct.current = R);
|
|
2940
|
-
}, [R, T]);
|
|
2941
|
-
let Et = T?.length;
|
|
3008
|
+
}), yt = d(!1), bt = d(R), xt = d(T), St = o((e) => {
|
|
3009
|
+
yt.current = !0, xt.current = T, te(e);
|
|
3010
|
+
}, [te, T]);
|
|
2942
3011
|
c(() => {
|
|
2943
|
-
|
|
2944
|
-
|
|
3012
|
+
bt.current !== R && (yt.current = !0, xt.current = T, bt.current = R);
|
|
3013
|
+
}, [R, T]);
|
|
3014
|
+
let Ct = T?.length;
|
|
3015
|
+
l(() => {
|
|
3016
|
+
if (!yt.current || p || T === xt.current) return;
|
|
3017
|
+
let e = Y.scrollViewport.current;
|
|
2945
3018
|
if (!e) return;
|
|
2946
3019
|
let t = requestAnimationFrame(() => {
|
|
2947
3020
|
e.scrollTo({
|
|
2948
3021
|
top: 0,
|
|
2949
3022
|
left: 0
|
|
2950
|
-
}),
|
|
3023
|
+
}), yt.current = !1;
|
|
2951
3024
|
});
|
|
2952
3025
|
return () => cancelAnimationFrame(t);
|
|
2953
3026
|
}, [
|
|
2954
|
-
|
|
3027
|
+
p,
|
|
2955
3028
|
T,
|
|
2956
|
-
|
|
3029
|
+
Y.scrollViewport
|
|
2957
3030
|
]);
|
|
2958
|
-
let
|
|
2959
|
-
D && O && O(
|
|
3031
|
+
let wt = T?.map((e) => $(e, w)), Tt = !!D, Et = D?.map((e) => $(e, w)), Dt = wt !== void 0 && Et !== void 0 && Et.length > 0, Ot = j ? T?.filter(j) : T, kt = Ot?.map((e) => $(e, w)), At = Dt && kt.every((e) => Et.includes(e)), jt = Dt && kt.some((e) => Et.includes(e)), Mt = o(() => {
|
|
3032
|
+
D && O && O(At ? D.filter((e) => !kt.includes($(e, w))) : wn([...D, ...Ot], (e) => $(e, w)));
|
|
2960
3033
|
}, [
|
|
2961
|
-
|
|
3034
|
+
At,
|
|
2962
3035
|
w,
|
|
2963
3036
|
O,
|
|
2964
|
-
|
|
2965
|
-
|
|
3037
|
+
kt,
|
|
3038
|
+
Ot,
|
|
2966
3039
|
D
|
|
2967
|
-
]), { lastSelectionChangeIndex:
|
|
2968
|
-
m:
|
|
2969
|
-
my:
|
|
2970
|
-
mx:
|
|
2971
|
-
mt:
|
|
2972
|
-
mb:
|
|
2973
|
-
ml:
|
|
2974
|
-
mr:
|
|
2975
|
-
},
|
|
2976
|
-
return
|
|
2977
|
-
...
|
|
2978
|
-
pinnedMap:
|
|
2979
|
-
children:
|
|
2980
|
-
ref:
|
|
2981
|
-
...
|
|
2982
|
-
className:
|
|
3040
|
+
]), { lastSelectionChangeIndex: Nt, setLastSelectionChangeIndex: Pt } = qn(wt), Ft = Tt && !_t, It = {
|
|
3041
|
+
m: Xe,
|
|
3042
|
+
my: Ze,
|
|
3043
|
+
mx: Qe,
|
|
3044
|
+
mt: $e,
|
|
3045
|
+
mb: et,
|
|
3046
|
+
ml: tt,
|
|
3047
|
+
mr: nt
|
|
3048
|
+
}, Lt = o(({ children: e }) => ot ? ot({ children: e }) : e, [ot]);
|
|
3049
|
+
return m(gn, {
|
|
3050
|
+
...ut,
|
|
3051
|
+
pinnedMap: X,
|
|
3052
|
+
children: h(y, {
|
|
3053
|
+
ref: Y.root,
|
|
3054
|
+
...It,
|
|
3055
|
+
className: Z("mantine-datatable", { "mantine-datatable-with-border": e }, q, J?.root),
|
|
2983
3056
|
style: [
|
|
2984
3057
|
(e) => ({
|
|
2985
|
-
...
|
|
3058
|
+
...dn({
|
|
2986
3059
|
theme: e,
|
|
2987
|
-
c:
|
|
2988
|
-
backgroundColor:
|
|
2989
|
-
borderColor:
|
|
2990
|
-
rowBorderColor:
|
|
2991
|
-
stripedColor:
|
|
2992
|
-
highlightOnHoverColor:
|
|
3060
|
+
c: Le,
|
|
3061
|
+
backgroundColor: Re,
|
|
3062
|
+
borderColor: ze,
|
|
3063
|
+
rowBorderColor: Be,
|
|
3064
|
+
stripedColor: Ve,
|
|
3065
|
+
highlightOnHoverColor: He
|
|
2993
3066
|
}),
|
|
2994
3067
|
borderRadius: e.radius[t] || t,
|
|
2995
|
-
boxShadow: e.shadows[
|
|
3068
|
+
boxShadow: e.shadows[s] || s,
|
|
2996
3069
|
height: r,
|
|
2997
3070
|
minHeight: i,
|
|
2998
|
-
maxHeight:
|
|
3071
|
+
maxHeight: a
|
|
2999
3072
|
}),
|
|
3000
|
-
|
|
3001
|
-
|
|
3073
|
+
rt,
|
|
3074
|
+
it?.root,
|
|
3002
3075
|
{ position: "relative" }
|
|
3003
3076
|
],
|
|
3004
3077
|
children: [
|
|
3005
|
-
|
|
3006
|
-
viewportRef:
|
|
3007
|
-
leftShadowBehind:
|
|
3008
|
-
rightShadowBehind:
|
|
3009
|
-
onScrollPositionChange:
|
|
3078
|
+
m(Br, {
|
|
3079
|
+
viewportRef: pt,
|
|
3080
|
+
leftShadowBehind: Tt || _t,
|
|
3081
|
+
rightShadowBehind: vt,
|
|
3082
|
+
onScrollPositionChange: lt,
|
|
3010
3083
|
scrollAreaProps: Je,
|
|
3011
|
-
children:
|
|
3012
|
-
ref:
|
|
3084
|
+
children: m(Lt, { children: h(ie, {
|
|
3085
|
+
ref: ft,
|
|
3013
3086
|
horizontalSpacing: L,
|
|
3014
|
-
className:
|
|
3015
|
-
[
|
|
3087
|
+
className: Z("mantine-datatable-table", {
|
|
3088
|
+
[ar]: n,
|
|
3016
3089
|
"mantine-datatable-vertical-align-top": f === "top",
|
|
3017
3090
|
"mantine-datatable-vertical-align-bottom": f === "bottom",
|
|
3018
|
-
"mantine-datatable-selection-column-visible":
|
|
3019
|
-
"mantine-datatable-resizable-columns":
|
|
3020
|
-
"mantine-datatable-resize-locked":
|
|
3021
|
-
"mantine-datatable-resizing":
|
|
3022
|
-
},
|
|
3091
|
+
"mantine-datatable-selection-column-visible": Tt,
|
|
3092
|
+
"mantine-datatable-resizable-columns": ut.hasResizableColumns,
|
|
3093
|
+
"mantine-datatable-resize-locked": ut.isLocked,
|
|
3094
|
+
"mantine-datatable-resizing": ut.isResizing
|
|
3095
|
+
}, J?.table),
|
|
3023
3096
|
style: {
|
|
3024
|
-
...
|
|
3025
|
-
...
|
|
3026
|
-
...
|
|
3097
|
+
...it?.table,
|
|
3098
|
+
...ut.isLocked ? { tableLayout: "fixed" } : null,
|
|
3099
|
+
...ut.tableWidth == null ? null : { width: `${ut.tableWidth}px` }
|
|
3027
3100
|
},
|
|
3028
|
-
"data-striped":
|
|
3029
|
-
"data-highlight-on-hover":
|
|
3030
|
-
...
|
|
3101
|
+
"data-striped": Ct && Ce || void 0,
|
|
3102
|
+
"data-highlight-on-hover": Se || void 0,
|
|
3103
|
+
...st,
|
|
3031
3104
|
children: [
|
|
3032
|
-
|
|
3033
|
-
...
|
|
3034
|
-
pinnedMap:
|
|
3035
|
-
children:
|
|
3036
|
-
ref:
|
|
3037
|
-
selectionColumnHeaderRef:
|
|
3038
|
-
className:
|
|
3039
|
-
style:
|
|
3040
|
-
columns:
|
|
3105
|
+
we ? null : m(gn, {
|
|
3106
|
+
...ut,
|
|
3107
|
+
pinnedMap: X,
|
|
3108
|
+
children: m(kr, {
|
|
3109
|
+
ref: Y.header,
|
|
3110
|
+
selectionColumnHeaderRef: Y.selectionColumnHeader,
|
|
3111
|
+
className: J?.header,
|
|
3112
|
+
style: it?.header,
|
|
3113
|
+
columns: dt,
|
|
3041
3114
|
defaultColumnProps: S,
|
|
3042
|
-
groups:
|
|
3043
|
-
pinnedMap:
|
|
3044
|
-
sortStatus:
|
|
3045
|
-
sortIcons:
|
|
3115
|
+
groups: v,
|
|
3116
|
+
pinnedMap: X,
|
|
3117
|
+
sortStatus: ee,
|
|
3118
|
+
sortIcons: F,
|
|
3046
3119
|
onSortStatusChange: I,
|
|
3047
3120
|
selectionTrigger: E,
|
|
3048
|
-
selectionVisible:
|
|
3049
|
-
selectionChecked:
|
|
3050
|
-
selectionIndeterminate:
|
|
3051
|
-
onSelectionChange:
|
|
3121
|
+
selectionVisible: Tt,
|
|
3122
|
+
selectionChecked: At,
|
|
3123
|
+
selectionIndeterminate: jt && !At,
|
|
3124
|
+
onSelectionChange: Mt,
|
|
3052
3125
|
selectionCheckboxProps: {
|
|
3053
3126
|
...M,
|
|
3054
3127
|
...N
|
|
3055
3128
|
},
|
|
3056
|
-
selectorCellShadowVisible:
|
|
3129
|
+
selectorCellShadowVisible: Ft,
|
|
3057
3130
|
selectionColumnClassName: k,
|
|
3058
3131
|
selectionColumnStyle: A,
|
|
3059
|
-
withColumnBorders:
|
|
3132
|
+
withColumnBorders: st.withColumnBorders
|
|
3060
3133
|
})
|
|
3061
3134
|
}),
|
|
3062
|
-
|
|
3063
|
-
ref:
|
|
3064
|
-
children:
|
|
3065
|
-
let n =
|
|
3135
|
+
m("tbody", {
|
|
3136
|
+
ref: ht,
|
|
3137
|
+
children: Ct ? T.map((e, t) => {
|
|
3138
|
+
let n = $(e, w), r = Et?.includes(n) || !1, i;
|
|
3066
3139
|
return O && D && (i = (i) => {
|
|
3067
|
-
if (i.nativeEvent.shiftKey &&
|
|
3068
|
-
let e = T.filter(t >
|
|
3069
|
-
O(r ?
|
|
3070
|
-
} else O(r ? D.filter((e) =>
|
|
3071
|
-
|
|
3072
|
-
}),
|
|
3140
|
+
if (i.nativeEvent.shiftKey && Nt !== null) {
|
|
3141
|
+
let e = T.filter(t > Nt ? (e, n) => n >= Nt && n <= t && (j ? j(e, n) : !0) : (e, n) => n >= t && n <= Nt && (j ? j(e, n) : !0));
|
|
3142
|
+
O(r ? Cn(D, e, (e) => $(e, w)) : wn([...D, ...e], (e) => $(e, w)));
|
|
3143
|
+
} else O(r ? D.filter((e) => $(e, w) !== n) : wn([...D, e], (e) => $(e, w)));
|
|
3144
|
+
Pt(t);
|
|
3145
|
+
}), m(Rr, {
|
|
3073
3146
|
record: e,
|
|
3074
3147
|
index: t,
|
|
3075
|
-
columns:
|
|
3148
|
+
columns: dt,
|
|
3076
3149
|
defaultColumnProps: S,
|
|
3077
|
-
pinnedMap:
|
|
3150
|
+
pinnedMap: X,
|
|
3078
3151
|
defaultColumnRender: C,
|
|
3079
3152
|
selectionTrigger: E,
|
|
3080
|
-
selectionVisible:
|
|
3153
|
+
selectionVisible: Tt,
|
|
3081
3154
|
selectionChecked: r,
|
|
3082
3155
|
onSelectionChange: i,
|
|
3083
3156
|
isRecordSelectable: j,
|
|
3084
3157
|
selectionCheckboxProps: M,
|
|
3085
3158
|
getSelectionCheckboxProps: P,
|
|
3086
|
-
onClick:
|
|
3087
|
-
onDoubleClick:
|
|
3088
|
-
onCellClick:
|
|
3089
|
-
onCellDoubleClick:
|
|
3090
|
-
onContextMenu:
|
|
3091
|
-
onCellContextMenu:
|
|
3092
|
-
expansion:
|
|
3159
|
+
onClick: Te,
|
|
3160
|
+
onDoubleClick: Ee,
|
|
3161
|
+
onCellClick: Oe,
|
|
3162
|
+
onCellDoubleClick: ke,
|
|
3163
|
+
onContextMenu: De,
|
|
3164
|
+
onCellContextMenu: Ae,
|
|
3165
|
+
expansion: gt,
|
|
3093
3166
|
color: W,
|
|
3094
|
-
backgroundColor:
|
|
3095
|
-
className:
|
|
3096
|
-
style:
|
|
3167
|
+
backgroundColor: G,
|
|
3168
|
+
className: We,
|
|
3169
|
+
style: Ge,
|
|
3097
3170
|
customAttributes: Ke,
|
|
3098
|
-
selectorCellShadowVisible:
|
|
3171
|
+
selectorCellShadowVisible: Ft,
|
|
3099
3172
|
selectionColumnClassName: k,
|
|
3100
3173
|
selectionColumnStyle: A,
|
|
3101
3174
|
idAccessor: w,
|
|
3102
|
-
rowFactory:
|
|
3175
|
+
rowFactory: at
|
|
3103
3176
|
}, n);
|
|
3104
|
-
}) :
|
|
3177
|
+
}) : m(_n, {})
|
|
3105
3178
|
}),
|
|
3106
|
-
|
|
3107
|
-
ref:
|
|
3108
|
-
className:
|
|
3109
|
-
style:
|
|
3110
|
-
columns:
|
|
3179
|
+
dt.some(({ footer: e }) => e) && m(dr, {
|
|
3180
|
+
ref: Y.footer,
|
|
3181
|
+
className: J?.footer,
|
|
3182
|
+
style: it?.footer,
|
|
3183
|
+
columns: dt,
|
|
3111
3184
|
defaultColumnProps: S,
|
|
3112
|
-
pinnedMap:
|
|
3113
|
-
selectionVisible:
|
|
3114
|
-
selectorCellShadowVisible:
|
|
3185
|
+
pinnedMap: X,
|
|
3186
|
+
selectionVisible: Tt,
|
|
3187
|
+
selectorCellShadowVisible: Ft
|
|
3115
3188
|
})
|
|
3116
3189
|
]
|
|
3117
3190
|
}) })
|
|
3118
3191
|
}),
|
|
3119
|
-
!!(R &&
|
|
3120
|
-
className:
|
|
3121
|
-
style:
|
|
3192
|
+
!!(R && Ct) && m(Pr, {
|
|
3193
|
+
className: J?.pagination,
|
|
3194
|
+
style: it?.pagination,
|
|
3122
3195
|
horizontalSpacing: L,
|
|
3123
|
-
fetching:
|
|
3196
|
+
fetching: p,
|
|
3124
3197
|
page: R,
|
|
3125
|
-
onPageChange:
|
|
3126
|
-
totalRecords:
|
|
3127
|
-
recordsPerPage:
|
|
3128
|
-
onRecordsPerPageChange:
|
|
3129
|
-
recordsPerPageOptions:
|
|
3130
|
-
recordsPerPageLabel:
|
|
3131
|
-
paginationWithEdges:
|
|
3198
|
+
onPageChange: St,
|
|
3199
|
+
totalRecords: ne,
|
|
3200
|
+
recordsPerPage: re,
|
|
3201
|
+
onRecordsPerPageChange: z,
|
|
3202
|
+
recordsPerPageOptions: ae,
|
|
3203
|
+
recordsPerPageLabel: oe,
|
|
3204
|
+
paginationWithEdges: B,
|
|
3132
3205
|
paginationWithControls: se,
|
|
3133
|
-
paginationActiveTextColor:
|
|
3134
|
-
paginationActiveBackgroundColor:
|
|
3135
|
-
paginationSize:
|
|
3136
|
-
paginationText:
|
|
3137
|
-
paginationWrapBreakpoint:
|
|
3138
|
-
getPaginationControlProps:
|
|
3139
|
-
getPaginationItemProps:
|
|
3140
|
-
noRecordsText:
|
|
3141
|
-
loadingText:
|
|
3142
|
-
recordsLength:
|
|
3143
|
-
renderPagination:
|
|
3206
|
+
paginationActiveTextColor: V,
|
|
3207
|
+
paginationActiveBackgroundColor: ce,
|
|
3208
|
+
paginationSize: H,
|
|
3209
|
+
paginationText: le,
|
|
3210
|
+
paginationWrapBreakpoint: ue,
|
|
3211
|
+
getPaginationControlProps: de,
|
|
3212
|
+
getPaginationItemProps: U,
|
|
3213
|
+
noRecordsText: be,
|
|
3214
|
+
loadingText: ve,
|
|
3215
|
+
recordsLength: Ct,
|
|
3216
|
+
renderPagination: fe
|
|
3144
3217
|
}),
|
|
3145
|
-
|
|
3146
|
-
fetching:
|
|
3147
|
-
backgroundBlur:
|
|
3148
|
-
customContent:
|
|
3149
|
-
size:
|
|
3150
|
-
type:
|
|
3151
|
-
color:
|
|
3218
|
+
m(Ar, {
|
|
3219
|
+
fetching: p,
|
|
3220
|
+
backgroundBlur: pe,
|
|
3221
|
+
customContent: me,
|
|
3222
|
+
size: he,
|
|
3223
|
+
type: ge,
|
|
3224
|
+
color: _e
|
|
3152
3225
|
}),
|
|
3153
|
-
|
|
3154
|
-
icon:
|
|
3155
|
-
text:
|
|
3156
|
-
active: !
|
|
3157
|
-
children:
|
|
3226
|
+
m(yn, {
|
|
3227
|
+
icon: xe,
|
|
3228
|
+
text: be,
|
|
3229
|
+
active: !p && !Ct,
|
|
3230
|
+
children: ye
|
|
3158
3231
|
})
|
|
3159
3232
|
]
|
|
3160
3233
|
})
|
|
@@ -3162,83 +3235,99 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
3162
3235
|
}
|
|
3163
3236
|
//#endregion
|
|
3164
3237
|
//#region src/DataTable/UpdateModal.tsx
|
|
3165
|
-
function
|
|
3166
|
-
let {
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
})
|
|
3183
|
-
]
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3238
|
+
function Hr(t) {
|
|
3239
|
+
let n = e(18), { fields: r, onClose: i, queryKey: a, connectedQueryKeys: o, apiPath: s, id: c, steps: l } = t, { data: u, isLoading: d } = Ht(s, a, c), { mutateAsync: f, isPending: p, error: g } = Kt(s, a, o);
|
|
3240
|
+
if (d || !u) {
|
|
3241
|
+
let e;
|
|
3242
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(ne, { height: 40 }), n[0] = e) : e = n[0];
|
|
3243
|
+
let t;
|
|
3244
|
+
n[1] === r.length ? t = n[2] : (t = Array.from({ length: r.length }).map(Ur), n[1] = r.length, n[2] = t);
|
|
3245
|
+
let i;
|
|
3246
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ h(E, {
|
|
3247
|
+
mt: "md",
|
|
3248
|
+
justify: "end",
|
|
3249
|
+
children: [/* @__PURE__ */ m(ne, {
|
|
3250
|
+
width: 100,
|
|
3251
|
+
height: 36
|
|
3252
|
+
}), /* @__PURE__ */ m(ne, {
|
|
3253
|
+
width: 100,
|
|
3254
|
+
height: 36
|
|
3255
|
+
})]
|
|
3256
|
+
}), n[3] = i) : i = n[3];
|
|
3257
|
+
let a;
|
|
3258
|
+
return n[4] === t ? a = n[5] : (a = /* @__PURE__ */ h(re, {
|
|
3259
|
+
gap: "md",
|
|
3260
|
+
children: [
|
|
3261
|
+
e,
|
|
3262
|
+
t,
|
|
3263
|
+
i
|
|
3264
|
+
]
|
|
3265
|
+
}), n[4] = t, n[5] = a), a;
|
|
3266
|
+
}
|
|
3267
|
+
let _;
|
|
3268
|
+
n[6] !== c || n[7] !== f ? (_ = async (e) => {
|
|
3269
|
+
await f({
|
|
3270
|
+
...e,
|
|
3271
|
+
id: c
|
|
3272
|
+
});
|
|
3273
|
+
}, n[6] = c, n[7] = f, n[8] = _) : _ = n[8];
|
|
3274
|
+
let v = _, y;
|
|
3275
|
+
return n[9] !== u || n[10] !== g || n[11] !== r || n[12] !== c || n[13] !== p || n[14] !== i || n[15] !== v || n[16] !== l ? (y = /* @__PURE__ */ m(nn, {
|
|
3276
|
+
fields: r,
|
|
3277
|
+
steps: l,
|
|
3278
|
+
record: u,
|
|
3279
|
+
recordId: c,
|
|
3280
|
+
submitting: p,
|
|
3281
|
+
error: g,
|
|
3282
|
+
onPersist: v,
|
|
3283
|
+
onClose: i
|
|
3284
|
+
}), n[9] = u, n[10] = g, n[11] = r, n[12] = c, n[13] = p, n[14] = i, n[15] = v, n[16] = l, n[17] = y) : y = n[17], y;
|
|
3285
|
+
}
|
|
3286
|
+
function Ur(e, t) {
|
|
3287
|
+
return /* @__PURE__ */ m(ne, { height: 35 }, t);
|
|
3199
3288
|
}
|
|
3200
3289
|
//#endregion
|
|
3201
3290
|
//#region src/DataTable/DeleteModal.tsx
|
|
3202
|
-
function
|
|
3203
|
-
let { mutateAsync: o, isError:
|
|
3204
|
-
return
|
|
3205
|
-
|
|
3206
|
-
}, [r,
|
|
3207
|
-
|
|
3291
|
+
function Wr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
|
|
3292
|
+
let { mutateAsync: o, isError: s, error: l, isPending: u } = qt(n, e, t), [d, g] = f(i), [_, y] = f(!1), x = _ || u;
|
|
3293
|
+
return c(() => {
|
|
3294
|
+
d.length || r();
|
|
3295
|
+
}, [r, d]), d.length ? /* @__PURE__ */ h(p, { children: [
|
|
3296
|
+
s && l.message && /* @__PURE__ */ m(v, {
|
|
3208
3297
|
variant: "outline",
|
|
3209
3298
|
color: "red",
|
|
3210
3299
|
title: l.name,
|
|
3211
3300
|
children: l.message
|
|
3212
3301
|
}),
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */
|
|
3302
|
+
/* @__PURE__ */ m(H, { children: a ? a(d) : d.length === 1 ? `Soll ${d.length} Eintrag wirklich gelöscht werden?` : `Sollen ${d.length} Einträge wirklich gelöscht werden?` }),
|
|
3303
|
+
/* @__PURE__ */ h(E, {
|
|
3215
3304
|
mt: "md",
|
|
3216
3305
|
justify: "end",
|
|
3217
|
-
children: [/* @__PURE__ */
|
|
3306
|
+
children: [/* @__PURE__ */ m(b, {
|
|
3218
3307
|
onClick: r,
|
|
3219
3308
|
variant: "outline",
|
|
3220
3309
|
disabled: x,
|
|
3221
3310
|
children: "Abbrechen"
|
|
3222
|
-
}), /* @__PURE__ */
|
|
3311
|
+
}), /* @__PURE__ */ m(b, {
|
|
3223
3312
|
color: "red",
|
|
3224
3313
|
loading: x,
|
|
3225
3314
|
onClick: async () => {
|
|
3226
|
-
|
|
3315
|
+
y(!0);
|
|
3227
3316
|
try {
|
|
3228
|
-
await Promise.all(
|
|
3317
|
+
await Promise.all(d.map((e) => o(e.id))), g([]);
|
|
3229
3318
|
} finally {
|
|
3230
|
-
|
|
3319
|
+
y(!1);
|
|
3231
3320
|
}
|
|
3232
3321
|
},
|
|
3233
3322
|
children: "Löschen"
|
|
3234
3323
|
})]
|
|
3235
3324
|
})
|
|
3236
|
-
] }) : /* @__PURE__ */ p
|
|
3325
|
+
] }) : /* @__PURE__ */ m(p, {});
|
|
3237
3326
|
}
|
|
3238
3327
|
//#endregion
|
|
3239
3328
|
//#region src/Hooks/usePersistentState.ts
|
|
3240
|
-
function
|
|
3241
|
-
let n = `use_persistent_storage_${t}`, [r, i] =
|
|
3329
|
+
function Gr(e, t) {
|
|
3330
|
+
let n = `use_persistent_storage_${t}`, [r, i] = f(() => {
|
|
3242
3331
|
try {
|
|
3243
3332
|
let t = localStorage.getItem(n);
|
|
3244
3333
|
return t ? JSON.parse(t) : e;
|
|
@@ -3255,12 +3344,12 @@ function Rr(e, t) {
|
|
|
3255
3344
|
}
|
|
3256
3345
|
//#endregion
|
|
3257
3346
|
//#region src/utils/sort.ts
|
|
3258
|
-
var
|
|
3347
|
+
var Kr = [
|
|
3259
3348
|
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,
|
|
3260
3349
|
/^\d{4}-\d{2}-\d{2}$/,
|
|
3261
3350
|
/^\d{1,2}\/\d{1,2}\/\d{4}$/,
|
|
3262
3351
|
/^\d{1,2}\.\d{1,2}\.\d{4}$/
|
|
3263
|
-
],
|
|
3352
|
+
], qr = (e, t) => {
|
|
3264
3353
|
let n = e.map((e) => e[t]).filter((e) => e != null && e !== "");
|
|
3265
3354
|
if (n.length === 0) return "string";
|
|
3266
3355
|
let r = n.slice(0, 100), i = {
|
|
@@ -3276,7 +3365,7 @@ var zr = [
|
|
|
3276
3365
|
i.number++;
|
|
3277
3366
|
return;
|
|
3278
3367
|
}
|
|
3279
|
-
if (
|
|
3368
|
+
if (Kr.some((e) => e.test(t))) {
|
|
3280
3369
|
let e = new Date(t);
|
|
3281
3370
|
if (!isNaN(e.getTime())) {
|
|
3282
3371
|
i.date++;
|
|
@@ -3289,7 +3378,7 @@ var zr = [
|
|
|
3289
3378
|
let a = i.string + i.number + i.date;
|
|
3290
3379
|
return i.date / a >= .6 ? "date" : i.number / a >= .6 ? "number" : i.string / a >= .6 ? "string" : "mixed";
|
|
3291
3380
|
};
|
|
3292
|
-
function
|
|
3381
|
+
function Jr(e, t) {
|
|
3293
3382
|
switch (t) {
|
|
3294
3383
|
case "date":
|
|
3295
3384
|
if (typeof e == "string") {
|
|
@@ -3305,637 +3394,847 @@ function Vr(e, t) {
|
|
|
3305
3394
|
default: return String(e).toLowerCase().trim();
|
|
3306
3395
|
}
|
|
3307
3396
|
}
|
|
3308
|
-
var
|
|
3397
|
+
var Yr = (e, t, n = "asc") => {
|
|
3309
3398
|
if (!e || e.length === 0) return [];
|
|
3310
|
-
let r =
|
|
3399
|
+
let r = qr(e, t);
|
|
3311
3400
|
return [...e].sort((e, i) => {
|
|
3312
3401
|
let a = e[t], o = i[t], s = a == null || a === "", c = o == null || o === "";
|
|
3313
3402
|
if (s && c) return 0;
|
|
3314
3403
|
if (s) return n === "asc" ? -1 : 1;
|
|
3315
3404
|
if (c) return n === "asc" ? 1 : -1;
|
|
3316
|
-
let l =
|
|
3405
|
+
let l = Jr(a, r), u = Jr(o, r);
|
|
3317
3406
|
return l === null && u === null ? 0 : l === null ? n === "asc" ? 1 : -1 : u === null || l < u ? n === "asc" ? -1 : 1 : l > u ? n === "asc" ? 1 : -1 : 0;
|
|
3318
3407
|
});
|
|
3319
3408
|
};
|
|
3320
3409
|
//#endregion
|
|
3321
3410
|
//#region src/utils/filter.ts
|
|
3322
|
-
function
|
|
3411
|
+
function Xr(e) {
|
|
3323
3412
|
return !!e && typeof e == "object" && "id" in e;
|
|
3324
3413
|
}
|
|
3325
|
-
function
|
|
3414
|
+
function Zr(e, t) {
|
|
3326
3415
|
if (typeof e == "string" || typeof e == "number") return t.includes(String(e));
|
|
3327
3416
|
if (e && typeof e == "object") {
|
|
3328
3417
|
let n = e;
|
|
3329
|
-
return
|
|
3418
|
+
return Xr(n) && t.includes(n.id) ? !0 : Object.values(n).some((e) => typeof e == "string" && t.includes(e) || Xr(e) && t.includes(e.id));
|
|
3330
3419
|
}
|
|
3331
3420
|
return !1;
|
|
3332
3421
|
}
|
|
3333
|
-
function
|
|
3334
|
-
return Array.isArray(t) ? Array.isArray(e) ? e.some((e) =>
|
|
3422
|
+
function Qr(e, t) {
|
|
3423
|
+
return Array.isArray(t) ? Array.isArray(e) ? e.some((e) => Zr(e, t)) : Xr(e) ? t.includes(e.id) : !1 : typeof e == "string" && e.includes(t);
|
|
3335
3424
|
}
|
|
3336
|
-
function
|
|
3425
|
+
function $r(e, [t, n]) {
|
|
3337
3426
|
if (!t && !n || typeof e != "string") return !0;
|
|
3338
3427
|
let r = e.split(" ")[0];
|
|
3339
3428
|
return t && n ? r >= t && r <= n : t ? r >= t : r <= n;
|
|
3340
3429
|
}
|
|
3341
|
-
function
|
|
3430
|
+
function ei(e, t) {
|
|
3342
3431
|
if (t.value === void 0) return !0;
|
|
3343
3432
|
let n = e[t.id];
|
|
3344
3433
|
switch (t.type) {
|
|
3345
|
-
case "query": return
|
|
3346
|
-
case "date": return
|
|
3434
|
+
case "query": return Qr(n, t.value);
|
|
3435
|
+
case "date": return $r(n, t.value);
|
|
3347
3436
|
case "boolean": return n === t.value;
|
|
3348
3437
|
}
|
|
3349
3438
|
}
|
|
3350
|
-
function
|
|
3351
|
-
return !t || t.length === 0 ? e : e.filter((e) => t.every((t) =>
|
|
3439
|
+
function ti(e, t) {
|
|
3440
|
+
return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => ei(e, t)));
|
|
3352
3441
|
}
|
|
3353
3442
|
//#endregion
|
|
3354
3443
|
//#region src/DataTable/FieldCard.tsx
|
|
3355
|
-
function
|
|
3356
|
-
|
|
3444
|
+
function ni(t) {
|
|
3445
|
+
let n = e(4), { rows: r } = t, i;
|
|
3446
|
+
n[0] === r ? i = n[1] : (i = r.map(ri), n[0] = r, n[1] = i);
|
|
3447
|
+
let a;
|
|
3448
|
+
return n[2] === i ? a = n[3] : (a = /* @__PURE__ */ m(p, { children: i }), n[2] = i, n[3] = a), a;
|
|
3449
|
+
}
|
|
3450
|
+
function ri(e, t) {
|
|
3451
|
+
return /* @__PURE__ */ h(y, { children: [t > 0 && /* @__PURE__ */ m(w, {}), /* @__PURE__ */ h(E, {
|
|
3357
3452
|
wrap: "nowrap",
|
|
3358
3453
|
justify: "space-between",
|
|
3359
3454
|
align: "flex-start",
|
|
3360
3455
|
gap: "md",
|
|
3361
3456
|
py: "xs",
|
|
3362
3457
|
px: "sm",
|
|
3363
|
-
children: [/* @__PURE__ */
|
|
3458
|
+
children: [/* @__PURE__ */ m(H, {
|
|
3364
3459
|
fw: 700,
|
|
3365
3460
|
fz: "sm",
|
|
3366
3461
|
style: { flexShrink: 0 },
|
|
3367
3462
|
children: e.label
|
|
3368
|
-
}), /* @__PURE__ */
|
|
3463
|
+
}), /* @__PURE__ */ m(y, {
|
|
3369
3464
|
ta: "right",
|
|
3370
3465
|
fz: "sm",
|
|
3371
3466
|
style: { minWidth: 0 },
|
|
3372
3467
|
children: e.value
|
|
3373
3468
|
})]
|
|
3374
|
-
})] }, typeof e.label == "string" ? e.label : t)
|
|
3375
|
-
}
|
|
3376
|
-
function
|
|
3377
|
-
|
|
3469
|
+
})] }, typeof e.label == "string" ? e.label : t);
|
|
3470
|
+
}
|
|
3471
|
+
function ii(t) {
|
|
3472
|
+
let n = e(3), { rows: r } = t, i;
|
|
3473
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
3474
|
+
borderRadius: "var(--mantine-radius-md)",
|
|
3475
|
+
overflow: "hidden"
|
|
3476
|
+
}, n[0] = i) : i = n[0];
|
|
3477
|
+
let a;
|
|
3478
|
+
return n[1] === r ? a = n[2] : (a = /* @__PURE__ */ m(y, {
|
|
3378
3479
|
bg: "var(--mantine-color-gray-light)",
|
|
3379
|
-
style:
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
},
|
|
3383
|
-
children: /* @__PURE__ */ p(Yr, { rows: e })
|
|
3384
|
-
});
|
|
3480
|
+
style: i,
|
|
3481
|
+
children: /* @__PURE__ */ m(ni, { rows: r })
|
|
3482
|
+
}), n[1] = r, n[2] = a), a;
|
|
3385
3483
|
}
|
|
3386
3484
|
//#endregion
|
|
3387
3485
|
//#region src/DataTable/MobileCardList.tsx
|
|
3388
|
-
function
|
|
3486
|
+
function ai(e, t) {
|
|
3389
3487
|
return t.split(".").reduce((e, t) => {
|
|
3390
3488
|
if (e && typeof e == "object" && t in e) return e[t];
|
|
3391
3489
|
}, e);
|
|
3392
3490
|
}
|
|
3393
|
-
function
|
|
3491
|
+
function oi(e, t) {
|
|
3394
3492
|
let n = t.column;
|
|
3395
3493
|
if (n.render) return n.render(e, 0);
|
|
3396
|
-
let r =
|
|
3397
|
-
return r == null ? /* @__PURE__ */
|
|
3494
|
+
let r = ai(e, n.accessor ?? t.id);
|
|
3495
|
+
return r == null ? /* @__PURE__ */ m(H, {
|
|
3398
3496
|
c: "dimmed",
|
|
3399
3497
|
children: "–"
|
|
3400
|
-
}) : typeof r == "boolean" ? /* @__PURE__ */
|
|
3498
|
+
}) : typeof r == "boolean" ? /* @__PURE__ */ m(H, {
|
|
3401
3499
|
fz: "sm",
|
|
3402
3500
|
children: r ? "Ja" : "Nein"
|
|
3403
|
-
}) : /* @__PURE__ */
|
|
3501
|
+
}) : /* @__PURE__ */ m(H, {
|
|
3404
3502
|
fz: "sm",
|
|
3405
3503
|
children: String(r)
|
|
3406
3504
|
});
|
|
3407
3505
|
}
|
|
3408
|
-
function
|
|
3409
|
-
let
|
|
3410
|
-
|
|
3411
|
-
|
|
3506
|
+
function si(t) {
|
|
3507
|
+
let r = e(18), { records: i, fields: a, onRowClick: o, actions: s, canUpdate: c, canDelete: l, pagination: u, sort: d, rowExpansion: v } = t, b;
|
|
3508
|
+
r[0] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ new Set(), r[0] = b) : b = r[0];
|
|
3509
|
+
let [x, S] = f(b), T = v?.expanded, O;
|
|
3510
|
+
r[1] !== T || r[2] !== x ? (O = (e) => T ? T.recordIds.includes(e) : x.has(e), r[1] = T, r[2] = x, r[3] = O) : O = r[3];
|
|
3511
|
+
let A = O, j;
|
|
3512
|
+
r[4] === T ? j = r[5] : (j = (e) => {
|
|
3513
|
+
if (T) {
|
|
3514
|
+
let { recordIds: t, onRecordIdsChange: n } = T;
|
|
3412
3515
|
n(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
3413
|
-
} else
|
|
3516
|
+
} else S((t) => {
|
|
3414
3517
|
let n = new Set(t);
|
|
3415
3518
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3416
3519
|
});
|
|
3417
|
-
},
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
label: t.column.title ?? t.id
|
|
3422
|
-
}), e;
|
|
3423
|
-
}, []), I = (e, t, n) => {
|
|
3424
|
-
r?.({
|
|
3520
|
+
}, r[4] = T, r[5] = j);
|
|
3521
|
+
let M = j, N = a.filter(_i), P = a.filter(gi), I = P.filter(hi).map(mi), L = I.length > 0, R = L ? I : P.slice(0, 1).map(pi), [ne, z] = f(!1), ie = N.filter(fi).reduce(di, []), ae;
|
|
3522
|
+
r[6] === o ? ae = r[7] : (ae = (e, t, n) => {
|
|
3523
|
+
o?.({
|
|
3425
3524
|
record: e,
|
|
3426
3525
|
index: t,
|
|
3427
3526
|
event: n
|
|
3428
3527
|
});
|
|
3429
|
-
};
|
|
3430
|
-
|
|
3431
|
-
gap: "
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3528
|
+
}, r[6] = o, r[7] = ae);
|
|
3529
|
+
let oe = ae, B = re, se = (d && ie.length > 0 || P.length > 0) && /* @__PURE__ */ h(E, {
|
|
3530
|
+
gap: "xs",
|
|
3531
|
+
wrap: "nowrap",
|
|
3532
|
+
justify: "flex-end",
|
|
3533
|
+
children: [d && ie.length > 0 && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(te, {
|
|
3534
|
+
data: ie,
|
|
3535
|
+
value: d.field,
|
|
3536
|
+
onChange: (e) => e && d.onSortChange(e, d.direction),
|
|
3537
|
+
allowDeselect: !1,
|
|
3538
|
+
style: { flex: 1 }
|
|
3539
|
+
}), /* @__PURE__ */ m(_, {
|
|
3540
|
+
variant: "filled",
|
|
3541
|
+
size: "input-sm",
|
|
3542
|
+
onClick: () => d.onSortChange(d.field, d.direction === "asc" ? "desc" : "asc"),
|
|
3543
|
+
children: d.direction === "asc" ? /* @__PURE__ */ m(Te, { size: 18 }) : /* @__PURE__ */ m(Ee, { size: 18 })
|
|
3544
|
+
})] }), P.length > 0 && /* @__PURE__ */ h(F, {
|
|
3545
|
+
opened: ne,
|
|
3546
|
+
onChange: z,
|
|
3547
|
+
position: "bottom-end",
|
|
3548
|
+
withArrow: !0,
|
|
3549
|
+
shadow: "md",
|
|
3550
|
+
trapFocus: !0,
|
|
3551
|
+
children: [/* @__PURE__ */ m(F.Target, { children: /* @__PURE__ */ m(D, {
|
|
3552
|
+
inline: !0,
|
|
3553
|
+
disabled: !L,
|
|
3554
|
+
color: "green",
|
|
3555
|
+
withBorder: !0,
|
|
3556
|
+
children: /* @__PURE__ */ m(_, {
|
|
3557
|
+
variant: L ? "filled" : "default",
|
|
3446
3558
|
size: "input-sm",
|
|
3447
|
-
onClick: () =>
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
children: [/* @__PURE__ */ p(F.Target, { children: /* @__PURE__ */ p(E, {
|
|
3457
|
-
inline: !0,
|
|
3458
|
-
disabled: !A,
|
|
3459
|
-
color: "green",
|
|
3460
|
-
withBorder: !0,
|
|
3461
|
-
children: /* @__PURE__ */ p(g, {
|
|
3462
|
-
variant: A ? "filled" : "default",
|
|
3463
|
-
size: "input-sm",
|
|
3464
|
-
onClick: () => N((e) => !e),
|
|
3465
|
-
"aria-label": "Filter",
|
|
3466
|
-
children: /* @__PURE__ */ p(Se, { size: 18 })
|
|
3467
|
-
})
|
|
3468
|
-
}) }), /* @__PURE__ */ p(F.Dropdown, {
|
|
3469
|
-
p: 0,
|
|
3470
|
-
children: /* @__PURE__ */ p(h, {
|
|
3471
|
-
multiple: !0,
|
|
3472
|
-
defaultValue: j,
|
|
3473
|
-
style: {
|
|
3474
|
-
minWidth: 260,
|
|
3475
|
-
maxWidth: 320
|
|
3476
|
-
},
|
|
3477
|
-
children: D.map((e) => /* @__PURE__ */ m(h.Item, {
|
|
3478
|
-
value: e.id,
|
|
3479
|
-
children: [/* @__PURE__ */ p(h.Control, { children: /* @__PURE__ */ m(T, {
|
|
3480
|
-
gap: "xs",
|
|
3481
|
-
children: [/* @__PURE__ */ p(V, {
|
|
3482
|
-
fw: 600,
|
|
3483
|
-
fz: "sm",
|
|
3484
|
-
children: e.column.title ?? e.id
|
|
3485
|
-
}), e.column.filtering && /* @__PURE__ */ p(v, {
|
|
3486
|
-
w: 8,
|
|
3487
|
-
h: 8,
|
|
3488
|
-
bg: "green",
|
|
3489
|
-
style: { borderRadius: "50%" }
|
|
3490
|
-
})]
|
|
3491
|
-
}) }), /* @__PURE__ */ p(h.Panel, { children: typeof e.column.filter == "function" ? e.column.filter({ close: () => N(!1) }) : e.column.filter })]
|
|
3492
|
-
}, e.id))
|
|
3493
|
-
})
|
|
3494
|
-
})]
|
|
3495
|
-
})]
|
|
3496
|
-
}),
|
|
3497
|
-
e.length === 0 && /* @__PURE__ */ p(V, {
|
|
3498
|
-
c: "dimmed",
|
|
3499
|
-
ta: "center",
|
|
3500
|
-
py: "xl",
|
|
3501
|
-
children: "Keine Einträge gefunden"
|
|
3502
|
-
}),
|
|
3503
|
-
e.map((e, n) => {
|
|
3504
|
-
let s = e.id ?? n, c = !!l && (!l.expandable || l.expandable(e)), u = c && b(s);
|
|
3505
|
-
return /* @__PURE__ */ p(t.Fragment, { children: /* @__PURE__ */ m(v, {
|
|
3506
|
-
bg: "var(--mantine-color-body)",
|
|
3507
|
-
bd: "1px solid var(--mantine-color-default-border)",
|
|
3559
|
+
onClick: () => z(ui),
|
|
3560
|
+
"aria-label": "Filter",
|
|
3561
|
+
children: /* @__PURE__ */ m(xe, { size: 18 })
|
|
3562
|
+
})
|
|
3563
|
+
}) }), /* @__PURE__ */ m(F.Dropdown, {
|
|
3564
|
+
p: 0,
|
|
3565
|
+
children: /* @__PURE__ */ m(g, {
|
|
3566
|
+
multiple: !0,
|
|
3567
|
+
defaultValue: R,
|
|
3508
3568
|
style: {
|
|
3509
|
-
|
|
3510
|
-
|
|
3569
|
+
minWidth: 260,
|
|
3570
|
+
maxWidth: 320
|
|
3511
3571
|
},
|
|
3512
|
-
children:
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3572
|
+
children: P.map((e) => /* @__PURE__ */ h(g.Item, {
|
|
3573
|
+
value: e.id,
|
|
3574
|
+
children: [/* @__PURE__ */ m(g.Control, { children: /* @__PURE__ */ h(E, {
|
|
3575
|
+
gap: "xs",
|
|
3576
|
+
children: [/* @__PURE__ */ m(H, {
|
|
3577
|
+
fw: 600,
|
|
3578
|
+
fz: "sm",
|
|
3579
|
+
children: e.column.title ?? e.id
|
|
3580
|
+
}), e.column.filtering && /* @__PURE__ */ m(y, {
|
|
3581
|
+
w: 8,
|
|
3582
|
+
h: 8,
|
|
3583
|
+
bg: "green",
|
|
3584
|
+
style: { borderRadius: "50%" }
|
|
3585
|
+
})]
|
|
3586
|
+
}) }), /* @__PURE__ */ m(g.Panel, { children: typeof e.column.filter == "function" ? e.column.filter({ close: () => z(!1) }) : e.column.filter })]
|
|
3587
|
+
}, e.id))
|
|
3588
|
+
})
|
|
3589
|
+
})]
|
|
3590
|
+
})]
|
|
3591
|
+
}), V;
|
|
3592
|
+
r[8] === i.length ? V = r[9] : (V = i.length === 0 && /* @__PURE__ */ m(H, {
|
|
3593
|
+
c: "dimmed",
|
|
3594
|
+
ta: "center",
|
|
3595
|
+
py: "xl",
|
|
3596
|
+
children: "Keine Einträge gefunden"
|
|
3597
|
+
}), r[8] = i.length, r[9] = V);
|
|
3598
|
+
let ce = i.map((e, t) => {
|
|
3599
|
+
let r = e.id ?? t, i = !!v && (!v.expandable || v.expandable(e)), a = i && A(r);
|
|
3600
|
+
return /* @__PURE__ */ m(n.Fragment, { children: /* @__PURE__ */ h(y, {
|
|
3601
|
+
bg: "var(--mantine-color-body)",
|
|
3602
|
+
bd: "1px solid var(--mantine-color-default-border)",
|
|
3603
|
+
style: {
|
|
3604
|
+
borderRadius: "var(--mantine-radius-md)",
|
|
3605
|
+
overflow: "hidden"
|
|
3606
|
+
},
|
|
3607
|
+
children: [/* @__PURE__ */ h(y, {
|
|
3608
|
+
w: "100%",
|
|
3609
|
+
style: { cursor: o || i ? "pointer" : "default" },
|
|
3610
|
+
onClick: (n) => {
|
|
3611
|
+
i && !o ? M(r) : oe(e, t, n);
|
|
3612
|
+
},
|
|
3613
|
+
children: [s && s.length > 0 && /* @__PURE__ */ m(E, {
|
|
3614
|
+
px: "sm",
|
|
3615
|
+
pt: "sm",
|
|
3616
|
+
justify: "flex-end",
|
|
3617
|
+
children: (() => {
|
|
3618
|
+
let t = s.filter((t) => !(t.label === "Bearbeiten" && c && !c(e) || t.label === "Löschen" && l && !l(e)));
|
|
3619
|
+
return t.length === 0 ? null : /* @__PURE__ */ h(k, {
|
|
3620
|
+
shadow: "md",
|
|
3621
|
+
position: "bottom-end",
|
|
3622
|
+
children: [/* @__PURE__ */ m(k.Target, { children: /* @__PURE__ */ m(_, {
|
|
3623
|
+
variant: "subtle",
|
|
3624
|
+
color: "gray",
|
|
3625
|
+
size: "sm",
|
|
3626
|
+
onClick: li,
|
|
3627
|
+
children: /* @__PURE__ */ m(be, { size: 16 })
|
|
3628
|
+
}) }), /* @__PURE__ */ m(k.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ m(k.Item, {
|
|
3629
|
+
leftSection: t.icon,
|
|
3630
|
+
onClick: (n) => {
|
|
3631
|
+
n.stopPropagation(), t.onClick([e]);
|
|
3632
|
+
},
|
|
3633
|
+
children: t.label
|
|
3634
|
+
}, `card_action_${n}`)) })]
|
|
3635
|
+
});
|
|
3636
|
+
})()
|
|
3637
|
+
}), /* @__PURE__ */ m(ni, { rows: N.map((t) => ({
|
|
3638
|
+
label: t.column.title ?? t.id,
|
|
3639
|
+
value: oi(e, t)
|
|
3640
|
+
})) })]
|
|
3641
|
+
}), i && /* @__PURE__ */ h(C, {
|
|
3642
|
+
expanded: a,
|
|
3643
|
+
children: [/* @__PURE__ */ m(w, {}), /* @__PURE__ */ m(y, {
|
|
3644
|
+
px: "sm",
|
|
3645
|
+
py: "sm",
|
|
3646
|
+
children: v.content(e, !0)
|
|
3585
3647
|
})]
|
|
3648
|
+
})]
|
|
3649
|
+
}) }, r);
|
|
3650
|
+
}), le;
|
|
3651
|
+
r[10] === u ? le = r[11] : (le = u && u.totalRecords > u.recordsPerPage && /* @__PURE__ */ h(re, {
|
|
3652
|
+
gap: "xs",
|
|
3653
|
+
mt: "sm",
|
|
3654
|
+
children: [/* @__PURE__ */ m(E, {
|
|
3655
|
+
justify: "center",
|
|
3656
|
+
children: /* @__PURE__ */ m(ee, {
|
|
3657
|
+
total: Math.ceil(u.totalRecords / u.recordsPerPage),
|
|
3658
|
+
value: u.page,
|
|
3659
|
+
onChange: u.onPageChange,
|
|
3660
|
+
size: "sm"
|
|
3586
3661
|
})
|
|
3662
|
+
}), u.recordsPerPageOptions && u.onRecordsPerPageChange && /* @__PURE__ */ h(E, {
|
|
3663
|
+
justify: "center",
|
|
3664
|
+
gap: "xs",
|
|
3665
|
+
children: [/* @__PURE__ */ m(H, {
|
|
3666
|
+
fz: "xs",
|
|
3667
|
+
c: "dimmed",
|
|
3668
|
+
children: "Einträge pro Seite:"
|
|
3669
|
+
}), /* @__PURE__ */ m(te, {
|
|
3670
|
+
data: u.recordsPerPageOptions.map(ci),
|
|
3671
|
+
value: String(u.recordsPerPage),
|
|
3672
|
+
onChange: (e) => e && u.onRecordsPerPageChange(Number(e)),
|
|
3673
|
+
allowDeselect: !1,
|
|
3674
|
+
size: "xs",
|
|
3675
|
+
w: 70
|
|
3676
|
+
})]
|
|
3677
|
+
})]
|
|
3678
|
+
}), r[10] = u, r[11] = le);
|
|
3679
|
+
let ue;
|
|
3680
|
+
return r[12] !== B || r[13] !== le || r[14] !== se || r[15] !== V || r[16] !== ce ? (ue = /* @__PURE__ */ h(B, {
|
|
3681
|
+
gap: "sm",
|
|
3682
|
+
my: "md",
|
|
3683
|
+
children: [
|
|
3684
|
+
se,
|
|
3685
|
+
V,
|
|
3686
|
+
ce,
|
|
3687
|
+
le
|
|
3587
3688
|
]
|
|
3588
|
-
});
|
|
3689
|
+
}), r[12] = B, r[13] = le, r[14] = se, r[15] = V, r[16] = ce, r[17] = ue) : ue = r[17], ue;
|
|
3690
|
+
}
|
|
3691
|
+
function ci(e) {
|
|
3692
|
+
return {
|
|
3693
|
+
value: String(e),
|
|
3694
|
+
label: String(e)
|
|
3695
|
+
};
|
|
3696
|
+
}
|
|
3697
|
+
function li(e) {
|
|
3698
|
+
return e.stopPropagation();
|
|
3699
|
+
}
|
|
3700
|
+
function ui(e) {
|
|
3701
|
+
return !e;
|
|
3702
|
+
}
|
|
3703
|
+
function di(e, t) {
|
|
3704
|
+
let n = t.column.accessor ?? t.id;
|
|
3705
|
+
return e.some((e) => e.value === n) || e.push({
|
|
3706
|
+
value: n,
|
|
3707
|
+
label: t.column.title ?? t.id
|
|
3708
|
+
}), e;
|
|
3709
|
+
}
|
|
3710
|
+
function fi(e) {
|
|
3711
|
+
return e.column.sortable !== !1;
|
|
3712
|
+
}
|
|
3713
|
+
function pi(e) {
|
|
3714
|
+
return e.id;
|
|
3715
|
+
}
|
|
3716
|
+
function mi(e) {
|
|
3717
|
+
return e.id;
|
|
3718
|
+
}
|
|
3719
|
+
function hi(e) {
|
|
3720
|
+
return e.column.filtering;
|
|
3721
|
+
}
|
|
3722
|
+
function gi(e) {
|
|
3723
|
+
return e.column && e.column.filter != null;
|
|
3724
|
+
}
|
|
3725
|
+
function _i(e) {
|
|
3726
|
+
return e.list && e.column && !e.column.hidden;
|
|
3589
3727
|
}
|
|
3590
3728
|
//#endregion
|
|
3591
3729
|
//#region src/DataTable/DataTable.tsx
|
|
3592
|
-
var
|
|
3730
|
+
var vi = [
|
|
3593
3731
|
10,
|
|
3594
3732
|
15,
|
|
3595
3733
|
50,
|
|
3596
3734
|
100,
|
|
3597
3735
|
500
|
|
3598
3736
|
];
|
|
3599
|
-
function
|
|
3600
|
-
let
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3737
|
+
function yi(t) {
|
|
3738
|
+
let n = e(162), { title: r, queryKey: i, connectedQueryKeys: o, apiPath: s, mutationApiPath: l, buttons: u, fields: g, selection: x, pagination: S, filters: C, actions: w, steps: D, defaultSort: O, onSortChange: A, createButtonText: j, queryParams: M, tabs: P, defaultTab: ee, activeTab: F, onActiveTabChange: I, canUpdate: L, canDelete: R, showRefresh: te, rowExpansion: z, onRowClick: ie, mobileCards: ae, deleteConfirmMessage: oe, editRecordId: B, onEditRecordIdChange: se } = t, V = te === void 0 ? !0 : te, H = ae === void 0 ? !1 : ae, [le, ue] = f(ee || (P && P.length > 0 ? P[0].value : null)), U = F === void 0 ? le : F, fe;
|
|
3739
|
+
n[0] !== F || n[1] !== I ? (fe = (e) => {
|
|
3740
|
+
F === void 0 && ue(e), I && I(e);
|
|
3741
|
+
}, n[0] = F, n[1] = I, n[2] = fe) : fe = n[2];
|
|
3742
|
+
let pe = fe, me;
|
|
3743
|
+
n[3] !== U || n[4] !== P ? (me = P?.find((e) => e.value === U), n[3] = U, n[4] = P, n[5] = me) : me = n[5];
|
|
3744
|
+
let he = me, ge;
|
|
3745
|
+
n[6] === he?.queryParams ? ge = n[7] : (ge = he?.queryParams || {}, n[6] = he?.queryParams, n[7] = ge);
|
|
3746
|
+
let _e = ge, be = he?.apiPath ?? s, xe = he?.mutationApiPath ?? l ?? be, Te;
|
|
3747
|
+
if (n[8] !== _e || n[9] !== M) {
|
|
3748
|
+
let e = {
|
|
3749
|
+
...M,
|
|
3750
|
+
..._e
|
|
3751
|
+
};
|
|
3752
|
+
Te = e ? "?" + Object.entries(e).filter(Ni).map(Mi).join("&") : "", n[8] = _e, n[9] = M, n[10] = Te;
|
|
3753
|
+
} else Te = n[10];
|
|
3754
|
+
let Ee = Te, Oe;
|
|
3755
|
+
n[11] !== U || n[12] !== i ? (Oe = U ? [...i, U] : i, n[11] = U, n[12] = i, n[13] = Oe) : Oe = n[13];
|
|
3756
|
+
let ke = Oe, { data: Ae, isLoading: je, isError: Me, isRefetching: Ne, refetch: Pe } = Ut(be + Ee, ke), Fe = ti(Array.isArray(Ae) ? Ae : [], C), Ie = O?.field ?? g[0].id, Le = O?.direction ?? "desc", Re;
|
|
3757
|
+
n[14] !== Ie || n[15] !== Le ? (Re = {
|
|
3758
|
+
columnAccessor: Ie,
|
|
3759
|
+
direction: Le
|
|
3760
|
+
}, n[14] = Ie, n[15] = Le, n[16] = Re) : Re = n[16];
|
|
3761
|
+
let [ze, Be] = f(Re), Ve;
|
|
3762
|
+
n[17] === A ? Ve = n[18] : (Ve = (e) => {
|
|
3763
|
+
Be(e), A && A(String(e.columnAccessor), e.direction);
|
|
3764
|
+
}, n[17] = A, n[18] = Ve);
|
|
3765
|
+
let He = Ve, W = Yr(Fe, ze.columnAccessor, ze.direction), [G, Ue] = Gr(vi[1], "mantine-table-page-size"), [We, Ge] = f(1), Ke = S ? W.slice((We - 1) * G, We * G) : W, qe;
|
|
3766
|
+
n[19] === Symbol.for("react.memo_cache_sentinel") ? (qe = [], n[19] = qe) : qe = n[19];
|
|
3767
|
+
let [Je, Ye] = f(qe), K = z?.expanded?.recordIds ?? Je, Xe = z?.expanded?.onRecordIdsChange ?? Ye, Ze;
|
|
3768
|
+
n[20] !== K || n[21] !== Xe || n[22] !== z?.allowMultiple ? (Ze = (e) => {
|
|
3769
|
+
K.includes(e) ? Xe(K.filter((t) => t !== e)) : Xe(z?.allowMultiple ? [...K, e] : [e]);
|
|
3770
|
+
}, n[20] = K, n[21] = Xe, n[22] = z?.allowMultiple, n[23] = Ze) : Ze = n[23];
|
|
3771
|
+
let Qe = Ze, $e = g.findIndex(ji), et;
|
|
3772
|
+
n[24] !== K || n[25] !== g || n[26] !== $e || n[27] !== z || n[28] !== Qe ? (et = z && $e >= 0 ? g.map((e, t) => {
|
|
3773
|
+
if (t !== $e) return e;
|
|
3614
3774
|
let n = e.column.render;
|
|
3615
3775
|
return {
|
|
3616
3776
|
...e,
|
|
3617
3777
|
column: {
|
|
3618
3778
|
...e.column,
|
|
3619
|
-
render: (t, r) => /* @__PURE__ */
|
|
3779
|
+
render: (t, r) => /* @__PURE__ */ h(E, {
|
|
3620
3780
|
gap: "xs",
|
|
3621
3781
|
wrap: "nowrap",
|
|
3622
3782
|
align: "center",
|
|
3623
|
-
children: [!
|
|
3783
|
+
children: [!z.expandable || z.expandable(t) ? /* @__PURE__ */ m(y, {
|
|
3624
3784
|
component: "span",
|
|
3625
3785
|
"aria-label": "Aufklappen",
|
|
3626
3786
|
onClick: (e) => {
|
|
3627
|
-
e.stopPropagation(),
|
|
3787
|
+
e.stopPropagation(), Qe(t.id);
|
|
3628
3788
|
},
|
|
3629
3789
|
style: {
|
|
3630
3790
|
display: "inline-flex",
|
|
3631
3791
|
flexShrink: 0,
|
|
3632
3792
|
cursor: "pointer"
|
|
3633
3793
|
},
|
|
3634
|
-
children: /* @__PURE__ */
|
|
3794
|
+
children: /* @__PURE__ */ m(ye, {
|
|
3635
3795
|
size: 16,
|
|
3636
3796
|
style: {
|
|
3637
3797
|
color: "var(--mantine-primary-color-filled)",
|
|
3638
|
-
transform:
|
|
3798
|
+
transform: K.includes(t.id) ? "rotate(90deg)" : void 0,
|
|
3639
3799
|
transition: "transform 200ms ease"
|
|
3640
3800
|
}
|
|
3641
3801
|
})
|
|
3642
|
-
}) : /* @__PURE__ */
|
|
3802
|
+
}) : /* @__PURE__ */ m(y, {
|
|
3643
3803
|
w: 16,
|
|
3644
3804
|
style: { flexShrink: 0 }
|
|
3645
|
-
}), n ? n(t, r) : String(
|
|
3805
|
+
}), n ? n(t, r) : String(Tn(t, e.column.accessor) ?? "")]
|
|
3646
3806
|
})
|
|
3647
3807
|
}
|
|
3648
3808
|
};
|
|
3649
|
-
}) :
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3809
|
+
}) : g, n[24] = K, n[25] = g, n[26] = $e, n[27] = z, n[28] = Qe, n[29] = et) : et = n[29];
|
|
3810
|
+
let tt = et, nt;
|
|
3811
|
+
n[30] === Symbol.for("react.memo_cache_sentinel") ? (nt = [], n[30] = nt) : nt = n[30];
|
|
3812
|
+
let [q, J] = f(nt), rt;
|
|
3813
|
+
n[31] === Symbol.for("react.memo_cache_sentinel") ? (rt = () => {
|
|
3814
|
+
J([]);
|
|
3815
|
+
}, n[31] = rt) : rt = n[31];
|
|
3816
|
+
let it;
|
|
3817
|
+
n[32] === U ? it = n[33] : (it = [U], n[32] = U, n[33] = it), c(rt, it);
|
|
3818
|
+
let [at, ot] = f(!1), [st, ct] = f(!1), [Y, lt] = f(!1), ut = d(null), dt;
|
|
3819
|
+
n[34] !== B || n[35] !== se || n[36] !== W ? (dt = () => {
|
|
3820
|
+
if (!B) {
|
|
3821
|
+
ut.current = null;
|
|
3822
|
+
return;
|
|
3658
3823
|
}
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3824
|
+
if (ut.current === B) return;
|
|
3825
|
+
let e = W.find((e) => e.id === B);
|
|
3826
|
+
e && (ut.current = B, J([e]), ct(!0), se?.(null));
|
|
3827
|
+
}, n[34] = B, n[35] = se, n[36] = W, n[37] = dt) : dt = n[37];
|
|
3828
|
+
let ft;
|
|
3829
|
+
n[38] !== B || n[39] !== W ? (ft = [B, W], n[38] = B, n[39] = W, n[40] = ft) : ft = n[40], c(dt, ft);
|
|
3830
|
+
let pt;
|
|
3831
|
+
n[41] === g ? pt = n[42] : (pt = g.some(Ai), n[41] = g, n[42] = pt);
|
|
3832
|
+
let mt = pt, ht;
|
|
3833
|
+
n[43] === g ? ht = n[44] : (ht = g.some(ki), n[43] = g, n[44] = ht);
|
|
3834
|
+
let gt = ht, X;
|
|
3835
|
+
if (n[45] !== w || n[46] !== gt || n[47] !== mt) {
|
|
3836
|
+
if (X = [], mt) {
|
|
3837
|
+
let e;
|
|
3838
|
+
n[49] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(Ce, { size: 14 }), n[49] = e) : e = n[49];
|
|
3839
|
+
let t;
|
|
3840
|
+
n[50] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
3841
|
+
icon: e,
|
|
3842
|
+
label: "Bearbeiten",
|
|
3843
|
+
onClick: (e) => {
|
|
3844
|
+
J(e), ct(!0);
|
|
3845
|
+
}
|
|
3846
|
+
}, n[50] = t) : t = n[50], X.push(t);
|
|
3666
3847
|
}
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3848
|
+
if (w && X.push(...w), gt) {
|
|
3849
|
+
let e;
|
|
3850
|
+
n[51] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(De, { size: 14 }), n[51] = e) : e = n[51];
|
|
3851
|
+
let t;
|
|
3852
|
+
n[52] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
3853
|
+
icon: e,
|
|
3854
|
+
label: "Löschen",
|
|
3855
|
+
onClick: (e) => {
|
|
3856
|
+
J(e), lt(!0);
|
|
3857
|
+
}
|
|
3858
|
+
}, n[52] = t) : t = n[52], X.push(t);
|
|
3672
3859
|
}
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
onClick: () => G(!0),
|
|
3730
|
-
disabled: U.length !== 1,
|
|
3731
|
-
children: "Bearbeiten"
|
|
3732
|
-
}),
|
|
3733
|
-
(b ?? []).map((e, t) => /* @__PURE__ */ i(O.Item, {
|
|
3734
|
-
...e.icon && { leftSection: e.icon },
|
|
3735
|
-
key: `custom_action_${t}`,
|
|
3736
|
-
onClick: () => e.onClick(U),
|
|
3737
|
-
disabled: e.disabled?.(U) ?? !1
|
|
3738
|
-
}, e.label)),
|
|
3739
|
-
t && /* @__PURE__ */ p(O.Item, {
|
|
3740
|
-
leftSection: /* @__PURE__ */ p(Oe, { size: 14 }),
|
|
3741
|
-
onClick: () => qe(!0),
|
|
3742
|
-
color: "red",
|
|
3743
|
-
children: "Löschen"
|
|
3744
|
-
})
|
|
3745
|
-
] })]
|
|
3746
|
-
})
|
|
3747
|
-
});
|
|
3748
|
-
})(),
|
|
3749
|
-
c.find((e) => e.create) && /* @__PURE__ */ p(y, {
|
|
3750
|
-
onClick: () => We(!0),
|
|
3751
|
-
disabled: _e,
|
|
3752
|
-
children: E ?? "Erstellen"
|
|
3860
|
+
n[45] = w, n[46] = gt, n[47] = mt, n[48] = X;
|
|
3861
|
+
} else X = n[48];
|
|
3862
|
+
let _t, vt;
|
|
3863
|
+
n[53] === Symbol.for("react.memo_cache_sentinel") ? (_t = {
|
|
3864
|
+
base: "stretch",
|
|
3865
|
+
sm: "center"
|
|
3866
|
+
}, vt = {
|
|
3867
|
+
base: "column",
|
|
3868
|
+
sm: "row"
|
|
3869
|
+
}, n[53] = _t, n[54] = vt) : (_t = n[53], vt = n[54]);
|
|
3870
|
+
let yt = r ? "space-between" : "flex-end", bt;
|
|
3871
|
+
n[55] === r ? bt = n[56] : (bt = r && (typeof r == "string" ? /* @__PURE__ */ m(de, {
|
|
3872
|
+
order: 4,
|
|
3873
|
+
children: r
|
|
3874
|
+
}) : r), n[55] = r, n[56] = bt);
|
|
3875
|
+
let xt, St;
|
|
3876
|
+
n[57] === Symbol.for("react.memo_cache_sentinel") ? (xt = {
|
|
3877
|
+
base: "stretch",
|
|
3878
|
+
sm: "center"
|
|
3879
|
+
}, St = {
|
|
3880
|
+
base: "column",
|
|
3881
|
+
sm: "row"
|
|
3882
|
+
}, n[57] = xt, n[58] = St) : (xt = n[57], St = n[58]);
|
|
3883
|
+
let Ct, wt;
|
|
3884
|
+
n[59] === Symbol.for("react.memo_cache_sentinel") ? (Ct = {
|
|
3885
|
+
base: "flex-start",
|
|
3886
|
+
sm: "flex-end"
|
|
3887
|
+
}, wt = {
|
|
3888
|
+
base: 0,
|
|
3889
|
+
sm: "auto"
|
|
3890
|
+
}, n[59] = Ct, n[60] = wt) : (Ct = n[59], wt = n[60]);
|
|
3891
|
+
let Tt;
|
|
3892
|
+
n[61] !== Pe || n[62] !== V ? (Tt = V && /* @__PURE__ */ m(_, {
|
|
3893
|
+
variant: "subtle",
|
|
3894
|
+
onClick: () => Pe(),
|
|
3895
|
+
"aria-label": "Neuladen",
|
|
3896
|
+
children: /* @__PURE__ */ m(we, {})
|
|
3897
|
+
}), n[61] = Pe, n[62] = V, n[63] = Tt) : Tt = n[63];
|
|
3898
|
+
let Et;
|
|
3899
|
+
n[64] !== w || n[65] !== R || n[66] !== L || n[67] !== g || n[68] !== H || n[69] !== q || n[70] !== x ? (Et = (g.some(Oi) || x) && (() => {
|
|
3900
|
+
let e = g.find(Di) && (!L || q.length > 0 && L(q[0])), t = g.find(Ei) && (!R || q.length > 0 && R(q[0])), n = (w ?? []).length > 0, r = e || t || n;
|
|
3901
|
+
return /* @__PURE__ */ m(y, {
|
|
3902
|
+
...H ? { visibleFrom: "sm" } : {},
|
|
3903
|
+
children: /* @__PURE__ */ h(k, {
|
|
3904
|
+
shadow: "md",
|
|
3905
|
+
children: [/* @__PURE__ */ m(k.Target, { children: /* @__PURE__ */ m(b, {
|
|
3906
|
+
variant: "outline",
|
|
3907
|
+
rightSection: /* @__PURE__ */ m(ve, { size: 14 }),
|
|
3908
|
+
disabled: !q.length || !r,
|
|
3909
|
+
children: "Aktionen"
|
|
3910
|
+
}) }), /* @__PURE__ */ h(k.Dropdown, { children: [
|
|
3911
|
+
e && /* @__PURE__ */ m(k.Item, {
|
|
3912
|
+
leftSection: /* @__PURE__ */ m(Ce, { size: 14 }),
|
|
3913
|
+
onClick: () => ct(!0),
|
|
3914
|
+
disabled: q.length !== 1,
|
|
3915
|
+
children: "Bearbeiten"
|
|
3753
3916
|
}),
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3917
|
+
(w ?? []).map((e, t) => /* @__PURE__ */ a(k.Item, {
|
|
3918
|
+
...e.icon && { leftSection: e.icon },
|
|
3919
|
+
key: `custom_action_${t}`,
|
|
3920
|
+
onClick: () => e.onClick(q),
|
|
3921
|
+
disabled: e.disabled?.(q) ?? !1
|
|
3922
|
+
}, e.label)),
|
|
3923
|
+
t && /* @__PURE__ */ m(k.Item, {
|
|
3924
|
+
leftSection: /* @__PURE__ */ m(De, { size: 14 }),
|
|
3925
|
+
onClick: () => lt(!0),
|
|
3926
|
+
color: "red",
|
|
3927
|
+
children: "Löschen"
|
|
3928
|
+
})
|
|
3929
|
+
] })]
|
|
3930
|
+
})
|
|
3931
|
+
});
|
|
3932
|
+
})(), n[64] = w, n[65] = R, n[66] = L, n[67] = g, n[68] = H, n[69] = q, n[70] = x, n[71] = Et) : Et = n[71];
|
|
3933
|
+
let Dt;
|
|
3934
|
+
n[72] !== j || n[73] !== g || n[74] !== je ? (Dt = g.find(Ti) && /* @__PURE__ */ m(b, {
|
|
3935
|
+
onClick: () => ot(!0),
|
|
3936
|
+
disabled: je,
|
|
3937
|
+
children: j ?? "Erstellen"
|
|
3938
|
+
}), n[72] = j, n[73] = g, n[74] = je, n[75] = Dt) : Dt = n[75];
|
|
3939
|
+
let Ot;
|
|
3940
|
+
n[76] !== u || n[77] !== Tt || n[78] !== Et || n[79] !== Dt ? (Ot = /* @__PURE__ */ h(T, {
|
|
3941
|
+
align: xt,
|
|
3942
|
+
direction: St,
|
|
3943
|
+
gap: "xs",
|
|
3944
|
+
wrap: "wrap",
|
|
3945
|
+
justify: Ct,
|
|
3946
|
+
ml: wt,
|
|
3947
|
+
children: [
|
|
3948
|
+
Tt,
|
|
3949
|
+
Et,
|
|
3950
|
+
Dt,
|
|
3951
|
+
u
|
|
3952
|
+
]
|
|
3953
|
+
}), n[76] = u, n[77] = Tt, n[78] = Et, n[79] = Dt, n[80] = Ot) : Ot = n[80];
|
|
3954
|
+
let kt;
|
|
3955
|
+
n[81] !== yt || n[82] !== bt || n[83] !== Ot ? (kt = /* @__PURE__ */ h(T, {
|
|
3956
|
+
gap: "xs",
|
|
3957
|
+
align: _t,
|
|
3958
|
+
direction: vt,
|
|
3959
|
+
justify: yt,
|
|
3960
|
+
wrap: "wrap",
|
|
3961
|
+
children: [bt, Ot]
|
|
3962
|
+
}), n[81] = yt, n[82] = bt, n[83] = Ot, n[84] = kt) : kt = n[84];
|
|
3963
|
+
let At;
|
|
3964
|
+
n[85] !== U || n[86] !== pe || n[87] !== P ? (At = P && P.length > 0 && /* @__PURE__ */ m(ce, {
|
|
3965
|
+
value: U,
|
|
3966
|
+
onChange: pe,
|
|
3967
|
+
mt: "md",
|
|
3968
|
+
children: /* @__PURE__ */ m(ce.List, { children: P.map(wi) })
|
|
3969
|
+
}), n[85] = U, n[86] = pe, n[87] = P, n[88] = At) : At = n[88];
|
|
3970
|
+
let jt;
|
|
3971
|
+
n[89] === Me ? jt = n[90] : (jt = Me && /* @__PURE__ */ m(v, {
|
|
3972
|
+
mt: "md",
|
|
3973
|
+
variant: "light",
|
|
3974
|
+
color: "red",
|
|
3975
|
+
title: "Es ist ein Fehler aufgetreten.",
|
|
3976
|
+
icon: /* @__PURE__ */ m(Se, {}),
|
|
3977
|
+
children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
|
|
3978
|
+
}), n[89] = Me, n[90] = jt);
|
|
3979
|
+
let Mt;
|
|
3980
|
+
n[91] !== je || n[92] !== Ne ? (Mt = (je || Ne) && /* @__PURE__ */ h(re, {
|
|
3981
|
+
my: "md",
|
|
3982
|
+
children: [/* @__PURE__ */ m(ne, { height: 40 }), [
|
|
3983
|
+
,
|
|
3984
|
+
,
|
|
3985
|
+
,
|
|
3986
|
+
,
|
|
3987
|
+
,
|
|
3988
|
+
].fill(0).map(Ci)]
|
|
3989
|
+
}), n[91] = je, n[92] = Ne, n[93] = Mt) : Mt = n[93];
|
|
3990
|
+
let Nt;
|
|
3991
|
+
n[94] !== R || n[95] !== L || n[96] !== K || n[97] !== tt || n[98] !== Xe || n[99] !== He || n[100] !== Me || n[101] !== je || n[102] !== Ne || n[103] !== X || n[104] !== H || n[105] !== ie || n[106] !== We || n[107] !== G || n[108] !== S || n[109] !== Ke || n[110] !== z || n[111] !== q || n[112] !== x || n[113] !== Ge || n[114] !== Ue || n[115] !== ze || n[116] !== W ? (Nt = !je && !Ne && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(y, {
|
|
3992
|
+
...H ? { visibleFrom: "sm" } : {},
|
|
3993
|
+
children: /* @__PURE__ */ m(Vr, {
|
|
3777
3994
|
my: "md",
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3995
|
+
striped: !0,
|
|
3996
|
+
highlightOnHover: !0,
|
|
3997
|
+
minHeight: 150,
|
|
3998
|
+
fetching: Me,
|
|
3999
|
+
records: Ke,
|
|
4000
|
+
sortStatus: ze,
|
|
4001
|
+
onSortStatusChange: He,
|
|
4002
|
+
...x && {
|
|
4003
|
+
selectedRecords: q,
|
|
4004
|
+
onSelectedRecordsChange: J
|
|
4005
|
+
},
|
|
4006
|
+
...S && Ke.length && {
|
|
4007
|
+
totalRecords: W.length,
|
|
4008
|
+
recordsPerPage: G,
|
|
4009
|
+
onPageChange: Ge,
|
|
4010
|
+
page: We,
|
|
4011
|
+
recordsPerPageOptions: vi,
|
|
4012
|
+
onRecordsPerPageChange: Ue,
|
|
4013
|
+
recordsPerPageLabel: "Einträge pro Seite"
|
|
4014
|
+
},
|
|
4015
|
+
...z && { rowExpansion: {
|
|
4016
|
+
allowMultiple: z.allowMultiple ?? !1,
|
|
4017
|
+
trigger: ie ? "never" : "click",
|
|
4018
|
+
content: (e) => {
|
|
4019
|
+
let { record: t } = e;
|
|
4020
|
+
return z.content(t, !1);
|
|
3800
4021
|
},
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
onPageChange: Pe,
|
|
3805
|
-
page: Ne,
|
|
3806
|
-
recordsPerPageOptions: ei,
|
|
3807
|
-
onRecordsPerPageChange: Me,
|
|
3808
|
-
recordsPerPageLabel: "Einträge pro Seite"
|
|
4022
|
+
expanded: {
|
|
4023
|
+
recordIds: K,
|
|
4024
|
+
onRecordIdsChange: Xe
|
|
3809
4025
|
},
|
|
3810
|
-
...
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
onSortChange: (e, t) => {
|
|
3835
|
-
Ae({
|
|
3836
|
-
columnAccessor: e,
|
|
3837
|
-
direction: t
|
|
3838
|
-
});
|
|
3839
|
-
}
|
|
3840
|
-
},
|
|
3841
|
-
...u && Fe.length && { pagination: {
|
|
3842
|
-
totalRecords: H.length,
|
|
3843
|
-
recordsPerPage: je,
|
|
3844
|
-
page: Ne,
|
|
3845
|
-
onPageChange: Pe,
|
|
3846
|
-
recordsPerPageOptions: ei,
|
|
3847
|
-
onRecordsPerPageChange: (e) => {
|
|
3848
|
-
Me(e), Pe(1);
|
|
3849
|
-
}
|
|
3850
|
-
} },
|
|
3851
|
-
...I && { rowExpansion: {
|
|
3852
|
-
content: I.content,
|
|
3853
|
-
expanded: {
|
|
3854
|
-
recordIds: Re,
|
|
3855
|
-
onRecordIdsChange: ze
|
|
3856
|
-
},
|
|
3857
|
-
...I.expandable && { expandable: I.expandable }
|
|
3858
|
-
} },
|
|
3859
|
-
...Xe.length > 0 && {
|
|
3860
|
-
actions: Xe,
|
|
3861
|
-
canUpdate: P,
|
|
3862
|
-
canDelete: F
|
|
4026
|
+
...z.expandable && { expandable: (e) => {
|
|
4027
|
+
let { record: t } = e;
|
|
4028
|
+
return z.expandable(t);
|
|
4029
|
+
} }
|
|
4030
|
+
} },
|
|
4031
|
+
columns: tt.map(Si),
|
|
4032
|
+
noRecordsText: "Keine Einträge gefunden",
|
|
4033
|
+
onRowClick: ie,
|
|
4034
|
+
...ie && { style: { cursor: "pointer" } }
|
|
4035
|
+
})
|
|
4036
|
+
}), H && /* @__PURE__ */ m(y, {
|
|
4037
|
+
hiddenFrom: "sm",
|
|
4038
|
+
children: /* @__PURE__ */ m(si, {
|
|
4039
|
+
records: Ke,
|
|
4040
|
+
fields: tt,
|
|
4041
|
+
onRowClick: ie,
|
|
4042
|
+
sort: {
|
|
4043
|
+
field: String(ze.columnAccessor),
|
|
4044
|
+
direction: ze.direction,
|
|
4045
|
+
onSortChange: (e, t) => {
|
|
4046
|
+
He({
|
|
4047
|
+
columnAccessor: e,
|
|
4048
|
+
direction: t
|
|
4049
|
+
});
|
|
3863
4050
|
}
|
|
3864
|
-
})
|
|
3865
|
-
})] }),
|
|
3866
|
-
/* @__PURE__ */ p(M, {
|
|
3867
|
-
opened: Ge,
|
|
3868
|
-
onClose: () => {
|
|
3869
|
-
G(!1), W([]);
|
|
3870
|
-
},
|
|
3871
|
-
title: e ?? "Bearbeiten",
|
|
3872
|
-
children: U.length > 0 && /* @__PURE__ */ p(Ir, {
|
|
3873
|
-
fields: c.filter((e) => e.update),
|
|
3874
|
-
queryKey: t,
|
|
3875
|
-
connectedQueryKeys: n,
|
|
3876
|
-
apiPath: fe,
|
|
3877
|
-
id: U[0].id,
|
|
3878
|
-
onClose: () => {
|
|
3879
|
-
G(!1), W([]);
|
|
3880
|
-
},
|
|
3881
|
-
steps: x
|
|
3882
|
-
})
|
|
3883
|
-
}),
|
|
3884
|
-
U.length > 0 && /* @__PURE__ */ p(M, {
|
|
3885
|
-
opened: Ke,
|
|
3886
|
-
onClose: () => {
|
|
3887
|
-
qe(!1), W([]);
|
|
3888
4051
|
},
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
4052
|
+
...S && Ke.length && { pagination: {
|
|
4053
|
+
totalRecords: W.length,
|
|
4054
|
+
recordsPerPage: G,
|
|
4055
|
+
page: We,
|
|
4056
|
+
onPageChange: Ge,
|
|
4057
|
+
recordsPerPageOptions: vi,
|
|
4058
|
+
onRecordsPerPageChange: (e) => {
|
|
4059
|
+
Ue(e), Ge(1);
|
|
4060
|
+
}
|
|
4061
|
+
} },
|
|
4062
|
+
...z && { rowExpansion: {
|
|
4063
|
+
content: z.content,
|
|
4064
|
+
expanded: {
|
|
4065
|
+
recordIds: K,
|
|
4066
|
+
onRecordIdsChange: Xe
|
|
3893
4067
|
},
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
4068
|
+
...z.expandable && { expandable: z.expandable }
|
|
4069
|
+
} },
|
|
4070
|
+
...X.length > 0 && {
|
|
4071
|
+
actions: X,
|
|
4072
|
+
canUpdate: L,
|
|
4073
|
+
canDelete: R
|
|
4074
|
+
}
|
|
4075
|
+
})
|
|
4076
|
+
})] }), n[94] = R, n[95] = L, n[96] = K, n[97] = tt, n[98] = Xe, n[99] = He, n[100] = Me, n[101] = je, n[102] = Ne, n[103] = X, n[104] = H, n[105] = ie, n[106] = We, n[107] = G, n[108] = S, n[109] = Ke, n[110] = z, n[111] = q, n[112] = x, n[113] = Ge, n[114] = Ue, n[115] = ze, n[116] = W, n[117] = Nt) : Nt = n[117];
|
|
4077
|
+
let Pt;
|
|
4078
|
+
n[118] === Symbol.for("react.memo_cache_sentinel") ? (Pt = () => {
|
|
4079
|
+
ct(!1), J([]);
|
|
4080
|
+
}, n[118] = Pt) : Pt = n[118];
|
|
4081
|
+
let Ft = r ?? "Bearbeiten", It;
|
|
4082
|
+
n[119] !== o || n[120] !== xe || n[121] !== g || n[122] !== i || n[123] !== q[0] || n[124] !== q.length || n[125] !== D ? (It = q.length > 0 && /* @__PURE__ */ m(Hr, {
|
|
4083
|
+
fields: g.filter(xi),
|
|
4084
|
+
queryKey: i,
|
|
4085
|
+
connectedQueryKeys: o,
|
|
4086
|
+
apiPath: xe,
|
|
4087
|
+
id: q[0].id,
|
|
4088
|
+
onClose: () => {
|
|
4089
|
+
ct(!1), J([]);
|
|
4090
|
+
},
|
|
4091
|
+
steps: D
|
|
4092
|
+
}), n[119] = o, n[120] = xe, n[121] = g, n[122] = i, n[123] = q[0], n[124] = q.length, n[125] = D, n[126] = It) : It = n[126];
|
|
4093
|
+
let Lt;
|
|
4094
|
+
n[127] !== Ft || n[128] !== It || n[129] !== st ? (Lt = /* @__PURE__ */ m(N, {
|
|
4095
|
+
opened: st,
|
|
4096
|
+
onClose: Pt,
|
|
4097
|
+
title: Ft,
|
|
4098
|
+
children: It
|
|
4099
|
+
}), n[127] = Ft, n[128] = It, n[129] = st, n[130] = Lt) : Lt = n[130];
|
|
4100
|
+
let Rt;
|
|
4101
|
+
n[131] !== o || n[132] !== oe || n[133] !== Y || n[134] !== xe || n[135] !== i || n[136] !== q || n[137] !== r ? (Rt = q.length > 0 && /* @__PURE__ */ m(N, {
|
|
4102
|
+
opened: Y,
|
|
4103
|
+
onClose: () => {
|
|
4104
|
+
lt(!1), J([]);
|
|
4105
|
+
},
|
|
4106
|
+
title: r ?? "Löschen",
|
|
4107
|
+
children: /* @__PURE__ */ m(Wr, {
|
|
3903
4108
|
onClose: () => {
|
|
3904
|
-
|
|
4109
|
+
lt(!1), J([]);
|
|
3905
4110
|
},
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
onClose: () => {
|
|
3912
|
-
We(!1);
|
|
3913
|
-
},
|
|
3914
|
-
fields: c.filter((e) => e.create),
|
|
3915
|
-
steps: x
|
|
3916
|
-
})
|
|
4111
|
+
queryKey: i,
|
|
4112
|
+
connectedQueryKeys: o,
|
|
4113
|
+
apiPath: xe,
|
|
4114
|
+
selectedRecords: q,
|
|
4115
|
+
confirmMessage: oe
|
|
3917
4116
|
})
|
|
3918
|
-
]
|
|
4117
|
+
}), n[131] = o, n[132] = oe, n[133] = Y, n[134] = xe, n[135] = i, n[136] = q, n[137] = r, n[138] = Rt) : Rt = n[138];
|
|
4118
|
+
let zt;
|
|
4119
|
+
n[139] === Symbol.for("react.memo_cache_sentinel") ? (zt = () => {
|
|
4120
|
+
ot(!1);
|
|
4121
|
+
}, n[139] = zt) : zt = n[139];
|
|
4122
|
+
let Bt = r ?? "Anlegen", Vt;
|
|
4123
|
+
n[140] === Symbol.for("react.memo_cache_sentinel") ? (Vt = () => {
|
|
4124
|
+
ot(!1);
|
|
4125
|
+
}, n[140] = Vt) : Vt = n[140];
|
|
4126
|
+
let Ht;
|
|
4127
|
+
n[141] === g ? Ht = n[142] : (Ht = g.filter(bi), n[141] = g, n[142] = Ht);
|
|
4128
|
+
let Wt;
|
|
4129
|
+
n[143] !== o || n[144] !== xe || n[145] !== i || n[146] !== D || n[147] !== Ht ? (Wt = /* @__PURE__ */ m(ln, {
|
|
4130
|
+
queryKey: i,
|
|
4131
|
+
connectedQueryKeys: o,
|
|
4132
|
+
apiPath: xe,
|
|
4133
|
+
onClose: Vt,
|
|
4134
|
+
fields: Ht,
|
|
4135
|
+
steps: D
|
|
4136
|
+
}), n[143] = o, n[144] = xe, n[145] = i, n[146] = D, n[147] = Ht, n[148] = Wt) : Wt = n[148];
|
|
4137
|
+
let Gt;
|
|
4138
|
+
n[149] !== at || n[150] !== Bt || n[151] !== Wt ? (Gt = /* @__PURE__ */ m(N, {
|
|
4139
|
+
opened: at,
|
|
4140
|
+
onClose: zt,
|
|
4141
|
+
title: Bt,
|
|
4142
|
+
children: Wt
|
|
4143
|
+
}), n[149] = at, n[150] = Bt, n[151] = Wt, n[152] = Gt) : Gt = n[152];
|
|
4144
|
+
let Kt;
|
|
4145
|
+
return n[153] !== kt || n[154] !== At || n[155] !== jt || n[156] !== Mt || n[157] !== Nt || n[158] !== Lt || n[159] !== Rt || n[160] !== Gt ? (Kt = /* @__PURE__ */ h(p, { children: [
|
|
4146
|
+
kt,
|
|
4147
|
+
At,
|
|
4148
|
+
jt,
|
|
4149
|
+
Mt,
|
|
4150
|
+
Nt,
|
|
4151
|
+
Lt,
|
|
4152
|
+
Rt,
|
|
4153
|
+
Gt
|
|
4154
|
+
] }), n[153] = kt, n[154] = At, n[155] = jt, n[156] = Mt, n[157] = Nt, n[158] = Lt, n[159] = Rt, n[160] = Gt, n[161] = Kt) : Kt = n[161], Kt;
|
|
4155
|
+
}
|
|
4156
|
+
function bi(e) {
|
|
4157
|
+
return e.create;
|
|
4158
|
+
}
|
|
4159
|
+
function xi(e) {
|
|
4160
|
+
return e.update;
|
|
4161
|
+
}
|
|
4162
|
+
function Si(e) {
|
|
4163
|
+
return e.column;
|
|
4164
|
+
}
|
|
4165
|
+
function Ci(e, t) {
|
|
4166
|
+
return /* @__PURE__ */ m(ne, { height: 35 }, `skeleton-${t}`);
|
|
4167
|
+
}
|
|
4168
|
+
function wi(e) {
|
|
4169
|
+
return /* @__PURE__ */ m(ce.Tab, {
|
|
4170
|
+
value: e.value,
|
|
4171
|
+
leftSection: e.icon,
|
|
4172
|
+
children: e.label
|
|
4173
|
+
}, e.value);
|
|
4174
|
+
}
|
|
4175
|
+
function Ti(e) {
|
|
4176
|
+
return e.create;
|
|
4177
|
+
}
|
|
4178
|
+
function Ei(e) {
|
|
4179
|
+
return e.delete;
|
|
4180
|
+
}
|
|
4181
|
+
function Di(e) {
|
|
4182
|
+
return e.update;
|
|
4183
|
+
}
|
|
4184
|
+
function Oi(e) {
|
|
4185
|
+
return e.update;
|
|
4186
|
+
}
|
|
4187
|
+
function ki(e) {
|
|
4188
|
+
return e.delete;
|
|
4189
|
+
}
|
|
4190
|
+
function Ai(e) {
|
|
4191
|
+
return e.update;
|
|
4192
|
+
}
|
|
4193
|
+
function ji(e) {
|
|
4194
|
+
return e.list && e.column && !e.column.hidden;
|
|
4195
|
+
}
|
|
4196
|
+
function Mi(e) {
|
|
4197
|
+
let [t, n] = e;
|
|
4198
|
+
return `${t}=${encodeURIComponent(n ?? "")}`;
|
|
4199
|
+
}
|
|
4200
|
+
function Ni(e) {
|
|
4201
|
+
let [, t] = e;
|
|
4202
|
+
return t != null;
|
|
3919
4203
|
}
|
|
3920
4204
|
//#endregion
|
|
3921
4205
|
//#region src/DataTable/SubTable.tsx
|
|
3922
|
-
function
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
let
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
4206
|
+
function Pi(t) {
|
|
4207
|
+
let n = e(8), r, i, a;
|
|
4208
|
+
if (n[0] !== t) {
|
|
4209
|
+
a = Symbol.for("react.early_return_sentinel");
|
|
4210
|
+
bb0: {
|
|
4211
|
+
let { mobile: e, columns: o, ...s } = t;
|
|
4212
|
+
if (r = o, i = s, e) {
|
|
4213
|
+
let e = i.records ?? [], t;
|
|
4214
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (t = { fontVariantNumeric: "tabular-nums" }, n[4] = t) : t = n[4], a = /* @__PURE__ */ m(re, {
|
|
4215
|
+
gap: "sm",
|
|
4216
|
+
style: t,
|
|
4217
|
+
children: e.map((e, t) => {
|
|
4218
|
+
let n = r.filter((t) => !t.hidden && !t.hideOnMobile?.(e)).map((n) => ({
|
|
4219
|
+
label: n.title ?? bn(String(n.accessor)),
|
|
4220
|
+
value: n.render ? n.render(e, t) : Tn(e, n.accessor)
|
|
4221
|
+
})), a = i.idAccessor ? $(e, i.idAccessor) : t;
|
|
4222
|
+
return /* @__PURE__ */ m(ii, { rows: n }, a);
|
|
4223
|
+
})
|
|
4224
|
+
});
|
|
4225
|
+
break bb0;
|
|
4226
|
+
}
|
|
4227
|
+
}
|
|
4228
|
+
n[0] = t, n[1] = r, n[2] = i, n[3] = a;
|
|
4229
|
+
} else r = n[1], i = n[2], a = n[3];
|
|
4230
|
+
if (a !== Symbol.for("react.early_return_sentinel")) return a;
|
|
4231
|
+
let o;
|
|
4232
|
+
return n[5] !== r || n[6] !== i ? (o = /* @__PURE__ */ m(Vr, {
|
|
4233
|
+
columns: r,
|
|
4234
|
+
...i
|
|
4235
|
+
}), n[5] = r, n[6] = i, n[7] = o) : o = n[7], o;
|
|
3937
4236
|
}
|
|
3938
4237
|
//#endregion
|
|
3939
|
-
export {
|
|
4238
|
+
export { ln as CreateModal, yi as DataTable, At as DataTableProvider, Wr as DeleteModal, ii as FieldCard, si as MobileCardList, Pi as SubTable, Hr as UpdateModal, Bt as api, zt as createOne, Rt as deleteOne, It as getAll, Lt as getOne, Yr as sortData, Vt as updateOne, Gt as useAddOne, jt as useDataTable, qt as useDeleteOne, Ut as useGetAll, Ht as useGetOne, Gr as usePersistentState, Kt as useUpdateOne };
|
|
3940
4239
|
|
|
3941
4240
|
//# sourceMappingURL=index.es.js.map
|