@gisce/react-ooui 2.100.0 → 2.101.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.
@@ -2,7 +2,7 @@ var Nc = Object.defineProperty;
2
2
  var Vc = (t, e, n) => e in t ? Nc(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var js = (t, e, n) => (Vc(t, typeof e != "symbol" ? e + "" : e, n), n);
4
4
  import { jsx as s, jsxs as L, Fragment as xe } from "react/jsx-runtime";
5
- import zt, { useContext as ye, useState as S, useEffect as ue, useRef as X, memo as it, useCallback as I, useMemo as ne, forwardRef as Bt, useImperativeHandle as Gt, Fragment as Jn, createContext as Lc, createElement as Hc } from "react";
5
+ import zt, { useContext as ye, useState as S, useEffect as ue, useRef as X, memo as it, useCallback as I, useMemo as te, forwardRef as Bt, useImperativeHandle as Gt, Fragment as Jn, createContext as Lc, createElement as Hc } from "react";
6
6
  import { Tooltip as Pt, theme as tt, Typography as ln, Form as $t, Row as Xe, Col as $e, Modal as Rt, Button as Ge, Dropdown as ta, Menu as na, Space as ct, Spin as st, Divider as Wr, Input as ht, Select as Cn, Checkbox as cr, Alert as _t, Timeline as ra, Badge as Xn, message as Us, Popover as Bc, Progress as jc, Avatar as oa, Tag as ns, ColorPicker as sa, DatePicker as Uc, TimePicker as Wc, InputNumber as qr, Layout as ia, Pagination as qc, Empty as aa, Statistic as Gc, Card as rs, Tabs as la, Radio as Ws, Switch as Yc, Steps as qs, Carousel as zc } from "antd";
7
7
  import { Label as Qn, Field as Vo, Tree as ca, Tags as Gs, Reference as Ys, Selection as os, Many2one as da, Boolean as Kc, parseContext as pn, graphProcessor as ua, graphFieldUtils as Jc, parseContextFields as Xc, parseDomainFields as Qc, Integer as Lo, SearchFieldTypes as fn, SearchFilter as fa, parseGraph as pa, Container as Zc, Form as ma, transformDomainForChildWidget as ss, Button as ed } from "@gisce/ooui";
8
8
  import td, { QuestionCircleOutlined as ha, ExclamationCircleOutlined as Gr, LoadingOutlined as Kt, DownOutlined as yr, CloseOutlined as Tn, CheckOutlined as Zn, TranslationOutlined as ga, FolderOpenOutlined as is, DownloadOutlined as as, ClearOutlined as er, FormOutlined as dr, TableOutlined as ls, AreaChartOutlined as nd, CalendarOutlined as rd, FileAddOutlined as Yr, CloseCircleFilled as od, FilterOutlined as Hn, EditOutlined as cs, CopyOutlined as vr, DeleteOutlined as ds, InfoCircleOutlined as zr, ReloadOutlined as Kr, ThunderboltOutlined as Jr, PrinterOutlined as Xr, ExportOutlined as ya, EnterOutlined as Qr, SearchOutlined as br, SaveOutlined as Ho, PlusOutlined as Bo, UpOutlined as sd, PlusSquareOutlined as va, MinusSquareOutlined as ba, StarFilled as id, StarOutlined as ad, LeftOutlined as wa, RightOutlined as xa, ApiOutlined as ld, AlignLeftOutlined as cd, EyeOutlined as dd, LinkOutlined as zs, BorderOuterOutlined as ud, SettingOutlined as fd } from "@ant-design/icons";
@@ -24,7 +24,7 @@ import us from "react-measure";
24
24
  import Nd from "lodash/debounce";
25
25
  import { nanoid as fs } from "nanoid";
26
26
  import Uo from "antd/lib/typography/Title";
27
- import { useDeepCompareEffect as Ue, useDeepCompareCallback as lt, useDeepCompareMemo as Ht } from "use-deep-compare";
27
+ import { useDeepCompareEffect as je, useDeepCompareCallback as lt, useDeepCompareMemo as Ht } from "use-deep-compare";
28
28
  import { Line as Vd, Column as Ld, Pie as Hd } from "@ant-design/plots";
29
29
  import { createRoot as Sa } from "react-dom/client";
30
30
  import { fileTypeFromBuffer as Bd } from "file-type-buffer-browser";
@@ -886,10 +886,10 @@ const Da = (t) => {
886
886
  isSearchField: n,
887
887
  onChange: r
888
888
  }) => {
889
- const o = ye(et), { elementHasLostFocus: i } = o || {}, { readOnly: a, isPassword: c, translatable: l, required: d } = e, f = ne(() => t && (e.selectionValues.size ? e.selectionValues.get(t) : Array.isArray(t) ? t[1] : t), [e.selectionValues, t]), u = ne(
889
+ const o = ye(et), { elementHasLostFocus: i } = o || {}, { readOnly: a, isPassword: c, translatable: l, required: d } = e, f = te(() => t && (e.selectionValues.size ? e.selectionValues.get(t) : Array.isArray(t) ? t[1] : t), [e.selectionValues, t]), u = te(
890
890
  () => d && !a,
891
891
  [d, a]
892
- ), p = ne(
892
+ ), p = te(
893
893
  () => Array.isArray(t) || !!e.selectionValues.size,
894
894
  [t, e.selectionValues]
895
895
  ), m = I(
@@ -941,7 +941,7 @@ const Ma = it(
941
941
  fetchValues: c,
942
942
  formHasChanges: l,
943
943
  elementHasLostFocus: d
944
- } = o || {}, [f, u] = S(!1), { t: p } = Fe(), { required: m, readOnly: g } = t, h = ne(
944
+ } = o || {}, [f, u] = S(!1), { t: p } = Fe(), { required: m, readOnly: g } = t, h = te(
945
945
  () => m && !g,
946
946
  [m, g]
947
947
  ), v = I(
@@ -1127,7 +1127,7 @@ const gs = (t) => {
1127
1127
  }
1128
1128
  return /* @__PURE__ */ L(xe, { children: [
1129
1129
  /* @__PURE__ */ L(Xe, { gutter: 8, wrap: !1, justify: "center", children: [
1130
- ne(
1130
+ te(
1131
1131
  () => /* @__PURE__ */ s(gs, { value: n }),
1132
1132
  [n]
1133
1133
  ),
@@ -1736,7 +1736,7 @@ const Sn = ({
1736
1736
  }
1737
1737
  ), uf = (t) => {
1738
1738
  const { ooui: e } = t, { relation: n, context: r, views: o } = e, [i, a] = S(!0), [c, l] = S(), [d, f] = S(/* @__PURE__ */ new Map()), u = ye(et), { getContext: p } = u || {};
1739
- Ue(() => {
1739
+ je(() => {
1740
1740
  g();
1741
1741
  }, [e]);
1742
1742
  const m = async (h) => o && o[h] ? o[h] : await H.getHandler().getView({
@@ -1765,7 +1765,7 @@ const Sn = ({
1765
1765
  iconField: x,
1766
1766
  colorField: C
1767
1767
  } = r, w = i.filter((E) => E.values), _ = ye(et), { getContext: T } = _ || {};
1768
- Ue(() => {
1768
+ je(() => {
1769
1769
  A();
1770
1770
  }, [i]);
1771
1771
  const D = (E) => {
@@ -2261,7 +2261,7 @@ const Sn = ({
2261
2261
  children: l,
2262
2262
  userFeatures: d
2263
2263
  }) => {
2264
- const f = ne(
2264
+ const f = te(
2265
2265
  () => ({
2266
2266
  erpFeatures: t,
2267
2267
  globalValues: r,
@@ -2350,7 +2350,7 @@ async function Xa({
2350
2350
  };
2351
2351
  }
2352
2352
  const bf = (t) => {
2353
- const e = X(!1), [n, r] = S(), [o, i] = S(!1), [a, c] = S(), [l, d] = S(), f = ye(et), { getContext: u, getPlainValues: p, activeId: m } = f || {}, { globalValues: g, rootContext: h } = Jt(), v = ne(() => ({ ...u == null ? void 0 : u(), ...h }), [u, h]);
2353
+ const e = X(!1), [n, r] = S(), [o, i] = S(!1), [a, c] = S(), [l, d] = S(), f = ye(et), { getContext: u, getPlainValues: p, activeId: m } = f || {}, { globalValues: g, rootContext: h } = Jt(), v = te(() => ({ ...u == null ? void 0 : u(), ...h }), [u, h]);
2354
2354
  return { actionData: a, treeShortcut: l, loading: o, error: n, fetchData: async () => {
2355
2355
  r(void 0), e.current || i(!0);
2356
2356
  try {
@@ -3119,13 +3119,13 @@ const Of = {
3119
3119
  yAxisOpts: i,
3120
3120
  fixedHeight: a
3121
3121
  }) => {
3122
- const { t: c } = Fe(), l = ne(() => {
3122
+ const { t: c } = Fe(), l = te(() => {
3123
3123
  if (!(t !== "pie" || e.reduce(
3124
3124
  (v, y) => y.operator === "+" ? v + y.value : 0,
3125
3125
  0
3126
3126
  ) === 0))
3127
3127
  return e.reduce((v, y) => v + y.value, 0);
3128
- }, [e, t]), d = ne(() => {
3128
+ }, [e, t]), d = te(() => {
3129
3129
  if (t === "pie")
3130
3130
  return Df(e);
3131
3131
  }, [e, t]), f = I(
@@ -3136,7 +3136,7 @@ const Of = {
3136
3136
  return `${`${(v == null ? void 0 : v.percent) || 0}`}%`;
3137
3137
  },
3138
3138
  [d]
3139
- ), u = ne(() => {
3139
+ ), u = te(() => {
3140
3140
  if (d !== void 0)
3141
3141
  return {
3142
3142
  formatter: (h, v) => f(v.id)
@@ -3144,7 +3144,7 @@ const Of = {
3144
3144
  }, [f, d]), p = I(
3145
3145
  ({ percent: h, x: v }) => h < 0.07 ? "" : f(v),
3146
3146
  [f]
3147
- ), m = Nf[t], g = ne(() => Vf({
3147
+ ), m = Nf[t], g = te(() => Vf({
3148
3148
  type: t,
3149
3149
  data: e,
3150
3150
  isGroup: n,
@@ -3227,7 +3227,7 @@ const Lf = ({
3227
3227
  uninformedString: c("uninformed"),
3228
3228
  manualIds: i
3229
3229
  });
3230
- if (Ue(() => {
3230
+ if (je(() => {
3231
3231
  m();
3232
3232
  }, [t, e, o, r, n]), d || !f)
3233
3233
  return /* @__PURE__ */ s(xr, {});
@@ -3361,7 +3361,7 @@ function bs(t) {
3361
3361
  disabled: o = !1,
3362
3362
  formHasChanges: i = !1,
3363
3363
  previousView: a
3364
- } = t, { t: c } = Fe(), l = ne(() => [
3364
+ } = t, { t: c } = Fe(), l = te(() => [
3365
3365
  {
3366
3366
  label: c("viewAs"),
3367
3367
  items: n.map((u, p) => {
@@ -3609,7 +3609,7 @@ const Yw = Object.values(St), jt = zt.createContext(null), Kf = (t) => {
3609
3609
  onReorderTabs: d,
3610
3610
  onUpdateTabTitle: f,
3611
3611
  tabs: u
3612
- } = t, [p, m] = S(), [g, h] = S(), v = ne(() => u.find((x) => x.key === a), [u, a]), { title: y } = Jt(), b = ne(() => !((u == null ? void 0 : u.length) > 0), [u]);
3612
+ } = t, [p, m] = S(), [g, h] = S(), v = te(() => u.find((x) => x.key === a), [u, a]), { title: y } = Jt(), b = te(() => !((u == null ? void 0 : u.length) > 0), [u]);
3613
3613
  return ue(() => {
3614
3614
  b && (document.title = y, window.history.replaceState({}, "", "/"));
3615
3615
  }, [b, y]), /* @__PURE__ */ s(
@@ -3694,7 +3694,7 @@ const { useToken: Jf } = tt, Xf = (t) => {
3694
3694
  }
3695
3695
  )
3696
3696
  }
3697
- ], [c, C, f.colorPrimary]), A = ne(() => !x || x.length === 0 ? (b == null ? void 0 : b.fields) || {} : x.reduce(($, P) => ({ ...$, ...P.fields || {} }), {}), [x, b]), k = I(
3697
+ ], [c, C, f.colorPrimary]), A = te(() => !x || x.length === 0 ? (b == null ? void 0 : b.fields) || {} : x.reduce(($, P) => ({ ...$, ...P.fields || {} }), {}), [x, b]), k = I(
3698
3698
  async ($) => {
3699
3699
  var P;
3700
3700
  if (_ != null && _.isEnabled && (((P = _ == null ? void 0 : _.params) == null ? void 0 : P.types) || []).includes("ir.search"))
@@ -4417,10 +4417,10 @@ function lp({
4417
4417
  }), z = ll({
4418
4418
  selectedRowItems: d,
4419
4419
  onRefreshParentValues: U
4420
- }), re = ne(
4420
+ }), re = te(
4421
4421
  () => _ !== void 0 && _.trim().length > 0,
4422
4422
  [_]
4423
- ), ge = ne(() => sn(r || [], b || []), [r, b]), Y = I(async () => {
4423
+ ), ge = te(() => sn(r || [], b || []), [r, b]), Y = I(async () => {
4424
4424
  var ce;
4425
4425
  try {
4426
4426
  m == null || m(!0);
@@ -4442,7 +4442,7 @@ function lp({
4442
4442
  d,
4443
4443
  m,
4444
4444
  j
4445
- ]), te = I(async () => {
4445
+ ]), ne = I(async () => {
4446
4446
  var ce;
4447
4447
  try {
4448
4448
  f == null || f(!0), await H.getHandler().deleteObjects({
@@ -4542,9 +4542,9 @@ function lp({
4542
4542
  on({
4543
4543
  confirmMessage: N("confirmRemove"),
4544
4544
  t: N,
4545
- onOk: te
4545
+ onOk: ne
4546
4546
  });
4547
- }, [te, N]);
4547
+ }, [ne, N]);
4548
4548
  return /* @__PURE__ */ L(ct, { wrap: !0, children: [
4549
4549
  T && /* @__PURE__ */ L(xe, { children: [
4550
4550
  /* @__PURE__ */ s(st, {}),
@@ -4733,7 +4733,7 @@ const { useToken: dp } = tt, { Title: up, Text: _r } = ln, ao = ({
4733
4733
  totalItems: d,
4734
4734
  selectedRowItems: f,
4735
4735
  treeType: u
4736
- } = ye(Ot), { t: p } = Fe(), { token: m } = dp(), g = ne(() => {
4736
+ } = ye(Ot), { t: p } = Fe(), { token: m } = dp(), g = te(() => {
4737
4737
  if (!n)
4738
4738
  return null;
4739
4739
  if ((i == null ? void 0 : i.type) === "form" && a) {
@@ -4835,7 +4835,7 @@ const { useToken: dp } = tt, { Title: up, Text: _r } = ln, ao = ({
4835
4835
  const [i, a] = S(!0), [c, l] = S(), [d, f] = S(), u = X(!1), [p, m] = ke(
4836
4836
  H.getHandler().getView
4837
4837
  ), { showErrorNotification: g } = wt();
4838
- Ue(() => (o && h(), () => {
4838
+ je(() => (o && h(), () => {
4839
4839
  m();
4840
4840
  }), [r, e, t, n, o]);
4841
4841
  const h = I(async () => {
@@ -4879,7 +4879,7 @@ const { useToken: dp } = tt, { Title: up, Text: _r } = ln, ao = ({
4879
4879
  }
4880
4880
  };
4881
4881
  return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
4882
- }, [t, ...n]), ne(() => r, [r]) - e;
4882
+ }, [t, ...n]), te(() => r, [r]) - e;
4883
4883
  }, ml = (t) => t.model ? `columnState-${t.treeViewId ?? "tree"}-${t.model}` : void 0, fp = (t) => {
4884
4884
  const e = lt(async () => {
4885
4885
  if (!t)
@@ -5281,7 +5281,7 @@ var an = /* @__PURE__ */ ((t) => (t.FEATURE_MANY2ONE_DISABLE_ARROW_MENU = "widge
5281
5281
  const zw = Object.values(an), Cp = (t) => {
5282
5282
  const { m2oField: e, ooui: n } = t, r = wn(
5283
5283
  an.FEATURE_MANY2ONE_DISABLE_ARROW_MENU
5284
- ), o = ne(() => {
5284
+ ), o = te(() => {
5285
5285
  let i = !0;
5286
5286
  return r === !0 && (i = !1), n.showMenu !== void 0 && (i = n.showMenu), i;
5287
5287
  }, [n.showMenu, r]);
@@ -5393,7 +5393,7 @@ const Ap = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(vl,
5393
5393
  const { token: o } = tt.useToken(), [i, a] = S(
5394
5394
  t ? t.replace(/,/g, ";").split(";").map((v) => v.trim()).filter((v) => v) : []
5395
5395
  ), [c, l] = S(""), d = X(null), f = ye(et), { elementHasLostFocus: u } = f || {};
5396
- Ue(() => {
5396
+ je(() => {
5397
5397
  if (t) {
5398
5398
  const v = t.replace(/,/g, ";").split(";").map((y) => y.trim()).filter(Boolean);
5399
5399
  a(v);
@@ -5499,7 +5499,7 @@ const Ap = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(vl,
5499
5499
  );
5500
5500
  }, wl = () => ye(mn), Ep = ({
5501
5501
  value: t
5502
- }) => ne(
5502
+ }) => te(
5503
5503
  () => /* @__PURE__ */ s(
5504
5504
  "div",
5505
5505
  {
@@ -5515,15 +5515,15 @@ const Ap = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(vl,
5515
5515
  [t]
5516
5516
  ), _p = ({
5517
5517
  value: t
5518
- }) => ne(() => /* @__PURE__ */ s(bl, { emails: t }), [t]), Op = ({
5518
+ }) => te(() => /* @__PURE__ */ s(bl, { emails: t }), [t]), Op = ({
5519
5519
  value: t,
5520
5520
  ooui: e
5521
- }) => ne(
5521
+ }) => te(
5522
5522
  () => /* @__PURE__ */ s(Cp, { m2oField: t, ooui: e }),
5523
5523
  [t, e]
5524
5524
  ), Dp = ({ value: t }) => {
5525
5525
  const { treeType: e } = Nt(), { treeType: n } = wl() || {}, r = (n || e) === "infinite";
5526
- return ne(() => {
5526
+ return te(() => {
5527
5527
  const o = /* @__PURE__ */ s(
5528
5528
  Zt,
5529
5529
  {
@@ -5570,49 +5570,49 @@ const Ap = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(vl,
5570
5570
  }, kp = ({ value: t }) => /* @__PURE__ */ s(Ad, { value: t }), Mp = ({
5571
5571
  value: t,
5572
5572
  ooui: e
5573
- }) => ne(() => t ? e.fieldType === "many2one" ? /* @__PURE__ */ s(xe, { children: t[1] }) : /* @__PURE__ */ s(xe, { children: t }) : /* @__PURE__ */ s(xe, {}), [t, e.fieldType]), Pp = ({
5573
+ }) => te(() => t ? e.fieldType === "many2one" ? /* @__PURE__ */ s(xe, { children: t[1] }) : /* @__PURE__ */ s(xe, { children: t }) : /* @__PURE__ */ s(xe, {}), [t, e.fieldType]), Pp = ({
5574
5574
  value: t,
5575
5575
  ooui: e
5576
5576
  }) => /* @__PURE__ */ s(Id, { value: t, timezone: e.timezone }), di = ({
5577
5577
  value: t
5578
- }) => ne(() => {
5578
+ }) => te(() => {
5579
5579
  const e = Array.isArray(t == null ? void 0 : t.items) ? t == null ? void 0 : t.items.length : 0;
5580
5580
  return /* @__PURE__ */ s(xe, { children: `( ${e} )` });
5581
5581
  }, [t]), $p = ({
5582
5582
  value: t
5583
- }) => ne(() => /* @__PURE__ */ s(yl, { value: t }), [t]), Np = ({ value: t }) => ne(() => /* @__PURE__ */ s(xe, { children: gl(t) }), [t]), ui = ({ value: t }) => ne(
5583
+ }) => te(() => /* @__PURE__ */ s(yl, { value: t }), [t]), Np = ({ value: t }) => te(() => /* @__PURE__ */ s(xe, { children: gl(t) }), [t]), ui = ({ value: t }) => te(
5584
5584
  () => /* @__PURE__ */ s("div", { style: { textAlign: "right" }, children: t }),
5585
5585
  [t]
5586
- ), Vp = ({ value: t }) => ne(
5586
+ ), Vp = ({ value: t }) => te(
5587
5587
  () => /* @__PURE__ */ s(gs, { value: t, style: { maxHeight: "30px" } }),
5588
5588
  [t]
5589
5589
  ), Lp = ({
5590
5590
  value: t,
5591
5591
  ooui: e
5592
- }) => ne(
5592
+ }) => te(
5593
5593
  () => /* @__PURE__ */ s(sa, { value: t, disabled: !0, showText: !0 }),
5594
5594
  // eslint-disable-next-line react-hooks/exhaustive-deps
5595
5595
  [e, t]
5596
5596
  ), Hp = ({
5597
5597
  value: t,
5598
5598
  ooui: e
5599
- }) => ne(() => /* @__PURE__ */ s(vl, { ooui: e, value: t }), [e, t]), Bp = ({
5599
+ }) => te(() => /* @__PURE__ */ s(vl, { ooui: e, value: t }), [e, t]), Bp = ({
5600
5600
  value: t,
5601
5601
  ooui: e
5602
- }) => ne(() => {
5602
+ }) => te(() => {
5603
5603
  let n = t;
5604
5604
  return Array.isArray(t) && t.length === 2 && (n = t[0]), /* @__PURE__ */ s(xe, { children: e.selectionValues.get(n) });
5605
5605
  }, [e, t]), jp = ({
5606
5606
  value: t,
5607
5607
  ooui: e,
5608
5608
  context: n
5609
- }) => ne(
5609
+ }) => te(
5610
5610
  () => /* @__PURE__ */ s(Tp, { value: t, selectionValues: e.selectionValues }),
5611
5611
  [n, e.selectionValues, t]
5612
5612
  ), Up = ({
5613
5613
  value: t,
5614
5614
  ooui: e
5615
- }) => ne(() => /* @__PURE__ */ s(Sp, { ooui: e, value: t }), [e, t]), Wp = ({
5615
+ }) => te(() => /* @__PURE__ */ s(Sp, { ooui: e, value: t }), [e, t]), Wp = ({
5616
5616
  value: t,
5617
5617
  ooui: e,
5618
5618
  context: n
@@ -5620,14 +5620,14 @@ const Ap = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(vl,
5620
5620
  const r = Ht(
5621
5621
  () => (t == null ? void 0 : t.items) || [],
5622
5622
  [t == null ? void 0 : t.items]
5623
- ), o = ne(
5623
+ ), o = te(
5624
5624
  () => r.map((i) => {
5625
5625
  const { id: a, name: c } = i, l = wr(c);
5626
5626
  return /* @__PURE__ */ s(Cs, { color: l, children: c }, `${a}`);
5627
5627
  }),
5628
5628
  [r]
5629
5629
  );
5630
- return ne(
5630
+ return te(
5631
5631
  () => /* @__PURE__ */ s(
5632
5632
  "div",
5633
5633
  {
@@ -5757,7 +5757,7 @@ const pr = ({
5757
5757
  return (w = c.current) == null ? void 0 : w[C.id];
5758
5758
  },
5759
5759
  [c]
5760
- ), x = ne(
5760
+ ), x = te(
5761
5761
  () => ({
5762
5762
  resetTableViewLabel: i("resetTableView"),
5763
5763
  changeToInfiniteLabel: i("changeToInfinite"),
@@ -5870,7 +5870,7 @@ const pr = ({
5870
5870
  c(!1);
5871
5871
  }
5872
5872
  }, [n, f, e, t == null ? void 0 : t.columns, l]);
5873
- Ue(() => {
5873
+ je(() => {
5874
5874
  if (!(!f || Object.keys(f).length === 0))
5875
5875
  return u(), () => {
5876
5876
  d();
@@ -5885,7 +5885,7 @@ const pr = ({
5885
5885
  showEmptyValues: r = !0,
5886
5886
  customDomain: o
5887
5887
  }) => {
5888
- const i = ne(() => {
5888
+ const i = te(() => {
5889
5889
  if (o)
5890
5890
  return o;
5891
5891
  if (n.length > 0)
@@ -5897,7 +5897,7 @@ const pr = ({
5897
5897
  domain: i
5898
5898
  });
5899
5899
  return {
5900
- footerComponent: ne(() => l ? zt.createElement(Fs, { aggregates: c, isLoading: a }) : null, [c, a, l]),
5900
+ footerComponent: te(() => l ? zt.createElement(Fs, { aggregates: c, isLoading: a }) : null, [c, a, l]),
5901
5901
  aggregates: c,
5902
5902
  hasAggregates: l,
5903
5903
  isLoading: a
@@ -5910,7 +5910,7 @@ const pr = ({
5910
5910
  maxRowsToSelect: o = 200,
5911
5911
  onSelectAll: i
5912
5912
  }) => {
5913
- const { t: a } = Fe(), c = ne(() => t.map((u) => u.id), [t]), l = I(
5913
+ const { t: a } = Fe(), c = te(() => t.map((u) => u.id), [t]), l = I(
5914
5914
  (u) => {
5915
5915
  e == null || e(u), n == null || n(u.map((p) => p.id));
5916
5916
  },
@@ -6109,7 +6109,7 @@ const pr = ({
6109
6109
  value: t,
6110
6110
  onChange: e
6111
6111
  }) => {
6112
- const n = ne(
6112
+ const n = te(
6113
6113
  () => dt().hour(0).minute(0).second(0),
6114
6114
  []
6115
6115
  );
@@ -6142,7 +6142,7 @@ const pr = ({
6142
6142
  ) })
6143
6143
  ] });
6144
6144
  }, { defaultAlgorithm: Zp, defaultSeed: em } = tt, tm = Zp(em), Is = it((t) => {
6145
- const { ooui: e } = t, { id: n, decimalDigits: r, readOnly: o, required: i } = e, a = ye(et), { elementHasLostFocus: c } = a || {}, l = ne(() => i && !o, [i, o]), d = ne(
6145
+ const { ooui: e } = t, { id: n, decimalDigits: r, readOnly: o, required: i } = e, a = ye(et), { elementHasLostFocus: c } = a || {}, l = te(() => i && !o, [i, o]), d = te(
6146
6146
  () => l ? nm : qr,
6147
6147
  [l]
6148
6148
  ), f = I((p) => p ? /* @__PURE__ */ s(ro, { content: p }) : null, []), u = I((p) => `${p}`.replace(/[^0-9.-]+/g, ""), []);
@@ -6168,7 +6168,7 @@ const nm = It(qr)`
6168
6168
  background-color: ${tm.colorPrimaryBg};
6169
6169
  }
6170
6170
  `, { useToken: rm } = tt, { defaultAlgorithm: om, defaultSeed: sm } = tt, im = om(sm), mr = it((t) => {
6171
- const { ooui: e, onChange: n } = t, { id: r, readOnly: o, required: i } = e, { token: a } = rm(), c = i && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, l = ye(et), { elementHasLostFocus: d } = l || {}, f = ne(() => i && !o, [i, o]), u = ne(
6171
+ const { ooui: e, onChange: n } = t, { id: r, readOnly: o, required: i } = e, { token: a } = rm(), c = i && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, l = ye(et), { elementHasLostFocus: d } = l || {}, f = te(() => i && !o, [i, o]), u = te(
6172
6172
  () => f ? am : qr,
6173
6173
  [f]
6174
6174
  ), p = I((h) => h ? /* @__PURE__ */ s(ro, { content: h }) : null, []), m = I((h) => h === void 0 ? "" : typeof h == "string" && !isNaN(parseFloat(h)) ? `${Math.trunc(parseFloat(h))}`.replace(/[^0-9-]+/g, "") : typeof h == "number" ? `${Math.trunc(h)}`.replace(/[^0-9-]+/g, "") : "", []), g = I(
@@ -7287,7 +7287,7 @@ const nr = /* @__PURE__ */ Ra(Pg), { Text: $g } = ln, Ng = ({
7287
7287
  ), [A] = ke(
7288
7288
  H.getHandler().create
7289
7289
  );
7290
- Ue(() => {
7290
+ je(() => {
7291
7291
  if (!c) {
7292
7292
  i == null || i(null), m("");
7293
7293
  return;
@@ -7298,7 +7298,7 @@ const nr = /* @__PURE__ */ Ra(Pg), { Text: $g } = ln, Ng = ({
7298
7298
  l,
7299
7299
  o,
7300
7300
  i
7301
- ]), Ue(() => {
7301
+ ]), je(() => {
7302
7302
  if (c)
7303
7303
  if (o) {
7304
7304
  const j = !nr(
@@ -7552,7 +7552,7 @@ const nr = /* @__PURE__ */ Ra(Pg), { Text: $g } = ln, Ng = ({
7552
7552
  R,
7553
7553
  c
7554
7554
  ]
7555
- ), B = ne(
7555
+ ), B = te(
7556
7556
  () => c && !!(n != null && n.length || r || o),
7557
7557
  [
7558
7558
  c,
@@ -7560,10 +7560,10 @@ const nr = /* @__PURE__ */ Ra(Pg), { Text: $g } = ln, Ng = ({
7560
7560
  r,
7561
7561
  o
7562
7562
  ]
7563
- ), N = ne(() => !!(!o || o && !v), [o, v]), V = ne(
7563
+ ), N = te(() => !!(!o || o && !v), [o, v]), V = te(
7564
7564
  () => !!(o && v),
7565
7565
  [o, v]
7566
- ), W = ne(
7566
+ ), W = te(
7567
7567
  () => !!(o && !v),
7568
7568
  [o, v]
7569
7569
  ), K = I(() => {
@@ -7591,7 +7591,7 @@ const nr = /* @__PURE__ */ Ra(Pg), { Text: $g } = ln, Ng = ({
7591
7591
  }, ec = Bt(
7592
7592
  (t, e) => {
7593
7593
  const { onSubmit: n, searchValues: r, searchFields: o, onChange: i, onClear: a } = t, [c] = $t.useForm(), [l, d] = S({}), [f, u] = S(""), { t: p } = Fe(), [m, g] = S(0), h = X(null), [v, y] = S([]);
7594
- Ue(() => {
7594
+ je(() => {
7595
7595
  c.setFieldsValue(r);
7596
7596
  const w = jn(r || {});
7597
7597
  d(w);
@@ -7601,7 +7601,7 @@ const nr = /* @__PURE__ */ Ra(Pg), { Text: $g } = ln, Ng = ({
7601
7601
  (D) => D.replace(/#.*$/, "")
7602
7602
  );
7603
7603
  y(T);
7604
- }, [r]), Ue(() => {
7604
+ }, [r]), je(() => {
7605
7605
  if (Object.keys(l).filter(
7606
7606
  (_) => l[_] !== void 0
7607
7607
  ).length > 0 && h.current) {
@@ -7845,15 +7845,15 @@ const tc = (t) => {
7845
7845
  if (!b)
7846
7846
  return 0;
7847
7847
  const Y = /* @__PURE__ */ new Set();
7848
- return Object.keys(b).forEach((te) => {
7849
- const le = b[te];
7848
+ return Object.keys(b).forEach((ne) => {
7849
+ const le = b[ne];
7850
7850
  if (le != null && le !== "" && (!Array.isArray(le) || le.some((me) => me != null && me !== ""))) {
7851
- const me = te.replace(/#.*$/, "");
7851
+ const me = ne.replace(/#.*$/, "");
7852
7852
  Y.add(me);
7853
7853
  }
7854
7854
  }), Y.size;
7855
7855
  }, [b]), [T, D] = S(null);
7856
- Ue(() => {
7856
+ je(() => {
7857
7857
  n && D(g || null);
7858
7858
  }, [n, g]);
7859
7859
  const {
@@ -7881,10 +7881,10 @@ const tc = (t) => {
7881
7881
  internalSavedSearch: T,
7882
7882
  setInternalSavedSearch: D,
7883
7883
  onSave: I(() => {
7884
- var te;
7884
+ var ne;
7885
7885
  const Y = ir(
7886
7886
  b,
7887
- (te = f.current) == null ? void 0 : te._advancedSearchContainer
7887
+ (ne = f.current) == null ? void 0 : ne._advancedSearchContainer
7888
7888
  );
7889
7889
  e({
7890
7890
  params: Y,
@@ -7893,18 +7893,18 @@ const tc = (t) => {
7893
7893
  });
7894
7894
  }, [e, b])
7895
7895
  }), U = X(!1);
7896
- Ue(() => {
7896
+ je(() => {
7897
7897
  n && !U.current && setTimeout(() => {
7898
7898
  var Y;
7899
7899
  if (!g)
7900
7900
  h && h.length > 0 ? (x(c || {}), y(h)) : (x({}), y([]));
7901
7901
  else {
7902
7902
  x(c || {});
7903
- const te = h && h.length > 0 ? h : c && ((Y = f.current) != null && Y._advancedSearchContainer) ? ir(
7903
+ const ne = h && h.length > 0 ? h : c && ((Y = f.current) != null && Y._advancedSearchContainer) ? ir(
7904
7904
  c,
7905
7905
  f.current._advancedSearchContainer
7906
7906
  ) : [];
7907
- y(te || []);
7907
+ y(ne || []);
7908
7908
  }
7909
7909
  }, 0), U.current = n;
7910
7910
  }, [n, h, c, g]), ue(() => {
@@ -7914,11 +7914,11 @@ const tc = (t) => {
7914
7914
  );
7915
7915
  Y instanceof HTMLElement && Y.focus();
7916
7916
  }, 300);
7917
- }, [n]), Ue(() => {
7917
+ }, [n]), je(() => {
7918
7918
  f.current = new fa(i, a, 1), f.current.parse(), p.current = f.current._advancedSearchContainer;
7919
7919
  }, [a, i, n]);
7920
7920
  const Z = I(
7921
- (Y, te = !0) => {
7921
+ (Y, ne = !0) => {
7922
7922
  var G;
7923
7923
  const le = ir(
7924
7924
  Y,
@@ -7927,7 +7927,7 @@ const tc = (t) => {
7927
7927
  e({
7928
7928
  params: le,
7929
7929
  values: jn(Y),
7930
- closeSidebar: te
7930
+ closeSidebar: ne
7931
7931
  });
7932
7932
  },
7933
7933
  [e]
@@ -7937,8 +7937,8 @@ const tc = (t) => {
7937
7937
  }, []), ae = lt(
7938
7938
  (Y) => {
7939
7939
  var G;
7940
- const te = jn(Y);
7941
- if (x(te), nr(te, b)) {
7940
+ const ne = jn(Y);
7941
+ if (x(ne), nr(ne, b)) {
7942
7942
  y([]);
7943
7943
  return;
7944
7944
  }
@@ -7950,11 +7950,11 @@ const tc = (t) => {
7950
7950
  },
7951
7951
  [b]
7952
7952
  ), z = lt(
7953
- (Y, te = {}) => {
7953
+ (Y, ne = {}) => {
7954
7954
  var le, G, me, pe, se;
7955
7955
  if (Y) {
7956
- const ce = { ...te };
7957
- Object.entries(te).forEach(([fe]) => {
7956
+ const ce = { ...ne };
7957
+ Object.entries(ne).forEach(([fe]) => {
7958
7958
  fe.replace(/#.*$/, "") === Y.replace(/#.*$/, "") && (ce[fe] = void 0);
7959
7959
  }), (le = m.current) == null || le.setFieldsValue(ce);
7960
7960
  const oe = v ? v.filter(
@@ -8093,10 +8093,10 @@ const tc = (t) => {
8093
8093
  (Y) => {
8094
8094
  Y != null && Y.input && O && setTimeout(() => {
8095
8095
  var G;
8096
- const te = Y.input;
8097
- te.focus();
8098
- const le = ((G = te.value) == null ? void 0 : G.length) || 0;
8099
- te.setSelectionRange(le, le);
8096
+ const ne = Y.input;
8097
+ ne.focus();
8098
+ const le = ((G = ne.value) == null ? void 0 : G.length) || 0;
8099
+ ne.setSelectionRange(le, le);
8100
8100
  }, 0);
8101
8101
  },
8102
8102
  [O]
@@ -8233,7 +8233,7 @@ function fo(t) {
8233
8233
  const O = b ? v : g, E = O == null ? void 0 : O.rows;
8234
8234
  return E == null ? void 0 : E.map((R, F) => /* @__PURE__ */ s(Xe, { children: R.map((M, $) => /* @__PURE__ */ s($e, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Tl, { field: M }) }, $)) }, F));
8235
8235
  };
8236
- Ue(() => {
8236
+ je(() => {
8237
8237
  x(!1), C.current = new fa(n, e), C.current.parse(), h(C.current._simpleSearchContainer), y(C.current._advancedSearchContainer);
8238
8238
  }, [e, n]);
8239
8239
  const D = T(), A = (O) => {
@@ -8484,7 +8484,7 @@ const rr = () => {
8484
8484
  T,
8485
8485
  r
8486
8486
  ]);
8487
- Ue(() => {
8487
+ je(() => {
8488
8488
  v.size !== 0 && R();
8489
8489
  }, [v, R]);
8490
8490
  const F = I(
@@ -8551,7 +8551,7 @@ const rr = () => {
8551
8551
  (V, W) => f || !m.current.includes(W) ? !1 : b.current.has(V == null ? void 0 : V.id) ? !0 : !x.current.find((K) => K.id === (V == null ? void 0 : V.id)),
8552
8552
  [f]
8553
8553
  );
8554
- Ue(() => (u && w && ($(), C.current = setInterval(
8554
+ je(() => (u && w && ($(), C.current = setInterval(
8555
8555
  $,
8556
8556
  Ug
8557
8557
  )), () => {
@@ -8606,7 +8606,7 @@ const rr = () => {
8606
8606
  treeView: l,
8607
8607
  results: d,
8608
8608
  onRecordsUpdated: f
8609
- } = t, u = ne(() => l != null && l.field_parent ? { ...l == null ? void 0 : l.fields, [l == null ? void 0 : l.field_parent]: {} } : l == null ? void 0 : l.fields, [l]), p = (l == null ? void 0 : l.fields_in_conditions) !== void 0, m = X(null), [g, h] = S(!0), [v, y] = ke(
8609
+ } = t, u = te(() => l != null && l.field_parent ? { ...l == null ? void 0 : l.fields, [l == null ? void 0 : l.field_parent]: {} } : l == null ? void 0 : l.fields, [l]), p = (l == null ? void 0 : l.fields_in_conditions) !== void 0, m = X(null), [g, h] = S(!0), [v, y] = ke(
8610
8610
  H.getHandler().readObjects
8611
8611
  ), [b, x] = ke(
8612
8612
  H.getHandler().parseConditions
@@ -8688,7 +8688,7 @@ const rr = () => {
8688
8688
  ]);
8689
8689
  ue(() => () => {
8690
8690
  y(), x();
8691
- }, []), Ue(() => ((o == null ? void 0 : o.length) && g && (D(), m.current = setInterval(D, qg)), () => {
8691
+ }, []), je(() => ((o == null ? void 0 : o.length) && g && (D(), m.current = setInterval(D, qg)), () => {
8692
8692
  m.current && (clearInterval(m.current), m.current = null);
8693
8693
  }), [
8694
8694
  o,
@@ -8755,7 +8755,7 @@ const rr = () => {
8755
8755
  }, [p, v]), b = I(() => {
8756
8756
  v();
8757
8757
  }, [v]);
8758
- return ne(
8758
+ return te(
8759
8759
  () => ({
8760
8760
  isFieldLoading: u,
8761
8761
  refreshEnhancedFields: y,
@@ -8925,7 +8925,7 @@ function Xg(t, e) {
8925
8925
  setSearchParams: re,
8926
8926
  searchValues: ge,
8927
8927
  searchParams: Y,
8928
- setSearchValues: te,
8928
+ setSearchValues: ne,
8929
8929
  searchTreeNameSearch: le,
8930
8930
  setSearchTreeNameSearch: G,
8931
8931
  setResults: me,
@@ -8938,9 +8938,9 @@ function Xg(t, e) {
8938
8938
  } = nc({ useLocalState: !l }), ve = u || le, Ae = X(ve), we = X(!1), Ne = X(), ze = X(), Oe = X(!1);
8939
8939
  ue(() => {
8940
8940
  var We, ft;
8941
- ve !== void 0 && Ae.current === void 0 || typeof ve == "string" && typeof Ae.current == "string" && ve !== Ae.current ? (we.current = !!ve, re == null || re([]), te == null || te({}), (We = b.current) == null || We.unselectAll()) : ve === void 0 && Ae.current !== void 0 && (we.current = !1, (ft = b.current) == null || ft.unselectAll()), Ae.current = ve;
8941
+ ve !== void 0 && Ae.current === void 0 || typeof ve == "string" && typeof Ae.current == "string" && ve !== Ae.current ? (we.current = !!ve, re == null || re([]), ne == null || ne({}), (We = b.current) == null || We.unselectAll()) : ve === void 0 && Ae.current !== void 0 && (we.current = !1, (ft = b.current) == null || ft.unselectAll()), Ae.current = ve;
8942
8942
  }, [ve]);
8943
- const Pe = ne(() => {
8943
+ const Pe = te(() => {
8944
8944
  if (N)
8945
8945
  return en(N);
8946
8946
  }, [N]), {
@@ -8981,7 +8981,7 @@ function Xg(t, e) {
8981
8981
  updateAttributes: he,
8982
8982
  results: pe,
8983
8983
  autoRefresh: y
8984
- }), ot = ne(() => (z == null ? void 0 : z.map((We) => We.id)) || [], [z]), kt = ne(() => {
8984
+ }), ot = te(() => (z == null ? void 0 : z.map((We) => We.id)) || [], [z]), kt = te(() => {
8985
8985
  if (!Re)
8986
8986
  return;
8987
8987
  const We = ve !== void 0;
@@ -8998,7 +8998,7 @@ function Xg(t, e) {
8998
8998
  }
8999
8999
  )
9000
9000
  }));
9001
- }, [Re, de, ve]), xt = ne(
9001
+ }, [Re, de, ve]), xt = te(
9002
9002
  () => sn(Y || [], a),
9003
9003
  [a, Y]
9004
9004
  ), cn = I(() => {
@@ -9233,7 +9233,7 @@ function Xg(t, e) {
9233
9233
  m,
9234
9234
  y
9235
9235
  ]), On = X(Y), Ee = X(j);
9236
- Ue(() => {
9236
+ je(() => {
9237
9237
  const We = !nr(
9238
9238
  Y,
9239
9239
  On.current
@@ -9253,14 +9253,14 @@ function Xg(t, e) {
9253
9253
  refreshResults: Be,
9254
9254
  getFields: () => N == null ? void 0 : N.fields
9255
9255
  }));
9256
- const Qe = ne(
9256
+ const Qe = te(
9257
9257
  () => ({
9258
9258
  overflow: "hidden",
9259
9259
  height: `${R}px`,
9260
9260
  ...c ? {} : { display: "none" }
9261
9261
  }),
9262
9262
  [R, c]
9263
- ), rt = ne(
9263
+ ), rt = te(
9264
9264
  () => ({
9265
9265
  fields: { ...V == null ? void 0 : V.fields, ...N == null ? void 0 : N.fields },
9266
9266
  searchFields: zn([
@@ -9283,24 +9283,24 @@ function Xg(t, e) {
9283
9283
  ]
9284
9284
  ), ut = I(() => {
9285
9285
  var We;
9286
- at([]), (We = b.current) == null || We.unselectAll(), G == null || G(void 0), re == null || re([]), te == null || te(void 0);
9286
+ at([]), (We = b.current) == null || We.unselectAll(), G == null || G(void 0), re == null || re([]), ne == null || ne(void 0);
9287
9287
  }, [
9288
9288
  at,
9289
9289
  G,
9290
9290
  re,
9291
- te
9291
+ ne
9292
9292
  ]), Mt = I(
9293
9293
  ({ params: We, searchValues: ft }) => {
9294
9294
  var Ft;
9295
- at([]), (Ft = b.current) == null || Ft.unselectAll(), G == null || G(void 0), re == null || re(We), te == null || te(ft);
9295
+ at([]), (Ft = b.current) == null || Ft.unselectAll(), G == null || G(void 0), re == null || re(We), ne == null || ne(ft);
9296
9296
  },
9297
9297
  [
9298
9298
  at,
9299
9299
  G,
9300
9300
  re,
9301
- te
9301
+ ne
9302
9302
  ]
9303
- ), nn = ne(
9303
+ ), nn = te(
9304
9304
  () => ({
9305
9305
  isOpen: j,
9306
9306
  fields: { ...V == null ? void 0 : V.fields, ...N == null ? void 0 : N.fields },
@@ -9330,13 +9330,13 @@ function Xg(t, e) {
9330
9330
  ), Ut = I(
9331
9331
  ({ params: We, values: ft, closeSidebar: Ft = !0 }) => {
9332
9332
  var vt;
9333
- at([]), (vt = b.current) == null || vt.unselectAll(), G == null || G(void 0), re == null || re(We), te == null || te(ft), U == null || U(!Ft), Ft || Be(), (!We || We.length === 0) && (_ == null || _(null));
9333
+ at([]), (vt = b.current) == null || vt.unselectAll(), G == null || G(void 0), re == null || re(We), ne == null || ne(ft), U == null || U(!Ft), Ft || Be(), (!We || We.length === 0) && (_ == null || _(null));
9334
9334
  },
9335
9335
  [
9336
9336
  at,
9337
9337
  G,
9338
9338
  re,
9339
- te,
9339
+ ne,
9340
9340
  U,
9341
9341
  _,
9342
9342
  Be
@@ -9465,7 +9465,7 @@ const Ps = Bt(Xg), Yi = (t, e = "14px -apple-system") => {
9465
9465
  Ot
9466
9466
  ), { title: P = void 0, setTitle: q = void 0 } = (C ? $ : {}) || {}, B = qt(
9467
9467
  St.FEATURE_MANY2ONE_SORT
9468
- ), N = ne(() => {
9468
+ ), N = te(() => {
9469
9469
  if (E)
9470
9470
  return ys(
9471
9471
  E,
@@ -9484,7 +9484,7 @@ const Ps = Bt(Xg), Yi = (t, e = "14px -apple-system") => {
9484
9484
  })), ue(() => {
9485
9485
  const z = en(i);
9486
9486
  R(z), z.string && P !== z.string && (q == null || q(z.string));
9487
- }, [i, P]), Ue(() => {
9487
+ }, [i, P]), je(() => {
9488
9488
  if (!E)
9489
9489
  return;
9490
9490
  O.current = !1, (async () => {
@@ -9494,7 +9494,7 @@ const Ps = Bt(Xg), Yi = (t, e = "14px -apple-system") => {
9494
9494
  }, [a, E, w]), ue(() => {
9495
9495
  M.current = r;
9496
9496
  }, [r]);
9497
- const V = (n - 1) * M.current + 1, W = V - 1 + A.length, K = o === void 0 ? null : o === 0 ? F("no_results") : F("summary").replace("{from}", V == null ? void 0 : V.toString()).replace("{to}", W == null ? void 0 : W.toString()).replace("{total}", o == null ? void 0 : o.toString()), j = ne(() => {
9497
+ const V = (n - 1) * M.current + 1, W = V - 1 + A.length, K = o === void 0 ? null : o === 0 ? F("no_results") : F("summary").replace("{from}", V == null ? void 0 : V.toString()).replace("{to}", W == null ? void 0 : W.toString()).replace("{total}", o == null ? void 0 : o.toString()), j = te(() => {
9498
9498
  if (!f || i.isExpandable)
9499
9499
  return null;
9500
9500
  const z = A == null ? void 0 : A.filter(
@@ -9534,7 +9534,7 @@ const Ps = Bt(Xg), Yi = (t, e = "14px -apple-system") => {
9534
9534
  K,
9535
9535
  o,
9536
9536
  i.isExpandable
9537
- ]), U = ne(() => {
9537
+ ]), U = te(() => {
9538
9538
  if (!E)
9539
9539
  return null;
9540
9540
  const z = E.columns.filter((Y) => Y.sum !== void 0).map((Y) => ({ label: Y.sum, field: Y.id }));
@@ -9542,13 +9542,13 @@ const Ps = Bt(Xg), Yi = (t, e = "14px -apple-system") => {
9542
9542
  return null;
9543
9543
  const re = [], ge = (u == null ? void 0 : u.length) > 0 ? A.filter((Y) => u.includes(Y.id)) : A;
9544
9544
  return z.forEach((Y) => {
9545
- const te = ge.reduce((le, G) => G[Y.field] && !isNaN(G[Y.field]) ? le + G[Y.field] : le, 0);
9546
- re.push(`${Y.label}: ${Math.round(te * 100) / 100}`);
9545
+ const ne = ge.reduce((le, G) => G[Y.field] && !isNaN(G[Y.field]) ? le + G[Y.field] : le, 0);
9546
+ re.push(`${Y.label}: ${Math.round(ne * 100) / 100}`);
9547
9547
  }), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: re.join(", ") });
9548
- }, [A, u, E]), Z = ne(() => {
9548
+ }, [A, u, E]), Z = te(() => {
9549
9549
  if (E !== null && N && N.length > 0)
9550
9550
  return Qg(N, A, 600);
9551
- }, [N, A, E]), ee = ne(() => m && (E != null && E.columns.some((z) => z.sum !== void 0)) ? m - 30 : m, [m, E == null ? void 0 : E.columns]);
9551
+ }, [N, A, E]), ee = te(() => m && (E != null && E.columns.some((z) => z.sum !== void 0)) ? m - 30 : m, [m, E == null ? void 0 : E.columns]);
9552
9552
  return E === null || !Z || ((ae = Z == null ? void 0 : Z.columns) == null ? void 0 : ae.length) === 0 ? /* @__PURE__ */ s(st, { style: { padding: "2rem" } }) : /* @__PURE__ */ L(Mr, { children: [
9553
9553
  j,
9554
9554
  /* @__PURE__ */ s(
@@ -9705,7 +9705,7 @@ const ic = (t) => {
9705
9705
  P,
9706
9706
  _
9707
9707
  ]
9708
- ), te = I(
9708
+ ), ne = I(
9709
9709
  async (oe) => {
9710
9710
  try {
9711
9711
  k(!0), a == null || a(!0), c && !l.current ? await ge() : await Y(oe), D == null || D();
@@ -9747,7 +9747,7 @@ const ic = (t) => {
9747
9747
  ), G = I(
9748
9748
  (oe) => {
9749
9749
  const { params: fe, searchValues: _e, limit: ve, offset: Ae } = oe;
9750
- A || (n == null || n(void 0), r == null || r([]), T == null || T(_e), o == null || o(fe), i == null || i(!1), E(!0), F(void 0), $(1), ve && (ee.current = ve, w == null || w(ve)), Ae && q(Ae), te({
9750
+ A || (n == null || n(void 0), r == null || r([]), T == null || T(_e), o == null || o(fe), i == null || i(!1), E(!0), F(void 0), $(1), ve && (ee.current = ve, w == null || w(ve)), Ae && q(Ae), ne({
9751
9751
  params: fe,
9752
9752
  newOffset: Ae
9753
9753
  }));
@@ -9759,7 +9759,7 @@ const ic = (t) => {
9759
9759
  T,
9760
9760
  o,
9761
9761
  i,
9762
- te,
9762
+ ne,
9763
9763
  w
9764
9764
  ]
9765
9765
  ), me = I(
@@ -9796,7 +9796,7 @@ const ic = (t) => {
9796
9796
  return {
9797
9797
  submit: G,
9798
9798
  clear: pe,
9799
- fetchResults: te,
9799
+ fetchResults: ne,
9800
9800
  tableRefreshing: A,
9801
9801
  searchFilterLoading: O,
9802
9802
  searchError: R,
@@ -9847,7 +9847,7 @@ function ty(t, e) {
9847
9847
  setTotalItems: re = void 0,
9848
9848
  setSearchTreeNameSearch: ge = void 0,
9849
9849
  setTreeIsLoading: Y = void 0,
9850
- searchValues: te = {},
9850
+ searchValues: ne = {},
9851
9851
  setSearchValues: le = void 0,
9852
9852
  limit: G = At,
9853
9853
  setLimit: me = void 0
@@ -9989,7 +9989,7 @@ function ty(t, e) {
9989
9989
  ), Ie = I(async () => {
9990
9990
  const Le = await Me();
9991
9991
  K == null || K(Le.map((ot) => ({ id: ot }))), p == null || p(Le);
9992
- }, [Me, p, K]), de = ne(() => w != null && w.isExpandable ? F - 160 : F - (O + 240), [F, O, w == null ? void 0 : w.isExpandable]), De = ne(
9992
+ }, [Me, p, K]), de = te(() => w != null && w.isExpandable ? F - 160 : F - (O + 240), [F, O, w == null ? void 0 : w.isExpandable]), De = te(
9993
9993
  () => W == null ? void 0 : W.map((Le) => Le.id),
9994
9994
  [W]
9995
9995
  ), nt = I(() => !w || !T ? null : /* @__PURE__ */ L(xe, { children: [
@@ -10010,7 +10010,7 @@ function ty(t, e) {
10010
10010
  setSearchFilterHeight: E,
10011
10011
  searchError: Ae,
10012
10012
  searchVisible: Z,
10013
- searchValues: te
10013
+ searchValues: ne
10014
10014
  }
10015
10015
  ),
10016
10016
  /* @__PURE__ */ s(
@@ -10059,7 +10059,7 @@ function ty(t, e) {
10059
10059
  f,
10060
10060
  Ae,
10061
10061
  ve,
10062
- te,
10062
+ ne,
10063
10063
  Z,
10064
10064
  Ie,
10065
10065
  De,
@@ -10120,7 +10120,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10120
10120
  setOrder: Z,
10121
10121
  limit: ee,
10122
10122
  setLimit: ae
10123
- } = nc({ useLocalState: !i }), { treeMaxLimit: z } = Jt(), { setCurrentSavedSearch: re } = Nt(), ge = v ? 0 : Math.min(ee, z), [Y, te] = S(!0), [le, G] = S(), [me, pe] = S([]), [se, ce] = S(!1), oe = a || $, fe = X(oe), _e = X(F), ve = X(C), Ae = X(), we = X([]), Ne = X(!1), [ze, Oe] = ke(
10123
+ } = nc({ useLocalState: !i }), { treeMaxLimit: z } = Jt(), { setCurrentSavedSearch: re } = Nt(), ge = v ? 0 : Math.min(ee, z), [Y, ne] = S(!0), [le, G] = S(), [me, pe] = S([]), [se, ce] = S(!1), oe = a || $, fe = X(oe), _e = X(F), ve = X(C), Ae = X(), we = X([]), Ne = X(!1), [ze, Oe] = ke(
10124
10124
  H.getHandler().parseConditions
10125
10125
  ), Pe = I((Ee) => {
10126
10126
  we.current = we.current.map((Be) => {
@@ -10154,14 +10154,14 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10154
10154
  H.getHandler().searchForTree
10155
10155
  ), [Ie, de] = ke(
10156
10156
  H.getHandler().searchAllIds
10157
- ), De = ne(
10157
+ ), De = te(
10158
10158
  () => sn(F || [], l),
10159
10159
  [l, F]
10160
- ), nt = ne(() => (O == null ? void 0 : O.map((Ee) => Ee.id)) || [], [O]), pt = I(() => {
10160
+ ), nt = te(() => (O == null ? void 0 : O.map((Ee) => Ee.id)) || [], [O]), pt = I(() => {
10161
10161
  const Be = `${JSON.stringify(oe ? l : De)}-${oe}`;
10162
10162
  return Be !== Ae.current ? (Ae.current = Be, !0) : !1;
10163
10163
  }, [l, De, oe]), Dt = I(async () => {
10164
- G(void 0), V(0), te(!0);
10164
+ G(void 0), V(0), ne(!0);
10165
10165
  try {
10166
10166
  const Ee = await Ve({
10167
10167
  params: oe ? l : De,
@@ -10173,7 +10173,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10173
10173
  } catch (Ee) {
10174
10174
  Se(Ee);
10175
10175
  } finally {
10176
- te(!1);
10176
+ ne(!1);
10177
10177
  }
10178
10178
  }, [
10179
10179
  V,
@@ -10258,7 +10258,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10258
10258
  params: Be,
10259
10259
  name_search: oe,
10260
10260
  context: d
10261
- }), q == null || q(rt), oe ? (G(rt.length), V(rt.length), ce(!0), te(!1)) : ce(!1), rt.length === 0) {
10261
+ }), q == null || q(rt), oe ? (G(rt.length), V(rt.length), ce(!0), ne(!1)) : ce(!1), rt.length === 0) {
10262
10262
  we.current = [], G(0), V(0), pe([]), x(!1);
10263
10263
  return;
10264
10264
  }
@@ -10295,7 +10295,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10295
10295
  V,
10296
10296
  Se
10297
10297
  ]), at = I(async () => {
10298
- m == null || m(), He(), te(!0), T(0), _([]), Ae.current = void 0, oe || Ze(), await yt();
10298
+ m == null || m(), He(), ne(!0), T(0), _([]), Ae.current = void 0, oe || Ze(), await yt();
10299
10299
  }, [
10300
10300
  m,
10301
10301
  He,
@@ -10327,7 +10327,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10327
10327
  };
10328
10328
  }, [e]), ue(() => () => {
10329
10329
  Oe();
10330
- }, []), Ue(() => {
10330
+ }, []), je(() => {
10331
10331
  !n || !r || e || yt();
10332
10332
  }, [
10333
10333
  r,
@@ -10344,9 +10344,9 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10344
10344
  E == null || E([]), M == null || M({}), (Ee = c.current) == null || Ee.unselectAll(), fe.current = oe;
10345
10345
  return;
10346
10346
  }
10347
- oe === void 0 && fe.current !== void 0 && te(!0), fe.current = oe;
10347
+ oe === void 0 && fe.current !== void 0 && ne(!0), fe.current = oe;
10348
10348
  }
10349
- }, [oe]), Ue(() => {
10349
+ }, [oe]), je(() => {
10350
10350
  const Ee = !nr(
10351
10351
  F,
10352
10352
  _e.current
@@ -10377,7 +10377,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10377
10377
  }), [Ie, F, l, o, d, le]), hn = I(async () => {
10378
10378
  const Ee = await dn();
10379
10379
  _ == null || _(Ee.map((Be) => ({ id: Be })));
10380
- }, [dn, _]), Vt = ne(() => nt.length === 0 ? "unchecked" : nt.length === ge && ge > 0 || nt.length === le ? "checked" : "indeterminate", [nt, ge, le]), gn = I(() => {
10380
+ }, [dn, _]), Vt = te(() => nt.length === 0 ? "unchecked" : nt.length === ge && ge > 0 || nt.length === le ? "checked" : "indeterminate", [nt, ge, le]), gn = I(() => {
10381
10381
  var Ee, Be;
10382
10382
  Vt === "unchecked" ? ((Ee = c.current) == null || Ee.selectAll(), _(me.map((Qe) => ({ id: Qe.id })))) : (_([]), (Be = c.current) == null || Be.unselectAll());
10383
10383
  }, [c, _, me, Vt]), _n = I(
@@ -10497,7 +10497,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10497
10497
  currentModel: d,
10498
10498
  context: f
10499
10499
  }) => {
10500
- const u = ne(
10500
+ const u = te(
10501
10501
  () => ({
10502
10502
  fields: { ...e == null ? void 0 : e.fields, ...n == null ? void 0 : n.fields },
10503
10503
  searchFields: zn([
@@ -10518,7 +10518,7 @@ const ac = Bt(ty), ny = At, ry = (t) => {
10518
10518
  n == null ? void 0 : n.search_fields,
10519
10519
  o
10520
10520
  ]
10521
- ), p = ne(
10521
+ ), p = te(
10522
10522
  () => ({
10523
10523
  isOpen: r,
10524
10524
  fields: { ...e == null ? void 0 : e.fields, ...n == null ? void 0 : n.fields },
@@ -10705,7 +10705,7 @@ function cy(t, e) {
10705
10705
  }), D = pl({
10706
10706
  elementRef: b,
10707
10707
  offset: w != null && w.isExpandable ? ly : ay
10708
- }), A = h !== void 0 ? h : D, k = ne(() => {
10708
+ }), A = h !== void 0 ? h : D, k = te(() => {
10709
10709
  if (w)
10710
10710
  return en(w);
10711
10711
  }, [w]), {
@@ -10726,7 +10726,7 @@ function cy(t, e) {
10726
10726
  model: n
10727
10727
  }) : void 0,
10728
10728
  tableRef: y
10729
- }), N = ne(() => O || [], [O]), V = w == null ? void 0 : w.isExpandable, {
10729
+ }), N = te(() => O || [], [O]), V = w == null ? void 0 : w.isExpandable, {
10730
10730
  searchVisible: W,
10731
10731
  searchValues: K,
10732
10732
  selectedRowKeys: j,
@@ -10738,7 +10738,7 @@ function cy(t, e) {
10738
10738
  onSearchFilterClear: re,
10739
10739
  onSearchFilterSubmit: ge,
10740
10740
  onSideSearchFilterClose: Y,
10741
- onSideSearchFilterSubmit: te,
10741
+ onSideSearchFilterSubmit: ne,
10742
10742
  totalRowsLoading: le,
10743
10743
  totalRows: G,
10744
10744
  onRowStyle: me,
@@ -10777,7 +10777,7 @@ function cy(t, e) {
10777
10777
  statusForResults: B,
10778
10778
  disablePagination: m || V,
10779
10779
  autoRefresh: v
10780
- }), Je = ne(() => {
10780
+ }), Je = te(() => {
10781
10781
  const ot = He !== void 0;
10782
10782
  return N.map((kt) => ({
10783
10783
  ...kt,
@@ -10811,17 +10811,17 @@ function cy(t, e) {
10811
10811
  refreshResults: U,
10812
10812
  getFields: () => w == null ? void 0 : w.fields
10813
10813
  }));
10814
- const Ie = ne(() => he ? /* @__PURE__ */ s(Fs, { aggregates: be, isLoading: Q }) : null, [be, Q, he]), de = I(
10814
+ const Ie = te(() => he ? /* @__PURE__ */ s(Fs, { aggregates: be, isLoading: Q }) : null, [be, Q, he]), de = I(
10815
10815
  (ot) => /* @__PURE__ */ s(Xn, { color: ot, style: { marginLeft: 7 } }),
10816
10816
  []
10817
- ), De = ne(
10817
+ ), De = te(
10818
10818
  () => ({
10819
10819
  overflow: "hidden",
10820
10820
  height: `${A}px`,
10821
10821
  ...c ? {} : { display: "none" }
10822
10822
  }),
10823
10823
  [A, c]
10824
- ), nt = He !== void 0 && Ze, pt = nt && G !== void 0 && G !== null && G === At, Dt = ne(() => typeof G != "number" || isNaN(G) || G < 0 ? (pe == null ? void 0 : pe.length) || 0 : G || 0, [G, pe]), Le = ne(() => (pe == null ? void 0 : pe.length) > 0 && (typeof G != "number" || isNaN(G) || G < 0) ? pe == null ? void 0 : pe.length : f ? At : Ae || ny, [pe == null ? void 0 : pe.length, G, f, Ae]);
10824
+ ), nt = He !== void 0 && Ze, pt = nt && G !== void 0 && G !== null && G === At, Dt = te(() => typeof G != "number" || isNaN(G) || G < 0 ? (pe == null ? void 0 : pe.length) || 0 : G || 0, [G, pe]), Le = te(() => (pe == null ? void 0 : pe.length) > 0 && (typeof G != "number" || isNaN(G) || G < 0) ? pe == null ? void 0 : pe.length : f ? At : Ae || ny, [pe == null ? void 0 : pe.length, G, f, Ae]);
10825
10825
  return /* @__PURE__ */ L(Jn, { children: [
10826
10826
  !V && !m && /* @__PURE__ */ s(
10827
10827
  oy,
@@ -10834,7 +10834,7 @@ function cy(t, e) {
10834
10834
  onSearchFilterClear: re,
10835
10835
  onSearchFilterSubmit: ge,
10836
10836
  onSideSearchFilterClose: Y,
10837
- onSideSearchFilterSubmit: te,
10837
+ onSideSearchFilterSubmit: ne,
10838
10838
  currentModel: n,
10839
10839
  context: d
10840
10840
  }
@@ -10914,7 +10914,7 @@ const lc = Bt(cy), { useToken: dy } = tt, xn = "legacy", uy = (t) => {
10914
10914
  searchTreeNameSearch: m,
10915
10915
  limit: g
10916
10916
  } = t, h = X(e), [v, y] = S(xn), { treeMaxLimit: b, globalValues: x } = Jt(), { setLimit: C } = Nt();
10917
- Ue(() => {
10917
+ je(() => {
10918
10918
  const re = Ba({
10919
10919
  treeView: a,
10920
10920
  limit: g,
@@ -11005,10 +11005,10 @@ const lc = Bt(cy), { useToken: dy } = tt, xn = "legacy", uy = (t) => {
11005
11005
  f(ge);
11006
11006
  const Y = d.findIndex((le) => le.id === ge);
11007
11007
  _ == null || _(w), l(Y);
11008
- const te = p.find(
11008
+ const ne = p.find(
11009
11009
  (le) => le.type === "form"
11010
11010
  );
11011
- u(te);
11011
+ u(ne);
11012
11012
  },
11013
11013
  [
11014
11014
  p,
@@ -11035,7 +11035,7 @@ const lc = Bt(cy), { useToken: dy } = tt, xn = "legacy", uy = (t) => {
11035
11035
  }, 100);
11036
11036
  }, [k, F, M, n]), ae = I(() => {
11037
11037
  R == null || R(!0);
11038
- }, [R]), z = ne(() => A != null && A.name ? /* @__PURE__ */ L(
11038
+ }, [R]), z = te(() => A != null && A.name ? /* @__PURE__ */ L(
11039
11039
  "div",
11040
11040
  {
11041
11041
  style: {
@@ -11212,7 +11212,7 @@ const lc = Bt(cy), { useToken: dy } = tt, xn = "legacy", uy = (t) => {
11212
11212
  permissionsError: $
11213
11213
  } = t, [P, q] = S(!1), [B, N] = S(!1), [V, W] = S(!1), [K, j] = S(!0), [U, Z] = S(!0), [ee, ae] = S([]), [z, re] = S(!1), [ge, Y] = S(
11214
11214
  O || []
11215
- ), [te, le] = S(!1), [G, me] = S(!0), [pe, se] = S(), ce = ne(() => !i || i.length === 0 ? (n == null ? void 0 : n.fields) || {} : i.reduce((De, nt) => ({ ...De, ...nt.fields || {} }), {}), [i, n]), [oe, fe] = S(
11215
+ ), [ne, le] = S(!1), [G, me] = S(!0), [pe, se] = S(), ce = te(() => !i || i.length === 0 ? (n == null ? void 0 : n.fields) || {} : i.reduce((De, nt) => ({ ...De, ...nt.fields || {} }), {}), [i, n]), [oe, fe] = S(
11216
11216
  ol(O || [], ce)
11217
11217
  ), [_e, ve] = S(0), [Ae, we] = S(void 0), [Ne, ze] = S(), [Oe, Pe] = S(xn), [Re, Ze] = S(
11218
11218
  R
@@ -11279,7 +11279,7 @@ const lc = Bt(cy), { useToken: dy } = tt, xn = "legacy", uy = (t) => {
11279
11279
  setDuplicatingItem: re,
11280
11280
  setSearchParams: Y,
11281
11281
  searchParams: ge,
11282
- searchVisible: te,
11282
+ searchVisible: ne,
11283
11283
  setSearchVisible: le,
11284
11284
  sorter: v,
11285
11285
  setSorter: y,
@@ -11740,13 +11740,13 @@ function vy(t) {
11740
11740
  const Y = async (se) => {
11741
11741
  g(!1), p(!0), W(void 0);
11742
11742
  try {
11743
- se === "action" ? await te() : await le(), g(!0);
11743
+ se === "action" ? await ne() : await le(), g(!0);
11744
11744
  } catch (ce) {
11745
11745
  W(ce);
11746
11746
  } finally {
11747
11747
  p(!1);
11748
11748
  }
11749
- }, te = async () => {
11749
+ }, ne = async () => {
11750
11750
  const se = await H.getHandler().getViewsForAction({
11751
11751
  action: e,
11752
11752
  context: c
@@ -11770,7 +11770,7 @@ function vy(t) {
11770
11770
  });
11771
11771
  l !== void 0 && (ce.isExpandable = l), b(ce);
11772
11772
  };
11773
- Ue(() => {
11773
+ je(() => {
11774
11774
  if (!y)
11775
11775
  return;
11776
11776
  const se = Ba({
@@ -11884,7 +11884,7 @@ const uc = it(vy), { useToken: by } = tt, wy = 3 * 1e3, xy = (t) => {
11884
11884
  }
11885
11885
  return b(n.icon, a), b(n.color, l), () => f();
11886
11886
  }, [n.icon, n.color, r]);
11887
- const p = ne(() => {
11887
+ const p = te(() => {
11888
11888
  if (n.fieldType !== "many2one")
11889
11889
  return !1;
11890
11890
  let b = !0;
@@ -11941,7 +11941,7 @@ const uc = it(vy), { useToken: by } = tt, wy = 3 * 1e3, xy = (t) => {
11941
11941
  return n.card ? /* @__PURE__ */ s(rs, { children: v }) : v;
11942
11942
  }, Ty = (t) => {
11943
11943
  const { ooui: e } = t, { actionId: n, height: r } = e, { getFieldValue: o, activeId: i } = Zr(), a = e.actionField && parseInt(o(e.actionField) || "0", 10) || n, { actionData: c, treeShortcut: l, loading: d, error: f, fetchData: u } = bf(a), { openShortcut: p } = Cr();
11944
- if (Ue(() => {
11944
+ if (je(() => {
11945
11945
  !e || !a || u();
11946
11946
  }, [e, i, a]), f && f.message !== "active_id_not_found")
11947
11947
  return /* @__PURE__ */ s(Qa, { error: f });
@@ -12067,7 +12067,7 @@ const uc = it(vy), { useToken: by } = tt, wy = 3 * 1e3, xy = (t) => {
12067
12067
  );
12068
12068
  ue(() => () => {
12069
12069
  x(), w();
12070
- }, []), Ue(() => {
12070
+ }, []), je(() => {
12071
12071
  T();
12072
12072
  }, [o]);
12073
12073
  const _ = (k) => {
@@ -12379,7 +12379,7 @@ const uc = it(vy), { useToken: by } = tt, wy = 3 * 1e3, xy = (t) => {
12379
12379
  r,
12380
12380
  a
12381
12381
  ]);
12382
- Ue(() => (n && n > 0 && (o == null ? void 0 : o.length) && d && (g(), l.current = setInterval(g, Vy)), () => {
12382
+ je(() => (n && n > 0 && (o == null ? void 0 : o.length) && d && (g(), l.current = setInterval(g, Vy)), () => {
12383
12383
  p(), l.current && (clearInterval(l.current), l.current = null);
12384
12384
  }), [
12385
12385
  o,
@@ -12462,7 +12462,7 @@ function jy(t, e) {
12462
12462
  forcedValues: _ = {},
12463
12463
  parentWidth: T,
12464
12464
  onMustRefreshParent: D
12465
- } = t, { t: A } = Fe(), [k, O] = S(!1), [E, R] = S(), [F, M] = S(), [$] = $t.useForm(), [P, q] = S(), [B, N] = S(), V = ye(fc), [W, K] = S(), [j, U] = S(!1), [Z, ee] = S(0), ae = X(), z = X({}), re = X({}), ge = X(!1), Y = X(!1), te = X(!1), G = (T !== void 0 ? T : W) < By, me = ye(et), { activeId: pe, getPlainValues: se } = me || {}, ce = X(!1), oe = ye(
12465
+ } = t, { t: A } = Fe(), [k, O] = S(!1), [E, R] = S(), [F, M] = S(), [$] = $t.useForm(), [P, q] = S(), [B, N] = S(), V = ye(fc), [W, K] = S(), [j, U] = S(!1), [Z, ee] = S(0), ae = X(), z = X({}), re = X({}), ge = X(!1), Y = X(!1), ne = X(!1), G = (T !== void 0 ? T : W) < By, me = ye(et), { activeId: pe, getPlainValues: se } = me || {}, ce = X(!1), oe = ye(
12466
12466
  Ot
12467
12467
  ), {
12468
12468
  setFormIsSaving: fe = void 0,
@@ -12511,7 +12511,7 @@ function jy(t, e) {
12511
12511
  j && (Mt({
12512
12512
  elementHasLostFocus: !0
12513
12513
  }), U(!1));
12514
- }, [j]), Ue(() => {
12514
+ }, [j]), je(() => {
12515
12515
  var J;
12516
12516
  if (E) {
12517
12517
  const ie = E;
@@ -12534,8 +12534,8 @@ function jy(t, e) {
12534
12534
  function pt() {
12535
12535
  const J = yt(), ie = nt(), Ce = {};
12536
12536
  return Object.keys(J).forEach((Te) => {
12537
- const je = J[Te];
12538
- ie[Te] && ie[Te].type === "many2one" && je && Array.isArray(je) && je.length === 2 ? Ce[Te] = je[0] : ie[Te] && (ie[Te].type === "one2many" || ie[Te].type === "many2many") && je && je.items ? Ce[Te] = je.items.filter((mt) => mt.operation !== "pendingRemove").map((mt) => mt.id) : Ce[Te] = je;
12537
+ const Ue = J[Te];
12538
+ ie[Te] && ie[Te].type === "many2one" && Ue && Array.isArray(Ue) && Ue.length === 2 ? Ce[Te] = Ue[0] : ie[Te] && (ie[Te].type === "one2many" || ie[Te].type === "many2many") && Ue && Ue.items ? Ce[Te] = Ue.items.filter((mt) => mt.operation !== "pendingRemove").map((mt) => mt.id) : Ce[Te] = Ue;
12539
12539
  }), {
12540
12540
  ...xt(),
12541
12541
  ...Ce
@@ -12637,16 +12637,16 @@ function jy(t, e) {
12637
12637
  }
12638
12638
  }, Vt = async (J) => {
12639
12639
  ee((mt) => mt + 1);
12640
- let ie, Ce, Te, je;
12641
- Ae == null || Ae(!0), R(void 0), Q(), J != null && J.fields ? (Ce = J.fields, Te = J.arch) : (Ce = B, Te = P), m && (J == null ? void 0 : J.forceRefresh) !== !0 ? ie = m : { values: ie, defaultGetCalled: je } = await On({
12640
+ let ie, Ce, Te, Ue;
12641
+ Ae == null || Ae(!0), R(void 0), Q(), J != null && J.fields ? (Ce = J.fields, Te = J.arch) : (Ce = B, Te = P), m && (J == null ? void 0 : J.forceRefresh) !== !0 ? ie = m : { values: ie, defaultGetCalled: Ue } = await On({
12642
12642
  fields: Ce,
12643
12643
  arch: Te
12644
12644
  }), b && (ie = { ...sf(b), ...ie }), z.current = Nn(ie, Ce), Yt({
12645
12645
  values: ie,
12646
12646
  fields: Ce,
12647
12647
  reset: !0,
12648
- isDefaultGet: je
12649
- }), ut({ fields: Ce, arch: Te, values: ie }), Ae == null || Ae(!1), _e == null || _e(!1), je && U(!0);
12648
+ isDefaultGet: Ue
12649
+ }), ut({ fields: Ce, arch: Te, values: ie }), Ae == null || Ae(!1), _e == null || _e(!1), Ue && U(!0);
12650
12650
  }, gn = async () => new Promise(async (J) => {
12651
12651
  Xt() ? tr({
12652
12652
  t: A,
@@ -12691,7 +12691,7 @@ function jy(t, e) {
12691
12691
  }) => {
12692
12692
  let Ce = {}, Te = !1;
12693
12693
  if (de()) {
12694
- const je = F || rt({
12694
+ const Ue = F || rt({
12695
12695
  arch: ie,
12696
12696
  fields: J,
12697
12697
  values: {}
@@ -12699,7 +12699,7 @@ function jy(t, e) {
12699
12699
  if (Ce = (await H.getHandler().readObjects({
12700
12700
  model: n,
12701
12701
  ids: [de()],
12702
- fields: Ny(J, je == null ? void 0 : je.contextForFields),
12702
+ fields: Ny(J, Ue == null ? void 0 : Ue.contextForFields),
12703
12703
  context: y
12704
12704
  }))[0], v)
12705
12705
  return { values: Ce, defaultGetCalled: Te };
@@ -12753,13 +12753,13 @@ function jy(t, e) {
12753
12753
  }, Qe = async (J) => {
12754
12754
  let ie = !1;
12755
12755
  const { callOnSubmitSucceed: Ce = !0 } = J || {};
12756
- if (Y.current = !0, R(void 0), Q(), te.current && !Xt() && de() && Ce) {
12756
+ if (Y.current = !0, R(void 0), Q(), ne.current && !Xt() && de() && Ce) {
12757
12757
  Y.current = !1, _e == null || _e(!1), he == null || he(
12758
12758
  de(),
12759
12759
  yt(),
12760
12760
  Le(),
12761
- te.current
12762
- ), te.current = !1;
12761
+ ne.current
12762
+ ), ne.current = !1;
12763
12763
  const Te = de();
12764
12764
  return u && (ae.current = void 0, Yt({ values: {}, fields: B, reset: !0 })), { succeed: !0, id: Te };
12765
12765
  }
@@ -12791,8 +12791,8 @@ function jy(t, e) {
12791
12791
  values: Ce,
12792
12792
  operationInProgress: Te = !1
12793
12793
  }) => {
12794
- const je = new ma(J);
12795
- return je.parse(ie, {
12794
+ const Ue = new ma(J);
12795
+ return Ue.parse(ie, {
12796
12796
  readOnly: f || Te,
12797
12797
  values: Zu(
12798
12798
  {
@@ -12801,7 +12801,7 @@ function jy(t, e) {
12801
12801
  },
12802
12802
  J
12803
12803
  )
12804
- }), je;
12804
+ }), Ue;
12805
12805
  },
12806
12806
  [xt, f]
12807
12807
  ), ut = I(
@@ -12812,13 +12812,13 @@ function jy(t, e) {
12812
12812
  operationInProgress: Te = !1
12813
12813
  }) => {
12814
12814
  var mt;
12815
- const je = rt({
12815
+ const Ue = rt({
12816
12816
  arch: ie,
12817
12817
  fields: J,
12818
12818
  values: Ce,
12819
12819
  operationInProgress: Te
12820
12820
  });
12821
- M(je), je.string && je.string !== Ne && (ze == null || ze(je.string)), V && je.string && ((mt = V.setTitle) == null || mt.call(V, je.string));
12821
+ M(Ue), Ue.string && Ue.string !== Ne && (ze == null || ze(Ue.string)), V && Ue.string && ((mt = V.setTitle) == null || mt.call(V, Ue.string));
12822
12822
  },
12823
12823
  [V, rt, ze, Ne]
12824
12824
  ), Mt = async ({
@@ -12847,8 +12847,8 @@ function jy(t, e) {
12847
12847
  ]
12848
12848
  }) && J !== !0)) {
12849
12849
  const Te = Nn($.getFieldsValue(!0), B);
12850
- re.current = Te, l == null || l(Te), _e == null || _e(!0), Object.keys(Te).forEach((je) => {
12851
- Ve(je);
12850
+ re.current = Te, l == null || l(Te), _e == null || _e(!0), Object.keys(Te).forEach((Ue) => {
12851
+ Ve(Ue);
12852
12852
  }), Dn(Ce);
12853
12853
  }
12854
12854
  }, nn = Nd(Mt, 100), Dn = async (J) => {
@@ -12888,11 +12888,11 @@ function jy(t, e) {
12888
12888
  fields: B
12889
12889
  });
12890
12890
  if (Te.value) {
12891
- const je = {
12891
+ const Ue = {
12892
12892
  ...gt(B),
12893
12893
  ...Te.value
12894
12894
  }, mt = ef({
12895
- values: je,
12895
+ values: Ue,
12896
12896
  fields: B
12897
12897
  });
12898
12898
  ut({
@@ -12906,7 +12906,7 @@ function jy(t, e) {
12906
12906
  });
12907
12907
  }
12908
12908
  if (Te.warning && Te.warning.title && Te.warning.message && !ge.current) {
12909
- const { title: je, message: mt } = Te.warning;
12909
+ const { title: Ue, message: mt } = Te.warning;
12910
12910
  be([
12911
12911
  {
12912
12912
  field: J,
@@ -12915,7 +12915,7 @@ function jy(t, e) {
12915
12915
  }
12916
12916
  ]), (Te.warning.popup === !0 || Te.warning.popup === void 0) && (ge.current = !0, He({
12917
12917
  type: "warning",
12918
- title: je,
12918
+ title: Ue,
12919
12919
  body: mt,
12920
12920
  onOk: () => {
12921
12921
  ge.current = !1;
@@ -12923,15 +12923,15 @@ function jy(t, e) {
12923
12923
  }));
12924
12924
  }
12925
12925
  if (Te.domain && Object.keys(Te.domain).length > 0) {
12926
- const je = of({
12926
+ const Ue = of({
12927
12927
  fieldsDomain: Te.domain,
12928
12928
  fields: B
12929
12929
  });
12930
12930
  ut({
12931
- fields: je,
12931
+ fields: Ue,
12932
12932
  arch: P,
12933
- values: gt(je)
12934
- }), N(je);
12933
+ values: gt(Ue)
12934
+ }), N(Ue);
12935
12935
  }
12936
12936
  };
12937
12937
  async function sr({
@@ -13058,11 +13058,11 @@ function jy(t, e) {
13058
13058
  }
13059
13059
  let Te = !1;
13060
13060
  try {
13061
- !f && (Xt() || de() === void 0) && (Te = !0, kn(!0), p === "2many" ? (await Ee({ callOnSubmitSucceed: !1 }), te.current = !0) : await Qe({ callOnSubmitSucceed: !1 }));
13062
- const je = te.current ? kt() : {}, mt = { ...Ce, ...je };
13061
+ !f && (Xt() || de() === void 0) && (Te = !0, kn(!0), p === "2many" ? (await Ee({ callOnSubmitSucceed: !1 }), ne.current = !0) : await Qe({ callOnSubmitSucceed: !1 }));
13062
+ const Ue = ne.current ? kt() : {}, mt = { ...Ce, ...Ue };
13063
13063
  J === "object" ? await sr({ action: ie, context: mt }) : J === "workflow" ? await We({ action: ie }) : J === "action" && await ft({ action: ie, context: mt }), Te && kn(!1);
13064
- } catch (je) {
13065
- Te && kn(!1), He(je);
13064
+ } catch (Ue) {
13065
+ Te && kn(!1), He(Ue);
13066
13066
  }
13067
13067
  }
13068
13068
  const Mn = () => !F && !E ? /* @__PURE__ */ s(st, {}) : !n && !g || !x ? null : /* @__PURE__ */ s(xe, { children: /* @__PURE__ */ s(
@@ -13252,7 +13252,7 @@ const or = Bt(jy), In = (t) => {
13252
13252
  treeViewProps: void 0,
13253
13253
  context: a,
13254
13254
  enabled: t
13255
- }), w = ne(() => b != null && b.arch ? Ha(b.arch, "infinite") === "1" : !1, [b == null ? void 0 : b.arch]), _ = I(
13255
+ }), w = te(() => b != null && b.arch ? Ha(b.arch, "infinite") === "1" : !1, [b == null ? void 0 : b.arch]), _ = I(
13256
13256
  async (F) => {
13257
13257
  m(!0);
13258
13258
  try {
@@ -13277,7 +13277,7 @@ const or = Bt(jy), In = (t) => {
13277
13277
  return;
13278
13278
  }
13279
13279
  _(f);
13280
- }, [f, T, _]), k = ne(
13280
+ }, [f, T, _]), k = te(
13281
13281
  () => w ? Ps : ac,
13282
13282
  [w]
13283
13283
  ), O = I(() => {
@@ -13389,7 +13389,7 @@ const or = Bt(jy), In = (t) => {
13389
13389
  enabled: n = !0
13390
13390
  }) => {
13391
13391
  const [r, o] = S(null), [i, a] = S(!0), [c, l] = S(null), d = X(!1), { checkPermissions: f, cancelRequest: u } = Uy();
13392
- return Ue(() => !n || !t || !e.length ? void 0 : ((async () => {
13392
+ return je(() => !n || !t || !e.length ? void 0 : ((async () => {
13393
13393
  if (!d.current) {
13394
13394
  d.current = !0, a(!0), l(null);
13395
13395
  try {
@@ -13404,7 +13404,7 @@ const or = Bt(jy), In = (t) => {
13404
13404
  }
13405
13405
  })(), () => {
13406
13406
  u();
13407
- }), [t, e, n]), ne(
13407
+ }), [t, e, n]), te(
13408
13408
  () => ({
13409
13409
  permissions: r,
13410
13410
  loading: i,
@@ -13525,10 +13525,10 @@ const or = Bt(jy), In = (t) => {
13525
13525
  an.FEATURE_MANY2ONE_DISABLE_FOLDER
13526
13526
  ), Y = wn(
13527
13527
  an.FEATURE_MANY2ONE_DISABLE_ARROW_MENU
13528
- ), te = ne(() => {
13528
+ ), ne = te(() => {
13529
13529
  let G = !0;
13530
13530
  return ge === !0 && (G = !1), r.showFolder !== void 0 && (G = r.showFolder), G;
13531
- }, [r.showFolder, ge]), le = ne(() => {
13531
+ }, [r.showFolder, ge]), le = te(() => {
13532
13532
  let G = !0;
13533
13533
  return Y === !0 && (G = !1), r.showMenu !== void 0 && (G = r.showMenu), G;
13534
13534
  }, [r.showMenu, Y]);
@@ -13542,7 +13542,7 @@ const or = Bt(jy), In = (t) => {
13542
13542
  onChange: j,
13543
13543
  style: {
13544
13544
  ...f,
13545
- ...N || te ? { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
13545
+ ...N || ne ? { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
13546
13546
  },
13547
13547
  onBlur: U,
13548
13548
  onKeyDown: z,
@@ -13556,7 +13556,7 @@ const or = Bt(jy), In = (t) => {
13556
13556
  )
13557
13557
  }
13558
13558
  ) }),
13559
- te && /* @__PURE__ */ s($e, { flex: "none", style: { paddingRight: 0, paddingLeft: 0 }, children: /* @__PURE__ */ s(
13559
+ ne && /* @__PURE__ */ s($e, { flex: "none", style: { paddingRight: 0, paddingLeft: 0 }, children: /* @__PURE__ */ s(
13560
13560
  Ge,
13561
13561
  {
13562
13562
  icon: /* @__PURE__ */ s(is, {}),
@@ -14168,10 +14168,10 @@ const ev = (t) => {
14168
14168
  domain: z
14169
14169
  } = r, re = r.type === "many2many", { id: ge } = r, Y = i.filter(
14170
14170
  (Q) => (Q.values || Q.treeValues) && Q.operation !== "pendingRemove"
14171
- ), te = X();
14171
+ ), ne = X();
14172
14172
  ue(() => {
14173
- if (te.current !== a) {
14174
- te.current = a, le();
14173
+ if (ne.current !== a) {
14174
+ ne.current = a, le();
14175
14175
  return;
14176
14176
  }
14177
14177
  le();
@@ -14179,7 +14179,7 @@ const ev = (t) => {
14179
14179
  const le = I(() => {
14180
14180
  (a === "form" && i.some((Q) => !Q.values) || a === "tree" && i.some((Q) => !Q.treeValues)) && me();
14181
14181
  }, [i, a]);
14182
- Ue(() => {
14182
+ je(() => {
14183
14183
  se();
14184
14184
  }, [g]);
14185
14185
  const G = (Q) => {
@@ -14214,7 +14214,7 @@ const ev = (t) => {
14214
14214
  w(!1);
14215
14215
  }
14216
14216
  };
14217
- Ue(() => {
14217
+ je(() => {
14218
14218
  se();
14219
14219
  }, [v()]);
14220
14220
  const se = I(async () => {
@@ -14408,7 +14408,7 @@ const ev = (t) => {
14408
14408
  const Ke = () => {
14409
14409
  var be, he, Ie, de;
14410
14410
  if (a === "form")
14411
- return Y.length === 0 ? y("noCurrentEntries") : a !== te.current && i.some((De) => !De.values) ? /* @__PURE__ */ s(st, {}) : /* @__PURE__ */ s(
14411
+ return Y.length === 0 ? y("noCurrentEntries") : a !== ne.current && i.some((De) => !De.values) ? /* @__PURE__ */ s(st, {}) : /* @__PURE__ */ s(
14412
14412
  or,
14413
14413
  {
14414
14414
  ref: U,
@@ -14567,9 +14567,9 @@ const ev = (t) => {
14567
14567
  domain: a,
14568
14568
  getAllHierarchyValues: c
14569
14569
  } = ye(et) || {};
14570
- Ue(() => {
14570
+ je(() => {
14571
14571
  l();
14572
- }, [a]), Ue(() => {
14572
+ }, [a]), je(() => {
14573
14573
  l();
14574
14574
  }, [c()]);
14575
14575
  const l = I(async () => {
@@ -14610,7 +14610,7 @@ const ev = (t) => {
14610
14610
  i.length === 0 ? m = !0 : m = !1, m ? (a(r), (g = o.current) == null || g.setSelectedRows(r)) : (a([]), (h = o.current) == null || h.setSelectedRows([]));
14611
14611
  }, [r, o, i.length]), d = I((m) => {
14612
14612
  c.current = m;
14613
- }, []), f = I(() => c.current, []), u = ne(() => en(t), [t]);
14613
+ }, []), f = I(() => c.current, []), u = te(() => en(t), [t]);
14614
14614
  return {
14615
14615
  onTreeFetchRows: lt(
14616
14616
  async ({
@@ -15038,12 +15038,12 @@ const Ic = ({
15038
15038
  model: f,
15039
15039
  selectedRowKeys: h,
15040
15040
  showEmptyValues: !1
15041
- }), Y = ne(
15041
+ }), Y = te(
15042
15042
  () => t.filter(
15043
15043
  (Se) => (Se.values || Se.treeValues) && Se.operation !== "pendingRemove"
15044
15044
  ),
15045
15045
  [t]
15046
- ), { isFieldLoading: te, addRecordsToCheckFunctionFields: le } = Ms({
15046
+ ), { isFieldLoading: ne, addRecordsToCheckFunctionFields: le } = Ms({
15047
15047
  model: f,
15048
15048
  treeView: i,
15049
15049
  tableRef: C,
@@ -15053,7 +15053,7 @@ const Ic = ({
15053
15053
  treeOoui: o,
15054
15054
  updateAttributes: z,
15055
15055
  results: Y
15056
- }), G = ne(() => B ? B.map((Se) => ({
15056
+ }), G = te(() => B ? B.map((Se) => ({
15057
15057
  ...Se,
15058
15058
  render: (Q, be) => /* @__PURE__ */ s(
15059
15059
  po,
@@ -15061,10 +15061,10 @@ const Ic = ({
15061
15061
  value: Q,
15062
15062
  record: be,
15063
15063
  column: Se,
15064
- isFieldLoading: te
15064
+ isFieldLoading: ne
15065
15065
  }
15066
15066
  )
15067
- })) : [], [B, te]), me = I(
15067
+ })) : [], [B, ne]), me = I(
15068
15068
  async ({
15069
15069
  startRow: Se,
15070
15070
  endRow: Ve,
@@ -15131,7 +15131,7 @@ const Ic = ({
15131
15131
  le,
15132
15132
  z
15133
15133
  ]);
15134
- Ue(() => {
15134
+ je(() => {
15135
15135
  var Se, Ve;
15136
15136
  if (_.current = t, w.current === void 0) {
15137
15137
  w.current = t;
@@ -15160,13 +15160,13 @@ const Ic = ({
15160
15160
  );
15161
15161
  },
15162
15162
  [h, l]
15163
- ), Pe = ne(() => h.length === 0 ? "unchecked" : h.length === Y.length ? "checked" : "indeterminate", [h, Y.length]), Re = Wt((Se) => {
15163
+ ), Pe = te(() => h.length === 0 ? "unchecked" : h.length === Y.length ? "checked" : "indeterminate", [h, Y.length]), Re = Wt((Se) => {
15164
15164
  R.current = Se, D(0), k(void 0), y === "paginated" && t.length > 0 && pe().then(M);
15165
15165
  }), Ze = Wt(pe);
15166
- Ue(() => {
15166
+ je(() => {
15167
15167
  y === "paginated" && t.length > 0 && Ze().then(M);
15168
15168
  }, [y]);
15169
- const He = ne(() => y === "paginated" ? F : [], [y, F]), Ke = I(
15169
+ const He = te(() => y === "paginated" ? F : [], [y, F]), Ke = I(
15170
15170
  async (Se) => {
15171
15171
  if (!(i != null && i.field_parent))
15172
15172
  return [];
@@ -15186,7 +15186,7 @@ const Ic = ({
15186
15186
  }
15187
15187
  },
15188
15188
  [i, o, f, a]
15189
- ), Je = ne(() => i != null && i.field_parent ? Ke : void 0, [i == null ? void 0 : i.field_parent, Ke]), Me = I(
15189
+ ), Je = te(() => i != null && i.field_parent ? Ke : void 0, [i == null ? void 0 : i.field_parent, Ke]), Me = I(
15190
15190
  (Se) => {
15191
15191
  n == null || n(Se);
15192
15192
  },
@@ -15263,7 +15263,7 @@ const Ic = ({
15263
15263
  activeId: C,
15264
15264
  getContext: w,
15265
15265
  fetchValues: _
15266
- } = x || {}, T = X(), D = i.size > 1, A = ((we = i.get("form")) == null ? void 0 : we.fields) !== void 0, k = ne(() => ({ ...w == null ? void 0 : w(), ...v }), [w, v]), O = Tc({
15266
+ } = x || {}, T = X(), D = i.size > 1, A = ((we = i.get("form")) == null ? void 0 : we.fields) !== void 0, k = te(() => ({ ...w == null ? void 0 : w(), ...v }), [w, v]), O = Tc({
15267
15267
  widgetDomain: y,
15268
15268
  fieldName: b
15269
15269
  }), {
@@ -15280,7 +15280,7 @@ const Ic = ({
15280
15280
  context: k,
15281
15281
  allRowsIds: l.filter((Oe) => Oe.id !== void 0).map((Oe) => Oe.id),
15282
15282
  gridRef: e
15283
- }), B = ne(() => {
15283
+ }), B = te(() => {
15284
15284
  const { title: Oe } = i.get(d) || {};
15285
15285
  return Oe || o.label;
15286
15286
  }, [d, o.label, i]), N = o.type === "many2many", V = I(
@@ -15325,7 +15325,7 @@ const Ic = ({
15325
15325
  relation: h,
15326
15326
  formView: i.get("form")
15327
15327
  }), {
15328
- showSearchModal: te,
15328
+ showSearchModal: ne,
15329
15329
  onSelectSearchValues: le,
15330
15330
  onCloseSearchModal: G,
15331
15331
  searchItem: me
@@ -15371,7 +15371,7 @@ const Ic = ({
15371
15371
  l.length,
15372
15372
  p,
15373
15373
  j
15374
- ]), _e = ne(() => {
15374
+ ]), _e = te(() => {
15375
15375
  var Oe;
15376
15376
  return ((Oe = i.get("form")) == null ? void 0 : Oe.fields) !== void 0;
15377
15377
  }, [i]), ve = I(
@@ -15480,7 +15480,7 @@ const Ic = ({
15480
15480
  domain: O,
15481
15481
  model: h,
15482
15482
  context: k,
15483
- visible: te,
15483
+ visible: ne,
15484
15484
  onSelectValues: le,
15485
15485
  onCloseModal: G
15486
15486
  }
@@ -15514,7 +15514,7 @@ const Ic = ({
15514
15514
  i.length === 0 ? m = !0 : m = !1, m ? (a(r), (g = o.current) == null || g.setSelectedRows(r)) : (a([]), (h = o.current) == null || h.setSelectedRows([]));
15515
15515
  }, [r, o, i.length]), d = I((m) => {
15516
15516
  c.current = m;
15517
- }, []), f = I(() => c.current, []), u = ne(() => en(t), [t]);
15517
+ }, []), f = I(() => c.current, []), u = te(() => en(t), [t]);
15518
15518
  return {
15519
15519
  onTreeFetchRows: lt(
15520
15520
  async ({
@@ -15581,7 +15581,7 @@ const Ic = ({
15581
15581
  const y = X(), b = l || y, x = X({}), C = X(), w = X(), _ = X(t), { t: T } = Fe(), D = qt(
15582
15582
  St.FEATURE_MANY2ONE_SORT
15583
15583
  );
15584
- Ue(() => {
15584
+ je(() => {
15585
15585
  var $, P;
15586
15586
  if (_.current = t, w.current === void 0) {
15587
15587
  w.current = t;
@@ -15681,7 +15681,7 @@ const Ic = ({
15681
15681
  activeId: b,
15682
15682
  getContext: x,
15683
15683
  fetchValues: C
15684
- } = y || {}, w = X(), _ = i.size > 1, T = ((_e = i.get("form")) == null ? void 0 : _e.fields) !== void 0, D = ne(() => ({ ...x == null ? void 0 : x(), ...g }), [x, g]), A = Tc({
15684
+ } = y || {}, w = X(), _ = i.size > 1, T = ((_e = i.get("form")) == null ? void 0 : _e.fields) !== void 0, D = te(() => ({ ...x == null ? void 0 : x(), ...g }), [x, g]), A = Tc({
15685
15685
  widgetDomain: h,
15686
15686
  fieldName: v
15687
15687
  }), {
@@ -15703,7 +15703,7 @@ const Ic = ({
15703
15703
  model: m,
15704
15704
  items: c,
15705
15705
  selectedRowKeys: E
15706
- }), q = ne(() => {
15706
+ }), q = te(() => {
15707
15707
  const { title: we } = i.get(l) || {};
15708
15708
  return we || o.label;
15709
15709
  }, [l, o.label, i]), B = o.type === "many2many", N = I(
@@ -15749,7 +15749,7 @@ const Ic = ({
15749
15749
  formView: i.get("form")
15750
15750
  }), {
15751
15751
  showSearchModal: Y,
15752
- onSelectSearchValues: te,
15752
+ onSelectSearchValues: ne,
15753
15753
  onCloseSearchModal: le,
15754
15754
  searchItem: G
15755
15755
  } = Rc({
@@ -15794,7 +15794,7 @@ const Ic = ({
15794
15794
  c.length,
15795
15795
  u,
15796
15796
  K
15797
- ]), fe = ne(() => {
15797
+ ]), fe = te(() => {
15798
15798
  var we;
15799
15799
  return ((we = i.get("form")) == null ? void 0 : we.fields) !== void 0;
15800
15800
  }, [i]);
@@ -15895,7 +15895,7 @@ const Ic = ({
15895
15895
  model: m,
15896
15896
  context: D,
15897
15897
  visible: Y,
15898
- onSelectValues: te,
15898
+ onSelectValues: ne,
15899
15899
  onCloseModal: le
15900
15900
  }
15901
15901
  ),
@@ -15920,7 +15920,7 @@ const Ic = ({
15920
15920
  const { ooui: e } = t, { mode: n, relation: r, views: o, required: i, context: a } = e;
15921
15921
  let c;
15922
15922
  const [l, d] = S(!0), [f, u] = S(), [p, m] = S(/* @__PURE__ */ new Map()), g = ye(et), { getContext: h, formView: v, refreshCounter: y } = g || {}, { view_id: b } = v || {};
15923
- Ue(() => {
15923
+ je(() => {
15924
15924
  w();
15925
15925
  }, [e]);
15926
15926
  const x = qt(
@@ -16012,7 +16012,7 @@ const Ic = ({
16012
16012
  const { ooui: e, value: n } = t, { treeType: r, setTreeType: o } = wl(), i = wn(
16013
16013
  an.FEATURE_ONE2MANY_ENABLE_NEW_TABLE
16014
16014
  );
16015
- if (Ue(() => {
16015
+ if (je(() => {
16016
16016
  if (i) {
16017
16017
  o((() => e.infinite === "1" || e.infinite === !0 ? "infinite" : e.infinite === "0" || e.infinite === !1 ? "paginated" : (e.infinite === void 0 || e.infinite === null) && n && Array.isArray(n.items) && n.items.length >= Ji ? "infinite" : "paginated")());
16018
16018
  return;
@@ -17027,7 +17027,7 @@ function Gv({ toolbar: t }) {
17027
17027
  goToResourceId: R,
17028
17028
  isActive: F,
17029
17029
  permissions: M
17030
- } = Nt(), { openDefaultActionForModel: $ } = e || {}, P = ne(
17030
+ } = Nt(), { openDefaultActionForModel: $ } = e || {}, P = te(
17031
17031
  () => u || x || T || C,
17032
17032
  [u, x, T, C]
17033
17033
  ), q = I(
@@ -17591,7 +17591,7 @@ const Zv = (t) => {
17591
17591
  N(!1);
17592
17592
  }
17593
17593
  }, [n, M, h, j, P]);
17594
- Ue(() => {
17594
+ je(() => {
17595
17595
  U();
17596
17596
  }, [
17597
17597
  n,
@@ -17602,7 +17602,7 @@ const Zv = (t) => {
17602
17602
  P,
17603
17603
  h
17604
17604
  ]);
17605
- const Z = ne(() => e.view_id !== F.view_id, [F.view_id, e.view_id]);
17605
+ const Z = te(() => e.view_id !== F.view_id, [F.view_id, e.view_id]);
17606
17606
  ue(() => {
17607
17607
  Z && q(!0);
17608
17608
  }, [Z]);
@@ -17627,7 +17627,7 @@ const Zv = (t) => {
17627
17627
  setActionViewTotalItems: _,
17628
17628
  limit: A,
17629
17629
  setLimit: k
17630
- }), Y = ne(
17630
+ }), Y = te(
17631
17631
  () => zn([
17632
17632
  a == null ? void 0 : a.search_fields,
17633
17633
  c == null ? void 0 : c.search_fields,
@@ -17641,7 +17641,7 @@ const Zv = (t) => {
17641
17641
  );
17642
17642
  if (!n || !e)
17643
17643
  return null;
17644
- const te = f ? Ns : An;
17644
+ const ne = f ? Ns : An;
17645
17645
  return /* @__PURE__ */ L(xe, { children: [
17646
17646
  /* @__PURE__ */ s(ao, { title: e.title || e.name, children: /* @__PURE__ */ s(
17647
17647
  Qv,
@@ -17674,7 +17674,7 @@ const Zv = (t) => {
17674
17674
  }
17675
17675
  ),
17676
17676
  ge || B ? /* @__PURE__ */ s(st, {}) : /* @__PURE__ */ s(
17677
- te,
17677
+ ne,
17678
17678
  {
17679
17679
  ref: d,
17680
17680
  view_id: e.view_id,
@@ -17889,7 +17889,7 @@ function ab(t, e) {
17889
17889
  ), [R, F] = S([]), [M, $] = S(), [P, q] = S([]), [B, N] = S(), [V, W] = S(), [K, j] = S(!1), [U, Z] = S(!1), [ee, ae] = S(), { t: z } = Fe(), { showErrorNotification: re } = wt(), {
17890
17890
  permissions: ge,
17891
17891
  loading: Y,
17892
- error: te
17892
+ error: ne
17893
17893
  } = Ur({
17894
17894
  model: r,
17895
17895
  permissions: ["create", "write", "unlink"],
@@ -18034,22 +18034,22 @@ Please, make sure the view ids on the fields_view_get responses are the same as
18034
18034
  l,
18035
18035
  re
18036
18036
  ]);
18037
- c({ tabKey: l, canWeClose: Ne }), Ue(() => {
18037
+ c({ tabKey: l, canWeClose: Ne }), je(() => {
18038
18038
  const Re = _.find((He) => He.type === "tree"), Ze = _.find((He) => d.id ? He.type === d.type && He.view_id === d.id : He.type === d.type);
18039
18039
  Ae(Ze || Re), p ? se == null || se(k) : (ve(void 0), $(void 0)), we();
18040
- }, [r, i, p]), Ue(() => {
18040
+ }, [r, i, p]), je(() => {
18041
18041
  if (oe === l) {
18042
18042
  se == null || se(O);
18043
18043
  const Re = { action_id: m, action_type: g };
18044
18044
  pe == null || pe({ ...C, extra: Re });
18045
18045
  }
18046
18046
  }, [ce, oe]), ue(() => {
18047
- te && re({
18047
+ ne && re({
18048
18048
  type: "error",
18049
18049
  title: "Permissions Error",
18050
- message: `Error loading permissions for model ${r}: ${te.message}`
18050
+ message: `Error loading permissions for model ${r}: ${ne.message}`
18051
18051
  });
18052
- }, [te, r, re]);
18052
+ }, [ne, r, re]);
18053
18053
  async function Ne() {
18054
18054
  return C && C.type === "form" ? await le.current.cancelUnsavedChanges() : !0;
18055
18055
  }
@@ -18150,7 +18150,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
18150
18150
  initialOrder: x,
18151
18151
  permissions: ge,
18152
18152
  permissionsLoading: Y,
18153
- permissionsError: te,
18153
+ permissionsError: ne,
18154
18154
  children: [
18155
18155
  /* @__PURE__ */ s(
18156
18156
  lb,
@@ -18484,10 +18484,10 @@ function ub(t, e) {
18484
18484
  model: j,
18485
18485
  domain: Z,
18486
18486
  view_id: K.filter(
18487
- (te) => te[1] === "tree"
18487
+ (ne) => ne[1] === "tree"
18488
18488
  )[0][0],
18489
18489
  treeExpandable: F.treeExpandable,
18490
- onRowClicked: (te) => {
18490
+ onRowClicked: (ne) => {
18491
18491
  const le = K.find((G) => {
18492
18492
  const [, me] = G;
18493
18493
  return me === "form";
@@ -18502,7 +18502,7 @@ function ub(t, e) {
18502
18502
  action_id: pe,
18503
18503
  action_type: se,
18504
18504
  name: ce,
18505
- res_id: te.id,
18505
+ res_id: ne.id,
18506
18506
  res_model: oe,
18507
18507
  view_id: G,
18508
18508
  view_type: me
@@ -18514,7 +18514,7 @@ function ub(t, e) {
18514
18514
  P
18515
18515
  );
18516
18516
  else if (ee !== void 0) {
18517
- const te = ee && Array.isArray(ee.id) ? { ...ee, id: ee.id[0] } : ee;
18517
+ const ne = ee && Array.isArray(ee.id) ? { ...ee, id: ee.id[0] } : ee;
18518
18518
  re = /* @__PURE__ */ s(
18519
18519
  Pc,
18520
18520
  {
@@ -18528,19 +18528,19 @@ function ub(t, e) {
18528
18528
  domain: Z,
18529
18529
  setCanWeClose: () => {
18530
18530
  },
18531
- initialView: te,
18531
+ initialView: ne,
18532
18532
  limit: ae
18533
18533
  },
18534
18534
  P
18535
18535
  );
18536
18536
  }
18537
18537
  let ge;
18538
- const Y = K.find((te) => {
18539
- const [, le] = te;
18538
+ const Y = K.find((ne) => {
18539
+ const [, le] = ne;
18540
18540
  return le === "tree";
18541
18541
  });
18542
18542
  if (Y) {
18543
- const [te, le] = Y, {
18543
+ const [ne, le] = Y, {
18544
18544
  actionId: G,
18545
18545
  actionType: me,
18546
18546
  title: pe,
@@ -18552,7 +18552,7 @@ function ub(t, e) {
18552
18552
  name: pe,
18553
18553
  res_id: !1,
18554
18554
  res_model: se,
18555
- view_id: te,
18555
+ view_id: ne,
18556
18556
  view_type: le,
18557
18557
  overrideUnsettedLimit: !0
18558
18558
  };
@@ -18577,7 +18577,7 @@ const fb = Bt(ub), pb = (t) => {
18577
18577
  return /* @__PURE__ */ s(Ye, { type: "array", ...t, children: /* @__PURE__ */ s(mb, { ooui: e }) });
18578
18578
  }, mb = (t) => {
18579
18579
  const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((D) => D.operation !== "pendingRemove").map((D) => D.id), [a, c] = S([]), [l, d] = S(), [f, u] = S(!1), { relation: p, context: m, readOnly: g, field: h, columns: v } = n, y = ye(et), { getContext: b } = y || {};
18580
- Ue(() => {
18580
+ je(() => {
18581
18581
  C();
18582
18582
  }, [o]);
18583
18583
  const x = (D) => {
@@ -18657,10 +18657,46 @@ const fb = Bt(ub), pb = (t) => {
18657
18657
  ] })
18658
18658
  ] }) });
18659
18659
  }, hb = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(gb, { ...t }) }), gb = (t) => {
18660
- const { value: e, ooui: n } = t;
18661
- return /* @__PURE__ */ s(
18660
+ const { value: e, ooui: n, onChange: r } = t, o = X(null), i = te(() => {
18661
+ if (!e)
18662
+ return [];
18663
+ const c = [], l = /^(\s*[-*+]\s+)\[([x\sX])\]/gm;
18664
+ let d;
18665
+ for (; (d = l.exec(e)) !== null; )
18666
+ c.push({
18667
+ index: d.index + d[1].length,
18668
+ checked: d[2].toLowerCase() === "x"
18669
+ });
18670
+ return c;
18671
+ }, [e]), a = I(
18672
+ (c, l) => {
18673
+ if (!r || !e || c >= i.length)
18674
+ return;
18675
+ const d = i[c], f = e.substring(0, d.index), u = e.substring(d.index + 3);
18676
+ r(f + (l ? "[x]" : "[ ]") + u);
18677
+ },
18678
+ [r, e, i]
18679
+ );
18680
+ return je(() => {
18681
+ if (!o.current)
18682
+ return;
18683
+ o.current.querySelectorAll(
18684
+ 'input[type="checkbox"]'
18685
+ ).forEach((l, d) => {
18686
+ var p;
18687
+ const f = i[d], u = l;
18688
+ if (f) {
18689
+ u.checked = f.checked, u.disabled = (n == null ? void 0 : n.readOnly) || !1;
18690
+ const m = u.cloneNode(!0);
18691
+ m.onclick = (g) => {
18692
+ g.preventDefault(), a(d, !f.checked);
18693
+ }, (p = u.parentNode) == null || p.replaceChild(m, u);
18694
+ }
18695
+ });
18696
+ }, [e, i, n == null ? void 0 : n.readOnly]), /* @__PURE__ */ s(
18662
18697
  "div",
18663
18698
  {
18699
+ ref: o,
18664
18700
  style: {
18665
18701
  height: n != null && n.height ? n.height + "px" : "100%",
18666
18702
  overflow: "auto"
@@ -18775,7 +18811,7 @@ const fb = Bt(ub), pb = (t) => {
18775
18811
  l && u.onDidBlurEditorWidget(() => l());
18776
18812
  },
18777
18813
  [l]
18778
- ), f = ne(() => {
18814
+ ), f = te(() => {
18779
18815
  if (o === "json" && typeof n == "object")
18780
18816
  try {
18781
18817
  return JSON.stringify(n, null, " ");
@@ -19096,7 +19132,7 @@ function qb(t, e) {
19096
19132
  name: re,
19097
19133
  target: ge,
19098
19134
  view_type: Y,
19099
- limit: te
19135
+ limit: ne
19100
19136
  } = N, le = Y === "tree", G = [];
19101
19137
  for (const pe of z) {
19102
19138
  const [se, ce] = pe;
@@ -19138,7 +19174,7 @@ function qb(t, e) {
19138
19174
  forced_values: M,
19139
19175
  res_id: P,
19140
19176
  treeExpandable: le,
19141
- limit: te,
19177
+ limit: ne,
19142
19178
  actionRawData: {
19143
19179
  context: j,
19144
19180
  domain: Z
@@ -19240,7 +19276,7 @@ function qb(t, e) {
19240
19276
  target: re,
19241
19277
  view_type: ge,
19242
19278
  limit: Y
19243
- } = W, te = ge === "tree", le = [];
19279
+ } = W, ne = ge === "tree", le = [];
19244
19280
  for (const se of ae) {
19245
19281
  const [ce, oe] = se;
19246
19282
  if (ce)
@@ -19275,7 +19311,7 @@ function qb(t, e) {
19275
19311
  action_id: F,
19276
19312
  action_type: M,
19277
19313
  res_id: $,
19278
- treeExpandable: te,
19314
+ treeExpandable: ne,
19279
19315
  limit: q && (Y === 0 || Y === !1) ? At : Y,
19280
19316
  actionRawData: {
19281
19317
  context: K,
@@ -19332,11 +19368,11 @@ function qb(t, e) {
19332
19368
  action_id: V,
19333
19369
  context: M
19334
19370
  });
19335
- } catch (te) {
19336
- console.error(te);
19371
+ } catch (ne) {
19372
+ console.error(ne);
19337
19373
  }
19338
19374
  if (B !== "current" && B !== void 0) {
19339
- const te = await H.getHandler().getView({
19375
+ const ne = await H.getHandler().getView({
19340
19376
  model: $,
19341
19377
  type: "form",
19342
19378
  id: N.type === "form" ? N.id : void 0,
@@ -19345,17 +19381,17 @@ function qb(t, e) {
19345
19381
  h.current.openActionModal({
19346
19382
  domain: F,
19347
19383
  model: $,
19348
- formView: te,
19384
+ formView: ne,
19349
19385
  context: { ...l, ...M },
19350
19386
  actionData: {
19351
19387
  action_id: V,
19352
19388
  action_type: W,
19353
19389
  res_id: K,
19354
- view_id: te.view_id
19390
+ view_id: ne.view_id
19355
19391
  }
19356
19392
  });
19357
19393
  } else {
19358
- const te = N && Array.isArray(N.id) ? { ...N, id: N.id[0] } : N;
19394
+ const ne = N && Array.isArray(N.id) ? { ...N, id: N.id[0] } : N;
19359
19395
  T({
19360
19396
  title: q,
19361
19397
  content: /* @__PURE__ */ s(
@@ -19370,7 +19406,7 @@ function qb(t, e) {
19370
19406
  context: { ...M, ...l },
19371
19407
  domain: F,
19372
19408
  setCanWeClose: x,
19373
- initialView: te,
19409
+ initialView: ne,
19374
19410
  res_id: K,
19375
19411
  formDefaultValues: j,
19376
19412
  formForcedValues: U,
@@ -19458,7 +19494,7 @@ function Yb(t) {
19458
19494
  transform: b,
19459
19495
  transition: x,
19460
19496
  isDragging: C
19461
- } = lu({ id: r }), w = ne(
19497
+ } = lu({ id: r }), w = te(
19462
19498
  () => ({
19463
19499
  transform: b ? `translateX(${b.x}px) translateY(0px)` : void 0,
19464
19500
  transition: x,
@@ -19490,7 +19526,7 @@ function Yb(t) {
19490
19526
  "div",
19491
19527
  {
19492
19528
  ref: y,
19493
- style: ne(
19529
+ style: te(
19494
19530
  () => ({
19495
19531
  ...w,
19496
19532
  cursor: "pointer",
@@ -19543,7 +19579,7 @@ function Yb(t) {
19543
19579
  "div",
19544
19580
  {
19545
19581
  ...d ? {} : v,
19546
- style: ne(
19582
+ style: te(
19547
19583
  () => ({
19548
19584
  color: c.colorPrimaryActive,
19549
19585
  userSelect: "none",
@@ -19662,7 +19698,7 @@ function Jw() {
19662
19698
  d(!1), c.current = null;
19663
19699
  },
19664
19700
  [n, i]
19665
- ), g = ne(() => n.map((y) => y.key), [n]), h = ne(
19701
+ ), g = te(() => n.map((y) => y.key), [n]), h = te(
19666
19702
  () => ({
19667
19703
  flex: 1,
19668
19704
  maxWidth: "100%",
@@ -19673,7 +19709,7 @@ function Jw() {
19673
19709
  overflow: "hidden"
19674
19710
  }),
19675
19711
  []
19676
- ), v = ne(
19712
+ ), v = te(
19677
19713
  () => ({
19678
19714
  display: "flex",
19679
19715
  flexDirection: "row",
@@ -19749,7 +19785,7 @@ const { useToken: Jb } = tt, Qw = (t) => {
19749
19785
  currentView: y,
19750
19786
  currentId: b,
19751
19787
  openDefaultActionForModel: x
19752
- } = m || {}, C = ne(() => {
19788
+ } = m || {}, C = te(() => {
19753
19789
  if (!y || !y.view_id || !y.extra)
19754
19790
  return;
19755
19791
  const { action_id: O, action_type: E } = y.extra || {};
@@ -19765,7 +19801,7 @@ const { useToken: Jb } = tt, Qw = (t) => {
19765
19801
  view_id: R,
19766
19802
  res_id: F
19767
19803
  };
19768
- }, [b, y]), w = ne(() => {
19804
+ }, [b, y]), w = te(() => {
19769
19805
  if (C)
19770
19806
  return JSON.stringify(C);
19771
19807
  }, [C]);