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