@gisce/react-ooui 2.59.0-alpha.2 → 2.59.0-alpha.3

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.
@@ -472,7 +472,7 @@ const xo = (e) => {
472
472
  async function I() {
473
473
  l && o && (y(!0), await p({ type: l, action: o, context: d }), y(!1));
474
474
  }
475
- function T() {
475
+ function A() {
476
476
  if (c) {
477
477
  Bt({
478
478
  confirmMessage: c,
@@ -492,7 +492,7 @@ const xo = (e) => {
492
492
  yl.Button,
493
493
  {
494
494
  disabled: !s || m,
495
- onClick: T,
495
+ onClick: A,
496
496
  icon: /* @__PURE__ */ i(ur, {}),
497
497
  type: f ? "primary" : void 0,
498
498
  overlay: /* @__PURE__ */ i(
@@ -546,8 +546,8 @@ const xo = (e) => {
546
546
  if (g)
547
547
  return /* @__PURE__ */ i(Ot, {});
548
548
  if (d) {
549
- const T = ft(d);
550
- return T && /* @__PURE__ */ i(T, {});
549
+ const A = ft(d);
550
+ return A && /* @__PURE__ */ i(A, {});
551
551
  }
552
552
  }
553
553
  return /* @__PURE__ */ i(
@@ -633,10 +633,10 @@ const Cs = (e) => {
633
633
  async function w() {
634
634
  m(!0);
635
635
  try {
636
- const A = await I();
637
- await T(A);
638
- } catch (A) {
639
- dt(A);
636
+ const T = await I();
637
+ await A(T);
638
+ } catch (T) {
639
+ dt(T);
640
640
  }
641
641
  m(!1);
642
642
  }
@@ -651,9 +651,9 @@ const Cs = (e) => {
651
651
  }));
652
652
  return f == null || f(_), _;
653
653
  }
654
- async function T(A) {
654
+ async function A(T) {
655
655
  const _ = {};
656
- for (const R of A) {
656
+ for (const R of T) {
657
657
  const C = (await k.getHandler().readObjects({
658
658
  model: r,
659
659
  ids: [o],
@@ -665,17 +665,17 @@ const Cs = (e) => {
665
665
  v.current = _, y(_);
666
666
  }
667
667
  function S() {
668
- return u.map((A, _) => /* @__PURE__ */ P(Be, { style: { paddingBottom: 20 }, children: [
669
- /* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children: A.name }),
668
+ return u.map((T, _) => /* @__PURE__ */ P(Be, { style: { paddingBottom: 20 }, children: [
669
+ /* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children: T.name }),
670
670
  /* @__PURE__ */ i(Ie, { flex: "auto", children: /* @__PURE__ */ i(
671
671
  fc,
672
672
  {
673
673
  rows: 4,
674
- value: g[A.code] || "",
674
+ value: g[T.code] || "",
675
675
  onChange: (R) => {
676
676
  y({
677
677
  ...g,
678
- [A.code]: R.target.value
678
+ [T.code]: R.target.value
679
679
  });
680
680
  },
681
681
  disabled: h
@@ -686,18 +686,18 @@ const Cs = (e) => {
686
686
  async function O() {
687
687
  p(!0);
688
688
  try {
689
- for (const A of Object.keys(g))
690
- g[A] !== v.current[A] && await k.getHandler().update({
689
+ for (const T of Object.keys(g))
690
+ g[T] !== v.current[T] && await k.getHandler().update({
691
691
  model: r,
692
692
  id: o,
693
- values: { [a]: g[A] },
693
+ values: { [a]: g[T] },
694
694
  context: {
695
- lang: A
695
+ lang: T
696
696
  },
697
697
  fields: {}
698
698
  });
699
- } catch (A) {
700
- dt(A);
699
+ } catch (T) {
700
+ dt(T);
701
701
  }
702
702
  p(!1), s();
703
703
  }
@@ -871,12 +871,12 @@ const As = ze(
871
871
  d(!1);
872
872
  }, []), I = E(() => {
873
873
  d(!1), l == null || l();
874
- }, [l]), T = g ? nd : td;
874
+ }, [l]), A = g ? nd : td;
875
875
  return a ? /* @__PURE__ */ P(oe, { children: [
876
876
  /* @__PURE__ */ i("div", { onClick: v, children: /* @__PURE__ */ i(
877
877
  Dn,
878
878
  {
879
- component: T,
879
+ component: A,
880
880
  ooui: e,
881
881
  value: t,
882
882
  disabled: !0,
@@ -1536,12 +1536,12 @@ const Zt = ({
1536
1536
  summaryField: v,
1537
1537
  titleField: w,
1538
1538
  iconField: I,
1539
- colorField: T
1539
+ colorField: A
1540
1540
  } = r, S = a.filter((F) => F.values), O = ee(Ue), { getContext: b } = O || {};
1541
1541
  Rt(() => {
1542
1542
  _();
1543
1543
  }, [a]);
1544
- const A = (F) => {
1544
+ const T = (F) => {
1545
1545
  o == null || o({
1546
1546
  items: F
1547
1547
  });
@@ -1562,7 +1562,7 @@ const Zt = ({
1562
1562
  context: { ...b == null ? void 0 : b(), ...g },
1563
1563
  currentView: "form"
1564
1564
  });
1565
- A(F);
1565
+ T(F);
1566
1566
  } catch (F) {
1567
1567
  u(F);
1568
1568
  } finally {
@@ -1592,7 +1592,7 @@ const Zt = ({
1592
1592
  }
1593
1593
  )
1594
1594
  };
1595
- return (L = F.values) != null && L[I] && (D.dot = R(F.values[I])), (B = F.values) != null && B[T] && (D.color = !ws(F.values[T]) && !bs(F.values[T]) && !F.values[T].toString().startsWith("#") ? Nn(F.values[T]) : F.values[T]), D;
1595
+ return (L = F.values) != null && L[I] && (D.dot = R(F.values[I])), (B = F.values) != null && B[A] && (D.color = !ws(F.values[A]) && !bs(F.values[A]) && !F.values[A].toString().startsWith("#") ? Nn(F.values[A]) : F.values[A]), D;
1596
1596
  });
1597
1597
  return /* @__PURE__ */ P(oe, { children: [
1598
1598
  /* @__PURE__ */ i(Ji, { style: { padding: "1rem" }, items: C }),
@@ -2029,10 +2029,10 @@ async function $s({
2029
2029
  values: n,
2030
2030
  context: l
2031
2031
  }) : [], y = [];
2032
- for (const T of u) {
2033
- const [S, O] = T;
2032
+ for (const A of u) {
2033
+ const [S, O] = A;
2034
2034
  if (S)
2035
- y.push(T);
2035
+ y.push(A);
2036
2036
  else {
2037
2037
  const { view_id: b } = await k.getHandler().getView({
2038
2038
  model: c,
@@ -2074,25 +2074,25 @@ const Gd = (e) => {
2074
2074
  });
2075
2075
  if (!g.active_id)
2076
2076
  throw s(v), new Error("active_id_not_found");
2077
- const { views: w } = v, I = w.find((T) => {
2078
- const [, S] = T;
2077
+ const { views: w } = v, I = w.find((A) => {
2078
+ const [, S] = A;
2079
2079
  return S === "tree";
2080
2080
  });
2081
2081
  if (I) {
2082
- const [T, S] = I, {
2082
+ const [A, S] = I, {
2083
2083
  actionId: O,
2084
2084
  actionType: b,
2085
- title: A,
2085
+ title: T,
2086
2086
  model: _
2087
2087
  } = v;
2088
2088
  c({
2089
2089
  domain: v.domain,
2090
2090
  action_id: O,
2091
2091
  action_type: b,
2092
- name: A,
2092
+ name: T,
2093
2093
  res_id: !1,
2094
2094
  res_model: _,
2095
- view_id: T,
2095
+ view_id: A,
2096
2096
  view_type: S,
2097
2097
  overrideUnsettedLimit: !0,
2098
2098
  values: {
@@ -2341,7 +2341,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2341
2341
  operator: f,
2342
2342
  manualIds: d,
2343
2343
  fixedHeight: m
2344
- } = e, [h, p] = x(!1), [g, y] = x(), [v, w] = x(0), [I, T] = x(), [S, O] = x(), [b, A] = x(), [_, R] = x(), [C] = Je(
2344
+ } = e, [h, p] = x(!1), [g, y] = x(), [v, w] = x(0), [I, A] = x(), [S, O] = x(), [b, T] = x(), [_, R] = x(), [C] = Je(
2345
2345
  k.getHandler().searchAllIds
2346
2346
  ), [F] = Je(
2347
2347
  k.getHandler().readObjects
@@ -2420,7 +2420,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2420
2420
  $ = await L({
2421
2421
  domain: z,
2422
2422
  isTotal: !0
2423
- }), T($);
2423
+ }), A($);
2424
2424
  }
2425
2425
  if ($ ? (K = Math.round(X / $ * 100 * 100) / 100, w(K)) : w(0), o) {
2426
2426
  const z = await N({
@@ -2437,9 +2437,9 @@ const { getValueForOperator: si } = os, qd = (e) => {
2437
2437
  values: { value: X, percent: K },
2438
2438
  context: r
2439
2439
  });
2440
- A(z);
2440
+ T(z);
2441
2441
  } else
2442
- A(l);
2442
+ T(l);
2443
2443
  R(void 0);
2444
2444
  } catch (X) {
2445
2445
  R(JSON.stringify(X));
@@ -2472,12 +2472,12 @@ const { getValueForOperator: si } = os, qd = (e) => {
2472
2472
  k.getHandler().getFields
2473
2473
  ), [I] = Je(
2474
2474
  k.getHandler().readObjects
2475
- ), [T] = Je(k.getHandler().search), S = E(async () => {
2475
+ ), [A] = Je(k.getHandler().search), S = E(async () => {
2476
2476
  u(!0), d(void 0), v(n.type || "line");
2477
2477
  const O = Jd({ ooui: n });
2478
- let b, A;
2478
+ let b, T;
2479
2479
  try {
2480
- ({ values: b, fields: A } = await Zd({
2480
+ ({ values: b, fields: T } = await Zd({
2481
2481
  model: t,
2482
2482
  domain: r,
2483
2483
  context: o,
@@ -2488,7 +2488,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2488
2488
  methods: {
2489
2489
  getFields: w,
2490
2490
  readObjects: I,
2491
- search: T
2491
+ search: A
2492
2492
  }
2493
2493
  }));
2494
2494
  } catch (_) {
@@ -2496,7 +2496,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2496
2496
  return;
2497
2497
  }
2498
2498
  try {
2499
- if (!b || !A)
2499
+ if (!b || !T)
2500
2500
  return d("No values or fields returned"), u(!1), {
2501
2501
  loading: c,
2502
2502
  error: f,
@@ -2509,7 +2509,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2509
2509
  const _ = zd({
2510
2510
  ooui: n,
2511
2511
  values: b,
2512
- fields: A,
2512
+ fields: T,
2513
2513
  options: {
2514
2514
  uninformedString: s
2515
2515
  }
@@ -2533,7 +2533,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
2533
2533
  n,
2534
2534
  m,
2535
2535
  I,
2536
- T,
2536
+ A,
2537
2537
  y,
2538
2538
  s
2539
2539
  ]);
@@ -3004,11 +3004,11 @@ const du = ({
3004
3004
  setSorter: v,
3005
3005
  totalItems: w,
3006
3006
  setTotalItems: I,
3007
- setSelectedRowItems: T,
3007
+ setSelectedRowItems: A,
3008
3008
  selectedRowItems: S,
3009
3009
  searchTreeNameSearch: O,
3010
3010
  setSearchTreeNameSearch: b,
3011
- goToResourceId: A,
3011
+ goToResourceId: T,
3012
3012
  limit: _,
3013
3013
  isActive: R,
3014
3014
  initialSearchParams: C
@@ -3075,7 +3075,7 @@ const du = ({
3075
3075
  attachments: z,
3076
3076
  setAttachments: Q,
3077
3077
  selectedRowItems: S,
3078
- setSelectedRowItems: T,
3078
+ setSelectedRowItems: A,
3079
3079
  duplicatingItem: xe,
3080
3080
  setDuplicatingItem: fe,
3081
3081
  setSearchParams: j,
@@ -3092,7 +3092,7 @@ const du = ({
3092
3092
  graphIsLoading: te,
3093
3093
  previousView: ne,
3094
3094
  setPreviousView: me,
3095
- goToResourceId: A,
3095
+ goToResourceId: T,
3096
3096
  searchValues: he,
3097
3097
  setSearchValues: ye,
3098
3098
  limit: J,
@@ -3505,7 +3505,7 @@ const { useToken: Tu } = He, { Text: di } = Ut, Ws = (e) => {
3505
3505
  t && u();
3506
3506
  }, [t, o]), c && c.message !== "active_id_not_found")
3507
3507
  return /* @__PURE__ */ i(Ns, { error: c });
3508
- const { id: h, model: p, limit: g, domain: y, context: v, initialView: w, description: I } = a || {}, T = f ? Us : vn, S = I ? /* @__PURE__ */ P(oe, { children: [
3508
+ const { id: h, model: p, limit: g, domain: y, context: v, initialView: w, description: I } = a || {}, A = f ? Us : vn, S = I ? /* @__PURE__ */ P(oe, { children: [
3509
3509
  /* @__PURE__ */ i(Tt, { title: I, children: /* @__PURE__ */ i($n, { className: "pr-1 text-xs" }) }),
3510
3510
  /* @__PURE__ */ i("span", { children: (a == null ? void 0 : a.title) || "" })
3511
3511
  ] }) : /* @__PURE__ */ i("span", { children: (a == null ? void 0 : a.title) || "" });
@@ -3521,7 +3521,7 @@ const { useToken: Tu } = He, { Text: di } = Ut, Ws = (e) => {
3521
3521
  children: [
3522
3522
  l && /* @__PURE__ */ i(Ln, {}),
3523
3523
  !l && /* @__PURE__ */ i(oe, { children: o ? (w == null ? void 0 : w.id) && /* @__PURE__ */ i(
3524
- T,
3524
+ A,
3525
3525
  {
3526
3526
  view_id: w.id,
3527
3527
  model: p,
@@ -3597,7 +3597,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3597
3597
  });
3598
3598
  O = [...O, ..._];
3599
3599
  }
3600
- const A = (await k.getHandler().search({
3600
+ const T = (await k.getHandler().search({
3601
3601
  model: m,
3602
3602
  params: O,
3603
3603
  fieldsToRetrieve: [g],
@@ -3607,23 +3607,23 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3607
3607
  let C = R;
3608
3608
  return Array.isArray(R) && (C = R[1]), { label: C, value: _.id };
3609
3609
  });
3610
- l(A);
3610
+ l(T);
3611
3611
  } catch (b) {
3612
3612
  u(b);
3613
3613
  } finally {
3614
3614
  d(!1);
3615
3615
  }
3616
3616
  }
3617
- const T = (O) => {
3617
+ const A = (O) => {
3618
3618
  const b = o.map((_) => O.includes(_.id) ? _.operation === "pendingRemove" ? {
3619
3619
  ..._,
3620
3620
  operation: "pendingLink"
3621
- } : _ : { id: _.id, operation: "pendingRemove" }), A = b.map((_) => _.id);
3622
- O.filter((_) => !A.includes(_)).forEach((_) => {
3621
+ } : _ : { id: _.id, operation: "pendingRemove" }), T = b.map((_) => _.id);
3622
+ O.filter((_) => !T.includes(_)).forEach((_) => {
3623
3623
  b.push({ id: _, operation: "pendingLink" });
3624
3624
  }), w(b);
3625
3625
  }, S = (O) => {
3626
- const { label: b, closable: A, onClose: _ } = O, R = (D) => {
3626
+ const { label: b, closable: T, onClose: _ } = O, R = (D) => {
3627
3627
  D.preventDefault(), D.stopPropagation();
3628
3628
  }, C = Nn(b), F = Ps(C);
3629
3629
  return /* @__PURE__ */ i(
@@ -3631,7 +3631,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3631
3631
  {
3632
3632
  color: C,
3633
3633
  onMouseDown: R,
3634
- closable: A,
3634
+ closable: T,
3635
3635
  onClose: _,
3636
3636
  closeIcon: /* @__PURE__ */ i("span", { style: { color: F.text }, children: "X" }),
3637
3637
  children: b
@@ -3647,7 +3647,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3647
3647
  bordered: !p,
3648
3648
  disabled: p,
3649
3649
  options: s,
3650
- onChange: T,
3650
+ onChange: A,
3651
3651
  loading: f,
3652
3652
  filterOption: (O, b) => b.label.toLowerCase().includes(O.toString())
3653
3653
  }
@@ -3880,7 +3880,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3880
3880
  bt
3881
3881
  ), { openAction: u } = c || {}, f = Y([]), { t: d } = ce();
3882
3882
  At(t, () => ({
3883
- openActionModal: T,
3883
+ openActionModal: A,
3884
3884
  processAction: w
3885
3885
  }));
3886
3886
  const [m, h] = x(!1), [p, g] = x(
@@ -3889,13 +3889,13 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3889
3889
  }
3890
3890
  );
3891
3891
  async function y(b) {
3892
- const { reportData: A, fields: _, values: R, context: C = {} } = b, {
3892
+ const { reportData: T, fields: _, values: R, context: C = {} } = b, {
3893
3893
  context: F,
3894
3894
  model: D,
3895
3895
  datas: V = {},
3896
3896
  report_name: N,
3897
3897
  type: L
3898
- } = A;
3898
+ } = T;
3899
3899
  if (L !== "ir.actions.report.xml") {
3900
3900
  dt(`${L} action not supported`);
3901
3901
  return;
@@ -3921,14 +3921,14 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3921
3921
  }
3922
3922
  }
3923
3923
  async function v(b) {
3924
- let A;
3924
+ let T;
3925
3925
  try {
3926
- if (A = await k.getHandler().getReport({
3926
+ if (T = await k.getHandler().getReport({
3927
3927
  id: b
3928
- }), A.state && a.current === !0) {
3928
+ }), T.state && a.current === !0) {
3929
3929
  a.current = !1, clearInterval(o.current), l(!1);
3930
- const _ = await fn(A.result);
3931
- xr(A.result, _.mime);
3930
+ const _ = await fn(T.result);
3931
+ xr(T.result, _.mime);
3932
3932
  }
3933
3933
  } catch (_) {
3934
3934
  a.current = !1, clearInterval(o.current), l(!1), dt(_.exception || _);
@@ -3936,7 +3936,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3936
3936
  }
3937
3937
  async function w({
3938
3938
  actionData: b,
3939
- fields: A,
3939
+ fields: T,
3940
3940
  values: _,
3941
3941
  context: R,
3942
3942
  onRefreshParentValues: C
@@ -3945,12 +3945,12 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3945
3945
  if (C && f.current.push(C), F === "ir.actions.report.xml")
3946
3946
  return await y({
3947
3947
  reportData: b,
3948
- fields: A,
3948
+ fields: T,
3949
3949
  values: _,
3950
3950
  context: R
3951
3951
  });
3952
3952
  if (F === "ir.actions.act_window")
3953
- return await I({ actionData: b, fields: A, values: _, context: R });
3953
+ return await I({ actionData: b, fields: T, values: _, context: R });
3954
3954
  if (F === "ir.actions.act_url")
3955
3955
  window.open(
3956
3956
  kd(b.url, { ..._, context: R }),
@@ -3961,7 +3961,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3961
3961
  }
3962
3962
  async function I({
3963
3963
  actionData: b,
3964
- fields: A = {},
3964
+ fields: T = {},
3965
3965
  values: _ = {},
3966
3966
  context: R = {}
3967
3967
  }) {
@@ -3974,7 +3974,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3974
3974
  }))[0]);
3975
3975
  const F = C == null ? void 0 : C.context, D = typeof (C == null ? void 0 : C.context) == "string" ? Lt({
3976
3976
  context: C.context,
3977
- fields: A,
3977
+ fields: T,
3978
3978
  values: { ..._, ...r }
3979
3979
  }) : (C == null ? void 0 : C.context) || {}, V = {
3980
3980
  ...R,
@@ -3985,10 +3985,10 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3985
3985
  if (C.domain && (N = await k.getHandler().evalDomain({
3986
3986
  domain: C.domain,
3987
3987
  values: Zt({
3988
- fields: A,
3988
+ fields: T,
3989
3989
  values: { ..._, ...r }
3990
3990
  }),
3991
- fields: A,
3991
+ fields: T,
3992
3992
  context: V
3993
3993
  })), C.target === "new") {
3994
3994
  const G = await k.getHandler().getView({
@@ -3997,7 +3997,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
3997
3997
  id: ((B = C == null ? void 0 : C.view_id) == null ? void 0 : B[0]) || void 0,
3998
3998
  context: V
3999
3999
  });
4000
- return T({
4000
+ return A({
4001
4001
  domain: N,
4002
4002
  model: C.res_model,
4003
4003
  formView: G,
@@ -4023,25 +4023,25 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
4023
4023
  actionRawData: {
4024
4024
  context: F,
4025
4025
  domain: L,
4026
- fields: A,
4026
+ fields: T,
4027
4027
  values: _
4028
4028
  },
4029
4029
  res_id: C.res_id
4030
4030
  }), { closeParent: !0 };
4031
4031
  }
4032
4032
  }
4033
- function T({
4033
+ function A({
4034
4034
  domain: b,
4035
- model: A,
4035
+ model: T,
4036
4036
  formView: _,
4037
4037
  context: R,
4038
4038
  actionData: C
4039
4039
  }) {
4040
- m ? S({ domain: b, model: A, formView: _, context: R, actionData: C }) : (g({ domain: b, model: A, context: R, formView: _, actionData: C }), h(!0));
4040
+ m ? S({ domain: b, model: T, formView: _, context: R, actionData: C }) : (g({ domain: b, model: T, context: R, formView: _, actionData: C }), h(!0));
4041
4041
  }
4042
4042
  async function S({
4043
4043
  domain: b,
4044
- model: A,
4044
+ model: T,
4045
4045
  formView: _,
4046
4046
  context: R,
4047
4047
  actionData: C
@@ -4052,7 +4052,7 @@ const Eu = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Gs,
4052
4052
  context: {},
4053
4053
  formView: void 0,
4054
4054
  actionData: void 0
4055
- }), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model: A, context: R, formView: _, actionData: C }), h(!0);
4055
+ }), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model: T, context: R, formView: _, actionData: C }), h(!0);
4056
4056
  }
4057
4057
  async function O() {
4058
4058
  fi(f.current), f.current = [], h(!1), g({
@@ -4254,11 +4254,11 @@ function tf(e, t) {
4254
4254
  parentContext: v = {},
4255
4255
  actionDomain: w,
4256
4256
  visible: I = !0,
4257
- rootForm: T = !1,
4257
+ rootForm: A = !1,
4258
4258
  defaultValues: S,
4259
4259
  forcedValues: O = {},
4260
4260
  parentWidth: b,
4261
- onMustRefreshParent: A
4261
+ onMustRefreshParent: T
4262
4262
  } = e, { t: _ } = ce(), [R, C] = x(!1), [F, D] = x(), [V, N] = x(), [L] = Ct.useForm(), [B, G] = x(), [$, K] = x(), X = ee(Ys), [z, Q] = x(), [xe, fe] = x(!1), H = Y(), j = Y({}), q = Y({}), ie = Y(!1), te = Y(!1), M = Y(!1), me = (b !== void 0 ? b : z) < ef, he = ee(Ue), { activeId: ye, getPlainValues: Ee } = he || {}, Me = Y(!1), We = ee(
4263
4263
  mt
4264
4264
  ), {
@@ -4270,7 +4270,7 @@ function tf(e, t) {
4270
4270
  title: J = void 0,
4271
4271
  setTitle: pe = void 0,
4272
4272
  isActive: Fe = void 0
4273
- } = (T ? We : {}) || {}, Ge = ee(
4273
+ } = (A ? We : {}) || {}, Ge = ee(
4274
4274
  Sn
4275
4275
  ), { processAction: ke, globalValues: ue } = Ge || {};
4276
4276
  At(t, () => ({
@@ -4298,9 +4298,9 @@ function tf(e, t) {
4298
4298
  }), fe(!1));
4299
4299
  }, [xe]);
4300
4300
  const ve = (U, W, ae, le) => {
4301
- de == null || de(!1), _e == null || _e(!1), a == null || a(U, W, ae, le), Te == null || Te(U), Me.current && (A == null || A());
4301
+ de == null || de(!1), _e == null || _e(!1), a == null || a(U, W, ae, le), Te == null || Te(U), Me.current && (T == null || T());
4302
4302
  }, Le = () => {
4303
- Me.current && (A == null || A()), _e == null || _e(!1), o == null || o();
4303
+ Me.current && (T == null || T()), _e == null || _e(!1), o == null || o();
4304
4304
  }, Ze = (U) => {
4305
4305
  _e == null || _e(!1), u == null || u(U);
4306
4306
  }, Se = E(() => r || H.current, [r]), [pt, Dt] = x(() => H.current);
@@ -4741,7 +4741,7 @@ function tf(e, t) {
4741
4741
  Me.current = !0, await Et({ forceRefresh: !0 });
4742
4742
  }
4743
4743
  })) || {};
4744
- !T && ae && (ve == null || ve(Se(), Ce(), Ae()));
4744
+ !A && ae && (ve == null || ve(Se(), Ce(), Ae()));
4745
4745
  }
4746
4746
  function al() {
4747
4747
  tn({ elementHasLostFocus: !0 });
@@ -4892,7 +4892,7 @@ const Cn = xt(tf), xn = (e) => {
4892
4892
  isMenuAction: s = !1,
4893
4893
  actionData: l,
4894
4894
  ...c
4895
- } = e, { model: u } = c, { modalWidth: f } = Sr(), [d, m] = x(r), [h, p] = x(!1), [g, y] = x(), { action_id: v, res_id: w, action_type: I, view_id: T } = l || {};
4895
+ } = e, { model: u } = c, { modalWidth: f } = Sr(), [d, m] = x(r), [h, p] = x(!1), [g, y] = x(), { action_id: v, res_id: w, action_type: I, view_id: A } = l || {};
4896
4896
  se(() => {
4897
4897
  s && S();
4898
4898
  }, [l, s]);
@@ -4900,7 +4900,7 @@ const Cn = xt(tf), xn = (e) => {
4900
4900
  const _ = await k.getHandler().isShortcutFavorite({
4901
4901
  action_id: v,
4902
4902
  action_type: I,
4903
- view_id: T,
4903
+ view_id: A,
4904
4904
  res_id: w || !1
4905
4905
  });
4906
4906
  p(_ !== !1), _ !== !1 && y(_);
@@ -4935,7 +4935,7 @@ const Cn = xt(tf), xn = (e) => {
4935
4935
  /* @__PURE__ */ i(Ie, { style: { paddingLeft: 10 }, children: d })
4936
4936
  ] });
4937
4937
  }
4938
- const A = f * 0.95;
4938
+ const T = f * 0.95;
4939
4939
  return /* @__PURE__ */ i(Ku, { setTitle: m, children: /* @__PURE__ */ i(
4940
4940
  yt,
4941
4941
  {
@@ -4954,10 +4954,10 @@ const Cn = xt(tf), xn = (e) => {
4954
4954
  showFooter: !0,
4955
4955
  insideButtonModal: o,
4956
4956
  onCancel: a,
4957
- parentWidth: A,
4957
+ parentWidth: T,
4958
4958
  ...c
4959
4959
  },
4960
- `${u}-${n}-${v}-${w}-${I}-${T}-${r}`
4960
+ `${u}-${n}-${v}-${w}-${I}-${A}-${r}`
4961
4961
  )
4962
4962
  }
4963
4963
  ) });
@@ -5162,14 +5162,14 @@ const of = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Qs,
5162
5162
  context: r
5163
5163
  });
5164
5164
  a(I);
5165
- const T = lf(I);
5165
+ const A = lf(I);
5166
5166
  let S = {};
5167
- if (T.length > 0 && (S = { ...(O = await p({
5167
+ if (A.length > 0 && (S = { ...(O = await p({
5168
5168
  model: n,
5169
5169
  ids: [t],
5170
- fieldsToRetrieve: T,
5170
+ fieldsToRetrieve: A,
5171
5171
  context: r
5172
- })) == null ? void 0 : O[0] }), S = { ...on(S, T), active_id: t }, l(S), !(!I || !I.toolbar))
5172
+ })) == null ? void 0 : O[0] }), S = { ...on(S, A), active_id: t }, l(S), !(!I || !I.toolbar))
5173
5173
  return {
5174
5174
  actionItems: I.toolbar.action,
5175
5175
  relateItems: I.toolbar.relate,
@@ -5178,12 +5178,12 @@ const of = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Qs,
5178
5178
  }, [r, m, t, n, p]);
5179
5179
  if (!t)
5180
5180
  return null;
5181
- function w({ item: I, type: T }) {
5181
+ function w({ item: I, type: A }) {
5182
5182
  const S = {
5183
5183
  values: s,
5184
5184
  fields: o.fields
5185
5185
  };
5186
- switch (T) {
5186
+ switch (A) {
5187
5187
  case "action":
5188
5188
  d == null || d({
5189
5189
  actionData: I,
@@ -5354,8 +5354,8 @@ const of = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Qs,
5354
5354
  m(a);
5355
5355
  }, [m, a]);
5356
5356
  const h = (y) => {
5357
- const w = y.target.value.split(/[ ,;]+/), I = w.slice(0, -1).map((S) => S.trim()).filter((S) => S && !a.includes(S)), T = [...a, ...I].join(";");
5358
- (!n || T.length + w[w.length - 1].length <= n) && (I.length > 0 && (s([...a, ...I]), m([...a, ...I])), c(w[w.length - 1]));
5357
+ const w = y.target.value.split(/[ ,;]+/), I = w.slice(0, -1).map((S) => S.trim()).filter((S) => S && !a.includes(S)), A = [...a, ...I].join(";");
5358
+ (!n || A.length + w[w.length - 1].length <= n) && (I.length > 0 && (s([...a, ...I]), m([...a, ...I])), c(w[w.length - 1]));
5359
5359
  }, p = () => {
5360
5360
  if (l) {
5361
5361
  const y = l.split(";").map((w) => w.trim()).filter((w) => w && !a.includes(w)), v = [...a, ...y].join(";");
@@ -5723,7 +5723,7 @@ const of = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Qs,
5723
5723
  ([y, v]) => {
5724
5724
  g[y] = v.map((w) => {
5725
5725
  const I = e.columns.find(
5726
- (T) => T.id === y
5726
+ (A) => A.id === y
5727
5727
  );
5728
5728
  return {
5729
5729
  operation: w,
@@ -5747,7 +5747,7 @@ const of = (e) => /* @__PURE__ */ i(De, { ...e, children: /* @__PURE__ */ i(Qs,
5747
5747
  Object.entries(h).forEach((g) => {
5748
5748
  const y = g[0], v = g[1];
5749
5749
  p || (p = {}), p[y] = Object.keys(v).map((w) => {
5750
- const I = e.columns.find((T) => T.id === y);
5750
+ const I = e.columns.find((A) => A.id === y);
5751
5751
  return {
5752
5752
  operation: w,
5753
5753
  label: I[w],
@@ -6241,19 +6241,19 @@ function Im(e, t, n) {
6241
6241
  throw new TypeError(dm);
6242
6242
  t = vi(t) || 0, Zr(n) && (f = !!n.leading, d = "maxWait" in n, a = d ? Cm(vi(n.maxWait) || 0, t) : a, m = "trailing" in n ? !!n.trailing : m);
6243
6243
  function h(O) {
6244
- var b = r, A = o;
6245
- return r = o = void 0, u = O, s = e.apply(A, b), s;
6244
+ var b = r, T = o;
6245
+ return r = o = void 0, u = O, s = e.apply(T, b), s;
6246
6246
  }
6247
6247
  function p(O) {
6248
6248
  return u = O, l = setTimeout(v, t), f ? h(O) : s;
6249
6249
  }
6250
6250
  function g(O) {
6251
- var b = O - c, A = O - u, _ = t - b;
6252
- return d ? xm(_, a - A) : _;
6251
+ var b = O - c, T = O - u, _ = t - b;
6252
+ return d ? xm(_, a - T) : _;
6253
6253
  }
6254
6254
  function y(O) {
6255
- var b = O - c, A = O - u;
6256
- return c === void 0 || b >= t || b < 0 || d && A >= a;
6255
+ var b = O - c, T = O - u;
6256
+ return c === void 0 || b >= t || b < 0 || d && T >= a;
6257
6257
  }
6258
6258
  function v() {
6259
6259
  var O = $r();
@@ -6267,7 +6267,7 @@ function Im(e, t, n) {
6267
6267
  function I() {
6268
6268
  l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
6269
6269
  }
6270
- function T() {
6270
+ function A() {
6271
6271
  return l === void 0 ? s : w($r());
6272
6272
  }
6273
6273
  function S() {
@@ -6280,7 +6280,7 @@ function Im(e, t, n) {
6280
6280
  }
6281
6281
  return l === void 0 && (l = setTimeout(v, t)), s;
6282
6282
  }
6283
- return S.cancel = I, S.flush = T, S;
6283
+ return S.cancel = I, S.flush = A, S;
6284
6284
  }
6285
6285
  function Zr(e) {
6286
6286
  var t = typeof e;
@@ -6385,8 +6385,8 @@ function Fm() {
6385
6385
  throw new TypeError("Object.keys called on a non-object");
6386
6386
  var I = s && g;
6387
6387
  if (v && h.length > 0 && !t.call(h, 0))
6388
- for (var T = 0; T < h.length; ++T)
6389
- w.push(String(T));
6388
+ for (var A = 0; A < h.length; ++A)
6389
+ w.push(String(A));
6390
6390
  if (y && h.length > 0)
6391
6391
  for (var S = 0; S < h.length; ++S)
6392
6392
  w.push(String(S));
@@ -6394,8 +6394,8 @@ function Fm() {
6394
6394
  for (var O in h)
6395
6395
  !(I && O === "prototype") && t.call(h, O) && w.push(String(O));
6396
6396
  if (a)
6397
- for (var b = d(h), A = 0; A < l.length; ++A)
6398
- !(b && l[A] === "constructor") && t.call(h, l[A]) && w.push(l[A]);
6397
+ for (var b = d(h), T = 0; T < l.length; ++T)
6398
+ !(b && l[T] === "constructor") && t.call(h, l[T]) && w.push(l[T]);
6399
6399
  return w;
6400
6400
  };
6401
6401
  }
@@ -7037,36 +7037,36 @@ const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
7037
7037
  l.current = new as(o, a, 1), l.current.parse(), f(l.current._advancedSearchContainer);
7038
7038
  }, [a, o, n]);
7039
7039
  const p = E(
7040
- (T) => {
7040
+ (A) => {
7041
7041
  var O;
7042
7042
  const S = Qn(
7043
- T,
7043
+ A,
7044
7044
  (O = l.current) == null ? void 0 : O._advancedSearchContainer
7045
7045
  );
7046
- t({ params: S, values: ir(T) });
7046
+ t({ params: S, values: ir(A) });
7047
7047
  },
7048
7048
  [t]
7049
7049
  ), g = E(() => {
7050
- var T;
7051
- (T = d.current) == null || T.submit();
7050
+ var A;
7051
+ (A = d.current) == null || A.submit();
7052
7052
  }, []), y = E(
7053
- (T) => {
7053
+ (A) => {
7054
7054
  var b;
7055
- const S = ir(T);
7055
+ const S = ir(A);
7056
7056
  if (Fa(S, s)) {
7057
7057
  h([]);
7058
7058
  return;
7059
7059
  }
7060
7060
  const O = Qn(
7061
- T,
7061
+ A,
7062
7062
  (b = l.current) == null ? void 0 : b._advancedSearchContainer
7063
7063
  );
7064
7064
  h(O);
7065
7065
  },
7066
7066
  [s]
7067
7067
  ), v = E(() => {
7068
- var T, S;
7069
- (T = d.current) == null || T.resetFields(), (S = d == null ? void 0 : d.current) == null || S.setFieldsValue({}), h([]);
7068
+ var A, S;
7069
+ (A = d.current) == null || A.resetFields(), (S = d == null ? void 0 : d.current) == null || S.setFieldsValue({}), h([]);
7070
7070
  }, []), w = n ? m || Qn(s, (I = l.current) == null ? void 0 : I._advancedSearchContainer) : [];
7071
7071
  return /* @__PURE__ */ i(
7072
7072
  cm,
@@ -7202,7 +7202,7 @@ function Lo(e) {
7202
7202
  searchError: d,
7203
7203
  searchValues: m,
7204
7204
  showLimitOptions: h = !0
7205
- } = e, [p, g] = x(), [y, v] = x(), [w, I] = x(!1), T = Y(), { token: S } = fh(), [O] = Ct.useForm();
7205
+ } = e, [p, g] = x(), [y, v] = x(), [w, I] = x(!1), A = Y(), { token: S } = fh(), [O] = Ct.useForm();
7206
7206
  se(() => {
7207
7207
  O.setFieldsValue(m);
7208
7208
  }, [m]);
@@ -7213,15 +7213,15 @@ function Lo(e) {
7213
7213
  return F == null ? void 0 : F.map((D, V) => /* @__PURE__ */ i(Be, { children: D.map((N, L) => /* @__PURE__ */ i(Ie, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(ra, { field: N }) }, L)) }, V));
7214
7214
  };
7215
7215
  Rt(() => {
7216
- I(!1), T.current = new as(n, t), T.current.parse(), g(T.current._simpleSearchContainer), v(T.current._advancedSearchContainer);
7216
+ I(!1), A.current = new as(n, t), A.current.parse(), g(A.current._simpleSearchContainer), v(A.current._advancedSearchContainer);
7217
7217
  }, [t, n]);
7218
- const A = b(), _ = (C) => {
7218
+ const T = b(), _ = (C) => {
7219
7219
  var N;
7220
7220
  const { limit: F, offset: D } = C;
7221
7221
  delete C.offset, delete C.limit;
7222
7222
  const V = Qn(
7223
7223
  C,
7224
- (N = T.current) == null ? void 0 : N._advancedSearchContainer
7224
+ (N = A.current) == null ? void 0 : N._advancedSearchContainer
7225
7225
  );
7226
7226
  o({ params: V, offset: D, limit: F, searchValues: C });
7227
7227
  }, R = E(() => {
@@ -7254,7 +7254,7 @@ function Lo(e) {
7254
7254
  onFinish: _,
7255
7255
  initialValues: { offset: s, limit: l },
7256
7256
  children: [
7257
- A,
7257
+ T,
7258
7258
  w && h && /* @__PURE__ */ i(uh, { onLimitChange: c }),
7259
7259
  /* @__PURE__ */ i(
7260
7260
  dh,
@@ -7290,7 +7290,7 @@ function Lo(e) {
7290
7290
  function mh({
7291
7291
  useLocalState: e = !1
7292
7292
  }) {
7293
- const t = bu() && !e, n = jn(), [r, o] = x(!1), [a, s] = x(!1), [l, c] = x([]), [u, f] = x(0), [d, m] = x([]), [h, p] = x({}), [g, y] = x(), [v, w] = x([]), [I, T] = x(), [S, O] = x(0), [b, A] = x();
7293
+ const t = bu() && !e, n = jn(), [r, o] = x(!1), [a, s] = x(!1), [l, c] = x([]), [u, f] = x(0), [d, m] = x([]), [h, p] = x({}), [g, y] = x(), [v, w] = x([]), [I, A] = x(), [S, O] = x(0), [b, T] = x();
7294
7294
  return t ? {
7295
7295
  treeIsLoading: n.treeIsLoading ?? !1,
7296
7296
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -7344,12 +7344,12 @@ function mh({
7344
7344
  results: v,
7345
7345
  setResults: w,
7346
7346
  searchQuery: I,
7347
- setSearchQuery: T,
7347
+ setSearchQuery: A,
7348
7348
  totalItems: S,
7349
7349
  setTotalItems: O,
7350
7350
  isActive: void 0,
7351
7351
  sortState: b,
7352
- setSortState: A
7352
+ setSortState: T
7353
7353
  };
7354
7354
  }
7355
7355
  const ph = 3 * 1e3, hh = (e) => {
@@ -7423,8 +7423,8 @@ function vh(e, t) {
7423
7423
  onChangeSelectedRowKeys: f,
7424
7424
  nameSearch: d,
7425
7425
  filterType: m = "side"
7426
- } = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, T] = x(!0), [S, O] = x(), { t: b } = ce(), A = Y(null), _ = Df({
7427
- elementRef: A,
7426
+ } = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, A] = x(!0), [S, O] = x(), { t: b } = ce(), T = Y(null), _ = Df({
7427
+ elementRef: T,
7428
7428
  offset: gh
7429
7429
  }), { treeView: R, formView: C, loading: F } = zs({
7430
7430
  model: n,
@@ -7497,7 +7497,7 @@ function vh(e, t) {
7497
7497
  const Ye = `${JSON.stringify(me ? s : Te)}-${me}`;
7498
7498
  return Ye !== ht.current ? (ht.current = Ye, !0) : !1;
7499
7499
  }, [s, Te, me]), Ne = E(async () => {
7500
- O(void 0), ie(0), T(!0);
7500
+ O(void 0), ie(0), A(!0);
7501
7501
  try {
7502
7502
  const we = await k.getHandler().searchCount({
7503
7503
  params: me ? s : Te,
@@ -7509,7 +7509,7 @@ function vh(e, t) {
7509
7509
  } catch (we) {
7510
7510
  w(we);
7511
7511
  } finally {
7512
- T(!1);
7512
+ A(!1);
7513
7513
  }
7514
7514
  }, [
7515
7515
  s,
@@ -7859,7 +7859,7 @@ function vh(e, t) {
7859
7859
  totalRows: S
7860
7860
  }
7861
7861
  ),
7862
- /* @__PURE__ */ i("div", { ref: A, style: ot, children: F || We || I ? /* @__PURE__ */ i(Ke, {}) : Re })
7862
+ /* @__PURE__ */ i("div", { ref: T, style: ot, children: F || We || I ? /* @__PURE__ */ i(Ke, {}) : Re })
7863
7863
  ] });
7864
7864
  }
7865
7865
  const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
@@ -7944,13 +7944,13 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
7944
7944
  sorter: v,
7945
7945
  onFetchChildrenForRecord: w,
7946
7946
  childField: I,
7947
- rootTree: T = !1,
7947
+ rootTree: A = !1,
7948
7948
  context: S,
7949
7949
  readonly: O,
7950
7950
  onSelectAllRecords: b
7951
- } = e, A = Y(null), [_, R] = x([]), C = Y(!1), [F, D] = x(), { t: V } = ce(), N = Y(r), L = ee(
7951
+ } = e, T = Y(null), [_, R] = x([]), C = Y(!1), [F, D] = x(), { t: V } = ce(), N = Y(r), L = ee(
7952
7952
  mt
7953
- ), { title: B = void 0, setTitle: G = void 0 } = (T ? L : {}) || {}, $ = Z(() => {
7953
+ ), { title: B = void 0, setTitle: G = void 0 } = (A ? L : {}) || {}, $ = Z(() => {
7954
7954
  if (F)
7955
7955
  return Ao(
7956
7956
  F,
@@ -7963,7 +7963,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
7963
7963
  At(t, () => ({
7964
7964
  unselectAll: () => {
7965
7965
  var q;
7966
- (q = A.current) == null || q.unselectAll();
7966
+ (q = T.current) == null || q.unselectAll();
7967
7967
  }
7968
7968
  })), se(() => {
7969
7969
  const q = jt(a);
@@ -8037,7 +8037,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
8037
8037
  /* @__PURE__ */ i(
8038
8038
  wc,
8039
8039
  {
8040
- ref: A,
8040
+ ref: T,
8041
8041
  height: H,
8042
8042
  columns: fe.columns,
8043
8043
  dataSource: _,
@@ -8092,12 +8092,12 @@ const Ea = (e) => {
8092
8092
  resultsActionView: v,
8093
8093
  domain: w,
8094
8094
  currentId: I,
8095
- limit: T,
8095
+ limit: A,
8096
8096
  setLimit: S,
8097
8097
  searchParams: O = [],
8098
8098
  setSearchValues: b,
8099
- clearSelection: A
8100
- } = e, [_, R] = x(!1), [C, F] = x(!1), [D, V] = x(), [N, L] = x(1), [B, G] = x(0), [$, K] = x(), [X, z] = x([]), [Q, xe] = x(void 0), [fe, H] = x(void 0), j = Y(T || Ht), q = Y([]), ie = E(
8099
+ clearSelection: T
8100
+ } = e, [_, R] = x(!1), [C, F] = x(!1), [D, V] = x(), [N, L] = x(1), [B, G] = x(0), [$, K] = x(), [X, z] = x([]), [Q, xe] = x(void 0), [fe, H] = x(void 0), j = Y(A || Ht), q = Y([]), ie = E(
8101
8101
  (de) => {
8102
8102
  y == null || y([...de]), z([...de]);
8103
8103
  },
@@ -8191,7 +8191,7 @@ const Ea = (e) => {
8191
8191
  ), me = E(
8192
8192
  async (de) => {
8193
8193
  try {
8194
- R(!0), s == null || s(!0), l && !c.current ? await M() : await ne(de), A == null || A();
8194
+ R(!0), s == null || s(!0), l && !c.current ? await M() : await ne(de), T == null || T();
8195
8195
  } catch (Te) {
8196
8196
  V(typeof Te == "string" ? Te : Te.message), R(!1);
8197
8197
  } finally {
@@ -8199,7 +8199,7 @@ const Ea = (e) => {
8199
8199
  }
8200
8200
  },
8201
8201
  [
8202
- A,
8202
+ T,
8203
8203
  l,
8204
8204
  M,
8205
8205
  c,
@@ -8247,18 +8247,18 @@ const Ea = (e) => {
8247
8247
  ]
8248
8248
  ), Ee = E(
8249
8249
  (de) => {
8250
- R(!0), L(de), G((de - 1) * T);
8250
+ R(!0), L(de), G((de - 1) * A);
8251
8251
  },
8252
- [R, T, G, L]
8252
+ [R, A, G, L]
8253
8253
  ), Me = E(() => {
8254
- _ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0), L(1), S == null || S(T || Ht));
8254
+ _ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0), L(1), S == null || S(A || Ht));
8255
8255
  }, [
8256
8256
  _,
8257
8257
  n,
8258
8258
  o,
8259
8259
  b,
8260
8260
  S,
8261
- T
8261
+ A
8262
8262
  ]), We = E(
8263
8263
  async (de) => {
8264
8264
  const Te = de[(d == null ? void 0 : d.field_parent) || "child_id"], be = await k.getHandler().readObjects({
@@ -8310,7 +8310,7 @@ function Ch(e, t) {
8310
8310
  rootTree: f = !1,
8311
8311
  parentContext: d = {},
8312
8312
  onChangeSelectedRowKeys: m
8313
- } = e, [h, p] = x(!1), [g, y] = x(!1), v = Y(!1), w = Y(null), [I, T] = x(), [S, O] = x(), [b, A] = x(), [_, R] = x(), [C, F] = x(200), D = Y(), { height: V } = Sr(), N = ee(
8313
+ } = e, [h, p] = x(!1), [g, y] = x(!1), v = Y(!1), w = Y(null), [I, A] = x(), [S, O] = x(), [b, T] = x(), [_, R] = x(), [C, F] = x(200), D = Y(), { height: V } = Sr(), N = ee(
8314
8314
  Sn
8315
8315
  ), { processAction: L } = N || {}, B = ee(
8316
8316
  mt
@@ -8402,7 +8402,7 @@ function Ch(e, t) {
8402
8402
  p(!1);
8403
8403
  }
8404
8404
  }, re = async () => {
8405
- T(n);
8405
+ A(n);
8406
8406
  let Ve = r;
8407
8407
  r || (Ve = await k.getHandler().getView({
8408
8408
  model: n,
@@ -8414,7 +8414,7 @@ function Ch(e, t) {
8414
8414
  model: n,
8415
8415
  type: "tree",
8416
8416
  context: d
8417
- })), A(Ve), O(gt);
8417
+ })), T(Ve), O(gt);
8418
8418
  };
8419
8419
  se(() => {
8420
8420
  Dt();
@@ -8569,7 +8569,7 @@ const Va = xt(Ch), jo = ({
8569
8569
  treeViewProps: void 0,
8570
8570
  context: s,
8571
8571
  enabled: e
8572
- }), I = Z(() => y != null && y.arch ? Es(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]), T = E(
8572
+ }), I = Z(() => y != null && y.arch ? Es(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]), A = E(
8573
8573
  async (F) => {
8574
8574
  m(!0);
8575
8575
  try {
@@ -8585,16 +8585,16 @@ const Va = xt(Ch), jo = ({
8585
8585
  t();
8586
8586
  }, [t]), O = E(
8587
8587
  ({ id: F }) => {
8588
- T([F]);
8588
+ A([F]);
8589
8589
  },
8590
- [T]
8590
+ [A]
8591
8591
  ), b = E(() => {
8592
8592
  if (u.length === 0) {
8593
8593
  S();
8594
8594
  return;
8595
8595
  }
8596
- T(u);
8597
- }, [u, S, T]), A = Z(
8596
+ A(u);
8597
+ }, [u, S, A]), T = Z(
8598
8598
  () => I ? Ra : Va,
8599
8599
  [I]
8600
8600
  ), _ = E(() => {
@@ -8603,9 +8603,9 @@ const Va = xt(Ch), jo = ({
8603
8603
  c(!1), S();
8604
8604
  }, [S]), C = E(
8605
8605
  (F) => {
8606
- c(!1), S(), F && T([F]);
8606
+ c(!1), S(), F && A([F]);
8607
8607
  },
8608
- [S, T]
8608
+ [S, A]
8609
8609
  );
8610
8610
  return /* @__PURE__ */ P(oe, { children: [
8611
8611
  /* @__PURE__ */ P(
@@ -8622,7 +8622,7 @@ const Va = xt(Ch), jo = ({
8622
8622
  maskClosable: !1,
8623
8623
  children: [
8624
8624
  !w && /* @__PURE__ */ i(
8625
- A,
8625
+ T,
8626
8626
  {
8627
8627
  formView: v,
8628
8628
  treeView: y,
@@ -8691,7 +8691,7 @@ const Va = xt(Ch), jo = ({
8691
8691
  context: l,
8692
8692
  id: c,
8693
8693
  domain: u
8694
- } = r, f = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, m] = x(!1), [h, p] = x(!1), [g, y] = x(!1), [v, w] = x(), I = Y(!1), [T, S] = x(""), O = Y(), b = ee(Ue), { domain: A, getValues: _, getFields: R, getContext: C, elementHasLostFocus: F } = b || {}, D = Y([]), [V, N] = x([]), L = t && t[0] || void 0, B = t && t[1] || "";
8694
+ } = r, f = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, m] = x(!1), [h, p] = x(!1), [g, y] = x(!1), [v, w] = x(), I = Y(!1), [A, S] = x(""), O = Y(), b = ee(Ue), { domain: T, getValues: _, getFields: R, getContext: C, elementHasLostFocus: F } = b || {}, D = Y([]), [V, N] = x([]), L = t && t[0] || void 0, B = t && t[1] || "";
8695
8695
  se(() => {
8696
8696
  !Array.isArray(t) && t && z(t);
8697
8697
  }, [t]), se(() => {
@@ -8702,7 +8702,7 @@ const Va = xt(Ch), jo = ({
8702
8702
  }, $ = (H) => {
8703
8703
  O.current = H.target.value, G([void 0, ""]);
8704
8704
  }, K = async () => {
8705
- if (!g && T !== B) {
8705
+ if (!g && A !== B) {
8706
8706
  if (await new Promise((H) => setTimeout(H, 100)), I.current) {
8707
8707
  G([void 0, ""]);
8708
8708
  return;
@@ -8762,9 +8762,9 @@ const Va = xt(Ch), jo = ({
8762
8762
  }),
8763
8763
  fields: R(),
8764
8764
  context: C()
8765
- })), A && A.length > 0 && (D.current = D.current.concat(
8765
+ })), T && T.length > 0 && (D.current = D.current.concat(
8766
8766
  go({
8767
- domain: A,
8767
+ domain: T,
8768
8768
  widgetFieldName: c
8769
8769
  })
8770
8770
  )), N(D.current);
@@ -8777,7 +8777,7 @@ const Va = xt(Ch), jo = ({
8777
8777
  o && !s ? Ah : rt,
8778
8778
  {
8779
8779
  type: "text",
8780
- value: T,
8780
+ value: A,
8781
8781
  disabled: s,
8782
8782
  onChange: $,
8783
8783
  style: {
@@ -8801,7 +8801,7 @@ const Va = xt(Ch), jo = ({
8801
8801
  je,
8802
8802
  {
8803
8803
  icon: /* @__PURE__ */ i(yo, {}),
8804
- disabled: L === void 0 || B === "" || T === void 0,
8804
+ disabled: L === void 0 || B === "" || A === void 0,
8805
8805
  onClick: () => {
8806
8806
  p(!0);
8807
8807
  },
@@ -9139,7 +9139,7 @@ function Rh(e) {
9139
9139
  context: v,
9140
9140
  formRef: w,
9141
9141
  onRefreshParentValues: I
9142
- } = e, { token: T } = Fh(), { t: S } = ce(), { actionButtonProps: O, printButtonProps: b, relateButtonProps: A } = La({
9142
+ } = e, { token: A } = Fh(), { t: S } = ce(), { actionButtonProps: O, printButtonProps: b, relateButtonProps: T } = La({
9143
9143
  toolbar: y,
9144
9144
  mustDisableButtons: n,
9145
9145
  formRef: w,
@@ -9155,7 +9155,7 @@ function Rh(e) {
9155
9155
  onRefreshParentValues: I
9156
9156
  });
9157
9157
  return /* @__PURE__ */ P("div", { className: "flex mb-2 pt-3", children: [
9158
- /* @__PURE__ */ i(Ha, { title: t, token: T }),
9158
+ /* @__PURE__ */ i(Ha, { title: t, token: A }),
9159
9159
  /* @__PURE__ */ P("div", { className: "flex-none h-8 pl-2", children: [
9160
9160
  a !== "graph" && p && /* @__PURE__ */ i(
9161
9161
  st,
@@ -9231,7 +9231,7 @@ function Rh(e) {
9231
9231
  Pt,
9232
9232
  {
9233
9233
  icon: /* @__PURE__ */ i(hr, {}),
9234
- ...A
9234
+ ...T
9235
9235
  }
9236
9236
  )
9237
9237
  ] })
@@ -9353,7 +9353,7 @@ const Vh = (e) => {
9353
9353
  getContext: p,
9354
9354
  domain: g,
9355
9355
  fetchValues: y
9356
- } = f || {}, { t: v } = ce(), [w, I] = x(!1), [T, S] = x(!1), [O, b] = x(), [A, _] = x(!1), [R, C] = x(!1), [F, D] = x(), [V, N] = x([]), [L, B] = x(!1), G = Y([]), [$, K] = x(), X = Y(), [z, Q] = x(void 0), xe = Y(), {
9356
+ } = f || {}, { t: v } = ce(), [w, I] = x(!1), [A, S] = x(!1), [O, b] = x(), [T, _] = x(!1), [R, C] = x(!1), [F, D] = x(), [V, N] = x([]), [L, B] = x(!1), G = Y([]), [$, K] = x(), X = Y(), [z, Q] = x(void 0), xe = Y(), {
9357
9357
  readOnly: fe,
9358
9358
  relation: H,
9359
9359
  context: j,
@@ -9629,7 +9629,7 @@ const Vh = (e) => {
9629
9629
  limit: M.length,
9630
9630
  treeView: o.get("tree"),
9631
9631
  results: re,
9632
- loading: T,
9632
+ loading: A,
9633
9633
  onRowClicked: ((Ae = o.get("form")) == null ? void 0 : Ae.fields) !== void 0 ? ue : void 0,
9634
9634
  showPagination: !1,
9635
9635
  selectedRowKeys: V,
@@ -9660,7 +9660,7 @@ const Vh = (e) => {
9660
9660
  if (O)
9661
9661
  return /* @__PURE__ */ i(at, { className: "mt-10", message: O, type: "error", banner: !0 });
9662
9662
  const Se = L;
9663
- return T ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(oe, { children: [
9663
+ return A ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(oe, { children: [
9664
9664
  /* @__PURE__ */ i(
9665
9665
  Ya,
9666
9666
  {
@@ -9698,7 +9698,7 @@ const Vh = (e) => {
9698
9698
  submitMode: "2many",
9699
9699
  values: F == null ? void 0 : F.values,
9700
9700
  defaultValues: F == null ? void 0 : F.defaultValues,
9701
- visible: A,
9701
+ visible: T,
9702
9702
  onSubmitSucceed: ke,
9703
9703
  parentContext: { ...p == null ? void 0 : p(), ...j },
9704
9704
  onCancel: () => {
@@ -9785,26 +9785,26 @@ const Vh = (e) => {
9785
9785
  });
9786
9786
  if (w.length === 0 && I.length === 0)
9787
9787
  return { results: [], colors: {}, status: {} };
9788
- const T = v ? (await Ad(w, t, n, v)).slice(
9788
+ const A = v ? (await Ad(w, t, n, v)).slice(
9789
9789
  p,
9790
9790
  g
9791
9791
  ) : w, S = Od(d), {
9792
9792
  items: O,
9793
9793
  colors: b,
9794
- status: A
9794
+ status: T
9795
9795
  } = await _d({
9796
9796
  relation: t,
9797
- ids: T,
9797
+ ids: A,
9798
9798
  treeView: e,
9799
9799
  context: n,
9800
9800
  attrs: S,
9801
9801
  treeOoui: d
9802
- }), R = T.length < g - p && I.length > 0 ? [...T, ...I.map((F) => F.id)] : T;
9802
+ }), R = A.length < g - p && I.length > 0 ? [...A, ...I.map((F) => F.id)] : A;
9803
9803
  return { results: Td({
9804
9804
  finalResultIds: R,
9805
9805
  fetchedItems: O,
9806
9806
  otherItems: I
9807
- }), colors: b, status: A };
9807
+ }), colors: b, status: T };
9808
9808
  },
9809
9809
  [n, t, d, e]
9810
9810
  ),
@@ -10020,9 +10020,9 @@ const jh = ({
10020
10020
  }, [n, e, t, r]), w = E(() => {
10021
10021
  m(!1), y(!1);
10022
10022
  }, []), I = wt(
10023
- (S, O, b, A = !1) => {
10023
+ (S, O, b, T = !1) => {
10024
10024
  let _;
10025
- if (A)
10025
+ if (T)
10026
10026
  _ = o.concat({
10027
10027
  id: S,
10028
10028
  operation: "pendingLink",
@@ -10048,14 +10048,14 @@ const jh = ({
10048
10048
  a(_), g || m(!1);
10049
10049
  },
10050
10050
  [g, o, a]
10051
- ), T = wt(
10051
+ ), A = wt(
10052
10052
  async (S) => {
10053
10053
  if (!u)
10054
10054
  return;
10055
10055
  const { id: O } = S;
10056
10056
  let b = o;
10057
- const A = o.find((_) => _.id === O);
10058
- (A == null ? void 0 : A.values) === void 0 && (b = await k.getHandler().readObjects({
10057
+ const T = o.find((_) => _.id === O);
10058
+ (T == null ? void 0 : T.values) === void 0 && (b = await k.getHandler().readObjects({
10059
10059
  model: c,
10060
10060
  ids: [S.id],
10061
10061
  fields: u.fields,
@@ -10071,7 +10071,7 @@ const jh = ({
10071
10071
  createItem: v,
10072
10072
  onCancelFormModal: w,
10073
10073
  onFormModalSubmitSucceed: I,
10074
- openItemInFormModal: T
10074
+ openItemInFormModal: A
10075
10075
  };
10076
10076
  }, Bh = ({
10077
10077
  currentView: e,
@@ -10150,7 +10150,7 @@ const jh = ({
10150
10150
  selectedRowKeys: g = [],
10151
10151
  showPointerCursorInRows: y = !0
10152
10152
  }) => {
10153
- const v = Y(), w = c || v, I = Y({}), T = Y(), S = Y(), O = Y(e), { t: b } = ce();
10153
+ const v = Y(), w = c || v, I = Y({}), A = Y(), S = Y(), O = Y(e), { t: b } = ce();
10154
10154
  Rt(() => {
10155
10155
  var N, L;
10156
10156
  if (O.current = e, S.current === void 0) {
@@ -10159,7 +10159,7 @@ const jh = ({
10159
10159
  }
10160
10160
  S.current = e, (N = w == null ? void 0 : w.current) == null || N.refresh(), (L = w == null ? void 0 : w.current) == null || L.unselectAll();
10161
10161
  }, [e]);
10162
- const A = Rn(() => e.length, [e]), _ = Rn(() => Ao(
10162
+ const T = Rn(() => e.length, [e]), _ = Rn(() => Ao(
10163
10163
  o,
10164
10164
  {
10165
10165
  ...Vo
@@ -10179,7 +10179,7 @@ const jh = ({
10179
10179
  endRow: L,
10180
10180
  sortFields: G
10181
10181
  });
10182
- return I.current = { ...I.current, ...K }, !T.current && X && (T.current = {}), X && (T.current = { ...T.current, ...X }), $;
10182
+ return I.current = { ...I.current, ...K }, !A.current && X && (A.current = {}), X && (A.current = { ...A.current, ...X }), $;
10183
10183
  },
10184
10184
  [s]
10185
10185
  ), C = E((N) => {
@@ -10210,13 +10210,13 @@ const jh = ({
10210
10210
  onGetFirstVisibleRowIndex: d,
10211
10211
  selectedRowKeys: g,
10212
10212
  onSelectionCheckboxClicked: m,
10213
- totalRows: A,
10213
+ totalRows: T,
10214
10214
  footer: p && /* @__PURE__ */ i(na, { aggregates: p, isLoading: !1 }),
10215
10215
  hasStatusColumn: o.status !== null,
10216
10216
  statusComponent: (N) => /* @__PURE__ */ i(dr, { color: N, style: { marginLeft: 7 } }),
10217
10217
  onRowStatus: (N) => {
10218
10218
  var L;
10219
- return (L = T.current) == null ? void 0 : L[N.id];
10219
+ return (L = A.current) == null ? void 0 : L[N.id];
10220
10220
  },
10221
10221
  strings: {
10222
10222
  resetTableViewLabel: b("resetTableView")
@@ -10249,8 +10249,8 @@ const jh = ({
10249
10249
  } = o, v = ee(Ue), {
10250
10250
  activeId: w,
10251
10251
  getContext: I,
10252
- fetchValues: T
10253
- } = v || {}, S = Y(), O = a.size > 1, b = ((be = a.get("form")) == null ? void 0 : be.fields) !== void 0, A = Z(() => ({ ...I == null ? void 0 : I(), ...p }), [I, p]), _ = Ph({
10252
+ fetchValues: A
10253
+ } = v || {}, S = Y(), O = a.size > 1, b = ((be = a.get("form")) == null ? void 0 : be.fields) !== void 0, T = Z(() => ({ ...I == null ? void 0 : I(), ...p }), [I, p]), _ = Ph({
10254
10254
  widgetDomain: g,
10255
10255
  fieldName: y
10256
10256
  }), {
@@ -10264,7 +10264,7 @@ const jh = ({
10264
10264
  } = kh({
10265
10265
  treeView: a.get("tree"),
10266
10266
  relation: h,
10267
- context: A,
10267
+ context: T,
10268
10268
  allRowsIds: l.filter((J) => J.id !== void 0).map((J) => J.id),
10269
10269
  gridRef: t
10270
10270
  }), [, B] = Gh({
@@ -10294,7 +10294,7 @@ const jh = ({
10294
10294
  formView: a.get("form"),
10295
10295
  treeView: a.get("tree"),
10296
10296
  relation: h,
10297
- context: A,
10297
+ context: T,
10298
10298
  triggerChange: K
10299
10299
  }), {
10300
10300
  showFormModal: fe,
@@ -10313,7 +10313,7 @@ const jh = ({
10313
10313
  items: l,
10314
10314
  setCurrentView: u,
10315
10315
  setItemIndex: d,
10316
- context: A,
10316
+ context: T,
10317
10317
  relation: h,
10318
10318
  formView: a.get("form")
10319
10319
  }), {
@@ -10327,7 +10327,7 @@ const jh = ({
10327
10327
  triggerChange: K,
10328
10328
  items: l,
10329
10329
  views: a,
10330
- context: A,
10330
+ context: T,
10331
10331
  relation: h
10332
10332
  }), { showRemoveConfirm: Ee } = Mh({
10333
10333
  isMany2many: $,
@@ -10388,10 +10388,10 @@ const jh = ({
10388
10388
  showCreateButton: b,
10389
10389
  showToggleButton: O,
10390
10390
  toolbar: (Ne = a.get(c)) == null ? void 0 : Ne.toolbar,
10391
- context: { ...I == null ? void 0 : I(), ...A },
10391
+ context: { ...I == null ? void 0 : I(), ...T },
10392
10392
  formRef: S,
10393
10393
  onRefreshParentValues: () => {
10394
- T == null || T({ forceRefresh: !0 });
10394
+ A == null || A({ forceRefresh: !0 });
10395
10395
  }
10396
10396
  }
10397
10397
  ),
@@ -10404,7 +10404,7 @@ const jh = ({
10404
10404
  readOnly: m || !1,
10405
10405
  onFetchRecords: C,
10406
10406
  ooui: R,
10407
- context: A,
10407
+ context: T,
10408
10408
  onRowDoubleClick: We,
10409
10409
  showPointerCursorInRows: Te,
10410
10410
  onRowSelectionChange: D,
@@ -10427,7 +10427,7 @@ const jh = ({
10427
10427
  ref: S,
10428
10428
  items: l,
10429
10429
  formView: a.get("form"),
10430
- context: A,
10430
+ context: T,
10431
10431
  relation: h,
10432
10432
  readOnly: m || !1,
10433
10433
  onChange: z
@@ -10444,12 +10444,12 @@ const jh = ({
10444
10444
  defaultValues: H == null ? void 0 : H.defaultValues,
10445
10445
  visible: fe,
10446
10446
  onSubmitSucceed: ie,
10447
- parentContext: A,
10447
+ parentContext: T,
10448
10448
  onCancel: q,
10449
10449
  readOnly: m,
10450
10450
  mustClearAfterSave: j,
10451
10451
  onMustRefreshParent: () => {
10452
- T == null || T({ forceRefresh: !0 });
10452
+ A == null || A({ forceRefresh: !0 });
10453
10453
  }
10454
10454
  }
10455
10455
  ),
@@ -10458,7 +10458,7 @@ const jh = ({
10458
10458
  {
10459
10459
  domain: _,
10460
10460
  model: h,
10461
- context: A,
10461
+ context: T,
10462
10462
  visible: ne,
10463
10463
  onSelectValues: me,
10464
10464
  onCloseModal: he
@@ -10471,7 +10471,7 @@ const jh = ({
10471
10471
  view_id: a.get("graph").view_id,
10472
10472
  model: h,
10473
10473
  domain: [[`${o.inv_field}`, "=", w]],
10474
- context: A,
10474
+ context: T,
10475
10475
  limit: 0
10476
10476
  }
10477
10477
  ),
@@ -10488,11 +10488,26 @@ const jh = ({
10488
10488
  Rt(() => {
10489
10489
  I();
10490
10490
  }, [t]);
10491
- const w = async (O) => o && o[O] ? o[O] : await k.getHandler().getView({
10492
- model: r,
10493
- type: O,
10494
- context: { ...g == null ? void 0 : g(), ...s }
10495
- }), I = async () => {
10491
+ const w = async (O) => {
10492
+ const b = k.getHandler().getView({
10493
+ model: r,
10494
+ type: O,
10495
+ context: { ...g == null ? void 0 : g(), ...s }
10496
+ });
10497
+ if (o && o[O]) {
10498
+ const T = o[O];
10499
+ if (!T.toolbar && (O === "form" || O === "tree")) {
10500
+ const _ = await b;
10501
+ return { ...T, toolbar: _.toolbar };
10502
+ }
10503
+ return T;
10504
+ }
10505
+ return await k.getHandler().getView({
10506
+ model: r,
10507
+ type: O,
10508
+ context: { ...g == null ? void 0 : g(), ...s }
10509
+ });
10510
+ }, I = async () => {
10496
10511
  u(!0), d(void 0);
10497
10512
  try {
10498
10513
  if (n && n.length > 0) {
@@ -10800,7 +10815,7 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
10800
10815
  }
10801
10816
  let v = r;
10802
10817
  y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (v = [
10803
- ["id", "in", n == null ? void 0 : n.map((T) => T.id)]
10818
+ ["id", "in", n == null ? void 0 : n.map((A) => A.id)]
10804
10819
  ]);
10805
10820
  const { datas: w } = await k.getHandler().exportData({
10806
10821
  model: e,
@@ -10813,7 +10828,7 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
10813
10828
  context: t,
10814
10829
  format: y.exportType
10815
10830
  });
10816
- a(), await new Promise((T) => setTimeout(T, 200));
10831
+ a(), await new Promise((A) => setTimeout(A, 200));
10817
10832
  const I = await fn(w);
10818
10833
  xr(w, I.mime);
10819
10834
  },
@@ -10827,18 +10842,18 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
10827
10842
  return s.current["/"] = y, Gi({ fields: y });
10828
10843
  }, [e, t, s]), d = E(
10829
10844
  async (y) => {
10830
- const w = uo(y, s.current)[co(y)], I = w.relation, T = await k.getHandler().getFields({
10845
+ const w = uo(y, s.current)[co(y)], I = w.relation, A = await k.getHandler().getFields({
10831
10846
  model: I,
10832
10847
  context: t,
10833
10848
  fields: []
10834
10849
  });
10835
- for (const [S, O] of Object.entries(T))
10836
- T[S].string = cg({
10850
+ for (const [S, O] of Object.entries(A))
10851
+ A[S].string = cg({
10837
10852
  parentTitle: w.string,
10838
10853
  title: O.string
10839
10854
  });
10840
- return s.current[y] = T, Gi({
10841
- fields: T,
10855
+ return s.current[y] = A, Gi({
10856
+ fields: A,
10842
10857
  parentKey: y
10843
10858
  });
10844
10859
  },
@@ -10852,13 +10867,13 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
10852
10867
  return {
10853
10868
  predefinedExports: y.map((I) => ({
10854
10869
  ...I,
10855
- fields: I.fields.map((T) => {
10856
- const S = co(T.key), b = uo(T.key, s.current)[S];
10870
+ fields: I.fields.map((A) => {
10871
+ const S = co(A.key), b = uo(A.key, s.current)[S];
10857
10872
  return b ? {
10858
- key: T.key,
10873
+ key: A.key,
10859
10874
  title: b.string
10860
10875
  } : {
10861
- key: T.key
10876
+ key: A.key
10862
10877
  };
10863
10878
  })
10864
10879
  })),
@@ -10897,10 +10912,10 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
10897
10912
  context: t
10898
10913
  });
10899
10914
  return await Promise.all(
10900
- y.fields.map(async (T) => await k.getHandler().create({
10915
+ y.fields.map(async (A) => await k.getHandler().create({
10901
10916
  model: "ir.exports.line",
10902
10917
  values: {
10903
- name: T.key,
10918
+ name: A.key,
10904
10919
  export_id: I
10905
10920
  },
10906
10921
  fields: w,
@@ -11135,8 +11150,8 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
11135
11150
  r == null || r(I);
11136
11151
  };
11137
11152
  async function g() {
11138
- const I = await fn(n), T = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"), O = d(s), b = d("name");
11139
- S.href = T, S.download = O || b, S.click();
11153
+ const I = await fn(n), A = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"), O = d(s), b = d("name");
11154
+ S.href = A, S.download = O || b, S.click();
11140
11155
  }
11141
11156
  async function y() {
11142
11157
  const I = await fn(n);
@@ -11144,8 +11159,8 @@ const { useToken: rg } = He, { TextArea: ao } = rt, og = (e) => {
11144
11159
  }
11145
11160
  async function v(I) {
11146
11161
  I.stopPropagation(), I.preventDefault();
11147
- const T = I.target.files[0], S = await Rs(T);
11148
- p(S), s && f(s, T.name);
11162
+ const A = I.target.files[0], S = await Rs(A);
11163
+ p(S), s && f(s, A.name);
11149
11164
  }
11150
11165
  function w() {
11151
11166
  f(s, void 0), p(void 0);
@@ -11580,14 +11595,14 @@ const Og = () => {
11580
11595
  async (y) => {
11581
11596
  var v;
11582
11597
  try {
11583
- const { params: w, model: I, name_search: T, context: S, order: O } = s, { results: b } = await l({
11598
+ const { params: w, model: I, name_search: A, context: S, order: O } = s, { results: b } = await l({
11584
11599
  params: w,
11585
11600
  model: I,
11586
11601
  context: S,
11587
11602
  limit: 1,
11588
11603
  offset: y,
11589
11604
  order: O,
11590
- name_search: T,
11605
+ name_search: A,
11591
11606
  skipRead: !0
11592
11607
  });
11593
11608
  return (v = b[0]) == null ? void 0 : v.id;
@@ -11606,19 +11621,19 @@ const Og = () => {
11606
11621
  var S, O;
11607
11622
  if (!a)
11608
11623
  return;
11609
- const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0, T = v ? w === t : w === -1;
11624
+ const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0, A = v ? w === t : w === -1;
11610
11625
  if (I) {
11611
11626
  const b = (S = a[w]) == null ? void 0 : S.id;
11612
11627
  if (b)
11613
11628
  d(w, b);
11614
11629
  else {
11615
- const A = await f(w);
11616
- A && d(w, A);
11630
+ const T = await f(w);
11631
+ T && d(w, T);
11617
11632
  }
11618
- } else if (T) {
11619
- const b = v ? 0 : t - 1, A = (O = a[b]) == null ? void 0 : O.id;
11620
- if (A)
11621
- d(b, A);
11633
+ } else if (A) {
11634
+ const b = v ? 0 : t - 1, T = (O = a[b]) == null ? void 0 : O.id;
11635
+ if (T)
11636
+ d(b, T);
11622
11637
  else {
11623
11638
  const _ = await f(b);
11624
11639
  _ && d(b, _);
@@ -11630,8 +11645,8 @@ const Og = () => {
11630
11645
  (y) => {
11631
11646
  if (!a || a.length === 0)
11632
11647
  return;
11633
- const v = y === "next", w = v ? n + 1 : n - 1, T = (v ? w === a.length : w === -1) ? v ? 0 : a.length - 1 : w;
11634
- d(T, a[T].id);
11648
+ const v = y === "next", w = v ? n + 1 : n - 1, A = (v ? w === a.length : w === -1) ? v ? 0 : a.length - 1 : w;
11649
+ d(A, a[A].id);
11635
11650
  },
11636
11651
  [a, n, d]
11637
11652
  ), p = E(() => {
@@ -11761,11 +11776,11 @@ function Vg({ toolbar: e }) {
11761
11776
  setRemovingItem: v,
11762
11777
  removingItem: w,
11763
11778
  duplicatingItem: I,
11764
- setDuplicatingItem: T,
11779
+ setDuplicatingItem: A,
11765
11780
  setResults: S,
11766
11781
  formIsLoading: O,
11767
11782
  attachments: b,
11768
- formRef: A,
11783
+ formRef: T,
11769
11784
  setFormHasChanges: _,
11770
11785
  previousView: R,
11771
11786
  setPreviousView: C,
@@ -11780,18 +11795,18 @@ function Vg({ toolbar: e }) {
11780
11795
  },
11781
11796
  [u, n]
11782
11797
  ), B = E(() => {
11783
- L(() => A.current.fetchValues());
11784
- }, [L, A]), { actionButtonProps: G, printButtonProps: $, relateButtonProps: K } = La({
11798
+ L(() => T.current.fetchValues());
11799
+ }, [L, T]), { actionButtonProps: G, printButtonProps: $, relateButtonProps: K } = La({
11785
11800
  toolbar: e,
11786
11801
  mustDisableButtons: N,
11787
- formRef: A,
11802
+ formRef: T,
11788
11803
  onRefreshParentValues: B
11789
11804
  }), X = E(async () => {
11790
11805
  try {
11791
11806
  v == null || v(!0), await k.getHandler().deleteObjects({
11792
11807
  model: y,
11793
11808
  ids: [d],
11794
- context: A.current.getContext()
11809
+ context: T.current.getContext()
11795
11810
  });
11796
11811
  const j = m == null ? void 0 : m.filter(
11797
11812
  (ie) => ie.id !== d
@@ -11808,7 +11823,7 @@ function Vg({ toolbar: e }) {
11808
11823
  d,
11809
11824
  p,
11810
11825
  y,
11811
- A,
11826
+ T,
11812
11827
  m,
11813
11828
  g,
11814
11829
  h,
@@ -11816,19 +11831,19 @@ function Vg({ toolbar: e }) {
11816
11831
  S
11817
11832
  ]), z = E(async () => {
11818
11833
  try {
11819
- T == null || T(!0);
11834
+ A == null || A(!0);
11820
11835
  const j = await k.getHandler().duplicate({
11821
11836
  id: d,
11822
11837
  model: y,
11823
- context: A.current.getContext()
11838
+ context: T.current.getContext()
11824
11839
  });
11825
11840
  j && await (F == null ? void 0 : F([j]));
11826
11841
  } catch (j) {
11827
11842
  Qt(JSON.stringify(j));
11828
11843
  } finally {
11829
- T == null || T(!1);
11844
+ A == null || A(!1);
11830
11845
  }
11831
- }, [d, y, A, F, T]), Q = E(
11846
+ }, [d, y, T, F, A]), Q = E(
11832
11847
  (j) => {
11833
11848
  C == null || C(s), _ == null || _(!1), l == null || l(j);
11834
11849
  },
@@ -11864,17 +11879,17 @@ function Vg({ toolbar: e }) {
11864
11879
  return Yt(
11865
11880
  "pagedown",
11866
11881
  async () => {
11867
- !D || !await A.current.cancelUnsavedChanges() || r();
11882
+ !D || !await T.current.cancelUnsavedChanges() || r();
11868
11883
  },
11869
11884
  { enableOnFormTags: !0, preventDefault: !0 },
11870
- [D, r, A]
11885
+ [D, r, T]
11871
11886
  ), Yt(
11872
11887
  "pageup",
11873
11888
  async () => {
11874
- !D || !await A.current.cancelUnsavedChanges() || o();
11889
+ !D || !await T.current.cancelUnsavedChanges() || o();
11875
11890
  },
11876
11891
  { enableOnFormTags: !0, preventDefault: !0 },
11877
- [D, o, A]
11892
+ [D, o, T]
11878
11893
  ), Yt(
11879
11894
  "ctrl+s,command+s",
11880
11895
  () => D && (c == null ? void 0 : c()),
@@ -11883,7 +11898,7 @@ function Vg({ toolbar: e }) {
11883
11898
  ), Yt(
11884
11899
  "ctrl+l,command+l",
11885
11900
  async () => {
11886
- !D || !R || !await A.current.cancelUnsavedChanges() || (C == null || C(s), l == null || l(R));
11901
+ !D || !R || !await T.current.cancelUnsavedChanges() || (C == null || C(s), l == null || l(R));
11887
11902
  },
11888
11903
  { enableOnFormTags: !0, preventDefault: !0 },
11889
11904
  [
@@ -11892,7 +11907,7 @@ function Vg({ toolbar: e }) {
11892
11907
  s,
11893
11908
  C,
11894
11909
  l,
11895
- A
11910
+ T
11896
11911
  ]
11897
11912
  ), s ? /* @__PURE__ */ P(Xe, { wrap: !0, children: [
11898
11913
  O && /* @__PURE__ */ P(oe, { children: [
@@ -12409,11 +12424,11 @@ const { useToken: Bg } = He, { Title: Hg, Text: Jn } = Ut, _r = ({
12409
12424
  searchVisible: v = !0,
12410
12425
  setSearchVisible: w = void 0,
12411
12426
  sorter: I = void 0,
12412
- setSorter: T = void 0,
12427
+ setSorter: A = void 0,
12413
12428
  setTotalItems: S = void 0,
12414
12429
  setSearchTreeNameSearch: O = void 0,
12415
12430
  setTreeIsLoading: b = void 0,
12416
- limit: A,
12431
+ limit: T,
12417
12432
  setLimit: _,
12418
12433
  searchParams: R,
12419
12434
  searchValues: C,
@@ -12439,14 +12454,14 @@ const { useToken: Bg } = He, { Title: Hg, Text: Jn } = Ut, _r = ({
12439
12454
  formView: s,
12440
12455
  treeView: l,
12441
12456
  sorter: I,
12442
- setSorter: T,
12457
+ setSorter: A,
12443
12458
  setCurrentItemIndex: m,
12444
12459
  setResultsActionView: d,
12445
12460
  resultsActionView: p,
12446
12461
  domain: a,
12447
12462
  currentId: h,
12448
12463
  setActionViewTotalItems: S,
12449
- limit: A,
12464
+ limit: T,
12450
12465
  setLimit: _
12451
12466
  }), X = Z(
12452
12467
  () => tr([
@@ -12478,7 +12493,7 @@ const { useToken: Bg } = He, { Title: Hg, Text: Jn } = Ut, _r = ({
12478
12493
  ...c == null ? void 0 : c.fields
12479
12494
  },
12480
12495
  searchFields: X,
12481
- limit: A,
12496
+ limit: T,
12482
12497
  onClear: L,
12483
12498
  offset: $,
12484
12499
  isSearching: B,
@@ -12500,7 +12515,7 @@ const { useToken: Bg } = He, { Title: Hg, Text: Jn } = Ut, _r = ({
12500
12515
  model: r,
12501
12516
  context: o,
12502
12517
  domain: pn(R || [], a),
12503
- limit: V ? A : void 0,
12518
+ limit: V ? T : void 0,
12504
12519
  manualIds: V && p && p.length > 0 ? p.map((z) => z.id) : void 0
12505
12520
  }
12506
12521
  )
@@ -12605,11 +12620,11 @@ function Yg({
12605
12620
  setSearchVisible: v,
12606
12621
  setSearchTreeNameSearch: w,
12607
12622
  searchTreeNameSearch: I,
12608
- treeIsLoading: T,
12623
+ treeIsLoading: A,
12609
12624
  setPreviousView: S,
12610
12625
  previousView: O,
12611
12626
  results: b,
12612
- limit: A,
12627
+ limit: T,
12613
12628
  totalItems: _,
12614
12629
  isActive: R,
12615
12630
  isInfiniteTree: C
@@ -12620,7 +12635,7 @@ function Yg({
12620
12635
  (te = m == null ? void 0 : m.current) == null || te.refreshResults();
12621
12636
  }, [m]), { actionButtonProps: G, printButtonProps: $ } = Ba({
12622
12637
  toolbar: n,
12623
- disabled: T,
12638
+ disabled: A,
12624
12639
  parentContext: e,
12625
12640
  selectedRowItems: s,
12626
12641
  onRefreshParentValues: B
@@ -12748,7 +12763,7 @@ function Yg({
12748
12763
  });
12749
12764
  }, [xe, D]);
12750
12765
  return /* @__PURE__ */ P(Xe, { wrap: !0, children: [
12751
- T && /* @__PURE__ */ P(oe, { children: [
12766
+ A && /* @__PURE__ */ P(oe, { children: [
12752
12767
  /* @__PURE__ */ i(Ke, {}),
12753
12768
  /* @__PURE__ */ i(et, {}),
12754
12769
  /* @__PURE__ */ i(et, {})
@@ -12757,7 +12772,7 @@ function Yg({
12757
12772
  /* @__PURE__ */ i(
12758
12773
  Gg,
12759
12774
  {
12760
- disabled: u || c || T,
12775
+ disabled: u || c || A,
12761
12776
  searchText: I,
12762
12777
  onSearch: H
12763
12778
  }
@@ -12774,18 +12789,18 @@ function Yg({
12774
12789
  tooltip: D("advanced_search"),
12775
12790
  type: y ? "primary" : "default",
12776
12791
  onClick: () => v == null ? void 0 : v(!y),
12777
- disabled: u || c || T,
12792
+ disabled: u || c || A,
12778
12793
  badgeNumber: g == null ? void 0 : g.length
12779
12794
  }
12780
12795
  ),
12781
12796
  /* @__PURE__ */ i(et, {}),
12782
- /* @__PURE__ */ i(Qa, { disabled: T }),
12797
+ /* @__PURE__ */ i(Qa, { disabled: A }),
12783
12798
  /* @__PURE__ */ i(
12784
12799
  it,
12785
12800
  {
12786
12801
  icon: /* @__PURE__ */ i(vr, {}),
12787
12802
  tooltip: D("duplicate"),
12788
- disabled: !s || (s == null ? void 0 : s.length) !== 1 || u || T,
12803
+ disabled: !s || (s == null ? void 0 : s.length) !== 1 || u || A,
12789
12804
  loading: u,
12790
12805
  onClick: q
12791
12806
  }
@@ -12795,7 +12810,7 @@ function Yg({
12795
12810
  {
12796
12811
  icon: /* @__PURE__ */ i(wo, {}),
12797
12812
  tooltip: D("delete"),
12798
- disabled: !(s && (s == null ? void 0 : s.length) > 0) || T,
12813
+ disabled: !(s && (s == null ? void 0 : s.length) > 0) || A,
12799
12814
  loading: c,
12800
12815
  onClick: ie
12801
12816
  }
@@ -12807,7 +12822,7 @@ function Yg({
12807
12822
  {
12808
12823
  icon: /* @__PURE__ */ i($n, {}),
12809
12824
  tooltip: D("showLogs"),
12810
- disabled: !(s && (s == null ? void 0 : s.length) > 0) || T,
12825
+ disabled: !(s && (s == null ? void 0 : s.length) > 0) || A,
12811
12826
  onClick: () => Xa(d, s[0].id, D)
12812
12827
  }
12813
12828
  ),
@@ -12816,7 +12831,7 @@ function Yg({
12816
12831
  {
12817
12832
  icon: /* @__PURE__ */ i(wr, {}),
12818
12833
  tooltip: D("refresh"),
12819
- disabled: u || c || T,
12834
+ disabled: u || c || A,
12820
12835
  onClick: B
12821
12836
  }
12822
12837
  ),
@@ -12829,7 +12844,7 @@ function Yg({
12829
12844
  availableViews: r,
12830
12845
  onChangeView: fe,
12831
12846
  previousView: O,
12832
- disabled: T
12847
+ disabled: A
12833
12848
  }
12834
12849
  )
12835
12850
  ] }),
@@ -12859,7 +12874,7 @@ function Yg({
12859
12874
  }
12860
12875
  ],
12861
12876
  onItemClick: j,
12862
- disabled: u || c || T || X
12877
+ disabled: u || c || A || X
12863
12878
  }
12864
12879
  ),
12865
12880
  /* @__PURE__ */ i(
@@ -12869,7 +12884,7 @@ function Yg({
12869
12884
  onClose: () => N(!1),
12870
12885
  model: d,
12871
12886
  domain: z,
12872
- limit: A,
12887
+ limit: T,
12873
12888
  totalRegisters: _ || 0,
12874
12889
  selectedRegistersToExport: s,
12875
12890
  visibleRegisters: (b == null ? void 0 : b.length) || 0,
@@ -12932,16 +12947,16 @@ const qg = (e) => {
12932
12947
  setPreviousView: v,
12933
12948
  setIsInfiniteTree: w,
12934
12949
  setSelectedRowItems: I
12935
- } = ee(mt), T = E(
12950
+ } = ee(mt), A = E(
12936
12951
  (S) => {
12937
12952
  const { id: O } = S;
12938
12953
  f(O);
12939
12954
  const b = u.findIndex((_) => _.id === O);
12940
12955
  v == null || v(y), c(b);
12941
- const A = m.find(
12956
+ const T = m.find(
12942
12957
  (_) => _.type === "form"
12943
12958
  );
12944
- d(A);
12959
+ d(T);
12945
12960
  },
12946
12961
  [
12947
12962
  m,
@@ -12974,7 +12989,7 @@ const qg = (e) => {
12974
12989
  formView: a,
12975
12990
  treeView: s,
12976
12991
  domain: l,
12977
- onRowClicked: T
12992
+ onRowClicked: A
12978
12993
  }
12979
12994
  ),
12980
12995
  !g && /* @__PURE__ */ i(
@@ -12988,7 +13003,7 @@ const qg = (e) => {
12988
13003
  formView: a,
12989
13004
  treeView: s,
12990
13005
  domain: l,
12991
- onRowClicked: T
13006
+ onRowClicked: A
12992
13007
  }
12993
13008
  )
12994
13009
  ] }) : null;
@@ -13148,8 +13163,8 @@ function ty(e, t) {
13148
13163
  treeExpandable: g = !1,
13149
13164
  limit: y,
13150
13165
  initialSearchParams: v = []
13151
- } = e, [w, I] = x(), [T, S] = x([]), [O, b] = x(!0), A = m || void 0, [_, R] = x(
13152
- A
13166
+ } = e, [w, I] = x(), [A, S] = x([]), [O, b] = x(!0), T = m || void 0, [_, R] = x(
13167
+ T
13153
13168
  ), [C, F] = x([]), [D, V] = x(), [N, L] = x([]), [B, G] = x(), [$, K] = x(0), [X, z] = x(!1), [Q, xe] = x(!1), [fe, H] = x(), { t: j } = ce(), q = Y(), ie = Y(), te = ee(
13154
13169
  bt
13155
13170
  ), {
@@ -13288,8 +13303,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13288
13303
  c
13289
13304
  ]);
13290
13305
  l({ tabKey: c, canWeClose: de }), un(() => {
13291
- const J = T.find((Fe) => Fe.type === "tree"), pe = T.find((Fe) => u.id ? Fe.type === u.type && Fe.view_id === u.id : Fe.type === u.type);
13292
- We(pe || J), m ? ne == null || ne(A) : (Me(void 0), V(void 0)), _e();
13306
+ const J = A.find((Fe) => Fe.type === "tree"), pe = A.find((Fe) => u.id ? Fe.type === u.type && Fe.view_id === u.id : Fe.type === u.type);
13307
+ We(pe || J), m ? ne == null || ne(T) : (Me(void 0), V(void 0)), _e();
13293
13308
  }, [r, a, m]), un(() => {
13294
13309
  if (he === c) {
13295
13310
  ne == null || ne(_);
@@ -13330,7 +13345,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13330
13345
  Fe = "tree", Ge = [["id", "in", J]];
13331
13346
  if (xe(!1), z(!1), pe && Fe === "form") {
13332
13347
  Me(J[0]);
13333
- const ue = T.find(
13348
+ const ue = A.find(
13334
13349
  (ve) => ve.type === "form"
13335
13350
  );
13336
13351
  We(ue);
@@ -13355,7 +13370,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13355
13370
  q.current.clearAndReload();
13356
13371
  else {
13357
13372
  Me(void 0);
13358
- const J = T.find(
13373
+ const J = A.find(
13359
13374
  (pe) => pe.type === "form"
13360
13375
  );
13361
13376
  We(J);
@@ -13367,7 +13382,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13367
13382
  title: s,
13368
13383
  currentView: w,
13369
13384
  setCurrentView: We,
13370
- availableViews: T,
13385
+ availableViews: A,
13371
13386
  formRef: q,
13372
13387
  searchTreeRef: ie,
13373
13388
  onNewClicked: Ne,
@@ -13394,7 +13409,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13394
13409
  /* @__PURE__ */ i(
13395
13410
  ny,
13396
13411
  {
13397
- availableViews: T,
13412
+ availableViews: A,
13398
13413
  formRef: q,
13399
13414
  currentId: _,
13400
13415
  currentView: w,
@@ -13555,13 +13570,13 @@ function iy(e) {
13555
13570
  domain: a = [],
13556
13571
  visible: s = !0,
13557
13572
  parentContext: l = {}
13558
- } = e, [c, u] = x(!1), [f, d] = x(!1), [m, h] = x(), [p, g] = x(), [y, v] = x(), [w, I] = x(1), [T, S] = x(0), O = Y(Ht), b = Y([]), [A, _] = x(0), [R, C] = x([]), [F, D] = x(void 0), [V, N] = x(), [L, B] = x(), [G, $] = x(), [K, X] = x(!1), z = Y([]), Q = (M) => {
13573
+ } = e, [c, u] = x(!1), [f, d] = x(!1), [m, h] = x(), [p, g] = x(), [y, v] = x(), [w, I] = x(1), [A, S] = x(0), O = Y(Ht), b = Y([]), [T, _] = x(0), [R, C] = x([]), [F, D] = x(void 0), [V, N] = x(), [L, B] = x(), [G, $] = x(), [K, X] = x(!1), z = Y([]), Q = (M) => {
13559
13574
  X(!0), I(M), S((M - 1) * O.current);
13560
13575
  }, xe = async () => {
13561
13576
  const M = z.current.length > 0 ? z.current : a, ne = pn(b.current, M), { colors: me } = jt(p), { totalItems: he, results: ye, attrsEvaluated: Ee } = await k.getHandler().searchForTree({
13562
13577
  params: ne,
13563
13578
  limit: O.current,
13564
- offset: T,
13579
+ offset: A,
13565
13580
  model: m,
13566
13581
  fields: p.fields,
13567
13582
  context: l,
@@ -13585,7 +13600,7 @@ function iy(e) {
13585
13600
  };
13586
13601
  se(() => {
13587
13602
  f && s && fe();
13588
- }, [w, T, f, s]);
13603
+ }, [w, A, f, s]);
13589
13604
  const H = async (M) => {
13590
13605
  d(!1), u(!0), $(void 0);
13591
13606
  try {
@@ -13633,7 +13648,7 @@ function iy(e) {
13633
13648
  Wn,
13634
13649
  {
13635
13650
  showPagination: !1,
13636
- total: A,
13651
+ total: T,
13637
13652
  limit: O.current,
13638
13653
  page: w,
13639
13654
  treeView: p,
@@ -13680,7 +13695,7 @@ function ly(e, t) {
13680
13695
  moveItemsEnabled: p
13681
13696
  } = ee(Ho), g = Y(), y = Y(), [v] = Je(k.getHandler().getView), [w] = Je(
13682
13697
  k.getHandler().readObjects
13683
- ), [I] = Je(k.getHandler().update), T = Tr(
13698
+ ), [I] = Je(k.getHandler().update), A = Tr(
13684
13699
  wn.FEATURE_READFORVIEW
13685
13700
  );
13686
13701
  se(() => {
@@ -13694,7 +13709,7 @@ function ly(e, t) {
13694
13709
  async function S() {
13695
13710
  u(!0), m(!0), d(void 0);
13696
13711
  try {
13697
- const F = await O(), D = await A(F), V = F.fields[Gr].relation, N = D[Gr].items;
13712
+ const F = await O(), D = await T(F), V = F.fields[Gr].relation, N = D[Gr].items;
13698
13713
  y.current = F.fields;
13699
13714
  const L = await b({
13700
13715
  items: N,
@@ -13737,7 +13752,7 @@ function ly(e, t) {
13737
13752
  });
13738
13753
  return N;
13739
13754
  }
13740
- async function A(F) {
13755
+ async function T(F) {
13741
13756
  return (await w({
13742
13757
  model: n,
13743
13758
  ids: [o],
@@ -13827,7 +13842,7 @@ function ly(e, t) {
13827
13842
  }
13828
13843
  let te = null;
13829
13844
  if ((j == null ? void 0 : j.type) === "graph") {
13830
- const ye = N.server_action === !0 && T ? Us : vn;
13845
+ const ye = N.server_action === !0 && A ? Us : vn;
13831
13846
  te = /* @__PURE__ */ i(
13832
13847
  ye,
13833
13848
  {
@@ -13944,18 +13959,18 @@ const cy = xt(ly), dy = (e) => {
13944
13959
  const { ooui: t } = e;
13945
13960
  return /* @__PURE__ */ i(De, { type: "array", ...e, children: /* @__PURE__ */ i(uy, { ooui: t }) });
13946
13961
  }, uy = (e) => {
13947
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [s, l] = x([]), [c, u] = x(), [f, d] = x(!1), { relation: m, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Ue), { getContext: w } = v || {};
13962
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((T) => T.operation !== "pendingRemove").map((T) => T.id), [s, l] = x([]), [c, u] = x(), [f, d] = x(!1), { relation: m, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Ue), { getContext: w } = v || {};
13948
13963
  Rt(() => {
13949
- T();
13964
+ A();
13950
13965
  }, [o]);
13951
- const I = (A) => {
13966
+ const I = (T) => {
13952
13967
  r == null || r({
13953
- items: A
13968
+ items: T
13954
13969
  });
13955
13970
  };
13956
- async function T() {
13971
+ async function A() {
13957
13972
  d(!0);
13958
- let A = [];
13973
+ let T = [];
13959
13974
  if (n.domain) {
13960
13975
  const _ = await k.getHandler().evalDomain({
13961
13976
  domain: n.domain,
@@ -13966,12 +13981,12 @@ const cy = xt(ly), dy = (e) => {
13966
13981
  fields: v == null ? void 0 : v.getFields(),
13967
13982
  context: v.getContext()
13968
13983
  });
13969
- A = [...A, ..._];
13984
+ T = [...T, ..._];
13970
13985
  }
13971
13986
  try {
13972
13987
  const R = (await k.getHandler().search({
13973
13988
  model: m,
13974
- params: A,
13989
+ params: T,
13975
13990
  fieldsToRetrieve: [g],
13976
13991
  context: { ...w == null ? void 0 : w(), ...h }
13977
13992
  })).map((C) => {
@@ -13989,15 +14004,15 @@ const cy = xt(ly), dy = (e) => {
13989
14004
  return /* @__PURE__ */ i(at, { className: "mt-10", message: c, type: "error", banner: !0 });
13990
14005
  }
13991
14006
  const S = () => {
13992
- b(s.map((A) => A.value));
14007
+ b(s.map((T) => T.value));
13993
14008
  }, O = () => {
13994
14009
  b([]);
13995
- }, b = (A) => {
13996
- const _ = o.map((C) => A.includes(C.id) ? C.operation == "pendingRemove" ? {
14010
+ }, b = (T) => {
14011
+ const _ = o.map((C) => T.includes(C.id) ? C.operation == "pendingRemove" ? {
13997
14012
  ...C,
13998
14013
  operation: "original"
13999
14014
  } : C : { id: C.id, operation: "pendingRemove" }), R = _.map((C) => C.id);
14000
- A.filter((C) => !R.includes(C)).map((C) => {
14015
+ T.filter((C) => !R.includes(C)).map((C) => {
14001
14016
  _.push({ id: C, operation: "pendingLink" });
14002
14017
  }), I(_);
14003
14018
  };
@@ -14009,7 +14024,7 @@ const cy = xt(ly), dy = (e) => {
14009
14024
  disabled: p,
14010
14025
  onChange: b,
14011
14026
  style: { width: "100%" },
14012
- children: /* @__PURE__ */ i(Be, { children: s.map((A) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(On, { value: A.value, children: A.label }) })) })
14027
+ children: /* @__PURE__ */ i(Be, { children: s.map((T) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(On, { value: T.value, children: T.label }) })) })
14013
14028
  }
14014
14029
  ),
14015
14030
  !p && /* @__PURE__ */ P(Xe, { children: [
@@ -14317,7 +14332,7 @@ function Hy(e, t) {
14317
14332
  }));
14318
14333
  function m(O) {
14319
14334
  if (O === r) {
14320
- const b = c.findIndex((A) => A.key === O);
14335
+ const b = c.findIndex((T) => T.key === O);
14321
14336
  c[b - 1] && o(c[b - 1].key), c[b + 1] && o(c[b + 1].key);
14322
14337
  }
14323
14338
  u(c.filter((b) => b.key !== O)), f.current.delete(O);
@@ -14329,14 +14344,14 @@ function Hy(e, t) {
14329
14344
  f.current.set(O, b);
14330
14345
  }
14331
14346
  async function p(O) {
14332
- const { actionRawData: b, res_id: A, initialView: _ } = O, R = await k.getHandler().getFields({
14347
+ const { actionRawData: b, res_id: T, initialView: _ } = O, R = await k.getHandler().getFields({
14333
14348
  model: O.model,
14334
14349
  context: l
14335
14350
  });
14336
14351
  let C = el(
14337
14352
  b == null ? void 0 : b.values
14338
14353
  );
14339
- const F = A || C.active_id || C.id;
14354
+ const F = T || C.active_id || C.id;
14340
14355
  if (F) {
14341
14356
  const N = await k.getHandler().readObjects({
14342
14357
  model: O.model,
@@ -14377,7 +14392,7 @@ function Hy(e, t) {
14377
14392
  async function g({
14378
14393
  model: O,
14379
14394
  view_id: b,
14380
- res_id: A
14395
+ res_id: T
14381
14396
  }) {
14382
14397
  const _ = await k.getHandler().getView({
14383
14398
  model: O,
@@ -14395,13 +14410,13 @@ function Hy(e, t) {
14395
14410
  title: _.title || O,
14396
14411
  target: "current",
14397
14412
  initialView: { id: _.view_id, type: "form" },
14398
- res_id: A
14413
+ res_id: T
14399
14414
  });
14400
14415
  }
14401
14416
  async function y({
14402
14417
  action: O,
14403
14418
  values: b,
14404
- forced_values: A,
14419
+ forced_values: T,
14405
14420
  initialViewType: _,
14406
14421
  res_id: R,
14407
14422
  domain: C = []
@@ -14472,7 +14487,7 @@ function Hy(e, t) {
14472
14487
  action_type: D,
14473
14488
  action_id: N,
14474
14489
  values: b,
14475
- forced_values: A,
14490
+ forced_values: T,
14476
14491
  res_id: R,
14477
14492
  treeExpandable: H,
14478
14493
  limit: fe,
@@ -14485,7 +14500,7 @@ function Hy(e, t) {
14485
14500
  function v({
14486
14501
  title: O,
14487
14502
  content: b,
14488
- key: A,
14503
+ key: T,
14489
14504
  action: _
14490
14505
  }) {
14491
14506
  let R = [...c];
@@ -14493,17 +14508,17 @@ function Hy(e, t) {
14493
14508
  ...R,
14494
14509
  {
14495
14510
  title: O,
14496
- key: A,
14511
+ key: T,
14497
14512
  closable: !0,
14498
14513
  content: b,
14499
14514
  action: _
14500
14515
  }
14501
- ]), o(A);
14516
+ ]), o(T);
14502
14517
  }
14503
14518
  async function w({
14504
14519
  relateData: O,
14505
14520
  fields: b,
14506
- values: A,
14521
+ values: T,
14507
14522
  action_id: _,
14508
14523
  action_type: R
14509
14524
  }) {
@@ -14517,12 +14532,12 @@ function Hy(e, t) {
14517
14532
  limit: B
14518
14533
  } = O, [G, $] = V[0], K = { id: G, type: $ }, X = F, z = Lt({
14519
14534
  context: X,
14520
- values: { ...A, ...s }
14535
+ values: { ...T, ...s }
14521
14536
  }), Q = D, xe = D ? await k.getHandler().evalDomain({
14522
14537
  domain: D,
14523
14538
  values: Zt({
14524
14539
  fields: b,
14525
- values: { ...A, ...s }
14540
+ values: { ...T, ...s }
14526
14541
  }),
14527
14542
  fields: b,
14528
14543
  context: { ...l, ...z }
@@ -14542,20 +14557,20 @@ function Hy(e, t) {
14542
14557
  context: X,
14543
14558
  domain: Q,
14544
14559
  fields: b,
14545
- values: A
14560
+ values: T
14546
14561
  }
14547
14562
  });
14548
14563
  }
14549
14564
  async function I(O) {
14550
14565
  const {
14551
14566
  action_id: b,
14552
- action_type: A,
14567
+ action_type: T,
14553
14568
  res_id: _,
14554
14569
  view_id: R,
14555
14570
  overrideUnsettedLimit: C = !1,
14556
14571
  values: F = {},
14557
14572
  domain: D
14558
- } = O, V = `${A},${b}`, N = await k.getHandler().getActionData({
14573
+ } = O, V = `${T},${b}`, N = await k.getHandler().getActionData({
14559
14574
  action: V,
14560
14575
  context: l
14561
14576
  }), L = N.context, B = Lt({
@@ -14610,7 +14625,7 @@ function Hy(e, t) {
14610
14625
  target: Q,
14611
14626
  initialView: te,
14612
14627
  action_id: b,
14613
- action_type: A,
14628
+ action_type: T,
14614
14629
  res_id: _,
14615
14630
  treeExpandable: H,
14616
14631
  limit: C && (fe === 0 || fe === !1) ? Ht : fe,
@@ -14621,10 +14636,10 @@ function Hy(e, t) {
14621
14636
  }
14622
14637
  });
14623
14638
  }
14624
- async function T({
14639
+ async function A({
14625
14640
  model: O,
14626
14641
  values: b,
14627
- forced_values: A,
14642
+ forced_values: T,
14628
14643
  initialViewType: _,
14629
14644
  res_id: R,
14630
14645
  domain: C
@@ -14633,7 +14648,7 @@ function Hy(e, t) {
14633
14648
  await y({
14634
14649
  action: F,
14635
14650
  values: b,
14636
- forced_values: A,
14651
+ forced_values: T,
14637
14652
  initialViewType: _,
14638
14653
  res_id: R,
14639
14654
  domain: C
@@ -14642,7 +14657,7 @@ function Hy(e, t) {
14642
14657
  async function S(O) {
14643
14658
  const {
14644
14659
  domain: b,
14645
- context: A,
14660
+ context: T,
14646
14661
  model: _,
14647
14662
  views: R,
14648
14663
  title: C,
@@ -14662,13 +14677,13 @@ function Hy(e, t) {
14662
14677
  model: _,
14663
14678
  type: "form",
14664
14679
  id: D.type === "form" ? D.id : void 0,
14665
- context: { ...l, ...A }
14680
+ context: { ...l, ...T }
14666
14681
  });
14667
14682
  d.current.openActionModal({
14668
14683
  domain: b,
14669
14684
  model: _,
14670
14685
  formView: Q,
14671
- context: { ...l, ...A },
14686
+ context: { ...l, ...T },
14672
14687
  actionData: {
14673
14688
  action_id: V,
14674
14689
  action_type: N,
@@ -14689,7 +14704,7 @@ function Hy(e, t) {
14689
14704
  title: C,
14690
14705
  views: R,
14691
14706
  model: _,
14692
- context: { ...A, ...l },
14707
+ context: { ...T, ...l },
14693
14708
  domain: b,
14694
14709
  setCanWeClose: h,
14695
14710
  initialView: Q,
@@ -14712,7 +14727,7 @@ function Hy(e, t) {
14712
14727
  openShortcut: I,
14713
14728
  openAction: S,
14714
14729
  openRelate: w,
14715
- openDefaultActionForModel: T,
14730
+ openDefaultActionForModel: A,
14716
14731
  tabs: c,
14717
14732
  activeKey: r,
14718
14733
  onRemoveTab: async (O) => {
@@ -14852,7 +14867,7 @@ const { useToken: Ky } = He, qv = (e) => {
14852
14867
  currentView: v,
14853
14868
  currentId: w,
14854
14869
  openDefaultActionForModel: I
14855
- } = h || {}, T = Z(() => {
14870
+ } = h || {}, A = Z(() => {
14856
14871
  if (!v || !v.view_id || !v.extra)
14857
14872
  return;
14858
14873
  const { action_id: C, action_type: F } = v.extra || {};
@@ -14869,9 +14884,9 @@ const { useToken: Ky } = He, qv = (e) => {
14869
14884
  res_id: V
14870
14885
  };
14871
14886
  }, [w, v]), S = Z(() => {
14872
- if (T)
14873
- return JSON.stringify(T);
14874
- }, [T]);
14887
+ if (A)
14888
+ return JSON.stringify(A);
14889
+ }, [A]);
14875
14890
  se(() => {
14876
14891
  b();
14877
14892
  }, [S]);
@@ -14880,12 +14895,12 @@ const { useToken: Ky } = He, qv = (e) => {
14880
14895
  (F == null ? void 0 : F.action_type) !== "ir.actions.wizard" && p(F);
14881
14896
  }
14882
14897
  const b = E(async () => {
14883
- if (!T)
14898
+ if (!A)
14884
14899
  return;
14885
- const C = await n(T);
14900
+ const C = await n(A);
14886
14901
  C !== !1 && u(C), l(C !== !1);
14887
- }, [T, n]);
14888
- async function A() {
14902
+ }, [A, n]);
14903
+ async function T() {
14889
14904
  var C;
14890
14905
  (C = m == null ? void 0 : m.current) == null || C.close(), I == null || I({ model: "ir.ui.view_sc" });
14891
14906
  }
@@ -14951,7 +14966,7 @@ const { useToken: Ky } = He, qv = (e) => {
14951
14966
  ps,
14952
14967
  {
14953
14968
  style: { color: d.colorPrimary, cursor: "pointer" },
14954
- onClick: A
14969
+ onClick: T
14955
14970
  }
14956
14971
  ) }) })
14957
14972
  ] }),