@gisce/react-ooui 1.4.0 → 1.4.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import Je, { useContext as Y, useState as T, useEffect as pe, useRef as ue, useCallback as $e, forwardRef as wt, useImperativeHandle as bt } from "react";
2
- import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as Ge, Button as Ie, Dropdown as Bt, Menu as He, Spin as Le, Divider as ln, Space as Ye, Input as nt, Select as xt, Checkbox as Nt, Alert as Ze, Timeline as tr, Statistic as ei, Card as ti, Tag as Dr, message as xn, DatePicker as Mn, TimePicker as Vr, InputNumber as En, Progress as ni, Avatar as ri, Badge as oi, Pagination as ii, Tabs as Ar, Popover as si, Radio as nr, Switch as ai, Steps as rr, Layout as li } from "antd";
3
- import { Label as Vt, Field as In, Tree as Rr, Reference as ci, Selection as $n, Many2one as kr, Boolean as di, Container as ui, parseContext as vt, Form as Mr, Integer as _n, SearchFieldTypes as ft, SearchFilter as fi, transformDomainForChildWidget as Er, graphProcessor as $r, parseGraph as Ln, graphFieldUtils as mi } from "@gisce/ooui";
1
+ import Je, { useContext as Y, useState as T, useEffect as pe, useRef as ue, useCallback as Le, forwardRef as bt, useImperativeHandle as xt } from "react";
2
+ import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as Ge, Button as Ie, Dropdown as Bt, Menu as He, Spin as Me, Divider as ln, Space as Ye, Input as nt, Select as Ct, Checkbox as Nt, Alert as Ze, Timeline as tr, Statistic as ei, Card as ti, Tag as Dr, message as xn, DatePicker as Mn, TimePicker as Vr, InputNumber as En, Progress as ni, Avatar as ri, Badge as oi, Pagination as ii, Tabs as Ar, Popover as si, Radio as nr, Switch as ai, Steps as rr, Layout as li } from "antd";
3
+ import { Label as At, Field as In, Tree as Rr, Reference as ci, Selection as $n, Many2one as kr, Boolean as di, Container as ui, parseContext as wt, Form as Mr, Integer as _n, SearchFieldTypes as ft, SearchFilter as fi, transformDomainForChildWidget as Er, graphProcessor as $r, parseGraph as Ln, graphFieldUtils as mi } from "@gisce/ooui";
4
4
  import * as or from "@ant-design/icons";
5
- import Lr, { QuestionCircleOutlined as Nr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as At, WarningOutlined as Pr, CloseOutlined as jt, CheckOutlined as Rt, TranslationOutlined as Hr, FolderOpenOutlined as Nn, DownloadOutlined as Pn, ClearOutlined as Hn, StarFilled as Br, StarOutlined as jr, UpOutlined as hi, SearchOutlined as Bn, RightCircleOutlined as pi, ThunderboltOutlined as jn, PrinterOutlined as Kn, EnterOutlined as Kr, PlusSquareOutlined as gi, MinusSquareOutlined as yi, FileAddOutlined as cn, AlignLeftOutlined as vi, ApiOutlined as wi, DeleteOutlined as Yn, LeftOutlined as Yr, RightOutlined as Wr, EyeOutlined as bi, FormOutlined as Pt, TableOutlined as Wn, AreaChartOutlined as xi, CalendarOutlined as Ci, LinkOutlined as Ur, SaveOutlined as Si, CopyOutlined as Un, InfoCircleOutlined as Gr, ReloadOutlined as dn, EditOutlined as qr, FilterOutlined as zr, CloseCircleFilled as Ti, BorderOuterOutlined as Fi, SettingOutlined as Oi, ExportOutlined as Ii } from "@ant-design/icons";
5
+ import Lr, { QuestionCircleOutlined as Nr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as Rt, WarningOutlined as Pr, CloseOutlined as jt, CheckOutlined as kt, TranslationOutlined as Hr, FolderOpenOutlined as Nn, DownloadOutlined as Pn, ClearOutlined as Hn, StarFilled as Br, StarOutlined as jr, UpOutlined as hi, SearchOutlined as Bn, RightCircleOutlined as pi, ThunderboltOutlined as jn, PrinterOutlined as Kn, EnterOutlined as Kr, PlusSquareOutlined as gi, MinusSquareOutlined as yi, FileAddOutlined as cn, AlignLeftOutlined as vi, ApiOutlined as wi, DeleteOutlined as Yn, LeftOutlined as Yr, RightOutlined as Wr, EyeOutlined as bi, FormOutlined as Pt, TableOutlined as Wn, AreaChartOutlined as xi, CalendarOutlined as Ci, LinkOutlined as Ur, SaveOutlined as Si, CopyOutlined as Un, InfoCircleOutlined as Gr, ReloadOutlined as dn, EditOutlined as qr, FilterOutlined as zr, CloseCircleFilled as Ti, BorderOuterOutlined as Fi, SettingOutlined as Oi, ExportOutlined as Ii } from "@ant-design/icons";
6
6
  import { Interweave as Gn } from "interweave";
7
7
  import { jsxs as P, jsx as n, Fragment as ne } from "react/jsx-runtime";
8
8
  import * as ir from "@tabler/icons-react";
@@ -11,7 +11,7 @@ import Kt from "styled-components";
11
11
  import qn from "react-measure";
12
12
  import Dn from "antd/lib/typography/Title";
13
13
  import { Line as Di, Column as Vi, Pie as Ai } from "@ant-design/plots";
14
- import Ct from "use-deep-compare-effect";
14
+ import St from "use-deep-compare-effect";
15
15
  import { Table as Ri } from "@gisce/react-formiga-table";
16
16
  import { fileTypeFromBuffer as ki } from "file-type-buffer-browser";
17
17
  import { isPresetStatusColor as Mi } from "antd/lib/_util/colors";
@@ -382,7 +382,7 @@ function ve({
382
382
  if (!o)
383
383
  return p();
384
384
  const h = /* @__PURE__ */ n(un, {
385
- ooui: new Vt({
385
+ ooui: new At({
386
386
  name: c + "_label",
387
387
  string: f,
388
388
  help: d,
@@ -704,7 +704,7 @@ const Zr = (e) => {
704
704
  children: /* @__PURE__ */ P(Bt.Button, {
705
705
  disabled: !a || v,
706
706
  onClick: V,
707
- icon: /* @__PURE__ */ n(At, {}),
707
+ icon: /* @__PURE__ */ n(Rt, {}),
708
708
  type: f ? "primary" : void 0,
709
709
  overlay: /* @__PURE__ */ n(os, {
710
710
  ooui: i,
@@ -944,7 +944,7 @@ const Xr = (e) => {
944
944
  p(!1), a();
945
945
  }
946
946
  function E() {
947
- return d ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
947
+ return d ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
948
948
  children: [V(), /* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(Ce, {
949
949
  justify: "end",
950
950
  children: /* @__PURE__ */ P(Ye, {
@@ -954,7 +954,7 @@ const Xr = (e) => {
954
954
  disabled: v,
955
955
  children: u("cancel")
956
956
  }), /* @__PURE__ */ n(Ie, {
957
- icon: v ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(Rt, {}),
957
+ icon: v ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(kt, {}),
958
958
  disabled: v,
959
959
  onClick: D,
960
960
  style: {
@@ -1121,7 +1121,7 @@ const {
1121
1121
  defaultSeed: fs
1122
1122
  } = Pe, ms = us(fs), {
1123
1123
  Option: hs
1124
- } = xt, to = (e) => {
1124
+ } = Ct, to = (e) => {
1125
1125
  const {
1126
1126
  ooui: t
1127
1127
  } = e, {
@@ -1151,7 +1151,7 @@ const {
1151
1151
  children: m
1152
1152
  }, d);
1153
1153
  });
1154
- return /* @__PURE__ */ n(a && !s ? ps : xt, {
1154
+ return /* @__PURE__ */ n(a && !s ? ps : Ct, {
1155
1155
  disabled: s,
1156
1156
  onChange: r,
1157
1157
  value: i,
@@ -1160,7 +1160,7 @@ const {
1160
1160
  showSearch: !0,
1161
1161
  children: u
1162
1162
  });
1163
- }, ps = Kt(xt)`
1163
+ }, ps = Kt(Ct)`
1164
1164
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
1165
1165
  background-color: ${ms.colorPrimaryBg};
1166
1166
  }
@@ -1223,16 +1223,16 @@ var Rs = As, ks = Rs, Ms = /^\s+/;
1223
1223
  function Es(e) {
1224
1224
  return e && e.slice(0, ks(e) + 1).replace(Ms, "");
1225
1225
  }
1226
- var $s = Es, Ls = oo, Ns = Ls.Symbol, io = Ns, dr = io, so = Object.prototype, Ps = so.hasOwnProperty, Hs = so.toString, Et = dr ? dr.toStringTag : void 0;
1226
+ var $s = Es, Ls = oo, Ns = Ls.Symbol, io = Ns, dr = io, so = Object.prototype, Ps = so.hasOwnProperty, Hs = so.toString, $t = dr ? dr.toStringTag : void 0;
1227
1227
  function Bs(e) {
1228
- var t = Ps.call(e, Et), r = e[Et];
1228
+ var t = Ps.call(e, $t), r = e[$t];
1229
1229
  try {
1230
- e[Et] = void 0;
1230
+ e[$t] = void 0;
1231
1231
  var i = !0;
1232
1232
  } catch {
1233
1233
  }
1234
1234
  var o = Hs.call(e);
1235
- return i && (t ? e[Et] = r : delete e[Et]), o;
1235
+ return i && (t ? e[$t] = r : delete e[$t]), o;
1236
1236
  }
1237
1237
  var js = Bs, Ks = Object.prototype, Ys = Ks.toString;
1238
1238
  function Ws(e) {
@@ -1319,7 +1319,7 @@ function ba(e) {
1319
1319
  const r = Buffer.from(e, "base64").length / 1e3;
1320
1320
  return `${Math.round((r + Number.EPSILON) * 100) / 100} KB`;
1321
1321
  }
1322
- async function Dt(e) {
1322
+ async function Vt(e) {
1323
1323
  const t = await ki(
1324
1324
  Buffer.from(e, "base64")
1325
1325
  );
@@ -1365,7 +1365,7 @@ const xa = (e) => {
1365
1365
  i == null || i(d);
1366
1366
  };
1367
1367
  async function u() {
1368
- const d = await Dt(r), m = `data:${d == null ? void 0 : d.mime};base64,${r}`, v = document.createElement("a");
1368
+ const d = await Vt(r), m = `data:${d == null ? void 0 : d.mime};base64,${r}`, v = document.createElement("a");
1369
1369
  v.href = m, v.download = `image.${d == null ? void 0 : d.ext}`, v.click();
1370
1370
  }
1371
1371
  async function c(d) {
@@ -1452,7 +1452,7 @@ const xa = (e) => {
1452
1452
  r && r(i);
1453
1453
  }
1454
1454
  });
1455
- }, Ot = (e) => {
1455
+ }, It = (e) => {
1456
1456
  const t = e.arch, r = e.fields, i = new Rr(r);
1457
1457
  return i.parse(t), i;
1458
1458
  }, Fa = (e, t, r) => e.columns.map((o) => {
@@ -1498,7 +1498,7 @@ function co(e, t) {
1498
1498
  r[i.id] = i[t];
1499
1499
  }), r;
1500
1500
  }
1501
- function It({
1501
+ function _t({
1502
1502
  resultsToSort: e,
1503
1503
  sorter: t,
1504
1504
  fields: r
@@ -1529,7 +1529,7 @@ const zn = async (e) => {
1529
1529
  };
1530
1530
  let f = [], d;
1531
1531
  if (a === "tree" && (o == null ? void 0 : o.arch)) {
1532
- const h = (p = Ot(o)) == null ? void 0 : p.colors, g = await H.getHandler().readEvalUiObjects({
1532
+ const h = (p = It(o)) == null ? void 0 : p.colors, g = await H.getHandler().readEvalUiObjects({
1533
1533
  model: r,
1534
1534
  ids: u,
1535
1535
  arch: o == null ? void 0 : o.arch,
@@ -1585,7 +1585,7 @@ const zn = async (e) => {
1585
1585
  } = t, [s, a] = T(!0), [l, u] = T(), [c, f] = T(/* @__PURE__ */ new Map()), d = Y(Ne), {
1586
1586
  getContext: m
1587
1587
  } = d || {};
1588
- Ct(() => {
1588
+ St(() => {
1589
1589
  p();
1590
1590
  }, [t]);
1591
1591
  const v = async (h) => o && o[h] ? o[h] : await H.getHandler().getView({
@@ -1606,7 +1606,7 @@ const zn = async (e) => {
1606
1606
  a(!1);
1607
1607
  }
1608
1608
  };
1609
- return s ? /* @__PURE__ */ n(Le, {}) : l ? /* @__PURE__ */ n(Ze, {
1609
+ return s ? /* @__PURE__ */ n(Me, {}) : l ? /* @__PURE__ */ n(Ze, {
1610
1610
  className: "mt-10",
1611
1611
  message: l,
1612
1612
  type: "error",
@@ -1636,7 +1636,7 @@ const zn = async (e) => {
1636
1636
  } = i, _ = s.filter((b) => b.values), w = Y(Ne), {
1637
1637
  getContext: V
1638
1638
  } = w || {};
1639
- Ct(() => {
1639
+ St(() => {
1640
1640
  E();
1641
1641
  }, [s]);
1642
1642
  const D = (b) => {
@@ -1675,7 +1675,7 @@ const zn = async (e) => {
1675
1675
  message: u,
1676
1676
  type: "error",
1677
1677
  banner: !0
1678
- }) : a ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
1678
+ }) : a ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
1679
1679
  children: [/* @__PURE__ */ n(tr, {
1680
1680
  style: {
1681
1681
  padding: "1rem"
@@ -1785,7 +1785,7 @@ const zn = async (e) => {
1785
1785
  } else
1786
1786
  r[i] = e[i];
1787
1787
  }), r;
1788
- }, Ft = (e, t) => ka(e, t), Sn = ({
1788
+ }, Ot = (e, t) => ka(e, t), Sn = ({
1789
1789
  source: e,
1790
1790
  target: t,
1791
1791
  fields: r
@@ -1880,7 +1880,7 @@ const zn = async (e) => {
1880
1880
  function yr(e, t, r) {
1881
1881
  return r.indexOf(e) === t;
1882
1882
  }
1883
- const kt = ({
1883
+ const Mt = ({
1884
1884
  values: e,
1885
1885
  fields: t
1886
1886
  }) => {
@@ -1951,7 +1951,7 @@ const kt = ({
1951
1951
  } = r, g = Y(Ne), {
1952
1952
  getContext: y
1953
1953
  } = g || {};
1954
- Ct(() => {
1954
+ St(() => {
1955
1955
  _();
1956
1956
  }, [o]);
1957
1957
  const O = (D) => {
@@ -1966,7 +1966,7 @@ const kt = ({
1966
1966
  if (p && (D = [["id", "in", s]]), r.domain) {
1967
1967
  const C = await H.getHandler().evalDomain({
1968
1968
  domain: r.domain,
1969
- values: kt({
1969
+ values: Mt({
1970
1970
  fields: g == null ? void 0 : g.getFields(),
1971
1971
  values: g.getPlainValues()
1972
1972
  }),
@@ -2040,7 +2040,7 @@ const kt = ({
2040
2040
  }) : /* @__PURE__ */ n(ne, {
2041
2041
  children: /* @__PURE__ */ n("div", {
2042
2042
  className: "flex flex-row",
2043
- children: /* @__PURE__ */ n(xt, {
2043
+ children: /* @__PURE__ */ n(Ct, {
2044
2044
  mode: "multiple",
2045
2045
  value: a.length ? s : [],
2046
2046
  tagRender: V,
@@ -2161,14 +2161,14 @@ const kt = ({
2161
2161
  if (i.push(a), s(l)) {
2162
2162
  const u = r - o;
2163
2163
  for (let c = 0; c < u; c += 1)
2164
- i.push(new Vt({ string: "" }));
2164
+ i.push(new At({ string: "" }));
2165
2165
  }
2166
2166
  }), i;
2167
2167
  }, Wa = ({
2168
2168
  row: e,
2169
2169
  numberOfColumns: t
2170
2170
  }) => e.map((r) => (r._mustExpand && (r.colspan = t), r)), Ua = (e, t) => {
2171
- const r = e.map((i) => i instanceof Vt && i.fieldForLabel || i instanceof ui ? "auto" : "1fr");
2171
+ const r = e.map((i) => i instanceof At && i.fieldForLabel || i instanceof ui ? "auto" : "1fr");
2172
2172
  if (r.length < t) {
2173
2173
  const i = t - r.length;
2174
2174
  for (let o = 0; o < i; o++)
@@ -2204,7 +2204,7 @@ const kt = ({
2204
2204
  row: p,
2205
2205
  numberOfColumns: o,
2206
2206
  mustFillWithEmpties: r
2207
- }), l = l.concat(h)), h.map((g) => (g instanceof Vt && g.fieldForLabel && (a = !0), /* @__PURE__ */ n("div", {
2207
+ }), l = l.concat(h)), h.map((g) => (g instanceof At && g.fieldForLabel && (a = !0), /* @__PURE__ */ n("div", {
2208
2208
  style: {
2209
2209
  ...Ka({
2210
2210
  item: g,
@@ -2371,9 +2371,9 @@ const kt = ({
2371
2371
  setLimit: V,
2372
2372
  searchParams: D = [],
2373
2373
  setSearchValues: E
2374
- } = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B = ue(w || Ht), ee = ue([]), Z = $e((se) => {
2374
+ } = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B = ue(w || Ht), ee = ue([]), Z = Le((se) => {
2375
2375
  g == null || g([...se]), q([...se]);
2376
- }, []), ie = $e(() => y || j, [y, j]), Q = $e(async () => {
2376
+ }, []), ie = Le(() => y || j, [y, j]), Q = Le(async () => {
2377
2377
  const se = await H.getHandler().nameSearch({
2378
2378
  model: t,
2379
2379
  payload: l,
@@ -2382,7 +2382,7 @@ const kt = ({
2382
2382
  context: c
2383
2383
  });
2384
2384
  if (k(se.length), f == null || f(se.length), se.length > 0) {
2385
- const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ve } = Ot(d), je = {};
2385
+ const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ve } = It(d), je = {};
2386
2386
  De && (je.colors = De), Ve && (je.status = Ve);
2387
2387
  const We = await H.getHandler().readEvalUiObjects({
2388
2388
  model: t,
@@ -2393,12 +2393,12 @@ const kt = ({
2393
2393
  attrs: je
2394
2394
  }), te = We[0];
2395
2395
  ee.current = [...te], z(Qt(We[1])), L(gr(We[1]));
2396
- const Fe = te.map((ce) => ce.id), Me = v !== void 0 ? It({
2396
+ const Fe = te.map((ce) => ce.id), Ee = v !== void 0 ? _t({
2397
2397
  resultsToSort: te,
2398
2398
  sorter: v,
2399
2399
  fields: { ...d.fields, ...m.fields }
2400
2400
  }) : [...ee.current];
2401
- Z(Me), Fe.length > 0 ? h == null || h(0) : h == null || h(void 0);
2401
+ Z(Ee), Fe.length > 0 ? h == null || h(0) : h == null || h(void 0);
2402
2402
  } else
2403
2403
  Z([]), h == null || h(void 0);
2404
2404
  C(!1), u.current = !0;
@@ -2414,11 +2414,11 @@ const kt = ({
2414
2414
  v,
2415
2415
  h,
2416
2416
  f
2417
- ]), J = $e(
2417
+ ]), J = Le(
2418
2418
  async (se) => {
2419
- const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status: We } = Ot(d), te = {};
2419
+ const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status: We } = It(d), te = {};
2420
2420
  je && (te.colors = je), We && (te.status = We);
2421
- const { totalItems: Fe, results: Me, attrsEvaluated: ce } = await H.getHandler().searchForTree({
2421
+ const { totalItems: Fe, results: Ee, attrsEvaluated: ce } = await H.getHandler().searchForTree({
2422
2422
  params: Ve,
2423
2423
  limit: B.current,
2424
2424
  offset: De || M,
@@ -2427,9 +2427,9 @@ const kt = ({
2427
2427
  context: c,
2428
2428
  attrs: te
2429
2429
  });
2430
- z(Qt(ce)), L(gr(ce)), ee.current = [...Me];
2431
- const me = v !== void 0 ? It({
2432
- resultsToSort: Me,
2430
+ z(Qt(ce)), L(gr(ce)), ee.current = [...Ee];
2431
+ const me = v !== void 0 ? _t({
2432
+ resultsToSort: Ee,
2433
2433
  sorter: v,
2434
2434
  fields: { ...d.fields, ...m.fields }
2435
2435
  }) : [...ee.current];
@@ -2460,7 +2460,7 @@ const kt = ({
2460
2460
  M,
2461
2461
  D
2462
2462
  ]
2463
- ), fe = $e(
2463
+ ), fe = Le(
2464
2464
  async (se) => {
2465
2465
  try {
2466
2466
  C(!0), a == null || a(!0), l && !u.current ? await Q() : await J(se);
@@ -2491,10 +2491,12 @@ const kt = ({
2491
2491
  v,
2492
2492
  d
2493
2493
  ]
2494
- ), be = $e(
2494
+ ), be = Le(
2495
2495
  (se) => {
2496
+ if (JSON.stringify(se) === JSON.stringify(v))
2497
+ return;
2496
2498
  p == null || p(se);
2497
- const Se = se !== void 0 ? It({
2499
+ const Se = se !== void 0 ? _t({
2498
2500
  resultsToSort: ie(),
2499
2501
  sorter: se,
2500
2502
  fields: { ...d.fields, ...m.fields }
@@ -2502,7 +2504,7 @@ const kt = ({
2502
2504
  Z(Se);
2503
2505
  },
2504
2506
  [p, ie, d, m, Z]
2505
- ), Ee = $e(
2507
+ ), $e = Le(
2506
2508
  (se) => {
2507
2509
  const { params: Se, searchValues: De, limit: Ve, offset: je } = se;
2508
2510
  b || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), x(!0), R(void 0), A(1), Ve && (B.current = Ve, V == null || V(Ve)), je && I(je), fe({
@@ -2523,12 +2525,12 @@ const kt = ({
2523
2525
  I,
2524
2526
  fe
2525
2527
  ]
2526
- ), _e = $e(
2528
+ ), _e = Le(
2527
2529
  (se) => {
2528
2530
  C(!0), A(se), I((se - 1) * w);
2529
2531
  },
2530
2532
  [C, w, I, A]
2531
- ), Be = $e(() => {
2533
+ ), Be = Le(() => {
2532
2534
  b || (r == null || r(void 0), o == null || o([]), E == null || E({}), R(void 0), I(0), A(1), V == null || V(w || Ht));
2533
2535
  }, [
2534
2536
  b,
@@ -2539,7 +2541,7 @@ const kt = ({
2539
2541
  A,
2540
2542
  V,
2541
2543
  w
2542
- ]), ge = $e(
2544
+ ]), ge = Le(
2543
2545
  async (se) => {
2544
2546
  const Se = se[(d == null ? void 0 : d.field_parent) || "child_id"], De = await H.getHandler().readObjects({
2545
2547
  model: t,
@@ -2547,12 +2549,12 @@ const kt = ({
2547
2549
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
2548
2550
  context: c
2549
2551
  });
2550
- return Z([...ie(), ...De]), lo(Ot(d), De);
2552
+ return Z([...ie(), ...De]), lo(It(d), De);
2551
2553
  },
2552
2554
  [d, t, c, ie, Z]
2553
2555
  );
2554
2556
  return {
2555
- submit: Ee,
2557
+ submit: $e,
2556
2558
  clear: Be,
2557
2559
  fetchResults: fe,
2558
2560
  tableRefreshing: b,
@@ -2596,7 +2598,7 @@ const kt = ({
2596
2598
  setSearchTreeNameSearch: E,
2597
2599
  goToResourceId: b,
2598
2600
  limit: C
2599
- } = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [fe, be] = T({}), [Ee, _e] = T(C !== void 0 ? C : Ht), [Be, ge] = T(i);
2601
+ } = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [fe, be] = T({}), [$e, _e] = T(C !== void 0 ? C : Ht), [Be, ge] = T(i);
2600
2602
  pe(() => {
2601
2603
  m && m.length > 0 && !v && (p == null || p(0), f == null || f(m[0].id));
2602
2604
  }, [m]), pe(() => {
@@ -2660,7 +2662,7 @@ const kt = ({
2660
2662
  goToResourceId: b,
2661
2663
  searchValues: fe,
2662
2664
  setSearchValues: be,
2663
- limit: Ee,
2665
+ limit: $e,
2664
2666
  setLimit: _e,
2665
2667
  setTitle: ge
2666
2668
  },
@@ -2695,7 +2697,7 @@ const kt = ({
2695
2697
  },
2696
2698
  children: t
2697
2699
  });
2698
- }, Mt = Je.createContext(null), br = async (e) => {
2700
+ }, Et = Je.createContext(null), br = async (e) => {
2699
2701
  var t;
2700
2702
  for (let r = 0; r < e.length; r++)
2701
2703
  await ((t = e == null ? void 0 : e[r]) == null ? void 0 : t.call(e));
@@ -2708,7 +2710,7 @@ const kt = ({
2708
2710
  } = u || {}, f = ue([]), {
2709
2711
  t: d
2710
2712
  } = Y(we);
2711
- bt(t, () => ({
2713
+ xt(t, () => ({
2712
2714
  openActionModal: w
2713
2715
  }));
2714
2716
  const [m, v] = T(!1), [p, h] = T({
@@ -2735,7 +2737,7 @@ const kt = ({
2735
2737
  ids: I
2736
2738
  } = F || {};
2737
2739
  let N = I || [];
2738
- const k = typeof $ == "string" ? vt({
2740
+ const k = typeof $ == "string" ? wt({
2739
2741
  context: $,
2740
2742
  fields: C,
2741
2743
  values: S
@@ -2765,7 +2767,7 @@ const kt = ({
2765
2767
  id: E
2766
2768
  }), b.state && s.current === !0) {
2767
2769
  s.current = !1, clearInterval(o.current), l(!1);
2768
- const C = await Dt(b.result);
2770
+ const C = await Vt(b.result);
2769
2771
  mn(b.result, C.mime);
2770
2772
  }
2771
2773
  } catch (C) {
@@ -2808,7 +2810,7 @@ const kt = ({
2808
2810
  context: S
2809
2811
  }))[0]);
2810
2812
  const R = {
2811
- ...typeof (x == null ? void 0 : x.context) == "string" ? vt({
2813
+ ...typeof (x == null ? void 0 : x.context) == "string" ? wt({
2812
2814
  context: x.context,
2813
2815
  fields: b,
2814
2816
  values: {
@@ -2821,7 +2823,7 @@ const kt = ({
2821
2823
  let F = [];
2822
2824
  if (x.domain && (F = await H.getHandler().evalDomain({
2823
2825
  domain: x.domain,
2824
- values: kt({
2826
+ values: Mt({
2825
2827
  fields: b,
2826
2828
  values: {
2827
2829
  ...C,
@@ -2920,7 +2922,7 @@ const kt = ({
2920
2922
  });
2921
2923
  }
2922
2924
  return /* @__PURE__ */ n(ne, {
2923
- children: /* @__PURE__ */ n(Mt.Provider, {
2925
+ children: /* @__PURE__ */ n(Et.Provider, {
2924
2926
  value: {
2925
2927
  processAction: O,
2926
2928
  globalValues: i
@@ -2933,7 +2935,7 @@ const kt = ({
2933
2935
  closable: !1,
2934
2936
  centered: !0,
2935
2937
  maskClosable: !1,
2936
- children: /* @__PURE__ */ n(Le, {})
2938
+ children: /* @__PURE__ */ n(Me, {})
2937
2939
  }), /* @__PURE__ */ n(Gt, {
2938
2940
  buttonModal: !0,
2939
2941
  parentContext: p.context,
@@ -3012,7 +3014,7 @@ async function ul({
3012
3014
  initialView: a
3013
3015
  };
3014
3016
  }
3015
- const fl = wt(dl), ml = ({
3017
+ const fl = bt(dl), ml = ({
3016
3018
  error: e,
3017
3019
  className: t
3018
3020
  }) => {
@@ -3065,7 +3067,7 @@ function pl(e, t) {
3065
3067
  t: b,
3066
3068
  lang: C
3067
3069
  } = Y(we), [S, x] = T(!1), [$, R] = T(), [F, A] = T(), [M] = ot.useForm(), [I, N] = T(), [k, j] = T(), q = Y(mo), [W, z] = T(), [U, L] = T(!1), B = ue(), ee = ue({}), Z = ue({}), ie = ue(!1), Q = ue(!1), fe = (E !== void 0 ? E : W) < hl, be = Y(Ne), {
3068
- activeId: Ee,
3070
+ activeId: $e,
3069
3071
  getPlainValues: _e
3070
3072
  } = be || {}, Be = Y(Qe), {
3071
3073
  setFormIsSaving: ge = void 0,
@@ -3075,11 +3077,11 @@ function pl(e, t) {
3075
3077
  setAttachments: Ve = void 0,
3076
3078
  title: je = void 0,
3077
3079
  setTitle: We = void 0
3078
- } = (w ? Be : {}) || {}, te = Y(Mt), {
3080
+ } = (w ? Be : {}) || {}, te = Y(Et), {
3079
3081
  processAction: Fe,
3080
- globalValues: Me
3082
+ globalValues: Ee
3081
3083
  } = te || {};
3082
- bt(t, () => ({
3084
+ xt(t, () => ({
3083
3085
  submitForm: zt,
3084
3086
  getFields: Xe,
3085
3087
  getValues: Ke,
@@ -3152,8 +3154,8 @@ function pl(e, t) {
3152
3154
  id: de(),
3153
3155
  active_id: de(),
3154
3156
  active_ids: [de()],
3155
- parent_id: Ee,
3156
- ...Me
3157
+ parent_id: $e,
3158
+ ...Ee
3157
3159
  };
3158
3160
  }
3159
3161
  const he = async (K) => {
@@ -3173,11 +3175,11 @@ function pl(e, t) {
3173
3175
  fields: k
3174
3176
  })).length !== 0, xe = (K) => {
3175
3177
  const G = M.getFieldsValue(!0);
3176
- return Ft(G, K);
3178
+ return Ot(G, K);
3177
3179
  }, ke = (K, G) => {
3178
3180
  qt({
3179
3181
  values: {
3180
- ...Ft(M.getFieldsValue(!0), k),
3182
+ ...Ot(M.getFieldsValue(!0), k),
3181
3183
  [K]: G
3182
3184
  },
3183
3185
  fields: k,
@@ -3221,7 +3223,7 @@ function pl(e, t) {
3221
3223
  }), O && (G = {
3222
3224
  ...$a(O),
3223
3225
  ...G
3224
- }), ee.current = Ft(G, re), qt({
3226
+ }), ee.current = Ot(G, re), qt({
3225
3227
  values: G,
3226
3228
  fields: re,
3227
3229
  reset: !0,
@@ -3263,7 +3265,7 @@ function pl(e, t) {
3263
3265
  const yt = {
3264
3266
  ...re ? {} : M.getFieldsValue(!0),
3265
3267
  ...K
3266
- }, wn = Ft(yt, G), Xo = Object.keys(G).map((bn) => {
3268
+ }, wn = Ot(yt, G), Xo = Object.keys(G).map((bn) => {
3267
3269
  const Qo = wn[bn] !== void 0 ? wn[bn] : void 0;
3268
3270
  return {
3269
3271
  name: bn,
@@ -3406,7 +3408,7 @@ function pl(e, t) {
3406
3408
  }) && K !== !0)
3407
3409
  return;
3408
3410
  {
3409
- const oe = Ft(M.getFieldsValue(!0), k);
3411
+ const oe = Ot(M.getFieldsValue(!0), k);
3410
3412
  Z.current = oe, u == null || u(oe), se == null || se(!0), Ko(re);
3411
3413
  }
3412
3414
  }
@@ -3502,7 +3504,7 @@ function pl(e, t) {
3502
3504
  ce == null || ce(de(), Ke(), X());
3503
3505
  else if (re.type) {
3504
3506
  let oe = {};
3505
- re.context && (oe = vt({
3507
+ re.context && (oe = wt({
3506
3508
  context: re.context,
3507
3509
  fields: k,
3508
3510
  values: Ke()
@@ -3601,7 +3603,7 @@ function pl(e, t) {
3601
3603
  Ue(oe);
3602
3604
  }
3603
3605
  }
3604
- const Jo = () => !F && !$ ? /* @__PURE__ */ n(Le, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(ne, {
3606
+ const Jo = () => !F && !$ ? /* @__PURE__ */ n(Me, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(ne, {
3605
3607
  children: /* @__PURE__ */ n(ts, {
3606
3608
  getValues: Ke,
3607
3609
  getPlainValues: at,
@@ -3645,7 +3647,7 @@ function pl(e, t) {
3645
3647
  }), /* @__PURE__ */ n(Ie, {
3646
3648
  disabled: S || f,
3647
3649
  loading: S,
3648
- icon: /* @__PURE__ */ n(Rt, {}),
3650
+ icon: /* @__PURE__ */ n(kt, {}),
3649
3651
  onClick: async () => {
3650
3652
  await zt();
3651
3653
  },
@@ -3673,7 +3675,7 @@ function pl(e, t) {
3673
3675
  })
3674
3676
  }) : null;
3675
3677
  }
3676
- const Ut = wt(pl), Gt = (e) => {
3678
+ const Ut = bt(pl), Gt = (e) => {
3677
3679
  const {
3678
3680
  visible: t,
3679
3681
  id: r,
@@ -3793,7 +3795,7 @@ const Ut = wt(pl), Gt = (e) => {
3793
3795
  })];
3794
3796
  return /* @__PURE__ */ P(ne, {
3795
3797
  children: [r && /* @__PURE__ */ n(un, {
3796
- ooui: new Vt({
3798
+ ooui: new At({
3797
3799
  name: o + "_label",
3798
3800
  string: i,
3799
3801
  help: t.tooltip,
@@ -3918,7 +3920,7 @@ function bl(e) {
3918
3920
  });
3919
3921
  return /* @__PURE__ */ P(ne, {
3920
3922
  children: [r && /* @__PURE__ */ n(un, {
3921
- ooui: new Vt({
3923
+ ooui: new At({
3922
3924
  name: i + "_label",
3923
3925
  string: o,
3924
3926
  help: s,
@@ -3948,7 +3950,7 @@ const {
3948
3950
  defaultSeed: Cl
3949
3951
  } = Pe, Sl = xl(Cl), {
3950
3952
  Option: Tl
3951
- } = xt, Fl = (e) => {
3953
+ } = Ct, Fl = (e) => {
3952
3954
  const {
3953
3955
  ooui: t
3954
3956
  } = e, {
@@ -3980,7 +3982,7 @@ const {
3980
3982
  value: v,
3981
3983
  children: v
3982
3984
  }, m);
3983
- }), c = a && !s ? Il : xt;
3985
+ }), c = a && !s ? Il : Ct;
3984
3986
  function f(d) {
3985
3987
  const m = d.map((v) => {
3986
3988
  const p = l.find(([h, g]) => v === g);
@@ -4000,7 +4002,7 @@ const {
4000
4002
  showArrow: !0,
4001
4003
  children: u
4002
4004
  });
4003
- }, Il = Kt(xt)`
4005
+ }, Il = Kt(Ct)`
4004
4006
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
4005
4007
  background-color: ${Sl.colorPrimaryBg};
4006
4008
  }
@@ -4079,7 +4081,7 @@ function Dl(e) {
4079
4081
  onClick: t,
4080
4082
  children: [r ? /* @__PURE__ */ n(hi, {
4081
4083
  className: "pr-1"
4082
- }) : /* @__PURE__ */ n(At, {
4084
+ }) : /* @__PURE__ */ n(Rt, {
4083
4085
  className: "pr-1"
4084
4086
  }), s(r ? "simple_search" : "advanced_search")]
4085
4087
  })
@@ -4172,7 +4174,7 @@ function go(e) {
4172
4174
  }, M))
4173
4175
  }, F));
4174
4176
  };
4175
- Ct(() => {
4177
+ St(() => {
4176
4178
  w(!1), V.current = new fi(r, t, p), V.current.parse(), g(V.current._simpleSearchContainer), O(V.current._advancedSearchContainer);
4177
4179
  }, [t, r]);
4178
4180
  const C = b(), S = (x) => {
@@ -4370,7 +4372,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4370
4372
  t: p
4371
4373
  } = Y(we), h = Y(st), {
4372
4374
  openRelate: g
4373
- } = h || {}, y = Y(Mt), {
4375
+ } = h || {}, y = Y(Et), {
4374
4376
  processAction: O
4375
4377
  } = y || {};
4376
4378
  if (!t)
@@ -4394,7 +4396,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4394
4396
  context: i
4395
4397
  }))[0];
4396
4398
  v({
4397
- ...Ft(R, x),
4399
+ ...Ot(R, x),
4398
4400
  active_id: t
4399
4401
  }), c(!1);
4400
4402
  } catch (S) {
@@ -4410,7 +4412,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4410
4412
  style: {
4411
4413
  padding: 15
4412
4414
  },
4413
- children: /* @__PURE__ */ n(Le, {})
4415
+ children: /* @__PURE__ */ n(Me, {})
4414
4416
  })
4415
4417
  });
4416
4418
  if (!f || !f.toolbar)
@@ -4521,7 +4523,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4521
4523
  value: t,
4522
4524
  context: r,
4523
4525
  selectionValues: i
4524
- } = e, [o, s] = T(), [a, l] = T(!1), [u, c] = t ? t.split(",") : [], f = parseInt(c), d = $e(async () => {
4526
+ } = e, [o, s] = T(), [a, l] = T(!1), [u, c] = t ? t.split(",") : [], f = parseInt(c), d = Le(async () => {
4525
4527
  if (!t || t && o)
4526
4528
  return;
4527
4529
  l(!0);
@@ -5053,7 +5055,7 @@ function pn(e) {
5053
5055
  setTitle: A = void 0
5054
5056
  } = (O ? R : {}) || {};
5055
5057
  pe(() => {
5056
- S.current = Ot(o);
5058
+ S.current = It(o);
5057
5059
  const z = Fa(S.current, {
5058
5060
  boolean: Yl,
5059
5061
  many2one: Wl,
@@ -5078,7 +5080,7 @@ function pn(e) {
5078
5080
  const z = lo(S.current, s);
5079
5081
  D(z), $.current = r;
5080
5082
  }, [s]);
5081
- const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Le, {
5083
+ const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Me, {
5082
5084
  className: "pb-4"
5083
5085
  }) : /* @__PURE__ */ P(Ce, {
5084
5086
  align: "bottom",
@@ -5121,17 +5123,19 @@ function pn(e) {
5121
5123
  const U = S.current;
5122
5124
  d && U.columns.some((L) => L.sum !== void 0) && (W = d - 30);
5123
5125
  }
5124
- return S.current === null ? /* @__PURE__ */ n(Le, {
5126
+ return S.current === null ? /* @__PURE__ */ n(Me, {
5125
5127
  style: {
5126
5128
  padding: "2rem"
5127
5129
  }
5128
5130
  }) : /* @__PURE__ */ P("div", {
5129
- children: [k(), /* @__PURE__ */ n(Ri, {
5131
+ children: [k(), l && /* @__PURE__ */ n(Me, {
5132
+ className: "pb-4"
5133
+ }), /* @__PURE__ */ n(Ri, {
5130
5134
  height: W,
5131
5135
  columns: q.columns,
5132
5136
  dataSource: V,
5133
- loading: l,
5134
- loadingComponent: /* @__PURE__ */ n(Le, {}),
5137
+ loading: !1,
5138
+ loadingComponent: /* @__PURE__ */ n(Me, {}),
5135
5139
  onRowStyle: (z) => {
5136
5140
  if (m[z.id])
5137
5141
  return {
@@ -5174,7 +5178,7 @@ function nc(e, t) {
5174
5178
  onChangeSelectedRowKeys: m
5175
5179
  } = e, [v, p] = T(!1), [h, g] = T(!1), y = ue(!1), [O, _] = T(), [w, V] = T(), [D, E] = T(), [b, C] = T(), [S, x] = T(200), $ = ue(), {
5176
5180
  height: R
5177
- } = fn(), F = Y(Mt), {
5181
+ } = fn(), F = Y(Et), {
5178
5182
  processAction: A
5179
5183
  } = F || {}, M = Y(Qe), {
5180
5184
  setResults: I = void 0,
@@ -5194,7 +5198,7 @@ function nc(e, t) {
5194
5198
  setTreeIsLoading: J = void 0,
5195
5199
  searchValues: fe = {},
5196
5200
  setSearchValues: be = void 0,
5197
- limit: Ee = Ht,
5201
+ limit: $e = Ht,
5198
5202
  setLimit: _e = void 0
5199
5203
  } = (f ? M : {}) || {}, {
5200
5204
  submit: Be,
@@ -5207,7 +5211,7 @@ function nc(e, t) {
5207
5211
  offset: We,
5208
5212
  getResults: te,
5209
5213
  requestPageChange: Fe,
5210
- changeSort: Me,
5214
+ changeSort: Ee,
5211
5215
  fetchChildrenForRecord: ce,
5212
5216
  colorsForResults: me,
5213
5217
  statusForResults: Te,
@@ -5234,10 +5238,10 @@ function nc(e, t) {
5234
5238
  domain: u,
5235
5239
  currentId: k,
5236
5240
  setActionViewTotalItems: ie,
5237
- limit: Ee,
5241
+ limit: $e,
5238
5242
  setLimit: _e
5239
5243
  });
5240
- bt(t, () => ({
5244
+ xt(t, () => ({
5241
5245
  refreshResults: () => {
5242
5246
  y.current = !1, se();
5243
5247
  },
@@ -5251,9 +5255,9 @@ function nc(e, t) {
5251
5255
  try {
5252
5256
  await Ke(), g(!0);
5253
5257
  } catch (ke) {
5254
- C(ke);
5258
+ C(ke), J == null || J(!1);
5255
5259
  } finally {
5256
- p(!1), J == null || J(!1);
5260
+ p(!1);
5257
5261
  }
5258
5262
  }, Ke = async () => {
5259
5263
  _(r);
@@ -5329,7 +5333,7 @@ function nc(e, t) {
5329
5333
  searchFields: uo([D.search_fields, w.search_fields]),
5330
5334
  formXml: D.arch,
5331
5335
  onClear: ge,
5332
- limit: Ee,
5336
+ limit: $e,
5333
5337
  offset: We,
5334
5338
  isSearching: De,
5335
5339
  onSubmit: Be,
@@ -5341,7 +5345,7 @@ function nc(e, t) {
5341
5345
  }), /* @__PURE__ */ n(pn, {
5342
5346
  context: d,
5343
5347
  total: de,
5344
- limit: Ee,
5348
+ limit: $e,
5345
5349
  page: je,
5346
5350
  treeView: w,
5347
5351
  results: te(),
@@ -5356,7 +5360,7 @@ function nc(e, t) {
5356
5360
  onChange: Ae
5357
5361
  },
5358
5362
  sorter: ee,
5359
- onChangeSort: Me,
5363
+ onChangeSort: Ee,
5360
5364
  onFetchChildrenForRecord: w.isExpandable ? ce : void 0,
5361
5365
  childField: w.field_parent,
5362
5366
  rootTree: f
@@ -5371,10 +5375,10 @@ function nc(e, t) {
5371
5375
  style: c ? {} : {
5372
5376
  display: "none"
5373
5377
  },
5374
- children: v ? /* @__PURE__ */ n(Le, {}) : ye()
5378
+ children: v ? /* @__PURE__ */ n(Me, {}) : ye()
5375
5379
  });
5376
5380
  }
5377
- const To = wt(nc), Fo = (e) => {
5381
+ const To = bt(nc), Fo = (e) => {
5378
5382
  const {
5379
5383
  visible: t,
5380
5384
  onCloseModal: r,
@@ -5424,7 +5428,7 @@ const To = wt(nc), Fo = (e) => {
5424
5428
  },
5425
5429
  children: m("new")
5426
5430
  }), /* @__PURE__ */ n(Ie, {
5427
- icon: /* @__PURE__ */ n(Rt, {}),
5431
+ icon: /* @__PURE__ */ n(kt, {}),
5428
5432
  onClick: () => {
5429
5433
  y();
5430
5434
  },
@@ -5590,7 +5594,7 @@ const To = wt(nc), Fo = (e) => {
5590
5594
  async function z() {
5591
5595
  c && (R.current = await H.getHandler().evalDomain({
5592
5596
  domain: c,
5593
- values: kt({
5597
+ values: Mt({
5594
5598
  fields: S(),
5595
5599
  values: C()
5596
5600
  }),
@@ -6140,7 +6144,7 @@ const {
6140
6144
  uninformedString: a,
6141
6145
  manualIds: l
6142
6146
  } = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), [p, h] = T(), [g, y] = T("line");
6143
- return Ct(() => {
6147
+ return St(() => {
6144
6148
  (async () => {
6145
6149
  c(!0), d(void 0);
6146
6150
  const O = Ln(o);
@@ -6281,7 +6285,7 @@ const xc = {
6281
6285
  banner: !0
6282
6286
  });
6283
6287
  if (c)
6284
- return /* @__PURE__ */ n(Le, {});
6288
+ return /* @__PURE__ */ n(Me, {});
6285
6289
  if (!f)
6286
6290
  return /* @__PURE__ */ n(Ze, {
6287
6291
  message: "No data to display",
@@ -6336,7 +6340,7 @@ const Tc = (e, t) => {
6336
6340
  } = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), p = Y(Qe), {
6337
6341
  setGraphIsLoading: h = void 0
6338
6342
  } = p || {};
6339
- bt(t, () => ({
6343
+ xt(t, () => ({
6340
6344
  refresh: () => {
6341
6345
  g();
6342
6346
  }
@@ -6416,7 +6420,7 @@ const Tc = (e, t) => {
6416
6420
  children: `Graph ${f.type} not implemented`
6417
6421
  });
6418
6422
  }
6419
- }, gn = wt(Tc), {
6423
+ }, gn = bt(Tc), {
6420
6424
  confirm: Fc
6421
6425
  } = Ge, Oc = ({
6422
6426
  onOk: e,
@@ -6590,8 +6594,8 @@ const kc = (e) => {
6590
6594
  }
6591
6595
  fe();
6592
6596
  }, [s, a]);
6593
- const fe = $e(() => {
6594
- (a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && Ee();
6597
+ const fe = Le(() => {
6598
+ (a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && $e();
6595
6599
  }, [s, a]);
6596
6600
  pe(() => {
6597
6601
  Be();
@@ -6602,7 +6606,7 @@ const kc = (e) => {
6602
6606
  fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((Ae = o.get("tree")) == null ? void 0 : Ae.fields),
6603
6607
  items: Rc(X)
6604
6608
  });
6605
- }, Ee = async () => {
6609
+ }, $e = async () => {
6606
6610
  await _e(), u > Q.length - 1 && u !== 0 && c(0);
6607
6611
  }, _e = async (X) => {
6608
6612
  var ae, Ae, he;
@@ -6634,7 +6638,7 @@ const kc = (e) => {
6634
6638
  async function Be() {
6635
6639
  ee && (N.current = await H.getHandler().evalDomain({
6636
6640
  domain: ee,
6637
- values: kt({
6641
+ values: Mt({
6638
6642
  fields: m(),
6639
6643
  values: v()
6640
6644
  }),
@@ -6695,7 +6699,7 @@ const kc = (e) => {
6695
6699
  _c({
6696
6700
  lang: g,
6697
6701
  onOk: () => {
6698
- a === "form" ? Fe() : Me();
6702
+ a === "form" ? Fe() : Ee();
6699
6703
  }
6700
6704
  });
6701
6705
  return;
@@ -6703,7 +6707,7 @@ const kc = (e) => {
6703
6707
  Oc({
6704
6708
  lang: g,
6705
6709
  onOk: () => {
6706
- a === "form" ? Fe() : Me();
6710
+ a === "form" ? Fe() : Ee();
6707
6711
  }
6708
6712
  });
6709
6713
  }, We = async () => {
@@ -6739,7 +6743,7 @@ const kc = (e) => {
6739
6743
  E(X);
6740
6744
  }
6741
6745
  c(0), V(!1);
6742
- }, Me = async () => {
6746
+ }, Ee = async () => {
6743
6747
  const X = Q.filter((ae) => F.includes(ae.id));
6744
6748
  V(!0), _(!1), E(void 0);
6745
6749
  try {
@@ -6839,7 +6843,7 @@ const kc = (e) => {
6839
6843
  const Xe = () => {
6840
6844
  var ae, Ae, he, ye;
6841
6845
  if (a === "form")
6842
- return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(Ut, {
6846
+ return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(Ut, {
6843
6847
  formView: o.get("form"),
6844
6848
  values: (ae = Q[u]) == null ? void 0 : ae.values,
6845
6849
  parentContext: {
@@ -6868,7 +6872,7 @@ const kc = (e) => {
6868
6872
  readOnly: U
6869
6873
  });
6870
6874
  let X = [];
6871
- if (Q.some((xe) => xe.treeValues) && (X = k ? It({
6875
+ if (Q.some((xe) => xe.treeValues) && (X = k ? _t({
6872
6876
  resultsToSort: Q.map((xe) => xe.treeValues),
6873
6877
  sorter: k,
6874
6878
  fields: {
@@ -6919,7 +6923,7 @@ const kc = (e) => {
6919
6923
  banner: !0
6920
6924
  });
6921
6925
  const Ke = M;
6922
- return w ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
6926
+ return w ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
6923
6927
  children: [/* @__PURE__ */ n(Vc, {
6924
6928
  mode: a,
6925
6929
  title: de(),
@@ -6985,7 +6989,7 @@ const kc = (e) => {
6985
6989
  const [u, c] = T(!0), [f, d] = T(), [m, v] = T(/* @__PURE__ */ new Map()), p = Y(Ne), {
6986
6990
  getContext: h
6987
6991
  } = p || {};
6988
- Ct(() => {
6992
+ St(() => {
6989
6993
  y();
6990
6994
  }, [t]);
6991
6995
  const g = async (_) => o && o[_] ? o[_] : await H.getHandler().getView({
@@ -7014,7 +7018,7 @@ const kc = (e) => {
7014
7018
  c(!1);
7015
7019
  }
7016
7020
  };
7017
- return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(Le, {}) : f ? /* @__PURE__ */ n(Ze, {
7021
+ return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(Me, {}) : f ? /* @__PURE__ */ n(Ze, {
7018
7022
  className: "mt-10",
7019
7023
  message: f,
7020
7024
  type: "error",
@@ -7290,7 +7294,7 @@ const {
7290
7294
  limit: s,
7291
7295
  onClose: a
7292
7296
  }) => {
7293
- const l = ue({}), u = ue(/* @__PURE__ */ new Map()), c = $e(
7297
+ const l = ue({}), u = ue(/* @__PURE__ */ new Map()), c = Le(
7294
7298
  async (g) => {
7295
7299
  if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
7296
7300
  ct(Oe("selectAtLeastOneField", r));
@@ -7312,18 +7316,18 @@ const {
7312
7316
  format: g.exportType
7313
7317
  });
7314
7318
  a(), await new Promise((w) => setTimeout(w, 200));
7315
- const _ = await Dt(O);
7319
+ const _ = await Vt(O);
7316
7320
  mn(O, _.mime);
7317
7321
  },
7318
7322
  [r, e, o, s, t, a]
7319
- ), f = $e(async () => {
7323
+ ), f = Le(async () => {
7320
7324
  const g = await H.getHandler().getFields({
7321
7325
  model: e,
7322
7326
  context: t,
7323
7327
  fields: []
7324
7328
  });
7325
7329
  return l.current["/"] = g, Ir({ fields: g });
7326
- }, [e, t, l]), d = $e(
7330
+ }, [e, t, l]), d = Le(
7327
7331
  async (g) => {
7328
7332
  const O = kn(g, l.current)[Rn(g)], _ = O.relation, w = await H.getHandler().getFields({
7329
7333
  model: _,
@@ -7341,7 +7345,7 @@ const {
7341
7345
  });
7342
7346
  },
7343
7347
  [l.current, e, t]
7344
- ), m = $e(async () => {
7348
+ ), m = Le(async () => {
7345
7349
  const g = await Gc({ model: e, context: t }), y = await zc({
7346
7350
  predefinedExports: g,
7347
7351
  fields: l.current,
@@ -7360,7 +7364,7 @@ const {
7360
7364
  })),
7361
7365
  keysWithChilds: y
7362
7366
  };
7363
- }, [l.current]), v = $e(
7367
+ }, [l.current]), v = Le(
7364
7368
  async (g) => {
7365
7369
  const y = await h("ir.exports"), O = await h("ir.exports.line"), _ = await H.getHandler().create({
7366
7370
  model: "ir.exports",
@@ -7384,7 +7388,7 @@ const {
7384
7388
  ), { ...g, id: _ };
7385
7389
  },
7386
7390
  []
7387
- ), p = $e(
7391
+ ), p = Le(
7388
7392
  async (g) => {
7389
7393
  await H.getHandler().delete({
7390
7394
  model: "ir.exports",
@@ -7392,7 +7396,7 @@ const {
7392
7396
  });
7393
7397
  },
7394
7398
  []
7395
- ), h = $e(
7399
+ ), h = Le(
7396
7400
  async (g) => {
7397
7401
  if (u.current.has(g))
7398
7402
  return u.current.get(g);
@@ -7680,8 +7684,8 @@ var Ro = { exports: {} };
7680
7684
  return new Date((I === "X" ? 1e3 : 1) * M);
7681
7685
  var k = p(I)(M), j = k.year, q = k.month, W = k.day, z = k.hours, U = k.minutes, L = k.seconds, B = k.milliseconds, ee = k.zone, Z = new Date(), ie = W || (j || q ? 1 : Z.getDate()), Q = j || Z.getFullYear(), J = 0;
7682
7686
  j && !q || (J = q > 0 ? q - 1 : Z.getMonth());
7683
- var fe = z || 0, be = U || 0, Ee = L || 0, _e = B || 0;
7684
- return ee ? new Date(Date.UTC(Q, J, ie, fe, be, Ee, _e + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Q, J, ie, fe, be, Ee, _e)) : new Date(Q, J, ie, fe, be, Ee, _e);
7687
+ var fe = z || 0, be = U || 0, $e = L || 0, _e = B || 0;
7688
+ return ee ? new Date(Date.UTC(Q, J, ie, fe, be, $e, _e + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Q, J, ie, fe, be, $e, _e)) : new Date(Q, J, ie, fe, be, $e, _e);
7685
7689
  } catch {
7686
7690
  return new Date("");
7687
7691
  }
@@ -7825,11 +7829,11 @@ const nd = (e) => {
7825
7829
  i == null || i(_);
7826
7830
  };
7827
7831
  async function h() {
7828
- const _ = await Dt(r), w = `data:${_ == null ? void 0 : _.mime};base64,${r}`, V = document.createElement("a"), D = d(a), E = d("name");
7832
+ const _ = await Vt(r), w = `data:${_ == null ? void 0 : _.mime};base64,${r}`, V = document.createElement("a"), D = d(a), E = d("name");
7829
7833
  V.href = w, V.download = D || E, V.click();
7830
7834
  }
7831
7835
  async function g() {
7832
- const _ = await Dt(r);
7836
+ const _ = await Vt(r);
7833
7837
  mn(r, _.mime);
7834
7838
  }
7835
7839
  async function y(_) {
@@ -7927,7 +7931,7 @@ function Zn(e) {
7927
7931
  children: v.type.charAt(0).toUpperCase() + v.type.slice(1)
7928
7932
  }), /* @__PURE__ */ n(le, {
7929
7933
  flex: "none",
7930
- children: /* @__PURE__ */ n(Rt, {
7934
+ children: /* @__PURE__ */ n(kt, {
7931
7935
  style: {
7932
7936
  opacity: t.view_id === v.view_id ? 1 : 0
7933
7937
  }
@@ -7988,7 +7992,7 @@ function Zn(e) {
7988
7992
  borderTopLeftRadius: 0,
7989
7993
  borderBottomLeftRadius: 0
7990
7994
  },
7991
- icon: /* @__PURE__ */ n(At, {
7995
+ icon: /* @__PURE__ */ n(Rt, {
7992
7996
  style: {
7993
7997
  fontSize: "0.5em"
7994
7998
  }
@@ -7998,7 +8002,7 @@ function Zn(e) {
7998
8002
  })]
7999
8003
  });
8000
8004
  }
8001
- function _t(e) {
8005
+ function Dt(e) {
8002
8006
  const {
8003
8007
  icon: t,
8004
8008
  tooltip: r,
@@ -8027,7 +8031,7 @@ function _t(e) {
8027
8031
  overlay: l(),
8028
8032
  disabled: a || !i || i.length === 0,
8029
8033
  children: /* @__PURE__ */ P(Ie, {
8030
- children: [t, " ", s, " ", /* @__PURE__ */ n(At, {})]
8034
+ children: [t, " ", s, " ", /* @__PURE__ */ n(Rt, {})]
8031
8035
  })
8032
8036
  });
8033
8037
  }
@@ -8119,7 +8123,7 @@ const ud = (e) => {
8119
8123
  lang: o
8120
8124
  } = Y(we), [s, a] = T(!1), l = /* @__PURE__ */ P(Ie, {
8121
8125
  disabled: r,
8122
- children: [/* @__PURE__ */ n(Ur, {}), `(${t})`, /* @__PURE__ */ n(At, {
8126
+ children: [/* @__PURE__ */ n(Ur, {}), `(${t})`, /* @__PURE__ */ n(Rt, {
8123
8127
  style: {
8124
8128
  fontSize: 12
8125
8129
  }
@@ -8143,7 +8147,7 @@ const ud = (e) => {
8143
8147
  onOpenAttachmentDetail: l,
8144
8148
  onListAllAttachments: u
8145
8149
  } = e;
8146
- return o ? /* @__PURE__ */ n(Le, {
8150
+ return o ? /* @__PURE__ */ n(Me, {
8147
8151
  style: {
8148
8152
  padding: 20
8149
8153
  }
@@ -8231,7 +8235,7 @@ function md(e) {
8231
8235
  formRef: a
8232
8236
  } = Y(Qe), [l, u] = T(!1), [c, f] = T([]), [d, m] = T(!1), {
8233
8237
  t: v
8234
- } = Y(we), p = $e(async () => {
8238
+ } = Y(we), p = Le(async () => {
8235
8239
  u(!0);
8236
8240
  try {
8237
8241
  const y = await H.getHandler().readObjects({
@@ -8250,7 +8254,7 @@ function md(e) {
8250
8254
  Ue(y);
8251
8255
  }
8252
8256
  u(!1);
8253
- }, t), h = $e(async (y) => {
8257
+ }, t), h = Le(async (y) => {
8254
8258
  if (y.link) {
8255
8259
  window.open(y.link);
8256
8260
  return;
@@ -8268,11 +8272,11 @@ function md(e) {
8268
8272
  }
8269
8273
  if (m(!1), !!O)
8270
8274
  if (O.datas) {
8271
- const _ = await Dt(O.datas);
8275
+ const _ = await Vt(O.datas);
8272
8276
  mn(O.datas, _.mime);
8273
8277
  } else
8274
8278
  s(O);
8275
- }, []), g = $e(async (y) => {
8279
+ }, []), g = Le(async (y) => {
8276
8280
  s(y);
8277
8281
  }, []);
8278
8282
  return pe(() => {
@@ -8294,7 +8298,7 @@ function md(e) {
8294
8298
  closable: !1,
8295
8299
  centered: !0,
8296
8300
  maskClosable: !1,
8297
- children: /* @__PURE__ */ n(Le, {})
8301
+ children: /* @__PURE__ */ n(Me, {})
8298
8302
  })]
8299
8303
  });
8300
8304
  }
@@ -8329,7 +8333,7 @@ function hd({
8329
8333
  } = Y(Qe), {
8330
8334
  t: C,
8331
8335
  lang: S
8332
- } = Y(we), x = Y(Mt), {
8336
+ } = Y(we), x = Y(Et), {
8333
8337
  processAction: $
8334
8338
  } = x || {}, R = Y(st), {
8335
8339
  openRelate: F,
@@ -8420,7 +8424,7 @@ function hd({
8420
8424
  return r ? /* @__PURE__ */ P(Ye, {
8421
8425
  wrap: !0,
8422
8426
  children: [O && /* @__PURE__ */ P(ne, {
8423
- children: [/* @__PURE__ */ n(Le, {}), St(), St()]
8427
+ children: [/* @__PURE__ */ n(Me, {}), Tt(), Tt()]
8424
8428
  }), /* @__PURE__ */ n(ko, {
8425
8429
  disabled: a || O || p || h
8426
8430
  }), /* @__PURE__ */ n(qe, {
@@ -8441,7 +8445,7 @@ function hd({
8441
8445
  disabled: a || l === void 0 || p || h || O,
8442
8446
  loading: p,
8443
8447
  onClick: j
8444
- }), St(), /* @__PURE__ */ n(qe, {
8448
+ }), Tt(), /* @__PURE__ */ n(qe, {
8445
8449
  icon: /* @__PURE__ */ n(Gr, {}),
8446
8450
  tooltip: C("showLogs"),
8447
8451
  disabled: a || l === void 0 || p || h || O,
@@ -8459,7 +8463,7 @@ function hd({
8459
8463
  w.current.fetchValues();
8460
8464
  });
8461
8465
  }
8462
- }), St(), /* @__PURE__ */ n(Zn, {
8466
+ }), Tt(), /* @__PURE__ */ n(Zn, {
8463
8467
  currentView: r,
8464
8468
  previousView: D,
8465
8469
  availableViews: t,
@@ -8468,7 +8472,7 @@ function hd({
8468
8472
  },
8469
8473
  disabled: z,
8470
8474
  formHasChanges: s
8471
- }), St(), /* @__PURE__ */ P(Ye, {
8475
+ }), Tt(), /* @__PURE__ */ P(Ye, {
8472
8476
  children: [/* @__PURE__ */ n(qe, {
8473
8477
  icon: /* @__PURE__ */ n(Yr, {}),
8474
8478
  tooltip: C("previous"),
@@ -8486,17 +8490,17 @@ function hd({
8486
8490
  I(N);
8487
8491
  }
8488
8492
  })]
8489
- }), St(), /* @__PURE__ */ n(_t, {
8493
+ }), Tt(), /* @__PURE__ */ n(Dt, {
8490
8494
  icon: /* @__PURE__ */ n(jn, {}),
8491
8495
  disabled: z,
8492
8496
  tooltip: C("actions"),
8493
8497
  items: e == null ? void 0 : e.action,
8494
8498
  onItemClick: async (L) => {
8495
- !L || !(await Tt({
8499
+ !L || !(await Ft({
8496
8500
  onFormSave: o
8497
8501
  })).succeed || U(L);
8498
8502
  }
8499
- }), /* @__PURE__ */ n(_t, {
8503
+ }), /* @__PURE__ */ n(Dt, {
8500
8504
  icon: /* @__PURE__ */ n(Kn, {}),
8501
8505
  disabled: z,
8502
8506
  tooltip: C("reports"),
@@ -8504,7 +8508,7 @@ function hd({
8504
8508
  onItemClick: async (L) => {
8505
8509
  if (!L)
8506
8510
  return;
8507
- const B = await Tt({
8511
+ const B = await Ft({
8508
8512
  onFormSave: o
8509
8513
  });
8510
8514
  !B.succeed || U({
@@ -8515,13 +8519,13 @@ function hd({
8515
8519
  }
8516
8520
  });
8517
8521
  }
8518
- }), /* @__PURE__ */ n(_t, {
8522
+ }), /* @__PURE__ */ n(Dt, {
8519
8523
  icon: /* @__PURE__ */ n(Kr, {}),
8520
8524
  disabled: z,
8521
8525
  tooltip: C("related"),
8522
8526
  items: e == null ? void 0 : e.relate,
8523
8527
  onItemClick: async (L) => {
8524
- !L || !(await Tt({
8528
+ !L || !(await Ft({
8525
8529
  onFormSave: o
8526
8530
  })).succeed || F({
8527
8531
  relateData: L,
@@ -8535,7 +8539,7 @@ function hd({
8535
8539
  disabled: z,
8536
8540
  attachments: _,
8537
8541
  onAddNewAttachment: async () => {
8538
- const L = await Tt({
8542
+ const L = await Ft({
8539
8543
  onFormSave: o
8540
8544
  });
8541
8545
  if (!L.succeed)
@@ -8554,7 +8558,7 @@ function hd({
8554
8558
  });
8555
8559
  },
8556
8560
  onListAllAttachments: async () => {
8557
- const L = await Tt({
8561
+ const L = await Ft({
8558
8562
  onFormSave: o
8559
8563
  });
8560
8564
  if (!L.succeed)
@@ -8567,7 +8571,7 @@ function hd({
8567
8571
  });
8568
8572
  },
8569
8573
  onViewAttachmentDetails: async (L) => {
8570
- !(await Tt({
8574
+ !(await Ft({
8571
8575
  onFormSave: o
8572
8576
  })).succeed || A({
8573
8577
  model: "ir.attachment",
@@ -8578,12 +8582,12 @@ function hd({
8578
8582
  })]
8579
8583
  }) : null;
8580
8584
  }
8581
- function St() {
8585
+ function Tt() {
8582
8586
  return /* @__PURE__ */ n("div", {
8583
8587
  className: "inline-block w-2"
8584
8588
  });
8585
8589
  }
8586
- async function Tt({
8590
+ async function Ft({
8587
8591
  onFormSave: e
8588
8592
  }) {
8589
8593
  const t = await (e == null ? void 0 : e());
@@ -8628,7 +8632,7 @@ const {
8628
8632
  children: [l ? null : /* @__PURE__ */ n(le, {
8629
8633
  flex: "32px",
8630
8634
  children: v ? /* @__PURE__ */ n(Ie, {
8631
- icon: /* @__PURE__ */ n(Rt, {}),
8635
+ icon: /* @__PURE__ */ n(kt, {}),
8632
8636
  onClick: () => {
8633
8637
  o(r) && (p(!1), g(!1));
8634
8638
  },
@@ -8755,7 +8759,7 @@ const {
8755
8759
  style: {
8756
8760
  marginLeft: 15
8757
8761
  },
8758
- icon: /* @__PURE__ */ n(Rt, {}),
8762
+ icon: /* @__PURE__ */ n(kt, {}),
8759
8763
  htmlType: "submit",
8760
8764
  type: "primary",
8761
8765
  disabled: o,
@@ -9046,7 +9050,7 @@ const Sd = (e) => {
9046
9050
  searchVisible: g,
9047
9051
  searchValues: S,
9048
9052
  showLimitOptions: !1
9049
- }), k ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(gn, {
9053
+ }), k ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(gn, {
9050
9054
  ref: u,
9051
9055
  view_id: t.view_id,
9052
9056
  model: i,
@@ -9197,7 +9201,7 @@ function Id(e) {
9197
9201
  } = Y(Od), {
9198
9202
  t: $,
9199
9203
  lang: R
9200
- } = Y(we), F = Y(Mt), {
9204
+ } = Y(we), F = Y(Et), {
9201
9205
  processAction: A
9202
9206
  } = F || {}, [M, I] = T(!1), N = y !== void 0 && y.trim().length > 0;
9203
9207
  function k() {
@@ -9261,7 +9265,9 @@ function Id(e) {
9261
9265
  }
9262
9266
  return /* @__PURE__ */ P(Ye, {
9263
9267
  wrap: !0,
9264
- children: [C ? null : /* @__PURE__ */ P(ne, {
9268
+ children: [O && /* @__PURE__ */ P(ne, {
9269
+ children: [/* @__PURE__ */ n(Me, {}), vt(), vt()]
9270
+ }), C ? null : /* @__PURE__ */ P(ne, {
9265
9271
  children: [/* @__PURE__ */ n(Fd, {
9266
9272
  disabled: l || a || O,
9267
9273
  searchText: y,
@@ -9281,7 +9287,7 @@ function Id(e) {
9281
9287
  },
9282
9288
  disabled: l || a || O,
9283
9289
  badgeNumber: v == null ? void 0 : v.length
9284
- }), $t(), /* @__PURE__ */ n(ko, {
9290
+ }), vt(), /* @__PURE__ */ n(ko, {
9285
9291
  disabled: O
9286
9292
  }), /* @__PURE__ */ n(qe, {
9287
9293
  icon: /* @__PURE__ */ n(Un, {}),
@@ -9295,7 +9301,7 @@ function Id(e) {
9295
9301
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9296
9302
  loading: a,
9297
9303
  onClick: k
9298
- }), $t()]
9304
+ }), vt()]
9299
9305
  }), /* @__PURE__ */ n(qe, {
9300
9306
  icon: /* @__PURE__ */ n(Gr, {}),
9301
9307
  tooltip: $("showLogs"),
@@ -9314,7 +9320,7 @@ function Id(e) {
9314
9320
  (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9315
9321
  }
9316
9322
  }), !C && /* @__PURE__ */ P(ne, {
9317
- children: [$t(), /* @__PURE__ */ n(Zn, {
9323
+ children: [vt(), /* @__PURE__ */ n(Zn, {
9318
9324
  currentView: r,
9319
9325
  availableViews: t,
9320
9326
  onChangeView: (U) => {
@@ -9323,7 +9329,7 @@ function Id(e) {
9323
9329
  previousView: w,
9324
9330
  disabled: O
9325
9331
  })]
9326
- }), $t(), /* @__PURE__ */ n(_t, {
9332
+ }), vt(), /* @__PURE__ */ n(Dt, {
9327
9333
  icon: /* @__PURE__ */ n(jn, {}),
9328
9334
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9329
9335
  tooltip: $("actions"),
@@ -9331,7 +9337,7 @@ function Id(e) {
9331
9337
  onItemClick: (U) => {
9332
9338
  !U || W(U);
9333
9339
  }
9334
- }), /* @__PURE__ */ n(_t, {
9340
+ }), /* @__PURE__ */ n(Dt, {
9335
9341
  icon: /* @__PURE__ */ n(Kn, {}),
9336
9342
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9337
9343
  tooltip: $("reports"),
@@ -9346,7 +9352,7 @@ function Id(e) {
9346
9352
  });
9347
9353
  }
9348
9354
  }), x && /* @__PURE__ */ P(ne, {
9349
- children: [$t(), /* @__PURE__ */ n(_t, {
9355
+ children: [vt(), /* @__PURE__ */ n(Dt, {
9350
9356
  icon: /* @__PURE__ */ n(Lr, {
9351
9357
  component: () => /* @__PURE__ */ P("svg", {
9352
9358
  xmlns: "http://www.w3.org/2000/svg",
@@ -9416,7 +9422,7 @@ function Id(e) {
9416
9422
  })]
9417
9423
  });
9418
9424
  }
9419
- function $t() {
9425
+ function vt() {
9420
9426
  return /* @__PURE__ */ n("div", {
9421
9427
  className: "inline-block w-2"
9422
9428
  });
@@ -9595,7 +9601,7 @@ function Md(e, t) {
9595
9601
  setCurrentId: J,
9596
9602
  tabs: fe,
9597
9603
  activeKey: be,
9598
- openAction: Ee,
9604
+ openAction: $e,
9599
9605
  onRemoveTab: _e
9600
9606
  } = ie || {};
9601
9607
  Hi("ctrl+g,command+g", (te) => {
@@ -9607,7 +9613,7 @@ function Md(e, t) {
9607
9613
  function ge(te) {
9608
9614
  O(te), Q == null || Q(te);
9609
9615
  }
9610
- bt(t, () => ({
9616
+ xt(t, () => ({
9611
9617
  canWeClose: Se
9612
9618
  }));
9613
9619
  const se = async () => {
@@ -9627,8 +9633,8 @@ function Md(e, t) {
9627
9633
  viewTuple: me
9628
9634
  });
9629
9635
  }
9630
- const Me = await kd(Fe);
9631
- for (const me of Me) {
9636
+ const Ee = await kd(Fe);
9637
+ for (const me of Ee) {
9632
9638
  if (!me)
9633
9639
  continue;
9634
9640
  const [, Te] = me.viewTuple;
@@ -9689,7 +9695,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9689
9695
  tabKey: u,
9690
9696
  canWeClose: Se
9691
9697
  }), pe(() => {
9692
- const te = _.find((Me) => Me.type === "tree"), Fe = _.find((Me) => c.id ? Me.type === c.type && Me.view_id === c.id : Me.type === c.type);
9698
+ const te = _.find((Ee) => Ee.type === "tree"), Fe = _.find((Ee) => c.id ? Ee.type === c.type && Ee.view_id === c.id : Ee.type === c.type);
9693
9699
  ge(Fe || te), m ? J == null || J(E) : (Be(void 0), R(void 0)), se();
9694
9700
  }, [i, s, m]), pe(() => {
9695
9701
  be === u && (J == null || J(b), Q == null || Q(y));
@@ -9704,25 +9710,25 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9704
9710
  var me;
9705
9711
  z(!0);
9706
9712
  const Fe = F.findIndex((Te) => Te.id === te);
9707
- let Me;
9713
+ let Ee;
9708
9714
  if (Fe === -1) {
9709
9715
  try {
9710
- Me = (me = await H.getHandler().readObjects({
9716
+ Ee = (me = await H.getHandler().readObjects({
9711
9717
  model: i,
9712
9718
  ids: [te],
9713
9719
  context: o
9714
9720
  })) == null ? void 0 : me[0];
9715
9721
  } catch {
9716
9722
  }
9717
- if (!Me) {
9723
+ if (!Ee) {
9718
9724
  z(!1), q(!1), ct(B("idNotFound"));
9719
9725
  return;
9720
9726
  }
9721
9727
  } else
9722
- Me = F[Fe];
9728
+ Ee = F[Fe];
9723
9729
  z(!1), q(!1);
9724
9730
  const ce = s.find((Te) => Te[1] === "form");
9725
- Ee({
9731
+ $e({
9726
9732
  domain: [],
9727
9733
  context: o,
9728
9734
  model: i,
@@ -9799,7 +9805,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9799
9805
  ge(te);
9800
9806
  }
9801
9807
  }
9802
- return V ? /* @__PURE__ */ n(Le, {}) : y ? /* @__PURE__ */ P(ll, {
9808
+ return V ? /* @__PURE__ */ n(Me, {}) : y ? /* @__PURE__ */ P(ll, {
9803
9809
  title: a,
9804
9810
  currentView: y,
9805
9811
  setCurrentView: ge,
@@ -9834,7 +9840,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9834
9840
  })]
9835
9841
  }) : null;
9836
9842
  }
9837
- const Lo = wt(Md);
9843
+ const Lo = bt(Md);
9838
9844
  async function Ed({
9839
9845
  actionId: e,
9840
9846
  rootContext: t = {},
@@ -9843,7 +9849,7 @@ async function Ed({
9843
9849
  const i = "ir.actions.act_window", o = `${i},${e}`, s = await H.getHandler().getActionData({
9844
9850
  action: o,
9845
9851
  context: t
9846
- }), a = vt({
9852
+ }), a = wt({
9847
9853
  context: s.context,
9848
9854
  values: r,
9849
9855
  fields: {}
@@ -10002,8 +10008,8 @@ function jd(e) {
10002
10008
  }, U = async () => {
10003
10009
  const J = W.current.length > 0 ? W.current : s, fe = hn(E.current, J), {
10004
10010
  colors: be
10005
- } = Ot(p), {
10006
- totalItems: Ee,
10011
+ } = It(p), {
10012
+ totalItems: $e,
10007
10013
  results: _e,
10008
10014
  attrsEvaluated: Be
10009
10015
  } = await H.getHandler().searchForTree({
@@ -10018,7 +10024,7 @@ function jd(e) {
10018
10024
  }
10019
10025
  });
10020
10026
  R(Qt(Be));
10021
- const ge = It({
10027
+ const ge = _t({
10022
10028
  resultsToSort: _e,
10023
10029
  sorter: F,
10024
10030
  fields: {
@@ -10027,7 +10033,7 @@ function jd(e) {
10027
10033
  }
10028
10034
  });
10029
10035
  q(!1), x(ge);
10030
- const se = await Ee;
10036
+ const se = await $e;
10031
10037
  C(se);
10032
10038
  }, L = async () => {
10033
10039
  try {
@@ -10105,7 +10111,7 @@ function jd(e) {
10105
10111
  sorter: F,
10106
10112
  onChangeSort: (J) => {
10107
10113
  A == null || A(J);
10108
- const fe = It({
10114
+ const fe = _t({
10109
10115
  resultsToSort: S,
10110
10116
  sorter: J,
10111
10117
  fields: {
@@ -10123,7 +10129,7 @@ function jd(e) {
10123
10129
  message: N,
10124
10130
  type: "error",
10125
10131
  banner: !0
10126
- }) : u ? /* @__PURE__ */ n(Le, {
10132
+ }) : u ? /* @__PURE__ */ n(Me, {
10127
10133
  style: {
10128
10134
  padding: "2rem"
10129
10135
  }
@@ -10170,7 +10176,7 @@ function Yd(e, t) {
10170
10176
  } = Y(Xn), h = ue(), g = ue();
10171
10177
  pe(() => {
10172
10178
  y();
10173
- }, [r, o, i]), bt(t, () => ({
10179
+ }, [r, o, i]), xt(t, () => ({
10174
10180
  refresh: () => {
10175
10181
  y();
10176
10182
  },
@@ -10362,12 +10368,12 @@ function Yd(e, t) {
10362
10368
  const [Q, J] = ie, {
10363
10369
  actionId: fe,
10364
10370
  actionType: be,
10365
- title: Ee,
10371
+ title: $e,
10366
10372
  model: _e
10367
10373
  } = S, Be = {
10368
10374
  action_id: fe,
10369
10375
  action_type: be,
10370
- name: Ee,
10376
+ name: $e,
10371
10377
  res_id: Z.id,
10372
10378
  res_model: _e,
10373
10379
  view_id: Q,
@@ -10430,7 +10436,7 @@ function Yd(e, t) {
10430
10436
  })
10431
10437
  });
10432
10438
  }
10433
- const Wd = wt(Yd), Ud = (e) => {
10439
+ const Wd = bt(Yd), Ud = (e) => {
10434
10440
  const {
10435
10441
  ooui: t
10436
10442
  } = e;
@@ -10457,7 +10463,7 @@ const Wd = wt(Yd), Ud = (e) => {
10457
10463
  } = r, y = Y(Ne), {
10458
10464
  getContext: O
10459
10465
  } = y || {};
10460
- Ct(() => {
10466
+ St(() => {
10461
10467
  w();
10462
10468
  }, [o]);
10463
10469
  const _ = (b) => {
@@ -10471,7 +10477,7 @@ const Wd = wt(Yd), Ud = (e) => {
10471
10477
  if (r.domain) {
10472
10478
  const C = await H.getHandler().evalDomain({
10473
10479
  domain: r.domain,
10474
- values: kt({
10480
+ values: Mt({
10475
10481
  fields: y == null ? void 0 : y.getFields(),
10476
10482
  values: y.getPlainValues()
10477
10483
  }),
@@ -10530,7 +10536,7 @@ const Wd = wt(Yd), Ud = (e) => {
10530
10536
  });
10531
10537
  }), _(C);
10532
10538
  };
10533
- return f && a.length === 0 ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(ne, {
10539
+ return f && a.length === 0 ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(ne, {
10534
10540
  children: /* @__PURE__ */ P("div", {
10535
10541
  className: "flex flex-row",
10536
10542
  children: [/* @__PURE__ */ n(Nt.Group, {
@@ -10730,7 +10736,7 @@ function su(e, t) {
10730
10736
  closable: !0,
10731
10737
  content: /* @__PURE__ */ n(iu, {})
10732
10738
  }]), f = ue(/* @__PURE__ */ new Map()), d = ue();
10733
- bt(t, () => ({
10739
+ xt(t, () => ({
10734
10740
  retrieveAndOpenAction: p,
10735
10741
  openShortcut: y
10736
10742
  }));
@@ -10763,7 +10769,7 @@ function su(e, t) {
10763
10769
  Ue("Action type not supported");
10764
10770
  return;
10765
10771
  }
10766
- const [x, $] = w.split(","), R = parseInt($), F = vt({
10772
+ const [x, $] = w.split(","), R = parseInt($), F = wt({
10767
10773
  context: S.context,
10768
10774
  values: i,
10769
10775
  fields: {}
@@ -10870,7 +10876,7 @@ function su(e, t) {
10870
10876
  } = w, [M, I] = $[0], N = {
10871
10877
  id: M,
10872
10878
  type: I
10873
- }, k = vt({
10879
+ }, k = wt({
10874
10880
  context: S,
10875
10881
  values: {
10876
10882
  ...D,
@@ -10879,7 +10885,7 @@ function su(e, t) {
10879
10885
  fields: V
10880
10886
  }), j = x ? await H.getHandler().evalDomain({
10881
10887
  domain: x,
10882
- values: kt({
10888
+ values: Mt({
10883
10889
  fields: V,
10884
10890
  values: {
10885
10891
  ...D,
@@ -10917,7 +10923,7 @@ function su(e, t) {
10917
10923
  } = w, C = `${D},${V}`, S = await H.getHandler().getActionData({
10918
10924
  action: C,
10919
10925
  context: o
10920
- }), x = vt({
10926
+ }), x = wt({
10921
10927
  context: S.context,
10922
10928
  values: i,
10923
10929
  fields: {}
@@ -11104,7 +11110,7 @@ function su(e, t) {
11104
11110
  })
11105
11111
  });
11106
11112
  }
11107
- const Lu = wt(su), {
11113
+ const Lu = bt(su), {
11108
11114
  useToken: au
11109
11115
  } = Pe;
11110
11116
  function lu(e) {
@@ -11314,7 +11320,7 @@ const {
11314
11320
  })
11315
11321
  })
11316
11322
  })]
11317
- }), /* @__PURE__ */ n(He.Divider, {}), d ? /* @__PURE__ */ n(Le, {
11323
+ }), /* @__PURE__ */ n(He.Divider, {}), d ? /* @__PURE__ */ n(Me, {
11318
11324
  style: {
11319
11325
  padding: "1rem"
11320
11326
  }
@@ -11400,7 +11406,7 @@ const {
11400
11406
  borderTopLeftRadius: 0,
11401
11407
  borderBottomLeftRadius: 0
11402
11408
  },
11403
- icon: /* @__PURE__ */ n(At, {
11409
+ icon: /* @__PURE__ */ n(Rt, {
11404
11410
  style: {
11405
11411
  fontSize: "0.5em"
11406
11412
  }