@gisce/react-ooui 2.1.0-alpha.5 → 2.1.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.
@@ -624,8 +624,8 @@ const ro = (e) => {
624
624
  if (m)
625
625
  return /* @__PURE__ */ n(at, {});
626
626
  if (l) {
627
- const F = dt(l);
628
- return F && /* @__PURE__ */ n(F, {});
627
+ const I = dt(l);
628
+ return I && /* @__PURE__ */ n(I, {});
629
629
  }
630
630
  }
631
631
  return /* @__PURE__ */ n(we, { ooui: t, children: /* @__PURE__ */ n(
@@ -653,8 +653,8 @@ const ro = (e) => {
653
653
  danger: u,
654
654
  context: m,
655
655
  readOnly: g
656
- } = r || {}, h = H(Be), { executeButtonAction: p } = h || {}, [y, w] = v(!1), { lang: F } = H(he);
657
- function I() {
656
+ } = r || {}, h = H(Be), { executeButtonAction: p } = h || {}, [y, w] = v(!1), { lang: I } = H(he);
657
+ function R() {
658
658
  if (y)
659
659
  return /* @__PURE__ */ n(at, {});
660
660
  if (d) {
@@ -669,7 +669,7 @@ const ro = (e) => {
669
669
  if (c) {
670
670
  Xt({
671
671
  confirmMessage: c,
672
- lang: F,
672
+ lang: I,
673
673
  onOk: () => {
674
674
  S();
675
675
  }
@@ -693,11 +693,11 @@ const ro = (e) => {
693
693
  {
694
694
  ooui: i,
695
695
  executeButtonAction: p,
696
- lang: F
696
+ lang: I
697
697
  }
698
698
  ),
699
699
  children: [
700
- I(),
700
+ R(),
701
701
  s
702
702
  ]
703
703
  }
@@ -723,7 +723,7 @@ const ro = (e) => {
723
723
  async function w() {
724
724
  y(!0), await r({ type: d, action: a, context: m }), y(!1);
725
725
  }
726
- function F() {
726
+ function I() {
727
727
  if (f) {
728
728
  Xt({
729
729
  confirmMessage: f,
@@ -736,7 +736,7 @@ const ro = (e) => {
736
736
  }
737
737
  w();
738
738
  }
739
- function I() {
739
+ function R() {
740
740
  if (p)
741
741
  return /* @__PURE__ */ n(at, {});
742
742
  if (u) {
@@ -748,8 +748,8 @@ const ro = (e) => {
748
748
  Ht.Item,
749
749
  {
750
750
  disabled: !c || g,
751
- onClick: F,
752
- icon: I(),
751
+ onClick: I,
752
+ icon: R(),
753
753
  danger: h,
754
754
  children: l
755
755
  }
@@ -821,19 +821,19 @@ const oo = (e) => {
821
821
  }, io = (e) => {
822
822
  const { visible: t, onCloseModal: r, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = gn(), { t: c } = H(he), [d, f] = v([]), [u, m] = v(!1), [g, h] = v(!1), [p, y] = v({}), w = ce();
823
823
  fe(() => {
824
- t ? F() : y({});
824
+ t ? I() : y({});
825
825
  }, [t]);
826
- async function F() {
826
+ async function I() {
827
827
  m(!0);
828
828
  try {
829
- const b = await I();
829
+ const b = await R();
830
830
  await S(b);
831
831
  } catch (b) {
832
832
  Qe(b);
833
833
  }
834
834
  m(!1);
835
835
  }
836
- async function I() {
836
+ async function R() {
837
837
  const C = (await k.getHandler().search({
838
838
  params: [["translatable", "=", "1"]],
839
839
  fieldsToRetrieve: ["code", "name"],
@@ -894,7 +894,7 @@ const oo = (e) => {
894
894
  }
895
895
  h(!1), a();
896
896
  }
897
- function R() {
897
+ function F() {
898
898
  return u ? /* @__PURE__ */ n(Ee, {}) : /* @__PURE__ */ D(X, { children: [
899
899
  x(),
900
900
  /* @__PURE__ */ n(fn, {}),
@@ -934,7 +934,7 @@ const oo = (e) => {
934
934
  footer: null,
935
935
  destroyOnClose: !0,
936
936
  maskClosable: !1,
937
- children: R()
937
+ children: F()
938
938
  }
939
939
  );
940
940
  };
@@ -1325,7 +1325,7 @@ const er = async (e) => {
1325
1325
  return [
1326
1326
  t.map((p) => {
1327
1327
  const y = m.find(
1328
- (F) => F.id === p.id
1328
+ (I) => I.id === p.id
1329
1329
  ), w = {
1330
1330
  ...p
1331
1331
  };
@@ -1366,16 +1366,16 @@ const er = async (e) => {
1366
1366
  };
1367
1367
  return s ? /* @__PURE__ */ n(Ee, {}) : l ? /* @__PURE__ */ n(tt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ n(we, { type: "array", ...e, children: /* @__PURE__ */ n(Ys, { ooui: t, views: d }) });
1368
1368
  }, Ys = (e) => {
1369
- const { value: t, views: r, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [c, d] = v(), [f, u] = v(!1), [m, g] = v(), { relation: h, context: p, readOnly: y, summaryField: w, titleField: F } = i, I = s.filter((b) => b.values), S = H(Be), { getContext: x } = S || {};
1369
+ const { value: t, views: r, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [c, d] = v(), [f, u] = v(!1), [m, g] = v(), { relation: h, context: p, readOnly: y, summaryField: w, titleField: I } = i, R = s.filter((b) => b.values), S = H(Be), { getContext: x } = S || {};
1370
1370
  xt(() => {
1371
- R();
1371
+ F();
1372
1372
  }, [s]);
1373
1373
  const A = (b) => {
1374
1374
  o == null || o({
1375
1375
  items: b
1376
1376
  });
1377
1377
  };
1378
- async function R() {
1378
+ async function F() {
1379
1379
  l(!0), d(void 0);
1380
1380
  try {
1381
1381
  const [b] = await er({
@@ -1399,7 +1399,7 @@ const er = async (e) => {
1399
1399
  }
1400
1400
  }
1401
1401
  return c ? /* @__PURE__ */ n(tt, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ n(Ee, {}) : /* @__PURE__ */ D(X, { children: [
1402
- /* @__PURE__ */ n(An, { style: { padding: "1rem" }, children: I.map((b, C) => {
1402
+ /* @__PURE__ */ n(An, { style: { padding: "1rem" }, children: R.map((b, C) => {
1403
1403
  var _, T;
1404
1404
  return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ D(An.Item, { children: [
1405
1405
  /* @__PURE__ */ n(
@@ -1408,12 +1408,12 @@ const er = async (e) => {
1408
1408
  style: { display: "inline-block", cursor: "pointer" },
1409
1409
  onClick: () => {
1410
1410
  g(
1411
- I.find(
1411
+ R.find(
1412
1412
  (O) => b.id === O.id
1413
1413
  )
1414
1414
  ), u(!0);
1415
1415
  },
1416
- children: /* @__PURE__ */ n("strong", { children: (_ = b.values) == null ? void 0 : _[F] })
1416
+ children: /* @__PURE__ */ n("strong", { children: (_ = b.values) == null ? void 0 : _[I] })
1417
1417
  }
1418
1418
  ),
1419
1419
  /* @__PURE__ */ n("br", {}),
@@ -1423,7 +1423,7 @@ const er = async (e) => {
1423
1423
  style: { display: "inline-block", cursor: "pointer" },
1424
1424
  onClick: () => {
1425
1425
  g(
1426
- I.find(
1426
+ R.find(
1427
1427
  (O) => b.id === O.id
1428
1428
  )
1429
1429
  ), u(!0);
@@ -1450,7 +1450,7 @@ const er = async (e) => {
1450
1450
  u(!1);
1451
1451
  },
1452
1452
  readOnly: y,
1453
- postSaveAction: R
1453
+ postSaveAction: F
1454
1454
  }
1455
1455
  )
1456
1456
  ] });
@@ -1636,14 +1636,14 @@ const Nt = ({
1636
1636
  }, oa = (e) => {
1637
1637
  const { value: t, ooui: r, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [a, l] = v([]), [c, d] = v(), [f, u] = v(!1), { relation: m, context: g, readOnly: h, field: p } = r, y = H(Be), { getContext: w } = y || {};
1638
1638
  xt(() => {
1639
- I();
1639
+ R();
1640
1640
  }, [o]);
1641
- const F = (A) => {
1641
+ const I = (A) => {
1642
1642
  i == null || i({
1643
1643
  items: A
1644
1644
  });
1645
1645
  };
1646
- async function I() {
1646
+ async function R() {
1647
1647
  u(!0);
1648
1648
  let A = [];
1649
1649
  try {
@@ -1670,24 +1670,24 @@ const Nt = ({
1670
1670
  return Array.isArray(_) && (T = _[1]), { label: T, value: C.id };
1671
1671
  });
1672
1672
  l(b);
1673
- } catch (R) {
1674
- d(R);
1673
+ } catch (F) {
1674
+ d(F);
1675
1675
  } finally {
1676
1676
  u(!1);
1677
1677
  }
1678
1678
  }
1679
1679
  const S = (A) => {
1680
- const R = o.map((C) => A.includes(C.id) ? C.operation == "pendingRemove" ? {
1680
+ const F = o.map((C) => A.includes(C.id) ? C.operation == "pendingRemove" ? {
1681
1681
  ...C,
1682
1682
  operation: "pendingLink"
1683
- } : C : { id: C.id, operation: "pendingRemove" }), b = R.map((C) => C.id);
1683
+ } : C : { id: C.id, operation: "pendingRemove" }), b = F.map((C) => C.id);
1684
1684
  A.filter((C) => !b.includes(C)).map((C) => {
1685
- R.push({ id: C, operation: "pendingLink" });
1686
- }), F(R);
1685
+ F.push({ id: C, operation: "pendingLink" });
1686
+ }), I(F);
1687
1687
  }, x = (A) => {
1688
- const { label: R, closable: b, onClose: C } = A, _ = (O) => {
1688
+ const { label: F, closable: b, onClose: C } = A, _ = (O) => {
1689
1689
  O.preventDefault(), O.stopPropagation();
1690
- }, T = jt(R);
1690
+ }, T = jt(F);
1691
1691
  return /* @__PURE__ */ n(
1692
1692
  tr,
1693
1693
  {
@@ -1696,7 +1696,7 @@ const Nt = ({
1696
1696
  closable: b,
1697
1697
  onClose: C,
1698
1698
  closeIcon: /* @__PURE__ */ n("span", { style: { color: T }, children: "X" }),
1699
- children: R
1699
+ children: F
1700
1700
  }
1701
1701
  );
1702
1702
  };
@@ -2011,12 +2011,12 @@ const Nt = ({
2011
2011
  setCurrentItemIndex: p,
2012
2012
  setResultsActionView: y,
2013
2013
  resultsActionView: w,
2014
- domain: F,
2015
- currentId: I,
2014
+ domain: I,
2015
+ currentId: R,
2016
2016
  limit: S,
2017
2017
  setLimit: x,
2018
2018
  searchParams: A = [],
2019
- setSearchValues: R,
2019
+ setSearchValues: F,
2020
2020
  clearSelection: b
2021
2021
  } = e, [C, _] = v(!1), [T, O] = v(!1), [$, E] = v(), [z, P] = v(1), [N, W] = v(0), [M, Y] = v(), [te, Z] = v([]), [re, G] = v(void 0), [V, L] = v(void 0), ie = ce(S || Yt), q = ce([]), pe = Ie(
2022
2022
  (be) => {
@@ -2028,7 +2028,7 @@ const Nt = ({
2028
2028
  model: t,
2029
2029
  payload: l,
2030
2030
  limit: ie.current,
2031
- attrs: F,
2031
+ attrs: I,
2032
2032
  context: d
2033
2033
  });
2034
2034
  if (Y(be.length), f == null || f(be.length), be.length > 0) {
@@ -2058,7 +2058,7 @@ const Nt = ({
2058
2058
  l,
2059
2059
  t,
2060
2060
  d,
2061
- F,
2061
+ I,
2062
2062
  u,
2063
2063
  m,
2064
2064
  g,
@@ -2066,7 +2066,7 @@ const Nt = ({
2066
2066
  f
2067
2067
  ]), ge = Ie(
2068
2068
  async (be) => {
2069
- const { params: ue, newOffset: Ne } = be || {}, Ye = Ut(ue || A, F), { colors: j, status: Ce } = At(u), _e = {};
2069
+ const { params: ue, newOffset: Ne } = be || {}, Ye = Ut(ue || A, I), { colors: j, status: Ce } = At(u), _e = {};
2070
2070
  j && (_e.colors = j), Ce && (_e.status = Ce);
2071
2071
  const { totalItems: We, results: se, attrsEvaluated: le } = await k.getHandler().searchForTree({
2072
2072
  params: Ye,
@@ -2085,7 +2085,7 @@ const Nt = ({
2085
2085
  }) : [...q.current];
2086
2086
  if (pe(Le), w && Le.length > 0) {
2087
2087
  const qe = Le.findIndex(
2088
- ($e) => I === $e.id
2088
+ ($e) => R === $e.id
2089
2089
  );
2090
2090
  qe === -1 ? p == null || p(0) : p == null || p(qe);
2091
2091
  } else
@@ -2098,10 +2098,10 @@ const Nt = ({
2098
2098
  p,
2099
2099
  w,
2100
2100
  pe,
2101
- I,
2101
+ R,
2102
2102
  t,
2103
2103
  d,
2104
- F,
2104
+ I,
2105
2105
  u,
2106
2106
  m,
2107
2107
  g,
@@ -2150,7 +2150,7 @@ const Nt = ({
2150
2150
  ), Pe = Ie(
2151
2151
  (be) => {
2152
2152
  const { params: ue, searchValues: Ne, limit: Ye, offset: j } = be;
2153
- C || (r == null || r(void 0), i == null || i([]), R == null || R(Ne), o == null || o(ue), s == null || s(!1), O(!0), E(void 0), P(1), Ye && (ie.current = Ye, x == null || x(Ye)), j && W(j), ve({
2153
+ C || (r == null || r(void 0), i == null || i([]), F == null || F(Ne), o == null || o(ue), s == null || s(!1), O(!0), E(void 0), P(1), Ye && (ie.current = Ye, x == null || x(Ye)), j && W(j), ve({
2154
2154
  params: ue,
2155
2155
  newOffset: j
2156
2156
  }));
@@ -2159,7 +2159,7 @@ const Nt = ({
2159
2159
  C,
2160
2160
  r,
2161
2161
  i,
2162
- R,
2162
+ F,
2163
2163
  o,
2164
2164
  s,
2165
2165
  ve,
@@ -2171,12 +2171,12 @@ const Nt = ({
2171
2171
  },
2172
2172
  [_, S, W, P]
2173
2173
  ), je = Ie(() => {
2174
- C || (r == null || r(void 0), o == null || o([]), R == null || R({}), E(void 0), W(0), P(1), x == null || x(S || Yt));
2174
+ C || (r == null || r(void 0), o == null || o([]), F == null || F({}), E(void 0), W(0), P(1), x == null || x(S || Yt));
2175
2175
  }, [
2176
2176
  C,
2177
2177
  r,
2178
2178
  o,
2179
- R,
2179
+ F,
2180
2180
  x,
2181
2181
  S
2182
2182
  ]), Se = Ie(
@@ -2191,11 +2191,11 @@ const Nt = ({
2191
2191
  },
2192
2192
  [u, t, d, ee, pe]
2193
2193
  ), xe = Ie(async () => await k.getHandler().searchAllIds({
2194
- params: Ut(A, F),
2194
+ params: Ut(A, I),
2195
2195
  model: t,
2196
2196
  context: d,
2197
2197
  totalItems: M
2198
- }), [t, d, M, A, F]);
2198
+ }), [t, d, M, A, I]);
2199
2199
  return {
2200
2200
  submit: Pe,
2201
2201
  clear: je,
@@ -2234,12 +2234,12 @@ const Nt = ({
2234
2234
  currentModel: p,
2235
2235
  sorter: y,
2236
2236
  setSorter: w,
2237
- totalItems: F,
2238
- setTotalItems: I,
2237
+ totalItems: I,
2238
+ setTotalItems: R,
2239
2239
  setSelectedRowItems: S,
2240
2240
  selectedRowItems: x,
2241
2241
  searchTreeNameSearch: A,
2242
- setSearchTreeNameSearch: R,
2242
+ setSearchTreeNameSearch: F,
2243
2243
  goToResourceId: b,
2244
2244
  limit: C
2245
2245
  } = e, [_, T] = v(!1), [O, $] = v(!1), [E, z] = v(!1), [P, N] = v(!0), [W, M] = v(!0), [Y, te] = v([]), [Z, re] = v(!1), [G, V] = v([]), [L, ie] = v(!1), [q, pe] = v(!0), [ee, U] = v(), [ge, ve] = v({}), [Ke, Pe] = v(
@@ -2307,10 +2307,10 @@ const Nt = ({
2307
2307
  setSearchVisible: ie,
2308
2308
  sorter: y,
2309
2309
  setSorter: w,
2310
- totalItems: F,
2311
- setTotalItems: I,
2310
+ totalItems: I,
2311
+ setTotalItems: R,
2312
2312
  searchTreeNameSearch: A,
2313
- setSearchTreeNameSearch: R,
2313
+ setSearchTreeNameSearch: F,
2314
2314
  setGraphIsLoading: pe,
2315
2315
  graphIsLoading: q,
2316
2316
  previousView: ee,
@@ -2373,8 +2373,8 @@ const Nt = ({
2373
2373
  context: {}
2374
2374
  }
2375
2375
  );
2376
- async function y(R) {
2377
- const { reportData: b, fields: C, values: _, context: T = {} } = R, {
2376
+ async function y(F) {
2377
+ const { reportData: b, fields: C, values: _, context: T = {} } = F, {
2378
2378
  context: O,
2379
2379
  model: $,
2380
2380
  datas: E = {},
@@ -2405,11 +2405,11 @@ const Nt = ({
2405
2405
  s.current = !1, clearInterval(o.current), Qe(Y), l(!1);
2406
2406
  }
2407
2407
  }
2408
- async function w(R) {
2408
+ async function w(F) {
2409
2409
  let b;
2410
2410
  try {
2411
2411
  if (b = await k.getHandler().getReport({
2412
- id: R
2412
+ id: F
2413
2413
  }), b.state && s.current === !0) {
2414
2414
  s.current = !1, clearInterval(o.current), l(!1);
2415
2415
  const C = await Dt(b.result);
@@ -2419,42 +2419,42 @@ const Nt = ({
2419
2419
  s.current = !1, clearInterval(o.current), l(!1), Qe(C.exception || C);
2420
2420
  }
2421
2421
  }
2422
- async function F({
2423
- actionData: R,
2422
+ async function I({
2423
+ actionData: F,
2424
2424
  fields: b,
2425
2425
  values: C,
2426
2426
  context: _,
2427
2427
  onRefreshParentValues: T
2428
2428
  }) {
2429
- const { type: O } = R;
2429
+ const { type: O } = F;
2430
2430
  if (f.current.push(T), O === "ir.actions.report.xml")
2431
2431
  return await y({
2432
- reportData: R,
2432
+ reportData: F,
2433
2433
  fields: b,
2434
2434
  values: C,
2435
2435
  context: _
2436
2436
  });
2437
2437
  if (O === "ir.actions.act_window")
2438
- return await I({ actionData: R, fields: b, values: C, context: _ });
2438
+ return await R({ actionData: F, fields: b, values: C, context: _ });
2439
2439
  if (O === "ir.actions.act_url")
2440
2440
  window.open(
2441
- ta(R.url, { ...C, context: _ }),
2441
+ ta(F.url, { ...C, context: _ }),
2442
2442
  "_blank"
2443
2443
  );
2444
2444
  else
2445
2445
  return Qe(`${O} action not supported`), {};
2446
2446
  }
2447
- async function I({
2448
- actionData: R,
2447
+ async function R({
2448
+ actionData: F,
2449
2449
  fields: b = {},
2450
2450
  values: C = {},
2451
2451
  context: _ = {}
2452
2452
  }) {
2453
2453
  var z;
2454
- let T = R;
2455
- R.res_model || (T = (await k.getHandler().readObjects({
2454
+ let T = F;
2455
+ F.res_model || (T = (await k.getHandler().readObjects({
2456
2456
  model: "ir.actions.act_window",
2457
- ids: [parseInt(R.id)],
2457
+ ids: [parseInt(F.id)],
2458
2458
  context: _
2459
2459
  }))[0]);
2460
2460
  const O = typeof (T == null ? void 0 : T.context) == "string" ? bt({
@@ -2508,16 +2508,16 @@ const Nt = ({
2508
2508
  }
2509
2509
  }
2510
2510
  function S({
2511
- domain: R,
2511
+ domain: F,
2512
2512
  model: b,
2513
2513
  formView: C,
2514
2514
  context: _,
2515
2515
  actionData: T
2516
2516
  }) {
2517
- m ? x({ domain: R, model: b, formView: C, context: _, actionData: T }) : (p({ domain: R, model: b, context: _, formView: C, actionData: T }), g(!0));
2517
+ m ? x({ domain: F, model: b, formView: C, context: _, actionData: T }) : (p({ domain: F, model: b, context: _, formView: C, actionData: T }), g(!0));
2518
2518
  }
2519
2519
  async function x({
2520
- domain: R,
2520
+ domain: F,
2521
2521
  model: b,
2522
2522
  formView: C,
2523
2523
  context: _,
@@ -2529,7 +2529,7 @@ const Nt = ({
2529
2529
  context: {},
2530
2530
  formView: void 0,
2531
2531
  actionData: void 0
2532
- }), g(!1), await new Promise((O) => setTimeout(O, 300)), p({ domain: R, model: b, context: _, formView: C, actionData: T }), g(!0);
2532
+ }), g(!1), await new Promise((O) => setTimeout(O, 300)), p({ domain: F, model: b, context: _, formView: C, actionData: T }), g(!0);
2533
2533
  }
2534
2534
  async function A() {
2535
2535
  Cr(f.current), f.current = [], g(!1), p({
@@ -2544,7 +2544,7 @@ const Nt = ({
2544
2544
  Mt.Provider,
2545
2545
  {
2546
2546
  value: {
2547
- processAction: F,
2547
+ processAction: I,
2548
2548
  globalValues: i
2549
2549
  },
2550
2550
  children: /* @__PURE__ */ D(X, { children: [
@@ -2678,13 +2678,13 @@ function ka(e, t) {
2678
2678
  postSaveAction: p,
2679
2679
  insideButtonModal: y = !1,
2680
2680
  parentContext: w = {},
2681
- actionDomain: F,
2682
- visible: I = !0,
2681
+ actionDomain: I,
2682
+ visible: R = !0,
2683
2683
  rootForm: S = !1,
2684
2684
  defaultValues: x,
2685
2685
  forcedValues: A = {},
2686
- parentWidth: R
2687
- } = e, { t: b, lang: C } = H(he), [_, T] = v(!1), [O, $] = v(), [E, z] = v(), [P] = ct.useForm(), [N, W] = v(), [M, Y] = v(), te = H(po), [Z, re] = v(), [G, V] = v(!1), L = ce(), ie = ce({}), q = ce({}), pe = ce(!1), ee = ce(!1), U = ce(!1), ve = (R !== void 0 ? R : Z) < Da, Ke = H(Be), { activeId: Pe, getPlainValues: De } = Ke || {}, je = H(
2686
+ parentWidth: F
2687
+ } = e, { t: b, lang: C } = H(he), [_, T] = v(!1), [O, $] = v(), [E, z] = v(), [P] = ct.useForm(), [N, W] = v(), [M, Y] = v(), te = H(po), [Z, re] = v(), [G, V] = v(!1), L = ce(), ie = ce({}), q = ce({}), pe = ce(!1), ee = ce(!1), U = ce(!1), ve = (F !== void 0 ? F : Z) < Da, Ke = H(Be), { activeId: Pe, getPlainValues: De } = Ke || {}, je = H(
2688
2688
  it
2689
2689
  ), {
2690
2690
  setFormIsSaving: Se = void 0,
@@ -2710,13 +2710,13 @@ function ka(e, t) {
2710
2710
  }
2711
2711
  })), fe(() => {
2712
2712
  if ($(void 0), !(!r && !h)) {
2713
- if (!I) {
2713
+ if (!R) {
2714
2714
  L.current = void 0, z(void 0);
2715
2715
  return;
2716
2716
  }
2717
2717
  (i === void 0 && M || i !== void 0 && M && i < 0) && (L.current = void 0, z(void 0)), Me();
2718
2718
  }
2719
- }, [i, r, g, h, I]), fe(() => {
2719
+ }, [i, r, g, h, R]), fe(() => {
2720
2720
  G && (bn({
2721
2721
  elementHasLostFocus: !0
2722
2722
  }), V(!1));
@@ -2825,7 +2825,7 @@ function ka(e, t) {
2825
2825
  ue == null || ue(!0), $(void 0), B != null && B.fields ? (Q = B.fields, ne = B.arch) : (Q = M, ne = N), g && (B == null ? void 0 : B.forceRefresh) !== !0 ? K = g : { values: K, defaultGetCalled: me } = await Lo({
2826
2826
  fields: Q,
2827
2827
  arch: ne
2828
- }), F && (K = { ...Qs(F), ...K }), ie.current = Rt(K, Q), Lt({
2828
+ }), I && (K = { ...Qs(I), ...K }), ie.current = Rt(K, Q), Lt({
2829
2829
  values: K,
2830
2830
  fields: Q,
2831
2831
  reset: !0,
@@ -3167,13 +3167,13 @@ function ka(e, t) {
3167
3167
  ne && Cn(!1), Qe(me);
3168
3168
  }
3169
3169
  }
3170
- const qo = () => !E && !O ? /* @__PURE__ */ n(Ee, {}) : !r && !h || !I ? null : /* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(
3170
+ const qo = () => !E && !O ? /* @__PURE__ */ n(Ee, {}) : !r && !h || !R ? null : /* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(
3171
3171
  ps,
3172
3172
  {
3173
3173
  getValues: $e,
3174
3174
  getPlainValues: J,
3175
3175
  getFields: qe,
3176
- domain: F,
3176
+ domain: I,
3177
3177
  activeId: i,
3178
3178
  activeModel: r,
3179
3179
  setFieldValue: St,
@@ -3231,7 +3231,7 @@ function ka(e, t) {
3231
3231
  )
3232
3232
  ] }) })
3233
3233
  ] });
3234
- return I ? /* @__PURE__ */ n(
3234
+ return R ? /* @__PURE__ */ n(
3235
3235
  Qn,
3236
3236
  {
3237
3237
  bounds: !0,
@@ -3257,16 +3257,16 @@ const Qt = gt(ka), en = (e) => {
3257
3257
  isMenuAction: a = !1,
3258
3258
  actionData: l,
3259
3259
  ...c
3260
- } = e, { model: d } = c, { modalWidth: f } = gn(), [u, m] = v(i), [g, h] = v(!1), [p, y] = v(), { action_id: w, res_id: F, action_type: I, view_id: S } = l || {};
3260
+ } = e, { model: d } = c, { modalWidth: f } = gn(), [u, m] = v(i), [g, h] = v(!1), [p, y] = v(), { action_id: w, res_id: I, action_type: R, view_id: S } = l || {};
3261
3261
  fe(() => {
3262
3262
  a && x();
3263
3263
  }, [l, a]);
3264
3264
  async function x() {
3265
3265
  const C = await k.getHandler().isShortcutFavorite({
3266
3266
  action_id: w,
3267
- action_type: I,
3267
+ action_type: R,
3268
3268
  view_id: S,
3269
- res_id: F || !1
3269
+ res_id: I || !1
3270
3270
  });
3271
3271
  h(C !== !1), C !== !1 && y(C);
3272
3272
  }
@@ -3286,7 +3286,7 @@ const Qt = gt(ka), en = (e) => {
3286
3286
  }
3287
3287
  h(!g);
3288
3288
  }
3289
- function R() {
3289
+ function F() {
3290
3290
  return /* @__PURE__ */ D(Re, { align: "middle", children: [
3291
3291
  /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(
3292
3292
  Ve,
@@ -3304,7 +3304,7 @@ const Qt = gt(ka), en = (e) => {
3304
3304
  return /* @__PURE__ */ n(ya, { setTitle: m, children: /* @__PURE__ */ n(
3305
3305
  Je,
3306
3306
  {
3307
- title: a ? R() : u,
3307
+ title: a ? F() : u,
3308
3308
  centered: !0,
3309
3309
  width: f,
3310
3310
  open: t,
@@ -3322,7 +3322,7 @@ const Qt = gt(ka), en = (e) => {
3322
3322
  parentWidth: b,
3323
3323
  ...c
3324
3324
  },
3325
- `${d}-${r}-${w}-${F}-${I}-${S}-${i}`
3325
+ `${d}-${r}-${w}-${I}-${R}-${S}-${i}`
3326
3326
  )
3327
3327
  }
3328
3328
  ) });
@@ -3613,20 +3613,20 @@ function wo(e) {
3613
3613
  searchError: u,
3614
3614
  searchValues: m,
3615
3615
  showLimitOptions: g = !0
3616
- } = e, [h, p] = v(), [y, w] = v(), [F, I] = v(!1), S = ce(), { token: x } = Ja(), [A] = ct.useForm();
3616
+ } = e, [h, p] = v(), [y, w] = v(), [I, R] = v(!1), S = ce(), { token: x } = Ja(), [A] = ct.useForm();
3617
3617
  fe(() => {
3618
3618
  A.setFieldsValue(m);
3619
3619
  }, [m]);
3620
- const R = () => {
3620
+ const F = () => {
3621
3621
  if (!y)
3622
3622
  return;
3623
- const _ = F ? y : h, T = _ == null ? void 0 : _.rows;
3623
+ const _ = I ? y : h, T = _ == null ? void 0 : _.rows;
3624
3624
  return T == null ? void 0 : T.map((O, $) => /* @__PURE__ */ n(Re, { children: O.map((E, z) => /* @__PURE__ */ n(de, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ n(Ga, { field: E }) }, z)) }, $));
3625
3625
  };
3626
3626
  xt(() => {
3627
- I(!1), S.current = new mi(r, t), S.current.parse(), p(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3627
+ R(!1), S.current = new mi(r, t), S.current.parse(), p(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3628
3628
  }, [t, r]);
3629
- const b = R(), C = (_) => {
3629
+ const b = F(), C = (_) => {
3630
3630
  var E;
3631
3631
  const { limit: T, offset: O } = _;
3632
3632
  delete _.offset, delete _.limit;
@@ -3655,13 +3655,13 @@ function wo(e) {
3655
3655
  initialValues: { offset: a, limit: l },
3656
3656
  children: [
3657
3657
  b,
3658
- F && g && /* @__PURE__ */ n(za, { onLimitChange: c }),
3658
+ I && g && /* @__PURE__ */ n(za, { onLimitChange: c }),
3659
3659
  /* @__PURE__ */ n(
3660
3660
  qa,
3661
3661
  {
3662
- advancedFilter: F,
3662
+ advancedFilter: I,
3663
3663
  onAdvancedFilterToggle: () => {
3664
- I(!F);
3664
+ R(!I);
3665
3665
  },
3666
3666
  onClear: () => {
3667
3667
  A.resetFields(), i();
@@ -3821,43 +3821,41 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
3821
3821
  );
3822
3822
  }, nr = (e) => {
3823
3823
  var x, A;
3824
- const { id: t, model: r, context: i = {} } = e, [o, s] = v(!1), [a, l] = v(!1);
3825
- v(!1);
3826
- const [c, d] = v(), [f, u] = v(), { t: m } = H(he), g = H(
3824
+ const { id: t, model: r, context: i = {} } = e, [o, s] = v(!1), [a, l] = v(!1), [c, d] = v(), [f, u] = v(), { t: m } = H(he), g = H(
3827
3825
  ut
3828
3826
  ), { openRelate: h } = g || {}, p = H(
3829
3827
  Mt
3830
3828
  ), { processAction: y } = p || {}, w = Ie(async () => {
3831
3829
  var T, O, $, E, z, P;
3832
- const R = await k.getHandler().getView({
3830
+ const F = await k.getHandler().getView({
3833
3831
  model: r,
3834
3832
  type: "form",
3835
3833
  context: i
3836
3834
  });
3837
- d(R);
3835
+ d(F);
3838
3836
  let b = [];
3839
- const { toolbar: C } = R;
3840
- (T = C.action) == null || T.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (O = C.action) == null || O.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), ($ = C.relate) == null || $.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (E = C.relate) == null || E.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), (z = C.print) == null || z.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), b = b.filter((N) => Object.keys(R.fields).indexOf(N) > -1);
3837
+ const { toolbar: C } = F;
3838
+ (T = C.action) == null || T.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (O = C.action) == null || O.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), ($ = C.relate) == null || $.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (E = C.relate) == null || E.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), (z = C.print) == null || z.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), b = b.filter((N) => Object.keys(F.fields).indexOf(N) > -1);
3841
3839
  let _ = {};
3842
3840
  return b = [...new Set(b)], b.length > 0 && (_ = (await k.getHandler().readObjects({
3843
3841
  model: r,
3844
3842
  ids: [t],
3845
3843
  fieldsToRetrieve: b,
3846
3844
  context: i
3847
- }))[0]), _ = { ...Rt(_, b), active_id: t }, u(_), !R || !R.toolbar ? [] : [
3845
+ }))[0]), _ = { ...Rt(_, b), active_id: t }, u(_), !F || !F.toolbar ? [] : [
3848
3846
  {
3849
3847
  sticky: !0,
3850
3848
  items: [
3851
3849
  {
3852
3850
  id: "action",
3853
3851
  name: m("action"),
3854
- disabled: !R.toolbar.action || R.toolbar.action.length === 0,
3852
+ disabled: !F.toolbar.action || F.toolbar.action.length === 0,
3855
3853
  icon: /* @__PURE__ */ n(Gn, {})
3856
3854
  },
3857
3855
  {
3858
3856
  id: "print",
3859
3857
  name: m("report"),
3860
- disabled: !R.toolbar.print || R.toolbar.print.length === 0,
3858
+ disabled: !F.toolbar.print || F.toolbar.print.length === 0,
3861
3859
  icon: /* @__PURE__ */ n(qn, {})
3862
3860
  },
3863
3861
  {
@@ -3869,43 +3867,34 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
3869
3867
  {
3870
3868
  label: m("related"),
3871
3869
  icon: /* @__PURE__ */ n(Gr, {}),
3872
- items: (P = R == null ? void 0 : R.toolbar) == null ? void 0 : P.relate
3870
+ items: (P = F == null ? void 0 : F.toolbar) == null ? void 0 : P.relate
3873
3871
  }
3874
3872
  ];
3875
3873
  }, [i, t, r, m]);
3876
3874
  if (!t)
3877
3875
  return null;
3878
- function F(R) {
3879
- if (R.id === "action")
3880
- s(!0);
3881
- else if (R.id === "print")
3882
- l(!0);
3883
- else {
3884
- const b = c.toolbar.relate.find((C) => C.id === parseInt(C.id));
3885
- if (!b)
3886
- return;
3887
- h({
3888
- relateData: b,
3889
- values: f,
3890
- fields: c.fields,
3891
- action_id: b.id,
3892
- action_type: b.type
3893
- });
3894
- }
3876
+ function I(F) {
3877
+ F.id === "action" ? s(!0) : F.id === "print" ? l(!0) : h({
3878
+ relateData: F,
3879
+ values: f,
3880
+ fields: c.fields,
3881
+ action_id: F.id,
3882
+ action_type: F.type
3883
+ });
3895
3884
  }
3896
- function I(R) {
3885
+ function R(F) {
3897
3886
  s(!1), y == null || y({
3898
- actionData: R,
3887
+ actionData: F,
3899
3888
  values: f,
3900
3889
  fields: c.fields,
3901
3890
  context: { active_id: t, active_ids: [t] }
3902
3891
  });
3903
3892
  }
3904
- function S(R) {
3893
+ function S(F) {
3905
3894
  l(!1), y == null || y({
3906
3895
  actionData: {
3907
- ...R,
3908
- datas: { ...R.datas || {}, ids: [t] }
3896
+ ...F,
3897
+ datas: { ...F.datas || {}, ids: [t] }
3909
3898
  },
3910
3899
  values: f,
3911
3900
  fields: c.fields
@@ -3916,7 +3905,7 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
3916
3905
  eo,
3917
3906
  {
3918
3907
  onRetrieveData: w,
3919
- onItemClick: F,
3908
+ onItemClick: I,
3920
3909
  maxHeight: 300,
3921
3910
  trigger: ["click"],
3922
3911
  children: /* @__PURE__ */ n(gi, { style: { color: "rgba(0,0,0,.45)" } })
@@ -3927,7 +3916,7 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
3927
3916
  {
3928
3917
  visible: o,
3929
3918
  items: (x = c == null ? void 0 : c.toolbar) == null ? void 0 : x.action,
3930
- onItemClicked: I,
3919
+ onItemClicked: R,
3931
3920
  onCancel: () => s(!1)
3932
3921
  }
3933
3922
  ),
@@ -4207,12 +4196,12 @@ const il = (e) => {
4207
4196
  statusForResults: p = {},
4208
4197
  onChangeSort: y,
4209
4198
  sorter: w,
4210
- onFetchChildrenForRecord: F,
4211
- childField: I,
4199
+ onFetchChildrenForRecord: I,
4200
+ childField: R,
4212
4201
  rootTree: S = !1,
4213
4202
  context: x,
4214
4203
  readonly: A,
4215
- onSelectAllRecords: R
4204
+ onSelectAllRecords: F
4216
4205
  } = e, b = ce(null), [C, _] = v([]), T = ce(!1), [O, $] = v(), { t: E } = H(he), z = ce(i), P = H(
4217
4206
  it
4218
4207
  ), { title: N = void 0, setTitle: W = void 0 } = (S ? P : {}) || {}, M = ke(() => {
@@ -4249,7 +4238,7 @@ const il = (e) => {
4249
4238
  (pe) => u && u.includes(pe.id)
4250
4239
  ).length;
4251
4240
  return c ? null : o === void 0 ? /* @__PURE__ */ n(Ee, { className: "pb-4" }) : /* @__PURE__ */ D(Re, { align: "bottom", className: "pb-4", children: [
4252
- /* @__PURE__ */ n(de, { span: R ? 8 : 12, children: /* @__PURE__ */ n(
4241
+ /* @__PURE__ */ n(de, { span: F ? 8 : 12, children: /* @__PURE__ */ n(
4253
4242
  ii,
4254
4243
  {
4255
4244
  total: o,
@@ -4259,23 +4248,23 @@ const il = (e) => {
4259
4248
  onChange: l
4260
4249
  }
4261
4250
  ) }),
4262
- R && /* @__PURE__ */ n(de, { span: 8, className: "text-center", children: /* @__PURE__ */ n(
4251
+ F && /* @__PURE__ */ n(de, { span: 8, className: "text-center", children: /* @__PURE__ */ n(
4263
4252
  Qa,
4264
4253
  {
4265
4254
  numberOfVisibleSelectedRows: q,
4266
4255
  numberOfRealSelectedRows: (u == null ? void 0 : u.length) || 0,
4267
4256
  numberOfTotalRows: C.length,
4268
4257
  totalRecords: o || 0,
4269
- onSelectAllRecords: R
4258
+ onSelectAllRecords: F
4270
4259
  }
4271
4260
  ) }),
4272
- /* @__PURE__ */ n(de, { span: R ? 8 : 12, className: "text-right", children: Z })
4261
+ /* @__PURE__ */ n(de, { span: F ? 8 : 12, className: "text-right", children: Z })
4273
4262
  ] });
4274
4263
  }, [
4275
4264
  C,
4276
4265
  c,
4277
4266
  l,
4278
- R,
4267
+ F,
4279
4268
  r,
4280
4269
  u,
4281
4270
  f,
@@ -4321,12 +4310,12 @@ const il = (e) => {
4321
4310
  onChangeSort: y,
4322
4311
  sorter: w,
4323
4312
  readonly: A,
4324
- expandableOpts: F ? {
4313
+ expandableOpts: I ? {
4325
4314
  expandIcon: yi,
4326
4315
  collapseIcon: wi,
4327
4316
  loadingIcon: at,
4328
- onFetchChildrenForRecord: F,
4329
- childField: I
4317
+ onFetchChildrenForRecord: I,
4318
+ childField: R
4330
4319
  } : void 0
4331
4320
  }
4332
4321
  ),
@@ -4350,7 +4339,7 @@ function xl(e, t) {
4350
4339
  rootTree: f = !1,
4351
4340
  parentContext: u = {},
4352
4341
  onChangeSelectedRowKeys: m
4353
- } = e, [g, h] = v(!1), [p, y] = v(!1), w = ce(!1), F = ce(null), [I, S] = v(), [x, A] = v(), [R, b] = v(), [C, _] = v(), [T, O] = v(200), $ = ce(), { height: E } = gn(), z = H(
4342
+ } = e, [g, h] = v(!1), [p, y] = v(!1), w = ce(!1), I = ce(null), [R, S] = v(), [x, A] = v(), [F, b] = v(), [C, _] = v(), [T, O] = v(200), $ = ce(), { height: E } = gn(), z = H(
4354
4343
  Mt
4355
4344
  ), { processAction: P } = z || {}, N = H(
4356
4345
  it
@@ -4397,7 +4386,7 @@ function xl(e, t) {
4397
4386
  totalItems: qe,
4398
4387
  getAllIds: $e
4399
4388
  } = go({
4400
- model: I,
4389
+ model: R,
4401
4390
  setSearchTreeNameSearch: U,
4402
4391
  setSelectedRowItems: je,
4403
4392
  setSearchParams: V,
@@ -4408,7 +4397,7 @@ function xl(e, t) {
4408
4397
  nameSearch: a,
4409
4398
  searchNameGetDoneRef: w,
4410
4399
  context: u,
4411
- formView: R,
4400
+ formView: F,
4412
4401
  treeView: x,
4413
4402
  sorter: q,
4414
4403
  setSorter: pe,
@@ -4420,7 +4409,7 @@ function xl(e, t) {
4420
4409
  setActionViewTotalItems: ee,
4421
4410
  limit: Pe,
4422
4411
  setLimit: De,
4423
- clearSelection: (Pt = F.current) == null ? void 0 : Pt.unselectAll
4412
+ clearSelection: (Pt = I.current) == null ? void 0 : Pt.unselectAll
4424
4413
  });
4425
4414
  yt(t, () => ({
4426
4415
  refreshResults: () => {
@@ -4468,7 +4457,7 @@ function xl(e, t) {
4468
4457
  const { id: Ge } = Me;
4469
4458
  $.current || ($.current = await k.getHandler().treeButOpen({
4470
4459
  id: x.view_id,
4471
- model: I,
4460
+ model: R,
4472
4461
  context: u
4473
4462
  }));
4474
4463
  const Tt = $.current[0][2];
@@ -4482,7 +4471,7 @@ function xl(e, t) {
4482
4471
  context: u
4483
4472
  }));
4484
4473
  },
4485
- [I, u, P, x]
4474
+ [R, u, P, x]
4486
4475
  ), Fe = Ie(
4487
4476
  async (Me) => {
4488
4477
  const { id: Ge } = Me;
@@ -4496,25 +4485,25 @@ function xl(e, t) {
4496
4485
  }
4497
4486
  s({
4498
4487
  id: Ge,
4499
- model: I,
4500
- formView: R,
4488
+ model: R,
4489
+ formView: F,
4501
4490
  treeView: x
4502
4491
  });
4503
4492
  },
4504
- [I, R, s, ye, x]
4493
+ [R, F, s, ye, x]
4505
4494
  ), Oe = Ie(async () => {
4506
4495
  const Me = await $e();
4507
4496
  re == null || re(Me.map((Ge) => ({ id: Ge }))), m == null || m(Me);
4508
4497
  }, [$e, m, re]), rt = ke(() => x != null && x.isExpandable ? E - 160 : E - (T + 240), [E, T, x == null ? void 0 : x.isExpandable]), ze = ke(
4509
4498
  () => Z == null ? void 0 : Z.map((Me) => Me.id),
4510
4499
  [Z]
4511
- ), St = Ie(() => !x || !R ? null : /* @__PURE__ */ D(X, { children: [
4500
+ ), St = Ie(() => !x || !F ? null : /* @__PURE__ */ D(X, { children: [
4512
4501
  /* @__PURE__ */ n(
4513
4502
  wo,
4514
4503
  {
4515
- fields: { ...R.fields, ...x.fields },
4504
+ fields: { ...F.fields, ...x.fields },
4516
4505
  searchFields: mo([
4517
- R.search_fields,
4506
+ F.search_fields,
4518
4507
  x.search_fields
4519
4508
  ]),
4520
4509
  onClear: xe,
@@ -4532,7 +4521,7 @@ function xl(e, t) {
4532
4521
  /* @__PURE__ */ n(
4533
4522
  tn,
4534
4523
  {
4535
- ref: F,
4524
+ ref: I,
4536
4525
  context: u,
4537
4526
  total: qe,
4538
4527
  limit: Pe,
@@ -4562,7 +4551,7 @@ function xl(e, t) {
4562
4551
  xe,
4563
4552
  Le,
4564
4553
  le,
4565
- R,
4554
+ F,
4566
4555
  _e,
4567
4556
  Pe,
4568
4557
  Ce,
@@ -4598,9 +4587,9 @@ const So = gt(xl), To = (e) => {
4598
4587
  domain: a,
4599
4588
  context: l = {}
4600
4589
  } = e, [c, d] = v(!1), { modalWidth: f, modalHeight: u } = gn(), { t: m } = H(he), [g, h] = v([]), p = async () => {
4601
- await new Promise((I) => setTimeout(I, 5)), r();
4602
- }, y = async (I) => {
4603
- const { id: S } = I;
4590
+ await new Promise((R) => setTimeout(R, 5)), r();
4591
+ }, y = async (R) => {
4592
+ const { id: S } = R;
4604
4593
  i([S]);
4605
4594
  };
4606
4595
  function w() {
@@ -4610,7 +4599,7 @@ const So = gt(xl), To = (e) => {
4610
4599
  }
4611
4600
  i(g);
4612
4601
  }
4613
- const F = () => /* @__PURE__ */ D(X, { children: [
4602
+ const I = () => /* @__PURE__ */ D(X, { children: [
4614
4603
  /* @__PURE__ */ n(
4615
4604
  So,
4616
4605
  {
@@ -4662,7 +4651,7 @@ const So = gt(xl), To = (e) => {
4662
4651
  footer: null,
4663
4652
  destroyOnClose: !0,
4664
4653
  maskClosable: !1,
4665
- children: F()
4654
+ children: I()
4666
4655
  }
4667
4656
  ),
4668
4657
  /* @__PURE__ */ n(
@@ -4671,8 +4660,8 @@ const So = gt(xl), To = (e) => {
4671
4660
  model: o,
4672
4661
  visible: c,
4673
4662
  parentContext: l,
4674
- onSubmitSucceed: (I) => {
4675
- d(!1), p(), i([I]);
4663
+ onSubmitSucceed: (R) => {
4664
+ d(!1), p(), i([R]);
4676
4665
  },
4677
4666
  onCancel: () => {
4678
4667
  d(!1), p();
@@ -4705,7 +4694,7 @@ const So = gt(xl), To = (e) => {
4705
4694
  context: l,
4706
4695
  id: c,
4707
4696
  domain: d
4708
- } = i, f = o && !a ? { backgroundColor: Fo.colorPrimaryBg } : void 0, [u, m] = v(!1), [g, h] = v(!1), [p, y] = v(!1), [w, F] = v(), I = ce(!1), [S, x] = v(""), A = ce(), R = H(Be), { domain: b, getValues: C, getFields: _, getContext: T, elementHasLostFocus: O } = R || {}, $ = ce([]), [E, z] = v([]), P = t && t[0] || void 0, N = t && t[1] || "";
4697
+ } = i, f = o && !a ? { backgroundColor: Fo.colorPrimaryBg } : void 0, [u, m] = v(!1), [g, h] = v(!1), [p, y] = v(!1), [w, I] = v(), R = ce(!1), [S, x] = v(""), A = ce(), F = H(Be), { domain: b, getValues: C, getFields: _, getContext: T, elementHasLostFocus: O } = F || {}, $ = ce([]), [E, z] = v([]), P = t && t[0] || void 0, N = t && t[1] || "";
4709
4698
  fe(() => {
4710
4699
  !Array.isArray(t) && t && Z(t);
4711
4700
  }, [t]), fe(() => {
@@ -4717,7 +4706,7 @@ const So = gt(xl), To = (e) => {
4717
4706
  A.current = L.target.value, W([void 0, ""]);
4718
4707
  }, Y = async () => {
4719
4708
  if (!p && S !== N) {
4720
- if (await new Promise((L) => setTimeout(L, 100)), I.current) {
4709
+ if (await new Promise((L) => setTimeout(L, 100)), R.current) {
4721
4710
  W([void 0, ""]);
4722
4711
  return;
4723
4712
  }
@@ -4747,10 +4736,10 @@ const So = gt(xl), To = (e) => {
4747
4736
  context: { ...T == null ? void 0 : T(), ...l },
4748
4737
  totalItems: 2
4749
4738
  });
4750
- ie.length === 1 ? Z(ie[0]) : (F(L), m(!0));
4739
+ ie.length === 1 ? Z(ie[0]) : (I(L), m(!0));
4751
4740
  return;
4752
4741
  }
4753
- F(L), m(!0);
4742
+ I(L), m(!0);
4754
4743
  }, Z = async (L) => {
4755
4744
  y(!0);
4756
4745
  try {
@@ -4787,14 +4776,18 @@ const So = gt(xl), To = (e) => {
4787
4776
  L.keyCode === 13 ? (L.preventDefault(), L.stopPropagation(), await Y()) : L.code === "Backspace" && P !== void 0 && (L.preventDefault(), L.stopPropagation(), W([void 0, ""]));
4788
4777
  }
4789
4778
  return /* @__PURE__ */ D(Re, { gutter: 8, wrap: !1, children: [
4790
- /* @__PURE__ */ n(de, { flex: "auto", children: /* @__PURE__ */ n(
4779
+ /* @__PURE__ */ n(de, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ n(
4791
4780
  o && !a ? Rl : st,
4792
4781
  {
4793
4782
  type: "text",
4794
4783
  value: S,
4795
4784
  disabled: a,
4796
4785
  onChange: M,
4797
- style: f,
4786
+ style: {
4787
+ ...f,
4788
+ borderTopRightRadius: 0,
4789
+ borderBottomRightRadius: 0
4790
+ },
4798
4791
  onBlur: Y,
4799
4792
  onKeyDown: G,
4800
4793
  suffix: /* @__PURE__ */ n(
@@ -4807,7 +4800,7 @@ const So = gt(xl), To = (e) => {
4807
4800
  )
4808
4801
  }
4809
4802
  ) }),
4810
- /* @__PURE__ */ n(de, { flex: "32px", style: { paddingRight: 0 }, children: /* @__PURE__ */ n(
4803
+ /* @__PURE__ */ n(de, { flex: "32px", style: { paddingRight: 0, paddingLeft: 0 }, children: /* @__PURE__ */ n(
4811
4804
  Ve,
4812
4805
  {
4813
4806
  icon: /* @__PURE__ */ n(Wn, {}),
@@ -4815,7 +4808,7 @@ const So = gt(xl), To = (e) => {
4815
4808
  onClick: () => {
4816
4809
  h(!0);
4817
4810
  },
4818
- style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
4811
+ style: { borderRadius: 0 },
4819
4812
  tabIndex: -1
4820
4813
  }
4821
4814
  ) }),
@@ -4825,7 +4818,7 @@ const So = gt(xl), To = (e) => {
4825
4818
  icon: p ? /* @__PURE__ */ n(at, {}) : /* @__PURE__ */ n(Yn, {}),
4826
4819
  disabled: a || p,
4827
4820
  onClick: () => {
4828
- I.current = !0, te(N);
4821
+ R.current = !0, te(N);
4829
4822
  },
4830
4823
  style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
4831
4824
  tabIndex: -1
@@ -4840,10 +4833,10 @@ const So = gt(xl), To = (e) => {
4840
4833
  visible: u,
4841
4834
  nameSearch: P ? void 0 : w,
4842
4835
  onSelectValues: (L) => {
4843
- m(!1), Z(L[0]), I.current = !1, A.current = void 0;
4836
+ m(!1), Z(L[0]), R.current = !1, A.current = void 0;
4844
4837
  },
4845
4838
  onCloseModal: () => {
4846
- m(!1), I.current = !1;
4839
+ m(!1), R.current = !1;
4847
4840
  }
4848
4841
  }
4849
4842
  ),
@@ -4903,7 +4896,7 @@ const So = gt(xl), To = (e) => {
4903
4896
  field: d,
4904
4897
  operator: f,
4905
4898
  manualIds: u
4906
- } = e, [m, g] = v(!1), [h, p] = v(), [y, w] = v(), [F, I] = v(), [S, x] = v(0), [A, R] = v(0), [b, C] = v(), [_, T] = v(), [O, $] = v();
4899
+ } = e, [m, g] = v(!1), [h, p] = v(), [y, w] = v(), [I, R] = v(), [S, x] = v(0), [A, F] = v(0), [b, C] = v(), [_, T] = v(), [O, $] = v();
4907
4900
  fe(() => {
4908
4901
  P();
4909
4902
  }, [t, o]);
@@ -4972,7 +4965,7 @@ const So = gt(xl), To = (e) => {
4972
4965
  N = await E({
4973
4966
  domain: Y,
4974
4967
  isTotal: !0
4975
- }), I(N);
4968
+ }), R(N);
4976
4969
  }
4977
4970
  if (N ? (W = Math.round(M / N * 100 * 100) / 100, w(W)) : w(0), o) {
4978
4971
  const Y = await k.getHandler().parseCondition({
@@ -5005,13 +4998,13 @@ const So = gt(xl), To = (e) => {
5005
4998
  bounds: !0,
5006
4999
  onResize: (N) => {
5007
5000
  var W, M;
5008
- x((W = N.bounds) == null ? void 0 : W.height), R((M = N.bounds) == null ? void 0 : M.width);
5001
+ x((W = N.bounds) == null ? void 0 : W.height), F((M = N.bounds) == null ? void 0 : M.width);
5009
5002
  },
5010
5003
  children: ({ measureRef: N }) => a ? /* @__PURE__ */ n(
5011
5004
  Vl,
5012
5005
  {
5013
5006
  value: h,
5014
- total: F,
5007
+ total: I,
5015
5008
  percent: y,
5016
5009
  measureRef: N,
5017
5010
  height: S,
@@ -5024,7 +5017,7 @@ const So = gt(xl), To = (e) => {
5024
5017
  Al,
5025
5018
  {
5026
5019
  value: h,
5027
- total: F,
5020
+ total: I,
5028
5021
  measureRef: N,
5029
5022
  height: S,
5030
5023
  width: A,
@@ -5290,9 +5283,9 @@ const { processGraphData: Ml } = Br, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
5290
5283
  return xt(() => {
5291
5284
  (async () => {
5292
5285
  d(!0), u(void 0);
5293
- const F = Kn(o);
5294
- w(F.type || "line");
5295
- const I = Pl({ ooui: F });
5286
+ const I = Kn(o);
5287
+ w(I.type || "line");
5288
+ const R = Pl({ ooui: I });
5296
5289
  let S, x;
5297
5290
  try {
5298
5291
  ({ values: S, fields: x } = await Bl({
@@ -5300,8 +5293,8 @@ const { processGraphData: Ml } = Br, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
5300
5293
  domain: r,
5301
5294
  context: i,
5302
5295
  limit: s,
5303
- order: F.timerange ? F.x.name : null,
5304
- fields: I,
5296
+ order: I.timerange ? I.x.name : null,
5297
+ fields: R,
5305
5298
  manualIds: l
5306
5299
  }));
5307
5300
  } catch (A) {
@@ -5315,7 +5308,7 @@ const { processGraphData: Ml } = Br, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
5315
5308
  }
5316
5309
  p(S);
5317
5310
  const A = Ml({
5318
- ooui: F,
5311
+ ooui: I,
5319
5312
  values: S,
5320
5313
  fields: x,
5321
5314
  options: {
@@ -5450,8 +5443,8 @@ const jl = (e, t) => {
5450
5443
  context: o
5451
5444
  });
5452
5445
  g(w.arch);
5453
- const F = Kn(w.arch);
5454
- u(F);
5446
+ const I = Kn(w.arch);
5447
+ u(I);
5455
5448
  } catch (w) {
5456
5449
  return console.error(w), /* @__PURE__ */ n(X, { children: JSON.stringify(w) });
5457
5450
  }
@@ -5477,7 +5470,7 @@ const jl = (e, t) => {
5477
5470
  switch (f.type) {
5478
5471
  case "indicatorField":
5479
5472
  case "indicator": {
5480
- const w = f, F = w.type === "indicatorField" ? {
5473
+ const w = f, I = w.type === "indicatorField" ? {
5481
5474
  field: w.field,
5482
5475
  operator: w.operator
5483
5476
  } : {};
@@ -5493,7 +5486,7 @@ const jl = (e, t) => {
5493
5486
  icon: w.icon,
5494
5487
  suffix: w.suffix,
5495
5488
  manualIds: l,
5496
- ...F
5489
+ ...I
5497
5490
  }
5498
5491
  );
5499
5492
  }
@@ -5555,7 +5548,7 @@ const jl = (e, t) => {
5555
5548
  function w() {
5556
5549
  return /* @__PURE__ */ n("div", { className: "inline-block w-3" });
5557
5550
  }
5558
- function F() {
5551
+ function I() {
5559
5552
  return /* @__PURE__ */ n(
5560
5553
  "div",
5561
5554
  {
@@ -5568,7 +5561,7 @@ const jl = (e, t) => {
5568
5561
  }
5569
5562
  );
5570
5563
  }
5571
- function I() {
5564
+ function R() {
5572
5565
  return /* @__PURE__ */ n(
5573
5566
  Ze,
5574
5567
  {
@@ -5612,7 +5605,7 @@ const jl = (e, t) => {
5612
5605
  ] });
5613
5606
  }
5614
5607
  return /* @__PURE__ */ D("div", { className: "flex mb-2", children: [
5615
- F(),
5608
+ I(),
5616
5609
  /* @__PURE__ */ D("div", { className: "flex-none h-8 pl-2", children: [
5617
5610
  s !== "graph" && h && /* @__PURE__ */ n(
5618
5611
  Ze,
@@ -5633,7 +5626,7 @@ const jl = (e, t) => {
5633
5626
  }
5634
5627
  ),
5635
5628
  s !== "graph" && w(),
5636
- s !== "graph" && I(),
5629
+ s !== "graph" && R(),
5637
5630
  s === "form" && x(),
5638
5631
  w(),
5639
5632
  p && /* @__PURE__ */ n(
@@ -5662,7 +5655,7 @@ const Ql = (e) => {
5662
5655
  var $e;
5663
5656
  const { value: t, onChange: r, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: c, setItemIndex: d } = H(
5664
5657
  Ro
5665
- ), f = H(Be), { activeId: u, getFields: m, getValues: g, getContext: h, domain: p } = f || {}, { lang: y, t: w } = H(he), [F, I] = v(!1), [S, x] = v(!1), [A, R] = v(), [b, C] = v(!1), [_, T] = v(!1), [O, $] = v(), [E, z] = v([]), [P, N] = v(!1), W = ce([]), [M, Y] = v(), te = ce(), [Z, re] = v(void 0), {
5658
+ ), f = H(Be), { activeId: u, getFields: m, getValues: g, getContext: h, domain: p } = f || {}, { lang: y, t: w } = H(he), [I, R] = v(!1), [S, x] = v(!1), [A, F] = v(), [b, C] = v(!1), [_, T] = v(!1), [O, $] = v(), [E, z] = v([]), [P, N] = v(!1), W = ce([]), [M, Y] = v(), te = ce(), [Z, re] = v(void 0), {
5666
5659
  readOnly: G,
5667
5660
  relation: V,
5668
5661
  context: L,
@@ -5693,7 +5686,7 @@ const Ql = (e) => {
5693
5686
  await Pe(), c > ee.length - 1 && c !== 0 && d(0);
5694
5687
  }, Pe = async (J) => {
5695
5688
  var oe, Te, ye;
5696
- x(!0), I(!1), R(void 0);
5689
+ x(!0), R(!1), F(void 0);
5697
5690
  try {
5698
5691
  const [Fe, Oe] = await er({
5699
5692
  treeView: {
@@ -5710,7 +5703,7 @@ const Ql = (e) => {
5710
5703
  });
5711
5704
  return te.current || (te.current = Fe.map((rt) => rt.id)), (a || J) === "tree" && Oe && re(Oe), ve(Fe), Fe;
5712
5705
  } catch (Fe) {
5713
- R(Fe);
5706
+ F(Fe);
5714
5707
  } finally {
5715
5708
  x(!1);
5716
5709
  }
@@ -5764,10 +5757,10 @@ const Ql = (e) => {
5764
5757
  } : Fe);
5765
5758
  ve(ye);
5766
5759
  }, ue = (J) => {
5767
- F ? Zt({
5760
+ I ? Zt({
5768
5761
  lang: y,
5769
5762
  onOk: () => {
5770
- be(), J(), I(!1);
5763
+ be(), J(), R(!1);
5771
5764
  }
5772
5765
  }) : J();
5773
5766
  }, Ne = () => {
@@ -5797,7 +5790,7 @@ const Ql = (e) => {
5797
5790
  T(!0);
5798
5791
  }) : T(!0);
5799
5792
  }, Ce = async () => {
5800
- x(!0), I(!1), R(void 0);
5793
+ x(!0), R(!1), F(void 0);
5801
5794
  try {
5802
5795
  if (ee[c].id > 0) {
5803
5796
  const J = s.map((oe) => oe.id === ee[c].id ? {
@@ -5810,12 +5803,12 @@ const Ql = (e) => {
5810
5803
  s.filter((J) => J.id !== ee[c].id)
5811
5804
  );
5812
5805
  } catch (J) {
5813
- R(J);
5806
+ F(J);
5814
5807
  }
5815
5808
  d(0), x(!1);
5816
5809
  }, _e = async () => {
5817
5810
  const J = ee.filter((oe) => E.includes(oe.id));
5818
- x(!0), I(!1), R(void 0);
5811
+ x(!0), R(!1), F(void 0);
5819
5812
  try {
5820
5813
  const oe = J.map((ye) => ye.id), Te = s.filter((ye) => !(oe.includes(ye.id) && ye.id < 0)).map((ye) => oe.includes(ye.id) ? {
5821
5814
  ...ye,
@@ -5823,7 +5816,7 @@ const Ql = (e) => {
5823
5816
  } : ye);
5824
5817
  ve(Te);
5825
5818
  } catch (oe) {
5826
- R(oe);
5819
+ F(oe);
5827
5820
  }
5828
5821
  d(0), x(!1);
5829
5822
  }, We = (J, oe, Te, ye = !1) => {
@@ -5882,7 +5875,7 @@ const Ql = (e) => {
5882
5875
  }
5883
5876
  ve(oe);
5884
5877
  } catch (ye) {
5885
- R(ye);
5878
+ F(ye);
5886
5879
  } finally {
5887
5880
  x(!1);
5888
5881
  }
@@ -5916,7 +5909,7 @@ const Ql = (e) => {
5916
5909
  values: { ...Oe, id: rt },
5917
5910
  treeValues: { ...Oe, id: rt }
5918
5911
  } : lt);
5919
- ve(ze), I(!0);
5912
+ ve(ze), R(!0);
5920
5913
  },
5921
5914
  readOnly: G
5922
5915
  }
@@ -5974,7 +5967,7 @@ const Ql = (e) => {
5974
5967
  title: Le(),
5975
5968
  readOnly: G || !1,
5976
5969
  isMany2Many: q,
5977
- formHasChanges: F,
5970
+ formHasChanges: I,
5978
5971
  totalItems: ee.length,
5979
5972
  currentItemIndex: c,
5980
5973
  onDelete: Ne,
@@ -6031,25 +6024,25 @@ const Ql = (e) => {
6031
6024
  xt(() => {
6032
6025
  w();
6033
6026
  }, [t]);
6034
- const y = async (I) => o && o[I] ? o[I] : await k.getHandler().getView({
6027
+ const y = async (R) => o && o[R] ? o[R] : await k.getHandler().getView({
6035
6028
  model: i,
6036
- type: I,
6029
+ type: R,
6037
6030
  context: { ...p == null ? void 0 : p(), ...a }
6038
6031
  }), w = async () => {
6039
6032
  d(!0), u(void 0);
6040
6033
  try {
6041
6034
  if (r && r.length > 0) {
6042
- for (const I of r) {
6043
- const S = await y(I);
6044
- m.set(I, S);
6035
+ for (const R of r) {
6036
+ const S = await y(R);
6037
+ m.set(R, S);
6045
6038
  }
6046
6039
  g(m);
6047
6040
  } else {
6048
- const I = await y("form"), S = await y("tree");
6049
- m.set("form", I), m.set("tree", S), g(m);
6041
+ const R = await y("form"), S = await y("tree");
6042
+ m.set("form", R), m.set("tree", S), g(m);
6050
6043
  }
6051
- } catch (I) {
6052
- u(JSON.stringify(I));
6044
+ } catch (R) {
6045
+ u(JSON.stringify(R));
6053
6046
  } finally {
6054
6047
  d(!1);
6055
6048
  }
@@ -6059,7 +6052,7 @@ const Ql = (e) => {
6059
6052
  {
6060
6053
  required: s,
6061
6054
  type: "array",
6062
- validator: async (I, S) => {
6055
+ validator: async (R, S) => {
6063
6056
  if (!S)
6064
6057
  throw new Error();
6065
6058
  if (!S.items)
@@ -6285,7 +6278,7 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6285
6278
  y.registersAmount === "selected" && (i == null ? void 0 : i.length) !== 0 && (w = [
6286
6279
  ["id", "in", i == null ? void 0 : i.map((S) => S.id)]
6287
6280
  ]);
6288
- const { datas: F } = await k.getHandler().exportData({
6281
+ const { datas: I } = await k.getHandler().exportData({
6289
6282
  model: e,
6290
6283
  fields: gc({
6291
6284
  keys: y.selectedKeys,
@@ -6297,8 +6290,8 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6297
6290
  format: y.exportType
6298
6291
  });
6299
6292
  a(), await new Promise((S) => setTimeout(S, 200));
6300
- const I = await Dt(F);
6301
- yn(F, I.mime);
6293
+ const R = await Dt(I);
6294
+ yn(I, R.mime);
6302
6295
  },
6303
6296
  [r, e, o, s, t, a]
6304
6297
  ), f = Ie(async () => {
@@ -6310,14 +6303,14 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6310
6303
  return l.current["/"] = y, _r({ fields: y });
6311
6304
  }, [e, t, l]), u = Ie(
6312
6305
  async (y) => {
6313
- const F = Ln(y, l.current)[Pn(y)], I = F.relation, S = await k.getHandler().getFields({
6314
- model: I,
6306
+ const I = Ln(y, l.current)[Pn(y)], R = I.relation, S = await k.getHandler().getFields({
6307
+ model: R,
6315
6308
  context: t,
6316
6309
  fields: []
6317
6310
  });
6318
6311
  for (const [x, A] of Object.entries(S))
6319
6312
  S[x].string = fc({
6320
- parentTitle: F.string,
6313
+ parentTitle: I.string,
6321
6314
  title: A.string
6322
6315
  });
6323
6316
  return l.current[y] = S, _r({
@@ -6333,13 +6326,13 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6333
6326
  onGetFieldChilds: u
6334
6327
  });
6335
6328
  return {
6336
- predefinedExports: y.map((I) => ({
6337
- ...I,
6338
- fields: I.fields.map((S) => {
6339
- const x = Pn(S.key), R = Ln(S.key, l.current)[x];
6329
+ predefinedExports: y.map((R) => ({
6330
+ ...R,
6331
+ fields: R.fields.map((S) => {
6332
+ const x = Pn(S.key), F = Ln(S.key, l.current)[x];
6340
6333
  return {
6341
6334
  key: S.key,
6342
- title: R.string
6335
+ title: F.string
6343
6336
  };
6344
6337
  })
6345
6338
  })),
@@ -6347,7 +6340,7 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6347
6340
  };
6348
6341
  }, [l.current]), g = Ie(
6349
6342
  async (y) => {
6350
- const w = await p("ir.exports"), F = await p("ir.exports.line"), I = await k.getHandler().create({
6343
+ const w = await p("ir.exports"), I = await p("ir.exports.line"), R = await k.getHandler().create({
6351
6344
  model: "ir.exports",
6352
6345
  values: {
6353
6346
  name: y.name,
@@ -6361,12 +6354,12 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6361
6354
  model: "ir.exports.line",
6362
6355
  values: {
6363
6356
  name: S.key,
6364
- export_id: I
6357
+ export_id: R
6365
6358
  },
6366
- fields: F,
6359
+ fields: I,
6367
6360
  context: t
6368
6361
  }))
6369
- ), { ...y, id: I };
6362
+ ), { ...y, id: R };
6370
6363
  },
6371
6364
  []
6372
6365
  ), h = Ie(
@@ -6617,23 +6610,23 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6617
6610
  const { ooui: t } = e, { required: r } = t;
6618
6611
  return /* @__PURE__ */ n(we, { required: r, ...e, children: /* @__PURE__ */ n(Rc, { ooui: t }) });
6619
6612
  }, Rc = (e) => {
6620
- const { ooui: t, value: r, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Fc(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = ce(null), { setFieldValue: f, getFieldValue: u } = H(Be) || {}, { t: m } = H(he), g = r ? Ns(r) : "", h = (I) => {
6621
- i == null || i(I);
6613
+ const { ooui: t, value: r, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Fc(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = ce(null), { setFieldValue: f, getFieldValue: u } = H(Be) || {}, { t: m } = H(he), g = r ? Ns(r) : "", h = (R) => {
6614
+ i == null || i(R);
6622
6615
  };
6623
6616
  async function p() {
6624
- const I = await Dt(r), S = `data:${I == null ? void 0 : I.mime};base64,${r}`, x = document.createElement("a"), A = u(a), R = u("name");
6625
- x.href = S, x.download = A || R, x.click();
6617
+ const R = await Dt(r), S = `data:${R == null ? void 0 : R.mime};base64,${r}`, x = document.createElement("a"), A = u(a), F = u("name");
6618
+ x.href = S, x.download = A || F, x.click();
6626
6619
  }
6627
6620
  async function y() {
6628
- const I = await Dt(r);
6629
- yn(r, I.mime);
6621
+ const R = await Dt(r);
6622
+ yn(r, R.mime);
6630
6623
  }
6631
- async function w(I) {
6632
- I.stopPropagation(), I.preventDefault();
6633
- const S = I.target.files[0], x = await co(S);
6624
+ async function w(R) {
6625
+ R.stopPropagation(), R.preventDefault();
6626
+ const S = R.target.files[0], x = await co(S);
6634
6627
  h(x), a && f(a, S.name);
6635
6628
  }
6636
- function F() {
6629
+ function I() {
6637
6630
  f(a, void 0), h(void 0);
6638
6631
  }
6639
6632
  return /* @__PURE__ */ D(Re, { gutter: 8, children: [
@@ -6685,7 +6678,7 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
6685
6678
  {
6686
6679
  tooltip: m("clear"),
6687
6680
  disabled: o || !r,
6688
- onClick: F,
6681
+ onClick: I,
6689
6682
  icon: /* @__PURE__ */ n(Un, {})
6690
6683
  }
6691
6684
  )
@@ -6984,16 +6977,16 @@ function Dc(e) {
6984
6977
  try {
6985
6978
  const w = await k.getHandler().readObjects({
6986
6979
  model: "ir.attachment",
6987
- ids: t.map((F) => F.id),
6980
+ ids: t.map((I) => I.id),
6988
6981
  fieldsToRetrieve: ["name", "datas_fname", "link"],
6989
6982
  context: a.current.getContext()
6990
6983
  });
6991
6984
  f(
6992
- w.map((F) => ({
6993
- id: F.id,
6994
- name: F.name,
6995
- datas_fname: F.datas_fname,
6996
- link: F.link
6985
+ w.map((I) => ({
6986
+ id: I.id,
6987
+ name: I.name,
6988
+ datas_fname: I.datas_fname,
6989
+ link: I.link
6997
6990
  }))
6998
6991
  );
6999
6992
  } catch (w) {
@@ -7006,22 +6999,22 @@ function Dc(e) {
7006
6999
  return;
7007
7000
  }
7008
7001
  m(!0);
7009
- let F;
7002
+ let I;
7010
7003
  try {
7011
- F = (await k.getHandler().readObjects({
7004
+ I = (await k.getHandler().readObjects({
7012
7005
  model: "ir.attachment",
7013
7006
  ids: [w.id],
7014
7007
  context: a.current.getContext()
7015
7008
  }))[0];
7016
- } catch (I) {
7017
- Qe(I);
7009
+ } catch (R) {
7010
+ Qe(R);
7018
7011
  }
7019
- if (m(!1), !!F)
7020
- if (F.datas) {
7021
- const I = await Dt(F.datas);
7022
- yn(F.datas, I.mime);
7012
+ if (m(!1), !!I)
7013
+ if (I.datas) {
7014
+ const R = await Dt(I.datas);
7015
+ yn(I.datas, R.mime);
7023
7016
  } else
7024
- s(F);
7017
+ s(I);
7025
7018
  }, []), y = Ie(async (w) => {
7026
7019
  s(w);
7027
7020
  }, []);
@@ -7074,12 +7067,12 @@ function kc({ toolbar: e }) {
7074
7067
  duplicatingItem: p,
7075
7068
  setDuplicatingItem: y,
7076
7069
  setResults: w,
7077
- formIsLoading: F,
7078
- attachments: I,
7070
+ formIsLoading: I,
7071
+ attachments: R,
7079
7072
  formRef: S,
7080
7073
  setFormHasChanges: x,
7081
7074
  previousView: A,
7082
- setPreviousView: R,
7075
+ setPreviousView: F,
7083
7076
  goToResourceId: b
7084
7077
  } = H(it), { t: C, lang: _ } = H(he), T = H(
7085
7078
  Mt
@@ -7157,7 +7150,7 @@ function kc({ toolbar: e }) {
7157
7150
  y == null || y(!1);
7158
7151
  }
7159
7152
  }
7160
- const re = a || h || F || p;
7153
+ const re = a || h || I || p;
7161
7154
  function G(V) {
7162
7155
  O == null || O({
7163
7156
  actionData: V,
@@ -7170,7 +7163,7 @@ function kc({ toolbar: e }) {
7170
7163
  });
7171
7164
  }
7172
7165
  return r ? /* @__PURE__ */ D(Ue, { wrap: !0, children: [
7173
- F && /* @__PURE__ */ D(X, { children: [
7166
+ I && /* @__PURE__ */ D(X, { children: [
7174
7167
  /* @__PURE__ */ n(Ee, {}),
7175
7168
  Ft(),
7176
7169
  Ft()
@@ -7178,7 +7171,7 @@ function kc({ toolbar: e }) {
7178
7171
  /* @__PURE__ */ n(
7179
7172
  Vo,
7180
7173
  {
7181
- disabled: a || F || h || p
7174
+ disabled: a || I || h || p
7182
7175
  }
7183
7176
  ),
7184
7177
  /* @__PURE__ */ n(
@@ -7196,7 +7189,7 @@ function kc({ toolbar: e }) {
7196
7189
  {
7197
7190
  icon: /* @__PURE__ */ n(Xn, {}),
7198
7191
  tooltip: C("duplicate"),
7199
- disabled: s || a || l === void 0 || p || F,
7192
+ disabled: s || a || l === void 0 || p || I,
7200
7193
  loading: p,
7201
7194
  onClick: Z
7202
7195
  }
@@ -7206,7 +7199,7 @@ function kc({ toolbar: e }) {
7206
7199
  {
7207
7200
  icon: /* @__PURE__ */ n(zn, {}),
7208
7201
  tooltip: C("delete"),
7209
- disabled: a || l === void 0 || h || p || F,
7202
+ disabled: a || l === void 0 || h || p || I,
7210
7203
  loading: h,
7211
7204
  onClick: Y
7212
7205
  }
@@ -7217,7 +7210,7 @@ function kc({ toolbar: e }) {
7217
7210
  {
7218
7211
  icon: /* @__PURE__ */ n(Xr, {}),
7219
7212
  tooltip: C("showLogs"),
7220
- disabled: a || l === void 0 || h || p || F,
7213
+ disabled: a || l === void 0 || h || p || I,
7221
7214
  loading: !1,
7222
7215
  onClick: () => {
7223
7216
  Do(m, l, C);
@@ -7229,7 +7222,7 @@ function kc({ toolbar: e }) {
7229
7222
  {
7230
7223
  icon: /* @__PURE__ */ n(hn, {}),
7231
7224
  tooltip: C("refresh"),
7232
- disabled: a || l === void 0 || h || p || F,
7225
+ disabled: a || l === void 0 || h || p || I,
7233
7226
  loading: !1,
7234
7227
  onClick: () => {
7235
7228
  P(() => {
@@ -7246,7 +7239,7 @@ function kc({ toolbar: e }) {
7246
7239
  previousView: A,
7247
7240
  availableViews: t,
7248
7241
  onChangeView: (V) => {
7249
- R == null || R(r), x == null || x(!1), i == null || i(V);
7242
+ F == null || F(r), x == null || x(!1), i == null || i(V);
7250
7243
  },
7251
7244
  disabled: re,
7252
7245
  formHasChanges: s
@@ -7347,7 +7340,7 @@ function kc({ toolbar: e }) {
7347
7340
  Dc,
7348
7341
  {
7349
7342
  disabled: re,
7350
- attachments: I,
7343
+ attachments: R,
7351
7344
  onAddNewAttachment: async () => {
7352
7345
  const V = await It({
7353
7346
  onFormSave: o
@@ -7415,8 +7408,8 @@ const { useToken: Ec } = He, ko = (e) => {
7415
7408
  fe(() => {
7416
7409
  l && !g && y(!1), !r && !l && (h(!0), y(!0));
7417
7410
  }, [g, l]);
7418
- const w = (F) => {
7419
- i == null || i(F.target.value);
7411
+ const w = (I) => {
7412
+ i == null || i(I.target.value);
7420
7413
  };
7421
7414
  return /* @__PURE__ */ D(Re, { gutter: 8, wrap: !1, align: "middle", children: [
7422
7415
  l ? null : /* @__PURE__ */ n(de, { flex: "32px", children: g ? /* @__PURE__ */ n(
@@ -7749,12 +7742,12 @@ const Kc = (e) => {
7749
7742
  setSearchParams: p = void 0,
7750
7743
  searchVisible: y = !0,
7751
7744
  setSearchVisible: w = void 0,
7752
- sorter: F = void 0,
7753
- setSorter: I = void 0,
7745
+ sorter: I = void 0,
7746
+ setSorter: R = void 0,
7754
7747
  setTotalItems: S = void 0,
7755
7748
  setSearchTreeNameSearch: x = void 0,
7756
7749
  setTreeIsLoading: A = void 0,
7757
- limit: R,
7750
+ limit: F,
7758
7751
  setLimit: b,
7759
7752
  searchParams: C,
7760
7753
  searchValues: _,
@@ -7779,15 +7772,15 @@ const Kc = (e) => {
7779
7772
  context: o,
7780
7773
  formView: a,
7781
7774
  treeView: l,
7782
- sorter: F,
7783
- setSorter: I,
7775
+ sorter: I,
7776
+ setSorter: R,
7784
7777
  setCurrentItemIndex: u,
7785
7778
  setResultsActionView: f,
7786
7779
  resultsActionView: g,
7787
7780
  domain: s,
7788
7781
  currentId: m,
7789
7782
  setActionViewTotalItems: S,
7790
- limit: R,
7783
+ limit: F,
7791
7784
  setLimit: b
7792
7785
  });
7793
7786
  return !r || !t ? null : /* @__PURE__ */ D(X, { children: [
@@ -7807,7 +7800,7 @@ const Kc = (e) => {
7807
7800
  a.search_fields,
7808
7801
  l.search_fields
7809
7802
  ]),
7810
- limit: R,
7803
+ limit: F,
7811
7804
  onClear: z,
7812
7805
  offset: W,
7813
7806
  isSearching: P,
@@ -7828,7 +7821,7 @@ const Kc = (e) => {
7828
7821
  model: i,
7829
7822
  context: o,
7830
7823
  domain: Ut(C || [], s),
7831
- limit: $ ? R : void 0,
7824
+ limit: $ ? F : void 0,
7832
7825
  manualIds: $ ? g == null ? void 0 : g.map((Y) => Y.id) : void 0
7833
7826
  }
7834
7827
  )
@@ -7938,12 +7931,12 @@ function qc(e) {
7938
7931
  setSearchVisible: p,
7939
7932
  setSearchTreeNameSearch: y,
7940
7933
  searchTreeNameSearch: w,
7941
- treeIsLoading: F,
7942
- setPreviousView: I,
7934
+ treeIsLoading: I,
7935
+ setPreviousView: R,
7943
7936
  previousView: S,
7944
7937
  results: x,
7945
7938
  limit: A,
7946
- totalItems: R
7939
+ totalItems: F
7947
7940
  } = H(it), { parentContext: b = {}, treeExpandable: C, toolbar: _ } = e, T = Gc(
7948
7941
  No.FEATURE_ADVANCED_EXPORT
7949
7942
  ), { t: O, lang: $ } = H(he), E = H(
@@ -8008,7 +8001,7 @@ function qc(e) {
8008
8001
  });
8009
8002
  }
8010
8003
  return /* @__PURE__ */ D(Ue, { wrap: !0, children: [
8011
- F && /* @__PURE__ */ D(X, { children: [
8004
+ I && /* @__PURE__ */ D(X, { children: [
8012
8005
  /* @__PURE__ */ n(Ee, {}),
8013
8006
  vt(),
8014
8007
  vt()
@@ -8017,7 +8010,7 @@ function qc(e) {
8017
8010
  /* @__PURE__ */ n(
8018
8011
  jc,
8019
8012
  {
8020
- disabled: l || a || F,
8013
+ disabled: l || a || I,
8021
8014
  searchText: w,
8022
8015
  onSearch: (G) => {
8023
8016
  G && G.trim().length > 0 ? y == null || y(G) : y == null || y(void 0);
@@ -8038,18 +8031,18 @@ function qc(e) {
8038
8031
  onClick: () => {
8039
8032
  p == null || p(!h);
8040
8033
  },
8041
- disabled: l || a || F,
8034
+ disabled: l || a || I,
8042
8035
  badgeNumber: g == null ? void 0 : g.length
8043
8036
  }
8044
8037
  ),
8045
8038
  vt(),
8046
- /* @__PURE__ */ n(Vo, { disabled: F }),
8039
+ /* @__PURE__ */ n(Vo, { disabled: I }),
8047
8040
  /* @__PURE__ */ n(
8048
8041
  Xe,
8049
8042
  {
8050
8043
  icon: /* @__PURE__ */ n(Xn, {}),
8051
8044
  tooltip: O("duplicate"),
8052
- disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || F,
8045
+ disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || I,
8053
8046
  loading: l,
8054
8047
  onClick: te
8055
8048
  }
@@ -8059,7 +8052,7 @@ function qc(e) {
8059
8052
  {
8060
8053
  icon: /* @__PURE__ */ n(zn, {}),
8061
8054
  tooltip: O("delete"),
8062
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || F,
8055
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
8063
8056
  loading: a,
8064
8057
  onClick: M
8065
8058
  }
@@ -8071,7 +8064,7 @@ function qc(e) {
8071
8064
  {
8072
8065
  icon: /* @__PURE__ */ n(Xr, {}),
8073
8066
  tooltip: O("showLogs"),
8074
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || F,
8067
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
8075
8068
  loading: !1,
8076
8069
  onClick: () => {
8077
8070
  Do(d, o[0].id, O);
@@ -8083,7 +8076,7 @@ function qc(e) {
8083
8076
  {
8084
8077
  icon: /* @__PURE__ */ n(hn, {}),
8085
8078
  tooltip: O("refresh"),
8086
- disabled: l || a || F,
8079
+ disabled: l || a || I,
8087
8080
  loading: !1,
8088
8081
  onClick: () => {
8089
8082
  var G;
@@ -8099,10 +8092,10 @@ function qc(e) {
8099
8092
  currentView: r,
8100
8093
  availableViews: t,
8101
8094
  onChangeView: (G) => {
8102
- I == null || I(r), i == null || i(G);
8095
+ R == null || R(r), i == null || i(G);
8103
8096
  },
8104
8097
  previousView: S,
8105
- disabled: F
8098
+ disabled: I
8106
8099
  }
8107
8100
  )
8108
8101
  ] }),
@@ -8112,7 +8105,7 @@ function qc(e) {
8112
8105
  {
8113
8106
  icon: /* @__PURE__ */ n(Gn, {}),
8114
8107
  placement: "bottomRight",
8115
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || F,
8108
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
8116
8109
  onRetrieveData: async () => [
8117
8110
  { label: O("actions"), items: _ == null ? void 0 : _.action }
8118
8111
  ],
@@ -8126,7 +8119,7 @@ function qc(e) {
8126
8119
  {
8127
8120
  icon: /* @__PURE__ */ n(qn, {}),
8128
8121
  placement: "bottomRight",
8129
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || F,
8122
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
8130
8123
  onRetrieveData: async () => [
8131
8124
  { label: O("reports"), items: _ == null ? void 0 : _.print }
8132
8125
  ],
@@ -8205,7 +8198,7 @@ function qc(e) {
8205
8198
  }
8206
8199
  N(!0);
8207
8200
  },
8208
- disabled: l || a || F || W
8201
+ disabled: l || a || I || W
8209
8202
  }
8210
8203
  ),
8211
8204
  /* @__PURE__ */ n(
@@ -8220,7 +8213,7 @@ function qc(e) {
8220
8213
  g || []
8221
8214
  ),
8222
8215
  limit: A,
8223
- totalRegisters: R || 0,
8216
+ totalRegisters: F || 0,
8224
8217
  selectedRegistersToExport: o,
8225
8218
  visibleRegisters: (x == null ? void 0 : x.length) || 0,
8226
8219
  context: b
@@ -8273,12 +8266,12 @@ const zc = (e) => {
8273
8266
  onRowClicked: (y) => {
8274
8267
  const { id: w } = y;
8275
8268
  f(w);
8276
- const F = d.findIndex((S) => S.id === w);
8277
- p == null || p(h), c(F);
8278
- const I = m.find(
8269
+ const I = d.findIndex((S) => S.id === w);
8270
+ p == null || p(h), c(I);
8271
+ const R = m.find(
8279
8272
  (S) => S.type === "form"
8280
8273
  );
8281
- u(I);
8274
+ u(R);
8282
8275
  }
8283
8276
  }
8284
8277
  )
@@ -8410,8 +8403,8 @@ function td(e, t) {
8410
8403
  action_type: h,
8411
8404
  treeExpandable: p = !1,
8412
8405
  limit: y
8413
- } = e, [w, F] = v(), [I, S] = v([]), [x, A] = v(!0), R = m || void 0, [b, C] = v(
8414
- R
8406
+ } = e, [w, I] = v(), [R, S] = v([]), [x, A] = v(!0), F = m || void 0, [b, C] = v(
8407
+ F
8415
8408
  ), [_, T] = v([]), [O, $] = v(), [E, z] = v([]), [P, N] = v(), [W, M] = v(0), [Y, te] = v(!1), [Z, re] = v(!1), [G, V] = v(), { t: L } = H(he) || {}, ie = ce(), q = ce(), pe = H(
8416
8409
  ut
8417
8410
  ), {
@@ -8433,7 +8426,7 @@ function td(e, t) {
8433
8426
  C(j), U == null || U(j);
8434
8427
  }
8435
8428
  function je(j) {
8436
- F(j), ee == null || ee(j);
8429
+ I(j), ee == null || ee(j);
8437
8430
  }
8438
8431
  yt(t, () => ({
8439
8432
  canWeClose: xe
@@ -8519,8 +8512,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8519
8512
  ), Pe == null || Pe(c)), je(We), S(j), A(!1);
8520
8513
  };
8521
8514
  l({ tabKey: c, canWeClose: xe }), fe(() => {
8522
- const j = I.find((_e) => _e.type === "tree"), Ce = I.find((_e) => d.id ? _e.type === d.type && _e.view_id === d.id : _e.type === d.type);
8523
- je(Ce || j), m ? U == null || U(R) : (De(void 0), $(void 0)), Se();
8515
+ const j = R.find((_e) => _e.type === "tree"), Ce = R.find((_e) => d.id ? _e.type === d.type && _e.view_id === d.id : _e.type === d.type);
8516
+ je(Ce || j), m ? U == null || U(F) : (De(void 0), $(void 0)), Se();
8524
8517
  }, [i, s, m]), fe(() => {
8525
8518
  ve === c && (U == null || U(b), ee == null || ee(w));
8526
8519
  }, [ge, ve]);
@@ -8571,7 +8564,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8571
8564
  });
8572
8565
  }
8573
8566
  function Ne() {
8574
- return I.map((j) => {
8567
+ return R.map((j) => {
8575
8568
  switch (j.type) {
8576
8569
  case "form":
8577
8570
  return /* @__PURE__ */ n(
@@ -8601,11 +8594,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8601
8594
  model: i,
8602
8595
  context: o,
8603
8596
  domain: r,
8604
- formView: I.find((Ce) => Ce.type === "form"),
8597
+ formView: R.find((Ce) => Ce.type === "form"),
8605
8598
  treeView: j,
8606
8599
  searchTreeRef: q,
8607
8600
  searchTreeNameSearch: G,
8608
- availableViews: I,
8601
+ availableViews: R,
8609
8602
  results: E,
8610
8603
  setCurrentItemIndex: $,
8611
8604
  setCurrentId: De,
@@ -8622,8 +8615,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8622
8615
  model: i,
8623
8616
  context: o,
8624
8617
  domain: r,
8625
- treeView: I.find((Ce) => Ce.type === "tree"),
8626
- formView: I.find((Ce) => Ce.type === "form")
8618
+ treeView: R.find((Ce) => Ce.type === "tree"),
8619
+ formView: R.find((Ce) => Ce.type === "form")
8627
8620
  },
8628
8621
  `${j.type}-${j.view_id}`
8629
8622
  );
@@ -8644,7 +8637,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8644
8637
  ie.current.clearAndReload();
8645
8638
  else {
8646
8639
  De(void 0);
8647
- const j = I.find(
8640
+ const j = R.find(
8648
8641
  (Ce) => Ce.type === "form"
8649
8642
  );
8650
8643
  je(j);
@@ -8656,7 +8649,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8656
8649
  title: a,
8657
8650
  currentView: w,
8658
8651
  setCurrentView: je,
8659
- availableViews: I,
8652
+ availableViews: R,
8660
8653
  formRef: ie,
8661
8654
  searchTreeRef: q,
8662
8655
  onNewClicked: Ye,
@@ -8718,15 +8711,15 @@ async function nd({
8718
8711
  limit: u,
8719
8712
  view_type: m
8720
8713
  } = s, g = m === "tree", h = [];
8721
- for (const F of d) {
8722
- const [I, S] = F;
8723
- if (I)
8724
- h.push(F);
8714
+ for (const I of d) {
8715
+ const [R, S] = I;
8716
+ if (R)
8717
+ h.push(I);
8725
8718
  else {
8726
8719
  const { view_id: x } = await k.getHandler().getView({
8727
8720
  model: c,
8728
8721
  type: S,
8729
- id: I,
8722
+ id: R,
8730
8723
  context: { ...t, ...a }
8731
8724
  });
8732
8725
  h.push([x, S]);
@@ -8842,10 +8835,10 @@ function cd(e) {
8842
8835
  domain: s = [],
8843
8836
  visible: a = !0,
8844
8837
  parentContext: l = {}
8845
- } = e, [c, d] = v(!1), [f, u] = v(!1), [m, g] = v(), [h, p] = v(), [y, w] = v(), [F, I] = v(1), [S, x] = v(0), A = ce(ld), R = ce([]), [b, C] = v(0), [_, T] = v([]), [O, $] = v(void 0), [E, z] = v(), [P, N] = v(), [W, M] = v(), [Y, te] = v(!1), Z = ce([]), re = (U) => {
8846
- te(!0), I(U), x((U - 1) * A.current);
8838
+ } = e, [c, d] = v(!1), [f, u] = v(!1), [m, g] = v(), [h, p] = v(), [y, w] = v(), [I, R] = v(1), [S, x] = v(0), A = ce(ld), F = ce([]), [b, C] = v(0), [_, T] = v([]), [O, $] = v(void 0), [E, z] = v(), [P, N] = v(), [W, M] = v(), [Y, te] = v(!1), Z = ce([]), re = (U) => {
8839
+ te(!0), R(U), x((U - 1) * A.current);
8847
8840
  }, G = async () => {
8848
- const U = Z.current.length > 0 ? Z.current : s, ge = Ut(R.current, U), { colors: ve } = At(h), { totalItems: Ke, results: Pe, attrsEvaluated: De } = await k.getHandler().searchForTree({
8841
+ const U = Z.current.length > 0 ? Z.current : s, ge = Ut(F.current, U), { colors: ve } = At(h), { totalItems: Ke, results: Pe, attrsEvaluated: De } = await k.getHandler().searchForTree({
8849
8842
  params: ge,
8850
8843
  limit: A.current,
8851
8844
  offset: S,
@@ -8872,7 +8865,7 @@ function cd(e) {
8872
8865
  };
8873
8866
  fe(() => {
8874
8867
  f && a && V();
8875
- }, [F, S, f, a]);
8868
+ }, [I, S, f, a]);
8876
8869
  const L = async (U) => {
8877
8870
  u(!1), d(!0), M(void 0);
8878
8871
  try {
@@ -8922,7 +8915,7 @@ function cd(e) {
8922
8915
  showPagination: !1,
8923
8916
  total: b,
8924
8917
  limit: A.current,
8925
- page: F,
8918
+ page: I,
8926
8919
  treeView: h,
8927
8920
  results: _,
8928
8921
  onRequestPageChange: re,
@@ -8972,14 +8965,14 @@ function ud(e, t) {
8972
8965
  refresh: () => {
8973
8966
  w();
8974
8967
  },
8975
- configDashboard: R
8968
+ configDashboard: F
8976
8969
  }));
8977
8970
  async function w() {
8978
8971
  d(!0), m(!0), u(void 0);
8979
8972
  try {
8980
- const b = await F(), C = await S(b), _ = b.fields[On].relation, T = C[On].items;
8973
+ const b = await I(), C = await S(b), _ = b.fields[On].relation, T = C[On].items;
8981
8974
  y.current = b.fields;
8982
- const O = await I({
8975
+ const O = await R({
8983
8976
  items: T,
8984
8977
  model: _,
8985
8978
  context: i
@@ -8989,14 +8982,14 @@ function ud(e, t) {
8989
8982
  u(JSON.stringify(b));
8990
8983
  }
8991
8984
  }
8992
- async function F() {
8985
+ async function I() {
8993
8986
  return await k.getHandler().getView({
8994
8987
  model: r,
8995
8988
  type: "form",
8996
8989
  context: i
8997
8990
  });
8998
8991
  }
8999
- async function I({
8992
+ async function R({
9000
8993
  items: b,
9001
8994
  model: C,
9002
8995
  context: _
@@ -9085,7 +9078,7 @@ function ud(e, t) {
9085
9078
  context: i
9086
9079
  });
9087
9080
  }
9088
- async function R() {
9081
+ async function F() {
9089
9082
  g(s);
9090
9083
  }
9091
9084
  return f ? (console.log(f), /* @__PURE__ */ n(tt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : c ? /* @__PURE__ */ n(at, {}) : /* @__PURE__ */ n(od, { onPositionItemsChanged: A, children: a.map((b, C) => {
@@ -9217,11 +9210,11 @@ const fd = gt(ud), md = (e) => {
9217
9210
  const { ooui: t } = e;
9218
9211
  return /* @__PURE__ */ n(we, { type: "array", ...e, children: /* @__PURE__ */ n(hd, { ooui: t }) });
9219
9212
  }, hd = (e) => {
9220
- const { value: t, ooui: r, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((b) => b.operation !== "pendingRemove").map((b) => b.id), [a, l] = v([]), [c, d] = v(), [f, u] = v(!1), { relation: m, context: g, readOnly: h, field: p, columns: y } = r, w = H(Be), { getContext: F } = w || {};
9213
+ const { value: t, ooui: r, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((b) => b.operation !== "pendingRemove").map((b) => b.id), [a, l] = v([]), [c, d] = v(), [f, u] = v(!1), { relation: m, context: g, readOnly: h, field: p, columns: y } = r, w = H(Be), { getContext: I } = w || {};
9221
9214
  xt(() => {
9222
9215
  S();
9223
9216
  }, [o]);
9224
- const I = (b) => {
9217
+ const R = (b) => {
9225
9218
  i == null || i({
9226
9219
  items: b
9227
9220
  });
@@ -9246,7 +9239,7 @@ const fd = gt(ud), md = (e) => {
9246
9239
  model: m,
9247
9240
  params: b,
9248
9241
  fieldsToRetrieve: [p],
9249
- context: { ...F == null ? void 0 : F(), ...g }
9242
+ context: { ...I == null ? void 0 : I(), ...g }
9250
9243
  })).map((T) => {
9251
9244
  const O = T[p];
9252
9245
  let $ = O;
@@ -9262,17 +9255,17 @@ const fd = gt(ud), md = (e) => {
9262
9255
  return /* @__PURE__ */ n(tt, { className: "mt-10", message: c, type: "error", banner: !0 });
9263
9256
  }
9264
9257
  const x = () => {
9265
- R(a.map((b) => b.value));
9258
+ F(a.map((b) => b.value));
9266
9259
  }, A = () => {
9267
- R([]);
9268
- }, R = (b) => {
9260
+ F([]);
9261
+ }, F = (b) => {
9269
9262
  const C = o.map((T) => b.includes(T.id) ? T.operation == "pendingRemove" ? {
9270
9263
  ...T,
9271
9264
  operation: "original"
9272
9265
  } : T : { id: T.id, operation: "pendingRemove" }), _ = C.map((T) => T.id);
9273
9266
  b.filter((T) => !_.includes(T)).map((T) => {
9274
9267
  C.push({ id: T, operation: "pendingLink" });
9275
- }), I(C);
9268
+ }), R(C);
9276
9269
  };
9277
9270
  return f && a.length === 0 ? /* @__PURE__ */ n(Ee, {}) : /* @__PURE__ */ n(X, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
9278
9271
  /* @__PURE__ */ n(
@@ -9280,7 +9273,7 @@ const fd = gt(ud), md = (e) => {
9280
9273
  {
9281
9274
  value: a.length ? s : [],
9282
9275
  disabled: h,
9283
- onChange: R,
9276
+ onChange: F,
9284
9277
  style: { width: "100%" },
9285
9278
  children: /* @__PURE__ */ n(Re, { children: a.map((b) => /* @__PURE__ */ n(de, { span: Math.floor(24 / y), children: /* @__PURE__ */ n(Kt, { value: b.value, children: b.label }) })) })
9286
9279
  }
@@ -9437,7 +9430,7 @@ function Ed(e, t) {
9437
9430
  action: S,
9438
9431
  values: x,
9439
9432
  forced_values: A,
9440
- initialViewType: R,
9433
+ initialViewType: F,
9441
9434
  res_id: b,
9442
9435
  domain: C = []
9443
9436
  }) {
@@ -9482,16 +9475,16 @@ function Ed(e, t) {
9482
9475
  }
9483
9476
  }
9484
9477
  let G;
9485
- if (R) {
9478
+ if (F) {
9486
9479
  const [V, L] = re.find(
9487
- ([ie, q]) => q === R
9480
+ ([ie, q]) => q === F
9488
9481
  );
9489
9482
  G = { id: V, type: L };
9490
9483
  } else {
9491
9484
  const [V, L] = re[0];
9492
9485
  G = { id: V, type: L };
9493
9486
  }
9494
- I({
9487
+ R({
9495
9488
  domain: [...z, ...C],
9496
9489
  context: { ...o, ...E },
9497
9490
  model: P,
@@ -9512,7 +9505,7 @@ function Ed(e, t) {
9512
9505
  title: S,
9513
9506
  content: x,
9514
9507
  key: A,
9515
- action: R
9508
+ action: F
9516
9509
  }) {
9517
9510
  let b = [...c];
9518
9511
  c.length === 1 && c[0].key === "welcome" && (b = [...c.filter((C) => C.key !== "welcome")]), d([
@@ -9522,7 +9515,7 @@ function Ed(e, t) {
9522
9515
  key: A,
9523
9516
  closable: !0,
9524
9517
  content: x,
9525
- action: R
9518
+ action: F
9526
9519
  }
9527
9520
  ]), l(A);
9528
9521
  }
@@ -9530,7 +9523,7 @@ function Ed(e, t) {
9530
9523
  relateData: S,
9531
9524
  fields: x,
9532
9525
  values: A,
9533
- action_id: R,
9526
+ action_id: F,
9534
9527
  action_type: b
9535
9528
  }) {
9536
9529
  const {
@@ -9554,7 +9547,7 @@ function Ed(e, t) {
9554
9547
  fields: x,
9555
9548
  context: { ...o, ...M }
9556
9549
  }) : [];
9557
- I({
9550
+ R({
9558
9551
  model: C,
9559
9552
  target: $,
9560
9553
  views: O,
@@ -9562,13 +9555,13 @@ function Ed(e, t) {
9562
9555
  domain: Y,
9563
9556
  title: E,
9564
9557
  initialView: W,
9565
- action_id: R,
9558
+ action_id: F,
9566
9559
  action_type: b,
9567
9560
  limit: z
9568
9561
  });
9569
9562
  }
9570
9563
  async function w(S) {
9571
- const { action_id: x, action_type: A, res_id: R, view_id: b } = S, C = `${A},${x}`, _ = await k.getHandler().getActionData({
9564
+ const { action_id: x, action_type: A, res_id: F, view_id: b } = S, C = `${A},${x}`, _ = await k.getHandler().getActionData({
9572
9565
  action: C,
9573
9566
  context: o
9574
9567
  }), T = bt({
@@ -9610,7 +9603,7 @@ function Ed(e, t) {
9610
9603
  } else
9611
9604
  [te, Z] = Y.find((G) => G[0] === void 0 ? !1 : G[0] === b);
9612
9605
  const re = { id: te, type: Z };
9613
- I({
9606
+ R({
9614
9607
  domain: O,
9615
9608
  context: { ...o, ...T },
9616
9609
  model: $,
@@ -9620,16 +9613,16 @@ function Ed(e, t) {
9620
9613
  initialView: re,
9621
9614
  action_id: x,
9622
9615
  action_type: A,
9623
- res_id: R,
9616
+ res_id: F,
9624
9617
  treeExpandable: M,
9625
9618
  limit: W
9626
9619
  });
9627
9620
  }
9628
- async function F({
9621
+ async function I({
9629
9622
  model: S,
9630
9623
  values: x,
9631
9624
  forced_values: A,
9632
- initialViewType: R,
9625
+ initialViewType: F,
9633
9626
  res_id: b,
9634
9627
  domain: C
9635
9628
  }) {
@@ -9638,16 +9631,16 @@ function Ed(e, t) {
9638
9631
  action: _,
9639
9632
  values: x,
9640
9633
  forced_values: A,
9641
- initialViewType: R,
9634
+ initialViewType: F,
9642
9635
  res_id: b,
9643
9636
  domain: C
9644
9637
  });
9645
9638
  }
9646
- async function I({
9639
+ async function R({
9647
9640
  domain: S,
9648
9641
  context: x,
9649
9642
  model: A,
9650
- views: R,
9643
+ views: F,
9651
9644
  title: b,
9652
9645
  target: C,
9653
9646
  initialView: _,
@@ -9694,7 +9687,7 @@ function Ed(e, t) {
9694
9687
  action_type: O,
9695
9688
  tabKey: W,
9696
9689
  title: b,
9697
- views: R,
9690
+ views: F,
9698
9691
  model: A,
9699
9692
  context: { ...o, ...x },
9700
9693
  domain: S,
@@ -9715,9 +9708,9 @@ function Ed(e, t) {
9715
9708
  Ra,
9716
9709
  {
9717
9710
  openShortcut: w,
9718
- openAction: I,
9711
+ openAction: R,
9719
9712
  openRelate: y,
9720
- openDefaultActionForModel: F,
9713
+ openDefaultActionForModel: I,
9721
9714
  tabs: c,
9722
9715
  activeKey: a,
9723
9716
  onRemoveTab: async (S) => {
@@ -9852,18 +9845,18 @@ const { useToken: $d } = He, Ou = (e) => {
9852
9845
  } = e, [s, a] = v(!1), [l, c] = v(!1), [d, f] = v([]), [u, m] = v(!0), [g, h] = v(), { t: p } = H(he) || {}, { token: y } = $d(), w = H(
9853
9846
  ut
9854
9847
  ), {
9855
- openShortcut: F,
9856
- tabs: I,
9848
+ openShortcut: I,
9849
+ tabs: R,
9857
9850
  activeKey: S,
9858
9851
  currentView: x,
9859
9852
  currentId: A,
9860
- openDefaultActionForModel: R
9853
+ openDefaultActionForModel: F
9861
9854
  } = w || {};
9862
9855
  fe(() => {
9863
9856
  b();
9864
9857
  }, []), fe(() => {
9865
9858
  T();
9866
- }, [I, S, x, A]);
9859
+ }, [R, S, x, A]);
9867
9860
  async function b() {
9868
9861
  try {
9869
9862
  m(!0);
@@ -9877,7 +9870,7 @@ const { useToken: $d } = He, Ou = (e) => {
9877
9870
  }
9878
9871
  function C(P) {
9879
9872
  const { key: N } = P, W = d.find((M) => M.id === Number(N));
9880
- (W == null ? void 0 : W.action_type) !== "ir.actions.wizard" && (W && F(W), c(!1));
9873
+ (W == null ? void 0 : W.action_type) !== "ir.actions.wizard" && (W && I(W), c(!1));
9881
9874
  }
9882
9875
  function _(P) {
9883
9876
  P && b(), c(P);
@@ -9885,7 +9878,7 @@ const { useToken: $d } = He, Ou = (e) => {
9885
9878
  async function T() {
9886
9879
  if (!x)
9887
9880
  return;
9888
- const P = I.find((Z) => Z.key === S), { id: N, type: W } = (P == null ? void 0 : P.action) || {};
9881
+ const P = R.find((Z) => Z.key === S), { id: N, type: W } = (P == null ? void 0 : P.action) || {};
9889
9882
  if (!N || !W) {
9890
9883
  a(!1);
9891
9884
  return;
@@ -9902,7 +9895,7 @@ const { useToken: $d } = He, Ou = (e) => {
9902
9895
  te !== !1 && h(te), a(te !== !1);
9903
9896
  }
9904
9897
  async function O() {
9905
- c(!1), R == null || R({ model: "ir.ui.view_sc" });
9898
+ c(!1), F == null || F({ model: "ir.ui.view_sc" });
9906
9899
  }
9907
9900
  const $ = /* @__PURE__ */ D(Ht, { onClick: C, children: [
9908
9901
  /* @__PURE__ */ D("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
@@ -9936,7 +9929,7 @@ const { useToken: $d } = He, Ou = (e) => {
9936
9929
  else {
9937
9930
  if (!x)
9938
9931
  return;
9939
- const P = I.find((te) => te.key === S), { id: N, type: W } = (P == null ? void 0 : P.action) || {}, M = x.view_id;
9932
+ const P = R.find((te) => te.key === S), { id: N, type: W } = (P == null ? void 0 : P.action) || {}, M = x.view_id;
9940
9933
  let Y = !1;
9941
9934
  if (!N || !W) {
9942
9935
  a(!1);