@gisce/react-ooui 2.5.0-alpha.12 → 2.5.0-alpha.13

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.
@@ -98,7 +98,7 @@ function Ce({
98
98
  );
99
99
  if (!o)
100
100
  return h();
101
- const y = /* @__PURE__ */ r(
101
+ const g = /* @__PURE__ */ r(
102
102
  mn,
103
103
  {
104
104
  ooui: new Et({
@@ -111,10 +111,10 @@ function Ce({
111
111
  }
112
112
  );
113
113
  return n === "horizontal" ? (() => /* @__PURE__ */ k(Oe, { align: "middle", className: "pb-1 pt-1", children: [
114
- /* @__PURE__ */ r(ue, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children: y }) }),
114
+ /* @__PURE__ */ r(ue, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children: g }) }),
115
115
  /* @__PURE__ */ r(ue, { flex: "auto", children: h() })
116
116
  ] }))() : (() => /* @__PURE__ */ k(Q, { children: [
117
- y,
117
+ g,
118
118
  h()
119
119
  ] }))();
120
120
  }
@@ -148,7 +148,7 @@ const { confirm: hs } = Je, Gt = ({
148
148
  fetchValues: m,
149
149
  formHasChanges: p,
150
150
  elementHasLostFocus: h,
151
- getFields: y
151
+ getFields: g
152
152
  } = e;
153
153
  return /* @__PURE__ */ r(
154
154
  Be.Provider,
@@ -157,7 +157,7 @@ const { confirm: hs } = Je, Gt = ({
157
157
  domain: f,
158
158
  getValues: d,
159
159
  getPlainValues: u,
160
- getFields: y,
160
+ getFields: g,
161
161
  activeId: n,
162
162
  activeModel: i,
163
163
  setFieldValue: o,
@@ -307,21 +307,21 @@ const no = (e) => {
307
307
  context: d,
308
308
  readOnly: u
309
309
  } = t, f = ne(Be), { executeButtonAction: c } = f || {}, [m, p] = b(!1), { t: h } = we();
310
- async function y() {
310
+ async function g() {
311
311
  p(!0), await c({ type: s, action: n, context: d }), p(!1);
312
312
  }
313
- function g() {
313
+ function y() {
314
314
  if (a) {
315
315
  Gt({
316
316
  confirmMessage: a,
317
317
  t: h,
318
318
  onOk: () => {
319
- y();
319
+ g();
320
320
  }
321
321
  });
322
322
  return;
323
323
  }
324
- y();
324
+ g();
325
325
  }
326
326
  function w() {
327
327
  if (m)
@@ -336,7 +336,7 @@ const no = (e) => {
336
336
  {
337
337
  block: !0,
338
338
  disabled: !o || u || m,
339
- onClick: g,
339
+ onClick: y,
340
340
  icon: w(),
341
341
  type: t.primary ? "primary" : "default",
342
342
  danger: t.danger,
@@ -355,9 +355,9 @@ const no = (e) => {
355
355
  primary: f,
356
356
  context: c,
357
357
  readOnly: m
358
- } = n || {}, p = ne(Be), { executeButtonAction: h } = p || {}, [y, g] = b(!1), { t: w } = we();
358
+ } = n || {}, p = ne(Be), { executeButtonAction: h } = p || {}, [g, y] = b(!1), { t: w } = we();
359
359
  function C() {
360
- if (y)
360
+ if (g)
361
361
  return /* @__PURE__ */ r(st, {});
362
362
  if (u) {
363
363
  const R = dt(u);
@@ -365,7 +365,7 @@ const no = (e) => {
365
365
  }
366
366
  }
367
367
  async function x() {
368
- l && o && (g(!0), await h({ type: l, action: o, context: c }), g(!1));
368
+ l && o && (y(!0), await h({ type: l, action: o, context: c }), y(!1));
369
369
  }
370
370
  function S() {
371
371
  if (d) {
@@ -420,9 +420,9 @@ const no = (e) => {
420
420
  context: m,
421
421
  readOnly: p,
422
422
  danger: h
423
- } = s, [y, g] = b(!1);
423
+ } = s, [g, y] = b(!1);
424
424
  async function w() {
425
- g(!0), await i({ type: u, action: a, context: m }), g(!1);
425
+ y(!0), await i({ type: u, action: a, context: m }), y(!1);
426
426
  }
427
427
  function C() {
428
428
  if (f) {
@@ -438,7 +438,7 @@ const no = (e) => {
438
438
  w();
439
439
  }
440
440
  function x() {
441
- if (y)
441
+ if (g)
442
442
  return /* @__PURE__ */ r(st, {});
443
443
  if (c) {
444
444
  const S = dt(c);
@@ -521,9 +521,9 @@ const ro = (e) => {
521
521
  content: t
522
522
  });
523
523
  }, oo = (e) => {
524
- const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = we(), [u, f] = b([]), [c, m] = b(!1), [p, h] = b(!1), [y, g] = b({}), w = ae();
524
+ const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = we(), [u, f] = b([]), [c, m] = b(!1), [p, h] = b(!1), [g, y] = b({}), w = ae();
525
525
  pe(() => {
526
- t ? C() : g({});
526
+ t ? C() : y({});
527
527
  }, [t]);
528
528
  async function C() {
529
529
  m(!0);
@@ -557,7 +557,7 @@ const ro = (e) => {
557
557
  }))[0];
558
558
  T[_.code] = v[s] || "";
559
559
  }
560
- w.current = T, g(T);
560
+ w.current = T, y(T);
561
561
  }
562
562
  function R() {
563
563
  return u.map((F, T) => /* @__PURE__ */ k(Oe, { style: { paddingBottom: 20 }, children: [
@@ -566,10 +566,10 @@ const ro = (e) => {
566
566
  Ni,
567
567
  {
568
568
  rows: 4,
569
- value: y[F.code] || "",
569
+ value: g[F.code] || "",
570
570
  onChange: (_) => {
571
- g({
572
- ...y,
571
+ y({
572
+ ...g,
573
573
  [F.code]: _.target.value
574
574
  });
575
575
  },
@@ -581,11 +581,11 @@ const ro = (e) => {
581
581
  async function V() {
582
582
  h(!0);
583
583
  try {
584
- for (const F of Object.keys(y))
585
- y[F] !== w.current[F] && await E.getHandler().update({
584
+ for (const F of Object.keys(g))
585
+ g[F] !== w.current[F] && await E.getHandler().update({
586
586
  model: i,
587
587
  id: o,
588
- values: { [s]: y[F] },
588
+ values: { [s]: g[F] },
589
589
  context: {
590
590
  lang: F
591
591
  },
@@ -984,7 +984,7 @@ function Ks(e) {
984
984
  return !1;
985
985
  }
986
986
  const Zn = async (e) => {
987
- var y;
987
+ var g;
988
988
  const {
989
989
  items: t,
990
990
  model: n,
@@ -993,21 +993,21 @@ const Zn = async (e) => {
993
993
  context: s,
994
994
  currentView: a = {}
995
995
  } = e, l = ["original", "pendingLink"], d = t.filter(
996
- (g) => !l.includes(g.operation)
997
- ), u = t.filter((g) => l.includes(g.operation)).map((g) => g.id), f = {
996
+ (y) => !l.includes(y.operation)
997
+ ), u = t.filter((y) => l.includes(y.operation)).map((y) => y.id), f = {
998
998
  form: i.fields,
999
999
  tree: o.fields
1000
1000
  };
1001
1001
  let c = [], m;
1002
1002
  if (a === "tree" && (o != null && o.arch)) {
1003
- const g = (y = At(o)) == null ? void 0 : y.colors, w = await E.getHandler().readEvalUiObjects({
1003
+ const y = (g = At(o)) == null ? void 0 : g.colors, w = await E.getHandler().readEvalUiObjects({
1004
1004
  model: n,
1005
1005
  ids: u,
1006
1006
  arch: o == null ? void 0 : o.arch,
1007
1007
  fields: o.fields,
1008
1008
  context: s,
1009
- attrs: g && {
1010
- colors: g
1009
+ attrs: y && {
1010
+ colors: y
1011
1011
  }
1012
1012
  });
1013
1013
  c = w[0], m = nn(w[1]);
@@ -1018,18 +1018,18 @@ const Zn = async (e) => {
1018
1018
  fields: f[a],
1019
1019
  context: s
1020
1020
  });
1021
- const p = c.map((g) => {
1021
+ const p = c.map((y) => {
1022
1022
  const w = {};
1023
- return Object.keys(g).forEach((C) => {
1024
- (f[a].hasOwnProperty(C) || C === "id") && (w[C] = g[C]);
1023
+ return Object.keys(y).forEach((C) => {
1024
+ (f[a].hasOwnProperty(C) || C === "id") && (w[C] = y[C]);
1025
1025
  }), w;
1026
1026
  });
1027
1027
  return [
1028
- t.map((g) => {
1028
+ t.map((y) => {
1029
1029
  const w = p.find(
1030
- (x) => x.id === g.id
1030
+ (x) => x.id === y.id
1031
1031
  ), C = {
1032
- ...g
1032
+ ...y
1033
1033
  };
1034
1034
  return a === "form" ? C.values = w : a === "tree" && (C.treeValues = w), C;
1035
1035
  }).concat(d),
@@ -1069,24 +1069,24 @@ const Zn = async (e) => {
1069
1069
  Ft(() => {
1070
1070
  h();
1071
1071
  }, [t]);
1072
- const p = async (y) => o && o[y] ? o[y] : await E.getHandler().getView({
1072
+ const p = async (g) => o && o[g] ? o[g] : await E.getHandler().getView({
1073
1073
  model: n,
1074
- type: y,
1074
+ type: g,
1075
1075
  context: { ...m == null ? void 0 : m(), ...i }
1076
1076
  }), h = async () => {
1077
1077
  a(!0), d(void 0);
1078
1078
  try {
1079
- const y = await p("form"), g = await p("tree");
1080
- u.set("form", y), u.set("tree", g), f(u);
1081
- } catch (y) {
1082
- d(y);
1079
+ const g = await p("form"), y = await p("tree");
1080
+ u.set("form", g), u.set("tree", y), f(u);
1081
+ } catch (g) {
1082
+ d(g);
1083
1083
  } finally {
1084
1084
  a(!1);
1085
1085
  }
1086
1086
  };
1087
1087
  return s ? /* @__PURE__ */ r($e, {}) : l ? /* @__PURE__ */ r(Qe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(Gs, { ooui: t, views: u }) });
1088
1088
  }, Gs = (e) => {
1089
- const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = b(!1), [d, u] = b(), [f, c] = b(!1), [m, p] = b(), { relation: h, context: y, readOnly: g, summaryField: w, titleField: C } = i, x = s.filter((F) => F.values), S = ne(Be), { getContext: R } = S || {};
1089
+ const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = b(!1), [d, u] = b(), [f, c] = b(!1), [m, p] = b(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: C } = i, x = s.filter((F) => F.values), S = ne(Be), { getContext: R } = S || {};
1090
1090
  Ft(() => {
1091
1091
  D();
1092
1092
  }, [s]);
@@ -1108,7 +1108,7 @@ const Zn = async (e) => {
1108
1108
  },
1109
1109
  model: h,
1110
1110
  items: s,
1111
- context: { ...R == null ? void 0 : R(), ...y },
1111
+ context: { ...R == null ? void 0 : R(), ...g },
1112
1112
  currentView: "form"
1113
1113
  });
1114
1114
  V(F);
@@ -1165,11 +1165,11 @@ const Zn = async (e) => {
1165
1165
  onSubmitSucceed: () => {
1166
1166
  c(!1);
1167
1167
  },
1168
- parentContext: { ...R == null ? void 0 : R(), ...y },
1168
+ parentContext: { ...R == null ? void 0 : R(), ...g },
1169
1169
  onCancel: () => {
1170
1170
  c(!1);
1171
1171
  },
1172
- readOnly: g,
1172
+ readOnly: y,
1173
1173
  postSaveAction: D
1174
1174
  }
1175
1175
  )
@@ -1354,7 +1354,7 @@ const Nt = ({
1354
1354
  const { ooui: t } = e;
1355
1355
  return /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(ia, { ooui: t }) });
1356
1356
  }, ia = (e) => {
1357
- const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: y } = n, g = ne(Be), { getContext: w } = g || {};
1357
+ const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: g } = n, y = ne(Be), { getContext: w } = y || {};
1358
1358
  Ft(() => {
1359
1359
  x();
1360
1360
  }, [o]);
@@ -1371,21 +1371,21 @@ const Nt = ({
1371
1371
  const T = await E.getHandler().evalDomain({
1372
1372
  domain: n.domain,
1373
1373
  values: Nt({
1374
- fields: g == null ? void 0 : g.getFields(),
1375
- values: g.getPlainValues()
1374
+ fields: y == null ? void 0 : y.getFields(),
1375
+ values: y.getPlainValues()
1376
1376
  }),
1377
- fields: g == null ? void 0 : g.getFields(),
1378
- context: g.getContext()
1377
+ fields: y == null ? void 0 : y.getFields(),
1378
+ context: y.getContext()
1379
1379
  });
1380
1380
  V = [...V, ...T];
1381
1381
  }
1382
1382
  const F = (await E.getHandler().search({
1383
1383
  model: m,
1384
1384
  params: V,
1385
- fieldsToRetrieve: [y],
1385
+ fieldsToRetrieve: [g],
1386
1386
  context: { ...w == null ? void 0 : w(), ...p }
1387
1387
  })).map((T) => {
1388
- const _ = T[y];
1388
+ const _ = T[g];
1389
1389
  let v = _;
1390
1390
  return Array.isArray(_) && (v = _[1]), { label: v, value: T.id };
1391
1391
  });
@@ -1567,28 +1567,28 @@ const Nt = ({
1567
1567
  s < o && (o = s);
1568
1568
  let a = !1, l = [];
1569
1569
  const d = i.map((c, m) => {
1570
- const p = c.filter((g) => !g.invisible), h = da({
1570
+ const p = c.filter((y) => !y.invisible), h = da({
1571
1571
  row: p,
1572
1572
  numberOfColumns: o
1573
1573
  });
1574
- let y = h;
1575
- return (m === 0 || !(c.length === 1 && c.some((g) => g.type === "group"))) && (y = ca({
1574
+ let g = h;
1575
+ return (m === 0 || !(c.length === 1 && c.some((y) => y.type === "group"))) && (g = ca({
1576
1576
  row: h,
1577
1577
  numberOfColumns: o,
1578
1578
  mustFillWithEmpties: n
1579
- }), l = l.concat(y)), y.map((g) => (g instanceof Et && g.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1579
+ }), l = l.concat(g)), g.map((y) => (y instanceof Et && y.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1580
1580
  "div",
1581
1581
  {
1582
1582
  style: {
1583
- ...la({ item: g, responsiveBehaviour: n }),
1583
+ ...la({ item: y, responsiveBehaviour: n }),
1584
1584
  minWidth: 0
1585
1585
  },
1586
1586
  children: aa({
1587
- ooui: g,
1587
+ ooui: y,
1588
1588
  responsiveBehaviour: n
1589
1589
  })
1590
1590
  },
1591
- g.key
1591
+ y.key
1592
1592
  )));
1593
1593
  }), u = i.length === 1 ? ua(l, o) : fa(o, a);
1594
1594
  return /* @__PURE__ */ r("div", { style: {
@@ -1657,8 +1657,8 @@ const Nt = ({
1657
1657
  results: m,
1658
1658
  currentItemIndex: p,
1659
1659
  setCurrentItemIndex: h,
1660
- currentModel: y,
1661
- sorter: g,
1660
+ currentModel: g,
1661
+ sorter: y,
1662
1662
  setSorter: w,
1663
1663
  totalItems: C,
1664
1664
  setTotalItems: x,
@@ -1714,7 +1714,7 @@ const Nt = ({
1714
1714
  setCurrentItemIndex: h,
1715
1715
  results: m,
1716
1716
  setResults: c,
1717
- currentModel: y,
1717
+ currentModel: g,
1718
1718
  removingItem: L,
1719
1719
  setRemovingItem: G,
1720
1720
  formIsLoading: B,
@@ -1731,7 +1731,7 @@ const Nt = ({
1731
1731
  searchParams: I,
1732
1732
  searchVisible: K,
1733
1733
  setSearchVisible: le,
1734
- sorter: g,
1734
+ sorter: y,
1735
1735
  setSorter: w,
1736
1736
  totalItems: C,
1737
1737
  setTotalItems: x,
@@ -1794,12 +1794,12 @@ const Nt = ({
1794
1794
  wt(t, () => ({
1795
1795
  openActionModal: S
1796
1796
  }));
1797
- const [m, p] = b(!1), [h, y] = b(
1797
+ const [m, p] = b(!1), [h, g] = b(
1798
1798
  {
1799
1799
  context: {}
1800
1800
  }
1801
1801
  );
1802
- async function g(D) {
1802
+ async function y(D) {
1803
1803
  const { reportData: F, fields: T, values: _, context: v = {} } = D, {
1804
1804
  context: O,
1805
1805
  model: A,
@@ -1854,7 +1854,7 @@ const Nt = ({
1854
1854
  }) {
1855
1855
  const { type: O } = D;
1856
1856
  if (f.current.push(v), O === "ir.actions.report.xml")
1857
- return await g({
1857
+ return await y({
1858
1858
  reportData: D,
1859
1859
  fields: F,
1860
1860
  values: T,
@@ -1940,7 +1940,7 @@ const Nt = ({
1940
1940
  context: _,
1941
1941
  actionData: v
1942
1942
  }) {
1943
- m ? R({ domain: D, model: F, formView: T, context: _, actionData: v }) : (y({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0));
1943
+ m ? R({ domain: D, model: F, formView: T, context: _, actionData: v }) : (g({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0));
1944
1944
  }
1945
1945
  async function R({
1946
1946
  domain: D,
@@ -1949,16 +1949,16 @@ const Nt = ({
1949
1949
  context: _,
1950
1950
  actionData: v
1951
1951
  }) {
1952
- y({
1952
+ g({
1953
1953
  domain: void 0,
1954
1954
  model: void 0,
1955
1955
  context: {},
1956
1956
  formView: void 0,
1957
1957
  actionData: void 0
1958
- }), p(!1), await new Promise((O) => setTimeout(O, 300)), y({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0);
1958
+ }), p(!1), await new Promise((O) => setTimeout(O, 300)), g({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0);
1959
1959
  }
1960
1960
  async function V() {
1961
- Sr(f.current), f.current = [], p(!1), y({
1961
+ Sr(f.current), f.current = [], p(!1), g({
1962
1962
  domain: void 0,
1963
1963
  model: void 0,
1964
1964
  context: {},
@@ -1997,7 +1997,7 @@ const Nt = ({
1997
1997
  visible: m,
1998
1998
  onSubmitSucceed: V,
1999
1999
  onCancel: () => {
2000
- Sr(f.current), f.current = [], p(!1), y({
2000
+ Sr(f.current), f.current = [], p(!1), g({
2001
2001
  domain: void 0,
2002
2002
  model: void 0,
2003
2003
  context: {},
@@ -2101,8 +2101,8 @@ function Ra(e, t) {
2101
2101
  submitMode: m = "api",
2102
2102
  values: p,
2103
2103
  formView: h,
2104
- postSaveAction: y,
2105
- insideButtonModal: g = !1,
2104
+ postSaveAction: g,
2105
+ insideButtonModal: y = !1,
2106
2106
  parentContext: w = {},
2107
2107
  actionDomain: C,
2108
2108
  visible: x = !0,
@@ -2306,7 +2306,7 @@ function Ra(e, t) {
2306
2306
  ids: [ie()],
2307
2307
  fields: P,
2308
2308
  context: w
2309
- }))[0], g)
2309
+ }))[0], y)
2310
2310
  return { values: J, defaultGetCalled: X };
2311
2311
  const be = await E.getHandler().search({
2312
2312
  params: [
@@ -2351,10 +2351,10 @@ function Ra(e, t) {
2351
2351
  });
2352
2352
  M.current = X, K.current = J;
2353
2353
  }
2354
- y && await y([ie()]), !g && H && (de == null || de(ie(), Ae(), te()));
2354
+ g && await g([ie()]), !y && H && (de == null || de(ie(), Ae(), te()));
2355
2355
  }, Lo = async (P) => {
2356
2356
  const { callOnSubmitSucceed: H = !0 } = P || {};
2357
- !g && H && (de == null || de(ie(), Ae(), te()));
2357
+ !y && H && (de == null || de(ie(), Ae(), te()));
2358
2358
  }, Zt = async (P) => {
2359
2359
  let H = !1;
2360
2360
  const { callOnSubmitSucceed: J = !0 } = P || {};
@@ -2513,7 +2513,7 @@ function Ra(e, t) {
2513
2513
  ...H
2514
2514
  }
2515
2515
  });
2516
- if (typeof J == "object" && J !== null && Object.keys(J).length === 0 && g)
2516
+ if (typeof J == "object" && J !== null && Object.keys(J).length === 0 && y)
2517
2517
  de == null || de(ie(), Ae(), te());
2518
2518
  else if (J.type && J.type === "ir.actions.act_window_close")
2519
2519
  de == null || de(ie(), Ae(), te());
@@ -2691,7 +2691,7 @@ const zt = yt(Ra), Jt = (e) => {
2691
2691
  isMenuAction: a = !1,
2692
2692
  actionData: l,
2693
2693
  ...d
2694
- } = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = b(i), [p, h] = b(!1), [y, g] = b(), { action_id: w, res_id: C, action_type: x, view_id: S } = l || {};
2694
+ } = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = b(i), [p, h] = b(!1), [g, y] = b(), { action_id: w, res_id: C, action_type: x, view_id: S } = l || {};
2695
2695
  pe(() => {
2696
2696
  a && R();
2697
2697
  }, [l, a]);
@@ -2702,12 +2702,12 @@ const zt = yt(Ra), Jt = (e) => {
2702
2702
  view_id: S,
2703
2703
  res_id: C || !1
2704
2704
  });
2705
- h(T !== !1), T !== !1 && g(T);
2705
+ h(T !== !1), T !== !1 && y(T);
2706
2706
  }
2707
2707
  async function V() {
2708
- if (p && y)
2708
+ if (p && g)
2709
2709
  await E.getHandler().removeFavourite({
2710
- shortcut_id: y
2710
+ shortcut_id: g
2711
2711
  });
2712
2712
  else {
2713
2713
  const { action_id: T, res_id: _, action_type: v, view_id: O } = l;
@@ -2934,7 +2934,7 @@ const { defaultAlgorithm: ka, defaultSeed: Ea } = He, Ma = ka(Ea), { Option: Na
2934
2934
  }), u = a && !s ? $a : Tt;
2935
2935
  function f(c) {
2936
2936
  const m = c.map((p) => {
2937
- const h = l.find(([y, g]) => p === g);
2937
+ const h = l.find(([g, y]) => p === y);
2938
2938
  return h && h[0];
2939
2939
  });
2940
2940
  if (m.length === 0) {
@@ -3122,18 +3122,18 @@ function go(e) {
3122
3122
  searchError: c,
3123
3123
  searchValues: m,
3124
3124
  showLimitOptions: p = !0
3125
- } = e, [h, y] = b(), [g, w] = b(), [C, x] = b(!1), S = ae(), { token: R } = Xa(), [V] = ct.useForm();
3125
+ } = e, [h, g] = b(), [y, w] = b(), [C, x] = b(!1), S = ae(), { token: R } = Xa(), [V] = ct.useForm();
3126
3126
  pe(() => {
3127
3127
  V.setFieldsValue(m);
3128
3128
  }, [m]);
3129
3129
  const D = () => {
3130
- if (!g)
3130
+ if (!y)
3131
3131
  return;
3132
- const _ = C ? g : h, v = _ == null ? void 0 : _.rows;
3132
+ const _ = C ? y : h, v = _ == null ? void 0 : _.rows;
3133
3133
  return v == null ? void 0 : v.map((O, A) => /* @__PURE__ */ r(Oe, { children: O.map((L, G) => /* @__PURE__ */ r(ue, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r(Ba, { field: L }) }, G)) }, A));
3134
3134
  };
3135
3135
  Ft(() => {
3136
- x(!1), S.current = new ui(n, t), S.current.parse(), y(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3136
+ x(!1), S.current = new ui(n, t), S.current.parse(), g(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3137
3137
  }, [t, n]);
3138
3138
  const F = D(), T = (_) => {
3139
3139
  var L;
@@ -3413,11 +3413,11 @@ const nl = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(wo,
3413
3413
  Pt
3414
3414
  ), { processAction: c } = f || {}, [m, p] = tt(
3415
3415
  E.getHandler().getView
3416
- ), [h, y] = tt(
3416
+ ), [h, g] = tt(
3417
3417
  E.getHandler().readObjects
3418
- ), g = fe(() => {
3419
- p(), y();
3420
- }, [p, y]), w = fe(async () => {
3418
+ ), y = fe(() => {
3419
+ p(), g();
3420
+ }, [p, g]), w = fe(async () => {
3421
3421
  var V;
3422
3422
  const x = await m({
3423
3423
  model: n,
@@ -3479,7 +3479,7 @@ const nl = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(wo,
3479
3479
  onRetrieveData: w,
3480
3480
  onItemClick: C,
3481
3481
  onOpenChange: (x) => {
3482
- x || g();
3482
+ x || y();
3483
3483
  }
3484
3484
  }
3485
3485
  );
@@ -3691,8 +3691,8 @@ const ll = (e) => {
3691
3691
  });
3692
3692
  s(
3693
3693
  m.map((p) => {
3694
- const { id: h, name: y } = p;
3695
- return { id: h, name: y };
3694
+ const { id: h, name: g } = p;
3695
+ return { id: h, name: g };
3696
3696
  })
3697
3697
  );
3698
3698
  } catch (m) {
@@ -3706,8 +3706,8 @@ const ll = (e) => {
3706
3706
  }, [e == null ? void 0 : e.items]);
3707
3707
  const c = De(
3708
3708
  () => o.map((m) => {
3709
- const { id: p, name: h } = m, y = Kt(h);
3710
- return /* @__PURE__ */ r(er, { color: y, children: h }, `${p}`);
3709
+ const { id: p, name: h } = m, g = Kt(h);
3710
+ return /* @__PURE__ */ r(er, { color: g, children: h }, `${p}`);
3711
3711
  }),
3712
3712
  [o]
3713
3713
  );
@@ -3757,8 +3757,8 @@ const ll = (e) => {
3757
3757
  onRowSelectionChange: m,
3758
3758
  scrollY: p,
3759
3759
  colorsForResults: h = {},
3760
- statusForResults: y = {},
3761
- onChangeSort: g,
3760
+ statusForResults: g = {},
3761
+ onChangeSort: y,
3762
3762
  sorter: w,
3763
3763
  onFetchChildrenForRecord: C,
3764
3764
  childField: x,
@@ -3865,13 +3865,13 @@ const ll = (e) => {
3865
3865
  if (h[z.id])
3866
3866
  return { color: h[z.id] };
3867
3867
  },
3868
- onRowStatus: Ks(y) ? (z) => {
3869
- if (y[z.id])
3870
- return /* @__PURE__ */ r(ii, { color: y[z.id] });
3868
+ onRowStatus: Ks(g) ? (z) => {
3869
+ if (g[z.id])
3870
+ return /* @__PURE__ */ r(ii, { color: g[z.id] });
3871
3871
  } : void 0,
3872
3872
  onRowDoubleClick: u,
3873
3873
  onRowSelectionChange: m,
3874
- onChangeSort: g,
3874
+ onChangeSort: y,
3875
3875
  sorter: w,
3876
3876
  readonly: V,
3877
3877
  expandableOpts: C ? {
@@ -3905,8 +3905,8 @@ const Co = (e) => {
3905
3905
  formView: m,
3906
3906
  sorter: p,
3907
3907
  setSorter: h,
3908
- setCurrentItemIndex: y,
3909
- setResultsActionView: g,
3908
+ setCurrentItemIndex: g,
3909
+ setResultsActionView: y,
3910
3910
  resultsActionView: w,
3911
3911
  domain: C,
3912
3912
  currentId: x,
@@ -3917,9 +3917,9 @@ const Co = (e) => {
3917
3917
  clearSelection: F
3918
3918
  } = e, [T, _] = b(!1), [v, O] = b(!1), [A, L] = b(), [G, B] = b(1), [q, N] = b(0), [Z, ee] = b(), [oe, U] = b([]), [$, I] = b(void 0), [M, K] = b(void 0), le = ae(S || St), z = ae([]), re = fe(
3919
3919
  (se) => {
3920
- g == null || g([...se]), U([...se]);
3920
+ y == null || y([...se]), U([...se]);
3921
3921
  },
3922
- [g]
3922
+ [y]
3923
3923
  ), ve = fe(() => w || oe, [w, oe]), W = fe(async () => {
3924
3924
  const se = await E.getHandler().nameSearch({
3925
3925
  model: t,
@@ -3945,9 +3945,9 @@ const Co = (e) => {
3945
3945
  sorter: p,
3946
3946
  fields: { ...c.fields, ...m.fields }
3947
3947
  }) : [...z.current];
3948
- re(he), de.length > 0 ? y == null || y(0) : y == null || y(void 0);
3948
+ re(he), de.length > 0 ? g == null || g(0) : g == null || g(void 0);
3949
3949
  } else
3950
- re([]), y == null || y(void 0);
3950
+ re([]), g == null || g(void 0);
3951
3951
  _(!1), d.current = !0;
3952
3952
  }, [
3953
3953
  re,
@@ -3959,7 +3959,7 @@ const Co = (e) => {
3959
3959
  c,
3960
3960
  m,
3961
3961
  p,
3962
- y,
3962
+ g,
3963
3963
  f
3964
3964
  ]), ce = fe(
3965
3965
  async (se) => {
@@ -3984,15 +3984,15 @@ const Co = (e) => {
3984
3984
  const Ae = ie.findIndex(
3985
3985
  (Y) => x === Y.id
3986
3986
  );
3987
- Ae === -1 ? y == null || y(0) : y == null || y(Ae);
3987
+ Ae === -1 ? g == null || g(0) : g == null || g(Ae);
3988
3988
  } else
3989
- y == null || y(void 0);
3989
+ g == null || g(void 0);
3990
3990
  _(!1);
3991
3991
  const je = await de;
3992
3992
  ee(je), f == null || f(je);
3993
3993
  },
3994
3994
  [
3995
- y,
3995
+ g,
3996
3996
  w,
3997
3997
  re,
3998
3998
  x,
@@ -4128,7 +4128,7 @@ function Fl(e, t) {
4128
4128
  rootTree: f = !1,
4129
4129
  parentContext: c = {},
4130
4130
  onChangeSelectedRowKeys: m
4131
- } = e, [p, h] = b(!1), [y, g] = b(!1), w = ae(!1), C = ae(null), [x, S] = b(), [R, V] = b(), [D, F] = b(), [T, _] = b(), [v, O] = b(200), A = ae(), { height: L } = hn(), G = ne(
4131
+ } = e, [p, h] = b(!1), [g, y] = b(!1), w = ae(!1), C = ae(null), [x, S] = b(), [R, V] = b(), [D, F] = b(), [T, _] = b(), [v, O] = b(200), A = ae(), { height: L } = hn(), G = ne(
4132
4132
  Pt
4133
4133
  ), { processAction: B } = G || {}, q = ne(
4134
4134
  rt
@@ -4208,12 +4208,12 @@ function Fl(e, t) {
4208
4208
  getFields: () => R == null ? void 0 : R.fields,
4209
4209
  getDomain: () => d
4210
4210
  })), pe(() => {
4211
- y && u && R && (w.current = !1, se());
4212
- }, [j, Ve, y, u, a, R]);
4211
+ g && u && R && (w.current = !1, se());
4212
+ }, [j, Ve, g, u, a, R]);
4213
4213
  const Re = async () => {
4214
- g(!1), h(!0), _(void 0), ce == null || ce(!0);
4214
+ y(!1), h(!0), _(void 0), ce == null || ce(!0);
4215
4215
  try {
4216
- await xe(), g(!0);
4216
+ await xe(), y(!0);
4217
4217
  } catch (Pe) {
4218
4218
  _(Pe), ce == null || ce(!1);
4219
4219
  } finally {
@@ -4377,15 +4377,15 @@ const xo = yt(Fl), So = (e) => {
4377
4377
  nameSearch: s,
4378
4378
  domain: a,
4379
4379
  context: l = {}
4380
- } = e, [d, u] = b(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = we(), [p, h] = b([]), y = async () => {
4380
+ } = e, [d, u] = b(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = we(), [p, h] = b([]), g = async () => {
4381
4381
  await new Promise((x) => setTimeout(x, 5)), n();
4382
- }, g = async (x) => {
4382
+ }, y = async (x) => {
4383
4383
  const { id: S } = x;
4384
4384
  i([S]);
4385
4385
  };
4386
4386
  function w() {
4387
4387
  if (p.length === 0) {
4388
- y();
4388
+ g();
4389
4389
  return;
4390
4390
  }
4391
4391
  i(p);
@@ -4396,7 +4396,7 @@ const xo = yt(Fl), So = (e) => {
4396
4396
  {
4397
4397
  model: o,
4398
4398
  nameSearch: s,
4399
- onRowClicked: g,
4399
+ onRowClicked: y,
4400
4400
  treeScrollY: c * 0.3,
4401
4401
  domain: a,
4402
4402
  parentContext: l,
@@ -4426,7 +4426,7 @@ const xo = yt(Fl), So = (e) => {
4426
4426
  children: m("ok")
4427
4427
  }
4428
4428
  ),
4429
- /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ut, {}), onClick: y, children: m("cancel") })
4429
+ /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ut, {}), onClick: g, children: m("cancel") })
4430
4430
  ] }) })
4431
4431
  ] });
4432
4432
  return /* @__PURE__ */ k(Q, { children: [
@@ -4438,7 +4438,7 @@ const xo = yt(Fl), So = (e) => {
4438
4438
  width: f,
4439
4439
  open: t && !d,
4440
4440
  closable: !0,
4441
- onCancel: y,
4441
+ onCancel: g,
4442
4442
  footer: null,
4443
4443
  destroyOnClose: !0,
4444
4444
  maskClosable: !1,
@@ -4452,10 +4452,10 @@ const xo = yt(Fl), So = (e) => {
4452
4452
  visible: d,
4453
4453
  parentContext: l,
4454
4454
  onSubmitSucceed: (x) => {
4455
- u(!1), y(), i([x]);
4455
+ u(!1), g(), i([x]);
4456
4456
  },
4457
4457
  onCancel: () => {
4458
- u(!1), y();
4458
+ u(!1), g();
4459
4459
  }
4460
4460
  }
4461
4461
  )
@@ -4485,7 +4485,7 @@ const xo = yt(Fl), So = (e) => {
4485
4485
  context: l,
4486
4486
  id: d,
4487
4487
  domain: u
4488
- } = i, f = o && !a ? { backgroundColor: To.colorPrimaryBg } : void 0, [c, m] = b(!1), [p, h] = b(!1), [y, g] = b(!1), [w, C] = b(), x = ae(!1), [S, R] = b(""), V = ae(), D = ne(Be), { domain: F, getValues: T, getFields: _, getContext: v, elementHasLostFocus: O } = D || {}, A = ae([]), [L, G] = b([]), B = t && t[0] || void 0, q = t && t[1] || "";
4488
+ } = i, f = o && !a ? { backgroundColor: To.colorPrimaryBg } : void 0, [c, m] = b(!1), [p, h] = b(!1), [g, y] = b(!1), [w, C] = b(), x = ae(!1), [S, R] = b(""), V = ae(), D = ne(Be), { domain: F, getValues: T, getFields: _, getContext: v, elementHasLostFocus: O } = D || {}, A = ae([]), [L, G] = b([]), B = t && t[0] || void 0, q = t && t[1] || "";
4489
4489
  pe(() => {
4490
4490
  !Array.isArray(t) && t && U(t);
4491
4491
  }, [t]), pe(() => {
@@ -4496,12 +4496,12 @@ const xo = yt(Fl), So = (e) => {
4496
4496
  }, Z = (K) => {
4497
4497
  V.current = K.target.value, N([void 0, ""]);
4498
4498
  }, ee = async () => {
4499
- if (!y && S !== q) {
4499
+ if (!g && S !== q) {
4500
4500
  if (await new Promise((K) => setTimeout(K, 100)), x.current) {
4501
4501
  N([void 0, ""]);
4502
4502
  return;
4503
4503
  }
4504
- g(!0);
4504
+ y(!0);
4505
4505
  try {
4506
4506
  if (A.current && A.current.length > 0)
4507
4507
  oe(V.current);
@@ -4516,7 +4516,7 @@ const xo = yt(Fl), So = (e) => {
4516
4516
  } catch (K) {
4517
4517
  on(K);
4518
4518
  } finally {
4519
- g(!1);
4519
+ y(!1);
4520
4520
  }
4521
4521
  }
4522
4522
  }, oe = async (K) => {
@@ -4532,7 +4532,7 @@ const xo = yt(Fl), So = (e) => {
4532
4532
  }
4533
4533
  C(K), m(!0);
4534
4534
  }, U = async (K) => {
4535
- g(!0);
4535
+ y(!0);
4536
4536
  try {
4537
4537
  const le = await E.getHandler().execute({
4538
4538
  action: "name_get",
@@ -4544,7 +4544,7 @@ const xo = yt(Fl), So = (e) => {
4544
4544
  } catch (le) {
4545
4545
  on(le);
4546
4546
  } finally {
4547
- g(!1);
4547
+ y(!1);
4548
4548
  }
4549
4549
  };
4550
4550
  async function $() {
@@ -4606,8 +4606,8 @@ const xo = yt(Fl), So = (e) => {
4606
4606
  /* @__PURE__ */ r(ue, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ r(
4607
4607
  ke,
4608
4608
  {
4609
- icon: y ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(Wn, {}),
4610
- disabled: a || y,
4609
+ icon: g ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(Wn, {}),
4610
+ disabled: a || g,
4611
4611
  onClick: () => {
4612
4612
  x.current = !0, oe(q);
4613
4613
  },
@@ -4687,7 +4687,7 @@ const xo = yt(Fl), So = (e) => {
4687
4687
  field: u,
4688
4688
  operator: f,
4689
4689
  manualIds: c
4690
- } = e, [m, p] = b(!1), [h, y] = b(), [g, w] = b(), [C, x] = b(), [S, R] = b(0), [V, D] = b(0), [F, T] = b(), [_, v] = b(), [O, A] = b(), [L] = tt(
4690
+ } = e, [m, p] = b(!1), [h, g] = b(), [y, w] = b(), [C, x] = b(), [S, R] = b(0), [V, D] = b(0), [F, T] = b(), [_, v] = b(), [O, A] = b(), [L] = tt(
4691
4691
  E.getHandler().searchAllIds
4692
4692
  ), [G] = tt(
4693
4693
  E.getHandler().readObjects
@@ -4757,7 +4757,7 @@ const xo = yt(Fl), So = (e) => {
4757
4757
  let U, $;
4758
4758
  try {
4759
4759
  const I = await Z({ domain: n, isTotal: !1 });
4760
- if (y(I), s) {
4760
+ if (g(I), s) {
4761
4761
  const M = await q({
4762
4762
  domain: s,
4763
4763
  values: {},
@@ -4805,7 +4805,7 @@ const xo = yt(Fl), So = (e) => {
4805
4805
  {
4806
4806
  value: h,
4807
4807
  total: C,
4808
- percent: g,
4808
+ percent: y,
4809
4809
  measureRef: U,
4810
4810
  height: S,
4811
4811
  width: V,
@@ -4902,7 +4902,7 @@ function El({
4902
4902
  `bold ${Math.floor(f * 1.03)}px sans-serif`
4903
4903
  );
4904
4904
  l && (h = h * 1.5), (h >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / h * f);
4905
- const y = l && dt(l, { style: { fontSize: f } });
4905
+ const g = l && dt(l, { style: { fontSize: f } });
4906
4906
  return /* @__PURE__ */ r(
4907
4907
  "div",
4908
4908
  {
@@ -4918,9 +4918,9 @@ function El({
4918
4918
  padding: "0.2rem"
4919
4919
  },
4920
4920
  children: /* @__PURE__ */ k(Oe, { align: "middle", children: [
4921
- y && /* @__PURE__ */ r(ue, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(y, {}) }),
4921
+ g && /* @__PURE__ */ r(ue, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(g, {}) }),
4922
4922
  /* @__PURE__ */ k(ue, { children: [
4923
- /* @__PURE__ */ r(Vn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: y ? ` ${i}%` : `${i}%` }),
4923
+ /* @__PURE__ */ r(Vn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: g ? ` ${i}%` : `${i}%` }),
4924
4924
  /* @__PURE__ */ r(
4925
4925
  Vn,
4926
4926
  {
@@ -5079,7 +5079,7 @@ const { processGraphData: $l } = jr, { getFieldsToRetrieve: Bl } = hi, Hl = (e)
5079
5079
  limit: s,
5080
5080
  uninformedString: a,
5081
5081
  manualIds: l
5082
- } = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), [h, y] = b(), [g, w] = b("line"), [C] = tt(
5082
+ } = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), [h, g] = b(), [y, w] = b("line"), [C] = tt(
5083
5083
  E.getHandler().getFields
5084
5084
  ), [x] = tt(
5085
5085
  E.getHandler().readObjects
@@ -5113,12 +5113,12 @@ const { processGraphData: $l } = jr, { getFieldsToRetrieve: Bl } = hi, Hl = (e)
5113
5113
  return c("No values or fields returned"), u(!1), {
5114
5114
  loading: d,
5115
5115
  error: f,
5116
- type: g,
5116
+ type: y,
5117
5117
  values: m,
5118
5118
  evaluatedEntries: h,
5119
5119
  fetchData: R
5120
5120
  };
5121
- y(F);
5121
+ g(F);
5122
5122
  const _ = $l({
5123
5123
  ooui: V,
5124
5124
  values: F,
@@ -5146,14 +5146,14 @@ const { processGraphData: $l } = jr, { getFieldsToRetrieve: Bl } = hi, Hl = (e)
5146
5146
  m,
5147
5147
  x,
5148
5148
  S,
5149
- g,
5149
+ y,
5150
5150
  a,
5151
5151
  o
5152
5152
  ]);
5153
5153
  return {
5154
5154
  loading: d,
5155
5155
  error: f,
5156
- type: g,
5156
+ type: y,
5157
5157
  values: m,
5158
5158
  evaluatedEntries: h,
5159
5159
  fetchData: R
@@ -5194,7 +5194,7 @@ async function jl({
5194
5194
  fieldsToRetrieve: e,
5195
5195
  context: i
5196
5196
  });
5197
- return o && (p = [...p].sort((h, y) => h[o] - y[o])), {
5197
+ return o && (p = [...p].sort((h, g) => h[o] - g[o])), {
5198
5198
  values: p,
5199
5199
  fields: c
5200
5200
  };
@@ -5234,7 +5234,7 @@ const Wl = {
5234
5234
  return /* @__PURE__ */ r(Qe, { message: "No data to display", type: "info" });
5235
5235
  if (d)
5236
5236
  return /* @__PURE__ */ r(Qe, { message: d, type: "error", banner: !0 });
5237
- const { data: h, isGroup: y, isStack: g } = f, w = Wl[c];
5237
+ const { data: h, isGroup: g, isStack: y } = f, w = Wl[c];
5238
5238
  return w ? /* @__PURE__ */ k("div", { style: { padding: "1rem" }, children: [
5239
5239
  /* @__PURE__ */ r("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(C = m == null ? void 0 : m.length) == null ? void 0 : C.toLocaleString(
5240
5240
  "es-ES",
@@ -5248,8 +5248,8 @@ const Wl = {
5248
5248
  ...Yl({
5249
5249
  type: c,
5250
5250
  data: h,
5251
- isGroup: y,
5252
- isStack: g
5251
+ isGroup: g,
5252
+ isStack: y
5253
5253
  })
5254
5254
  }
5255
5255
  )
@@ -5263,7 +5263,7 @@ function Yl(e) {
5263
5263
  const Gl = (e, t) => {
5264
5264
  const { view_id: n, model: i, context: o, domain: s, limit: a, manualIds: l } = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), h = ne(
5265
5265
  rt
5266
- ), { setGraphIsLoading: y = void 0 } = h || {}, [g] = tt(E.getHandler().getView);
5266
+ ), { setGraphIsLoading: g = void 0 } = h || {}, [y] = tt(E.getHandler().getView);
5267
5267
  wt(t, () => ({
5268
5268
  refresh: () => {
5269
5269
  w();
@@ -5272,9 +5272,9 @@ const Gl = (e, t) => {
5272
5272
  w();
5273
5273
  }, [n]);
5274
5274
  async function w() {
5275
- u(!0), y == null || y(!0);
5275
+ u(!0), g == null || g(!0);
5276
5276
  try {
5277
- const C = await g({
5277
+ const C = await y({
5278
5278
  model: i,
5279
5279
  id: n,
5280
5280
  type: "graph",
@@ -5282,9 +5282,9 @@ const Gl = (e, t) => {
5282
5282
  });
5283
5283
  p(C.arch);
5284
5284
  const x = Bn(C.arch);
5285
- c(x), u(!1), y == null || y(!1);
5285
+ c(x), u(!1), g == null || g(!1);
5286
5286
  } catch (C) {
5287
- return console.error(C), u(!1), y == null || y(!1), /* @__PURE__ */ r(Q, { children: JSON.stringify(C) });
5287
+ return console.error(C), u(!1), g == null || g(!1), /* @__PURE__ */ r(Q, { children: JSON.stringify(C) });
5288
5288
  }
5289
5289
  }
5290
5290
  if (d)
@@ -5386,8 +5386,8 @@ const Gl = (e, t) => {
5386
5386
  onSearchItem: m,
5387
5387
  selectedRowKeys: p,
5388
5388
  showCreateButton: h,
5389
- showToggleButton: y
5390
- } = e, { token: g } = Ql();
5389
+ showToggleButton: g
5390
+ } = e, { token: y } = Ql();
5391
5391
  function w() {
5392
5392
  return /* @__PURE__ */ r("div", { className: "inline-block w-3" });
5393
5393
  }
@@ -5397,8 +5397,8 @@ const Gl = (e, t) => {
5397
5397
  {
5398
5398
  className: "flex flex-grow h-8 text-white",
5399
5399
  style: {
5400
- borderRadius: g.borderRadius,
5401
- backgroundColor: g.colorPrimaryActive
5400
+ borderRadius: y.borderRadius,
5401
+ backgroundColor: y.colorPrimaryActive
5402
5402
  },
5403
5403
  children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ r("span", { className: "pl-2 font-bold", children: t }) })
5404
5404
  }
@@ -5472,7 +5472,7 @@ const Gl = (e, t) => {
5472
5472
  s !== "graph" && x(),
5473
5473
  s === "form" && R(),
5474
5474
  w(),
5475
- y && /* @__PURE__ */ r(
5475
+ g && /* @__PURE__ */ r(
5476
5476
  ze,
5477
5477
  {
5478
5478
  tooltip: "Toggle view mode",
@@ -5498,7 +5498,7 @@ const nc = (e) => {
5498
5498
  var Ae;
5499
5499
  const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = ne(
5500
5500
  Ro
5501
- ), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain: y } = f || {}, { t: g } = we(), [w, C] = b(!1), [x, S] = b(!1), [R, V] = b(), [D, F] = b(!1), [T, _] = b(!1), [v, O] = b(), [A, L] = b([]), [G, B] = b(!1), q = ae([]), [N, Z] = b(), ee = ae(), [oe, U] = b(void 0), {
5501
+ ), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = we(), [w, C] = b(!1), [x, S] = b(!1), [R, V] = b(), [D, F] = b(!1), [T, _] = b(!1), [v, O] = b(), [A, L] = b([]), [G, B] = b(!1), q = ae([]), [N, Z] = b(), ee = ae(), [oe, U] = b(void 0), {
5502
5502
  readOnly: $,
5503
5503
  relation: I,
5504
5504
  context: M,
@@ -5518,7 +5518,7 @@ const nc = (e) => {
5518
5518
  }, [s, a]);
5519
5519
  pe(() => {
5520
5520
  Me();
5521
- }, [y]);
5521
+ }, [g]);
5522
5522
  const ce = (Y) => {
5523
5523
  var te, Re;
5524
5524
  n == null || n({
@@ -5560,9 +5560,9 @@ const nc = (e) => {
5560
5560
  }),
5561
5561
  fields: m(),
5562
5562
  context: h()
5563
- })), y && y.length > 0 && (q.current = q.current.concat(
5563
+ })), g && g.length > 0 && (q.current = q.current.concat(
5564
5564
  Kr({
5565
- domain: y,
5565
+ domain: g,
5566
5566
  widgetFieldName: z
5567
5567
  })
5568
5568
  ));
@@ -5601,7 +5601,7 @@ const nc = (e) => {
5601
5601
  ce(xe);
5602
5602
  }, se = (Y) => {
5603
5603
  w ? qt({
5604
- t: g,
5604
+ t: y,
5605
5605
  onOk: () => {
5606
5606
  Le(), Y(), C(!1);
5607
5607
  }
@@ -5609,7 +5609,7 @@ const nc = (e) => {
5609
5609
  }, _e = () => {
5610
5610
  if (le) {
5611
5611
  Xl({
5612
- t: g,
5612
+ t: y,
5613
5613
  onOk: () => {
5614
5614
  a === "form" ? j() : ge();
5615
5615
  }
@@ -5617,7 +5617,7 @@ const nc = (e) => {
5617
5617
  return;
5618
5618
  }
5619
5619
  zl({
5620
- t: g,
5620
+ t: y,
5621
5621
  onOk: () => {
5622
5622
  a === "form" ? j() : ge();
5623
5623
  }
@@ -5735,7 +5735,7 @@ const nc = (e) => {
5735
5735
  const ie = () => {
5736
5736
  var te, Re, xe, Se;
5737
5737
  if (a === "form")
5738
- return re.length === 0 ? g("noCurrentEntries") : a !== ve.current && s.some((Ie) => !Ie.values) ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
5738
+ return re.length === 0 ? y("noCurrentEntries") : a !== ve.current && s.some((Ie) => !Ie.values) ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
5739
5739
  zt,
5740
5740
  {
5741
5741
  formView: o.get("form"),
@@ -5864,25 +5864,25 @@ const nc = (e) => {
5864
5864
  }, rc = (e) => {
5865
5865
  const { ooui: t } = e, { mode: n, relation: i, views: o, required: s, context: a } = t;
5866
5866
  let l;
5867
- const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = ne(Be), { getContext: y } = h || {};
5867
+ const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = ne(Be), { getContext: g } = h || {};
5868
5868
  Ft(() => {
5869
5869
  w();
5870
5870
  }, [t]);
5871
- const g = async (x) => o && o[x] ? o[x] : await E.getHandler().getView({
5871
+ const y = async (x) => o && o[x] ? o[x] : await E.getHandler().getView({
5872
5872
  model: i,
5873
5873
  type: x,
5874
- context: { ...y == null ? void 0 : y(), ...a }
5874
+ context: { ...g == null ? void 0 : g(), ...a }
5875
5875
  }), w = async () => {
5876
5876
  u(!0), c(void 0);
5877
5877
  try {
5878
5878
  if (n && n.length > 0) {
5879
5879
  for (const x of n) {
5880
- const S = await g(x);
5880
+ const S = await y(x);
5881
5881
  m.set(x, S);
5882
5882
  }
5883
5883
  p(m);
5884
5884
  } else {
5885
- const x = await g("form"), S = await g("tree");
5885
+ const x = await y("form"), S = await y("tree");
5886
5886
  m.set("form", x), m.set("tree", S), p(m);
5887
5887
  }
5888
5888
  } catch (x) {
@@ -5921,10 +5921,10 @@ const nc = (e) => {
5921
5921
  const h = (w) => {
5922
5922
  i == null || i(w);
5923
5923
  };
5924
- function y(w) {
5924
+ function g(w) {
5925
5925
  u.current = w.target.value, c(w.target.value);
5926
5926
  }
5927
- async function g() {
5927
+ async function y() {
5928
5928
  h(tl(f)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
5929
5929
  }
5930
5930
  return /* @__PURE__ */ r(
@@ -5936,8 +5936,8 @@ const nc = (e) => {
5936
5936
  style: d,
5937
5937
  id: o,
5938
5938
  placeholder: "00:00",
5939
- onChange: y,
5940
- onBlur: g
5939
+ onChange: g,
5940
+ onBlur: y
5941
5941
  }
5942
5942
  );
5943
5943
  };
@@ -6112,25 +6112,25 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6112
6112
  onClose: s
6113
6113
  }) => {
6114
6114
  const a = ae({}), l = ae(/* @__PURE__ */ new Map()), { t: d } = we(), u = fe(
6115
- async (g) => {
6116
- if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
6115
+ async (y) => {
6116
+ if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
6117
6117
  ht(d("selectAtLeastOneField"));
6118
6118
  return;
6119
6119
  }
6120
6120
  let w = i;
6121
- g.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6121
+ y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6122
6122
  ["id", "in", n == null ? void 0 : n.map((S) => S.id)]
6123
6123
  ]);
6124
6124
  const { datas: C } = await E.getHandler().exportData({
6125
6125
  model: e,
6126
6126
  fields: vc({
6127
- keys: g.selectedKeys,
6127
+ keys: y.selectedKeys,
6128
6128
  fields: a.current
6129
6129
  }),
6130
6130
  domain: w,
6131
- limit: g.registersAmount === "all" ? 0 : o,
6131
+ limit: y.registersAmount === "all" ? 0 : o,
6132
6132
  context: t,
6133
- format: g.exportType
6133
+ format: y.exportType
6134
6134
  });
6135
6135
  s(), await new Promise((S) => setTimeout(S, 200));
6136
6136
  const x = await kt(C);
@@ -6138,15 +6138,15 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6138
6138
  },
6139
6139
  [i, n, e, o, t, s, d]
6140
6140
  ), f = fe(async () => {
6141
- const g = await E.getHandler().getFields({
6141
+ const y = await E.getHandler().getFields({
6142
6142
  model: e,
6143
6143
  context: t,
6144
6144
  fields: []
6145
6145
  });
6146
- return a.current["/"] = g, Vr({ fields: g });
6146
+ return a.current["/"] = y, Vr({ fields: y });
6147
6147
  }, [e, t, a]), c = fe(
6148
- async (g) => {
6149
- const C = Nn(g, a.current)[Mn(g)], x = C.relation, S = await E.getHandler().getFields({
6148
+ async (y) => {
6149
+ const C = Nn(y, a.current)[Mn(y)], x = C.relation, S = await E.getHandler().getFields({
6150
6150
  model: x,
6151
6151
  context: t,
6152
6152
  fields: []
@@ -6156,20 +6156,20 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6156
6156
  parentTitle: C.string,
6157
6157
  title: V.string
6158
6158
  });
6159
- return a.current[g] = S, Vr({
6159
+ return a.current[y] = S, Vr({
6160
6160
  fields: S,
6161
- parentKey: g
6161
+ parentKey: y
6162
6162
  });
6163
6163
  },
6164
6164
  [t]
6165
6165
  ), m = fe(async () => {
6166
- const g = await gc({ model: e, context: t }), w = await wc({
6167
- predefinedExports: g,
6166
+ const y = await gc({ model: e, context: t }), w = await wc({
6167
+ predefinedExports: y,
6168
6168
  fields: a.current,
6169
6169
  onGetFieldChilds: c
6170
6170
  });
6171
6171
  return {
6172
- predefinedExports: g.map((x) => ({
6172
+ predefinedExports: y.map((x) => ({
6173
6173
  ...x,
6174
6174
  fields: x.fields.map((S) => {
6175
6175
  const R = Mn(S.key), D = Nn(S.key, a.current)[R];
@@ -6184,39 +6184,39 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6184
6184
  keysWithChilds: w
6185
6185
  };
6186
6186
  }, [t, e, c]), p = fe(
6187
- async (g) => {
6187
+ async (y) => {
6188
6188
  await E.getHandler().deleteObjects({
6189
6189
  model: "ir.exports",
6190
- ids: [g.id],
6190
+ ids: [y.id],
6191
6191
  context: t
6192
6192
  });
6193
6193
  },
6194
6194
  [t]
6195
6195
  ), h = fe(
6196
- async (g) => {
6197
- if (l.current.has(g))
6198
- return l.current.get(g);
6196
+ async (y) => {
6197
+ if (l.current.has(y))
6198
+ return l.current.get(y);
6199
6199
  const w = E.getHandler().getFields({
6200
- model: g,
6200
+ model: y,
6201
6201
  context: t,
6202
6202
  fields: []
6203
6203
  });
6204
- l.current.set(g, w);
6204
+ l.current.set(y, w);
6205
6205
  },
6206
6206
  [l, t]
6207
- ), y = fe(
6208
- async (g) => {
6207
+ ), g = fe(
6208
+ async (y) => {
6209
6209
  const w = await h("ir.exports"), C = await h("ir.exports.line"), x = await E.getHandler().create({
6210
6210
  model: "ir.exports",
6211
6211
  values: {
6212
- name: g.name,
6212
+ name: y.name,
6213
6213
  resource: e
6214
6214
  },
6215
6215
  fields: w,
6216
6216
  context: t
6217
6217
  });
6218
6218
  return await Promise.all(
6219
- g.fields.map(async (S) => await E.getHandler().create({
6219
+ y.fields.map(async (S) => await E.getHandler().create({
6220
6220
  model: "ir.exports.line",
6221
6221
  values: {
6222
6222
  name: S.key,
@@ -6225,7 +6225,7 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6225
6225
  fields: C,
6226
6226
  context: t
6227
6227
  }))
6228
- ), { ...g, id: x };
6228
+ ), { ...y, id: x };
6229
6229
  },
6230
6230
  [t, h, e]
6231
6231
  );
@@ -6234,7 +6234,7 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6234
6234
  onGetFieldChilds: c,
6235
6235
  onExport: u,
6236
6236
  onGetPredefinedExports: m,
6237
- onSavePredefinedExport: y,
6237
+ onSavePredefinedExport: g,
6238
6238
  onRemovePredefinedExport: p
6239
6239
  };
6240
6240
  }, Vr = ({
@@ -6355,7 +6355,7 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6355
6355
  onGetFields: m,
6356
6356
  onGetPredefinedExports: p,
6357
6357
  onSavePredefinedExport: h,
6358
- onRemovePredefinedExport: y
6358
+ onRemovePredefinedExport: g
6359
6359
  } = mc({
6360
6360
  model: i,
6361
6361
  context: o,
@@ -6377,7 +6377,7 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6377
6377
  visibleRegisters: u,
6378
6378
  onGetPredefinedExports: p,
6379
6379
  onSavePredefinedExport: h,
6380
- onRemovePredefinedExport: y
6380
+ onRemovePredefinedExport: g
6381
6381
  }
6382
6382
  );
6383
6383
  }, xc = (e) => {
@@ -6402,14 +6402,14 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6402
6402
  const { ooui: t } = e, { required: n } = t;
6403
6403
  return /* @__PURE__ */ r(Ce, { required: n, ...e, children: /* @__PURE__ */ r(Oc, { ooui: t }) });
6404
6404
  }, Oc = (e) => {
6405
- const { value: t, onChange: n, ooui: i } = e, { required: o, selectionValues: s, readOnly: a } = i, l = t == null ? void 0 : t.split(","), [d, u] = b([]), [f, c] = b();
6405
+ const { value: t, onChange: n, ooui: i } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = i, d = t == null ? void 0 : t.split(","), [u, f] = b([]), [c, m] = b();
6406
6406
  return pe(() => {
6407
6407
  if (!t) {
6408
- c(void 0), u([]);
6408
+ m(void 0), f([]);
6409
6409
  return;
6410
6410
  }
6411
- const m = t && l && l[0], p = t && l && l[1] && parseInt(l[1]);
6412
- u([p, void 0]), c(m);
6411
+ const p = t && d && d[0], h = t && d && d[1] && parseInt(d[1]);
6412
+ f([h, void 0]), m(p);
6413
6413
  }, [t]), /* @__PURE__ */ k(Oe, { gutter: 8, wrap: !1, children: [
6414
6414
  /* @__PURE__ */ r(ue, { flex: "1", children: /* @__PURE__ */ r(
6415
6415
  ao,
@@ -6420,14 +6420,14 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6420
6420
  readonly: a,
6421
6421
  required: o
6422
6422
  }),
6423
- onChange: (m) => {
6424
- c(m);
6425
- let p = d[0] || 0;
6426
- m !== f && (u([]), p = 0);
6427
- const h = `${m},${p}`;
6428
- h !== t && (n == null || n(h));
6423
+ onChange: (p) => {
6424
+ m(p);
6425
+ let h = u[0] || 0;
6426
+ p !== c && (f([]), h = 0);
6427
+ const g = `${p},${h}`;
6428
+ g !== t && (n == null || n(g));
6429
6429
  },
6430
- value: f
6430
+ value: c
6431
6431
  }
6432
6432
  ) }),
6433
6433
  /* @__PURE__ */ r(ue, { flex: "3", children: /* @__PURE__ */ r(
@@ -6435,15 +6435,16 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6435
6435
  {
6436
6436
  ooui: new Br({
6437
6437
  name: "object_value",
6438
- relation: f,
6438
+ relation: c,
6439
6439
  readonly: a,
6440
- required: o
6440
+ required: o,
6441
+ domain: l
6441
6442
  }),
6442
- value: d,
6443
- onChange: (m) => {
6444
- u(m);
6445
- const p = `${f},${m[0] || 0}`;
6446
- p !== t && (n == null || n(p));
6443
+ value: u,
6444
+ onChange: (p) => {
6445
+ f(p);
6446
+ const h = `${c},${p[0] || 0}`;
6447
+ h !== t && (n == null || n(h));
6447
6448
  }
6448
6449
  }
6449
6450
  ) })
@@ -6455,11 +6456,11 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6455
6456
  const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = _c(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ae(null), { setFieldValue: f, getFieldValue: c } = ne(Be) || {}, { t: m } = we(), p = n ? Ms(n) : "", h = (x) => {
6456
6457
  i == null || i(x);
6457
6458
  };
6458
- async function y() {
6459
+ async function g() {
6459
6460
  const x = await kt(n), S = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), V = c(a), D = c("name");
6460
6461
  R.href = S, R.download = V || D, R.click();
6461
6462
  }
6462
- async function g() {
6463
+ async function y() {
6463
6464
  const x = await kt(n);
6464
6465
  pn(n, x.mime);
6465
6466
  }
@@ -6505,13 +6506,13 @@ const { useToken: cc } = He, { TextArea: kn } = it, dc = (e) => {
6505
6506
  children: "Select"
6506
6507
  }
6507
6508
  ),
6508
- /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(xi, {}), disabled: !n, onClick: g, children: m("open") }),
6509
+ /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(xi, {}), disabled: !n, onClick: y, children: m("open") }),
6509
6510
  /* @__PURE__ */ r(
6510
6511
  ze,
6511
6512
  {
6512
6513
  tooltip: m("download"),
6513
6514
  disabled: !n,
6514
- onClick: y,
6515
+ onClick: g,
6515
6516
  icon: /* @__PURE__ */ r(Kn, {})
6516
6517
  }
6517
6518
  ),
@@ -6833,7 +6834,7 @@ function Ec(e) {
6833
6834
  }
6834
6835
  d(!1);
6835
6836
  }
6836
- }, [t, a]), y = fe(
6837
+ }, [t, a]), g = fe(
6837
6838
  async (w) => {
6838
6839
  if (w.link) {
6839
6840
  window.open(w.link);
@@ -6858,7 +6859,7 @@ function Ec(e) {
6858
6859
  s(C);
6859
6860
  },
6860
6861
  [a, s]
6861
- ), g = fe(
6862
+ ), y = fe(
6862
6863
  async (w) => {
6863
6864
  s(w);
6864
6865
  },
@@ -6876,8 +6877,8 @@ function Ec(e) {
6876
6877
  loading: l,
6877
6878
  onAddNewAttachment: i,
6878
6879
  onListAllAttachments: o,
6879
- onOpenAttachmentLink: y,
6880
- onOpenAttachmentDetail: g
6880
+ onOpenAttachmentLink: g,
6881
+ onOpenAttachmentDetail: y
6881
6882
  }
6882
6883
  ),
6883
6884
  /* @__PURE__ */ r(
@@ -6910,8 +6911,8 @@ function Mc({ toolbar: e }) {
6910
6911
  currentModel: m,
6911
6912
  setRemovingItem: p,
6912
6913
  removingItem: h,
6913
- duplicatingItem: y,
6914
- setDuplicatingItem: g,
6914
+ duplicatingItem: g,
6915
+ setDuplicatingItem: y,
6915
6916
  setResults: w,
6916
6917
  formIsLoading: C,
6917
6918
  attachments: x,
@@ -6983,7 +6984,7 @@ function Mc({ toolbar: e }) {
6983
6984
  }
6984
6985
  async function oe() {
6985
6986
  try {
6986
- g == null || g(!0);
6987
+ y == null || y(!0);
6987
6988
  const I = await E.getHandler().duplicate({
6988
6989
  id: l,
6989
6990
  model: m,
@@ -6993,10 +6994,10 @@ function Mc({ toolbar: e }) {
6993
6994
  } catch (I) {
6994
6995
  on(JSON.stringify(I));
6995
6996
  } finally {
6996
- g == null || g(!1);
6997
+ y == null || y(!1);
6997
6998
  }
6998
6999
  }
6999
- const U = a || h || C || y;
7000
+ const U = a || h || C || g;
7000
7001
  function $(I) {
7001
7002
  v == null || v({
7002
7003
  actionData: I,
@@ -7017,7 +7018,7 @@ function Mc({ toolbar: e }) {
7017
7018
  /* @__PURE__ */ r(
7018
7019
  Vo,
7019
7020
  {
7020
- disabled: a || C || h || y
7021
+ disabled: a || C || h || g
7021
7022
  }
7022
7023
  ),
7023
7024
  /* @__PURE__ */ r(
@@ -7035,8 +7036,8 @@ function Mc({ toolbar: e }) {
7035
7036
  {
7036
7037
  icon: /* @__PURE__ */ r(zn, {}),
7037
7038
  tooltip: T("duplicate"),
7038
- disabled: s || a || l === void 0 || y || C,
7039
- loading: y,
7039
+ disabled: s || a || l === void 0 || g || C,
7040
+ loading: g,
7040
7041
  onClick: oe
7041
7042
  }
7042
7043
  ),
@@ -7045,7 +7046,7 @@ function Mc({ toolbar: e }) {
7045
7046
  {
7046
7047
  icon: /* @__PURE__ */ r(Gn, {}),
7047
7048
  tooltip: T("delete"),
7048
- disabled: a || l === void 0 || h || y || C,
7049
+ disabled: a || l === void 0 || h || g || C,
7049
7050
  loading: h,
7050
7051
  onClick: Z
7051
7052
  }
@@ -7056,7 +7057,7 @@ function Mc({ toolbar: e }) {
7056
7057
  {
7057
7058
  icon: /* @__PURE__ */ r(Xr, {}),
7058
7059
  tooltip: T("showLogs"),
7059
- disabled: a || l === void 0 || h || y || C,
7060
+ disabled: a || l === void 0 || h || g || C,
7060
7061
  loading: !1,
7061
7062
  onClick: () => {
7062
7063
  Ao(m, l, T);
@@ -7068,7 +7069,7 @@ function Mc({ toolbar: e }) {
7068
7069
  {
7069
7070
  icon: /* @__PURE__ */ r(fn, {}),
7070
7071
  tooltip: T("refresh"),
7071
- disabled: a || l === void 0 || h || y || C,
7072
+ disabled: a || l === void 0 || h || g || C,
7072
7073
  loading: !1,
7073
7074
  onClick: () => {
7074
7075
  G(() => {
@@ -7250,9 +7251,9 @@ function Dr(e, t) {
7250
7251
  };
7251
7252
  }
7252
7253
  const { useToken: Nc } = He, Do = (e) => {
7253
- const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Nc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ne(Be), { elementHasLostFocus: m } = c || {}, [p, h] = b(!1), [y, g] = b(!1);
7254
+ const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Nc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ne(Be), { elementHasLostFocus: m } = c || {}, [p, h] = b(!1), [g, y] = b(!1);
7254
7255
  pe(() => {
7255
- l && !p && g(!1), !n && !l && (h(!0), g(!0));
7256
+ l && !p && y(!1), !n && !l && (h(!0), y(!0));
7256
7257
  }, [p, l]);
7257
7258
  const w = (C) => {
7258
7259
  i == null || i(C.target.value);
@@ -7263,7 +7264,7 @@ const { useToken: Nc } = He, Do = (e) => {
7263
7264
  {
7264
7265
  icon: /* @__PURE__ */ r(Yt, {}),
7265
7266
  onClick: () => {
7266
- o(n) && (h(!1), g(!1));
7267
+ o(n) && (h(!1), y(!1));
7267
7268
  },
7268
7269
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
7269
7270
  tabIndex: -1
@@ -7273,13 +7274,13 @@ const { useToken: Nc } = He, Do = (e) => {
7273
7274
  {
7274
7275
  icon: /* @__PURE__ */ r(Qr, {}),
7275
7276
  onClick: () => {
7276
- h(!0), g(!0);
7277
+ h(!0), y(!0);
7277
7278
  },
7278
7279
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
7279
7280
  tabIndex: -1
7280
7281
  }
7281
7282
  ) }),
7282
- /* @__PURE__ */ r(ue, { flex: "auto", children: y ? /* @__PURE__ */ r(
7283
+ /* @__PURE__ */ r(ue, { flex: "auto", children: g ? /* @__PURE__ */ r(
7283
7284
  it,
7284
7285
  {
7285
7286
  style: {
@@ -7291,7 +7292,7 @@ const { useToken: Nc } = He, Do = (e) => {
7291
7292
  onChange: w,
7292
7293
  value: n,
7293
7294
  onBlur: () => {
7294
- o(n) && (h(!1), g(!1), m == null || m());
7295
+ o(n) && (h(!1), y(!1), m == null || m());
7295
7296
  }
7296
7297
  }
7297
7298
  ) : /* @__PURE__ */ r(
@@ -7585,8 +7586,8 @@ const Wc = (e) => {
7585
7586
  currentId: m = void 0,
7586
7587
  results: p = void 0,
7587
7588
  setSelectedRowItems: h = void 0,
7588
- setSearchParams: y = void 0,
7589
- searchVisible: g = !0,
7589
+ setSearchParams: g = void 0,
7590
+ searchVisible: y = !0,
7590
7591
  setSearchVisible: w = void 0,
7591
7592
  sorter: C = void 0,
7592
7593
  setSorter: x = void 0,
@@ -7612,7 +7613,7 @@ const Wc = (e) => {
7612
7613
  setSelectedRowItems: h,
7613
7614
  searchParams: T,
7614
7615
  setSearchValues: v,
7615
- setSearchParams: y,
7616
+ setSearchParams: g,
7616
7617
  setSearchVisible: w,
7617
7618
  setTreeIsLoading: V,
7618
7619
  context: o,
@@ -7651,10 +7652,10 @@ const Wc = (e) => {
7651
7652
  offset: N,
7652
7653
  isSearching: B,
7653
7654
  onSubmit: (ee) => {
7654
- L(!1), y == null || y(ee.params), w == null || w(!1);
7655
+ L(!1), g == null || g(ee.params), w == null || w(!1);
7655
7656
  },
7656
7657
  searchError: q,
7657
- searchVisible: g,
7658
+ searchVisible: y,
7658
7659
  searchValues: _,
7659
7660
  showLimitOptions: !1
7660
7661
  }
@@ -7702,7 +7703,7 @@ const Wc = (e) => {
7702
7703
  id: o,
7703
7704
  parentContext: l,
7704
7705
  onSubmitSucceed: (p, h) => {
7705
- f.findIndex((g) => g.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
7706
+ f.findIndex((y) => y.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
7706
7707
  }
7707
7708
  }
7708
7709
  )
@@ -8090,8 +8091,8 @@ function ed(e) {
8090
8091
  setCurrentItemIndex: m,
8091
8092
  searchParams: p,
8092
8093
  searchVisible: h,
8093
- setSearchVisible: y,
8094
- setSearchTreeNameSearch: g,
8094
+ setSearchVisible: g,
8095
+ setSearchTreeNameSearch: y,
8095
8096
  searchTreeNameSearch: w,
8096
8097
  treeIsLoading: C,
8097
8098
  setPreviousView: x,
@@ -8175,7 +8176,7 @@ function ed(e) {
8175
8176
  disabled: l || a,
8176
8177
  searchText: w,
8177
8178
  onSearch: ($) => {
8178
- $ && $.trim().length > 0 ? g == null || g($) : g == null || g(void 0);
8179
+ $ && $.trim().length > 0 ? y == null || y($) : y == null || y(void 0);
8179
8180
  }
8180
8181
  }
8181
8182
  ),
@@ -8191,7 +8192,7 @@ function ed(e) {
8191
8192
  tooltip: O("advanced_search"),
8192
8193
  type: h ? "primary" : "default",
8193
8194
  onClick: () => {
8194
- y == null || y(!h);
8195
+ g == null || g(!h);
8195
8196
  },
8196
8197
  disabled: l || a,
8197
8198
  badgeNumber: p == null ? void 0 : p.length
@@ -8400,7 +8401,7 @@ const td = (e) => {
8400
8401
  setCurrentView: c,
8401
8402
  availableViews: m,
8402
8403
  searchTreeNameSearch: p
8403
- } = e, { currentView: h, setPreviousView: y } = ne(
8404
+ } = e, { currentView: h, setPreviousView: g } = ne(
8404
8405
  rt
8405
8406
  );
8406
8407
  return t ? /* @__PURE__ */ k(Q, { children: [
@@ -8423,11 +8424,11 @@ const td = (e) => {
8423
8424
  formView: s,
8424
8425
  treeView: a,
8425
8426
  domain: l,
8426
- onRowClicked: (g) => {
8427
- const { id: w } = g;
8427
+ onRowClicked: (y) => {
8428
+ const { id: w } = y;
8428
8429
  f(w);
8429
8430
  const C = u.findIndex((S) => S.id === w);
8430
- y == null || y(h), d(C);
8431
+ g == null || g(h), d(C);
8431
8432
  const x = m.find(
8432
8433
  (S) => S.type === "form"
8433
8434
  );
@@ -8561,8 +8562,8 @@ function ad(e, t) {
8561
8562
  res_id: m = !1,
8562
8563
  action_id: p,
8563
8564
  action_type: h,
8564
- treeExpandable: y = !1,
8565
- limit: g
8565
+ treeExpandable: g = !1,
8566
+ limit: y
8566
8567
  } = e, [w, C] = b(), [x, S] = b([]), [R, V] = b(!0), D = m || void 0, [F, T] = b(
8567
8568
  D
8568
8569
  ), [_, v] = b([]), [O, A] = b(), [L, G] = b([]), [B, q] = b(), [N, Z] = b(0), [ee, oe] = b(!1), [U, $] = b(!1), [I, M] = b(), { t: K } = we(), le = ae(), z = ae(), re = ne(
@@ -8649,7 +8650,7 @@ function ad(e, t) {
8649
8650
  case "tree": {
8650
8651
  j.push({
8651
8652
  ...ie,
8652
- isExpandable: y,
8653
+ isExpandable: g,
8653
8654
  type: ye
8654
8655
  });
8655
8656
  break;
@@ -8756,7 +8757,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8756
8757
  td,
8757
8758
  {
8758
8759
  visible: w.type === j.type && w.view_id === j.view_id,
8759
- limit: g,
8760
+ limit: y,
8760
8761
  model: i,
8761
8762
  context: o,
8762
8763
  domain: n,
@@ -8835,7 +8836,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8835
8836
  setSearchTreeNameSearch: M,
8836
8837
  searchTreeNameSearch: I,
8837
8838
  goToResourceId: _e,
8838
- limit: g,
8839
+ limit: y,
8839
8840
  children: [
8840
8841
  We(),
8841
8842
  /* @__PURE__ */ r(
@@ -8891,7 +8892,7 @@ async function ld({
8891
8892
  h.push([R, S]);
8892
8893
  }
8893
8894
  }
8894
- const [y, g] = h[0], w = { id: y, type: g };
8895
+ const [g, y] = h[0], w = { id: g, type: y };
8895
8896
  return {
8896
8897
  title: f,
8897
8898
  actionId: e,
@@ -9001,7 +9002,7 @@ function hd(e) {
9001
9002
  domain: s = [],
9002
9003
  visible: a = !0,
9003
9004
  parentContext: l = {}
9004
- } = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, y] = b(), [g, w] = b(), [C, x] = b(1), [S, R] = b(0), V = ae(St), D = ae([]), [F, T] = b(0), [_, v] = b([]), [O, A] = b(void 0), [L, G] = b(), [B, q] = b(), [N, Z] = b(), [ee, oe] = b(!1), U = ae([]), $ = (W) => {
9005
+ } = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [C, x] = b(1), [S, R] = b(0), V = ae(St), D = ae([]), [F, T] = b(0), [_, v] = b([]), [O, A] = b(void 0), [L, G] = b(), [B, q] = b(), [N, Z] = b(), [ee, oe] = b(!1), U = ae([]), $ = (W) => {
9005
9006
  oe(!0), x(W), R((W - 1) * V.current);
9006
9007
  }, I = async () => {
9007
9008
  const W = U.current.length > 0 ? U.current : s, ce = jt(D.current, W), { colors: Te } = At(h), { totalItems: Ee, results: Me, attrsEvaluated: Ne } = await E.getHandler().searchForTree({
@@ -9017,7 +9018,7 @@ function hd(e) {
9017
9018
  const me = Dt({
9018
9019
  resultsToSort: Me,
9019
9020
  sorter: L,
9020
- fields: { ...h.fields, ...g.fields }
9021
+ fields: { ...h.fields, ...y.fields }
9021
9022
  });
9022
9023
  oe(!1), v(me);
9023
9024
  const Fe = await Ee;
@@ -9046,7 +9047,7 @@ function hd(e) {
9046
9047
  action: t,
9047
9048
  context: l
9048
9049
  });
9049
- U.current = W.domain, w(W.views.get("form")), y(W.views.get("tree")), p(W.model), V.current = W.limit;
9050
+ U.current = W.domain, w(W.views.get("form")), g(W.views.get("tree")), p(W.model), V.current = W.limit;
9050
9051
  }, z = async () => {
9051
9052
  p(n);
9052
9053
  const W = await E.getHandler().getView({
@@ -9061,7 +9062,7 @@ function hd(e) {
9061
9062
  id: i,
9062
9063
  context: l
9063
9064
  });
9064
- y(ce);
9065
+ g(ce);
9065
9066
  };
9066
9067
  pe(() => {
9067
9068
  t ? K("action") : n && K("model");
@@ -9073,7 +9074,7 @@ function hd(e) {
9073
9074
  model: m,
9074
9075
  treeView: h
9075
9076
  });
9076
- }, ve = () => !h || !g ? null : /* @__PURE__ */ k("div", { style: { overflowY: "scroll" }, children: [
9077
+ }, ve = () => !h || !y ? null : /* @__PURE__ */ k("div", { style: { overflowY: "scroll" }, children: [
9077
9078
  B && /* @__PURE__ */ r(Qe, { className: "mt-10", message: B, type: "error", banner: !0 }),
9078
9079
  /* @__PURE__ */ r(
9079
9080
  Xt,
@@ -9094,7 +9095,7 @@ function hd(e) {
9094
9095
  const ce = Dt({
9095
9096
  resultsToSort: _,
9096
9097
  sorter: W,
9097
- fields: { ...h.fields, ...g.fields }
9098
+ fields: { ...h.fields, ...y.fields }
9098
9099
  });
9099
9100
  v(ce);
9100
9101
  },
@@ -9124,7 +9125,7 @@ function gd(e, t) {
9124
9125
  setIsLoading: m,
9125
9126
  openAction: p,
9126
9127
  moveItemsEnabled: h
9127
- } = ne(or), y = ae(), g = ae(), [w] = tt(E.getHandler().getView), [C] = tt(
9128
+ } = ne(or), g = ae(), y = ae(), [w] = tt(E.getHandler().getView), [C] = tt(
9128
9129
  E.getHandler().readObjects
9129
9130
  ), [x] = tt(E.getHandler().update);
9130
9131
  pe(() => {
@@ -9139,7 +9140,7 @@ function gd(e, t) {
9139
9140
  u(!0), m(!0), c(void 0);
9140
9141
  try {
9141
9142
  const v = await R(), O = await D(v), A = v.fields[Rn].relation, L = O[Rn].items;
9142
- g.current = v.fields;
9143
+ y.current = v.fields;
9143
9144
  const G = await V({
9144
9145
  items: L,
9145
9146
  model: A,
@@ -9162,17 +9163,17 @@ function gd(e, t) {
9162
9163
  model: O,
9163
9164
  context: A
9164
9165
  }) {
9165
- y.current = (await w({
9166
+ g.current = (await w({
9166
9167
  model: O,
9167
9168
  type: "form",
9168
9169
  context: A
9169
9170
  })).fields;
9170
9171
  const [L] = await Zn({
9171
9172
  treeView: {
9172
- fields: y.current
9173
+ fields: g.current
9173
9174
  },
9174
9175
  formView: {
9175
- fields: y.current
9176
+ fields: g.current
9176
9177
  },
9177
9178
  model: O,
9178
9179
  items: v,
@@ -9235,14 +9236,14 @@ function gd(e, t) {
9235
9236
  }
9236
9237
  };
9237
9238
  }), G = {
9238
- fields: y.current,
9239
+ fields: g.current,
9239
9240
  items: L
9240
9241
  };
9241
9242
  await x({
9242
9243
  model: n,
9243
9244
  id: o,
9244
9245
  values: { [Rn]: G },
9245
- fields: g.current,
9246
+ fields: y.current,
9246
9247
  context: i
9247
9248
  });
9248
9249
  }
@@ -9379,7 +9380,7 @@ const yd = yt(gd), wd = (e) => {
9379
9380
  const { ooui: t } = e;
9380
9381
  return /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(vd, { ooui: t }) });
9381
9382
  }, vd = (e) => {
9382
- const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: y, columns: g } = n, w = ne(Be), { getContext: C } = w || {};
9383
+ const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = n, w = ne(Be), { getContext: C } = w || {};
9383
9384
  Ft(() => {
9384
9385
  S();
9385
9386
  }, [o]);
@@ -9407,10 +9408,10 @@ const yd = yt(gd), wd = (e) => {
9407
9408
  const _ = (await E.getHandler().search({
9408
9409
  model: m,
9409
9410
  params: F,
9410
- fieldsToRetrieve: [y],
9411
+ fieldsToRetrieve: [g],
9411
9412
  context: { ...C == null ? void 0 : C(), ...p }
9412
9413
  })).map((v) => {
9413
- const O = v[y];
9414
+ const O = v[g];
9414
9415
  let A = O;
9415
9416
  return Array.isArray(O) && (A = O[1]), { label: A, value: v.id };
9416
9417
  });
@@ -9444,7 +9445,7 @@ const yd = yt(gd), wd = (e) => {
9444
9445
  disabled: h,
9445
9446
  onChange: D,
9446
9447
  style: { width: "100%" },
9447
- children: /* @__PURE__ */ r(Oe, { children: a.map((F) => /* @__PURE__ */ r(ue, { span: Math.floor(24 / g), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
9448
+ children: /* @__PURE__ */ r(Oe, { children: a.map((F) => /* @__PURE__ */ r(ue, { span: Math.floor(24 / y), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
9448
9449
  }
9449
9450
  ),
9450
9451
  !h && /* @__PURE__ */ k(Ue, { children: [
@@ -9670,7 +9671,7 @@ function $d(e, t) {
9670
9671
  limit: oe
9671
9672
  });
9672
9673
  }
9673
- function y({
9674
+ function g({
9674
9675
  title: S,
9675
9676
  content: R,
9676
9677
  key: V,
@@ -9688,7 +9689,7 @@ function $d(e, t) {
9688
9689
  }
9689
9690
  ]), o(V);
9690
9691
  }
9691
- async function g({
9692
+ async function y({
9692
9693
  relateData: S,
9693
9694
  fields: R,
9694
9695
  values: V,
@@ -9849,7 +9850,7 @@ function $d(e, t) {
9849
9850
  });
9850
9851
  } else {
9851
9852
  const Z = _ && Array.isArray(_.id) ? { ..._, id: _.id[0] } : _;
9852
- y({
9853
+ g({
9853
9854
  title: F,
9854
9855
  action: {
9855
9856
  id: v,
@@ -9884,7 +9885,7 @@ function $d(e, t) {
9884
9885
  {
9885
9886
  openShortcut: w,
9886
9887
  openAction: x,
9887
- openRelate: g,
9888
+ openRelate: y,
9888
9889
  openDefaultActionForModel: C,
9889
9890
  tabs: d,
9890
9891
  activeKey: i,
@@ -10020,8 +10021,8 @@ const { useToken: Wd } = He, Mu = (e) => {
10020
10021
  ut
10021
10022
  ), {
10022
10023
  openShortcut: h,
10023
- tabs: y,
10024
- activeKey: g,
10024
+ tabs: g,
10025
+ activeKey: y,
10025
10026
  currentView: w,
10026
10027
  currentId: C,
10027
10028
  openDefaultActionForModel: x
@@ -10085,7 +10086,7 @@ const { useToken: Wd } = He, Mu = (e) => {
10085
10086
  else {
10086
10087
  if (!w)
10087
10088
  return;
10088
- const v = y.find((B) => B.key === g), { id: O, type: A } = (v == null ? void 0 : v.action) || {}, L = w.view_id;
10089
+ const v = g.find((B) => B.key === y), { id: O, type: A } = (v == null ? void 0 : v.action) || {}, L = w.view_id;
10089
10090
  let G = !1;
10090
10091
  if (!O || !A) {
10091
10092
  l(!1);
@@ -10100,7 +10101,7 @@ const { useToken: Wd } = He, Mu = (e) => {
10100
10101
  }
10101
10102
  await T(), l(!a);
10102
10103
  }, [
10103
- g,
10104
+ y,
10104
10105
  C,
10105
10106
  d,
10106
10107
  w,
@@ -10108,7 +10109,7 @@ const { useToken: Wd } = He, Mu = (e) => {
10108
10109
  a,
10109
10110
  i,
10110
10111
  o,
10111
- y
10112
+ g
10112
10113
  ]);
10113
10114
  return /* @__PURE__ */ r(
10114
10115
  Mi,