@espresso-lab/mantine-data-table 2.2.4 → 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 +907 -1055
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -2,13 +2,13 @@ import { c as e } from "react/compiler-runtime";
|
|
|
2
2
|
import * as t from "react";
|
|
3
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
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
|
|
6
|
-
import { DateInput as
|
|
7
|
-
import { useForm as
|
|
8
|
-
import { IconCaretDownFilled as
|
|
9
|
-
import { useClickOutside as
|
|
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";
|
|
10
10
|
//#region node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
11
|
-
var
|
|
11
|
+
var Me = class {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
14
14
|
}
|
|
@@ -22,7 +22,7 @@ var Pe = class {
|
|
|
22
22
|
}
|
|
23
23
|
onSubscribe() {}
|
|
24
24
|
onUnsubscribe() {}
|
|
25
|
-
},
|
|
25
|
+
}, Ne = new class extends Me {
|
|
26
26
|
#e;
|
|
27
27
|
#t;
|
|
28
28
|
#n;
|
|
@@ -59,13 +59,13 @@ var Pe = class {
|
|
|
59
59
|
isFocused() {
|
|
60
60
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
61
61
|
}
|
|
62
|
-
}(),
|
|
62
|
+
}(), Pe = {
|
|
63
63
|
setTimeout: (e, t) => setTimeout(e, t),
|
|
64
64
|
clearTimeout: (e) => clearTimeout(e),
|
|
65
65
|
setInterval: (e, t) => setInterval(e, t),
|
|
66
66
|
clearInterval: (e) => clearInterval(e)
|
|
67
|
-
},
|
|
68
|
-
#e =
|
|
67
|
+
}, Fe = new class {
|
|
68
|
+
#e = Pe;
|
|
69
69
|
#t = !1;
|
|
70
70
|
setTimeoutProvider(e) {
|
|
71
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.", {
|
|
@@ -86,87 +86,87 @@ var Pe = class {
|
|
|
86
86
|
this.#e.clearInterval(e);
|
|
87
87
|
}
|
|
88
88
|
}();
|
|
89
|
-
function
|
|
89
|
+
function Ie(e) {
|
|
90
90
|
setTimeout(e, 0);
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region node_modules/@tanstack/query-core/build/modern/utils.js
|
|
94
|
-
var
|
|
95
|
-
function
|
|
96
|
-
function
|
|
94
|
+
var Le = typeof window > "u" || "Deno" in globalThis;
|
|
95
|
+
function Re() {}
|
|
96
|
+
function ze(e) {
|
|
97
97
|
return typeof e == "number" && e >= 0 && e !== Infinity;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Be(e, t) {
|
|
100
100
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function K(e, t) {
|
|
103
103
|
return typeof e == "function" ? e(t) : e;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function q(e, t) {
|
|
106
106
|
return typeof e == "function" ? e(t) : e;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
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);
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
111
|
+
var He = Object.prototype.hasOwnProperty;
|
|
112
|
+
function Ue(e, t, n = 0) {
|
|
113
113
|
if (e === t) return e;
|
|
114
114
|
if (n > 500) return t;
|
|
115
|
-
let r =
|
|
116
|
-
if (!r && !(
|
|
115
|
+
let r = Ge(e) && Ge(t);
|
|
116
|
+
if (!r && !(Ke(e) && Ke(t))) return t;
|
|
117
117
|
let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
|
|
118
118
|
for (let l = 0; l < o; l++) {
|
|
119
119
|
let o = r ? l : a[l], u = e[o], d = t[o];
|
|
120
120
|
if (u === d) {
|
|
121
|
-
s[o] = u, (r ? l < i :
|
|
121
|
+
s[o] = u, (r ? l < i : He.call(e, o)) && c++;
|
|
122
122
|
continue;
|
|
123
123
|
}
|
|
124
124
|
if (u === null || d === null || typeof u != "object" || typeof d != "object") {
|
|
125
125
|
s[o] = d;
|
|
126
126
|
continue;
|
|
127
127
|
}
|
|
128
|
-
let f =
|
|
128
|
+
let f = Ue(u, d, n + 1);
|
|
129
129
|
s[o] = f, f === u && c++;
|
|
130
130
|
}
|
|
131
131
|
return i === o && c === i ? e : s;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function We(e, t) {
|
|
134
134
|
if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
135
135
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
136
136
|
return !0;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ge(e) {
|
|
139
139
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
if (!
|
|
141
|
+
function Ke(e) {
|
|
142
|
+
if (!qe(e)) return !1;
|
|
143
143
|
let t = e.constructor;
|
|
144
144
|
if (t === void 0) return !0;
|
|
145
145
|
let n = t.prototype;
|
|
146
|
-
return !(!
|
|
146
|
+
return !(!qe(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function qe(e) {
|
|
149
149
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Je(e, t, n) {
|
|
152
152
|
if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
|
|
153
153
|
if (n.structuralSharing !== !1) {
|
|
154
154
|
if (process.env.NODE_ENV !== "production") try {
|
|
155
|
-
return
|
|
155
|
+
return Ue(e, t);
|
|
156
156
|
} catch (e) {
|
|
157
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;
|
|
158
158
|
}
|
|
159
|
-
return
|
|
159
|
+
return Ue(e, t);
|
|
160
160
|
}
|
|
161
161
|
return t;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Ye(e, t) {
|
|
164
164
|
return typeof e == "function" ? e(...t) : !!e;
|
|
165
165
|
}
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
|
|
168
|
-
var
|
|
169
|
-
let e = () =>
|
|
168
|
+
var Xe = /* @__PURE__ */ (() => {
|
|
169
|
+
let e = () => Le;
|
|
170
170
|
return {
|
|
171
171
|
isServer() {
|
|
172
172
|
return e();
|
|
@@ -178,7 +178,7 @@ var Ze = /* @__PURE__ */ (() => {
|
|
|
178
178
|
})();
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region node_modules/@tanstack/query-core/build/modern/thenable.js
|
|
181
|
-
function
|
|
181
|
+
function Ze() {
|
|
182
182
|
let e, t, n = new Promise((n, r) => {
|
|
183
183
|
e = n, t = r;
|
|
184
184
|
});
|
|
@@ -200,13 +200,13 @@ function Qe() {
|
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
203
|
-
var
|
|
204
|
-
function
|
|
203
|
+
var Qe = Ie;
|
|
204
|
+
function $e() {
|
|
205
205
|
let e = [], t = 0, n = (e) => {
|
|
206
206
|
e();
|
|
207
207
|
}, r = (e) => {
|
|
208
208
|
e();
|
|
209
|
-
}, i =
|
|
209
|
+
}, i = Qe, a = (r) => {
|
|
210
210
|
t ? e.push(r) : i(() => {
|
|
211
211
|
n(r);
|
|
212
212
|
});
|
|
@@ -248,7 +248,7 @@ function et() {
|
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
var
|
|
251
|
+
var et = $e(), tt = new class extends Me {
|
|
252
252
|
#e = !0;
|
|
253
253
|
#t;
|
|
254
254
|
#n;
|
|
@@ -282,16 +282,16 @@ var tt = et(), nt = new class extends Pe {
|
|
|
282
282
|
}();
|
|
283
283
|
//#endregion
|
|
284
284
|
//#region node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
285
|
-
function
|
|
286
|
-
return (e ?? "online") === "online" ?
|
|
285
|
+
function nt(e) {
|
|
286
|
+
return (e ?? "online") === "online" ? tt.isOnline() : !0;
|
|
287
287
|
}
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region node_modules/@tanstack/query-core/build/modern/query.js
|
|
290
|
-
function
|
|
290
|
+
function rt(e, t) {
|
|
291
291
|
return {
|
|
292
292
|
fetchFailureCount: 0,
|
|
293
293
|
fetchFailureReason: null,
|
|
294
|
-
fetchStatus:
|
|
294
|
+
fetchStatus: nt(t.networkMode) ? "fetching" : "paused",
|
|
295
295
|
...e === void 0 && {
|
|
296
296
|
error: null,
|
|
297
297
|
status: "pending"
|
|
@@ -300,9 +300,9 @@ function J(e, t) {
|
|
|
300
300
|
}
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
303
|
-
var
|
|
303
|
+
var it = class extends Me {
|
|
304
304
|
constructor(e, t) {
|
|
305
|
-
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);
|
|
306
306
|
}
|
|
307
307
|
#e;
|
|
308
308
|
#t = void 0;
|
|
@@ -323,36 +323,36 @@ var rt = class extends Pe {
|
|
|
323
323
|
this.refetch = this.refetch.bind(this);
|
|
324
324
|
}
|
|
325
325
|
onSubscribe() {
|
|
326
|
-
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());
|
|
327
327
|
}
|
|
328
328
|
onUnsubscribe() {
|
|
329
329
|
this.hasListeners() || this.destroy();
|
|
330
330
|
}
|
|
331
331
|
shouldFetchOnReconnect() {
|
|
332
|
-
return
|
|
332
|
+
return st(this.#t, this.options, this.options.refetchOnReconnect);
|
|
333
333
|
}
|
|
334
334
|
shouldFetchOnWindowFocus() {
|
|
335
|
-
return
|
|
335
|
+
return st(this.#t, this.options, this.options.refetchOnWindowFocus);
|
|
336
336
|
}
|
|
337
337
|
destroy() {
|
|
338
338
|
this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
|
|
339
339
|
}
|
|
340
340
|
setOptions(e) {
|
|
341
341
|
let t = this.options, n = this.#t;
|
|
342
|
-
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
|
343
|
-
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({
|
|
344
344
|
type: "observerOptionsUpdated",
|
|
345
345
|
query: this.#t,
|
|
346
346
|
observer: this
|
|
347
347
|
});
|
|
348
348
|
let r = this.hasListeners();
|
|
349
|
-
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();
|
|
350
350
|
let i = this.#_();
|
|
351
|
-
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);
|
|
352
352
|
}
|
|
353
353
|
getOptimisticResult(e) {
|
|
354
354
|
let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
|
|
355
|
-
return
|
|
355
|
+
return J(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
|
|
356
356
|
}
|
|
357
357
|
getCurrentResult() {
|
|
358
358
|
return this.#r;
|
|
@@ -382,14 +382,14 @@ var rt = class extends Pe {
|
|
|
382
382
|
#h(e) {
|
|
383
383
|
this.#S();
|
|
384
384
|
let t = this.#t.fetch(this.options, e);
|
|
385
|
-
return e?.throwOnError || (t = t.catch(
|
|
385
|
+
return e?.throwOnError || (t = t.catch(Re)), t;
|
|
386
386
|
}
|
|
387
387
|
#g() {
|
|
388
388
|
this.#b();
|
|
389
|
-
let e =
|
|
390
|
-
if (
|
|
391
|
-
let t =
|
|
392
|
-
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(() => {
|
|
393
393
|
this.#r.isStale || this.updateResult();
|
|
394
394
|
}, t);
|
|
395
395
|
}
|
|
@@ -397,26 +397,26 @@ var rt = class extends Pe {
|
|
|
397
397
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
398
398
|
}
|
|
399
399
|
#v(e) {
|
|
400
|
-
this.#x(), this.#p = e, !(
|
|
401
|
-
(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();
|
|
402
402
|
}, this.#p));
|
|
403
403
|
}
|
|
404
404
|
#y() {
|
|
405
405
|
this.#g(), this.#v(this.#_());
|
|
406
406
|
}
|
|
407
407
|
#b() {
|
|
408
|
-
this.#d !== void 0 && (
|
|
408
|
+
this.#d !== void 0 && (Fe.clearTimeout(this.#d), this.#d = void 0);
|
|
409
409
|
}
|
|
410
410
|
#x() {
|
|
411
|
-
this.#f !== void 0 && (
|
|
411
|
+
this.#f !== void 0 && (Fe.clearInterval(this.#f), this.#f = void 0);
|
|
412
412
|
}
|
|
413
413
|
createResult(e, t) {
|
|
414
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;
|
|
415
415
|
if (t._optimisticResults) {
|
|
416
|
-
let i = this.hasListeners(), a = !i &&
|
|
416
|
+
let i = this.hasListeners(), a = !i && ot(e, t), o = i && ct(e, n, t, r);
|
|
417
417
|
(a || o) && (l = {
|
|
418
418
|
...l,
|
|
419
|
-
...
|
|
419
|
+
...rt(c.data, e.options)
|
|
420
420
|
}), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
|
|
421
421
|
}
|
|
422
422
|
let { error: f, errorUpdatedAt: p, status: m } = l;
|
|
@@ -424,11 +424,11 @@ var rt = class extends Pe {
|
|
|
424
424
|
let h = !1;
|
|
425
425
|
if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
|
|
426
426
|
let e;
|
|
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 =
|
|
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);
|
|
428
428
|
}
|
|
429
429
|
if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
|
|
430
430
|
else try {
|
|
431
|
-
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;
|
|
432
432
|
} catch (e) {
|
|
433
433
|
this.#s = e;
|
|
434
434
|
}
|
|
@@ -456,16 +456,16 @@ var rt = class extends Pe {
|
|
|
456
456
|
isPaused: l.fetchStatus === "paused",
|
|
457
457
|
isPlaceholderData: u,
|
|
458
458
|
isRefetchError: v && b,
|
|
459
|
-
isStale:
|
|
459
|
+
isStale: lt(e, t),
|
|
460
460
|
refetch: this.refetch,
|
|
461
461
|
promise: this.#o,
|
|
462
|
-
isEnabled:
|
|
462
|
+
isEnabled: q(t.enabled, e) !== !1
|
|
463
463
|
};
|
|
464
464
|
if (this.options.experimental_prefetchInRender) {
|
|
465
465
|
let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
|
|
466
466
|
r ? e.reject(x.error) : t && e.resolve(x.data);
|
|
467
467
|
}, a = () => {
|
|
468
|
-
i(this.#o = x.promise =
|
|
468
|
+
i(this.#o = x.promise = Ze());
|
|
469
469
|
}, o = this.#o;
|
|
470
470
|
switch (o.status) {
|
|
471
471
|
case "pending":
|
|
@@ -483,7 +483,7 @@ var rt = class extends Pe {
|
|
|
483
483
|
}
|
|
484
484
|
updateResult() {
|
|
485
485
|
let e = this.#r, t = this.createResult(this.#t, this.options);
|
|
486
|
-
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: (() => {
|
|
487
487
|
if (!e) return !0;
|
|
488
488
|
let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
|
|
489
489
|
if (n === "all" || !n && !this.#m.size) return !0;
|
|
@@ -504,7 +504,7 @@ var rt = class extends Pe {
|
|
|
504
504
|
this.updateResult(), this.hasListeners() && this.#y();
|
|
505
505
|
}
|
|
506
506
|
#C(e) {
|
|
507
|
-
|
|
507
|
+
et.batch(() => {
|
|
508
508
|
e.listeners && this.listeners.forEach((e) => {
|
|
509
509
|
e(this.#r);
|
|
510
510
|
}), this.#e.getQueryCache().notify({
|
|
@@ -514,31 +514,31 @@ var rt = class extends Pe {
|
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
516
|
};
|
|
517
|
-
function it(e, t) {
|
|
518
|
-
return G(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && G(t.retryOnMount, e) === !1);
|
|
519
|
-
}
|
|
520
517
|
function at(e, t) {
|
|
521
|
-
return
|
|
518
|
+
return q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && q(t.retryOnMount, e) === !1);
|
|
519
|
+
}
|
|
520
|
+
function ot(e, t) {
|
|
521
|
+
return at(e, t) || e.state.data !== void 0 && st(e, t, t.refetchOnMount);
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
if (
|
|
523
|
+
function st(e, t, n) {
|
|
524
|
+
if (q(t.enabled, e) !== !1 && K(t.staleTime, e) !== "static") {
|
|
525
525
|
let r = typeof n == "function" ? n(e) : n;
|
|
526
|
-
return r === "always" || r !== !1 &&
|
|
526
|
+
return r === "always" || r !== !1 && lt(e, t);
|
|
527
527
|
}
|
|
528
528
|
return !1;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
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);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
return
|
|
533
|
+
function lt(e, t) {
|
|
534
|
+
return q(t.enabled, e) !== !1 && e.isStaleByTime(K(t.staleTime, e));
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
return !
|
|
536
|
+
function J(e, t) {
|
|
537
|
+
return !We(e.getCurrentResult(), t);
|
|
538
538
|
}
|
|
539
539
|
//#endregion
|
|
540
540
|
//#region node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
541
|
-
function
|
|
541
|
+
function ut() {
|
|
542
542
|
return {
|
|
543
543
|
context: void 0,
|
|
544
544
|
data: void 0,
|
|
@@ -553,7 +553,7 @@ function lt() {
|
|
|
553
553
|
}
|
|
554
554
|
//#endregion
|
|
555
555
|
//#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
|
|
556
|
-
var
|
|
556
|
+
var Y = class extends Me {
|
|
557
557
|
#e;
|
|
558
558
|
#t = void 0;
|
|
559
559
|
#n;
|
|
@@ -566,11 +566,11 @@ var ut = class extends Pe {
|
|
|
566
566
|
}
|
|
567
567
|
setOptions(e) {
|
|
568
568
|
let t = this.options;
|
|
569
|
-
this.options = this.#e.defaultMutationOptions(e),
|
|
569
|
+
this.options = this.#e.defaultMutationOptions(e), We(this.options, t) || this.#e.getMutationCache().notify({
|
|
570
570
|
type: "observerOptionsUpdated",
|
|
571
571
|
mutation: this.#n,
|
|
572
572
|
observer: this
|
|
573
|
-
}), 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);
|
|
574
574
|
}
|
|
575
575
|
onUnsubscribe() {
|
|
576
576
|
this.hasListeners() || this.#n?.removeObserver(this);
|
|
@@ -588,7 +588,7 @@ var ut = class extends Pe {
|
|
|
588
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);
|
|
589
589
|
}
|
|
590
590
|
#i() {
|
|
591
|
-
let e = this.#n?.state ??
|
|
591
|
+
let e = this.#n?.state ?? ut();
|
|
592
592
|
this.#t = {
|
|
593
593
|
...e,
|
|
594
594
|
isPending: e.status === "pending",
|
|
@@ -600,7 +600,7 @@ var ut = class extends Pe {
|
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
602
|
#a(e) {
|
|
603
|
-
|
|
603
|
+
et.batch(() => {
|
|
604
604
|
if (this.#r && this.hasListeners()) {
|
|
605
605
|
let t = this.#t.variables, n = this.#t.context, r = {
|
|
606
606
|
client: this.#e,
|
|
@@ -662,65 +662,65 @@ function gt() {
|
|
|
662
662
|
isReset: () => e
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
|
-
var
|
|
666
|
-
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;
|
|
667
667
|
(e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
|
|
668
|
-
},
|
|
668
|
+
}, bt = (e) => {
|
|
669
669
|
t.useEffect(() => {
|
|
670
670
|
e.clearReset();
|
|
671
671
|
}, [e]);
|
|
672
|
-
},
|
|
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) => {
|
|
673
673
|
if (e.suspense) {
|
|
674
674
|
let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
|
|
675
675
|
e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
|
|
676
676
|
}
|
|
677
|
-
},
|
|
677
|
+
}, Ct = (e, t) => e.isLoading && e.isFetching && !t, wt = (e, t) => e?.suspense && t.isPending, Tt = (e, t, n) => t.fetchOptimistic(e).catch(() => {
|
|
678
678
|
n.clearReset();
|
|
679
679
|
});
|
|
680
680
|
//#endregion
|
|
681
681
|
//#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
682
|
-
function
|
|
682
|
+
function Et(e, n, r) {
|
|
683
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 =
|
|
684
|
+
let i = ht(), a = vt(), o = ft(r), s = o.defaultQueryOptions(e);
|
|
685
685
|
o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);
|
|
686
686
|
let c = o.getQueryCache().get(s.queryHash);
|
|
687
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`));
|
|
688
688
|
let l = e.subscribed !== !1;
|
|
689
|
-
s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0,
|
|
689
|
+
s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, St(s), yt(s, a, c), bt(a);
|
|
690
690
|
let u = !o.getQueryCache().get(s.queryHash), [d] = t.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
|
|
691
691
|
if (t.useSyncExternalStore(t.useCallback((e) => {
|
|
692
|
-
let t = p ? d.subscribe(
|
|
692
|
+
let t = p ? d.subscribe(et.batchCalls(e)) : Re;
|
|
693
693
|
return d.updateResult(), t;
|
|
694
694
|
}, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), t.useEffect(() => {
|
|
695
695
|
d.setOptions(s);
|
|
696
|
-
}, [s, d]),
|
|
697
|
-
if (
|
|
696
|
+
}, [s, d]), wt(s, f)) throw Tt(s, d, a);
|
|
697
|
+
if (xt({
|
|
698
698
|
result: f,
|
|
699
699
|
errorResetBoundary: a,
|
|
700
700
|
throwOnError: s.throwOnError,
|
|
701
701
|
query: c,
|
|
702
702
|
suspense: s.suspense
|
|
703
703
|
})) throw f.error;
|
|
704
|
-
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(() => {
|
|
705
705
|
d.updateResult();
|
|
706
706
|
}), s.notifyOnChangeProps ? f : d.trackResult(f);
|
|
707
707
|
}
|
|
708
708
|
//#endregion
|
|
709
709
|
//#region node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
710
|
-
function
|
|
711
|
-
return
|
|
710
|
+
function Dt(e, t) {
|
|
711
|
+
return Et(e, it, t);
|
|
712
712
|
}
|
|
713
713
|
//#endregion
|
|
714
714
|
//#region node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
715
|
-
function
|
|
716
|
-
let r = ft(n), [i] = t.useState(() => new
|
|
715
|
+
function Ot(e, n) {
|
|
716
|
+
let r = ft(n), [i] = t.useState(() => new Y(r, e));
|
|
717
717
|
t.useEffect(() => {
|
|
718
718
|
i.setOptions(e);
|
|
719
719
|
}, [i, e]);
|
|
720
|
-
let a = t.useSyncExternalStore(t.useCallback((e) => i.subscribe(
|
|
721
|
-
i.mutate(e, t).catch(
|
|
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);
|
|
722
722
|
}, [i]);
|
|
723
|
-
if (a.error &&
|
|
723
|
+
if (a.error && Ye(i.options.throwOnError, [a.error])) throw a.error;
|
|
724
724
|
return {
|
|
725
725
|
...a,
|
|
726
726
|
mutate: o,
|
|
@@ -729,238 +729,233 @@ function Dt(e, n) {
|
|
|
729
729
|
}
|
|
730
730
|
//#endregion
|
|
731
731
|
//#region src/Context/DataTableContext.tsx
|
|
732
|
-
var
|
|
733
|
-
function
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
})
|
|
745
|
-
let u;
|
|
746
|
-
return n[7] !== c || n[8] !== l ? (u = /* @__PURE__ */ m(Ot.Provider, {
|
|
747
|
-
value: c,
|
|
748
|
-
children: l
|
|
749
|
-
}), n[7] = c, n[8] = l, n[9] = u) : u = n[9], u;
|
|
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, {
|
|
735
|
+
value: {
|
|
736
|
+
baseUrl: t,
|
|
737
|
+
queryClient: n,
|
|
738
|
+
getHeaders: r
|
|
739
|
+
},
|
|
740
|
+
children: /* @__PURE__ */ m(pt, {
|
|
741
|
+
client: n,
|
|
742
|
+
children: e
|
|
743
|
+
})
|
|
744
|
+
});
|
|
750
745
|
}
|
|
751
746
|
//#endregion
|
|
752
747
|
//#region src/Hooks/useDataTable.ts
|
|
753
|
-
function
|
|
754
|
-
let e = s(
|
|
748
|
+
function Mt() {
|
|
749
|
+
let e = s(kt);
|
|
755
750
|
if (!e) throw Error("useDataTable must be used within a DataTableProvider");
|
|
756
751
|
return e;
|
|
757
752
|
}
|
|
758
753
|
//#endregion
|
|
759
754
|
//#region src/Hooks/useApi.ts
|
|
760
|
-
var
|
|
755
|
+
var Nt = class extends Error {
|
|
761
756
|
status;
|
|
762
757
|
violations;
|
|
763
758
|
constructor(e, t, n) {
|
|
764
759
|
super(e), this.name = "ApiError", this.status = t, this.violations = n;
|
|
765
760
|
}
|
|
766
761
|
};
|
|
767
|
-
function
|
|
768
|
-
return e instanceof
|
|
762
|
+
function Pt(e) {
|
|
763
|
+
return e instanceof Nt ? e.violations : void 0;
|
|
769
764
|
}
|
|
770
|
-
async function
|
|
765
|
+
async function Ft(e, t) {
|
|
771
766
|
let n = await fetch(e, t);
|
|
772
767
|
if (n.status >= 400) {
|
|
773
768
|
let e = await n.text();
|
|
774
|
-
if (!e) throw new
|
|
769
|
+
if (!e) throw new Nt(`HTTP ${n.status}: ${n.statusText}`, n.status);
|
|
775
770
|
let t = null;
|
|
776
771
|
try {
|
|
777
772
|
t = JSON.parse(e);
|
|
778
773
|
} catch {
|
|
779
|
-
throw new
|
|
774
|
+
throw new Nt(e, n.status);
|
|
780
775
|
}
|
|
781
776
|
let r = Array.isArray(t?.violations) ? t.violations.filter((e) => e?.field && e?.message).map((e) => ({
|
|
782
777
|
field: String(e.field),
|
|
783
778
|
message: String(e.message)
|
|
784
779
|
})) : void 0;
|
|
785
|
-
throw new
|
|
780
|
+
throw new Nt(t?.message ?? t?.error ?? t?.title ?? e, n.status, r);
|
|
786
781
|
}
|
|
787
782
|
return n;
|
|
788
783
|
}
|
|
789
|
-
var
|
|
790
|
-
async function
|
|
791
|
-
return (await
|
|
784
|
+
var It = (e) => e.map((e) => e.toString());
|
|
785
|
+
async function Lt(e, t) {
|
|
786
|
+
return (await Ft(e, {
|
|
792
787
|
method: "GET",
|
|
793
788
|
headers: await t()
|
|
794
789
|
})).json();
|
|
795
790
|
}
|
|
796
|
-
async function
|
|
797
|
-
return (await
|
|
791
|
+
async function Rt(e, t, n) {
|
|
792
|
+
return (await Ft(`${e}/${t}`, {
|
|
798
793
|
method: "GET",
|
|
799
794
|
headers: await n()
|
|
800
795
|
})).json();
|
|
801
796
|
}
|
|
802
|
-
async function
|
|
803
|
-
await
|
|
797
|
+
async function zt(e, t, n) {
|
|
798
|
+
await Ft(`${e}/${t}`, {
|
|
804
799
|
method: "DELETE",
|
|
805
800
|
headers: await n()
|
|
806
801
|
});
|
|
807
802
|
}
|
|
808
|
-
async function
|
|
809
|
-
let r = await
|
|
803
|
+
async function Bt(e, t, n) {
|
|
804
|
+
let r = await Ft(e, {
|
|
810
805
|
method: "POST",
|
|
811
806
|
headers: await n(),
|
|
812
807
|
body: JSON.stringify(t)
|
|
813
808
|
});
|
|
814
809
|
return r.status === 204 ? t : r.json();
|
|
815
810
|
}
|
|
816
|
-
async function
|
|
817
|
-
let i = await
|
|
811
|
+
async function Vt(e, t, n, r) {
|
|
812
|
+
let i = await Ft(t, {
|
|
818
813
|
method: e,
|
|
819
814
|
headers: await n(),
|
|
820
815
|
body: r ? JSON.stringify(r) : void 0
|
|
821
816
|
});
|
|
822
817
|
if (i.status !== 204) return i.json();
|
|
823
818
|
}
|
|
824
|
-
async function
|
|
825
|
-
let r = await
|
|
819
|
+
async function Ht(e, t, n) {
|
|
820
|
+
let r = await Ft(`${e}/${t.id}`, {
|
|
826
821
|
method: "PUT",
|
|
827
822
|
headers: await n(),
|
|
828
823
|
body: JSON.stringify(t)
|
|
829
824
|
});
|
|
830
825
|
return r.status === 204 ? t : r.json();
|
|
831
826
|
}
|
|
832
|
-
function
|
|
833
|
-
let i = e(14), { baseUrl: a, getHeaders: o } =
|
|
827
|
+
function Ut(t, n, r) {
|
|
828
|
+
let i = e(14), { baseUrl: a, getHeaders: o } = Mt(), s;
|
|
834
829
|
if (i[0] !== r || i[1] !== n) {
|
|
835
830
|
let e;
|
|
836
|
-
i[3] === r ? e = i[4] : (e = r?.toString(), i[3] = r, i[4] = e), s = [...
|
|
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;
|
|
837
832
|
} else s = i[2];
|
|
838
833
|
let c;
|
|
839
|
-
i[5] !== t || i[6] !== a || i[7] !== o || i[8] !== r ? (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];
|
|
840
835
|
let l = !!r, u;
|
|
841
836
|
return i[10] !== s || i[11] !== c || i[12] !== l ? (u = {
|
|
842
837
|
queryKey: s,
|
|
843
838
|
queryFn: c,
|
|
844
839
|
enabled: l
|
|
845
|
-
}, i[10] = s, i[11] = c, i[12] = l, i[13] = u) : u = i[13],
|
|
840
|
+
}, i[10] = s, i[11] = c, i[12] = l, i[13] = u) : u = i[13], Dt(u);
|
|
846
841
|
}
|
|
847
|
-
function
|
|
848
|
-
let i = e(10), a = r === void 0 ? !0 : r, { baseUrl: o, getHeaders: s } =
|
|
849
|
-
i[0] === n ? c = i[1] : (c =
|
|
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);
|
|
850
845
|
let l;
|
|
851
|
-
i[2] !== t || i[3] !== o || i[4] !== s ? (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];
|
|
852
847
|
let u;
|
|
853
848
|
return i[6] !== a || i[7] !== c || i[8] !== l ? (u = {
|
|
854
849
|
queryKey: c,
|
|
855
850
|
queryFn: l,
|
|
856
851
|
enabled: a
|
|
857
|
-
}, i[6] = a, i[7] = c, i[8] = l, i[9] = u) : u = i[9],
|
|
852
|
+
}, i[6] = a, i[7] = c, i[8] = l, i[9] = u) : u = i[9], Dt(u);
|
|
858
853
|
}
|
|
859
|
-
function
|
|
860
|
-
return Promise.all([e.invalidateQueries({ queryKey:
|
|
854
|
+
function Gt(e, t, n) {
|
|
855
|
+
return Promise.all([e.invalidateQueries({ queryKey: It(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
|
|
861
856
|
}
|
|
862
|
-
function
|
|
863
|
-
let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } =
|
|
864
|
-
i[0] === n ? c = i[1] : (c =
|
|
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);
|
|
865
860
|
let l;
|
|
866
|
-
i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) =>
|
|
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];
|
|
867
862
|
let u;
|
|
868
|
-
i[6] !== r || i[7] !== o || i[8] !== n ? (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];
|
|
869
864
|
let d;
|
|
870
865
|
return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
|
|
871
866
|
mutationKey: c,
|
|
872
867
|
mutationFn: l,
|
|
873
868
|
onSettled: u
|
|
874
|
-
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13],
|
|
869
|
+
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Ot(d);
|
|
875
870
|
}
|
|
876
|
-
function
|
|
877
|
-
let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } =
|
|
878
|
-
i[0] === n ? c = i[1] : (c =
|
|
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);
|
|
879
874
|
let l;
|
|
880
|
-
i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) =>
|
|
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];
|
|
881
876
|
let u;
|
|
882
|
-
i[6] !== r || i[7] !== o || i[8] !== n ? (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];
|
|
883
878
|
let d;
|
|
884
879
|
return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
|
|
885
880
|
mutationKey: c,
|
|
886
881
|
mutationFn: l,
|
|
887
882
|
onSettled: u
|
|
888
|
-
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13],
|
|
883
|
+
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Ot(d);
|
|
889
884
|
}
|
|
890
|
-
function
|
|
891
|
-
let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } =
|
|
892
|
-
i[0] === n ? c = i[1] : (c =
|
|
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);
|
|
893
888
|
let l;
|
|
894
|
-
i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) =>
|
|
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];
|
|
895
890
|
let u;
|
|
896
|
-
i[6] !== r || i[7] !== o || i[8] !== n ? (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];
|
|
897
892
|
let d;
|
|
898
893
|
return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
|
|
899
894
|
mutationKey: c,
|
|
900
895
|
mutationFn: l,
|
|
901
896
|
onSettled: u
|
|
902
|
-
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13],
|
|
897
|
+
}, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Ot(d);
|
|
903
898
|
}
|
|
904
899
|
//#endregion
|
|
905
900
|
//#region src/DataTable/EntityForm.tsx
|
|
906
|
-
function
|
|
901
|
+
function Yt(e, t) {
|
|
907
902
|
return typeof e.required == "function" ? e.required(t) : !!e.required;
|
|
908
903
|
}
|
|
909
|
-
function Yt(e) {
|
|
910
|
-
return e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {});
|
|
911
|
-
}
|
|
912
904
|
function Xt(e) {
|
|
913
|
-
return e.
|
|
905
|
+
return e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {});
|
|
914
906
|
}
|
|
915
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) {
|
|
916
911
|
return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t === "" ? void 0 : t]));
|
|
917
912
|
}
|
|
918
|
-
function
|
|
913
|
+
function $t(e, t) {
|
|
919
914
|
let n = { ...e };
|
|
920
915
|
return t.forEach((e) => {
|
|
921
916
|
let t = e.id;
|
|
922
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] = "");
|
|
923
918
|
}), n;
|
|
924
919
|
}
|
|
925
|
-
var
|
|
926
|
-
function en(e, t) {
|
|
927
|
-
return Object.fromEntries((Nt(e) ?? []).filter((e) => t.has($t(e.field))).map((e) => [$t(e.field), e.message]));
|
|
928
|
-
}
|
|
920
|
+
var en = (e) => e.split(".").pop() ?? e;
|
|
929
921
|
function tn(e, t) {
|
|
930
|
-
|
|
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) {
|
|
925
|
+
let n = Pt(e);
|
|
931
926
|
if (!n) return e?.message;
|
|
932
|
-
let r = n.filter((e) => !t.has(
|
|
927
|
+
let r = n.filter((e) => !t.has(en(e.field)));
|
|
933
928
|
return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
|
|
934
929
|
}
|
|
935
|
-
function
|
|
930
|
+
function rn(t) {
|
|
936
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;
|
|
937
|
-
n[0] === i ? w = n[1] : (w =
|
|
932
|
+
n[0] === i ? w = n[1] : (w = Xt(i), n[0] = i, n[1] = w);
|
|
938
933
|
let T;
|
|
939
|
-
n[2] === i ? T = n[3] : (T =
|
|
934
|
+
n[2] === i ? T = n[3] : (T = Zt(i), n[2] = i, n[3] = T);
|
|
940
935
|
let D;
|
|
941
936
|
n[4] !== w || n[5] !== T ? (D = {
|
|
942
937
|
mode: "uncontrolled",
|
|
943
938
|
initialValues: w,
|
|
944
939
|
validate: T
|
|
945
940
|
}, n[4] = w, n[5] = T, n[6] = D) : D = n[6];
|
|
946
|
-
let O =
|
|
941
|
+
let O = ge(D), k;
|
|
947
942
|
n[7] !== i || n[8] !== O || n[9] !== o ? (k = () => {
|
|
948
943
|
if (o) {
|
|
949
|
-
let e =
|
|
944
|
+
let e = $t(o, i);
|
|
950
945
|
O.initialize(e), O.setValues(e);
|
|
951
946
|
}
|
|
952
947
|
}, n[7] = i, n[8] = O, n[9] = o, n[10] = k) : k = n[10];
|
|
953
948
|
let A;
|
|
954
949
|
n[11] === o ? A = n[12] : (A = [o], n[11] = o, n[12] = A), c(k, A);
|
|
955
|
-
let j, M, N,
|
|
950
|
+
let j, M, N, F, I;
|
|
956
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) {
|
|
957
|
-
let e = new Set(i.map(
|
|
952
|
+
let e = new Set(i.map(ln)), t = nn(u, e), o = [...new Set(i.filter(cn).map(sn))];
|
|
958
953
|
j = o.length > 0, M = _ === o.length - 1;
|
|
959
954
|
let c;
|
|
960
955
|
n[26] !== O || n[27] !== s ? (c = function(e) {
|
|
961
956
|
let t = O.getValues();
|
|
962
957
|
if (e.conditional && !e.conditional(t)) return null;
|
|
963
|
-
let n =
|
|
958
|
+
let n = Yt(e, t), r = O.getInputProps(e.id);
|
|
964
959
|
switch (e.type) {
|
|
965
960
|
case "number": return /* @__PURE__ */ m(P, {
|
|
966
961
|
decimalSeparator: ",",
|
|
@@ -970,7 +965,7 @@ function nn(t) {
|
|
|
970
965
|
required: n,
|
|
971
966
|
...r
|
|
972
967
|
}, O.key(e.id));
|
|
973
|
-
case "date": return /* @__PURE__ */ m(
|
|
968
|
+
case "date": return /* @__PURE__ */ m(he, {
|
|
974
969
|
valueFormat: "DD.MM.YYYY",
|
|
975
970
|
clearable: !0,
|
|
976
971
|
label: e.column.title,
|
|
@@ -984,7 +979,7 @@ function nn(t) {
|
|
|
984
979
|
required: n,
|
|
985
980
|
...O.getInputProps(e.id, { type: "checkbox" })
|
|
986
981
|
}, O.key(e.id));
|
|
987
|
-
case "textarea": return /* @__PURE__ */ m(
|
|
982
|
+
case "textarea": return /* @__PURE__ */ m(ce, {
|
|
988
983
|
minRows: 3,
|
|
989
984
|
autosize: !0,
|
|
990
985
|
label: e.column.title,
|
|
@@ -999,7 +994,7 @@ function nn(t) {
|
|
|
999
994
|
error: r.error,
|
|
1000
995
|
required: n
|
|
1001
996
|
});
|
|
1002
|
-
default: return /* @__PURE__ */ m(
|
|
997
|
+
default: return /* @__PURE__ */ m(se, {
|
|
1003
998
|
type: e.id.includes("email") ? "email" : void 0,
|
|
1004
999
|
label: e.column.title,
|
|
1005
1000
|
placeholder: e.placeholder ?? "",
|
|
@@ -1011,72 +1006,72 @@ function nn(t) {
|
|
|
1011
1006
|
let l = c, f;
|
|
1012
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];
|
|
1013
1008
|
let p = f;
|
|
1014
|
-
|
|
1009
|
+
I = t && /* @__PURE__ */ m(v, {
|
|
1015
1010
|
variant: "outline",
|
|
1016
1011
|
color: "red",
|
|
1017
1012
|
title: "Fehler aufgetreten",
|
|
1018
1013
|
mb: "lg",
|
|
1019
1014
|
children: t
|
|
1020
1015
|
}), N = O.onSubmit(async (t) => {
|
|
1021
|
-
let n =
|
|
1016
|
+
let n = Qt(t);
|
|
1022
1017
|
try {
|
|
1023
1018
|
await d(n);
|
|
1024
1019
|
} catch (t) {
|
|
1025
|
-
let n =
|
|
1020
|
+
let n = tn(t, e);
|
|
1026
1021
|
Object.keys(n).length > 0 && O.setErrors(n);
|
|
1027
1022
|
return;
|
|
1028
1023
|
}
|
|
1029
|
-
j && !M ? y(
|
|
1030
|
-
}),
|
|
1024
|
+
j && !M ? y(on) : (O.setInitialValues(n), O.reset(), g());
|
|
1025
|
+
}), F = j ? /* @__PURE__ */ m(ne, {
|
|
1031
1026
|
active: _,
|
|
1032
1027
|
size: "sm",
|
|
1033
|
-
children: o.map((e) => /* @__PURE__ */ m(
|
|
1028
|
+
children: o.map((e) => /* @__PURE__ */ m(ne.Step, {
|
|
1034
1029
|
...a?.[e - 1] ? { label: a[e - 1].label } : {},
|
|
1035
1030
|
children: p(e)
|
|
1036
1031
|
}, e))
|
|
1037
|
-
}) : p(), n[13] = _, n[14] = u, n[15] = i, n[16] = O, n[17] = g, n[18] = d, n[19] = s, n[20] = a, n[21] = j, n[22] = M, n[23] = N, n[24] =
|
|
1038
|
-
} else j = n[21], M = n[22], N = n[23],
|
|
1039
|
-
let
|
|
1040
|
-
n[32] !== _ || n[33] !== j || n[34] !== x || n[35] !== M || n[36] !== g || n[37] !== l ? (
|
|
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, {
|
|
1041
1036
|
mt: "md",
|
|
1042
1037
|
justify: "end",
|
|
1043
1038
|
children: [/* @__PURE__ */ m(b, {
|
|
1044
1039
|
variant: "outline",
|
|
1045
|
-
onClick: () => j && _ > 0 ? y(
|
|
1040
|
+
onClick: () => j && _ > 0 ? y(an) : g(),
|
|
1046
1041
|
children: j && _ > 0 ? "Zurück" : "Abbrechen"
|
|
1047
1042
|
}), /* @__PURE__ */ m(b, {
|
|
1048
1043
|
type: "submit",
|
|
1049
1044
|
loading: l,
|
|
1050
1045
|
children: j && !M ? "Weiter" : "Speichern"
|
|
1051
1046
|
})]
|
|
1052
|
-
}), n[32] = _, n[33] = j, n[34] = x, n[35] = M, n[36] = g, n[37] = l, n[38] =
|
|
1053
|
-
let L;
|
|
1054
|
-
n[39] !== N || n[40] !== ee || n[41] !== I ? (L = /* @__PURE__ */ h("form", {
|
|
1055
|
-
onSubmit: N,
|
|
1056
|
-
children: [ee, I]
|
|
1057
|
-
}), n[39] = N, n[40] = ee, n[41] = I, n[42] = L) : L = n[42];
|
|
1047
|
+
}), n[32] = _, n[33] = j, n[34] = x, n[35] = M, n[36] = g, n[37] = l, n[38] = L) : L = n[38];
|
|
1058
1048
|
let R;
|
|
1059
|
-
|
|
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;
|
|
1060
1055
|
}
|
|
1061
|
-
function
|
|
1056
|
+
function an(e) {
|
|
1062
1057
|
return e - 1;
|
|
1063
1058
|
}
|
|
1064
|
-
function
|
|
1059
|
+
function on(e) {
|
|
1065
1060
|
return e + 1;
|
|
1066
1061
|
}
|
|
1067
|
-
function
|
|
1062
|
+
function sn(e) {
|
|
1068
1063
|
return e.step;
|
|
1069
1064
|
}
|
|
1070
|
-
function
|
|
1065
|
+
function cn(e) {
|
|
1071
1066
|
return typeof e.step == "number";
|
|
1072
1067
|
}
|
|
1073
|
-
function
|
|
1068
|
+
function ln(e) {
|
|
1074
1069
|
return String(e.id);
|
|
1075
1070
|
}
|
|
1076
1071
|
//#endregion
|
|
1077
1072
|
//#region src/DataTable/CreateModal.tsx
|
|
1078
|
-
function
|
|
1079
|
-
let n = e(13), { fields: r, onClose: i, queryKey: a, connectedQueryKeys: o, apiPath: s, steps: c, onCreated: l } = t, [u, d] = f(), { mutateAsync: p, isPending: h, error: g } =
|
|
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;
|
|
1080
1075
|
n[0] !== p || n[1] !== l || n[2] !== u || n[3] !== _ ? (b = async (e) => {
|
|
1081
1076
|
if (u != null) await _({
|
|
1082
1077
|
...e,
|
|
@@ -1088,7 +1083,7 @@ function ln(t) {
|
|
|
1088
1083
|
}
|
|
1089
1084
|
}, n[0] = p, n[1] = l, n[2] = u, n[3] = _, n[4] = b) : b = n[4];
|
|
1090
1085
|
let x = b, S = h || v, C = g ?? y, w;
|
|
1091
|
-
return n[5] !== r || n[6] !== i || n[7] !== x || n[8] !== u || n[9] !== c || n[10] !== S || n[11] !== C ? (w = /* @__PURE__ */ m(
|
|
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, {
|
|
1092
1087
|
fields: r,
|
|
1093
1088
|
steps: c,
|
|
1094
1089
|
recordId: u,
|
|
@@ -1100,62 +1095,62 @@ function ln(t) {
|
|
|
1100
1095
|
}
|
|
1101
1096
|
//#endregion
|
|
1102
1097
|
//#region node_modules/clsx/dist/clsx.mjs
|
|
1103
|
-
function
|
|
1098
|
+
function dn(e) {
|
|
1104
1099
|
var t, n, r = "";
|
|
1105
1100
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1106
1101
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1107
1102
|
var i = e.length;
|
|
1108
|
-
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);
|
|
1109
1104
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
1110
1105
|
return r;
|
|
1111
1106
|
}
|
|
1112
|
-
function
|
|
1113
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
1107
|
+
function X() {
|
|
1108
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = dn(e)) && (r && (r += " "), r += t);
|
|
1114
1109
|
return r;
|
|
1115
1110
|
}
|
|
1116
1111
|
//#endregion
|
|
1117
1112
|
//#region node_modules/mantine-datatable/dist/index.mjs
|
|
1118
|
-
function
|
|
1119
|
-
return e ?
|
|
1113
|
+
function Z(e, t, n) {
|
|
1114
|
+
return e ? de({
|
|
1120
1115
|
color: typeof e == "object" ? e[n] : e,
|
|
1121
1116
|
theme: t
|
|
1122
1117
|
}).value : void 0;
|
|
1123
1118
|
}
|
|
1124
|
-
function
|
|
1119
|
+
function fn({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor: i, stripedColor: a, highlightOnHoverColor: o }) {
|
|
1125
1120
|
return {
|
|
1126
|
-
"--mantine-datatable-color-light":
|
|
1127
|
-
"--mantine-datatable-color-dark":
|
|
1128
|
-
"--mantine-datatable-background-color-light":
|
|
1129
|
-
"--mantine-datatable-background-color-dark":
|
|
1130
|
-
"--mantine-datatable-border-color-light":
|
|
1131
|
-
"--mantine-datatable-border-color-dark":
|
|
1132
|
-
"--mantine-datatable-row-border-color-light":
|
|
1133
|
-
"--mantine-datatable-row-border-color-dark":
|
|
1134
|
-
"--mantine-datatable-striped-color-light":
|
|
1135
|
-
"--mantine-datatable-striped-color-dark":
|
|
1136
|
-
"--mantine-datatable-highlight-on-hover-color-light":
|
|
1137
|
-
"--mantine-datatable-highlight-on-hover-color-dark":
|
|
1121
|
+
"--mantine-datatable-color-light": Z(t, e, "light"),
|
|
1122
|
+
"--mantine-datatable-color-dark": Z(t, e, "dark"),
|
|
1123
|
+
"--mantine-datatable-background-color-light": Z(n, e, "light"),
|
|
1124
|
+
"--mantine-datatable-background-color-dark": Z(n, e, "dark"),
|
|
1125
|
+
"--mantine-datatable-border-color-light": Z(r, e, "light"),
|
|
1126
|
+
"--mantine-datatable-border-color-dark": Z(r, e, "dark"),
|
|
1127
|
+
"--mantine-datatable-row-border-color-light": Z(i, e, "light"),
|
|
1128
|
+
"--mantine-datatable-row-border-color-dark": Z(i, e, "dark"),
|
|
1129
|
+
"--mantine-datatable-striped-color-light": Z(a, e, "light"),
|
|
1130
|
+
"--mantine-datatable-striped-color-dark": Z(a, e, "dark"),
|
|
1131
|
+
"--mantine-datatable-highlight-on-hover-color-light": Z(o, e, "light"),
|
|
1132
|
+
"--mantine-datatable-highlight-on-hover-color-dark": Z(o, e, "dark")
|
|
1138
1133
|
};
|
|
1139
1134
|
}
|
|
1140
|
-
function
|
|
1135
|
+
function pn({ theme: e, paginationActiveTextColor: t, paginationActiveBackgroundColor: n }) {
|
|
1141
1136
|
return {
|
|
1142
|
-
"--mantine-datatable-pagination-active-text-color-light":
|
|
1143
|
-
"--mantine-datatable-pagination-active-text-color-dark":
|
|
1144
|
-
"--mantine-datatable-pagination-active-background-color-light":
|
|
1145
|
-
"--mantine-datatable-pagination-active-background-color-dark":
|
|
1137
|
+
"--mantine-datatable-pagination-active-text-color-light": Z(t, e, "light"),
|
|
1138
|
+
"--mantine-datatable-pagination-active-text-color-dark": Z(t, e, "dark"),
|
|
1139
|
+
"--mantine-datatable-pagination-active-background-color-light": Z(n, e, "light"),
|
|
1140
|
+
"--mantine-datatable-pagination-active-background-color-dark": Z(n, e, "dark")
|
|
1146
1141
|
};
|
|
1147
1142
|
}
|
|
1148
|
-
function
|
|
1143
|
+
function mn({ theme: e, color: t, backgroundColor: n }) {
|
|
1149
1144
|
return {
|
|
1150
|
-
"--mantine-datatable-row-color-light":
|
|
1151
|
-
"--mantine-datatable-row-color-dark":
|
|
1152
|
-
"--mantine-datatable-row-background-color-light":
|
|
1153
|
-
"--mantine-datatable-row-background-color-dark":
|
|
1145
|
+
"--mantine-datatable-row-color-light": Z(t, e, "light"),
|
|
1146
|
+
"--mantine-datatable-row-color-dark": Z(t, e, "dark"),
|
|
1147
|
+
"--mantine-datatable-row-background-color-light": Z(n, e, "light"),
|
|
1148
|
+
"--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
|
|
1154
1149
|
};
|
|
1155
1150
|
}
|
|
1156
|
-
var [
|
|
1151
|
+
var [hn, gn] = ue("useDataTableColumnsContext must be used within DataTableColumnProvider"), _n = (e) => {
|
|
1157
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("");
|
|
1158
|
-
return m(
|
|
1153
|
+
return m(hn, {
|
|
1159
1154
|
value: {
|
|
1160
1155
|
sourceColumn: y,
|
|
1161
1156
|
setSourceColumn: b,
|
|
@@ -1187,13 +1182,13 @@ var [mn, hn] = U("useDataTableColumnsContext must be used within DataTableColumn
|
|
|
1187
1182
|
children: t
|
|
1188
1183
|
});
|
|
1189
1184
|
};
|
|
1190
|
-
function
|
|
1185
|
+
function vn() {
|
|
1191
1186
|
return m("tr", {
|
|
1192
1187
|
className: "mantine-datatable-empty-row",
|
|
1193
1188
|
children: m("td", {})
|
|
1194
1189
|
});
|
|
1195
1190
|
}
|
|
1196
|
-
function
|
|
1191
|
+
function yn() {
|
|
1197
1192
|
return h("svg", {
|
|
1198
1193
|
width: "24",
|
|
1199
1194
|
height: "24",
|
|
@@ -1216,14 +1211,14 @@ function vn() {
|
|
|
1216
1211
|
]
|
|
1217
1212
|
});
|
|
1218
1213
|
}
|
|
1219
|
-
function
|
|
1214
|
+
function bn({ icon: e, text: t, active: n, children: r }) {
|
|
1220
1215
|
return m(x, {
|
|
1221
1216
|
className: "mantine-datatable-empty-state",
|
|
1222
1217
|
"data-active": n || void 0,
|
|
1223
1218
|
children: r || h(p, { children: [e || m("div", {
|
|
1224
1219
|
className: "mantine-datatable-empty-state-icon",
|
|
1225
|
-
children: m(
|
|
1226
|
-
}), m(
|
|
1220
|
+
children: m(yn, {})
|
|
1221
|
+
}), m(W, {
|
|
1227
1222
|
component: "div",
|
|
1228
1223
|
size: "sm",
|
|
1229
1224
|
c: "dimmed",
|
|
@@ -1231,59 +1226,59 @@ function yn({ icon: e, text: t, active: n, children: r }) {
|
|
|
1231
1226
|
})] })
|
|
1232
1227
|
});
|
|
1233
1228
|
}
|
|
1234
|
-
function
|
|
1229
|
+
function xn(e) {
|
|
1235
1230
|
let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
|
|
1236
1231
|
return `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
|
|
1237
1232
|
}
|
|
1238
|
-
function
|
|
1233
|
+
function Sn(e, t, n) {
|
|
1239
1234
|
return !Array.isArray(e) || n && !e.every(n) ? t : e;
|
|
1240
1235
|
}
|
|
1241
|
-
function
|
|
1236
|
+
function Cn(e) {
|
|
1242
1237
|
return typeof e == "object" && !!e && typeof e.accessor == "string";
|
|
1243
1238
|
}
|
|
1244
|
-
function
|
|
1239
|
+
function wn(e, t, n) {
|
|
1245
1240
|
return e.filter((e) => !t.map(n).includes(n(e)));
|
|
1246
1241
|
}
|
|
1247
|
-
function
|
|
1242
|
+
function Tn(e, t) {
|
|
1248
1243
|
return e.filter((e, n, r) => n === r.findIndex((n) => t(e) === t(n)));
|
|
1249
1244
|
}
|
|
1250
|
-
function
|
|
1245
|
+
function En(e, t) {
|
|
1251
1246
|
return t ? t.match(/([^[.\]])+/g).reduce((e, t) => e && e[t], e) : void 0;
|
|
1252
1247
|
}
|
|
1253
|
-
function
|
|
1254
|
-
return typeof t == "string" ?
|
|
1255
|
-
}
|
|
1256
|
-
function En(e) {
|
|
1257
|
-
return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + En(e.groups) : 1));
|
|
1248
|
+
function Q(e, t) {
|
|
1249
|
+
return typeof t == "string" ? En(e, t) : t(e);
|
|
1258
1250
|
}
|
|
1259
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));
|
|
1253
|
+
}
|
|
1254
|
+
function On(e) {
|
|
1260
1255
|
let t = [];
|
|
1261
|
-
for (let n of e) n.columns && n.columns.length > 0 ? t.push(...n.columns.filter((e) => e != null)) : n.groups && n.groups.length > 0 && t.push(...
|
|
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));
|
|
1262
1257
|
return t.filter((e) => e != null);
|
|
1263
1258
|
}
|
|
1264
|
-
function
|
|
1265
|
-
return e.columns && e.columns.length > 0 ? e.columns.filter((e, n) => e.hidden ? !1 : t ? t[n] !== !1 : !0).length : e.groups && e.groups.length > 0 ? e.groups.reduce((e, n) => e +
|
|
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;
|
|
1266
1261
|
}
|
|
1267
|
-
function
|
|
1262
|
+
function An(e, t, n = 0) {
|
|
1268
1263
|
if (n === t) return [...e];
|
|
1269
1264
|
let r = [];
|
|
1270
|
-
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));
|
|
1271
1266
|
return r;
|
|
1272
1267
|
}
|
|
1273
|
-
function
|
|
1268
|
+
function jn(e, t, n) {
|
|
1274
1269
|
return n ? !e || t : !1;
|
|
1275
1270
|
}
|
|
1276
|
-
function
|
|
1271
|
+
function Mn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1277
1272
|
let r = u(() => t.map((e) => ({
|
|
1278
1273
|
accessor: e.accessor,
|
|
1279
1274
|
defaultPinned: e.pinned,
|
|
1280
1275
|
pinnable: !!e.pinnable,
|
|
1281
1276
|
pinned: e.pinned
|
|
1282
|
-
})), [t]), [i, a] =
|
|
1277
|
+
})), [t]), [i, a] = G({
|
|
1283
1278
|
key: e ? `${e}-columns-pinning` : "",
|
|
1284
1279
|
defaultValue: e ? r : void 0,
|
|
1285
1280
|
getInitialValueInEffect: n
|
|
1286
|
-
}), o =
|
|
1281
|
+
}), o = Sn(i, r, Cn);
|
|
1287
1282
|
function s(t) {
|
|
1288
1283
|
e && a(typeof t == "function" ? (e) => t(e ?? r) : t);
|
|
1289
1284
|
}
|
|
@@ -1326,12 +1321,12 @@ function jn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1326
1321
|
resetColumnsPinning: d
|
|
1327
1322
|
};
|
|
1328
1323
|
}
|
|
1329
|
-
function
|
|
1330
|
-
let r = u(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] =
|
|
1324
|
+
function Nn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1325
|
+
let r = u(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = G({
|
|
1331
1326
|
key: e ? `${e}-columns-order` : "",
|
|
1332
1327
|
defaultValue: e ? r : void 0,
|
|
1333
1328
|
getInitialValueInEffect: n
|
|
1334
|
-
}), o =
|
|
1329
|
+
}), o = Sn(i, r, (e) => typeof e == "string");
|
|
1335
1330
|
function s(t) {
|
|
1336
1331
|
e && a(t);
|
|
1337
1332
|
}
|
|
@@ -1369,12 +1364,12 @@ function Mn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1369
1364
|
resetColumnsOrder: d
|
|
1370
1365
|
};
|
|
1371
1366
|
}
|
|
1372
|
-
function
|
|
1373
|
-
let i = u(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), a = o(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [s, l] =
|
|
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({
|
|
1374
1369
|
key: e ? `${e}-columns-width` : "",
|
|
1375
1370
|
defaultValue: e ? a() : void 0,
|
|
1376
1371
|
getInitialValueInEffect: n
|
|
1377
|
-
}), p =
|
|
1372
|
+
}), p = Sn(s, [], (e) => typeof e == "object" && !!e), [m, h] = f(() => e && p.length > 0 ? p : a()), [g, _] = f(!1), v = d(!1);
|
|
1378
1373
|
c(() => {
|
|
1379
1374
|
e && (!p || p.length === 0 || h(p));
|
|
1380
1375
|
}, [e, p]), c(() => {
|
|
@@ -1458,17 +1453,17 @@ function Nn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
|
|
|
1458
1453
|
endResize: C
|
|
1459
1454
|
};
|
|
1460
1455
|
}
|
|
1461
|
-
function
|
|
1456
|
+
function Fn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
1462
1457
|
let r = u(() => t?.map((e) => ({
|
|
1463
1458
|
accessor: e.accessor,
|
|
1464
1459
|
defaultToggle: e.defaultToggle || !0,
|
|
1465
1460
|
toggleable: e.toggleable,
|
|
1466
1461
|
toggled: e.defaultToggle === void 0 ? !0 : e.defaultToggle
|
|
1467
|
-
})), [t]), [i, a] =
|
|
1462
|
+
})), [t]), [i, a] = G({
|
|
1468
1463
|
key: e ? `${e}-columns-toggle` : "",
|
|
1469
1464
|
defaultValue: e ? r : void 0,
|
|
1470
1465
|
getInitialValueInEffect: n
|
|
1471
|
-
}), o =
|
|
1466
|
+
}), o = Sn(i, r, Cn);
|
|
1472
1467
|
function s(t) {
|
|
1473
1468
|
e && a(t);
|
|
1474
1469
|
}
|
|
@@ -1511,20 +1506,20 @@ function Pn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
|
|
|
1511
1506
|
resetColumnsToggle: d
|
|
1512
1507
|
};
|
|
1513
1508
|
}
|
|
1514
|
-
var
|
|
1515
|
-
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({
|
|
1516
1511
|
key: e,
|
|
1517
1512
|
columns: t,
|
|
1518
1513
|
getInitialValueInEffect: n
|
|
1519
|
-
}), { columnsToggle: c, setColumnsToggle: l, resetColumnsToggle: d } =
|
|
1514
|
+
}), { columnsToggle: c, setColumnsToggle: l, resetColumnsToggle: d } = Fn({
|
|
1520
1515
|
key: e,
|
|
1521
1516
|
columns: t,
|
|
1522
1517
|
getInitialValueInEffect: n
|
|
1523
|
-
}), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } =
|
|
1518
|
+
}), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = Mn({
|
|
1524
1519
|
key: e,
|
|
1525
1520
|
columns: t,
|
|
1526
1521
|
getInitialValueInEffect: n
|
|
1527
|
-
}), { 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({
|
|
1528
1523
|
key: e,
|
|
1529
1524
|
columns: t,
|
|
1530
1525
|
getInitialValueInEffect: n,
|
|
@@ -1601,13 +1596,13 @@ var Fn = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
|
|
|
1601
1596
|
beginResize: w,
|
|
1602
1597
|
endResize: T
|
|
1603
1598
|
};
|
|
1604
|
-
},
|
|
1605
|
-
function
|
|
1599
|
+
}, Ln = typeof window < "u" ? l : c;
|
|
1600
|
+
function Rn(e) {
|
|
1606
1601
|
let t = d(e);
|
|
1607
1602
|
return t.current = e, t;
|
|
1608
1603
|
}
|
|
1609
|
-
var
|
|
1610
|
-
function
|
|
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";
|
|
1605
|
+
function $(e, t, n) {
|
|
1611
1606
|
e?.style.setProperty(t, n);
|
|
1612
1607
|
}
|
|
1613
1608
|
function Un(e) {
|
|
@@ -1639,16 +1634,16 @@ function Gn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1639
1634
|
header: d(null),
|
|
1640
1635
|
footer: d(null),
|
|
1641
1636
|
selectionColumnHeader: d(null)
|
|
1642
|
-
}, { root: r, table: i, scrollViewport: a, header: s, footer: l, selectionColumnHeader: u } = n, f =
|
|
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) => {
|
|
1643
1638
|
p.current.onScroll?.(e), m.current();
|
|
1644
1639
|
}, []);
|
|
1645
1640
|
return c(() => Wn(s.current, (e) => {
|
|
1646
|
-
|
|
1647
|
-
}, () =>
|
|
1648
|
-
|
|
1649
|
-
}, () =>
|
|
1650
|
-
|
|
1651
|
-
}, () =>
|
|
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(() => {
|
|
1652
1647
|
if (typeof window > "u") return;
|
|
1653
1648
|
let e = {
|
|
1654
1649
|
top: !0,
|
|
@@ -1664,14 +1659,14 @@ function Gn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1664
1659
|
};
|
|
1665
1660
|
function o(t, n) {
|
|
1666
1661
|
let i = e[t];
|
|
1667
|
-
return e[t] = n,
|
|
1662
|
+
return e[t] = n, $(r.current, `--mantine-datatable-${t}-shadow-opacity`, n ? "0" : "1"), i;
|
|
1668
1663
|
}
|
|
1669
1664
|
function s() {
|
|
1670
1665
|
let e = t.height - n.height, i = e < 0;
|
|
1671
|
-
|
|
1666
|
+
$(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), $(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
|
|
1672
1667
|
}
|
|
1673
1668
|
function c() {
|
|
1674
|
-
f.current.withRowBorders && t.height < n.height ?
|
|
1669
|
+
f.current.withRowBorders && t.height < n.height ? $(r.current, Hn, `${fe("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Hn, "unset");
|
|
1675
1670
|
}
|
|
1676
1671
|
h.current = c;
|
|
1677
1672
|
function l() {
|
|
@@ -1700,7 +1695,7 @@ function Gn({ scrollCallbacks: e, withRowBorders: t }) {
|
|
|
1700
1695
|
return u.observe(i.current), u.observe(a.current), () => {
|
|
1701
1696
|
u.disconnect();
|
|
1702
1697
|
};
|
|
1703
|
-
}, []),
|
|
1698
|
+
}, []), Ln(() => {
|
|
1704
1699
|
h.current();
|
|
1705
1700
|
}, [t]), {
|
|
1706
1701
|
refs: n,
|
|
@@ -1789,7 +1784,7 @@ function Kn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
|
|
|
1789
1784
|
t,
|
|
1790
1785
|
n,
|
|
1791
1786
|
d
|
|
1792
|
-
]),
|
|
1787
|
+
]), Ln(d, [d]), {
|
|
1793
1788
|
pinnedMap: l,
|
|
1794
1789
|
hasLeftPinned: [...l.values()].some((e) => e.logicalSide === "left"),
|
|
1795
1790
|
hasRightPinned: [...l.values()].some((e) => e.logicalSide === "right")
|
|
@@ -1832,36 +1827,36 @@ function Xn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0
|
|
|
1832
1827
|
}, [e]), r;
|
|
1833
1828
|
}
|
|
1834
1829
|
function Zn(e) {
|
|
1835
|
-
let t =
|
|
1830
|
+
let t = me();
|
|
1836
1831
|
return Xn(u(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), u(() => e.map(() => !0), [e]));
|
|
1837
1832
|
}
|
|
1838
1833
|
function Qn(e) {
|
|
1839
|
-
let t =
|
|
1840
|
-
return
|
|
1834
|
+
let t = me();
|
|
1835
|
+
return ke((typeof e == "function" ? e(t) : e) || "", !0);
|
|
1841
1836
|
}
|
|
1842
1837
|
function $n({ rowExpansion: e, records: t, idAccessor: n }) {
|
|
1843
1838
|
let r = [];
|
|
1844
1839
|
if (e && t) {
|
|
1845
1840
|
let { trigger: i, allowMultiple: a, initiallyExpanded: o } = e;
|
|
1846
|
-
t && i === "always" ? r = t.map((e) =>
|
|
1841
|
+
t && i === "always" ? r = t.map((e) => Q(e, n)) : o && (r = t.filter((e, t) => o({
|
|
1847
1842
|
record: e,
|
|
1848
1843
|
index: t
|
|
1849
|
-
})).map((e) =>
|
|
1844
|
+
})).map((e) => Q(e, n)), a || (r = [r[0]]));
|
|
1850
1845
|
}
|
|
1851
1846
|
let i, a, o = f(r);
|
|
1852
1847
|
if (e) {
|
|
1853
1848
|
let { expandable: t, trigger: r, allowMultiple: s, collapseProps: c, content: l } = e;
|
|
1854
1849
|
e.expanded ? {recordIds: i, onRecordIdsChange: a} = e.expanded : [i, a] = o;
|
|
1855
|
-
let u = (e) => a?.(i.filter((t) => t !==
|
|
1850
|
+
let u = (e) => a?.(i.filter((t) => t !== Q(e, n)));
|
|
1856
1851
|
return {
|
|
1857
1852
|
expandOnClick: r !== "always" && r !== "never",
|
|
1858
|
-
isRowExpanded: (e) => r === "always" ? !0 : i.includes(
|
|
1853
|
+
isRowExpanded: (e) => r === "always" ? !0 : i.includes(Q(e, n)),
|
|
1859
1854
|
isExpandable: ({ record: e, index: n }) => t ? t({
|
|
1860
1855
|
record: e,
|
|
1861
1856
|
index: n
|
|
1862
1857
|
}) : !0,
|
|
1863
1858
|
expandRow: (e) => {
|
|
1864
|
-
let t =
|
|
1859
|
+
let t = Q(e, n);
|
|
1865
1860
|
a?.(s ? [...i, t] : [t]);
|
|
1866
1861
|
},
|
|
1867
1862
|
collapseRow: u,
|
|
@@ -1875,7 +1870,7 @@ function $n({ rowExpansion: e, records: t, idAccessor: n }) {
|
|
|
1875
1870
|
}
|
|
1876
1871
|
}
|
|
1877
1872
|
function er(e, t) {
|
|
1878
|
-
let [n, r] = f(e), [i, a] = f(e), o =
|
|
1873
|
+
let [n, r] = f(e), [i, a] = f(e), o = je(() => r(!0), 0), s = je(() => a(!1), t || 200);
|
|
1879
1874
|
return c(() => {
|
|
1880
1875
|
e ? (s.clear(), a(!0), o.start()) : (o.clear(), r(!1), s.start());
|
|
1881
1876
|
}, [
|
|
@@ -1889,10 +1884,10 @@ function er(e, t) {
|
|
|
1889
1884
|
}
|
|
1890
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";
|
|
1891
1886
|
function lr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
|
|
1892
|
-
return Qn(r) ? m(
|
|
1887
|
+
return Qn(r) ? m(ae, {
|
|
1893
1888
|
"data-pinned": n?.position,
|
|
1894
1889
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
1895
|
-
className:
|
|
1890
|
+
className: X({
|
|
1896
1891
|
[tr]: a || o,
|
|
1897
1892
|
[nr]: o,
|
|
1898
1893
|
[or]: s === "left",
|
|
@@ -1916,17 +1911,17 @@ function lr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
|
|
|
1916
1911
|
}) : null;
|
|
1917
1912
|
}
|
|
1918
1913
|
function ur({ shadowVisible: e }) {
|
|
1919
|
-
return m(
|
|
1914
|
+
return m(ae, {
|
|
1920
1915
|
className: "mantine-datatable-footer-selector-placeholder-cell",
|
|
1921
1916
|
"data-shadow-visible": e || void 0
|
|
1922
1917
|
});
|
|
1923
1918
|
}
|
|
1924
1919
|
function dr({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
|
|
1925
|
-
return m(
|
|
1920
|
+
return m(ie, {
|
|
1926
1921
|
ref: s,
|
|
1927
|
-
className:
|
|
1922
|
+
className: X("mantine-datatable-footer", e),
|
|
1928
1923
|
style: t,
|
|
1929
|
-
children: h(
|
|
1924
|
+
children: h(U, { children: [a && m(ur, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
|
|
1930
1925
|
if (e) return null;
|
|
1931
1926
|
let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
|
|
1932
1927
|
...r,
|
|
@@ -1947,7 +1942,7 @@ function dr({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedM
|
|
|
1947
1942
|
});
|
|
1948
1943
|
}
|
|
1949
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 }) {
|
|
1950
|
-
let g = u(() => t && t.length > 0 ? t : n && n.length > 0 ?
|
|
1945
|
+
let g = u(() => t && t.length > 0 ? t : n && n.length > 0 ? On([{
|
|
1951
1946
|
id: e,
|
|
1952
1947
|
columns: t,
|
|
1953
1948
|
groups: n
|
|
@@ -1955,7 +1950,7 @@ function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1955
1950
|
t,
|
|
1956
1951
|
n,
|
|
1957
1952
|
e
|
|
1958
|
-
]), _ = Zn(u(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = u(() =>
|
|
1953
|
+
]), _ = Zn(u(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = u(() => kn({
|
|
1959
1954
|
id: e,
|
|
1960
1955
|
columns: t,
|
|
1961
1956
|
groups: n
|
|
@@ -1964,13 +1959,13 @@ function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1964
1959
|
t,
|
|
1965
1960
|
n,
|
|
1966
1961
|
_
|
|
1967
|
-
]), y = u(() => d.reduce((e, t) => e +
|
|
1968
|
-
return v > 0 ? m(
|
|
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, {
|
|
1969
1964
|
colSpan: v,
|
|
1970
1965
|
rowSpan: b > 1 ? b : void 0,
|
|
1971
1966
|
"data-pinned": s?.position,
|
|
1972
1967
|
"data-pinned-shadow": s?.isBoundary ? s.position : void 0,
|
|
1973
|
-
className:
|
|
1968
|
+
className: X("mantine-datatable-column-group-header-cell", {
|
|
1974
1969
|
[or]: i === "left",
|
|
1975
1970
|
[sr]: i === "center",
|
|
1976
1971
|
[cr]: i === "right",
|
|
@@ -1981,7 +1976,7 @@ function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
|
|
|
1981
1976
|
[s.position]: s.offset,
|
|
1982
1977
|
overflow: "visible"
|
|
1983
1978
|
}],
|
|
1984
|
-
children: r ??
|
|
1979
|
+
children: r ?? xn(e)
|
|
1985
1980
|
}) : null;
|
|
1986
1981
|
}
|
|
1987
1982
|
function pr() {
|
|
@@ -2023,8 +2018,8 @@ function mr() {
|
|
|
2023
2018
|
});
|
|
2024
2019
|
}
|
|
2025
2020
|
function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
|
|
2026
|
-
let [i, { close: a, toggle: o }] =
|
|
2027
|
-
return r && (c = void 0), h(
|
|
2021
|
+
let [i, { close: a, toggle: o }] = Oe(!1), s = t ? mr : pr, c = De(a);
|
|
2022
|
+
return r && (c = void 0), h(I, {
|
|
2028
2023
|
withArrow: !0,
|
|
2029
2024
|
shadow: "md",
|
|
2030
2025
|
trapFocus: !0,
|
|
@@ -2032,7 +2027,7 @@ function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
|
|
|
2032
2027
|
opened: i,
|
|
2033
2028
|
onClose: a,
|
|
2034
2029
|
onDismiss: a,
|
|
2035
|
-
children: [m(
|
|
2030
|
+
children: [m(R, { children: m(_, {
|
|
2036
2031
|
className: "mantine-datatable-header-cell-filter-action-icon",
|
|
2037
2032
|
"data-active": t || void 0,
|
|
2038
2033
|
size: "sm",
|
|
@@ -2042,7 +2037,7 @@ function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
|
|
|
2042
2037
|
},
|
|
2043
2038
|
onKeyDown: (e) => e.stopPropagation(),
|
|
2044
2039
|
children: m(s, {})
|
|
2045
|
-
}) }), m(
|
|
2040
|
+
}) }), m(L, {
|
|
2046
2041
|
ref: c,
|
|
2047
2042
|
onClick: (e) => e.stopPropagation(),
|
|
2048
2043
|
onKeyDown: (e) => e.stopPropagation(),
|
|
@@ -2144,19 +2139,19 @@ function br({ currentPinned: e, onPinChange: t }) {
|
|
|
2144
2139
|
s(e === "rtl");
|
|
2145
2140
|
}
|
|
2146
2141
|
}, []);
|
|
2147
|
-
|
|
2142
|
+
Ln(() => {
|
|
2148
2143
|
l();
|
|
2149
2144
|
}, [l]), c(() => {
|
|
2150
2145
|
n && l();
|
|
2151
2146
|
}, [n, l]);
|
|
2152
2147
|
let u = a ? "right" : "left", p = a ? "left" : "right", g = e === u, v = e === p;
|
|
2153
|
-
return h(
|
|
2148
|
+
return h(I, {
|
|
2154
2149
|
opened: n,
|
|
2155
2150
|
onChange: r,
|
|
2156
2151
|
position: "bottom",
|
|
2157
2152
|
withArrow: !0,
|
|
2158
2153
|
shadow: "sm",
|
|
2159
|
-
children: [m(
|
|
2154
|
+
children: [m(I.Target, { children: m(x, {
|
|
2160
2155
|
ref: i,
|
|
2161
2156
|
className: "mantine-datatable-header-cell-pinnable-icon",
|
|
2162
2157
|
role: "button",
|
|
@@ -2169,7 +2164,7 @@ function br({ currentPinned: e, onPinChange: t }) {
|
|
|
2169
2164
|
onClick: (e) => e.stopPropagation(),
|
|
2170
2165
|
children: m(vr, {})
|
|
2171
2166
|
})
|
|
2172
|
-
}) }), m(
|
|
2167
|
+
}) }), m(I.Dropdown, {
|
|
2173
2168
|
onClick: (e) => e.stopPropagation(),
|
|
2174
2169
|
onMouseEnter: () => r(!0),
|
|
2175
2170
|
onMouseLeave: () => r(!1),
|
|
@@ -2208,7 +2203,7 @@ var xr = 50, Sr = (e) => {
|
|
|
2208
2203
|
let { accessor: t, columnRef: n } = e, [r, i] = f(!1), a = d(0), s = d({
|
|
2209
2204
|
current: 0,
|
|
2210
2205
|
next: 0
|
|
2211
|
-
}), { dir: c } =
|
|
2206
|
+
}), { dir: c } = pe(), l = c === "rtl", { setMultipleColumnWidths: u, beginResize: p, endResize: h } = gn(), g = o((e) => {
|
|
2212
2207
|
if (e.preventDefault(), e.stopPropagation(), !n.current) return;
|
|
2213
2208
|
let r = n.current, o = r.nextElementSibling;
|
|
2214
2209
|
for (; o;) {
|
|
@@ -2344,40 +2339,40 @@ function Tr() {
|
|
|
2344
2339
|
});
|
|
2345
2340
|
}
|
|
2346
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 }) {
|
|
2347
|
-
let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning:
|
|
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;
|
|
2348
2343
|
if (!Qn(i)) return null;
|
|
2349
|
-
let
|
|
2344
|
+
let B = a ?? xn(r), te = typeof B == "string" ? B : void 0, ne = o && S ? (e) => {
|
|
2350
2345
|
e?.defaultPrevented || S({
|
|
2351
2346
|
sortKey: k,
|
|
2352
2347
|
columnAccessor: r,
|
|
2353
2348
|
direction: b?.columnAccessor === r ? b.direction === "asc" ? "desc" : "asc" : b?.direction ?? "asc"
|
|
2354
2349
|
});
|
|
2355
|
-
} : void 0,
|
|
2356
|
-
e.stopPropagation(), A(r),
|
|
2357
|
-
},
|
|
2358
|
-
e.preventDefault(), j(r),
|
|
2359
|
-
},
|
|
2360
|
-
j(r),
|
|
2361
|
-
},
|
|
2362
|
-
|
|
2363
|
-
},
|
|
2364
|
-
|
|
2365
|
-
},
|
|
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) => {
|
|
2366
2361
|
e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
|
|
2367
2362
|
...e,
|
|
2368
2363
|
toggled: !1
|
|
2369
2364
|
} : e));
|
|
2370
|
-
},
|
|
2371
|
-
|
|
2365
|
+
}, W = (e) => {
|
|
2366
|
+
I((t) => t.map((t) => t.accessor === r ? {
|
|
2372
2367
|
...t,
|
|
2373
2368
|
pinned: e
|
|
2374
2369
|
} : t));
|
|
2375
2370
|
};
|
|
2376
|
-
return h(
|
|
2371
|
+
return h(ae, {
|
|
2377
2372
|
"data-accessor": r,
|
|
2378
2373
|
"data-pinned": n?.position,
|
|
2379
2374
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
2380
|
-
className:
|
|
2375
|
+
className: X({
|
|
2381
2376
|
"mantine-datatable-header-cell-sortable": o,
|
|
2382
2377
|
"mantine-datatable-header-cell-toggleable": c,
|
|
2383
2378
|
"mantine-datatable-header-cell-pinnable": l,
|
|
@@ -2400,9 +2395,9 @@ function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2400
2395
|
],
|
|
2401
2396
|
role: o ? "button" : void 0,
|
|
2402
2397
|
tabIndex: o ? 0 : void 0,
|
|
2403
|
-
onClick:
|
|
2404
|
-
onKeyDown: (e) => e.key === "Enter" &&
|
|
2405
|
-
ref:
|
|
2398
|
+
onClick: ne,
|
|
2399
|
+
onKeyDown: (e) => e.key === "Enter" && ne?.(),
|
|
2400
|
+
ref: z,
|
|
2406
2401
|
children: [h(E, {
|
|
2407
2402
|
className: "mantine-datatable-header-cell-sortable-group",
|
|
2408
2403
|
justify: "space-between",
|
|
@@ -2411,16 +2406,16 @@ function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2411
2406
|
h(T, {
|
|
2412
2407
|
align: "center",
|
|
2413
2408
|
w: "100%",
|
|
2414
|
-
className:
|
|
2409
|
+
className: X({
|
|
2415
2410
|
"mantine-datatable-header-cell-draggable": s,
|
|
2416
|
-
"mantine-datatable-header-cell-drag-over":
|
|
2411
|
+
"mantine-datatable-header-cell-drag-over": L
|
|
2417
2412
|
}),
|
|
2418
2413
|
draggable: s,
|
|
2419
|
-
onDragStart: s ?
|
|
2420
|
-
onDragEnter: s ?
|
|
2421
|
-
onDragOver: s ?
|
|
2422
|
-
onDrop: s ?
|
|
2423
|
-
onDragLeave: 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,
|
|
2424
2419
|
children: [s ? m(x, {
|
|
2425
2420
|
role: "img",
|
|
2426
2421
|
"aria-label": "Drag column",
|
|
@@ -2434,18 +2429,18 @@ function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2434
2429
|
children: m(Tr, {})
|
|
2435
2430
|
})
|
|
2436
2431
|
}) : null, m(y, {
|
|
2437
|
-
className:
|
|
2432
|
+
className: X("mantine-datatable-header-cell-sortable-text", {
|
|
2438
2433
|
[or]: g === "left",
|
|
2439
2434
|
[sr]: g === "center",
|
|
2440
2435
|
[cr]: g === "right"
|
|
2441
2436
|
}, tr, nr),
|
|
2442
|
-
title:
|
|
2443
|
-
children:
|
|
2437
|
+
title: te,
|
|
2438
|
+
children: B
|
|
2444
2439
|
})]
|
|
2445
2440
|
}),
|
|
2446
2441
|
l ? m(br, {
|
|
2447
|
-
currentPinned:
|
|
2448
|
-
onPinChange:
|
|
2442
|
+
currentPinned: ee,
|
|
2443
|
+
onPinChange: W
|
|
2449
2444
|
}) : null,
|
|
2450
2445
|
c ? m(x, {
|
|
2451
2446
|
className: "mantine-datatable-header-cell-toggleable-icon",
|
|
@@ -2454,12 +2449,12 @@ function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2454
2449
|
children: m(_, {
|
|
2455
2450
|
size: "xs",
|
|
2456
2451
|
variant: "light",
|
|
2457
|
-
onClick:
|
|
2452
|
+
onClick: oe,
|
|
2458
2453
|
children: m(yr, {})
|
|
2459
2454
|
})
|
|
2460
2455
|
}) : null,
|
|
2461
2456
|
o || b?.columnAccessor === r ? b?.columnAccessor === r ? m(x, {
|
|
2462
|
-
className:
|
|
2457
|
+
className: X("mantine-datatable-header-cell-sortable-icon", { "mantine-datatable-header-cell-sortable-icon-reversed": b.direction === "desc" }),
|
|
2463
2458
|
role: "img",
|
|
2464
2459
|
"aria-label": `Sorted ${b.direction === "desc" ? "descending" : "ascending"}`,
|
|
2465
2460
|
children: p?.sorted || m(wr, {})
|
|
@@ -2478,15 +2473,15 @@ function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
|
|
|
2478
2473
|
]
|
|
2479
2474
|
}), u && r !== "__selection__" ? m(Sr, {
|
|
2480
2475
|
accessor: r,
|
|
2481
|
-
columnRef:
|
|
2476
|
+
columnRef: z
|
|
2482
2477
|
}) : null]
|
|
2483
2478
|
});
|
|
2484
2479
|
}
|
|
2485
2480
|
function Dr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
|
|
2486
2481
|
let u = !o.disabled;
|
|
2487
|
-
return m(
|
|
2482
|
+
return m(ae, {
|
|
2488
2483
|
ref: l,
|
|
2489
|
-
className:
|
|
2484
|
+
className: X("mantine-datatable-header-selector-cell", { [rr]: n === "cell" && u }, e),
|
|
2490
2485
|
style: t,
|
|
2491
2486
|
rowSpan: c,
|
|
2492
2487
|
"data-shadow-visible": r || void 0,
|
|
@@ -2516,7 +2511,7 @@ function Or(e, t) {
|
|
|
2516
2511
|
};
|
|
2517
2512
|
}
|
|
2518
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 }) {
|
|
2519
|
-
let T = c ?
|
|
2514
|
+
let T = c ? Dn(c) : 0, D = T > 0 ? T + 1 : 1, O = d ? m(Dr, {
|
|
2520
2515
|
ref: e,
|
|
2521
2516
|
className: b,
|
|
2522
2517
|
style: x,
|
|
@@ -2527,16 +2522,16 @@ function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2527
2522
|
checkboxProps: v,
|
|
2528
2523
|
onChange: _,
|
|
2529
2524
|
rowSpan: c ? D : void 0
|
|
2530
|
-
}) : null, { columnsToggle: k, setColumnsToggle: A } =
|
|
2531
|
-
className:
|
|
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, {
|
|
2526
|
+
className: X("mantine-datatable-header", t),
|
|
2532
2527
|
style: n,
|
|
2533
2528
|
ref: w,
|
|
2534
2529
|
onContextMenu: N ? (e) => {
|
|
2535
2530
|
e.preventDefault(), M((e) => !e);
|
|
2536
2531
|
} : void 0,
|
|
2537
2532
|
children: [c && Array.from({ length: T }, (e, t) => {
|
|
2538
|
-
let n =
|
|
2539
|
-
return h(
|
|
2533
|
+
let n = An(c, t);
|
|
2534
|
+
return h(U, { children: [t === 0 && O, n.map((e, r) => m(fr, {
|
|
2540
2535
|
group: e,
|
|
2541
2536
|
pinnedInfo: Or(e, l),
|
|
2542
2537
|
maxDepth: T,
|
|
@@ -2546,7 +2541,7 @@ function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2546
2541
|
withColumnBorders: C,
|
|
2547
2542
|
totalTableColumns: o.length
|
|
2548
2543
|
}, e.id))] }, `group-depth-${t}`);
|
|
2549
|
-
}), h(
|
|
2544
|
+
}), h(U, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
|
|
2550
2545
|
if (e) return null;
|
|
2551
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 } = {
|
|
2552
2547
|
...s,
|
|
@@ -2577,13 +2572,13 @@ function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2577
2572
|
}, c);
|
|
2578
2573
|
})] })]
|
|
2579
2574
|
});
|
|
2580
|
-
return N ? h(
|
|
2575
|
+
return N ? h(I, {
|
|
2581
2576
|
position: "bottom",
|
|
2582
2577
|
withArrow: !0,
|
|
2583
2578
|
shadow: "md",
|
|
2584
2579
|
opened: j,
|
|
2585
2580
|
onChange: M,
|
|
2586
|
-
children: [m(
|
|
2581
|
+
children: [m(R, { children: F }), m(L, { children: m(te, { children: k.filter((e) => e.toggleable).map((e) => m(E, { children: m(S, {
|
|
2587
2582
|
classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
|
|
2588
2583
|
size: "xs",
|
|
2589
2584
|
label: P[e.accessor],
|
|
@@ -2595,11 +2590,11 @@ function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
|
|
|
2595
2590
|
} : n));
|
|
2596
2591
|
}
|
|
2597
2592
|
}) }, e.accessor)) }) })]
|
|
2598
|
-
}) :
|
|
2593
|
+
}) : F;
|
|
2599
2594
|
}
|
|
2600
2595
|
function Ar({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
|
|
2601
2596
|
return m(x, {
|
|
2602
|
-
className:
|
|
2597
|
+
className: X("mantine-datatable-loader", { "mantine-datatable-loader-fetching": e }),
|
|
2603
2598
|
style: [{ backdropFilter: n ? `blur(${n}px)` : void 0 }],
|
|
2604
2599
|
children: e && (t || m(O, {
|
|
2605
2600
|
size: r,
|
|
@@ -2630,16 +2625,16 @@ function jr() {
|
|
|
2630
2625
|
});
|
|
2631
2626
|
}
|
|
2632
2627
|
var Mr = {
|
|
2633
|
-
xs:
|
|
2634
|
-
sm:
|
|
2635
|
-
md:
|
|
2636
|
-
lg:
|
|
2637
|
-
xl:
|
|
2628
|
+
xs: fe(22),
|
|
2629
|
+
sm: fe(26),
|
|
2630
|
+
md: fe(32),
|
|
2631
|
+
lg: fe(38),
|
|
2632
|
+
xl: fe(44)
|
|
2638
2633
|
};
|
|
2639
2634
|
function Nr({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
|
|
2640
2635
|
return h(E, {
|
|
2641
2636
|
gap: "xs",
|
|
2642
|
-
children: [m(
|
|
2637
|
+
children: [m(W, {
|
|
2643
2638
|
component: "div",
|
|
2644
2639
|
size: e,
|
|
2645
2640
|
children: t
|
|
@@ -2662,15 +2657,15 @@ function Nr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
|
|
|
2662
2657
|
}) }), m(A, { children: n.map((t) => {
|
|
2663
2658
|
let n = t === r;
|
|
2664
2659
|
return m(j, {
|
|
2665
|
-
className:
|
|
2666
|
-
style: [{ height: Mr[e] }, n && (i || a) ? (e) =>
|
|
2660
|
+
className: X({ "mantine-datatable-page-size-selector-active": n }),
|
|
2661
|
+
style: [{ height: Mr[e] }, n && (i || a) ? (e) => pn({
|
|
2667
2662
|
theme: e,
|
|
2668
2663
|
paginationActiveTextColor: i,
|
|
2669
2664
|
paginationActiveBackgroundColor: a
|
|
2670
2665
|
}) : void 0],
|
|
2671
2666
|
disabled: n,
|
|
2672
2667
|
onClick: () => o(t),
|
|
2673
|
-
children: m(
|
|
2668
|
+
children: m(W, {
|
|
2674
2669
|
component: "div",
|
|
2675
2670
|
size: e,
|
|
2676
2671
|
children: t
|
|
@@ -2690,8 +2685,8 @@ function Pr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2690
2685
|
totalRecords: g
|
|
2691
2686
|
});
|
|
2692
2687
|
} else O = n ? u : d;
|
|
2693
|
-
let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !Qn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${
|
|
2694
|
-
Text: (e) => m(
|
|
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, {
|
|
2695
2690
|
component: "div",
|
|
2696
2691
|
className: "mantine-datatable-pagination-text",
|
|
2697
2692
|
size: l,
|
|
@@ -2708,12 +2703,12 @@ function Pr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2708
2703
|
onChange: v,
|
|
2709
2704
|
...e
|
|
2710
2705
|
}) : null,
|
|
2711
|
-
Pagination: (e) => m(
|
|
2706
|
+
Pagination: (e) => m(F, {
|
|
2712
2707
|
classNames: {
|
|
2713
|
-
root:
|
|
2708
|
+
root: X("mantine-datatable-pagination-pages", { "mantine-datatable-pagination-pages-fetching": n || !S }),
|
|
2714
2709
|
control: "mantine-datatable-pagination-pages-control"
|
|
2715
2710
|
},
|
|
2716
|
-
style: s || c ? (e) =>
|
|
2711
|
+
style: s || c ? (e) => pn({
|
|
2717
2712
|
theme: e,
|
|
2718
2713
|
paginationActiveTextColor: s,
|
|
2719
2714
|
paginationActiveBackgroundColor: c
|
|
@@ -2750,7 +2745,7 @@ function Pr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2750
2745
|
return m(y, {
|
|
2751
2746
|
px: C ?? "xs",
|
|
2752
2747
|
py: "xs",
|
|
2753
|
-
className:
|
|
2748
|
+
className: X("mantine-datatable-pagination", e),
|
|
2754
2749
|
style: [{ flexDirection: M ? "column" : "row" }, t],
|
|
2755
2750
|
children: typeof D == "function" ? D(P) : h(p, { children: [
|
|
2756
2751
|
m(N.Text, {}),
|
|
@@ -2760,10 +2755,10 @@ function Pr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
|
|
|
2760
2755
|
});
|
|
2761
2756
|
}
|
|
2762
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: _ }) {
|
|
2763
|
-
return Qn(r) ? m(
|
|
2758
|
+
return Qn(r) ? m(re, {
|
|
2764
2759
|
"data-pinned": n?.position,
|
|
2765
2760
|
"data-pinned-shadow": n?.isBoundary ? n.position : void 0,
|
|
2766
|
-
className:
|
|
2761
|
+
className: X({
|
|
2767
2762
|
[tr]: l || u,
|
|
2768
2763
|
[nr]: u,
|
|
2769
2764
|
[rr]: o || s,
|
|
@@ -2789,12 +2784,12 @@ function Fr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
|
|
|
2789
2784
|
onDoubleClick: s,
|
|
2790
2785
|
onContextMenu: c,
|
|
2791
2786
|
..._?.(i, a),
|
|
2792
|
-
children: h ? h(i, a) : g ? g(i, a, p) :
|
|
2787
|
+
children: h ? h(i, a) : g ? g(i, a, p) : En(i, p)
|
|
2793
2788
|
}) : null;
|
|
2794
2789
|
}
|
|
2795
2790
|
function Ir({ open: e, colSpan: t, content: n, collapseProps: r }) {
|
|
2796
2791
|
let { expanded: i, visible: a } = er(e, r?.transitionDuration);
|
|
2797
|
-
return a ? h(p, { children: [m(
|
|
2792
|
+
return a ? h(p, { children: [m(U, {}), m(U, { children: m(re, {
|
|
2798
2793
|
className: "mantine-datatable-row-expansion-cell",
|
|
2799
2794
|
colSpan: t,
|
|
2800
2795
|
children: m(C, {
|
|
@@ -2814,8 +2809,8 @@ function Lr({ className: e, style: t, record: n, index: r, trigger: i, onChange:
|
|
|
2814
2809
|
}, d = !l.disabled && !u.disabled, f = (e) => {
|
|
2815
2810
|
e.stopPropagation(), i === "cell" && d && a?.(e);
|
|
2816
2811
|
};
|
|
2817
|
-
return m(
|
|
2818
|
-
className:
|
|
2812
|
+
return m(re, {
|
|
2813
|
+
className: X("mantine-datatable-row-selector-cell", { [rr]: i === "cell" && d }, e),
|
|
2819
2814
|
style: t,
|
|
2820
2815
|
"data-shadow-visible": o || void 0,
|
|
2821
2816
|
onClick: f,
|
|
@@ -2911,14 +2906,14 @@ function Rr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
|
|
|
2911
2906
|
rowProps: P,
|
|
2912
2907
|
children: M,
|
|
2913
2908
|
expandedElement: N
|
|
2914
|
-
}) : h(p, { children: [m(
|
|
2909
|
+
}) : h(p, { children: [m(U, {
|
|
2915
2910
|
...P,
|
|
2916
2911
|
children: M
|
|
2917
2912
|
}), N] });
|
|
2918
2913
|
}
|
|
2919
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 }) {
|
|
2920
2915
|
return {
|
|
2921
|
-
className:
|
|
2916
|
+
className: X("mantine-datatable-row", { [rr]: r || i || o?.isExpandable({
|
|
2922
2917
|
record: e,
|
|
2923
2918
|
index: t
|
|
2924
2919
|
}) && o?.expandOnClick }, { [ir]: a }, typeof u == "function" ? u(e, t) : u),
|
|
@@ -2949,7 +2944,7 @@ function zr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
|
|
|
2949
2944
|
}) : void 0,
|
|
2950
2945
|
style: [c || l ? (n) => {
|
|
2951
2946
|
let r = c?.(e, t), i = l?.(e, t);
|
|
2952
|
-
return
|
|
2947
|
+
return mn({
|
|
2953
2948
|
theme: n,
|
|
2954
2949
|
color: r,
|
|
2955
2950
|
backgroundColor: i
|
|
@@ -2959,7 +2954,7 @@ function zr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
|
|
|
2959
2954
|
};
|
|
2960
2955
|
}
|
|
2961
2956
|
function Br({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
|
|
2962
|
-
return h(
|
|
2957
|
+
return h(z, {
|
|
2963
2958
|
...a,
|
|
2964
2959
|
viewportRef: i,
|
|
2965
2960
|
classNames: {
|
|
@@ -2971,98 +2966,98 @@ function Br({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
|
|
|
2971
2966
|
onScrollPositionChange: n,
|
|
2972
2967
|
children: [
|
|
2973
2968
|
r,
|
|
2974
|
-
m(y, { className:
|
|
2975
|
-
m("div", { className:
|
|
2976
|
-
m("div", { className:
|
|
2977
|
-
m(y, { className:
|
|
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") })
|
|
2978
2973
|
]
|
|
2979
2974
|
});
|
|
2980
2975
|
}
|
|
2981
|
-
function Vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: a, shadow: s, verticalAlign: f = "center", fetching: p, columns: g, storeColumnsKey: _, groups: v, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus:
|
|
2982
|
-
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({
|
|
2983
2978
|
scrollCallbacks: {
|
|
2984
|
-
onScroll:
|
|
2985
|
-
onScrollToTop:
|
|
2986
|
-
onScrollToBottom:
|
|
2987
|
-
onScrollToLeft:
|
|
2988
|
-
onScrollToRight:
|
|
2979
|
+
onScroll: ke,
|
|
2980
|
+
onScrollToTop: je,
|
|
2981
|
+
onScrollToBottom: Me,
|
|
2982
|
+
onScrollToLeft: Ne,
|
|
2983
|
+
onScrollToRight: Pe
|
|
2989
2984
|
},
|
|
2990
|
-
withRowBorders:
|
|
2991
|
-
}),
|
|
2985
|
+
withRowBorders: ct.withRowBorders
|
|
2986
|
+
}), Y = In({
|
|
2992
2987
|
key: _,
|
|
2993
|
-
columns:
|
|
2994
|
-
headerRef:
|
|
2995
|
-
scrollViewportRef:
|
|
2996
|
-
}), dt =
|
|
2997
|
-
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,
|
|
2998
2993
|
records: T,
|
|
2999
2994
|
idAccessor: w
|
|
3000
|
-
}), { pinnedMap:
|
|
2995
|
+
}), { pinnedMap: _t, hasLeftPinned: vt, hasRightPinned: yt } = Kn({
|
|
3001
2996
|
columns: dt,
|
|
3002
|
-
theadRef:
|
|
2997
|
+
theadRef: J.header,
|
|
3003
2998
|
tbodyRef: mt,
|
|
3004
|
-
selectionColumnHeaderRef:
|
|
2999
|
+
selectionColumnHeaderRef: J.selectionColumnHeader,
|
|
3005
3000
|
selectionVisible: !!D,
|
|
3006
3001
|
pinFirstColumn: b,
|
|
3007
3002
|
pinLastColumn: x
|
|
3008
|
-
}),
|
|
3009
|
-
|
|
3010
|
-
}, [
|
|
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]);
|
|
3011
3006
|
c(() => {
|
|
3012
|
-
|
|
3013
|
-
}, [
|
|
3014
|
-
let
|
|
3007
|
+
xt.current !== z && (bt.current = !0, St.current = T, xt.current = z);
|
|
3008
|
+
}, [z, T]);
|
|
3009
|
+
let wt = T?.length;
|
|
3015
3010
|
l(() => {
|
|
3016
|
-
if (!
|
|
3017
|
-
let e =
|
|
3011
|
+
if (!bt.current || p || T === St.current) return;
|
|
3012
|
+
let e = J.scrollViewport.current;
|
|
3018
3013
|
if (!e) return;
|
|
3019
3014
|
let t = requestAnimationFrame(() => {
|
|
3020
3015
|
e.scrollTo({
|
|
3021
3016
|
top: 0,
|
|
3022
3017
|
left: 0
|
|
3023
|
-
}),
|
|
3018
|
+
}), bt.current = !1;
|
|
3024
3019
|
});
|
|
3025
3020
|
return () => cancelAnimationFrame(t);
|
|
3026
3021
|
}, [
|
|
3027
3022
|
p,
|
|
3028
3023
|
T,
|
|
3029
|
-
|
|
3024
|
+
J.scrollViewport
|
|
3030
3025
|
]);
|
|
3031
|
-
let
|
|
3032
|
-
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)));
|
|
3033
3028
|
}, [
|
|
3034
|
-
|
|
3029
|
+
jt,
|
|
3035
3030
|
w,
|
|
3036
3031
|
O,
|
|
3032
|
+
At,
|
|
3037
3033
|
kt,
|
|
3038
|
-
Ot,
|
|
3039
3034
|
D
|
|
3040
|
-
]), { lastSelectionChangeIndex:
|
|
3041
|
-
m:
|
|
3042
|
-
my:
|
|
3043
|
-
mx:
|
|
3044
|
-
mt:
|
|
3045
|
-
mb:
|
|
3046
|
-
ml:
|
|
3047
|
-
mr:
|
|
3048
|
-
},
|
|
3049
|
-
return m(
|
|
3050
|
-
...
|
|
3051
|
-
pinnedMap:
|
|
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,
|
|
3052
3047
|
children: h(y, {
|
|
3053
|
-
ref:
|
|
3054
|
-
...
|
|
3055
|
-
className:
|
|
3048
|
+
ref: J.root,
|
|
3049
|
+
...Lt,
|
|
3050
|
+
className: X("mantine-datatable", { "mantine-datatable-with-border": e }, nt, rt?.root),
|
|
3056
3051
|
style: [
|
|
3057
3052
|
(e) => ({
|
|
3058
|
-
...
|
|
3053
|
+
...fn({
|
|
3059
3054
|
theme: e,
|
|
3060
|
-
c:
|
|
3061
|
-
backgroundColor:
|
|
3062
|
-
borderColor:
|
|
3063
|
-
rowBorderColor:
|
|
3064
|
-
stripedColor:
|
|
3065
|
-
highlightOnHoverColor:
|
|
3055
|
+
c: Fe,
|
|
3056
|
+
backgroundColor: Ie,
|
|
3057
|
+
borderColor: Le,
|
|
3058
|
+
rowBorderColor: Re,
|
|
3059
|
+
stripedColor: ze,
|
|
3060
|
+
highlightOnHoverColor: Be
|
|
3066
3061
|
}),
|
|
3067
3062
|
borderRadius: e.radius[t] || t,
|
|
3068
3063
|
boxShadow: e.shadows[s] || s,
|
|
@@ -3070,164 +3065,164 @@ function Vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
3070
3065
|
minHeight: i,
|
|
3071
3066
|
maxHeight: a
|
|
3072
3067
|
}),
|
|
3073
|
-
|
|
3074
|
-
|
|
3068
|
+
it,
|
|
3069
|
+
at?.root,
|
|
3075
3070
|
{ position: "relative" }
|
|
3076
3071
|
],
|
|
3077
3072
|
children: [
|
|
3078
3073
|
m(Br, {
|
|
3079
3074
|
viewportRef: pt,
|
|
3080
|
-
leftShadowBehind:
|
|
3081
|
-
rightShadowBehind:
|
|
3082
|
-
onScrollPositionChange:
|
|
3083
|
-
scrollAreaProps:
|
|
3084
|
-
children: m(
|
|
3075
|
+
leftShadowBehind: Et || vt,
|
|
3076
|
+
rightShadowBehind: yt,
|
|
3077
|
+
onScrollPositionChange: ut,
|
|
3078
|
+
scrollAreaProps: Ke,
|
|
3079
|
+
children: m(Rt, { children: h(V, {
|
|
3085
3080
|
ref: ft,
|
|
3086
|
-
horizontalSpacing:
|
|
3087
|
-
className:
|
|
3081
|
+
horizontalSpacing: R,
|
|
3082
|
+
className: X("mantine-datatable-table", {
|
|
3088
3083
|
[ar]: n,
|
|
3089
3084
|
"mantine-datatable-vertical-align-top": f === "top",
|
|
3090
3085
|
"mantine-datatable-vertical-align-bottom": f === "bottom",
|
|
3091
|
-
"mantine-datatable-selection-column-visible":
|
|
3092
|
-
"mantine-datatable-resizable-columns":
|
|
3093
|
-
"mantine-datatable-resize-locked":
|
|
3094
|
-
"mantine-datatable-resizing":
|
|
3095
|
-
},
|
|
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),
|
|
3096
3091
|
style: {
|
|
3097
|
-
...
|
|
3098
|
-
...
|
|
3099
|
-
...
|
|
3092
|
+
...at?.table,
|
|
3093
|
+
...Y.isLocked ? { tableLayout: "fixed" } : null,
|
|
3094
|
+
...Y.tableWidth == null ? null : { width: `${Y.tableWidth}px` }
|
|
3100
3095
|
},
|
|
3101
|
-
"data-striped":
|
|
3102
|
-
"data-highlight-on-hover":
|
|
3103
|
-
...
|
|
3096
|
+
"data-striped": wt && Se || void 0,
|
|
3097
|
+
"data-highlight-on-hover": xe || void 0,
|
|
3098
|
+
...ct,
|
|
3104
3099
|
children: [
|
|
3105
|
-
|
|
3106
|
-
...
|
|
3107
|
-
pinnedMap:
|
|
3100
|
+
Ce ? null : m(_n, {
|
|
3101
|
+
...Y,
|
|
3102
|
+
pinnedMap: _t,
|
|
3108
3103
|
children: m(kr, {
|
|
3109
|
-
ref:
|
|
3110
|
-
selectionColumnHeaderRef:
|
|
3111
|
-
className:
|
|
3112
|
-
style:
|
|
3104
|
+
ref: J.header,
|
|
3105
|
+
selectionColumnHeaderRef: J.selectionColumnHeader,
|
|
3106
|
+
className: rt?.header,
|
|
3107
|
+
style: at?.header,
|
|
3113
3108
|
columns: dt,
|
|
3114
3109
|
defaultColumnProps: S,
|
|
3115
3110
|
groups: v,
|
|
3116
|
-
pinnedMap:
|
|
3117
|
-
sortStatus:
|
|
3118
|
-
sortIcons:
|
|
3119
|
-
onSortStatusChange:
|
|
3111
|
+
pinnedMap: _t,
|
|
3112
|
+
sortStatus: F,
|
|
3113
|
+
sortIcons: I,
|
|
3114
|
+
onSortStatusChange: L,
|
|
3120
3115
|
selectionTrigger: E,
|
|
3121
|
-
selectionVisible:
|
|
3122
|
-
selectionChecked:
|
|
3123
|
-
selectionIndeterminate:
|
|
3124
|
-
onSelectionChange:
|
|
3116
|
+
selectionVisible: Et,
|
|
3117
|
+
selectionChecked: jt,
|
|
3118
|
+
selectionIndeterminate: Mt && !jt,
|
|
3119
|
+
onSelectionChange: Nt,
|
|
3125
3120
|
selectionCheckboxProps: {
|
|
3126
3121
|
...M,
|
|
3127
3122
|
...N
|
|
3128
3123
|
},
|
|
3129
|
-
selectorCellShadowVisible:
|
|
3124
|
+
selectorCellShadowVisible: It,
|
|
3130
3125
|
selectionColumnClassName: k,
|
|
3131
3126
|
selectionColumnStyle: A,
|
|
3132
|
-
withColumnBorders:
|
|
3127
|
+
withColumnBorders: ct.withColumnBorders
|
|
3133
3128
|
})
|
|
3134
3129
|
}),
|
|
3135
3130
|
m("tbody", {
|
|
3136
3131
|
ref: ht,
|
|
3137
|
-
children:
|
|
3138
|
-
let n =
|
|
3132
|
+
children: wt ? T.map((e, t) => {
|
|
3133
|
+
let n = Q(e, w), r = Dt?.includes(n) || !1, i;
|
|
3139
3134
|
return O && D && (i = (i) => {
|
|
3140
|
-
if (i.nativeEvent.shiftKey &&
|
|
3141
|
-
let e = T.filter(t >
|
|
3142
|
-
O(r ?
|
|
3143
|
-
} else O(r ? D.filter((e) =>
|
|
3144
|
-
|
|
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)));
|
|
3139
|
+
Ft(t);
|
|
3145
3140
|
}), m(Rr, {
|
|
3146
3141
|
record: e,
|
|
3147
3142
|
index: t,
|
|
3148
3143
|
columns: dt,
|
|
3149
3144
|
defaultColumnProps: S,
|
|
3150
|
-
pinnedMap:
|
|
3145
|
+
pinnedMap: _t,
|
|
3151
3146
|
defaultColumnRender: C,
|
|
3152
3147
|
selectionTrigger: E,
|
|
3153
|
-
selectionVisible:
|
|
3148
|
+
selectionVisible: Et,
|
|
3154
3149
|
selectionChecked: r,
|
|
3155
3150
|
onSelectionChange: i,
|
|
3156
3151
|
isRecordSelectable: j,
|
|
3157
3152
|
selectionCheckboxProps: M,
|
|
3158
3153
|
getSelectionCheckboxProps: P,
|
|
3159
|
-
onClick:
|
|
3160
|
-
onDoubleClick:
|
|
3161
|
-
onCellClick:
|
|
3162
|
-
onCellDoubleClick:
|
|
3163
|
-
onContextMenu:
|
|
3164
|
-
onCellContextMenu:
|
|
3154
|
+
onClick: we,
|
|
3155
|
+
onDoubleClick: Te,
|
|
3156
|
+
onCellClick: De,
|
|
3157
|
+
onCellDoubleClick: Oe,
|
|
3158
|
+
onContextMenu: Ee,
|
|
3159
|
+
onCellContextMenu: G,
|
|
3165
3160
|
expansion: gt,
|
|
3166
|
-
color:
|
|
3167
|
-
backgroundColor:
|
|
3168
|
-
className:
|
|
3169
|
-
style:
|
|
3170
|
-
customAttributes:
|
|
3171
|
-
selectorCellShadowVisible:
|
|
3161
|
+
color: K,
|
|
3162
|
+
backgroundColor: q,
|
|
3163
|
+
className: He,
|
|
3164
|
+
style: Ue,
|
|
3165
|
+
customAttributes: We,
|
|
3166
|
+
selectorCellShadowVisible: It,
|
|
3172
3167
|
selectionColumnClassName: k,
|
|
3173
3168
|
selectionColumnStyle: A,
|
|
3174
3169
|
idAccessor: w,
|
|
3175
|
-
rowFactory:
|
|
3170
|
+
rowFactory: ot
|
|
3176
3171
|
}, n);
|
|
3177
|
-
}) : m(
|
|
3172
|
+
}) : m(vn, {})
|
|
3178
3173
|
}),
|
|
3179
3174
|
dt.some(({ footer: e }) => e) && m(dr, {
|
|
3180
|
-
ref:
|
|
3181
|
-
className:
|
|
3182
|
-
style:
|
|
3175
|
+
ref: J.footer,
|
|
3176
|
+
className: rt?.footer,
|
|
3177
|
+
style: at?.footer,
|
|
3183
3178
|
columns: dt,
|
|
3184
3179
|
defaultColumnProps: S,
|
|
3185
|
-
pinnedMap:
|
|
3186
|
-
selectionVisible:
|
|
3187
|
-
selectorCellShadowVisible:
|
|
3180
|
+
pinnedMap: _t,
|
|
3181
|
+
selectionVisible: Et,
|
|
3182
|
+
selectorCellShadowVisible: It
|
|
3188
3183
|
})
|
|
3189
3184
|
]
|
|
3190
3185
|
}) })
|
|
3191
3186
|
}),
|
|
3192
|
-
!!(
|
|
3193
|
-
className:
|
|
3194
|
-
style:
|
|
3195
|
-
horizontalSpacing:
|
|
3187
|
+
!!(z && wt) && m(Pr, {
|
|
3188
|
+
className: rt?.pagination,
|
|
3189
|
+
style: at?.pagination,
|
|
3190
|
+
horizontalSpacing: R,
|
|
3196
3191
|
fetching: p,
|
|
3197
|
-
page:
|
|
3198
|
-
onPageChange:
|
|
3199
|
-
totalRecords:
|
|
3200
|
-
recordsPerPage:
|
|
3201
|
-
onRecordsPerPageChange:
|
|
3202
|
-
recordsPerPageOptions:
|
|
3203
|
-
recordsPerPageLabel:
|
|
3204
|
-
paginationWithEdges:
|
|
3205
|
-
paginationWithControls:
|
|
3206
|
-
paginationActiveTextColor:
|
|
3207
|
-
paginationActiveBackgroundColor:
|
|
3208
|
-
paginationSize:
|
|
3209
|
-
paginationText:
|
|
3210
|
-
paginationWrapBreakpoint:
|
|
3211
|
-
getPaginationControlProps:
|
|
3212
|
-
getPaginationItemProps:
|
|
3213
|
-
noRecordsText:
|
|
3214
|
-
loadingText:
|
|
3215
|
-
recordsLength:
|
|
3216
|
-
renderPagination:
|
|
3192
|
+
page: z,
|
|
3193
|
+
onPageChange: Ct,
|
|
3194
|
+
totalRecords: B,
|
|
3195
|
+
recordsPerPage: te,
|
|
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
|
|
3217
3212
|
}),
|
|
3218
3213
|
m(Ar, {
|
|
3219
3214
|
fetching: p,
|
|
3220
|
-
backgroundBlur:
|
|
3221
|
-
customContent:
|
|
3222
|
-
size:
|
|
3223
|
-
type:
|
|
3224
|
-
color:
|
|
3215
|
+
backgroundBlur: fe,
|
|
3216
|
+
customContent: pe,
|
|
3217
|
+
size: me,
|
|
3218
|
+
type: he,
|
|
3219
|
+
color: ge
|
|
3225
3220
|
}),
|
|
3226
|
-
m(
|
|
3227
|
-
icon:
|
|
3228
|
-
text:
|
|
3229
|
-
active: !p && !
|
|
3230
|
-
children:
|
|
3221
|
+
m(bn, {
|
|
3222
|
+
icon: be,
|
|
3223
|
+
text: ye,
|
|
3224
|
+
active: !p && !wt,
|
|
3225
|
+
children: ve
|
|
3231
3226
|
})
|
|
3232
3227
|
]
|
|
3233
3228
|
})
|
|
@@ -3236,26 +3231,26 @@ function Vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
|
|
|
3236
3231
|
//#endregion
|
|
3237
3232
|
//#region src/DataTable/UpdateModal.tsx
|
|
3238
3233
|
function Hr(t) {
|
|
3239
|
-
let n = e(18), { fields: r, onClose: i, queryKey: a, connectedQueryKeys: o, apiPath: s, id: c, steps: l } = t, { data: u, isLoading: d } =
|
|
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);
|
|
3240
3235
|
if (d || !u) {
|
|
3241
3236
|
let e;
|
|
3242
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(
|
|
3237
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(B, { height: 40 }), n[0] = e) : e = n[0];
|
|
3243
3238
|
let t;
|
|
3244
3239
|
n[1] === r.length ? t = n[2] : (t = Array.from({ length: r.length }).map(Ur), n[1] = r.length, n[2] = t);
|
|
3245
3240
|
let i;
|
|
3246
3241
|
n[3] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ h(E, {
|
|
3247
3242
|
mt: "md",
|
|
3248
3243
|
justify: "end",
|
|
3249
|
-
children: [/* @__PURE__ */ m(
|
|
3244
|
+
children: [/* @__PURE__ */ m(B, {
|
|
3250
3245
|
width: 100,
|
|
3251
3246
|
height: 36
|
|
3252
|
-
}), /* @__PURE__ */ m(
|
|
3247
|
+
}), /* @__PURE__ */ m(B, {
|
|
3253
3248
|
width: 100,
|
|
3254
3249
|
height: 36
|
|
3255
3250
|
})]
|
|
3256
3251
|
}), n[3] = i) : i = n[3];
|
|
3257
3252
|
let a;
|
|
3258
|
-
return n[4] === t ? a = n[5] : (a = /* @__PURE__ */ h(
|
|
3253
|
+
return n[4] === t ? a = n[5] : (a = /* @__PURE__ */ h(te, {
|
|
3259
3254
|
gap: "md",
|
|
3260
3255
|
children: [
|
|
3261
3256
|
e,
|
|
@@ -3272,7 +3267,7 @@ function Hr(t) {
|
|
|
3272
3267
|
});
|
|
3273
3268
|
}, n[6] = c, n[7] = f, n[8] = _) : _ = n[8];
|
|
3274
3269
|
let v = _, y;
|
|
3275
|
-
return n[9] !== u || n[10] !== g || n[11] !== r || n[12] !== c || n[13] !== p || n[14] !== i || n[15] !== v || n[16] !== l ? (y = /* @__PURE__ */ m(
|
|
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, {
|
|
3276
3271
|
fields: r,
|
|
3277
3272
|
steps: l,
|
|
3278
3273
|
record: u,
|
|
@@ -3284,12 +3279,12 @@ function Hr(t) {
|
|
|
3284
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;
|
|
3285
3280
|
}
|
|
3286
3281
|
function Ur(e, t) {
|
|
3287
|
-
return /* @__PURE__ */ m(
|
|
3282
|
+
return /* @__PURE__ */ m(B, { height: 35 }, t);
|
|
3288
3283
|
}
|
|
3289
3284
|
//#endregion
|
|
3290
3285
|
//#region src/DataTable/DeleteModal.tsx
|
|
3291
3286
|
function Wr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
|
|
3292
|
-
let { mutateAsync: o, isError: s, error: l, isPending: u } =
|
|
3287
|
+
let { mutateAsync: o, isError: s, error: l, isPending: u } = Jt(n, e, t), [d, g] = f(i), [_, y] = f(!1), x = _ || u;
|
|
3293
3288
|
return c(() => {
|
|
3294
3289
|
d.length || r();
|
|
3295
3290
|
}, [r, d]), d.length ? /* @__PURE__ */ h(p, { children: [
|
|
@@ -3299,7 +3294,7 @@ function Wr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
|
|
|
3299
3294
|
title: l.name,
|
|
3300
3295
|
children: l.message
|
|
3301
3296
|
}),
|
|
3302
|
-
/* @__PURE__ */ m(
|
|
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?` }),
|
|
3303
3298
|
/* @__PURE__ */ h(E, {
|
|
3304
3299
|
mt: "md",
|
|
3305
3300
|
justify: "end",
|
|
@@ -3455,7 +3450,7 @@ function ri(e, t) {
|
|
|
3455
3450
|
gap: "md",
|
|
3456
3451
|
py: "xs",
|
|
3457
3452
|
px: "sm",
|
|
3458
|
-
children: [/* @__PURE__ */ m(
|
|
3453
|
+
children: [/* @__PURE__ */ m(W, {
|
|
3459
3454
|
fw: 700,
|
|
3460
3455
|
fz: "sm",
|
|
3461
3456
|
style: { flexShrink: 0 },
|
|
@@ -3492,13 +3487,13 @@ function oi(e, t) {
|
|
|
3492
3487
|
let n = t.column;
|
|
3493
3488
|
if (n.render) return n.render(e, 0);
|
|
3494
3489
|
let r = ai(e, n.accessor ?? t.id);
|
|
3495
|
-
return r == null ? /* @__PURE__ */ m(
|
|
3490
|
+
return r == null ? /* @__PURE__ */ m(W, {
|
|
3496
3491
|
c: "dimmed",
|
|
3497
3492
|
children: "–"
|
|
3498
|
-
}) : typeof r == "boolean" ? /* @__PURE__ */ m(
|
|
3493
|
+
}) : typeof r == "boolean" ? /* @__PURE__ */ m(W, {
|
|
3499
3494
|
fz: "sm",
|
|
3500
3495
|
children: r ? "Ja" : "Nein"
|
|
3501
|
-
}) : /* @__PURE__ */ m(
|
|
3496
|
+
}) : /* @__PURE__ */ m(W, {
|
|
3502
3497
|
fz: "sm",
|
|
3503
3498
|
children: String(r)
|
|
3504
3499
|
});
|
|
@@ -3518,20 +3513,20 @@ function si(t) {
|
|
|
3518
3513
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3519
3514
|
});
|
|
3520
3515
|
}, r[4] = T, r[5] = j);
|
|
3521
|
-
let M = j, N = a.filter(_i), P = a.filter(gi),
|
|
3522
|
-
r[6] === o ?
|
|
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) => {
|
|
3523
3518
|
o?.({
|
|
3524
3519
|
record: e,
|
|
3525
3520
|
index: t,
|
|
3526
3521
|
event: n
|
|
3527
3522
|
});
|
|
3528
|
-
}, r[6] = o, r[7] =
|
|
3529
|
-
let
|
|
3523
|
+
}, r[6] = o, r[7] = re);
|
|
3524
|
+
let ie = re, ae = te, H = (d && V.length > 0 || P.length > 0) && /* @__PURE__ */ h(E, {
|
|
3530
3525
|
gap: "xs",
|
|
3531
3526
|
wrap: "nowrap",
|
|
3532
3527
|
justify: "flex-end",
|
|
3533
|
-
children: [d &&
|
|
3534
|
-
data:
|
|
3528
|
+
children: [d && V.length > 0 && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ee, {
|
|
3529
|
+
data: V,
|
|
3535
3530
|
value: d.field,
|
|
3536
3531
|
onChange: (e) => e && d.onSortChange(e, d.direction),
|
|
3537
3532
|
allowDeselect: !1,
|
|
@@ -3540,31 +3535,31 @@ function si(t) {
|
|
|
3540
3535
|
variant: "filled",
|
|
3541
3536
|
size: "input-sm",
|
|
3542
3537
|
onClick: () => d.onSortChange(d.field, d.direction === "asc" ? "desc" : "asc"),
|
|
3543
|
-
children: d.direction === "asc" ? /* @__PURE__ */ m(
|
|
3544
|
-
})] }), P.length > 0 && /* @__PURE__ */ h(
|
|
3545
|
-
opened:
|
|
3546
|
-
onChange:
|
|
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,
|
|
3547
3542
|
position: "bottom-end",
|
|
3548
3543
|
withArrow: !0,
|
|
3549
3544
|
shadow: "md",
|
|
3550
3545
|
trapFocus: !0,
|
|
3551
|
-
children: [/* @__PURE__ */ m(
|
|
3546
|
+
children: [/* @__PURE__ */ m(I.Target, { children: /* @__PURE__ */ m(D, {
|
|
3552
3547
|
inline: !0,
|
|
3553
|
-
disabled: !
|
|
3548
|
+
disabled: !R,
|
|
3554
3549
|
color: "green",
|
|
3555
3550
|
withBorder: !0,
|
|
3556
3551
|
children: /* @__PURE__ */ m(_, {
|
|
3557
|
-
variant:
|
|
3552
|
+
variant: R ? "filled" : "default",
|
|
3558
3553
|
size: "input-sm",
|
|
3559
|
-
onClick: () =>
|
|
3554
|
+
onClick: () => ne(ui),
|
|
3560
3555
|
"aria-label": "Filter",
|
|
3561
|
-
children: /* @__PURE__ */ m(
|
|
3556
|
+
children: /* @__PURE__ */ m(be, { size: 18 })
|
|
3562
3557
|
})
|
|
3563
|
-
}) }), /* @__PURE__ */ m(
|
|
3558
|
+
}) }), /* @__PURE__ */ m(I.Dropdown, {
|
|
3564
3559
|
p: 0,
|
|
3565
3560
|
children: /* @__PURE__ */ m(g, {
|
|
3566
3561
|
multiple: !0,
|
|
3567
|
-
defaultValue:
|
|
3562
|
+
defaultValue: z,
|
|
3568
3563
|
style: {
|
|
3569
3564
|
minWidth: 260,
|
|
3570
3565
|
maxWidth: 320
|
|
@@ -3573,7 +3568,7 @@ function si(t) {
|
|
|
3573
3568
|
value: e.id,
|
|
3574
3569
|
children: [/* @__PURE__ */ m(g.Control, { children: /* @__PURE__ */ h(E, {
|
|
3575
3570
|
gap: "xs",
|
|
3576
|
-
children: [/* @__PURE__ */ m(
|
|
3571
|
+
children: [/* @__PURE__ */ m(W, {
|
|
3577
3572
|
fw: 600,
|
|
3578
3573
|
fz: "sm",
|
|
3579
3574
|
children: e.column.title ?? e.id
|
|
@@ -3583,19 +3578,19 @@ function si(t) {
|
|
|
3583
3578
|
bg: "green",
|
|
3584
3579
|
style: { borderRadius: "50%" }
|
|
3585
3580
|
})]
|
|
3586
|
-
}) }), /* @__PURE__ */ m(g.Panel, { children: typeof e.column.filter == "function" ? e.column.filter({ close: () =>
|
|
3581
|
+
}) }), /* @__PURE__ */ m(g.Panel, { children: typeof e.column.filter == "function" ? e.column.filter({ close: () => ne(!1) }) : e.column.filter })]
|
|
3587
3582
|
}, e.id))
|
|
3588
3583
|
})
|
|
3589
3584
|
})]
|
|
3590
3585
|
})]
|
|
3591
|
-
}),
|
|
3592
|
-
r[8] === i.length ?
|
|
3586
|
+
}), U;
|
|
3587
|
+
r[8] === i.length ? U = r[9] : (U = i.length === 0 && /* @__PURE__ */ m(W, {
|
|
3593
3588
|
c: "dimmed",
|
|
3594
3589
|
ta: "center",
|
|
3595
3590
|
py: "xl",
|
|
3596
3591
|
children: "Keine Einträge gefunden"
|
|
3597
|
-
}), r[8] = i.length, r[9] =
|
|
3598
|
-
let
|
|
3592
|
+
}), r[8] = i.length, r[9] = U);
|
|
3593
|
+
let oe = i.map((e, t) => {
|
|
3599
3594
|
let r = e.id ?? t, i = !!v && (!v.expandable || v.expandable(e)), a = i && A(r);
|
|
3600
3595
|
return /* @__PURE__ */ m(n.Fragment, { children: /* @__PURE__ */ h(y, {
|
|
3601
3596
|
bg: "var(--mantine-color-body)",
|
|
@@ -3608,7 +3603,7 @@ function si(t) {
|
|
|
3608
3603
|
w: "100%",
|
|
3609
3604
|
style: { cursor: o || i ? "pointer" : "default" },
|
|
3610
3605
|
onClick: (n) => {
|
|
3611
|
-
i && !o ? M(r) :
|
|
3606
|
+
i && !o ? M(r) : ie(e, t, n);
|
|
3612
3607
|
},
|
|
3613
3608
|
children: [s && s.length > 0 && /* @__PURE__ */ m(E, {
|
|
3614
3609
|
px: "sm",
|
|
@@ -3624,7 +3619,7 @@ function si(t) {
|
|
|
3624
3619
|
color: "gray",
|
|
3625
3620
|
size: "sm",
|
|
3626
3621
|
onClick: li,
|
|
3627
|
-
children: /* @__PURE__ */ m(
|
|
3622
|
+
children: /* @__PURE__ */ m(ye, { size: 16 })
|
|
3628
3623
|
}) }), /* @__PURE__ */ m(k.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ m(k.Item, {
|
|
3629
3624
|
leftSection: t.icon,
|
|
3630
3625
|
onClick: (n) => {
|
|
@@ -3647,13 +3642,13 @@ function si(t) {
|
|
|
3647
3642
|
})]
|
|
3648
3643
|
})]
|
|
3649
3644
|
}) }, r);
|
|
3650
|
-
}),
|
|
3651
|
-
r[10] === u ?
|
|
3645
|
+
}), se;
|
|
3646
|
+
r[10] === u ? se = r[11] : (se = u && u.totalRecords > u.recordsPerPage && /* @__PURE__ */ h(te, {
|
|
3652
3647
|
gap: "xs",
|
|
3653
3648
|
mt: "sm",
|
|
3654
3649
|
children: [/* @__PURE__ */ m(E, {
|
|
3655
3650
|
justify: "center",
|
|
3656
|
-
children: /* @__PURE__ */ m(
|
|
3651
|
+
children: /* @__PURE__ */ m(F, {
|
|
3657
3652
|
total: Math.ceil(u.totalRecords / u.recordsPerPage),
|
|
3658
3653
|
value: u.page,
|
|
3659
3654
|
onChange: u.onPageChange,
|
|
@@ -3662,11 +3657,11 @@ function si(t) {
|
|
|
3662
3657
|
}), u.recordsPerPageOptions && u.onRecordsPerPageChange && /* @__PURE__ */ h(E, {
|
|
3663
3658
|
justify: "center",
|
|
3664
3659
|
gap: "xs",
|
|
3665
|
-
children: [/* @__PURE__ */ m(
|
|
3660
|
+
children: [/* @__PURE__ */ m(W, {
|
|
3666
3661
|
fz: "xs",
|
|
3667
3662
|
c: "dimmed",
|
|
3668
3663
|
children: "Einträge pro Seite:"
|
|
3669
|
-
}), /* @__PURE__ */ m(
|
|
3664
|
+
}), /* @__PURE__ */ m(ee, {
|
|
3670
3665
|
data: u.recordsPerPageOptions.map(ci),
|
|
3671
3666
|
value: String(u.recordsPerPage),
|
|
3672
3667
|
onChange: (e) => e && u.onRecordsPerPageChange(Number(e)),
|
|
@@ -3675,18 +3670,18 @@ function si(t) {
|
|
|
3675
3670
|
w: 70
|
|
3676
3671
|
})]
|
|
3677
3672
|
})]
|
|
3678
|
-
}), r[10] = u, r[11] =
|
|
3679
|
-
let
|
|
3680
|
-
return r[12] !==
|
|
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, {
|
|
3681
3676
|
gap: "sm",
|
|
3682
3677
|
my: "md",
|
|
3683
3678
|
children: [
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3679
|
+
H,
|
|
3680
|
+
U,
|
|
3681
|
+
oe,
|
|
3682
|
+
se
|
|
3688
3683
|
]
|
|
3689
|
-
}), r[12] =
|
|
3684
|
+
}), r[12] = ae, r[13] = se, r[14] = H, r[15] = U, r[16] = oe, r[17] = ce) : ce = r[17], ce;
|
|
3690
3685
|
}
|
|
3691
3686
|
function ci(e) {
|
|
3692
3687
|
return {
|
|
@@ -3734,43 +3729,21 @@ var vi = [
|
|
|
3734
3729
|
100,
|
|
3735
3730
|
500
|
|
3736
3731
|
];
|
|
3737
|
-
function yi(t) {
|
|
3738
|
-
let
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
Te = e ? "?" + Object.entries(e).filter(Ni).map(Mi).join("&") : "", n[8] = _e, n[9] = M, n[10] = Te;
|
|
3753
|
-
} else Te = n[10];
|
|
3754
|
-
let Ee = Te, Oe;
|
|
3755
|
-
n[11] !== U || n[12] !== i ? (Oe = U ? [...i, U] : i, n[11] = U, n[12] = i, n[13] = Oe) : Oe = n[13];
|
|
3756
|
-
let ke = Oe, { data: Ae, isLoading: je, isError: Me, isRefetching: Ne, refetch: Pe } = Ut(be + Ee, ke), Fe = ti(Array.isArray(Ae) ? Ae : [], C), Ie = O?.field ?? g[0].id, Le = O?.direction ?? "desc", Re;
|
|
3757
|
-
n[14] !== Ie || n[15] !== Le ? (Re = {
|
|
3758
|
-
columnAccessor: Ie,
|
|
3759
|
-
direction: Le
|
|
3760
|
-
}, n[14] = Ie, n[15] = Le, n[16] = Re) : Re = n[16];
|
|
3761
|
-
let [ze, Be] = f(Re), Ve;
|
|
3762
|
-
n[17] === A ? Ve = n[18] : (Ve = (e) => {
|
|
3763
|
-
Be(e), A && A(String(e.columnAccessor), e.direction);
|
|
3764
|
-
}, n[17] = A, n[18] = Ve);
|
|
3765
|
-
let He = Ve, W = Yr(Fe, ze.columnAccessor, ze.direction), [G, Ue] = Gr(vi[1], "mantine-table-page-size"), [We, Ge] = f(1), Ke = S ? W.slice((We - 1) * G, We * G) : W, qe;
|
|
3766
|
-
n[19] === Symbol.for("react.memo_cache_sentinel") ? (qe = [], n[19] = qe) : qe = n[19];
|
|
3767
|
-
let [Je, Ye] = f(qe), K = z?.expanded?.recordIds ?? Je, Xe = z?.expanded?.onRecordIdsChange ?? Ye, Ze;
|
|
3768
|
-
n[20] !== K || n[21] !== Xe || n[22] !== z?.allowMultiple ? (Ze = (e) => {
|
|
3769
|
-
K.includes(e) ? Xe(K.filter((t) => t !== e)) : Xe(z?.allowMultiple ? [...K, e] : [e]);
|
|
3770
|
-
}, n[20] = K, n[21] = Xe, n[22] = z?.allowMultiple, n[23] = Ze) : Ze = n[23];
|
|
3771
|
-
let Qe = Ze, $e = g.findIndex(ji), et;
|
|
3772
|
-
n[24] !== K || n[25] !== g || n[26] !== $e || n[27] !== z || n[28] !== Qe ? (et = z && $e >= 0 ? g.map((e, t) => {
|
|
3773
|
-
if (t !== $e) return e;
|
|
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;
|
|
3774
3747
|
let n = e.column.render;
|
|
3775
3748
|
return {
|
|
3776
3749
|
...e,
|
|
@@ -3780,430 +3753,309 @@ function yi(t) {
|
|
|
3780
3753
|
gap: "xs",
|
|
3781
3754
|
wrap: "nowrap",
|
|
3782
3755
|
align: "center",
|
|
3783
|
-
children: [!
|
|
3756
|
+
children: [!R.expandable || R.expandable(t) ? /* @__PURE__ */ m(y, {
|
|
3784
3757
|
component: "span",
|
|
3785
3758
|
"aria-label": "Aufklappen",
|
|
3786
3759
|
onClick: (e) => {
|
|
3787
|
-
e.stopPropagation(),
|
|
3760
|
+
e.stopPropagation(), Re(t.id);
|
|
3788
3761
|
},
|
|
3789
3762
|
style: {
|
|
3790
3763
|
display: "inline-flex",
|
|
3791
3764
|
flexShrink: 0,
|
|
3792
3765
|
cursor: "pointer"
|
|
3793
3766
|
},
|
|
3794
|
-
children: /* @__PURE__ */ m(
|
|
3767
|
+
children: /* @__PURE__ */ m(ve, {
|
|
3795
3768
|
size: 16,
|
|
3796
3769
|
style: {
|
|
3797
3770
|
color: "var(--mantine-primary-color-filled)",
|
|
3798
|
-
transform:
|
|
3771
|
+
transform: Ie.includes(t.id) ? "rotate(90deg)" : void 0,
|
|
3799
3772
|
transition: "transform 200ms ease"
|
|
3800
3773
|
}
|
|
3801
3774
|
})
|
|
3802
3775
|
}) : /* @__PURE__ */ m(y, {
|
|
3803
3776
|
w: 16,
|
|
3804
3777
|
style: { flexShrink: 0 }
|
|
3805
|
-
}), n ? n(t, r) : String(
|
|
3778
|
+
}), n ? n(t, r) : String(En(t, e.column.accessor) ?? "")]
|
|
3806
3779
|
})
|
|
3807
3780
|
}
|
|
3808
3781
|
};
|
|
3809
|
-
}) :
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
n[32] === U ? it = n[33] : (it = [U], n[32] = U, n[33] = it), c(rt, it);
|
|
3818
|
-
let [at, ot] = f(!1), [st, ct] = f(!1), [Y, lt] = f(!1), ut = d(null), dt;
|
|
3819
|
-
n[34] !== B || n[35] !== se || n[36] !== W ? (dt = () => {
|
|
3820
|
-
if (!B) {
|
|
3821
|
-
ut.current = null;
|
|
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;
|
|
3822
3790
|
return;
|
|
3823
3791
|
}
|
|
3824
|
-
if (
|
|
3825
|
-
let e =
|
|
3826
|
-
e && (
|
|
3827
|
-
},
|
|
3828
|
-
let
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
let gt = ht, X;
|
|
3835
|
-
if (n[45] !== w || n[46] !== gt || n[47] !== mt) {
|
|
3836
|
-
if (X = [], mt) {
|
|
3837
|
-
let e;
|
|
3838
|
-
n[49] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(Ce, { size: 14 }), n[49] = e) : e = n[49];
|
|
3839
|
-
let t;
|
|
3840
|
-
n[50] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
3841
|
-
icon: e,
|
|
3842
|
-
label: "Bearbeiten",
|
|
3843
|
-
onClick: (e) => {
|
|
3844
|
-
J(e), ct(!0);
|
|
3845
|
-
}
|
|
3846
|
-
}, n[50] = t) : t = n[50], X.push(t);
|
|
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 = [];
|
|
3797
|
+
return Je && Xe.push({
|
|
3798
|
+
icon: /* @__PURE__ */ m(Se, { size: 14 }),
|
|
3799
|
+
label: "Bearbeiten",
|
|
3800
|
+
onClick: (e) => {
|
|
3801
|
+
q(e), We(!0);
|
|
3847
3802
|
}
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
icon: e,
|
|
3854
|
-
label: "Löschen",
|
|
3855
|
-
onClick: (e) => {
|
|
3856
|
-
J(e), lt(!0);
|
|
3857
|
-
}
|
|
3858
|
-
}, n[52] = t) : t = n[52], X.push(t);
|
|
3803
|
+
}), x && Xe.push(...x), Ye && Xe.push({
|
|
3804
|
+
icon: /* @__PURE__ */ m(Ee, { size: 14 }),
|
|
3805
|
+
label: "Löschen",
|
|
3806
|
+
onClick: (e) => {
|
|
3807
|
+
q(e), Ke(!0);
|
|
3859
3808
|
}
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
}, vt = {
|
|
3867
|
-
base: "column",
|
|
3868
|
-
sm: "row"
|
|
3869
|
-
}, n[53] = _t, n[54] = vt) : (_t = n[53], vt = n[54]);
|
|
3870
|
-
let yt = r ? "space-between" : "flex-end", bt;
|
|
3871
|
-
n[55] === r ? bt = n[56] : (bt = r && (typeof r == "string" ? /* @__PURE__ */ m(de, {
|
|
3872
|
-
order: 4,
|
|
3873
|
-
children: r
|
|
3874
|
-
}) : r), n[55] = r, n[56] = bt);
|
|
3875
|
-
let xt, St;
|
|
3876
|
-
n[57] === Symbol.for("react.memo_cache_sentinel") ? (xt = {
|
|
3877
|
-
base: "stretch",
|
|
3878
|
-
sm: "center"
|
|
3879
|
-
}, St = {
|
|
3880
|
-
base: "column",
|
|
3881
|
-
sm: "row"
|
|
3882
|
-
}, n[57] = xt, n[58] = St) : (xt = n[57], St = n[58]);
|
|
3883
|
-
let Ct, wt;
|
|
3884
|
-
n[59] === Symbol.for("react.memo_cache_sentinel") ? (Ct = {
|
|
3885
|
-
base: "flex-start",
|
|
3886
|
-
sm: "flex-end"
|
|
3887
|
-
}, wt = {
|
|
3888
|
-
base: 0,
|
|
3889
|
-
sm: "auto"
|
|
3890
|
-
}, n[59] = Ct, n[60] = wt) : (Ct = n[59], wt = n[60]);
|
|
3891
|
-
let Tt;
|
|
3892
|
-
n[61] !== Pe || n[62] !== V ? (Tt = V && /* @__PURE__ */ m(_, {
|
|
3893
|
-
variant: "subtle",
|
|
3894
|
-
onClick: () => Pe(),
|
|
3895
|
-
"aria-label": "Neuladen",
|
|
3896
|
-
children: /* @__PURE__ */ m(we, {})
|
|
3897
|
-
}), n[61] = Pe, n[62] = V, n[63] = Tt) : Tt = n[63];
|
|
3898
|
-
let Et;
|
|
3899
|
-
n[64] !== w || n[65] !== R || n[66] !== L || n[67] !== g || n[68] !== H || n[69] !== q || n[70] !== x ? (Et = (g.some(Oi) || x) && (() => {
|
|
3900
|
-
let e = g.find(Di) && (!L || q.length > 0 && L(q[0])), t = g.find(Ei) && (!R || q.length > 0 && R(q[0])), n = (w ?? []).length > 0, r = e || t || n;
|
|
3901
|
-
return /* @__PURE__ */ m(y, {
|
|
3902
|
-
...H ? { visibleFrom: "sm" } : {},
|
|
3903
|
-
children: /* @__PURE__ */ h(k, {
|
|
3904
|
-
shadow: "md",
|
|
3905
|
-
children: [/* @__PURE__ */ m(k.Target, { children: /* @__PURE__ */ m(b, {
|
|
3906
|
-
variant: "outline",
|
|
3907
|
-
rightSection: /* @__PURE__ */ m(ve, { size: 14 }),
|
|
3908
|
-
disabled: !q.length || !r,
|
|
3909
|
-
children: "Aktionen"
|
|
3910
|
-
}) }), /* @__PURE__ */ h(k.Dropdown, { children: [
|
|
3911
|
-
e && /* @__PURE__ */ m(k.Item, {
|
|
3912
|
-
leftSection: /* @__PURE__ */ m(Ce, { size: 14 }),
|
|
3913
|
-
onClick: () => ct(!0),
|
|
3914
|
-
disabled: q.length !== 1,
|
|
3915
|
-
children: "Bearbeiten"
|
|
3916
|
-
}),
|
|
3917
|
-
(w ?? []).map((e, t) => /* @__PURE__ */ a(k.Item, {
|
|
3918
|
-
...e.icon && { leftSection: e.icon },
|
|
3919
|
-
key: `custom_action_${t}`,
|
|
3920
|
-
onClick: () => e.onClick(q),
|
|
3921
|
-
disabled: e.disabled?.(q) ?? !1
|
|
3922
|
-
}, e.label)),
|
|
3923
|
-
t && /* @__PURE__ */ m(k.Item, {
|
|
3924
|
-
leftSection: /* @__PURE__ */ m(De, { size: 14 }),
|
|
3925
|
-
onClick: () => lt(!0),
|
|
3926
|
-
color: "red",
|
|
3927
|
-
children: "Löschen"
|
|
3928
|
-
})
|
|
3929
|
-
] })]
|
|
3930
|
-
})
|
|
3931
|
-
});
|
|
3932
|
-
})(), n[64] = w, n[65] = R, n[66] = L, n[67] = g, n[68] = H, n[69] = q, n[70] = x, n[71] = Et) : Et = n[71];
|
|
3933
|
-
let Dt;
|
|
3934
|
-
n[72] !== j || n[73] !== g || n[74] !== je ? (Dt = g.find(Ti) && /* @__PURE__ */ m(b, {
|
|
3935
|
-
onClick: () => ot(!0),
|
|
3936
|
-
disabled: je,
|
|
3937
|
-
children: j ?? "Erstellen"
|
|
3938
|
-
}), n[72] = j, n[73] = g, n[74] = je, n[75] = Dt) : Dt = n[75];
|
|
3939
|
-
let Ot;
|
|
3940
|
-
n[76] !== u || n[77] !== Tt || n[78] !== Et || n[79] !== Dt ? (Ot = /* @__PURE__ */ h(T, {
|
|
3941
|
-
align: xt,
|
|
3942
|
-
direction: St,
|
|
3943
|
-
gap: "xs",
|
|
3944
|
-
wrap: "wrap",
|
|
3945
|
-
justify: Ct,
|
|
3946
|
-
ml: wt,
|
|
3947
|
-
children: [
|
|
3948
|
-
Tt,
|
|
3949
|
-
Et,
|
|
3950
|
-
Dt,
|
|
3951
|
-
u
|
|
3952
|
-
]
|
|
3953
|
-
}), n[76] = u, n[77] = Tt, n[78] = Et, n[79] = Dt, n[80] = Ot) : Ot = n[80];
|
|
3954
|
-
let kt;
|
|
3955
|
-
n[81] !== yt || n[82] !== bt || n[83] !== Ot ? (kt = /* @__PURE__ */ h(T, {
|
|
3956
|
-
gap: "xs",
|
|
3957
|
-
align: _t,
|
|
3958
|
-
direction: vt,
|
|
3959
|
-
justify: yt,
|
|
3960
|
-
wrap: "wrap",
|
|
3961
|
-
children: [bt, Ot]
|
|
3962
|
-
}), n[81] = yt, n[82] = bt, n[83] = Ot, n[84] = kt) : kt = n[84];
|
|
3963
|
-
let At;
|
|
3964
|
-
n[85] !== U || n[86] !== pe || n[87] !== P ? (At = P && P.length > 0 && /* @__PURE__ */ m(ce, {
|
|
3965
|
-
value: U,
|
|
3966
|
-
onChange: pe,
|
|
3967
|
-
mt: "md",
|
|
3968
|
-
children: /* @__PURE__ */ m(ce.List, { children: P.map(wi) })
|
|
3969
|
-
}), n[85] = U, n[86] = pe, n[87] = P, n[88] = At) : At = n[88];
|
|
3970
|
-
let jt;
|
|
3971
|
-
n[89] === Me ? jt = n[90] : (jt = Me && /* @__PURE__ */ m(v, {
|
|
3972
|
-
mt: "md",
|
|
3973
|
-
variant: "light",
|
|
3974
|
-
color: "red",
|
|
3975
|
-
title: "Es ist ein Fehler aufgetreten.",
|
|
3976
|
-
icon: /* @__PURE__ */ m(Se, {}),
|
|
3977
|
-
children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
|
|
3978
|
-
}), n[89] = Me, n[90] = jt);
|
|
3979
|
-
let Mt;
|
|
3980
|
-
n[91] !== je || n[92] !== Ne ? (Mt = (je || Ne) && /* @__PURE__ */ h(re, {
|
|
3981
|
-
my: "md",
|
|
3982
|
-
children: [/* @__PURE__ */ m(ne, { height: 40 }), [
|
|
3983
|
-
,
|
|
3984
|
-
,
|
|
3985
|
-
,
|
|
3986
|
-
,
|
|
3987
|
-
,
|
|
3988
|
-
].fill(0).map(Ci)]
|
|
3989
|
-
}), n[91] = je, n[92] = Ne, n[93] = Mt) : Mt = n[93];
|
|
3990
|
-
let Nt;
|
|
3991
|
-
n[94] !== R || n[95] !== L || n[96] !== K || n[97] !== tt || n[98] !== Xe || n[99] !== He || n[100] !== Me || n[101] !== je || n[102] !== Ne || n[103] !== X || n[104] !== H || n[105] !== ie || n[106] !== We || n[107] !== G || n[108] !== S || n[109] !== Ke || n[110] !== z || n[111] !== q || n[112] !== x || n[113] !== Ge || n[114] !== Ue || n[115] !== ze || n[116] !== W ? (Nt = !je && !Ne && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(y, {
|
|
3992
|
-
...H ? { visibleFrom: "sm" } : {},
|
|
3993
|
-
children: /* @__PURE__ */ m(Vr, {
|
|
3994
|
-
my: "md",
|
|
3995
|
-
striped: !0,
|
|
3996
|
-
highlightOnHover: !0,
|
|
3997
|
-
minHeight: 150,
|
|
3998
|
-
fetching: Me,
|
|
3999
|
-
records: Ke,
|
|
4000
|
-
sortStatus: ze,
|
|
4001
|
-
onSortStatusChange: He,
|
|
4002
|
-
...x && {
|
|
4003
|
-
selectedRecords: q,
|
|
4004
|
-
onSelectedRecordsChange: J
|
|
3809
|
+
}), /* @__PURE__ */ h(p, { children: [
|
|
3810
|
+
/* @__PURE__ */ h(T, {
|
|
3811
|
+
gap: "xs",
|
|
3812
|
+
align: {
|
|
3813
|
+
base: "stretch",
|
|
3814
|
+
sm: "center"
|
|
4005
3815
|
},
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
onPageChange: Ge,
|
|
4010
|
-
page: We,
|
|
4011
|
-
recordsPerPageOptions: vi,
|
|
4012
|
-
onRecordsPerPageChange: Ue,
|
|
4013
|
-
recordsPerPageLabel: "Einträge pro Seite"
|
|
3816
|
+
direction: {
|
|
3817
|
+
base: "column",
|
|
3818
|
+
sm: "row"
|
|
4014
3819
|
},
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
3820
|
+
justify: e ? "space-between" : "flex-end",
|
|
3821
|
+
wrap: "wrap",
|
|
3822
|
+
children: [e && (typeof e == "string" ? /* @__PURE__ */ m(le, {
|
|
3823
|
+
order: 4,
|
|
3824
|
+
children: e
|
|
3825
|
+
}) : e), /* @__PURE__ */ h(T, {
|
|
3826
|
+
align: {
|
|
3827
|
+
base: "stretch",
|
|
3828
|
+
sm: "center"
|
|
4021
3829
|
},
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
3830
|
+
direction: {
|
|
3831
|
+
base: "column",
|
|
3832
|
+
sm: "row"
|
|
4025
3833
|
},
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
3834
|
+
gap: "xs",
|
|
3835
|
+
wrap: "wrap",
|
|
3836
|
+
justify: {
|
|
3837
|
+
base: "flex-start",
|
|
3838
|
+
sm: "flex-end"
|
|
3839
|
+
},
|
|
3840
|
+
ml: {
|
|
3841
|
+
base: 0,
|
|
3842
|
+
sm: "auto"
|
|
3843
|
+
},
|
|
3844
|
+
children: [
|
|
3845
|
+
L && /* @__PURE__ */ m(_, {
|
|
3846
|
+
variant: "subtle",
|
|
3847
|
+
onClick: () => be(),
|
|
3848
|
+
"aria-label": "Neuladen",
|
|
3849
|
+
children: /* @__PURE__ */ m(Ce, {})
|
|
3850
|
+
}),
|
|
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, {
|
|
3856
|
+
shadow: "md",
|
|
3857
|
+
children: [/* @__PURE__ */ m(k.Target, { children: /* @__PURE__ */ m(b, {
|
|
3858
|
+
variant: "outline",
|
|
3859
|
+
rightSection: /* @__PURE__ */ m(_e, { size: 14 }),
|
|
3860
|
+
disabled: !K.length || !r,
|
|
3861
|
+
children: "Aktionen"
|
|
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,
|
|
3867
|
+
children: "Bearbeiten"
|
|
3868
|
+
}),
|
|
3869
|
+
(x ?? []).map((e, t) => /* @__PURE__ */ a(k.Item, {
|
|
3870
|
+
...e.icon && { leftSection: e.icon },
|
|
3871
|
+
key: `custom_action_${t}`,
|
|
3872
|
+
onClick: () => e.onClick(K),
|
|
3873
|
+
disabled: e.disabled?.(K) ?? !1
|
|
3874
|
+
}, e.label)),
|
|
3875
|
+
t && /* @__PURE__ */ m(k.Item, {
|
|
3876
|
+
leftSection: /* @__PURE__ */ m(Ee, { size: 14 }),
|
|
3877
|
+
onClick: () => Ke(!0),
|
|
3878
|
+
color: "red",
|
|
3879
|
+
children: "Löschen"
|
|
3880
|
+
})
|
|
3881
|
+
] })]
|
|
3882
|
+
})
|
|
3883
|
+
});
|
|
3884
|
+
})(),
|
|
3885
|
+
s.find((e) => e.create) && /* @__PURE__ */ m(b, {
|
|
3886
|
+
onClick: () => He(!0),
|
|
3887
|
+
disabled: he,
|
|
3888
|
+
children: D ?? "Erstellen"
|
|
3889
|
+
}),
|
|
3890
|
+
o
|
|
3891
|
+
]
|
|
3892
|
+
})]
|
|
3893
|
+
}),
|
|
3894
|
+
A && A.length > 0 && /* @__PURE__ */ m(oe, {
|
|
3895
|
+
value: H,
|
|
3896
|
+
onChange: U,
|
|
3897
|
+
mt: "md",
|
|
3898
|
+
children: /* @__PURE__ */ m(oe.List, { children: A.map((e) => /* @__PURE__ */ m(oe.Tab, {
|
|
3899
|
+
value: e.value,
|
|
3900
|
+
leftSection: e.icon,
|
|
3901
|
+
children: e.label
|
|
3902
|
+
}, e.value)) })
|
|
3903
|
+
}),
|
|
3904
|
+
ge && /* @__PURE__ */ m(v, {
|
|
3905
|
+
mt: "md",
|
|
3906
|
+
variant: "light",
|
|
3907
|
+
color: "red",
|
|
3908
|
+
title: "Es ist ein Fehler aufgetreten.",
|
|
3909
|
+
icon: /* @__PURE__ */ m(xe, {}),
|
|
3910
|
+
children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
|
|
3911
|
+
}),
|
|
3912
|
+
(he || ye) && /* @__PURE__ */ h(te, {
|
|
3913
|
+
my: "md",
|
|
3914
|
+
children: [/* @__PURE__ */ m(B, { height: 40 }), [
|
|
3915
|
+
,
|
|
3916
|
+
,
|
|
3917
|
+
,
|
|
3918
|
+
,
|
|
3919
|
+
,
|
|
3920
|
+
].fill(0).map((e, t) => /* @__PURE__ */ m(B, { height: 35 }, `skeleton-${t}`))]
|
|
3921
|
+
}),
|
|
3922
|
+
!he && !ye && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(y, {
|
|
3923
|
+
...ee ? { visibleFrom: "sm" } : {},
|
|
3924
|
+
children: /* @__PURE__ */ m(Vr, {
|
|
3925
|
+
my: "md",
|
|
3926
|
+
striped: !0,
|
|
3927
|
+
highlightOnHover: !0,
|
|
3928
|
+
minHeight: 150,
|
|
3929
|
+
fetching: ge,
|
|
3930
|
+
records: Ne,
|
|
3931
|
+
sortStatus: Te,
|
|
3932
|
+
onSortStatusChange: Oe,
|
|
3933
|
+
...l && {
|
|
3934
|
+
selectedRecords: K,
|
|
3935
|
+
onSelectedRecordsChange: q
|
|
3936
|
+
},
|
|
3937
|
+
...u && Ne.length && {
|
|
3938
|
+
totalRecords: G.length,
|
|
3939
|
+
recordsPerPage: ke,
|
|
3940
|
+
onPageChange: Me,
|
|
3941
|
+
page: je,
|
|
3942
|
+
recordsPerPageOptions: vi,
|
|
3943
|
+
onRecordsPerPageChange: Ae,
|
|
3944
|
+
recordsPerPageLabel: "Einträge pro Seite"
|
|
3945
|
+
},
|
|
3946
|
+
...R && { rowExpansion: {
|
|
3947
|
+
allowMultiple: R.allowMultiple ?? !1,
|
|
3948
|
+
trigger: z ? "never" : "click",
|
|
3949
|
+
content: ({ record: e }) => R.content(e, !1),
|
|
3950
|
+
expanded: {
|
|
3951
|
+
recordIds: Ie,
|
|
3952
|
+
onRecordIdsChange: Le
|
|
3953
|
+
},
|
|
3954
|
+
...R.expandable && { expandable: ({ record: e }) => R.expandable(e) }
|
|
3955
|
+
} },
|
|
3956
|
+
columns: Be.map((e) => e.column),
|
|
3957
|
+
noRecordsText: "Keine Einträge gefunden",
|
|
3958
|
+
onRowClick: z,
|
|
3959
|
+
...z && { style: { cursor: "pointer" } }
|
|
3960
|
+
})
|
|
3961
|
+
}), ee && /* @__PURE__ */ m(y, {
|
|
3962
|
+
hiddenFrom: "sm",
|
|
3963
|
+
children: /* @__PURE__ */ m(si, {
|
|
3964
|
+
records: Ne,
|
|
3965
|
+
fields: Be,
|
|
3966
|
+
onRowClick: z,
|
|
3967
|
+
sort: {
|
|
3968
|
+
field: String(Te.columnAccessor),
|
|
3969
|
+
direction: Te.direction,
|
|
3970
|
+
onSortChange: (e, t) => {
|
|
3971
|
+
Oe({
|
|
3972
|
+
columnAccessor: e,
|
|
3973
|
+
direction: t
|
|
3974
|
+
});
|
|
3975
|
+
}
|
|
3976
|
+
},
|
|
3977
|
+
...u && Ne.length && { pagination: {
|
|
3978
|
+
totalRecords: G.length,
|
|
3979
|
+
recordsPerPage: ke,
|
|
3980
|
+
page: je,
|
|
3981
|
+
onPageChange: Me,
|
|
3982
|
+
recordsPerPageOptions: vi,
|
|
3983
|
+
onRecordsPerPageChange: (e) => {
|
|
3984
|
+
Ae(e), Me(1);
|
|
3985
|
+
}
|
|
3986
|
+
} },
|
|
3987
|
+
...R && { rowExpansion: {
|
|
3988
|
+
content: R.content,
|
|
3989
|
+
expanded: {
|
|
3990
|
+
recordIds: Ie,
|
|
3991
|
+
onRecordIdsChange: Le
|
|
3992
|
+
},
|
|
3993
|
+
...R.expandable && { expandable: R.expandable }
|
|
3994
|
+
} },
|
|
3995
|
+
...Xe.length > 0 && {
|
|
3996
|
+
actions: Xe,
|
|
3997
|
+
canUpdate: F,
|
|
3998
|
+
canDelete: I
|
|
4050
3999
|
}
|
|
4000
|
+
})
|
|
4001
|
+
})] }),
|
|
4002
|
+
/* @__PURE__ */ m(N, {
|
|
4003
|
+
opened: Ue,
|
|
4004
|
+
onClose: () => {
|
|
4005
|
+
We(!1), q([]);
|
|
4051
4006
|
},
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
} },
|
|
4062
|
-
...z && { rowExpansion: {
|
|
4063
|
-
content: z.content,
|
|
4064
|
-
expanded: {
|
|
4065
|
-
recordIds: K,
|
|
4066
|
-
onRecordIdsChange: Xe
|
|
4007
|
+
title: e ?? "Bearbeiten",
|
|
4008
|
+
children: K.length > 0 && /* @__PURE__ */ m(Hr, {
|
|
4009
|
+
fields: s.filter((e) => e.update),
|
|
4010
|
+
queryKey: t,
|
|
4011
|
+
connectedQueryKeys: n,
|
|
4012
|
+
apiPath: ue,
|
|
4013
|
+
id: K[0].id,
|
|
4014
|
+
onClose: () => {
|
|
4015
|
+
We(!1), q([]);
|
|
4067
4016
|
},
|
|
4068
|
-
|
|
4069
|
-
}
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
canDelete: R
|
|
4074
|
-
}
|
|
4075
|
-
})
|
|
4076
|
-
})] }), n[94] = R, n[95] = L, n[96] = K, n[97] = tt, n[98] = Xe, n[99] = He, n[100] = Me, n[101] = je, n[102] = Ne, n[103] = X, n[104] = H, n[105] = ie, n[106] = We, n[107] = G, n[108] = S, n[109] = Ke, n[110] = z, n[111] = q, n[112] = x, n[113] = Ge, n[114] = Ue, n[115] = ze, n[116] = W, n[117] = Nt) : Nt = n[117];
|
|
4077
|
-
let Pt;
|
|
4078
|
-
n[118] === Symbol.for("react.memo_cache_sentinel") ? (Pt = () => {
|
|
4079
|
-
ct(!1), J([]);
|
|
4080
|
-
}, n[118] = Pt) : Pt = n[118];
|
|
4081
|
-
let Ft = r ?? "Bearbeiten", It;
|
|
4082
|
-
n[119] !== o || n[120] !== xe || n[121] !== g || n[122] !== i || n[123] !== q[0] || n[124] !== q.length || n[125] !== D ? (It = q.length > 0 && /* @__PURE__ */ m(Hr, {
|
|
4083
|
-
fields: g.filter(xi),
|
|
4084
|
-
queryKey: i,
|
|
4085
|
-
connectedQueryKeys: o,
|
|
4086
|
-
apiPath: xe,
|
|
4087
|
-
id: q[0].id,
|
|
4088
|
-
onClose: () => {
|
|
4089
|
-
ct(!1), J([]);
|
|
4090
|
-
},
|
|
4091
|
-
steps: D
|
|
4092
|
-
}), n[119] = o, n[120] = xe, n[121] = g, n[122] = i, n[123] = q[0], n[124] = q.length, n[125] = D, n[126] = It) : It = n[126];
|
|
4093
|
-
let Lt;
|
|
4094
|
-
n[127] !== Ft || n[128] !== It || n[129] !== st ? (Lt = /* @__PURE__ */ m(N, {
|
|
4095
|
-
opened: st,
|
|
4096
|
-
onClose: Pt,
|
|
4097
|
-
title: Ft,
|
|
4098
|
-
children: It
|
|
4099
|
-
}), n[127] = Ft, n[128] = It, n[129] = st, n[130] = Lt) : Lt = n[130];
|
|
4100
|
-
let Rt;
|
|
4101
|
-
n[131] !== o || n[132] !== oe || n[133] !== Y || n[134] !== xe || n[135] !== i || n[136] !== q || n[137] !== r ? (Rt = q.length > 0 && /* @__PURE__ */ m(N, {
|
|
4102
|
-
opened: Y,
|
|
4103
|
-
onClose: () => {
|
|
4104
|
-
lt(!1), J([]);
|
|
4105
|
-
},
|
|
4106
|
-
title: r ?? "Löschen",
|
|
4107
|
-
children: /* @__PURE__ */ m(Wr, {
|
|
4017
|
+
steps: S
|
|
4018
|
+
})
|
|
4019
|
+
}),
|
|
4020
|
+
K.length > 0 && /* @__PURE__ */ m(N, {
|
|
4021
|
+
opened: Ge,
|
|
4108
4022
|
onClose: () => {
|
|
4109
|
-
|
|
4023
|
+
Ke(!1), q([]);
|
|
4110
4024
|
},
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4025
|
+
title: e ?? "Löschen",
|
|
4026
|
+
children: /* @__PURE__ */ m(Wr, {
|
|
4027
|
+
onClose: () => {
|
|
4028
|
+
Ke(!1), q([]);
|
|
4029
|
+
},
|
|
4030
|
+
queryKey: t,
|
|
4031
|
+
connectedQueryKeys: n,
|
|
4032
|
+
apiPath: ue,
|
|
4033
|
+
selectedRecords: K,
|
|
4034
|
+
confirmMessage: ne
|
|
4035
|
+
})
|
|
4036
|
+
}),
|
|
4037
|
+
/* @__PURE__ */ m(N, {
|
|
4038
|
+
opened: Ve,
|
|
4039
|
+
onClose: () => {
|
|
4040
|
+
He(!1);
|
|
4041
|
+
},
|
|
4042
|
+
title: e ?? "Anlegen",
|
|
4043
|
+
children: /* @__PURE__ */ m(un, {
|
|
4044
|
+
queryKey: t,
|
|
4045
|
+
connectedQueryKeys: n,
|
|
4046
|
+
apiPath: ue,
|
|
4047
|
+
onClose: () => {
|
|
4048
|
+
He(!1);
|
|
4049
|
+
},
|
|
4050
|
+
fields: s.filter((e) => e.create),
|
|
4051
|
+
steps: S
|
|
4052
|
+
})
|
|
4116
4053
|
})
|
|
4117
|
-
|
|
4118
|
-
let zt;
|
|
4119
|
-
n[139] === Symbol.for("react.memo_cache_sentinel") ? (zt = () => {
|
|
4120
|
-
ot(!1);
|
|
4121
|
-
}, n[139] = zt) : zt = n[139];
|
|
4122
|
-
let Bt = r ?? "Anlegen", Vt;
|
|
4123
|
-
n[140] === Symbol.for("react.memo_cache_sentinel") ? (Vt = () => {
|
|
4124
|
-
ot(!1);
|
|
4125
|
-
}, n[140] = Vt) : Vt = n[140];
|
|
4126
|
-
let Ht;
|
|
4127
|
-
n[141] === g ? Ht = n[142] : (Ht = g.filter(bi), n[141] = g, n[142] = Ht);
|
|
4128
|
-
let Wt;
|
|
4129
|
-
n[143] !== o || n[144] !== xe || n[145] !== i || n[146] !== D || n[147] !== Ht ? (Wt = /* @__PURE__ */ m(ln, {
|
|
4130
|
-
queryKey: i,
|
|
4131
|
-
connectedQueryKeys: o,
|
|
4132
|
-
apiPath: xe,
|
|
4133
|
-
onClose: Vt,
|
|
4134
|
-
fields: Ht,
|
|
4135
|
-
steps: D
|
|
4136
|
-
}), n[143] = o, n[144] = xe, n[145] = i, n[146] = D, n[147] = Ht, n[148] = Wt) : Wt = n[148];
|
|
4137
|
-
let Gt;
|
|
4138
|
-
n[149] !== at || n[150] !== Bt || n[151] !== Wt ? (Gt = /* @__PURE__ */ m(N, {
|
|
4139
|
-
opened: at,
|
|
4140
|
-
onClose: zt,
|
|
4141
|
-
title: Bt,
|
|
4142
|
-
children: Wt
|
|
4143
|
-
}), n[149] = at, n[150] = Bt, n[151] = Wt, n[152] = Gt) : Gt = n[152];
|
|
4144
|
-
let Kt;
|
|
4145
|
-
return n[153] !== kt || n[154] !== At || n[155] !== jt || n[156] !== Mt || n[157] !== Nt || n[158] !== Lt || n[159] !== Rt || n[160] !== Gt ? (Kt = /* @__PURE__ */ h(p, { children: [
|
|
4146
|
-
kt,
|
|
4147
|
-
At,
|
|
4148
|
-
jt,
|
|
4149
|
-
Mt,
|
|
4150
|
-
Nt,
|
|
4151
|
-
Lt,
|
|
4152
|
-
Rt,
|
|
4153
|
-
Gt
|
|
4154
|
-
] }), n[153] = kt, n[154] = At, n[155] = jt, n[156] = Mt, n[157] = Nt, n[158] = Lt, n[159] = Rt, n[160] = Gt, n[161] = Kt) : Kt = n[161], Kt;
|
|
4155
|
-
}
|
|
4156
|
-
function bi(e) {
|
|
4157
|
-
return e.create;
|
|
4158
|
-
}
|
|
4159
|
-
function xi(e) {
|
|
4160
|
-
return e.update;
|
|
4161
|
-
}
|
|
4162
|
-
function Si(e) {
|
|
4163
|
-
return e.column;
|
|
4164
|
-
}
|
|
4165
|
-
function Ci(e, t) {
|
|
4166
|
-
return /* @__PURE__ */ m(ne, { height: 35 }, `skeleton-${t}`);
|
|
4167
|
-
}
|
|
4168
|
-
function wi(e) {
|
|
4169
|
-
return /* @__PURE__ */ m(ce.Tab, {
|
|
4170
|
-
value: e.value,
|
|
4171
|
-
leftSection: e.icon,
|
|
4172
|
-
children: e.label
|
|
4173
|
-
}, e.value);
|
|
4174
|
-
}
|
|
4175
|
-
function Ti(e) {
|
|
4176
|
-
return e.create;
|
|
4177
|
-
}
|
|
4178
|
-
function Ei(e) {
|
|
4179
|
-
return e.delete;
|
|
4180
|
-
}
|
|
4181
|
-
function Di(e) {
|
|
4182
|
-
return e.update;
|
|
4183
|
-
}
|
|
4184
|
-
function Oi(e) {
|
|
4185
|
-
return e.update;
|
|
4186
|
-
}
|
|
4187
|
-
function ki(e) {
|
|
4188
|
-
return e.delete;
|
|
4189
|
-
}
|
|
4190
|
-
function Ai(e) {
|
|
4191
|
-
return e.update;
|
|
4192
|
-
}
|
|
4193
|
-
function ji(e) {
|
|
4194
|
-
return e.list && e.column && !e.column.hidden;
|
|
4195
|
-
}
|
|
4196
|
-
function Mi(e) {
|
|
4197
|
-
let [t, n] = e;
|
|
4198
|
-
return `${t}=${encodeURIComponent(n ?? "")}`;
|
|
4199
|
-
}
|
|
4200
|
-
function Ni(e) {
|
|
4201
|
-
let [, t] = e;
|
|
4202
|
-
return t != null;
|
|
4054
|
+
] });
|
|
4203
4055
|
}
|
|
4204
4056
|
//#endregion
|
|
4205
4057
|
//#region src/DataTable/SubTable.tsx
|
|
4206
|
-
function
|
|
4058
|
+
function bi(t) {
|
|
4207
4059
|
let n = e(8), r, i, a;
|
|
4208
4060
|
if (n[0] !== t) {
|
|
4209
4061
|
a = Symbol.for("react.early_return_sentinel");
|
|
@@ -4211,14 +4063,14 @@ function Pi(t) {
|
|
|
4211
4063
|
let { mobile: e, columns: o, ...s } = t;
|
|
4212
4064
|
if (r = o, i = s, e) {
|
|
4213
4065
|
let e = i.records ?? [], t;
|
|
4214
|
-
n[4] === Symbol.for("react.memo_cache_sentinel") ? (t = { fontVariantNumeric: "tabular-nums" }, n[4] = t) : t = n[4], a = /* @__PURE__ */ m(
|
|
4066
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (t = { fontVariantNumeric: "tabular-nums" }, n[4] = t) : t = n[4], a = /* @__PURE__ */ m(te, {
|
|
4215
4067
|
gap: "sm",
|
|
4216
4068
|
style: t,
|
|
4217
4069
|
children: e.map((e, t) => {
|
|
4218
4070
|
let n = r.filter((t) => !t.hidden && !t.hideOnMobile?.(e)).map((n) => ({
|
|
4219
|
-
label: n.title ??
|
|
4220
|
-
value: n.render ? n.render(e, t) :
|
|
4221
|
-
})), a = i.idAccessor ?
|
|
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;
|
|
4222
4074
|
return /* @__PURE__ */ m(ii, { rows: n }, a);
|
|
4223
4075
|
})
|
|
4224
4076
|
});
|
|
@@ -4235,6 +4087,6 @@ function Pi(t) {
|
|
|
4235
4087
|
}), n[5] = r, n[6] = i, n[7] = o) : o = n[7], o;
|
|
4236
4088
|
}
|
|
4237
4089
|
//#endregion
|
|
4238
|
-
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 };
|
|
4239
4091
|
|
|
4240
4092
|
//# sourceMappingURL=index.es.js.map
|