@gisce/react-ooui 2.6.4-rc.1 → 2.6.5

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 be({
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 Pt({
@@ -111,10 +111,10 @@ function be({
111
111
  }
112
112
  );
113
113
  return n === "horizontal" ? (() => /* @__PURE__ */ D(_e, { align: "middle", className: "pb-1 pt-1", children: [
114
- /* @__PURE__ */ r(he, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children: g }) }),
114
+ /* @__PURE__ */ r(he, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children: y }) }),
115
115
  /* @__PURE__ */ r(he, { flex: "auto", children: h() })
116
116
  ] }))() : (() => /* @__PURE__ */ D(ee, { children: [
117
- g,
117
+ y,
118
118
  h()
119
119
  ] }))();
120
120
  }
@@ -148,7 +148,7 @@ const { confirm: Cs } = Je, Yt = ({
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
  He.Provider,
@@ -157,7 +157,7 @@ const { confirm: Cs } = Je, Yt = ({
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,21 +307,21 @@ const oo = (e) => {
307
307
  context: d,
308
308
  readOnly: u
309
309
  } = t, f = re(He), { executeButtonAction: c } = f || {}, [m, p] = v(!1), { t: h } = ge();
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
  Yt({
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)
@@ -336,7 +336,7 @@ const oo = (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 oo = (e) => {
355
355
  primary: f,
356
356
  context: c,
357
357
  readOnly: m
358
- } = n || {}, p = re(He), { executeButtonAction: h } = p || {}, [g, y] = v(!1), { t: w } = ge();
358
+ } = n || {}, p = re(He), { executeButtonAction: h } = p || {}, [y, g] = v(!1), { t: w } = ge();
359
359
  function b() {
360
- if (g)
360
+ if (y)
361
361
  return /* @__PURE__ */ r(gt, {});
362
362
  if (u) {
363
363
  const R = ct(u);
@@ -365,7 +365,7 @@ const oo = (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
370
  function S() {
371
371
  if (d) {
@@ -420,9 +420,9 @@ const oo = (e) => {
420
420
  context: m,
421
421
  readOnly: p,
422
422
  danger: h
423
- } = s, [g, y] = v(!1);
423
+ } = s, [y, g] = v(!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
427
  function b() {
428
428
  if (f) {
@@ -438,7 +438,7 @@ const oo = (e) => {
438
438
  w();
439
439
  }
440
440
  function x() {
441
- if (g)
441
+ if (y)
442
442
  return /* @__PURE__ */ r(gt, {});
443
443
  if (c) {
444
444
  const S = ct(c);
@@ -521,9 +521,9 @@ const io = (e) => {
521
521
  content: t
522
522
  });
523
523
  }, so = (e) => {
524
- const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = ge(), [u, f] = v([]), [c, m] = v(!1), [p, h] = v(!1), [g, y] = v({}), w = le();
524
+ const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = ge(), [u, f] = v([]), [c, m] = v(!1), [p, h] = v(!1), [y, g] = v({}), w = le();
525
525
  me(() => {
526
- t ? b() : y({});
526
+ t ? b() : g({});
527
527
  }, [t]);
528
528
  async function b() {
529
529
  m(!0);
@@ -557,7 +557,7 @@ const io = (e) => {
557
557
  }))[0];
558
558
  T[_.code] = C[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__ */ D(_e, { style: { paddingBottom: 20 }, children: [
@@ -566,10 +566,10 @@ const io = (e) => {
566
566
  Wi,
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 io = (e) => {
581
581
  async function I() {
582
582
  h(!0);
583
583
  try {
584
- for (const F of Object.keys(g))
585
- g[F] !== w.current[F] && await P.getHandler().update({
584
+ for (const F of Object.keys(y))
585
+ y[F] !== w.current[F] && await P.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 zs(e) {
984
984
  return !1;
985
985
  }
986
986
  const nr = async (e) => {
987
- var g;
987
+ var y;
988
988
  const {
989
989
  items: t,
990
990
  model: n,
@@ -993,21 +993,21 @@ const nr = async (e) => {
993
993
  context: s,
994
994
  currentView: a = {}
995
995
  } = e, l = ["original", "pendingLink"], d = t.filter(
996
- (y) => !l.includes(y.operation)
997
- ), u = t.filter((y) => l.includes(y.operation)).map((y) => y.id), f = {
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
1001
  let c = [], m;
1002
1002
  if (a === "tree" && (o != null && o.arch)) {
1003
- const y = (g = At(o)) == null ? void 0 : g.colors, w = await P.getHandler().readEvalUiObjects({
1003
+ const g = (y = At(o)) == null ? void 0 : y.colors, w = await P.getHandler().readEvalUiObjects({
1004
1004
  model: n,
1005
1005
  ids: u,
1006
1006
  arch: o == null ? void 0 : o.arch,
1007
1007
  fields: o.fields,
1008
1008
  context: s,
1009
- attrs: y && {
1010
- colors: y
1009
+ attrs: g && {
1010
+ colors: g
1011
1011
  }
1012
1012
  });
1013
1013
  c = w[0], m = nn(w[1]);
@@ -1018,18 +1018,18 @@ const nr = async (e) => {
1018
1018
  fields: f[a],
1019
1019
  context: s
1020
1020
  });
1021
- const p = c.map((y) => {
1021
+ const p = c.map((g) => {
1022
1022
  const w = {};
1023
- return Object.keys(y).forEach((b) => {
1024
- (f[a].hasOwnProperty(b) || b === "id") && (w[b] = y[b]);
1023
+ return Object.keys(g).forEach((b) => {
1024
+ (f[a].hasOwnProperty(b) || b === "id") && (w[b] = g[b]);
1025
1025
  }), w;
1026
1026
  });
1027
1027
  return [
1028
- t.map((y) => {
1028
+ t.map((g) => {
1029
1029
  const w = p.find(
1030
- (x) => x.id === y.id
1030
+ (x) => x.id === g.id
1031
1031
  ), b = {
1032
- ...y
1032
+ ...g
1033
1033
  };
1034
1034
  return a === "form" ? b.values = w : a === "tree" && (b.treeValues = w), b;
1035
1035
  }).concat(d),
@@ -1069,24 +1069,24 @@ const nr = async (e) => {
1069
1069
  Ft(() => {
1070
1070
  h();
1071
1071
  }, [t]);
1072
- const p = async (g) => o && o[g] ? o[g] : await P.getHandler().getView({
1072
+ const p = async (y) => o && o[y] ? o[y] : await P.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(Ze, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(ea, { ooui: t, views: u }) });
1088
1088
  }, ea = (e) => {
1089
- const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [d, u] = v(), [f, c] = v(!1), [m, p] = v(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: b } = i, x = s.filter((F) => F.values), S = re(He), { getContext: R } = S || {};
1089
+ const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [d, u] = v(), [f, c] = v(!1), [m, p] = v(), { relation: h, context: y, readOnly: g, summaryField: w, titleField: b } = i, x = s.filter((F) => F.values), S = re(He), { getContext: R } = S || {};
1090
1090
  Ft(() => {
1091
1091
  V();
1092
1092
  }, [s]);
@@ -1108,7 +1108,7 @@ const nr = 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
  I(F);
@@ -1165,11 +1165,11 @@ const nr = 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: V
1174
1174
  }
1175
1175
  )
@@ -1354,7 +1354,7 @@ const Nt = ({
1354
1354
  const { ooui: t } = e;
1355
1355
  return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(fa, { ooui: t }) });
1356
1356
  }, fa = (e) => {
1357
- const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((I) => I.operation !== "pendingRemove").map((I) => I.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: m, context: p, readOnly: h, field: g } = n, y = re(He), { getContext: w } = y || {};
1357
+ const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((I) => I.operation !== "pendingRemove").map((I) => I.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: m, context: p, readOnly: h, field: y } = n, g = re(He), { getContext: w } = g || {};
1358
1358
  Ft(() => {
1359
1359
  x();
1360
1360
  }, [o]);
@@ -1371,21 +1371,21 @@ const Nt = ({
1371
1371
  const T = await P.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
  I = [...I, ...T];
1381
1381
  }
1382
1382
  const F = (await P.getHandler().search({
1383
1383
  model: m,
1384
1384
  params: I,
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 C = _;
1390
1390
  return Array.isArray(_) && (C = _[1]), { label: C, value: T.id };
1391
1391
  });
@@ -1570,28 +1570,28 @@ const Nt = ({
1570
1570
  s < o && (o = s);
1571
1571
  let a = !1, l = [];
1572
1572
  const d = i.map((c, m) => {
1573
- const p = c.filter((y) => !y.invisible), h = ya({
1573
+ const p = c.filter((g) => !g.invisible), h = ya({
1574
1574
  row: p,
1575
1575
  numberOfColumns: o
1576
1576
  });
1577
- let g = h;
1578
- return (m === 0 || !(c.length === 1 && c.some((y) => y.type === "group"))) && (g = ga({
1577
+ let y = h;
1578
+ return (m === 0 || !(c.length === 1 && c.some((g) => g.type === "group"))) && (y = ga({
1579
1579
  row: h,
1580
1580
  numberOfColumns: o,
1581
1581
  mustFillWithEmpties: n
1582
- }), l = l.concat(g)), g.map((y) => (y instanceof Pt && y.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1582
+ }), l = l.concat(y)), y.map((g) => (g instanceof Pt && g.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1583
1583
  "div",
1584
1584
  {
1585
1585
  style: {
1586
- ...pa({ item: y, responsiveBehaviour: n }),
1586
+ ...pa({ item: g, responsiveBehaviour: n }),
1587
1587
  minWidth: 0
1588
1588
  },
1589
1589
  children: ha({
1590
- ooui: y,
1590
+ ooui: g,
1591
1591
  responsiveBehaviour: n
1592
1592
  })
1593
1593
  },
1594
- y.key
1594
+ g.key
1595
1595
  )));
1596
1596
  }), u = i.length === 1 ? wa(l, o) : va(o, a);
1597
1597
  return /* @__PURE__ */ r("div", { style: {
@@ -1660,8 +1660,8 @@ const Nt = ({
1660
1660
  results: m,
1661
1661
  currentItemIndex: p,
1662
1662
  setCurrentItemIndex: h,
1663
- currentModel: g,
1664
- sorter: y,
1663
+ currentModel: y,
1664
+ sorter: g,
1665
1665
  setSorter: w,
1666
1666
  totalItems: b,
1667
1667
  setTotalItems: x,
@@ -1717,7 +1717,7 @@ const Nt = ({
1717
1717
  setCurrentItemIndex: h,
1718
1718
  results: m,
1719
1719
  setResults: c,
1720
- currentModel: g,
1720
+ currentModel: y,
1721
1721
  removingItem: N,
1722
1722
  setRemovingItem: j,
1723
1723
  formIsLoading: H,
@@ -1734,7 +1734,7 @@ const Nt = ({
1734
1734
  searchParams: E,
1735
1735
  searchVisible: L,
1736
1736
  setSearchVisible: ce,
1737
- sorter: y,
1737
+ sorter: g,
1738
1738
  setSorter: w,
1739
1739
  totalItems: b,
1740
1740
  setTotalItems: x,
@@ -1797,12 +1797,12 @@ const Nt = ({
1797
1797
  pt(t, () => ({
1798
1798
  openActionModal: S
1799
1799
  }));
1800
- const [m, p] = v(!1), [h, g] = v(
1800
+ const [m, p] = v(!1), [h, y] = v(
1801
1801
  {
1802
1802
  context: {}
1803
1803
  }
1804
1804
  );
1805
- async function y(V) {
1805
+ async function g(V) {
1806
1806
  const { reportData: F, fields: T, values: _, context: C = {} } = V, {
1807
1807
  context: O,
1808
1808
  model: A,
@@ -1857,7 +1857,7 @@ const Nt = ({
1857
1857
  }) {
1858
1858
  const { type: O } = V;
1859
1859
  if (f.current.push(C), O === "ir.actions.report.xml")
1860
- return await y({
1860
+ return await g({
1861
1861
  reportData: V,
1862
1862
  fields: F,
1863
1863
  values: T,
@@ -1943,7 +1943,7 @@ const Nt = ({
1943
1943
  context: _,
1944
1944
  actionData: C
1945
1945
  }) {
1946
- m ? R({ domain: V, model: F, formView: T, context: _, actionData: C }) : (g({ domain: V, model: F, context: _, formView: T, actionData: C }), p(!0));
1946
+ m ? R({ domain: V, model: F, formView: T, context: _, actionData: C }) : (y({ domain: V, model: F, context: _, formView: T, actionData: C }), p(!0));
1947
1947
  }
1948
1948
  async function R({
1949
1949
  domain: V,
@@ -1952,16 +1952,16 @@ const Nt = ({
1952
1952
  context: _,
1953
1953
  actionData: C
1954
1954
  }) {
1955
- g({
1955
+ y({
1956
1956
  domain: void 0,
1957
1957
  model: void 0,
1958
1958
  context: {},
1959
1959
  formView: void 0,
1960
1960
  actionData: void 0
1961
- }), p(!1), await new Promise((O) => setTimeout(O, 300)), g({ domain: V, model: F, context: _, formView: T, actionData: C }), p(!0);
1961
+ }), p(!1), await new Promise((O) => setTimeout(O, 300)), y({ domain: V, model: F, context: _, formView: T, actionData: C }), p(!0);
1962
1962
  }
1963
1963
  async function I() {
1964
- Fr(f.current), f.current = [], p(!1), g({
1964
+ Fr(f.current), f.current = [], p(!1), y({
1965
1965
  domain: void 0,
1966
1966
  model: void 0,
1967
1967
  context: {},
@@ -2000,7 +2000,7 @@ const Nt = ({
2000
2000
  visible: m,
2001
2001
  onSubmitSucceed: I,
2002
2002
  onCancel: () => {
2003
- Fr(f.current), f.current = [], p(!1), g({
2003
+ Fr(f.current), f.current = [], p(!1), y({
2004
2004
  domain: void 0,
2005
2005
  model: void 0,
2006
2006
  context: {},
@@ -2104,8 +2104,8 @@ function Ea(e, t) {
2104
2104
  submitMode: m = "api",
2105
2105
  values: p,
2106
2106
  formView: h,
2107
- postSaveAction: g,
2108
- insideButtonModal: y = !1,
2107
+ postSaveAction: y,
2108
+ insideButtonModal: g = !1,
2109
2109
  parentContext: w = {},
2110
2110
  actionDomain: b,
2111
2111
  visible: x = !0,
@@ -2309,7 +2309,7 @@ function Ea(e, t) {
2309
2309
  ids: [se()],
2310
2310
  fields: M,
2311
2311
  context: w
2312
- }))[0], y)
2312
+ }))[0], g)
2313
2313
  return { values: X, defaultGetCalled: Z };
2314
2314
  const Ce = await P.getHandler().search({
2315
2315
  params: [
@@ -2354,10 +2354,10 @@ function Ea(e, t) {
2354
2354
  });
2355
2355
  K.current = Z, L.current = X;
2356
2356
  }
2357
- g && await g([se()]), !y && $ && (fe == null || fe(se(), De(), oe()));
2357
+ y && await y([se()]), !g && $ && (fe == null || fe(se(), De(), oe()));
2358
2358
  }, jo = async (M) => {
2359
2359
  const { callOnSubmitSucceed: $ = !0 } = M || {};
2360
- !y && $ && (fe == null || fe(se(), De(), oe()));
2360
+ !g && $ && (fe == null || fe(se(), De(), oe()));
2361
2361
  }, Zt = async (M) => {
2362
2362
  let $ = !1;
2363
2363
  const { callOnSubmitSucceed: X = !0 } = M || {};
@@ -2516,7 +2516,7 @@ function Ea(e, t) {
2516
2516
  ...$
2517
2517
  }
2518
2518
  });
2519
- if (typeof X == "object" && X !== null && Object.keys(X).length === 0 && y)
2519
+ if (typeof X == "object" && X !== null && Object.keys(X).length === 0 && g)
2520
2520
  fe == null || fe(se(), De(), oe());
2521
2521
  else if (X.type && X.type === "ir.actions.act_window_close")
2522
2522
  fe == null || fe(se(), De(), oe());
@@ -2694,7 +2694,7 @@ const zt = ht(Ea), Jt = (e) => {
2694
2694
  isMenuAction: a = !1,
2695
2695
  actionData: l,
2696
2696
  ...d
2697
- } = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = v(i), [p, h] = v(!1), [g, y] = v(), { action_id: w, res_id: b, action_type: x, view_id: S } = l || {};
2697
+ } = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = v(i), [p, h] = v(!1), [y, g] = v(), { action_id: w, res_id: b, action_type: x, view_id: S } = l || {};
2698
2698
  me(() => {
2699
2699
  a && R();
2700
2700
  }, [l, a]);
@@ -2705,12 +2705,12 @@ const zt = ht(Ea), Jt = (e) => {
2705
2705
  view_id: S,
2706
2706
  res_id: b || !1
2707
2707
  });
2708
- h(T !== !1), T !== !1 && y(T);
2708
+ h(T !== !1), T !== !1 && g(T);
2709
2709
  }
2710
2710
  async function I() {
2711
- if (p && g)
2711
+ if (p && y)
2712
2712
  await P.getHandler().removeFavourite({
2713
- shortcut_id: g
2713
+ shortcut_id: y
2714
2714
  });
2715
2715
  else {
2716
2716
  const { action_id: T, res_id: _, action_type: C, view_id: O } = l;
@@ -2937,7 +2937,7 @@ const { defaultAlgorithm: Ha, defaultSeed: Ba } = Be, Ka = Ha(Ba), { Option: Wa
2937
2937
  }), u = a && !s ? Ga : Tt;
2938
2938
  function f(c) {
2939
2939
  const m = c.map((p) => {
2940
- const h = l.find(([g, y]) => p === y);
2940
+ const h = l.find(([y, g]) => p === g);
2941
2941
  return h && h[0];
2942
2942
  });
2943
2943
  if (m.length === 0) {
@@ -3125,18 +3125,18 @@ function wo(e) {
3125
3125
  searchError: c,
3126
3126
  searchValues: m,
3127
3127
  showLimitOptions: p = !0
3128
- } = e, [h, g] = v(), [y, w] = v(), [b, x] = v(!1), S = le(), { token: R } = ol(), [I] = lt.useForm();
3128
+ } = e, [h, y] = v(), [g, w] = v(), [b, x] = v(!1), S = le(), { token: R } = ol(), [I] = lt.useForm();
3129
3129
  me(() => {
3130
3130
  I.setFieldsValue(m);
3131
3131
  }, [m]);
3132
3132
  const V = () => {
3133
- if (!y)
3133
+ if (!g)
3134
3134
  return;
3135
- const _ = b ? y : h, C = _ == null ? void 0 : _.rows;
3135
+ const _ = b ? g : h, C = _ == null ? void 0 : _.rows;
3136
3136
  return C == null ? void 0 : C.map((O, A) => /* @__PURE__ */ r(_e, { children: O.map((N, j) => /* @__PURE__ */ r(he, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r(Ya, { field: N }) }, j)) }, A));
3137
3137
  };
3138
3138
  Ft(() => {
3139
- x(!1), S.current = new yi(n, t), S.current.parse(), g(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3139
+ x(!1), S.current = new yi(n, t), S.current.parse(), y(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
3140
3140
  }, [t, n]);
3141
3141
  const F = V(), T = (_) => {
3142
3142
  var N;
@@ -3416,11 +3416,11 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3416
3416
  Lt
3417
3417
  ), { processAction: c } = f || {}, [m, p] = Xe(
3418
3418
  P.getHandler().getView
3419
- ), [h, g] = Xe(
3419
+ ), [h, y] = Xe(
3420
3420
  P.getHandler().readObjects
3421
- ), y = de(() => {
3422
- p(), g();
3423
- }, [p, g]), w = de(async () => {
3421
+ ), g = de(() => {
3422
+ p(), y();
3423
+ }, [p, y]), w = de(async () => {
3424
3424
  var I;
3425
3425
  const x = await m({
3426
3426
  model: n,
@@ -3482,7 +3482,7 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3482
3482
  onRetrieveData: w,
3483
3483
  onItemClick: b,
3484
3484
  onOpenChange: (x) => {
3485
- x || y();
3485
+ x || g();
3486
3486
  }
3487
3487
  }
3488
3488
  );
@@ -3693,10 +3693,7 @@ const pl = (e) => {
3693
3693
  context: i
3694
3694
  });
3695
3695
  s(
3696
- m.map((p) => {
3697
- const { id: h, name: g } = p;
3698
- return { id: h, name: g };
3699
- })
3696
+ m.map((p) => ({ id: p.id, name: p[u] }))
3700
3697
  );
3701
3698
  } catch (m) {
3702
3699
  console.error("Error loading data", m);
@@ -3709,8 +3706,8 @@ const pl = (e) => {
3709
3706
  }, [e == null ? void 0 : e.items]);
3710
3707
  const c = Oe(
3711
3708
  () => o.map((m) => {
3712
- const { id: p, name: h } = m, g = Wt(h);
3713
- return /* @__PURE__ */ r(rr, { color: g, children: h }, `${p}`);
3709
+ const { id: p, name: h } = m, y = Wt(h);
3710
+ return /* @__PURE__ */ r(rr, { color: y, children: h }, `${p}`);
3714
3711
  }),
3715
3712
  [o]
3716
3713
  );
@@ -3760,8 +3757,8 @@ const pl = (e) => {
3760
3757
  onRowSelectionChange: m,
3761
3758
  scrollY: p,
3762
3759
  colorsForResults: h = {},
3763
- statusForResults: g = {},
3764
- onChangeSort: y,
3760
+ statusForResults: y = {},
3761
+ onChangeSort: g,
3765
3762
  sorter: w,
3766
3763
  onFetchChildrenForRecord: b,
3767
3764
  childField: x,
@@ -3868,13 +3865,13 @@ const pl = (e) => {
3868
3865
  if (h[J.id])
3869
3866
  return { color: h[J.id] };
3870
3867
  },
3871
- onRowStatus: zs(g) ? (J) => {
3872
- if (g[J.id])
3873
- return /* @__PURE__ */ r(ui, { color: g[J.id] });
3868
+ onRowStatus: zs(y) ? (J) => {
3869
+ if (y[J.id])
3870
+ return /* @__PURE__ */ r(ui, { color: y[J.id] });
3874
3871
  } : void 0,
3875
3872
  onRowDoubleClick: u,
3876
3873
  onRowSelectionChange: m,
3877
- onChangeSort: y,
3874
+ onChangeSort: g,
3878
3875
  sorter: w,
3879
3876
  readonly: I,
3880
3877
  expandableOpts: b ? {
@@ -3908,8 +3905,8 @@ const So = (e) => {
3908
3905
  formView: m,
3909
3906
  sorter: p,
3910
3907
  setSorter: h,
3911
- setCurrentItemIndex: g,
3912
- setResultsActionView: y,
3908
+ setCurrentItemIndex: y,
3909
+ setResultsActionView: g,
3913
3910
  resultsActionView: w,
3914
3911
  domain: b,
3915
3912
  currentId: x,
@@ -3920,9 +3917,9 @@ const So = (e) => {
3920
3917
  clearSelection: F
3921
3918
  } = e, [T, _] = v(!1), [C, O] = v(!1), [A, N] = v(), [j, H] = v(1), [U, k] = v(0), [Y, q] = v(), [Q, ne] = v([]), [B, E] = v(void 0), [K, L] = v(void 0), ce = le(S || St), J = le([]), te = de(
3922
3919
  (ae) => {
3923
- y == null || y([...ae]), ne([...ae]);
3920
+ g == null || g([...ae]), ne([...ae]);
3924
3921
  },
3925
- [y]
3922
+ [g]
3926
3923
  ), ve = de(() => w || Q, [w, Q]), z = de(async () => {
3927
3924
  const ae = await P.getHandler().nameSearch({
3928
3925
  model: t,
@@ -3948,9 +3945,9 @@ const So = (e) => {
3948
3945
  sorter: p,
3949
3946
  fields: { ...c.fields, ...m.fields }
3950
3947
  }) : [...J.current];
3951
- te(pe), fe.length > 0 ? g == null || g(0) : g == null || g(void 0);
3948
+ te(pe), fe.length > 0 ? y == null || y(0) : y == null || y(void 0);
3952
3949
  } else
3953
- te([]), g == null || g(void 0);
3950
+ te([]), y == null || y(void 0);
3954
3951
  _(!1), d.current = !0;
3955
3952
  }, [
3956
3953
  te,
@@ -3962,7 +3959,7 @@ const So = (e) => {
3962
3959
  c,
3963
3960
  m,
3964
3961
  p,
3965
- g,
3962
+ y,
3966
3963
  f
3967
3964
  ]), ie = de(
3968
3965
  async (ae) => {
@@ -3987,15 +3984,15 @@ const So = (e) => {
3987
3984
  const De = se.findIndex(
3988
3985
  (G) => x === G.id
3989
3986
  );
3990
- De === -1 ? g == null || g(0) : g == null || g(De);
3987
+ De === -1 ? y == null || y(0) : y == null || y(De);
3991
3988
  } else
3992
- g == null || g(void 0);
3989
+ y == null || y(void 0);
3993
3990
  _(!1);
3994
3991
  const We = await fe;
3995
3992
  q(We), f == null || f(We);
3996
3993
  },
3997
3994
  [
3998
- g,
3995
+ y,
3999
3996
  w,
4000
3997
  te,
4001
3998
  x,
@@ -4131,7 +4128,7 @@ function Dl(e, t) {
4131
4128
  rootTree: f = !1,
4132
4129
  parentContext: c = {},
4133
4130
  onChangeSelectedRowKeys: m
4134
- } = e, [p, h] = v(!1), [g, y] = v(!1), w = le(!1), b = le(null), [x, S] = v(), [R, I] = v(), [V, F] = v(), [T, _] = v(), [C, O] = v(200), A = le(), { height: N } = hn(), j = re(
4131
+ } = e, [p, h] = v(!1), [y, g] = v(!1), w = le(!1), b = le(null), [x, S] = v(), [R, I] = v(), [V, F] = v(), [T, _] = v(), [C, O] = v(200), A = le(), { height: N } = hn(), j = re(
4135
4132
  Lt
4136
4133
  ), { processAction: H } = j || {}, U = re(
4137
4134
  nt
@@ -4211,12 +4208,12 @@ function Dl(e, t) {
4211
4208
  getFields: () => R == null ? void 0 : R.fields,
4212
4209
  getDomain: () => d
4213
4210
  })), me(() => {
4214
- g && u && R && (w.current = !1, ae());
4215
- }, [W, Ae, g, u, a, R]);
4211
+ y && u && R && (w.current = !1, ae());
4212
+ }, [W, Ae, y, u, a, R]);
4216
4213
  const Re = async () => {
4217
- y(!1), h(!0), _(void 0), ie == null || ie(!0);
4214
+ g(!1), h(!0), _(void 0), ie == null || ie(!0);
4218
4215
  try {
4219
- await xe(), y(!0);
4216
+ await xe(), g(!0);
4220
4217
  } catch (Ne) {
4221
4218
  _(Ne), ie == null || ie(!1);
4222
4219
  } finally {
@@ -4380,15 +4377,15 @@ const To = ht(Dl), Fo = (e) => {
4380
4377
  nameSearch: s,
4381
4378
  domain: a,
4382
4379
  context: l = {}
4383
- } = e, [d, u] = v(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = ge(), [p, h] = v([]), g = async () => {
4380
+ } = e, [d, u] = v(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = ge(), [p, h] = v([]), y = async () => {
4384
4381
  await new Promise((x) => setTimeout(x, 5)), n();
4385
- }, y = async (x) => {
4382
+ }, g = async (x) => {
4386
4383
  const { id: S } = x;
4387
4384
  i([S]);
4388
4385
  };
4389
4386
  function w() {
4390
4387
  if (p.length === 0) {
4391
- g();
4388
+ y();
4392
4389
  return;
4393
4390
  }
4394
4391
  i(p);
@@ -4399,7 +4396,7 @@ const To = ht(Dl), Fo = (e) => {
4399
4396
  {
4400
4397
  model: o,
4401
4398
  nameSearch: s,
4402
- onRowClicked: y,
4399
+ onRowClicked: g,
4403
4400
  treeScrollY: c * 0.3,
4404
4401
  domain: a,
4405
4402
  parentContext: l,
@@ -4429,7 +4426,7 @@ const To = ht(Dl), Fo = (e) => {
4429
4426
  children: m("ok")
4430
4427
  }
4431
4428
  ),
4432
- /* @__PURE__ */ r(Pe, { icon: /* @__PURE__ */ r(Ut, {}), onClick: g, children: m("cancel") })
4429
+ /* @__PURE__ */ r(Pe, { icon: /* @__PURE__ */ r(Ut, {}), onClick: y, children: m("cancel") })
4433
4430
  ] }) })
4434
4431
  ] });
4435
4432
  return /* @__PURE__ */ D(ee, { children: [
@@ -4441,7 +4438,7 @@ const To = ht(Dl), Fo = (e) => {
4441
4438
  width: f,
4442
4439
  open: t && !d,
4443
4440
  closable: !0,
4444
- onCancel: g,
4441
+ onCancel: y,
4445
4442
  footer: null,
4446
4443
  destroyOnClose: !0,
4447
4444
  maskClosable: !1,
@@ -4455,10 +4452,10 @@ const To = ht(Dl), Fo = (e) => {
4455
4452
  visible: d,
4456
4453
  parentContext: l,
4457
4454
  onSubmitSucceed: (x) => {
4458
- u(!1), g(), i([x]);
4455
+ u(!1), y(), i([x]);
4459
4456
  },
4460
4457
  onCancel: () => {
4461
- u(!1), g();
4458
+ u(!1), y();
4462
4459
  }
4463
4460
  }
4464
4461
  )
@@ -4488,7 +4485,7 @@ const To = ht(Dl), Fo = (e) => {
4488
4485
  context: l,
4489
4486
  id: d,
4490
4487
  domain: u
4491
- } = i, f = o && !a ? { backgroundColor: Ro.colorPrimaryBg } : void 0, [c, m] = v(!1), [p, h] = v(!1), [g, y] = v(!1), [w, b] = v(), x = le(!1), [S, R] = v(""), I = le(), V = re(He), { domain: F, getValues: T, getFields: _, getContext: C, elementHasLostFocus: O } = V || {}, A = le([]), [N, j] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
4488
+ } = i, f = o && !a ? { backgroundColor: Ro.colorPrimaryBg } : void 0, [c, m] = v(!1), [p, h] = v(!1), [y, g] = v(!1), [w, b] = v(), x = le(!1), [S, R] = v(""), I = le(), V = re(He), { domain: F, getValues: T, getFields: _, getContext: C, elementHasLostFocus: O } = V || {}, A = le([]), [N, j] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
4492
4489
  me(() => {
4493
4490
  !Array.isArray(t) && t && ne(t);
4494
4491
  }, [t]), me(() => {
@@ -4499,12 +4496,12 @@ const To = ht(Dl), Fo = (e) => {
4499
4496
  }, Y = (L) => {
4500
4497
  I.current = L.target.value, k([void 0, ""]);
4501
4498
  }, q = async () => {
4502
- if (!g && S !== U) {
4499
+ if (!y && S !== U) {
4503
4500
  if (await new Promise((L) => setTimeout(L, 100)), x.current) {
4504
4501
  k([void 0, ""]);
4505
4502
  return;
4506
4503
  }
4507
- y(!0);
4504
+ g(!0);
4508
4505
  try {
4509
4506
  if (A.current && A.current.length > 0)
4510
4507
  Q(I.current);
@@ -4519,7 +4516,7 @@ const To = ht(Dl), Fo = (e) => {
4519
4516
  } catch (L) {
4520
4517
  on(L);
4521
4518
  } finally {
4522
- y(!1);
4519
+ g(!1);
4523
4520
  }
4524
4521
  }
4525
4522
  }, Q = async (L) => {
@@ -4535,7 +4532,7 @@ const To = ht(Dl), Fo = (e) => {
4535
4532
  }
4536
4533
  b(L), m(!0);
4537
4534
  }, ne = async (L) => {
4538
- y(!0);
4535
+ g(!0);
4539
4536
  try {
4540
4537
  const ce = await P.getHandler().execute({
4541
4538
  action: "name_get",
@@ -4547,7 +4544,7 @@ const To = ht(Dl), Fo = (e) => {
4547
4544
  } catch (ce) {
4548
4545
  on(ce);
4549
4546
  } finally {
4550
- y(!1);
4547
+ g(!1);
4551
4548
  }
4552
4549
  };
4553
4550
  async function B() {
@@ -4609,8 +4606,8 @@ const To = ht(Dl), Fo = (e) => {
4609
4606
  /* @__PURE__ */ r(he, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ r(
4610
4607
  Pe,
4611
4608
  {
4612
- icon: g ? /* @__PURE__ */ r(gt, {}) : /* @__PURE__ */ r(Yn, {}),
4613
- disabled: a || g,
4609
+ icon: y ? /* @__PURE__ */ r(gt, {}) : /* @__PURE__ */ r(Yn, {}),
4610
+ disabled: a || y,
4614
4611
  onClick: () => {
4615
4612
  x.current = !0, Q(U);
4616
4613
  },
@@ -4791,7 +4788,7 @@ function Hl({
4791
4788
  `bold ${Math.floor(f * 1.03)}px sans-serif`
4792
4789
  );
4793
4790
  l && (h = h * 1.5), (h >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / h * f);
4794
- const g = l && ct(l, { style: { fontSize: f } });
4791
+ const y = l && ct(l, { style: { fontSize: f } });
4795
4792
  return /* @__PURE__ */ r(
4796
4793
  "div",
4797
4794
  {
@@ -4807,9 +4804,9 @@ function Hl({
4807
4804
  padding: "0.2rem"
4808
4805
  },
4809
4806
  children: /* @__PURE__ */ D(_e, { align: "middle", children: [
4810
- g && /* @__PURE__ */ r(he, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(g, {}) }),
4807
+ y && /* @__PURE__ */ r(he, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(y, {}) }),
4811
4808
  /* @__PURE__ */ D(he, { children: [
4812
- /* @__PURE__ */ r(Dn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: g ? ` ${i}%` : `${i}%` }),
4809
+ /* @__PURE__ */ r(Dn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: y ? ` ${i}%` : `${i}%` }),
4813
4810
  /* @__PURE__ */ r(
4814
4811
  Dn,
4815
4812
  {
@@ -4852,7 +4849,7 @@ const gn = () => /* @__PURE__ */ r(
4852
4849
  field: u,
4853
4850
  operator: f,
4854
4851
  manualIds: c
4855
- } = e, [m, p] = v(!1), [h, g] = v(), [y, w] = v(), [b, x] = v(), [S, R] = v(), [I, V] = v(), [F, T] = v(), [_] = Xe(
4852
+ } = e, [m, p] = v(!1), [h, y] = v(), [g, w] = v(), [b, x] = v(), [S, R] = v(), [I, V] = v(), [F, T] = v(), [_] = Xe(
4856
4853
  P.getHandler().searchAllIds
4857
4854
  ), [C] = Xe(
4858
4855
  P.getHandler().readObjects
@@ -4922,7 +4919,7 @@ const gn = () => /* @__PURE__ */ r(
4922
4919
  let k, Y;
4923
4920
  try {
4924
4921
  const q = await j({ domain: n, isTotal: !1 });
4925
- if (g(q), s) {
4922
+ if (y(q), s) {
4926
4923
  const Q = await A({
4927
4924
  domain: s,
4928
4925
  values: {},
@@ -4962,7 +4959,7 @@ const gn = () => /* @__PURE__ */ r(
4962
4959
  {
4963
4960
  value: h,
4964
4961
  totalValue: b,
4965
- percent: y,
4962
+ percent: g,
4966
4963
  color: S,
4967
4964
  icon: I,
4968
4965
  suffix: d,
@@ -4978,7 +4975,7 @@ const gn = () => /* @__PURE__ */ r(
4978
4975
  limit: s,
4979
4976
  uninformedString: a,
4980
4977
  manualIds: l
4981
- } = e, [d, u] = v(!1), [f, c] = v(), [m, p] = v(), [h, g] = v(), [y, w] = v("line"), [b] = Xe(
4978
+ } = e, [d, u] = v(!1), [f, c] = v(), [m, p] = v(), [h, y] = v(), [g, w] = v("line"), [b] = Xe(
4982
4979
  P.getHandler().getFields
4983
4980
  ), [x] = Xe(
4984
4981
  P.getHandler().readObjects
@@ -5012,12 +5009,12 @@ const gn = () => /* @__PURE__ */ r(
5012
5009
  return c("No values or fields returned"), u(!1), {
5013
5010
  loading: d,
5014
5011
  error: f,
5015
- type: y,
5012
+ type: g,
5016
5013
  values: m,
5017
5014
  evaluatedEntries: h,
5018
5015
  fetchData: R
5019
5016
  };
5020
- g(F);
5017
+ y(F);
5021
5018
  const _ = Kl({
5022
5019
  ooui: I,
5023
5020
  values: F,
@@ -5045,14 +5042,14 @@ const gn = () => /* @__PURE__ */ r(
5045
5042
  m,
5046
5043
  x,
5047
5044
  S,
5048
- y,
5045
+ g,
5049
5046
  a,
5050
5047
  o
5051
5048
  ]);
5052
5049
  return {
5053
5050
  loading: d,
5054
5051
  error: f,
5055
- type: y,
5052
+ type: g,
5056
5053
  values: m,
5057
5054
  evaluatedEntries: h,
5058
5055
  fetchData: R
@@ -5093,7 +5090,7 @@ async function Gl({
5093
5090
  fieldsToRetrieve: e,
5094
5091
  context: i
5095
5092
  });
5096
- return o && (p = [...p].sort((h, g) => h[o] - g[o])), {
5093
+ return o && (p = [...p].sort((h, y) => h[o] - y[o])), {
5097
5094
  values: p,
5098
5095
  fields: c
5099
5096
  };
@@ -5284,7 +5281,7 @@ const Jl = {
5284
5281
  (m) => {
5285
5282
  if (!l)
5286
5283
  return;
5287
- const p = l.find((y) => y.x === m);
5284
+ const p = l.find((g) => g.x === m);
5288
5285
  return `${`${((p == null ? void 0 : p.percent) || 0).toFixed(0)}%`}`;
5289
5286
  },
5290
5287
  [l]
@@ -5357,21 +5354,21 @@ const ec = (e) => {
5357
5354
  p();
5358
5355
  }, [o, t, s, i, n]), u || !f)
5359
5356
  return /* @__PURE__ */ r(gn, {});
5360
- const { data: h, isGroup: g, isStack: y } = f;
5357
+ const { data: h, isGroup: y, isStack: g } = f;
5361
5358
  return d ? /* @__PURE__ */ r(Ze, { message: d, type: "error", banner: !0 }) : /* @__PURE__ */ r(
5362
5359
  Do,
5363
5360
  {
5364
5361
  type: c,
5365
5362
  data: h,
5366
- isGroup: g,
5367
- isStack: y,
5363
+ isGroup: y,
5364
+ isStack: g,
5368
5365
  numItems: m.length
5369
5366
  }
5370
5367
  );
5371
5368
  }, tc = (e, t) => {
5372
5369
  const { view_id: n, model: i, context: o, domain: s, limit: a, manualIds: l } = e, [d, u] = v(!1), [f, c] = v(), [m, p] = v(), h = re(
5373
5370
  nt
5374
- ), { setGraphIsLoading: g = void 0 } = h || {}, [y] = Xe(P.getHandler().getView);
5371
+ ), { setGraphIsLoading: y = void 0 } = h || {}, [g] = Xe(P.getHandler().getView);
5375
5372
  pt(t, () => ({
5376
5373
  refresh: () => {
5377
5374
  w();
@@ -5380,9 +5377,9 @@ const ec = (e) => {
5380
5377
  w();
5381
5378
  }, [n]);
5382
5379
  async function w() {
5383
- u(!0), g == null || g(!0);
5380
+ u(!0), y == null || y(!0);
5384
5381
  try {
5385
- const b = await y({
5382
+ const b = await g({
5386
5383
  model: i,
5387
5384
  id: n,
5388
5385
  type: "graph",
@@ -5390,9 +5387,9 @@ const ec = (e) => {
5390
5387
  });
5391
5388
  p(b.arch);
5392
5389
  const x = Wn(b.arch);
5393
- c(x), u(!1), g == null || g(!1);
5390
+ c(x), u(!1), y == null || y(!1);
5394
5391
  } catch (b) {
5395
- return console.error(b), u(!1), g == null || g(!1), /* @__PURE__ */ r(ee, { children: JSON.stringify(b) });
5392
+ return console.error(b), u(!1), y == null || y(!1), /* @__PURE__ */ r(ee, { children: JSON.stringify(b) });
5396
5393
  }
5397
5394
  }
5398
5395
  if (d || !f)
@@ -5479,8 +5476,8 @@ const ec = (e) => {
5479
5476
  onSearchItem: m,
5480
5477
  selectedRowKeys: p,
5481
5478
  showCreateButton: h,
5482
- showToggleButton: g
5483
- } = e, { token: y } = sc();
5479
+ showToggleButton: y
5480
+ } = e, { token: g } = sc();
5484
5481
  function w() {
5485
5482
  return /* @__PURE__ */ r("div", { className: "inline-block w-3" });
5486
5483
  }
@@ -5490,8 +5487,8 @@ const ec = (e) => {
5490
5487
  {
5491
5488
  className: "flex flex-grow h-8 text-white",
5492
5489
  style: {
5493
- borderRadius: y.borderRadius,
5494
- backgroundColor: y.colorPrimaryActive
5490
+ borderRadius: g.borderRadius,
5491
+ backgroundColor: g.colorPrimaryActive
5495
5492
  },
5496
5493
  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 }) })
5497
5494
  }
@@ -5565,7 +5562,7 @@ const ec = (e) => {
5565
5562
  s !== "graph" && x(),
5566
5563
  s === "form" && R(),
5567
5564
  w(),
5568
- g && /* @__PURE__ */ r(
5565
+ y && /* @__PURE__ */ r(
5569
5566
  ze,
5570
5567
  {
5571
5568
  tooltip: "Toggle view mode",
@@ -5591,7 +5588,7 @@ const dc = (e) => {
5591
5588
  var De;
5592
5589
  const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = re(
5593
5590
  _o
5594
- ), f = re(He), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = ge(), [w, b] = v(!1), [x, S] = v(!1), [R, I] = v(), [V, F] = v(!1), [T, _] = v(!1), [C, O] = v(), [A, N] = v([]), [j, H] = v(!1), U = le([]), [k, Y] = v(), q = le(), [Q, ne] = v(void 0), {
5591
+ ), f = re(He), { activeId: c, getFields: m, getValues: p, getContext: h, domain: y } = f || {}, { t: g } = ge(), [w, b] = v(!1), [x, S] = v(!1), [R, I] = v(), [V, F] = v(!1), [T, _] = v(!1), [C, O] = v(), [A, N] = v([]), [j, H] = v(!1), U = le([]), [k, Y] = v(), q = le(), [Q, ne] = v(void 0), {
5595
5592
  readOnly: B,
5596
5593
  relation: E,
5597
5594
  context: K,
@@ -5611,7 +5608,7 @@ const dc = (e) => {
5611
5608
  }, [s, a]);
5612
5609
  me(() => {
5613
5610
  ke();
5614
- }, [g]);
5611
+ }, [y]);
5615
5612
  const ie = (G) => {
5616
5613
  var oe, Re;
5617
5614
  n == null || n({
@@ -5653,9 +5650,9 @@ const dc = (e) => {
5653
5650
  }),
5654
5651
  fields: m(),
5655
5652
  context: h()
5656
- })), g && g.length > 0 && (U.current = U.current.concat(
5653
+ })), y && y.length > 0 && (U.current = U.current.concat(
5657
5654
  jr({
5658
- domain: g,
5655
+ domain: y,
5659
5656
  widgetFieldName: J
5660
5657
  })
5661
5658
  ));
@@ -5694,7 +5691,7 @@ const dc = (e) => {
5694
5691
  ie(xe);
5695
5692
  }, ae = (G) => {
5696
5693
  w ? qt({
5697
- t: y,
5694
+ t: g,
5698
5695
  onOk: () => {
5699
5696
  Le(), G(), b(!1);
5700
5697
  }
@@ -5702,7 +5699,7 @@ const dc = (e) => {
5702
5699
  }, Ie = () => {
5703
5700
  if (ce) {
5704
5701
  ic({
5705
- t: y,
5702
+ t: g,
5706
5703
  onOk: () => {
5707
5704
  a === "form" ? W() : ye();
5708
5705
  }
@@ -5710,7 +5707,7 @@ const dc = (e) => {
5710
5707
  return;
5711
5708
  }
5712
5709
  rc({
5713
- t: y,
5710
+ t: g,
5714
5711
  onOk: () => {
5715
5712
  a === "form" ? W() : ye();
5716
5713
  }
@@ -5828,7 +5825,7 @@ const dc = (e) => {
5828
5825
  const se = () => {
5829
5826
  var oe, Re, xe, Te;
5830
5827
  if (a === "form")
5831
- return te.length === 0 ? y("noCurrentEntries") : a !== ve.current && s.some((Ve) => !Ve.values) ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
5828
+ return te.length === 0 ? g("noCurrentEntries") : a !== ve.current && s.some((Ve) => !Ve.values) ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
5832
5829
  zt,
5833
5830
  {
5834
5831
  formView: o.get("form"),
@@ -5957,25 +5954,25 @@ const dc = (e) => {
5957
5954
  }, uc = (e) => {
5958
5955
  const { ooui: t } = e, { mode: n, relation: i, views: o, required: s, context: a } = t;
5959
5956
  let l;
5960
- const [d, u] = v(!0), [f, c] = v(), [m, p] = v(/* @__PURE__ */ new Map()), h = re(He), { getContext: g } = h || {};
5957
+ const [d, u] = v(!0), [f, c] = v(), [m, p] = v(/* @__PURE__ */ new Map()), h = re(He), { getContext: y } = h || {};
5961
5958
  Ft(() => {
5962
5959
  w();
5963
5960
  }, [t]);
5964
- const y = async (x) => o && o[x] ? o[x] : await P.getHandler().getView({
5961
+ const g = async (x) => o && o[x] ? o[x] : await P.getHandler().getView({
5965
5962
  model: i,
5966
5963
  type: x,
5967
- context: { ...g == null ? void 0 : g(), ...a }
5964
+ context: { ...y == null ? void 0 : y(), ...a }
5968
5965
  }), w = async () => {
5969
5966
  u(!0), c(void 0);
5970
5967
  try {
5971
5968
  if (n && n.length > 0) {
5972
5969
  for (const x of n) {
5973
- const S = await y(x);
5970
+ const S = await g(x);
5974
5971
  m.set(x, S);
5975
5972
  }
5976
5973
  p(m);
5977
5974
  } else {
5978
- const x = await y("form"), S = await y("tree");
5975
+ const x = await g("form"), S = await g("tree");
5979
5976
  m.set("form", x), m.set("tree", S), p(m);
5980
5977
  }
5981
5978
  } catch (x) {
@@ -6014,10 +6011,10 @@ const dc = (e) => {
6014
6011
  const h = (w) => {
6015
6012
  i == null || i(w);
6016
6013
  };
6017
- function g(w) {
6014
+ function y(w) {
6018
6015
  u.current = w.target.value, c(w.target.value);
6019
6016
  }
6020
- async function y() {
6017
+ async function g() {
6021
6018
  h(ll(f)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
6022
6019
  }
6023
6020
  return /* @__PURE__ */ r(
@@ -6029,8 +6026,8 @@ const dc = (e) => {
6029
6026
  style: d,
6030
6027
  id: o,
6031
6028
  placeholder: "00:00",
6032
- onChange: g,
6033
- onBlur: y
6029
+ onChange: y,
6030
+ onBlur: g
6034
6031
  }
6035
6032
  );
6036
6033
  };
@@ -6205,25 +6202,25 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6205
6202
  onClose: s
6206
6203
  }) => {
6207
6204
  const a = le({}), l = le(/* @__PURE__ */ new Map()), { t: d } = ge(), u = de(
6208
- async (y) => {
6209
- if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
6205
+ async (g) => {
6206
+ if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
6210
6207
  mt(d("selectAtLeastOneField"));
6211
6208
  return;
6212
6209
  }
6213
6210
  let w = i;
6214
- y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6211
+ g.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6215
6212
  ["id", "in", n == null ? void 0 : n.map((S) => S.id)]
6216
6213
  ]);
6217
6214
  const { datas: b } = await P.getHandler().exportData({
6218
6215
  model: e,
6219
6216
  fields: Oc({
6220
- keys: y.selectedKeys,
6217
+ keys: g.selectedKeys,
6221
6218
  fields: a.current
6222
6219
  }),
6223
6220
  domain: w,
6224
- limit: y.registersAmount === "all" ? 0 : o,
6221
+ limit: g.registersAmount === "all" ? 0 : o,
6225
6222
  context: t,
6226
- format: y.exportType
6223
+ format: g.exportType
6227
6224
  });
6228
6225
  s(), await new Promise((S) => setTimeout(S, 200));
6229
6226
  const x = await Et(b);
@@ -6231,15 +6228,15 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6231
6228
  },
6232
6229
  [i, n, e, o, t, s, d]
6233
6230
  ), f = de(async () => {
6234
- const y = await P.getHandler().getFields({
6231
+ const g = await P.getHandler().getFields({
6235
6232
  model: e,
6236
6233
  context: t,
6237
6234
  fields: []
6238
6235
  });
6239
- return a.current["/"] = y, Er({ fields: y });
6236
+ return a.current["/"] = g, Er({ fields: g });
6240
6237
  }, [e, t, a]), c = de(
6241
- async (y) => {
6242
- const b = Ln(y, a.current)[Nn(y)], x = b.relation, S = await P.getHandler().getFields({
6238
+ async (g) => {
6239
+ const b = Ln(g, a.current)[Nn(g)], x = b.relation, S = await P.getHandler().getFields({
6243
6240
  model: x,
6244
6241
  context: t,
6245
6242
  fields: []
@@ -6249,20 +6246,20 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6249
6246
  parentTitle: b.string,
6250
6247
  title: I.string
6251
6248
  });
6252
- return a.current[y] = S, Er({
6249
+ return a.current[g] = S, Er({
6253
6250
  fields: S,
6254
- parentKey: y
6251
+ parentKey: g
6255
6252
  });
6256
6253
  },
6257
6254
  [t]
6258
6255
  ), m = de(async () => {
6259
- const y = await Tc({ model: e, context: t }), w = await Rc({
6260
- predefinedExports: y,
6256
+ const g = await Tc({ model: e, context: t }), w = await Rc({
6257
+ predefinedExports: g,
6261
6258
  fields: a.current,
6262
6259
  onGetFieldChilds: c
6263
6260
  });
6264
6261
  return {
6265
- predefinedExports: y.map((x) => ({
6262
+ predefinedExports: g.map((x) => ({
6266
6263
  ...x,
6267
6264
  fields: x.fields.map((S) => {
6268
6265
  const R = Nn(S.key), V = Ln(S.key, a.current)[R];
@@ -6277,39 +6274,39 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6277
6274
  keysWithChilds: w
6278
6275
  };
6279
6276
  }, [t, e, c]), p = de(
6280
- async (y) => {
6277
+ async (g) => {
6281
6278
  await P.getHandler().deleteObjects({
6282
6279
  model: "ir.exports",
6283
- ids: [y.id],
6280
+ ids: [g.id],
6284
6281
  context: t
6285
6282
  });
6286
6283
  },
6287
6284
  [t]
6288
6285
  ), h = de(
6289
- async (y) => {
6290
- if (l.current.has(y))
6291
- return l.current.get(y);
6286
+ async (g) => {
6287
+ if (l.current.has(g))
6288
+ return l.current.get(g);
6292
6289
  const w = P.getHandler().getFields({
6293
- model: y,
6290
+ model: g,
6294
6291
  context: t,
6295
6292
  fields: []
6296
6293
  });
6297
- l.current.set(y, w);
6294
+ l.current.set(g, w);
6298
6295
  },
6299
6296
  [l, t]
6300
- ), g = de(
6301
- async (y) => {
6297
+ ), y = de(
6298
+ async (g) => {
6302
6299
  const w = await h("ir.exports"), b = await h("ir.exports.line"), x = await P.getHandler().create({
6303
6300
  model: "ir.exports",
6304
6301
  values: {
6305
- name: y.name,
6302
+ name: g.name,
6306
6303
  resource: e
6307
6304
  },
6308
6305
  fields: w,
6309
6306
  context: t
6310
6307
  });
6311
6308
  return await Promise.all(
6312
- y.fields.map(async (S) => await P.getHandler().create({
6309
+ g.fields.map(async (S) => await P.getHandler().create({
6313
6310
  model: "ir.exports.line",
6314
6311
  values: {
6315
6312
  name: S.key,
@@ -6318,7 +6315,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6318
6315
  fields: b,
6319
6316
  context: t
6320
6317
  }))
6321
- ), { ...y, id: x };
6318
+ ), { ...g, id: x };
6322
6319
  },
6323
6320
  [t, h, e]
6324
6321
  );
@@ -6327,7 +6324,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6327
6324
  onGetFieldChilds: c,
6328
6325
  onExport: u,
6329
6326
  onGetPredefinedExports: m,
6330
- onSavePredefinedExport: g,
6327
+ onSavePredefinedExport: y,
6331
6328
  onRemovePredefinedExport: p
6332
6329
  };
6333
6330
  }, Er = ({
@@ -6448,7 +6445,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6448
6445
  onGetFields: m,
6449
6446
  onGetPredefinedExports: p,
6450
6447
  onSavePredefinedExport: h,
6451
- onRemovePredefinedExport: g
6448
+ onRemovePredefinedExport: y
6452
6449
  } = Cc({
6453
6450
  model: i,
6454
6451
  context: o,
@@ -6470,7 +6467,7 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6470
6467
  visibleRegisters: u,
6471
6468
  onGetPredefinedExports: p,
6472
6469
  onSavePredefinedExport: h,
6473
- onRemovePredefinedExport: g
6470
+ onRemovePredefinedExport: y
6474
6471
  }
6475
6472
  );
6476
6473
  }, Vc = (e) => {
@@ -6517,8 +6514,8 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6517
6514
  m(p);
6518
6515
  let h = u[0] || 0;
6519
6516
  p !== c && (f([]), h = 0);
6520
- const g = `${p},${h}`;
6521
- g !== t && (n == null || n(g));
6517
+ const y = `${p},${h}`;
6518
+ y !== t && (n == null || n(y));
6522
6519
  },
6523
6520
  value: c
6524
6521
  }
@@ -6549,11 +6546,11 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6549
6546
  const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Mc(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = le(null), { setFieldValue: f, getFieldValue: c } = re(He) || {}, { t: m } = ge(), p = n ? Ks(n) : "", h = (x) => {
6550
6547
  i == null || i(x);
6551
6548
  };
6552
- async function g() {
6549
+ async function y() {
6553
6550
  const x = await Et(n), S = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), I = c(a), V = c("name");
6554
6551
  R.href = S, R.download = I || V, R.click();
6555
6552
  }
6556
- async function y() {
6553
+ async function g() {
6557
6554
  const x = await Et(n);
6558
6555
  pn(n, x.mime);
6559
6556
  }
@@ -6599,13 +6596,13 @@ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6599
6596
  children: "Select"
6600
6597
  }
6601
6598
  ),
6602
- /* @__PURE__ */ r(Pe, { icon: /* @__PURE__ */ r(_i, {}), disabled: !n, onClick: y, children: m("open") }),
6599
+ /* @__PURE__ */ r(Pe, { icon: /* @__PURE__ */ r(_i, {}), disabled: !n, onClick: g, children: m("open") }),
6603
6600
  /* @__PURE__ */ r(
6604
6601
  ze,
6605
6602
  {
6606
6603
  tooltip: m("download"),
6607
6604
  disabled: !n,
6608
- onClick: g,
6605
+ onClick: y,
6609
6606
  icon: /* @__PURE__ */ r(Un, {})
6610
6607
  }
6611
6608
  ),
@@ -6927,7 +6924,7 @@ function Kc(e) {
6927
6924
  }
6928
6925
  d(!1);
6929
6926
  }
6930
- }, [t, a]), g = de(
6927
+ }, [t, a]), y = de(
6931
6928
  async (w) => {
6932
6929
  if (w.link) {
6933
6930
  window.open(w.link);
@@ -6952,7 +6949,7 @@ function Kc(e) {
6952
6949
  s(b);
6953
6950
  },
6954
6951
  [a, s]
6955
- ), y = de(
6952
+ ), g = de(
6956
6953
  async (w) => {
6957
6954
  s(w);
6958
6955
  },
@@ -6970,8 +6967,8 @@ function Kc(e) {
6970
6967
  loading: l,
6971
6968
  onAddNewAttachment: i,
6972
6969
  onListAllAttachments: o,
6973
- onOpenAttachmentLink: g,
6974
- onOpenAttachmentDetail: y
6970
+ onOpenAttachmentLink: y,
6971
+ onOpenAttachmentDetail: g
6975
6972
  }
6976
6973
  ),
6977
6974
  /* @__PURE__ */ r(
@@ -7004,8 +7001,8 @@ function Wc({ toolbar: e }) {
7004
7001
  currentModel: m,
7005
7002
  setRemovingItem: p,
7006
7003
  removingItem: h,
7007
- duplicatingItem: g,
7008
- setDuplicatingItem: y,
7004
+ duplicatingItem: y,
7005
+ setDuplicatingItem: g,
7009
7006
  setResults: w,
7010
7007
  formIsLoading: b,
7011
7008
  attachments: x,
@@ -7077,7 +7074,7 @@ function Wc({ toolbar: e }) {
7077
7074
  }
7078
7075
  async function Q() {
7079
7076
  try {
7080
- y == null || y(!0);
7077
+ g == null || g(!0);
7081
7078
  const E = await P.getHandler().duplicate({
7082
7079
  id: l,
7083
7080
  model: m,
@@ -7087,10 +7084,10 @@ function Wc({ toolbar: e }) {
7087
7084
  } catch (E) {
7088
7085
  on(JSON.stringify(E));
7089
7086
  } finally {
7090
- y == null || y(!1);
7087
+ g == null || g(!1);
7091
7088
  }
7092
7089
  }
7093
- const ne = a || h || b || g;
7090
+ const ne = a || h || b || y;
7094
7091
  function B(E) {
7095
7092
  C == null || C({
7096
7093
  actionData: E,
@@ -7111,7 +7108,7 @@ function Wc({ toolbar: e }) {
7111
7108
  /* @__PURE__ */ r(
7112
7109
  Po,
7113
7110
  {
7114
- disabled: a || b || h || g
7111
+ disabled: a || b || h || y
7115
7112
  }
7116
7113
  ),
7117
7114
  /* @__PURE__ */ r(
@@ -7129,8 +7126,8 @@ function Wc({ toolbar: e }) {
7129
7126
  {
7130
7127
  icon: /* @__PURE__ */ r(Qn, {}),
7131
7128
  tooltip: T("duplicate"),
7132
- disabled: s || a || l === void 0 || g || b,
7133
- loading: g,
7129
+ disabled: s || a || l === void 0 || y || b,
7130
+ loading: y,
7134
7131
  onClick: Q
7135
7132
  }
7136
7133
  ),
@@ -7139,7 +7136,7 @@ function Wc({ toolbar: e }) {
7139
7136
  {
7140
7137
  icon: /* @__PURE__ */ r(Jn, {}),
7141
7138
  tooltip: T("delete"),
7142
- disabled: a || l === void 0 || h || g || b,
7139
+ disabled: a || l === void 0 || h || y || b,
7143
7140
  loading: h,
7144
7141
  onClick: Y
7145
7142
  }
@@ -7150,7 +7147,7 @@ function Wc({ toolbar: e }) {
7150
7147
  {
7151
7148
  icon: /* @__PURE__ */ r(Zr, {}),
7152
7149
  tooltip: T("showLogs"),
7153
- disabled: a || l === void 0 || h || g || b,
7150
+ disabled: a || l === void 0 || h || y || b,
7154
7151
  loading: !1,
7155
7152
  onClick: () => {
7156
7153
  Mo(m, l, T);
@@ -7162,7 +7159,7 @@ function Wc({ toolbar: e }) {
7162
7159
  {
7163
7160
  icon: /* @__PURE__ */ r(fn, {}),
7164
7161
  tooltip: T("refresh"),
7165
- disabled: a || l === void 0 || h || g || b,
7162
+ disabled: a || l === void 0 || h || y || b,
7166
7163
  loading: !1,
7167
7164
  onClick: () => {
7168
7165
  j(() => {
@@ -7344,9 +7341,9 @@ function Pr(e, t) {
7344
7341
  };
7345
7342
  }
7346
7343
  const { useToken: jc } = Be, No = (e) => {
7347
- const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = jc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = re(He), { elementHasLostFocus: m } = c || {}, [p, h] = v(!1), [g, y] = v(!1);
7344
+ const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = jc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = re(He), { elementHasLostFocus: m } = c || {}, [p, h] = v(!1), [y, g] = v(!1);
7348
7345
  me(() => {
7349
- l && !p && y(!1), !n && !l && (h(!0), y(!0));
7346
+ l && !p && g(!1), !n && !l && (h(!0), g(!0));
7350
7347
  }, [p, l]);
7351
7348
  const w = (b) => {
7352
7349
  i == null || i(b.target.value);
@@ -7357,7 +7354,7 @@ const { useToken: jc } = Be, No = (e) => {
7357
7354
  {
7358
7355
  icon: /* @__PURE__ */ r(Gt, {}),
7359
7356
  onClick: () => {
7360
- o(n) && (h(!1), y(!1));
7357
+ o(n) && (h(!1), g(!1));
7361
7358
  },
7362
7359
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
7363
7360
  tabIndex: -1
@@ -7367,13 +7364,13 @@ const { useToken: jc } = Be, No = (e) => {
7367
7364
  {
7368
7365
  icon: /* @__PURE__ */ r(eo, {}),
7369
7366
  onClick: () => {
7370
- h(!0), y(!0);
7367
+ h(!0), g(!0);
7371
7368
  },
7372
7369
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
7373
7370
  tabIndex: -1
7374
7371
  }
7375
7372
  ) }),
7376
- /* @__PURE__ */ r(he, { flex: "auto", children: g ? /* @__PURE__ */ r(
7373
+ /* @__PURE__ */ r(he, { flex: "auto", children: y ? /* @__PURE__ */ r(
7377
7374
  it,
7378
7375
  {
7379
7376
  style: {
@@ -7385,7 +7382,7 @@ const { useToken: jc } = Be, No = (e) => {
7385
7382
  onChange: w,
7386
7383
  value: n,
7387
7384
  onBlur: () => {
7388
- o(n) && (h(!1), y(!1), m == null || m());
7385
+ o(n) && (h(!1), g(!1), m == null || m());
7389
7386
  }
7390
7387
  }
7391
7388
  ) : /* @__PURE__ */ r(
@@ -7679,8 +7676,8 @@ const Qc = (e) => {
7679
7676
  currentId: m = void 0,
7680
7677
  results: p = void 0,
7681
7678
  setSelectedRowItems: h = void 0,
7682
- setSearchParams: g = void 0,
7683
- searchVisible: y = !0,
7679
+ setSearchParams: y = void 0,
7680
+ searchVisible: g = !0,
7684
7681
  setSearchVisible: w = void 0,
7685
7682
  sorter: b = void 0,
7686
7683
  setSorter: x = void 0,
@@ -7706,7 +7703,7 @@ const Qc = (e) => {
7706
7703
  setSelectedRowItems: h,
7707
7704
  searchParams: T,
7708
7705
  setSearchValues: C,
7709
- setSearchParams: g,
7706
+ setSearchParams: y,
7710
7707
  setSearchVisible: w,
7711
7708
  setTreeIsLoading: I,
7712
7709
  context: o,
@@ -7745,10 +7742,10 @@ const Qc = (e) => {
7745
7742
  offset: k,
7746
7743
  isSearching: H,
7747
7744
  onSubmit: (q) => {
7748
- N(!1), g == null || g(q.params), w == null || w(!1);
7745
+ N(!1), y == null || y(q.params), w == null || w(!1);
7749
7746
  },
7750
7747
  searchError: U,
7751
- searchVisible: y,
7748
+ searchVisible: g,
7752
7749
  searchValues: _,
7753
7750
  showLimitOptions: !1
7754
7751
  }
@@ -7796,7 +7793,7 @@ const Qc = (e) => {
7796
7793
  id: o,
7797
7794
  parentContext: l,
7798
7795
  onSubmitSucceed: (p, h) => {
7799
- f.findIndex((y) => y.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
7796
+ f.findIndex((g) => g.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
7800
7797
  }
7801
7798
  }
7802
7799
  )
@@ -8187,8 +8184,8 @@ function ad(e) {
8187
8184
  setCurrentItemIndex: m,
8188
8185
  searchParams: p,
8189
8186
  searchVisible: h,
8190
- setSearchVisible: g,
8191
- setSearchTreeNameSearch: y,
8187
+ setSearchVisible: y,
8188
+ setSearchTreeNameSearch: g,
8192
8189
  searchTreeNameSearch: w,
8193
8190
  treeIsLoading: b,
8194
8191
  setPreviousView: x,
@@ -8272,7 +8269,7 @@ function ad(e) {
8272
8269
  disabled: l || a || b,
8273
8270
  searchText: w,
8274
8271
  onSearch: (B) => {
8275
- B && B.trim().length > 0 ? y == null || y(B) : y == null || y(void 0);
8272
+ B && B.trim().length > 0 ? g == null || g(B) : g == null || g(void 0);
8276
8273
  }
8277
8274
  }
8278
8275
  ),
@@ -8288,7 +8285,7 @@ function ad(e) {
8288
8285
  tooltip: O("advanced_search"),
8289
8286
  type: h ? "primary" : "default",
8290
8287
  onClick: () => {
8291
- g == null || g(!h);
8288
+ y == null || y(!h);
8292
8289
  },
8293
8290
  disabled: l || a || b,
8294
8291
  badgeNumber: p == null ? void 0 : p.length
@@ -8498,7 +8495,7 @@ const ld = (e) => {
8498
8495
  setCurrentView: c,
8499
8496
  availableViews: m,
8500
8497
  searchTreeNameSearch: p
8501
- } = e, { currentView: h, setPreviousView: g } = re(
8498
+ } = e, { currentView: h, setPreviousView: y } = re(
8502
8499
  nt
8503
8500
  );
8504
8501
  return t ? /* @__PURE__ */ D(ee, { children: [
@@ -8521,11 +8518,11 @@ const ld = (e) => {
8521
8518
  formView: s,
8522
8519
  treeView: a,
8523
8520
  domain: l,
8524
- onRowClicked: (y) => {
8525
- const { id: w } = y;
8521
+ onRowClicked: (g) => {
8522
+ const { id: w } = g;
8526
8523
  f(w);
8527
8524
  const b = u.findIndex((S) => S.id === w);
8528
- g == null || g(h), d(b);
8525
+ y == null || y(h), d(b);
8529
8526
  const x = m.find(
8530
8527
  (S) => S.type === "form"
8531
8528
  );
@@ -8659,8 +8656,8 @@ function hd(e, t) {
8659
8656
  res_id: m = !1,
8660
8657
  action_id: p,
8661
8658
  action_type: h,
8662
- treeExpandable: g = !1,
8663
- limit: y
8659
+ treeExpandable: y = !1,
8660
+ limit: g
8664
8661
  } = e, [w, b] = v(), [x, S] = v([]), [R, I] = v(!0), V = m || void 0, [F, T] = v(
8665
8662
  V
8666
8663
  ), [_, C] = v([]), [O, A] = v(), [N, j] = v([]), [H, U] = v(), [k, Y] = v(0), [q, Q] = v(!1), [ne, B] = v(!1), [E, K] = v(), { t: L } = ge(), ce = le(), J = le(), te = re(
@@ -8747,7 +8744,7 @@ function hd(e, t) {
8747
8744
  case "tree": {
8748
8745
  W.push({
8749
8746
  ...se,
8750
- isExpandable: g,
8747
+ isExpandable: y,
8751
8748
  type: we
8752
8749
  });
8753
8750
  break;
@@ -8854,7 +8851,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8854
8851
  ld,
8855
8852
  {
8856
8853
  visible: w.type === W.type && w.view_id === W.view_id,
8857
- limit: y,
8854
+ limit: g,
8858
8855
  model: i,
8859
8856
  context: o,
8860
8857
  domain: n,
@@ -8933,7 +8930,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8933
8930
  setSearchTreeNameSearch: K,
8934
8931
  searchTreeNameSearch: E,
8935
8932
  goToResourceId: Ie,
8936
- limit: y,
8933
+ limit: g,
8937
8934
  children: [
8938
8935
  je(),
8939
8936
  /* @__PURE__ */ r(
@@ -8989,7 +8986,7 @@ async function pd({
8989
8986
  h.push([R, S]);
8990
8987
  }
8991
8988
  }
8992
- const [g, y] = h[0], w = { id: g, type: y };
8989
+ const [y, g] = h[0], w = { id: y, type: g };
8993
8990
  return {
8994
8991
  title: f,
8995
8992
  actionId: e,
@@ -9099,7 +9096,7 @@ function Cd(e) {
9099
9096
  domain: s = [],
9100
9097
  visible: a = !0,
9101
9098
  parentContext: l = {}
9102
- } = e, [d, u] = v(!1), [f, c] = v(!1), [m, p] = v(), [h, g] = v(), [y, w] = v(), [b, x] = v(1), [S, R] = v(0), I = le(St), V = le([]), [F, T] = v(0), [_, C] = v([]), [O, A] = v(void 0), [N, j] = v(), [H, U] = v(), [k, Y] = v(), [q, Q] = v(!1), ne = le([]), B = (z) => {
9099
+ } = e, [d, u] = v(!1), [f, c] = v(!1), [m, p] = v(), [h, y] = v(), [g, w] = v(), [b, x] = v(1), [S, R] = v(0), I = le(St), V = le([]), [F, T] = v(0), [_, C] = v([]), [O, A] = v(void 0), [N, j] = v(), [H, U] = v(), [k, Y] = v(), [q, Q] = v(!1), ne = le([]), B = (z) => {
9103
9100
  Q(!0), x(z), R((z - 1) * I.current);
9104
9101
  }, E = async () => {
9105
9102
  const z = ne.current.length > 0 ? ne.current : s, ie = jt(V.current, z), { colors: Se } = At(h), { totalItems: Ee, results: ke, attrsEvaluated: Me } = await P.getHandler().searchForTree({
@@ -9115,7 +9112,7 @@ function Cd(e) {
9115
9112
  const ue = Dt({
9116
9113
  resultsToSort: ke,
9117
9114
  sorter: N,
9118
- fields: { ...h.fields, ...y.fields }
9115
+ fields: { ...h.fields, ...g.fields }
9119
9116
  });
9120
9117
  Q(!1), C(ue);
9121
9118
  const Fe = await Ee;
@@ -9144,7 +9141,7 @@ function Cd(e) {
9144
9141
  action: t,
9145
9142
  context: l
9146
9143
  });
9147
- ne.current = z.domain, w(z.views.get("form")), g(z.views.get("tree")), p(z.model), I.current = z.limit;
9144
+ ne.current = z.domain, w(z.views.get("form")), y(z.views.get("tree")), p(z.model), I.current = z.limit;
9148
9145
  }, J = async () => {
9149
9146
  p(n);
9150
9147
  const z = await P.getHandler().getView({
@@ -9159,7 +9156,7 @@ function Cd(e) {
9159
9156
  id: i,
9160
9157
  context: l
9161
9158
  });
9162
- g(ie);
9159
+ y(ie);
9163
9160
  };
9164
9161
  me(() => {
9165
9162
  t ? L("action") : n && L("model");
@@ -9171,7 +9168,7 @@ function Cd(e) {
9171
9168
  model: m,
9172
9169
  treeView: h
9173
9170
  });
9174
- }, ve = () => !h || !y ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
9171
+ }, ve = () => !h || !g ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
9175
9172
  H && /* @__PURE__ */ r(Ze, { className: "mt-10", message: H, type: "error", banner: !0 }),
9176
9173
  /* @__PURE__ */ r(
9177
9174
  Xt,
@@ -9192,7 +9189,7 @@ function Cd(e) {
9192
9189
  const ie = Dt({
9193
9190
  resultsToSort: _,
9194
9191
  sorter: z,
9195
- fields: { ...h.fields, ...y.fields }
9192
+ fields: { ...h.fields, ...g.fields }
9196
9193
  });
9197
9194
  C(ie);
9198
9195
  },
@@ -9265,17 +9262,17 @@ const xd = $n(Cd), Sd = (e) => {
9265
9262
  switch (c.type) {
9266
9263
  case "indicatorField":
9267
9264
  case "indicator": {
9268
- const { value: p, total: h, percent: g, icon: y, color: w, suffix: b } = c;
9265
+ const { value: p, total: h, percent: y, icon: g, color: w, suffix: b } = c;
9269
9266
  return /* @__PURE__ */ r(
9270
9267
  Io,
9271
9268
  {
9272
9269
  value: p,
9273
9270
  totalValue: h,
9274
- percent: g,
9271
+ percent: y,
9275
9272
  color: w,
9276
- icon: y,
9273
+ icon: g,
9277
9274
  suffix: b,
9278
- showPercent: Ao(g)
9275
+ showPercent: Ao(y)
9279
9276
  }
9280
9277
  );
9281
9278
  }
@@ -9303,7 +9300,7 @@ function Od(e, t) {
9303
9300
  setIsLoading: m,
9304
9301
  openAction: p,
9305
9302
  moveItemsEnabled: h
9306
- } = re(sr), g = le(), y = le(), [w] = Xe(P.getHandler().getView), [b] = Xe(
9303
+ } = re(sr), y = le(), g = le(), [w] = Xe(P.getHandler().getView), [b] = Xe(
9307
9304
  P.getHandler().readObjects
9308
9305
  ), [x] = Xe(P.getHandler().update), S = Bo(
9309
9306
  vn.FEATURE_READFORVIEW
@@ -9320,7 +9317,7 @@ function Od(e, t) {
9320
9317
  u(!0), m(!0), c(void 0);
9321
9318
  try {
9322
9319
  const O = await I(), A = await F(O), N = O.fields[_n].relation, j = A[_n].items;
9323
- y.current = O.fields;
9320
+ g.current = O.fields;
9324
9321
  const H = await V({
9325
9322
  items: j,
9326
9323
  model: N,
@@ -9343,17 +9340,17 @@ function Od(e, t) {
9343
9340
  model: A,
9344
9341
  context: N
9345
9342
  }) {
9346
- g.current = (await w({
9343
+ y.current = (await w({
9347
9344
  model: A,
9348
9345
  type: "form",
9349
9346
  context: N
9350
9347
  })).fields;
9351
9348
  const [j] = await nr({
9352
9349
  treeView: {
9353
- fields: g.current
9350
+ fields: y.current
9354
9351
  },
9355
9352
  formView: {
9356
- fields: g.current
9353
+ fields: y.current
9357
9354
  },
9358
9355
  model: A,
9359
9356
  items: O,
@@ -9416,14 +9413,14 @@ function Od(e, t) {
9416
9413
  }
9417
9414
  };
9418
9415
  }), H = {
9419
- fields: g.current,
9416
+ fields: y.current,
9420
9417
  items: j
9421
9418
  };
9422
9419
  await x({
9423
9420
  model: n,
9424
9421
  id: o,
9425
9422
  values: { [_n]: H },
9426
- fields: y.current,
9423
+ fields: g.current,
9427
9424
  context: i
9428
9425
  });
9429
9426
  }
@@ -9564,7 +9561,7 @@ const _d = ht(Od), Id = (e) => {
9564
9561
  const { ooui: t } = e;
9565
9562
  return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(Vd, { ooui: t }) });
9566
9563
  }, Vd = (e) => {
9567
- const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = n, w = re(He), { getContext: b } = w || {};
9564
+ const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: m, context: p, readOnly: h, field: y, columns: g } = n, w = re(He), { getContext: b } = w || {};
9568
9565
  Ft(() => {
9569
9566
  S();
9570
9567
  }, [o]);
@@ -9592,10 +9589,10 @@ const _d = ht(Od), Id = (e) => {
9592
9589
  const _ = (await P.getHandler().search({
9593
9590
  model: m,
9594
9591
  params: F,
9595
- fieldsToRetrieve: [g],
9592
+ fieldsToRetrieve: [y],
9596
9593
  context: { ...b == null ? void 0 : b(), ...p }
9597
9594
  })).map((C) => {
9598
- const O = C[g];
9595
+ const O = C[y];
9599
9596
  let A = O;
9600
9597
  return Array.isArray(O) && (A = O[1]), { label: A, value: C.id };
9601
9598
  });
@@ -9629,7 +9626,7 @@ const _d = ht(Od), Id = (e) => {
9629
9626
  disabled: h,
9630
9627
  onChange: V,
9631
9628
  style: { width: "100%" },
9632
- children: /* @__PURE__ */ r(_e, { children: a.map((F) => /* @__PURE__ */ r(he, { span: Math.floor(24 / y), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
9629
+ children: /* @__PURE__ */ r(_e, { children: a.map((F) => /* @__PURE__ */ r(he, { span: Math.floor(24 / g), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
9633
9630
  }
9634
9631
  ),
9635
9632
  !h && /* @__PURE__ */ D(Ue, { children: [
@@ -9858,7 +9855,7 @@ function Xd(e, t) {
9858
9855
  limit: Q
9859
9856
  });
9860
9857
  }
9861
- function g({
9858
+ function y({
9862
9859
  title: S,
9863
9860
  content: R,
9864
9861
  key: I,
@@ -9876,7 +9873,7 @@ function Xd(e, t) {
9876
9873
  }
9877
9874
  ]), o(I);
9878
9875
  }
9879
- async function y({
9876
+ async function g({
9880
9877
  relateData: S,
9881
9878
  fields: R,
9882
9879
  values: I,
@@ -10037,7 +10034,7 @@ function Xd(e, t) {
10037
10034
  });
10038
10035
  } else {
10039
10036
  const Y = _ && Array.isArray(_.id) ? { ..._, id: _.id[0] } : _;
10040
- g({
10037
+ y({
10041
10038
  title: F,
10042
10039
  action: {
10043
10040
  id: C,
@@ -10072,7 +10069,7 @@ function Xd(e, t) {
10072
10069
  {
10073
10070
  openShortcut: w,
10074
10071
  openAction: x,
10075
- openRelate: y,
10072
+ openRelate: g,
10076
10073
  openDefaultActionForModel: b,
10077
10074
  tabs: d,
10078
10075
  activeKey: i,
@@ -10208,8 +10205,8 @@ const { useToken: nu } = Be, Yu = (e) => {
10208
10205
  dt
10209
10206
  ), {
10210
10207
  openShortcut: h,
10211
- tabs: g,
10212
- activeKey: y,
10208
+ tabs: y,
10209
+ activeKey: g,
10213
10210
  currentView: w,
10214
10211
  currentId: b,
10215
10212
  openDefaultActionForModel: x
@@ -10273,7 +10270,7 @@ const { useToken: nu } = Be, Yu = (e) => {
10273
10270
  else {
10274
10271
  if (!w)
10275
10272
  return;
10276
- const C = g.find((H) => H.key === y), { id: O, type: A } = (C == null ? void 0 : C.action) || {}, N = w.view_id;
10273
+ const C = y.find((H) => H.key === g), { id: O, type: A } = (C == null ? void 0 : C.action) || {}, N = w.view_id;
10277
10274
  let j = !1;
10278
10275
  if (!O || !A) {
10279
10276
  l(!1);
@@ -10288,7 +10285,7 @@ const { useToken: nu } = Be, Yu = (e) => {
10288
10285
  }
10289
10286
  await T(), l(!a);
10290
10287
  }, [
10291
- y,
10288
+ g,
10292
10289
  b,
10293
10290
  d,
10294
10291
  w,
@@ -10296,7 +10293,7 @@ const { useToken: nu } = Be, Yu = (e) => {
10296
10293
  a,
10297
10294
  i,
10298
10295
  o,
10299
- g
10296
+ y
10300
10297
  ]);
10301
10298
  return /* @__PURE__ */ r(
10302
10299
  Ki,