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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,7 +98,7 @@ function Ce({
98
98
  );
99
99
  if (!o)
100
100
  return h();
101
- const g = /* @__PURE__ */ r(
101
+ const y = /* @__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: g }) }),
114
+ /* @__PURE__ */ r(ue, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children: y }) }),
115
115
  /* @__PURE__ */ r(ue, { flex: "auto", children: h() })
116
116
  ] }))() : (() => /* @__PURE__ */ k(Q, { children: [
117
- g,
117
+ y,
118
118
  h()
119
119
  ] }))();
120
120
  }
@@ -148,7 +148,7 @@ const { confirm: ms } = Je, Gt = ({
148
148
  fetchValues: m,
149
149
  formHasChanges: p,
150
150
  elementHasLostFocus: h,
151
- getFields: g
151
+ getFields: y
152
152
  } = e;
153
153
  return /* @__PURE__ */ r(
154
154
  Be.Provider,
@@ -157,7 +157,7 @@ const { confirm: ms } = Je, Gt = ({
157
157
  domain: f,
158
158
  getValues: d,
159
159
  getPlainValues: u,
160
- getFields: g,
160
+ getFields: y,
161
161
  activeId: n,
162
162
  activeModel: i,
163
163
  setFieldValue: o,
@@ -307,28 +307,28 @@ const to = (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 g() {
310
+ async function y() {
311
311
  p(!0), await c({ type: s, action: n, context: d }), p(!1);
312
312
  }
313
- function y() {
313
+ function g() {
314
314
  if (a) {
315
315
  Gt({
316
316
  confirmMessage: a,
317
317
  t: h,
318
318
  onOk: () => {
319
- g();
319
+ y();
320
320
  }
321
321
  });
322
322
  return;
323
323
  }
324
- g();
324
+ y();
325
325
  }
326
326
  function w() {
327
327
  if (m)
328
328
  return /* @__PURE__ */ r(st, {});
329
329
  if (l) {
330
- const S = dt(l);
331
- return S && /* @__PURE__ */ r(S, {});
330
+ const C = dt(l);
331
+ return C && /* @__PURE__ */ r(C, {});
332
332
  }
333
333
  }
334
334
  return /* @__PURE__ */ r(Ce, { ooui: t, children: /* @__PURE__ */ r(
@@ -336,7 +336,7 @@ const to = (e) => {
336
336
  {
337
337
  block: !0,
338
338
  disabled: !o || u || m,
339
- onClick: y,
339
+ onClick: g,
340
340
  icon: w(),
341
341
  type: t.primary ? "primary" : "default",
342
342
  danger: t.danger,
@@ -355,9 +355,9 @@ const to = (e) => {
355
355
  primary: f,
356
356
  context: c,
357
357
  readOnly: m
358
- } = n || {}, p = ne(Be), { executeButtonAction: h } = p || {}, [g, y] = b(!1), { t: w } = we();
359
- function S() {
360
- if (g)
358
+ } = n || {}, p = ne(Be), { executeButtonAction: h } = p || {}, [y, g] = b(!1), { t: w } = we();
359
+ function C() {
360
+ if (y)
361
361
  return /* @__PURE__ */ r(st, {});
362
362
  if (u) {
363
363
  const R = dt(u);
@@ -365,9 +365,9 @@ const to = (e) => {
365
365
  }
366
366
  }
367
367
  async function x() {
368
- l && o && (y(!0), await h({ type: l, action: o, context: c }), y(!1));
368
+ l && o && (g(!0), await h({ type: l, action: o, context: c }), g(!1));
369
369
  }
370
- function C() {
370
+ function S() {
371
371
  if (d) {
372
372
  Gt({
373
373
  confirmMessage: d,
@@ -387,7 +387,7 @@ const to = (e) => {
387
387
  Zo.Button,
388
388
  {
389
389
  disabled: !a || m,
390
- onClick: C,
390
+ onClick: S,
391
391
  icon: /* @__PURE__ */ r(dn, {}),
392
392
  type: f ? "primary" : void 0,
393
393
  overlay: /* @__PURE__ */ r(
@@ -398,7 +398,7 @@ const to = (e) => {
398
398
  }
399
399
  ),
400
400
  children: [
401
- S(),
401
+ C(),
402
402
  s
403
403
  ]
404
404
  }
@@ -420,11 +420,11 @@ const to = (e) => {
420
420
  context: m,
421
421
  readOnly: p,
422
422
  danger: h
423
- } = s, [g, y] = b(!1);
423
+ } = s, [y, g] = b(!1);
424
424
  async function w() {
425
- y(!0), await i({ type: u, action: a, context: m }), y(!1);
425
+ g(!0), await i({ type: u, action: a, context: m }), g(!1);
426
426
  }
427
- function S() {
427
+ function C() {
428
428
  if (f) {
429
429
  Gt({
430
430
  confirmMessage: f,
@@ -438,18 +438,18 @@ const to = (e) => {
438
438
  w();
439
439
  }
440
440
  function x() {
441
- if (g)
441
+ if (y)
442
442
  return /* @__PURE__ */ r(st, {});
443
443
  if (c) {
444
- const C = dt(c);
445
- return C && /* @__PURE__ */ r(C, {});
444
+ const S = dt(c);
445
+ return S && /* @__PURE__ */ r(S, {});
446
446
  }
447
447
  }
448
448
  return /* @__PURE__ */ r(
449
449
  lr.Item,
450
450
  {
451
451
  disabled: !d || p,
452
- onClick: S,
452
+ onClick: C,
453
453
  icon: x(),
454
454
  danger: h,
455
455
  children: l
@@ -521,15 +521,15 @@ const no = (e) => {
521
521
  content: t
522
522
  });
523
523
  }, ro = (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), [g, y] = 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), [y, g] = b({}), w = ae();
525
525
  pe(() => {
526
- t ? S() : y({});
526
+ t ? C() : g({});
527
527
  }, [t]);
528
- async function S() {
528
+ async function C() {
529
529
  m(!0);
530
530
  try {
531
531
  const F = await x();
532
- await C(F);
532
+ await S(F);
533
533
  } catch (F) {
534
534
  Xe(F);
535
535
  }
@@ -546,7 +546,7 @@ const no = (e) => {
546
546
  }));
547
547
  return f == null || f(T), T;
548
548
  }
549
- async function C(F) {
549
+ async function S(F) {
550
550
  const T = {};
551
551
  for (const _ of F) {
552
552
  const v = (await E.getHandler().readObjects({
@@ -557,7 +557,7 @@ const no = (e) => {
557
557
  }))[0];
558
558
  T[_.code] = v[s] || "";
559
559
  }
560
- w.current = T, y(T);
560
+ w.current = T, g(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 no = (e) => {
566
566
  Mi,
567
567
  {
568
568
  rows: 4,
569
- value: g[F.code] || "",
569
+ value: y[F.code] || "",
570
570
  onChange: (_) => {
571
- y({
572
- ...g,
571
+ g({
572
+ ...y,
573
573
  [F.code]: _.target.value
574
574
  });
575
575
  },
@@ -581,11 +581,11 @@ const no = (e) => {
581
581
  async function V() {
582
582
  h(!0);
583
583
  try {
584
- for (const F of Object.keys(g))
585
- g[F] !== w.current[F] && await E.getHandler().update({
584
+ for (const F of Object.keys(y))
585
+ y[F] !== w.current[F] && await E.getHandler().update({
586
586
  model: i,
587
587
  id: o,
588
- values: { [s]: g[F] },
588
+ values: { [s]: y[F] },
589
589
  context: {
590
590
  lang: F
591
591
  },
@@ -984,7 +984,7 @@ function Hs(e) {
984
984
  return !1;
985
985
  }
986
986
  const Zn = async (e) => {
987
- var h;
987
+ var y;
988
988
  const {
989
989
  items: t,
990
990
  model: n,
@@ -992,17 +992,17 @@ const Zn = async (e) => {
992
992
  treeView: o,
993
993
  context: s,
994
994
  currentView: a = {}
995
- } = e, l = t.filter(
996
- (g) => g.operation !== "original"
997
- ), d = t.filter((g) => g.operation === "original").map((g) => g.id), u = {
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 = {
998
998
  form: i.fields,
999
999
  tree: o.fields
1000
1000
  };
1001
- let f = [], c;
1001
+ let c = [], m;
1002
1002
  if (a === "tree" && (o != null && o.arch)) {
1003
- const g = (h = At(o)) == null ? void 0 : h.colors, y = await E.getHandler().readEvalUiObjects({
1003
+ const g = (y = At(o)) == null ? void 0 : y.colors, w = await E.getHandler().readEvalUiObjects({
1004
1004
  model: n,
1005
- ids: d,
1005
+ ids: u,
1006
1006
  arch: o == null ? void 0 : o.arch,
1007
1007
  fields: o.fields,
1008
1008
  context: s,
@@ -1010,30 +1010,30 @@ const Zn = async (e) => {
1010
1010
  colors: g
1011
1011
  }
1012
1012
  });
1013
- f = y[0], c = nn(y[1]);
1013
+ c = w[0], m = nn(w[1]);
1014
1014
  } else
1015
- f = await E.getHandler().readObjects({
1015
+ c = await E.getHandler().readObjects({
1016
1016
  model: n,
1017
- ids: d,
1018
- fields: u[a],
1017
+ ids: u,
1018
+ fields: f[a],
1019
1019
  context: s
1020
1020
  });
1021
- const m = f.map((g) => {
1022
- const y = {};
1023
- return Object.keys(g).forEach((w) => {
1024
- (u[a].hasOwnProperty(w) || w === "id") && (y[w] = g[w]);
1025
- }), y;
1021
+ const p = c.map((g) => {
1022
+ const w = {};
1023
+ return Object.keys(g).forEach((C) => {
1024
+ (f[a].hasOwnProperty(C) || C === "id") && (w[C] = g[C]);
1025
+ }), w;
1026
1026
  });
1027
1027
  return [
1028
1028
  t.map((g) => {
1029
- const y = m.find(
1030
- (S) => S.id === g.id
1031
- ), w = {
1029
+ const w = p.find(
1030
+ (x) => x.id === g.id
1031
+ ), C = {
1032
1032
  ...g
1033
1033
  };
1034
- return a === "form" ? w.values = y : a === "tree" && (w.treeValues = y), w;
1035
- }).concat(l),
1036
- c
1034
+ return a === "form" ? C.values = w : a === "tree" && (C.treeValues = w), C;
1035
+ }).concat(d),
1036
+ m
1037
1037
  ];
1038
1038
  }, Ks = (e) => {
1039
1039
  const t = e.filter((n) => n.id && n.id < 0).map((n) => n.id);
@@ -1057,7 +1057,7 @@ const Zn = async (e) => {
1057
1057
  const s = e[i];
1058
1058
  n[i] = {
1059
1059
  items: s.map((a) => ({
1060
- operation: "original",
1060
+ operation: "pendingLink",
1061
1061
  id: a
1062
1062
  }))
1063
1063
  };
@@ -1069,24 +1069,24 @@ const Zn = async (e) => {
1069
1069
  Ft(() => {
1070
1070
  h();
1071
1071
  }, [t]);
1072
- const p = async (g) => o && o[g] ? o[g] : await E.getHandler().getView({
1072
+ const p = async (y) => o && o[y] ? o[y] : await E.getHandler().getView({
1073
1073
  model: n,
1074
- type: g,
1074
+ type: y,
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 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);
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);
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(Ys, { ooui: t, views: u }) });
1088
1088
  }, Ys = (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: g, readOnly: y, summaryField: w, titleField: S } = i, x = s.filter((F) => F.values), C = ne(Be), { getContext: R } = C || {};
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 || {};
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(), ...g },
1111
+ context: { ...R == null ? void 0 : R(), ...y },
1112
1112
  currentView: "form"
1113
1113
  });
1114
1114
  V(F);
@@ -1133,7 +1133,7 @@ const Zn = async (e) => {
1133
1133
  )
1134
1134
  ), c(!0);
1135
1135
  },
1136
- children: /* @__PURE__ */ r("strong", { children: (_ = F.values) == null ? void 0 : _[S] })
1136
+ children: /* @__PURE__ */ r("strong", { children: (_ = F.values) == null ? void 0 : _[C] })
1137
1137
  }
1138
1138
  ),
1139
1139
  /* @__PURE__ */ r("br", {}),
@@ -1165,11 +1165,11 @@ const Zn = async (e) => {
1165
1165
  onSubmitSucceed: () => {
1166
1166
  c(!1);
1167
1167
  },
1168
- parentContext: { ...R == null ? void 0 : R(), ...g },
1168
+ parentContext: { ...R == null ? void 0 : R(), ...y },
1169
1169
  onCancel: () => {
1170
1170
  c(!1);
1171
1171
  },
1172
- readOnly: y,
1172
+ readOnly: g,
1173
1173
  postSaveAction: D
1174
1174
  }
1175
1175
  )
@@ -1354,11 +1354,11 @@ const Nt = ({
1354
1354
  const { ooui: t } = e;
1355
1355
  return /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(oa, { ooui: t }) });
1356
1356
  }, oa = (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: g } = n, y = ne(Be), { getContext: w } = y || {};
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 || {};
1358
1358
  Ft(() => {
1359
1359
  x();
1360
1360
  }, [o]);
1361
- const S = (V) => {
1361
+ const C = (V) => {
1362
1362
  i == null || i({
1363
1363
  items: V
1364
1364
  });
@@ -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: y == null ? void 0 : y.getFields(),
1375
- values: y.getPlainValues()
1374
+ fields: g == null ? void 0 : g.getFields(),
1375
+ values: g.getPlainValues()
1376
1376
  }),
1377
- fields: y == null ? void 0 : y.getFields(),
1378
- context: y.getContext()
1377
+ fields: g == null ? void 0 : g.getFields(),
1378
+ context: g.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: [g],
1385
+ fieldsToRetrieve: [y],
1386
1386
  context: { ...w == null ? void 0 : w(), ...p }
1387
1387
  })).map((T) => {
1388
- const _ = T[g];
1388
+ const _ = T[y];
1389
1389
  let v = _;
1390
1390
  return Array.isArray(_) && (v = _[1]), { label: v, value: T.id };
1391
1391
  });
@@ -1396,14 +1396,14 @@ const Nt = ({
1396
1396
  c(!1);
1397
1397
  }
1398
1398
  }
1399
- const C = (V) => {
1399
+ const S = (V) => {
1400
1400
  const D = o.map((T) => V.includes(T.id) ? T.operation == "pendingRemove" ? {
1401
1401
  ...T,
1402
1402
  operation: "pendingLink"
1403
1403
  } : T : { id: T.id, operation: "pendingRemove" }), F = D.map((T) => T.id);
1404
1404
  V.filter((T) => !F.includes(T)).map((T) => {
1405
1405
  D.push({ id: T, operation: "pendingLink" });
1406
- }), S(D);
1406
+ }), C(D);
1407
1407
  }, R = (V) => {
1408
1408
  const { label: D, closable: F, onClose: T } = V, _ = (O) => {
1409
1409
  O.preventDefault(), O.stopPropagation();
@@ -1429,7 +1429,7 @@ const Nt = ({
1429
1429
  bordered: !h,
1430
1430
  disabled: h,
1431
1431
  options: a,
1432
- onChange: C,
1432
+ onChange: S,
1433
1433
  loading: f
1434
1434
  }
1435
1435
  ) }) });
@@ -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((y) => !y.invisible), h = ca({
1570
+ const p = c.filter((g) => !g.invisible), h = ca({
1571
1571
  row: p,
1572
1572
  numberOfColumns: o
1573
1573
  });
1574
- let g = h;
1575
- return (m === 0 || !(c.length === 1 && c.some((y) => y.type === "group"))) && (g = la({
1574
+ let y = h;
1575
+ return (m === 0 || !(c.length === 1 && c.some((g) => g.type === "group"))) && (y = la({
1576
1576
  row: h,
1577
1577
  numberOfColumns: o,
1578
1578
  mustFillWithEmpties: n
1579
- }), l = l.concat(g)), g.map((y) => (y instanceof Et && y.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1579
+ }), l = l.concat(y)), y.map((g) => (g instanceof Et && g.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1580
1580
  "div",
1581
1581
  {
1582
1582
  style: {
1583
- ...aa({ item: y, responsiveBehaviour: n }),
1583
+ ...aa({ item: g, responsiveBehaviour: n }),
1584
1584
  minWidth: 0
1585
1585
  },
1586
1586
  children: sa({
1587
- ooui: y,
1587
+ ooui: g,
1588
1588
  responsiveBehaviour: n
1589
1589
  })
1590
1590
  },
1591
- y.key
1591
+ g.key
1592
1592
  )));
1593
1593
  }), u = i.length === 1 ? da(l, o) : ua(o, a);
1594
1594
  return /* @__PURE__ */ r("div", { style: {
@@ -1657,12 +1657,12 @@ const Nt = ({
1657
1657
  results: m,
1658
1658
  currentItemIndex: p,
1659
1659
  setCurrentItemIndex: h,
1660
- currentModel: g,
1661
- sorter: y,
1660
+ currentModel: y,
1661
+ sorter: g,
1662
1662
  setSorter: w,
1663
- totalItems: S,
1663
+ totalItems: C,
1664
1664
  setTotalItems: x,
1665
- setSelectedRowItems: C,
1665
+ setSelectedRowItems: S,
1666
1666
  selectedRowItems: R,
1667
1667
  searchTreeNameSearch: V,
1668
1668
  setSearchTreeNameSearch: D,
@@ -1714,7 +1714,7 @@ const Nt = ({
1714
1714
  setCurrentItemIndex: h,
1715
1715
  results: m,
1716
1716
  setResults: c,
1717
- currentModel: g,
1717
+ currentModel: y,
1718
1718
  removingItem: L,
1719
1719
  setRemovingItem: G,
1720
1720
  formIsLoading: B,
@@ -1724,16 +1724,16 @@ const Nt = ({
1724
1724
  attachments: ee,
1725
1725
  setAttachments: oe,
1726
1726
  selectedRowItems: R,
1727
- setSelectedRowItems: C,
1727
+ setSelectedRowItems: S,
1728
1728
  duplicatingItem: U,
1729
1729
  setDuplicatingItem: $,
1730
1730
  setSearchParams: M,
1731
1731
  searchParams: I,
1732
1732
  searchVisible: K,
1733
1733
  setSearchVisible: le,
1734
- sorter: y,
1734
+ sorter: g,
1735
1735
  setSorter: w,
1736
- totalItems: S,
1736
+ totalItems: C,
1737
1737
  setTotalItems: x,
1738
1738
  searchTreeNameSearch: V,
1739
1739
  setSearchTreeNameSearch: D,
@@ -1792,14 +1792,14 @@ const Nt = ({
1792
1792
  ut
1793
1793
  ), { openAction: u } = d || {}, f = ae([]), { t: c } = we();
1794
1794
  wt(t, () => ({
1795
- openActionModal: C
1795
+ openActionModal: S
1796
1796
  }));
1797
- const [m, p] = b(!1), [h, g] = b(
1797
+ const [m, p] = b(!1), [h, y] = b(
1798
1798
  {
1799
1799
  context: {}
1800
1800
  }
1801
1801
  );
1802
- async function y(D) {
1802
+ async function g(D) {
1803
1803
  const { reportData: F, fields: T, values: _, context: v = {} } = D, {
1804
1804
  context: O,
1805
1805
  model: A,
@@ -1845,7 +1845,7 @@ const Nt = ({
1845
1845
  s.current = !1, clearInterval(o.current), l(!1), Xe(T.exception || T);
1846
1846
  }
1847
1847
  }
1848
- async function S({
1848
+ async function C({
1849
1849
  actionData: D,
1850
1850
  fields: F,
1851
1851
  values: T,
@@ -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 y({
1857
+ return await g({
1858
1858
  reportData: D,
1859
1859
  fields: F,
1860
1860
  values: T,
@@ -1907,7 +1907,7 @@ const Nt = ({
1907
1907
  id: ((G = v == null ? void 0 : v.view_id) == null ? void 0 : G[0]) || void 0,
1908
1908
  context: A
1909
1909
  });
1910
- return C({
1910
+ return S({
1911
1911
  domain: L,
1912
1912
  model: v.res_model,
1913
1913
  formView: B,
@@ -1933,14 +1933,14 @@ const Nt = ({
1933
1933
  }), { closeParent: !0 };
1934
1934
  }
1935
1935
  }
1936
- function C({
1936
+ function S({
1937
1937
  domain: D,
1938
1938
  model: F,
1939
1939
  formView: T,
1940
1940
  context: _,
1941
1941
  actionData: v
1942
1942
  }) {
1943
- m ? R({ domain: D, model: F, formView: T, context: _, actionData: v }) : (g({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0));
1943
+ m ? R({ domain: D, model: F, formView: T, context: _, actionData: v }) : (y({ 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
- g({
1952
+ y({
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)), g({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0);
1958
+ }), p(!1), await new Promise((O) => setTimeout(O, 300)), y({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0);
1959
1959
  }
1960
1960
  async function V() {
1961
- xr(f.current), f.current = [], p(!1), g({
1961
+ xr(f.current), f.current = [], p(!1), y({
1962
1962
  domain: void 0,
1963
1963
  model: void 0,
1964
1964
  context: {},
@@ -1970,7 +1970,7 @@ const Nt = ({
1970
1970
  Pt.Provider,
1971
1971
  {
1972
1972
  value: {
1973
- processAction: S,
1973
+ processAction: C,
1974
1974
  globalValues: i
1975
1975
  },
1976
1976
  children: /* @__PURE__ */ k(Q, { children: [
@@ -1997,7 +1997,7 @@ const Nt = ({
1997
1997
  visible: m,
1998
1998
  onSubmitSucceed: V,
1999
1999
  onCancel: () => {
2000
- xr(f.current), f.current = [], p(!1), g({
2000
+ xr(f.current), f.current = [], p(!1), y({
2001
2001
  domain: void 0,
2002
2002
  model: void 0,
2003
2003
  context: {},
@@ -2101,12 +2101,12 @@ function Fa(e, t) {
2101
2101
  submitMode: m = "api",
2102
2102
  values: p,
2103
2103
  formView: h,
2104
- postSaveAction: g,
2105
- insideButtonModal: y = !1,
2104
+ postSaveAction: y,
2105
+ insideButtonModal: g = !1,
2106
2106
  parentContext: w = {},
2107
- actionDomain: S,
2107
+ actionDomain: C,
2108
2108
  visible: x = !0,
2109
- rootForm: C = !1,
2109
+ rootForm: S = !1,
2110
2110
  defaultValues: R,
2111
2111
  forcedValues: V = {},
2112
2112
  parentWidth: D
@@ -2120,7 +2120,7 @@ function Fa(e, t) {
2120
2120
  setAttachments: _e = void 0,
2121
2121
  title: We = void 0,
2122
2122
  setTitle: Ke = void 0
2123
- } = (C ? Ne : {}) || {}, j = ne(
2123
+ } = (S ? Ne : {}) || {}, j = ne(
2124
2124
  Pt
2125
2125
  ), { processAction: ge, globalValues: Ve } = j || {};
2126
2126
  wt(t, () => ({
@@ -2251,7 +2251,7 @@ function Fa(e, t) {
2251
2251
  se == null || se(!0), O(void 0), P != null && P.fields ? (J = P.fields, X = P.arch) : (J = N, X = B), p && (P == null ? void 0 : P.forceRefresh) !== !0 ? H = p : { values: H, defaultGetCalled: be } = await No({
2252
2252
  fields: J,
2253
2253
  arch: X
2254
- }), S && (H = { ...Zs(S), ...H }), K.current = _t(H, J), ft({
2254
+ }), C && (H = { ...Zs(C), ...H }), K.current = _t(H, J), ft({
2255
2255
  values: H,
2256
2256
  fields: J,
2257
2257
  reset: !0,
@@ -2306,7 +2306,7 @@ function Fa(e, t) {
2306
2306
  ids: [ie()],
2307
2307
  fields: P,
2308
2308
  context: w
2309
- }))[0], y)
2309
+ }))[0], g)
2310
2310
  return { values: J, defaultGetCalled: X };
2311
2311
  const be = await E.getHandler().search({
2312
2312
  params: [
@@ -2351,10 +2351,10 @@ function Fa(e, t) {
2351
2351
  });
2352
2352
  M.current = X, K.current = J;
2353
2353
  }
2354
- g && await g([ie()]), !y && H && (de == null || de(ie(), Ae(), te()));
2354
+ y && await y([ie()]), !g && H && (de == null || de(ie(), Ae(), te()));
2355
2355
  }, Po = async (P) => {
2356
2356
  const { callOnSubmitSucceed: H = !0 } = P || {};
2357
- !y && H && (de == null || de(ie(), Ae(), te()));
2357
+ !g && 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 Fa(e, t) {
2513
2513
  ...H
2514
2514
  }
2515
2515
  });
2516
- if (typeof J == "object" && J !== null && Object.keys(J).length === 0 && y)
2516
+ if (typeof J == "object" && J !== null && Object.keys(J).length === 0 && g)
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());
@@ -2566,7 +2566,7 @@ function Fa(e, t) {
2566
2566
  lt({ forceRefresh: !0 });
2567
2567
  }
2568
2568
  })) || {};
2569
- !C && J && (de == null || de(ie(), Ae(), te()));
2569
+ !S && J && (de == null || de(ie(), Ae(), te()));
2570
2570
  }
2571
2571
  function Wo() {
2572
2572
  wn({ elementHasLostFocus: !0 });
@@ -2607,7 +2607,7 @@ function Fa(e, t) {
2607
2607
  getValues: Ae,
2608
2608
  getPlainValues: Y,
2609
2609
  getFields: je,
2610
- domain: S,
2610
+ domain: C,
2611
2611
  activeId: i,
2612
2612
  activeModel: n,
2613
2613
  setFieldValue: bt,
@@ -2691,7 +2691,7 @@ const zt = yt(Fa), 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), [g, y] = b(), { action_id: w, res_id: S, action_type: x, view_id: C } = l || {};
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 || {};
2695
2695
  pe(() => {
2696
2696
  a && R();
2697
2697
  }, [l, a]);
@@ -2699,15 +2699,15 @@ const zt = yt(Fa), Jt = (e) => {
2699
2699
  const T = await E.getHandler().isShortcutFavorite({
2700
2700
  action_id: w,
2701
2701
  action_type: x,
2702
- view_id: C,
2703
- res_id: S || !1
2702
+ view_id: S,
2703
+ res_id: C || !1
2704
2704
  });
2705
- h(T !== !1), T !== !1 && y(T);
2705
+ h(T !== !1), T !== !1 && g(T);
2706
2706
  }
2707
2707
  async function V() {
2708
- if (p && g)
2708
+ if (p && y)
2709
2709
  await E.getHandler().removeFavourite({
2710
- shortcut_id: g
2710
+ shortcut_id: y
2711
2711
  });
2712
2712
  else {
2713
2713
  const { action_id: T, res_id: _, action_type: v, view_id: O } = l;
@@ -2756,7 +2756,7 @@ const zt = yt(Fa), Jt = (e) => {
2756
2756
  parentWidth: F,
2757
2757
  ...d
2758
2758
  },
2759
- `${u}-${n}-${w}-${S}-${x}-${C}-${i}`
2759
+ `${u}-${n}-${w}-${C}-${x}-${S}-${i}`
2760
2760
  )
2761
2761
  }
2762
2762
  ) });
@@ -2934,7 +2934,7 @@ const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Ma
2934
2934
  }), u = a && !s ? La : Tt;
2935
2935
  function f(c) {
2936
2936
  const m = c.map((p) => {
2937
- const h = l.find(([g, y]) => p === y);
2937
+ const h = l.find(([y, g]) => p === g);
2938
2938
  return h && h[0];
2939
2939
  });
2940
2940
  if (m.length === 0) {
@@ -3122,18 +3122,18 @@ function po(e) {
3122
3122
  searchError: c,
3123
3123
  searchValues: m,
3124
3124
  showLimitOptions: p = !0
3125
- } = e, [h, g] = b(), [y, w] = b(), [S, x] = b(!1), C = ae(), { token: R } = Ja(), [V] = ct.useForm();
3125
+ } = e, [h, y] = b(), [g, w] = b(), [C, x] = b(!1), S = ae(), { token: R } = Ja(), [V] = ct.useForm();
3126
3126
  pe(() => {
3127
3127
  V.setFieldsValue(m);
3128
3128
  }, [m]);
3129
3129
  const D = () => {
3130
- if (!y)
3130
+ if (!g)
3131
3131
  return;
3132
- const _ = S ? y : h, v = _ == null ? void 0 : _.rows;
3132
+ const _ = C ? g : 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($a, { field: L }) }, G)) }, A));
3134
3134
  };
3135
3135
  Ft(() => {
3136
- x(!1), C.current = new di(n, t), C.current.parse(), g(C.current._simpleSearchContainer), w(C.current._advancedSearchContainer);
3136
+ x(!1), S.current = new di(n, t), S.current.parse(), y(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3137
3137
  }, [t, n]);
3138
3138
  const F = D(), T = (_) => {
3139
3139
  var L;
@@ -3141,7 +3141,7 @@ function po(e) {
3141
3141
  delete _.offset, delete _.limit;
3142
3142
  const A = Ka(
3143
3143
  _,
3144
- (L = C.current) == null ? void 0 : L._advancedSearchContainer
3144
+ (L = S.current) == null ? void 0 : L._advancedSearchContainer
3145
3145
  );
3146
3146
  o({ params: A, offset: O, limit: v, searchValues: _ });
3147
3147
  };
@@ -3164,13 +3164,13 @@ function po(e) {
3164
3164
  initialValues: { offset: a, limit: l },
3165
3165
  children: [
3166
3166
  F,
3167
- S && p && /* @__PURE__ */ r(Ha, { onLimitChange: d }),
3167
+ C && p && /* @__PURE__ */ r(Ha, { onLimitChange: d }),
3168
3168
  /* @__PURE__ */ r(
3169
3169
  Ba,
3170
3170
  {
3171
- advancedFilter: S,
3171
+ advancedFilter: C,
3172
3172
  onAdvancedFilterToggle: () => {
3173
- x(!S);
3173
+ x(!C);
3174
3174
  },
3175
3175
  onClear: () => {
3176
3176
  V.resetFields(), i();
@@ -3413,11 +3413,11 @@ const tl = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(yo,
3413
3413
  Pt
3414
3414
  ), { processAction: c } = f || {}, [m, p] = tt(
3415
3415
  E.getHandler().getView
3416
- ), [h, g] = tt(
3416
+ ), [h, y] = tt(
3417
3417
  E.getHandler().readObjects
3418
- ), y = fe(() => {
3419
- p(), g();
3420
- }, [p, g]), w = fe(async () => {
3418
+ ), g = fe(() => {
3419
+ p(), y();
3420
+ }, [p, y]), w = fe(async () => {
3421
3421
  var V;
3422
3422
  const x = await m({
3423
3423
  model: n,
@@ -3425,14 +3425,14 @@ const tl = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(yo,
3425
3425
  context: i
3426
3426
  });
3427
3427
  s(x);
3428
- const C = ol(x);
3428
+ const S = ol(x);
3429
3429
  let R = {};
3430
- if (C.length > 0 && (R = { ...(V = await h({
3430
+ if (S.length > 0 && (R = { ...(V = await h({
3431
3431
  model: n,
3432
3432
  ids: [t],
3433
- fieldsToRetrieve: C,
3433
+ fieldsToRetrieve: S,
3434
3434
  context: i
3435
- })) == null ? void 0 : V[0] }), R = { ..._t(R, C), active_id: t }, l(R), !(!x || !x.toolbar))
3435
+ })) == null ? void 0 : V[0] }), R = { ..._t(R, S), active_id: t }, l(R), !(!x || !x.toolbar))
3436
3436
  return {
3437
3437
  actionItems: x.toolbar.action,
3438
3438
  relateItems: x.toolbar.relate,
@@ -3441,12 +3441,12 @@ const tl = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(yo,
3441
3441
  }, [i, m, t, n, h]);
3442
3442
  if (!t)
3443
3443
  return null;
3444
- function S({ item: x, type: C }) {
3444
+ function C({ item: x, type: S }) {
3445
3445
  const R = {
3446
3446
  values: a,
3447
3447
  fields: o.fields
3448
3448
  };
3449
- switch (C) {
3449
+ switch (S) {
3450
3450
  case "action":
3451
3451
  c == null || c({
3452
3452
  actionData: x,
@@ -3477,9 +3477,9 @@ const tl = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(yo,
3477
3477
  rl,
3478
3478
  {
3479
3479
  onRetrieveData: w,
3480
- onItemClick: S,
3480
+ onItemClick: C,
3481
3481
  onOpenChange: (x) => {
3482
- x || y();
3482
+ x || g();
3483
3483
  }
3484
3484
  }
3485
3485
  );
@@ -3691,8 +3691,8 @@ const al = (e) => {
3691
3691
  });
3692
3692
  s(
3693
3693
  m.map((p) => {
3694
- const { id: h, name: g } = p;
3695
- return { id: h, name: g };
3694
+ const { id: h, name: y } = p;
3695
+ return { id: h, name: y };
3696
3696
  })
3697
3697
  );
3698
3698
  } catch (m) {
@@ -3706,8 +3706,8 @@ const al = (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, g = Kt(h);
3710
- return /* @__PURE__ */ r(er, { color: g, children: h }, `${p}`);
3709
+ const { id: p, name: h } = m, y = Kt(h);
3710
+ return /* @__PURE__ */ r(er, { color: y, children: h }, `${p}`);
3711
3711
  }),
3712
3712
  [o]
3713
3713
  );
@@ -3757,18 +3757,18 @@ const al = (e) => {
3757
3757
  onRowSelectionChange: m,
3758
3758
  scrollY: p,
3759
3759
  colorsForResults: h = {},
3760
- statusForResults: g = {},
3761
- onChangeSort: y,
3760
+ statusForResults: y = {},
3761
+ onChangeSort: g,
3762
3762
  sorter: w,
3763
- onFetchChildrenForRecord: S,
3763
+ onFetchChildrenForRecord: C,
3764
3764
  childField: x,
3765
- rootTree: C = !1,
3765
+ rootTree: S = !1,
3766
3766
  context: R,
3767
3767
  readonly: V,
3768
3768
  onSelectAllRecords: D
3769
3769
  } = e, F = ae(null), [T, _] = b([]), v = ae(!1), [O, A] = b(), { t: L } = we(), G = ae(i), B = ne(
3770
3770
  rt
3771
- ), { title: q = void 0, setTitle: N = void 0 } = (C ? B : {}) || {}, Z = De(() => {
3771
+ ), { title: q = void 0, setTitle: N = void 0 } = (S ? B : {}) || {}, Z = De(() => {
3772
3772
  if (O)
3773
3773
  return Bs(
3774
3774
  O,
@@ -3865,20 +3865,20 @@ const al = (e) => {
3865
3865
  if (h[z.id])
3866
3866
  return { color: h[z.id] };
3867
3867
  },
3868
- onRowStatus: Hs(g) ? (z) => {
3869
- if (g[z.id])
3870
- return /* @__PURE__ */ r(oi, { color: g[z.id] });
3868
+ onRowStatus: Hs(y) ? (z) => {
3869
+ if (y[z.id])
3870
+ return /* @__PURE__ */ r(oi, { color: y[z.id] });
3871
3871
  } : void 0,
3872
3872
  onRowDoubleClick: u,
3873
3873
  onRowSelectionChange: m,
3874
- onChangeSort: y,
3874
+ onChangeSort: g,
3875
3875
  sorter: w,
3876
3876
  readonly: V,
3877
- expandableOpts: S ? {
3877
+ expandableOpts: C ? {
3878
3878
  expandIcon: yi,
3879
3879
  collapseIcon: wi,
3880
3880
  loadingIcon: st,
3881
- onFetchChildrenForRecord: S,
3881
+ onFetchChildrenForRecord: C,
3882
3882
  childField: x
3883
3883
  } : void 0
3884
3884
  }
@@ -3905,27 +3905,27 @@ const bo = (e) => {
3905
3905
  formView: m,
3906
3906
  sorter: p,
3907
3907
  setSorter: h,
3908
- setCurrentItemIndex: g,
3909
- setResultsActionView: y,
3908
+ setCurrentItemIndex: y,
3909
+ setResultsActionView: g,
3910
3910
  resultsActionView: w,
3911
- domain: S,
3911
+ domain: C,
3912
3912
  currentId: x,
3913
- limit: C,
3913
+ limit: S,
3914
3914
  setLimit: R,
3915
3915
  searchParams: V = [],
3916
3916
  setSearchValues: D,
3917
3917
  clearSelection: F
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(C || St), z = ae([]), re = fe(
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
- y == null || y([...se]), U([...se]);
3920
+ g == null || g([...se]), U([...se]);
3921
3921
  },
3922
- [y]
3922
+ [g]
3923
3923
  ), ve = fe(() => w || oe, [w, oe]), W = fe(async () => {
3924
3924
  const se = await E.getHandler().nameSearch({
3925
3925
  model: t,
3926
3926
  payload: l,
3927
3927
  limit: le.current,
3928
- attrs: S,
3928
+ attrs: C,
3929
3929
  context: u
3930
3930
  });
3931
3931
  if (ee(se.length), f == null || f(se.length), se.length > 0) {
@@ -3945,9 +3945,9 @@ const bo = (e) => {
3945
3945
  sorter: p,
3946
3946
  fields: { ...c.fields, ...m.fields }
3947
3947
  }) : [...z.current];
3948
- re(he), de.length > 0 ? g == null || g(0) : g == null || g(void 0);
3948
+ re(he), de.length > 0 ? y == null || y(0) : y == null || y(void 0);
3949
3949
  } else
3950
- re([]), g == null || g(void 0);
3950
+ re([]), y == null || y(void 0);
3951
3951
  _(!1), d.current = !0;
3952
3952
  }, [
3953
3953
  re,
@@ -3955,15 +3955,15 @@ const bo = (e) => {
3955
3955
  l,
3956
3956
  t,
3957
3957
  u,
3958
- S,
3958
+ C,
3959
3959
  c,
3960
3960
  m,
3961
3961
  p,
3962
- g,
3962
+ y,
3963
3963
  f
3964
3964
  ]), ce = fe(
3965
3965
  async (se) => {
3966
- const { params: _e, newOffset: We } = se || {}, Ke = jt(_e || V, S), { colors: j, status: ge } = At(c), Ve = {};
3966
+ const { params: _e, newOffset: We } = se || {}, Ke = jt(_e || V, C), { colors: j, status: ge } = At(c), Ve = {};
3967
3967
  j && (Ve.colors = j), ge && (Ve.status = ge);
3968
3968
  const { totalItems: de, results: he, attrsEvaluated: ye } = await E.getHandler().searchForTree({
3969
3969
  params: Ke,
@@ -3984,21 +3984,21 @@ const bo = (e) => {
3984
3984
  const Ae = ie.findIndex(
3985
3985
  (Y) => x === Y.id
3986
3986
  );
3987
- Ae === -1 ? g == null || g(0) : g == null || g(Ae);
3987
+ Ae === -1 ? y == null || y(0) : y == null || y(Ae);
3988
3988
  } else
3989
- g == null || g(void 0);
3989
+ y == null || y(void 0);
3990
3990
  _(!1);
3991
3991
  const je = await de;
3992
3992
  ee(je), f == null || f(je);
3993
3993
  },
3994
3994
  [
3995
- g,
3995
+ y,
3996
3996
  w,
3997
3997
  re,
3998
3998
  x,
3999
3999
  t,
4000
4000
  u,
4001
- S,
4001
+ C,
4002
4002
  c,
4003
4003
  m,
4004
4004
  p,
@@ -4065,18 +4065,18 @@ const bo = (e) => {
4065
4065
  ]
4066
4066
  ), Ne = fe(
4067
4067
  (se) => {
4068
- _(!0), B(se), N((se - 1) * C);
4068
+ _(!0), B(se), N((se - 1) * S);
4069
4069
  },
4070
- [_, C, N, B]
4070
+ [_, S, N, B]
4071
4071
  ), me = fe(() => {
4072
- T || (n == null || n(void 0), o == null || o([]), D == null || D({}), L(void 0), N(0), B(1), R == null || R(C || St));
4072
+ T || (n == null || n(void 0), o == null || o([]), D == null || D({}), L(void 0), N(0), B(1), R == null || R(S || St));
4073
4073
  }, [
4074
4074
  T,
4075
4075
  n,
4076
4076
  o,
4077
4077
  D,
4078
4078
  R,
4079
- C
4079
+ S
4080
4080
  ]), Fe = fe(
4081
4081
  async (se) => {
4082
4082
  const _e = se[(c == null ? void 0 : c.field_parent) || "child_id"], We = await E.getHandler().readObjects({
@@ -4089,11 +4089,11 @@ const bo = (e) => {
4089
4089
  },
4090
4090
  [c, t, u, ve, re]
4091
4091
  ), Le = fe(async () => await E.getHandler().searchAllIds({
4092
- params: jt(V, S),
4092
+ params: jt(V, C),
4093
4093
  model: t,
4094
4094
  context: u,
4095
4095
  totalItems: Z
4096
- }), [t, u, Z, V, S]);
4096
+ }), [t, u, Z, V, C]);
4097
4097
  return {
4098
4098
  submit: Me,
4099
4099
  clear: me,
@@ -4128,7 +4128,7 @@ function Tl(e, t) {
4128
4128
  rootTree: f = !1,
4129
4129
  parentContext: c = {},
4130
4130
  onChangeSelectedRowKeys: m
4131
- } = e, [p, h] = b(!1), [g, y] = b(!1), w = ae(!1), S = ae(null), [x, C] = 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), [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(
4132
4132
  Pt
4133
4133
  ), { processAction: B } = G || {}, q = ne(
4134
4134
  rt
@@ -4199,7 +4199,7 @@ function Tl(e, t) {
4199
4199
  setActionViewTotalItems: ve,
4200
4200
  limit: Me,
4201
4201
  setLimit: Ne,
4202
- clearSelection: (lt = S.current) == null ? void 0 : lt.unselectAll
4202
+ clearSelection: (lt = C.current) == null ? void 0 : lt.unselectAll
4203
4203
  });
4204
4204
  wt(t, () => ({
4205
4205
  refreshResults: () => {
@@ -4208,19 +4208,19 @@ function Tl(e, t) {
4208
4208
  getFields: () => R == null ? void 0 : R.fields,
4209
4209
  getDomain: () => d
4210
4210
  })), pe(() => {
4211
- g && u && R && (w.current = !1, se());
4212
- }, [j, Ve, g, u, a, R]);
4211
+ y && u && R && (w.current = !1, se());
4212
+ }, [j, Ve, y, u, a, R]);
4213
4213
  const Re = async () => {
4214
- y(!1), h(!0), _(void 0), ce == null || ce(!0);
4214
+ g(!1), h(!0), _(void 0), ce == null || ce(!0);
4215
4215
  try {
4216
- await xe(), y(!0);
4216
+ await xe(), g(!0);
4217
4217
  } catch (Pe) {
4218
4218
  _(Pe), ce == null || ce(!1);
4219
4219
  } finally {
4220
4220
  h(!1);
4221
4221
  }
4222
4222
  }, xe = async () => {
4223
- C(n);
4223
+ S(n);
4224
4224
  let Pe = i;
4225
4225
  i || (Pe = await E.getHandler().getView({
4226
4226
  model: n,
@@ -4311,7 +4311,7 @@ function Tl(e, t) {
4311
4311
  /* @__PURE__ */ r(
4312
4312
  Xt,
4313
4313
  {
4314
- ref: S,
4314
+ ref: C,
4315
4315
  context: c,
4316
4316
  total: Y,
4317
4317
  limit: ge,
@@ -4377,26 +4377,26 @@ const Co = yt(Tl), xo = (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([]), g = async () => {
4380
+ } = e, [d, u] = b(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = we(), [p, h] = b([]), y = async () => {
4381
4381
  await new Promise((x) => setTimeout(x, 5)), n();
4382
- }, y = async (x) => {
4383
- const { id: C } = x;
4384
- i([C]);
4382
+ }, g = async (x) => {
4383
+ const { id: S } = x;
4384
+ i([S]);
4385
4385
  };
4386
4386
  function w() {
4387
4387
  if (p.length === 0) {
4388
- g();
4388
+ y();
4389
4389
  return;
4390
4390
  }
4391
4391
  i(p);
4392
4392
  }
4393
- const S = () => /* @__PURE__ */ k(Q, { children: [
4393
+ const C = () => /* @__PURE__ */ k(Q, { children: [
4394
4394
  /* @__PURE__ */ r(
4395
4395
  Co,
4396
4396
  {
4397
4397
  model: o,
4398
4398
  nameSearch: s,
4399
- onRowClicked: y,
4399
+ onRowClicked: g,
4400
4400
  treeScrollY: c * 0.3,
4401
4401
  domain: a,
4402
4402
  parentContext: l,
@@ -4426,7 +4426,7 @@ const Co = yt(Tl), xo = (e) => {
4426
4426
  children: m("ok")
4427
4427
  }
4428
4428
  ),
4429
- /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ut, {}), onClick: g, children: m("cancel") })
4429
+ /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ut, {}), onClick: y, children: m("cancel") })
4430
4430
  ] }) })
4431
4431
  ] });
4432
4432
  return /* @__PURE__ */ k(Q, { children: [
@@ -4438,11 +4438,11 @@ const Co = yt(Tl), xo = (e) => {
4438
4438
  width: f,
4439
4439
  open: t && !d,
4440
4440
  closable: !0,
4441
- onCancel: g,
4441
+ onCancel: y,
4442
4442
  footer: null,
4443
4443
  destroyOnClose: !0,
4444
4444
  maskClosable: !1,
4445
- children: S()
4445
+ children: C()
4446
4446
  }
4447
4447
  ),
4448
4448
  /* @__PURE__ */ r(
@@ -4452,10 +4452,10 @@ const Co = yt(Tl), xo = (e) => {
4452
4452
  visible: d,
4453
4453
  parentContext: l,
4454
4454
  onSubmitSucceed: (x) => {
4455
- u(!1), g(), i([x]);
4455
+ u(!1), y(), i([x]);
4456
4456
  },
4457
4457
  onCancel: () => {
4458
- u(!1), g();
4458
+ u(!1), y();
4459
4459
  }
4460
4460
  }
4461
4461
  )
@@ -4485,7 +4485,7 @@ const Co = yt(Tl), xo = (e) => {
4485
4485
  context: l,
4486
4486
  id: d,
4487
4487
  domain: u
4488
- } = i, f = o && !a ? { backgroundColor: So.colorPrimaryBg } : void 0, [c, m] = b(!1), [p, h] = b(!1), [g, y] = b(!1), [w, S] = b(), x = ae(!1), [C, 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: So.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] || "";
4489
4489
  pe(() => {
4490
4490
  !Array.isArray(t) && t && U(t);
4491
4491
  }, [t]), pe(() => {
@@ -4496,12 +4496,12 @@ const Co = yt(Tl), xo = (e) => {
4496
4496
  }, Z = (K) => {
4497
4497
  V.current = K.target.value, N([void 0, ""]);
4498
4498
  }, ee = async () => {
4499
- if (!g && C !== q) {
4499
+ if (!y && 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
- y(!0);
4504
+ g(!0);
4505
4505
  try {
4506
4506
  if (A.current && A.current.length > 0)
4507
4507
  oe(V.current);
@@ -4516,7 +4516,7 @@ const Co = yt(Tl), xo = (e) => {
4516
4516
  } catch (K) {
4517
4517
  on(K);
4518
4518
  } finally {
4519
- y(!1);
4519
+ g(!1);
4520
4520
  }
4521
4521
  }
4522
4522
  }, oe = async (K) => {
@@ -4527,12 +4527,12 @@ const Co = yt(Tl), xo = (e) => {
4527
4527
  context: { ...v == null ? void 0 : v(), ...l },
4528
4528
  totalItems: 2
4529
4529
  });
4530
- le.length === 1 ? U(le[0]) : (S(K), m(!0));
4530
+ le.length === 1 ? U(le[0]) : (C(K), m(!0));
4531
4531
  return;
4532
4532
  }
4533
- S(K), m(!0);
4533
+ C(K), m(!0);
4534
4534
  }, U = async (K) => {
4535
- y(!0);
4535
+ g(!0);
4536
4536
  try {
4537
4537
  const le = await E.getHandler().execute({
4538
4538
  action: "name_get",
@@ -4544,7 +4544,7 @@ const Co = yt(Tl), xo = (e) => {
4544
4544
  } catch (le) {
4545
4545
  on(le);
4546
4546
  } finally {
4547
- y(!1);
4547
+ g(!1);
4548
4548
  }
4549
4549
  };
4550
4550
  async function $() {
@@ -4571,7 +4571,7 @@ const Co = yt(Tl), xo = (e) => {
4571
4571
  o && !a ? Il : it,
4572
4572
  {
4573
4573
  type: "text",
4574
- value: C,
4574
+ value: S,
4575
4575
  disabled: a,
4576
4576
  onChange: Z,
4577
4577
  style: {
@@ -4595,7 +4595,7 @@ const Co = yt(Tl), xo = (e) => {
4595
4595
  ke,
4596
4596
  {
4597
4597
  icon: /* @__PURE__ */ r(Hn, {}),
4598
- disabled: B === void 0 || q === "" || C === void 0,
4598
+ disabled: B === void 0 || q === "" || S === void 0,
4599
4599
  onClick: () => {
4600
4600
  h(!0);
4601
4601
  },
@@ -4606,8 +4606,8 @@ const Co = yt(Tl), xo = (e) => {
4606
4606
  /* @__PURE__ */ r(ue, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ r(
4607
4607
  ke,
4608
4608
  {
4609
- icon: g ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(Wn, {}),
4610
- disabled: a || g,
4609
+ icon: y ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(Wn, {}),
4610
+ disabled: a || y,
4611
4611
  onClick: () => {
4612
4612
  x.current = !0, oe(q);
4613
4613
  },
@@ -4687,7 +4687,7 @@ const Co = yt(Tl), xo = (e) => {
4687
4687
  field: u,
4688
4688
  operator: f,
4689
4689
  manualIds: c
4690
- } = e, [m, p] = b(!1), [h, g] = b(), [y, w] = b(), [S, x] = b(), [C, R] = b(0), [V, D] = b(0), [F, T] = b(), [_, v] = b(), [O, A] = b(), [L] = tt(
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(
4691
4691
  E.getHandler().searchAllIds
4692
4692
  ), [G] = tt(
4693
4693
  E.getHandler().readObjects
@@ -4757,7 +4757,7 @@ const Co = yt(Tl), xo = (e) => {
4757
4757
  let U, $;
4758
4758
  try {
4759
4759
  const I = await Z({ domain: n, isTotal: !1 });
4760
- if (g(I), s) {
4760
+ if (y(I), s) {
4761
4761
  const M = await q({
4762
4762
  domain: s,
4763
4763
  values: {},
@@ -4804,10 +4804,10 @@ const Co = yt(Tl), xo = (e) => {
4804
4804
  kl,
4805
4805
  {
4806
4806
  value: h,
4807
- total: S,
4808
- percent: y,
4807
+ total: C,
4808
+ percent: g,
4809
4809
  measureRef: U,
4810
- height: C,
4810
+ height: S,
4811
4811
  width: V,
4812
4812
  color: F,
4813
4813
  icon: _,
@@ -4817,9 +4817,9 @@ const Co = yt(Tl), xo = (e) => {
4817
4817
  Dl,
4818
4818
  {
4819
4819
  value: h,
4820
- total: S,
4820
+ total: C,
4821
4821
  measureRef: U,
4822
- height: C,
4822
+ height: S,
4823
4823
  width: V,
4824
4824
  color: F,
4825
4825
  icon: _,
@@ -4902,7 +4902,7 @@ function kl({
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 g = l && dt(l, { style: { fontSize: f } });
4905
+ const y = l && dt(l, { style: { fontSize: f } });
4906
4906
  return /* @__PURE__ */ r(
4907
4907
  "div",
4908
4908
  {
@@ -4918,9 +4918,9 @@ function kl({
4918
4918
  padding: "0.2rem"
4919
4919
  },
4920
4920
  children: /* @__PURE__ */ k(Oe, { align: "middle", children: [
4921
- g && /* @__PURE__ */ r(ue, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(g, {}) }),
4921
+ y && /* @__PURE__ */ r(ue, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(y, {}) }),
4922
4922
  /* @__PURE__ */ k(ue, { children: [
4923
- /* @__PURE__ */ r(Vn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: g ? ` ${i}%` : `${i}%` }),
4923
+ /* @__PURE__ */ r(Vn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: y ? ` ${i}%` : `${i}%` }),
4924
4924
  /* @__PURE__ */ r(
4925
4925
  Vn,
4926
4926
  {
@@ -5079,11 +5079,11 @@ const { processGraphData: Ll } = Kr, { getFieldsToRetrieve: $l } = mi, Bl = (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, g] = b(), [y, w] = b("line"), [S] = tt(
5082
+ } = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), [h, y] = b(), [g, w] = b("line"), [C] = tt(
5083
5083
  E.getHandler().getFields
5084
5084
  ), [x] = tt(
5085
5085
  E.getHandler().readObjects
5086
- ), [C] = tt(E.getHandler().search), R = fe(async () => {
5086
+ ), [S] = tt(E.getHandler().search), R = fe(async () => {
5087
5087
  u(!0), c(void 0);
5088
5088
  const V = Bn(o);
5089
5089
  w(V.type || "line");
@@ -5099,9 +5099,9 @@ const { processGraphData: Ll } = Kr, { getFieldsToRetrieve: $l } = mi, Bl = (e)
5099
5099
  fields: D,
5100
5100
  manualIds: l,
5101
5101
  methods: {
5102
- getFields: S,
5102
+ getFields: C,
5103
5103
  readObjects: x,
5104
- search: C
5104
+ search: S
5105
5105
  }
5106
5106
  }));
5107
5107
  } catch (_) {
@@ -5113,12 +5113,12 @@ const { processGraphData: Ll } = Kr, { getFieldsToRetrieve: $l } = mi, Bl = (e)
5113
5113
  return c("No values or fields returned"), u(!1), {
5114
5114
  loading: d,
5115
5115
  error: f,
5116
- type: y,
5116
+ type: g,
5117
5117
  values: m,
5118
5118
  evaluatedEntries: h,
5119
5119
  fetchData: R
5120
5120
  };
5121
- g(F);
5121
+ y(F);
5122
5122
  const _ = Ll({
5123
5123
  ooui: V,
5124
5124
  values: F,
@@ -5138,22 +5138,22 @@ const { processGraphData: Ll } = Kr, { getFieldsToRetrieve: $l } = mi, Bl = (e)
5138
5138
  n,
5139
5139
  f,
5140
5140
  h,
5141
- S,
5141
+ C,
5142
5142
  s,
5143
5143
  d,
5144
5144
  l,
5145
5145
  t,
5146
5146
  m,
5147
5147
  x,
5148
- C,
5149
- y,
5148
+ S,
5149
+ g,
5150
5150
  a,
5151
5151
  o
5152
5152
  ]);
5153
5153
  return {
5154
5154
  loading: d,
5155
5155
  error: f,
5156
- type: y,
5156
+ type: g,
5157
5157
  values: m,
5158
5158
  evaluatedEntries: h,
5159
5159
  fetchData: R
@@ -5194,7 +5194,7 @@ async function Kl({
5194
5194
  fieldsToRetrieve: e,
5195
5195
  context: i
5196
5196
  });
5197
- return o && (p = [...p].sort((h, g) => h[o] - g[o])), {
5197
+ return o && (p = [...p].sort((h, y) => h[o] - y[o])), {
5198
5198
  values: p,
5199
5199
  fields: c
5200
5200
  };
@@ -5216,7 +5216,7 @@ const jl = {
5216
5216
  bar: Li,
5217
5217
  pie: $i
5218
5218
  }, Wl = (e) => {
5219
- var S;
5219
+ var C;
5220
5220
  const { model: t, domain: n, context: i, xml: o, limit: s, manualIds: a } = e, { t: l } = we(), { error: d, loading: u, values: f, type: c, evaluatedEntries: m, fetchData: p } = Bl({
5221
5221
  model: t,
5222
5222
  xml: o,
@@ -5234,9 +5234,9 @@ const jl = {
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: g, isStack: y } = f, w = jl[c];
5237
+ const { data: h, isGroup: y, isStack: g } = f, w = jl[c];
5238
5238
  return w ? /* @__PURE__ */ k("div", { style: { padding: "1rem" }, children: [
5239
- /* @__PURE__ */ r("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(S = m == null ? void 0 : m.length) == null ? void 0 : S.toLocaleString(
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",
5241
5241
  {
5242
5242
  useGrouping: !0
@@ -5248,8 +5248,8 @@ const jl = {
5248
5248
  ...Ul({
5249
5249
  type: c,
5250
5250
  data: h,
5251
- isGroup: g,
5252
- isStack: y
5251
+ isGroup: y,
5252
+ isStack: g
5253
5253
  })
5254
5254
  }
5255
5255
  )
@@ -5263,7 +5263,7 @@ function Ul(e) {
5263
5263
  const Yl = (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: g = void 0 } = h || {}, [y] = tt(E.getHandler().getView);
5266
+ ), { setGraphIsLoading: y = void 0 } = h || {}, [g] = tt(E.getHandler().getView);
5267
5267
  wt(t, () => ({
5268
5268
  refresh: () => {
5269
5269
  w();
@@ -5272,19 +5272,19 @@ const Yl = (e, t) => {
5272
5272
  w();
5273
5273
  }, [n]);
5274
5274
  async function w() {
5275
- u(!0), g == null || g(!0);
5275
+ u(!0), y == null || y(!0);
5276
5276
  try {
5277
- const S = await y({
5277
+ const C = await g({
5278
5278
  model: i,
5279
5279
  id: n,
5280
5280
  type: "graph",
5281
5281
  context: o
5282
5282
  });
5283
- p(S.arch);
5284
- const x = Bn(S.arch);
5285
- c(x), u(!1), g == null || g(!1);
5286
- } catch (S) {
5287
- return console.error(S), u(!1), g == null || g(!1), /* @__PURE__ */ r(Q, { children: JSON.stringify(S) });
5283
+ p(C.arch);
5284
+ const x = Bn(C.arch);
5285
+ c(x), u(!1), y == null || y(!1);
5286
+ } catch (C) {
5287
+ return console.error(C), u(!1), y == null || y(!1), /* @__PURE__ */ r(Q, { children: JSON.stringify(C) });
5288
5288
  }
5289
5289
  }
5290
5290
  if (d)
@@ -5307,21 +5307,21 @@ const Yl = (e, t) => {
5307
5307
  switch (f.type) {
5308
5308
  case "indicatorField":
5309
5309
  case "indicator": {
5310
- const S = f, x = S.type === "indicatorField" ? {
5311
- field: S.field,
5312
- operator: S.operator
5310
+ const C = f, x = C.type === "indicatorField" ? {
5311
+ field: C.field,
5312
+ operator: C.operator
5313
5313
  } : {};
5314
5314
  return /* @__PURE__ */ r(
5315
5315
  Al,
5316
5316
  {
5317
- showPercent: S.showPercent,
5318
- totalDomain: S.totalDomain,
5319
- colorCondition: S.color,
5317
+ showPercent: C.showPercent,
5318
+ totalDomain: C.totalDomain,
5319
+ colorCondition: C.color,
5320
5320
  model: i,
5321
5321
  context: o,
5322
5322
  domain: s,
5323
- icon: S.icon,
5324
- suffix: S.suffix,
5323
+ icon: C.icon,
5324
+ suffix: C.suffix,
5325
5325
  manualIds: l,
5326
5326
  ...x
5327
5327
  }
@@ -5386,19 +5386,19 @@ const Yl = (e, t) => {
5386
5386
  onSearchItem: m,
5387
5387
  selectedRowKeys: p,
5388
5388
  showCreateButton: h,
5389
- showToggleButton: g
5390
- } = e, { token: y } = Xl();
5389
+ showToggleButton: y
5390
+ } = e, { token: g } = Xl();
5391
5391
  function w() {
5392
5392
  return /* @__PURE__ */ r("div", { className: "inline-block w-3" });
5393
5393
  }
5394
- function S() {
5394
+ function C() {
5395
5395
  return /* @__PURE__ */ r(
5396
5396
  "div",
5397
5397
  {
5398
5398
  className: "flex flex-grow h-8 text-white",
5399
5399
  style: {
5400
- borderRadius: y.borderRadius,
5401
- backgroundColor: y.colorPrimaryActive
5400
+ borderRadius: g.borderRadius,
5401
+ backgroundColor: g.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
  }
@@ -5415,7 +5415,7 @@ const Yl = (e, t) => {
5415
5415
  }
5416
5416
  );
5417
5417
  }
5418
- function C() {
5418
+ function S() {
5419
5419
  let V = "_";
5420
5420
  return l === 0 ? V = "_" : V = (d + 1).toString(), /* @__PURE__ */ k("span", { className: "pl-1 pr-1", children: [
5421
5421
  "(",
@@ -5436,7 +5436,7 @@ const Yl = (e, t) => {
5436
5436
  onClick: u
5437
5437
  }
5438
5438
  ),
5439
- C(),
5439
+ S(),
5440
5440
  /* @__PURE__ */ r(
5441
5441
  ze,
5442
5442
  {
@@ -5448,7 +5448,7 @@ const Yl = (e, t) => {
5448
5448
  ] });
5449
5449
  }
5450
5450
  return /* @__PURE__ */ k("div", { className: "flex mb-2", children: [
5451
- S(),
5451
+ C(),
5452
5452
  /* @__PURE__ */ k("div", { className: "flex-none h-8 pl-2", children: [
5453
5453
  s !== "graph" && h && /* @__PURE__ */ r(
5454
5454
  ze,
@@ -5472,7 +5472,7 @@ const Yl = (e, t) => {
5472
5472
  s !== "graph" && x(),
5473
5473
  s === "form" && R(),
5474
5474
  w(),
5475
- g && /* @__PURE__ */ r(
5475
+ y && /* @__PURE__ */ r(
5476
5476
  ze,
5477
5477
  {
5478
5478
  tooltip: "Toggle view mode",
@@ -5498,7 +5498,7 @@ const tc = (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
  Fo
5501
- ), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = we(), [w, S] = b(!1), [x, C] = 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: 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), {
5502
5502
  readOnly: $,
5503
5503
  relation: I,
5504
5504
  context: M,
@@ -5518,7 +5518,7 @@ const tc = (e) => {
5518
5518
  }, [s, a]);
5519
5519
  pe(() => {
5520
5520
  Me();
5521
- }, [g]);
5521
+ }, [y]);
5522
5522
  const ce = (Y) => {
5523
5523
  var te, Re;
5524
5524
  n == null || n({
@@ -5529,7 +5529,7 @@ const tc = (e) => {
5529
5529
  await Ee(), d > re.length - 1 && d !== 0 && u(0);
5530
5530
  }, Ee = async (Y) => {
5531
5531
  var te, Re, xe;
5532
- C(!0), S(!1), V(void 0);
5532
+ S(!0), C(!1), V(void 0);
5533
5533
  try {
5534
5534
  const [Se, Ie] = await Zn({
5535
5535
  treeView: {
@@ -5548,7 +5548,7 @@ const tc = (e) => {
5548
5548
  } catch (Se) {
5549
5549
  V(Se);
5550
5550
  } finally {
5551
- C(!1);
5551
+ S(!1);
5552
5552
  }
5553
5553
  };
5554
5554
  async function Me() {
@@ -5560,9 +5560,9 @@ const tc = (e) => {
5560
5560
  }),
5561
5561
  fields: m(),
5562
5562
  context: h()
5563
- })), g && g.length > 0 && (q.current = q.current.concat(
5563
+ })), y && y.length > 0 && (q.current = q.current.concat(
5564
5564
  Hr({
5565
- domain: g,
5565
+ domain: y,
5566
5566
  widgetFieldName: z
5567
5567
  })
5568
5568
  ));
@@ -5601,15 +5601,15 @@ const tc = (e) => {
5601
5601
  ce(xe);
5602
5602
  }, se = (Y) => {
5603
5603
  w ? qt({
5604
- t: y,
5604
+ t: g,
5605
5605
  onOk: () => {
5606
- Le(), Y(), S(!1);
5606
+ Le(), Y(), C(!1);
5607
5607
  }
5608
5608
  }) : Y();
5609
5609
  }, _e = () => {
5610
5610
  if (le) {
5611
5611
  Jl({
5612
- t: y,
5612
+ t: g,
5613
5613
  onOk: () => {
5614
5614
  a === "form" ? j() : ge();
5615
5615
  }
@@ -5617,7 +5617,7 @@ const tc = (e) => {
5617
5617
  return;
5618
5618
  }
5619
5619
  ql({
5620
- t: y,
5620
+ t: g,
5621
5621
  onOk: () => {
5622
5622
  a === "form" ? j() : ge();
5623
5623
  }
@@ -5633,7 +5633,7 @@ const tc = (e) => {
5633
5633
  _(!0);
5634
5634
  }) : _(!0);
5635
5635
  }, j = async () => {
5636
- C(!0), S(!1), V(void 0);
5636
+ S(!0), C(!1), V(void 0);
5637
5637
  try {
5638
5638
  if (re[d].id > 0) {
5639
5639
  const Y = s.map((te) => te.id === re[d].id ? {
@@ -5648,10 +5648,10 @@ const tc = (e) => {
5648
5648
  } catch (Y) {
5649
5649
  V(Y);
5650
5650
  }
5651
- u(0), C(!1);
5651
+ u(0), S(!1);
5652
5652
  }, ge = async () => {
5653
5653
  const Y = re.filter((te) => A.includes(te.id));
5654
- C(!0), S(!1), V(void 0);
5654
+ S(!0), C(!1), V(void 0);
5655
5655
  try {
5656
5656
  const te = Y.map((xe) => xe.id), Re = s.filter((xe) => !(te.includes(xe.id) && xe.id < 0)).map((xe) => te.includes(xe.id) ? {
5657
5657
  ...xe,
@@ -5661,7 +5661,7 @@ const tc = (e) => {
5661
5661
  } catch (te) {
5662
5662
  V(te);
5663
5663
  }
5664
- u(0), C(!1);
5664
+ u(0), S(!1);
5665
5665
  }, Ve = (Y, te, Re, xe = !1) => {
5666
5666
  let Se;
5667
5667
  if (xe)
@@ -5694,7 +5694,7 @@ const tc = (e) => {
5694
5694
  const xe = s.find((Se) => Se.id === te);
5695
5695
  (xe == null ? void 0 : xe.values) === void 0 && (Re = await Ee("form")), O(Re.find((Se) => Se.id === te)), B(!1), F(!0);
5696
5696
  }, he = async (Y) => {
5697
- C(!0);
5697
+ S(!0);
5698
5698
  const te = s, Re = Y.filter((xe) => !s.find((Se) => Se.id === xe));
5699
5699
  try {
5700
5700
  for (const xe of Re) {
@@ -5720,7 +5720,7 @@ const tc = (e) => {
5720
5720
  } catch (xe) {
5721
5721
  V(xe);
5722
5722
  } finally {
5723
- C(!1);
5723
+ S(!1);
5724
5724
  }
5725
5725
  };
5726
5726
  function ye() {
@@ -5735,7 +5735,7 @@ const tc = (e) => {
5735
5735
  const ie = () => {
5736
5736
  var te, Re, xe, Se;
5737
5737
  if (a === "form")
5738
- return re.length === 0 ? y("noCurrentEntries") : a !== ve.current && s.some((Ie) => !Ie.values) ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
5738
+ return re.length === 0 ? g("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"),
@@ -5752,7 +5752,7 @@ const tc = (e) => {
5752
5752
  values: { ...Ie, id: et },
5753
5753
  treeValues: { ...Ie, id: et }
5754
5754
  } : at);
5755
- ce(Ye), S(!0);
5755
+ ce(Ye), C(!0);
5756
5756
  },
5757
5757
  readOnly: $
5758
5758
  }
@@ -5864,26 +5864,26 @@ const tc = (e) => {
5864
5864
  }, nc = (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: g } = h || {};
5867
+ const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = ne(Be), { getContext: y } = h || {};
5868
5868
  Ft(() => {
5869
5869
  w();
5870
5870
  }, [t]);
5871
- const y = async (x) => o && o[x] ? o[x] : await E.getHandler().getView({
5871
+ const g = async (x) => o && o[x] ? o[x] : await E.getHandler().getView({
5872
5872
  model: i,
5873
5873
  type: x,
5874
- context: { ...g == null ? void 0 : g(), ...a }
5874
+ context: { ...y == null ? void 0 : y(), ...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 C = await y(x);
5881
- m.set(x, C);
5880
+ const S = await g(x);
5881
+ m.set(x, S);
5882
5882
  }
5883
5883
  p(m);
5884
5884
  } else {
5885
- const x = await y("form"), C = await y("tree");
5886
- m.set("form", x), m.set("tree", C), p(m);
5885
+ const x = await g("form"), S = await g("tree");
5886
+ m.set("form", x), m.set("tree", S), p(m);
5887
5887
  }
5888
5888
  } catch (x) {
5889
5889
  c(JSON.stringify(x));
@@ -5896,14 +5896,14 @@ const tc = (e) => {
5896
5896
  {
5897
5897
  required: s,
5898
5898
  type: "array",
5899
- validator: async (x, C) => {
5900
- if (!C)
5899
+ validator: async (x, S) => {
5900
+ if (!S)
5901
5901
  throw new Error();
5902
- if (!C.items)
5902
+ if (!S.items)
5903
5903
  throw new Error();
5904
- if (!Array.isArray(C.items))
5904
+ if (!Array.isArray(S.items))
5905
5905
  throw new Error();
5906
- if (C.items.length === 0)
5906
+ if (S.items.length === 0)
5907
5907
  throw new Error();
5908
5908
  },
5909
5909
  ...e,
@@ -5921,10 +5921,10 @@ const tc = (e) => {
5921
5921
  const h = (w) => {
5922
5922
  i == null || i(w);
5923
5923
  };
5924
- function g(w) {
5924
+ function y(w) {
5925
5925
  u.current = w.target.value, c(w.target.value);
5926
5926
  }
5927
- async function y() {
5927
+ async function g() {
5928
5928
  h(el(f)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
5929
5929
  }
5930
5930
  return /* @__PURE__ */ r(
@@ -5936,8 +5936,8 @@ const tc = (e) => {
5936
5936
  style: d,
5937
5937
  id: o,
5938
5938
  placeholder: "00:00",
5939
- onChange: g,
5940
- onBlur: y
5939
+ onChange: y,
5940
+ onBlur: g
5941
5941
  }
5942
5942
  );
5943
5943
  };
@@ -6112,120 +6112,120 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
6112
6112
  onClose: s
6113
6113
  }) => {
6114
6114
  const a = ae({}), l = ae(/* @__PURE__ */ new Map()), { t: d } = we(), u = fe(
6115
- async (y) => {
6116
- if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
6115
+ async (g) => {
6116
+ if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
6117
6117
  ht(d("selectAtLeastOneField"));
6118
6118
  return;
6119
6119
  }
6120
6120
  let w = i;
6121
- y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6122
- ["id", "in", n == null ? void 0 : n.map((C) => C.id)]
6121
+ g.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6122
+ ["id", "in", n == null ? void 0 : n.map((S) => S.id)]
6123
6123
  ]);
6124
- const { datas: S } = await E.getHandler().exportData({
6124
+ const { datas: C } = await E.getHandler().exportData({
6125
6125
  model: e,
6126
6126
  fields: wc({
6127
- keys: y.selectedKeys,
6127
+ keys: g.selectedKeys,
6128
6128
  fields: a.current
6129
6129
  }),
6130
6130
  domain: w,
6131
- limit: y.registersAmount === "all" ? 0 : o,
6131
+ limit: g.registersAmount === "all" ? 0 : o,
6132
6132
  context: t,
6133
- format: y.exportType
6133
+ format: g.exportType
6134
6134
  });
6135
- s(), await new Promise((C) => setTimeout(C, 200));
6136
- const x = await kt(S);
6137
- pn(S, x.mime);
6135
+ s(), await new Promise((S) => setTimeout(S, 200));
6136
+ const x = await kt(C);
6137
+ pn(C, x.mime);
6138
6138
  },
6139
6139
  [i, n, e, o, t, s, d]
6140
6140
  ), f = fe(async () => {
6141
- const y = await E.getHandler().getFields({
6141
+ const g = await E.getHandler().getFields({
6142
6142
  model: e,
6143
6143
  context: t,
6144
6144
  fields: []
6145
6145
  });
6146
- return a.current["/"] = y, Ir({ fields: y });
6146
+ return a.current["/"] = g, Ir({ fields: g });
6147
6147
  }, [e, t, a]), c = fe(
6148
- async (y) => {
6149
- const S = Nn(y, a.current)[Mn(y)], x = S.relation, C = await E.getHandler().getFields({
6148
+ async (g) => {
6149
+ const C = Nn(g, a.current)[Mn(g)], x = C.relation, S = await E.getHandler().getFields({
6150
6150
  model: x,
6151
6151
  context: t,
6152
6152
  fields: []
6153
6153
  });
6154
- for (const [R, V] of Object.entries(C))
6155
- C[R].string = hc({
6156
- parentTitle: S.string,
6154
+ for (const [R, V] of Object.entries(S))
6155
+ S[R].string = hc({
6156
+ parentTitle: C.string,
6157
6157
  title: V.string
6158
6158
  });
6159
- return a.current[y] = C, Ir({
6160
- fields: C,
6161
- parentKey: y
6159
+ return a.current[g] = S, Ir({
6160
+ fields: S,
6161
+ parentKey: g
6162
6162
  });
6163
6163
  },
6164
6164
  [t]
6165
6165
  ), m = fe(async () => {
6166
- const y = await pc({ model: e, context: t }), w = await yc({
6167
- predefinedExports: y,
6166
+ const g = await pc({ model: e, context: t }), w = await yc({
6167
+ predefinedExports: g,
6168
6168
  fields: a.current,
6169
6169
  onGetFieldChilds: c
6170
6170
  });
6171
6171
  return {
6172
- predefinedExports: y.map((x) => ({
6172
+ predefinedExports: g.map((x) => ({
6173
6173
  ...x,
6174
- fields: x.fields.map((C) => {
6175
- const R = Mn(C.key), D = Nn(C.key, a.current)[R];
6174
+ fields: x.fields.map((S) => {
6175
+ const R = Mn(S.key), D = Nn(S.key, a.current)[R];
6176
6176
  return D ? {
6177
- key: C.key,
6177
+ key: S.key,
6178
6178
  title: D.string
6179
6179
  } : {
6180
- key: C.key
6180
+ key: S.key
6181
6181
  };
6182
6182
  })
6183
6183
  })),
6184
6184
  keysWithChilds: w
6185
6185
  };
6186
6186
  }, [t, e, c]), p = fe(
6187
- async (y) => {
6187
+ async (g) => {
6188
6188
  await E.getHandler().deleteObjects({
6189
6189
  model: "ir.exports",
6190
- ids: [y.id],
6190
+ ids: [g.id],
6191
6191
  context: t
6192
6192
  });
6193
6193
  },
6194
6194
  [t]
6195
6195
  ), h = fe(
6196
- async (y) => {
6197
- if (l.current.has(y))
6198
- return l.current.get(y);
6196
+ async (g) => {
6197
+ if (l.current.has(g))
6198
+ return l.current.get(g);
6199
6199
  const w = E.getHandler().getFields({
6200
- model: y,
6200
+ model: g,
6201
6201
  context: t,
6202
6202
  fields: []
6203
6203
  });
6204
- l.current.set(y, w);
6204
+ l.current.set(g, w);
6205
6205
  },
6206
6206
  [l, t]
6207
- ), g = fe(
6208
- async (y) => {
6209
- const w = await h("ir.exports"), S = await h("ir.exports.line"), x = await E.getHandler().create({
6207
+ ), y = fe(
6208
+ async (g) => {
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: y.name,
6212
+ name: g.name,
6213
6213
  resource: e
6214
6214
  },
6215
6215
  fields: w,
6216
6216
  context: t
6217
6217
  });
6218
6218
  return await Promise.all(
6219
- y.fields.map(async (C) => await E.getHandler().create({
6219
+ g.fields.map(async (S) => await E.getHandler().create({
6220
6220
  model: "ir.exports.line",
6221
6221
  values: {
6222
- name: C.key,
6222
+ name: S.key,
6223
6223
  export_id: x
6224
6224
  },
6225
- fields: S,
6225
+ fields: C,
6226
6226
  context: t
6227
6227
  }))
6228
- ), { ...y, id: x };
6228
+ ), { ...g, id: x };
6229
6229
  },
6230
6230
  [t, h, e]
6231
6231
  );
@@ -6234,7 +6234,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
6234
6234
  onGetFieldChilds: c,
6235
6235
  onExport: u,
6236
6236
  onGetPredefinedExports: m,
6237
- onSavePredefinedExport: g,
6237
+ onSavePredefinedExport: y,
6238
6238
  onRemovePredefinedExport: p
6239
6239
  };
6240
6240
  }, Ir = ({
@@ -6355,7 +6355,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
6355
6355
  onGetFields: m,
6356
6356
  onGetPredefinedExports: p,
6357
6357
  onSavePredefinedExport: h,
6358
- onRemovePredefinedExport: g
6358
+ onRemovePredefinedExport: y
6359
6359
  } = fc({
6360
6360
  model: i,
6361
6361
  context: o,
@@ -6377,7 +6377,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
6377
6377
  visibleRegisters: u,
6378
6378
  onGetPredefinedExports: p,
6379
6379
  onSavePredefinedExport: h,
6380
- onRemovePredefinedExport: g
6380
+ onRemovePredefinedExport: y
6381
6381
  }
6382
6382
  );
6383
6383
  }, Cc = (e) => {
@@ -6455,20 +6455,20 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
6455
6455
  const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Oc(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ae(null), { setFieldValue: f, getFieldValue: c } = ne(Be) || {}, { t: m } = we(), p = n ? Es(n) : "", h = (x) => {
6456
6456
  i == null || i(x);
6457
6457
  };
6458
- async function g() {
6459
- const x = await kt(n), C = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), V = c(a), D = c("name");
6460
- R.href = C, R.download = V || D, R.click();
6461
- }
6462
6458
  async function y() {
6459
+ 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
+ R.href = S, R.download = V || D, R.click();
6461
+ }
6462
+ async function g() {
6463
6463
  const x = await kt(n);
6464
6464
  pn(n, x.mime);
6465
6465
  }
6466
6466
  async function w(x) {
6467
6467
  x.stopPropagation(), x.preventDefault();
6468
- const C = x.target.files[0], R = await ao(C);
6469
- h(R), a && f(a, C.name);
6468
+ const S = x.target.files[0], R = await ao(S);
6469
+ h(R), a && f(a, S.name);
6470
6470
  }
6471
- function S() {
6471
+ function C() {
6472
6472
  f(a, void 0), h(void 0);
6473
6473
  }
6474
6474
  return /* @__PURE__ */ k(Oe, { gutter: 8, children: [
@@ -6505,13 +6505,13 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
6505
6505
  children: "Select"
6506
6506
  }
6507
6507
  ),
6508
- /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ci, {}), disabled: !n, onClick: y, children: m("open") }),
6508
+ /* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ci, {}), disabled: !n, onClick: g, children: m("open") }),
6509
6509
  /* @__PURE__ */ r(
6510
6510
  ze,
6511
6511
  {
6512
6512
  tooltip: m("download"),
6513
6513
  disabled: !n,
6514
- onClick: g,
6514
+ onClick: y,
6515
6515
  icon: /* @__PURE__ */ r(Kn, {})
6516
6516
  }
6517
6517
  ),
@@ -6520,7 +6520,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
6520
6520
  {
6521
6521
  tooltip: m("clear"),
6522
6522
  disabled: o || !n,
6523
- onClick: S,
6523
+ onClick: C,
6524
6524
  icon: /* @__PURE__ */ r(jn, {})
6525
6525
  }
6526
6526
  )
@@ -6816,16 +6816,16 @@ function kc(e) {
6816
6816
  try {
6817
6817
  const w = await E.getHandler().readObjects({
6818
6818
  model: "ir.attachment",
6819
- ids: t.map((S) => S.id),
6819
+ ids: t.map((C) => C.id),
6820
6820
  fieldsToRetrieve: ["name", "datas_fname", "link"],
6821
6821
  context: a.current.getContext()
6822
6822
  });
6823
6823
  f(
6824
- w.map((S) => ({
6825
- id: S.id,
6826
- name: S.name,
6827
- datas_fname: S.datas_fname,
6828
- link: S.link
6824
+ w.map((C) => ({
6825
+ id: C.id,
6826
+ name: C.name,
6827
+ datas_fname: C.datas_fname,
6828
+ link: C.link
6829
6829
  }))
6830
6830
  );
6831
6831
  } catch (w) {
@@ -6833,16 +6833,16 @@ function kc(e) {
6833
6833
  }
6834
6834
  d(!1);
6835
6835
  }
6836
- }, [t, a]), g = fe(
6836
+ }, [t, a]), y = fe(
6837
6837
  async (w) => {
6838
6838
  if (w.link) {
6839
6839
  window.open(w.link);
6840
6840
  return;
6841
6841
  }
6842
6842
  m(!0);
6843
- let S;
6843
+ let C;
6844
6844
  try {
6845
- S = (await E.getHandler().readObjects({
6845
+ C = (await E.getHandler().readObjects({
6846
6846
  model: "ir.attachment",
6847
6847
  ids: [w.id],
6848
6848
  context: a.current.getContext()
@@ -6850,15 +6850,15 @@ function kc(e) {
6850
6850
  } catch (x) {
6851
6851
  Xe(x);
6852
6852
  }
6853
- if (m(!1), !!S)
6854
- if (S.datas) {
6855
- const x = await kt(S.datas);
6856
- pn(S.datas, x.mime);
6853
+ if (m(!1), !!C)
6854
+ if (C.datas) {
6855
+ const x = await kt(C.datas);
6856
+ pn(C.datas, x.mime);
6857
6857
  } else
6858
- s(S);
6858
+ s(C);
6859
6859
  },
6860
6860
  [a, s]
6861
- ), y = fe(
6861
+ ), g = fe(
6862
6862
  async (w) => {
6863
6863
  s(w);
6864
6864
  },
@@ -6876,8 +6876,8 @@ function kc(e) {
6876
6876
  loading: l,
6877
6877
  onAddNewAttachment: i,
6878
6878
  onListAllAttachments: o,
6879
- onOpenAttachmentLink: g,
6880
- onOpenAttachmentDetail: y
6879
+ onOpenAttachmentLink: y,
6880
+ onOpenAttachmentDetail: g
6881
6881
  }
6882
6882
  ),
6883
6883
  /* @__PURE__ */ r(
@@ -6910,12 +6910,12 @@ function Ec({ toolbar: e }) {
6910
6910
  currentModel: m,
6911
6911
  setRemovingItem: p,
6912
6912
  removingItem: h,
6913
- duplicatingItem: g,
6914
- setDuplicatingItem: y,
6913
+ duplicatingItem: y,
6914
+ setDuplicatingItem: g,
6915
6915
  setResults: w,
6916
- formIsLoading: S,
6916
+ formIsLoading: C,
6917
6917
  attachments: x,
6918
- formRef: C,
6918
+ formRef: S,
6919
6919
  setFormHasChanges: R,
6920
6920
  previousView: V,
6921
6921
  setPreviousView: D,
@@ -6969,7 +6969,7 @@ function Ec({ toolbar: e }) {
6969
6969
  p == null || p(!0), await E.getHandler().deleteObjects({
6970
6970
  model: m,
6971
6971
  ids: [l],
6972
- context: C.current.getContext()
6972
+ context: S.current.getContext()
6973
6973
  });
6974
6974
  const I = d == null ? void 0 : d.filter((K) => K.id !== l);
6975
6975
  w == null || w(I);
@@ -6983,33 +6983,33 @@ function Ec({ toolbar: e }) {
6983
6983
  }
6984
6984
  async function oe() {
6985
6985
  try {
6986
- y == null || y(!0);
6986
+ g == null || g(!0);
6987
6987
  const I = await E.getHandler().duplicate({
6988
6988
  id: l,
6989
6989
  model: m,
6990
- context: C.current.getContext()
6990
+ context: S.current.getContext()
6991
6991
  });
6992
6992
  I && await (F == null ? void 0 : F([I]));
6993
6993
  } catch (I) {
6994
6994
  on(JSON.stringify(I));
6995
6995
  } finally {
6996
- y == null || y(!1);
6996
+ g == null || g(!1);
6997
6997
  }
6998
6998
  }
6999
- const U = a || h || S || g;
6999
+ const U = a || h || C || y;
7000
7000
  function $(I) {
7001
7001
  v == null || v({
7002
7002
  actionData: I,
7003
- values: C.current.getValues(),
7004
- fields: C.current.getFields(),
7005
- context: C.current.getContext(),
7003
+ values: S.current.getValues(),
7004
+ fields: S.current.getFields(),
7005
+ context: S.current.getContext(),
7006
7006
  onRefreshParentValues: () => {
7007
- C.current.fetchValues();
7007
+ S.current.fetchValues();
7008
7008
  }
7009
7009
  });
7010
7010
  }
7011
7011
  return n ? /* @__PURE__ */ k(Ue, { wrap: !0, children: [
7012
- S && /* @__PURE__ */ k(Q, { children: [
7012
+ C && /* @__PURE__ */ k(Q, { children: [
7013
7013
  /* @__PURE__ */ r($e, {}),
7014
7014
  Rt(),
7015
7015
  Rt()
@@ -7017,7 +7017,7 @@ function Ec({ toolbar: e }) {
7017
7017
  /* @__PURE__ */ r(
7018
7018
  Io,
7019
7019
  {
7020
- disabled: a || S || h || g
7020
+ disabled: a || C || h || y
7021
7021
  }
7022
7022
  ),
7023
7023
  /* @__PURE__ */ r(
@@ -7035,8 +7035,8 @@ function Ec({ toolbar: e }) {
7035
7035
  {
7036
7036
  icon: /* @__PURE__ */ r(zn, {}),
7037
7037
  tooltip: T("duplicate"),
7038
- disabled: s || a || l === void 0 || g || S,
7039
- loading: g,
7038
+ disabled: s || a || l === void 0 || y || C,
7039
+ loading: y,
7040
7040
  onClick: oe
7041
7041
  }
7042
7042
  ),
@@ -7045,7 +7045,7 @@ function Ec({ toolbar: e }) {
7045
7045
  {
7046
7046
  icon: /* @__PURE__ */ r(Gn, {}),
7047
7047
  tooltip: T("delete"),
7048
- disabled: a || l === void 0 || h || g || S,
7048
+ disabled: a || l === void 0 || h || y || C,
7049
7049
  loading: h,
7050
7050
  onClick: Z
7051
7051
  }
@@ -7056,7 +7056,7 @@ function Ec({ toolbar: e }) {
7056
7056
  {
7057
7057
  icon: /* @__PURE__ */ r(Jr, {}),
7058
7058
  tooltip: T("showLogs"),
7059
- disabled: a || l === void 0 || h || g || S,
7059
+ disabled: a || l === void 0 || h || y || C,
7060
7060
  loading: !1,
7061
7061
  onClick: () => {
7062
7062
  Vo(m, l, T);
@@ -7068,11 +7068,11 @@ function Ec({ toolbar: e }) {
7068
7068
  {
7069
7069
  icon: /* @__PURE__ */ r(fn, {}),
7070
7070
  tooltip: T("refresh"),
7071
- disabled: a || l === void 0 || h || g || S,
7071
+ disabled: a || l === void 0 || h || y || C,
7072
7072
  loading: !1,
7073
7073
  onClick: () => {
7074
7074
  G(() => {
7075
- C.current.fetchValues();
7075
+ S.current.fetchValues();
7076
7076
  });
7077
7077
  }
7078
7078
  }
@@ -7174,8 +7174,8 @@ function Ec({ toolbar: e }) {
7174
7174
  onFormSave: o
7175
7175
  })).succeed || A({
7176
7176
  relateData: I,
7177
- values: C.current.getValues(),
7178
- fields: C.current.getFields(),
7177
+ values: S.current.getValues(),
7178
+ fields: S.current.getFields(),
7179
7179
  action_id: I.id,
7180
7180
  action_type: I.type
7181
7181
  });
@@ -7250,12 +7250,12 @@ function Ar(e, t) {
7250
7250
  };
7251
7251
  }
7252
7252
  const { useToken: Mc } = He, Ao = (e) => {
7253
- const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Mc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ne(Be), { elementHasLostFocus: m } = c || {}, [p, h] = b(!1), [g, y] = b(!1);
7253
+ const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Mc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ne(Be), { elementHasLostFocus: m } = c || {}, [p, h] = b(!1), [y, g] = b(!1);
7254
7254
  pe(() => {
7255
- l && !p && y(!1), !n && !l && (h(!0), y(!0));
7255
+ l && !p && g(!1), !n && !l && (h(!0), g(!0));
7256
7256
  }, [p, l]);
7257
- const w = (S) => {
7258
- i == null || i(S.target.value);
7257
+ const w = (C) => {
7258
+ i == null || i(C.target.value);
7259
7259
  };
7260
7260
  return /* @__PURE__ */ k(Oe, { gutter: 8, wrap: !1, align: "middle", children: [
7261
7261
  l ? null : /* @__PURE__ */ r(ue, { flex: "none", children: p ? /* @__PURE__ */ r(
@@ -7263,7 +7263,7 @@ const { useToken: Mc } = He, Ao = (e) => {
7263
7263
  {
7264
7264
  icon: /* @__PURE__ */ r(Yt, {}),
7265
7265
  onClick: () => {
7266
- o(n) && (h(!1), y(!1));
7266
+ o(n) && (h(!1), g(!1));
7267
7267
  },
7268
7268
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
7269
7269
  tabIndex: -1
@@ -7273,13 +7273,13 @@ const { useToken: Mc } = He, Ao = (e) => {
7273
7273
  {
7274
7274
  icon: /* @__PURE__ */ r(Xr, {}),
7275
7275
  onClick: () => {
7276
- h(!0), y(!0);
7276
+ h(!0), g(!0);
7277
7277
  },
7278
7278
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
7279
7279
  tabIndex: -1
7280
7280
  }
7281
7281
  ) }),
7282
- /* @__PURE__ */ r(ue, { flex: "auto", children: g ? /* @__PURE__ */ r(
7282
+ /* @__PURE__ */ r(ue, { flex: "auto", children: y ? /* @__PURE__ */ r(
7283
7283
  it,
7284
7284
  {
7285
7285
  style: {
@@ -7291,7 +7291,7 @@ const { useToken: Mc } = He, Ao = (e) => {
7291
7291
  onChange: w,
7292
7292
  value: n,
7293
7293
  onBlur: () => {
7294
- o(n) && (h(!1), y(!1), m == null || m());
7294
+ o(n) && (h(!1), g(!1), m == null || m());
7295
7295
  }
7296
7296
  }
7297
7297
  ) : /* @__PURE__ */ r(
@@ -7585,12 +7585,12 @@ const jc = (e) => {
7585
7585
  currentId: m = void 0,
7586
7586
  results: p = void 0,
7587
7587
  setSelectedRowItems: h = void 0,
7588
- setSearchParams: g = void 0,
7589
- searchVisible: y = !0,
7588
+ setSearchParams: y = void 0,
7589
+ searchVisible: g = !0,
7590
7590
  setSearchVisible: w = void 0,
7591
- sorter: S = void 0,
7591
+ sorter: C = void 0,
7592
7592
  setSorter: x = void 0,
7593
- setTotalItems: C = void 0,
7593
+ setTotalItems: S = void 0,
7594
7594
  setSearchTreeNameSearch: R = void 0,
7595
7595
  setTreeIsLoading: V = void 0,
7596
7596
  limit: D,
@@ -7612,20 +7612,20 @@ const jc = (e) => {
7612
7612
  setSelectedRowItems: h,
7613
7613
  searchParams: T,
7614
7614
  setSearchValues: v,
7615
- setSearchParams: g,
7615
+ setSearchParams: y,
7616
7616
  setSearchVisible: w,
7617
7617
  setTreeIsLoading: V,
7618
7618
  context: o,
7619
7619
  formView: a,
7620
7620
  treeView: l,
7621
- sorter: S,
7621
+ sorter: C,
7622
7622
  setSorter: x,
7623
7623
  setCurrentItemIndex: c,
7624
7624
  setResultsActionView: f,
7625
7625
  resultsActionView: p,
7626
7626
  domain: s,
7627
7627
  currentId: m,
7628
- setActionViewTotalItems: C,
7628
+ setActionViewTotalItems: S,
7629
7629
  limit: D,
7630
7630
  setLimit: F
7631
7631
  });
@@ -7651,10 +7651,10 @@ const jc = (e) => {
7651
7651
  offset: N,
7652
7652
  isSearching: B,
7653
7653
  onSubmit: (ee) => {
7654
- L(!1), g == null || g(ee.params), w == null || w(!1);
7654
+ L(!1), y == null || y(ee.params), w == null || w(!1);
7655
7655
  },
7656
7656
  searchError: q,
7657
- searchVisible: y,
7657
+ searchVisible: g,
7658
7658
  searchValues: _,
7659
7659
  showLimitOptions: !1
7660
7660
  }
@@ -7702,7 +7702,7 @@ const jc = (e) => {
7702
7702
  id: o,
7703
7703
  parentContext: l,
7704
7704
  onSubmitSucceed: (p, h) => {
7705
- f.findIndex((y) => y.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
7705
+ f.findIndex((g) => g.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
7706
7706
  }
7707
7707
  }
7708
7708
  )
@@ -8090,12 +8090,12 @@ function Zc(e) {
8090
8090
  setCurrentItemIndex: m,
8091
8091
  searchParams: p,
8092
8092
  searchVisible: h,
8093
- setSearchVisible: g,
8094
- setSearchTreeNameSearch: y,
8093
+ setSearchVisible: y,
8094
+ setSearchTreeNameSearch: g,
8095
8095
  searchTreeNameSearch: w,
8096
- treeIsLoading: S,
8096
+ treeIsLoading: C,
8097
8097
  setPreviousView: x,
8098
- previousView: C,
8098
+ previousView: S,
8099
8099
  results: R,
8100
8100
  limit: V,
8101
8101
  totalItems: D
@@ -8163,7 +8163,7 @@ function Zc(e) {
8163
8163
  });
8164
8164
  }
8165
8165
  return /* @__PURE__ */ k(Ue, { wrap: !0, children: [
8166
- S && /* @__PURE__ */ k(Q, { children: [
8166
+ C && /* @__PURE__ */ k(Q, { children: [
8167
8167
  /* @__PURE__ */ r($e, {}),
8168
8168
  Ct(),
8169
8169
  Ct()
@@ -8175,7 +8175,7 @@ function Zc(e) {
8175
8175
  disabled: l || a,
8176
8176
  searchText: w,
8177
8177
  onSearch: ($) => {
8178
- $ && $.trim().length > 0 ? y == null || y($) : y == null || y(void 0);
8178
+ $ && $.trim().length > 0 ? g == null || g($) : g == null || g(void 0);
8179
8179
  }
8180
8180
  }
8181
8181
  ),
@@ -8191,7 +8191,7 @@ function Zc(e) {
8191
8191
  tooltip: O("advanced_search"),
8192
8192
  type: h ? "primary" : "default",
8193
8193
  onClick: () => {
8194
- g == null || g(!h);
8194
+ y == null || y(!h);
8195
8195
  },
8196
8196
  disabled: l || a,
8197
8197
  badgeNumber: p == null ? void 0 : p.length
@@ -8204,7 +8204,7 @@ function Zc(e) {
8204
8204
  {
8205
8205
  icon: /* @__PURE__ */ r(zn, {}),
8206
8206
  tooltip: O("duplicate"),
8207
- disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || S,
8207
+ disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || C,
8208
8208
  loading: l,
8209
8209
  onClick: ee
8210
8210
  }
@@ -8214,7 +8214,7 @@ function Zc(e) {
8214
8214
  {
8215
8215
  icon: /* @__PURE__ */ r(Gn, {}),
8216
8216
  tooltip: O("delete"),
8217
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || S,
8217
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || C,
8218
8218
  loading: a,
8219
8219
  onClick: N
8220
8220
  }
@@ -8226,7 +8226,7 @@ function Zc(e) {
8226
8226
  {
8227
8227
  icon: /* @__PURE__ */ r(Jr, {}),
8228
8228
  tooltip: O("showLogs"),
8229
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || S,
8229
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || C,
8230
8230
  loading: !1,
8231
8231
  onClick: () => {
8232
8232
  Vo(u, o[0].id, O);
@@ -8238,7 +8238,7 @@ function Zc(e) {
8238
8238
  {
8239
8239
  icon: /* @__PURE__ */ r(fn, {}),
8240
8240
  tooltip: O("refresh"),
8241
- disabled: l || a || S,
8241
+ disabled: l || a || C,
8242
8242
  loading: !1,
8243
8243
  onClick: () => {
8244
8244
  var $;
@@ -8256,7 +8256,7 @@ function Zc(e) {
8256
8256
  onChangeView: ($) => {
8257
8257
  x == null || x(n), i == null || i($);
8258
8258
  },
8259
- previousView: C
8259
+ previousView: S
8260
8260
  }
8261
8261
  )
8262
8262
  ] }),
@@ -8266,7 +8266,7 @@ function Zc(e) {
8266
8266
  {
8267
8267
  icon: /* @__PURE__ */ r(Un, {}),
8268
8268
  placement: "bottomRight",
8269
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || S,
8269
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || C,
8270
8270
  onRetrieveData: async () => [
8271
8271
  { label: O("actions"), items: _ == null ? void 0 : _.action }
8272
8272
  ],
@@ -8280,7 +8280,7 @@ function Zc(e) {
8280
8280
  {
8281
8281
  icon: /* @__PURE__ */ r(Yn, {}),
8282
8282
  placement: "bottomRight",
8283
- disabled: !(o && (o == null ? void 0 : o.length) > 0) || S,
8283
+ disabled: !(o && (o == null ? void 0 : o.length) > 0) || C,
8284
8284
  onRetrieveData: async () => [
8285
8285
  { label: O("reports"), items: _ == null ? void 0 : _.print }
8286
8286
  ],
@@ -8359,7 +8359,7 @@ function Zc(e) {
8359
8359
  }
8360
8360
  B(!0);
8361
8361
  },
8362
- disabled: l || a || S || q
8362
+ disabled: l || a || C || q
8363
8363
  }
8364
8364
  ),
8365
8365
  /* @__PURE__ */ r(
@@ -8400,7 +8400,7 @@ const ed = (e) => {
8400
8400
  setCurrentView: c,
8401
8401
  availableViews: m,
8402
8402
  searchTreeNameSearch: p
8403
- } = e, { currentView: h, setPreviousView: g } = ne(
8403
+ } = e, { currentView: h, setPreviousView: y } = ne(
8404
8404
  rt
8405
8405
  );
8406
8406
  return t ? /* @__PURE__ */ k(Q, { children: [
@@ -8423,13 +8423,13 @@ const ed = (e) => {
8423
8423
  formView: s,
8424
8424
  treeView: a,
8425
8425
  domain: l,
8426
- onRowClicked: (y) => {
8427
- const { id: w } = y;
8426
+ onRowClicked: (g) => {
8427
+ const { id: w } = g;
8428
8428
  f(w);
8429
- const S = u.findIndex((C) => C.id === w);
8430
- g == null || g(h), d(S);
8429
+ const C = u.findIndex((S) => S.id === w);
8430
+ y == null || y(h), d(C);
8431
8431
  const x = m.find(
8432
- (C) => C.type === "form"
8432
+ (S) => S.type === "form"
8433
8433
  );
8434
8434
  c(x);
8435
8435
  }
@@ -8561,9 +8561,9 @@ function sd(e, t) {
8561
8561
  res_id: m = !1,
8562
8562
  action_id: p,
8563
8563
  action_type: h,
8564
- treeExpandable: g = !1,
8565
- limit: y
8566
- } = e, [w, S] = b(), [x, C] = b([]), [R, V] = b(!0), D = m || void 0, [F, T] = b(
8564
+ treeExpandable: y = !1,
8565
+ limit: g
8566
+ } = e, [w, C] = b(), [x, S] = b([]), [R, V] = b(!0), D = m || void 0, [F, T] = b(
8567
8567
  D
8568
8568
  ), [_, 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(
8569
8569
  ut
@@ -8586,7 +8586,7 @@ function sd(e, t) {
8586
8586
  T(j), W == null || W(j);
8587
8587
  }
8588
8588
  function me(j) {
8589
- S(j);
8589
+ C(j);
8590
8590
  const ge = { action_id: p, action_type: h };
8591
8591
  ve == null || ve({ ...j, extra: ge });
8592
8592
  }
@@ -8649,7 +8649,7 @@ function sd(e, t) {
8649
8649
  case "tree": {
8650
8650
  j.push({
8651
8651
  ...ie,
8652
- isExpandable: g,
8652
+ isExpandable: y,
8653
8653
  type: ye
8654
8654
  });
8655
8655
  break;
@@ -8671,7 +8671,7 @@ function sd(e, t) {
8671
8671
  ), de || (Xe(
8672
8672
  `Error determining the first view to show for model ${i}.
8673
8673
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
8674
- ), Me == null || Me(d)), me(de), C(j), V(!1);
8674
+ ), Me == null || Me(d)), me(de), S(j), V(!1);
8675
8675
  };
8676
8676
  l({ tabKey: d, canWeClose: Le }), pe(() => {
8677
8677
  const j = x.find((Ve) => Ve.type === "tree"), ge = x.find((Ve) => u.id ? Ve.type === u.type && Ve.view_id === u.id : Ve.type === u.type);
@@ -8756,7 +8756,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8756
8756
  ed,
8757
8757
  {
8758
8758
  visible: w.type === j.type && w.view_id === j.view_id,
8759
- limit: y,
8759
+ limit: g,
8760
8760
  model: i,
8761
8761
  context: o,
8762
8762
  domain: n,
@@ -8835,7 +8835,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8835
8835
  setSearchTreeNameSearch: M,
8836
8836
  searchTreeNameSearch: I,
8837
8837
  goToResourceId: _e,
8838
- limit: y,
8838
+ limit: g,
8839
8839
  children: [
8840
8840
  We(),
8841
8841
  /* @__PURE__ */ r(
@@ -8877,21 +8877,21 @@ async function ad({
8877
8877
  limit: c,
8878
8878
  view_type: m
8879
8879
  } = s, p = m === "tree", h = [];
8880
- for (const S of u) {
8881
- const [x, C] = S;
8880
+ for (const C of u) {
8881
+ const [x, S] = C;
8882
8882
  if (x)
8883
- h.push(S);
8883
+ h.push(C);
8884
8884
  else {
8885
8885
  const { view_id: R } = await E.getHandler().getView({
8886
8886
  model: d,
8887
- type: C,
8887
+ type: S,
8888
8888
  id: x,
8889
8889
  context: { ...t, ...a }
8890
8890
  });
8891
- h.push([R, C]);
8891
+ h.push([R, S]);
8892
8892
  }
8893
8893
  }
8894
- const [g, y] = h[0], w = { id: g, type: y };
8894
+ const [y, g] = h[0], w = { id: y, type: g };
8895
8895
  return {
8896
8896
  title: f,
8897
8897
  actionId: e,
@@ -9001,13 +9001,13 @@ function md(e) {
9001
9001
  domain: s = [],
9002
9002
  visible: a = !0,
9003
9003
  parentContext: l = {}
9004
- } = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [S, x] = b(1), [C, 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) => {
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
9005
  oe(!0), x(W), R((W - 1) * V.current);
9006
9006
  }, I = async () => {
9007
9007
  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({
9008
9008
  params: ce,
9009
9009
  limit: V.current,
9010
- offset: C,
9010
+ offset: S,
9011
9011
  model: m,
9012
9012
  fields: h.fields,
9013
9013
  context: l,
@@ -9017,7 +9017,7 @@ function md(e) {
9017
9017
  const me = Dt({
9018
9018
  resultsToSort: Me,
9019
9019
  sorter: L,
9020
- fields: { ...h.fields, ...y.fields }
9020
+ fields: { ...h.fields, ...g.fields }
9021
9021
  });
9022
9022
  oe(!1), v(me);
9023
9023
  const Fe = await Ee;
@@ -9031,7 +9031,7 @@ function md(e) {
9031
9031
  };
9032
9032
  pe(() => {
9033
9033
  f && a && M();
9034
- }, [S, C, f, a]);
9034
+ }, [C, S, f, a]);
9035
9035
  const K = async (W) => {
9036
9036
  c(!1), u(!0), Z(void 0);
9037
9037
  try {
@@ -9046,7 +9046,7 @@ function md(e) {
9046
9046
  action: t,
9047
9047
  context: l
9048
9048
  });
9049
- U.current = W.domain, w(W.views.get("form")), g(W.views.get("tree")), p(W.model), V.current = W.limit;
9049
+ U.current = W.domain, w(W.views.get("form")), y(W.views.get("tree")), p(W.model), V.current = W.limit;
9050
9050
  }, z = async () => {
9051
9051
  p(n);
9052
9052
  const W = await E.getHandler().getView({
@@ -9061,7 +9061,7 @@ function md(e) {
9061
9061
  id: i,
9062
9062
  context: l
9063
9063
  });
9064
- g(ce);
9064
+ y(ce);
9065
9065
  };
9066
9066
  pe(() => {
9067
9067
  t ? K("action") : n && K("model");
@@ -9073,7 +9073,7 @@ function md(e) {
9073
9073
  model: m,
9074
9074
  treeView: h
9075
9075
  });
9076
- }, ve = () => !h || !y ? null : /* @__PURE__ */ k("div", { style: { overflowY: "scroll" }, children: [
9076
+ }, ve = () => !h || !g ? null : /* @__PURE__ */ k("div", { style: { overflowY: "scroll" }, children: [
9077
9077
  B && /* @__PURE__ */ r(Qe, { className: "mt-10", message: B, type: "error", banner: !0 }),
9078
9078
  /* @__PURE__ */ r(
9079
9079
  Xt,
@@ -9081,7 +9081,7 @@ function md(e) {
9081
9081
  showPagination: !1,
9082
9082
  total: F,
9083
9083
  limit: V.current,
9084
- page: S,
9084
+ page: C,
9085
9085
  treeView: h,
9086
9086
  results: _,
9087
9087
  onRequestPageChange: $,
@@ -9094,7 +9094,7 @@ function md(e) {
9094
9094
  const ce = Dt({
9095
9095
  resultsToSort: _,
9096
9096
  sorter: W,
9097
- fields: { ...h.fields, ...y.fields }
9097
+ fields: { ...h.fields, ...g.fields }
9098
9098
  });
9099
9099
  v(ce);
9100
9100
  },
@@ -9124,22 +9124,22 @@ function pd(e, t) {
9124
9124
  setIsLoading: m,
9125
9125
  openAction: p,
9126
9126
  moveItemsEnabled: h
9127
- } = ne(or), g = ae(), y = ae(), [w] = tt(E.getHandler().getView), [S] = tt(
9127
+ } = ne(or), y = ae(), g = ae(), [w] = tt(E.getHandler().getView), [C] = tt(
9128
9128
  E.getHandler().readObjects
9129
9129
  ), [x] = tt(E.getHandler().update);
9130
9130
  pe(() => {
9131
- C();
9131
+ S();
9132
9132
  }, [n, o, i]), wt(t, () => ({
9133
9133
  refresh: () => {
9134
- C();
9134
+ S();
9135
9135
  },
9136
9136
  configDashboard: _
9137
9137
  }));
9138
- async function C() {
9138
+ async function S() {
9139
9139
  u(!0), m(!0), c(void 0);
9140
9140
  try {
9141
9141
  const v = await R(), O = await D(v), A = v.fields[Rn].relation, L = O[Rn].items;
9142
- y.current = v.fields;
9142
+ g.current = v.fields;
9143
9143
  const G = await V({
9144
9144
  items: L,
9145
9145
  model: A,
@@ -9162,17 +9162,17 @@ function pd(e, t) {
9162
9162
  model: O,
9163
9163
  context: A
9164
9164
  }) {
9165
- g.current = (await w({
9165
+ y.current = (await w({
9166
9166
  model: O,
9167
9167
  type: "form",
9168
9168
  context: A
9169
9169
  })).fields;
9170
9170
  const [L] = await Zn({
9171
9171
  treeView: {
9172
- fields: g.current
9172
+ fields: y.current
9173
9173
  },
9174
9174
  formView: {
9175
- fields: g.current
9175
+ fields: y.current
9176
9176
  },
9177
9177
  model: O,
9178
9178
  items: v,
@@ -9182,7 +9182,7 @@ function pd(e, t) {
9182
9182
  return L;
9183
9183
  }
9184
9184
  async function D(v) {
9185
- return (await S({
9185
+ return (await C({
9186
9186
  model: n,
9187
9187
  ids: [o],
9188
9188
  fields: v.fields,
@@ -9235,14 +9235,14 @@ function pd(e, t) {
9235
9235
  }
9236
9236
  };
9237
9237
  }), G = {
9238
- fields: g.current,
9238
+ fields: y.current,
9239
9239
  items: L
9240
9240
  };
9241
9241
  await x({
9242
9242
  model: n,
9243
9243
  id: o,
9244
9244
  values: { [Rn]: G },
9245
- fields: y.current,
9245
+ fields: g.current,
9246
9246
  context: i
9247
9247
  });
9248
9248
  }
@@ -9379,16 +9379,16 @@ const gd = yt(pd), yd = (e) => {
9379
9379
  const { ooui: t } = e;
9380
9380
  return /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(wd, { ooui: t }) });
9381
9381
  }, wd = (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: g, columns: y } = n, w = ne(Be), { getContext: S } = w || {};
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
9383
  Ft(() => {
9384
- C();
9384
+ S();
9385
9385
  }, [o]);
9386
9386
  const x = (F) => {
9387
9387
  i == null || i({
9388
9388
  items: F
9389
9389
  });
9390
9390
  };
9391
- async function C() {
9391
+ async function S() {
9392
9392
  c(!0);
9393
9393
  let F = [];
9394
9394
  if (n.domain) {
@@ -9407,10 +9407,10 @@ const gd = yt(pd), yd = (e) => {
9407
9407
  const _ = (await E.getHandler().search({
9408
9408
  model: m,
9409
9409
  params: F,
9410
- fieldsToRetrieve: [g],
9411
- context: { ...S == null ? void 0 : S(), ...p }
9410
+ fieldsToRetrieve: [y],
9411
+ context: { ...C == null ? void 0 : C(), ...p }
9412
9412
  })).map((v) => {
9413
- const O = v[g];
9413
+ const O = v[y];
9414
9414
  let A = O;
9415
9415
  return Array.isArray(O) && (A = O[1]), { label: A, value: v.id };
9416
9416
  });
@@ -9444,7 +9444,7 @@ const gd = yt(pd), yd = (e) => {
9444
9444
  disabled: h,
9445
9445
  onChange: D,
9446
9446
  style: { width: "100%" },
9447
- 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 }) })) })
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
9448
  }
9449
9449
  ),
9450
9450
  !h && /* @__PURE__ */ k(Ue, { children: [
@@ -9582,21 +9582,21 @@ function Ld(e, t) {
9582
9582
  retrieveAndOpenAction: h,
9583
9583
  openShortcut: w
9584
9584
  }));
9585
- function m(C) {
9586
- if (C === i) {
9587
- const R = d.findIndex((V) => V.key === C);
9585
+ function m(S) {
9586
+ if (S === i) {
9587
+ const R = d.findIndex((V) => V.key === S);
9588
9588
  d[R - 1] && o(d[R - 1].key), d[R + 1] && o(d[R + 1].key);
9589
9589
  }
9590
- u(d.filter((R) => R.key !== C)), f.current.delete(C);
9590
+ u(d.filter((R) => R.key !== S)), f.current.delete(S);
9591
9591
  }
9592
9592
  function p({
9593
- tabKey: C,
9593
+ tabKey: S,
9594
9594
  canWeClose: R
9595
9595
  }) {
9596
- f.current.set(C, R);
9596
+ f.current.set(S, R);
9597
9597
  }
9598
9598
  async function h({
9599
- action: C,
9599
+ action: S,
9600
9600
  values: R,
9601
9601
  forced_values: V,
9602
9602
  initialViewType: D,
@@ -9604,14 +9604,14 @@ function Ld(e, t) {
9604
9604
  domain: T = []
9605
9605
  }) {
9606
9606
  const _ = await E.getHandler().getActionData({
9607
- action: C,
9607
+ action: S,
9608
9608
  context: l
9609
9609
  });
9610
9610
  if (_.type === "ir.actions.wizard") {
9611
9611
  Xe("Action type not supported");
9612
9612
  return;
9613
9613
  }
9614
- const [v, O] = C.split(","), A = parseInt(O), L = xt({
9614
+ const [v, O] = S.split(","), A = parseInt(O), L = xt({
9615
9615
  context: _.context,
9616
9616
  values: a,
9617
9617
  fields: {}
@@ -9670,8 +9670,8 @@ function Ld(e, t) {
9670
9670
  limit: oe
9671
9671
  });
9672
9672
  }
9673
- function g({
9674
- title: C,
9673
+ function y({
9674
+ title: S,
9675
9675
  content: R,
9676
9676
  key: V,
9677
9677
  action: D
@@ -9680,7 +9680,7 @@ function Ld(e, t) {
9680
9680
  d.length === 1 && d[0].key === "welcome" && (F = [...d.filter((T) => T.key !== "welcome")]), u([
9681
9681
  ...F,
9682
9682
  {
9683
- title: C,
9683
+ title: S,
9684
9684
  key: V,
9685
9685
  closable: !0,
9686
9686
  content: R,
@@ -9688,8 +9688,8 @@ function Ld(e, t) {
9688
9688
  }
9689
9689
  ]), o(V);
9690
9690
  }
9691
- async function y({
9692
- relateData: C,
9691
+ async function g({
9692
+ relateData: S,
9693
9693
  fields: R,
9694
9694
  values: V,
9695
9695
  action_id: D,
@@ -9703,7 +9703,7 @@ function Ld(e, t) {
9703
9703
  target: A,
9704
9704
  string: L,
9705
9705
  limit: G
9706
- } = C, [B, q] = O[0], N = { id: B, type: q }, Z = xt({
9706
+ } = S, [B, q] = O[0], N = { id: B, type: q }, Z = xt({
9707
9707
  context: _,
9708
9708
  values: { ...V, ...a },
9709
9709
  fields: R
@@ -9729,14 +9729,14 @@ function Ld(e, t) {
9729
9729
  limit: G
9730
9730
  });
9731
9731
  }
9732
- async function w(C) {
9732
+ async function w(S) {
9733
9733
  const {
9734
9734
  action_id: R,
9735
9735
  action_type: V,
9736
9736
  res_id: D,
9737
9737
  view_id: F,
9738
9738
  overrideUnsettedLimit: T = !1
9739
- } = C, _ = `${V},${R}`, v = await E.getHandler().getActionData({
9739
+ } = S, _ = `${V},${R}`, v = await E.getHandler().getActionData({
9740
9740
  action: _,
9741
9741
  context: l
9742
9742
  }), O = xt({
@@ -9793,15 +9793,15 @@ function Ld(e, t) {
9793
9793
  limit: T && (Z === 0 || Z === !1) ? St : Z
9794
9794
  });
9795
9795
  }
9796
- async function S({
9797
- model: C,
9796
+ async function C({
9797
+ model: S,
9798
9798
  values: R,
9799
9799
  forced_values: V,
9800
9800
  initialViewType: D,
9801
9801
  res_id: F,
9802
9802
  domain: T
9803
9803
  }) {
9804
- const _ = await E.getHandler().getActionStringForModel(C);
9804
+ const _ = await E.getHandler().getActionStringForModel(S);
9805
9805
  await h({
9806
9806
  action: _,
9807
9807
  values: R,
@@ -9812,7 +9812,7 @@ function Ld(e, t) {
9812
9812
  });
9813
9813
  }
9814
9814
  async function x({
9815
- domain: C,
9815
+ domain: S,
9816
9816
  context: R,
9817
9817
  model: V,
9818
9818
  views: D,
@@ -9836,7 +9836,7 @@ function Ld(e, t) {
9836
9836
  context: { ...l, ...R }
9837
9837
  });
9838
9838
  c.current.openActionModal({
9839
- domain: C,
9839
+ domain: S,
9840
9840
  model: V,
9841
9841
  formView: Z,
9842
9842
  context: { ...l, ...R },
@@ -9849,7 +9849,7 @@ function Ld(e, t) {
9849
9849
  });
9850
9850
  } else {
9851
9851
  const Z = _ && Array.isArray(_.id) ? { ..._, id: _.id[0] } : _;
9852
- g({
9852
+ y({
9853
9853
  title: F,
9854
9854
  action: {
9855
9855
  id: v,
@@ -9865,7 +9865,7 @@ function Ld(e, t) {
9865
9865
  views: D,
9866
9866
  model: V,
9867
9867
  context: { ...l, ...R },
9868
- domain: C,
9868
+ domain: S,
9869
9869
  setCanWeClose: p,
9870
9870
  initialView: Z,
9871
9871
  res_id: A,
@@ -9884,16 +9884,16 @@ function Ld(e, t) {
9884
9884
  {
9885
9885
  openShortcut: w,
9886
9886
  openAction: x,
9887
- openRelate: y,
9888
- openDefaultActionForModel: S,
9887
+ openRelate: g,
9888
+ openDefaultActionForModel: C,
9889
9889
  tabs: d,
9890
9890
  activeKey: i,
9891
- onRemoveTab: async (C) => {
9892
- const R = f.current.get(C);
9893
- (await (R == null ? void 0 : R()) || i === "welcome") && m(C);
9891
+ onRemoveTab: async (S) => {
9892
+ const R = f.current.get(S);
9893
+ (await (R == null ? void 0 : R()) || i === "welcome") && m(S);
9894
9894
  },
9895
- onChangeTab: (C) => {
9896
- o(C);
9895
+ onChangeTab: (S) => {
9896
+ o(S);
9897
9897
  },
9898
9898
  children: /* @__PURE__ */ r(
9899
9899
  xa,
@@ -10020,12 +10020,12 @@ const { useToken: jd } = He, Eu = (e) => {
10020
10020
  ut
10021
10021
  ), {
10022
10022
  openShortcut: h,
10023
- tabs: g,
10024
- activeKey: y,
10023
+ tabs: y,
10024
+ activeKey: g,
10025
10025
  currentView: w,
10026
- currentId: S,
10026
+ currentId: C,
10027
10027
  openDefaultActionForModel: x
10028
- } = p || {}, C = De(() => {
10028
+ } = p || {}, S = De(() => {
10029
10029
  if (!w || !w.view_id || !w.extra)
10030
10030
  return;
10031
10031
  const { action_id: v, action_type: O } = w.extra || {};
@@ -10035,16 +10035,16 @@ const { useToken: jd } = He, Eu = (e) => {
10035
10035
  }
10036
10036
  const A = w.view_id;
10037
10037
  let L = !1;
10038
- return w.type === "form" && (L = S || !1), {
10038
+ return w.type === "form" && (L = C || !1), {
10039
10039
  action_id: v,
10040
10040
  action_type: O,
10041
10041
  view_id: A,
10042
10042
  res_id: L
10043
10043
  };
10044
- }, [S, w]), R = De(() => {
10045
- if (C)
10046
- return JSON.stringify(C);
10047
- }, [C]);
10044
+ }, [C, w]), R = De(() => {
10045
+ if (S)
10046
+ return JSON.stringify(S);
10047
+ }, [S]);
10048
10048
  pe(() => {
10049
10049
  D();
10050
10050
  }, [R]);
@@ -10053,11 +10053,11 @@ const { useToken: jd } = He, Eu = (e) => {
10053
10053
  (O == null ? void 0 : O.action_type) !== "ir.actions.wizard" && h(O);
10054
10054
  }
10055
10055
  const D = fe(async () => {
10056
- if (!C)
10056
+ if (!S)
10057
10057
  return;
10058
- const v = await n(C);
10058
+ const v = await n(S);
10059
10059
  v !== !1 && u(v), l(v !== !1);
10060
- }, [C, n]);
10060
+ }, [S, n]);
10061
10061
  async function F() {
10062
10062
  var v;
10063
10063
  (v = m == null ? void 0 : m.current) == null || v.close(), x == null || x({ model: "ir.ui.view_sc" });
@@ -10085,13 +10085,13 @@ const { useToken: jd } = He, Eu = (e) => {
10085
10085
  else {
10086
10086
  if (!w)
10087
10087
  return;
10088
- const v = g.find((B) => B.key === y), { id: O, type: A } = (v == null ? void 0 : v.action) || {}, L = w.view_id;
10088
+ const v = y.find((B) => B.key === g), { id: O, type: A } = (v == null ? void 0 : v.action) || {}, L = w.view_id;
10089
10089
  let G = !1;
10090
10090
  if (!O || !A) {
10091
10091
  l(!1);
10092
10092
  return;
10093
10093
  }
10094
- w.type === "form" && (G = S || !1), await i({
10094
+ w.type === "form" && (G = C || !1), await i({
10095
10095
  action_id: O,
10096
10096
  action_type: A,
10097
10097
  view_id: L,
@@ -10100,15 +10100,15 @@ const { useToken: jd } = He, Eu = (e) => {
10100
10100
  }
10101
10101
  await T(), l(!a);
10102
10102
  }, [
10103
- y,
10104
- S,
10103
+ g,
10104
+ C,
10105
10105
  d,
10106
10106
  w,
10107
10107
  T,
10108
10108
  a,
10109
10109
  i,
10110
10110
  o,
10111
- g
10111
+ y
10112
10112
  ]);
10113
10113
  return /* @__PURE__ */ r(
10114
10114
  Ei,