@gisce/react-ooui 1.2.7-rc.1 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- import qe, { useContext as Y, useState as T, useEffect as ge, useRef as me, useCallback as Me, forwardRef as wt, useImperativeHandle as bt } from "react";
2
- import { Tooltip as ht, theme as $e, Typography as on, Form as it, Row as Se, Col as ce, Modal as We, Button as Ie, Dropdown as Ht, Menu as Le, Spin as Ae, Divider as sn, Space as je, Input as Qe, Select as xt, Checkbox as Lt, Alert as ze, Timeline as er, Statistic as qo, Card as zo, Tag as kn, message as wn, DatePicker as Rn, TimePicker as _r, InputNumber as Mn, Progress as Jo, Avatar as Zo, Pagination as Xo, Tabs as Ir, Popover as Qo, Radio as tr, Switch as ei, Steps as nr, Layout as ti } from "antd";
3
- import { Label as Vt, Field as Fn, Tree as Dr, Reference as ni, Selection as En, Many2one as Vr, Boolean as ri, Container as oi, parseContext as vt, Form as Ar, Integer as On, SearchFieldTypes as ft, SearchFilter as ii, transformDomainForChildWidget as kr, graphProcessor as Rr, parseGraph as $n, graphFieldUtils as si } from "@gisce/ooui";
1
+ import qe, { useContext as Y, useState as T, useEffect as ge, useRef as me, useCallback as Re, forwardRef as vt, useImperativeHandle as wt } from "react";
2
+ import { Tooltip as ht, theme as $e, Typography as on, Form as it, Row as Se, Col as ce, Modal as We, Button as Ie, Dropdown as Ht, Menu as Le, Spin as Me, Divider as sn, Space as je, Input as Qe, Select as bt, Checkbox as Lt, Alert as ze, Timeline as er, Statistic as qo, Card as zo, Tag as kn, message as wn, DatePicker as Rn, TimePicker as _r, InputNumber as Mn, Progress as Jo, Avatar as Zo, Pagination as Xo, Tabs as Ir, Popover as Qo, Radio as tr, Switch as ei, Steps as nr, Layout as ti } from "antd";
3
+ import { Label as Dt, Field as Fn, Tree as Dr, Reference as ni, Selection as En, Many2one as Vr, Boolean as ri, Container as oi, parseContext as yt, Form as Ar, Integer as On, SearchFieldTypes as ft, SearchFilter as ii, transformDomainForChildWidget as kr, graphProcessor as Rr, parseGraph as $n, graphFieldUtils as si } from "@gisce/ooui";
4
4
  import * as rr from "@ant-design/icons";
5
- import Mr, { QuestionCircleOutlined as Er, ExclamationCircleOutlined as pt, LoadingOutlined as et, DownOutlined as At, WarningOutlined as $r, CloseOutlined as Bt, CheckOutlined as kt, TranslationOutlined as Lr, FolderOpenOutlined as Ln, DownloadOutlined as Nn, ClearOutlined as Pn, StarFilled as Nr, StarOutlined as Pr, UpOutlined as ai, SearchOutlined as Hn, RightCircleOutlined as li, ThunderboltOutlined as Bn, PrinterOutlined as jn, EnterOutlined as Hr, PlusSquareOutlined as ci, MinusSquareOutlined as di, FileAddOutlined as an, AlignLeftOutlined as ui, ApiOutlined as fi, DeleteOutlined as Kn, LeftOutlined as Br, RightOutlined as jr, EyeOutlined as mi, FormOutlined as Nt, TableOutlined as Yn, AreaChartOutlined as hi, CalendarOutlined as pi, LinkOutlined as Kr, SaveOutlined as gi, CopyOutlined as Wn, InfoCircleOutlined as Yr, ReloadOutlined as ln, EditOutlined as Wr, FilterOutlined as Ur, CloseCircleFilled as yi, BorderOuterOutlined as vi, SettingOutlined as wi, ExportOutlined as bi } from "@ant-design/icons";
5
+ import Mr, { QuestionCircleOutlined as Er, ExclamationCircleOutlined as pt, LoadingOutlined as et, DownOutlined as Vt, WarningOutlined as $r, CloseOutlined as Bt, CheckOutlined as At, TranslationOutlined as Lr, FolderOpenOutlined as Ln, DownloadOutlined as Nn, ClearOutlined as Pn, StarFilled as Nr, StarOutlined as Pr, UpOutlined as ai, SearchOutlined as Hn, RightCircleOutlined as li, ThunderboltOutlined as Bn, PrinterOutlined as jn, EnterOutlined as Hr, PlusSquareOutlined as ci, MinusSquareOutlined as di, FileAddOutlined as an, AlignLeftOutlined as ui, ApiOutlined as fi, DeleteOutlined as Kn, LeftOutlined as Br, RightOutlined as jr, EyeOutlined as mi, FormOutlined as Nt, TableOutlined as Yn, AreaChartOutlined as hi, CalendarOutlined as pi, LinkOutlined as Kr, SaveOutlined as gi, CopyOutlined as Wn, InfoCircleOutlined as Yr, ReloadOutlined as ln, EditOutlined as Wr, FilterOutlined as Ur, CloseCircleFilled as yi, BorderOuterOutlined as vi, SettingOutlined as wi, ExportOutlined as bi } from "@ant-design/icons";
6
6
  import { Interweave as Un } from "interweave";
7
- import { jsxs as H, jsx as n, Fragment as Z } from "react/jsx-runtime";
7
+ import { jsxs as H, jsx as n, Fragment as X } from "react/jsx-runtime";
8
8
  import * as or from "@tabler/icons-react";
9
9
  import xi from "antd/lib/input/TextArea";
10
10
  import jt from "styled-components";
11
11
  import Gn from "react-measure";
12
12
  import _n from "antd/lib/typography/Title";
13
13
  import { Line as Ci, Column as Si, Pie as Ti } from "@ant-design/plots";
14
- import Ct from "use-deep-compare-effect";
14
+ import xt from "use-deep-compare-effect";
15
15
  import { Table as Fi } from "@gisce/react-formiga-table";
16
16
  import { fileTypeFromBuffer as Oi } from "file-type-buffer-browser";
17
17
  import { GridUi as _i } from "@gisce/fiber-diagram";
@@ -381,7 +381,7 @@ function ve({
381
381
  if (!o)
382
382
  return p();
383
383
  const h = /* @__PURE__ */ n(cn, {
384
- ooui: new Vt({
384
+ ooui: new Dt({
385
385
  name: d + "_label",
386
386
  string: f,
387
387
  help: c,
@@ -403,7 +403,7 @@ function ve({
403
403
  flex: "auto",
404
404
  children: p()
405
405
  })]
406
- }))() : (() => /* @__PURE__ */ H(Z, {
406
+ }))() : (() => /* @__PURE__ */ H(X, {
407
407
  children: [h, p()]
408
408
  }))();
409
409
  }
@@ -703,7 +703,7 @@ const qr = (e) => {
703
703
  children: /* @__PURE__ */ H(Ht.Button, {
704
704
  disabled: !a || v,
705
705
  onClick: A,
706
- icon: /* @__PURE__ */ n(At, {}),
706
+ icon: /* @__PURE__ */ n(Vt, {}),
707
707
  type: f ? "primary" : void 0,
708
708
  overlay: /* @__PURE__ */ n(Ji, {
709
709
  ooui: i,
@@ -943,7 +943,7 @@ const zr = (e) => {
943
943
  p(!1), a();
944
944
  }
945
945
  function M() {
946
- return c ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ H(Z, {
946
+ return c ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ H(X, {
947
947
  children: [A(), /* @__PURE__ */ n(sn, {}), /* @__PURE__ */ n(Se, {
948
948
  justify: "end",
949
949
  children: /* @__PURE__ */ H(je, {
@@ -953,7 +953,7 @@ const zr = (e) => {
953
953
  disabled: v,
954
954
  children: u("cancel")
955
955
  }), /* @__PURE__ */ n(Ie, {
956
- icon: v ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n(kt, {}),
956
+ icon: v ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n(At, {}),
957
957
  disabled: v,
958
958
  onClick: I,
959
959
  style: {
@@ -1052,7 +1052,7 @@ const {
1052
1052
  } = o || {}, [f, c] = T(!1), {
1053
1053
  t: m
1054
1054
  } = Y(we);
1055
- return s ? /* @__PURE__ */ H(Z, {
1055
+ return s ? /* @__PURE__ */ H(X, {
1056
1056
  children: [/* @__PURE__ */ n("div", {
1057
1057
  onClick: () => {
1058
1058
  if (u != null && u()) {
@@ -1086,7 +1086,7 @@ const {
1086
1086
  c(!1), l == null || l();
1087
1087
  }
1088
1088
  })]
1089
- }) : /* @__PURE__ */ n(Z, {
1089
+ }) : /* @__PURE__ */ n(X, {
1090
1090
  children: /* @__PURE__ */ H(Se, {
1091
1091
  gutter: 8,
1092
1092
  wrap: !1,
@@ -1119,7 +1119,7 @@ const {
1119
1119
  defaultSeed: os
1120
1120
  } = $e, is = rs(os), {
1121
1121
  Option: ss
1122
- } = xt, Xr = (e) => {
1122
+ } = bt, Xr = (e) => {
1123
1123
  const {
1124
1124
  ooui: t
1125
1125
  } = e, {
@@ -1149,7 +1149,7 @@ const {
1149
1149
  children: m
1150
1150
  }, c);
1151
1151
  });
1152
- return /* @__PURE__ */ n(a && !s ? as : xt, {
1152
+ return /* @__PURE__ */ n(a && !s ? as : bt, {
1153
1153
  disabled: s,
1154
1154
  onChange: r,
1155
1155
  value: i,
@@ -1158,7 +1158,7 @@ const {
1158
1158
  showSearch: !0,
1159
1159
  children: u
1160
1160
  });
1161
- }, as = jt(xt)`
1161
+ }, as = jt(bt)`
1162
1162
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
1163
1163
  background-color: ${is.colorPrimaryBg};
1164
1164
  }
@@ -1221,16 +1221,16 @@ var Ts = Ss, Fs = Ts, Os = /^\s+/;
1221
1221
  function _s(e) {
1222
1222
  return e && e.slice(0, Fs(e) + 1).replace(Os, "");
1223
1223
  }
1224
- var Is = _s, Ds = to, Vs = Ds.Symbol, no = Vs, cr = no, ro = Object.prototype, As = ro.hasOwnProperty, ks = ro.toString, Et = cr ? cr.toStringTag : void 0;
1224
+ var Is = _s, Ds = to, Vs = Ds.Symbol, no = Vs, cr = no, ro = Object.prototype, As = ro.hasOwnProperty, ks = ro.toString, Mt = cr ? cr.toStringTag : void 0;
1225
1225
  function Rs(e) {
1226
- var t = As.call(e, Et), r = e[Et];
1226
+ var t = As.call(e, Mt), r = e[Mt];
1227
1227
  try {
1228
- e[Et] = void 0;
1228
+ e[Mt] = void 0;
1229
1229
  var i = !0;
1230
1230
  } catch {
1231
1231
  }
1232
1232
  var o = ks.call(e);
1233
- return i && (t ? e[Et] = r : delete e[Et]), o;
1233
+ return i && (t ? e[Mt] = r : delete e[Mt]), o;
1234
1234
  }
1235
1235
  var Ms = Rs, Es = Object.prototype, $s = Es.toString;
1236
1236
  function Ls(e) {
@@ -1317,7 +1317,7 @@ function fa(e) {
1317
1317
  const r = Buffer.from(e, "base64").length / 1e3;
1318
1318
  return `${Math.round((r + Number.EPSILON) * 100) / 100} KB`;
1319
1319
  }
1320
- async function Dt(e) {
1320
+ async function It(e) {
1321
1321
  const t = await Oi(
1322
1322
  Buffer.from(e, "base64")
1323
1323
  );
@@ -1363,7 +1363,7 @@ const ma = (e) => {
1363
1363
  i == null || i(c);
1364
1364
  };
1365
1365
  async function u() {
1366
- const c = await Dt(r), m = `data:${c == null ? void 0 : c.mime};base64,${r}`, v = document.createElement("a");
1366
+ const c = await It(r), m = `data:${c == null ? void 0 : c.mime};base64,${r}`, v = document.createElement("a");
1367
1367
  v.href = m, v.download = `image.${c == null ? void 0 : c.ext}`, v.click();
1368
1368
  }
1369
1369
  async function d(c) {
@@ -1374,7 +1374,7 @@ const ma = (e) => {
1374
1374
  function f() {
1375
1375
  l(void 0);
1376
1376
  }
1377
- return /* @__PURE__ */ H(Z, {
1377
+ return /* @__PURE__ */ H(X, {
1378
1378
  children: [/* @__PURE__ */ H(Se, {
1379
1379
  gutter: 8,
1380
1380
  wrap: !1,
@@ -1450,7 +1450,7 @@ const ma = (e) => {
1450
1450
  r && r(i);
1451
1451
  }
1452
1452
  });
1453
- }, Ot = (e) => {
1453
+ }, Ft = (e) => {
1454
1454
  const t = e.arch, r = e.fields, i = new Dr(r);
1455
1455
  return i.parse(t), i;
1456
1456
  }, ya = (e, t, r) => e.columns.map((o) => {
@@ -1490,7 +1490,7 @@ function Xt(e) {
1490
1490
  t[r.id] = r.colors;
1491
1491
  }), t;
1492
1492
  }
1493
- function _t({
1493
+ function Ot({
1494
1494
  resultsToSort: e,
1495
1495
  sorter: t,
1496
1496
  fields: r
@@ -1521,7 +1521,7 @@ const qn = async (e) => {
1521
1521
  };
1522
1522
  let f = [], c;
1523
1523
  if (a === "tree" && (o == null ? void 0 : o.arch)) {
1524
- const h = (p = Ot(o)) == null ? void 0 : p.colors, g = await B.getHandler().readEvalUiObjects({
1524
+ const h = (p = Ft(o)) == null ? void 0 : p.colors, g = await B.getHandler().readEvalUiObjects({
1525
1525
  model: r,
1526
1526
  ids: u,
1527
1527
  arch: o == null ? void 0 : o.arch,
@@ -1577,7 +1577,7 @@ const qn = async (e) => {
1577
1577
  } = t, [s, a] = T(!0), [l, u] = T(), [d, f] = T(/* @__PURE__ */ new Map()), c = Y(Ee), {
1578
1578
  getContext: m
1579
1579
  } = c || {};
1580
- Ct(() => {
1580
+ xt(() => {
1581
1581
  p();
1582
1582
  }, [t]);
1583
1583
  const v = async (h) => o && o[h] ? o[h] : await B.getHandler().getView({
@@ -1598,7 +1598,7 @@ const qn = async (e) => {
1598
1598
  a(!1);
1599
1599
  }
1600
1600
  };
1601
- return s ? /* @__PURE__ */ n(Ae, {}) : l ? /* @__PURE__ */ n(ze, {
1601
+ return s ? /* @__PURE__ */ n(Me, {}) : l ? /* @__PURE__ */ n(ze, {
1602
1602
  className: "mt-10",
1603
1603
  message: l,
1604
1604
  type: "error",
@@ -1628,7 +1628,7 @@ const qn = async (e) => {
1628
1628
  } = i, _ = s.filter((w) => w.values), b = Y(Ee), {
1629
1629
  getContext: A
1630
1630
  } = b || {};
1631
- Ct(() => {
1631
+ xt(() => {
1632
1632
  M();
1633
1633
  }, [s]);
1634
1634
  const I = (w) => {
@@ -1667,7 +1667,7 @@ const qn = async (e) => {
1667
1667
  message: u,
1668
1668
  type: "error",
1669
1669
  banner: !0
1670
- }) : a ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ H(Z, {
1670
+ }) : a ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ H(X, {
1671
1671
  children: [/* @__PURE__ */ n(er, {
1672
1672
  style: {
1673
1673
  padding: "1rem"
@@ -1739,7 +1739,7 @@ const qn = async (e) => {
1739
1739
  } = Ca(), {
1740
1740
  ooui: r,
1741
1741
  value: i
1742
- } = e, o = /* @__PURE__ */ H(Z, {
1742
+ } = e, o = /* @__PURE__ */ H(X, {
1743
1743
  children: [/* @__PURE__ */ H("span", {
1744
1744
  children: [r.label, " "]
1745
1745
  }), r.tooltip && /* @__PURE__ */ n(ht, {
@@ -1777,7 +1777,7 @@ const qn = async (e) => {
1777
1777
  } else
1778
1778
  r[i] = e[i];
1779
1779
  }), r;
1780
- }, Ft = (e, t) => Fa(e, t), xn = ({
1780
+ }, Tt = (e, t) => Fa(e, t), xn = ({
1781
1781
  source: e,
1782
1782
  target: t,
1783
1783
  fields: r
@@ -1872,7 +1872,7 @@ const qn = async (e) => {
1872
1872
  function pr(e, t, r) {
1873
1873
  return r.indexOf(e) === t;
1874
1874
  }
1875
- const Rt = ({
1875
+ const kt = ({
1876
1876
  values: e,
1877
1877
  fields: t
1878
1878
  }) => {
@@ -1917,7 +1917,7 @@ const Rt = ({
1917
1917
  } = r, g = Y(Ee), {
1918
1918
  getContext: y
1919
1919
  } = g || {};
1920
- Ct(() => {
1920
+ xt(() => {
1921
1921
  _();
1922
1922
  }, [o]);
1923
1923
  const O = (I) => {
@@ -1932,7 +1932,7 @@ const Rt = ({
1932
1932
  if (p && (I = [["id", "in", s]]), r.domain) {
1933
1933
  const x = await B.getHandler().evalDomain({
1934
1934
  domain: r.domain,
1935
- values: Rt({
1935
+ values: kt({
1936
1936
  fields: g == null ? void 0 : g.getFields(),
1937
1937
  values: g.getPlainValues()
1938
1938
  }),
@@ -2002,10 +2002,10 @@ const Rt = ({
2002
2002
  message: u,
2003
2003
  type: "error",
2004
2004
  banner: !0
2005
- }) : /* @__PURE__ */ n(Z, {
2005
+ }) : /* @__PURE__ */ n(X, {
2006
2006
  children: /* @__PURE__ */ n("div", {
2007
2007
  className: "flex flex-row",
2008
- children: /* @__PURE__ */ n(xt, {
2008
+ children: /* @__PURE__ */ n(bt, {
2009
2009
  mode: "multiple",
2010
2010
  value: a.length ? s : [],
2011
2011
  tagRender: A,
@@ -2126,14 +2126,14 @@ const Rt = ({
2126
2126
  if (i.push(a), s(l)) {
2127
2127
  const u = r - o;
2128
2128
  for (let d = 0; d < u; d += 1)
2129
- i.push(new Vt({ string: "" }));
2129
+ i.push(new Dt({ string: "" }));
2130
2130
  }
2131
2131
  }), i;
2132
2132
  }, $a = ({
2133
2133
  row: e,
2134
2134
  numberOfColumns: t
2135
2135
  }) => e.map((r) => (r._mustExpand && (r.colspan = t), r)), La = (e, t) => {
2136
- const r = e.map((i) => i instanceof Vt && i.fieldForLabel || i instanceof oi ? "auto" : "1fr");
2136
+ const r = e.map((i) => i instanceof Dt && i.fieldForLabel || i instanceof oi ? "auto" : "1fr");
2137
2137
  if (r.length < t) {
2138
2138
  const i = t - r.length;
2139
2139
  for (let o = 0; o < i; o++)
@@ -2169,7 +2169,7 @@ const Rt = ({
2169
2169
  row: p,
2170
2170
  numberOfColumns: o,
2171
2171
  mustFillWithEmpties: r
2172
- }), l = l.concat(h)), h.map((g) => (g instanceof Vt && g.fieldForLabel && (a = !0), /* @__PURE__ */ n("div", {
2172
+ }), l = l.concat(h)), h.map((g) => (g instanceof Dt && g.fieldForLabel && (a = !0), /* @__PURE__ */ n("div", {
2173
2173
  style: {
2174
2174
  ...Ma({
2175
2175
  item: g,
@@ -2336,9 +2336,9 @@ const Rt = ({
2336
2336
  setLimit: A,
2337
2337
  searchParams: I = [],
2338
2338
  setSearchValues: M
2339
- } = e, [w, x] = T(!1), [F, C] = T(!1), [L, S] = T(), [R, V] = T(1), [E, D] = T(0), [k, N] = T(), [j, W] = T([]), [K, z] = T(void 0), q = me(b || Pt), $ = me([]), P = Me((oe) => {
2339
+ } = e, [w, x] = T(!1), [F, C] = T(!1), [L, S] = T(), [R, V] = T(1), [E, D] = T(0), [k, N] = T(), [j, W] = T([]), [K, z] = T(void 0), q = me(b || Pt), $ = me([]), P = Re((oe) => {
2340
2340
  g == null || g([...oe]), W([...oe]);
2341
- }, []), Q = Me(() => y || j, [y, j]), ie = Me(async () => {
2341
+ }, []), Q = Re(() => y || j, [y, j]), ie = Re(async () => {
2342
2342
  const oe = await B.getHandler().nameSearch({
2343
2343
  model: t,
2344
2344
  payload: l,
@@ -2347,7 +2347,7 @@ const Rt = ({
2347
2347
  context: d
2348
2348
  });
2349
2349
  if (N(oe.length), f == null || f(oe.length), oe.length > 0) {
2350
- const Te = oe.map((Be) => Be == null ? void 0 : Be[0]), { colors: be } = Ot(c), Fe = await B.getHandler().readEvalUiObjects({
2350
+ const Te = oe.map((Be) => Be == null ? void 0 : Be[0]), { colors: be } = Ft(c), Fe = await B.getHandler().readEvalUiObjects({
2351
2351
  model: t,
2352
2352
  ids: Te,
2353
2353
  arch: c == null ? void 0 : c.arch,
@@ -2358,7 +2358,7 @@ const Rt = ({
2358
2358
  }
2359
2359
  }), He = Fe[0];
2360
2360
  $.current = [...He], z(Xt(Fe[1]));
2361
- const Ne = He.map((Be) => Be.id), Je = v !== void 0 ? _t({
2361
+ const Ne = He.map((Be) => Be.id), Je = v !== void 0 ? Ot({
2362
2362
  resultsToSort: He,
2363
2363
  sorter: v,
2364
2364
  fields: { ...c.fields, ...m.fields }
@@ -2379,9 +2379,9 @@ const Rt = ({
2379
2379
  v,
2380
2380
  h,
2381
2381
  f
2382
- ]), se = Me(
2382
+ ]), se = Re(
2383
2383
  async (oe) => {
2384
- const { params: Te, newOffset: be } = oe || {}, Fe = fn(Te || I, O), { colors: He } = Ot(c), { totalItems: Ne, results: Je, attrsEvaluated: Be } = await B.getHandler().searchForTree({
2384
+ const { params: Te, newOffset: be } = oe || {}, Fe = fn(Te || I, O), { colors: He } = Ft(c), { totalItems: Ne, results: Je, attrsEvaluated: Be } = await B.getHandler().searchForTree({
2385
2385
  params: Fe,
2386
2386
  limit: q.current,
2387
2387
  offset: be || E,
@@ -2391,7 +2391,7 @@ const Rt = ({
2391
2391
  attrs: He && { colors: He }
2392
2392
  });
2393
2393
  z(Xt(Be)), $.current = [...Je];
2394
- const te = v !== void 0 ? _t({
2394
+ const te = v !== void 0 ? Ot({
2395
2395
  resultsToSort: Je,
2396
2396
  sorter: v,
2397
2397
  fields: { ...c.fields, ...m.fields }
@@ -2423,7 +2423,7 @@ const Rt = ({
2423
2423
  E,
2424
2424
  I
2425
2425
  ]
2426
- ), ee = Me(
2426
+ ), ee = Re(
2427
2427
  async (oe) => {
2428
2428
  try {
2429
2429
  x(!0), a == null || a(!0), l && !u.current ? await ie() : await se(oe);
@@ -2454,12 +2454,10 @@ const Rt = ({
2454
2454
  v,
2455
2455
  c
2456
2456
  ]
2457
- ), J = Me(
2457
+ ), J = Re(
2458
2458
  (oe) => {
2459
- if (JSON.stringify(oe) === JSON.stringify(v))
2460
- return;
2461
2459
  p == null || p(oe);
2462
- const Te = oe !== void 0 ? _t({
2460
+ const Te = oe !== void 0 ? Ot({
2463
2461
  resultsToSort: Q(),
2464
2462
  sorter: oe,
2465
2463
  fields: { ...c.fields, ...m.fields }
@@ -2467,7 +2465,7 @@ const Rt = ({
2467
2465
  P(Te);
2468
2466
  },
2469
2467
  [p, Q, c, m, P]
2470
- ), pe = Me(
2468
+ ), pe = Re(
2471
2469
  (oe) => {
2472
2470
  const { params: Te, searchValues: be, limit: Fe, offset: He } = oe;
2473
2471
  w || (r == null || r(void 0), i == null || i([]), M == null || M(be), o == null || o(Te), s == null || s(!1), C(!0), S(void 0), V(1), Fe && (q.current = Fe, A == null || A(Fe)), He && D(He), ee({
@@ -2488,12 +2486,12 @@ const Rt = ({
2488
2486
  D,
2489
2487
  ee
2490
2488
  ]
2491
- ), ye = Me(
2489
+ ), ye = Re(
2492
2490
  (oe) => {
2493
2491
  x(!0), V(oe), D((oe - 1) * b);
2494
2492
  },
2495
2493
  [x, b, D, V]
2496
- ), ke = Me(() => {
2494
+ ), Ae = Re(() => {
2497
2495
  w || (r == null || r(void 0), o == null || o([]), M == null || M({}), S(void 0), D(0), V(1), A == null || A(b || Pt));
2498
2496
  }, [
2499
2497
  w,
@@ -2504,7 +2502,7 @@ const Rt = ({
2504
2502
  V,
2505
2503
  A,
2506
2504
  b
2507
- ]), de = Me(
2505
+ ]), de = Re(
2508
2506
  async (oe) => {
2509
2507
  const Te = oe[(c == null ? void 0 : c.field_parent) || "child_id"], be = await B.getHandler().readObjects({
2510
2508
  model: t,
@@ -2512,13 +2510,13 @@ const Rt = ({
2512
2510
  fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
2513
2511
  context: d
2514
2512
  });
2515
- return P([...Q(), ...be]), io(Ot(c), be);
2513
+ return P([...Q(), ...be]), io(Ft(c), be);
2516
2514
  },
2517
2515
  [c, t, d, Q, P]
2518
2516
  );
2519
2517
  return {
2520
2518
  submit: pe,
2521
- clear: ke,
2519
+ clear: Ae,
2522
2520
  fetchResults: ee,
2523
2521
  tableRefreshing: w,
2524
2522
  searchFilterLoading: F,
@@ -2560,7 +2558,7 @@ const Rt = ({
2560
2558
  setSearchTreeNameSearch: M,
2561
2559
  goToResourceId: w,
2562
2560
  limit: x
2563
- } = e, [F, C] = T(!1), [L, S] = T(!1), [R, V] = T(!1), [E, D] = T(!0), [k, N] = T(!0), [j, W] = T([]), [K, z] = T(!1), [q, $] = T([]), [P, Q] = T(!1), [ie, se] = T(!0), [ee, J] = T(), [pe, ye] = T({}), [ke, de] = T(x !== void 0 ? x : Pt), [oe, Te] = T(i);
2561
+ } = e, [F, C] = T(!1), [L, S] = T(!1), [R, V] = T(!1), [E, D] = T(!0), [k, N] = T(!0), [j, W] = T([]), [K, z] = T(!1), [q, $] = T([]), [P, Q] = T(!1), [ie, se] = T(!0), [ee, J] = T(), [pe, ye] = T({}), [Ae, de] = T(x !== void 0 ? x : Pt), [oe, Te] = T(i);
2564
2562
  ge(() => {
2565
2563
  m && m.length > 0 && !v && (p == null || p(0), f == null || f(m[0].id));
2566
2564
  }, [m]), ge(() => {
@@ -2624,7 +2622,7 @@ const Rt = ({
2624
2622
  goToResourceId: w,
2625
2623
  searchValues: pe,
2626
2624
  setSearchValues: ye,
2627
- limit: ke,
2625
+ limit: Ae,
2628
2626
  setLimit: de,
2629
2627
  setTitle: Te
2630
2628
  },
@@ -2659,7 +2657,7 @@ const Rt = ({
2659
2657
  },
2660
2658
  children: t
2661
2659
  });
2662
- }, Mt = qe.createContext(null), vr = async (e) => {
2660
+ }, Rt = qe.createContext(null), vr = async (e) => {
2663
2661
  var t;
2664
2662
  for (let r = 0; r < e.length; r++)
2665
2663
  await ((t = e == null ? void 0 : e[r]) == null ? void 0 : t.call(e));
@@ -2672,7 +2670,7 @@ const Rt = ({
2672
2670
  } = u || {}, f = me([]), {
2673
2671
  t: c
2674
2672
  } = Y(we);
2675
- bt(t, () => ({
2673
+ wt(t, () => ({
2676
2674
  openActionModal: b
2677
2675
  }));
2678
2676
  const [m, v] = T(!1), [p, h] = T({
@@ -2699,7 +2697,7 @@ const Rt = ({
2699
2697
  ids: D
2700
2698
  } = R || {};
2701
2699
  let k = D || [];
2702
- const N = typeof L == "string" ? vt({
2700
+ const N = typeof L == "string" ? yt({
2703
2701
  context: L,
2704
2702
  fields: x,
2705
2703
  values: F
@@ -2729,7 +2727,7 @@ const Rt = ({
2729
2727
  id: M
2730
2728
  }), w.state && s.current === !0) {
2731
2729
  s.current = !1, clearInterval(o.current), l(!1);
2732
- const x = await Dt(w.result);
2730
+ const x = await It(w.result);
2733
2731
  un(w.result, x.mime);
2734
2732
  }
2735
2733
  } catch (x) {
@@ -2772,7 +2770,7 @@ const Rt = ({
2772
2770
  context: F
2773
2771
  }))[0]);
2774
2772
  const S = {
2775
- ...typeof (C == null ? void 0 : C.context) == "string" ? vt({
2773
+ ...typeof (C == null ? void 0 : C.context) == "string" ? yt({
2776
2774
  context: C.context,
2777
2775
  fields: w,
2778
2776
  values: {
@@ -2785,7 +2783,7 @@ const Rt = ({
2785
2783
  let R = [];
2786
2784
  if (C.domain && (R = await B.getHandler().evalDomain({
2787
2785
  domain: C.domain,
2788
- values: Rt({
2786
+ values: kt({
2789
2787
  fields: w,
2790
2788
  values: {
2791
2789
  ...x,
@@ -2883,13 +2881,13 @@ const Rt = ({
2883
2881
  actionData: void 0
2884
2882
  });
2885
2883
  }
2886
- return /* @__PURE__ */ n(Z, {
2887
- children: /* @__PURE__ */ n(Mt.Provider, {
2884
+ return /* @__PURE__ */ n(X, {
2885
+ children: /* @__PURE__ */ n(Rt.Provider, {
2888
2886
  value: {
2889
2887
  processAction: O,
2890
2888
  globalValues: i
2891
2889
  },
2892
- children: /* @__PURE__ */ H(Z, {
2890
+ children: /* @__PURE__ */ H(X, {
2893
2891
  children: [r, /* @__PURE__ */ n(We, {
2894
2892
  title: c("generatingReport"),
2895
2893
  open: a,
@@ -2897,7 +2895,7 @@ const Rt = ({
2897
2895
  closable: !1,
2898
2896
  centered: !0,
2899
2897
  maskClosable: !1,
2900
- children: /* @__PURE__ */ n(Ae, {})
2898
+ children: /* @__PURE__ */ n(Me, {})
2901
2899
  }), /* @__PURE__ */ n(Ut, {
2902
2900
  buttonModal: !0,
2903
2901
  parentContext: p.context,
@@ -2976,7 +2974,7 @@ async function nl({
2976
2974
  initialView: a
2977
2975
  };
2978
2976
  }
2979
- const rl = wt(tl), ol = ({
2977
+ const rl = vt(tl), ol = ({
2980
2978
  error: e,
2981
2979
  className: t
2982
2980
  }) => {
@@ -3030,7 +3028,7 @@ function sl(e, t) {
3030
3028
  } = Y(we), [x, F] = T(!1), [C, L] = T(), [S, R] = T(), [V] = it.useForm(), [E, D] = T(), [k, N] = T(), j = Y(ao), [W, K] = T(), [z, q] = T(!1), $ = me(), P = me({}), Q = me({}), ie = me(!1), se = me(!1), ee = W < il, J = Y(Ee), {
3031
3029
  activeId: pe,
3032
3030
  getPlainValues: ye
3033
- } = J || {}, ke = Y(Xe), {
3031
+ } = J || {}, Ae = Y(Xe), {
3034
3032
  setFormIsSaving: de = void 0,
3035
3033
  setFormHasChanges: oe = void 0,
3036
3034
  setCurrentId: Te = void 0,
@@ -3038,14 +3036,14 @@ function sl(e, t) {
3038
3036
  setAttachments: Fe = void 0,
3039
3037
  title: He = void 0,
3040
3038
  setTitle: Ne = void 0
3041
- } = (b ? ke : {}) || {}, Je = Y(Mt), {
3039
+ } = (b ? Ae : {}) || {}, Je = Y(Rt), {
3042
3040
  processAction: Be,
3043
3041
  globalValues: te
3044
3042
  } = Je || {};
3045
- bt(t, () => ({
3043
+ wt(t, () => ({
3046
3044
  submitForm: qt,
3047
3045
  getFields: De,
3048
- getValues: Re,
3046
+ getValues: ke,
3049
3047
  getPlainValues: tt,
3050
3048
  getContext: nt,
3051
3049
  fetchValues: ot,
@@ -3079,17 +3077,17 @@ function sl(e, t) {
3079
3077
  function De() {
3080
3078
  return k;
3081
3079
  }
3082
- function Re() {
3080
+ function ke() {
3083
3081
  const G = {
3084
3082
  ...ae(k),
3085
- ...X()
3083
+ ...Z()
3086
3084
  };
3087
3085
  for (const U in G)
3088
3086
  G[U] === void 0 && delete G[U];
3089
3087
  return G;
3090
3088
  }
3091
3089
  function tt() {
3092
- const G = Re(), U = De();
3090
+ const G = ke(), U = De();
3093
3091
  let ne = {};
3094
3092
  return Object.keys(G).forEach((re) => {
3095
3093
  const Ve = G[re];
@@ -3110,7 +3108,7 @@ function sl(e, t) {
3110
3108
  ...S == null ? void 0 : S.context
3111
3109
  };
3112
3110
  }
3113
- function X() {
3111
+ function Z() {
3114
3112
  return {
3115
3113
  id: le(),
3116
3114
  active_id: le(),
@@ -3136,11 +3134,11 @@ function sl(e, t) {
3136
3134
  fields: k
3137
3135
  })).length !== 0, ae = (G) => {
3138
3136
  const U = V.getFieldsValue(!0);
3139
- return Ft(U, G);
3137
+ return Tt(U, G);
3140
3138
  }, Ce = (G, U) => {
3141
3139
  Gt({
3142
3140
  values: {
3143
- ...Ft(V.getFieldsValue(!0), k),
3141
+ ...Tt(V.getFieldsValue(!0), k),
3144
3142
  [G]: U
3145
3143
  },
3146
3144
  fields: k,
@@ -3184,7 +3182,7 @@ function sl(e, t) {
3184
3182
  }), O && (U = {
3185
3183
  ...Ia(O),
3186
3184
  ...U
3187
- }), P.current = Ft(U, ne), Gt({
3185
+ }), P.current = Tt(U, ne), Gt({
3188
3186
  values: U,
3189
3187
  fields: ne,
3190
3188
  reset: !0,
@@ -3226,7 +3224,7 @@ function sl(e, t) {
3226
3224
  const gt = {
3227
3225
  ...ne ? {} : V.getFieldsValue(!0),
3228
3226
  ...G
3229
- }, yn = Ft(gt, U), Uo = Object.keys(U).map((vn) => {
3227
+ }, yn = Tt(gt, U), Uo = Object.keys(U).map((vn) => {
3230
3228
  const Go = yn[vn] !== void 0 ? yn[vn] : void 0;
3231
3229
  return {
3232
3230
  name: vn,
@@ -3298,12 +3296,12 @@ function sl(e, t) {
3298
3296
  });
3299
3297
  $.current = re, P.current = ne;
3300
3298
  }
3301
- h && await h([le()]), !g && U && (ue == null || ue(le(), Re(), Ze()));
3299
+ h && await h([le()]), !g && U && (ue == null || ue(le(), ke(), Ze()));
3302
3300
  }, Eo = async (G) => {
3303
3301
  const {
3304
3302
  callOnSubmitSucceed: U = !0
3305
3303
  } = G || {};
3306
- !g && U && (ue == null || ue(le(), Re(), Ze()));
3304
+ !g && U && (ue == null || ue(le(), ke(), Ze()));
3307
3305
  }, qt = async (G) => {
3308
3306
  let U = !1;
3309
3307
  const {
@@ -3346,7 +3344,7 @@ function sl(e, t) {
3346
3344
  readOnly: f,
3347
3345
  values: wa({
3348
3346
  ...ne,
3349
- ...X()
3347
+ ...Z()
3350
3348
  }, G)
3351
3349
  }), R(re), re.string && re.string !== He && (Ne == null || Ne(re.string)), j && re.string && ((Ve = j.setTitle) == null || Ve.call(j, re.string));
3352
3350
  }, gn = async ({
@@ -3367,7 +3365,7 @@ function sl(e, t) {
3367
3365
  }) && G !== !0)
3368
3366
  return;
3369
3367
  {
3370
- const re = Ft(V.getFieldsValue(!0), k);
3368
+ const re = Tt(V.getFieldsValue(!0), k);
3371
3369
  Q.current = re, u == null || u(re), oe == null || oe(!0), Lo(ne);
3372
3370
  }
3373
3371
  }
@@ -3458,15 +3456,15 @@ function sl(e, t) {
3458
3456
  }
3459
3457
  });
3460
3458
  if (typeof ne == "object" && ne !== null && Object.keys(ne).length === 0 && g)
3461
- ue == null || ue(le(), Re(), Ze());
3459
+ ue == null || ue(le(), ke(), Ze());
3462
3460
  else if (ne.type && ne.type === "ir.actions.act_window_close")
3463
- ue == null || ue(le(), Re(), Ze());
3461
+ ue == null || ue(le(), ke(), Ze());
3464
3462
  else if (ne.type) {
3465
3463
  let re = {};
3466
- ne.context && (re = vt({
3464
+ ne.context && (re = yt({
3467
3465
  context: ne.context,
3468
3466
  fields: k,
3469
- values: Re()
3467
+ values: ke()
3470
3468
  })), await Qn({
3471
3469
  actionData: ne,
3472
3470
  context: {
@@ -3485,7 +3483,7 @@ function sl(e, t) {
3485
3483
  action: G,
3486
3484
  payload: le()
3487
3485
  });
3488
- U.type && U.type === "ir.actions.act_window_close" ? ue == null || ue(le(), Re(), Ze()) : await ot();
3486
+ U.type && U.type === "ir.actions.act_window_close" ? ue == null || ue(le(), ke(), Ze()) : await ot();
3489
3487
  }
3490
3488
  async function Bo({
3491
3489
  action: G,
@@ -3510,7 +3508,7 @@ function sl(e, t) {
3510
3508
  } = await (Be == null ? void 0 : Be({
3511
3509
  actionData: G,
3512
3510
  fields: k,
3513
- values: Re(),
3511
+ values: ke(),
3514
3512
  context: {
3515
3513
  ...y,
3516
3514
  ...S == null ? void 0 : S.context,
@@ -3520,7 +3518,7 @@ function sl(e, t) {
3520
3518
  ot();
3521
3519
  }
3522
3520
  })) || {};
3523
- !b && ne && (ue == null || ue(le(), Re(), Ze()));
3521
+ !b && ne && (ue == null || ue(le(), ke(), Ze()));
3524
3522
  }
3525
3523
  function jo() {
3526
3524
  gn({
@@ -3556,9 +3554,9 @@ function sl(e, t) {
3556
3554
  Ye(re);
3557
3555
  }
3558
3556
  }
3559
- const Yo = () => !S && !C ? /* @__PURE__ */ n(Ae, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(Z, {
3557
+ const Yo = () => !S && !C ? /* @__PURE__ */ n(Me, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(X, {
3560
3558
  children: /* @__PURE__ */ n(Gi, {
3561
- getValues: Re,
3559
+ getValues: ke,
3562
3560
  getPlainValues: tt,
3563
3561
  getFields: De,
3564
3562
  domain: O,
@@ -3586,7 +3584,7 @@ function sl(e, t) {
3586
3584
  })
3587
3585
  })
3588
3586
  })
3589
- }), Wo = () => /* @__PURE__ */ H(Z, {
3587
+ }), Wo = () => /* @__PURE__ */ H(X, {
3590
3588
  children: [/* @__PURE__ */ n(sn, {}), /* @__PURE__ */ n(Se, {
3591
3589
  justify: "end",
3592
3590
  children: /* @__PURE__ */ H(je, {
@@ -3600,7 +3598,7 @@ function sl(e, t) {
3600
3598
  }), /* @__PURE__ */ n(Ie, {
3601
3599
  disabled: x || f,
3602
3600
  loading: x,
3603
- icon: /* @__PURE__ */ n(kt, {}),
3601
+ icon: /* @__PURE__ */ n(At, {}),
3604
3602
  onClick: async () => {
3605
3603
  await qt();
3606
3604
  },
@@ -3628,7 +3626,7 @@ function sl(e, t) {
3628
3626
  })
3629
3627
  }) : null;
3630
3628
  }
3631
- const Wt = wt(sl), Ut = (e) => {
3629
+ const Wt = vt(sl), Ut = (e) => {
3632
3630
  const {
3633
3631
  visible: t,
3634
3632
  id: r,
@@ -3744,9 +3742,9 @@ const Wt = wt(sl), Ut = (e) => {
3744
3742
  name: o + "#time",
3745
3743
  label: ""
3746
3744
  })];
3747
- return /* @__PURE__ */ H(Z, {
3745
+ return /* @__PURE__ */ H(X, {
3748
3746
  children: [r && /* @__PURE__ */ n(cn, {
3749
- ooui: new Vt({
3747
+ ooui: new Dt({
3750
3748
  name: o + "_label",
3751
3749
  string: i,
3752
3750
  help: t.tooltip,
@@ -3869,9 +3867,9 @@ function ul(e) {
3869
3867
  },
3870
3868
  layout: "vertical"
3871
3869
  });
3872
- return /* @__PURE__ */ H(Z, {
3870
+ return /* @__PURE__ */ H(X, {
3873
3871
  children: [r && /* @__PURE__ */ n(cn, {
3874
- ooui: new Vt({
3872
+ ooui: new Dt({
3875
3873
  name: i + "_label",
3876
3874
  string: o,
3877
3875
  help: s,
@@ -3901,7 +3899,7 @@ const {
3901
3899
  defaultSeed: ml
3902
3900
  } = $e, hl = fl(ml), {
3903
3901
  Option: pl
3904
- } = xt, gl = (e) => {
3902
+ } = bt, gl = (e) => {
3905
3903
  const {
3906
3904
  ooui: t
3907
3905
  } = e, {
@@ -3933,7 +3931,7 @@ const {
3933
3931
  value: v,
3934
3932
  children: v
3935
3933
  }, m);
3936
- }), d = a && !s ? vl : xt;
3934
+ }), d = a && !s ? vl : bt;
3937
3935
  function f(c) {
3938
3936
  const m = c.map((v) => {
3939
3937
  const p = l.find(([h, g]) => v === g);
@@ -3953,7 +3951,7 @@ const {
3953
3951
  showArrow: !0,
3954
3952
  children: u
3955
3953
  });
3956
- }, vl = jt(xt)`
3954
+ }, vl = jt(bt)`
3957
3955
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
3958
3956
  background-color: ${hl.colorPrimaryBg};
3959
3957
  }
@@ -4032,7 +4030,7 @@ function bl(e) {
4032
4030
  onClick: t,
4033
4031
  children: [r ? /* @__PURE__ */ n(ai, {
4034
4032
  className: "pr-1"
4035
- }) : /* @__PURE__ */ n(At, {
4033
+ }) : /* @__PURE__ */ n(Vt, {
4036
4034
  className: "pr-1"
4037
4035
  }), s(r ? "simple_search" : "advanced_search")]
4038
4036
  })
@@ -4125,7 +4123,7 @@ function uo(e) {
4125
4123
  }, E))
4126
4124
  }, R));
4127
4125
  };
4128
- Ct(() => {
4126
+ xt(() => {
4129
4127
  b(!1), A.current = new ii(r, t, p), A.current.parse(), g(A.current._simpleSearchContainer), O(A.current._advancedSearchContainer);
4130
4128
  }, [t, r]);
4131
4129
  const x = w(), F = (C) => {
@@ -4323,7 +4321,7 @@ const Fl = (e) => /* @__PURE__ */ n(ve, {
4323
4321
  t: p
4324
4322
  } = Y(we), h = Y(at), {
4325
4323
  openRelate: g
4326
- } = h || {}, y = Y(Mt), {
4324
+ } = h || {}, y = Y(Rt), {
4327
4325
  processAction: O
4328
4326
  } = y || {};
4329
4327
  if (!t)
@@ -4347,7 +4345,7 @@ const Fl = (e) => /* @__PURE__ */ n(ve, {
4347
4345
  context: i
4348
4346
  }))[0];
4349
4347
  v({
4350
- ...Ft(S, C),
4348
+ ...Tt(S, C),
4351
4349
  active_id: t
4352
4350
  }), d(!1);
4353
4351
  } catch (F) {
@@ -4363,7 +4361,7 @@ const Fl = (e) => /* @__PURE__ */ n(ve, {
4363
4361
  style: {
4364
4362
  padding: 15
4365
4363
  },
4366
- children: /* @__PURE__ */ n(Ae, {})
4364
+ children: /* @__PURE__ */ n(Me, {})
4367
4365
  })
4368
4366
  });
4369
4367
  if (!f || !f.toolbar)
@@ -4382,7 +4380,7 @@ const Fl = (e) => /* @__PURE__ */ n(ve, {
4382
4380
  icon: /* @__PURE__ */ n(jn, {}),
4383
4381
  children: p("report")
4384
4382
  }, "print"), /* @__PURE__ */ n(Le.Divider, {}), /* @__PURE__ */ n(Le.ItemGroup, {
4385
- title: /* @__PURE__ */ H(Z, {
4383
+ title: /* @__PURE__ */ H(X, {
4386
4384
  children: [/* @__PURE__ */ n(Hr, {}), " ", /* @__PURE__ */ H("span", {
4387
4385
  children: [" ", p("related")]
4388
4386
  })]
@@ -4433,7 +4431,7 @@ const Fl = (e) => /* @__PURE__ */ n(ve, {
4433
4431
  fields: f.fields
4434
4432
  });
4435
4433
  }
4436
- return /* @__PURE__ */ H(Z, {
4434
+ return /* @__PURE__ */ H(X, {
4437
4435
  children: [/* @__PURE__ */ n(Ht, {
4438
4436
  overlay: b(),
4439
4437
  trigger: ["click"],
@@ -4462,19 +4460,19 @@ const Fl = (e) => /* @__PURE__ */ n(ve, {
4462
4460
  m2oField: t
4463
4461
  } = e;
4464
4462
  return t ? /* @__PURE__ */ H(je, {
4465
- children: [/* @__PURE__ */ n(Z, {
4463
+ children: [/* @__PURE__ */ n(X, {
4466
4464
  children: t.value
4467
4465
  }), /* @__PURE__ */ n(Jn, {
4468
4466
  id: t.id,
4469
4467
  model: t.model
4470
4468
  })]
4471
- }) : /* @__PURE__ */ n(Z, {});
4469
+ }) : /* @__PURE__ */ n(X, {});
4472
4470
  }, Il = (e) => {
4473
4471
  const {
4474
4472
  value: t,
4475
4473
  context: r,
4476
4474
  selectionValues: i
4477
- } = e, [o, s] = T(), [a, l] = T(!1), [u, d] = t ? t.split(",") : [], f = parseInt(d), c = Me(async () => {
4475
+ } = e, [o, s] = T(), [a, l] = T(!1), [u, d] = t ? t.split(",") : [], f = parseInt(d), c = Re(async () => {
4478
4476
  if (!t || t && o)
4479
4477
  return;
4480
4478
  l(!0);
@@ -4489,14 +4487,14 @@ const Fl = (e) => /* @__PURE__ */ n(ve, {
4489
4487
  if (ge(() => {
4490
4488
  c();
4491
4489
  }, [t]), !t && !a)
4492
- return /* @__PURE__ */ n(Z, {});
4490
+ return /* @__PURE__ */ n(X, {});
4493
4491
  if (a)
4494
4492
  return /* @__PURE__ */ n(et, {});
4495
4493
  const m = i.get(u);
4496
4494
  return /* @__PURE__ */ H(je, {
4497
- children: [/* @__PURE__ */ n(Z, {
4495
+ children: [/* @__PURE__ */ n(X, {
4498
4496
  children: `${m}:`
4499
- }), /* @__PURE__ */ n(Z, {
4497
+ }), /* @__PURE__ */ n(X, {
4500
4498
  children: o
4501
4499
  }), /* @__PURE__ */ n(Jn, {
4502
4500
  id: f,
@@ -4909,26 +4907,26 @@ const lt = {
4909
4907
  content: e == null ? void 0 : e.replace(/(?:\r\n|\r|\n)/g, "<br>")
4910
4908
  }), Ll = (e) => {
4911
4909
  if (!e || e && e.length === 0)
4912
- return /* @__PURE__ */ n(Z, {});
4910
+ return /* @__PURE__ */ n(X, {});
4913
4911
  const t = dt(e, lt.date.dateInternalFormat).format(lt.date.dateDisplayFormat);
4914
- return /* @__PURE__ */ n(Z, {
4912
+ return /* @__PURE__ */ n(X, {
4915
4913
  children: t
4916
4914
  });
4917
4915
  }, Nl = (e) => {
4918
4916
  if (!e || e && e.length === 0)
4919
- return /* @__PURE__ */ n(Z, {});
4917
+ return /* @__PURE__ */ n(X, {});
4920
4918
  const t = dt(e, lt.time.dateInternalFormat).format(lt.time.dateDisplayFormat);
4921
- return /* @__PURE__ */ n(Z, {
4919
+ return /* @__PURE__ */ n(X, {
4922
4920
  children: t
4923
4921
  });
4924
4922
  }, xr = (e) => {
4925
4923
  const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
4926
- return /* @__PURE__ */ n(Z, {
4924
+ return /* @__PURE__ */ n(X, {
4927
4925
  children: `( ${t} )`
4928
4926
  });
4929
4927
  }, Pl = (e) => /* @__PURE__ */ n(mo, {
4930
4928
  value: e
4931
- }), Hl = (e) => /* @__PURE__ */ n(Z, {
4929
+ }), Hl = (e) => /* @__PURE__ */ n(X, {
4932
4930
  children: fo(e)
4933
4931
  }), Cr = (e) => /* @__PURE__ */ n("div", {
4934
4932
  style: {
@@ -4941,14 +4939,14 @@ const lt = {
4941
4939
  maxWidth: "50px",
4942
4940
  padding: "5px"
4943
4941
  }
4944
- }), jl = (e, t, r, i) => /* @__PURE__ */ n(Z, {
4942
+ }), jl = (e, t, r, i) => /* @__PURE__ */ n(X, {
4945
4943
  children: e ? /* @__PURE__ */ n(kn, {
4946
4944
  color: r.colors[e],
4947
4945
  children: r.selectionValues.get(e)
4948
4946
  }) : null
4949
- }), Kl = (e, t, r, i) => /* @__PURE__ */ n(Z, {
4947
+ }), Kl = (e, t, r, i) => /* @__PURE__ */ n(X, {
4950
4948
  children: r.selectionValues.get(e)
4951
- }), Yl = (e, t, r, i) => /* @__PURE__ */ n(Z, {
4949
+ }), Yl = (e, t, r, i) => /* @__PURE__ */ n(X, {
4952
4950
  children: /* @__PURE__ */ n(Il, {
4953
4951
  value: e,
4954
4952
  selectionValues: r.selectionValues,
@@ -4985,7 +4983,7 @@ function mn(e) {
4985
4983
  setTitle: S = void 0
4986
4984
  } = (y ? C : {}) || {};
4987
4985
  ge(() => {
4988
- w.current = Ot(o);
4986
+ w.current = Ft(o);
4989
4987
  const W = ya(w.current, {
4990
4988
  boolean: Ml,
4991
4989
  many2one: El,
@@ -5010,7 +5008,7 @@ function mn(e) {
5010
5008
  const W = io(w.current, s);
5011
5009
  b(W), F.current = r;
5012
5010
  }, [s]);
5013
- const R = (t - 1) * F.current + 1, V = R - 1 + _.length, E = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", R == null ? void 0 : R.toString()).replace("{to}", V == null ? void 0 : V.toString()).replace("{total}", i == null ? void 0 : i.toString()), D = () => !d || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Ae, {
5011
+ const R = (t - 1) * F.current + 1, V = R - 1 + _.length, E = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", R == null ? void 0 : R.toString()).replace("{to}", V == null ? void 0 : V.toString()).replace("{total}", i == null ? void 0 : i.toString()), D = () => !d || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Me, {
5014
5012
  className: "pb-4"
5015
5013
  }) : /* @__PURE__ */ H(Se, {
5016
5014
  align: "bottom",
@@ -5053,19 +5051,17 @@ function mn(e) {
5053
5051
  const K = w.current;
5054
5052
  c && K.columns.some((z) => z.sum !== void 0) && (j = c - 30);
5055
5053
  }
5056
- return w.current === null ? /* @__PURE__ */ n(Ae, {
5054
+ return w.current === null ? /* @__PURE__ */ n(Me, {
5057
5055
  style: {
5058
5056
  padding: "2rem"
5059
5057
  }
5060
5058
  }) : /* @__PURE__ */ H("div", {
5061
- children: [D(), l && /* @__PURE__ */ n(Ae, {
5062
- className: "pb-4"
5063
- }), /* @__PURE__ */ n(Fi, {
5059
+ children: [D(), /* @__PURE__ */ n(Fi, {
5064
5060
  height: j,
5065
5061
  columns: N.columns,
5066
5062
  dataSource: _,
5067
- loading: !1,
5068
- loadingComponent: /* @__PURE__ */ n(Ae, {}),
5063
+ loading: l,
5064
+ loadingComponent: /* @__PURE__ */ n(Me, {}),
5069
5065
  onRowStyle: (W) => {
5070
5066
  if (m[W.id])
5071
5067
  return {
@@ -5101,7 +5097,7 @@ function Ul(e, t) {
5101
5097
  onChangeSelectedRowKeys: m
5102
5098
  } = e, [v, p] = T(!1), [h, g] = T(!1), y = me(!1), [O, _] = T(), [b, A] = T(), [I, M] = T(), [w, x] = T(), [F, C] = T(200), L = me(), {
5103
5099
  height: S
5104
- } = dn(), R = Y(Mt), {
5100
+ } = dn(), R = Y(Rt), {
5105
5101
  processAction: V
5106
5102
  } = R || {}, E = Y(Xe), {
5107
5103
  setResults: D = void 0,
@@ -5121,7 +5117,7 @@ function Ul(e, t) {
5121
5117
  setTreeIsLoading: J = void 0,
5122
5118
  searchValues: pe = {},
5123
5119
  setSearchValues: ye = void 0,
5124
- limit: ke = Pt,
5120
+ limit: Ae = Pt,
5125
5121
  setLimit: de = void 0
5126
5122
  } = (f ? E : {}) || {}, {
5127
5123
  submit: oe,
@@ -5160,10 +5156,10 @@ function Ul(e, t) {
5160
5156
  domain: u,
5161
5157
  currentId: N,
5162
5158
  setActionViewTotalItems: se,
5163
- limit: ke,
5159
+ limit: Ae,
5164
5160
  setLimit: de
5165
5161
  });
5166
- bt(t, () => ({
5162
+ wt(t, () => ({
5167
5163
  refreshResults: () => {
5168
5164
  y.current = !1, be();
5169
5165
  },
@@ -5172,14 +5168,14 @@ function Ul(e, t) {
5172
5168
  })), ge(() => {
5173
5169
  !h || d && (y.current = !1, be());
5174
5170
  }, [Je, Be, h, d, a]);
5175
- const Re = async () => {
5171
+ const ke = async () => {
5176
5172
  g(!1), p(!0), x(void 0), J == null || J(!0);
5177
5173
  try {
5178
5174
  await tt(), g(!0);
5179
5175
  } catch (he) {
5180
- x(he), J == null || J(!1);
5176
+ x(he);
5181
5177
  } finally {
5182
- p(!1);
5178
+ p(!1), J == null || J(!1);
5183
5179
  }
5184
5180
  }, tt = async () => {
5185
5181
  _(r);
@@ -5197,7 +5193,7 @@ function Ul(e, t) {
5197
5193
  })), M(he), A(Ke);
5198
5194
  };
5199
5195
  ge(() => {
5200
- Re();
5196
+ ke();
5201
5197
  }, [r]);
5202
5198
  const Ze = (he) => {
5203
5199
  de == null || de(he);
@@ -5220,7 +5216,7 @@ function Ul(e, t) {
5220
5216
  },
5221
5217
  context: c
5222
5218
  }));
5223
- }, X = async (he) => {
5219
+ }, Z = async (he) => {
5224
5220
  const {
5225
5221
  id: Ke
5226
5222
  } = he;
@@ -5246,7 +5242,7 @@ function Ul(e, t) {
5246
5242
  function Oe() {
5247
5243
  return b != null && b.isExpandable ? S - 160 : S - (F + 210);
5248
5244
  }
5249
- const ae = () => !b || !I ? null : /* @__PURE__ */ H(Z, {
5245
+ const ae = () => !b || !I ? null : /* @__PURE__ */ H(X, {
5250
5246
  children: [/* @__PURE__ */ n(uo, {
5251
5247
  fields: {
5252
5248
  ...b.fields,
@@ -5255,7 +5251,7 @@ function Ul(e, t) {
5255
5251
  searchFields: so([I.search_fields, b.search_fields]),
5256
5252
  formXml: I.arch,
5257
5253
  onClear: Te,
5258
- limit: ke,
5254
+ limit: Ae,
5259
5255
  offset: Be,
5260
5256
  isSearching: He,
5261
5257
  onSubmit: oe,
@@ -5267,13 +5263,13 @@ function Ul(e, t) {
5267
5263
  }), /* @__PURE__ */ n(mn, {
5268
5264
  context: c,
5269
5265
  total: De,
5270
- limit: ke,
5266
+ limit: Ae,
5271
5267
  page: Je,
5272
5268
  treeView: b,
5273
5269
  results: te(),
5274
5270
  onRequestPageChange: ue,
5275
5271
  loading: Fe,
5276
- onRowClicked: X,
5272
+ onRowClicked: Z,
5277
5273
  scrollY: l || Oe(),
5278
5274
  colorsForResults: le,
5279
5275
  rowSelection: {
@@ -5296,10 +5292,10 @@ function Ul(e, t) {
5296
5292
  style: d ? {} : {
5297
5293
  display: "none"
5298
5294
  },
5299
- children: v ? /* @__PURE__ */ n(Ae, {}) : ae()
5295
+ children: v ? /* @__PURE__ */ n(Me, {}) : ae()
5300
5296
  });
5301
5297
  }
5302
- const vo = wt(Ul), wo = (e) => {
5298
+ const vo = vt(Ul), wo = (e) => {
5303
5299
  const {
5304
5300
  visible: t,
5305
5301
  onCloseModal: r,
@@ -5328,7 +5324,7 @@ const vo = wt(Ul), wo = (e) => {
5328
5324
  }
5329
5325
  i(v);
5330
5326
  }
5331
- const O = () => /* @__PURE__ */ H(Z, {
5327
+ const O = () => /* @__PURE__ */ H(X, {
5332
5328
  children: [/* @__PURE__ */ n(vo, {
5333
5329
  model: o,
5334
5330
  nameSearch: s,
@@ -5349,7 +5345,7 @@ const vo = wt(Ul), wo = (e) => {
5349
5345
  },
5350
5346
  children: m("new")
5351
5347
  }), /* @__PURE__ */ n(Ie, {
5352
- icon: /* @__PURE__ */ n(kt, {}),
5348
+ icon: /* @__PURE__ */ n(At, {}),
5353
5349
  onClick: () => {
5354
5350
  y();
5355
5351
  },
@@ -5363,7 +5359,7 @@ const vo = wt(Ul), wo = (e) => {
5363
5359
  })
5364
5360
  })]
5365
5361
  });
5366
- return /* @__PURE__ */ H(Z, {
5362
+ return /* @__PURE__ */ H(X, {
5367
5363
  children: [/* @__PURE__ */ n(We, {
5368
5364
  title: m("search"),
5369
5365
  centered: !0,
@@ -5515,7 +5511,7 @@ const vo = wt(Ul), wo = (e) => {
5515
5511
  async function z() {
5516
5512
  d && (S.current = await B.getHandler().evalDomain({
5517
5513
  domain: d,
5518
- values: Rt({
5514
+ values: kt({
5519
5515
  fields: F(),
5520
5516
  values: x()
5521
5517
  }),
@@ -6065,7 +6061,7 @@ const {
6065
6061
  uninformedString: a,
6066
6062
  manualIds: l
6067
6063
  } = e, [u, d] = T(!1), [f, c] = T(), [m, v] = T(), [p, h] = T(), [g, y] = T("line");
6068
- return Ct(() => {
6064
+ return xt(() => {
6069
6065
  (async () => {
6070
6066
  d(!0), c(void 0);
6071
6067
  const O = $n(o);
@@ -6206,7 +6202,7 @@ const uc = {
6206
6202
  banner: !0
6207
6203
  });
6208
6204
  if (d)
6209
- return /* @__PURE__ */ n(Ae, {});
6205
+ return /* @__PURE__ */ n(Me, {});
6210
6206
  if (!f)
6211
6207
  return /* @__PURE__ */ n(ze, {
6212
6208
  message: "No data to display",
@@ -6236,7 +6232,7 @@ const uc = {
6236
6232
  isStack: h
6237
6233
  })
6238
6234
  })]
6239
- }) : /* @__PURE__ */ n(Z, {
6235
+ }) : /* @__PURE__ */ n(X, {
6240
6236
  children: `Unknown graph type: ${c}`
6241
6237
  });
6242
6238
  };
@@ -6261,7 +6257,7 @@ const hc = (e, t) => {
6261
6257
  } = e, [u, d] = T(!1), [f, c] = T(), [m, v] = T(), p = Y(Xe), {
6262
6258
  setGraphIsLoading: h = void 0
6263
6259
  } = p || {};
6264
- bt(t, () => ({
6260
+ wt(t, () => ({
6265
6261
  refresh: () => {
6266
6262
  g();
6267
6263
  }
@@ -6281,7 +6277,7 @@ const hc = (e, t) => {
6281
6277
  const O = $n(y.arch);
6282
6278
  c(O);
6283
6279
  } catch (y) {
6284
- return console.error(y), /* @__PURE__ */ n(Z, {
6280
+ return console.error(y), /* @__PURE__ */ n(X, {
6285
6281
  children: JSON.stringify(y)
6286
6282
  });
6287
6283
  }
@@ -6337,11 +6333,11 @@ const hc = (e, t) => {
6337
6333
  manualIds: l
6338
6334
  });
6339
6335
  default:
6340
- return /* @__PURE__ */ n(Z, {
6336
+ return /* @__PURE__ */ n(X, {
6341
6337
  children: `Graph ${f.type} not implemented`
6342
6338
  });
6343
6339
  }
6344
- }, hn = wt(hc), {
6340
+ }, hn = vt(hc), {
6345
6341
  confirm: pc
6346
6342
  } = We, gc = ({
6347
6343
  onOk: e,
@@ -6430,7 +6426,7 @@ const hc = (e, t) => {
6430
6426
  });
6431
6427
  }
6432
6428
  function A() {
6433
- return /* @__PURE__ */ H(Z, {
6429
+ return /* @__PURE__ */ H(X, {
6434
6430
  children: [y(), /* @__PURE__ */ n(Ge, {
6435
6431
  tooltip: "Previous item",
6436
6432
  icon: /* @__PURE__ */ n(Br, {}),
@@ -6507,7 +6503,7 @@ const Sc = (e) => {
6507
6503
  domain: Q
6508
6504
  } = i, ie = i.type === "many2many", {
6509
6505
  id: se
6510
- } = i, ee = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), J = me();
6506
+ } = i, ee = s.filter((Z) => (Z.values || Z.treeValues) && Z.operation !== "pendingRemove"), J = me();
6511
6507
  ge(() => {
6512
6508
  if (J.current !== a) {
6513
6509
  J.current = a, pe();
@@ -6515,21 +6511,21 @@ const Sc = (e) => {
6515
6511
  }
6516
6512
  pe();
6517
6513
  }, [s, a]);
6518
- const pe = Me(() => {
6519
- (a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && ke();
6514
+ const pe = Re(() => {
6515
+ (a === "form" && s.some((Z) => !Z.values) || a === "tree" && s.some((Z) => !Z.treeValues)) && Ae();
6520
6516
  }, [s, a]);
6521
6517
  ge(() => {
6522
6518
  oe();
6523
6519
  }, [h]);
6524
- const ye = (X) => {
6520
+ const ye = (Z) => {
6525
6521
  var fe, Oe;
6526
6522
  r == null || r({
6527
6523
  fields: ((fe = o.get("form")) == null ? void 0 : fe.fields) || ((Oe = o.get("tree")) == null ? void 0 : Oe.fields),
6528
- items: Cc(X)
6524
+ items: Cc(Z)
6529
6525
  });
6530
- }, ke = async () => {
6526
+ }, Ae = async () => {
6531
6527
  await de(), u > ee.length - 1 && u !== 0 && d(0);
6532
- }, de = async (X) => {
6528
+ }, de = async (Z) => {
6533
6529
  var fe, Oe, ae;
6534
6530
  A(!0), _(!1), M(void 0);
6535
6531
  try {
@@ -6547,9 +6543,9 @@ const Sc = (e) => {
6547
6543
  ...p == null ? void 0 : p(),
6548
6544
  ...P
6549
6545
  },
6550
- currentView: X || a
6546
+ currentView: Z || a
6551
6547
  });
6552
- return W.current || (W.current = Ce.map((Ke) => Ke.id)), (a || X) === "tree" && he && z(he), ye(Ce), Ce;
6548
+ return W.current || (W.current = Ce.map((Ke) => Ke.id)), (a || Z) === "tree" && he && z(he), ye(Ce), Ce;
6553
6549
  } catch (Ce) {
6554
6550
  M(Ce);
6555
6551
  } finally {
@@ -6559,7 +6555,7 @@ const Sc = (e) => {
6559
6555
  async function oe() {
6560
6556
  Q && (k.current = await B.getHandler().evalDomain({
6561
6557
  domain: Q,
6562
- values: Rt({
6558
+ values: kt({
6563
6559
  fields: m(),
6564
6560
  values: v()
6565
6561
  }),
@@ -6571,7 +6567,7 @@ const Sc = (e) => {
6571
6567
  })));
6572
6568
  }
6573
6569
  const Te = () => {
6574
- const X = Array.from(o.keys()), fe = X[(X.indexOf(a) + 1) % X.length];
6570
+ const Z = Array.from(o.keys()), fe = Z[(Z.indexOf(a) + 1) % Z.length];
6575
6571
  a === "form" ? Ne(() => {
6576
6572
  l(fe);
6577
6573
  }) : l(fe);
@@ -6580,14 +6576,14 @@ const Sc = (e) => {
6580
6576
  d(u - 1);
6581
6577
  }) : d(u - 1));
6582
6578
  }, Fe = () => {
6583
- const X = ee.length;
6584
- u < X - 1 && (a === "form" ? Ne(() => {
6579
+ const Z = ee.length;
6580
+ u < Z - 1 && (a === "form" ? Ne(() => {
6585
6581
  d(u + 1);
6586
6582
  }) : d(u + 1));
6587
6583
  }, He = async () => {
6588
- const X = ee[u].id, fe = (await B.getHandler().readObjects({
6584
+ const Z = ee[u].id, fe = (await B.getHandler().readObjects({
6589
6585
  model: $,
6590
- ids: [X],
6586
+ ids: [Z],
6591
6587
  fields: o.get("form").fields,
6592
6588
  context: {
6593
6589
  ...p == null ? void 0 : p(),
@@ -6595,26 +6591,26 @@ const Sc = (e) => {
6595
6591
  }
6596
6592
  }))[0], Oe = (await B.getHandler().readObjects({
6597
6593
  model: $,
6598
- ids: [X],
6594
+ ids: [Z],
6599
6595
  fields: o.get("tree").fields,
6600
6596
  context: {
6601
6597
  ...p == null ? void 0 : p(),
6602
6598
  ...P
6603
6599
  }
6604
- }))[0], ae = s.map((Ce) => Ce.id === X ? {
6600
+ }))[0], ae = s.map((Ce) => Ce.id === Z ? {
6605
6601
  ...Ce,
6606
6602
  operation: "original",
6607
6603
  values: fe,
6608
6604
  treeValues: Oe
6609
6605
  } : Ce);
6610
6606
  ye(ae);
6611
- }, Ne = (X) => {
6607
+ }, Ne = (Z) => {
6612
6608
  O ? Yt({
6613
6609
  lang: g,
6614
6610
  onOk: () => {
6615
- He(), X(), _(!1);
6611
+ He(), Z(), _(!1);
6616
6612
  }
6617
- }) : X();
6613
+ }) : Z();
6618
6614
  }, Je = () => {
6619
6615
  if (ie) {
6620
6616
  vc({
@@ -6633,11 +6629,11 @@ const Sc = (e) => {
6633
6629
  });
6634
6630
  }, Be = async () => {
6635
6631
  const {
6636
- inv_field: X
6632
+ inv_field: Z
6637
6633
  } = i;
6638
6634
  let fe;
6639
- X && c && (fe = {
6640
- [X]: c
6635
+ Z && c && (fe = {
6636
+ [Z]: c
6641
6637
  }), a === "form" ? Ne(() => {
6642
6638
  D(!0), S({
6643
6639
  defaultValues: fe
@@ -6653,22 +6649,22 @@ const Sc = (e) => {
6653
6649
  A(!0), _(!1), M(void 0);
6654
6650
  try {
6655
6651
  if (ee[u].id > 0) {
6656
- const X = s.map((fe) => fe.id === ee[u].id ? {
6652
+ const Z = s.map((fe) => fe.id === ee[u].id ? {
6657
6653
  ...fe,
6658
6654
  operation: "pendingRemove"
6659
6655
  } : fe);
6660
- ye(X);
6656
+ ye(Z);
6661
6657
  } else
6662
- ye(s.filter((X) => X.id !== ee[u].id));
6663
- } catch (X) {
6664
- M(X);
6658
+ ye(s.filter((Z) => Z.id !== ee[u].id));
6659
+ } catch (Z) {
6660
+ M(Z);
6665
6661
  }
6666
6662
  d(0), A(!1);
6667
6663
  }, xe = async () => {
6668
- const X = ee.filter((fe) => R.includes(fe.id));
6664
+ const Z = ee.filter((fe) => R.includes(fe.id));
6669
6665
  A(!0), _(!1), M(void 0);
6670
6666
  try {
6671
- const fe = X.map((ae) => ae.id), Oe = s.filter((ae) => !(fe.includes(ae.id) && ae.id < 0)).map((ae) => fe.includes(ae.id) ? {
6667
+ const fe = Z.map((ae) => ae.id), Oe = s.filter((ae) => !(fe.includes(ae.id) && ae.id < 0)).map((ae) => fe.includes(ae.id) ? {
6672
6668
  ...ae,
6673
6669
  operation: "pendingRemove"
6674
6670
  } : ae);
@@ -6677,19 +6673,19 @@ const Sc = (e) => {
6677
6673
  M(fe);
6678
6674
  }
6679
6675
  d(0), A(!1);
6680
- }, Pe = (X, fe, Oe) => {
6676
+ }, Pe = (Z, fe, Oe) => {
6681
6677
  let ae;
6682
- if (X)
6683
- ae = s.map((Ce) => Ce.id === X ? {
6684
- id: X,
6685
- operation: X > 0 ? "pendingUpdate" : "pendingCreate",
6678
+ if (Z)
6679
+ ae = s.map((Ce) => Ce.id === Z ? {
6680
+ id: Z,
6681
+ operation: Z > 0 ? "pendingUpdate" : "pendingCreate",
6686
6682
  values: {
6687
6683
  ...Oe,
6688
- id: X
6684
+ id: Z
6689
6685
  },
6690
6686
  treeValues: {
6691
6687
  ...Oe,
6692
- id: X
6688
+ id: Z
6693
6689
  }
6694
6690
  } : Ce);
6695
6691
  else {
@@ -6708,17 +6704,17 @@ const Sc = (e) => {
6708
6704
  });
6709
6705
  }
6710
6706
  ye(ae), E || x(!1);
6711
- }, le = async (X) => {
6707
+ }, le = async (Z) => {
6712
6708
  const {
6713
6709
  id: fe
6714
- } = X;
6710
+ } = Z;
6715
6711
  let Oe = s;
6716
6712
  const ae = s.find((Ce) => Ce.id === fe);
6717
6713
  (ae == null ? void 0 : ae.values) === void 0 && (Oe = await de("form")), S(Oe.find((Ce) => Ce.id === fe)), D(!1), x(!0);
6718
- }, De = async (X) => {
6714
+ }, De = async (Z) => {
6719
6715
  A(!0);
6720
6716
  let fe = s;
6721
- const Oe = X.filter((ae) => !s.find((Ce) => Ce.id === ae));
6717
+ const Oe = Z.filter((ae) => !s.find((Ce) => Ce.id === ae));
6722
6718
  try {
6723
6719
  for (const ae of Oe) {
6724
6720
  const Ce = (await B.getHandler().readObjects({
@@ -6752,19 +6748,19 @@ const Sc = (e) => {
6752
6748
  A(!1);
6753
6749
  }
6754
6750
  };
6755
- function Re() {
6756
- const X = xc[a];
6751
+ function ke() {
6752
+ const Z = xc[a];
6757
6753
  if (a === "graph")
6758
6754
  return $n(o.get("graph").arch).string;
6759
6755
  {
6760
- const fe = new X(o.get(a).fields);
6756
+ const fe = new Z(o.get(a).fields);
6761
6757
  return fe.parse(o.get(a).arch), fe.string;
6762
6758
  }
6763
6759
  }
6764
6760
  const tt = () => {
6765
6761
  var fe, Oe, ae, Ce;
6766
6762
  if (a === "form")
6767
- return ee.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((he) => !he.values) ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(Wt, {
6763
+ return ee.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((he) => !he.values) ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(Wt, {
6768
6764
  formView: o.get("form"),
6769
6765
  values: (fe = ee[u]) == null ? void 0 : fe.values,
6770
6766
  parentContext: {
@@ -6792,8 +6788,8 @@ const Sc = (e) => {
6792
6788
  },
6793
6789
  readOnly: q
6794
6790
  });
6795
- let X = [];
6796
- if (ee.some((he) => he.treeValues) && (X = N ? _t({
6791
+ let Z = [];
6792
+ if (ee.some((he) => he.treeValues) && (Z = N ? Ot({
6797
6793
  resultsToSort: ee.map((he) => he.treeValues),
6798
6794
  sorter: N,
6799
6795
  fields: {
@@ -6805,7 +6801,7 @@ const Sc = (e) => {
6805
6801
  total: ee.length,
6806
6802
  limit: ee.length,
6807
6803
  treeView: o.get("tree"),
6808
- results: X,
6804
+ results: Z,
6809
6805
  loading: b,
6810
6806
  onRowClicked: ((Ce = o.get("form")) == null ? void 0 : Ce.fields) !== void 0 ? le : void 0,
6811
6807
  showPagination: !1,
@@ -6843,10 +6839,10 @@ const Sc = (e) => {
6843
6839
  banner: !0
6844
6840
  });
6845
6841
  const Ze = E;
6846
- return b ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ H(Z, {
6842
+ return b ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ H(X, {
6847
6843
  children: [/* @__PURE__ */ n(bc, {
6848
6844
  mode: a,
6849
- title: Re(),
6845
+ title: ke(),
6850
6846
  readOnly: q,
6851
6847
  isMany2Many: ie,
6852
6848
  formHasChanges: O,
@@ -6887,8 +6883,8 @@ const Sc = (e) => {
6887
6883
  ...P
6888
6884
  },
6889
6885
  visible: F,
6890
- onSelectValues: async (X) => {
6891
- C(!1), De(X);
6886
+ onSelectValues: async (Z) => {
6887
+ C(!1), De(Z);
6892
6888
  },
6893
6889
  onCloseModal: () => {
6894
6890
  C(!1);
@@ -6909,7 +6905,7 @@ const Sc = (e) => {
6909
6905
  const [u, d] = T(!0), [f, c] = T(), [m, v] = T(/* @__PURE__ */ new Map()), p = Y(Ee), {
6910
6906
  getContext: h
6911
6907
  } = p || {};
6912
- Ct(() => {
6908
+ xt(() => {
6913
6909
  y();
6914
6910
  }, [t]);
6915
6911
  const g = async (_) => o && o[_] ? o[_] : await B.getHandler().getView({
@@ -6938,7 +6934,7 @@ const Sc = (e) => {
6938
6934
  d(!1);
6939
6935
  }
6940
6936
  };
6941
- return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(Ae, {}) : f ? /* @__PURE__ */ n(ze, {
6937
+ return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(Me, {}) : f ? /* @__PURE__ */ n(ze, {
6942
6938
  className: "mt-10",
6943
6939
  message: f,
6944
6940
  type: "error",
@@ -7026,7 +7022,7 @@ function To(e) {
7026
7022
  showLabel: r = !0,
7027
7023
  responsiveBehaviour: i
7028
7024
  } = e, o = st(t.icon || "");
7029
- return /* @__PURE__ */ n(Z, {
7025
+ return /* @__PURE__ */ n(X, {
7030
7026
  children: (t.label || o) && r ? /* @__PURE__ */ n(Ii, {
7031
7027
  label: t.label,
7032
7028
  icon: o,
@@ -7058,7 +7054,7 @@ function Dc(e) {
7058
7054
  defaultActiveKey: "1",
7059
7055
  tabPosition: t.tabPosition,
7060
7056
  children: i.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ n(Ic, {
7061
- tab: /* @__PURE__ */ H(Z, {
7057
+ tab: /* @__PURE__ */ H(X, {
7062
7058
  children: [o(s.icon), " ", s.label]
7063
7059
  }),
7064
7060
  children: /* @__PURE__ */ n(To, {
@@ -7122,7 +7118,7 @@ const {
7122
7118
  } = s || {}, [c, m] = T(!1), {
7123
7119
  t: v
7124
7120
  } = Y(we);
7125
- return a ? /* @__PURE__ */ H(Z, {
7121
+ return a ? /* @__PURE__ */ H(X, {
7126
7122
  children: [/* @__PURE__ */ n("div", {
7127
7123
  onClick: () => {
7128
7124
  if (d != null && d()) {
@@ -7158,7 +7154,7 @@ const {
7158
7154
  m(!1), u == null || u();
7159
7155
  }
7160
7156
  })]
7161
- }) : /* @__PURE__ */ H(Z, {
7157
+ }) : /* @__PURE__ */ H(X, {
7162
7158
  children: [/* @__PURE__ */ n(Se, {
7163
7159
  gutter: 8,
7164
7160
  wrap: !1,
@@ -7213,7 +7209,7 @@ const {
7213
7209
  limit: s,
7214
7210
  onClose: a
7215
7211
  }) => {
7216
- const l = me({}), u = me(/* @__PURE__ */ new Map()), d = Me(
7212
+ const l = me({}), u = me(/* @__PURE__ */ new Map()), d = Re(
7217
7213
  async (g) => {
7218
7214
  if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
7219
7215
  ct(_e("selectAtLeastOneField", r));
@@ -7235,18 +7231,18 @@ const {
7235
7231
  format: g.exportType
7236
7232
  });
7237
7233
  a(), await new Promise((b) => setTimeout(b, 200));
7238
- const _ = await Dt(O);
7234
+ const _ = await It(O);
7239
7235
  un(O, _.mime);
7240
7236
  },
7241
7237
  [r, e, o, s, t, a]
7242
- ), f = Me(async () => {
7238
+ ), f = Re(async () => {
7243
7239
  const g = await B.getHandler().getFields({
7244
7240
  model: e,
7245
7241
  context: t,
7246
7242
  fields: []
7247
7243
  });
7248
7244
  return l.current["/"] = g, Fr({ fields: g });
7249
- }, [e, t, l]), c = Me(
7245
+ }, [e, t, l]), c = Re(
7250
7246
  async (g) => {
7251
7247
  const O = An(g, l.current)[Vn(g)], _ = O.relation, b = await B.getHandler().getFields({
7252
7248
  model: _,
@@ -7264,7 +7260,7 @@ const {
7264
7260
  });
7265
7261
  },
7266
7262
  [l.current, e, t]
7267
- ), m = Me(async () => {
7263
+ ), m = Re(async () => {
7268
7264
  const g = await Lc({ model: e, context: t }), y = await Pc({
7269
7265
  predefinedExports: g,
7270
7266
  fields: l.current,
@@ -7283,7 +7279,7 @@ const {
7283
7279
  })),
7284
7280
  keysWithChilds: y
7285
7281
  };
7286
- }, [l.current]), v = Me(
7282
+ }, [l.current]), v = Re(
7287
7283
  async (g) => {
7288
7284
  const y = await h("ir.exports"), O = await h("ir.exports.line"), _ = await B.getHandler().create({
7289
7285
  model: "ir.exports",
@@ -7307,7 +7303,7 @@ const {
7307
7303
  ), { ...g, id: _ };
7308
7304
  },
7309
7305
  []
7310
- ), p = Me(
7306
+ ), p = Re(
7311
7307
  async (g) => {
7312
7308
  await B.getHandler().delete({
7313
7309
  model: "ir.exports",
@@ -7315,7 +7311,7 @@ const {
7315
7311
  });
7316
7312
  },
7317
7313
  []
7318
- ), h = Me(
7314
+ ), h = Re(
7319
7315
  async (g) => {
7320
7316
  if (u.current.has(g))
7321
7317
  return u.current.get(g);
@@ -7603,8 +7599,8 @@ var Oo = { exports: {} };
7603
7599
  return new Date((D === "X" ? 1e3 : 1) * E);
7604
7600
  var N = p(D)(E), j = N.year, W = N.month, K = N.day, z = N.hours, q = N.minutes, $ = N.seconds, P = N.milliseconds, Q = N.zone, ie = new Date(), se = K || (j || W ? 1 : ie.getDate()), ee = j || ie.getFullYear(), J = 0;
7605
7601
  j && !W || (J = W > 0 ? W - 1 : ie.getMonth());
7606
- var pe = z || 0, ye = q || 0, ke = $ || 0, de = P || 0;
7607
- return Q ? new Date(Date.UTC(ee, J, se, pe, ye, ke, de + 60 * Q.offset * 1e3)) : k ? new Date(Date.UTC(ee, J, se, pe, ye, ke, de)) : new Date(ee, J, se, pe, ye, ke, de);
7602
+ var pe = z || 0, ye = q || 0, Ae = $ || 0, de = P || 0;
7603
+ return Q ? new Date(Date.UTC(ee, J, se, pe, ye, Ae, de + 60 * Q.offset * 1e3)) : k ? new Date(Date.UTC(ee, J, se, pe, ye, Ae, de)) : new Date(ee, J, se, pe, ye, Ae, de);
7608
7604
  } catch {
7609
7605
  return new Date("");
7610
7606
  }
@@ -7748,11 +7744,11 @@ const Uc = (e) => {
7748
7744
  i == null || i(_);
7749
7745
  };
7750
7746
  async function h() {
7751
- const _ = await Dt(r), b = `data:${_ == null ? void 0 : _.mime};base64,${r}`, A = document.createElement("a"), I = c(a), M = c("name");
7747
+ const _ = await It(r), b = `data:${_ == null ? void 0 : _.mime};base64,${r}`, A = document.createElement("a"), I = c(a), M = c("name");
7752
7748
  A.href = b, A.download = I || M, A.click();
7753
7749
  }
7754
7750
  async function g() {
7755
- const _ = await Dt(r);
7751
+ const _ = await It(r);
7756
7752
  un(r, _.mime);
7757
7753
  }
7758
7754
  async function y(_) {
@@ -7850,7 +7846,7 @@ function Zn(e) {
7850
7846
  children: v.type.charAt(0).toUpperCase() + v.type.slice(1)
7851
7847
  }), /* @__PURE__ */ n(ce, {
7852
7848
  flex: "none",
7853
- children: /* @__PURE__ */ n(kt, {
7849
+ children: /* @__PURE__ */ n(At, {
7854
7850
  style: {
7855
7851
  opacity: t.view_id === v.view_id ? 1 : 0
7856
7852
  }
@@ -7911,7 +7907,7 @@ function Zn(e) {
7911
7907
  borderTopLeftRadius: 0,
7912
7908
  borderBottomLeftRadius: 0
7913
7909
  },
7914
- icon: /* @__PURE__ */ n(At, {
7910
+ icon: /* @__PURE__ */ n(Vt, {
7915
7911
  style: {
7916
7912
  fontSize: "0.5em"
7917
7913
  }
@@ -7921,7 +7917,7 @@ function Zn(e) {
7921
7917
  })]
7922
7918
  });
7923
7919
  }
7924
- function It(e) {
7920
+ function _t(e) {
7925
7921
  const {
7926
7922
  icon: t,
7927
7923
  tooltip: r,
@@ -7950,7 +7946,7 @@ function It(e) {
7950
7946
  overlay: l(),
7951
7947
  disabled: a || !i || i.length === 0,
7952
7948
  children: /* @__PURE__ */ H(Ie, {
7953
- children: [t, " ", s, " ", /* @__PURE__ */ n(At, {})]
7949
+ children: [t, " ", s, " ", /* @__PURE__ */ n(Vt, {})]
7954
7950
  })
7955
7951
  });
7956
7952
  }
@@ -8042,7 +8038,7 @@ const td = (e) => {
8042
8038
  lang: o
8043
8039
  } = Y(we), [s, a] = T(!1), l = /* @__PURE__ */ H(Ie, {
8044
8040
  disabled: r,
8045
- children: [/* @__PURE__ */ n(Kr, {}), `(${t})`, /* @__PURE__ */ n(At, {
8041
+ children: [/* @__PURE__ */ n(Kr, {}), `(${t})`, /* @__PURE__ */ n(Vt, {
8046
8042
  style: {
8047
8043
  fontSize: 12
8048
8044
  }
@@ -8066,11 +8062,11 @@ const td = (e) => {
8066
8062
  onOpenAttachmentDetail: l,
8067
8063
  onListAllAttachments: u
8068
8064
  } = e;
8069
- return o ? /* @__PURE__ */ n(Ae, {
8065
+ return o ? /* @__PURE__ */ n(Me, {
8070
8066
  style: {
8071
8067
  padding: 20
8072
8068
  }
8073
- }) : /* @__PURE__ */ H(Z, {
8069
+ }) : /* @__PURE__ */ H(X, {
8074
8070
  children: [/* @__PURE__ */ H("a", {
8075
8071
  style: {
8076
8072
  display: "block",
@@ -8090,7 +8086,7 @@ const td = (e) => {
8090
8086
  t(!1), s();
8091
8087
  },
8092
8088
  children: [/* @__PURE__ */ n(an, {}), " ", _e("addNewAttachment", r)]
8093
- }), i.length > 0 && /* @__PURE__ */ H(Z, {
8089
+ }), i.length > 0 && /* @__PURE__ */ H(X, {
8094
8090
  children: [/* @__PURE__ */ n("li", {
8095
8091
  className: "ant-dropdown-menu-item-divider"
8096
8092
  }), i.map((d) => {
@@ -8154,7 +8150,7 @@ function rd(e) {
8154
8150
  formRef: a
8155
8151
  } = Y(Xe), [l, u] = T(!1), [d, f] = T([]), [c, m] = T(!1), {
8156
8152
  t: v
8157
- } = Y(we), p = Me(async () => {
8153
+ } = Y(we), p = Re(async () => {
8158
8154
  u(!0);
8159
8155
  try {
8160
8156
  const y = await B.getHandler().readObjects({
@@ -8173,7 +8169,7 @@ function rd(e) {
8173
8169
  Ye(y);
8174
8170
  }
8175
8171
  u(!1);
8176
- }, t), h = Me(async (y) => {
8172
+ }, t), h = Re(async (y) => {
8177
8173
  if (y.link) {
8178
8174
  window.open(y.link);
8179
8175
  return;
@@ -8191,16 +8187,16 @@ function rd(e) {
8191
8187
  }
8192
8188
  if (m(!1), !!O)
8193
8189
  if (O.datas) {
8194
- const _ = await Dt(O.datas);
8190
+ const _ = await It(O.datas);
8195
8191
  un(O.datas, _.mime);
8196
8192
  } else
8197
8193
  s(O);
8198
- }, []), g = Me(async (y) => {
8194
+ }, []), g = Re(async (y) => {
8199
8195
  s(y);
8200
8196
  }, []);
8201
8197
  return ge(() => {
8202
8198
  p();
8203
- }, [p]), /* @__PURE__ */ H(Z, {
8199
+ }, [p]), /* @__PURE__ */ H(X, {
8204
8200
  children: [/* @__PURE__ */ n(td, {
8205
8201
  numberOfAttachments: t.length,
8206
8202
  attachments: d,
@@ -8217,7 +8213,7 @@ function rd(e) {
8217
8213
  closable: !1,
8218
8214
  centered: !0,
8219
8215
  maskClosable: !1,
8220
- children: /* @__PURE__ */ n(Ae, {})
8216
+ children: /* @__PURE__ */ n(Me, {})
8221
8217
  })]
8222
8218
  });
8223
8219
  }
@@ -8252,7 +8248,7 @@ function od({
8252
8248
  } = Y(Xe), {
8253
8249
  t: x,
8254
8250
  lang: F
8255
- } = Y(we), C = Y(Mt), {
8251
+ } = Y(we), C = Y(Rt), {
8256
8252
  processAction: L
8257
8253
  } = C || {}, S = Y(at), {
8258
8254
  openRelate: R,
@@ -8342,8 +8338,8 @@ function od({
8342
8338
  }
8343
8339
  return r ? /* @__PURE__ */ H(je, {
8344
8340
  wrap: !0,
8345
- children: [O && /* @__PURE__ */ H(Z, {
8346
- children: [/* @__PURE__ */ n(Ae, {}), St(), St()]
8341
+ children: [O && /* @__PURE__ */ H(X, {
8342
+ children: [/* @__PURE__ */ n(Me, {}), Ct(), Ct()]
8347
8343
  }), /* @__PURE__ */ n(_o, {
8348
8344
  disabled: a || O || p || h
8349
8345
  }), /* @__PURE__ */ n(Ue, {
@@ -8364,7 +8360,7 @@ function od({
8364
8360
  disabled: a || l === void 0 || p || h || O,
8365
8361
  loading: p,
8366
8362
  onClick: j
8367
- }), St(), /* @__PURE__ */ n(Ue, {
8363
+ }), Ct(), /* @__PURE__ */ n(Ue, {
8368
8364
  icon: /* @__PURE__ */ n(Yr, {}),
8369
8365
  tooltip: x("showLogs"),
8370
8366
  disabled: a || l === void 0 || p || h || O,
@@ -8382,7 +8378,7 @@ function od({
8382
8378
  b.current.fetchValues();
8383
8379
  });
8384
8380
  }
8385
- }), St(), /* @__PURE__ */ n(Zn, {
8381
+ }), Ct(), /* @__PURE__ */ n(Zn, {
8386
8382
  currentView: r,
8387
8383
  previousView: I,
8388
8384
  availableViews: t,
@@ -8391,7 +8387,7 @@ function od({
8391
8387
  },
8392
8388
  disabled: z,
8393
8389
  formHasChanges: s
8394
- }), St(), /* @__PURE__ */ H(je, {
8390
+ }), Ct(), /* @__PURE__ */ H(je, {
8395
8391
  children: [/* @__PURE__ */ n(Ue, {
8396
8392
  icon: /* @__PURE__ */ n(Br, {}),
8397
8393
  tooltip: x("previous"),
@@ -8409,17 +8405,17 @@ function od({
8409
8405
  D(k);
8410
8406
  }
8411
8407
  })]
8412
- }), St(), /* @__PURE__ */ n(It, {
8408
+ }), Ct(), /* @__PURE__ */ n(_t, {
8413
8409
  icon: /* @__PURE__ */ n(Bn, {}),
8414
8410
  disabled: z,
8415
8411
  tooltip: x("actions"),
8416
8412
  items: e == null ? void 0 : e.action,
8417
8413
  onItemClick: async ($) => {
8418
- !$ || !(await Tt({
8414
+ !$ || !(await St({
8419
8415
  onFormSave: o
8420
8416
  })).succeed || q($);
8421
8417
  }
8422
- }), /* @__PURE__ */ n(It, {
8418
+ }), /* @__PURE__ */ n(_t, {
8423
8419
  icon: /* @__PURE__ */ n(jn, {}),
8424
8420
  disabled: z,
8425
8421
  tooltip: x("reports"),
@@ -8427,7 +8423,7 @@ function od({
8427
8423
  onItemClick: async ($) => {
8428
8424
  if (!$)
8429
8425
  return;
8430
- const P = await Tt({
8426
+ const P = await St({
8431
8427
  onFormSave: o
8432
8428
  });
8433
8429
  !P.succeed || q({
@@ -8438,13 +8434,13 @@ function od({
8438
8434
  }
8439
8435
  });
8440
8436
  }
8441
- }), /* @__PURE__ */ n(It, {
8437
+ }), /* @__PURE__ */ n(_t, {
8442
8438
  icon: /* @__PURE__ */ n(Hr, {}),
8443
8439
  disabled: z,
8444
8440
  tooltip: x("related"),
8445
8441
  items: e == null ? void 0 : e.relate,
8446
8442
  onItemClick: async ($) => {
8447
- !$ || !(await Tt({
8443
+ !$ || !(await St({
8448
8444
  onFormSave: o
8449
8445
  })).succeed || R({
8450
8446
  relateData: $,
@@ -8458,7 +8454,7 @@ function od({
8458
8454
  disabled: z,
8459
8455
  attachments: _,
8460
8456
  onAddNewAttachment: async () => {
8461
- const $ = await Tt({
8457
+ const $ = await St({
8462
8458
  onFormSave: o
8463
8459
  });
8464
8460
  if (!$.succeed)
@@ -8477,7 +8473,7 @@ function od({
8477
8473
  });
8478
8474
  },
8479
8475
  onListAllAttachments: async () => {
8480
- const $ = await Tt({
8476
+ const $ = await St({
8481
8477
  onFormSave: o
8482
8478
  });
8483
8479
  if (!$.succeed)
@@ -8490,7 +8486,7 @@ function od({
8490
8486
  });
8491
8487
  },
8492
8488
  onViewAttachmentDetails: async ($) => {
8493
- !(await Tt({
8489
+ !(await St({
8494
8490
  onFormSave: o
8495
8491
  })).succeed || V({
8496
8492
  model: "ir.attachment",
@@ -8501,12 +8497,12 @@ function od({
8501
8497
  })]
8502
8498
  }) : null;
8503
8499
  }
8504
- function St() {
8500
+ function Ct() {
8505
8501
  return /* @__PURE__ */ n("div", {
8506
8502
  className: "inline-block w-2"
8507
8503
  });
8508
8504
  }
8509
- async function Tt({
8505
+ async function St({
8510
8506
  onFormSave: e
8511
8507
  }) {
8512
8508
  const t = await (e == null ? void 0 : e());
@@ -8551,7 +8547,7 @@ const {
8551
8547
  children: [l ? null : /* @__PURE__ */ n(ce, {
8552
8548
  flex: "32px",
8553
8549
  children: v ? /* @__PURE__ */ n(Ie, {
8554
- icon: /* @__PURE__ */ n(kt, {}),
8550
+ icon: /* @__PURE__ */ n(At, {}),
8555
8551
  onClick: () => {
8556
8552
  o(r) && (p(!1), g(!1));
8557
8553
  },
@@ -8678,7 +8674,7 @@ const {
8678
8674
  style: {
8679
8675
  marginLeft: 15
8680
8676
  },
8681
- icon: /* @__PURE__ */ n(kt, {}),
8677
+ icon: /* @__PURE__ */ n(At, {}),
8682
8678
  htmlType: "submit",
8683
8679
  type: "primary",
8684
8680
  disabled: o,
@@ -8807,7 +8803,7 @@ function pn(e) {
8807
8803
  } = ud();
8808
8804
  function m() {
8809
8805
  if ((o == null ? void 0 : o.type) === "form")
8810
- return s ? u === 0 ? /* @__PURE__ */ H(Z, {
8806
+ return s ? u === 0 ? /* @__PURE__ */ H(X, {
8811
8807
  children: [f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Zt, {
8812
8808
  copyable: {
8813
8809
  icon: /* @__PURE__ */ n(Wn, {
@@ -8818,7 +8814,7 @@ function pn(e) {
8818
8814
  },
8819
8815
  children: s
8820
8816
  }), ")"]
8821
- }) : /* @__PURE__ */ H(Z, {
8817
+ }) : /* @__PURE__ */ H(X, {
8822
8818
  children: [f("register"), " ", a === void 0 ? 1 : a + 1, " /", " ", l.length, " ", f("of"), " ", u, " - ", f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Zt, {
8823
8819
  copyable: !0,
8824
8820
  children: s
@@ -8826,14 +8822,14 @@ function pn(e) {
8826
8822
  }) : "";
8827
8823
  if ((o == null ? void 0 : o.type) === "tree" && d) {
8828
8824
  if (d.length === 1)
8829
- return /* @__PURE__ */ H(Z, {
8825
+ return /* @__PURE__ */ H(X, {
8830
8826
  children: ["1 ", f("selectedRegisters"), " - (id:", " ", /* @__PURE__ */ n(Zt, {
8831
8827
  copyable: !0,
8832
8828
  children: d[0].id
8833
8829
  }), ")"]
8834
8830
  });
8835
8831
  if (d.length > 1)
8836
- return /* @__PURE__ */ H(Z, {
8832
+ return /* @__PURE__ */ H(X, {
8837
8833
  children: [d.length, " ", f("selectedRegisters"), /* @__PURE__ */ n(Zt, {
8838
8834
  copyable: {
8839
8835
  text: d.map((v) => v.id).join(", ")
@@ -8943,7 +8939,7 @@ const md = (e) => {
8943
8939
  limit: M,
8944
8940
  setLimit: w
8945
8941
  });
8946
- return !r || !t ? null : /* @__PURE__ */ H(Z, {
8942
+ return !r || !t ? null : /* @__PURE__ */ H(X, {
8947
8943
  children: [/* @__PURE__ */ n(pn, {
8948
8944
  title: t.name,
8949
8945
  children: /* @__PURE__ */ n(dd, {
@@ -8969,7 +8965,7 @@ const md = (e) => {
8969
8965
  searchVisible: g,
8970
8966
  searchValues: F,
8971
8967
  showLimitOptions: !1
8972
- }), N ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(hn, {
8968
+ }), N ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(hn, {
8973
8969
  ref: u,
8974
8970
  view_id: t.view_id,
8975
8971
  model: i,
@@ -8994,7 +8990,7 @@ const md = (e) => {
8994
8990
  setResults: c,
8995
8991
  setCurrentItemIndex: m
8996
8992
  } = e;
8997
- return t ? /* @__PURE__ */ H(Z, {
8993
+ return t ? /* @__PURE__ */ H(X, {
8998
8994
  children: [/* @__PURE__ */ n(pn, {
8999
8995
  children: /* @__PURE__ */ n(od, {
9000
8996
  toolbar: a == null ? void 0 : a.toolbar
@@ -9120,7 +9116,7 @@ function yd(e) {
9120
9116
  } = Y(gd), {
9121
9117
  t: L,
9122
9118
  lang: S
9123
- } = Y(we), R = Y(Mt), {
9119
+ } = Y(we), R = Y(Rt), {
9124
9120
  processAction: V
9125
9121
  } = R || {}, [E, D] = T(!1), k = y !== void 0 && y.trim().length > 0;
9126
9122
  function N() {
@@ -9184,9 +9180,7 @@ function yd(e) {
9184
9180
  }
9185
9181
  return /* @__PURE__ */ H(je, {
9186
9182
  wrap: !0,
9187
- children: [O && /* @__PURE__ */ H(Z, {
9188
- children: [/* @__PURE__ */ n(Ae, {}), yt(), yt()]
9189
- }), x ? null : /* @__PURE__ */ H(Z, {
9183
+ children: [x ? null : /* @__PURE__ */ H(X, {
9190
9184
  children: [/* @__PURE__ */ n(pd, {
9191
9185
  disabled: l || a || O,
9192
9186
  searchText: y,
@@ -9206,7 +9200,7 @@ function yd(e) {
9206
9200
  },
9207
9201
  disabled: l || a || O,
9208
9202
  badgeNumber: v == null ? void 0 : v.length
9209
- }), yt(), /* @__PURE__ */ n(_o, {
9203
+ }), Et(), /* @__PURE__ */ n(_o, {
9210
9204
  disabled: O
9211
9205
  }), /* @__PURE__ */ n(Ue, {
9212
9206
  icon: /* @__PURE__ */ n(Wn, {}),
@@ -9220,7 +9214,7 @@ function yd(e) {
9220
9214
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9221
9215
  loading: a,
9222
9216
  onClick: N
9223
- }), yt()]
9217
+ }), Et()]
9224
9218
  }), /* @__PURE__ */ n(Ue, {
9225
9219
  icon: /* @__PURE__ */ n(Yr, {}),
9226
9220
  tooltip: L("showLogs"),
@@ -9238,8 +9232,8 @@ function yd(e) {
9238
9232
  var q;
9239
9233
  (q = f == null ? void 0 : f.current) == null || q.refreshResults();
9240
9234
  }
9241
- }), !x && /* @__PURE__ */ H(Z, {
9242
- children: [yt(), /* @__PURE__ */ n(Zn, {
9235
+ }), !x && /* @__PURE__ */ H(X, {
9236
+ children: [Et(), /* @__PURE__ */ n(Zn, {
9243
9237
  currentView: r,
9244
9238
  availableViews: t,
9245
9239
  onChangeView: (q) => {
@@ -9248,7 +9242,7 @@ function yd(e) {
9248
9242
  previousView: b,
9249
9243
  disabled: O
9250
9244
  })]
9251
- }), yt(), /* @__PURE__ */ n(It, {
9245
+ }), Et(), /* @__PURE__ */ n(_t, {
9252
9246
  icon: /* @__PURE__ */ n(Bn, {}),
9253
9247
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9254
9248
  tooltip: L("actions"),
@@ -9256,7 +9250,7 @@ function yd(e) {
9256
9250
  onItemClick: (q) => {
9257
9251
  !q || K(q);
9258
9252
  }
9259
- }), /* @__PURE__ */ n(It, {
9253
+ }), /* @__PURE__ */ n(_t, {
9260
9254
  icon: /* @__PURE__ */ n(jn, {}),
9261
9255
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9262
9256
  tooltip: L("reports"),
@@ -9270,8 +9264,8 @@ function yd(e) {
9270
9264
  }
9271
9265
  });
9272
9266
  }
9273
- }), C && /* @__PURE__ */ H(Z, {
9274
- children: [yt(), /* @__PURE__ */ n(It, {
9267
+ }), C && /* @__PURE__ */ H(X, {
9268
+ children: [Et(), /* @__PURE__ */ n(_t, {
9275
9269
  icon: /* @__PURE__ */ n(Mr, {
9276
9270
  component: () => /* @__PURE__ */ H("svg", {
9277
9271
  xmlns: "http://www.w3.org/2000/svg",
@@ -9341,7 +9335,7 @@ function yd(e) {
9341
9335
  })]
9342
9336
  });
9343
9337
  }
9344
- function yt() {
9338
+ function Et() {
9345
9339
  return /* @__PURE__ */ n("div", {
9346
9340
  className: "inline-block w-2"
9347
9341
  });
@@ -9365,7 +9359,7 @@ const vd = (e) => {
9365
9359
  currentView: p,
9366
9360
  setPreviousView: h
9367
9361
  } = Y(Xe);
9368
- return t ? /* @__PURE__ */ H(Z, {
9362
+ return t ? /* @__PURE__ */ H(X, {
9369
9363
  children: [/* @__PURE__ */ n(pn, {
9370
9364
  children: /* @__PURE__ */ n(yd, {
9371
9365
  toolbar: a == null ? void 0 : a.toolbar,
@@ -9520,7 +9514,7 @@ function Td(e, t) {
9520
9514
  setCurrentId: J,
9521
9515
  tabs: pe,
9522
9516
  activeKey: ye,
9523
- openAction: ke,
9517
+ openAction: Ae,
9524
9518
  onRemoveTab: de
9525
9519
  } = se || {};
9526
9520
  ki("ctrl+g,command+g", (te) => {
@@ -9532,19 +9526,19 @@ function Td(e, t) {
9532
9526
  function Te(te) {
9533
9527
  O(te), ee == null || ee(te);
9534
9528
  }
9535
- bt(t, () => ({
9529
+ wt(t, () => ({
9536
9530
  canWeClose: Fe
9537
9531
  }));
9538
9532
  const be = async () => {
9539
9533
  I(!0);
9540
9534
  const te = [], ue = [];
9541
9535
  for (const le of s) {
9542
- const [De, Re] = le;
9543
- Re !== "dashboard" ? ue.push({
9536
+ const [De, ke] = le;
9537
+ ke !== "dashboard" ? ue.push({
9544
9538
  viewTuple: le,
9545
9539
  promise: B.getHandler().getView({
9546
9540
  model: i,
9547
- type: Re,
9541
+ type: ke,
9548
9542
  id: De,
9549
9543
  context: o
9550
9544
  })
@@ -9557,12 +9551,12 @@ function Td(e, t) {
9557
9551
  if (!le)
9558
9552
  continue;
9559
9553
  const [, De] = le.viewTuple;
9560
- let Re = le.info;
9554
+ let ke = le.info;
9561
9555
  switch (De) {
9562
9556
  case "dashboard": {
9563
9557
  const tt = s.find((nt) => {
9564
- const [, X] = nt;
9565
- return X === "form";
9558
+ const [, Z] = nt;
9559
+ return Z === "form";
9566
9560
  });
9567
9561
  let Ze;
9568
9562
  tt && (Ze = {
@@ -9584,14 +9578,14 @@ function Td(e, t) {
9584
9578
  }
9585
9579
  case "form": {
9586
9580
  te.push({
9587
- ...Re,
9581
+ ...ke,
9588
9582
  type: De
9589
9583
  });
9590
9584
  break;
9591
9585
  }
9592
9586
  case "tree": {
9593
9587
  te.push({
9594
- ...Re,
9588
+ ...ke,
9595
9589
  isExpandable: h,
9596
9590
  type: De
9597
9591
  });
@@ -9599,7 +9593,7 @@ function Td(e, t) {
9599
9593
  }
9600
9594
  case "graph": {
9601
9595
  te.push({
9602
- ...Re,
9596
+ ...ke,
9603
9597
  type: De
9604
9598
  });
9605
9599
  break;
@@ -9647,7 +9641,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9647
9641
  xe = R[ue];
9648
9642
  z(!1), W(!1);
9649
9643
  const Pe = s.find((De) => De[1] === "form");
9650
- ke({
9644
+ Ae({
9651
9645
  domain: [],
9652
9646
  context: o,
9653
9647
  model: i,
@@ -9724,7 +9718,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9724
9718
  Te(te);
9725
9719
  }
9726
9720
  }
9727
- return A ? /* @__PURE__ */ n(Ae, {}) : y ? /* @__PURE__ */ H(Qa, {
9721
+ return A ? /* @__PURE__ */ n(Me, {}) : y ? /* @__PURE__ */ H(Qa, {
9728
9722
  title: a,
9729
9723
  currentView: y,
9730
9724
  setCurrentView: Te,
@@ -9759,7 +9753,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9759
9753
  })]
9760
9754
  }) : null;
9761
9755
  }
9762
- const Ao = wt(Td);
9756
+ const Ao = vt(Td);
9763
9757
  async function Fd({
9764
9758
  actionId: e,
9765
9759
  rootContext: t = {},
@@ -9768,7 +9762,7 @@ async function Fd({
9768
9762
  const i = "ir.actions.act_window", o = `${i},${e}`, s = await B.getHandler().getActionData({
9769
9763
  action: o,
9770
9764
  context: t
9771
- }), a = vt({
9765
+ }), a = yt({
9772
9766
  context: s.context,
9773
9767
  values: r,
9774
9768
  fields: {}
@@ -9927,8 +9921,8 @@ function kd(e) {
9927
9921
  }, q = async () => {
9928
9922
  const J = K.current.length > 0 ? K.current : s, pe = fn(M.current, J), {
9929
9923
  colors: ye
9930
- } = Ot(p), {
9931
- totalItems: ke,
9924
+ } = Ft(p), {
9925
+ totalItems: Ae,
9932
9926
  results: de,
9933
9927
  attrsEvaluated: oe
9934
9928
  } = await B.getHandler().searchForTree({
@@ -9943,7 +9937,7 @@ function kd(e) {
9943
9937
  }
9944
9938
  });
9945
9939
  S(Xt(oe));
9946
- const Te = _t({
9940
+ const Te = Ot({
9947
9941
  resultsToSort: de,
9948
9942
  sorter: R,
9949
9943
  fields: {
@@ -9952,7 +9946,7 @@ function kd(e) {
9952
9946
  }
9953
9947
  });
9954
9948
  W(!1), C(Te);
9955
- const be = await ke;
9949
+ const be = await Ae;
9956
9950
  x(be);
9957
9951
  }, $ = async () => {
9958
9952
  try {
@@ -10030,7 +10024,7 @@ function kd(e) {
10030
10024
  sorter: R,
10031
10025
  onChangeSort: (J) => {
10032
10026
  V == null || V(J);
10033
- const pe = _t({
10027
+ const pe = Ot({
10034
10028
  resultsToSort: F,
10035
10029
  sorter: J,
10036
10030
  fields: {
@@ -10048,7 +10042,7 @@ function kd(e) {
10048
10042
  message: k,
10049
10043
  type: "error",
10050
10044
  banner: !0
10051
- }) : u ? /* @__PURE__ */ n(Ae, {
10045
+ }) : u ? /* @__PURE__ */ n(Me, {
10052
10046
  style: {
10053
10047
  padding: "2rem"
10054
10048
  }
@@ -10095,7 +10089,7 @@ function Md(e, t) {
10095
10089
  } = Y(Xn), h = me(), g = me();
10096
10090
  ge(() => {
10097
10091
  y();
10098
- }, [r, o, i]), bt(t, () => ({
10092
+ }, [r, o, i]), wt(t, () => ({
10099
10093
  refresh: () => {
10100
10094
  y();
10101
10095
  },
@@ -10287,12 +10281,12 @@ function Md(e, t) {
10287
10281
  const [ee, J] = se, {
10288
10282
  actionId: pe,
10289
10283
  actionType: ye,
10290
- title: ke,
10284
+ title: Ae,
10291
10285
  model: de
10292
10286
  } = F, oe = {
10293
10287
  action_id: pe,
10294
10288
  action_type: ye,
10295
- name: ke,
10289
+ name: Ae,
10296
10290
  res_id: ie.id,
10297
10291
  res_model: de,
10298
10292
  view_id: ee,
@@ -10355,7 +10349,7 @@ function Md(e, t) {
10355
10349
  })
10356
10350
  });
10357
10351
  }
10358
- const Ed = wt(Md), $d = (e) => /* @__PURE__ */ n(ve, {
10352
+ const Ed = vt(Md), $d = (e) => /* @__PURE__ */ n(ve, {
10359
10353
  ...e,
10360
10354
  children: /* @__PURE__ */ n(Ld, {
10361
10355
  ...e
@@ -10399,7 +10393,7 @@ const Ed = wt(Md), $d = (e) => /* @__PURE__ */ n(ve, {
10399
10393
  } = r, y = Y(Ee), {
10400
10394
  getContext: O
10401
10395
  } = y || {};
10402
- Ct(() => {
10396
+ xt(() => {
10403
10397
  b();
10404
10398
  }, [o]);
10405
10399
  const _ = (w) => {
@@ -10413,7 +10407,7 @@ const Ed = wt(Md), $d = (e) => /* @__PURE__ */ n(ve, {
10413
10407
  if (r.domain) {
10414
10408
  const x = await B.getHandler().evalDomain({
10415
10409
  domain: r.domain,
10416
- values: Rt({
10410
+ values: kt({
10417
10411
  fields: y == null ? void 0 : y.getFields(),
10418
10412
  values: y.getPlainValues()
10419
10413
  }),
@@ -10472,7 +10466,7 @@ const Ed = wt(Md), $d = (e) => /* @__PURE__ */ n(ve, {
10472
10466
  });
10473
10467
  }), _(x);
10474
10468
  };
10475
- return f && a.length === 0 ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(Z, {
10469
+ return f && a.length === 0 ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(X, {
10476
10470
  children: /* @__PURE__ */ H("div", {
10477
10471
  className: "flex flex-row",
10478
10472
  children: [/* @__PURE__ */ n(Lt.Group, {
@@ -10672,7 +10666,7 @@ function Xd(e, t) {
10672
10666
  closable: !0,
10673
10667
  content: /* @__PURE__ */ n(Zd, {})
10674
10668
  }]), f = me(/* @__PURE__ */ new Map()), c = me();
10675
- bt(t, () => ({
10669
+ wt(t, () => ({
10676
10670
  retrieveAndOpenAction: p,
10677
10671
  openShortcut: y
10678
10672
  }));
@@ -10705,7 +10699,7 @@ function Xd(e, t) {
10705
10699
  Ye("Action type not supported");
10706
10700
  return;
10707
10701
  }
10708
- const [C, L] = b.split(","), S = parseInt(L), R = vt({
10702
+ const [C, L] = b.split(","), S = parseInt(L), R = yt({
10709
10703
  context: F.context,
10710
10704
  values: i,
10711
10705
  fields: {}
@@ -10812,7 +10806,7 @@ function Xd(e, t) {
10812
10806
  } = b, [E, D] = L[0], k = {
10813
10807
  id: E,
10814
10808
  type: D
10815
- }, N = vt({
10809
+ }, N = yt({
10816
10810
  context: F,
10817
10811
  values: {
10818
10812
  ...I,
@@ -10821,7 +10815,7 @@ function Xd(e, t) {
10821
10815
  fields: A
10822
10816
  }), j = C ? await B.getHandler().evalDomain({
10823
10817
  domain: C,
10824
- values: Rt({
10818
+ values: kt({
10825
10819
  fields: A,
10826
10820
  values: {
10827
10821
  ...I,
@@ -10859,7 +10853,7 @@ function Xd(e, t) {
10859
10853
  } = b, x = `${I},${A}`, F = await B.getHandler().getActionData({
10860
10854
  action: x,
10861
10855
  context: o
10862
- }), C = vt({
10856
+ }), C = yt({
10863
10857
  context: F.context,
10864
10858
  values: i,
10865
10859
  fields: {}
@@ -11046,7 +11040,7 @@ function Xd(e, t) {
11046
11040
  })
11047
11041
  });
11048
11042
  }
11049
- const Iu = wt(Xd), {
11043
+ const Iu = vt(Xd), {
11050
11044
  useToken: Qd
11051
11045
  } = $e;
11052
11046
  function eu(e) {
@@ -11120,7 +11114,7 @@ function Du() {
11120
11114
  onRemoveTab: i,
11121
11115
  onChangeTab: o
11122
11116
  } = e || {};
11123
- return /* @__PURE__ */ n(Z, {
11117
+ return /* @__PURE__ */ n(X, {
11124
11118
  children: r.map((s) => /* @__PURE__ */ n(eu, {
11125
11119
  tabKey: s.key,
11126
11120
  label: s.title,
@@ -11150,7 +11144,7 @@ function Vu() {
11150
11144
  } = e || {}, r = (t == null ? void 0 : t.map((i) => /* @__PURE__ */ n(nu, {
11151
11145
  tab: i
11152
11146
  }, i.key))) || null;
11153
- return /* @__PURE__ */ n(Z, {
11147
+ return /* @__PURE__ */ n(X, {
11154
11148
  children: r
11155
11149
  });
11156
11150
  }
@@ -11256,11 +11250,11 @@ const {
11256
11250
  })
11257
11251
  })
11258
11252
  })]
11259
- }), /* @__PURE__ */ n(Le.Divider, {}), c ? /* @__PURE__ */ n(Ae, {
11253
+ }), /* @__PURE__ */ n(Le.Divider, {}), c ? /* @__PURE__ */ n(Me, {
11260
11254
  style: {
11261
11255
  padding: "1rem"
11262
11256
  }
11263
- }) : d.length > 0 ? /* @__PURE__ */ n(Z, {
11257
+ }) : d.length > 0 ? /* @__PURE__ */ n(X, {
11264
11258
  children: d.map((E) => /* @__PURE__ */ n(Le.Item, {
11265
11259
  children: /* @__PURE__ */ n(R, {
11266
11260
  title: E.name,
@@ -11318,7 +11312,7 @@ const {
11318
11312
  }
11319
11313
  await w(), a(!s);
11320
11314
  }
11321
- return /* @__PURE__ */ H(Z, {
11315
+ return /* @__PURE__ */ H(X, {
11322
11316
  children: [/* @__PURE__ */ n(Ie, {
11323
11317
  type: s ? "primary" : "default",
11324
11318
  icon: s ? /* @__PURE__ */ n(Nr, {
@@ -11342,7 +11336,7 @@ const {
11342
11336
  borderTopLeftRadius: 0,
11343
11337
  borderBottomLeftRadius: 0
11344
11338
  },
11345
- icon: /* @__PURE__ */ n(At, {
11339
+ icon: /* @__PURE__ */ n(Vt, {
11346
11340
  style: {
11347
11341
  fontSize: "0.5em"
11348
11342
  }