@gisce/react-ooui 2.6.1 → 2.6.3-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,7 +2,7 @@ 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 fe, Fragment as Mr, useMemo as _e, memo as $n } from "react";
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
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";
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";
@@ -596,7 +596,7 @@ const io = (e) => {
596
596
  }
597
597
  h(!1), a();
598
598
  }
599
- function A() {
599
+ function V() {
600
600
  return c ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ D(ee, { children: [
601
601
  R(),
602
602
  /* @__PURE__ */ r(cn, {}),
@@ -636,7 +636,7 @@ const io = (e) => {
636
636
  footer: null,
637
637
  destroyOnClose: !0,
638
638
  maskClosable: !1,
639
- children: A()
639
+ children: V()
640
640
  }
641
641
  );
642
642
  };
@@ -1088,14 +1088,14 @@ const nr = async (e) => {
1088
1088
  }, ea = (e) => {
1089
1089
  const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [d, u] = v(), [f, c] = v(!1), [m, p] = v(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: b } = i, x = s.filter((F) => F.values), S = re(He), { getContext: R } = S || {};
1090
1090
  Ft(() => {
1091
- A();
1091
+ V();
1092
1092
  }, [s]);
1093
1093
  const I = (F) => {
1094
1094
  o == null || o({
1095
1095
  items: F
1096
1096
  });
1097
1097
  };
1098
- async function A() {
1098
+ async function V() {
1099
1099
  l(!0), u(void 0);
1100
1100
  try {
1101
1101
  const [F] = await nr({
@@ -1170,7 +1170,7 @@ const nr = async (e) => {
1170
1170
  c(!1);
1171
1171
  },
1172
1172
  readOnly: y,
1173
- postSaveAction: A
1173
+ postSaveAction: V
1174
1174
  }
1175
1175
  )
1176
1176
  ] });
@@ -1390,24 +1390,24 @@ const Nt = ({
1390
1390
  return Array.isArray(O) && (C = O[1]), { label: C, value: T.id };
1391
1391
  });
1392
1392
  l(F);
1393
- } catch (A) {
1394
- u(A);
1393
+ } catch (V) {
1394
+ u(V);
1395
1395
  } finally {
1396
1396
  c(!1);
1397
1397
  }
1398
1398
  }
1399
1399
  const S = (I) => {
1400
- const A = o.map((T) => I.includes(T.id) ? T.operation == "pendingRemove" ? {
1400
+ const V = o.map((T) => I.includes(T.id) ? T.operation === "pendingRemove" ? {
1401
1401
  ...T,
1402
1402
  operation: "pendingLink"
1403
- } : T : { id: T.id, operation: "pendingRemove" }), F = A.map((T) => T.id);
1404
- I.filter((T) => !F.includes(T)).map((T) => {
1405
- A.push({ id: T, operation: "pendingLink" });
1406
- }), b(A);
1403
+ } : T : { id: T.id, operation: "pendingRemove" }), F = V.map((T) => T.id);
1404
+ I.filter((T) => !F.includes(T)).forEach((T) => {
1405
+ V.push({ id: T, operation: "pendingLink" });
1406
+ }), b(V);
1407
1407
  }, R = (I) => {
1408
- const { label: A, closable: F, onClose: T } = I, O = (_) => {
1408
+ const { label: V, closable: F, onClose: T } = I, O = (_) => {
1409
1409
  _.preventDefault(), _.stopPropagation();
1410
- }, C = Wt(A);
1410
+ }, C = Wt(V);
1411
1411
  return /* @__PURE__ */ r(
1412
1412
  rr,
1413
1413
  {
@@ -1416,7 +1416,7 @@ const Nt = ({
1416
1416
  closable: F,
1417
1417
  onClose: T,
1418
1418
  closeIcon: /* @__PURE__ */ r("span", { style: { color: C }, children: "X" }),
1419
- children: A
1419
+ children: V
1420
1420
  }
1421
1421
  );
1422
1422
  };
@@ -1430,7 +1430,8 @@ const Nt = ({
1430
1430
  disabled: h,
1431
1431
  options: a,
1432
1432
  onChange: S,
1433
- loading: f
1433
+ loading: f,
1434
+ filterOption: (I, V) => V.label.toLowerCase().includes(I.toString())
1434
1435
  }
1435
1436
  ) }) });
1436
1437
  }, ma = (e) => {
@@ -1667,12 +1668,12 @@ const Nt = ({
1667
1668
  setSelectedRowItems: S,
1668
1669
  selectedRowItems: R,
1669
1670
  searchTreeNameSearch: I,
1670
- setSearchTreeNameSearch: A,
1671
+ setSearchTreeNameSearch: V,
1671
1672
  goToResourceId: F,
1672
1673
  limit: T
1673
- } = e, [O, C] = v(!1), [_, V] = 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, [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
1675
  T !== void 0 ? T : St
1675
- ), [Me, de] = v(i);
1676
+ ), [Me, ue] = v(i);
1676
1677
  me(() => {
1677
1678
  m && m.length > 0 && !p && (h == null || h(0), f == null || f(m[0].id));
1678
1679
  }, [m]), me(() => {
@@ -1705,7 +1706,7 @@ const Nt = ({
1705
1706
  formIsSaving: O,
1706
1707
  setFormIsSaving: C,
1707
1708
  formHasChanges: _,
1708
- setFormHasChanges: V,
1709
+ setFormHasChanges: A,
1709
1710
  formRef: a,
1710
1711
  searchTreeRef: l,
1711
1712
  onFormSave: Fe,
@@ -1738,7 +1739,7 @@ const Nt = ({
1738
1739
  totalItems: b,
1739
1740
  setTotalItems: x,
1740
1741
  searchTreeNameSearch: I,
1741
- setSearchTreeNameSearch: A,
1742
+ setSearchTreeNameSearch: V,
1742
1743
  setGraphIsLoading: te,
1743
1744
  graphIsLoading: J,
1744
1745
  previousView: ve,
@@ -1748,7 +1749,7 @@ const Nt = ({
1748
1749
  setSearchValues: Se,
1749
1750
  limit: Ee,
1750
1751
  setLimit: ke,
1751
- setTitle: de
1752
+ setTitle: ue
1752
1753
  },
1753
1754
  children: t
1754
1755
  }
@@ -1801,10 +1802,10 @@ const Nt = ({
1801
1802
  context: {}
1802
1803
  }
1803
1804
  );
1804
- async function y(A) {
1805
- const { reportData: F, fields: T, values: O, context: C = {} } = A, {
1805
+ async function y(V) {
1806
+ const { reportData: F, fields: T, values: O, context: C = {} } = V, {
1806
1807
  context: _,
1807
- model: V,
1808
+ model: A,
1808
1809
  datas: N = {},
1809
1810
  report_name: j,
1810
1811
  type: H
@@ -1820,7 +1821,7 @@ const Nt = ({
1820
1821
  }) : _;
1821
1822
  try {
1822
1823
  const q = await P.getHandler().createReport({
1823
- model: V,
1824
+ model: A,
1824
1825
  name: j,
1825
1826
  datas: N,
1826
1827
  ids: k,
@@ -1833,11 +1834,11 @@ const Nt = ({
1833
1834
  s.current = !1, clearInterval(o.current), Qe(q), l(!1);
1834
1835
  }
1835
1836
  }
1836
- async function w(A) {
1837
+ async function w(V) {
1837
1838
  let F;
1838
1839
  try {
1839
1840
  if (F = await P.getHandler().getReport({
1840
- id: A
1841
+ id: V
1841
1842
  }), F.state && s.current === !0) {
1842
1843
  s.current = !1, clearInterval(o.current), l(!1);
1843
1844
  const T = await Et(F.result);
@@ -1848,48 +1849,48 @@ const Nt = ({
1848
1849
  }
1849
1850
  }
1850
1851
  async function b({
1851
- actionData: A,
1852
+ actionData: V,
1852
1853
  fields: F,
1853
1854
  values: T,
1854
1855
  context: O,
1855
1856
  onRefreshParentValues: C
1856
1857
  }) {
1857
- const { type: _ } = A;
1858
+ const { type: _ } = V;
1858
1859
  if (f.current.push(C), _ === "ir.actions.report.xml")
1859
1860
  return await y({
1860
- reportData: A,
1861
+ reportData: V,
1861
1862
  fields: F,
1862
1863
  values: T,
1863
1864
  context: O
1864
1865
  });
1865
1866
  if (_ === "ir.actions.act_window")
1866
- return await x({ actionData: A, fields: F, values: T, context: O });
1867
+ return await x({ actionData: V, fields: F, values: T, context: O });
1867
1868
  if (_ === "ir.actions.act_url")
1868
1869
  window.open(
1869
- ca(A.url, { ...T, context: O }),
1870
+ ca(V.url, { ...T, context: O }),
1870
1871
  "_blank"
1871
1872
  );
1872
1873
  else
1873
1874
  return Qe(`${_} action not supported`), {};
1874
1875
  }
1875
1876
  async function x({
1876
- actionData: A,
1877
+ actionData: V,
1877
1878
  fields: F = {},
1878
1879
  values: T = {},
1879
1880
  context: O = {}
1880
1881
  }) {
1881
1882
  var j;
1882
- let C = A;
1883
- A.res_model || (C = (await P.getHandler().readObjects({
1883
+ let C = V;
1884
+ V.res_model || (C = (await P.getHandler().readObjects({
1884
1885
  model: "ir.actions.act_window",
1885
- ids: [parseInt(A.id)],
1886
+ ids: [parseInt(V.id)],
1886
1887
  context: O
1887
1888
  }))[0]);
1888
1889
  const _ = typeof (C == null ? void 0 : C.context) == "string" ? xt({
1889
1890
  context: C.context,
1890
1891
  fields: F,
1891
1892
  values: { ...T, ...i }
1892
- }) : C.context, V = {
1893
+ }) : C.context, A = {
1893
1894
  ...O,
1894
1895
  ..._
1895
1896
  };
@@ -1901,30 +1902,30 @@ const Nt = ({
1901
1902
  values: { ...T, ...i }
1902
1903
  }),
1903
1904
  fields: F,
1904
- context: V
1905
+ context: A
1905
1906
  })), C.target === "new") {
1906
1907
  const H = await P.getHandler().getView({
1907
1908
  model: C.res_model,
1908
1909
  type: "form",
1909
1910
  id: ((j = C == null ? void 0 : C.view_id) == null ? void 0 : j[0]) || void 0,
1910
- context: V
1911
+ context: A
1911
1912
  });
1912
1913
  return S({
1913
1914
  domain: N,
1914
1915
  model: C.res_model,
1915
1916
  formView: H,
1916
- context: V
1917
+ context: A
1917
1918
  }), {};
1918
1919
  } else {
1919
1920
  const { initialView: H, views: U } = await Ia({
1920
1921
  model: C.res_model,
1921
- context: V,
1922
+ context: A,
1922
1923
  view_mode: C.view_mode,
1923
1924
  views: C.views
1924
1925
  });
1925
1926
  return u == null || u({
1926
1927
  target: "current",
1927
- context: V,
1928
+ context: A,
1928
1929
  domain: N,
1929
1930
  model: C.res_model,
1930
1931
  views: U,
@@ -1936,16 +1937,16 @@ const Nt = ({
1936
1937
  }
1937
1938
  }
1938
1939
  function S({
1939
- domain: A,
1940
+ domain: V,
1940
1941
  model: F,
1941
1942
  formView: T,
1942
1943
  context: O,
1943
1944
  actionData: C
1944
1945
  }) {
1945
- m ? R({ domain: A, model: F, formView: T, context: O, actionData: C }) : (g({ domain: A, model: F, context: O, formView: T, actionData: C }), p(!0));
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
1947
  }
1947
1948
  async function R({
1948
- domain: A,
1949
+ domain: V,
1949
1950
  model: F,
1950
1951
  formView: T,
1951
1952
  context: O,
@@ -1957,7 +1958,7 @@ const Nt = ({
1957
1958
  context: {},
1958
1959
  formView: void 0,
1959
1960
  actionData: void 0
1960
- }), p(!1), await new Promise((_) => setTimeout(_, 300)), g({ domain: A, model: F, context: O, formView: T, actionData: C }), p(!0);
1961
+ }), p(!1), await new Promise((_) => setTimeout(_, 300)), g({ domain: V, model: F, context: O, formView: T, actionData: C }), p(!0);
1961
1962
  }
1962
1963
  async function I() {
1963
1964
  Fr(f.current), f.current = [], p(!1), g({
@@ -2111,11 +2112,11 @@ function Ea(e, t) {
2111
2112
  rootForm: S = !1,
2112
2113
  defaultValues: R,
2113
2114
  forcedValues: I = {},
2114
- parentWidth: A
2115
- } = e, { t: F } = ge(), [T, O] = v(!1), [C, _] = v(), [V, 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 = (A !== void 0 ? A : Q) < Da, Se = re(He), { activeId: Ee, getPlainValues: ke } = Se || {}, Me = re(
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
2117
  nt
2117
2118
  ), {
2118
- setFormIsSaving: de = void 0,
2119
+ setFormIsSaving: ue = void 0,
2119
2120
  setFormHasChanges: Fe = void 0,
2120
2121
  setCurrentId: Le = void 0,
2121
2122
  setFormIsLoading: ae = void 0,
@@ -2149,12 +2150,12 @@ function Ea(e, t) {
2149
2150
  elementHasLostFocus: !0
2150
2151
  }), E(!1));
2151
2152
  }, [B]);
2152
- const ue = (M, $, X, Z) => {
2153
- Fe == null || Fe(!1), de == null || de(!1), s == null || s(M, $, X, Z), Le == null || Le(M);
2153
+ const fe = (M, $, X, Z) => {
2154
+ Fe == null || Fe(!1), ue == null || ue(!1), s == null || s(M, $, X, Z), Le == null || Le(M);
2154
2155
  }, pe = () => {
2155
- de == null || de(!1), o == null || o();
2156
+ ue == null || ue(!1), o == null || o();
2156
2157
  }, we = (M) => {
2157
- de == null || de(!1), u == null || u(M);
2158
+ ue == null || ue(!1), u == null || u(M);
2158
2159
  };
2159
2160
  function se() {
2160
2161
  return i || K.current;
@@ -2187,7 +2188,7 @@ function Ea(e, t) {
2187
2188
  return M;
2188
2189
  }
2189
2190
  function Re() {
2190
- return { ...w, ...V == null ? void 0 : V.context };
2191
+ return { ...w, ...A == null ? void 0 : A.context };
2191
2192
  }
2192
2193
  function xe() {
2193
2194
  return se() ? { active_id: se(), active_ids: [se()] } : {};
@@ -2202,7 +2203,7 @@ function Ea(e, t) {
2202
2203
  };
2203
2204
  }
2204
2205
  const Ve = async (M) => {
2205
- const $ = se() ? V == null ? void 0 : V.context : {};
2206
+ const $ = se() ? A == null ? void 0 : A.context : {};
2206
2207
  return await P.getHandler().defaultGet({
2207
2208
  model: n,
2208
2209
  fields: M,
@@ -2338,7 +2339,7 @@ function Ea(e, t) {
2338
2339
  fields: k,
2339
2340
  context: {
2340
2341
  ...w,
2341
- ...V == null ? void 0 : V.context
2342
+ ...A == null ? void 0 : A.context
2342
2343
  }
2343
2344
  }), L.current = Ge(k);
2344
2345
  } else {
@@ -2348,20 +2349,20 @@ function Ea(e, t) {
2348
2349
  fields: k,
2349
2350
  context: {
2350
2351
  ...w,
2351
- ...V == null ? void 0 : V.context
2352
+ ...A == null ? void 0 : A.context
2352
2353
  }
2353
2354
  });
2354
2355
  K.current = Z, L.current = X;
2355
2356
  }
2356
- g && await g([se()]), !y && $ && (ue == null || ue(se(), De(), oe()));
2357
+ g && await g([se()]), !y && $ && (fe == null || fe(se(), De(), oe()));
2357
2358
  }, jo = async (M) => {
2358
2359
  const { callOnSubmitSucceed: $ = !0 } = M || {};
2359
- !y && $ && (ue == null || ue(se(), De(), oe()));
2360
+ !y && $ && (fe == null || fe(se(), De(), oe()));
2360
2361
  }, Zt = async (M) => {
2361
2362
  let $ = !1;
2362
2363
  const { callOnSubmitSucceed: X = !0 } = M || {};
2363
2364
  if (te.current = !0, _(void 0), ve.current && !tt() && se() && X) {
2364
- te.current = !1, Fe == null || Fe(!1), ue == null || ue(
2365
+ te.current = !1, Fe == null || Fe(!1), fe == null || fe(
2365
2366
  se(),
2366
2367
  De(),
2367
2368
  oe(),
@@ -2374,13 +2375,13 @@ function Ea(e, t) {
2374
2375
  return te.current = !1, Fe == null || Fe(!1), pe == null || pe(), { succeed: !0, id: se() };
2375
2376
  if (await Qt())
2376
2377
  return te.current = !1, Tr(F), { succeed: !1, id: se() };
2377
- O(!0), de == null || de(!0);
2378
+ O(!0), ue == null || ue(!0);
2378
2379
  try {
2379
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"));
2380
2381
  } catch (Z) {
2381
- te.current = !1, O(!1), de == null || de(!1), we == null || we(Z), Tn.error(F("errorWhileSavingForm")), _(Z != null && Z.message ? Z.message : 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
2383
  } finally {
2383
- te.current = !1, de == null || de(!1), O(!1);
2384
+ te.current = !1, ue == null || ue(!1), O(!1);
2384
2385
  }
2385
2386
  return { succeed: $, id: se() };
2386
2387
  }, Ht = ({
@@ -2413,7 +2414,7 @@ function Ea(e, t) {
2413
2414
  }), X = Object.keys($);
2414
2415
  if (X.length !== 0 && !(ia({
2415
2416
  changedFields: X,
2416
- formOoui: V,
2417
+ formOoui: A,
2417
2418
  types: [
2418
2419
  "text",
2419
2420
  "codeeditor",
@@ -2439,7 +2440,7 @@ function Ea(e, t) {
2439
2440
  Qe($);
2440
2441
  }
2441
2442
  }, Yo = async (M) => {
2442
- const $ = V == null ? void 0 : V.onChangeFields[M];
2443
+ const $ = A == null ? void 0 : A.onChangeFields[M];
2443
2444
  if (!$) {
2444
2445
  Ht({
2445
2446
  fields: k,
@@ -2453,7 +2454,7 @@ function Ea(e, t) {
2453
2454
  ...Ge(k),
2454
2455
  context: {
2455
2456
  ...w,
2456
- ...V == null ? void 0 : V.context
2457
+ ...A == null ? void 0 : A.context
2457
2458
  }
2458
2459
  },
2459
2460
  parentValues: ke == null ? void 0 : ke(),
@@ -2510,15 +2511,15 @@ function Ea(e, t) {
2510
2511
  action: M,
2511
2512
  payload: [se()],
2512
2513
  context: {
2513
- ...V == null ? void 0 : V.context,
2514
+ ...A == null ? void 0 : A.context,
2514
2515
  ...w,
2515
2516
  ...$
2516
2517
  }
2517
2518
  });
2518
2519
  if (typeof X == "object" && X !== null && Object.keys(X).length === 0 && y)
2519
- ue == null || ue(se(), De(), oe());
2520
+ fe == null || fe(se(), De(), oe());
2520
2521
  else if (X.type && X.type === "ir.actions.act_window_close")
2521
- ue == null || ue(se(), De(), oe());
2522
+ fe == null || fe(se(), De(), oe());
2522
2523
  else if (X.type) {
2523
2524
  let Z = {};
2524
2525
  X.context && (Z = xt({
@@ -2538,7 +2539,7 @@ function Ea(e, t) {
2538
2539
  action: M,
2539
2540
  payload: se()
2540
2541
  });
2541
- $.type && $.type === "ir.actions.act_window_close" ? ue == null || ue(se(), De(), oe()) : await at({ forceRefresh: !0 });
2542
+ $.type && $.type === "ir.actions.act_window_close" ? fe == null || fe(se(), De(), oe()) : await at({ forceRefresh: !0 });
2542
2543
  }
2543
2544
  async function Jo({
2544
2545
  action: M,
@@ -2561,14 +2562,14 @@ function Ea(e, t) {
2561
2562
  values: De(),
2562
2563
  context: {
2563
2564
  ...w,
2564
- ...V == null ? void 0 : V.context,
2565
+ ...A == null ? void 0 : A.context,
2565
2566
  ...$
2566
2567
  },
2567
2568
  onRefreshParentValues: () => {
2568
2569
  at({ forceRefresh: !0 });
2569
2570
  }
2570
2571
  })) || {};
2571
- !S && X && (ue == null || ue(se(), De(), oe()));
2572
+ !S && X && (fe == null || fe(se(), De(), oe()));
2572
2573
  }
2573
2574
  function Xo() {
2574
2575
  bn({ elementHasLostFocus: !0 });
@@ -2603,7 +2604,7 @@ function Ea(e, t) {
2603
2604
  Z && Cn(!1), Qe(Ce);
2604
2605
  }
2605
2606
  }
2606
- const Zo = () => !V && !C ? /* @__PURE__ */ r($e, {}) : !n && !h || !x ? null : /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
2607
+ const Zo = () => !A && !C ? /* @__PURE__ */ r($e, {}) : !n && !h || !x ? null : /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
2607
2608
  xs,
2608
2609
  {
2609
2610
  getValues: De,
@@ -2628,10 +2629,10 @@ function Ea(e, t) {
2628
2629
  Uo({ elementHasLostFocus: !1 });
2629
2630
  },
2630
2631
  component: !1,
2631
- children: V && /* @__PURE__ */ r(
2632
+ children: A && /* @__PURE__ */ r(
2632
2633
  En,
2633
2634
  {
2634
- container: V.container,
2635
+ container: A.container,
2635
2636
  responsiveBehaviour: ie
2636
2637
  }
2637
2638
  )
@@ -2722,7 +2723,7 @@ const zt = ht(Ea), Jt = (e) => {
2722
2723
  }
2723
2724
  h(!p);
2724
2725
  }
2725
- function A() {
2726
+ function V() {
2726
2727
  return /* @__PURE__ */ D(Oe, { align: "middle", children: [
2727
2728
  /* @__PURE__ */ r(he, { children: /* @__PURE__ */ r(
2728
2729
  Pe,
@@ -2740,7 +2741,7 @@ const zt = ht(Ea), Jt = (e) => {
2740
2741
  return /* @__PURE__ */ r(Fa, { setTitle: m, children: /* @__PURE__ */ r(
2741
2742
  Je,
2742
2743
  {
2743
- title: a ? A() : c,
2744
+ title: a ? V() : c,
2744
2745
  centered: !0,
2745
2746
  width: f,
2746
2747
  open: t,
@@ -3128,24 +3129,24 @@ function wo(e) {
3128
3129
  me(() => {
3129
3130
  I.setFieldsValue(m);
3130
3131
  }, [m]);
3131
- const A = () => {
3132
+ const V = () => {
3132
3133
  if (!y)
3133
3134
  return;
3134
3135
  const O = b ? y : h, C = O == null ? void 0 : O.rows;
3135
- return C == null ? void 0 : C.map((_, V) => /* @__PURE__ */ r(Oe, { children: _.map((N, j) => /* @__PURE__ */ r(he, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r(Ya, { field: N }) }, j)) }, V));
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));
3136
3137
  };
3137
3138
  Ft(() => {
3138
3139
  x(!1), S.current = new yi(n, t), S.current.parse(), g(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3139
3140
  }, [t, n]);
3140
- const F = A(), T = (O) => {
3141
+ const F = V(), T = (O) => {
3141
3142
  var N;
3142
3143
  const { limit: C, offset: _ } = O;
3143
3144
  delete O.offset, delete O.limit;
3144
- const V = Ja(
3145
+ const A = Ja(
3145
3146
  O,
3146
3147
  (N = S.current) == null ? void 0 : N._advancedSearchContainer
3147
3148
  );
3148
- o({ params: V, offset: _, limit: C, searchValues: O });
3149
+ o({ params: A, offset: _, limit: C, searchValues: O });
3149
3150
  };
3150
3151
  return /* @__PURE__ */ r(
3151
3152
  er,
@@ -3311,7 +3312,7 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3311
3312
  onItemClick: t,
3312
3313
  onOpenChange: n
3313
3314
  }) => {
3314
- const [i, o] = v(!1), [s, a] = v(!1), { t: l } = ge(), [d, u] = v(), f = fe(async () => {
3315
+ const [i, o] = v(!1), [s, a] = v(!1), { t: l } = ge(), [d, u] = v(), f = de(async () => {
3315
3316
  const {
3316
3317
  actionItems: c = [],
3317
3318
  relateItems: m = [],
@@ -3387,7 +3388,7 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3387
3388
  me(() => () => {
3388
3389
  i();
3389
3390
  }, []);
3390
- const n = fe(
3391
+ const n = de(
3391
3392
  async (o, s) => {
3392
3393
  var d;
3393
3394
  const a = s || tr();
@@ -3403,7 +3404,7 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3403
3404
  }
3404
3405
  },
3405
3406
  [e]
3406
- ), i = fe((o) => {
3407
+ ), i = de((o) => {
3407
3408
  var s;
3408
3409
  o ? ((s = t.current.get(o)) == null || s.abort(), t.current.delete(o)) : (t.current.forEach((a) => a.abort()), t.current.clear());
3409
3410
  }, []);
@@ -3417,9 +3418,9 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3417
3418
  P.getHandler().getView
3418
3419
  ), [h, g] = Xe(
3419
3420
  P.getHandler().readObjects
3420
- ), y = fe(() => {
3421
+ ), y = de(() => {
3421
3422
  p(), g();
3422
- }, [p, g]), w = fe(async () => {
3423
+ }, [p, g]), w = de(async () => {
3423
3424
  var I;
3424
3425
  const x = await m({
3425
3426
  model: n,
@@ -3503,7 +3504,7 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3503
3504
  /* @__PURE__ */ r(or, { id: t.id, model: t.model })
3504
3505
  ] }) : /* @__PURE__ */ r(ee, {});
3505
3506
  }, hl = (e) => {
3506
- const { value: t, context: n, selectionValues: i } = e, [o, s] = v(), [a, l] = v(!1), [d, u] = t ? t.split(",") : [], f = parseInt(u), c = fe(async () => {
3507
+ const { value: t, context: n, selectionValues: i } = e, [o, s] = v(), [a, l] = v(!1), [d, u] = t ? t.split(",") : [], f = parseInt(u), c = de(async () => {
3507
3508
  if (!t || t && o)
3508
3509
  return;
3509
3510
  l(!0);
@@ -3682,7 +3683,7 @@ const pl = (e) => {
3682
3683
  ooui: n,
3683
3684
  context: i
3684
3685
  }) => {
3685
- const [o, s] = v([]), [a, l] = v(!1), { relation: d, field: u } = n, f = fe(async () => {
3686
+ const [o, s] = v([]), [a, l] = v(!1), { relation: d, field: u } = n, f = de(async () => {
3686
3687
  try {
3687
3688
  l(!0);
3688
3689
  const m = await P.getHandler().search({
@@ -3767,8 +3768,8 @@ const pl = (e) => {
3767
3768
  rootTree: S = !1,
3768
3769
  context: R,
3769
3770
  readonly: I,
3770
- onSelectAllRecords: A
3771
- } = e, F = le(null), [T, O] = v([]), C = le(!1), [_, V] = v(), { t: N } = ge(), j = le(i), H = re(
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
3773
  nt
3773
3774
  ), { title: U = void 0, setTitle: k = void 0 } = (S ? H : {}) || {}, Y = _e(() => {
3774
3775
  if (_)
@@ -3787,7 +3788,7 @@ const pl = (e) => {
3787
3788
  }
3788
3789
  })), me(() => {
3789
3790
  const J = At(s);
3790
- V(J), J.string && U !== J.string && (k == null || k(J.string));
3791
+ A(J), J.string && U !== J.string && (k == null || k(J.string));
3791
3792
  }, [s, U]), me(() => {
3792
3793
  if (!_)
3793
3794
  return;
@@ -3804,7 +3805,7 @@ const pl = (e) => {
3804
3805
  (te) => c && c.includes(te.id)
3805
3806
  ).length;
3806
3807
  return d ? null : o === void 0 ? /* @__PURE__ */ r($e, { className: "pb-4" }) : /* @__PURE__ */ D(Oe, { align: "bottom", className: "pb-4", children: [
3807
- /* @__PURE__ */ r(he, { span: A ? 8 : 12, children: /* @__PURE__ */ r(
3808
+ /* @__PURE__ */ r(he, { span: V ? 8 : 12, children: /* @__PURE__ */ r(
3808
3809
  di,
3809
3810
  {
3810
3811
  total: o,
@@ -3814,23 +3815,23 @@ const pl = (e) => {
3814
3815
  onChange: l
3815
3816
  }
3816
3817
  ) }),
3817
- A && /* @__PURE__ */ r(he, { span: 8, className: "text-center", children: /* @__PURE__ */ r(
3818
+ V && /* @__PURE__ */ r(he, { span: 8, className: "text-center", children: /* @__PURE__ */ r(
3818
3819
  al,
3819
3820
  {
3820
3821
  numberOfVisibleSelectedRows: J,
3821
3822
  numberOfRealSelectedRows: (c == null ? void 0 : c.length) || 0,
3822
3823
  numberOfTotalRows: T.length,
3823
3824
  totalRecords: o || 0,
3824
- onSelectAllRecords: A
3825
+ onSelectAllRecords: V
3825
3826
  }
3826
3827
  ) }),
3827
- /* @__PURE__ */ r(he, { span: A ? 8 : 12, className: "text-right", children: ne })
3828
+ /* @__PURE__ */ r(he, { span: V ? 8 : 12, className: "text-right", children: ne })
3828
3829
  ] });
3829
3830
  }, [
3830
3831
  T,
3831
3832
  d,
3832
3833
  l,
3833
- A,
3834
+ V,
3834
3835
  n,
3835
3836
  c,
3836
3837
  f,
@@ -3915,14 +3916,14 @@ const So = (e) => {
3915
3916
  limit: S,
3916
3917
  setLimit: R,
3917
3918
  searchParams: I = [],
3918
- setSearchValues: A,
3919
+ setSearchValues: V,
3919
3920
  clearSelection: F
3920
- } = e, [T, O] = v(!1), [C, _] = v(!1), [V, 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 = fe(
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
3922
  (ae) => {
3922
3923
  y == null || y([...ae]), ne([...ae]);
3923
3924
  },
3924
3925
  [y]
3925
- ), ve = fe(() => w || Q, [w, Q]), z = fe(async () => {
3926
+ ), ve = de(() => w || Q, [w, Q]), z = de(async () => {
3926
3927
  const ae = await P.getHandler().nameSearch({
3927
3928
  model: t,
3928
3929
  payload: l,
@@ -3942,12 +3943,12 @@ const So = (e) => {
3942
3943
  attrs: W
3943
3944
  }), Ae = ye[0];
3944
3945
  J.current = [...Ae], E(nn(ye[1])), L(Cr(ye[1]));
3945
- const ue = Ae.map((we) => we.id), pe = p !== void 0 ? Dt({
3946
+ const fe = Ae.map((we) => we.id), pe = p !== void 0 ? Dt({
3946
3947
  resultsToSort: Ae,
3947
3948
  sorter: p,
3948
3949
  fields: { ...c.fields, ...m.fields }
3949
3950
  }) : [...J.current];
3950
- te(pe), ue.length > 0 ? g == null || g(0) : g == null || g(void 0);
3951
+ te(pe), fe.length > 0 ? g == null || g(0) : g == null || g(void 0);
3951
3952
  } else
3952
3953
  te([]), g == null || g(void 0);
3953
3954
  O(!1), d.current = !0;
@@ -3963,11 +3964,11 @@ const So = (e) => {
3963
3964
  p,
3964
3965
  g,
3965
3966
  f
3966
- ]), ie = fe(
3967
+ ]), ie = de(
3967
3968
  async (ae) => {
3968
3969
  const { params: Ie, newOffset: je } = ae || {}, Ke = jt(Ie || I, b), { colors: W, status: ye } = At(c), Ae = {};
3969
3970
  W && (Ae.colors = W), ye && (Ae.status = ye);
3970
- const { totalItems: ue, results: pe, attrsEvaluated: we } = await P.getHandler().searchForTree({
3971
+ const { totalItems: fe, results: pe, attrsEvaluated: we } = await P.getHandler().searchForTree({
3971
3972
  params: Ke,
3972
3973
  limit: ce.current,
3973
3974
  offset: je || U,
@@ -3990,7 +3991,7 @@ const So = (e) => {
3990
3991
  } else
3991
3992
  g == null || g(void 0);
3992
3993
  O(!1);
3993
- const We = await ue;
3994
+ const We = await fe;
3994
3995
  q(We), f == null || f(We);
3995
3996
  },
3996
3997
  [
@@ -4008,7 +4009,7 @@ const So = (e) => {
4008
4009
  U,
4009
4010
  I
4010
4011
  ]
4011
- ), Se = fe(
4012
+ ), Se = de(
4012
4013
  async (ae) => {
4013
4014
  try {
4014
4015
  O(!0), a == null || a(!0), l && !d.current ? await z() : await ie(ae), F == null || F();
@@ -4027,7 +4028,7 @@ const So = (e) => {
4027
4028
  i,
4028
4029
  a
4029
4030
  ]
4030
- ), Ee = fe(
4031
+ ), Ee = de(
4031
4032
  (ae) => {
4032
4033
  if (JSON.stringify(ae) === JSON.stringify(p))
4033
4034
  return;
@@ -4047,10 +4048,10 @@ const So = (e) => {
4047
4048
  m == null ? void 0 : m.fields,
4048
4049
  te
4049
4050
  ]
4050
- ), ke = fe(
4051
+ ), ke = de(
4051
4052
  (ae) => {
4052
4053
  const { params: Ie, searchValues: je, limit: Ke, offset: W } = ae;
4053
- T || (n == null || n(void 0), i == null || i([]), A == null || A(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), _(!0), N(void 0), H(1), Ke && (ce.current = Ke, R == null || R(Ke)), W && k(W), Se({
4054
4055
  params: Ie,
4055
4056
  newOffset: W
4056
4057
  }));
@@ -4059,27 +4060,27 @@ const So = (e) => {
4059
4060
  T,
4060
4061
  n,
4061
4062
  i,
4062
- A,
4063
+ V,
4063
4064
  o,
4064
4065
  s,
4065
4066
  Se,
4066
4067
  R
4067
4068
  ]
4068
- ), Me = fe(
4069
+ ), Me = de(
4069
4070
  (ae) => {
4070
4071
  O(!0), H(ae), k((ae - 1) * S);
4071
4072
  },
4072
4073
  [O, S, k, H]
4073
- ), de = fe(() => {
4074
- T || (n == null || n(void 0), o == null || o([]), A == null || A({}), N(void 0), k(0), H(1), R == null || R(S || St));
4074
+ ), ue = de(() => {
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));
4075
4076
  }, [
4076
4077
  T,
4077
4078
  n,
4078
4079
  o,
4079
- A,
4080
+ V,
4080
4081
  R,
4081
4082
  S
4082
- ]), Fe = fe(
4083
+ ]), Fe = de(
4083
4084
  async (ae) => {
4084
4085
  const Ie = ae[(c == null ? void 0 : c.field_parent) || "child_id"], je = await P.getHandler().readObjects({
4085
4086
  model: t,
@@ -4090,7 +4091,7 @@ const So = (e) => {
4090
4091
  return te([...ve(), ...je]), fo(At(c), je);
4091
4092
  },
4092
4093
  [c, t, u, ve, te]
4093
- ), Le = fe(async () => await P.getHandler().searchAllIds({
4094
+ ), Le = de(async () => await P.getHandler().searchAllIds({
4094
4095
  params: jt(I, b),
4095
4096
  model: t,
4096
4097
  context: u,
@@ -4098,11 +4099,11 @@ const So = (e) => {
4098
4099
  }), [t, u, Y, I, b]);
4099
4100
  return {
4100
4101
  submit: ke,
4101
- clear: de,
4102
+ clear: ue,
4102
4103
  fetchResults: Se,
4103
4104
  tableRefreshing: T,
4104
4105
  searchFilterLoading: C,
4105
- searchError: V,
4106
+ searchError: A,
4106
4107
  page: j,
4107
4108
  offset: U,
4108
4109
  limit: ce.current,
@@ -4130,7 +4131,7 @@ function Dl(e, t) {
4130
4131
  rootTree: f = !1,
4131
4132
  parentContext: c = {},
4132
4133
  onChangeSelectedRowKeys: m
4133
- } = e, [p, h] = v(!1), [g, y] = v(!1), w = le(!1), b = le(null), [x, S] = v(), [R, I] = v(), [A, F] = v(), [T, O] = v(), [C, _] = v(200), V = 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, O] = v(), [C, _] = v(200), A = le(), { height: N } = hn(), j = re(
4134
4135
  Lt
4135
4136
  ), { processAction: H } = j || {}, U = re(
4136
4137
  nt
@@ -4154,7 +4155,7 @@ function Dl(e, t) {
4154
4155
  setSearchValues: Ee = void 0,
4155
4156
  limit: ke = St,
4156
4157
  setLimit: Me = void 0
4157
- } = (f ? U : {}) || {}, de = fe(
4158
+ } = (f ? U : {}) || {}, ue = de(
4158
4159
  (Ne) => {
4159
4160
  B == null || B(Ne.map((ot) => ({ id: ot }))), m == null || m(Ne);
4160
4161
  },
@@ -4169,7 +4170,7 @@ function Dl(e, t) {
4169
4170
  page: W,
4170
4171
  limit: ye,
4171
4172
  offset: Ae,
4172
- getResults: ue,
4173
+ getResults: fe,
4173
4174
  requestPageChange: pe,
4174
4175
  changeSort: we,
4175
4176
  fetchChildrenForRecord: se,
@@ -4180,7 +4181,7 @@ function Dl(e, t) {
4180
4181
  } = So({
4181
4182
  model: x,
4182
4183
  setSearchTreeNameSearch: z,
4183
- setSelectedRowItems: de,
4184
+ setSelectedRowItems: ue,
4184
4185
  setSearchParams: K,
4185
4186
  setSearchValues: Ee,
4186
4187
  searchParams: E,
@@ -4189,7 +4190,7 @@ function Dl(e, t) {
4189
4190
  nameSearch: a,
4190
4191
  searchNameGetDoneRef: w,
4191
4192
  context: c,
4192
- formView: A,
4193
+ formView: V,
4193
4194
  treeView: R,
4194
4195
  sorter: J,
4195
4196
  setSorter: te,
@@ -4239,20 +4240,20 @@ function Dl(e, t) {
4239
4240
  me(() => {
4240
4241
  Re();
4241
4242
  }, [n]);
4242
- const Te = fe(
4243
+ const Te = de(
4243
4244
  (Ne) => {
4244
4245
  Me == null || Me(Ne);
4245
4246
  },
4246
4247
  [Me]
4247
- ), Ve = fe(
4248
+ ), Ve = de(
4248
4249
  async (Ne) => {
4249
4250
  const { id: ot } = Ne;
4250
- V.current || (V.current = await P.getHandler().treeButOpen({
4251
+ A.current || (A.current = await P.getHandler().treeButOpen({
4251
4252
  id: R.view_id,
4252
4253
  model: x,
4253
4254
  context: c
4254
4255
  }));
4255
- const ut = V.current[0][2];
4256
+ const ut = A.current[0][2];
4256
4257
  await (H == null ? void 0 : H({
4257
4258
  actionData: ut,
4258
4259
  fields: R.fields,
@@ -4264,7 +4265,7 @@ function Dl(e, t) {
4264
4265
  }));
4265
4266
  },
4266
4267
  [x, c, H, R]
4267
- ), tt = fe(
4268
+ ), tt = de(
4268
4269
  async (Ne) => {
4269
4270
  const { id: ot } = Ne;
4270
4271
  if (R != null && R.isExpandable) {
@@ -4278,24 +4279,24 @@ function Dl(e, t) {
4278
4279
  s({
4279
4280
  id: ot,
4280
4281
  model: x,
4281
- formView: A,
4282
+ formView: V,
4282
4283
  treeView: R
4283
4284
  });
4284
4285
  },
4285
- [x, A, s, Ve, R]
4286
- ), Ge = fe(async () => {
4286
+ [x, V, s, Ve, R]
4287
+ ), Ge = de(async () => {
4287
4288
  const Ne = await oe();
4288
4289
  B == null || B(Ne.map((ot) => ({ id: ot }))), m == null || m(Ne);
4289
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
4291
  () => ne == null ? void 0 : ne.map((Ne) => Ne.id),
4291
4292
  [ne]
4292
- ), Qt = fe(() => !R || !A ? null : /* @__PURE__ */ D(ee, { children: [
4293
+ ), Qt = de(() => !R || !V ? null : /* @__PURE__ */ D(ee, { children: [
4293
4294
  /* @__PURE__ */ r(
4294
4295
  wo,
4295
4296
  {
4296
- fields: { ...A.fields, ...R.fields },
4297
+ fields: { ...V.fields, ...R.fields },
4297
4298
  searchFields: ho([
4298
- A.search_fields,
4299
+ V.search_fields,
4299
4300
  R.search_fields
4300
4301
  ]),
4301
4302
  onClear: Le,
@@ -4319,7 +4320,7 @@ function Dl(e, t) {
4319
4320
  limit: ye,
4320
4321
  page: W,
4321
4322
  treeView: R,
4322
- results: ue(),
4323
+ results: fe(),
4323
4324
  onRequestPageChange: pe,
4324
4325
  loading: Ie,
4325
4326
  onRowClicked: tt,
@@ -4327,7 +4328,7 @@ function Dl(e, t) {
4327
4328
  colorsForResults: We,
4328
4329
  statusForResults: De,
4329
4330
  selectedRowKeys: st,
4330
- onRowSelectionChange: de,
4331
+ onRowSelectionChange: ue,
4331
4332
  sorter: J,
4332
4333
  onChangeSort: we,
4333
4334
  onFetchChildrenForRecord: R.isExpandable ? se : void 0,
@@ -4338,13 +4339,13 @@ function Dl(e, t) {
4338
4339
  )
4339
4340
  ] }), [
4340
4341
  bt,
4341
- de,
4342
+ ue,
4342
4343
  we,
4343
4344
  Le,
4344
4345
  We,
4345
4346
  se,
4346
- A,
4347
- ue,
4347
+ V,
4348
+ fe,
4348
4349
  ke,
4349
4350
  ye,
4350
4351
  Ae,
@@ -4487,7 +4488,7 @@ const To = ht(Dl), Fo = (e) => {
4487
4488
  context: l,
4488
4489
  id: d,
4489
4490
  domain: u
4490
- } = 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(), A = re(He), { domain: F, getValues: T, getFields: O, getContext: C, elementHasLostFocus: _ } = A || {}, V = 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: O, getContext: C, elementHasLostFocus: _ } = V || {}, A = le([]), [N, j] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
4491
4492
  me(() => {
4492
4493
  !Array.isArray(t) && t && ne(t);
4493
4494
  }, [t]), me(() => {
@@ -4505,7 +4506,7 @@ const To = ht(Dl), Fo = (e) => {
4505
4506
  }
4506
4507
  y(!0);
4507
4508
  try {
4508
- if (V.current && V.current.length > 0)
4509
+ if (A.current && A.current.length > 0)
4509
4510
  Q(I.current);
4510
4511
  else {
4511
4512
  const L = await P.getHandler().nameSearch({
@@ -4522,9 +4523,9 @@ const To = ht(Dl), Fo = (e) => {
4522
4523
  }
4523
4524
  }
4524
4525
  }, Q = async (L) => {
4525
- if (await B(), V.current && V.current.length > 0) {
4526
+ if (await B(), A.current && A.current.length > 0) {
4526
4527
  const ce = await P.getHandler().searchAllIds({
4527
- params: V.current,
4528
+ params: A.current,
4528
4529
  model: s,
4529
4530
  context: { ...C == null ? void 0 : C(), ...l },
4530
4531
  totalItems: 2
@@ -4550,7 +4551,7 @@ const To = ht(Dl), Fo = (e) => {
4550
4551
  }
4551
4552
  };
4552
4553
  async function B() {
4553
- u && (V.current = await P.getHandler().evalDomain({
4554
+ u && (A.current = await P.getHandler().evalDomain({
4554
4555
  domain: u,
4555
4556
  values: Nt({
4556
4557
  fields: O(),
@@ -4558,12 +4559,12 @@ const To = ht(Dl), Fo = (e) => {
4558
4559
  }),
4559
4560
  fields: O(),
4560
4561
  context: C()
4561
- })), F && F.length > 0 && (V.current = V.current.concat(
4562
+ })), F && F.length > 0 && (A.current = A.current.concat(
4562
4563
  jr({
4563
4564
  domain: F,
4564
4565
  widgetFieldName: d
4565
4566
  })
4566
- )), j(V.current);
4567
+ )), j(A.current);
4567
4568
  }
4568
4569
  async function E(L) {
4569
4570
  L.keyCode === 13 ? (L.preventDefault(), L.stopPropagation(), await q()) : L.code === "Backspace" && H !== void 0 && (L.preventDefault(), L.stopPropagation(), k([void 0, ""]));
@@ -4851,13 +4852,13 @@ const gn = () => /* @__PURE__ */ r(
4851
4852
  field: u,
4852
4853
  operator: f,
4853
4854
  manualIds: c
4854
- } = e, [m, p] = v(!1), [h, g] = v(), [y, w] = v(), [b, x] = v(), [S, R] = v(), [I, A] = 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(), [O] = Xe(
4855
4856
  P.getHandler().searchAllIds
4856
4857
  ), [C] = Xe(
4857
4858
  P.getHandler().readObjects
4858
4859
  ), [_] = Xe(
4859
4860
  P.getHandler().searchCount
4860
- ), [V] = Xe(
4861
+ ), [A] = Xe(
4861
4862
  P.getHandler().evalDomain
4862
4863
  ), [N] = Xe(
4863
4864
  P.getHandler().parseCondition
@@ -4922,7 +4923,7 @@ const gn = () => /* @__PURE__ */ r(
4922
4923
  try {
4923
4924
  const q = await j({ domain: n, isTotal: !1 });
4924
4925
  if (g(q), s) {
4925
- const Q = await V({
4926
+ const Q = await A({
4926
4927
  domain: s,
4927
4928
  values: {},
4928
4929
  context: i
@@ -4947,9 +4948,9 @@ const gn = () => /* @__PURE__ */ r(
4947
4948
  values: { value: q, percent: Y },
4948
4949
  context: i
4949
4950
  });
4950
- A(Q);
4951
+ V(Q);
4951
4952
  } else
4952
- A(l);
4953
+ V(l);
4953
4954
  T(void 0);
4954
4955
  } catch (q) {
4955
4956
  T(JSON.stringify(q));
@@ -4981,11 +4982,11 @@ const gn = () => /* @__PURE__ */ r(
4981
4982
  P.getHandler().getFields
4982
4983
  ), [x] = Xe(
4983
4984
  P.getHandler().readObjects
4984
- ), [S] = Xe(P.getHandler().search), R = fe(async () => {
4985
+ ), [S] = Xe(P.getHandler().search), R = de(async () => {
4985
4986
  u(!0), c(void 0);
4986
4987
  const I = Wn(o);
4987
4988
  w(I.type || "line");
4988
- const A = Wl({ ooui: I });
4989
+ const V = Wl({ ooui: I });
4989
4990
  let F, T;
4990
4991
  try {
4991
4992
  ({ values: F, fields: T } = await Gl({
@@ -4994,7 +4995,7 @@ const gn = () => /* @__PURE__ */ r(
4994
4995
  context: i,
4995
4996
  limit: s,
4996
4997
  order: I.timerange ? I.x.name : null,
4997
- fields: A,
4998
+ fields: V,
4998
4999
  manualIds: l,
4999
5000
  methods: {
5000
5001
  getFields: b,
@@ -5239,7 +5240,6 @@ const Jl = {
5239
5240
  label: {
5240
5241
  type: "inner",
5241
5242
  offset: "-30%",
5242
- content: ({ percent: e }) => e < 0.07 ? "" : `${(e * 100).toFixed(0)}%`,
5243
5243
  style: {
5244
5244
  fontSize: 12,
5245
5245
  textAlign: "center"
@@ -5249,8 +5249,7 @@ const Jl = {
5249
5249
  spider: {
5250
5250
  label: {
5251
5251
  type: "spider",
5252
- labelHeight: 28,
5253
- content: ({ percent: e }) => `${(e * 100).toFixed(0)}%`
5252
+ labelHeight: 28
5254
5253
  }
5255
5254
  }
5256
5255
  }, Xl = (e) => {
@@ -5274,23 +5273,31 @@ const Jl = {
5274
5273
  }) => {
5275
5274
  const { t: s } = ge(), a = _e(() => {
5276
5275
  if (!(e !== "pie" || t.reduce(
5277
- (c, m) => m.operator === "+" ? c + m.value : 0,
5276
+ (p, h) => h.operator === "+" ? p + h.value : 0,
5278
5277
  0
5279
5278
  ) === 0))
5280
- return t.reduce((c, m) => c + m.value, 0);
5279
+ return t.reduce((p, h) => p + h.value, 0);
5281
5280
  }, [t, e]), l = _e(() => {
5282
5281
  if (e === "pie")
5283
5282
  return Xl(t);
5284
- }, [t, e]), d = _e(() => {
5283
+ }, [t, e]), d = de(
5284
+ (m) => {
5285
+ if (!l)
5286
+ return;
5287
+ const p = l.find((y) => y.x === m);
5288
+ return `${`${((p == null ? void 0 : p.percent) || 0).toFixed(0)}%`}`;
5289
+ },
5290
+ [l]
5291
+ ), u = _e(() => {
5285
5292
  if (l !== void 0)
5286
5293
  return {
5287
- formatter: (f, c) => {
5288
- const m = l.find((g) => g.x === c.id);
5289
- return `${`${((m == null ? void 0 : m.percent) || 0).toFixed(0)}%`}`;
5290
- }
5294
+ formatter: (m, p) => d(p.id)
5291
5295
  };
5292
- }, [l]), u = Ql[e];
5293
- return u ? /* @__PURE__ */ D(
5296
+ }, [l]), f = de(
5297
+ ({ percent: m, x: p }) => m < 0.07 ? "" : d(p),
5298
+ [l]
5299
+ ), c = Ql[e];
5300
+ return c ? /* @__PURE__ */ D(
5294
5301
  "div",
5295
5302
  {
5296
5303
  style: {
@@ -5308,14 +5315,15 @@ const Jl = {
5308
5315
  useGrouping: !0
5309
5316
  })}` }) }),
5310
5317
  /* @__PURE__ */ r("div", { style: { width: "100%", height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ r(
5311
- u,
5318
+ c,
5312
5319
  {
5313
5320
  ...Zl({
5314
5321
  type: e,
5315
5322
  data: t,
5316
5323
  isGroup: n,
5317
5324
  isStack: i,
5318
- pieItemValueFormatter: d
5325
+ pieItemValueFormatter: u,
5326
+ pieLabelFormatter: f
5319
5327
  })
5320
5328
  }
5321
5329
  ) })
@@ -5324,9 +5332,16 @@ const Jl = {
5324
5332
  ) : /* @__PURE__ */ r(ee, { children: `Unknown graph type: ${e}` });
5325
5333
  };
5326
5334
  function Zl(e) {
5327
- const { type: t, data: n, isGroup: i, isStack: o, pieItemValueFormatter: s } = e;
5328
- let a = { ...Ar[t] };
5329
- return a || (a = { ...Ar.default }), a.data = n, t === "pie" ? (a.colorField = "x", a.angleField = "value", a = { ...a, ...Jl.inner }, a.legend.itemValue = s) : (a.xField = "x", a.yField = "value", a.seriesField = "type", a.isGroup = i, o && (a.isStack = !0, a.groupField = "stacked")), a;
5335
+ const {
5336
+ type: t,
5337
+ data: n,
5338
+ isGroup: i,
5339
+ isStack: o,
5340
+ pieItemValueFormatter: s,
5341
+ pieLabelFormatter: a
5342
+ } = e;
5343
+ let l = { ...Ar[t] };
5344
+ return l || (l = { ...Ar.default }), l.data = n, t === "pie" ? (l.colorField = "x", l.angleField = "value", l = { ...l, ...Jl.inner }, l.legend.itemValue = s, l.label.content = a) : (l.xField = "x", l.yField = "value", l.seriesField = "type", l.isGroup = i, o && (l.isStack = !0, l.groupField = "stacked")), l;
5330
5345
  }
5331
5346
  const ec = (e) => {
5332
5347
  const { model: t, domain: n, context: i, xml: o, limit: s, manualIds: a } = e, { t: l } = ge(), { error: d, loading: u, values: f, type: c, evaluatedEntries: m, fetchData: p } = jl({
@@ -5576,7 +5591,7 @@ const dc = (e) => {
5576
5591
  var De;
5577
5592
  const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = re(
5578
5593
  Oo
5579
- ), 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(), [A, F] = v(!1), [T, O] = v(!1), [C, _] = v(), [V, N] = v([]), [j, H] = v(!1), U = le([]), [k, Y] = v(), q = le(), [Q, ne] = v(void 0), {
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), {
5580
5595
  readOnly: B,
5581
5596
  relation: E,
5582
5597
  context: K,
@@ -5591,7 +5606,7 @@ const dc = (e) => {
5591
5606
  }
5592
5607
  z();
5593
5608
  }, [s, a]);
5594
- const z = fe(() => {
5609
+ const z = de(() => {
5595
5610
  (a === "form" && s.some((G) => !G.values) || a === "tree" && s.some((G) => !G.treeValues)) && Se();
5596
5611
  }, [s, a]);
5597
5612
  me(() => {
@@ -5650,7 +5665,7 @@ const dc = (e) => {
5650
5665
  a === "form" ? ae(() => {
5651
5666
  l(oe);
5652
5667
  }) : l(oe);
5653
- }, de = () => {
5668
+ }, ue = () => {
5654
5669
  d > 0 && (a === "form" ? ae(() => {
5655
5670
  u(d - 1);
5656
5671
  }) : u(d - 1));
@@ -5728,7 +5743,7 @@ const dc = (e) => {
5728
5743
  }
5729
5744
  u(0), S(!1);
5730
5745
  }, ye = async () => {
5731
- const G = te.filter((oe) => V.includes(oe.id));
5746
+ const G = te.filter((oe) => A.includes(oe.id));
5732
5747
  S(!0), b(!1), I(void 0);
5733
5748
  try {
5734
5749
  const oe = G.map((xe) => xe.id), Re = s.filter((xe) => !(oe.includes(xe.id) && xe.id < 0)).map((xe) => oe.includes(xe.id) ? {
@@ -5766,7 +5781,7 @@ const dc = (e) => {
5766
5781
  });
5767
5782
  }
5768
5783
  ie(Te), j || F(!1);
5769
- }, ue = async (G) => {
5784
+ }, fe = async (G) => {
5770
5785
  const { id: oe } = G;
5771
5786
  let Re = s;
5772
5787
  const xe = s.find((Te) => Te.id === oe);
@@ -5852,9 +5867,9 @@ const dc = (e) => {
5852
5867
  treeView: o.get("tree"),
5853
5868
  results: G,
5854
5869
  loading: x,
5855
- onRowClicked: ((Te = o.get("form")) == null ? void 0 : Te.fields) !== void 0 ? ue : void 0,
5870
+ onRowClicked: ((Te = o.get("form")) == null ? void 0 : Te.fields) !== void 0 ? fe : void 0,
5856
5871
  showPagination: !1,
5857
- selectedRowKeys: V,
5872
+ selectedRowKeys: A,
5858
5873
  onRowSelectionChange: N,
5859
5874
  sorter: k,
5860
5875
  onChangeSort: Y,
@@ -5895,10 +5910,10 @@ const dc = (e) => {
5895
5910
  onDelete: Ie,
5896
5911
  onCreateItem: je,
5897
5912
  onToggleViewMode: Me,
5898
- onPreviousItem: de,
5913
+ onPreviousItem: ue,
5899
5914
  onNextItem: Fe,
5900
5915
  onSearchItem: Ke,
5901
- selectedRowKeys: V,
5916
+ selectedRowKeys: A,
5902
5917
  showCreateButton: ((De = o.get("form")) == null ? void 0 : De.fields) !== void 0,
5903
5918
  showToggleButton: o.size > 1
5904
5919
  }
@@ -5913,7 +5928,7 @@ const dc = (e) => {
5913
5928
  submitMode: "2many",
5914
5929
  values: C == null ? void 0 : C.values,
5915
5930
  defaultValues: C == null ? void 0 : C.defaultValues,
5916
- visible: A,
5931
+ visible: V,
5917
5932
  onSubmitSucceed: Ae,
5918
5933
  parentContext: { ...h == null ? void 0 : h(), ...K },
5919
5934
  onCancel: () => {
@@ -6189,7 +6204,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6189
6204
  limit: o,
6190
6205
  onClose: s
6191
6206
  }) => {
6192
- const a = le({}), l = le(/* @__PURE__ */ new Map()), { t: d } = ge(), u = fe(
6207
+ const a = le({}), l = le(/* @__PURE__ */ new Map()), { t: d } = ge(), u = de(
6193
6208
  async (y) => {
6194
6209
  if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
6195
6210
  mt(d("selectAtLeastOneField"));
@@ -6215,14 +6230,14 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6215
6230
  pn(b, x.mime);
6216
6231
  },
6217
6232
  [i, n, e, o, t, s, d]
6218
- ), f = fe(async () => {
6233
+ ), f = de(async () => {
6219
6234
  const y = await P.getHandler().getFields({
6220
6235
  model: e,
6221
6236
  context: t,
6222
6237
  fields: []
6223
6238
  });
6224
6239
  return a.current["/"] = y, Er({ fields: y });
6225
- }, [e, t, a]), c = fe(
6240
+ }, [e, t, a]), c = de(
6226
6241
  async (y) => {
6227
6242
  const b = Ln(y, a.current)[Nn(y)], x = b.relation, S = await P.getHandler().getFields({
6228
6243
  model: x,
@@ -6240,7 +6255,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6240
6255
  });
6241
6256
  },
6242
6257
  [t]
6243
- ), m = fe(async () => {
6258
+ ), m = de(async () => {
6244
6259
  const y = await Tc({ model: e, context: t }), w = await Rc({
6245
6260
  predefinedExports: y,
6246
6261
  fields: a.current,
@@ -6250,10 +6265,10 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6250
6265
  predefinedExports: y.map((x) => ({
6251
6266
  ...x,
6252
6267
  fields: x.fields.map((S) => {
6253
- const R = Nn(S.key), A = Ln(S.key, a.current)[R];
6254
- return A ? {
6268
+ const R = Nn(S.key), V = Ln(S.key, a.current)[R];
6269
+ return V ? {
6255
6270
  key: S.key,
6256
- title: A.string
6271
+ title: V.string
6257
6272
  } : {
6258
6273
  key: S.key
6259
6274
  };
@@ -6261,7 +6276,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6261
6276
  })),
6262
6277
  keysWithChilds: w
6263
6278
  };
6264
- }, [t, e, c]), p = fe(
6279
+ }, [t, e, c]), p = de(
6265
6280
  async (y) => {
6266
6281
  await P.getHandler().deleteObjects({
6267
6282
  model: "ir.exports",
@@ -6270,7 +6285,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6270
6285
  });
6271
6286
  },
6272
6287
  [t]
6273
- ), h = fe(
6288
+ ), h = de(
6274
6289
  async (y) => {
6275
6290
  if (l.current.has(y))
6276
6291
  return l.current.get(y);
@@ -6282,7 +6297,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6282
6297
  l.current.set(y, w);
6283
6298
  },
6284
6299
  [l, t]
6285
- ), g = fe(
6300
+ ), g = de(
6286
6301
  async (y) => {
6287
6302
  const w = await h("ir.exports"), b = await h("ir.exports.line"), x = await P.getHandler().create({
6288
6303
  model: "ir.exports",
@@ -6535,8 +6550,8 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6535
6550
  i == null || i(x);
6536
6551
  };
6537
6552
  async function g() {
6538
- const x = await Et(n), S = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), I = c(a), A = c("name");
6539
- R.href = S, R.download = I || A, R.click();
6553
+ const x = await Et(n), S = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), I = c(a), V = c("name");
6554
+ R.href = S, R.download = I || V, R.click();
6540
6555
  }
6541
6556
  async function y() {
6542
6557
  const x = await Et(n);
@@ -6889,7 +6904,7 @@ function Kc(e) {
6889
6904
  onAddNewAttachment: i,
6890
6905
  onListAllAttachments: o,
6891
6906
  onViewAttachmentDetails: s
6892
- } = e, { formRef: a } = re(nt), [l, d] = v(!1), [u, f] = v([]), [c, m] = v(!1), { t: p } = ge(), h = fe(async () => {
6907
+ } = e, { formRef: a } = re(nt), [l, d] = v(!1), [u, f] = v([]), [c, m] = v(!1), { t: p } = ge(), h = de(async () => {
6893
6908
  if (!(!t || t.length === 0)) {
6894
6909
  d(!0);
6895
6910
  try {
@@ -6912,7 +6927,7 @@ function Kc(e) {
6912
6927
  }
6913
6928
  d(!1);
6914
6929
  }
6915
- }, [t, a]), g = fe(
6930
+ }, [t, a]), g = de(
6916
6931
  async (w) => {
6917
6932
  if (w.link) {
6918
6933
  window.open(w.link);
@@ -6937,7 +6952,7 @@ function Kc(e) {
6937
6952
  s(b);
6938
6953
  },
6939
6954
  [a, s]
6940
- ), y = fe(
6955
+ ), y = de(
6941
6956
  async (w) => {
6942
6957
  s(w);
6943
6958
  },
@@ -6997,13 +7012,13 @@ function Wc({ toolbar: e }) {
6997
7012
  formRef: S,
6998
7013
  setFormHasChanges: R,
6999
7014
  previousView: I,
7000
- setPreviousView: A,
7015
+ setPreviousView: V,
7001
7016
  goToResourceId: F
7002
7017
  } = re(nt), { t: T } = ge(), O = re(
7003
7018
  Lt
7004
7019
  ), { processAction: C } = O || {}, _ = re(
7005
7020
  dt
7006
- ), { openRelate: V, openDefaultActionForModel: N } = _ || {};
7021
+ ), { openRelate: A, openDefaultActionForModel: N } = _ || {};
7007
7022
  function j(E) {
7008
7023
  if (s) {
7009
7024
  Hc({
@@ -7164,7 +7179,7 @@ function Wc({ toolbar: e }) {
7164
7179
  previousView: I,
7165
7180
  availableViews: t,
7166
7181
  onChangeView: (E) => {
7167
- A == null || A(n), R == null || R(!1), i == null || i(E);
7182
+ V == null || V(n), R == null || R(!1), i == null || i(E);
7168
7183
  },
7169
7184
  disabled: ne,
7170
7185
  formHasChanges: s
@@ -7251,7 +7266,7 @@ function Wc({ toolbar: e }) {
7251
7266
  onItemClick: async (E) => {
7252
7267
  !E || !(await _t({
7253
7268
  onFormSave: o
7254
- })).succeed || V({
7269
+ })).succeed || A({
7255
7270
  relateData: E,
7256
7271
  values: S.current.getValues(),
7257
7272
  fields: S.current.getFields(),
@@ -7672,13 +7687,13 @@ const Qc = (e) => {
7672
7687
  setTotalItems: S = void 0,
7673
7688
  setSearchTreeNameSearch: R = void 0,
7674
7689
  setTreeIsLoading: I = void 0,
7675
- limit: A,
7690
+ limit: V,
7676
7691
  setLimit: F,
7677
7692
  searchParams: T,
7678
7693
  searchValues: O,
7679
7694
  setSearchValues: C,
7680
7695
  currentView: _
7681
- } = u || {}, [V, N] = v(!0);
7696
+ } = u || {}, [A, N] = v(!0);
7682
7697
  me(() => {
7683
7698
  var q;
7684
7699
  (q = d.current) == null || q.refresh();
@@ -7705,7 +7720,7 @@ const Qc = (e) => {
7705
7720
  domain: s,
7706
7721
  currentId: m,
7707
7722
  setActionViewTotalItems: S,
7708
- limit: A,
7723
+ limit: V,
7709
7724
  setLimit: F
7710
7725
  });
7711
7726
  return !n || !t ? null : /* @__PURE__ */ D(ee, { children: [
@@ -7725,7 +7740,7 @@ const Qc = (e) => {
7725
7740
  a.search_fields,
7726
7741
  l.search_fields
7727
7742
  ]),
7728
- limit: A,
7743
+ limit: V,
7729
7744
  onClear: j,
7730
7745
  offset: k,
7731
7746
  isSearching: H,
@@ -7746,8 +7761,8 @@ const Qc = (e) => {
7746
7761
  model: i,
7747
7762
  context: o,
7748
7763
  domain: jt(T || [], s),
7749
- limit: V ? A : void 0,
7750
- manualIds: V ? p == null ? void 0 : p.map((q) => q.id) : void 0
7764
+ limit: A ? V : void 0,
7765
+ manualIds: A ? p == null ? void 0 : p.map((q) => q.id) : void 0
7751
7766
  }
7752
7767
  )
7753
7768
  ] });
@@ -8180,12 +8195,12 @@ function ad(e) {
8180
8195
  previousView: S,
8181
8196
  results: R,
8182
8197
  limit: I,
8183
- totalItems: A
8198
+ totalItems: V
8184
8199
  } = re(nt), { parentContext: F = {}, treeExpandable: T, toolbar: O } = e, C = Bo(
8185
8200
  vn.FEATURE_ADVANCED_EXPORT
8186
- ), { t: _ } = ge(), V = re(
8201
+ ), { t: _ } = ge(), A = re(
8187
8202
  Lt
8188
- ), { processAction: N } = V || {}, [j, H] = v(!1), U = w !== void 0 && w.trim().length > 0;
8203
+ ), { processAction: N } = A || {}, [j, H] = v(!1), U = w !== void 0 && w.trim().length > 0;
8189
8204
  function k() {
8190
8205
  Yt({
8191
8206
  confirmMessage: _("confirmRemove"),
@@ -8456,7 +8471,7 @@ function ad(e) {
8456
8471
  p || []
8457
8472
  ),
8458
8473
  limit: I,
8459
- totalRegisters: A || 0,
8474
+ totalRegisters: V || 0,
8460
8475
  selectedRegistersToExport: o,
8461
8476
  visibleRegisters: (R == null ? void 0 : R.length) || 0,
8462
8477
  context: F
@@ -8646,9 +8661,9 @@ function hd(e, t) {
8646
8661
  action_type: h,
8647
8662
  treeExpandable: g = !1,
8648
8663
  limit: y
8649
- } = e, [w, b] = v(), [x, S] = v([]), [R, I] = v(!0), A = m || void 0, [F, T] = v(
8650
- A
8651
- ), [O, C] = v([]), [_, V] = 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(
8664
+ } = e, [w, b] = v(), [x, S] = v([]), [R, I] = v(!0), V = m || void 0, [F, T] = v(
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(
8652
8667
  dt
8653
8668
  ), {
8654
8669
  setCurrentView: ve,
@@ -8668,7 +8683,7 @@ function hd(e, t) {
8668
8683
  function Me(W) {
8669
8684
  T(W), z == null || z(W);
8670
8685
  }
8671
- function de(W) {
8686
+ function ue(W) {
8672
8687
  b(W);
8673
8688
  const ye = { action_id: p, action_type: h };
8674
8689
  ve == null || ve({ ...W, extra: ye });
@@ -8746,19 +8761,19 @@ function hd(e, t) {
8746
8761
  }
8747
8762
  }
8748
8763
  }
8749
- let ue;
8750
- !u && W.find((pe) => pe.type === "tree") ? ue = W.find(
8764
+ let fe;
8765
+ !u && W.find((pe) => pe.type === "tree") ? fe = W.find(
8751
8766
  (we) => we.type === "tree"
8752
- ) : u ? ue = W.find((we) => u.id ? we.type === u.type && we.view_id === u.id : we.type === u.type) : ue = W.find(
8767
+ ) : u ? fe = W.find((we) => u.id ? we.type === u.type && we.view_id === u.id : we.type === u.type) : fe = W.find(
8753
8768
  (we) => we.type === "form"
8754
- ), ue || (Qe(
8769
+ ), fe || (Qe(
8755
8770
  `Error determining the first view to show for model ${i}.
8756
8771
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
8757
- ), ke == null || ke(d)), de(ue), S(W), I(!1);
8772
+ ), ke == null || ke(d)), ue(fe), S(W), I(!1);
8758
8773
  };
8759
8774
  l({ tabKey: d, canWeClose: Le }), me(() => {
8760
8775
  const W = x.find((Ae) => Ae.type === "tree"), ye = x.find((Ae) => u.id ? Ae.type === u.type && Ae.view_id === u.id : Ae.type === u.type);
8761
- de(ye || W), m ? z == null || z(A) : (Me(void 0), V(void 0)), Fe();
8776
+ ue(ye || W), m ? z == null || z(V) : (Me(void 0), A(void 0)), Fe();
8762
8777
  }, [i, s, m]), me(() => {
8763
8778
  if (Se === d) {
8764
8779
  z == null || z(F);
@@ -8798,7 +8813,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8798
8813
  } else
8799
8814
  ye = "tree", Ae = [["id", "in", W]];
8800
8815
  B(!1), Q(!1);
8801
- const ue = s.find((we) => we[1] === ye);
8816
+ const fe = s.find((we) => we[1] === ye);
8802
8817
  Ee({
8803
8818
  domain: Ae,
8804
8819
  context: o,
@@ -8806,7 +8821,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8806
8821
  views: s,
8807
8822
  title: a,
8808
8823
  target: "current",
8809
- initialView: { id: ue == null ? void 0 : ue[0], type: ye },
8824
+ initialView: { id: fe == null ? void 0 : fe[0], type: ye },
8810
8825
  action_id: p,
8811
8826
  action_type: h,
8812
8827
  res_id: W[0]
@@ -8830,7 +8845,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8830
8845
  forcedValues: c,
8831
8846
  results: N,
8832
8847
  setResults: j,
8833
- setCurrentItemIndex: V
8848
+ setCurrentItemIndex: A
8834
8849
  },
8835
8850
  `${W.type}-${W.view_id}`
8836
8851
  );
@@ -8849,9 +8864,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8849
8864
  searchTreeNameSearch: E,
8850
8865
  availableViews: x,
8851
8866
  results: N,
8852
- setCurrentItemIndex: V,
8867
+ setCurrentItemIndex: A,
8853
8868
  setCurrentId: Me,
8854
- setCurrentView: de
8869
+ setCurrentView: ue
8855
8870
  },
8856
8871
  `${W.type}-${W.view_id}`
8857
8872
  );
@@ -8889,7 +8904,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8889
8904
  const W = x.find(
8890
8905
  (ye) => ye.type === "form"
8891
8906
  );
8892
- de(W);
8907
+ ue(W);
8893
8908
  }
8894
8909
  }
8895
8910
  return R ? /* @__PURE__ */ r($e, {}) : w ? /* @__PURE__ */ D(
@@ -8897,14 +8912,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8897
8912
  {
8898
8913
  title: a,
8899
8914
  currentView: w,
8900
- setCurrentView: de,
8915
+ setCurrentView: ue,
8901
8916
  availableViews: x,
8902
8917
  formRef: ce,
8903
8918
  searchTreeRef: J,
8904
8919
  onNewClicked: Ke,
8905
8920
  currentId: F,
8906
8921
  setCurrentId: Me,
8907
- setCurrentItemIndex: V,
8922
+ setCurrentItemIndex: A,
8908
8923
  currentItemIndex: _,
8909
8924
  results: N,
8910
8925
  setResults: j,
@@ -9084,10 +9099,10 @@ function Cd(e) {
9084
9099
  domain: s = [],
9085
9100
  visible: a = !0,
9086
9101
  parentContext: l = {}
9087
- } = 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), A = le([]), [F, T] = v(0), [O, C] = v([]), [_, V] = 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), [O, C] = v([]), [_, A] = v(void 0), [N, j] = v(), [H, U] = v(), [k, Y] = v(), [q, Q] = v(!1), ne = le([]), B = (z) => {
9088
9103
  Q(!0), x(z), R((z - 1) * I.current);
9089
9104
  }, E = async () => {
9090
- const z = ne.current.length > 0 ? ne.current : s, ie = jt(A.current, z), { colors: Se } = At(h), { totalItems: Ee, results: ke, attrsEvaluated: Me } = await P.getHandler().searchForTree({
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({
9091
9106
  params: ie,
9092
9107
  limit: I.current,
9093
9108
  offset: S,
@@ -9096,13 +9111,13 @@ function Cd(e) {
9096
9111
  context: l,
9097
9112
  attrs: Se && { colors: Se }
9098
9113
  });
9099
- V(nn(Me));
9100
- const de = Dt({
9114
+ A(nn(Me));
9115
+ const ue = Dt({
9101
9116
  resultsToSort: ke,
9102
9117
  sorter: N,
9103
9118
  fields: { ...h.fields, ...y.fields }
9104
9119
  });
9105
- Q(!1), C(de);
9120
+ Q(!1), C(ue);
9106
9121
  const Fe = await Ee;
9107
9122
  T(Fe);
9108
9123
  }, K = async () => {
@@ -9204,7 +9219,7 @@ const xd = $n(Cd), Sd = (e) => {
9204
9219
  }, Td = (e) => {
9205
9220
  const { model: t, domain: n = [], context: i = {}, view_id: o, manualIds: s } = e, [a, l] = v(!1), [d, u] = v(), [f, c] = v(), [m] = Xe(
9206
9221
  P.getHandler().readForView
9207
- ), p = fe(async () => {
9222
+ ), p = de(async () => {
9208
9223
  l(!0), u(void 0), s && n.push(["id", "in", s]);
9209
9224
  try {
9210
9225
  const h = await m({
@@ -9304,9 +9319,9 @@ function _d(e, t) {
9304
9319
  async function R() {
9305
9320
  u(!0), m(!0), c(void 0);
9306
9321
  try {
9307
- const _ = await I(), V = await F(_), N = _.fields[On].relation, j = V[On].items;
9322
+ const _ = await I(), A = await F(_), N = _.fields[On].relation, j = A[On].items;
9308
9323
  y.current = _.fields;
9309
- const H = await A({
9324
+ const H = await V({
9310
9325
  items: j,
9311
9326
  model: N,
9312
9327
  context: i
@@ -9323,13 +9338,13 @@ function _d(e, t) {
9323
9338
  context: i
9324
9339
  });
9325
9340
  }
9326
- async function A({
9341
+ async function V({
9327
9342
  items: _,
9328
- model: V,
9343
+ model: A,
9329
9344
  context: N
9330
9345
  }) {
9331
9346
  g.current = (await w({
9332
- model: V,
9347
+ model: A,
9333
9348
  type: "form",
9334
9349
  context: N
9335
9350
  })).fields;
@@ -9340,7 +9355,7 @@ function _d(e, t) {
9340
9355
  formView: {
9341
9356
  fields: g.current
9342
9357
  },
9343
- model: V,
9358
+ model: A,
9344
9359
  items: _,
9345
9360
  context: N,
9346
9361
  currentView: "form"
@@ -9356,7 +9371,7 @@ function _d(e, t) {
9356
9371
  }))[0];
9357
9372
  }
9358
9373
  async function T(_) {
9359
- const V = [];
9374
+ const A = [];
9360
9375
  for (const j of _) {
9361
9376
  const { values: H } = j;
9362
9377
  if (H.action_id && H.action_id.length > 0) {
@@ -9364,15 +9379,15 @@ function _d(e, t) {
9364
9379
  actionId: U,
9365
9380
  rootContext: i
9366
9381
  }).then((Y) => ({ ...j, actionData: Y }));
9367
- V.push(k);
9382
+ A.push(k);
9368
9383
  }
9369
9384
  }
9370
- return await Promise.all(V);
9385
+ return await Promise.all(A);
9371
9386
  }
9372
9387
  async function O(_) {
9373
9388
  if (!h)
9374
9389
  return;
9375
- const V = _.filter((U) => {
9390
+ const A = _.filter((U) => {
9376
9391
  const k = a.find(
9377
9392
  (q) => q.id === U.id
9378
9393
  );
@@ -9386,11 +9401,11 @@ function _d(e, t) {
9386
9401
  };
9387
9402
  return JSON.stringify(U) !== JSON.stringify(Y);
9388
9403
  });
9389
- if (V.length === 0)
9404
+ if (A.length === 0)
9390
9405
  return;
9391
- const j = a.filter((U) => V.map((k) => k.id).includes(U.id)).map((U) => {
9406
+ const j = a.filter((U) => A.map((k) => k.id).includes(U.id)).map((U) => {
9392
9407
  const k = {
9393
- ...V.find((Y) => Y.id === U.id)
9408
+ ...A.find((Y) => Y.id === U.id)
9394
9409
  };
9395
9410
  return delete k.id, { ...U }, {
9396
9411
  ...U,
@@ -9415,7 +9430,7 @@ function _d(e, t) {
9415
9430
  async function C() {
9416
9431
  p(s);
9417
9432
  }
9418
- 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((_, V) => {
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) => {
9419
9434
  const { actionData: N, values: j } = _, { position: H, id: U } = j, {
9420
9435
  actionId: k,
9421
9436
  actionType: Y,
@@ -9432,7 +9447,7 @@ function _d(e, t) {
9432
9447
  try {
9433
9448
  J = JSON.parse(H.replace(/'/g, '"'));
9434
9449
  } catch {
9435
- J = { x: V * 2, y: 0, w: 2, h: 3 };
9450
+ J = { x: A * 2, y: 0, w: 2, h: 3 };
9436
9451
  }
9437
9452
  let te = null;
9438
9453
  if ((L == null ? void 0 : L.type) === "graph") {
@@ -9469,12 +9484,12 @@ function _d(e, t) {
9469
9484
  if (Se) {
9470
9485
  const [Ee, ke] = Se, {
9471
9486
  actionId: Me,
9472
- actionType: de,
9487
+ actionType: ue,
9473
9488
  title: Fe,
9474
9489
  model: Le
9475
9490
  } = N, ae = {
9476
9491
  action_id: Me,
9477
- action_type: de,
9492
+ action_type: ue,
9478
9493
  name: Fe,
9479
9494
  res_id: ie.id,
9480
9495
  res_model: Le,
@@ -9518,14 +9533,14 @@ function _d(e, t) {
9518
9533
  actionId: Ee,
9519
9534
  actionType: ke,
9520
9535
  title: Me,
9521
- model: de
9536
+ model: ue
9522
9537
  } = N;
9523
9538
  ve = {
9524
9539
  action_id: Ee,
9525
9540
  action_type: ke,
9526
9541
  name: Me,
9527
9542
  res_id: !1,
9528
- res_model: de,
9543
+ res_model: ue,
9529
9544
  view_id: ie,
9530
9545
  view_type: Se,
9531
9546
  overrideUnsettedLimit: !0
@@ -9581,8 +9596,8 @@ const Od = ht(_d), Id = (e) => {
9581
9596
  context: { ...b == null ? void 0 : b(), ...p }
9582
9597
  })).map((C) => {
9583
9598
  const _ = C[g];
9584
- let V = _;
9585
- return Array.isArray(_) && (V = _[1]), { label: V, value: C.id };
9599
+ let A = _;
9600
+ return Array.isArray(_) && (A = _[1]), { label: A, value: C.id };
9586
9601
  });
9587
9602
  l(O);
9588
9603
  } catch (T) {
@@ -9594,10 +9609,10 @@ const Od = ht(_d), Id = (e) => {
9594
9609
  return /* @__PURE__ */ r(Ze, { className: "mt-10", message: d, type: "error", banner: !0 });
9595
9610
  }
9596
9611
  const R = () => {
9597
- A(a.map((F) => F.value));
9612
+ V(a.map((F) => F.value));
9598
9613
  }, I = () => {
9599
- A([]);
9600
- }, A = (F) => {
9614
+ V([]);
9615
+ }, V = (F) => {
9601
9616
  const T = o.map((C) => F.includes(C.id) ? C.operation == "pendingRemove" ? {
9602
9617
  ...C,
9603
9618
  operation: "original"
@@ -9612,7 +9627,7 @@ const Od = ht(_d), Id = (e) => {
9612
9627
  {
9613
9628
  value: a.length ? s : [],
9614
9629
  disabled: h,
9615
- onChange: A,
9630
+ onChange: V,
9616
9631
  style: { width: "100%" },
9617
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 }) })) })
9618
9633
  }
@@ -9769,7 +9784,7 @@ function Xd(e, t) {
9769
9784
  action: S,
9770
9785
  values: R,
9771
9786
  forced_values: I,
9772
- initialViewType: A,
9787
+ initialViewType: V,
9773
9788
  res_id: F,
9774
9789
  domain: T = []
9775
9790
  }) {
@@ -9781,7 +9796,7 @@ function Xd(e, t) {
9781
9796
  Qe("Action type not supported");
9782
9797
  return;
9783
9798
  }
9784
- const [C, _] = S.split(","), V = parseInt(_), N = xt({
9799
+ const [C, _] = S.split(","), A = parseInt(_), N = xt({
9785
9800
  context: O.context,
9786
9801
  values: a,
9787
9802
  fields: {}
@@ -9814,9 +9829,9 @@ function Xd(e, t) {
9814
9829
  }
9815
9830
  }
9816
9831
  let E;
9817
- if (A) {
9832
+ if (V) {
9818
9833
  const [K, L] = B.find(
9819
- ([ce, J]) => J === A
9834
+ ([ce, J]) => J === V
9820
9835
  );
9821
9836
  E = { id: K, type: L };
9822
9837
  } else {
@@ -9832,7 +9847,7 @@ function Xd(e, t) {
9832
9847
  target: Y,
9833
9848
  initialView: E,
9834
9849
  action_type: C,
9835
- action_id: V,
9850
+ action_id: A,
9836
9851
  values: R,
9837
9852
  forced_values: I,
9838
9853
  res_id: F,
@@ -9844,7 +9859,7 @@ function Xd(e, t) {
9844
9859
  title: S,
9845
9860
  content: R,
9846
9861
  key: I,
9847
- action: A
9862
+ action: V
9848
9863
  }) {
9849
9864
  let F = [...d];
9850
9865
  d.length === 1 && d[0].key === "welcome" && (F = [...d.filter((T) => T.key !== "welcome")]), u([
@@ -9854,7 +9869,7 @@ function Xd(e, t) {
9854
9869
  key: I,
9855
9870
  closable: !0,
9856
9871
  content: R,
9857
- action: A
9872
+ action: V
9858
9873
  }
9859
9874
  ]), o(I);
9860
9875
  }
@@ -9862,7 +9877,7 @@ function Xd(e, t) {
9862
9877
  relateData: S,
9863
9878
  fields: R,
9864
9879
  values: I,
9865
- action_id: A,
9880
+ action_id: V,
9866
9881
  action_type: F
9867
9882
  }) {
9868
9883
  const {
@@ -9870,7 +9885,7 @@ function Xd(e, t) {
9870
9885
  context: O,
9871
9886
  domain: C,
9872
9887
  views: _,
9873
- target: V,
9888
+ target: A,
9874
9889
  string: N,
9875
9890
  limit: j
9876
9891
  } = S, [H, U] = _[0], k = { id: H, type: U }, Y = xt({
@@ -9888,13 +9903,13 @@ function Xd(e, t) {
9888
9903
  }) : [];
9889
9904
  x({
9890
9905
  model: T,
9891
- target: V,
9906
+ target: A,
9892
9907
  views: _,
9893
9908
  context: { ...l, ...Y },
9894
9909
  domain: q,
9895
9910
  title: N,
9896
9911
  initialView: k,
9897
- action_id: A,
9912
+ action_id: V,
9898
9913
  action_type: F,
9899
9914
  limit: j
9900
9915
  });
@@ -9903,7 +9918,7 @@ function Xd(e, t) {
9903
9918
  const {
9904
9919
  action_id: R,
9905
9920
  action_type: I,
9906
- res_id: A,
9921
+ res_id: V,
9907
9922
  view_id: F,
9908
9923
  overrideUnsettedLimit: T = !1
9909
9924
  } = S, O = `${I},${R}`, C = await P.getHandler().getActionData({
@@ -9913,7 +9928,7 @@ function Xd(e, t) {
9913
9928
  context: C.context,
9914
9929
  values: a,
9915
9930
  fields: {}
9916
- }), V = C.domain ? await P.getHandler().evalDomain({
9931
+ }), A = C.domain ? await P.getHandler().evalDomain({
9917
9932
  domain: C.domain,
9918
9933
  values: a,
9919
9934
  context: { ...l, ..._ }
@@ -9949,7 +9964,7 @@ function Xd(e, t) {
9949
9964
  [ne, B] = Q.find((K) => K[0] === void 0 ? !1 : K[0] === F);
9950
9965
  const E = { id: ne, type: B };
9951
9966
  x({
9952
- domain: V,
9967
+ domain: A,
9953
9968
  context: { ...l, ..._ },
9954
9969
  model: N,
9955
9970
  views: Q,
@@ -9958,7 +9973,7 @@ function Xd(e, t) {
9958
9973
  initialView: E,
9959
9974
  action_id: R,
9960
9975
  action_type: I,
9961
- res_id: A,
9976
+ res_id: V,
9962
9977
  treeExpandable: q,
9963
9978
  limit: T && (Y === 0 || Y === !1) ? St : Y
9964
9979
  });
@@ -9967,7 +9982,7 @@ function Xd(e, t) {
9967
9982
  model: S,
9968
9983
  values: R,
9969
9984
  forced_values: I,
9970
- initialViewType: A,
9985
+ initialViewType: V,
9971
9986
  res_id: F,
9972
9987
  domain: T
9973
9988
  }) {
@@ -9976,7 +9991,7 @@ function Xd(e, t) {
9976
9991
  action: O,
9977
9992
  values: R,
9978
9993
  forced_values: I,
9979
- initialViewType: A,
9994
+ initialViewType: V,
9980
9995
  res_id: F,
9981
9996
  domain: T
9982
9997
  });
@@ -9985,13 +10000,13 @@ function Xd(e, t) {
9985
10000
  domain: S,
9986
10001
  context: R,
9987
10002
  model: I,
9988
- views: A,
10003
+ views: V,
9989
10004
  title: F,
9990
10005
  target: T,
9991
10006
  initialView: O,
9992
10007
  action_id: C,
9993
10008
  action_type: _,
9994
- res_id: V,
10009
+ res_id: A,
9995
10010
  values: N,
9996
10011
  forced_values: j,
9997
10012
  treeExpandable: H = !1,
@@ -10013,7 +10028,7 @@ function Xd(e, t) {
10013
10028
  actionData: {
10014
10029
  action_id: C,
10015
10030
  action_type: _,
10016
- res_id: V,
10031
+ res_id: A,
10017
10032
  view_id: Y.view_id
10018
10033
  }
10019
10034
  });
@@ -10032,13 +10047,13 @@ function Xd(e, t) {
10032
10047
  action_type: _,
10033
10048
  tabKey: k,
10034
10049
  title: F,
10035
- views: A,
10050
+ views: V,
10036
10051
  model: I,
10037
10052
  context: { ...l, ...R },
10038
10053
  domain: S,
10039
10054
  setCanWeClose: p,
10040
10055
  initialView: Y,
10041
- res_id: V,
10056
+ res_id: A,
10042
10057
  formDefaultValues: N,
10043
10058
  formForcedValues: j,
10044
10059
  treeExpandable: H,
@@ -10203,12 +10218,12 @@ const { useToken: nu } = Be, Yu = (e) => {
10203
10218
  l(!1);
10204
10219
  return;
10205
10220
  }
10206
- const V = w.view_id;
10221
+ const A = w.view_id;
10207
10222
  let N = !1;
10208
10223
  return w.type === "form" && (N = b || !1), {
10209
10224
  action_id: C,
10210
10225
  action_type: _,
10211
- view_id: V,
10226
+ view_id: A,
10212
10227
  res_id: N
10213
10228
  };
10214
10229
  }, [b, w]), R = _e(() => {
@@ -10216,13 +10231,13 @@ const { useToken: nu } = Be, Yu = (e) => {
10216
10231
  return JSON.stringify(S);
10217
10232
  }, [S]);
10218
10233
  me(() => {
10219
- A();
10234
+ V();
10220
10235
  }, [R]);
10221
10236
  function I(C) {
10222
10237
  const _ = C;
10223
10238
  (_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && h(_);
10224
10239
  }
10225
- const A = fe(async () => {
10240
+ const V = de(async () => {
10226
10241
  if (!S)
10227
10242
  return;
10228
10243
  const C = await n(S);
@@ -10232,7 +10247,7 @@ const { useToken: nu } = Be, Yu = (e) => {
10232
10247
  var C;
10233
10248
  (C = m == null ? void 0 : m.current) == null || C.close(), x == null || x({ model: "ir.ui.view_sc" });
10234
10249
  }
10235
- const T = fe(async () => {
10250
+ const T = de(async () => {
10236
10251
  const C = await t();
10237
10252
  return C.length === 0 ? [
10238
10253
  {
@@ -10241,29 +10256,29 @@ const { useToken: nu } = Be, Yu = (e) => {
10241
10256
  }
10242
10257
  ] : [
10243
10258
  {
10244
- items: C.map((V) => ({
10245
- ...V,
10246
- id: V.id,
10247
- name: V.name,
10248
- icon: V.view_type === "tree" ? /* @__PURE__ */ r(Xn, {}) : /* @__PURE__ */ r(Kt, {})
10259
+ items: C.map((A) => ({
10260
+ ...A,
10261
+ id: A.id,
10262
+ name: A.name,
10263
+ icon: A.view_type === "tree" ? /* @__PURE__ */ r(Xn, {}) : /* @__PURE__ */ r(Kt, {})
10249
10264
  }))
10250
10265
  }
10251
10266
  ];
10252
- }, [t, f]), O = fe(async () => {
10267
+ }, [t, f]), O = de(async () => {
10253
10268
  if (a && d)
10254
10269
  await o(d);
10255
10270
  else {
10256
10271
  if (!w)
10257
10272
  return;
10258
- const C = g.find((H) => H.key === y), { id: _, type: V } = (C == null ? void 0 : C.action) || {}, N = w.view_id;
10273
+ const C = g.find((H) => H.key === y), { id: _, type: A } = (C == null ? void 0 : C.action) || {}, N = w.view_id;
10259
10274
  let j = !1;
10260
- if (!_ || !V) {
10275
+ if (!_ || !A) {
10261
10276
  l(!1);
10262
10277
  return;
10263
10278
  }
10264
10279
  w.type === "form" && (j = b || !1), await i({
10265
10280
  action_id: _,
10266
- action_type: V,
10281
+ action_type: A,
10267
10282
  view_id: N,
10268
10283
  res_id: j
10269
10284
  });