@gisce/react-ooui 2.22.0-alpha.1 → 2.22.0-alpha.2

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.
@@ -2,13 +2,13 @@ var Ki = Object.defineProperty;
2
2
  var Ui = (e, t, n) => t in e ? Ki(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var kr = (e, t, n) => (Ui(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { jsxs as k, jsx as i, Fragment as se } from "react/jsx-runtime";
5
- import it, { useContext as te, useState as C, useEffect as fe, useRef as Q, memo as or, useMemo as Ce, useCallback as U, createContext as Gi, forwardRef as ct, useImperativeHandle as lt, createElement as qi, Fragment as $t } from "react";
6
- import { Tooltip as Ct, theme as We, Typography as Tt, Form as st, Row as _e, Col as be, Modal as et, Button as Pe, Dropdown as Yi, Menu as Mr, Spin as $e, Divider as Cn, Space as ze, Input as ot, Select as At, Checkbox as tn, Alert as Qe, Timeline as Kn, Statistic as zi, Card as ir, Tag as mo, message as Ln, DatePicker as sr, TimePicker as Ji, InputNumber as ho, Progress as Xi, Avatar as po, Pagination as Qi, Badge as ar, Tabs as go, Layout as yo, Radio as Pr, Switch as Zi, Steps as Nr } from "antd";
5
+ import it, { useContext as te, useState as C, useEffect as fe, useRef as Z, memo as or, useMemo as Ce, useCallback as U, createContext as Gi, forwardRef as ct, useImperativeHandle as lt, createElement as qi, Fragment as $t } from "react";
6
+ import { Tooltip as Ct, theme as We, Typography as Tt, Form as st, Row as De, Col as be, Modal as et, Button as Me, Dropdown as Yi, Menu as Mr, Spin as $e, Divider as Cn, Space as ze, Input as ot, Select as At, Checkbox as tn, Alert as Qe, Timeline as Kn, Statistic as zi, Card as ir, Tag as mo, message as Ln, DatePicker as sr, TimePicker as Ji, InputNumber as ho, Progress as Xi, Avatar as po, Pagination as Qi, Badge as ar, Tabs as go, Layout as yo, Radio as Pr, Switch as Zi, Steps as Nr } from "antd";
7
7
  import { Label as jt, Field as Un, Tree as wo, Reference as es, Selection as cr, Many2one as vo, Boolean as ts, parseContext as Rt, graphProcessor as bo, graphFieldUtils as ns, parseGraph as Co, Container as rs, Form as So, Integer as Gn, SearchFieldTypes as vt, SearchFilter as xo, parseContextFields as os, parseDomainFields as is, transformDomainForChildWidget as lr } from "@gisce/ooui";
8
8
  import * as Lr from "@ant-design/icons";
9
9
  import To, { QuestionCircleOutlined as Fo, ExclamationCircleOutlined as Ft, LoadingOutlined as pt, DownOutlined as Sn, WarningOutlined as Io, CloseOutlined as Wt, CheckOutlined as xn, TranslationOutlined as Oo, FolderOpenOutlined as dr, DownloadOutlined as ur, ClearOutlined as Tn, ExportOutlined as ss, StarFilled as as, StarOutlined as cs, UpOutlined as ls, SearchOutlined as Fn, ThunderboltOutlined as fr, PrinterOutlined as mr, EnterOutlined as hr, PlusSquareOutlined as ds, MinusSquareOutlined as us, FileAddOutlined as In, AlignLeftOutlined as fs, ApiOutlined as ms, DeleteOutlined as pr, LeftOutlined as Ro, RightOutlined as Vo, EyeOutlined as hs, FormOutlined as nn, TableOutlined as gr, AreaChartOutlined as ps, CalendarOutlined as gs, LinkOutlined as $r, SaveOutlined as ys, CopyOutlined as yr, InfoCircleOutlined as Ao, ReloadOutlined as On, EditOutlined as _o, PlusOutlined as ws, FilterOutlined as Do, CloseCircleFilled as vs, BorderOuterOutlined as bs, SettingOutlined as Cs } from "@ant-design/icons";
10
10
  import { Interweave as rn } from "interweave";
11
- import { useLocale as pe, FormigaConfigProvider as Ss, mergeStrings as xs, Many2OneSuffix as Ts, Many2OneSuffixModal as Hr, FieldSet as Fs, ExportModal as Is, Dropdown as Eo, DropdownButton as Nt, HTMLPreview as Os, FavouriteButton as Rs } from "@gisce/react-formiga-components";
11
+ import { useLocale as ge, FormigaConfigProvider as Ss, mergeStrings as xs, Many2OneSuffix as Ts, Many2OneSuffixModal as Hr, FieldSet as Fs, ExportModal as Is, Dropdown as Eo, DropdownButton as Nt, HTMLPreview as Os, FavouriteButton as Rs } from "@gisce/react-formiga-components";
12
12
  import * as Br from "@tabler/icons-react";
13
13
  import Vs from "antd/lib/input/TextArea";
14
14
  import Kt from "styled-components";
@@ -76,7 +76,7 @@ const { Text: sa, Title: aa } = Tt, { useToken: ca } = We, la = {
76
76
  }
77
77
  );
78
78
  };
79
- function Ie({
79
+ function Fe({
80
80
  ooui: e,
81
81
  children: t,
82
82
  layout: n = "horizontal",
@@ -87,7 +87,7 @@ function Ie({
87
87
  type: c,
88
88
  validator: d
89
89
  }) {
90
- const { id: u, label: f, tooltip: l } = e, { t: h } = pe(), p = a ? [
90
+ const { id: u, label: f, tooltip: l } = e, { t: h } = ge(), p = a ? [
91
91
  {
92
92
  required: !0,
93
93
  message: h("fillRequiredField"),
@@ -119,7 +119,7 @@ function Ie({
119
119
  align: s
120
120
  }
121
121
  );
122
- return n === "horizontal" ? (() => /* @__PURE__ */ k(_e, { align: "middle", className: "pb-1 pt-1", children: [
122
+ return n === "horizontal" ? (() => /* @__PURE__ */ k(De, { align: "middle", className: "pb-1 pt-1", children: [
123
123
  /* @__PURE__ */ i(be, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-end", children: g }) }),
124
124
  /* @__PURE__ */ i(be, { flex: "auto", children: m() })
125
125
  ] }))() : (() => /* @__PURE__ */ k(se, { children: [
@@ -319,7 +319,7 @@ const No = (e) => {
319
319
  icon: c,
320
320
  context: d,
321
321
  readOnly: u
322
- } = t, f = te(He), { executeButtonAction: l } = f || {}, [h, p] = C(!1), { t: m } = pe();
322
+ } = t, f = te(He), { executeButtonAction: l } = f || {}, [h, p] = C(!1), { t: m } = ge();
323
323
  async function g() {
324
324
  p(!0), await l({ type: s, action: n, context: d }), p(!1);
325
325
  }
@@ -344,8 +344,8 @@ const No = (e) => {
344
344
  return S && /* @__PURE__ */ i(S, {});
345
345
  }
346
346
  }
347
- return /* @__PURE__ */ i(Ie, { ooui: t, children: /* @__PURE__ */ i(
348
- Pe,
347
+ return /* @__PURE__ */ i(Fe, { ooui: t, children: /* @__PURE__ */ i(
348
+ Me,
349
349
  {
350
350
  block: !0,
351
351
  disabled: !r || u || h,
@@ -368,7 +368,7 @@ const No = (e) => {
368
368
  primary: f,
369
369
  context: l,
370
370
  readOnly: h
371
- } = n || {}, p = te(He), { executeButtonAction: m } = p || {}, [g, w] = C(!1), { t: y } = pe();
371
+ } = n || {}, p = te(He), { executeButtonAction: m } = p || {}, [g, w] = C(!1), { t: y } = ge();
372
372
  function S() {
373
373
  if (g)
374
374
  return /* @__PURE__ */ i(pt, {});
@@ -396,7 +396,7 @@ const No = (e) => {
396
396
  if (t.buttons.length === 0)
397
397
  return null;
398
398
  if (t.buttons.length > 1)
399
- return /* @__PURE__ */ i(Ie, { ooui: new Un({ defaultButton: n }), children: /* @__PURE__ */ k(
399
+ return /* @__PURE__ */ i(Fe, { ooui: new Un({ defaultButton: n }), children: /* @__PURE__ */ k(
400
400
  Yi.Button,
401
401
  {
402
402
  disabled: !a || h,
@@ -419,7 +419,7 @@ const No = (e) => {
419
419
  if (n)
420
420
  return /* @__PURE__ */ i(No, { ooui: n });
421
421
  }, ha = (e) => {
422
- const { t } = pe(), { ooui: n, executeButtonAction: o } = e;
422
+ const { t } = ge(), { ooui: n, executeButtonAction: o } = e;
423
423
  if (!n)
424
424
  return null;
425
425
  const r = n.map((s) => {
@@ -534,7 +534,7 @@ const Lo = (e) => {
534
534
  content: t
535
535
  });
536
536
  }, $o = (e) => {
537
- const { visible: t, onCloseModal: n, model: o, id: r, field: s, onSubmitSucceed: a } = e, { modalWidth: c } = Vn(), { t: d } = pe(), [u, f] = C([]), [l, h] = C(!1), [p, m] = C(!1), [g, w] = C({}), y = Q();
537
+ const { visible: t, onCloseModal: n, model: o, id: r, field: s, onSubmitSucceed: a } = e, { modalWidth: c } = Vn(), { t: d } = ge(), [u, f] = C([]), [l, h] = C(!1), [p, m] = C(!1), [g, w] = C({}), y = Z();
538
538
  fe(() => {
539
539
  t ? S() : w({});
540
540
  }, [t]);
@@ -573,7 +573,7 @@ const Lo = (e) => {
573
573
  y.current = T, w(T);
574
574
  }
575
575
  function v() {
576
- return u.map((R, T) => /* @__PURE__ */ k(_e, { style: { paddingBottom: 20 }, children: [
576
+ return u.map((R, T) => /* @__PURE__ */ k(De, { style: { paddingBottom: 20 }, children: [
577
577
  /* @__PURE__ */ i(be, { flex: "8rem", style: { paddingRight: 10 }, children: R.name }),
578
578
  /* @__PURE__ */ i(be, { flex: "auto", children: /* @__PURE__ */ i(
579
579
  Vs,
@@ -613,9 +613,9 @@ const Lo = (e) => {
613
613
  return l ? /* @__PURE__ */ i($e, {}) : /* @__PURE__ */ k(se, { children: [
614
614
  v(),
615
615
  /* @__PURE__ */ i(Cn, {}),
616
- /* @__PURE__ */ i(_e, { justify: "end", children: /* @__PURE__ */ k(ze, { children: [
616
+ /* @__PURE__ */ i(De, { justify: "end", children: /* @__PURE__ */ k(ze, { children: [
617
617
  /* @__PURE__ */ i(
618
- Pe,
618
+ Me,
619
619
  {
620
620
  icon: /* @__PURE__ */ i(Wt, {}),
621
621
  onClick: n,
@@ -624,7 +624,7 @@ const Lo = (e) => {
624
624
  }
625
625
  ),
626
626
  /* @__PURE__ */ i(
627
- Pe,
627
+ Me,
628
628
  {
629
629
  icon: p ? /* @__PURE__ */ i(pt, {}) : /* @__PURE__ */ i(xn, {}),
630
630
  disabled: p,
@@ -655,7 +655,7 @@ const Lo = (e) => {
655
655
  };
656
656
  function Xe(e) {
657
657
  const { tooltip: t, ...n } = e;
658
- return /* @__PURE__ */ i(Ct, { title: t, children: /* @__PURE__ */ i(Pe, { ...n }) });
658
+ return /* @__PURE__ */ i(Ct, { title: t, children: /* @__PURE__ */ i(Me, { ...n }) });
659
659
  }
660
660
  const { info: wa } = et, wt = (e) => {
661
661
  wa({
@@ -673,7 +673,7 @@ const { info: wa } = et, wt = (e) => {
673
673
  isSearchField: n
674
674
  }
675
675
  );
676
- return a && !r && !n && (u = /* @__PURE__ */ i(Ca, { field: o, requiredStyle: d })), /* @__PURE__ */ i(Ie, { required: s, ...e, children: u });
676
+ return a && !r && !n && (u = /* @__PURE__ */ i(Ca, { field: o, requiredStyle: d })), /* @__PURE__ */ i(Fe, { required: s, ...e, children: u });
677
677
  }, ba = ({
678
678
  value: e,
679
679
  ooui: t,
@@ -722,7 +722,7 @@ const { info: wa } = et, wt = (e) => {
722
722
  fetchValues: c,
723
723
  formHasChanges: d,
724
724
  elementHasLostFocus: u
725
- } = r || {}, [f, l] = C(!1), { t: h } = pe();
725
+ } = r || {}, [f, l] = C(!1), { t: h } = ge();
726
726
  return s ? /* @__PURE__ */ k(se, { children: [
727
727
  /* @__PURE__ */ i(
728
728
  "div",
@@ -764,7 +764,7 @@ const { info: wa } = et, wt = (e) => {
764
764
  }
765
765
  }
766
766
  )
767
- ] }) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ k(_e, { gutter: 8, wrap: !1, children: [
767
+ ] }) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ k(De, { gutter: 8, wrap: !1, children: [
768
768
  /* @__PURE__ */ i(be, { flex: "auto", children: /* @__PURE__ */ i(
769
769
  ot,
770
770
  {
@@ -791,7 +791,7 @@ const { info: wa } = et, wt = (e) => {
791
791
  ] }) });
792
792
  }, { defaultAlgorithm: Sa, defaultSeed: xa } = We, Ta = Sa(xa), { Option: Fa } = At, Bo = (e) => {
793
793
  const { ooui: t } = e, { required: n } = t;
794
- return /* @__PURE__ */ i(Ie, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(jo, { ...e }) });
794
+ return /* @__PURE__ */ i(Fe, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(jo, { ...e }) });
795
795
  }, jo = (e) => {
796
796
  const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, required: a } = t, c = Array.from(r.entries()), d = c && c.length && c.map((f) => {
797
797
  const [l, h] = f;
@@ -815,7 +815,7 @@ const { info: wa } = et, wt = (e) => {
815
815
  }
816
816
  `, { defaultAlgorithm: Oa, defaultSeed: Ra } = We, Gr = Oa(Ra), Va = (e) => {
817
817
  const { ooui: t } = e, { id: n, readOnly: o, required: r } = t;
818
- return /* @__PURE__ */ i(Ie, { ...e, valuePropName: "checked", children: /* @__PURE__ */ i(Aa, { id: n, readOnly: o, required: r }) });
818
+ return /* @__PURE__ */ i(Fe, { ...e, valuePropName: "checked", children: /* @__PURE__ */ i(Aa, { id: n, readOnly: o, required: r }) });
819
819
  }, Aa = (e) => {
820
820
  const { required: t, readOnly: n, ...o } = e;
821
821
  return /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(t && !n ? _a : tn, { disabled: n, ...o }) });
@@ -854,9 +854,9 @@ function An(e, t) {
854
854
  }
855
855
  const Ea = (e) => {
856
856
  const { ooui: t } = e, { required: n, id: o } = t, r = ut(o);
857
- return r ? /* @__PURE__ */ i(r, {}) : /* @__PURE__ */ i(Ie, { required: n, ...e, children: /* @__PURE__ */ i(ka, { ooui: t }) });
857
+ return r ? /* @__PURE__ */ i(r, {}) : /* @__PURE__ */ i(Fe, { required: n, ...e, children: /* @__PURE__ */ i(ka, { ooui: t }) });
858
858
  }, ka = (e) => {
859
- const { ooui: t, value: n, onChange: o } = e, { readOnly: r } = t, s = Q(null), { t: a } = pe(), c = (l) => {
859
+ const { ooui: t, value: n, onChange: o } = e, { readOnly: r } = t, s = Z(null), { t: a } = ge(), c = (l) => {
860
860
  o == null || o(l);
861
861
  };
862
862
  async function d() {
@@ -872,7 +872,7 @@ const Ea = (e) => {
872
872
  c(void 0);
873
873
  }
874
874
  return /* @__PURE__ */ k(se, { children: [
875
- /* @__PURE__ */ k(_e, { gutter: 8, wrap: !1, justify: "center", children: [
875
+ /* @__PURE__ */ k(De, { gutter: 8, wrap: !1, justify: "center", children: [
876
876
  n && /* @__PURE__ */ i(
877
877
  "img",
878
878
  {
@@ -892,7 +892,7 @@ const Ea = (e) => {
892
892
  }
893
893
  )
894
894
  ] }),
895
- /* @__PURE__ */ i(_e, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ k(ze, { children: [
895
+ /* @__PURE__ */ i(De, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ k(ze, { children: [
896
896
  /* @__PURE__ */ i(
897
897
  Xe,
898
898
  {
@@ -926,7 +926,7 @@ const Ea = (e) => {
926
926
  ] });
927
927
  }, Ma = (e) => {
928
928
  const { ooui: t } = e, { required: n } = t;
929
- return /* @__PURE__ */ i(Ie, { required: n, ...e, children: /* @__PURE__ */ i(Pa, {}) });
929
+ return /* @__PURE__ */ i(Fe, { required: n, ...e, children: /* @__PURE__ */ i(Pa, {}) });
930
930
  }, Pa = (e) => {
931
931
  const { value: t, onChange: n } = e;
932
932
  if (!t)
@@ -1153,7 +1153,7 @@ const Ka = (e) => {
1153
1153
  a(!1);
1154
1154
  }
1155
1155
  };
1156
- return s ? /* @__PURE__ */ i($e, {}) : c ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ie, { type: "array", ...e, children: /* @__PURE__ */ i(Ua, { ooui: t, views: u }) });
1156
+ return s ? /* @__PURE__ */ i($e, {}) : c ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(Fe, { type: "array", ...e, children: /* @__PURE__ */ i(Ua, { ooui: t, views: u }) });
1157
1157
  }, Ua = (e) => {
1158
1158
  const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, c] = C(!1), [d, u] = C(), [f, l] = C(!1), [h, p] = C(), { relation: m, context: g, readOnly: w, summaryField: y, titleField: S } = o, I = s.filter((R) => R.values), b = te(He), { getContext: v } = b || {};
1159
1159
  dt(() => {
@@ -1716,7 +1716,7 @@ const Qa = (e) => {
1716
1716
  }
1717
1717
  );
1718
1718
  }, Ue = (e) => {
1719
- const t = Q(/* @__PURE__ */ new Map());
1719
+ const t = Z(/* @__PURE__ */ new Map());
1720
1720
  fe(() => () => {
1721
1721
  n();
1722
1722
  }, []);
@@ -1869,7 +1869,7 @@ function ec({
1869
1869
  flexDirection: "column",
1870
1870
  padding: "0.2rem"
1871
1871
  },
1872
- children: /* @__PURE__ */ k(_e, { align: "middle", children: [
1872
+ children: /* @__PURE__ */ k(De, { align: "middle", children: [
1873
1873
  g && /* @__PURE__ */ i(be, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ i(g, {}) }),
1874
1874
  /* @__PURE__ */ k(be, { children: [
1875
1875
  /* @__PURE__ */ i(qn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: g ? ` ${o}%` : `${o}%` }),
@@ -1915,22 +1915,22 @@ const { getValueForOperator: Yr } = bo, tc = (e) => {
1915
1915
  M.getHandler().parseCondition
1916
1916
  );
1917
1917
  fe(() => {
1918
- N();
1918
+ L();
1919
1919
  }, [t, r]);
1920
1920
  async function K({
1921
1921
  domain: B,
1922
1922
  isTotal: P
1923
1923
  }) {
1924
1924
  if (P)
1925
- return await L({ domain: B });
1925
+ return await N({ domain: B });
1926
1926
  if (u && f) {
1927
- const X = l || await A({
1927
+ const J = l || await A({
1928
1928
  params: B,
1929
1929
  model: t,
1930
1930
  context: o
1931
1931
  }), Y = await V({
1932
1932
  model: t,
1933
- ids: X,
1933
+ ids: J,
1934
1934
  fieldsToRetrieve: [u],
1935
1935
  context: o
1936
1936
  });
@@ -1945,20 +1945,20 @@ const { getValueForOperator: Yr } = bo, tc = (e) => {
1945
1945
  context: o
1946
1946
  });
1947
1947
  }
1948
- async function L({ domain: B }) {
1948
+ async function N({ domain: B }) {
1949
1949
  if (u && f) {
1950
1950
  const P = await A({
1951
1951
  params: B,
1952
1952
  model: t,
1953
1953
  context: o
1954
- }), X = await V({
1954
+ }), J = await V({
1955
1955
  model: t,
1956
1956
  ids: P,
1957
1957
  fieldsToRetrieve: [u],
1958
1958
  context: o
1959
1959
  });
1960
1960
  return Yr({
1961
- values: X.map((Y) => Y[u]),
1961
+ values: J.map((Y) => Y[u]),
1962
1962
  operator: f
1963
1963
  });
1964
1964
  } else
@@ -1968,12 +1968,12 @@ const { getValueForOperator: Yr } = bo, tc = (e) => {
1968
1968
  context: o
1969
1969
  });
1970
1970
  }
1971
- async function N() {
1971
+ async function L() {
1972
1972
  p(!0), T(void 0);
1973
1973
  let B, P;
1974
1974
  try {
1975
- const X = await K({ domain: n, isTotal: !1 });
1976
- if (g(X), s) {
1975
+ const J = await K({ domain: n, isTotal: !1 });
1976
+ if (g(J), s) {
1977
1977
  const Y = await D({
1978
1978
  domain: s,
1979
1979
  values: {},
@@ -1984,10 +1984,10 @@ const { getValueForOperator: Yr } = bo, tc = (e) => {
1984
1984
  isTotal: !0
1985
1985
  }), I(B);
1986
1986
  }
1987
- if (B ? (P = Math.round(X / B * 100 * 100) / 100, y(P)) : y(0), r) {
1987
+ if (B ? (P = Math.round(J / B * 100 * 100) / 100, y(P)) : y(0), r) {
1988
1988
  const Y = await E({
1989
1989
  condition: r,
1990
- values: { value: X, percent: P },
1990
+ values: { value: J, percent: P },
1991
1991
  context: o
1992
1992
  });
1993
1993
  v(Y);
@@ -1996,15 +1996,15 @@ const { getValueForOperator: Yr } = bo, tc = (e) => {
1996
1996
  if (c.indexOf(":") !== -1) {
1997
1997
  const Y = await E({
1998
1998
  condition: c,
1999
- values: { value: X, percent: P },
1999
+ values: { value: J, percent: P },
2000
2000
  context: o
2001
2001
  });
2002
2002
  x(Y);
2003
2003
  } else
2004
2004
  x(c);
2005
2005
  T(void 0);
2006
- } catch (X) {
2007
- T(JSON.stringify(X));
2006
+ } catch (J) {
2007
+ T(JSON.stringify(J));
2008
2008
  }
2009
2009
  p(!1);
2010
2010
  }
@@ -2330,7 +2330,7 @@ const dc = {
2330
2330
  yAxisOpts: s,
2331
2331
  fixedHeight: a = !1
2332
2332
  }) => {
2333
- const { t: c } = pe(), d = Ce(() => {
2333
+ const { t: c } = ge(), d = Ce(() => {
2334
2334
  if (!(e !== "pie" || t.reduce(
2335
2335
  (g, w) => w.operator === "+" ? g + w.value : 0,
2336
2336
  0
@@ -2424,7 +2424,7 @@ const hc = ({
2424
2424
  manualIds: s,
2425
2425
  fixedHeight: a
2426
2426
  }) => {
2427
- const { t: c } = pe(), { error: d, loading: u, values: f, type: l, evaluatedEntries: h, fetchData: p } = oc({
2427
+ const { t: c } = ge(), { error: d, loading: u, values: f, type: l, evaluatedEntries: h, fetchData: p } = oc({
2428
2428
  model: t,
2429
2429
  ooui: e,
2430
2430
  limit: r,
@@ -2480,13 +2480,13 @@ const hc = ({
2480
2480
  goToResourceId: R,
2481
2481
  limit: T,
2482
2482
  isActive: A
2483
- } = e, [V, _] = C(!1), [D, E] = C(!1), [K, L] = C(!1), [N, B] = C(!0), [P, X] = C(!0), [Y, ee] = C([]), [ce, le] = C(!1), [H, F] = C([]), [W, G] = C(!1), [me, ie] = C(!0), [z, ue] = C(), [ge, De] = C({}), [Me, Ve] = C(0), [ne, xe] = C(
2483
+ } = e, [V, _] = C(!1), [D, E] = C(!1), [K, N] = C(!1), [L, B] = C(!0), [P, J] = C(!0), [Y, ee] = C([]), [ce, de] = C(!1), [H, F] = C([]), [W, G] = C(!1), [pe, ie] = C(!0), [X, ue] = C(), [ye, Re] = C({}), [Pe, Ve] = C(0), [_e, me] = C(
2484
2484
  T !== void 0 ? T : Vt
2485
- ), [ye, Z] = C(o);
2485
+ ), [le, Q] = C(o);
2486
2486
  fe(() => {
2487
2487
  h && h.length > 0 && !p && (m == null || m(0), f == null || f(h[0].id));
2488
2488
  }, [h]), fe(() => {
2489
- xe(T !== void 0 ? T : Vt);
2489
+ me(T !== void 0 ? T : Vt);
2490
2490
  }, [T]), fe(() => {
2491
2491
  s.length === 1 ? ue(s[0]) : s.length > 1 && ue(
2492
2492
  s.filter(
@@ -2494,13 +2494,13 @@ const hc = ({
2494
2494
  )[0]
2495
2495
  );
2496
2496
  }, [s]), fe(() => {
2497
- (z == null ? void 0 : z.view_id) === n.view_id && s.length > 1 && ue(
2497
+ (X == null ? void 0 : X.view_id) === n.view_id && s.length > 1 && ue(
2498
2498
  s.filter(
2499
2499
  (he) => he.view_id !== n.view_id
2500
2500
  )[0]
2501
2501
  );
2502
2502
  }, [n]);
2503
- const de = async () => {
2503
+ const ne = async () => {
2504
2504
  var he;
2505
2505
  return await ((he = a.current) == null ? void 0 : he.submitForm());
2506
2506
  };
@@ -2508,7 +2508,7 @@ const hc = ({
2508
2508
  nt.Provider,
2509
2509
  {
2510
2510
  value: {
2511
- title: ye,
2511
+ title: le,
2512
2512
  currentView: n,
2513
2513
  setCurrentView: r,
2514
2514
  availableViews: s,
@@ -2518,7 +2518,7 @@ const hc = ({
2518
2518
  setFormHasChanges: E,
2519
2519
  formRef: a,
2520
2520
  searchTreeRef: c,
2521
- onFormSave: de,
2521
+ onFormSave: ne,
2522
2522
  onNewClicked: d,
2523
2523
  currentId: u,
2524
2524
  setCurrentId: f,
@@ -2528,17 +2528,17 @@ const hc = ({
2528
2528
  setResults: l,
2529
2529
  currentModel: g,
2530
2530
  removingItem: K,
2531
- setRemovingItem: L,
2532
- formIsLoading: N,
2531
+ setRemovingItem: N,
2532
+ formIsLoading: L,
2533
2533
  setFormIsLoading: B,
2534
2534
  treeIsLoading: P,
2535
- setTreeIsLoading: X,
2535
+ setTreeIsLoading: J,
2536
2536
  attachments: Y,
2537
2537
  setAttachments: ee,
2538
2538
  selectedRowItems: v,
2539
2539
  setSelectedRowItems: b,
2540
2540
  duplicatingItem: ce,
2541
- setDuplicatingItem: le,
2541
+ setDuplicatingItem: de,
2542
2542
  setSearchParams: F,
2543
2543
  searchParams: H,
2544
2544
  searchVisible: W,
@@ -2550,18 +2550,18 @@ const hc = ({
2550
2550
  searchTreeNameSearch: O,
2551
2551
  setSearchTreeNameSearch: x,
2552
2552
  setGraphIsLoading: ie,
2553
- graphIsLoading: me,
2554
- previousView: z,
2553
+ graphIsLoading: pe,
2554
+ previousView: X,
2555
2555
  setPreviousView: ue,
2556
2556
  goToResourceId: R,
2557
- searchValues: ge,
2558
- setSearchValues: De,
2559
- limit: ne,
2560
- setLimit: xe,
2561
- setTitle: Z,
2557
+ searchValues: ye,
2558
+ setSearchValues: Re,
2559
+ limit: _e,
2560
+ setLimit: me,
2561
+ setTitle: Q,
2562
2562
  isActive: A,
2563
2563
  setTreeFirstVisibleRow: Ve,
2564
- treeFirstVisibleRow: Me
2564
+ treeFirstVisibleRow: Pe
2565
2565
  },
2566
2566
  children: t
2567
2567
  }
@@ -2779,7 +2779,7 @@ const Hm = Object.values(Gt), wc = (e) => {
2779
2779
  },
2780
2780
  children: [
2781
2781
  /* @__PURE__ */ k(
2782
- _e,
2782
+ De,
2783
2783
  {
2784
2784
  align: "middle",
2785
2785
  style: {
@@ -2802,7 +2802,7 @@ const Hm = Object.values(Gt), wc = (e) => {
2802
2802
  children: /* @__PURE__ */ i(Sc, { ellipsis: !0, children: t })
2803
2803
  }
2804
2804
  ),
2805
- o && /* @__PURE__ */ i(be, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ i(_e, { justify: "end", align: "middle", children: /* @__PURE__ */ i(
2805
+ o && /* @__PURE__ */ i(be, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ i(De, { justify: "end", align: "middle", children: /* @__PURE__ */ i(
2806
2806
  ss,
2807
2807
  {
2808
2808
  style: { cursor: "pointer" },
@@ -2821,7 +2821,7 @@ const Hm = Object.values(Gt), wc = (e) => {
2821
2821
  );
2822
2822
  }, { useToken: xc } = We, Tc = (e) => {
2823
2823
  const { ooui: t } = e, n = t.actionId !== void 0;
2824
- return /* @__PURE__ */ i(Ie, { ooui: t, children: n ? /* @__PURE__ */ i(gn, { children: /* @__PURE__ */ i(Ic, { ooui: t }) }) : /* @__PURE__ */ i(Fc, { ooui: t }) });
2824
+ return /* @__PURE__ */ i(Fe, { ooui: t, children: n ? /* @__PURE__ */ i(gn, { children: /* @__PURE__ */ i(Ic, { ooui: t }) }) : /* @__PURE__ */ i(Fc, { ooui: t }) });
2825
2825
  }, Fc = (e) => {
2826
2826
  const { token: t } = xc(), { ooui: n, value: o } = e, r = /* @__PURE__ */ k(se, { children: [
2827
2827
  /* @__PURE__ */ k("span", { children: [
@@ -3015,7 +3015,7 @@ const _t = ({
3015
3015
  }, Dc = (e, t) => e.replace(
3016
3016
  /\{([^}]+)\}/g,
3017
3017
  (n, o) => t[o] !== void 0 ? t[o] : n
3018
- ), Qr = (e) => !(!Array.isArray(e) || e.length !== 2 || e[0] === void 0 && e[1] === ""), Ec = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ni, { ...e }) }), ni = (e) => {
3018
+ ), Qr = (e) => !(!Array.isArray(e) || e.length !== 2 || e[0] === void 0 && e[1] === ""), Ec = (e) => /* @__PURE__ */ i(Fe, { ...e, children: /* @__PURE__ */ i(ni, { ...e }) }), ni = (e) => {
3019
3019
  const { ooui: t, value: n } = e;
3020
3020
  let o = n, r = n;
3021
3021
  if (t.selectionValues.size ? o = t.selectionValues.get(n) : Array.isArray(n) && (r = n[0], o = n[1]), !n)
@@ -3032,7 +3032,7 @@ const _t = ({
3032
3032
  }, t = `${t}20`), /* @__PURE__ */ i(mo, { ...e, style: n, color: t, children: e.children });
3033
3033
  }, kc = (e) => {
3034
3034
  const { ooui: t } = e;
3035
- return /* @__PURE__ */ i(Ie, { type: "array", ...e, children: /* @__PURE__ */ i(Mc, { ooui: t }) });
3035
+ return /* @__PURE__ */ i(Fe, { type: "array", ...e, children: /* @__PURE__ */ i(Mc, { ooui: t }) });
3036
3036
  }, Mc = (e) => {
3037
3037
  const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [a, c] = C([]), [d, u] = C(), [f, l] = C(!1), { relation: h, context: p, readOnly: m, field: g } = n, w = te(He), { getContext: y } = w || {};
3038
3038
  dt(() => {
@@ -3329,9 +3329,9 @@ const _t = ({
3329
3329
  for (let n = 0; n < e.length; n++)
3330
3330
  await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
3331
3331
  }, zc = (e, t) => {
3332
- const { children: n, globalValues: o = {} } = e, r = Q(), s = Q(), [a, c] = C(!1), d = te(
3332
+ const { children: n, globalValues: o = {} } = e, r = Z(), s = Z(), [a, c] = C(!1), d = te(
3333
3333
  ft
3334
- ), { openAction: u } = d || {}, f = Q([]), { t: l } = pe();
3334
+ ), { openAction: u } = d || {}, f = Z([]), { t: l } = ge();
3335
3335
  lt(t, () => ({
3336
3336
  openActionModal: b
3337
3337
  }));
@@ -3346,19 +3346,19 @@ const _t = ({
3346
3346
  model: D,
3347
3347
  datas: E = {},
3348
3348
  report_name: K,
3349
- type: L
3349
+ type: N
3350
3350
  } = R;
3351
- if (L !== "ir.actions.report.xml") {
3352
- Ze(`${L} action not supported`);
3351
+ if (N !== "ir.actions.report.xml") {
3352
+ Ze(`${N} action not supported`);
3353
3353
  return;
3354
3354
  }
3355
- const { ids: N } = E || {}, B = N || [], P = typeof _ == "string" ? Rt({
3355
+ const { ids: L } = E || {}, B = L || [], P = typeof _ == "string" ? Rt({
3356
3356
  context: _,
3357
3357
  fields: T,
3358
3358
  values: A
3359
3359
  }) : _;
3360
3360
  try {
3361
- const X = await M.getHandler().createReport({
3361
+ const J = await M.getHandler().createReport({
3362
3362
  model: D,
3363
3363
  name: K,
3364
3364
  datas: E,
@@ -3366,10 +3366,10 @@ const _t = ({
3366
3366
  context: { ...V, ...P }
3367
3367
  });
3368
3368
  c(!0), s.current = !0, r.current = setInterval(() => {
3369
- y(X);
3369
+ y(J);
3370
3370
  }, 1e3);
3371
- } catch (X) {
3372
- s.current = !1, clearInterval(r.current), Ze(X), c(!1);
3371
+ } catch (J) {
3372
+ s.current = !1, clearInterval(r.current), Ze(J), c(!1);
3373
3373
  }
3374
3374
  }
3375
3375
  async function y(x) {
@@ -3442,7 +3442,7 @@ const _t = ({
3442
3442
  fields: R,
3443
3443
  context: D
3444
3444
  })), V.target === "new") {
3445
- const L = await M.getHandler().getView({
3445
+ const N = await M.getHandler().getView({
3446
3446
  model: V.res_model,
3447
3447
  type: "form",
3448
3448
  id: ((K = V == null ? void 0 : V.view_id) == null ? void 0 : K[0]) || void 0,
@@ -3451,11 +3451,11 @@ const _t = ({
3451
3451
  return b({
3452
3452
  domain: E,
3453
3453
  model: V.res_model,
3454
- formView: L,
3454
+ formView: N,
3455
3455
  context: D
3456
3456
  }), {};
3457
3457
  } else {
3458
- const { initialView: L, views: N } = await Jc({
3458
+ const { initialView: N, views: L } = await Jc({
3459
3459
  model: V.res_model,
3460
3460
  context: D,
3461
3461
  view_mode: V.view_mode,
@@ -3466,9 +3466,9 @@ const _t = ({
3466
3466
  context: D,
3467
3467
  domain: E,
3468
3468
  model: V.res_model,
3469
- views: N,
3469
+ views: L,
3470
3470
  title: V.name,
3471
- initialView: L,
3471
+ initialView: N,
3472
3472
  action_id: V.id,
3473
3473
  action_type: V.type
3474
3474
  }), { closeParent: !0 };
@@ -3637,17 +3637,17 @@ function el(e, t) {
3637
3637
  forcedValues: O = {},
3638
3638
  parentWidth: x,
3639
3639
  onMustRefreshParent: R
3640
- } = e, { t: T } = pe(), [A, V] = C(!1), [_, D] = C(), [E, K] = C(), [L] = st.useForm(), [N, B] = C(), [P, X] = C(), Y = te(ri), [ee, ce] = C(), [le, H] = C(!1), F = Q(), W = Q({}), G = Q({}), me = Q(!1), ie = Q(!1), z = Q(!1), ge = (x !== void 0 ? x : ee) < Zc, De = te(He), { activeId: Me, getPlainValues: Ve } = De || {}, ne = Q(!1), xe = te(
3640
+ } = e, { t: T } = ge(), [A, V] = C(!1), [_, D] = C(), [E, K] = C(), [N] = st.useForm(), [L, B] = C(), [P, J] = C(), Y = te(ri), [ee, ce] = C(), [de, H] = C(!1), F = Z(), W = Z({}), G = Z({}), pe = Z(!1), ie = Z(!1), X = Z(!1), ye = (x !== void 0 ? x : ee) < Zc, Re = te(He), { activeId: Pe, getPlainValues: Ve } = Re || {}, _e = Z(!1), me = te(
3641
3641
  nt
3642
3642
  ), {
3643
- setFormIsSaving: ye = void 0,
3644
- setFormHasChanges: Z = void 0,
3645
- setCurrentId: de = void 0,
3643
+ setFormIsSaving: le = void 0,
3644
+ setFormHasChanges: Q = void 0,
3645
+ setCurrentId: ne = void 0,
3646
3646
  setFormIsLoading: he = void 0,
3647
3647
  setAttachments: Ne = void 0,
3648
- title: J = void 0,
3649
- setTitle: Fe = void 0
3650
- } = (b ? xe : {}) || {}, Ae = te(
3648
+ title: z = void 0,
3649
+ setTitle: Te = void 0
3650
+ } = (b ? me : {}) || {}, Ae = te(
3651
3651
  Yt
3652
3652
  ), { processAction: je, globalValues: Le } = Ae || {};
3653
3653
  lt(t, () => ({
@@ -3655,7 +3655,7 @@ function el(e, t) {
3655
3655
  getFields: rt,
3656
3656
  getValues: q,
3657
3657
  getPlainValues: ve,
3658
- getContext: Te,
3658
+ getContext: xe,
3659
3659
  fetchValues: qe,
3660
3660
  cancelUnsavedChanges: Dt,
3661
3661
  clearAndReload: () => {
@@ -3670,16 +3670,16 @@ function el(e, t) {
3670
3670
  (o === void 0 && P || o !== void 0 && P && o < 0) && (F.current = void 0, K(void 0)), Be();
3671
3671
  }
3672
3672
  }, [o, n, p, m, I]), fe(() => {
3673
- le && (kn({
3673
+ de && (kn({
3674
3674
  elementHasLostFocus: !0
3675
3675
  }), H(!1));
3676
- }, [le]);
3676
+ }, [de]);
3677
3677
  const re = ($, j, oe, ae) => {
3678
- Z == null || Z(!1), ye == null || ye(!1), s == null || s($, j, oe, ae), de == null || de($), ne.current && (R == null || R());
3679
- }, Oe = () => {
3680
- ne.current && (R == null || R()), ye == null || ye(!1), r == null || r();
3678
+ Q == null || Q(!1), le == null || le(!1), s == null || s($, j, oe, ae), ne == null || ne($), _e.current && (R == null || R());
3679
+ }, Ie = () => {
3680
+ _e.current && (R == null || R()), le == null || le(!1), r == null || r();
3681
3681
  }, Ke = ($) => {
3682
- ye == null || ye(!1), u == null || u($);
3682
+ le == null || le(!1), u == null || u($);
3683
3683
  };
3684
3684
  function we() {
3685
3685
  return o || F.current;
@@ -3703,7 +3703,7 @@ function el(e, t) {
3703
3703
  j[ae] && j[ae].type === "many2one" && Se && Array.isArray(Se) && Se.length === 2 ? oe[ae] = Se[0] : j[ae] && (j[ae].type === "one2many" || j[ae].type === "many2many") && Se && Se.items ? oe[ae] = Se.items.filter((Ye) => Ye.operation !== "pendingRemove").map((Ye) => Ye.id) : oe[ae] = Se;
3704
3704
  }), oe;
3705
3705
  }
3706
- function Re() {
3706
+ function Oe() {
3707
3707
  const $ = {
3708
3708
  ...Ge(P)
3709
3709
  };
@@ -3711,7 +3711,7 @@ function el(e, t) {
3711
3711
  $[j] === void 0 && delete $[j];
3712
3712
  return $;
3713
3713
  }
3714
- function Te() {
3714
+ function xe() {
3715
3715
  return { ...y, ...E == null ? void 0 : E.context };
3716
3716
  }
3717
3717
  function Ee() {
@@ -3722,7 +3722,7 @@ function el(e, t) {
3722
3722
  id: we(),
3723
3723
  active_id: we(),
3724
3724
  active_ids: [we()],
3725
- parent_id: Me,
3725
+ parent_id: Pe,
3726
3726
  ...Le
3727
3727
  };
3728
3728
  }
@@ -3741,21 +3741,21 @@ function el(e, t) {
3741
3741
  fields: P
3742
3742
  })
3743
3743
  ).length !== 0, Ge = ($) => {
3744
- const j = L.getFieldsValue(!0);
3744
+ const j = N.getFieldsValue(!0);
3745
3745
  return Mt(j, $);
3746
3746
  }, gt = ($, j) => {
3747
3747
  Zt({
3748
3748
  values: {
3749
- ...Mt(L.getFieldsValue(!0), P),
3749
+ ...Mt(N.getFieldsValue(!0), P),
3750
3750
  [$]: j
3751
3751
  },
3752
3752
  fields: P,
3753
3753
  reset: !1
3754
3754
  });
3755
- }, dn = ($) => L.getFieldsValue(!0)[$];
3755
+ }, dn = ($) => N.getFieldsValue(!0)[$];
3756
3756
  async function Qt() {
3757
3757
  try {
3758
- return await L.validateFields(), !1;
3758
+ return await N.validateFields(), !1;
3759
3759
  } catch {
3760
3760
  return Ln.error(T("fillRequiredFields")), !0;
3761
3761
  }
@@ -3766,7 +3766,7 @@ function el(e, t) {
3766
3766
  try {
3767
3767
  m ? $ = { arch: m.arch, fields: m.fields } : $ = await Vi();
3768
3768
  const { fields: j, arch: oe } = $;
3769
- X(j), B(oe), await qe({
3769
+ J(j), B(oe), await qe({
3770
3770
  fields: j,
3771
3771
  arch: oe
3772
3772
  });
@@ -3775,7 +3775,7 @@ function el(e, t) {
3775
3775
  }
3776
3776
  }, qe = async ($) => {
3777
3777
  let j, oe, ae, Se;
3778
- he == null || he(!0), D(void 0), $ != null && $.fields ? (oe = $.fields, ae = $.arch) : (oe = P, ae = N), p && ($ == null ? void 0 : $.forceRefresh) !== !0 ? j = p : { values: j, defaultGetCalled: Se } = await Ai({
3778
+ he == null || he(!0), D(void 0), $ != null && $.fields ? (oe = $.fields, ae = $.arch) : (oe = P, ae = L), p && ($ == null ? void 0 : $.forceRefresh) !== !0 ? j = p : { values: j, defaultGetCalled: Se } = await Ai({
3779
3779
  fields: oe,
3780
3780
  arch: ae
3781
3781
  }), S && (j = { ...Ac(S), ...j }), W.current = Mt(j, oe), Zt({
@@ -3783,17 +3783,17 @@ function el(e, t) {
3783
3783
  fields: oe,
3784
3784
  reset: !0,
3785
3785
  isDefaultGet: Se
3786
- }), en({ fields: oe, arch: ae, values: j }), he == null || he(!1), Z == null || Z(!1), Se && H(!0);
3786
+ }), en({ fields: oe, arch: ae, values: j }), he == null || he(!1), Q == null || Q(!1), Se && H(!0);
3787
3787
  }, Dt = async () => new Promise(async ($) => {
3788
3788
  ht() ? qt({
3789
3789
  t: T,
3790
3790
  onOk: () => {
3791
- Oe == null || Oe(), $(!0);
3791
+ Ie == null || Ie(), $(!0);
3792
3792
  },
3793
3793
  onCancel: () => {
3794
3794
  $(!1);
3795
3795
  }
3796
- }) : (Oe == null || Oe(), $(!0));
3796
+ }) : (Ie == null || Ie(), $(!0));
3797
3797
  }), Vi = async () => {
3798
3798
  if (c) {
3799
3799
  const $ = await M.getHandler().getActionStringForModel(n);
@@ -3813,7 +3813,7 @@ function el(e, t) {
3813
3813
  reset: oe,
3814
3814
  isDefaultGet: ae = !1
3815
3815
  }) => {
3816
- const Ye = { ...oe ? {} : L.getFieldsValue(!0), ...$ }, Pn = Mt(Ye, j), ji = Object.keys(j).map((Nn) => {
3816
+ const Ye = { ...oe ? {} : N.getFieldsValue(!0), ...$ }, Pn = Mt(Ye, j), ji = Object.keys(j).map((Nn) => {
3817
3817
  const Wi = Pn[Nn] !== void 0 ? Pn[Nn] : void 0;
3818
3818
  return {
3819
3819
  name: Nn,
@@ -3821,7 +3821,7 @@ function el(e, t) {
3821
3821
  value: Wi
3822
3822
  };
3823
3823
  });
3824
- ae || (G.current = Pn), L.setFields(ji);
3824
+ ae || (G.current = Pn), N.setFields(ji);
3825
3825
  }, Ai = async ({
3826
3826
  fields: $,
3827
3827
  arch: j
@@ -3846,7 +3846,7 @@ function el(e, t) {
3846
3846
  ["res_id", "=", we()]
3847
3847
  ],
3848
3848
  fieldsToRetrieve: ["id", "name"],
3849
- context: Te(),
3849
+ context: xe(),
3850
3850
  model: "ir.attachment"
3851
3851
  });
3852
3852
  Ne == null || Ne(Ye);
@@ -3883,34 +3883,34 @@ function el(e, t) {
3883
3883
  });
3884
3884
  F.current = ae, W.current = oe;
3885
3885
  }
3886
- g && await g([we()]), !w && j && (re == null || re(we(), q(), Re()));
3886
+ g && await g([we()]), !w && j && (re == null || re(we(), q(), Oe()));
3887
3887
  }, _i = async ($) => {
3888
3888
  const { callOnSubmitSucceed: j = !0 } = $ || {};
3889
- !w && j && (re == null || re(we(), q(), Re()));
3889
+ !w && j && (re == null || re(we(), q(), Oe()));
3890
3890
  }, un = async ($) => {
3891
3891
  let j = !1;
3892
3892
  const { callOnSubmitSucceed: oe = !0 } = $ || {};
3893
- if (ie.current = !0, D(void 0), z.current && !ht() && we() && oe) {
3894
- ie.current = !1, Z == null || Z(!1), re == null || re(
3893
+ if (ie.current = !0, D(void 0), X.current && !ht() && we() && oe) {
3894
+ ie.current = !1, Q == null || Q(!1), re == null || re(
3895
3895
  we(),
3896
3896
  q(),
3897
- Re(),
3898
- z.current
3899
- ), z.current = !1;
3897
+ Oe(),
3898
+ X.current
3899
+ ), X.current = !1;
3900
3900
  const ae = we();
3901
3901
  return l && (F.current = void 0, Zt({ values: {}, fields: P, reset: !0 })), { succeed: !0, id: ae };
3902
3902
  }
3903
3903
  if (!ht() && we() && oe)
3904
- return ie.current = !1, Z == null || Z(!1), Oe == null || Oe(), { succeed: !0, id: we() };
3904
+ return ie.current = !1, Q == null || Q(!1), Ie == null || Ie(), { succeed: !0, id: we() };
3905
3905
  if (await Qt())
3906
3906
  return ie.current = !1, Zr(T), { succeed: !1, id: we() };
3907
- V(!0), ye == null || ye(!0);
3907
+ V(!0), le == null || le(!0);
3908
3908
  try {
3909
3909
  h === "api" ? await _r($) : await _i($), l && (F.current = void 0, Zt({ values: {}, fields: P, reset: !0 })), await qe({ forceRefresh: !0 }), j = !0, Ln.success(T("savedRegisters"));
3910
3910
  } catch (ae) {
3911
- ie.current = !1, V(!1), ye == null || ye(!1), Ke == null || Ke(ae), Ln.error(T("errorWhileSavingForm")), D(ae != null && ae.message ? ae.message : ae);
3911
+ ie.current = !1, V(!1), le == null || le(!1), Ke == null || Ke(ae), Ln.error(T("errorWhileSavingForm")), D(ae != null && ae.message ? ae.message : ae);
3912
3912
  } finally {
3913
- ie.current = !1, ye == null || ye(!1), V(!1);
3913
+ ie.current = !1, le == null || le(!1), V(!1);
3914
3914
  }
3915
3915
  return { succeed: j, id: we() };
3916
3916
  }, Dr = ({
@@ -3943,7 +3943,7 @@ function el(e, t) {
3943
3943
  values: oe,
3944
3944
  operationInProgress: ae
3945
3945
  });
3946
- K(Se), Se.string && Se.string !== J && (Fe == null || Fe(Se.string)), Y && Se.string && ((Ye = Y.setTitle) == null || Ye.call(Y, Se.string));
3946
+ K(Se), Se.string && Se.string !== z && (Te == null || Te(Se.string)), Y && Se.string && ((Ye = Y.setTitle) == null || Ye.call(Y, Se.string));
3947
3947
  }, kn = async ({
3948
3948
  elementHasLostFocus: $ = !1
3949
3949
  }) => {
@@ -3969,8 +3969,8 @@ function el(e, t) {
3969
3969
  "many2one"
3970
3970
  ]
3971
3971
  }) && $ !== !0)) {
3972
- const ae = Mt(L.getFieldsValue(!0), P);
3973
- G.current = ae, d == null || d(ae), Z == null || Z(!0), Ei(oe);
3972
+ const ae = Mt(N.getFieldsValue(!0), P);
3973
+ G.current = ae, d == null || d(ae), Q == null || Q(!0), Ei(oe);
3974
3974
  }
3975
3975
  }, Di = As(kn, 100), Ei = async ($) => {
3976
3976
  try {
@@ -3986,7 +3986,7 @@ function el(e, t) {
3986
3986
  if (!j) {
3987
3987
  en({
3988
3988
  fields: P,
3989
- arch: N,
3989
+ arch: L,
3990
3990
  values: Ge(P)
3991
3991
  });
3992
3992
  return;
@@ -4018,7 +4018,7 @@ function el(e, t) {
4018
4018
  });
4019
4019
  en({
4020
4020
  fields: P,
4021
- arch: N,
4021
+ arch: L,
4022
4022
  values: Ye
4023
4023
  }), Zt({
4024
4024
  values: Ye,
@@ -4026,10 +4026,10 @@ function el(e, t) {
4026
4026
  reset: !1
4027
4027
  });
4028
4028
  }
4029
- if (ae.warning && ae.warning.title && ae.warning.message && !me.current) {
4029
+ if (ae.warning && ae.warning.title && ae.warning.message && !pe.current) {
4030
4030
  const { title: Se, message: Ye } = ae.warning;
4031
- me.current = !0, qc(Se, Ye, () => {
4032
- me.current = !1;
4031
+ pe.current = !0, qc(Se, Ye, () => {
4032
+ pe.current = !1;
4033
4033
  });
4034
4034
  }
4035
4035
  if (ae.domain && Object.keys(ae.domain).length > 0) {
@@ -4039,9 +4039,9 @@ function el(e, t) {
4039
4039
  });
4040
4040
  en({
4041
4041
  fields: Se,
4042
- arch: N,
4042
+ arch: L,
4043
4043
  values: Ge(Se)
4044
- }), X(Se);
4044
+ }), J(Se);
4045
4045
  }
4046
4046
  };
4047
4047
  async function Mi({
@@ -4059,9 +4059,9 @@ function el(e, t) {
4059
4059
  }
4060
4060
  });
4061
4061
  if (typeof oe == "object" && oe !== null && Object.keys(oe).length === 0 && w)
4062
- re == null || re(we(), q(), Re());
4062
+ re == null || re(we(), q(), Oe());
4063
4063
  else if (oe.type && oe.type === "ir.actions.act_window_close")
4064
- re == null || re(we(), q(), Re());
4064
+ re == null || re(we(), q(), Oe());
4065
4065
  else if (oe.type) {
4066
4066
  let ae = {};
4067
4067
  oe.context && (ae = Rt({
@@ -4081,7 +4081,7 @@ function el(e, t) {
4081
4081
  action: $,
4082
4082
  payload: we()
4083
4083
  });
4084
- j.type && j.type === "ir.actions.act_window_close" ? re == null || re(we(), q(), Re()) : await qe({ forceRefresh: !0 });
4084
+ j.type && j.type === "ir.actions.act_window_close" ? re == null || re(we(), q(), Oe()) : await qe({ forceRefresh: !0 });
4085
4085
  }
4086
4086
  async function Ni({
4087
4087
  action: $,
@@ -4108,10 +4108,10 @@ function el(e, t) {
4108
4108
  ...j
4109
4109
  },
4110
4110
  onRefreshParentValues: async () => {
4111
- ne.current = !0, await qe({ forceRefresh: !0 });
4111
+ _e.current = !0, await qe({ forceRefresh: !0 });
4112
4112
  }
4113
4113
  })) || {};
4114
- !b && oe && (re == null || re(we(), q(), Re()));
4114
+ !b && oe && (re == null || re(we(), q(), Oe()));
4115
4115
  }
4116
4116
  function Li() {
4117
4117
  kn({ elementHasLostFocus: !0 });
@@ -4119,7 +4119,7 @@ function el(e, t) {
4119
4119
  function Mn($) {
4120
4120
  en({
4121
4121
  fields: P,
4122
- arch: N,
4122
+ arch: L,
4123
4123
  values: Ge(P),
4124
4124
  operationInProgress: $
4125
4125
  });
@@ -4130,7 +4130,7 @@ function el(e, t) {
4130
4130
  context: oe
4131
4131
  }) {
4132
4132
  if ($ === "cancel") {
4133
- Oe == null || Oe();
4133
+ Ie == null || Ie();
4134
4134
  return;
4135
4135
  }
4136
4136
  if (await Qt()) {
@@ -4139,8 +4139,8 @@ function el(e, t) {
4139
4139
  }
4140
4140
  let ae = !1;
4141
4141
  try {
4142
- !f && (ht() || we() === void 0) && (ae = !0, Mn(!0), h === "2many" ? (await _r({ callOnSubmitSucceed: !1 }), z.current = !0) : await un({ callOnSubmitSucceed: !1 }));
4143
- const Se = z.current ? Ee() : {}, Ye = { ...oe, ...Se };
4142
+ !f && (ht() || we() === void 0) && (ae = !0, Mn(!0), h === "2many" ? (await _r({ callOnSubmitSucceed: !1 }), X.current = !0) : await un({ callOnSubmitSucceed: !1 }));
4143
+ const Se = X.current ? Ee() : {}, Ye = { ...oe, ...Se };
4144
4144
  $ === "object" ? await Mi({ action: j, context: Ye }) : $ === "workflow" ? await Pi({ action: j }) : $ === "action" && await Ni({ action: j, context: Ye }), ae && Mn(!1);
4145
4145
  } catch (Se) {
4146
4146
  ae && Mn(!1), Ze(Se);
@@ -4158,7 +4158,7 @@ function el(e, t) {
4158
4158
  setFieldValue: gt,
4159
4159
  getFieldValue: dn,
4160
4160
  executeButtonAction: $i,
4161
- getContext: Te,
4161
+ getContext: xe,
4162
4162
  submitForm: un,
4163
4163
  fetchValues: qe,
4164
4164
  formHasChanges: ht,
@@ -4167,7 +4167,7 @@ function el(e, t) {
4167
4167
  children: /* @__PURE__ */ i(
4168
4168
  st,
4169
4169
  {
4170
- form: L,
4170
+ form: N,
4171
4171
  onFieldsChange: () => {
4172
4172
  Di({ elementHasLostFocus: !1 });
4173
4173
  },
@@ -4176,7 +4176,7 @@ function el(e, t) {
4176
4176
  zn,
4177
4177
  {
4178
4178
  container: E.container,
4179
- responsiveBehaviour: ge
4179
+ responsiveBehaviour: ye
4180
4180
  }
4181
4181
  )
4182
4182
  }
@@ -4184,9 +4184,9 @@ function el(e, t) {
4184
4184
  }
4185
4185
  ) }), Bi = () => /* @__PURE__ */ k(se, { children: [
4186
4186
  /* @__PURE__ */ i(Cn, {}),
4187
- /* @__PURE__ */ i(_e, { justify: "end", children: /* @__PURE__ */ k(ze, { children: [
4187
+ /* @__PURE__ */ i(De, { justify: "end", children: /* @__PURE__ */ k(ze, { children: [
4188
4188
  /* @__PURE__ */ i(
4189
- Pe,
4189
+ Me,
4190
4190
  {
4191
4191
  icon: /* @__PURE__ */ i(Wt, {}),
4192
4192
  disabled: A,
@@ -4197,7 +4197,7 @@ function el(e, t) {
4197
4197
  }
4198
4198
  ),
4199
4199
  /* @__PURE__ */ i(
4200
- Pe,
4200
+ Me,
4201
4201
  {
4202
4202
  disabled: A || f,
4203
4203
  loading: A,
@@ -4267,9 +4267,9 @@ const zt = ct(el), Jt = (e) => {
4267
4267
  m(!p);
4268
4268
  }
4269
4269
  function x() {
4270
- return /* @__PURE__ */ k(_e, { align: "middle", children: [
4270
+ return /* @__PURE__ */ k(De, { align: "middle", children: [
4271
4271
  /* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(
4272
- Pe,
4272
+ Me,
4273
4273
  {
4274
4274
  type: p ? "primary" : "default",
4275
4275
  icon: p ? /* @__PURE__ */ i(as, { style: { color: "white" } }) : /* @__PURE__ */ i(cs, {}),
@@ -4311,11 +4311,11 @@ const zt = ct(el), Jt = (e) => {
4311
4311
  es_ES: qs,
4312
4312
  ca_ES: Ys
4313
4313
  }, Fr = () => {
4314
- const { locale: e } = pe();
4314
+ const { locale: e } = ge();
4315
4315
  return tl[e];
4316
4316
  }, nl = (e) => {
4317
4317
  const t = Fr();
4318
- return /* @__PURE__ */ i(Ie, { ...e, layout: "vertical", children: /* @__PURE__ */ i(
4318
+ return /* @__PURE__ */ i(Fe, { ...e, layout: "vertical", children: /* @__PURE__ */ i(
4319
4319
  sr.RangePicker,
4320
4320
  {
4321
4321
  allowEmpty: [!0, !0],
@@ -4330,7 +4330,7 @@ const zt = ct(el), Jt = (e) => {
4330
4330
  numberOfSelectsToHide: n = 2,
4331
4331
  ...o
4332
4332
  }) => {
4333
- const r = Q(), s = Q(0);
4333
+ const r = Z(), s = Z(0);
4334
4334
  return /* @__PURE__ */ i(
4335
4335
  Ji,
4336
4336
  {
@@ -4370,8 +4370,8 @@ const zt = ct(el), Jt = (e) => {
4370
4370
  align: "left"
4371
4371
  }
4372
4372
  ),
4373
- /* @__PURE__ */ k(_e, { align: "bottom", className: "p-0", children: [
4374
- /* @__PURE__ */ i(be, { className: "mr-2", children: /* @__PURE__ */ i(Ie, { ...e, ooui: a[0], showLabel: !1, children: /* @__PURE__ */ i(
4373
+ /* @__PURE__ */ k(De, { align: "bottom", className: "p-0", children: [
4374
+ /* @__PURE__ */ i(be, { className: "mr-2", children: /* @__PURE__ */ i(Fe, { ...e, ooui: a[0], showLabel: !1, children: /* @__PURE__ */ i(
4375
4375
  sr.RangePicker,
4376
4376
  {
4377
4377
  className: "w-60",
@@ -4380,7 +4380,7 @@ const zt = ct(el), Jt = (e) => {
4380
4380
  locale: s
4381
4381
  }
4382
4382
  ) }) }),
4383
- /* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(Ie, { ...e, ooui: a[1], showLabel: !1, children: /* @__PURE__ */ i(ol, {}) }) })
4383
+ /* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(Fe, { ...e, ooui: a[1], showLabel: !1, children: /* @__PURE__ */ i(ol, {}) }) })
4384
4384
  ] })
4385
4385
  ] });
4386
4386
  }, ol = ({
@@ -4413,7 +4413,7 @@ const zt = ct(el), Jt = (e) => {
4413
4413
  )
4414
4414
  ] }), { useToken: il } = We, oi = (e) => {
4415
4415
  const { ooui: t } = e, { id: n, decimalDigits: o, readOnly: r, required: s } = t, { token: a } = il(), c = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = te(He), { elementHasLostFocus: u } = d || {};
4416
- return /* @__PURE__ */ i(Ie, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4416
+ return /* @__PURE__ */ i(Fe, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4417
4417
  ho,
4418
4418
  {
4419
4419
  disabled: r,
@@ -4429,7 +4429,7 @@ const zt = ct(el), Jt = (e) => {
4429
4429
  ) });
4430
4430
  }, { useToken: sl } = We, bn = (e) => {
4431
4431
  const { ooui: t, onChange: n } = e, { id: o, readOnly: r, required: s } = t, { token: a } = sl(), c = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = te(He), { elementHasLostFocus: u } = d || {};
4432
- return /* @__PURE__ */ i(Ie, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4432
+ return /* @__PURE__ */ i(Fe, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4433
4433
  ho,
4434
4434
  {
4435
4435
  id: o,
@@ -4474,7 +4474,7 @@ function al(e) {
4474
4474
  }
4475
4475
  ),
4476
4476
  /* @__PURE__ */ k(
4477
- _e,
4477
+ De,
4478
4478
  {
4479
4479
  align: "bottom",
4480
4480
  className: "mt-0",
@@ -4491,7 +4491,7 @@ function al(e) {
4491
4491
  }
4492
4492
  const { defaultAlgorithm: cl, defaultSeed: ll } = We, dl = cl(ll), { Option: ul } = At, fl = (e) => {
4493
4493
  const { ooui: t } = e, { required: n } = t;
4494
- return /* @__PURE__ */ i(Ie, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(ml, { ...e }) });
4494
+ return /* @__PURE__ */ i(Fe, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(ml, { ...e }) });
4495
4495
  }, ml = (e) => {
4496
4496
  const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, required: a } = t, c = Array.from(r.entries()), d = c && c.length && c.filter((l) => {
4497
4497
  const [h] = l;
@@ -4530,7 +4530,7 @@ const { defaultAlgorithm: cl, defaultSeed: ll } = We, dl = cl(ll), { Option: ul
4530
4530
  function ii(e) {
4531
4531
  const { field: t } = e;
4532
4532
  t.readOnly = !1, t.required = !1;
4533
- const { t: n } = pe();
4533
+ const { t: n } = ge();
4534
4534
  switch (t.type) {
4535
4535
  case vt.boolean: {
4536
4536
  const r = new cr({
@@ -4567,16 +4567,16 @@ function ii(e) {
4567
4567
  }
4568
4568
  }
4569
4569
  function pl(e) {
4570
- const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: o, isSearching: r } = e, { t: s } = pe();
4571
- return /* @__PURE__ */ k(_e, { children: [
4570
+ const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: o, isSearching: r } = e, { t: s } = ge();
4571
+ return /* @__PURE__ */ k(De, { children: [
4572
4572
  /* @__PURE__ */ i(be, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ k("a", { className: "text-xs", onClick: t, children: [
4573
4573
  n ? /* @__PURE__ */ i(ls, { className: "pr-1" }) : /* @__PURE__ */ i(Sn, { className: "pr-1" }),
4574
4574
  s(n ? "simple_search" : "advanced_search")
4575
4575
  ] }) }),
4576
4576
  /* @__PURE__ */ k(be, { span: 12, className: "text-right pb-2", children: [
4577
- /* @__PURE__ */ i(Pe, { className: "mr-5", icon: /* @__PURE__ */ i(Tn, {}), onClick: o, children: s("clear") }),
4577
+ /* @__PURE__ */ i(Me, { className: "mr-5", icon: /* @__PURE__ */ i(Tn, {}), onClick: o, children: s("clear") }),
4578
4578
  /* @__PURE__ */ i(
4579
- Pe,
4579
+ Me,
4580
4580
  {
4581
4581
  icon: /* @__PURE__ */ i(Fn, {}),
4582
4582
  loading: r,
@@ -4590,9 +4590,9 @@ function pl(e) {
4590
4590
  ] });
4591
4591
  }
4592
4592
  function gl(e) {
4593
- const { onLimitChange: t } = e, { t: n } = pe(), o = new Gn({ name: "limit" }), r = new Gn({ name: "offset" });
4593
+ const { onLimitChange: t } = e, { t: n } = ge(), o = new Gn({ name: "limit" }), r = new Gn({ name: "offset" });
4594
4594
  return /* @__PURE__ */ k("div", { className: "pl-2 pt-2", children: [
4595
- /* @__PURE__ */ i(_e, { children: n("parameters") }, "count_params"),
4595
+ /* @__PURE__ */ i(De, { children: n("parameters") }, "count_params"),
4596
4596
  /* @__PURE__ */ k(ze, { align: "center", children: [
4597
4597
  n("limit") + " :",
4598
4598
  /* @__PURE__ */ i(
@@ -4698,7 +4698,7 @@ function si(e) {
4698
4698
  searchError: l,
4699
4699
  searchValues: h,
4700
4700
  showLimitOptions: p = !0
4701
- } = e, [m, g] = C(), [w, y] = C(), [S, I] = C(!1), b = Q(), { token: v } = Tl(), [O] = st.useForm();
4701
+ } = e, [m, g] = C(), [w, y] = C(), [S, I] = C(!1), b = Z(), { token: v } = Tl(), [O] = st.useForm();
4702
4702
  fe(() => {
4703
4703
  O.setFieldsValue(h);
4704
4704
  }, [h]);
@@ -4706,7 +4706,7 @@ function si(e) {
4706
4706
  if (!w)
4707
4707
  return;
4708
4708
  const A = S ? w : m, V = A == null ? void 0 : A.rows;
4709
- return V == null ? void 0 : V.map((_, D) => /* @__PURE__ */ i(_e, { children: _.map((E, K) => /* @__PURE__ */ i(be, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(ii, { field: E }) }, K)) }, D));
4709
+ return V == null ? void 0 : V.map((_, D) => /* @__PURE__ */ i(De, { children: _.map((E, K) => /* @__PURE__ */ i(be, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(ii, { field: E }) }, K)) }, D));
4710
4710
  };
4711
4711
  dt(() => {
4712
4712
  I(!1), b.current = new xo(n, t), b.current.parse(), g(b.current._simpleSearchContainer), y(b.current._advancedSearchContainer);
@@ -4808,7 +4808,7 @@ const no = (e, t = "14px -apple-system") => {
4808
4808
  onSelectAllRecords: o,
4809
4809
  numberOfRealSelectedRows: r
4810
4810
  }) => {
4811
- const [s, a] = C(!1), { t: c } = pe(), d = {
4811
+ const [s, a] = C(!1), { t: c } = ge(), d = {
4812
4812
  recordsSelected: c("recordsSelected"),
4813
4813
  selectAllRecords: c("selectAllRecords"),
4814
4814
  allRecordsSelected: c("allRecordsSelected")
@@ -4862,7 +4862,7 @@ function ai(e) {
4862
4862
  });
4863
4863
  return t = `${r}:${s}`, e < 0 && (t = "-" + t), t;
4864
4864
  }
4865
- const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci, {}) }), ci = ({ value: e }) => {
4865
+ const Vl = (e) => /* @__PURE__ */ i(Fe, { ...e, children: /* @__PURE__ */ i(ci, {}) }), ci = ({ value: e }) => {
4866
4866
  const t = `${(e || 0).toLocaleString("en-US", {
4867
4867
  minimumIntegerDigits: 1,
4868
4868
  maximumFractionDigits: 4,
@@ -4885,7 +4885,7 @@ const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci,
4885
4885
  onItemClick: t,
4886
4886
  onOpenChange: n
4887
4887
  }) => {
4888
- const [o, r] = C(!1), [s, a] = C(!1), { t: c } = pe(), [d, u] = C(), f = U(async () => {
4888
+ const [o, r] = C(!1), [s, a] = C(!1), { t: c } = ge(), [d, u] = C(), f = U(async () => {
4889
4889
  const {
4890
4890
  actionItems: l = [],
4891
4891
  relateItems: h = [],
@@ -5096,7 +5096,7 @@ const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci,
5096
5096
  }
5097
5097
  }, li = (e) => {
5098
5098
  const { ooui: t, showTime: n = !1 } = e, { required: o } = t;
5099
- return /* @__PURE__ */ i(Ie, { required: o, ...e, children: /* @__PURE__ */ i(Nl, { ooui: t, showTime: n }) });
5099
+ return /* @__PURE__ */ i(Fe, { required: o, ...e, children: /* @__PURE__ */ i(Nl, { ooui: t, showTime: n }) });
5100
5100
  }, Nl = (e) => {
5101
5101
  const { value: t, onChange: n, ooui: o, showTime: r } = e, { id: s, readOnly: a, required: c } = o, { token: d } = Pl(), u = Fr(), f = c && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, l = r ? "time" : "date", h = (g) => {
5102
5102
  n == null || n(g);
@@ -5306,9 +5306,9 @@ const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci,
5306
5306
  context: v,
5307
5307
  readonly: O,
5308
5308
  onSelectAllRecords: x
5309
- } = e, R = Q(null), [T, A] = C([]), V = Q(!1), [_, D] = C(), { t: E } = pe(), K = Q(o), L = te(
5309
+ } = e, R = Z(null), [T, A] = C([]), V = Z(!1), [_, D] = C(), { t: E } = ge(), K = Z(o), N = te(
5310
5310
  nt
5311
- ), { title: N = void 0, setTitle: B = void 0 } = (b ? L : {}) || {}, P = Ce(() => {
5311
+ ), { title: L = void 0, setTitle: B = void 0 } = (b ? N : {}) || {}, P = Ce(() => {
5312
5312
  if (_)
5313
5313
  return br(
5314
5314
  _,
@@ -5325,8 +5325,8 @@ const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci,
5325
5325
  }
5326
5326
  })), fe(() => {
5327
5327
  const G = bt(s);
5328
- D(G), G.string && N !== G.string && (B == null || B(G.string));
5329
- }, [s, N]), fe(() => {
5328
+ D(G), G.string && L !== G.string && (B == null || B(G.string));
5329
+ }, [s, L]), fe(() => {
5330
5330
  if (!_)
5331
5331
  return;
5332
5332
  V.current = !1;
@@ -5335,13 +5335,13 @@ const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci,
5335
5335
  }, [a]), fe(() => {
5336
5336
  K.current = o;
5337
5337
  }, [o]);
5338
- const X = (n - 1) * K.current + 1, Y = X - 1 + T.length, ee = r === void 0 ? null : r === 0 ? E("no_results") : E("summary").replace("{from}", X == null ? void 0 : X.toString()).replace("{to}", Y == null ? void 0 : Y.toString()).replace("{total}", r == null ? void 0 : r.toString()), ce = Ce(() => {
5338
+ const J = (n - 1) * K.current + 1, Y = J - 1 + T.length, ee = r === void 0 ? null : r === 0 ? E("no_results") : E("summary").replace("{from}", J == null ? void 0 : J.toString()).replace("{to}", Y == null ? void 0 : Y.toString()).replace("{total}", r == null ? void 0 : r.toString()), ce = Ce(() => {
5339
5339
  if (!f || s.isExpandable)
5340
5340
  return null;
5341
5341
  const G = T == null ? void 0 : T.filter(
5342
- (me) => l && l.includes(me.id)
5342
+ (pe) => l && l.includes(pe.id)
5343
5343
  ).length;
5344
- return d ? null : r === void 0 ? /* @__PURE__ */ i($e, { className: "pb-4" }) : /* @__PURE__ */ k(_e, { align: "bottom", className: "pb-4", children: [
5344
+ return d ? null : r === void 0 ? /* @__PURE__ */ i($e, { className: "pb-4" }) : /* @__PURE__ */ k(De, { align: "bottom", className: "pb-4", children: [
5345
5345
  /* @__PURE__ */ i(be, { span: x ? 8 : 12, children: /* @__PURE__ */ i(
5346
5346
  Qi,
5347
5347
  {
@@ -5375,17 +5375,17 @@ const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci,
5375
5375
  ee,
5376
5376
  r,
5377
5377
  s.isExpandable
5378
- ]), le = Ce(() => {
5378
+ ]), de = Ce(() => {
5379
5379
  if (!_)
5380
5380
  return null;
5381
- const G = _.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
5381
+ const G = _.columns.filter((X) => X.sum !== void 0).map((X) => ({ label: X.sum, field: X.id }));
5382
5382
  if (!G || G.length === 0)
5383
5383
  return null;
5384
- const me = [], ie = (l == null ? void 0 : l.length) > 0 ? T.filter((z) => l.includes(z.id)) : T;
5385
- return G.forEach((z) => {
5386
- const ue = ie.reduce((ge, De) => De[z.field] && !isNaN(De[z.field]) ? ge + De[z.field] : ge, 0);
5387
- me.push(`${z.label}: ${Math.round(ue * 100) / 100}`);
5388
- }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: me.join(", ") });
5384
+ const pe = [], ie = (l == null ? void 0 : l.length) > 0 ? T.filter((X) => l.includes(X.id)) : T;
5385
+ return G.forEach((X) => {
5386
+ const ue = ie.reduce((ye, Re) => Re[X.field] && !isNaN(Re[X.field]) ? ye + Re[X.field] : ye, 0);
5387
+ pe.push(`${X.label}: ${Math.round(ue * 100) / 100}`);
5388
+ }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: pe.join(", ") });
5389
5389
  }, [T, l, _]), H = Ce(() => {
5390
5390
  if (_ !== null && P && P.length > 0)
5391
5391
  return Fl(P, T, 600);
@@ -5423,7 +5423,7 @@ const Vl = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ci,
5423
5423
  } : void 0
5424
5424
  }
5425
5425
  ),
5426
- le
5426
+ de
5427
5427
  ] });
5428
5428
  }
5429
5429
  ), ln = or(di);
@@ -5455,42 +5455,42 @@ const ui = (e) => {
5455
5455
  searchParams: O = [],
5456
5456
  setSearchValues: x,
5457
5457
  clearSelection: R
5458
- } = e, [T, A] = C(!1), [V, _] = C(!1), [D, E] = C(), [K, L] = C(1), [N, B] = C(0), [P, X] = C(), [Y, ee] = C([]), [ce, le] = C(void 0), [H, F] = C(void 0), W = Q(b || Vt), G = Q([]), me = U(
5459
- (Z) => {
5460
- w == null || w([...Z]), ee([...Z]);
5458
+ } = e, [T, A] = C(!1), [V, _] = C(!1), [D, E] = C(), [K, N] = C(1), [L, B] = C(0), [P, J] = C(), [Y, ee] = C([]), [ce, de] = C(void 0), [H, F] = C(void 0), W = Z(b || Vt), G = Z([]), pe = U(
5459
+ (Q) => {
5460
+ w == null || w([...Q]), ee([...Q]);
5461
5461
  },
5462
5462
  [w]
5463
- ), ie = U(() => y || Y, [y, Y]), z = U(async () => {
5464
- const Z = await M.getHandler().nameSearch({
5463
+ ), ie = U(() => y || Y, [y, Y]), X = U(async () => {
5464
+ const Q = await M.getHandler().nameSearch({
5465
5465
  model: t,
5466
5466
  payload: c,
5467
5467
  limit: W.current,
5468
5468
  attrs: S,
5469
5469
  context: u
5470
5470
  });
5471
- if (X(Z.length), f == null || f(Z.length), Z.length > 0) {
5472
- const de = Z.map((re) => re == null ? void 0 : re[0]), { colors: he, status: Ne } = bt(l), J = {};
5473
- he && (J.colors = he), Ne && (J.status = Ne);
5474
- const Fe = await M.getHandler().readEvalUiObjects({
5471
+ if (J(Q.length), f == null || f(Q.length), Q.length > 0) {
5472
+ const ne = Q.map((re) => re == null ? void 0 : re[0]), { colors: he, status: Ne } = bt(l), z = {};
5473
+ he && (z.colors = he), Ne && (z.status = Ne);
5474
+ const Te = await M.getHandler().readEvalUiObjects({
5475
5475
  model: t,
5476
- ids: de,
5476
+ ids: ne,
5477
5477
  arch: l == null ? void 0 : l.arch,
5478
5478
  fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
5479
5479
  context: u,
5480
- attrs: J
5481
- }), Ae = Fe[0];
5482
- G.current = [...Ae], le(sn(Fe[1])), F(Yn(Fe[1]));
5480
+ attrs: z
5481
+ }), Ae = Te[0];
5482
+ G.current = [...Ae], de(sn(Te[1])), F(Yn(Te[1]));
5483
5483
  const je = Ae.map((re) => re.id), Le = p !== void 0 ? Lt({
5484
5484
  resultsToSort: Ae,
5485
5485
  sorter: p,
5486
5486
  fields: { ...l.fields, ...h.fields }
5487
5487
  }) : [...G.current];
5488
- me(Le), je.length > 0 ? g == null || g(0) : g == null || g(void 0);
5488
+ pe(Le), je.length > 0 ? g == null || g(0) : g == null || g(void 0);
5489
5489
  } else
5490
- me([]), g == null || g(void 0);
5490
+ pe([]), g == null || g(void 0);
5491
5491
  A(!1), d.current = !0;
5492
5492
  }, [
5493
- me,
5493
+ pe,
5494
5494
  d,
5495
5495
  c,
5496
5496
  t,
@@ -5502,26 +5502,26 @@ const ui = (e) => {
5502
5502
  g,
5503
5503
  f
5504
5504
  ]), ue = U(
5505
- async (Z) => {
5506
- const { params: de, newOffset: he } = Z || {}, Ne = Bt(de || O, S), { colors: J, status: Fe } = bt(l), Ae = {};
5507
- J && (Ae.colors = J), Fe && (Ae.status = Fe);
5505
+ async (Q) => {
5506
+ const { params: ne, newOffset: he } = Q || {}, Ne = Bt(ne || O, S), { colors: z, status: Te } = bt(l), Ae = {};
5507
+ z && (Ae.colors = z), Te && (Ae.status = Te);
5508
5508
  const { totalItems: je, results: Le, attrsEvaluated: re } = await M.getHandler().searchForTree({
5509
5509
  params: Ne,
5510
5510
  limit: W.current,
5511
- offset: he || N,
5511
+ offset: he || L,
5512
5512
  model: t,
5513
5513
  fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
5514
5514
  context: u,
5515
5515
  attrs: Ae
5516
5516
  });
5517
- le(sn(re)), F(Yn(re)), G.current = [...Le];
5518
- const Oe = p !== void 0 ? Lt({
5517
+ de(sn(re)), F(Yn(re)), G.current = [...Le];
5518
+ const Ie = p !== void 0 ? Lt({
5519
5519
  resultsToSort: Le,
5520
5520
  sorter: p,
5521
5521
  fields: { ...l.fields, ...h.fields }
5522
5522
  }) : [...G.current];
5523
- if (me(Oe), y && Oe.length > 0) {
5524
- const we = Oe.findIndex(
5523
+ if (pe(Ie), y && Ie.length > 0) {
5524
+ const we = Ie.findIndex(
5525
5525
  (rt) => I === rt.id
5526
5526
  );
5527
5527
  we === -1 ? g == null || g(0) : g == null || g(we);
@@ -5529,12 +5529,12 @@ const ui = (e) => {
5529
5529
  g == null || g(void 0);
5530
5530
  A(!1);
5531
5531
  const Ke = await je;
5532
- X(Ke), f == null || f(Ke);
5532
+ J(Ke), f == null || f(Ke);
5533
5533
  },
5534
5534
  [
5535
5535
  g,
5536
5536
  y,
5537
- me,
5537
+ pe,
5538
5538
  I,
5539
5539
  t,
5540
5540
  u,
@@ -5543,15 +5543,15 @@ const ui = (e) => {
5543
5543
  h,
5544
5544
  p,
5545
5545
  f,
5546
- N,
5546
+ L,
5547
5547
  O
5548
5548
  ]
5549
- ), ge = U(
5550
- async (Z) => {
5549
+ ), ye = U(
5550
+ async (Q) => {
5551
5551
  try {
5552
- A(!0), a == null || a(!0), c && !d.current ? await z() : await ue(Z), R == null || R();
5553
- } catch (de) {
5554
- E(typeof de == "string" ? de : de.message), A(!1);
5552
+ A(!0), a == null || a(!0), c && !d.current ? await X() : await ue(Q), R == null || R();
5553
+ } catch (ne) {
5554
+ E(typeof ne == "string" ? ne : ne.message), A(!1);
5555
5555
  } finally {
5556
5556
  o == null || o([]), _(!1), a == null || a(!1);
5557
5557
  }
@@ -5559,23 +5559,23 @@ const ui = (e) => {
5559
5559
  [
5560
5560
  R,
5561
5561
  c,
5562
- z,
5562
+ X,
5563
5563
  d,
5564
5564
  ue,
5565
5565
  o,
5566
5566
  a
5567
5567
  ]
5568
- ), De = U(
5569
- (Z) => {
5570
- if (JSON.stringify(Z) === JSON.stringify(p))
5568
+ ), Re = U(
5569
+ (Q) => {
5570
+ if (JSON.stringify(Q) === JSON.stringify(p))
5571
5571
  return;
5572
- m == null || m(Z);
5573
- const de = Z !== void 0 ? Lt({
5572
+ m == null || m(Q);
5573
+ const ne = Q !== void 0 ? Lt({
5574
5574
  resultsToSort: ie(),
5575
- sorter: Z,
5575
+ sorter: Q,
5576
5576
  fields: { ...l.fields, ...h.fields }
5577
5577
  }) : [...G.current];
5578
- me(de);
5578
+ pe(ne);
5579
5579
  },
5580
5580
  [
5581
5581
  p,
@@ -5583,14 +5583,14 @@ const ui = (e) => {
5583
5583
  ie,
5584
5584
  l == null ? void 0 : l.fields,
5585
5585
  h == null ? void 0 : h.fields,
5586
- me
5586
+ pe
5587
5587
  ]
5588
- ), Me = U(
5589
- (Z) => {
5590
- const { params: de, searchValues: he, limit: Ne, offset: J } = Z;
5591
- T || (n == null || n(void 0), o == null || o([]), x == null || x(he), r == null || r(de), s == null || s(!1), _(!0), E(void 0), L(1), Ne && (W.current = Ne, v == null || v(Ne)), J && B(J), ge({
5592
- params: de,
5593
- newOffset: J
5588
+ ), Pe = U(
5589
+ (Q) => {
5590
+ const { params: ne, searchValues: he, limit: Ne, offset: z } = Q;
5591
+ T || (n == null || n(void 0), o == null || o([]), x == null || x(he), r == null || r(ne), s == null || s(!1), _(!0), E(void 0), N(1), Ne && (W.current = Ne, v == null || v(Ne)), z && B(z), ye({
5592
+ params: ne,
5593
+ newOffset: z
5594
5594
  }));
5595
5595
  },
5596
5596
  [
@@ -5600,16 +5600,16 @@ const ui = (e) => {
5600
5600
  x,
5601
5601
  r,
5602
5602
  s,
5603
- ge,
5603
+ ye,
5604
5604
  v
5605
5605
  ]
5606
5606
  ), Ve = U(
5607
- (Z) => {
5608
- A(!0), L(Z), B((Z - 1) * b);
5607
+ (Q) => {
5608
+ A(!0), N(Q), B((Q - 1) * b);
5609
5609
  },
5610
- [A, b, B, L]
5611
- ), ne = U(() => {
5612
- T || (n == null || n(void 0), r == null || r([]), x == null || x({}), E(void 0), B(0), L(1), v == null || v(b || Vt));
5610
+ [A, b, B, N]
5611
+ ), _e = U(() => {
5612
+ T || (n == null || n(void 0), r == null || r([]), x == null || x({}), E(void 0), B(0), N(1), v == null || v(b || Vt));
5613
5613
  }, [
5614
5614
  T,
5615
5615
  n,
@@ -5617,41 +5617,41 @@ const ui = (e) => {
5617
5617
  x,
5618
5618
  v,
5619
5619
  b
5620
- ]), xe = U(
5621
- async (Z) => {
5622
- const de = Z[(l == null ? void 0 : l.field_parent) || "child_id"], he = await M.getHandler().readObjects({
5620
+ ]), me = U(
5621
+ async (Q) => {
5622
+ const ne = Q[(l == null ? void 0 : l.field_parent) || "child_id"], he = await M.getHandler().readObjects({
5623
5623
  model: t,
5624
- ids: de,
5624
+ ids: ne,
5625
5625
  fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
5626
5626
  context: u
5627
5627
  });
5628
- return me([...ie(), ...he]), _n(bt(l), he);
5628
+ return pe([...ie(), ...he]), _n(bt(l), he);
5629
5629
  },
5630
- [l, t, u, ie, me]
5631
- ), ye = U(async () => await M.getHandler().searchAllIds({
5630
+ [l, t, u, ie, pe]
5631
+ ), le = U(async () => await M.getHandler().searchAllIds({
5632
5632
  params: Bt(O, S),
5633
5633
  model: t,
5634
5634
  context: u,
5635
5635
  totalItems: P
5636
5636
  }), [t, u, P, O, S]);
5637
5637
  return {
5638
- submit: Me,
5639
- clear: ne,
5640
- fetchResults: ge,
5638
+ submit: Pe,
5639
+ clear: _e,
5640
+ fetchResults: ye,
5641
5641
  tableRefreshing: T,
5642
5642
  searchFilterLoading: V,
5643
5643
  searchError: D,
5644
5644
  page: K,
5645
- offset: N,
5645
+ offset: L,
5646
5646
  limit: W.current,
5647
5647
  getResults: ie,
5648
5648
  requestPageChange: Ve,
5649
- changeSort: De,
5650
- fetchChildrenForRecord: xe,
5649
+ changeSort: Re,
5650
+ fetchChildrenForRecord: me,
5651
5651
  colorsForResults: ce,
5652
5652
  statusForResults: H,
5653
5653
  totalItems: P,
5654
- getAllIds: ye
5654
+ getAllIds: le
5655
5655
  };
5656
5656
  };
5657
5657
  function Xl(e, t) {
@@ -5668,60 +5668,60 @@ function Xl(e, t) {
5668
5668
  rootTree: f = !1,
5669
5669
  parentContext: l = {},
5670
5670
  onChangeSelectedRowKeys: h
5671
- } = e, [p, m] = C(!1), [g, w] = C(!1), y = Q(!1), S = Q(null), [I, b] = C(), [v, O] = C(), [x, R] = C(), [T, A] = C(), [V, _] = C(200), D = Q(), { height: E } = Vn(), K = te(
5671
+ } = e, [p, m] = C(!1), [g, w] = C(!1), y = Z(!1), S = Z(null), [I, b] = C(), [v, O] = C(), [x, R] = C(), [T, A] = C(), [V, _] = C(200), D = Z(), { height: E } = Vn(), K = te(
5672
5672
  Yt
5673
- ), { processAction: L } = K || {}, N = te(
5673
+ ), { processAction: N } = K || {}, L = te(
5674
5674
  nt
5675
5675
  ), {
5676
5676
  setResults: B = void 0,
5677
5677
  setCurrentItemIndex: P = void 0,
5678
- currentId: X = void 0,
5678
+ currentId: J = void 0,
5679
5679
  results: Y = void 0,
5680
5680
  selectedRowItems: ee = void 0,
5681
5681
  setSelectedRowItems: ce = void 0,
5682
- searchParams: le = [],
5682
+ searchParams: de = [],
5683
5683
  setSearchParams: H = void 0,
5684
5684
  searchVisible: F = !0,
5685
5685
  setSearchVisible: W = void 0,
5686
5686
  sorter: G = void 0,
5687
- setSorter: me = void 0,
5687
+ setSorter: pe = void 0,
5688
5688
  setTotalItems: ie = void 0,
5689
- setSearchTreeNameSearch: z = void 0,
5689
+ setSearchTreeNameSearch: X = void 0,
5690
5690
  setTreeIsLoading: ue = void 0,
5691
- searchValues: ge = {},
5692
- setSearchValues: De = void 0,
5693
- limit: Me = Vt,
5691
+ searchValues: ye = {},
5692
+ setSearchValues: Re = void 0,
5693
+ limit: Pe = Vt,
5694
5694
  setLimit: Ve = void 0
5695
- } = (f ? N : {}) || {}, ne = U(
5695
+ } = (f ? L : {}) || {}, _e = U(
5696
5696
  (Be) => {
5697
5697
  ce == null || ce(Be.map((qe) => ({ id: qe }))), h == null || h(Be);
5698
5698
  },
5699
5699
  [h, ce]
5700
5700
  ), {
5701
- submit: xe,
5702
- clear: ye,
5703
- fetchResults: Z,
5704
- tableRefreshing: de,
5701
+ submit: me,
5702
+ clear: le,
5703
+ fetchResults: Q,
5704
+ tableRefreshing: ne,
5705
5705
  searchFilterLoading: he,
5706
5706
  searchError: Ne,
5707
- page: J,
5708
- limit: Fe,
5707
+ page: z,
5708
+ limit: Te,
5709
5709
  offset: Ae,
5710
5710
  getResults: je,
5711
5711
  requestPageChange: Le,
5712
5712
  changeSort: re,
5713
- fetchChildrenForRecord: Oe,
5713
+ fetchChildrenForRecord: Ie,
5714
5714
  colorsForResults: Ke,
5715
5715
  statusForResults: we,
5716
5716
  totalItems: rt,
5717
5717
  getAllIds: q
5718
5718
  } = ui({
5719
5719
  model: I,
5720
- setSearchTreeNameSearch: z,
5721
- setSelectedRowItems: ne,
5720
+ setSearchTreeNameSearch: X,
5721
+ setSelectedRowItems: _e,
5722
5722
  setSearchParams: H,
5723
- setSearchValues: De,
5724
- searchParams: le,
5723
+ setSearchValues: Re,
5724
+ searchParams: de,
5725
5725
  setSearchVisible: W,
5726
5726
  setTreeIsLoading: ue,
5727
5727
  nameSearch: a,
@@ -5730,36 +5730,36 @@ function Xl(e, t) {
5730
5730
  formView: x,
5731
5731
  treeView: v,
5732
5732
  sorter: G,
5733
- setSorter: me,
5733
+ setSorter: pe,
5734
5734
  setCurrentItemIndex: P,
5735
5735
  setResultsActionView: B,
5736
5736
  resultsActionView: Y,
5737
5737
  domain: d,
5738
- currentId: X,
5738
+ currentId: J,
5739
5739
  setActionViewTotalItems: ie,
5740
- limit: Me,
5740
+ limit: Pe,
5741
5741
  setLimit: Ve,
5742
5742
  clearSelection: (Qt = S.current) == null ? void 0 : Qt.unselectAll
5743
5743
  });
5744
5744
  lt(t, () => ({
5745
5745
  refreshResults: () => {
5746
- y.current = !1, Z();
5746
+ y.current = !1, Q();
5747
5747
  },
5748
5748
  getFields: () => v == null ? void 0 : v.fields,
5749
5749
  getDomain: () => d
5750
5750
  })), fe(() => {
5751
- g && u && v && (y.current = !1, Z());
5752
- }, [J, Ae, g, u, a, v]);
5751
+ g && u && v && (y.current = !1, Q());
5752
+ }, [z, Ae, g, u, a, v]);
5753
5753
  const ve = async () => {
5754
5754
  w(!1), m(!0), A(void 0), ue == null || ue(!0);
5755
5755
  try {
5756
- await Re(), w(!0);
5756
+ await Oe(), w(!0);
5757
5757
  } catch (Be) {
5758
5758
  A(Be), ue == null || ue(!1);
5759
5759
  } finally {
5760
5760
  m(!1);
5761
5761
  }
5762
- }, Re = async () => {
5762
+ }, Oe = async () => {
5763
5763
  b(n);
5764
5764
  let Be = o;
5765
5765
  o || (Be = await M.getHandler().getView({
@@ -5777,7 +5777,7 @@ function Xl(e, t) {
5777
5777
  fe(() => {
5778
5778
  ve();
5779
5779
  }, [n]);
5780
- const Te = U(
5780
+ const xe = U(
5781
5781
  (Be) => {
5782
5782
  Ve == null || Ve(Be);
5783
5783
  },
@@ -5791,7 +5791,7 @@ function Xl(e, t) {
5791
5791
  context: l
5792
5792
  }));
5793
5793
  const Dt = D.current[0][2];
5794
- await (L == null ? void 0 : L({
5794
+ await (N == null ? void 0 : N({
5795
5795
  actionData: Dt,
5796
5796
  fields: v.fields,
5797
5797
  values: {
@@ -5801,7 +5801,7 @@ function Xl(e, t) {
5801
5801
  context: l
5802
5802
  }));
5803
5803
  },
5804
- [I, l, L, v]
5804
+ [I, l, N, v]
5805
5805
  ), ke = U(
5806
5806
  async (Be) => {
5807
5807
  const { id: qe } = Be;
@@ -5836,16 +5836,16 @@ function Xl(e, t) {
5836
5836
  x.search_fields,
5837
5837
  v.search_fields
5838
5838
  ]),
5839
- onClear: ye,
5840
- limit: Me,
5839
+ onClear: le,
5840
+ limit: Pe,
5841
5841
  offset: Ae,
5842
5842
  isSearching: he,
5843
- onSubmit: xe,
5844
- onLimitChange: Te,
5843
+ onSubmit: me,
5844
+ onLimitChange: xe,
5845
5845
  setSearchFilterHeight: _,
5846
5846
  searchError: Ne,
5847
5847
  searchVisible: F,
5848
- searchValues: ge
5848
+ searchValues: ye
5849
5849
  }
5850
5850
  ),
5851
5851
  /* @__PURE__ */ i(
@@ -5854,21 +5854,21 @@ function Xl(e, t) {
5854
5854
  ref: S,
5855
5855
  context: l,
5856
5856
  total: rt,
5857
- limit: Fe,
5858
- page: J,
5857
+ limit: Te,
5858
+ page: z,
5859
5859
  treeView: v,
5860
5860
  results: je(),
5861
5861
  onRequestPageChange: Le,
5862
- loading: de,
5862
+ loading: ne,
5863
5863
  onRowClicked: ke,
5864
5864
  scrollY: c || ht,
5865
5865
  colorsForResults: Ke,
5866
5866
  statusForResults: we,
5867
5867
  selectedRowKeys: Ge,
5868
- onRowSelectionChange: ne,
5868
+ onRowSelectionChange: _e,
5869
5869
  sorter: G,
5870
5870
  onChangeSort: re,
5871
- onFetchChildrenForRecord: v.isExpandable ? Oe : void 0,
5871
+ onFetchChildrenForRecord: v.isExpandable ? Ie : void 0,
5872
5872
  childField: v.field_parent,
5873
5873
  rootTree: f,
5874
5874
  onSelectAllRecords: mt
@@ -5876,32 +5876,32 @@ function Xl(e, t) {
5876
5876
  )
5877
5877
  ] }), [
5878
5878
  ht,
5879
- ne,
5879
+ _e,
5880
5880
  re,
5881
- ye,
5881
+ le,
5882
5882
  Ke,
5883
- Oe,
5883
+ Ie,
5884
5884
  x,
5885
5885
  je,
5886
- Me,
5887
- Fe,
5886
+ Pe,
5887
+ Te,
5888
5888
  Ae,
5889
5889
  ke,
5890
- Te,
5891
- J,
5890
+ xe,
5891
+ z,
5892
5892
  l,
5893
5893
  Le,
5894
5894
  f,
5895
5895
  Ne,
5896
5896
  he,
5897
- ge,
5897
+ ye,
5898
5898
  F,
5899
5899
  mt,
5900
5900
  Ge,
5901
5901
  G,
5902
5902
  we,
5903
- xe,
5904
- de,
5903
+ me,
5904
+ ne,
5905
5905
  rt,
5906
5906
  c,
5907
5907
  v
@@ -5927,7 +5927,7 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
5927
5927
  nameSearch: s,
5928
5928
  domain: a,
5929
5929
  context: c = {}
5930
- } = e, [d, u] = C(!1), { modalWidth: f, modalHeight: l } = Vn(), { t: h } = pe(), [p, m] = C([]), [g, w] = C(!1), y = U(
5930
+ } = e, [d, u] = C(!1), { modalWidth: f, modalHeight: l } = Vn(), { t: h } = ge(), [p, m] = C([]), [g, w] = C(!1), y = U(
5931
5931
  async (O) => {
5932
5932
  w(!0);
5933
5933
  try {
@@ -5965,9 +5965,9 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
5965
5965
  }
5966
5966
  ),
5967
5967
  /* @__PURE__ */ i(Cn, {}),
5968
- /* @__PURE__ */ i(_e, { justify: "end", children: /* @__PURE__ */ k(ze, { children: [
5968
+ /* @__PURE__ */ i(De, { justify: "end", children: /* @__PURE__ */ k(ze, { children: [
5969
5969
  /* @__PURE__ */ i(
5970
- Pe,
5970
+ Me,
5971
5971
  {
5972
5972
  disabled: g,
5973
5973
  icon: /* @__PURE__ */ i(In, {}),
@@ -5978,7 +5978,7 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
5978
5978
  }
5979
5979
  ),
5980
5980
  /* @__PURE__ */ i(
5981
- Pe,
5981
+ Me,
5982
5982
  {
5983
5983
  disabled: g,
5984
5984
  icon: g ? /* @__PURE__ */ i(pt, {}) : /* @__PURE__ */ i(xn, {}),
@@ -5989,7 +5989,7 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
5989
5989
  children: h("ok")
5990
5990
  }
5991
5991
  ),
5992
- /* @__PURE__ */ i(Pe, { icon: /* @__PURE__ */ i(Wt, {}), onClick: S, children: h("cancel") })
5992
+ /* @__PURE__ */ i(Me, { icon: /* @__PURE__ */ i(Wt, {}), onClick: S, children: h("cancel") })
5993
5993
  ] }) })
5994
5994
  ] });
5995
5995
  return /* @__PURE__ */ k(se, { children: [
@@ -6025,7 +6025,7 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
6025
6025
  ] });
6026
6026
  }, { defaultAlgorithm: Zl, defaultSeed: ed } = We, mi = Zl(ed), td = (e) => {
6027
6027
  const { ooui: t } = e, { required: n } = t;
6028
- return /* @__PURE__ */ i(Ie, { required: n, type: "array", validator: async (r, s) => {
6028
+ return /* @__PURE__ */ i(Fe, { required: n, type: "array", validator: async (r, s) => {
6029
6029
  if (!s)
6030
6030
  throw new Error();
6031
6031
  if (!Array.isArray(s))
@@ -6041,18 +6041,18 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
6041
6041
  context: c,
6042
6042
  id: d,
6043
6043
  domain: u
6044
- } = o, f = r && !a ? { backgroundColor: mi.colorPrimaryBg } : void 0, [l, h] = C(!1), [p, m] = C(!1), [g, w] = C(!1), [y, S] = C(), I = Q(!1), [b, v] = C(""), O = Q(), x = te(He), { domain: R, getValues: T, getFields: A, getContext: V, elementHasLostFocus: _ } = x || {}, D = Q([]), [E, K] = C([]), L = t && t[0] || void 0, N = t && t[1] || "";
6044
+ } = o, f = r && !a ? { backgroundColor: mi.colorPrimaryBg } : void 0, [l, h] = C(!1), [p, m] = C(!1), [g, w] = C(!1), [y, S] = C(), I = Z(!1), [b, v] = C(""), O = Z(), x = te(He), { domain: R, getValues: T, getFields: A, getContext: V, elementHasLostFocus: _ } = x || {}, D = Z([]), [E, K] = C([]), N = t && t[0] || void 0, L = t && t[1] || "";
6045
6045
  fe(() => {
6046
6046
  !Array.isArray(t) && t && ee(t);
6047
6047
  }, [t]), fe(() => {
6048
- L && N.length === 0 ? ee(L) : L && N.length > 0 ? v(N) : !L && !N && v(O.current || "");
6048
+ N && L.length === 0 ? ee(N) : N && L.length > 0 ? v(L) : !N && !L && v(O.current || "");
6049
6049
  }, [t]);
6050
6050
  const B = (F) => {
6051
6051
  n == null || n(F), _ == null || _();
6052
6052
  }, P = (F) => {
6053
6053
  O.current = F.target.value, B([void 0, ""]);
6054
- }, X = async () => {
6055
- if (!g && b !== N) {
6054
+ }, J = async () => {
6055
+ if (!g && b !== L) {
6056
6056
  if (await new Promise((F) => setTimeout(F, 100)), I.current) {
6057
6057
  B([void 0, ""]);
6058
6058
  return;
@@ -6119,10 +6119,10 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
6119
6119
  })
6120
6120
  )), K(D.current);
6121
6121
  }
6122
- async function le(F) {
6123
- F.keyCode === 13 ? (F.preventDefault(), F.stopPropagation(), await X()) : F.code === "Backspace" && L !== void 0 && (F.preventDefault(), F.stopPropagation(), B([void 0, ""]));
6122
+ async function de(F) {
6123
+ F.keyCode === 13 ? (F.preventDefault(), F.stopPropagation(), await J()) : F.code === "Backspace" && N !== void 0 && (F.preventDefault(), F.stopPropagation(), B([void 0, ""]));
6124
6124
  }
6125
- return /* @__PURE__ */ k(_e, { gutter: 8, wrap: !1, children: [
6125
+ return /* @__PURE__ */ k(De, { gutter: 8, wrap: !1, children: [
6126
6126
  /* @__PURE__ */ i(be, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ i(
6127
6127
  r && !a ? nd : ot,
6128
6128
  {
@@ -6135,12 +6135,12 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
6135
6135
  borderTopRightRadius: 0,
6136
6136
  borderBottomRightRadius: 0
6137
6137
  },
6138
- onBlur: X,
6139
- onKeyDown: le,
6138
+ onBlur: J,
6139
+ onKeyDown: de,
6140
6140
  suffix: /* @__PURE__ */ i(
6141
6141
  Ir,
6142
6142
  {
6143
- id: L,
6143
+ id: N,
6144
6144
  model: s,
6145
6145
  context: { ...V == null ? void 0 : V(), ...c }
6146
6146
  }
@@ -6148,10 +6148,10 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
6148
6148
  }
6149
6149
  ) }),
6150
6150
  /* @__PURE__ */ i(be, { flex: "none", style: { paddingRight: 0, paddingLeft: 0 }, children: /* @__PURE__ */ i(
6151
- Pe,
6151
+ Me,
6152
6152
  {
6153
6153
  icon: /* @__PURE__ */ i(dr, {}),
6154
- disabled: L === void 0 || N === "" || b === void 0,
6154
+ disabled: N === void 0 || L === "" || b === void 0,
6155
6155
  onClick: () => {
6156
6156
  m(!0);
6157
6157
  },
@@ -6160,12 +6160,12 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
6160
6160
  }
6161
6161
  ) }),
6162
6162
  /* @__PURE__ */ i(be, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ i(
6163
- Pe,
6163
+ Me,
6164
6164
  {
6165
6165
  icon: g ? /* @__PURE__ */ i(pt, {}) : /* @__PURE__ */ i(Fn, {}),
6166
6166
  disabled: a || g,
6167
6167
  onClick: () => {
6168
- I.current = !0, Y(N);
6168
+ I.current = !0, Y(L);
6169
6169
  },
6170
6170
  style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
6171
6171
  tabIndex: -1
@@ -6178,7 +6178,7 @@ const fi = ct(Xl), { error: Ql } = et, xt = (e) => {
6178
6178
  domain: E,
6179
6179
  context: { ...V == null ? void 0 : V(), ...c },
6180
6180
  visible: l,
6181
- nameSearch: L ? void 0 : y,
6181
+ nameSearch: N ? void 0 : y,
6182
6182
  onSelectValues: async (F) => {
6183
6183
  h(!1), ee(F[0]), I.current = !1, O.current = void 0;
6184
6184
  },
@@ -6458,53 +6458,53 @@ const cd = (e) => {
6458
6458
  getContext: m,
6459
6459
  domain: g,
6460
6460
  fetchValues: w
6461
- } = f || {}, { t: y } = pe(), [S, I] = C(!1), [b, v] = C(!1), [O, x] = C(), [R, T] = C(!1), [A, V] = C(!1), [_, D] = C(), [E, K] = C([]), [L, N] = C(!1), B = Q([]), [P, X] = C(), Y = Q(), [ee, ce] = C(void 0), {
6462
- readOnly: le,
6461
+ } = f || {}, { t: y } = ge(), [S, I] = C(!1), [b, v] = C(!1), [O, x] = C(), [R, T] = C(!1), [A, V] = C(!1), [_, D] = C(), [E, K] = C([]), [N, L] = C(!1), B = Z([]), [P, J] = C(), Y = Z(), [ee, ce] = C(void 0), {
6462
+ readOnly: de,
6463
6463
  relation: H,
6464
6464
  context: F,
6465
6465
  domain: W
6466
- } = o, G = o.type === "many2many", { id: me } = o, ie = s.filter(
6466
+ } = o, G = o.type === "many2many", { id: pe } = o, ie = s.filter(
6467
6467
  (q) => (q.values || q.treeValues) && q.operation !== "pendingRemove"
6468
- ), z = Q();
6468
+ ), X = Z();
6469
6469
  fe(() => {
6470
- if (z.current !== a) {
6471
- z.current = a, ue();
6470
+ if (X.current !== a) {
6471
+ X.current = a, ue();
6472
6472
  return;
6473
6473
  }
6474
6474
  ue();
6475
6475
  }, [s, a]);
6476
6476
  const ue = U(() => {
6477
- (a === "form" && s.some((q) => !q.values) || a === "tree" && s.some((q) => !q.treeValues)) && De();
6477
+ (a === "form" && s.some((q) => !q.values) || a === "tree" && s.some((q) => !q.treeValues)) && Re();
6478
6478
  }, [s, a]);
6479
6479
  fe(() => {
6480
6480
  Ve();
6481
6481
  }, [g]);
6482
- const ge = (q) => {
6483
- var ve, Re;
6482
+ const ye = (q) => {
6483
+ var ve, Oe;
6484
6484
  n == null || n({
6485
- fields: ((ve = r.get("form")) == null ? void 0 : ve.fields) || ((Re = r.get("tree")) == null ? void 0 : Re.fields),
6485
+ fields: ((ve = r.get("form")) == null ? void 0 : ve.fields) || ((Oe = r.get("tree")) == null ? void 0 : Oe.fields),
6486
6486
  items: ad(q)
6487
6487
  });
6488
- }, De = async () => {
6489
- await Me(), d > ie.length - 1 && d !== 0 && u(0);
6490
- }, Me = async (q) => {
6491
- var ve, Re, Te;
6488
+ }, Re = async () => {
6489
+ await Pe(), d > ie.length - 1 && d !== 0 && u(0);
6490
+ }, Pe = async (q) => {
6491
+ var ve, Oe, xe;
6492
6492
  v(!0), I(!1), x(void 0);
6493
6493
  try {
6494
6494
  const [Ee, ke] = await Cr({
6495
6495
  treeView: {
6496
6496
  arch: (ve = r.get("tree")) == null ? void 0 : ve.arch,
6497
- fields: (Re = r.get("tree")) == null ? void 0 : Re.fields
6497
+ fields: (Oe = r.get("tree")) == null ? void 0 : Oe.fields
6498
6498
  },
6499
6499
  formView: {
6500
- fields: ((Te = r.get("form")) == null ? void 0 : Te.fields) || {}
6500
+ fields: ((xe = r.get("form")) == null ? void 0 : xe.fields) || {}
6501
6501
  },
6502
6502
  model: H,
6503
6503
  items: s,
6504
6504
  context: { ...m == null ? void 0 : m(), ...F },
6505
6505
  currentView: q || a
6506
6506
  });
6507
- return Y.current || (Y.current = Ee.map((mt) => mt.id)), (a || q) === "tree" && ke && ce(ke), ge(Ee), Ee;
6507
+ return Y.current || (Y.current = Ee.map((mt) => mt.id)), (a || q) === "tree" && ke && ce(ke), ye(Ee), Ee;
6508
6508
  } catch (Ee) {
6509
6509
  x(Ee);
6510
6510
  } finally {
@@ -6523,47 +6523,47 @@ const cd = (e) => {
6523
6523
  })), g && g.length > 0 && (B.current = B.current.concat(
6524
6524
  lr({
6525
6525
  domain: g,
6526
- widgetFieldName: me
6526
+ widgetFieldName: pe
6527
6527
  })
6528
6528
  ));
6529
6529
  }
6530
- const ne = () => {
6530
+ const _e = () => {
6531
6531
  const q = Array.from(r.keys()), ve = q[(q.indexOf(a) + 1) % q.length];
6532
- a === "form" ? de(() => {
6532
+ a === "form" ? ne(() => {
6533
6533
  c(ve);
6534
6534
  }) : c(ve);
6535
- }, xe = () => {
6536
- d > 0 && (a === "form" ? de(() => {
6535
+ }, me = () => {
6536
+ d > 0 && (a === "form" ? ne(() => {
6537
6537
  u(d - 1);
6538
6538
  }) : u(d - 1));
6539
- }, ye = () => {
6539
+ }, le = () => {
6540
6540
  const q = ie.length;
6541
- d < q - 1 && (a === "form" ? de(() => {
6541
+ d < q - 1 && (a === "form" ? ne(() => {
6542
6542
  u(d + 1);
6543
6543
  }) : u(d + 1));
6544
- }, Z = async () => {
6544
+ }, Q = async () => {
6545
6545
  const q = ie[d].id, ve = (await M.getHandler().readObjects({
6546
6546
  model: H,
6547
6547
  ids: [q],
6548
6548
  fields: r.get("form").fields,
6549
6549
  context: { ...m == null ? void 0 : m(), ...F }
6550
- }))[0], Re = (await M.getHandler().readObjects({
6550
+ }))[0], Oe = (await M.getHandler().readObjects({
6551
6551
  model: H,
6552
6552
  ids: [q],
6553
6553
  fields: r.get("tree").fields,
6554
6554
  context: { ...m == null ? void 0 : m(), ...F }
6555
- }))[0], Te = s.map((Ee) => Ee.id === q ? {
6555
+ }))[0], xe = s.map((Ee) => Ee.id === q ? {
6556
6556
  ...Ee,
6557
6557
  operation: "original",
6558
6558
  values: ve,
6559
- treeValues: Re
6559
+ treeValues: Oe
6560
6560
  } : Ee);
6561
- ge(Te);
6562
- }, de = (q) => {
6561
+ ye(xe);
6562
+ }, ne = (q) => {
6563
6563
  S ? qt({
6564
6564
  t: y,
6565
6565
  onOk: () => {
6566
- Z(), q(), I(!1);
6566
+ Q(), q(), I(!1);
6567
6567
  }
6568
6568
  }) : q();
6569
6569
  }, he = () => {
@@ -6571,7 +6571,7 @@ const cd = (e) => {
6571
6571
  yi({
6572
6572
  t: y,
6573
6573
  onOk: async () => {
6574
- a === "form" ? Fe() : Ae();
6574
+ a === "form" ? Te() : Ae();
6575
6575
  }
6576
6576
  });
6577
6577
  return;
@@ -6579,20 +6579,20 @@ const cd = (e) => {
6579
6579
  gi({
6580
6580
  t: y,
6581
6581
  onOk: async () => {
6582
- a === "form" ? Fe() : Ae();
6582
+ a === "form" ? Te() : Ae();
6583
6583
  }
6584
6584
  });
6585
6585
  }, Ne = async () => {
6586
6586
  const { inv_field: q } = o;
6587
6587
  let ve;
6588
- q && l && (ve = { [q]: l }), a === "form" ? de(() => {
6589
- N(!0), D({ defaultValues: ve }), T(!0);
6590
- }) : (N(!0), D({ defaultValues: ve }), T(!0));
6591
- }, J = async () => {
6592
- a === "form" ? de(() => {
6588
+ q && l && (ve = { [q]: l }), a === "form" ? ne(() => {
6589
+ L(!0), D({ defaultValues: ve }), T(!0);
6590
+ }) : (L(!0), D({ defaultValues: ve }), T(!0));
6591
+ }, z = async () => {
6592
+ a === "form" ? ne(() => {
6593
6593
  V(!0);
6594
6594
  }) : V(!0);
6595
- }, Fe = async () => {
6595
+ }, Te = async () => {
6596
6596
  v(!0), I(!1), x(void 0);
6597
6597
  try {
6598
6598
  if (ie[d].id > 0) {
@@ -6600,9 +6600,9 @@ const cd = (e) => {
6600
6600
  ...ve,
6601
6601
  operation: "pendingRemove"
6602
6602
  } : ve);
6603
- ge(q);
6603
+ ye(q);
6604
6604
  } else
6605
- ge(
6605
+ ye(
6606
6606
  s.filter((q) => q.id !== ie[d].id)
6607
6607
  );
6608
6608
  } catch (q) {
@@ -6613,77 +6613,77 @@ const cd = (e) => {
6613
6613
  const q = ie.filter((ve) => E.includes(ve.id));
6614
6614
  v(!0), I(!1), x(void 0);
6615
6615
  try {
6616
- const ve = q.map((Te) => Te.id), Re = s.filter((Te) => !(ve.includes(Te.id) && Te.id < 0)).map((Te) => ve.includes(Te.id) ? {
6617
- ...Te,
6616
+ const ve = q.map((xe) => xe.id), Oe = s.filter((xe) => !(ve.includes(xe.id) && xe.id < 0)).map((xe) => ve.includes(xe.id) ? {
6617
+ ...xe,
6618
6618
  operation: "pendingRemove"
6619
- } : Te);
6620
- ge(Re);
6619
+ } : xe);
6620
+ ye(Oe);
6621
6621
  } catch (ve) {
6622
6622
  x(ve);
6623
6623
  }
6624
6624
  u(0), v(!1);
6625
- }, je = (q, ve, Re, Te = !1) => {
6625
+ }, je = (q, ve, Oe, xe = !1) => {
6626
6626
  let Ee;
6627
- if (Te)
6627
+ if (xe)
6628
6628
  Ee = s.concat({
6629
6629
  id: q,
6630
6630
  operation: "pendingLink",
6631
- values: { ...Re, id: q },
6632
- treeValues: { ...Re, id: q }
6631
+ values: { ...Oe, id: q },
6632
+ treeValues: { ...Oe, id: q }
6633
6633
  });
6634
6634
  else if (q)
6635
6635
  Ee = s.map((ke) => ke.id === q ? {
6636
6636
  id: q,
6637
6637
  operation: q > 0 ? "pendingUpdate" : "pendingCreate",
6638
- values: { ...Re, id: q },
6639
- treeValues: { ...Re, id: q }
6638
+ values: { ...Oe, id: q },
6639
+ treeValues: { ...Oe, id: q }
6640
6640
  } : ke);
6641
6641
  else {
6642
6642
  const ke = Uo(s);
6643
6643
  Ee = s.concat({
6644
6644
  id: ke,
6645
6645
  operation: "pendingCreate",
6646
- values: { ...Re, id: ke },
6647
- treeValues: { ...Re, id: ke }
6646
+ values: { ...Oe, id: ke },
6647
+ treeValues: { ...Oe, id: ke }
6648
6648
  });
6649
6649
  }
6650
- ge(Ee), L || T(!1);
6650
+ ye(Ee), N || T(!1);
6651
6651
  }, Le = async (q) => {
6652
6652
  const { id: ve } = q;
6653
- let Re = s;
6654
- const Te = s.find((Ee) => Ee.id === ve);
6655
- (Te == null ? void 0 : Te.values) === void 0 && (Re = await Me("form")), D(Re.find((Ee) => Ee.id === ve)), N(!1), T(!0);
6653
+ let Oe = s;
6654
+ const xe = s.find((Ee) => Ee.id === ve);
6655
+ (xe == null ? void 0 : xe.values) === void 0 && (Oe = await Pe("form")), D(Oe.find((Ee) => Ee.id === ve)), L(!1), T(!0);
6656
6656
  }, re = async (q) => {
6657
6657
  v(!0);
6658
- const ve = s, Re = q.filter((Te) => !s.find((Ee) => Ee.id === Te));
6658
+ const ve = s, Oe = q.filter((xe) => !s.find((Ee) => Ee.id === xe));
6659
6659
  try {
6660
- for (const Te of Re) {
6660
+ for (const xe of Oe) {
6661
6661
  const Ee = (await M.getHandler().readObjects({
6662
6662
  model: H,
6663
- ids: [Te],
6663
+ ids: [xe],
6664
6664
  fields: r.get("form").fields,
6665
6665
  context: { ...m == null ? void 0 : m(), ...F }
6666
6666
  }))[0], ke = (await M.getHandler().readObjects({
6667
6667
  model: H,
6668
- ids: [Te],
6668
+ ids: [xe],
6669
6669
  fields: r.get("tree").fields,
6670
6670
  context: { ...m == null ? void 0 : m(), ...F }
6671
6671
  }))[0];
6672
6672
  ve.push({
6673
- id: Te,
6673
+ id: xe,
6674
6674
  operation: "pendingLink",
6675
6675
  values: Ee,
6676
6676
  treeValues: ke
6677
6677
  });
6678
6678
  }
6679
- ge(ve);
6680
- } catch (Te) {
6681
- x(Te);
6679
+ ye(ve);
6680
+ } catch (xe) {
6681
+ x(xe);
6682
6682
  } finally {
6683
6683
  v(!1);
6684
6684
  }
6685
6685
  };
6686
- function Oe() {
6686
+ function Ie() {
6687
6687
  const q = sd[a];
6688
6688
  if (a === "graph")
6689
6689
  return Co(r.get("graph").arch).string;
@@ -6693,16 +6693,16 @@ const cd = (e) => {
6693
6693
  }
6694
6694
  }
6695
6695
  const Ke = () => {
6696
- var ve, Re, Te, Ee;
6696
+ var ve, Oe, xe, Ee;
6697
6697
  if (a === "form")
6698
- return ie.length === 0 ? y("noCurrentEntries") : a !== z.current && s.some((ke) => !ke.values) ? /* @__PURE__ */ i($e, {}) : /* @__PURE__ */ i(
6698
+ return ie.length === 0 ? y("noCurrentEntries") : a !== X.current && s.some((ke) => !ke.values) ? /* @__PURE__ */ i($e, {}) : /* @__PURE__ */ i(
6699
6699
  zt,
6700
6700
  {
6701
6701
  formView: r.get("form"),
6702
6702
  values: (ve = ie[d]) == null ? void 0 : ve.values,
6703
6703
  parentContext: { ...m == null ? void 0 : m(), ...F },
6704
6704
  model: H,
6705
- id: (Re = ie[d]) == null ? void 0 : Re.id,
6705
+ id: (Oe = ie[d]) == null ? void 0 : Oe.id,
6706
6706
  submitMode: "values",
6707
6707
  onFieldsChange: (ke) => {
6708
6708
  var Ge;
@@ -6712,9 +6712,9 @@ const cd = (e) => {
6712
6712
  values: { ...ke, id: mt },
6713
6713
  treeValues: { ...ke, id: mt }
6714
6714
  } : gt);
6715
- ge(ht), I(!0);
6715
+ ye(ht), I(!0);
6716
6716
  },
6717
- readOnly: le
6717
+ readOnly: de
6718
6718
  }
6719
6719
  );
6720
6720
  let q = [];
@@ -6723,7 +6723,7 @@ const cd = (e) => {
6723
6723
  sorter: P,
6724
6724
  fields: {
6725
6725
  ...r.get("tree").fields,
6726
- ...((Te = r.get("form")) == null ? void 0 : Te.fields) || {}
6726
+ ...((xe = r.get("form")) == null ? void 0 : xe.fields) || {}
6727
6727
  }
6728
6728
  }) : ie.map((ke) => ke.treeValues)), a === "tree")
6729
6729
  return /* @__PURE__ */ i(
@@ -6739,10 +6739,10 @@ const cd = (e) => {
6739
6739
  selectedRowKeys: E,
6740
6740
  onRowSelectionChange: K,
6741
6741
  sorter: P,
6742
- onChangeSort: X,
6742
+ onChangeSort: J,
6743
6743
  context: { ...m == null ? void 0 : m(), ...F },
6744
6744
  colorsForResults: ee,
6745
- readonly: le,
6745
+ readonly: de,
6746
6746
  scrollY: o == null ? void 0 : o.height
6747
6747
  }
6748
6748
  );
@@ -6762,24 +6762,24 @@ const cd = (e) => {
6762
6762
  };
6763
6763
  if (O)
6764
6764
  return /* @__PURE__ */ i(Qe, { className: "mt-10", message: O, type: "error", banner: !0 });
6765
- const we = L;
6765
+ const we = N;
6766
6766
  return b ? /* @__PURE__ */ i($e, {}) : /* @__PURE__ */ k(se, { children: [
6767
6767
  /* @__PURE__ */ i(
6768
6768
  wi,
6769
6769
  {
6770
6770
  mode: a,
6771
- title: Oe(),
6772
- readOnly: le || !1,
6771
+ title: Ie(),
6772
+ readOnly: de || !1,
6773
6773
  isMany2Many: G,
6774
6774
  formHasChanges: S,
6775
6775
  totalItems: ie.length,
6776
6776
  currentItemIndex: d,
6777
6777
  onDelete: he,
6778
6778
  onCreateItem: Ne,
6779
- onToggleViewMode: ne,
6780
- onPreviousItem: xe,
6781
- onNextItem: ye,
6782
- onSearchItem: J,
6779
+ onToggleViewMode: _e,
6780
+ onPreviousItem: me,
6781
+ onNextItem: le,
6782
+ onSearchItem: z,
6783
6783
  selectedRowKeys: E,
6784
6784
  showCreateButton: ((rt = r.get("form")) == null ? void 0 : rt.fields) !== void 0,
6785
6785
  showToggleButton: r.size > 1
@@ -6799,9 +6799,9 @@ const cd = (e) => {
6799
6799
  onSubmitSucceed: je,
6800
6800
  parentContext: { ...m == null ? void 0 : m(), ...F },
6801
6801
  onCancel: () => {
6802
- N(!1), T(!1);
6802
+ L(!1), T(!1);
6803
6803
  },
6804
- readOnly: le,
6804
+ readOnly: de,
6805
6805
  mustClearAfterSave: we,
6806
6806
  onMustRefreshParent: () => {
6807
6807
  w == null || w({ forceRefresh: !0 });
@@ -6828,7 +6828,7 @@ const cd = (e) => {
6828
6828
  fieldName: e,
6829
6829
  widgetDomain: t
6830
6830
  }) => {
6831
- const n = Q([]), {
6831
+ const n = Z([]), {
6832
6832
  getFields: o,
6833
6833
  getValues: r,
6834
6834
  getContext: s,
@@ -6861,7 +6861,7 @@ const cd = (e) => {
6861
6861
  allRowsIds: o,
6862
6862
  gridRef: r
6863
6863
  }) => {
6864
- const [s, a] = C([]), c = Q(0), d = U(() => {
6864
+ const [s, a] = C([]), c = Z(0), d = U(() => {
6865
6865
  var m, g;
6866
6866
  let p = !1;
6867
6867
  s.length === 0 ? p = !0 : p = !1, p ? (a(o), (m = r.current) == null || m.setSelectedRows(o)) : (a([]), (g = r.current) == null || g.setSelectedRows([]));
@@ -6916,7 +6916,7 @@ const cd = (e) => {
6916
6916
  formView: r,
6917
6917
  triggerChange: s
6918
6918
  }) => {
6919
- const [a, c] = C(!1), { itemIndex: d } = te(Xt), { t: u } = pe();
6919
+ const [a, c] = C(!1), { itemIndex: d } = te(Xt), { t: u } = ge();
6920
6920
  fe(() => {
6921
6921
  const m = e[d];
6922
6922
  (!m || (m == null ? void 0 : m.operation) === "original") && c(!1);
@@ -6982,7 +6982,7 @@ const cd = (e) => {
6982
6982
  onChange: s
6983
6983
  }) => {
6984
6984
  var d, u;
6985
- const { itemIndex: a } = te(Xt), { t: c } = pe();
6985
+ const { itemIndex: a } = te(Xt), { t: c } = ge();
6986
6986
  return t.length === 0 ? c("noCurrentEntries") : /* @__PURE__ */ i(
6987
6987
  zt,
6988
6988
  {
@@ -7013,7 +7013,7 @@ const cd = (e) => {
7013
7013
  selectedRowKeys: r,
7014
7014
  setSelectedRowKeys: s
7015
7015
  }) => {
7016
- const { t: a } = pe(), { currentView: c, itemIndex: d, setItemIndex: u } = te(
7016
+ const { t: a } = ge(), { currentView: c, itemIndex: d, setItemIndex: u } = te(
7017
7017
  Xt
7018
7018
  ), f = U(async () => {
7019
7019
  const m = pd({
@@ -7296,7 +7296,7 @@ const gd = ({
7296
7296
  );
7297
7297
  return { getColumnState: a, updateColumnState: c };
7298
7298
  }, bi = (e) => {
7299
- const [t, n] = C(!0), o = Q(void 0), { getColumnState: r, updateColumnState: s } = bd(e);
7299
+ const [t, n] = C(!0), o = Z(void 0), { getColumnState: r, updateColumnState: s } = bd(e);
7300
7300
  return fe(() => {
7301
7301
  if (!e)
7302
7302
  return;
@@ -7329,7 +7329,7 @@ const gd = ({
7329
7329
  aggregates: m,
7330
7330
  selectedRowKeys: g = []
7331
7331
  }) => {
7332
- const w = Q(), y = d || w, S = Q({}), I = Q(), b = Q(), v = Q(e);
7332
+ const w = Z(), y = d || w, S = Z({}), I = Z(), b = Z(), v = Z(e);
7333
7333
  dt(() => {
7334
7334
  var D, E;
7335
7335
  if (v.current = e, b.current === void 0) {
@@ -7350,34 +7350,34 @@ const gd = ({
7350
7350
  endRow: E,
7351
7351
  sortFields: K
7352
7352
  }) => {
7353
- const L = v.current, B = L.map((F) => F.id).slice(D, E), P = B.filter((F) => {
7354
- const W = L.find((G) => G.id === F);
7353
+ const N = v.current, B = N.map((F) => F.id).slice(D, E), P = B.filter((F) => {
7354
+ const W = N.find((G) => G.id === F);
7355
7355
  return W && (W.operation === "original" || W.operation === "pendingLink");
7356
- }), X = L.filter((F) => F && F.operation !== "original" && F.operation !== "pendingLink");
7357
- if (P.length === 0 && X.length === 0)
7356
+ }), J = N.filter((F) => F && F.operation !== "original" && F.operation !== "pendingLink");
7357
+ if (P.length === 0 && J.length === 0)
7358
7358
  return [];
7359
7359
  const { results: Y, colors: ee, status: ce } = await a({
7360
7360
  idsToFetch: P,
7361
7361
  sortFields: K
7362
- }), le = _n(r, Y), H = B.map((F) => {
7362
+ }), de = _n(r, Y), H = B.map((F) => {
7363
7363
  var G;
7364
- const W = le.find((me) => me.id === F);
7365
- return W || ((G = L.find((me) => me.id === F)) == null ? void 0 : G.treeValues);
7364
+ const W = de.find((pe) => pe.id === F);
7365
+ return W || ((G = N.find((pe) => pe.id === F)) == null ? void 0 : G.treeValues);
7366
7366
  });
7367
7367
  return H.sort((F, W) => {
7368
- const G = le.findIndex(
7368
+ const G = de.findIndex(
7369
7369
  (ie) => ie.id === F.id
7370
- ), me = le.findIndex(
7370
+ ), pe = de.findIndex(
7371
7371
  (ie) => ie.id === W.id
7372
7372
  );
7373
- return G - me;
7373
+ return G - pe;
7374
7374
  }), S.current = { ...S.current, ...ee }, !I.current && ce && (I.current = {}), ce && (I.current = { ...I.current, ...ce }), H;
7375
7375
  },
7376
7376
  [a, r]
7377
7377
  ), T = U((D) => {
7378
- var E, K, L, N;
7378
+ var E, K, N, L;
7379
7379
  if (S.current[(K = (E = D.node) == null ? void 0 : E.data) == null ? void 0 : K.id])
7380
- return { color: S.current[(N = (L = D.node) == null ? void 0 : L.data) == null ? void 0 : N.id] };
7380
+ return { color: S.current[(L = (N = D.node) == null ? void 0 : N.data) == null ? void 0 : L.id] };
7381
7381
  }, []), { loading: A, getColumnState: V, updateColumnState: _ } = bi(
7382
7382
  Cd({
7383
7383
  ...p,
@@ -7476,8 +7476,8 @@ const gd = ({
7476
7476
  domain: s
7477
7477
  });
7478
7478
  }, Fd = ["form", "tree", "graph"], Id = (e) => {
7479
- var Z;
7480
- const t = Q(null), { value: n, onChange: o, ooui: r, views: s } = e, { items: a = [] } = n || {}, c = fd({ one2manyItems: a }), { currentView: d, setCurrentView: u, itemIndex: f, setItemIndex: l } = te(
7479
+ var Q;
7480
+ const t = Z(null), { value: n, onChange: o, ooui: r, views: s } = e, { items: a = [] } = n || {}, c = fd({ one2manyItems: a }), { currentView: d, setCurrentView: u, itemIndex: f, setItemIndex: l } = te(
7481
7481
  Xt
7482
7482
  ), {
7483
7483
  readOnly: h,
@@ -7489,7 +7489,7 @@ const gd = ({
7489
7489
  activeId: S,
7490
7490
  getContext: I,
7491
7491
  fetchValues: b
7492
- } = y || {}, v = s.size > 1, O = ((Z = s.get("form")) == null ? void 0 : Z.fields) !== void 0, x = Ce(() => ({ ...I == null ? void 0 : I(), ...m }), [I, m]), R = ld({
7492
+ } = y || {}, v = s.size > 1, O = ((Q = s.get("form")) == null ? void 0 : Q.fields) !== void 0, x = Ce(() => ({ ...I == null ? void 0 : I(), ...m }), [I, m]), R = ld({
7493
7493
  widgetDomain: g,
7494
7494
  fieldName: w
7495
7495
  }), {
@@ -7504,27 +7504,27 @@ const gd = ({
7504
7504
  treeView: s.get("tree"),
7505
7505
  relation: p,
7506
7506
  context: x,
7507
- allRowsIds: c.filter((de) => de.id !== void 0).map((de) => de.id),
7507
+ allRowsIds: c.filter((ne) => ne.id !== void 0).map((ne) => ne.id),
7508
7508
  gridRef: t
7509
- }), L = Td({
7509
+ }), N = Td({
7510
7510
  ooui: T,
7511
7511
  model: p,
7512
7512
  items: c,
7513
7513
  selectedRowKeys: V
7514
- }), N = Ce(() => {
7515
- const { title: de } = s.get(d) || {};
7516
- return de || r.label;
7514
+ }), L = Ce(() => {
7515
+ const { title: ne } = s.get(d) || {};
7516
+ return ne || r.label;
7517
7517
  }, [d, r.label, s]), B = r.type === "many2many", P = U(
7518
- (de) => {
7518
+ (ne) => {
7519
7519
  var he, Ne;
7520
7520
  o == null || o({
7521
7521
  fields: ((he = s.get("form")) == null ? void 0 : he.fields) || ((Ne = s.get("tree")) == null ? void 0 : Ne.fields),
7522
- items: de
7522
+ items: ne
7523
7523
  });
7524
7524
  },
7525
7525
  [o, s]
7526
7526
  ), {
7527
- formHasChanges: X,
7527
+ formHasChanges: J,
7528
7528
  onFormChanges: Y,
7529
7529
  showFormChangesDialogIfNeeded: ee,
7530
7530
  setFormHasChanges: ce
@@ -7536,12 +7536,12 @@ const gd = ({
7536
7536
  context: x,
7537
7537
  triggerChange: P
7538
7538
  }), {
7539
- showFormModal: le,
7539
+ showFormModal: de,
7540
7540
  modalItem: H,
7541
7541
  continuousEntryMode: F,
7542
7542
  onCancelFormModal: W,
7543
7543
  onFormModalSubmitSucceed: G,
7544
- createItem: me,
7544
+ createItem: pe,
7545
7545
  openItemInFormModal: ie
7546
7546
  } = gd({
7547
7547
  activeId: S,
@@ -7556,10 +7556,10 @@ const gd = ({
7556
7556
  relation: p,
7557
7557
  formView: s.get("form")
7558
7558
  }), {
7559
- showSearchModal: z,
7559
+ showSearchModal: X,
7560
7560
  onSelectSearchValues: ue,
7561
- onCloseSearchModal: ge,
7562
- searchItem: De
7561
+ onCloseSearchModal: ye,
7562
+ searchItem: Re
7563
7563
  } = yd({
7564
7564
  showFormChangesDialogIfNeeded: ee,
7565
7565
  currentView: d,
@@ -7568,7 +7568,7 @@ const gd = ({
7568
7568
  views: s,
7569
7569
  context: x,
7570
7570
  relation: p
7571
- }), { showRemoveConfirm: Me } = hd({
7571
+ }), { showRemoveConfirm: Pe } = hd({
7572
7572
  isMany2many: B,
7573
7573
  items: c,
7574
7574
  triggerChange: P,
@@ -7576,24 +7576,24 @@ const gd = ({
7576
7576
  selectedRowKeys: V,
7577
7577
  setSelectedRowKeys: _
7578
7578
  }), Ve = () => {
7579
- const de = Array.from(s.keys()), he = de[(de.indexOf(d) + 1) % de.length];
7579
+ const ne = Array.from(s.keys()), he = ne[(ne.indexOf(d) + 1) % ne.length];
7580
7580
  d === "form" ? ee(() => {
7581
7581
  u(he);
7582
7582
  }) : u(he);
7583
- }, ne = at(
7584
- (de) => {
7583
+ }, _e = at(
7584
+ (ne) => {
7585
7585
  var he;
7586
- (he = s.get("form")) != null && he.fields && ie(de);
7586
+ (he = s.get("form")) != null && he.fields && ie(ne);
7587
7587
  },
7588
7588
  // eslint-disable-next-line react-hooks/exhaustive-deps
7589
7589
  [c]
7590
- ), xe = U(() => {
7590
+ ), me = U(() => {
7591
7591
  f > 0 && (d === "form" ? ee(() => {
7592
7592
  l(f - 1);
7593
7593
  }) : l(f - 1));
7594
- }, [d, f, l, ee]), ye = U(() => {
7595
- const de = c.length;
7596
- f < de - 1 && (d === "form" ? ee(() => {
7594
+ }, [d, f, l, ee]), le = U(() => {
7595
+ const ne = c.length;
7596
+ f < ne - 1 && (d === "form" ? ee(() => {
7597
7597
  l(f + 1);
7598
7598
  }) : l(f + 1));
7599
7599
  }, [
@@ -7608,18 +7608,18 @@ const gd = ({
7608
7608
  wi,
7609
7609
  {
7610
7610
  mode: d,
7611
- title: N,
7611
+ title: L,
7612
7612
  readOnly: h || !1,
7613
7613
  isMany2Many: B,
7614
- formHasChanges: X,
7614
+ formHasChanges: J,
7615
7615
  totalItems: c.length,
7616
7616
  currentItemIndex: f,
7617
- onDelete: Me,
7618
- onCreateItem: me,
7617
+ onDelete: Pe,
7618
+ onCreateItem: pe,
7619
7619
  onToggleViewMode: Ve,
7620
- onPreviousItem: xe,
7621
- onNextItem: ye,
7622
- onSearchItem: De,
7620
+ onPreviousItem: me,
7621
+ onNextItem: le,
7622
+ onSearchItem: Re,
7623
7623
  selectedRowKeys: V,
7624
7624
  showCreateButton: O,
7625
7625
  showToggleButton: v
@@ -7634,7 +7634,7 @@ const gd = ({
7634
7634
  onFetchRecords: A,
7635
7635
  ooui: T,
7636
7636
  context: x,
7637
- onRowDoubleClick: ne,
7637
+ onRowDoubleClick: _e,
7638
7638
  onRowSelectionChange: _,
7639
7639
  relation: p,
7640
7640
  onChangeFirstVisibleRowIndex: D,
@@ -7646,7 +7646,7 @@ const gd = ({
7646
7646
  treeViewId: e.treeViewId,
7647
7647
  one2ManyFieldName: w
7648
7648
  },
7649
- aggregates: L
7649
+ aggregates: N
7650
7650
  }
7651
7651
  ),
7652
7652
  d === "form" && /* @__PURE__ */ i(
@@ -7669,7 +7669,7 @@ const gd = ({
7669
7669
  submitMode: "2many",
7670
7670
  values: H == null ? void 0 : H.values,
7671
7671
  defaultValues: H == null ? void 0 : H.defaultValues,
7672
- visible: le,
7672
+ visible: de,
7673
7673
  onSubmitSucceed: G,
7674
7674
  parentContext: x,
7675
7675
  onCancel: W,
@@ -7686,9 +7686,9 @@ const gd = ({
7686
7686
  domain: R,
7687
7687
  model: p,
7688
7688
  context: x,
7689
- visible: z,
7689
+ visible: X,
7690
7690
  onSelectValues: ue,
7691
- onCloseModal: ge
7691
+ onCloseModal: ye
7692
7692
  }
7693
7693
  ),
7694
7694
  d === "graph" && /* @__PURE__ */ i(
@@ -7738,7 +7738,7 @@ const gd = ({
7738
7738
  }
7739
7739
  };
7740
7740
  return n && n.length > 0 ? c = n[0] : c = "tree", d ? /* @__PURE__ */ i($e, {}) : f ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(rd, { initialView: c, children: /* @__PURE__ */ i(
7741
- Ie,
7741
+ Fe,
7742
7742
  {
7743
7743
  required: s,
7744
7744
  type: "array",
@@ -7766,9 +7766,9 @@ const gd = ({
7766
7766
  ) });
7767
7767
  }, { useToken: Rd } = We, Vd = (e) => {
7768
7768
  const { ooui: t } = e, { required: n } = t;
7769
- return /* @__PURE__ */ i(Ie, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(Ad, { ooui: t }) });
7769
+ return /* @__PURE__ */ i(Fe, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(Ad, { ooui: t }) });
7770
7770
  }, Ad = (e) => {
7771
- const { ooui: t, value: n, onChange: o } = e, { id: r, readOnly: s, required: a } = t, { token: c } = Rd(), d = a && !s ? { backgroundColor: c.colorPrimaryBg } : void 0, u = Q(), [f, l] = C(), h = te(He), { elementHasLostFocus: p } = h || {};
7771
+ const { ooui: t, value: n, onChange: o } = e, { id: r, readOnly: s, required: a } = t, { token: c } = Rd(), d = a && !s ? { backgroundColor: c.colorPrimaryBg } : void 0, u = Z(), [f, l] = C(), h = te(He), { elementHasLostFocus: p } = h || {};
7772
7772
  fe(() => {
7773
7773
  l(ai(n));
7774
7774
  }, [n]);
@@ -7842,7 +7842,7 @@ function Dd(e) {
7842
7842
  }
7843
7843
  const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
7844
7844
  const { ooui: t } = e, { id: n, readOnly: o, required: r, height: s, translatable: a } = t, { token: c } = Ed(), d = r && !o ? { backgroundColor: c.colorPrimaryBg } : void 0, u = te(He), { elementHasLostFocus: f } = u || {};
7845
- return /* @__PURE__ */ i(Ie, { required: r, ...e, children: a ? /* @__PURE__ */ i(
7845
+ return /* @__PURE__ */ i(Fe, { required: r, ...e, children: a ? /* @__PURE__ */ i(
7846
7846
  Md,
7847
7847
  {
7848
7848
  field: n,
@@ -7876,7 +7876,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
7876
7876
  fetchValues: d,
7877
7877
  formHasChanges: u,
7878
7878
  elementHasLostFocus: f
7879
- } = s || {}, [l, h] = C(!1), { t: p } = pe();
7879
+ } = s || {}, [l, h] = C(!1), { t: p } = ge();
7880
7880
  return a ? /* @__PURE__ */ k(se, { children: [
7881
7881
  /* @__PURE__ */ i(
7882
7882
  "div",
@@ -7925,7 +7925,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
7925
7925
  }
7926
7926
  )
7927
7927
  ] }) : /* @__PURE__ */ k(se, { children: [
7928
- /* @__PURE__ */ i(_e, { gutter: 8, wrap: !1, children: /* @__PURE__ */ i(
7928
+ /* @__PURE__ */ i(De, { gutter: 8, wrap: !1, children: /* @__PURE__ */ i(
7929
7929
  Qn,
7930
7930
  {
7931
7931
  value: e,
@@ -7941,7 +7941,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
7941
7941
  onBlur: f
7942
7942
  }
7943
7943
  ) }),
7944
- /* @__PURE__ */ i(_e, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ i(
7944
+ /* @__PURE__ */ i(De, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ i(
7945
7945
  Xe,
7946
7946
  {
7947
7947
  tooltip: p("translate"),
@@ -7967,7 +7967,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
7967
7967
  limit: r,
7968
7968
  onClose: s
7969
7969
  }) => {
7970
- const a = Q({}), c = Q(/* @__PURE__ */ new Map()), { t: d } = pe(), u = U(
7970
+ const a = Z({}), c = Z(/* @__PURE__ */ new Map()), { t: d } = ge(), u = U(
7971
7971
  async (w) => {
7972
7972
  if (w.selectedKeys === void 0 || w.selectedKeys.length === 0) {
7973
7973
  wt(d("selectAtLeastOneField"));
@@ -8241,7 +8241,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
8241
8241
  return /* @__PURE__ */ i(li, { ooui: t, showTime: !0 });
8242
8242
  }, Yd = (e) => {
8243
8243
  const { ooui: t } = e;
8244
- return /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(zd, { ooui: t }) });
8244
+ return /* @__PURE__ */ i(Fe, { ...e, children: /* @__PURE__ */ i(zd, { ooui: t }) });
8245
8245
  }, zd = (e) => /* @__PURE__ */ i(
8246
8246
  Jn,
8247
8247
  {
@@ -8253,7 +8253,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
8253
8253
  }
8254
8254
  ), Jd = (e) => {
8255
8255
  const { ooui: t } = e, { required: n } = t;
8256
- return /* @__PURE__ */ i(Ie, { required: n, ...e, children: /* @__PURE__ */ i(Xd, { ooui: t }) });
8256
+ return /* @__PURE__ */ i(Fe, { required: n, ...e, children: /* @__PURE__ */ i(Xd, { ooui: t }) });
8257
8257
  }, Xd = (e) => {
8258
8258
  const { value: t, onChange: n, ooui: o } = e, { required: r, selectionValues: s, readOnly: a, domain: c } = o, d = t == null ? void 0 : t.split(","), [u, f] = C([]), [l, h] = C();
8259
8259
  return fe(() => {
@@ -8263,7 +8263,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
8263
8263
  }
8264
8264
  const p = t && d && d[0], m = t && d && d[1] && parseInt(d[1]);
8265
8265
  f([m, void 0]), h(p);
8266
- }, [t]), /* @__PURE__ */ k(_e, { gutter: 8, wrap: !1, children: [
8266
+ }, [t]), /* @__PURE__ */ k(De, { gutter: 8, wrap: !1, children: [
8267
8267
  /* @__PURE__ */ i(be, { flex: "1", children: /* @__PURE__ */ i(
8268
8268
  jo,
8269
8269
  {
@@ -8304,9 +8304,9 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
8304
8304
  ] });
8305
8305
  }, { useToken: Qd } = We, Zd = (e) => {
8306
8306
  const { ooui: t } = e, { required: n } = t;
8307
- return /* @__PURE__ */ i(Ie, { required: n, ...e, children: /* @__PURE__ */ i(eu, { ooui: t }) });
8307
+ return /* @__PURE__ */ i(Fe, { required: n, ...e, children: /* @__PURE__ */ i(eu, { ooui: t }) });
8308
8308
  }, eu = (e) => {
8309
- const { ooui: t, value: n, onChange: o } = e, { readOnly: r, required: s, filenameField: a } = t, { token: c } = Qd(), d = s && !r ? { backgroundColor: c.colorPrimaryBg } : void 0, u = Q(null), { setFieldValue: f, getFieldValue: l } = te(He) || {}, { t: h } = pe(), p = n ? Da(n) : "", m = (I) => {
8309
+ const { ooui: t, value: n, onChange: o } = e, { readOnly: r, required: s, filenameField: a } = t, { token: c } = Qd(), d = s && !r ? { backgroundColor: c.colorPrimaryBg } : void 0, u = Z(null), { setFieldValue: f, getFieldValue: l } = te(He) || {}, { t: h } = ge(), p = n ? Da(n) : "", m = (I) => {
8310
8310
  o == null || o(I);
8311
8311
  };
8312
8312
  async function g() {
@@ -8325,7 +8325,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
8325
8325
  function S() {
8326
8326
  f(a, void 0), m(void 0);
8327
8327
  }
8328
- return /* @__PURE__ */ k(_e, { gutter: 8, children: [
8328
+ return /* @__PURE__ */ k(De, { gutter: 8, children: [
8329
8329
  /* @__PURE__ */ k(be, { style: { paddingBottom: 5 }, children: [
8330
8330
  /* @__PURE__ */ i(
8331
8331
  "input",
@@ -8349,7 +8349,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
8349
8349
  ] }),
8350
8350
  /* @__PURE__ */ i(be, { children: /* @__PURE__ */ k(ze, { children: [
8351
8351
  /* @__PURE__ */ i(
8352
- Pe,
8352
+ Me,
8353
8353
  {
8354
8354
  icon: /* @__PURE__ */ i(dr, {}),
8355
8355
  disabled: r,
@@ -8359,7 +8359,7 @@ const { useToken: Ed } = We, { TextArea: Qn } = ot, kd = (e) => {
8359
8359
  children: "Select"
8360
8360
  }
8361
8361
  ),
8362
- /* @__PURE__ */ i(Pe, { icon: /* @__PURE__ */ i(hs, {}), disabled: !n, onClick: w, children: h("open") }),
8362
+ /* @__PURE__ */ i(Me, { icon: /* @__PURE__ */ i(hs, {}), disabled: !n, onClick: w, children: h("open") }),
8363
8363
  /* @__PURE__ */ i(
8364
8364
  Xe,
8365
8365
  {
@@ -8397,7 +8397,7 @@ function Vr(e) {
8397
8397
  disabled: r = !1,
8398
8398
  formHasChanges: s = !1,
8399
8399
  previousView: a
8400
- } = e, { t: c } = pe(), d = Ce(() => [
8400
+ } = e, { t: c } = ge(), d = Ce(() => [
8401
8401
  {
8402
8402
  label: c("viewAs"),
8403
8403
  items: n.map((l, h) => {
@@ -8456,7 +8456,7 @@ function Vr(e) {
8456
8456
  placement: "bottomRight",
8457
8457
  disabled: r || n.length === 1,
8458
8458
  children: /* @__PURE__ */ i(
8459
- Pe,
8459
+ Me,
8460
8460
  {
8461
8461
  style: {
8462
8462
  width: 25,
@@ -8498,7 +8498,7 @@ function Je(e) {
8498
8498
  function Ti(e) {
8499
8499
  const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: o } = te(
8500
8500
  nt
8501
- ), { t: r } = pe(), s = () => {
8501
+ ), { t: r } = ge(), s = () => {
8502
8502
  if (n) {
8503
8503
  qt({
8504
8504
  t: r,
@@ -8568,7 +8568,7 @@ const ru = (e) => {
8568
8568
  onOpenAttachmentLink: s,
8569
8569
  onOpenAttachmentDetail: a,
8570
8570
  onListAllAttachments: c
8571
- } = e, { t: d } = pe(), u = Q(null), f = /* @__PURE__ */ k(Pe, { children: [
8571
+ } = e, { t: d } = ge(), u = Z(null), f = /* @__PURE__ */ k(Me, { children: [
8572
8572
  /* @__PURE__ */ i($r, {}),
8573
8573
  `(${t})`,
8574
8574
  /* @__PURE__ */ i(Sn, { style: { fontSize: 12 } })
@@ -8580,7 +8580,7 @@ const ru = (e) => {
8580
8580
  onRetrieveData: async () => [
8581
8581
  {
8582
8582
  items: n.map((l) => {
8583
- const h = l.link ? $r : ur, p = /* @__PURE__ */ k(_e, { wrap: !1, align: "middle", gutter: 8, children: [
8583
+ const h = l.link ? $r : ur, p = /* @__PURE__ */ k(De, { wrap: !1, align: "middle", gutter: 8, children: [
8584
8584
  /* @__PURE__ */ i(be, { style: { textAlign: "center" }, children: (l.datas_fname || l.link) && /* @__PURE__ */ i(
8585
8585
  Ct,
8586
8586
  {
@@ -8664,7 +8664,7 @@ function ou(e) {
8664
8664
  onAddNewAttachment: o,
8665
8665
  onListAllAttachments: r,
8666
8666
  onViewAttachmentDetails: s
8667
- } = e, { formRef: a } = te(nt), [c, d] = C(!1), [u, f] = C([]), [l, h] = C(!1), { t: p } = pe(), m = U(async () => {
8667
+ } = e, { formRef: a } = te(nt), [c, d] = C(!1), [u, f] = C([]), [l, h] = C(!1), { t: p } = ge(), m = U(async () => {
8668
8668
  if (!(!t || t.length === 0)) {
8669
8669
  d(!0);
8670
8670
  try {
@@ -8779,17 +8779,17 @@ function iu({ toolbar: e }) {
8779
8779
  Ot(
8780
8780
  "pagedown",
8781
8781
  () => {
8782
- T && N(B);
8782
+ T && L(B);
8783
8783
  },
8784
8784
  { enableOnFormTags: !0, preventDefault: !0 },
8785
- [N, B, T]
8785
+ [L, B, T]
8786
8786
  ), Ot(
8787
8787
  "pageup",
8788
8788
  () => {
8789
- T && N(P);
8789
+ T && L(P);
8790
8790
  },
8791
8791
  { enableOnFormTags: !0, preventDefault: !0 },
8792
- [N, B, T]
8792
+ [L, B, T]
8793
8793
  ), Ot(
8794
8794
  "ctrl+s,command+s",
8795
8795
  () => {
@@ -8805,12 +8805,12 @@ function iu({ toolbar: e }) {
8805
8805
  { enableOnFormTags: !0, preventDefault: !0 },
8806
8806
  [O, n, T]
8807
8807
  );
8808
- const { t: A } = pe(), V = te(
8808
+ const { t: A } = ge(), V = te(
8809
8809
  Yt
8810
8810
  ), { processAction: _ } = V || {}, D = te(
8811
8811
  ft
8812
8812
  ), { openRelate: E, openDefaultActionForModel: K } = D || {};
8813
- function L(F) {
8813
+ function N(F) {
8814
8814
  if (s) {
8815
8815
  nu({
8816
8816
  t: A,
@@ -8822,7 +8822,7 @@ function iu({ toolbar: e }) {
8822
8822
  }
8823
8823
  F();
8824
8824
  }
8825
- function N(F) {
8825
+ function L(F) {
8826
8826
  if (s) {
8827
8827
  qt({
8828
8828
  t: A,
@@ -8840,7 +8840,7 @@ function iu({ toolbar: e }) {
8840
8840
  function P() {
8841
8841
  d && f > 0 ? (u == null || u(f - 1), l == null || l(d[f - 1].id)) : d && f === 0 && (u == null || u(d.length - 1), l == null || l(d[d.length - 1].id));
8842
8842
  }
8843
- function X() {
8843
+ function J() {
8844
8844
  St({
8845
8845
  confirmMessage: A("confirmDuplicate"),
8846
8846
  t: A,
@@ -8890,7 +8890,7 @@ function iu({ toolbar: e }) {
8890
8890
  w == null || w(!1);
8891
8891
  }
8892
8892
  }
8893
- const le = a || m || S || g;
8893
+ const de = a || m || S || g;
8894
8894
  function H(F) {
8895
8895
  _ == null || _({
8896
8896
  actionData: F,
@@ -8919,7 +8919,7 @@ function iu({ toolbar: e }) {
8919
8919
  {
8920
8920
  icon: /* @__PURE__ */ i(ys, {}),
8921
8921
  tooltip: A("save"),
8922
- disabled: !s || le,
8922
+ disabled: !s || de,
8923
8923
  loading: a,
8924
8924
  onClick: r
8925
8925
  }
@@ -8931,7 +8931,7 @@ function iu({ toolbar: e }) {
8931
8931
  tooltip: A("duplicate"),
8932
8932
  disabled: s || a || c === void 0 || g || S,
8933
8933
  loading: g,
8934
- onClick: X
8934
+ onClick: J
8935
8935
  }
8936
8936
  ),
8937
8937
  /* @__PURE__ */ i(
@@ -8965,7 +8965,7 @@ function iu({ toolbar: e }) {
8965
8965
  disabled: a || c === void 0 || m || g || S,
8966
8966
  loading: !1,
8967
8967
  onClick: () => {
8968
- L(() => {
8968
+ N(() => {
8969
8969
  b.current.fetchValues();
8970
8970
  });
8971
8971
  }
@@ -8981,7 +8981,7 @@ function iu({ toolbar: e }) {
8981
8981
  onChangeView: (F) => {
8982
8982
  x == null || x(n), v == null || v(!1), o == null || o(F);
8983
8983
  },
8984
- disabled: le,
8984
+ disabled: de,
8985
8985
  formHasChanges: s
8986
8986
  }
8987
8987
  ),
@@ -8992,10 +8992,10 @@ function iu({ toolbar: e }) {
8992
8992
  {
8993
8993
  icon: /* @__PURE__ */ i(Ro, {}),
8994
8994
  tooltip: A("previous"),
8995
- disabled: le,
8995
+ disabled: de,
8996
8996
  loading: !1,
8997
8997
  onClick: () => {
8998
- N(P);
8998
+ L(P);
8999
8999
  }
9000
9000
  }
9001
9001
  ),
@@ -9004,10 +9004,10 @@ function iu({ toolbar: e }) {
9004
9004
  {
9005
9005
  icon: /* @__PURE__ */ i(Vo, {}),
9006
9006
  tooltip: A("next"),
9007
- disabled: le,
9007
+ disabled: de,
9008
9008
  loading: !1,
9009
9009
  onClick: () => {
9010
- N(B);
9010
+ L(B);
9011
9011
  }
9012
9012
  }
9013
9013
  )
@@ -9018,7 +9018,7 @@ function iu({ toolbar: e }) {
9018
9018
  {
9019
9019
  icon: /* @__PURE__ */ i(fr, {}),
9020
9020
  placement: "bottomRight",
9021
- disabled: le,
9021
+ disabled: de,
9022
9022
  onRetrieveData: async () => [
9023
9023
  { label: A("actions"), items: e == null ? void 0 : e.action }
9024
9024
  ],
@@ -9033,7 +9033,7 @@ function iu({ toolbar: e }) {
9033
9033
  Nt,
9034
9034
  {
9035
9035
  icon: /* @__PURE__ */ i(mr, {}),
9036
- disabled: le,
9036
+ disabled: de,
9037
9037
  placement: "bottomRight",
9038
9038
  onRetrieveData: async () => [
9039
9039
  { label: A("reports"), items: e == null ? void 0 : e.print }
@@ -9058,7 +9058,7 @@ function iu({ toolbar: e }) {
9058
9058
  Nt,
9059
9059
  {
9060
9060
  icon: /* @__PURE__ */ i(hr, {}),
9061
- disabled: le,
9061
+ disabled: de,
9062
9062
  placement: "bottomRight",
9063
9063
  onRetrieveData: async () => [
9064
9064
  { label: A("related"), items: e == null ? void 0 : e.relate }
@@ -9079,7 +9079,7 @@ function iu({ toolbar: e }) {
9079
9079
  /* @__PURE__ */ i(
9080
9080
  ou,
9081
9081
  {
9082
- disabled: le,
9082
+ disabled: de,
9083
9083
  attachments: I,
9084
9084
  onAddNewAttachment: async () => {
9085
9085
  const F = await kt({
@@ -9151,9 +9151,9 @@ const { useToken: su } = We, Ii = (e) => {
9151
9151
  const y = (S) => {
9152
9152
  o == null || o(S.target.value);
9153
9153
  };
9154
- return /* @__PURE__ */ k(_e, { gutter: 8, wrap: !1, align: "middle", children: [
9154
+ return /* @__PURE__ */ k(De, { gutter: 8, wrap: !1, align: "middle", children: [
9155
9155
  c ? null : /* @__PURE__ */ i(be, { flex: "none", children: p ? /* @__PURE__ */ i(
9156
- Pe,
9156
+ Me,
9157
9157
  {
9158
9158
  icon: /* @__PURE__ */ i(xn, {}),
9159
9159
  onClick: () => {
@@ -9163,7 +9163,7 @@ const { useToken: su } = We, Ii = (e) => {
9163
9163
  tabIndex: -1
9164
9164
  }
9165
9165
  ) : /* @__PURE__ */ i(
9166
- Pe,
9166
+ Me,
9167
9167
  {
9168
9168
  icon: /* @__PURE__ */ i(_o, {}),
9169
9169
  onClick: () => {
@@ -9201,7 +9201,7 @@ const { useToken: su } = We, Ii = (e) => {
9201
9201
  ] });
9202
9202
  }, au = (e) => {
9203
9203
  const { ooui: t } = e, { required: n } = t;
9204
- return /* @__PURE__ */ i(Ie, { required: n, ...e, children: /* @__PURE__ */ i(
9204
+ return /* @__PURE__ */ i(Fe, { required: n, ...e, children: /* @__PURE__ */ i(
9205
9205
  Ii,
9206
9206
  {
9207
9207
  ooui: t,
@@ -9210,7 +9210,7 @@ const { useToken: su } = We, Ii = (e) => {
9210
9210
  ) });
9211
9211
  }, cu = (e) => {
9212
9212
  const { ooui: t } = e, { required: n } = t;
9213
- return /* @__PURE__ */ i(Ie, { required: n, ...e, children: /* @__PURE__ */ i(
9213
+ return /* @__PURE__ */ i(Fe, { required: n, ...e, children: /* @__PURE__ */ i(
9214
9214
  Ii,
9215
9215
  {
9216
9216
  ooui: t,
@@ -9219,7 +9219,7 @@ const { useToken: su } = We, Ii = (e) => {
9219
9219
  }
9220
9220
  ) });
9221
9221
  }, lu = (e) => {
9222
- const { visible: t, onIdSubmitted: n, onCancel: o, isSearching: r } = e, { t: s } = pe(), a = Q(null), c = Q(!1);
9222
+ const { visible: t, onIdSubmitted: n, onCancel: o, isSearching: r } = e, { t: s } = ge(), a = Z(null), c = Z(!1);
9223
9223
  function d(u) {
9224
9224
  const f = u.id.split(",").map((l) => parseInt(l.trim()));
9225
9225
  n(f, c.current), c.current = !1;
@@ -9254,9 +9254,9 @@ const { useToken: su } = We, Ii = (e) => {
9254
9254
  children: /* @__PURE__ */ i(ot, { style: { width: "100%" }, autoFocus: !0, ref: a })
9255
9255
  }
9256
9256
  ),
9257
- /* @__PURE__ */ i(_e, { align: "middle", justify: "end", children: /* @__PURE__ */ i(be, { children: /* @__PURE__ */ k(ze, { children: [
9257
+ /* @__PURE__ */ i(De, { align: "middle", justify: "end", children: /* @__PURE__ */ i(be, { children: /* @__PURE__ */ k(ze, { children: [
9258
9258
  /* @__PURE__ */ i(
9259
- Pe,
9259
+ Me,
9260
9260
  {
9261
9261
  icon: /* @__PURE__ */ i(Wt, {}),
9262
9262
  htmlType: "button",
@@ -9266,7 +9266,7 @@ const { useToken: su } = We, Ii = (e) => {
9266
9266
  }
9267
9267
  ),
9268
9268
  /* @__PURE__ */ i(
9269
- Pe,
9269
+ Me,
9270
9270
  {
9271
9271
  tabIndex: 1,
9272
9272
  loading: r,
@@ -9281,7 +9281,7 @@ const { useToken: su } = We, Ii = (e) => {
9281
9281
  }
9282
9282
  ),
9283
9283
  /* @__PURE__ */ i(
9284
- Pe,
9284
+ Me,
9285
9285
  {
9286
9286
  tabIndex: 0,
9287
9287
  loading: r,
@@ -9330,7 +9330,7 @@ function Oi(e) {
9330
9330
  ] });
9331
9331
  }
9332
9332
  function uu({ refreshGraph: e }) {
9333
- const { t } = pe(), {
9333
+ const { t } = ge(), {
9334
9334
  availableViews: n,
9335
9335
  currentView: o,
9336
9336
  setCurrentView: r,
@@ -9396,7 +9396,7 @@ function En(e) {
9396
9396
  results: d,
9397
9397
  totalItems: u,
9398
9398
  selectedRowItems: f
9399
- } = te(nt), { t: l } = pe(), { token: h } = fu();
9399
+ } = te(nt), { t: l } = ge(), { token: h } = fu();
9400
9400
  function p() {
9401
9401
  if ((s == null ? void 0 : s.type) === "form")
9402
9402
  return a ? u === 0 ? /* @__PURE__ */ k(se, { children: [
@@ -9466,7 +9466,7 @@ function En(e) {
9466
9466
  },
9467
9467
  children: [
9468
9468
  /* @__PURE__ */ k(
9469
- _e,
9469
+ De,
9470
9470
  {
9471
9471
  className: "shadow-md",
9472
9472
  style: {
@@ -9481,7 +9481,7 @@ function En(e) {
9481
9481
  /* @__PURE__ */ i(mu, { level: 3, style: { marginBottom: 0 }, children: t || r }),
9482
9482
  o && p()
9483
9483
  ] }),
9484
- /* @__PURE__ */ i(be, { flex: 3, children: /* @__PURE__ */ i(_e, { justify: "end", children: n }) })
9484
+ /* @__PURE__ */ i(be, { flex: 3, children: /* @__PURE__ */ i(De, { justify: "end", children: n }) })
9485
9485
  ]
9486
9486
  }
9487
9487
  ),
@@ -9491,7 +9491,7 @@ function En(e) {
9491
9491
  );
9492
9492
  }
9493
9493
  const hu = (e) => {
9494
- const { viewData: t, visible: n, model: o, context: r, domain: s, formView: a, treeView: c } = e, d = Q(), u = te(
9494
+ const { viewData: t, visible: n, model: o, context: r, domain: s, formView: a, treeView: c } = e, d = Z(), u = te(
9495
9495
  nt
9496
9496
  ), {
9497
9497
  setResults: f = void 0,
@@ -9515,12 +9515,12 @@ const hu = (e) => {
9515
9515
  currentView: _
9516
9516
  } = u || {}, [D, E] = C(!0);
9517
9517
  fe(() => {
9518
- var X;
9519
- (X = d.current) == null || X.refresh();
9518
+ var J;
9519
+ (J = d.current) == null || J.refresh();
9520
9520
  }, [T]), fe(() => {
9521
9521
  t.view_id !== _.view_id && E(!0);
9522
9522
  }, [_]);
9523
- const { clear: K, searchFilterLoading: L, searchError: N, offset: B, tableRefreshing: P } = ui({
9523
+ const { clear: K, searchFilterLoading: N, searchError: L, offset: B, tableRefreshing: P } = ui({
9524
9524
  model: o,
9525
9525
  setSearchTreeNameSearch: v,
9526
9526
  setSelectedRowItems: m,
@@ -9563,11 +9563,11 @@ const hu = (e) => {
9563
9563
  limit: x,
9564
9564
  onClear: K,
9565
9565
  offset: B,
9566
- isSearching: L,
9567
- onSubmit: (X) => {
9568
- E(!1), g == null || g(X.params), y == null || y(!1);
9566
+ isSearching: N,
9567
+ onSubmit: (J) => {
9568
+ E(!1), g == null || g(J.params), y == null || y(!1);
9569
9569
  },
9570
- searchError: N,
9570
+ searchError: L,
9571
9571
  searchVisible: w,
9572
9572
  searchValues: A,
9573
9573
  showLimitOptions: !1
@@ -9582,7 +9582,7 @@ const hu = (e) => {
9582
9582
  context: r,
9583
9583
  domain: Bt(T || [], s),
9584
9584
  limit: D ? x : void 0,
9585
- manualIds: D ? p == null ? void 0 : p.map((X) => X.id) : void 0
9585
+ manualIds: D ? p == null ? void 0 : p.map((J) => J.id) : void 0
9586
9586
  }
9587
9587
  )
9588
9588
  ] });
@@ -9623,7 +9623,7 @@ const hu = (e) => {
9623
9623
  ] }) : null;
9624
9624
  };
9625
9625
  function gu(e) {
9626
- const { onSearch: t, disabled: n = !1, searchText: o } = e, { t: r } = pe(), [s] = st.useForm(), [a, c] = C(!1);
9626
+ const { onSearch: t, disabled: n = !1, searchText: o } = e, { t: r } = ge(), [s] = st.useForm(), [a, c] = C(!1);
9627
9627
  function d(f) {
9628
9628
  t(f.search);
9629
9629
  }
@@ -9633,7 +9633,7 @@ function gu(e) {
9633
9633
  function u() {
9634
9634
  c(!1), s.setFieldsValue({ search: void 0 }), t(void 0);
9635
9635
  }
9636
- return /* @__PURE__ */ i(st, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ k(_e, { align: "middle", justify: "end", children: [
9636
+ return /* @__PURE__ */ i(st, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ k(De, { align: "middle", justify: "end", children: [
9637
9637
  /* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(st.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ i(
9638
9638
  ot,
9639
9639
  {
@@ -9653,7 +9653,7 @@ function gu(e) {
9653
9653
  }
9654
9654
  ) }) }),
9655
9655
  /* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(
9656
- Pe,
9656
+ Me,
9657
9657
  {
9658
9658
  htmlType: "submit",
9659
9659
  disabled: n,
@@ -9664,7 +9664,7 @@ function gu(e) {
9664
9664
  ] }) });
9665
9665
  }
9666
9666
  function yu(e) {
9667
- var le;
9667
+ var de;
9668
9668
  const {
9669
9669
  availableViews: t,
9670
9670
  currentView: n,
@@ -9692,9 +9692,9 @@ function yu(e) {
9692
9692
  isActive: R
9693
9693
  } = te(nt), { parentContext: T = {}, treeExpandable: A, toolbar: V } = e, _ = Dn(
9694
9694
  Gt.FEATURE_ADVANCED_EXPORT
9695
- ), { t: D } = pe(), E = te(
9695
+ ), { t: D } = ge(), E = te(
9696
9696
  Yt
9697
- ), { processAction: K } = E || {}, [L, N] = C(!1);
9697
+ ), { processAction: K } = E || {}, [N, L] = C(!1);
9698
9698
  Ot(
9699
9699
  "ctrl+l,command+l",
9700
9700
  () => {
@@ -9720,7 +9720,7 @@ function yu(e) {
9720
9720
  }
9721
9721
  });
9722
9722
  }
9723
- function X() {
9723
+ function J() {
9724
9724
  St({
9725
9725
  confirmMessage: D("confirmRemove"),
9726
9726
  t: D,
@@ -9832,7 +9832,7 @@ function yu(e) {
9832
9832
  tooltip: D("delete"),
9833
9833
  disabled: !(r && (r == null ? void 0 : r.length) > 0) || S,
9834
9834
  loading: a,
9835
- onClick: X
9835
+ onClick: J
9836
9836
  }
9837
9837
  ),
9838
9838
  It()
@@ -9974,7 +9974,7 @@ function yu(e) {
9974
9974
  });
9975
9975
  return;
9976
9976
  }
9977
- N(!0);
9977
+ L(!0);
9978
9978
  },
9979
9979
  disabled: c || a || S || B
9980
9980
  }
@@ -9982,11 +9982,11 @@ function yu(e) {
9982
9982
  /* @__PURE__ */ i(
9983
9983
  Ud,
9984
9984
  {
9985
- visible: L,
9986
- onClose: () => N(!1),
9985
+ visible: N,
9986
+ onClose: () => L(!1),
9987
9987
  model: u,
9988
9988
  domain: Bt(
9989
- ((le = f == null ? void 0 : f.current) == null ? void 0 : le.getDomain()) || [],
9989
+ ((de = f == null ? void 0 : f.current) == null ? void 0 : de.getDomain()) || [],
9990
9990
  p || []
9991
9991
  ),
9992
9992
  limit: O,
@@ -10055,9 +10055,9 @@ const wu = ({
10055
10055
  selectedRowKeys: t,
10056
10056
  allRowSelectedMode: n
10057
10057
  }) => {
10058
- const { t: o } = pe();
10058
+ const { t: o } = ge();
10059
10059
  return /* @__PURE__ */ k(
10060
- _e,
10060
+ De,
10061
10061
  {
10062
10062
  align: "bottom",
10063
10063
  className: "pb-4",
@@ -10071,7 +10071,7 @@ const wu = ({
10071
10071
  }, Su = ({
10072
10072
  selectedRowKeys: e
10073
10073
  }) => {
10074
- const { t } = pe();
10074
+ const { t } = ge();
10075
10075
  if (e.length === 1)
10076
10076
  return /* @__PURE__ */ k(se, { children: [
10077
10077
  "1 ",
@@ -10102,7 +10102,7 @@ const wu = ({
10102
10102
  title: o,
10103
10103
  footer: r
10104
10104
  }) => {
10105
- const [s, a] = C(e), c = Q(null), { token: d } = xu(), u = U(
10105
+ const [s, a] = C(e), c = Z(null), { token: d } = xu(), u = U(
10106
10106
  (p) => {
10107
10107
  p.preventDefault(), p.stopPropagation(), t();
10108
10108
  },
@@ -10176,7 +10176,7 @@ const wu = ({
10176
10176
  /* @__PURE__ */ k(Fu, { style: h, children: [
10177
10177
  /* @__PURE__ */ i(Tu, { level: 3, style: { margin: 0, flex: 1 }, children: o }),
10178
10178
  /* @__PURE__ */ i(
10179
- Pe,
10179
+ Me,
10180
10180
  {
10181
10181
  type: "text",
10182
10182
  icon: /* @__PURE__ */ i(Wt, {}),
@@ -10346,7 +10346,7 @@ const Yu = /* @__PURE__ */ Vu(qu), zu = ct(
10346
10346
  }
10347
10347
  ), Ju = (e) => {
10348
10348
  var I;
10349
- const { onSubmit: t, isOpen: n, onClose: o, searchFields: r, fields: s, searchValues: a } = e, c = Q(), { t: d } = pe(), [u, f] = C(), l = Q(null), [h, p] = C();
10349
+ const { onSubmit: t, isOpen: n, onClose: o, searchFields: r, fields: s, searchValues: a } = e, c = Z(), { t: d } = ge(), [u, f] = C(), l = Z(null), [h, p] = C();
10350
10350
  fe(() => {
10351
10351
  n && p(void 0);
10352
10352
  }, [n]), dt(() => {
@@ -10415,7 +10415,7 @@ const Yu = /* @__PURE__ */ Vu(qu), zu = ct(
10415
10415
  onSubmit: t,
10416
10416
  searchParams: n
10417
10417
  }) => {
10418
- const { t: o } = pe();
10418
+ const { t: o } = ge();
10419
10419
  return /* @__PURE__ */ k(
10420
10420
  "div",
10421
10421
  {
@@ -10429,7 +10429,7 @@ const Yu = /* @__PURE__ */ Vu(qu), zu = ct(
10429
10429
  },
10430
10430
  children: [
10431
10431
  /* @__PURE__ */ i(
10432
- Pe,
10432
+ Me,
10433
10433
  {
10434
10434
  icon: /* @__PURE__ */ i(Fn, {}),
10435
10435
  size: "large",
@@ -10440,7 +10440,7 @@ const Yu = /* @__PURE__ */ Vu(qu), zu = ct(
10440
10440
  }
10441
10441
  ),
10442
10442
  /* @__PURE__ */ i(
10443
- Pe,
10443
+ Me,
10444
10444
  {
10445
10445
  icon: /* @__PURE__ */ i(Tn, {}),
10446
10446
  size: "large",
@@ -10468,16 +10468,16 @@ function ef(e, t) {
10468
10468
  parentContext: u = {},
10469
10469
  onChangeSelectedRowKeys: f,
10470
10470
  nameSearch: l
10471
- } = e, h = Q({}), p = Q(), m = Q(null), [g, w] = C(), { t: y } = pe();
10471
+ } = e, h = Z({}), p = Z(), m = Z(null), [g, w] = C(), { t: y } = ge();
10472
10472
  lt(t, () => ({
10473
10473
  refreshResults: () => {
10474
- var ne;
10475
- (ne = m == null ? void 0 : m.current) == null || ne.refresh();
10474
+ var me;
10475
+ (me = m == null ? void 0 : m.current) == null || me.refresh();
10476
10476
  },
10477
10477
  getFields: () => b == null ? void 0 : b.fields,
10478
10478
  getDomain: () => a
10479
10479
  }));
10480
- const S = Q(null), I = vu({
10480
+ const S = Z(null), I = vu({
10481
10481
  elementRef: S,
10482
10482
  offset: Qu
10483
10483
  }), { treeView: b, formView: v, loading: O } = wu({
@@ -10495,15 +10495,15 @@ function ef(e, t) {
10495
10495
  selectedRowItems: D,
10496
10496
  setSearchParams: E,
10497
10497
  searchValues: K,
10498
- searchParams: L,
10499
- setSearchValues: N,
10498
+ searchParams: N,
10499
+ setSearchValues: L,
10500
10500
  searchTreeNameSearch: B,
10501
10501
  setSearchTreeNameSearch: P
10502
- } = gc(d), X = l || B;
10502
+ } = gc(d), J = l || B;
10503
10503
  fe(() => {
10504
- var ne;
10505
- (ne = m.current) == null || ne.refresh(), E == null || E([]), N == null || N({});
10506
- }, [X]);
10504
+ var me, le;
10505
+ A == null || A([]), E == null || E([]), L == null || L({}), (me = m.current) == null || me.refresh(), (le = m.current) == null || le.unselectAll();
10506
+ }, [J]);
10507
10507
  const Y = Ce(() => {
10508
10508
  if (b)
10509
10509
  return bt(b);
@@ -10520,110 +10520,112 @@ function ef(e, t) {
10520
10520
  treeViewId: b == null ? void 0 : b.view_id,
10521
10521
  model: n
10522
10522
  }), [n, b == null ? void 0 : b.view_id]), {
10523
- loading: le,
10523
+ loading: de,
10524
10524
  getColumnState: H,
10525
10525
  updateColumnState: F
10526
- } = bi(ce), W = U(
10526
+ } = bi(ce), W = Ce(
10527
+ () => Bt(N || [], a),
10528
+ [a, N]
10529
+ ), G = U(
10527
10530
  async ({
10528
- startRow: ne,
10529
- endRow: xe,
10530
- sortFields: ye
10531
+ startRow: me,
10532
+ endRow: le,
10533
+ sortFields: Q
10531
10534
  }) => {
10532
10535
  if (x == null || x(!0), !Y)
10533
10536
  return [];
10534
- const Z = {};
10535
- Y.colors && (Z.colors = Y.colors), Y.status && (Z.status = Y.status);
10536
- const de = Bt(L || [], a), {
10537
+ const ne = {};
10538
+ Y.colors && (ne.colors = Y.colors), Y.status && (ne.status = Y.status);
10539
+ const {
10537
10540
  totalItems: he,
10538
10541
  results: Ne,
10539
- attrsEvaluated: J
10542
+ attrsEvaluated: z
10540
10543
  } = await M.getHandler().searchForTree({
10541
- params: X ? a : de,
10542
- limit: xe - ne,
10543
- offset: ne,
10544
+ params: J ? a : W,
10545
+ limit: le - me,
10546
+ offset: me,
10544
10547
  model: n,
10545
10548
  fields: b.field_parent ? { ...b.fields, [b.field_parent]: {} } : b.fields,
10546
10549
  context: u,
10547
- attrs: Z,
10548
- order: $a(ye),
10549
- name_search: X
10550
+ attrs: ne,
10551
+ order: $a(Q),
10552
+ name_search: J
10550
10553
  });
10551
10554
  Promise.resolve().then(async () => {
10552
10555
  he.then((Ae) => {
10553
10556
  w(Ae);
10554
10557
  });
10555
10558
  });
10556
- const Fe = _n(Y, Ne);
10559
+ const Te = _n(Y, Ne);
10557
10560
  return h.current = {
10558
10561
  ...h.current,
10559
- ...J.colors
10562
+ ...z.colors
10560
10563
  }, !p.current && Y.status && (p.current = {}), Y.status && (p.current = {
10561
10564
  ...p.current,
10562
- ...J.colors
10563
- }), x == null || x(!1), Fe;
10565
+ ...z.colors
10566
+ }), x == null || x(!1), Te;
10564
10567
  },
10565
10568
  [
10566
10569
  a,
10567
10570
  n,
10568
- X,
10571
+ J,
10569
10572
  u,
10570
- L,
10573
+ N,
10571
10574
  x,
10572
10575
  Y,
10573
10576
  b
10574
10577
  ]
10575
- ), G = U(
10576
- (ne) => {
10577
- A == null || A(ne.map((xe) => ({ id: xe }))), f == null || f(ne);
10578
+ ), pe = U(
10579
+ (me) => {
10580
+ A == null || A(me.map((le) => ({ id: le }))), f == null || f(me);
10578
10581
  },
10579
10582
  [f, A]
10580
- ), me = U(
10583
+ ), ie = U(
10581
10584
  async ({
10582
- startRow: ne,
10583
- endRow: xe,
10584
- sortFields: ye
10585
+ startRow: me,
10586
+ endRow: le,
10587
+ sortFields: Q
10585
10588
  }) => {
10586
10589
  try {
10587
- return await W({
10588
- startRow: ne,
10589
- endRow: xe,
10590
- sortFields: ye
10590
+ return await G({
10591
+ startRow: me,
10592
+ endRow: le,
10593
+ sortFields: Q
10591
10594
  });
10592
- } catch (Z) {
10593
- console.error(Z), xt(Z);
10595
+ } catch (ne) {
10596
+ console.error(ne), xt(ne);
10594
10597
  }
10595
10598
  },
10596
- [W]
10597
- ), ie = U((ne) => {
10598
- var xe, ye, Z, de;
10599
- if (h.current[(ye = (xe = ne.node) == null ? void 0 : xe.data) == null ? void 0 : ye.id])
10600
- return { color: h.current[(de = (Z = ne.node) == null ? void 0 : Z.data) == null ? void 0 : de.id] };
10601
- }, []), z = Ci({
10599
+ [G]
10600
+ ), X = U((me) => {
10601
+ var le, Q, ne, he;
10602
+ if (h.current[(Q = (le = me.node) == null ? void 0 : le.data) == null ? void 0 : Q.id])
10603
+ return { color: h.current[(he = (ne = me.node) == null ? void 0 : ne.data) == null ? void 0 : he.id] };
10604
+ }, []), ue = Ci({
10602
10605
  ooui: Y,
10603
10606
  model: n
10604
- }), ue = U(async () => {
10605
- let ne = !1;
10606
- (D == null ? void 0 : D.length) === 0 ? ne = !0 : ne = !1;
10607
- const xe = async () => {
10608
- const ye = await M.getHandler().search({
10609
- params: a,
10610
- limit: 0,
10611
- offset: 0,
10612
- model: n,
10613
- fields: b.field_parent ? { ...b.fields, [b.field_parent]: {} } : b.fields,
10614
- context: u,
10615
- fieldsToRetrieve: ["id"]
10616
- });
10617
- A == null || A(ye);
10607
+ }), ye = U(async () => {
10608
+ let me = !1;
10609
+ (D == null ? void 0 : D.length) === 0 ? me = !0 : me = !1;
10610
+ const le = async () => {
10611
+ const Q = await M.getHandler().searchAllIds(
10612
+ {
10613
+ params: J ? a : W,
10614
+ model: n,
10615
+ context: u,
10616
+ totalItems: g
10617
+ }
10618
+ );
10619
+ A == null || A(Q.map((ne) => ({ id: ne })));
10618
10620
  };
10619
- ne ? g && g > Zu ? St({
10621
+ me ? g && g > Zu ? St({
10620
10622
  confirmMessage: y("confirmSelectAllRegisters").replace(
10621
10623
  "{totalRecords}",
10622
10624
  g.toString()
10623
10625
  ),
10624
10626
  t: y,
10625
- onOk: xe
10626
- }) : xe() : A == null || A([]);
10627
+ onOk: le
10628
+ }) : le() : A == null || A([]);
10627
10629
  }, [
10628
10630
  a,
10629
10631
  n,
@@ -10631,63 +10633,62 @@ function ef(e, t) {
10631
10633
  D == null ? void 0 : D.length,
10632
10634
  A,
10633
10635
  y,
10634
- g,
10635
- b
10636
- ]), ge = Ce(() => (D == null ? void 0 : D.map((ne) => ne.id)) || [], [D]), De = Ce(() => !ee || !Y ? null : /* @__PURE__ */ i(
10636
+ g
10637
+ ]), Re = Ce(() => (D == null ? void 0 : D.map((me) => me.id)) || [], [D]), Pe = Ce(() => !ee || !Y ? null : /* @__PURE__ */ i(
10637
10638
  Mo,
10638
10639
  {
10639
10640
  readonly: !1,
10640
10641
  ref: m,
10641
10642
  height: I,
10642
10643
  columns: ee,
10643
- onRequestData: me,
10644
+ onRequestData: ie,
10644
10645
  onRowDoubleClick: s,
10645
- onRowStyle: ie,
10646
- onRowSelectionChange: G,
10646
+ onRowStyle: X,
10647
+ onRowSelectionChange: pe,
10647
10648
  onColumnChanged: F,
10648
10649
  onGetColumnsState: H,
10649
10650
  onChangeFirstVisibleRowIndex: V,
10650
10651
  onGetFirstVisibleRowIndex: () => _,
10651
- selectedRowKeys: ge,
10652
- onSelectionCheckboxClicked: ue,
10652
+ selectedRowKeys: Re,
10653
+ onSelectionCheckboxClicked: ye,
10653
10654
  totalRows: g || 99999,
10654
- footer: z && /* @__PURE__ */ i(vi, { aggregates: z }),
10655
+ footer: ue && /* @__PURE__ */ i(vi, { aggregates: ue }),
10655
10656
  hasStatusColumn: Y.status !== null,
10656
- statusComponent: (ne) => /* @__PURE__ */ i(ar, { color: ne }),
10657
- onRowStatus: (ne) => {
10658
- var xe;
10659
- return (xe = p.current) == null ? void 0 : xe[ne.id];
10657
+ statusComponent: (me) => /* @__PURE__ */ i(ar, { color: me }),
10658
+ onRowStatus: (me) => {
10659
+ var le;
10660
+ return (le = p.current) == null ? void 0 : le[me.id];
10660
10661
  }
10661
10662
  }
10662
10663
  ), [
10663
- z,
10664
+ ue,
10664
10665
  I,
10665
- G,
10666
+ pe,
10666
10667
  ee,
10667
10668
  H,
10668
- me,
10669
- s,
10670
10669
  ie,
10671
- ue,
10672
- ge,
10670
+ s,
10671
+ X,
10672
+ ye,
10673
+ Re,
10673
10674
  V,
10674
10675
  g,
10675
10676
  _,
10676
10677
  Y,
10677
10678
  F
10678
- ]), Me = Q(L), Ve = Q(R);
10679
+ ]), Ve = Z(N), _e = Z(R);
10679
10680
  return dt(() => {
10680
- var ye;
10681
- const ne = !Po(
10682
- L,
10683
- Me.current
10684
- ), xe = Ve.current && !R;
10685
- ne && xe && ((ye = m.current) == null || ye.refresh()), Me.current = L, Ve.current = R;
10686
- }, [L, R]), /* @__PURE__ */ k($t, { children: [
10681
+ var Q;
10682
+ const me = !Po(
10683
+ N,
10684
+ Ve.current
10685
+ ), le = _e.current && !R;
10686
+ me && le && ((Q = m.current) == null || Q.refresh()), Ve.current = N, _e.current = R;
10687
+ }, [N, R]), /* @__PURE__ */ k($t, { children: [
10687
10688
  /* @__PURE__ */ i(
10688
10689
  Cu,
10689
10690
  {
10690
- selectedRowKeys: ge,
10691
+ selectedRowKeys: Re,
10691
10692
  allRowSelectedMode: !1,
10692
10693
  totalRows: g
10693
10694
  }
@@ -10701,8 +10702,8 @@ function ef(e, t) {
10701
10702
  height: `${I}px`,
10702
10703
  ...c ? {} : { display: "none" }
10703
10704
  },
10704
- children: O || le ? /* @__PURE__ */ i($e, {}) : /* @__PURE__ */ k($t, { children: [
10705
- De,
10705
+ children: O || de ? /* @__PURE__ */ i($e, {}) : /* @__PURE__ */ k($t, { children: [
10706
+ Pe,
10706
10707
  /* @__PURE__ */ i(
10707
10708
  Ju,
10708
10709
  {
@@ -10713,8 +10714,9 @@ function ef(e, t) {
10713
10714
  v == null ? void 0 : v.search_fields,
10714
10715
  b == null ? void 0 : b.search_fields
10715
10716
  ]),
10716
- onSubmit: ({ params: ne, values: xe }) => {
10717
- P == null || P(void 0), E == null || E(ne), N == null || N(xe), T == null || T(!1);
10717
+ onSubmit: ({ params: me, values: le }) => {
10718
+ var Q;
10719
+ A == null || A([]), (Q = m.current) == null || Q.unselectAll(), P == null || P(void 0), E == null || E(me), L == null || L(le), T == null || T(!1);
10718
10720
  },
10719
10721
  searchValues: K
10720
10722
  }
@@ -10817,7 +10819,7 @@ const tf = ct(ef), nf = (e) => {
10817
10819
  );
10818
10820
  };
10819
10821
  function of() {
10820
- const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: o } = te(Ar), { t: r } = pe();
10822
+ const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: o } = te(Ar), { t: r } = ge();
10821
10823
  return /* @__PURE__ */ k(ze, { wrap: !0, children: [
10822
10824
  /* @__PURE__ */ i(
10823
10825
  Je,
@@ -10868,7 +10870,7 @@ function sf() {
10868
10870
  return /* @__PURE__ */ i("div", { className: "inline-block w-2" });
10869
10871
  }
10870
10872
  const af = (e) => {
10871
- const { dashboardData: t, visible: n } = e, o = Q(), r = te(
10873
+ const { dashboardData: t, visible: n } = e, o = Z(), r = te(
10872
10874
  ft
10873
10875
  ), { openShortcut: s } = r || {};
10874
10876
  return !t || !n ? null : /* @__PURE__ */ k(
@@ -10928,57 +10930,57 @@ function lf(e, t) {
10928
10930
  limit: w
10929
10931
  } = e, [y, S] = C(), [I, b] = C([]), [v, O] = C(!0), x = h || void 0, [R, T] = C(
10930
10932
  x
10931
- ), [A, V] = C([]), [_, D] = C(), [E, K] = C([]), [L, N] = C(), [B, P] = C(0), [X, Y] = C(!1), [ee, ce] = C(!1), [le, H] = C(), { t: F } = pe(), W = Q(), G = Q(), me = te(
10933
+ ), [A, V] = C([]), [_, D] = C(), [E, K] = C([]), [N, L] = C(), [B, P] = C(0), [J, Y] = C(!1), [ee, ce] = C(!1), [de, H] = C(), { t: F } = ge(), W = Z(), G = Z(), pe = te(
10932
10934
  ft
10933
10935
  ), {
10934
10936
  setCurrentView: ie,
10935
- setCurrentId: z,
10937
+ setCurrentId: X,
10936
10938
  tabs: ue,
10937
- activeKey: ge,
10938
- openAction: De,
10939
- onRemoveTab: Me
10940
- } = me || {};
10939
+ activeKey: ye,
10940
+ openAction: Re,
10941
+ onRemoveTab: Pe
10942
+ } = pe || {};
10941
10943
  Ot(
10942
10944
  "ctrl+g,command+g",
10943
10945
  () => {
10944
- Z();
10946
+ Q();
10945
10947
  },
10946
10948
  { enableOnFormTags: !0, preventDefault: !0 },
10947
- [ge, ue, y, _, E]
10949
+ [ye, ue, y, _, E]
10948
10950
  );
10949
- function Ve(J) {
10950
- T(J), z == null || z(J);
10951
+ function Ve(z) {
10952
+ T(z), X == null || X(z);
10951
10953
  }
10952
- function ne(J) {
10953
- S(J);
10954
- const Fe = { action_id: p, action_type: m };
10955
- ie == null || ie({ ...J, extra: Fe });
10954
+ function _e(z) {
10955
+ S(z);
10956
+ const Te = { action_id: p, action_type: m };
10957
+ ie == null || ie({ ...z, extra: Te });
10956
10958
  }
10957
10959
  lt(t, () => ({
10958
- canWeClose: ye
10960
+ canWeClose: le
10959
10961
  }));
10960
- const xe = async () => {
10962
+ const me = async () => {
10961
10963
  O(!0);
10962
- const J = [], Fe = [];
10964
+ const z = [], Te = [];
10963
10965
  for (const Le of s) {
10964
- const [re, Oe] = Le;
10965
- Oe !== "dashboard" ? Fe.push({
10966
+ const [re, Ie] = Le;
10967
+ Ie !== "dashboard" ? Te.push({
10966
10968
  viewTuple: Le,
10967
10969
  promise: M.getHandler().getView({
10968
10970
  model: o,
10969
- type: Oe,
10971
+ type: Ie,
10970
10972
  id: re,
10971
10973
  context: r
10972
10974
  })
10973
- }) : Fe.push({
10975
+ }) : Te.push({
10974
10976
  viewTuple: Le
10975
10977
  });
10976
10978
  }
10977
- const Ae = await cf(Fe);
10979
+ const Ae = await cf(Te);
10978
10980
  for (const Le of Ae) {
10979
10981
  if (!Le)
10980
10982
  continue;
10981
- const [, re] = Le.viewTuple, Oe = Le.info;
10983
+ const [, re] = Le.viewTuple, Ie = Le.info;
10982
10984
  switch (re) {
10983
10985
  case "dashboard": {
10984
10986
  const Ke = s.find((rt) => {
@@ -10994,7 +10996,7 @@ function lf(e, t) {
10994
10996
  res_model: o,
10995
10997
  view_id: Ke[0],
10996
10998
  view_type: Ke[1]
10997
- }), J.push({
10999
+ }), z.push({
10998
11000
  type: "dashboard",
10999
11001
  id: r.active_id,
11000
11002
  model: o,
@@ -11004,23 +11006,23 @@ function lf(e, t) {
11004
11006
  break;
11005
11007
  }
11006
11008
  case "form": {
11007
- J.push({
11008
- ...Oe,
11009
+ z.push({
11010
+ ...Ie,
11009
11011
  type: re
11010
11012
  });
11011
11013
  break;
11012
11014
  }
11013
11015
  case "tree": {
11014
- J.push({
11015
- ...Oe,
11016
+ z.push({
11017
+ ...Ie,
11016
11018
  isExpandable: g,
11017
11019
  type: re
11018
11020
  });
11019
11021
  break;
11020
11022
  }
11021
11023
  case "graph": {
11022
- J.push({
11023
- ...Oe,
11024
+ z.push({
11025
+ ...Ie,
11024
11026
  type: re
11025
11027
  });
11026
11028
  break;
@@ -11028,40 +11030,40 @@ function lf(e, t) {
11028
11030
  }
11029
11031
  }
11030
11032
  let je;
11031
- !u && J.find((Le) => Le.type === "tree") ? je = J.find(
11033
+ !u && z.find((Le) => Le.type === "tree") ? je = z.find(
11032
11034
  (re) => re.type === "tree"
11033
- ) : u ? je = J.find((re) => u.id ? re.type === u.type && re.view_id === u.id : re.type === u.type) : je = J.find(
11035
+ ) : u ? je = z.find((re) => u.id ? re.type === u.type && re.view_id === u.id : re.type === u.type) : je = z.find(
11034
11036
  (re) => re.type === "form"
11035
11037
  ), je || (Ze(
11036
11038
  `Error determining the first view to show for model ${o}.
11037
11039
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
11038
- ), Me == null || Me(d)), ne(je), b(J), O(!1);
11040
+ ), Pe == null || Pe(d)), _e(je), b(z), O(!1);
11039
11041
  };
11040
- c({ tabKey: d, canWeClose: ye }), fe(() => {
11041
- const J = I.find((Ae) => Ae.type === "tree"), Fe = I.find((Ae) => u.id ? Ae.type === u.type && Ae.view_id === u.id : Ae.type === u.type);
11042
- ne(Fe || J), h ? z == null || z(x) : (Ve(void 0), D(void 0)), xe();
11042
+ c({ tabKey: d, canWeClose: le }), fe(() => {
11043
+ const z = I.find((Ae) => Ae.type === "tree"), Te = I.find((Ae) => u.id ? Ae.type === u.type && Ae.view_id === u.id : Ae.type === u.type);
11044
+ _e(Te || z), h ? X == null || X(x) : (Ve(void 0), D(void 0)), me();
11043
11045
  }, [o, s, h]), fe(() => {
11044
- if (ge === d) {
11045
- z == null || z(R);
11046
- const J = { action_id: p, action_type: m };
11047
- ie == null || ie({ ...y, extra: J });
11046
+ if (ye === d) {
11047
+ X == null || X(R);
11048
+ const z = { action_id: p, action_type: m };
11049
+ ie == null || ie({ ...y, extra: z });
11048
11050
  }
11049
- }, [ue, ge]);
11050
- async function ye() {
11051
+ }, [ue, ye]);
11052
+ async function le() {
11051
11053
  return y && y.type === "form" ? await W.current.cancelUnsavedChanges() : !0;
11052
11054
  }
11053
- async function Z() {
11054
- ge === d && (y.type === "form" && !await W.current.cancelUnsavedChanges() || Y(!0));
11055
+ async function Q() {
11056
+ ye === d && (y.type === "form" && !await W.current.cancelUnsavedChanges() || Y(!0));
11055
11057
  }
11056
- async function de(J, Fe) {
11058
+ async function ne(z, Te) {
11057
11059
  var Le;
11058
11060
  ce(!0);
11059
11061
  let Ae, je;
11060
- if (J.length === 1) {
11062
+ if (z.length === 1) {
11061
11063
  Ae = "form", je = [];
11062
- const re = J[0], Oe = E.findIndex((we) => we.id === re);
11064
+ const re = z[0], Ie = E.findIndex((we) => we.id === re);
11063
11065
  let Ke;
11064
- if (Oe === -1) {
11066
+ if (Ie === -1) {
11065
11067
  try {
11066
11068
  Ke = (Le = await M.getHandler().readObjects({
11067
11069
  model: o,
@@ -11075,18 +11077,18 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11075
11077
  return;
11076
11078
  }
11077
11079
  } else
11078
- Ke = E[Oe];
11080
+ Ke = E[Ie];
11079
11081
  } else
11080
- Ae = "tree", je = [["id", "in", J]];
11081
- if (ce(!1), Y(!1), Fe && Ae === "form") {
11082
- Ve(J[0]);
11082
+ Ae = "tree", je = [["id", "in", z]];
11083
+ if (ce(!1), Y(!1), Te && Ae === "form") {
11084
+ Ve(z[0]);
11083
11085
  const re = I.find(
11084
- (Oe) => Oe.type === "form"
11086
+ (Ie) => Ie.type === "form"
11085
11087
  );
11086
- ne(re);
11088
+ _e(re);
11087
11089
  } else {
11088
- const re = s.find((Oe) => Oe[1] === Ae);
11089
- De({
11090
+ const re = s.find((Ie) => Ie[1] === Ae);
11091
+ Re({
11090
11092
  domain: je,
11091
11093
  context: r,
11092
11094
  model: o,
@@ -11096,21 +11098,21 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11096
11098
  initialView: { id: re == null ? void 0 : re[0], type: Ae },
11097
11099
  action_id: p,
11098
11100
  action_type: m,
11099
- res_id: J[0]
11101
+ res_id: z[0]
11100
11102
  });
11101
11103
  }
11102
11104
  }
11103
11105
  function he() {
11104
- return I.map((J) => {
11105
- switch (J.type) {
11106
+ return I.map((z) => {
11107
+ switch (z.type) {
11106
11108
  case "form":
11107
11109
  return /* @__PURE__ */ i(
11108
11110
  pu,
11109
11111
  {
11110
11112
  formRef: W,
11111
11113
  currentId: R,
11112
- visible: y.type === J.type && y.view_id === J.view_id,
11113
- formView: J,
11114
+ visible: y.type === z.type && y.view_id === z.view_id,
11115
+ formView: z,
11114
11116
  model: o,
11115
11117
  context: r,
11116
11118
  domain: n,
@@ -11120,51 +11122,51 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11120
11122
  setResults: K,
11121
11123
  setCurrentItemIndex: D
11122
11124
  },
11123
- `${J.type}-${J.view_id}`
11125
+ `${z.type}-${z.view_id}`
11124
11126
  );
11125
11127
  case "tree":
11126
11128
  return /* @__PURE__ */ i(
11127
11129
  nf,
11128
11130
  {
11129
- visible: y.type === J.type && y.view_id === J.view_id,
11131
+ visible: y.type === z.type && y.view_id === z.view_id,
11130
11132
  limit: w,
11131
11133
  model: o,
11132
11134
  context: r,
11133
11135
  domain: n,
11134
- formView: I.find((Fe) => Fe.type === "form"),
11135
- treeView: J,
11136
+ formView: I.find((Te) => Te.type === "form"),
11137
+ treeView: z,
11136
11138
  searchTreeRef: G,
11137
- searchTreeNameSearch: le,
11139
+ searchTreeNameSearch: de,
11138
11140
  availableViews: I,
11139
11141
  results: E,
11140
11142
  setCurrentItemIndex: D,
11141
11143
  setCurrentId: Ve,
11142
- setCurrentView: ne
11144
+ setCurrentView: _e
11143
11145
  },
11144
- `${J.type}-${J.view_id}`
11146
+ `${z.type}-${z.view_id}`
11145
11147
  );
11146
11148
  case "graph":
11147
11149
  return /* @__PURE__ */ i(
11148
11150
  hu,
11149
11151
  {
11150
- visible: y.type === J.type && y.view_id === J.view_id,
11151
- viewData: J,
11152
+ visible: y.type === z.type && y.view_id === z.view_id,
11153
+ viewData: z,
11152
11154
  model: o,
11153
11155
  context: r,
11154
11156
  domain: n,
11155
- treeView: I.find((Fe) => Fe.type === "tree"),
11156
- formView: I.find((Fe) => Fe.type === "form")
11157
+ treeView: I.find((Te) => Te.type === "tree"),
11158
+ formView: I.find((Te) => Te.type === "form")
11157
11159
  },
11158
- `${J.type}-${J.view_id}`
11160
+ `${z.type}-${z.view_id}`
11159
11161
  );
11160
11162
  case "dashboard":
11161
11163
  return /* @__PURE__ */ i(
11162
11164
  af,
11163
11165
  {
11164
- dashboardData: J,
11165
- visible: y.type === J.type && y.view_id === J.view_id
11166
+ dashboardData: z,
11167
+ visible: y.type === z.type && y.view_id === z.view_id
11166
11168
  },
11167
- `${J.type}-${J.view_id}`
11169
+ `${z.type}-${z.view_id}`
11168
11170
  );
11169
11171
  }
11170
11172
  });
@@ -11174,10 +11176,10 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11174
11176
  W.current.clearAndReload();
11175
11177
  else {
11176
11178
  Ve(void 0);
11177
- const J = I.find(
11178
- (Fe) => Fe.type === "form"
11179
+ const z = I.find(
11180
+ (Te) => Te.type === "form"
11179
11181
  );
11180
- ne(J);
11182
+ _e(z);
11181
11183
  }
11182
11184
  }
11183
11185
  return v ? /* @__PURE__ */ i($e, {}) : y ? /* @__PURE__ */ k(
@@ -11185,7 +11187,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11185
11187
  {
11186
11188
  title: a,
11187
11189
  currentView: y,
11188
- setCurrentView: ne,
11190
+ setCurrentView: _e,
11189
11191
  availableViews: I,
11190
11192
  formRef: W,
11191
11193
  searchTreeRef: G,
@@ -11197,24 +11199,24 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11197
11199
  results: E,
11198
11200
  setResults: K,
11199
11201
  currentModel: o,
11200
- sorter: L,
11201
- setSorter: N,
11202
+ sorter: N,
11203
+ setSorter: L,
11202
11204
  totalItems: B,
11203
11205
  setTotalItems: P,
11204
11206
  selectedRowItems: A,
11205
11207
  setSelectedRowItems: V,
11206
11208
  setSearchTreeNameSearch: H,
11207
- searchTreeNameSearch: le,
11208
- goToResourceId: de,
11209
+ searchTreeNameSearch: de,
11210
+ goToResourceId: ne,
11209
11211
  limit: w,
11210
- isActive: d === ge,
11212
+ isActive: d === ye,
11211
11213
  children: [
11212
11214
  he(),
11213
11215
  /* @__PURE__ */ i(
11214
11216
  lu,
11215
11217
  {
11216
- visible: X,
11217
- onIdSubmitted: de,
11218
+ visible: J,
11219
+ onIdSubmitted: ne,
11218
11220
  isSearching: ee,
11219
11221
  onCancel: () => {
11220
11222
  Y(!1);
@@ -11265,60 +11267,60 @@ function ff(e) {
11265
11267
  domain: s = [],
11266
11268
  visible: a = !0,
11267
11269
  parentContext: c = {}
11268
- } = e, [d, u] = C(!1), [f, l] = C(!1), [h, p] = C(), [m, g] = C(), [w, y] = C(), [S, I] = C(1), [b, v] = C(0), O = Q(Vt), x = Q([]), [R, T] = C(0), [A, V] = C([]), [_, D] = C(void 0), [E, K] = C(), [L, N] = C(), [B, P] = C(), [X, Y] = C(!1), ee = Q([]), ce = (z) => {
11269
- Y(!0), I(z), v((z - 1) * O.current);
11270
- }, le = async () => {
11271
- const z = ee.current.length > 0 ? ee.current : s, ue = Bt(x.current, z), { colors: ge } = bt(m), { totalItems: De, results: Me, attrsEvaluated: Ve } = await M.getHandler().searchForTree({
11270
+ } = e, [d, u] = C(!1), [f, l] = C(!1), [h, p] = C(), [m, g] = C(), [w, y] = C(), [S, I] = C(1), [b, v] = C(0), O = Z(Vt), x = Z([]), [R, T] = C(0), [A, V] = C([]), [_, D] = C(void 0), [E, K] = C(), [N, L] = C(), [B, P] = C(), [J, Y] = C(!1), ee = Z([]), ce = (X) => {
11271
+ Y(!0), I(X), v((X - 1) * O.current);
11272
+ }, de = async () => {
11273
+ const X = ee.current.length > 0 ? ee.current : s, ue = Bt(x.current, X), { colors: ye } = bt(m), { totalItems: Re, results: Pe, attrsEvaluated: Ve } = await M.getHandler().searchForTree({
11272
11274
  params: ue,
11273
11275
  limit: O.current,
11274
11276
  offset: b,
11275
11277
  model: h,
11276
11278
  fields: m.fields,
11277
11279
  context: c,
11278
- attrs: ge && { colors: ge }
11280
+ attrs: ye && { colors: ye }
11279
11281
  });
11280
11282
  D(sn(Ve));
11281
- const ne = Lt({
11282
- resultsToSort: Me,
11283
+ const _e = Lt({
11284
+ resultsToSort: Pe,
11283
11285
  sorter: E,
11284
11286
  fields: { ...m.fields, ...w.fields }
11285
11287
  });
11286
- Y(!1), V(ne);
11287
- const xe = await De;
11288
- T(xe);
11288
+ Y(!1), V(_e);
11289
+ const me = await Re;
11290
+ T(me);
11289
11291
  }, H = async () => {
11290
11292
  try {
11291
- Y(!0), await le();
11292
- } catch (z) {
11293
- N(JSON.stringify(z));
11293
+ Y(!0), await de();
11294
+ } catch (X) {
11295
+ L(JSON.stringify(X));
11294
11296
  }
11295
11297
  };
11296
11298
  fe(() => {
11297
11299
  f && a && H();
11298
11300
  }, [S, b, f, a]);
11299
- const F = async (z) => {
11301
+ const F = async (X) => {
11300
11302
  l(!1), u(!0), P(void 0);
11301
11303
  try {
11302
- z === "action" ? await W() : await G(), l(!0);
11304
+ X === "action" ? await W() : await G(), l(!0);
11303
11305
  } catch (ue) {
11304
11306
  P(ue);
11305
11307
  } finally {
11306
11308
  u(!1);
11307
11309
  }
11308
11310
  }, W = async () => {
11309
- const z = await M.getHandler().getViewsForAction({
11311
+ const X = await M.getHandler().getViewsForAction({
11310
11312
  action: t,
11311
11313
  context: c
11312
11314
  });
11313
- ee.current = z.domain, y(z.views.get("form")), g(z.views.get("tree")), p(z.model), O.current = z.limit;
11315
+ ee.current = X.domain, y(X.views.get("form")), g(X.views.get("tree")), p(X.model), O.current = X.limit;
11314
11316
  }, G = async () => {
11315
11317
  p(n);
11316
- const z = await M.getHandler().getView({
11318
+ const X = await M.getHandler().getView({
11317
11319
  model: n,
11318
11320
  type: "form",
11319
11321
  context: c
11320
11322
  });
11321
- y(z);
11323
+ y(X);
11322
11324
  const ue = await M.getHandler().getView({
11323
11325
  model: n,
11324
11326
  type: "tree",
@@ -11330,15 +11332,15 @@ function ff(e) {
11330
11332
  fe(() => {
11331
11333
  t ? F("action") : n && F("model");
11332
11334
  }, [t, n]);
11333
- const me = (z) => {
11334
- const { id: ue } = z;
11335
+ const pe = (X) => {
11336
+ const { id: ue } = X;
11335
11337
  r({
11336
11338
  id: ue,
11337
11339
  model: h,
11338
11340
  treeView: m
11339
11341
  });
11340
11342
  }, ie = () => !m || !w ? null : /* @__PURE__ */ k("div", { style: { overflowY: "scroll" }, children: [
11341
- L && /* @__PURE__ */ i(Qe, { className: "mt-10", message: L, type: "error", banner: !0 }),
11343
+ N && /* @__PURE__ */ i(Qe, { className: "mt-10", message: N, type: "error", banner: !0 }),
11342
11344
  /* @__PURE__ */ i(
11343
11345
  ln,
11344
11346
  {
@@ -11349,15 +11351,15 @@ function ff(e) {
11349
11351
  treeView: m,
11350
11352
  results: A,
11351
11353
  onRequestPageChange: ce,
11352
- loading: X,
11353
- onRowClicked: me,
11354
+ loading: J,
11355
+ onRowClicked: pe,
11354
11356
  colorsForResults: _,
11355
11357
  sorter: E,
11356
- onChangeSort: (z) => {
11357
- K == null || K(z);
11358
+ onChangeSort: (X) => {
11359
+ K == null || K(X);
11358
11360
  const ue = Lt({
11359
11361
  resultsToSort: A,
11360
- sorter: z,
11362
+ sorter: X,
11361
11363
  fields: { ...m.fields, ...w.fields }
11362
11364
  });
11363
11365
  V(ue);
@@ -11388,7 +11390,7 @@ function pf(e, t) {
11388
11390
  setIsLoading: h,
11389
11391
  openAction: p,
11390
11392
  moveItemsEnabled: m
11391
- } = te(Ar), g = Q(), w = Q(), [y] = Ue(M.getHandler().getView), [S] = Ue(
11393
+ } = te(Ar), g = Z(), w = Z(), [y] = Ue(M.getHandler().getView), [S] = Ue(
11392
11394
  M.getHandler().readObjects
11393
11395
  ), [I] = Ue(M.getHandler().update), b = Dn(
11394
11396
  Gt.FEATURE_READFORVIEW
@@ -11406,12 +11408,12 @@ function pf(e, t) {
11406
11408
  try {
11407
11409
  const _ = await O(), D = await R(_), E = _.fields[Wn].relation, K = D[Wn].items;
11408
11410
  w.current = _.fields;
11409
- const L = await x({
11411
+ const N = await x({
11410
11412
  items: K,
11411
11413
  model: E,
11412
11414
  context: o
11413
- }), N = await T(L);
11414
- l(void 0), c(N), u(!1), h(!1);
11415
+ }), L = await T(N);
11416
+ l(void 0), c(L), u(!1), h(!1);
11415
11417
  } catch (_) {
11416
11418
  l(JSON.stringify(_));
11417
11419
  }
@@ -11458,10 +11460,10 @@ function pf(e, t) {
11458
11460
  async function T(_) {
11459
11461
  const D = [];
11460
11462
  for (const K of _) {
11461
- const { values: L } = K;
11462
- if (L.action_id && L.action_id.length > 0) {
11463
- const N = parseInt(L.action_id[0], 10), B = qo({
11464
- actionId: N,
11463
+ const { values: N } = K;
11464
+ if (N.action_id && N.action_id.length > 0) {
11465
+ const L = parseInt(N.action_id[0], 10), B = qo({
11466
+ actionId: L,
11465
11467
  rootContext: o
11466
11468
  }).then((P) => ({ ...K, actionData: P }));
11467
11469
  D.push(B);
@@ -11472,9 +11474,9 @@ function pf(e, t) {
11472
11474
  async function A(_) {
11473
11475
  if (!m)
11474
11476
  return;
11475
- const D = _.filter((N) => {
11477
+ const D = _.filter((L) => {
11476
11478
  const B = a.find(
11477
- (X) => X.id === N.id
11479
+ (J) => J.id === L.id
11478
11480
  );
11479
11481
  if (!B)
11480
11482
  return !1;
@@ -11484,30 +11486,30 @@ function pf(e, t) {
11484
11486
  ...JSON.parse(B.position.replace(/'/g, '"')),
11485
11487
  id: B.id
11486
11488
  };
11487
- return JSON.stringify(N) !== JSON.stringify(P);
11489
+ return JSON.stringify(L) !== JSON.stringify(P);
11488
11490
  });
11489
11491
  if (D.length === 0)
11490
11492
  return;
11491
- const K = a.filter((N) => D.map((B) => B.id).includes(N.id)).map((N) => {
11493
+ const K = a.filter((L) => D.map((B) => B.id).includes(L.id)).map((L) => {
11492
11494
  const B = {
11493
- ...D.find((P) => P.id === N.id)
11495
+ ...D.find((P) => P.id === L.id)
11494
11496
  };
11495
- return delete B.id, { ...N }, {
11496
- ...N,
11497
+ return delete B.id, { ...L }, {
11498
+ ...L,
11497
11499
  operation: "pendingUpdate",
11498
11500
  values: {
11499
- ...N.values,
11501
+ ...L.values,
11500
11502
  position: JSON.stringify(B).replace(/"/g, "'")
11501
11503
  }
11502
11504
  };
11503
- }), L = {
11505
+ }), N = {
11504
11506
  fields: g.current,
11505
11507
  items: K
11506
11508
  };
11507
11509
  await I({
11508
11510
  model: n,
11509
11511
  id: r,
11510
- values: { [Wn]: L },
11512
+ values: { [Wn]: N },
11511
11513
  fields: w.current,
11512
11514
  context: o
11513
11515
  });
@@ -11516,44 +11518,44 @@ function pf(e, t) {
11516
11518
  p(s);
11517
11519
  }
11518
11520
  return d ? /* @__PURE__ */ i(pt, {}) : f ? /* @__PURE__ */ i(Qe, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(uf, { onPositionItemsChanged: A, children: a.map((_, D) => {
11519
- const { actionData: E, values: K } = _, { position: L, id: N } = K, {
11521
+ const { actionData: E, values: K } = _, { position: N, id: L } = K, {
11520
11522
  actionId: B,
11521
11523
  actionType: P,
11522
- key: X,
11524
+ key: J,
11523
11525
  title: Y,
11524
11526
  views: ee,
11525
11527
  model: ce,
11526
- context: le,
11528
+ context: de,
11527
11529
  domain: H,
11528
11530
  initialView: F,
11529
11531
  limit: W
11530
11532
  } = E;
11531
11533
  let G = {};
11532
11534
  try {
11533
- G = JSON.parse(L.replace(/'/g, '"'));
11535
+ G = JSON.parse(N.replace(/'/g, '"'));
11534
11536
  } catch {
11535
11537
  G = { x: D * 2, y: 0, w: 2, h: 3 };
11536
11538
  }
11537
- let me = null;
11539
+ let pe = null;
11538
11540
  if ((F == null ? void 0 : F.type) === "graph") {
11539
- const ge = K.server_action === !0 && b ? ei : Ut;
11540
- me = /* @__PURE__ */ i(
11541
- ge,
11541
+ const ye = K.server_action === !0 && b ? ei : Ut;
11542
+ pe = /* @__PURE__ */ i(
11543
+ ye,
11542
11544
  {
11543
11545
  view_id: ee.filter(
11544
- (De) => De[1] === "graph"
11546
+ (Re) => Re[1] === "graph"
11545
11547
  )[0][0],
11546
11548
  model: ce,
11547
- context: le,
11549
+ context: de,
11548
11550
  domain: H,
11549
11551
  limit: W
11550
11552
  },
11551
- N
11553
+ L
11552
11554
  );
11553
11555
  } else if ((F == null ? void 0 : F.type) === "form")
11554
- me = /* @__PURE__ */ i(hf, { model: ce, actionDomain: H }, N);
11556
+ pe = /* @__PURE__ */ i(hf, { model: ce, actionDomain: H }, L);
11555
11557
  else if ((F == null ? void 0 : F.type) === "tree")
11556
- me = /* @__PURE__ */ i(
11558
+ pe = /* @__PURE__ */ i(
11557
11559
  mf,
11558
11560
  {
11559
11561
  model: ce,
@@ -11562,92 +11564,92 @@ function pf(e, t) {
11562
11564
  (ue) => ue[1] === "tree"
11563
11565
  )[0][0],
11564
11566
  onRowClicked: (ue) => {
11565
- const ge = ee.find((De) => {
11566
- const [, Me] = De;
11567
- return Me === "form";
11567
+ const ye = ee.find((Re) => {
11568
+ const [, Pe] = Re;
11569
+ return Pe === "form";
11568
11570
  });
11569
- if (ge) {
11570
- const [De, Me] = ge, {
11571
+ if (ye) {
11572
+ const [Re, Pe] = ye, {
11571
11573
  actionId: Ve,
11572
- actionType: ne,
11573
- title: xe,
11574
- model: ye
11575
- } = E, Z = {
11574
+ actionType: _e,
11575
+ title: me,
11576
+ model: le
11577
+ } = E, Q = {
11576
11578
  action_id: Ve,
11577
- action_type: ne,
11578
- name: xe,
11579
+ action_type: _e,
11580
+ name: me,
11579
11581
  res_id: ue.id,
11580
- res_model: ye,
11581
- view_id: De,
11582
- view_type: Me
11582
+ res_model: le,
11583
+ view_id: Re,
11584
+ view_type: Pe
11583
11585
  };
11584
- p(Z);
11586
+ p(Q);
11585
11587
  }
11586
11588
  }
11587
11589
  },
11588
- N
11590
+ L
11589
11591
  );
11590
11592
  else if (F !== void 0) {
11591
11593
  const ue = F && Array.isArray(F.id) ? { ...F, id: F.id[0] } : F;
11592
- me = /* @__PURE__ */ i(
11594
+ pe = /* @__PURE__ */ i(
11593
11595
  Ri,
11594
11596
  {
11595
11597
  action_id: B,
11596
11598
  action_type: P,
11597
- tabKey: X,
11599
+ tabKey: J,
11598
11600
  title: Y,
11599
11601
  views: ee,
11600
11602
  model: ce,
11601
- context: le,
11603
+ context: de,
11602
11604
  domain: H,
11603
11605
  setCanWeClose: () => {
11604
11606
  },
11605
11607
  initialView: ue,
11606
11608
  limit: W
11607
11609
  },
11608
- N
11610
+ L
11609
11611
  );
11610
11612
  }
11611
11613
  let ie;
11612
- const z = ee.find((ue) => {
11613
- const [, ge] = ue;
11614
- return ge === "tree";
11614
+ const X = ee.find((ue) => {
11615
+ const [, ye] = ue;
11616
+ return ye === "tree";
11615
11617
  });
11616
- if (z) {
11617
- const [ue, ge] = z, {
11618
- actionId: De,
11619
- actionType: Me,
11618
+ if (X) {
11619
+ const [ue, ye] = X, {
11620
+ actionId: Re,
11621
+ actionType: Pe,
11620
11622
  title: Ve,
11621
- model: ne
11623
+ model: _e
11622
11624
  } = E;
11623
11625
  ie = {
11624
- action_id: De,
11625
- action_type: Me,
11626
+ action_id: Re,
11627
+ action_type: Pe,
11626
11628
  name: Ve,
11627
11629
  res_id: !1,
11628
- res_model: ne,
11630
+ res_model: _e,
11629
11631
  view_id: ue,
11630
- view_type: ge,
11632
+ view_type: ye,
11631
11633
  overrideUnsettedLimit: !0
11632
11634
  };
11633
11635
  }
11634
11636
  return /* @__PURE__ */ i(
11635
11637
  ti,
11636
11638
  {
11637
- id: N,
11639
+ id: L,
11638
11640
  title: Y,
11639
11641
  parms: G,
11640
11642
  action: ie,
11641
11643
  openAction: p,
11642
- children: me
11644
+ children: pe
11643
11645
  },
11644
- `griditem-${N}`
11646
+ `griditem-${L}`
11645
11647
  );
11646
11648
  }) });
11647
11649
  }
11648
11650
  const gf = ct(pf), yf = (e) => {
11649
11651
  const { ooui: t } = e;
11650
- return /* @__PURE__ */ i(Ie, { type: "array", ...e, children: /* @__PURE__ */ i(wf, { ooui: t }) });
11652
+ return /* @__PURE__ */ i(Fe, { type: "array", ...e, children: /* @__PURE__ */ i(wf, { ooui: t }) });
11651
11653
  }, wf = (e) => {
11652
11654
  const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((R) => R.operation !== "pendingRemove").map((R) => R.id), [a, c] = C([]), [d, u] = C(), [f, l] = C(!1), { relation: h, context: p, readOnly: m, field: g, columns: w } = n, y = te(He), { getContext: S } = y || {};
11653
11655
  dt(() => {
@@ -11714,22 +11716,22 @@ const gf = ct(pf), yf = (e) => {
11714
11716
  disabled: m,
11715
11717
  onChange: x,
11716
11718
  style: { width: "100%" },
11717
- children: /* @__PURE__ */ i(_e, { children: a.map((R) => /* @__PURE__ */ i(be, { span: Math.floor(24 / w), children: /* @__PURE__ */ i(tn, { value: R.value, children: R.label }) })) })
11719
+ children: /* @__PURE__ */ i(De, { children: a.map((R) => /* @__PURE__ */ i(be, { span: Math.floor(24 / w), children: /* @__PURE__ */ i(tn, { value: R.value, children: R.label }) })) })
11718
11720
  }
11719
11721
  ),
11720
11722
  !m && /* @__PURE__ */ k(ze, { children: [
11721
11723
  /* @__PURE__ */ i(
11722
- Pe,
11724
+ Me,
11723
11725
  {
11724
11726
  onClick: v,
11725
11727
  disabled: s.length == a.length,
11726
11728
  children: "Check all"
11727
11729
  }
11728
11730
  ),
11729
- /* @__PURE__ */ i(Pe, { onClick: O, disabled: s.length === 0, children: "Uncheck all" })
11731
+ /* @__PURE__ */ i(Me, { onClick: O, disabled: s.length === 0, children: "Uncheck all" })
11730
11732
  ] })
11731
11733
  ] }) });
11732
- }, vf = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(bf, { ...e }) }), bf = (e) => {
11734
+ }, vf = (e) => /* @__PURE__ */ i(Fe, { ...e, children: /* @__PURE__ */ i(bf, { ...e }) }), bf = (e) => {
11733
11735
  const { value: t, ooui: n } = e;
11734
11736
  return /* @__PURE__ */ i(
11735
11737
  "div",
@@ -11750,7 +11752,7 @@ const gf = ct(pf), yf = (e) => {
11750
11752
  );
11751
11753
  }, Cf = (e) => {
11752
11754
  const { ooui: t } = e, { required: n } = t;
11753
- return /* @__PURE__ */ i(Ie, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Sf, { ...e }) });
11755
+ return /* @__PURE__ */ i(Fe, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Sf, { ...e }) });
11754
11756
  }, Sf = (e) => {
11755
11757
  const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, direction: a } = t, c = Array.from(r.entries()), d = c && c.length && c.map((u) => {
11756
11758
  const [f, l] = u;
@@ -11759,13 +11761,13 @@ const gf = ct(pf), yf = (e) => {
11759
11761
  return /* @__PURE__ */ i(Pr.Group, { disabled: s, onChange: n, value: o, children: /* @__PURE__ */ i(ze, { direction: a, children: d }) });
11760
11762
  }, xf = (e) => {
11761
11763
  const { ooui: t } = e, { id: n, readOnly: o, required: r } = t;
11762
- return /* @__PURE__ */ i(Ie, { ...e, valuePropName: "checked", children: /* @__PURE__ */ i(Tf, { id: n, readOnly: o, required: r }) });
11764
+ return /* @__PURE__ */ i(Fe, { ...e, valuePropName: "checked", children: /* @__PURE__ */ i(Tf, { id: n, readOnly: o, required: r }) });
11763
11765
  }, Tf = (e) => {
11764
11766
  const { required: t, readOnly: n, ...o } = e;
11765
11767
  return /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(Zi, { disabled: n, ...o }) });
11766
11768
  }, Ff = (e) => {
11767
11769
  const { ooui: t } = e, { required: n } = t;
11768
- return /* @__PURE__ */ i(Ie, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(If, { ...e }) });
11770
+ return /* @__PURE__ */ i(Fe, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(If, { ...e }) });
11769
11771
  }, If = (e) => {
11770
11772
  const { ooui: t, value: n } = e, { selectionValues: o, errorField: r } = t, s = te(He), a = Array.from(o.entries()), c = a.map((f) => f[0]).indexOf(n);
11771
11773
  let d = "process", u = "";
@@ -11778,7 +11780,7 @@ const gf = ct(pf), yf = (e) => {
11778
11780
  )) });
11779
11781
  }, Of = (e) => {
11780
11782
  const { ooui: t } = e, { lang: n, height: o, readOnly: r } = t, s = te(He), { elementHasLostFocus: a } = s || {};
11781
- return /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(
11783
+ return /* @__PURE__ */ i(Fe, { ...e, children: /* @__PURE__ */ i(
11782
11784
  ta,
11783
11785
  {
11784
11786
  options: {
@@ -11806,7 +11808,7 @@ function _f({ text: e }) {
11806
11808
  ] }, o)) });
11807
11809
  }
11808
11810
  const Df = (e) => {
11809
- const { data: t, style: n } = e, { t: o } = pe();
11811
+ const { data: t, style: n } = e, { t: o } = ge();
11810
11812
  return /* @__PURE__ */ k(ir, { style: { ...n, textAlign: "start" }, children: [
11811
11813
  /* @__PURE__ */ i(
11812
11814
  Rf,
@@ -11837,7 +11839,7 @@ const Df = (e) => {
11837
11839
  };
11838
11840
  });
11839
11841
  return /* @__PURE__ */ i(Kn, { mode: "alternate", items: n });
11840
- }, kf = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(Ef, {}) }), Mf = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(Os, {}) }), Pf = (e) => {
11842
+ }, kf = (e) => /* @__PURE__ */ i(Fe, { ...e, children: /* @__PURE__ */ i(Ef, {}) }), Mf = (e) => /* @__PURE__ */ i(Fe, { ...e, children: /* @__PURE__ */ i(Os, {}) }), Pf = (e) => {
11841
11843
  const { ooui: t } = e, { title: n, text: o, alertType: r, icon: s } = t;
11842
11844
  function a(c) {
11843
11845
  if (c) {
@@ -11857,18 +11859,18 @@ const Df = (e) => {
11857
11859
  );
11858
11860
  }, { Content: Nf } = yo, { Title: Lf } = Tt;
11859
11861
  function $f() {
11860
- const { t: e } = pe();
11862
+ const { t: e } = ge();
11861
11863
  return /* @__PURE__ */ i(Nf, { className: "m-5 select-none", children: /* @__PURE__ */ i(Lf, { level: 5, children: e("welcome") }) });
11862
11864
  }
11863
11865
  function Hf(e, t) {
11864
- const { children: n } = e, [o, r] = C("welcome"), { t: s } = pe(), { globalValues: a, rootContext: c } = Sr(), [d, u] = C([
11866
+ const { children: n } = e, [o, r] = C("welcome"), { t: s } = ge(), { globalValues: a, rootContext: c } = Sr(), [d, u] = C([
11865
11867
  {
11866
11868
  title: s("welcome"),
11867
11869
  key: "welcome",
11868
11870
  closable: !0,
11869
11871
  content: /* @__PURE__ */ i($f, {})
11870
11872
  }
11871
- ]), f = Q(/* @__PURE__ */ new Map()), l = Q();
11873
+ ]), f = Z(/* @__PURE__ */ new Map()), l = Z();
11872
11874
  lt(t, () => ({
11873
11875
  retrieveAndOpenAction: m,
11874
11876
  openShortcut: y
@@ -11911,14 +11913,14 @@ function Hf(e, t) {
11911
11913
  values: a,
11912
11914
  context: { ...c, ...E }
11913
11915
  }) : [], {
11914
- res_model: L,
11915
- views: N,
11916
+ res_model: N,
11917
+ views: L,
11916
11918
  name: B,
11917
11919
  target: P,
11918
- view_type: X,
11920
+ view_type: J,
11919
11921
  limit: Y
11920
- } = A, ee = X === "tree", ce = [];
11921
- for (const H of N) {
11922
+ } = A, ee = J === "tree", ce = [];
11923
+ for (const H of L) {
11922
11924
  const [F, W] = H;
11923
11925
  if (F)
11924
11926
  ce.push(H);
@@ -11926,7 +11928,7 @@ function Hf(e, t) {
11926
11928
  ce.push([void 0, "dashboard"]);
11927
11929
  else {
11928
11930
  const { view_id: G } = await M.getHandler().getView({
11929
- model: L,
11931
+ model: N,
11930
11932
  type: W,
11931
11933
  id: F,
11932
11934
  context: { ...c, ...E }
@@ -11934,24 +11936,24 @@ function Hf(e, t) {
11934
11936
  ce.push([G, W]);
11935
11937
  }
11936
11938
  }
11937
- let le;
11939
+ let de;
11938
11940
  if (x) {
11939
11941
  const [H, F] = ce.find(
11940
11942
  ([W, G]) => G === x
11941
11943
  );
11942
- le = { id: H, type: F };
11944
+ de = { id: H, type: F };
11943
11945
  } else {
11944
11946
  const [H, F] = ce[0];
11945
- le = { id: H, type: F };
11947
+ de = { id: H, type: F };
11946
11948
  }
11947
11949
  I({
11948
11950
  domain: [...K, ...T],
11949
11951
  context: { ...c, ...E },
11950
- model: L,
11952
+ model: N,
11951
11953
  views: ce,
11952
11954
  title: B,
11953
11955
  target: P,
11954
- initialView: le,
11956
+ initialView: de,
11955
11957
  action_type: V,
11956
11958
  action_id: D,
11957
11959
  values: v,
@@ -11994,11 +11996,11 @@ function Hf(e, t) {
11994
11996
  target: D,
11995
11997
  string: E,
11996
11998
  limit: K
11997
- } = b, [L, N] = _[0], B = { id: L, type: N }, P = Rt({
11999
+ } = b, [N, L] = _[0], B = { id: N, type: L }, P = Rt({
11998
12000
  context: A,
11999
12001
  values: { ...O, ...a },
12000
12002
  fields: v
12001
- }), X = V ? await M.getHandler().evalDomain({
12003
+ }), J = V ? await M.getHandler().evalDomain({
12002
12004
  domain: V,
12003
12005
  values: _t({
12004
12006
  fields: v,
@@ -12012,7 +12014,7 @@ function Hf(e, t) {
12012
12014
  target: D,
12013
12015
  views: _,
12014
12016
  context: { ...c, ...P },
12015
- domain: X,
12017
+ domain: J,
12016
12018
  title: E,
12017
12019
  initialView: B,
12018
12020
  action_id: x,
@@ -12041,48 +12043,48 @@ function Hf(e, t) {
12041
12043
  context: { ...c, ...D }
12042
12044
  }) : [], {
12043
12045
  res_model: K,
12044
- views: L,
12045
- name: N,
12046
+ views: N,
12047
+ name: L,
12046
12048
  target: B,
12047
12049
  view_type: P,
12048
- limit: X
12050
+ limit: J
12049
12051
  } = _, Y = P === "tree", ee = [];
12050
- for (const F of L) {
12052
+ for (const F of N) {
12051
12053
  const [W, G] = F;
12052
12054
  if (W)
12053
12055
  ee.push(F);
12054
12056
  else if (G === "dashboard")
12055
12057
  ee.push([void 0, "dashboard"]);
12056
12058
  else {
12057
- const { view_id: me } = await M.getHandler().getView({
12059
+ const { view_id: pe } = await M.getHandler().getView({
12058
12060
  model: K,
12059
12061
  type: G,
12060
12062
  id: W,
12061
12063
  context: { ...c, ...D }
12062
12064
  });
12063
- ee.push([me, G]);
12065
+ ee.push([pe, G]);
12064
12066
  }
12065
12067
  }
12066
- let ce, le;
12068
+ let ce, de;
12067
12069
  if (R == null) {
12068
12070
  const F = ee.find((W) => W[0] === void 0);
12069
- ce = void 0, le = F[1];
12071
+ ce = void 0, de = F[1];
12070
12072
  } else
12071
- [ce, le] = ee.find((F) => F[0] === void 0 ? !1 : F[0] === R);
12072
- const H = { id: ce, type: le };
12073
+ [ce, de] = ee.find((F) => F[0] === void 0 ? !1 : F[0] === R);
12074
+ const H = { id: ce, type: de };
12073
12075
  I({
12074
12076
  domain: E,
12075
12077
  context: { ...c, ...D },
12076
12078
  model: K,
12077
12079
  views: ee,
12078
- title: N,
12080
+ title: L,
12079
12081
  target: B,
12080
12082
  initialView: H,
12081
12083
  action_id: v,
12082
12084
  action_type: O,
12083
12085
  res_id: x,
12084
12086
  treeExpandable: Y,
12085
- limit: T && (X === 0 || X === !1) ? Vt : X
12087
+ limit: T && (J === 0 || J === !1) ? Vt : J
12086
12088
  });
12087
12089
  }
12088
12090
  async function S({
@@ -12116,8 +12118,8 @@ function Hf(e, t) {
12116
12118
  res_id: D,
12117
12119
  values: E,
12118
12120
  forced_values: K,
12119
- treeExpandable: L = !1,
12120
- limit: N
12121
+ treeExpandable: N = !1,
12122
+ limit: L
12121
12123
  }) {
12122
12124
  const B = vr();
12123
12125
  if (T !== "current") {
@@ -12163,8 +12165,8 @@ function Hf(e, t) {
12163
12165
  res_id: D,
12164
12166
  formDefaultValues: E,
12165
12167
  formForcedValues: K,
12166
- treeExpandable: L,
12167
- limit: N
12168
+ treeExpandable: N,
12169
+ limit: L
12168
12170
  }
12169
12171
  ),
12170
12172
  key: B
@@ -12308,7 +12310,7 @@ const { useToken: Uf } = We, Km = (e) => {
12308
12310
  onAddFavourite: o,
12309
12311
  onRemoveFavourite: r,
12310
12312
  onDropdownClosed: s
12311
- } = e, [a, c] = C(!1), [d, u] = C(), { t: f } = pe(), { token: l } = Uf(), h = Q(null), p = te(
12313
+ } = e, [a, c] = C(!1), [d, u] = C(), { t: f } = ge(), { token: l } = Uf(), h = Z(null), p = te(
12312
12314
  ft
12313
12315
  ), {
12314
12316
  openShortcut: m,
@@ -12377,7 +12379,7 @@ const { useToken: Uf } = We, Km = (e) => {
12377
12379
  else {
12378
12380
  if (!y)
12379
12381
  return;
12380
- const V = g.find((L) => L.key === w), { id: _, type: D } = (V == null ? void 0 : V.action) || {}, E = y.view_id;
12382
+ const V = g.find((N) => N.key === w), { id: _, type: D } = (V == null ? void 0 : V.action) || {}, E = y.view_id;
12381
12383
  let K = !1;
12382
12384
  if (!_ || !D) {
12383
12385
  c(!1);