@gisce/react-ooui 2.6.3 → 2.6.4-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,11 +2,11 @@ var ri = Object.defineProperty;
2
2
  var oi = (e, t, n) => t in e ? ri(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var cr = (e, t, n) => (oi(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { jsxs as D, jsx as r, Fragment as ee } from "react/jsx-runtime";
5
- import rt, { useContext as re, useState as v, useEffect as me, useRef as le, createContext as ii, forwardRef as ht, useImperativeHandle as pt, useCallback as de, Fragment as Mr, useMemo as _e, memo as $n } from "react";
6
- import { Tooltip as wt, theme as Be, Typography as kt, Form as lt, Row as Oe, Col as he, Modal as Je, Button as Pe, Dropdown as si, Menu as dr, Spin as $e, Divider as cn, Space as Ue, Input as it, Select as Tt, Checkbox as Bt, Alert as Ze, Timeline as In, Statistic as ai, Card as Hn, Tag as Nr, message as Tn, DatePicker as Bn, TimePicker as li, InputNumber as Lr, Progress as ci, Avatar as $r, Pagination as di, Badge as ui, Tabs as Hr, Radio as ur, Switch as fi, Steps as fr, Layout as mi } from "antd";
5
+ import rt, { useContext as re, useState as v, useEffect as me, useRef as le, createContext as ii, forwardRef as ht, useImperativeHandle as pt, useCallback as de, Fragment as Mr, useMemo as Oe, memo as $n } from "react";
6
+ import { Tooltip as wt, theme as Be, Typography as kt, Form as lt, Row as _e, Col as he, Modal as Je, Button as Pe, Dropdown as si, Menu as dr, Spin as $e, Divider as cn, Space as Ue, Input as it, Select as Tt, Checkbox as Bt, Alert as Ze, Timeline as In, Statistic as ai, Card as Hn, Tag as Nr, message as Tn, DatePicker as Bn, TimePicker as li, InputNumber as Lr, Progress as ci, Avatar as $r, Pagination as di, Badge as ui, Tabs as Hr, Radio as ur, Switch as fi, Steps as fr, Layout as mi } from "antd";
7
7
  import { Label as Pt, Field as Vn, Tree as Br, Reference as hi, Selection as Kn, Many2one as Kr, Boolean as pi, Container as gi, parseContext as xt, Form as Wr, Integer as An, SearchFieldTypes as yt, SearchFilter as yi, parseContextFields as wi, parseDomainFields as vi, transformDomainForChildWidget as jr, graphProcessor as Ur, parseGraph as Wn, graphFieldUtils as bi } from "@gisce/ooui";
8
8
  import * as mr from "@ant-design/icons";
9
- import Gr, { QuestionCircleOutlined as Yr, ExclamationCircleOutlined as vt, LoadingOutlined as gt, DownOutlined as dn, WarningOutlined as qr, CloseOutlined as Ut, CheckOutlined as Gt, TranslationOutlined as zr, FolderOpenOutlined as jn, DownloadOutlined as Un, ClearOutlined as Gn, StarFilled as Ci, StarOutlined as xi, UpOutlined as Si, SearchOutlined as Yn, ThunderboltOutlined as qn, PrinterOutlined as zn, EnterOutlined as Jr, PlusSquareOutlined as Ti, MinusSquareOutlined as Fi, FileAddOutlined as un, AlignLeftOutlined as Ri, ApiOutlined as _i, DeleteOutlined as Jn, LeftOutlined as Xr, RightOutlined as Qr, EyeOutlined as Oi, FormOutlined as Kt, TableOutlined as Xn, AreaChartOutlined as Ii, CalendarOutlined as Vi, LinkOutlined as hr, SaveOutlined as Ai, CopyOutlined as Qn, InfoCircleOutlined as Zr, ReloadOutlined as fn, EditOutlined as eo, FilterOutlined as to, CloseCircleFilled as Di, BorderOuterOutlined as Ei, SettingOutlined as ki, ExportOutlined as Pi } from "@ant-design/icons";
9
+ import Gr, { QuestionCircleOutlined as Yr, ExclamationCircleOutlined as vt, LoadingOutlined as gt, DownOutlined as dn, WarningOutlined as qr, CloseOutlined as Ut, CheckOutlined as Gt, TranslationOutlined as zr, FolderOpenOutlined as jn, DownloadOutlined as Un, ClearOutlined as Gn, StarFilled as Ci, StarOutlined as xi, UpOutlined as Si, SearchOutlined as Yn, ThunderboltOutlined as qn, PrinterOutlined as zn, EnterOutlined as Jr, PlusSquareOutlined as Ti, MinusSquareOutlined as Fi, FileAddOutlined as un, AlignLeftOutlined as Ri, ApiOutlined as Oi, DeleteOutlined as Jn, LeftOutlined as Xr, RightOutlined as Qr, EyeOutlined as _i, FormOutlined as Kt, TableOutlined as Xn, AreaChartOutlined as Ii, CalendarOutlined as Vi, LinkOutlined as hr, SaveOutlined as Ai, CopyOutlined as Qn, InfoCircleOutlined as Zr, ReloadOutlined as fn, EditOutlined as eo, FilterOutlined as to, CloseCircleFilled as Di, BorderOuterOutlined as Ei, SettingOutlined as ki, ExportOutlined as Pi } from "@ant-design/icons";
10
10
  import { Interweave as Zn } from "interweave";
11
11
  import { useLocale as ge, Many2OneSuffix as Mi, Many2OneSuffixModal as pr, FieldSet as Ni, ExportModal as Li, Dropdown as no, DropdownButton as Vt, FormigaConfigProvider as $i, mergeStrings as Hi, HTMLPreview as Bi, FavouriteButton as Ki } from "@gisce/react-formiga-components";
12
12
  import * as gr from "@tabler/icons-react";
@@ -110,7 +110,7 @@ function be({
110
110
  align: s
111
111
  }
112
112
  );
113
- return n === "horizontal" ? (() => /* @__PURE__ */ D(Oe, { align: "middle", className: "pb-1 pt-1", children: [
113
+ return n === "horizontal" ? (() => /* @__PURE__ */ D(_e, { align: "middle", className: "pb-1 pt-1", children: [
114
114
  /* @__PURE__ */ r(he, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children: g }) }),
115
115
  /* @__PURE__ */ r(he, { flex: "auto", children: h() })
116
116
  ] }))() : (() => /* @__PURE__ */ D(ee, { children: [
@@ -512,9 +512,9 @@ const io = (e) => {
512
512
  message: t,
513
513
  title: i
514
514
  };
515
- }, { error: _s, warning: Os } = Je, Qe = (e) => {
515
+ }, { error: Os, warning: _s } = Je, Qe = (e) => {
516
516
  const { message: t, type: n, title: i } = io(e);
517
- (n === "error" ? _s : Os)({
517
+ (n === "error" ? Os : _s)({
518
518
  title: i,
519
519
  icon: n === "error" ? /* @__PURE__ */ r(vt, {}) : /* @__PURE__ */ r(qr, {}),
520
520
  centered: !0,
@@ -540,37 +540,37 @@ const io = (e) => {
540
540
  params: [["translatable", "=", "1"]],
541
541
  fieldsToRetrieve: ["code", "name"],
542
542
  model: "res.lang"
543
- })).map((O) => ({
544
- code: O.code,
545
- name: O.name
543
+ })).map((_) => ({
544
+ code: _.code,
545
+ name: _.name
546
546
  }));
547
547
  return f == null || f(T), T;
548
548
  }
549
549
  async function S(F) {
550
550
  const T = {};
551
- for (const O of F) {
551
+ for (const _ of F) {
552
552
  const C = (await P.getHandler().readObjects({
553
553
  model: i,
554
554
  ids: [o],
555
555
  fieldsToRetrieve: [s],
556
- context: { lang: O.code }
556
+ context: { lang: _.code }
557
557
  }))[0];
558
- T[O.code] = C[s] || "";
558
+ T[_.code] = C[s] || "";
559
559
  }
560
560
  w.current = T, y(T);
561
561
  }
562
562
  function R() {
563
- return u.map((F, T) => /* @__PURE__ */ D(Oe, { style: { paddingBottom: 20 }, children: [
563
+ return u.map((F, T) => /* @__PURE__ */ D(_e, { style: { paddingBottom: 20 }, children: [
564
564
  /* @__PURE__ */ r(he, { flex: "8rem", style: { paddingRight: 10 }, children: F.name }),
565
565
  /* @__PURE__ */ r(he, { flex: "auto", children: /* @__PURE__ */ r(
566
566
  Wi,
567
567
  {
568
568
  rows: 4,
569
569
  value: g[F.code] || "",
570
- onChange: (O) => {
570
+ onChange: (_) => {
571
571
  y({
572
572
  ...g,
573
- [F.code]: O.target.value
573
+ [F.code]: _.target.value
574
574
  });
575
575
  },
576
576
  disabled: p
@@ -600,7 +600,7 @@ const io = (e) => {
600
600
  return c ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ D(ee, { children: [
601
601
  R(),
602
602
  /* @__PURE__ */ r(cn, {}),
603
- /* @__PURE__ */ r(Oe, { justify: "end", children: /* @__PURE__ */ D(Ue, { children: [
603
+ /* @__PURE__ */ r(_e, { justify: "end", children: /* @__PURE__ */ D(Ue, { children: [
604
604
  /* @__PURE__ */ r(
605
605
  Pe,
606
606
  {
@@ -724,7 +724,7 @@ const { info: Is } = Je, mt = (e) => {
724
724
  }
725
725
  }
726
726
  )
727
- ] }) : /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ D(Oe, { gutter: 8, wrap: !1, children: [
727
+ ] }) : /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ D(_e, { gutter: 8, wrap: !1, children: [
728
728
  /* @__PURE__ */ r(he, { flex: "auto", children: /* @__PURE__ */ r(
729
729
  it,
730
730
  {
@@ -832,7 +832,7 @@ const Ws = (e) => {
832
832
  l(void 0);
833
833
  }
834
834
  return /* @__PURE__ */ D(ee, { children: [
835
- /* @__PURE__ */ D(Oe, { gutter: 8, wrap: !1, justify: "center", children: [
835
+ /* @__PURE__ */ D(_e, { gutter: 8, wrap: !1, justify: "center", children: [
836
836
  n && /* @__PURE__ */ r(
837
837
  "img",
838
838
  {
@@ -852,7 +852,7 @@ const Ws = (e) => {
852
852
  }
853
853
  )
854
854
  ] }),
855
- /* @__PURE__ */ r(Oe, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ D(Ue, { children: [
855
+ /* @__PURE__ */ r(_e, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ D(Ue, { children: [
856
856
  /* @__PURE__ */ r(
857
857
  ze,
858
858
  {
@@ -1120,7 +1120,7 @@ const nr = async (e) => {
1120
1120
  }
1121
1121
  return d ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: d, type: "error", banner: !0 }) : a ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ D(ee, { children: [
1122
1122
  /* @__PURE__ */ r(In, { style: { padding: "1rem" }, children: x.map((F, T) => {
1123
- var O, C;
1123
+ var _, C;
1124
1124
  return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ D(In.Item, { children: [
1125
1125
  /* @__PURE__ */ r(
1126
1126
  "div",
@@ -1129,11 +1129,11 @@ const nr = async (e) => {
1129
1129
  onClick: () => {
1130
1130
  p(
1131
1131
  x.find(
1132
- (_) => F.id === _.id
1132
+ (O) => F.id === O.id
1133
1133
  )
1134
1134
  ), c(!0);
1135
1135
  },
1136
- children: /* @__PURE__ */ r("strong", { children: (O = F.values) == null ? void 0 : O[b] })
1136
+ children: /* @__PURE__ */ r("strong", { children: (_ = F.values) == null ? void 0 : _[b] })
1137
1137
  }
1138
1138
  ),
1139
1139
  /* @__PURE__ */ r("br", {}),
@@ -1144,7 +1144,7 @@ const nr = async (e) => {
1144
1144
  onClick: () => {
1145
1145
  p(
1146
1146
  x.find(
1147
- (_) => F.id === _.id
1147
+ (O) => F.id === O.id
1148
1148
  )
1149
1149
  ), c(!0);
1150
1150
  },
@@ -1217,7 +1217,7 @@ const nr = async (e) => {
1217
1217
  } else
1218
1218
  n[i] = e[i];
1219
1219
  }), n;
1220
- }, Ot = (e, t) => oa(e, t), Fn = ({
1220
+ }, _t = (e, t) => oa(e, t), Fn = ({
1221
1221
  source: e,
1222
1222
  target: t,
1223
1223
  fields: n
@@ -1385,9 +1385,9 @@ const Nt = ({
1385
1385
  fieldsToRetrieve: [g],
1386
1386
  context: { ...w == null ? void 0 : w(), ...p }
1387
1387
  })).map((T) => {
1388
- const O = T[g];
1389
- let C = O;
1390
- return Array.isArray(O) && (C = O[1]), { label: C, value: T.id };
1388
+ const _ = T[g];
1389
+ let C = _;
1390
+ return Array.isArray(_) && (C = _[1]), { label: C, value: T.id };
1391
1391
  });
1392
1392
  l(F);
1393
1393
  } catch (V) {
@@ -1405,14 +1405,14 @@ const Nt = ({
1405
1405
  V.push({ id: T, operation: "pendingLink" });
1406
1406
  }), b(V);
1407
1407
  }, R = (I) => {
1408
- const { label: V, closable: F, onClose: T } = I, O = (_) => {
1409
- _.preventDefault(), _.stopPropagation();
1408
+ const { label: V, closable: F, onClose: T } = I, _ = (O) => {
1409
+ O.preventDefault(), O.stopPropagation();
1410
1410
  }, C = Wt(V);
1411
1411
  return /* @__PURE__ */ r(
1412
1412
  rr,
1413
1413
  {
1414
1414
  color: C,
1415
- onMouseDown: O,
1415
+ onMouseDown: _,
1416
1416
  closable: F,
1417
1417
  onClose: T,
1418
1418
  closeIcon: /* @__PURE__ */ r("span", { style: { color: C }, children: "X" }),
@@ -1671,7 +1671,7 @@ const Nt = ({
1671
1671
  setSearchTreeNameSearch: V,
1672
1672
  goToResourceId: F,
1673
1673
  limit: T
1674
- } = e, [O, C] = v(!1), [_, A] = v(!1), [N, j] = v(!1), [H, U] = v(!0), [k, Y] = v(!0), [q, Q] = v([]), [ne, B] = v(!1), [E, K] = v([]), [L, ce] = v(!1), [J, te] = v(!0), [ve, z] = v(), [ie, Se] = v({}), [Ee, ke] = v(
1674
+ } = e, [_, C] = v(!1), [O, A] = v(!1), [N, j] = v(!1), [H, U] = v(!0), [k, Y] = v(!0), [q, Q] = v([]), [ne, B] = v(!1), [E, K] = v([]), [L, ce] = v(!1), [J, te] = v(!0), [ve, z] = v(), [ie, Se] = v({}), [Ee, ke] = v(
1675
1675
  T !== void 0 ? T : St
1676
1676
  ), [Me, ue] = v(i);
1677
1677
  me(() => {
@@ -1703,9 +1703,9 @@ const Nt = ({
1703
1703
  currentView: n,
1704
1704
  setCurrentView: o,
1705
1705
  availableViews: s,
1706
- formIsSaving: O,
1706
+ formIsSaving: _,
1707
1707
  setFormIsSaving: C,
1708
- formHasChanges: _,
1708
+ formHasChanges: O,
1709
1709
  setFormHasChanges: A,
1710
1710
  formRef: a,
1711
1711
  searchTreeRef: l,
@@ -1754,7 +1754,7 @@ const Nt = ({
1754
1754
  children: t
1755
1755
  }
1756
1756
  );
1757
- }, dt = rt.createContext(null), _a = (e) => {
1757
+ }, dt = rt.createContext(null), Oa = (e) => {
1758
1758
  const {
1759
1759
  children: t,
1760
1760
  openAction: n,
@@ -1790,7 +1790,7 @@ const Nt = ({
1790
1790
  var t;
1791
1791
  for (let n = 0; n < e.length; n++)
1792
1792
  await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
1793
- }, Oa = (e, t) => {
1793
+ }, _a = (e, t) => {
1794
1794
  const { children: n, globalValues: i = {} } = e, o = le(), s = le(), [a, l] = v(!1), d = re(
1795
1795
  dt
1796
1796
  ), { openAction: u } = d || {}, f = le([]), { t: c } = ge();
@@ -1803,8 +1803,8 @@ const Nt = ({
1803
1803
  }
1804
1804
  );
1805
1805
  async function y(V) {
1806
- const { reportData: F, fields: T, values: O, context: C = {} } = V, {
1807
- context: _,
1806
+ const { reportData: F, fields: T, values: _, context: C = {} } = V, {
1807
+ context: O,
1808
1808
  model: A,
1809
1809
  datas: N = {},
1810
1810
  report_name: j,
@@ -1814,11 +1814,11 @@ const Nt = ({
1814
1814
  Qe(`${H} action not supported`);
1815
1815
  return;
1816
1816
  }
1817
- const { ids: U } = N || {}, k = U || [], Y = typeof _ == "string" ? xt({
1818
- context: _,
1817
+ const { ids: U } = N || {}, k = U || [], Y = typeof O == "string" ? xt({
1818
+ context: O,
1819
1819
  fields: T,
1820
- values: O
1821
- }) : _;
1820
+ values: _
1821
+ }) : O;
1822
1822
  try {
1823
1823
  const q = await P.getHandler().createReport({
1824
1824
  model: A,
@@ -1852,47 +1852,47 @@ const Nt = ({
1852
1852
  actionData: V,
1853
1853
  fields: F,
1854
1854
  values: T,
1855
- context: O,
1855
+ context: _,
1856
1856
  onRefreshParentValues: C
1857
1857
  }) {
1858
- const { type: _ } = V;
1859
- if (f.current.push(C), _ === "ir.actions.report.xml")
1858
+ const { type: O } = V;
1859
+ if (f.current.push(C), O === "ir.actions.report.xml")
1860
1860
  return await y({
1861
1861
  reportData: V,
1862
1862
  fields: F,
1863
1863
  values: T,
1864
- context: O
1864
+ context: _
1865
1865
  });
1866
- if (_ === "ir.actions.act_window")
1867
- return await x({ actionData: V, fields: F, values: T, context: O });
1868
- if (_ === "ir.actions.act_url")
1866
+ if (O === "ir.actions.act_window")
1867
+ return await x({ actionData: V, fields: F, values: T, context: _ });
1868
+ if (O === "ir.actions.act_url")
1869
1869
  window.open(
1870
- ca(V.url, { ...T, context: O }),
1870
+ ca(V.url, { ...T, context: _ }),
1871
1871
  "_blank"
1872
1872
  );
1873
1873
  else
1874
- return Qe(`${_} action not supported`), {};
1874
+ return Qe(`${O} action not supported`), {};
1875
1875
  }
1876
1876
  async function x({
1877
1877
  actionData: V,
1878
1878
  fields: F = {},
1879
1879
  values: T = {},
1880
- context: O = {}
1880
+ context: _ = {}
1881
1881
  }) {
1882
1882
  var j;
1883
1883
  let C = V;
1884
1884
  V.res_model || (C = (await P.getHandler().readObjects({
1885
1885
  model: "ir.actions.act_window",
1886
1886
  ids: [parseInt(V.id)],
1887
- context: O
1887
+ context: _
1888
1888
  }))[0]);
1889
- const _ = typeof (C == null ? void 0 : C.context) == "string" ? xt({
1889
+ const O = typeof (C == null ? void 0 : C.context) == "string" ? xt({
1890
1890
  context: C.context,
1891
1891
  fields: F,
1892
1892
  values: { ...T, ...i }
1893
1893
  }) : C.context, A = {
1894
- ...O,
1895
- ..._
1894
+ ..._,
1895
+ ...O
1896
1896
  };
1897
1897
  let N = [];
1898
1898
  if (C.domain && (N = await P.getHandler().evalDomain({
@@ -1940,16 +1940,16 @@ const Nt = ({
1940
1940
  domain: V,
1941
1941
  model: F,
1942
1942
  formView: T,
1943
- context: O,
1943
+ context: _,
1944
1944
  actionData: C
1945
1945
  }) {
1946
- m ? R({ domain: V, model: F, formView: T, context: O, actionData: C }) : (g({ domain: V, model: F, context: O, formView: T, actionData: C }), p(!0));
1946
+ m ? R({ domain: V, model: F, formView: T, context: _, actionData: C }) : (g({ domain: V, model: F, context: _, formView: T, actionData: C }), p(!0));
1947
1947
  }
1948
1948
  async function R({
1949
1949
  domain: V,
1950
1950
  model: F,
1951
1951
  formView: T,
1952
- context: O,
1952
+ context: _,
1953
1953
  actionData: C
1954
1954
  }) {
1955
1955
  g({
@@ -1958,7 +1958,7 @@ const Nt = ({
1958
1958
  context: {},
1959
1959
  formView: void 0,
1960
1960
  actionData: void 0
1961
- }), p(!1), await new Promise((_) => setTimeout(_, 300)), g({ domain: V, model: F, context: O, formView: T, actionData: C }), p(!0);
1961
+ }), p(!1), await new Promise((O) => setTimeout(O, 300)), g({ domain: V, model: F, context: _, formView: T, actionData: C }), p(!0);
1962
1962
  }
1963
1963
  async function I() {
1964
1964
  Fr(f.current), f.current = [], p(!1), g({
@@ -2067,7 +2067,7 @@ async function Ia({
2067
2067
  }
2068
2068
  return { views: s, initialView: a };
2069
2069
  }
2070
- const Va = ht(Oa), Aa = ({
2070
+ const Va = ht(_a), Aa = ({
2071
2071
  error: e,
2072
2072
  className: t
2073
2073
  }) => {
@@ -2113,7 +2113,7 @@ function Ea(e, t) {
2113
2113
  defaultValues: R,
2114
2114
  forcedValues: I = {},
2115
2115
  parentWidth: V
2116
- } = e, { t: F } = ge(), [T, O] = v(!1), [C, _] = v(), [A, N] = v(), [j] = lt.useForm(), [H, U] = v(), [k, Y] = v(), q = re(go), [Q, ne] = v(), [B, E] = v(!1), K = le(), L = le({}), ce = le({}), J = le(!1), te = le(!1), ve = le(!1), ie = (V !== void 0 ? V : Q) < Da, Se = re(He), { activeId: Ee, getPlainValues: ke } = Se || {}, Me = re(
2116
+ } = e, { t: F } = ge(), [T, _] = v(!1), [C, O] = v(), [A, N] = v(), [j] = lt.useForm(), [H, U] = v(), [k, Y] = v(), q = re(go), [Q, ne] = v(), [B, E] = v(!1), K = le(), L = le({}), ce = le({}), J = le(!1), te = le(!1), ve = le(!1), ie = (V !== void 0 ? V : Q) < Da, Se = re(He), { activeId: Ee, getPlainValues: ke } = Se || {}, Me = re(
2117
2117
  nt
2118
2118
  ), {
2119
2119
  setFormIsSaving: ue = void 0,
@@ -2138,7 +2138,7 @@ function Ea(e, t) {
2138
2138
  K.current = void 0, N(void 0), $t();
2139
2139
  }
2140
2140
  })), me(() => {
2141
- if (_(void 0), !(!n && !h)) {
2141
+ if (O(void 0), !(!n && !h)) {
2142
2142
  if (!x) {
2143
2143
  K.current = void 0, N(void 0);
2144
2144
  return;
@@ -2218,11 +2218,11 @@ function Ea(e, t) {
2218
2218
  })
2219
2219
  ).length !== 0, Ge = (M) => {
2220
2220
  const $ = j.getFieldsValue(!0);
2221
- return Ot($, M);
2221
+ return _t($, M);
2222
2222
  }, bt = (M, $) => {
2223
2223
  ut({
2224
2224
  values: {
2225
- ...Ot(j.getFieldsValue(!0), k),
2225
+ ..._t(j.getFieldsValue(!0), k),
2226
2226
  [M]: $
2227
2227
  },
2228
2228
  fields: k,
@@ -2237,7 +2237,7 @@ function Ea(e, t) {
2237
2237
  }
2238
2238
  }
2239
2239
  const $t = async () => {
2240
- _(void 0), ae == null || ae(!0);
2240
+ O(void 0), ae == null || ae(!0);
2241
2241
  let M;
2242
2242
  try {
2243
2243
  h ? M = { arch: h.arch, fields: h.fields } : M = await ot();
@@ -2247,14 +2247,14 @@ function Ea(e, t) {
2247
2247
  arch: X
2248
2248
  });
2249
2249
  } catch ($) {
2250
- _($ != null && $.message ? $.message + $.stack : $), ae == null || ae(!1);
2250
+ O($ != null && $.message ? $.message + $.stack : $), ae == null || ae(!1);
2251
2251
  }
2252
2252
  }, at = async (M) => {
2253
2253
  let $, X, Z, Ce;
2254
- ae == null || ae(!0), _(void 0), M != null && M.fields ? (X = M.fields, Z = M.arch) : (X = k, Z = H), p && (M == null ? void 0 : M.forceRefresh) !== !0 ? $ = p : { values: $, defaultGetCalled: Ce } = await Wo({
2254
+ ae == null || ae(!0), O(void 0), M != null && M.fields ? (X = M.fields, Z = M.arch) : (X = k, Z = H), p && (M == null ? void 0 : M.forceRefresh) !== !0 ? $ = p : { values: $, defaultGetCalled: Ce } = await Wo({
2255
2255
  fields: X,
2256
2256
  arch: Z
2257
- }), b && ($ = { ...aa(b), ...$ }), L.current = Ot($, X), ut({
2257
+ }), b && ($ = { ...aa(b), ...$ }), L.current = _t($, X), ut({
2258
2258
  values: $,
2259
2259
  fields: X,
2260
2260
  reset: !0,
@@ -2289,7 +2289,7 @@ function Ea(e, t) {
2289
2289
  reset: X,
2290
2290
  isDefaultGet: Z = !1
2291
2291
  }) => {
2292
- const Ye = { ...X ? {} : j.getFieldsValue(!0), ...M }, xn = Ot(Ye, $), ti = Object.keys($).map((Sn) => {
2292
+ const Ye = { ...X ? {} : j.getFieldsValue(!0), ...M }, xn = _t(Ye, $), ti = Object.keys($).map((Sn) => {
2293
2293
  const ni = xn[Sn] !== void 0 ? xn[Sn] : void 0;
2294
2294
  return {
2295
2295
  name: Sn,
@@ -2361,7 +2361,7 @@ function Ea(e, t) {
2361
2361
  }, Zt = async (M) => {
2362
2362
  let $ = !1;
2363
2363
  const { callOnSubmitSucceed: X = !0 } = M || {};
2364
- if (te.current = !0, _(void 0), ve.current && !tt() && se() && X) {
2364
+ if (te.current = !0, O(void 0), ve.current && !tt() && se() && X) {
2365
2365
  te.current = !1, Fe == null || Fe(!1), fe == null || fe(
2366
2366
  se(),
2367
2367
  De(),
@@ -2375,13 +2375,13 @@ function Ea(e, t) {
2375
2375
  return te.current = !1, Fe == null || Fe(!1), pe == null || pe(), { succeed: !0, id: se() };
2376
2376
  if (await Qt())
2377
2377
  return te.current = !1, Tr(F), { succeed: !1, id: se() };
2378
- O(!0), ue == null || ue(!0);
2378
+ _(!0), ue == null || ue(!0);
2379
2379
  try {
2380
2380
  m === "api" ? await ar(M) : await jo(M), c && (K.current = void 0, ut({ values: {}, fields: k, reset: !0 })), await at({ forceRefresh: !0 }), $ = !0, Tn.success(F("savedRegisters"));
2381
2381
  } catch (Z) {
2382
- te.current = !1, O(!1), ue == null || ue(!1), we == null || we(Z), Tn.error(F("errorWhileSavingForm")), _(Z != null && Z.message ? Z.message : Z);
2382
+ te.current = !1, _(!1), ue == null || ue(!1), we == null || we(Z), Tn.error(F("errorWhileSavingForm")), O(Z != null && Z.message ? Z.message : Z);
2383
2383
  } finally {
2384
- te.current = !1, ue == null || ue(!1), O(!1);
2384
+ te.current = !1, ue == null || ue(!1), _(!1);
2385
2385
  }
2386
2386
  return { succeed: $, id: se() };
2387
2387
  }, Ht = ({
@@ -2427,7 +2427,7 @@ function Ea(e, t) {
2427
2427
  "many2one"
2428
2428
  ]
2429
2429
  }) && M !== !0)) {
2430
- const Z = Ot(j.getFieldsValue(!0), k);
2430
+ const Z = _t(j.getFieldsValue(!0), k);
2431
2431
  ce.current = Z, d == null || d(Z), Fe == null || Fe(!0), Go(X);
2432
2432
  }
2433
2433
  }, Uo = ji(bn, 100), Go = async (M) => {
@@ -2641,7 +2641,7 @@ function Ea(e, t) {
2641
2641
  }
2642
2642
  ) }), ei = () => /* @__PURE__ */ D(ee, { children: [
2643
2643
  /* @__PURE__ */ r(cn, {}),
2644
- /* @__PURE__ */ r(Oe, { justify: "end", children: /* @__PURE__ */ D(Ue, { children: [
2644
+ /* @__PURE__ */ r(_e, { justify: "end", children: /* @__PURE__ */ D(Ue, { children: [
2645
2645
  /* @__PURE__ */ r(
2646
2646
  Pe,
2647
2647
  {
@@ -2713,18 +2713,18 @@ const zt = ht(Ea), Jt = (e) => {
2713
2713
  shortcut_id: g
2714
2714
  });
2715
2715
  else {
2716
- const { action_id: T, res_id: O, action_type: C, view_id: _ } = l;
2716
+ const { action_id: T, res_id: _, action_type: C, view_id: O } = l;
2717
2717
  await P.getHandler().addFavourite({
2718
2718
  action_id: T,
2719
2719
  action_type: C,
2720
- view_id: _,
2721
- res_id: O || !1
2720
+ view_id: O,
2721
+ res_id: _ || !1
2722
2722
  });
2723
2723
  }
2724
2724
  h(!p);
2725
2725
  }
2726
2726
  function V() {
2727
- return /* @__PURE__ */ D(Oe, { align: "middle", children: [
2727
+ return /* @__PURE__ */ D(_e, { align: "middle", children: [
2728
2728
  /* @__PURE__ */ r(he, { children: /* @__PURE__ */ r(
2729
2729
  Pe,
2730
2730
  {
@@ -2815,7 +2815,7 @@ const zt = ht(Ea), Jt = (e) => {
2815
2815
  align: "left"
2816
2816
  }
2817
2817
  ),
2818
- /* @__PURE__ */ D(Oe, { align: "bottom", className: "p-0", children: [
2818
+ /* @__PURE__ */ D(_e, { align: "bottom", className: "p-0", children: [
2819
2819
  /* @__PURE__ */ r(he, { className: "mr-2", children: /* @__PURE__ */ r(be, { ...e, ooui: s[0], showLabel: !1, children: /* @__PURE__ */ r(
2820
2820
  Bn.RangePicker,
2821
2821
  {
@@ -2917,7 +2917,7 @@ function $a(e) {
2917
2917
  align: "left"
2918
2918
  }
2919
2919
  ),
2920
- /* @__PURE__ */ D(Oe, { align: "bottom", className: "mt-0", wrap: !1, children: [
2920
+ /* @__PURE__ */ D(_e, { align: "bottom", className: "mt-0", wrap: !1, children: [
2921
2921
  /* @__PURE__ */ r(he, { children: l("#from") }),
2922
2922
  /* @__PURE__ */ r(he, { className: "pb-1", children: /* @__PURE__ */ r("span", { className: "pl-2 pr-2 h-full", children: " - " }) }),
2923
2923
  /* @__PURE__ */ r(he, { children: l("#to") })
@@ -2995,7 +2995,7 @@ function Ya(e) {
2995
2995
  }
2996
2996
  function qa(e) {
2997
2997
  const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: i, isSearching: o } = e, { t: s } = ge();
2998
- return /* @__PURE__ */ D(Oe, { children: [
2998
+ return /* @__PURE__ */ D(_e, { children: [
2999
2999
  /* @__PURE__ */ r(he, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ D("a", { className: "text-xs", onClick: t, children: [
3000
3000
  n ? /* @__PURE__ */ r(Si, { className: "pr-1" }) : /* @__PURE__ */ r(dn, { className: "pr-1" }),
3001
3001
  s(n ? "simple_search" : "advanced_search")
@@ -3019,7 +3019,7 @@ function qa(e) {
3019
3019
  function za(e) {
3020
3020
  const { onLimitChange: t } = e, { t: n } = ge(), i = new An({ name: "limit" }), o = new An({ name: "offset" });
3021
3021
  return /* @__PURE__ */ D("div", { className: "pl-2 pt-2", children: [
3022
- /* @__PURE__ */ r(Oe, { children: n("parameters") }, "count_params"),
3022
+ /* @__PURE__ */ r(_e, { children: n("parameters") }, "count_params"),
3023
3023
  /* @__PURE__ */ D(Ue, { align: "center", children: [
3024
3024
  n("limit") + " :",
3025
3025
  /* @__PURE__ */ r(
@@ -3132,31 +3132,31 @@ function wo(e) {
3132
3132
  const V = () => {
3133
3133
  if (!y)
3134
3134
  return;
3135
- const O = b ? y : h, C = O == null ? void 0 : O.rows;
3136
- return C == null ? void 0 : C.map((_, A) => /* @__PURE__ */ r(Oe, { children: _.map((N, j) => /* @__PURE__ */ r(he, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r(Ya, { field: N }) }, j)) }, A));
3135
+ const _ = b ? y : h, C = _ == null ? void 0 : _.rows;
3136
+ return C == null ? void 0 : C.map((O, A) => /* @__PURE__ */ r(_e, { children: O.map((N, j) => /* @__PURE__ */ r(he, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r(Ya, { field: N }) }, j)) }, A));
3137
3137
  };
3138
3138
  Ft(() => {
3139
3139
  x(!1), S.current = new yi(n, t), S.current.parse(), g(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3140
3140
  }, [t, n]);
3141
- const F = V(), T = (O) => {
3141
+ const F = V(), T = (_) => {
3142
3142
  var N;
3143
- const { limit: C, offset: _ } = O;
3144
- delete O.offset, delete O.limit;
3143
+ const { limit: C, offset: O } = _;
3144
+ delete _.offset, delete _.limit;
3145
3145
  const A = Ja(
3146
- O,
3146
+ _,
3147
3147
  (N = S.current) == null ? void 0 : N._advancedSearchContainer
3148
3148
  );
3149
- o({ params: A, offset: _, limit: C, searchValues: O });
3149
+ o({ params: A, offset: O, limit: C, searchValues: _ });
3150
3150
  };
3151
3151
  return /* @__PURE__ */ r(
3152
3152
  er,
3153
3153
  {
3154
3154
  bounds: !0,
3155
- onResize: (O) => {
3155
+ onResize: (_) => {
3156
3156
  var C;
3157
- f == null || f((C = O.bounds) == null ? void 0 : C.height);
3157
+ f == null || f((C = _.bounds) == null ? void 0 : C.height);
3158
3158
  },
3159
- children: ({ measureRef: O }) => /* @__PURE__ */ r("div", { ref: O, children: /* @__PURE__ */ D("div", { style: { display: u ? "block" : "none" }, children: [
3159
+ children: ({ measureRef: _ }) => /* @__PURE__ */ r("div", { ref: _, children: /* @__PURE__ */ D("div", { style: { display: u ? "block" : "none" }, children: [
3160
3160
  /* @__PURE__ */ D(
3161
3161
  lt,
3162
3162
  {
@@ -3198,7 +3198,7 @@ function wo(e) {
3198
3198
  }
3199
3199
  );
3200
3200
  }
3201
- const _r = (e, t = "14px -apple-system") => {
3201
+ const Or = (e, t = "14px -apple-system") => {
3202
3202
  const i = document.createElement("canvas").getContext("2d");
3203
3203
  i.font = t;
3204
3204
  const o = i.measureText(e);
@@ -3208,13 +3208,13 @@ const _r = (e, t = "14px -apple-system") => {
3208
3208
  return { columns: e };
3209
3209
  const i = e.map(
3210
3210
  (s) => Object.assign(s, {
3211
- width: _r(s.title)
3211
+ width: Or(s.title)
3212
3212
  })
3213
3213
  );
3214
3214
  t.map((s) => {
3215
3215
  i.map((a, l) => {
3216
3216
  const d = a.width, u = s[a.key] || "";
3217
- let f = _r(u);
3217
+ let f = Or(u);
3218
3218
  f < d && (f = d), f > n && (f = n), i[l].width = f;
3219
3219
  });
3220
3220
  });
@@ -3435,7 +3435,7 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3435
3435
  ids: [t],
3436
3436
  fieldsToRetrieve: S,
3437
3437
  context: i
3438
- })) == null ? void 0 : I[0] }), R = { ...Ot(R, S), active_id: t }, l(R), !(!x || !x.toolbar))
3438
+ })) == null ? void 0 : I[0] }), R = { ..._t(R, S), active_id: t }, l(R), !(!x || !x.toolbar))
3439
3439
  return {
3440
3440
  actionItems: x.toolbar.action,
3441
3441
  relateItems: x.toolbar.relate,
@@ -3588,7 +3588,7 @@ const pl = (e) => {
3588
3588
  );
3589
3589
  }, wl = ({
3590
3590
  value: e
3591
- }) => _e(
3591
+ }) => Oe(
3592
3592
  () => /* @__PURE__ */ r(
3593
3593
  "div",
3594
3594
  {
@@ -3601,7 +3601,7 @@ const pl = (e) => {
3601
3601
  }
3602
3602
  ),
3603
3603
  [e]
3604
- ), vl = ({ value: e }) => _e(() => /* @__PURE__ */ r(ml, { m2oField: e }), [e]), bl = ({ value: e }) => _e(
3604
+ ), vl = ({ value: e }) => Oe(() => /* @__PURE__ */ r(ml, { m2oField: e }), [e]), bl = ({ value: e }) => Oe(
3605
3605
  () => /* @__PURE__ */ r(
3606
3606
  Zn,
3607
3607
  {
@@ -3609,7 +3609,7 @@ const pl = (e) => {
3609
3609
  }
3610
3610
  ),
3611
3611
  [e]
3612
- ), Cl = ({ value: e }) => _e(() => {
3612
+ ), Cl = ({ value: e }) => Oe(() => {
3613
3613
  if (!e || e && e.length === 0)
3614
3614
  return /* @__PURE__ */ r(ee, {});
3615
3615
  const t = et(
@@ -3617,7 +3617,7 @@ const pl = (e) => {
3617
3617
  ft.date.dateInternalFormat
3618
3618
  ).format(ft.date.dateDisplayFormat);
3619
3619
  return /* @__PURE__ */ r(ee, { children: t });
3620
- }, [e]), xl = ({ value: e }) => _e(() => {
3620
+ }, [e]), xl = ({ value: e }) => Oe(() => {
3621
3621
  if (!e || e && e.length === 0)
3622
3622
  return /* @__PURE__ */ r(ee, {});
3623
3623
  const t = et(
@@ -3625,17 +3625,17 @@ const pl = (e) => {
3625
3625
  ft.time.dateInternalFormat
3626
3626
  ).format(ft.time.dateDisplayFormat);
3627
3627
  return /* @__PURE__ */ r(ee, { children: t });
3628
- }, [e]), Or = ({
3628
+ }, [e]), _r = ({
3629
3629
  value: e
3630
- }) => _e(() => {
3630
+ }) => Oe(() => {
3631
3631
  const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
3632
3632
  return /* @__PURE__ */ r(ee, { children: `( ${t} )` });
3633
3633
  }, [e]), Sl = ({
3634
3634
  value: e
3635
- }) => _e(() => /* @__PURE__ */ r(bo, { value: e }), [e]), Tl = ({ value: e }) => _e(() => /* @__PURE__ */ r(ee, { children: vo(e) }), [e]), Ir = ({ value: e }) => _e(
3635
+ }) => Oe(() => /* @__PURE__ */ r(bo, { value: e }), [e]), Tl = ({ value: e }) => Oe(() => /* @__PURE__ */ r(ee, { children: vo(e) }), [e]), Ir = ({ value: e }) => Oe(
3636
3636
  () => /* @__PURE__ */ r("div", { style: { textAlign: "right" }, children: e }),
3637
3637
  [e]
3638
- ), Fl = ({ value: e }) => _e(
3638
+ ), Fl = ({ value: e }) => Oe(
3639
3639
  () => /* @__PURE__ */ r(
3640
3640
  "img",
3641
3641
  {
@@ -3649,20 +3649,20 @@ const pl = (e) => {
3649
3649
  key: t,
3650
3650
  ooui: n,
3651
3651
  context: i
3652
- }) => _e(() => /* @__PURE__ */ r(po, { ooui: n, value: e }), [n, e]), _l = ({
3652
+ }) => Oe(() => /* @__PURE__ */ r(po, { ooui: n, value: e }), [n, e]), Ol = ({
3653
3653
  value: e,
3654
3654
  key: t,
3655
3655
  ooui: n,
3656
3656
  context: i
3657
- }) => _e(() => {
3657
+ }) => Oe(() => {
3658
3658
  let o = e;
3659
3659
  return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ r(ee, { children: n.selectionValues.get(o) });
3660
- }, [n, e]), Ol = ({
3660
+ }, [n, e]), _l = ({
3661
3661
  value: e,
3662
3662
  key: t,
3663
3663
  ooui: n,
3664
3664
  context: i
3665
- }) => _e(
3665
+ }) => Oe(
3666
3666
  () => /* @__PURE__ */ r(
3667
3667
  hl,
3668
3668
  {
@@ -3677,7 +3677,7 @@ const pl = (e) => {
3677
3677
  key: t,
3678
3678
  ooui: n,
3679
3679
  context: i
3680
- }) => _e(() => /* @__PURE__ */ r(pl, { ooui: n, value: e }), [n, e]), Vl = ({
3680
+ }) => Oe(() => /* @__PURE__ */ r(pl, { ooui: n, value: e }), [n, e]), Vl = ({
3681
3681
  value: e,
3682
3682
  key: t,
3683
3683
  ooui: n,
@@ -3707,14 +3707,14 @@ const pl = (e) => {
3707
3707
  me(() => {
3708
3708
  e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
3709
3709
  }, [e == null ? void 0 : e.items]);
3710
- const c = _e(
3710
+ const c = Oe(
3711
3711
  () => o.map((m) => {
3712
3712
  const { id: p, name: h } = m, g = Wt(h);
3713
3713
  return /* @__PURE__ */ r(rr, { color: g, children: h }, `${p}`);
3714
3714
  }),
3715
3715
  [o]
3716
3716
  );
3717
- return _e(() => a ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
3717
+ return Oe(() => a ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
3718
3718
  "div",
3719
3719
  {
3720
3720
  style: {
@@ -3729,16 +3729,16 @@ const pl = (e) => {
3729
3729
  boolean: wl,
3730
3730
  many2one: vl,
3731
3731
  text: bl,
3732
- one2many: Or,
3733
- many2many: Or,
3732
+ one2many: _r,
3733
+ many2many: _r,
3734
3734
  progressbar: Sl,
3735
3735
  float_time: Tl,
3736
3736
  image: Fl,
3737
3737
  integer: Ir,
3738
3738
  float: Ir,
3739
- reference: Ol,
3739
+ reference: _l,
3740
3740
  tag: Rl,
3741
- selection: _l,
3741
+ selection: Ol,
3742
3742
  date: Cl,
3743
3743
  datetime: xl,
3744
3744
  avatar: Il,
@@ -3769,18 +3769,18 @@ const pl = (e) => {
3769
3769
  context: R,
3770
3770
  readonly: I,
3771
3771
  onSelectAllRecords: V
3772
- } = e, F = le(null), [T, O] = v([]), C = le(!1), [_, A] = v(), { t: N } = ge(), j = le(i), H = re(
3772
+ } = e, F = le(null), [T, _] = v([]), C = le(!1), [O, A] = v(), { t: N } = ge(), j = le(i), H = re(
3773
3773
  nt
3774
- ), { title: U = void 0, setTitle: k = void 0 } = (S ? H : {}) || {}, Y = _e(() => {
3775
- if (_)
3774
+ ), { title: U = void 0, setTitle: k = void 0 } = (S ? H : {}) || {}, Y = Oe(() => {
3775
+ if (O)
3776
3776
  return qs(
3777
- _,
3777
+ O,
3778
3778
  {
3779
3779
  ...Al
3780
3780
  },
3781
3781
  R
3782
3782
  );
3783
- }, [R, _]);
3783
+ }, [R, O]);
3784
3784
  pt(t, () => ({
3785
3785
  unselectAll: () => {
3786
3786
  var J;
@@ -3790,21 +3790,21 @@ const pl = (e) => {
3790
3790
  const J = At(s);
3791
3791
  A(J), J.string && U !== J.string && (k == null || k(J.string));
3792
3792
  }, [s, U]), me(() => {
3793
- if (!_)
3793
+ if (!O)
3794
3794
  return;
3795
3795
  C.current = !1;
3796
- const J = fo(_, a);
3797
- O(J);
3796
+ const J = fo(O, a);
3797
+ _(J);
3798
3798
  }, [a]), me(() => {
3799
3799
  j.current = i;
3800
3800
  }, [i]);
3801
- const q = (n - 1) * j.current + 1, Q = q - 1 + T.length, ne = o === void 0 ? null : o === 0 ? N("no_results") : N("summary").replace("{from}", q == null ? void 0 : q.toString()).replace("{to}", Q == null ? void 0 : Q.toString()).replace("{total}", o == null ? void 0 : o.toString()), B = _e(() => {
3801
+ const q = (n - 1) * j.current + 1, Q = q - 1 + T.length, ne = o === void 0 ? null : o === 0 ? N("no_results") : N("summary").replace("{from}", q == null ? void 0 : q.toString()).replace("{to}", Q == null ? void 0 : Q.toString()).replace("{total}", o == null ? void 0 : o.toString()), B = Oe(() => {
3802
3802
  if (!f || s.isExpandable)
3803
3803
  return null;
3804
3804
  const J = T == null ? void 0 : T.filter(
3805
3805
  (te) => c && c.includes(te.id)
3806
3806
  ).length;
3807
- return d ? null : o === void 0 ? /* @__PURE__ */ r($e, { className: "pb-4" }) : /* @__PURE__ */ D(Oe, { align: "bottom", className: "pb-4", children: [
3807
+ return d ? null : o === void 0 ? /* @__PURE__ */ r($e, { className: "pb-4" }) : /* @__PURE__ */ D(_e, { align: "bottom", className: "pb-4", children: [
3808
3808
  /* @__PURE__ */ r(he, { span: V ? 8 : 12, children: /* @__PURE__ */ r(
3809
3809
  di,
3810
3810
  {
@@ -3838,10 +3838,10 @@ const pl = (e) => {
3838
3838
  ne,
3839
3839
  o,
3840
3840
  s.isExpandable
3841
- ]), E = _e(() => {
3842
- if (!_)
3841
+ ]), E = Oe(() => {
3842
+ if (!O)
3843
3843
  return null;
3844
- const J = _.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
3844
+ const J = O.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
3845
3845
  if (!J || J.length === 0)
3846
3846
  return null;
3847
3847
  const te = [], ve = (c == null ? void 0 : c.length) > 0 ? T.filter((z) => c.includes(z.id)) : T;
@@ -3849,11 +3849,11 @@ const pl = (e) => {
3849
3849
  const ie = ve.reduce((Se, Ee) => Ee[z.field] && !isNaN(Ee[z.field]) ? Se + Ee[z.field] : Se, 0);
3850
3850
  te.push(`${z.label}: ${Math.round(ie * 100) / 100}`);
3851
3851
  }), /* @__PURE__ */ r("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: te.join(", ") });
3852
- }, [T, c, _]), K = _e(() => {
3853
- if (_ !== null && Y && Y.length > 0)
3852
+ }, [T, c, O]), K = Oe(() => {
3853
+ if (O !== null && Y && Y.length > 0)
3854
3854
  return il(Y, T, 600);
3855
- }, [Y, T, _]), L = _e(() => p && (_ != null && _.columns.some((J) => J.sum !== void 0)) ? p - 30 : p, [p, _ == null ? void 0 : _.columns]);
3856
- return _ === null || !K || ((ce = K == null ? void 0 : K.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ r($e, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(ro, { children: [
3855
+ }, [Y, T, O]), L = Oe(() => p && (O != null && O.columns.some((J) => J.sum !== void 0)) ? p - 30 : p, [p, O == null ? void 0 : O.columns]);
3856
+ return O === null || !K || ((ce = K == null ? void 0 : K.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ r($e, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(ro, { children: [
3857
3857
  B,
3858
3858
  /* @__PURE__ */ r(
3859
3859
  ns,
@@ -3918,7 +3918,7 @@ const So = (e) => {
3918
3918
  searchParams: I = [],
3919
3919
  setSearchValues: V,
3920
3920
  clearSelection: F
3921
- } = e, [T, O] = v(!1), [C, _] = v(!1), [A, N] = v(), [j, H] = v(1), [U, k] = v(0), [Y, q] = v(), [Q, ne] = v([]), [B, E] = v(void 0), [K, L] = v(void 0), ce = le(S || St), J = le([]), te = de(
3921
+ } = e, [T, _] = v(!1), [C, O] = v(!1), [A, N] = v(), [j, H] = v(1), [U, k] = v(0), [Y, q] = v(), [Q, ne] = v([]), [B, E] = v(void 0), [K, L] = v(void 0), ce = le(S || St), J = le([]), te = de(
3922
3922
  (ae) => {
3923
3923
  y == null || y([...ae]), ne([...ae]);
3924
3924
  },
@@ -3951,7 +3951,7 @@ const So = (e) => {
3951
3951
  te(pe), fe.length > 0 ? g == null || g(0) : g == null || g(void 0);
3952
3952
  } else
3953
3953
  te([]), g == null || g(void 0);
3954
- O(!1), d.current = !0;
3954
+ _(!1), d.current = !0;
3955
3955
  }, [
3956
3956
  te,
3957
3957
  d,
@@ -3990,7 +3990,7 @@ const So = (e) => {
3990
3990
  De === -1 ? g == null || g(0) : g == null || g(De);
3991
3991
  } else
3992
3992
  g == null || g(void 0);
3993
- O(!1);
3993
+ _(!1);
3994
3994
  const We = await fe;
3995
3995
  q(We), f == null || f(We);
3996
3996
  },
@@ -4012,11 +4012,11 @@ const So = (e) => {
4012
4012
  ), Se = de(
4013
4013
  async (ae) => {
4014
4014
  try {
4015
- O(!0), a == null || a(!0), l && !d.current ? await z() : await ie(ae), F == null || F();
4015
+ _(!0), a == null || a(!0), l && !d.current ? await z() : await ie(ae), F == null || F();
4016
4016
  } catch (Ie) {
4017
- N(typeof Ie == "string" ? Ie : Ie.message), O(!1);
4017
+ N(typeof Ie == "string" ? Ie : Ie.message), _(!1);
4018
4018
  } finally {
4019
- i == null || i([]), _(!1), a == null || a(!1);
4019
+ i == null || i([]), O(!1), a == null || a(!1);
4020
4020
  }
4021
4021
  },
4022
4022
  [
@@ -4051,7 +4051,7 @@ const So = (e) => {
4051
4051
  ), ke = de(
4052
4052
  (ae) => {
4053
4053
  const { params: Ie, searchValues: je, limit: Ke, offset: W } = ae;
4054
- T || (n == null || n(void 0), i == null || i([]), V == null || V(je), o == null || o(Ie), s == null || s(!1), _(!0), N(void 0), H(1), Ke && (ce.current = Ke, R == null || R(Ke)), W && k(W), Se({
4054
+ T || (n == null || n(void 0), i == null || i([]), V == null || V(je), o == null || o(Ie), s == null || s(!1), O(!0), N(void 0), H(1), Ke && (ce.current = Ke, R == null || R(Ke)), W && k(W), Se({
4055
4055
  params: Ie,
4056
4056
  newOffset: W
4057
4057
  }));
@@ -4068,9 +4068,9 @@ const So = (e) => {
4068
4068
  ]
4069
4069
  ), Me = de(
4070
4070
  (ae) => {
4071
- O(!0), H(ae), k((ae - 1) * S);
4071
+ _(!0), H(ae), k((ae - 1) * S);
4072
4072
  },
4073
- [O, S, k, H]
4073
+ [_, S, k, H]
4074
4074
  ), ue = de(() => {
4075
4075
  T || (n == null || n(void 0), o == null || o([]), V == null || V({}), N(void 0), k(0), H(1), R == null || R(S || St));
4076
4076
  }, [
@@ -4131,7 +4131,7 @@ function Dl(e, t) {
4131
4131
  rootTree: f = !1,
4132
4132
  parentContext: c = {},
4133
4133
  onChangeSelectedRowKeys: m
4134
- } = e, [p, h] = v(!1), [g, y] = v(!1), w = le(!1), b = le(null), [x, S] = v(), [R, I] = v(), [V, F] = v(), [T, O] = v(), [C, _] = v(200), A = le(), { height: N } = hn(), j = re(
4134
+ } = e, [p, h] = v(!1), [g, y] = v(!1), w = le(!1), b = le(null), [x, S] = v(), [R, I] = v(), [V, F] = v(), [T, _] = v(), [C, O] = v(200), A = le(), { height: N } = hn(), j = re(
4135
4135
  Lt
4136
4136
  ), { processAction: H } = j || {}, U = re(
4137
4137
  nt
@@ -4214,11 +4214,11 @@ function Dl(e, t) {
4214
4214
  g && u && R && (w.current = !1, ae());
4215
4215
  }, [W, Ae, g, u, a, R]);
4216
4216
  const Re = async () => {
4217
- y(!1), h(!0), O(void 0), ie == null || ie(!0);
4217
+ y(!1), h(!0), _(void 0), ie == null || ie(!0);
4218
4218
  try {
4219
4219
  await xe(), y(!0);
4220
4220
  } catch (Ne) {
4221
- O(Ne), ie == null || ie(!1);
4221
+ _(Ne), ie == null || ie(!1);
4222
4222
  } finally {
4223
4223
  h(!1);
4224
4224
  }
@@ -4287,7 +4287,7 @@ function Dl(e, t) {
4287
4287
  ), Ge = de(async () => {
4288
4288
  const Ne = await oe();
4289
4289
  B == null || B(Ne.map((ot) => ({ id: ot }))), m == null || m(Ne);
4290
- }, [oe, m, B]), bt = _e(() => R != null && R.isExpandable ? N - 160 : N - (C + 240), [N, C, R == null ? void 0 : R.isExpandable]), st = _e(
4290
+ }, [oe, m, B]), bt = Oe(() => R != null && R.isExpandable ? N - 160 : N - (C + 240), [N, C, R == null ? void 0 : R.isExpandable]), st = Oe(
4291
4291
  () => ne == null ? void 0 : ne.map((Ne) => Ne.id),
4292
4292
  [ne]
4293
4293
  ), Qt = de(() => !R || !V ? null : /* @__PURE__ */ D(ee, { children: [
@@ -4305,7 +4305,7 @@ function Dl(e, t) {
4305
4305
  isSearching: je,
4306
4306
  onSubmit: Fe,
4307
4307
  onLimitChange: Te,
4308
- setSearchFilterHeight: _,
4308
+ setSearchFilterHeight: O,
4309
4309
  searchError: Ke,
4310
4310
  searchVisible: L,
4311
4311
  searchValues: Se
@@ -4407,7 +4407,7 @@ const To = ht(Dl), Fo = (e) => {
4407
4407
  }
4408
4408
  ),
4409
4409
  /* @__PURE__ */ r(cn, {}),
4410
- /* @__PURE__ */ r(Oe, { justify: "end", children: /* @__PURE__ */ D(Ue, { children: [
4410
+ /* @__PURE__ */ r(_e, { justify: "end", children: /* @__PURE__ */ D(Ue, { children: [
4411
4411
  /* @__PURE__ */ r(
4412
4412
  Pe,
4413
4413
  {
@@ -4479,8 +4479,8 @@ const To = ht(Dl), Fo = (e) => {
4479
4479
  throw new Error();
4480
4480
  if (Array.isArray(s) && !s[0])
4481
4481
  throw new Error();
4482
- }, ...e, children: /* @__PURE__ */ r(_o, { ooui: t }) });
4483
- }, _o = (e) => {
4482
+ }, ...e, children: /* @__PURE__ */ r(Oo, { ooui: t }) });
4483
+ }, Oo = (e) => {
4484
4484
  const { value: t, onChange: n, ooui: i } = e, {
4485
4485
  required: o,
4486
4486
  relation: s,
@@ -4488,14 +4488,14 @@ const To = ht(Dl), Fo = (e) => {
4488
4488
  context: l,
4489
4489
  id: d,
4490
4490
  domain: u
4491
- } = i, f = o && !a ? { backgroundColor: Ro.colorPrimaryBg } : void 0, [c, m] = v(!1), [p, h] = v(!1), [g, y] = v(!1), [w, b] = v(), x = le(!1), [S, R] = v(""), I = le(), V = re(He), { domain: F, getValues: T, getFields: O, getContext: C, elementHasLostFocus: _ } = V || {}, A = le([]), [N, j] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
4491
+ } = i, f = o && !a ? { backgroundColor: Ro.colorPrimaryBg } : void 0, [c, m] = v(!1), [p, h] = v(!1), [g, y] = v(!1), [w, b] = v(), x = le(!1), [S, R] = v(""), I = le(), V = re(He), { domain: F, getValues: T, getFields: _, getContext: C, elementHasLostFocus: O } = V || {}, A = le([]), [N, j] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
4492
4492
  me(() => {
4493
4493
  !Array.isArray(t) && t && ne(t);
4494
4494
  }, [t]), me(() => {
4495
4495
  H && U.length === 0 ? ne(H) : H && U.length > 0 ? R(U) : !H && !U && R(I.current || "");
4496
4496
  }, [t]);
4497
4497
  const k = (L) => {
4498
- n == null || n(L), _ == null || _();
4498
+ n == null || n(L), O == null || O();
4499
4499
  }, Y = (L) => {
4500
4500
  I.current = L.target.value, k([void 0, ""]);
4501
4501
  }, q = async () => {
@@ -4554,10 +4554,10 @@ const To = ht(Dl), Fo = (e) => {
4554
4554
  u && (A.current = await P.getHandler().evalDomain({
4555
4555
  domain: u,
4556
4556
  values: Nt({
4557
- fields: O(),
4557
+ fields: _(),
4558
4558
  values: T()
4559
4559
  }),
4560
- fields: O(),
4560
+ fields: _(),
4561
4561
  context: C()
4562
4562
  })), F && F.length > 0 && (A.current = A.current.concat(
4563
4563
  jr({
@@ -4569,7 +4569,7 @@ const To = ht(Dl), Fo = (e) => {
4569
4569
  async function E(L) {
4570
4570
  L.keyCode === 13 ? (L.preventDefault(), L.stopPropagation(), await q()) : L.code === "Backspace" && H !== void 0 && (L.preventDefault(), L.stopPropagation(), k([void 0, ""]));
4571
4571
  }
4572
- return /* @__PURE__ */ D(Oe, { gutter: 8, wrap: !1, children: [
4572
+ return /* @__PURE__ */ D(_e, { gutter: 8, wrap: !1, children: [
4573
4573
  /* @__PURE__ */ r(he, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ r(
4574
4574
  o && !a ? Nl : it,
4575
4575
  {
@@ -4656,7 +4656,7 @@ const To = ht(Dl), Fo = (e) => {
4656
4656
  .ant-input {
4657
4657
  background-color: ${Ro.colorPrimaryBg};
4658
4658
  }
4659
- `, Oo = rt.createContext(
4659
+ `, _o = rt.createContext(
4660
4660
  null
4661
4661
  ), Ll = ({
4662
4662
  children: e,
@@ -4664,7 +4664,7 @@ const To = ht(Dl), Fo = (e) => {
4664
4664
  }) => {
4665
4665
  const [n, i] = v(t), [o, s] = v(0), [a, l] = v(!1);
4666
4666
  return /* @__PURE__ */ r(
4667
- Oo.Provider,
4667
+ _o.Provider,
4668
4668
  {
4669
4669
  value: {
4670
4670
  currentView: n,
@@ -4806,7 +4806,7 @@ function Hl({
4806
4806
  flexDirection: "column",
4807
4807
  padding: "0.2rem"
4808
4808
  },
4809
- children: /* @__PURE__ */ D(Oe, { align: "middle", children: [
4809
+ children: /* @__PURE__ */ D(_e, { align: "middle", children: [
4810
4810
  g && /* @__PURE__ */ r(he, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(g, {}) }),
4811
4811
  /* @__PURE__ */ D(he, { children: [
4812
4812
  /* @__PURE__ */ r(Dn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: g ? ` ${i}%` : `${i}%` }),
@@ -4852,11 +4852,11 @@ const gn = () => /* @__PURE__ */ r(
4852
4852
  field: u,
4853
4853
  operator: f,
4854
4854
  manualIds: c
4855
- } = e, [m, p] = v(!1), [h, g] = v(), [y, w] = v(), [b, x] = v(), [S, R] = v(), [I, V] = v(), [F, T] = v(), [O] = Xe(
4855
+ } = e, [m, p] = v(!1), [h, g] = v(), [y, w] = v(), [b, x] = v(), [S, R] = v(), [I, V] = v(), [F, T] = v(), [_] = Xe(
4856
4856
  P.getHandler().searchAllIds
4857
4857
  ), [C] = Xe(
4858
4858
  P.getHandler().readObjects
4859
- ), [_] = Xe(
4859
+ ), [O] = Xe(
4860
4860
  P.getHandler().searchCount
4861
4861
  ), [A] = Xe(
4862
4862
  P.getHandler().evalDomain
@@ -4873,7 +4873,7 @@ const gn = () => /* @__PURE__ */ r(
4873
4873
  if (Y)
4874
4874
  return await H({ domain: k });
4875
4875
  if (u && f) {
4876
- const q = c || await O({
4876
+ const q = c || await _({
4877
4877
  params: k,
4878
4878
  model: t,
4879
4879
  context: i
@@ -4888,7 +4888,7 @@ const gn = () => /* @__PURE__ */ r(
4888
4888
  operator: f
4889
4889
  });
4890
4890
  } else
4891
- return c ? c.length : await _({
4891
+ return c ? c.length : await O({
4892
4892
  model: t,
4893
4893
  params: k,
4894
4894
  context: i
@@ -4896,7 +4896,7 @@ const gn = () => /* @__PURE__ */ r(
4896
4896
  }
4897
4897
  async function H({ domain: k }) {
4898
4898
  if (u && f) {
4899
- const Y = await O({
4899
+ const Y = await _({
4900
4900
  params: k,
4901
4901
  model: t,
4902
4902
  context: i
@@ -4911,7 +4911,7 @@ const gn = () => /* @__PURE__ */ r(
4911
4911
  operator: f
4912
4912
  });
4913
4913
  } else
4914
- return await _({
4914
+ return await O({
4915
4915
  model: t,
4916
4916
  params: k,
4917
4917
  context: i
@@ -5003,8 +5003,8 @@ const gn = () => /* @__PURE__ */ r(
5003
5003
  search: S
5004
5004
  }
5005
5005
  }));
5006
- } catch (O) {
5007
- c("Error fetching graph data values: " + JSON.stringify(O)), u(!1);
5006
+ } catch (_) {
5007
+ c("Error fetching graph data values: " + JSON.stringify(_)), u(!1);
5008
5008
  return;
5009
5009
  }
5010
5010
  try {
@@ -5018,7 +5018,7 @@ const gn = () => /* @__PURE__ */ r(
5018
5018
  fetchData: R
5019
5019
  };
5020
5020
  g(F);
5021
- const O = Kl({
5021
+ const _ = Kl({
5022
5022
  ooui: I,
5023
5023
  values: F,
5024
5024
  fields: T,
@@ -5026,9 +5026,9 @@ const gn = () => /* @__PURE__ */ r(
5026
5026
  uninformedString: a
5027
5027
  }
5028
5028
  });
5029
- c(void 0), p(O);
5030
- } catch (O) {
5031
- c("Error processing graph data: " + O), u(!1);
5029
+ c(void 0), p(_);
5030
+ } catch (_) {
5031
+ c("Error processing graph data: " + _), u(!1);
5032
5032
  return;
5033
5033
  }
5034
5034
  u(!1);
@@ -5271,13 +5271,13 @@ const Jl = {
5271
5271
  isStack: i,
5272
5272
  numItems: o
5273
5273
  }) => {
5274
- const { t: s } = ge(), a = _e(() => {
5274
+ const { t: s } = ge(), a = Oe(() => {
5275
5275
  if (!(e !== "pie" || t.reduce(
5276
5276
  (p, h) => h.operator === "+" ? p + h.value : 0,
5277
5277
  0
5278
5278
  ) === 0))
5279
5279
  return t.reduce((p, h) => p + h.value, 0);
5280
- }, [t, e]), l = _e(() => {
5280
+ }, [t, e]), l = Oe(() => {
5281
5281
  if (e === "pie")
5282
5282
  return Xl(t);
5283
5283
  }, [t, e]), d = de(
@@ -5288,7 +5288,7 @@ const Jl = {
5288
5288
  return `${`${((p == null ? void 0 : p.percent) || 0).toFixed(0)}%`}`;
5289
5289
  },
5290
5290
  [l]
5291
- ), u = _e(() => {
5291
+ ), u = Oe(() => {
5292
5292
  if (l !== void 0)
5293
5293
  return {
5294
5294
  formatter: (m, p) => d(p.id)
@@ -5502,7 +5502,7 @@ const ec = (e) => {
5502
5502
  ze,
5503
5503
  {
5504
5504
  tooltip: c ? "Unlink" : "Delete",
5505
- icon: c ? /* @__PURE__ */ r(_i, {}) : /* @__PURE__ */ r(Jn, {}),
5505
+ icon: c ? /* @__PURE__ */ r(Oi, {}) : /* @__PURE__ */ r(Jn, {}),
5506
5506
  onClick: a,
5507
5507
  disabled: l === 0 || n || s !== "form" && p.length === 0
5508
5508
  }
@@ -5590,8 +5590,8 @@ function cc(e) {
5590
5590
  const dc = (e) => {
5591
5591
  var De;
5592
5592
  const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = re(
5593
- Oo
5594
- ), f = re(He), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = ge(), [w, b] = v(!1), [x, S] = v(!1), [R, I] = v(), [V, F] = v(!1), [T, O] = v(!1), [C, _] = v(), [A, N] = v([]), [j, H] = v(!1), U = le([]), [k, Y] = v(), q = le(), [Q, ne] = v(void 0), {
5593
+ _o
5594
+ ), f = re(He), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = ge(), [w, b] = v(!1), [x, S] = v(!1), [R, I] = v(), [V, F] = v(!1), [T, _] = v(!1), [C, O] = v(), [A, N] = v([]), [j, H] = v(!1), U = le([]), [k, Y] = v(), q = le(), [Q, ne] = v(void 0), {
5595
5595
  readOnly: B,
5596
5596
  relation: E,
5597
5597
  context: K,
@@ -5719,12 +5719,12 @@ const dc = (e) => {
5719
5719
  const { inv_field: G } = i;
5720
5720
  let oe;
5721
5721
  G && c && (oe = { [G]: c }), a === "form" ? ae(() => {
5722
- H(!0), _({ defaultValues: oe }), F(!0);
5723
- }) : (H(!0), _({ defaultValues: oe }), F(!0));
5722
+ H(!0), O({ defaultValues: oe }), F(!0);
5723
+ }) : (H(!0), O({ defaultValues: oe }), F(!0));
5724
5724
  }, Ke = async () => {
5725
5725
  a === "form" ? ae(() => {
5726
- O(!0);
5727
- }) : O(!0);
5726
+ _(!0);
5727
+ }) : _(!0);
5728
5728
  }, W = async () => {
5729
5729
  S(!0), b(!1), I(void 0);
5730
5730
  try {
@@ -5785,7 +5785,7 @@ const dc = (e) => {
5785
5785
  const { id: oe } = G;
5786
5786
  let Re = s;
5787
5787
  const xe = s.find((Te) => Te.id === oe);
5788
- (xe == null ? void 0 : xe.values) === void 0 && (Re = await Ee("form")), _(Re.find((Te) => Te.id === oe)), H(!1), F(!0);
5788
+ (xe == null ? void 0 : xe.values) === void 0 && (Re = await Ee("form")), O(Re.find((Te) => Te.id === oe)), H(!1), F(!0);
5789
5789
  }, pe = async (G) => {
5790
5790
  S(!0);
5791
5791
  const oe = s, Re = G.filter((xe) => !s.find((Te) => Te.id === xe));
@@ -5946,10 +5946,10 @@ const dc = (e) => {
5946
5946
  context: { ...h == null ? void 0 : h(), ...K },
5947
5947
  visible: T,
5948
5948
  onSelectValues: async (G) => {
5949
- O(!1), pe(G);
5949
+ _(!1), pe(G);
5950
5950
  },
5951
5951
  onCloseModal: () => {
5952
- O(!1);
5952
+ _(!1);
5953
5953
  }
5954
5954
  }
5955
5955
  )
@@ -6162,7 +6162,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6162
6162
  }
6163
6163
  )
6164
6164
  ] }) : /* @__PURE__ */ D(ee, { children: [
6165
- /* @__PURE__ */ r(Oe, { gutter: 8, wrap: !1, children: /* @__PURE__ */ r(
6165
+ /* @__PURE__ */ r(_e, { gutter: 8, wrap: !1, children: /* @__PURE__ */ r(
6166
6166
  Pn,
6167
6167
  {
6168
6168
  value: e,
@@ -6178,7 +6178,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6178
6178
  onBlur: f
6179
6179
  }
6180
6180
  ) }),
6181
- /* @__PURE__ */ r(Oe, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ r(
6181
+ /* @__PURE__ */ r(_e, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ r(
6182
6182
  ze,
6183
6183
  {
6184
6184
  tooltip: p("translate"),
@@ -6216,7 +6216,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6216
6216
  ]);
6217
6217
  const { datas: b } = await P.getHandler().exportData({
6218
6218
  model: e,
6219
- fields: _c({
6219
+ fields: Oc({
6220
6220
  keys: y.selectedKeys,
6221
6221
  fields: a.current
6222
6222
  }),
@@ -6383,7 +6383,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6383
6383
  }, Fc = ({
6384
6384
  fields: e,
6385
6385
  keys: t
6386
- }) => Oc([
6386
+ }) => _c([
6387
6387
  ...new Set(
6388
6388
  t.filter((n) => {
6389
6389
  var i, o;
@@ -6411,13 +6411,13 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6411
6411
  );
6412
6412
  }
6413
6413
  return s;
6414
- }, _c = ({
6414
+ }, Oc = ({
6415
6415
  keys: e,
6416
6416
  fields: t
6417
6417
  }) => e.map((n) => {
6418
6418
  const i = Nn(n), s = Ln(n, t)[i];
6419
6419
  return ko(s) ? `${n}/id` : n;
6420
- }), Oc = (e) => {
6420
+ }), _c = (e) => {
6421
6421
  const t = /* @__PURE__ */ new Map(), n = [];
6422
6422
  for (const i of e) {
6423
6423
  const o = i.split("/");
@@ -6503,7 +6503,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6503
6503
  }
6504
6504
  const p = t && d && d[0], h = t && d && d[1] && parseInt(d[1]);
6505
6505
  f([h, void 0]), m(p);
6506
- }, [t]), /* @__PURE__ */ D(Oe, { gutter: 8, wrap: !1, children: [
6506
+ }, [t]), /* @__PURE__ */ D(_e, { gutter: 8, wrap: !1, children: [
6507
6507
  /* @__PURE__ */ r(he, { flex: "1", children: /* @__PURE__ */ r(
6508
6508
  co,
6509
6509
  {
@@ -6524,7 +6524,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6524
6524
  }
6525
6525
  ) }),
6526
6526
  /* @__PURE__ */ r(he, { flex: "3", children: /* @__PURE__ */ r(
6527
- _o,
6527
+ Oo,
6528
6528
  {
6529
6529
  ooui: new Kr({
6530
6530
  name: "object_value",
@@ -6565,7 +6565,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6565
6565
  function b() {
6566
6566
  f(a, void 0), h(void 0);
6567
6567
  }
6568
- return /* @__PURE__ */ D(Oe, { gutter: 8, children: [
6568
+ return /* @__PURE__ */ D(_e, { gutter: 8, children: [
6569
6569
  /* @__PURE__ */ D(he, { style: { paddingBottom: 5 }, children: [
6570
6570
  /* @__PURE__ */ r(
6571
6571
  "input",
@@ -6599,7 +6599,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6599
6599
  children: "Select"
6600
6600
  }
6601
6601
  ),
6602
- /* @__PURE__ */ r(Pe, { icon: /* @__PURE__ */ r(Oi, {}), disabled: !n, onClick: y, children: m("open") }),
6602
+ /* @__PURE__ */ r(Pe, { icon: /* @__PURE__ */ r(_i, {}), disabled: !n, onClick: y, children: m("open") }),
6603
6603
  /* @__PURE__ */ r(
6604
6604
  ze,
6605
6605
  {
@@ -6620,14 +6620,14 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6620
6620
  )
6621
6621
  ] }) })
6622
6622
  ] });
6623
- }, _n = {
6623
+ }, On = {
6624
6624
  tree: /* @__PURE__ */ r(Xn, {}),
6625
6625
  form: /* @__PURE__ */ r(Kt, {}),
6626
6626
  graph: /* @__PURE__ */ r(Ii, {}),
6627
6627
  calendar: /* @__PURE__ */ r(Vi, {})
6628
6628
  };
6629
6629
  function kr(e) {
6630
- return e ? (_n == null ? void 0 : _n[e.type]) || /* @__PURE__ */ r(Kt, {}) : /* @__PURE__ */ r(Kt, {});
6630
+ return e ? (On == null ? void 0 : On[e.type]) || /* @__PURE__ */ r(Kt, {}) : /* @__PURE__ */ r(Kt, {});
6631
6631
  }
6632
6632
  function ir(e) {
6633
6633
  const {
@@ -6637,7 +6637,7 @@ function ir(e) {
6637
6637
  disabled: o = !1,
6638
6638
  formHasChanges: s = !1,
6639
6639
  previousView: a
6640
- } = e, { t: l } = ge(), d = _e(() => [
6640
+ } = e, { t: l } = ge(), d = Oe(() => [
6641
6641
  {
6642
6642
  label: l("viewAs"),
6643
6643
  items: n.map((c, m) => {
@@ -6820,7 +6820,7 @@ const Bc = (e) => {
6820
6820
  onRetrieveData: async () => [
6821
6821
  {
6822
6822
  items: n.map((c) => {
6823
- const m = c.link ? hr : Un, p = /* @__PURE__ */ D(Oe, { wrap: !1, align: "middle", gutter: 8, children: [
6823
+ const m = c.link ? hr : Un, p = /* @__PURE__ */ D(_e, { wrap: !1, align: "middle", gutter: 8, children: [
6824
6824
  /* @__PURE__ */ r(he, { style: { textAlign: "center" }, children: (c.datas_fname || c.link) && /* @__PURE__ */ r(
6825
6825
  wt,
6826
6826
  {
@@ -7014,11 +7014,11 @@ function Wc({ toolbar: e }) {
7014
7014
  previousView: I,
7015
7015
  setPreviousView: V,
7016
7016
  goToResourceId: F
7017
- } = re(nt), { t: T } = ge(), O = re(
7017
+ } = re(nt), { t: T } = ge(), _ = re(
7018
7018
  Lt
7019
- ), { processAction: C } = O || {}, _ = re(
7019
+ ), { processAction: C } = _ || {}, O = re(
7020
7020
  dt
7021
- ), { openRelate: A, openDefaultActionForModel: N } = _ || {};
7021
+ ), { openRelate: A, openDefaultActionForModel: N } = O || {};
7022
7022
  function j(E) {
7023
7023
  if (s) {
7024
7024
  Hc({
@@ -7223,7 +7223,7 @@ function Wc({ toolbar: e }) {
7223
7223
  { label: T("actions"), items: e == null ? void 0 : e.action }
7224
7224
  ],
7225
7225
  onItemClick: async (E) => {
7226
- !E || !(await _t({
7226
+ !E || !(await Ot({
7227
7227
  onFormSave: o
7228
7228
  })).succeed || B(E);
7229
7229
  }
@@ -7241,7 +7241,7 @@ function Wc({ toolbar: e }) {
7241
7241
  onItemClick: async (E) => {
7242
7242
  if (!E)
7243
7243
  return;
7244
- const K = await _t({
7244
+ const K = await Ot({
7245
7245
  onFormSave: o
7246
7246
  });
7247
7247
  K.succeed && B({
@@ -7264,7 +7264,7 @@ function Wc({ toolbar: e }) {
7264
7264
  { label: T("related"), items: e == null ? void 0 : e.relate }
7265
7265
  ],
7266
7266
  onItemClick: async (E) => {
7267
- !E || !(await _t({
7267
+ !E || !(await Ot({
7268
7268
  onFormSave: o
7269
7269
  })).succeed || A({
7270
7270
  relateData: E,
@@ -7282,7 +7282,7 @@ function Wc({ toolbar: e }) {
7282
7282
  disabled: ne,
7283
7283
  attachments: x,
7284
7284
  onAddNewAttachment: async () => {
7285
- const E = await _t({
7285
+ const E = await Ot({
7286
7286
  onFormSave: o
7287
7287
  });
7288
7288
  if (!E.succeed)
@@ -7294,7 +7294,7 @@ function Wc({ toolbar: e }) {
7294
7294
  });
7295
7295
  },
7296
7296
  onListAllAttachments: async () => {
7297
- const E = await _t({
7297
+ const E = await Ot({
7298
7298
  onFormSave: o
7299
7299
  });
7300
7300
  if (!E.succeed)
@@ -7306,7 +7306,7 @@ function Wc({ toolbar: e }) {
7306
7306
  });
7307
7307
  },
7308
7308
  onViewAttachmentDetails: async (E) => {
7309
- (await _t({
7309
+ (await Ot({
7310
7310
  onFormSave: o
7311
7311
  })).succeed && N({
7312
7312
  model: "ir.attachment",
@@ -7321,7 +7321,7 @@ function Wc({ toolbar: e }) {
7321
7321
  function Rt() {
7322
7322
  return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
7323
7323
  }
7324
- async function _t({
7324
+ async function Ot({
7325
7325
  onFormSave: e
7326
7326
  }) {
7327
7327
  const t = await (e == null ? void 0 : e());
@@ -7351,7 +7351,7 @@ const { useToken: jc } = Be, No = (e) => {
7351
7351
  const w = (b) => {
7352
7352
  i == null || i(b.target.value);
7353
7353
  };
7354
- return /* @__PURE__ */ D(Oe, { gutter: 8, wrap: !1, align: "middle", children: [
7354
+ return /* @__PURE__ */ D(_e, { gutter: 8, wrap: !1, align: "middle", children: [
7355
7355
  l ? null : /* @__PURE__ */ r(he, { flex: "none", children: p ? /* @__PURE__ */ r(
7356
7356
  Pe,
7357
7357
  {
@@ -7453,7 +7453,7 @@ const { useToken: jc } = Be, No = (e) => {
7453
7453
  children: /* @__PURE__ */ r(it, { style: { width: "100%" }, autoFocus: !0, ref: a })
7454
7454
  }
7455
7455
  ),
7456
- /* @__PURE__ */ r(Oe, { align: "middle", justify: "end", children: /* @__PURE__ */ r(he, { children: /* @__PURE__ */ D(Ue, { children: [
7456
+ /* @__PURE__ */ r(_e, { align: "middle", justify: "end", children: /* @__PURE__ */ r(he, { children: /* @__PURE__ */ D(Ue, { children: [
7457
7457
  /* @__PURE__ */ r(
7458
7458
  Pe,
7459
7459
  {
@@ -7646,7 +7646,7 @@ function wn(e) {
7646
7646
  },
7647
7647
  children: [
7648
7648
  /* @__PURE__ */ D(
7649
- Oe,
7649
+ _e,
7650
7650
  {
7651
7651
  className: "shadow-md",
7652
7652
  style: {
@@ -7661,7 +7661,7 @@ function wn(e) {
7661
7661
  /* @__PURE__ */ r(Xc, { level: 3, style: { marginBottom: 0 }, children: t || i }),
7662
7662
  m()
7663
7663
  ] }),
7664
- /* @__PURE__ */ r(he, { flex: 3, children: /* @__PURE__ */ r(Oe, { justify: "end", children: n }) })
7664
+ /* @__PURE__ */ r(he, { flex: 3, children: /* @__PURE__ */ r(_e, { justify: "end", children: n }) })
7665
7665
  ]
7666
7666
  }
7667
7667
  ),
@@ -7690,16 +7690,16 @@ const Qc = (e) => {
7690
7690
  limit: V,
7691
7691
  setLimit: F,
7692
7692
  searchParams: T,
7693
- searchValues: O,
7693
+ searchValues: _,
7694
7694
  setSearchValues: C,
7695
- currentView: _
7695
+ currentView: O
7696
7696
  } = u || {}, [A, N] = v(!0);
7697
7697
  me(() => {
7698
7698
  var q;
7699
7699
  (q = d.current) == null || q.refresh();
7700
7700
  }, [T]), me(() => {
7701
- t.view_id !== _.view_id && N(!0);
7702
- }, [_]);
7701
+ t.view_id !== O.view_id && N(!0);
7702
+ }, [O]);
7703
7703
  const { clear: j, searchFilterLoading: H, searchError: U, offset: k, tableRefreshing: Y } = So({
7704
7704
  model: i,
7705
7705
  setSearchTreeNameSearch: R,
@@ -7749,7 +7749,7 @@ const Qc = (e) => {
7749
7749
  },
7750
7750
  searchError: U,
7751
7751
  searchVisible: y,
7752
- searchValues: O,
7752
+ searchValues: _,
7753
7753
  showLimitOptions: !1
7754
7754
  }
7755
7755
  ),
@@ -7813,7 +7813,7 @@ function ed(e) {
7813
7813
  function u() {
7814
7814
  l(!1), s.setFieldsValue({ search: void 0 }), t(void 0);
7815
7815
  }
7816
- return /* @__PURE__ */ r(lt, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ D(Oe, { align: "middle", justify: "end", children: [
7816
+ return /* @__PURE__ */ r(lt, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ D(_e, { align: "middle", justify: "end", children: [
7817
7817
  /* @__PURE__ */ r(he, { children: /* @__PURE__ */ r(lt.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ r(
7818
7818
  it,
7819
7819
  {
@@ -8148,7 +8148,7 @@ const td = {
8148
8148
  devMode: s,
8149
8149
  children: a
8150
8150
  }) => {
8151
- const l = _e(
8151
+ const l = Oe(
8152
8152
  () => ({
8153
8153
  erpFeatures: e,
8154
8154
  globalValues: i,
@@ -8196,15 +8196,15 @@ function ad(e) {
8196
8196
  results: R,
8197
8197
  limit: I,
8198
8198
  totalItems: V
8199
- } = re(nt), { parentContext: F = {}, treeExpandable: T, toolbar: O } = e, C = Bo(
8199
+ } = re(nt), { parentContext: F = {}, treeExpandable: T, toolbar: _ } = e, C = Bo(
8200
8200
  vn.FEATURE_ADVANCED_EXPORT
8201
- ), { t: _ } = ge(), A = re(
8201
+ ), { t: O } = ge(), A = re(
8202
8202
  Lt
8203
8203
  ), { processAction: N } = A || {}, [j, H] = v(!1), U = w !== void 0 && w.trim().length > 0;
8204
8204
  function k() {
8205
8205
  Yt({
8206
- confirmMessage: _("confirmRemove"),
8207
- t: _,
8206
+ confirmMessage: O("confirmRemove"),
8207
+ t: O,
8208
8208
  onOk: () => {
8209
8209
  Y();
8210
8210
  }
@@ -8285,7 +8285,7 @@ function ad(e) {
8285
8285
  style: { color: h ? "white" : void 0 }
8286
8286
  }
8287
8287
  ),
8288
- tooltip: _("advanced_search"),
8288
+ tooltip: O("advanced_search"),
8289
8289
  type: h ? "primary" : "default",
8290
8290
  onClick: () => {
8291
8291
  g == null || g(!h);
@@ -8300,7 +8300,7 @@ function ad(e) {
8300
8300
  qe,
8301
8301
  {
8302
8302
  icon: /* @__PURE__ */ r(Qn, {}),
8303
- tooltip: _("duplicate"),
8303
+ tooltip: O("duplicate"),
8304
8304
  disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || b,
8305
8305
  loading: l,
8306
8306
  onClick: q
@@ -8310,7 +8310,7 @@ function ad(e) {
8310
8310
  qe,
8311
8311
  {
8312
8312
  icon: /* @__PURE__ */ r(Jn, {}),
8313
- tooltip: _("delete"),
8313
+ tooltip: O("delete"),
8314
8314
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || b,
8315
8315
  loading: a,
8316
8316
  onClick: k
@@ -8322,11 +8322,11 @@ function ad(e) {
8322
8322
  qe,
8323
8323
  {
8324
8324
  icon: /* @__PURE__ */ r(Zr, {}),
8325
- tooltip: _("showLogs"),
8325
+ tooltip: O("showLogs"),
8326
8326
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || b,
8327
8327
  loading: !1,
8328
8328
  onClick: () => {
8329
- Mo(u, o[0].id, _);
8329
+ Mo(u, o[0].id, O);
8330
8330
  }
8331
8331
  }
8332
8332
  ),
@@ -8334,7 +8334,7 @@ function ad(e) {
8334
8334
  qe,
8335
8335
  {
8336
8336
  icon: /* @__PURE__ */ r(fn, {}),
8337
- tooltip: _("refresh"),
8337
+ tooltip: O("refresh"),
8338
8338
  disabled: l || a || b,
8339
8339
  loading: !1,
8340
8340
  onClick: () => {
@@ -8366,7 +8366,7 @@ function ad(e) {
8366
8366
  placement: "bottomRight",
8367
8367
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || b,
8368
8368
  onRetrieveData: async () => [
8369
- { label: _("actions"), items: O == null ? void 0 : O.action }
8369
+ { label: O("actions"), items: _ == null ? void 0 : _.action }
8370
8370
  ],
8371
8371
  onItemClick: (B) => {
8372
8372
  B && Q(B);
@@ -8380,7 +8380,7 @@ function ad(e) {
8380
8380
  placement: "bottomRight",
8381
8381
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || b,
8382
8382
  onRetrieveData: async () => [
8383
- { label: _("reports"), items: O == null ? void 0 : O.print }
8383
+ { label: O("reports"), items: _ == null ? void 0 : _.print }
8384
8384
  ],
8385
8385
  onItemClick: (B) => {
8386
8386
  B && Q({
@@ -8427,15 +8427,15 @@ function ad(e) {
8427
8427
  ),
8428
8428
  onRetrieveData: async () => [
8429
8429
  {
8430
- label: _("export"),
8430
+ label: O("export"),
8431
8431
  items: [
8432
8432
  {
8433
8433
  id: "print_screen",
8434
- name: _("printScreen")
8434
+ name: O("printScreen")
8435
8435
  },
8436
8436
  {
8437
8437
  id: "export",
8438
- name: _("advancedExport")
8438
+ name: O("advancedExport")
8439
8439
  }
8440
8440
  ]
8441
8441
  }
@@ -8616,7 +8616,7 @@ const fd = (e) => {
8616
8616
  children: [
8617
8617
  /* @__PURE__ */ r(wn, { children: /* @__PURE__ */ r(dd, {}) }),
8618
8618
  /* @__PURE__ */ r(
8619
- Od,
8619
+ _d,
8620
8620
  {
8621
8621
  ref: i,
8622
8622
  model: t.model,
@@ -8663,7 +8663,7 @@ function hd(e, t) {
8663
8663
  limit: y
8664
8664
  } = e, [w, b] = v(), [x, S] = v([]), [R, I] = v(!0), V = m || void 0, [F, T] = v(
8665
8665
  V
8666
- ), [O, C] = v([]), [_, A] = v(), [N, j] = v([]), [H, U] = v(), [k, Y] = v(0), [q, Q] = v(!1), [ne, B] = v(!1), [E, K] = v(), { t: L } = ge(), ce = le(), J = le(), te = re(
8666
+ ), [_, C] = v([]), [O, A] = v(), [N, j] = v([]), [H, U] = v(), [k, Y] = v(0), [q, Q] = v(!1), [ne, B] = v(!1), [E, K] = v(), { t: L } = ge(), ce = le(), J = le(), te = re(
8667
8667
  dt
8668
8668
  ), {
8669
8669
  setCurrentView: ve,
@@ -8678,7 +8678,7 @@ function hd(e, t) {
8678
8678
  (W) => {
8679
8679
  W.preventDefault(), ae();
8680
8680
  },
8681
- [Se, ie, w, _, N]
8681
+ [Se, ie, w, O, N]
8682
8682
  );
8683
8683
  function Me(W) {
8684
8684
  T(W), z == null || z(W);
@@ -8920,7 +8920,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8920
8920
  currentId: F,
8921
8921
  setCurrentId: Me,
8922
8922
  setCurrentItemIndex: A,
8923
- currentItemIndex: _,
8923
+ currentItemIndex: O,
8924
8924
  results: N,
8925
8925
  setResults: j,
8926
8926
  currentModel: i,
@@ -8928,7 +8928,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8928
8928
  setSorter: U,
8929
8929
  totalItems: k,
8930
8930
  setTotalItems: Y,
8931
- selectedRowItems: O,
8931
+ selectedRowItems: _,
8932
8932
  setSelectedRowItems: C,
8933
8933
  setSearchTreeNameSearch: K,
8934
8934
  searchTreeNameSearch: E,
@@ -9050,7 +9050,7 @@ const gd = ps(gs), yd = (e) => {
9050
9050
  },
9051
9051
  children: [
9052
9052
  /* @__PURE__ */ D(
9053
- Oe,
9053
+ _e,
9054
9054
  {
9055
9055
  align: "middle",
9056
9056
  style: {
@@ -9073,7 +9073,7 @@ const gd = ps(gs), yd = (e) => {
9073
9073
  children: /* @__PURE__ */ r(vd, { ellipsis: !0, children: t })
9074
9074
  }
9075
9075
  ),
9076
- i && /* @__PURE__ */ r(he, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ r(Oe, { justify: "end", align: "middle", children: /* @__PURE__ */ r(
9076
+ i && /* @__PURE__ */ r(he, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ r(_e, { justify: "end", align: "middle", children: /* @__PURE__ */ r(
9077
9077
  Pi,
9078
9078
  {
9079
9079
  style: { cursor: "pointer" },
@@ -9099,7 +9099,7 @@ function Cd(e) {
9099
9099
  domain: s = [],
9100
9100
  visible: a = !0,
9101
9101
  parentContext: l = {}
9102
- } = e, [d, u] = v(!1), [f, c] = v(!1), [m, p] = v(), [h, g] = v(), [y, w] = v(), [b, x] = v(1), [S, R] = v(0), I = le(St), V = le([]), [F, T] = v(0), [O, C] = v([]), [_, A] = v(void 0), [N, j] = v(), [H, U] = v(), [k, Y] = v(), [q, Q] = v(!1), ne = le([]), B = (z) => {
9102
+ } = e, [d, u] = v(!1), [f, c] = v(!1), [m, p] = v(), [h, g] = v(), [y, w] = v(), [b, x] = v(1), [S, R] = v(0), I = le(St), V = le([]), [F, T] = v(0), [_, C] = v([]), [O, A] = v(void 0), [N, j] = v(), [H, U] = v(), [k, Y] = v(), [q, Q] = v(!1), ne = le([]), B = (z) => {
9103
9103
  Q(!0), x(z), R((z - 1) * I.current);
9104
9104
  }, E = async () => {
9105
9105
  const z = ne.current.length > 0 ? ne.current : s, ie = jt(V.current, z), { colors: Se } = At(h), { totalItems: Ee, results: ke, attrsEvaluated: Me } = await P.getHandler().searchForTree({
@@ -9181,16 +9181,16 @@ function Cd(e) {
9181
9181
  limit: I.current,
9182
9182
  page: b,
9183
9183
  treeView: h,
9184
- results: O,
9184
+ results: _,
9185
9185
  onRequestPageChange: B,
9186
9186
  loading: q,
9187
9187
  onRowClicked: te,
9188
- colorsForResults: _,
9188
+ colorsForResults: O,
9189
9189
  sorter: N,
9190
9190
  onChangeSort: (z) => {
9191
9191
  j == null || j(z);
9192
9192
  const ie = Dt({
9193
- resultsToSort: O,
9193
+ resultsToSort: _,
9194
9194
  sorter: z,
9195
9195
  fields: { ...h.fields, ...y.fields }
9196
9196
  });
@@ -9297,8 +9297,8 @@ const xd = $n(Cd), Sd = (e) => {
9297
9297
  default:
9298
9298
  return /* @__PURE__ */ r(ee, { children: `Graph ${c.type} not implemented` });
9299
9299
  }
9300
- }, Rd = ht(Fd), On = "line_ids";
9301
- function _d(e, t) {
9300
+ }, Rd = ht(Fd), _n = "line_ids";
9301
+ function Od(e, t) {
9302
9302
  const { model: n, context: i = {}, id: o, configAction: s } = e, [a, l] = v([]), [d, u] = v(!1), [f, c] = v(), {
9303
9303
  setIsLoading: m,
9304
9304
  openAction: p,
@@ -9319,16 +9319,16 @@ function _d(e, t) {
9319
9319
  async function R() {
9320
9320
  u(!0), m(!0), c(void 0);
9321
9321
  try {
9322
- const _ = await I(), A = await F(_), N = _.fields[On].relation, j = A[On].items;
9323
- y.current = _.fields;
9322
+ const O = await I(), A = await F(O), N = O.fields[_n].relation, j = A[_n].items;
9323
+ y.current = O.fields;
9324
9324
  const H = await V({
9325
9325
  items: j,
9326
9326
  model: N,
9327
9327
  context: i
9328
9328
  }), U = await T(H);
9329
9329
  c(void 0), l(U), u(!1), m(!1);
9330
- } catch (_) {
9331
- c(JSON.stringify(_));
9330
+ } catch (O) {
9331
+ c(JSON.stringify(O));
9332
9332
  }
9333
9333
  }
9334
9334
  async function I() {
@@ -9339,7 +9339,7 @@ function _d(e, t) {
9339
9339
  });
9340
9340
  }
9341
9341
  async function V({
9342
- items: _,
9342
+ items: O,
9343
9343
  model: A,
9344
9344
  context: N
9345
9345
  }) {
@@ -9356,23 +9356,23 @@ function _d(e, t) {
9356
9356
  fields: g.current
9357
9357
  },
9358
9358
  model: A,
9359
- items: _,
9359
+ items: O,
9360
9360
  context: N,
9361
9361
  currentView: "form"
9362
9362
  });
9363
9363
  return j;
9364
9364
  }
9365
- async function F(_) {
9365
+ async function F(O) {
9366
9366
  return (await b({
9367
9367
  model: n,
9368
9368
  ids: [o],
9369
- fields: _.fields,
9369
+ fields: O.fields,
9370
9370
  context: i
9371
9371
  }))[0];
9372
9372
  }
9373
- async function T(_) {
9373
+ async function T(O) {
9374
9374
  const A = [];
9375
- for (const j of _) {
9375
+ for (const j of O) {
9376
9376
  const { values: H } = j;
9377
9377
  if (H.action_id && H.action_id.length > 0) {
9378
9378
  const U = parseInt(H.action_id[0], 10), k = pd({
@@ -9384,10 +9384,10 @@ function _d(e, t) {
9384
9384
  }
9385
9385
  return await Promise.all(A);
9386
9386
  }
9387
- async function O(_) {
9387
+ async function _(O) {
9388
9388
  if (!h)
9389
9389
  return;
9390
- const A = _.filter((U) => {
9390
+ const A = O.filter((U) => {
9391
9391
  const k = a.find(
9392
9392
  (q) => q.id === U.id
9393
9393
  );
@@ -9422,7 +9422,7 @@ function _d(e, t) {
9422
9422
  await x({
9423
9423
  model: n,
9424
9424
  id: o,
9425
- values: { [On]: H },
9425
+ values: { [_n]: H },
9426
9426
  fields: y.current,
9427
9427
  context: i
9428
9428
  });
@@ -9430,8 +9430,8 @@ function _d(e, t) {
9430
9430
  async function C() {
9431
9431
  p(s);
9432
9432
  }
9433
- return d ? /* @__PURE__ */ r(gt, {}) : f ? /* @__PURE__ */ r(Ze, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(yd, { onPositionItemsChanged: O, children: a.map((_, A) => {
9434
- const { actionData: N, values: j } = _, { position: H, id: U } = j, {
9433
+ return d ? /* @__PURE__ */ r(gt, {}) : f ? /* @__PURE__ */ r(Ze, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(yd, { onPositionItemsChanged: _, children: a.map((O, A) => {
9434
+ const { actionData: N, values: j } = O, { position: H, id: U } = j, {
9435
9435
  actionId: k,
9436
9436
  actionType: Y,
9437
9437
  key: q,
@@ -9560,7 +9560,7 @@ function _d(e, t) {
9560
9560
  );
9561
9561
  }) });
9562
9562
  }
9563
- const Od = ht(_d), Id = (e) => {
9563
+ const _d = ht(Od), Id = (e) => {
9564
9564
  const { ooui: t } = e;
9565
9565
  return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(Vd, { ooui: t }) });
9566
9566
  }, Vd = (e) => {
@@ -9589,17 +9589,17 @@ const Od = ht(_d), Id = (e) => {
9589
9589
  F = [...F, ...T];
9590
9590
  }
9591
9591
  try {
9592
- const O = (await P.getHandler().search({
9592
+ const _ = (await P.getHandler().search({
9593
9593
  model: m,
9594
9594
  params: F,
9595
9595
  fieldsToRetrieve: [g],
9596
9596
  context: { ...b == null ? void 0 : b(), ...p }
9597
9597
  })).map((C) => {
9598
- const _ = C[g];
9599
- let A = _;
9600
- return Array.isArray(_) && (A = _[1]), { label: A, value: C.id };
9598
+ const O = C[g];
9599
+ let A = O;
9600
+ return Array.isArray(O) && (A = O[1]), { label: A, value: C.id };
9601
9601
  });
9602
- l(O);
9602
+ l(_);
9603
9603
  } catch (T) {
9604
9604
  u(T);
9605
9605
  } finally {
@@ -9616,8 +9616,8 @@ const Od = ht(_d), Id = (e) => {
9616
9616
  const T = o.map((C) => F.includes(C.id) ? C.operation == "pendingRemove" ? {
9617
9617
  ...C,
9618
9618
  operation: "original"
9619
- } : C : { id: C.id, operation: "pendingRemove" }), O = T.map((C) => C.id);
9620
- F.filter((C) => !O.includes(C)).map((C) => {
9619
+ } : C : { id: C.id, operation: "pendingRemove" }), _ = T.map((C) => C.id);
9620
+ F.filter((C) => !_.includes(C)).map((C) => {
9621
9621
  T.push({ id: C, operation: "pendingLink" });
9622
9622
  }), x(T);
9623
9623
  };
@@ -9629,7 +9629,7 @@ const Od = ht(_d), Id = (e) => {
9629
9629
  disabled: h,
9630
9630
  onChange: V,
9631
9631
  style: { width: "100%" },
9632
- children: /* @__PURE__ */ r(Oe, { children: a.map((F) => /* @__PURE__ */ r(he, { span: Math.floor(24 / y), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
9632
+ children: /* @__PURE__ */ r(_e, { children: a.map((F) => /* @__PURE__ */ r(he, { span: Math.floor(24 / y), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
9633
9633
  }
9634
9634
  ),
9635
9635
  !h && /* @__PURE__ */ D(Ue, { children: [
@@ -9692,14 +9692,17 @@ const Od = ht(_d), Id = (e) => {
9692
9692
  }
9693
9693
  )) });
9694
9694
  }, $d = (e) => {
9695
- const { ooui: t } = e, { lang: n, height: i } = t, o = re(He), { elementHasLostFocus: s } = o || {};
9695
+ const { ooui: t } = e, { lang: n, height: i, readOnly: o } = t, s = re(He), { elementHasLostFocus: a } = s || {};
9696
9696
  return /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(
9697
9697
  ms,
9698
9698
  {
9699
+ options: {
9700
+ readOnly: o
9701
+ },
9699
9702
  defaultLanguage: n || "",
9700
9703
  height: i || 300,
9701
- onMount: (l) => {
9702
- l.onDidBlurEditorWidget(s);
9704
+ onMount: (d) => {
9705
+ d.onDidBlurEditorWidget(a);
9703
9706
  }
9704
9707
  }
9705
9708
  ) });
@@ -9788,20 +9791,20 @@ function Xd(e, t) {
9788
9791
  res_id: F,
9789
9792
  domain: T = []
9790
9793
  }) {
9791
- const O = await P.getHandler().getActionData({
9794
+ const _ = await P.getHandler().getActionData({
9792
9795
  action: S,
9793
9796
  context: l
9794
9797
  });
9795
- if (O.type === "ir.actions.wizard") {
9798
+ if (_.type === "ir.actions.wizard") {
9796
9799
  Qe("Action type not supported");
9797
9800
  return;
9798
9801
  }
9799
- const [C, _] = S.split(","), A = parseInt(_), N = xt({
9800
- context: O.context,
9802
+ const [C, O] = S.split(","), A = parseInt(O), N = xt({
9803
+ context: _.context,
9801
9804
  values: a,
9802
9805
  fields: {}
9803
- }), j = O.domain ? await P.getHandler().evalDomain({
9804
- domain: O.domain,
9806
+ }), j = _.domain ? await P.getHandler().evalDomain({
9807
+ domain: _.domain,
9805
9808
  values: a,
9806
9809
  context: { ...l, ...N }
9807
9810
  }) : [], {
@@ -9811,7 +9814,7 @@ function Xd(e, t) {
9811
9814
  target: Y,
9812
9815
  view_type: q,
9813
9816
  limit: Q
9814
- } = O, ne = q === "tree", B = [];
9817
+ } = _, ne = q === "tree", B = [];
9815
9818
  for (const K of U) {
9816
9819
  const [L, ce] = K;
9817
9820
  if (L)
@@ -9882,14 +9885,14 @@ function Xd(e, t) {
9882
9885
  }) {
9883
9886
  const {
9884
9887
  res_model: T,
9885
- context: O,
9888
+ context: _,
9886
9889
  domain: C,
9887
- views: _,
9890
+ views: O,
9888
9891
  target: A,
9889
9892
  string: N,
9890
9893
  limit: j
9891
- } = S, [H, U] = _[0], k = { id: H, type: U }, Y = xt({
9892
- context: O,
9894
+ } = S, [H, U] = O[0], k = { id: H, type: U }, Y = xt({
9895
+ context: _,
9893
9896
  values: { ...I, ...a },
9894
9897
  fields: R
9895
9898
  }), q = C ? await P.getHandler().evalDomain({
@@ -9904,7 +9907,7 @@ function Xd(e, t) {
9904
9907
  x({
9905
9908
  model: T,
9906
9909
  target: A,
9907
- views: _,
9910
+ views: O,
9908
9911
  context: { ...l, ...Y },
9909
9912
  domain: q,
9910
9913
  title: N,
@@ -9921,17 +9924,17 @@ function Xd(e, t) {
9921
9924
  res_id: V,
9922
9925
  view_id: F,
9923
9926
  overrideUnsettedLimit: T = !1
9924
- } = S, O = `${I},${R}`, C = await P.getHandler().getActionData({
9925
- action: O,
9927
+ } = S, _ = `${I},${R}`, C = await P.getHandler().getActionData({
9928
+ action: _,
9926
9929
  context: l
9927
- }), _ = xt({
9930
+ }), O = xt({
9928
9931
  context: C.context,
9929
9932
  values: a,
9930
9933
  fields: {}
9931
9934
  }), A = C.domain ? await P.getHandler().evalDomain({
9932
9935
  domain: C.domain,
9933
9936
  values: a,
9934
- context: { ...l, ..._ }
9937
+ context: { ...l, ...O }
9935
9938
  }) : [], {
9936
9939
  res_model: N,
9937
9940
  views: j,
@@ -9951,7 +9954,7 @@ function Xd(e, t) {
9951
9954
  model: N,
9952
9955
  type: ce,
9953
9956
  id: L,
9954
- context: { ...l, ..._ }
9957
+ context: { ...l, ...O }
9955
9958
  });
9956
9959
  Q.push([J, ce]);
9957
9960
  }
@@ -9965,7 +9968,7 @@ function Xd(e, t) {
9965
9968
  const E = { id: ne, type: B };
9966
9969
  x({
9967
9970
  domain: A,
9968
- context: { ...l, ..._ },
9971
+ context: { ...l, ...O },
9969
9972
  model: N,
9970
9973
  views: Q,
9971
9974
  title: H,
@@ -9986,9 +9989,9 @@ function Xd(e, t) {
9986
9989
  res_id: F,
9987
9990
  domain: T
9988
9991
  }) {
9989
- const O = await P.getHandler().getActionStringForModel(S);
9992
+ const _ = await P.getHandler().getActionStringForModel(S);
9990
9993
  await h({
9991
- action: O,
9994
+ action: _,
9992
9995
  values: R,
9993
9996
  forced_values: I,
9994
9997
  initialViewType: V,
@@ -10003,9 +10006,9 @@ function Xd(e, t) {
10003
10006
  views: V,
10004
10007
  title: F,
10005
10008
  target: T,
10006
- initialView: O,
10009
+ initialView: _,
10007
10010
  action_id: C,
10008
- action_type: _,
10011
+ action_type: O,
10009
10012
  res_id: A,
10010
10013
  values: N,
10011
10014
  forced_values: j,
@@ -10017,7 +10020,7 @@ function Xd(e, t) {
10017
10020
  const Y = await P.getHandler().getView({
10018
10021
  model: I,
10019
10022
  type: "form",
10020
- id: O.type === "form" ? O.id : void 0,
10023
+ id: _.type === "form" ? _.id : void 0,
10021
10024
  context: { ...l, ...R }
10022
10025
  });
10023
10026
  c.current.openActionModal({
@@ -10027,24 +10030,24 @@ function Xd(e, t) {
10027
10030
  context: { ...l, ...R },
10028
10031
  actionData: {
10029
10032
  action_id: C,
10030
- action_type: _,
10033
+ action_type: O,
10031
10034
  res_id: A,
10032
10035
  view_id: Y.view_id
10033
10036
  }
10034
10037
  });
10035
10038
  } else {
10036
- const Y = O && Array.isArray(O.id) ? { ...O, id: O.id[0] } : O;
10039
+ const Y = _ && Array.isArray(_.id) ? { ..._, id: _.id[0] } : _;
10037
10040
  g({
10038
10041
  title: F,
10039
10042
  action: {
10040
10043
  id: C,
10041
- type: _
10044
+ type: O
10042
10045
  },
10043
10046
  content: /* @__PURE__ */ r(
10044
10047
  Ko,
10045
10048
  {
10046
10049
  action_id: C,
10047
- action_type: _,
10050
+ action_type: O,
10048
10051
  tabKey: k,
10049
10052
  title: F,
10050
10053
  views: V,
@@ -10065,7 +10068,7 @@ function Xd(e, t) {
10065
10068
  }
10066
10069
  }
10067
10070
  return /* @__PURE__ */ r(
10068
- _a,
10071
+ Oa,
10069
10072
  {
10070
10073
  openShortcut: w,
10071
10074
  openAction: x,
@@ -10210,11 +10213,11 @@ const { useToken: nu } = Be, Yu = (e) => {
10210
10213
  currentView: w,
10211
10214
  currentId: b,
10212
10215
  openDefaultActionForModel: x
10213
- } = p || {}, S = _e(() => {
10216
+ } = p || {}, S = Oe(() => {
10214
10217
  if (!w || !w.view_id || !w.extra)
10215
10218
  return;
10216
- const { action_id: C, action_type: _ } = w.extra || {};
10217
- if (!C || !_) {
10219
+ const { action_id: C, action_type: O } = w.extra || {};
10220
+ if (!C || !O) {
10218
10221
  l(!1);
10219
10222
  return;
10220
10223
  }
@@ -10222,11 +10225,11 @@ const { useToken: nu } = Be, Yu = (e) => {
10222
10225
  let N = !1;
10223
10226
  return w.type === "form" && (N = b || !1), {
10224
10227
  action_id: C,
10225
- action_type: _,
10228
+ action_type: O,
10226
10229
  view_id: A,
10227
10230
  res_id: N
10228
10231
  };
10229
- }, [b, w]), R = _e(() => {
10232
+ }, [b, w]), R = Oe(() => {
10230
10233
  if (S)
10231
10234
  return JSON.stringify(S);
10232
10235
  }, [S]);
@@ -10234,8 +10237,8 @@ const { useToken: nu } = Be, Yu = (e) => {
10234
10237
  V();
10235
10238
  }, [R]);
10236
10239
  function I(C) {
10237
- const _ = C;
10238
- (_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && h(_);
10240
+ const O = C;
10241
+ (O == null ? void 0 : O.action_type) !== "ir.actions.wizard" && h(O);
10239
10242
  }
10240
10243
  const V = de(async () => {
10241
10244
  if (!S)
@@ -10264,20 +10267,20 @@ const { useToken: nu } = Be, Yu = (e) => {
10264
10267
  }))
10265
10268
  }
10266
10269
  ];
10267
- }, [t, f]), O = de(async () => {
10270
+ }, [t, f]), _ = de(async () => {
10268
10271
  if (a && d)
10269
10272
  await o(d);
10270
10273
  else {
10271
10274
  if (!w)
10272
10275
  return;
10273
- const C = g.find((H) => H.key === y), { id: _, type: A } = (C == null ? void 0 : C.action) || {}, N = w.view_id;
10276
+ const C = g.find((H) => H.key === y), { id: O, type: A } = (C == null ? void 0 : C.action) || {}, N = w.view_id;
10274
10277
  let j = !1;
10275
- if (!_ || !A) {
10278
+ if (!O || !A) {
10276
10279
  l(!1);
10277
10280
  return;
10278
10281
  }
10279
10282
  w.type === "form" && (j = b || !1), await i({
10280
- action_id: _,
10283
+ action_id: O,
10281
10284
  action_type: A,
10282
10285
  view_id: N,
10283
10286
  res_id: j
@@ -10300,7 +10303,7 @@ const { useToken: nu } = Be, Yu = (e) => {
10300
10303
  {
10301
10304
  ref: m,
10302
10305
  isFavourite: a,
10303
- onToggleFavourite: O,
10306
+ onToggleFavourite: _,
10304
10307
  onItemClick: I,
10305
10308
  placement: "bottomRight",
10306
10309
  header: /* @__PURE__ */ D("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
@@ -10335,7 +10338,7 @@ export {
10335
10338
  P as ConnectionProvider,
10336
10339
  Va as ContentRootProvider,
10337
10340
  Gu as CurrentTabContent,
10338
- Od as Dashboard,
10341
+ _d as Dashboard,
10339
10342
  yd as DashboardGrid,
10340
10343
  bd as DashboardGridItem,
10341
10344
  Vc as Date,