react-crud-mui 0.2.83 → 0.2.85

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.
@@ -1,18 +1,15 @@
1
1
  import { default as React } from 'react';
2
- import { FieldValues } from 'react-hook-form';
3
- type CommandsOptions<T extends FieldValues> = {
2
+ type CommandsOptions = {
4
3
  onCreate: () => void;
5
4
  onClose: () => void;
6
- model?: T;
7
5
  };
8
- export interface SuccessPanelProps<T extends FieldValues = FieldValues> {
6
+ export interface SuccessPanelProps {
9
7
  title: string;
10
8
  helperText?: string;
11
- onCommands?: (options: CommandsOptions<T>) => React.ReactNode;
12
- model?: T;
9
+ onCommands?: (options: CommandsOptions) => React.ReactNode;
13
10
  icon?: React.ReactNode;
14
11
  onCreate: () => void;
15
12
  onClose: () => void;
16
13
  }
17
- declare function SuccessPanel<T extends FieldValues = FieldValues>({ icon, title, helperText, onCommands, onCreate, onClose, model, }: SuccessPanelProps<T>): import("react/jsx-runtime").JSX.Element;
14
+ declare function SuccessPanel({ icon, title, helperText, onCommands, onCreate, onClose, }: SuccessPanelProps): import("react/jsx-runtime").JSX.Element;
18
15
  export default SuccessPanel;
@@ -481,7 +481,7 @@ declare function useDetailPageModal<TModel extends FieldValues, TProps extends S
481
481
  readonly onAfterDelete?: ((variables: import('../pages/DetailPageData').DeletePayload<TModel>, form: import('../../form/hooks/useForm').UseFormReturn<TModel, FieldValues>) => void) | undefined;
482
482
  readonly onAfterSave?: ((result: void | Awaited<TModel> | undefined, variables: import('../pages/DetailPageData').SavePayload<TModel>, form: import('../../form/hooks/useForm').UseFormReturn<TModel, FieldValues>) => void) | undefined;
483
483
  readonly showSuccessMessages?: boolean;
484
- readonly successPanelProps?: Omit<import('../components/SuccessPanel').SuccessPanelProps<TModel>, "onClose" | "model" | "onCreate"> | undefined;
484
+ readonly successPanelProps?: Omit<import('../components/SuccessPanel').SuccessPanelProps, "onClose" | "onCreate"> | ((model?: TModel | undefined) => Omit<import('../components/SuccessPanel').SuccessPanelProps, "onCreate" | "onClose">) | undefined;
485
485
  readonly uid?: string;
486
486
  readonly index?: number;
487
487
  }];
@@ -55,7 +55,7 @@ export interface DetailPageDataProps<TModel extends FieldValues> extends Omit<De
55
55
  /**
56
56
  * Show success panel on create/save (Default false)
57
57
  */
58
- successPanelProps?: Omit<SuccessPanelProps<TModel>, 'onCreate' | 'onClose' | 'model'>;
58
+ successPanelProps?: Omit<SuccessPanelProps, 'onCreate' | 'onClose'> | ((model?: TModel) => Omit<SuccessPanelProps, 'onCreate' | 'onClose'>);
59
59
  /**
60
60
  * Event called after succesfull save
61
61
  */
package/dist/coreui.js CHANGED
@@ -456,7 +456,7 @@ function Mx({
456
456
  }) {
457
457
  const [_, M] = Ge(x ?? (n ? n[0].value : "")), D = (B) => () => {
458
458
  M(B), b == null || b(B);
459
- }, z = x || _, U = () => {
459
+ }, z = x || _, P = () => {
460
460
  const B = n == null ? void 0 : n.find((X) => X.value === z);
461
461
  return B == null ? void 0 : B.children;
462
462
  };
@@ -473,7 +473,7 @@ function Mx({
473
473
  } }) : null
474
474
  ] })
475
475
  ] }) : /* @__PURE__ */ c(kr, { rightContent: i, centerContent: a, helperText: s, header: f, icon: g, moreOptions: m, useHeaderIconWrapper: p, styles: w }),
476
- n ? U() : null,
476
+ n ? P() : null,
477
477
  o
478
478
  ] });
479
479
  }
@@ -949,10 +949,10 @@ function qr({
949
949
  }) {
950
950
  const {
951
951
  t: z
952
- } = Ye(), [U, B] = Ge(null), X = (q) => {
952
+ } = Ye(), [P, B] = Ge(null), X = (q) => {
953
953
  B(q.currentTarget);
954
954
  }, V = () => B(null);
955
- return /* @__PURE__ */ O(Zl, { open: U, handleOpen: X, handleClose: V, disabled: I, ...D, children: [
955
+ return /* @__PURE__ */ O(Zl, { open: P, handleOpen: X, handleClose: V, disabled: I, ...D, children: [
956
956
  x ? /* @__PURE__ */ c(Jn, { Icon: Cm, title: (M == null ? void 0 : M.view) ?? z("browse"), handleClick: () => {
957
957
  a == null || a(), V();
958
958
  }, disabled: !s }) : null,
@@ -1095,7 +1095,7 @@ function ty({
1095
1095
  size: M,
1096
1096
  value: D,
1097
1097
  renderOption: z,
1098
- selectRef: U,
1098
+ selectRef: P,
1099
1099
  ...B
1100
1100
  }) {
1101
1101
  const {
@@ -1142,7 +1142,7 @@ function ty({
1142
1142
  borderRadius: 1,
1143
1143
  backgroundColor: "success.main"
1144
1144
  }, children: X("combobox.newLabel") }) })
1145
- }), /* @__PURE__ */ c(ao, { label: _, ...ne, fullWidth: !0, inputRef: U, autoFocus: n, error: g, helperText: p, sx: {
1145
+ }), /* @__PURE__ */ c(ao, { label: _, ...ne, fullWidth: !0, inputRef: P, autoFocus: n, error: g, helperText: p, sx: {
1146
1146
  "& > .MuiFormLabel-root": {
1147
1147
  lineHeight: M === "smaller" ? 1.2 : void 0
1148
1148
  },
@@ -1353,11 +1353,11 @@ function Bu({
1353
1353
  reason: M,
1354
1354
  onAfterDelete: D,
1355
1355
  onAfterSave: z,
1356
- ...U
1356
+ ...P
1357
1357
  } = {}) => {
1358
1358
  const B = M ?? (I ? "fetch" : "create");
1359
1359
  a({
1360
- ...U,
1360
+ ...P,
1361
1361
  data: I,
1362
1362
  reason: B,
1363
1363
  open: !0,
@@ -1535,7 +1535,7 @@ function to(n) {
1535
1535
  } = n, {
1536
1536
  currentForm: D,
1537
1537
  showPrevButton: z,
1538
- showNextButton: U,
1538
+ showNextButton: P,
1539
1539
  prevButtonTitle: B,
1540
1540
  nextButtonTitle: X,
1541
1541
  steps: V,
@@ -1646,7 +1646,7 @@ function to(n) {
1646
1646
  ...M == null ? void 0 : M.prev
1647
1647
  },
1648
1648
  "prev"
1649
- ), Oe = () => !U || _ != null && _.next ? null : /* @__PURE__ */ c(
1649
+ ), Oe = () => !P || _ != null && _.next ? null : /* @__PURE__ */ c(
1650
1650
  Xi,
1651
1651
  {
1652
1652
  onClick: b,
@@ -2113,7 +2113,7 @@ function bt({
2113
2113
  onLayout: M,
2114
2114
  onTabChanged: D,
2115
2115
  onTabs: z,
2116
- panels: U,
2116
+ panels: P,
2117
2117
  rightContent: B,
2118
2118
  selectedTabIndex: X = 0,
2119
2119
  showCommands: V = !0,
@@ -2193,7 +2193,7 @@ function bt({
2193
2193
  J ? /* @__PURE__ */ c(pt, { p: Gr[$], children: J }) : null,
2194
2194
  p ? /* @__PURE__ */ c(pt, { p: Gr[$], children: p }) : null
2195
2195
  ] });
2196
- }, De = () => m ? /* @__PURE__ */ c(py, { loading: x, visible: o, ...w }) : null, ye = () => U != null && U.length ? /* @__PURE__ */ c(gy, { panels: U, sx: {
2196
+ }, De = () => m ? /* @__PURE__ */ c(py, { loading: x, visible: o, ...w }) : null, ye = () => P != null && P.length ? /* @__PURE__ */ c(gy, { panels: P, sx: {
2197
2197
  pt: o ? void 0 : 0
2198
2198
  } }) : null;
2199
2199
  return /* @__PURE__ */ c(Xu, { size: $, disabled: g, loading: x, children: (() => {
@@ -2783,8 +2783,7 @@ function Ny({
2783
2783
  helperText: i,
2784
2784
  onCommands: a,
2785
2785
  onCreate: s,
2786
- onClose: f,
2787
- model: g
2786
+ onClose: f
2788
2787
  }) {
2789
2788
  return /* @__PURE__ */ c(bt.Content, { children: /* @__PURE__ */ O(_t, { flexDirection: "column", justifyContent: "center", alignItems: "center", minHeight: "300px", children: [
2790
2789
  /* @__PURE__ */ O(hn, { sx: {
@@ -2801,7 +2800,6 @@ function Ny({
2801
2800
  /* @__PURE__ */ c(un, { marginTop: 1, display: "block", marginBottom: 5, color: "text.secondary", children: i })
2802
2801
  ] }),
2803
2802
  /* @__PURE__ */ c(hn, { children: a == null ? void 0 : a({
2804
- model: g,
2805
2803
  onCreate: s,
2806
2804
  onClose: f
2807
2805
  }) })
@@ -2902,17 +2900,17 @@ var Pr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
2902
2900
  ro.exports;
2903
2901
  (function(n, o) {
2904
2902
  (function() {
2905
- var i, a = "4.17.21", s = 200, f = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", g = "Expected a function", m = "Invalid `variable` option passed into `_.template`", p = "__lodash_hash_undefined__", x = 500, b = "__lodash_placeholder__", w = 1, I = 2, _ = 4, M = 1, D = 2, z = 1, U = 2, B = 4, X = 8, V = 16, q = 32, $ = 64, A = 128, Z = 256, N = 512, ke = 30, Ee = "...", ae = 800, ne = 16, le = 1, Q = 2, ue = 3, be = 1 / 0, Se = 9007199254740991, We = 17976931348623157e292, De = NaN, ye = 4294967295, qe = ye - 1, J = ye >>> 1, Ae = [
2903
+ var i, a = "4.17.21", s = 200, f = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", g = "Expected a function", m = "Invalid `variable` option passed into `_.template`", p = "__lodash_hash_undefined__", x = 500, b = "__lodash_placeholder__", w = 1, I = 2, _ = 4, M = 1, D = 2, z = 1, P = 2, B = 4, X = 8, V = 16, q = 32, $ = 64, A = 128, Z = 256, N = 512, ke = 30, Ee = "...", ae = 800, ne = 16, le = 1, Q = 2, ue = 3, be = 1 / 0, Se = 9007199254740991, We = 17976931348623157e292, De = NaN, ye = 4294967295, qe = ye - 1, J = ye >>> 1, Ae = [
2906
2904
  ["ary", A],
2907
2905
  ["bind", z],
2908
- ["bindKey", U],
2906
+ ["bindKey", P],
2909
2907
  ["curry", X],
2910
2908
  ["curryRight", V],
2911
2909
  ["flip", N],
2912
2910
  ["partial", q],
2913
2911
  ["partialRight", $],
2914
2912
  ["rearg", Z]
2915
- ], ge = "[object Arguments]", Te = "[object Array]", Oe = "[object AsyncFunction]", j = "[object Boolean]", Y = "[object Date]", fe = "[object DOMException]", se = "[object Error]", et = "[object Function]", ut = "[object GeneratorFunction]", de = "[object Map]", ft = "[object Number]", xt = "[object Null]", it = "[object Object]", kt = "[object Promise]", Nt = "[object Proxy]", Re = "[object RegExp]", ee = "[object Set]", P = "[object String]", ce = "[object Symbol]", _e = "[object Undefined]", Ce = "[object WeakMap]", ze = "[object WeakSet]", lt = "[object ArrayBuffer]", gt = "[object DataView]", Dt = "[object Float32Array]", Bn = "[object Float64Array]", R = "[object Int8Array]", H = "[object Int16Array]", te = "[object Int32Array]", Ve = "[object Uint8Array]", Qe = "[object Uint8ClampedArray]", yt = "[object Uint16Array]", st = "[object Uint32Array]", Mt = /\b__p \+= '';/g, qt = /\b(__p \+=) '' \+/g, $f = /(__e\(.*?\)|\b__t\)) \+\n'';/g, us = /&(?:amp|lt|gt|quot|#39);/g, fs = /[&<>"']/g, Bf = RegExp(us.source), Wf = RegExp(fs.source), Nf = /<%-([\s\S]+?)%>/g, Hf = /<%([\s\S]+?)%>/g, ds = /<%=([\s\S]+?)%>/g, Pf = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Uf = /^\w*$/, Gf = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, bo = /[\\^$.*+?()[\]{}|]/g, Vf = RegExp(bo.source), yo = /^\s+/, Zf = /\s/, Xf = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Jf = /\{\n\/\* \[wrapped with (.+)\] \*/, Kf = /,? & /, Yf = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, qf = /[()=,{}\[\]\/\s]/, Qf = /\\(\\)?/g, jf = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ps = /\w*$/, ed = /^[-+]0x[0-9a-f]+$/i, td = /^0b[01]+$/i, nd = /^\[object .+?Constructor\]$/, rd = /^0o[0-7]+$/i, id = /^(?:0|[1-9]\d*)$/, od = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ti = /($^)/, ld = /['\n\r\u2028\u2029\\]/g, ni = "\\ud800-\\udfff", sd = "\\u0300-\\u036f", ad = "\\ufe20-\\ufe2f", cd = "\\u20d0-\\u20ff", gs = sd + ad + cd, hs = "\\u2700-\\u27bf", ms = "a-z\\xdf-\\xf6\\xf8-\\xff", ud = "\\xac\\xb1\\xd7\\xf7", fd = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", dd = "\\u2000-\\u206f", pd = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", xs = "A-Z\\xc0-\\xd6\\xd8-\\xde", vs = "\\ufe0e\\ufe0f", bs = ud + fd + dd + pd, wo = "['’]", gd = "[" + ni + "]", ys = "[" + bs + "]", ri = "[" + gs + "]", ws = "\\d+", hd = "[" + hs + "]", Ss = "[" + ms + "]", _s = "[^" + ni + bs + ws + hs + ms + xs + "]", So = "\\ud83c[\\udffb-\\udfff]", md = "(?:" + ri + "|" + So + ")", Cs = "[^" + ni + "]", _o = "(?:\\ud83c[\\udde6-\\uddff]){2}", Co = "[\\ud800-\\udbff][\\udc00-\\udfff]", ar = "[" + xs + "]", Is = "\\u200d", ks = "(?:" + Ss + "|" + _s + ")", xd = "(?:" + ar + "|" + _s + ")", Ms = "(?:" + wo + "(?:d|ll|m|re|s|t|ve))?", As = "(?:" + wo + "(?:D|LL|M|RE|S|T|VE))?", Ts = md + "?", Ls = "[" + vs + "]?", vd = "(?:" + Is + "(?:" + [Cs, _o, Co].join("|") + ")" + Ls + Ts + ")*", bd = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", yd = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Fs = Ls + Ts + vd, wd = "(?:" + [hd, _o, Co].join("|") + ")" + Fs, Sd = "(?:" + [Cs + ri + "?", ri, _o, Co, gd].join("|") + ")", _d = RegExp(wo, "g"), Cd = RegExp(ri, "g"), Io = RegExp(So + "(?=" + So + ")|" + Sd + Fs, "g"), Id = RegExp([
2913
+ ], ge = "[object Arguments]", Te = "[object Array]", Oe = "[object AsyncFunction]", j = "[object Boolean]", Y = "[object Date]", fe = "[object DOMException]", se = "[object Error]", et = "[object Function]", ut = "[object GeneratorFunction]", de = "[object Map]", ft = "[object Number]", xt = "[object Null]", it = "[object Object]", kt = "[object Promise]", Nt = "[object Proxy]", Re = "[object RegExp]", ee = "[object Set]", U = "[object String]", ce = "[object Symbol]", _e = "[object Undefined]", Ce = "[object WeakMap]", ze = "[object WeakSet]", lt = "[object ArrayBuffer]", gt = "[object DataView]", Dt = "[object Float32Array]", Bn = "[object Float64Array]", R = "[object Int8Array]", H = "[object Int16Array]", te = "[object Int32Array]", Ve = "[object Uint8Array]", Qe = "[object Uint8ClampedArray]", yt = "[object Uint16Array]", st = "[object Uint32Array]", Mt = /\b__p \+= '';/g, qt = /\b(__p \+=) '' \+/g, $f = /(__e\(.*?\)|\b__t\)) \+\n'';/g, us = /&(?:amp|lt|gt|quot|#39);/g, fs = /[&<>"']/g, Bf = RegExp(us.source), Wf = RegExp(fs.source), Nf = /<%-([\s\S]+?)%>/g, Hf = /<%([\s\S]+?)%>/g, ds = /<%=([\s\S]+?)%>/g, Pf = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Uf = /^\w*$/, Gf = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, bo = /[\\^$.*+?()[\]{}|]/g, Vf = RegExp(bo.source), yo = /^\s+/, Zf = /\s/, Xf = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Jf = /\{\n\/\* \[wrapped with (.+)\] \*/, Kf = /,? & /, Yf = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, qf = /[()=,{}\[\]\/\s]/, Qf = /\\(\\)?/g, jf = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ps = /\w*$/, ed = /^[-+]0x[0-9a-f]+$/i, td = /^0b[01]+$/i, nd = /^\[object .+?Constructor\]$/, rd = /^0o[0-7]+$/i, id = /^(?:0|[1-9]\d*)$/, od = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ti = /($^)/, ld = /['\n\r\u2028\u2029\\]/g, ni = "\\ud800-\\udfff", sd = "\\u0300-\\u036f", ad = "\\ufe20-\\ufe2f", cd = "\\u20d0-\\u20ff", gs = sd + ad + cd, hs = "\\u2700-\\u27bf", ms = "a-z\\xdf-\\xf6\\xf8-\\xff", ud = "\\xac\\xb1\\xd7\\xf7", fd = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", dd = "\\u2000-\\u206f", pd = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", xs = "A-Z\\xc0-\\xd6\\xd8-\\xde", vs = "\\ufe0e\\ufe0f", bs = ud + fd + dd + pd, wo = "['’]", gd = "[" + ni + "]", ys = "[" + bs + "]", ri = "[" + gs + "]", ws = "\\d+", hd = "[" + hs + "]", Ss = "[" + ms + "]", _s = "[^" + ni + bs + ws + hs + ms + xs + "]", So = "\\ud83c[\\udffb-\\udfff]", md = "(?:" + ri + "|" + So + ")", Cs = "[^" + ni + "]", _o = "(?:\\ud83c[\\udde6-\\uddff]){2}", Co = "[\\ud800-\\udbff][\\udc00-\\udfff]", ar = "[" + xs + "]", Is = "\\u200d", ks = "(?:" + Ss + "|" + _s + ")", xd = "(?:" + ar + "|" + _s + ")", Ms = "(?:" + wo + "(?:d|ll|m|re|s|t|ve))?", As = "(?:" + wo + "(?:D|LL|M|RE|S|T|VE))?", Ts = md + "?", Ls = "[" + vs + "]?", vd = "(?:" + Is + "(?:" + [Cs, _o, Co].join("|") + ")" + Ls + Ts + ")*", bd = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", yd = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Fs = Ls + Ts + vd, wd = "(?:" + [hd, _o, Co].join("|") + ")" + Fs, Sd = "(?:" + [Cs + ri + "?", ri, _o, Co, gd].join("|") + ")", _d = RegExp(wo, "g"), Cd = RegExp(ri, "g"), Io = RegExp(So + "(?=" + So + ")|" + Sd + Fs, "g"), Id = RegExp([
2916
2914
  ar + "?" + Ss + "+" + Ms + "(?=" + [ys, ar, "$"].join("|") + ")",
2917
2915
  xd + "+" + As + "(?=" + [ys, ar + ks, "$"].join("|") + ")",
2918
2916
  ar + "?" + ks + "+" + Ms,
@@ -2953,9 +2951,9 @@ ro.exports;
2953
2951
  "parseInt",
2954
2952
  "setTimeout"
2955
2953
  ], Td = -1, je = {};
2956
- je[Dt] = je[Bn] = je[R] = je[H] = je[te] = je[Ve] = je[Qe] = je[yt] = je[st] = !0, je[ge] = je[Te] = je[lt] = je[j] = je[gt] = je[Y] = je[se] = je[et] = je[de] = je[ft] = je[it] = je[Re] = je[ee] = je[P] = je[Ce] = !1;
2954
+ je[Dt] = je[Bn] = je[R] = je[H] = je[te] = je[Ve] = je[Qe] = je[yt] = je[st] = !0, je[ge] = je[Te] = je[lt] = je[j] = je[gt] = je[Y] = je[se] = je[et] = je[de] = je[ft] = je[it] = je[Re] = je[ee] = je[U] = je[Ce] = !1;
2957
2955
  var Xe = {};
2958
- Xe[ge] = Xe[Te] = Xe[lt] = Xe[gt] = Xe[j] = Xe[Y] = Xe[Dt] = Xe[Bn] = Xe[R] = Xe[H] = Xe[te] = Xe[de] = Xe[ft] = Xe[it] = Xe[Re] = Xe[ee] = Xe[P] = Xe[ce] = Xe[Ve] = Xe[Qe] = Xe[yt] = Xe[st] = !0, Xe[se] = Xe[et] = Xe[Ce] = !1;
2956
+ Xe[ge] = Xe[Te] = Xe[lt] = Xe[gt] = Xe[j] = Xe[Y] = Xe[Dt] = Xe[Bn] = Xe[R] = Xe[H] = Xe[te] = Xe[de] = Xe[ft] = Xe[it] = Xe[Re] = Xe[ee] = Xe[U] = Xe[ce] = Xe[Ve] = Xe[Qe] = Xe[yt] = Xe[st] = !0, Xe[se] = Xe[et] = Xe[Ce] = !1;
2959
2957
  var Ld = {
2960
2958
  // Latin-1 Supplement block.
2961
2959
  À: "A",
@@ -4554,7 +4552,7 @@ ro.exports;
4554
4552
  });
4555
4553
  }
4556
4554
  function Ai(e, t, r, l, u, h, v, y, C, L) {
4557
- var F = t & A, E = t & z, W = t & U, K = t & (X | V), ie = t & N, ve = W ? i : Br(e);
4555
+ var F = t & A, E = t & z, W = t & P, K = t & (X | V), ie = t & N, ve = W ? i : Br(e);
4558
4556
  function oe() {
4559
4557
  for (var Ie = arguments.length, Le = k(Ie), Vt = Ie; Vt--; )
4560
4558
  Le[Vt] = arguments[Vt];
@@ -4639,7 +4637,7 @@ ro.exports;
4639
4637
  }
4640
4638
  function Pa(e, t, r, l, u, h, v, y, C, L) {
4641
4639
  var F = t & X, E = F ? v : i, W = F ? i : v, K = F ? h : i, ie = F ? i : h;
4642
- t |= F ? q : $, t &= ~(F ? $ : q), t & B || (t &= ~(z | U));
4640
+ t |= F ? q : $, t &= ~(F ? $ : q), t & B || (t &= ~(z | P));
4643
4641
  var ve = [
4644
4642
  e,
4645
4643
  t,
@@ -4674,7 +4672,7 @@ ro.exports;
4674
4672
  };
4675
4673
  }
4676
4674
  function Mn(e, t, r, l, u, h, v, y) {
4677
- var C = t & U;
4675
+ var C = t & P;
4678
4676
  if (!C && typeof e != "function")
4679
4677
  throw new en(g);
4680
4678
  var L = l ? l.length : 0;
@@ -4757,7 +4755,7 @@ ro.exports;
4757
4755
  case se:
4758
4756
  return e.name == t.name && e.message == t.message;
4759
4757
  case Re:
4760
- case P:
4758
+ case U:
4761
4759
  return e == t + "";
4762
4760
  case de:
4763
4761
  var y = zo;
@@ -4951,7 +4949,7 @@ ro.exports;
4951
4949
  case de:
4952
4950
  return new l();
4953
4951
  case ft:
4954
- case P:
4952
+ case U:
4955
4953
  return new l(e);
4956
4954
  case Re:
4957
4955
  return Ap(e);
@@ -5025,7 +5023,7 @@ ro.exports;
5025
5023
  return t;
5026
5024
  }
5027
5025
  function qp(e, t) {
5028
- var r = e[1], l = t[1], u = r | l, h = u < (z | U | A), v = l == A && r == X || l == A && r == Z && e[7].length <= t[8] || l == (A | Z) && t[7].length <= t[8] && r == X;
5026
+ var r = e[1], l = t[1], u = r | l, h = u < (z | P | A), v = l == A && r == X || l == A && r == Z && e[7].length <= t[8] || l == (A | Z) && t[7].length <= t[8] && r == X;
5029
5027
  if (!(h || v))
5030
5028
  return e;
5031
5029
  l & z && (e[2] = t[2], u |= r & z ? 0 : B);
@@ -5593,7 +5591,7 @@ ro.exports;
5593
5591
  }
5594
5592
  return Mn(e, l, t, r, u);
5595
5593
  }), mc = we(function(e, t, r) {
5596
- var l = z | U;
5594
+ var l = z | P;
5597
5595
  if (r.length) {
5598
5596
  var u = Hn(r, br(mc));
5599
5597
  l |= q;
@@ -5879,7 +5877,7 @@ ro.exports;
5879
5877
  }
5880
5878
  var Cc = Bs ? Pt(Bs) : gp;
5881
5879
  function Hi(e) {
5882
- return typeof e == "string" || !he(e) && ot(e) && At(e) == P;
5880
+ return typeof e == "string" || !he(e) && ot(e) && At(e) == U;
5883
5881
  }
5884
5882
  function Gt(e) {
5885
5883
  return typeof e == "symbol" || ot(e) && At(e) == ce;
@@ -6553,7 +6551,7 @@ function print() { __p += __j.call(arguments, '') }
6553
6551
  var l = r.name + "";
6554
6552
  Pe.call(hr, l) || (hr[l] = []), hr[l].push({ name: t, func: r });
6555
6553
  }
6556
- }), hr[Ai(i, U).name] = [{
6554
+ }), hr[Ai(i, P).name] = [{
6557
6555
  name: "wrapper",
6558
6556
  func: i
6559
6557
  }], Me.prototype.clone = M0, Me.prototype.reverse = A0, Me.prototype.value = T0, d.prototype.at = ig, d.prototype.chain = og, d.prototype.commit = lg, d.prototype.next = sg, d.prototype.plant = cg, d.prototype.reverse = ug, d.prototype.toJSON = d.prototype.valueOf = d.prototype.value = fg, d.prototype.first = d.prototype.head, Ar && (d.prototype[Ar] = ag), d;
@@ -6720,7 +6718,7 @@ function qy({
6720
6718
  enableDelete: M,
6721
6719
  enableDiscardChanges: D,
6722
6720
  enableSave: z = !0,
6723
- error: U,
6721
+ error: P,
6724
6722
  form: B,
6725
6723
  hotkeyScopes: X = ls,
6726
6724
  loading: V,
@@ -6754,18 +6752,18 @@ function qy({
6754
6752
  } = cf();
6755
6753
  Ke(() => {
6756
6754
  var ee;
6757
- U && ((ee = j.current) == null || ee.scrollIntoView({
6755
+ P && ((ee = j.current) == null || ee.scrollIntoView({
6758
6756
  behavior: "smooth",
6759
6757
  block: "start",
6760
6758
  inline: "nearest"
6761
6759
  }));
6762
- }, [U]);
6760
+ }, [P]);
6763
6761
  const fe = () => {
6764
- const ee = se(), P = ut(), ce = de(), _e = Re(ee, ce, P), Ce = {
6762
+ const ee = se(), U = ut(), ce = de(), _e = Re(ee, ce, U), Ce = {
6765
6763
  content: ee,
6766
6764
  pageContent: _e,
6767
6765
  commandsContent: ce,
6768
- alertsContent: P,
6766
+ alertsContent: U,
6769
6767
  options: {
6770
6768
  loading: V,
6771
6769
  reason: ye,
@@ -6774,9 +6772,9 @@ function qy({
6774
6772
  };
6775
6773
  return We ? We(Ce) : _e;
6776
6774
  }, se = () => {
6777
- const ee = a, P = et(), ce = Nt(), _e = {
6775
+ const ee = a, U = et(), ce = Nt(), _e = {
6778
6776
  content: ee,
6779
- autoSaveContent: P,
6777
+ autoSaveContent: U,
6780
6778
  stepsContent: ce,
6781
6779
  options: {
6782
6780
  loading: V,
@@ -6810,13 +6808,13 @@ function qy({
6810
6808
  };
6811
6809
  if ($)
6812
6810
  return $(ee);
6813
- const P = ne == null ? void 0 : ne();
6814
- return /* @__PURE__ */ c(to, { ...ee, children: P });
6811
+ const U = ne == null ? void 0 : ne();
6812
+ return /* @__PURE__ */ c(to, { ...ee, children: U });
6815
6813
  }, xt = () => {
6816
6814
  if (!(J != null && J.length))
6817
6815
  return null;
6818
- const ee = J[n].key, P = J[n].name, ce = P && Y.get(P), _e = n < J.length - 1 ? J[n + 1].label : void 0, Ce = n > 0 ? J[n - 1].label : void 0, ze = () => {
6819
- ce && B.setValue(P, ce.getValues(), {
6816
+ const ee = J[n].key, U = J[n].name, ce = U && Y.get(U), _e = n < J.length - 1 ? J[n + 1].label : void 0, Ce = n > 0 ? J[n - 1].label : void 0, ze = () => {
6817
+ ce && B.setValue(U, ce.getValues(), {
6820
6818
  shouldValidate: !0,
6821
6819
  shouldDirty: !0
6822
6820
  });
@@ -6857,7 +6855,7 @@ function qy({
6857
6855
  steps: J,
6858
6856
  currentKey: ee,
6859
6857
  currentForm: ce,
6860
- name: P,
6858
+ name: U,
6861
6859
  saveCommandMode: p
6862
6860
  }
6863
6861
  };
@@ -6868,15 +6866,15 @@ function qy({
6868
6866
  }, it = (ee) => {
6869
6867
  if (!qe)
6870
6868
  return null;
6871
- const P = {
6869
+ const U = {
6872
6870
  ...ee,
6873
6871
  reason: ye
6874
6872
  };
6875
- return le ? le(P) : /* @__PURE__ */ c(Uu, { ...P });
6873
+ return le ? le(U) : /* @__PURE__ */ c(Uu, { ...U });
6876
6874
  }, kt = () => b ? null : /* @__PURE__ */ c(Jy, { onSave: ue, onSaveClose: be, onSaveCreate: Se, onNewItem: N, onDelete: ke, scopes: X, defaultSaveMode: p }), Nt = () => {
6877
6875
  if (!(J != null && J.length))
6878
6876
  return null;
6879
- const P = /* @__PURE__ */ c(g ?? Ju, { items: J, activeStep: n, ...Ae }), ce = ({
6877
+ const U = /* @__PURE__ */ c(g ?? Ju, { items: J, activeStep: n, ...Ae }), ce = ({
6880
6878
  children: _e,
6881
6879
  name: Ce,
6882
6880
  schema: ze,
@@ -6885,7 +6883,7 @@ function qy({
6885
6883
  key: Dt
6886
6884
  }) => Ce ? /* @__PURE__ */ c(Yy, { name: Ce, schema: ze, defaultValues: gt, validationOptions: lt, children: _e }, Dt) : _e;
6887
6885
  return /* @__PURE__ */ O(Ue, { children: [
6888
- P,
6886
+ U,
6889
6887
  J.map((_e, Ce) => {
6890
6888
  if (Ce === n)
6891
6889
  return /* @__PURE__ */ c(hn, { children: ce(_e) }, _e.key);
@@ -6895,9 +6893,9 @@ function qy({
6895
6893
  }, children: ce(_e) }, _e.key);
6896
6894
  })
6897
6895
  ] });
6898
- }, Re = (ee, P, ce) => {
6896
+ }, Re = (ee, U, ce) => {
6899
6897
  const _e = !!(J != null && J.length), Ce = typeof ge == "function" ? ge(m) : ge;
6900
- return /* @__PURE__ */ O(bt, { title: Oe(ye === "fetch" ? "edit" : ye === "view" ? "browse" : "newitem"), tabsPosition: "in-subrow", ...Te, tabExtraContent: Ce, disabled: x || De || V || ye === "view", commandsContent: P, commandsPosition: _e ? "bottom-between" : s, onHeader: it, onClose: q, loading: V, alertsContent: ce, onTabChanged: ({
6898
+ return /* @__PURE__ */ O(bt, { title: Oe(ye === "fetch" ? "edit" : ye === "view" ? "browse" : "newitem"), tabsPosition: "in-subrow", ...Te, tabExtraContent: Ce, disabled: x || De || V || ye === "view", commandsContent: U, commandsPosition: _e ? "bottom-between" : s, onHeader: it, onClose: q, loading: V, alertsContent: ce, onTabChanged: ({
6901
6899
  selectedTabIndex: ze
6902
6900
  }) => ae == null ? void 0 : ae(ze), selectedTabIndex: n, children: [
6903
6901
  ee,
@@ -6924,7 +6922,7 @@ function Qy({
6924
6922
  onSave: M,
6925
6923
  reason: D = "create",
6926
6924
  showSuccessMessages: z = !0,
6927
- successPanelProps: U,
6925
+ successPanelProps: P,
6928
6926
  ...B
6929
6927
  }) {
6930
6928
  const {
@@ -6955,7 +6953,7 @@ function Qy({
6955
6953
  mode: Ae
6956
6954
  };
6957
6955
  let Oe = M == null ? void 0 : M(Te, s);
6958
- no(Oe) && (Oe = await V(Oe)), ke(Oe ?? ge), z && !o && Yi.success(X("savedsuccesfully")), D === "create" && U && !o && N(!0), m == null || m(Oe, Te, s);
6956
+ no(Oe) && (Oe = await V(Oe)), ke(Oe ?? ge), z && !o && Yi.success(X("savedsuccesfully")), D === "create" && P && !o && N(!0), m == null || m(Oe, Te, s);
6959
6957
  }, be = async () => {
6960
6958
  await ue();
6961
6959
  }, Se = async () => {
@@ -6985,13 +6983,13 @@ function Qy({
6985
6983
  return /* @__PURE__ */ c(qy, { ...B, form: s, alerts: Q, error: a, data: i ?? ne, autoSave: o, loading: f || q || le, reason: D, onCreate: () => qe(), onCopy: () => qe("copy"), onSaveCreate: () => void Se(), onSaveClose: () => void We(), onSave: () => void be(), onDelete: () => void De(), onNavigate: (Ae) => void J(Ae), onDiscardChanges: ye, onClose: p, onLayout: (Ae) => {
6986
6984
  let ge = Ae;
6987
6985
  if (Z) {
6988
- const Te = ae();
6986
+ const Te = typeof P == "object" ? P : P == null ? void 0 : P(ae());
6989
6987
  ge = {
6990
6988
  ...Ae,
6991
6989
  tabsContent: null,
6992
6990
  tabsHeaderContent: null,
6993
6991
  footerContent: null,
6994
- content: /* @__PURE__ */ c(Ny, { title: X("savedsuccesfully"), ...U, model: Te, onCreate: () => qe(), onClose: () => p == null ? void 0 : p("close-button") })
6992
+ content: /* @__PURE__ */ c(Ny, { title: X("savedsuccesfully"), ...Te, onCreate: () => qe(), onClose: () => p == null ? void 0 : p("close-button") })
6995
6993
  };
6996
6994
  }
6997
6995
  return w ? w(ge) : /* @__PURE__ */ c(bt.Layout, { ...ge });
@@ -7143,7 +7141,7 @@ function ss({
7143
7141
  segment: M,
7144
7142
  setSegment: D,
7145
7143
  disabled: z,
7146
- readonly: U
7144
+ readonly: P
7147
7145
  } = Nu({
7148
7146
  uniqueIdParamName: m,
7149
7147
  enableSegmentRouting: a,
@@ -7190,7 +7188,7 @@ function ss({
7190
7188
  }, activeSegmentIndex: M, onSegmentChanged: D, onContentLayout: ($) => /* @__PURE__ */ O(Ue, { children: [
7191
7189
  /* @__PURE__ */ c(t4, { ...i }),
7192
7190
  /* @__PURE__ */ c(Yl, { ...$ })
7193
- ] }), disabled: z || U, ...p });
7191
+ ] }), disabled: z || P, ...p });
7194
7192
  }
7195
7193
  ss.useDetailPageRouteParams = Nu;
7196
7194
  function n4({
@@ -7207,7 +7205,7 @@ function Wt({
7207
7205
  }) {
7208
7206
  const [s, f] = Ge(n), [g, m] = Ge(o);
7209
7207
  return /* @__PURE__ */ c(ff, { reason: s, onReasonChange: (x) => {
7210
- f(x), i == null || i(x);
7208
+ f(x), i == null || i(x), m(o);
7211
7209
  }, activeSegmentIndex: g, onSegmentChanged: m, ...a });
7212
7210
  }
7213
7211
  Wt.Header = Uu;
@@ -7403,7 +7401,7 @@ function Kn({
7403
7401
  newRowButtonText: M,
7404
7402
  newRowButtonContent: D,
7405
7403
  onCellProps: z,
7406
- onFooterCellProps: U,
7404
+ onFooterCellProps: P,
7407
7405
  onHeadCellProps: B,
7408
7406
  onNewRow: X,
7409
7407
  onRenderNestedComponent: V,
@@ -7609,7 +7607,7 @@ function Kn({
7609
7607
  return /* @__PURE__ */ c(or, { children: /* @__PURE__ */ c(Ji, { colSpan: R == null ? void 0 : R.length, children: /* @__PURE__ */ c(gf, { emptyText: m ?? Ae("nodatafound"), showEmptyImage: Se, sx: {
7610
7608
  py: 2
7611
7609
  } }) }) });
7612
- }, P = (R, H, te) => {
7610
+ }, U = (R, H, te) => {
7613
7611
  const Ve = H.getVisibleCells();
7614
7612
  return /* @__PURE__ */ c(Wl, { className: "description-row", sx: te, children: /* @__PURE__ */ c(_r, { colSpan: Ve == null ? void 0 : Ve.length, title: eo(R), size: ae, ellipsis: !0, sx: {
7615
7613
  pt: 0
@@ -7659,7 +7657,7 @@ function Kn({
7659
7657
  },
7660
7658
  te.getVisibleCells().map(Re)
7661
7659
  ),
7662
- Ve ? P(Ve, te, {
7660
+ Ve ? U(Ve, te, {
7663
7661
  ...Ee,
7664
7662
  ...st == null ? void 0 : st.sx
7665
7663
  }) : null,
@@ -7700,7 +7698,7 @@ function Kn({
7700
7698
  }, Dt = () => Q ? /* @__PURE__ */ c(R3, { children: de.getFooterGroups().map((R) => /* @__PURE__ */ c(or, { sx: {
7701
7699
  backgroundColor: Be(Y.palette.primary.main, 0.05)
7702
7700
  }, children: R.headers.map((H) => {
7703
- const te = U == null ? void 0 : U(H, de);
7701
+ const te = P == null ? void 0 : P(H, de);
7704
7702
  return /* @__PURE__ */ c(_r, { size: ae, colSpan: H.colSpan, ...te, children: H.isPlaceholder ? null : Rl(H.column.columnDef.footer, H.getContext()) }, H.id);
7705
7703
  }) }, R.id)) }) : null, Bn = (R) => {
7706
7704
  if (!w || !_ || !Te.current)
@@ -7792,7 +7790,7 @@ function as({
7792
7790
  enableDeleteAllButton: M,
7793
7791
  enableRowClickToDetails: D,
7794
7792
  headerProps: z,
7795
- name: U,
7793
+ name: P,
7796
7794
  newItemTitle: B,
7797
7795
  onDelete: X,
7798
7796
  onSave: V,
@@ -7807,10 +7805,10 @@ function as({
7807
7805
  keyFieldName: ke
7808
7806
  } = Yt(), [Ee, ae] = Ge([]);
7809
7807
  of({
7810
- name: U
7808
+ name: P
7811
7809
  });
7812
7810
  const ne = Lm({
7813
- name: U,
7811
+ name: P,
7814
7812
  keyName: Bl
7815
7813
  }), {
7816
7814
  fields: le,
@@ -7835,8 +7833,8 @@ function as({
7835
7833
  }), {
7836
7834
  fields: Ae,
7837
7835
  callOutVisibility: ge
7838
- } = Qr(), Te = ge === "all" || ge === "selected-fields" && (Ae == null ? void 0 : Ae.includes(U)), Oe = nf({
7839
- name: U,
7836
+ } = Qr(), Te = ge === "all" || ge === "selected-fields" && (Ae == null ? void 0 : Ae.includes(P)), Oe = nf({
7837
+ name: P,
7840
7838
  disabled: !Te
7841
7839
  }), [j, {
7842
7840
  onClose: Y,
@@ -7850,7 +7848,7 @@ function as({
7850
7848
  header: () => null,
7851
7849
  enableSorting: !1,
7852
7850
  cell(Re) {
7853
- const ee = Re.row.original, P = {
7851
+ const ee = Re.row.original, U = {
7854
7852
  onDelete: () => {
7855
7853
  const ce = De(ee);
7856
7854
  ue(ce);
@@ -7877,19 +7875,19 @@ function as({
7877
7875
  index: Re.row.index,
7878
7876
  ...qe
7879
7877
  };
7880
- return q ? q(P) : /* @__PURE__ */ c(qr, { ...P });
7878
+ return q ? q(U) : /* @__PURE__ */ c(qr, { ...U });
7881
7879
  },
7882
7880
  ...p
7883
7881
  }], [n, o, i, m, p, qe, De, j, ue, q, a, s, f]), ut = xe((Re) => {
7884
7882
  const {
7885
7883
  model: ee,
7886
- reason: P,
7884
+ reason: U,
7887
7885
  data: ce
7888
7886
  } = Re, _e = () => {
7889
7887
  if (A != null && A.length) {
7890
7888
  const Ce = J({
7891
7889
  model: ee,
7892
- reason: P,
7890
+ reason: U,
7893
7891
  uid: fe
7894
7892
  });
7895
7893
  if (Ce.length)
@@ -7897,7 +7895,7 @@ function as({
7897
7895
  messages: Ce
7898
7896
  });
7899
7897
  }
7900
- if (P === "fetch") {
7898
+ if (U === "fetch") {
7901
7899
  const Ce = We(fe), ze = Object.assign({}, ce, ee, {
7902
7900
  [ou]: "modified"
7903
7901
  });
@@ -7910,18 +7908,18 @@ function as({
7910
7908
  };
7911
7909
  return V ? V(Re, ne, _e, J) : _e();
7912
7910
  }, [A == null ? void 0 : A.length, V, ne, J, fe, We, be, Q, ke]), de = xe((Re) => {
7913
- const ee = We(fe), P = (X == null ? void 0 : X(Re, ee)) ?? ee;
7914
- ue(P), Y();
7911
+ const ee = We(fe), U = (X == null ? void 0 : X(Re, ee)) ?? ee;
7912
+ ue(U), Y();
7915
7913
  }, [We, Y, X, ue, fe]), ft = () => /* @__PURE__ */ c(Kn, { showEmptyImage: !1, ...Z, rowIdField: Bl, data: le, enableSorting: !0, state: {
7916
7914
  sorting: Ee
7917
7915
  }, onSortingChange: ae, getSortedRowModel: _u(), columns: et, onRowClick: (Re, ee) => {
7918
7916
  if (!D || _ || typeof D == "function" && !D(ee.original))
7919
7917
  return;
7920
- const P = typeof D == "string" ? D : "view";
7918
+ const U = typeof D == "string" ? D : "view";
7921
7919
  j({
7922
7920
  data: ee.original,
7923
- reason: P,
7924
- disabled: P === "view"
7921
+ reason: U,
7922
+ disabled: U === "view"
7925
7923
  });
7926
7924
  } }), xt = () => {
7927
7925
  const Re = {
@@ -7930,7 +7928,7 @@ function as({
7930
7928
  onDelete: de,
7931
7929
  enableCopy: n,
7932
7930
  onSave: ut,
7933
- hotkeyScopes: `${U}-${ls}`,
7931
+ hotkeyScopes: `${P}-${ls}`,
7934
7932
  children: g,
7935
7933
  showSuccessMessages: !1,
7936
7934
  header: _ ? N("browse") : (se == null ? void 0 : se.reason) === "fetch" ? N("edit") : N("newitem"),
@@ -7951,10 +7949,10 @@ function as({
7951
7949
  };
7952
7950
  return x ? x(Re) : /* @__PURE__ */ c(wf, { ...Re });
7953
7951
  }, kt = () => {
7954
- const Re = ft(), ee = xt(), P = it(), ce = {
7952
+ const Re = ft(), ee = xt(), U = it(), ce = {
7955
7953
  tableContent: Re,
7956
7954
  detailPageContent: ee,
7957
- commandsContent: P,
7955
+ commandsContent: U,
7958
7956
  errors: Oe,
7959
7957
  headerProps: z,
7960
7958
  rowCount: le == null ? void 0 : le.length,
@@ -8406,7 +8404,7 @@ function Mf({
8406
8404
  icon: M,
8407
8405
  rightContent: D,
8408
8406
  selectedIcon: z,
8409
- sx: U,
8407
+ sx: P,
8410
8408
  children: B,
8411
8409
  disabled: X
8412
8410
  }) => /* @__PURE__ */ c(
@@ -8420,7 +8418,7 @@ function Mf({
8420
8418
  rightContent: D,
8421
8419
  selectedIcon: g === "horizontal" ? "" : z,
8422
8420
  deleteable: g === "horizontal" ? !1 : I,
8423
- sx: U,
8421
+ sx: P,
8424
8422
  children: B,
8425
8423
  onDelete: () => {
8426
8424
  s || n == null || n(w);
@@ -8681,7 +8679,7 @@ function z4({
8681
8679
  optionImg: M,
8682
8680
  optionImgProps: D,
8683
8681
  optionTemplate: z = Du,
8684
- optionAsValue: U,
8682
+ optionAsValue: P,
8685
8683
  readOnly: B,
8686
8684
  selectInitialOption: X,
8687
8685
  selectRef: V,
@@ -8703,8 +8701,8 @@ function z4({
8703
8701
  descriptionTemplate: a
8704
8702
  }), Q = Je(() => {
8705
8703
  let j = A;
8706
- return U && (j = N ? A == null ? void 0 : A.map((Y) => an.get(Y, Z)) : an.get(A, Z)), Eu(j);
8707
- }, [N, U, A, Z]);
8704
+ return P && (j = N ? A == null ? void 0 : A.map((Y) => an.get(Y, Z)) : an.get(A, Z)), Eu(j);
8705
+ }, [N, P, A, Z]);
8708
8706
  xo(() => {
8709
8707
  if (i != null && i.length && X) {
8710
8708
  const j = typeof X == "function" ? i.find(X) : i[0], Y = an.get(j, Z);
@@ -8731,7 +8729,7 @@ function z4({
8731
8729
  };
8732
8730
  }, be = (j) => Array.isArray(j) ? j.map(be) : i == null ? void 0 : i.find((Y) => an.get(Y, Z) === j), Se = (j, Y) => {
8733
8731
  const fe = j.target.value;
8734
- if (U && fe) {
8732
+ if (P && fe) {
8735
8733
  const se = be(fe);
8736
8734
  _ == null || _({
8737
8735
  target: {
@@ -8801,7 +8799,7 @@ function z4({
8801
8799
  }), ye = (j) => {
8802
8800
  if (!j)
8803
8801
  return null;
8804
- const Y = U ? j : be(j);
8802
+ const Y = P ? j : be(j);
8805
8803
  return Y ? Array.isArray(Y) ? Y.map((fe) => ae == null ? void 0 : ae(fe)).join(", ") : ae == null ? void 0 : ae(Y) : null;
8806
8804
  }, qe = () => /* @__PURE__ */ O(ku, { ...Ee, readOnly: B, notched: N ? !!(A != null && A.length) : !!A, error: m, multiple: N, ref: V, labelId: `${w}-label`, id: `${w}-select`, label: I, value: Q, title: N && eo(ye(A)) || "", onChange: Se, disabled: s, MenuProps: {
8807
8805
  PaperProps: {
@@ -8914,7 +8912,7 @@ function He({
8914
8912
  } = rs(), z = Je(() => M(s), [M, s]), {
8915
8913
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
8916
8914
  field: {
8917
- disabled: U,
8915
+ disabled: P,
8918
8916
  ...B
8919
8917
  },
8920
8918
  fieldState: X
@@ -8993,7 +8991,7 @@ function Mw({
8993
8991
  const [b, w] = Ge(!1), I = dt(null), {
8994
8992
  t: _
8995
8993
  } = Ye(), M = (z) => {
8996
- z.stopPropagation(), p == null || p(!b), w((U) => !U);
8994
+ z.stopPropagation(), p == null || p(!b), w((P) => !P);
8997
8995
  }, D = (z) => {
8998
8996
  I.current && I.current.contains(z.target) || w(!1);
8999
8997
  };
@@ -9009,9 +9007,9 @@ function Mw({
9009
9007
  zIndex: (z) => z.zIndex.modal + 1
9010
9008
  }, open: b, anchorEl: I.current, role: void 0, transition: !0, disablePortal: !0, children: ({
9011
9009
  TransitionProps: z,
9012
- placement: U
9010
+ placement: P
9013
9011
  }) => /* @__PURE__ */ c(Nm, { ...z, style: {
9014
- transformOrigin: U === "bottom" ? "center top" : "center bottom"
9012
+ transformOrigin: P === "bottom" ? "center top" : "center bottom"
9015
9013
  }, children: /* @__PURE__ */ c(Hm, { children: /* @__PURE__ */ c(Pm, { onClickAway: D, children: /* @__PURE__ */ O(Um, { id: "split-button-menu", autoFocusItem: !0, sx: {
9016
9014
  textAlign: "left",
9017
9015
  maxHeight: i,
@@ -9096,8 +9094,8 @@ function G4({
9096
9094
  if (!n)
9097
9095
  return m ? p : null;
9098
9096
  const D = g ?? (a ? _ : o ? I : w);
9099
- let z, U = M;
9100
- f != null && (U = f), U ? z = Et.utc(n, i).local() : z = Et(n, i);
9097
+ let z, P = M;
9098
+ f != null && (P = f), P ? z = Et.utc(n, i).local() : z = Et(n, i);
9101
9099
  const B = z.format(g ?? D);
9102
9100
  return /* @__PURE__ */ O(_t, { alignItems: "center", title: B, ...x, ref: b, gap: 1, children: [
9103
9101
  s && /* @__PURE__ */ c(U4, { sx: {
@@ -9251,7 +9249,7 @@ function Ef(n) {
9251
9249
  ...m == null ? void 0 : m.search
9252
9250
  },
9253
9251
  "search"
9254
- ), U = () => !x.clear || g != null && g.clear ? null : /* @__PURE__ */ c(
9252
+ ), P = () => !x.clear || g != null && g.clear ? null : /* @__PURE__ */ c(
9255
9253
  Zr,
9256
9254
  {
9257
9255
  startIcon: /* @__PURE__ */ c(su, {}),
@@ -9331,7 +9329,7 @@ function Ef(n) {
9331
9329
  return $.length ? /* @__PURE__ */ c(go, { options: $ }, "more-options") : null;
9332
9330
  };
9333
9331
  return /* @__PURE__ */ c(Ue, { children: (() => {
9334
- const $ = V(), A = z(), Z = B(), N = U(), ke = X();
9332
+ const $ = V(), A = z(), Z = B(), N = P(), ke = X();
9335
9333
  return /* @__PURE__ */ O(Ue, { children: [
9336
9334
  f,
9337
9335
  [Z, N, ke, A],
@@ -9396,7 +9394,7 @@ function Q4({
9396
9394
  const {
9397
9395
  t: b
9398
9396
  } = Ye(), I = s == null ? void 0 : s.map((M, D) => {
9399
- const z = p(M, D), U = n ? /* @__PURE__ */ c(qr, { ...z }) : void 0, B = g(M, U, z);
9397
+ const z = p(M, D), P = n ? /* @__PURE__ */ c(qr, { ...z }) : void 0, B = g(M, P, z);
9400
9398
  return /* @__PURE__ */ c(El, { size: {
9401
9399
  lg: 3,
9402
9400
  md: 4,
@@ -9499,7 +9497,7 @@ function r5({
9499
9497
  enableRowClickToDetails: M,
9500
9498
  enableClear: D,
9501
9499
  enableCreateItem: z = !0,
9502
- enableRefetch: U,
9500
+ enableRefetch: P,
9503
9501
  enableExport: B,
9504
9502
  enableSearch: X,
9505
9503
  error: V,
@@ -9530,8 +9528,8 @@ function r5({
9530
9528
  t: Oe
9531
9529
  } = Ye(), j = dt(null);
9532
9530
  Ke(() => {
9533
- var P;
9534
- V && ((P = j.current) == null || P.scrollIntoView({
9531
+ var U;
9532
+ V && ((U = j.current) == null || U.scrollIntoView({
9535
9533
  behavior: "smooth",
9536
9534
  block: "start",
9537
9535
  inline: "nearest"
@@ -9540,17 +9538,17 @@ function r5({
9540
9538
  const [Y, fe] = Bu({
9541
9539
  models: x,
9542
9540
  uniqueIdParamName: (qe == null ? void 0 : qe.rowIdField) ?? bf
9543
- }), se = xe((P, ce) => {
9544
- if (typeof Q == "function" ? !0 : !!(Q != null && Q[P]))
9541
+ }), se = xe((U, ce) => {
9542
+ if (typeof Q == "function" ? !0 : !!(Q != null && Q[U]))
9545
9543
  return Y({
9546
9544
  data: ce,
9547
- reason: P,
9545
+ reason: U,
9548
9546
  disabled: w
9549
9547
  });
9550
- N == null || N(P, ce);
9548
+ N == null || N(U, ce);
9551
9549
  }, [w, N, Q, Y]), et = () => {
9552
- const P = A === "card" ? kt() : Nt(), ce = it(), _e = xt(), Ce = Re(), ze = de(), lt = ut(_e, ce, q, P), gt = ee(), Dt = {
9553
- tableContent: P,
9550
+ const U = A === "card" ? kt() : Nt(), ce = it(), _e = xt(), Ce = Re(), ze = de(), lt = ut(_e, ce, q, U), gt = ee(), Dt = {
9551
+ tableContent: U,
9554
9552
  pageContent: lt,
9555
9553
  commandsContent: _e,
9556
9554
  alertsContent: ce,
@@ -9564,7 +9562,7 @@ function r5({
9564
9562
  Ce,
9565
9563
  ze
9566
9564
  ] });
9567
- }, ut = (P, ce, _e, Ce) => /* @__PURE__ */ c(bt, { icon: /* @__PURE__ */ c(Af, { sx: {
9565
+ }, ut = (U, ce, _e, Ce) => /* @__PURE__ */ c(bt, { icon: /* @__PURE__ */ c(Af, { sx: {
9568
9566
  color: "primary.main"
9569
9567
  } }), ...Te, morePanelProps: {
9570
9568
  moreText: Oe("listpage.showmorefilter"),
@@ -9573,21 +9571,21 @@ function r5({
9573
9571
  pt: 0
9574
9572
  },
9575
9573
  ...Te == null ? void 0 : Te.morePanelProps
9576
- }, disabled: w, commandsContent: P, onHeader: ft, onClose: ae, loading: Z, alertsContent: ce, onTabChanged: ye, selectedTabIndex: n, onLayout: (ze) => We ? We({
9574
+ }, disabled: w, commandsContent: U, onHeader: ft, onClose: ae, loading: Z, alertsContent: ce, onTabChanged: ye, selectedTabIndex: n, onLayout: (ze) => We ? We({
9577
9575
  ...ze,
9578
9576
  filterContent: _e,
9579
9577
  tableContent: Ce
9580
- }) : /* @__PURE__ */ c(Rf, { ...ze, filterContent: _e, tableContent: Ce }), children: g }), de = () => I ? null : /* @__PURE__ */ c(n5, { onSearch: De, onCreateItem: () => se("create"), onClear: Ee, scopes: $, onExport: ue }), ft = (P) => {
9578
+ }) : /* @__PURE__ */ c(Rf, { ...ze, filterContent: _e, tableContent: Ce }), children: g }), de = () => I ? null : /* @__PURE__ */ c(n5, { onSearch: De, onCreateItem: () => se("create"), onClear: Ee, scopes: $, onExport: ue }), ft = (U) => {
9581
9579
  if (!Ae)
9582
9580
  return null;
9583
9581
  const ce = {
9584
- ...P,
9582
+ ...U,
9585
9583
  dataCount: b ?? (x == null ? void 0 : x.length) ?? 0,
9586
9584
  showDataCount: ge
9587
9585
  };
9588
9586
  return Se ? Se(ce) : /* @__PURE__ */ c(j4, { ...ce });
9589
9587
  }, xt = () => {
9590
- const P = {
9588
+ const U = {
9591
9589
  onExcelExport: ue,
9592
9590
  onSearch: De,
9593
9591
  onCreateItem: () => se("create"),
@@ -9595,25 +9593,25 @@ function r5({
9595
9593
  commandsProps: p
9596
9594
  };
9597
9595
  if (ne)
9598
- return ne(P);
9596
+ return ne(U);
9599
9597
  const ce = be == null ? void 0 : be();
9600
- return /* @__PURE__ */ c(Ef, { ...P, children: ce });
9598
+ return /* @__PURE__ */ c(Ef, { ...U, children: ce });
9601
9599
  }, it = () => {
9602
- const P = a ?? [];
9603
- return V && P.push(...is(V)), /* @__PURE__ */ O(hn, { ref: j, children: [
9604
- /* @__PURE__ */ c(jr, { messages: P }),
9600
+ const U = a ?? [];
9601
+ return V && U.push(...is(V)), /* @__PURE__ */ O(hn, { ref: j, children: [
9602
+ /* @__PURE__ */ c(jr, { messages: U }),
9605
9603
  /* @__PURE__ */ c(os, {})
9606
9604
  ] });
9607
- }, kt = () => f ? /* @__PURE__ */ c(Q4, { ...f, onActionCommandProps: (P, ce) => ({
9608
- onDelete: () => N == null ? void 0 : N("delete", P),
9609
- onView: () => se("view", P),
9610
- onEdit: () => se("fetch", P),
9611
- onCopy: () => se("copy", P),
9612
- model: P,
9605
+ }, kt = () => f ? /* @__PURE__ */ c(Q4, { ...f, onActionCommandProps: (U, ce) => ({
9606
+ onDelete: () => N == null ? void 0 : N("delete", U),
9607
+ onView: () => se("view", U),
9608
+ onEdit: () => se("fetch", U),
9609
+ onCopy: () => se("copy", U),
9610
+ model: U,
9613
9611
  index: ce
9614
9612
  }), data: x, enableActionCommands: _ }) : null, Nt = () => {
9615
9613
  var _e;
9616
- const P = {
9614
+ const U = {
9617
9615
  newRowButtonText: ((_e = p == null ? void 0 : p.create) == null ? void 0 : _e.children) ?? Oe("newitem"),
9618
9616
  onNewRow: () => se("create"),
9619
9617
  ...qe,
@@ -9643,14 +9641,14 @@ function r5({
9643
9641
  data: x,
9644
9642
  loading: Z
9645
9643
  };
9646
- return M && (P.onRowClick = (Ce, ze) => {
9644
+ return M && (U.onRowClick = (Ce, ze) => {
9647
9645
  typeof M == "function" && !M(ze.original) || se(typeof M == "string" ? M : "view", ze.original);
9648
- }), le ? le(P) : /* @__PURE__ */ c(Kn, { ...P });
9646
+ }), le ? le(U) : /* @__PURE__ */ c(Kn, { ...U });
9649
9647
  }, Re = () => s ? /* @__PURE__ */ c(q4, { onValuesChange: De }) : null, ee = () => {
9650
9648
  var lt, gt, Dt;
9651
9649
  if (!(fe != null && fe.open) || !Q)
9652
9650
  return null;
9653
- const P = fe.reason, ce = fe.disabled, _e = {
9651
+ const U = fe.reason, ce = fe.disabled, _e = {
9654
9652
  fetch: Oe("edit"),
9655
9653
  copy: Oe("tags.copy"),
9656
9654
  create: ((lt = p == null ? void 0 : p.create) == null ? void 0 : lt.children) ?? Oe("newitem"),
@@ -9659,7 +9657,7 @@ function r5({
9659
9657
  enableCreate: !0,
9660
9658
  enableCopy: !0,
9661
9659
  enableDiscardChanges: !1,
9662
- header: ce ? Oe("browse") : _e[P],
9660
+ header: ce ? Oe("browse") : _e[U],
9663
9661
  commandsProps: {
9664
9662
  create: {
9665
9663
  children: ((gt = p == null ? void 0 : p.create) == null ? void 0 : gt.children) ?? Oe("newitem")
@@ -9675,16 +9673,16 @@ function r5({
9675
9673
  break;
9676
9674
  case "save-close":
9677
9675
  case "save-create":
9678
- U && De();
9676
+ P && De();
9679
9677
  break;
9680
9678
  }
9681
9679
  },
9682
9680
  onAfterDelete: () => {
9683
- U && De();
9681
+ P && De();
9684
9682
  },
9685
9683
  ...fe
9686
9684
  };
9687
- return typeof Q == "function" ? Q(Ce, Y) : (Dt = Q[P]) == null ? void 0 : Dt.call(Q, Ce, Y);
9685
+ return typeof Q == "function" ? Q(Ce, Y) : (Dt = Q[U]) == null ? void 0 : Dt.call(Q, Ce, Y);
9688
9686
  };
9689
9687
  return /* @__PURE__ */ c(K4, { triggerAction: se, loading: Z, data: x, search: De, clear: Ee, enableClear: D, enableCreateItem: z, enableExport: B, enableSearch: X, children: et() });
9690
9688
  }
@@ -9710,7 +9708,7 @@ function i5({
9710
9708
  reset: D,
9711
9709
  formState: {
9712
9710
  defaultValues: z,
9713
- isLoading: U
9711
+ isLoading: P
9714
9712
  },
9715
9713
  getFormModel: B
9716
9714
  } = m, X = {
@@ -9784,10 +9782,10 @@ function i5({
9784
9782
  }), b == null || b();
9785
9783
  };
9786
9784
  return xo(() => {
9787
- w && !U && V({
9785
+ w && !P && V({
9788
9786
  reason: "init"
9789
9787
  });
9790
- }, [U]), /* @__PURE__ */ c(r5, { ...M, data: o, dataCount: i, onSearch: () => void V({
9788
+ }, [P]), /* @__PURE__ */ c(r5, { ...M, data: o, dataCount: i, onSearch: () => void V({
9791
9789
  reason: "search",
9792
9790
  pagination: {
9793
9791
  pageIndex: Xr
@@ -9967,7 +9965,7 @@ function s5({
9967
9965
  paths: m
9968
9966
  }), {
9969
9967
  getFiltersInQS: z,
9970
- setFiltersInQS: U
9968
+ setFiltersInQS: P
9971
9969
  } = l5({
9972
9970
  matcher: typeof a == "object" ? a : void 0
9973
9971
  }), B = Je(() => {
@@ -10004,7 +10002,7 @@ function s5({
10004
10002
  let ke;
10005
10003
  s && !i && N && (ke = {
10006
10004
  [D]: N
10007
- }), U($, A, ke);
10005
+ }), P($, A, ke);
10008
10006
  }
10009
10007
  g == null || g($, A);
10010
10008
  }, V = () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-crud-mui",
3
3
  "private": false,
4
- "version": "0.2.83",
4
+ "version": "0.2.85",
5
5
  "type": "module",
6
6
  "main": "./dist/coreui.js",
7
7
  "module": "./dist/coreui.js",