@espresso-lab/mantine-data-table 2.1.9 → 2.1.11
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/DataTable/DataTableInner.d.ts +3 -1
- package/dist/index.es.js +436 -409
- 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 +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
import t, { Fragment as n, createContext as r, createElement as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
3
3
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
4
|
-
import { ActionIcon as h, Alert as g, Box as _, Button as v, Center as y, Checkbox as b, Collapse as x, Divider as S, Flex as C, Group as w, Loader as T, Menu as E, MenuDropdown as D, MenuItem as O, MenuTarget as k, Modal as A, NumberInput as j, Pagination as M, Popover as N, PopoverDropdown as P, PopoverTarget as ee, ScrollArea as F, Select as te, Skeleton as I, Stack as L, Stepper as
|
|
5
|
-
import { useForm as
|
|
6
|
-
import { DateInput as
|
|
7
|
-
import { IconCaretDownFilled as
|
|
8
|
-
import { useClickOutside as
|
|
4
|
+
import { ActionIcon as h, Alert as g, Box as _, Button as v, Center as y, Checkbox as b, Collapse as x, Divider as S, Flex as C, Group as w, Loader as T, Menu as E, MenuDropdown as D, MenuItem as O, MenuTarget as k, Modal as A, NumberInput as j, Pagination as M, Popover as N, PopoverDropdown as P, PopoverTarget as ee, ScrollArea as F, Select as te, Skeleton as I, Stack as L, Stepper as ne, Table as re, TableTd as ie, TableTfoot as ae, TableTh as oe, TableThead as se, TableTr as R, Tabs as ce, Text as z, TextInput as le, Textarea as ue, Title as de, createSafeContext as fe, parseThemeColor as pe, rem as B, useDirection as me, useMantineTheme as he } from "@mantine/core";
|
|
5
|
+
import { useForm as V } from "@mantine/form";
|
|
6
|
+
import { DateInput as ge } from "@mantine/dates";
|
|
7
|
+
import { IconCaretDownFilled as _e, IconChevronDown as ve, IconDotsVertical as ye, IconInfoCircle as be, IconPencil as xe, IconRefresh as Se, IconSortAscending as Ce, IconSortDescending as we, IconTrash as Te } from "@tabler/icons-react";
|
|
8
|
+
import { useClickOutside as Ee, useDisclosure as De, useLocalStorage as Oe, useMediaQuery as ke, useMergedRef as H, useTimeout as Ae } from "@mantine/hooks";
|
|
9
9
|
//#region node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
10
10
|
var je = class {
|
|
11
11
|
constructor() {
|
|
@@ -58,13 +58,13 @@ var je = class {
|
|
|
58
58
|
isFocused() {
|
|
59
59
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
60
60
|
}
|
|
61
|
-
}(),
|
|
61
|
+
}(), Ne = {
|
|
62
62
|
setTimeout: (e, t) => setTimeout(e, t),
|
|
63
63
|
clearTimeout: (e) => clearTimeout(e),
|
|
64
64
|
setInterval: (e, t) => setInterval(e, t),
|
|
65
65
|
clearInterval: (e) => clearInterval(e)
|
|
66
|
-
},
|
|
67
|
-
#e =
|
|
66
|
+
}, Pe = new class {
|
|
67
|
+
#e = Ne;
|
|
68
68
|
#t = !1;
|
|
69
69
|
setTimeoutProvider(e) {
|
|
70
70
|
process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.", {
|
|
@@ -85,12 +85,12 @@ var je = class {
|
|
|
85
85
|
this.#e.clearInterval(e);
|
|
86
86
|
}
|
|
87
87
|
}();
|
|
88
|
-
function
|
|
88
|
+
function U(e) {
|
|
89
89
|
setTimeout(e, 0);
|
|
90
90
|
}
|
|
91
91
|
//#endregion
|
|
92
92
|
//#region node_modules/@tanstack/query-core/build/modern/utils.js
|
|
93
|
-
var
|
|
93
|
+
var W = typeof window > "u" || "Deno" in globalThis;
|
|
94
94
|
function Fe() {}
|
|
95
95
|
function Ie(e) {
|
|
96
96
|
return typeof e == "number" && e >= 0 && e !== Infinity;
|
|
@@ -105,14 +105,14 @@ function K(e, t) {
|
|
|
105
105
|
return typeof e == "function" ? e(t) : e;
|
|
106
106
|
}
|
|
107
107
|
function Re(e) {
|
|
108
|
-
return JSON.stringify(e, (e, t) =>
|
|
108
|
+
return JSON.stringify(e, (e, t) => He(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
|
|
109
109
|
}
|
|
110
110
|
var ze = Object.prototype.hasOwnProperty;
|
|
111
111
|
function Be(e, t, n = 0) {
|
|
112
112
|
if (e === t) return e;
|
|
113
113
|
if (n > 500) return t;
|
|
114
|
-
let r =
|
|
115
|
-
if (!r && !(
|
|
114
|
+
let r = Ve(e) && Ve(t);
|
|
115
|
+
if (!r && !(He(e) && He(t))) return t;
|
|
116
116
|
let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
|
|
117
117
|
for (let l = 0; l < o; l++) {
|
|
118
118
|
let o = r ? l : a[l], u = e[o], d = t[o];
|
|
@@ -129,25 +129,25 @@ function Be(e, t, n = 0) {
|
|
|
129
129
|
}
|
|
130
130
|
return i === o && c === i ? e : s;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function q(e, t) {
|
|
133
133
|
if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
134
134
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
135
135
|
return !0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Ve(e) {
|
|
138
138
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
if (!
|
|
140
|
+
function He(e) {
|
|
141
|
+
if (!Ue(e)) return !1;
|
|
142
142
|
let t = e.constructor;
|
|
143
143
|
if (t === void 0) return !0;
|
|
144
144
|
let n = t.prototype;
|
|
145
|
-
return !(!
|
|
145
|
+
return !(!Ue(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Ue(e) {
|
|
148
148
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function We(e, t, n) {
|
|
151
151
|
if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
|
|
152
152
|
if (n.structuralSharing !== !1) {
|
|
153
153
|
if (process.env.NODE_ENV !== "production") try {
|
|
@@ -159,13 +159,13 @@ function Ge(e, t, n) {
|
|
|
159
159
|
}
|
|
160
160
|
return t;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Ge(e, t) {
|
|
163
163
|
return typeof e == "function" ? e(...t) : !!e;
|
|
164
164
|
}
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
|
|
167
|
-
var
|
|
168
|
-
let e = () =>
|
|
167
|
+
var Ke = /* @__PURE__ */ (() => {
|
|
168
|
+
let e = () => W;
|
|
169
169
|
return {
|
|
170
170
|
isServer() {
|
|
171
171
|
return e();
|
|
@@ -177,7 +177,7 @@ var qe = /* @__PURE__ */ (() => {
|
|
|
177
177
|
})();
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region node_modules/@tanstack/query-core/build/modern/thenable.js
|
|
180
|
-
function
|
|
180
|
+
function qe() {
|
|
181
181
|
let e, t, n = new Promise((n, r) => {
|
|
182
182
|
e = n, t = r;
|
|
183
183
|
});
|
|
@@ -199,13 +199,13 @@ function Je() {
|
|
|
199
199
|
}
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
202
|
-
var
|
|
203
|
-
function
|
|
202
|
+
var Je = U;
|
|
203
|
+
function Ye() {
|
|
204
204
|
let e = [], t = 0, n = (e) => {
|
|
205
205
|
e();
|
|
206
206
|
}, r = (e) => {
|
|
207
207
|
e();
|
|
208
|
-
}, i =
|
|
208
|
+
}, i = Je, a = (r) => {
|
|
209
209
|
t ? e.push(r) : i(() => {
|
|
210
210
|
n(r);
|
|
211
211
|
});
|
|
@@ -247,7 +247,7 @@ function Xe() {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
var
|
|
250
|
+
var Xe = Ye(), Ze = new class extends je {
|
|
251
251
|
#e = !0;
|
|
252
252
|
#t;
|
|
253
253
|
#n;
|
|
@@ -281,16 +281,16 @@ var Ze = Xe(), Qe = new class extends je {
|
|
|
281
281
|
}();
|
|
282
282
|
//#endregion
|
|
283
283
|
//#region node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
284
|
-
function
|
|
285
|
-
return (e ?? "online") === "online" ?
|
|
284
|
+
function Qe(e) {
|
|
285
|
+
return (e ?? "online") === "online" ? Ze.isOnline() : !0;
|
|
286
286
|
}
|
|
287
287
|
//#endregion
|
|
288
288
|
//#region node_modules/@tanstack/query-core/build/modern/query.js
|
|
289
|
-
function
|
|
289
|
+
function $e(e, t) {
|
|
290
290
|
return {
|
|
291
291
|
fetchFailureCount: 0,
|
|
292
292
|
fetchFailureReason: null,
|
|
293
|
-
fetchStatus:
|
|
293
|
+
fetchStatus: Qe(t.networkMode) ? "fetching" : "paused",
|
|
294
294
|
...e === void 0 && {
|
|
295
295
|
error: null,
|
|
296
296
|
status: "pending"
|
|
@@ -299,9 +299,9 @@ function et(e, t) {
|
|
|
299
299
|
}
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
302
|
-
var
|
|
302
|
+
var et = class extends je {
|
|
303
303
|
constructor(e, t) {
|
|
304
|
-
super(), this.options = t, this.#e = e, this.#s = null, this.#o =
|
|
304
|
+
super(), this.options = t, this.#e = e, this.#s = null, this.#o = qe(), this.bindMethods(), this.setOptions(t);
|
|
305
305
|
}
|
|
306
306
|
#e;
|
|
307
307
|
#t = void 0;
|
|
@@ -322,16 +322,16 @@ var tt = class extends je {
|
|
|
322
322
|
this.refetch = this.refetch.bind(this);
|
|
323
323
|
}
|
|
324
324
|
onSubscribe() {
|
|
325
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
325
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), nt(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
|
|
326
326
|
}
|
|
327
327
|
onUnsubscribe() {
|
|
328
328
|
this.hasListeners() || this.destroy();
|
|
329
329
|
}
|
|
330
330
|
shouldFetchOnReconnect() {
|
|
331
|
-
return
|
|
331
|
+
return rt(this.#t, this.options, this.options.refetchOnReconnect);
|
|
332
332
|
}
|
|
333
333
|
shouldFetchOnWindowFocus() {
|
|
334
|
-
return
|
|
334
|
+
return rt(this.#t, this.options, this.options.refetchOnWindowFocus);
|
|
335
335
|
}
|
|
336
336
|
destroy() {
|
|
337
337
|
this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
|
|
@@ -339,19 +339,19 @@ var tt = class extends je {
|
|
|
339
339
|
setOptions(e) {
|
|
340
340
|
let t = this.options, n = this.#t;
|
|
341
341
|
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof K(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
|
|
342
|
-
this.#S(), this.#t.setOptions(this.options), t._defaulted && !
|
|
342
|
+
this.#S(), this.#t.setOptions(this.options), t._defaulted && !q(this.options, t) && this.#e.getQueryCache().notify({
|
|
343
343
|
type: "observerOptionsUpdated",
|
|
344
344
|
query: this.#t,
|
|
345
345
|
observer: this
|
|
346
346
|
});
|
|
347
347
|
let r = this.hasListeners();
|
|
348
|
-
r &&
|
|
348
|
+
r && it(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) || G(this.options.staleTime, this.#t) !== G(t.staleTime, this.#t)) && this.#g();
|
|
349
349
|
let i = this.#_();
|
|
350
350
|
r && (this.#t !== n || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
|
|
351
351
|
}
|
|
352
352
|
getOptimisticResult(e) {
|
|
353
353
|
let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
|
|
354
|
-
return
|
|
354
|
+
return ot(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
|
|
355
355
|
}
|
|
356
356
|
getCurrentResult() {
|
|
357
357
|
return this.#r;
|
|
@@ -386,9 +386,9 @@ var tt = class extends je {
|
|
|
386
386
|
#g() {
|
|
387
387
|
this.#b();
|
|
388
388
|
let e = G(this.options.staleTime, this.#t);
|
|
389
|
-
if (
|
|
389
|
+
if (Ke.isServer() || this.#r.isStale || !Ie(e)) return;
|
|
390
390
|
let t = Le(this.#r.dataUpdatedAt, e) + 1;
|
|
391
|
-
this.#d =
|
|
391
|
+
this.#d = Pe.setTimeout(() => {
|
|
392
392
|
this.#r.isStale || this.updateResult();
|
|
393
393
|
}, t);
|
|
394
394
|
}
|
|
@@ -396,7 +396,7 @@ var tt = class extends je {
|
|
|
396
396
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
397
397
|
}
|
|
398
398
|
#v(e) {
|
|
399
|
-
this.#x(), this.#p = e, !(
|
|
399
|
+
this.#x(), this.#p = e, !(Ke.isServer() || K(this.options.enabled, this.#t) === !1 || !Ie(this.#p) || this.#p === 0) && (this.#f = Pe.setInterval(() => {
|
|
400
400
|
(this.options.refetchIntervalInBackground || Me.isFocused()) && this.#h();
|
|
401
401
|
}, this.#p));
|
|
402
402
|
}
|
|
@@ -404,18 +404,18 @@ var tt = class extends je {
|
|
|
404
404
|
this.#g(), this.#v(this.#_());
|
|
405
405
|
}
|
|
406
406
|
#b() {
|
|
407
|
-
this.#d !== void 0 && (
|
|
407
|
+
this.#d !== void 0 && (Pe.clearTimeout(this.#d), this.#d = void 0);
|
|
408
408
|
}
|
|
409
409
|
#x() {
|
|
410
|
-
this.#f !== void 0 && (
|
|
410
|
+
this.#f !== void 0 && (Pe.clearInterval(this.#f), this.#f = void 0);
|
|
411
411
|
}
|
|
412
412
|
createResult(e, t) {
|
|
413
413
|
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
414
|
if (t._optimisticResults) {
|
|
415
|
-
let i = this.hasListeners(), a = !i &&
|
|
415
|
+
let i = this.hasListeners(), a = !i && nt(e, t), o = i && it(e, n, t, r);
|
|
416
416
|
(a || o) && (l = {
|
|
417
417
|
...l,
|
|
418
|
-
|
|
418
|
+
...$e(c.data, e.options)
|
|
419
419
|
}), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
|
|
420
420
|
}
|
|
421
421
|
let { error: f, errorUpdatedAt: p, status: m } = l;
|
|
@@ -423,11 +423,11 @@ var tt = class extends je {
|
|
|
423
423
|
let h = !1;
|
|
424
424
|
if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
|
|
425
425
|
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 =
|
|
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 = We(i?.data, e, t), u = !0);
|
|
427
427
|
}
|
|
428
428
|
if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
|
|
429
429
|
else try {
|
|
430
|
-
this.#c = t.select, d = t.select(d), d =
|
|
430
|
+
this.#c = t.select, d = t.select(d), d = We(i?.data, d, t), this.#l = d, this.#s = null;
|
|
431
431
|
} catch (e) {
|
|
432
432
|
this.#s = e;
|
|
433
433
|
}
|
|
@@ -455,7 +455,7 @@ var tt = class extends je {
|
|
|
455
455
|
isPaused: l.fetchStatus === "paused",
|
|
456
456
|
isPlaceholderData: u,
|
|
457
457
|
isRefetchError: v && b,
|
|
458
|
-
isStale:
|
|
458
|
+
isStale: at(e, t),
|
|
459
459
|
refetch: this.refetch,
|
|
460
460
|
promise: this.#o,
|
|
461
461
|
isEnabled: K(t.enabled, e) !== !1
|
|
@@ -464,7 +464,7 @@ var tt = class extends je {
|
|
|
464
464
|
let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
|
|
465
465
|
r ? e.reject(x.error) : t && e.resolve(x.data);
|
|
466
466
|
}, a = () => {
|
|
467
|
-
i(this.#o = x.promise =
|
|
467
|
+
i(this.#o = x.promise = qe());
|
|
468
468
|
}, o = this.#o;
|
|
469
469
|
switch (o.status) {
|
|
470
470
|
case "pending":
|
|
@@ -482,7 +482,7 @@ var tt = class extends je {
|
|
|
482
482
|
}
|
|
483
483
|
updateResult() {
|
|
484
484
|
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), !
|
|
485
|
+
this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !q(t, e) && (this.#r = t, this.#C({ listeners: (() => {
|
|
486
486
|
if (!e) return !0;
|
|
487
487
|
let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
|
|
488
488
|
if (n === "all" || !n && !this.#m.size) return !0;
|
|
@@ -503,7 +503,7 @@ var tt = class extends je {
|
|
|
503
503
|
this.updateResult(), this.hasListeners() && this.#y();
|
|
504
504
|
}
|
|
505
505
|
#C(e) {
|
|
506
|
-
|
|
506
|
+
Xe.batch(() => {
|
|
507
507
|
e.listeners && this.listeners.forEach((e) => {
|
|
508
508
|
e(this.#r);
|
|
509
509
|
}), this.#e.getQueryCache().notify({
|
|
@@ -513,31 +513,31 @@ var tt = class extends je {
|
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
|
-
function
|
|
516
|
+
function tt(e, t) {
|
|
517
517
|
return K(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && K(t.retryOnMount, e) === !1);
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
return
|
|
519
|
+
function nt(e, t) {
|
|
520
|
+
return tt(e, t) || e.state.data !== void 0 && rt(e, t, t.refetchOnMount);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function rt(e, t, n) {
|
|
523
523
|
if (K(t.enabled, e) !== !1 && G(t.staleTime, e) !== "static") {
|
|
524
524
|
let r = typeof n == "function" ? n(e) : n;
|
|
525
|
-
return r === "always" || r !== !1 &&
|
|
525
|
+
return r === "always" || r !== !1 && at(e, t);
|
|
526
526
|
}
|
|
527
527
|
return !1;
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
return (e !== t || K(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") &&
|
|
529
|
+
function it(e, t, n, r) {
|
|
530
|
+
return (e !== t || K(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && at(e, n);
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function at(e, t) {
|
|
533
533
|
return K(t.enabled, e) !== !1 && e.isStaleByTime(G(t.staleTime, e));
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
return !
|
|
535
|
+
function ot(e, t) {
|
|
536
|
+
return !q(e.getCurrentResult(), t);
|
|
537
537
|
}
|
|
538
538
|
//#endregion
|
|
539
539
|
//#region node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
540
|
-
function
|
|
540
|
+
function st() {
|
|
541
541
|
return {
|
|
542
542
|
context: void 0,
|
|
543
543
|
data: void 0,
|
|
@@ -552,7 +552,7 @@ function ct() {
|
|
|
552
552
|
}
|
|
553
553
|
//#endregion
|
|
554
554
|
//#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
|
|
555
|
-
var
|
|
555
|
+
var ct = class extends je {
|
|
556
556
|
#e;
|
|
557
557
|
#t = void 0;
|
|
558
558
|
#n;
|
|
@@ -565,7 +565,7 @@ var lt = class extends je {
|
|
|
565
565
|
}
|
|
566
566
|
setOptions(e) {
|
|
567
567
|
let t = this.options;
|
|
568
|
-
this.options = this.#e.defaultMutationOptions(e),
|
|
568
|
+
this.options = this.#e.defaultMutationOptions(e), q(this.options, t) || this.#e.getMutationCache().notify({
|
|
569
569
|
type: "observerOptionsUpdated",
|
|
570
570
|
mutation: this.#n,
|
|
571
571
|
observer: this
|
|
@@ -587,7 +587,7 @@ var lt = class extends je {
|
|
|
587
587
|
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
588
|
}
|
|
589
589
|
#i() {
|
|
590
|
-
let e = this.#n?.state ??
|
|
590
|
+
let e = this.#n?.state ?? st();
|
|
591
591
|
this.#t = {
|
|
592
592
|
...e,
|
|
593
593
|
isPending: e.status === "pending",
|
|
@@ -599,7 +599,7 @@ var lt = class extends je {
|
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
601
|
#a(e) {
|
|
602
|
-
|
|
602
|
+
Xe.batch(() => {
|
|
603
603
|
if (this.#r && this.hasListeners()) {
|
|
604
604
|
let t = this.#t.variables, n = this.#t.context, r = {
|
|
605
605
|
client: this.#e,
|
|
@@ -635,21 +635,21 @@ var lt = class extends je {
|
|
|
635
635
|
});
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
|
-
},
|
|
639
|
-
let n = e.useContext(
|
|
638
|
+
}, lt = e.createContext(void 0), J = (t) => {
|
|
639
|
+
let n = e.useContext(lt);
|
|
640
640
|
if (t) return t;
|
|
641
641
|
if (!n) throw Error("No QueryClient set, use QueryClientProvider to set one");
|
|
642
642
|
return n;
|
|
643
|
-
},
|
|
643
|
+
}, ut = ({ client: t, children: n }) => (e.useEffect(() => (t.mount(), () => {
|
|
644
644
|
t.unmount();
|
|
645
|
-
}), [t]), /* @__PURE__ */ p(
|
|
645
|
+
}), [t]), /* @__PURE__ */ p(lt.Provider, {
|
|
646
646
|
value: t,
|
|
647
647
|
children: n
|
|
648
|
-
})),
|
|
649
|
-
|
|
648
|
+
})), Y = e.createContext(!1), dt = () => e.useContext(Y);
|
|
649
|
+
Y.Provider;
|
|
650
650
|
//#endregion
|
|
651
651
|
//#region node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
652
|
-
function
|
|
652
|
+
function ft() {
|
|
653
653
|
let e = !1;
|
|
654
654
|
return {
|
|
655
655
|
clearReset: () => {
|
|
@@ -661,63 +661,63 @@ function pt() {
|
|
|
661
661
|
isReset: () => e
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
|
-
var
|
|
665
|
-
let r = n?.state.error && typeof e.throwOnError == "function" ?
|
|
664
|
+
var pt = e.createContext(ft()), mt = () => e.useContext(pt), ht = (e, t, n) => {
|
|
665
|
+
let r = n?.state.error && typeof e.throwOnError == "function" ? Ge(e.throwOnError, [n.state.error, n]) : e.throwOnError;
|
|
666
666
|
(e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
|
|
667
|
-
},
|
|
667
|
+
}, gt = (t) => {
|
|
668
668
|
e.useEffect(() => {
|
|
669
669
|
t.clearReset();
|
|
670
670
|
}, [t]);
|
|
671
|
-
},
|
|
671
|
+
}, _t = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Ge(n, [e.error, r])), vt = (e) => {
|
|
672
672
|
if (e.suspense) {
|
|
673
673
|
let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
|
|
674
674
|
e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
|
|
675
675
|
}
|
|
676
|
-
},
|
|
676
|
+
}, yt = (e, t) => e.isLoading && e.isFetching && !t, bt = (e, t) => e?.suspense && t.isPending, xt = (e, t, n) => t.fetchOptimistic(e).catch(() => {
|
|
677
677
|
n.clearReset();
|
|
678
678
|
});
|
|
679
679
|
//#endregion
|
|
680
680
|
//#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
681
|
-
function
|
|
681
|
+
function St(t, n, r) {
|
|
682
682
|
if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t))) 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");
|
|
683
|
-
let i =
|
|
683
|
+
let i = dt(), a = mt(), o = J(r), s = o.defaultQueryOptions(t);
|
|
684
684
|
o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);
|
|
685
685
|
let c = o.getQueryCache().get(s.queryHash);
|
|
686
|
-
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`)), s._optimisticResults = i ? "isRestoring" : "optimistic",
|
|
686
|
+
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`)), s._optimisticResults = i ? "isRestoring" : "optimistic", vt(s), ht(s, a, c), gt(a);
|
|
687
687
|
let l = !o.getQueryCache().get(s.queryHash), [u] = e.useState(() => new n(o, s)), d = u.getOptimisticResult(s), f = !i && t.subscribed !== !1;
|
|
688
688
|
if (e.useSyncExternalStore(e.useCallback((e) => {
|
|
689
|
-
let t = f ? u.subscribe(
|
|
689
|
+
let t = f ? u.subscribe(Xe.batchCalls(e)) : Fe;
|
|
690
690
|
return u.updateResult(), t;
|
|
691
691
|
}, [u, f]), () => u.getCurrentResult(), () => u.getCurrentResult()), e.useEffect(() => {
|
|
692
692
|
u.setOptions(s);
|
|
693
|
-
}, [s, u]),
|
|
694
|
-
if (
|
|
693
|
+
}, [s, u]), bt(s, d)) throw xt(s, u, a);
|
|
694
|
+
if (_t({
|
|
695
695
|
result: d,
|
|
696
696
|
errorResetBoundary: a,
|
|
697
697
|
throwOnError: s.throwOnError,
|
|
698
698
|
query: c,
|
|
699
699
|
suspense: s.suspense
|
|
700
700
|
})) throw d.error;
|
|
701
|
-
return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, d), s.experimental_prefetchInRender && !
|
|
701
|
+
return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, d), s.experimental_prefetchInRender && !Ke.isServer() && yt(d, i) && (l ? xt(s, u, a) : c?.promise)?.catch(Fe).finally(() => {
|
|
702
702
|
u.updateResult();
|
|
703
703
|
}), s.notifyOnChangeProps ? d : u.trackResult(d);
|
|
704
704
|
}
|
|
705
705
|
//#endregion
|
|
706
706
|
//#region node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
707
|
-
function
|
|
708
|
-
return
|
|
707
|
+
function Ct(e, t) {
|
|
708
|
+
return St(e, et, t);
|
|
709
709
|
}
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
712
|
-
function
|
|
713
|
-
let r =
|
|
712
|
+
function wt(t, n) {
|
|
713
|
+
let r = J(n), [i] = e.useState(() => new ct(r, t));
|
|
714
714
|
e.useEffect(() => {
|
|
715
715
|
i.setOptions(t);
|
|
716
716
|
}, [i, t]);
|
|
717
|
-
let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(
|
|
717
|
+
let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(Xe.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
|
|
718
718
|
i.mutate(e, t).catch(Fe);
|
|
719
719
|
}, [i]);
|
|
720
|
-
if (a.error &&
|
|
720
|
+
if (a.error && Ge(i.options.throwOnError, [a.error])) throw a.error;
|
|
721
721
|
return {
|
|
722
722
|
...a,
|
|
723
723
|
mutate: o,
|
|
@@ -726,15 +726,15 @@ function Tt(t, n) {
|
|
|
726
726
|
}
|
|
727
727
|
//#endregion
|
|
728
728
|
//#region src/Context/DataTableContext.tsx
|
|
729
|
-
var
|
|
730
|
-
function
|
|
731
|
-
return /* @__PURE__ */ p(
|
|
729
|
+
var Tt = r(void 0), Et = async () => ({ "Content-Type": "application/json" });
|
|
730
|
+
function Dt({ children: e, baseUrl: t, queryClient: n, getHeaders: r = Et }) {
|
|
731
|
+
return /* @__PURE__ */ p(Tt.Provider, {
|
|
732
732
|
value: {
|
|
733
733
|
baseUrl: t,
|
|
734
734
|
queryClient: n,
|
|
735
735
|
getHeaders: r
|
|
736
736
|
},
|
|
737
|
-
children: /* @__PURE__ */ p(
|
|
737
|
+
children: /* @__PURE__ */ p(ut, {
|
|
738
738
|
client: n,
|
|
739
739
|
children: e
|
|
740
740
|
})
|
|
@@ -742,14 +742,14 @@ function Ot({ children: e, baseUrl: t, queryClient: n, getHeaders: r = Dt }) {
|
|
|
742
742
|
}
|
|
743
743
|
//#endregion
|
|
744
744
|
//#region src/Hooks/useDataTable.ts
|
|
745
|
-
function
|
|
746
|
-
let e = o(
|
|
745
|
+
function Ot() {
|
|
746
|
+
let e = o(Tt);
|
|
747
747
|
if (!e) throw Error("useDataTable must be used within a DataTableProvider");
|
|
748
748
|
return e;
|
|
749
749
|
}
|
|
750
750
|
//#endregion
|
|
751
751
|
//#region src/Hooks/useApi.ts
|
|
752
|
-
function
|
|
752
|
+
function kt(e) {
|
|
753
753
|
if (typeof e == "string") try {
|
|
754
754
|
let t = JSON.parse(e);
|
|
755
755
|
return {
|
|
@@ -762,7 +762,7 @@ function At(e) {
|
|
|
762
762
|
}
|
|
763
763
|
return e instanceof Error ? { message: e.message } : { message: "Unbekannter Fehler" };
|
|
764
764
|
}
|
|
765
|
-
async function
|
|
765
|
+
async function At(e, t) {
|
|
766
766
|
let n = await fetch(e, t);
|
|
767
767
|
if (n.status >= 400) {
|
|
768
768
|
let e = await n.text();
|
|
@@ -778,25 +778,25 @@ async function Y(e, t) {
|
|
|
778
778
|
return n;
|
|
779
779
|
}
|
|
780
780
|
async function jt(e, t) {
|
|
781
|
-
return (await
|
|
781
|
+
return (await At(e, {
|
|
782
782
|
method: "GET",
|
|
783
783
|
headers: await t()
|
|
784
784
|
})).json();
|
|
785
785
|
}
|
|
786
786
|
async function Mt(e, t, n) {
|
|
787
|
-
return (await
|
|
787
|
+
return (await At(`${e}/${t}`, {
|
|
788
788
|
method: "GET",
|
|
789
789
|
headers: await n()
|
|
790
790
|
})).json();
|
|
791
791
|
}
|
|
792
792
|
async function Nt(e, t, n) {
|
|
793
|
-
await
|
|
793
|
+
await At(`${e}/${t}`, {
|
|
794
794
|
method: "DELETE",
|
|
795
795
|
headers: await n()
|
|
796
796
|
});
|
|
797
797
|
}
|
|
798
798
|
async function Pt(e, t, n) {
|
|
799
|
-
let r = await
|
|
799
|
+
let r = await At(e, {
|
|
800
800
|
method: "POST",
|
|
801
801
|
headers: await n(),
|
|
802
802
|
body: JSON.stringify(t)
|
|
@@ -804,7 +804,7 @@ async function Pt(e, t, n) {
|
|
|
804
804
|
return r.status === 204 ? t : r.json();
|
|
805
805
|
}
|
|
806
806
|
async function Ft(e, t, n, r) {
|
|
807
|
-
let i = await
|
|
807
|
+
let i = await At(t, {
|
|
808
808
|
method: e,
|
|
809
809
|
headers: await n(),
|
|
810
810
|
body: r ? JSON.stringify(r) : void 0
|
|
@@ -812,7 +812,7 @@ async function Ft(e, t, n, r) {
|
|
|
812
812
|
if (i.status !== 204) return i.json();
|
|
813
813
|
}
|
|
814
814
|
async function It(e, t, n) {
|
|
815
|
-
let r = await
|
|
815
|
+
let r = await At(`${e}/${t.id}`, {
|
|
816
816
|
method: "PUT",
|
|
817
817
|
headers: await n(),
|
|
818
818
|
body: JSON.stringify(t)
|
|
@@ -820,24 +820,24 @@ async function It(e, t, n) {
|
|
|
820
820
|
return r.status === 204 ? t : r.json();
|
|
821
821
|
}
|
|
822
822
|
function Lt(e, t, n) {
|
|
823
|
-
let { baseUrl: r, getHeaders: i } =
|
|
824
|
-
return
|
|
823
|
+
let { baseUrl: r, getHeaders: i } = Ot();
|
|
824
|
+
return Ct({
|
|
825
825
|
queryKey: [...t.map((e) => e.toString()), String(n?.toString())],
|
|
826
826
|
queryFn: () => Mt(`${r}${e}`, n, i),
|
|
827
827
|
enabled: !!n
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
830
|
function Rt(e, t, n = !0) {
|
|
831
|
-
let { baseUrl: r, getHeaders: i } =
|
|
832
|
-
return
|
|
831
|
+
let { baseUrl: r, getHeaders: i } = Ot();
|
|
832
|
+
return Ct({
|
|
833
833
|
queryKey: [...t.map((e) => e.toString())],
|
|
834
834
|
queryFn: () => jt(`${r}${e}`, i),
|
|
835
835
|
enabled: n
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
838
|
function zt(e, t) {
|
|
839
|
-
let { baseUrl: n, queryClient: r, getHeaders: i } =
|
|
840
|
-
return
|
|
839
|
+
let { baseUrl: n, queryClient: r, getHeaders: i } = Ot();
|
|
840
|
+
return wt({
|
|
841
841
|
mutationKey: [...t.map((e) => e.toString())],
|
|
842
842
|
mutationFn: (t) => Pt(`${n}${e}`, t, i),
|
|
843
843
|
onSettled() {
|
|
@@ -846,8 +846,8 @@ function zt(e, t) {
|
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
848
|
function Bt(e, t) {
|
|
849
|
-
let { baseUrl: n, queryClient: r, getHeaders: i } =
|
|
850
|
-
return
|
|
849
|
+
let { baseUrl: n, queryClient: r, getHeaders: i } = Ot();
|
|
850
|
+
return wt({
|
|
851
851
|
mutationKey: [...t.map((e) => e.toString())],
|
|
852
852
|
mutationFn: (t) => It(`${n}${e}`, t, i),
|
|
853
853
|
onSettled() {
|
|
@@ -856,8 +856,8 @@ function Bt(e, t) {
|
|
|
856
856
|
});
|
|
857
857
|
}
|
|
858
858
|
function Vt(e, t) {
|
|
859
|
-
let { baseUrl: n, queryClient: r, getHeaders: i } =
|
|
860
|
-
return
|
|
859
|
+
let { baseUrl: n, queryClient: r, getHeaders: i } = Ot();
|
|
860
|
+
return wt({
|
|
861
861
|
mutationKey: [...t.map((e) => e.toString())],
|
|
862
862
|
mutationFn: (t) => Nt(`${n}${e}`, t, i),
|
|
863
863
|
onSettled() {
|
|
@@ -872,7 +872,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
|
|
|
872
872
|
function k(e, t) {
|
|
873
873
|
return typeof e.required == "function" ? e.required(t ?? {}) : !!e.required;
|
|
874
874
|
}
|
|
875
|
-
let A =
|
|
875
|
+
let A = V({
|
|
876
876
|
mode: "uncontrolled",
|
|
877
877
|
initialValues: e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? !1 : t.defaultValue ?? "", e), {}),
|
|
878
878
|
validate: e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !k(t, n) || e ? null : "Pflichtfeld", e), {})
|
|
@@ -882,7 +882,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
|
|
|
882
882
|
if (e.conditional && !e.conditional(t)) return null;
|
|
883
883
|
let r = k(e, t);
|
|
884
884
|
return /* @__PURE__ */ m(n, { children: [
|
|
885
|
-
(e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(
|
|
885
|
+
(e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(le, {
|
|
886
886
|
label: e.column.title,
|
|
887
887
|
placeholder: e.placeholder ?? "",
|
|
888
888
|
...A.getInputProps(e.id),
|
|
@@ -896,7 +896,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
|
|
|
896
896
|
...A.getInputProps(e.id),
|
|
897
897
|
required: r
|
|
898
898
|
}, A.key(e.id)),
|
|
899
|
-
e.type === "date" && /* @__PURE__ */ p(
|
|
899
|
+
e.type === "date" && /* @__PURE__ */ p(ge, {
|
|
900
900
|
label: e.column.title,
|
|
901
901
|
placeholder: e.placeholder ?? "",
|
|
902
902
|
valueFormat: "DD.MM.YYYY",
|
|
@@ -910,7 +910,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
|
|
|
910
910
|
...A.getInputProps(e.id, { type: "checkbox" }),
|
|
911
911
|
required: r
|
|
912
912
|
}, A.key(e.id)),
|
|
913
|
-
e.type === "textarea" && /* @__PURE__ */ p(
|
|
913
|
+
e.type === "textarea" && /* @__PURE__ */ p(ue, {
|
|
914
914
|
label: e.column.title,
|
|
915
915
|
placeholder: e.placeholder ?? "",
|
|
916
916
|
...A.getInputProps(e.id),
|
|
@@ -946,10 +946,10 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
|
|
|
946
946
|
}
|
|
947
947
|
O.length && s < O.length - 1 ? x || c(s + 1) : x || (A.setInitialValues(n), A.reset(), t());
|
|
948
948
|
}),
|
|
949
|
-
children: [O.length ? /* @__PURE__ */ p(
|
|
949
|
+
children: [O.length ? /* @__PURE__ */ p(ne, {
|
|
950
950
|
active: s,
|
|
951
951
|
size: "sm",
|
|
952
|
-
children: O.map((t) => /* @__PURE__ */ p(
|
|
952
|
+
children: O.map((t) => /* @__PURE__ */ p(ne.Step, {
|
|
953
953
|
...a && a[t - 1] ? { label: a[t - 1].label } : {},
|
|
954
954
|
children: e.filter((e) => e.step === t).map((e) => M(e))
|
|
955
955
|
}, t))
|
|
@@ -986,7 +986,7 @@ function X() {
|
|
|
986
986
|
//#endregion
|
|
987
987
|
//#region node_modules/mantine-datatable/dist/index.mjs
|
|
988
988
|
function Z(e, t, n) {
|
|
989
|
-
return e ?
|
|
989
|
+
return e ? pe({
|
|
990
990
|
color: typeof e == "object" ? e[n] : e,
|
|
991
991
|
theme: t
|
|
992
992
|
}).value : void 0;
|
|
@@ -1023,7 +1023,7 @@ function Kt({ theme: e, color: t, backgroundColor: n }) {
|
|
|
1023
1023
|
"--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
-
var [qt, Jt] =
|
|
1026
|
+
var [qt, Jt] = fe("useDataTableColumnsContext must be used within DataTableColumnProvider"), Yt = (e) => {
|
|
1027
1027
|
let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth: f, setMultipleColumnWidths: m, resetColumnsWidth: h, beginResize: g, endResize: _, pinnedMap: v } = e, [y, b] = d(""), [x, S] = d("");
|
|
1028
1028
|
return p(qt, {
|
|
1029
1029
|
value: {
|
|
@@ -1093,7 +1093,7 @@ function Qt({ icon: e, text: t, active: n, children: r }) {
|
|
|
1093
1093
|
children: r || m(f, { children: [e || p("div", {
|
|
1094
1094
|
className: "mantine-datatable-empty-state-icon",
|
|
1095
1095
|
children: p(Zt, {})
|
|
1096
|
-
}), p(
|
|
1096
|
+
}), p(z, {
|
|
1097
1097
|
component: "div",
|
|
1098
1098
|
size: "sm",
|
|
1099
1099
|
c: "dimmed",
|
|
@@ -1107,7 +1107,7 @@ function $t({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1107
1107
|
defaultPinned: e.pinned,
|
|
1108
1108
|
pinnable: !!e.pinnable,
|
|
1109
1109
|
pinned: e.pinned
|
|
1110
|
-
})), [t]), [i, a] =
|
|
1110
|
+
})), [t]), [i, a] = Oe({
|
|
1111
1111
|
key: e ? `${e}-columns-pinning` : "",
|
|
1112
1112
|
defaultValue: e ? r : void 0,
|
|
1113
1113
|
getInitialValueInEffect: n
|
|
@@ -1155,7 +1155,7 @@ function $t({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1155
1155
|
};
|
|
1156
1156
|
}
|
|
1157
1157
|
function en({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1158
|
-
let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] =
|
|
1158
|
+
let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = Oe({
|
|
1159
1159
|
key: e ? `${e}-columns-order` : "",
|
|
1160
1160
|
defaultValue: e ? r : void 0,
|
|
1161
1161
|
getInitialValueInEffect: n
|
|
@@ -1198,7 +1198,7 @@ function en({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1198
1198
|
};
|
|
1199
1199
|
}
|
|
1200
1200
|
function tn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
|
|
1201
|
-
let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] =
|
|
1201
|
+
let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = Oe({
|
|
1202
1202
|
key: e ? `${e}-columns-width` : "",
|
|
1203
1203
|
defaultValue: e ? o() : void 0,
|
|
1204
1204
|
getInitialValueInEffect: n
|
|
@@ -1292,7 +1292,7 @@ function nn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1292
1292
|
defaultToggle: e.defaultToggle || !0,
|
|
1293
1293
|
toggleable: e.toggleable,
|
|
1294
1294
|
toggled: e.defaultToggle === void 0 ? !0 : e.defaultToggle
|
|
1295
|
-
})), [t]), [i, a] =
|
|
1295
|
+
})), [t]), [i, a] = Oe({
|
|
1296
1296
|
key: e ? `${e}-columns-toggle` : "",
|
|
1297
1297
|
defaultValue: e ? r : void 0,
|
|
1298
1298
|
getInitialValueInEffect: n
|
|
@@ -1499,7 +1499,7 @@ function pn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1499
1499
|
Q(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), Q(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
|
|
1500
1500
|
}
|
|
1501
1501
|
function c() {
|
|
1502
|
-
f.current.withRowBorders && t.height < n.height ? Q(r.current, un, `${
|
|
1502
|
+
f.current.withRowBorders && t.height < n.height ? Q(r.current, un, `${B("1px")} solid var(--mantine-datatable-border-color)`) : Q(r.current, un, "unset");
|
|
1503
1503
|
}
|
|
1504
1504
|
h.current = c;
|
|
1505
1505
|
function l() {
|
|
@@ -1660,12 +1660,12 @@ function vn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0
|
|
|
1660
1660
|
}, [e]), r;
|
|
1661
1661
|
}
|
|
1662
1662
|
function yn(e) {
|
|
1663
|
-
let t =
|
|
1663
|
+
let t = he();
|
|
1664
1664
|
return vn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
|
|
1665
1665
|
}
|
|
1666
1666
|
function bn(e) {
|
|
1667
|
-
let t =
|
|
1668
|
-
return
|
|
1667
|
+
let t = he();
|
|
1668
|
+
return ke((typeof e == "function" ? e(t) : e) || "", !0);
|
|
1669
1669
|
}
|
|
1670
1670
|
function xn(e) {
|
|
1671
1671
|
let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
|
|
@@ -1753,7 +1753,7 @@ function jn(e, t) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
var Mn = "mantine-datatable-nowrap", Nn = "mantine-datatable-ellipsis", Pn = "mantine-datatable-pointer-cursor", Fn = "mantine-datatable-context-menu-cursor", In = "mantine-datatable-text-selection-disabled", Ln = "mantine-datatable-text-align-left", Rn = "mantine-datatable-text-align-center", zn = "mantine-datatable-text-align-right";
|
|
1755
1755
|
function Bn({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
|
|
1756
|
-
return bn(r) ? p(
|
|
1756
|
+
return bn(r) ? p(oe, {
|
|
1757
1757
|
"data-pinned": n?.position,
|
|
1758
1758
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
1759
1759
|
className: X({
|
|
@@ -1780,17 +1780,17 @@ function Bn({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
|
|
|
1780
1780
|
}) : null;
|
|
1781
1781
|
}
|
|
1782
1782
|
function Vn({ shadowVisible: e }) {
|
|
1783
|
-
return p(
|
|
1783
|
+
return p(oe, {
|
|
1784
1784
|
className: "mantine-datatable-footer-selector-placeholder-cell",
|
|
1785
1785
|
"data-shadow-visible": e || void 0
|
|
1786
1786
|
});
|
|
1787
1787
|
}
|
|
1788
1788
|
function Hn({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
|
|
1789
|
-
return p(
|
|
1789
|
+
return p(ae, {
|
|
1790
1790
|
ref: s,
|
|
1791
1791
|
className: X("mantine-datatable-footer", e),
|
|
1792
1792
|
style: t,
|
|
1793
|
-
children: m(
|
|
1793
|
+
children: m(R, { children: [a && p(Vn, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
|
|
1794
1794
|
if (e) return null;
|
|
1795
1795
|
let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
|
|
1796
1796
|
...r,
|
|
@@ -1829,7 +1829,7 @@ function Un({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1829
1829
|
n,
|
|
1830
1830
|
_
|
|
1831
1831
|
]), y = l(() => d.reduce((e, t) => e + Dn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = kn(f, y + v < h, m);
|
|
1832
|
-
return v > 0 ? p(
|
|
1832
|
+
return v > 0 ? p(oe, {
|
|
1833
1833
|
colSpan: v,
|
|
1834
1834
|
rowSpan: b > 1 ? b : void 0,
|
|
1835
1835
|
"data-pinned": s?.position,
|
|
@@ -1887,7 +1887,7 @@ function Gn() {
|
|
|
1887
1887
|
});
|
|
1888
1888
|
}
|
|
1889
1889
|
function Kn({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
|
|
1890
|
-
let [i, { close: a, toggle: o }] =
|
|
1890
|
+
let [i, { close: a, toggle: o }] = De(!1), s = t ? Gn : Wn, c = Ee(a);
|
|
1891
1891
|
return r && (c = void 0), m(N, {
|
|
1892
1892
|
withArrow: !0,
|
|
1893
1893
|
shadow: "md",
|
|
@@ -2072,7 +2072,7 @@ var Qn = 50, $n = (e) => {
|
|
|
2072
2072
|
let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
|
|
2073
2073
|
current: 0,
|
|
2074
2074
|
next: 0
|
|
2075
|
-
}), { dir: c } =
|
|
2075
|
+
}), { dir: c } = me(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = Jt(), g = a((e) => {
|
|
2076
2076
|
if (e.preventDefault(), e.stopPropagation(), !n.current) return;
|
|
2077
2077
|
let r = n.current, a = r.nextElementSibling;
|
|
2078
2078
|
for (; a;) {
|
|
@@ -2208,36 +2208,36 @@ function nr() {
|
|
|
2208
2208
|
});
|
|
2209
2209
|
}
|
|
2210
2210
|
function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: f, sortIcons: g, textAlign: v, width: b, sortStatus: x, onSortStatusChange: S, filter: T, filterPopoverProps: E, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
|
|
2211
|
-
let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: ee, setColumnsPinning: F } = Jt(), [te, I] = d(!1), L = u(null),
|
|
2211
|
+
let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: ee, setColumnsPinning: F } = Jt(), [te, I] = d(!1), L = u(null), ne = ee?.find((e) => e.accessor === r)?.pinned;
|
|
2212
2212
|
if (!bn(i)) return null;
|
|
2213
|
-
let
|
|
2213
|
+
let re = a ?? xn(r), ie = typeof re == "string" ? re : void 0, ae = o && S ? (e) => {
|
|
2214
2214
|
e?.defaultPrevented || S({
|
|
2215
2215
|
sortKey: k,
|
|
2216
2216
|
columnAccessor: r,
|
|
2217
2217
|
direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
|
|
2218
2218
|
});
|
|
2219
|
-
} : void 0,
|
|
2219
|
+
} : void 0, se = (e) => {
|
|
2220
2220
|
e.stopPropagation(), A(r), I(!1);
|
|
2221
|
-
},
|
|
2221
|
+
}, R = (e) => {
|
|
2222
2222
|
e.preventDefault(), j(r), I(!0);
|
|
2223
|
-
},
|
|
2223
|
+
}, ce = () => {
|
|
2224
2224
|
j(r), I(!1), M();
|
|
2225
|
-
},
|
|
2225
|
+
}, z = () => {
|
|
2226
2226
|
I(!0);
|
|
2227
|
-
},
|
|
2227
|
+
}, le = () => {
|
|
2228
2228
|
I(!1);
|
|
2229
|
-
},
|
|
2229
|
+
}, ue = (e) => {
|
|
2230
2230
|
e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
|
|
2231
2231
|
...e,
|
|
2232
2232
|
toggled: !1
|
|
2233
2233
|
} : e));
|
|
2234
|
-
},
|
|
2234
|
+
}, de = (e) => {
|
|
2235
2235
|
F((t) => t.map((t) => t.accessor === r ? {
|
|
2236
2236
|
...t,
|
|
2237
2237
|
pinned: e
|
|
2238
2238
|
} : t));
|
|
2239
2239
|
};
|
|
2240
|
-
return m(
|
|
2240
|
+
return m(oe, {
|
|
2241
2241
|
"data-accessor": r,
|
|
2242
2242
|
"data-pinned": n?.position,
|
|
2243
2243
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
@@ -2264,8 +2264,8 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2264
2264
|
],
|
|
2265
2265
|
role: o ? "button" : void 0,
|
|
2266
2266
|
tabIndex: o ? 0 : void 0,
|
|
2267
|
-
onClick:
|
|
2268
|
-
onKeyDown: (e) => e.key === "Enter" &&
|
|
2267
|
+
onClick: ae,
|
|
2268
|
+
onKeyDown: (e) => e.key === "Enter" && ae?.(),
|
|
2269
2269
|
ref: L,
|
|
2270
2270
|
children: [m(w, {
|
|
2271
2271
|
className: "mantine-datatable-header-cell-sortable-group",
|
|
@@ -2280,11 +2280,11 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2280
2280
|
"mantine-datatable-header-cell-drag-over": te
|
|
2281
2281
|
}),
|
|
2282
2282
|
draggable: s,
|
|
2283
|
-
onDragStart: s ?
|
|
2284
|
-
onDragEnter: s ?
|
|
2285
|
-
onDragOver: s ?
|
|
2286
|
-
onDrop: s ?
|
|
2287
|
-
onDragLeave: s ?
|
|
2283
|
+
onDragStart: s ? se : void 0,
|
|
2284
|
+
onDragEnter: s ? z : void 0,
|
|
2285
|
+
onDragOver: s ? R : void 0,
|
|
2286
|
+
onDrop: s ? ce : void 0,
|
|
2287
|
+
onDragLeave: s ? le : void 0,
|
|
2288
2288
|
children: [s ? p(y, {
|
|
2289
2289
|
role: "img",
|
|
2290
2290
|
"aria-label": "Drag column",
|
|
@@ -2303,13 +2303,13 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2303
2303
|
[Rn]: v === "center",
|
|
2304
2304
|
[zn]: v === "right"
|
|
2305
2305
|
}, Mn, Nn),
|
|
2306
|
-
title:
|
|
2307
|
-
children:
|
|
2306
|
+
title: ie,
|
|
2307
|
+
children: re
|
|
2308
2308
|
})]
|
|
2309
2309
|
}),
|
|
2310
2310
|
l ? p(Zn, {
|
|
2311
|
-
currentPinned:
|
|
2312
|
-
onPinChange:
|
|
2311
|
+
currentPinned: ne,
|
|
2312
|
+
onPinChange: de
|
|
2313
2313
|
}) : null,
|
|
2314
2314
|
c ? p(y, {
|
|
2315
2315
|
className: "mantine-datatable-header-cell-toggleable-icon",
|
|
@@ -2318,7 +2318,7 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2318
2318
|
children: p(h, {
|
|
2319
2319
|
size: "xs",
|
|
2320
2320
|
variant: "light",
|
|
2321
|
-
onClick:
|
|
2321
|
+
onClick: ue,
|
|
2322
2322
|
children: p(Xn, {})
|
|
2323
2323
|
})
|
|
2324
2324
|
}) : null,
|
|
@@ -2348,7 +2348,7 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2348
2348
|
}
|
|
2349
2349
|
function ir({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
|
|
2350
2350
|
let u = !o.disabled;
|
|
2351
|
-
return p(
|
|
2351
|
+
return p(oe, {
|
|
2352
2352
|
ref: l,
|
|
2353
2353
|
className: X("mantine-datatable-header-selector-cell", { [Pn]: n === "cell" && u }, e),
|
|
2354
2354
|
style: t,
|
|
@@ -2391,7 +2391,7 @@ function or({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2391
2391
|
checkboxProps: v,
|
|
2392
2392
|
onChange: _,
|
|
2393
2393
|
rowSpan: c ? D : void 0
|
|
2394
|
-
}) : null, { columnsToggle: k, setColumnsToggle: A } = Jt(), [j, M] = d(!1), F = o.some((e) => e.toggleable), te = F ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? xn(String(e))])) : void 0, I = m(
|
|
2394
|
+
}) : null, { columnsToggle: k, setColumnsToggle: A } = Jt(), [j, M] = d(!1), F = o.some((e) => e.toggleable), te = F ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? xn(String(e))])) : void 0, I = m(se, {
|
|
2395
2395
|
className: X("mantine-datatable-header", t),
|
|
2396
2396
|
style: n,
|
|
2397
2397
|
ref: T,
|
|
@@ -2400,7 +2400,7 @@ function or({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2400
2400
|
} : void 0,
|
|
2401
2401
|
children: [c && Array.from({ length: E }, (e, t) => {
|
|
2402
2402
|
let n = On(c, t);
|
|
2403
|
-
return m(
|
|
2403
|
+
return m(R, { children: [t === 0 && O, n.map((e, r) => p(Un, {
|
|
2404
2404
|
group: e,
|
|
2405
2405
|
pinnedInfo: ar(e, l),
|
|
2406
2406
|
maxDepth: E,
|
|
@@ -2410,7 +2410,7 @@ function or({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2410
2410
|
withColumnBorders: C,
|
|
2411
2411
|
totalTableColumns: o.length
|
|
2412
2412
|
}, e.id))] }, `group-depth-${t}`);
|
|
2413
|
-
}), m(
|
|
2413
|
+
}), m(R, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
|
|
2414
2414
|
if (e) return null;
|
|
2415
2415
|
let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title: m, sortable: h, draggable: g, toggleable: _, pinnable: v, resizable: y, titleClassName: b, titleStyle: x, filter: S, filterPopoverProps: C, filterPopoverDisableClickOutside: w, filtering: T, sortKey: E } = {
|
|
2416
2416
|
...s,
|
|
@@ -2494,16 +2494,16 @@ function cr() {
|
|
|
2494
2494
|
});
|
|
2495
2495
|
}
|
|
2496
2496
|
var lr = {
|
|
2497
|
-
xs:
|
|
2498
|
-
sm:
|
|
2499
|
-
md:
|
|
2500
|
-
lg:
|
|
2501
|
-
xl:
|
|
2497
|
+
xs: B(22),
|
|
2498
|
+
sm: B(26),
|
|
2499
|
+
md: B(32),
|
|
2500
|
+
lg: B(38),
|
|
2501
|
+
xl: B(44)
|
|
2502
2502
|
};
|
|
2503
2503
|
function ur({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
|
|
2504
2504
|
return m(w, {
|
|
2505
2505
|
gap: "xs",
|
|
2506
|
-
children: [p(
|
|
2506
|
+
children: [p(z, {
|
|
2507
2507
|
component: "div",
|
|
2508
2508
|
size: e,
|
|
2509
2509
|
children: t
|
|
@@ -2534,7 +2534,7 @@ function ur({ size: e, label: t, values: n, value: r, activeTextColor: i, active
|
|
|
2534
2534
|
}) : void 0],
|
|
2535
2535
|
disabled: n,
|
|
2536
2536
|
onClick: () => o(t),
|
|
2537
|
-
children: p(
|
|
2537
|
+
children: p(z, {
|
|
2538
2538
|
component: "div",
|
|
2539
2539
|
size: e,
|
|
2540
2540
|
children: t
|
|
@@ -2554,8 +2554,8 @@ function dr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2554
2554
|
totalRecords: g
|
|
2555
2555
|
});
|
|
2556
2556
|
} else O = n ? u : d;
|
|
2557
|
-
let k = g && v ? Math.max(1, Math.ceil(g / v)) : 1, A = g ? (r - 1) * (v ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, N = !bn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${
|
|
2558
|
-
Text: (e) => p(
|
|
2557
|
+
let k = g && v ? Math.max(1, Math.ceil(g / v)) : 1, A = g ? (r - 1) * (v ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, N = !bn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${B(w)}rem` : e[w] || w})`), P = {
|
|
2558
|
+
Text: (e) => p(z, {
|
|
2559
2559
|
component: "div",
|
|
2560
2560
|
className: "mantine-datatable-pagination-text",
|
|
2561
2561
|
size: l,
|
|
@@ -2624,7 +2624,7 @@ function dr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2624
2624
|
});
|
|
2625
2625
|
}
|
|
2626
2626
|
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: m, render: h, defaultRender: g, customCellAttributes: _ }) {
|
|
2627
|
-
return bn(r) ? p(
|
|
2627
|
+
return bn(r) ? p(ie, {
|
|
2628
2628
|
"data-pinned": n?.position,
|
|
2629
2629
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
2630
2630
|
className: X({
|
|
@@ -2658,7 +2658,7 @@ function fr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
|
|
|
2658
2658
|
}
|
|
2659
2659
|
function pr({ open: e, colSpan: t, content: n, collapseProps: r }) {
|
|
2660
2660
|
let { expanded: i, visible: a } = jn(e, r?.transitionDuration);
|
|
2661
|
-
return a ? m(f, { children: [p(
|
|
2661
|
+
return a ? m(f, { children: [p(R, {}), p(R, { children: p(ie, {
|
|
2662
2662
|
className: "mantine-datatable-row-expansion-cell",
|
|
2663
2663
|
colSpan: t,
|
|
2664
2664
|
children: p(x, {
|
|
@@ -2678,7 +2678,7 @@ function mr({ className: e, style: t, record: n, index: r, trigger: i, onChange:
|
|
|
2678
2678
|
}, d = !l.disabled && !u.disabled, f = (e) => {
|
|
2679
2679
|
e.stopPropagation(), i === "cell" && d && a?.(e);
|
|
2680
2680
|
};
|
|
2681
|
-
return p(
|
|
2681
|
+
return p(ie, {
|
|
2682
2682
|
className: X("mantine-datatable-row-selector-cell", { [Pn]: i === "cell" && d }, e),
|
|
2683
2683
|
style: t,
|
|
2684
2684
|
"data-shadow-visible": o || void 0,
|
|
@@ -2775,7 +2775,7 @@ function hr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2775
2775
|
rowProps: P,
|
|
2776
2776
|
children: M,
|
|
2777
2777
|
expandedElement: N
|
|
2778
|
-
}) : m(f, { children: [p(
|
|
2778
|
+
}) : m(f, { children: [p(R, {
|
|
2779
2779
|
...P,
|
|
2780
2780
|
children: M
|
|
2781
2781
|
}), N] });
|
|
@@ -2842,81 +2842,81 @@ function _r({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
|
|
|
2842
2842
|
]
|
|
2843
2843
|
});
|
|
2844
2844
|
}
|
|
2845
|
-
function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: v, groups: y, 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: te, horizontalSpacing: I, page: L, onPageChange:
|
|
2846
|
-
let
|
|
2845
|
+
function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: v, groups: y, 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: te, horizontalSpacing: I, page: L, onPageChange: ne, totalRecords: ie, recordsPerPage: ae, onRecordsPerPageChange: oe, recordsPerPageOptions: se, recordsPerPageLabel: R = "Records per page", paginationWithEdges: ce, paginationWithControls: z, paginationActiveTextColor: le, paginationActiveBackgroundColor: ue, paginationSize: de = "sm", paginationText: fe = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: pe = "sm", getPaginationControlProps: B = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: me, renderPagination: he, loaderBackgroundBlur: V, customLoader: ge, loaderSize: _e, loaderType: ve, loaderColor: ye, loadingText: be = "...", emptyState: xe, noRecordsText: Se = "No records", noRecordsIcon: Ce, highlightOnHover: we, striped: Te, noHeader: Ee, onRowClick: De, onRowDoubleClick: Oe, onRowContextMenu: ke, onCellClick: Ae, onCellDoubleClick: je, onCellContextMenu: Me, onScroll: Ne, onScrollToTop: Pe, onScrollToBottom: U, onScrollToLeft: W, onScrollToRight: Fe, c: Ie, backgroundColor: Le, borderColor: G, rowBorderColor: K, stripedColor: Re, highlightOnHoverColor: ze, rowColor: Be, rowBackgroundColor: q, rowExpansion: Ve, rowClassName: He, rowStyle: Ue, customRowAttributes: We, scrollViewportRef: Ge, scrollAreaProps: Ke, tableRef: qe, bodyRef: Je, m: Ye, my: Xe, mx: Ze, mt: Qe, mb: $e, ml: et, mr: tt, className: nt, classNames: rt, style: it, styles: at, rowFactory: ot, tableWrapper: st, ...ct }) {
|
|
2846
|
+
let lt = l(() => y ? En(y) : g, [g, y]), { refs: J, onScroll: ut } = pn({
|
|
2847
2847
|
scrollCallbacks: {
|
|
2848
|
-
onScroll:
|
|
2849
|
-
onScrollToTop:
|
|
2850
|
-
onScrollToBottom:
|
|
2851
|
-
onScrollToLeft:
|
|
2848
|
+
onScroll: Ne,
|
|
2849
|
+
onScrollToTop: Pe,
|
|
2850
|
+
onScrollToBottom: U,
|
|
2851
|
+
onScrollToLeft: W,
|
|
2852
2852
|
onScrollToRight: Fe
|
|
2853
2853
|
},
|
|
2854
|
-
withRowBorders:
|
|
2855
|
-
}),
|
|
2854
|
+
withRowBorders: ct.withRowBorders
|
|
2855
|
+
}), Y = rn({
|
|
2856
2856
|
key: v,
|
|
2857
|
-
columns:
|
|
2858
|
-
headerRef:
|
|
2859
|
-
scrollViewportRef:
|
|
2860
|
-
}),
|
|
2861
|
-
rowExpansion:
|
|
2857
|
+
columns: lt,
|
|
2858
|
+
headerRef: J.header,
|
|
2859
|
+
scrollViewportRef: J.scrollViewport
|
|
2860
|
+
}), dt = Y.effectiveColumns, ft = H(J.table, qe), pt = H(J.scrollViewport, Ge), mt = u(null), ht = H(mt, Je), gt = An({
|
|
2861
|
+
rowExpansion: Ve,
|
|
2862
2862
|
records: T,
|
|
2863
2863
|
idAccessor: w
|
|
2864
|
-
}), { pinnedMap:
|
|
2865
|
-
columns:
|
|
2866
|
-
theadRef:
|
|
2867
|
-
tbodyRef:
|
|
2868
|
-
selectionColumnHeaderRef:
|
|
2864
|
+
}), { pinnedMap: _t, hasLeftPinned: vt, hasRightPinned: yt } = mn({
|
|
2865
|
+
columns: dt,
|
|
2866
|
+
theadRef: J.header,
|
|
2867
|
+
tbodyRef: mt,
|
|
2868
|
+
selectionColumnHeaderRef: J.selectionColumnHeader,
|
|
2869
2869
|
selectionVisible: !!D,
|
|
2870
2870
|
pinFirstColumn: b,
|
|
2871
2871
|
pinLastColumn: x
|
|
2872
|
-
}),
|
|
2873
|
-
|
|
2874
|
-
}, [
|
|
2872
|
+
}), bt = u(!1), xt = u(L), St = u(T), Ct = a((e) => {
|
|
2873
|
+
bt.current = !0, St.current = T, ne(e);
|
|
2874
|
+
}, [ne, T]);
|
|
2875
2875
|
s(() => {
|
|
2876
|
-
|
|
2876
|
+
xt.current !== L && (bt.current = !0, St.current = T, xt.current = L);
|
|
2877
2877
|
}, [L, T]);
|
|
2878
|
-
let
|
|
2878
|
+
let wt = T?.length;
|
|
2879
2879
|
c(() => {
|
|
2880
|
-
if (!
|
|
2881
|
-
let e =
|
|
2880
|
+
if (!bt.current || h || T === St.current) return;
|
|
2881
|
+
let e = J.scrollViewport.current;
|
|
2882
2882
|
if (!e) return;
|
|
2883
2883
|
let t = requestAnimationFrame(() => {
|
|
2884
2884
|
e.scrollTo({
|
|
2885
2885
|
top: 0,
|
|
2886
2886
|
left: 0
|
|
2887
|
-
}),
|
|
2887
|
+
}), bt.current = !1;
|
|
2888
2888
|
});
|
|
2889
2889
|
return () => cancelAnimationFrame(t);
|
|
2890
2890
|
}, [
|
|
2891
2891
|
h,
|
|
2892
2892
|
T,
|
|
2893
|
-
|
|
2893
|
+
J.scrollViewport
|
|
2894
2894
|
]);
|
|
2895
|
-
let
|
|
2896
|
-
D && O && O(jt ? D.filter((e) => !
|
|
2895
|
+
let Tt = T?.map((e) => $(e, w)), Et = !!D, Dt = D?.map((e) => $(e, w)), Ot = Tt !== void 0 && Dt !== void 0 && Dt.length > 0, kt = j ? T?.filter(j) : T, At = kt?.map((e) => $(e, w)), jt = Ot && At.every((e) => Dt.includes(e)), Mt = Ot && At.some((e) => Dt.includes(e)), Nt = a(() => {
|
|
2896
|
+
D && O && O(jt ? D.filter((e) => !At.includes($(e, w))) : Cn([...D, ...kt], (e) => $(e, w)));
|
|
2897
2897
|
}, [
|
|
2898
2898
|
jt,
|
|
2899
2899
|
w,
|
|
2900
2900
|
O,
|
|
2901
|
-
Y,
|
|
2902
2901
|
At,
|
|
2902
|
+
kt,
|
|
2903
2903
|
D
|
|
2904
|
-
]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = hn(
|
|
2905
|
-
m:
|
|
2906
|
-
my:
|
|
2907
|
-
mx:
|
|
2908
|
-
mt:
|
|
2909
|
-
mb:
|
|
2910
|
-
ml:
|
|
2911
|
-
mr:
|
|
2912
|
-
}, Rt = a(({ children: e }) =>
|
|
2904
|
+
]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = hn(Tt), It = Et && !vt, Lt = {
|
|
2905
|
+
m: Ye,
|
|
2906
|
+
my: Xe,
|
|
2907
|
+
mx: Ze,
|
|
2908
|
+
mt: Qe,
|
|
2909
|
+
mb: $e,
|
|
2910
|
+
ml: et,
|
|
2911
|
+
mr: tt
|
|
2912
|
+
}, Rt = a(({ children: e }) => st ? st({ children: e }) : e, [st]);
|
|
2913
2913
|
return p(Yt, {
|
|
2914
|
-
...
|
|
2915
|
-
pinnedMap:
|
|
2914
|
+
...Y,
|
|
2915
|
+
pinnedMap: _t,
|
|
2916
2916
|
children: m(_, {
|
|
2917
|
-
ref:
|
|
2917
|
+
ref: J.root,
|
|
2918
2918
|
...Lt,
|
|
2919
|
-
className: X("mantine-datatable", { "mantine-datatable-with-border": e },
|
|
2919
|
+
className: X("mantine-datatable", { "mantine-datatable-with-border": e }, nt, rt?.root),
|
|
2920
2920
|
style: [
|
|
2921
2921
|
(e) => ({
|
|
2922
2922
|
...Wt({
|
|
@@ -2934,55 +2934,55 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
2934
2934
|
minHeight: i,
|
|
2935
2935
|
maxHeight: o
|
|
2936
2936
|
}),
|
|
2937
|
-
|
|
2938
|
-
|
|
2937
|
+
it,
|
|
2938
|
+
at?.root,
|
|
2939
2939
|
{ position: "relative" }
|
|
2940
2940
|
],
|
|
2941
2941
|
children: [
|
|
2942
2942
|
p(_r, {
|
|
2943
|
-
viewportRef:
|
|
2944
|
-
leftShadowBehind:
|
|
2945
|
-
rightShadowBehind:
|
|
2946
|
-
onScrollPositionChange:
|
|
2947
|
-
scrollAreaProps:
|
|
2948
|
-
children: p(Rt, { children: m(
|
|
2949
|
-
ref:
|
|
2943
|
+
viewportRef: pt,
|
|
2944
|
+
leftShadowBehind: Et || vt,
|
|
2945
|
+
rightShadowBehind: yt,
|
|
2946
|
+
onScrollPositionChange: ut,
|
|
2947
|
+
scrollAreaProps: Ke,
|
|
2948
|
+
children: p(Rt, { children: m(re, {
|
|
2949
|
+
ref: ft,
|
|
2950
2950
|
horizontalSpacing: I,
|
|
2951
2951
|
className: X("mantine-datatable-table", {
|
|
2952
2952
|
[In]: n,
|
|
2953
2953
|
"mantine-datatable-vertical-align-top": f === "top",
|
|
2954
2954
|
"mantine-datatable-vertical-align-bottom": f === "bottom",
|
|
2955
|
-
"mantine-datatable-selection-column-visible":
|
|
2956
|
-
"mantine-datatable-resizable-columns":
|
|
2957
|
-
"mantine-datatable-resize-locked":
|
|
2958
|
-
"mantine-datatable-resizing":
|
|
2959
|
-
},
|
|
2955
|
+
"mantine-datatable-selection-column-visible": Et,
|
|
2956
|
+
"mantine-datatable-resizable-columns": Y.hasResizableColumns,
|
|
2957
|
+
"mantine-datatable-resize-locked": Y.isLocked,
|
|
2958
|
+
"mantine-datatable-resizing": Y.isResizing
|
|
2959
|
+
}, rt?.table),
|
|
2960
2960
|
style: {
|
|
2961
|
-
...
|
|
2962
|
-
...
|
|
2963
|
-
...
|
|
2961
|
+
...at?.table,
|
|
2962
|
+
...Y.isLocked ? { tableLayout: "fixed" } : null,
|
|
2963
|
+
...Y.tableWidth == null ? null : { width: `${Y.tableWidth}px` }
|
|
2964
2964
|
},
|
|
2965
|
-
"data-striped":
|
|
2966
|
-
"data-highlight-on-hover":
|
|
2967
|
-
...
|
|
2965
|
+
"data-striped": wt && Te || void 0,
|
|
2966
|
+
"data-highlight-on-hover": we || void 0,
|
|
2967
|
+
...ct,
|
|
2968
2968
|
children: [
|
|
2969
|
-
|
|
2970
|
-
...
|
|
2971
|
-
pinnedMap:
|
|
2969
|
+
Ee ? null : p(Yt, {
|
|
2970
|
+
...Y,
|
|
2971
|
+
pinnedMap: _t,
|
|
2972
2972
|
children: p(or, {
|
|
2973
|
-
ref:
|
|
2974
|
-
selectionColumnHeaderRef:
|
|
2975
|
-
className:
|
|
2976
|
-
style:
|
|
2977
|
-
columns:
|
|
2973
|
+
ref: J.header,
|
|
2974
|
+
selectionColumnHeaderRef: J.selectionColumnHeader,
|
|
2975
|
+
className: rt?.header,
|
|
2976
|
+
style: at?.header,
|
|
2977
|
+
columns: dt,
|
|
2978
2978
|
defaultColumnProps: S,
|
|
2979
2979
|
groups: y,
|
|
2980
|
-
pinnedMap:
|
|
2980
|
+
pinnedMap: _t,
|
|
2981
2981
|
sortStatus: ee,
|
|
2982
2982
|
sortIcons: F,
|
|
2983
2983
|
onSortStatusChange: te,
|
|
2984
2984
|
selectionTrigger: E,
|
|
2985
|
-
selectionVisible:
|
|
2985
|
+
selectionVisible: Et,
|
|
2986
2986
|
selectionChecked: jt,
|
|
2987
2987
|
selectionIndeterminate: Mt && !jt,
|
|
2988
2988
|
onSelectionChange: Nt,
|
|
@@ -2993,13 +2993,13 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
2993
2993
|
selectorCellShadowVisible: It,
|
|
2994
2994
|
selectionColumnClassName: k,
|
|
2995
2995
|
selectionColumnStyle: A,
|
|
2996
|
-
withColumnBorders:
|
|
2996
|
+
withColumnBorders: ct.withColumnBorders
|
|
2997
2997
|
})
|
|
2998
2998
|
}),
|
|
2999
2999
|
p("tbody", {
|
|
3000
|
-
ref:
|
|
3001
|
-
children:
|
|
3002
|
-
let n = $(e, w), r =
|
|
3000
|
+
ref: ht,
|
|
3001
|
+
children: wt ? T.map((e, t) => {
|
|
3002
|
+
let n = $(e, w), r = Dt?.includes(n) || !1, i;
|
|
3003
3003
|
return O && D && (i = (i) => {
|
|
3004
3004
|
if (i.nativeEvent.shiftKey && Pt !== null) {
|
|
3005
3005
|
let e = T.filter(t > Pt ? (e, n) => n >= Pt && n <= t && (j ? j(e, n) : !0) : (e, n) => n >= t && n <= Pt && (j ? j(e, n) : !0));
|
|
@@ -3009,89 +3009,89 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
3009
3009
|
}), p(hr, {
|
|
3010
3010
|
record: e,
|
|
3011
3011
|
index: t,
|
|
3012
|
-
columns:
|
|
3012
|
+
columns: dt,
|
|
3013
3013
|
defaultColumnProps: S,
|
|
3014
|
-
pinnedMap:
|
|
3014
|
+
pinnedMap: _t,
|
|
3015
3015
|
defaultColumnRender: C,
|
|
3016
3016
|
selectionTrigger: E,
|
|
3017
|
-
selectionVisible:
|
|
3017
|
+
selectionVisible: Et,
|
|
3018
3018
|
selectionChecked: r,
|
|
3019
3019
|
onSelectionChange: i,
|
|
3020
3020
|
isRecordSelectable: j,
|
|
3021
3021
|
selectionCheckboxProps: M,
|
|
3022
3022
|
getSelectionCheckboxProps: P,
|
|
3023
|
-
onClick:
|
|
3024
|
-
onDoubleClick:
|
|
3023
|
+
onClick: De,
|
|
3024
|
+
onDoubleClick: Oe,
|
|
3025
3025
|
onCellClick: Ae,
|
|
3026
3026
|
onCellDoubleClick: je,
|
|
3027
|
-
onContextMenu:
|
|
3027
|
+
onContextMenu: ke,
|
|
3028
3028
|
onCellContextMenu: Me,
|
|
3029
|
-
expansion:
|
|
3029
|
+
expansion: gt,
|
|
3030
3030
|
color: Be,
|
|
3031
|
-
backgroundColor:
|
|
3032
|
-
className:
|
|
3033
|
-
style:
|
|
3034
|
-
customAttributes:
|
|
3031
|
+
backgroundColor: q,
|
|
3032
|
+
className: He,
|
|
3033
|
+
style: Ue,
|
|
3034
|
+
customAttributes: We,
|
|
3035
3035
|
selectorCellShadowVisible: It,
|
|
3036
3036
|
selectionColumnClassName: k,
|
|
3037
3037
|
selectionColumnStyle: A,
|
|
3038
3038
|
idAccessor: w,
|
|
3039
|
-
rowFactory:
|
|
3039
|
+
rowFactory: ot
|
|
3040
3040
|
}, n);
|
|
3041
3041
|
}) : p(Xt, {})
|
|
3042
3042
|
}),
|
|
3043
|
-
|
|
3044
|
-
ref:
|
|
3045
|
-
className:
|
|
3046
|
-
style:
|
|
3047
|
-
columns:
|
|
3043
|
+
dt.some(({ footer: e }) => e) && p(Hn, {
|
|
3044
|
+
ref: J.footer,
|
|
3045
|
+
className: rt?.footer,
|
|
3046
|
+
style: at?.footer,
|
|
3047
|
+
columns: dt,
|
|
3048
3048
|
defaultColumnProps: S,
|
|
3049
|
-
pinnedMap:
|
|
3050
|
-
selectionVisible:
|
|
3049
|
+
pinnedMap: _t,
|
|
3050
|
+
selectionVisible: Et,
|
|
3051
3051
|
selectorCellShadowVisible: It
|
|
3052
3052
|
})
|
|
3053
3053
|
]
|
|
3054
3054
|
}) })
|
|
3055
3055
|
}),
|
|
3056
|
-
!!(L &&
|
|
3057
|
-
className:
|
|
3058
|
-
style:
|
|
3056
|
+
!!(L && wt) && p(dr, {
|
|
3057
|
+
className: rt?.pagination,
|
|
3058
|
+
style: at?.pagination,
|
|
3059
3059
|
horizontalSpacing: I,
|
|
3060
3060
|
fetching: h,
|
|
3061
3061
|
page: L,
|
|
3062
|
-
onPageChange:
|
|
3063
|
-
totalRecords:
|
|
3064
|
-
recordsPerPage:
|
|
3065
|
-
onRecordsPerPageChange:
|
|
3066
|
-
recordsPerPageOptions:
|
|
3067
|
-
recordsPerPageLabel:
|
|
3068
|
-
paginationWithEdges:
|
|
3069
|
-
paginationWithControls:
|
|
3070
|
-
paginationActiveTextColor:
|
|
3071
|
-
paginationActiveBackgroundColor:
|
|
3072
|
-
paginationSize:
|
|
3073
|
-
paginationText:
|
|
3074
|
-
paginationWrapBreakpoint:
|
|
3075
|
-
getPaginationControlProps:
|
|
3076
|
-
getPaginationItemProps:
|
|
3077
|
-
noRecordsText:
|
|
3078
|
-
loadingText:
|
|
3079
|
-
recordsLength:
|
|
3080
|
-
renderPagination:
|
|
3062
|
+
onPageChange: Ct,
|
|
3063
|
+
totalRecords: ie,
|
|
3064
|
+
recordsPerPage: ae,
|
|
3065
|
+
onRecordsPerPageChange: oe,
|
|
3066
|
+
recordsPerPageOptions: se,
|
|
3067
|
+
recordsPerPageLabel: R,
|
|
3068
|
+
paginationWithEdges: ce,
|
|
3069
|
+
paginationWithControls: z,
|
|
3070
|
+
paginationActiveTextColor: le,
|
|
3071
|
+
paginationActiveBackgroundColor: ue,
|
|
3072
|
+
paginationSize: de,
|
|
3073
|
+
paginationText: fe,
|
|
3074
|
+
paginationWrapBreakpoint: pe,
|
|
3075
|
+
getPaginationControlProps: B,
|
|
3076
|
+
getPaginationItemProps: me,
|
|
3077
|
+
noRecordsText: Se,
|
|
3078
|
+
loadingText: be,
|
|
3079
|
+
recordsLength: wt,
|
|
3080
|
+
renderPagination: he
|
|
3081
3081
|
}),
|
|
3082
3082
|
p(sr, {
|
|
3083
3083
|
fetching: h,
|
|
3084
|
-
backgroundBlur:
|
|
3085
|
-
customContent:
|
|
3086
|
-
size:
|
|
3087
|
-
type:
|
|
3088
|
-
color:
|
|
3084
|
+
backgroundBlur: V,
|
|
3085
|
+
customContent: ge,
|
|
3086
|
+
size: _e,
|
|
3087
|
+
type: ve,
|
|
3088
|
+
color: ye
|
|
3089
3089
|
}),
|
|
3090
3090
|
p(Qt, {
|
|
3091
|
-
icon:
|
|
3092
|
-
text:
|
|
3093
|
-
active: !h && !
|
|
3094
|
-
children:
|
|
3091
|
+
icon: Ce,
|
|
3092
|
+
text: Se,
|
|
3093
|
+
active: !h && !wt,
|
|
3094
|
+
children: xe
|
|
3095
3095
|
})
|
|
3096
3096
|
]
|
|
3097
3097
|
})
|
|
@@ -3100,7 +3100,7 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
3100
3100
|
//#endregion
|
|
3101
3101
|
//#region src/DataTable/UpdateModal.tsx
|
|
3102
3102
|
function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o }) {
|
|
3103
|
-
let [c, l] = d(0), [u, h] = d(!1), { data: _, isLoading: y } = Lt(i, r, a), { mutateAsync: x, isError: S, error: C, isPending: T } = Bt(i, r), E = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], D =
|
|
3103
|
+
let [c, l] = d(0), [u, h] = d(!1), { data: _, isLoading: y } = Lt(i, r, a), { mutateAsync: x, isError: S, error: C, isPending: T } = Bt(i, r), E = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], D = V({
|
|
3104
3104
|
mode: "uncontrolled",
|
|
3105
3105
|
initialValues: e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {}),
|
|
3106
3106
|
validate: e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !(typeof t.required == "function" ? t.required(n) : t.required) || e ? null : "Pflichtfeld", e), {})
|
|
@@ -3122,7 +3122,7 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
|
|
|
3122
3122
|
if (e.conditional && !e.conditional(t)) return null;
|
|
3123
3123
|
let r = O(e, t);
|
|
3124
3124
|
return /* @__PURE__ */ m(n, { children: [
|
|
3125
|
-
(e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(
|
|
3125
|
+
(e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(le, {
|
|
3126
3126
|
label: e.column.title,
|
|
3127
3127
|
placeholder: e.placeholder ?? "",
|
|
3128
3128
|
...D.getInputProps(e.id),
|
|
@@ -3136,7 +3136,7 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
|
|
|
3136
3136
|
...D.getInputProps(e.id),
|
|
3137
3137
|
required: r
|
|
3138
3138
|
}, D.key(e.id)),
|
|
3139
|
-
e.type === "date" && /* @__PURE__ */ p(
|
|
3139
|
+
e.type === "date" && /* @__PURE__ */ p(ge, {
|
|
3140
3140
|
label: e.column.title,
|
|
3141
3141
|
placeholder: e.placeholder ?? "",
|
|
3142
3142
|
valueFormat: "DD.MM.YYYY",
|
|
@@ -3150,7 +3150,7 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
|
|
|
3150
3150
|
...D.getInputProps(e.id, { type: "checkbox" }),
|
|
3151
3151
|
required: r
|
|
3152
3152
|
}, D.key(e.id)),
|
|
3153
|
-
e.type === "textarea" && /* @__PURE__ */ p(
|
|
3153
|
+
e.type === "textarea" && /* @__PURE__ */ p(ue, {
|
|
3154
3154
|
label: e.column.title,
|
|
3155
3155
|
placeholder: e.placeholder ?? "",
|
|
3156
3156
|
...D.getInputProps(e.id),
|
|
@@ -3198,10 +3198,10 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
|
|
|
3198
3198
|
id: a
|
|
3199
3199
|
}), E.length && c < E.length - 1 ? S || l(c + 1) : S || (D.setInitialValues(n), D.reset(), t());
|
|
3200
3200
|
}),
|
|
3201
|
-
children: [E.length ? /* @__PURE__ */ p(
|
|
3201
|
+
children: [E.length ? /* @__PURE__ */ p(ne, {
|
|
3202
3202
|
active: c,
|
|
3203
3203
|
size: "sm",
|
|
3204
|
-
children: E.map((t) => /* @__PURE__ */ p(
|
|
3204
|
+
children: E.map((t) => /* @__PURE__ */ p(ne.Step, {
|
|
3205
3205
|
...o && o[t - 1] ? { label: o[t - 1].label } : {},
|
|
3206
3206
|
children: e.filter((e) => e.step === t).map((e) => k(e))
|
|
3207
3207
|
}, t))
|
|
@@ -3233,7 +3233,7 @@ function br({ queryKey: e, apiPath: t, onClose: n, selectedRecords: r, confirmMe
|
|
|
3233
3233
|
title: c.name,
|
|
3234
3234
|
children: c.message
|
|
3235
3235
|
}),
|
|
3236
|
-
/* @__PURE__ */ p(
|
|
3236
|
+
/* @__PURE__ */ p(z, { children: i ? i(u) : u.length === 1 ? `Soll ${u.length} Eintrag wirklich gelöscht werden?` : `Sollen ${u.length} Einträge wirklich gelöscht werden?` }),
|
|
3237
3237
|
/* @__PURE__ */ m(w, {
|
|
3238
3238
|
mt: "md",
|
|
3239
3239
|
justify: "end",
|
|
@@ -3344,13 +3344,13 @@ function Dr(e, t) {
|
|
|
3344
3344
|
let n = t.column;
|
|
3345
3345
|
if (n.render) return n.render(e, 0);
|
|
3346
3346
|
let r = Er(e, n.accessor ?? t.id);
|
|
3347
|
-
return r == null ? /* @__PURE__ */ p(
|
|
3347
|
+
return r == null ? /* @__PURE__ */ p(z, {
|
|
3348
3348
|
c: "dimmed",
|
|
3349
3349
|
children: "–"
|
|
3350
|
-
}) : typeof r == "boolean" ? /* @__PURE__ */ p(
|
|
3350
|
+
}) : typeof r == "boolean" ? /* @__PURE__ */ p(z, {
|
|
3351
3351
|
fz: "sm",
|
|
3352
3352
|
children: r ? "Ja" : "Nein"
|
|
3353
|
-
}) : /* @__PURE__ */ p(
|
|
3353
|
+
}) : /* @__PURE__ */ p(z, {
|
|
3354
3354
|
fz: "sm",
|
|
3355
3355
|
children: String(r)
|
|
3356
3356
|
});
|
|
@@ -3362,7 +3362,7 @@ function Or({ field: e, record: t }) {
|
|
|
3362
3362
|
align: "center",
|
|
3363
3363
|
py: "xs",
|
|
3364
3364
|
px: "sm",
|
|
3365
|
-
children: [/* @__PURE__ */ p(
|
|
3365
|
+
children: [/* @__PURE__ */ p(z, {
|
|
3366
3366
|
fw: 700,
|
|
3367
3367
|
fz: "sm",
|
|
3368
3368
|
children: e.column.title ?? e.id
|
|
@@ -3394,7 +3394,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
|
|
|
3394
3394
|
event: n
|
|
3395
3395
|
}) : r && k(e);
|
|
3396
3396
|
};
|
|
3397
|
-
return e.length === 0 ? /* @__PURE__ */ p(
|
|
3397
|
+
return e.length === 0 ? /* @__PURE__ */ p(z, {
|
|
3398
3398
|
c: "dimmed",
|
|
3399
3399
|
ta: "center",
|
|
3400
3400
|
py: "xl",
|
|
@@ -3416,7 +3416,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
|
|
|
3416
3416
|
variant: "filled",
|
|
3417
3417
|
size: "input-sm",
|
|
3418
3418
|
onClick: () => f.onSortChange(f.field, f.direction === "asc" ? "desc" : "asc"),
|
|
3419
|
-
children: f.direction === "asc" ? /* @__PURE__ */ p(
|
|
3419
|
+
children: f.direction === "asc" ? /* @__PURE__ */ p(Ce, { size: 18 }) : /* @__PURE__ */ p(we, { size: 18 })
|
|
3420
3420
|
})]
|
|
3421
3421
|
}),
|
|
3422
3422
|
e.map((e, n) => {
|
|
@@ -3450,7 +3450,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
|
|
|
3450
3450
|
onClick: (e) => {
|
|
3451
3451
|
e.stopPropagation(), C(u);
|
|
3452
3452
|
},
|
|
3453
|
-
children: /* @__PURE__ */ p(
|
|
3453
|
+
children: /* @__PURE__ */ p(ve, {
|
|
3454
3454
|
size: 16,
|
|
3455
3455
|
style: {
|
|
3456
3456
|
transform: d ? "rotate(0deg)" : "rotate(-90deg)",
|
|
@@ -3472,7 +3472,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
|
|
|
3472
3472
|
color: "gray",
|
|
3473
3473
|
size: "sm",
|
|
3474
3474
|
onClick: (e) => e.stopPropagation(),
|
|
3475
|
-
children: /* @__PURE__ */ p(
|
|
3475
|
+
children: /* @__PURE__ */ p(ye, { size: 16 })
|
|
3476
3476
|
}) }), /* @__PURE__ */ p(E.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(E.Item, {
|
|
3477
3477
|
leftSection: t.icon,
|
|
3478
3478
|
onClick: (n) => {
|
|
@@ -3510,7 +3510,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
|
|
|
3510
3510
|
}), u.recordsPerPageOptions && u.onRecordsPerPageChange && /* @__PURE__ */ m(w, {
|
|
3511
3511
|
justify: "center",
|
|
3512
3512
|
gap: "xs",
|
|
3513
|
-
children: [/* @__PURE__ */ p(
|
|
3513
|
+
children: [/* @__PURE__ */ p(z, {
|
|
3514
3514
|
fz: "xs",
|
|
3515
3515
|
c: "dimmed",
|
|
3516
3516
|
children: "Einträge pro Seite:"
|
|
@@ -3539,21 +3539,21 @@ var Ar = [
|
|
|
3539
3539
|
100,
|
|
3540
3540
|
500
|
|
3541
3541
|
];
|
|
3542
|
-
function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: u, filters: y, actions: b, steps: x, defaultSort: S, onSortChange:
|
|
3543
|
-
let [
|
|
3544
|
-
j === void 0 &&
|
|
3545
|
-
},
|
|
3542
|
+
function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: u, filters: y, actions: b, steps: x, defaultSort: S, onSortChange: w, createButtonText: T, queryParams: D, tabs: O, defaultTab: k, activeTab: j, onActiveTabChange: M, canUpdate: N, canDelete: P, showRefresh: ee = !0, rowExpansion: F, onRowClick: te, mobileCards: ne = !1, deleteConfirmMessage: re, editRecordId: ie, onEditRecordIdChange: ae }) {
|
|
3543
|
+
let [oe, se] = d(k || (O && O.length > 0 ? O[0].value : null)), R = j === void 0 ? oe : j, z = (e) => {
|
|
3544
|
+
j === void 0 && se(e), M && M(e);
|
|
3545
|
+
}, le = O?.find((e) => e.value === R), ue = le?.queryParams || {}, fe = le?.apiPath ?? r, pe = le?.mutationApiPath ?? a ?? fe, B = {
|
|
3546
3546
|
...D,
|
|
3547
|
-
...
|
|
3548
|
-
},
|
|
3547
|
+
...ue
|
|
3548
|
+
}, me = B ? "?" + Object.entries(B).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", he = R ? [...t, R] : t, { data: V, isLoading: ge, isError: ve, isRefetching: ye, refetch: Ce } = Rt(fe + me, he), { queryClient: we } = Ot();
|
|
3549
3549
|
s(() => {
|
|
3550
|
-
!
|
|
3550
|
+
!V || !Array.isArray(V) || n?.forEach((e) => we.invalidateQueries({ queryKey: e }));
|
|
3551
3551
|
}, [
|
|
3552
|
-
|
|
3552
|
+
V,
|
|
3553
3553
|
n,
|
|
3554
|
-
|
|
3554
|
+
we
|
|
3555
3555
|
]);
|
|
3556
|
-
let
|
|
3556
|
+
let Ee = !V || !Array.isArray(V) ? [] : !y || y.length === 0 ? V : V.filter((e) => y.every((t) => {
|
|
3557
3557
|
if (t.value === void 0) return !0;
|
|
3558
3558
|
let n = t.id;
|
|
3559
3559
|
if (t.type === "query") {
|
|
@@ -3585,65 +3585,92 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3585
3585
|
return !0;
|
|
3586
3586
|
} else if (t.type === "boolean") return e[n] === t.value;
|
|
3587
3587
|
return !0;
|
|
3588
|
-
})), [
|
|
3588
|
+
})), [De, Oe] = d({
|
|
3589
3589
|
columnAccessor: S?.field ?? c[0].id,
|
|
3590
3590
|
direction: S?.direction ?? "desc"
|
|
3591
|
-
}),
|
|
3592
|
-
|
|
3593
|
-
},
|
|
3591
|
+
}), ke = (e) => {
|
|
3592
|
+
Oe(e), w && w(String(e.columnAccessor), e.direction);
|
|
3593
|
+
}, H = Tr(Ee, De.columnAccessor, De.direction), [Ae, je] = xr(Ar[1], "mantine-table-page-size"), [Me, Ne] = d(1), Pe = u ? H.slice((Me - 1) * Ae, Me * Ae) : H, [U, W] = d([]);
|
|
3594
3594
|
s(() => {
|
|
3595
3595
|
W([]);
|
|
3596
|
-
}, [
|
|
3597
|
-
let [
|
|
3598
|
-
|
|
3599
|
-
|
|
3596
|
+
}, [R]);
|
|
3597
|
+
let [Fe, Ie] = d(!1), [Le, G] = d(!1), [K, Re] = d(!1);
|
|
3598
|
+
s(() => {
|
|
3599
|
+
if (ie && H.length > 0) {
|
|
3600
|
+
let e = H.find((e) => e.id === ie);
|
|
3601
|
+
e && (W([e]), G(!0), ae?.(null));
|
|
3602
|
+
}
|
|
3603
|
+
}, [ie, H]);
|
|
3604
|
+
let ze = c.some((e) => e.update), Be = c.some((e) => e.delete), q = [];
|
|
3605
|
+
return ze && q.push({
|
|
3606
|
+
icon: /* @__PURE__ */ p(xe, { size: 14 }),
|
|
3600
3607
|
label: "Bearbeiten",
|
|
3601
3608
|
onClick: (e) => {
|
|
3602
|
-
W(e),
|
|
3609
|
+
W(e), G(!0);
|
|
3603
3610
|
}
|
|
3604
|
-
}), b &&
|
|
3605
|
-
icon: /* @__PURE__ */ p(
|
|
3611
|
+
}), b && q.push(...b), Be && q.push({
|
|
3612
|
+
icon: /* @__PURE__ */ p(Te, { size: 14 }),
|
|
3606
3613
|
label: "Löschen",
|
|
3607
3614
|
onClick: (e) => {
|
|
3608
|
-
W(e),
|
|
3615
|
+
W(e), Re(!0);
|
|
3609
3616
|
}
|
|
3610
3617
|
}), /* @__PURE__ */ m(f, { children: [
|
|
3611
|
-
/* @__PURE__ */ m(
|
|
3618
|
+
/* @__PURE__ */ m(C, {
|
|
3612
3619
|
gap: "xs",
|
|
3613
|
-
|
|
3614
|
-
|
|
3620
|
+
align: {
|
|
3621
|
+
base: "stretch",
|
|
3622
|
+
sm: "center"
|
|
3623
|
+
},
|
|
3624
|
+
direction: {
|
|
3625
|
+
base: "column",
|
|
3626
|
+
sm: "row"
|
|
3627
|
+
},
|
|
3628
|
+
justify: e ? "space-between" : "flex-end",
|
|
3615
3629
|
wrap: "wrap",
|
|
3616
|
-
children: [e && (typeof e == "string" ? /* @__PURE__ */ p(
|
|
3630
|
+
children: [e && (typeof e == "string" ? /* @__PURE__ */ p(de, {
|
|
3617
3631
|
order: 4,
|
|
3618
3632
|
children: e
|
|
3619
|
-
}) : e), /* @__PURE__ */ m(
|
|
3620
|
-
align:
|
|
3633
|
+
}) : e), /* @__PURE__ */ m(C, {
|
|
3634
|
+
align: {
|
|
3635
|
+
base: "stretch",
|
|
3636
|
+
sm: "center"
|
|
3637
|
+
},
|
|
3638
|
+
direction: {
|
|
3639
|
+
base: "column",
|
|
3640
|
+
sm: "row"
|
|
3641
|
+
},
|
|
3621
3642
|
gap: "xs",
|
|
3622
3643
|
wrap: "wrap",
|
|
3623
|
-
justify:
|
|
3624
|
-
|
|
3644
|
+
justify: {
|
|
3645
|
+
base: "flex-start",
|
|
3646
|
+
sm: "flex-end"
|
|
3647
|
+
},
|
|
3648
|
+
ml: {
|
|
3649
|
+
base: 0,
|
|
3650
|
+
sm: "auto"
|
|
3651
|
+
},
|
|
3625
3652
|
children: [
|
|
3626
3653
|
ee && /* @__PURE__ */ p(h, {
|
|
3627
3654
|
variant: "subtle",
|
|
3628
|
-
onClick: () =>
|
|
3655
|
+
onClick: () => Ce(),
|
|
3629
3656
|
"aria-label": "Neuladen",
|
|
3630
|
-
children: /* @__PURE__ */ p(
|
|
3657
|
+
children: /* @__PURE__ */ p(Se, {})
|
|
3631
3658
|
}),
|
|
3632
3659
|
(c.some((e) => e.update) || l) && (() => {
|
|
3633
3660
|
let e = c.find((e) => e.update) && (!N || U.length > 0 && N(U[0])), t = c.find((e) => e.delete) && (!P || U.length > 0 && P(U[0])), n = (b ?? []).length > 0, r = e || t || n;
|
|
3634
3661
|
return /* @__PURE__ */ p(_, {
|
|
3635
|
-
...
|
|
3662
|
+
...ne ? { visibleFrom: "sm" } : {},
|
|
3636
3663
|
children: /* @__PURE__ */ m(E, {
|
|
3637
3664
|
shadow: "md",
|
|
3638
3665
|
children: [/* @__PURE__ */ p(E.Target, { children: /* @__PURE__ */ p(v, {
|
|
3639
3666
|
variant: "outline",
|
|
3640
|
-
rightSection: /* @__PURE__ */ p(
|
|
3667
|
+
rightSection: /* @__PURE__ */ p(_e, { size: 14 }),
|
|
3641
3668
|
disabled: !U.length || !r,
|
|
3642
3669
|
children: "Aktionen"
|
|
3643
3670
|
}) }), /* @__PURE__ */ m(E.Dropdown, { children: [
|
|
3644
3671
|
e && /* @__PURE__ */ p(E.Item, {
|
|
3645
|
-
leftSection: /* @__PURE__ */ p(
|
|
3646
|
-
onClick: () =>
|
|
3672
|
+
leftSection: /* @__PURE__ */ p(xe, { size: 14 }),
|
|
3673
|
+
onClick: () => G(!0),
|
|
3647
3674
|
disabled: U.length !== 1,
|
|
3648
3675
|
children: "Bearbeiten"
|
|
3649
3676
|
}),
|
|
@@ -3654,8 +3681,8 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3654
3681
|
disabled: e.disabled?.(U) ?? !1
|
|
3655
3682
|
}, e.label)),
|
|
3656
3683
|
t && /* @__PURE__ */ p(E.Item, {
|
|
3657
|
-
leftSection: /* @__PURE__ */ p(
|
|
3658
|
-
onClick: () =>
|
|
3684
|
+
leftSection: /* @__PURE__ */ p(Te, { size: 14 }),
|
|
3685
|
+
onClick: () => Re(!0),
|
|
3659
3686
|
color: "red",
|
|
3660
3687
|
children: "Löschen"
|
|
3661
3688
|
})
|
|
@@ -3664,33 +3691,33 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3664
3691
|
});
|
|
3665
3692
|
})(),
|
|
3666
3693
|
c.find((e) => e.create) && /* @__PURE__ */ p(v, {
|
|
3667
|
-
onClick: () =>
|
|
3668
|
-
disabled:
|
|
3694
|
+
onClick: () => Ie(!0),
|
|
3695
|
+
disabled: ge,
|
|
3669
3696
|
children: T ?? "Erstellen"
|
|
3670
3697
|
}),
|
|
3671
3698
|
o
|
|
3672
3699
|
]
|
|
3673
3700
|
})]
|
|
3674
3701
|
}),
|
|
3675
|
-
O && O.length > 0 && /* @__PURE__ */ p(
|
|
3676
|
-
value:
|
|
3677
|
-
onChange:
|
|
3702
|
+
O && O.length > 0 && /* @__PURE__ */ p(ce, {
|
|
3703
|
+
value: R,
|
|
3704
|
+
onChange: z,
|
|
3678
3705
|
mt: "md",
|
|
3679
|
-
children: /* @__PURE__ */ p(
|
|
3706
|
+
children: /* @__PURE__ */ p(ce.List, { children: O.map((e) => /* @__PURE__ */ p(ce.Tab, {
|
|
3680
3707
|
value: e.value,
|
|
3681
3708
|
leftSection: e.icon,
|
|
3682
3709
|
children: e.label
|
|
3683
3710
|
}, e.value)) })
|
|
3684
3711
|
}),
|
|
3685
|
-
|
|
3712
|
+
ve && /* @__PURE__ */ p(g, {
|
|
3686
3713
|
mt: "md",
|
|
3687
3714
|
variant: "light",
|
|
3688
3715
|
color: "red",
|
|
3689
3716
|
title: "Es ist ein Fehler aufgetreten.",
|
|
3690
|
-
icon: /* @__PURE__ */ p(
|
|
3717
|
+
icon: /* @__PURE__ */ p(be, {}),
|
|
3691
3718
|
children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
|
|
3692
3719
|
}),
|
|
3693
|
-
(
|
|
3720
|
+
(ge || ye) && /* @__PURE__ */ m(L, {
|
|
3694
3721
|
my: "md",
|
|
3695
3722
|
children: [/* @__PURE__ */ p(I, { height: 40 }), [
|
|
3696
3723
|
,
|
|
@@ -3700,28 +3727,28 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3700
3727
|
,
|
|
3701
3728
|
].fill(0).map((e, t) => /* @__PURE__ */ p(I, { height: 35 }, `skeleton-${t}`))]
|
|
3702
3729
|
}),
|
|
3703
|
-
!
|
|
3704
|
-
...
|
|
3730
|
+
!ge && !ye && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(_, {
|
|
3731
|
+
...ne ? { visibleFrom: "sm" } : {},
|
|
3705
3732
|
children: /* @__PURE__ */ p(vr, {
|
|
3706
3733
|
my: "md",
|
|
3707
3734
|
striped: !0,
|
|
3708
3735
|
highlightOnHover: !0,
|
|
3709
3736
|
minHeight: 150,
|
|
3710
|
-
fetching:
|
|
3711
|
-
records:
|
|
3712
|
-
sortStatus:
|
|
3713
|
-
onSortStatusChange:
|
|
3737
|
+
fetching: ve,
|
|
3738
|
+
records: Pe,
|
|
3739
|
+
sortStatus: De,
|
|
3740
|
+
onSortStatusChange: ke,
|
|
3714
3741
|
...l && {
|
|
3715
3742
|
selectedRecords: U,
|
|
3716
3743
|
onSelectedRecordsChange: W
|
|
3717
3744
|
},
|
|
3718
|
-
...u &&
|
|
3719
|
-
totalRecords:
|
|
3720
|
-
recordsPerPage:
|
|
3721
|
-
onPageChange:
|
|
3722
|
-
page:
|
|
3745
|
+
...u && Pe.length && {
|
|
3746
|
+
totalRecords: H.length,
|
|
3747
|
+
recordsPerPage: Ae,
|
|
3748
|
+
onPageChange: Ne,
|
|
3749
|
+
page: Me,
|
|
3723
3750
|
recordsPerPageOptions: Ar,
|
|
3724
|
-
onRecordsPerPageChange:
|
|
3751
|
+
onRecordsPerPageChange: je,
|
|
3725
3752
|
recordsPerPageLabel: "Einträge pro Seite"
|
|
3726
3753
|
},
|
|
3727
3754
|
...F && { rowExpansion: {
|
|
@@ -3734,87 +3761,87 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3734
3761
|
onRowClick: te,
|
|
3735
3762
|
...te && { style: { cursor: "pointer" } }
|
|
3736
3763
|
})
|
|
3737
|
-
}),
|
|
3764
|
+
}), ne && /* @__PURE__ */ p(_, {
|
|
3738
3765
|
hiddenFrom: "sm",
|
|
3739
3766
|
children: /* @__PURE__ */ p(kr, {
|
|
3740
|
-
records:
|
|
3767
|
+
records: Pe,
|
|
3741
3768
|
fields: c,
|
|
3742
3769
|
selection: l,
|
|
3743
3770
|
selectedRecords: U,
|
|
3744
3771
|
onSelectedRecordsChange: W,
|
|
3745
3772
|
onRowClick: te,
|
|
3746
3773
|
sort: {
|
|
3747
|
-
field: String(
|
|
3748
|
-
direction:
|
|
3774
|
+
field: String(De.columnAccessor),
|
|
3775
|
+
direction: De.direction,
|
|
3749
3776
|
onSortChange: (e, t) => {
|
|
3750
|
-
|
|
3777
|
+
ke({
|
|
3751
3778
|
columnAccessor: e,
|
|
3752
3779
|
direction: t
|
|
3753
3780
|
});
|
|
3754
3781
|
}
|
|
3755
3782
|
},
|
|
3756
|
-
...u &&
|
|
3757
|
-
totalRecords:
|
|
3758
|
-
recordsPerPage:
|
|
3759
|
-
page:
|
|
3760
|
-
onPageChange:
|
|
3783
|
+
...u && Pe.length && { pagination: {
|
|
3784
|
+
totalRecords: H.length,
|
|
3785
|
+
recordsPerPage: Ae,
|
|
3786
|
+
page: Me,
|
|
3787
|
+
onPageChange: Ne,
|
|
3761
3788
|
recordsPerPageOptions: Ar,
|
|
3762
3789
|
onRecordsPerPageChange: (e) => {
|
|
3763
|
-
|
|
3790
|
+
je(e), Ne(1);
|
|
3764
3791
|
}
|
|
3765
3792
|
} },
|
|
3766
3793
|
...F && { rowExpansion: { content: F.content } },
|
|
3767
|
-
...
|
|
3768
|
-
actions:
|
|
3794
|
+
...q.length > 0 && {
|
|
3795
|
+
actions: q,
|
|
3769
3796
|
canUpdate: N,
|
|
3770
3797
|
canDelete: P
|
|
3771
3798
|
}
|
|
3772
3799
|
})
|
|
3773
3800
|
})] }),
|
|
3774
3801
|
/* @__PURE__ */ p(A, {
|
|
3775
|
-
opened:
|
|
3802
|
+
opened: Le,
|
|
3776
3803
|
onClose: () => {
|
|
3777
|
-
|
|
3804
|
+
G(!1), W([]);
|
|
3778
3805
|
},
|
|
3779
3806
|
title: e ?? "Bearbeiten",
|
|
3780
3807
|
children: U.length > 0 && /* @__PURE__ */ p(yr, {
|
|
3781
3808
|
fields: c.filter((e) => e.update),
|
|
3782
3809
|
queryKey: t,
|
|
3783
|
-
apiPath:
|
|
3810
|
+
apiPath: pe,
|
|
3784
3811
|
id: U[0].id,
|
|
3785
3812
|
onClose: () => {
|
|
3786
|
-
|
|
3813
|
+
G(!1), W([]);
|
|
3787
3814
|
},
|
|
3788
3815
|
steps: x
|
|
3789
3816
|
})
|
|
3790
3817
|
}),
|
|
3791
3818
|
U.length > 0 && /* @__PURE__ */ p(A, {
|
|
3792
|
-
opened:
|
|
3819
|
+
opened: K,
|
|
3793
3820
|
onClose: () => {
|
|
3794
|
-
|
|
3821
|
+
Re(!1), W([]);
|
|
3795
3822
|
},
|
|
3796
3823
|
title: e ?? "Löschen",
|
|
3797
3824
|
children: /* @__PURE__ */ p(br, {
|
|
3798
3825
|
onClose: () => {
|
|
3799
|
-
|
|
3826
|
+
Re(!1), W([]);
|
|
3800
3827
|
},
|
|
3801
3828
|
queryKey: t,
|
|
3802
|
-
apiPath:
|
|
3829
|
+
apiPath: pe,
|
|
3803
3830
|
selectedRecords: U,
|
|
3804
|
-
confirmMessage:
|
|
3831
|
+
confirmMessage: re
|
|
3805
3832
|
})
|
|
3806
3833
|
}),
|
|
3807
3834
|
/* @__PURE__ */ p(A, {
|
|
3808
|
-
opened:
|
|
3835
|
+
opened: Fe,
|
|
3809
3836
|
onClose: () => {
|
|
3810
|
-
|
|
3837
|
+
Ie(!1);
|
|
3811
3838
|
},
|
|
3812
3839
|
title: e ?? "Anlegen",
|
|
3813
3840
|
children: /* @__PURE__ */ p(Ht, {
|
|
3814
3841
|
queryKey: t,
|
|
3815
|
-
apiPath:
|
|
3842
|
+
apiPath: pe,
|
|
3816
3843
|
onClose: () => {
|
|
3817
|
-
|
|
3844
|
+
Ie(!1);
|
|
3818
3845
|
},
|
|
3819
3846
|
fields: c.filter((e) => e.create),
|
|
3820
3847
|
steps: x
|
|
@@ -3828,6 +3855,6 @@ function Mr(e) {
|
|
|
3828
3855
|
return /* @__PURE__ */ p(jr, { ...e });
|
|
3829
3856
|
}
|
|
3830
3857
|
//#endregion
|
|
3831
|
-
export { Ht as CreateModal, Mr as DataTable,
|
|
3858
|
+
export { Ht as CreateModal, Mr as DataTable, Dt as DataTableProvider, br as DeleteModal, kr as MobileCardList, yr as UpdateModal, Ft as api, Pt as createOne, Nt as deleteOne, jt as getAll, Mt as getOne, kt as parseApiError, Tr as sortData, It as updateOne, zt as useAddOne, Ot as useDataTable, Vt as useDeleteOne, Rt as useGetAll, Lt as useGetOne, xr as usePersistentState, Bt as useUpdateOne };
|
|
3832
3859
|
|
|
3833
3860
|
//# sourceMappingURL=index.es.js.map
|