@gisce/react-ooui 2.30.0-alpha.7 → 2.30.0-alpha.8

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,8 +1,8 @@
1
1
  var Ta = Object.defineProperty;
2
2
  var Ia = (e, t, n) => t in e ? Ta(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var wo = (e, t, n) => (Ia(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { jsx as i, jsxs as D, Fragment as ae } from "react/jsx-runtime";
5
- import dt, { useContext as re, useState as S, useEffect as ue, useRef as Q, memo as $r, useMemo as ye, useCallback as B, createContext as Oa, forwardRef as pt, useImperativeHandle as ht, createElement as Aa, Fragment as Jt } from "react";
4
+ import { jsx as i, jsxs as D, Fragment as se } from "react/jsx-runtime";
5
+ import dt, { useContext as re, useState as S, useEffect as ue, useRef as X, memo as $r, useMemo as ye, useCallback as B, createContext as Oa, forwardRef as pt, useImperativeHandle as ht, createElement as Aa, Fragment as Jt } from "react";
6
6
  import { Tooltip as At, theme as Ge, Typography as Rt, Form as ut, Row as Ne, Col as be, Modal as at, Button as je, Dropdown as Fa, Menu as bo, Spin as We, Divider as Ln, Space as Xe, Input as ct, Select as Mt, Checkbox as pn, Alert as nt, Timeline as yr, Statistic as Ra, Card as Nr, Tag as xi, message as or, DatePicker as Mr, TimePicker as _a, InputNumber as Ci, Progress as Va, Avatar as Ti, Pagination as Da, Badge as Lr, App as Ea, Tabs as Ii, Layout as Oi, Radio as So, Switch as Pa, Steps as xo } from "antd";
7
7
  import { Label as tn, Field as vr, Tree as Ai, Reference as ka, Selection as jr, Many2one as Fi, Boolean as $a, parseContext as Et, graphProcessor as Ri, graphFieldUtils as Na, parseGraph as _i, Container as Ma, Form as Vi, Integer as wr, SearchFieldTypes as It, SearchFilter as Di, parseContextFields as La, parseDomainFields as ja, transformDomainForChildWidget as Br } from "@gisce/ooui";
8
8
  import * as Co from "@ant-design/icons";
@@ -166,7 +166,7 @@ function Re({
166
166
  return n === "horizontal" ? (() => /* @__PURE__ */ D(Ne, { align: "middle", className: "pb-1 pt-1", children: [
167
167
  /* @__PURE__ */ i(be, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-end", children: y }) }),
168
168
  /* @__PURE__ */ i(be, { flex: "auto", children: m() })
169
- ] }))() : (() => /* @__PURE__ */ D(ae, { children: [
169
+ ] }))() : (() => /* @__PURE__ */ D(se, { children: [
170
170
  y,
171
171
  m()
172
172
  ] }))();
@@ -536,7 +536,7 @@ const Gi = (e) => {
536
536
  content: t
537
537
  });
538
538
  }, Ki = (e) => {
539
- const { visible: t, onCloseModal: n, model: r, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = qn(), { t: c } = he(), [u, f] = S([]), [d, p] = S(!1), [h, m] = S(!1), [y, v] = S({}), g = Q();
539
+ const { visible: t, onCloseModal: n, model: r, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = qn(), { t: c } = he(), [u, f] = S([]), [d, p] = S(!1), [h, m] = S(!1), [y, v] = S({}), g = X();
540
540
  ue(() => {
541
541
  t ? b() : v({});
542
542
  }, [t]);
@@ -612,7 +612,7 @@ const Gi = (e) => {
612
612
  m(!1), a();
613
613
  }
614
614
  function T() {
615
- return d ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(ae, { children: [
615
+ return d ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(se, { children: [
616
616
  w(),
617
617
  /* @__PURE__ */ i(Ln, {}),
618
618
  /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ D(Xe, { children: [
@@ -725,7 +725,7 @@ const { info: ec } = at, Tt = (e) => {
725
725
  formHasChanges: c,
726
726
  elementHasLostFocus: u
727
727
  } = o || {}, [f, d] = S(!1), { t: p } = he();
728
- return s ? /* @__PURE__ */ D(ae, { children: [
728
+ return s ? /* @__PURE__ */ D(se, { children: [
729
729
  /* @__PURE__ */ i(
730
730
  "div",
731
731
  {
@@ -766,7 +766,7 @@ const { info: ec } = at, Tt = (e) => {
766
766
  }
767
767
  }
768
768
  )
769
- ] }) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, children: [
769
+ ] }) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, children: [
770
770
  /* @__PURE__ */ i(be, { flex: "auto", children: /* @__PURE__ */ i(
771
771
  ct,
772
772
  {
@@ -859,7 +859,7 @@ const hc = (e) => {
859
859
  const { ooui: t } = e, { required: n, id: r } = t, o = vt(r);
860
860
  return o ? /* @__PURE__ */ i(o, {}) : /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(gc, { ooui: t }) });
861
861
  }, gc = (e) => {
862
- const { ooui: t, value: n, onChange: r } = e, { readOnly: o } = t, s = Q(null), { t: a } = he(), l = (d) => {
862
+ const { ooui: t, value: n, onChange: r } = e, { readOnly: o } = t, s = X(null), { t: a } = he(), l = (d) => {
863
863
  r == null || r(d);
864
864
  };
865
865
  async function c() {
@@ -874,7 +874,7 @@ const hc = (e) => {
874
874
  function f() {
875
875
  l(void 0);
876
876
  }
877
- return /* @__PURE__ */ D(ae, { children: [
877
+ return /* @__PURE__ */ D(se, { children: [
878
878
  /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, justify: "center", children: [
879
879
  n && /* @__PURE__ */ i(
880
880
  "img",
@@ -1190,7 +1190,7 @@ const Oc = (e) => {
1190
1190
  l(!1);
1191
1191
  }
1192
1192
  }
1193
- return c ? /* @__PURE__ */ i(nt, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(ae, { children: [
1193
+ return c ? /* @__PURE__ */ i(nt, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(se, { children: [
1194
1194
  /* @__PURE__ */ i(yr, { style: { padding: "1rem" }, children: x.map((C, O) => {
1195
1195
  var V, F;
1196
1196
  return /* @__PURE__ */ i(yr.Item, { children: /* @__PURE__ */ D(
@@ -1653,7 +1653,7 @@ const Pc = (e) => {
1653
1653
  model: O
1654
1654
  } = g;
1655
1655
  c({
1656
- domain: s == null ? void 0 : s.domain,
1656
+ domain: g.domain,
1657
1657
  action_id: A,
1658
1658
  action_type: T,
1659
1659
  name: C,
@@ -1708,7 +1708,7 @@ const Pc = (e) => {
1708
1708
  }
1709
1709
  );
1710
1710
  }, Je = (e) => {
1711
- const t = Q(/* @__PURE__ */ new Map());
1711
+ const t = X(/* @__PURE__ */ new Map());
1712
1712
  ue(() => () => {
1713
1713
  n();
1714
1714
  }, []);
@@ -1916,18 +1916,18 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1916
1916
  if (k)
1917
1917
  return await W({ domain: M });
1918
1918
  if (u && f) {
1919
- const X = d || await V({
1919
+ const Q = d || await V({
1920
1920
  params: M,
1921
1921
  model: t,
1922
1922
  context: r
1923
1923
  }), te = await F({
1924
1924
  model: t,
1925
- ids: X,
1925
+ ids: Q,
1926
1926
  fieldsToRetrieve: [u],
1927
1927
  context: r
1928
1928
  });
1929
1929
  return Eo({
1930
- values: te.map((oe) => oe[u]),
1930
+ values: te.map((ce) => ce[u]),
1931
1931
  operator: f
1932
1932
  });
1933
1933
  } else
@@ -1943,14 +1943,14 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1943
1943
  params: M,
1944
1944
  model: t,
1945
1945
  context: r
1946
- }), X = await F({
1946
+ }), Q = await F({
1947
1947
  model: t,
1948
1948
  ids: k,
1949
1949
  fieldsToRetrieve: [u],
1950
1950
  context: r
1951
1951
  });
1952
1952
  return Eo({
1953
- values: X.map((te) => te[u]),
1953
+ values: Q.map((te) => te[u]),
1954
1954
  operator: f
1955
1955
  });
1956
1956
  } else
@@ -1964,8 +1964,8 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1964
1964
  h(!0), O(void 0);
1965
1965
  let M, k;
1966
1966
  try {
1967
- const X = await G({ domain: n, isTotal: !1 });
1968
- if (y(X), s) {
1967
+ const Q = await G({ domain: n, isTotal: !1 });
1968
+ if (y(Q), s) {
1969
1969
  const te = await $({
1970
1970
  domain: s,
1971
1971
  values: {},
@@ -1976,10 +1976,10 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1976
1976
  isTotal: !0
1977
1977
  }), x(M);
1978
1978
  }
1979
- if (M ? (k = Math.round(X / M * 100 * 100) / 100, g(k)) : g(0), o) {
1979
+ if (M ? (k = Math.round(Q / M * 100 * 100) / 100, g(k)) : g(0), o) {
1980
1980
  const te = await R({
1981
1981
  condition: o,
1982
- values: { value: X, percent: k },
1982
+ values: { value: Q, percent: k },
1983
1983
  context: r
1984
1984
  });
1985
1985
  w(te);
@@ -1988,15 +1988,15 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1988
1988
  if (l.indexOf(":") !== -1) {
1989
1989
  const te = await R({
1990
1990
  condition: l,
1991
- values: { value: X, percent: k },
1991
+ values: { value: Q, percent: k },
1992
1992
  context: r
1993
1993
  });
1994
1994
  T(te);
1995
1995
  } else
1996
1996
  T(l);
1997
1997
  O(void 0);
1998
- } catch (X) {
1999
- O(JSON.stringify(X));
1998
+ } catch (Q) {
1999
+ O(JSON.stringify(Q));
2000
2000
  }
2001
2001
  h(!1);
2002
2002
  }
@@ -2384,7 +2384,7 @@ const Kc = {
2384
2384
  ) })
2385
2385
  ]
2386
2386
  }
2387
- ) : /* @__PURE__ */ i(ae, { children: `Unknown graph type: ${e}` });
2387
+ ) : /* @__PURE__ */ i(se, { children: `Unknown graph type: ${e}` });
2388
2388
  };
2389
2389
  function zc(e) {
2390
2390
  const {
@@ -2472,7 +2472,7 @@ const Jc = ({
2472
2472
  goToResourceId: C,
2473
2473
  limit: O,
2474
2474
  isActive: V
2475
- } = e, [F, _] = S(!1), [$, R] = S(!1), [G, W] = S(!1), [j, M] = S(!0), [k, X] = S(!0), [te, oe] = S([]), [H, ie] = S(!1), [ee, N] = S([]), [L, E] = S(!1), [de, z] = S(!0), [Y, me] = S(), [ve, ke] = S({}), [Le, Ie] = S(0), [$e, Ke] = S(), [Fe, ce] = S(!1), [fe, we] = S(
2475
+ } = e, [F, _] = S(!1), [$, R] = S(!1), [G, W] = S(!1), [j, M] = S(!0), [k, Q] = S(!0), [te, ce] = S([]), [H, oe] = S(!1), [Z, L] = S([]), [N, E] = S(!1), [ae, Y] = S(!0), [z, me] = S(), [ve, ke] = S({}), [Le, Ie] = S(0), [$e, Ke] = S(), [Fe, de] = S(!1), [fe, we] = S(
2476
2476
  O !== void 0 ? O : $t
2477
2477
  ), [_e, J] = S(r);
2478
2478
  ue(() => {
@@ -2486,7 +2486,7 @@ const Jc = ({
2486
2486
  )[0]
2487
2487
  );
2488
2488
  }, [s]), ue(() => {
2489
- (Y == null ? void 0 : Y.view_id) === n.view_id && s.length > 1 && me(
2489
+ (z == null ? void 0 : z.view_id) === n.view_id && s.length > 1 && me(
2490
2490
  s.filter(
2491
2491
  (Se) => Se.view_id !== n.view_id
2492
2492
  )[0]
@@ -2524,16 +2524,16 @@ const Jc = ({
2524
2524
  formIsLoading: j,
2525
2525
  setFormIsLoading: M,
2526
2526
  treeIsLoading: k,
2527
- setTreeIsLoading: X,
2527
+ setTreeIsLoading: Q,
2528
2528
  attachments: te,
2529
- setAttachments: oe,
2529
+ setAttachments: ce,
2530
2530
  selectedRowItems: w,
2531
2531
  setSelectedRowItems: I,
2532
2532
  duplicatingItem: H,
2533
- setDuplicatingItem: ie,
2534
- setSearchParams: N,
2535
- searchParams: ee,
2536
- searchVisible: L,
2533
+ setDuplicatingItem: oe,
2534
+ setSearchParams: L,
2535
+ searchParams: Z,
2536
+ searchVisible: N,
2537
2537
  setSearchVisible: E,
2538
2538
  sorter: v,
2539
2539
  setSorter: g,
@@ -2541,9 +2541,9 @@ const Jc = ({
2541
2541
  setTotalItems: x,
2542
2542
  searchTreeNameSearch: A,
2543
2543
  setSearchTreeNameSearch: T,
2544
- setGraphIsLoading: z,
2545
- graphIsLoading: de,
2546
- previousView: Y,
2544
+ setGraphIsLoading: Y,
2545
+ graphIsLoading: ae,
2546
+ previousView: z,
2547
2547
  setPreviousView: me,
2548
2548
  goToResourceId: C,
2549
2549
  searchValues: ve,
@@ -2557,7 +2557,7 @@ const Jc = ({
2557
2557
  searchQuery: $e,
2558
2558
  setSearchQuery: Ke,
2559
2559
  isInfiniteTree: Fe,
2560
- setIsInfiniteTree: ce
2560
+ setIsInfiniteTree: de
2561
2561
  },
2562
2562
  children: t
2563
2563
  }
@@ -2595,7 +2595,7 @@ const Jc = ({
2595
2595
  }), b = _i(g.arch);
2596
2596
  p(b), f(!1), m == null || m(!1);
2597
2597
  } catch (g) {
2598
- return console.error(g), f(!1), m == null || m(!1), /* @__PURE__ */ i(ae, { children: JSON.stringify(g) });
2598
+ return console.error(g), f(!1), m == null || m(!1), /* @__PURE__ */ i(se, { children: JSON.stringify(g) });
2599
2599
  }
2600
2600
  }
2601
2601
  if (u || !d)
@@ -2639,7 +2639,7 @@ const Jc = ({
2639
2639
  }
2640
2640
  );
2641
2641
  default:
2642
- return /* @__PURE__ */ i(ae, { children: `Graph ${d.type} not implemented` });
2642
+ return /* @__PURE__ */ i(se, { children: `Graph ${d.type} not implemented` });
2643
2643
  }
2644
2644
  }, on = pt(Qc);
2645
2645
  var sn = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e.FEATURE_USERVIEWPREFS = "user_view_prefs", e))(sn || {});
@@ -2724,7 +2724,7 @@ const ty = Object.values(sn), Zc = (e) => {
2724
2724
  );
2725
2725
  }
2726
2726
  default:
2727
- return /* @__PURE__ */ i(ae, { children: `Graph ${p.type} not implemented` });
2727
+ return /* @__PURE__ */ i(se, { children: `Graph ${p.type} not implemented` });
2728
2728
  }
2729
2729
  }, as = pt(ed), wt = dt.createContext(null), td = (e) => {
2730
2730
  const {
@@ -2819,7 +2819,7 @@ const ty = Object.values(sn), Zc = (e) => {
2819
2819
  const { ooui: t } = e, n = t.actionId !== void 0;
2820
2820
  return /* @__PURE__ */ i(Re, { ooui: t, children: n ? /* @__PURE__ */ i(Vn, { children: /* @__PURE__ */ i(ad, { ooui: t }) }) : /* @__PURE__ */ i(sd, { ooui: t }) });
2821
2821
  }, sd = (e) => {
2822
- const { token: t } = od(), { ooui: n, value: r } = e, o = /* @__PURE__ */ D(ae, { children: [
2822
+ const { token: t } = od(), { ooui: n, value: r } = e, o = /* @__PURE__ */ D(se, { children: [
2823
2823
  /* @__PURE__ */ D("span", { children: [
2824
2824
  n.label,
2825
2825
  " "
@@ -3096,7 +3096,7 @@ const Lt = ({
3096
3096
  }
3097
3097
  );
3098
3098
  };
3099
- return c ? /* @__PURE__ */ i(nt, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(
3099
+ return c ? /* @__PURE__ */ i(nt, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(
3100
3100
  Mt,
3101
3101
  {
3102
3102
  mode: "multiple",
@@ -3328,9 +3328,9 @@ const Lt = ({
3328
3328
  for (let n = 0; n < e.length; n++)
3329
3329
  await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
3330
3330
  }, _d = (e, t) => {
3331
- const { children: n, globalValues: r = {} } = e, o = Q(), s = Q(), [a, l] = S(!1), c = re(
3331
+ const { children: n, globalValues: r = {} } = e, o = X(), s = X(), [a, l] = S(!1), c = re(
3332
3332
  wt
3333
- ), { openAction: u } = c || {}, f = Q([]), { t: d } = he();
3333
+ ), { openAction: u } = c || {}, f = X([]), { t: d } = he();
3334
3334
  ht(t, () => ({
3335
3335
  openActionModal: I
3336
3336
  }));
@@ -3357,7 +3357,7 @@ const Lt = ({
3357
3357
  values: V
3358
3358
  }) : _;
3359
3359
  try {
3360
- const X = await P.getHandler().createReport({
3360
+ const Q = await P.getHandler().createReport({
3361
3361
  model: $,
3362
3362
  name: G,
3363
3363
  datas: R,
@@ -3365,10 +3365,10 @@ const Lt = ({
3365
3365
  context: { ...F, ...k }
3366
3366
  });
3367
3367
  l(!0), s.current = !0, o.current = setInterval(() => {
3368
- g(X);
3368
+ g(Q);
3369
3369
  }, 1e3);
3370
- } catch (X) {
3371
- s.current = !1, clearInterval(o.current), it(X), l(!1);
3370
+ } catch (Q) {
3371
+ s.current = !1, clearInterval(o.current), it(Q), l(!1);
3372
3372
  }
3373
3373
  }
3374
3374
  async function g(T) {
@@ -3506,14 +3506,14 @@ const Lt = ({
3506
3506
  actionData: void 0
3507
3507
  });
3508
3508
  }
3509
- return /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(
3509
+ return /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(
3510
3510
  ln.Provider,
3511
3511
  {
3512
3512
  value: {
3513
3513
  processAction: b,
3514
3514
  globalValues: r
3515
3515
  },
3516
- children: /* @__PURE__ */ D(ae, { children: [
3516
+ children: /* @__PURE__ */ D(se, { children: [
3517
3517
  n,
3518
3518
  /* @__PURE__ */ i(
3519
3519
  at,
@@ -3636,11 +3636,11 @@ function kd(e, t) {
3636
3636
  forcedValues: A = {},
3637
3637
  parentWidth: T,
3638
3638
  onMustRefreshParent: C
3639
- } = e, { t: O } = he(), [V, F] = S(!1), [_, $] = S(), [R, G] = S(), [W] = ut.useForm(), [j, M] = S(), [k, X] = S(), te = re(ds), [oe, H] = S(), [ie, ee] = S(!1), N = Q(), L = Q({}), E = Q({}), de = Q(!1), z = Q(!1), Y = Q(!1), ve = (T !== void 0 ? T : oe) < Pd, ke = re(He), { activeId: Le, getPlainValues: Ie } = ke || {}, $e = Q(!1), Ke = re(
3639
+ } = e, { t: O } = he(), [V, F] = S(!1), [_, $] = S(), [R, G] = S(), [W] = ut.useForm(), [j, M] = S(), [k, Q] = S(), te = re(ds), [ce, H] = S(), [oe, Z] = S(!1), L = X(), N = X({}), E = X({}), ae = X(!1), Y = X(!1), z = X(!1), ve = (T !== void 0 ? T : ce) < Pd, ke = re(He), { activeId: Le, getPlainValues: Ie } = ke || {}, $e = X(!1), Ke = re(
3640
3640
  lt
3641
3641
  ), {
3642
3642
  setFormIsSaving: Fe = void 0,
3643
- setFormHasChanges: ce = void 0,
3643
+ setFormHasChanges: de = void 0,
3644
3644
  setCurrentId: fe = void 0,
3645
3645
  setFormIsLoading: we = void 0,
3646
3646
  setAttachments: _e = void 0,
@@ -3658,30 +3658,30 @@ function kd(e, t) {
3658
3658
  fetchValues: ze,
3659
3659
  cancelUnsavedChanges: xt,
3660
3660
  clearAndReload: () => {
3661
- N.current = void 0, G(void 0), Be();
3661
+ L.current = void 0, G(void 0), Be();
3662
3662
  }
3663
3663
  })), ue(() => {
3664
3664
  if ($(void 0), !(!n && !m)) {
3665
3665
  if (!x) {
3666
- N.current = void 0, G(void 0);
3666
+ L.current = void 0, G(void 0);
3667
3667
  return;
3668
3668
  }
3669
- (r === void 0 && k || r !== void 0 && k && r < 0) && (N.current = void 0, G(void 0)), Be();
3669
+ (r === void 0 && k || r !== void 0 && k && r < 0) && (L.current = void 0, G(void 0)), Be();
3670
3670
  }
3671
3671
  }, [r, n, h, m, x]), ue(() => {
3672
- ie && (er({
3672
+ oe && (er({
3673
3673
  elementHasLostFocus: !0
3674
- }), ee(!1));
3675
- }, [ie]);
3676
- const ne = (U, K, se, le) => {
3677
- ce == null || ce(!1), Fe == null || Fe(!1), s == null || s(U, K, se, le), fe == null || fe(U), $e.current && (C == null || C());
3674
+ }), Z(!1));
3675
+ }, [oe]);
3676
+ const ne = (U, K, ie, le) => {
3677
+ de == null || de(!1), Fe == null || Fe(!1), s == null || s(U, K, ie, le), fe == null || fe(U), $e.current && (C == null || C());
3678
3678
  }, Oe = () => {
3679
3679
  $e.current && (C == null || C()), Fe == null || Fe(!1), o == null || o();
3680
3680
  }, qe = (U) => {
3681
3681
  Fe == null || Fe(!1), u == null || u(U);
3682
3682
  };
3683
3683
  function pe() {
3684
- return r || N.current;
3684
+ return r || L.current;
3685
3685
  }
3686
3686
  function rt() {
3687
3687
  return k;
@@ -3689,18 +3689,18 @@ function kd(e, t) {
3689
3689
  function q() {
3690
3690
  const U = {
3691
3691
  ...Pe(k),
3692
- ...Z()
3692
+ ...ee()
3693
3693
  };
3694
3694
  for (const K in U)
3695
3695
  U[K] === void 0 && delete U[K];
3696
3696
  return U;
3697
3697
  }
3698
3698
  function ge() {
3699
- const U = q(), K = rt(), se = {};
3699
+ const U = q(), K = rt(), ie = {};
3700
3700
  return Object.keys(U).forEach((le) => {
3701
3701
  const Te = U[le];
3702
- K[le] && K[le].type === "many2one" && Te && Array.isArray(Te) && Te.length === 2 ? se[le] = Te[0] : K[le] && (K[le].type === "one2many" || K[le].type === "many2many") && Te && Te.items ? se[le] = Te.items.filter((Qe) => Qe.operation !== "pendingRemove").map((Qe) => Qe.id) : se[le] = Te;
3703
- }), se;
3702
+ K[le] && K[le].type === "many2one" && Te && Array.isArray(Te) && Te.length === 2 ? ie[le] = Te[0] : K[le] && (K[le].type === "one2many" || K[le].type === "many2many") && Te && Te.items ? ie[le] = Te.items.filter((Qe) => Qe.operation !== "pendingRemove").map((Qe) => Qe.id) : ie[le] = Te;
3703
+ }), ie;
3704
3704
  }
3705
3705
  function Ae() {
3706
3706
  const U = {
@@ -3716,7 +3716,7 @@ function kd(e, t) {
3716
3716
  function De() {
3717
3717
  return pe() ? { active_id: pe(), active_ids: [pe()] } : {};
3718
3718
  }
3719
- function Z() {
3719
+ function ee() {
3720
3720
  return {
3721
3721
  id: pe(),
3722
3722
  active_id: pe(),
@@ -3735,7 +3735,7 @@ function kd(e, t) {
3735
3735
  });
3736
3736
  }, Ye = () => Object.keys(
3737
3737
  sr({
3738
- source: L.current,
3738
+ source: N.current,
3739
3739
  target: Pe(k),
3740
3740
  fields: k
3741
3741
  })
@@ -3764,25 +3764,25 @@ function kd(e, t) {
3764
3764
  let U;
3765
3765
  try {
3766
3766
  m ? U = { arch: m.arch, fields: m.fields } : U = await Zn();
3767
- const { fields: K, arch: se } = U;
3768
- X(K), M(se), await ze({
3767
+ const { fields: K, arch: ie } = U;
3768
+ Q(K), M(ie), await ze({
3769
3769
  fields: K,
3770
- arch: se
3770
+ arch: ie
3771
3771
  });
3772
3772
  } catch (K) {
3773
3773
  $(K != null && K.message ? K.message + K.stack : K), we == null || we(!1);
3774
3774
  }
3775
3775
  }, ze = async (U) => {
3776
- let K, se, le, Te;
3777
- we == null || we(!0), $(void 0), U != null && U.fields ? (se = U.fields, le = U.arch) : (se = k, le = j), h && (U == null ? void 0 : U.forceRefresh) !== !0 ? K = h : { values: K, defaultGetCalled: Te } = await da({
3778
- fields: se,
3776
+ let K, ie, le, Te;
3777
+ we == null || we(!0), $(void 0), U != null && U.fields ? (ie = U.fields, le = U.arch) : (ie = k, le = j), h && (U == null ? void 0 : U.forceRefresh) !== !0 ? K = h : { values: K, defaultGetCalled: Te } = await da({
3778
+ fields: ie,
3779
3779
  arch: le
3780
- }), b && (K = { ...ud(b), ...K }), L.current = Wt(K, se), mt({
3780
+ }), b && (K = { ...ud(b), ...K }), N.current = Wt(K, ie), mt({
3781
3781
  values: K,
3782
- fields: se,
3782
+ fields: ie,
3783
3783
  reset: !0,
3784
3784
  isDefaultGet: Te
3785
- }), fn({ fields: se, arch: le, values: K }), we == null || we(!1), ce == null || ce(!1), Te && ee(!0);
3785
+ }), fn({ fields: ie, arch: le, values: K }), we == null || we(!1), de == null || de(!1), Te && Z(!0);
3786
3786
  }, xt = async () => new Promise(async (U) => {
3787
3787
  Ye() ? an({
3788
3788
  t: O,
@@ -3809,10 +3809,10 @@ function kd(e, t) {
3809
3809
  }, mt = ({
3810
3810
  values: U,
3811
3811
  fields: K,
3812
- reset: se,
3812
+ reset: ie,
3813
3813
  isDefaultGet: le = !1
3814
3814
  }) => {
3815
- const Qe = { ...se ? {} : W.getFieldsValue(!0), ...U }, nr = Wt(Qe, K), xa = Object.keys(K).map((rr) => {
3815
+ const Qe = { ...ie ? {} : W.getFieldsValue(!0), ...U }, nr = Wt(Qe, K), xa = Object.keys(K).map((rr) => {
3816
3816
  const Ca = nr[rr] !== void 0 ? nr[rr] : void 0;
3817
3817
  return {
3818
3818
  name: rr,
@@ -3825,20 +3825,20 @@ function kd(e, t) {
3825
3825
  fields: U,
3826
3826
  arch: K
3827
3827
  }) => {
3828
- let se = {}, le = !1;
3828
+ let ie = {}, le = !1;
3829
3829
  if (pe()) {
3830
3830
  const Te = R || yo({
3831
3831
  arch: K,
3832
3832
  fields: U,
3833
3833
  values: {}
3834
3834
  });
3835
- if (se = (await P.getHandler().readObjects({
3835
+ if (ie = (await P.getHandler().readObjects({
3836
3836
  model: n,
3837
3837
  ids: [pe()],
3838
3838
  fields: Ed(U, Te == null ? void 0 : Te.contextForFields),
3839
3839
  context: g
3840
3840
  }))[0], v)
3841
- return { values: se, defaultGetCalled: le };
3841
+ return { values: ie, defaultGetCalled: le };
3842
3842
  const Qe = await P.getHandler().search({
3843
3843
  params: [
3844
3844
  ["res_model", "=", n],
@@ -3850,37 +3850,37 @@ function kd(e, t) {
3850
3850
  });
3851
3851
  _e == null || _e(Qe);
3852
3852
  } else
3853
- _e == null || _e([]), se = await Ee(U), le = !0;
3854
- return { values: se, defaultGetCalled: le };
3853
+ _e == null || _e([]), ie = await Ee(U), le = !0;
3854
+ return { values: ie, defaultGetCalled: le };
3855
3855
  }, go = async (U) => {
3856
3856
  const { callOnSubmitSucceed: K = !0 } = U || {};
3857
3857
  if (pe()) {
3858
- const se = sr({
3859
- source: L.current,
3858
+ const ie = sr({
3859
+ source: N.current,
3860
3860
  target: Pe(k),
3861
3861
  fields: k
3862
3862
  });
3863
3863
  await P.getHandler().update({
3864
3864
  model: n,
3865
3865
  id: pe(),
3866
- values: { ...se, ...A },
3866
+ values: { ...ie, ...A },
3867
3867
  fields: k,
3868
3868
  context: {
3869
3869
  ...g,
3870
3870
  ...R == null ? void 0 : R.context
3871
3871
  }
3872
- }), L.current = Pe(k);
3872
+ }), N.current = Pe(k);
3873
3873
  } else {
3874
- const se = Pe(k), le = await P.getHandler().create({
3874
+ const ie = Pe(k), le = await P.getHandler().create({
3875
3875
  model: n,
3876
- values: { ...se, ...A },
3876
+ values: { ...ie, ...A },
3877
3877
  fields: k,
3878
3878
  context: {
3879
3879
  ...g,
3880
3880
  ...R == null ? void 0 : R.context
3881
3881
  }
3882
3882
  });
3883
- N.current = le, L.current = se;
3883
+ L.current = le, N.current = ie;
3884
3884
  }
3885
3885
  y && await y([pe()]), !v && K && (ne == null || ne(pe(), q(), Ae()));
3886
3886
  }, ua = async (U) => {
@@ -3888,34 +3888,34 @@ function kd(e, t) {
3888
3888
  !v && K && (ne == null || ne(pe(), q(), Ae()));
3889
3889
  }, In = async (U) => {
3890
3890
  let K = !1;
3891
- const { callOnSubmitSucceed: se = !0 } = U || {};
3892
- if (z.current = !0, $(void 0), Y.current && !Ye() && pe() && se) {
3893
- z.current = !1, ce == null || ce(!1), ne == null || ne(
3891
+ const { callOnSubmitSucceed: ie = !0 } = U || {};
3892
+ if (Y.current = !0, $(void 0), z.current && !Ye() && pe() && ie) {
3893
+ Y.current = !1, de == null || de(!1), ne == null || ne(
3894
3894
  pe(),
3895
3895
  q(),
3896
3896
  Ae(),
3897
- Y.current
3898
- ), Y.current = !1;
3897
+ z.current
3898
+ ), z.current = !1;
3899
3899
  const le = pe();
3900
- return d && (N.current = void 0, mt({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: le };
3900
+ return d && (L.current = void 0, mt({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: le };
3901
3901
  }
3902
- if (!Ye() && pe() && se)
3903
- return z.current = !1, ce == null || ce(!1), Oe == null || Oe(), { succeed: !0, id: pe() };
3902
+ if (!Ye() && pe() && ie)
3903
+ return Y.current = !1, de == null || de(!1), Oe == null || Oe(), { succeed: !0, id: pe() };
3904
3904
  if (await St())
3905
- return z.current = !1, Mo(O), { succeed: !1, id: pe() };
3905
+ return Y.current = !1, Mo(O), { succeed: !1, id: pe() };
3906
3906
  F(!0), Fe == null || Fe(!0);
3907
3907
  try {
3908
- p === "api" ? await go(U) : await ua(U), d && (N.current = void 0, mt({ values: {}, fields: k, reset: !0 })), await ze({ forceRefresh: !0 }), K = !0, or.success(O("savedRegisters"));
3908
+ p === "api" ? await go(U) : await ua(U), d && (L.current = void 0, mt({ values: {}, fields: k, reset: !0 })), await ze({ forceRefresh: !0 }), K = !0, or.success(O("savedRegisters"));
3909
3909
  } catch (le) {
3910
- z.current = !1, F(!1), Fe == null || Fe(!1), qe == null || qe(le), or.error(O("errorWhileSavingForm")), $(le != null && le.message ? le.message : le);
3910
+ Y.current = !1, F(!1), Fe == null || Fe(!1), qe == null || qe(le), or.error(O("errorWhileSavingForm")), $(le != null && le.message ? le.message : le);
3911
3911
  } finally {
3912
- z.current = !1, Fe == null || Fe(!1), F(!1);
3912
+ Y.current = !1, Fe == null || Fe(!1), F(!1);
3913
3913
  }
3914
3914
  return { succeed: K, id: pe() };
3915
3915
  }, yo = ({
3916
3916
  fields: U,
3917
3917
  arch: K,
3918
- values: se,
3918
+ values: ie,
3919
3919
  operationInProgress: le = !1
3920
3920
  }) => {
3921
3921
  const Te = new Vi(U);
@@ -3923,8 +3923,8 @@ function kd(e, t) {
3923
3923
  readOnly: f || le,
3924
3924
  values: Cc(
3925
3925
  {
3926
- ...se,
3927
- ...Z()
3926
+ ...ie,
3927
+ ...ee()
3928
3928
  },
3929
3929
  U
3930
3930
  )
@@ -3932,29 +3932,29 @@ function kd(e, t) {
3932
3932
  }, fn = ({
3933
3933
  fields: U,
3934
3934
  arch: K,
3935
- values: se,
3935
+ values: ie,
3936
3936
  operationInProgress: le = !1
3937
3937
  }) => {
3938
3938
  var Qe;
3939
3939
  const Te = yo({
3940
3940
  arch: K,
3941
3941
  fields: U,
3942
- values: se,
3942
+ values: ie,
3943
3943
  operationInProgress: le
3944
3944
  });
3945
3945
  G(Te), Te.string && Te.string !== J && (Ce == null || Ce(Te.string)), te && Te.string && ((Qe = te.setTitle) == null || Qe.call(te, Te.string));
3946
3946
  }, er = async ({
3947
3947
  elementHasLostFocus: U = !1
3948
3948
  }) => {
3949
- if (z.current)
3949
+ if (Y.current)
3950
3950
  return;
3951
3951
  const K = sr({
3952
3952
  source: E.current,
3953
3953
  target: Pe(k),
3954
3954
  fields: k
3955
- }), se = Object.keys(K);
3956
- if (se.length !== 0 && !(cd({
3957
- changedFields: se,
3955
+ }), ie = Object.keys(K);
3956
+ if (ie.length !== 0 && !(cd({
3957
+ changedFields: ie,
3958
3958
  formOoui: R,
3959
3959
  types: [
3960
3960
  "text",
@@ -3969,13 +3969,13 @@ function kd(e, t) {
3969
3969
  ]
3970
3970
  }) && U !== !0)) {
3971
3971
  const le = Wt(W.getFieldsValue(!0), k);
3972
- E.current = le, c == null || c(le), ce == null || ce(!0), ma(se);
3972
+ E.current = le, c == null || c(le), de == null || de(!0), ma(ie);
3973
3973
  }
3974
3974
  }, fa = ul(er, 100), ma = async (U) => {
3975
3975
  try {
3976
3976
  for (let K = 0; K < U.length; K += 1) {
3977
- const se = U[K];
3978
- await pa(se);
3977
+ const ie = U[K];
3978
+ await pa(ie);
3979
3979
  }
3980
3980
  } catch (K) {
3981
3981
  it(K);
@@ -3990,7 +3990,7 @@ function kd(e, t) {
3990
3990
  });
3991
3991
  return;
3992
3992
  }
3993
- const se = fd({
3993
+ const ie = fd({
3994
3994
  values: {
3995
3995
  ...Pe(k),
3996
3996
  context: {
@@ -4004,7 +4004,7 @@ function kd(e, t) {
4004
4004
  model: n,
4005
4005
  action: K.method,
4006
4006
  ids: pe() ? [pe()] : [],
4007
- payload: se,
4007
+ payload: ie,
4008
4008
  fields: k
4009
4009
  });
4010
4010
  if (le.value) {
@@ -4025,10 +4025,10 @@ function kd(e, t) {
4025
4025
  reset: !1
4026
4026
  });
4027
4027
  }
4028
- if (le.warning && le.warning.title && le.warning.message && !de.current) {
4028
+ if (le.warning && le.warning.title && le.warning.message && !ae.current) {
4029
4029
  const { title: Te, message: Qe } = le.warning;
4030
- de.current = !0, Fd(Te, Qe, () => {
4031
- de.current = !1;
4030
+ ae.current = !0, Fd(Te, Qe, () => {
4031
+ ae.current = !1;
4032
4032
  });
4033
4033
  }
4034
4034
  if (le.domain && Object.keys(le.domain).length > 0) {
@@ -4040,14 +4040,14 @@ function kd(e, t) {
4040
4040
  fields: Te,
4041
4041
  arch: j,
4042
4042
  values: Pe(Te)
4043
- }), X(Te);
4043
+ }), Q(Te);
4044
4044
  }
4045
4045
  };
4046
4046
  async function ha({
4047
4047
  action: U,
4048
4048
  context: K
4049
4049
  }) {
4050
- const se = await P.getHandler().execute({
4050
+ const ie = await P.getHandler().execute({
4051
4051
  model: n,
4052
4052
  action: U,
4053
4053
  payload: [pe()],
@@ -4057,18 +4057,18 @@ function kd(e, t) {
4057
4057
  ...K
4058
4058
  }
4059
4059
  });
4060
- if (typeof se == "object" && se !== null && Object.keys(se).length === 0 && v)
4060
+ if (typeof ie == "object" && ie !== null && Object.keys(ie).length === 0 && v)
4061
4061
  ne == null || ne(pe(), q(), Ae());
4062
- else if (se.type && se.type === "ir.actions.act_window_close")
4062
+ else if (ie.type && ie.type === "ir.actions.act_window_close")
4063
4063
  ne == null || ne(pe(), q(), Ae());
4064
- else if (se.type) {
4064
+ else if (ie.type) {
4065
4065
  let le = {};
4066
- se.context && (le = Et({
4067
- context: se.context,
4066
+ ie.context && (le = Et({
4067
+ context: ie.context,
4068
4068
  fields: k,
4069
4069
  values: q()
4070
4070
  })), await vo({
4071
- actionData: se,
4071
+ actionData: ie,
4072
4072
  context: { ...K, ...le }
4073
4073
  });
4074
4074
  } else
@@ -4086,18 +4086,18 @@ function kd(e, t) {
4086
4086
  action: U,
4087
4087
  context: K
4088
4088
  }) {
4089
- const se = (await P.getHandler().readObjects({
4089
+ const ie = (await P.getHandler().readObjects({
4090
4090
  model: "ir.actions.actions",
4091
4091
  ids: [parseInt(U)],
4092
4092
  context: g
4093
4093
  }))[0];
4094
- await vo({ actionData: se, context: K });
4094
+ await vo({ actionData: ie, context: K });
4095
4095
  }
4096
4096
  async function vo({
4097
4097
  actionData: U,
4098
4098
  context: K
4099
4099
  }) {
4100
- const { closeParent: se } = await (Ue == null ? void 0 : Ue({
4100
+ const { closeParent: ie } = await (Ue == null ? void 0 : Ue({
4101
4101
  actionData: U,
4102
4102
  fields: k,
4103
4103
  values: q(),
@@ -4110,7 +4110,7 @@ function kd(e, t) {
4110
4110
  $e.current = !0, await ze({ forceRefresh: !0 });
4111
4111
  }
4112
4112
  })) || {};
4113
- !I && se && (ne == null || ne(pe(), q(), Ae()));
4113
+ !I && ie && (ne == null || ne(pe(), q(), Ae()));
4114
4114
  }
4115
4115
  function va() {
4116
4116
  er({ elementHasLostFocus: !0 });
@@ -4126,7 +4126,7 @@ function kd(e, t) {
4126
4126
  async function wa({
4127
4127
  type: U,
4128
4128
  action: K,
4129
- context: se
4129
+ context: ie
4130
4130
  }) {
4131
4131
  if (U === "cancel") {
4132
4132
  Oe == null || Oe();
@@ -4138,14 +4138,14 @@ function kd(e, t) {
4138
4138
  }
4139
4139
  let le = !1;
4140
4140
  try {
4141
- !f && (Ye() || pe() === void 0) && (le = !0, tr(!0), p === "2many" ? (await go({ callOnSubmitSucceed: !1 }), Y.current = !0) : await In({ callOnSubmitSucceed: !1 }));
4142
- const Te = Y.current ? De() : {}, Qe = { ...se, ...Te };
4141
+ !f && (Ye() || pe() === void 0) && (le = !0, tr(!0), p === "2many" ? (await go({ callOnSubmitSucceed: !1 }), z.current = !0) : await In({ callOnSubmitSucceed: !1 }));
4142
+ const Te = z.current ? De() : {}, Qe = { ...ie, ...Te };
4143
4143
  U === "object" ? await ha({ action: K, context: Qe }) : U === "workflow" ? await ga({ action: K }) : U === "action" && await ya({ action: K, context: Qe }), le && tr(!1);
4144
4144
  } catch (Te) {
4145
4145
  le && tr(!1), it(Te);
4146
4146
  }
4147
4147
  }
4148
- const ba = () => !R && !_ ? /* @__PURE__ */ i(We, {}) : !n && !m || !x ? null : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(
4148
+ const ba = () => !R && !_ ? /* @__PURE__ */ i(We, {}) : !n && !m || !x ? null : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(
4149
4149
  Hl,
4150
4150
  {
4151
4151
  getValues: q,
@@ -4181,7 +4181,7 @@ function kd(e, t) {
4181
4181
  }
4182
4182
  )
4183
4183
  }
4184
- ) }), Sa = () => /* @__PURE__ */ D(ae, { children: [
4184
+ ) }), Sa = () => /* @__PURE__ */ D(se, { children: [
4185
4185
  /* @__PURE__ */ i(Ln, {}),
4186
4186
  /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ D(Xe, { children: [
4187
4187
  /* @__PURE__ */ i(
@@ -4329,7 +4329,7 @@ const cn = pt(kd), dn = (e) => {
4329
4329
  numberOfSelectsToHide: n = 2,
4330
4330
  ...r
4331
4331
  }) => {
4332
- const o = Q(), s = Q(0);
4332
+ const o = X(), s = X(0);
4333
4333
  return /* @__PURE__ */ i(
4334
4334
  _a,
4335
4335
  {
@@ -4356,7 +4356,7 @@ const cn = pt(kd), dn = (e) => {
4356
4356
  label: ""
4357
4357
  })
4358
4358
  ];
4359
- return /* @__PURE__ */ D(ae, { children: [
4359
+ return /* @__PURE__ */ D(se, { children: [
4360
4360
  n && /* @__PURE__ */ i(
4361
4361
  Kn,
4362
4362
  {
@@ -4697,7 +4697,7 @@ function ms(e) {
4697
4697
  searchError: d,
4698
4698
  searchValues: p,
4699
4699
  showLimitOptions: h = !0
4700
- } = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1), I = Q(), { token: w } = iu(), [A] = ut.useForm();
4700
+ } = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1), I = X(), { token: w } = iu(), [A] = ut.useForm();
4701
4701
  ue(() => {
4702
4702
  A.setFieldsValue(p);
4703
4703
  }, [p]);
@@ -5046,9 +5046,9 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5046
5046
  }, pu = (e) => {
5047
5047
  const { m2oField: t } = e;
5048
5048
  return t ? /* @__PURE__ */ D(Xe, { children: [
5049
- /* @__PURE__ */ i(ae, { children: t.value }),
5049
+ /* @__PURE__ */ i(se, { children: t.value }),
5050
5050
  /* @__PURE__ */ i(so, { id: t.id, model: t.model })
5051
- ] }) : /* @__PURE__ */ i(ae, {});
5051
+ ] }) : /* @__PURE__ */ i(se, {});
5052
5052
  }, hu = (e) => {
5053
5053
  const { value: t, context: n, selectionValues: r } = e, [o, s] = S(), [a, l] = S(!1), [c, u] = t ? t.split(",") : [], f = parseInt(u), d = B(async () => {
5054
5054
  if (!t || t && o)
@@ -5065,13 +5065,13 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5065
5065
  if (ue(() => {
5066
5066
  d();
5067
5067
  }, [t]), !t && !a)
5068
- return /* @__PURE__ */ i(ae, {});
5068
+ return /* @__PURE__ */ i(se, {});
5069
5069
  if (a)
5070
5070
  return /* @__PURE__ */ i(gt, {});
5071
5071
  const p = r.get(c);
5072
5072
  return /* @__PURE__ */ D(Xe, { children: [
5073
- /* @__PURE__ */ i(ae, { children: `${p}:` }),
5074
- /* @__PURE__ */ i(ae, { children: o }),
5073
+ /* @__PURE__ */ i(se, { children: `${p}:` }),
5074
+ /* @__PURE__ */ i(se, { children: o }),
5075
5075
  /* @__PURE__ */ i(so, { id: f, model: c })
5076
5076
  ] });
5077
5077
  }, gu = (e) => {
@@ -5150,28 +5150,28 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5150
5150
  [e]
5151
5151
  ), xu = ({ value: e }) => ye(() => {
5152
5152
  if (!e || e && e.length === 0)
5153
- return /* @__PURE__ */ i(ae, {});
5153
+ return /* @__PURE__ */ i(se, {});
5154
5154
  const t = st(
5155
5155
  e,
5156
5156
  Ct.date.dateInternalFormat
5157
5157
  ).format(Ct.date.dateDisplayFormat);
5158
- return /* @__PURE__ */ i(ae, { children: t });
5158
+ return /* @__PURE__ */ i(se, { children: t });
5159
5159
  }, [e]), Cu = ({ value: e }) => ye(() => {
5160
5160
  if (!e || e && e.length === 0)
5161
- return /* @__PURE__ */ i(ae, {});
5161
+ return /* @__PURE__ */ i(se, {});
5162
5162
  const t = st(
5163
5163
  e,
5164
5164
  Ct.time.dateInternalFormat
5165
5165
  ).format(Ct.time.dateDisplayFormat);
5166
- return /* @__PURE__ */ i(ae, { children: t });
5166
+ return /* @__PURE__ */ i(se, { children: t });
5167
5167
  }, [e]), Ho = ({
5168
5168
  value: e
5169
5169
  }) => ye(() => {
5170
5170
  const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
5171
- return /* @__PURE__ */ i(ae, { children: `( ${t} )` });
5171
+ return /* @__PURE__ */ i(se, { children: `( ${t} )` });
5172
5172
  }, [e]), Tu = ({
5173
5173
  value: e
5174
- }) => ye(() => /* @__PURE__ */ i(hs, { value: e }), [e]), Iu = ({ value: e }) => ye(() => /* @__PURE__ */ i(ae, { children: ps(e) }), [e]), Uo = ({ value: e }) => ye(
5174
+ }) => ye(() => /* @__PURE__ */ i(hs, { value: e }), [e]), Iu = ({ value: e }) => ye(() => /* @__PURE__ */ i(se, { children: ps(e) }), [e]), Uo = ({ value: e }) => ye(
5175
5175
  () => /* @__PURE__ */ i("div", { style: { textAlign: "right" }, children: e }),
5176
5176
  [e]
5177
5177
  ), Ou = ({ value: e }) => ye(
@@ -5195,7 +5195,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5195
5195
  context: r
5196
5196
  }) => ye(() => {
5197
5197
  let o = e;
5198
- return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ i(ae, { children: n.selectionValues.get(o) });
5198
+ return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ i(se, { children: n.selectionValues.get(o) });
5199
5199
  }, [n, e]), Ru = ({
5200
5200
  value: e,
5201
5201
  key: t,
@@ -5281,7 +5281,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5281
5281
  tags: Vu
5282
5282
  }, ys = pt(
5283
5283
  (e, t) => {
5284
- var L;
5284
+ var N;
5285
5285
  const {
5286
5286
  page: n = 1,
5287
5287
  limit: r,
@@ -5305,7 +5305,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5305
5305
  context: w,
5306
5306
  readonly: A,
5307
5307
  onSelectAllRecords: T
5308
- } = e, C = Q(null), [O, V] = S([]), F = Q(!1), [_, $] = S(), { t: R } = he(), G = Q(r), W = re(
5308
+ } = e, C = X(null), [O, V] = S([]), F = X(!1), [_, $] = S(), { t: R } = he(), G = X(r), W = re(
5309
5309
  lt
5310
5310
  ), { title: j = void 0, setTitle: M = void 0 } = (I ? W : {}) || {}, k = ye(() => {
5311
5311
  if (_)
@@ -5334,11 +5334,11 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5334
5334
  }, [a]), ue(() => {
5335
5335
  G.current = r;
5336
5336
  }, [r]);
5337
- const X = (n - 1) * G.current + 1, te = X - 1 + O.length, oe = o === void 0 ? null : o === 0 ? R("no_results") : R("summary").replace("{from}", X == null ? void 0 : X.toString()).replace("{to}", te == null ? void 0 : te.toString()).replace("{total}", o == null ? void 0 : o.toString()), H = ye(() => {
5337
+ const Q = (n - 1) * G.current + 1, te = Q - 1 + O.length, ce = o === void 0 ? null : o === 0 ? R("no_results") : R("summary").replace("{from}", Q == null ? void 0 : Q.toString()).replace("{to}", te == null ? void 0 : te.toString()).replace("{total}", o == null ? void 0 : o.toString()), H = ye(() => {
5338
5338
  if (!f || s.isExpandable)
5339
5339
  return null;
5340
5340
  const E = O == null ? void 0 : O.filter(
5341
- (de) => d && d.includes(de.id)
5341
+ (ae) => d && d.includes(ae.id)
5342
5342
  ).length;
5343
5343
  return c ? null : o === void 0 ? /* @__PURE__ */ i(We, { className: "pb-4" }) : /* @__PURE__ */ D(Ne, { align: "bottom", className: "pb-4", children: [
5344
5344
  /* @__PURE__ */ i(be, { span: T ? 8 : 12, children: /* @__PURE__ */ i(
@@ -5361,7 +5361,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5361
5361
  onSelectAllRecords: T
5362
5362
  }
5363
5363
  ) }),
5364
- /* @__PURE__ */ i(be, { span: T ? 8 : 12, className: "text-right", children: oe })
5364
+ /* @__PURE__ */ i(be, { span: T ? 8 : 12, className: "text-right", children: ce })
5365
5365
  ] });
5366
5366
  }, [
5367
5367
  O,
@@ -5371,32 +5371,32 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5371
5371
  n,
5372
5372
  d,
5373
5373
  f,
5374
- oe,
5374
+ ce,
5375
5375
  o,
5376
5376
  s.isExpandable
5377
- ]), ie = ye(() => {
5377
+ ]), oe = ye(() => {
5378
5378
  if (!_)
5379
5379
  return null;
5380
- const E = _.columns.filter((Y) => Y.sum !== void 0).map((Y) => ({ label: Y.sum, field: Y.id }));
5380
+ const E = _.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
5381
5381
  if (!E || E.length === 0)
5382
5382
  return null;
5383
- const de = [], z = (d == null ? void 0 : d.length) > 0 ? O.filter((Y) => d.includes(Y.id)) : O;
5384
- return E.forEach((Y) => {
5385
- const me = z.reduce((ve, ke) => ke[Y.field] && !isNaN(ke[Y.field]) ? ve + ke[Y.field] : ve, 0);
5386
- de.push(`${Y.label}: ${Math.round(me * 100) / 100}`);
5387
- }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: de.join(", ") });
5388
- }, [O, d, _]), ee = ye(() => {
5383
+ const ae = [], Y = (d == null ? void 0 : d.length) > 0 ? O.filter((z) => d.includes(z.id)) : O;
5384
+ return E.forEach((z) => {
5385
+ const me = Y.reduce((ve, ke) => ke[z.field] && !isNaN(ke[z.field]) ? ve + ke[z.field] : ve, 0);
5386
+ ae.push(`${z.label}: ${Math.round(me * 100) / 100}`);
5387
+ }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ae.join(", ") });
5388
+ }, [O, d, _]), Z = ye(() => {
5389
5389
  if (_ !== null && k && k.length > 0)
5390
5390
  return su(k, O, 600);
5391
- }, [k, O, _]), N = ye(() => h && (_ != null && _.columns.some((E) => E.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
5392
- return _ === null || !ee || ((L = ee == null ? void 0 : ee.columns) == null ? void 0 : L.length) === 0 ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(Vn, { children: [
5391
+ }, [k, O, _]), L = ye(() => h && (_ != null && _.columns.some((E) => E.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
5392
+ return _ === null || !Z || ((N = Z == null ? void 0 : Z.columns) == null ? void 0 : N.length) === 0 ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(Vn, { children: [
5393
5393
  H,
5394
5394
  /* @__PURE__ */ i(
5395
5395
  Tl,
5396
5396
  {
5397
5397
  ref: C,
5398
- height: N,
5399
- columns: ee.columns,
5398
+ height: L,
5399
+ columns: Z.columns,
5400
5400
  dataSource: O,
5401
5401
  loading: c,
5402
5402
  loadingComponent: /* @__PURE__ */ i(We, {}),
@@ -5422,7 +5422,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5422
5422
  } : void 0
5423
5423
  }
5424
5424
  ),
5425
- ie
5425
+ oe
5426
5426
  ] });
5427
5427
  }
5428
5428
  ), Sn = $r(ys);
@@ -5454,21 +5454,21 @@ const vs = (e) => {
5454
5454
  searchParams: A = [],
5455
5455
  setSearchValues: T,
5456
5456
  clearSelection: C
5457
- } = e, [O, V] = S(!1), [F, _] = S(!1), [$, R] = S(), [G, W] = S(1), [j, M] = S(0), [k, X] = S(), [te, oe] = S([]), [H, ie] = S(void 0), [ee, N] = S(void 0), L = Q(I || $t), E = Q([]), de = B(
5458
- (ce) => {
5459
- v == null || v([...ce]), oe([...ce]);
5457
+ } = e, [O, V] = S(!1), [F, _] = S(!1), [$, R] = S(), [G, W] = S(1), [j, M] = S(0), [k, Q] = S(), [te, ce] = S([]), [H, oe] = S(void 0), [Z, L] = S(void 0), N = X(I || $t), E = X([]), ae = B(
5458
+ (de) => {
5459
+ v == null || v([...de]), ce([...de]);
5460
5460
  },
5461
5461
  [v]
5462
- ), z = B(() => g || te, [g, te]), Y = B(async () => {
5463
- const ce = await P.getHandler().nameSearch({
5462
+ ), Y = B(() => g || te, [g, te]), z = B(async () => {
5463
+ const de = await P.getHandler().nameSearch({
5464
5464
  model: t,
5465
5465
  payload: l,
5466
- limit: L.current,
5466
+ limit: N.current,
5467
5467
  attrs: b,
5468
5468
  context: u
5469
5469
  });
5470
- if (X(ce.length), f == null || f(ce.length), ce.length > 0) {
5471
- const fe = ce.map((ne) => ne == null ? void 0 : ne[0]), { colors: we, status: _e } = Ot(d), J = {};
5470
+ if (Q(de.length), f == null || f(de.length), de.length > 0) {
5471
+ const fe = de.map((ne) => ne == null ? void 0 : ne[0]), { colors: we, status: _e } = Ot(d), J = {};
5472
5472
  we && (J.colors = we), _e && (J.status = _e);
5473
5473
  const Ce = await P.getHandler().readEvalUiObjects({
5474
5474
  model: t,
@@ -5478,18 +5478,18 @@ const vs = (e) => {
5478
5478
  context: u,
5479
5479
  attrs: J
5480
5480
  }), Se = Ce[0];
5481
- E.current = [...Se], ie(Qt(Ce[1])), N(Dn(Ce[1]));
5481
+ E.current = [...Se], oe(Qt(Ce[1])), L(Dn(Ce[1]));
5482
5482
  const Ue = Se.map((ne) => ne.id), Me = h !== void 0 ? Yt({
5483
5483
  resultsToSort: Se,
5484
5484
  sorter: h,
5485
5485
  fields: { ...d.fields, ...p.fields }
5486
5486
  }) : [...E.current];
5487
- de(Me), Ue.length > 0 ? y == null || y(0) : y == null || y(void 0);
5487
+ ae(Me), Ue.length > 0 ? y == null || y(0) : y == null || y(void 0);
5488
5488
  } else
5489
- de([]), y == null || y(void 0);
5489
+ ae([]), y == null || y(void 0);
5490
5490
  V(!1), c.current = !0;
5491
5491
  }, [
5492
- de,
5492
+ ae,
5493
5493
  c,
5494
5494
  l,
5495
5495
  t,
@@ -5501,25 +5501,25 @@ const vs = (e) => {
5501
5501
  y,
5502
5502
  f
5503
5503
  ]), me = B(
5504
- async (ce) => {
5505
- const { params: fe, newOffset: we } = ce || {}, _e = Zt(fe || A, b), { colors: J, status: Ce } = Ot(d), Se = {};
5504
+ async (de) => {
5505
+ const { params: fe, newOffset: we } = de || {}, _e = Zt(fe || A, b), { colors: J, status: Ce } = Ot(d), Se = {};
5506
5506
  J && (Se.colors = J), Ce && (Se.status = Ce);
5507
5507
  const { totalItems: Ue, results: Me, attrsEvaluated: ne } = await P.getHandler().searchForTree({
5508
5508
  params: _e,
5509
- limit: L.current,
5509
+ limit: N.current,
5510
5510
  offset: we || j,
5511
5511
  model: t,
5512
5512
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
5513
5513
  context: u,
5514
5514
  attrs: Se
5515
5515
  });
5516
- ie(Qt(ne)), N(Dn(ne)), E.current = [...Me];
5516
+ oe(Qt(ne)), L(Dn(ne)), E.current = [...Me];
5517
5517
  const Oe = h !== void 0 ? Yt({
5518
5518
  resultsToSort: Me,
5519
5519
  sorter: h,
5520
5520
  fields: { ...d.fields, ...p.fields }
5521
5521
  }) : [...E.current];
5522
- if (de(Oe), g && Oe.length > 0) {
5522
+ if (ae(Oe), g && Oe.length > 0) {
5523
5523
  const pe = Oe.findIndex(
5524
5524
  (rt) => x === rt.id
5525
5525
  );
@@ -5528,12 +5528,12 @@ const vs = (e) => {
5528
5528
  y == null || y(void 0);
5529
5529
  V(!1);
5530
5530
  const qe = await Ue();
5531
- X(qe), f == null || f(qe);
5531
+ Q(qe), f == null || f(qe);
5532
5532
  },
5533
5533
  [
5534
5534
  y,
5535
5535
  g,
5536
- de,
5536
+ ae,
5537
5537
  x,
5538
5538
  t,
5539
5539
  u,
@@ -5546,9 +5546,9 @@ const vs = (e) => {
5546
5546
  A
5547
5547
  ]
5548
5548
  ), ve = B(
5549
- async (ce) => {
5549
+ async (de) => {
5550
5550
  try {
5551
- V(!0), a == null || a(!0), l && !c.current ? await Y() : await me(ce), C == null || C();
5551
+ V(!0), a == null || a(!0), l && !c.current ? await z() : await me(de), C == null || C();
5552
5552
  } catch (fe) {
5553
5553
  R(typeof fe == "string" ? fe : fe.message), V(!1);
5554
5554
  } finally {
@@ -5558,36 +5558,36 @@ const vs = (e) => {
5558
5558
  [
5559
5559
  C,
5560
5560
  l,
5561
- Y,
5561
+ z,
5562
5562
  c,
5563
5563
  me,
5564
5564
  r,
5565
5565
  a
5566
5566
  ]
5567
5567
  ), ke = B(
5568
- (ce) => {
5569
- if (JSON.stringify(ce) === JSON.stringify(h))
5568
+ (de) => {
5569
+ if (JSON.stringify(de) === JSON.stringify(h))
5570
5570
  return;
5571
- m == null || m(ce);
5572
- const fe = ce !== void 0 ? Yt({
5573
- resultsToSort: z(),
5574
- sorter: ce,
5571
+ m == null || m(de);
5572
+ const fe = de !== void 0 ? Yt({
5573
+ resultsToSort: Y(),
5574
+ sorter: de,
5575
5575
  fields: { ...d.fields, ...p.fields }
5576
5576
  }) : [...E.current];
5577
- de(fe);
5577
+ ae(fe);
5578
5578
  },
5579
5579
  [
5580
5580
  h,
5581
5581
  m,
5582
- z,
5582
+ Y,
5583
5583
  d == null ? void 0 : d.fields,
5584
5584
  p == null ? void 0 : p.fields,
5585
- de
5585
+ ae
5586
5586
  ]
5587
5587
  ), Le = B(
5588
- (ce) => {
5589
- const { params: fe, searchValues: we, limit: _e, offset: J } = ce;
5590
- O || (n == null || n(void 0), r == null || r([]), T == null || T(we), o == null || o(fe), s == null || s(!1), _(!0), R(void 0), W(1), _e && (L.current = _e, w == null || w(_e)), J && M(J), ve({
5588
+ (de) => {
5589
+ const { params: fe, searchValues: we, limit: _e, offset: J } = de;
5590
+ O || (n == null || n(void 0), r == null || r([]), T == null || T(we), o == null || o(fe), s == null || s(!1), _(!0), R(void 0), W(1), _e && (N.current = _e, w == null || w(_e)), J && M(J), ve({
5591
5591
  params: fe,
5592
5592
  newOffset: J
5593
5593
  }));
@@ -5603,8 +5603,8 @@ const vs = (e) => {
5603
5603
  w
5604
5604
  ]
5605
5605
  ), Ie = B(
5606
- (ce) => {
5607
- V(!0), W(ce), M((ce - 1) * I);
5606
+ (de) => {
5607
+ V(!0), W(de), M((de - 1) * I);
5608
5608
  },
5609
5609
  [V, I, M, W]
5610
5610
  ), $e = B(() => {
@@ -5617,16 +5617,16 @@ const vs = (e) => {
5617
5617
  w,
5618
5618
  I
5619
5619
  ]), Ke = B(
5620
- async (ce) => {
5621
- const fe = ce[(d == null ? void 0 : d.field_parent) || "child_id"], we = await P.getHandler().readObjects({
5620
+ async (de) => {
5621
+ const fe = de[(d == null ? void 0 : d.field_parent) || "child_id"], we = await P.getHandler().readObjects({
5622
5622
  model: t,
5623
5623
  ids: fe,
5624
5624
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
5625
5625
  context: u
5626
5626
  });
5627
- return de([...z(), ...we]), zn(Ot(d), we);
5627
+ return ae([...Y(), ...we]), zn(Ot(d), we);
5628
5628
  },
5629
- [d, t, u, z, de]
5629
+ [d, t, u, Y, ae]
5630
5630
  ), Fe = B(async () => await P.getHandler().searchAllIds({
5631
5631
  params: Zt(A, b),
5632
5632
  model: t,
@@ -5642,13 +5642,13 @@ const vs = (e) => {
5642
5642
  searchError: $,
5643
5643
  page: G,
5644
5644
  offset: j,
5645
- limit: L.current,
5646
- getResults: z,
5645
+ limit: N.current,
5646
+ getResults: Y,
5647
5647
  requestPageChange: Ie,
5648
5648
  changeSort: ke,
5649
5649
  fetchChildrenForRecord: Ke,
5650
5650
  colorsForResults: H,
5651
- statusForResults: ee,
5651
+ statusForResults: Z,
5652
5652
  totalItems: k,
5653
5653
  getAllIds: Fe
5654
5654
  };
@@ -5667,25 +5667,25 @@ function Du(e, t) {
5667
5667
  rootTree: f = !1,
5668
5668
  parentContext: d = {},
5669
5669
  onChangeSelectedRowKeys: p
5670
- } = e, [h, m] = S(!1), [y, v] = S(!1), g = Q(!1), b = Q(null), [x, I] = S(), [w, A] = S(), [T, C] = S(), [O, V] = S(), [F, _] = S(200), $ = Q(), { height: R } = qn(), G = re(
5670
+ } = e, [h, m] = S(!1), [y, v] = S(!1), g = X(!1), b = X(null), [x, I] = S(), [w, A] = S(), [T, C] = S(), [O, V] = S(), [F, _] = S(200), $ = X(), { height: R } = qn(), G = re(
5671
5671
  ln
5672
5672
  ), { processAction: W } = G || {}, j = re(
5673
5673
  lt
5674
5674
  ), {
5675
5675
  setResults: M = void 0,
5676
5676
  setCurrentItemIndex: k = void 0,
5677
- currentId: X = void 0,
5677
+ currentId: Q = void 0,
5678
5678
  results: te = void 0,
5679
- selectedRowItems: oe = void 0,
5679
+ selectedRowItems: ce = void 0,
5680
5680
  setSelectedRowItems: H = void 0,
5681
- searchParams: ie = [],
5682
- setSearchParams: ee = void 0,
5683
- searchVisible: N = !0,
5684
- setSearchVisible: L = void 0,
5681
+ searchParams: oe = [],
5682
+ setSearchParams: Z = void 0,
5683
+ searchVisible: L = !0,
5684
+ setSearchVisible: N = void 0,
5685
5685
  sorter: E = void 0,
5686
- setSorter: de = void 0,
5687
- setTotalItems: z = void 0,
5688
- setSearchTreeNameSearch: Y = void 0,
5686
+ setSorter: ae = void 0,
5687
+ setTotalItems: Y = void 0,
5688
+ setSearchTreeNameSearch: z = void 0,
5689
5689
  setTreeIsLoading: me = void 0,
5690
5690
  searchValues: ve = {},
5691
5691
  setSearchValues: ke = void 0,
@@ -5699,7 +5699,7 @@ function Du(e, t) {
5699
5699
  ), {
5700
5700
  submit: Ke,
5701
5701
  clear: Fe,
5702
- fetchResults: ce,
5702
+ fetchResults: de,
5703
5703
  tableRefreshing: fe,
5704
5704
  searchFilterLoading: we,
5705
5705
  searchError: _e,
@@ -5716,12 +5716,12 @@ function Du(e, t) {
5716
5716
  getAllIds: q
5717
5717
  } = vs({
5718
5718
  model: x,
5719
- setSearchTreeNameSearch: Y,
5719
+ setSearchTreeNameSearch: z,
5720
5720
  setSelectedRowItems: $e,
5721
- setSearchParams: ee,
5721
+ setSearchParams: Z,
5722
5722
  setSearchValues: ke,
5723
- searchParams: ie,
5724
- setSearchVisible: L,
5723
+ searchParams: oe,
5724
+ setSearchVisible: N,
5725
5725
  setTreeIsLoading: me,
5726
5726
  nameSearch: a,
5727
5727
  searchNameGetDoneRef: g,
@@ -5729,25 +5729,25 @@ function Du(e, t) {
5729
5729
  formView: T,
5730
5730
  treeView: w,
5731
5731
  sorter: E,
5732
- setSorter: de,
5732
+ setSorter: ae,
5733
5733
  setCurrentItemIndex: k,
5734
5734
  setResultsActionView: M,
5735
5735
  resultsActionView: te,
5736
5736
  domain: c,
5737
- currentId: X,
5738
- setActionViewTotalItems: z,
5737
+ currentId: Q,
5738
+ setActionViewTotalItems: Y,
5739
5739
  limit: Le,
5740
5740
  setLimit: Ie,
5741
5741
  clearSelection: (St = b.current) == null ? void 0 : St.unselectAll
5742
5742
  });
5743
5743
  ht(t, () => ({
5744
5744
  refreshResults: () => {
5745
- g.current = !1, ce();
5745
+ g.current = !1, de();
5746
5746
  },
5747
5747
  getFields: () => w == null ? void 0 : w.fields,
5748
5748
  getDomain: () => c
5749
5749
  })), ue(() => {
5750
- y && u && w && (g.current = !1, ce());
5750
+ y && u && w && (g.current = !1, de());
5751
5751
  }, [J, Se, y, u, a, w]);
5752
5752
  const ge = async () => {
5753
5753
  v(!1), m(!0), V(void 0), me == null || me(!0);
@@ -5801,7 +5801,7 @@ function Du(e, t) {
5801
5801
  }));
5802
5802
  },
5803
5803
  [x, d, W, w]
5804
- ), Z = B(
5804
+ ), ee = B(
5805
5805
  async (Be) => {
5806
5806
  const { id: ze } = Be;
5807
5807
  if (w != null && w.isExpandable) {
@@ -5824,9 +5824,9 @@ function Du(e, t) {
5824
5824
  const Be = await q();
5825
5825
  H == null || H(Be.map((ze) => ({ id: ze }))), p == null || p(Be);
5826
5826
  }, [q, p, H]), Ye = ye(() => w != null && w.isExpandable ? R - 160 : R - (F + 240), [R, F, w == null ? void 0 : w.isExpandable]), Pe = ye(
5827
- () => oe == null ? void 0 : oe.map((Be) => Be.id),
5828
- [oe]
5829
- ), ot = B(() => !w || !T ? null : /* @__PURE__ */ D(ae, { children: [
5827
+ () => ce == null ? void 0 : ce.map((Be) => Be.id),
5828
+ [ce]
5829
+ ), ot = B(() => !w || !T ? null : /* @__PURE__ */ D(se, { children: [
5830
5830
  /* @__PURE__ */ i(
5831
5831
  ms,
5832
5832
  {
@@ -5843,7 +5843,7 @@ function Du(e, t) {
5843
5843
  onLimitChange: xe,
5844
5844
  setSearchFilterHeight: _,
5845
5845
  searchError: _e,
5846
- searchVisible: N,
5846
+ searchVisible: L,
5847
5847
  searchValues: ve
5848
5848
  }
5849
5849
  ),
@@ -5859,7 +5859,7 @@ function Du(e, t) {
5859
5859
  results: Ue(),
5860
5860
  onRequestPageChange: Me,
5861
5861
  loading: fe,
5862
- onRowClicked: Z,
5862
+ onRowClicked: ee,
5863
5863
  scrollY: l || Ye,
5864
5864
  colorsForResults: qe,
5865
5865
  statusForResults: pe,
@@ -5885,7 +5885,7 @@ function Du(e, t) {
5885
5885
  Le,
5886
5886
  Ce,
5887
5887
  Se,
5888
- Z,
5888
+ ee,
5889
5889
  xe,
5890
5890
  J,
5891
5891
  d,
@@ -5894,7 +5894,7 @@ function Du(e, t) {
5894
5894
  _e,
5895
5895
  we,
5896
5896
  ve,
5897
- N,
5897
+ L,
5898
5898
  Ee,
5899
5899
  Pe,
5900
5900
  E,
@@ -5964,7 +5964,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
5964
5964
  }
5965
5965
  g(h);
5966
5966
  }
5967
- const w = () => /* @__PURE__ */ D(ae, { children: [
5967
+ const w = () => /* @__PURE__ */ D(se, { children: [
5968
5968
  /* @__PURE__ */ i(
5969
5969
  ws,
5970
5970
  {
@@ -6005,7 +6005,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6005
6005
  /* @__PURE__ */ i(je, { icon: /* @__PURE__ */ i(nn, {}), onClick: b, children: p("cancel") })
6006
6006
  ] }) })
6007
6007
  ] });
6008
- return /* @__PURE__ */ D(ae, { children: [
6008
+ return /* @__PURE__ */ D(se, { children: [
6009
6009
  /* @__PURE__ */ i(
6010
6010
  at,
6011
6011
  {
@@ -6054,19 +6054,19 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6054
6054
  context: l,
6055
6055
  id: c,
6056
6056
  domain: u
6057
- } = r, f = o && !a ? { backgroundColor: Ss.colorPrimaryBg } : void 0, [d, p] = S(!1), [h, m] = S(!1), [y, v] = S(!1), [g, b] = S(), x = Q(!1), [I, w] = S(""), A = Q(), T = re(He), { domain: C, getValues: O, getFields: V, getContext: F, elementHasLostFocus: _ } = T || {}, $ = Q([]), [R, G] = S([]), W = t && t[0] || void 0, j = t && t[1] || "";
6057
+ } = r, f = o && !a ? { backgroundColor: Ss.colorPrimaryBg } : void 0, [d, p] = S(!1), [h, m] = S(!1), [y, v] = S(!1), [g, b] = S(), x = X(!1), [I, w] = S(""), A = X(), T = re(He), { domain: C, getValues: O, getFields: V, getContext: F, elementHasLostFocus: _ } = T || {}, $ = X([]), [R, G] = S([]), W = t && t[0] || void 0, j = t && t[1] || "";
6058
6058
  ue(() => {
6059
- !Array.isArray(t) && t && oe(t);
6059
+ !Array.isArray(t) && t && ce(t);
6060
6060
  }, [t]), ue(() => {
6061
- W && j.length === 0 ? oe(W) : W && j.length > 0 ? w(j) : !W && !j && w(A.current || "");
6061
+ W && j.length === 0 ? ce(W) : W && j.length > 0 ? w(j) : !W && !j && w(A.current || "");
6062
6062
  }, [t]);
6063
- const M = (N) => {
6064
- n == null || n(N), _ == null || _();
6065
- }, k = (N) => {
6066
- A.current = N.target.value, M([void 0, ""]);
6067
- }, X = async () => {
6063
+ const M = (L) => {
6064
+ n == null || n(L), _ == null || _();
6065
+ }, k = (L) => {
6066
+ A.current = L.target.value, M([void 0, ""]);
6067
+ }, Q = async () => {
6068
6068
  if (!y && I !== j) {
6069
- if (await new Promise((N) => setTimeout(N, 100)), x.current) {
6069
+ if (await new Promise((L) => setTimeout(L, 100)), x.current) {
6070
6070
  M([void 0, ""]);
6071
6071
  return;
6072
6072
  }
@@ -6075,43 +6075,43 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6075
6075
  if ($.current && $.current.length > 0)
6076
6076
  te(A.current);
6077
6077
  else {
6078
- const N = await P.getHandler().nameSearch({
6078
+ const L = await P.getHandler().nameSearch({
6079
6079
  model: s,
6080
6080
  payload: A.current,
6081
6081
  context: { ...F == null ? void 0 : F(), ...l }
6082
6082
  });
6083
- N.length === 1 ? (A.current = void 0, M(N[0])) : te(A.current);
6083
+ L.length === 1 ? (A.current = void 0, M(L[0])) : te(A.current);
6084
6084
  }
6085
- } catch (N) {
6086
- Nt(N);
6085
+ } catch (L) {
6086
+ Nt(L);
6087
6087
  } finally {
6088
6088
  v(!1);
6089
6089
  }
6090
6090
  }
6091
- }, te = async (N) => {
6091
+ }, te = async (L) => {
6092
6092
  if (await H(), $.current && $.current.length > 0) {
6093
- const L = await P.getHandler().searchAllIds({
6093
+ const N = await P.getHandler().searchAllIds({
6094
6094
  params: $.current,
6095
6095
  model: s,
6096
6096
  context: { ...F == null ? void 0 : F(), ...l },
6097
6097
  totalItems: 2
6098
6098
  });
6099
- L.length === 1 ? oe(L[0]) : (b(N), p(!0));
6099
+ N.length === 1 ? ce(N[0]) : (b(L), p(!0));
6100
6100
  return;
6101
6101
  }
6102
- b(N), p(!0);
6103
- }, oe = async (N) => {
6102
+ b(L), p(!0);
6103
+ }, ce = async (L) => {
6104
6104
  v(!0);
6105
6105
  try {
6106
- const L = await P.getHandler().execute({
6106
+ const N = await P.getHandler().execute({
6107
6107
  action: "name_get",
6108
- payload: [N],
6108
+ payload: [L],
6109
6109
  model: s,
6110
6110
  context: { ...F == null ? void 0 : F(), ...l }
6111
6111
  });
6112
- M([N, L[0][1]]);
6113
- } catch (L) {
6114
- Nt(L);
6112
+ M([L, N[0][1]]);
6113
+ } catch (N) {
6114
+ Nt(N);
6115
6115
  } finally {
6116
6116
  v(!1);
6117
6117
  }
@@ -6132,8 +6132,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6132
6132
  })
6133
6133
  )), G($.current);
6134
6134
  }
6135
- async function ie(N) {
6136
- N.keyCode === 13 ? (N.preventDefault(), N.stopPropagation(), await X()) : N.code === "Backspace" && W !== void 0 && (N.preventDefault(), N.stopPropagation(), M([void 0, ""]));
6135
+ async function oe(L) {
6136
+ L.keyCode === 13 ? (L.preventDefault(), L.stopPropagation(), await Q()) : L.code === "Backspace" && W !== void 0 && (L.preventDefault(), L.stopPropagation(), M([void 0, ""]));
6137
6137
  }
6138
6138
  return /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, children: [
6139
6139
  /* @__PURE__ */ i(be, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ i(
@@ -6148,8 +6148,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6148
6148
  borderTopRightRadius: 0,
6149
6149
  borderBottomRightRadius: 0
6150
6150
  },
6151
- onBlur: X,
6152
- onKeyDown: ie,
6151
+ onBlur: Q,
6152
+ onKeyDown: oe,
6153
6153
  suffix: /* @__PURE__ */ i(
6154
6154
  so,
6155
6155
  {
@@ -6192,8 +6192,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6192
6192
  context: { ...F == null ? void 0 : F(), ...l },
6193
6193
  visible: d,
6194
6194
  nameSearch: W ? void 0 : g,
6195
- onSelectValues: async (N) => {
6196
- p(!1), oe(N[0]), x.current = !1, A.current = void 0;
6195
+ onSelectValues: async (L) => {
6196
+ p(!1), ce(L[0]), x.current = !1, A.current = void 0;
6197
6197
  },
6198
6198
  onCloseModal: () => {
6199
6199
  p(!1), x.current = !1;
@@ -6207,8 +6207,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6207
6207
  parentContext: { ...F == null ? void 0 : F(), ...l },
6208
6208
  id: t && t[0],
6209
6209
  visible: h,
6210
- onSubmitSucceed: (N) => {
6211
- m(!1), oe(N);
6210
+ onSubmitSucceed: (L) => {
6211
+ m(!1), ce(L);
6212
6212
  },
6213
6213
  onCancel: () => {
6214
6214
  m(!1);
@@ -6389,7 +6389,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6389
6389
  ] });
6390
6390
  }
6391
6391
  function w() {
6392
- return /* @__PURE__ */ D(ae, { children: [
6392
+ return /* @__PURE__ */ D(se, { children: [
6393
6393
  g(),
6394
6394
  /* @__PURE__ */ i(
6395
6395
  tt,
@@ -6422,7 +6422,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6422
6422
  onClick: r
6423
6423
  }
6424
6424
  ),
6425
- d && m && /* @__PURE__ */ D(ae, { children: [
6425
+ d && m && /* @__PURE__ */ D(se, { children: [
6426
6426
  g(),
6427
6427
  /* @__PURE__ */ i(
6428
6428
  tt,
@@ -6471,17 +6471,17 @@ const Uu = (e) => {
6471
6471
  getContext: m,
6472
6472
  domain: y,
6473
6473
  fetchValues: v
6474
- } = f || {}, { t: g } = he(), [b, x] = S(!1), [I, w] = S(!1), [A, T] = S(), [C, O] = S(!1), [V, F] = S(!1), [_, $] = S(), [R, G] = S([]), [W, j] = S(!1), M = Q([]), [k, X] = S(), te = Q(), [oe, H] = S(void 0), {
6475
- readOnly: ie,
6476
- relation: ee,
6477
- context: N,
6478
- domain: L
6479
- } = r, E = r.type === "many2many", { id: de } = r, z = s.filter(
6474
+ } = f || {}, { t: g } = he(), [b, x] = S(!1), [I, w] = S(!1), [A, T] = S(), [C, O] = S(!1), [V, F] = S(!1), [_, $] = S(), [R, G] = S([]), [W, j] = S(!1), M = X([]), [k, Q] = S(), te = X(), [ce, H] = S(void 0), {
6475
+ readOnly: oe,
6476
+ relation: Z,
6477
+ context: L,
6478
+ domain: N
6479
+ } = r, E = r.type === "many2many", { id: ae } = r, Y = s.filter(
6480
6480
  (q) => (q.values || q.treeValues) && q.operation !== "pendingRemove"
6481
- ), Y = Q();
6481
+ ), z = X();
6482
6482
  ue(() => {
6483
- if (Y.current !== a) {
6484
- Y.current = a, me();
6483
+ if (z.current !== a) {
6484
+ z.current = a, me();
6485
6485
  return;
6486
6486
  }
6487
6487
  me();
@@ -6499,12 +6499,12 @@ const Uu = (e) => {
6499
6499
  items: Hu(q)
6500
6500
  });
6501
6501
  }, ke = async () => {
6502
- await Le(), c > z.length - 1 && c !== 0 && u(0);
6502
+ await Le(), c > Y.length - 1 && c !== 0 && u(0);
6503
6503
  }, Le = async (q) => {
6504
6504
  var ge, Ae, xe;
6505
6505
  w(!0), x(!1), T(void 0);
6506
6506
  try {
6507
- const [De, Z] = await eo({
6507
+ const [De, ee] = await eo({
6508
6508
  treeView: {
6509
6509
  arch: (ge = o.get("tree")) == null ? void 0 : ge.arch,
6510
6510
  fields: (Ae = o.get("tree")) == null ? void 0 : Ae.fields
@@ -6512,12 +6512,12 @@ const Uu = (e) => {
6512
6512
  formView: {
6513
6513
  fields: ((xe = o.get("form")) == null ? void 0 : xe.fields) || {}
6514
6514
  },
6515
- model: ee,
6515
+ model: Z,
6516
6516
  items: s,
6517
- context: { ...m == null ? void 0 : m(), ...N },
6517
+ context: { ...m == null ? void 0 : m(), ...L },
6518
6518
  currentView: q || a
6519
6519
  });
6520
- return te.current || (te.current = De.map((Ee) => Ee.id)), (a || q) === "tree" && Z && H(Z), ve(De), De;
6520
+ return te.current || (te.current = De.map((Ee) => Ee.id)), (a || q) === "tree" && ee && H(ee), ve(De), De;
6521
6521
  } catch (De) {
6522
6522
  T(De);
6523
6523
  } finally {
@@ -6525,8 +6525,8 @@ const Uu = (e) => {
6525
6525
  }
6526
6526
  };
6527
6527
  async function Ie() {
6528
- L && (M.current = await P.getHandler().evalDomain({
6529
- domain: L,
6528
+ N && (M.current = await P.getHandler().evalDomain({
6529
+ domain: N,
6530
6530
  values: Lt({
6531
6531
  fields: p(),
6532
6532
  values: h()
@@ -6536,7 +6536,7 @@ const Uu = (e) => {
6536
6536
  })), y && y.length > 0 && (M.current = M.current.concat(
6537
6537
  Br({
6538
6538
  domain: y,
6539
- widgetFieldName: de
6539
+ widgetFieldName: ae
6540
6540
  })
6541
6541
  ));
6542
6542
  }
@@ -6550,21 +6550,21 @@ const Uu = (e) => {
6550
6550
  u(c - 1);
6551
6551
  }) : u(c - 1));
6552
6552
  }, Fe = () => {
6553
- const q = z.length;
6553
+ const q = Y.length;
6554
6554
  c < q - 1 && (a === "form" ? fe(() => {
6555
6555
  u(c + 1);
6556
6556
  }) : u(c + 1));
6557
- }, ce = async () => {
6558
- const q = z[c].id, ge = (await P.getHandler().readObjects({
6559
- model: ee,
6557
+ }, de = async () => {
6558
+ const q = Y[c].id, ge = (await P.getHandler().readObjects({
6559
+ model: Z,
6560
6560
  ids: [q],
6561
6561
  fields: o.get("form").fields,
6562
- context: { ...m == null ? void 0 : m(), ...N }
6562
+ context: { ...m == null ? void 0 : m(), ...L }
6563
6563
  }))[0], Ae = (await P.getHandler().readObjects({
6564
- model: ee,
6564
+ model: Z,
6565
6565
  ids: [q],
6566
6566
  fields: o.get("tree").fields,
6567
- context: { ...m == null ? void 0 : m(), ...N }
6567
+ context: { ...m == null ? void 0 : m(), ...L }
6568
6568
  }))[0], xe = s.map((De) => De.id === q ? {
6569
6569
  ...De,
6570
6570
  operation: "original",
@@ -6576,7 +6576,7 @@ const Uu = (e) => {
6576
6576
  b ? an({
6577
6577
  t: g,
6578
6578
  onOk: () => {
6579
- ce(), q(), x(!1);
6579
+ de(), q(), x(!1);
6580
6580
  }
6581
6581
  }) : q();
6582
6582
  }, we = () => {
@@ -6608,22 +6608,22 @@ const Uu = (e) => {
6608
6608
  }, Ce = async () => {
6609
6609
  w(!0), x(!1), T(void 0);
6610
6610
  try {
6611
- if (z[c].id > 0) {
6612
- const q = s.map((ge) => ge.id === z[c].id ? {
6611
+ if (Y[c].id > 0) {
6612
+ const q = s.map((ge) => ge.id === Y[c].id ? {
6613
6613
  ...ge,
6614
6614
  operation: "pendingRemove"
6615
6615
  } : ge);
6616
6616
  ve(q);
6617
6617
  } else
6618
6618
  ve(
6619
- s.filter((q) => q.id !== z[c].id)
6619
+ s.filter((q) => q.id !== Y[c].id)
6620
6620
  );
6621
6621
  } catch (q) {
6622
6622
  T(q);
6623
6623
  }
6624
6624
  u(0), w(!1);
6625
6625
  }, Se = async () => {
6626
- const q = z.filter((ge) => R.includes(ge.id));
6626
+ const q = Y.filter((ge) => R.includes(ge.id));
6627
6627
  w(!0), x(!1), T(void 0);
6628
6628
  try {
6629
6629
  const ge = q.map((xe) => xe.id), Ae = s.filter((xe) => !(ge.includes(xe.id) && xe.id < 0)).map((xe) => ge.includes(xe.id) ? {
@@ -6645,19 +6645,19 @@ const Uu = (e) => {
6645
6645
  treeValues: { ...Ae, id: q }
6646
6646
  });
6647
6647
  else if (q)
6648
- De = s.map((Z) => Z.id === q ? {
6648
+ De = s.map((ee) => ee.id === q ? {
6649
6649
  id: q,
6650
6650
  operation: q > 0 ? "pendingUpdate" : "pendingCreate",
6651
6651
  values: { ...Ae, id: q },
6652
6652
  treeValues: { ...Ae, id: q }
6653
- } : Z);
6653
+ } : ee);
6654
6654
  else {
6655
- const Z = Qi(s);
6655
+ const ee = Qi(s);
6656
6656
  De = s.concat({
6657
- id: Z,
6657
+ id: ee,
6658
6658
  operation: "pendingCreate",
6659
- values: { ...Ae, id: Z },
6660
- treeValues: { ...Ae, id: Z }
6659
+ values: { ...Ae, id: ee },
6660
+ treeValues: { ...Ae, id: ee }
6661
6661
  });
6662
6662
  }
6663
6663
  ve(De), W || O(!1);
@@ -6672,21 +6672,21 @@ const Uu = (e) => {
6672
6672
  try {
6673
6673
  for (const xe of Ae) {
6674
6674
  const De = (await P.getHandler().readObjects({
6675
- model: ee,
6675
+ model: Z,
6676
6676
  ids: [xe],
6677
6677
  fields: o.get("form").fields,
6678
- context: { ...m == null ? void 0 : m(), ...N }
6679
- }))[0], Z = (await P.getHandler().readObjects({
6680
- model: ee,
6678
+ context: { ...m == null ? void 0 : m(), ...L }
6679
+ }))[0], ee = (await P.getHandler().readObjects({
6680
+ model: Z,
6681
6681
  ids: [xe],
6682
6682
  fields: o.get("tree").fields,
6683
- context: { ...m == null ? void 0 : m(), ...N }
6683
+ context: { ...m == null ? void 0 : m(), ...L }
6684
6684
  }))[0];
6685
6685
  ge.push({
6686
6686
  id: xe,
6687
6687
  operation: "pendingLink",
6688
6688
  values: De,
6689
- treeValues: Z
6689
+ treeValues: ee
6690
6690
  });
6691
6691
  }
6692
6692
  ve(ge);
@@ -6708,42 +6708,42 @@ const Uu = (e) => {
6708
6708
  const qe = () => {
6709
6709
  var ge, Ae, xe, De;
6710
6710
  if (a === "form")
6711
- return z.length === 0 ? g("noCurrentEntries") : a !== Y.current && s.some((Z) => !Z.values) ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(
6711
+ return Y.length === 0 ? g("noCurrentEntries") : a !== z.current && s.some((ee) => !ee.values) ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(
6712
6712
  cn,
6713
6713
  {
6714
6714
  formView: o.get("form"),
6715
- values: (ge = z[c]) == null ? void 0 : ge.values,
6716
- parentContext: { ...m == null ? void 0 : m(), ...N },
6717
- model: ee,
6718
- id: (Ae = z[c]) == null ? void 0 : Ae.id,
6715
+ values: (ge = Y[c]) == null ? void 0 : ge.values,
6716
+ parentContext: { ...m == null ? void 0 : m(), ...L },
6717
+ model: Z,
6718
+ id: (Ae = Y[c]) == null ? void 0 : Ae.id,
6719
6719
  submitMode: "values",
6720
- onFieldsChange: (Z) => {
6720
+ onFieldsChange: (ee) => {
6721
6721
  var Pe;
6722
- const Ee = (Pe = z[c]) == null ? void 0 : Pe.id, Ye = s.map((ot) => ot.id === Ee ? {
6722
+ const Ee = (Pe = Y[c]) == null ? void 0 : Pe.id, Ye = s.map((ot) => ot.id === Ee ? {
6723
6723
  ...ot,
6724
6724
  operation: ot.operation === "original" ? "pendingUpdate" : ot.operation,
6725
- values: { ...Z, id: Ee },
6726
- treeValues: { ...Z, id: Ee }
6725
+ values: { ...ee, id: Ee },
6726
+ treeValues: { ...ee, id: Ee }
6727
6727
  } : ot);
6728
6728
  ve(Ye), x(!0);
6729
6729
  },
6730
- readOnly: ie
6730
+ readOnly: oe
6731
6731
  }
6732
6732
  );
6733
6733
  let q = [];
6734
- if (z.some((Z) => Z.treeValues) && (q = k ? Yt({
6735
- resultsToSort: z.map((Z) => Z.treeValues),
6734
+ if (Y.some((ee) => ee.treeValues) && (q = k ? Yt({
6735
+ resultsToSort: Y.map((ee) => ee.treeValues),
6736
6736
  sorter: k,
6737
6737
  fields: {
6738
6738
  ...o.get("tree").fields,
6739
6739
  ...((xe = o.get("form")) == null ? void 0 : xe.fields) || {}
6740
6740
  }
6741
- }) : z.map((Z) => Z.treeValues)), a === "tree")
6741
+ }) : Y.map((ee) => ee.treeValues)), a === "tree")
6742
6742
  return /* @__PURE__ */ i(
6743
6743
  Sn,
6744
6744
  {
6745
- total: z.length,
6746
- limit: z.length,
6745
+ total: Y.length,
6746
+ limit: Y.length,
6747
6747
  treeView: o.get("tree"),
6748
6748
  results: q,
6749
6749
  loading: I,
@@ -6752,22 +6752,22 @@ const Uu = (e) => {
6752
6752
  selectedRowKeys: R,
6753
6753
  onRowSelectionChange: G,
6754
6754
  sorter: k,
6755
- onChangeSort: X,
6756
- context: { ...m == null ? void 0 : m(), ...N },
6757
- colorsForResults: oe,
6758
- readonly: ie,
6755
+ onChangeSort: Q,
6756
+ context: { ...m == null ? void 0 : m(), ...L },
6757
+ colorsForResults: ce,
6758
+ readonly: oe,
6759
6759
  scrollY: r == null ? void 0 : r.height
6760
6760
  }
6761
6761
  );
6762
6762
  if (a === "graph") {
6763
- const Z = [[`${r.inv_field}`, "=", d]];
6763
+ const ee = [[`${r.inv_field}`, "=", d]];
6764
6764
  return /* @__PURE__ */ i(
6765
6765
  on,
6766
6766
  {
6767
6767
  view_id: o.get("graph").view_id,
6768
6768
  model: r.relation,
6769
- domain: Z,
6770
- context: { ...m == null ? void 0 : m(), ...N },
6769
+ domain: ee,
6770
+ context: { ...m == null ? void 0 : m(), ...L },
6771
6771
  limit: 0
6772
6772
  }
6773
6773
  );
@@ -6776,16 +6776,16 @@ const Uu = (e) => {
6776
6776
  if (A)
6777
6777
  return /* @__PURE__ */ i(nt, { className: "mt-10", message: A, type: "error", banner: !0 });
6778
6778
  const pe = W;
6779
- return I ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(ae, { children: [
6779
+ return I ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(se, { children: [
6780
6780
  /* @__PURE__ */ i(
6781
6781
  Os,
6782
6782
  {
6783
6783
  mode: a,
6784
6784
  title: Oe(),
6785
- readOnly: ie || !1,
6785
+ readOnly: oe || !1,
6786
6786
  isMany2Many: E,
6787
6787
  formHasChanges: b,
6788
- totalItems: z.length,
6788
+ totalItems: Y.length,
6789
6789
  currentItemIndex: c,
6790
6790
  onDelete: we,
6791
6791
  onCreateItem: _e,
@@ -6803,18 +6803,18 @@ const Uu = (e) => {
6803
6803
  dn,
6804
6804
  {
6805
6805
  formView: o.get("form"),
6806
- model: ee,
6806
+ model: Z,
6807
6807
  id: _ == null ? void 0 : _.id,
6808
6808
  submitMode: "2many",
6809
6809
  values: _ == null ? void 0 : _.values,
6810
6810
  defaultValues: _ == null ? void 0 : _.defaultValues,
6811
6811
  visible: C,
6812
6812
  onSubmitSucceed: Ue,
6813
- parentContext: { ...m == null ? void 0 : m(), ...N },
6813
+ parentContext: { ...m == null ? void 0 : m(), ...L },
6814
6814
  onCancel: () => {
6815
6815
  j(!1), O(!1);
6816
6816
  },
6817
- readOnly: ie,
6817
+ readOnly: oe,
6818
6818
  mustClearAfterSave: pe,
6819
6819
  onMustRefreshParent: () => {
6820
6820
  v == null || v({ forceRefresh: !0 });
@@ -6825,8 +6825,8 @@ const Uu = (e) => {
6825
6825
  lo,
6826
6826
  {
6827
6827
  domain: M.current,
6828
- model: ee,
6829
- context: { ...m == null ? void 0 : m(), ...N },
6828
+ model: Z,
6829
+ context: { ...m == null ? void 0 : m(), ...L },
6830
6830
  visible: V,
6831
6831
  onSelectValues: async (q) => {
6832
6832
  F(!1), ne(q);
@@ -6841,7 +6841,7 @@ const Uu = (e) => {
6841
6841
  fieldName: e,
6842
6842
  widgetDomain: t
6843
6843
  }) => {
6844
- const n = Q([]), {
6844
+ const n = X([]), {
6845
6845
  getFields: r,
6846
6846
  getValues: o,
6847
6847
  getContext: s,
@@ -6874,7 +6874,7 @@ const Uu = (e) => {
6874
6874
  allRowsIds: r,
6875
6875
  gridRef: o
6876
6876
  }) => {
6877
- const [s, a] = S([]), l = Q(0), c = B(() => {
6877
+ const [s, a] = S([]), l = X(0), c = B(() => {
6878
6878
  var m, y;
6879
6879
  let h = !1;
6880
6880
  s.length === 0 ? h = !0 : h = !1, h ? (a(r), (m = o.current) == null || m.setSelectedRows(r)) : (a([]), (y = o.current) == null || y.setSelectedRows([]));
@@ -7323,7 +7323,7 @@ const Xu = ({
7323
7323
  );
7324
7324
  return { getColumnState: a, updateColumnState: l };
7325
7325
  }, Fs = (e) => {
7326
- const [t, n] = S(!0), r = Q(void 0), o = Q(!1), { getColumnState: s, updateColumnState: a } = tf(e);
7326
+ const [t, n] = S(!0), r = X(void 0), o = X(!1), { getColumnState: s, updateColumnState: a } = tf(e);
7327
7327
  return ue(() => {
7328
7328
  if (!e) {
7329
7329
  n(!1);
@@ -7360,7 +7360,7 @@ const Xu = ({
7360
7360
  aggregates: m,
7361
7361
  selectedRowKeys: y = []
7362
7362
  }) => {
7363
- const v = Q(), g = c || v, b = Q({}), x = Q(), I = Q(), w = Q(e), { t: A } = he();
7363
+ const v = X(), g = c || v, b = X({}), x = X(), I = X(), w = X(e), { t: A } = he();
7364
7364
  yt(() => {
7365
7365
  var R, G;
7366
7366
  if (w.current = e, I.current === void 0) {
@@ -7381,28 +7381,28 @@ const Xu = ({
7381
7381
  endRow: G,
7382
7382
  sortFields: W
7383
7383
  }) => {
7384
- const j = w.current, k = j.map((L) => L.id).slice(R, G), X = k.filter((L) => {
7385
- const E = j.find((de) => de.id === L);
7384
+ const j = w.current, k = j.map((N) => N.id).slice(R, G), Q = k.filter((N) => {
7385
+ const E = j.find((ae) => ae.id === N);
7386
7386
  return E && (E.operation === "original" || E.operation === "pendingLink");
7387
- }), te = j.filter((L) => L && L.operation !== "original" && L.operation !== "pendingLink");
7388
- if (X.length === 0 && te.length === 0)
7387
+ }), te = j.filter((N) => N && N.operation !== "original" && N.operation !== "pendingLink");
7388
+ if (Q.length === 0 && te.length === 0)
7389
7389
  return [];
7390
- const { results: oe, colors: H, status: ie } = await a({
7391
- idsToFetch: X,
7390
+ const { results: ce, colors: H, status: oe } = await a({
7391
+ idsToFetch: Q,
7392
7392
  sortFields: W
7393
- }), ee = zn(o, oe), N = k.map((L) => {
7394
- var de;
7395
- const E = ee.find((z) => z.id === L);
7396
- return E || ((de = j.find((z) => z.id === L)) == null ? void 0 : de.treeValues);
7393
+ }), Z = zn(o, ce), L = k.map((N) => {
7394
+ var ae;
7395
+ const E = Z.find((Y) => Y.id === N);
7396
+ return E || ((ae = j.find((Y) => Y.id === N)) == null ? void 0 : ae.treeValues);
7397
7397
  });
7398
- return N.sort((L, E) => {
7399
- const de = ee.findIndex(
7400
- (Y) => Y.id === L.id
7401
- ), z = ee.findIndex(
7402
- (Y) => Y.id === E.id
7398
+ return L.sort((N, E) => {
7399
+ const ae = Z.findIndex(
7400
+ (z) => z.id === N.id
7401
+ ), Y = Z.findIndex(
7402
+ (z) => z.id === E.id
7403
7403
  );
7404
- return de - z;
7405
- }), b.current = { ...b.current, ...H }, !x.current && ie && (x.current = {}), ie && (x.current = { ...x.current, ...ie }), N;
7404
+ return ae - Y;
7405
+ }), b.current = { ...b.current, ...H }, !x.current && oe && (x.current = {}), oe && (x.current = { ...x.current, ...oe }), L;
7406
7406
  },
7407
7407
  [a, o]
7408
7408
  ), V = B((R) => {
@@ -7536,8 +7536,8 @@ const Xu = ({
7536
7536
  domain: s
7537
7537
  });
7538
7538
  }, af = ["form", "tree", "graph"], lf = (e) => {
7539
- var ce;
7540
- const t = Q(null), { value: n, onChange: r, ooui: o, views: s } = e, { items: a = [] } = n || {}, l = qu({ one2manyItems: a }), { currentView: c, setCurrentView: u, itemIndex: f, setItemIndex: d } = re(
7539
+ var de;
7540
+ const t = X(null), { value: n, onChange: r, ooui: o, views: s } = e, { items: a = [] } = n || {}, l = qu({ one2manyItems: a }), { currentView: c, setCurrentView: u, itemIndex: f, setItemIndex: d } = re(
7541
7541
  un
7542
7542
  ), {
7543
7543
  readOnly: p,
@@ -7549,7 +7549,7 @@ const Xu = ({
7549
7549
  activeId: b,
7550
7550
  getContext: x,
7551
7551
  fetchValues: I
7552
- } = g || {}, w = s.size > 1, A = ((ce = s.get("form")) == null ? void 0 : ce.fields) !== void 0, T = ye(() => ({ ...x == null ? void 0 : x(), ...m }), [x, m]), C = Wu({
7552
+ } = g || {}, w = s.size > 1, A = ((de = s.get("form")) == null ? void 0 : de.fields) !== void 0, T = ye(() => ({ ...x == null ? void 0 : x(), ...m }), [x, m]), C = Wu({
7553
7553
  widgetDomain: y,
7554
7554
  fieldName: v
7555
7555
  }), {
@@ -7584,9 +7584,9 @@ const Xu = ({
7584
7584
  },
7585
7585
  [r, s]
7586
7586
  ), {
7587
- formHasChanges: X,
7587
+ formHasChanges: Q,
7588
7588
  onFormChanges: te,
7589
- showFormChangesDialogIfNeeded: oe,
7589
+ showFormChangesDialogIfNeeded: ce,
7590
7590
  setFormHasChanges: H
7591
7591
  } = Ku({
7592
7592
  items: l,
@@ -7596,17 +7596,17 @@ const Xu = ({
7596
7596
  context: T,
7597
7597
  triggerChange: k
7598
7598
  }), {
7599
- showFormModal: ie,
7600
- modalItem: ee,
7601
- continuousEntryMode: N,
7602
- onCancelFormModal: L,
7599
+ showFormModal: oe,
7600
+ modalItem: Z,
7601
+ continuousEntryMode: L,
7602
+ onCancelFormModal: N,
7603
7603
  onFormModalSubmitSucceed: E,
7604
- createItem: de,
7605
- openItemInFormModal: z
7604
+ createItem: ae,
7605
+ openItemInFormModal: Y
7606
7606
  } = Xu({
7607
7607
  activeId: b,
7608
7608
  inv_field: o.inv_field,
7609
- showFormChangesDialogIfNeeded: oe,
7609
+ showFormChangesDialogIfNeeded: ce,
7610
7610
  currentView: c,
7611
7611
  triggerChange: k,
7612
7612
  items: l,
@@ -7616,12 +7616,12 @@ const Xu = ({
7616
7616
  relation: h,
7617
7617
  formView: s.get("form")
7618
7618
  }), {
7619
- showSearchModal: Y,
7619
+ showSearchModal: z,
7620
7620
  onSelectSearchValues: me,
7621
7621
  onCloseSearchModal: ve,
7622
7622
  searchItem: ke
7623
7623
  } = Qu({
7624
- showFormChangesDialogIfNeeded: oe,
7624
+ showFormChangesDialogIfNeeded: ce,
7625
7625
  currentView: c,
7626
7626
  triggerChange: k,
7627
7627
  items: l,
@@ -7637,23 +7637,23 @@ const Xu = ({
7637
7637
  setSelectedRowKeys: _
7638
7638
  }), Ie = () => {
7639
7639
  const fe = Array.from(s.keys()), we = fe[(fe.indexOf(c) + 1) % fe.length];
7640
- c === "form" ? oe(() => {
7640
+ c === "form" ? ce(() => {
7641
7641
  u(we);
7642
7642
  }) : u(we);
7643
7643
  }, $e = ft(
7644
7644
  (fe) => {
7645
7645
  var we;
7646
- (we = s.get("form")) != null && we.fields && z(fe);
7646
+ (we = s.get("form")) != null && we.fields && Y(fe);
7647
7647
  },
7648
7648
  // eslint-disable-next-line react-hooks/exhaustive-deps
7649
7649
  [l]
7650
7650
  ), Ke = B(() => {
7651
- f > 0 && (c === "form" ? oe(() => {
7651
+ f > 0 && (c === "form" ? ce(() => {
7652
7652
  d(f - 1);
7653
7653
  }) : d(f - 1));
7654
- }, [c, f, d, oe]), Fe = B(() => {
7654
+ }, [c, f, d, ce]), Fe = B(() => {
7655
7655
  const fe = l.length;
7656
- f < fe - 1 && (c === "form" ? oe(() => {
7656
+ f < fe - 1 && (c === "form" ? ce(() => {
7657
7657
  d(f + 1);
7658
7658
  }) : d(f + 1));
7659
7659
  }, [
@@ -7661,9 +7661,9 @@ const Xu = ({
7661
7661
  f,
7662
7662
  l.length,
7663
7663
  d,
7664
- oe
7664
+ ce
7665
7665
  ]);
7666
- return /* @__PURE__ */ D(ae, { children: [
7666
+ return /* @__PURE__ */ D(se, { children: [
7667
7667
  /* @__PURE__ */ i(
7668
7668
  Os,
7669
7669
  {
@@ -7671,11 +7671,11 @@ const Xu = ({
7671
7671
  title: j,
7672
7672
  readOnly: p || !1,
7673
7673
  isMany2Many: M,
7674
- formHasChanges: X,
7674
+ formHasChanges: Q,
7675
7675
  totalItems: l.length,
7676
7676
  currentItemIndex: f,
7677
7677
  onDelete: Le,
7678
- onCreateItem: de,
7678
+ onCreateItem: ae,
7679
7679
  onToggleViewMode: Ie,
7680
7680
  onPreviousItem: Ke,
7681
7681
  onNextItem: Fe,
@@ -7726,16 +7726,16 @@ const Xu = ({
7726
7726
  {
7727
7727
  formView: s.get("form"),
7728
7728
  model: h,
7729
- id: ee == null ? void 0 : ee.id,
7729
+ id: Z == null ? void 0 : Z.id,
7730
7730
  submitMode: "2many",
7731
- values: ee == null ? void 0 : ee.values,
7732
- defaultValues: ee == null ? void 0 : ee.defaultValues,
7733
- visible: ie,
7731
+ values: Z == null ? void 0 : Z.values,
7732
+ defaultValues: Z == null ? void 0 : Z.defaultValues,
7733
+ visible: oe,
7734
7734
  onSubmitSucceed: E,
7735
7735
  parentContext: T,
7736
- onCancel: L,
7736
+ onCancel: N,
7737
7737
  readOnly: p,
7738
- mustClearAfterSave: N,
7738
+ mustClearAfterSave: L,
7739
7739
  onMustRefreshParent: () => {
7740
7740
  I == null || I({ forceRefresh: !0 });
7741
7741
  }
@@ -7747,7 +7747,7 @@ const Xu = ({
7747
7747
  domain: C,
7748
7748
  model: h,
7749
7749
  context: T,
7750
- visible: Y,
7750
+ visible: z,
7751
7751
  onSelectValues: me,
7752
7752
  onCloseModal: ve
7753
7753
  }
@@ -7832,7 +7832,7 @@ const Xu = ({
7832
7832
  const { ooui: t } = e, { required: n } = t;
7833
7833
  return /* @__PURE__ */ i(Re, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(pf, { ooui: t }) });
7834
7834
  }, pf = (e) => {
7835
- const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = ff(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = Q(), [f, d] = S(), p = re(He), { elementHasLostFocus: h } = p || {};
7835
+ const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = ff(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = X(), [f, d] = S(), p = re(He), { elementHasLostFocus: h } = p || {};
7836
7836
  ue(() => {
7837
7837
  d(ps(n));
7838
7838
  }, [n]);
@@ -7861,7 +7861,7 @@ const Xu = ({
7861
7861
  };
7862
7862
  function _s(e) {
7863
7863
  const { ooui: t, showLabel: n = !0, responsiveBehaviour: r } = e, o = vt(t.icon || "");
7864
- return /* @__PURE__ */ i(ae, { children: (t.label || o) && n ? /* @__PURE__ */ i(sl, { label: t.label, icon: o, children: /* @__PURE__ */ i(
7864
+ return /* @__PURE__ */ i(se, { children: (t.label || o) && n ? /* @__PURE__ */ i(sl, { label: t.label, icon: o, children: /* @__PURE__ */ i(
7865
7865
  Sr,
7866
7866
  {
7867
7867
  container: t.container,
@@ -7887,7 +7887,7 @@ function gf(e) {
7887
7887
  return /* @__PURE__ */ i(Ii, { defaultActiveKey: "1", tabPosition: t.tabPosition, children: r.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ i(
7888
7888
  hf,
7889
7889
  {
7890
- tab: /* @__PURE__ */ D(ae, { children: [
7890
+ tab: /* @__PURE__ */ D(se, { children: [
7891
7891
  o(s.icon),
7892
7892
  " ",
7893
7893
  s.label
@@ -7941,7 +7941,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
7941
7941
  formHasChanges: u,
7942
7942
  elementHasLostFocus: f
7943
7943
  } = s || {}, [d, p] = S(!1), { t: h } = he();
7944
- return a ? /* @__PURE__ */ D(ae, { children: [
7944
+ return a ? /* @__PURE__ */ D(se, { children: [
7945
7945
  /* @__PURE__ */ i(
7946
7946
  "div",
7947
7947
  {
@@ -7988,7 +7988,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
7988
7988
  }
7989
7989
  }
7990
7990
  )
7991
- ] }) : /* @__PURE__ */ D(ae, { children: [
7991
+ ] }) : /* @__PURE__ */ D(se, { children: [
7992
7992
  /* @__PURE__ */ i(Ne, { gutter: 8, wrap: !1, children: /* @__PURE__ */ i(
7993
7993
  Tr,
7994
7994
  {
@@ -8031,7 +8031,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
8031
8031
  limit: o,
8032
8032
  onClose: s
8033
8033
  }) => {
8034
- const a = Q({}), l = Q(/* @__PURE__ */ new Map()), { t: c } = he(), u = B(
8034
+ const a = X({}), l = X(/* @__PURE__ */ new Map()), { t: c } = he(), u = B(
8035
8035
  async (v) => {
8036
8036
  if (v.selectedKeys === void 0 || v.selectedKeys.length === 0) {
8037
8037
  Tt(c("selectAtLeastOneField"));
@@ -8370,7 +8370,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
8370
8370
  const { ooui: t } = e, { required: n } = t;
8371
8371
  return /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(Mf, { ooui: t }) });
8372
8372
  }, Mf = (e) => {
8373
- const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = $f(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = Q(null), { setFieldValue: f, getFieldValue: d } = re(He) || {}, { t: p } = he(), h = n ? pc(n) : "", m = (x) => {
8373
+ const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = $f(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = X(null), { setFieldValue: f, getFieldValue: d } = re(He) || {}, { t: p } = he(), h = n ? pc(n) : "", m = (x) => {
8374
8374
  r == null || r(x);
8375
8375
  };
8376
8376
  async function y() {
@@ -8616,7 +8616,7 @@ const Lf = (e) => {
8616
8616
  onOpenAttachmentLink: s,
8617
8617
  onOpenAttachmentDetail: a,
8618
8618
  onListAllAttachments: l
8619
- } = e, { t: c } = he(), u = Q(null), f = /* @__PURE__ */ D(je, { children: [
8619
+ } = e, { t: c } = he(), u = X(null), f = /* @__PURE__ */ D(je, { children: [
8620
8620
  /* @__PURE__ */ i(To, {}),
8621
8621
  `(${t})`,
8622
8622
  /* @__PURE__ */ i(jn, { style: { fontSize: 12 } })
@@ -8768,7 +8768,7 @@ function jf(e) {
8768
8768
  );
8769
8769
  return ue(() => {
8770
8770
  m();
8771
- }, [m]), /* @__PURE__ */ D(ae, { children: [
8771
+ }, [m]), /* @__PURE__ */ D(se, { children: [
8772
8772
  /* @__PURE__ */ i(
8773
8773
  Lf,
8774
8774
  {
@@ -8915,7 +8915,7 @@ function Hf({ toolbar: e }) {
8915
8915
  f ? an({ t: r, onOk: H }) : H();
8916
8916
  },
8917
8917
  [f, r]
8918
- ), X = B(async () => {
8918
+ ), Q = B(async () => {
8919
8919
  try {
8920
8920
  b == null || b(!0), await P.getHandler().deleteObjects({
8921
8921
  model: g,
@@ -8923,11 +8923,11 @@ function Hf({ toolbar: e }) {
8923
8923
  context: O.current.getContext()
8924
8924
  });
8925
8925
  const H = h == null ? void 0 : h.filter(
8926
- (ee) => ee.id !== p
8926
+ (Z) => Z.id !== p
8927
8927
  );
8928
8928
  A == null || A(H);
8929
- const ie = Math.max(0, (y || 0) - 1);
8930
- H != null && H[ie] ? (v == null || v(H[ie].id), m == null || m(ie)) : (v == null || v(void 0), m == null || m(void 0));
8929
+ const oe = Math.max(0, (y || 0) - 1);
8930
+ H != null && H[oe] ? (v == null || v(H[oe].id), m == null || m(oe)) : (v == null || v(void 0), m == null || m(void 0));
8931
8931
  } catch (H) {
8932
8932
  Nt(JSON.stringify(H));
8933
8933
  } finally {
@@ -8957,7 +8957,7 @@ function Hf({ toolbar: e }) {
8957
8957
  } finally {
8958
8958
  w == null || w(!1);
8959
8959
  }
8960
- }, [p, g, O, $, w]), oe = B(
8960
+ }, [p, g, O, $, w]), ce = B(
8961
8961
  (H) => {
8962
8962
  G == null || G({
8963
8963
  actionData: H,
@@ -8992,7 +8992,7 @@ function Hf({ toolbar: e }) {
8992
8992
  { enableOnFormTags: !0, preventDefault: !0 },
8993
8993
  [R, F, l, _, c]
8994
8994
  ), l ? /* @__PURE__ */ D(Xe, { wrap: !0, children: [
8995
- T && /* @__PURE__ */ D(ae, { children: [
8995
+ T && /* @__PURE__ */ D(se, { children: [
8996
8996
  /* @__PURE__ */ i(We, {}),
8997
8997
  jt(),
8998
8998
  jt()
@@ -9032,7 +9032,7 @@ function Hf({ toolbar: e }) {
9032
9032
  onClick: () => Ft({
9033
9033
  confirmMessage: r("confirmRemoveItem"),
9034
9034
  t: r,
9035
- onOk: X
9035
+ onOk: Q
9036
9036
  })
9037
9037
  }
9038
9038
  ),
@@ -9101,7 +9101,7 @@ function Hf({ toolbar: e }) {
9101
9101
  { label: r("actions"), items: e == null ? void 0 : e.action }
9102
9102
  ],
9103
9103
  onItemClick: async (H) => {
9104
- H && (await Bt({ onFormSave: u })).succeed && oe(H);
9104
+ H && (await Bt({ onFormSave: u })).succeed && ce(H);
9105
9105
  }
9106
9106
  }
9107
9107
  ),
@@ -9116,12 +9116,12 @@ function Hf({ toolbar: e }) {
9116
9116
  ],
9117
9117
  onItemClick: async (H) => {
9118
9118
  if (H) {
9119
- const ie = await Bt({ onFormSave: u });
9120
- ie.succeed && oe({
9119
+ const oe = await Bt({ onFormSave: u });
9120
+ oe.succeed && ce({
9121
9121
  ...H,
9122
9122
  datas: {
9123
9123
  ...H.datas || {},
9124
- ids: [ie.currentId]
9124
+ ids: [oe.currentId]
9125
9125
  }
9126
9126
  });
9127
9127
  }
@@ -9273,7 +9273,7 @@ const jt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), Bt
9273
9273
  }
9274
9274
  ) });
9275
9275
  }, Kf = (e) => {
9276
- const { visible: t, onIdSubmitted: n, onCancel: r, isSearching: o } = e, { t: s } = he(), a = Q(null), l = Q(!1);
9276
+ const { visible: t, onIdSubmitted: n, onCancel: r, isSearching: o } = e, { t: s } = he(), a = X(null), l = X(!1);
9277
9277
  function c(u) {
9278
9278
  const f = u.id.split(",").map((d) => parseInt(d.trim()));
9279
9279
  n(f, l.current), l.current = !1;
@@ -9459,7 +9459,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9459
9459
  return null;
9460
9460
  if ((o == null ? void 0 : o.type) === "form" && s) {
9461
9461
  if (c === 0)
9462
- return /* @__PURE__ */ D(ae, { children: [
9462
+ return /* @__PURE__ */ D(se, { children: [
9463
9463
  d("editingDocument"),
9464
9464
  " (id:",
9465
9465
  " ",
@@ -9473,7 +9473,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9473
9473
  ")"
9474
9474
  ] });
9475
9475
  const m = (a ?? 0) + 1, y = f ? c : l == null ? void 0 : l.length;
9476
- return /* @__PURE__ */ D(ae, { children: [
9476
+ return /* @__PURE__ */ D(se, { children: [
9477
9477
  d("register"),
9478
9478
  " ",
9479
9479
  m,
@@ -9491,14 +9491,14 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9491
9491
  ")"
9492
9492
  ] });
9493
9493
  }
9494
- return (o == null ? void 0 : o.type) === "tree" && (u != null && u.length) ? u.length === 1 ? /* @__PURE__ */ D(ae, { children: [
9494
+ return (o == null ? void 0 : o.type) === "tree" && (u != null && u.length) ? u.length === 1 ? /* @__PURE__ */ D(se, { children: [
9495
9495
  "1 ",
9496
9496
  d("selectedRegisters"),
9497
9497
  " - (id:",
9498
9498
  " ",
9499
9499
  /* @__PURE__ */ i(An, { copyable: !0, children: u[0].id }),
9500
9500
  ")"
9501
- ] }) : /* @__PURE__ */ D(ae, { children: [
9501
+ ] }) : /* @__PURE__ */ D(se, { children: [
9502
9502
  u.length,
9503
9503
  " ",
9504
9504
  d("selectedRegisters"),
@@ -9546,7 +9546,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9546
9546
  /* @__PURE__ */ i("div", { className: "pb-5" })
9547
9547
  ] });
9548
9548
  }, Xf = (e) => {
9549
- const { viewData: t, visible: n, model: r, context: o, domain: s, formView: a, treeView: l } = e, c = Q(), u = re(
9549
+ const { viewData: t, visible: n, model: r, context: o, domain: s, formView: a, treeView: l } = e, c = X(), u = re(
9550
9550
  lt
9551
9551
  ), {
9552
9552
  setResults: f = void 0,
@@ -9570,8 +9570,8 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9570
9570
  currentView: _
9571
9571
  } = u || {}, [$, R] = S(!0);
9572
9572
  ue(() => {
9573
- var X;
9574
- (X = c.current) == null || X.refresh();
9573
+ var Q;
9574
+ (Q = c.current) == null || Q.refresh();
9575
9575
  }, [O]), ue(() => {
9576
9576
  t.view_id !== _.view_id && R(!0);
9577
9577
  }, [_]);
@@ -9598,7 +9598,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9598
9598
  limit: T,
9599
9599
  setLimit: C
9600
9600
  });
9601
- return !n || !t ? null : /* @__PURE__ */ D(ae, { children: [
9601
+ return !n || !t ? null : /* @__PURE__ */ D(se, { children: [
9602
9602
  /* @__PURE__ */ i(Xn, { title: t.title || t.name, children: /* @__PURE__ */ i(
9603
9603
  Yf,
9604
9604
  {
@@ -9619,8 +9619,8 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9619
9619
  onClear: G,
9620
9620
  offset: M,
9621
9621
  isSearching: W,
9622
- onSubmit: (X) => {
9623
- R(!1), y == null || y(X.params), g == null || g(!1);
9622
+ onSubmit: (Q) => {
9623
+ R(!1), y == null || y(Q.params), g == null || g(!1);
9624
9624
  },
9625
9625
  searchError: j,
9626
9626
  searchVisible: v,
@@ -9637,7 +9637,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9637
9637
  context: o,
9638
9638
  domain: Zt(O || [], s),
9639
9639
  limit: $ ? T : void 0,
9640
- manualIds: $ ? h == null ? void 0 : h.map((X) => X.id) : void 0
9640
+ manualIds: $ ? h == null ? void 0 : h.map((Q) => Q.id) : void 0
9641
9641
  }
9642
9642
  )
9643
9643
  ] });
@@ -9656,7 +9656,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9656
9656
  setResults: d,
9657
9657
  setCurrentItemIndex: p
9658
9658
  } = e;
9659
- return t ? /* @__PURE__ */ D(ae, { children: [
9659
+ return t ? /* @__PURE__ */ D(se, { children: [
9660
9660
  /* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(Hf, { toolbar: a == null ? void 0 : a.toolbar }) }),
9661
9661
  /* @__PURE__ */ i(
9662
9662
  cn,
@@ -9719,7 +9719,7 @@ function Zf(e) {
9719
9719
  ] }) });
9720
9720
  }
9721
9721
  function em(e) {
9722
- var N;
9722
+ var L;
9723
9723
  const {
9724
9724
  availableViews: t,
9725
9725
  currentView: n,
@@ -9750,7 +9750,7 @@ function em(e) {
9750
9750
  sn.FEATURE_ADVANCED_EXPORT
9751
9751
  ), { t: R } = he(), G = re(
9752
9752
  ln
9753
- ), { processAction: W } = G || {}, [j, M] = S(!1), k = Q(!0);
9753
+ ), { processAction: W } = G || {}, [j, M] = S(!1), k = X(!0);
9754
9754
  Dt(
9755
9755
  "ctrl+l,command+l",
9756
9756
  () => {
@@ -9766,26 +9766,26 @@ function em(e) {
9766
9766
  { enableOnFormTags: !0, preventDefault: !0 },
9767
9767
  [m]
9768
9768
  ), ue(() => {
9769
- var L;
9769
+ var N;
9770
9770
  if (O && g === void 0) {
9771
9771
  if (k.current) {
9772
9772
  k.current = !1;
9773
9773
  return;
9774
9774
  }
9775
- (L = f == null ? void 0 : f.current) == null || L.refreshResults();
9775
+ (N = f == null ? void 0 : f.current) == null || N.refreshResults();
9776
9776
  }
9777
9777
  }, [O, g]);
9778
- const X = g !== void 0 && g.trim().length > 0;
9778
+ const Q = g !== void 0 && g.trim().length > 0;
9779
9779
  function te() {
9780
9780
  Ft({
9781
9781
  confirmMessage: R("confirmDuplicate"),
9782
9782
  t: R,
9783
9783
  onOk: () => {
9784
- ie();
9784
+ oe();
9785
9785
  }
9786
9786
  });
9787
9787
  }
9788
- function oe() {
9788
+ function ce() {
9789
9789
  Ft({
9790
9790
  confirmMessage: R("confirmRemove"),
9791
9791
  t: R,
@@ -9795,21 +9795,21 @@ function em(e) {
9795
9795
  });
9796
9796
  }
9797
9797
  async function H() {
9798
- var L;
9798
+ var N;
9799
9799
  try {
9800
9800
  s == null || s(!0), await P.getHandler().deleteObjects({
9801
9801
  model: u,
9802
9802
  ids: o.map((E) => E.id),
9803
9803
  context: { ...V }
9804
- }), d == null || d(void 0), p == null || p(void 0), (L = f == null ? void 0 : f.current) == null || L.refreshResults();
9804
+ }), d == null || d(void 0), p == null || p(void 0), (N = f == null ? void 0 : f.current) == null || N.refreshResults();
9805
9805
  } catch (E) {
9806
9806
  it(E);
9807
9807
  } finally {
9808
9808
  s == null || s(!1);
9809
9809
  }
9810
9810
  }
9811
- async function ie() {
9812
- var L;
9811
+ async function oe() {
9812
+ var N;
9813
9813
  try {
9814
9814
  c == null || c(!0);
9815
9815
  const E = o[0].id;
@@ -9817,16 +9817,16 @@ function em(e) {
9817
9817
  id: E,
9818
9818
  model: u,
9819
9819
  context: { ...V }
9820
- }) && ((L = f == null ? void 0 : f.current) == null || L.refreshResults());
9820
+ }) && ((N = f == null ? void 0 : f.current) == null || N.refreshResults());
9821
9821
  } catch (E) {
9822
9822
  it(E);
9823
9823
  } finally {
9824
9824
  c == null || c(!1);
9825
9825
  }
9826
9826
  }
9827
- function ee(L) {
9827
+ function Z(N) {
9828
9828
  W == null || W({
9829
- actionData: L,
9829
+ actionData: N,
9830
9830
  values: {
9831
9831
  active_id: o == null ? void 0 : o.map((E) => E.id)[0],
9832
9832
  active_ids: o == null ? void 0 : o.map((E) => E.id)
@@ -9844,20 +9844,20 @@ function em(e) {
9844
9844
  });
9845
9845
  }
9846
9846
  return /* @__PURE__ */ D(Xe, { wrap: !0, children: [
9847
- b && /* @__PURE__ */ D(ae, { children: [
9847
+ b && /* @__PURE__ */ D(se, { children: [
9848
9848
  /* @__PURE__ */ i(We, {}),
9849
9849
  Vt(),
9850
9850
  Vt()
9851
9851
  ] }),
9852
- F ? null : /* @__PURE__ */ D(ae, { children: [
9852
+ F ? null : /* @__PURE__ */ D(se, { children: [
9853
9853
  /* @__PURE__ */ i(
9854
9854
  Zf,
9855
9855
  {
9856
9856
  disabled: l || a || b,
9857
9857
  searchText: g,
9858
- onSearch: (L) => {
9858
+ onSearch: (N) => {
9859
9859
  var E;
9860
- L && L.trim().length > 0 ? v == null || v(L) : (v == null || v(void 0), O || (E = f == null ? void 0 : f.current) == null || E.refreshResults());
9860
+ N && N.trim().length > 0 ? v == null || v(N) : (v == null || v(void 0), O || (E = f == null ? void 0 : f.current) == null || E.refreshResults());
9861
9861
  }
9862
9862
  }
9863
9863
  ),
@@ -9898,7 +9898,7 @@ function em(e) {
9898
9898
  tooltip: R("delete"),
9899
9899
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || b,
9900
9900
  loading: a,
9901
- onClick: oe
9901
+ onClick: ce
9902
9902
  }
9903
9903
  ),
9904
9904
  Vt()
@@ -9923,20 +9923,20 @@ function em(e) {
9923
9923
  disabled: l || a || b,
9924
9924
  loading: !1,
9925
9925
  onClick: () => {
9926
- var L;
9927
- (L = f == null ? void 0 : f.current) == null || L.refreshResults();
9926
+ var N;
9927
+ (N = f == null ? void 0 : f.current) == null || N.refreshResults();
9928
9928
  }
9929
9929
  }
9930
9930
  ),
9931
- !F && /* @__PURE__ */ D(ae, { children: [
9931
+ !F && /* @__PURE__ */ D(se, { children: [
9932
9932
  Vt(),
9933
9933
  /* @__PURE__ */ i(
9934
9934
  co,
9935
9935
  {
9936
9936
  currentView: n,
9937
9937
  availableViews: t,
9938
- onChangeView: (L) => {
9939
- x == null || x(n), r == null || r(L);
9938
+ onChangeView: (N) => {
9939
+ x == null || x(n), r == null || r(N);
9940
9940
  },
9941
9941
  previousView: I,
9942
9942
  disabled: b
@@ -9953,8 +9953,8 @@ function em(e) {
9953
9953
  onRetrieveData: async () => [
9954
9954
  { label: R("actions"), items: _ == null ? void 0 : _.action }
9955
9955
  ],
9956
- onItemClick: (L) => {
9957
- L && ee(L);
9956
+ onItemClick: (N) => {
9957
+ N && Z(N);
9958
9958
  }
9959
9959
  }
9960
9960
  ),
@@ -9967,18 +9967,18 @@ function em(e) {
9967
9967
  onRetrieveData: async () => [
9968
9968
  { label: R("reports"), items: _ == null ? void 0 : _.print }
9969
9969
  ],
9970
- onItemClick: (L) => {
9971
- L && ee({
9972
- ...L,
9970
+ onItemClick: (N) => {
9971
+ N && Z({
9972
+ ...N,
9973
9973
  datas: {
9974
- ...L.datas || {},
9974
+ ...N.datas || {},
9975
9975
  ids: o.map((E) => E.id)
9976
9976
  }
9977
9977
  });
9978
9978
  }
9979
9979
  }
9980
9980
  ),
9981
- $ && /* @__PURE__ */ D(ae, { children: [
9981
+ $ && /* @__PURE__ */ D(se, { children: [
9982
9982
  Vt(),
9983
9983
  /* @__PURE__ */ i(
9984
9984
  qt,
@@ -10025,10 +10025,10 @@ function em(e) {
10025
10025
  ]
10026
10026
  }
10027
10027
  ],
10028
- onItemClick: (L) => {
10029
- if (L.id === "print_screen") {
10030
- let E = (o == null ? void 0 : o.map((de) => de.id)) || [];
10031
- E.length === 0 && (E = (w == null ? void 0 : w.map((de) => de.id)) || []), ee({
10028
+ onItemClick: (N) => {
10029
+ if (N.id === "print_screen") {
10030
+ let E = (o == null ? void 0 : o.map((ae) => ae.id)) || [];
10031
+ E.length === 0 && (E = (w == null ? void 0 : w.map((ae) => ae.id)) || []), Z({
10032
10032
  id: -1,
10033
10033
  model: u,
10034
10034
  report_name: "printscreen.list",
@@ -10042,7 +10042,7 @@ function em(e) {
10042
10042
  }
10043
10043
  M(!0);
10044
10044
  },
10045
- disabled: l || a || b || X
10045
+ disabled: l || a || b || Q
10046
10046
  }
10047
10047
  ),
10048
10048
  /* @__PURE__ */ i(
@@ -10052,7 +10052,7 @@ function em(e) {
10052
10052
  onClose: () => M(!1),
10053
10053
  model: u,
10054
10054
  domain: Zt(
10055
- ((N = f == null ? void 0 : f.current) == null ? void 0 : N.getDomain()) || [],
10055
+ ((L = f == null ? void 0 : f.current) == null ? void 0 : L.getDomain()) || [],
10056
10056
  h || []
10057
10057
  ),
10058
10058
  limit: A,
@@ -10139,7 +10139,7 @@ const tm = ({
10139
10139
  }) => {
10140
10140
  const { t } = he();
10141
10141
  if (e.length === 1)
10142
- return /* @__PURE__ */ D(ae, { children: [
10142
+ return /* @__PURE__ */ D(se, { children: [
10143
10143
  "1 ",
10144
10144
  t("selectedRegisters"),
10145
10145
  " - (id:",
@@ -10148,7 +10148,7 @@ const tm = ({
10148
10148
  ")"
10149
10149
  ] });
10150
10150
  if (e.length > 1)
10151
- return /* @__PURE__ */ D(ae, { children: [
10151
+ return /* @__PURE__ */ D(se, { children: [
10152
10152
  e.length,
10153
10153
  " ",
10154
10154
  t("selectedRegisters") + " ",
@@ -10168,7 +10168,7 @@ const tm = ({
10168
10168
  title: r,
10169
10169
  footer: o
10170
10170
  }) => {
10171
- const [s, a] = S(e), l = Q(null), { token: c } = sm(), u = B(
10171
+ const [s, a] = S(e), l = X(null), { token: c } = sm(), u = B(
10172
10172
  (h) => {
10173
10173
  h.preventDefault(), h.stopPropagation(), t();
10174
10174
  },
@@ -10197,7 +10197,7 @@ const tm = ({
10197
10197
  padding: "0 16px",
10198
10198
  borderBottom: "1px solid #f0f0f0"
10199
10199
  };
10200
- return /* @__PURE__ */ i(Bl, { children: e && /* @__PURE__ */ D(ae, { children: [
10200
+ return /* @__PURE__ */ i(Bl, { children: e && /* @__PURE__ */ D(se, { children: [
10201
10201
  /* @__PURE__ */ i(
10202
10202
  Ao.div,
10203
10203
  {
@@ -11080,7 +11080,7 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
11080
11080
  }
11081
11081
  ), dh = (e) => {
11082
11082
  var x;
11083
- const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: s, searchValues: a } = e, l = Q(), { t: c } = he(), [u, f] = S(), d = Q(null), [p, h] = S();
11083
+ const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: s, searchValues: a } = e, l = X(), { t: c } = he(), [u, f] = S(), d = X(null), [p, h] = S();
11084
11084
  ue(() => {
11085
11085
  n && h(void 0);
11086
11086
  }, [n]), yt(() => {
@@ -11202,7 +11202,7 @@ function ph(e, t) {
11202
11202
  parentContext: u = {},
11203
11203
  onChangeSelectedRowKeys: f,
11204
11204
  nameSearch: d
11205
- } = e, p = Q({}), h = Q(), m = Q(null), y = Q([]), v = bs(), [g, b] = S(!0), [x, I] = S(), { t: w } = he(), A = Q(null), T = nm({
11205
+ } = e, p = X({}), h = X(), m = X(null), y = X([]), v = bs(), [g, b] = S(!0), [x, I] = S(), { t: w } = he(), A = X(null), T = nm({
11206
11206
  elementRef: A,
11207
11207
  offset: fh
11208
11208
  }), { treeView: C, formView: O, loading: V } = tm({
@@ -11220,34 +11220,34 @@ function ph(e, t) {
11220
11220
  selectedRowItems: j,
11221
11221
  setSearchParams: M,
11222
11222
  searchValues: k,
11223
- searchParams: X,
11223
+ searchParams: Q,
11224
11224
  setSearchValues: te,
11225
- searchTreeNameSearch: oe,
11225
+ searchTreeNameSearch: ce,
11226
11226
  setSearchTreeNameSearch: H,
11227
- setResults: ie,
11228
- results: ee,
11229
- setSearchQuery: N,
11230
- setTotalItems: L
11231
- } = no(c), E = d || oe, de = Q(E);
11227
+ setResults: oe,
11228
+ results: Z,
11229
+ setSearchQuery: L,
11230
+ setTotalItems: N
11231
+ } = no(c), E = d || ce, ae = X(E);
11232
11232
  ue(() => {
11233
11233
  Ke();
11234
11234
  }, []), ue(() => {
11235
- var Z;
11236
- (E !== void 0 && de.current === void 0 || typeof E == "string" && typeof de.current == "string" && E !== de.current) && (M == null || M([]), te == null || te({}), (Z = m.current) == null || Z.unselectAll(), De()), de.current = E;
11235
+ var ee;
11236
+ (E !== void 0 && ae.current === void 0 || typeof E == "string" && typeof ae.current == "string" && E !== ae.current) && (M == null || M([]), te == null || te({}), (ee = m.current) == null || ee.unselectAll(), De()), ae.current = E;
11237
11237
  }, [E]);
11238
- const z = ye(() => {
11238
+ const Y = ye(() => {
11239
11239
  if (C)
11240
11240
  return Ot(C);
11241
- }, [C]), Y = yn(() => {
11242
- if (z)
11241
+ }, [C]), z = yn(() => {
11242
+ if (Y)
11243
11243
  return Zr(
11244
- z,
11244
+ Y,
11245
11245
  {
11246
11246
  ...ao
11247
11247
  },
11248
11248
  u
11249
11249
  );
11250
- }, [z, u]), me = ye(() => rm({
11250
+ }, [Y, u]), me = ye(() => rm({
11251
11251
  treeViewId: C == null ? void 0 : C.view_id,
11252
11252
  model: n
11253
11253
  }), [n, C == null ? void 0 : C.view_id]), {
@@ -11255,23 +11255,23 @@ function ph(e, t) {
11255
11255
  getColumnState: ke,
11256
11256
  updateColumnState: Le
11257
11257
  } = Fs(me), Ie = ye(
11258
- () => Zt(X || [], a),
11259
- [a, X]
11258
+ () => Zt(Q || [], a),
11259
+ [a, Q]
11260
11260
  ), $e = B(() => {
11261
11261
  const Ee = `${JSON.stringify(E ? a : Ie)}-${E}`;
11262
11262
  return Ee !== Ae.current ? (Ae.current = Ee, !0) : !1;
11263
11263
  }, [a, Ie, E]), Ke = B(async () => {
11264
- I(void 0), L(0), b(!0);
11264
+ I(void 0), N(0), b(!0);
11265
11265
  try {
11266
- const Z = await P.getHandler().searchCount({
11266
+ const ee = await P.getHandler().searchCount({
11267
11267
  params: E ? a : Ie,
11268
11268
  model: n,
11269
11269
  context: u,
11270
11270
  name_search: E
11271
11271
  });
11272
- I(Z), L(Z);
11273
- } catch (Z) {
11274
- v(Z);
11272
+ I(ee), N(ee);
11273
+ } catch (ee) {
11274
+ v(ee);
11275
11275
  } finally {
11276
11276
  b(!1);
11277
11277
  }
@@ -11281,22 +11281,22 @@ function ph(e, t) {
11281
11281
  n,
11282
11282
  E,
11283
11283
  u,
11284
- L,
11284
+ N,
11285
11285
  v
11286
11286
  ]), Fe = B(
11287
11287
  async ({
11288
- startRow: Z,
11288
+ startRow: ee,
11289
11289
  endRow: Ee,
11290
11290
  sortFields: Ye
11291
11291
  }) => {
11292
- if (!z)
11292
+ if (!Y)
11293
11293
  return [];
11294
11294
  const Pe = {};
11295
- z.colors && (Pe.colors = z.colors), z.status && (Pe.status = z.status);
11295
+ Y.colors && (Pe.colors = Y.colors), Y.status && (Pe.status = Y.status);
11296
11296
  const ot = E ? a : Ie, bt = Sc(Ye), { results: St, attrsEvaluated: Be } = await P.getHandler().searchForTree({
11297
11297
  params: ot,
11298
- limit: Ee - Z,
11299
- offset: Z,
11298
+ limit: Ee - ee,
11299
+ offset: ee,
11300
11300
  model: n,
11301
11301
  fields: C.field_parent ? { ...C.fields, [C.field_parent]: {} } : C.fields,
11302
11302
  context: u,
@@ -11304,25 +11304,25 @@ function ph(e, t) {
11304
11304
  order: bt,
11305
11305
  name_search: E
11306
11306
  }), ze = St.map((mt) => ({ id: mt.id }));
11307
- if (N == null || N({
11307
+ if (L == null || L({
11308
11308
  model: n,
11309
11309
  params: ot,
11310
11310
  name_search: E,
11311
11311
  context: u,
11312
11312
  order: bt
11313
11313
  }), $e() || xe.current !== bt)
11314
- ie == null || ie(ze);
11314
+ oe == null || oe(ze);
11315
11315
  else {
11316
- const mt = [...ee || [], ...ze];
11317
- ie == null || ie(mt);
11316
+ const mt = [...Z || [], ...ze];
11317
+ oe == null || oe(mt);
11318
11318
  }
11319
11319
  if (xe.current = bt, St.length === 0)
11320
- return y.current = [], I(0), L(0), [];
11321
- const xt = zn(z, St), Zn = Qt(Be);
11320
+ return y.current = [], I(0), N(0), [];
11321
+ const xt = zn(Y, St), Zn = Qt(Be);
11322
11322
  if (p.current = {
11323
11323
  ...p.current,
11324
11324
  ...Zn
11325
- }, !h.current && z.status && (h.current = {}), z.status) {
11325
+ }, !h.current && Y.status && (h.current = {}), Y.status) {
11326
11326
  const mt = Dn(Be);
11327
11327
  h.current = {
11328
11328
  ...h.current,
@@ -11332,49 +11332,49 @@ function ph(e, t) {
11332
11332
  return y.current = [...xt], xt;
11333
11333
  },
11334
11334
  [
11335
- ee,
11335
+ Z,
11336
11336
  a,
11337
11337
  Ie,
11338
11338
  n,
11339
11339
  $e,
11340
11340
  E,
11341
11341
  u,
11342
- ie,
11343
- N,
11342
+ oe,
11344
11343
  L,
11345
- z,
11344
+ N,
11345
+ Y,
11346
11346
  C
11347
11347
  ]
11348
- ), ce = B(
11349
- (Z) => {
11350
- R == null || R(Z.map((Ee) => ({ id: Ee }))), f == null || f(Z);
11348
+ ), de = B(
11349
+ (ee) => {
11350
+ R == null || R(ee.map((Ee) => ({ id: Ee }))), f == null || f(ee);
11351
11351
  },
11352
11352
  [f, R]
11353
11353
  ), fe = B(
11354
11354
  async ({
11355
- startRow: Z,
11355
+ startRow: ee,
11356
11356
  endRow: Ee,
11357
11357
  sortFields: Ye
11358
11358
  }) => {
11359
11359
  try {
11360
11360
  return F == null || F(!0), await Fe({
11361
- startRow: Z,
11361
+ startRow: ee,
11362
11362
  endRow: Ee,
11363
11363
  sortFields: Ye
11364
11364
  });
11365
11365
  } catch (Pe) {
11366
- throw console.error(Pe), I(null), L(0), v(Pe), Pe;
11366
+ throw console.error(Pe), I(null), N(0), v(Pe), Pe;
11367
11367
  } finally {
11368
11368
  F == null || F(!1);
11369
11369
  }
11370
11370
  },
11371
- [Fe, L, F, v]
11372
- ), we = B((Z) => {
11371
+ [Fe, N, F, v]
11372
+ ), we = B((ee) => {
11373
11373
  var Ee, Ye, Pe, ot;
11374
- if (p.current[(Ye = (Ee = Z.node) == null ? void 0 : Ee.data) == null ? void 0 : Ye.id])
11375
- return { color: p.current[(ot = (Pe = Z.node) == null ? void 0 : Pe.data) == null ? void 0 : ot.id] };
11376
- }, []), _e = ye(() => (j == null ? void 0 : j.map((Z) => Z.id)) || [], [j]), [J, Ce, Se] = Rs({
11377
- ooui: z,
11374
+ if (p.current[(Ye = (Ee = ee.node) == null ? void 0 : Ee.data) == null ? void 0 : Ye.id])
11375
+ return { color: p.current[(ot = (Pe = ee.node) == null ? void 0 : Pe.data) == null ? void 0 : ot.id] };
11376
+ }, []), _e = ye(() => (j == null ? void 0 : j.map((ee) => ee.id)) || [], [j]), [J, Ce, Se] = Rs({
11377
+ ooui: Y,
11378
11378
  model: n,
11379
11379
  showEmptyValues: !0,
11380
11380
  domain: (_e == null ? void 0 : _e.length) > 0 ? (
@@ -11382,8 +11382,8 @@ function ph(e, t) {
11382
11382
  [["id", "in", _e.sort()]]
11383
11383
  ) : void 0
11384
11384
  }), Ue = B(async () => {
11385
- let Z = !1;
11386
- (j == null ? void 0 : j.length) === 0 ? Z = !0 : Z = !1;
11385
+ let ee = !1;
11386
+ (j == null ? void 0 : j.length) === 0 ? ee = !0 : ee = !1;
11387
11387
  const Ee = async () => {
11388
11388
  if (E) {
11389
11389
  R == null || R(y.current);
@@ -11401,7 +11401,7 @@ function ph(e, t) {
11401
11401
  );
11402
11402
  R == null || R(Ye.map((Pe) => ({ id: Pe })));
11403
11403
  };
11404
- Z ? x && x > mh ? Ft({
11404
+ ee ? x && x > mh ? Ft({
11405
11405
  confirmMessage: w("confirmSelectAllRegisters").replace(
11406
11406
  "{totalRecords}",
11407
11407
  x.toString()
@@ -11419,10 +11419,10 @@ function ph(e, t) {
11419
11419
  R,
11420
11420
  w,
11421
11421
  x
11422
- ]), Me = B(() => W, [W]), ne = ye(() => Se ? /* @__PURE__ */ i(As, { aggregates: Ce, isLoading: J }) : null, [Ce, J, Se]), Oe = B((Z) => /* @__PURE__ */ i(Lr, { color: Z, style: { marginLeft: 7 } }), []), qe = B(
11423
- (Z) => {
11422
+ ]), Me = B(() => W, [W]), ne = ye(() => Se ? /* @__PURE__ */ i(As, { aggregates: Ce, isLoading: J }) : null, [Ce, J, Se]), Oe = B((ee) => /* @__PURE__ */ i(Lr, { color: ee, style: { marginLeft: 7 } }), []), qe = B(
11423
+ (ee) => {
11424
11424
  var Ee;
11425
- return (Ee = h.current) == null ? void 0 : Ee[Z.id];
11425
+ return (Ee = h.current) == null ? void 0 : Ee[ee.id];
11426
11426
  },
11427
11427
  []
11428
11428
  ), pe = ye(
@@ -11430,17 +11430,17 @@ function ph(e, t) {
11430
11430
  resetTableViewLabel: w("resetTableView")
11431
11431
  }),
11432
11432
  [w]
11433
- ), rt = ye(() => !Y || !z ? null : /* @__PURE__ */ i(
11433
+ ), rt = ye(() => !z || !Y ? null : /* @__PURE__ */ i(
11434
11434
  Wi,
11435
11435
  {
11436
11436
  readonly: !1,
11437
11437
  ref: m,
11438
11438
  height: T,
11439
- columns: Y,
11439
+ columns: z,
11440
11440
  onRequestData: fe,
11441
11441
  onRowDoubleClick: s,
11442
11442
  onRowStyle: we,
11443
- onRowSelectionChange: ce,
11443
+ onRowSelectionChange: de,
11444
11444
  onColumnChanged: Le,
11445
11445
  onGetColumnsState: ke,
11446
11446
  onChangeFirstVisibleRowIndex: G,
@@ -11449,15 +11449,15 @@ function ph(e, t) {
11449
11449
  onSelectionCheckboxClicked: Ue,
11450
11450
  totalRows: x || 99999,
11451
11451
  footer: ne,
11452
- hasStatusColumn: z.status !== null,
11452
+ hasStatusColumn: Y.status !== null,
11453
11453
  statusComponent: Oe,
11454
11454
  onRowStatus: qe,
11455
11455
  strings: pe
11456
11456
  }
11457
11457
  ), [
11458
11458
  T,
11459
- ce,
11460
- Y,
11459
+ de,
11460
+ z,
11461
11461
  Me,
11462
11462
  ne,
11463
11463
  ke,
@@ -11471,19 +11471,19 @@ function ph(e, t) {
11471
11471
  Oe,
11472
11472
  pe,
11473
11473
  x,
11474
- z,
11474
+ Y,
11475
11475
  Le
11476
- ]), q = Q(X), ge = Q(_), Ae = Q(), xe = Q();
11476
+ ]), q = X(Q), ge = X(_), Ae = X(), xe = X();
11477
11477
  yt(() => {
11478
- const Z = !la(
11479
- X,
11478
+ const ee = !la(
11479
+ Q,
11480
11480
  q.current
11481
11481
  ), Ee = ge.current && !_;
11482
- Z && Ee && De(), q.current = X, ge.current = _;
11483
- }, [X, _]);
11482
+ ee && Ee && De(), q.current = Q, ge.current = _;
11483
+ }, [Q, _]);
11484
11484
  const De = B(async () => {
11485
- var Z;
11486
- R == null || R([]), Ae.current = void 0, await Ke(), (Z = m == null ? void 0 : m.current) == null || Z.refresh();
11485
+ var ee;
11486
+ R == null || R([]), Ae.current = void 0, await Ke(), (ee = m == null ? void 0 : m.current) == null || ee.refresh();
11487
11487
  }, [R, Ke]);
11488
11488
  return ht(t, () => ({
11489
11489
  refreshResults: De,
@@ -11519,9 +11519,9 @@ function ph(e, t) {
11519
11519
  O == null ? void 0 : O.search_fields,
11520
11520
  C == null ? void 0 : C.search_fields
11521
11521
  ]),
11522
- onSubmit: ({ params: Z, values: Ee }) => {
11522
+ onSubmit: ({ params: ee, values: Ee }) => {
11523
11523
  var Ye;
11524
- R == null || R([]), (Ye = m.current) == null || Ye.unselectAll(), H == null || H(void 0), M == null || M(Z), te == null || te(Ee), $ == null || $(!1);
11524
+ R == null || R([]), (Ye = m.current) == null || Ye.unselectAll(), H == null || H(void 0), M == null || M(ee), te == null || te(Ee), $ == null || $(!1);
11525
11525
  },
11526
11526
  searchValues: k
11527
11527
  }
@@ -11679,7 +11679,7 @@ function wh() {
11679
11679
  return /* @__PURE__ */ i("div", { className: "inline-block w-2" });
11680
11680
  }
11681
11681
  const bh = (e) => {
11682
- const { dashboardData: t, visible: n } = e, r = Q(), o = re(
11682
+ const { dashboardData: t, visible: n } = e, r = X(), o = re(
11683
11683
  wt
11684
11684
  ), { openShortcut: s } = o || {};
11685
11685
  return !t || !n ? null : /* @__PURE__ */ D(
@@ -11739,31 +11739,31 @@ function xh(e, t) {
11739
11739
  limit: v
11740
11740
  } = e, [g, b] = S(), [x, I] = S([]), [w, A] = S(!0), T = p || void 0, [C, O] = S(
11741
11741
  T
11742
- ), [V, F] = S([]), [_, $] = S(), [R, G] = S([]), [W, j] = S(), [M, k] = S(0), [X, te] = S(!1), [oe, H] = S(!1), [ie, ee] = S(), { t: N } = he(), L = Q(), E = Q(), de = re(
11742
+ ), [V, F] = S([]), [_, $] = S(), [R, G] = S([]), [W, j] = S(), [M, k] = S(0), [Q, te] = S(!1), [ce, H] = S(!1), [oe, Z] = S(), { t: L } = he(), N = X(), E = X(), ae = re(
11743
11743
  wt
11744
11744
  ), {
11745
- setCurrentView: z,
11746
- setCurrentId: Y,
11745
+ setCurrentView: Y,
11746
+ setCurrentId: z,
11747
11747
  tabs: me,
11748
11748
  activeKey: ve,
11749
11749
  openAction: ke,
11750
11750
  onRemoveTab: Le
11751
- } = de || {};
11751
+ } = ae || {};
11752
11752
  Dt(
11753
11753
  "ctrl+g,command+g",
11754
11754
  () => {
11755
- ce();
11755
+ de();
11756
11756
  },
11757
11757
  { enableOnFormTags: !0, preventDefault: !0 },
11758
11758
  [ve, me, g, _, R]
11759
11759
  );
11760
11760
  function Ie(J) {
11761
- O(J), Y == null || Y(J);
11761
+ O(J), z == null || z(J);
11762
11762
  }
11763
11763
  function $e(J) {
11764
11764
  b(J);
11765
11765
  const Ce = { action_id: h, action_type: m };
11766
- z == null || z({ ...J, extra: Ce });
11766
+ Y == null || Y({ ...J, extra: Ce });
11767
11767
  }
11768
11768
  ht(t, () => ({
11769
11769
  canWeClose: Fe
@@ -11850,19 +11850,19 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11850
11850
  };
11851
11851
  l({ tabKey: c, canWeClose: Fe }), ue(() => {
11852
11852
  const J = x.find((Se) => Se.type === "tree"), Ce = x.find((Se) => u.id ? Se.type === u.type && Se.view_id === u.id : Se.type === u.type);
11853
- $e(Ce || J), p ? Y == null || Y(T) : (Ie(void 0), $(void 0)), Ke();
11853
+ $e(Ce || J), p ? z == null || z(T) : (Ie(void 0), $(void 0)), Ke();
11854
11854
  }, [r, s, p]), ue(() => {
11855
11855
  if (ve === c) {
11856
- Y == null || Y(C);
11856
+ z == null || z(C);
11857
11857
  const J = { action_id: h, action_type: m };
11858
- z == null || z({ ...g, extra: J });
11858
+ Y == null || Y({ ...g, extra: J });
11859
11859
  }
11860
11860
  }, [me, ve]);
11861
11861
  async function Fe() {
11862
- return g && g.type === "form" ? await L.current.cancelUnsavedChanges() : !0;
11862
+ return g && g.type === "form" ? await N.current.cancelUnsavedChanges() : !0;
11863
11863
  }
11864
- async function ce() {
11865
- ve === c && (g.type === "form" && !await L.current.cancelUnsavedChanges() || te(!0));
11864
+ async function de() {
11865
+ ve === c && (g.type === "form" && !await N.current.cancelUnsavedChanges() || te(!0));
11866
11866
  }
11867
11867
  async function fe(J, Ce) {
11868
11868
  var Me;
@@ -11882,7 +11882,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11882
11882
  } catch {
11883
11883
  }
11884
11884
  if (!qe) {
11885
- H(!1), te(!1), Tt(N("idNotFound"));
11885
+ H(!1), te(!1), Tt(L("idNotFound"));
11886
11886
  return;
11887
11887
  }
11888
11888
  } else
@@ -11918,7 +11918,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11918
11918
  return /* @__PURE__ */ i(
11919
11919
  Qf,
11920
11920
  {
11921
- formRef: L,
11921
+ formRef: N,
11922
11922
  currentId: C,
11923
11923
  visible: g.type === J.type && g.view_id === J.view_id,
11924
11924
  formView: J,
@@ -11945,7 +11945,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11945
11945
  formView: x.find((Ce) => Ce.type === "form"),
11946
11946
  treeView: J,
11947
11947
  searchTreeRef: E,
11948
- searchTreeNameSearch: ie,
11948
+ searchTreeNameSearch: oe,
11949
11949
  availableViews: x,
11950
11950
  results: R,
11951
11951
  setCurrentItemIndex: $,
@@ -11982,7 +11982,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11982
11982
  }
11983
11983
  function _e() {
11984
11984
  if (C === void 0 && g.type === "form")
11985
- L.current.clearAndReload();
11985
+ N.current.clearAndReload();
11986
11986
  else {
11987
11987
  Ie(void 0);
11988
11988
  const J = x.find(
@@ -11998,7 +11998,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11998
11998
  currentView: g,
11999
11999
  setCurrentView: $e,
12000
12000
  availableViews: x,
12001
- formRef: L,
12001
+ formRef: N,
12002
12002
  searchTreeRef: E,
12003
12003
  onNewClicked: _e,
12004
12004
  currentId: C,
@@ -12014,8 +12014,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
12014
12014
  setTotalItems: k,
12015
12015
  selectedRowItems: V,
12016
12016
  setSelectedRowItems: F,
12017
- setSearchTreeNameSearch: ee,
12018
- searchTreeNameSearch: ie,
12017
+ setSearchTreeNameSearch: Z,
12018
+ searchTreeNameSearch: oe,
12019
12019
  goToResourceId: fe,
12020
12020
  limit: v,
12021
12021
  isActive: c === ve,
@@ -12024,9 +12024,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
12024
12024
  /* @__PURE__ */ i(
12025
12025
  Kf,
12026
12026
  {
12027
- visible: X,
12027
+ visible: Q,
12028
12028
  onIdSubmitted: fe,
12029
- isSearching: oe,
12029
+ isSearching: ce,
12030
12030
  onCancel: () => {
12031
12031
  te(!1);
12032
12032
  }
@@ -12076,10 +12076,10 @@ function Ih(e) {
12076
12076
  domain: s = [],
12077
12077
  visible: a = !0,
12078
12078
  parentContext: l = {}
12079
- } = e, [c, u] = S(!1), [f, d] = S(!1), [p, h] = S(), [m, y] = S(), [v, g] = S(), [b, x] = S(1), [I, w] = S(0), A = Q($t), T = Q([]), [C, O] = S(0), [V, F] = S([]), [_, $] = S(void 0), [R, G] = S(), [W, j] = S(), [M, k] = S(), [X, te] = S(!1), oe = Q([]), H = (Y) => {
12080
- te(!0), x(Y), w((Y - 1) * A.current);
12081
- }, ie = async () => {
12082
- const Y = oe.current.length > 0 ? oe.current : s, me = Zt(T.current, Y), { colors: ve } = Ot(m), { totalItems: ke, results: Le, attrsEvaluated: Ie } = await P.getHandler().searchForTree({
12079
+ } = e, [c, u] = S(!1), [f, d] = S(!1), [p, h] = S(), [m, y] = S(), [v, g] = S(), [b, x] = S(1), [I, w] = S(0), A = X($t), T = X([]), [C, O] = S(0), [V, F] = S([]), [_, $] = S(void 0), [R, G] = S(), [W, j] = S(), [M, k] = S(), [Q, te] = S(!1), ce = X([]), H = (z) => {
12080
+ te(!0), x(z), w((z - 1) * A.current);
12081
+ }, oe = async () => {
12082
+ const z = ce.current.length > 0 ? ce.current : s, me = Zt(T.current, z), { colors: ve } = Ot(m), { totalItems: ke, results: Le, attrsEvaluated: Ie } = await P.getHandler().searchForTree({
12083
12083
  params: me,
12084
12084
  limit: A.current,
12085
12085
  offset: I,
@@ -12097,39 +12097,39 @@ function Ih(e) {
12097
12097
  te(!1), F($e);
12098
12098
  const Ke = await ke();
12099
12099
  O(Ke);
12100
- }, ee = async () => {
12100
+ }, Z = async () => {
12101
12101
  try {
12102
- te(!0), await ie();
12103
- } catch (Y) {
12104
- j(JSON.stringify(Y));
12102
+ te(!0), await oe();
12103
+ } catch (z) {
12104
+ j(JSON.stringify(z));
12105
12105
  }
12106
12106
  };
12107
12107
  ue(() => {
12108
- f && a && ee();
12108
+ f && a && Z();
12109
12109
  }, [b, I, f, a]);
12110
- const N = async (Y) => {
12110
+ const L = async (z) => {
12111
12111
  d(!1), u(!0), k(void 0);
12112
12112
  try {
12113
- Y === "action" ? await L() : await E(), d(!0);
12113
+ z === "action" ? await N() : await E(), d(!0);
12114
12114
  } catch (me) {
12115
12115
  k(me);
12116
12116
  } finally {
12117
12117
  u(!1);
12118
12118
  }
12119
- }, L = async () => {
12120
- const Y = await P.getHandler().getViewsForAction({
12119
+ }, N = async () => {
12120
+ const z = await P.getHandler().getViewsForAction({
12121
12121
  action: t,
12122
12122
  context: l
12123
12123
  });
12124
- oe.current = Y.domain, g(Y.views.get("form")), y(Y.views.get("tree")), h(Y.model), A.current = Y.limit;
12124
+ ce.current = z.domain, g(z.views.get("form")), y(z.views.get("tree")), h(z.model), A.current = z.limit;
12125
12125
  }, E = async () => {
12126
12126
  h(n);
12127
- const Y = await P.getHandler().getView({
12127
+ const z = await P.getHandler().getView({
12128
12128
  model: n,
12129
12129
  type: "form",
12130
12130
  context: l
12131
12131
  });
12132
- g(Y);
12132
+ g(z);
12133
12133
  const me = await P.getHandler().getView({
12134
12134
  model: n,
12135
12135
  type: "tree",
@@ -12139,16 +12139,16 @@ function Ih(e) {
12139
12139
  y(me);
12140
12140
  };
12141
12141
  ue(() => {
12142
- t ? N("action") : n && N("model");
12142
+ t ? L("action") : n && L("model");
12143
12143
  }, [t, n]);
12144
- const de = (Y) => {
12145
- const { id: me } = Y;
12144
+ const ae = (z) => {
12145
+ const { id: me } = z;
12146
12146
  o({
12147
12147
  id: me,
12148
12148
  model: p,
12149
12149
  treeView: m
12150
12150
  });
12151
- }, z = () => !m || !v ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
12151
+ }, Y = () => !m || !v ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
12152
12152
  W && /* @__PURE__ */ i(nt, { className: "mt-10", message: W, type: "error", banner: !0 }),
12153
12153
  /* @__PURE__ */ i(
12154
12154
  Sn,
@@ -12160,15 +12160,15 @@ function Ih(e) {
12160
12160
  treeView: m,
12161
12161
  results: V,
12162
12162
  onRequestPageChange: H,
12163
- loading: X,
12164
- onRowClicked: de,
12163
+ loading: Q,
12164
+ onRowClicked: ae,
12165
12165
  colorsForResults: _,
12166
12166
  sorter: R,
12167
- onChangeSort: (Y) => {
12168
- G == null || G(Y);
12167
+ onChangeSort: (z) => {
12168
+ G == null || G(z);
12169
12169
  const me = Yt({
12170
12170
  resultsToSort: V,
12171
- sorter: Y,
12171
+ sorter: z,
12172
12172
  fields: { ...m.fields, ...v.fields }
12173
12173
  });
12174
12174
  F(me);
@@ -12177,7 +12177,7 @@ function Ih(e) {
12177
12177
  }
12178
12178
  )
12179
12179
  ] });
12180
- return M ? /* @__PURE__ */ i(nt, { className: "mt-10", message: M, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : z();
12180
+ return M ? /* @__PURE__ */ i(nt, { className: "mt-10", message: M, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : Y();
12181
12181
  }
12182
12182
  const Oh = $r(Ih), Ah = (e) => {
12183
12183
  const { model: t } = e, [n, r] = S();
@@ -12199,7 +12199,7 @@ function Fh(e, t) {
12199
12199
  setIsLoading: p,
12200
12200
  openAction: h,
12201
12201
  moveItemsEnabled: m
12202
- } = re(ho), y = Q(), v = Q(), [g] = Je(P.getHandler().getView), [b] = Je(
12202
+ } = re(ho), y = X(), v = X(), [g] = Je(P.getHandler().getView), [b] = Je(
12203
12203
  P.getHandler().readObjects
12204
12204
  ), [x] = Je(P.getHandler().update), I = Jn(
12205
12205
  sn.FEATURE_READFORVIEW
@@ -12285,7 +12285,7 @@ function Fh(e, t) {
12285
12285
  return;
12286
12286
  const $ = _.filter((j) => {
12287
12287
  const M = a.find(
12288
- (X) => X.id === j.id
12288
+ (Q) => Q.id === j.id
12289
12289
  );
12290
12290
  if (!M)
12291
12291
  return !1;
@@ -12330,14 +12330,14 @@ function Fh(e, t) {
12330
12330
  const { actionData: R, values: G } = _, { position: W, id: j } = G, {
12331
12331
  actionId: M,
12332
12332
  actionType: k,
12333
- key: X,
12333
+ key: Q,
12334
12334
  title: te,
12335
- views: oe,
12335
+ views: ce,
12336
12336
  model: H,
12337
- context: ie,
12338
- domain: ee,
12339
- initialView: N,
12340
- limit: L
12337
+ context: oe,
12338
+ domain: Z,
12339
+ initialView: L,
12340
+ limit: N
12341
12341
  } = R;
12342
12342
  let E = {};
12343
12343
  try {
@@ -12345,35 +12345,35 @@ function Fh(e, t) {
12345
12345
  } catch {
12346
12346
  E = { x: $ * 2, y: 0, w: 2, h: 3 };
12347
12347
  }
12348
- let de = null;
12349
- if ((N == null ? void 0 : N.type) === "graph") {
12348
+ let ae = null;
12349
+ if ((L == null ? void 0 : L.type) === "graph") {
12350
12350
  const ve = G.server_action === !0 && I ? as : on;
12351
- de = /* @__PURE__ */ i(
12351
+ ae = /* @__PURE__ */ i(
12352
12352
  ve,
12353
12353
  {
12354
- view_id: oe.filter(
12354
+ view_id: ce.filter(
12355
12355
  (ke) => ke[1] === "graph"
12356
12356
  )[0][0],
12357
12357
  model: H,
12358
- context: ie,
12359
- domain: ee,
12360
- limit: L
12358
+ context: oe,
12359
+ domain: Z,
12360
+ limit: N
12361
12361
  },
12362
12362
  j
12363
12363
  );
12364
- } else if ((N == null ? void 0 : N.type) === "form")
12365
- de = /* @__PURE__ */ i(Ah, { model: H, actionDomain: ee }, j);
12366
- else if ((N == null ? void 0 : N.type) === "tree")
12367
- de = /* @__PURE__ */ i(
12364
+ } else if ((L == null ? void 0 : L.type) === "form")
12365
+ ae = /* @__PURE__ */ i(Ah, { model: H, actionDomain: Z }, j);
12366
+ else if ((L == null ? void 0 : L.type) === "tree")
12367
+ ae = /* @__PURE__ */ i(
12368
12368
  Oh,
12369
12369
  {
12370
12370
  model: H,
12371
- domain: ee,
12372
- view_id: oe.filter(
12371
+ domain: Z,
12372
+ view_id: ce.filter(
12373
12373
  (me) => me[1] === "tree"
12374
12374
  )[0][0],
12375
12375
  onRowClicked: (me) => {
12376
- const ve = oe.find((ke) => {
12376
+ const ve = ce.find((ke) => {
12377
12377
  const [, Le] = ke;
12378
12378
  return Le === "form";
12379
12379
  });
@@ -12383,7 +12383,7 @@ function Fh(e, t) {
12383
12383
  actionType: $e,
12384
12384
  title: Ke,
12385
12385
  model: Fe
12386
- } = R, ce = {
12386
+ } = R, de = {
12387
12387
  action_id: Ie,
12388
12388
  action_type: $e,
12389
12389
  name: Ke,
@@ -12392,46 +12392,46 @@ function Fh(e, t) {
12392
12392
  view_id: ke,
12393
12393
  view_type: Le
12394
12394
  };
12395
- h(ce);
12395
+ h(de);
12396
12396
  }
12397
12397
  }
12398
12398
  },
12399
12399
  j
12400
12400
  );
12401
- else if (N !== void 0) {
12402
- const me = N && Array.isArray(N.id) ? { ...N, id: N.id[0] } : N;
12403
- de = /* @__PURE__ */ i(
12401
+ else if (L !== void 0) {
12402
+ const me = L && Array.isArray(L.id) ? { ...L, id: L.id[0] } : L;
12403
+ ae = /* @__PURE__ */ i(
12404
12404
  ca,
12405
12405
  {
12406
12406
  action_id: M,
12407
12407
  action_type: k,
12408
- tabKey: X,
12408
+ tabKey: Q,
12409
12409
  title: te,
12410
- views: oe,
12410
+ views: ce,
12411
12411
  model: H,
12412
- context: ie,
12413
- domain: ee,
12412
+ context: oe,
12413
+ domain: Z,
12414
12414
  setCanWeClose: () => {
12415
12415
  },
12416
12416
  initialView: me,
12417
- limit: L
12417
+ limit: N
12418
12418
  },
12419
12419
  j
12420
12420
  );
12421
12421
  }
12422
- let z;
12423
- const Y = oe.find((me) => {
12422
+ let Y;
12423
+ const z = ce.find((me) => {
12424
12424
  const [, ve] = me;
12425
12425
  return ve === "tree";
12426
12426
  });
12427
- if (Y) {
12428
- const [me, ve] = Y, {
12427
+ if (z) {
12428
+ const [me, ve] = z, {
12429
12429
  actionId: ke,
12430
12430
  actionType: Le,
12431
12431
  title: Ie,
12432
12432
  model: $e
12433
12433
  } = R;
12434
- z = {
12434
+ Y = {
12435
12435
  action_id: ke,
12436
12436
  action_type: Le,
12437
12437
  name: Ie,
@@ -12448,9 +12448,9 @@ function Fh(e, t) {
12448
12448
  id: j,
12449
12449
  title: te,
12450
12450
  parms: E,
12451
- action: z,
12451
+ action: Y,
12452
12452
  openAction: h,
12453
- children: de
12453
+ children: ae
12454
12454
  },
12455
12455
  `griditem-${j}`
12456
12456
  );
@@ -12517,7 +12517,7 @@ const Rh = pt(Fh), _h = (e) => {
12517
12517
  O.push({ id: F, operation: "pendingLink" });
12518
12518
  }), x(O);
12519
12519
  };
12520
- return f && a.length === 0 ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
12520
+ return f && a.length === 0 ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
12521
12521
  /* @__PURE__ */ i(
12522
12522
  pn.Group,
12523
12523
  {
@@ -12763,7 +12763,7 @@ function ng(e, t) {
12763
12763
  closable: !0,
12764
12764
  content: /* @__PURE__ */ i(tg, {})
12765
12765
  }
12766
- ]), f = Q(/* @__PURE__ */ new Map()), d = Q();
12766
+ ]), f = X(/* @__PURE__ */ new Map()), d = X();
12767
12767
  ht(t, () => ({
12768
12768
  retrieveAndOpenAction: m,
12769
12769
  openShortcut: g
@@ -12810,34 +12810,34 @@ function ng(e, t) {
12810
12810
  views: j,
12811
12811
  name: M,
12812
12812
  target: k,
12813
- view_type: X,
12813
+ view_type: Q,
12814
12814
  limit: te
12815
- } = V, oe = X === "tree", H = [];
12816
- for (const ee of j) {
12817
- const [N, L] = ee;
12818
- if (N)
12819
- H.push(ee);
12820
- else if (L === "dashboard")
12815
+ } = V, ce = Q === "tree", H = [];
12816
+ for (const Z of j) {
12817
+ const [L, N] = Z;
12818
+ if (L)
12819
+ H.push(Z);
12820
+ else if (N === "dashboard")
12821
12821
  H.push([void 0, "dashboard"]);
12822
12822
  else {
12823
12823
  const { view_id: E } = await P.getHandler().getView({
12824
12824
  model: W,
12825
- type: L,
12826
- id: N,
12825
+ type: N,
12826
+ id: L,
12827
12827
  context: { ...l, ...R }
12828
12828
  });
12829
- H.push([E, L]);
12829
+ H.push([E, N]);
12830
12830
  }
12831
12831
  }
12832
- let ie;
12832
+ let oe;
12833
12833
  if (T) {
12834
- const [ee, N] = H.find(
12835
- ([L, E]) => E === T
12834
+ const [Z, L] = H.find(
12835
+ ([N, E]) => E === T
12836
12836
  );
12837
- ie = { id: ee, type: N };
12837
+ oe = { id: Z, type: L };
12838
12838
  } else {
12839
- const [ee, N] = H[0];
12840
- ie = { id: ee, type: N };
12839
+ const [Z, L] = H[0];
12840
+ oe = { id: Z, type: L };
12841
12841
  }
12842
12842
  x({
12843
12843
  domain: [...G, ...O],
@@ -12846,13 +12846,13 @@ function ng(e, t) {
12846
12846
  views: H,
12847
12847
  title: M,
12848
12848
  target: k,
12849
- initialView: ie,
12849
+ initialView: oe,
12850
12850
  action_type: F,
12851
12851
  action_id: $,
12852
12852
  values: w,
12853
12853
  forced_values: A,
12854
12854
  res_id: C,
12855
- treeExpandable: oe,
12855
+ treeExpandable: ce,
12856
12856
  limit: te
12857
12857
  });
12858
12858
  }
@@ -12893,7 +12893,7 @@ function ng(e, t) {
12893
12893
  context: V,
12894
12894
  values: { ...A, ...a },
12895
12895
  fields: w
12896
- }), X = F ? await P.getHandler().evalDomain({
12896
+ }), Q = F ? await P.getHandler().evalDomain({
12897
12897
  domain: F,
12898
12898
  values: Lt({
12899
12899
  fields: w,
@@ -12907,7 +12907,7 @@ function ng(e, t) {
12907
12907
  target: $,
12908
12908
  views: _,
12909
12909
  context: { ...l, ...k },
12910
- domain: X,
12910
+ domain: Q,
12911
12911
  title: R,
12912
12912
  initialView: M,
12913
12913
  action_id: T,
@@ -12922,62 +12922,66 @@ function ng(e, t) {
12922
12922
  res_id: T,
12923
12923
  view_id: C,
12924
12924
  overrideUnsettedLimit: O = !1,
12925
- values: V = {}
12926
- } = I, F = `${A},${w}`, _ = await P.getHandler().getActionData({
12927
- action: F,
12925
+ values: V = {},
12926
+ domain: F
12927
+ } = I, _ = `${A},${w}`, $ = await P.getHandler().getActionData({
12928
+ action: _,
12928
12929
  context: l
12929
- }), $ = Et({
12930
- context: _.context,
12930
+ }), R = Et({
12931
+ context: $.context,
12931
12932
  values: { ...a, ...V },
12932
12933
  fields: {}
12933
- }), R = _.domain ? await P.getHandler().evalDomain({
12934
- domain: _.domain,
12934
+ });
12935
+ let G = [];
12936
+ (F == null ? void 0 : F.length) > 0 ? G = F : $.domain && (G = await P.getHandler().evalDomain({
12937
+ domain: $.domain,
12935
12938
  values: { ...a, ...V },
12936
- context: { ...l, ...$ }
12937
- }) : [], {
12938
- res_model: G,
12939
- views: W,
12940
- name: j,
12941
- target: M,
12942
- view_type: k,
12943
- limit: X
12944
- } = _, te = k === "tree", oe = [];
12945
- for (const N of W) {
12946
- const [L, E] = N;
12947
- if (L)
12948
- oe.push(N);
12949
- else if (E === "dashboard")
12950
- oe.push([void 0, "dashboard"]);
12939
+ context: { ...l, ...R }
12940
+ }));
12941
+ const {
12942
+ res_model: W,
12943
+ views: j,
12944
+ name: M,
12945
+ target: k,
12946
+ view_type: Q,
12947
+ limit: te
12948
+ } = $, ce = Q === "tree", H = [];
12949
+ for (const N of j) {
12950
+ const [E, ae] = N;
12951
+ if (E)
12952
+ H.push(N);
12953
+ else if (ae === "dashboard")
12954
+ H.push([void 0, "dashboard"]);
12951
12955
  else {
12952
- const { view_id: de } = await P.getHandler().getView({
12953
- model: G,
12954
- type: E,
12955
- id: L,
12956
- context: { ...l, ...$ }
12956
+ const { view_id: Y } = await P.getHandler().getView({
12957
+ model: W,
12958
+ type: ae,
12959
+ id: E,
12960
+ context: { ...l, ...R }
12957
12961
  });
12958
- oe.push([de, E]);
12962
+ H.push([Y, ae]);
12959
12963
  }
12960
12964
  }
12961
- let H, ie;
12965
+ let oe, Z;
12962
12966
  if (C == null) {
12963
- const N = oe.find((L) => L[0] === void 0);
12964
- H = void 0, ie = N[1];
12967
+ const N = H.find((E) => E[0] === void 0);
12968
+ oe = void 0, Z = N[1];
12965
12969
  } else
12966
- [H, ie] = oe.find((N) => N[0] === void 0 ? !1 : N[0] === C);
12967
- const ee = { id: H, type: ie };
12970
+ [oe, Z] = H.find((N) => N[0] === void 0 ? !1 : N[0] === C);
12971
+ const L = { id: oe, type: Z };
12968
12972
  x({
12969
- domain: R,
12970
- context: { ...l, ...$ },
12971
- model: G,
12972
- views: oe,
12973
- title: j,
12974
- target: M,
12975
- initialView: ee,
12973
+ domain: G,
12974
+ context: { ...l, ...R },
12975
+ model: W,
12976
+ views: H,
12977
+ title: M,
12978
+ target: k,
12979
+ initialView: L,
12976
12980
  action_id: w,
12977
12981
  action_type: A,
12978
12982
  res_id: T,
12979
- treeExpandable: te,
12980
- limit: O && (X === 0 || X === !1) ? $t : X
12983
+ treeExpandable: ce,
12984
+ limit: O && (te === 0 || te === !1) ? $t : te
12981
12985
  });
12982
12986
  }
12983
12987
  async function b({
@@ -13169,7 +13173,7 @@ function ry() {
13169
13173
  const e = re(
13170
13174
  wt
13171
13175
  ), { activeKey: t, tabs: n, onRemoveTab: r, onChangeTab: o } = e || {};
13172
- return /* @__PURE__ */ i(ae, { children: n.map((s) => /* @__PURE__ */ i(
13176
+ return /* @__PURE__ */ i(se, { children: n.map((s) => /* @__PURE__ */ i(
13173
13177
  og,
13174
13178
  {
13175
13179
  tabKey: s.key,
@@ -13194,7 +13198,7 @@ function oy() {
13194
13198
  const e = re(
13195
13199
  wt
13196
13200
  ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((r) => /* @__PURE__ */ i(sg, { tab: r }, r.key))) || null;
13197
- return /* @__PURE__ */ i(ae, { children: n });
13201
+ return /* @__PURE__ */ i(se, { children: n });
13198
13202
  }
13199
13203
  const { useToken: ag } = Ge, iy = (e) => {
13200
13204
  const {
@@ -13203,7 +13207,7 @@ const { useToken: ag } = Ge, iy = (e) => {
13203
13207
  onAddFavourite: r,
13204
13208
  onRemoveFavourite: o,
13205
13209
  onDropdownClosed: s
13206
- } = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = ag(), p = Q(null), h = re(
13210
+ } = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = ag(), p = X(null), h = re(
13207
13211
  wt
13208
13212
  ), {
13209
13213
  openShortcut: m,