@espresso-lab/mantine-data-table 2.2.10 → 2.3.0

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 CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as e from "react";
2
2
  import t, { Fragment as n, createContext as r, createElement as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
3
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
4
- import { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T, HoverCard as E, Indicator as D, Loader as O, Menu as k, MenuDropdown as A, MenuItem as j, MenuTarget as M, Modal as N, NumberInput as P, Pagination as ee, Popover as F, PopoverDropdown as te, PopoverTarget as I, ScrollArea as L, Select as ne, Skeleton as R, Stack as re, Stepper as ie, Table as z, TableTd as B, TableTfoot as ae, TableTh as oe, TableThead as se, TableTr as ce, Tabs as le, Text as V, TextInput as ue, Textarea as de, Title as fe, createSafeContext as pe, parseThemeColor as me, rem as H, useDirection as he, useMantineTheme as ge } from "@mantine/core";
5
- import { DateInput as _e } from "@mantine/dates";
6
- import { useForm as ve } from "@mantine/form";
7
- import { IconCaretDownFilled as ye, IconChevronRight as be, IconDotsVertical as xe, IconFilter as Se, IconInfoCircle as Ce, IconPencil as we, IconRefresh as Te, IconSortAscending as Ee, IconSortDescending as De, IconTrash as Oe } from "@tabler/icons-react";
8
- import { useClickOutside as ke, useDisclosure as Ae, useLocalStorage as je, useMediaQuery as Me, useMergedRef as Ne, useTimeout as Pe } from "@mantine/hooks";
4
+ import { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T, HoverCard as E, Indicator as D, Loader as O, Menu as k, MenuDropdown as A, MenuItem as j, MenuTarget as M, Modal as N, NumberInput as P, Pagination as ee, Popover as F, PopoverDropdown as te, PopoverTarget as I, ScrollArea as L, Select as ne, Skeleton as re, Stack as ie, Stepper as ae, Table as oe, TableTd as R, TableTfoot as se, TableTh as ce, TableThead as le, TableTr as z, Tabs as ue, Text as B, TextInput as de, Textarea as fe, Title as pe, createSafeContext as me, parseThemeColor as he, rem as ge, useDirection as _e, useMantineTheme as ve } from "@mantine/core";
5
+ import { DateInput as ye } from "@mantine/dates";
6
+ import { useForm as be } from "@mantine/form";
7
+ import { IconCaretDownFilled as xe, IconChevronRight as Se, IconDotsVertical as Ce, IconFilter as we, IconInfoCircle as Te, IconPencil as Ee, IconRefresh as De, IconSortAscending as Oe, IconSortDescending as ke, IconTrash as Ae } from "@tabler/icons-react";
8
+ import { useClickOutside as je, useDisclosure as Me, useLocalStorage as Ne, useMediaQuery as Pe, useMergedRef as Fe, useTimeout as Ie } from "@mantine/hooks";
9
9
  //#region node_modules/@tanstack/query-core/build/modern/subscribable.js
10
- var Fe = class {
10
+ var Le = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -21,7 +21,7 @@ var Fe = class {
21
21
  }
22
22
  onSubscribe() {}
23
23
  onUnsubscribe() {}
24
- }, Ie = new class extends Fe {
24
+ }, Re = new class extends Le {
25
25
  #e;
26
26
  #t;
27
27
  #n;
@@ -58,13 +58,13 @@ var Fe = class {
58
58
  isFocused() {
59
59
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
60
60
  }
61
- }(), Le = {
61
+ }(), ze = {
62
62
  setTimeout: (e, t) => setTimeout(e, t),
63
63
  clearTimeout: (e) => clearTimeout(e),
64
64
  setInterval: (e, t) => setInterval(e, t),
65
65
  clearInterval: (e) => clearInterval(e)
66
- }, Re = new class {
67
- #e = Le;
66
+ }, V = new class {
67
+ #e = ze;
68
68
  #t = !1;
69
69
  setTimeoutProvider(e) {
70
70
  process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.", {
@@ -85,77 +85,77 @@ var Fe = class {
85
85
  this.#e.clearInterval(e);
86
86
  }
87
87
  }();
88
- function ze(e) {
88
+ function Be(e) {
89
89
  setTimeout(e, 0);
90
90
  }
91
91
  //#endregion
92
92
  //#region node_modules/@tanstack/query-core/build/modern/utils.js
93
- var Be = typeof window > "u" || "Deno" in globalThis;
94
- function Ve() {}
93
+ var Ve = typeof window > "u" || "Deno" in globalThis;
94
+ function H() {}
95
95
  function He(e) {
96
96
  return typeof e == "number" && e >= 0 && e !== Infinity;
97
97
  }
98
98
  function Ue(e, t) {
99
99
  return Math.max(e + (t || 0) - Date.now(), 0);
100
100
  }
101
- function We(e, t) {
101
+ function U(e, t) {
102
102
  return typeof e == "function" ? e(t) : e;
103
103
  }
104
- function U(e, t) {
104
+ function W(e, t) {
105
105
  return typeof e == "function" ? e(t) : e;
106
106
  }
107
- function Ge(e) {
108
- return JSON.stringify(e, (e, t) => Ye(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
107
+ function We(e) {
108
+ return JSON.stringify(e, (e, t) => Je(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
109
109
  }
110
- var Ke = Object.prototype.hasOwnProperty;
111
- function W(e, t, n = 0) {
110
+ var Ge = Object.prototype.hasOwnProperty;
111
+ function Ke(e, t, n = 0) {
112
112
  if (e === t) return e;
113
113
  if (n > 500) return t;
114
- let r = Je(e) && Je(t);
115
- if (!r && !(Ye(e) && Ye(t))) return t;
114
+ let r = qe(e) && qe(t);
115
+ if (!r && !(Je(e) && Je(t))) return t;
116
116
  let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
117
117
  for (let l = 0; l < o; l++) {
118
118
  let o = r ? l : a[l], u = e[o], d = t[o];
119
119
  if (u === d) {
120
- s[o] = u, (r ? l < i : Ke.call(e, o)) && c++;
120
+ s[o] = u, (r ? l < i : Ge.call(e, o)) && c++;
121
121
  continue;
122
122
  }
123
123
  if (u === null || d === null || typeof u != "object" || typeof d != "object") {
124
124
  s[o] = d;
125
125
  continue;
126
126
  }
127
- let f = W(u, d, n + 1);
127
+ let f = Ke(u, d, n + 1);
128
128
  s[o] = f, f === u && c++;
129
129
  }
130
130
  return i === o && c === i ? e : s;
131
131
  }
132
- function qe(e, t) {
132
+ function G(e, t) {
133
133
  if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
134
134
  for (let n in e) if (e[n] !== t[n]) return !1;
135
135
  return !0;
136
136
  }
137
- function Je(e) {
137
+ function qe(e) {
138
138
  return Array.isArray(e) && e.length === Object.keys(e).length;
139
139
  }
140
- function Ye(e) {
141
- if (!Xe(e)) return !1;
140
+ function Je(e) {
141
+ if (!Ye(e)) return !1;
142
142
  let t = e.constructor;
143
143
  if (t === void 0) return !0;
144
144
  let n = t.prototype;
145
- return !(!Xe(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
145
+ return !(!Ye(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
146
146
  }
147
- function Xe(e) {
147
+ function Ye(e) {
148
148
  return Object.prototype.toString.call(e) === "[object Object]";
149
149
  }
150
- function G(e, t, n) {
150
+ function Xe(e, t, n) {
151
151
  if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
152
152
  if (n.structuralSharing !== !1) {
153
153
  if (process.env.NODE_ENV !== "production") try {
154
- return W(e, t);
154
+ return Ke(e, t);
155
155
  } catch (e) {
156
156
  throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`), e;
157
157
  }
158
- return W(e, t);
158
+ return Ke(e, t);
159
159
  }
160
160
  return t;
161
161
  }
@@ -164,8 +164,8 @@ function K(e, t) {
164
164
  }
165
165
  //#endregion
166
166
  //#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
167
- var Ze = /* @__PURE__ */ (() => {
168
- let e = () => Be;
167
+ var q = /* @__PURE__ */ (() => {
168
+ let e = () => Ve;
169
169
  return {
170
170
  isServer() {
171
171
  return e();
@@ -177,7 +177,7 @@ var Ze = /* @__PURE__ */ (() => {
177
177
  })();
178
178
  //#endregion
179
179
  //#region node_modules/@tanstack/query-core/build/modern/thenable.js
180
- function Qe() {
180
+ function Ze() {
181
181
  let e, t, n = new Promise((n, r) => {
182
182
  e = n, t = r;
183
183
  });
@@ -199,13 +199,13 @@ function Qe() {
199
199
  }
200
200
  //#endregion
201
201
  //#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
202
- var $e = ze;
203
- function et() {
202
+ var Qe = Be;
203
+ function $e() {
204
204
  let e = [], t = 0, n = (e) => {
205
205
  e();
206
206
  }, r = (e) => {
207
207
  e();
208
- }, i = $e, a = (r) => {
208
+ }, i = Qe, a = (r) => {
209
209
  t ? e.push(r) : i(() => {
210
210
  n(r);
211
211
  });
@@ -247,7 +247,7 @@ function et() {
247
247
  }
248
248
  };
249
249
  }
250
- var tt = et(), nt = new class extends Fe {
250
+ var J = $e(), et = new class extends Le {
251
251
  #e = !0;
252
252
  #t;
253
253
  #n;
@@ -281,16 +281,16 @@ var tt = et(), nt = new class extends Fe {
281
281
  }();
282
282
  //#endregion
283
283
  //#region node_modules/@tanstack/query-core/build/modern/retryer.js
284
- function rt(e) {
285
- return (e ?? "online") !== "online" || nt.isOnline();
284
+ function tt(e) {
285
+ return (e ?? "online") !== "online" || et.isOnline();
286
286
  }
287
287
  //#endregion
288
288
  //#region node_modules/@tanstack/query-core/build/modern/query.js
289
- function it(e, t) {
289
+ function nt(e, t) {
290
290
  return {
291
291
  fetchFailureCount: 0,
292
292
  fetchFailureReason: null,
293
- fetchStatus: rt(t.networkMode) ? "fetching" : "paused",
293
+ fetchStatus: tt(t.networkMode) ? "fetching" : "paused",
294
294
  ...e === void 0 && {
295
295
  error: null,
296
296
  status: "pending"
@@ -299,9 +299,9 @@ function it(e, t) {
299
299
  }
300
300
  //#endregion
301
301
  //#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
302
- var at = class extends Fe {
302
+ var rt = class extends Le {
303
303
  constructor(e, t) {
304
- super(), this.options = t, this.#e = e, this.#s = null, this.#o = Qe(), this.bindMethods(), this.setOptions(t);
304
+ super(), this.options = t, this.#e = e, this.#s = null, this.#o = Ze(), this.bindMethods(), this.setOptions(t);
305
305
  }
306
306
  #e;
307
307
  #t = void 0;
@@ -322,36 +322,36 @@ var at = class extends Fe {
322
322
  this.refetch = this.refetch.bind(this);
323
323
  }
324
324
  onSubscribe() {
325
- this.listeners.size === 1 && (this.#t.addObserver(this), ot(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
325
+ this.listeners.size === 1 && (this.#t.addObserver(this), at(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
326
326
  }
327
327
  onUnsubscribe() {
328
328
  this.hasListeners() || this.destroy();
329
329
  }
330
330
  shouldFetchOnReconnect() {
331
- return st(this.#t, this.options, this.options.refetchOnReconnect);
331
+ return ot(this.#t, this.options, this.options.refetchOnReconnect);
332
332
  }
333
333
  shouldFetchOnWindowFocus() {
334
- return st(this.#t, this.options, this.options.refetchOnWindowFocus);
334
+ return ot(this.#t, this.options, this.options.refetchOnWindowFocus);
335
335
  }
336
336
  destroy() {
337
337
  this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
338
338
  }
339
339
  setOptions(e) {
340
340
  let t = this.options, n = this.#t;
341
- if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof U(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
342
- this.#S(), this.#t.setOptions(this.options), t._defaulted && !qe(this.options, t) && this.#e.getQueryCache().notify({
341
+ if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof W(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
342
+ this.#S(), this.#t.setOptions(this.options), t._defaulted && !G(this.options, t) && this.#e.getQueryCache().notify({
343
343
  type: "observerOptionsUpdated",
344
344
  query: this.#t,
345
345
  observer: this
346
346
  });
347
347
  let r = this.hasListeners();
348
- r && ct(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || U(this.options.enabled, this.#t) !== U(t.enabled, this.#t) || We(this.options.staleTime, this.#t) !== We(t.staleTime, this.#t)) && this.#g();
348
+ r && st(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || U(this.options.staleTime, this.#t) !== U(t.staleTime, this.#t)) && this.#g();
349
349
  let i = this.#_();
350
- r && (this.#t !== n || U(this.options.enabled, this.#t) !== U(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
350
+ r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
351
351
  }
352
352
  getOptimisticResult(e) {
353
353
  let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
354
- return J(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
354
+ return Y(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
355
355
  }
356
356
  getCurrentResult() {
357
357
  return this.#r;
@@ -381,14 +381,14 @@ var at = class extends Fe {
381
381
  #h(e) {
382
382
  this.#S();
383
383
  let t = this.#t.fetch(this.options, e);
384
- return e?.throwOnError || (t = t.catch(Ve)), t;
384
+ return e?.throwOnError || (t = t.catch(H)), t;
385
385
  }
386
386
  #g() {
387
387
  this.#b();
388
- let e = We(this.options.staleTime, this.#t);
389
- if (Ze.isServer() || this.#r.isStale || !He(e)) return;
388
+ let e = U(this.options.staleTime, this.#t);
389
+ if (q.isServer() || this.#r.isStale || !He(e)) return;
390
390
  let t = Ue(this.#r.dataUpdatedAt, e) + 1;
391
- this.#d = Re.setTimeout(() => {
391
+ this.#d = V.setTimeout(() => {
392
392
  this.#r.isStale || this.updateResult();
393
393
  }, t);
394
394
  }
@@ -396,26 +396,26 @@ var at = class extends Fe {
396
396
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
397
397
  }
398
398
  #v(e) {
399
- this.#x(), this.#p = e, !(Ze.isServer() || U(this.options.enabled, this.#t) === !1 || !He(this.#p) || this.#p === 0) && (this.#f = Re.setInterval(() => {
400
- (this.options.refetchIntervalInBackground || Ie.isFocused()) && this.#h();
399
+ this.#x(), this.#p = e, !(q.isServer() || W(this.options.enabled, this.#t) === !1 || !He(this.#p) || this.#p === 0) && (this.#f = V.setInterval(() => {
400
+ (this.options.refetchIntervalInBackground || Re.isFocused()) && this.#h();
401
401
  }, this.#p));
402
402
  }
403
403
  #y() {
404
404
  this.#g(), this.#v(this.#_());
405
405
  }
406
406
  #b() {
407
- this.#d !== void 0 && (Re.clearTimeout(this.#d), this.#d = void 0);
407
+ this.#d !== void 0 && (V.clearTimeout(this.#d), this.#d = void 0);
408
408
  }
409
409
  #x() {
410
- this.#f !== void 0 && (Re.clearInterval(this.#f), this.#f = void 0);
410
+ this.#f !== void 0 && (V.clearInterval(this.#f), this.#f = void 0);
411
411
  }
412
412
  createResult(e, t) {
413
413
  let n = this.#t, r = this.options, i = this.#r, a = this.#i, o = this.#a, s = e === n ? this.#n : e.state, { state: c } = e, l = { ...c }, u = !1, d;
414
414
  if (t._optimisticResults) {
415
- let i = this.hasListeners(), a = !i && ot(e, t), o = i && ct(e, n, t, r);
415
+ let i = this.hasListeners(), a = !i && at(e, t), o = i && st(e, n, t, r);
416
416
  (a || o) && (l = {
417
417
  ...l,
418
- ...it(c.data, e.options)
418
+ ...nt(c.data, e.options)
419
419
  }), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
420
420
  }
421
421
  let { error: f, errorUpdatedAt: p, status: m } = l;
@@ -423,11 +423,11 @@ var at = class extends Fe {
423
423
  let h = !1;
424
424
  if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
425
425
  let e;
426
- i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d = G(i?.data, e, t), u = !0);
426
+ i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d = Xe(i?.data, e, t), u = !0);
427
427
  }
428
428
  if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
429
429
  else try {
430
- this.#c = t.select, d = t.select(d), d = G(i?.data, d, t), this.#l = d, this.#s = null;
430
+ this.#c = t.select, d = t.select(d), d = Xe(i?.data, d, t), this.#l = d, this.#s = null;
431
431
  } catch (e) {
432
432
  this.#s = e;
433
433
  }
@@ -455,16 +455,16 @@ var at = class extends Fe {
455
455
  isPaused: l.fetchStatus === "paused",
456
456
  isPlaceholderData: u,
457
457
  isRefetchError: v && b,
458
- isStale: lt(e, t),
458
+ isStale: ct(e, t),
459
459
  refetch: this.refetch,
460
460
  promise: this.#o,
461
- isEnabled: U(t.enabled, e) !== !1
461
+ isEnabled: W(t.enabled, e) !== !1
462
462
  };
463
463
  if (this.options.experimental_prefetchInRender) {
464
464
  let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
465
465
  r ? e.reject(x.error) : t && e.resolve(x.data);
466
466
  }, a = () => {
467
- let e = this.#o = x.promise = Qe();
467
+ let e = this.#o = x.promise = Ze();
468
468
  i(e);
469
469
  }, o = this.#o;
470
470
  switch (o.status) {
@@ -483,7 +483,7 @@ var at = class extends Fe {
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), !qe(t, e) && (this.#r = t, this.#C({ listeners: (() => {
486
+ this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !G(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 at = class extends Fe {
504
504
  this.updateResult(), this.hasListeners() && this.#y();
505
505
  }
506
506
  #C(e) {
507
- tt.batch(() => {
507
+ J.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 at = class extends Fe {
514
514
  });
515
515
  }
516
516
  };
517
- function q(e, t) {
518
- return U(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && U(t.retryOnMount, e) === !1);
517
+ function it(e, t) {
518
+ return W(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && W(t.retryOnMount, e) === !1);
519
519
  }
520
- function ot(e, t) {
521
- return q(e, t) || e.state.data !== void 0 && st(e, t, t.refetchOnMount);
520
+ function at(e, t) {
521
+ return it(e, t) || e.state.data !== void 0 && ot(e, t, t.refetchOnMount);
522
522
  }
523
- function st(e, t, n) {
524
- if (U(t.enabled, e) !== !1 && We(t.staleTime, e) !== "static") {
523
+ function ot(e, t, n) {
524
+ if (W(t.enabled, e) !== !1 && U(t.staleTime, e) !== "static") {
525
525
  let r = typeof n == "function" ? n(e) : n;
526
- return r === "always" || r !== !1 && lt(e, t);
526
+ return r === "always" || r !== !1 && ct(e, t);
527
527
  }
528
528
  return !1;
529
529
  }
530
- function ct(e, t, n, r) {
531
- return (e !== t || U(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && lt(e, n);
530
+ function st(e, t, n, r) {
531
+ return (e !== t || W(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ct(e, n);
532
532
  }
533
- function lt(e, t) {
534
- return U(t.enabled, e) !== !1 && e.isStaleByTime(We(t.staleTime, e));
533
+ function ct(e, t) {
534
+ return W(t.enabled, e) !== !1 && e.isStaleByTime(U(t.staleTime, e));
535
535
  }
536
- function J(e, t) {
537
- return !qe(e.getCurrentResult(), t);
536
+ function Y(e, t) {
537
+ return !G(e.getCurrentResult(), t);
538
538
  }
539
539
  //#endregion
540
540
  //#region node_modules/@tanstack/query-core/build/modern/mutation.js
541
- function ut() {
541
+ function lt() {
542
542
  return {
543
543
  context: void 0,
544
544
  data: void 0,
@@ -553,7 +553,7 @@ function ut() {
553
553
  }
554
554
  //#endregion
555
555
  //#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
556
- var Y = class extends Fe {
556
+ var ut = class extends Le {
557
557
  #e;
558
558
  #t = void 0;
559
559
  #n;
@@ -566,11 +566,11 @@ var Y = class extends Fe {
566
566
  }
567
567
  setOptions(e) {
568
568
  let t = this.options;
569
- this.options = this.#e.defaultMutationOptions(e), qe(this.options, t) || this.#e.getMutationCache().notify({
569
+ this.options = this.#e.defaultMutationOptions(e), G(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 && Ge(t.mutationKey) !== Ge(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
573
+ }), t?.mutationKey && this.options.mutationKey && We(t.mutationKey) !== We(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 Y = class extends Fe {
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 ?? ut();
591
+ let e = this.#n?.state ?? lt();
592
592
  this.#t = {
593
593
  ...e,
594
594
  isPending: e.status === "pending",
@@ -600,7 +600,7 @@ var Y = class extends Fe {
600
600
  };
601
601
  }
602
602
  #a(e) {
603
- tt.batch(() => {
603
+ J.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,
@@ -689,7 +689,7 @@ function Et(t, n, r) {
689
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] = e.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
691
691
  if (e.useSyncExternalStore(e.useCallback((e) => {
692
- let t = p ? d.subscribe(tt.batchCalls(e)) : Ve;
692
+ let t = p ? d.subscribe(J.batchCalls(e)) : H;
693
693
  return d.updateResult(), t;
694
694
  }, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), e.useEffect(() => {
695
695
  d.setOptions(s);
@@ -701,24 +701,24 @@ function Et(t, n, r) {
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 && !Ze.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(Ve).finally(() => {
704
+ return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !q.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(H).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
710
  function Dt(e, t) {
711
- return Et(e, at, t);
711
+ return Et(e, rt, t);
712
712
  }
713
713
  //#endregion
714
714
  //#region node_modules/@tanstack/react-query/build/modern/useMutation.js
715
715
  function Ot(t, n) {
716
- let r = ft(n), [i] = e.useState(() => new Y(r, t));
716
+ let r = ft(n), [i] = e.useState(() => new ut(r, t));
717
717
  e.useEffect(() => {
718
718
  i.setOptions(t);
719
719
  }, [i, t]);
720
- let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(tt.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
721
- i.mutate(e, t).catch(Ve);
720
+ let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(J.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
721
+ i.mutate(e, t).catch(H);
722
722
  }, [i]);
723
723
  if (a.error && K(i.options.throwOnError, [a.error])) throw a.error;
724
724
  return {
@@ -899,7 +899,7 @@ function nn(e, t) {
899
899
  return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
900
900
  }
901
901
  function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error: o, onPersist: c, onClose: l }) {
902
- let [u, h] = d(0), [g, v] = d(!1), b = ve({
902
+ let [u, h] = d(0), [g, v] = d(!1), b = be({
903
903
  mode: "uncontrolled",
904
904
  initialValues: Xt(e),
905
905
  validate: Zt(e)
@@ -924,7 +924,7 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
924
924
  required: n,
925
925
  ...r
926
926
  }, b.key(e.id));
927
- case "date": return /* @__PURE__ */ p(_e, {
927
+ case "date": return /* @__PURE__ */ p(ye, {
928
928
  valueFormat: "DD.MM.YYYY",
929
929
  clearable: !0,
930
930
  label: e.column.title,
@@ -938,7 +938,7 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
938
938
  required: n,
939
939
  ...b.getInputProps(e.id, { type: "checkbox" })
940
940
  }, b.key(e.id));
941
- case "textarea": return /* @__PURE__ */ p(de, {
941
+ case "textarea": return /* @__PURE__ */ p(fe, {
942
942
  minRows: 3,
943
943
  autosize: !0,
944
944
  label: e.column.title,
@@ -953,7 +953,7 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
953
953
  error: r.error,
954
954
  required: n
955
955
  });
956
- default: return /* @__PURE__ */ p(ue, {
956
+ default: return /* @__PURE__ */ p(de, {
957
957
  type: e.id.includes("email") ? "email" : void 0,
958
958
  label: e.column.title,
959
959
  placeholder: e.placeholder ?? "",
@@ -981,10 +981,10 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
981
981
  }
982
982
  E && !D ? h((e) => e + 1) : (b.setInitialValues(t), b.reset(), l());
983
983
  }),
984
- children: [E ? /* @__PURE__ */ p(ie, {
984
+ children: [E ? /* @__PURE__ */ p(ae, {
985
985
  active: u,
986
986
  size: "sm",
987
- children: w.map((e) => /* @__PURE__ */ p(ie.Step, {
987
+ children: w.map((e) => /* @__PURE__ */ p(ae.Step, {
988
988
  ...t?.[e - 1] ? { label: t[e - 1].label } : {},
989
989
  children: k(e)
990
990
  }, e))
@@ -1044,7 +1044,7 @@ function X() {
1044
1044
  //#endregion
1045
1045
  //#region node_modules/mantine-datatable/dist/index.mjs
1046
1046
  function Z(e, t, n) {
1047
- return e ? me({
1047
+ return e ? he({
1048
1048
  color: typeof e == "object" ? e[n] : e,
1049
1049
  theme: t
1050
1050
  }).value : void 0;
@@ -1081,7 +1081,7 @@ function ln({ theme: e, color: t, backgroundColor: n }) {
1081
1081
  "--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
1082
1082
  };
1083
1083
  }
1084
- var [un, dn] = pe("useDataTableColumnsContext must be used within DataTableColumnProvider"), fn = (e) => {
1084
+ var [un, dn] = me("useDataTableColumnsContext must be used within DataTableColumnProvider"), fn = (e) => {
1085
1085
  let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth: f, setMultipleColumnWidths: m, resetColumnsWidth: h, beginResize: g, endResize: _, pinnedMap: v } = e, [y, b] = d(""), [x, S] = d("");
1086
1086
  return p(un, {
1087
1087
  value: {
@@ -1151,7 +1151,7 @@ function hn({ icon: e, text: t, active: n, children: r }) {
1151
1151
  children: r || m(f, { children: [e || p("div", {
1152
1152
  className: "mantine-datatable-empty-state-icon",
1153
1153
  children: p(mn, {})
1154
- }), p(V, {
1154
+ }), p(B, {
1155
1155
  component: "div",
1156
1156
  size: "sm",
1157
1157
  c: "dimmed",
@@ -1207,7 +1207,7 @@ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1207
1207
  defaultPinned: e.pinned,
1208
1208
  pinnable: !!e.pinnable,
1209
1209
  pinned: e.pinned
1210
- })), [t]), [i, a] = je({
1210
+ })), [t]), [i, a] = Ne({
1211
1211
  key: e ? `${e}-columns-pinning` : "",
1212
1212
  defaultValue: e ? r : void 0,
1213
1213
  getInitialValueInEffect: n
@@ -1255,7 +1255,7 @@ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1255
1255
  };
1256
1256
  }
1257
1257
  function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1258
- let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = je({
1258
+ let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = Ne({
1259
1259
  key: e ? `${e}-columns-order` : "",
1260
1260
  defaultValue: e ? r : void 0,
1261
1261
  getInitialValueInEffect: n
@@ -1298,7 +1298,7 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1298
1298
  };
1299
1299
  }
1300
1300
  function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1301
- let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = je({
1301
+ let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = Ne({
1302
1302
  key: e ? `${e}-columns-width` : "",
1303
1303
  defaultValue: e ? o() : void 0,
1304
1304
  getInitialValueInEffect: n
@@ -1392,7 +1392,7 @@ function An({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1392
1392
  defaultToggle: e.defaultToggle || !0,
1393
1393
  toggleable: e.toggleable,
1394
1394
  toggled: e.defaultToggle === void 0 || e.defaultToggle
1395
- })), [t]), [i, a] = je({
1395
+ })), [t]), [i, a] = Ne({
1396
1396
  key: e ? `${e}-columns-toggle` : "",
1397
1397
  defaultValue: e ? r : void 0,
1398
1398
  getInitialValueInEffect: n
@@ -1599,7 +1599,7 @@ function Bn({ scrollCallbacks: e, withRowBorders: t }) {
1599
1599
  $(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), $(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
1600
1600
  }
1601
1601
  function c() {
1602
- f.current.withRowBorders && t.height < n.height ? $(r.current, Ln, `${H("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Ln, "unset");
1602
+ f.current.withRowBorders && t.height < n.height ? $(r.current, Ln, `${ge("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Ln, "unset");
1603
1603
  }
1604
1604
  h.current = c;
1605
1605
  function l() {
@@ -1760,12 +1760,12 @@ function Gn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0
1760
1760
  }, [e]), r;
1761
1761
  }
1762
1762
  function Kn(e) {
1763
- let t = ge();
1763
+ let t = ve();
1764
1764
  return Gn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1765
1765
  }
1766
1766
  function qn(e) {
1767
- let t = ge();
1768
- return Me((typeof e == "function" ? e(t) : e) || "", !0);
1767
+ let t = ve();
1768
+ return Pe((typeof e == "function" ? e(t) : e) || "", !0);
1769
1769
  }
1770
1770
  function Jn({ rowExpansion: e, records: t, idAccessor: n }) {
1771
1771
  let r = [];
@@ -1803,7 +1803,7 @@ function Jn({ rowExpansion: e, records: t, idAccessor: n }) {
1803
1803
  }
1804
1804
  }
1805
1805
  function Yn(e, t) {
1806
- let [n, r] = d(e), [i, a] = d(e), o = Pe(() => r(!0), 0), c = Pe(() => a(!1), t || 200);
1806
+ let [n, r] = d(e), [i, a] = d(e), o = Ie(() => r(!0), 0), c = Ie(() => a(!1), t || 200);
1807
1807
  return s(() => {
1808
1808
  e ? (c.clear(), a(!0), o.start()) : (o.clear(), r(!1), c.start());
1809
1809
  }, [
@@ -1817,7 +1817,7 @@ function Yn(e, t) {
1817
1817
  }
1818
1818
  var Xn = "mantine-datatable-nowrap", Zn = "mantine-datatable-ellipsis", Qn = "mantine-datatable-pointer-cursor", $n = "mantine-datatable-context-menu-cursor", er = "mantine-datatable-text-selection-disabled", tr = "mantine-datatable-text-align-left", nr = "mantine-datatable-text-align-center", rr = "mantine-datatable-text-align-right";
1819
1819
  function ir({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1820
- return qn(r) ? p(oe, {
1820
+ return qn(r) ? p(ce, {
1821
1821
  "data-pinned": n?.position,
1822
1822
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
1823
1823
  className: X({
@@ -1844,17 +1844,17 @@ function ir({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
1844
1844
  }) : null;
1845
1845
  }
1846
1846
  function ar({ shadowVisible: e }) {
1847
- return p(oe, {
1847
+ return p(ce, {
1848
1848
  className: "mantine-datatable-footer-selector-placeholder-cell",
1849
1849
  "data-shadow-visible": e || void 0
1850
1850
  });
1851
1851
  }
1852
1852
  function or({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1853
- return p(ae, {
1853
+ return p(se, {
1854
1854
  ref: s,
1855
1855
  className: X("mantine-datatable-footer", e),
1856
1856
  style: t,
1857
- children: m(ce, { children: [a && p(ar, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1857
+ children: m(z, { children: [a && p(ar, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1858
1858
  if (e) return null;
1859
1859
  let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
1860
1860
  ...r,
@@ -1893,7 +1893,7 @@ function sr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1893
1893
  n,
1894
1894
  _
1895
1895
  ]), y = l(() => d.reduce((e, t) => e + wn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = En(f, y + v < h, m);
1896
- return v > 0 ? p(oe, {
1896
+ return v > 0 ? p(ce, {
1897
1897
  colSpan: v,
1898
1898
  rowSpan: b > 1 ? b : void 0,
1899
1899
  "data-pinned": s?.position,
@@ -1951,7 +1951,7 @@ function lr() {
1951
1951
  });
1952
1952
  }
1953
1953
  function ur({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1954
- let [i, { close: a, toggle: o }] = Ae(!1), s = t ? lr : cr, c = ke(a);
1954
+ let [i, { close: a, toggle: o }] = Me(!1), s = t ? lr : cr, c = je(a);
1955
1955
  return r && (c = void 0), m(F, {
1956
1956
  withArrow: !0,
1957
1957
  shadow: "md",
@@ -2136,7 +2136,7 @@ var gr = 50, _r = (e) => {
2136
2136
  let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
2137
2137
  current: 0,
2138
2138
  next: 0
2139
- }), { dir: c } = he(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = dn(), g = a((e) => {
2139
+ }), { dir: c } = _e(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = dn(), g = a((e) => {
2140
2140
  if (e.preventDefault(), e.stopPropagation(), !n.current) return;
2141
2141
  let r = n.current, a = r.nextElementSibling;
2142
2142
  for (; a;) {
@@ -2274,34 +2274,34 @@ function br() {
2274
2274
  function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: f, sortIcons: h, textAlign: _, width: y, sortStatus: x, onSortStatusChange: S, filter: C, filterPopoverProps: E, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
2275
2275
  let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: ee, setColumnsPinning: F } = dn(), [te, I] = d(!1), L = u(null), ne = ee?.find((e) => e.accessor === r)?.pinned;
2276
2276
  if (!qn(i)) return null;
2277
- let R = a ?? gn(r), re = typeof R == "string" ? R : void 0, ie = o && S ? (e) => {
2277
+ let re = a ?? gn(r), ie = typeof re == "string" ? re : void 0, ae = o && S ? (e) => {
2278
2278
  e?.defaultPrevented || S({
2279
2279
  sortKey: k,
2280
2280
  columnAccessor: r,
2281
2281
  direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
2282
2282
  });
2283
- } : void 0, z = (e) => {
2283
+ } : void 0, oe = (e) => {
2284
2284
  e.stopPropagation(), A(r), I(!1);
2285
- }, B = (e) => {
2285
+ }, R = (e) => {
2286
2286
  e.preventDefault(), j(r), I(!0);
2287
- }, ae = () => {
2288
- j(r), I(!1), M();
2289
2287
  }, se = () => {
2288
+ j(r), I(!1), M();
2289
+ }, le = () => {
2290
2290
  I(!0);
2291
- }, ce = () => {
2291
+ }, z = () => {
2292
2292
  I(!1);
2293
- }, le = (e) => {
2293
+ }, ue = (e) => {
2294
2294
  e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
2295
2295
  ...e,
2296
2296
  toggled: !1
2297
2297
  } : e));
2298
- }, V = (e) => {
2298
+ }, B = (e) => {
2299
2299
  F((t) => t.map((t) => t.accessor === r ? {
2300
2300
  ...t,
2301
2301
  pinned: e
2302
2302
  } : t));
2303
2303
  };
2304
- return m(oe, {
2304
+ return m(ce, {
2305
2305
  "data-accessor": r,
2306
2306
  "data-pinned": n?.position,
2307
2307
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
@@ -2328,8 +2328,8 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2328
2328
  ],
2329
2329
  role: o ? "button" : void 0,
2330
2330
  tabIndex: o ? 0 : void 0,
2331
- onClick: ie,
2332
- onKeyDown: (e) => e.key === "Enter" && ie?.(),
2331
+ onClick: ae,
2332
+ onKeyDown: (e) => e.key === "Enter" && ae?.(),
2333
2333
  ref: L,
2334
2334
  children: [m(T, {
2335
2335
  className: "mantine-datatable-header-cell-sortable-group",
@@ -2344,11 +2344,11 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2344
2344
  "mantine-datatable-header-cell-drag-over": te
2345
2345
  }),
2346
2346
  draggable: s,
2347
- onDragStart: s ? z : void 0,
2348
- onDragEnter: s ? se : void 0,
2349
- onDragOver: s ? B : void 0,
2350
- onDrop: s ? ae : void 0,
2351
- onDragLeave: s ? ce : void 0,
2347
+ onDragStart: s ? oe : void 0,
2348
+ onDragEnter: s ? le : void 0,
2349
+ onDragOver: s ? R : void 0,
2350
+ onDrop: s ? se : void 0,
2351
+ onDragLeave: s ? z : void 0,
2352
2352
  children: [s ? p(b, {
2353
2353
  role: "img",
2354
2354
  "aria-label": "Drag column",
@@ -2367,13 +2367,13 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2367
2367
  [nr]: _ === "center",
2368
2368
  [rr]: _ === "right"
2369
2369
  }, Xn, Zn),
2370
- title: re,
2371
- children: R
2370
+ title: ie,
2371
+ children: re
2372
2372
  })]
2373
2373
  }),
2374
2374
  l ? p(hr, {
2375
2375
  currentPinned: ne,
2376
- onPinChange: V
2376
+ onPinChange: B
2377
2377
  }) : null,
2378
2378
  c ? p(b, {
2379
2379
  className: "mantine-datatable-header-cell-toggleable-icon",
@@ -2382,7 +2382,7 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2382
2382
  children: p(g, {
2383
2383
  size: "xs",
2384
2384
  variant: "light",
2385
- onClick: le,
2385
+ onClick: ue,
2386
2386
  children: p(mr, {})
2387
2387
  })
2388
2388
  }) : null,
@@ -2412,7 +2412,7 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2412
2412
  }
2413
2413
  function Sr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
2414
2414
  let u = !o.disabled;
2415
- return p(oe, {
2415
+ return p(ce, {
2416
2416
  ref: l,
2417
2417
  className: X("mantine-datatable-header-selector-cell", { [Qn]: n === "cell" && u }, e),
2418
2418
  style: t,
@@ -2455,7 +2455,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2455
2455
  checkboxProps: v,
2456
2456
  onChange: _,
2457
2457
  rowSpan: c ? D : void 0
2458
- }) : null, { columnsToggle: k, setColumnsToggle: A } = dn(), [j, M] = d(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? gn(String(e))])) : void 0, ee = m(se, {
2458
+ }) : null, { columnsToggle: k, setColumnsToggle: A } = dn(), [j, M] = d(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? gn(String(e))])) : void 0, ee = m(le, {
2459
2459
  className: X("mantine-datatable-header", t),
2460
2460
  style: n,
2461
2461
  ref: w,
@@ -2464,7 +2464,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2464
2464
  } : void 0,
2465
2465
  children: [c && Array.from({ length: E }, (e, t) => {
2466
2466
  let n = Tn(c, t);
2467
- return m(ce, { children: [t === 0 && O, n.map((e, r) => p(sr, {
2467
+ return m(z, { children: [t === 0 && O, n.map((e, r) => p(sr, {
2468
2468
  group: e,
2469
2469
  pinnedInfo: Cr(e, l),
2470
2470
  maxDepth: E,
@@ -2474,7 +2474,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2474
2474
  withColumnBorders: C,
2475
2475
  totalTableColumns: o.length
2476
2476
  }, e.id))] }, `group-depth-${t}`);
2477
- }), m(ce, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2477
+ }), m(z, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2478
2478
  if (e) return null;
2479
2479
  let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title: m, sortable: h, draggable: g, toggleable: _, pinnable: v, resizable: y, titleClassName: b, titleStyle: x, filter: S, filterPopoverProps: C, filterPopoverDisableClickOutside: w, filtering: T, sortKey: E } = {
2480
2480
  ...s,
@@ -2511,7 +2511,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2511
2511
  shadow: "md",
2512
2512
  opened: j,
2513
2513
  onChange: M,
2514
- children: [p(I, { children: ee }), p(te, { children: p(re, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2514
+ children: [p(I, { children: ee }), p(te, { children: p(ie, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2515
2515
  classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
2516
2516
  size: "xs",
2517
2517
  label: P[e.accessor],
@@ -2558,16 +2558,16 @@ function Er() {
2558
2558
  });
2559
2559
  }
2560
2560
  var Dr = {
2561
- xs: H(22),
2562
- sm: H(26),
2563
- md: H(32),
2564
- lg: H(38),
2565
- xl: H(44)
2561
+ xs: ge(22),
2562
+ sm: ge(26),
2563
+ md: ge(32),
2564
+ lg: ge(38),
2565
+ xl: ge(44)
2566
2566
  };
2567
2567
  function Or({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2568
2568
  return m(T, {
2569
2569
  gap: "xs",
2570
- children: [p(V, {
2570
+ children: [p(B, {
2571
2571
  component: "div",
2572
2572
  size: e,
2573
2573
  children: t
@@ -2598,7 +2598,7 @@ function Or({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2598
2598
  }) : void 0],
2599
2599
  disabled: n,
2600
2600
  onClick: () => o(t),
2601
- children: p(V, {
2601
+ children: p(B, {
2602
2602
  component: "div",
2603
2603
  size: e,
2604
2604
  children: t
@@ -2618,8 +2618,8 @@ function kr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2618
2618
  totalRecords: g
2619
2619
  });
2620
2620
  } else O = n ? u : d;
2621
- let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !qn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${H(w)}rem` : e[w] || w})`), N = {
2622
- Text: (e) => p(V, {
2621
+ 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" ? `${ge(w)}rem` : e[w] || w})`), N = {
2622
+ Text: (e) => p(B, {
2623
2623
  component: "div",
2624
2624
  className: "mantine-datatable-pagination-text",
2625
2625
  size: l,
@@ -2688,7 +2688,7 @@ function kr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2688
2688
  });
2689
2689
  }
2690
2690
  function Ar({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, record: i, index: a, onClick: o, onDoubleClick: s, onContextMenu: c, noWrap: l, ellipsis: u, textAlign: d, width: f, accessor: m, render: h, defaultRender: g, customCellAttributes: _ }) {
2691
- return qn(r) ? p(B, {
2691
+ return qn(r) ? p(R, {
2692
2692
  "data-pinned": n?.position,
2693
2693
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
2694
2694
  className: X({
@@ -2722,7 +2722,7 @@ function Ar({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
2722
2722
  }
2723
2723
  function jr({ open: e, colSpan: t, content: n, collapseProps: r }) {
2724
2724
  let { expanded: i, visible: a } = Yn(e, r?.transitionDuration);
2725
- return a ? m(f, { children: [p(ce, {}), p(ce, { children: p(B, {
2725
+ return a ? m(f, { children: [p(z, {}), p(z, { children: p(R, {
2726
2726
  className: "mantine-datatable-row-expansion-cell",
2727
2727
  colSpan: t,
2728
2728
  children: p(S, {
@@ -2742,7 +2742,7 @@ function Mr({ className: e, style: t, record: n, index: r, trigger: i, onChange:
2742
2742
  }, d = !l.disabled && !u.disabled, f = (e) => {
2743
2743
  e.stopPropagation(), i === "cell" && d && a?.(e);
2744
2744
  };
2745
- return p(B, {
2745
+ return p(R, {
2746
2746
  className: X("mantine-datatable-row-selector-cell", { [Qn]: i === "cell" && d }, e),
2747
2747
  style: t,
2748
2748
  "data-shadow-visible": o || void 0,
@@ -2839,7 +2839,7 @@ function Nr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2839
2839
  rowProps: P,
2840
2840
  children: M,
2841
2841
  expandedElement: N
2842
- }) : m(f, { children: [p(ce, {
2842
+ }) : m(f, { children: [p(z, {
2843
2843
  ...P,
2844
2844
  children: M
2845
2845
  }), N] });
@@ -2906,30 +2906,30 @@ function Fr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
2906
2906
  ]
2907
2907
  });
2908
2908
  }
2909
- function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: _, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: ee, sortIcons: F, onSortStatusChange: te, horizontalSpacing: I, page: L, onPageChange: ne, totalRecords: R, recordsPerPage: re, onRecordsPerPageChange: ie, recordsPerPageOptions: B, recordsPerPageLabel: ae = "Records per page", paginationWithEdges: oe, paginationWithControls: se, paginationActiveTextColor: ce, paginationActiveBackgroundColor: le, paginationSize: V = "sm", paginationText: ue = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: de = "sm", getPaginationControlProps: fe = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: pe, renderPagination: me, loaderBackgroundBlur: H, customLoader: he, loaderSize: ge, loaderType: _e, loaderColor: ve, loadingText: ye = "...", emptyState: be, noRecordsText: xe = "No records", noRecordsIcon: Se, highlightOnHover: Ce, striped: we, noHeader: Te, onRowClick: Ee, onRowDoubleClick: De, onRowContextMenu: Oe, onCellClick: ke, onCellDoubleClick: Ae, onCellContextMenu: je, onScroll: Me, onScrollToTop: Pe, onScrollToBottom: Fe, onScrollToLeft: Ie, onScrollToRight: Le, c: Re, backgroundColor: ze, borderColor: Be, rowBorderColor: Ve, stripedColor: He, highlightOnHoverColor: Ue, rowColor: We, rowBackgroundColor: U, rowExpansion: Ge, rowClassName: Ke, rowStyle: W, customRowAttributes: qe, scrollViewportRef: Je, scrollAreaProps: Ye, tableRef: Xe, bodyRef: G, m: K, my: Ze, mx: Qe, mt: $e, mb: et, ml: tt, mr: nt, className: rt, classNames: it, style: at, styles: q, rowFactory: ot, tableWrapper: st, ...ct }) {
2910
- let lt = l(() => y ? Cn(y) : g, [g, y]), { refs: J, onScroll: ut } = Bn({
2909
+ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: _, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: ee, sortIcons: F, onSortStatusChange: te, horizontalSpacing: I, page: L, onPageChange: ne, totalRecords: re, recordsPerPage: ie, onRecordsPerPageChange: ae, recordsPerPageOptions: R, recordsPerPageLabel: se = "Records per page", paginationWithEdges: ce, paginationWithControls: le, paginationActiveTextColor: z, paginationActiveBackgroundColor: ue, paginationSize: B = "sm", paginationText: de = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: fe = "sm", getPaginationControlProps: pe = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: me, renderPagination: he, loaderBackgroundBlur: ge, customLoader: _e, loaderSize: ve, loaderType: ye, loaderColor: be, loadingText: xe = "...", emptyState: Se, noRecordsText: Ce = "No records", noRecordsIcon: we, highlightOnHover: Te, striped: Ee, noHeader: De, onRowClick: Oe, onRowDoubleClick: ke, onRowContextMenu: Ae, onCellClick: je, onCellDoubleClick: Me, onCellContextMenu: Ne, onScroll: Pe, onScrollToTop: Ie, onScrollToBottom: Le, onScrollToLeft: Re, onScrollToRight: ze, c: V, backgroundColor: Be, borderColor: Ve, rowBorderColor: H, stripedColor: He, highlightOnHoverColor: Ue, rowColor: U, rowBackgroundColor: W, rowExpansion: We, rowClassName: Ge, rowStyle: Ke, customRowAttributes: G, scrollViewportRef: qe, scrollAreaProps: Je, tableRef: Ye, bodyRef: Xe, m: K, my: q, mx: Ze, mt: Qe, mb: $e, ml: J, mr: et, className: tt, classNames: nt, style: rt, styles: it, rowFactory: at, tableWrapper: ot, ...st }) {
2910
+ let ct = l(() => y ? Cn(y) : g, [g, y]), { refs: Y, onScroll: lt } = Bn({
2911
2911
  scrollCallbacks: {
2912
- onScroll: Me,
2913
- onScrollToTop: Pe,
2914
- onScrollToBottom: Fe,
2915
- onScrollToLeft: Ie,
2916
- onScrollToRight: Le
2912
+ onScroll: Pe,
2913
+ onScrollToTop: Ie,
2914
+ onScrollToBottom: Le,
2915
+ onScrollToLeft: Re,
2916
+ onScrollToRight: ze
2917
2917
  },
2918
- withRowBorders: ct.withRowBorders
2919
- }), Y = jn({
2918
+ withRowBorders: st.withRowBorders
2919
+ }), ut = jn({
2920
2920
  key: _,
2921
- columns: lt,
2922
- headerRef: J.header,
2923
- scrollViewportRef: J.scrollViewport
2924
- }), dt = Y.effectiveColumns, ft = Ne(J.table, Xe), pt = Ne(J.scrollViewport, Je), mt = u(null), ht = Ne(mt, G), gt = Jn({
2925
- rowExpansion: Ge,
2921
+ columns: ct,
2922
+ headerRef: Y.header,
2923
+ scrollViewportRef: Y.scrollViewport
2924
+ }), dt = ut.effectiveColumns, ft = Fe(Y.table, Ye), pt = Fe(Y.scrollViewport, qe), mt = u(null), ht = Fe(mt, Xe), gt = Jn({
2925
+ rowExpansion: We,
2926
2926
  records: T,
2927
2927
  idAccessor: w
2928
2928
  }), { pinnedMap: _t, hasLeftPinned: vt, hasRightPinned: yt } = Vn({
2929
2929
  columns: dt,
2930
- theadRef: J.header,
2930
+ theadRef: Y.header,
2931
2931
  tbodyRef: mt,
2932
- selectionColumnHeaderRef: J.selectionColumnHeader,
2932
+ selectionColumnHeaderRef: Y.selectionColumnHeader,
2933
2933
  selectionVisible: !!D,
2934
2934
  pinFirstColumn: b,
2935
2935
  pinLastColumn: x
@@ -2942,7 +2942,7 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2942
2942
  let wt = T?.length;
2943
2943
  c(() => {
2944
2944
  if (!bt.current || h || T === St.current) return;
2945
- let e = J.scrollViewport.current;
2945
+ let e = Y.scrollViewport.current;
2946
2946
  if (!e) return;
2947
2947
  let t = requestAnimationFrame(() => {
2948
2948
  e.scrollTo({
@@ -2954,7 +2954,7 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2954
2954
  }, [
2955
2955
  h,
2956
2956
  T,
2957
- J.scrollViewport
2957
+ Y.scrollViewport
2958
2958
  ]);
2959
2959
  let Tt = T?.map((e) => Q(e, w)), Et = !!D, Dt = D?.map((e) => Q(e, w)), Ot = Tt !== void 0 && Dt !== void 0 && Dt.length > 0, kt = j ? T?.filter(j) : T, At = kt?.map((e) => Q(e, w)), jt = Ot && At.every((e) => Dt.includes(e)), Mt = Ot && At.some((e) => Dt.includes(e)), Nt = a(() => {
2960
2960
  D && O && O(jt ? D.filter((e) => !At.includes(Q(e, w))) : bn([...D, ...kt], (e) => Q(e, w)));
@@ -2967,28 +2967,28 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2967
2967
  D
2968
2968
  ]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = Hn(Tt), It = Et && !vt, Lt = {
2969
2969
  m: K,
2970
- my: Ze,
2971
- mx: Qe,
2972
- mt: $e,
2973
- mb: et,
2974
- ml: tt,
2975
- mr: nt
2976
- }, Rt = a(({ children: e }) => st ? st({ children: e }) : e, [st]);
2970
+ my: q,
2971
+ mx: Ze,
2972
+ mt: Qe,
2973
+ mb: $e,
2974
+ ml: J,
2975
+ mr: et
2976
+ }, Rt = a(({ children: e }) => ot ? ot({ children: e }) : e, [ot]);
2977
2977
  return p(fn, {
2978
- ...Y,
2978
+ ...ut,
2979
2979
  pinnedMap: _t,
2980
2980
  children: m(v, {
2981
- ref: J.root,
2981
+ ref: Y.root,
2982
2982
  ...Lt,
2983
- className: X("mantine-datatable", { "mantine-datatable-with-border": e }, rt, it?.root),
2983
+ className: X("mantine-datatable", { "mantine-datatable-with-border": e }, tt, nt?.root),
2984
2984
  style: [
2985
2985
  (e) => ({
2986
2986
  ...sn({
2987
2987
  theme: e,
2988
- c: Re,
2989
- backgroundColor: ze,
2990
- borderColor: Be,
2991
- rowBorderColor: Ve,
2988
+ c: V,
2989
+ backgroundColor: Be,
2990
+ borderColor: Ve,
2991
+ rowBorderColor: H,
2992
2992
  stripedColor: He,
2993
2993
  highlightOnHoverColor: Ue
2994
2994
  }),
@@ -2998,8 +2998,8 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2998
2998
  minHeight: i,
2999
2999
  maxHeight: o
3000
3000
  }),
3001
- at,
3002
- q?.root,
3001
+ rt,
3002
+ it?.root,
3003
3003
  { position: "relative" }
3004
3004
  ],
3005
3005
  children: [
@@ -3007,9 +3007,9 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3007
3007
  viewportRef: pt,
3008
3008
  leftShadowBehind: Et || vt,
3009
3009
  rightShadowBehind: yt,
3010
- onScrollPositionChange: ut,
3011
- scrollAreaProps: Ye,
3012
- children: p(Rt, { children: m(z, {
3010
+ onScrollPositionChange: lt,
3011
+ scrollAreaProps: Je,
3012
+ children: p(Rt, { children: m(oe, {
3013
3013
  ref: ft,
3014
3014
  horizontalSpacing: I,
3015
3015
  className: X("mantine-datatable-table", {
@@ -3017,27 +3017,27 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3017
3017
  "mantine-datatable-vertical-align-top": f === "top",
3018
3018
  "mantine-datatable-vertical-align-bottom": f === "bottom",
3019
3019
  "mantine-datatable-selection-column-visible": Et,
3020
- "mantine-datatable-resizable-columns": Y.hasResizableColumns,
3021
- "mantine-datatable-resize-locked": Y.isLocked,
3022
- "mantine-datatable-resizing": Y.isResizing
3023
- }, it?.table),
3020
+ "mantine-datatable-resizable-columns": ut.hasResizableColumns,
3021
+ "mantine-datatable-resize-locked": ut.isLocked,
3022
+ "mantine-datatable-resizing": ut.isResizing
3023
+ }, nt?.table),
3024
3024
  style: {
3025
- ...q?.table,
3026
- ...Y.isLocked ? { tableLayout: "fixed" } : null,
3027
- ...Y.tableWidth == null ? null : { width: `${Y.tableWidth}px` }
3025
+ ...it?.table,
3026
+ ...ut.isLocked ? { tableLayout: "fixed" } : null,
3027
+ ...ut.tableWidth == null ? null : { width: `${ut.tableWidth}px` }
3028
3028
  },
3029
- "data-striped": wt && we || void 0,
3030
- "data-highlight-on-hover": Ce || void 0,
3031
- ...ct,
3029
+ "data-striped": wt && Ee || void 0,
3030
+ "data-highlight-on-hover": Te || void 0,
3031
+ ...st,
3032
3032
  children: [
3033
- Te ? null : p(fn, {
3034
- ...Y,
3033
+ De ? null : p(fn, {
3034
+ ...ut,
3035
3035
  pinnedMap: _t,
3036
3036
  children: p(wr, {
3037
- ref: J.header,
3038
- selectionColumnHeaderRef: J.selectionColumnHeader,
3039
- className: it?.header,
3040
- style: q?.header,
3037
+ ref: Y.header,
3038
+ selectionColumnHeaderRef: Y.selectionColumnHeader,
3039
+ className: nt?.header,
3040
+ style: it?.header,
3041
3041
  columns: dt,
3042
3042
  defaultColumnProps: S,
3043
3043
  groups: y,
@@ -3057,7 +3057,7 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3057
3057
  selectorCellShadowVisible: It,
3058
3058
  selectionColumnClassName: k,
3059
3059
  selectionColumnStyle: A,
3060
- withColumnBorders: ct.withColumnBorders
3060
+ withColumnBorders: st.withColumnBorders
3061
3061
  })
3062
3062
  }),
3063
3063
  p("tbody", {
@@ -3084,30 +3084,30 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3084
3084
  isRecordSelectable: j,
3085
3085
  selectionCheckboxProps: M,
3086
3086
  getSelectionCheckboxProps: P,
3087
- onClick: Ee,
3088
- onDoubleClick: De,
3089
- onCellClick: ke,
3090
- onCellDoubleClick: Ae,
3091
- onContextMenu: Oe,
3092
- onCellContextMenu: je,
3087
+ onClick: Oe,
3088
+ onDoubleClick: ke,
3089
+ onCellClick: je,
3090
+ onCellDoubleClick: Me,
3091
+ onContextMenu: Ae,
3092
+ onCellContextMenu: Ne,
3093
3093
  expansion: gt,
3094
- color: We,
3095
- backgroundColor: U,
3096
- className: Ke,
3097
- style: W,
3098
- customAttributes: qe,
3094
+ color: U,
3095
+ backgroundColor: W,
3096
+ className: Ge,
3097
+ style: Ke,
3098
+ customAttributes: G,
3099
3099
  selectorCellShadowVisible: It,
3100
3100
  selectionColumnClassName: k,
3101
3101
  selectionColumnStyle: A,
3102
3102
  idAccessor: w,
3103
- rowFactory: ot
3103
+ rowFactory: at
3104
3104
  }, n);
3105
3105
  }) : p(pn, {})
3106
3106
  }),
3107
3107
  dt.some(({ footer: e }) => e) && p(or, {
3108
- ref: J.footer,
3109
- className: it?.footer,
3110
- style: q?.footer,
3108
+ ref: Y.footer,
3109
+ className: nt?.footer,
3110
+ style: it?.footer,
3111
3111
  columns: dt,
3112
3112
  defaultColumnProps: S,
3113
3113
  pinnedMap: _t,
@@ -3118,44 +3118,44 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3118
3118
  }) })
3119
3119
  }),
3120
3120
  !!(L && wt) && p(kr, {
3121
- className: it?.pagination,
3122
- style: q?.pagination,
3121
+ className: nt?.pagination,
3122
+ style: it?.pagination,
3123
3123
  horizontalSpacing: I,
3124
3124
  fetching: h,
3125
3125
  page: L,
3126
3126
  onPageChange: Ct,
3127
- totalRecords: R,
3128
- recordsPerPage: re,
3129
- onRecordsPerPageChange: ie,
3130
- recordsPerPageOptions: B,
3131
- recordsPerPageLabel: ae,
3132
- paginationWithEdges: oe,
3133
- paginationWithControls: se,
3134
- paginationActiveTextColor: ce,
3135
- paginationActiveBackgroundColor: le,
3136
- paginationSize: V,
3137
- paginationText: ue,
3138
- paginationWrapBreakpoint: de,
3139
- getPaginationControlProps: fe,
3140
- getPaginationItemProps: pe,
3141
- noRecordsText: xe,
3142
- loadingText: ye,
3127
+ totalRecords: re,
3128
+ recordsPerPage: ie,
3129
+ onRecordsPerPageChange: ae,
3130
+ recordsPerPageOptions: R,
3131
+ recordsPerPageLabel: se,
3132
+ paginationWithEdges: ce,
3133
+ paginationWithControls: le,
3134
+ paginationActiveTextColor: z,
3135
+ paginationActiveBackgroundColor: ue,
3136
+ paginationSize: B,
3137
+ paginationText: de,
3138
+ paginationWrapBreakpoint: fe,
3139
+ getPaginationControlProps: pe,
3140
+ getPaginationItemProps: me,
3141
+ noRecordsText: Ce,
3142
+ loadingText: xe,
3143
3143
  recordsLength: wt,
3144
- renderPagination: me
3144
+ renderPagination: he
3145
3145
  }),
3146
3146
  p(Tr, {
3147
3147
  fetching: h,
3148
- backgroundBlur: H,
3149
- customContent: he,
3150
- size: ge,
3151
- type: _e,
3152
- color: ve
3148
+ backgroundBlur: ge,
3149
+ customContent: _e,
3150
+ size: ve,
3151
+ type: ye,
3152
+ color: be
3153
3153
  }),
3154
3154
  p(hn, {
3155
- icon: Se,
3156
- text: xe,
3155
+ icon: we,
3156
+ text: Ce,
3157
3157
  active: !h && !wt,
3158
- children: be
3158
+ children: Se
3159
3159
  })
3160
3160
  ]
3161
3161
  })
@@ -3165,18 +3165,18 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3165
3165
  //#region src/DataTable/UpdateModal.tsx
3166
3166
  function Lr({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
3167
3167
  let { data: s, isLoading: c } = Ut(i, n, a), { mutateAsync: l, isPending: u, error: d } = qt(i, n, r);
3168
- return c || !s ? /* @__PURE__ */ m(re, {
3168
+ return c || !s ? /* @__PURE__ */ m(ie, {
3169
3169
  gap: "md",
3170
3170
  children: [
3171
- /* @__PURE__ */ p(R, { height: 40 }),
3172
- Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, t)),
3171
+ /* @__PURE__ */ p(re, { height: 40 }),
3172
+ Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(re, { height: 35 }, t)),
3173
3173
  /* @__PURE__ */ m(T, {
3174
3174
  mt: "md",
3175
3175
  justify: "end",
3176
- children: [/* @__PURE__ */ p(R, {
3176
+ children: [/* @__PURE__ */ p(re, {
3177
3177
  width: 100,
3178
3178
  height: 36
3179
- }), /* @__PURE__ */ p(R, {
3179
+ }), /* @__PURE__ */ p(re, {
3180
3180
  width: 100,
3181
3181
  height: 36
3182
3182
  })]
@@ -3211,7 +3211,7 @@ function Rr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
3211
3211
  title: l.name,
3212
3212
  children: l.message
3213
3213
  }),
3214
- /* @__PURE__ */ p(V, { children: a ? a(h) : h.length === 1 ? `Soll ${h.length} Eintrag wirklich gelöscht werden?` : `Sollen ${h.length} Einträge wirklich gelöscht werden?` }),
3214
+ /* @__PURE__ */ p(B, { children: a ? a(h) : h.length === 1 ? `Soll ${h.length} Eintrag wirklich gelöscht werden?` : `Sollen ${h.length} Einträge wirklich gelöscht werden?` }),
3215
3215
  /* @__PURE__ */ m(T, {
3216
3216
  mt: "md",
3217
3217
  justify: "end",
@@ -3361,7 +3361,7 @@ function Xr({ rows: e }) {
3361
3361
  gap: "md",
3362
3362
  py: "xs",
3363
3363
  px: "sm",
3364
- children: [/* @__PURE__ */ p(V, {
3364
+ children: [/* @__PURE__ */ p(B, {
3365
3365
  fw: 700,
3366
3366
  fz: "sm",
3367
3367
  style: { flexShrink: 0 },
@@ -3395,13 +3395,13 @@ function $r(e, t) {
3395
3395
  let n = t.column;
3396
3396
  if (n.render) return n.render(e, 0);
3397
3397
  let r = Qr(e, n.accessor ?? t.id);
3398
- return r == null ? /* @__PURE__ */ p(V, {
3398
+ return r == null ? /* @__PURE__ */ p(B, {
3399
3399
  c: "dimmed",
3400
3400
  children: "–"
3401
- }) : typeof r == "boolean" ? /* @__PURE__ */ p(V, {
3401
+ }) : typeof r == "boolean" ? /* @__PURE__ */ p(B, {
3402
3402
  fz: "sm",
3403
3403
  children: r ? "Ja" : "Nein"
3404
- }) : /* @__PURE__ */ p(V, {
3404
+ }) : /* @__PURE__ */ p(B, {
3405
3405
  fz: "sm",
3406
3406
  children: String(r)
3407
3407
  });
@@ -3428,7 +3428,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3428
3428
  event: n
3429
3429
  });
3430
3430
  };
3431
- return /* @__PURE__ */ m(re, {
3431
+ return /* @__PURE__ */ m(ie, {
3432
3432
  gap: "sm",
3433
3433
  my: "md",
3434
3434
  children: [
@@ -3446,7 +3446,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3446
3446
  variant: "filled",
3447
3447
  size: "input-sm",
3448
3448
  onClick: () => c.onSortChange(c.field, c.direction === "asc" ? "desc" : "asc"),
3449
- children: c.direction === "asc" ? /* @__PURE__ */ p(Ee, { size: 18 }) : /* @__PURE__ */ p(De, { size: 18 })
3449
+ children: c.direction === "asc" ? /* @__PURE__ */ p(Oe, { size: 18 }) : /* @__PURE__ */ p(ke, { size: 18 })
3450
3450
  })] }), E.length > 0 && /* @__PURE__ */ m(F, {
3451
3451
  opened: M,
3452
3452
  onChange: N,
@@ -3464,7 +3464,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3464
3464
  size: "input-sm",
3465
3465
  onClick: () => N((e) => !e),
3466
3466
  "aria-label": "Filter",
3467
- children: /* @__PURE__ */ p(Se, { size: 18 })
3467
+ children: /* @__PURE__ */ p(we, { size: 18 })
3468
3468
  })
3469
3469
  }) }), /* @__PURE__ */ p(F.Dropdown, {
3470
3470
  p: 0,
@@ -3479,7 +3479,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3479
3479
  value: e.id,
3480
3480
  children: [/* @__PURE__ */ p(h.Control, { children: /* @__PURE__ */ m(T, {
3481
3481
  gap: "xs",
3482
- children: [/* @__PURE__ */ p(V, {
3482
+ children: [/* @__PURE__ */ p(B, {
3483
3483
  fw: 600,
3484
3484
  fz: "sm",
3485
3485
  children: e.column.title ?? e.id
@@ -3495,7 +3495,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3495
3495
  })]
3496
3496
  })]
3497
3497
  }),
3498
- e.length === 0 && /* @__PURE__ */ p(V, {
3498
+ e.length === 0 && /* @__PURE__ */ p(B, {
3499
3499
  c: "dimmed",
3500
3500
  ta: "center",
3501
3501
  py: "xl",
@@ -3530,7 +3530,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3530
3530
  color: "gray",
3531
3531
  size: "sm",
3532
3532
  onClick: (e) => e.stopPropagation(),
3533
- children: /* @__PURE__ */ p(xe, { size: 16 })
3533
+ children: /* @__PURE__ */ p(Ce, { size: 16 })
3534
3534
  }) }), /* @__PURE__ */ p(k.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(k.Item, {
3535
3535
  leftSection: t.icon,
3536
3536
  onClick: (n) => {
@@ -3554,7 +3554,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3554
3554
  })]
3555
3555
  }) }, s);
3556
3556
  }),
3557
- s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(re, {
3557
+ s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(ie, {
3558
3558
  gap: "xs",
3559
3559
  mt: "sm",
3560
3560
  children: [/* @__PURE__ */ p(T, {
@@ -3568,7 +3568,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3568
3568
  }), s.recordsPerPageOptions && s.onRecordsPerPageChange && /* @__PURE__ */ m(T, {
3569
3569
  justify: "center",
3570
3570
  gap: "xs",
3571
- children: [/* @__PURE__ */ p(V, {
3571
+ children: [/* @__PURE__ */ p(B, {
3572
3572
  fz: "xs",
3573
3573
  c: "dimmed",
3574
3574
  children: "Einträge pro Seite:"
@@ -3597,32 +3597,32 @@ var ti = [
3597
3597
  100,
3598
3598
  500
3599
3599
  ];
3600
- function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPath: a, mutationApiPath: o, buttons: c, fields: l, selection: h, pagination: b, filters: x, actions: S, steps: C, defaultSort: D, onSortChange: O, createButtonText: A, queryParams: j, tabs: M, defaultTab: P, activeTab: ee, onActiveTabChange: F, canUpdate: te, canDelete: I, showRefresh: L = !0, onRefresh: ne, autoPoll: ie, rowExpansion: z, onRowClick: B, mobileCards: ae = !1, deleteConfirmMessage: oe, editRecordId: se, onEditRecordIdChange: ce }) {
3601
- let [ue, de] = d(P || (M && M.length > 0 ? M[0].value : null)), pe = ee === void 0 ? ue : ee, me = (e) => {
3602
- ee === void 0 && de(e), F && F(e);
3603
- }, H = M?.find((e) => e.value === pe), he = H?.queryParams || {}, ge = H?.apiPath ?? a, _e = H?.mutationApiPath ?? o ?? ge, ve = {
3604
- ...j,
3605
- ...he
3606
- }, xe = ve ? "?" + Object.entries(ve).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", Se = pe ? [...n, pe] : n, { data: Ee, isLoading: De, isError: ke, isRefetching: Ae, refetch: je } = Wt(ge + xe, Se), Me = Yr(Array.isArray(Ee) ? Ee : [], x), [Ne, Pe] = d(!1), Fe = u(() => {});
3600
+ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPath: a, mutationApiPath: o, buttons: c, topContent: l, fields: h, selection: b, pagination: x, filters: S, actions: C, steps: D, defaultSort: O, onSortChange: A, createButtonText: j, queryParams: M, tabs: P, defaultTab: ee, activeTab: F, onActiveTabChange: te, canUpdate: I, canDelete: L, showRefresh: ne = !0, onRefresh: ae, autoPoll: oe, rowExpansion: R, onRowClick: se, mobileCards: ce = !1, deleteConfirmMessage: le, editRecordId: z, onEditRecordIdChange: de }) {
3601
+ let [fe, me] = d(ee || (P && P.length > 0 ? P[0].value : null)), he = F === void 0 ? fe : F, ge = (e) => {
3602
+ F === void 0 && me(e), te && te(e);
3603
+ }, _e = P?.find((e) => e.value === he), ve = _e?.queryParams || {}, ye = _e?.apiPath ?? a, be = _e?.mutationApiPath ?? o ?? ye, Ce = {
3604
+ ...M,
3605
+ ...ve
3606
+ }, we = Ce ? "?" + Object.entries(Ce).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", Oe = he ? [...n, he] : n, { data: ke, isLoading: je, isError: Me, isRefetching: Ne, refetch: Pe } = Wt(ye + we, Oe), Fe = Yr(Array.isArray(ke) ? ke : [], S), [Ie, Le] = d(!1), Re = u(() => {});
3607
3607
  s(() => {
3608
- Fe.current = ne ?? (() => je());
3608
+ Re.current = ae ?? (() => Pe());
3609
3609
  });
3610
- let Ie = typeof ie == "function" ? ie(Array.isArray(Ee) ? Ee : []) : ie ?? !1;
3610
+ let ze = typeof oe == "function" ? oe(Array.isArray(ke) ? ke : []) : oe ?? !1;
3611
3611
  s(() => {
3612
- if (!Ie) return;
3612
+ if (!ze) return;
3613
3613
  let e = setInterval(() => {
3614
- Promise.resolve(Fe.current()).catch(() => {});
3615
- }, Ie);
3614
+ Promise.resolve(Re.current()).catch(() => {});
3615
+ }, ze);
3616
3616
  return () => clearInterval(e);
3617
- }, [Ie]);
3618
- let [Le, Re] = d({
3619
- columnAccessor: D?.field ?? l[0].id,
3620
- direction: D?.direction ?? "desc"
3621
- }), ze = (e) => {
3622
- Re(e), O && O(String(e.columnAccessor), e.direction);
3623
- }, Be = Ur(Me, Le.columnAccessor, Le.direction), [Ve, He] = zr(ti[1], "mantine-table-page-size"), [Ue, We] = d(1), U = b ? Be.slice((Ue - 1) * Ve, Ue * Ve) : Be, [Ge, Ke] = d([]), W = z?.expanded?.recordIds ?? Ge, qe = z?.expanded?.onRecordIdsChange ?? Ke, Je = (e) => {
3624
- W.includes(e) ? qe(W.filter((t) => t !== e)) : qe(z?.allowMultiple ? [...W, e] : [e]);
3625
- }, Ye = l.findIndex((e) => e.list && e.column && !e.column.hidden), Xe = z && Ye >= 0 ? l.map((e, t) => {
3617
+ }, [ze]);
3618
+ let [V, Be] = d({
3619
+ columnAccessor: O?.field ?? h[0].id,
3620
+ direction: O?.direction ?? "desc"
3621
+ }), Ve = (e) => {
3622
+ Be(e), A && A(String(e.columnAccessor), e.direction);
3623
+ }, H = Ur(Fe, V.columnAccessor, V.direction), [He, Ue] = zr(ti[1], "mantine-table-page-size"), [U, W] = d(1), We = x ? H.slice((U - 1) * He, U * He) : H, [Ge, Ke] = d([]), G = R?.expanded?.recordIds ?? Ge, qe = R?.expanded?.onRecordIdsChange ?? Ke, Je = (e) => {
3624
+ G.includes(e) ? qe(G.filter((t) => t !== e)) : qe(R?.allowMultiple ? [...G, e] : [e]);
3625
+ }, Ye = h.findIndex((e) => e.list && e.column && !e.column.hidden), Xe = R && Ye >= 0 ? h.map((e, t) => {
3626
3626
  if (t !== Ye) return e;
3627
3627
  let n = e.column.render;
3628
3628
  return {
@@ -3633,7 +3633,7 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3633
3633
  gap: "xs",
3634
3634
  wrap: "nowrap",
3635
3635
  align: "center",
3636
- children: [!z.expandable || z.expandable(t) ? /* @__PURE__ */ p(v, {
3636
+ children: [!R.expandable || R.expandable(t) ? /* @__PURE__ */ p(v, {
3637
3637
  component: "span",
3638
3638
  "aria-label": "Aufklappen",
3639
3639
  onClick: (e) => {
@@ -3644,11 +3644,11 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3644
3644
  flexShrink: 0,
3645
3645
  cursor: "pointer"
3646
3646
  },
3647
- children: /* @__PURE__ */ p(be, {
3647
+ children: /* @__PURE__ */ p(Se, {
3648
3648
  size: 16,
3649
3649
  style: {
3650
3650
  color: "var(--mantine-primary-color-filled)",
3651
- transform: W.includes(t.id) ? "rotate(90deg)" : void 0,
3651
+ transform: G.includes(t.id) ? "rotate(90deg)" : void 0,
3652
3652
  transition: "transform 200ms ease"
3653
3653
  }
3654
3654
  })
@@ -3659,32 +3659,32 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3659
3659
  })
3660
3660
  }
3661
3661
  };
3662
- }) : l, [G, K] = d([]);
3662
+ }) : h, [K, q] = d([]);
3663
3663
  s(() => {
3664
- K([]);
3665
- }, [pe]);
3666
- let [Ze, Qe] = d(!1), [$e, et] = d(!1), [tt, nt] = d(!1), rt = u(null);
3664
+ q([]);
3665
+ }, [he]);
3666
+ let [Ze, Qe] = d(!1), [$e, J] = d(!1), [et, tt] = d(!1), nt = u(null);
3667
3667
  s(() => {
3668
- if (!se) {
3669
- rt.current = null;
3668
+ if (!z) {
3669
+ nt.current = null;
3670
3670
  return;
3671
3671
  }
3672
- if (rt.current === se) return;
3673
- let e = Be.find((e) => e.id === se);
3674
- e && (rt.current = se, K([e]), et(!0), ce?.(null));
3675
- }, [se, Be]);
3676
- let it = l.some((e) => e.update), at = l.some((e) => e.delete), q = [];
3677
- return it && q.push({
3678
- icon: /* @__PURE__ */ p(we, { size: 14 }),
3672
+ if (nt.current === z) return;
3673
+ let e = H.find((e) => e.id === z);
3674
+ e && (nt.current = z, q([e]), J(!0), de?.(null));
3675
+ }, [z, H]);
3676
+ let rt = h.some((e) => e.update), it = h.some((e) => e.delete), at = [];
3677
+ return rt && at.push({
3678
+ icon: /* @__PURE__ */ p(Ee, { size: 14 }),
3679
3679
  label: "Bearbeiten",
3680
3680
  onClick: (e) => {
3681
- K(e), et(!0);
3681
+ q(e), J(!0);
3682
3682
  }
3683
- }), S && q.push(...S), at && q.push({
3684
- icon: /* @__PURE__ */ p(Oe, { size: 14 }),
3683
+ }), C && at.push(...C), it && at.push({
3684
+ icon: /* @__PURE__ */ p(Ae, { size: 14 }),
3685
3685
  label: "Löschen",
3686
3686
  onClick: (e) => {
3687
- K(e), nt(!0);
3687
+ q(e), tt(!0);
3688
3688
  }
3689
3689
  }), /* @__PURE__ */ m(f, { children: [
3690
3690
  /* @__PURE__ */ m(w, {
@@ -3703,7 +3703,7 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3703
3703
  gap: 6,
3704
3704
  align: "center",
3705
3705
  wrap: "nowrap",
3706
- children: [typeof e == "string" ? /* @__PURE__ */ p(fe, {
3706
+ children: [typeof e == "string" ? /* @__PURE__ */ p(pe, {
3707
3707
  order: 4,
3708
3708
  children: e
3709
3709
  }) : e, t != null && /* @__PURE__ */ m(E, {
@@ -3719,8 +3719,8 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3719
3719
  size: "sm",
3720
3720
  radius: "xl",
3721
3721
  "aria-label": "Mehr Informationen",
3722
- children: /* @__PURE__ */ p(Ce, { size: 16 })
3723
- }) }), /* @__PURE__ */ p(E.Dropdown, { children: /* @__PURE__ */ p(V, {
3722
+ children: /* @__PURE__ */ p(Te, { size: 16 })
3723
+ }) }), /* @__PURE__ */ p(E.Dropdown, { children: /* @__PURE__ */ p(B, {
3724
3724
  component: "div",
3725
3725
  size: "sm",
3726
3726
  c: "dimmed",
@@ -3747,49 +3747,49 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3747
3747
  sm: "auto"
3748
3748
  },
3749
3749
  children: [
3750
- L && /* @__PURE__ */ p(g, {
3750
+ ne && /* @__PURE__ */ p(g, {
3751
3751
  variant: "subtle",
3752
- loading: Ne,
3752
+ loading: Ie,
3753
3753
  onClick: async () => {
3754
- if (ne) {
3755
- Pe(!0);
3754
+ if (ae) {
3755
+ Le(!0);
3756
3756
  try {
3757
- await ne();
3757
+ await ae();
3758
3758
  } finally {
3759
- Pe(!1);
3759
+ Le(!1);
3760
3760
  }
3761
- } else je();
3761
+ } else Pe();
3762
3762
  },
3763
3763
  "aria-label": "Neuladen",
3764
- children: /* @__PURE__ */ p(Te, {})
3764
+ children: /* @__PURE__ */ p(De, {})
3765
3765
  }),
3766
- (l.some((e) => e.update) || h) && (() => {
3767
- let e = l.find((e) => e.update) && (!te || G.length > 0 && te(G[0])), t = l.find((e) => e.delete) && (!I || G.length > 0 && I(G[0])), n = (S ?? []).length > 0, r = e || t || n;
3766
+ (h.some((e) => e.update) || b) && (() => {
3767
+ let e = h.find((e) => e.update) && (!I || K.length > 0 && I(K[0])), t = h.find((e) => e.delete) && (!L || K.length > 0 && L(K[0])), n = (C ?? []).length > 0, r = e || t || n;
3768
3768
  return /* @__PURE__ */ p(v, {
3769
- ...ae ? { visibleFrom: "sm" } : {},
3769
+ ...ce ? { visibleFrom: "sm" } : {},
3770
3770
  children: /* @__PURE__ */ m(k, {
3771
3771
  shadow: "md",
3772
3772
  children: [/* @__PURE__ */ p(k.Target, { children: /* @__PURE__ */ p(y, {
3773
3773
  variant: "outline",
3774
- rightSection: /* @__PURE__ */ p(ye, { size: 14 }),
3775
- disabled: !G.length || !r,
3774
+ rightSection: /* @__PURE__ */ p(xe, { size: 14 }),
3775
+ disabled: !K.length || !r,
3776
3776
  children: "Aktionen"
3777
3777
  }) }), /* @__PURE__ */ m(k.Dropdown, { children: [
3778
3778
  e && /* @__PURE__ */ p(k.Item, {
3779
- leftSection: /* @__PURE__ */ p(we, { size: 14 }),
3780
- onClick: () => et(!0),
3781
- disabled: G.length !== 1,
3779
+ leftSection: /* @__PURE__ */ p(Ee, { size: 14 }),
3780
+ onClick: () => J(!0),
3781
+ disabled: K.length !== 1,
3782
3782
  children: "Bearbeiten"
3783
3783
  }),
3784
- (S ?? []).map((e, t) => /* @__PURE__ */ i(k.Item, {
3784
+ (C ?? []).map((e, t) => /* @__PURE__ */ i(k.Item, {
3785
3785
  ...e.icon && { leftSection: e.icon },
3786
3786
  key: `custom_action_${t}`,
3787
- onClick: () => e.onClick(G),
3788
- disabled: e.disabled?.(G) ?? !1
3787
+ onClick: () => e.onClick(K),
3788
+ disabled: e.disabled?.(K) ?? !1
3789
3789
  }, e.label)),
3790
3790
  t && /* @__PURE__ */ p(k.Item, {
3791
- leftSection: /* @__PURE__ */ p(Oe, { size: 14 }),
3792
- onClick: () => nt(!0),
3791
+ leftSection: /* @__PURE__ */ p(Ae, { size: 14 }),
3792
+ onClick: () => tt(!0),
3793
3793
  color: "red",
3794
3794
  children: "Löschen"
3795
3795
  })
@@ -3797,156 +3797,160 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3797
3797
  })
3798
3798
  });
3799
3799
  })(),
3800
- l.find((e) => e.create) && /* @__PURE__ */ p(y, {
3800
+ h.find((e) => e.create) && /* @__PURE__ */ p(y, {
3801
3801
  onClick: () => Qe(!0),
3802
- disabled: De,
3803
- children: A ?? "Erstellen"
3802
+ disabled: je,
3803
+ children: j ?? "Erstellen"
3804
3804
  }),
3805
3805
  c
3806
3806
  ]
3807
3807
  })]
3808
3808
  }),
3809
- M && M.length > 0 && /* @__PURE__ */ p(le, {
3810
- value: pe,
3811
- onChange: me,
3809
+ l,
3810
+ P && P.length > 0 && /* @__PURE__ */ p(ue, {
3811
+ value: he,
3812
+ onChange: ge,
3812
3813
  mt: "md",
3813
- children: /* @__PURE__ */ p(le.List, { children: M.map((e) => /* @__PURE__ */ p(le.Tab, {
3814
+ children: /* @__PURE__ */ p(ue.List, { children: P.map((e) => /* @__PURE__ */ p(ue.Tab, {
3814
3815
  value: e.value,
3815
3816
  leftSection: e.icon,
3816
3817
  children: e.label
3817
3818
  }, e.value)) })
3818
3819
  }),
3819
- ke && /* @__PURE__ */ p(_, {
3820
+ Me && /* @__PURE__ */ p(_, {
3820
3821
  mt: "md",
3821
3822
  variant: "light",
3822
3823
  color: "red",
3823
3824
  title: "Es ist ein Fehler aufgetreten.",
3824
- icon: /* @__PURE__ */ p(Ce, {}),
3825
+ icon: /* @__PURE__ */ p(Te, {}),
3825
3826
  children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
3826
3827
  }),
3827
- (De || Ae) && /* @__PURE__ */ m(re, {
3828
+ (je || Ne) && /* @__PURE__ */ m(ie, {
3828
3829
  my: "md",
3829
- children: [/* @__PURE__ */ p(R, { height: 40 }), [
3830
+ children: [/* @__PURE__ */ p(re, { height: 40 }), [
3830
3831
  ,
3831
3832
  ,
3832
3833
  ,
3833
3834
  ,
3834
3835
  ,
3835
- ].fill(0).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, `skeleton-${t}`))]
3836
+ ].fill(0).map((e, t) => /* @__PURE__ */ p(re, { height: 35 }, `skeleton-${t}`))]
3836
3837
  }),
3837
- !De && !Ae && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3838
- ...ae ? { visibleFrom: "sm" } : {},
3838
+ !je && !Ne && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3839
+ ...ce ? { visibleFrom: "sm" } : {},
3839
3840
  children: /* @__PURE__ */ p(Ir, {
3840
3841
  my: "md",
3841
- striped: !0,
3842
+ withTableBorder: !0,
3843
+ borderRadius: "md",
3842
3844
  highlightOnHover: !0,
3845
+ verticalSpacing: "sm",
3846
+ horizontalSpacing: "md",
3843
3847
  minHeight: 150,
3844
- fetching: ke,
3845
- records: U,
3846
- sortStatus: Le,
3847
- onSortStatusChange: ze,
3848
- ...h && {
3849
- selectedRecords: G,
3850
- onSelectedRecordsChange: K
3848
+ fetching: Me,
3849
+ records: We,
3850
+ sortStatus: V,
3851
+ onSortStatusChange: Ve,
3852
+ ...b && {
3853
+ selectedRecords: K,
3854
+ onSelectedRecordsChange: q
3851
3855
  },
3852
- ...b && U.length && {
3853
- totalRecords: Be.length,
3854
- recordsPerPage: Ve,
3855
- onPageChange: We,
3856
- page: Ue,
3856
+ ...x && We.length && {
3857
+ totalRecords: H.length,
3858
+ recordsPerPage: He,
3859
+ onPageChange: W,
3860
+ page: U,
3857
3861
  recordsPerPageOptions: ti,
3858
- onRecordsPerPageChange: He,
3862
+ onRecordsPerPageChange: Ue,
3859
3863
  recordsPerPageLabel: "Einträge pro Seite"
3860
3864
  },
3861
- ...z && { rowExpansion: {
3862
- allowMultiple: z.allowMultiple ?? !1,
3863
- trigger: B ? "never" : "click",
3864
- content: ({ record: e }) => z.content(e, !1),
3865
+ ...R && { rowExpansion: {
3866
+ allowMultiple: R.allowMultiple ?? !1,
3867
+ trigger: se ? "never" : "click",
3868
+ content: ({ record: e }) => R.content(e, !1),
3865
3869
  expanded: {
3866
- recordIds: W,
3870
+ recordIds: G,
3867
3871
  onRecordIdsChange: qe
3868
3872
  },
3869
- ...z.expandable && { expandable: ({ record: e }) => z.expandable(e) }
3873
+ ...R.expandable && { expandable: ({ record: e }) => R.expandable(e) }
3870
3874
  } },
3871
3875
  columns: Xe.map((e) => e.column),
3872
3876
  noRecordsText: "Keine Einträge gefunden",
3873
- onRowClick: B,
3874
- ...B && { style: { cursor: "pointer" } }
3877
+ onRowClick: se,
3878
+ ...se && { style: { cursor: "pointer" } }
3875
3879
  })
3876
- }), ae && /* @__PURE__ */ p(v, {
3880
+ }), ce && /* @__PURE__ */ p(v, {
3877
3881
  hiddenFrom: "sm",
3878
3882
  children: /* @__PURE__ */ p(ei, {
3879
- records: U,
3883
+ records: We,
3880
3884
  fields: Xe,
3881
- onRowClick: B,
3885
+ onRowClick: se,
3882
3886
  sort: {
3883
- field: String(Le.columnAccessor),
3884
- direction: Le.direction,
3887
+ field: String(V.columnAccessor),
3888
+ direction: V.direction,
3885
3889
  onSortChange: (e, t) => {
3886
- ze({
3890
+ Ve({
3887
3891
  columnAccessor: e,
3888
3892
  direction: t
3889
3893
  });
3890
3894
  }
3891
3895
  },
3892
- ...b && U.length && { pagination: {
3893
- totalRecords: Be.length,
3894
- recordsPerPage: Ve,
3895
- page: Ue,
3896
- onPageChange: We,
3896
+ ...x && We.length && { pagination: {
3897
+ totalRecords: H.length,
3898
+ recordsPerPage: He,
3899
+ page: U,
3900
+ onPageChange: W,
3897
3901
  recordsPerPageOptions: ti,
3898
3902
  onRecordsPerPageChange: (e) => {
3899
- He(e), We(1);
3903
+ Ue(e), W(1);
3900
3904
  }
3901
3905
  } },
3902
- ...z && { rowExpansion: {
3903
- content: z.content,
3906
+ ...R && { rowExpansion: {
3907
+ content: R.content,
3904
3908
  expanded: {
3905
- recordIds: W,
3909
+ recordIds: G,
3906
3910
  onRecordIdsChange: qe
3907
3911
  },
3908
- ...z.expandable && { expandable: z.expandable }
3912
+ ...R.expandable && { expandable: R.expandable }
3909
3913
  } },
3910
- ...q.length > 0 && {
3911
- actions: q,
3912
- canUpdate: te,
3913
- canDelete: I
3914
+ ...at.length > 0 && {
3915
+ actions: at,
3916
+ canUpdate: I,
3917
+ canDelete: L
3914
3918
  }
3915
3919
  })
3916
3920
  })] }),
3917
3921
  /* @__PURE__ */ p(N, {
3918
3922
  opened: $e,
3919
3923
  onClose: () => {
3920
- et(!1), K([]);
3924
+ J(!1), q([]);
3921
3925
  },
3922
3926
  title: e ?? "Bearbeiten",
3923
- children: G.length > 0 && /* @__PURE__ */ p(Lr, {
3924
- fields: l.filter((e) => e.update),
3927
+ children: K.length > 0 && /* @__PURE__ */ p(Lr, {
3928
+ fields: h.filter((e) => e.update),
3925
3929
  queryKey: n,
3926
3930
  connectedQueryKeys: r,
3927
- apiPath: _e,
3928
- id: G[0].id,
3931
+ apiPath: be,
3932
+ id: K[0].id,
3929
3933
  onClose: () => {
3930
- et(!1), K([]);
3934
+ J(!1), q([]);
3931
3935
  },
3932
- steps: C
3936
+ steps: D
3933
3937
  })
3934
3938
  }),
3935
- G.length > 0 && /* @__PURE__ */ p(N, {
3936
- opened: tt,
3939
+ K.length > 0 && /* @__PURE__ */ p(N, {
3940
+ opened: et,
3937
3941
  onClose: () => {
3938
- nt(!1), K([]);
3942
+ tt(!1), q([]);
3939
3943
  },
3940
3944
  title: e ?? "Löschen",
3941
3945
  children: /* @__PURE__ */ p(Rr, {
3942
3946
  onClose: () => {
3943
- nt(!1), K([]);
3947
+ tt(!1), q([]);
3944
3948
  },
3945
3949
  queryKey: n,
3946
3950
  connectedQueryKeys: r,
3947
- apiPath: _e,
3948
- selectedRecords: G,
3949
- confirmMessage: oe
3951
+ apiPath: be,
3952
+ selectedRecords: K,
3953
+ confirmMessage: le
3950
3954
  })
3951
3955
  }),
3952
3956
  /* @__PURE__ */ p(N, {
@@ -3958,12 +3962,12 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3958
3962
  children: /* @__PURE__ */ p(an, {
3959
3963
  queryKey: n,
3960
3964
  connectedQueryKeys: r,
3961
- apiPath: _e,
3965
+ apiPath: be,
3962
3966
  onClose: () => {
3963
3967
  Qe(!1);
3964
3968
  },
3965
- fields: l.filter((e) => e.create),
3966
- steps: C
3969
+ fields: h.filter((e) => e.create),
3970
+ steps: D
3967
3971
  })
3968
3972
  })
3969
3973
  ] });
@@ -3971,7 +3975,7 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3971
3975
  //#endregion
3972
3976
  //#region src/DataTable/SubTable.tsx
3973
3977
  function ri({ mobile: e, columns: t, ...n }) {
3974
- return e ? /* @__PURE__ */ p(re, {
3978
+ return e ? /* @__PURE__ */ p(ie, {
3975
3979
  gap: "sm",
3976
3980
  style: { fontVariantNumeric: "tabular-nums" },
3977
3981
  children: (n.records ?? []).map((e, r) => {