@gisce/react-ooui 2.63.0-alpha.7 → 2.63.0-alpha.8

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,7 +1,7 @@
1
1
  var Cl = Object.defineProperty;
2
2
  var xl = (e, t, n) => t in e ? Cl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Qo = (e, t, n) => (xl(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { jsx as i, jsxs as V, Fragment as ae } from "react/jsx-runtime";
4
+ import { jsx as i, jsxs as V, Fragment as se } from "react/jsx-runtime";
5
5
  import It, { useContext as ee, useState as I, useEffect as ie, useRef as W, memo as Ze, useCallback as D, useMemo as q, forwardRef as Ft, useImperativeHandle as Dt, Fragment as Sn, createContext as Tl, createElement as Il } from "react";
6
6
  import { Tooltip as Et, theme as ze, Typography as qt, Form as Rt, Row as Ye, Col as De, Modal as Tt, Button as We, Dropdown as Al, Menu as Xo, Spin as Qe, Divider as pr, Space as rt, Input as mt, Select as rn, Checkbox as En, Alert as vt, Timeline as os, message as Rn, Popover as Fl, App as _l, Progress as Ol, Avatar as is, Tag as yo, DatePicker as vo, ColorPicker as ss, TimePicker as Rl, InputNumber as hr, Layout as as, Badge as Nn, Pagination as Dl, Empty as ls, Statistic as El, Card as bo, Tabs as cs, Radio as Zo, Switch as Pl, Steps as ei, Carousel as Vl } from "antd";
7
7
  import { Label as Cn, Field as Zr, Tree as ds, Reference as kl, Selection as wo, Many2one as us, Boolean as $l, parseContext as Wt, graphProcessor as fs, graphFieldUtils as Ml, parseContextFields as Ll, parseDomainFields as Nl, Integer as eo, SearchFieldTypes as Ht, SearchFilter as ms, parseGraph as ps, Container as jl, Form as hs, transformDomainForChildWidget as So, Button as Bl } from "@gisce/ooui";
@@ -254,7 +254,7 @@ function $e({
254
254
  return n === "horizontal" ? (() => /* @__PURE__ */ V(Ye, { align: "middle", className: "pb-1 pt-1", children: [
255
255
  /* @__PURE__ */ i(De, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-end", children: g }) }),
256
256
  /* @__PURE__ */ i(De, { flex: "auto", children: p() })
257
- ] }))() : (() => /* @__PURE__ */ V(ae, { children: [
257
+ ] }))() : (() => /* @__PURE__ */ V(se, { children: [
258
258
  g,
259
259
  p()
260
260
  ] }))();
@@ -712,7 +712,7 @@ const Ds = (e) => {
712
712
  p(!1), s();
713
713
  }
714
714
  function w() {
715
- return d ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ V(ae, { children: [
715
+ return d ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ V(se, { children: [
716
716
  S(),
717
717
  /* @__PURE__ */ i(pr, {}),
718
718
  /* @__PURE__ */ i(Ye, { justify: "end", children: /* @__PURE__ */ V(rt, { children: [
@@ -882,7 +882,7 @@ const ks = Ze(
882
882
  }, []), A = D(() => {
883
883
  d(!1), l == null || l();
884
884
  }, [l]), C = g ? md : fd;
885
- return a ? /* @__PURE__ */ V(ae, { children: [
885
+ return a ? /* @__PURE__ */ V(se, { children: [
886
886
  /* @__PURE__ */ i("div", { onClick: v, children: /* @__PURE__ */ i(
887
887
  kn,
888
888
  {
@@ -1045,7 +1045,7 @@ const Ro = (e) => {
1045
1045
  function m() {
1046
1046
  l(void 0);
1047
1047
  }
1048
- return /* @__PURE__ */ V(ae, { children: [
1048
+ return /* @__PURE__ */ V(se, { children: [
1049
1049
  /* @__PURE__ */ V(Ye, { gutter: 8, wrap: !1, justify: "center", children: [
1050
1050
  q(
1051
1051
  () => /* @__PURE__ */ i(Ro, { value: n }),
@@ -1513,7 +1513,7 @@ const on = ({
1513
1513
  onClick: e.onClick,
1514
1514
  children: [
1515
1515
  /* @__PURE__ */ i("strong", { children: e.title }),
1516
- e.summary && /* @__PURE__ */ V(ae, { children: [
1516
+ e.summary && /* @__PURE__ */ V(se, { children: [
1517
1517
  /* @__PURE__ */ i("br", {}),
1518
1518
  /* @__PURE__ */ i("span", { children: e.summary })
1519
1519
  ] })
@@ -1606,7 +1606,7 @@ const on = ({
1606
1606
  };
1607
1607
  return (N = R.values) != null && N[A] && (E.dot = O(R.values[A])), (B = R.values) != null && B[C] && (E.color = !_s(R.values[C]) && !Os(R.values[C]) && !R.values[C].toString().startsWith("#") ? Un(R.values[C]) : R.values[C]), E;
1608
1608
  });
1609
- return /* @__PURE__ */ V(ae, { children: [
1609
+ return /* @__PURE__ */ V(se, { children: [
1610
1610
  /* @__PURE__ */ i(os, { style: { padding: "1rem" }, items: x }),
1611
1611
  /* @__PURE__ */ i(
1612
1612
  _n,
@@ -2840,7 +2840,7 @@ const pu = {
2840
2840
  /* @__PURE__ */ i("div", { style: { width: "100%", height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ i(h, { ...p }) })
2841
2841
  ]
2842
2842
  }
2843
- ) : /* @__PURE__ */ i(ae, { children: `Unknown graph type: ${e}` });
2843
+ ) : /* @__PURE__ */ i(se, { children: `Unknown graph type: ${e}` });
2844
2844
  };
2845
2845
  function wu(e) {
2846
2846
  const {
@@ -3477,14 +3477,14 @@ const In = It.createContext(null), vi = async (e) => {
3477
3477
  actionData: void 0
3478
3478
  });
3479
3479
  }
3480
- return /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(
3480
+ return /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(
3481
3481
  In.Provider,
3482
3482
  {
3483
3483
  value: {
3484
3484
  processAction: b,
3485
3485
  globalValues: r
3486
3486
  },
3487
- children: /* @__PURE__ */ V(ae, { children: [
3487
+ children: /* @__PURE__ */ V(se, { children: [
3488
3488
  n,
3489
3489
  /* @__PURE__ */ i(
3490
3490
  Tt,
@@ -3851,8 +3851,8 @@ function Hu({
3851
3851
  ), M = D(
3852
3852
  (X) => {
3853
3853
  if (X.id === "print_screen") {
3854
- let j = (s == null ? void 0 : s.map((le) => le.id)) || [];
3855
- j.length === 0 && (j = (w == null ? void 0 : w.map((le) => le.id)) || []), K(
3854
+ let j = (s == null ? void 0 : s.map((ae) => ae.id)) || [];
3855
+ j.length === 0 && (j = (w == null ? void 0 : w.map((ae) => ae.id)) || []), K(
3856
3856
  {
3857
3857
  id: -1,
3858
3858
  model: d,
@@ -3909,12 +3909,12 @@ function Hu({
3909
3909
  });
3910
3910
  }, [ve, E]);
3911
3911
  return /* @__PURE__ */ V(rt, { wrap: !0, children: [
3912
- C && /* @__PURE__ */ V(ae, { children: [
3912
+ C && /* @__PURE__ */ V(se, { children: [
3913
3913
  /* @__PURE__ */ i(Qe, {}),
3914
3914
  /* @__PURE__ */ i(st, {}),
3915
3915
  /* @__PURE__ */ i(st, {})
3916
3916
  ] }),
3917
- !t && /* @__PURE__ */ V(ae, { children: [
3917
+ !t && /* @__PURE__ */ V(se, { children: [
3918
3918
  /* @__PURE__ */ i(
3919
3919
  Eu,
3920
3920
  {
@@ -3981,7 +3981,7 @@ function Hu({
3981
3981
  onClick: B
3982
3982
  }
3983
3983
  ),
3984
- !t && /* @__PURE__ */ V(ae, { children: [
3984
+ !t && /* @__PURE__ */ V(se, { children: [
3985
3985
  /* @__PURE__ */ i(st, {}),
3986
3986
  /* @__PURE__ */ i(
3987
3987
  Eo,
@@ -3997,7 +3997,7 @@ function Hu({
3997
3997
  /* @__PURE__ */ i(st, {}),
3998
3998
  /* @__PURE__ */ i(Lt, { icon: /* @__PURE__ */ i(Sr, {}), ...Y }),
3999
3999
  /* @__PURE__ */ i(Lt, { icon: /* @__PURE__ */ i(Cr, {}), ...k }),
4000
- R && /* @__PURE__ */ V(ae, { children: [
4000
+ R && /* @__PURE__ */ V(se, { children: [
4001
4001
  /* @__PURE__ */ i(st, {}),
4002
4002
  /* @__PURE__ */ i(
4003
4003
  Lt,
@@ -4088,7 +4088,7 @@ const { useToken: Wu } = ze, { Title: Yu, Text: tr } = qt, Dr = ({
4088
4088
  return null;
4089
4089
  if ((o == null ? void 0 : o.type) === "form" && a) {
4090
4090
  if (c === 0)
4091
- return /* @__PURE__ */ V(ae, { children: [
4091
+ return /* @__PURE__ */ V(se, { children: [
4092
4092
  d("editingDocument"),
4093
4093
  " (id:",
4094
4094
  " ",
@@ -4102,7 +4102,7 @@ const { useToken: Wu } = ze, { Title: Yu, Text: tr } = qt, Dr = ({
4102
4102
  ")"
4103
4103
  ] });
4104
4104
  const p = (s ?? 0) + 1, g = m === "infinite" ? c : l == null ? void 0 : l.length;
4105
- return /* @__PURE__ */ V(ae, { children: [
4105
+ return /* @__PURE__ */ V(se, { children: [
4106
4106
  d("register"),
4107
4107
  " ",
4108
4108
  p,
@@ -4120,14 +4120,14 @@ const { useToken: Wu } = ze, { Title: Yu, Text: tr } = qt, Dr = ({
4120
4120
  ")"
4121
4121
  ] });
4122
4122
  }
4123
- return (o == null ? void 0 : o.type) === "tree" && (u != null && u.length) ? u.length === 1 ? /* @__PURE__ */ V(ae, { children: [
4123
+ return (o == null ? void 0 : o.type) === "tree" && (u != null && u.length) ? u.length === 1 ? /* @__PURE__ */ V(se, { children: [
4124
4124
  "1 ",
4125
4125
  d("selectedRegisters"),
4126
4126
  " - (id:",
4127
4127
  " ",
4128
4128
  /* @__PURE__ */ i(tr, { copyable: !0, children: u[0].id }),
4129
4129
  ")"
4130
- ] }) : /* @__PURE__ */ V(ae, { children: [
4130
+ ] }) : /* @__PURE__ */ V(se, { children: [
4131
4131
  u.length,
4132
4132
  " ",
4133
4133
  d("selectedRegisters"),
@@ -4476,9 +4476,9 @@ const qu = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(la,
4476
4476
  }, ef = (e) => {
4477
4477
  const { m2oField: t } = e;
4478
4478
  return t ? /* @__PURE__ */ V(rt, { children: [
4479
- /* @__PURE__ */ i(ae, { children: t.value }),
4479
+ /* @__PURE__ */ i(se, { children: t.value }),
4480
4480
  /* @__PURE__ */ i(Er, { id: t.id, model: t.model })
4481
- ] }) : /* @__PURE__ */ i(ae, {});
4481
+ ] }) : /* @__PURE__ */ i(se, {});
4482
4482
  }, tf = (e) => {
4483
4483
  const { value: t, context: n, selectionValues: r } = e, [o, a] = I(), [s, l] = I(!1), [c, u] = t ? t.split(",") : [], m = parseInt(u), d = D(async () => {
4484
4484
  if (!t || t && o)
@@ -4495,13 +4495,13 @@ const qu = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(la,
4495
4495
  if (ie(() => {
4496
4496
  d();
4497
4497
  }, [t]), !t && !s)
4498
- return /* @__PURE__ */ i(ae, {});
4498
+ return /* @__PURE__ */ i(se, {});
4499
4499
  if (s)
4500
4500
  return /* @__PURE__ */ i(Pt, {});
4501
4501
  const f = r.get(c);
4502
4502
  return /* @__PURE__ */ V(rt, { children: [
4503
- /* @__PURE__ */ i(ae, { children: `${f}:` }),
4504
- /* @__PURE__ */ i(ae, { children: o }),
4503
+ /* @__PURE__ */ i(se, { children: `${f}:` }),
4504
+ /* @__PURE__ */ i(se, { children: o }),
4505
4505
  /* @__PURE__ */ i(Er, { id: m, model: c })
4506
4506
  ] });
4507
4507
  }, nf = (e) => {
@@ -4613,7 +4613,7 @@ const of = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(ca,
4613
4613
  if (!e)
4614
4614
  return null;
4615
4615
  const n = typeof e == "string" ? e.split(";").map((r) => r.trim()) : e;
4616
- return /* @__PURE__ */ i(ae, { children: n.map((r, o) => /* @__PURE__ */ i(
4616
+ return /* @__PURE__ */ i(se, { children: n.map((r, o) => /* @__PURE__ */ i(
4617
4617
  yo,
4618
4618
  {
4619
4619
  closable: !!t,
@@ -4730,28 +4730,28 @@ const of = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(ca,
4730
4730
  [e]
4731
4731
  ), pf = ({ value: e }) => q(() => {
4732
4732
  if (!e || e && e.length === 0)
4733
- return /* @__PURE__ */ i(ae, {});
4733
+ return /* @__PURE__ */ i(se, {});
4734
4734
  const t = tt(
4735
4735
  e,
4736
4736
  Mt.date.dateInternalFormat
4737
4737
  ).format(Mt.date.dateDisplayFormat);
4738
- return /* @__PURE__ */ i(ae, { children: t });
4738
+ return /* @__PURE__ */ i(se, { children: t });
4739
4739
  }, [e]), hf = ({ value: e }) => q(() => {
4740
4740
  if (!e || e && e.length === 0)
4741
- return /* @__PURE__ */ i(ae, {});
4741
+ return /* @__PURE__ */ i(se, {});
4742
4742
  const t = tt(
4743
4743
  e,
4744
4744
  Mt.time.dateInternalFormat
4745
4745
  ).format(Mt.time.dateDisplayFormat);
4746
- return /* @__PURE__ */ i(ae, { children: t });
4746
+ return /* @__PURE__ */ i(se, { children: t });
4747
4747
  }, [e]), bi = ({
4748
4748
  value: e
4749
4749
  }) => q(() => {
4750
4750
  const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
4751
- return /* @__PURE__ */ i(ae, { children: `( ${t} )` });
4751
+ return /* @__PURE__ */ i(se, { children: `( ${t} )` });
4752
4752
  }, [e]), gf = ({
4753
4753
  value: e
4754
- }) => q(() => /* @__PURE__ */ i(la, { value: e }), [e]), yf = ({ value: e }) => q(() => /* @__PURE__ */ i(ae, { children: aa(e) }), [e]), wi = ({ value: e }) => q(
4754
+ }) => q(() => /* @__PURE__ */ i(la, { value: e }), [e]), yf = ({ value: e }) => q(() => /* @__PURE__ */ i(se, { children: aa(e) }), [e]), wi = ({ value: e }) => q(
4755
4755
  () => /* @__PURE__ */ i("div", { style: { textAlign: "right" }, children: e }),
4756
4756
  [e]
4757
4757
  ), vf = ({ value: e }) => q(
@@ -4777,7 +4777,7 @@ const of = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(ca,
4777
4777
  context: r
4778
4778
  }) => q(() => {
4779
4779
  let o = e;
4780
- return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ i(ae, { children: n.selectionValues.get(o) });
4780
+ return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ i(se, { children: n.selectionValues.get(o) });
4781
4781
  }, [n, e]), Cf = ({
4782
4782
  value: e,
4783
4783
  key: t,
@@ -5121,7 +5121,7 @@ const of = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(ca,
5121
5121
  }) => {
5122
5122
  const { t } = fe();
5123
5123
  if (e.length === 1)
5124
- return /* @__PURE__ */ V(ae, { children: [
5124
+ return /* @__PURE__ */ V(se, { children: [
5125
5125
  "1 ",
5126
5126
  t("selectedRegisters"),
5127
5127
  " - (id:",
@@ -5130,7 +5130,7 @@ const of = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(ca,
5130
5130
  ")"
5131
5131
  ] });
5132
5132
  if (e.length > 1)
5133
- return /* @__PURE__ */ V(ae, { children: [
5133
+ return /* @__PURE__ */ V(se, { children: [
5134
5134
  e.length,
5135
5135
  " ",
5136
5136
  t("selectedRegisters") + " ",
@@ -5187,7 +5187,7 @@ const of = (e) => /* @__PURE__ */ i($e, { ...e, children: /* @__PURE__ */ i(ca,
5187
5187
  label: ""
5188
5188
  })
5189
5189
  ];
5190
- return /* @__PURE__ */ V(ae, { children: [
5190
+ return /* @__PURE__ */ V(se, { children: [
5191
5191
  n && /* @__PURE__ */ i(
5192
5192
  Ir,
5193
5193
  {
@@ -5456,7 +5456,7 @@ const { useToken: Jf } = ze, { Title: Qf } = qt, { Header: Xf, Content: Zf, Foot
5456
5456
  padding: "0 16px",
5457
5457
  borderBottom: "1px solid #f0f0f0"
5458
5458
  };
5459
- return /* @__PURE__ */ i(Wc, { children: e && /* @__PURE__ */ V(ae, { children: [
5459
+ return /* @__PURE__ */ i(Wc, { children: e && /* @__PURE__ */ V(se, { children: [
5460
5460
  /* @__PURE__ */ i(
5461
5461
  ii.div,
5462
5462
  {
@@ -6803,14 +6803,14 @@ function ah(e, t) {
6803
6803
  setTotalItems: oe,
6804
6804
  isActive: X,
6805
6805
  order: j,
6806
- setOrder: le
6807
- } = Ba({ useLocalState: !c }), se = d || ve, ce = W(se);
6806
+ setOrder: ae
6807
+ } = Ba({ useLocalState: !c }), le = d || ve, ce = W(le);
6808
6808
  ie(() => {
6809
6809
  Me();
6810
6810
  }, []), ie(() => {
6811
6811
  var me;
6812
- (se !== void 0 && ce.current === void 0 || typeof se == "string" && typeof ce.current == "string" && se !== ce.current) && (K == null || K([]), J == null || J({}), (me = g.current) == null || me.unselectAll(), bt()), ce.current = se;
6813
- }, [se]);
6812
+ (le !== void 0 && ce.current === void 0 || typeof le == "string" && typeof ce.current == "string" && le !== ce.current) && (K == null || K([]), J == null || J({}), (me = g.current) == null || me.unselectAll(), bt()), ce.current = le;
6813
+ }, [le]);
6814
6814
  const he = q(() => {
6815
6815
  if (O)
6816
6816
  return Nt(O);
@@ -6847,16 +6847,16 @@ function ah(e, t) {
6847
6847
  () => Kt(Q || [], s),
6848
6848
  [s, Q]
6849
6849
  ), xe = D(() => {
6850
- const qe = `${JSON.stringify(se ? s : Ae)}-${se}`;
6850
+ const qe = `${JSON.stringify(le ? s : Ae)}-${le}`;
6851
6851
  return qe !== ut.current ? (ut.current = qe, !0) : !1;
6852
- }, [s, Ae, se]), Me = D(async () => {
6852
+ }, [s, Ae, le]), Me = D(async () => {
6853
6853
  F(void 0), oe(0), C(!0);
6854
6854
  try {
6855
6855
  const me = await $.getHandler().searchCount({
6856
- params: se ? s : Ae,
6856
+ params: le ? s : Ae,
6857
6857
  model: n,
6858
6858
  context: u,
6859
- name_search: se
6859
+ name_search: le
6860
6860
  });
6861
6861
  F(me), oe(me);
6862
6862
  } catch (me) {
@@ -6868,7 +6868,7 @@ function ah(e, t) {
6868
6868
  s,
6869
6869
  Ae,
6870
6870
  n,
6871
- se,
6871
+ le,
6872
6872
  u,
6873
6873
  oe,
6874
6874
  b
@@ -6897,9 +6897,9 @@ function ah(e, t) {
6897
6897
  })), Zn = wt && (wt == null ? void 0 : wt.length) > 0 ? wt : void 0, Mr = ir({
6898
6898
  state: Zn
6899
6899
  });
6900
- le == null || le(Zn), lt = sr(Mr);
6900
+ ae == null || ae(Zn), lt = sr(Mr);
6901
6901
  }
6902
- const Xn = se ? s : Ae, { results: jt, attrsEvaluated: an } = await $.getHandler().searchForTree({
6902
+ const Xn = le ? s : Ae, { results: jt, attrsEvaluated: an } = await $.getHandler().searchForTree({
6903
6903
  params: Xn,
6904
6904
  limit: qe - me,
6905
6905
  offset: me,
@@ -6908,12 +6908,12 @@ function ah(e, t) {
6908
6908
  context: u,
6909
6909
  attrs: ft,
6910
6910
  order: lt,
6911
- name_search: se
6911
+ name_search: le
6912
6912
  }), Vt = jt.map((wt) => ({ id: wt.id }));
6913
6913
  if (z == null || z({
6914
6914
  model: n,
6915
6915
  params: Xn,
6916
- name_search: se,
6916
+ name_search: le,
6917
6917
  context: u,
6918
6918
  order: lt
6919
6919
  }), xe() || Ot.current !== lt)
@@ -6944,10 +6944,10 @@ function ah(e, t) {
6944
6944
  Ae,
6945
6945
  n,
6946
6946
  xe,
6947
- se,
6947
+ le,
6948
6948
  u,
6949
6949
  H,
6950
- le,
6950
+ ae,
6951
6951
  z,
6952
6952
  oe,
6953
6953
  he,
@@ -6998,7 +6998,7 @@ function ah(e, t) {
6998
6998
  let me = !1;
6999
6999
  (k == null ? void 0 : k.length) === 0 ? me = !0 : me = !1;
7000
7000
  const qe = async () => {
7001
- if (se) {
7001
+ if (le) {
7002
7002
  Te(y.current);
7003
7003
  return;
7004
7004
  }
@@ -7006,7 +7006,7 @@ function ah(e, t) {
7006
7006
  return;
7007
7007
  const Je = await $.getHandler().searchAllIds(
7008
7008
  {
7009
- params: se ? s : Ae,
7009
+ params: le ? s : Ae,
7010
7010
  model: n,
7011
7011
  context: u,
7012
7012
  totalItems: S
@@ -7027,7 +7027,7 @@ function ah(e, t) {
7027
7027
  s,
7028
7028
  Ae,
7029
7029
  n,
7030
- se,
7030
+ le,
7031
7031
  u,
7032
7032
  k == null ? void 0 : k.length,
7033
7033
  N,
@@ -7379,8 +7379,8 @@ const Wa = Ft(ah), Ji = (e, t = "14px -apple-system") => {
7379
7379
  return null;
7380
7380
  const oe = [], X = (d == null ? void 0 : d.length) > 0 ? _.filter((j) => d.includes(j.id)) : _;
7381
7381
  return z.forEach((j) => {
7382
- const le = X.reduce((se, ce) => ce[j.field] && !isNaN(ce[j.field]) ? se + ce[j.field] : se, 0);
7383
- oe.push(`${j.label}: ${Math.round(le * 100) / 100}`);
7382
+ const ae = X.reduce((le, ce) => ce[j.field] && !isNaN(ce[j.field]) ? le + ce[j.field] : le, 0);
7383
+ oe.push(`${j.label}: ${Math.round(ae * 100) / 100}`);
7384
7384
  }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: oe.join(", ") });
7385
7385
  }, [_, d, R]), re = q(() => {
7386
7386
  if (R !== null && k && k.length > 0)
@@ -7497,7 +7497,7 @@ const Ga = (e) => {
7497
7497
  h,
7498
7498
  g,
7499
7499
  m
7500
- ]), le = D(
7500
+ ]), ae = D(
7501
7501
  async (ne) => {
7502
7502
  const { params: Ae, newOffset: xe } = ne || {}, Me = Kt(Ae || F, b), { colors: Se, status: Te } = Nt(d), de = {};
7503
7503
  Se && (de.colors = Se), Te && (de.status = Te);
@@ -7542,10 +7542,10 @@ const Ga = (e) => {
7542
7542
  B,
7543
7543
  F
7544
7544
  ]
7545
- ), se = D(
7545
+ ), le = D(
7546
7546
  async (ne) => {
7547
7547
  try {
7548
- O(!0), s == null || s(!0), l && !c.current ? await j() : await le(ne), T == null || T();
7548
+ O(!0), s == null || s(!0), l && !c.current ? await j() : await ae(ne), T == null || T();
7549
7549
  } catch (Ae) {
7550
7550
  P(typeof Ae == "string" ? Ae : Ae.message), O(!1);
7551
7551
  } finally {
@@ -7557,7 +7557,7 @@ const Ga = (e) => {
7557
7557
  l,
7558
7558
  j,
7559
7559
  c,
7560
- le,
7560
+ ae,
7561
7561
  r,
7562
7562
  s
7563
7563
  ]
@@ -7584,7 +7584,7 @@ const Ga = (e) => {
7584
7584
  ), he = D(
7585
7585
  (ne) => {
7586
7586
  const { params: Ae, searchValues: xe, limit: Me, offset: Se } = ne;
7587
- _ || (n == null || n(void 0), r == null || r([]), w == null || w(xe), o == null || o(Ae), a == null || a(!1), R(!0), P(void 0), N(1), Me && (M.current = Me, S == null || S(Me)), Se && Y(Se), se({
7587
+ _ || (n == null || n(void 0), r == null || r([]), w == null || w(xe), o == null || o(Ae), a == null || a(!1), R(!0), P(void 0), N(1), Me && (M.current = Me, S == null || S(Me)), Se && Y(Se), le({
7588
7588
  params: Ae,
7589
7589
  newOffset: Se
7590
7590
  }));
@@ -7596,7 +7596,7 @@ const Ga = (e) => {
7596
7596
  w,
7597
7597
  o,
7598
7598
  a,
7599
- se,
7599
+ le,
7600
7600
  S
7601
7601
  ]
7602
7602
  ), _e = D(
@@ -7633,7 +7633,7 @@ const Ga = (e) => {
7633
7633
  return {
7634
7634
  submit: he,
7635
7635
  clear: Ue,
7636
- fetchResults: se,
7636
+ fetchResults: le,
7637
7637
  tableRefreshing: _,
7638
7638
  searchFilterLoading: x,
7639
7639
  searchError: E,
@@ -7683,8 +7683,8 @@ function uh(e, t) {
7683
7683
  setSorter: oe = void 0,
7684
7684
  setTotalItems: X = void 0,
7685
7685
  setSearchTreeNameSearch: j = void 0,
7686
- setTreeIsLoading: le = void 0,
7687
- searchValues: se = {},
7686
+ setTreeIsLoading: ae = void 0,
7687
+ searchValues: le = {},
7688
7688
  setSearchValues: ce = void 0,
7689
7689
  limit: he = kt,
7690
7690
  setLimit: _e = void 0
@@ -7719,7 +7719,7 @@ function uh(e, t) {
7719
7719
  setSearchValues: ce,
7720
7720
  searchParams: ve,
7721
7721
  setSearchVisible: M,
7722
- setTreeIsLoading: le,
7722
+ setTreeIsLoading: ae,
7723
7723
  nameSearch: s,
7724
7724
  searchNameGetDoneRef: v,
7725
7725
  context: d,
@@ -7747,11 +7747,11 @@ function uh(e, t) {
7747
7747
  g && u && S && (v.current = !1, ne());
7748
7748
  }, [Se, de, g, u, s, S]);
7749
7749
  const it = async () => {
7750
- y(!1), p(!0), O(void 0), le == null || le(!0);
7750
+ y(!1), p(!0), O(void 0), ae == null || ae(!0);
7751
7751
  try {
7752
7752
  await te(), y(!0);
7753
7753
  } catch (Pe) {
7754
- O(Pe), le == null || le(!1);
7754
+ O(Pe), ae == null || ae(!1);
7755
7755
  } finally {
7756
7756
  p(!1);
7757
7757
  }
@@ -7823,7 +7823,7 @@ function uh(e, t) {
7823
7823
  }, [nt, f, J]), Le = q(() => S != null && S.isExpandable ? P - 160 : P - (x + 240), [P, x, S == null ? void 0 : S.isExpandable]), ut = q(
7824
7824
  () => Q == null ? void 0 : Q.map((Pe) => Pe.id),
7825
7825
  [Q]
7826
- ), Ot = D(() => !S || !w ? null : /* @__PURE__ */ V(ae, { children: [
7826
+ ), Ot = D(() => !S || !w ? null : /* @__PURE__ */ V(se, { children: [
7827
7827
  /* @__PURE__ */ i(
7828
7828
  kr,
7829
7829
  {
@@ -7841,7 +7841,7 @@ function uh(e, t) {
7841
7841
  setSearchFilterHeight: R,
7842
7842
  searchError: Me,
7843
7843
  searchVisible: H,
7844
- searchValues: se
7844
+ searchValues: le
7845
7845
  }
7846
7846
  ),
7847
7847
  /* @__PURE__ */ i(
@@ -7890,7 +7890,7 @@ function uh(e, t) {
7890
7890
  m,
7891
7891
  Me,
7892
7892
  xe,
7893
- se,
7893
+ le,
7894
7894
  H,
7895
7895
  Oe,
7896
7896
  ut,
@@ -7943,7 +7943,7 @@ const Ka = Ft(uh), fh = 80, mh = (e) => {
7943
7943
  setOrder: Y,
7944
7944
  limit: k,
7945
7945
  setLimit: K
7946
- } = Ba({ useLocalState: !a }), [Z, Q] = I(!0), [J, ve] = I(), [re, H] = I([]), M = s || _, z = W(M), oe = W(w), X = W(h), j = W(), le = W({}), se = W(), ce = W([]), he = q(() => ma({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), {
7946
+ } = Ba({ useLocalState: !a }), [Z, Q] = I(!0), [J, ve] = I(), [re, H] = I([]), M = s || _, z = W(M), oe = W(w), X = W(h), j = W(), ae = W({}), le = W(), ce = W([]), he = q(() => ma({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), {
7947
7947
  fetchColumnState: _e,
7948
7948
  loading: Ue,
7949
7949
  getColumnState: Ke,
@@ -7989,11 +7989,11 @@ const Ka = Ft(uh), fh = 80, mh = (e) => {
7989
7989
  ne
7990
7990
  ]), be = D(() => v, [v]), Be = D(() => b, [b]), ye = D((Ce) => {
7991
7991
  var He, et, ot, me;
7992
- return le.current[(et = (He = Ce.node) == null ? void 0 : He.data) == null ? void 0 : et.id] ? { color: le.current[(me = (ot = Ce.node) == null ? void 0 : ot.data) == null ? void 0 : me.id] } : {};
7992
+ return ae.current[(et = (He = Ce.node) == null ? void 0 : He.data) == null ? void 0 : et.id] ? { color: ae.current[(me = (ot = Ce.node) == null ? void 0 : ot.data) == null ? void 0 : me.id] } : {};
7993
7993
  }, []), nt = D(
7994
7994
  (Ce) => {
7995
7995
  var He;
7996
- return (He = se.current) == null ? void 0 : He[Ce.id];
7996
+ return (He = le.current) == null ? void 0 : He[Ce.id];
7997
7997
  },
7998
7998
  []
7999
7999
  ), it = D(() => {
@@ -8094,13 +8094,13 @@ const Ka = Ft(uh), fh = 80, mh = (e) => {
8094
8094
  return;
8095
8095
  }
8096
8096
  const Je = Hn(n, ot), ft = tn(me);
8097
- if (le.current = {
8098
- ...le.current,
8097
+ if (ae.current = {
8098
+ ...ae.current,
8099
8099
  ...ft
8100
- }, !se.current && n.status && (se.current = {}), n.status) {
8100
+ }, !le.current && n.status && (le.current = {}), n.status) {
8101
8101
  const lt = $n(me);
8102
- se.current = {
8103
- ...se.current,
8102
+ le.current = {
8103
+ ...le.current,
8104
8104
  ...lt
8105
8105
  };
8106
8106
  }
@@ -8407,8 +8407,8 @@ function yh(e, t) {
8407
8407
  headerCheckboxState: oe,
8408
8408
  getColumnStateInProgress: X,
8409
8409
  getColumnState: j,
8410
- updateColumnState: le,
8411
- currentPage: se,
8410
+ updateColumnState: ae,
8411
+ currentPage: le,
8412
8412
  limit: ce,
8413
8413
  order: he,
8414
8414
  setTreeFirstVisibleColumn: _e,
@@ -8457,7 +8457,7 @@ function yh(e, t) {
8457
8457
  }),
8458
8458
  [y, l]
8459
8459
  );
8460
- return console.log({ currentPage: se }), /* @__PURE__ */ V(Sn, { children: [
8460
+ return /* @__PURE__ */ V(Sn, { children: [
8461
8461
  /* @__PURE__ */ i(
8462
8462
  hh,
8463
8463
  {
@@ -8477,7 +8477,7 @@ function yh(e, t) {
8477
8477
  {
8478
8478
  total: Q || 0,
8479
8479
  totalRowsLoading: Z,
8480
- page: se || 1,
8480
+ page: le || 1,
8481
8481
  pageSize: ce || fh,
8482
8482
  currentPageSelectedCount: x.length,
8483
8483
  onRequestPageChange: re,
@@ -8496,7 +8496,7 @@ function yh(e, t) {
8496
8496
  results: ve,
8497
8497
  handleRowDoubleClick: g,
8498
8498
  onRowHasBeenSelected: N,
8499
- updateColumnState: le,
8499
+ updateColumnState: ae,
8500
8500
  getColumnState: j,
8501
8501
  setTreeFirstVisibleRow: L,
8502
8502
  onGetFirstVisibleRowIndex: P,
@@ -8649,7 +8649,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
8649
8649
  initialOrder: E
8650
8650
  } = e, [P, L] = I(!1), [N, B] = I(!1), [Y, k] = I(!1), [K, Z] = I(!0), [Q, J] = I(!0), [ve, re] = I([]), [H, M] = I(!1), [z, oe] = I(
8651
8651
  x || []
8652
- ), [X, j] = I(!1), [le, se] = I(!0), [ce, he] = I(), [_e, Ue] = I(
8652
+ ), [X, j] = I(!1), [ae, le] = I(!0), [ce, he] = I(), [_e, Ue] = I(
8653
8653
  Ou(
8654
8654
  x || [],
8655
8655
  n.fields
@@ -8727,8 +8727,8 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
8727
8727
  setTotalItems: A,
8728
8728
  searchTreeNameSearch: F,
8729
8729
  setSearchTreeNameSearch: w,
8730
- setGraphIsLoading: se,
8731
- graphIsLoading: le,
8730
+ setGraphIsLoading: le,
8731
+ graphIsLoading: ae,
8732
8732
  previousView: ce,
8733
8733
  setPreviousView: he,
8734
8734
  goToResourceId: T,
@@ -8883,7 +8883,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
8883
8883
  }), A = ps(b.arch);
8884
8884
  h(A), d(!1), g == null || g(!1);
8885
8885
  } catch (b) {
8886
- return console.error(b), d(!1), g == null || g(!1), /* @__PURE__ */ i(ae, { children: JSON.stringify(b) });
8886
+ return console.error(b), d(!1), g == null || g(!1), /* @__PURE__ */ i(se, { children: JSON.stringify(b) });
8887
8887
  }
8888
8888
  }
8889
8889
  if (m || !f)
@@ -8928,7 +8928,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
8928
8928
  }
8929
8929
  );
8930
8930
  default:
8931
- return /* @__PURE__ */ i(ae, { children: `Graph ${f.type} not implemented` });
8931
+ return /* @__PURE__ */ i(se, { children: `Graph ${f.type} not implemented` });
8932
8932
  }
8933
8933
  }, An = Ft(Ch), xh = (e) => {
8934
8934
  const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: a } = e, [s, l] = I(!1), [c, u] = I(), [m, d] = I(), [f] = Xe(
@@ -9012,7 +9012,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
9012
9012
  );
9013
9013
  }
9014
9014
  default:
9015
- return /* @__PURE__ */ i(ae, { children: `Graph ${f.type} not implemented` });
9015
+ return /* @__PURE__ */ i(se, { children: `Graph ${f.type} not implemented` });
9016
9016
  }
9017
9017
  }, za = Ft(Th), { useToken: Ih } = ze, { Text: Qi } = qt, Ja = (e) => {
9018
9018
  const {
@@ -9059,7 +9059,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
9059
9059
  cursor: u ? "grab" : void 0,
9060
9060
  overflow: "hidden"
9061
9061
  },
9062
- children: s ? /* @__PURE__ */ V(ae, { children: [
9062
+ children: s ? /* @__PURE__ */ V(se, { children: [
9063
9063
  /* @__PURE__ */ i(Et, { title: s, children: /* @__PURE__ */ i(Bn, { className: "pr-1 text-xs" }) }),
9064
9064
  /* @__PURE__ */ i(Qi, { ellipsis: !0, children: t })
9065
9065
  ] }) : /* @__PURE__ */ i(
@@ -9097,7 +9097,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
9097
9097
  return /* @__PURE__ */ i($e, { ooui: t, children: n ? /* @__PURE__ */ i(or, { children: /* @__PURE__ */ i(Oh, { ooui: t }) }) : /* @__PURE__ */ i(_h, { ooui: t }) });
9098
9098
  }, _h = (e) => {
9099
9099
  var u;
9100
- const { token: t } = Ah(), { ooui: n, value: r } = e, { locale: o } = fe(), a = /* @__PURE__ */ V(ae, { children: [
9100
+ const { token: t } = Ah(), { ooui: n, value: r } = e, { locale: o } = fe(), a = /* @__PURE__ */ V(se, { children: [
9101
9101
  /* @__PURE__ */ V("span", { children: [
9102
9102
  n.label,
9103
9103
  " "
@@ -9156,7 +9156,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
9156
9156
  t && u();
9157
9157
  }, [t, o]), c && c.message !== "active_id_not_found")
9158
9158
  return /* @__PURE__ */ i(Gs, { error: c });
9159
- const { id: h, model: p, limit: g, domain: y, context: v, initialView: b, description: A } = a || {}, C = m ? za : An, S = A ? /* @__PURE__ */ V(ae, { children: [
9159
+ const { id: h, model: p, limit: g, domain: y, context: v, initialView: b, description: A } = a || {}, C = m ? za : An, S = A ? /* @__PURE__ */ V(se, { children: [
9160
9160
  /* @__PURE__ */ i(Et, { title: A, children: /* @__PURE__ */ i(Bn, { className: "pr-1 text-xs" }) }),
9161
9161
  /* @__PURE__ */ i("span", { children: (a == null ? void 0 : a.title) || "" })
9162
9162
  ] }) : /* @__PURE__ */ i("span", { children: (a == null ? void 0 : a.title) || "" });
@@ -9172,7 +9172,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
9172
9172
  card: t.card,
9173
9173
  children: [
9174
9174
  l && /* @__PURE__ */ i(Gn, {}),
9175
- !l && /* @__PURE__ */ i(ae, { children: o ? (b == null ? void 0 : b.id) && /* @__PURE__ */ i(
9175
+ !l && /* @__PURE__ */ i(se, { children: o ? (b == null ? void 0 : b.id) && /* @__PURE__ */ i(
9176
9176
  C,
9177
9177
  {
9178
9178
  view_id: b.id,
@@ -9267,7 +9267,7 @@ const vh = Ft(yh), mr = "legacy", bh = (e) => {
9267
9267
  }
9268
9268
  );
9269
9269
  };
9270
- return c ? /* @__PURE__ */ i(vt, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(
9270
+ return c ? /* @__PURE__ */ i(vt, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(
9271
9271
  rn,
9272
9272
  {
9273
9273
  mode: "multiple",
@@ -9572,7 +9572,7 @@ function zh(e, t) {
9572
9572
  forcedValues: F = {},
9573
9573
  parentWidth: w,
9574
9574
  onMustRefreshParent: T
9575
- } = e, { t: _ } = fe(), [O, x] = I(!1), [R, E] = I(), [P, L] = I(), [N] = Rt.useForm(), [B, Y] = I(), [k, K] = I(), Z = ee(Qa), [Q, J] = I(), [ve, re] = I(!1), H = W(), M = W({}), z = W({}), oe = W(!1), X = W(!1), j = W(!1), se = (w !== void 0 ? w : Q) < qh, ce = ee(Ge), { activeId: he, getPlainValues: _e } = ce || {}, Ue = W(!1), Ke = ee(
9575
+ } = e, { t: _ } = fe(), [O, x] = I(!1), [R, E] = I(), [P, L] = I(), [N] = Rt.useForm(), [B, Y] = I(), [k, K] = I(), Z = ee(Qa), [Q, J] = I(), [ve, re] = I(!1), H = W(), M = W({}), z = W({}), oe = W(!1), X = W(!1), j = W(!1), le = (w !== void 0 ? w : Q) < qh, ce = ee(Ge), { activeId: he, getPlainValues: _e } = ce || {}, Ue = W(!1), Ke = ee(
9576
9576
  xt
9577
9577
  ), {
9578
9578
  setFormIsSaving: Ie = void 0,
@@ -10114,7 +10114,7 @@ function zh(e, t) {
10114
10114
  pe && Lr(!1), St(Ve);
10115
10115
  }
10116
10116
  }
10117
- const bl = () => !P && !R ? /* @__PURE__ */ i(Qe, {}) : !n && !p || !A ? null : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ i(
10117
+ const bl = () => !P && !R ? /* @__PURE__ */ i(Qe, {}) : !n && !p || !A ? null : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(
10118
10118
  Gc,
10119
10119
  {
10120
10120
  getValues: Fe,
@@ -10144,13 +10144,13 @@ function zh(e, t) {
10144
10144
  Ko,
10145
10145
  {
10146
10146
  container: P.container,
10147
- responsiveBehaviour: se
10147
+ responsiveBehaviour: le
10148
10148
  }
10149
10149
  )
10150
10150
  }
10151
10151
  )
10152
10152
  }
10153
- ) }), wl = () => /* @__PURE__ */ V(ae, { children: [
10153
+ ) }), wl = () => /* @__PURE__ */ V(se, { children: [
10154
10154
  /* @__PURE__ */ i(pr, {}),
10155
10155
  /* @__PURE__ */ i(Ye, { justify: "end", children: /* @__PURE__ */ V(rt, { children: [
10156
10156
  /* @__PURE__ */ i(
@@ -10331,7 +10331,7 @@ const Fn = Ft(zh), _n = (e) => {
10331
10331
  },
10332
10332
  [S, C]
10333
10333
  );
10334
- return /* @__PURE__ */ V(ae, { children: [
10334
+ return /* @__PURE__ */ V(se, { children: [
10335
10335
  /* @__PURE__ */ V(
10336
10336
  Tt,
10337
10337
  {
@@ -10822,7 +10822,7 @@ function rg(e) {
10822
10822
  onClick: r
10823
10823
  }
10824
10824
  ),
10825
- d && p && /* @__PURE__ */ V(ae, { children: [
10825
+ d && p && /* @__PURE__ */ V(se, { children: [
10826
10826
  /* @__PURE__ */ i(Ut, {}),
10827
10827
  /* @__PURE__ */ i(
10828
10828
  yt,
@@ -10864,7 +10864,7 @@ function rg(e) {
10864
10864
  onClick: o
10865
10865
  }
10866
10866
  ),
10867
- y && /* @__PURE__ */ V(ae, { children: [
10867
+ y && /* @__PURE__ */ V(se, { children: [
10868
10868
  /* @__PURE__ */ i(Ut, {}),
10869
10869
  /* @__PURE__ */ i(
10870
10870
  Lt,
@@ -10881,7 +10881,7 @@ function rg(e) {
10881
10881
  ...a === "form" ? w : O
10882
10882
  }
10883
10883
  ),
10884
- a === "form" && /* @__PURE__ */ V(ae, { children: [
10884
+ a === "form" && /* @__PURE__ */ V(se, { children: [
10885
10885
  /* @__PURE__ */ i(Ut, {}),
10886
10886
  /* @__PURE__ */ i(
10887
10887
  Lt,
@@ -10933,7 +10933,7 @@ const sl = Ze(
10933
10933
  onNextItem: r
10934
10934
  }) => {
10935
10935
  const { t: o } = fe();
10936
- return /* @__PURE__ */ V(ae, { children: [
10936
+ return /* @__PURE__ */ V(se, { children: [
10937
10937
  /* @__PURE__ */ i(Ut, {}),
10938
10938
  /* @__PURE__ */ i(
10939
10939
  yt,
@@ -11016,15 +11016,15 @@ const sg = (e) => {
11016
11016
  domain: z
11017
11017
  } = r, oe = r.type === "many2many", { id: X } = r, j = a.filter(
11018
11018
  (te) => (te.values || te.treeValues) && te.operation !== "pendingRemove"
11019
- ), le = W();
11019
+ ), ae = W();
11020
11020
  ie(() => {
11021
- if (le.current !== s) {
11022
- le.current = s, se();
11021
+ if (ae.current !== s) {
11022
+ ae.current = s, le();
11023
11023
  return;
11024
11024
  }
11025
- se();
11025
+ le();
11026
11026
  }, [a, s]);
11027
- const se = D(() => {
11027
+ const le = D(() => {
11028
11028
  (s === "form" && a.some((te) => !te.values) || s === "tree" && a.some((te) => !te.treeValues)) && he();
11029
11029
  }, [a, s]);
11030
11030
  ie(() => {
@@ -11246,7 +11246,7 @@ const sg = (e) => {
11246
11246
  const Be = () => {
11247
11247
  var we, Fe, Re, Oe;
11248
11248
  if (s === "form")
11249
- return j.length === 0 ? v("noCurrentEntries") : s !== le.current && a.some((Le) => !Le.values) ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ i(
11249
+ return j.length === 0 ? v("noCurrentEntries") : s !== ae.current && a.some((Le) => !Le.values) ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ i(
11250
11250
  Fn,
11251
11251
  {
11252
11252
  ref: ve,
@@ -11316,7 +11316,7 @@ const sg = (e) => {
11316
11316
  if (F)
11317
11317
  return /* @__PURE__ */ i(vt, { className: "mt-10", message: F, type: "error", banner: !0 });
11318
11318
  const ye = N;
11319
- return C ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ V(ae, { children: [
11319
+ return C ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ V(se, { children: [
11320
11320
  /* @__PURE__ */ i(
11321
11321
  ll,
11322
11322
  {
@@ -11974,8 +11974,8 @@ const mg = ({
11974
11974
  relation: h,
11975
11975
  formView: a.get("form")
11976
11976
  }), {
11977
- showSearchModal: le,
11978
- onSelectSearchValues: se,
11977
+ showSearchModal: ae,
11978
+ onSelectSearchValues: le,
11979
11979
  onCloseSearchModal: ce,
11980
11980
  searchItem: he
11981
11981
  } = pg({
@@ -12024,7 +12024,7 @@ const mg = ({
12024
12024
  var Se;
12025
12025
  return ((Se = a.get("form")) == null ? void 0 : Se.fields) !== void 0;
12026
12026
  }, [a]);
12027
- return /* @__PURE__ */ V(ae, { children: [
12027
+ return /* @__PURE__ */ V(se, { children: [
12028
12028
  /* @__PURE__ */ i(
12029
12029
  ll,
12030
12030
  {
@@ -12116,8 +12116,8 @@ const mg = ({
12116
12116
  domain: _,
12117
12117
  model: h,
12118
12118
  context: T,
12119
- visible: le,
12120
- onSelectValues: se,
12119
+ visible: ae,
12120
+ onSelectValues: le,
12121
12121
  onCloseModal: ce
12122
12122
  }
12123
12123
  ),
@@ -12319,7 +12319,7 @@ function Og(e) {
12319
12319
  children: r.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ i(
12320
12320
  Fg,
12321
12321
  {
12322
- tab: /* @__PURE__ */ V(ae, { children: [
12322
+ tab: /* @__PURE__ */ V(se, { children: [
12323
12323
  a(s.icon),
12324
12324
  " ",
12325
12325
  s.label
@@ -12375,7 +12375,7 @@ const { useToken: Rg } = ze, { TextArea: mo } = mt, Dg = (e) => {
12375
12375
  formHasChanges: u,
12376
12376
  elementHasLostFocus: m
12377
12377
  } = a || {}, [d, f] = I(!1), { t: h } = fe();
12378
- return s ? /* @__PURE__ */ V(ae, { children: [
12378
+ return s ? /* @__PURE__ */ V(se, { children: [
12379
12379
  /* @__PURE__ */ i(
12380
12380
  "div",
12381
12381
  {
@@ -12422,7 +12422,7 @@ const { useToken: Rg } = ze, { TextArea: mo } = mt, Dg = (e) => {
12422
12422
  }
12423
12423
  }
12424
12424
  )
12425
- ] }) : /* @__PURE__ */ V(ae, { children: [
12425
+ ] }) : /* @__PURE__ */ V(se, { children: [
12426
12426
  /* @__PURE__ */ i(Ye, { gutter: 8, wrap: !1, children: /* @__PURE__ */ i(
12427
12427
  mo,
12428
12428
  {
@@ -13039,7 +13039,7 @@ function Zg(e) {
13039
13039
  );
13040
13040
  return ie(() => {
13041
13041
  p();
13042
- }, [p]), /* @__PURE__ */ V(ae, { children: [
13042
+ }, [p]), /* @__PURE__ */ V(se, { children: [
13043
13043
  /* @__PURE__ */ i(
13044
13044
  Xg,
13045
13045
  {
@@ -13303,7 +13303,7 @@ function ty({ toolbar: e }) {
13303
13303
  T
13304
13304
  ]
13305
13305
  ), s ? /* @__PURE__ */ V(rt, { wrap: !0, children: [
13306
- F && /* @__PURE__ */ V(ae, { children: [
13306
+ F && /* @__PURE__ */ V(se, { children: [
13307
13307
  /* @__PURE__ */ i(Qe, {}),
13308
13308
  /* @__PURE__ */ i(st, {}),
13309
13309
  /* @__PURE__ */ i(st, {})
@@ -13735,7 +13735,7 @@ const ly = (e) => {
13735
13735
  c == null ? void 0 : c.search_fields
13736
13736
  ]
13737
13737
  );
13738
- return !n || !t ? null : /* @__PURE__ */ V(ae, { children: [
13738
+ return !n || !t ? null : /* @__PURE__ */ V(se, { children: [
13739
13739
  /* @__PURE__ */ i(Dr, { title: t.title || t.name, children: /* @__PURE__ */ i(
13740
13740
  ay,
13741
13741
  {
@@ -13795,7 +13795,7 @@ const ly = (e) => {
13795
13795
  setResults: d,
13796
13796
  setCurrentItemIndex: f
13797
13797
  } = e;
13798
- return t ? /* @__PURE__ */ V(ae, { children: [
13798
+ return t ? /* @__PURE__ */ V(se, { children: [
13799
13799
  /* @__PURE__ */ i(Dr, { children: /* @__PURE__ */ i(ny, { toolbar: s == null ? void 0 : s.toolbar }) }),
13800
13800
  /* @__PURE__ */ i(
13801
13801
  Fn,
@@ -13978,16 +13978,16 @@ function gy(e, t) {
13978
13978
  order: A
13979
13979
  } = e, [C, S] = I(), [F, w] = I([]), [T, _] = I(!0), O = f || void 0, [x, R] = I(
13980
13980
  O
13981
- ), [E, P] = I([]), [L, N] = I(), [B, Y] = I([]), [k, K] = I(), [Z, Q] = I(0), [J, ve] = I(!1), [re, H] = I(!1), [M, z] = I(), { t: oe } = fe(), X = W(), j = W(), le = ee(
13981
+ ), [E, P] = I([]), [L, N] = I(), [B, Y] = I([]), [k, K] = I(), [Z, Q] = I(0), [J, ve] = I(!1), [re, H] = I(!1), [M, z] = I(), { t: oe } = fe(), X = W(), j = W(), ae = ee(
13982
13982
  _t
13983
13983
  ), {
13984
- setCurrentView: se,
13984
+ setCurrentView: le,
13985
13985
  setCurrentId: ce,
13986
13986
  tabs: he,
13987
13987
  activeKey: _e,
13988
13988
  openAction: Ue,
13989
13989
  onRemoveTab: Ke
13990
- } = le || {};
13990
+ } = ae || {};
13991
13991
  Jt(
13992
13992
  "ctrl+g,command+g",
13993
13993
  () => {
@@ -14001,9 +14001,9 @@ function gy(e, t) {
14001
14001
  }
14002
14002
  const ne = D(
14003
14003
  (de) => {
14004
- S(de), se == null || se(de);
14004
+ S(de), le == null || le(de);
14005
14005
  },
14006
- [se]
14006
+ [le]
14007
14007
  );
14008
14008
  Dt(t, () => ({
14009
14009
  canWeClose: xe
@@ -14122,7 +14122,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
14122
14122
  if (_e === c) {
14123
14123
  ce == null || ce(x);
14124
14124
  const de = { action_id: h, action_type: p };
14125
- se == null || se({ ...C, extra: de });
14125
+ le == null || le({ ...C, extra: de });
14126
14126
  }
14127
14127
  }, [he, _e]);
14128
14128
  async function xe() {
@@ -14388,14 +14388,14 @@ function wy(e) {
14388
14388
  } = e, [c, u] = I(!1), [m, d] = I(!1), [f, h] = I(), [p, g] = I(), [y, v] = I(), [b, A] = I(1), [C, S] = I(0), F = W(kt), w = W([]), [T, _] = I(0), [O, x] = I([]), [R, E] = I(void 0), [P, L] = I(), [N, B] = I(), [Y, k] = I(), [K, Z] = I(!1), Q = W([]), J = (j) => {
14389
14389
  Z(!0), A(j), S((j - 1) * F.current);
14390
14390
  }, ve = async () => {
14391
- const j = Q.current.length > 0 ? Q.current : a, le = Kt(w.current, j), { colors: se } = Nt(p), { totalItems: ce, results: he, attrsEvaluated: _e } = await $.getHandler().searchForTree({
14392
- params: le,
14391
+ const j = Q.current.length > 0 ? Q.current : a, ae = Kt(w.current, j), { colors: le } = Nt(p), { totalItems: ce, results: he, attrsEvaluated: _e } = await $.getHandler().searchForTree({
14392
+ params: ae,
14393
14393
  limit: F.current,
14394
14394
  offset: C,
14395
14395
  model: f,
14396
14396
  fields: p.fields,
14397
14397
  context: l,
14398
- attrs: se && { colors: se }
14398
+ attrs: le && { colors: le }
14399
14399
  });
14400
14400
  E(tn(_e));
14401
14401
  const Ue = pn({
@@ -14420,8 +14420,8 @@ function wy(e) {
14420
14420
  d(!1), u(!0), k(void 0);
14421
14421
  try {
14422
14422
  j === "action" ? await M() : await z(), d(!0);
14423
- } catch (le) {
14424
- k(le);
14423
+ } catch (ae) {
14424
+ k(ae);
14425
14425
  } finally {
14426
14426
  u(!1);
14427
14427
  }
@@ -14439,21 +14439,21 @@ function wy(e) {
14439
14439
  context: l
14440
14440
  });
14441
14441
  v(j);
14442
- const le = await $.getHandler().getView({
14442
+ const ae = await $.getHandler().getView({
14443
14443
  model: n,
14444
14444
  type: "tree",
14445
14445
  id: r,
14446
14446
  context: l
14447
14447
  });
14448
- g(le);
14448
+ g(ae);
14449
14449
  };
14450
14450
  ie(() => {
14451
14451
  t ? H("action") : n && H("model");
14452
14452
  }, [t, n]);
14453
14453
  const oe = (j) => {
14454
- const { id: le } = j;
14454
+ const { id: ae } = j;
14455
14455
  o({
14456
- id: le,
14456
+ id: ae,
14457
14457
  model: f,
14458
14458
  treeView: p
14459
14459
  });
@@ -14475,12 +14475,12 @@ function wy(e) {
14475
14475
  sorter: P,
14476
14476
  onChangeSort: (j) => {
14477
14477
  L == null || L(j);
14478
- const le = pn({
14478
+ const ae = pn({
14479
14479
  resultsToSort: O,
14480
14480
  sorter: j,
14481
14481
  fields: { ...p.fields, ...y.fields }
14482
14482
  });
14483
- x(le);
14483
+ x(ae);
14484
14484
  },
14485
14485
  context: l
14486
14486
  }
@@ -14730,12 +14730,12 @@ function xy(e, t) {
14730
14730
  );
14731
14731
  }
14732
14732
  let j;
14733
- const le = J.find((ce) => {
14733
+ const ae = J.find((ce) => {
14734
14734
  const [, he] = ce;
14735
14735
  return he === "tree";
14736
14736
  });
14737
- if (le) {
14738
- const [ce, he] = le, {
14737
+ if (ae) {
14738
+ const [ce, he] = ae, {
14739
14739
  actionId: _e,
14740
14740
  actionType: Ue,
14741
14741
  title: Ke,
@@ -14756,7 +14756,7 @@ function xy(e, t) {
14756
14756
  Ja,
14757
14757
  {
14758
14758
  id: B,
14759
- title: Q ? /* @__PURE__ */ V(ae, { children: [
14759
+ title: Q ? /* @__PURE__ */ V(se, { children: [
14760
14760
  /* @__PURE__ */ i(Et, { title: Q, children: /* @__PURE__ */ i(Bn, { className: "pr-1 text-xs" }) }),
14761
14761
  /* @__PURE__ */ i("span", { children: Z })
14762
14762
  ] }) : /* @__PURE__ */ i("span", { children: Z }),
@@ -14831,7 +14831,7 @@ const Ty = Ft(xy), Iy = (e) => {
14831
14831
  _.push({ id: x, operation: "pendingLink" });
14832
14832
  }), A(_);
14833
14833
  };
14834
- return m && s.length === 0 ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ i(ae, { children: /* @__PURE__ */ V("div", { className: "flex flex-row", children: [
14834
+ return m && s.length === 0 ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ V("div", { className: "flex flex-row", children: [
14835
14835
  /* @__PURE__ */ i(
14836
14836
  En.Group,
14837
14837
  {
@@ -15274,19 +15274,19 @@ function rv(e, t) {
15274
15274
  else if (j === "dashboard")
15275
15275
  M.push([void 0, "dashboard"]);
15276
15276
  else {
15277
- const { view_id: le } = await $.getHandler().getView({
15277
+ const { view_id: ae } = await $.getHandler().getView({
15278
15278
  model: K,
15279
15279
  type: j,
15280
15280
  id: X,
15281
15281
  context: { ...l, ...B }
15282
15282
  });
15283
- M.push([le, j]);
15283
+ M.push([ae, j]);
15284
15284
  }
15285
15285
  }
15286
15286
  let z;
15287
15287
  if (_) {
15288
15288
  const [oe, X] = M.find(
15289
- ([j, le]) => le === _
15289
+ ([j, ae]) => ae === _
15290
15290
  );
15291
15291
  z = { id: oe, type: X };
15292
15292
  } else {
@@ -15411,24 +15411,24 @@ function rv(e, t) {
15411
15411
  limit: re
15412
15412
  } = L, H = ve === "tree", M = [];
15413
15413
  for (const j of Z) {
15414
- const [le, se] = j;
15415
- if (le)
15414
+ const [ae, le] = j;
15415
+ if (ae)
15416
15416
  M.push(j);
15417
- else if (se === "dashboard")
15417
+ else if (le === "dashboard")
15418
15418
  M.push([void 0, "dashboard"]);
15419
15419
  else {
15420
15420
  const { view_id: ce } = await $.getHandler().getView({
15421
15421
  model: K,
15422
- type: se,
15423
- id: le,
15422
+ type: le,
15423
+ id: ae,
15424
15424
  context: { ...l, ...B }
15425
15425
  });
15426
- M.push([ce, se]);
15426
+ M.push([ce, le]);
15427
15427
  }
15428
15428
  }
15429
15429
  let z, oe;
15430
15430
  if (O == null) {
15431
- const j = M.find((le) => le[0] === void 0);
15431
+ const j = M.find((ae) => ae[0] === void 0);
15432
15432
  z = void 0, oe = j[1];
15433
15433
  } else
15434
15434
  [z, oe] = M.find((j) => j[0] === void 0 ? !1 : j[0] === O);
@@ -15645,7 +15645,7 @@ function lb() {
15645
15645
  const e = ee(
15646
15646
  _t
15647
15647
  ), { activeKey: t, tabs: n, onRemoveTab: r, onChangeTab: o } = e || {};
15648
- return /* @__PURE__ */ i(ae, { children: n.map((a) => /* @__PURE__ */ i(
15648
+ return /* @__PURE__ */ i(se, { children: n.map((a) => /* @__PURE__ */ i(
15649
15649
  iv,
15650
15650
  {
15651
15651
  tabKey: a.key,
@@ -15670,7 +15670,7 @@ function cb() {
15670
15670
  const e = ee(
15671
15671
  _t
15672
15672
  ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((r) => /* @__PURE__ */ i(av, { tab: r }, r.key))) || null;
15673
- return /* @__PURE__ */ i(ae, { children: n });
15673
+ return /* @__PURE__ */ i(se, { children: n });
15674
15674
  }
15675
15675
  const { useToken: lv } = ze, db = (e) => {
15676
15676
  const {