@gisce/react-ooui 2.65.0-alpha.6 → 2.65.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -475,14 +475,14 @@ const _o = (e) => {
475
475
  if (g)
476
476
  return /* @__PURE__ */ i(Pt, {});
477
477
  if (u) {
478
- const C = St(u);
479
- return C && /* @__PURE__ */ i(C, {});
478
+ const S = St(u);
479
+ return S && /* @__PURE__ */ i(S, {});
480
480
  }
481
481
  }
482
482
  async function A() {
483
483
  l && o && (y(!0), await p({ type: l, action: o, context: d }), y(!1));
484
484
  }
485
- function S() {
485
+ function C() {
486
486
  if (c) {
487
487
  Bt({
488
488
  confirmMessage: c,
@@ -502,7 +502,7 @@ const _o = (e) => {
502
502
  Al.Button,
503
503
  {
504
504
  disabled: !s || f,
505
- onClick: S,
505
+ onClick: C,
506
506
  icon: /* @__PURE__ */ i(yr, {}),
507
507
  type: m ? "primary" : void 0,
508
508
  overlay: /* @__PURE__ */ i(
@@ -556,8 +556,8 @@ const _o = (e) => {
556
556
  if (g)
557
557
  return /* @__PURE__ */ i(Pt, {});
558
558
  if (d) {
559
- const S = St(d);
560
- return S && /* @__PURE__ */ i(S, {});
559
+ const C = St(d);
560
+ return C && /* @__PURE__ */ i(C, {});
561
561
  }
562
562
  }
563
563
  return /* @__PURE__ */ i(
@@ -644,7 +644,7 @@ const Es = (e) => {
644
644
  f(!0);
645
645
  try {
646
646
  const T = await A();
647
- await S(T);
647
+ await C(T);
648
648
  } catch (T) {
649
649
  wt(T);
650
650
  }
@@ -661,7 +661,7 @@ const Es = (e) => {
661
661
  }));
662
662
  return m == null || m(_), _;
663
663
  }
664
- async function S(T) {
664
+ async function C(T) {
665
665
  const _ = {};
666
666
  for (const O of T) {
667
667
  const x = (await $.getHandler().readObjects({
@@ -674,7 +674,7 @@ const Es = (e) => {
674
674
  }
675
675
  v.current = _, y(_);
676
676
  }
677
- function C() {
677
+ function S() {
678
678
  return u.map((T, _) => /* @__PURE__ */ P(Ye, { style: { paddingBottom: 20 }, children: [
679
679
  /* @__PURE__ */ i(Oe, { flex: "8rem", style: { paddingRight: 10 }, children: T.name }),
680
680
  /* @__PURE__ */ i(Oe, { flex: "auto", children: /* @__PURE__ */ i(
@@ -713,7 +713,7 @@ const Es = (e) => {
713
713
  }
714
714
  function w() {
715
715
  return d ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ P(ee, { children: [
716
- C(),
716
+ S(),
717
717
  /* @__PURE__ */ i(hr, {}),
718
718
  /* @__PURE__ */ i(Ye, { justify: "end", children: /* @__PURE__ */ P(rt, { children: [
719
719
  /* @__PURE__ */ i(
@@ -867,8 +867,8 @@ const $s = Ze(
867
867
  () => h && !p,
868
868
  [h, p]
869
869
  ), y = D(
870
- (C) => {
871
- r == null || r(C.target.value);
870
+ (S) => {
871
+ r == null || r(S.target.value);
872
872
  },
873
873
  [r]
874
874
  ), v = D(() => {
@@ -881,12 +881,12 @@ const $s = Ze(
881
881
  d(!1);
882
882
  }, []), A = D(() => {
883
883
  d(!1), l == null || l();
884
- }, [l]), S = g ? md : fd;
884
+ }, [l]), C = g ? md : fd;
885
885
  return a ? /* @__PURE__ */ P(ee, { children: [
886
886
  /* @__PURE__ */ i("div", { onClick: v, children: /* @__PURE__ */ i(
887
887
  Mn,
888
888
  {
889
- component: S,
889
+ component: C,
890
890
  ooui: e,
891
891
  value: t,
892
892
  disabled: !0,
@@ -1939,8 +1939,8 @@ const sn = ({
1939
1939
  summaryField: v,
1940
1940
  titleField: b,
1941
1941
  iconField: A,
1942
- colorField: S
1943
- } = r, C = a.filter((R) => R.values), F = ne(Ge), { getContext: w } = F || {};
1942
+ colorField: C
1943
+ } = r, S = a.filter((R) => R.values), F = ne(Ge), { getContext: w } = F || {};
1944
1944
  Mt(() => {
1945
1945
  _();
1946
1946
  }, [a]);
@@ -1979,7 +1979,7 @@ const sn = ({
1979
1979
  const O = (R) => {
1980
1980
  const E = St(R);
1981
1981
  return E && /* @__PURE__ */ i(E, {});
1982
- }, x = C.map((R) => {
1982
+ }, x = S.map((R) => {
1983
1983
  var V, N, L, B;
1984
1984
  const E = {
1985
1985
  children: /* @__PURE__ */ i(
@@ -1989,13 +1989,13 @@ const sn = ({
1989
1989
  summary: (N = R.values) == null ? void 0 : N[v],
1990
1990
  onClick: () => {
1991
1991
  h(
1992
- C.find((W) => R.id === W.id)
1992
+ S.find((W) => R.id === W.id)
1993
1993
  ), d(!0);
1994
1994
  }
1995
1995
  }
1996
1996
  )
1997
1997
  };
1998
- return (L = R.values) != null && L[A] && (E.dot = O(R.values[A])), (B = R.values) != null && B[S] && (E.color = !Os(R.values[S]) && !Rs(R.values[S]) && !R.values[S].toString().startsWith("#") ? Gn(R.values[S]) : R.values[S]), E;
1998
+ return (L = R.values) != null && L[A] && (E.dot = O(R.values[A])), (B = R.values) != null && B[C] && (E.color = !Os(R.values[C]) && !Rs(R.values[C]) && !R.values[C].toString().startsWith("#") ? Gn(R.values[C]) : R.values[C]), E;
1999
1999
  });
2000
2000
  return /* @__PURE__ */ P(ee, { children: [
2001
2001
  /* @__PURE__ */ i(is, { style: { padding: "1rem" }, items: x }),
@@ -2048,15 +2048,15 @@ async function Gs({
2048
2048
  values: n,
2049
2049
  context: l
2050
2050
  }) : [], y = [];
2051
- for (const S of u) {
2052
- const [C, F] = S;
2053
- if (C)
2054
- y.push(S);
2051
+ for (const C of u) {
2052
+ const [S, F] = C;
2053
+ if (S)
2054
+ y.push(C);
2055
2055
  else {
2056
2056
  const { view_id: w } = await $.getHandler().getView({
2057
2057
  model: c,
2058
2058
  type: F,
2059
- id: C,
2059
+ id: S,
2060
2060
  context: { ...t, ...s }
2061
2061
  });
2062
2062
  y.push([w, F]);
@@ -2093,12 +2093,12 @@ const nu = (e) => {
2093
2093
  });
2094
2094
  if (!g.active_id)
2095
2095
  throw s(v), new Error("active_id_not_found");
2096
- const { views: b } = v, A = b.find((S) => {
2097
- const [, C] = S;
2098
- return C === "tree";
2096
+ const { views: b } = v, A = b.find((C) => {
2097
+ const [, S] = C;
2098
+ return S === "tree";
2099
2099
  });
2100
2100
  if (A) {
2101
- const [S, C] = A, {
2101
+ const [C, S] = A, {
2102
2102
  actionId: F,
2103
2103
  actionType: w,
2104
2104
  title: T,
@@ -2111,8 +2111,8 @@ const nu = (e) => {
2111
2111
  name: T,
2112
2112
  res_id: !1,
2113
2113
  res_model: _,
2114
- view_id: S,
2115
- view_type: C,
2114
+ view_id: C,
2115
+ view_type: S,
2116
2116
  overrideUnsettedLimit: !0,
2117
2117
  values: {
2118
2118
  active_id: f,
@@ -2360,7 +2360,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2360
2360
  operator: m,
2361
2361
  manualIds: d,
2362
2362
  fixedHeight: f
2363
- } = e, [h, p] = I(!1), [g, y] = I(), [v, b] = I(0), [A, S] = I(), [C, F] = I(), [w, T] = I(), [_, O] = I(), [x] = Xe(
2363
+ } = e, [h, p] = I(!1), [g, y] = I(), [v, b] = I(0), [A, C] = I(), [S, F] = I(), [w, T] = I(), [_, O] = I(), [x] = Xe(
2364
2364
  $.getHandler().searchAllIds
2365
2365
  ), [R] = Xe(
2366
2366
  $.getHandler().readObjects
@@ -2439,7 +2439,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2439
2439
  k = await L({
2440
2440
  domain: Q,
2441
2441
  isTotal: !0
2442
- }), S(k);
2442
+ }), C(k);
2443
2443
  }
2444
2444
  if (k ? (K = Math.round(Z / k * 100 * 100) / 100, b(K)) : b(0), o) {
2445
2445
  const Q = await N({
@@ -2471,7 +2471,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2471
2471
  value: g,
2472
2472
  totalValue: A,
2473
2473
  percent: v,
2474
- color: C,
2474
+ color: S,
2475
2475
  icon: w,
2476
2476
  suffix: c,
2477
2477
  showPercent: s,
@@ -2491,7 +2491,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2491
2491
  $.getHandler().getFields
2492
2492
  ), [A] = Xe(
2493
2493
  $.getHandler().readObjects
2494
- ), [S] = Xe($.getHandler().search), C = D(async () => {
2494
+ ), [C] = Xe($.getHandler().search), S = D(async () => {
2495
2495
  u(!0), d(void 0), v(n.type || "line");
2496
2496
  const F = au({ ooui: n });
2497
2497
  let w, T;
@@ -2507,7 +2507,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2507
2507
  methods: {
2508
2508
  getFields: b,
2509
2509
  readObjects: A,
2510
- search: S
2510
+ search: C
2511
2511
  }
2512
2512
  }));
2513
2513
  } catch (_) {
@@ -2522,7 +2522,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2522
2522
  type: y,
2523
2523
  values: f,
2524
2524
  evaluatedEntries: p,
2525
- fetchData: C
2525
+ fetchData: S
2526
2526
  };
2527
2527
  g(w);
2528
2528
  const _ = su({
@@ -2552,7 +2552,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2552
2552
  n,
2553
2553
  f,
2554
2554
  A,
2555
- S,
2555
+ C,
2556
2556
  y,
2557
2557
  s
2558
2558
  ]);
@@ -2562,7 +2562,7 @@ const { getValueForOperator: pi } = ms, iu = (e) => {
2562
2562
  type: y,
2563
2563
  values: f,
2564
2564
  evaluatedEntries: p,
2565
- fetchData: C
2565
+ fetchData: S
2566
2566
  };
2567
2567
  };
2568
2568
  async function cu({
@@ -3300,7 +3300,7 @@ const Fn = At.createContext(null), bi = async (e) => {
3300
3300
  Ot
3301
3301
  ), { openAction: u } = c || {}, m = Y([]), { t: d } = me();
3302
3302
  Dt(t, () => ({
3303
- openActionModal: S,
3303
+ openActionModal: C,
3304
3304
  processAction: b
3305
3305
  }));
3306
3306
  const [f, h] = I(!1), [p, g] = I(
@@ -3417,7 +3417,7 @@ const Fn = At.createContext(null), bi = async (e) => {
3417
3417
  id: ((B = x == null ? void 0 : x.view_id) == null ? void 0 : B[0]) || void 0,
3418
3418
  context: V
3419
3419
  });
3420
- return S({
3420
+ return C({
3421
3421
  domain: N,
3422
3422
  model: x.res_model,
3423
3423
  formView: W,
@@ -3450,16 +3450,16 @@ const Fn = At.createContext(null), bi = async (e) => {
3450
3450
  }), { closeParent: !0 };
3451
3451
  }
3452
3452
  }
3453
- function S({
3453
+ function C({
3454
3454
  domain: w,
3455
3455
  model: T,
3456
3456
  formView: _,
3457
3457
  context: O,
3458
3458
  actionData: x
3459
3459
  }) {
3460
- f ? C({ domain: w, model: T, formView: _, context: O, actionData: x }) : (g({ domain: w, model: T, context: O, formView: _, actionData: x }), h(!0));
3460
+ f ? S({ domain: w, model: T, formView: _, context: O, actionData: x }) : (g({ domain: w, model: T, context: O, formView: _, actionData: x }), h(!0));
3461
3461
  }
3462
- async function C({
3462
+ async function S({
3463
3463
  domain: w,
3464
3464
  model: T,
3465
3465
  formView: _,
@@ -3772,8 +3772,8 @@ function Hu({
3772
3772
  setSearchVisible: v,
3773
3773
  setSearchTreeNameSearch: b,
3774
3774
  searchTreeNameSearch: A,
3775
- treeIsLoading: S,
3776
- setPreviousView: C,
3775
+ treeIsLoading: C,
3776
+ setPreviousView: S,
3777
3777
  previousView: F,
3778
3778
  results: w,
3779
3779
  limit: T,
@@ -3787,7 +3787,7 @@ function Hu({
3787
3787
  (X = f == null ? void 0 : f.current) == null || X.refreshResults();
3788
3788
  }, [f]), { actionButtonProps: W, printButtonProps: k } = ra({
3789
3789
  toolbar: n,
3790
- disabled: S,
3790
+ disabled: C,
3791
3791
  parentContext: e,
3792
3792
  selectedRowItems: s,
3793
3793
  onRefreshParentValues: B
@@ -3845,9 +3845,9 @@ function Hu({
3845
3845
  l
3846
3846
  ]), oe = D(
3847
3847
  (X) => {
3848
- C == null || C(o), a == null || a(X);
3848
+ S == null || S(o), a == null || a(X);
3849
3849
  },
3850
- [o, C, a]
3850
+ [o, S, a]
3851
3851
  ), H = D(
3852
3852
  (X) => {
3853
3853
  var j;
@@ -3889,10 +3889,10 @@ function Hu({
3889
3889
  }, [x, A, f]), Xt(
3890
3890
  "ctrl+l,command+l",
3891
3891
  () => {
3892
- O && F && (C == null || C(o), a == null || a(F));
3892
+ O && F && (S == null || S(o), a == null || a(F));
3893
3893
  },
3894
3894
  { enableOnFormTags: !0, preventDefault: !0 },
3895
- [F, o, O, C, a]
3895
+ [F, o, O, S, a]
3896
3896
  ), Xt(
3897
3897
  "ctrl+f,command+f",
3898
3898
  () => {
@@ -3915,7 +3915,7 @@ function Hu({
3915
3915
  });
3916
3916
  }, [we, E]);
3917
3917
  return /* @__PURE__ */ P(rt, { wrap: !0, children: [
3918
- S && /* @__PURE__ */ P(ee, { children: [
3918
+ C && /* @__PURE__ */ P(ee, { children: [
3919
3919
  /* @__PURE__ */ i(Qe, {}),
3920
3920
  /* @__PURE__ */ i(st, {}),
3921
3921
  /* @__PURE__ */ i(st, {})
@@ -3924,7 +3924,7 @@ function Hu({
3924
3924
  /* @__PURE__ */ i(
3925
3925
  Eu,
3926
3926
  {
3927
- disabled: u || c || S,
3927
+ disabled: u || c || C,
3928
3928
  searchText: A,
3929
3929
  onSearch: H
3930
3930
  }
@@ -3941,18 +3941,18 @@ function Hu({
3941
3941
  tooltip: E("advanced_search"),
3942
3942
  type: y ? "primary" : "default",
3943
3943
  onClick: () => v == null ? void 0 : v(!y),
3944
- disabled: u || c || S,
3944
+ disabled: u || c || C,
3945
3945
  badgeNumber: g == null ? void 0 : g.length
3946
3946
  }
3947
3947
  ),
3948
3948
  /* @__PURE__ */ i(st, {}),
3949
- /* @__PURE__ */ i(ea, { disabled: S }),
3949
+ /* @__PURE__ */ i(ea, { disabled: C }),
3950
3950
  /* @__PURE__ */ i(
3951
3951
  gt,
3952
3952
  {
3953
3953
  icon: /* @__PURE__ */ i(Un, {}),
3954
3954
  tooltip: E("duplicate"),
3955
- disabled: !s || (s == null ? void 0 : s.length) !== 1 || u || S,
3955
+ disabled: !s || (s == null ? void 0 : s.length) !== 1 || u || C,
3956
3956
  loading: u,
3957
3957
  onClick: z
3958
3958
  }
@@ -3962,7 +3962,7 @@ function Hu({
3962
3962
  {
3963
3963
  icon: /* @__PURE__ */ i(Io, {}),
3964
3964
  tooltip: E("delete"),
3965
- disabled: !(s && (s == null ? void 0 : s.length) > 0) || S,
3965
+ disabled: !(s && (s == null ? void 0 : s.length) > 0) || C,
3966
3966
  loading: c,
3967
3967
  onClick: ie
3968
3968
  }
@@ -3974,7 +3974,7 @@ function Hu({
3974
3974
  {
3975
3975
  icon: /* @__PURE__ */ i(Tn, {}),
3976
3976
  tooltip: E("showLogs"),
3977
- disabled: !(s && (s == null ? void 0 : s.length) === 1) || S,
3977
+ disabled: !(s && (s == null ? void 0 : s.length) === 1) || C,
3978
3978
  onClick: () => Po(d, s[0].id, E)
3979
3979
  }
3980
3980
  ),
@@ -3983,7 +3983,7 @@ function Hu({
3983
3983
  {
3984
3984
  icon: /* @__PURE__ */ i(wr, {}),
3985
3985
  tooltip: E("refresh"),
3986
- disabled: u || c || S,
3986
+ disabled: u || c || C,
3987
3987
  onClick: B
3988
3988
  }
3989
3989
  ),
@@ -3996,7 +3996,7 @@ function Hu({
3996
3996
  availableViews: r,
3997
3997
  onChangeView: oe,
3998
3998
  previousView: F,
3999
- disabled: S
3999
+ disabled: C
4000
4000
  }
4001
4001
  )
4002
4002
  ] }),
@@ -4026,7 +4026,7 @@ function Hu({
4026
4026
  }
4027
4027
  ],
4028
4028
  onItemClick: M,
4029
- disabled: u || c || S || Z
4029
+ disabled: u || c || C || Z
4030
4030
  }
4031
4031
  ),
4032
4032
  /* @__PURE__ */ i(
@@ -4390,34 +4390,34 @@ const qu = (e) => /* @__PURE__ */ i(Pe, { ...e, children: /* @__PURE__ */ i(la,
4390
4390
  p(), y();
4391
4391
  }, [p, y]), b = D(async () => {
4392
4392
  var w;
4393
- const S = await h({
4393
+ const C = await h({
4394
4394
  model: n,
4395
4395
  type: "form",
4396
4396
  context: r
4397
4397
  });
4398
- a(S);
4399
- const C = Zu(S);
4398
+ a(C);
4399
+ const S = Zu(C);
4400
4400
  let F = {};
4401
- if (C.length > 0 && (F = { ...(w = await g({
4401
+ if (S.length > 0 && (F = { ...(w = await g({
4402
4402
  model: n,
4403
4403
  ids: [t],
4404
- fieldsToRetrieve: C,
4404
+ fieldsToRetrieve: S,
4405
4405
  context: r
4406
- })) == null ? void 0 : w[0] }), F = { ...un(F, C), active_id: t }, l(F), !(!S || !S.toolbar))
4406
+ })) == null ? void 0 : w[0] }), F = { ...un(F, S), active_id: t }, l(F), !(!C || !C.toolbar))
4407
4407
  return {
4408
- actionItems: S.toolbar.action,
4409
- relateItems: S.toolbar.relate,
4410
- printItems: S.toolbar.print
4408
+ actionItems: C.toolbar.action,
4409
+ relateItems: C.toolbar.relate,
4410
+ printItems: C.toolbar.print
4411
4411
  };
4412
4412
  }, [r, h, t, n, g]);
4413
4413
  if (!t)
4414
4414
  return null;
4415
- function A({ item: S, type: C }) {
4415
+ function A({ item: C, type: S }) {
4416
4416
  const F = {
4417
4417
  values: s,
4418
4418
  fields: o.fields
4419
4419
  };
4420
- switch (C) {
4420
+ switch (S) {
4421
4421
  case "open":
4422
4422
  m({
4423
4423
  domain: [["id", "=", t]],
@@ -4434,7 +4434,7 @@ const qu = (e) => /* @__PURE__ */ i(Pe, { ...e, children: /* @__PURE__ */ i(la,
4434
4434
  break;
4435
4435
  case "action":
4436
4436
  f == null || f({
4437
- actionData: S,
4437
+ actionData: C,
4438
4438
  context: { active_id: t, active_ids: [t] },
4439
4439
  ...F
4440
4440
  });
@@ -4442,17 +4442,17 @@ const qu = (e) => /* @__PURE__ */ i(Pe, { ...e, children: /* @__PURE__ */ i(la,
4442
4442
  case "print":
4443
4443
  f == null || f({
4444
4444
  actionData: {
4445
- ...S,
4446
- datas: { ...S.datas, ids: [t] }
4445
+ ...C,
4446
+ datas: { ...C.datas, ids: [t] }
4447
4447
  },
4448
4448
  ...F
4449
4449
  });
4450
4450
  break;
4451
4451
  case "relate":
4452
4452
  u({
4453
- relateData: S,
4454
- action_id: S.id,
4455
- action_type: S.type,
4453
+ relateData: C,
4454
+ action_id: C.id,
4455
+ action_type: C.type,
4456
4456
  ...F
4457
4457
  });
4458
4458
  break;
@@ -4463,8 +4463,8 @@ const qu = (e) => /* @__PURE__ */ i(Pe, { ...e, children: /* @__PURE__ */ i(la,
4463
4463
  {
4464
4464
  onRetrieveData: b,
4465
4465
  onItemClick: A,
4466
- onOpenChange: (S) => {
4467
- S || v();
4466
+ onOpenChange: (C) => {
4467
+ C || v();
4468
4468
  }
4469
4469
  }
4470
4470
  );
@@ -4647,8 +4647,8 @@ const of = (e) => /* @__PURE__ */ i(Pe, { ...e, children: /* @__PURE__ */ i(ca,
4647
4647
  f(a);
4648
4648
  }, [f, a]);
4649
4649
  const h = (y) => {
4650
- const b = y.target.value.split(/[ ,;]+/), A = b.slice(0, -1).map((C) => C.trim()).filter((C) => C && !a.includes(C)), S = [...a, ...A].join(";");
4651
- (!n || S.length + b[b.length - 1].length <= n) && (A.length > 0 && (s([...a, ...A]), f([...a, ...A])), c(b[b.length - 1]));
4650
+ const b = y.target.value.split(/[ ,;]+/), A = b.slice(0, -1).map((S) => S.trim()).filter((S) => S && !a.includes(S)), C = [...a, ...A].join(";");
4651
+ (!n || C.length + b[b.length - 1].length <= n) && (A.length > 0 && (s([...a, ...A]), f([...a, ...A])), c(b[b.length - 1]));
4652
4652
  }, p = () => {
4653
4653
  if (l) {
4654
4654
  const y = l.split(";").map((b) => b.trim()).filter((b) => b && !a.includes(b)), v = [...a, ...y].join(";");
@@ -5038,7 +5038,7 @@ const of = (e) => /* @__PURE__ */ i(Pe, { ...e, children: /* @__PURE__ */ i(ca,
5038
5038
  ([y, v]) => {
5039
5039
  g[y] = v.map((b) => {
5040
5040
  const A = e.columns.find(
5041
- (S) => S.id === y
5041
+ (C) => C.id === y
5042
5042
  );
5043
5043
  return {
5044
5044
  operation: b,
@@ -5062,7 +5062,7 @@ const of = (e) => /* @__PURE__ */ i(Pe, { ...e, children: /* @__PURE__ */ i(ca,
5062
5062
  Object.entries(h).forEach((g) => {
5063
5063
  const y = g[0], v = g[1];
5064
5064
  p || (p = {}), p[y] = Object.keys(v).map((b) => {
5065
- const A = e.columns.find((S) => S.id === y);
5065
+ const A = e.columns.find((C) => C.id === y);
5066
5066
  return {
5067
5067
  operation: b,
5068
5068
  label: A[b],
@@ -5594,10 +5594,10 @@ function ym(e, t, n) {
5594
5594
  function A() {
5595
5595
  l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
5596
5596
  }
5597
- function S() {
5597
+ function C() {
5598
5598
  return l === void 0 ? s : b(Wr());
5599
5599
  }
5600
- function C() {
5600
+ function S() {
5601
5601
  var F = Wr(), w = y(F);
5602
5602
  if (r = arguments, o = this, c = F, w) {
5603
5603
  if (l === void 0)
@@ -5607,7 +5607,7 @@ function ym(e, t, n) {
5607
5607
  }
5608
5608
  return l === void 0 && (l = setTimeout(v, t)), s;
5609
5609
  }
5610
- return C.cancel = A, C.flush = S, C;
5610
+ return S.cancel = A, S.flush = C, S;
5611
5611
  }
5612
5612
  function oo(e) {
5613
5613
  var t = typeof e;
@@ -5712,11 +5712,11 @@ function Cm() {
5712
5712
  throw new TypeError("Object.keys called on a non-object");
5713
5713
  var A = s && g;
5714
5714
  if (v && h.length > 0 && !t.call(h, 0))
5715
- for (var S = 0; S < h.length; ++S)
5716
- b.push(String(S));
5717
- if (y && h.length > 0)
5718
5715
  for (var C = 0; C < h.length; ++C)
5719
5716
  b.push(String(C));
5717
+ if (y && h.length > 0)
5718
+ for (var S = 0; S < h.length; ++S)
5719
+ b.push(String(S));
5720
5720
  else
5721
5721
  for (var F in h)
5722
5722
  !(A && F === "prototype") && t.call(h, F) && b.push(String(F));
@@ -6360,45 +6360,45 @@ const Ko = /* @__PURE__ */ Ds(Zp), eh = _t(
6360
6360
  const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: a, searchValues: s } = e, l = Y(), { t: c } = me(), [u, m] = I(), d = Y(null), [f, h] = I();
6361
6361
  ae(() => {
6362
6362
  n && (h(void 0), setTimeout(() => {
6363
- const S = document.querySelector(
6363
+ const C = document.querySelector(
6364
6364
  "#floating-drawer-overlay input"
6365
6365
  );
6366
- S instanceof HTMLElement && S.focus();
6366
+ C instanceof HTMLElement && C.focus();
6367
6367
  }, 300));
6368
6368
  }, [n]), Mt(() => {
6369
6369
  l.current = new ps(o, a, 1), l.current.parse(), m(l.current._advancedSearchContainer);
6370
6370
  }, [a, o, n]);
6371
6371
  const p = D(
6372
- (S) => {
6372
+ (C) => {
6373
6373
  var F;
6374
- const C = rr(
6375
- S,
6374
+ const S = rr(
6375
+ C,
6376
6376
  (F = l.current) == null ? void 0 : F._advancedSearchContainer
6377
6377
  );
6378
- t({ params: C, values: ur(S) });
6378
+ t({ params: S, values: ur(C) });
6379
6379
  },
6380
6380
  [t]
6381
6381
  ), g = D(() => {
6382
- var S;
6383
- (S = d.current) == null || S.submit();
6382
+ var C;
6383
+ (C = d.current) == null || C.submit();
6384
6384
  }, []), y = D(
6385
- (S) => {
6385
+ (C) => {
6386
6386
  var w;
6387
- const C = ur(S);
6388
- if (Ko(C, s)) {
6387
+ const S = ur(C);
6388
+ if (Ko(S, s)) {
6389
6389
  h([]);
6390
6390
  return;
6391
6391
  }
6392
6392
  const F = rr(
6393
- S,
6393
+ C,
6394
6394
  (w = l.current) == null ? void 0 : w._advancedSearchContainer
6395
6395
  );
6396
6396
  h(F);
6397
6397
  },
6398
6398
  [s]
6399
6399
  ), v = D(() => {
6400
- var S, C;
6401
- (S = d.current) == null || S.resetFields(), (C = d == null ? void 0 : d.current) == null || C.setFieldsValue({}), h([]);
6400
+ var C, S;
6401
+ (C = d.current) == null || C.resetFields(), (S = d == null ? void 0 : d.current) == null || S.setFieldsValue({}), h([]);
6402
6402
  }, []), b = n ? f || rr(s, (A = l.current) == null ? void 0 : A._advancedSearchContainer) : [];
6403
6403
  return /* @__PURE__ */ i(
6404
6404
  nm,
@@ -6534,7 +6534,7 @@ function kr(e) {
6534
6534
  searchError: d,
6535
6535
  searchValues: f,
6536
6536
  showLimitOptions: h = !0
6537
- } = e, [p, g] = I(), [y, v] = I(), [b, A] = I(!1), S = Y(), { token: C } = oh(), [F] = Rt.useForm();
6537
+ } = e, [p, g] = I(), [y, v] = I(), [b, A] = I(!1), C = Y(), { token: S } = oh(), [F] = Rt.useForm();
6538
6538
  ae(() => {
6539
6539
  F.setFieldsValue(f);
6540
6540
  }, [f]);
@@ -6545,7 +6545,7 @@ function kr(e) {
6545
6545
  return R == null ? void 0 : R.map((E, V) => /* @__PURE__ */ i(Ye, { children: E.map((N, L) => /* @__PURE__ */ i(Oe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(pa, { field: N }) }, L)) }, V));
6546
6546
  };
6547
6547
  Mt(() => {
6548
- A(!1), S.current = new ps(n, t), S.current.parse(), g(S.current._simpleSearchContainer), v(S.current._advancedSearchContainer);
6548
+ A(!1), C.current = new ps(n, t), C.current.parse(), g(C.current._simpleSearchContainer), v(C.current._advancedSearchContainer);
6549
6549
  }, [t, n]);
6550
6550
  const T = w(), _ = (x) => {
6551
6551
  var N;
@@ -6553,7 +6553,7 @@ function kr(e) {
6553
6553
  delete x.offset, delete x.limit;
6554
6554
  const V = rr(
6555
6555
  x,
6556
- (N = S.current) == null ? void 0 : N._advancedSearchContainer
6556
+ (N = C.current) == null ? void 0 : N._advancedSearchContainer
6557
6557
  );
6558
6558
  o({ params: V, offset: E, limit: R, searchValues: x });
6559
6559
  }, O = D(() => {
@@ -6581,7 +6581,7 @@ function kr(e) {
6581
6581
  Rt,
6582
6582
  {
6583
6583
  className: "p-3 shadow-md",
6584
- style: { borderRadius: C.borderRadius },
6584
+ style: { borderRadius: S.borderRadius },
6585
6585
  form: F,
6586
6586
  onFinish: _,
6587
6587
  initialValues: { offset: s, limit: l },
@@ -6622,7 +6622,7 @@ function kr(e) {
6622
6622
  function Ba({
6623
6623
  useLocalState: e = !1
6624
6624
  }) {
6625
- const t = Ch() && !e, n = Xn(), [r, o] = I(!1), [a, s] = I(!1), [l, c] = I([]), [u, m] = I(0), [d, f] = I(void 0), [h, p] = I([]), [g, y] = I({}), [v, b] = I(), [A, S] = I([]), [C, F] = I(), [w, T] = I(0), [_, O] = I(), [x, R] = I(1), [E, V] = I(pr), [N, L] = I($t);
6625
+ const t = Ch() && !e, n = Xn(), [r, o] = I(!1), [a, s] = I(!1), [l, c] = I([]), [u, m] = I(0), [d, f] = I(void 0), [h, p] = I([]), [g, y] = I({}), [v, b] = I(), [A, C] = I([]), [S, F] = I(), [w, T] = I(0), [_, O] = I(), [x, R] = I(1), [E, V] = I(pr), [N, L] = I($t);
6626
6626
  return t ? {
6627
6627
  treeIsLoading: n.treeIsLoading ?? !1,
6628
6628
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -6688,8 +6688,8 @@ function Ba({
6688
6688
  searchTreeNameSearch: v,
6689
6689
  setSearchTreeNameSearch: b,
6690
6690
  results: A,
6691
- setResults: S,
6692
- searchQuery: C,
6691
+ setResults: C,
6692
+ searchQuery: S,
6693
6693
  setSearchQuery: F,
6694
6694
  totalItems: w,
6695
6695
  setTotalItems: T,
@@ -6785,7 +6785,7 @@ function lh(e, t) {
6785
6785
  onChangeSelectedRowKeys: m,
6786
6786
  nameSearch: d,
6787
6787
  filterType: f = "side"
6788
- } = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), b = ko(), [A, S] = I(!0), [C, F] = I(), { t: w } = me(), T = Y(null), _ = fa({
6788
+ } = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), b = ko(), [A, C] = I(!0), [S, F] = I(), { t: w } = me(), T = Y(null), _ = fa({
6789
6789
  elementRef: T,
6790
6790
  offset: sh
6791
6791
  }), { treeView: O, formView: x, loading: R } = $o({
@@ -6860,7 +6860,7 @@ function lh(e, t) {
6860
6860
  const qe = `${JSON.stringify(ce ? s : Ae)}-${ce}`;
6861
6861
  return qe !== Ne.current ? (Ne.current = qe, !0) : !1;
6862
6862
  }, [s, Ae, ce]), Ve = D(async () => {
6863
- F(void 0), ie(0), S(!0);
6863
+ F(void 0), ie(0), C(!0);
6864
6864
  try {
6865
6865
  const he = await $.getHandler().searchCount({
6866
6866
  params: ce ? s : Ae,
@@ -6872,7 +6872,7 @@ function lh(e, t) {
6872
6872
  } catch (he) {
6873
6873
  b(he);
6874
6874
  } finally {
6875
- S(!1);
6875
+ C(!1);
6876
6876
  }
6877
6877
  }, [
6878
6878
  s,
@@ -7012,22 +7012,22 @@ function lh(e, t) {
7012
7012
  pe(y.current);
7013
7013
  return;
7014
7014
  }
7015
- if (!C)
7015
+ if (!S)
7016
7016
  return;
7017
7017
  const Je = await $.getHandler().searchAllIds(
7018
7018
  {
7019
7019
  params: ce ? s : Ae,
7020
7020
  model: n,
7021
7021
  context: u,
7022
- totalItems: C
7022
+ totalItems: S
7023
7023
  }
7024
7024
  );
7025
7025
  pe(Je.map((ut) => ({ id: ut })));
7026
7026
  };
7027
- he ? C && C > ah ? Bt({
7027
+ he ? S && S > ah ? Bt({
7028
7028
  confirmMessage: w("confirmSelectAllRegisters").replace(
7029
7029
  "{totalRecords}",
7030
- C.toString()
7030
+ S.toString()
7031
7031
  ),
7032
7032
  t: w,
7033
7033
  onOk: qe
@@ -7042,7 +7042,7 @@ function lh(e, t) {
7042
7042
  k == null ? void 0 : k.length,
7043
7043
  L,
7044
7044
  w,
7045
- C
7045
+ S
7046
7046
  ]), nt = D(() => W, [W]), it = q(() => Be ? /* @__PURE__ */ i(Bo, { aggregates: Se, isLoading: ve }) : null, [Se, ve, Be]), It = D((he) => /* @__PURE__ */ i(Bn, { color: he, style: { marginLeft: 7 } }), []), te = D(
7047
7047
  (he) => {
7048
7048
  var qe;
@@ -7071,7 +7071,7 @@ function lh(e, t) {
7071
7071
  onGetFirstVisibleRowIndex: nt,
7072
7072
  selectedRowKeys: Re,
7073
7073
  onSelectionCheckboxClicked: be,
7074
- totalRows: C || 99999,
7074
+ totalRows: S || 99999,
7075
7075
  footer: it,
7076
7076
  hasStatusColumn: ye.status !== null,
7077
7077
  statusComponent: It,
@@ -7096,7 +7096,7 @@ function lh(e, t) {
7096
7096
  B,
7097
7097
  It,
7098
7098
  ue,
7099
- C,
7099
+ S,
7100
7100
  ye,
7101
7101
  re
7102
7102
  ]), Te = Y(Q), $e = Y(V), Ne = Y(), pt = Y();
@@ -7219,7 +7219,7 @@ function lh(e, t) {
7219
7219
  {
7220
7220
  selectedRowKeys: Re,
7221
7221
  allRowSelectedMode: !1,
7222
- totalRows: C
7222
+ totalRows: S
7223
7223
  }
7224
7224
  ),
7225
7225
  /* @__PURE__ */ i("div", { ref: T, style: vt, children: R || Ke || A ? /* @__PURE__ */ i(Qe, {}) : Me })
@@ -7307,23 +7307,23 @@ const Wa = _t(lh), Qi = (e, t = "14px -apple-system") => {
7307
7307
  sorter: v,
7308
7308
  onFetchChildrenForRecord: b,
7309
7309
  childField: A,
7310
- rootTree: S = !1,
7311
- context: C,
7310
+ rootTree: C = !1,
7311
+ context: S,
7312
7312
  readonly: F,
7313
7313
  onSelectAllRecords: w
7314
7314
  } = e, T = Y(null), [_, O] = I([]), x = Y(!1), [R, E] = I(), { t: V } = me(), N = Y(r), L = ne(
7315
7315
  Ct
7316
- ), { title: B = void 0, setTitle: W = void 0 } = (S ? L : {}) || {}, k = q(() => {
7316
+ ), { title: B = void 0, setTitle: W = void 0 } = (C ? L : {}) || {}, k = q(() => {
7317
7317
  if (R)
7318
7318
  return Or(
7319
7319
  R,
7320
7320
  {
7321
7321
  ...Pr
7322
7322
  },
7323
- C,
7323
+ S,
7324
7324
  "legacy"
7325
7325
  );
7326
- }, [C, R]);
7326
+ }, [S, R]);
7327
7327
  Dt(t, () => ({
7328
7328
  unselectAll: () => {
7329
7329
  var z;
@@ -7456,12 +7456,12 @@ const Ga = (e) => {
7456
7456
  resultsActionView: v,
7457
7457
  domain: b,
7458
7458
  currentId: A,
7459
- limit: S,
7460
- setLimit: C,
7459
+ limit: C,
7460
+ setLimit: S,
7461
7461
  searchParams: F = [],
7462
7462
  setSearchValues: w,
7463
7463
  clearSelection: T
7464
- } = e, [_, O] = I(!1), [x, R] = I(!1), [E, V] = I(), [N, L] = I(1), [B, W] = I(0), [k, K] = I(), [Z, Q] = I([]), [J, we] = I(void 0), [oe, H] = I(void 0), M = Y(S || $t), z = Y([]), ie = D(
7464
+ } = e, [_, O] = I(!1), [x, R] = I(!1), [E, V] = I(), [N, L] = I(1), [B, W] = I(0), [k, K] = I(), [Z, Q] = I([]), [J, we] = I(void 0), [oe, H] = I(void 0), M = Y(C || $t), z = Y([]), ie = D(
7465
7465
  (re) => {
7466
7466
  y == null || y([...re]), Q([...re]);
7467
7467
  },
@@ -7594,7 +7594,7 @@ const Ga = (e) => {
7594
7594
  ), ye = D(
7595
7595
  (re) => {
7596
7596
  const { params: Ae, searchValues: xe, limit: Ve, offset: je } = re;
7597
- _ || (n == null || n(void 0), r == null || r([]), w == null || w(xe), o == null || o(Ae), a == null || a(!1), R(!0), V(void 0), L(1), Ve && (M.current = Ve, C == null || C(Ve)), je && W(je), ce({
7597
+ _ || (n == null || n(void 0), r == null || r([]), w == null || w(xe), o == null || o(Ae), a == null || a(!1), R(!0), V(void 0), L(1), Ve && (M.current = Ve, S == null || S(Ve)), je && W(je), ce({
7598
7598
  params: Ae,
7599
7599
  newOffset: je
7600
7600
  }));
@@ -7607,22 +7607,22 @@ const Ga = (e) => {
7607
7607
  o,
7608
7608
  a,
7609
7609
  ce,
7610
- C
7610
+ S
7611
7611
  ]
7612
7612
  ), _e = D(
7613
7613
  (re) => {
7614
- O(!0), L(re), W((re - 1) * S);
7614
+ O(!0), L(re), W((re - 1) * C);
7615
7615
  },
7616
- [O, S, W, L]
7616
+ [O, C, W, L]
7617
7617
  ), Ue = D(() => {
7618
- _ || (n == null || n(void 0), o == null || o([]), w == null || w({}), V(void 0), W(0), L(1), C == null || C(S || $t));
7618
+ _ || (n == null || n(void 0), o == null || o([]), w == null || w({}), V(void 0), W(0), L(1), S == null || S(C || $t));
7619
7619
  }, [
7620
7620
  _,
7621
7621
  n,
7622
7622
  o,
7623
7623
  w,
7624
- C,
7625
- S
7624
+ S,
7625
+ C
7626
7626
  ]), Ke = D(
7627
7627
  async (re) => {
7628
7628
  const Ae = re[(d == null ? void 0 : d.field_parent) || "child_id"], xe = await $.getHandler().readObjects({
@@ -7674,7 +7674,7 @@ function fh(e, t) {
7674
7674
  rootTree: m = !1,
7675
7675
  parentContext: d = {},
7676
7676
  onChangeSelectedRowKeys: f
7677
- } = e, [h, p] = I(!1), [g, y] = I(!1), v = Y(!1), b = Y(null), [A, S] = I(), [C, F] = I(), [w, T] = I(), [_, O] = I(), [x, R] = I(200), E = Y(), { height: V } = Ar(), N = ne(
7677
+ } = e, [h, p] = I(!1), [g, y] = I(!1), v = Y(!1), b = Y(null), [A, C] = I(), [S, F] = I(), [w, T] = I(), [_, O] = I(), [x, R] = I(200), E = Y(), { height: V } = Ar(), N = ne(
7678
7678
  Fn
7679
7679
  ), { processAction: L } = N || {}, B = ne(
7680
7680
  Ct
@@ -7734,7 +7734,7 @@ function fh(e, t) {
7734
7734
  searchNameGetDoneRef: v,
7735
7735
  context: d,
7736
7736
  formView: w,
7737
- treeView: C,
7737
+ treeView: S,
7738
7738
  sorter: z,
7739
7739
  setSorter: ie,
7740
7740
  setCurrentItemIndex: k,
@@ -7751,11 +7751,11 @@ function fh(e, t) {
7751
7751
  refreshResults: () => {
7752
7752
  v.current = !1, re();
7753
7753
  },
7754
- getFields: () => C == null ? void 0 : C.fields,
7754
+ getFields: () => S == null ? void 0 : S.fields,
7755
7755
  getDomain: () => c
7756
7756
  })), ae(() => {
7757
- g && u && C && (v.current = !1, re());
7758
- }, [je, se, g, u, s, C]);
7757
+ g && u && S && (v.current = !1, re());
7758
+ }, [je, se, g, u, s, S]);
7759
7759
  const it = async () => {
7760
7760
  y(!1), p(!0), O(void 0), le == null || le(!0);
7761
7761
  try {
@@ -7766,7 +7766,7 @@ function fh(e, t) {
7766
7766
  p(!1);
7767
7767
  }
7768
7768
  }, It = async () => {
7769
- S(n);
7769
+ C(n);
7770
7770
  let Fe = r;
7771
7771
  r || (Fe = await $.getHandler().getView({
7772
7772
  model: n,
@@ -7792,14 +7792,14 @@ function fh(e, t) {
7792
7792
  async (Fe) => {
7793
7793
  const { id: ht } = Fe;
7794
7794
  E.current || (E.current = await $.getHandler().treeButOpen({
7795
- id: C.view_id,
7795
+ id: S.view_id,
7796
7796
  model: A,
7797
7797
  context: d
7798
7798
  }));
7799
7799
  const Ce = E.current[0][2];
7800
7800
  await (L == null ? void 0 : L({
7801
7801
  actionData: Ce,
7802
- fields: C.fields,
7802
+ fields: S.fields,
7803
7803
  values: {
7804
7804
  active_id: ht,
7805
7805
  ...Fe
@@ -7807,11 +7807,11 @@ function fh(e, t) {
7807
7807
  context: d
7808
7808
  }));
7809
7809
  },
7810
- [A, d, L, C]
7810
+ [A, d, L, S]
7811
7811
  ), Me = D(
7812
7812
  async (Fe) => {
7813
7813
  const { id: ht } = Fe;
7814
- if (C != null && C.isExpandable) {
7814
+ if (S != null && S.isExpandable) {
7815
7815
  try {
7816
7816
  await ue(Fe);
7817
7817
  } catch (Ce) {
@@ -7823,24 +7823,24 @@ function fh(e, t) {
7823
7823
  id: ht,
7824
7824
  model: A,
7825
7825
  formView: w,
7826
- treeView: C
7826
+ treeView: S
7827
7827
  });
7828
7828
  },
7829
- [A, w, a, ue, C]
7829
+ [A, w, a, ue, S]
7830
7830
  ), Te = D(async () => {
7831
7831
  const Fe = await nt();
7832
7832
  J == null || J(Fe.map((ht) => ({ id: ht }))), f == null || f(Fe);
7833
- }, [nt, f, J]), $e = q(() => C != null && C.isExpandable ? V - 160 : V - (x + 240), [V, x, C == null ? void 0 : C.isExpandable]), Ne = q(
7833
+ }, [nt, f, J]), $e = q(() => S != null && S.isExpandable ? V - 160 : V - (x + 240), [V, x, S == null ? void 0 : S.isExpandable]), Ne = q(
7834
7834
  () => Q == null ? void 0 : Q.map((Fe) => Fe.id),
7835
7835
  [Q]
7836
- ), pt = D(() => !C || !w ? null : /* @__PURE__ */ P(ee, { children: [
7836
+ ), pt = D(() => !S || !w ? null : /* @__PURE__ */ P(ee, { children: [
7837
7837
  /* @__PURE__ */ i(
7838
7838
  kr,
7839
7839
  {
7840
- fields: { ...w.fields, ...C.fields },
7840
+ fields: { ...w.fields, ...S.fields },
7841
7841
  searchFields: bn([
7842
7842
  w.search_fields,
7843
- C.search_fields
7843
+ S.search_fields
7844
7844
  ]),
7845
7845
  onClear: Ie,
7846
7846
  limit: ye,
@@ -7862,7 +7862,7 @@ function fh(e, t) {
7862
7862
  total: be,
7863
7863
  limit: pe,
7864
7864
  page: je,
7865
- treeView: C,
7865
+ treeView: S,
7866
7866
  results: ke(),
7867
7867
  onRequestPageChange: Ee,
7868
7868
  loading: Ae,
@@ -7874,8 +7874,8 @@ function fh(e, t) {
7874
7874
  onRowSelectionChange: Ue,
7875
7875
  sorter: z,
7876
7876
  onChangeSort: Re,
7877
- onFetchChildrenForRecord: C.isExpandable ? ve : void 0,
7878
- childField: C.field_parent,
7877
+ onFetchChildrenForRecord: S.isExpandable ? ve : void 0,
7878
+ childField: S.field_parent,
7879
7879
  rootTree: m,
7880
7880
  onSelectAllRecords: Te
7881
7881
  }
@@ -7910,7 +7910,7 @@ function fh(e, t) {
7910
7910
  Ae,
7911
7911
  be,
7912
7912
  l,
7913
- C
7913
+ S
7914
7914
  ]), xt = _ || Ve;
7915
7915
  return xt ? /* @__PURE__ */ i(yt, { className: "mt-10", message: xt, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children: h ? /* @__PURE__ */ i(Qe, {}) : pt() });
7916
7916
  }
@@ -7936,8 +7936,8 @@ const Ka = _t(fh), mh = 80, ph = (e) => {
7936
7936
  treeFirstVisibleRow: v,
7937
7937
  treeFirstVisibleColumn: b,
7938
7938
  setTreeFirstVisibleColumn: A,
7939
- selectedRowItems: S,
7940
- setSearchParams: C,
7939
+ selectedRowItems: C,
7940
+ setSearchParams: S,
7941
7941
  searchValues: F,
7942
7942
  searchParams: w,
7943
7943
  setSearchValues: T,
@@ -7970,7 +7970,7 @@ const Ka = _t(fh), mh = 80, ph = (e) => {
7970
7970
  ), ke = q(
7971
7971
  () => Kt(w || [], c),
7972
7972
  [c, w]
7973
- ), Ee = q(() => (S == null ? void 0 : S.map((Ce) => Ce.id)) || [], [S]), Re = D(() => {
7973
+ ), Ee = q(() => (C == null ? void 0 : C.map((Ce) => Ce.id)) || [], [C]), Re = D(() => {
7974
7974
  const He = `${JSON.stringify(M ? c : ke)}-${M}`;
7975
7975
  return He !== j.current ? (j.current = He, !0) : !1;
7976
7976
  }, [c, ke, M]), ve = D(async () => {
@@ -8008,23 +8008,23 @@ const Ka = _t(fh), mh = 80, ph = (e) => {
8008
8008
  []
8009
8009
  ), it = D(() => {
8010
8010
  var Ce;
8011
- g([]), (Ce = l.current) == null || Ce.unselectAll(), O == null || O(void 0), C == null || C([]), T == null || T(void 0);
8011
+ g([]), (Ce = l.current) == null || Ce.unselectAll(), O == null || O(void 0), S == null || S([]), T == null || T(void 0);
8012
8012
  }, [
8013
8013
  g,
8014
8014
  l,
8015
8015
  O,
8016
- C,
8016
+ S,
8017
8017
  T
8018
8018
  ]), It = D(
8019
8019
  ({ params: Ce, searchValues: He }) => {
8020
8020
  var et;
8021
- g([]), (et = l.current) == null || et.unselectAll(), O == null || O(void 0), C == null || C(Ce), T == null || T(He);
8021
+ g([]), (et = l.current) == null || et.unselectAll(), O == null || O(void 0), S == null || S(Ce), T == null || T(He);
8022
8022
  },
8023
8023
  [
8024
8024
  g,
8025
8025
  l,
8026
8026
  O,
8027
- C,
8027
+ S,
8028
8028
  T
8029
8029
  ]
8030
8030
  ), te = D(
@@ -8033,13 +8033,13 @@ const Ka = _t(fh), mh = 80, ph = (e) => {
8033
8033
  ), ue = D(
8034
8034
  ({ params: Ce, values: He }) => {
8035
8035
  var et;
8036
- g([]), (et = l.current) == null || et.unselectAll(), O == null || O(void 0), C == null || C(Ce), T == null || T(He), p == null || p(!1);
8036
+ g([]), (et = l.current) == null || et.unselectAll(), O == null || O(void 0), S == null || S(Ce), T == null || T(He), p == null || p(!1);
8037
8037
  },
8038
8038
  [
8039
8039
  g,
8040
8040
  l,
8041
8041
  O,
8042
- C,
8042
+ S,
8043
8043
  T,
8044
8044
  p
8045
8045
  ]
@@ -8062,7 +8062,7 @@ const Ka = _t(fh), mh = 80, ph = (e) => {
8062
8062
  B
8063
8063
  ]), ae(() => {
8064
8064
  var Ce;
8065
- (M !== void 0 && z.current === void 0 || typeof M == "string" && typeof z.current == "string" && M !== z.current) && (C == null || C([]), T == null || T({}), (Ce = l.current) == null || Ce.unselectAll(), Te()), z.current = M;
8065
+ (M !== void 0 && z.current === void 0 || typeof M == "string" && typeof z.current == "string" && M !== z.current) && (S == null || S([]), T == null || T({}), (Ce = l.current) == null || Ce.unselectAll(), Te()), z.current = M;
8066
8066
  }, [M]), Gt(() => {
8067
8067
  const Ce = !Ko(
8068
8068
  w,
@@ -8326,8 +8326,8 @@ const Ka = _t(fh), mh = 80, ph = (e) => {
8326
8326
  onRowStyle: v,
8327
8327
  headerCheckboxState: b,
8328
8328
  onHeaderCheckboxClick: A,
8329
- refresh: S,
8330
- actionViewSortState: C,
8329
+ refresh: C,
8330
+ actionViewSortState: S,
8331
8331
  onSortChange: F,
8332
8332
  tableRef: w
8333
8333
  }) => !e || !t ? null : /* @__PURE__ */ i(
@@ -8354,8 +8354,8 @@ const Ka = _t(fh), mh = 80, ph = (e) => {
8354
8354
  onRowStyle: v,
8355
8355
  headerCheckboxState: b,
8356
8356
  onHeaderCheckboxClick: A,
8357
- onForceReload: S,
8358
- initialSortState: C,
8357
+ onForceReload: C,
8358
+ initialSortState: S,
8359
8359
  onSortChange: F
8360
8360
  }
8361
8361
  )
@@ -8389,10 +8389,10 @@ function vh(e, t) {
8389
8389
  formViewProps: r,
8390
8390
  treeViewProps: o,
8391
8391
  context: u
8392
- }), S = q(() => {
8392
+ }), C = q(() => {
8393
8393
  if (v)
8394
8394
  return jt(v);
8395
- }, [v]), { columns: C, strings: F } = hh(S, u), w = q(() => C || [], [C]), {
8395
+ }, [v]), { columns: S, strings: F } = hh(C, u), w = q(() => S || [], [S]), {
8396
8396
  isActive: T,
8397
8397
  searchVisible: _,
8398
8398
  searchValues: O,
@@ -8426,7 +8426,7 @@ function vh(e, t) {
8426
8426
  onSortChange: Ke
8427
8427
  } = ph({
8428
8428
  treeViewFetching: A,
8429
- treeOoui: S,
8429
+ treeOoui: C,
8430
8430
  treeView: v,
8431
8431
  model: n,
8432
8432
  rootTree: c,
@@ -8436,7 +8436,7 @@ function vh(e, t) {
8436
8436
  filterType: d,
8437
8437
  context: u
8438
8438
  }), [Ie, re, Ae] = jo({
8439
- ooui: S,
8439
+ ooui: C,
8440
8440
  model: n,
8441
8441
  showEmptyValues: !0,
8442
8442
  domain: (x == null ? void 0 : x.length) > 0 ? (
@@ -8447,7 +8447,7 @@ function vh(e, t) {
8447
8447
  Ua({
8448
8448
  model: n,
8449
8449
  tableRef: f,
8450
- autorefreshableFields: S == null ? void 0 : S.autorefreshableFields,
8450
+ autorefreshableFields: C == null ? void 0 : C.autorefreshableFields,
8451
8451
  fieldDefs: v != null && v.field_parent ? { ...v == null ? void 0 : v.fields, [v == null ? void 0 : v.field_parent]: {} } : v == null ? void 0 : v.fields,
8452
8452
  context: u,
8453
8453
  isActive: T
@@ -8499,7 +8499,7 @@ function vh(e, t) {
8499
8499
  qa,
8500
8500
  {
8501
8501
  columns: w,
8502
- treeOoui: S,
8502
+ treeOoui: C,
8503
8503
  strings: F,
8504
8504
  isLoading: H || X,
8505
8505
  availableHeight: y,
@@ -8544,15 +8544,15 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
8544
8544
  } = e, p = Y(t), g = q(() => {
8545
8545
  if (!(s != null && s.arch) || s.isExpandable)
8546
8546
  return "legacy";
8547
- const C = Us(s.arch, "infinite");
8548
- return C ? C === "1" ? "infinite" : "paginated" : "legacy";
8547
+ const S = Us(s.arch, "infinite");
8548
+ return S ? S === "1" ? "infinite" : S === "0" ? "paginated" : "legacy" : "legacy";
8549
8549
  }, [s]), { currentView: y, setPreviousView: v, setTreeType: b, setSelectedRowItems: A } = ne(Ct);
8550
8550
  ae(() => {
8551
8551
  b == null || b(g);
8552
8552
  }, [g]);
8553
- const S = D(
8554
- (C) => {
8555
- const { id: F } = C;
8553
+ const C = D(
8554
+ (S) => {
8555
+ const { id: F } = S;
8556
8556
  m(F);
8557
8557
  const w = u.findIndex((_) => _.id === F);
8558
8558
  v == null || v(y), c(w);
@@ -8592,7 +8592,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
8592
8592
  formView: a,
8593
8593
  treeView: s,
8594
8594
  domain: l,
8595
- onRowClicked: S
8595
+ onRowClicked: C
8596
8596
  }
8597
8597
  ),
8598
8598
  g === "paginated" && /* @__PURE__ */ i(
@@ -8606,7 +8606,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
8606
8606
  formView: a,
8607
8607
  treeView: s,
8608
8608
  domain: l,
8609
- onRowClicked: S
8609
+ onRowClicked: C
8610
8610
  }
8611
8611
  ),
8612
8612
  g === "legacy" && /* @__PURE__ */ i(
@@ -8620,7 +8620,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
8620
8620
  formView: a,
8621
8621
  treeView: s,
8622
8622
  domain: l,
8623
- onRowClicked: S
8623
+ onRowClicked: C
8624
8624
  }
8625
8625
  )
8626
8626
  ] }) : null;
@@ -8647,8 +8647,8 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
8647
8647
  setSorter: v,
8648
8648
  totalItems: b,
8649
8649
  setTotalItems: A,
8650
- setSelectedRowItems: S,
8651
- selectedRowItems: C,
8650
+ setSelectedRowItems: C,
8651
+ selectedRowItems: S,
8652
8652
  searchTreeNameSearch: F,
8653
8653
  setSearchTreeNameSearch: w,
8654
8654
  goToResourceId: T,
@@ -8723,8 +8723,8 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
8723
8723
  setTreeIsLoading: J,
8724
8724
  attachments: we,
8725
8725
  setAttachments: oe,
8726
- selectedRowItems: C,
8727
- setSelectedRowItems: S,
8726
+ selectedRowItems: S,
8727
+ setSelectedRowItems: C,
8728
8728
  duplicatingItem: H,
8729
8729
  setDuplicatingItem: M,
8730
8730
  setSearchParams: ie,
@@ -9166,7 +9166,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
9166
9166
  t && u();
9167
9167
  }, [t, o]), c && c.message !== "active_id_not_found")
9168
9168
  return /* @__PURE__ */ i(Ks, { error: c });
9169
- const { id: h, model: p, limit: g, domain: y, context: v, initialView: b, description: A } = a || {}, S = m ? za : _n, C = A ? /* @__PURE__ */ P(ee, { children: [
9169
+ const { id: h, model: p, limit: g, domain: y, context: v, initialView: b, description: A } = a || {}, C = m ? za : _n, S = A ? /* @__PURE__ */ P(ee, { children: [
9170
9170
  /* @__PURE__ */ i(Et, { title: A, children: /* @__PURE__ */ i(Tn, { className: "pr-1 text-xs" }) }),
9171
9171
  /* @__PURE__ */ i("span", { children: (a == null ? void 0 : a.title) || "" })
9172
9172
  ] }) : /* @__PURE__ */ i("span", { children: (a == null ? void 0 : a.title) || "" });
@@ -9175,7 +9175,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
9175
9175
  {
9176
9176
  id: h,
9177
9177
  parms: {},
9178
- title: C,
9178
+ title: S,
9179
9179
  action: s,
9180
9180
  openAction: f,
9181
9181
  tooltip: A,
@@ -9183,7 +9183,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
9183
9183
  children: [
9184
9184
  l && /* @__PURE__ */ i(Kn, {}),
9185
9185
  !l && /* @__PURE__ */ i(ee, { children: o ? (b == null ? void 0 : b.id) && /* @__PURE__ */ i(
9186
- S,
9186
+ C,
9187
9187
  {
9188
9188
  view_id: b.id,
9189
9189
  model: p,
@@ -9253,7 +9253,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
9253
9253
  d(!1);
9254
9254
  }
9255
9255
  }
9256
- const S = (F) => {
9256
+ const C = (F) => {
9257
9257
  const w = o.map((_) => F.includes(_.id) ? _.operation === "pendingRemove" ? {
9258
9258
  ..._,
9259
9259
  operation: "pendingLink"
@@ -9261,7 +9261,7 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
9261
9261
  F.filter((_) => !T.includes(_)).forEach((_) => {
9262
9262
  w.push({ id: _, operation: "pendingLink" });
9263
9263
  }), b(w);
9264
- }, C = (F) => {
9264
+ }, S = (F) => {
9265
9265
  const { label: w, closable: T, onClose: _ } = F, O = (E) => {
9266
9266
  E.preventDefault(), E.stopPropagation();
9267
9267
  }, x = Gn(w), R = Ys(x);
@@ -9282,11 +9282,11 @@ const bh = _t(vh), pr = "legacy", wh = (e) => {
9282
9282
  {
9283
9283
  mode: "multiple",
9284
9284
  value: s.length ? a : [],
9285
- tagRender: C,
9285
+ tagRender: S,
9286
9286
  bordered: !p,
9287
9287
  disabled: p,
9288
9288
  options: s,
9289
- onChange: S,
9289
+ onChange: C,
9290
9290
  loading: m,
9291
9291
  filterOption: (F, w) => w.label.toLowerCase().includes(F.toString())
9292
9292
  }
@@ -9577,8 +9577,8 @@ function Jh(e, t) {
9577
9577
  parentContext: v = {},
9578
9578
  actionDomain: b,
9579
9579
  visible: A = !0,
9580
- rootForm: S = !1,
9581
- defaultValues: C,
9580
+ rootForm: C = !1,
9581
+ defaultValues: S,
9582
9582
  forcedValues: F = {},
9583
9583
  parentWidth: w,
9584
9584
  onMustRefreshParent: T
@@ -9593,7 +9593,7 @@ function Jh(e, t) {
9593
9593
  title: je = void 0,
9594
9594
  setTitle: pe = void 0,
9595
9595
  isActive: se = void 0
9596
- } = (S ? Ke : {}) || {}, ke = ne(
9596
+ } = (C ? Ke : {}) || {}, ke = ne(
9597
9597
  Fn
9598
9598
  ), { processAction: Ee, globalValues: Re } = ke || {};
9599
9599
  Dt(t, () => ({
@@ -9676,7 +9676,7 @@ function Jh(e, t) {
9676
9676
  model: n,
9677
9677
  fields: U,
9678
9678
  context: { ...v, ...G },
9679
- extraValues: C
9679
+ extraValues: S
9680
9680
  });
9681
9681
  }, vt = () => Object.keys(
9682
9682
  Br({
@@ -10064,7 +10064,7 @@ function Jh(e, t) {
10064
10064
  Ue.current = !0, await ot({ forceRefresh: !0 });
10065
10065
  }
10066
10066
  })) || {};
10067
- !S && fe && (ve == null || ve(be(), ue(), Te()));
10067
+ !C && fe && (ve == null || ve(be(), ue(), Te()));
10068
10068
  }
10069
10069
  function gl() {
10070
10070
  ln({ elementHasLostFocus: !0 });
@@ -10215,15 +10215,15 @@ const On = _t(Jh), Rn = (e) => {
10215
10215
  isMenuAction: s = !1,
10216
10216
  actionData: l,
10217
10217
  ...c
10218
- } = e, { model: u } = c, { modalWidth: m } = Ar(), [d, f] = I(r), [h, p] = I(!1), [g, y] = I(), { action_id: v, res_id: b, action_type: A, view_id: S } = l || {};
10218
+ } = e, { model: u } = c, { modalWidth: m } = Ar(), [d, f] = I(r), [h, p] = I(!1), [g, y] = I(), { action_id: v, res_id: b, action_type: A, view_id: C } = l || {};
10219
10219
  ae(() => {
10220
- s && C();
10220
+ s && S();
10221
10221
  }, [l, s]);
10222
- async function C() {
10222
+ async function S() {
10223
10223
  const _ = await $.getHandler().isShortcutFavorite({
10224
10224
  action_id: v,
10225
10225
  action_type: A,
10226
- view_id: S,
10226
+ view_id: C,
10227
10227
  res_id: b || !1
10228
10228
  });
10229
10229
  p(_ !== !1), _ !== !1 && y(_);
@@ -10280,7 +10280,7 @@ const On = _t(Jh), Rn = (e) => {
10280
10280
  parentWidth: T,
10281
10281
  ...c
10282
10282
  },
10283
- `${u}-${n}-${v}-${b}-${A}-${S}-${r}`
10283
+ `${u}-${n}-${v}-${b}-${A}-${C}-${r}`
10284
10284
  )
10285
10285
  }
10286
10286
  ) });
@@ -10303,7 +10303,7 @@ const On = _t(Jh), Rn = (e) => {
10303
10303
  treeViewProps: void 0,
10304
10304
  context: s,
10305
10305
  enabled: e
10306
- }), A = q(() => y != null && y.arch ? Us(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]), S = D(
10306
+ }), A = q(() => y != null && y.arch ? Us(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]), C = D(
10307
10307
  async (R) => {
10308
10308
  f(!0);
10309
10309
  try {
@@ -10315,31 +10315,31 @@ const On = _t(Jh), Rn = (e) => {
10315
10315
  }
10316
10316
  },
10317
10317
  [n]
10318
- ), C = D(() => {
10318
+ ), S = D(() => {
10319
10319
  t();
10320
10320
  }, [t]), F = D(
10321
10321
  ({ id: R }) => {
10322
- S([R]);
10322
+ C([R]);
10323
10323
  },
10324
- [S]
10324
+ [C]
10325
10325
  ), w = D(() => {
10326
10326
  if (u.length === 0) {
10327
- C();
10327
+ S();
10328
10328
  return;
10329
10329
  }
10330
- S(u);
10331
- }, [u, C, S]), T = q(
10330
+ C(u);
10331
+ }, [u, S, C]), T = q(
10332
10332
  () => A ? Wa : Ka,
10333
10333
  [A]
10334
10334
  ), _ = D(() => {
10335
10335
  c(!0);
10336
10336
  }, []), O = D(() => {
10337
- c(!1), C();
10338
- }, [C]), x = D(
10337
+ c(!1), S();
10338
+ }, [S]), x = D(
10339
10339
  (R) => {
10340
- c(!1), C(), R && S([R]);
10340
+ c(!1), S(), R && C([R]);
10341
10341
  },
10342
- [C, S]
10342
+ [S, C]
10343
10343
  );
10344
10344
  return /* @__PURE__ */ P(ee, { children: [
10345
10345
  /* @__PURE__ */ P(
@@ -10350,7 +10350,7 @@ const On = _t(Jh), Rn = (e) => {
10350
10350
  width: h,
10351
10351
  open: e && !l,
10352
10352
  closable: !0,
10353
- onCancel: C,
10353
+ onCancel: S,
10354
10354
  footer: null,
10355
10355
  destroyOnClose: !0,
10356
10356
  maskClosable: !1,
@@ -10391,7 +10391,7 @@ const On = _t(Jh), Rn = (e) => {
10391
10391
  children: g("ok")
10392
10392
  }
10393
10393
  ),
10394
- /* @__PURE__ */ i(We, { icon: /* @__PURE__ */ i(xn, {}), onClick: C, children: g("cancel") })
10394
+ /* @__PURE__ */ i(We, { icon: /* @__PURE__ */ i(xn, {}), onClick: S, children: g("cancel") })
10395
10395
  ] }) })
10396
10396
  ]
10397
10397
  }
@@ -10425,18 +10425,18 @@ const On = _t(Jh), Rn = (e) => {
10425
10425
  context: l,
10426
10426
  id: c,
10427
10427
  domain: u
10428
- } = r, m = o && !s ? { backgroundColor: Xa.colorPrimaryBg } : void 0, [d, f] = I(!1), [h, p] = I(!1), [g, y] = I(!1), [v, b] = I(), A = Y(!1), [S, C] = I(""), F = Y(), w = ne(Ge), { domain: T, getValues: _, getFields: O, getContext: x, elementHasLostFocus: R } = w || {}, E = Y([]), [V, N] = I([]), L = t && t[0] || void 0, B = t && t[1] || "";
10428
+ } = r, m = o && !s ? { backgroundColor: Xa.colorPrimaryBg } : void 0, [d, f] = I(!1), [h, p] = I(!1), [g, y] = I(!1), [v, b] = I(), A = Y(!1), [C, S] = I(""), F = Y(), w = ne(Ge), { domain: T, getValues: _, getFields: O, getContext: x, elementHasLostFocus: R } = w || {}, E = Y([]), [V, N] = I([]), L = t && t[0] || void 0, B = t && t[1] || "";
10429
10429
  ae(() => {
10430
10430
  !Array.isArray(t) && t && Q(t);
10431
10431
  }, [t]), ae(() => {
10432
- L && B.length === 0 ? Q(L) : L && B.length > 0 ? C(B) : !L && !B && C(F.current || "");
10432
+ L && B.length === 0 ? Q(L) : L && B.length > 0 ? S(B) : !L && !B && S(F.current || "");
10433
10433
  }, [t]);
10434
10434
  const W = (H) => {
10435
10435
  n == null || n(H), R == null || R();
10436
10436
  }, k = (H) => {
10437
10437
  F.current = H.target.value, W([void 0, ""]);
10438
10438
  }, K = async () => {
10439
- if (!g && S !== B) {
10439
+ if (!g && C !== B) {
10440
10440
  if (await new Promise((H) => setTimeout(H, 100)), A.current) {
10441
10441
  W([void 0, ""]);
10442
10442
  return;
@@ -10511,7 +10511,7 @@ const On = _t(Jh), Rn = (e) => {
10511
10511
  o && !s ? eg : ft,
10512
10512
  {
10513
10513
  type: "text",
10514
- value: S,
10514
+ value: C,
10515
10515
  disabled: s,
10516
10516
  onChange: k,
10517
10517
  style: {
@@ -10535,7 +10535,7 @@ const On = _t(Jh), Rn = (e) => {
10535
10535
  We,
10536
10536
  {
10537
10537
  icon: /* @__PURE__ */ i(Co, {}),
10538
- disabled: L === void 0 || B === "" || S === void 0,
10538
+ disabled: L === void 0 || B === "" || C === void 0,
10539
10539
  onClick: () => {
10540
10540
  p(!0);
10541
10541
  },
@@ -10833,20 +10833,20 @@ function ig(e) {
10833
10833
  toolbar: v,
10834
10834
  context: b,
10835
10835
  formRef: A,
10836
- onRefreshParentValues: S,
10837
- currentId: C
10836
+ onRefreshParentValues: C,
10837
+ currentId: S
10838
10838
  } = e, { token: F } = og(), { t: w } = me(), { duplicatingItem: T, duplicate: _ } = rg({
10839
- currentId: s === "form" ? C : parseInt(p[0]),
10839
+ currentId: s === "form" ? S : parseInt(p[0]),
10840
10840
  currentModel: o,
10841
10841
  onItemDuplicated: () => {
10842
- S == null || S();
10842
+ C == null || C();
10843
10843
  },
10844
10844
  context: s === "tree" ? b : (N = A == null ? void 0 : A.current) == null ? void 0 : N.getContext()
10845
10845
  }), { actionButtonProps: O, printButtonProps: x, relateButtonProps: R } = rl({
10846
10846
  toolbar: v,
10847
10847
  mustDisableButtons: n,
10848
10848
  formRef: A,
10849
- onRefreshParentValues: S
10849
+ onRefreshParentValues: C
10850
10850
  }), {
10851
10851
  actionButtonProps: E,
10852
10852
  printButtonProps: V
@@ -10855,7 +10855,7 @@ function ig(e) {
10855
10855
  disabled: n,
10856
10856
  parentContext: b,
10857
10857
  selectedRowItems: p.map((k) => ({ id: k })),
10858
- onRefreshParentValues: S
10858
+ onRefreshParentValues: C
10859
10859
  });
10860
10860
  return /* @__PURE__ */ P("div", { className: "flex mb-2 pt-3", children: [
10861
10861
  /* @__PURE__ */ i(ol, { title: t, token: F }),
@@ -10900,10 +10900,10 @@ function ig(e) {
10900
10900
  {
10901
10901
  icon: /* @__PURE__ */ i(Tn, {}),
10902
10902
  tooltip: w("showLogs"),
10903
- disabled: !(s === "form" && C !== void 0 && C > 0 || s === "tree" && p.length === 1 && (p == null ? void 0 : p[0]) !== void 0 && parseInt(p[0]) > 0),
10903
+ disabled: !(s === "form" && S !== void 0 && S > 0 || s === "tree" && p.length === 1 && (p == null ? void 0 : p[0]) !== void 0 && parseInt(p[0]) > 0),
10904
10904
  onClick: () => Po(
10905
10905
  o,
10906
- s === "form" ? C : parseInt(p[0]),
10906
+ s === "form" ? S : parseInt(p[0]),
10907
10907
  w
10908
10908
  )
10909
10909
  }
@@ -10916,7 +10916,7 @@ function ig(e) {
10916
10916
  {
10917
10917
  icon: /* @__PURE__ */ i(Un, {}),
10918
10918
  tooltip: w("duplicate"),
10919
- disabled: n || T || s === "tree" && p.length !== 1 || s === "form" && (C === void 0 || C < 0),
10919
+ disabled: n || T || s === "tree" && p.length !== 1 || s === "form" && (S === void 0 || S < 0),
10920
10920
  loading: T,
10921
10921
  onClick: () => Bt({
10922
10922
  confirmMessage: w("confirmDuplicate"),
@@ -11095,7 +11095,7 @@ const lg = (e) => {
11095
11095
  getContext: p,
11096
11096
  domain: g,
11097
11097
  fetchValues: y
11098
- } = m || {}, { t: v } = me(), [b, A] = I(!1), [S, C] = I(!1), [F, w] = I(), [T, _] = I(!1), [O, x] = I(!1), [R, E] = I(), [V, N] = I([]), [L, B] = I(!1), W = Y([]), [k, K] = I(), Z = Y(), [Q, J] = I(void 0), we = Y(), {
11098
+ } = m || {}, { t: v } = me(), [b, A] = I(!1), [C, S] = I(!1), [F, w] = I(), [T, _] = I(!1), [O, x] = I(!1), [R, E] = I(), [V, N] = I([]), [L, B] = I(!1), W = Y([]), [k, K] = I(), Z = Y(), [Q, J] = I(void 0), we = Y(), {
11099
11099
  readOnly: oe,
11100
11100
  relation: H,
11101
11101
  context: M,
@@ -11126,7 +11126,7 @@ const lg = (e) => {
11126
11126
  await _e(), c > j.length - 1 && c !== 0 && u(0);
11127
11127
  }, _e = async (te) => {
11128
11128
  var ue, Me, Te;
11129
- C(!0), A(!1), w(void 0);
11129
+ S(!0), A(!1), w(void 0);
11130
11130
  try {
11131
11131
  const [$e, Ne] = await Do({
11132
11132
  treeView: {
@@ -11145,7 +11145,7 @@ const lg = (e) => {
11145
11145
  } catch ($e) {
11146
11146
  w($e);
11147
11147
  } finally {
11148
- C(!1);
11148
+ S(!1);
11149
11149
  }
11150
11150
  };
11151
11151
  async function Ue() {
@@ -11230,7 +11230,7 @@ const lg = (e) => {
11230
11230
  x(!0);
11231
11231
  }) : x(!0);
11232
11232
  }, se = async () => {
11233
- C(!0), A(!1), w(void 0);
11233
+ S(!0), A(!1), w(void 0);
11234
11234
  try {
11235
11235
  if (j[c].id > 0) {
11236
11236
  const te = a.map((ue) => ue.id === j[c].id ? {
@@ -11245,10 +11245,10 @@ const lg = (e) => {
11245
11245
  } catch (te) {
11246
11246
  w(te);
11247
11247
  }
11248
- u(0), C(!1);
11248
+ u(0), S(!1);
11249
11249
  }, ke = async () => {
11250
11250
  const te = j.filter((ue) => V.includes(ue.id));
11251
- C(!0), A(!1), w(void 0);
11251
+ S(!0), A(!1), w(void 0);
11252
11252
  try {
11253
11253
  const ue = te.map((Te) => Te.id), Me = a.filter((Te) => !(ue.includes(Te.id) && Te.id < 0)).map((Te) => ue.includes(Te.id) ? {
11254
11254
  ...Te,
@@ -11258,7 +11258,7 @@ const lg = (e) => {
11258
11258
  } catch (ue) {
11259
11259
  w(ue);
11260
11260
  }
11261
- u(0), C(!1);
11261
+ u(0), S(!1);
11262
11262
  }, Ee = (te, ue, Me, Te = !1) => {
11263
11263
  let $e;
11264
11264
  if (Te)
@@ -11291,7 +11291,7 @@ const lg = (e) => {
11291
11291
  const Te = a.find(($e) => $e.id === ue);
11292
11292
  (Te == null ? void 0 : Te.values) === void 0 && (Me = await _e("form")), E(Me.find(($e) => $e.id === ue)), B(!1), _(!0);
11293
11293
  }, ve = async (te) => {
11294
- C(!0);
11294
+ S(!0);
11295
11295
  const ue = a, Me = te.filter((Te) => !a.find(($e) => $e.id === Te));
11296
11296
  try {
11297
11297
  for (const Te of Me) {
@@ -11317,7 +11317,7 @@ const lg = (e) => {
11317
11317
  } catch (Te) {
11318
11318
  w(Te);
11319
11319
  } finally {
11320
- C(!1);
11320
+ S(!1);
11321
11321
  }
11322
11322
  };
11323
11323
  function Se() {
@@ -11371,7 +11371,7 @@ const lg = (e) => {
11371
11371
  limit: j.length,
11372
11372
  treeView: o.get("tree"),
11373
11373
  results: te,
11374
- loading: S,
11374
+ loading: C,
11375
11375
  onRowClicked: (($e = o.get("form")) == null ? void 0 : $e.fields) !== void 0 ? Re : void 0,
11376
11376
  showPagination: !1,
11377
11377
  selectedRowKeys: V,
@@ -11402,7 +11402,7 @@ const lg = (e) => {
11402
11402
  if (F)
11403
11403
  return /* @__PURE__ */ i(yt, { className: "mt-10", message: F, type: "error", banner: !0 });
11404
11404
  const be = L;
11405
- return S ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ P(ee, { children: [
11405
+ return C ? /* @__PURE__ */ i(Qe, {}) : /* @__PURE__ */ P(ee, { children: [
11406
11406
  /* @__PURE__ */ i(
11407
11407
  ll,
11408
11408
  {
@@ -11529,21 +11529,21 @@ const lg = (e) => {
11529
11529
  });
11530
11530
  if (b.length === 0 && A.length === 0)
11531
11531
  return { results: [], colors: {}, status: {} };
11532
- const S = v ? (await Ud(b, t, n, v)).slice(
11532
+ const C = v ? (await Ud(b, t, n, v)).slice(
11533
11533
  p,
11534
11534
  g
11535
- ) : b, C = Wd(d), {
11535
+ ) : b, S = Wd(d), {
11536
11536
  items: F,
11537
11537
  colors: w,
11538
11538
  status: T
11539
11539
  } = await Yd({
11540
11540
  relation: t,
11541
- ids: S,
11541
+ ids: C,
11542
11542
  treeView: e,
11543
11543
  context: n,
11544
- attrs: C,
11544
+ attrs: S,
11545
11545
  treeOoui: d
11546
- }), O = S.length < g - p && A.length > 0 ? [...S, ...A.map((R) => R.id)] : S;
11546
+ }), O = C.length < g - p && A.length > 0 ? [...C, ...A.map((R) => R.id)] : C;
11547
11547
  return { results: Hd({
11548
11548
  finalResultIds: O,
11549
11549
  fetchedItems: F,
@@ -11757,28 +11757,28 @@ const hg = ({
11757
11757
  context: m
11758
11758
  }) => {
11759
11759
  const [d, f] = I(!1), [h, p] = I(), [g, y] = I(!1), v = D(async () => {
11760
- let C;
11761
- t && n && (C = { [t]: n }), e === "form" ? r(() => {
11762
- y(!0), p({ defaultValues: C }), f(!0);
11763
- }) : (y(!0), p({ defaultValues: C }), f(!0));
11760
+ let S;
11761
+ t && n && (S = { [t]: n }), e === "form" ? r(() => {
11762
+ y(!0), p({ defaultValues: S }), f(!0);
11763
+ }) : (y(!0), p({ defaultValues: S }), f(!0));
11764
11764
  }, [n, e, t, r]), b = D(() => {
11765
11765
  f(!1), y(!1);
11766
11766
  }, []), A = Ft(
11767
- (C, F, w, T = !1) => {
11767
+ (S, F, w, T = !1) => {
11768
11768
  let _;
11769
11769
  if (T)
11770
11770
  _ = o.concat({
11771
- id: C,
11771
+ id: S,
11772
11772
  operation: "pendingLink",
11773
- values: { ...w, id: C },
11774
- treeValues: { ...w, id: C }
11773
+ values: { ...w, id: S },
11774
+ treeValues: { ...w, id: S }
11775
11775
  });
11776
- else if (C)
11777
- _ = o.map((O) => O.id === C ? {
11778
- id: C,
11779
- operation: C > 0 ? "pendingUpdate" : "pendingCreate",
11780
- values: { ...w, id: C },
11781
- treeValues: { ...w, id: C }
11776
+ else if (S)
11777
+ _ = o.map((O) => O.id === S ? {
11778
+ id: S,
11779
+ operation: S > 0 ? "pendingUpdate" : "pendingCreate",
11780
+ values: { ...w, id: S },
11781
+ treeValues: { ...w, id: S }
11782
11782
  } : O);
11783
11783
  else {
11784
11784
  const O = Ws(o);
@@ -11792,16 +11792,16 @@ const hg = ({
11792
11792
  a(_), g || f(!1);
11793
11793
  },
11794
11794
  [g, o, a]
11795
- ), S = Ft(
11796
- async (C) => {
11795
+ ), C = Ft(
11796
+ async (S) => {
11797
11797
  if (!u)
11798
11798
  return;
11799
- const { id: F } = C;
11799
+ const { id: F } = S;
11800
11800
  let w = o;
11801
11801
  const T = o.find((_) => _.id === F);
11802
11802
  (T == null ? void 0 : T.values) === void 0 && (w = await $.getHandler().readObjects({
11803
11803
  model: c,
11804
- ids: [C.id],
11804
+ ids: [S.id],
11805
11805
  fields: u.fields,
11806
11806
  context: m
11807
11807
  })), p(w.find((_) => _.id === F)), y(!1), f(!0);
@@ -11815,7 +11815,7 @@ const hg = ({
11815
11815
  createItem: v,
11816
11816
  onCancelFormModal: b,
11817
11817
  onFormModalSubmitSucceed: A,
11818
- openItemInFormModal: S
11818
+ openItemInFormModal: C
11819
11819
  };
11820
11820
  }, gg = ({
11821
11821
  currentView: e,
@@ -11894,14 +11894,14 @@ const hg = ({
11894
11894
  selectedRowKeys: g = [],
11895
11895
  showPointerCursorInRows: y = !0
11896
11896
  }) => {
11897
- const v = Y(), b = c || v, A = Y({}), S = Y(), C = Y(), F = Y(e), { t: w } = me();
11897
+ const v = Y(), b = c || v, A = Y({}), C = Y(), S = Y(), F = Y(e), { t: w } = me();
11898
11898
  Mt(() => {
11899
11899
  var N, L;
11900
- if (F.current = e, C.current === void 0) {
11901
- C.current = e;
11900
+ if (F.current = e, S.current === void 0) {
11901
+ S.current = e;
11902
11902
  return;
11903
11903
  }
11904
- C.current = e, (N = b == null ? void 0 : b.current) == null || N.refresh(), (L = b == null ? void 0 : b.current) == null || L.unselectAll();
11904
+ S.current = e, (N = b == null ? void 0 : b.current) == null || N.refresh(), (L = b == null ? void 0 : b.current) == null || L.unselectAll();
11905
11905
  }, [e]);
11906
11906
  const T = yn(() => e.length, [e]), _ = yn(() => Or(
11907
11907
  o,
@@ -11924,7 +11924,7 @@ const hg = ({
11924
11924
  endRow: L,
11925
11925
  sortFields: W
11926
11926
  });
11927
- return A.current = { ...A.current, ...K }, !S.current && Z && (S.current = {}), Z && (S.current = { ...S.current, ...Z }), k;
11927
+ return A.current = { ...A.current, ...K }, !C.current && Z && (C.current = {}), Z && (C.current = { ...C.current, ...Z }), k;
11928
11928
  },
11929
11929
  [s]
11930
11930
  ), x = D((N) => {
@@ -11961,7 +11961,7 @@ const hg = ({
11961
11961
  statusComponent: (N) => /* @__PURE__ */ i(Bn, { color: N, style: { marginLeft: 7 } }),
11962
11962
  onRowStatus: (N) => {
11963
11963
  var L;
11964
- return (L = S.current) == null ? void 0 : L[N.id];
11964
+ return (L = C.current) == null ? void 0 : L[N.id];
11965
11965
  },
11966
11966
  strings: {
11967
11967
  resetTableViewLabel: w("resetTableView")
@@ -11994,8 +11994,8 @@ const hg = ({
11994
11994
  } = o, v = ne(Ge), {
11995
11995
  activeId: b,
11996
11996
  getContext: A,
11997
- fetchValues: S
11998
- } = v || {}, C = Y(), F = a.size > 1, w = ((xe = a.get("form")) == null ? void 0 : xe.fields) !== void 0, T = q(() => ({ ...A == null ? void 0 : A(), ...p }), [A, p]), _ = cg({
11997
+ fetchValues: C
11998
+ } = v || {}, S = Y(), F = a.size > 1, w = ((xe = a.get("form")) == null ? void 0 : xe.fields) !== void 0, T = q(() => ({ ...A == null ? void 0 : A(), ...p }), [A, p]), _ = cg({
11999
11999
  widgetDomain: g,
12000
12000
  fieldName: y
12001
12001
  }), {
@@ -12136,9 +12136,9 @@ const hg = ({
12136
12136
  showToggleButton: F,
12137
12137
  toolbar: (je = a.get(c)) == null ? void 0 : je.toolbar,
12138
12138
  context: { ...A == null ? void 0 : A(), ...T },
12139
- formRef: C,
12139
+ formRef: S,
12140
12140
  onRefreshParentValues: () => {
12141
- S == null || S({ forceRefresh: !0 });
12141
+ C == null || C({ forceRefresh: !0 });
12142
12142
  }
12143
12143
  }
12144
12144
  ),
@@ -12171,7 +12171,7 @@ const hg = ({
12171
12171
  c === "form" && /* @__PURE__ */ i(
12172
12172
  cl,
12173
12173
  {
12174
- ref: C,
12174
+ ref: S,
12175
12175
  items: l,
12176
12176
  formView: a.get("form"),
12177
12177
  context: T,
@@ -12196,7 +12196,7 @@ const hg = ({
12196
12196
  readOnly: f,
12197
12197
  mustClearAfterSave: M,
12198
12198
  onMustRefreshParent: () => {
12199
- S == null || S({ forceRefresh: !0 });
12199
+ C == null || C({ forceRefresh: !0 });
12200
12200
  }
12201
12201
  }
12202
12202
  ),
@@ -12233,7 +12233,7 @@ const hg = ({
12233
12233
  let l;
12234
12234
  const [c, u] = I(!0), [m, d] = I(), [f, h] = I(/* @__PURE__ */ new Map()), p = ne(Ge), { getContext: g, formView: y } = p || {}, { view_id: v } = y || {};
12235
12235
  Mt(() => {
12236
- S();
12236
+ C();
12237
12237
  }, [t]);
12238
12238
  const b = In(
12239
12239
  Qt.FEATURE_GET_TOOLBAR
@@ -12255,7 +12255,7 @@ const hg = ({
12255
12255
  type: w,
12256
12256
  context: { ...g == null ? void 0 : g(), ...s }
12257
12257
  });
12258
- }, S = async () => {
12258
+ }, C = async () => {
12259
12259
  u(!0), d(void 0);
12260
12260
  try {
12261
12261
  if (n && n.length > 0) {
@@ -12563,7 +12563,7 @@ const { useToken: Eg } = ze, { TextArea: mo } = ft, Pg = (e) => {
12563
12563
  }
12564
12564
  let v = r;
12565
12565
  y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (v = [
12566
- ["id", "in", n == null ? void 0 : n.map((S) => S.id)]
12566
+ ["id", "in", n == null ? void 0 : n.map((C) => C.id)]
12567
12567
  ]);
12568
12568
  const { datas: b } = await $.getHandler().exportData({
12569
12569
  model: e,
@@ -12576,7 +12576,7 @@ const { useToken: Eg } = ze, { TextArea: mo } = ft, Pg = (e) => {
12576
12576
  context: t,
12577
12577
  format: y.exportType
12578
12578
  });
12579
- a(), await new Promise((S) => setTimeout(S, 200));
12579
+ a(), await new Promise((C) => setTimeout(C, 200));
12580
12580
  const A = await vn(b);
12581
12581
  _r(b, A.mime);
12582
12582
  },
@@ -12590,18 +12590,18 @@ const { useToken: Eg } = ze, { TextArea: mo } = ft, Pg = (e) => {
12590
12590
  return s.current["/"] = y, es({ fields: y });
12591
12591
  }, [e, t, s]), d = D(
12592
12592
  async (y) => {
12593
- const b = go(y, s.current)[ho(y)], A = b.relation, S = await $.getHandler().getFields({
12593
+ const b = go(y, s.current)[ho(y)], A = b.relation, C = await $.getHandler().getFields({
12594
12594
  model: A,
12595
12595
  context: t,
12596
12596
  fields: []
12597
12597
  });
12598
- for (const [C, F] of Object.entries(S))
12599
- S[C].string = Ng({
12598
+ for (const [S, F] of Object.entries(C))
12599
+ C[S].string = Ng({
12600
12600
  parentTitle: b.string,
12601
12601
  title: F.string
12602
12602
  });
12603
- return s.current[y] = S, es({
12604
- fields: S,
12603
+ return s.current[y] = C, es({
12604
+ fields: C,
12605
12605
  parentKey: y
12606
12606
  });
12607
12607
  },
@@ -12615,13 +12615,13 @@ const { useToken: Eg } = ze, { TextArea: mo } = ft, Pg = (e) => {
12615
12615
  return {
12616
12616
  predefinedExports: y.map((A) => ({
12617
12617
  ...A,
12618
- fields: A.fields.map((S) => {
12619
- const C = ho(S.key), w = go(S.key, s.current)[C];
12618
+ fields: A.fields.map((C) => {
12619
+ const S = ho(C.key), w = go(C.key, s.current)[S];
12620
12620
  return w ? {
12621
- key: S.key,
12621
+ key: C.key,
12622
12622
  title: w.string
12623
12623
  } : {
12624
- key: S.key
12624
+ key: C.key
12625
12625
  };
12626
12626
  })
12627
12627
  })),
@@ -12660,10 +12660,10 @@ const { useToken: Eg } = ze, { TextArea: mo } = ft, Pg = (e) => {
12660
12660
  context: t
12661
12661
  });
12662
12662
  return await Promise.all(
12663
- y.fields.map(async (S) => await $.getHandler().create({
12663
+ y.fields.map(async (C) => await $.getHandler().create({
12664
12664
  model: "ir.exports.line",
12665
12665
  values: {
12666
- name: S.key,
12666
+ name: C.key,
12667
12667
  export_id: A
12668
12668
  },
12669
12669
  fields: b,
@@ -12898,8 +12898,8 @@ const { useToken: Eg } = ze, { TextArea: mo } = ft, Pg = (e) => {
12898
12898
  r == null || r(A);
12899
12899
  };
12900
12900
  async function g() {
12901
- const A = await vn(n), S = `data:${A == null ? void 0 : A.mime};base64,${n}`, C = document.createElement("a"), F = d(s), w = d("name");
12902
- C.href = S, C.download = F || w, C.click();
12901
+ const A = await vn(n), C = `data:${A == null ? void 0 : A.mime};base64,${n}`, S = document.createElement("a"), F = d(s), w = d("name");
12902
+ S.href = C, S.download = F || w, S.click();
12903
12903
  }
12904
12904
  async function y() {
12905
12905
  const A = await vn(n);
@@ -12907,8 +12907,8 @@ const { useToken: Eg } = ze, { TextArea: mo } = ft, Pg = (e) => {
12907
12907
  }
12908
12908
  async function v(A) {
12909
12909
  A.stopPropagation(), A.preventDefault();
12910
- const S = A.target.files[0], C = await js(S);
12911
- p(C), s && m(s, S.name);
12910
+ const C = A.target.files[0], S = await js(C);
12911
+ p(S), s && m(s, C.name);
12912
12912
  }
12913
12913
  function b() {
12914
12914
  m(s, void 0), p(void 0);
@@ -13176,14 +13176,14 @@ const ny = () => {
13176
13176
  async (y) => {
13177
13177
  var v;
13178
13178
  try {
13179
- const { params: b, model: A, name_search: S, context: C, order: F } = s, { results: w } = await l({
13179
+ const { params: b, model: A, name_search: C, context: S, order: F } = s, { results: w } = await l({
13180
13180
  params: b,
13181
13181
  model: A,
13182
- context: C,
13182
+ context: S,
13183
13183
  limit: 1,
13184
13184
  offset: y,
13185
13185
  order: F,
13186
- name_search: S,
13186
+ name_search: C,
13187
13187
  skipRead: !0
13188
13188
  });
13189
13189
  return (v = w[0]) == null ? void 0 : v.id;
@@ -13199,19 +13199,19 @@ const ny = () => {
13199
13199
  [o, r]
13200
13200
  ), f = D(
13201
13201
  async (y) => {
13202
- var C, F;
13202
+ var S, F;
13203
13203
  if (!a)
13204
13204
  return;
13205
- const v = y === "next", b = v ? n + 1 : n - 1, A = v ? b < t : b >= 0, S = v ? b === t : b === -1;
13205
+ const v = y === "next", b = v ? n + 1 : n - 1, A = v ? b < t : b >= 0, C = v ? b === t : b === -1;
13206
13206
  if (A) {
13207
- const w = (C = a[b]) == null ? void 0 : C.id;
13207
+ const w = (S = a[b]) == null ? void 0 : S.id;
13208
13208
  if (w)
13209
13209
  d(b, w);
13210
13210
  else {
13211
13211
  const T = await m(b);
13212
13212
  T && d(b, T);
13213
13213
  }
13214
- } else if (S) {
13214
+ } else if (C) {
13215
13215
  const w = v ? 0 : t - 1, T = (F = a[w]) == null ? void 0 : F.id;
13216
13216
  if (T)
13217
13217
  d(w, T);
@@ -13226,8 +13226,8 @@ const ny = () => {
13226
13226
  (y) => {
13227
13227
  if (!a || a.length === 0)
13228
13228
  return;
13229
- const v = y === "next", b = v ? n + 1 : n - 1, S = (v ? b === a.length : b === -1) ? v ? 0 : a.length - 1 : b;
13230
- d(S, a[S].id);
13229
+ const v = y === "next", b = v ? n + 1 : n - 1, C = (v ? b === a.length : b === -1) ? v ? 0 : a.length - 1 : b;
13230
+ d(C, a[C].id);
13231
13231
  },
13232
13232
  [a, n, d]
13233
13233
  ), p = D(() => {
@@ -13259,8 +13259,8 @@ function ry({ toolbar: e }) {
13259
13259
  setRemovingItem: v,
13260
13260
  removingItem: b,
13261
13261
  duplicatingItem: A,
13262
- setDuplicatingItem: S,
13263
- setResults: C,
13262
+ setDuplicatingItem: C,
13263
+ setResults: S,
13264
13264
  formIsLoading: F,
13265
13265
  attachments: w,
13266
13266
  formRef: T,
@@ -13294,7 +13294,7 @@ function ry({ toolbar: e }) {
13294
13294
  const M = f == null ? void 0 : f.filter(
13295
13295
  (ie) => ie.id !== d
13296
13296
  );
13297
- C == null || C(M);
13297
+ S == null || S(M);
13298
13298
  const z = Math.max(0, (p || 0) - 1);
13299
13299
  M != null && M[z] ? (g == null || g(M[z].id), h == null || h(z)) : (g == null || g(void 0), h == null || h(void 0));
13300
13300
  } catch (M) {
@@ -13311,10 +13311,10 @@ function ry({ toolbar: e }) {
13311
13311
  g,
13312
13312
  h,
13313
13313
  v,
13314
- C
13314
+ S
13315
13315
  ]), Q = D(async () => {
13316
13316
  try {
13317
- S == null || S(!0);
13317
+ C == null || C(!0);
13318
13318
  const M = await $.getHandler().duplicate({
13319
13319
  id: d,
13320
13320
  model: y,
@@ -13324,9 +13324,9 @@ function ry({ toolbar: e }) {
13324
13324
  } catch (M) {
13325
13325
  qt(JSON.stringify(M));
13326
13326
  } finally {
13327
- S == null || S(!1);
13327
+ C == null || C(!1);
13328
13328
  }
13329
- }, [d, y, T, R, S]), J = D(
13329
+ }, [d, y, T, R, C]), J = D(
13330
13330
  (M) => {
13331
13331
  x == null || x(s), _ == null || _(!1), l == null || l(M);
13332
13332
  },
@@ -13774,8 +13774,8 @@ const dy = (e) => {
13774
13774
  searchVisible: v = !0,
13775
13775
  setSearchVisible: b = void 0,
13776
13776
  sorter: A = void 0,
13777
- setSorter: S = void 0,
13778
- setTotalItems: C = void 0,
13777
+ setSorter: C = void 0,
13778
+ setTotalItems: S = void 0,
13779
13779
  setSearchTreeNameSearch: F = void 0,
13780
13780
  setTreeIsLoading: w = void 0,
13781
13781
  limit: T,
@@ -13804,13 +13804,13 @@ const dy = (e) => {
13804
13804
  formView: s,
13805
13805
  treeView: l,
13806
13806
  sorter: A,
13807
- setSorter: S,
13807
+ setSorter: C,
13808
13808
  setCurrentItemIndex: f,
13809
13809
  setResultsActionView: d,
13810
13810
  resultsActionView: p,
13811
13811
  domain: a,
13812
13812
  currentId: h,
13813
- setActionViewTotalItems: C,
13813
+ setActionViewTotalItems: S,
13814
13814
  limit: T,
13815
13815
  setLimit: _
13816
13816
  }), Z = q(
@@ -14066,7 +14066,7 @@ function vy(e, t) {
14066
14066
  initialSearchParams: v = [],
14067
14067
  currentPage: b,
14068
14068
  order: A
14069
- } = e, [S, C] = I(), [F, w] = I([]), [T, _] = I(!0), O = f || void 0, [x, R] = I(
14069
+ } = e, [C, S] = I(), [F, w] = I([]), [T, _] = I(!0), O = f || void 0, [x, R] = I(
14070
14070
  O
14071
14071
  ), [E, V] = I([]), [N, L] = I(), [B, W] = I([]), [k, K] = I(), [Z, Q] = I(0), [J, we] = I(!1), [oe, H] = I(!1), [M, z] = I(), { t: ie } = me(), X = Y(), j = Y(), le = ne(
14072
14072
  Ot
@@ -14084,14 +14084,14 @@ function vy(e, t) {
14084
14084
  Ve();
14085
14085
  },
14086
14086
  { enableOnFormTags: !0, preventDefault: !0 },
14087
- [_e, ye, S, N, B]
14087
+ [_e, ye, C, N, B]
14088
14088
  );
14089
14089
  function Ie(se) {
14090
14090
  R(se), de == null || de(se);
14091
14091
  }
14092
14092
  const re = D(
14093
14093
  (se) => {
14094
- C(se), ce == null || ce(se);
14094
+ S(se), ce == null || ce(se);
14095
14095
  },
14096
14096
  [ce]
14097
14097
  );
@@ -14212,14 +14212,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
14212
14212
  if (_e === c) {
14213
14213
  de == null || de(x);
14214
14214
  const se = { action_id: h, action_type: p };
14215
- ce == null || ce({ ...S, extra: se });
14215
+ ce == null || ce({ ...C, extra: se });
14216
14216
  }
14217
14217
  }, [ye, _e]);
14218
14218
  async function xe() {
14219
- return S && S.type === "form" ? await X.current.cancelUnsavedChanges() : !0;
14219
+ return C && C.type === "form" ? await X.current.cancelUnsavedChanges() : !0;
14220
14220
  }
14221
14221
  async function Ve() {
14222
- _e === c && (S.type === "form" && !await X.current.cancelUnsavedChanges() || we(!0));
14222
+ _e === c && (C.type === "form" && !await X.current.cancelUnsavedChanges() || we(!0));
14223
14223
  }
14224
14224
  async function je(se, ke) {
14225
14225
  var ve;
@@ -14269,7 +14269,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
14269
14269
  }
14270
14270
  }
14271
14271
  function pe() {
14272
- if (x === void 0 && S.type === "form")
14272
+ if (x === void 0 && C.type === "form")
14273
14273
  X.current.clearAndReload();
14274
14274
  else {
14275
14275
  Ie(void 0);
@@ -14279,11 +14279,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
14279
14279
  re(se);
14280
14280
  }
14281
14281
  }
14282
- return T ? /* @__PURE__ */ i(Qe, {}) : S ? /* @__PURE__ */ P(
14282
+ return T ? /* @__PURE__ */ i(Qe, {}) : C ? /* @__PURE__ */ P(
14283
14283
  Sh,
14284
14284
  {
14285
14285
  title: s,
14286
- currentView: S,
14286
+ currentView: C,
14287
14287
  setCurrentView: re,
14288
14288
  availableViews: F,
14289
14289
  formRef: X,
@@ -14317,7 +14317,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
14317
14317
  availableViews: F,
14318
14318
  formRef: X,
14319
14319
  currentId: x,
14320
- currentView: S,
14320
+ currentView: C,
14321
14321
  model: r,
14322
14322
  context: o,
14323
14323
  domain: n,
@@ -14475,13 +14475,13 @@ function Cy(e) {
14475
14475
  domain: a = [],
14476
14476
  visible: s = !0,
14477
14477
  parentContext: l = {}
14478
- } = e, [c, u] = I(!1), [m, d] = I(!1), [f, h] = I(), [p, g] = I(), [y, v] = I(), [b, A] = I(1), [S, C] = I(0), F = Y($t), w = Y([]), [T, _] = I(0), [O, x] = I([]), [R, E] = I(void 0), [V, N] = I(), [L, B] = I(), [W, k] = I(), [K, Z] = I(!1), Q = Y([]), J = (j) => {
14479
- Z(!0), A(j), C((j - 1) * F.current);
14478
+ } = 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 = Y($t), w = Y([]), [T, _] = I(0), [O, x] = I([]), [R, E] = I(void 0), [V, N] = I(), [L, B] = I(), [W, k] = I(), [K, Z] = I(!1), Q = Y([]), J = (j) => {
14479
+ Z(!0), A(j), S((j - 1) * F.current);
14480
14480
  }, we = async () => {
14481
14481
  const j = Q.current.length > 0 ? Q.current : a, le = Kt(w.current, j), { colors: ce } = jt(p), { totalItems: de, results: ye, attrsEvaluated: _e } = await $.getHandler().searchForTree({
14482
14482
  params: le,
14483
14483
  limit: F.current,
14484
- offset: S,
14484
+ offset: C,
14485
14485
  model: f,
14486
14486
  fields: p.fields,
14487
14487
  context: l,
@@ -14505,7 +14505,7 @@ function Cy(e) {
14505
14505
  };
14506
14506
  ae(() => {
14507
14507
  m && s && oe();
14508
- }, [b, S, m, s]);
14508
+ }, [b, C, m, s]);
14509
14509
  const H = async (j) => {
14510
14510
  d(!1), u(!0), k(void 0);
14511
14511
  try {
@@ -14600,18 +14600,18 @@ function Iy(e, t) {
14600
14600
  moveItemsEnabled: p
14601
14601
  } = ne(Jo), g = Y(), y = Y(), [v] = Xe($.getHandler().getView), [b] = Xe(
14602
14602
  $.getHandler().readObjects
14603
- ), [A] = Xe($.getHandler().update), S = In(
14603
+ ), [A] = Xe($.getHandler().update), C = In(
14604
14604
  Qt.FEATURE_READFORVIEW
14605
14605
  );
14606
14606
  ae(() => {
14607
- C();
14607
+ S();
14608
14608
  }, [n, o, r]), Dt(t, () => ({
14609
14609
  refresh: () => {
14610
- C();
14610
+ S();
14611
14611
  },
14612
14612
  configDashboard: x
14613
14613
  }));
14614
- async function C() {
14614
+ async function S() {
14615
14615
  u(!0), f(!0), d(void 0);
14616
14616
  try {
14617
14617
  const R = await F(), E = await T(R), V = R.fields[Xr].relation, N = E[Xr].items;
@@ -14747,7 +14747,7 @@ function Iy(e, t) {
14747
14747
  }
14748
14748
  let X = null;
14749
14749
  if ((M == null ? void 0 : M.type) === "graph") {
14750
- const ye = N.server_action === !0 && S ? za : _n;
14750
+ const ye = N.server_action === !0 && C ? za : _n;
14751
14751
  X = /* @__PURE__ */ i(
14752
14752
  ye,
14753
14753
  {
@@ -14866,14 +14866,14 @@ const Ay = _t(Iy), Fy = (e) => {
14866
14866
  }, _y = (e) => {
14867
14867
  const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((T) => T.operation !== "pendingRemove").map((T) => T.id), [s, l] = I([]), [c, u] = I(), [m, d] = I(!1), { relation: f, context: h, readOnly: p, field: g, columns: y } = n, v = ne(Ge), { getContext: b } = v || {};
14868
14868
  Mt(() => {
14869
- S();
14869
+ C();
14870
14870
  }, [o]);
14871
14871
  const A = (T) => {
14872
14872
  r == null || r({
14873
14873
  items: T
14874
14874
  });
14875
14875
  };
14876
- async function S() {
14876
+ async function C() {
14877
14877
  d(!0);
14878
14878
  let T = [];
14879
14879
  if (n.domain) {
@@ -14908,7 +14908,7 @@ const Ay = _t(Iy), Fy = (e) => {
14908
14908
  if (c)
14909
14909
  return /* @__PURE__ */ i(yt, { className: "mt-10", message: c, type: "error", banner: !0 });
14910
14910
  }
14911
- const C = () => {
14911
+ const S = () => {
14912
14912
  w(s.map((T) => T.value));
14913
14913
  }, F = () => {
14914
14914
  w([]);
@@ -14936,7 +14936,7 @@ const Ay = _t(Iy), Fy = (e) => {
14936
14936
  /* @__PURE__ */ i(
14937
14937
  We,
14938
14938
  {
14939
- onClick: C,
14939
+ onClick: S,
14940
14940
  disabled: a.length == s.length,
14941
14941
  children: "Check all"
14942
14942
  }
@@ -15286,7 +15286,7 @@ function iv(e, t) {
15286
15286
  return console.error(N), [];
15287
15287
  }
15288
15288
  })();
15289
- C({
15289
+ S({
15290
15290
  ...F,
15291
15291
  limit: _ && _ > os ? os : _,
15292
15292
  context: { ...l, ...E },
@@ -15309,7 +15309,7 @@ function iv(e, t) {
15309
15309
  type: "form",
15310
15310
  context: l
15311
15311
  });
15312
- return await C({
15312
+ return await S({
15313
15313
  action_id: -1,
15314
15314
  action_type: "ir.actions.act_window",
15315
15315
  model: F,
@@ -15385,7 +15385,7 @@ function iv(e, t) {
15385
15385
  const [ie, X] = M[0];
15386
15386
  z = { id: ie, type: X };
15387
15387
  }
15388
- C({
15388
+ S({
15389
15389
  domain: [...k, ...x],
15390
15390
  context: { ...l, ...B },
15391
15391
  model: K,
@@ -15451,7 +15451,7 @@ function iv(e, t) {
15451
15451
  fields: w,
15452
15452
  context: { ...l, ...Q }
15453
15453
  }) : [];
15454
- C({
15454
+ S({
15455
15455
  model: x,
15456
15456
  target: N,
15457
15457
  views: V,
@@ -15525,7 +15525,7 @@ function iv(e, t) {
15525
15525
  } else
15526
15526
  [z, ie] = M.find((j) => j[0] === void 0 ? !1 : j[0] === O);
15527
15527
  const X = { id: z, type: ie };
15528
- C({
15528
+ S({
15529
15529
  domain: W,
15530
15530
  context: { ...l, ...B },
15531
15531
  model: K,
@@ -15545,7 +15545,7 @@ function iv(e, t) {
15545
15545
  }
15546
15546
  });
15547
15547
  }
15548
- async function S({
15548
+ async function C({
15549
15549
  model: F,
15550
15550
  values: w,
15551
15551
  forced_values: T,
@@ -15563,7 +15563,7 @@ function iv(e, t) {
15563
15563
  domain: x
15564
15564
  });
15565
15565
  }
15566
- async function C(F) {
15566
+ async function S(F) {
15567
15567
  const {
15568
15568
  domain: w,
15569
15569
  context: T,
@@ -15638,9 +15638,9 @@ function iv(e, t) {
15638
15638
  Pu,
15639
15639
  {
15640
15640
  openShortcut: A,
15641
- openAction: C,
15641
+ openAction: S,
15642
15642
  openRelate: b,
15643
- openDefaultActionForModel: S,
15643
+ openDefaultActionForModel: C,
15644
15644
  tabs: c,
15645
15645
  activeKey: r,
15646
15646
  onRemoveTab: async (F) => {
@@ -15780,7 +15780,7 @@ const { useToken: dv } = ze, fb = (e) => {
15780
15780
  currentView: v,
15781
15781
  currentId: b,
15782
15782
  openDefaultActionForModel: A
15783
- } = h || {}, S = q(() => {
15783
+ } = h || {}, C = q(() => {
15784
15784
  if (!v || !v.view_id || !v.extra)
15785
15785
  return;
15786
15786
  const { action_id: x, action_type: R } = v.extra || {};
@@ -15796,23 +15796,23 @@ const { useToken: dv } = ze, fb = (e) => {
15796
15796
  view_id: E,
15797
15797
  res_id: V
15798
15798
  };
15799
- }, [b, v]), C = q(() => {
15800
- if (S)
15801
- return JSON.stringify(S);
15802
- }, [S]);
15799
+ }, [b, v]), S = q(() => {
15800
+ if (C)
15801
+ return JSON.stringify(C);
15802
+ }, [C]);
15803
15803
  ae(() => {
15804
15804
  w();
15805
- }, [C]);
15805
+ }, [S]);
15806
15806
  function F(x) {
15807
15807
  const R = x;
15808
15808
  (R == null ? void 0 : R.action_type) !== "ir.actions.wizard" && p(R);
15809
15809
  }
15810
15810
  const w = D(async () => {
15811
- if (!S)
15811
+ if (!C)
15812
15812
  return;
15813
- const x = await n(S);
15813
+ const x = await n(C);
15814
15814
  x !== !1 && u(x), l(x !== !1);
15815
- }, [S, n]);
15815
+ }, [C, n]);
15816
15816
  async function T() {
15817
15817
  var x;
15818
15818
  (x = f == null ? void 0 : f.current) == null || x.close(), A == null || A({ model: "ir.ui.view_sc" });