@gisce/react-ooui 2.12.0-alpha.2 → 2.12.0

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.
@@ -2,13 +2,13 @@ var Si = Object.defineProperty;
2
2
  var Ti = (e, t, n) => t in e ? Si(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var xr = (e, t, n) => (Ti(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { jsxs as D, jsx as i, Fragment as ie } from "react/jsx-runtime";
5
- import it, { useContext as Z, useState as b, useEffect as fe, useRef as re, memo as Un, useMemo as Ie, useCallback as X, createContext as Ii, forwardRef as ht, useImperativeHandle as gt, createElement as Fi, Fragment as Xr } from "react";
5
+ import it, { useContext as Z, useState as b, useEffect as fe, useRef as re, memo as Un, useMemo as Ie, useCallback as X, createContext as Ii, forwardRef as pt, useImperativeHandle as gt, createElement as Fi, Fragment as Xr } from "react";
6
6
  import { Tooltip as wt, theme as je, Typography as Nt, Form as dt, Row as Ve, Col as ge, Modal as tt, Button as Ne, Dropdown as Ri, Menu as Sr, Spin as Be, Divider as gn, Space as qe, Input as st, Select as Ft, Checkbox as zt, Alert as Qe, Timeline as kn, Statistic as Oi, Card as Yn, Tag as Qr, message as Vn, DatePicker as qn, TimePicker as Vi, InputNumber as Zr, Progress as _i, Avatar as eo, Pagination as Ai, Badge as Di, Tabs as to, Radio as Tr, Switch as Ei, Steps as Ir, Layout as ki } from "antd";
7
7
  import { Label as Lt, Field as Mn, Tree as no, Reference as Mi, Selection as zn, Many2one as ro, Boolean as Pi, parseContext as xt, graphProcessor as oo, parseGraph as Jn, graphFieldUtils as Ni, Container as Li, Form as io, Integer as Pn, SearchFieldTypes as yt, SearchFilter as $i, parseContextFields as Hi, parseDomainFields as Bi, transformDomainForChildWidget as Xn } from "@gisce/ooui";
8
8
  import * as Fr from "@ant-design/icons";
9
- import so, { QuestionCircleOutlined as ao, ExclamationCircleOutlined as vt, LoadingOutlined as ut, DownOutlined as yn, WarningOutlined as co, CloseOutlined as tn, CheckOutlined as wn, TranslationOutlined as lo, FolderOpenOutlined as Qn, DownloadOutlined as Zn, ClearOutlined as er, ExportOutlined as ji, StarFilled as Ki, StarOutlined as Wi, UpOutlined as Gi, SearchOutlined as tr, ThunderboltOutlined as nr, PrinterOutlined as rr, EnterOutlined as or, PlusSquareOutlined as Ui, MinusSquareOutlined as Yi, FileAddOutlined as vn, AlignLeftOutlined as qi, ApiOutlined as zi, DeleteOutlined as ir, LeftOutlined as uo, RightOutlined as fo, EyeOutlined as Ji, FormOutlined as Jt, TableOutlined as sr, AreaChartOutlined as Xi, CalendarOutlined as Qi, LinkOutlined as Rr, SaveOutlined as Zi, CopyOutlined as ar, InfoCircleOutlined as mo, ReloadOutlined as bn, EditOutlined as po, PlusOutlined as es, FilterOutlined as ho, CloseCircleFilled as ts, BorderOuterOutlined as ns, SettingOutlined as rs } from "@ant-design/icons";
9
+ import so, { QuestionCircleOutlined as ao, ExclamationCircleOutlined as vt, LoadingOutlined as ut, DownOutlined as yn, WarningOutlined as co, CloseOutlined as tn, CheckOutlined as wn, TranslationOutlined as lo, FolderOpenOutlined as Qn, DownloadOutlined as Zn, ClearOutlined as er, ExportOutlined as ji, StarFilled as Ki, StarOutlined as Wi, UpOutlined as Gi, SearchOutlined as tr, ThunderboltOutlined as nr, PrinterOutlined as rr, EnterOutlined as or, PlusSquareOutlined as Ui, MinusSquareOutlined as Yi, FileAddOutlined as vn, AlignLeftOutlined as qi, ApiOutlined as zi, DeleteOutlined as ir, LeftOutlined as uo, RightOutlined as fo, EyeOutlined as Ji, FormOutlined as Jt, TableOutlined as sr, AreaChartOutlined as Xi, CalendarOutlined as Qi, LinkOutlined as Rr, SaveOutlined as Zi, CopyOutlined as ar, InfoCircleOutlined as mo, ReloadOutlined as bn, EditOutlined as ho, PlusOutlined as es, FilterOutlined as po, CloseCircleFilled as ts, BorderOuterOutlined as ns, SettingOutlined as rs } from "@ant-design/icons";
10
10
  import { Interweave as Xt } from "interweave";
11
- import { useLocale as he, FormigaConfigProvider as os, mergeStrings as is, Many2OneSuffix as ss, Many2OneSuffixModal as Or, FieldSet as as, ExportModal as cs, Dropdown as go, DropdownButton as Et, HTMLPreview as ls, FavouriteButton as ds } from "@gisce/react-formiga-components";
11
+ import { useLocale as pe, FormigaConfigProvider as os, mergeStrings as is, Many2OneSuffix as ss, Many2OneSuffixModal as Or, FieldSet as as, ExportModal as cs, Dropdown as go, DropdownButton as Et, HTMLPreview as ls, FavouriteButton as ds } from "@gisce/react-formiga-components";
12
12
  import * as Vr from "@tabler/icons-react";
13
13
  import us from "antd/lib/input/TextArea";
14
14
  import $t from "styled-components";
@@ -17,7 +17,7 @@ import fs from "lodash/debounce";
17
17
  import { nanoid as lr } from "nanoid";
18
18
  import Nn from "antd/lib/typography/Title";
19
19
  import bt from "use-deep-compare-effect";
20
- import { Line as ms, Column as ps, Pie as hs } from "@ant-design/plots";
20
+ import { Line as ms, Column as hs, Pie as ps } from "@ant-design/plots";
21
21
  import nt from "dayjs";
22
22
  import gs from "dayjs/plugin/advancedFormat";
23
23
  import ys from "dayjs/plugin/customParseFormat";
@@ -50,18 +50,18 @@ const { Text: Hs, Title: Bs } = Nt, { useToken: js } = je, Ks = {
50
50
  center: "justify-center",
51
51
  right: "justify-end"
52
52
  }, Cn = (e) => {
53
- const { ooui: t, align: n, responsiveBehaviour: o } = e, { label: r, tooltip: s, fieldForLabel: a, labelSize: c, labelType: d } = t, u = a !== null && r.length > 1 ? r + " :" : r, p = n || (a ? o ? "left" : "right" : "left"), { token: h } = js(), m = c === void 0 ? Hs : Bs;
53
+ const { ooui: t, align: n, responsiveBehaviour: o } = e, { label: r, tooltip: s, fieldForLabel: a, labelSize: c, labelType: d } = t, u = a !== null && r.length > 1 ? r + " :" : r, h = n || (a ? o ? "left" : "right" : "left"), { token: p } = js(), m = c === void 0 ? Hs : Bs;
54
54
  return /* @__PURE__ */ D(
55
55
  "div",
56
56
  {
57
- className: `flex flex-row items-center pb-1 pt-1 ${Ks[p]}`,
57
+ className: `flex flex-row items-center pb-1 pt-1 ${Ks[h]}`,
58
58
  children: [
59
59
  s && /* @__PURE__ */ i(wt, { title: s, children: /* @__PURE__ */ i(
60
60
  ao,
61
61
  {
62
62
  className: "pr-1 text-xs",
63
63
  style: {
64
- color: h.colorPrimary
64
+ color: p.colorPrimary
65
65
  }
66
66
  }
67
67
  ) }),
@@ -81,10 +81,10 @@ function Ce({
81
81
  type: c,
82
82
  validator: d
83
83
  }) {
84
- const { id: f, label: u, tooltip: l } = e, { t: p } = he(), h = a ? [
84
+ const { id: f, label: u, tooltip: l } = e, { t: h } = pe(), p = a ? [
85
85
  {
86
86
  required: !0,
87
- message: p("fillRequiredField"),
87
+ message: h("fillRequiredField"),
88
88
  type: c,
89
89
  validator: d
90
90
  }
@@ -94,7 +94,7 @@ function Ce({
94
94
  className: "mb-0",
95
95
  name: f,
96
96
  valuePropName: o,
97
- rules: h,
97
+ rules: p,
98
98
  help: e.tooltipInline ? e.tooltip : null,
99
99
  children: t
100
100
  }
@@ -150,8 +150,8 @@ const { confirm: Ws } = tt, nn = ({
150
150
  getPlainValues: f,
151
151
  domain: u,
152
152
  submitForm: l,
153
- fetchValues: p,
154
- formHasChanges: h,
153
+ fetchValues: h,
154
+ formHasChanges: p,
155
155
  elementHasLostFocus: m,
156
156
  getFields: g,
157
157
  formView: w
@@ -171,8 +171,8 @@ const { confirm: Ws } = tt, nn = ({
171
171
  executeButtonAction: a,
172
172
  getContext: c,
173
173
  submitForm: l,
174
- fetchValues: p,
175
- formHasChanges: h,
174
+ fetchValues: h,
175
+ formHasChanges: p,
176
176
  elementHasLostFocus: m,
177
177
  formView: w
178
178
  },
@@ -313,9 +313,9 @@ const wo = (e) => {
313
313
  icon: c,
314
314
  context: d,
315
315
  readOnly: f
316
- } = t, u = Z(Le), { executeButtonAction: l } = u || {}, [p, h] = b(!1), { t: m } = he();
316
+ } = t, u = Z(Le), { executeButtonAction: l } = u || {}, [h, p] = b(!1), { t: m } = pe();
317
317
  async function g() {
318
- h(!0), await l({ type: s, action: n, context: d }), h(!1);
318
+ p(!0), await l({ type: s, action: n, context: d }), p(!1);
319
319
  }
320
320
  function w() {
321
321
  if (a) {
@@ -331,7 +331,7 @@ const wo = (e) => {
331
331
  g();
332
332
  }
333
333
  function y() {
334
- if (p)
334
+ if (h)
335
335
  return /* @__PURE__ */ i(ut, {});
336
336
  if (c) {
337
337
  const C = at(c);
@@ -342,7 +342,7 @@ const wo = (e) => {
342
342
  Ne,
343
343
  {
344
344
  block: !0,
345
- disabled: !r || f || p,
345
+ disabled: !r || f || h,
346
346
  onClick: w,
347
347
  icon: y(),
348
348
  type: t.primary ? "primary" : "default",
@@ -361,8 +361,8 @@ const wo = (e) => {
361
361
  icon: f,
362
362
  primary: u,
363
363
  context: l,
364
- readOnly: p
365
- } = n || {}, h = Z(Le), { executeButtonAction: m } = h || {}, [g, w] = b(!1), { t: y } = he();
364
+ readOnly: h
365
+ } = n || {}, p = Z(Le), { executeButtonAction: m } = p || {}, [g, w] = b(!1), { t: y } = pe();
366
366
  function C() {
367
367
  if (g)
368
368
  return /* @__PURE__ */ i(ut, {});
@@ -393,7 +393,7 @@ const wo = (e) => {
393
393
  return /* @__PURE__ */ i(Ce, { ooui: new Mn({ ooui: t }), children: /* @__PURE__ */ D(
394
394
  Ri.Button,
395
395
  {
396
- disabled: !a || p,
396
+ disabled: !a || h,
397
397
  onClick: R,
398
398
  icon: /* @__PURE__ */ i(yn, {}),
399
399
  type: u ? "primary" : void 0,
@@ -413,7 +413,7 @@ const wo = (e) => {
413
413
  if (n)
414
414
  return /* @__PURE__ */ i(wo, { ooui: n });
415
415
  }, qs = (e) => {
416
- const { t } = he(), { ooui: n, executeButtonAction: o } = e;
416
+ const { t } = pe(), { ooui: n, executeButtonAction: o } = e;
417
417
  if (!n)
418
418
  return null;
419
419
  const r = n.map((s) => {
@@ -424,12 +424,12 @@ const wo = (e) => {
424
424
  buttonType: f,
425
425
  confirmMessage: u,
426
426
  icon: l,
427
- context: p,
428
- readOnly: h,
427
+ context: h,
428
+ readOnly: p,
429
429
  danger: m
430
430
  } = s, [g, w] = b(!1);
431
431
  async function y() {
432
- w(!0), await o({ type: f, action: a, context: p }), w(!1);
432
+ w(!0), await o({ type: f, action: a, context: h }), w(!1);
433
433
  }
434
434
  function C() {
435
435
  if (u) {
@@ -455,7 +455,7 @@ const wo = (e) => {
455
455
  return /* @__PURE__ */ i(
456
456
  Sr.Item,
457
457
  {
458
- disabled: !d || h,
458
+ disabled: !d || p,
459
459
  onClick: C,
460
460
  icon: T(),
461
461
  danger: m,
@@ -528,19 +528,19 @@ const vo = (e) => {
528
528
  content: t
529
529
  });
530
530
  }, bo = (e) => {
531
- const { visible: t, onCloseModal: n, model: o, id: r, field: s, onSubmitSucceed: a } = e, { modalWidth: c } = xn(), { t: d } = he(), [f, u] = b([]), [l, p] = b(!1), [h, m] = b(!1), [g, w] = b({}), y = re();
531
+ const { visible: t, onCloseModal: n, model: o, id: r, field: s, onSubmitSucceed: a } = e, { modalWidth: c } = xn(), { t: d } = pe(), [f, u] = b([]), [l, h] = b(!1), [p, m] = b(!1), [g, w] = b({}), y = re();
532
532
  fe(() => {
533
533
  t ? C() : w({});
534
534
  }, [t]);
535
535
  async function C() {
536
- p(!0);
536
+ h(!0);
537
537
  try {
538
538
  const F = await T();
539
539
  await R(F);
540
540
  } catch (F) {
541
541
  et(F);
542
542
  }
543
- p(!1);
543
+ h(!1);
544
544
  }
545
545
  async function T() {
546
546
  const x = (await k.getHandler().search({
@@ -580,7 +580,7 @@ const vo = (e) => {
580
580
  [F.code]: _.target.value
581
581
  });
582
582
  },
583
- disabled: h
583
+ disabled: p
584
584
  }
585
585
  ) })
586
586
  ] }, x));
@@ -613,15 +613,15 @@ const vo = (e) => {
613
613
  {
614
614
  icon: /* @__PURE__ */ i(tn, {}),
615
615
  onClick: n,
616
- disabled: h,
616
+ disabled: p,
617
617
  children: d("cancel")
618
618
  }
619
619
  ),
620
620
  /* @__PURE__ */ i(
621
621
  Ne,
622
622
  {
623
- icon: h ? /* @__PURE__ */ i(ut, {}) : /* @__PURE__ */ i(wn, {}),
624
- disabled: h,
623
+ icon: p ? /* @__PURE__ */ i(ut, {}) : /* @__PURE__ */ i(wn, {}),
624
+ disabled: p,
625
625
  onClick: V,
626
626
  style: { marginLeft: 15 },
627
627
  type: "primary",
@@ -651,19 +651,20 @@ function Xe(e) {
651
651
  const { tooltip: t, ...n } = e;
652
652
  return /* @__PURE__ */ i(wt, { title: t, children: /* @__PURE__ */ i(Ne, { ...n }) });
653
653
  }
654
- const { info: Qs } = tt, pt = (e) => {
654
+ const { info: Qs } = tt, ht = (e) => {
655
655
  Qs({
656
656
  title: "",
657
657
  centered: !0,
658
658
  content: e
659
659
  });
660
660
  }, { useToken: Zs } = je, Co = (e) => {
661
- const { ooui: t, isSearchField: n = !1 } = e, { id: o, readOnly: r, isPassword: s, required: a, translatable: c } = t, { token: d } = Zs(), f = a && !r ? { backgroundColor: d.colorPrimaryBg } : void 0, u = Z(Le), { elementHasLostFocus: l } = u || {};
661
+ const { ooui: t, isSearchField: n = !1 } = e, { id: o, readOnly: r, isPassword: s, required: a, translatable: c } = t, { token: d } = Zs(), f = a && !r ? { backgroundColor: d.colorPrimaryBg } : void 0, u = Z(Le), { elementHasLostFocus: l } = u || {}, h = t.size !== void 0 && t.showCount;
662
662
  let p = /* @__PURE__ */ i(
663
663
  st,
664
664
  {
665
665
  disabled: r || c && !n,
666
666
  id: o,
667
+ showCount: h,
667
668
  style: f,
668
669
  maxLength: t.size,
669
670
  onBlur: l
@@ -689,14 +690,14 @@ const { info: Qs } = tt, pt = (e) => {
689
690
  fetchValues: c,
690
691
  formHasChanges: d,
691
692
  elementHasLostFocus: f
692
- } = r || {}, [u, l] = b(!1), { t: p } = he();
693
+ } = r || {}, [u, l] = b(!1), { t: h } = pe();
693
694
  return s ? /* @__PURE__ */ D(ie, { children: [
694
695
  /* @__PURE__ */ i(
695
696
  "div",
696
697
  {
697
698
  onClick: () => {
698
699
  if (d != null && d()) {
699
- pt(p("saveBeforeTranslate"));
700
+ ht(h("saveBeforeTranslate"));
700
701
  return;
701
702
  }
702
703
  u || l(!0);
@@ -707,8 +708,8 @@ const { info: Qs } = tt, pt = (e) => {
707
708
  value: e,
708
709
  disabled: !0,
709
710
  id: t,
710
- onChange: (h) => {
711
- o == null || o(h.target.value);
711
+ onChange: (p) => {
712
+ o == null || o(p.target.value);
712
713
  },
713
714
  onBlur: f,
714
715
  style: { cursor: "pointer", pointerEvents: "none", ...n }
@@ -738,8 +739,8 @@ const { info: Qs } = tt, pt = (e) => {
738
739
  value: e,
739
740
  id: t,
740
741
  style: n,
741
- onChange: (h) => {
742
- o == null || o(h.target.value);
742
+ onChange: (p) => {
743
+ o == null || o(p.target.value);
743
744
  },
744
745
  onBlur: f
745
746
  }
@@ -747,12 +748,12 @@ const { info: Qs } = tt, pt = (e) => {
747
748
  /* @__PURE__ */ i(ge, { flex: "none", children: /* @__PURE__ */ i(
748
749
  Xe,
749
750
  {
750
- tooltip: p("translate"),
751
+ tooltip: h("translate"),
751
752
  icon: /* @__PURE__ */ i(lo, {}),
752
753
  onClick: async () => {
753
- d != null && d() ? pt(p("saveBeforeTranslate")) : pt(p("enterTextBeforeTranslate"));
754
+ d != null && d() ? ht(h("saveBeforeTranslate")) : ht(h("enterTextBeforeTranslate"));
754
755
  },
755
- children: p("translate")
756
+ children: h("translate")
756
757
  }
757
758
  ) })
758
759
  ] }) });
@@ -761,8 +762,8 @@ const { info: Qs } = tt, pt = (e) => {
761
762
  return /* @__PURE__ */ i(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(So, { ...e }) });
762
763
  }, So = (e) => {
763
764
  const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, required: a } = t, c = Array.from(r.entries()), d = c && c.length && c.map((u) => {
764
- const [l, p] = u;
765
- return /* @__PURE__ */ i(oa, { value: l, children: p }, l);
765
+ const [l, h] = u;
766
+ return /* @__PURE__ */ i(oa, { value: l, children: h }, l);
766
767
  });
767
768
  return /* @__PURE__ */ i(
768
769
  a && !s ? ia : Ft,
@@ -823,17 +824,17 @@ const fa = (e) => {
823
824
  const { ooui: t } = e, { required: n, id: o } = t, r = at(o);
824
825
  return r ? /* @__PURE__ */ i(r, {}) : /* @__PURE__ */ i(Ce, { required: n, ...e, children: /* @__PURE__ */ i(ma, { ooui: t }) });
825
826
  }, ma = (e) => {
826
- const { ooui: t, value: n, onChange: o } = e, { readOnly: r } = t, s = re(null), { t: a } = he(), c = (l) => {
827
+ const { ooui: t, value: n, onChange: o } = e, { readOnly: r } = t, s = re(null), { t: a } = pe(), c = (l) => {
827
828
  o == null || o(l);
828
829
  };
829
830
  async function d() {
830
- const l = await Mt(n), p = `data:${l == null ? void 0 : l.mime};base64,${n}`, h = document.createElement("a");
831
- h.href = p, h.download = `image.${l == null ? void 0 : l.ext}`, h.click();
831
+ const l = await Mt(n), h = `data:${l == null ? void 0 : l.mime};base64,${n}`, p = document.createElement("a");
832
+ p.href = h, p.download = `image.${l == null ? void 0 : l.ext}`, p.click();
832
833
  }
833
834
  async function f(l) {
834
835
  l.stopPropagation(), l.preventDefault();
835
- const p = l.target.files[0], h = await To(p);
836
- c(h);
836
+ const h = l.target.files[0], p = await To(h);
837
+ c(p);
837
838
  }
838
839
  function u() {
839
840
  c(void 0);
@@ -891,10 +892,10 @@ const fa = (e) => {
891
892
  )
892
893
  ] }) })
893
894
  ] });
894
- }, pa = (e) => {
895
- const { ooui: t } = e, { required: n } = t;
896
- return /* @__PURE__ */ i(Ce, { required: n, ...e, children: /* @__PURE__ */ i(ha, {}) });
897
895
  }, ha = (e) => {
896
+ const { ooui: t } = e, { required: n } = t;
897
+ return /* @__PURE__ */ i(Ce, { required: n, ...e, children: /* @__PURE__ */ i(pa, {}) });
898
+ }, pa = (e) => {
898
899
  const { value: t, onChange: n } = e;
899
900
  if (!t)
900
901
  return null;
@@ -936,9 +937,9 @@ const Io = (e, t, n) => e.columns.map((r) => {
936
937
  title: r.label,
937
938
  render: d,
938
939
  sorter: (f, u) => {
939
- var h, m;
940
- let l = f[a] || "", p = u[a] || "";
941
- return s === "many2one" && (l = ((h = f[a]) == null ? void 0 : h.value) || "", p = ((m = u[a]) == null ? void 0 : m.value) || ""), l < p ? -1 : l > p ? 1 : 0;
940
+ var p, m;
941
+ let l = f[a] || "", h = u[a] || "";
942
+ return s === "many2one" && (l = ((p = f[a]) == null ? void 0 : p.value) || "", h = ((m = u[a]) == null ? void 0 : m.value) || ""), l < h ? -1 : l > h ? 1 : 0;
942
943
  }
943
944
  };
944
945
  }), dr = (e, t) => t.map((o) => {
@@ -978,9 +979,9 @@ function kt({
978
979
  if (!t)
979
980
  return e;
980
981
  const { id: o, desc: r } = t, s = r === !1 ? "ascend" : "descend", a = n[o].type, c = (d, f) => {
981
- var p, h;
982
+ var h, p;
982
983
  let u = d[o] || "", l = f[o] || "";
983
- return a === "many2one" && (u = ((p = d[o]) == null ? void 0 : p[1]) || "", l = ((h = f[o]) == null ? void 0 : h[1]) || ""), u === l ? 0 : s === "ascend" ? u > l ? 1 : -1 : u < l ? 1 : -1;
984
+ return a === "many2one" && (u = ((h = d[o]) == null ? void 0 : h[1]) || "", l = ((p = f[o]) == null ? void 0 : p[1]) || ""), u === l ? 0 : s === "ascend" ? u > l ? 1 : -1 : u < l ? 1 : -1;
984
985
  };
985
986
  return e.sort(c);
986
987
  }
@@ -1005,7 +1006,7 @@ const ur = async (e) => {
1005
1006
  form: o.fields,
1006
1007
  tree: r.fields
1007
1008
  };
1008
- let l = [], p;
1009
+ let l = [], h;
1009
1010
  if (a === "tree" && (r != null && r.arch)) {
1010
1011
  const w = (g = St(r)) == null ? void 0 : g.colors, y = await k.getHandler().readEvalUiObjects({
1011
1012
  model: n,
@@ -1017,7 +1018,7 @@ const ur = async (e) => {
1017
1018
  colors: w
1018
1019
  }
1019
1020
  });
1020
- l = y[0], p = Qt(y[1]);
1021
+ l = y[0], h = Qt(y[1]);
1021
1022
  } else
1022
1023
  l = await k.getHandler().readObjects({
1023
1024
  model: n,
@@ -1025,7 +1026,7 @@ const ur = async (e) => {
1025
1026
  fields: u[a],
1026
1027
  context: s
1027
1028
  });
1028
- const h = l.map((w) => {
1029
+ const p = l.map((w) => {
1029
1030
  const y = {};
1030
1031
  return Object.keys(w).forEach((C) => {
1031
1032
  (u[a].hasOwnProperty(C) || C === "id") && (y[C] = w[C]);
@@ -1033,14 +1034,14 @@ const ur = async (e) => {
1033
1034
  });
1034
1035
  return [
1035
1036
  t.map((w) => {
1036
- const y = h.find(
1037
+ const y = p.find(
1037
1038
  (T) => T.id === w.id
1038
1039
  ), C = {
1039
1040
  ...w
1040
1041
  };
1041
1042
  return a === "form" ? C.values = y : a === "tree" && (C.treeValues = y), C;
1042
1043
  }).concat(d),
1043
- p
1044
+ h
1044
1045
  ];
1045
1046
  }, Ro = (e) => {
1046
1047
  const t = e.filter((n) => n.id && n.id < 0).map((n) => n.id);
@@ -1089,18 +1090,18 @@ function Mr({
1089
1090
  }), n;
1090
1091
  }
1091
1092
  const Ca = (e) => {
1092
- const { ooui: t } = e, { relation: n, context: o, views: r } = t, [s, a] = b(!0), [c, d] = b(), [f, u] = b(/* @__PURE__ */ new Map()), l = Z(Le), { getContext: p } = l || {};
1093
+ const { ooui: t } = e, { relation: n, context: o, views: r } = t, [s, a] = b(!0), [c, d] = b(), [f, u] = b(/* @__PURE__ */ new Map()), l = Z(Le), { getContext: h } = l || {};
1093
1094
  bt(() => {
1094
1095
  m();
1095
1096
  }, [t]);
1096
- const h = async (g) => r && r[g] ? r[g] : await k.getHandler().getView({
1097
+ const p = async (g) => r && r[g] ? r[g] : await k.getHandler().getView({
1097
1098
  model: n,
1098
1099
  type: g,
1099
- context: { ...p == null ? void 0 : p(), ...o }
1100
+ context: { ...h == null ? void 0 : h(), ...o }
1100
1101
  }), m = async () => {
1101
1102
  a(!0), d(void 0);
1102
1103
  try {
1103
- const g = await h("form"), w = await h("tree");
1104
+ const g = await p("form"), w = await p("tree");
1104
1105
  f.set("form", g), f.set("tree", w), u(f);
1105
1106
  } catch (g) {
1106
1107
  d(g);
@@ -1110,7 +1111,7 @@ const Ca = (e) => {
1110
1111
  };
1111
1112
  return s ? /* @__PURE__ */ i(Be, {}) : c ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(xa, { ooui: t, views: f }) });
1112
1113
  }, xa = (e) => {
1113
- const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, c] = b(!1), [d, f] = b(), [u, l] = b(!1), [p, h] = b(), { relation: m, context: g, readOnly: w, summaryField: y, titleField: C } = o, T = s.filter((F) => F.values), R = Z(Le), { getContext: v } = R || {};
1114
+ const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, c] = b(!1), [d, f] = b(), [u, l] = b(!1), [h, p] = b(), { relation: m, context: g, readOnly: w, summaryField: y, titleField: C } = o, T = s.filter((F) => F.values), R = Z(Le), { getContext: v } = R || {};
1114
1115
  bt(() => {
1115
1116
  I();
1116
1117
  }, [s]);
@@ -1151,7 +1152,7 @@ const Ca = (e) => {
1151
1152
  {
1152
1153
  style: { display: "inline-block", cursor: "pointer" },
1153
1154
  onClick: () => {
1154
- h(
1155
+ p(
1155
1156
  T.find(
1156
1157
  (O) => F.id === O.id
1157
1158
  )
@@ -1166,7 +1167,7 @@ const Ca = (e) => {
1166
1167
  {
1167
1168
  style: { display: "inline-block", cursor: "pointer" },
1168
1169
  onClick: () => {
1169
- h(
1170
+ p(
1170
1171
  T.find(
1171
1172
  (O) => F.id === O.id
1172
1173
  )
@@ -1182,9 +1183,9 @@ const Ca = (e) => {
1182
1183
  {
1183
1184
  formView: n.get("form"),
1184
1185
  model: m,
1185
- id: p == null ? void 0 : p.id,
1186
- values: p == null ? void 0 : p.values,
1187
- defaultValues: p == null ? void 0 : p.defaultValues,
1186
+ id: h == null ? void 0 : h.id,
1187
+ values: h == null ? void 0 : h.values,
1188
+ defaultValues: h == null ? void 0 : h.defaultValues,
1188
1189
  visible: u,
1189
1190
  onSubmitSucceed: () => {
1190
1191
  l(!1);
@@ -1550,8 +1551,8 @@ async function Vo({
1550
1551
  views: f,
1551
1552
  name: u,
1552
1553
  limit: l,
1553
- view_type: p
1554
- } = s, h = p === "tree", m = [];
1554
+ view_type: h
1555
+ } = s, p = h === "tree", m = [];
1555
1556
  for (const C of f) {
1556
1557
  const [T, R] = C;
1557
1558
  if (T)
@@ -1578,11 +1579,11 @@ async function Vo({
1578
1579
  domain: c,
1579
1580
  initialView: y,
1580
1581
  limit: l,
1581
- treeExpandable: h
1582
+ treeExpandable: p
1582
1583
  };
1583
1584
  }
1584
1585
  const Va = (e) => {
1585
- const [t, n] = b(), [o, r] = b(!0), [s, a] = b(), [c, d] = b(), f = Z(Le), { getContext: u, getValues: l, activeId: p } = f || {}, { globalValues: h, rootContext: m } = fr(), g = Ie(() => ({ ...u == null ? void 0 : u(), ...m }), [u, m]);
1586
+ const [t, n] = b(), [o, r] = b(!0), [s, a] = b(), [c, d] = b(), f = Z(Le), { getContext: u, getValues: l, activeId: h } = f || {}, { globalValues: p, rootContext: m } = fr(), g = Ie(() => ({ ...u == null ? void 0 : u(), ...m }), [u, m]);
1586
1587
  return { actionData: s, treeShortcut: c, loading: o, error: t, fetchData: async () => {
1587
1588
  n(void 0), r(!0);
1588
1589
  try {
@@ -1590,7 +1591,7 @@ const Va = (e) => {
1590
1591
  actionId: e,
1591
1592
  rootContext: g,
1592
1593
  globalValues: {
1593
- ...h,
1594
+ ...p,
1594
1595
  ...l()
1595
1596
  }
1596
1597
  }), { views: C } = y, T = C.find((R) => {
@@ -1614,8 +1615,8 @@ const Va = (e) => {
1614
1615
  view_type: v,
1615
1616
  overrideUnsettedLimit: !0,
1616
1617
  values: {
1617
- active_id: p,
1618
- active_ids: [p]
1618
+ active_id: h,
1619
+ active_ids: [h]
1619
1620
  }
1620
1621
  });
1621
1622
  }
@@ -1690,17 +1691,17 @@ const Va = (e) => {
1690
1691
  cr,
1691
1692
  {
1692
1693
  bounds: !0,
1693
- onResize: (p) => {
1694
- var h, m;
1695
- n((h = p.bounds) == null ? void 0 : h.height), r((m = p.bounds) == null ? void 0 : m.width);
1694
+ onResize: (h) => {
1695
+ var p, m;
1696
+ n((p = h.bounds) == null ? void 0 : p.height), r((m = h.bounds) == null ? void 0 : m.width);
1696
1697
  },
1697
- children: ({ measureRef: p }) => l ? /* @__PURE__ */ i(
1698
+ children: ({ measureRef: h }) => l ? /* @__PURE__ */ i(
1698
1699
  Aa,
1699
1700
  {
1700
1701
  value: s,
1701
1702
  total: a,
1702
1703
  percent: c,
1703
- measureRef: p,
1704
+ measureRef: h,
1704
1705
  height: t,
1705
1706
  width: o,
1706
1707
  color: d,
@@ -1712,7 +1713,7 @@ const Va = (e) => {
1712
1713
  {
1713
1714
  value: s,
1714
1715
  total: a,
1715
- measureRef: p,
1716
+ measureRef: h,
1716
1717
  height: t,
1717
1718
  width: o,
1718
1719
  color: d,
@@ -1745,12 +1746,12 @@ function _a({
1745
1746
  });
1746
1747
  let l = o ? `${f}/${u}` : `${f}`;
1747
1748
  c && (l += " " + c);
1748
- let p = Do(
1749
+ let h = Do(
1749
1750
  l,
1750
1751
  `bold ${Math.floor(d * 1.03)}px sans-serif`
1751
1752
  );
1752
- a && (p = p * 2), p >= t * 0.85 && (d = t * 0.85 / p * d);
1753
- const h = a && at(a, { style: { fontSize: d * 0.7 } });
1753
+ a && (h = h * 2), h >= t * 0.85 && (d = t * 0.85 / h * d);
1754
+ const p = a && at(a, { style: { fontSize: d * 0.7 } });
1754
1755
  return /* @__PURE__ */ i(
1755
1756
  "div",
1756
1757
  {
@@ -1764,8 +1765,8 @@ function _a({
1764
1765
  overflow: "hidden"
1765
1766
  },
1766
1767
  children: /* @__PURE__ */ D(Nn, { style: { fontSize: d, margin: 0, color: s }, children: [
1767
- h && /* @__PURE__ */ i(h, { style: { fontSize: d * 0.7 } }),
1768
- h ? ` ${l}` : l
1768
+ p && /* @__PURE__ */ i(p, { style: { fontSize: d * 0.7 } }),
1769
+ p ? ` ${l}` : l
1769
1770
  ] })
1770
1771
  }
1771
1772
  );
@@ -1786,15 +1787,15 @@ function Aa({
1786
1787
  const l = s == null ? void 0 : s.toLocaleString("es-ES", {
1787
1788
  useGrouping: !0
1788
1789
  });
1789
- let p = r ? `${l}/${r == null ? void 0 : r.toLocaleString("es-ES", {
1790
+ let h = r ? `${l}/${r == null ? void 0 : r.toLocaleString("es-ES", {
1790
1791
  useGrouping: !0
1791
1792
  })}` : `${l}`;
1792
- d && (p += " " + d);
1793
- const h = `${o == null ? void 0 : o.toLocaleString("es-ES", {
1793
+ d && (h += " " + d);
1794
+ const p = `${o == null ? void 0 : o.toLocaleString("es-ES", {
1794
1795
  useGrouping: !0
1795
1796
  })}%`;
1796
1797
  let m = Do(
1797
- h,
1798
+ p,
1798
1799
  `bold ${Math.floor(u * 1.03)}px sans-serif`
1799
1800
  );
1800
1801
  c && (m = m * 1.5), (m >= n * 0.85 || u * 2 < f) && (u = n * 0.85 / m * u);
@@ -1826,7 +1827,7 @@ function Aa({
1826
1827
  color: a,
1827
1828
  textAlign: "center"
1828
1829
  },
1829
- children: p
1830
+ children: h
1830
1831
  }
1831
1832
  )
1832
1833
  ] })
@@ -1847,7 +1848,7 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
1847
1848
  field: f,
1848
1849
  operator: u,
1849
1850
  manualIds: l
1850
- } = e, [p, h] = b(!1), [m, g] = b(), [w, y] = b(), [C, T] = b(), [R, v] = b(), [V, I] = b(), [F, x] = b(), [_] = Ze(
1851
+ } = e, [h, p] = b(!1), [m, g] = b(), [w, y] = b(), [C, T] = b(), [R, v] = b(), [V, I] = b(), [F, x] = b(), [_] = Ze(
1851
1852
  k.getHandler().searchAllIds
1852
1853
  ), [S] = Ze(
1853
1854
  k.getHandler().readObjects
@@ -1913,7 +1914,7 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
1913
1914
  });
1914
1915
  }
1915
1916
  async function j() {
1916
- h(!0), x(void 0);
1917
+ p(!0), x(void 0);
1917
1918
  let K, N;
1918
1919
  try {
1919
1920
  const q = await G({ domain: n, isTotal: !1 });
@@ -1950,9 +1951,9 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
1950
1951
  } catch (q) {
1951
1952
  x(JSON.stringify(q));
1952
1953
  }
1953
- h(!1);
1954
+ p(!1);
1954
1955
  }
1955
- return p ? /* @__PURE__ */ i(rn, {}) : F ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: F, type: "error", banner: !0 }) : /* @__PURE__ */ i(
1956
+ return h ? /* @__PURE__ */ i(rn, {}) : F ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: F, type: "error", banner: !0 }) : /* @__PURE__ */ i(
1956
1957
  Ao,
1957
1958
  {
1958
1959
  value: m,
@@ -1973,7 +1974,7 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
1973
1974
  limit: s,
1974
1975
  uninformedString: a,
1975
1976
  manualIds: c
1976
- } = e, [d, f] = b(!1), [u, l] = b(), [p, h] = b(), [m, g] = b(), [w, y] = b("line"), [C] = Ze(
1977
+ } = e, [d, f] = b(!1), [u, l] = b(), [h, p] = b(), [m, g] = b(), [w, y] = b("line"), [C] = Ze(
1977
1978
  k.getHandler().getFields
1978
1979
  ), [T] = Ze(
1979
1980
  k.getHandler().readObjects
@@ -2008,7 +2009,7 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
2008
2009
  loading: d,
2009
2010
  error: u,
2010
2011
  type: w,
2011
- values: p,
2012
+ values: h,
2012
2013
  evaluatedEntries: m,
2013
2014
  fetchData: v
2014
2015
  };
@@ -2021,7 +2022,7 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
2021
2022
  uninformedString: a
2022
2023
  }
2023
2024
  });
2024
- l(void 0), h(_);
2025
+ l(void 0), p(_);
2025
2026
  } catch (_) {
2026
2027
  l("Error processing graph data: " + _), f(!1);
2027
2028
  return;
@@ -2037,7 +2038,7 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
2037
2038
  d,
2038
2039
  c,
2039
2040
  t,
2040
- p,
2041
+ h,
2041
2042
  T,
2042
2043
  R,
2043
2044
  w,
@@ -2048,7 +2049,7 @@ const { getValueForOperator: Pr } = oo, Da = (e) => {
2048
2049
  loading: d,
2049
2050
  error: u,
2050
2051
  type: w,
2051
- values: p,
2052
+ values: h,
2052
2053
  evaluatedEntries: m,
2053
2054
  fetchData: v
2054
2055
  };
@@ -2082,14 +2083,14 @@ async function Na({
2082
2083
  getFields: d
2083
2084
  });
2084
2085
  if (a) {
2085
- let h = await f({
2086
+ let p = await f({
2086
2087
  model: t,
2087
2088
  ids: a,
2088
2089
  fieldsToRetrieve: e,
2089
2090
  context: o
2090
2091
  });
2091
- return r && (h = [...h].sort((m, g) => m[r] - g[r])), {
2092
- values: h,
2092
+ return r && (p = [...p].sort((m, g) => m[r] - g[r])), {
2093
+ values: p,
2093
2094
  fields: l
2094
2095
  };
2095
2096
  }
@@ -2129,8 +2130,8 @@ const _n = (e) => (t) => {
2129
2130
  });
2130
2131
  if ($a(e)) {
2131
2132
  const t = Ha(e);
2132
- return t === null ? e : nt(e, pn.input[t]).format(
2133
- pn.output[t]
2133
+ return t === null ? e : nt(e, hn.input[t]).format(
2134
+ hn.output[t]
2134
2135
  );
2135
2136
  } else
2136
2137
  return e;
@@ -2212,7 +2213,7 @@ const _n = (e) => (t) => {
2212
2213
  function $a(e) {
2213
2214
  return typeof e != "string" || e === void 0 ? !1 : new Date(e).toString() !== "Invalid Date";
2214
2215
  }
2215
- const pn = {
2216
+ const hn = {
2216
2217
  input: {
2217
2218
  hours: "YYYY-MM-DD HH:mm",
2218
2219
  days: "YYYY-MM-DD",
@@ -2229,10 +2230,10 @@ const pn = {
2229
2230
  }
2230
2231
  };
2231
2232
  function Ha(e) {
2232
- for (const t in pn.input)
2233
+ for (const t in hn.input)
2233
2234
  if (nt(
2234
2235
  e,
2235
- pn.input[t],
2236
+ hn.input[t],
2236
2237
  !0
2237
2238
  ).isValid())
2238
2239
  return t;
@@ -2265,8 +2266,8 @@ const Ba = {
2265
2266
  }));
2266
2267
  }, { Text: Lr } = Nt, Ka = {
2267
2268
  line: ms,
2268
- bar: ps,
2269
- pie: hs
2269
+ bar: hs,
2270
+ pie: ps
2270
2271
  }, ko = ({
2271
2272
  type: e,
2272
2273
  data: t,
@@ -2274,30 +2275,30 @@ const Ba = {
2274
2275
  isStack: o,
2275
2276
  numItems: r
2276
2277
  }) => {
2277
- const { t: s } = he(), a = Ie(() => {
2278
+ const { t: s } = pe(), a = Ie(() => {
2278
2279
  if (!(e !== "pie" || t.reduce(
2279
- (h, m) => m.operator === "+" ? h + m.value : 0,
2280
+ (p, m) => m.operator === "+" ? p + m.value : 0,
2280
2281
  0
2281
2282
  ) === 0))
2282
- return t.reduce((h, m) => h + m.value, 0);
2283
+ return t.reduce((p, m) => p + m.value, 0);
2283
2284
  }, [t, e]), c = Ie(() => {
2284
2285
  if (e === "pie")
2285
2286
  return ja(t);
2286
2287
  }, [t, e]), d = X(
2287
- (p) => {
2288
+ (h) => {
2288
2289
  if (!c)
2289
2290
  return;
2290
- const h = c.find((w) => w.x === p);
2291
- return `${`${((h == null ? void 0 : h.percent) || 0).toFixed(0)}%`}`;
2291
+ const p = c.find((w) => w.x === h);
2292
+ return `${`${((p == null ? void 0 : p.percent) || 0).toFixed(0)}%`}`;
2292
2293
  },
2293
2294
  [c]
2294
2295
  ), f = Ie(() => {
2295
2296
  if (c !== void 0)
2296
2297
  return {
2297
- formatter: (p, h) => d(h.id)
2298
+ formatter: (h, p) => d(p.id)
2298
2299
  };
2299
2300
  }, [c]), u = X(
2300
- ({ percent: p, x: h }) => p < 0.07 ? "" : d(h),
2301
+ ({ percent: h, x: p }) => h < 0.07 ? "" : d(p),
2301
2302
  [c]
2302
2303
  ), l = Ka[e];
2303
2304
  return l ? /* @__PURE__ */ D(
@@ -2347,7 +2348,7 @@ function Wa(e) {
2347
2348
  return c || (c = { ...Nr.default }), c.data = n, t === "pie" ? (c.colorField = "x", c.angleField = "value", c = { ...c, ...Ba.inner }, c.legend.itemValue = s, c.label.content = a) : (c.xField = "x", c.yField = "value", c.seriesField = "type", c.isGroup = o, r && (c.isStack = !0, c.groupField = "stacked")), c;
2348
2349
  }
2349
2350
  const Ga = (e) => {
2350
- const { model: t, domain: n, context: o, xml: r, limit: s, manualIds: a } = e, { t: c } = he(), { error: d, loading: f, values: u, type: l, evaluatedEntries: p, fetchData: h } = Ma({
2351
+ const { model: t, domain: n, context: o, xml: r, limit: s, manualIds: a } = e, { t: c } = pe(), { error: d, loading: f, values: u, type: l, evaluatedEntries: h, fetchData: p } = Ma({
2351
2352
  model: t,
2352
2353
  xml: r,
2353
2354
  limit: s,
@@ -2357,7 +2358,7 @@ const Ga = (e) => {
2357
2358
  manualIds: a
2358
2359
  });
2359
2360
  if (bt(() => {
2360
- h();
2361
+ p();
2361
2362
  }, [r, t, s, o, n]), f || !u)
2362
2363
  return /* @__PURE__ */ i(rn, {});
2363
2364
  const { data: m, isGroup: g, isStack: w } = u;
@@ -2368,7 +2369,7 @@ const Ga = (e) => {
2368
2369
  data: m,
2369
2370
  isGroup: g,
2370
2371
  isStack: w,
2371
- numItems: p.length
2372
+ numItems: h.length
2372
2373
  }
2373
2374
  );
2374
2375
  }, It = 80, rt = Ii(
@@ -2386,8 +2387,8 @@ const Ga = (e) => {
2386
2387
  currentId: f,
2387
2388
  setCurrentId: u,
2388
2389
  setResults: l,
2389
- results: p,
2390
- currentItemIndex: h,
2390
+ results: h,
2391
+ currentItemIndex: p,
2391
2392
  setCurrentItemIndex: m,
2392
2393
  currentModel: g,
2393
2394
  sorter: w,
@@ -2404,8 +2405,8 @@ const Ga = (e) => {
2404
2405
  x !== void 0 ? x : It
2405
2406
  ), [_e, De] = b(o);
2406
2407
  fe(() => {
2407
- p && p.length > 0 && !h && (m == null || m(0), u == null || u(p[0].id));
2408
- }, [p]), fe(() => {
2408
+ h && h.length > 0 && !p && (m == null || m(0), u == null || u(h[0].id));
2409
+ }, [h]), fe(() => {
2409
2410
  ke(x !== void 0 ? x : It);
2410
2411
  }, [x]), fe(() => {
2411
2412
  s.length === 1 ? J(s[0]) : s.length > 1 && J(
@@ -2442,9 +2443,9 @@ const Ga = (e) => {
2442
2443
  onNewClicked: d,
2443
2444
  currentId: f,
2444
2445
  setCurrentId: u,
2445
- currentItemIndex: h,
2446
+ currentItemIndex: p,
2446
2447
  setCurrentItemIndex: m,
2447
- results: p,
2448
+ results: h,
2448
2449
  setResults: l,
2449
2450
  currentModel: g,
2450
2451
  removingItem: A,
@@ -2484,7 +2485,7 @@ const Ga = (e) => {
2484
2485
  }
2485
2486
  );
2486
2487
  }, Ya = (e, t) => {
2487
- const { view_id: n, model: o, context: r, domain: s, limit: a, manualIds: c } = e, [d, f] = b(!1), [u, l] = b(), [p, h] = b(), m = Z(
2488
+ const { view_id: n, model: o, context: r, domain: s, limit: a, manualIds: c } = e, [d, f] = b(!1), [u, l] = b(), [h, p] = b(), m = Z(
2488
2489
  rt
2489
2490
  ), { setGraphIsLoading: g = void 0 } = m || {}, [w] = Ze(k.getHandler().getView);
2490
2491
  gt(t, () => ({
@@ -2503,7 +2504,7 @@ const Ga = (e) => {
2503
2504
  type: "graph",
2504
2505
  context: r
2505
2506
  });
2506
- h(C.arch);
2507
+ p(C.arch);
2507
2508
  const T = Jn(C.arch);
2508
2509
  l(T), f(!1), g == null || g(!1);
2509
2510
  } catch (C) {
@@ -2544,7 +2545,7 @@ const Ga = (e) => {
2544
2545
  model: o,
2545
2546
  context: r,
2546
2547
  domain: s,
2547
- xml: p,
2548
+ xml: h,
2548
2549
  limit: a,
2549
2550
  manualIds: c
2550
2551
  }
@@ -2552,15 +2553,15 @@ const Ga = (e) => {
2552
2553
  default:
2553
2554
  return /* @__PURE__ */ i(ie, { children: `Graph ${u.type} not implemented` });
2554
2555
  }
2555
- }, Ht = ht(Ya);
2556
+ }, Ht = pt(Ya);
2556
2557
  var on = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e))(on || {});
2557
2558
  const Tf = Object.values(on), qa = (e) => {
2558
- const { model: t, domain: n = [], context: o = {}, view_id: r, manualIds: s } = e, [a, c] = b(!1), [d, f] = b(), [u, l] = b(), [p] = Ze(
2559
+ const { model: t, domain: n = [], context: o = {}, view_id: r, manualIds: s } = e, [a, c] = b(!1), [d, f] = b(), [u, l] = b(), [h] = Ze(
2559
2560
  k.getHandler().readForView
2560
- ), h = X(async () => {
2561
+ ), p = X(async () => {
2561
2562
  c(!0), f(void 0), s && n.push(["id", "in", s]);
2562
2563
  try {
2563
- const m = await p({
2564
+ const m = await h({
2564
2565
  model: t,
2565
2566
  domain: n,
2566
2567
  context: o,
@@ -2571,17 +2572,17 @@ const Tf = Object.values(on), qa = (e) => {
2571
2572
  f("Error reading graph data from server: " + m);
2572
2573
  }
2573
2574
  c(!1);
2574
- }, [o, n, s, t, p, r]);
2575
+ }, [o, n, s, t, h, r]);
2575
2576
  return {
2576
2577
  loading: a,
2577
2578
  error: d,
2578
- fetchData: h,
2579
+ fetchData: p,
2579
2580
  graphData: u
2580
2581
  };
2581
2582
  }, za = (e, t) => {
2582
2583
  const { view_id: n, model: o, context: r, domain: s, manualIds: a } = e, c = Z(
2583
2584
  rt
2584
- ), { setGraphIsLoading: d = void 0 } = c || {}, { error: f, loading: u, graphData: l, fetchData: p } = qa({
2585
+ ), { setGraphIsLoading: d = void 0 } = c || {}, { error: f, loading: u, graphData: l, fetchData: h } = qa({
2585
2586
  view_id: n,
2586
2587
  model: o,
2587
2588
  domain: s,
@@ -2592,10 +2593,10 @@ const Tf = Object.values(on), qa = (e) => {
2592
2593
  d == null || d(u);
2593
2594
  }, [u]), gt(t, () => ({
2594
2595
  refresh: () => {
2595
- p();
2596
+ h();
2596
2597
  }
2597
2598
  })), fe(() => {
2598
- p();
2599
+ h();
2599
2600
  }, [n]), u || !l)
2600
2601
  return /* @__PURE__ */ i(rn, {});
2601
2602
  if (f)
@@ -2603,11 +2604,11 @@ const Tf = Object.values(on), qa = (e) => {
2603
2604
  switch (l.type) {
2604
2605
  case "indicatorField":
2605
2606
  case "indicator": {
2606
- const { value: h, total: m, percent: g, icon: w, color: y, suffix: C } = l;
2607
+ const { value: p, total: m, percent: g, icon: w, color: y, suffix: C } = l;
2607
2608
  return /* @__PURE__ */ i(
2608
2609
  Ao,
2609
2610
  {
2610
- value: h,
2611
+ value: p,
2611
2612
  totalValue: m,
2612
2613
  percent: g,
2613
2614
  color: y,
@@ -2620,22 +2621,22 @@ const Tf = Object.values(on), qa = (e) => {
2620
2621
  case "line":
2621
2622
  case "bar":
2622
2623
  case "pie": {
2623
- const h = l;
2624
+ const p = l;
2624
2625
  return /* @__PURE__ */ i(
2625
2626
  ko,
2626
2627
  {
2627
- type: h.type,
2628
- data: h.data,
2629
- isGroup: h.isGroup,
2630
- isStack: h.isStack,
2631
- numItems: h.num_items
2628
+ type: p.type,
2629
+ data: p.data,
2630
+ isGroup: p.isGroup,
2631
+ isStack: p.isStack,
2632
+ numItems: p.num_items
2632
2633
  }
2633
2634
  );
2634
2635
  }
2635
2636
  default:
2636
2637
  return /* @__PURE__ */ i(ie, { children: `Graph ${l.type} not implemented` });
2637
2638
  }
2638
- }, Mo = ht(za), ct = it.createContext(null), Ja = (e) => {
2639
+ }, Mo = pt(za), ct = it.createContext(null), Ja = (e) => {
2639
2640
  const {
2640
2641
  children: t,
2641
2642
  openAction: n,
@@ -2646,7 +2647,7 @@ const Tf = Object.values(on), qa = (e) => {
2646
2647
  onChangeTab: c,
2647
2648
  onRemoveTab: d,
2648
2649
  tabs: f
2649
- } = e, [u, l] = b(), [p, h] = b();
2650
+ } = e, [u, l] = b(), [h, p] = b();
2650
2651
  return /* @__PURE__ */ i(
2651
2652
  ct.Provider,
2652
2653
  {
@@ -2659,9 +2660,9 @@ const Tf = Object.values(on), qa = (e) => {
2659
2660
  onChangeTab: c,
2660
2661
  onRemoveTab: d,
2661
2662
  tabs: f,
2662
- currentId: p,
2663
+ currentId: h,
2663
2664
  currentView: u,
2664
- setCurrentId: h,
2665
+ setCurrentId: p,
2665
2666
  setCurrentView: l
2666
2667
  },
2667
2668
  children: t
@@ -2763,7 +2764,7 @@ const Tf = Object.values(on), qa = (e) => {
2763
2764
  t && c();
2764
2765
  }, [t]), a)
2765
2766
  return /* @__PURE__ */ i(_o, { error: a });
2766
- const { id: l, model: p, limit: h, domain: m, context: g, initialView: w } = o || {}, y = d ? Mo : Ht;
2767
+ const { id: l, model: h, limit: p, domain: m, context: g, initialView: w } = o || {}, y = d ? Mo : Ht;
2767
2768
  return /* @__PURE__ */ D(
2768
2769
  Po,
2769
2770
  {
@@ -2778,10 +2779,10 @@ const Tf = Object.values(on), qa = (e) => {
2778
2779
  y,
2779
2780
  {
2780
2781
  view_id: w.id,
2781
- model: p,
2782
+ model: h,
2782
2783
  context: g,
2783
2784
  domain: m,
2784
- limit: h
2785
+ limit: p
2785
2786
  }
2786
2787
  )
2787
2788
  ]
@@ -2925,8 +2926,8 @@ const Rt = ({
2925
2926
  if (t.selectionValues.size ? o = t.selectionValues.get(n) : Array.isArray(n) && (r = n[0], o = n[1]), !n)
2926
2927
  return null;
2927
2928
  const s = t.colors === "auto" ? Zt(r) : t.colors[r] || Zt(r);
2928
- return /* @__PURE__ */ i(pr, { color: s, children: o });
2929
- }, pr = (e) => {
2929
+ return /* @__PURE__ */ i(hr, { color: s, children: o });
2930
+ }, hr = (e) => {
2930
2931
  let { color: t } = e, n = {};
2931
2932
  return !Rs(e.color) && !Os(e.color) && (n = {
2932
2933
  color: t,
@@ -2938,7 +2939,7 @@ const Rt = ({
2938
2939
  const { ooui: t } = e;
2939
2940
  return /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(uc, { ooui: t }) });
2940
2941
  }, uc = (e) => {
2941
- const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, c] = b([]), [d, f] = b(), [u, l] = b(!1), { relation: p, context: h, readOnly: m, field: g } = n, w = Z(Le), { getContext: y } = w || {};
2942
+ const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, c] = b([]), [d, f] = b(), [u, l] = b(!1), { relation: h, context: p, readOnly: m, field: g } = n, w = Z(Le), { getContext: y } = w || {};
2942
2943
  bt(() => {
2943
2944
  T();
2944
2945
  }, [r]);
@@ -2964,10 +2965,10 @@ const Rt = ({
2964
2965
  V = [...V, ...x];
2965
2966
  }
2966
2967
  const F = (await k.getHandler().search({
2967
- model: p,
2968
+ model: h,
2968
2969
  params: V,
2969
2970
  fieldsToRetrieve: [g],
2970
- context: { ...y == null ? void 0 : y(), ...h }
2971
+ context: { ...y == null ? void 0 : y(), ...p }
2971
2972
  })).map((x) => {
2972
2973
  const _ = x[g];
2973
2974
  let S = _;
@@ -2993,7 +2994,7 @@ const Rt = ({
2993
2994
  O.preventDefault(), O.stopPropagation();
2994
2995
  }, S = Zt(I);
2995
2996
  return /* @__PURE__ */ i(
2996
- pr,
2997
+ hr,
2997
2998
  {
2998
2999
  color: S,
2999
3000
  onMouseDown: _,
@@ -3045,7 +3046,7 @@ const Rt = ({
3045
3046
  case "boolean":
3046
3047
  return ca;
3047
3048
  case "integer":
3048
- return hn;
3049
+ return pn;
3049
3050
  case "float":
3050
3051
  return Ho;
3051
3052
  case "progressbar":
@@ -3075,7 +3076,7 @@ const Rt = ({
3075
3076
  case "float_time":
3076
3077
  return nd;
3077
3078
  case "fiber_grid":
3078
- return pa;
3079
+ return ha;
3079
3080
  case "timeline":
3080
3081
  return Ca;
3081
3082
  case "indicator":
@@ -3095,7 +3096,7 @@ const Rt = ({
3095
3096
  case "steps":
3096
3097
  return mu;
3097
3098
  case "codeeditor":
3098
- return hu;
3099
+ return pu;
3099
3100
  case "comments_timeline":
3100
3101
  return xu;
3101
3102
  case "html_preview":
@@ -3108,12 +3109,12 @@ const Rt = ({
3108
3109
  }, mc = (e) => {
3109
3110
  const { ooui: t } = e, { type: n } = t, o = fc(n);
3110
3111
  return o ? Fi(o, e) : null;
3111
- }, pc = ({
3112
+ }, hc = ({
3112
3113
  item: e,
3113
3114
  responsiveBehaviour: t
3114
3115
  }) => ({
3115
3116
  gridColumnStart: "span " + (t ? 1 : e.colspan)
3116
- }), hc = ({
3117
+ }), pc = ({
3117
3118
  row: e,
3118
3119
  mustFillWithEmpties: t,
3119
3120
  numberOfColumns: n
@@ -3155,13 +3156,13 @@ const Rt = ({
3155
3156
  const s = vc(o);
3156
3157
  s < r && (r = s);
3157
3158
  let a = !1, c = [];
3158
- const d = o.map((l, p) => {
3159
- const h = l.filter((w) => !w.invisible), m = gc({
3160
- row: h,
3159
+ const d = o.map((l, h) => {
3160
+ const p = l.filter((w) => !w.invisible), m = gc({
3161
+ row: p,
3161
3162
  numberOfColumns: r
3162
3163
  });
3163
3164
  let g = m;
3164
- return (p === 0 || !(l.length === 1 && l.some((w) => w.type === "group"))) && (g = hc({
3165
+ return (h === 0 || !(l.length === 1 && l.some((w) => w.type === "group"))) && (g = pc({
3165
3166
  row: m,
3166
3167
  numberOfColumns: r,
3167
3168
  mustFillWithEmpties: n
@@ -3169,7 +3170,7 @@ const Rt = ({
3169
3170
  "div",
3170
3171
  {
3171
3172
  style: {
3172
- ...pc({ item: w, responsiveBehaviour: n }),
3173
+ ...hc({ item: w, responsiveBehaviour: n }),
3173
3174
  minWidth: 0
3174
3175
  },
3175
3176
  children: mc({
@@ -3182,7 +3183,6 @@ const Rt = ({
3182
3183
  }), f = o.length === 1 ? yc(c, r) : wc(r, a);
3183
3184
  return /* @__PURE__ */ i("div", { style: {
3184
3185
  display: "grid",
3185
- alignItems: "center",
3186
3186
  gridTemplateColumns: n ? "auto" : f,
3187
3187
  gap: "1rem",
3188
3188
  minHeight: 0,
@@ -3236,11 +3236,11 @@ const Rt = ({
3236
3236
  }, Ic = (e, t) => {
3237
3237
  const { children: n, globalValues: o = {} } = e, r = re(), s = re(), [a, c] = b(!1), d = Z(
3238
3238
  ct
3239
- ), { openAction: f } = d || {}, u = re([]), { t: l } = he();
3239
+ ), { openAction: f } = d || {}, u = re([]), { t: l } = pe();
3240
3240
  gt(t, () => ({
3241
3241
  openActionModal: R
3242
3242
  }));
3243
- const [p, h] = b(!1), [m, g] = b(
3243
+ const [h, p] = b(!1), [m, g] = b(
3244
3244
  {
3245
3245
  context: {}
3246
3246
  }
@@ -3386,7 +3386,7 @@ const Rt = ({
3386
3386
  context: _,
3387
3387
  actionData: S
3388
3388
  }) {
3389
- p ? v({ domain: I, model: F, formView: x, context: _, actionData: S }) : (g({ domain: I, model: F, context: _, formView: x, actionData: S }), h(!0));
3389
+ h ? v({ domain: I, model: F, formView: x, context: _, actionData: S }) : (g({ domain: I, model: F, context: _, formView: x, actionData: S }), p(!0));
3390
3390
  }
3391
3391
  async function v({
3392
3392
  domain: I,
@@ -3401,10 +3401,10 @@ const Rt = ({
3401
3401
  context: {},
3402
3402
  formView: void 0,
3403
3403
  actionData: void 0
3404
- }), h(!1), await new Promise((O) => setTimeout(O, 300)), g({ domain: I, model: F, context: _, formView: x, actionData: S }), h(!0);
3404
+ }), p(!1), await new Promise((O) => setTimeout(O, 300)), g({ domain: I, model: F, context: _, formView: x, actionData: S }), p(!0);
3405
3405
  }
3406
3406
  async function V() {
3407
- jr(u.current), u.current = [], h(!1), g({
3407
+ jr(u.current), u.current = [], p(!1), g({
3408
3408
  domain: void 0,
3409
3409
  model: void 0,
3410
3410
  context: {},
@@ -3440,10 +3440,10 @@ const Rt = ({
3440
3440
  parentContext: m.context,
3441
3441
  model: m.model,
3442
3442
  formView: m.formView,
3443
- visible: p,
3443
+ visible: h,
3444
3444
  onSubmitSucceed: V,
3445
3445
  onCancel: () => {
3446
- jr(u.current), u.current = [], h(!1), g({
3446
+ jr(u.current), u.current = [], p(!1), g({
3447
3447
  domain: void 0,
3448
3448
  model: void 0,
3449
3449
  context: {},
@@ -3510,7 +3510,7 @@ async function Fc({
3510
3510
  }
3511
3511
  return { views: s, initialView: a };
3512
3512
  }
3513
- const Rc = ht(Ic), Oc = (e, t) => {
3513
+ const Rc = pt(Ic), Oc = (e, t) => {
3514
3514
  const n = {};
3515
3515
  return Object.keys(e).forEach((o) => {
3516
3516
  n[o] = e[o], t != null && t[o] && (n[o].context = t[o]);
@@ -3528,8 +3528,8 @@ function _c(e, t) {
3528
3528
  onSubmitError: f,
3529
3529
  readOnly: u = !1,
3530
3530
  mustClearAfterSave: l = !1,
3531
- submitMode: p = "api",
3532
- values: h,
3531
+ submitMode: h = "api",
3532
+ values: p,
3533
3533
  formView: m,
3534
3534
  postSaveAction: g,
3535
3535
  insideButtonModal: w = !1,
@@ -3541,13 +3541,13 @@ function _c(e, t) {
3541
3541
  forcedValues: V = {},
3542
3542
  parentWidth: I,
3543
3543
  onMustRefreshParent: F
3544
- } = e, { t: x } = he(), [_, S] = b(!1), [O, M] = b(), [A, G] = b(), [B] = dt.useForm(), [j, K] = b(), [N, q] = b(), ne = Z($o), [Y, $] = b(), [E, z] = b(!1), P = re(), ae = re({}), Q = re({}), ve = re(!1), se = re(!1), J = re(!1), me = (I !== void 0 ? I : Y) < Vc, Ae = Z(Le), { activeId: ke, getPlainValues: _e } = Ae || {}, De = re(!1), We = Z(
3544
+ } = e, { t: x } = pe(), [_, S] = b(!1), [O, M] = b(), [A, G] = b(), [B] = dt.useForm(), [j, K] = b(), [N, q] = b(), ne = Z($o), [Y, $] = b(), [E, z] = b(!1), P = re(), ae = re({}), Q = re({}), ve = re(!1), se = re(!1), J = re(!1), me = (I !== void 0 ? I : Y) < Vc, Ae = Z(Le), { activeId: ke, getPlainValues: _e } = Ae || {}, De = re(!1), We = Z(
3545
3545
  rt
3546
3546
  ), {
3547
3547
  setFormIsSaving: ye = void 0,
3548
3548
  setFormHasChanges: ce = void 0,
3549
3549
  setCurrentId: Fe = void 0,
3550
- setFormIsLoading: pe = void 0,
3550
+ setFormIsLoading: he = void 0,
3551
3551
  setAttachments: Re = void 0,
3552
3552
  title: U = void 0,
3553
3553
  setTitle: Se = void 0
@@ -3573,7 +3573,7 @@ function _c(e, t) {
3573
3573
  }
3574
3574
  (o === void 0 && N || o !== void 0 && N && o < 0) && (P.current = void 0, G(void 0)), $e();
3575
3575
  }
3576
- }, [o, n, h, m, T]), fe(() => {
3576
+ }, [o, n, p, m, T]), fe(() => {
3577
3577
  E && (In({
3578
3578
  elementHasLostFocus: !0
3579
3579
  }), z(!1));
@@ -3665,7 +3665,7 @@ function _c(e, t) {
3665
3665
  }
3666
3666
  }
3667
3667
  const $e = async () => {
3668
- M(void 0), pe == null || pe(!0);
3668
+ M(void 0), he == null || he(!0);
3669
3669
  let L;
3670
3670
  try {
3671
3671
  m ? L = { arch: m.arch, fields: m.fields } : L = await ci();
@@ -3675,11 +3675,11 @@ function _c(e, t) {
3675
3675
  arch: te
3676
3676
  });
3677
3677
  } catch (H) {
3678
- M(H != null && H.message ? H.message + H.stack : H), pe == null || pe(!1);
3678
+ M(H != null && H.message ? H.message + H.stack : H), he == null || he(!1);
3679
3679
  }
3680
3680
  }, Ue = async (L) => {
3681
3681
  let H, te, oe, we;
3682
- pe == null || pe(!0), M(void 0), L != null && L.fields ? (te = L.fields, oe = L.arch) : (te = N, oe = j), h && (L == null ? void 0 : L.forceRefresh) !== !0 ? H = h : { values: H, defaultGetCalled: we } = await li({
3682
+ he == null || he(!0), M(void 0), L != null && L.fields ? (te = L.fields, oe = L.arch) : (te = N, oe = j), p && (L == null ? void 0 : L.forceRefresh) !== !0 ? H = p : { values: H, defaultGetCalled: we } = await li({
3683
3683
  fields: te,
3684
3684
  arch: oe
3685
3685
  }), C && (H = { ...sc(C), ...H }), ae.current = At(H, te), Yt({
@@ -3687,7 +3687,7 @@ function _c(e, t) {
3687
3687
  fields: te,
3688
3688
  reset: !0,
3689
3689
  isDefaultGet: we
3690
- }), qt({ fields: te, arch: oe, values: H }), pe == null || pe(!1), ce == null || ce(!1), we && z(!0);
3690
+ }), qt({ fields: te, arch: oe, values: H }), he == null || he(!1), ce == null || ce(!1), we && z(!0);
3691
3691
  }, Ot = async () => new Promise(async (L) => {
3692
3692
  lt() ? Bt({
3693
3693
  t: x,
@@ -3810,7 +3810,7 @@ function _c(e, t) {
3810
3810
  return se.current = !1, Br(x), { succeed: !1, id: de() };
3811
3811
  S(!0), ye == null || ye(!0);
3812
3812
  try {
3813
- p === "api" ? await vr(L) : await di(L), l && (P.current = void 0, Yt({ values: {}, fields: N, reset: !0 })), await Ue({ forceRefresh: !0 }), H = !0, Vn.success(x("savedRegisters"));
3813
+ h === "api" ? await vr(L) : await di(L), l && (P.current = void 0, Yt({ values: {}, fields: N, reset: !0 })), await Ue({ forceRefresh: !0 }), H = !0, Vn.success(x("savedRegisters"));
3814
3814
  } catch (oe) {
3815
3815
  se.current = !1, S(!1), ye == null || ye(!1), Ke == null || Ke(oe), Vn.error(x("errorWhileSavingForm")), M(oe != null && oe.message ? oe.message : oe);
3816
3816
  } finally {
@@ -3948,7 +3948,7 @@ function _c(e, t) {
3948
3948
  }), q(we);
3949
3949
  }
3950
3950
  };
3951
- async function pi({
3951
+ async function hi({
3952
3952
  action: L,
3953
3953
  context: H
3954
3954
  }) {
@@ -3979,7 +3979,7 @@ function _c(e, t) {
3979
3979
  } else
3980
3980
  await Ue({ forceRefresh: !0 });
3981
3981
  }
3982
- async function hi({ action: L }) {
3982
+ async function pi({ action: L }) {
3983
3983
  const H = await k.getHandler().executeWorkflow({
3984
3984
  model: n,
3985
3985
  action: L,
@@ -4043,9 +4043,9 @@ function _c(e, t) {
4043
4043
  }
4044
4044
  let oe = !1;
4045
4045
  try {
4046
- !u && (lt() || de() === void 0) && (oe = !0, Fn(!0), p === "2many" ? (await vr({ callOnSubmitSucceed: !1 }), J.current = !0) : await cn({ callOnSubmitSucceed: !1 }));
4046
+ !u && (lt() || de() === void 0) && (oe = !0, Fn(!0), h === "2many" ? (await vr({ callOnSubmitSucceed: !1 }), J.current = !0) : await cn({ callOnSubmitSucceed: !1 }));
4047
4047
  const we = J.current ? Pe() : {}, Ye = { ...te, ...we };
4048
- L === "object" ? await pi({ action: H, context: Ye }) : L === "workflow" ? await hi({ action: H }) : L === "action" && await gi({ action: H, context: Ye }), oe && Fn(!1);
4048
+ L === "object" ? await hi({ action: H, context: Ye }) : L === "workflow" ? await pi({ action: H }) : L === "action" && await gi({ action: H, context: Ye }), oe && Fn(!1);
4049
4049
  } catch (we) {
4050
4050
  oe && Fn(!1), et(we);
4051
4051
  }
@@ -4131,7 +4131,7 @@ function _c(e, t) {
4131
4131
  }
4132
4132
  ) : null;
4133
4133
  }
4134
- const Kt = ht(_c), Wt = (e) => {
4134
+ const Kt = pt(_c), Wt = (e) => {
4135
4135
  const {
4136
4136
  visible: t,
4137
4137
  id: n,
@@ -4141,7 +4141,7 @@ const Kt = ht(_c), Wt = (e) => {
4141
4141
  isMenuAction: a = !1,
4142
4142
  actionData: c,
4143
4143
  ...d
4144
- } = e, { model: f } = d, { modalWidth: u } = xn(), [l, p] = b(o), [h, m] = b(!1), [g, w] = b(), { action_id: y, res_id: C, action_type: T, view_id: R } = c || {};
4144
+ } = e, { model: f } = d, { modalWidth: u } = xn(), [l, h] = b(o), [p, m] = b(!1), [g, w] = b(), { action_id: y, res_id: C, action_type: T, view_id: R } = c || {};
4145
4145
  fe(() => {
4146
4146
  a && v();
4147
4147
  }, [c, a]);
@@ -4155,7 +4155,7 @@ const Kt = ht(_c), Wt = (e) => {
4155
4155
  m(x !== !1), x !== !1 && w(x);
4156
4156
  }
4157
4157
  async function V() {
4158
- if (h && g)
4158
+ if (p && g)
4159
4159
  await k.getHandler().removeFavourite({
4160
4160
  shortcut_id: g
4161
4161
  });
@@ -4168,15 +4168,15 @@ const Kt = ht(_c), Wt = (e) => {
4168
4168
  res_id: _ || !1
4169
4169
  });
4170
4170
  }
4171
- m(!h);
4171
+ m(!p);
4172
4172
  }
4173
4173
  function I() {
4174
4174
  return /* @__PURE__ */ D(Ve, { align: "middle", children: [
4175
4175
  /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(
4176
4176
  Ne,
4177
4177
  {
4178
- type: h ? "primary" : "default",
4179
- icon: h ? /* @__PURE__ */ i(Ki, { style: { color: "white" } }) : /* @__PURE__ */ i(Wi, {}),
4178
+ type: p ? "primary" : "default",
4179
+ icon: p ? /* @__PURE__ */ i(Ki, { style: { color: "white" } }) : /* @__PURE__ */ i(Wi, {}),
4180
4180
  style: { width: 30 },
4181
4181
  onClick: V
4182
4182
  }
@@ -4185,7 +4185,7 @@ const Kt = ht(_c), Wt = (e) => {
4185
4185
  ] });
4186
4186
  }
4187
4187
  const F = u * 0.95;
4188
- return /* @__PURE__ */ i(Tc, { setTitle: p, children: /* @__PURE__ */ i(
4188
+ return /* @__PURE__ */ i(Tc, { setTitle: h, children: /* @__PURE__ */ i(
4189
4189
  tt,
4190
4190
  {
4191
4191
  title: a ? I() : l,
@@ -4318,7 +4318,7 @@ const Kt = ht(_c), Wt = (e) => {
4318
4318
  wheel: !1
4319
4319
  }
4320
4320
  ) });
4321
- }, { useToken: Mc } = je, hn = (e) => {
4321
+ }, { useToken: Mc } = je, pn = (e) => {
4322
4322
  const { ooui: t, onChange: n } = e, { id: o, readOnly: r, required: s } = t, { token: a } = Mc(), c = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = Z(Le), { elementHasLostFocus: f } = d || {};
4323
4323
  return /* @__PURE__ */ i(Ce, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4324
4324
  Zr,
@@ -4339,7 +4339,7 @@ const Kt = ht(_c), Wt = (e) => {
4339
4339
  ) });
4340
4340
  };
4341
4341
  function Pc(e) {
4342
- const { ooui: t, showLabel: n } = e, { id: o, label: r, tooltip: s } = t, a = t instanceof Pn ? hn : Ho, c = (d) => /* @__PURE__ */ i(
4342
+ const { ooui: t, showLabel: n } = e, { id: o, label: r, tooltip: s } = t, a = t instanceof Pn ? pn : Ho, c = (d) => /* @__PURE__ */ i(
4343
4343
  a,
4344
4344
  {
4345
4345
  ooui: {
@@ -4376,22 +4376,22 @@ const { defaultAlgorithm: Nc, defaultSeed: Lc } = je, $c = Nc(Lc), { Option: Hc
4376
4376
  return /* @__PURE__ */ i(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(jc, { ...e }) });
4377
4377
  }, jc = (e) => {
4378
4378
  const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, required: a } = t, c = Array.from(r.entries()), d = c && c.length && c.filter((l) => {
4379
- const [p] = l;
4380
- return o ? !o.includes(p) : !0;
4379
+ const [h] = l;
4380
+ return o ? !o.includes(h) : !0;
4381
4381
  }).map((l) => {
4382
- const [p, h] = l;
4383
- return /* @__PURE__ */ i(Hc, { value: h, children: h }, p);
4382
+ const [h, p] = l;
4383
+ return /* @__PURE__ */ i(Hc, { value: p, children: p }, h);
4384
4384
  }), f = a && !s ? Kc : Ft;
4385
4385
  function u(l) {
4386
- const p = l.map((h) => {
4387
- const m = c.find(([g, w]) => h === w);
4386
+ const h = l.map((p) => {
4387
+ const m = c.find(([g, w]) => p === w);
4388
4388
  return m && m[0];
4389
4389
  });
4390
- if (p.length === 0) {
4390
+ if (h.length === 0) {
4391
4391
  n == null || n(void 0);
4392
4392
  return;
4393
4393
  }
4394
- n == null || n(p);
4394
+ n == null || n(h);
4395
4395
  }
4396
4396
  return /* @__PURE__ */ i(
4397
4397
  f,
@@ -4412,7 +4412,7 @@ const { defaultAlgorithm: Nc, defaultSeed: Lc } = je, $c = Nc(Lc), { Option: Hc
4412
4412
  function Wc(e) {
4413
4413
  const { field: t } = e;
4414
4414
  t.readOnly = !1, t.required = !1;
4415
- const { t: n } = he();
4415
+ const { t: n } = pe();
4416
4416
  switch (t.type) {
4417
4417
  case yt.boolean: {
4418
4418
  const r = new zn({
@@ -4437,11 +4437,19 @@ function Wc(e) {
4437
4437
  case yt.selection:
4438
4438
  return /* @__PURE__ */ i(Bc, { layout: "vertical", ooui: t, showLabel: !0 });
4439
4439
  default:
4440
- return /* @__PURE__ */ i(Co, { ooui: t, layout: "vertical", showLabel: !0, isSearchField: !0 });
4440
+ return /* @__PURE__ */ i(
4441
+ Co,
4442
+ {
4443
+ ooui: t,
4444
+ layout: "vertical",
4445
+ showLabel: !0,
4446
+ isSearchField: !0
4447
+ }
4448
+ );
4441
4449
  }
4442
4450
  }
4443
4451
  function Gc(e) {
4444
- const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: o, isSearching: r } = e, { t: s } = he();
4452
+ const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: o, isSearching: r } = e, { t: s } = pe();
4445
4453
  return /* @__PURE__ */ D(Ve, { children: [
4446
4454
  /* @__PURE__ */ i(ge, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ D("a", { className: "text-xs", onClick: t, children: [
4447
4455
  n ? /* @__PURE__ */ i(Gi, { className: "pr-1" }) : /* @__PURE__ */ i(yn, { className: "pr-1" }),
@@ -4464,13 +4472,13 @@ function Gc(e) {
4464
4472
  ] });
4465
4473
  }
4466
4474
  function Uc(e) {
4467
- const { onLimitChange: t } = e, { t: n } = he(), o = new Pn({ name: "limit" }), r = new Pn({ name: "offset" });
4475
+ const { onLimitChange: t } = e, { t: n } = pe(), o = new Pn({ name: "limit" }), r = new Pn({ name: "offset" });
4468
4476
  return /* @__PURE__ */ D("div", { className: "pl-2 pt-2", children: [
4469
4477
  /* @__PURE__ */ i(Ve, { children: n("parameters") }, "count_params"),
4470
4478
  /* @__PURE__ */ D(qe, { align: "center", children: [
4471
4479
  n("limit") + " :",
4472
4480
  /* @__PURE__ */ i(
4473
- hn,
4481
+ pn,
4474
4482
  {
4475
4483
  ooui: o,
4476
4484
  onChange: (s) => {
@@ -4479,7 +4487,7 @@ function Uc(e) {
4479
4487
  }
4480
4488
  ),
4481
4489
  n("first") + " :",
4482
- /* @__PURE__ */ i(hn, { ooui: r })
4490
+ /* @__PURE__ */ i(pn, { ooui: r })
4483
4491
  ] })
4484
4492
  ] });
4485
4493
  }
@@ -4570,12 +4578,12 @@ function Bo(e) {
4570
4578
  searchVisible: f,
4571
4579
  setSearchFilterHeight: u,
4572
4580
  searchError: l,
4573
- searchValues: p,
4574
- showLimitOptions: h = !0
4581
+ searchValues: h,
4582
+ showLimitOptions: p = !0
4575
4583
  } = e, [m, g] = b(), [w, y] = b(), [C, T] = b(!1), R = re(), { token: v } = tl(), [V] = dt.useForm();
4576
4584
  fe(() => {
4577
- V.setFieldsValue(p);
4578
- }, [p]);
4585
+ V.setFieldsValue(h);
4586
+ }, [h]);
4579
4587
  const I = () => {
4580
4588
  if (!w)
4581
4589
  return;
@@ -4614,7 +4622,7 @@ function Bo(e) {
4614
4622
  initialValues: { offset: a, limit: c },
4615
4623
  children: [
4616
4624
  F,
4617
- C && h && /* @__PURE__ */ i(Uc, { onLimitChange: d }),
4625
+ C && p && /* @__PURE__ */ i(Uc, { onLimitChange: d }),
4618
4626
  /* @__PURE__ */ i(
4619
4627
  Gc,
4620
4628
  {
@@ -4682,15 +4690,15 @@ const Wr = (e, t = "14px -apple-system") => {
4682
4690
  onSelectAllRecords: o,
4683
4691
  numberOfRealSelectedRows: r
4684
4692
  }) => {
4685
- const [s, a] = b(!1), { t: c } = he(), d = {
4693
+ const [s, a] = b(!1), { t: c } = pe(), d = {
4686
4694
  recordsSelected: c("recordsSelected"),
4687
4695
  selectAllRecords: c("selectAllRecords"),
4688
4696
  allRecordsSelected: c("allRecordsSelected")
4689
4697
  };
4690
4698
  if (n === 0 || e < n && r <= n || t === e)
4691
4699
  return null;
4692
- const f = async (p) => {
4693
- p.preventDefault(), p.stopPropagation(), a(!0), await o(), a(!1);
4700
+ const f = async (h) => {
4701
+ h.preventDefault(), h.stopPropagation(), a(!0), await o(), a(!1);
4694
4702
  }, u = /* @__PURE__ */ D("span", { children: [
4695
4703
  d.recordsSelected.replace(
4696
4704
  "{numberOfSelectedRows}",
@@ -4759,13 +4767,13 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4759
4767
  onItemClick: t,
4760
4768
  onOpenChange: n
4761
4769
  }) => {
4762
- const [o, r] = b(!1), [s, a] = b(!1), { t: c } = he(), [d, f] = b(), u = X(async () => {
4770
+ const [o, r] = b(!1), [s, a] = b(!1), { t: c } = pe(), [d, f] = b(), u = X(async () => {
4763
4771
  const {
4764
4772
  actionItems: l = [],
4765
- relateItems: p = [],
4766
- printItems: h = []
4773
+ relateItems: h = [],
4774
+ printItems: p = []
4767
4775
  } = await e() || {};
4768
- return f({ actionItems: l, relateItems: p, printItems: h }), [
4776
+ return f({ actionItems: l, relateItems: h, printItems: p }), [
4769
4777
  {
4770
4778
  sticky: !0,
4771
4779
  items: [
@@ -4778,7 +4786,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4778
4786
  {
4779
4787
  id: "print",
4780
4788
  name: c("report"),
4781
- disabled: !h || h.length === 0,
4789
+ disabled: !p || p.length === 0,
4782
4790
  icon: /* @__PURE__ */ i(rr, {})
4783
4791
  },
4784
4792
  {
@@ -4790,7 +4798,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4790
4798
  {
4791
4799
  label: c("related"),
4792
4800
  icon: /* @__PURE__ */ i(or, {}),
4793
- items: p
4801
+ items: h
4794
4802
  }
4795
4803
  ];
4796
4804
  }, [c, e]);
@@ -4830,20 +4838,20 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4830
4838
  }
4831
4839
  )
4832
4840
  ] });
4833
- }, hr = (e) => {
4841
+ }, pr = (e) => {
4834
4842
  const { id: t, model: n, context: o = {} } = e, [r, s] = b(), [a, c] = b(), d = Z(
4835
4843
  ct
4836
4844
  ), { openRelate: f } = d || {}, u = Z(
4837
4845
  jt
4838
- ), { processAction: l } = u || {}, [p, h] = Ze(
4846
+ ), { processAction: l } = u || {}, [h, p] = Ze(
4839
4847
  k.getHandler().getView
4840
4848
  ), [m, g] = Ze(
4841
4849
  k.getHandler().readObjects
4842
4850
  ), w = X(() => {
4843
- h(), g();
4844
- }, [h, g]), y = X(async () => {
4851
+ p(), g();
4852
+ }, [p, g]), y = X(async () => {
4845
4853
  var V;
4846
- const T = await p({
4854
+ const T = await h({
4847
4855
  model: n,
4848
4856
  type: "form",
4849
4857
  context: o
@@ -4862,7 +4870,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4862
4870
  relateItems: T.toolbar.relate,
4863
4871
  printItems: T.toolbar.print
4864
4872
  };
4865
- }, [o, p, t, n, m]);
4873
+ }, [o, h, t, n, m]);
4866
4874
  if (!t)
4867
4875
  return null;
4868
4876
  function C({ item: T, type: R }) {
@@ -4922,20 +4930,20 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4922
4930
  const { m2oField: t } = e;
4923
4931
  return t ? /* @__PURE__ */ D(qe, { children: [
4924
4932
  /* @__PURE__ */ i(ie, { children: t.value }),
4925
- /* @__PURE__ */ i(hr, { id: t.id, model: t.model })
4933
+ /* @__PURE__ */ i(pr, { id: t.id, model: t.model })
4926
4934
  ] }) : /* @__PURE__ */ i(ie, {});
4927
4935
  }, ul = (e) => {
4928
4936
  const { value: t, context: n, selectionValues: o } = e, [r, s] = b(), [a, c] = b(!1), [d, f] = t ? t.split(",") : [], u = parseInt(f), l = X(async () => {
4929
4937
  if (!t || t && r)
4930
4938
  return;
4931
4939
  c(!0);
4932
- const h = await k.getHandler().execute({
4940
+ const p = await k.getHandler().execute({
4933
4941
  action: "name_get",
4934
4942
  payload: [u],
4935
4943
  model: d,
4936
4944
  context: n
4937
4945
  });
4938
- s(h[0][1]), c(!1);
4946
+ s(p[0][1]), c(!1);
4939
4947
  }, [t, r]);
4940
4948
  if (fe(() => {
4941
4949
  l();
@@ -4943,11 +4951,11 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4943
4951
  return /* @__PURE__ */ i(ie, {});
4944
4952
  if (a)
4945
4953
  return /* @__PURE__ */ i(ut, {});
4946
- const p = o.get(d);
4954
+ const h = o.get(d);
4947
4955
  return /* @__PURE__ */ D(qe, { children: [
4948
- /* @__PURE__ */ i(ie, { children: `${p}:` }),
4956
+ /* @__PURE__ */ i(ie, { children: `${h}:` }),
4949
4957
  /* @__PURE__ */ i(ie, { children: r }),
4950
- /* @__PURE__ */ i(hr, { id: u, model: d })
4958
+ /* @__PURE__ */ i(pr, { id: u, model: d })
4951
4959
  ] });
4952
4960
  }, fl = (e) => {
4953
4961
  const { ooui: t, value: n } = e;
@@ -4970,17 +4978,17 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4970
4978
  }
4971
4979
  }, Wo = (e) => {
4972
4980
  const { ooui: t, showTime: n = !1 } = e, { required: o } = t;
4973
- return /* @__PURE__ */ i(Ce, { required: o, ...e, children: /* @__PURE__ */ i(pl, { ooui: t, showTime: n }) });
4974
- }, pl = (e) => {
4981
+ return /* @__PURE__ */ i(Ce, { required: o, ...e, children: /* @__PURE__ */ i(hl, { ooui: t, showTime: n }) });
4982
+ }, hl = (e) => {
4975
4983
  const { value: t, onChange: n, ooui: o, showTime: r } = e, { id: s, readOnly: a, required: c } = o, { token: d } = ml(), f = c && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, u = r ? "time" : "date", l = (m) => {
4976
4984
  n == null || n(m);
4977
- }, p = (m) => {
4985
+ }, h = (m) => {
4978
4986
  if (m == null) {
4979
4987
  l(m);
4980
4988
  return;
4981
4989
  }
4982
4990
  l(m.format(mt[u].dateInternalFormat));
4983
- }, h = t ? nt(t, mt[u].dateInternalFormat) : void 0;
4991
+ }, p = t ? nt(t, mt[u].dateInternalFormat) : void 0;
4984
4992
  return /* @__PURE__ */ i(
4985
4993
  qn,
4986
4994
  {
@@ -4991,14 +4999,14 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
4991
4999
  picker: "date",
4992
5000
  showTime: r,
4993
5001
  format: mt[u].dateDisplayFormat,
4994
- value: h,
4995
- onChange: p,
5002
+ value: p,
5003
+ onChange: h,
4996
5004
  showNow: !1,
4997
5005
  showToday: !1,
4998
5006
  changeOnBlur: !0
4999
5007
  }
5000
5008
  );
5001
- }, hl = ({
5009
+ }, pl = ({
5002
5010
  value: e
5003
5011
  }) => Ie(
5004
5012
  () => /* @__PURE__ */ i(
@@ -5098,17 +5106,17 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5098
5106
  const [r, s] = b([]), [a, c] = b(!1), { relation: d, field: f } = n, u = X(async () => {
5099
5107
  try {
5100
5108
  c(!0);
5101
- const p = await k.getHandler().search({
5109
+ const h = await k.getHandler().search({
5102
5110
  model: d,
5103
- params: [["id", "in", e.items.map((h) => h.id)]],
5111
+ params: [["id", "in", e.items.map((p) => p.id)]],
5104
5112
  fields: [f],
5105
5113
  context: o
5106
5114
  });
5107
5115
  s(
5108
- p.map((h) => ({ id: h.id, name: h[f] }))
5116
+ h.map((p) => ({ id: p.id, name: p[f] }))
5109
5117
  );
5110
- } catch (p) {
5111
- console.error("Error loading data", p);
5118
+ } catch (h) {
5119
+ console.error("Error loading data", h);
5112
5120
  } finally {
5113
5121
  c(!1);
5114
5122
  }
@@ -5117,9 +5125,9 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5117
5125
  e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && u();
5118
5126
  }, [e == null ? void 0 : e.items]);
5119
5127
  const l = Ie(
5120
- () => r.map((p) => {
5121
- const { id: h, name: m } = p, g = Zt(m);
5122
- return /* @__PURE__ */ i(pr, { color: g, children: m }, `${h}`);
5128
+ () => r.map((h) => {
5129
+ const { id: p, name: m } = h, g = Zt(m);
5130
+ return /* @__PURE__ */ i(hr, { color: g, children: m }, `${p}`);
5123
5131
  }),
5124
5132
  [r]
5125
5133
  );
@@ -5135,7 +5143,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5135
5143
  }
5136
5144
  ), [l, a]);
5137
5145
  }, Go = {
5138
- boolean: hl,
5146
+ boolean: pl,
5139
5147
  many2one: gl,
5140
5148
  text: yl,
5141
5149
  one2many: Gr,
@@ -5152,7 +5160,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5152
5160
  datetime: vl,
5153
5161
  avatar: Fl,
5154
5162
  tags: Rl
5155
- }, Uo = ht(
5163
+ }, Uo = pt(
5156
5164
  (e, t) => {
5157
5165
  var ae;
5158
5166
  const {
@@ -5166,8 +5174,8 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5166
5174
  onRowClicked: f,
5167
5175
  showPagination: u = !0,
5168
5176
  selectedRowKeys: l = [],
5169
- onRowSelectionChange: p,
5170
- scrollY: h,
5177
+ onRowSelectionChange: h,
5178
+ scrollY: p,
5171
5179
  colorsForResults: m = {},
5172
5180
  statusForResults: g = {},
5173
5181
  onChangeSort: w,
@@ -5178,7 +5186,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5178
5186
  context: v,
5179
5187
  readonly: V,
5180
5188
  onSelectAllRecords: I
5181
- } = e, F = re(null), [x, _] = b([]), S = re(!1), [O, M] = b(), { t: A } = he(), G = re(o), B = Z(
5189
+ } = e, F = re(null), [x, _] = b([]), S = re(!1), [O, M] = b(), { t: A } = pe(), G = re(o), B = Z(
5182
5190
  rt
5183
5191
  ), { title: j = void 0, setTitle: K = void 0 } = (R ? B : {}) || {}, N = Ie(() => {
5184
5192
  if (O)
@@ -5261,7 +5269,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5261
5269
  }, [x, l, O]), z = Ie(() => {
5262
5270
  if (O !== null && N && N.length > 0)
5263
5271
  return nl(N, x, 600);
5264
- }, [N, x, O]), P = Ie(() => h && (O != null && O.columns.some((Q) => Q.sum !== void 0)) ? h - 30 : h, [h, O == null ? void 0 : O.columns]);
5272
+ }, [N, x, O]), P = Ie(() => p && (O != null && O.columns.some((Q) => Q.sum !== void 0)) ? p - 30 : p, [p, O == null ? void 0 : O.columns]);
5265
5273
  return O === null || !z || ((ae = z == null ? void 0 : z.columns) == null ? void 0 : ae.length) === 0 ? /* @__PURE__ */ i(Be, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(un, { children: [
5266
5274
  $,
5267
5275
  /* @__PURE__ */ i(
@@ -5282,7 +5290,7 @@ const sl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ko,
5282
5290
  return /* @__PURE__ */ i(Di, { color: g[Q.id] });
5283
5291
  } : void 0,
5284
5292
  onRowDoubleClick: f,
5285
- onRowSelectionChange: p,
5293
+ onRowSelectionChange: h,
5286
5294
  onChangeSort: w,
5287
5295
  sorter: y,
5288
5296
  readonly: V,
@@ -5314,8 +5322,8 @@ const Yo = (e) => {
5314
5322
  context: f,
5315
5323
  setActionViewTotalItems: u,
5316
5324
  treeView: l,
5317
- formView: p,
5318
- sorter: h,
5325
+ formView: h,
5326
+ sorter: p,
5319
5327
  setSorter: m,
5320
5328
  setCurrentItemIndex: g,
5321
5329
  setResultsActionView: w,
@@ -5341,8 +5349,8 @@ const Yo = (e) => {
5341
5349
  context: f
5342
5350
  });
5343
5351
  if (q(ce.length), u == null || u(ce.length), ce.length > 0) {
5344
- const Fe = ce.map((ee) => ee == null ? void 0 : ee[0]), { colors: pe, status: Re } = St(l), U = {};
5345
- pe && (U.colors = pe), Re && (U.status = Re);
5352
+ const Fe = ce.map((ee) => ee == null ? void 0 : ee[0]), { colors: he, status: Re } = St(l), U = {};
5353
+ he && (U.colors = he), Re && (U.status = Re);
5346
5354
  const Se = await k.getHandler().readEvalUiObjects({
5347
5355
  model: t,
5348
5356
  ids: Fe,
@@ -5352,10 +5360,10 @@ const Yo = (e) => {
5352
5360
  attrs: U
5353
5361
  }), Oe = Se[0];
5354
5362
  Q.current = [...Oe], E(Qt(Se[1])), P(kr(Se[1]));
5355
- const He = Oe.map((ee) => ee.id), Me = h !== void 0 ? kt({
5363
+ const He = Oe.map((ee) => ee.id), Me = p !== void 0 ? kt({
5356
5364
  resultsToSort: Oe,
5357
- sorter: h,
5358
- fields: { ...l.fields, ...p.fields }
5365
+ sorter: p,
5366
+ fields: { ...l.fields, ...h.fields }
5359
5367
  }) : [...Q.current];
5360
5368
  ve(Me), He.length > 0 ? g == null || g(0) : g == null || g(void 0);
5361
5369
  } else
@@ -5369,28 +5377,28 @@ const Yo = (e) => {
5369
5377
  f,
5370
5378
  C,
5371
5379
  l,
5372
- p,
5373
5380
  h,
5381
+ p,
5374
5382
  g,
5375
5383
  u
5376
5384
  ]), le = X(
5377
5385
  async (ce) => {
5378
- const { params: Fe, newOffset: pe } = ce || {}, Re = en(Fe || V, C), { colors: U, status: Se } = St(l), Oe = {};
5386
+ const { params: Fe, newOffset: he } = ce || {}, Re = en(Fe || V, C), { colors: U, status: Se } = St(l), Oe = {};
5379
5387
  U && (Oe.colors = U), Se && (Oe.status = Se);
5380
5388
  const { totalItems: He, results: Me, attrsEvaluated: ee } = await k.getHandler().searchForTree({
5381
5389
  params: Re,
5382
5390
  limit: ae.current,
5383
- offset: pe || j,
5391
+ offset: he || j,
5384
5392
  model: t,
5385
5393
  fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
5386
5394
  context: f,
5387
5395
  attrs: Oe
5388
5396
  });
5389
5397
  E(Qt(ee)), P(kr(ee)), Q.current = [...Me];
5390
- const xe = h !== void 0 ? kt({
5398
+ const xe = p !== void 0 ? kt({
5391
5399
  resultsToSort: Me,
5392
- sorter: h,
5393
- fields: { ...l.fields, ...p.fields }
5400
+ sorter: p,
5401
+ fields: { ...l.fields, ...h.fields }
5394
5402
  }) : [...Q.current];
5395
5403
  if (ve(xe), y && xe.length > 0) {
5396
5404
  const de = xe.findIndex(
@@ -5412,8 +5420,8 @@ const Yo = (e) => {
5412
5420
  f,
5413
5421
  C,
5414
5422
  l,
5415
- p,
5416
5423
  h,
5424
+ p,
5417
5425
  u,
5418
5426
  j,
5419
5427
  V
@@ -5439,28 +5447,28 @@ const Yo = (e) => {
5439
5447
  ]
5440
5448
  ), Ae = X(
5441
5449
  (ce) => {
5442
- if (JSON.stringify(ce) === JSON.stringify(h))
5450
+ if (JSON.stringify(ce) === JSON.stringify(p))
5443
5451
  return;
5444
5452
  m == null || m(ce);
5445
5453
  const Fe = ce !== void 0 ? kt({
5446
5454
  resultsToSort: se(),
5447
5455
  sorter: ce,
5448
- fields: { ...l.fields, ...p.fields }
5456
+ fields: { ...l.fields, ...h.fields }
5449
5457
  }) : [...Q.current];
5450
5458
  ve(Fe);
5451
5459
  },
5452
5460
  [
5453
- h,
5461
+ p,
5454
5462
  m,
5455
5463
  se,
5456
5464
  l == null ? void 0 : l.fields,
5457
- p == null ? void 0 : p.fields,
5465
+ h == null ? void 0 : h.fields,
5458
5466
  ve
5459
5467
  ]
5460
5468
  ), ke = X(
5461
5469
  (ce) => {
5462
- const { params: Fe, searchValues: pe, limit: Re, offset: U } = ce;
5463
- x || (n == null || n(void 0), o == null || o([]), I == null || I(pe), r == null || r(Fe), s == null || s(!1), O(!0), A(void 0), B(1), Re && (ae.current = Re, v == null || v(Re)), U && K(U), me({
5470
+ const { params: Fe, searchValues: he, limit: Re, offset: U } = ce;
5471
+ x || (n == null || n(void 0), o == null || o([]), I == null || I(he), r == null || r(Fe), s == null || s(!1), O(!0), A(void 0), B(1), Re && (ae.current = Re, v == null || v(Re)), U && K(U), me({
5464
5472
  params: Fe,
5465
5473
  newOffset: U
5466
5474
  }));
@@ -5491,13 +5499,13 @@ const Yo = (e) => {
5491
5499
  R
5492
5500
  ]), We = X(
5493
5501
  async (ce) => {
5494
- const Fe = ce[(l == null ? void 0 : l.field_parent) || "child_id"], pe = await k.getHandler().readObjects({
5502
+ const Fe = ce[(l == null ? void 0 : l.field_parent) || "child_id"], he = await k.getHandler().readObjects({
5495
5503
  model: t,
5496
5504
  ids: Fe,
5497
5505
  fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
5498
5506
  context: f
5499
5507
  });
5500
- return ve([...se(), ...pe]), dr(St(l), pe);
5508
+ return ve([...se(), ...he]), dr(St(l), he);
5501
5509
  },
5502
5510
  [l, t, f, se, ve]
5503
5511
  ), ye = X(async () => await k.getHandler().searchAllIds({
@@ -5539,8 +5547,8 @@ function Ol(e, t) {
5539
5547
  visible: f = !0,
5540
5548
  rootTree: u = !1,
5541
5549
  parentContext: l = {},
5542
- onChangeSelectedRowKeys: p
5543
- } = e, [h, m] = b(!1), [g, w] = b(!1), y = re(!1), C = re(null), [T, R] = b(), [v, V] = b(), [I, F] = b(), [x, _] = b(), [S, O] = b(200), M = re(), { height: A } = xn(), G = Z(
5550
+ onChangeSelectedRowKeys: h
5551
+ } = e, [p, m] = b(!1), [g, w] = b(!1), y = re(!1), C = re(null), [T, R] = b(), [v, V] = b(), [I, F] = b(), [x, _] = b(), [S, O] = b(200), M = re(), { height: A } = xn(), G = Z(
5544
5552
  jt
5545
5553
  ), { processAction: B } = G || {}, j = Z(
5546
5554
  rt
@@ -5566,15 +5574,15 @@ function Ol(e, t) {
5566
5574
  setLimit: _e = void 0
5567
5575
  } = (u ? j : {}) || {}, De = X(
5568
5576
  ($e) => {
5569
- $ == null || $($e.map((Ue) => ({ id: Ue }))), p == null || p($e);
5577
+ $ == null || $($e.map((Ue) => ({ id: Ue }))), h == null || h($e);
5570
5578
  },
5571
- [p, $]
5579
+ [h, $]
5572
5580
  ), {
5573
5581
  submit: We,
5574
5582
  clear: ye,
5575
5583
  fetchResults: ce,
5576
5584
  tableRefreshing: Fe,
5577
- searchFilterLoading: pe,
5585
+ searchFilterLoading: he,
5578
5586
  searchError: Re,
5579
5587
  page: U,
5580
5588
  limit: Se,
@@ -5695,8 +5703,8 @@ function Ol(e, t) {
5695
5703
  [T, I, s, Pe, v]
5696
5704
  ), ze = X(async () => {
5697
5705
  const $e = await W();
5698
- $ == null || $($e.map((Ue) => ({ id: Ue }))), p == null || p($e);
5699
- }, [W, p, $]), lt = Ie(() => v != null && v.isExpandable ? A - 160 : A - (S + 240), [A, S, v == null ? void 0 : v.isExpandable]), Ge = Ie(
5706
+ $ == null || $($e.map((Ue) => ({ id: Ue }))), h == null || h($e);
5707
+ }, [W, h, $]), lt = Ie(() => v != null && v.isExpandable ? A - 160 : A - (S + 240), [A, S, v == null ? void 0 : v.isExpandable]), Ge = Ie(
5700
5708
  () => Y == null ? void 0 : Y.map(($e) => $e.id),
5701
5709
  [Y]
5702
5710
  ), ft = X(() => !v || !I ? null : /* @__PURE__ */ D(ie, { children: [
@@ -5711,7 +5719,7 @@ function Ol(e, t) {
5711
5719
  onClear: ye,
5712
5720
  limit: ke,
5713
5721
  offset: Oe,
5714
- isSearching: pe,
5722
+ isSearching: he,
5715
5723
  onSubmit: We,
5716
5724
  onLimitChange: be,
5717
5725
  setSearchFilterHeight: O,
@@ -5765,7 +5773,7 @@ function Ol(e, t) {
5765
5773
  Me,
5766
5774
  u,
5767
5775
  Re,
5768
- pe,
5776
+ he,
5769
5777
  me,
5770
5778
  P,
5771
5779
  ze,
@@ -5778,9 +5786,9 @@ function Ol(e, t) {
5778
5786
  c,
5779
5787
  v
5780
5788
  ]), an = x || Re;
5781
- return an ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: an, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: f ? {} : { display: "none" }, children: h ? /* @__PURE__ */ i(Be, {}) : ft() });
5789
+ return an ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: an, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: f ? {} : { display: "none" }, children: p ? /* @__PURE__ */ i(Be, {}) : ft() });
5782
5790
  }
5783
- const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
5791
+ const qo = pt(Ol), { error: Vl } = tt, Pt = (e) => {
5784
5792
  Vl({
5785
5793
  title: "Error",
5786
5794
  icon: /* @__PURE__ */ i(vt, {}),
@@ -5799,7 +5807,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
5799
5807
  nameSearch: s,
5800
5808
  domain: a,
5801
5809
  context: c = {}
5802
- } = e, [d, f] = b(!1), { modalWidth: u, modalHeight: l } = xn(), { t: p } = he(), [h, m] = b([]), [g, w] = b(!1), y = X(
5810
+ } = e, [d, f] = b(!1), { modalWidth: u, modalHeight: l } = xn(), { t: h } = pe(), [p, m] = b([]), [g, w] = b(!1), y = X(
5803
5811
  async (V) => {
5804
5812
  w(!0);
5805
5813
  try {
@@ -5817,11 +5825,11 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
5817
5825
  y([I]);
5818
5826
  };
5819
5827
  function R() {
5820
- if (h.length === 0) {
5828
+ if (p.length === 0) {
5821
5829
  C();
5822
5830
  return;
5823
5831
  }
5824
- y(h);
5832
+ y(p);
5825
5833
  }
5826
5834
  const v = () => /* @__PURE__ */ D(ie, { children: [
5827
5835
  /* @__PURE__ */ i(
@@ -5846,7 +5854,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
5846
5854
  onClick: () => {
5847
5855
  f(!0);
5848
5856
  },
5849
- children: p("new")
5857
+ children: h("new")
5850
5858
  }
5851
5859
  ),
5852
5860
  /* @__PURE__ */ i(
@@ -5858,17 +5866,17 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
5858
5866
  R();
5859
5867
  },
5860
5868
  type: "primary",
5861
- children: p("ok")
5869
+ children: h("ok")
5862
5870
  }
5863
5871
  ),
5864
- /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(tn, {}), onClick: C, children: p("cancel") })
5872
+ /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(tn, {}), onClick: C, children: h("cancel") })
5865
5873
  ] }) })
5866
5874
  ] });
5867
5875
  return /* @__PURE__ */ D(ie, { children: [
5868
5876
  /* @__PURE__ */ i(
5869
5877
  tt,
5870
5878
  {
5871
- title: p("search"),
5879
+ title: h("search"),
5872
5880
  centered: !0,
5873
5881
  width: u,
5874
5882
  open: t && !d,
@@ -5913,7 +5921,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
5913
5921
  context: c,
5914
5922
  id: d,
5915
5923
  domain: f
5916
- } = o, u = r && !a ? { backgroundColor: zo.colorPrimaryBg } : void 0, [l, p] = b(!1), [h, m] = b(!1), [g, w] = b(!1), [y, C] = b(), T = re(!1), [R, v] = b(""), V = re(), I = Z(Le), { domain: F, getValues: x, getFields: _, getContext: S, elementHasLostFocus: O } = I || {}, M = re([]), [A, G] = b([]), B = t && t[0] || void 0, j = t && t[1] || "";
5924
+ } = o, u = r && !a ? { backgroundColor: zo.colorPrimaryBg } : void 0, [l, h] = b(!1), [p, m] = b(!1), [g, w] = b(!1), [y, C] = b(), T = re(!1), [R, v] = b(""), V = re(), I = Z(Le), { domain: F, getValues: x, getFields: _, getContext: S, elementHasLostFocus: O } = I || {}, M = re([]), [A, G] = b([]), B = t && t[0] || void 0, j = t && t[1] || "";
5917
5925
  fe(() => {
5918
5926
  !Array.isArray(t) && t && Y(t);
5919
5927
  }, [t]), fe(() => {
@@ -5955,10 +5963,10 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
5955
5963
  context: { ...S == null ? void 0 : S(), ...c },
5956
5964
  totalItems: 2
5957
5965
  });
5958
- ae.length === 1 ? Y(ae[0]) : (C(P), p(!0));
5966
+ ae.length === 1 ? Y(ae[0]) : (C(P), h(!0));
5959
5967
  return;
5960
5968
  }
5961
- C(P), p(!0);
5969
+ C(P), h(!0);
5962
5970
  }, Y = async (P) => {
5963
5971
  w(!0);
5964
5972
  try {
@@ -6010,7 +6018,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6010
6018
  onBlur: q,
6011
6019
  onKeyDown: E,
6012
6020
  suffix: /* @__PURE__ */ i(
6013
- hr,
6021
+ pr,
6014
6022
  {
6015
6023
  id: B,
6016
6024
  model: s,
@@ -6052,10 +6060,10 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6052
6060
  visible: l,
6053
6061
  nameSearch: B ? void 0 : y,
6054
6062
  onSelectValues: async (P) => {
6055
- p(!1), Y(P[0]), T.current = !1, V.current = void 0;
6063
+ h(!1), Y(P[0]), T.current = !1, V.current = void 0;
6056
6064
  },
6057
6065
  onCloseModal: () => {
6058
- p(!1), T.current = !1;
6066
+ h(!1), T.current = !1;
6059
6067
  }
6060
6068
  }
6061
6069
  ),
@@ -6065,7 +6073,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6065
6073
  model: s,
6066
6074
  parentContext: { ...S == null ? void 0 : S(), ...c },
6067
6075
  id: t && t[0],
6068
- visible: h,
6076
+ visible: p,
6069
6077
  onSubmitSucceed: (P) => {
6070
6078
  m(!1), Y(P);
6071
6079
  },
@@ -6116,11 +6124,11 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6116
6124
  try {
6117
6125
  await n();
6118
6126
  } finally {
6119
- d(!1), h();
6127
+ d(!1), p();
6120
6128
  }
6121
- }, p = () => {
6122
- h();
6123
6129
  }, h = () => {
6130
+ p();
6131
+ }, p = () => {
6124
6132
  u(!1);
6125
6133
  const g = document.querySelector("#confirm-modal-container");
6126
6134
  g && (yo(g).unmount(), g.remove());
@@ -6136,7 +6144,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6136
6144
  open: f,
6137
6145
  centered: a || !1,
6138
6146
  onOk: l,
6139
- onCancel: p,
6147
+ onCancel: h,
6140
6148
  confirmLoading: c,
6141
6149
  okText: r,
6142
6150
  cancelText: s,
@@ -6205,8 +6213,8 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6205
6213
  onPreviousItem: f,
6206
6214
  onNextItem: u,
6207
6215
  isMany2Many: l,
6208
- onSearchItem: p,
6209
- selectedRowKeys: h,
6216
+ onSearchItem: h,
6217
+ selectedRowKeys: p,
6210
6218
  showCreateButton: m,
6211
6219
  showToggleButton: g
6212
6220
  } = e, { token: w } = Pl();
@@ -6233,7 +6241,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6233
6241
  tooltip: l ? "Unlink" : "Delete",
6234
6242
  icon: l ? /* @__PURE__ */ i(zi, {}) : /* @__PURE__ */ i(ir, {}),
6235
6243
  onClick: a,
6236
- disabled: c === 0 || n || s !== "form" && h.length === 0
6244
+ disabled: c === 0 || n || s !== "form" && p.length === 0
6237
6245
  }
6238
6246
  );
6239
6247
  }
@@ -6289,7 +6297,7 @@ const qo = ht(Ol), { error: Vl } = tt, Pt = (e) => {
6289
6297
  tooltip: "Search existing item",
6290
6298
  icon: /* @__PURE__ */ i(tr, {}),
6291
6299
  disabled: n,
6292
- onClick: p
6300
+ onClick: h
6293
6301
  }
6294
6302
  )
6295
6303
  ] }),
@@ -6325,12 +6333,12 @@ const $l = (e) => {
6325
6333
  Gt
6326
6334
  ), u = Z(Le), {
6327
6335
  activeId: l,
6328
- getFields: p,
6329
- getValues: h,
6336
+ getFields: h,
6337
+ getValues: p,
6330
6338
  getContext: m,
6331
6339
  domain: g,
6332
6340
  fetchValues: w
6333
- } = u || {}, { t: y } = he(), [C, T] = b(!1), [R, v] = b(!1), [V, I] = b(), [F, x] = b(!1), [_, S] = b(!1), [O, M] = b(), [A, G] = b([]), [B, j] = b(!1), K = re([]), [N, q] = b(), ne = re(), [Y, $] = b(void 0), {
6341
+ } = u || {}, { t: y } = pe(), [C, T] = b(!1), [R, v] = b(!1), [V, I] = b(), [F, x] = b(!1), [_, S] = b(!1), [O, M] = b(), [A, G] = b([]), [B, j] = b(!1), K = re([]), [N, q] = b(), ne = re(), [Y, $] = b(void 0), {
6334
6342
  readOnly: E,
6335
6343
  relation: z,
6336
6344
  context: P,
@@ -6387,10 +6395,10 @@ const $l = (e) => {
6387
6395
  ae && (K.current = await k.getHandler().evalDomain({
6388
6396
  domain: ae,
6389
6397
  values: Rt({
6390
- fields: p(),
6391
- values: h()
6398
+ fields: h(),
6399
+ values: p()
6392
6400
  }),
6393
- fields: p(),
6401
+ fields: h(),
6394
6402
  context: m()
6395
6403
  })), g && g.length > 0 && (K.current = K.current.concat(
6396
6404
  Xn({
@@ -6438,7 +6446,7 @@ const $l = (e) => {
6438
6446
  ce(), W(), T(!1);
6439
6447
  }
6440
6448
  }) : W();
6441
- }, pe = () => {
6449
+ }, he = () => {
6442
6450
  if (Q) {
6443
6451
  Zo({
6444
6452
  t: y,
@@ -6646,7 +6654,7 @@ const $l = (e) => {
6646
6654
  formHasChanges: C,
6647
6655
  totalItems: se.length,
6648
6656
  currentItemIndex: d,
6649
- onDelete: pe,
6657
+ onDelete: he,
6650
6658
  onCreateItem: Re,
6651
6659
  onToggleViewMode: De,
6652
6660
  onPreviousItem: We,
@@ -6739,7 +6747,7 @@ const $l = (e) => {
6739
6747
  fe(() => {
6740
6748
  a.current = o;
6741
6749
  }, [o]);
6742
- const l = X(() => c ? [] : a.current, []), p = Ie(() => St(e), [e]);
6750
+ const l = X(() => c ? [] : a.current, []), h = Ie(() => St(e), [e]);
6743
6751
  return {
6744
6752
  onTreeFetchRows: Tt(
6745
6753
  async (m) => {
@@ -6749,15 +6757,15 @@ const $l = (e) => {
6749
6757
  arch: e.arch,
6750
6758
  fields: e.fields,
6751
6759
  context: n,
6752
- attrs: p.colors && {
6753
- colors: p.colors
6760
+ attrs: h.colors && {
6761
+ colors: h.colors
6754
6762
  }
6755
6763
  }), w = g[0], y = Qt(g[1]);
6756
6764
  return { results: w, colors: y };
6757
6765
  },
6758
- [n, t, p.colors, e]
6766
+ [n, t, h.colors, e]
6759
6767
  ),
6760
- treeOoui: p,
6768
+ treeOoui: h,
6761
6769
  setSelectedRowKeys: r,
6762
6770
  selectedRowKeys: o,
6763
6771
  onChangeFirstVisibleRowIndex: f,
@@ -6774,7 +6782,7 @@ const $l = (e) => {
6774
6782
  formView: r,
6775
6783
  triggerChange: s
6776
6784
  }) => {
6777
- const [a, c] = b(!1), { itemIndex: d } = Z(Gt), { t: f } = he();
6785
+ const [a, c] = b(!1), { itemIndex: d } = Z(Gt), { t: f } = pe();
6778
6786
  fe(() => {
6779
6787
  const m = e[d];
6780
6788
  (!m || (m == null ? void 0 : m.operation) === "original") && c(!1);
@@ -6805,7 +6813,7 @@ const $l = (e) => {
6805
6813
  c(!0), s(m);
6806
6814
  },
6807
6815
  [c, s]
6808
- ), p = X(async () => {
6816
+ ), h = X(async () => {
6809
6817
  const { id: m } = e[d];
6810
6818
  if (!m)
6811
6819
  return;
@@ -6818,11 +6826,11 @@ const $l = (e) => {
6818
6826
  a ? Bt({
6819
6827
  t: f,
6820
6828
  onOk: () => {
6821
- p(), m(), c(!1);
6829
+ h(), m(), c(!1);
6822
6830
  }
6823
6831
  }) : m();
6824
6832
  },
6825
- [a, p, c, f]
6833
+ [a, h, c, f]
6826
6834
  ),
6827
6835
  formHasChanges: a,
6828
6836
  setFormHasChanges: c,
@@ -6840,7 +6848,7 @@ const $l = (e) => {
6840
6848
  onChange: s
6841
6849
  }) => {
6842
6850
  var d, f;
6843
- const { itemIndex: a } = Z(Gt), { t: c } = he();
6851
+ const { itemIndex: a } = Z(Gt), { t: c } = pe();
6844
6852
  return t.length === 0 ? c("noCurrentEntries") : /* @__PURE__ */ i(
6845
6853
  Kt,
6846
6854
  {
@@ -6851,14 +6859,14 @@ const $l = (e) => {
6851
6859
  id: (f = t[a]) == null ? void 0 : f.id,
6852
6860
  submitMode: "values",
6853
6861
  onFieldsChange: (u) => {
6854
- var h;
6855
- const l = (h = t[a]) == null ? void 0 : h.id, p = t.map((m) => m.id === l ? {
6862
+ var p;
6863
+ const l = (p = t[a]) == null ? void 0 : p.id, h = t.map((m) => m.id === l ? {
6856
6864
  ...m,
6857
6865
  operation: m.operation === "original" ? "pendingUpdate" : m.operation,
6858
6866
  values: { ...u, id: l },
6859
6867
  treeValues: { ...u, id: l }
6860
6868
  } : m);
6861
- s(ba(p));
6869
+ s(ba(h));
6862
6870
  },
6863
6871
  readOnly: r
6864
6872
  }
@@ -6871,7 +6879,7 @@ const $l = (e) => {
6871
6879
  selectedRowKeys: r,
6872
6880
  setSelectedRowKeys: s
6873
6881
  }) => {
6874
- const { t: a } = he(), { currentView: c, itemIndex: d, setItemIndex: f } = Z(
6882
+ const { t: a } = pe(), { currentView: c, itemIndex: d, setItemIndex: f } = Z(
6875
6883
  Gt
6876
6884
  ), u = X(async () => {
6877
6885
  const m = Ul({
@@ -6911,20 +6919,20 @@ const $l = (e) => {
6911
6919
  Bn(m);
6912
6920
  }
6913
6921
  f(0);
6914
- }, [n, d, o, f, t]), p = X(async () => c === "form" ? await l() : await u(), [c, l, u]);
6922
+ }, [n, d, o, f, t]), h = X(async () => c === "form" ? await l() : await u(), [c, l, u]);
6915
6923
  return { showRemoveConfirm: X(() => {
6916
6924
  if (e) {
6917
6925
  Zo({
6918
6926
  t: a,
6919
- onOk: p
6927
+ onOk: h
6920
6928
  });
6921
6929
  return;
6922
6930
  }
6923
6931
  Qo({
6924
6932
  t: a,
6925
- onOk: p
6933
+ onOk: h
6926
6934
  });
6927
- }, [e, p, a]) };
6935
+ }, [e, h, a]) };
6928
6936
  };
6929
6937
  function Ul({
6930
6938
  selectedRowKeys: e,
@@ -6948,13 +6956,13 @@ const Yl = ({
6948
6956
  formView: f,
6949
6957
  context: u
6950
6958
  }) => {
6951
- const [l, p] = b(!1), [h, m] = b(), [g, w] = b(!1), y = X(async () => {
6959
+ const [l, h] = b(!1), [p, m] = b(), [g, w] = b(!1), y = X(async () => {
6952
6960
  let v;
6953
6961
  t && n && (v = { [t]: n }), e === "form" ? o(() => {
6954
- w(!0), m({ defaultValues: v }), p(!0);
6955
- }) : (w(!0), m({ defaultValues: v }), p(!0));
6962
+ w(!0), m({ defaultValues: v }), h(!0);
6963
+ }) : (w(!0), m({ defaultValues: v }), h(!0));
6956
6964
  }, [n, e, t, o]), C = X(() => {
6957
- p(!1), w(!1);
6965
+ h(!1), w(!1);
6958
6966
  }, []), T = Tt(
6959
6967
  (v, V, I, F = !1) => {
6960
6968
  let x;
@@ -6981,7 +6989,7 @@ const Yl = ({
6981
6989
  treeValues: { ...I, id: _ }
6982
6990
  });
6983
6991
  }
6984
- s(x), g || p(!1);
6992
+ s(x), g || h(!1);
6985
6993
  },
6986
6994
  [g, r, s]
6987
6995
  ), R = Tt(
@@ -6994,13 +7002,13 @@ const Yl = ({
6994
7002
  ids: [v.id],
6995
7003
  fields: f.fields,
6996
7004
  context: u
6997
- })), m(I.find((x) => x.id === V)), w(!1), p(!0);
7005
+ })), m(I.find((x) => x.id === V)), w(!1), h(!0);
6998
7006
  },
6999
7007
  [u, f.fields, r, d, a, c]
7000
7008
  );
7001
7009
  return {
7002
7010
  showFormModal: l,
7003
- modalItem: h,
7011
+ modalItem: p,
7004
7012
  continuousEntryMode: g,
7005
7013
  createItem: y,
7006
7014
  onCancelFormModal: C,
@@ -7023,8 +7031,8 @@ const Yl = ({
7023
7031
  }, u = X(() => {
7024
7032
  d(!1);
7025
7033
  }, []), l = Tt(
7026
- async (h) => {
7027
- const m = [...n], g = h.filter((w) => !n.find((y) => y.id === w));
7034
+ async (p) => {
7035
+ const m = [...n], g = p.filter((w) => !n.find((y) => y.id === w));
7028
7036
  try {
7029
7037
  (await k.getHandler().readObjects({
7030
7038
  model: a,
@@ -7053,9 +7061,9 @@ const Yl = ({
7053
7061
  }
7054
7062
  },
7055
7063
  [r, n, a, o, s]
7056
- ), p = X(
7057
- async (h) => {
7058
- await l(h), d(!1);
7064
+ ), h = X(
7065
+ async (p) => {
7066
+ await l(p), d(!1);
7059
7067
  },
7060
7068
  [l]
7061
7069
  );
@@ -7063,7 +7071,7 @@ const Yl = ({
7063
7071
  searchItem: f,
7064
7072
  showSearchModal: c,
7065
7073
  onCloseSearchModal: u,
7066
- onSelectSearchValues: p
7074
+ onSelectSearchValues: h
7067
7075
  };
7068
7076
  }, zl = (e) => {
7069
7077
  const t = Tt(() => {
@@ -7089,8 +7097,8 @@ const Yl = ({
7089
7097
  relation: f,
7090
7098
  onChangeFirstVisibleRowIndex: u,
7091
7099
  onGetFirstVisibleRowIndex: l,
7092
- onGetSelectedRowKeys: p,
7093
- onAllRowSelectedModeChange: h,
7100
+ onGetSelectedRowKeys: h,
7101
+ onAllRowSelectedModeChange: p,
7094
7102
  allRowSelectedMode: m,
7095
7103
  dataForHash: g
7096
7104
  }) => {
@@ -7148,9 +7156,9 @@ const Yl = ({
7148
7156
  onGetColumnsState: x,
7149
7157
  onChangeFirstVisibleRowIndex: u,
7150
7158
  onGetFirstVisibleRowIndex: l,
7151
- onGetSelectedRowKeys: p,
7159
+ onGetSelectedRowKeys: h,
7152
7160
  allRowSelectedMode: m,
7153
- onAllRowSelectedModeChange: h,
7161
+ onAllRowSelectedModeChange: p,
7154
7162
  totalRows: v
7155
7163
  }
7156
7164
  );
@@ -7159,8 +7167,8 @@ const Yl = ({
7159
7167
  const t = re(null), { value: n, onChange: o, ooui: r, views: s } = e, { items: a = [] } = n || {}, c = Kl({ one2manyItems: a }), { currentView: d, setCurrentView: f, itemIndex: u, setItemIndex: l } = Z(
7160
7168
  Gt
7161
7169
  ), {
7162
- readOnly: p,
7163
- relation: h,
7170
+ readOnly: h,
7171
+ relation: p,
7164
7172
  context: m,
7165
7173
  domain: g,
7166
7174
  id: w
@@ -7183,17 +7191,17 @@ const Yl = ({
7183
7191
  onChangeAllRowSelectedMode: j
7184
7192
  } = Bl({
7185
7193
  treeView: s.get("tree"),
7186
- relation: h,
7194
+ relation: p,
7187
7195
  context: I
7188
7196
  }), K = Ie(() => {
7189
- const { title: pe } = s.get(d) || {};
7190
- return pe || r.label;
7197
+ const { title: he } = s.get(d) || {};
7198
+ return he || r.label;
7191
7199
  }, [d, r.label, s]), N = r.type === "many2many", q = X(
7192
- (pe) => {
7200
+ (he) => {
7193
7201
  var Re, U;
7194
7202
  o == null || o({
7195
7203
  fields: ((Re = s.get("form")) == null ? void 0 : Re.fields) || ((U = s.get("tree")) == null ? void 0 : U.fields),
7196
- items: pe
7204
+ items: he
7197
7205
  });
7198
7206
  },
7199
7207
  [o, s]
@@ -7206,7 +7214,7 @@ const Yl = ({
7206
7214
  items: c,
7207
7215
  formView: s.get("form"),
7208
7216
  treeView: s.get("tree"),
7209
- relation: h,
7217
+ relation: p,
7210
7218
  context: I,
7211
7219
  triggerChange: q
7212
7220
  }), {
@@ -7227,7 +7235,7 @@ const Yl = ({
7227
7235
  setCurrentView: f,
7228
7236
  setItemIndex: l,
7229
7237
  context: I,
7230
- relation: h,
7238
+ relation: p,
7231
7239
  formView: s.get("form")
7232
7240
  }), {
7233
7241
  showSearchModal: le,
@@ -7241,7 +7249,7 @@ const Yl = ({
7241
7249
  items: c,
7242
7250
  views: s,
7243
7251
  context: I,
7244
- relation: h
7252
+ relation: p
7245
7253
  }), { showRemoveConfirm: _e } = Gl({
7246
7254
  isMany2many: N,
7247
7255
  items: c,
@@ -7250,14 +7258,14 @@ const Yl = ({
7250
7258
  selectedRowKeys: S,
7251
7259
  setSelectedRowKeys: O
7252
7260
  }), De = () => {
7253
- const pe = Array.from(s.keys()), Re = pe[(pe.indexOf(d) + 1) % pe.length];
7261
+ const he = Array.from(s.keys()), Re = he[(he.indexOf(d) + 1) % he.length];
7254
7262
  d === "form" ? $(() => {
7255
7263
  f(Re);
7256
7264
  }) : f(Re);
7257
7265
  }, We = Tt(
7258
- (pe) => {
7266
+ (he) => {
7259
7267
  var Re;
7260
- (Re = s.get("form")) != null && Re.fields && J(pe);
7268
+ (Re = s.get("form")) != null && Re.fields && J(he);
7261
7269
  },
7262
7270
  // eslint-disable-next-line react-hooks/exhaustive-deps
7263
7271
  [c]
@@ -7266,8 +7274,8 @@ const Yl = ({
7266
7274
  l(u - 1);
7267
7275
  }) : l(u - 1));
7268
7276
  }, [d, u, l, $]), ce = X(() => {
7269
- const pe = c.length;
7270
- u < pe - 1 && (d === "form" ? $(() => {
7277
+ const he = c.length;
7278
+ u < he - 1 && (d === "form" ? $(() => {
7271
7279
  l(u + 1);
7272
7280
  }) : l(u + 1));
7273
7281
  }, [
@@ -7283,7 +7291,7 @@ const Yl = ({
7283
7291
  {
7284
7292
  mode: d,
7285
7293
  title: K,
7286
- readOnly: p || !1,
7294
+ readOnly: h || !1,
7287
7295
  isMany2Many: N,
7288
7296
  formHasChanges: ne,
7289
7297
  totalItems: c.length,
@@ -7304,13 +7312,13 @@ const Yl = ({
7304
7312
  {
7305
7313
  gridRef: t,
7306
7314
  items: c,
7307
- readOnly: p || !1,
7315
+ readOnly: h || !1,
7308
7316
  onFetchRecords: _,
7309
7317
  ooui: x,
7310
7318
  context: I,
7311
7319
  onRowDoubleClick: We,
7312
7320
  onRowSelectionChange: O,
7313
- relation: h,
7321
+ relation: p,
7314
7322
  onChangeFirstVisibleRowIndex: M,
7315
7323
  onGetFirstVisibleRowIndex: A,
7316
7324
  onGetSelectedRowKeys: G,
@@ -7329,8 +7337,8 @@ const Yl = ({
7329
7337
  items: c,
7330
7338
  formView: s.get("form"),
7331
7339
  context: I,
7332
- relation: h,
7333
- readOnly: p || !1,
7340
+ relation: p,
7341
+ readOnly: h || !1,
7334
7342
  onChange: Y
7335
7343
  }
7336
7344
  ),
@@ -7338,7 +7346,7 @@ const Yl = ({
7338
7346
  Wt,
7339
7347
  {
7340
7348
  formView: s.get("form"),
7341
- model: h,
7349
+ model: p,
7342
7350
  id: P == null ? void 0 : P.id,
7343
7351
  submitMode: "2many",
7344
7352
  values: P == null ? void 0 : P.values,
@@ -7347,7 +7355,7 @@ const Yl = ({
7347
7355
  onSubmitSucceed: ve,
7348
7356
  parentContext: I,
7349
7357
  onCancel: Q,
7350
- readOnly: p,
7358
+ readOnly: h,
7351
7359
  mustClearAfterSave: ae,
7352
7360
  onMustRefreshParent: () => {
7353
7361
  R == null || R({ forceRefresh: !0 });
@@ -7358,7 +7366,7 @@ const Yl = ({
7358
7366
  gr,
7359
7367
  {
7360
7368
  domain: F,
7361
- model: h,
7369
+ model: p,
7362
7370
  context: I,
7363
7371
  visible: le,
7364
7372
  onSelectValues: me,
@@ -7369,7 +7377,7 @@ const Yl = ({
7369
7377
  Ht,
7370
7378
  {
7371
7379
  view_id: s.get("graph").view_id,
7372
- model: h,
7380
+ model: p,
7373
7381
  domain: [[`${r.inv_field}`, "=", C]],
7374
7382
  context: I,
7375
7383
  limit: 0
@@ -7384,7 +7392,7 @@ const Yl = ({
7384
7392
  var v;
7385
7393
  const { ooui: t } = e, { mode: n, relation: o, views: r, required: s, context: a } = t;
7386
7394
  let c;
7387
- const [d, f] = b(!0), [u, l] = b(), [p, h] = b(/* @__PURE__ */ new Map()), m = Z(Le), { getContext: g, formView: w } = m || {}, { view_id: y } = w || {};
7395
+ const [d, f] = b(!0), [u, l] = b(), [h, p] = b(/* @__PURE__ */ new Map()), m = Z(Le), { getContext: g, formView: w } = m || {}, { view_id: y } = w || {};
7388
7396
  bt(() => {
7389
7397
  T();
7390
7398
  }, [t]);
@@ -7398,12 +7406,12 @@ const Yl = ({
7398
7406
  if (n && n.length > 0) {
7399
7407
  for (const V of n) {
7400
7408
  const I = await C(V);
7401
- p.set(V, I);
7409
+ h.set(V, I);
7402
7410
  }
7403
- h(p);
7411
+ p(h);
7404
7412
  } else {
7405
7413
  const V = await C("form"), I = await C("tree");
7406
- p.set("form", V), p.set("tree", I), h(p);
7414
+ h.set("form", V), h.set("tree", I), p(h);
7407
7415
  }
7408
7416
  } catch (V) {
7409
7417
  l(JSON.stringify(V));
@@ -7431,18 +7439,18 @@ const Yl = ({
7431
7439
  Zl,
7432
7440
  {
7433
7441
  ooui: t,
7434
- views: p,
7442
+ views: h,
7435
7443
  parentViewId: y,
7436
- treeViewId: (v = p.get("tree")) == null ? void 0 : v.view_id
7444
+ treeViewId: (v = h.get("tree")) == null ? void 0 : v.view_id
7437
7445
  }
7438
- ) : /* @__PURE__ */ i($l, { ooui: t, views: p })
7446
+ ) : /* @__PURE__ */ i($l, { ooui: t, views: h })
7439
7447
  }
7440
7448
  ) });
7441
7449
  }, { useToken: td } = je, nd = (e) => {
7442
7450
  const { ooui: t } = e, { required: n } = t;
7443
7451
  return /* @__PURE__ */ i(Ce, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(rd, { ooui: t }) });
7444
7452
  }, rd = (e) => {
7445
- const { ooui: t, value: n, onChange: o } = e, { id: r, readOnly: s, required: a } = t, { token: c } = td(), d = a && !s ? { backgroundColor: c.colorPrimaryBg } : void 0, f = re(), [u, l] = b(), p = Z(Le), { elementHasLostFocus: h } = p || {};
7453
+ const { ooui: t, value: n, onChange: o } = e, { id: r, readOnly: s, required: a } = t, { token: c } = td(), d = a && !s ? { backgroundColor: c.colorPrimaryBg } : void 0, f = re(), [u, l] = b(), h = Z(Le), { elementHasLostFocus: p } = h || {};
7446
7454
  fe(() => {
7447
7455
  l(jo(n));
7448
7456
  }, [n]);
@@ -7453,7 +7461,7 @@ const Yl = ({
7453
7461
  f.current = y.target.value, l(y.target.value);
7454
7462
  }
7455
7463
  async function w() {
7456
- m(il(u)), await new Promise((y) => setTimeout(y, 300)), h == null || h();
7464
+ m(il(u)), await new Promise((y) => setTimeout(y, 300)), p == null || p();
7457
7465
  }
7458
7466
  return /* @__PURE__ */ i(
7459
7467
  st,
@@ -7531,6 +7539,8 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7531
7539
  minHeight: s ? s + "px" : "100%",
7532
7540
  ...d
7533
7541
  },
7542
+ maxLength: t.size,
7543
+ showCount: t.showCount,
7534
7544
  rows: 4,
7535
7545
  onBlur: u
7536
7546
  }
@@ -7548,17 +7558,17 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7548
7558
  fetchValues: d,
7549
7559
  formHasChanges: f,
7550
7560
  elementHasLostFocus: u
7551
- } = s || {}, [l, p] = b(!1), { t: h } = he();
7561
+ } = s || {}, [l, h] = b(!1), { t: p } = pe();
7552
7562
  return a ? /* @__PURE__ */ D(ie, { children: [
7553
7563
  /* @__PURE__ */ i(
7554
7564
  "div",
7555
7565
  {
7556
7566
  onClick: () => {
7557
7567
  if (f != null && f()) {
7558
- pt(h("saveBeforeTranslate"));
7568
+ ht(p("saveBeforeTranslate"));
7559
7569
  return;
7560
7570
  }
7561
- l || p(!0);
7571
+ l || h(!0);
7562
7572
  },
7563
7573
  children: /* @__PURE__ */ i(
7564
7574
  jn,
@@ -7589,10 +7599,10 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7589
7599
  field: t,
7590
7600
  visible: l,
7591
7601
  onCloseModal: () => {
7592
- p(!1);
7602
+ h(!1);
7593
7603
  },
7594
7604
  onSubmitSucceed: () => {
7595
- p(!1), d == null || d();
7605
+ h(!1), d == null || d();
7596
7606
  }
7597
7607
  }
7598
7608
  )
@@ -7616,12 +7626,12 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7616
7626
  /* @__PURE__ */ i(Ve, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ i(
7617
7627
  Xe,
7618
7628
  {
7619
- tooltip: h("translate"),
7629
+ tooltip: p("translate"),
7620
7630
  icon: /* @__PURE__ */ i(lo, {}),
7621
7631
  onClick: async () => {
7622
- f != null && f() ? pt(h("saveBeforeTranslate")) : pt(h("enterTextBeforeTranslate"));
7632
+ f != null && f() ? ht(p("saveBeforeTranslate")) : ht(p("enterTextBeforeTranslate"));
7623
7633
  },
7624
- children: h("translate")
7634
+ children: p("translate")
7625
7635
  }
7626
7636
  ) })
7627
7637
  ] });
@@ -7639,10 +7649,10 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7639
7649
  limit: r,
7640
7650
  onClose: s
7641
7651
  }) => {
7642
- const a = re({}), c = re(/* @__PURE__ */ new Map()), { t: d } = he(), f = X(
7652
+ const a = re({}), c = re(/* @__PURE__ */ new Map()), { t: d } = pe(), f = X(
7643
7653
  async (w) => {
7644
7654
  if (w.selectedKeys === void 0 || w.selectedKeys.length === 0) {
7645
- pt(d("selectAtLeastOneField"));
7655
+ ht(d("selectAtLeastOneField"));
7646
7656
  return;
7647
7657
  }
7648
7658
  let y = o;
@@ -7690,8 +7700,8 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7690
7700
  });
7691
7701
  },
7692
7702
  [t]
7693
- ), p = X(async () => {
7694
- const w = await md({ model: e, context: t }), y = await hd({
7703
+ ), h = X(async () => {
7704
+ const w = await md({ model: e, context: t }), y = await pd({
7695
7705
  predefinedExports: w,
7696
7706
  fields: a.current,
7697
7707
  onGetFieldChilds: l
@@ -7711,7 +7721,7 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7711
7721
  })),
7712
7722
  keysWithChilds: y
7713
7723
  };
7714
- }, [t, e, l]), h = X(
7724
+ }, [t, e, l]), p = X(
7715
7725
  async (w) => {
7716
7726
  await k.getHandler().deleteObjects({
7717
7727
  model: "ir.exports",
@@ -7761,9 +7771,9 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7761
7771
  onGetFields: u,
7762
7772
  onGetFieldChilds: l,
7763
7773
  onExport: f,
7764
- onGetPredefinedExports: p,
7774
+ onGetPredefinedExports: h,
7765
7775
  onSavePredefinedExport: g,
7766
- onRemovePredefinedExport: h
7776
+ onRemovePredefinedExport: p
7767
7777
  };
7768
7778
  }, qr = ({
7769
7779
  fields: e,
@@ -7815,7 +7825,7 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7815
7825
  key: r.find((d) => d.id === a).name
7816
7826
  }))
7817
7827
  }));
7818
- }, pd = ({
7828
+ }, hd = ({
7819
7829
  fields: e,
7820
7830
  keys: t
7821
7831
  }) => yd([
@@ -7825,14 +7835,14 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7825
7835
  return n.indexOf("/") === -1 ? !((o = e["/"]) != null && o[n]) : !((r = e == null ? void 0 : e[Kn(n)]) != null && r[n]);
7826
7836
  }).map((n) => Kn(n))
7827
7837
  )
7828
- ]), hd = async ({
7838
+ ]), pd = async ({
7829
7839
  predefinedExports: e,
7830
7840
  fields: t,
7831
7841
  onGetFieldChilds: n
7832
7842
  }) => {
7833
7843
  const o = e.flatMap(
7834
7844
  (a) => a.fields.map((c) => c.key)
7835
- ), r = pd({
7845
+ ), r = hd({
7836
7846
  fields: t,
7837
7847
  keys: o
7838
7848
  }), s = [];
@@ -7880,8 +7890,8 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7880
7890
  } = e, {
7881
7891
  onExport: u,
7882
7892
  onGetFieldChilds: l,
7883
- onGetFields: p,
7884
- onGetPredefinedExports: h,
7893
+ onGetFields: h,
7894
+ onGetPredefinedExports: p,
7885
7895
  onSavePredefinedExport: m,
7886
7896
  onRemovePredefinedExport: g
7887
7897
  } = dd({
@@ -7901,9 +7911,9 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7901
7911
  selectedRegistersToExport: s && s.length && s.length > 0 ? s.length : void 0,
7902
7912
  totalRegisters: a,
7903
7913
  onGetFieldChilds: l,
7904
- onGetFields: p,
7914
+ onGetFields: h,
7905
7915
  visibleRegisters: f,
7906
- onGetPredefinedExports: h,
7916
+ onGetPredefinedExports: p,
7907
7917
  onSavePredefinedExport: m,
7908
7918
  onRemovePredefinedExport: g
7909
7919
  }
@@ -7930,14 +7940,14 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7930
7940
  const { ooui: t } = e, { required: n } = t;
7931
7941
  return /* @__PURE__ */ i(Ce, { required: n, ...e, children: /* @__PURE__ */ i(Td, { ooui: t }) });
7932
7942
  }, Td = (e) => {
7933
- const { value: t, onChange: n, ooui: o } = e, { required: r, selectionValues: s, readOnly: a, domain: c } = o, d = t == null ? void 0 : t.split(","), [f, u] = b([]), [l, p] = b();
7943
+ const { value: t, onChange: n, ooui: o } = e, { required: r, selectionValues: s, readOnly: a, domain: c } = o, d = t == null ? void 0 : t.split(","), [f, u] = b([]), [l, h] = b();
7934
7944
  return fe(() => {
7935
7945
  if (!t) {
7936
- p(void 0), u([]);
7946
+ h(void 0), u([]);
7937
7947
  return;
7938
7948
  }
7939
- const h = t && d && d[0], m = t && d && d[1] && parseInt(d[1]);
7940
- u([m, void 0]), p(h);
7949
+ const p = t && d && d[0], m = t && d && d[1] && parseInt(d[1]);
7950
+ u([m, void 0]), h(p);
7941
7951
  }, [t]), /* @__PURE__ */ D(Ve, { gutter: 8, wrap: !1, children: [
7942
7952
  /* @__PURE__ */ i(ge, { flex: "1", children: /* @__PURE__ */ i(
7943
7953
  So,
@@ -7948,11 +7958,11 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7948
7958
  readonly: a,
7949
7959
  required: r
7950
7960
  }),
7951
- onChange: (h) => {
7952
- p(h);
7961
+ onChange: (p) => {
7962
+ h(p);
7953
7963
  let m = f[0] || 0;
7954
- h !== l && (u([]), m = 0);
7955
- const g = `${h},${m}`;
7964
+ p !== l && (u([]), m = 0);
7965
+ const g = `${p},${m}`;
7956
7966
  g !== t && (n == null || n(g));
7957
7967
  },
7958
7968
  value: l
@@ -7969,9 +7979,9 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7969
7979
  domain: c
7970
7980
  }),
7971
7981
  value: f,
7972
- onChange: (h) => {
7973
- u(h);
7974
- const m = `${l},${h[0] || 0}`;
7982
+ onChange: (p) => {
7983
+ u(p);
7984
+ const m = `${l},${p[0] || 0}`;
7975
7985
  m !== t && (n == null || n(m));
7976
7986
  }
7977
7987
  }
@@ -7981,7 +7991,7 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
7981
7991
  const { ooui: t } = e, { required: n } = t;
7982
7992
  return /* @__PURE__ */ i(Ce, { required: n, ...e, children: /* @__PURE__ */ i(Rd, { ooui: t }) });
7983
7993
  }, Rd = (e) => {
7984
- const { ooui: t, value: n, onChange: o } = e, { readOnly: r, required: s, filenameField: a } = t, { token: c } = Id(), d = s && !r ? { backgroundColor: c.colorPrimaryBg } : void 0, f = re(null), { setFieldValue: u, getFieldValue: l } = Z(Le) || {}, { t: p } = he(), h = n ? ua(n) : "", m = (T) => {
7994
+ const { ooui: t, value: n, onChange: o } = e, { readOnly: r, required: s, filenameField: a } = t, { token: c } = Id(), d = s && !r ? { backgroundColor: c.colorPrimaryBg } : void 0, f = re(null), { setFieldValue: u, getFieldValue: l } = Z(Le) || {}, { t: h } = pe(), p = n ? ua(n) : "", m = (T) => {
7985
7995
  o == null || o(T);
7986
7996
  };
7987
7997
  async function g() {
@@ -8018,7 +8028,7 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
8018
8028
  type: "text",
8019
8029
  disabled: !0,
8020
8030
  style: d,
8021
- value: h
8031
+ value: p
8022
8032
  }
8023
8033
  )
8024
8034
  ] }),
@@ -8034,11 +8044,11 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
8034
8044
  children: "Select"
8035
8045
  }
8036
8046
  ),
8037
- /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(Ji, {}), disabled: !n, onClick: w, children: p("open") }),
8047
+ /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(Ji, {}), disabled: !n, onClick: w, children: h("open") }),
8038
8048
  /* @__PURE__ */ i(
8039
8049
  Xe,
8040
8050
  {
8041
- tooltip: p("download"),
8051
+ tooltip: h("download"),
8042
8052
  disabled: !n,
8043
8053
  onClick: g,
8044
8054
  icon: /* @__PURE__ */ i(Zn, {})
@@ -8047,7 +8057,7 @@ const { useToken: sd } = je, { TextArea: jn } = st, ad = (e) => {
8047
8057
  /* @__PURE__ */ i(
8048
8058
  Xe,
8049
8059
  {
8050
- tooltip: p("clear"),
8060
+ tooltip: h("clear"),
8051
8061
  disabled: r || !n,
8052
8062
  onClick: C,
8053
8063
  icon: /* @__PURE__ */ i(er, {})
@@ -8072,14 +8082,14 @@ function yr(e) {
8072
8082
  disabled: r = !1,
8073
8083
  formHasChanges: s = !1,
8074
8084
  previousView: a
8075
- } = e, { t: c } = he(), d = Ie(() => [
8085
+ } = e, { t: c } = pe(), d = Ie(() => [
8076
8086
  {
8077
8087
  label: c("viewAs"),
8078
- items: n.map((l, p) => {
8079
- const h = l.type.charAt(0).toUpperCase() + l.type.slice(1);
8088
+ items: n.map((l, h) => {
8089
+ const p = l.type.charAt(0).toUpperCase() + l.type.slice(1);
8080
8090
  return {
8081
- id: l.view_id || p,
8082
- name: l.title || h,
8091
+ id: l.view_id || h,
8092
+ name: l.title || p,
8083
8093
  icon: zr(l),
8084
8094
  selected: t.view_id === l.view_id
8085
8095
  };
@@ -8100,10 +8110,10 @@ function yr(e) {
8100
8110
  }
8101
8111
  function u(l) {
8102
8112
  f(() => {
8103
- const p = n.find(
8104
- (h) => h.view_id === parseInt(l.id)
8113
+ const h = n.find(
8114
+ (p) => p.view_id === parseInt(l.id)
8105
8115
  );
8106
- o(p);
8116
+ o(h);
8107
8117
  });
8108
8118
  }
8109
8119
  return /* @__PURE__ */ D("div", { style: { display: "flex" }, children: [
@@ -8173,7 +8183,7 @@ function Je(e) {
8173
8183
  function ri(e) {
8174
8184
  const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: o } = Z(
8175
8185
  rt
8176
- ), { t: r } = he(), s = () => {
8186
+ ), { t: r } = pe(), s = () => {
8177
8187
  if (n) {
8178
8188
  Bt({
8179
8189
  t: r,
@@ -8216,7 +8226,7 @@ async function oi(e, t, n) {
8216
8226
  model: e,
8217
8227
  ids: [t]
8218
8228
  }))[0], { create_date: r, create_uid: s, id: a, write_date: c, write_uid: d } = o;
8219
- pt(
8229
+ ht(
8220
8230
  /* @__PURE__ */ D("div", { children: [
8221
8231
  "ID: " + a,
8222
8232
  " ",
@@ -8243,7 +8253,7 @@ const _d = (e) => {
8243
8253
  onOpenAttachmentLink: s,
8244
8254
  onOpenAttachmentDetail: a,
8245
8255
  onListAllAttachments: c
8246
- } = e, { t: d } = he(), f = re(null), u = /* @__PURE__ */ D(Ne, { children: [
8256
+ } = e, { t: d } = pe(), f = re(null), u = /* @__PURE__ */ D(Ne, { children: [
8247
8257
  /* @__PURE__ */ i(Rr, {}),
8248
8258
  `(${t})`,
8249
8259
  /* @__PURE__ */ i(yn, { style: { fontSize: 12 } })
@@ -8255,13 +8265,13 @@ const _d = (e) => {
8255
8265
  onRetrieveData: async () => [
8256
8266
  {
8257
8267
  items: n.map((l) => {
8258
- const p = l.link ? Rr : Zn, h = /* @__PURE__ */ D(Ve, { wrap: !1, align: "middle", gutter: 8, children: [
8268
+ const h = l.link ? Rr : Zn, p = /* @__PURE__ */ D(Ve, { wrap: !1, align: "middle", gutter: 8, children: [
8259
8269
  /* @__PURE__ */ i(ge, { style: { textAlign: "center" }, children: (l.datas_fname || l.link) && /* @__PURE__ */ i(
8260
8270
  wt,
8261
8271
  {
8262
8272
  title: l.link ? d("openAttachmentLink") : d("download"),
8263
8273
  children: /* @__PURE__ */ i(
8264
- p,
8274
+ h,
8265
8275
  {
8266
8276
  style: { cursor: "pointer" },
8267
8277
  onClick: () => {
@@ -8287,7 +8297,7 @@ const _d = (e) => {
8287
8297
  id: l.id,
8288
8298
  name: l.name,
8289
8299
  disableClick: !0,
8290
- right: h
8300
+ right: p
8291
8301
  };
8292
8302
  })
8293
8303
  }
@@ -8339,7 +8349,7 @@ function Ad(e) {
8339
8349
  onAddNewAttachment: o,
8340
8350
  onListAllAttachments: r,
8341
8351
  onViewAttachmentDetails: s
8342
- } = e, { formRef: a } = Z(rt), [c, d] = b(!1), [f, u] = b([]), [l, p] = b(!1), { t: h } = he(), m = X(async () => {
8352
+ } = e, { formRef: a } = Z(rt), [c, d] = b(!1), [f, u] = b([]), [l, h] = b(!1), { t: p } = pe(), m = X(async () => {
8343
8353
  if (!(!t || t.length === 0)) {
8344
8354
  d(!0);
8345
8355
  try {
@@ -8368,7 +8378,7 @@ function Ad(e) {
8368
8378
  window.open(y.link);
8369
8379
  return;
8370
8380
  }
8371
- p(!0);
8381
+ h(!0);
8372
8382
  let C;
8373
8383
  try {
8374
8384
  C = (await k.getHandler().readObjects({
@@ -8379,7 +8389,7 @@ function Ad(e) {
8379
8389
  } catch (T) {
8380
8390
  et(T);
8381
8391
  }
8382
- if (p(!1), !!C)
8392
+ if (h(!1), !!C)
8383
8393
  if (C.datas) {
8384
8394
  const T = await Mt(C.datas);
8385
8395
  Sn(C.datas, T.mime);
@@ -8412,7 +8422,7 @@ function Ad(e) {
8412
8422
  /* @__PURE__ */ i(
8413
8423
  tt,
8414
8424
  {
8415
- title: h("downloadingAttachment"),
8425
+ title: p("downloadingAttachment"),
8416
8426
  open: l,
8417
8427
  footer: null,
8418
8428
  closable: !1,
@@ -8436,8 +8446,8 @@ function Dd({ toolbar: e }) {
8436
8446
  setCurrentItemIndex: f,
8437
8447
  currentItemIndex: u,
8438
8448
  setCurrentId: l,
8439
- currentModel: p,
8440
- setRemovingItem: h,
8449
+ currentModel: h,
8450
+ setRemovingItem: p,
8441
8451
  removingItem: m,
8442
8452
  duplicatingItem: g,
8443
8453
  setDuplicatingItem: w,
@@ -8449,7 +8459,7 @@ function Dd({ toolbar: e }) {
8449
8459
  previousView: V,
8450
8460
  setPreviousView: I,
8451
8461
  goToResourceId: F
8452
- } = Z(rt), { t: x } = he(), _ = Z(
8462
+ } = Z(rt), { t: x } = pe(), _ = Z(
8453
8463
  jt
8454
8464
  ), { processAction: S } = _ || {}, O = Z(
8455
8465
  ct
@@ -8495,8 +8505,8 @@ function Dd({ toolbar: e }) {
8495
8505
  }
8496
8506
  async function q() {
8497
8507
  try {
8498
- h == null || h(!0), await k.getHandler().deleteObjects({
8499
- model: p,
8508
+ p == null || p(!0), await k.getHandler().deleteObjects({
8509
+ model: h,
8500
8510
  ids: [c],
8501
8511
  context: R.current.getContext()
8502
8512
  });
@@ -8507,7 +8517,7 @@ function Dd({ toolbar: e }) {
8507
8517
  } catch (E) {
8508
8518
  Pt(JSON.stringify(E));
8509
8519
  } finally {
8510
- h == null || h(!1);
8520
+ p == null || p(!1);
8511
8521
  }
8512
8522
  }
8513
8523
  async function ne() {
@@ -8515,7 +8525,7 @@ function Dd({ toolbar: e }) {
8515
8525
  w == null || w(!0);
8516
8526
  const E = await k.getHandler().duplicate({
8517
8527
  id: c,
8518
- model: p,
8528
+ model: h,
8519
8529
  context: R.current.getContext()
8520
8530
  });
8521
8531
  E && await (F == null ? void 0 : F([E]));
@@ -8588,7 +8598,7 @@ function Dd({ toolbar: e }) {
8588
8598
  disabled: a || c === void 0 || m || g || C,
8589
8599
  loading: !1,
8590
8600
  onClick: () => {
8591
- oi(p, c, x);
8601
+ oi(h, c, x);
8592
8602
  }
8593
8603
  }
8594
8604
  ),
@@ -8724,7 +8734,7 @@ function Dd({ toolbar: e }) {
8724
8734
  return;
8725
8735
  const z = E.currentId;
8726
8736
  A({
8727
- ...Jr(p, z),
8737
+ ...Jr(h, z),
8728
8738
  initialViewType: "form"
8729
8739
  });
8730
8740
  },
@@ -8736,7 +8746,7 @@ function Dd({ toolbar: e }) {
8736
8746
  return;
8737
8747
  const z = E.currentId;
8738
8748
  A({
8739
- ...Jr(p, z),
8749
+ ...Jr(h, z),
8740
8750
  initialViewType: "tree"
8741
8751
  });
8742
8752
  },
@@ -8779,15 +8789,15 @@ function Jr(e, t) {
8779
8789
  };
8780
8790
  }
8781
8791
  const { useToken: Ed } = je, ii = (e) => {
8782
- const { ooui: t, value: n, onChange: o, valueValidator: r, linkPrefix: s = "" } = e, { id: a, readOnly: c, required: d } = t, { token: f } = Ed(), u = d && !c ? { backgroundColor: f.colorPrimaryBg } : void 0, l = Z(Le), { elementHasLostFocus: p } = l || {}, [h, m] = b(!1), [g, w] = b(!1);
8792
+ const { ooui: t, value: n, onChange: o, valueValidator: r, linkPrefix: s = "" } = e, { id: a, readOnly: c, required: d } = t, { token: f } = Ed(), u = d && !c ? { backgroundColor: f.colorPrimaryBg } : void 0, l = Z(Le), { elementHasLostFocus: h } = l || {}, [p, m] = b(!1), [g, w] = b(!1);
8783
8793
  fe(() => {
8784
- c && !h && w(!1), !n && !c && (m(!0), w(!0));
8785
- }, [h, c]);
8794
+ c && !p && w(!1), !n && !c && (m(!0), w(!0));
8795
+ }, [p, c]);
8786
8796
  const y = (C) => {
8787
8797
  o == null || o(C.target.value);
8788
8798
  };
8789
8799
  return /* @__PURE__ */ D(Ve, { gutter: 8, wrap: !1, align: "middle", children: [
8790
- c ? null : /* @__PURE__ */ i(ge, { flex: "none", children: h ? /* @__PURE__ */ i(
8800
+ c ? null : /* @__PURE__ */ i(ge, { flex: "none", children: p ? /* @__PURE__ */ i(
8791
8801
  Ne,
8792
8802
  {
8793
8803
  icon: /* @__PURE__ */ i(wn, {}),
@@ -8800,7 +8810,7 @@ const { useToken: Ed } = je, ii = (e) => {
8800
8810
  ) : /* @__PURE__ */ i(
8801
8811
  Ne,
8802
8812
  {
8803
- icon: /* @__PURE__ */ i(po, {}),
8813
+ icon: /* @__PURE__ */ i(ho, {}),
8804
8814
  onClick: () => {
8805
8815
  m(!0), w(!0);
8806
8816
  },
@@ -8820,7 +8830,7 @@ const { useToken: Ed } = je, ii = (e) => {
8820
8830
  onChange: y,
8821
8831
  value: n,
8822
8832
  onBlur: () => {
8823
- r(n) && (m(!1), w(!1), p == null || p());
8833
+ r(n) && (m(!1), w(!1), h == null || h());
8824
8834
  }
8825
8835
  }
8826
8836
  ) : /* @__PURE__ */ i(
@@ -8854,7 +8864,7 @@ const { useToken: Ed } = je, ii = (e) => {
8854
8864
  }
8855
8865
  ) });
8856
8866
  }, Pd = (e) => {
8857
- const { visible: t, onIdSubmitted: n, onCancel: o, isSearching: r } = e, { t: s } = he(), a = re(null), c = re(!1);
8867
+ const { visible: t, onIdSubmitted: n, onCancel: o, isSearching: r } = e, { t: s } = pe(), a = re(null), c = re(!1);
8858
8868
  function d(f) {
8859
8869
  const u = f.id.split(",").map((l) => parseInt(l.trim()));
8860
8870
  n(u, c.current), c.current = !1;
@@ -8965,7 +8975,7 @@ function si(e) {
8965
8975
  ] });
8966
8976
  }
8967
8977
  function Ld({ refreshGraph: e }) {
8968
- const { t } = he(), {
8978
+ const { t } = pe(), {
8969
8979
  availableViews: n,
8970
8980
  currentView: o,
8971
8981
  setCurrentView: r,
@@ -8981,7 +8991,7 @@ function Ld({ refreshGraph: e }) {
8981
8991
  si,
8982
8992
  {
8983
8993
  icon: /* @__PURE__ */ i(
8984
- ho,
8994
+ po,
8985
8995
  {
8986
8996
  style: { color: a ? "white" : void 0 }
8987
8997
  }
@@ -9031,8 +9041,8 @@ function Tn(e) {
9031
9041
  results: c,
9032
9042
  totalItems: d,
9033
9043
  selectedRowItems: f
9034
- } = Z(rt), { t: u } = he(), { token: l } = $d();
9035
- function p() {
9044
+ } = Z(rt), { t: u } = pe(), { token: l } = $d();
9045
+ function h() {
9036
9046
  if ((r == null ? void 0 : r.type) === "form")
9037
9047
  return s ? d === 0 ? /* @__PURE__ */ D(ie, { children: [
9038
9048
  u("editingDocument"),
@@ -9083,7 +9093,7 @@ function Tn(e) {
9083
9093
  dn,
9084
9094
  {
9085
9095
  copyable: {
9086
- text: f.map((h) => h.id).join(", ")
9096
+ text: f.map((p) => p.id).join(", ")
9087
9097
  }
9088
9098
  }
9089
9099
  )
@@ -9114,7 +9124,7 @@ function Tn(e) {
9114
9124
  children: [
9115
9125
  /* @__PURE__ */ D(ge, { flex: 2, children: [
9116
9126
  /* @__PURE__ */ i(Hd, { level: 3, style: { marginBottom: 0 }, children: t || o }),
9117
- p()
9127
+ h()
9118
9128
  ] }),
9119
9129
  /* @__PURE__ */ i(ge, { flex: 3, children: /* @__PURE__ */ i(Ve, { justify: "end", children: n }) })
9120
9130
  ]
@@ -9131,8 +9141,8 @@ const Bd = (e) => {
9131
9141
  ), {
9132
9142
  setResults: u = void 0,
9133
9143
  setCurrentItemIndex: l = void 0,
9134
- currentId: p = void 0,
9135
- results: h = void 0,
9144
+ currentId: h = void 0,
9145
+ results: p = void 0,
9136
9146
  setSelectedRowItems: m = void 0,
9137
9147
  setSearchParams: g = void 0,
9138
9148
  searchVisible: w = !0,
@@ -9171,9 +9181,9 @@ const Bd = (e) => {
9171
9181
  setSorter: T,
9172
9182
  setCurrentItemIndex: l,
9173
9183
  setResultsActionView: u,
9174
- resultsActionView: h,
9184
+ resultsActionView: p,
9175
9185
  domain: s,
9176
- currentId: p,
9186
+ currentId: h,
9177
9187
  setActionViewTotalItems: R,
9178
9188
  limit: I,
9179
9189
  setLimit: F
@@ -9217,7 +9227,7 @@ const Bd = (e) => {
9217
9227
  context: r,
9218
9228
  domain: en(x || [], s),
9219
9229
  limit: M ? I : void 0,
9220
- manualIds: M ? h == null ? void 0 : h.map((q) => q.id) : void 0
9230
+ manualIds: M ? p == null ? void 0 : p.map((q) => q.id) : void 0
9221
9231
  }
9222
9232
  )
9223
9233
  ] });
@@ -9234,7 +9244,7 @@ const Bd = (e) => {
9234
9244
  forcedValues: f,
9235
9245
  results: u,
9236
9246
  setResults: l,
9237
- setCurrentItemIndex: p
9247
+ setCurrentItemIndex: h
9238
9248
  } = e;
9239
9249
  return t ? /* @__PURE__ */ D(ie, { children: [
9240
9250
  /* @__PURE__ */ i(Tn, { children: /* @__PURE__ */ i(Dd, { toolbar: a == null ? void 0 : a.toolbar }) }),
@@ -9250,15 +9260,15 @@ const Bd = (e) => {
9250
9260
  actionDomain: s,
9251
9261
  id: r,
9252
9262
  parentContext: c,
9253
- onSubmitSucceed: (h, m) => {
9254
- u.findIndex((w) => w.id === h) === -1 && (u.push(m), l(u), p(u.length - 1));
9263
+ onSubmitSucceed: (p, m) => {
9264
+ u.findIndex((w) => w.id === p) === -1 && (u.push(m), l(u), h(u.length - 1));
9255
9265
  }
9256
9266
  }
9257
9267
  )
9258
9268
  ] }) : null;
9259
9269
  };
9260
9270
  function Kd(e) {
9261
- const { onSearch: t, disabled: n = !1, searchText: o } = e, { t: r } = he(), [s] = dt.useForm(), [a, c] = b(!1);
9271
+ const { onSearch: t, disabled: n = !1, searchText: o } = e, { t: r } = pe(), [s] = dt.useForm(), [a, c] = b(!1);
9262
9272
  function d(u) {
9263
9273
  t(u.search);
9264
9274
  }
@@ -9312,8 +9322,8 @@ function Wd(e) {
9312
9322
  currentModel: f,
9313
9323
  searchTreeRef: u,
9314
9324
  setCurrentId: l,
9315
- setCurrentItemIndex: p,
9316
- searchParams: h,
9325
+ setCurrentItemIndex: h,
9326
+ searchParams: p,
9317
9327
  searchVisible: m,
9318
9328
  setSearchVisible: g,
9319
9329
  setSearchTreeNameSearch: w,
@@ -9326,7 +9336,7 @@ function Wd(e) {
9326
9336
  totalItems: I
9327
9337
  } = Z(rt), { parentContext: F = {}, treeExpandable: x, toolbar: _ } = e, S = mr(
9328
9338
  on.FEATURE_ADVANCED_EXPORT
9329
- ), { t: O } = he(), M = Z(
9339
+ ), { t: O } = pe(), M = Z(
9330
9340
  jt
9331
9341
  ), { processAction: A } = M || {}, [G, B] = b(!1), j = y !== void 0 && y.trim().length > 0;
9332
9342
  function K() {
@@ -9345,7 +9355,7 @@ function Wd(e) {
9345
9355
  model: f,
9346
9356
  ids: r.map((E) => E.id),
9347
9357
  context: { ...F }
9348
- }), l == null || l(void 0), p == null || p(void 0), ($ = u == null ? void 0 : u.current) == null || $.refreshResults();
9358
+ }), l == null || l(void 0), h == null || h(void 0), ($ = u == null ? void 0 : u.current) == null || $.refreshResults();
9349
9359
  } catch (E) {
9350
9360
  et(E);
9351
9361
  } finally {
@@ -9397,7 +9407,7 @@ function Wd(e) {
9397
9407
  /* @__PURE__ */ i(
9398
9408
  Kd,
9399
9409
  {
9400
- disabled: c || a,
9410
+ disabled: c || a || C,
9401
9411
  searchText: y,
9402
9412
  onSearch: ($) => {
9403
9413
  $ && $.trim().length > 0 ? w == null || w($) : w == null || w(void 0);
@@ -9408,7 +9418,7 @@ function Wd(e) {
9408
9418
  si,
9409
9419
  {
9410
9420
  icon: /* @__PURE__ */ i(
9411
- ho,
9421
+ po,
9412
9422
  {
9413
9423
  style: { color: m ? "white" : void 0 }
9414
9424
  }
@@ -9418,12 +9428,12 @@ function Wd(e) {
9418
9428
  onClick: () => {
9419
9429
  g == null || g(!m);
9420
9430
  },
9421
- disabled: c || a,
9422
- badgeNumber: h == null ? void 0 : h.length
9431
+ disabled: c || a || C,
9432
+ badgeNumber: p == null ? void 0 : p.length
9423
9433
  }
9424
9434
  ),
9425
9435
  Ct(),
9426
- /* @__PURE__ */ i(ri, {}),
9436
+ /* @__PURE__ */ i(ri, { disabled: C }),
9427
9437
  /* @__PURE__ */ i(
9428
9438
  Je,
9429
9439
  {
@@ -9481,7 +9491,8 @@ function Wd(e) {
9481
9491
  onChangeView: ($) => {
9482
9492
  T == null || T(n), o == null || o($);
9483
9493
  },
9484
- previousView: R
9494
+ previousView: R,
9495
+ disabled: C
9485
9496
  }
9486
9497
  )
9487
9498
  ] }),
@@ -9595,7 +9606,7 @@ function Wd(e) {
9595
9606
  model: f,
9596
9607
  domain: en(
9597
9608
  ((Y = u == null ? void 0 : u.current) == null ? void 0 : Y.getDomain()) || [],
9598
- h || []
9609
+ p || []
9599
9610
  ),
9600
9611
  limit: V,
9601
9612
  totalRegisters: I || 0,
@@ -9623,8 +9634,8 @@ const Gd = (e) => {
9623
9634
  results: f,
9624
9635
  setCurrentId: u,
9625
9636
  setCurrentView: l,
9626
- availableViews: p,
9627
- searchTreeNameSearch: h
9637
+ availableViews: h,
9638
+ searchTreeNameSearch: p
9628
9639
  } = e, { currentView: m, setPreviousView: g } = Z(
9629
9640
  rt
9630
9641
  );
@@ -9644,7 +9655,7 @@ const Gd = (e) => {
9644
9655
  rootTree: !0,
9645
9656
  model: o,
9646
9657
  parentContext: r,
9647
- nameSearch: h,
9658
+ nameSearch: p,
9648
9659
  formView: s,
9649
9660
  treeView: a,
9650
9661
  domain: c,
@@ -9653,7 +9664,7 @@ const Gd = (e) => {
9653
9664
  u(y);
9654
9665
  const C = f.findIndex((R) => R.id === y);
9655
9666
  g == null || g(m), d(C);
9656
- const T = p.find(
9667
+ const T = h.find(
9657
9668
  (R) => R.type === "form"
9658
9669
  );
9659
9670
  l(T);
@@ -9679,7 +9690,7 @@ const Gd = (e) => {
9679
9690
  );
9680
9691
  };
9681
9692
  function Yd() {
9682
- const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: o } = Z(wr), { t: r } = he();
9693
+ const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: o } = Z(wr), { t: r } = pe();
9683
9694
  return /* @__PURE__ */ D(qe, { wrap: !0, children: [
9684
9695
  /* @__PURE__ */ i(
9685
9696
  Je,
@@ -9783,14 +9794,14 @@ function Xd(e, t) {
9783
9794
  initialView: f,
9784
9795
  formDefaultValues: u,
9785
9796
  formForcedValues: l = {},
9786
- res_id: p = !1,
9787
- action_id: h,
9797
+ res_id: h = !1,
9798
+ action_id: p,
9788
9799
  action_type: m,
9789
9800
  treeExpandable: g = !1,
9790
9801
  limit: w
9791
- } = e, [y, C] = b(), [T, R] = b([]), [v, V] = b(!0), I = p || void 0, [F, x] = b(
9802
+ } = e, [y, C] = b(), [T, R] = b([]), [v, V] = b(!0), I = h || void 0, [F, x] = b(
9792
9803
  I
9793
- ), [_, S] = b([]), [O, M] = b(), [A, G] = b([]), [B, j] = b(), [K, N] = b(0), [q, ne] = b(!1), [Y, $] = b(!1), [E, z] = b(), { t: P } = he(), ae = re(), Q = re(), ve = Z(
9804
+ ), [_, S] = b([]), [O, M] = b(), [A, G] = b([]), [B, j] = b(), [K, N] = b(0), [q, ne] = b(!1), [Y, $] = b(!1), [E, z] = b(), { t: P } = pe(), ae = re(), Q = re(), ve = Z(
9794
9805
  ct
9795
9806
  ), {
9796
9807
  setCurrentView: se,
@@ -9812,7 +9823,7 @@ function Xd(e, t) {
9812
9823
  }
9813
9824
  function De(U) {
9814
9825
  C(U);
9815
- const Se = { action_id: h, action_type: m };
9826
+ const Se = { action_id: p, action_type: m };
9816
9827
  se == null || se({ ...U, extra: Se });
9817
9828
  }
9818
9829
  gt(t, () => ({
@@ -9848,7 +9859,7 @@ function Xd(e, t) {
9848
9859
  });
9849
9860
  let de;
9850
9861
  Ke && (de = {
9851
- action_id: h,
9862
+ action_id: p,
9852
9863
  action_type: m,
9853
9864
  name: a,
9854
9865
  res_id: r.active_id,
@@ -9900,11 +9911,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9900
9911
  };
9901
9912
  c({ tabKey: d, canWeClose: ye }), fe(() => {
9902
9913
  const U = T.find((Oe) => Oe.type === "tree"), Se = T.find((Oe) => f.id ? Oe.type === f.type && Oe.view_id === f.id : Oe.type === f.type);
9903
- De(Se || U), p ? J == null || J(I) : (_e(void 0), M(void 0)), We();
9904
- }, [o, s, p]), fe(() => {
9914
+ De(Se || U), h ? J == null || J(I) : (_e(void 0), M(void 0)), We();
9915
+ }, [o, s, h]), fe(() => {
9905
9916
  if (me === d) {
9906
9917
  J == null || J(F);
9907
- const U = { action_id: h, action_type: m };
9918
+ const U = { action_id: p, action_type: m };
9908
9919
  se == null || se({ ...y, extra: U });
9909
9920
  }
9910
9921
  }, [le, me]);
@@ -9932,7 +9943,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9932
9943
  } catch {
9933
9944
  }
9934
9945
  if (!Ke) {
9935
- $(!1), ne(!1), pt(P("idNotFound"));
9946
+ $(!1), ne(!1), ht(P("idNotFound"));
9936
9947
  return;
9937
9948
  }
9938
9949
  } else
@@ -9955,13 +9966,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9955
9966
  title: a,
9956
9967
  target: "current",
9957
9968
  initialView: { id: ee == null ? void 0 : ee[0], type: Oe },
9958
- action_id: h,
9969
+ action_id: p,
9959
9970
  action_type: m,
9960
9971
  res_id: U[0]
9961
9972
  });
9962
9973
  }
9963
9974
  }
9964
- function pe() {
9975
+ function he() {
9965
9976
  return T.map((U) => {
9966
9977
  switch (U.type) {
9967
9978
  case "form":
@@ -10069,7 +10080,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
10069
10080
  goToResourceId: Fe,
10070
10081
  limit: w,
10071
10082
  children: [
10072
- pe(),
10083
+ he(),
10073
10084
  /* @__PURE__ */ i(
10074
10085
  Pd,
10075
10086
  {
@@ -10085,7 +10096,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
10085
10096
  }
10086
10097
  ) : null;
10087
10098
  }
10088
- const ai = ht(Xd);
10099
+ const ai = pt(Xd);
10089
10100
  const Qd = Ls($s), Zd = (e) => {
10090
10101
  const { children: t = [], onPositionItemsChanged: n } = e, o = it.Children.map(
10091
10102
  t,
@@ -10125,14 +10136,14 @@ function eu(e) {
10125
10136
  domain: s = [],
10126
10137
  visible: a = !0,
10127
10138
  parentContext: c = {}
10128
- } = e, [d, f] = b(!1), [u, l] = b(!1), [p, h] = b(), [m, g] = b(), [w, y] = b(), [C, T] = b(1), [R, v] = b(0), V = re(It), I = re([]), [F, x] = b(0), [_, S] = b([]), [O, M] = b(void 0), [A, G] = b(), [B, j] = b(), [K, N] = b(), [q, ne] = b(!1), Y = re([]), $ = (J) => {
10139
+ } = e, [d, f] = b(!1), [u, l] = b(!1), [h, p] = b(), [m, g] = b(), [w, y] = b(), [C, T] = b(1), [R, v] = b(0), V = re(It), I = re([]), [F, x] = b(0), [_, S] = b([]), [O, M] = b(void 0), [A, G] = b(), [B, j] = b(), [K, N] = b(), [q, ne] = b(!1), Y = re([]), $ = (J) => {
10129
10140
  ne(!0), T(J), v((J - 1) * V.current);
10130
10141
  }, E = async () => {
10131
10142
  const J = Y.current.length > 0 ? Y.current : s, le = en(I.current, J), { colors: me } = St(m), { totalItems: Ae, results: ke, attrsEvaluated: _e } = await k.getHandler().searchForTree({
10132
10143
  params: le,
10133
10144
  limit: V.current,
10134
10145
  offset: R,
10135
- model: p,
10146
+ model: h,
10136
10147
  fields: m.fields,
10137
10148
  context: c,
10138
10149
  attrs: me && { colors: me }
@@ -10170,9 +10181,9 @@ function eu(e) {
10170
10181
  action: t,
10171
10182
  context: c
10172
10183
  });
10173
- Y.current = J.domain, y(J.views.get("form")), g(J.views.get("tree")), h(J.model), V.current = J.limit;
10184
+ Y.current = J.domain, y(J.views.get("form")), g(J.views.get("tree")), p(J.model), V.current = J.limit;
10174
10185
  }, Q = async () => {
10175
- h(n);
10186
+ p(n);
10176
10187
  const J = await k.getHandler().getView({
10177
10188
  model: n,
10178
10189
  type: "form",
@@ -10194,7 +10205,7 @@ function eu(e) {
10194
10205
  const { id: le } = J;
10195
10206
  r({
10196
10207
  id: le,
10197
- model: p,
10208
+ model: h,
10198
10209
  treeView: m
10199
10210
  });
10200
10211
  }, se = () => !m || !w ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
@@ -10245,8 +10256,8 @@ const tu = Un(eu), nu = (e) => {
10245
10256
  }, En = "line_ids";
10246
10257
  function ru(e, t) {
10247
10258
  const { model: n, context: o = {}, id: r, configAction: s } = e, [a, c] = b([]), [d, f] = b(!1), [u, l] = b(), {
10248
- setIsLoading: p,
10249
- openAction: h,
10259
+ setIsLoading: h,
10260
+ openAction: p,
10250
10261
  moveItemsEnabled: m
10251
10262
  } = Z(wr), g = re(), w = re(), [y] = Ze(k.getHandler().getView), [C] = Ze(
10252
10263
  k.getHandler().readObjects
@@ -10262,7 +10273,7 @@ function ru(e, t) {
10262
10273
  configDashboard: S
10263
10274
  }));
10264
10275
  async function v() {
10265
- f(!0), p(!0), l(void 0);
10276
+ f(!0), h(!0), l(void 0);
10266
10277
  try {
10267
10278
  const O = await V(), M = await F(O), A = O.fields[En].relation, G = M[En].items;
10268
10279
  w.current = O.fields;
@@ -10271,7 +10282,7 @@ function ru(e, t) {
10271
10282
  model: A,
10272
10283
  context: o
10273
10284
  }), j = await x(B);
10274
- l(void 0), c(j), f(!1), p(!1);
10285
+ l(void 0), c(j), f(!1), h(!1);
10275
10286
  } catch (O) {
10276
10287
  l(JSON.stringify(O));
10277
10288
  }
@@ -10373,7 +10384,7 @@ function ru(e, t) {
10373
10384
  });
10374
10385
  }
10375
10386
  async function S() {
10376
- h(s);
10387
+ p(s);
10377
10388
  }
10378
10389
  return d ? /* @__PURE__ */ i(ut, {}) : u ? /* @__PURE__ */ i(Qe, { className: "mt-10 mb-20", message: u, type: "error", banner: !0 }) : /* @__PURE__ */ i(Zd, { onPositionItemsChanged: _, children: a.map((O, M) => {
10379
10390
  const { actionData: A, values: G } = O, { position: B, id: j } = G, {
@@ -10441,7 +10452,7 @@ function ru(e, t) {
10441
10452
  view_id: Ae,
10442
10453
  view_type: ke
10443
10454
  };
10444
- h(ce);
10455
+ p(ce);
10445
10456
  }
10446
10457
  }
10447
10458
  },
@@ -10498,18 +10509,18 @@ function ru(e, t) {
10498
10509
  title: ne,
10499
10510
  parms: Q,
10500
10511
  action: se,
10501
- openAction: h,
10512
+ openAction: p,
10502
10513
  children: ve
10503
10514
  },
10504
10515
  `griditem-${j}`
10505
10516
  );
10506
10517
  }) });
10507
10518
  }
10508
- const ou = ht(ru), iu = (e) => {
10519
+ const ou = pt(ru), iu = (e) => {
10509
10520
  const { ooui: t } = e;
10510
10521
  return /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(su, { ooui: t }) });
10511
10522
  }, su = (e) => {
10512
- const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, c] = b([]), [d, f] = b(), [u, l] = b(!1), { relation: p, context: h, readOnly: m, field: g, columns: w } = n, y = Z(Le), { getContext: C } = y || {};
10523
+ const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, c] = b([]), [d, f] = b(), [u, l] = b(!1), { relation: h, context: p, readOnly: m, field: g, columns: w } = n, y = Z(Le), { getContext: C } = y || {};
10513
10524
  bt(() => {
10514
10525
  R();
10515
10526
  }, [r]);
@@ -10535,10 +10546,10 @@ const ou = ht(ru), iu = (e) => {
10535
10546
  }
10536
10547
  try {
10537
10548
  const _ = (await k.getHandler().search({
10538
- model: p,
10549
+ model: h,
10539
10550
  params: F,
10540
10551
  fieldsToRetrieve: [g],
10541
- context: { ...C == null ? void 0 : C(), ...h }
10552
+ context: { ...C == null ? void 0 : C(), ...p }
10542
10553
  })).map((S) => {
10543
10554
  const O = S[g];
10544
10555
  let M = O;
@@ -10625,8 +10636,8 @@ const ou = ht(ru), iu = (e) => {
10625
10636
  return /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(Ei, { disabled: n, ...o }) });
10626
10637
  }, mu = (e) => {
10627
10638
  const { ooui: t } = e, { required: n } = t;
10628
- return /* @__PURE__ */ i(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(pu, { ...e }) });
10629
- }, pu = (e) => {
10639
+ return /* @__PURE__ */ i(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(hu, { ...e }) });
10640
+ }, hu = (e) => {
10630
10641
  const { ooui: t, value: n } = e, { selectionValues: o, errorField: r } = t, s = Z(Le), a = Array.from(o.entries()), c = a.map((u) => u[0]).indexOf(n);
10631
10642
  let d = "process", f = "";
10632
10643
  return r && (f = s.getFieldValue(r), f && (d = "error")), /* @__PURE__ */ i(Ir, { current: c, status: d, children: a.map((u, l) => /* @__PURE__ */ i(
@@ -10636,7 +10647,7 @@ const ou = ht(ru), iu = (e) => {
10636
10647
  description: l === c && d === "error" ? f : null
10637
10648
  }
10638
10649
  )) });
10639
- }, hu = (e) => {
10650
+ }, pu = (e) => {
10640
10651
  const { ooui: t } = e, { lang: n, height: o, readOnly: r } = t, s = Z(Le), { elementHasLostFocus: a } = s || {};
10641
10652
  return /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(
10642
10653
  Ps,
@@ -10666,7 +10677,7 @@ function vu({ text: e }) {
10666
10677
  ] }, o)) });
10667
10678
  }
10668
10679
  const bu = (e) => {
10669
- const { data: t, style: n } = e, { t: o } = he();
10680
+ const { data: t, style: n } = e, { t: o } = pe();
10670
10681
  return /* @__PURE__ */ D(Yn, { style: { ...n, textAlign: "start" }, children: [
10671
10682
  /* @__PURE__ */ i(
10672
10683
  gu,
@@ -10717,11 +10728,11 @@ const bu = (e) => {
10717
10728
  );
10718
10729
  }, { Content: Iu } = ki, { Title: Fu } = Nt;
10719
10730
  function Ru() {
10720
- const { t: e } = he();
10731
+ const { t: e } = pe();
10721
10732
  return /* @__PURE__ */ i(Iu, { className: "m-5 select-none", children: /* @__PURE__ */ i(Fu, { level: 5, children: e("welcome") }) });
10722
10733
  }
10723
10734
  function Ou(e, t) {
10724
- const { children: n } = e, [o, r] = b("welcome"), { t: s } = he(), { globalValues: a, rootContext: c } = fr(), [d, f] = b([
10735
+ const { children: n } = e, [o, r] = b("welcome"), { t: s } = pe(), { globalValues: a, rootContext: c } = fr(), [d, f] = b([
10725
10736
  {
10726
10737
  title: s("welcome"),
10727
10738
  key: "welcome",
@@ -10733,14 +10744,14 @@ function Ou(e, t) {
10733
10744
  retrieveAndOpenAction: m,
10734
10745
  openShortcut: y
10735
10746
  }));
10736
- function p(R) {
10747
+ function h(R) {
10737
10748
  if (R === o) {
10738
10749
  const v = d.findIndex((V) => V.key === R);
10739
10750
  d[v - 1] && r(d[v - 1].key), d[v + 1] && r(d[v + 1].key);
10740
10751
  }
10741
10752
  f(d.filter((v) => v.key !== R)), u.current.delete(R);
10742
10753
  }
10743
- function h({
10754
+ function p({
10744
10755
  tabKey: R,
10745
10756
  canWeClose: v
10746
10757
  }) {
@@ -11018,7 +11029,7 @@ function Ou(e, t) {
11018
11029
  model: V,
11019
11030
  context: { ...c, ...v },
11020
11031
  domain: R,
11021
- setCanWeClose: h,
11032
+ setCanWeClose: p,
11022
11033
  initialView: N,
11023
11034
  res_id: M,
11024
11035
  formDefaultValues: A,
@@ -11042,7 +11053,7 @@ function Ou(e, t) {
11042
11053
  activeKey: o,
11043
11054
  onRemoveTab: async (R) => {
11044
11055
  const v = u.current.get(R);
11045
- (await (v == null ? void 0 : v()) || o === "welcome") && p(R);
11056
+ (await (v == null ? void 0 : v()) || o === "welcome") && h(R);
11046
11057
  },
11047
11058
  onChangeTab: (R) => {
11048
11059
  r(R);
@@ -11058,7 +11069,7 @@ function Ou(e, t) {
11058
11069
  }
11059
11070
  );
11060
11071
  }
11061
- const If = ht(Ou), { useToken: Vu } = je;
11072
+ const If = pt(Ou), { useToken: Vu } = je;
11062
11073
  function _u(e) {
11063
11074
  const { label: t, onClose: n, tabKey: o, isActive: r, onSelected: s } = e, { token: a } = Vu(), c = r ? a.colorBgContainer : a.colorPrimaryBg;
11064
11075
  return /* @__PURE__ */ D(
@@ -11168,7 +11179,7 @@ const { useToken: Eu } = je, Of = (e) => {
11168
11179
  onAddFavourite: o,
11169
11180
  onRemoveFavourite: r,
11170
11181
  onDropdownClosed: s
11171
- } = e, [a, c] = b(!1), [d, f] = b(), { t: u } = he(), { token: l } = Eu(), p = re(null), h = Z(
11182
+ } = e, [a, c] = b(!1), [d, f] = b(), { t: u } = pe(), { token: l } = Eu(), h = re(null), p = Z(
11172
11183
  ct
11173
11184
  ), {
11174
11185
  openShortcut: m,
@@ -11177,7 +11188,7 @@ const { useToken: Eu } = je, Of = (e) => {
11177
11188
  currentView: y,
11178
11189
  currentId: C,
11179
11190
  openDefaultActionForModel: T
11180
- } = h || {}, R = Ie(() => {
11191
+ } = p || {}, R = Ie(() => {
11181
11192
  if (!y || !y.view_id || !y.extra)
11182
11193
  return;
11183
11194
  const { action_id: S, action_type: O } = y.extra || {};
@@ -11212,7 +11223,7 @@ const { useToken: Eu } = je, Of = (e) => {
11212
11223
  }, [R, n]);
11213
11224
  async function F() {
11214
11225
  var S;
11215
- (S = p == null ? void 0 : p.current) == null || S.close(), T == null || T({ model: "ir.ui.view_sc" });
11226
+ (S = h == null ? void 0 : h.current) == null || S.close(), T == null || T({ model: "ir.ui.view_sc" });
11216
11227
  }
11217
11228
  const x = X(async () => {
11218
11229
  const S = await t();
@@ -11265,7 +11276,7 @@ const { useToken: Eu } = je, Of = (e) => {
11265
11276
  return /* @__PURE__ */ i(
11266
11277
  ds,
11267
11278
  {
11268
- ref: p,
11279
+ ref: h,
11269
11280
  isFavourite: a,
11270
11281
  onToggleFavourite: _,
11271
11282
  onItemClick: V,
@@ -11273,7 +11284,7 @@ const { useToken: Eu } = je, Of = (e) => {
11273
11284
  header: /* @__PURE__ */ D("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
11274
11285
  /* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: u == null ? void 0 : u("favorites").toUpperCase() }),
11275
11286
  /* @__PURE__ */ i("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ i(wt, { title: u == null ? void 0 : u("edit_favorites"), children: /* @__PURE__ */ i(
11276
- po,
11287
+ ho,
11277
11288
  {
11278
11289
  style: { color: l.colorPrimary, cursor: "pointer" },
11279
11290
  onClick: F
@@ -11296,7 +11307,7 @@ export {
11296
11307
  wo as Button,
11297
11308
  Ys as ButtonGroup,
11298
11309
  Co as Char,
11299
- hu as CodeEditor,
11310
+ pu as CodeEditor,
11300
11311
  xu as CommentsTimelineField,
11301
11312
  Oo as ConfigContext,
11302
11313
  Oa as ConfigContextProvider,
@@ -11321,7 +11332,7 @@ export {
11321
11332
  ti as Group,
11322
11333
  Su as HTMLPreview,
11323
11334
  fa as Image,
11324
- hn as Integer,
11335
+ pn as Integer,
11325
11336
  Cn as Label,
11326
11337
  Dl as Many2one,
11327
11338
  au as Markdown,