@espresso-lab/mantine-data-table 2.2.7 → 2.2.8
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/DataTable.d.ts +2 -1
- package/dist/index.es.js +784 -759
- 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,13 +1,13 @@
|
|
|
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 { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T,
|
|
4
|
+
import { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T, HoverCard 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 te, PopoverTarget as I, ScrollArea as L, Select as ne, Skeleton as R, Stack as re, Stepper as ie, Table as z, TableTd as B, TableTfoot as ae, TableTh as oe, TableThead as se, TableTr as ce, Tabs as le, Text as V, TextInput as ue, Textarea as de, Title as fe, createSafeContext as pe, parseThemeColor as me, rem as H, useDirection as he, useMantineTheme as ge } from "@mantine/core";
|
|
5
5
|
import { DateInput as _e } from "@mantine/dates";
|
|
6
6
|
import { useForm as ve } from "@mantine/form";
|
|
7
7
|
import { IconCaretDownFilled as ye, IconChevronRight as be, IconDotsVertical as xe, IconFilter as Se, IconInfoCircle as Ce, IconPencil as we, IconRefresh as Te, IconSortAscending as Ee, IconSortDescending as De, IconTrash as Oe } from "@tabler/icons-react";
|
|
8
8
|
import { useClickOutside as ke, useDisclosure as Ae, useLocalStorage as je, useMediaQuery as Me, useMergedRef as Ne, useTimeout as Pe } from "@mantine/hooks";
|
|
9
9
|
//#region node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
10
|
-
var
|
|
10
|
+
var Fe = class {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
13
13
|
}
|
|
@@ -21,7 +21,7 @@ var H = class {
|
|
|
21
21
|
}
|
|
22
22
|
onSubscribe() {}
|
|
23
23
|
onUnsubscribe() {}
|
|
24
|
-
},
|
|
24
|
+
}, Ie = new class extends Fe {
|
|
25
25
|
#e;
|
|
26
26
|
#t;
|
|
27
27
|
#n;
|
|
@@ -58,13 +58,13 @@ var H = class {
|
|
|
58
58
|
isFocused() {
|
|
59
59
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
60
60
|
}
|
|
61
|
-
}(),
|
|
61
|
+
}(), Le = {
|
|
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
|
+
}, Re = new class {
|
|
67
|
+
#e = Le;
|
|
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,87 +85,87 @@ var H = class {
|
|
|
85
85
|
this.#e.clearInterval(e);
|
|
86
86
|
}
|
|
87
87
|
}();
|
|
88
|
-
function
|
|
88
|
+
function ze(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
|
|
94
|
-
function
|
|
95
|
-
function
|
|
93
|
+
var Be = typeof window > "u" || "Deno" in globalThis;
|
|
94
|
+
function Ve() {}
|
|
95
|
+
function He(e) {
|
|
96
96
|
return typeof e == "number" && e >= 0 && e !== Infinity;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Ue(e, t) {
|
|
99
99
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function We(e, t) {
|
|
102
102
|
return typeof e == "function" ? e(t) : e;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function U(e, t) {
|
|
105
105
|
return typeof e == "function" ? e(t) : e;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
return JSON.stringify(e, (e, t) =>
|
|
107
|
+
function Ge(e) {
|
|
108
|
+
return JSON.stringify(e, (e, t) => Ye(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
110
|
+
var Ke = Object.prototype.hasOwnProperty;
|
|
111
|
+
function W(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 = Je(e) && Je(t);
|
|
115
|
+
if (!r && !(Ye(e) && Ye(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];
|
|
119
119
|
if (u === d) {
|
|
120
|
-
s[o] = u, (r ? l < i :
|
|
120
|
+
s[o] = u, (r ? l < i : Ke.call(e, o)) && c++;
|
|
121
121
|
continue;
|
|
122
122
|
}
|
|
123
123
|
if (u === null || d === null || typeof u != "object" || typeof d != "object") {
|
|
124
124
|
s[o] = d;
|
|
125
125
|
continue;
|
|
126
126
|
}
|
|
127
|
-
let f =
|
|
127
|
+
let f = W(u, d, n + 1);
|
|
128
128
|
s[o] = f, f === u && c++;
|
|
129
129
|
}
|
|
130
130
|
return i === o && c === i ? e : s;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function qe(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 Je(e) {
|
|
138
138
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
if (!
|
|
140
|
+
function Ye(e) {
|
|
141
|
+
if (!Xe(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 !(!Xe(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Xe(e) {
|
|
148
148
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function G(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 {
|
|
154
|
-
return
|
|
154
|
+
return W(e, t);
|
|
155
155
|
} catch (e) {
|
|
156
156
|
throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`), e;
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return W(e, t);
|
|
159
159
|
}
|
|
160
160
|
return t;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function K(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 Ze = /* @__PURE__ */ (() => {
|
|
168
|
+
let e = () => Be;
|
|
169
169
|
return {
|
|
170
170
|
isServer() {
|
|
171
171
|
return e();
|
|
@@ -177,7 +177,7 @@ var Xe = /* @__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 Ze() {
|
|
|
199
199
|
}
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
202
|
-
var
|
|
203
|
-
function
|
|
202
|
+
var $e = ze;
|
|
203
|
+
function et() {
|
|
204
204
|
let e = [], t = 0, n = (e) => {
|
|
205
205
|
e();
|
|
206
206
|
}, r = (e) => {
|
|
207
207
|
e();
|
|
208
|
-
}, i =
|
|
208
|
+
}, i = $e, a = (r) => {
|
|
209
209
|
t ? e.push(r) : i(() => {
|
|
210
210
|
n(r);
|
|
211
211
|
});
|
|
@@ -247,7 +247,7 @@ function $e() {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
var
|
|
250
|
+
var tt = et(), nt = new class extends Fe {
|
|
251
251
|
#e = !0;
|
|
252
252
|
#t;
|
|
253
253
|
#n;
|
|
@@ -281,16 +281,16 @@ var et = $e(), tt = new class extends H {
|
|
|
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 rt(e) {
|
|
285
|
+
return (e ?? "online") === "online" ? nt.isOnline() : !0;
|
|
286
286
|
}
|
|
287
287
|
//#endregion
|
|
288
288
|
//#region node_modules/@tanstack/query-core/build/modern/query.js
|
|
289
|
-
function
|
|
289
|
+
function it(e, t) {
|
|
290
290
|
return {
|
|
291
291
|
fetchFailureCount: 0,
|
|
292
292
|
fetchFailureReason: null,
|
|
293
|
-
fetchStatus:
|
|
293
|
+
fetchStatus: rt(t.networkMode) ? "fetching" : "paused",
|
|
294
294
|
...e === void 0 && {
|
|
295
295
|
error: null,
|
|
296
296
|
status: "pending"
|
|
@@ -299,9 +299,9 @@ function rt(e, t) {
|
|
|
299
299
|
}
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
302
|
-
var
|
|
302
|
+
var at = class extends Fe {
|
|
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;
|
|
@@ -338,20 +338,20 @@ var it = class extends H {
|
|
|
338
338
|
}
|
|
339
339
|
setOptions(e) {
|
|
340
340
|
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 && !
|
|
341
|
+
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof U(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 && !qe(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 && ct(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n ||
|
|
348
|
+
r && ct(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || U(this.options.enabled, this.#t) !== U(t.enabled, this.#t) || We(this.options.staleTime, this.#t) !== We(t.staleTime, this.#t)) && this.#g();
|
|
349
349
|
let i = this.#_();
|
|
350
|
-
r && (this.#t !== n ||
|
|
350
|
+
r && (this.#t !== n || U(this.options.enabled, this.#t) !== U(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 J(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;
|
|
@@ -381,14 +381,14 @@ var it = class extends H {
|
|
|
381
381
|
#h(e) {
|
|
382
382
|
this.#S();
|
|
383
383
|
let t = this.#t.fetch(this.options, e);
|
|
384
|
-
return e?.throwOnError || (t = t.catch(
|
|
384
|
+
return e?.throwOnError || (t = t.catch(Ve)), t;
|
|
385
385
|
}
|
|
386
386
|
#g() {
|
|
387
387
|
this.#b();
|
|
388
|
-
let e =
|
|
389
|
-
if (
|
|
390
|
-
let t =
|
|
391
|
-
this.#d =
|
|
388
|
+
let e = We(this.options.staleTime, this.#t);
|
|
389
|
+
if (Ze.isServer() || this.#r.isStale || !He(e)) return;
|
|
390
|
+
let t = Ue(this.#r.dataUpdatedAt, e) + 1;
|
|
391
|
+
this.#d = Re.setTimeout(() => {
|
|
392
392
|
this.#r.isStale || this.updateResult();
|
|
393
393
|
}, t);
|
|
394
394
|
}
|
|
@@ -396,18 +396,18 @@ var it = class extends H {
|
|
|
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, !(
|
|
400
|
-
(this.options.refetchIntervalInBackground ||
|
|
399
|
+
this.#x(), this.#p = e, !(Ze.isServer() || U(this.options.enabled, this.#t) === !1 || !He(this.#p) || this.#p === 0) && (this.#f = Re.setInterval(() => {
|
|
400
|
+
(this.options.refetchIntervalInBackground || Ie.isFocused()) && this.#h();
|
|
401
401
|
}, this.#p));
|
|
402
402
|
}
|
|
403
403
|
#y() {
|
|
404
404
|
this.#g(), this.#v(this.#_());
|
|
405
405
|
}
|
|
406
406
|
#b() {
|
|
407
|
-
this.#d !== void 0 && (
|
|
407
|
+
this.#d !== void 0 && (Re.clearTimeout(this.#d), this.#d = void 0);
|
|
408
408
|
}
|
|
409
409
|
#x() {
|
|
410
|
-
this.#f !== void 0 && (
|
|
410
|
+
this.#f !== void 0 && (Re.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;
|
|
@@ -415,7 +415,7 @@ var it = class extends H {
|
|
|
415
415
|
let i = this.hasListeners(), a = !i && ot(e, t), o = i && ct(e, n, t, r);
|
|
416
416
|
(a || o) && (l = {
|
|
417
417
|
...l,
|
|
418
|
-
...
|
|
418
|
+
...it(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 it = class extends H {
|
|
|
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 = G(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 = G(i?.data, d, t), this.#l = d, this.#s = null;
|
|
431
431
|
} catch (e) {
|
|
432
432
|
this.#s = e;
|
|
433
433
|
}
|
|
@@ -458,13 +458,13 @@ var it = class extends H {
|
|
|
458
458
|
isStale: lt(e, t),
|
|
459
459
|
refetch: this.refetch,
|
|
460
460
|
promise: this.#o,
|
|
461
|
-
isEnabled:
|
|
461
|
+
isEnabled: U(t.enabled, e) !== !1
|
|
462
462
|
};
|
|
463
463
|
if (this.options.experimental_prefetchInRender) {
|
|
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 it = class extends H {
|
|
|
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), !qe(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 it = class extends H {
|
|
|
503
503
|
this.updateResult(), this.hasListeners() && this.#y();
|
|
504
504
|
}
|
|
505
505
|
#C(e) {
|
|
506
|
-
|
|
506
|
+
tt.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 it = class extends H {
|
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
|
-
function
|
|
517
|
-
return
|
|
516
|
+
function q(e, t) {
|
|
517
|
+
return U(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && U(t.retryOnMount, e) === !1);
|
|
518
518
|
}
|
|
519
519
|
function ot(e, t) {
|
|
520
|
-
return
|
|
520
|
+
return q(e, t) || e.state.data !== void 0 && st(e, t, t.refetchOnMount);
|
|
521
521
|
}
|
|
522
522
|
function st(e, t, n) {
|
|
523
|
-
if (
|
|
523
|
+
if (U(t.enabled, e) !== !1 && We(t.staleTime, e) !== "static") {
|
|
524
524
|
let r = typeof n == "function" ? n(e) : n;
|
|
525
525
|
return r === "always" || r !== !1 && lt(e, t);
|
|
526
526
|
}
|
|
527
527
|
return !1;
|
|
528
528
|
}
|
|
529
529
|
function ct(e, t, n, r) {
|
|
530
|
-
return (e !== t ||
|
|
530
|
+
return (e !== t || U(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && lt(e, n);
|
|
531
531
|
}
|
|
532
532
|
function lt(e, t) {
|
|
533
|
-
return
|
|
533
|
+
return U(t.enabled, e) !== !1 && e.isStaleByTime(We(t.staleTime, e));
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
return !
|
|
535
|
+
function J(e, t) {
|
|
536
|
+
return !qe(e.getCurrentResult(), t);
|
|
537
537
|
}
|
|
538
538
|
//#endregion
|
|
539
539
|
//#region node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
540
|
-
function
|
|
540
|
+
function ut() {
|
|
541
541
|
return {
|
|
542
542
|
context: void 0,
|
|
543
543
|
data: void 0,
|
|
@@ -552,7 +552,7 @@ function q() {
|
|
|
552
552
|
}
|
|
553
553
|
//#endregion
|
|
554
554
|
//#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
|
|
555
|
-
var
|
|
555
|
+
var Y = class extends Fe {
|
|
556
556
|
#e;
|
|
557
557
|
#t = void 0;
|
|
558
558
|
#n;
|
|
@@ -565,11 +565,11 @@ var dt = class extends H {
|
|
|
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), qe(this.options, t) || this.#e.getMutationCache().notify({
|
|
569
569
|
type: "observerOptionsUpdated",
|
|
570
570
|
mutation: this.#n,
|
|
571
571
|
observer: this
|
|
572
|
-
}), t?.mutationKey && this.options.mutationKey &&
|
|
572
|
+
}), t?.mutationKey && this.options.mutationKey && Ge(t.mutationKey) !== Ge(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
|
|
573
573
|
}
|
|
574
574
|
onUnsubscribe() {
|
|
575
575
|
this.hasListeners() || this.#n?.removeObserver(this);
|
|
@@ -587,7 +587,7 @@ var dt = class extends H {
|
|
|
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 ?? ut();
|
|
591
591
|
this.#t = {
|
|
592
592
|
...e,
|
|
593
593
|
isPending: e.status === "pending",
|
|
@@ -599,7 +599,7 @@ var dt = class extends H {
|
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
601
|
#a(e) {
|
|
602
|
-
|
|
602
|
+
tt.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,14 +635,14 @@ var dt = class extends H {
|
|
|
635
635
|
});
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
|
-
},
|
|
639
|
-
let n = e.useContext(
|
|
638
|
+
}, dt = e.createContext(void 0), ft = (t) => {
|
|
639
|
+
let n = e.useContext(dt);
|
|
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
|
}, pt = ({ client: t, children: n }) => (e.useEffect(() => (t.mount(), () => {
|
|
644
644
|
t.unmount();
|
|
645
|
-
}), [t]), /* @__PURE__ */ p(
|
|
645
|
+
}), [t]), /* @__PURE__ */ p(dt.Provider, {
|
|
646
646
|
value: t,
|
|
647
647
|
children: n
|
|
648
648
|
})), mt = e.createContext(!1), ht = () => e.useContext(mt);
|
|
@@ -662,13 +662,13 @@ function gt() {
|
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
664
|
var _t = e.createContext(gt()), vt = () => e.useContext(_t), yt = (e, t, n) => {
|
|
665
|
-
let r = n?.state.error && typeof e.throwOnError == "function" ?
|
|
665
|
+
let r = n?.state.error && typeof e.throwOnError == "function" ? K(e.throwOnError, [n.state.error, n]) : e.throwOnError;
|
|
666
666
|
(e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
|
|
667
667
|
}, bt = (t) => {
|
|
668
668
|
e.useEffect(() => {
|
|
669
669
|
t.clearReset();
|
|
670
670
|
}, [t]);
|
|
671
|
-
}, xt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 ||
|
|
671
|
+
}, xt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || K(n, [e.error, r])), St = (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));
|
|
@@ -688,7 +688,7 @@ function Et(t, n, r) {
|
|
|
688
688
|
s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, St(s), yt(s, a, c), bt(a);
|
|
689
689
|
let u = !o.getQueryCache().get(s.queryHash), [d] = e.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
|
|
690
690
|
if (e.useSyncExternalStore(e.useCallback((e) => {
|
|
691
|
-
let t = p ? d.subscribe(
|
|
691
|
+
let t = p ? d.subscribe(tt.batchCalls(e)) : Ve;
|
|
692
692
|
return d.updateResult(), t;
|
|
693
693
|
}, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), e.useEffect(() => {
|
|
694
694
|
d.setOptions(s);
|
|
@@ -700,26 +700,26 @@ function Et(t, n, r) {
|
|
|
700
700
|
query: c,
|
|
701
701
|
suspense: s.suspense
|
|
702
702
|
})) throw f.error;
|
|
703
|
-
return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !
|
|
703
|
+
return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !Ze.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(Ve).finally(() => {
|
|
704
704
|
d.updateResult();
|
|
705
705
|
}), s.notifyOnChangeProps ? f : d.trackResult(f);
|
|
706
706
|
}
|
|
707
707
|
//#endregion
|
|
708
708
|
//#region node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
709
709
|
function Dt(e, t) {
|
|
710
|
-
return Et(e,
|
|
710
|
+
return Et(e, at, t);
|
|
711
711
|
}
|
|
712
712
|
//#endregion
|
|
713
713
|
//#region node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
714
714
|
function Ot(t, n) {
|
|
715
|
-
let r = ft(n), [i] = e.useState(() => new
|
|
715
|
+
let r = ft(n), [i] = e.useState(() => new Y(r, t));
|
|
716
716
|
e.useEffect(() => {
|
|
717
717
|
i.setOptions(t);
|
|
718
718
|
}, [i, t]);
|
|
719
|
-
let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(
|
|
720
|
-
i.mutate(e, t).catch(
|
|
719
|
+
let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(tt.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
|
|
720
|
+
i.mutate(e, t).catch(Ve);
|
|
721
721
|
}, [i]);
|
|
722
|
-
if (a.error &&
|
|
722
|
+
if (a.error && K(i.options.throwOnError, [a.error])) throw a.error;
|
|
723
723
|
return {
|
|
724
724
|
...a,
|
|
725
725
|
mutate: o,
|
|
@@ -744,178 +744,178 @@ function jt({ children: e, baseUrl: t, queryClient: n, getHeaders: r = At }) {
|
|
|
744
744
|
}
|
|
745
745
|
//#endregion
|
|
746
746
|
//#region src/Hooks/useDataTable.ts
|
|
747
|
-
function
|
|
747
|
+
function Mt() {
|
|
748
748
|
let e = o(kt);
|
|
749
749
|
if (!e) throw Error("useDataTable must be used within a DataTableProvider");
|
|
750
750
|
return e;
|
|
751
751
|
}
|
|
752
752
|
//#endregion
|
|
753
753
|
//#region src/Hooks/useApi.ts
|
|
754
|
-
var
|
|
754
|
+
var Nt = class extends Error {
|
|
755
755
|
status;
|
|
756
756
|
violations;
|
|
757
757
|
constructor(e, t, n) {
|
|
758
758
|
super(e), this.name = "ApiError", this.status = t, this.violations = n;
|
|
759
759
|
}
|
|
760
760
|
};
|
|
761
|
-
function
|
|
762
|
-
return e instanceof
|
|
761
|
+
function Pt(e) {
|
|
762
|
+
return e instanceof Nt ? e.violations : void 0;
|
|
763
763
|
}
|
|
764
|
-
async function
|
|
764
|
+
async function Ft(e, t) {
|
|
765
765
|
let n = await fetch(e, t);
|
|
766
766
|
if (n.status >= 400) {
|
|
767
767
|
let e = await n.text();
|
|
768
|
-
if (!e) throw new
|
|
768
|
+
if (!e) throw new Nt(`HTTP ${n.status}: ${n.statusText}`, n.status);
|
|
769
769
|
let t = null;
|
|
770
770
|
try {
|
|
771
771
|
t = JSON.parse(e);
|
|
772
772
|
} catch {
|
|
773
|
-
throw new
|
|
773
|
+
throw new Nt(e, n.status);
|
|
774
774
|
}
|
|
775
775
|
let r = Array.isArray(t?.violations) ? t.violations.filter((e) => e?.field && e?.message).map((e) => ({
|
|
776
776
|
field: String(e.field),
|
|
777
777
|
message: String(e.message)
|
|
778
778
|
})) : void 0;
|
|
779
|
-
throw new
|
|
779
|
+
throw new Nt(t?.message ?? t?.error ?? t?.title ?? e, n.status, r);
|
|
780
780
|
}
|
|
781
781
|
return n;
|
|
782
782
|
}
|
|
783
|
-
var
|
|
784
|
-
async function
|
|
785
|
-
return (await
|
|
783
|
+
var It = (e) => e.map((e) => e.toString());
|
|
784
|
+
async function Lt(e, t) {
|
|
785
|
+
return (await Ft(e, {
|
|
786
786
|
method: "GET",
|
|
787
787
|
headers: await t()
|
|
788
788
|
})).json();
|
|
789
789
|
}
|
|
790
|
-
async function
|
|
791
|
-
return (await
|
|
790
|
+
async function Rt(e, t, n) {
|
|
791
|
+
return (await Ft(`${e}/${t}`, {
|
|
792
792
|
method: "GET",
|
|
793
793
|
headers: await n()
|
|
794
794
|
})).json();
|
|
795
795
|
}
|
|
796
|
-
async function
|
|
797
|
-
await
|
|
796
|
+
async function zt(e, t, n) {
|
|
797
|
+
await Ft(`${e}/${t}`, {
|
|
798
798
|
method: "DELETE",
|
|
799
799
|
headers: await n()
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
|
-
async function
|
|
803
|
-
let r = await
|
|
802
|
+
async function Bt(e, t, n) {
|
|
803
|
+
let r = await Ft(e, {
|
|
804
804
|
method: "POST",
|
|
805
805
|
headers: await n(),
|
|
806
806
|
body: JSON.stringify(t)
|
|
807
807
|
});
|
|
808
808
|
return r.status === 204 ? t : r.json();
|
|
809
809
|
}
|
|
810
|
-
async function
|
|
811
|
-
let i = await
|
|
810
|
+
async function Vt(e, t, n, r) {
|
|
811
|
+
let i = await Ft(t, {
|
|
812
812
|
method: e,
|
|
813
813
|
headers: await n(),
|
|
814
814
|
body: r ? JSON.stringify(r) : void 0
|
|
815
815
|
});
|
|
816
816
|
if (i.status !== 204) return i.json();
|
|
817
817
|
}
|
|
818
|
-
async function
|
|
819
|
-
let r = await
|
|
818
|
+
async function Ht(e, t, n) {
|
|
819
|
+
let r = await Ft(`${e}/${t.id}`, {
|
|
820
820
|
method: "PUT",
|
|
821
821
|
headers: await n(),
|
|
822
822
|
body: JSON.stringify(t)
|
|
823
823
|
});
|
|
824
824
|
return r.status === 204 ? t : r.json();
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
let { baseUrl: r, getHeaders: i } =
|
|
826
|
+
function Ut(e, t, n) {
|
|
827
|
+
let { baseUrl: r, getHeaders: i } = Mt();
|
|
828
828
|
return Dt({
|
|
829
|
-
queryKey: [...
|
|
830
|
-
queryFn: () =>
|
|
829
|
+
queryKey: [...It(t), String(n?.toString())],
|
|
830
|
+
queryFn: () => Rt(`${r}${e}`, n, i),
|
|
831
831
|
enabled: !!n
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
|
-
function
|
|
835
|
-
let { baseUrl: r, getHeaders: i } =
|
|
834
|
+
function Wt(e, t, n = !0) {
|
|
835
|
+
let { baseUrl: r, getHeaders: i } = Mt();
|
|
836
836
|
return Dt({
|
|
837
|
-
queryKey:
|
|
838
|
-
queryFn: () =>
|
|
837
|
+
queryKey: It(t),
|
|
838
|
+
queryFn: () => Lt(`${r}${e}`, i),
|
|
839
839
|
enabled: n
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
|
-
function Wt(e, t, n) {
|
|
843
|
-
return Promise.all([e.invalidateQueries({ queryKey: Ft(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
|
|
844
|
-
}
|
|
845
842
|
function Gt(e, t, n) {
|
|
846
|
-
|
|
847
|
-
return Ot({
|
|
848
|
-
mutationKey: Ft(t),
|
|
849
|
-
mutationFn: (t) => zt(`${r}${e}`, t, a),
|
|
850
|
-
onSettled: () => Wt(i, t, n)
|
|
851
|
-
});
|
|
843
|
+
return Promise.all([e.invalidateQueries({ queryKey: It(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
|
|
852
844
|
}
|
|
853
845
|
function Kt(e, t, n) {
|
|
854
|
-
let { baseUrl: r, queryClient: i, getHeaders: a } =
|
|
846
|
+
let { baseUrl: r, queryClient: i, getHeaders: a } = Mt();
|
|
855
847
|
return Ot({
|
|
856
|
-
mutationKey:
|
|
857
|
-
mutationFn: (t) =>
|
|
858
|
-
onSettled: () =>
|
|
848
|
+
mutationKey: It(t),
|
|
849
|
+
mutationFn: (t) => Bt(`${r}${e}`, t, a),
|
|
850
|
+
onSettled: () => Gt(i, t, n)
|
|
859
851
|
});
|
|
860
852
|
}
|
|
861
853
|
function qt(e, t, n) {
|
|
862
|
-
let { baseUrl: r, queryClient: i, getHeaders: a } =
|
|
854
|
+
let { baseUrl: r, queryClient: i, getHeaders: a } = Mt();
|
|
863
855
|
return Ot({
|
|
864
|
-
mutationKey:
|
|
865
|
-
mutationFn: (t) =>
|
|
866
|
-
onSettled: () =>
|
|
856
|
+
mutationKey: It(t),
|
|
857
|
+
mutationFn: (t) => Ht(`${r}${e}`, t, a),
|
|
858
|
+
onSettled: () => Gt(i, t, n)
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
function Jt(e, t, n) {
|
|
862
|
+
let { baseUrl: r, queryClient: i, getHeaders: a } = Mt();
|
|
863
|
+
return Ot({
|
|
864
|
+
mutationKey: It(t),
|
|
865
|
+
mutationFn: (t) => zt(`${r}${e}`, t, a),
|
|
866
|
+
onSettled: () => Gt(i, t, n)
|
|
867
867
|
});
|
|
868
868
|
}
|
|
869
869
|
//#endregion
|
|
870
870
|
//#region src/DataTable/EntityForm.tsx
|
|
871
|
-
function
|
|
871
|
+
function Yt(e, t) {
|
|
872
872
|
return typeof e.required == "function" ? e.required(t) : !!e.required;
|
|
873
873
|
}
|
|
874
|
-
function Yt(e) {
|
|
875
|
-
return e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {});
|
|
876
|
-
}
|
|
877
874
|
function Xt(e) {
|
|
878
|
-
return e.
|
|
875
|
+
return e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {});
|
|
879
876
|
}
|
|
880
877
|
function Zt(e) {
|
|
878
|
+
return e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !Yt(t, n) || e ? null : "Pflichtfeld", e), {});
|
|
879
|
+
}
|
|
880
|
+
function Qt(e) {
|
|
881
881
|
return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t === "" ? void 0 : t]));
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function $t(e, t) {
|
|
884
884
|
let n = { ...e };
|
|
885
885
|
return t.forEach((e) => {
|
|
886
886
|
let t = e.id;
|
|
887
887
|
e.type === "boolean" && n[t] === null ? n[t] = !1 : e.type === "date" && n[t] ? n[t] = new Date(n[t]) : n[t] === null && (n[t] = "");
|
|
888
888
|
}), n;
|
|
889
889
|
}
|
|
890
|
-
var
|
|
891
|
-
function en(e, t) {
|
|
892
|
-
return Object.fromEntries((Nt(e) ?? []).filter((e) => t.has($t(e.field))).map((e) => [$t(e.field), e.message]));
|
|
893
|
-
}
|
|
890
|
+
var en = (e) => e.split(".").pop() ?? e;
|
|
894
891
|
function tn(e, t) {
|
|
895
|
-
|
|
892
|
+
return Object.fromEntries((Pt(e) ?? []).filter((e) => t.has(en(e.field))).map((e) => [en(e.field), e.message]));
|
|
893
|
+
}
|
|
894
|
+
function nn(e, t) {
|
|
895
|
+
let n = Pt(e);
|
|
896
896
|
if (!n) return e?.message;
|
|
897
|
-
let r = n.filter((e) => !t.has(
|
|
897
|
+
let r = n.filter((e) => !t.has(en(e.field)));
|
|
898
898
|
return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error: o, onPersist: c, onClose: l }) {
|
|
901
901
|
let [u, h] = d(0), [g, v] = d(!1), b = ve({
|
|
902
902
|
mode: "uncontrolled",
|
|
903
|
-
initialValues:
|
|
904
|
-
validate:
|
|
903
|
+
initialValues: Xt(e),
|
|
904
|
+
validate: Zt(e)
|
|
905
905
|
});
|
|
906
906
|
s(() => {
|
|
907
907
|
if (r) {
|
|
908
|
-
let t =
|
|
908
|
+
let t = $t(r, e);
|
|
909
909
|
b.initialize(t), b.setValues(t);
|
|
910
910
|
}
|
|
911
911
|
}, [r]);
|
|
912
|
-
let S = new Set(e.map((e) => String(e.id))), C =
|
|
912
|
+
let S = new Set(e.map((e) => String(e.id))), C = nn(o, S), w = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], E = w.length > 0, D = u === w.length - 1;
|
|
913
913
|
function O(e) {
|
|
914
914
|
let t = b.getValues();
|
|
915
915
|
if (e.conditional && !e.conditional(t)) return null;
|
|
916
|
-
let n =
|
|
916
|
+
let n = Yt(e, t), r = b.getInputProps(e.id);
|
|
917
917
|
switch (e.type) {
|
|
918
|
-
case "number": return /* @__PURE__ */ p(
|
|
918
|
+
case "number": return /* @__PURE__ */ p(P, {
|
|
919
919
|
decimalSeparator: ",",
|
|
920
920
|
thousandSeparator: ".",
|
|
921
921
|
label: e.column.title,
|
|
@@ -970,20 +970,20 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
|
|
|
970
970
|
children: C
|
|
971
971
|
}), /* @__PURE__ */ m("form", {
|
|
972
972
|
onSubmit: b.onSubmit(async (e) => {
|
|
973
|
-
let t =
|
|
973
|
+
let t = Qt(e);
|
|
974
974
|
try {
|
|
975
975
|
await c(t);
|
|
976
976
|
} catch (e) {
|
|
977
|
-
let t =
|
|
977
|
+
let t = tn(e, S);
|
|
978
978
|
Object.keys(t).length > 0 && b.setErrors(t);
|
|
979
979
|
return;
|
|
980
980
|
}
|
|
981
981
|
E && !D ? h((e) => e + 1) : (b.setInitialValues(t), b.reset(), l());
|
|
982
982
|
}),
|
|
983
|
-
children: [E ? /* @__PURE__ */ p(
|
|
983
|
+
children: [E ? /* @__PURE__ */ p(ie, {
|
|
984
984
|
active: u,
|
|
985
985
|
size: "sm",
|
|
986
|
-
children: w.map((e) => /* @__PURE__ */ p(
|
|
986
|
+
children: w.map((e) => /* @__PURE__ */ p(ie.Step, {
|
|
987
987
|
...t?.[e - 1] ? { label: t[e - 1].label } : {},
|
|
988
988
|
children: k(e)
|
|
989
989
|
}, e))
|
|
@@ -1004,9 +1004,9 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
|
|
|
1004
1004
|
}
|
|
1005
1005
|
//#endregion
|
|
1006
1006
|
//#region src/DataTable/CreateModal.tsx
|
|
1007
|
-
function
|
|
1008
|
-
let [s, c] = d(), { mutateAsync: l, isPending: u, error: f } =
|
|
1009
|
-
return /* @__PURE__ */ p(
|
|
1007
|
+
function an({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, steps: a, onCreated: o }) {
|
|
1008
|
+
let [s, c] = d(), { mutateAsync: l, isPending: u, error: f } = Kt(i, n, r), { mutateAsync: m, isPending: h, error: g } = qt(i, n, r);
|
|
1009
|
+
return /* @__PURE__ */ p(rn, {
|
|
1010
1010
|
fields: e,
|
|
1011
1011
|
steps: a,
|
|
1012
1012
|
recordId: s,
|
|
@@ -1027,17 +1027,17 @@ function rn({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath
|
|
|
1027
1027
|
}
|
|
1028
1028
|
//#endregion
|
|
1029
1029
|
//#region node_modules/clsx/dist/clsx.mjs
|
|
1030
|
-
function
|
|
1030
|
+
function on(e) {
|
|
1031
1031
|
var t, n, r = "";
|
|
1032
1032
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1033
1033
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1034
1034
|
var i = e.length;
|
|
1035
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
1035
|
+
for (t = 0; t < i; t++) e[t] && (n = on(e[t])) && (r && (r += " "), r += n);
|
|
1036
1036
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
1037
1037
|
return r;
|
|
1038
1038
|
}
|
|
1039
1039
|
function X() {
|
|
1040
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
1040
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = on(e)) && (r && (r += " "), r += t);
|
|
1041
1041
|
return r;
|
|
1042
1042
|
}
|
|
1043
1043
|
//#endregion
|
|
@@ -1048,7 +1048,7 @@ function Z(e, t, n) {
|
|
|
1048
1048
|
theme: t
|
|
1049
1049
|
}).value : void 0;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function sn({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor: i, stripedColor: a, highlightOnHoverColor: o }) {
|
|
1052
1052
|
return {
|
|
1053
1053
|
"--mantine-datatable-color-light": Z(t, e, "light"),
|
|
1054
1054
|
"--mantine-datatable-color-dark": Z(t, e, "dark"),
|
|
@@ -1064,7 +1064,7 @@ function on({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor
|
|
|
1064
1064
|
"--mantine-datatable-highlight-on-hover-color-dark": Z(o, e, "dark")
|
|
1065
1065
|
};
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function cn({ theme: e, paginationActiveTextColor: t, paginationActiveBackgroundColor: n }) {
|
|
1068
1068
|
return {
|
|
1069
1069
|
"--mantine-datatable-pagination-active-text-color-light": Z(t, e, "light"),
|
|
1070
1070
|
"--mantine-datatable-pagination-active-text-color-dark": Z(t, e, "dark"),
|
|
@@ -1072,7 +1072,7 @@ function sn({ theme: e, paginationActiveTextColor: t, paginationActiveBackground
|
|
|
1072
1072
|
"--mantine-datatable-pagination-active-background-color-dark": Z(n, e, "dark")
|
|
1073
1073
|
};
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function ln({ theme: e, color: t, backgroundColor: n }) {
|
|
1076
1076
|
return {
|
|
1077
1077
|
"--mantine-datatable-row-color-light": Z(t, e, "light"),
|
|
1078
1078
|
"--mantine-datatable-row-color-dark": Z(t, e, "dark"),
|
|
@@ -1080,9 +1080,9 @@ function cn({ theme: e, color: t, backgroundColor: n }) {
|
|
|
1080
1080
|
"--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
|
-
var [
|
|
1083
|
+
var [un, dn] = pe("useDataTableColumnsContext must be used within DataTableColumnProvider"), fn = (e) => {
|
|
1084
1084
|
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("");
|
|
1085
|
-
return p(
|
|
1085
|
+
return p(un, {
|
|
1086
1086
|
value: {
|
|
1087
1087
|
sourceColumn: y,
|
|
1088
1088
|
setSourceColumn: b,
|
|
@@ -1114,13 +1114,13 @@ var [ln, un] = pe("useDataTableColumnsContext must be used within DataTableColum
|
|
|
1114
1114
|
children: t
|
|
1115
1115
|
});
|
|
1116
1116
|
};
|
|
1117
|
-
function
|
|
1117
|
+
function pn() {
|
|
1118
1118
|
return p("tr", {
|
|
1119
1119
|
className: "mantine-datatable-empty-row",
|
|
1120
1120
|
children: p("td", {})
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function mn() {
|
|
1124
1124
|
return m("svg", {
|
|
1125
1125
|
width: "24",
|
|
1126
1126
|
height: "24",
|
|
@@ -1143,14 +1143,14 @@ function pn() {
|
|
|
1143
1143
|
]
|
|
1144
1144
|
});
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function hn({ icon: e, text: t, active: n, children: r }) {
|
|
1147
1147
|
return p(b, {
|
|
1148
1148
|
className: "mantine-datatable-empty-state",
|
|
1149
1149
|
"data-active": n || void 0,
|
|
1150
1150
|
children: r || m(f, { children: [e || p("div", {
|
|
1151
1151
|
className: "mantine-datatable-empty-state-icon",
|
|
1152
|
-
children: p(
|
|
1153
|
-
}), p(
|
|
1152
|
+
children: p(mn, {})
|
|
1153
|
+
}), p(V, {
|
|
1154
1154
|
component: "div",
|
|
1155
1155
|
size: "sm",
|
|
1156
1156
|
c: "dimmed",
|
|
@@ -1158,49 +1158,49 @@ function mn({ icon: e, text: t, active: n, children: r }) {
|
|
|
1158
1158
|
})] })
|
|
1159
1159
|
});
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function gn(e) {
|
|
1162
1162
|
let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
|
|
1163
1163
|
return `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function _n(e, t, n) {
|
|
1166
1166
|
return !Array.isArray(e) || n && !e.every(n) ? t : e;
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function vn(e) {
|
|
1169
1169
|
return typeof e == "object" && !!e && typeof e.accessor == "string";
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function yn(e, t, n) {
|
|
1172
1172
|
return e.filter((e) => !t.map(n).includes(n(e)));
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function bn(e, t) {
|
|
1175
1175
|
return e.filter((e, n, r) => n === r.findIndex((n) => t(e) === t(n)));
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1177
|
+
function xn(e, t) {
|
|
1178
1178
|
return t ? t.match(/([^[.\]])+/g).reduce((e, t) => e && e[t], e) : void 0;
|
|
1179
1179
|
}
|
|
1180
1180
|
function Q(e, t) {
|
|
1181
|
-
return typeof t == "string" ?
|
|
1182
|
-
}
|
|
1183
|
-
function xn(e) {
|
|
1184
|
-
return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + xn(e.groups) : 1));
|
|
1181
|
+
return typeof t == "string" ? xn(e, t) : t(e);
|
|
1185
1182
|
}
|
|
1186
1183
|
function Sn(e) {
|
|
1184
|
+
return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + Sn(e.groups) : 1));
|
|
1185
|
+
}
|
|
1186
|
+
function Cn(e) {
|
|
1187
1187
|
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(...
|
|
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(...Cn(n.groups));
|
|
1189
1189
|
return t.filter((e) => e != null);
|
|
1190
1190
|
}
|
|
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 +
|
|
1191
|
+
function wn(e, t) {
|
|
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 + wn(n, t), 0) : 0;
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Tn(e, t, n = 0) {
|
|
1195
1195
|
if (n === t) return [...e];
|
|
1196
1196
|
let r = [];
|
|
1197
|
-
for (let i of e) i.groups && i.groups.length > 0 && r.push(...
|
|
1197
|
+
for (let i of e) i.groups && i.groups.length > 0 && r.push(...Tn(i.groups, t, n + 1));
|
|
1198
1198
|
return r;
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function En(e, t, n) {
|
|
1201
1201
|
return n ? !e || t : !1;
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1204
1204
|
let r = l(() => t.map((e) => ({
|
|
1205
1205
|
accessor: e.accessor,
|
|
1206
1206
|
defaultPinned: e.pinned,
|
|
@@ -1210,7 +1210,7 @@ function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1210
1210
|
key: e ? `${e}-columns-pinning` : "",
|
|
1211
1211
|
defaultValue: e ? r : void 0,
|
|
1212
1212
|
getInitialValueInEffect: n
|
|
1213
|
-
}), o =
|
|
1213
|
+
}), o = _n(i, r, vn);
|
|
1214
1214
|
function c(t) {
|
|
1215
1215
|
e && a(typeof t == "function" ? (e) => t(e ?? r) : t);
|
|
1216
1216
|
}
|
|
@@ -1253,12 +1253,12 @@ function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1253
1253
|
resetColumnsPinning: d
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1257
1257
|
let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = je({
|
|
1258
1258
|
key: e ? `${e}-columns-order` : "",
|
|
1259
1259
|
defaultValue: e ? r : void 0,
|
|
1260
1260
|
getInitialValueInEffect: n
|
|
1261
|
-
}), o =
|
|
1261
|
+
}), o = _n(i, r, (e) => typeof e == "string");
|
|
1262
1262
|
function c(t) {
|
|
1263
1263
|
e && a(t);
|
|
1264
1264
|
}
|
|
@@ -1296,12 +1296,12 @@ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1296
1296
|
resetColumnsOrder: d
|
|
1297
1297
|
};
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
|
|
1300
1300
|
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] = je({
|
|
1301
1301
|
key: e ? `${e}-columns-width` : "",
|
|
1302
1302
|
defaultValue: e ? o() : void 0,
|
|
1303
1303
|
getInitialValueInEffect: n
|
|
1304
|
-
}), p =
|
|
1304
|
+
}), p = _n(c, [], (e) => typeof e == "object" && !!e), [m, h] = d(() => e && p.length > 0 ? p : o()), [g, _] = d(!1), v = u(!1);
|
|
1305
1305
|
s(() => {
|
|
1306
1306
|
e && (!p || p.length === 0 || h(p));
|
|
1307
1307
|
}, [e, p]), s(() => {
|
|
@@ -1385,7 +1385,7 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
|
|
|
1385
1385
|
endResize: C
|
|
1386
1386
|
};
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function An({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1389
1389
|
let r = l(() => t?.map((e) => ({
|
|
1390
1390
|
accessor: e.accessor,
|
|
1391
1391
|
defaultToggle: e.defaultToggle || !0,
|
|
@@ -1395,7 +1395,7 @@ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1395
1395
|
key: e ? `${e}-columns-toggle` : "",
|
|
1396
1396
|
defaultValue: e ? r : void 0,
|
|
1397
1397
|
getInitialValueInEffect: n
|
|
1398
|
-
}), o =
|
|
1398
|
+
}), o = _n(i, r, vn);
|
|
1399
1399
|
function c(t) {
|
|
1400
1400
|
e && a(t);
|
|
1401
1401
|
}
|
|
@@ -1438,20 +1438,20 @@ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1438
1438
|
resetColumnsToggle: d
|
|
1439
1439
|
};
|
|
1440
1440
|
}
|
|
1441
|
-
var
|
|
1442
|
-
let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } =
|
|
1441
|
+
var jn = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
|
|
1442
|
+
let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = On({
|
|
1443
1443
|
key: e,
|
|
1444
1444
|
columns: t,
|
|
1445
1445
|
getInitialValueInEffect: n
|
|
1446
|
-
}), { columnsToggle: c, setColumnsToggle: u, resetColumnsToggle: d } =
|
|
1446
|
+
}), { columnsToggle: c, setColumnsToggle: u, resetColumnsToggle: d } = An({
|
|
1447
1447
|
key: e,
|
|
1448
1448
|
columns: t,
|
|
1449
1449
|
getInitialValueInEffect: n
|
|
1450
|
-
}), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } =
|
|
1450
|
+
}), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = Dn({
|
|
1451
1451
|
key: e,
|
|
1452
1452
|
columns: t,
|
|
1453
1453
|
getInitialValueInEffect: n
|
|
1454
|
-
}), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } =
|
|
1454
|
+
}), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = kn({
|
|
1455
1455
|
key: e,
|
|
1456
1456
|
columns: t,
|
|
1457
1457
|
getInitialValueInEffect: n,
|
|
@@ -1528,16 +1528,16 @@ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
|
|
|
1528
1528
|
beginResize: w,
|
|
1529
1529
|
endResize: T
|
|
1530
1530
|
};
|
|
1531
|
-
},
|
|
1532
|
-
function
|
|
1531
|
+
}, Mn = typeof window < "u" ? c : s;
|
|
1532
|
+
function Nn(e) {
|
|
1533
1533
|
let t = u(e);
|
|
1534
1534
|
return t.current = e, t;
|
|
1535
1535
|
}
|
|
1536
|
-
var
|
|
1536
|
+
var Pn = "--mantine-datatable-header-height", Fn = "--mantine-datatable-footer-height", In = "--mantine-datatable-selection-column-width", Ln = "--mantine-datatable-last-row-border-bottom";
|
|
1537
1537
|
function $(e, t, n) {
|
|
1538
1538
|
e?.style.setProperty(t, n);
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function Rn(e) {
|
|
1541
1541
|
let t = e.borderBoxSize?.[0] || e.contentBoxSize?.[0];
|
|
1542
1542
|
return t ? {
|
|
1543
1543
|
width: t.inlineSize,
|
|
@@ -1547,18 +1547,18 @@ function Ln(e) {
|
|
|
1547
1547
|
height: e.contentRect.height
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function zn(e, t, n) {
|
|
1551
1551
|
if (e) {
|
|
1552
1552
|
let r = new ResizeObserver((e) => {
|
|
1553
1553
|
let n = e[0];
|
|
1554
|
-
n && t(
|
|
1554
|
+
n && t(Rn(n));
|
|
1555
1555
|
});
|
|
1556
1556
|
return r.observe(e), () => {
|
|
1557
1557
|
r.disconnect(), n();
|
|
1558
1558
|
};
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function Bn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
1562
1562
|
let n = {
|
|
1563
1563
|
root: u(null),
|
|
1564
1564
|
table: u(null),
|
|
@@ -1566,16 +1566,16 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1566
1566
|
header: u(null),
|
|
1567
1567
|
footer: u(null),
|
|
1568
1568
|
selectionColumnHeader: u(null)
|
|
1569
|
-
}, { root: r, table: i, scrollViewport: o, header: c, footer: l, selectionColumnHeader: d } = n, f =
|
|
1569
|
+
}, { root: r, table: i, scrollViewport: o, header: c, footer: l, selectionColumnHeader: d } = n, f = Nn({ withRowBorders: t }), p = Nn(e), m = u(() => {}), h = u(() => {}), g = a((e) => {
|
|
1570
1570
|
p.current.onScroll?.(e), m.current();
|
|
1571
1571
|
}, []);
|
|
1572
|
-
return s(() =>
|
|
1573
|
-
$(r.current, Nn, `${e.height}px`);
|
|
1574
|
-
}, () => $(r.current, Nn, "0")), [c.current]), s(() => Rn(l.current, (e) => {
|
|
1572
|
+
return s(() => zn(c.current, (e) => {
|
|
1575
1573
|
$(r.current, Pn, `${e.height}px`);
|
|
1576
|
-
}, () => $(r.current, Pn, "0")), [
|
|
1577
|
-
$(r.current, Fn, `${e.
|
|
1578
|
-
}, () => $(r.current, Fn, "0")), [
|
|
1574
|
+
}, () => $(r.current, Pn, "0")), [c.current]), s(() => zn(l.current, (e) => {
|
|
1575
|
+
$(r.current, Fn, `${e.height}px`);
|
|
1576
|
+
}, () => $(r.current, Fn, "0")), [l.current]), s(() => zn(d.current, (e) => {
|
|
1577
|
+
$(r.current, In, `${e.width}px`);
|
|
1578
|
+
}, () => $(r.current, In, "0")), [d.current]), Mn(() => {
|
|
1579
1579
|
if (typeof window > "u") return;
|
|
1580
1580
|
let e = {
|
|
1581
1581
|
top: !0,
|
|
@@ -1598,7 +1598,7 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1598
1598
|
$(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), $(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
|
|
1599
1599
|
}
|
|
1600
1600
|
function c() {
|
|
1601
|
-
f.current.withRowBorders && t.height < n.height ? $(r.current,
|
|
1601
|
+
f.current.withRowBorders && t.height < n.height ? $(r.current, Ln, `${H("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Ln, "unset");
|
|
1602
1602
|
}
|
|
1603
1603
|
h.current = c;
|
|
1604
1604
|
function l() {
|
|
@@ -1616,10 +1616,10 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1616
1616
|
let u = new ResizeObserver((e) => {
|
|
1617
1617
|
for (let r of e) switch (r.target.tagName) {
|
|
1618
1618
|
case "TABLE":
|
|
1619
|
-
t =
|
|
1619
|
+
t = Rn(r);
|
|
1620
1620
|
break;
|
|
1621
1621
|
case "DIV":
|
|
1622
|
-
n =
|
|
1622
|
+
n = Rn(r);
|
|
1623
1623
|
break;
|
|
1624
1624
|
}
|
|
1625
1625
|
l(), s(), c();
|
|
@@ -1627,14 +1627,14 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1627
1627
|
return u.observe(i.current), u.observe(o.current), () => {
|
|
1628
1628
|
u.disconnect();
|
|
1629
1629
|
};
|
|
1630
|
-
}, []),
|
|
1630
|
+
}, []), Mn(() => {
|
|
1631
1631
|
h.current();
|
|
1632
1632
|
}, [t]), {
|
|
1633
1633
|
refs: n,
|
|
1634
1634
|
onScroll: g
|
|
1635
1635
|
};
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function Vn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: o, pinLastColumn: c }) {
|
|
1638
1638
|
let [l, u] = d(/* @__PURE__ */ new Map()), f = a(() => {
|
|
1639
1639
|
if (!o && !c && !e.some((e) => e.pinned)) return;
|
|
1640
1640
|
let a = t.current ?? n.current;
|
|
@@ -1716,13 +1716,13 @@ function Bn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
|
|
|
1716
1716
|
t,
|
|
1717
1717
|
n,
|
|
1718
1718
|
f
|
|
1719
|
-
]),
|
|
1719
|
+
]), Mn(f, [f]), {
|
|
1720
1720
|
pinnedMap: l,
|
|
1721
1721
|
hasLeftPinned: [...l.values()].some((e) => e.logicalSide === "left"),
|
|
1722
1722
|
hasRightPinned: [...l.values()].some((e) => e.logicalSide === "right")
|
|
1723
1723
|
};
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function Hn(e) {
|
|
1726
1726
|
let [t, n] = d(null);
|
|
1727
1727
|
return s(() => {
|
|
1728
1728
|
n(null);
|
|
@@ -1731,7 +1731,7 @@ function Vn(e) {
|
|
|
1731
1731
|
setLastSelectionChangeIndex: n
|
|
1732
1732
|
};
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function Un(e, t) {
|
|
1735
1735
|
let n = () => {
|
|
1736
1736
|
t(e.map((e) => e.matches));
|
|
1737
1737
|
}, r = e.map((e) => {
|
|
@@ -1747,26 +1747,26 @@ function Hn(e, t) {
|
|
|
1747
1747
|
});
|
|
1748
1748
|
};
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Wn(e, t) {
|
|
1751
1751
|
return t || (typeof window < "u" && "matchMedia" in window ? e.map((e) => window.matchMedia(e).matches) : e.map(() => !1));
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1754
|
-
let [r, i] = d(n ? t :
|
|
1753
|
+
function Gn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
|
|
1754
|
+
let [r, i] = d(n ? t : Wn(e, t)), a = u(null);
|
|
1755
1755
|
return s(() => {
|
|
1756
|
-
if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)),
|
|
1756
|
+
if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)), Un(a.current, (e) => {
|
|
1757
1757
|
i(e);
|
|
1758
1758
|
});
|
|
1759
1759
|
}, [e]), r;
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function Kn(e) {
|
|
1762
1762
|
let t = ge();
|
|
1763
|
-
return
|
|
1763
|
+
return Gn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function qn(e) {
|
|
1766
1766
|
let t = ge();
|
|
1767
1767
|
return Me((typeof e == "function" ? e(t) : e) || "", !0);
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function Jn({ rowExpansion: e, records: t, idAccessor: n }) {
|
|
1770
1770
|
let r = [];
|
|
1771
1771
|
if (e && t) {
|
|
1772
1772
|
let { trigger: i, allowMultiple: a, initiallyExpanded: o } = e;
|
|
@@ -1801,7 +1801,7 @@ function qn({ rowExpansion: e, records: t, idAccessor: n }) {
|
|
|
1801
1801
|
};
|
|
1802
1802
|
}
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function Yn(e, t) {
|
|
1805
1805
|
let [n, r] = d(e), [i, a] = d(e), o = Pe(() => r(!0), 0), c = Pe(() => a(!1), t || 200);
|
|
1806
1806
|
return s(() => {
|
|
1807
1807
|
e ? (c.clear(), a(!0), o.start()) : (o.clear(), r(!1), c.start());
|
|
@@ -1814,17 +1814,17 @@ function Jn(e, t) {
|
|
|
1814
1814
|
visible: i
|
|
1815
1815
|
};
|
|
1816
1816
|
}
|
|
1817
|
-
var
|
|
1818
|
-
function
|
|
1819
|
-
return
|
|
1817
|
+
var Xn = "mantine-datatable-nowrap", Zn = "mantine-datatable-ellipsis", Qn = "mantine-datatable-pointer-cursor", $n = "mantine-datatable-context-menu-cursor", er = "mantine-datatable-text-selection-disabled", tr = "mantine-datatable-text-align-left", nr = "mantine-datatable-text-align-center", rr = "mantine-datatable-text-align-right";
|
|
1818
|
+
function ir({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
|
|
1819
|
+
return qn(r) ? p(oe, {
|
|
1820
1820
|
"data-pinned": n?.position,
|
|
1821
1821
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
1822
1822
|
className: X({
|
|
1823
|
-
[
|
|
1824
|
-
[
|
|
1825
|
-
[
|
|
1826
|
-
[
|
|
1827
|
-
[
|
|
1823
|
+
[Xn]: a || o,
|
|
1824
|
+
[Zn]: o,
|
|
1825
|
+
[tr]: s === "left",
|
|
1826
|
+
[nr]: s === "center",
|
|
1827
|
+
[rr]: s === "right"
|
|
1828
1828
|
}, e),
|
|
1829
1829
|
style: [
|
|
1830
1830
|
{
|
|
@@ -1842,24 +1842,24 @@ function rr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
|
|
|
1842
1842
|
children: i
|
|
1843
1843
|
}) : null;
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1846
|
-
return p(
|
|
1845
|
+
function ar({ shadowVisible: e }) {
|
|
1846
|
+
return p(oe, {
|
|
1847
1847
|
className: "mantine-datatable-footer-selector-placeholder-cell",
|
|
1848
1848
|
"data-shadow-visible": e || void 0
|
|
1849
1849
|
});
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return p(
|
|
1851
|
+
function or({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
|
|
1852
|
+
return p(ae, {
|
|
1853
1853
|
ref: s,
|
|
1854
1854
|
className: X("mantine-datatable-footer", e),
|
|
1855
1855
|
style: t,
|
|
1856
|
-
children: m(ce, { children: [a && p(
|
|
1856
|
+
children: m(ce, { children: [a && p(ar, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
|
|
1857
1857
|
if (e) return null;
|
|
1858
1858
|
let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
|
|
1859
1859
|
...r,
|
|
1860
1860
|
...t
|
|
1861
1861
|
};
|
|
1862
|
-
return p(
|
|
1862
|
+
return p(ir, {
|
|
1863
1863
|
pinnedInfo: i.get(String(n)),
|
|
1864
1864
|
className: l,
|
|
1865
1865
|
style: u,
|
|
@@ -1873,8 +1873,8 @@ function ar({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedM
|
|
|
1873
1873
|
})] })
|
|
1874
1874
|
});
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1877
|
-
let g = l(() => t && t.length > 0 ? t : n && n.length > 0 ?
|
|
1876
|
+
function sr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, className: a, style: o }, pinnedInfo: s, maxDepth: c, currentDepth: u, previousGroups: d, isLastGroup: f, withColumnBorders: m = !1, totalTableColumns: h }) {
|
|
1877
|
+
let g = l(() => t && t.length > 0 ? t : n && n.length > 0 ? Cn([{
|
|
1878
1878
|
id: e,
|
|
1879
1879
|
columns: t,
|
|
1880
1880
|
groups: n
|
|
@@ -1882,7 +1882,7 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1882
1882
|
t,
|
|
1883
1883
|
n,
|
|
1884
1884
|
e
|
|
1885
|
-
]), _ =
|
|
1885
|
+
]), _ = Kn(l(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = l(() => wn({
|
|
1886
1886
|
id: e,
|
|
1887
1887
|
columns: t,
|
|
1888
1888
|
groups: n
|
|
@@ -1891,16 +1891,16 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1891
1891
|
t,
|
|
1892
1892
|
n,
|
|
1893
1893
|
_
|
|
1894
|
-
]), y = l(() => d.reduce((e, t) => e +
|
|
1895
|
-
return v > 0 ? p(
|
|
1894
|
+
]), y = l(() => d.reduce((e, t) => e + wn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = En(f, y + v < h, m);
|
|
1895
|
+
return v > 0 ? p(oe, {
|
|
1896
1896
|
colSpan: v,
|
|
1897
1897
|
rowSpan: b > 1 ? b : void 0,
|
|
1898
1898
|
"data-pinned": s?.position,
|
|
1899
1899
|
"data-pinned-shadow": s?.isBoundary ? s.position : void 0,
|
|
1900
1900
|
className: X("mantine-datatable-column-group-header-cell", {
|
|
1901
|
-
[
|
|
1902
|
-
[
|
|
1903
|
-
[
|
|
1901
|
+
[tr]: i === "left",
|
|
1902
|
+
[nr]: i === "center",
|
|
1903
|
+
[rr]: i === "right",
|
|
1904
1904
|
"mantine-datatable-column-group-header-cell--needs-border": x
|
|
1905
1905
|
}, a),
|
|
1906
1906
|
style: [o, s && {
|
|
@@ -1908,10 +1908,10 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1908
1908
|
[s.position]: s.offset,
|
|
1909
1909
|
overflow: "visible"
|
|
1910
1910
|
}],
|
|
1911
|
-
children: r ??
|
|
1911
|
+
children: r ?? gn(e)
|
|
1912
1912
|
}) : null;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function cr() {
|
|
1915
1915
|
return m("svg", {
|
|
1916
1916
|
width: "14",
|
|
1917
1917
|
height: "14",
|
|
@@ -1928,7 +1928,7 @@ function sr() {
|
|
|
1928
1928
|
}), p("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
1929
|
});
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1931
|
+
function lr() {
|
|
1932
1932
|
return m("svg", {
|
|
1933
1933
|
width: "14",
|
|
1934
1934
|
height: "14",
|
|
@@ -1949,9 +1949,9 @@ function cr() {
|
|
|
1949
1949
|
})]
|
|
1950
1950
|
});
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1953
|
-
let [i, { close: a, toggle: o }] = Ae(!1), s = t ?
|
|
1954
|
-
return r && (c = void 0), m(
|
|
1952
|
+
function ur({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
|
|
1953
|
+
let [i, { close: a, toggle: o }] = Ae(!1), s = t ? lr : cr, c = ke(a);
|
|
1954
|
+
return r && (c = void 0), m(F, {
|
|
1955
1955
|
withArrow: !0,
|
|
1956
1956
|
shadow: "md",
|
|
1957
1957
|
trapFocus: !0,
|
|
@@ -1959,7 +1959,7 @@ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
|
|
|
1959
1959
|
opened: i,
|
|
1960
1960
|
onClose: a,
|
|
1961
1961
|
onDismiss: a,
|
|
1962
|
-
children: [p(
|
|
1962
|
+
children: [p(I, { children: p(g, {
|
|
1963
1963
|
className: "mantine-datatable-header-cell-filter-action-icon",
|
|
1964
1964
|
"data-active": t || void 0,
|
|
1965
1965
|
size: "sm",
|
|
@@ -1977,7 +1977,7 @@ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
|
|
|
1977
1977
|
})]
|
|
1978
1978
|
});
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function dr() {
|
|
1981
1981
|
return m("svg", {
|
|
1982
1982
|
width: "14",
|
|
1983
1983
|
height: "14",
|
|
@@ -1999,7 +1999,7 @@ function ur() {
|
|
|
1999
1999
|
]
|
|
2000
2000
|
});
|
|
2001
2001
|
}
|
|
2002
|
-
function
|
|
2002
|
+
function fr() {
|
|
2003
2003
|
return m("svg", {
|
|
2004
2004
|
width: "14",
|
|
2005
2005
|
height: "14",
|
|
@@ -2021,7 +2021,7 @@ function dr() {
|
|
|
2021
2021
|
]
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function pr() {
|
|
2025
2025
|
return m("svg", {
|
|
2026
2026
|
width: "14",
|
|
2027
2027
|
height: "14",
|
|
@@ -2043,7 +2043,7 @@ function fr() {
|
|
|
2043
2043
|
]
|
|
2044
2044
|
});
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2046
|
+
function mr() {
|
|
2047
2047
|
return m("svg", {
|
|
2048
2048
|
width: "14",
|
|
2049
2049
|
height: "14",
|
|
@@ -2064,26 +2064,26 @@ function pr() {
|
|
|
2064
2064
|
]
|
|
2065
2065
|
});
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function hr({ currentPinned: e, onPinChange: t }) {
|
|
2068
2068
|
let [n, r] = d(!1), i = u(null), [o, c] = d(!1), l = a(() => {
|
|
2069
2069
|
if (i.current) {
|
|
2070
2070
|
let e = getComputedStyle(i.current).direction;
|
|
2071
2071
|
c(e === "rtl");
|
|
2072
2072
|
}
|
|
2073
2073
|
}, []);
|
|
2074
|
-
|
|
2074
|
+
Mn(() => {
|
|
2075
2075
|
l();
|
|
2076
2076
|
}, [l]), s(() => {
|
|
2077
2077
|
n && l();
|
|
2078
2078
|
}, [n, l]);
|
|
2079
2079
|
let f = o ? "right" : "left", h = o ? "left" : "right", _ = e === f, v = e === h;
|
|
2080
|
-
return m(
|
|
2080
|
+
return m(F, {
|
|
2081
2081
|
opened: n,
|
|
2082
2082
|
onChange: r,
|
|
2083
2083
|
position: "bottom",
|
|
2084
2084
|
withArrow: !0,
|
|
2085
2085
|
shadow: "sm",
|
|
2086
|
-
children: [p(
|
|
2086
|
+
children: [p(F.Target, { children: p(b, {
|
|
2087
2087
|
ref: i,
|
|
2088
2088
|
className: "mantine-datatable-header-cell-pinnable-icon",
|
|
2089
2089
|
role: "button",
|
|
@@ -2094,9 +2094,9 @@ function mr({ currentPinned: e, onPinChange: t }) {
|
|
|
2094
2094
|
size: "xs",
|
|
2095
2095
|
variant: "light",
|
|
2096
2096
|
onClick: (e) => e.stopPropagation(),
|
|
2097
|
-
children: p(
|
|
2097
|
+
children: p(pr, {})
|
|
2098
2098
|
})
|
|
2099
|
-
}) }), p(
|
|
2099
|
+
}) }), p(F.Dropdown, {
|
|
2100
2100
|
onClick: (e) => e.stopPropagation(),
|
|
2101
2101
|
onMouseEnter: () => r(!0),
|
|
2102
2102
|
onMouseLeave: () => r(!1),
|
|
@@ -2109,14 +2109,14 @@ function mr({ currentPinned: e, onPinChange: t }) {
|
|
|
2109
2109
|
variant: _ ? "filled" : "light",
|
|
2110
2110
|
onClick: () => t(_ ? void 0 : f),
|
|
2111
2111
|
"aria-label": "Pin left",
|
|
2112
|
-
children: p(
|
|
2112
|
+
children: p(dr, {})
|
|
2113
2113
|
}),
|
|
2114
2114
|
p(g, {
|
|
2115
2115
|
size: "sm",
|
|
2116
2116
|
variant: v ? "filled" : "light",
|
|
2117
2117
|
onClick: () => t(v ? void 0 : h),
|
|
2118
2118
|
"aria-label": "Pin right",
|
|
2119
|
-
children: p(
|
|
2119
|
+
children: p(fr, {})
|
|
2120
2120
|
}),
|
|
2121
2121
|
e && p(g, {
|
|
2122
2122
|
size: "sm",
|
|
@@ -2124,18 +2124,18 @@ function mr({ currentPinned: e, onPinChange: t }) {
|
|
|
2124
2124
|
color: "red",
|
|
2125
2125
|
onClick: () => t(void 0),
|
|
2126
2126
|
"aria-label": "Unpin",
|
|
2127
|
-
children: p(
|
|
2127
|
+
children: p(mr, {})
|
|
2128
2128
|
})
|
|
2129
2129
|
]
|
|
2130
2130
|
})
|
|
2131
2131
|
})]
|
|
2132
2132
|
});
|
|
2133
2133
|
}
|
|
2134
|
-
var
|
|
2134
|
+
var gr = 50, _r = (e) => {
|
|
2135
2135
|
let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
|
|
2136
2136
|
current: 0,
|
|
2137
2137
|
next: 0
|
|
2138
|
-
}), { dir: c } = he(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } =
|
|
2138
|
+
}), { dir: c } = he(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = dn(), g = a((e) => {
|
|
2139
2139
|
if (e.preventDefault(), e.stopPropagation(), !n.current) return;
|
|
2140
2140
|
let r = n.current, a = r.nextElementSibling;
|
|
2141
2141
|
for (; a;) {
|
|
@@ -2154,7 +2154,7 @@ var hr = 50, gr = (e) => {
|
|
|
2154
2154
|
let p = (e) => {
|
|
2155
2155
|
let n = e.clientX - o.current;
|
|
2156
2156
|
l && (n = -n);
|
|
2157
|
-
let r = s.current.current -
|
|
2157
|
+
let r = s.current.current - gr, i = s.current.next - gr, a = Math.max(-r, Math.min(n, i)), u = s.current.current + a, d = s.current.next - a;
|
|
2158
2158
|
f([{
|
|
2159
2159
|
accessor: t,
|
|
2160
2160
|
width: `${u}px`
|
|
@@ -2201,7 +2201,7 @@ var hr = 50, gr = (e) => {
|
|
|
2201
2201
|
title: "Drag to resize column, double-click to reset"
|
|
2202
2202
|
});
|
|
2203
2203
|
};
|
|
2204
|
-
function
|
|
2204
|
+
function vr() {
|
|
2205
2205
|
return m("svg", {
|
|
2206
2206
|
width: "14",
|
|
2207
2207
|
height: "14",
|
|
@@ -2223,7 +2223,7 @@ function _r() {
|
|
|
2223
2223
|
]
|
|
2224
2224
|
});
|
|
2225
2225
|
}
|
|
2226
|
-
function
|
|
2226
|
+
function yr() {
|
|
2227
2227
|
return m("svg", {
|
|
2228
2228
|
width: "14",
|
|
2229
2229
|
height: "14",
|
|
@@ -2245,7 +2245,7 @@ function vr() {
|
|
|
2245
2245
|
]
|
|
2246
2246
|
});
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2248
|
+
function br() {
|
|
2249
2249
|
return m("svg", {
|
|
2250
2250
|
width: "14",
|
|
2251
2251
|
height: "14",
|
|
@@ -2270,37 +2270,37 @@ function yr() {
|
|
|
2270
2270
|
]
|
|
2271
2271
|
});
|
|
2272
2272
|
}
|
|
2273
|
-
function
|
|
2274
|
-
let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle:
|
|
2275
|
-
if (!
|
|
2276
|
-
let
|
|
2273
|
+
function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: f, sortIcons: h, textAlign: _, width: y, sortStatus: x, onSortStatusChange: S, filter: C, filterPopoverProps: E, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
|
|
2274
|
+
let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: ee, setColumnsPinning: F } = dn(), [te, I] = d(!1), L = u(null), ne = ee?.find((e) => e.accessor === r)?.pinned;
|
|
2275
|
+
if (!qn(i)) return null;
|
|
2276
|
+
let R = a ?? gn(r), re = typeof R == "string" ? R : void 0, ie = o && S ? (e) => {
|
|
2277
2277
|
e?.defaultPrevented || S({
|
|
2278
2278
|
sortKey: k,
|
|
2279
2279
|
columnAccessor: r,
|
|
2280
2280
|
direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
|
|
2281
2281
|
});
|
|
2282
|
-
} : void 0,
|
|
2283
|
-
e.stopPropagation(), A(r),
|
|
2284
|
-
},
|
|
2285
|
-
e.preventDefault(), j(r),
|
|
2282
|
+
} : void 0, z = (e) => {
|
|
2283
|
+
e.stopPropagation(), A(r), I(!1);
|
|
2284
|
+
}, B = (e) => {
|
|
2285
|
+
e.preventDefault(), j(r), I(!0);
|
|
2286
|
+
}, ae = () => {
|
|
2287
|
+
j(r), I(!1), M();
|
|
2286
2288
|
}, se = () => {
|
|
2287
|
-
|
|
2289
|
+
I(!0);
|
|
2288
2290
|
}, ce = () => {
|
|
2289
|
-
|
|
2290
|
-
}, le = () => {
|
|
2291
|
-
|
|
2292
|
-
}, B = (e) => {
|
|
2293
|
-
e.stopPropagation(), ee(N.map((e) => e.accessor === r ? {
|
|
2291
|
+
I(!1);
|
|
2292
|
+
}, le = (e) => {
|
|
2293
|
+
e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
|
|
2294
2294
|
...e,
|
|
2295
2295
|
toggled: !1
|
|
2296
2296
|
} : e));
|
|
2297
|
-
},
|
|
2298
|
-
|
|
2297
|
+
}, V = (e) => {
|
|
2298
|
+
F((t) => t.map((t) => t.accessor === r ? {
|
|
2299
2299
|
...t,
|
|
2300
2300
|
pinned: e
|
|
2301
2301
|
} : t));
|
|
2302
2302
|
};
|
|
2303
|
-
return m(
|
|
2303
|
+
return m(oe, {
|
|
2304
2304
|
"data-accessor": r,
|
|
2305
2305
|
"data-pinned": n?.position,
|
|
2306
2306
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
@@ -2329,7 +2329,7 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2329
2329
|
tabIndex: o ? 0 : void 0,
|
|
2330
2330
|
onClick: ie,
|
|
2331
2331
|
onKeyDown: (e) => e.key === "Enter" && ie?.(),
|
|
2332
|
-
ref:
|
|
2332
|
+
ref: L,
|
|
2333
2333
|
children: [m(T, {
|
|
2334
2334
|
className: "mantine-datatable-header-cell-sortable-group",
|
|
2335
2335
|
justify: "space-between",
|
|
@@ -2340,14 +2340,14 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2340
2340
|
w: "100%",
|
|
2341
2341
|
className: X({
|
|
2342
2342
|
"mantine-datatable-header-cell-draggable": s,
|
|
2343
|
-
"mantine-datatable-header-cell-drag-over":
|
|
2343
|
+
"mantine-datatable-header-cell-drag-over": te
|
|
2344
2344
|
}),
|
|
2345
2345
|
draggable: s,
|
|
2346
|
-
onDragStart: s ?
|
|
2347
|
-
onDragEnter: s ?
|
|
2348
|
-
onDragOver: s ?
|
|
2349
|
-
onDrop: s ?
|
|
2350
|
-
onDragLeave: s ?
|
|
2346
|
+
onDragStart: s ? z : void 0,
|
|
2347
|
+
onDragEnter: s ? se : void 0,
|
|
2348
|
+
onDragOver: s ? B : void 0,
|
|
2349
|
+
onDrop: s ? ae : void 0,
|
|
2350
|
+
onDragLeave: s ? ce : void 0,
|
|
2351
2351
|
children: [s ? p(b, {
|
|
2352
2352
|
role: "img",
|
|
2353
2353
|
"aria-label": "Drag column",
|
|
@@ -2358,21 +2358,21 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2358
2358
|
onClick: (e) => {
|
|
2359
2359
|
e.stopPropagation();
|
|
2360
2360
|
},
|
|
2361
|
-
children: p(
|
|
2361
|
+
children: p(br, {})
|
|
2362
2362
|
})
|
|
2363
2363
|
}) : null, p(v, {
|
|
2364
2364
|
className: X("mantine-datatable-header-cell-sortable-text", {
|
|
2365
|
-
[
|
|
2366
|
-
[
|
|
2367
|
-
[
|
|
2368
|
-
},
|
|
2369
|
-
title:
|
|
2370
|
-
children:
|
|
2365
|
+
[tr]: _ === "left",
|
|
2366
|
+
[nr]: _ === "center",
|
|
2367
|
+
[rr]: _ === "right"
|
|
2368
|
+
}, Xn, Zn),
|
|
2369
|
+
title: re,
|
|
2370
|
+
children: R
|
|
2371
2371
|
})]
|
|
2372
2372
|
}),
|
|
2373
|
-
l ? p(
|
|
2374
|
-
currentPinned:
|
|
2375
|
-
onPinChange:
|
|
2373
|
+
l ? p(hr, {
|
|
2374
|
+
currentPinned: ne,
|
|
2375
|
+
onPinChange: V
|
|
2376
2376
|
}) : null,
|
|
2377
2377
|
c ? p(b, {
|
|
2378
2378
|
className: "mantine-datatable-header-cell-toggleable-icon",
|
|
@@ -2381,46 +2381,46 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2381
2381
|
children: p(g, {
|
|
2382
2382
|
size: "xs",
|
|
2383
2383
|
variant: "light",
|
|
2384
|
-
onClick:
|
|
2385
|
-
children: p(
|
|
2384
|
+
onClick: le,
|
|
2385
|
+
children: p(mr, {})
|
|
2386
2386
|
})
|
|
2387
2387
|
}) : null,
|
|
2388
2388
|
o || x?.columnAccessor === r ? x?.columnAccessor === r ? p(b, {
|
|
2389
2389
|
className: X("mantine-datatable-header-cell-sortable-icon", { "mantine-datatable-header-cell-sortable-icon-reversed": x.direction === "desc" }),
|
|
2390
2390
|
role: "img",
|
|
2391
2391
|
"aria-label": `Sorted ${x.direction === "desc" ? "descending" : "ascending"}`,
|
|
2392
|
-
children: h?.sorted || p(
|
|
2392
|
+
children: h?.sorted || p(yr, {})
|
|
2393
2393
|
}) : p(b, {
|
|
2394
2394
|
className: "mantine-datatable-header-cell-sortable-unsorted-icon",
|
|
2395
2395
|
role: "img",
|
|
2396
2396
|
"aria-label": "Not sorted",
|
|
2397
|
-
children: h?.unsorted || p(
|
|
2397
|
+
children: h?.unsorted || p(vr, {})
|
|
2398
2398
|
}) : null,
|
|
2399
|
-
C ? p(
|
|
2399
|
+
C ? p(ur, {
|
|
2400
2400
|
filterPopoverProps: E,
|
|
2401
2401
|
isActive: !!O,
|
|
2402
2402
|
filterPopoverDisableClickOutside: D,
|
|
2403
2403
|
children: C
|
|
2404
2404
|
}) : null
|
|
2405
2405
|
]
|
|
2406
|
-
}), f && r !== "__selection__" ? p(
|
|
2406
|
+
}), f && r !== "__selection__" ? p(_r, {
|
|
2407
2407
|
accessor: r,
|
|
2408
|
-
columnRef:
|
|
2408
|
+
columnRef: L
|
|
2409
2409
|
}) : null]
|
|
2410
2410
|
});
|
|
2411
2411
|
}
|
|
2412
|
-
function
|
|
2412
|
+
function Sr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
|
|
2413
2413
|
let u = !o.disabled;
|
|
2414
|
-
return p(
|
|
2414
|
+
return p(oe, {
|
|
2415
2415
|
ref: l,
|
|
2416
|
-
className: X("mantine-datatable-header-selector-cell", { [
|
|
2416
|
+
className: X("mantine-datatable-header-selector-cell", { [Qn]: n === "cell" && u }, e),
|
|
2417
2417
|
style: t,
|
|
2418
2418
|
rowSpan: c,
|
|
2419
2419
|
"data-shadow-visible": r || void 0,
|
|
2420
2420
|
"data-accessor": "__selection__",
|
|
2421
2421
|
onClick: n === "cell" && u ? s : void 0,
|
|
2422
2422
|
children: p(x, {
|
|
2423
|
-
classNames: u ? { input:
|
|
2423
|
+
classNames: u ? { input: Qn } : void 0,
|
|
2424
2424
|
checked: i,
|
|
2425
2425
|
indeterminate: a,
|
|
2426
2426
|
onChange: s,
|
|
@@ -2429,7 +2429,7 @@ function xr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i,
|
|
|
2429
2429
|
})
|
|
2430
2430
|
});
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2432
|
+
function Cr(e, t) {
|
|
2433
2433
|
let n = (e.columns ?? []).filter((e) => !e.hidden).map((e) => String(e.accessor)), r = n.map((e) => t.get(e)).filter(Boolean);
|
|
2434
2434
|
if (r.length === 0 || r.length !== n.length) return;
|
|
2435
2435
|
let i = new Set(r.map((e) => e.logicalSide));
|
|
@@ -2442,8 +2442,8 @@ function Sr(e, t) {
|
|
|
2442
2442
|
isBoundary: l?.isBoundary ?? !1
|
|
2443
2443
|
};
|
|
2444
2444
|
}
|
|
2445
|
-
function
|
|
2446
|
-
let E = c ?
|
|
2445
|
+
function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r, sortIcons: i, onSortStatusChange: a, columns: o, defaultColumnProps: s, groups: c, pinnedMap: l, selectionTrigger: u, selectionVisible: f, selectionChecked: h, selectionIndeterminate: g, onSelectionChange: _, selectionCheckboxProps: v, selectorCellShadowVisible: y, selectionColumnClassName: b, selectionColumnStyle: S, withColumnBorders: C = !1, ref: w }) {
|
|
2446
|
+
let E = c ? Sn(c) : 0, D = E > 0 ? E + 1 : 1, O = f ? p(Sr, {
|
|
2447
2447
|
ref: e,
|
|
2448
2448
|
className: b,
|
|
2449
2449
|
style: S,
|
|
@@ -2454,7 +2454,7 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2454
2454
|
checkboxProps: v,
|
|
2455
2455
|
onChange: _,
|
|
2456
2456
|
rowSpan: c ? D : void 0
|
|
2457
|
-
}) : null, { columnsToggle: k, setColumnsToggle: A } =
|
|
2457
|
+
}) : null, { columnsToggle: k, setColumnsToggle: A } = dn(), [j, M] = d(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? gn(String(e))])) : void 0, ee = m(se, {
|
|
2458
2458
|
className: X("mantine-datatable-header", t),
|
|
2459
2459
|
style: n,
|
|
2460
2460
|
ref: w,
|
|
@@ -2462,10 +2462,10 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2462
2462
|
e.preventDefault(), M((e) => !e);
|
|
2463
2463
|
} : void 0,
|
|
2464
2464
|
children: [c && Array.from({ length: E }, (e, t) => {
|
|
2465
|
-
let n =
|
|
2466
|
-
return m(ce, { children: [t === 0 && O, n.map((e, r) => p(
|
|
2465
|
+
let n = Tn(c, t);
|
|
2466
|
+
return m(ce, { children: [t === 0 && O, n.map((e, r) => p(sr, {
|
|
2467
2467
|
group: e,
|
|
2468
|
-
pinnedInfo:
|
|
2468
|
+
pinnedInfo: Cr(e, l),
|
|
2469
2469
|
maxDepth: E,
|
|
2470
2470
|
currentDepth: t,
|
|
2471
2471
|
previousGroups: n.slice(0, r),
|
|
@@ -2479,7 +2479,7 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2479
2479
|
...s,
|
|
2480
2480
|
...t
|
|
2481
2481
|
};
|
|
2482
|
-
return p(
|
|
2482
|
+
return p(xr, {
|
|
2483
2483
|
accessor: c,
|
|
2484
2484
|
pinnedInfo: l.get(String(c)),
|
|
2485
2485
|
className: b,
|
|
@@ -2504,16 +2504,16 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2504
2504
|
}, c);
|
|
2505
2505
|
})] })]
|
|
2506
2506
|
});
|
|
2507
|
-
return N ? m(
|
|
2507
|
+
return N ? m(F, {
|
|
2508
2508
|
position: "bottom",
|
|
2509
2509
|
withArrow: !0,
|
|
2510
2510
|
shadow: "md",
|
|
2511
2511
|
opened: j,
|
|
2512
2512
|
onChange: M,
|
|
2513
|
-
children: [p(
|
|
2513
|
+
children: [p(I, { children: ee }), p(te, { children: p(re, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
|
|
2514
2514
|
classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
|
|
2515
2515
|
size: "xs",
|
|
2516
|
-
label:
|
|
2516
|
+
label: P[e.accessor],
|
|
2517
2517
|
checked: e.toggled,
|
|
2518
2518
|
onChange: (t) => {
|
|
2519
2519
|
A(k.map((n) => n.accessor === e.accessor ? {
|
|
@@ -2522,20 +2522,20 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2522
2522
|
} : n));
|
|
2523
2523
|
}
|
|
2524
2524
|
}) }, e.accessor)) }) })]
|
|
2525
|
-
}) :
|
|
2525
|
+
}) : ee;
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2527
|
+
function Tr({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
|
|
2528
2528
|
return p(b, {
|
|
2529
2529
|
className: X("mantine-datatable-loader", { "mantine-datatable-loader-fetching": e }),
|
|
2530
2530
|
style: [{ backdropFilter: n ? `blur(${n}px)` : void 0 }],
|
|
2531
|
-
children: e && (t || p(
|
|
2531
|
+
children: e && (t || p(O, {
|
|
2532
2532
|
size: r,
|
|
2533
2533
|
type: i,
|
|
2534
2534
|
color: a
|
|
2535
2535
|
}))
|
|
2536
2536
|
});
|
|
2537
2537
|
}
|
|
2538
|
-
function
|
|
2538
|
+
function Er() {
|
|
2539
2539
|
return m("svg", {
|
|
2540
2540
|
width: "14",
|
|
2541
2541
|
height: "14",
|
|
@@ -2556,48 +2556,48 @@ function Tr() {
|
|
|
2556
2556
|
]
|
|
2557
2557
|
});
|
|
2558
2558
|
}
|
|
2559
|
-
var
|
|
2560
|
-
xs:
|
|
2561
|
-
sm:
|
|
2562
|
-
md:
|
|
2563
|
-
lg:
|
|
2564
|
-
xl:
|
|
2559
|
+
var Dr = {
|
|
2560
|
+
xs: H(22),
|
|
2561
|
+
sm: H(26),
|
|
2562
|
+
md: H(32),
|
|
2563
|
+
lg: H(38),
|
|
2564
|
+
xl: H(44)
|
|
2565
2565
|
};
|
|
2566
|
-
function
|
|
2566
|
+
function Or({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
|
|
2567
2567
|
return m(T, {
|
|
2568
2568
|
gap: "xs",
|
|
2569
|
-
children: [p(
|
|
2569
|
+
children: [p(V, {
|
|
2570
2570
|
component: "div",
|
|
2571
2571
|
size: e,
|
|
2572
2572
|
children: t
|
|
2573
|
-
}), m(
|
|
2573
|
+
}), m(k, {
|
|
2574
2574
|
withinPortal: !0,
|
|
2575
2575
|
withArrow: !0,
|
|
2576
2576
|
offset: 2,
|
|
2577
2577
|
classNames: { arrow: "mantine-datatable-page-size-selector-menu-arrow" },
|
|
2578
|
-
children: [p(
|
|
2578
|
+
children: [p(M, { children: p(y, {
|
|
2579
2579
|
size: e,
|
|
2580
2580
|
variant: "default",
|
|
2581
2581
|
classNames: { section: "mantine-datatable-page-size-selector-button-icon" },
|
|
2582
|
-
rightSection: p(
|
|
2582
|
+
rightSection: p(Er, {}),
|
|
2583
2583
|
style: [{ fontWeight: "normal" }, (t) => ({
|
|
2584
|
-
height:
|
|
2584
|
+
height: Dr[e],
|
|
2585
2585
|
paddingLeft: t.spacing[e],
|
|
2586
2586
|
paddingRight: t.spacing[e]
|
|
2587
2587
|
})],
|
|
2588
2588
|
children: r
|
|
2589
|
-
}) }), p(
|
|
2589
|
+
}) }), p(A, { children: n.map((t) => {
|
|
2590
2590
|
let n = t === r;
|
|
2591
|
-
return p(
|
|
2591
|
+
return p(j, {
|
|
2592
2592
|
className: X({ "mantine-datatable-page-size-selector-active": n }),
|
|
2593
|
-
style: [{ height:
|
|
2593
|
+
style: [{ height: Dr[e] }, n && (i || a) ? (e) => cn({
|
|
2594
2594
|
theme: e,
|
|
2595
2595
|
paginationActiveTextColor: i,
|
|
2596
2596
|
paginationActiveBackgroundColor: a
|
|
2597
2597
|
}) : void 0],
|
|
2598
2598
|
disabled: n,
|
|
2599
2599
|
onClick: () => o(t),
|
|
2600
|
-
children: p(
|
|
2600
|
+
children: p(V, {
|
|
2601
2601
|
component: "div",
|
|
2602
2602
|
size: e,
|
|
2603
2603
|
children: t
|
|
@@ -2607,7 +2607,7 @@ function Dr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
|
|
|
2607
2607
|
})]
|
|
2608
2608
|
});
|
|
2609
2609
|
}
|
|
2610
|
-
function
|
|
2610
|
+
function kr({ 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: h, totalRecords: g, recordsPerPage: _, onRecordsPerPageChange: y, recordsPerPageLabel: b, recordsPerPageOptions: x, recordsLength: S, horizontalSpacing: C, paginationWrapBreakpoint: w, getPaginationControlProps: T, getPaginationItemProps: E, renderPagination: D }) {
|
|
2611
2611
|
let O;
|
|
2612
2612
|
if (g) {
|
|
2613
2613
|
let e = (r - 1) * _ + 1;
|
|
@@ -2617,15 +2617,15 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2617
2617
|
totalRecords: g
|
|
2618
2618
|
});
|
|
2619
2619
|
} 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) => p(
|
|
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 = !qn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${H(w)}rem` : e[w] || w})`), N = {
|
|
2621
|
+
Text: (e) => p(V, {
|
|
2622
2622
|
component: "div",
|
|
2623
2623
|
className: "mantine-datatable-pagination-text",
|
|
2624
2624
|
size: l,
|
|
2625
2625
|
...e,
|
|
2626
2626
|
children: O
|
|
2627
2627
|
}),
|
|
2628
|
-
PageSizeSelector: (e) => x ? p(
|
|
2628
|
+
PageSizeSelector: (e) => x ? p(Or, {
|
|
2629
2629
|
activeTextColor: s,
|
|
2630
2630
|
activeBackgroundColor: c,
|
|
2631
2631
|
size: l,
|
|
@@ -2640,7 +2640,7 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2640
2640
|
root: X("mantine-datatable-pagination-pages", { "mantine-datatable-pagination-pages-fetching": n || !S }),
|
|
2641
2641
|
control: "mantine-datatable-pagination-pages-control"
|
|
2642
2642
|
},
|
|
2643
|
-
style: s || c ? (e) =>
|
|
2643
|
+
style: s || c ? (e) => cn({
|
|
2644
2644
|
theme: e,
|
|
2645
2645
|
paginationActiveTextColor: s,
|
|
2646
2646
|
paginationActiveBackgroundColor: c
|
|
@@ -2686,18 +2686,18 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2686
2686
|
] })
|
|
2687
2687
|
});
|
|
2688
2688
|
}
|
|
2689
|
-
function
|
|
2690
|
-
return
|
|
2689
|
+
function Ar({ 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: _ }) {
|
|
2690
|
+
return qn(r) ? p(B, {
|
|
2691
2691
|
"data-pinned": n?.position,
|
|
2692
2692
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
2693
2693
|
className: X({
|
|
2694
|
-
[
|
|
2695
|
-
[
|
|
2696
|
-
[
|
|
2697
|
-
[
|
|
2698
|
-
[
|
|
2699
|
-
[
|
|
2700
|
-
[
|
|
2694
|
+
[Xn]: l || u,
|
|
2695
|
+
[Zn]: u,
|
|
2696
|
+
[Qn]: o || s,
|
|
2697
|
+
[$n]: c,
|
|
2698
|
+
[tr]: d === "left",
|
|
2699
|
+
[nr]: d === "center",
|
|
2700
|
+
[rr]: d === "right"
|
|
2701
2701
|
}, e),
|
|
2702
2702
|
style: [
|
|
2703
2703
|
{
|
|
@@ -2716,12 +2716,12 @@ function kr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
|
|
|
2716
2716
|
onDoubleClick: s,
|
|
2717
2717
|
onContextMenu: c,
|
|
2718
2718
|
..._?.(i, a),
|
|
2719
|
-
children: h ? h(i, a) : g ? g(i, a, m) :
|
|
2719
|
+
children: h ? h(i, a) : g ? g(i, a, m) : xn(i, m)
|
|
2720
2720
|
}) : null;
|
|
2721
2721
|
}
|
|
2722
|
-
function
|
|
2723
|
-
let { expanded: i, visible: a } =
|
|
2724
|
-
return a ? m(f, { children: [p(ce, {}), p(ce, { children: p(
|
|
2722
|
+
function jr({ open: e, colSpan: t, content: n, collapseProps: r }) {
|
|
2723
|
+
let { expanded: i, visible: a } = Yn(e, r?.transitionDuration);
|
|
2724
|
+
return a ? m(f, { children: [p(ce, {}), p(ce, { children: p(B, {
|
|
2725
2725
|
className: "mantine-datatable-row-expansion-cell",
|
|
2726
2726
|
colSpan: t,
|
|
2727
2727
|
children: p(S, {
|
|
@@ -2734,28 +2734,28 @@ function Ar({ open: e, colSpan: t, content: n, collapseProps: r }) {
|
|
|
2734
2734
|
})
|
|
2735
2735
|
}) })] }) : null;
|
|
2736
2736
|
}
|
|
2737
|
-
function
|
|
2737
|
+
function Mr({ className: e, style: t, record: n, index: r, trigger: i, onChange: a, withRightShadow: o, checkboxProps: s, getCheckboxProps: c, ...l }) {
|
|
2738
2738
|
let u = {
|
|
2739
2739
|
...s,
|
|
2740
2740
|
...c(n, r)
|
|
2741
2741
|
}, d = !l.disabled && !u.disabled, f = (e) => {
|
|
2742
2742
|
e.stopPropagation(), i === "cell" && d && a?.(e);
|
|
2743
2743
|
};
|
|
2744
|
-
return p(
|
|
2745
|
-
className: X("mantine-datatable-row-selector-cell", { [
|
|
2744
|
+
return p(B, {
|
|
2745
|
+
className: X("mantine-datatable-row-selector-cell", { [Qn]: i === "cell" && d }, e),
|
|
2746
2746
|
style: t,
|
|
2747
2747
|
"data-shadow-visible": o || void 0,
|
|
2748
2748
|
onClick: f,
|
|
2749
2749
|
children: p(x, {
|
|
2750
|
-
classNames: d ? { input:
|
|
2750
|
+
classNames: d ? { input: Qn } : void 0,
|
|
2751
2751
|
onChange: a,
|
|
2752
2752
|
...l,
|
|
2753
2753
|
...u
|
|
2754
2754
|
})
|
|
2755
2755
|
});
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2758
|
-
let M = m(f, { children: [s && p(
|
|
2757
|
+
function Nr({ 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: h, 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 }) {
|
|
2758
|
+
let M = m(f, { children: [s && p(Mr, {
|
|
2759
2759
|
className: k,
|
|
2760
2760
|
style: A,
|
|
2761
2761
|
record: e,
|
|
@@ -2773,7 +2773,7 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2773
2773
|
...r,
|
|
2774
2774
|
...s
|
|
2775
2775
|
};
|
|
2776
|
-
return p(
|
|
2776
|
+
return p(Ar, {
|
|
2777
2777
|
pinnedInfo: i.get(String(l)),
|
|
2778
2778
|
className: typeof _ == "function" ? _(e, t) : _,
|
|
2779
2779
|
style: v?.(e, t),
|
|
@@ -2810,7 +2810,7 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2810
2810
|
defaultRender: a,
|
|
2811
2811
|
customCellAttributes: S
|
|
2812
2812
|
}, l);
|
|
2813
|
-
})] }), N = S && p(
|
|
2813
|
+
})] }), N = S && p(jr, {
|
|
2814
2814
|
colSpan: n.filter(({ hidden: e }) => !e).length + +!!s,
|
|
2815
2815
|
open: S.isRowExpanded(e),
|
|
2816
2816
|
content: S.content({
|
|
@@ -2818,7 +2818,7 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2818
2818
|
index: t
|
|
2819
2819
|
}),
|
|
2820
2820
|
collapseProps: S.collapseProps
|
|
2821
|
-
}),
|
|
2821
|
+
}), P = Pr({
|
|
2822
2822
|
record: e,
|
|
2823
2823
|
index: t,
|
|
2824
2824
|
selectionChecked: c,
|
|
@@ -2835,20 +2835,20 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2835
2835
|
return j ? j({
|
|
2836
2836
|
record: e,
|
|
2837
2837
|
index: t,
|
|
2838
|
-
rowProps:
|
|
2838
|
+
rowProps: P,
|
|
2839
2839
|
children: M,
|
|
2840
2840
|
expandedElement: N
|
|
2841
2841
|
}) : m(f, { children: [p(ce, {
|
|
2842
|
-
...
|
|
2842
|
+
...P,
|
|
2843
2843
|
children: M
|
|
2844
2844
|
}), N] });
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function Pr({ 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
2847
|
return {
|
|
2848
|
-
className: X("mantine-datatable-row", { [
|
|
2848
|
+
className: X("mantine-datatable-row", { [Qn]: r || i || o?.isExpandable({
|
|
2849
2849
|
record: e,
|
|
2850
2850
|
index: t
|
|
2851
|
-
}) && o?.expandOnClick }, { [
|
|
2851
|
+
}) && o?.expandOnClick }, { [$n]: a }, typeof u == "function" ? u(e, t) : u),
|
|
2852
2852
|
"data-selected": n || void 0,
|
|
2853
2853
|
onClick: (n) => {
|
|
2854
2854
|
if (o) {
|
|
@@ -2876,7 +2876,7 @@ function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
|
|
|
2876
2876
|
}) : void 0,
|
|
2877
2877
|
style: [c || l ? (n) => {
|
|
2878
2878
|
let r = c?.(e, t), i = l?.(e, t);
|
|
2879
|
-
return
|
|
2879
|
+
return ln({
|
|
2880
2880
|
theme: n,
|
|
2881
2881
|
color: r,
|
|
2882
2882
|
backgroundColor: i
|
|
@@ -2885,8 +2885,8 @@ function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
|
|
|
2885
2885
|
...s?.(e, t) ?? {}
|
|
2886
2886
|
};
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2889
|
-
return m(
|
|
2888
|
+
function Fr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
|
|
2889
|
+
return m(L, {
|
|
2890
2890
|
...a,
|
|
2891
2891
|
viewportRef: i,
|
|
2892
2892
|
classNames: {
|
|
@@ -2905,91 +2905,91 @@ function Pr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
|
|
|
2905
2905
|
]
|
|
2906
2906
|
});
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2909
|
-
let
|
|
2908
|
+
function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: _, 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: R, recordsPerPage: re, onRecordsPerPageChange: ie, recordsPerPageOptions: B, recordsPerPageLabel: ae = "Records per page", paginationWithEdges: oe, paginationWithControls: se, paginationActiveTextColor: ce, paginationActiveBackgroundColor: le, paginationSize: V = "sm", paginationText: ue = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: de = "sm", getPaginationControlProps: fe = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: pe, renderPagination: me, loaderBackgroundBlur: H, customLoader: he, loaderSize: ge, loaderType: _e, loaderColor: ve, loadingText: ye = "...", emptyState: be, noRecordsText: xe = "No records", noRecordsIcon: Se, highlightOnHover: Ce, striped: we, noHeader: Te, onRowClick: Ee, onRowDoubleClick: De, onRowContextMenu: Oe, onCellClick: ke, onCellDoubleClick: Ae, onCellContextMenu: je, onScroll: Me, onScrollToTop: Pe, onScrollToBottom: Fe, onScrollToLeft: Ie, onScrollToRight: Le, c: Re, backgroundColor: ze, borderColor: Be, rowBorderColor: Ve, stripedColor: He, highlightOnHoverColor: Ue, rowColor: We, rowBackgroundColor: U, rowExpansion: Ge, rowClassName: Ke, rowStyle: W, customRowAttributes: qe, scrollViewportRef: Je, scrollAreaProps: Ye, tableRef: Xe, bodyRef: G, m: K, my: Ze, mx: Qe, mt: $e, mb: et, ml: tt, mr: nt, className: rt, classNames: it, style: at, styles: q, rowFactory: ot, tableWrapper: st, ...ct }) {
|
|
2909
|
+
let lt = l(() => y ? Cn(y) : g, [g, y]), { refs: J, onScroll: ut } = Bn({
|
|
2910
2910
|
scrollCallbacks: {
|
|
2911
|
-
onScroll:
|
|
2912
|
-
onScrollToTop:
|
|
2911
|
+
onScroll: Me,
|
|
2912
|
+
onScrollToTop: Pe,
|
|
2913
2913
|
onScrollToBottom: Fe,
|
|
2914
2914
|
onScrollToLeft: Ie,
|
|
2915
|
-
onScrollToRight:
|
|
2915
|
+
onScrollToRight: Le
|
|
2916
2916
|
},
|
|
2917
|
-
withRowBorders:
|
|
2918
|
-
}),
|
|
2917
|
+
withRowBorders: ct.withRowBorders
|
|
2918
|
+
}), Y = jn({
|
|
2919
2919
|
key: _,
|
|
2920
|
-
columns:
|
|
2921
|
-
headerRef:
|
|
2922
|
-
scrollViewportRef:
|
|
2923
|
-
}),
|
|
2924
|
-
rowExpansion:
|
|
2920
|
+
columns: lt,
|
|
2921
|
+
headerRef: J.header,
|
|
2922
|
+
scrollViewportRef: J.scrollViewport
|
|
2923
|
+
}), dt = Y.effectiveColumns, ft = Ne(J.table, Xe), pt = Ne(J.scrollViewport, Je), mt = u(null), ht = Ne(mt, G), gt = Jn({
|
|
2924
|
+
rowExpansion: Ge,
|
|
2925
2925
|
records: T,
|
|
2926
2926
|
idAccessor: w
|
|
2927
|
-
}), { pinnedMap:
|
|
2928
|
-
columns:
|
|
2929
|
-
theadRef:
|
|
2930
|
-
tbodyRef:
|
|
2931
|
-
selectionColumnHeaderRef:
|
|
2927
|
+
}), { pinnedMap: _t, hasLeftPinned: vt, hasRightPinned: yt } = Vn({
|
|
2928
|
+
columns: dt,
|
|
2929
|
+
theadRef: J.header,
|
|
2930
|
+
tbodyRef: mt,
|
|
2931
|
+
selectionColumnHeaderRef: J.selectionColumnHeader,
|
|
2932
2932
|
selectionVisible: !!D,
|
|
2933
2933
|
pinFirstColumn: b,
|
|
2934
2934
|
pinLastColumn: x
|
|
2935
|
-
}),
|
|
2936
|
-
|
|
2937
|
-
}, [
|
|
2935
|
+
}), bt = u(!1), xt = u(L), St = u(T), Ct = a((e) => {
|
|
2936
|
+
bt.current = !0, St.current = T, ne(e);
|
|
2937
|
+
}, [ne, T]);
|
|
2938
2938
|
s(() => {
|
|
2939
|
-
|
|
2940
|
-
}, [
|
|
2941
|
-
let
|
|
2939
|
+
xt.current !== L && (bt.current = !0, St.current = T, xt.current = L);
|
|
2940
|
+
}, [L, T]);
|
|
2941
|
+
let wt = T?.length;
|
|
2942
2942
|
c(() => {
|
|
2943
|
-
if (!
|
|
2944
|
-
let e =
|
|
2943
|
+
if (!bt.current || h || T === St.current) return;
|
|
2944
|
+
let e = J.scrollViewport.current;
|
|
2945
2945
|
if (!e) return;
|
|
2946
2946
|
let t = requestAnimationFrame(() => {
|
|
2947
2947
|
e.scrollTo({
|
|
2948
2948
|
top: 0,
|
|
2949
2949
|
left: 0
|
|
2950
|
-
}),
|
|
2950
|
+
}), bt.current = !1;
|
|
2951
2951
|
});
|
|
2952
2952
|
return () => cancelAnimationFrame(t);
|
|
2953
2953
|
}, [
|
|
2954
2954
|
h,
|
|
2955
2955
|
T,
|
|
2956
|
-
|
|
2956
|
+
J.scrollViewport
|
|
2957
2957
|
]);
|
|
2958
|
-
let
|
|
2959
|
-
D && O && O(
|
|
2958
|
+
let Tt = T?.map((e) => Q(e, w)), Et = !!D, Dt = D?.map((e) => Q(e, w)), Ot = Tt !== void 0 && Dt !== void 0 && Dt.length > 0, kt = j ? T?.filter(j) : T, At = kt?.map((e) => Q(e, w)), jt = Ot && At.every((e) => Dt.includes(e)), Mt = Ot && At.some((e) => Dt.includes(e)), Nt = a(() => {
|
|
2959
|
+
D && O && O(jt ? D.filter((e) => !At.includes(Q(e, w))) : bn([...D, ...kt], (e) => Q(e, w)));
|
|
2960
2960
|
}, [
|
|
2961
|
-
|
|
2961
|
+
jt,
|
|
2962
2962
|
w,
|
|
2963
2963
|
O,
|
|
2964
|
-
jt,
|
|
2965
2964
|
At,
|
|
2965
|
+
kt,
|
|
2966
2966
|
D
|
|
2967
|
-
]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } =
|
|
2968
|
-
m:
|
|
2967
|
+
]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = Hn(Tt), It = Et && !vt, Lt = {
|
|
2968
|
+
m: K,
|
|
2969
2969
|
my: Ze,
|
|
2970
2970
|
mx: Qe,
|
|
2971
2971
|
mt: $e,
|
|
2972
2972
|
mb: et,
|
|
2973
2973
|
ml: tt,
|
|
2974
2974
|
mr: nt
|
|
2975
|
-
}, Rt = a(({ children: e }) =>
|
|
2976
|
-
return p(
|
|
2977
|
-
...
|
|
2978
|
-
pinnedMap:
|
|
2975
|
+
}, Rt = a(({ children: e }) => st ? st({ children: e }) : e, [st]);
|
|
2976
|
+
return p(fn, {
|
|
2977
|
+
...Y,
|
|
2978
|
+
pinnedMap: _t,
|
|
2979
2979
|
children: m(v, {
|
|
2980
|
-
ref:
|
|
2980
|
+
ref: J.root,
|
|
2981
2981
|
...Lt,
|
|
2982
2982
|
className: X("mantine-datatable", { "mantine-datatable-with-border": e }, rt, it?.root),
|
|
2983
2983
|
style: [
|
|
2984
2984
|
(e) => ({
|
|
2985
|
-
...
|
|
2985
|
+
...sn({
|
|
2986
2986
|
theme: e,
|
|
2987
|
-
c:
|
|
2988
|
-
backgroundColor:
|
|
2989
|
-
borderColor:
|
|
2990
|
-
rowBorderColor:
|
|
2991
|
-
stripedColor:
|
|
2992
|
-
highlightOnHoverColor:
|
|
2987
|
+
c: Re,
|
|
2988
|
+
backgroundColor: ze,
|
|
2989
|
+
borderColor: Be,
|
|
2990
|
+
rowBorderColor: Ve,
|
|
2991
|
+
stripedColor: He,
|
|
2992
|
+
highlightOnHoverColor: Ue
|
|
2993
2993
|
}),
|
|
2994
2994
|
borderRadius: e.radius[t] || t,
|
|
2995
2995
|
boxShadow: e.shadows[d] || d,
|
|
@@ -2998,56 +2998,56 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
2998
2998
|
maxHeight: o
|
|
2999
2999
|
}),
|
|
3000
3000
|
at,
|
|
3001
|
-
|
|
3001
|
+
q?.root,
|
|
3002
3002
|
{ position: "relative" }
|
|
3003
3003
|
],
|
|
3004
3004
|
children: [
|
|
3005
|
-
p(
|
|
3006
|
-
viewportRef:
|
|
3007
|
-
leftShadowBehind:
|
|
3008
|
-
rightShadowBehind:
|
|
3009
|
-
onScrollPositionChange:
|
|
3010
|
-
scrollAreaProps:
|
|
3011
|
-
children: p(Rt, { children: m(
|
|
3012
|
-
ref:
|
|
3013
|
-
horizontalSpacing:
|
|
3005
|
+
p(Fr, {
|
|
3006
|
+
viewportRef: pt,
|
|
3007
|
+
leftShadowBehind: Et || vt,
|
|
3008
|
+
rightShadowBehind: yt,
|
|
3009
|
+
onScrollPositionChange: ut,
|
|
3010
|
+
scrollAreaProps: Ye,
|
|
3011
|
+
children: p(Rt, { children: m(z, {
|
|
3012
|
+
ref: ft,
|
|
3013
|
+
horizontalSpacing: I,
|
|
3014
3014
|
className: X("mantine-datatable-table", {
|
|
3015
|
-
[
|
|
3015
|
+
[er]: n,
|
|
3016
3016
|
"mantine-datatable-vertical-align-top": f === "top",
|
|
3017
3017
|
"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":
|
|
3018
|
+
"mantine-datatable-selection-column-visible": Et,
|
|
3019
|
+
"mantine-datatable-resizable-columns": Y.hasResizableColumns,
|
|
3020
|
+
"mantine-datatable-resize-locked": Y.isLocked,
|
|
3021
|
+
"mantine-datatable-resizing": Y.isResizing
|
|
3022
3022
|
}, it?.table),
|
|
3023
3023
|
style: {
|
|
3024
|
-
...
|
|
3025
|
-
...
|
|
3026
|
-
...
|
|
3024
|
+
...q?.table,
|
|
3025
|
+
...Y.isLocked ? { tableLayout: "fixed" } : null,
|
|
3026
|
+
...Y.tableWidth == null ? null : { width: `${Y.tableWidth}px` }
|
|
3027
3027
|
},
|
|
3028
|
-
"data-striped":
|
|
3029
|
-
"data-highlight-on-hover":
|
|
3030
|
-
...
|
|
3028
|
+
"data-striped": wt && we || void 0,
|
|
3029
|
+
"data-highlight-on-hover": Ce || void 0,
|
|
3030
|
+
...ct,
|
|
3031
3031
|
children: [
|
|
3032
|
-
|
|
3033
|
-
...
|
|
3034
|
-
pinnedMap:
|
|
3035
|
-
children: p(
|
|
3036
|
-
ref:
|
|
3037
|
-
selectionColumnHeaderRef:
|
|
3032
|
+
Te ? null : p(fn, {
|
|
3033
|
+
...Y,
|
|
3034
|
+
pinnedMap: _t,
|
|
3035
|
+
children: p(wr, {
|
|
3036
|
+
ref: J.header,
|
|
3037
|
+
selectionColumnHeaderRef: J.selectionColumnHeader,
|
|
3038
3038
|
className: it?.header,
|
|
3039
|
-
style:
|
|
3040
|
-
columns:
|
|
3039
|
+
style: q?.header,
|
|
3040
|
+
columns: dt,
|
|
3041
3041
|
defaultColumnProps: S,
|
|
3042
3042
|
groups: y,
|
|
3043
|
-
pinnedMap:
|
|
3044
|
-
sortStatus:
|
|
3045
|
-
sortIcons:
|
|
3046
|
-
onSortStatusChange:
|
|
3043
|
+
pinnedMap: _t,
|
|
3044
|
+
sortStatus: ee,
|
|
3045
|
+
sortIcons: F,
|
|
3046
|
+
onSortStatusChange: te,
|
|
3047
3047
|
selectionTrigger: E,
|
|
3048
|
-
selectionVisible:
|
|
3049
|
-
selectionChecked:
|
|
3050
|
-
selectionIndeterminate: Mt && !
|
|
3048
|
+
selectionVisible: Et,
|
|
3049
|
+
selectionChecked: jt,
|
|
3050
|
+
selectionIndeterminate: Mt && !jt,
|
|
3051
3051
|
onSelectionChange: Nt,
|
|
3052
3052
|
selectionCheckboxProps: {
|
|
3053
3053
|
...M,
|
|
@@ -3056,105 +3056,105 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
3056
3056
|
selectorCellShadowVisible: It,
|
|
3057
3057
|
selectionColumnClassName: k,
|
|
3058
3058
|
selectionColumnStyle: A,
|
|
3059
|
-
withColumnBorders:
|
|
3059
|
+
withColumnBorders: ct.withColumnBorders
|
|
3060
3060
|
})
|
|
3061
3061
|
}),
|
|
3062
3062
|
p("tbody", {
|
|
3063
|
-
ref:
|
|
3064
|
-
children:
|
|
3065
|
-
let n = Q(e, w), r =
|
|
3063
|
+
ref: ht,
|
|
3064
|
+
children: wt ? T.map((e, t) => {
|
|
3065
|
+
let n = Q(e, w), r = Dt?.includes(n) || !1, i;
|
|
3066
3066
|
return O && D && (i = (i) => {
|
|
3067
3067
|
if (i.nativeEvent.shiftKey && Pt !== null) {
|
|
3068
3068
|
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));
|
|
3069
|
-
O(r ?
|
|
3070
|
-
} else O(r ? D.filter((e) => Q(e, w) !== n) :
|
|
3069
|
+
O(r ? yn(D, e, (e) => Q(e, w)) : bn([...D, ...e], (e) => Q(e, w)));
|
|
3070
|
+
} else O(r ? D.filter((e) => Q(e, w) !== n) : bn([...D, e], (e) => Q(e, w)));
|
|
3071
3071
|
Ft(t);
|
|
3072
|
-
}), p(
|
|
3072
|
+
}), p(Nr, {
|
|
3073
3073
|
record: e,
|
|
3074
3074
|
index: t,
|
|
3075
|
-
columns:
|
|
3075
|
+
columns: dt,
|
|
3076
3076
|
defaultColumnProps: S,
|
|
3077
|
-
pinnedMap:
|
|
3077
|
+
pinnedMap: _t,
|
|
3078
3078
|
defaultColumnRender: C,
|
|
3079
3079
|
selectionTrigger: E,
|
|
3080
|
-
selectionVisible:
|
|
3080
|
+
selectionVisible: Et,
|
|
3081
3081
|
selectionChecked: r,
|
|
3082
3082
|
onSelectionChange: i,
|
|
3083
3083
|
isRecordSelectable: j,
|
|
3084
3084
|
selectionCheckboxProps: M,
|
|
3085
|
-
getSelectionCheckboxProps:
|
|
3086
|
-
onClick:
|
|
3087
|
-
onDoubleClick:
|
|
3088
|
-
onCellClick:
|
|
3089
|
-
onCellDoubleClick:
|
|
3090
|
-
onContextMenu:
|
|
3091
|
-
onCellContextMenu:
|
|
3092
|
-
expansion:
|
|
3093
|
-
color:
|
|
3094
|
-
backgroundColor:
|
|
3095
|
-
className:
|
|
3096
|
-
style:
|
|
3085
|
+
getSelectionCheckboxProps: P,
|
|
3086
|
+
onClick: Ee,
|
|
3087
|
+
onDoubleClick: De,
|
|
3088
|
+
onCellClick: ke,
|
|
3089
|
+
onCellDoubleClick: Ae,
|
|
3090
|
+
onContextMenu: Oe,
|
|
3091
|
+
onCellContextMenu: je,
|
|
3092
|
+
expansion: gt,
|
|
3093
|
+
color: We,
|
|
3094
|
+
backgroundColor: U,
|
|
3095
|
+
className: Ke,
|
|
3096
|
+
style: W,
|
|
3097
3097
|
customAttributes: qe,
|
|
3098
3098
|
selectorCellShadowVisible: It,
|
|
3099
3099
|
selectionColumnClassName: k,
|
|
3100
3100
|
selectionColumnStyle: A,
|
|
3101
3101
|
idAccessor: w,
|
|
3102
|
-
rowFactory:
|
|
3102
|
+
rowFactory: ot
|
|
3103
3103
|
}, n);
|
|
3104
|
-
}) : p(
|
|
3104
|
+
}) : p(pn, {})
|
|
3105
3105
|
}),
|
|
3106
|
-
|
|
3107
|
-
ref:
|
|
3106
|
+
dt.some(({ footer: e }) => e) && p(or, {
|
|
3107
|
+
ref: J.footer,
|
|
3108
3108
|
className: it?.footer,
|
|
3109
|
-
style:
|
|
3110
|
-
columns:
|
|
3109
|
+
style: q?.footer,
|
|
3110
|
+
columns: dt,
|
|
3111
3111
|
defaultColumnProps: S,
|
|
3112
|
-
pinnedMap:
|
|
3113
|
-
selectionVisible:
|
|
3112
|
+
pinnedMap: _t,
|
|
3113
|
+
selectionVisible: Et,
|
|
3114
3114
|
selectorCellShadowVisible: It
|
|
3115
3115
|
})
|
|
3116
3116
|
]
|
|
3117
3117
|
}) })
|
|
3118
3118
|
}),
|
|
3119
|
-
!!(
|
|
3119
|
+
!!(L && wt) && p(kr, {
|
|
3120
3120
|
className: it?.pagination,
|
|
3121
|
-
style:
|
|
3122
|
-
horizontalSpacing:
|
|
3121
|
+
style: q?.pagination,
|
|
3122
|
+
horizontalSpacing: I,
|
|
3123
3123
|
fetching: h,
|
|
3124
|
-
page:
|
|
3125
|
-
onPageChange:
|
|
3126
|
-
totalRecords:
|
|
3127
|
-
recordsPerPage:
|
|
3128
|
-
onRecordsPerPageChange:
|
|
3129
|
-
recordsPerPageOptions:
|
|
3130
|
-
recordsPerPageLabel:
|
|
3131
|
-
paginationWithEdges:
|
|
3132
|
-
paginationWithControls:
|
|
3133
|
-
paginationActiveTextColor:
|
|
3134
|
-
paginationActiveBackgroundColor:
|
|
3135
|
-
paginationSize:
|
|
3136
|
-
paginationText:
|
|
3137
|
-
paginationWrapBreakpoint:
|
|
3138
|
-
getPaginationControlProps:
|
|
3139
|
-
getPaginationItemProps:
|
|
3140
|
-
noRecordsText:
|
|
3141
|
-
loadingText:
|
|
3142
|
-
recordsLength:
|
|
3143
|
-
renderPagination:
|
|
3124
|
+
page: L,
|
|
3125
|
+
onPageChange: Ct,
|
|
3126
|
+
totalRecords: R,
|
|
3127
|
+
recordsPerPage: re,
|
|
3128
|
+
onRecordsPerPageChange: ie,
|
|
3129
|
+
recordsPerPageOptions: B,
|
|
3130
|
+
recordsPerPageLabel: ae,
|
|
3131
|
+
paginationWithEdges: oe,
|
|
3132
|
+
paginationWithControls: se,
|
|
3133
|
+
paginationActiveTextColor: ce,
|
|
3134
|
+
paginationActiveBackgroundColor: le,
|
|
3135
|
+
paginationSize: V,
|
|
3136
|
+
paginationText: ue,
|
|
3137
|
+
paginationWrapBreakpoint: de,
|
|
3138
|
+
getPaginationControlProps: fe,
|
|
3139
|
+
getPaginationItemProps: pe,
|
|
3140
|
+
noRecordsText: xe,
|
|
3141
|
+
loadingText: ye,
|
|
3142
|
+
recordsLength: wt,
|
|
3143
|
+
renderPagination: me
|
|
3144
3144
|
}),
|
|
3145
|
-
p(
|
|
3145
|
+
p(Tr, {
|
|
3146
3146
|
fetching: h,
|
|
3147
|
-
backgroundBlur:
|
|
3148
|
-
customContent:
|
|
3149
|
-
size:
|
|
3150
|
-
type:
|
|
3151
|
-
color:
|
|
3147
|
+
backgroundBlur: H,
|
|
3148
|
+
customContent: he,
|
|
3149
|
+
size: ge,
|
|
3150
|
+
type: _e,
|
|
3151
|
+
color: ve
|
|
3152
3152
|
}),
|
|
3153
|
-
p(
|
|
3154
|
-
icon:
|
|
3155
|
-
text:
|
|
3156
|
-
active: !h && !
|
|
3157
|
-
children:
|
|
3153
|
+
p(hn, {
|
|
3154
|
+
icon: Se,
|
|
3155
|
+
text: xe,
|
|
3156
|
+
active: !h && !wt,
|
|
3157
|
+
children: be
|
|
3158
3158
|
})
|
|
3159
3159
|
]
|
|
3160
3160
|
})
|
|
@@ -3162,26 +3162,26 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
3162
3162
|
}
|
|
3163
3163
|
//#endregion
|
|
3164
3164
|
//#region src/DataTable/UpdateModal.tsx
|
|
3165
|
-
function
|
|
3166
|
-
let { data: s, isLoading: c } =
|
|
3167
|
-
return c || !s ? /* @__PURE__ */ m(
|
|
3165
|
+
function Lr({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
|
|
3166
|
+
let { data: s, isLoading: c } = Ut(i, n, a), { mutateAsync: l, isPending: u, error: d } = qt(i, n, r);
|
|
3167
|
+
return c || !s ? /* @__PURE__ */ m(re, {
|
|
3168
3168
|
gap: "md",
|
|
3169
3169
|
children: [
|
|
3170
|
-
/* @__PURE__ */ p(
|
|
3171
|
-
Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(
|
|
3170
|
+
/* @__PURE__ */ p(R, { height: 40 }),
|
|
3171
|
+
Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, t)),
|
|
3172
3172
|
/* @__PURE__ */ m(T, {
|
|
3173
3173
|
mt: "md",
|
|
3174
3174
|
justify: "end",
|
|
3175
|
-
children: [/* @__PURE__ */ p(
|
|
3175
|
+
children: [/* @__PURE__ */ p(R, {
|
|
3176
3176
|
width: 100,
|
|
3177
3177
|
height: 36
|
|
3178
|
-
}), /* @__PURE__ */ p(
|
|
3178
|
+
}), /* @__PURE__ */ p(R, {
|
|
3179
3179
|
width: 100,
|
|
3180
3180
|
height: 36
|
|
3181
3181
|
})]
|
|
3182
3182
|
})
|
|
3183
3183
|
]
|
|
3184
|
-
}) : /* @__PURE__ */ p(
|
|
3184
|
+
}) : /* @__PURE__ */ p(rn, {
|
|
3185
3185
|
fields: e,
|
|
3186
3186
|
steps: o,
|
|
3187
3187
|
record: s,
|
|
@@ -3199,8 +3199,8 @@ function Ir({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath
|
|
|
3199
3199
|
}
|
|
3200
3200
|
//#endregion
|
|
3201
3201
|
//#region src/DataTable/DeleteModal.tsx
|
|
3202
|
-
function
|
|
3203
|
-
let { mutateAsync: o, isError: c, error: l, isPending: u } =
|
|
3202
|
+
function Rr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
|
|
3203
|
+
let { mutateAsync: o, isError: c, error: l, isPending: u } = Jt(n, e, t), [h, g] = d(i), [v, b] = d(!1), x = v || u;
|
|
3204
3204
|
return s(() => {
|
|
3205
3205
|
h.length || r();
|
|
3206
3206
|
}, [r, h]), h.length ? /* @__PURE__ */ m(f, { children: [
|
|
@@ -3210,7 +3210,7 @@ function Lr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
|
|
|
3210
3210
|
title: l.name,
|
|
3211
3211
|
children: l.message
|
|
3212
3212
|
}),
|
|
3213
|
-
/* @__PURE__ */ p(
|
|
3213
|
+
/* @__PURE__ */ p(V, { children: a ? a(h) : h.length === 1 ? `Soll ${h.length} Eintrag wirklich gelöscht werden?` : `Sollen ${h.length} Einträge wirklich gelöscht werden?` }),
|
|
3214
3214
|
/* @__PURE__ */ m(T, {
|
|
3215
3215
|
mt: "md",
|
|
3216
3216
|
justify: "end",
|
|
@@ -3237,7 +3237,7 @@ function Lr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
|
|
|
3237
3237
|
}
|
|
3238
3238
|
//#endregion
|
|
3239
3239
|
//#region src/Hooks/usePersistentState.ts
|
|
3240
|
-
function
|
|
3240
|
+
function zr(e, t) {
|
|
3241
3241
|
let n = `use_persistent_storage_${t}`, [r, i] = d(() => {
|
|
3242
3242
|
try {
|
|
3243
3243
|
let t = localStorage.getItem(n);
|
|
@@ -3255,12 +3255,12 @@ function Rr(e, t) {
|
|
|
3255
3255
|
}
|
|
3256
3256
|
//#endregion
|
|
3257
3257
|
//#region src/utils/sort.ts
|
|
3258
|
-
var
|
|
3258
|
+
var Br = [
|
|
3259
3259
|
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,
|
|
3260
3260
|
/^\d{4}-\d{2}-\d{2}$/,
|
|
3261
3261
|
/^\d{1,2}\/\d{1,2}\/\d{4}$/,
|
|
3262
3262
|
/^\d{1,2}\.\d{1,2}\.\d{4}$/
|
|
3263
|
-
],
|
|
3263
|
+
], Vr = (e, t) => {
|
|
3264
3264
|
let n = e.map((e) => e[t]).filter((e) => e != null && e !== "");
|
|
3265
3265
|
if (n.length === 0) return "string";
|
|
3266
3266
|
let r = n.slice(0, 100), i = {
|
|
@@ -3276,7 +3276,7 @@ var zr = [
|
|
|
3276
3276
|
i.number++;
|
|
3277
3277
|
return;
|
|
3278
3278
|
}
|
|
3279
|
-
if (
|
|
3279
|
+
if (Br.some((e) => e.test(t))) {
|
|
3280
3280
|
let e = new Date(t);
|
|
3281
3281
|
if (!isNaN(e.getTime())) {
|
|
3282
3282
|
i.date++;
|
|
@@ -3289,7 +3289,7 @@ var zr = [
|
|
|
3289
3289
|
let a = i.string + i.number + i.date;
|
|
3290
3290
|
return i.date / a >= .6 ? "date" : i.number / a >= .6 ? "number" : i.string / a >= .6 ? "string" : "mixed";
|
|
3291
3291
|
};
|
|
3292
|
-
function
|
|
3292
|
+
function Hr(e, t) {
|
|
3293
3293
|
switch (t) {
|
|
3294
3294
|
case "date":
|
|
3295
3295
|
if (typeof e == "string") {
|
|
@@ -3305,54 +3305,54 @@ function Vr(e, t) {
|
|
|
3305
3305
|
default: return String(e).toLowerCase().trim();
|
|
3306
3306
|
}
|
|
3307
3307
|
}
|
|
3308
|
-
var
|
|
3308
|
+
var Ur = (e, t, n = "asc") => {
|
|
3309
3309
|
if (!e || e.length === 0) return [];
|
|
3310
|
-
let r =
|
|
3310
|
+
let r = Vr(e, t);
|
|
3311
3311
|
return [...e].sort((e, i) => {
|
|
3312
3312
|
let a = e[t], o = i[t], s = a == null || a === "", c = o == null || o === "";
|
|
3313
3313
|
if (s && c) return 0;
|
|
3314
3314
|
if (s) return n === "asc" ? -1 : 1;
|
|
3315
3315
|
if (c) return n === "asc" ? 1 : -1;
|
|
3316
|
-
let l =
|
|
3316
|
+
let l = Hr(a, r), u = Hr(o, r);
|
|
3317
3317
|
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
3318
|
});
|
|
3319
3319
|
};
|
|
3320
3320
|
//#endregion
|
|
3321
3321
|
//#region src/utils/filter.ts
|
|
3322
|
-
function
|
|
3322
|
+
function Wr(e) {
|
|
3323
3323
|
return !!e && typeof e == "object" && "id" in e;
|
|
3324
3324
|
}
|
|
3325
|
-
function
|
|
3325
|
+
function Gr(e, t) {
|
|
3326
3326
|
if (typeof e == "string" || typeof e == "number") return t.includes(String(e));
|
|
3327
3327
|
if (e && typeof e == "object") {
|
|
3328
3328
|
let n = e;
|
|
3329
|
-
return
|
|
3329
|
+
return Wr(n) && t.includes(n.id) ? !0 : Object.values(n).some((e) => typeof e == "string" && t.includes(e) || Wr(e) && t.includes(e.id));
|
|
3330
3330
|
}
|
|
3331
3331
|
return !1;
|
|
3332
3332
|
}
|
|
3333
|
-
function
|
|
3334
|
-
return Array.isArray(t) ? Array.isArray(e) ? e.some((e) =>
|
|
3333
|
+
function Kr(e, t) {
|
|
3334
|
+
return Array.isArray(t) ? Array.isArray(e) ? e.some((e) => Gr(e, t)) : Wr(e) ? t.includes(e.id) : !1 : typeof e == "string" && e.includes(t);
|
|
3335
3335
|
}
|
|
3336
|
-
function
|
|
3336
|
+
function qr(e, [t, n]) {
|
|
3337
3337
|
if (!t && !n || typeof e != "string") return !0;
|
|
3338
3338
|
let r = e.split(" ")[0];
|
|
3339
3339
|
return t && n ? r >= t && r <= n : t ? r >= t : r <= n;
|
|
3340
3340
|
}
|
|
3341
|
-
function
|
|
3341
|
+
function Jr(e, t) {
|
|
3342
3342
|
if (t.value === void 0) return !0;
|
|
3343
3343
|
let n = e[t.id];
|
|
3344
3344
|
switch (t.type) {
|
|
3345
|
-
case "query": return
|
|
3346
|
-
case "date": return
|
|
3345
|
+
case "query": return Kr(n, t.value);
|
|
3346
|
+
case "date": return qr(n, t.value);
|
|
3347
3347
|
case "boolean": return n === t.value;
|
|
3348
3348
|
}
|
|
3349
3349
|
}
|
|
3350
|
-
function
|
|
3351
|
-
return !t || t.length === 0 ? e : e.filter((e) => t.every((t) =>
|
|
3350
|
+
function Yr(e, t) {
|
|
3351
|
+
return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => Jr(e, t)));
|
|
3352
3352
|
}
|
|
3353
3353
|
//#endregion
|
|
3354
3354
|
//#region src/DataTable/FieldCard.tsx
|
|
3355
|
-
function
|
|
3355
|
+
function Xr({ rows: e }) {
|
|
3356
3356
|
return /* @__PURE__ */ p(f, { children: e.map((e, t) => /* @__PURE__ */ m(v, { children: [t > 0 && /* @__PURE__ */ p(C, {}), /* @__PURE__ */ m(T, {
|
|
3357
3357
|
wrap: "nowrap",
|
|
3358
3358
|
justify: "space-between",
|
|
@@ -3360,7 +3360,7 @@ function Yr({ rows: e }) {
|
|
|
3360
3360
|
gap: "md",
|
|
3361
3361
|
py: "xs",
|
|
3362
3362
|
px: "sm",
|
|
3363
|
-
children: [/* @__PURE__ */ p(
|
|
3363
|
+
children: [/* @__PURE__ */ p(V, {
|
|
3364
3364
|
fw: 700,
|
|
3365
3365
|
fz: "sm",
|
|
3366
3366
|
style: { flexShrink: 0 },
|
|
@@ -3373,39 +3373,39 @@ function Yr({ rows: e }) {
|
|
|
3373
3373
|
})]
|
|
3374
3374
|
})] }, typeof e.label == "string" ? e.label : t)) });
|
|
3375
3375
|
}
|
|
3376
|
-
function
|
|
3376
|
+
function Zr({ rows: e }) {
|
|
3377
3377
|
return /* @__PURE__ */ p(v, {
|
|
3378
3378
|
bg: "var(--mantine-color-gray-light)",
|
|
3379
3379
|
style: {
|
|
3380
3380
|
borderRadius: "var(--mantine-radius-md)",
|
|
3381
3381
|
overflow: "hidden"
|
|
3382
3382
|
},
|
|
3383
|
-
children: /* @__PURE__ */ p(
|
|
3383
|
+
children: /* @__PURE__ */ p(Xr, { rows: e })
|
|
3384
3384
|
});
|
|
3385
3385
|
}
|
|
3386
3386
|
//#endregion
|
|
3387
3387
|
//#region src/DataTable/MobileCardList.tsx
|
|
3388
|
-
function
|
|
3388
|
+
function Qr(e, t) {
|
|
3389
3389
|
return t.split(".").reduce((e, t) => {
|
|
3390
3390
|
if (e && typeof e == "object" && t in e) return e[t];
|
|
3391
3391
|
}, e);
|
|
3392
3392
|
}
|
|
3393
|
-
function
|
|
3393
|
+
function $r(e, t) {
|
|
3394
3394
|
let n = t.column;
|
|
3395
3395
|
if (n.render) return n.render(e, 0);
|
|
3396
|
-
let r =
|
|
3397
|
-
return r == null ? /* @__PURE__ */ p(
|
|
3396
|
+
let r = Qr(e, n.accessor ?? t.id);
|
|
3397
|
+
return r == null ? /* @__PURE__ */ p(V, {
|
|
3398
3398
|
c: "dimmed",
|
|
3399
3399
|
children: "–"
|
|
3400
|
-
}) : typeof r == "boolean" ? /* @__PURE__ */ p(
|
|
3400
|
+
}) : typeof r == "boolean" ? /* @__PURE__ */ p(V, {
|
|
3401
3401
|
fz: "sm",
|
|
3402
3402
|
children: r ? "Ja" : "Nein"
|
|
3403
|
-
}) : /* @__PURE__ */ p(
|
|
3403
|
+
}) : /* @__PURE__ */ p(V, {
|
|
3404
3404
|
fz: "sm",
|
|
3405
3405
|
children: String(r)
|
|
3406
3406
|
});
|
|
3407
3407
|
}
|
|
3408
|
-
function
|
|
3408
|
+
function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, canDelete: o, pagination: s, sort: c, rowExpansion: l }) {
|
|
3409
3409
|
let [u, _] = d(/* @__PURE__ */ new Set()), y = l?.expanded, b = (e) => y ? y.recordIds.includes(e) : u.has(e), x = (e) => {
|
|
3410
3410
|
if (y) {
|
|
3411
3411
|
let { recordIds: t, onRecordIdsChange: n } = y;
|
|
@@ -3414,29 +3414,29 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3414
3414
|
let n = new Set(t);
|
|
3415
3415
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3416
3416
|
});
|
|
3417
|
-
}, w = n.filter((e) => e.list && e.column && !e.column.hidden),
|
|
3417
|
+
}, w = n.filter((e) => e.list && e.column && !e.column.hidden), E = n.filter((e) => e.column && e.column.filter != null), O = E.filter((e) => e.column.filtering).map((e) => e.id), A = O.length > 0, j = A ? O : E.slice(0, 1).map((e) => e.id), [M, N] = d(!1), P = w.filter((e) => e.column.sortable !== !1).reduce((e, t) => {
|
|
3418
3418
|
let n = t.column.accessor ?? t.id;
|
|
3419
3419
|
return e.some((e) => e.value === n) || e.push({
|
|
3420
3420
|
value: n,
|
|
3421
3421
|
label: t.column.title ?? t.id
|
|
3422
3422
|
}), e;
|
|
3423
|
-
}, []),
|
|
3423
|
+
}, []), te = (e, t, n) => {
|
|
3424
3424
|
r?.({
|
|
3425
3425
|
record: e,
|
|
3426
3426
|
index: t,
|
|
3427
3427
|
event: n
|
|
3428
3428
|
});
|
|
3429
3429
|
};
|
|
3430
|
-
return /* @__PURE__ */ m(
|
|
3430
|
+
return /* @__PURE__ */ m(re, {
|
|
3431
3431
|
gap: "sm",
|
|
3432
3432
|
my: "md",
|
|
3433
3433
|
children: [
|
|
3434
|
-
(c &&
|
|
3434
|
+
(c && P.length > 0 || E.length > 0) && /* @__PURE__ */ m(T, {
|
|
3435
3435
|
gap: "xs",
|
|
3436
3436
|
wrap: "nowrap",
|
|
3437
3437
|
justify: "flex-end",
|
|
3438
|
-
children: [c &&
|
|
3439
|
-
data:
|
|
3438
|
+
children: [c && P.length > 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ne, {
|
|
3439
|
+
data: P,
|
|
3440
3440
|
value: c.field,
|
|
3441
3441
|
onChange: (e) => e && c.onSortChange(e, c.direction),
|
|
3442
3442
|
allowDeselect: !1,
|
|
@@ -3446,14 +3446,14 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3446
3446
|
size: "input-sm",
|
|
3447
3447
|
onClick: () => c.onSortChange(c.field, c.direction === "asc" ? "desc" : "asc"),
|
|
3448
3448
|
children: c.direction === "asc" ? /* @__PURE__ */ p(Ee, { size: 18 }) : /* @__PURE__ */ p(De, { size: 18 })
|
|
3449
|
-
})] }),
|
|
3449
|
+
})] }), E.length > 0 && /* @__PURE__ */ m(F, {
|
|
3450
3450
|
opened: M,
|
|
3451
3451
|
onChange: N,
|
|
3452
3452
|
position: "bottom-end",
|
|
3453
3453
|
withArrow: !0,
|
|
3454
3454
|
shadow: "md",
|
|
3455
3455
|
trapFocus: !0,
|
|
3456
|
-
children: [/* @__PURE__ */ p(
|
|
3456
|
+
children: [/* @__PURE__ */ p(F.Target, { children: /* @__PURE__ */ p(D, {
|
|
3457
3457
|
inline: !0,
|
|
3458
3458
|
disabled: !A,
|
|
3459
3459
|
color: "green",
|
|
@@ -3465,7 +3465,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3465
3465
|
"aria-label": "Filter",
|
|
3466
3466
|
children: /* @__PURE__ */ p(Se, { size: 18 })
|
|
3467
3467
|
})
|
|
3468
|
-
}) }), /* @__PURE__ */ p(
|
|
3468
|
+
}) }), /* @__PURE__ */ p(F.Dropdown, {
|
|
3469
3469
|
p: 0,
|
|
3470
3470
|
children: /* @__PURE__ */ p(h, {
|
|
3471
3471
|
multiple: !0,
|
|
@@ -3474,11 +3474,11 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3474
3474
|
minWidth: 260,
|
|
3475
3475
|
maxWidth: 320
|
|
3476
3476
|
},
|
|
3477
|
-
children:
|
|
3477
|
+
children: E.map((e) => /* @__PURE__ */ m(h.Item, {
|
|
3478
3478
|
value: e.id,
|
|
3479
3479
|
children: [/* @__PURE__ */ p(h.Control, { children: /* @__PURE__ */ m(T, {
|
|
3480
3480
|
gap: "xs",
|
|
3481
|
-
children: [/* @__PURE__ */ p(
|
|
3481
|
+
children: [/* @__PURE__ */ p(V, {
|
|
3482
3482
|
fw: 600,
|
|
3483
3483
|
fz: "sm",
|
|
3484
3484
|
children: e.column.title ?? e.id
|
|
@@ -3494,7 +3494,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3494
3494
|
})]
|
|
3495
3495
|
})]
|
|
3496
3496
|
}),
|
|
3497
|
-
e.length === 0 && /* @__PURE__ */ p(
|
|
3497
|
+
e.length === 0 && /* @__PURE__ */ p(V, {
|
|
3498
3498
|
c: "dimmed",
|
|
3499
3499
|
ta: "center",
|
|
3500
3500
|
py: "xl",
|
|
@@ -3513,7 +3513,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3513
3513
|
w: "100%",
|
|
3514
3514
|
style: { cursor: r || c ? "pointer" : "default" },
|
|
3515
3515
|
onClick: (t) => {
|
|
3516
|
-
c && !r ? x(s) :
|
|
3516
|
+
c && !r ? x(s) : te(e, n, t);
|
|
3517
3517
|
},
|
|
3518
3518
|
children: [i && i.length > 0 && /* @__PURE__ */ p(T, {
|
|
3519
3519
|
px: "sm",
|
|
@@ -3521,16 +3521,16 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3521
3521
|
justify: "flex-end",
|
|
3522
3522
|
children: (() => {
|
|
3523
3523
|
let t = i.filter((t) => !(t.label === "Bearbeiten" && a && !a(e) || t.label === "Löschen" && o && !o(e)));
|
|
3524
|
-
return t.length === 0 ? null : /* @__PURE__ */ m(
|
|
3524
|
+
return t.length === 0 ? null : /* @__PURE__ */ m(k, {
|
|
3525
3525
|
shadow: "md",
|
|
3526
3526
|
position: "bottom-end",
|
|
3527
|
-
children: [/* @__PURE__ */ p(
|
|
3527
|
+
children: [/* @__PURE__ */ p(k.Target, { children: /* @__PURE__ */ p(g, {
|
|
3528
3528
|
variant: "subtle",
|
|
3529
3529
|
color: "gray",
|
|
3530
3530
|
size: "sm",
|
|
3531
3531
|
onClick: (e) => e.stopPropagation(),
|
|
3532
3532
|
children: /* @__PURE__ */ p(xe, { size: 16 })
|
|
3533
|
-
}) }), /* @__PURE__ */ p(
|
|
3533
|
+
}) }), /* @__PURE__ */ p(k.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(k.Item, {
|
|
3534
3534
|
leftSection: t.icon,
|
|
3535
3535
|
onClick: (n) => {
|
|
3536
3536
|
n.stopPropagation(), t.onClick([e]);
|
|
@@ -3539,9 +3539,9 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3539
3539
|
}, `card_action_${n}`)) })]
|
|
3540
3540
|
});
|
|
3541
3541
|
})()
|
|
3542
|
-
}), /* @__PURE__ */ p(
|
|
3542
|
+
}), /* @__PURE__ */ p(Xr, { rows: w.map((t) => ({
|
|
3543
3543
|
label: t.column.title ?? t.id,
|
|
3544
|
-
value:
|
|
3544
|
+
value: $r(e, t)
|
|
3545
3545
|
})) })]
|
|
3546
3546
|
}), c && /* @__PURE__ */ m(S, {
|
|
3547
3547
|
expanded: u,
|
|
@@ -3553,7 +3553,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3553
3553
|
})]
|
|
3554
3554
|
}) }, s);
|
|
3555
3555
|
}),
|
|
3556
|
-
s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(
|
|
3556
|
+
s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(re, {
|
|
3557
3557
|
gap: "xs",
|
|
3558
3558
|
mt: "sm",
|
|
3559
3559
|
children: [/* @__PURE__ */ p(T, {
|
|
@@ -3567,11 +3567,11 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3567
3567
|
}), s.recordsPerPageOptions && s.onRecordsPerPageChange && /* @__PURE__ */ m(T, {
|
|
3568
3568
|
justify: "center",
|
|
3569
3569
|
gap: "xs",
|
|
3570
|
-
children: [/* @__PURE__ */ p(
|
|
3570
|
+
children: [/* @__PURE__ */ p(V, {
|
|
3571
3571
|
fz: "xs",
|
|
3572
3572
|
c: "dimmed",
|
|
3573
3573
|
children: "Einträge pro Seite:"
|
|
3574
|
-
}), /* @__PURE__ */ p(
|
|
3574
|
+
}), /* @__PURE__ */ p(ne, {
|
|
3575
3575
|
data: s.recordsPerPageOptions.map((e) => ({
|
|
3576
3576
|
value: String(e),
|
|
3577
3577
|
label: String(e)
|
|
@@ -3589,40 +3589,40 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
|
|
|
3589
3589
|
}
|
|
3590
3590
|
//#endregion
|
|
3591
3591
|
//#region src/DataTable/DataTable.tsx
|
|
3592
|
-
var
|
|
3592
|
+
var ti = [
|
|
3593
3593
|
10,
|
|
3594
3594
|
15,
|
|
3595
3595
|
50,
|
|
3596
3596
|
100,
|
|
3597
3597
|
500
|
|
3598
3598
|
];
|
|
3599
|
-
function
|
|
3600
|
-
let [
|
|
3601
|
-
|
|
3602
|
-
},
|
|
3603
|
-
...
|
|
3604
|
-
...
|
|
3605
|
-
},
|
|
3599
|
+
function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPath: a, mutationApiPath: o, buttons: c, fields: l, selection: h, pagination: b, filters: x, actions: S, steps: C, defaultSort: D, onSortChange: O, createButtonText: A, queryParams: j, tabs: M, defaultTab: P, activeTab: ee, onActiveTabChange: F, canUpdate: te, canDelete: I, showRefresh: L = !0, onRefresh: ne, autoPoll: ie, rowExpansion: z, onRowClick: B, mobileCards: ae = !1, deleteConfirmMessage: oe, editRecordId: se, onEditRecordIdChange: ce }) {
|
|
3600
|
+
let [ue, de] = d(P || (M && M.length > 0 ? M[0].value : null)), pe = ee === void 0 ? ue : ee, me = (e) => {
|
|
3601
|
+
ee === void 0 && de(e), F && F(e);
|
|
3602
|
+
}, H = M?.find((e) => e.value === pe), he = H?.queryParams || {}, ge = H?.apiPath ?? a, _e = H?.mutationApiPath ?? o ?? ge, ve = {
|
|
3603
|
+
...j,
|
|
3604
|
+
...he
|
|
3605
|
+
}, xe = ve ? "?" + Object.entries(ve).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", Se = pe ? [...n, pe] : n, { data: Ee, isLoading: De, isError: ke, isRefetching: Ae, refetch: je } = Wt(ge + xe, Se), Me = Yr(Array.isArray(Ee) ? Ee : [], x), [Ne, Pe] = d(!1), Fe = u(() => {});
|
|
3606
3606
|
s(() => {
|
|
3607
|
-
|
|
3607
|
+
Fe.current = ne ?? (() => je());
|
|
3608
3608
|
});
|
|
3609
|
-
let
|
|
3609
|
+
let Ie = typeof ie == "function" ? ie(Array.isArray(Ee) ? Ee : []) : ie ?? !1;
|
|
3610
3610
|
s(() => {
|
|
3611
|
-
if (!
|
|
3611
|
+
if (!Ie) return;
|
|
3612
3612
|
let e = setInterval(() => {
|
|
3613
|
-
Promise.resolve(
|
|
3614
|
-
},
|
|
3613
|
+
Promise.resolve(Fe.current()).catch(() => {});
|
|
3614
|
+
}, Ie);
|
|
3615
3615
|
return () => clearInterval(e);
|
|
3616
|
-
}, [
|
|
3617
|
-
let [
|
|
3618
|
-
columnAccessor:
|
|
3619
|
-
direction:
|
|
3620
|
-
}),
|
|
3621
|
-
|
|
3622
|
-
},
|
|
3623
|
-
|
|
3624
|
-
},
|
|
3625
|
-
if (t !==
|
|
3616
|
+
}, [Ie]);
|
|
3617
|
+
let [Le, Re] = d({
|
|
3618
|
+
columnAccessor: D?.field ?? l[0].id,
|
|
3619
|
+
direction: D?.direction ?? "desc"
|
|
3620
|
+
}), ze = (e) => {
|
|
3621
|
+
Re(e), O && O(String(e.columnAccessor), e.direction);
|
|
3622
|
+
}, Be = Ur(Me, Le.columnAccessor, Le.direction), [Ve, He] = zr(ti[1], "mantine-table-page-size"), [Ue, We] = d(1), U = b ? Be.slice((Ue - 1) * Ve, Ue * Ve) : Be, [Ge, Ke] = d([]), W = z?.expanded?.recordIds ?? Ge, qe = z?.expanded?.onRecordIdsChange ?? Ke, Je = (e) => {
|
|
3623
|
+
W.includes(e) ? qe(W.filter((t) => t !== e)) : qe(z?.allowMultiple ? [...W, e] : [e]);
|
|
3624
|
+
}, Ye = l.findIndex((e) => e.list && e.column && !e.column.hidden), Xe = z && Ye >= 0 ? l.map((e, t) => {
|
|
3625
|
+
if (t !== Ye) return e;
|
|
3626
3626
|
let n = e.column.render;
|
|
3627
3627
|
return {
|
|
3628
3628
|
...e,
|
|
@@ -3632,11 +3632,11 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3632
3632
|
gap: "xs",
|
|
3633
3633
|
wrap: "nowrap",
|
|
3634
3634
|
align: "center",
|
|
3635
|
-
children: [!
|
|
3635
|
+
children: [!z.expandable || z.expandable(t) ? /* @__PURE__ */ p(v, {
|
|
3636
3636
|
component: "span",
|
|
3637
3637
|
"aria-label": "Aufklappen",
|
|
3638
3638
|
onClick: (e) => {
|
|
3639
|
-
e.stopPropagation(),
|
|
3639
|
+
e.stopPropagation(), Je(t.id);
|
|
3640
3640
|
},
|
|
3641
3641
|
style: {
|
|
3642
3642
|
display: "inline-flex",
|
|
@@ -3647,43 +3647,43 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3647
3647
|
size: 16,
|
|
3648
3648
|
style: {
|
|
3649
3649
|
color: "var(--mantine-primary-color-filled)",
|
|
3650
|
-
transform:
|
|
3650
|
+
transform: W.includes(t.id) ? "rotate(90deg)" : void 0,
|
|
3651
3651
|
transition: "transform 200ms ease"
|
|
3652
3652
|
}
|
|
3653
3653
|
})
|
|
3654
3654
|
}) : /* @__PURE__ */ p(v, {
|
|
3655
3655
|
w: 16,
|
|
3656
3656
|
style: { flexShrink: 0 }
|
|
3657
|
-
}), n ? n(t, r) : String(
|
|
3657
|
+
}), n ? n(t, r) : String(xn(t, e.column.accessor) ?? "")]
|
|
3658
3658
|
})
|
|
3659
3659
|
}
|
|
3660
3660
|
};
|
|
3661
|
-
}) :
|
|
3661
|
+
}) : l, [G, K] = d([]);
|
|
3662
3662
|
s(() => {
|
|
3663
3663
|
K([]);
|
|
3664
|
-
}, [
|
|
3665
|
-
let [
|
|
3664
|
+
}, [pe]);
|
|
3665
|
+
let [Ze, Qe] = d(!1), [$e, et] = d(!1), [tt, nt] = d(!1), rt = u(null);
|
|
3666
3666
|
s(() => {
|
|
3667
|
-
if (!
|
|
3668
|
-
|
|
3667
|
+
if (!se) {
|
|
3668
|
+
rt.current = null;
|
|
3669
3669
|
return;
|
|
3670
3670
|
}
|
|
3671
|
-
if (
|
|
3672
|
-
let e =
|
|
3673
|
-
e && (
|
|
3674
|
-
}, [
|
|
3675
|
-
let
|
|
3676
|
-
return
|
|
3671
|
+
if (rt.current === se) return;
|
|
3672
|
+
let e = Be.find((e) => e.id === se);
|
|
3673
|
+
e && (rt.current = se, K([e]), et(!0), ce?.(null));
|
|
3674
|
+
}, [se, Be]);
|
|
3675
|
+
let it = l.some((e) => e.update), at = l.some((e) => e.delete), q = [];
|
|
3676
|
+
return it && q.push({
|
|
3677
3677
|
icon: /* @__PURE__ */ p(we, { size: 14 }),
|
|
3678
3678
|
label: "Bearbeiten",
|
|
3679
3679
|
onClick: (e) => {
|
|
3680
|
-
K(e),
|
|
3680
|
+
K(e), et(!0);
|
|
3681
3681
|
}
|
|
3682
|
-
}),
|
|
3682
|
+
}), S && q.push(...S), at && q.push({
|
|
3683
3683
|
icon: /* @__PURE__ */ p(Oe, { size: 14 }),
|
|
3684
3684
|
label: "Löschen",
|
|
3685
3685
|
onClick: (e) => {
|
|
3686
|
-
K(e),
|
|
3686
|
+
K(e), nt(!0);
|
|
3687
3687
|
}
|
|
3688
3688
|
}), /* @__PURE__ */ m(f, { children: [
|
|
3689
3689
|
/* @__PURE__ */ m(w, {
|
|
@@ -3698,10 +3698,35 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3698
3698
|
},
|
|
3699
3699
|
justify: e ? "space-between" : "flex-end",
|
|
3700
3700
|
wrap: "wrap",
|
|
3701
|
-
children: [e &&
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3701
|
+
children: [e && /* @__PURE__ */ m(T, {
|
|
3702
|
+
gap: 6,
|
|
3703
|
+
align: "center",
|
|
3704
|
+
wrap: "nowrap",
|
|
3705
|
+
children: [typeof e == "string" ? /* @__PURE__ */ p(fe, {
|
|
3706
|
+
order: 4,
|
|
3707
|
+
children: e
|
|
3708
|
+
}) : e, t != null && /* @__PURE__ */ m(E, {
|
|
3709
|
+
width: 340,
|
|
3710
|
+
shadow: "md",
|
|
3711
|
+
withArrow: !0,
|
|
3712
|
+
openDelay: 120,
|
|
3713
|
+
closeDelay: 160,
|
|
3714
|
+
position: "top-start",
|
|
3715
|
+
children: [/* @__PURE__ */ p(E.Target, { children: /* @__PURE__ */ p(g, {
|
|
3716
|
+
variant: "subtle",
|
|
3717
|
+
color: "gray",
|
|
3718
|
+
size: "sm",
|
|
3719
|
+
radius: "xl",
|
|
3720
|
+
"aria-label": "Mehr Informationen",
|
|
3721
|
+
children: /* @__PURE__ */ p(Ce, { size: 16 })
|
|
3722
|
+
}) }), /* @__PURE__ */ p(E.Dropdown, { children: /* @__PURE__ */ p(V, {
|
|
3723
|
+
component: "div",
|
|
3724
|
+
size: "sm",
|
|
3725
|
+
c: "dimmed",
|
|
3726
|
+
children: t
|
|
3727
|
+
}) })]
|
|
3728
|
+
})]
|
|
3729
|
+
}), /* @__PURE__ */ m(w, {
|
|
3705
3730
|
align: {
|
|
3706
3731
|
base: "stretch",
|
|
3707
3732
|
sm: "center"
|
|
@@ -3721,49 +3746,49 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3721
3746
|
sm: "auto"
|
|
3722
3747
|
},
|
|
3723
3748
|
children: [
|
|
3724
|
-
|
|
3749
|
+
L && /* @__PURE__ */ p(g, {
|
|
3725
3750
|
variant: "subtle",
|
|
3726
|
-
loading:
|
|
3751
|
+
loading: Ne,
|
|
3727
3752
|
onClick: async () => {
|
|
3728
|
-
if (
|
|
3729
|
-
|
|
3753
|
+
if (ne) {
|
|
3754
|
+
Pe(!0);
|
|
3730
3755
|
try {
|
|
3731
|
-
await
|
|
3756
|
+
await ne();
|
|
3732
3757
|
} finally {
|
|
3733
|
-
|
|
3758
|
+
Pe(!1);
|
|
3734
3759
|
}
|
|
3735
|
-
} else
|
|
3760
|
+
} else je();
|
|
3736
3761
|
},
|
|
3737
3762
|
"aria-label": "Neuladen",
|
|
3738
3763
|
children: /* @__PURE__ */ p(Te, {})
|
|
3739
3764
|
}),
|
|
3740
|
-
(
|
|
3741
|
-
let e =
|
|
3765
|
+
(l.some((e) => e.update) || h) && (() => {
|
|
3766
|
+
let e = l.find((e) => e.update) && (!te || G.length > 0 && te(G[0])), t = l.find((e) => e.delete) && (!I || G.length > 0 && I(G[0])), n = (S ?? []).length > 0, r = e || t || n;
|
|
3742
3767
|
return /* @__PURE__ */ p(v, {
|
|
3743
3768
|
...ae ? { visibleFrom: "sm" } : {},
|
|
3744
|
-
children: /* @__PURE__ */ m(
|
|
3769
|
+
children: /* @__PURE__ */ m(k, {
|
|
3745
3770
|
shadow: "md",
|
|
3746
|
-
children: [/* @__PURE__ */ p(
|
|
3771
|
+
children: [/* @__PURE__ */ p(k.Target, { children: /* @__PURE__ */ p(y, {
|
|
3747
3772
|
variant: "outline",
|
|
3748
3773
|
rightSection: /* @__PURE__ */ p(ye, { size: 14 }),
|
|
3749
3774
|
disabled: !G.length || !r,
|
|
3750
3775
|
children: "Aktionen"
|
|
3751
|
-
}) }), /* @__PURE__ */ m(
|
|
3752
|
-
e && /* @__PURE__ */ p(
|
|
3776
|
+
}) }), /* @__PURE__ */ m(k.Dropdown, { children: [
|
|
3777
|
+
e && /* @__PURE__ */ p(k.Item, {
|
|
3753
3778
|
leftSection: /* @__PURE__ */ p(we, { size: 14 }),
|
|
3754
|
-
onClick: () =>
|
|
3779
|
+
onClick: () => et(!0),
|
|
3755
3780
|
disabled: G.length !== 1,
|
|
3756
3781
|
children: "Bearbeiten"
|
|
3757
3782
|
}),
|
|
3758
|
-
(
|
|
3783
|
+
(S ?? []).map((e, t) => /* @__PURE__ */ i(k.Item, {
|
|
3759
3784
|
...e.icon && { leftSection: e.icon },
|
|
3760
3785
|
key: `custom_action_${t}`,
|
|
3761
3786
|
onClick: () => e.onClick(G),
|
|
3762
3787
|
disabled: e.disabled?.(G) ?? !1
|
|
3763
3788
|
}, e.label)),
|
|
3764
|
-
t && /* @__PURE__ */ p(
|
|
3789
|
+
t && /* @__PURE__ */ p(k.Item, {
|
|
3765
3790
|
leftSection: /* @__PURE__ */ p(Oe, { size: 14 }),
|
|
3766
|
-
onClick: () =>
|
|
3791
|
+
onClick: () => nt(!0),
|
|
3767
3792
|
color: "red",
|
|
3768
3793
|
children: "Löschen"
|
|
3769
3794
|
})
|
|
@@ -3771,26 +3796,26 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3771
3796
|
})
|
|
3772
3797
|
});
|
|
3773
3798
|
})(),
|
|
3774
|
-
|
|
3775
|
-
onClick: () =>
|
|
3776
|
-
disabled:
|
|
3777
|
-
children:
|
|
3799
|
+
l.find((e) => e.create) && /* @__PURE__ */ p(y, {
|
|
3800
|
+
onClick: () => Qe(!0),
|
|
3801
|
+
disabled: De,
|
|
3802
|
+
children: A ?? "Erstellen"
|
|
3778
3803
|
}),
|
|
3779
|
-
|
|
3804
|
+
c
|
|
3780
3805
|
]
|
|
3781
3806
|
})]
|
|
3782
3807
|
}),
|
|
3783
|
-
|
|
3784
|
-
value:
|
|
3785
|
-
onChange:
|
|
3808
|
+
M && M.length > 0 && /* @__PURE__ */ p(le, {
|
|
3809
|
+
value: pe,
|
|
3810
|
+
onChange: me,
|
|
3786
3811
|
mt: "md",
|
|
3787
|
-
children: /* @__PURE__ */ p(le.List, { children:
|
|
3812
|
+
children: /* @__PURE__ */ p(le.List, { children: M.map((e) => /* @__PURE__ */ p(le.Tab, {
|
|
3788
3813
|
value: e.value,
|
|
3789
3814
|
leftSection: e.icon,
|
|
3790
3815
|
children: e.label
|
|
3791
3816
|
}, e.value)) })
|
|
3792
3817
|
}),
|
|
3793
|
-
|
|
3818
|
+
ke && /* @__PURE__ */ p(_, {
|
|
3794
3819
|
mt: "md",
|
|
3795
3820
|
variant: "light",
|
|
3796
3821
|
color: "red",
|
|
@@ -3798,169 +3823,169 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
|
|
|
3798
3823
|
icon: /* @__PURE__ */ p(Ce, {}),
|
|
3799
3824
|
children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
|
|
3800
3825
|
}),
|
|
3801
|
-
(
|
|
3826
|
+
(De || Ae) && /* @__PURE__ */ m(re, {
|
|
3802
3827
|
my: "md",
|
|
3803
|
-
children: [/* @__PURE__ */ p(
|
|
3828
|
+
children: [/* @__PURE__ */ p(R, { height: 40 }), [
|
|
3804
3829
|
,
|
|
3805
3830
|
,
|
|
3806
3831
|
,
|
|
3807
3832
|
,
|
|
3808
3833
|
,
|
|
3809
|
-
].fill(0).map((e, t) => /* @__PURE__ */ p(
|
|
3834
|
+
].fill(0).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, `skeleton-${t}`))]
|
|
3810
3835
|
}),
|
|
3811
|
-
!
|
|
3836
|
+
!De && !Ae && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
|
|
3812
3837
|
...ae ? { visibleFrom: "sm" } : {},
|
|
3813
|
-
children: /* @__PURE__ */ p(
|
|
3838
|
+
children: /* @__PURE__ */ p(Ir, {
|
|
3814
3839
|
my: "md",
|
|
3815
3840
|
striped: !0,
|
|
3816
3841
|
highlightOnHover: !0,
|
|
3817
3842
|
minHeight: 150,
|
|
3818
|
-
fetching:
|
|
3819
|
-
records:
|
|
3820
|
-
sortStatus:
|
|
3821
|
-
onSortStatusChange:
|
|
3822
|
-
...
|
|
3843
|
+
fetching: ke,
|
|
3844
|
+
records: U,
|
|
3845
|
+
sortStatus: Le,
|
|
3846
|
+
onSortStatusChange: ze,
|
|
3847
|
+
...h && {
|
|
3823
3848
|
selectedRecords: G,
|
|
3824
3849
|
onSelectedRecordsChange: K
|
|
3825
3850
|
},
|
|
3826
|
-
...
|
|
3827
|
-
totalRecords:
|
|
3828
|
-
recordsPerPage:
|
|
3829
|
-
onPageChange:
|
|
3830
|
-
page:
|
|
3831
|
-
recordsPerPageOptions:
|
|
3832
|
-
onRecordsPerPageChange:
|
|
3851
|
+
...b && U.length && {
|
|
3852
|
+
totalRecords: Be.length,
|
|
3853
|
+
recordsPerPage: Ve,
|
|
3854
|
+
onPageChange: We,
|
|
3855
|
+
page: Ue,
|
|
3856
|
+
recordsPerPageOptions: ti,
|
|
3857
|
+
onRecordsPerPageChange: He,
|
|
3833
3858
|
recordsPerPageLabel: "Einträge pro Seite"
|
|
3834
3859
|
},
|
|
3835
|
-
...
|
|
3836
|
-
allowMultiple:
|
|
3837
|
-
trigger:
|
|
3838
|
-
content: ({ record: e }) =>
|
|
3860
|
+
...z && { rowExpansion: {
|
|
3861
|
+
allowMultiple: z.allowMultiple ?? !1,
|
|
3862
|
+
trigger: B ? "never" : "click",
|
|
3863
|
+
content: ({ record: e }) => z.content(e, !1),
|
|
3839
3864
|
expanded: {
|
|
3840
|
-
recordIds:
|
|
3841
|
-
onRecordIdsChange:
|
|
3865
|
+
recordIds: W,
|
|
3866
|
+
onRecordIdsChange: qe
|
|
3842
3867
|
},
|
|
3843
|
-
...
|
|
3868
|
+
...z.expandable && { expandable: ({ record: e }) => z.expandable(e) }
|
|
3844
3869
|
} },
|
|
3845
|
-
columns:
|
|
3870
|
+
columns: Xe.map((e) => e.column),
|
|
3846
3871
|
noRecordsText: "Keine Einträge gefunden",
|
|
3847
|
-
onRowClick:
|
|
3848
|
-
...
|
|
3872
|
+
onRowClick: B,
|
|
3873
|
+
...B && { style: { cursor: "pointer" } }
|
|
3849
3874
|
})
|
|
3850
3875
|
}), ae && /* @__PURE__ */ p(v, {
|
|
3851
3876
|
hiddenFrom: "sm",
|
|
3852
|
-
children: /* @__PURE__ */ p(
|
|
3853
|
-
records:
|
|
3854
|
-
fields:
|
|
3855
|
-
onRowClick:
|
|
3877
|
+
children: /* @__PURE__ */ p(ei, {
|
|
3878
|
+
records: U,
|
|
3879
|
+
fields: Xe,
|
|
3880
|
+
onRowClick: B,
|
|
3856
3881
|
sort: {
|
|
3857
|
-
field: String(
|
|
3858
|
-
direction:
|
|
3882
|
+
field: String(Le.columnAccessor),
|
|
3883
|
+
direction: Le.direction,
|
|
3859
3884
|
onSortChange: (e, t) => {
|
|
3860
|
-
|
|
3885
|
+
ze({
|
|
3861
3886
|
columnAccessor: e,
|
|
3862
3887
|
direction: t
|
|
3863
3888
|
});
|
|
3864
3889
|
}
|
|
3865
3890
|
},
|
|
3866
|
-
...
|
|
3867
|
-
totalRecords:
|
|
3868
|
-
recordsPerPage:
|
|
3869
|
-
page:
|
|
3870
|
-
onPageChange:
|
|
3871
|
-
recordsPerPageOptions:
|
|
3891
|
+
...b && U.length && { pagination: {
|
|
3892
|
+
totalRecords: Be.length,
|
|
3893
|
+
recordsPerPage: Ve,
|
|
3894
|
+
page: Ue,
|
|
3895
|
+
onPageChange: We,
|
|
3896
|
+
recordsPerPageOptions: ti,
|
|
3872
3897
|
onRecordsPerPageChange: (e) => {
|
|
3873
|
-
|
|
3898
|
+
He(e), We(1);
|
|
3874
3899
|
}
|
|
3875
3900
|
} },
|
|
3876
|
-
...
|
|
3877
|
-
content:
|
|
3901
|
+
...z && { rowExpansion: {
|
|
3902
|
+
content: z.content,
|
|
3878
3903
|
expanded: {
|
|
3879
|
-
recordIds:
|
|
3880
|
-
onRecordIdsChange:
|
|
3904
|
+
recordIds: W,
|
|
3905
|
+
onRecordIdsChange: qe
|
|
3881
3906
|
},
|
|
3882
|
-
...
|
|
3907
|
+
...z.expandable && { expandable: z.expandable }
|
|
3883
3908
|
} },
|
|
3884
|
-
...
|
|
3885
|
-
actions:
|
|
3886
|
-
canUpdate:
|
|
3887
|
-
canDelete:
|
|
3909
|
+
...q.length > 0 && {
|
|
3910
|
+
actions: q,
|
|
3911
|
+
canUpdate: te,
|
|
3912
|
+
canDelete: I
|
|
3888
3913
|
}
|
|
3889
3914
|
})
|
|
3890
3915
|
})] }),
|
|
3891
|
-
/* @__PURE__ */ p(
|
|
3892
|
-
opened:
|
|
3916
|
+
/* @__PURE__ */ p(N, {
|
|
3917
|
+
opened: $e,
|
|
3893
3918
|
onClose: () => {
|
|
3894
|
-
|
|
3919
|
+
et(!1), K([]);
|
|
3895
3920
|
},
|
|
3896
3921
|
title: e ?? "Bearbeiten",
|
|
3897
|
-
children: G.length > 0 && /* @__PURE__ */ p(
|
|
3898
|
-
fields:
|
|
3899
|
-
queryKey:
|
|
3900
|
-
connectedQueryKeys:
|
|
3901
|
-
apiPath:
|
|
3922
|
+
children: G.length > 0 && /* @__PURE__ */ p(Lr, {
|
|
3923
|
+
fields: l.filter((e) => e.update),
|
|
3924
|
+
queryKey: n,
|
|
3925
|
+
connectedQueryKeys: r,
|
|
3926
|
+
apiPath: _e,
|
|
3902
3927
|
id: G[0].id,
|
|
3903
3928
|
onClose: () => {
|
|
3904
|
-
|
|
3929
|
+
et(!1), K([]);
|
|
3905
3930
|
},
|
|
3906
|
-
steps:
|
|
3931
|
+
steps: C
|
|
3907
3932
|
})
|
|
3908
3933
|
}),
|
|
3909
|
-
G.length > 0 && /* @__PURE__ */ p(
|
|
3910
|
-
opened:
|
|
3934
|
+
G.length > 0 && /* @__PURE__ */ p(N, {
|
|
3935
|
+
opened: tt,
|
|
3911
3936
|
onClose: () => {
|
|
3912
|
-
|
|
3937
|
+
nt(!1), K([]);
|
|
3913
3938
|
},
|
|
3914
3939
|
title: e ?? "Löschen",
|
|
3915
|
-
children: /* @__PURE__ */ p(
|
|
3940
|
+
children: /* @__PURE__ */ p(Rr, {
|
|
3916
3941
|
onClose: () => {
|
|
3917
|
-
|
|
3942
|
+
nt(!1), K([]);
|
|
3918
3943
|
},
|
|
3919
|
-
queryKey:
|
|
3920
|
-
connectedQueryKeys:
|
|
3921
|
-
apiPath:
|
|
3944
|
+
queryKey: n,
|
|
3945
|
+
connectedQueryKeys: r,
|
|
3946
|
+
apiPath: _e,
|
|
3922
3947
|
selectedRecords: G,
|
|
3923
3948
|
confirmMessage: oe
|
|
3924
3949
|
})
|
|
3925
3950
|
}),
|
|
3926
|
-
/* @__PURE__ */ p(
|
|
3927
|
-
opened:
|
|
3951
|
+
/* @__PURE__ */ p(N, {
|
|
3952
|
+
opened: Ze,
|
|
3928
3953
|
onClose: () => {
|
|
3929
|
-
|
|
3954
|
+
Qe(!1);
|
|
3930
3955
|
},
|
|
3931
3956
|
title: e ?? "Anlegen",
|
|
3932
|
-
children: /* @__PURE__ */ p(
|
|
3933
|
-
queryKey:
|
|
3934
|
-
connectedQueryKeys:
|
|
3935
|
-
apiPath:
|
|
3957
|
+
children: /* @__PURE__ */ p(an, {
|
|
3958
|
+
queryKey: n,
|
|
3959
|
+
connectedQueryKeys: r,
|
|
3960
|
+
apiPath: _e,
|
|
3936
3961
|
onClose: () => {
|
|
3937
|
-
|
|
3962
|
+
Qe(!1);
|
|
3938
3963
|
},
|
|
3939
|
-
fields:
|
|
3940
|
-
steps:
|
|
3964
|
+
fields: l.filter((e) => e.create),
|
|
3965
|
+
steps: C
|
|
3941
3966
|
})
|
|
3942
3967
|
})
|
|
3943
3968
|
] });
|
|
3944
3969
|
}
|
|
3945
3970
|
//#endregion
|
|
3946
3971
|
//#region src/DataTable/SubTable.tsx
|
|
3947
|
-
function
|
|
3948
|
-
return e ? /* @__PURE__ */ p(
|
|
3972
|
+
function ri({ mobile: e, columns: t, ...n }) {
|
|
3973
|
+
return e ? /* @__PURE__ */ p(re, {
|
|
3949
3974
|
gap: "sm",
|
|
3950
3975
|
style: { fontVariantNumeric: "tabular-nums" },
|
|
3951
3976
|
children: (n.records ?? []).map((e, r) => {
|
|
3952
3977
|
let i = t.filter((t) => !t.hidden && !t.hideOnMobile?.(e)).map((t) => ({
|
|
3953
|
-
label: t.title ??
|
|
3954
|
-
value: t.render ? t.render(e, r) :
|
|
3978
|
+
label: t.title ?? gn(String(t.accessor)),
|
|
3979
|
+
value: t.render ? t.render(e, r) : xn(e, t.accessor)
|
|
3955
3980
|
})), a = n.idAccessor ? Q(e, n.idAccessor) : r;
|
|
3956
|
-
return /* @__PURE__ */ p(
|
|
3981
|
+
return /* @__PURE__ */ p(Zr, { rows: i }, a);
|
|
3957
3982
|
})
|
|
3958
|
-
}) : /* @__PURE__ */ p(
|
|
3983
|
+
}) : /* @__PURE__ */ p(Ir, {
|
|
3959
3984
|
columns: t,
|
|
3960
3985
|
...n
|
|
3961
3986
|
});
|
|
3962
3987
|
}
|
|
3963
3988
|
//#endregion
|
|
3964
|
-
export {
|
|
3989
|
+
export { an as CreateModal, ni as DataTable, jt as DataTableProvider, Rr as DeleteModal, Zr as FieldCard, ei as MobileCardList, ri as SubTable, Lr as UpdateModal, Vt as api, Bt as createOne, zt as deleteOne, Lt as getAll, Rt as getOne, Ur as sortData, Ht as updateOne, Kt as useAddOne, Mt as useDataTable, Jt as useDeleteOne, Wt as useGetAll, Ut as useGetOne, zr as usePersistentState, qt as useUpdateOne };
|
|
3965
3990
|
|
|
3966
3991
|
//# sourceMappingURL=index.es.js.map
|