@espresso-lab/mantine-data-table 2.1.8 → 2.1.9

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 { ActionIcon as h, Alert as g, Box as _, Button as v, Center as y, Checkbox as b, Collapse as x, Divider as S, Flex as C, Group as w, Loader as T, Menu as E, MenuDropdown as D, MenuItem as O, MenuTarget as k, Modal as A, NumberInput as j, Pagination as M, Popover as N, PopoverDropdown as P, PopoverTarget as ee, ScrollArea as F, Select as te, Skeleton as I, Stack as L, Stepper as R, Table as ne, TableTd as re, TableTfoot as ie, TableTh as ae, TableThead as oe, TableTr as z, Tabs as se, Text as B, TextInput as ce, Textarea as le, Title as ue, createSafeContext as de, parseThemeColor as fe, rem as V, useDirection as pe, useMantineTheme as me } from "@mantine/core";
5
- import { useForm as he } from "@mantine/form";
6
- import { DateInput as ge } from "@mantine/dates";
7
- import { IconCaretDownFilled as _e, IconChevronDown as ve, IconDotsVertical as ye, IconInfoCircle as be, IconPencil as xe, IconRefresh as Se, IconSortAscending as Ce, IconSortDescending as we, IconTrash as Te } from "@tabler/icons-react";
8
- import { useClickOutside as Ee, useDisclosure as De, useLocalStorage as H, useMediaQuery as Oe, useMergedRef as ke, useTimeout as Ae } from "@mantine/hooks";
4
+ import { ActionIcon as h, Alert as g, Box as _, Button as v, Center as y, Checkbox as b, Collapse as x, Divider as S, Flex as C, Group as w, Loader as T, Menu as E, MenuDropdown as D, MenuItem as O, MenuTarget as k, Modal as A, NumberInput as j, Pagination as M, Popover as N, PopoverDropdown as P, PopoverTarget as ee, ScrollArea as F, Select as te, Skeleton as I, Stack as L, Stepper as R, Table as ne, TableTd as re, TableTfoot as ie, TableTh as z, TableThead as ae, TableTr as B, Tabs as oe, Text as V, TextInput as se, Textarea as ce, Title as le, createSafeContext as ue, parseThemeColor as de, rem as H, useDirection as fe, useMantineTheme as pe } from "@mantine/core";
5
+ import { useForm as me } from "@mantine/form";
6
+ import { DateInput as he } from "@mantine/dates";
7
+ import { IconCaretDownFilled as ge, IconChevronDown as _e, IconDotsVertical as ve, IconInfoCircle as ye, IconPencil as be, IconRefresh as xe, IconSortAscending as Se, IconSortDescending as Ce, IconTrash as we } from "@tabler/icons-react";
8
+ import { useClickOutside as Te, useDisclosure as Ee, useLocalStorage as De, useMediaQuery as Oe, useMergedRef as ke, useTimeout as Ae } from "@mantine/hooks";
9
9
  //#region node_modules/@tanstack/query-core/build/modern/subscribable.js
10
- var U = class {
10
+ var je = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -21,7 +21,7 @@ var U = class {
21
21
  }
22
22
  onSubscribe() {}
23
23
  onUnsubscribe() {}
24
- }, W = new class extends U {
24
+ }, Me = new class extends je {
25
25
  #e;
26
26
  #t;
27
27
  #n;
@@ -58,13 +58,13 @@ var U = class {
58
58
  isFocused() {
59
59
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
60
60
  }
61
- }(), G = {
61
+ }(), U = {
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
- }, je = new class {
67
- #e = G;
66
+ }, W = new class {
67
+ #e = U;
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,20 +85,20 @@ var U = class {
85
85
  this.#e.clearInterval(e);
86
86
  }
87
87
  }();
88
- function Me(e) {
88
+ function Ne(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 Ne = typeof window > "u" || "Deno" in globalThis;
94
- function Pe() {}
95
- function Fe(e) {
93
+ var Pe = typeof window > "u" || "Deno" in globalThis;
94
+ function Fe() {}
95
+ function Ie(e) {
96
96
  return typeof e == "number" && e >= 0 && e !== Infinity;
97
97
  }
98
- function Ie(e, t) {
98
+ function Le(e, t) {
99
99
  return Math.max(e + (t || 0) - Date.now(), 0);
100
100
  }
101
- function Le(e, t) {
101
+ function G(e, t) {
102
102
  return typeof e == "function" ? e(t) : e;
103
103
  }
104
104
  function K(e, t) {
@@ -165,7 +165,7 @@ function Ke(e, t) {
165
165
  //#endregion
166
166
  //#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
167
167
  var qe = /* @__PURE__ */ (() => {
168
- let e = () => Ne;
168
+ let e = () => Pe;
169
169
  return {
170
170
  isServer() {
171
171
  return e();
@@ -199,7 +199,7 @@ function Je() {
199
199
  }
200
200
  //#endregion
201
201
  //#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
202
- var Ye = Me;
202
+ var Ye = Ne;
203
203
  function Xe() {
204
204
  let e = [], t = 0, n = (e) => {
205
205
  e();
@@ -247,7 +247,7 @@ function Xe() {
247
247
  }
248
248
  };
249
249
  }
250
- var Ze = Xe(), Qe = new class extends U {
250
+ var Ze = Xe(), Qe = new class extends je {
251
251
  #e = !0;
252
252
  #t;
253
253
  #n;
@@ -299,7 +299,7 @@ function et(e, t) {
299
299
  }
300
300
  //#endregion
301
301
  //#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
302
- var tt = class extends U {
302
+ var tt = class extends je {
303
303
  constructor(e, t) {
304
304
  super(), this.options = t, this.#e = e, this.#s = null, this.#o = Je(), this.bindMethods(), this.setOptions(t);
305
305
  }
@@ -345,7 +345,7 @@ var tt = class extends U {
345
345
  observer: this
346
346
  });
347
347
  let r = this.hasListeners();
348
- r && at(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) || Le(this.options.staleTime, this.#t) !== Le(t.staleTime, this.#t)) && this.#g();
348
+ r && at(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) || G(this.options.staleTime, this.#t) !== G(t.staleTime, this.#t)) && this.#g();
349
349
  let i = this.#_();
350
350
  r && (this.#t !== n || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
351
351
  }
@@ -381,14 +381,14 @@ var tt = class extends U {
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(Pe)), t;
384
+ return e?.throwOnError || (t = t.catch(Fe)), t;
385
385
  }
386
386
  #g() {
387
387
  this.#b();
388
- let e = Le(this.options.staleTime, this.#t);
389
- if (qe.isServer() || this.#r.isStale || !Fe(e)) return;
390
- let t = Ie(this.#r.dataUpdatedAt, e) + 1;
391
- this.#d = je.setTimeout(() => {
388
+ let e = G(this.options.staleTime, this.#t);
389
+ if (qe.isServer() || this.#r.isStale || !Ie(e)) return;
390
+ let t = Le(this.#r.dataUpdatedAt, e) + 1;
391
+ this.#d = W.setTimeout(() => {
392
392
  this.#r.isStale || this.updateResult();
393
393
  }, t);
394
394
  }
@@ -396,18 +396,18 @@ var tt = class extends U {
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, !(qe.isServer() || K(this.options.enabled, this.#t) === !1 || !Fe(this.#p) || this.#p === 0) && (this.#f = je.setInterval(() => {
400
- (this.options.refetchIntervalInBackground || W.isFocused()) && this.#h();
399
+ this.#x(), this.#p = e, !(qe.isServer() || K(this.options.enabled, this.#t) === !1 || !Ie(this.#p) || this.#p === 0) && (this.#f = W.setInterval(() => {
400
+ (this.options.refetchIntervalInBackground || Me.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 && (je.clearTimeout(this.#d), this.#d = void 0);
407
+ this.#d !== void 0 && (W.clearTimeout(this.#d), this.#d = void 0);
408
408
  }
409
409
  #x() {
410
- this.#f !== void 0 && (je.clearInterval(this.#f), this.#f = void 0);
410
+ this.#f !== void 0 && (W.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;
@@ -520,7 +520,7 @@ function rt(e, t) {
520
520
  return nt(e, t) || e.state.data !== void 0 && it(e, t, t.refetchOnMount);
521
521
  }
522
522
  function it(e, t, n) {
523
- if (K(t.enabled, e) !== !1 && Le(t.staleTime, e) !== "static") {
523
+ if (K(t.enabled, e) !== !1 && G(t.staleTime, e) !== "static") {
524
524
  let r = typeof n == "function" ? n(e) : n;
525
525
  return r === "always" || r !== !1 && ot(e, t);
526
526
  }
@@ -530,7 +530,7 @@ function at(e, t, n, r) {
530
530
  return (e !== t || K(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ot(e, n);
531
531
  }
532
532
  function ot(e, t) {
533
- return K(t.enabled, e) !== !1 && e.isStaleByTime(Le(t.staleTime, e));
533
+ return K(t.enabled, e) !== !1 && e.isStaleByTime(G(t.staleTime, e));
534
534
  }
535
535
  function st(e, t) {
536
536
  return !Ve(e.getCurrentResult(), t);
@@ -552,7 +552,7 @@ function ct() {
552
552
  }
553
553
  //#endregion
554
554
  //#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
555
- var lt = class extends U {
555
+ var lt = class extends je {
556
556
  #e;
557
557
  #t = void 0;
558
558
  #n;
@@ -686,7 +686,7 @@ function Ct(t, n, r) {
686
686
  process.env.NODE_ENV !== "production" && (s.queryFn || console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)), s._optimisticResults = i ? "isRestoring" : "optimistic", yt(s), gt(s, a, c), _t(a);
687
687
  let l = !o.getQueryCache().get(s.queryHash), [u] = e.useState(() => new n(o, s)), d = u.getOptimisticResult(s), f = !i && t.subscribed !== !1;
688
688
  if (e.useSyncExternalStore(e.useCallback((e) => {
689
- let t = f ? u.subscribe(Ze.batchCalls(e)) : Pe;
689
+ let t = f ? u.subscribe(Ze.batchCalls(e)) : Fe;
690
690
  return u.updateResult(), t;
691
691
  }, [u, f]), () => u.getCurrentResult(), () => u.getCurrentResult()), e.useEffect(() => {
692
692
  u.setOptions(s);
@@ -698,7 +698,7 @@ function Ct(t, n, r) {
698
698
  query: c,
699
699
  suspense: s.suspense
700
700
  })) throw d.error;
701
- return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, d), s.experimental_prefetchInRender && !qe.isServer() && bt(d, i) && (l ? St(s, u, a) : c?.promise)?.catch(Pe).finally(() => {
701
+ return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, d), s.experimental_prefetchInRender && !qe.isServer() && bt(d, i) && (l ? St(s, u, a) : c?.promise)?.catch(Fe).finally(() => {
702
702
  u.updateResult();
703
703
  }), s.notifyOnChangeProps ? d : u.trackResult(d);
704
704
  }
@@ -715,7 +715,7 @@ function Tt(t, n) {
715
715
  i.setOptions(t);
716
716
  }, [i, t]);
717
717
  let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(Ze.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
718
- i.mutate(e, t).catch(Pe);
718
+ i.mutate(e, t).catch(Fe);
719
719
  }, [i]);
720
720
  if (a.error && Ke(i.options.throwOnError, [a.error])) throw a.error;
721
721
  return {
@@ -872,7 +872,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
872
872
  function k(e, t) {
873
873
  return typeof e.required == "function" ? e.required(t ?? {}) : !!e.required;
874
874
  }
875
- let A = he({
875
+ let A = me({
876
876
  mode: "uncontrolled",
877
877
  initialValues: e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? !1 : t.defaultValue ?? "", e), {}),
878
878
  validate: e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !k(t, n) || e ? null : "Pflichtfeld", e), {})
@@ -882,7 +882,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
882
882
  if (e.conditional && !e.conditional(t)) return null;
883
883
  let r = k(e, t);
884
884
  return /* @__PURE__ */ m(n, { children: [
885
- (e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(ce, {
885
+ (e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(se, {
886
886
  label: e.column.title,
887
887
  placeholder: e.placeholder ?? "",
888
888
  ...A.getInputProps(e.id),
@@ -896,7 +896,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
896
896
  ...A.getInputProps(e.id),
897
897
  required: r
898
898
  }, A.key(e.id)),
899
- e.type === "date" && /* @__PURE__ */ p(ge, {
899
+ e.type === "date" && /* @__PURE__ */ p(he, {
900
900
  label: e.column.title,
901
901
  placeholder: e.placeholder ?? "",
902
902
  valueFormat: "DD.MM.YYYY",
@@ -910,7 +910,7 @@ function Ht({ fields: e, onClose: t, queryKey: r, apiPath: i, steps: a, onCreate
910
910
  ...A.getInputProps(e.id, { type: "checkbox" }),
911
911
  required: r
912
912
  }, A.key(e.id)),
913
- e.type === "textarea" && /* @__PURE__ */ p(le, {
913
+ e.type === "textarea" && /* @__PURE__ */ p(ce, {
914
914
  label: e.column.title,
915
915
  placeholder: e.placeholder ?? "",
916
916
  ...A.getInputProps(e.id),
@@ -986,7 +986,7 @@ function X() {
986
986
  //#endregion
987
987
  //#region node_modules/mantine-datatable/dist/index.mjs
988
988
  function Z(e, t, n) {
989
- return e ? fe({
989
+ return e ? de({
990
990
  color: typeof e == "object" ? e[n] : e,
991
991
  theme: t
992
992
  }).value : void 0;
@@ -1023,7 +1023,7 @@ function Kt({ theme: e, color: t, backgroundColor: n }) {
1023
1023
  "--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
1024
1024
  };
1025
1025
  }
1026
- var [qt, Jt] = de("useDataTableColumnsContext must be used within DataTableColumnProvider"), Yt = (e) => {
1026
+ var [qt, Jt] = ue("useDataTableColumnsContext must be used within DataTableColumnProvider"), Yt = (e) => {
1027
1027
  let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth: f, setMultipleColumnWidths: m, resetColumnsWidth: h, beginResize: g, endResize: _, pinnedMap: v } = e, [y, b] = d(""), [x, S] = d("");
1028
1028
  return p(qt, {
1029
1029
  value: {
@@ -1093,7 +1093,7 @@ function Qt({ icon: e, text: t, active: n, children: r }) {
1093
1093
  children: r || m(f, { children: [e || p("div", {
1094
1094
  className: "mantine-datatable-empty-state-icon",
1095
1095
  children: p(Zt, {})
1096
- }), p(B, {
1096
+ }), p(V, {
1097
1097
  component: "div",
1098
1098
  size: "sm",
1099
1099
  c: "dimmed",
@@ -1107,7 +1107,7 @@ function $t({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1107
1107
  defaultPinned: e.pinned,
1108
1108
  pinnable: !!e.pinnable,
1109
1109
  pinned: e.pinned
1110
- })), [t]), [i, a] = H({
1110
+ })), [t]), [i, a] = De({
1111
1111
  key: e ? `${e}-columns-pinning` : "",
1112
1112
  defaultValue: e ? r : void 0,
1113
1113
  getInitialValueInEffect: n
@@ -1155,7 +1155,7 @@ function $t({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1155
1155
  };
1156
1156
  }
1157
1157
  function en({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1158
- let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = H({
1158
+ let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = De({
1159
1159
  key: e ? `${e}-columns-order` : "",
1160
1160
  defaultValue: e ? r : void 0,
1161
1161
  getInitialValueInEffect: n
@@ -1198,7 +1198,7 @@ function en({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1198
1198
  };
1199
1199
  }
1200
1200
  function tn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1201
- let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = H({
1201
+ let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = De({
1202
1202
  key: e ? `${e}-columns-width` : "",
1203
1203
  defaultValue: e ? o() : void 0,
1204
1204
  getInitialValueInEffect: n
@@ -1292,7 +1292,7 @@ function nn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1292
1292
  defaultToggle: e.defaultToggle || !0,
1293
1293
  toggleable: e.toggleable,
1294
1294
  toggled: e.defaultToggle === void 0 ? !0 : e.defaultToggle
1295
- })), [t]), [i, a] = H({
1295
+ })), [t]), [i, a] = De({
1296
1296
  key: e ? `${e}-columns-toggle` : "",
1297
1297
  defaultValue: e ? r : void 0,
1298
1298
  getInitialValueInEffect: n
@@ -1499,7 +1499,7 @@ function pn({ scrollCallbacks: e, withRowBorders: t }) {
1499
1499
  Q(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), Q(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
1500
1500
  }
1501
1501
  function c() {
1502
- f.current.withRowBorders && t.height < n.height ? Q(r.current, un, `${V("1px")} solid var(--mantine-datatable-border-color)`) : Q(r.current, un, "unset");
1502
+ f.current.withRowBorders && t.height < n.height ? Q(r.current, un, `${H("1px")} solid var(--mantine-datatable-border-color)`) : Q(r.current, un, "unset");
1503
1503
  }
1504
1504
  h.current = c;
1505
1505
  function l() {
@@ -1660,11 +1660,11 @@ function vn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0
1660
1660
  }, [e]), r;
1661
1661
  }
1662
1662
  function yn(e) {
1663
- let t = me();
1663
+ let t = pe();
1664
1664
  return vn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1665
1665
  }
1666
1666
  function bn(e) {
1667
- let t = me();
1667
+ let t = pe();
1668
1668
  return Oe((typeof e == "function" ? e(t) : e) || "", !0);
1669
1669
  }
1670
1670
  function xn(e) {
@@ -1753,7 +1753,7 @@ function jn(e, t) {
1753
1753
  }
1754
1754
  var Mn = "mantine-datatable-nowrap", Nn = "mantine-datatable-ellipsis", Pn = "mantine-datatable-pointer-cursor", Fn = "mantine-datatable-context-menu-cursor", In = "mantine-datatable-text-selection-disabled", Ln = "mantine-datatable-text-align-left", Rn = "mantine-datatable-text-align-center", zn = "mantine-datatable-text-align-right";
1755
1755
  function Bn({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1756
- return bn(r) ? p(ae, {
1756
+ return bn(r) ? p(z, {
1757
1757
  "data-pinned": n?.position,
1758
1758
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
1759
1759
  className: X({
@@ -1780,7 +1780,7 @@ function Bn({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
1780
1780
  }) : null;
1781
1781
  }
1782
1782
  function Vn({ shadowVisible: e }) {
1783
- return p(ae, {
1783
+ return p(z, {
1784
1784
  className: "mantine-datatable-footer-selector-placeholder-cell",
1785
1785
  "data-shadow-visible": e || void 0
1786
1786
  });
@@ -1790,7 +1790,7 @@ function Hn({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedM
1790
1790
  ref: s,
1791
1791
  className: X("mantine-datatable-footer", e),
1792
1792
  style: t,
1793
- children: m(z, { children: [a && p(Vn, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1793
+ children: m(B, { children: [a && p(Vn, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1794
1794
  if (e) return null;
1795
1795
  let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
1796
1796
  ...r,
@@ -1829,7 +1829,7 @@ function Un({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1829
1829
  n,
1830
1830
  _
1831
1831
  ]), y = l(() => d.reduce((e, t) => e + Dn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = kn(f, y + v < h, m);
1832
- return v > 0 ? p(ae, {
1832
+ return v > 0 ? p(z, {
1833
1833
  colSpan: v,
1834
1834
  rowSpan: b > 1 ? b : void 0,
1835
1835
  "data-pinned": s?.position,
@@ -1887,7 +1887,7 @@ function Gn() {
1887
1887
  });
1888
1888
  }
1889
1889
  function Kn({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1890
- let [i, { close: a, toggle: o }] = De(!1), s = t ? Gn : Wn, c = Ee(a);
1890
+ let [i, { close: a, toggle: o }] = Ee(!1), s = t ? Gn : Wn, c = Te(a);
1891
1891
  return r && (c = void 0), m(N, {
1892
1892
  withArrow: !0,
1893
1893
  shadow: "md",
@@ -2072,7 +2072,7 @@ var Qn = 50, $n = (e) => {
2072
2072
  let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
2073
2073
  current: 0,
2074
2074
  next: 0
2075
- }), { dir: c } = pe(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = Jt(), g = a((e) => {
2075
+ }), { dir: c } = fe(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = Jt(), g = a((e) => {
2076
2076
  if (e.preventDefault(), e.stopPropagation(), !n.current) return;
2077
2077
  let r = n.current, a = r.nextElementSibling;
2078
2078
  for (; a;) {
@@ -2216,28 +2216,28 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2216
2216
  columnAccessor: r,
2217
2217
  direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
2218
2218
  });
2219
- } : void 0, oe = (e) => {
2219
+ } : void 0, ae = (e) => {
2220
2220
  e.stopPropagation(), A(r), I(!1);
2221
- }, z = (e) => {
2221
+ }, B = (e) => {
2222
2222
  e.preventDefault(), j(r), I(!0);
2223
- }, se = () => {
2223
+ }, oe = () => {
2224
2224
  j(r), I(!1), M();
2225
- }, B = () => {
2225
+ }, V = () => {
2226
2226
  I(!0);
2227
- }, ce = () => {
2227
+ }, se = () => {
2228
2228
  I(!1);
2229
- }, le = (e) => {
2229
+ }, ce = (e) => {
2230
2230
  e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
2231
2231
  ...e,
2232
2232
  toggled: !1
2233
2233
  } : e));
2234
- }, ue = (e) => {
2234
+ }, le = (e) => {
2235
2235
  F((t) => t.map((t) => t.accessor === r ? {
2236
2236
  ...t,
2237
2237
  pinned: e
2238
2238
  } : t));
2239
2239
  };
2240
- return m(ae, {
2240
+ return m(z, {
2241
2241
  "data-accessor": r,
2242
2242
  "data-pinned": n?.position,
2243
2243
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
@@ -2280,11 +2280,11 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2280
2280
  "mantine-datatable-header-cell-drag-over": te
2281
2281
  }),
2282
2282
  draggable: s,
2283
- onDragStart: s ? oe : void 0,
2284
- onDragEnter: s ? B : void 0,
2285
- onDragOver: s ? z : void 0,
2286
- onDrop: s ? se : void 0,
2287
- onDragLeave: s ? ce : void 0,
2283
+ onDragStart: s ? ae : void 0,
2284
+ onDragEnter: s ? V : void 0,
2285
+ onDragOver: s ? B : void 0,
2286
+ onDrop: s ? oe : void 0,
2287
+ onDragLeave: s ? se : void 0,
2288
2288
  children: [s ? p(y, {
2289
2289
  role: "img",
2290
2290
  "aria-label": "Drag column",
@@ -2309,7 +2309,7 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2309
2309
  }),
2310
2310
  l ? p(Zn, {
2311
2311
  currentPinned: R,
2312
- onPinChange: ue
2312
+ onPinChange: le
2313
2313
  }) : null,
2314
2314
  c ? p(y, {
2315
2315
  className: "mantine-datatable-header-cell-toggleable-icon",
@@ -2318,7 +2318,7 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2318
2318
  children: p(h, {
2319
2319
  size: "xs",
2320
2320
  variant: "light",
2321
- onClick: le,
2321
+ onClick: ce,
2322
2322
  children: p(Xn, {})
2323
2323
  })
2324
2324
  }) : null,
@@ -2348,7 +2348,7 @@ function rr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2348
2348
  }
2349
2349
  function ir({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
2350
2350
  let u = !o.disabled;
2351
- return p(ae, {
2351
+ return p(z, {
2352
2352
  ref: l,
2353
2353
  className: X("mantine-datatable-header-selector-cell", { [Pn]: n === "cell" && u }, e),
2354
2354
  style: t,
@@ -2391,7 +2391,7 @@ function or({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2391
2391
  checkboxProps: v,
2392
2392
  onChange: _,
2393
2393
  rowSpan: c ? D : void 0
2394
- }) : null, { columnsToggle: k, setColumnsToggle: A } = Jt(), [j, M] = d(!1), F = o.some((e) => e.toggleable), te = F ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? xn(String(e))])) : void 0, I = m(oe, {
2394
+ }) : null, { columnsToggle: k, setColumnsToggle: A } = Jt(), [j, M] = d(!1), F = o.some((e) => e.toggleable), te = F ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? xn(String(e))])) : void 0, I = m(ae, {
2395
2395
  className: X("mantine-datatable-header", t),
2396
2396
  style: n,
2397
2397
  ref: T,
@@ -2400,7 +2400,7 @@ function or({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2400
2400
  } : void 0,
2401
2401
  children: [c && Array.from({ length: E }, (e, t) => {
2402
2402
  let n = On(c, t);
2403
- return m(z, { children: [t === 0 && O, n.map((e, r) => p(Un, {
2403
+ return m(B, { children: [t === 0 && O, n.map((e, r) => p(Un, {
2404
2404
  group: e,
2405
2405
  pinnedInfo: ar(e, l),
2406
2406
  maxDepth: E,
@@ -2410,7 +2410,7 @@ function or({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2410
2410
  withColumnBorders: C,
2411
2411
  totalTableColumns: o.length
2412
2412
  }, e.id))] }, `group-depth-${t}`);
2413
- }), m(z, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2413
+ }), m(B, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2414
2414
  if (e) return null;
2415
2415
  let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title: m, sortable: h, draggable: g, toggleable: _, pinnable: v, resizable: y, titleClassName: b, titleStyle: x, filter: S, filterPopoverProps: C, filterPopoverDisableClickOutside: w, filtering: T, sortKey: E } = {
2416
2416
  ...s,
@@ -2494,16 +2494,16 @@ function cr() {
2494
2494
  });
2495
2495
  }
2496
2496
  var lr = {
2497
- xs: V(22),
2498
- sm: V(26),
2499
- md: V(32),
2500
- lg: V(38),
2501
- xl: V(44)
2497
+ xs: H(22),
2498
+ sm: H(26),
2499
+ md: H(32),
2500
+ lg: H(38),
2501
+ xl: H(44)
2502
2502
  };
2503
2503
  function ur({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2504
2504
  return m(w, {
2505
2505
  gap: "xs",
2506
- children: [p(B, {
2506
+ children: [p(V, {
2507
2507
  component: "div",
2508
2508
  size: e,
2509
2509
  children: t
@@ -2534,7 +2534,7 @@ function ur({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2534
2534
  }) : void 0],
2535
2535
  disabled: n,
2536
2536
  onClick: () => o(t),
2537
- children: p(B, {
2537
+ children: p(V, {
2538
2538
  component: "div",
2539
2539
  size: e,
2540
2540
  children: t
@@ -2554,8 +2554,8 @@ function dr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2554
2554
  totalRecords: g
2555
2555
  });
2556
2556
  } else O = n ? u : d;
2557
- let k = g && v ? Math.max(1, Math.ceil(g / v)) : 1, A = g ? (r - 1) * (v ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, N = !bn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${V(w)}rem` : e[w] || w})`), P = {
2558
- Text: (e) => p(B, {
2557
+ let k = g && v ? Math.max(1, Math.ceil(g / v)) : 1, A = g ? (r - 1) * (v ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, N = !bn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${H(w)}rem` : e[w] || w})`), P = {
2558
+ Text: (e) => p(V, {
2559
2559
  component: "div",
2560
2560
  className: "mantine-datatable-pagination-text",
2561
2561
  size: l,
@@ -2658,7 +2658,7 @@ function fr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
2658
2658
  }
2659
2659
  function pr({ open: e, colSpan: t, content: n, collapseProps: r }) {
2660
2660
  let { expanded: i, visible: a } = jn(e, r?.transitionDuration);
2661
- return a ? m(f, { children: [p(z, {}), p(z, { children: p(re, {
2661
+ return a ? m(f, { children: [p(B, {}), p(B, { children: p(re, {
2662
2662
  className: "mantine-datatable-row-expansion-cell",
2663
2663
  colSpan: t,
2664
2664
  children: p(x, {
@@ -2775,7 +2775,7 @@ function hr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2775
2775
  rowProps: P,
2776
2776
  children: M,
2777
2777
  expandedElement: N
2778
- }) : m(f, { children: [p(z, {
2778
+ }) : m(f, { children: [p(B, {
2779
2779
  ...P,
2780
2780
  children: M
2781
2781
  }), N] });
@@ -2842,14 +2842,14 @@ function _r({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
2842
2842
  ]
2843
2843
  });
2844
2844
  }
2845
- function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: v, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: ee, sortIcons: F, onSortStatusChange: te, horizontalSpacing: I, page: L, onPageChange: R, totalRecords: re, recordsPerPage: ie, onRecordsPerPageChange: ae, recordsPerPageOptions: oe, recordsPerPageLabel: z = "Records per page", paginationWithEdges: se, paginationWithControls: B, paginationActiveTextColor: ce, paginationActiveBackgroundColor: le, paginationSize: ue = "sm", paginationText: de = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: fe = "sm", getPaginationControlProps: V = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: pe, renderPagination: me, loaderBackgroundBlur: he, customLoader: ge, loaderSize: _e, loaderType: ve, loaderColor: ye, loadingText: be = "...", emptyState: xe, noRecordsText: Se = "No records", noRecordsIcon: Ce, highlightOnHover: we, striped: Te, noHeader: Ee, onRowClick: De, onRowDoubleClick: H, onRowContextMenu: Oe, onCellClick: Ae, onCellDoubleClick: U, onCellContextMenu: W, onScroll: G, onScrollToTop: je, onScrollToBottom: Me, onScrollToLeft: Ne, onScrollToRight: Pe, c: Fe, backgroundColor: Ie, borderColor: Le, rowBorderColor: K, stripedColor: Re, highlightOnHoverColor: ze, rowColor: Be, rowBackgroundColor: Ve, rowExpansion: He, rowClassName: Ue, rowStyle: We, customRowAttributes: Ge, scrollViewportRef: Ke, scrollAreaProps: qe, tableRef: Je, bodyRef: Ye, m: Xe, my: Ze, mx: Qe, mt: $e, mb: et, ml: tt, mr: nt, className: rt, classNames: it, style: at, styles: ot, rowFactory: st, tableWrapper: ct, ...lt }) {
2845
+ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: v, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: ee, sortIcons: F, onSortStatusChange: te, horizontalSpacing: I, page: L, onPageChange: R, totalRecords: re, recordsPerPage: ie, onRecordsPerPageChange: z, recordsPerPageOptions: ae, recordsPerPageLabel: B = "Records per page", paginationWithEdges: oe, paginationWithControls: V, paginationActiveTextColor: se, paginationActiveBackgroundColor: ce, paginationSize: le = "sm", paginationText: ue = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: de = "sm", getPaginationControlProps: H = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: fe, renderPagination: pe, loaderBackgroundBlur: me, 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: Ae, onCellDoubleClick: je, onCellContextMenu: Me, onScroll: U, onScrollToTop: W, onScrollToBottom: Ne, onScrollToLeft: Pe, onScrollToRight: Fe, c: Ie, backgroundColor: Le, borderColor: G, rowBorderColor: K, stripedColor: Re, highlightOnHoverColor: ze, rowColor: Be, rowBackgroundColor: Ve, rowExpansion: He, rowClassName: Ue, rowStyle: We, customRowAttributes: Ge, scrollViewportRef: Ke, scrollAreaProps: qe, tableRef: Je, bodyRef: Ye, m: Xe, my: Ze, mx: Qe, mt: $e, mb: et, ml: tt, mr: nt, className: rt, classNames: it, style: at, styles: ot, rowFactory: st, tableWrapper: ct, ...lt }) {
2846
2846
  let ut = l(() => y ? En(y) : g, [g, y]), { refs: q, onScroll: dt } = pn({
2847
2847
  scrollCallbacks: {
2848
- onScroll: G,
2849
- onScrollToTop: je,
2850
- onScrollToBottom: Me,
2851
- onScrollToLeft: Ne,
2852
- onScrollToRight: Pe
2848
+ onScroll: U,
2849
+ onScrollToTop: W,
2850
+ onScrollToBottom: Ne,
2851
+ onScrollToLeft: Pe,
2852
+ onScrollToRight: Fe
2853
2853
  },
2854
2854
  withRowBorders: lt.withRowBorders
2855
2855
  }), J = rn({
@@ -2921,9 +2921,9 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2921
2921
  (e) => ({
2922
2922
  ...Wt({
2923
2923
  theme: e,
2924
- c: Fe,
2925
- backgroundColor: Ie,
2926
- borderColor: Le,
2924
+ c: Ie,
2925
+ backgroundColor: Le,
2926
+ borderColor: G,
2927
2927
  rowBorderColor: K,
2928
2928
  stripedColor: Re,
2929
2929
  highlightOnHoverColor: ze
@@ -2962,11 +2962,11 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2962
2962
  ...J.isLocked ? { tableLayout: "fixed" } : null,
2963
2963
  ...J.tableWidth == null ? null : { width: `${J.tableWidth}px` }
2964
2964
  },
2965
- "data-striped": Tt && Te || void 0,
2966
- "data-highlight-on-hover": we || void 0,
2965
+ "data-striped": Tt && we || void 0,
2966
+ "data-highlight-on-hover": Ce || void 0,
2967
2967
  ...lt,
2968
2968
  children: [
2969
- Ee ? null : p(Yt, {
2969
+ Te ? null : p(Yt, {
2970
2970
  ...J,
2971
2971
  pinnedMap: vt,
2972
2972
  children: p(or, {
@@ -3020,12 +3020,12 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3020
3020
  isRecordSelectable: j,
3021
3021
  selectionCheckboxProps: M,
3022
3022
  getSelectionCheckboxProps: P,
3023
- onClick: De,
3024
- onDoubleClick: H,
3023
+ onClick: Ee,
3024
+ onDoubleClick: De,
3025
3025
  onCellClick: Ae,
3026
- onCellDoubleClick: U,
3026
+ onCellDoubleClick: je,
3027
3027
  onContextMenu: Oe,
3028
- onCellContextMenu: W,
3028
+ onCellContextMenu: Me,
3029
3029
  expansion: _t,
3030
3030
  color: Be,
3031
3031
  backgroundColor: Ve,
@@ -3062,36 +3062,36 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3062
3062
  onPageChange: wt,
3063
3063
  totalRecords: re,
3064
3064
  recordsPerPage: ie,
3065
- onRecordsPerPageChange: ae,
3066
- recordsPerPageOptions: oe,
3067
- recordsPerPageLabel: z,
3068
- paginationWithEdges: se,
3069
- paginationWithControls: B,
3070
- paginationActiveTextColor: ce,
3071
- paginationActiveBackgroundColor: le,
3072
- paginationSize: ue,
3073
- paginationText: de,
3074
- paginationWrapBreakpoint: fe,
3075
- getPaginationControlProps: V,
3076
- getPaginationItemProps: pe,
3077
- noRecordsText: Se,
3078
- loadingText: be,
3065
+ onRecordsPerPageChange: z,
3066
+ recordsPerPageOptions: ae,
3067
+ recordsPerPageLabel: B,
3068
+ paginationWithEdges: oe,
3069
+ paginationWithControls: V,
3070
+ paginationActiveTextColor: se,
3071
+ paginationActiveBackgroundColor: ce,
3072
+ paginationSize: le,
3073
+ paginationText: ue,
3074
+ paginationWrapBreakpoint: de,
3075
+ getPaginationControlProps: H,
3076
+ getPaginationItemProps: fe,
3077
+ noRecordsText: xe,
3078
+ loadingText: ye,
3079
3079
  recordsLength: Tt,
3080
- renderPagination: me
3080
+ renderPagination: pe
3081
3081
  }),
3082
3082
  p(sr, {
3083
3083
  fetching: h,
3084
- backgroundBlur: he,
3085
- customContent: ge,
3086
- size: _e,
3087
- type: ve,
3088
- color: ye
3084
+ backgroundBlur: me,
3085
+ customContent: he,
3086
+ size: ge,
3087
+ type: _e,
3088
+ color: ve
3089
3089
  }),
3090
3090
  p(Qt, {
3091
- icon: Ce,
3092
- text: Se,
3091
+ icon: Se,
3092
+ text: xe,
3093
3093
  active: !h && !Tt,
3094
- children: xe
3094
+ children: be
3095
3095
  })
3096
3096
  ]
3097
3097
  })
@@ -3100,7 +3100,7 @@ function vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3100
3100
  //#endregion
3101
3101
  //#region src/DataTable/UpdateModal.tsx
3102
3102
  function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o }) {
3103
- let [c, l] = d(0), [u, h] = d(!1), { data: _, isLoading: y } = Lt(i, r, a), { mutateAsync: x, isError: S, error: C, isPending: T } = Bt(i, r), E = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], D = he({
3103
+ let [c, l] = d(0), [u, h] = d(!1), { data: _, isLoading: y } = Lt(i, r, a), { mutateAsync: x, isError: S, error: C, isPending: T } = Bt(i, r), E = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], D = me({
3104
3104
  mode: "uncontrolled",
3105
3105
  initialValues: e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {}),
3106
3106
  validate: e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !(typeof t.required == "function" ? t.required(n) : t.required) || e ? null : "Pflichtfeld", e), {})
@@ -3122,7 +3122,7 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
3122
3122
  if (e.conditional && !e.conditional(t)) return null;
3123
3123
  let r = O(e, t);
3124
3124
  return /* @__PURE__ */ m(n, { children: [
3125
- (e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(ce, {
3125
+ (e.type === void 0 || e.type == "text") && /* @__PURE__ */ p(se, {
3126
3126
  label: e.column.title,
3127
3127
  placeholder: e.placeholder ?? "",
3128
3128
  ...D.getInputProps(e.id),
@@ -3136,7 +3136,7 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
3136
3136
  ...D.getInputProps(e.id),
3137
3137
  required: r
3138
3138
  }, D.key(e.id)),
3139
- e.type === "date" && /* @__PURE__ */ p(ge, {
3139
+ e.type === "date" && /* @__PURE__ */ p(he, {
3140
3140
  label: e.column.title,
3141
3141
  placeholder: e.placeholder ?? "",
3142
3142
  valueFormat: "DD.MM.YYYY",
@@ -3150,7 +3150,7 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
3150
3150
  ...D.getInputProps(e.id, { type: "checkbox" }),
3151
3151
  required: r
3152
3152
  }, D.key(e.id)),
3153
- e.type === "textarea" && /* @__PURE__ */ p(le, {
3153
+ e.type === "textarea" && /* @__PURE__ */ p(ce, {
3154
3154
  label: e.column.title,
3155
3155
  placeholder: e.placeholder ?? "",
3156
3156
  ...D.getInputProps(e.id),
@@ -3222,35 +3222,35 @@ function yr({ fields: e, onClose: t, queryKey: r, apiPath: i, id: a, steps: o })
3222
3222
  }
3223
3223
  //#endregion
3224
3224
  //#region src/DataTable/DeleteModal.tsx
3225
- function br({ queryKey: e, apiPath: t, onClose: n, selectedRecords: r }) {
3226
- let { mutateAsync: i, isError: a, error: o, isPending: c } = Vt(t, e), [l, u] = d(r), [h, _] = d(!1), y = h || c;
3225
+ function br({ queryKey: e, apiPath: t, onClose: n, selectedRecords: r, confirmMessage: i }) {
3226
+ let { mutateAsync: a, isError: o, error: c, isPending: l } = Vt(t, e), [u, h] = d(r), [_, y] = d(!1), b = _ || l;
3227
3227
  return s(() => {
3228
- l.length || n();
3229
- }, [n, l]), l.length ? /* @__PURE__ */ m(f, { children: [
3230
- a && o.message && /* @__PURE__ */ p(g, {
3228
+ u.length || n();
3229
+ }, [n, u]), u.length ? /* @__PURE__ */ m(f, { children: [
3230
+ o && c.message && /* @__PURE__ */ p(g, {
3231
3231
  variant: "outline",
3232
3232
  color: "red",
3233
- title: o.name,
3234
- children: o.message
3233
+ title: c.name,
3234
+ children: c.message
3235
3235
  }),
3236
- /* @__PURE__ */ p(B, { children: l.length === 1 ? `Soll ${l.length} Eintrag wirklich gelöscht werden?` : `Sollen ${l.length} Einträge wirklich gelöscht werden?` }),
3236
+ /* @__PURE__ */ p(V, { children: i ? i(u) : u.length === 1 ? `Soll ${u.length} Eintrag wirklich gelöscht werden?` : `Sollen ${u.length} Einträge wirklich gelöscht werden?` }),
3237
3237
  /* @__PURE__ */ m(w, {
3238
3238
  mt: "md",
3239
3239
  justify: "end",
3240
3240
  children: [/* @__PURE__ */ p(v, {
3241
3241
  onClick: n,
3242
3242
  variant: "outline",
3243
- disabled: y,
3243
+ disabled: b,
3244
3244
  children: "Abbrechen"
3245
3245
  }), /* @__PURE__ */ p(v, {
3246
3246
  color: "red",
3247
- loading: y,
3247
+ loading: b,
3248
3248
  onClick: async () => {
3249
- _(!0);
3249
+ y(!0);
3250
3250
  try {
3251
- await Promise.all(l.map((e) => i(e.id))), u([]);
3251
+ await Promise.all(u.map((e) => a(e.id))), h([]);
3252
3252
  } finally {
3253
- _(!1);
3253
+ y(!1);
3254
3254
  }
3255
3255
  },
3256
3256
  children: "Löschen"
@@ -3344,13 +3344,13 @@ function Dr(e, t) {
3344
3344
  let n = t.column;
3345
3345
  if (n.render) return n.render(e, 0);
3346
3346
  let r = Er(e, n.accessor ?? t.id);
3347
- return r == null ? /* @__PURE__ */ p(B, {
3347
+ return r == null ? /* @__PURE__ */ p(V, {
3348
3348
  c: "dimmed",
3349
3349
  children: "–"
3350
- }) : typeof r == "boolean" ? /* @__PURE__ */ p(B, {
3350
+ }) : typeof r == "boolean" ? /* @__PURE__ */ p(V, {
3351
3351
  fz: "sm",
3352
3352
  children: r ? "Ja" : "Nein"
3353
- }) : /* @__PURE__ */ p(B, {
3353
+ }) : /* @__PURE__ */ p(V, {
3354
3354
  fz: "sm",
3355
3355
  children: String(r)
3356
3356
  });
@@ -3362,7 +3362,7 @@ function Or({ field: e, record: t }) {
3362
3362
  align: "center",
3363
3363
  py: "xs",
3364
3364
  px: "sm",
3365
- children: [/* @__PURE__ */ p(B, {
3365
+ children: [/* @__PURE__ */ p(V, {
3366
3366
  fw: 700,
3367
3367
  fz: "sm",
3368
3368
  children: e.column.title ?? e.id
@@ -3394,7 +3394,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
3394
3394
  event: n
3395
3395
  }) : r && k(e);
3396
3396
  };
3397
- return e.length === 0 ? /* @__PURE__ */ p(B, {
3397
+ return e.length === 0 ? /* @__PURE__ */ p(V, {
3398
3398
  c: "dimmed",
3399
3399
  ta: "center",
3400
3400
  py: "xl",
@@ -3416,7 +3416,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
3416
3416
  variant: "filled",
3417
3417
  size: "input-sm",
3418
3418
  onClick: () => f.onSortChange(f.field, f.direction === "asc" ? "desc" : "asc"),
3419
- children: f.direction === "asc" ? /* @__PURE__ */ p(Ce, { size: 18 }) : /* @__PURE__ */ p(we, { size: 18 })
3419
+ children: f.direction === "asc" ? /* @__PURE__ */ p(Se, { size: 18 }) : /* @__PURE__ */ p(Ce, { size: 18 })
3420
3420
  })]
3421
3421
  }),
3422
3422
  e.map((e, n) => {
@@ -3450,7 +3450,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
3450
3450
  onClick: (e) => {
3451
3451
  e.stopPropagation(), C(u);
3452
3452
  },
3453
- children: /* @__PURE__ */ p(ve, {
3453
+ children: /* @__PURE__ */ p(_e, {
3454
3454
  size: 16,
3455
3455
  style: {
3456
3456
  transform: d ? "rotate(0deg)" : "rotate(-90deg)",
@@ -3472,7 +3472,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
3472
3472
  color: "gray",
3473
3473
  size: "sm",
3474
3474
  onClick: (e) => e.stopPropagation(),
3475
- children: /* @__PURE__ */ p(ye, { size: 16 })
3475
+ children: /* @__PURE__ */ p(ve, { size: 16 })
3476
3476
  }) }), /* @__PURE__ */ p(E.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(E.Item, {
3477
3477
  leftSection: t.icon,
3478
3478
  onClick: (n) => {
@@ -3510,7 +3510,7 @@ function kr({ records: e, fields: n, selection: r, selectedRecords: i = [], onSe
3510
3510
  }), u.recordsPerPageOptions && u.onRecordsPerPageChange && /* @__PURE__ */ m(w, {
3511
3511
  justify: "center",
3512
3512
  gap: "xs",
3513
- children: [/* @__PURE__ */ p(B, {
3513
+ children: [/* @__PURE__ */ p(V, {
3514
3514
  fz: "xs",
3515
3515
  c: "dimmed",
3516
3516
  children: "Einträge pro Seite:"
@@ -3539,21 +3539,21 @@ var Ar = [
3539
3539
  100,
3540
3540
  500
3541
3541
  ];
3542
- function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: u, filters: y, actions: b, steps: x, defaultSort: S, onSortChange: C, createButtonText: T, queryParams: D, tabs: O, defaultTab: k, activeTab: j, onActiveTabChange: M, canUpdate: N, canDelete: P, showRefresh: ee = !0, rowExpansion: F, onRowClick: te, mobileCards: R = !1 }) {
3543
- let [ne, re] = d(k || (O && O.length > 0 ? O[0].value : null)), ie = j === void 0 ? ne : j, ae = (e) => {
3544
- j === void 0 && re(e), M && M(e);
3545
- }, oe = O?.find((e) => e.value === ie), z = oe?.queryParams || {}, B = oe?.apiPath ?? r, ce = oe?.mutationApiPath ?? a ?? B, le = {
3542
+ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: u, filters: y, actions: b, steps: x, defaultSort: S, onSortChange: C, createButtonText: T, queryParams: D, tabs: O, defaultTab: k, activeTab: j, onActiveTabChange: M, canUpdate: N, canDelete: P, showRefresh: ee = !0, rowExpansion: F, onRowClick: te, mobileCards: R = !1, deleteConfirmMessage: ne }) {
3543
+ let [re, ie] = d(k || (O && O.length > 0 ? O[0].value : null)), z = j === void 0 ? re : j, ae = (e) => {
3544
+ j === void 0 && ie(e), M && M(e);
3545
+ }, B = O?.find((e) => e.value === z), V = B?.queryParams || {}, se = B?.apiPath ?? r, ce = B?.mutationApiPath ?? a ?? se, ue = {
3546
3546
  ...D,
3547
- ...z
3548
- }, de = le ? "?" + Object.entries(le).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", fe = ie ? [...t, ie] : t, { data: V, isLoading: pe, isError: me, isRefetching: he, refetch: ge } = Rt(B + de, fe), { queryClient: ve } = kt();
3547
+ ...V
3548
+ }, de = ue ? "?" + Object.entries(ue).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", H = z ? [...t, z] : t, { data: fe, isLoading: pe, isError: me, isRefetching: he, refetch: _e } = Rt(se + de, H), { queryClient: ve } = kt();
3549
3549
  s(() => {
3550
- !V || !Array.isArray(V) || n?.forEach((e) => ve.invalidateQueries({ queryKey: e }));
3550
+ !fe || !Array.isArray(fe) || n?.forEach((e) => ve.invalidateQueries({ queryKey: e }));
3551
3551
  }, [
3552
- V,
3552
+ fe,
3553
3553
  n,
3554
3554
  ve
3555
3555
  ]);
3556
- let ye = !V || !Array.isArray(V) ? [] : !y || y.length === 0 ? V : V.filter((e) => y.every((t) => {
3556
+ let Se = !fe || !Array.isArray(fe) ? [] : !y || y.length === 0 ? fe : fe.filter((e) => y.every((t) => {
3557
3557
  if (t.value === void 0) return !0;
3558
3558
  let n = t.id;
3559
3559
  if (t.type === "query") {
@@ -3585,27 +3585,27 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3585
3585
  return !0;
3586
3586
  } else if (t.type === "boolean") return e[n] === t.value;
3587
3587
  return !0;
3588
- })), [Ce, we] = d({
3588
+ })), [Ce, Te] = d({
3589
3589
  columnAccessor: S?.field ?? c[0].id,
3590
3590
  direction: S?.direction ?? "desc"
3591
3591
  }), Ee = (e) => {
3592
- we(e), C && C(String(e.columnAccessor), e.direction);
3593
- }, De = Tr(ye, Ce.columnAccessor, Ce.direction), [H, Oe] = xr(Ar[1], "mantine-table-page-size"), [ke, Ae] = d(1), U = u ? De.slice((ke - 1) * H, ke * H) : De, [W, G] = d([]);
3592
+ Te(e), C && C(String(e.columnAccessor), e.direction);
3593
+ }, De = Tr(Se, Ce.columnAccessor, Ce.direction), [Oe, ke] = xr(Ar[1], "mantine-table-page-size"), [Ae, je] = d(1), Me = u ? De.slice((Ae - 1) * Oe, Ae * Oe) : De, [U, W] = d([]);
3594
3594
  s(() => {
3595
- G([]);
3596
- }, [ie]);
3597
- let [je, Me] = d(!1), [Ne, Pe] = d(!1), [Fe, Ie] = d(!1), Le = c.some((e) => e.update), K = c.some((e) => e.delete), Re = [];
3598
- return Le && Re.push({
3599
- icon: /* @__PURE__ */ p(xe, { size: 14 }),
3595
+ W([]);
3596
+ }, [z]);
3597
+ let [Ne, Pe] = d(!1), [Fe, Ie] = d(!1), [Le, G] = d(!1), K = c.some((e) => e.update), Re = c.some((e) => e.delete), ze = [];
3598
+ return K && ze.push({
3599
+ icon: /* @__PURE__ */ p(be, { size: 14 }),
3600
3600
  label: "Bearbeiten",
3601
3601
  onClick: (e) => {
3602
- G(e), Pe(!0);
3602
+ W(e), Ie(!0);
3603
3603
  }
3604
- }), b && Re.push(...b), K && Re.push({
3605
- icon: /* @__PURE__ */ p(Te, { size: 14 }),
3604
+ }), b && ze.push(...b), Re && ze.push({
3605
+ icon: /* @__PURE__ */ p(we, { size: 14 }),
3606
3606
  label: "Löschen",
3607
3607
  onClick: (e) => {
3608
- G(e), Ie(!0);
3608
+ W(e), G(!0);
3609
3609
  }
3610
3610
  }), /* @__PURE__ */ m(f, { children: [
3611
3611
  /* @__PURE__ */ m(w, {
@@ -3613,7 +3613,7 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3613
3613
  justify: e ? "space-between" : "end",
3614
3614
  align: "center",
3615
3615
  wrap: "wrap",
3616
- children: [e && (typeof e == "string" ? /* @__PURE__ */ p(ue, {
3616
+ children: [e && (typeof e == "string" ? /* @__PURE__ */ p(le, {
3617
3617
  order: 4,
3618
3618
  children: e
3619
3619
  }) : e), /* @__PURE__ */ m(w, {
@@ -3625,37 +3625,37 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3625
3625
  children: [
3626
3626
  ee && /* @__PURE__ */ p(h, {
3627
3627
  variant: "subtle",
3628
- onClick: () => ge(),
3628
+ onClick: () => _e(),
3629
3629
  "aria-label": "Neuladen",
3630
- children: /* @__PURE__ */ p(Se, {})
3630
+ children: /* @__PURE__ */ p(xe, {})
3631
3631
  }),
3632
3632
  (c.some((e) => e.update) || l) && (() => {
3633
- let e = c.find((e) => e.update) && (!N || W.length > 0 && N(W[0])), t = c.find((e) => e.delete) && (!P || W.length > 0 && P(W[0])), n = (b ?? []).length > 0, r = e || t || n;
3633
+ let e = c.find((e) => e.update) && (!N || U.length > 0 && N(U[0])), t = c.find((e) => e.delete) && (!P || U.length > 0 && P(U[0])), n = (b ?? []).length > 0, r = e || t || n;
3634
3634
  return /* @__PURE__ */ p(_, {
3635
3635
  ...R ? { visibleFrom: "sm" } : {},
3636
3636
  children: /* @__PURE__ */ m(E, {
3637
3637
  shadow: "md",
3638
3638
  children: [/* @__PURE__ */ p(E.Target, { children: /* @__PURE__ */ p(v, {
3639
3639
  variant: "outline",
3640
- rightSection: /* @__PURE__ */ p(_e, { size: 14 }),
3641
- disabled: !W.length || !r,
3640
+ rightSection: /* @__PURE__ */ p(ge, { size: 14 }),
3641
+ disabled: !U.length || !r,
3642
3642
  children: "Aktionen"
3643
3643
  }) }), /* @__PURE__ */ m(E.Dropdown, { children: [
3644
3644
  e && /* @__PURE__ */ p(E.Item, {
3645
- leftSection: /* @__PURE__ */ p(xe, { size: 14 }),
3646
- onClick: () => Pe(!0),
3647
- disabled: W.length !== 1,
3645
+ leftSection: /* @__PURE__ */ p(be, { size: 14 }),
3646
+ onClick: () => Ie(!0),
3647
+ disabled: U.length !== 1,
3648
3648
  children: "Bearbeiten"
3649
3649
  }),
3650
3650
  (b ?? []).map((e, t) => /* @__PURE__ */ i(E.Item, {
3651
3651
  ...e.icon && { leftSection: e.icon },
3652
3652
  key: `custom_action_${t}`,
3653
- onClick: () => e.onClick(W),
3654
- disabled: e.disabled?.(W) ?? !1
3653
+ onClick: () => e.onClick(U),
3654
+ disabled: e.disabled?.(U) ?? !1
3655
3655
  }, e.label)),
3656
3656
  t && /* @__PURE__ */ p(E.Item, {
3657
- leftSection: /* @__PURE__ */ p(Te, { size: 14 }),
3658
- onClick: () => Ie(!0),
3657
+ leftSection: /* @__PURE__ */ p(we, { size: 14 }),
3658
+ onClick: () => G(!0),
3659
3659
  color: "red",
3660
3660
  children: "Löschen"
3661
3661
  })
@@ -3664,7 +3664,7 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3664
3664
  });
3665
3665
  })(),
3666
3666
  c.find((e) => e.create) && /* @__PURE__ */ p(v, {
3667
- onClick: () => Me(!0),
3667
+ onClick: () => Pe(!0),
3668
3668
  disabled: pe,
3669
3669
  children: T ?? "Erstellen"
3670
3670
  }),
@@ -3672,11 +3672,11 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3672
3672
  ]
3673
3673
  })]
3674
3674
  }),
3675
- O && O.length > 0 && /* @__PURE__ */ p(se, {
3676
- value: ie,
3675
+ O && O.length > 0 && /* @__PURE__ */ p(oe, {
3676
+ value: z,
3677
3677
  onChange: ae,
3678
3678
  mt: "md",
3679
- children: /* @__PURE__ */ p(se.List, { children: O.map((e) => /* @__PURE__ */ p(se.Tab, {
3679
+ children: /* @__PURE__ */ p(oe.List, { children: O.map((e) => /* @__PURE__ */ p(oe.Tab, {
3680
3680
  value: e.value,
3681
3681
  leftSection: e.icon,
3682
3682
  children: e.label
@@ -3687,7 +3687,7 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3687
3687
  variant: "light",
3688
3688
  color: "red",
3689
3689
  title: "Es ist ein Fehler aufgetreten.",
3690
- icon: /* @__PURE__ */ p(be, {}),
3690
+ icon: /* @__PURE__ */ p(ye, {}),
3691
3691
  children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
3692
3692
  }),
3693
3693
  (pe || he) && /* @__PURE__ */ m(L, {
@@ -3708,20 +3708,20 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3708
3708
  highlightOnHover: !0,
3709
3709
  minHeight: 150,
3710
3710
  fetching: me,
3711
- records: U,
3711
+ records: Me,
3712
3712
  sortStatus: Ce,
3713
3713
  onSortStatusChange: Ee,
3714
3714
  ...l && {
3715
- selectedRecords: W,
3716
- onSelectedRecordsChange: G
3715
+ selectedRecords: U,
3716
+ onSelectedRecordsChange: W
3717
3717
  },
3718
- ...u && U.length && {
3718
+ ...u && Me.length && {
3719
3719
  totalRecords: De.length,
3720
- recordsPerPage: H,
3721
- onPageChange: Ae,
3722
- page: ke,
3720
+ recordsPerPage: Oe,
3721
+ onPageChange: je,
3722
+ page: Ae,
3723
3723
  recordsPerPageOptions: Ar,
3724
- onRecordsPerPageChange: Oe,
3724
+ onRecordsPerPageChange: ke,
3725
3725
  recordsPerPageLabel: "Einträge pro Seite"
3726
3726
  },
3727
3727
  ...F && { rowExpansion: {
@@ -3737,11 +3737,11 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3737
3737
  }), R && /* @__PURE__ */ p(_, {
3738
3738
  hiddenFrom: "sm",
3739
3739
  children: /* @__PURE__ */ p(kr, {
3740
- records: U,
3740
+ records: Me,
3741
3741
  fields: c,
3742
3742
  selection: l,
3743
- selectedRecords: W,
3744
- onSelectedRecordsChange: G,
3743
+ selectedRecords: U,
3744
+ onSelectedRecordsChange: W,
3745
3745
  onRowClick: te,
3746
3746
  sort: {
3747
3747
  field: String(Ce.columnAccessor),
@@ -3753,67 +3753,68 @@ function jr({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3753
3753
  });
3754
3754
  }
3755
3755
  },
3756
- ...u && U.length && { pagination: {
3756
+ ...u && Me.length && { pagination: {
3757
3757
  totalRecords: De.length,
3758
- recordsPerPage: H,
3759
- page: ke,
3760
- onPageChange: Ae,
3758
+ recordsPerPage: Oe,
3759
+ page: Ae,
3760
+ onPageChange: je,
3761
3761
  recordsPerPageOptions: Ar,
3762
3762
  onRecordsPerPageChange: (e) => {
3763
- Oe(e), Ae(1);
3763
+ ke(e), je(1);
3764
3764
  }
3765
3765
  } },
3766
3766
  ...F && { rowExpansion: { content: F.content } },
3767
- ...Re.length > 0 && {
3768
- actions: Re,
3767
+ ...ze.length > 0 && {
3768
+ actions: ze,
3769
3769
  canUpdate: N,
3770
3770
  canDelete: P
3771
3771
  }
3772
3772
  })
3773
3773
  })] }),
3774
3774
  /* @__PURE__ */ p(A, {
3775
- opened: Ne,
3775
+ opened: Fe,
3776
3776
  onClose: () => {
3777
- Pe(!1), G([]);
3777
+ Ie(!1), W([]);
3778
3778
  },
3779
3779
  title: e ?? "Bearbeiten",
3780
- children: W.length > 0 && /* @__PURE__ */ p(yr, {
3780
+ children: U.length > 0 && /* @__PURE__ */ p(yr, {
3781
3781
  fields: c.filter((e) => e.update),
3782
3782
  queryKey: t,
3783
3783
  apiPath: ce,
3784
- id: W[0].id,
3784
+ id: U[0].id,
3785
3785
  onClose: () => {
3786
- Pe(!1), G([]);
3786
+ Ie(!1), W([]);
3787
3787
  },
3788
3788
  steps: x
3789
3789
  })
3790
3790
  }),
3791
- W.length > 0 && /* @__PURE__ */ p(A, {
3792
- opened: Fe,
3791
+ U.length > 0 && /* @__PURE__ */ p(A, {
3792
+ opened: Le,
3793
3793
  onClose: () => {
3794
- Ie(!1), G([]);
3794
+ G(!1), W([]);
3795
3795
  },
3796
3796
  title: e ?? "Löschen",
3797
3797
  children: /* @__PURE__ */ p(br, {
3798
3798
  onClose: () => {
3799
- Ie(!1), G([]);
3799
+ G(!1), W([]);
3800
3800
  },
3801
3801
  queryKey: t,
3802
3802
  apiPath: ce,
3803
- selectedRecords: W
3803
+ selectedRecords: U,
3804
+ confirmMessage: ne
3804
3805
  })
3805
3806
  }),
3806
3807
  /* @__PURE__ */ p(A, {
3807
- opened: je,
3808
+ opened: Ne,
3808
3809
  onClose: () => {
3809
- Me(!1);
3810
+ Pe(!1);
3810
3811
  },
3811
3812
  title: e ?? "Anlegen",
3812
3813
  children: /* @__PURE__ */ p(Ht, {
3813
3814
  queryKey: t,
3814
3815
  apiPath: ce,
3815
3816
  onClose: () => {
3816
- Me(!1);
3817
+ Pe(!1);
3817
3818
  },
3818
3819
  fields: c.filter((e) => e.create),
3819
3820
  steps: x