@gisce/react-ooui 2.30.0-alpha.2 → 2.30.0-rc.1

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 E, Fragment as ae } from "react/jsx-runtime";
5
- import dt, { useContext as oe, useState as S, useEffect as de, 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 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";
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";
@@ -97,11 +97,11 @@ const He = dt.createContext(null), Hl = (e) => {
97
97
  center: "justify-center",
98
98
  right: "justify-end"
99
99
  }, Kn = (e) => {
100
- const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: c } = t, u = oe(He);
100
+ const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: c } = t, u = re(He);
101
101
  let d = a !== null && o.length > 1 ? o + " :" : o;
102
102
  !t.fieldForLabel && t._id && (d = u.getFieldValue(t._id));
103
103
  const h = n || (a ? r ? "left" : "right" : "left"), { token: m } = Gl(), y = l === void 0 ? Ul : Wl;
104
- return /* @__PURE__ */ E(
104
+ return /* @__PURE__ */ D(
105
105
  "div",
106
106
  {
107
107
  className: `flex flex-row items-center pb-1 pt-1 ${Kl[h]}`,
@@ -163,10 +163,10 @@ function Re({
163
163
  align: s
164
164
  }
165
165
  );
166
- return n === "horizontal" ? (() => /* @__PURE__ */ E(Ne, { align: "middle", className: "pb-1 pt-1", children: [
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__ */ E(ae, { children: [
169
+ ] }))() : (() => /* @__PURE__ */ D(ae, { children: [
170
170
  y,
171
171
  m()
172
172
  ] }))();
@@ -321,7 +321,7 @@ const Qr = (e) => {
321
321
  icon: l,
322
322
  context: c,
323
323
  readOnly: u
324
- } = t, f = oe(He), { executeButtonAction: d } = f || {}, [p, h] = S(!1), { t: m } = he();
324
+ } = t, f = re(He), { executeButtonAction: d } = f || {}, [p, h] = S(!1), { t: m } = he();
325
325
  async function y() {
326
326
  h(!0), await d({ type: s, action: n, context: c }), h(!1);
327
327
  }
@@ -370,7 +370,7 @@ const Qr = (e) => {
370
370
  primary: f,
371
371
  context: d,
372
372
  readOnly: p
373
- } = n || {}, h = oe(He), { executeButtonAction: m } = h || {}, [y, v] = S(!1), { t: g } = he();
373
+ } = n || {}, h = re(He), { executeButtonAction: m } = h || {}, [y, v] = S(!1), { t: g } = he();
374
374
  function b() {
375
375
  if (y)
376
376
  return /* @__PURE__ */ i(gt, {});
@@ -398,7 +398,7 @@ const Qr = (e) => {
398
398
  if (t.buttons.length === 0)
399
399
  return null;
400
400
  if (t.buttons.length > 1)
401
- return /* @__PURE__ */ i(Re, { ooui: new vr({ defaultButton: n }), children: /* @__PURE__ */ E(
401
+ return /* @__PURE__ */ i(Re, { ooui: new vr({ defaultButton: n }), children: /* @__PURE__ */ D(
402
402
  Fa.Button,
403
403
  {
404
404
  disabled: !a || p,
@@ -485,7 +485,7 @@ function qn() {
485
485
  const [e, t] = S(
486
486
  _o()
487
487
  );
488
- return de(() => {
488
+ return ue(() => {
489
489
  function n() {
490
490
  t(_o());
491
491
  }
@@ -537,7 +537,7 @@ const Gi = (e) => {
537
537
  });
538
538
  }, Ki = (e) => {
539
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();
540
- de(() => {
540
+ ue(() => {
541
541
  t ? b() : v({});
542
542
  }, [t]);
543
543
  async function b() {
@@ -555,37 +555,37 @@ const Gi = (e) => {
555
555
  params: [["translatable", "=", "1"]],
556
556
  fieldsToRetrieve: ["code", "name"],
557
557
  model: "res.lang"
558
- })).map((D) => ({
559
- code: D.code,
560
- name: D.name
558
+ })).map((V) => ({
559
+ code: V.code,
560
+ name: V.name
561
561
  }));
562
562
  return f == null || f(A), A;
563
563
  }
564
564
  async function I(T) {
565
565
  const A = {};
566
- for (const D of T) {
566
+ for (const V of T) {
567
567
  const F = (await P.getHandler().readObjects({
568
568
  model: r,
569
569
  ids: [o],
570
570
  fieldsToRetrieve: [s],
571
- context: { lang: D.code }
571
+ context: { lang: V.code }
572
572
  }))[0];
573
- A[D.code] = F[s] || "";
573
+ A[V.code] = F[s] || "";
574
574
  }
575
575
  g.current = A, v(A);
576
576
  }
577
577
  function w() {
578
- return u.map((T, A) => /* @__PURE__ */ E(Ne, { style: { paddingBottom: 20 }, children: [
578
+ return u.map((T, A) => /* @__PURE__ */ D(Ne, { style: { paddingBottom: 20 }, children: [
579
579
  /* @__PURE__ */ i(be, { flex: "8rem", style: { paddingRight: 10 }, children: T.name }),
580
580
  /* @__PURE__ */ i(be, { flex: "auto", children: /* @__PURE__ */ i(
581
581
  dl,
582
582
  {
583
583
  rows: 4,
584
584
  value: y[T.code] || "",
585
- onChange: (D) => {
585
+ onChange: (V) => {
586
586
  v({
587
587
  ...y,
588
- [T.code]: D.target.value
588
+ [T.code]: V.target.value
589
589
  });
590
590
  },
591
591
  disabled: h
@@ -612,10 +612,10 @@ const Gi = (e) => {
612
612
  m(!1), a();
613
613
  }
614
614
  function C() {
615
- return d ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ E(ae, { children: [
615
+ return d ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(ae, { children: [
616
616
  w(),
617
617
  /* @__PURE__ */ i(Ln, {}),
618
- /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ E(Xe, { children: [
618
+ /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ D(Xe, { children: [
619
619
  /* @__PURE__ */ i(
620
620
  je,
621
621
  {
@@ -683,7 +683,7 @@ const { info: ec } = at, Tt = (e) => {
683
683
  isSearchField: r,
684
684
  onChange: o
685
685
  }) => {
686
- const s = Array.isArray(e) || !!t.selectionValues.size, a = oe(He), { elementHasLostFocus: l } = a || {}, { id: c, readOnly: u, isPassword: f, translatable: d } = t, p = t.size !== void 0 && t.showCount;
686
+ const s = Array.isArray(e) || !!t.selectionValues.size, a = re(He), { elementHasLostFocus: l } = a || {}, { id: c, readOnly: u, isPassword: f, translatable: d } = t, p = t.size !== void 0 && t.showCount;
687
687
  t.selectionValues.size ? e = t.selectionValues.get(e) : Array.isArray(e) && (e = e[1]);
688
688
  let h = /* @__PURE__ */ i(
689
689
  ct,
@@ -718,14 +718,14 @@ const { info: ec } = at, Tt = (e) => {
718
718
  requiredStyle: n,
719
719
  onChange: r
720
720
  }) => {
721
- const o = oe(He), {
721
+ const o = re(He), {
722
722
  activeId: s,
723
723
  activeModel: a,
724
724
  fetchValues: l,
725
725
  formHasChanges: c,
726
726
  elementHasLostFocus: u
727
727
  } = o || {}, [f, d] = S(!1), { t: p } = he();
728
- return s ? /* @__PURE__ */ E(ae, { children: [
728
+ return s ? /* @__PURE__ */ D(ae, { 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__ */ E(Ne, { gutter: 8, wrap: !1, children: [
769
+ ] }) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, children: [
770
770
  /* @__PURE__ */ i(be, { flex: "auto", children: /* @__PURE__ */ i(
771
771
  ct,
772
772
  {
@@ -874,8 +874,8 @@ const hc = (e) => {
874
874
  function f() {
875
875
  l(void 0);
876
876
  }
877
- return /* @__PURE__ */ E(ae, { children: [
878
- /* @__PURE__ */ E(Ne, { gutter: 8, wrap: !1, justify: "center", children: [
877
+ return /* @__PURE__ */ D(ae, { children: [
878
+ /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, justify: "center", children: [
879
879
  n && /* @__PURE__ */ i(
880
880
  "img",
881
881
  {
@@ -895,7 +895,7 @@ const hc = (e) => {
895
895
  }
896
896
  )
897
897
  ] }),
898
- /* @__PURE__ */ i(Ne, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ E(Xe, { children: [
898
+ /* @__PURE__ */ i(Ne, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ D(Xe, { children: [
899
899
  /* @__PURE__ */ i(
900
900
  tt,
901
901
  {
@@ -958,9 +958,9 @@ function wc(e) {
958
958
  const Zr = (e, t, n) => e.columns.map((o) => {
959
959
  const s = o.type, a = o.id, l = t == null ? void 0 : t[s];
960
960
  let c;
961
- return l ? c = (u) => l({ value: u, key: a, ooui: o, context: n }) : c = (u) => wc(u) ? u : /* @__PURE__ */ E("p", { style: { color: "red" }, children: [
961
+ return l ? c = (u) => l({ value: u, key: a, ooui: o, context: n }) : c = (u) => wc(u) ? u : /* @__PURE__ */ D("p", { style: { color: "red" }, children: [
962
962
  "Unsupported widget value for a Tree cell:",
963
- /* @__PURE__ */ i("pre", { children: /* @__PURE__ */ E("strong", { children: [
963
+ /* @__PURE__ */ i("pre", { children: /* @__PURE__ */ D("strong", { children: [
964
964
  "Type: ",
965
965
  s,
966
966
  " - Value: ",
@@ -1137,7 +1137,7 @@ function Do({
1137
1137
  }), n;
1138
1138
  }
1139
1139
  const Oc = (e) => {
1140
- const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = S(!0), [l, c] = S(), [u, f] = S(/* @__PURE__ */ new Map()), d = oe(He), { getContext: p } = d || {};
1140
+ const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = S(!0), [l, c] = S(), [u, f] = S(/* @__PURE__ */ new Map()), d = re(He), { getContext: p } = d || {};
1141
1141
  yt(() => {
1142
1142
  m();
1143
1143
  }, [t]);
@@ -1158,7 +1158,7 @@ const Oc = (e) => {
1158
1158
  };
1159
1159
  return s ? /* @__PURE__ */ i(We, {}) : l ? /* @__PURE__ */ i(nt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(Ac, { ooui: t, views: u }) });
1160
1160
  }, Ac = (e) => {
1161
- const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = S(!1), [c, u] = S(), [f, d] = S(!1), [p, h] = S(), { relation: m, context: y, readOnly: v, summaryField: g, titleField: b } = r, x = s.filter((T) => T.values), I = oe(He), { getContext: w } = I || {};
1161
+ const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = S(!1), [c, u] = S(), [f, d] = S(!1), [p, h] = S(), { relation: m, context: y, readOnly: v, summaryField: g, titleField: b } = r, x = s.filter((T) => T.values), I = re(He), { getContext: w } = I || {};
1162
1162
  yt(() => {
1163
1163
  C();
1164
1164
  }, [s]);
@@ -1190,10 +1190,10 @@ 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__ */ E(ae, { children: [
1193
+ return c ? /* @__PURE__ */ i(nt, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(ae, { children: [
1194
1194
  /* @__PURE__ */ i(yr, { style: { padding: "1rem" }, children: x.map((T, A) => {
1195
- var D, F;
1196
- return /* @__PURE__ */ i(yr.Item, { children: /* @__PURE__ */ E(
1195
+ var V, F;
1196
+ return /* @__PURE__ */ i(yr.Item, { children: /* @__PURE__ */ D(
1197
1197
  "div",
1198
1198
  {
1199
1199
  style: { display: "inline-block", cursor: "pointer" },
@@ -1203,7 +1203,7 @@ const Oc = (e) => {
1203
1203
  ), d(!0);
1204
1204
  },
1205
1205
  children: [
1206
- /* @__PURE__ */ i("strong", { children: (D = T.values) == null ? void 0 : D[b] }),
1206
+ /* @__PURE__ */ i("strong", { children: (V = T.values) == null ? void 0 : V[b] }),
1207
1207
  /* @__PURE__ */ i("br", {}),
1208
1208
  ((F = T.values) == null ? void 0 : F[g]) && /* @__PURE__ */ i("span", { children: T.values[g] })
1209
1209
  ]
@@ -1538,7 +1538,7 @@ const Oc = (e) => {
1538
1538
  rootContext: {},
1539
1539
  devMode: !1
1540
1540
  }, Zi = dt.createContext(Dc), to = () => {
1541
- const e = oe(Zi);
1541
+ const e = re(Zi);
1542
1542
  if (!e)
1543
1543
  throw new Error(
1544
1544
  "useConfigContext must be used within a ConfigContextProvider"
@@ -1630,7 +1630,7 @@ async function es({
1630
1630
  };
1631
1631
  }
1632
1632
  const Pc = (e) => {
1633
- const [t, n] = S(), [r, o] = S(!0), [s, a] = S(), [l, c] = S(), u = oe(He), { getContext: f, getValues: d, activeId: p } = u || {}, { globalValues: h, rootContext: m } = to(), y = ye(() => ({ ...f == null ? void 0 : f(), ...m }), [f, m]);
1633
+ const [t, n] = S(), [r, o] = S(!0), [s, a] = S(), [l, c] = S(), u = re(He), { getContext: f, getValues: d, activeId: p } = u || {}, { globalValues: h, rootContext: m } = to(), y = ye(() => ({ ...f == null ? void 0 : f(), ...m }), [f, m]);
1634
1634
  return { actionData: s, treeShortcut: l, loading: r, error: t, fetchData: async () => {
1635
1635
  n(void 0), o(!0);
1636
1636
  try {
@@ -1708,7 +1708,7 @@ const Pc = (e) => {
1708
1708
  );
1709
1709
  }, Je = (e) => {
1710
1710
  const t = Q(/* @__PURE__ */ new Map());
1711
- de(() => () => {
1711
+ ue(() => () => {
1712
1712
  n();
1713
1713
  }, []);
1714
1714
  const n = B((o) => {
@@ -1810,7 +1810,7 @@ function kc({
1810
1810
  justifyContent: "center",
1811
1811
  overflow: "hidden"
1812
1812
  },
1813
- children: /* @__PURE__ */ E(br, { style: { fontSize: c, margin: 0, color: s }, children: [
1813
+ children: /* @__PURE__ */ D(br, { style: { fontSize: c, margin: 0, color: s }, children: [
1814
1814
  h && /* @__PURE__ */ i(h, { style: { fontSize: c * 0.7 } }),
1815
1815
  h ? ` ${d}` : d
1816
1816
  ] })
@@ -1860,9 +1860,9 @@ function $c({
1860
1860
  flexDirection: "column",
1861
1861
  padding: "0.2rem"
1862
1862
  },
1863
- children: /* @__PURE__ */ E(Ne, { align: "middle", children: [
1863
+ children: /* @__PURE__ */ D(Ne, { align: "middle", children: [
1864
1864
  y && /* @__PURE__ */ i(be, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ i(y, {}) }),
1865
- /* @__PURE__ */ E(be, { children: [
1865
+ /* @__PURE__ */ D(be, { children: [
1866
1866
  /* @__PURE__ */ i(br, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: y ? ` ${r}%` : `${r}%` }),
1867
1867
  /* @__PURE__ */ i(
1868
1868
  br,
@@ -1894,7 +1894,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1894
1894
  field: u,
1895
1895
  operator: f,
1896
1896
  manualIds: d
1897
- } = e, [p, h] = S(!1), [m, y] = S(), [v, g] = S(0), [b, x] = S(), [I, w] = S(), [O, C] = S(), [T, A] = S(), [D] = Je(
1897
+ } = e, [p, h] = S(!1), [m, y] = S(), [v, g] = S(0), [b, x] = S(), [I, w] = S(), [O, C] = S(), [T, A] = S(), [V] = Je(
1898
1898
  P.getHandler().searchAllIds
1899
1899
  ), [F] = Je(
1900
1900
  P.getHandler().readObjects
@@ -1905,18 +1905,18 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1905
1905
  ), [R] = Je(
1906
1906
  P.getHandler().parseCondition
1907
1907
  );
1908
- de(() => {
1909
- L();
1908
+ ue(() => {
1909
+ j();
1910
1910
  }, [t, o]);
1911
1911
  async function G({
1912
- domain: N,
1912
+ domain: M,
1913
1913
  isTotal: k
1914
1914
  }) {
1915
1915
  if (k)
1916
- return await W({ domain: N });
1916
+ return await W({ domain: M });
1917
1917
  if (u && f) {
1918
- const X = d || await D({
1919
- params: N,
1918
+ const X = d || await V({
1919
+ params: M,
1920
1920
  model: t,
1921
1921
  context: r
1922
1922
  }), te = await F({
@@ -1926,20 +1926,20 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1926
1926
  context: r
1927
1927
  });
1928
1928
  return Eo({
1929
- values: te.map((ie) => ie[u]),
1929
+ values: te.map((oe) => oe[u]),
1930
1930
  operator: f
1931
1931
  });
1932
1932
  } else
1933
1933
  return d ? d.length : await _({
1934
1934
  model: t,
1935
- params: N,
1935
+ params: M,
1936
1936
  context: r
1937
1937
  });
1938
1938
  }
1939
- async function W({ domain: N }) {
1939
+ async function W({ domain: M }) {
1940
1940
  if (u && f) {
1941
- const k = await D({
1942
- params: N,
1941
+ const k = await V({
1942
+ params: M,
1943
1943
  model: t,
1944
1944
  context: r
1945
1945
  }), X = await F({
@@ -1955,13 +1955,13 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1955
1955
  } else
1956
1956
  return await _({
1957
1957
  model: t,
1958
- params: N,
1958
+ params: M,
1959
1959
  context: r
1960
1960
  });
1961
1961
  }
1962
- async function L() {
1962
+ async function j() {
1963
1963
  h(!0), A(void 0);
1964
- let N, k;
1964
+ let M, k;
1965
1965
  try {
1966
1966
  const X = await G({ domain: n, isTotal: !1 });
1967
1967
  if (y(X), s) {
@@ -1970,12 +1970,12 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
1970
1970
  values: {},
1971
1971
  context: r
1972
1972
  });
1973
- N = await G({
1973
+ M = await G({
1974
1974
  domain: te,
1975
1975
  isTotal: !0
1976
- }), x(N);
1976
+ }), x(M);
1977
1977
  }
1978
- if (N ? (k = Math.round(X / N * 100 * 100) / 100, g(k)) : g(0), o) {
1978
+ if (M ? (k = Math.round(X / M * 100 * 100) / 100, g(k)) : g(0), o) {
1979
1979
  const te = await R({
1980
1980
  condition: o,
1981
1981
  values: { value: X, percent: k },
@@ -2347,7 +2347,7 @@ const Kc = {
2347
2347
  ({ percent: m, x: y }) => m < 0.07 ? "" : f(y),
2348
2348
  [f]
2349
2349
  ), h = Yc[e];
2350
- return h ? /* @__PURE__ */ E(
2350
+ return h ? /* @__PURE__ */ D(
2351
2351
  "div",
2352
2352
  {
2353
2353
  style: {
@@ -2470,21 +2470,21 @@ const Jc = ({
2470
2470
  setSearchTreeNameSearch: C,
2471
2471
  goToResourceId: T,
2472
2472
  limit: A,
2473
- isActive: D
2474
- } = e, [F, _] = S(!1), [$, R] = S(!1), [G, W] = S(!1), [L, N] = S(!0), [k, X] = S(!0), [te, ie] = S([]), [H, ne] = S(!1), [ee, V] = S([]), [M, j] = S(!1), [fe, z] = S(!0), [Y, me] = S(), [ve, $e] = S({}), [Le, Ie] = S(0), [Ee, Ke] = S(), [Fe, ce] = S(!1), [ue, we] = S(
2473
+ isActive: V
2474
+ } = 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, $e] = S({}), [Le, Ie] = S(0), [Ee, Ke] = S(), [Fe, ce] = S(!1), [fe, we] = S(
2475
2475
  A !== void 0 ? A : $t
2476
2476
  ), [_e, J] = S(r);
2477
- de(() => {
2477
+ ue(() => {
2478
2478
  p && p.length > 0 && !h && (m == null || m(0), f == null || f(p[0].id));
2479
- }, [p]), de(() => {
2479
+ }, [p]), ue(() => {
2480
2480
  we(A !== void 0 ? A : $t);
2481
- }, [A]), de(() => {
2481
+ }, [A]), ue(() => {
2482
2482
  s.length === 1 ? me(s[0]) : s.length > 1 && me(
2483
2483
  s.filter(
2484
2484
  (Se) => Se.view_id !== n.view_id
2485
2485
  )[0]
2486
2486
  );
2487
- }, [s]), de(() => {
2487
+ }, [s]), ue(() => {
2488
2488
  (Y == null ? void 0 : Y.view_id) === n.view_id && s.length > 1 && me(
2489
2489
  s.filter(
2490
2490
  (Se) => Se.view_id !== n.view_id
@@ -2520,20 +2520,20 @@ const Jc = ({
2520
2520
  currentModel: y,
2521
2521
  removingItem: G,
2522
2522
  setRemovingItem: W,
2523
- formIsLoading: L,
2524
- setFormIsLoading: N,
2523
+ formIsLoading: j,
2524
+ setFormIsLoading: M,
2525
2525
  treeIsLoading: k,
2526
2526
  setTreeIsLoading: X,
2527
2527
  attachments: te,
2528
- setAttachments: ie,
2528
+ setAttachments: oe,
2529
2529
  selectedRowItems: w,
2530
2530
  setSelectedRowItems: I,
2531
2531
  duplicatingItem: H,
2532
- setDuplicatingItem: ne,
2533
- setSearchParams: V,
2532
+ setDuplicatingItem: ie,
2533
+ setSearchParams: N,
2534
2534
  searchParams: ee,
2535
- searchVisible: M,
2536
- setSearchVisible: j,
2535
+ searchVisible: L,
2536
+ setSearchVisible: E,
2537
2537
  sorter: v,
2538
2538
  setSorter: g,
2539
2539
  totalItems: b,
@@ -2541,16 +2541,16 @@ const Jc = ({
2541
2541
  searchTreeNameSearch: O,
2542
2542
  setSearchTreeNameSearch: C,
2543
2543
  setGraphIsLoading: z,
2544
- graphIsLoading: fe,
2544
+ graphIsLoading: de,
2545
2545
  previousView: Y,
2546
2546
  setPreviousView: me,
2547
2547
  goToResourceId: T,
2548
2548
  searchValues: ve,
2549
2549
  setSearchValues: $e,
2550
- limit: ue,
2550
+ limit: fe,
2551
2551
  setLimit: we,
2552
2552
  setTitle: J,
2553
- isActive: D,
2553
+ isActive: V,
2554
2554
  setTreeFirstVisibleRow: Ie,
2555
2555
  treeFirstVisibleRow: Le,
2556
2556
  searchQuery: Ee,
@@ -2562,7 +2562,7 @@ const Jc = ({
2562
2562
  }
2563
2563
  );
2564
2564
  }, no = (e) => {
2565
- const t = oe(
2565
+ const t = re(
2566
2566
  lt
2567
2567
  );
2568
2568
  if (!e)
@@ -2573,14 +2573,14 @@ const Jc = ({
2573
2573
  );
2574
2574
  return t;
2575
2575
  }, Qc = (e, t) => {
2576
- const { view_id: n, model: r, context: o, domain: s, limit: a, manualIds: l, fixedHeight: c } = e, [u, f] = S(!1), [d, p] = S(), h = oe(
2576
+ const { view_id: n, model: r, context: o, domain: s, limit: a, manualIds: l, fixedHeight: c } = e, [u, f] = S(!1), [d, p] = S(), h = re(
2577
2577
  lt
2578
2578
  ), { setGraphIsLoading: m = void 0 } = h || {}, [y] = Je(P.getHandler().getView);
2579
2579
  ht(t, () => ({
2580
2580
  refresh: () => {
2581
2581
  v();
2582
2582
  }
2583
- })), de(() => {
2583
+ })), ue(() => {
2584
2584
  v();
2585
2585
  }, [n]);
2586
2586
  async function v() {
@@ -2667,7 +2667,7 @@ const ty = Object.values(sn), Zc = (e) => {
2667
2667
  graphData: f
2668
2668
  };
2669
2669
  }, ed = (e, t) => {
2670
- const { view_id: n, model: r, context: o, domain: s, manualIds: a, fixedHeight: l } = e, c = oe(
2670
+ const { view_id: n, model: r, context: o, domain: s, manualIds: a, fixedHeight: l } = e, c = re(
2671
2671
  lt
2672
2672
  ), { setGraphIsLoading: u = void 0 } = c || {}, { error: f, loading: d, graphData: p, fetchData: h } = Zc({
2673
2673
  view_id: n,
@@ -2676,13 +2676,13 @@ const ty = Object.values(sn), Zc = (e) => {
2676
2676
  context: o,
2677
2677
  manualIds: a
2678
2678
  });
2679
- if (de(() => {
2679
+ if (ue(() => {
2680
2680
  u == null || u(d);
2681
2681
  }, [d]), ht(t, () => ({
2682
2682
  refresh: () => {
2683
2683
  h();
2684
2684
  }
2685
- })), de(() => {
2685
+ })), ue(() => {
2686
2686
  h();
2687
2687
  }, [n]), d || !p)
2688
2688
  return /* @__PURE__ */ i(bn, {});
@@ -2759,7 +2759,7 @@ const ty = Object.values(sn), Zc = (e) => {
2759
2759
  );
2760
2760
  }, { useToken: nd } = Ge, { Text: rd } = Rt, ls = (e) => {
2761
2761
  const { title: t, children: n, action: r, openAction: o, parms: s } = e, { token: a } = nd(), l = Object.keys(s).length > 0;
2762
- return /* @__PURE__ */ E(
2762
+ return /* @__PURE__ */ D(
2763
2763
  "div",
2764
2764
  {
2765
2765
  className: l ? "shadow-md" : void 0,
@@ -2773,7 +2773,7 @@ const ty = Object.values(sn), Zc = (e) => {
2773
2773
  borderRadius: a.borderRadius
2774
2774
  },
2775
2775
  children: [
2776
- /* @__PURE__ */ E(
2776
+ /* @__PURE__ */ D(
2777
2777
  Ne,
2778
2778
  {
2779
2779
  align: "middle",
@@ -2818,8 +2818,8 @@ const ty = Object.values(sn), Zc = (e) => {
2818
2818
  const { ooui: t } = e, n = t.actionId !== void 0;
2819
2819
  return /* @__PURE__ */ i(Re, { ooui: t, children: n ? /* @__PURE__ */ i(Vn, { children: /* @__PURE__ */ i(ad, { ooui: t }) }) : /* @__PURE__ */ i(sd, { ooui: t }) });
2820
2820
  }, sd = (e) => {
2821
- const { token: t } = od(), { ooui: n, value: r } = e, o = /* @__PURE__ */ E(ae, { children: [
2822
- /* @__PURE__ */ E("span", { children: [
2821
+ const { token: t } = od(), { ooui: n, value: r } = e, o = /* @__PURE__ */ D(ae, { children: [
2822
+ /* @__PURE__ */ D("span", { children: [
2823
2823
  n.label,
2824
2824
  " "
2825
2825
  ] }),
@@ -2846,15 +2846,15 @@ const ty = Object.values(sn), Zc = (e) => {
2846
2846
  }, ad = (e) => {
2847
2847
  const { ooui: t } = e, { actionId: n } = t, { actionData: r, treeShortcut: o, loading: s, error: a, fetchData: l } = Pc(n), c = Jn(
2848
2848
  sn.FEATURE_READFORVIEW
2849
- ), u = oe(
2849
+ ), u = re(
2850
2850
  wt
2851
2851
  ), { openShortcut: f } = u || {};
2852
- if (de(() => {
2852
+ if (ue(() => {
2853
2853
  t && l();
2854
2854
  }, [t]), a)
2855
2855
  return /* @__PURE__ */ i(ts, { error: a });
2856
2856
  const { id: d, model: p, limit: h, domain: m, context: y, initialView: v } = r || {}, g = c ? as : on;
2857
- return /* @__PURE__ */ E(
2857
+ return /* @__PURE__ */ D(
2858
2858
  ls,
2859
2859
  {
2860
2860
  id: d,
@@ -3029,7 +3029,7 @@ const Lt = ({
3029
3029
  const { ooui: t } = e;
3030
3030
  return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(gd, { ooui: t }) });
3031
3031
  }, gd = (e) => {
3032
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: y } = n, v = oe(He), { getContext: g } = v || {};
3032
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: y } = n, v = re(He), { getContext: g } = v || {};
3033
3033
  yt(() => {
3034
3034
  x();
3035
3035
  }, [o]);
@@ -3060,9 +3060,9 @@ const Lt = ({
3060
3060
  fieldsToRetrieve: [y],
3061
3061
  context: { ...g == null ? void 0 : g(), ...h }
3062
3062
  })).map((A) => {
3063
- const D = A[y];
3064
- let F = D;
3065
- return Array.isArray(D) && (F = D[1]), { label: F, value: A.id };
3063
+ const V = A[y];
3064
+ let F = V;
3065
+ return Array.isArray(V) && (F = V[1]), { label: F, value: A.id };
3066
3066
  });
3067
3067
  l(T);
3068
3068
  } catch (C) {
@@ -3080,14 +3080,14 @@ const Lt = ({
3080
3080
  C.push({ id: A, operation: "pendingLink" });
3081
3081
  }), b(C);
3082
3082
  }, w = (O) => {
3083
- const { label: C, closable: T, onClose: A } = O, D = (_) => {
3083
+ const { label: C, closable: T, onClose: A } = O, V = (_) => {
3084
3084
  _.preventDefault(), _.stopPropagation();
3085
3085
  }, F = vn(C);
3086
3086
  return /* @__PURE__ */ i(
3087
3087
  oo,
3088
3088
  {
3089
3089
  color: F,
3090
- onMouseDown: D,
3090
+ onMouseDown: V,
3091
3091
  closable: T,
3092
3092
  onClose: A,
3093
3093
  closeIcon: /* @__PURE__ */ i("span", { style: { color: F }, children: "X" }),
@@ -3327,7 +3327,7 @@ const Lt = ({
3327
3327
  for (let n = 0; n < e.length; n++)
3328
3328
  await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
3329
3329
  }, _d = (e, t) => {
3330
- const { children: n, globalValues: r = {} } = e, o = Q(), s = Q(), [a, l] = S(!1), c = oe(
3330
+ const { children: n, globalValues: r = {} } = e, o = Q(), s = Q(), [a, l] = S(!1), c = re(
3331
3331
  wt
3332
3332
  ), { openAction: u } = c || {}, f = Q([]), { t: d } = he();
3333
3333
  ht(t, () => ({
@@ -3339,7 +3339,7 @@ const Lt = ({
3339
3339
  }
3340
3340
  );
3341
3341
  async function v(C) {
3342
- const { reportData: T, fields: A, values: D, context: F = {} } = C, {
3342
+ const { reportData: T, fields: A, values: V, context: F = {} } = C, {
3343
3343
  context: _,
3344
3344
  model: $,
3345
3345
  datas: R = {},
@@ -3350,17 +3350,17 @@ const Lt = ({
3350
3350
  it(`${W} action not supported`);
3351
3351
  return;
3352
3352
  }
3353
- const { ids: L } = R || {}, N = L || [], k = typeof _ == "string" ? Et({
3353
+ const { ids: j } = R || {}, M = j || [], k = typeof _ == "string" ? Et({
3354
3354
  context: _,
3355
3355
  fields: A,
3356
- values: D
3356
+ values: V
3357
3357
  }) : _;
3358
3358
  try {
3359
3359
  const X = await P.getHandler().createReport({
3360
3360
  model: $,
3361
3361
  name: G,
3362
3362
  datas: R,
3363
- ids: N,
3363
+ ids: M,
3364
3364
  context: { ...F, ...k }
3365
3365
  });
3366
3366
  l(!0), s.current = !0, o.current = setInterval(() => {
@@ -3388,7 +3388,7 @@ const Lt = ({
3388
3388
  actionData: C,
3389
3389
  fields: T,
3390
3390
  values: A,
3391
- context: D,
3391
+ context: V,
3392
3392
  onRefreshParentValues: F
3393
3393
  }) {
3394
3394
  const { type: _ } = C;
@@ -3397,13 +3397,13 @@ const Lt = ({
3397
3397
  reportData: C,
3398
3398
  fields: T,
3399
3399
  values: A,
3400
- context: D
3400
+ context: V
3401
3401
  });
3402
3402
  if (_ === "ir.actions.act_window")
3403
- return await x({ actionData: C, fields: T, values: A, context: D });
3403
+ return await x({ actionData: C, fields: T, values: A, context: V });
3404
3404
  if (_ === "ir.actions.act_url")
3405
3405
  window.open(
3406
- md(C.url, { ...A, context: D }),
3406
+ md(C.url, { ...A, context: V }),
3407
3407
  "_blank"
3408
3408
  );
3409
3409
  else
@@ -3413,21 +3413,21 @@ const Lt = ({
3413
3413
  actionData: C,
3414
3414
  fields: T = {},
3415
3415
  values: A = {},
3416
- context: D = {}
3416
+ context: V = {}
3417
3417
  }) {
3418
3418
  var G;
3419
3419
  let F = C;
3420
3420
  C.res_model || (F = (await P.getHandler().readObjects({
3421
3421
  model: "ir.actions.act_window",
3422
3422
  ids: [parseInt(C.id)],
3423
- context: D
3423
+ context: V
3424
3424
  }))[0]);
3425
3425
  const _ = typeof (F == null ? void 0 : F.context) == "string" ? Et({
3426
3426
  context: F.context,
3427
3427
  fields: T,
3428
3428
  values: { ...A, ...r }
3429
3429
  }) : F.context, $ = {
3430
- ...D,
3430
+ ...V,
3431
3431
  ..._
3432
3432
  };
3433
3433
  let R = [];
@@ -3453,7 +3453,7 @@ const Lt = ({
3453
3453
  context: $
3454
3454
  }), {};
3455
3455
  } else {
3456
- const { initialView: W, views: L } = await Vd({
3456
+ const { initialView: W, views: j } = await Vd({
3457
3457
  model: F.res_model,
3458
3458
  context: $,
3459
3459
  view_mode: F.view_mode,
@@ -3464,7 +3464,7 @@ const Lt = ({
3464
3464
  context: $,
3465
3465
  domain: R,
3466
3466
  model: F.res_model,
3467
- views: L,
3467
+ views: j,
3468
3468
  title: F.name,
3469
3469
  initialView: W,
3470
3470
  action_id: F.id,
@@ -3476,16 +3476,16 @@ const Lt = ({
3476
3476
  domain: C,
3477
3477
  model: T,
3478
3478
  formView: A,
3479
- context: D,
3479
+ context: V,
3480
3480
  actionData: F
3481
3481
  }) {
3482
- p ? w({ domain: C, model: T, formView: A, context: D, actionData: F }) : (y({ domain: C, model: T, context: D, formView: A, actionData: F }), h(!0));
3482
+ p ? w({ domain: C, model: T, formView: A, context: V, actionData: F }) : (y({ domain: C, model: T, context: V, formView: A, actionData: F }), h(!0));
3483
3483
  }
3484
3484
  async function w({
3485
3485
  domain: C,
3486
3486
  model: T,
3487
3487
  formView: A,
3488
- context: D,
3488
+ context: V,
3489
3489
  actionData: F
3490
3490
  }) {
3491
3491
  y({
@@ -3494,7 +3494,7 @@ const Lt = ({
3494
3494
  context: {},
3495
3495
  formView: void 0,
3496
3496
  actionData: void 0
3497
- }), h(!1), await new Promise((_) => setTimeout(_, 300)), y({ domain: C, model: T, context: D, formView: A, actionData: F }), h(!0);
3497
+ }), h(!1), await new Promise((_) => setTimeout(_, 300)), y({ domain: C, model: T, context: V, formView: A, actionData: F }), h(!0);
3498
3498
  }
3499
3499
  async function O() {
3500
3500
  Lo(f.current), f.current = [], h(!1), y({
@@ -3512,7 +3512,7 @@ const Lt = ({
3512
3512
  processAction: b,
3513
3513
  globalValues: r
3514
3514
  },
3515
- children: /* @__PURE__ */ E(ae, { children: [
3515
+ children: /* @__PURE__ */ D(ae, { children: [
3516
3516
  n,
3517
3517
  /* @__PURE__ */ i(
3518
3518
  at,
@@ -3635,17 +3635,17 @@ function kd(e, t) {
3635
3635
  forcedValues: O = {},
3636
3636
  parentWidth: C,
3637
3637
  onMustRefreshParent: T
3638
- } = e, { t: A } = he(), [D, F] = S(!1), [_, $] = S(), [R, G] = S(), [W] = ut.useForm(), [L, N] = S(), [k, X] = S(), te = oe(ds), [ie, H] = S(), [ne, ee] = S(!1), V = Q(), M = Q({}), j = Q({}), fe = Q(!1), z = Q(!1), Y = Q(!1), ve = (C !== void 0 ? C : ie) < Pd, $e = oe(He), { activeId: Le, getPlainValues: Ie } = $e || {}, Ee = Q(!1), Ke = oe(
3638
+ } = e, { t: A } = 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 = (C !== void 0 ? C : oe) < Pd, $e = re(He), { activeId: Le, getPlainValues: Ie } = $e || {}, Ee = Q(!1), Ke = re(
3639
3639
  lt
3640
3640
  ), {
3641
3641
  setFormIsSaving: Fe = void 0,
3642
3642
  setFormHasChanges: ce = void 0,
3643
- setCurrentId: ue = void 0,
3643
+ setCurrentId: fe = void 0,
3644
3644
  setFormIsLoading: we = void 0,
3645
3645
  setAttachments: _e = void 0,
3646
3646
  title: J = void 0,
3647
3647
  setTitle: Ce = void 0
3648
- } = (I ? Ke : {}) || {}, Se = oe(
3648
+ } = (I ? Ke : {}) || {}, Se = re(
3649
3649
  ln
3650
3650
  ), { processAction: Ue, globalValues: Me } = Se || {};
3651
3651
  ht(t, () => ({
@@ -3657,30 +3657,30 @@ function kd(e, t) {
3657
3657
  fetchValues: ze,
3658
3658
  cancelUnsavedChanges: xt,
3659
3659
  clearAndReload: () => {
3660
- V.current = void 0, G(void 0), Be();
3660
+ N.current = void 0, G(void 0), Be();
3661
3661
  }
3662
- })), de(() => {
3662
+ })), ue(() => {
3663
3663
  if ($(void 0), !(!n && !m)) {
3664
3664
  if (!x) {
3665
- V.current = void 0, G(void 0);
3665
+ N.current = void 0, G(void 0);
3666
3666
  return;
3667
3667
  }
3668
- (r === void 0 && k || r !== void 0 && k && r < 0) && (V.current = void 0, G(void 0)), Be();
3668
+ (r === void 0 && k || r !== void 0 && k && r < 0) && (N.current = void 0, G(void 0)), Be();
3669
3669
  }
3670
- }, [r, n, h, m, x]), de(() => {
3671
- ne && (er({
3670
+ }, [r, n, h, m, x]), ue(() => {
3671
+ ie && (er({
3672
3672
  elementHasLostFocus: !0
3673
3673
  }), ee(!1));
3674
- }, [ne]);
3675
- const re = (U, K, se, le) => {
3676
- ce == null || ce(!1), Fe == null || Fe(!1), s == null || s(U, K, se, le), ue == null || ue(U), Ee.current && (T == null || T());
3674
+ }, [ie]);
3675
+ const ne = (U, K, se, le) => {
3676
+ ce == null || ce(!1), Fe == null || Fe(!1), s == null || s(U, K, se, le), fe == null || fe(U), Ee.current && (T == null || T());
3677
3677
  }, Oe = () => {
3678
3678
  Ee.current && (T == null || T()), Fe == null || Fe(!1), o == null || o();
3679
3679
  }, qe = (U) => {
3680
3680
  Fe == null || Fe(!1), u == null || u(U);
3681
3681
  };
3682
3682
  function pe() {
3683
- return r || V.current;
3683
+ return r || N.current;
3684
3684
  }
3685
3685
  function rt() {
3686
3686
  return k;
@@ -3734,7 +3734,7 @@ function kd(e, t) {
3734
3734
  });
3735
3735
  }, Ye = () => Object.keys(
3736
3736
  sr({
3737
- source: M.current,
3737
+ source: L.current,
3738
3738
  target: ke(k),
3739
3739
  fields: k
3740
3740
  })
@@ -3764,7 +3764,7 @@ function kd(e, t) {
3764
3764
  try {
3765
3765
  m ? U = { arch: m.arch, fields: m.fields } : U = await Zn();
3766
3766
  const { fields: K, arch: se } = U;
3767
- X(K), N(se), await ze({
3767
+ X(K), M(se), await ze({
3768
3768
  fields: K,
3769
3769
  arch: se
3770
3770
  });
@@ -3773,10 +3773,10 @@ function kd(e, t) {
3773
3773
  }
3774
3774
  }, ze = async (U) => {
3775
3775
  let K, se, le, Te;
3776
- we == null || we(!0), $(void 0), U != null && U.fields ? (se = U.fields, le = U.arch) : (se = k, le = L), h && (U == null ? void 0 : U.forceRefresh) !== !0 ? K = h : { values: K, defaultGetCalled: Te } = await da({
3776
+ 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({
3777
3777
  fields: se,
3778
3778
  arch: le
3779
- }), b && (K = { ...ud(b), ...K }), M.current = Wt(K, se), mt({
3779
+ }), b && (K = { ...ud(b), ...K }), L.current = Wt(K, se), mt({
3780
3780
  values: K,
3781
3781
  fields: se,
3782
3782
  reset: !0,
@@ -3819,7 +3819,7 @@ function kd(e, t) {
3819
3819
  value: Ca
3820
3820
  };
3821
3821
  });
3822
- le || (j.current = nr), W.setFields(xa);
3822
+ le || (E.current = nr), W.setFields(xa);
3823
3823
  }, da = async ({
3824
3824
  fields: U,
3825
3825
  arch: K
@@ -3855,7 +3855,7 @@ function kd(e, t) {
3855
3855
  const { callOnSubmitSucceed: K = !0 } = U || {};
3856
3856
  if (pe()) {
3857
3857
  const se = sr({
3858
- source: M.current,
3858
+ source: L.current,
3859
3859
  target: ke(k),
3860
3860
  fields: k
3861
3861
  });
@@ -3868,7 +3868,7 @@ function kd(e, t) {
3868
3868
  ...g,
3869
3869
  ...R == null ? void 0 : R.context
3870
3870
  }
3871
- }), M.current = ke(k);
3871
+ }), L.current = ke(k);
3872
3872
  } else {
3873
3873
  const se = ke(k), le = await P.getHandler().create({
3874
3874
  model: n,
@@ -3879,24 +3879,24 @@ function kd(e, t) {
3879
3879
  ...R == null ? void 0 : R.context
3880
3880
  }
3881
3881
  });
3882
- V.current = le, M.current = se;
3882
+ N.current = le, L.current = se;
3883
3883
  }
3884
- y && await y([pe()]), !v && K && (re == null || re(pe(), q(), Ae()));
3884
+ y && await y([pe()]), !v && K && (ne == null || ne(pe(), q(), Ae()));
3885
3885
  }, ua = async (U) => {
3886
3886
  const { callOnSubmitSucceed: K = !0 } = U || {};
3887
- !v && K && (re == null || re(pe(), q(), Ae()));
3887
+ !v && K && (ne == null || ne(pe(), q(), Ae()));
3888
3888
  }, In = async (U) => {
3889
3889
  let K = !1;
3890
3890
  const { callOnSubmitSucceed: se = !0 } = U || {};
3891
3891
  if (z.current = !0, $(void 0), Y.current && !Ye() && pe() && se) {
3892
- z.current = !1, ce == null || ce(!1), re == null || re(
3892
+ z.current = !1, ce == null || ce(!1), ne == null || ne(
3893
3893
  pe(),
3894
3894
  q(),
3895
3895
  Ae(),
3896
3896
  Y.current
3897
3897
  ), Y.current = !1;
3898
3898
  const le = pe();
3899
- return d && (V.current = void 0, mt({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: le };
3899
+ return d && (N.current = void 0, mt({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: le };
3900
3900
  }
3901
3901
  if (!Ye() && pe() && se)
3902
3902
  return z.current = !1, ce == null || ce(!1), Oe == null || Oe(), { succeed: !0, id: pe() };
@@ -3904,7 +3904,7 @@ function kd(e, t) {
3904
3904
  return z.current = !1, Mo(A), { succeed: !1, id: pe() };
3905
3905
  F(!0), Fe == null || Fe(!0);
3906
3906
  try {
3907
- p === "api" ? await go(U) : await ua(U), d && (V.current = void 0, mt({ values: {}, fields: k, reset: !0 })), await ze({ forceRefresh: !0 }), K = !0, or.success(A("savedRegisters"));
3907
+ 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(A("savedRegisters"));
3908
3908
  } catch (le) {
3909
3909
  z.current = !1, F(!1), Fe == null || Fe(!1), qe == null || qe(le), or.error(A("errorWhileSavingForm")), $(le != null && le.message ? le.message : le);
3910
3910
  } finally {
@@ -3948,7 +3948,7 @@ function kd(e, t) {
3948
3948
  if (z.current)
3949
3949
  return;
3950
3950
  const K = sr({
3951
- source: j.current,
3951
+ source: E.current,
3952
3952
  target: ke(k),
3953
3953
  fields: k
3954
3954
  }), se = Object.keys(K);
@@ -3968,7 +3968,7 @@ function kd(e, t) {
3968
3968
  ]
3969
3969
  }) && U !== !0)) {
3970
3970
  const le = Wt(W.getFieldsValue(!0), k);
3971
- j.current = le, c == null || c(le), ce == null || ce(!0), ma(se);
3971
+ E.current = le, c == null || c(le), ce == null || ce(!0), ma(se);
3972
3972
  }
3973
3973
  }, fa = ul(er, 100), ma = async (U) => {
3974
3974
  try {
@@ -3984,7 +3984,7 @@ function kd(e, t) {
3984
3984
  if (!K) {
3985
3985
  fn({
3986
3986
  fields: k,
3987
- arch: L,
3987
+ arch: j,
3988
3988
  values: ke(k)
3989
3989
  });
3990
3990
  return;
@@ -4016,7 +4016,7 @@ function kd(e, t) {
4016
4016
  });
4017
4017
  fn({
4018
4018
  fields: k,
4019
- arch: L,
4019
+ arch: j,
4020
4020
  values: Qe
4021
4021
  }), mt({
4022
4022
  values: Qe,
@@ -4024,10 +4024,10 @@ function kd(e, t) {
4024
4024
  reset: !1
4025
4025
  });
4026
4026
  }
4027
- if (le.warning && le.warning.title && le.warning.message && !fe.current) {
4027
+ if (le.warning && le.warning.title && le.warning.message && !de.current) {
4028
4028
  const { title: Te, message: Qe } = le.warning;
4029
- fe.current = !0, Fd(Te, Qe, () => {
4030
- fe.current = !1;
4029
+ de.current = !0, Fd(Te, Qe, () => {
4030
+ de.current = !1;
4031
4031
  });
4032
4032
  }
4033
4033
  if (le.domain && Object.keys(le.domain).length > 0) {
@@ -4037,7 +4037,7 @@ function kd(e, t) {
4037
4037
  });
4038
4038
  fn({
4039
4039
  fields: Te,
4040
- arch: L,
4040
+ arch: j,
4041
4041
  values: ke(Te)
4042
4042
  }), X(Te);
4043
4043
  }
@@ -4057,9 +4057,9 @@ function kd(e, t) {
4057
4057
  }
4058
4058
  });
4059
4059
  if (typeof se == "object" && se !== null && Object.keys(se).length === 0 && v)
4060
- re == null || re(pe(), q(), Ae());
4060
+ ne == null || ne(pe(), q(), Ae());
4061
4061
  else if (se.type && se.type === "ir.actions.act_window_close")
4062
- re == null || re(pe(), q(), Ae());
4062
+ ne == null || ne(pe(), q(), Ae());
4063
4063
  else if (se.type) {
4064
4064
  let le = {};
4065
4065
  se.context && (le = Et({
@@ -4079,7 +4079,7 @@ function kd(e, t) {
4079
4079
  action: U,
4080
4080
  payload: pe()
4081
4081
  });
4082
- K.type && K.type === "ir.actions.act_window_close" ? re == null || re(pe(), q(), Ae()) : await ze({ forceRefresh: !0 });
4082
+ K.type && K.type === "ir.actions.act_window_close" ? ne == null || ne(pe(), q(), Ae()) : await ze({ forceRefresh: !0 });
4083
4083
  }
4084
4084
  async function ya({
4085
4085
  action: U,
@@ -4109,7 +4109,7 @@ function kd(e, t) {
4109
4109
  Ee.current = !0, await ze({ forceRefresh: !0 });
4110
4110
  }
4111
4111
  })) || {};
4112
- !I && se && (re == null || re(pe(), q(), Ae()));
4112
+ !I && se && (ne == null || ne(pe(), q(), Ae()));
4113
4113
  }
4114
4114
  function va() {
4115
4115
  er({ elementHasLostFocus: !0 });
@@ -4117,7 +4117,7 @@ function kd(e, t) {
4117
4117
  function tr(U) {
4118
4118
  fn({
4119
4119
  fields: k,
4120
- arch: L,
4120
+ arch: j,
4121
4121
  values: ke(k),
4122
4122
  operationInProgress: U
4123
4123
  });
@@ -4180,14 +4180,14 @@ function kd(e, t) {
4180
4180
  }
4181
4181
  )
4182
4182
  }
4183
- ) }), Sa = () => /* @__PURE__ */ E(ae, { children: [
4183
+ ) }), Sa = () => /* @__PURE__ */ D(ae, { children: [
4184
4184
  /* @__PURE__ */ i(Ln, {}),
4185
- /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ E(Xe, { children: [
4185
+ /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ D(Xe, { children: [
4186
4186
  /* @__PURE__ */ i(
4187
4187
  je,
4188
4188
  {
4189
4189
  icon: /* @__PURE__ */ i(nn, {}),
4190
- disabled: D,
4190
+ disabled: V,
4191
4191
  onClick: async () => {
4192
4192
  await xt();
4193
4193
  },
@@ -4197,8 +4197,8 @@ function kd(e, t) {
4197
4197
  /* @__PURE__ */ i(
4198
4198
  je,
4199
4199
  {
4200
- disabled: D || f,
4201
- loading: D,
4200
+ disabled: V || f,
4201
+ loading: V,
4202
4202
  icon: /* @__PURE__ */ i(Bn, {}),
4203
4203
  onClick: async () => {
4204
4204
  await In();
@@ -4217,7 +4217,7 @@ function kd(e, t) {
4217
4217
  var K;
4218
4218
  H((K = U.bounds) == null ? void 0 : K.width);
4219
4219
  },
4220
- children: ({ measureRef: U }) => /* @__PURE__ */ E("div", { className: "pb-2", ref: U, children: [
4220
+ children: ({ measureRef: U }) => /* @__PURE__ */ D("div", { className: "pb-2", ref: U, children: [
4221
4221
  _ && /* @__PURE__ */ i(ts, { className: "mt-5 mb-10", error: _ }),
4222
4222
  ba(),
4223
4223
  a && Sa()
@@ -4236,7 +4236,7 @@ const cn = pt(kd), dn = (e) => {
4236
4236
  actionData: l,
4237
4237
  ...c
4238
4238
  } = e, { model: u } = c, { modalWidth: f } = qn(), [d, p] = S(r), [h, m] = S(!1), [y, v] = S(), { action_id: g, res_id: b, action_type: x, view_id: I } = l || {};
4239
- de(() => {
4239
+ ue(() => {
4240
4240
  a && w();
4241
4241
  }, [l, a]);
4242
4242
  async function w() {
@@ -4254,18 +4254,18 @@ const cn = pt(kd), dn = (e) => {
4254
4254
  shortcut_id: y
4255
4255
  });
4256
4256
  else {
4257
- const { action_id: A, res_id: D, action_type: F, view_id: _ } = l;
4257
+ const { action_id: A, res_id: V, action_type: F, view_id: _ } = l;
4258
4258
  await P.getHandler().addFavourite({
4259
4259
  action_id: A,
4260
4260
  action_type: F,
4261
4261
  view_id: _,
4262
- res_id: D || !1
4262
+ res_id: V || !1
4263
4263
  });
4264
4264
  }
4265
4265
  m(!h);
4266
4266
  }
4267
4267
  function C() {
4268
- return /* @__PURE__ */ E(Ne, { align: "middle", children: [
4268
+ return /* @__PURE__ */ D(Ne, { align: "middle", children: [
4269
4269
  /* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(
4270
4270
  je,
4271
4271
  {
@@ -4355,7 +4355,7 @@ const cn = pt(kd), dn = (e) => {
4355
4355
  label: ""
4356
4356
  })
4357
4357
  ];
4358
- return /* @__PURE__ */ E(ae, { children: [
4358
+ return /* @__PURE__ */ D(ae, { children: [
4359
4359
  n && /* @__PURE__ */ i(
4360
4360
  Kn,
4361
4361
  {
@@ -4368,7 +4368,7 @@ const cn = pt(kd), dn = (e) => {
4368
4368
  align: "left"
4369
4369
  }
4370
4370
  ),
4371
- /* @__PURE__ */ E(Ne, { align: "bottom", className: "p-0", children: [
4371
+ /* @__PURE__ */ D(Ne, { align: "bottom", className: "p-0", children: [
4372
4372
  /* @__PURE__ */ i(be, { className: "mr-2", children: /* @__PURE__ */ i(Re, { ...e, ooui: a[0], showLabel: !1, children: /* @__PURE__ */ i(
4373
4373
  Mr.RangePicker,
4374
4374
  {
@@ -4384,7 +4384,7 @@ const cn = pt(kd), dn = (e) => {
4384
4384
  }, Ld = ({
4385
4385
  value: e,
4386
4386
  onChange: t
4387
- }) => /* @__PURE__ */ E("div", { style: { marginTop: 5 }, children: [
4387
+ }) => /* @__PURE__ */ D("div", { style: { marginTop: 5 }, children: [
4388
4388
  /* @__PURE__ */ i(
4389
4389
  xr,
4390
4390
  {
@@ -4410,7 +4410,7 @@ const cn = pt(kd), dn = (e) => {
4410
4410
  }
4411
4411
  )
4412
4412
  ] }), { useToken: jd } = Ge, us = (e) => {
4413
- const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: s } = t, { token: a } = jd(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = oe(He), { elementHasLostFocus: u } = c || {};
4413
+ const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: s } = t, { token: a } = jd(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = re(He), { elementHasLostFocus: u } = c || {};
4414
4414
  return /* @__PURE__ */ i(Re, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4415
4415
  Ci,
4416
4416
  {
@@ -4426,7 +4426,7 @@ const cn = pt(kd), dn = (e) => {
4426
4426
  }
4427
4427
  ) });
4428
4428
  }, { useToken: Bd } = Ge, $n = (e) => {
4429
- const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: s } = t, { token: a } = Bd(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = oe(He), { elementHasLostFocus: u } = c || {};
4429
+ const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: s } = t, { token: a } = Bd(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = re(He), { elementHasLostFocus: u } = c || {};
4430
4430
  return /* @__PURE__ */ i(Re, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4431
4431
  Ci,
4432
4432
  {
@@ -4458,7 +4458,7 @@ function Hd(e) {
4458
4458
  layout: "vertical"
4459
4459
  }
4460
4460
  );
4461
- return /* @__PURE__ */ E("div", { style: { width: "100%" }, children: [
4461
+ return /* @__PURE__ */ D("div", { style: { width: "100%" }, children: [
4462
4462
  n && /* @__PURE__ */ i(
4463
4463
  Kn,
4464
4464
  {
@@ -4471,7 +4471,7 @@ function Hd(e) {
4471
4471
  align: "left"
4472
4472
  }
4473
4473
  ),
4474
- /* @__PURE__ */ E(
4474
+ /* @__PURE__ */ D(
4475
4475
  Ne,
4476
4476
  {
4477
4477
  align: "bottom",
@@ -4566,12 +4566,12 @@ function fs(e) {
4566
4566
  }
4567
4567
  function Jd(e) {
4568
4568
  const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: r, isSearching: o } = e, { t: s } = he();
4569
- return /* @__PURE__ */ E(Ne, { children: [
4570
- /* @__PURE__ */ i(be, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ E("a", { className: "text-xs", onClick: t, children: [
4569
+ return /* @__PURE__ */ D(Ne, { children: [
4570
+ /* @__PURE__ */ i(be, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ D("a", { className: "text-xs", onClick: t, children: [
4571
4571
  n ? /* @__PURE__ */ i(Wa, { className: "pr-1" }) : /* @__PURE__ */ i(jn, { className: "pr-1" }),
4572
4572
  s(n ? "simple_search" : "advanced_search")
4573
4573
  ] }) }),
4574
- /* @__PURE__ */ E(be, { span: 12, className: "text-right pb-2", children: [
4574
+ /* @__PURE__ */ D(be, { span: 12, className: "text-right pb-2", children: [
4575
4575
  /* @__PURE__ */ i(je, { className: "mr-5", icon: /* @__PURE__ */ i(Hn, {}), onClick: r, children: s("clear") }),
4576
4576
  /* @__PURE__ */ i(
4577
4577
  je,
@@ -4589,9 +4589,9 @@ function Jd(e) {
4589
4589
  }
4590
4590
  function Xd(e) {
4591
4591
  const { onLimitChange: t } = e, { t: n } = he(), r = new wr({ name: "limit" }), o = new wr({ name: "offset" });
4592
- return /* @__PURE__ */ E("div", { className: "pl-2 pt-2", children: [
4592
+ return /* @__PURE__ */ D("div", { className: "pl-2 pt-2", children: [
4593
4593
  /* @__PURE__ */ i(Ne, { children: n("parameters") }, "count_params"),
4594
- /* @__PURE__ */ E(Xe, { align: "center", children: [
4594
+ /* @__PURE__ */ D(Xe, { align: "center", children: [
4595
4595
  n("limit") + " :",
4596
4596
  /* @__PURE__ */ i(
4597
4597
  $n,
@@ -4697,38 +4697,38 @@ function ms(e) {
4697
4697
  searchValues: p,
4698
4698
  showLimitOptions: h = !0
4699
4699
  } = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1), I = Q(), { token: w } = iu(), [O] = ut.useForm();
4700
- de(() => {
4700
+ ue(() => {
4701
4701
  O.setFieldsValue(p);
4702
4702
  }, [p]);
4703
4703
  const C = () => {
4704
4704
  if (!v)
4705
4705
  return;
4706
- const D = b ? v : m, F = D == null ? void 0 : D.rows;
4706
+ const V = b ? v : m, F = V == null ? void 0 : V.rows;
4707
4707
  return F == null ? void 0 : F.map((_, $) => /* @__PURE__ */ i(Ne, { children: _.map((R, G) => /* @__PURE__ */ i(be, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(fs, { field: R }) }, G)) }, $));
4708
4708
  };
4709
4709
  yt(() => {
4710
4710
  x(!1), I.current = new Di(n, t), I.current.parse(), y(I.current._simpleSearchContainer), g(I.current._advancedSearchContainer);
4711
4711
  }, [t, n]);
4712
- const T = C(), A = (D) => {
4712
+ const T = C(), A = (V) => {
4713
4713
  var R;
4714
- const { limit: F, offset: _ } = D;
4715
- delete D.offset, delete D.limit;
4714
+ const { limit: F, offset: _ } = V;
4715
+ delete V.offset, delete V.limit;
4716
4716
  const $ = Rn(
4717
- D,
4717
+ V,
4718
4718
  (R = I.current) == null ? void 0 : R._advancedSearchContainer
4719
4719
  );
4720
- o({ params: $, offset: _, limit: F, searchValues: D });
4720
+ o({ params: $, offset: _, limit: F, searchValues: V });
4721
4721
  };
4722
4722
  return /* @__PURE__ */ i(
4723
4723
  Jr,
4724
4724
  {
4725
4725
  bounds: !0,
4726
- onResize: (D) => {
4726
+ onResize: (V) => {
4727
4727
  var F;
4728
- f == null || f((F = D.bounds) == null ? void 0 : F.height);
4728
+ f == null || f((F = V.bounds) == null ? void 0 : F.height);
4729
4729
  },
4730
- children: ({ measureRef: D }) => /* @__PURE__ */ i("div", { ref: D, children: /* @__PURE__ */ E("div", { style: { display: u ? "block" : "none" }, children: [
4731
- /* @__PURE__ */ E(
4730
+ children: ({ measureRef: V }) => /* @__PURE__ */ i("div", { ref: V, children: /* @__PURE__ */ D("div", { style: { display: u ? "block" : "none" }, children: [
4731
+ /* @__PURE__ */ D(
4732
4732
  ut,
4733
4733
  {
4734
4734
  className: "p-3 shadow-md",
@@ -4815,7 +4815,7 @@ const Bo = (e, t = "14px -apple-system") => {
4815
4815
  return null;
4816
4816
  const u = async (p) => {
4817
4817
  p.preventDefault(), p.stopPropagation(), a(!0), await r(), a(!1);
4818
- }, f = /* @__PURE__ */ E("span", { children: [
4818
+ }, f = /* @__PURE__ */ D("span", { children: [
4819
4819
  c.recordsSelected.replace(
4820
4820
  "{numberOfSelectedRows}",
4821
4821
  e.toString()
@@ -4866,7 +4866,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
4866
4866
  maximumFractionDigits: 4,
4867
4867
  useGrouping: !1
4868
4868
  })}%`;
4869
- return /* @__PURE__ */ E("div", { style: { flex: 1, display: "flex", alignItems: "center" }, children: [
4869
+ return /* @__PURE__ */ D("div", { style: { flex: 1, display: "flex", alignItems: "center" }, children: [
4870
4870
  /* @__PURE__ */ i(uu, { percent: e }),
4871
4871
  /* @__PURE__ */ i("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: t })
4872
4872
  ] });
@@ -4918,7 +4918,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
4918
4918
  }
4919
4919
  ];
4920
4920
  }, [l, e]);
4921
- return /* @__PURE__ */ E(Jt, { children: [
4921
+ return /* @__PURE__ */ D(Jt, { children: [
4922
4922
  /* @__PURE__ */ i(
4923
4923
  il,
4924
4924
  {
@@ -4955,9 +4955,9 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
4955
4955
  )
4956
4956
  ] });
4957
4957
  }, so = (e) => {
4958
- const { id: t, model: n, context: r = {} } = e, [o, s] = S(), [a, l] = S(), c = oe(
4958
+ const { id: t, model: n, context: r = {} } = e, [o, s] = S(), [a, l] = S(), c = re(
4959
4959
  wt
4960
- ), { openRelate: u } = c || {}, f = oe(
4960
+ ), { openRelate: u } = c || {}, f = re(
4961
4961
  ln
4962
4962
  ), { processAction: d } = f || {}, [p, h] = Je(
4963
4963
  P.getHandler().getView
@@ -5044,7 +5044,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5044
5044
  ];
5045
5045
  }, pu = (e) => {
5046
5046
  const { m2oField: t } = e;
5047
- return t ? /* @__PURE__ */ E(Xe, { children: [
5047
+ return t ? /* @__PURE__ */ D(Xe, { children: [
5048
5048
  /* @__PURE__ */ i(ae, { children: t.value }),
5049
5049
  /* @__PURE__ */ i(so, { id: t.id, model: t.model })
5050
5050
  ] }) : /* @__PURE__ */ i(ae, {});
@@ -5061,14 +5061,14 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5061
5061
  });
5062
5062
  s(h[0][1]), l(!1);
5063
5063
  }, [t, o]);
5064
- if (de(() => {
5064
+ if (ue(() => {
5065
5065
  d();
5066
5066
  }, [t]), !t && !a)
5067
5067
  return /* @__PURE__ */ i(ae, {});
5068
5068
  if (a)
5069
5069
  return /* @__PURE__ */ i(gt, {});
5070
5070
  const p = r.get(c);
5071
- return /* @__PURE__ */ E(Xe, { children: [
5071
+ return /* @__PURE__ */ D(Xe, { children: [
5072
5072
  /* @__PURE__ */ i(ae, { children: `${p}:` }),
5073
5073
  /* @__PURE__ */ i(ae, { children: o }),
5074
5074
  /* @__PURE__ */ i(so, { id: f, model: c })
@@ -5239,7 +5239,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5239
5239
  l(!1);
5240
5240
  }
5241
5241
  }, [r, u, c, e == null ? void 0 : e.items]);
5242
- de(() => {
5242
+ ue(() => {
5243
5243
  e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
5244
5244
  }, [e == null ? void 0 : e.items]);
5245
5245
  const d = ye(
@@ -5280,7 +5280,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5280
5280
  tags: Vu
5281
5281
  }, ys = pt(
5282
5282
  (e, t) => {
5283
- var M;
5283
+ var L;
5284
5284
  const {
5285
5285
  page: n = 1,
5286
5286
  limit: r,
@@ -5304,9 +5304,9 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5304
5304
  context: w,
5305
5305
  readonly: O,
5306
5306
  onSelectAllRecords: C
5307
- } = e, T = Q(null), [A, D] = S([]), F = Q(!1), [_, $] = S(), { t: R } = he(), G = Q(r), W = oe(
5307
+ } = e, T = Q(null), [A, V] = S([]), F = Q(!1), [_, $] = S(), { t: R } = he(), G = Q(r), W = re(
5308
5308
  lt
5309
- ), { title: L = void 0, setTitle: N = void 0 } = (I ? W : {}) || {}, k = ye(() => {
5309
+ ), { title: j = void 0, setTitle: M = void 0 } = (I ? W : {}) || {}, k = ye(() => {
5310
5310
  if (_)
5311
5311
  return Zr(
5312
5312
  _,
@@ -5318,28 +5318,28 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5318
5318
  }, [w, _]);
5319
5319
  ht(t, () => ({
5320
5320
  unselectAll: () => {
5321
- var j;
5322
- (j = T.current) == null || j.unselectAll();
5321
+ var E;
5322
+ (E = T.current) == null || E.unselectAll();
5323
5323
  }
5324
- })), de(() => {
5325
- const j = Ot(s);
5326
- $(j), j.string && L !== j.string && (N == null || N(j.string));
5327
- }, [s, L]), de(() => {
5324
+ })), ue(() => {
5325
+ const E = Ot(s);
5326
+ $(E), E.string && j !== E.string && (M == null || M(E.string));
5327
+ }, [s, j]), ue(() => {
5328
5328
  if (!_)
5329
5329
  return;
5330
5330
  F.current = !1;
5331
- const j = zn(_, a);
5332
- D(j);
5333
- }, [a]), de(() => {
5331
+ const E = zn(_, a);
5332
+ V(E);
5333
+ }, [a]), ue(() => {
5334
5334
  G.current = r;
5335
5335
  }, [r]);
5336
- const X = (n - 1) * G.current + 1, te = X - 1 + A.length, ie = 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(() => {
5336
+ const X = (n - 1) * G.current + 1, te = X - 1 + A.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
5337
  if (!f || s.isExpandable)
5338
5338
  return null;
5339
- const j = A == null ? void 0 : A.filter(
5340
- (fe) => d && d.includes(fe.id)
5339
+ const E = A == null ? void 0 : A.filter(
5340
+ (de) => d && d.includes(de.id)
5341
5341
  ).length;
5342
- return c ? null : o === void 0 ? /* @__PURE__ */ i(We, { className: "pb-4" }) : /* @__PURE__ */ E(Ne, { align: "bottom", className: "pb-4", children: [
5342
+ return c ? null : o === void 0 ? /* @__PURE__ */ i(We, { className: "pb-4" }) : /* @__PURE__ */ D(Ne, { align: "bottom", className: "pb-4", children: [
5343
5343
  /* @__PURE__ */ i(be, { span: C ? 8 : 12, children: /* @__PURE__ */ i(
5344
5344
  Da,
5345
5345
  {
@@ -5353,14 +5353,14 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5353
5353
  C && /* @__PURE__ */ i(be, { span: 8, className: "text-center", children: /* @__PURE__ */ i(
5354
5354
  lu,
5355
5355
  {
5356
- numberOfVisibleSelectedRows: j,
5356
+ numberOfVisibleSelectedRows: E,
5357
5357
  numberOfRealSelectedRows: (d == null ? void 0 : d.length) || 0,
5358
5358
  numberOfTotalRows: A.length,
5359
5359
  totalRecords: o || 0,
5360
5360
  onSelectAllRecords: C
5361
5361
  }
5362
5362
  ) }),
5363
- /* @__PURE__ */ i(be, { span: C ? 8 : 12, className: "text-right", children: ie })
5363
+ /* @__PURE__ */ i(be, { span: C ? 8 : 12, className: "text-right", children: oe })
5364
5364
  ] });
5365
5365
  }, [
5366
5366
  A,
@@ -5370,42 +5370,42 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5370
5370
  n,
5371
5371
  d,
5372
5372
  f,
5373
- ie,
5373
+ oe,
5374
5374
  o,
5375
5375
  s.isExpandable
5376
- ]), ne = ye(() => {
5376
+ ]), ie = ye(() => {
5377
5377
  if (!_)
5378
5378
  return null;
5379
- const j = _.columns.filter((Y) => Y.sum !== void 0).map((Y) => ({ label: Y.sum, field: Y.id }));
5380
- if (!j || j.length === 0)
5379
+ const E = _.columns.filter((Y) => Y.sum !== void 0).map((Y) => ({ label: Y.sum, field: Y.id }));
5380
+ if (!E || E.length === 0)
5381
5381
  return null;
5382
- const fe = [], z = (d == null ? void 0 : d.length) > 0 ? A.filter((Y) => d.includes(Y.id)) : A;
5383
- return j.forEach((Y) => {
5382
+ const de = [], z = (d == null ? void 0 : d.length) > 0 ? A.filter((Y) => d.includes(Y.id)) : A;
5383
+ return E.forEach((Y) => {
5384
5384
  const me = z.reduce((ve, $e) => $e[Y.field] && !isNaN($e[Y.field]) ? ve + $e[Y.field] : ve, 0);
5385
- fe.push(`${Y.label}: ${Math.round(me * 100) / 100}`);
5386
- }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: fe.join(", ") });
5385
+ de.push(`${Y.label}: ${Math.round(me * 100) / 100}`);
5386
+ }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: de.join(", ") });
5387
5387
  }, [A, d, _]), ee = ye(() => {
5388
5388
  if (_ !== null && k && k.length > 0)
5389
5389
  return su(k, A, 600);
5390
- }, [k, A, _]), V = ye(() => h && (_ != null && _.columns.some((j) => j.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
5391
- return _ === null || !ee || ((M = ee == null ? void 0 : ee.columns) == null ? void 0 : M.length) === 0 ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : /* @__PURE__ */ E(Vn, { children: [
5390
+ }, [k, A, _]), N = ye(() => h && (_ != null && _.columns.some((E) => E.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
5391
+ 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: [
5392
5392
  H,
5393
5393
  /* @__PURE__ */ i(
5394
5394
  Tl,
5395
5395
  {
5396
5396
  ref: T,
5397
- height: V,
5397
+ height: N,
5398
5398
  columns: ee.columns,
5399
5399
  dataSource: A,
5400
5400
  loading: c,
5401
5401
  loadingComponent: /* @__PURE__ */ i(We, {}),
5402
- onRowStyle: (j) => {
5403
- if (m[j.id])
5404
- return { color: m[j.id] };
5402
+ onRowStyle: (E) => {
5403
+ if (m[E.id])
5404
+ return { color: m[E.id] };
5405
5405
  },
5406
- onRowStatus: bc(y) ? (j) => {
5407
- if (y[j.id])
5408
- return /* @__PURE__ */ i(Lr, { color: y[j.id] });
5406
+ onRowStatus: bc(y) ? (E) => {
5407
+ if (y[E.id])
5408
+ return /* @__PURE__ */ i(Lr, { color: y[E.id] });
5409
5409
  } : void 0,
5410
5410
  onRowDoubleClick: u,
5411
5411
  onRowSelectionChange: p,
@@ -5421,7 +5421,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
5421
5421
  } : void 0
5422
5422
  }
5423
5423
  ),
5424
- ne
5424
+ ie
5425
5425
  ] });
5426
5426
  }
5427
5427
  ), Sn = $r(ys);
@@ -5453,42 +5453,42 @@ const vs = (e) => {
5453
5453
  searchParams: O = [],
5454
5454
  setSearchValues: C,
5455
5455
  clearSelection: T
5456
- } = e, [A, D] = S(!1), [F, _] = S(!1), [$, R] = S(), [G, W] = S(1), [L, N] = S(0), [k, X] = S(), [te, ie] = S([]), [H, ne] = S(void 0), [ee, V] = S(void 0), M = Q(I || $t), j = Q([]), fe = B(
5456
+ } = e, [A, 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(
5457
5457
  (ce) => {
5458
- v == null || v([...ce]), ie([...ce]);
5458
+ v == null || v([...ce]), oe([...ce]);
5459
5459
  },
5460
5460
  [v]
5461
5461
  ), z = B(() => g || te, [g, te]), Y = B(async () => {
5462
5462
  const ce = await P.getHandler().nameSearch({
5463
5463
  model: t,
5464
5464
  payload: l,
5465
- limit: M.current,
5465
+ limit: L.current,
5466
5466
  attrs: b,
5467
5467
  context: u
5468
5468
  });
5469
5469
  if (X(ce.length), f == null || f(ce.length), ce.length > 0) {
5470
- const ue = ce.map((re) => re == null ? void 0 : re[0]), { colors: we, status: _e } = Ot(d), J = {};
5470
+ const fe = ce.map((ne) => ne == null ? void 0 : ne[0]), { colors: we, status: _e } = Ot(d), J = {};
5471
5471
  we && (J.colors = we), _e && (J.status = _e);
5472
5472
  const Ce = await P.getHandler().readEvalUiObjects({
5473
5473
  model: t,
5474
- ids: ue,
5474
+ ids: fe,
5475
5475
  arch: d == null ? void 0 : d.arch,
5476
5476
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
5477
5477
  context: u,
5478
5478
  attrs: J
5479
5479
  }), Se = Ce[0];
5480
- j.current = [...Se], ne(Qt(Ce[1])), V(Dn(Ce[1]));
5481
- const Ue = Se.map((re) => re.id), Me = h !== void 0 ? Yt({
5480
+ E.current = [...Se], ie(Qt(Ce[1])), N(Dn(Ce[1]));
5481
+ const Ue = Se.map((ne) => ne.id), Me = h !== void 0 ? Yt({
5482
5482
  resultsToSort: Se,
5483
5483
  sorter: h,
5484
5484
  fields: { ...d.fields, ...p.fields }
5485
- }) : [...j.current];
5486
- fe(Me), Ue.length > 0 ? y == null || y(0) : y == null || y(void 0);
5485
+ }) : [...E.current];
5486
+ de(Me), Ue.length > 0 ? y == null || y(0) : y == null || y(void 0);
5487
5487
  } else
5488
- fe([]), y == null || y(void 0);
5489
- D(!1), c.current = !0;
5488
+ de([]), y == null || y(void 0);
5489
+ V(!1), c.current = !0;
5490
5490
  }, [
5491
- fe,
5491
+ de,
5492
5492
  c,
5493
5493
  l,
5494
5494
  t,
@@ -5501,38 +5501,38 @@ const vs = (e) => {
5501
5501
  f
5502
5502
  ]), me = B(
5503
5503
  async (ce) => {
5504
- const { params: ue, newOffset: we } = ce || {}, _e = Zt(ue || O, b), { colors: J, status: Ce } = Ot(d), Se = {};
5504
+ const { params: fe, newOffset: we } = ce || {}, _e = Zt(fe || O, b), { colors: J, status: Ce } = Ot(d), Se = {};
5505
5505
  J && (Se.colors = J), Ce && (Se.status = Ce);
5506
- const { totalItems: Ue, results: Me, attrsEvaluated: re } = await P.getHandler().searchForTree({
5506
+ const { totalItems: Ue, results: Me, attrsEvaluated: ne } = await P.getHandler().searchForTree({
5507
5507
  params: _e,
5508
- limit: M.current,
5509
- offset: we || L,
5508
+ limit: L.current,
5509
+ offset: we || j,
5510
5510
  model: t,
5511
5511
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
5512
5512
  context: u,
5513
5513
  attrs: Se
5514
5514
  });
5515
- ne(Qt(re)), V(Dn(re)), j.current = [...Me];
5515
+ ie(Qt(ne)), N(Dn(ne)), E.current = [...Me];
5516
5516
  const Oe = h !== void 0 ? Yt({
5517
5517
  resultsToSort: Me,
5518
5518
  sorter: h,
5519
5519
  fields: { ...d.fields, ...p.fields }
5520
- }) : [...j.current];
5521
- if (fe(Oe), g && Oe.length > 0) {
5520
+ }) : [...E.current];
5521
+ if (de(Oe), g && Oe.length > 0) {
5522
5522
  const pe = Oe.findIndex(
5523
5523
  (rt) => x === rt.id
5524
5524
  );
5525
5525
  pe === -1 ? y == null || y(0) : y == null || y(pe);
5526
5526
  } else
5527
5527
  y == null || y(void 0);
5528
- D(!1);
5528
+ V(!1);
5529
5529
  const qe = await Ue();
5530
5530
  X(qe), f == null || f(qe);
5531
5531
  },
5532
5532
  [
5533
5533
  y,
5534
5534
  g,
5535
- fe,
5535
+ de,
5536
5536
  x,
5537
5537
  t,
5538
5538
  u,
@@ -5541,15 +5541,15 @@ const vs = (e) => {
5541
5541
  p,
5542
5542
  h,
5543
5543
  f,
5544
- L,
5544
+ j,
5545
5545
  O
5546
5546
  ]
5547
5547
  ), ve = B(
5548
5548
  async (ce) => {
5549
5549
  try {
5550
- D(!0), a == null || a(!0), l && !c.current ? await Y() : await me(ce), T == null || T();
5551
- } catch (ue) {
5552
- R(typeof ue == "string" ? ue : ue.message), D(!1);
5550
+ V(!0), a == null || a(!0), l && !c.current ? await Y() : await me(ce), T == null || T();
5551
+ } catch (fe) {
5552
+ R(typeof fe == "string" ? fe : fe.message), V(!1);
5553
5553
  } finally {
5554
5554
  r == null || r([]), _(!1), a == null || a(!1);
5555
5555
  }
@@ -5568,12 +5568,12 @@ const vs = (e) => {
5568
5568
  if (JSON.stringify(ce) === JSON.stringify(h))
5569
5569
  return;
5570
5570
  m == null || m(ce);
5571
- const ue = ce !== void 0 ? Yt({
5571
+ const fe = ce !== void 0 ? Yt({
5572
5572
  resultsToSort: z(),
5573
5573
  sorter: ce,
5574
5574
  fields: { ...d.fields, ...p.fields }
5575
- }) : [...j.current];
5576
- fe(ue);
5575
+ }) : [...E.current];
5576
+ de(fe);
5577
5577
  },
5578
5578
  [
5579
5579
  h,
@@ -5581,13 +5581,13 @@ const vs = (e) => {
5581
5581
  z,
5582
5582
  d == null ? void 0 : d.fields,
5583
5583
  p == null ? void 0 : p.fields,
5584
- fe
5584
+ de
5585
5585
  ]
5586
5586
  ), Le = B(
5587
5587
  (ce) => {
5588
- const { params: ue, searchValues: we, limit: _e, offset: J } = ce;
5589
- A || (n == null || n(void 0), r == null || r([]), C == null || C(we), o == null || o(ue), s == null || s(!1), _(!0), R(void 0), W(1), _e && (M.current = _e, w == null || w(_e)), J && N(J), ve({
5590
- params: ue,
5588
+ const { params: fe, searchValues: we, limit: _e, offset: J } = ce;
5589
+ A || (n == null || n(void 0), r == null || r([]), C == null || C(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({
5590
+ params: fe,
5591
5591
  newOffset: J
5592
5592
  }));
5593
5593
  },
@@ -5603,11 +5603,11 @@ const vs = (e) => {
5603
5603
  ]
5604
5604
  ), Ie = B(
5605
5605
  (ce) => {
5606
- D(!0), W(ce), N((ce - 1) * I);
5606
+ V(!0), W(ce), M((ce - 1) * I);
5607
5607
  },
5608
- [D, I, N, W]
5608
+ [V, I, M, W]
5609
5609
  ), Ee = B(() => {
5610
- A || (n == null || n(void 0), o == null || o([]), C == null || C({}), R(void 0), N(0), W(1), w == null || w(I || $t));
5610
+ A || (n == null || n(void 0), o == null || o([]), C == null || C({}), R(void 0), M(0), W(1), w == null || w(I || $t));
5611
5611
  }, [
5612
5612
  A,
5613
5613
  n,
@@ -5617,15 +5617,15 @@ const vs = (e) => {
5617
5617
  I
5618
5618
  ]), Ke = B(
5619
5619
  async (ce) => {
5620
- const ue = ce[(d == null ? void 0 : d.field_parent) || "child_id"], we = await P.getHandler().readObjects({
5620
+ const fe = ce[(d == null ? void 0 : d.field_parent) || "child_id"], we = await P.getHandler().readObjects({
5621
5621
  model: t,
5622
- ids: ue,
5622
+ ids: fe,
5623
5623
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
5624
5624
  context: u
5625
5625
  });
5626
- return fe([...z(), ...we]), zn(Ot(d), we);
5626
+ return de([...z(), ...we]), zn(Ot(d), we);
5627
5627
  },
5628
- [d, t, u, z, fe]
5628
+ [d, t, u, z, de]
5629
5629
  ), Fe = B(async () => await P.getHandler().searchAllIds({
5630
5630
  params: Zt(O, b),
5631
5631
  model: t,
@@ -5640,8 +5640,8 @@ const vs = (e) => {
5640
5640
  searchFilterLoading: F,
5641
5641
  searchError: $,
5642
5642
  page: G,
5643
- offset: L,
5644
- limit: M.current,
5643
+ offset: j,
5644
+ limit: L.current,
5645
5645
  getResults: z,
5646
5646
  requestPageChange: Ie,
5647
5647
  changeSort: $e,
@@ -5666,23 +5666,23 @@ function Du(e, t) {
5666
5666
  rootTree: f = !1,
5667
5667
  parentContext: d = {},
5668
5668
  onChangeSelectedRowKeys: p
5669
- } = e, [h, m] = S(!1), [y, v] = S(!1), g = Q(!1), b = Q(null), [x, I] = S(), [w, O] = S(), [C, T] = S(), [A, D] = S(), [F, _] = S(200), $ = Q(), { height: R } = qn(), G = oe(
5669
+ } = e, [h, m] = S(!1), [y, v] = S(!1), g = Q(!1), b = Q(null), [x, I] = S(), [w, O] = S(), [C, T] = S(), [A, V] = S(), [F, _] = S(200), $ = Q(), { height: R } = qn(), G = re(
5670
5670
  ln
5671
- ), { processAction: W } = G || {}, L = oe(
5671
+ ), { processAction: W } = G || {}, j = re(
5672
5672
  lt
5673
5673
  ), {
5674
- setResults: N = void 0,
5674
+ setResults: M = void 0,
5675
5675
  setCurrentItemIndex: k = void 0,
5676
5676
  currentId: X = void 0,
5677
5677
  results: te = void 0,
5678
- selectedRowItems: ie = void 0,
5678
+ selectedRowItems: oe = void 0,
5679
5679
  setSelectedRowItems: H = void 0,
5680
- searchParams: ne = [],
5680
+ searchParams: ie = [],
5681
5681
  setSearchParams: ee = void 0,
5682
- searchVisible: V = !0,
5683
- setSearchVisible: M = void 0,
5684
- sorter: j = void 0,
5685
- setSorter: fe = void 0,
5682
+ searchVisible: N = !0,
5683
+ setSearchVisible: L = void 0,
5684
+ sorter: E = void 0,
5685
+ setSorter: de = void 0,
5686
5686
  setTotalItems: z = void 0,
5687
5687
  setSearchTreeNameSearch: Y = void 0,
5688
5688
  setTreeIsLoading: me = void 0,
@@ -5690,7 +5690,7 @@ function Du(e, t) {
5690
5690
  setSearchValues: $e = void 0,
5691
5691
  limit: Le = $t,
5692
5692
  setLimit: Ie = void 0
5693
- } = (f ? L : {}) || {}, Ee = B(
5693
+ } = (f ? j : {}) || {}, Ee = B(
5694
5694
  (Be) => {
5695
5695
  H == null || H(Be.map((ze) => ({ id: ze }))), p == null || p(Be);
5696
5696
  },
@@ -5699,7 +5699,7 @@ function Du(e, t) {
5699
5699
  submit: Ke,
5700
5700
  clear: Fe,
5701
5701
  fetchResults: ce,
5702
- tableRefreshing: ue,
5702
+ tableRefreshing: fe,
5703
5703
  searchFilterLoading: we,
5704
5704
  searchError: _e,
5705
5705
  page: J,
@@ -5707,7 +5707,7 @@ function Du(e, t) {
5707
5707
  offset: Se,
5708
5708
  getResults: Ue,
5709
5709
  requestPageChange: Me,
5710
- changeSort: re,
5710
+ changeSort: ne,
5711
5711
  fetchChildrenForRecord: Oe,
5712
5712
  colorsForResults: qe,
5713
5713
  statusForResults: pe,
@@ -5719,18 +5719,18 @@ function Du(e, t) {
5719
5719
  setSelectedRowItems: Ee,
5720
5720
  setSearchParams: ee,
5721
5721
  setSearchValues: $e,
5722
- searchParams: ne,
5723
- setSearchVisible: M,
5722
+ searchParams: ie,
5723
+ setSearchVisible: L,
5724
5724
  setTreeIsLoading: me,
5725
5725
  nameSearch: a,
5726
5726
  searchNameGetDoneRef: g,
5727
5727
  context: d,
5728
5728
  formView: C,
5729
5729
  treeView: w,
5730
- sorter: j,
5731
- setSorter: fe,
5730
+ sorter: E,
5731
+ setSorter: de,
5732
5732
  setCurrentItemIndex: k,
5733
- setResultsActionView: N,
5733
+ setResultsActionView: M,
5734
5734
  resultsActionView: te,
5735
5735
  domain: c,
5736
5736
  currentId: X,
@@ -5745,15 +5745,15 @@ function Du(e, t) {
5745
5745
  },
5746
5746
  getFields: () => w == null ? void 0 : w.fields,
5747
5747
  getDomain: () => c
5748
- })), de(() => {
5748
+ })), ue(() => {
5749
5749
  y && u && w && (g.current = !1, ce());
5750
5750
  }, [J, Se, y, u, a, w]);
5751
5751
  const ge = async () => {
5752
- v(!1), m(!0), D(void 0), me == null || me(!0);
5752
+ v(!1), m(!0), V(void 0), me == null || me(!0);
5753
5753
  try {
5754
5754
  await Ae(), v(!0);
5755
5755
  } catch (Be) {
5756
- D(Be), me == null || me(!1);
5756
+ V(Be), me == null || me(!1);
5757
5757
  } finally {
5758
5758
  m(!1);
5759
5759
  }
@@ -5772,7 +5772,7 @@ function Du(e, t) {
5772
5772
  context: d
5773
5773
  })), T(Be), O(ze);
5774
5774
  };
5775
- de(() => {
5775
+ ue(() => {
5776
5776
  ge();
5777
5777
  }, [n]);
5778
5778
  const xe = B(
@@ -5823,9 +5823,9 @@ function Du(e, t) {
5823
5823
  const Be = await q();
5824
5824
  H == null || H(Be.map((ze) => ({ id: ze }))), p == null || p(Be);
5825
5825
  }, [q, p, H]), Ye = ye(() => w != null && w.isExpandable ? R - 160 : R - (F + 240), [R, F, w == null ? void 0 : w.isExpandable]), ke = ye(
5826
- () => ie == null ? void 0 : ie.map((Be) => Be.id),
5827
- [ie]
5828
- ), ot = B(() => !w || !C ? null : /* @__PURE__ */ E(ae, { children: [
5826
+ () => oe == null ? void 0 : oe.map((Be) => Be.id),
5827
+ [oe]
5828
+ ), ot = B(() => !w || !C ? null : /* @__PURE__ */ D(ae, { children: [
5829
5829
  /* @__PURE__ */ i(
5830
5830
  ms,
5831
5831
  {
@@ -5842,7 +5842,7 @@ function Du(e, t) {
5842
5842
  onLimitChange: xe,
5843
5843
  setSearchFilterHeight: _,
5844
5844
  searchError: _e,
5845
- searchVisible: V,
5845
+ searchVisible: N,
5846
5846
  searchValues: ve
5847
5847
  }
5848
5848
  ),
@@ -5857,15 +5857,15 @@ function Du(e, t) {
5857
5857
  treeView: w,
5858
5858
  results: Ue(),
5859
5859
  onRequestPageChange: Me,
5860
- loading: ue,
5860
+ loading: fe,
5861
5861
  onRowClicked: Z,
5862
5862
  scrollY: l || Ye,
5863
5863
  colorsForResults: qe,
5864
5864
  statusForResults: pe,
5865
5865
  selectedRowKeys: ke,
5866
5866
  onRowSelectionChange: Ee,
5867
- sorter: j,
5868
- onChangeSort: re,
5867
+ sorter: E,
5868
+ onChangeSort: ne,
5869
5869
  onFetchChildrenForRecord: w.isExpandable ? Oe : void 0,
5870
5870
  childField: w.field_parent,
5871
5871
  rootTree: f,
@@ -5875,7 +5875,7 @@ function Du(e, t) {
5875
5875
  ] }), [
5876
5876
  Ye,
5877
5877
  Ee,
5878
- re,
5878
+ ne,
5879
5879
  Fe,
5880
5880
  qe,
5881
5881
  Oe,
@@ -5893,13 +5893,13 @@ function Du(e, t) {
5893
5893
  _e,
5894
5894
  we,
5895
5895
  ve,
5896
- V,
5896
+ N,
5897
5897
  Pe,
5898
5898
  ke,
5899
- j,
5899
+ E,
5900
5900
  pe,
5901
5901
  Ke,
5902
- ue,
5902
+ fe,
5903
5903
  rt,
5904
5904
  l,
5905
5905
  w
@@ -5963,7 +5963,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
5963
5963
  }
5964
5964
  g(h);
5965
5965
  }
5966
- const w = () => /* @__PURE__ */ E(ae, { children: [
5966
+ const w = () => /* @__PURE__ */ D(ae, { children: [
5967
5967
  /* @__PURE__ */ i(
5968
5968
  ws,
5969
5969
  {
@@ -5977,7 +5977,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
5977
5977
  }
5978
5978
  ),
5979
5979
  /* @__PURE__ */ i(Ln, {}),
5980
- /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ E(Xe, { children: [
5980
+ /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ D(Xe, { children: [
5981
5981
  /* @__PURE__ */ i(
5982
5982
  je,
5983
5983
  {
@@ -6004,7 +6004,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6004
6004
  /* @__PURE__ */ i(je, { icon: /* @__PURE__ */ i(nn, {}), onClick: b, children: p("cancel") })
6005
6005
  ] }) })
6006
6006
  ] });
6007
- return /* @__PURE__ */ E(ae, { children: [
6007
+ return /* @__PURE__ */ D(ae, { children: [
6008
6008
  /* @__PURE__ */ i(
6009
6009
  at,
6010
6010
  {
@@ -6053,20 +6053,20 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6053
6053
  context: l,
6054
6054
  id: c,
6055
6055
  domain: u
6056
- } = 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(""), O = Q(), C = oe(He), { domain: T, getValues: A, getFields: D, getContext: F, elementHasLostFocus: _ } = C || {}, $ = Q([]), [R, G] = S([]), W = t && t[0] || void 0, L = t && t[1] || "";
6057
- de(() => {
6058
- !Array.isArray(t) && t && ie(t);
6059
- }, [t]), de(() => {
6060
- W && L.length === 0 ? ie(W) : W && L.length > 0 ? w(L) : !W && !L && w(O.current || "");
6056
+ } = 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(""), O = Q(), C = re(He), { domain: T, getValues: A, getFields: V, getContext: F, elementHasLostFocus: _ } = C || {}, $ = Q([]), [R, G] = S([]), W = t && t[0] || void 0, j = t && t[1] || "";
6057
+ ue(() => {
6058
+ !Array.isArray(t) && t && oe(t);
6059
+ }, [t]), ue(() => {
6060
+ W && j.length === 0 ? oe(W) : W && j.length > 0 ? w(j) : !W && !j && w(O.current || "");
6061
6061
  }, [t]);
6062
- const N = (V) => {
6063
- n == null || n(V), _ == null || _();
6064
- }, k = (V) => {
6065
- O.current = V.target.value, N([void 0, ""]);
6062
+ const M = (N) => {
6063
+ n == null || n(N), _ == null || _();
6064
+ }, k = (N) => {
6065
+ O.current = N.target.value, M([void 0, ""]);
6066
6066
  }, X = async () => {
6067
- if (!y && I !== L) {
6068
- if (await new Promise((V) => setTimeout(V, 100)), x.current) {
6069
- N([void 0, ""]);
6067
+ if (!y && I !== j) {
6068
+ if (await new Promise((N) => setTimeout(N, 100)), x.current) {
6069
+ M([void 0, ""]);
6070
6070
  return;
6071
6071
  }
6072
6072
  v(!0);
@@ -6074,43 +6074,43 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6074
6074
  if ($.current && $.current.length > 0)
6075
6075
  te(O.current);
6076
6076
  else {
6077
- const V = await P.getHandler().nameSearch({
6077
+ const N = await P.getHandler().nameSearch({
6078
6078
  model: s,
6079
6079
  payload: O.current,
6080
6080
  context: { ...F == null ? void 0 : F(), ...l }
6081
6081
  });
6082
- V.length === 1 ? (O.current = void 0, N(V[0])) : te(O.current);
6082
+ N.length === 1 ? (O.current = void 0, M(N[0])) : te(O.current);
6083
6083
  }
6084
- } catch (V) {
6085
- Nt(V);
6084
+ } catch (N) {
6085
+ Nt(N);
6086
6086
  } finally {
6087
6087
  v(!1);
6088
6088
  }
6089
6089
  }
6090
- }, te = async (V) => {
6090
+ }, te = async (N) => {
6091
6091
  if (await H(), $.current && $.current.length > 0) {
6092
- const M = await P.getHandler().searchAllIds({
6092
+ const L = await P.getHandler().searchAllIds({
6093
6093
  params: $.current,
6094
6094
  model: s,
6095
6095
  context: { ...F == null ? void 0 : F(), ...l },
6096
6096
  totalItems: 2
6097
6097
  });
6098
- M.length === 1 ? ie(M[0]) : (b(V), p(!0));
6098
+ L.length === 1 ? oe(L[0]) : (b(N), p(!0));
6099
6099
  return;
6100
6100
  }
6101
- b(V), p(!0);
6102
- }, ie = async (V) => {
6101
+ b(N), p(!0);
6102
+ }, oe = async (N) => {
6103
6103
  v(!0);
6104
6104
  try {
6105
- const M = await P.getHandler().execute({
6105
+ const L = await P.getHandler().execute({
6106
6106
  action: "name_get",
6107
- payload: [V],
6107
+ payload: [N],
6108
6108
  model: s,
6109
6109
  context: { ...F == null ? void 0 : F(), ...l }
6110
6110
  });
6111
- N([V, M[0][1]]);
6112
- } catch (M) {
6113
- Nt(M);
6111
+ M([N, L[0][1]]);
6112
+ } catch (L) {
6113
+ Nt(L);
6114
6114
  } finally {
6115
6115
  v(!1);
6116
6116
  }
@@ -6119,10 +6119,10 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6119
6119
  u && ($.current = await P.getHandler().evalDomain({
6120
6120
  domain: u,
6121
6121
  values: Lt({
6122
- fields: D(),
6122
+ fields: V(),
6123
6123
  values: A()
6124
6124
  }),
6125
- fields: D(),
6125
+ fields: V(),
6126
6126
  context: F()
6127
6127
  })), T && T.length > 0 && ($.current = $.current.concat(
6128
6128
  Br({
@@ -6131,10 +6131,10 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6131
6131
  })
6132
6132
  )), G($.current);
6133
6133
  }
6134
- async function ne(V) {
6135
- V.keyCode === 13 ? (V.preventDefault(), V.stopPropagation(), await X()) : V.code === "Backspace" && W !== void 0 && (V.preventDefault(), V.stopPropagation(), N([void 0, ""]));
6134
+ async function ie(N) {
6135
+ N.keyCode === 13 ? (N.preventDefault(), N.stopPropagation(), await X()) : N.code === "Backspace" && W !== void 0 && (N.preventDefault(), N.stopPropagation(), M([void 0, ""]));
6136
6136
  }
6137
- return /* @__PURE__ */ E(Ne, { gutter: 8, wrap: !1, children: [
6137
+ return /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, children: [
6138
6138
  /* @__PURE__ */ i(be, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ i(
6139
6139
  o && !a ? Nu : ct,
6140
6140
  {
@@ -6148,7 +6148,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6148
6148
  borderBottomRightRadius: 0
6149
6149
  },
6150
6150
  onBlur: X,
6151
- onKeyDown: ne,
6151
+ onKeyDown: ie,
6152
6152
  suffix: /* @__PURE__ */ i(
6153
6153
  so,
6154
6154
  {
@@ -6163,7 +6163,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6163
6163
  je,
6164
6164
  {
6165
6165
  icon: /* @__PURE__ */ i(Hr, {}),
6166
- disabled: W === void 0 || L === "" || I === void 0,
6166
+ disabled: W === void 0 || j === "" || I === void 0,
6167
6167
  onClick: () => {
6168
6168
  m(!0);
6169
6169
  },
@@ -6177,7 +6177,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6177
6177
  icon: y ? /* @__PURE__ */ i(gt, {}) : /* @__PURE__ */ i(Un, {}),
6178
6178
  disabled: a || y,
6179
6179
  onClick: () => {
6180
- x.current = !0, te(L);
6180
+ x.current = !0, te(j);
6181
6181
  },
6182
6182
  style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
6183
6183
  tabIndex: -1
@@ -6191,8 +6191,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6191
6191
  context: { ...F == null ? void 0 : F(), ...l },
6192
6192
  visible: d,
6193
6193
  nameSearch: W ? void 0 : g,
6194
- onSelectValues: async (V) => {
6195
- p(!1), ie(V[0]), x.current = !1, O.current = void 0;
6194
+ onSelectValues: async (N) => {
6195
+ p(!1), oe(N[0]), x.current = !1, O.current = void 0;
6196
6196
  },
6197
6197
  onCloseModal: () => {
6198
6198
  p(!1), x.current = !1;
@@ -6206,8 +6206,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6206
6206
  parentContext: { ...F == null ? void 0 : F(), ...l },
6207
6207
  id: t && t[0],
6208
6208
  visible: h,
6209
- onSubmitSucceed: (V) => {
6210
- m(!1), ie(V);
6209
+ onSubmitSucceed: (N) => {
6210
+ m(!1), oe(N);
6211
6211
  },
6212
6212
  onCancel: () => {
6213
6213
  m(!1);
@@ -6268,7 +6268,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6268
6268
  return /* @__PURE__ */ i(
6269
6269
  at,
6270
6270
  {
6271
- title: /* @__PURE__ */ E("span", { children: [
6271
+ title: /* @__PURE__ */ D("span", { children: [
6272
6272
  r && /* @__PURE__ */ i("span", { style: { marginRight: 8 }, children: r }),
6273
6273
  e
6274
6274
  ] }),
@@ -6379,7 +6379,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6379
6379
  }
6380
6380
  function I() {
6381
6381
  let O = "_";
6382
- return l === 0 ? O = "_" : O = (c + 1).toString(), /* @__PURE__ */ E("span", { className: "pl-1 pr-1", children: [
6382
+ return l === 0 ? O = "_" : O = (c + 1).toString(), /* @__PURE__ */ D("span", { className: "pl-1 pr-1", children: [
6383
6383
  "(",
6384
6384
  O,
6385
6385
  "/",
@@ -6388,7 +6388,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6388
6388
  ] });
6389
6389
  }
6390
6390
  function w() {
6391
- return /* @__PURE__ */ E(ae, { children: [
6391
+ return /* @__PURE__ */ D(ae, { children: [
6392
6392
  g(),
6393
6393
  /* @__PURE__ */ i(
6394
6394
  tt,
@@ -6409,9 +6409,9 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6409
6409
  )
6410
6410
  ] });
6411
6411
  }
6412
- return /* @__PURE__ */ E("div", { className: "flex mb-2", children: [
6412
+ return /* @__PURE__ */ D("div", { className: "flex mb-2", children: [
6413
6413
  b(),
6414
- /* @__PURE__ */ E("div", { className: "flex-none h-8 pl-2", children: [
6414
+ /* @__PURE__ */ D("div", { className: "flex-none h-8 pl-2", children: [
6415
6415
  s !== "graph" && m && /* @__PURE__ */ i(
6416
6416
  tt,
6417
6417
  {
@@ -6421,7 +6421,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
6421
6421
  onClick: r
6422
6422
  }
6423
6423
  ),
6424
- d && m && /* @__PURE__ */ E(ae, { children: [
6424
+ d && m && /* @__PURE__ */ D(ae, { children: [
6425
6425
  g(),
6426
6426
  /* @__PURE__ */ i(
6427
6427
  tt,
@@ -6461,24 +6461,24 @@ function Hu(e) {
6461
6461
  }
6462
6462
  const Uu = (e) => {
6463
6463
  var rt;
6464
- const { value: t, onChange: n, ooui: r, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: c, setItemIndex: u } = oe(
6464
+ const { value: t, onChange: n, ooui: r, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: c, setItemIndex: u } = re(
6465
6465
  un
6466
- ), f = oe(He), {
6466
+ ), f = re(He), {
6467
6467
  activeId: d,
6468
6468
  getFields: p,
6469
6469
  getValues: h,
6470
6470
  getContext: m,
6471
6471
  domain: y,
6472
6472
  fetchValues: v
6473
- } = f || {}, { t: g } = he(), [b, x] = S(!1), [I, w] = S(!1), [O, C] = S(), [T, A] = S(!1), [D, F] = S(!1), [_, $] = S(), [R, G] = S([]), [W, L] = S(!1), N = Q([]), [k, X] = S(), te = Q(), [ie, H] = S(void 0), {
6474
- readOnly: ne,
6473
+ } = f || {}, { t: g } = he(), [b, x] = S(!1), [I, w] = S(!1), [O, C] = S(), [T, A] = 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), {
6474
+ readOnly: ie,
6475
6475
  relation: ee,
6476
- context: V,
6477
- domain: M
6478
- } = r, j = r.type === "many2many", { id: fe } = r, z = s.filter(
6476
+ context: N,
6477
+ domain: L
6478
+ } = r, E = r.type === "many2many", { id: de } = r, z = s.filter(
6479
6479
  (q) => (q.values || q.treeValues) && q.operation !== "pendingRemove"
6480
6480
  ), Y = Q();
6481
- de(() => {
6481
+ ue(() => {
6482
6482
  if (Y.current !== a) {
6483
6483
  Y.current = a, me();
6484
6484
  return;
@@ -6488,7 +6488,7 @@ const Uu = (e) => {
6488
6488
  const me = B(() => {
6489
6489
  (a === "form" && s.some((q) => !q.values) || a === "tree" && s.some((q) => !q.treeValues)) && $e();
6490
6490
  }, [s, a]);
6491
- de(() => {
6491
+ ue(() => {
6492
6492
  Ie();
6493
6493
  }, [y]);
6494
6494
  const ve = (q) => {
@@ -6513,7 +6513,7 @@ const Uu = (e) => {
6513
6513
  },
6514
6514
  model: ee,
6515
6515
  items: s,
6516
- context: { ...m == null ? void 0 : m(), ...V },
6516
+ context: { ...m == null ? void 0 : m(), ...N },
6517
6517
  currentView: q || a
6518
6518
  });
6519
6519
  return te.current || (te.current = De.map((Pe) => Pe.id)), (a || q) === "tree" && Z && H(Z), ve(De), De;
@@ -6524,33 +6524,33 @@ const Uu = (e) => {
6524
6524
  }
6525
6525
  };
6526
6526
  async function Ie() {
6527
- M && (N.current = await P.getHandler().evalDomain({
6528
- domain: M,
6527
+ L && (M.current = await P.getHandler().evalDomain({
6528
+ domain: L,
6529
6529
  values: Lt({
6530
6530
  fields: p(),
6531
6531
  values: h()
6532
6532
  }),
6533
6533
  fields: p(),
6534
6534
  context: m()
6535
- })), y && y.length > 0 && (N.current = N.current.concat(
6535
+ })), y && y.length > 0 && (M.current = M.current.concat(
6536
6536
  Br({
6537
6537
  domain: y,
6538
- widgetFieldName: fe
6538
+ widgetFieldName: de
6539
6539
  })
6540
6540
  ));
6541
6541
  }
6542
6542
  const Ee = () => {
6543
6543
  const q = Array.from(o.keys()), ge = q[(q.indexOf(a) + 1) % q.length];
6544
- a === "form" ? ue(() => {
6544
+ a === "form" ? fe(() => {
6545
6545
  l(ge);
6546
6546
  }) : l(ge);
6547
6547
  }, Ke = () => {
6548
- c > 0 && (a === "form" ? ue(() => {
6548
+ c > 0 && (a === "form" ? fe(() => {
6549
6549
  u(c - 1);
6550
6550
  }) : u(c - 1));
6551
6551
  }, Fe = () => {
6552
6552
  const q = z.length;
6553
- c < q - 1 && (a === "form" ? ue(() => {
6553
+ c < q - 1 && (a === "form" ? fe(() => {
6554
6554
  u(c + 1);
6555
6555
  }) : u(c + 1));
6556
6556
  }, ce = async () => {
@@ -6558,12 +6558,12 @@ const Uu = (e) => {
6558
6558
  model: ee,
6559
6559
  ids: [q],
6560
6560
  fields: o.get("form").fields,
6561
- context: { ...m == null ? void 0 : m(), ...V }
6561
+ context: { ...m == null ? void 0 : m(), ...N }
6562
6562
  }))[0], Ae = (await P.getHandler().readObjects({
6563
6563
  model: ee,
6564
6564
  ids: [q],
6565
6565
  fields: o.get("tree").fields,
6566
- context: { ...m == null ? void 0 : m(), ...V }
6566
+ context: { ...m == null ? void 0 : m(), ...N }
6567
6567
  }))[0], xe = s.map((De) => De.id === q ? {
6568
6568
  ...De,
6569
6569
  operation: "original",
@@ -6571,7 +6571,7 @@ const Uu = (e) => {
6571
6571
  treeValues: Ae
6572
6572
  } : De);
6573
6573
  ve(xe);
6574
- }, ue = (q) => {
6574
+ }, fe = (q) => {
6575
6575
  b ? an({
6576
6576
  t: g,
6577
6577
  onOk: () => {
@@ -6579,7 +6579,7 @@ const Uu = (e) => {
6579
6579
  }
6580
6580
  }) : q();
6581
6581
  }, we = () => {
6582
- if (j) {
6582
+ if (E) {
6583
6583
  Is({
6584
6584
  t: g,
6585
6585
  onOk: async () => {
@@ -6597,11 +6597,11 @@ const Uu = (e) => {
6597
6597
  }, _e = async () => {
6598
6598
  const { inv_field: q } = r;
6599
6599
  let ge;
6600
- q && d && (ge = { [q]: d }), a === "form" ? ue(() => {
6601
- L(!0), $({ defaultValues: ge }), A(!0);
6602
- }) : (L(!0), $({ defaultValues: ge }), A(!0));
6600
+ q && d && (ge = { [q]: d }), a === "form" ? fe(() => {
6601
+ j(!0), $({ defaultValues: ge }), A(!0);
6602
+ }) : (j(!0), $({ defaultValues: ge }), A(!0));
6603
6603
  }, J = async () => {
6604
- a === "form" ? ue(() => {
6604
+ a === "form" ? fe(() => {
6605
6605
  F(!0);
6606
6606
  }) : F(!0);
6607
6607
  }, Ce = async () => {
@@ -6664,8 +6664,8 @@ const Uu = (e) => {
6664
6664
  const { id: ge } = q;
6665
6665
  let Ae = s;
6666
6666
  const xe = s.find((De) => De.id === ge);
6667
- (xe == null ? void 0 : xe.values) === void 0 && (Ae = await Le("form")), $(Ae.find((De) => De.id === ge)), L(!1), A(!0);
6668
- }, re = async (q) => {
6667
+ (xe == null ? void 0 : xe.values) === void 0 && (Ae = await Le("form")), $(Ae.find((De) => De.id === ge)), j(!1), A(!0);
6668
+ }, ne = async (q) => {
6669
6669
  w(!0);
6670
6670
  const ge = s, Ae = q.filter((xe) => !s.find((De) => De.id === xe));
6671
6671
  try {
@@ -6674,12 +6674,12 @@ const Uu = (e) => {
6674
6674
  model: ee,
6675
6675
  ids: [xe],
6676
6676
  fields: o.get("form").fields,
6677
- context: { ...m == null ? void 0 : m(), ...V }
6677
+ context: { ...m == null ? void 0 : m(), ...N }
6678
6678
  }))[0], Z = (await P.getHandler().readObjects({
6679
6679
  model: ee,
6680
6680
  ids: [xe],
6681
6681
  fields: o.get("tree").fields,
6682
- context: { ...m == null ? void 0 : m(), ...V }
6682
+ context: { ...m == null ? void 0 : m(), ...N }
6683
6683
  }))[0];
6684
6684
  ge.push({
6685
6685
  id: xe,
@@ -6712,7 +6712,7 @@ const Uu = (e) => {
6712
6712
  {
6713
6713
  formView: o.get("form"),
6714
6714
  values: (ge = z[c]) == null ? void 0 : ge.values,
6715
- parentContext: { ...m == null ? void 0 : m(), ...V },
6715
+ parentContext: { ...m == null ? void 0 : m(), ...N },
6716
6716
  model: ee,
6717
6717
  id: (Ae = z[c]) == null ? void 0 : Ae.id,
6718
6718
  submitMode: "values",
@@ -6726,7 +6726,7 @@ const Uu = (e) => {
6726
6726
  } : ot);
6727
6727
  ve(Ye), x(!0);
6728
6728
  },
6729
- readOnly: ne
6729
+ readOnly: ie
6730
6730
  }
6731
6731
  );
6732
6732
  let q = [];
@@ -6752,9 +6752,9 @@ const Uu = (e) => {
6752
6752
  onRowSelectionChange: G,
6753
6753
  sorter: k,
6754
6754
  onChangeSort: X,
6755
- context: { ...m == null ? void 0 : m(), ...V },
6756
- colorsForResults: ie,
6757
- readonly: ne,
6755
+ context: { ...m == null ? void 0 : m(), ...N },
6756
+ colorsForResults: oe,
6757
+ readonly: ie,
6758
6758
  scrollY: r == null ? void 0 : r.height
6759
6759
  }
6760
6760
  );
@@ -6766,7 +6766,7 @@ const Uu = (e) => {
6766
6766
  view_id: o.get("graph").view_id,
6767
6767
  model: r.relation,
6768
6768
  domain: Z,
6769
- context: { ...m == null ? void 0 : m(), ...V },
6769
+ context: { ...m == null ? void 0 : m(), ...N },
6770
6770
  limit: 0
6771
6771
  }
6772
6772
  );
@@ -6775,14 +6775,14 @@ const Uu = (e) => {
6775
6775
  if (O)
6776
6776
  return /* @__PURE__ */ i(nt, { className: "mt-10", message: O, type: "error", banner: !0 });
6777
6777
  const pe = W;
6778
- return I ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ E(ae, { children: [
6778
+ return I ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(ae, { children: [
6779
6779
  /* @__PURE__ */ i(
6780
6780
  Os,
6781
6781
  {
6782
6782
  mode: a,
6783
6783
  title: Oe(),
6784
- readOnly: ne || !1,
6785
- isMany2Many: j,
6784
+ readOnly: ie || !1,
6785
+ isMany2Many: E,
6786
6786
  formHasChanges: b,
6787
6787
  totalItems: z.length,
6788
6788
  currentItemIndex: c,
@@ -6809,11 +6809,11 @@ const Uu = (e) => {
6809
6809
  defaultValues: _ == null ? void 0 : _.defaultValues,
6810
6810
  visible: T,
6811
6811
  onSubmitSucceed: Ue,
6812
- parentContext: { ...m == null ? void 0 : m(), ...V },
6812
+ parentContext: { ...m == null ? void 0 : m(), ...N },
6813
6813
  onCancel: () => {
6814
- L(!1), A(!1);
6814
+ j(!1), A(!1);
6815
6815
  },
6816
- readOnly: ne,
6816
+ readOnly: ie,
6817
6817
  mustClearAfterSave: pe,
6818
6818
  onMustRefreshParent: () => {
6819
6819
  v == null || v({ forceRefresh: !0 });
@@ -6823,12 +6823,12 @@ const Uu = (e) => {
6823
6823
  /* @__PURE__ */ i(
6824
6824
  lo,
6825
6825
  {
6826
- domain: N.current,
6826
+ domain: M.current,
6827
6827
  model: ee,
6828
- context: { ...m == null ? void 0 : m(), ...V },
6829
- visible: D,
6828
+ context: { ...m == null ? void 0 : m(), ...N },
6829
+ visible: V,
6830
6830
  onSelectValues: async (q) => {
6831
- F(!1), re(q);
6831
+ F(!1), ne(q);
6832
6832
  },
6833
6833
  onCloseModal: () => {
6834
6834
  F(!1);
@@ -6845,8 +6845,8 @@ const Uu = (e) => {
6845
6845
  getValues: o,
6846
6846
  getContext: s,
6847
6847
  domain: a
6848
- } = oe(He) || {};
6849
- de(() => {
6848
+ } = re(He) || {};
6849
+ ue(() => {
6850
6850
  l();
6851
6851
  }, [a]);
6852
6852
  async function l() {
@@ -6928,8 +6928,8 @@ const Uu = (e) => {
6928
6928
  formView: o,
6929
6929
  triggerChange: s
6930
6930
  }) => {
6931
- const [a, l] = S(!1), { itemIndex: c } = oe(un), { t: u } = he();
6932
- de(() => {
6931
+ const [a, l] = S(!1), { itemIndex: c } = re(un), { t: u } = he();
6932
+ ue(() => {
6933
6933
  const m = e[c];
6934
6934
  (!m || (m == null ? void 0 : m.operation) === "original") && l(!1);
6935
6935
  }, [c, e]);
@@ -6994,7 +6994,7 @@ const Uu = (e) => {
6994
6994
  onChange: s
6995
6995
  }) => {
6996
6996
  var c, u;
6997
- const { itemIndex: a } = oe(un), { t: l } = he();
6997
+ const { itemIndex: a } = re(un), { t: l } = he();
6998
6998
  return t.length === 0 ? l("noCurrentEntries") : /* @__PURE__ */ i(
6999
6999
  cn,
7000
7000
  {
@@ -7025,7 +7025,7 @@ const Uu = (e) => {
7025
7025
  selectedRowKeys: o,
7026
7026
  setSelectedRowKeys: s
7027
7027
  }) => {
7028
- const { t: a } = he(), { currentView: l, itemIndex: c, setItemIndex: u } = oe(
7028
+ const { t: a } = he(), { currentView: l, itemIndex: c, setItemIndex: u } = re(
7029
7029
  un
7030
7030
  ), f = B(async () => {
7031
7031
  const m = Ju({
@@ -7120,19 +7120,19 @@ const Xu = ({
7120
7120
  treeValues: { ...C, id: w }
7121
7121
  });
7122
7122
  else if (w)
7123
- A = o.map((D) => D.id === w ? {
7123
+ A = o.map((V) => V.id === w ? {
7124
7124
  id: w,
7125
7125
  operation: w > 0 ? "pendingUpdate" : "pendingCreate",
7126
7126
  values: { ...C, id: w },
7127
7127
  treeValues: { ...C, id: w }
7128
- } : D);
7128
+ } : V);
7129
7129
  else {
7130
- const D = Qi(o);
7130
+ const V = Qi(o);
7131
7131
  A = o.concat({
7132
- id: D,
7132
+ id: V,
7133
7133
  operation: "pendingCreate",
7134
- values: { ...C, id: D },
7135
- treeValues: { ...C, id: D }
7134
+ values: { ...C, id: V },
7135
+ treeValues: { ...C, id: V }
7136
7136
  });
7137
7137
  }
7138
7138
  s(A), y || p(!1);
@@ -7224,7 +7224,7 @@ const Xu = ({
7224
7224
  isLoading: t
7225
7225
  }) => {
7226
7226
  const n = e && Object.keys(e).map((r) => e[r].map((a) => `${a.label}: ${a.amount}`).join(", "));
7227
- return /* @__PURE__ */ E(
7227
+ return /* @__PURE__ */ D(
7228
7228
  "div",
7229
7229
  {
7230
7230
  style: {
@@ -7254,7 +7254,7 @@ const Xu = ({
7254
7254
  );
7255
7255
  return { getColumnState: t, updateColumnState: n };
7256
7256
  }, ef = (e) => {
7257
- de(() => () => {
7257
+ ue(() => () => {
7258
7258
  n(), o();
7259
7259
  }, []);
7260
7260
  const [t, n] = Je(
@@ -7323,7 +7323,7 @@ const Xu = ({
7323
7323
  return { getColumnState: a, updateColumnState: l };
7324
7324
  }, Fs = (e) => {
7325
7325
  const [t, n] = S(!0), r = Q(void 0), o = Q(!1), { getColumnState: s, updateColumnState: a } = tf(e);
7326
- return de(() => {
7326
+ return ue(() => {
7327
7327
  if (!e) {
7328
7328
  n(!1);
7329
7329
  return;
@@ -7380,34 +7380,34 @@ const Xu = ({
7380
7380
  endRow: G,
7381
7381
  sortFields: W
7382
7382
  }) => {
7383
- const L = w.current, k = L.map((M) => M.id).slice(R, G), X = k.filter((M) => {
7384
- const j = L.find((fe) => fe.id === M);
7385
- return j && (j.operation === "original" || j.operation === "pendingLink");
7386
- }), te = L.filter((M) => M && M.operation !== "original" && M.operation !== "pendingLink");
7383
+ const j = w.current, k = j.map((L) => L.id).slice(R, G), X = k.filter((L) => {
7384
+ const E = j.find((de) => de.id === L);
7385
+ return E && (E.operation === "original" || E.operation === "pendingLink");
7386
+ }), te = j.filter((L) => L && L.operation !== "original" && L.operation !== "pendingLink");
7387
7387
  if (X.length === 0 && te.length === 0)
7388
7388
  return [];
7389
- const { results: ie, colors: H, status: ne } = await a({
7389
+ const { results: oe, colors: H, status: ie } = await a({
7390
7390
  idsToFetch: X,
7391
7391
  sortFields: W
7392
- }), ee = zn(o, ie), V = k.map((M) => {
7393
- var fe;
7394
- const j = ee.find((z) => z.id === M);
7395
- return j || ((fe = L.find((z) => z.id === M)) == null ? void 0 : fe.treeValues);
7392
+ }), ee = zn(o, oe), N = k.map((L) => {
7393
+ var de;
7394
+ const E = ee.find((z) => z.id === L);
7395
+ return E || ((de = j.find((z) => z.id === L)) == null ? void 0 : de.treeValues);
7396
7396
  });
7397
- return V.sort((M, j) => {
7398
- const fe = ee.findIndex(
7399
- (Y) => Y.id === M.id
7397
+ return N.sort((L, E) => {
7398
+ const de = ee.findIndex(
7399
+ (Y) => Y.id === L.id
7400
7400
  ), z = ee.findIndex(
7401
- (Y) => Y.id === j.id
7401
+ (Y) => Y.id === E.id
7402
7402
  );
7403
- return fe - z;
7404
- }), b.current = { ...b.current, ...H }, !x.current && ne && (x.current = {}), ne && (x.current = { ...x.current, ...ne }), V;
7403
+ return de - z;
7404
+ }), b.current = { ...b.current, ...H }, !x.current && ie && (x.current = {}), ie && (x.current = { ...x.current, ...ie }), N;
7405
7405
  },
7406
7406
  [a, o]
7407
- ), D = B((R) => {
7408
- var G, W, L, N;
7407
+ ), V = B((R) => {
7408
+ var G, W, j, M;
7409
7409
  if (b.current[(W = (G = R.node) == null ? void 0 : G.data) == null ? void 0 : W.id])
7410
- return { color: b.current[(N = (L = R.node) == null ? void 0 : L.data) == null ? void 0 : N.id] };
7410
+ return { color: b.current[(M = (j = R.node) == null ? void 0 : j.data) == null ? void 0 : M.id] };
7411
7411
  }, []), { loading: F, getColumnState: _, updateColumnState: $ } = Fs(
7412
7412
  nf({
7413
7413
  ...h,
@@ -7423,7 +7423,7 @@ const Xu = ({
7423
7423
  onRequestData: A,
7424
7424
  onRowDoubleClick: n,
7425
7425
  readonly: r,
7426
- onRowStyle: D,
7426
+ onRowStyle: V,
7427
7427
  onRowSelectionChange: l,
7428
7428
  onColumnChanged: $,
7429
7429
  onGetColumnsState: _,
@@ -7536,7 +7536,7 @@ const Xu = ({
7536
7536
  });
7537
7537
  }, af = ["form", "tree", "graph"], lf = (e) => {
7538
7538
  var ce;
7539
- 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 } = oe(
7539
+ 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(
7540
7540
  un
7541
7541
  ), {
7542
7542
  readOnly: p,
@@ -7544,7 +7544,7 @@ const Xu = ({
7544
7544
  context: m,
7545
7545
  domain: y,
7546
7546
  id: v
7547
- } = o, g = oe(He), {
7547
+ } = o, g = re(He), {
7548
7548
  activeId: b,
7549
7549
  getContext: x,
7550
7550
  fetchValues: I
@@ -7553,7 +7553,7 @@ const Xu = ({
7553
7553
  fieldName: v
7554
7554
  }), {
7555
7555
  treeOoui: A,
7556
- onTreeFetchRows: D,
7556
+ onTreeFetchRows: V,
7557
7557
  selectedRowKeys: F,
7558
7558
  setSelectedRowKeys: _,
7559
7559
  onChangeFirstVisibleRowIndex: $,
@@ -7563,29 +7563,29 @@ const Xu = ({
7563
7563
  treeView: s.get("tree"),
7564
7564
  relation: h,
7565
7565
  context: C,
7566
- allRowsIds: l.filter((ue) => ue.id !== void 0).map((ue) => ue.id),
7566
+ allRowsIds: l.filter((fe) => fe.id !== void 0).map((fe) => fe.id),
7567
7567
  gridRef: t
7568
7568
  }), [, W] = sf({
7569
7569
  ooui: A,
7570
7570
  model: h,
7571
7571
  items: l,
7572
7572
  selectedRowKeys: F
7573
- }), L = ye(() => {
7574
- const { title: ue } = s.get(c) || {};
7575
- return ue || o.label;
7576
- }, [c, o.label, s]), N = o.type === "many2many", k = B(
7577
- (ue) => {
7573
+ }), j = ye(() => {
7574
+ const { title: fe } = s.get(c) || {};
7575
+ return fe || o.label;
7576
+ }, [c, o.label, s]), M = o.type === "many2many", k = B(
7577
+ (fe) => {
7578
7578
  var we, _e;
7579
7579
  r == null || r({
7580
7580
  fields: ((we = s.get("form")) == null ? void 0 : we.fields) || ((_e = s.get("tree")) == null ? void 0 : _e.fields),
7581
- items: ue
7581
+ items: fe
7582
7582
  });
7583
7583
  },
7584
7584
  [r, s]
7585
7585
  ), {
7586
7586
  formHasChanges: X,
7587
7587
  onFormChanges: te,
7588
- showFormChangesDialogIfNeeded: ie,
7588
+ showFormChangesDialogIfNeeded: oe,
7589
7589
  setFormHasChanges: H
7590
7590
  } = Ku({
7591
7591
  items: l,
@@ -7595,17 +7595,17 @@ const Xu = ({
7595
7595
  context: C,
7596
7596
  triggerChange: k
7597
7597
  }), {
7598
- showFormModal: ne,
7598
+ showFormModal: ie,
7599
7599
  modalItem: ee,
7600
- continuousEntryMode: V,
7601
- onCancelFormModal: M,
7602
- onFormModalSubmitSucceed: j,
7603
- createItem: fe,
7600
+ continuousEntryMode: N,
7601
+ onCancelFormModal: L,
7602
+ onFormModalSubmitSucceed: E,
7603
+ createItem: de,
7604
7604
  openItemInFormModal: z
7605
7605
  } = Xu({
7606
7606
  activeId: b,
7607
7607
  inv_field: o.inv_field,
7608
- showFormChangesDialogIfNeeded: ie,
7608
+ showFormChangesDialogIfNeeded: oe,
7609
7609
  currentView: c,
7610
7610
  triggerChange: k,
7611
7611
  items: l,
@@ -7620,7 +7620,7 @@ const Xu = ({
7620
7620
  onCloseSearchModal: ve,
7621
7621
  searchItem: $e
7622
7622
  } = Qu({
7623
- showFormChangesDialogIfNeeded: ie,
7623
+ showFormChangesDialogIfNeeded: oe,
7624
7624
  currentView: c,
7625
7625
  triggerChange: k,
7626
7626
  items: l,
@@ -7628,31 +7628,31 @@ const Xu = ({
7628
7628
  context: C,
7629
7629
  relation: h
7630
7630
  }), { showRemoveConfirm: Le } = zu({
7631
- isMany2many: N,
7631
+ isMany2many: M,
7632
7632
  items: l,
7633
7633
  triggerChange: k,
7634
7634
  setFormHasChanges: H,
7635
7635
  selectedRowKeys: F,
7636
7636
  setSelectedRowKeys: _
7637
7637
  }), Ie = () => {
7638
- const ue = Array.from(s.keys()), we = ue[(ue.indexOf(c) + 1) % ue.length];
7639
- c === "form" ? ie(() => {
7638
+ const fe = Array.from(s.keys()), we = fe[(fe.indexOf(c) + 1) % fe.length];
7639
+ c === "form" ? oe(() => {
7640
7640
  u(we);
7641
7641
  }) : u(we);
7642
7642
  }, Ee = ft(
7643
- (ue) => {
7643
+ (fe) => {
7644
7644
  var we;
7645
- (we = s.get("form")) != null && we.fields && z(ue);
7645
+ (we = s.get("form")) != null && we.fields && z(fe);
7646
7646
  },
7647
7647
  // eslint-disable-next-line react-hooks/exhaustive-deps
7648
7648
  [l]
7649
7649
  ), Ke = B(() => {
7650
- f > 0 && (c === "form" ? ie(() => {
7650
+ f > 0 && (c === "form" ? oe(() => {
7651
7651
  d(f - 1);
7652
7652
  }) : d(f - 1));
7653
- }, [c, f, d, ie]), Fe = B(() => {
7654
- const ue = l.length;
7655
- f < ue - 1 && (c === "form" ? ie(() => {
7653
+ }, [c, f, d, oe]), Fe = B(() => {
7654
+ const fe = l.length;
7655
+ f < fe - 1 && (c === "form" ? oe(() => {
7656
7656
  d(f + 1);
7657
7657
  }) : d(f + 1));
7658
7658
  }, [
@@ -7660,21 +7660,21 @@ const Xu = ({
7660
7660
  f,
7661
7661
  l.length,
7662
7662
  d,
7663
- ie
7663
+ oe
7664
7664
  ]);
7665
- return /* @__PURE__ */ E(ae, { children: [
7665
+ return /* @__PURE__ */ D(ae, { children: [
7666
7666
  /* @__PURE__ */ i(
7667
7667
  Os,
7668
7668
  {
7669
7669
  mode: c,
7670
- title: L,
7670
+ title: j,
7671
7671
  readOnly: p || !1,
7672
- isMany2Many: N,
7672
+ isMany2Many: M,
7673
7673
  formHasChanges: X,
7674
7674
  totalItems: l.length,
7675
7675
  currentItemIndex: f,
7676
7676
  onDelete: Le,
7677
- onCreateItem: fe,
7677
+ onCreateItem: de,
7678
7678
  onToggleViewMode: Ie,
7679
7679
  onPreviousItem: Ke,
7680
7680
  onNextItem: Fe,
@@ -7691,7 +7691,7 @@ const Xu = ({
7691
7691
  height: o.height,
7692
7692
  items: l,
7693
7693
  readOnly: p || !1,
7694
- onFetchRecords: D,
7694
+ onFetchRecords: V,
7695
7695
  ooui: A,
7696
7696
  context: C,
7697
7697
  onRowDoubleClick: Ee,
@@ -7729,12 +7729,12 @@ const Xu = ({
7729
7729
  submitMode: "2many",
7730
7730
  values: ee == null ? void 0 : ee.values,
7731
7731
  defaultValues: ee == null ? void 0 : ee.defaultValues,
7732
- visible: ne,
7733
- onSubmitSucceed: j,
7732
+ visible: ie,
7733
+ onSubmitSucceed: E,
7734
7734
  parentContext: C,
7735
- onCancel: M,
7735
+ onCancel: L,
7736
7736
  readOnly: p,
7737
- mustClearAfterSave: V,
7737
+ mustClearAfterSave: N,
7738
7738
  onMustRefreshParent: () => {
7739
7739
  I == null || I({ forceRefresh: !0 });
7740
7740
  }
@@ -7761,7 +7761,7 @@ const Xu = ({
7761
7761
  limit: 0
7762
7762
  }
7763
7763
  ),
7764
- !af.includes(c) && /* @__PURE__ */ E("span", { children: [
7764
+ !af.includes(c) && /* @__PURE__ */ D("span", { children: [
7765
7765
  "Unsupported view ",
7766
7766
  c
7767
7767
  ] })
@@ -7770,7 +7770,7 @@ const Xu = ({
7770
7770
  var w;
7771
7771
  const { ooui: t } = e, { mode: n, relation: r, views: o, required: s, context: a } = t;
7772
7772
  let l;
7773
- const [c, u] = S(!0), [f, d] = S(), [p, h] = S(/* @__PURE__ */ new Map()), m = oe(He), { getContext: y, formView: v } = m || {}, { view_id: g } = v || {};
7773
+ const [c, u] = S(!0), [f, d] = S(), [p, h] = S(/* @__PURE__ */ new Map()), m = re(He), { getContext: y, formView: v } = m || {}, { view_id: g } = v || {};
7774
7774
  yt(() => {
7775
7775
  x();
7776
7776
  }, [t]);
@@ -7831,8 +7831,8 @@ const Xu = ({
7831
7831
  const { ooui: t } = e, { required: n } = t;
7832
7832
  return /* @__PURE__ */ i(Re, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(pf, { ooui: t }) });
7833
7833
  }, pf = (e) => {
7834
- 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 = oe(He), { elementHasLostFocus: h } = p || {};
7835
- de(() => {
7834
+ 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
+ ue(() => {
7836
7836
  d(ps(n));
7837
7837
  }, [n]);
7838
7838
  const m = (g) => {
@@ -7886,7 +7886,7 @@ function gf(e) {
7886
7886
  return /* @__PURE__ */ i(Ii, { defaultActiveKey: "1", tabPosition: t.tabPosition, children: r.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ i(
7887
7887
  hf,
7888
7888
  {
7889
- tab: /* @__PURE__ */ E(ae, { children: [
7889
+ tab: /* @__PURE__ */ D(ae, { children: [
7890
7890
  o(s.icon),
7891
7891
  " ",
7892
7892
  s.label
@@ -7904,7 +7904,7 @@ function gf(e) {
7904
7904
  )) });
7905
7905
  }
7906
7906
  const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
7907
- const { ooui: t } = e, { id: n, readOnly: r, required: o, height: s, translatable: a } = t, { token: l } = yf(), c = o && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, u = oe(He), { elementHasLostFocus: f } = u || {};
7907
+ const { ooui: t } = e, { id: n, readOnly: r, required: o, height: s, translatable: a } = t, { token: l } = yf(), c = o && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, u = re(He), { elementHasLostFocus: f } = u || {};
7908
7908
  return /* @__PURE__ */ i(Re, { required: o, ...e, children: a ? /* @__PURE__ */ i(
7909
7909
  wf,
7910
7910
  {
@@ -7933,14 +7933,14 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
7933
7933
  onChange: r,
7934
7934
  height: o
7935
7935
  }) => {
7936
- const s = oe(He), {
7936
+ const s = re(He), {
7937
7937
  activeId: a,
7938
7938
  activeModel: l,
7939
7939
  fetchValues: c,
7940
7940
  formHasChanges: u,
7941
7941
  elementHasLostFocus: f
7942
7942
  } = s || {}, [d, p] = S(!1), { t: h } = he();
7943
- return a ? /* @__PURE__ */ E(ae, { children: [
7943
+ return a ? /* @__PURE__ */ D(ae, { children: [
7944
7944
  /* @__PURE__ */ i(
7945
7945
  "div",
7946
7946
  {
@@ -7987,7 +7987,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
7987
7987
  }
7988
7988
  }
7989
7989
  )
7990
- ] }) : /* @__PURE__ */ E(ae, { children: [
7990
+ ] }) : /* @__PURE__ */ D(ae, { children: [
7991
7991
  /* @__PURE__ */ i(Ne, { gutter: 8, wrap: !1, children: /* @__PURE__ */ i(
7992
7992
  Tr,
7993
7993
  {
@@ -8018,7 +8018,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
8018
8018
  ] });
8019
8019
  }, bf = (e) => {
8020
8020
  const { ooui: t } = e, { label: n, icon: r } = t, o = vt(r || "");
8021
- return /* @__PURE__ */ i(Ln, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ E(Xe, { children: [
8021
+ return /* @__PURE__ */ i(Ln, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ D(Xe, { children: [
8022
8022
  o ? /* @__PURE__ */ i(o, {}) : null,
8023
8023
  n
8024
8024
  ] }) });
@@ -8319,14 +8319,14 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
8319
8319
  return /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(kf, { ooui: t }) });
8320
8320
  }, kf = (e) => {
8321
8321
  const { value: t, onChange: n, ooui: r } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = r, c = t == null ? void 0 : t.split(","), [u, f] = S([]), [d, p] = S();
8322
- return de(() => {
8322
+ return ue(() => {
8323
8323
  if (!t) {
8324
8324
  p(void 0), f([]);
8325
8325
  return;
8326
8326
  }
8327
8327
  const h = t && c && c[0], m = t && c && c[1] && parseInt(c[1]);
8328
8328
  f([m, void 0]), p(h);
8329
- }, [t]), /* @__PURE__ */ E(Ne, { gutter: 8, wrap: !1, children: [
8329
+ }, [t]), /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, children: [
8330
8330
  /* @__PURE__ */ i(be, { flex: "1", children: /* @__PURE__ */ i(
8331
8331
  zi,
8332
8332
  {
@@ -8369,7 +8369,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
8369
8369
  const { ooui: t } = e, { required: n } = t;
8370
8370
  return /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(Mf, { ooui: t }) });
8371
8371
  }, Mf = (e) => {
8372
- 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 } = oe(He) || {}, { t: p } = he(), h = n ? pc(n) : "", m = (x) => {
8372
+ 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
8373
  r == null || r(x);
8374
8374
  };
8375
8375
  async function y() {
@@ -8388,8 +8388,8 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
8388
8388
  function b() {
8389
8389
  f(a, void 0), m(void 0);
8390
8390
  }
8391
- return /* @__PURE__ */ E(Ne, { gutter: 8, children: [
8392
- /* @__PURE__ */ E(be, { style: { paddingBottom: 5 }, children: [
8391
+ return /* @__PURE__ */ D(Ne, { gutter: 8, children: [
8392
+ /* @__PURE__ */ D(be, { style: { paddingBottom: 5 }, children: [
8393
8393
  /* @__PURE__ */ i(
8394
8394
  "input",
8395
8395
  {
@@ -8410,7 +8410,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
8410
8410
  }
8411
8411
  )
8412
8412
  ] }),
8413
- /* @__PURE__ */ i(be, { children: /* @__PURE__ */ E(Xe, { children: [
8413
+ /* @__PURE__ */ i(be, { children: /* @__PURE__ */ D(Xe, { children: [
8414
8414
  /* @__PURE__ */ i(
8415
8415
  je,
8416
8416
  {
@@ -8494,7 +8494,7 @@ function co(e) {
8494
8494
  r(p);
8495
8495
  });
8496
8496
  }
8497
- return /* @__PURE__ */ E("div", { style: { display: "flex" }, children: [
8497
+ return /* @__PURE__ */ D("div", { style: { display: "flex" }, children: [
8498
8498
  /* @__PURE__ */ i(
8499
8499
  tt,
8500
8500
  {
@@ -8544,7 +8544,7 @@ function et(e) {
8544
8544
  label: a,
8545
8545
  type: l = "default"
8546
8546
  } = e;
8547
- return /* @__PURE__ */ E(
8547
+ return /* @__PURE__ */ D(
8548
8548
  tt,
8549
8549
  {
8550
8550
  type: l,
@@ -8559,7 +8559,7 @@ function et(e) {
8559
8559
  );
8560
8560
  }
8561
8561
  function Ds(e) {
8562
- const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: r } = oe(
8562
+ const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: r } = re(
8563
8563
  lt
8564
8564
  ), { t: o } = he(), s = () => {
8565
8565
  if (n) {
@@ -8589,7 +8589,7 @@ async function Es(e, t, n) {
8589
8589
  ids: [t]
8590
8590
  }))[0], { create_date: o, create_uid: s, id: a, write_date: l, write_uid: c } = r;
8591
8591
  Tt(
8592
- /* @__PURE__ */ E("div", { children: [
8592
+ /* @__PURE__ */ D("div", { children: [
8593
8593
  "ID: " + a,
8594
8594
  " ",
8595
8595
  /* @__PURE__ */ i("br", {}),
@@ -8615,7 +8615,7 @@ const Lf = (e) => {
8615
8615
  onOpenAttachmentLink: s,
8616
8616
  onOpenAttachmentDetail: a,
8617
8617
  onListAllAttachments: l
8618
- } = e, { t: c } = he(), u = Q(null), f = /* @__PURE__ */ E(je, { children: [
8618
+ } = e, { t: c } = he(), u = Q(null), f = /* @__PURE__ */ D(je, { children: [
8619
8619
  /* @__PURE__ */ i(To, {}),
8620
8620
  `(${t})`,
8621
8621
  /* @__PURE__ */ i(jn, { style: { fontSize: 12 } })
@@ -8627,7 +8627,7 @@ const Lf = (e) => {
8627
8627
  onRetrieveData: async () => [
8628
8628
  {
8629
8629
  items: n.map((d) => {
8630
- const p = d.link ? To : Ur, h = /* @__PURE__ */ E(Ne, { wrap: !1, align: "middle", gutter: 8, children: [
8630
+ const p = d.link ? To : Ur, h = /* @__PURE__ */ D(Ne, { wrap: !1, align: "middle", gutter: 8, children: [
8631
8631
  /* @__PURE__ */ i(be, { style: { textAlign: "center" }, children: (d.datas_fname || d.link) && /* @__PURE__ */ i(
8632
8632
  At,
8633
8633
  {
@@ -8666,8 +8666,8 @@ const Lf = (e) => {
8666
8666
  ],
8667
8667
  placement: "bottomRight",
8668
8668
  disabled: r,
8669
- header: /* @__PURE__ */ E("div", { style: { padding: 5 }, children: [
8670
- /* @__PURE__ */ E(
8669
+ header: /* @__PURE__ */ D("div", { style: { padding: 5 }, children: [
8670
+ /* @__PURE__ */ D(
8671
8671
  "a",
8672
8672
  {
8673
8673
  style: { display: "block", paddingBottom: 5 },
@@ -8683,7 +8683,7 @@ const Lf = (e) => {
8683
8683
  ]
8684
8684
  }
8685
8685
  ),
8686
- /* @__PURE__ */ E(
8686
+ /* @__PURE__ */ D(
8687
8687
  "a",
8688
8688
  {
8689
8689
  style: { display: "block" },
@@ -8711,7 +8711,7 @@ function jf(e) {
8711
8711
  onAddNewAttachment: r,
8712
8712
  onListAllAttachments: o,
8713
8713
  onViewAttachmentDetails: s
8714
- } = e, { formRef: a } = oe(lt), [l, c] = S(!1), [u, f] = S([]), [d, p] = S(!1), { t: h } = he(), m = B(async () => {
8714
+ } = e, { formRef: a } = re(lt), [l, c] = S(!1), [u, f] = S([]), [d, p] = S(!1), { t: h } = he(), m = B(async () => {
8715
8715
  if (!(!t || t.length === 0)) {
8716
8716
  c(!0);
8717
8717
  try {
@@ -8765,9 +8765,9 @@ function jf(e) {
8765
8765
  },
8766
8766
  [s]
8767
8767
  );
8768
- return de(() => {
8768
+ return ue(() => {
8769
8769
  m();
8770
- }, [m]), /* @__PURE__ */ E(ae, { children: [
8770
+ }, [m]), /* @__PURE__ */ D(ae, { children: [
8771
8771
  /* @__PURE__ */ i(
8772
8772
  Lf,
8773
8773
  {
@@ -8807,7 +8807,7 @@ const Bf = () => {
8807
8807
  } = no(!0), [l, c] = Je(
8808
8808
  P.getHandler().searchForTree
8809
8809
  );
8810
- de(() => () => {
8810
+ ue(() => () => {
8811
8811
  c();
8812
8812
  }, [c]);
8813
8813
  const u = bs(), f = B(
@@ -8874,9 +8874,9 @@ const Bf = () => {
8874
8874
  };
8875
8875
  };
8876
8876
  function Hf({ toolbar: e }) {
8877
- const t = oe(
8877
+ const t = re(
8878
8878
  ln
8879
- ), n = oe(
8879
+ ), n = re(
8880
8880
  wt
8881
8881
  ), { t: r } = he(), { onNextClick: o, onPreviousClick: s } = Bf(), {
8882
8882
  availableViews: a,
@@ -8899,12 +8899,12 @@ function Hf({ toolbar: e }) {
8899
8899
  formIsLoading: C,
8900
8900
  attachments: T,
8901
8901
  formRef: A,
8902
- setFormHasChanges: D,
8902
+ setFormHasChanges: V,
8903
8903
  previousView: F,
8904
8904
  setPreviousView: _,
8905
8905
  goToResourceId: $,
8906
8906
  isActive: R
8907
- } = no(!0), { processAction: G } = t || {}, { openRelate: W, openDefaultActionForModel: L } = n || {}, N = d || x || C || I, k = B(
8907
+ } = no(!0), { processAction: G } = t || {}, { openRelate: W, openDefaultActionForModel: j } = n || {}, M = d || x || C || I, k = B(
8908
8908
  (H) => {
8909
8909
  f ? an({ t: r, onOk: H }) : H();
8910
8910
  },
@@ -8920,8 +8920,8 @@ function Hf({ toolbar: e }) {
8920
8920
  (ee) => ee.id !== p
8921
8921
  );
8922
8922
  O == null || O(H);
8923
- const ne = Math.max(0, (y || 0) - 1);
8924
- H != null && H[ne] ? (v == null || v(H[ne].id), m == null || m(ne)) : (v == null || v(void 0), m == null || m(void 0));
8923
+ const ie = Math.max(0, (y || 0) - 1);
8924
+ H != null && H[ie] ? (v == null || v(H[ie].id), m == null || m(ie)) : (v == null || v(void 0), m == null || m(void 0));
8925
8925
  } catch (H) {
8926
8926
  Nt(JSON.stringify(H));
8927
8927
  } finally {
@@ -8951,7 +8951,7 @@ function Hf({ toolbar: e }) {
8951
8951
  } finally {
8952
8952
  w == null || w(!1);
8953
8953
  }
8954
- }, [p, g, A, $, w]), ie = B(
8954
+ }, [p, g, A, $, w]), oe = B(
8955
8955
  (H) => {
8956
8956
  G == null || G({
8957
8957
  actionData: H,
@@ -8985,19 +8985,19 @@ function Hf({ toolbar: e }) {
8985
8985
  },
8986
8986
  { enableOnFormTags: !0, preventDefault: !0 },
8987
8987
  [R, F, l, _, c]
8988
- ), l ? /* @__PURE__ */ E(Xe, { wrap: !0, children: [
8989
- C && /* @__PURE__ */ E(ae, { children: [
8988
+ ), l ? /* @__PURE__ */ D(Xe, { wrap: !0, children: [
8989
+ C && /* @__PURE__ */ D(ae, { children: [
8990
8990
  /* @__PURE__ */ i(We, {}),
8991
8991
  jt(),
8992
8992
  jt()
8993
8993
  ] }),
8994
- /* @__PURE__ */ i(Ds, { disabled: N }),
8994
+ /* @__PURE__ */ i(Ds, { disabled: M }),
8995
8995
  /* @__PURE__ */ i(
8996
8996
  et,
8997
8997
  {
8998
8998
  icon: /* @__PURE__ */ i(Qa, {}),
8999
8999
  tooltip: r("save"),
9000
- disabled: !f || N,
9000
+ disabled: !f || M,
9001
9001
  loading: d,
9002
9002
  onClick: u
9003
9003
  }
@@ -9007,7 +9007,7 @@ function Hf({ toolbar: e }) {
9007
9007
  {
9008
9008
  icon: /* @__PURE__ */ i(zr, {}),
9009
9009
  tooltip: r("duplicate"),
9010
- disabled: f || N || p === void 0,
9010
+ disabled: f || M || p === void 0,
9011
9011
  loading: I,
9012
9012
  onClick: () => Ft({
9013
9013
  confirmMessage: r("confirmDuplicate"),
@@ -9021,7 +9021,7 @@ function Hf({ toolbar: e }) {
9021
9021
  {
9022
9022
  icon: /* @__PURE__ */ i(qr, {}),
9023
9023
  tooltip: r("delete"),
9024
- disabled: N || p === void 0,
9024
+ disabled: M || p === void 0,
9025
9025
  loading: x,
9026
9026
  onClick: () => Ft({
9027
9027
  confirmMessage: r("confirmRemoveItem"),
@@ -9036,7 +9036,7 @@ function Hf({ toolbar: e }) {
9036
9036
  {
9037
9037
  icon: /* @__PURE__ */ i(Li, {}),
9038
9038
  tooltip: r("showLogs"),
9039
- disabled: N || p === void 0,
9039
+ disabled: M || p === void 0,
9040
9040
  onClick: () => Es(g, p, r)
9041
9041
  }
9042
9042
  ),
@@ -9045,7 +9045,7 @@ function Hf({ toolbar: e }) {
9045
9045
  {
9046
9046
  icon: /* @__PURE__ */ i(Gn, {}),
9047
9047
  tooltip: r("refresh"),
9048
- disabled: N || p === void 0,
9048
+ disabled: M || p === void 0,
9049
9049
  onClick: () => k(() => A.current.fetchValues())
9050
9050
  }
9051
9051
  ),
@@ -9057,20 +9057,20 @@ function Hf({ toolbar: e }) {
9057
9057
  previousView: F,
9058
9058
  availableViews: a,
9059
9059
  onChangeView: (H) => {
9060
- _ == null || _(l), D == null || D(!1), c == null || c(H);
9060
+ _ == null || _(l), V == null || V(!1), c == null || c(H);
9061
9061
  },
9062
- disabled: N,
9062
+ disabled: M,
9063
9063
  formHasChanges: f
9064
9064
  }
9065
9065
  ),
9066
9066
  jt(),
9067
- /* @__PURE__ */ E(Xe, { children: [
9067
+ /* @__PURE__ */ D(Xe, { children: [
9068
9068
  /* @__PURE__ */ i(
9069
9069
  et,
9070
9070
  {
9071
9071
  icon: /* @__PURE__ */ i(Ni, {}),
9072
9072
  tooltip: r("previous"),
9073
- disabled: N,
9073
+ disabled: M,
9074
9074
  onClick: () => k(s)
9075
9075
  }
9076
9076
  ),
@@ -9079,7 +9079,7 @@ function Hf({ toolbar: e }) {
9079
9079
  {
9080
9080
  icon: /* @__PURE__ */ i(Mi, {}),
9081
9081
  tooltip: r("next"),
9082
- disabled: N,
9082
+ disabled: M,
9083
9083
  onClick: () => k(o)
9084
9084
  }
9085
9085
  )
@@ -9090,12 +9090,12 @@ function Hf({ toolbar: e }) {
9090
9090
  {
9091
9091
  icon: /* @__PURE__ */ i(Wr, {}),
9092
9092
  placement: "bottomRight",
9093
- disabled: N,
9093
+ disabled: M,
9094
9094
  onRetrieveData: async () => [
9095
9095
  { label: r("actions"), items: e == null ? void 0 : e.action }
9096
9096
  ],
9097
9097
  onItemClick: async (H) => {
9098
- H && (await Bt({ onFormSave: u })).succeed && ie(H);
9098
+ H && (await Bt({ onFormSave: u })).succeed && oe(H);
9099
9099
  }
9100
9100
  }
9101
9101
  ),
@@ -9103,19 +9103,19 @@ function Hf({ toolbar: e }) {
9103
9103
  qt,
9104
9104
  {
9105
9105
  icon: /* @__PURE__ */ i(Gr, {}),
9106
- disabled: N,
9106
+ disabled: M,
9107
9107
  placement: "bottomRight",
9108
9108
  onRetrieveData: async () => [
9109
9109
  { label: r("reports"), items: e == null ? void 0 : e.print }
9110
9110
  ],
9111
9111
  onItemClick: async (H) => {
9112
9112
  if (H) {
9113
- const ne = await Bt({ onFormSave: u });
9114
- ne.succeed && ie({
9113
+ const ie = await Bt({ onFormSave: u });
9114
+ ie.succeed && oe({
9115
9115
  ...H,
9116
9116
  datas: {
9117
9117
  ...H.datas || {},
9118
- ids: [ne.currentId]
9118
+ ids: [ie.currentId]
9119
9119
  }
9120
9120
  });
9121
9121
  }
@@ -9126,7 +9126,7 @@ function Hf({ toolbar: e }) {
9126
9126
  qt,
9127
9127
  {
9128
9128
  icon: /* @__PURE__ */ i(Kr, {}),
9129
- disabled: N,
9129
+ disabled: M,
9130
9130
  placement: "bottomRight",
9131
9131
  onRetrieveData: async () => [
9132
9132
  { label: r("related"), items: e == null ? void 0 : e.relate }
@@ -9145,11 +9145,11 @@ function Hf({ toolbar: e }) {
9145
9145
  /* @__PURE__ */ i(
9146
9146
  jf,
9147
9147
  {
9148
- disabled: N,
9148
+ disabled: M,
9149
9149
  attachments: T,
9150
9150
  onAddNewAttachment: async () => {
9151
9151
  const H = await Bt({ onFormSave: u });
9152
- H.succeed && L({
9152
+ H.succeed && j({
9153
9153
  ...qo(
9154
9154
  g,
9155
9155
  H.currentId
@@ -9159,7 +9159,7 @@ function Hf({ toolbar: e }) {
9159
9159
  },
9160
9160
  onListAllAttachments: async () => {
9161
9161
  const H = await Bt({ onFormSave: u });
9162
- H.succeed && L({
9162
+ H.succeed && j({
9163
9163
  ...qo(
9164
9164
  g,
9165
9165
  H.currentId
@@ -9168,7 +9168,7 @@ function Hf({ toolbar: e }) {
9168
9168
  });
9169
9169
  },
9170
9170
  onViewAttachmentDetails: async (H) => {
9171
- (await Bt({ onFormSave: u })).succeed && L({
9171
+ (await Bt({ onFormSave: u })).succeed && j({
9172
9172
  model: "ir.attachment",
9173
9173
  res_id: H.id,
9174
9174
  initialViewType: "form"
@@ -9192,14 +9192,14 @@ const jt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), Bt
9192
9192
  values: { selection_associated_object: `${e},${t}` },
9193
9193
  forced_values: { res_model: e, res_id: t }
9194
9194
  }), { useToken: Uf } = Ge, Ps = (e) => {
9195
- const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = Uf(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = oe(He), { elementHasLostFocus: p } = d || {}, [h, m] = S(!1), [y, v] = S(!1);
9196
- de(() => {
9195
+ const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = Uf(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = re(He), { elementHasLostFocus: p } = d || {}, [h, m] = S(!1), [y, v] = S(!1);
9196
+ ue(() => {
9197
9197
  l && !h && v(!1), !n && !l && (m(!0), v(!0));
9198
9198
  }, [h, l]);
9199
9199
  const g = (b) => {
9200
9200
  r == null || r(b.target.value);
9201
9201
  };
9202
- return /* @__PURE__ */ E(Ne, { gutter: 8, wrap: !1, align: "middle", children: [
9202
+ return /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, align: "middle", children: [
9203
9203
  l ? null : /* @__PURE__ */ i(be, { flex: "none", children: h ? /* @__PURE__ */ i(
9204
9204
  je,
9205
9205
  {
@@ -9287,7 +9287,7 @@ const jt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), Bt
9287
9287
  var f;
9288
9288
  return u && ((f = a.current) == null ? void 0 : f.focus());
9289
9289
  },
9290
- children: /* @__PURE__ */ E(ut, { layout: "vertical", onFinish: c, autoComplete: "off", children: [
9290
+ children: /* @__PURE__ */ D(ut, { layout: "vertical", onFinish: c, autoComplete: "off", children: [
9291
9291
  /* @__PURE__ */ i(
9292
9292
  ut.Item,
9293
9293
  {
@@ -9302,7 +9302,7 @@ const jt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), Bt
9302
9302
  children: /* @__PURE__ */ i(ct, { style: { width: "100%" }, autoFocus: !0, ref: a })
9303
9303
  }
9304
9304
  ),
9305
- /* @__PURE__ */ i(Ne, { align: "middle", justify: "end", children: /* @__PURE__ */ i(be, { children: /* @__PURE__ */ E(Xe, { children: [
9305
+ /* @__PURE__ */ i(Ne, { align: "middle", justify: "end", children: /* @__PURE__ */ i(be, { children: /* @__PURE__ */ D(Xe, { children: [
9306
9306
  /* @__PURE__ */ i(
9307
9307
  je,
9308
9308
  {
@@ -9351,7 +9351,7 @@ const jt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), Bt
9351
9351
  }, { useToken: qf } = Ge;
9352
9352
  function ks(e) {
9353
9353
  const { badgeNumber: t = 0, ...n } = e, { token: r } = qf();
9354
- return /* @__PURE__ */ E("div", { style: { position: "relative" }, children: [
9354
+ return /* @__PURE__ */ D("div", { style: { position: "relative" }, children: [
9355
9355
  t > 0 && /* @__PURE__ */ i("div", { style: { position: "absolute", left: -10, top: -10, zIndex: 2 }, children: /* @__PURE__ */ i(
9356
9356
  "span",
9357
9357
  {
@@ -9388,8 +9388,8 @@ function Yf({ refreshGraph: e }) {
9388
9388
  graphIsLoading: c,
9389
9389
  previousView: u,
9390
9390
  setPreviousView: f
9391
- } = oe(lt);
9392
- return /* @__PURE__ */ E(Xe, { wrap: !0, children: [
9391
+ } = re(lt);
9392
+ return /* @__PURE__ */ D(Xe, { wrap: !0, children: [
9393
9393
  /* @__PURE__ */ i(
9394
9394
  ks,
9395
9395
  {
@@ -9448,12 +9448,12 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9448
9448
  totalItems: c,
9449
9449
  selectedRowItems: u,
9450
9450
  isInfiniteTree: f
9451
- } = oe(lt), { t: d } = he(), { token: p } = zf(), h = ye(() => {
9451
+ } = re(lt), { t: d } = he(), { token: p } = zf(), h = ye(() => {
9452
9452
  if (!n)
9453
9453
  return null;
9454
9454
  if ((o == null ? void 0 : o.type) === "form" && s) {
9455
9455
  if (c === 0)
9456
- return /* @__PURE__ */ E(ae, { children: [
9456
+ return /* @__PURE__ */ D(ae, { children: [
9457
9457
  d("editingDocument"),
9458
9458
  " (id:",
9459
9459
  " ",
@@ -9467,7 +9467,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9467
9467
  ")"
9468
9468
  ] });
9469
9469
  const m = (a ?? 0) + 1, y = f ? c : l == null ? void 0 : l.length;
9470
- return /* @__PURE__ */ E(ae, { children: [
9470
+ return /* @__PURE__ */ D(ae, { children: [
9471
9471
  d("register"),
9472
9472
  " ",
9473
9473
  m,
@@ -9485,14 +9485,14 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9485
9485
  ")"
9486
9486
  ] });
9487
9487
  }
9488
- return (o == null ? void 0 : o.type) === "tree" && (u != null && u.length) ? u.length === 1 ? /* @__PURE__ */ E(ae, { children: [
9488
+ return (o == null ? void 0 : o.type) === "tree" && (u != null && u.length) ? u.length === 1 ? /* @__PURE__ */ D(ae, { children: [
9489
9489
  "1 ",
9490
9490
  d("selectedRegisters"),
9491
9491
  " - (id:",
9492
9492
  " ",
9493
9493
  /* @__PURE__ */ i(An, { copyable: !0, children: u[0].id }),
9494
9494
  ")"
9495
- ] }) : /* @__PURE__ */ E(ae, { children: [
9495
+ ] }) : /* @__PURE__ */ D(ae, { children: [
9496
9496
  u.length,
9497
9497
  " ",
9498
9498
  d("selectedRegisters"),
@@ -9516,8 +9516,8 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9516
9516
  l == null ? void 0 : l.length,
9517
9517
  d
9518
9518
  ]);
9519
- return /* @__PURE__ */ E("div", { style: { position: "sticky", top: 80, zIndex: 3 }, children: [
9520
- /* @__PURE__ */ E(
9519
+ return /* @__PURE__ */ D("div", { style: { position: "sticky", top: 80, zIndex: 3 }, children: [
9520
+ /* @__PURE__ */ D(
9521
9521
  Ne,
9522
9522
  {
9523
9523
  className: "shadow-md",
@@ -9529,7 +9529,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9529
9529
  },
9530
9530
  align: "middle",
9531
9531
  children: [
9532
- /* @__PURE__ */ E(be, { flex: 2, children: [
9532
+ /* @__PURE__ */ D(be, { flex: 2, children: [
9533
9533
  /* @__PURE__ */ i(Jf, { level: 3, style: { marginBottom: 0 }, children: e || r }),
9534
9534
  h
9535
9535
  ] }),
@@ -9540,7 +9540,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9540
9540
  /* @__PURE__ */ i("div", { className: "pb-5" })
9541
9541
  ] });
9542
9542
  }, Xf = (e) => {
9543
- const { viewData: t, visible: n, model: r, context: o, domain: s, formView: a, treeView: l } = e, c = Q(), u = oe(
9543
+ const { viewData: t, visible: n, model: r, context: o, domain: s, formView: a, treeView: l } = e, c = Q(), u = re(
9544
9544
  lt
9545
9545
  ), {
9546
9546
  setResults: f = void 0,
@@ -9559,17 +9559,17 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9559
9559
  limit: C,
9560
9560
  setLimit: T,
9561
9561
  searchParams: A,
9562
- searchValues: D,
9562
+ searchValues: V,
9563
9563
  setSearchValues: F,
9564
9564
  currentView: _
9565
9565
  } = u || {}, [$, R] = S(!0);
9566
- de(() => {
9566
+ ue(() => {
9567
9567
  var X;
9568
9568
  (X = c.current) == null || X.refresh();
9569
- }, [A]), de(() => {
9569
+ }, [A]), ue(() => {
9570
9570
  t.view_id !== _.view_id && R(!0);
9571
9571
  }, [_]);
9572
- const { clear: G, searchFilterLoading: W, searchError: L, offset: N, tableRefreshing: k } = vs({
9572
+ const { clear: G, searchFilterLoading: W, searchError: j, offset: M, tableRefreshing: k } = vs({
9573
9573
  model: r,
9574
9574
  setSearchTreeNameSearch: w,
9575
9575
  setSelectedRowItems: m,
@@ -9592,7 +9592,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9592
9592
  limit: C,
9593
9593
  setLimit: T
9594
9594
  });
9595
- return !n || !t ? null : /* @__PURE__ */ E(ae, { children: [
9595
+ return !n || !t ? null : /* @__PURE__ */ D(ae, { children: [
9596
9596
  /* @__PURE__ */ i(Xn, { title: t.title || t.name, children: /* @__PURE__ */ i(
9597
9597
  Yf,
9598
9598
  {
@@ -9611,14 +9611,14 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9611
9611
  ]),
9612
9612
  limit: C,
9613
9613
  onClear: G,
9614
- offset: N,
9614
+ offset: M,
9615
9615
  isSearching: W,
9616
9616
  onSubmit: (X) => {
9617
9617
  R(!1), y == null || y(X.params), g == null || g(!1);
9618
9618
  },
9619
- searchError: L,
9619
+ searchError: j,
9620
9620
  searchVisible: v,
9621
- searchValues: D,
9621
+ searchValues: V,
9622
9622
  showLimitOptions: !1
9623
9623
  }
9624
9624
  ),
@@ -9650,7 +9650,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
9650
9650
  setResults: d,
9651
9651
  setCurrentItemIndex: p
9652
9652
  } = e;
9653
- return t ? /* @__PURE__ */ E(ae, { children: [
9653
+ return t ? /* @__PURE__ */ D(ae, { children: [
9654
9654
  /* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(Hf, { toolbar: a == null ? void 0 : a.toolbar }) }),
9655
9655
  /* @__PURE__ */ i(
9656
9656
  cn,
@@ -9676,13 +9676,13 @@ function Zf(e) {
9676
9676
  function c(f) {
9677
9677
  t(f.search);
9678
9678
  }
9679
- de(() => {
9679
+ ue(() => {
9680
9680
  s.setFieldsValue({ search: r });
9681
9681
  }, [r]);
9682
9682
  function u() {
9683
9683
  l(!1), s.setFieldsValue({ search: void 0 }), t(void 0);
9684
9684
  }
9685
- return /* @__PURE__ */ i(ut, { form: s, onFinish: c, autoComplete: "off", children: /* @__PURE__ */ E(Ne, { align: "middle", justify: "end", children: [
9685
+ return /* @__PURE__ */ i(ut, { form: s, onFinish: c, autoComplete: "off", children: /* @__PURE__ */ D(Ne, { align: "middle", justify: "end", children: [
9686
9686
  /* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(ut.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ i(
9687
9687
  ct,
9688
9688
  {
@@ -9713,7 +9713,7 @@ function Zf(e) {
9713
9713
  ] }) });
9714
9714
  }
9715
9715
  function em(e) {
9716
- var ee;
9716
+ var N;
9717
9717
  const {
9718
9718
  availableViews: t,
9719
9719
  currentView: n,
@@ -9740,11 +9740,11 @@ function em(e) {
9740
9740
  totalItems: C,
9741
9741
  isActive: T,
9742
9742
  isInfiniteTree: A
9743
- } = oe(lt), { parentContext: D = {}, treeExpandable: F, toolbar: _ } = e, $ = Jn(
9743
+ } = re(lt), { parentContext: V = {}, treeExpandable: F, toolbar: _ } = e, $ = Jn(
9744
9744
  sn.FEATURE_ADVANCED_EXPORT
9745
- ), { t: R } = he(), G = oe(
9745
+ ), { t: R } = he(), G = re(
9746
9746
  ln
9747
- ), { processAction: W } = G || {}, [L, N] = S(!1);
9747
+ ), { processAction: W } = G || {}, [j, M] = S(!1), k = Q(!0);
9748
9748
  Dt(
9749
9749
  "ctrl+l,command+l",
9750
9750
  () => {
@@ -9759,93 +9759,99 @@ function em(e) {
9759
9759
  },
9760
9760
  { enableOnFormTags: !0, preventDefault: !0 },
9761
9761
  [m]
9762
- ), de(() => {
9763
- var V;
9764
- A && g === void 0 && ((V = f == null ? void 0 : f.current) == null || V.refreshResults());
9762
+ ), ue(() => {
9763
+ var L;
9764
+ if (A && g === void 0) {
9765
+ if (k.current) {
9766
+ k.current = !1;
9767
+ return;
9768
+ }
9769
+ (L = f == null ? void 0 : f.current) == null || L.refreshResults();
9770
+ }
9765
9771
  }, [A, g]);
9766
- const k = g !== void 0 && g.trim().length > 0;
9767
- function X() {
9772
+ const X = g !== void 0 && g.trim().length > 0;
9773
+ function te() {
9768
9774
  Ft({
9769
9775
  confirmMessage: R("confirmDuplicate"),
9770
9776
  t: R,
9771
9777
  onOk: () => {
9772
- H();
9778
+ ie();
9773
9779
  }
9774
9780
  });
9775
9781
  }
9776
- function te() {
9782
+ function oe() {
9777
9783
  Ft({
9778
9784
  confirmMessage: R("confirmRemove"),
9779
9785
  t: R,
9780
9786
  onOk: () => {
9781
- ie();
9787
+ H();
9782
9788
  }
9783
9789
  });
9784
9790
  }
9785
- async function ie() {
9786
- var V;
9791
+ async function H() {
9792
+ var L;
9787
9793
  try {
9788
9794
  s == null || s(!0), await P.getHandler().deleteObjects({
9789
9795
  model: u,
9790
- ids: o.map((M) => M.id),
9791
- context: { ...D }
9792
- }), d == null || d(void 0), p == null || p(void 0), (V = f == null ? void 0 : f.current) == null || V.refreshResults();
9793
- } catch (M) {
9794
- it(M);
9796
+ ids: o.map((E) => E.id),
9797
+ context: { ...V }
9798
+ }), d == null || d(void 0), p == null || p(void 0), (L = f == null ? void 0 : f.current) == null || L.refreshResults();
9799
+ } catch (E) {
9800
+ it(E);
9795
9801
  } finally {
9796
9802
  s == null || s(!1);
9797
9803
  }
9798
9804
  }
9799
- async function H() {
9800
- var V;
9805
+ async function ie() {
9806
+ var L;
9801
9807
  try {
9802
9808
  c == null || c(!0);
9803
- const M = o[0].id;
9809
+ const E = o[0].id;
9804
9810
  await P.getHandler().duplicate({
9805
- id: M,
9811
+ id: E,
9806
9812
  model: u,
9807
- context: { ...D }
9808
- }) && ((V = f == null ? void 0 : f.current) == null || V.refreshResults());
9809
- } catch (M) {
9810
- it(M);
9813
+ context: { ...V }
9814
+ }) && ((L = f == null ? void 0 : f.current) == null || L.refreshResults());
9815
+ } catch (E) {
9816
+ it(E);
9811
9817
  } finally {
9812
9818
  c == null || c(!1);
9813
9819
  }
9814
9820
  }
9815
- function ne(V) {
9821
+ function ee(L) {
9816
9822
  W == null || W({
9817
- actionData: V,
9823
+ actionData: L,
9818
9824
  values: {
9819
- active_id: o == null ? void 0 : o.map((M) => M.id)[0],
9820
- active_ids: o == null ? void 0 : o.map((M) => M.id)
9825
+ active_id: o == null ? void 0 : o.map((E) => E.id)[0],
9826
+ active_ids: o == null ? void 0 : o.map((E) => E.id)
9821
9827
  },
9822
9828
  fields: {},
9823
9829
  context: {
9824
- ...D,
9825
- active_id: o == null ? void 0 : o.map((M) => M.id)[0],
9826
- active_ids: o == null ? void 0 : o.map((M) => M.id)
9830
+ ...V,
9831
+ active_id: o == null ? void 0 : o.map((E) => E.id)[0],
9832
+ active_ids: o == null ? void 0 : o.map((E) => E.id)
9827
9833
  },
9828
9834
  onRefreshParentValues: () => {
9829
- var M;
9830
- (M = f == null ? void 0 : f.current) == null || M.refreshResults();
9835
+ var E;
9836
+ (E = f == null ? void 0 : f.current) == null || E.refreshResults();
9831
9837
  }
9832
9838
  });
9833
9839
  }
9834
- return /* @__PURE__ */ E(Xe, { wrap: !0, children: [
9835
- b && /* @__PURE__ */ E(ae, { children: [
9840
+ return /* @__PURE__ */ D(Xe, { wrap: !0, children: [
9841
+ b && /* @__PURE__ */ D(ae, { children: [
9836
9842
  /* @__PURE__ */ i(We, {}),
9837
9843
  Vt(),
9838
9844
  Vt()
9839
9845
  ] }),
9840
- F ? null : /* @__PURE__ */ E(ae, { children: [
9846
+ F ? null : /* @__PURE__ */ D(ae, { children: [
9841
9847
  /* @__PURE__ */ i(
9842
9848
  Zf,
9843
9849
  {
9844
9850
  disabled: l || a || b,
9845
9851
  searchText: g,
9846
- onSearch: (V) => {
9847
- var M;
9848
- V && V.trim().length > 0 ? v == null || v(V) : (v == null || v(void 0), A || (M = f == null ? void 0 : f.current) == null || M.refreshResults());
9852
+ onSearch: (L) => {
9853
+ var E;
9854
+ L && L.trim().length > 0 ? v == null || v(L) : (v == null || v(void 0), A || (E = f == null ? void 0 : f.current) == null || E.refreshResults());
9849
9855
  }
9850
9856
  }
9851
9857
  ),
@@ -9876,7 +9882,7 @@ function em(e) {
9876
9882
  tooltip: R("duplicate"),
9877
9883
  disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || b,
9878
9884
  loading: l,
9879
- onClick: X
9885
+ onClick: te
9880
9886
  }
9881
9887
  ),
9882
9888
  /* @__PURE__ */ i(
@@ -9886,7 +9892,7 @@ function em(e) {
9886
9892
  tooltip: R("delete"),
9887
9893
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || b,
9888
9894
  loading: a,
9889
- onClick: te
9895
+ onClick: oe
9890
9896
  }
9891
9897
  ),
9892
9898
  Vt()
@@ -9911,20 +9917,20 @@ function em(e) {
9911
9917
  disabled: l || a || b,
9912
9918
  loading: !1,
9913
9919
  onClick: () => {
9914
- var V;
9915
- (V = f == null ? void 0 : f.current) == null || V.refreshResults();
9920
+ var L;
9921
+ (L = f == null ? void 0 : f.current) == null || L.refreshResults();
9916
9922
  }
9917
9923
  }
9918
9924
  ),
9919
- !F && /* @__PURE__ */ E(ae, { children: [
9925
+ !F && /* @__PURE__ */ D(ae, { children: [
9920
9926
  Vt(),
9921
9927
  /* @__PURE__ */ i(
9922
9928
  co,
9923
9929
  {
9924
9930
  currentView: n,
9925
9931
  availableViews: t,
9926
- onChangeView: (V) => {
9927
- x == null || x(n), r == null || r(V);
9932
+ onChangeView: (L) => {
9933
+ x == null || x(n), r == null || r(L);
9928
9934
  },
9929
9935
  previousView: I,
9930
9936
  disabled: b
@@ -9941,8 +9947,8 @@ function em(e) {
9941
9947
  onRetrieveData: async () => [
9942
9948
  { label: R("actions"), items: _ == null ? void 0 : _.action }
9943
9949
  ],
9944
- onItemClick: (V) => {
9945
- V && ne(V);
9950
+ onItemClick: (L) => {
9951
+ L && ee(L);
9946
9952
  }
9947
9953
  }
9948
9954
  ),
@@ -9955,18 +9961,18 @@ function em(e) {
9955
9961
  onRetrieveData: async () => [
9956
9962
  { label: R("reports"), items: _ == null ? void 0 : _.print }
9957
9963
  ],
9958
- onItemClick: (V) => {
9959
- V && ne({
9960
- ...V,
9964
+ onItemClick: (L) => {
9965
+ L && ee({
9966
+ ...L,
9961
9967
  datas: {
9962
- ...V.datas || {},
9963
- ids: o.map((M) => M.id)
9968
+ ...L.datas || {},
9969
+ ids: o.map((E) => E.id)
9964
9970
  }
9965
9971
  });
9966
9972
  }
9967
9973
  }
9968
9974
  ),
9969
- $ && /* @__PURE__ */ E(ae, { children: [
9975
+ $ && /* @__PURE__ */ D(ae, { children: [
9970
9976
  Vt(),
9971
9977
  /* @__PURE__ */ i(
9972
9978
  qt,
@@ -9975,7 +9981,7 @@ function em(e) {
9975
9981
  icon: /* @__PURE__ */ i(
9976
9982
  Ei,
9977
9983
  {
9978
- component: () => /* @__PURE__ */ E(
9984
+ component: () => /* @__PURE__ */ D(
9979
9985
  "svg",
9980
9986
  {
9981
9987
  xmlns: "http://www.w3.org/2000/svg",
@@ -10013,41 +10019,41 @@ function em(e) {
10013
10019
  ]
10014
10020
  }
10015
10021
  ],
10016
- onItemClick: (V) => {
10017
- if (V.id === "print_screen") {
10018
- let M = (o == null ? void 0 : o.map((j) => j.id)) || [];
10019
- M.length === 0 && (M = (w == null ? void 0 : w.map((j) => j.id)) || []), ne({
10022
+ onItemClick: (L) => {
10023
+ if (L.id === "print_screen") {
10024
+ let E = (o == null ? void 0 : o.map((de) => de.id)) || [];
10025
+ E.length === 0 && (E = (w == null ? void 0 : w.map((de) => de.id)) || []), ee({
10020
10026
  id: -1,
10021
10027
  model: u,
10022
10028
  report_name: "printscreen.list",
10023
10029
  type: "ir.actions.report.xml",
10024
10030
  datas: {
10025
10031
  model: u,
10026
- ids: M
10032
+ ids: E
10027
10033
  }
10028
10034
  });
10029
10035
  return;
10030
10036
  }
10031
- N(!0);
10037
+ M(!0);
10032
10038
  },
10033
- disabled: l || a || b || k
10039
+ disabled: l || a || b || X
10034
10040
  }
10035
10041
  ),
10036
10042
  /* @__PURE__ */ i(
10037
10043
  Rf,
10038
10044
  {
10039
- visible: L,
10040
- onClose: () => N(!1),
10045
+ visible: j,
10046
+ onClose: () => M(!1),
10041
10047
  model: u,
10042
10048
  domain: Zt(
10043
- ((ee = f == null ? void 0 : f.current) == null ? void 0 : ee.getDomain()) || [],
10049
+ ((N = f == null ? void 0 : f.current) == null ? void 0 : N.getDomain()) || [],
10044
10050
  h || []
10045
10051
  ),
10046
10052
  limit: O,
10047
10053
  totalRegisters: C || 0,
10048
10054
  selectedRegistersToExport: o,
10049
10055
  visibleRegisters: (w == null ? void 0 : w.length) || 0,
10050
- context: D
10056
+ context: V
10051
10057
  }
10052
10058
  )
10053
10059
  ] })
@@ -10092,7 +10098,7 @@ const tm = ({
10092
10098
  dependencies: n = []
10093
10099
  }) => {
10094
10100
  const [r, o] = S(0);
10095
- return de(() => {
10101
+ return ue(() => {
10096
10102
  const a = () => {
10097
10103
  if (e.current) {
10098
10104
  const l = window.innerHeight, c = e.current.getBoundingClientRect(), u = l - c.top;
@@ -10107,7 +10113,7 @@ const tm = ({
10107
10113
  allRowSelectedMode: n
10108
10114
  }) => {
10109
10115
  const { t: r } = he();
10110
- return /* @__PURE__ */ E(
10116
+ return /* @__PURE__ */ D(
10111
10117
  Ne,
10112
10118
  {
10113
10119
  align: "bottom",
@@ -10115,7 +10121,7 @@ const tm = ({
10115
10121
  style: { height: 40, maxHeight: 40, overflow: "hidden" },
10116
10122
  children: [
10117
10123
  /* @__PURE__ */ i(be, { span: 12, children: n ? /* @__PURE__ */ i("span", { children: `${t.length} ${r("selectedRegisters")}` }) : /* @__PURE__ */ i(im, { selectedRowKeys: t }) }),
10118
- /* @__PURE__ */ E(be, { span: 12, style: { paddingRight: 10 }, className: "text-right", children: [
10124
+ /* @__PURE__ */ D(be, { span: 12, style: { paddingRight: 10 }, className: "text-right", children: [
10119
10125
  e === void 0 && /* @__PURE__ */ i(We, {}),
10120
10126
  e != null && `${r("totalRegisters")} ${e}`
10121
10127
  ] })
@@ -10127,7 +10133,7 @@ const tm = ({
10127
10133
  }) => {
10128
10134
  const { t } = he();
10129
10135
  if (e.length === 1)
10130
- return /* @__PURE__ */ E(ae, { children: [
10136
+ return /* @__PURE__ */ D(ae, { children: [
10131
10137
  "1 ",
10132
10138
  t("selectedRegisters"),
10133
10139
  " - (id:",
@@ -10136,7 +10142,7 @@ const tm = ({
10136
10142
  ")"
10137
10143
  ] });
10138
10144
  if (e.length > 1)
10139
- return /* @__PURE__ */ E(ae, { children: [
10145
+ return /* @__PURE__ */ D(ae, { children: [
10140
10146
  e.length,
10141
10147
  " ",
10142
10148
  t("selectedRegisters") + " ",
@@ -10167,7 +10173,7 @@ const tm = ({
10167
10173
  },
10168
10174
  [t]
10169
10175
  );
10170
- de(() => (e ? (a(!0), document.addEventListener("keydown", f), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", f), document.body.style.overflow = ""), () => {
10176
+ ue(() => (e ? (a(!0), document.addEventListener("keydown", f), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", f), document.body.style.overflow = ""), () => {
10171
10177
  document.removeEventListener("keydown", f), document.body.style.overflow = "";
10172
10178
  }), [e, f]);
10173
10179
  const d = () => {
@@ -10185,7 +10191,7 @@ const tm = ({
10185
10191
  padding: "0 16px",
10186
10192
  borderBottom: "1px solid #f0f0f0"
10187
10193
  };
10188
- return /* @__PURE__ */ i(Bl, { children: e && /* @__PURE__ */ E(ae, { children: [
10194
+ return /* @__PURE__ */ i(Bl, { children: e && /* @__PURE__ */ D(ae, { children: [
10189
10195
  /* @__PURE__ */ i(
10190
10196
  Ao.div,
10191
10197
  {
@@ -10205,7 +10211,7 @@ const tm = ({
10205
10211
  onClick: u
10206
10212
  }
10207
10213
  ),
10208
- /* @__PURE__ */ E(
10214
+ /* @__PURE__ */ D(
10209
10215
  Ao.div,
10210
10216
  {
10211
10217
  ref: l,
@@ -10227,7 +10233,7 @@ const tm = ({
10227
10233
  flexDirection: "column"
10228
10234
  },
10229
10235
  children: [
10230
- /* @__PURE__ */ E(lm, { style: p, children: [
10236
+ /* @__PURE__ */ D(lm, { style: p, children: [
10231
10237
  /* @__PURE__ */ i(am, { level: 3, style: { margin: 0, flex: 1 }, children: r }),
10232
10238
  /* @__PURE__ */ i(
10233
10239
  je,
@@ -11017,7 +11023,7 @@ var lh = aa;
11017
11023
  const la = /* @__PURE__ */ $s(lh), ch = pt(
11018
11024
  (e, t) => {
11019
11025
  const { onSubmit: n, searchValues: r, searchFields: o, onChange: s } = e, [a] = ut.useForm();
11020
- de(() => {
11026
+ ue(() => {
11021
11027
  a.setFieldsValue(r);
11022
11028
  }, [r]), ht(t, () => ({
11023
11029
  submit: a.submit,
@@ -11049,7 +11055,7 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
11049
11055
  const p = a.getFieldsValue();
11050
11056
  s == null || s(p);
11051
11057
  }, [a, s]), f = _m(u, 100);
11052
- return /* @__PURE__ */ E(Jt, { children: [
11058
+ return /* @__PURE__ */ D(Jt, { children: [
11053
11059
  /* @__PURE__ */ i(
11054
11060
  ut,
11055
11061
  {
@@ -11069,7 +11075,7 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
11069
11075
  ), dh = (e) => {
11070
11076
  var x;
11071
11077
  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();
11072
- de(() => {
11078
+ ue(() => {
11073
11079
  n && h(void 0);
11074
11080
  }, [n]), yt(() => {
11075
11081
  l.current = new Di(o, s, 1), l.current.parse(), f(l.current._advancedSearchContainer);
@@ -11138,7 +11144,7 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
11138
11144
  searchParams: n
11139
11145
  }) => {
11140
11146
  const { t: r } = he();
11141
- return /* @__PURE__ */ E(
11147
+ return /* @__PURE__ */ D(
11142
11148
  "div",
11143
11149
  {
11144
11150
  style: {
@@ -11193,7 +11199,7 @@ function ph(e, t) {
11193
11199
  } = e, p = Q({}), h = Q(), m = Q(null), y = Q([]), v = bs(), [g, b] = S(!0), [x, I] = S(), { t: w } = he(), O = Q(null), C = nm({
11194
11200
  elementRef: O,
11195
11201
  offset: fh
11196
- }), { treeView: T, formView: A, loading: D } = tm({
11202
+ }), { treeView: T, formView: A, loading: V } = tm({
11197
11203
  model: n,
11198
11204
  formViewProps: r,
11199
11205
  treeViewProps: o,
@@ -11205,24 +11211,24 @@ function ph(e, t) {
11205
11211
  setSelectedRowItems: R,
11206
11212
  setTreeFirstVisibleRow: G,
11207
11213
  treeFirstVisibleRow: W,
11208
- selectedRowItems: L,
11209
- setSearchParams: N,
11214
+ selectedRowItems: j,
11215
+ setSearchParams: M,
11210
11216
  searchValues: k,
11211
11217
  searchParams: X,
11212
11218
  setSearchValues: te,
11213
- searchTreeNameSearch: ie,
11219
+ searchTreeNameSearch: oe,
11214
11220
  setSearchTreeNameSearch: H,
11215
- setResults: ne,
11221
+ setResults: ie,
11216
11222
  results: ee,
11217
- setSearchQuery: V,
11218
- setTotalItems: M
11219
- } = no(c), j = d || ie, fe = Q(j);
11220
- de(() => {
11223
+ setSearchQuery: N,
11224
+ setTotalItems: L
11225
+ } = no(c), E = d || oe, de = Q(E);
11226
+ ue(() => {
11221
11227
  Ke();
11222
- }, []), de(() => {
11228
+ }, []), ue(() => {
11223
11229
  var Z;
11224
- (j !== void 0 && fe.current === void 0 || typeof j == "string" && typeof fe.current == "string" && j !== fe.current) && (N == null || N([]), te == null || te({}), (Z = m.current) == null || Z.unselectAll(), De()), fe.current = j;
11225
- }, [j]);
11230
+ (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;
11231
+ }, [E]);
11226
11232
  const z = ye(() => {
11227
11233
  if (T)
11228
11234
  return Ot(T);
@@ -11246,19 +11252,19 @@ function ph(e, t) {
11246
11252
  () => Zt(X || [], a),
11247
11253
  [a, X]
11248
11254
  ), Ee = B(() => {
11249
- const Pe = `${JSON.stringify(j ? a : Ie)}-${j}`;
11255
+ const Pe = `${JSON.stringify(E ? a : Ie)}-${E}`;
11250
11256
  return Pe !== Ae.current ? (Ae.current = Pe, !0) : !1;
11251
- }, [a, Ie, j]), Ke = B(async () => {
11257
+ }, [a, Ie, E]), Ke = B(async () => {
11252
11258
  if (Ee()) {
11253
- I(void 0), M(0), b(!0);
11259
+ I(void 0), L(0), b(!0);
11254
11260
  try {
11255
11261
  const Z = await P.getHandler().searchCount({
11256
- params: j ? a : Ie,
11262
+ params: E ? a : Ie,
11257
11263
  model: n,
11258
11264
  context: u,
11259
- name_search: j
11265
+ name_search: E
11260
11266
  });
11261
- I(Z), M(Z);
11267
+ I(Z), L(Z);
11262
11268
  } catch (Z) {
11263
11269
  v(Z);
11264
11270
  } finally {
@@ -11270,9 +11276,9 @@ function ph(e, t) {
11270
11276
  Ie,
11271
11277
  n,
11272
11278
  Ee,
11273
- j,
11279
+ E,
11274
11280
  u,
11275
- M,
11281
+ L,
11276
11282
  v
11277
11283
  ]), Fe = B(
11278
11284
  async ({
@@ -11284,7 +11290,7 @@ function ph(e, t) {
11284
11290
  return [];
11285
11291
  const ke = {};
11286
11292
  z.colors && (ke.colors = z.colors), z.status && (ke.status = z.status);
11287
- const ot = j ? a : Ie, bt = Sc(Ye), { results: St, attrsEvaluated: Be } = await P.getHandler().searchForTree({
11293
+ const ot = E ? a : Ie, bt = Sc(Ye), { results: St, attrsEvaluated: Be } = await P.getHandler().searchForTree({
11288
11294
  params: ot,
11289
11295
  limit: Pe - Z,
11290
11296
  offset: Z,
@@ -11293,22 +11299,22 @@ function ph(e, t) {
11293
11299
  context: u,
11294
11300
  attrs: ke,
11295
11301
  order: bt,
11296
- name_search: j
11302
+ name_search: E
11297
11303
  }), ze = St.map((mt) => ({ id: mt.id }));
11298
- if (V == null || V({
11304
+ if (N == null || N({
11299
11305
  model: n,
11300
11306
  params: ot,
11301
- name_search: j,
11307
+ name_search: E,
11302
11308
  context: u,
11303
11309
  order: bt
11304
11310
  }), Ee() || xe.current !== bt)
11305
- ne == null || ne(ze);
11311
+ ie == null || ie(ze);
11306
11312
  else {
11307
11313
  const mt = [...ee || [], ...ze];
11308
- ne == null || ne(mt);
11314
+ ie == null || ie(mt);
11309
11315
  }
11310
11316
  if (xe.current = bt, St.length === 0)
11311
- return y.current = [], I(0), M(0), [];
11317
+ return y.current = [], I(0), L(0), [];
11312
11318
  const xt = zn(z, St), Zn = Qt(Be);
11313
11319
  if (p.current = {
11314
11320
  ...p.current,
@@ -11328,11 +11334,11 @@ function ph(e, t) {
11328
11334
  Ie,
11329
11335
  n,
11330
11336
  Ee,
11331
- j,
11337
+ E,
11332
11338
  u,
11333
- ne,
11334
- V,
11335
- M,
11339
+ ie,
11340
+ N,
11341
+ L,
11336
11342
  z,
11337
11343
  T
11338
11344
  ]
@@ -11341,7 +11347,7 @@ function ph(e, t) {
11341
11347
  R == null || R(Z.map((Pe) => ({ id: Pe }))), f == null || f(Z);
11342
11348
  },
11343
11349
  [f, R]
11344
- ), ue = B(
11350
+ ), fe = B(
11345
11351
  async ({
11346
11352
  startRow: Z,
11347
11353
  endRow: Pe,
@@ -11354,17 +11360,17 @@ function ph(e, t) {
11354
11360
  sortFields: Ye
11355
11361
  });
11356
11362
  } catch (ke) {
11357
- throw console.error(ke), I(null), M(0), v(ke), ke;
11363
+ throw console.error(ke), I(null), L(0), v(ke), ke;
11358
11364
  } finally {
11359
11365
  F == null || F(!1);
11360
11366
  }
11361
11367
  },
11362
- [Fe, M, F, v]
11368
+ [Fe, L, F, v]
11363
11369
  ), we = B((Z) => {
11364
11370
  var Pe, Ye, ke, ot;
11365
11371
  if (p.current[(Ye = (Pe = Z.node) == null ? void 0 : Pe.data) == null ? void 0 : Ye.id])
11366
11372
  return { color: p.current[(ot = (ke = Z.node) == null ? void 0 : ke.data) == null ? void 0 : ot.id] };
11367
- }, []), _e = ye(() => (L == null ? void 0 : L.map((Z) => Z.id)) || [], [L]), [J, Ce, Se] = Rs({
11373
+ }, []), _e = ye(() => (j == null ? void 0 : j.map((Z) => Z.id)) || [], [j]), [J, Ce, Se] = Rs({
11368
11374
  ooui: z,
11369
11375
  model: n,
11370
11376
  showEmptyValues: !0,
@@ -11374,9 +11380,9 @@ function ph(e, t) {
11374
11380
  ) : void 0
11375
11381
  }), Ue = B(async () => {
11376
11382
  let Z = !1;
11377
- (L == null ? void 0 : L.length) === 0 ? Z = !0 : Z = !1;
11383
+ (j == null ? void 0 : j.length) === 0 ? Z = !0 : Z = !1;
11378
11384
  const Pe = async () => {
11379
- if (j) {
11385
+ if (E) {
11380
11386
  R == null || R(y.current);
11381
11387
  return;
11382
11388
  }
@@ -11384,7 +11390,7 @@ function ph(e, t) {
11384
11390
  return;
11385
11391
  const Ye = await P.getHandler().searchAllIds(
11386
11392
  {
11387
- params: j ? a : Ie,
11393
+ params: E ? a : Ie,
11388
11394
  model: n,
11389
11395
  context: u,
11390
11396
  totalItems: x
@@ -11404,13 +11410,13 @@ function ph(e, t) {
11404
11410
  a,
11405
11411
  Ie,
11406
11412
  n,
11407
- j,
11413
+ E,
11408
11414
  u,
11409
- L == null ? void 0 : L.length,
11415
+ j == null ? void 0 : j.length,
11410
11416
  R,
11411
11417
  w,
11412
11418
  x
11413
- ]), Me = B(() => W, [W]), re = 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(
11419
+ ]), 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(
11414
11420
  (Z) => {
11415
11421
  var Pe;
11416
11422
  return (Pe = h.current) == null ? void 0 : Pe[Z.id];
@@ -11428,7 +11434,7 @@ function ph(e, t) {
11428
11434
  ref: m,
11429
11435
  height: C,
11430
11436
  columns: Y,
11431
- onRequestData: ue,
11437
+ onRequestData: fe,
11432
11438
  onRowDoubleClick: s,
11433
11439
  onRowStyle: we,
11434
11440
  onRowSelectionChange: ce,
@@ -11439,7 +11445,7 @@ function ph(e, t) {
11439
11445
  selectedRowKeys: _e,
11440
11446
  onSelectionCheckboxClicked: Ue,
11441
11447
  totalRows: x || 99999,
11442
- footer: re,
11448
+ footer: ne,
11443
11449
  hasStatusColumn: z.status !== null,
11444
11450
  statusComponent: Oe,
11445
11451
  onRowStatus: qe,
@@ -11450,9 +11456,9 @@ function ph(e, t) {
11450
11456
  ce,
11451
11457
  Y,
11452
11458
  Me,
11453
- re,
11459
+ ne,
11454
11460
  $e,
11455
- ue,
11461
+ fe,
11456
11462
  s,
11457
11463
  qe,
11458
11464
  we,
@@ -11480,7 +11486,7 @@ function ph(e, t) {
11480
11486
  refreshResults: De,
11481
11487
  getFields: () => T == null ? void 0 : T.fields,
11482
11488
  getDomain: () => a
11483
- })), /* @__PURE__ */ E(Jt, { children: [
11489
+ })), /* @__PURE__ */ D(Jt, { children: [
11484
11490
  /* @__PURE__ */ i(
11485
11491
  om,
11486
11492
  {
@@ -11498,7 +11504,7 @@ function ph(e, t) {
11498
11504
  height: `${C}px`,
11499
11505
  ...l ? {} : { display: "none" }
11500
11506
  },
11501
- children: D || ve || g ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ E(Jt, { children: [
11507
+ children: V || ve || g ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ D(Jt, { children: [
11502
11508
  rt,
11503
11509
  /* @__PURE__ */ i(
11504
11510
  dh,
@@ -11512,7 +11518,7 @@ function ph(e, t) {
11512
11518
  ]),
11513
11519
  onSubmit: ({ params: Z, values: Pe }) => {
11514
11520
  var Ye;
11515
- R == null || R([]), (Ye = m.current) == null || Ye.unselectAll(), H == null || H(void 0), N == null || N(Z), te == null || te(Pe), $ == null || $(!1);
11521
+ R == null || R([]), (Ye = m.current) == null || Ye.unselectAll(), H == null || H(void 0), M == null || M(Z), te == null || te(Pe), $ == null || $(!1);
11516
11522
  },
11517
11523
  searchValues: k
11518
11524
  }
@@ -11538,10 +11544,10 @@ const hh = pt(ph), gh = (e) => {
11538
11544
  availableViews: p,
11539
11545
  searchTreeNameSearch: h
11540
11546
  } = e, m = ye(() => !(a != null && a.arch) || a.isExpandable ? !1 : xc(a.arch, "infinite") === "1", [a]);
11541
- de(() => {
11547
+ ue(() => {
11542
11548
  g == null || g(m);
11543
11549
  }, [m]);
11544
- const { currentView: y, setPreviousView: v, setIsInfiniteTree: g } = oe(
11550
+ const { currentView: y, setPreviousView: v, setIsInfiniteTree: g } = re(
11545
11551
  lt
11546
11552
  ), b = B(
11547
11553
  (x) => {
@@ -11564,7 +11570,7 @@ const hh = pt(ph), gh = (e) => {
11564
11570
  v
11565
11571
  ]
11566
11572
  );
11567
- return t ? /* @__PURE__ */ E(Jt, { children: [
11573
+ return t ? /* @__PURE__ */ D(Jt, { children: [
11568
11574
  /* @__PURE__ */ i(Xn, { showSummary: !m, children: /* @__PURE__ */ i(
11569
11575
  em,
11570
11576
  {
@@ -11619,8 +11625,8 @@ const hh = pt(ph), gh = (e) => {
11619
11625
  );
11620
11626
  };
11621
11627
  function vh() {
11622
- const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: r } = oe(ho), { t: o } = he();
11623
- return /* @__PURE__ */ E(Xe, { wrap: !0, children: [
11628
+ const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: r } = re(ho), { t: o } = he();
11629
+ return /* @__PURE__ */ D(Xe, { wrap: !0, children: [
11624
11630
  /* @__PURE__ */ i(
11625
11631
  et,
11626
11632
  {
@@ -11670,10 +11676,10 @@ function wh() {
11670
11676
  return /* @__PURE__ */ i("div", { className: "inline-block w-2" });
11671
11677
  }
11672
11678
  const bh = (e) => {
11673
- const { dashboardData: t, visible: n } = e, r = Q(), o = oe(
11679
+ const { dashboardData: t, visible: n } = e, r = Q(), o = re(
11674
11680
  wt
11675
11681
  ), { openShortcut: s } = o || {};
11676
- return !t || !n ? null : /* @__PURE__ */ E(
11682
+ return !t || !n ? null : /* @__PURE__ */ D(
11677
11683
  yh,
11678
11684
  {
11679
11685
  dashboardRef: r,
@@ -11730,7 +11736,7 @@ function xh(e, t) {
11730
11736
  limit: v
11731
11737
  } = e, [g, b] = S(), [x, I] = S([]), [w, O] = S(!0), C = p || void 0, [T, A] = S(
11732
11738
  C
11733
- ), [D, F] = S([]), [_, $] = S(), [R, G] = S([]), [W, L] = S(), [N, k] = S(0), [X, te] = S(!1), [ie, H] = S(!1), [ne, ee] = S(), { t: V } = he(), M = Q(), j = Q(), fe = oe(
11739
+ ), [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(
11734
11740
  wt
11735
11741
  ), {
11736
11742
  setCurrentView: z,
@@ -11739,7 +11745,7 @@ function xh(e, t) {
11739
11745
  activeKey: ve,
11740
11746
  openAction: $e,
11741
11747
  onRemoveTab: Le
11742
- } = fe || {};
11748
+ } = de || {};
11743
11749
  Dt(
11744
11750
  "ctrl+g,command+g",
11745
11751
  () => {
@@ -11763,13 +11769,13 @@ function xh(e, t) {
11763
11769
  O(!0);
11764
11770
  const J = [], Ce = [];
11765
11771
  for (const Me of s) {
11766
- const [re, Oe] = Me;
11772
+ const [ne, Oe] = Me;
11767
11773
  Oe !== "dashboard" ? Ce.push({
11768
11774
  viewTuple: Me,
11769
11775
  promise: P.getHandler().getView({
11770
11776
  model: r,
11771
11777
  type: Oe,
11772
- id: re,
11778
+ id: ne,
11773
11779
  context: o
11774
11780
  })
11775
11781
  }) : Ce.push({
@@ -11780,8 +11786,8 @@ function xh(e, t) {
11780
11786
  for (const Me of Se) {
11781
11787
  if (!Me)
11782
11788
  continue;
11783
- const [, re] = Me.viewTuple, Oe = Me.info;
11784
- switch (re) {
11789
+ const [, ne] = Me.viewTuple, Oe = Me.info;
11790
+ switch (ne) {
11785
11791
  case "dashboard": {
11786
11792
  const qe = s.find((rt) => {
11787
11793
  const [, q] = rt;
@@ -11808,7 +11814,7 @@ function xh(e, t) {
11808
11814
  case "form": {
11809
11815
  J.push({
11810
11816
  ...Oe,
11811
- type: re
11817
+ type: ne
11812
11818
  });
11813
11819
  break;
11814
11820
  }
@@ -11816,14 +11822,14 @@ function xh(e, t) {
11816
11822
  J.push({
11817
11823
  ...Oe,
11818
11824
  isExpandable: y,
11819
- type: re
11825
+ type: ne
11820
11826
  });
11821
11827
  break;
11822
11828
  }
11823
11829
  case "graph": {
11824
11830
  J.push({
11825
11831
  ...Oe,
11826
- type: re
11832
+ type: ne
11827
11833
  });
11828
11834
  break;
11829
11835
  }
@@ -11831,18 +11837,18 @@ function xh(e, t) {
11831
11837
  }
11832
11838
  let Ue;
11833
11839
  !u && J.find((Me) => Me.type === "tree") ? Ue = J.find(
11834
- (re) => re.type === "tree"
11835
- ) : u ? Ue = J.find((re) => u.id ? re.type === u.type && re.view_id === u.id : re.type === u.type) : Ue = J.find(
11836
- (re) => re.type === "form"
11840
+ (ne) => ne.type === "tree"
11841
+ ) : u ? Ue = J.find((ne) => u.id ? ne.type === u.type && ne.view_id === u.id : ne.type === u.type) : Ue = J.find(
11842
+ (ne) => ne.type === "form"
11837
11843
  ), Ue || (it(
11838
11844
  `Error determining the first view to show for model ${r}.
11839
11845
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
11840
11846
  ), Le == null || Le(c)), Ee(Ue), I(J), O(!1);
11841
11847
  };
11842
- l({ tabKey: c, canWeClose: Fe }), de(() => {
11848
+ l({ tabKey: c, canWeClose: Fe }), ue(() => {
11843
11849
  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);
11844
11850
  Ee(Ce || J), p ? Y == null || Y(C) : (Ie(void 0), $(void 0)), Ke();
11845
- }, [r, s, p]), de(() => {
11851
+ }, [r, s, p]), ue(() => {
11846
11852
  if (ve === c) {
11847
11853
  Y == null || Y(T);
11848
11854
  const J = { action_id: h, action_type: m };
@@ -11850,30 +11856,30 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11850
11856
  }
11851
11857
  }, [me, ve]);
11852
11858
  async function Fe() {
11853
- return g && g.type === "form" ? await M.current.cancelUnsavedChanges() : !0;
11859
+ return g && g.type === "form" ? await L.current.cancelUnsavedChanges() : !0;
11854
11860
  }
11855
11861
  async function ce() {
11856
- ve === c && (g.type === "form" && !await M.current.cancelUnsavedChanges() || te(!0));
11862
+ ve === c && (g.type === "form" && !await L.current.cancelUnsavedChanges() || te(!0));
11857
11863
  }
11858
- async function ue(J, Ce) {
11864
+ async function fe(J, Ce) {
11859
11865
  var Me;
11860
11866
  H(!0);
11861
11867
  let Se, Ue;
11862
11868
  if (J.length === 1) {
11863
11869
  Se = "form", Ue = [];
11864
- const re = J[0], Oe = R.findIndex((pe) => pe.id === re);
11870
+ const ne = J[0], Oe = R.findIndex((pe) => pe.id === ne);
11865
11871
  let qe;
11866
11872
  if (Oe === -1) {
11867
11873
  try {
11868
11874
  qe = (Me = await P.getHandler().readObjects({
11869
11875
  model: r,
11870
- ids: [re],
11876
+ ids: [ne],
11871
11877
  context: o
11872
11878
  })) == null ? void 0 : Me[0];
11873
11879
  } catch {
11874
11880
  }
11875
11881
  if (!qe) {
11876
- H(!1), te(!1), Tt(V("idNotFound"));
11882
+ H(!1), te(!1), Tt(N("idNotFound"));
11877
11883
  return;
11878
11884
  }
11879
11885
  } else
@@ -11882,12 +11888,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11882
11888
  Se = "tree", Ue = [["id", "in", J]];
11883
11889
  if (H(!1), te(!1), Ce && Se === "form") {
11884
11890
  Ie(J[0]);
11885
- const re = x.find(
11891
+ const ne = x.find(
11886
11892
  (Oe) => Oe.type === "form"
11887
11893
  );
11888
- Ee(re);
11894
+ Ee(ne);
11889
11895
  } else {
11890
- const re = s.find((Oe) => Oe[1] === Se);
11896
+ const ne = s.find((Oe) => Oe[1] === Se);
11891
11897
  $e({
11892
11898
  domain: Ue,
11893
11899
  context: o,
@@ -11895,7 +11901,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11895
11901
  views: s,
11896
11902
  title: a,
11897
11903
  target: "current",
11898
- initialView: { id: re == null ? void 0 : re[0], type: Se },
11904
+ initialView: { id: ne == null ? void 0 : ne[0], type: Se },
11899
11905
  action_id: h,
11900
11906
  action_type: m,
11901
11907
  res_id: J[0]
@@ -11909,7 +11915,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11909
11915
  return /* @__PURE__ */ i(
11910
11916
  Qf,
11911
11917
  {
11912
- formRef: M,
11918
+ formRef: L,
11913
11919
  currentId: T,
11914
11920
  visible: g.type === J.type && g.view_id === J.view_id,
11915
11921
  formView: J,
@@ -11935,8 +11941,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11935
11941
  domain: n,
11936
11942
  formView: x.find((Ce) => Ce.type === "form"),
11937
11943
  treeView: J,
11938
- searchTreeRef: j,
11939
- searchTreeNameSearch: ne,
11944
+ searchTreeRef: E,
11945
+ searchTreeNameSearch: ie,
11940
11946
  availableViews: x,
11941
11947
  results: R,
11942
11948
  setCurrentItemIndex: $,
@@ -11973,7 +11979,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11973
11979
  }
11974
11980
  function _e() {
11975
11981
  if (T === void 0 && g.type === "form")
11976
- M.current.clearAndReload();
11982
+ L.current.clearAndReload();
11977
11983
  else {
11978
11984
  Ie(void 0);
11979
11985
  const J = x.find(
@@ -11982,15 +11988,15 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11982
11988
  Ee(J);
11983
11989
  }
11984
11990
  }
11985
- return w ? /* @__PURE__ */ i(We, {}) : g ? /* @__PURE__ */ E(
11991
+ return w ? /* @__PURE__ */ i(We, {}) : g ? /* @__PURE__ */ D(
11986
11992
  Xc,
11987
11993
  {
11988
11994
  title: a,
11989
11995
  currentView: g,
11990
11996
  setCurrentView: Ee,
11991
11997
  availableViews: x,
11992
- formRef: M,
11993
- searchTreeRef: j,
11998
+ formRef: L,
11999
+ searchTreeRef: E,
11994
12000
  onNewClicked: _e,
11995
12001
  currentId: T,
11996
12002
  setCurrentId: Ie,
@@ -12000,14 +12006,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
12000
12006
  setResults: G,
12001
12007
  currentModel: r,
12002
12008
  sorter: W,
12003
- setSorter: L,
12004
- totalItems: N,
12009
+ setSorter: j,
12010
+ totalItems: M,
12005
12011
  setTotalItems: k,
12006
- selectedRowItems: D,
12012
+ selectedRowItems: V,
12007
12013
  setSelectedRowItems: F,
12008
12014
  setSearchTreeNameSearch: ee,
12009
- searchTreeNameSearch: ne,
12010
- goToResourceId: ue,
12015
+ searchTreeNameSearch: ie,
12016
+ goToResourceId: fe,
12011
12017
  limit: v,
12012
12018
  isActive: c === ve,
12013
12019
  children: [
@@ -12016,8 +12022,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
12016
12022
  Kf,
12017
12023
  {
12018
12024
  visible: X,
12019
- onIdSubmitted: ue,
12020
- isSearching: ie,
12025
+ onIdSubmitted: fe,
12026
+ isSearching: oe,
12021
12027
  onCancel: () => {
12022
12028
  te(!1);
12023
12029
  }
@@ -12067,10 +12073,10 @@ function Ih(e) {
12067
12073
  domain: s = [],
12068
12074
  visible: a = !0,
12069
12075
  parentContext: l = {}
12070
- } = 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), O = Q($t), C = Q([]), [T, A] = S(0), [D, F] = S([]), [_, $] = S(void 0), [R, G] = S(), [W, L] = S(), [N, k] = S(), [X, te] = S(!1), ie = Q([]), H = (Y) => {
12076
+ } = 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), O = Q($t), C = Q([]), [T, A] = 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) => {
12071
12077
  te(!0), x(Y), w((Y - 1) * O.current);
12072
- }, ne = async () => {
12073
- const Y = ie.current.length > 0 ? ie.current : s, me = Zt(C.current, Y), { colors: ve } = Ot(m), { totalItems: $e, results: Le, attrsEvaluated: Ie } = await P.getHandler().searchForTree({
12078
+ }, ie = async () => {
12079
+ const Y = oe.current.length > 0 ? oe.current : s, me = Zt(C.current, Y), { colors: ve } = Ot(m), { totalItems: $e, results: Le, attrsEvaluated: Ie } = await P.getHandler().searchForTree({
12074
12080
  params: me,
12075
12081
  limit: O.current,
12076
12082
  offset: I,
@@ -12090,30 +12096,30 @@ function Ih(e) {
12090
12096
  A(Ke);
12091
12097
  }, ee = async () => {
12092
12098
  try {
12093
- te(!0), await ne();
12099
+ te(!0), await ie();
12094
12100
  } catch (Y) {
12095
- L(JSON.stringify(Y));
12101
+ j(JSON.stringify(Y));
12096
12102
  }
12097
12103
  };
12098
- de(() => {
12104
+ ue(() => {
12099
12105
  f && a && ee();
12100
12106
  }, [b, I, f, a]);
12101
- const V = async (Y) => {
12107
+ const N = async (Y) => {
12102
12108
  d(!1), u(!0), k(void 0);
12103
12109
  try {
12104
- Y === "action" ? await M() : await j(), d(!0);
12110
+ Y === "action" ? await L() : await E(), d(!0);
12105
12111
  } catch (me) {
12106
12112
  k(me);
12107
12113
  } finally {
12108
12114
  u(!1);
12109
12115
  }
12110
- }, M = async () => {
12116
+ }, L = async () => {
12111
12117
  const Y = await P.getHandler().getViewsForAction({
12112
12118
  action: t,
12113
12119
  context: l
12114
12120
  });
12115
- ie.current = Y.domain, g(Y.views.get("form")), y(Y.views.get("tree")), h(Y.model), O.current = Y.limit;
12116
- }, j = async () => {
12121
+ oe.current = Y.domain, g(Y.views.get("form")), y(Y.views.get("tree")), h(Y.model), O.current = Y.limit;
12122
+ }, E = async () => {
12117
12123
  h(n);
12118
12124
  const Y = await P.getHandler().getView({
12119
12125
  model: n,
@@ -12129,17 +12135,17 @@ function Ih(e) {
12129
12135
  });
12130
12136
  y(me);
12131
12137
  };
12132
- de(() => {
12133
- t ? V("action") : n && V("model");
12138
+ ue(() => {
12139
+ t ? N("action") : n && N("model");
12134
12140
  }, [t, n]);
12135
- const fe = (Y) => {
12141
+ const de = (Y) => {
12136
12142
  const { id: me } = Y;
12137
12143
  o({
12138
12144
  id: me,
12139
12145
  model: p,
12140
12146
  treeView: m
12141
12147
  });
12142
- }, z = () => !m || !v ? null : /* @__PURE__ */ E("div", { style: { overflowY: "scroll" }, children: [
12148
+ }, z = () => !m || !v ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
12143
12149
  W && /* @__PURE__ */ i(nt, { className: "mt-10", message: W, type: "error", banner: !0 }),
12144
12150
  /* @__PURE__ */ i(
12145
12151
  Sn,
@@ -12149,16 +12155,16 @@ function Ih(e) {
12149
12155
  limit: O.current,
12150
12156
  page: b,
12151
12157
  treeView: m,
12152
- results: D,
12158
+ results: V,
12153
12159
  onRequestPageChange: H,
12154
12160
  loading: X,
12155
- onRowClicked: fe,
12161
+ onRowClicked: de,
12156
12162
  colorsForResults: _,
12157
12163
  sorter: R,
12158
12164
  onChangeSort: (Y) => {
12159
12165
  G == null || G(Y);
12160
12166
  const me = Yt({
12161
- resultsToSort: D,
12167
+ resultsToSort: V,
12162
12168
  sorter: Y,
12163
12169
  fields: { ...m.fields, ...v.fields }
12164
12170
  });
@@ -12168,11 +12174,11 @@ function Ih(e) {
12168
12174
  }
12169
12175
  )
12170
12176
  ] });
12171
- return N ? /* @__PURE__ */ i(nt, { className: "mt-10", message: N, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : z();
12177
+ return M ? /* @__PURE__ */ i(nt, { className: "mt-10", message: M, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : z();
12172
12178
  }
12173
12179
  const Oh = $r(Ih), Ah = (e) => {
12174
12180
  const { model: t } = e, [n, r] = S();
12175
- de(() => {
12181
+ ue(() => {
12176
12182
  o();
12177
12183
  }, [t]);
12178
12184
  async function o() {
@@ -12190,12 +12196,12 @@ function Fh(e, t) {
12190
12196
  setIsLoading: p,
12191
12197
  openAction: h,
12192
12198
  moveItemsEnabled: m
12193
- } = oe(ho), y = Q(), v = Q(), [g] = Je(P.getHandler().getView), [b] = Je(
12199
+ } = re(ho), y = Q(), v = Q(), [g] = Je(P.getHandler().getView), [b] = Je(
12194
12200
  P.getHandler().readObjects
12195
12201
  ), [x] = Je(P.getHandler().update), I = Jn(
12196
12202
  sn.FEATURE_READFORVIEW
12197
12203
  );
12198
- de(() => {
12204
+ ue(() => {
12199
12205
  w();
12200
12206
  }, [n, o, r]), ht(t, () => ({
12201
12207
  refresh: () => {
@@ -12212,8 +12218,8 @@ function Fh(e, t) {
12212
12218
  items: G,
12213
12219
  model: R,
12214
12220
  context: r
12215
- }), L = await A(W);
12216
- d(void 0), l(L), u(!1), p(!1);
12221
+ }), j = await A(W);
12222
+ d(void 0), l(j), u(!1), p(!1);
12217
12223
  } catch (_) {
12218
12224
  d(JSON.stringify(_));
12219
12225
  }
@@ -12262,44 +12268,44 @@ function Fh(e, t) {
12262
12268
  for (const G of _) {
12263
12269
  const { values: W } = G;
12264
12270
  if (W.action_id && W.action_id.length > 0) {
12265
- const L = parseInt(W.action_id[0], 10), N = es({
12266
- actionId: L,
12271
+ const j = parseInt(W.action_id[0], 10), M = es({
12272
+ actionId: j,
12267
12273
  rootContext: r
12268
12274
  }).then((k) => ({ ...G, actionData: k }));
12269
- $.push(N);
12275
+ $.push(M);
12270
12276
  }
12271
12277
  }
12272
12278
  return await Promise.all($);
12273
12279
  }
12274
- async function D(_) {
12280
+ async function V(_) {
12275
12281
  if (!m)
12276
12282
  return;
12277
- const $ = _.filter((L) => {
12278
- const N = a.find(
12279
- (X) => X.id === L.id
12283
+ const $ = _.filter((j) => {
12284
+ const M = a.find(
12285
+ (X) => X.id === j.id
12280
12286
  );
12281
- if (!N)
12287
+ if (!M)
12282
12288
  return !1;
12283
- if (!N.position)
12289
+ if (!M.position)
12284
12290
  return !0;
12285
12291
  const k = {
12286
- ...JSON.parse(N.position.replace(/'/g, '"')),
12287
- id: N.id
12292
+ ...JSON.parse(M.position.replace(/'/g, '"')),
12293
+ id: M.id
12288
12294
  };
12289
- return JSON.stringify(L) !== JSON.stringify(k);
12295
+ return JSON.stringify(j) !== JSON.stringify(k);
12290
12296
  });
12291
12297
  if ($.length === 0)
12292
12298
  return;
12293
- const G = a.filter((L) => $.map((N) => N.id).includes(L.id)).map((L) => {
12294
- const N = {
12295
- ...$.find((k) => k.id === L.id)
12299
+ const G = a.filter((j) => $.map((M) => M.id).includes(j.id)).map((j) => {
12300
+ const M = {
12301
+ ...$.find((k) => k.id === j.id)
12296
12302
  };
12297
- return delete N.id, { ...L }, {
12298
- ...L,
12303
+ return delete M.id, { ...j }, {
12304
+ ...j,
12299
12305
  operation: "pendingUpdate",
12300
12306
  values: {
12301
- ...L.values,
12302
- position: JSON.stringify(N).replace(/"/g, "'")
12307
+ ...j.values,
12308
+ position: JSON.stringify(M).replace(/"/g, "'")
12303
12309
  }
12304
12310
  };
12305
12311
  }), W = {
@@ -12317,54 +12323,54 @@ function Fh(e, t) {
12317
12323
  async function F() {
12318
12324
  h(s);
12319
12325
  }
12320
- return c ? /* @__PURE__ */ i(gt, {}) : f ? /* @__PURE__ */ i(nt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Th, { onPositionItemsChanged: D, children: a.map((_, $) => {
12321
- const { actionData: R, values: G } = _, { position: W, id: L } = G, {
12322
- actionId: N,
12326
+ return c ? /* @__PURE__ */ i(gt, {}) : f ? /* @__PURE__ */ i(nt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Th, { onPositionItemsChanged: V, children: a.map((_, $) => {
12327
+ const { actionData: R, values: G } = _, { position: W, id: j } = G, {
12328
+ actionId: M,
12323
12329
  actionType: k,
12324
12330
  key: X,
12325
12331
  title: te,
12326
- views: ie,
12332
+ views: oe,
12327
12333
  model: H,
12328
- context: ne,
12334
+ context: ie,
12329
12335
  domain: ee,
12330
- initialView: V,
12331
- limit: M
12336
+ initialView: N,
12337
+ limit: L
12332
12338
  } = R;
12333
- let j = {};
12339
+ let E = {};
12334
12340
  try {
12335
- j = JSON.parse(W.replace(/'/g, '"'));
12341
+ E = JSON.parse(W.replace(/'/g, '"'));
12336
12342
  } catch {
12337
- j = { x: $ * 2, y: 0, w: 2, h: 3 };
12343
+ E = { x: $ * 2, y: 0, w: 2, h: 3 };
12338
12344
  }
12339
- let fe = null;
12340
- if ((V == null ? void 0 : V.type) === "graph") {
12345
+ let de = null;
12346
+ if ((N == null ? void 0 : N.type) === "graph") {
12341
12347
  const ve = G.server_action === !0 && I ? as : on;
12342
- fe = /* @__PURE__ */ i(
12348
+ de = /* @__PURE__ */ i(
12343
12349
  ve,
12344
12350
  {
12345
- view_id: ie.filter(
12351
+ view_id: oe.filter(
12346
12352
  ($e) => $e[1] === "graph"
12347
12353
  )[0][0],
12348
12354
  model: H,
12349
- context: ne,
12355
+ context: ie,
12350
12356
  domain: ee,
12351
- limit: M
12357
+ limit: L
12352
12358
  },
12353
- L
12359
+ j
12354
12360
  );
12355
- } else if ((V == null ? void 0 : V.type) === "form")
12356
- fe = /* @__PURE__ */ i(Ah, { model: H, actionDomain: ee }, L);
12357
- else if ((V == null ? void 0 : V.type) === "tree")
12358
- fe = /* @__PURE__ */ i(
12361
+ } else if ((N == null ? void 0 : N.type) === "form")
12362
+ de = /* @__PURE__ */ i(Ah, { model: H, actionDomain: ee }, j);
12363
+ else if ((N == null ? void 0 : N.type) === "tree")
12364
+ de = /* @__PURE__ */ i(
12359
12365
  Oh,
12360
12366
  {
12361
12367
  model: H,
12362
12368
  domain: ee,
12363
- view_id: ie.filter(
12369
+ view_id: oe.filter(
12364
12370
  (me) => me[1] === "tree"
12365
12371
  )[0][0],
12366
12372
  onRowClicked: (me) => {
12367
- const ve = ie.find(($e) => {
12373
+ const ve = oe.find(($e) => {
12368
12374
  const [, Le] = $e;
12369
12375
  return Le === "form";
12370
12376
  });
@@ -12387,31 +12393,31 @@ function Fh(e, t) {
12387
12393
  }
12388
12394
  }
12389
12395
  },
12390
- L
12396
+ j
12391
12397
  );
12392
- else if (V !== void 0) {
12393
- const me = V && Array.isArray(V.id) ? { ...V, id: V.id[0] } : V;
12394
- fe = /* @__PURE__ */ i(
12398
+ else if (N !== void 0) {
12399
+ const me = N && Array.isArray(N.id) ? { ...N, id: N.id[0] } : N;
12400
+ de = /* @__PURE__ */ i(
12395
12401
  ca,
12396
12402
  {
12397
- action_id: N,
12403
+ action_id: M,
12398
12404
  action_type: k,
12399
12405
  tabKey: X,
12400
12406
  title: te,
12401
- views: ie,
12407
+ views: oe,
12402
12408
  model: H,
12403
- context: ne,
12409
+ context: ie,
12404
12410
  domain: ee,
12405
12411
  setCanWeClose: () => {
12406
12412
  },
12407
12413
  initialView: me,
12408
- limit: M
12414
+ limit: L
12409
12415
  },
12410
- L
12416
+ j
12411
12417
  );
12412
12418
  }
12413
12419
  let z;
12414
- const Y = ie.find((me) => {
12420
+ const Y = oe.find((me) => {
12415
12421
  const [, ve] = me;
12416
12422
  return ve === "tree";
12417
12423
  });
@@ -12436,14 +12442,14 @@ function Fh(e, t) {
12436
12442
  return /* @__PURE__ */ i(
12437
12443
  ls,
12438
12444
  {
12439
- id: L,
12445
+ id: j,
12440
12446
  title: te,
12441
- parms: j,
12447
+ parms: E,
12442
12448
  action: z,
12443
12449
  openAction: h,
12444
- children: fe
12450
+ children: de
12445
12451
  },
12446
- `griditem-${L}`
12452
+ `griditem-${j}`
12447
12453
  );
12448
12454
  }) });
12449
12455
  }
@@ -12451,7 +12457,7 @@ const Rh = pt(Fh), _h = (e) => {
12451
12457
  const { ooui: t } = e;
12452
12458
  return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(Vh, { ooui: t }) });
12453
12459
  }, Vh = (e) => {
12454
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((T) => T.operation !== "pendingRemove").map((T) => T.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: y, columns: v } = n, g = oe(He), { getContext: b } = g || {};
12460
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((T) => T.operation !== "pendingRemove").map((T) => T.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: y, columns: v } = n, g = re(He), { getContext: b } = g || {};
12455
12461
  yt(() => {
12456
12462
  I();
12457
12463
  }, [o]);
@@ -12476,7 +12482,7 @@ const Rh = pt(Fh), _h = (e) => {
12476
12482
  T = [...T, ...A];
12477
12483
  }
12478
12484
  try {
12479
- const D = (await P.getHandler().search({
12485
+ const V = (await P.getHandler().search({
12480
12486
  model: p,
12481
12487
  params: T,
12482
12488
  fieldsToRetrieve: [y],
@@ -12486,7 +12492,7 @@ const Rh = pt(Fh), _h = (e) => {
12486
12492
  let $ = _;
12487
12493
  return Array.isArray(_) && ($ = _[1]), { label: $, value: F.id };
12488
12494
  });
12489
- l(D);
12495
+ l(V);
12490
12496
  } catch (A) {
12491
12497
  u(A);
12492
12498
  } finally {
@@ -12503,12 +12509,12 @@ const Rh = pt(Fh), _h = (e) => {
12503
12509
  const A = o.map((F) => T.includes(F.id) ? F.operation == "pendingRemove" ? {
12504
12510
  ...F,
12505
12511
  operation: "original"
12506
- } : F : { id: F.id, operation: "pendingRemove" }), D = A.map((F) => F.id);
12507
- T.filter((F) => !D.includes(F)).map((F) => {
12512
+ } : F : { id: F.id, operation: "pendingRemove" }), V = A.map((F) => F.id);
12513
+ T.filter((F) => !V.includes(F)).map((F) => {
12508
12514
  A.push({ id: F, operation: "pendingLink" });
12509
12515
  }), x(A);
12510
12516
  };
12511
- return f && a.length === 0 ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ E("div", { className: "flex flex-row", children: [
12517
+ return f && a.length === 0 ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
12512
12518
  /* @__PURE__ */ i(
12513
12519
  pn.Group,
12514
12520
  {
@@ -12519,7 +12525,7 @@ const Rh = pt(Fh), _h = (e) => {
12519
12525
  children: /* @__PURE__ */ i(Ne, { children: a.map((T) => /* @__PURE__ */ i(be, { span: Math.floor(24 / v), children: /* @__PURE__ */ i(pn, { value: T.value, children: T.label }) })) })
12520
12526
  }
12521
12527
  ),
12522
- !m && /* @__PURE__ */ E(Xe, { children: [
12528
+ !m && /* @__PURE__ */ D(Xe, { children: [
12523
12529
  /* @__PURE__ */ i(
12524
12530
  je,
12525
12531
  {
@@ -12569,7 +12575,7 @@ const Rh = pt(Fh), _h = (e) => {
12569
12575
  const { ooui: t } = e, { required: n } = t;
12570
12576
  return /* @__PURE__ */ i(Re, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Lh, { ...e }) });
12571
12577
  }, Lh = (e) => {
12572
- const { ooui: t, value: n } = e, { selectionValues: r, errorField: o } = t, s = oe(He), a = Array.from(r.entries()), l = a.map((f) => f[0]).indexOf(n);
12578
+ const { ooui: t, value: n } = e, { selectionValues: r, errorField: o } = t, s = re(He), a = Array.from(r.entries()), l = a.map((f) => f[0]).indexOf(n);
12573
12579
  let c = "process", u = "";
12574
12580
  return o && (u = s.getFieldValue(o), u && (c = "error")), /* @__PURE__ */ i(xo, { current: l, status: c, children: a.map((f, d) => /* @__PURE__ */ i(
12575
12581
  xo.Step,
@@ -12629,13 +12635,13 @@ const Rh = pt(Fh), _h = (e) => {
12629
12635
  borderTop: "16px solid transparent",
12630
12636
  borderBottom: "16px solid transparent"
12631
12637
  });
12632
- return /* @__PURE__ */ i("ul", { style: c, children: (e.value || []).map((p, h) => /* @__PURE__ */ E("li", { style: u(p.active), children: [
12638
+ return /* @__PURE__ */ i("ul", { style: c, children: (e.value || []).map((p, h) => /* @__PURE__ */ D("li", { style: u(p.active), children: [
12633
12639
  p.title,
12634
12640
  /* @__PURE__ */ i("div", { style: f }),
12635
12641
  /* @__PURE__ */ i("div", { style: d(p.active) })
12636
12642
  ] }, h)) });
12637
12643
  }, Bh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(jh, {}) }), Hh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Uh, { ...e }) }), Uh = (e) => {
12638
- const { ooui: t, value: n, onChange: r } = e, { lang: o, height: s, readOnly: a } = t, l = oe(He), { elementHasLostFocus: c } = l || {}, u = B(
12644
+ const { ooui: t, value: n, onChange: r } = e, { lang: o, height: s, readOnly: a } = t, l = re(He), { elementHasLostFocus: c } = l || {}, u = B(
12639
12645
  (d) => {
12640
12646
  c && d.onDidBlurEditorWidget(() => c());
12641
12647
  },
@@ -12671,20 +12677,20 @@ const Rh = pt(Fh), _h = (e) => {
12671
12677
  function qh({ text: e }) {
12672
12678
  const t = e.split(`
12673
12679
  `);
12674
- return /* @__PURE__ */ i("div", { children: t.map((n, r) => /* @__PURE__ */ E(Jt, { children: [
12680
+ return /* @__PURE__ */ i("div", { children: t.map((n, r) => /* @__PURE__ */ D(Jt, { children: [
12675
12681
  n,
12676
12682
  r !== t.length - 1 && /* @__PURE__ */ i("br", {})
12677
12683
  ] }, r)) });
12678
12684
  }
12679
12685
  const Yh = (e) => {
12680
12686
  const { data: t, style: n } = e, { t: r } = he();
12681
- return /* @__PURE__ */ E(Nr, { style: { ...n, textAlign: "start" }, children: [
12687
+ return /* @__PURE__ */ D(Nr, { style: { ...n, textAlign: "start" }, children: [
12682
12688
  /* @__PURE__ */ i(
12683
12689
  Wh,
12684
12690
  {
12685
12691
  avatar: /* @__PURE__ */ i(Kh, { email: t.email, theme: "mp" }),
12686
12692
  title: t.author,
12687
- description: /* @__PURE__ */ E(Xe, { direction: "horizontal", children: [
12693
+ description: /* @__PURE__ */ D(Xe, { direction: "horizontal", children: [
12688
12694
  /* @__PURE__ */ i("span", { title: t.date, children: st(t.date).fromNow() }),
12689
12695
  t.isAuthor && /* @__PURE__ */ i(xi, { color: "blue", children: r("author") })
12690
12696
  ] }),
@@ -12780,70 +12786,70 @@ function ng(e, t) {
12780
12786
  res_id: T,
12781
12787
  domain: A = []
12782
12788
  }) {
12783
- const D = await P.getHandler().getActionData({
12789
+ const V = await P.getHandler().getActionData({
12784
12790
  action: I,
12785
12791
  context: l
12786
12792
  });
12787
- if (D.type === "ir.actions.wizard") {
12793
+ if (V.type === "ir.actions.wizard") {
12788
12794
  it("Action type not supported");
12789
12795
  return;
12790
12796
  }
12791
12797
  const [F, _] = I.split(","), $ = parseInt(_), R = Et({
12792
- context: D.context,
12798
+ context: V.context,
12793
12799
  values: a,
12794
12800
  fields: {}
12795
- }), G = D.domain ? await P.getHandler().evalDomain({
12796
- domain: D.domain,
12801
+ }), G = V.domain ? await P.getHandler().evalDomain({
12802
+ domain: V.domain,
12797
12803
  values: a,
12798
12804
  context: { ...l, ...R }
12799
12805
  }) : [], {
12800
12806
  res_model: W,
12801
- views: L,
12802
- name: N,
12807
+ views: j,
12808
+ name: M,
12803
12809
  target: k,
12804
12810
  view_type: X,
12805
12811
  limit: te
12806
- } = D, ie = X === "tree", H = [];
12807
- for (const ee of L) {
12808
- const [V, M] = ee;
12809
- if (V)
12812
+ } = V, oe = X === "tree", H = [];
12813
+ for (const ee of j) {
12814
+ const [N, L] = ee;
12815
+ if (N)
12810
12816
  H.push(ee);
12811
- else if (M === "dashboard")
12817
+ else if (L === "dashboard")
12812
12818
  H.push([void 0, "dashboard"]);
12813
12819
  else {
12814
- const { view_id: j } = await P.getHandler().getView({
12820
+ const { view_id: E } = await P.getHandler().getView({
12815
12821
  model: W,
12816
- type: M,
12817
- id: V,
12822
+ type: L,
12823
+ id: N,
12818
12824
  context: { ...l, ...R }
12819
12825
  });
12820
- H.push([j, M]);
12826
+ H.push([E, L]);
12821
12827
  }
12822
12828
  }
12823
- let ne;
12829
+ let ie;
12824
12830
  if (C) {
12825
- const [ee, V] = H.find(
12826
- ([M, j]) => j === C
12831
+ const [ee, N] = H.find(
12832
+ ([L, E]) => E === C
12827
12833
  );
12828
- ne = { id: ee, type: V };
12834
+ ie = { id: ee, type: N };
12829
12835
  } else {
12830
- const [ee, V] = H[0];
12831
- ne = { id: ee, type: V };
12836
+ const [ee, N] = H[0];
12837
+ ie = { id: ee, type: N };
12832
12838
  }
12833
12839
  x({
12834
12840
  domain: [...G, ...A],
12835
12841
  context: { ...l, ...R },
12836
12842
  model: W,
12837
12843
  views: H,
12838
- title: N,
12844
+ title: M,
12839
12845
  target: k,
12840
- initialView: ne,
12846
+ initialView: ie,
12841
12847
  action_type: F,
12842
12848
  action_id: $,
12843
12849
  values: w,
12844
12850
  forced_values: O,
12845
12851
  res_id: T,
12846
- treeExpandable: ie,
12852
+ treeExpandable: oe,
12847
12853
  limit: te
12848
12854
  });
12849
12855
  }
@@ -12874,14 +12880,14 @@ function ng(e, t) {
12874
12880
  }) {
12875
12881
  const {
12876
12882
  res_model: A,
12877
- context: D,
12883
+ context: V,
12878
12884
  domain: F,
12879
12885
  views: _,
12880
12886
  target: $,
12881
12887
  string: R,
12882
12888
  limit: G
12883
- } = I, [W, L] = _[0], N = { id: W, type: L }, k = Et({
12884
- context: D,
12889
+ } = I, [W, j] = _[0], M = { id: W, type: j }, k = Et({
12890
+ context: V,
12885
12891
  values: { ...O, ...a },
12886
12892
  fields: w
12887
12893
  }), X = F ? await P.getHandler().evalDomain({
@@ -12900,7 +12906,7 @@ function ng(e, t) {
12900
12906
  context: { ...l, ...k },
12901
12907
  domain: X,
12902
12908
  title: R,
12903
- initialView: N,
12909
+ initialView: M,
12904
12910
  action_id: C,
12905
12911
  action_type: T,
12906
12912
  limit: G
@@ -12913,56 +12919,56 @@ function ng(e, t) {
12913
12919
  res_id: C,
12914
12920
  view_id: T,
12915
12921
  overrideUnsettedLimit: A = !1,
12916
- values: D = {}
12922
+ values: V = {}
12917
12923
  } = I, F = `${O},${w}`, _ = await P.getHandler().getActionData({
12918
12924
  action: F,
12919
12925
  context: l
12920
12926
  }), $ = Et({
12921
12927
  context: _.context,
12922
- values: { ...a, ...D },
12928
+ values: { ...a, ...V },
12923
12929
  fields: {}
12924
12930
  }), R = _.domain ? await P.getHandler().evalDomain({
12925
12931
  domain: _.domain,
12926
- values: { ...a, ...D },
12932
+ values: { ...a, ...V },
12927
12933
  context: { ...l, ...$ }
12928
12934
  }) : [], {
12929
12935
  res_model: G,
12930
12936
  views: W,
12931
- name: L,
12932
- target: N,
12937
+ name: j,
12938
+ target: M,
12933
12939
  view_type: k,
12934
12940
  limit: X
12935
- } = _, te = k === "tree", ie = [];
12936
- for (const V of W) {
12937
- const [M, j] = V;
12938
- if (M)
12939
- ie.push(V);
12940
- else if (j === "dashboard")
12941
- ie.push([void 0, "dashboard"]);
12941
+ } = _, te = k === "tree", oe = [];
12942
+ for (const N of W) {
12943
+ const [L, E] = N;
12944
+ if (L)
12945
+ oe.push(N);
12946
+ else if (E === "dashboard")
12947
+ oe.push([void 0, "dashboard"]);
12942
12948
  else {
12943
- const { view_id: fe } = await P.getHandler().getView({
12949
+ const { view_id: de } = await P.getHandler().getView({
12944
12950
  model: G,
12945
- type: j,
12946
- id: M,
12951
+ type: E,
12952
+ id: L,
12947
12953
  context: { ...l, ...$ }
12948
12954
  });
12949
- ie.push([fe, j]);
12955
+ oe.push([de, E]);
12950
12956
  }
12951
12957
  }
12952
- let H, ne;
12958
+ let H, ie;
12953
12959
  if (T == null) {
12954
- const V = ie.find((M) => M[0] === void 0);
12955
- H = void 0, ne = V[1];
12960
+ const N = oe.find((L) => L[0] === void 0);
12961
+ H = void 0, ie = N[1];
12956
12962
  } else
12957
- [H, ne] = ie.find((V) => V[0] === void 0 ? !1 : V[0] === T);
12958
- const ee = { id: H, type: ne };
12963
+ [H, ie] = oe.find((N) => N[0] === void 0 ? !1 : N[0] === T);
12964
+ const ee = { id: H, type: ie };
12959
12965
  x({
12960
12966
  domain: R,
12961
12967
  context: { ...l, ...$ },
12962
12968
  model: G,
12963
- views: ie,
12964
- title: L,
12965
- target: N,
12969
+ views: oe,
12970
+ title: j,
12971
+ target: M,
12966
12972
  initialView: ee,
12967
12973
  action_id: w,
12968
12974
  action_type: O,
@@ -12979,9 +12985,9 @@ function ng(e, t) {
12979
12985
  res_id: T,
12980
12986
  domain: A
12981
12987
  }) {
12982
- const D = await P.getHandler().getActionStringForModel(I);
12988
+ const V = await P.getHandler().getActionStringForModel(I);
12983
12989
  await m({
12984
- action: D,
12990
+ action: V,
12985
12991
  values: w,
12986
12992
  forced_values: O,
12987
12993
  initialViewType: C,
@@ -12996,21 +13002,21 @@ function ng(e, t) {
12996
13002
  views: C,
12997
13003
  title: T,
12998
13004
  target: A,
12999
- initialView: D,
13005
+ initialView: V,
13000
13006
  action_id: F,
13001
13007
  action_type: _,
13002
13008
  res_id: $,
13003
13009
  values: R,
13004
13010
  forced_values: G,
13005
13011
  treeExpandable: W = !1,
13006
- limit: L
13012
+ limit: j
13007
13013
  }) {
13008
- const N = Xr();
13014
+ const M = Xr();
13009
13015
  if (A !== "current") {
13010
13016
  const k = await P.getHandler().getView({
13011
13017
  model: O,
13012
13018
  type: "form",
13013
- id: D.type === "form" ? D.id : void 0,
13019
+ id: V.type === "form" ? V.id : void 0,
13014
13020
  context: { ...l, ...w }
13015
13021
  });
13016
13022
  d.current.openActionModal({
@@ -13026,7 +13032,7 @@ function ng(e, t) {
13026
13032
  }
13027
13033
  });
13028
13034
  } else {
13029
- const k = D && Array.isArray(D.id) ? { ...D, id: D.id[0] } : D;
13035
+ const k = V && Array.isArray(V.id) ? { ...V, id: V.id[0] } : V;
13030
13036
  y({
13031
13037
  title: T,
13032
13038
  action: {
@@ -13038,7 +13044,7 @@ function ng(e, t) {
13038
13044
  {
13039
13045
  action_id: F,
13040
13046
  action_type: _,
13041
- tabKey: N,
13047
+ tabKey: M,
13042
13048
  title: T,
13043
13049
  views: C,
13044
13050
  model: O,
@@ -13050,10 +13056,10 @@ function ng(e, t) {
13050
13056
  formDefaultValues: R,
13051
13057
  formForcedValues: G,
13052
13058
  treeExpandable: W,
13053
- limit: L
13059
+ limit: j
13054
13060
  }
13055
13061
  ),
13056
- key: N
13062
+ key: M
13057
13063
  });
13058
13064
  }
13059
13065
  }
@@ -13087,7 +13093,7 @@ function ng(e, t) {
13087
13093
  const ny = pt(ng), { useToken: rg } = Ge;
13088
13094
  function og(e) {
13089
13095
  const { label: t, onClose: n, tabKey: r, isActive: o, onSelected: s } = e, { token: a } = rg(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
13090
- return /* @__PURE__ */ E(
13096
+ return /* @__PURE__ */ D(
13091
13097
  "div",
13092
13098
  {
13093
13099
  onClick: () => {
@@ -13157,7 +13163,7 @@ function og(e) {
13157
13163
  );
13158
13164
  }
13159
13165
  function ry() {
13160
- const e = oe(
13166
+ const e = re(
13161
13167
  wt
13162
13168
  ), { activeKey: t, tabs: n, onRemoveTab: r, onChangeTab: o } = e || {};
13163
13169
  return /* @__PURE__ */ i(ae, { children: n.map((s) => /* @__PURE__ */ i(
@@ -13173,7 +13179,7 @@ function ry() {
13173
13179
  )) });
13174
13180
  }
13175
13181
  function ig(e) {
13176
- const { tab: t } = e, n = oe(
13182
+ const { tab: t } = e, n = re(
13177
13183
  wt
13178
13184
  ), { activeKey: r } = n || {}, o = {
13179
13185
  display: "none"
@@ -13182,7 +13188,7 @@ function ig(e) {
13182
13188
  }
13183
13189
  const sg = dt.memo(ig, () => !0);
13184
13190
  function oy() {
13185
- const e = oe(
13191
+ const e = re(
13186
13192
  wt
13187
13193
  ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((r) => /* @__PURE__ */ i(sg, { tab: r }, r.key))) || null;
13188
13194
  return /* @__PURE__ */ i(ae, { children: n });
@@ -13194,7 +13200,7 @@ const { useToken: ag } = Ge, iy = (e) => {
13194
13200
  onAddFavourite: r,
13195
13201
  onRemoveFavourite: o,
13196
13202
  onDropdownClosed: s
13197
- } = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = ag(), p = Q(null), h = oe(
13203
+ } = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = ag(), p = Q(null), h = re(
13198
13204
  wt
13199
13205
  ), {
13200
13206
  openShortcut: m,
@@ -13223,7 +13229,7 @@ const { useToken: ag } = Ge, iy = (e) => {
13223
13229
  if (I)
13224
13230
  return JSON.stringify(I);
13225
13231
  }, [I]);
13226
- de(() => {
13232
+ ue(() => {
13227
13233
  C();
13228
13234
  }, [w]);
13229
13235
  function O(F) {
@@ -13257,7 +13263,7 @@ const { useToken: ag } = Ge, iy = (e) => {
13257
13263
  }))
13258
13264
  }
13259
13265
  ];
13260
- }, [t, f]), D = B(async () => {
13266
+ }, [t, f]), V = B(async () => {
13261
13267
  if (a && c)
13262
13268
  await o(c);
13263
13269
  else {
@@ -13293,10 +13299,10 @@ const { useToken: ag } = Ge, iy = (e) => {
13293
13299
  {
13294
13300
  ref: p,
13295
13301
  isFavourite: a,
13296
- onToggleFavourite: D,
13302
+ onToggleFavourite: V,
13297
13303
  onItemClick: O,
13298
13304
  placement: "bottomRight",
13299
- header: /* @__PURE__ */ E("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
13305
+ header: /* @__PURE__ */ D("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
13300
13306
  /* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
13301
13307
  /* @__PURE__ */ i("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ i(At, { title: f == null ? void 0 : f("edit_favorites"), children: /* @__PURE__ */ i(
13302
13308
  ji,