@gisce/react-ooui 2.26.0-alpha.3 → 2.26.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  var Ca = Object.defineProperty;
2
2
  var xa = (e, t, n) => t in e ? Ca(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var go = (e, t, n) => (xa(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { jsxs as D, jsx as i, Fragment as se } from "react/jsx-runtime";
5
- import ct, { useContext as ne, useState as C, useEffect as me, useRef as Q, memo as kr, useMemo as we, useCallback as K, createContext as Oa, forwardRef as ft, useImperativeHandle as mt, createElement as Ta, Fragment as qt } from "react";
6
- import { Tooltip as Ot, theme as Ge, Typography as At, Form as dt, Row as Ne, Col as be, Modal as rt, Button as Le, Dropdown as Aa, Menu as yo, Spin as Be, Divider as Ln, Space as Qe, Input as at, Select as Pt, Checkbox as mn, Alert as tt, Timeline as gr, Statistic as Ia, Card as $r, Tag as wi, message as rr, DatePicker as Nr, TimePicker as Fa, InputNumber as bi, Progress as Ra, Avatar as Si, Pagination as _a, Badge as Mr, App as Va, Tabs as Ci, Layout as xi, Radio as vo, Switch as Da, Steps as wo } from "antd";
4
+ import { jsx as i, jsxs as D, Fragment as se } from "react/jsx-runtime";
5
+ import ct, { useContext as te, useState as C, useEffect as me, useRef as Q, memo as kr, useMemo as we, useCallback as K, createContext as Oa, forwardRef as ft, useImperativeHandle as mt, createElement as Ta, Fragment as qt } from "react";
6
+ import { Tooltip as Ot, theme as Ge, Typography as At, Form as dt, Row as Ne, Col as be, Modal as rt, Button as Le, Dropdown as Aa, Menu as yo, Spin as He, Divider as Ln, Space as Qe, Input as at, Select as Pt, Checkbox as mn, Alert as tt, Timeline as gr, Statistic as Ia, Card as $r, Tag as wi, message as rr, DatePicker as Nr, TimePicker as Fa, InputNumber as bi, Progress as Ra, Avatar as Si, Pagination as _a, Badge as Mr, App as Va, Tabs as Ci, Layout as xi, Radio as vo, Switch as Da, Steps as wo } from "antd";
7
7
  import { Label as Qt, Field as yr, Tree as Oi, Reference as Ea, Selection as Lr, Many2one as Ti, Boolean as Pa, parseContext as Rt, graphProcessor as Ai, graphFieldUtils as ka, parseGraph as Ii, Container as $a, Form as Fi, Integer as vr, SearchFieldTypes as Ct, SearchFilter as Ri, parseContextFields as Na, parseDomainFields as Ma, transformDomainForChildWidget as jr } from "@gisce/ooui";
8
8
  import * as bo from "@ant-design/icons";
9
9
  import _i, { QuestionCircleOutlined as Vi, ExclamationCircleOutlined as St, LoadingOutlined as pt, DownOutlined as jn, WarningOutlined as Di, CloseOutlined as Zt, CheckOutlined as Bn, TranslationOutlined as Ei, FolderOpenOutlined as Br, DownloadOutlined as Hr, ClearOutlined as Hn, ExportOutlined as La, StarFilled as ja, StarOutlined as Ba, UpOutlined as Ha, SearchOutlined as Un, ThunderboltOutlined as Ur, PrinterOutlined as Wr, EnterOutlined as Gr, PlusSquareOutlined as Ua, MinusSquareOutlined as Wa, FileAddOutlined as Wn, AlignLeftOutlined as Ga, ApiOutlined as Ka, DeleteOutlined as Kr, LeftOutlined as Pi, RightOutlined as ki, EyeOutlined as qa, FormOutlined as pn, TableOutlined as qr, AreaChartOutlined as Ya, CalendarOutlined as za, LinkOutlined as So, SaveOutlined as Ja, CopyOutlined as Yr, InfoCircleOutlined as $i, ReloadOutlined as Gn, EditOutlined as Ni, PlusOutlined as Xa, FilterOutlined as Mi, CloseCircleFilled as Qa, BorderOuterOutlined as Za, SettingOutlined as el } from "@ant-design/icons";
@@ -50,27 +50,72 @@ import $l from "md5";
50
50
  import { WidthProvider as Nl, Responsive as Ml } from "react-grid-layout";
51
51
  import "react-grid-layout/css/styles.css";
52
52
  import { AnimatePresence as Ll, motion as Oo } from "framer-motion";
53
- const { Text: jl, Title: Bl } = At, { useToken: Hl } = Ge, Ul = {
53
+ const je = ct.createContext(null), jl = (e) => {
54
+ const {
55
+ children: t,
56
+ activeId: n,
57
+ activeModel: r,
58
+ setFieldValue: o,
59
+ getFieldValue: s,
60
+ executeButtonAction: a,
61
+ getContext: l,
62
+ getValues: c,
63
+ getPlainValues: u,
64
+ domain: f,
65
+ submitForm: d,
66
+ fetchValues: h,
67
+ formHasChanges: p,
68
+ elementHasLostFocus: m,
69
+ getFields: g,
70
+ formView: v
71
+ } = e;
72
+ return /* @__PURE__ */ i(
73
+ je.Provider,
74
+ {
75
+ value: {
76
+ domain: f,
77
+ getValues: c,
78
+ getPlainValues: u,
79
+ getFields: g,
80
+ activeId: n,
81
+ activeModel: r,
82
+ setFieldValue: o,
83
+ getFieldValue: s,
84
+ executeButtonAction: a,
85
+ getContext: l,
86
+ submitForm: d,
87
+ fetchValues: h,
88
+ formHasChanges: p,
89
+ elementHasLostFocus: m,
90
+ formView: v
91
+ },
92
+ children: t
93
+ }
94
+ );
95
+ }, { Text: Bl, Title: Hl } = At, { useToken: Ul } = Ge, Wl = {
54
96
  left: "justify-start",
55
97
  center: "justify-center",
56
98
  right: "justify-end"
57
99
  }, Kn = (e) => {
58
- const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: c } = t, f = a !== null && o.length > 1 ? o + " :" : o, h = n || (a ? r ? "left" : "right" : "left"), { token: p } = Hl(), m = l === void 0 ? jl : Bl;
100
+ const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: c } = t, u = te(je);
101
+ let d = a !== null && o.length > 1 ? o + " :" : o;
102
+ !t.fieldForLabel && t._id && (d = u.getFieldValue(t._id));
103
+ const p = n || (a ? r ? "left" : "right" : "left"), { token: m } = Ul(), g = l === void 0 ? Bl : Hl;
59
104
  return /* @__PURE__ */ D(
60
105
  "div",
61
106
  {
62
- className: `flex flex-row items-center pb-1 pt-1 ${Ul[h]}`,
107
+ className: `flex flex-row items-center pb-1 pt-1 ${Wl[p]}`,
63
108
  children: [
64
109
  s && /* @__PURE__ */ i(Ot, { title: s, children: /* @__PURE__ */ i(
65
110
  Vi,
66
111
  {
67
112
  className: "pr-1 text-xs",
68
113
  style: {
69
- color: p.colorPrimary
114
+ color: m.colorPrimary
70
115
  }
71
116
  }
72
117
  ) }),
73
- /* @__PURE__ */ i("span", { className: "pr-2", children: /* @__PURE__ */ i(m, { level: l, type: c, children: /* @__PURE__ */ i(hn, { content: f }) }) })
118
+ /* @__PURE__ */ i("span", { className: "pr-2", children: /* @__PURE__ */ i(g, { level: l, type: c, children: /* @__PURE__ */ i(hn, { content: d }) }) })
74
119
  ]
75
120
  }
76
121
  );
@@ -126,14 +171,14 @@ function Ie({
126
171
  m()
127
172
  ] }))();
128
173
  }
129
- const { confirm: Wl } = rt, Tt = ({
174
+ const { confirm: Gl } = rt, Tt = ({
130
175
  onOk: e,
131
176
  confirmMessage: t,
132
177
  okText: n,
133
178
  cancelText: r,
134
179
  t: o
135
180
  }) => {
136
- Wl({
181
+ Gl({
137
182
  title: o("confirmation"),
138
183
  icon: /* @__PURE__ */ i(St, {}),
139
184
  centered: !0,
@@ -142,48 +187,6 @@ const { confirm: Wl } = rt, Tt = ({
142
187
  cancelText: r || o("cancel"),
143
188
  onOk: e
144
189
  });
145
- }, He = ct.createContext(null), Gl = (e) => {
146
- const {
147
- children: t,
148
- activeId: n,
149
- activeModel: r,
150
- setFieldValue: o,
151
- getFieldValue: s,
152
- executeButtonAction: a,
153
- getContext: l,
154
- getValues: c,
155
- getPlainValues: u,
156
- domain: f,
157
- submitForm: d,
158
- fetchValues: h,
159
- formHasChanges: p,
160
- elementHasLostFocus: m,
161
- getFields: g,
162
- formView: v
163
- } = e;
164
- return /* @__PURE__ */ i(
165
- He.Provider,
166
- {
167
- value: {
168
- domain: f,
169
- getValues: c,
170
- getPlainValues: u,
171
- getFields: g,
172
- activeId: n,
173
- activeModel: r,
174
- setFieldValue: o,
175
- getFieldValue: s,
176
- executeButtonAction: a,
177
- getContext: l,
178
- submitForm: d,
179
- fetchValues: h,
180
- formHasChanges: p,
181
- elementHasLostFocus: m,
182
- formView: v
183
- },
184
- children: t
185
- }
186
- );
187
190
  }, To = {
188
191
  "terp-purchase": "ShoppingCart",
189
192
  "terp-graph": "PieChart",
@@ -318,7 +321,7 @@ const Hi = (e) => {
318
321
  icon: l,
319
322
  context: c,
320
323
  readOnly: u
321
- } = t, f = ne(He), { executeButtonAction: d } = f || {}, [h, p] = C(!1), { t: m } = ge();
324
+ } = t, f = te(je), { executeButtonAction: d } = f || {}, [h, p] = C(!1), { t: m } = ge();
322
325
  async function g() {
323
326
  p(!0), await d({ type: s, action: n, context: c }), p(!1);
324
327
  }
@@ -367,7 +370,7 @@ const Hi = (e) => {
367
370
  primary: f,
368
371
  context: d,
369
372
  readOnly: h
370
- } = n || {}, p = ne(He), { executeButtonAction: m } = p || {}, [g, v] = C(!1), { t: y } = ge();
373
+ } = n || {}, p = te(je), { executeButtonAction: m } = p || {}, [g, v] = C(!1), { t: y } = ge();
371
374
  function b() {
372
375
  if (g)
373
376
  return /* @__PURE__ */ i(pt, {});
@@ -609,7 +612,7 @@ const Ui = (e) => {
609
612
  m(!1), a();
610
613
  }
611
614
  function O() {
612
- return d ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(se, { children: [
615
+ return d ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ D(se, { children: [
613
616
  w(),
614
617
  /* @__PURE__ */ i(Ln, {}),
615
618
  /* @__PURE__ */ i(Ne, { justify: "end", children: /* @__PURE__ */ D(Qe, { children: [
@@ -680,7 +683,7 @@ const { info: Ql } = rt, bt = (e) => {
680
683
  isSearchField: r,
681
684
  onChange: o
682
685
  }) => {
683
- const s = Array.isArray(e) || !!t.selectionValues.size, a = ne(He), { elementHasLostFocus: l } = a || {}, { id: c, readOnly: u, isPassword: f, translatable: d } = t, h = t.size !== void 0 && t.showCount;
686
+ const s = Array.isArray(e) || !!t.selectionValues.size, a = te(je), { elementHasLostFocus: l } = a || {}, { id: c, readOnly: u, isPassword: f, translatable: d } = t, h = t.size !== void 0 && t.showCount;
684
687
  t.selectionValues.size ? e = t.selectionValues.get(e) : Array.isArray(e) && (e = e[1]);
685
688
  let p = /* @__PURE__ */ i(
686
689
  at,
@@ -715,7 +718,7 @@ const { info: Ql } = rt, bt = (e) => {
715
718
  requiredStyle: n,
716
719
  onChange: r
717
720
  }) => {
718
- const o = ne(He), {
721
+ const o = te(je), {
719
722
  activeId: s,
720
723
  activeModel: a,
721
724
  fetchValues: l,
@@ -1134,7 +1137,7 @@ function Ro({
1134
1137
  }), n;
1135
1138
  }
1136
1139
  const Oc = (e) => {
1137
- const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = C(!0), [l, c] = C(), [u, f] = C(/* @__PURE__ */ new Map()), d = ne(He), { getContext: h } = d || {};
1140
+ const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = C(!0), [l, c] = C(), [u, f] = C(/* @__PURE__ */ new Map()), d = te(je), { getContext: h } = d || {};
1138
1141
  ht(() => {
1139
1142
  m();
1140
1143
  }, [t]);
@@ -1153,9 +1156,9 @@ const Oc = (e) => {
1153
1156
  a(!1);
1154
1157
  }
1155
1158
  };
1156
- return s ? /* @__PURE__ */ i(Be, {}) : l ? /* @__PURE__ */ i(tt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ie, { type: "array", ...e, children: /* @__PURE__ */ i(Tc, { ooui: t, views: u }) });
1159
+ return s ? /* @__PURE__ */ i(He, {}) : l ? /* @__PURE__ */ i(tt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ie, { type: "array", ...e, children: /* @__PURE__ */ i(Tc, { ooui: t, views: u }) });
1157
1160
  }, Tc = (e) => {
1158
- const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = C(!1), [c, u] = C(), [f, d] = C(!1), [h, p] = C(), { relation: m, context: g, readOnly: v, summaryField: y, titleField: b } = r, x = s.filter((I) => I.values), T = ne(He), { getContext: w } = T || {};
1161
+ const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = C(!1), [c, u] = C(), [f, d] = C(!1), [h, p] = C(), { relation: m, context: g, readOnly: v, summaryField: y, titleField: b } = r, x = s.filter((I) => I.values), T = te(je), { getContext: w } = T || {};
1159
1162
  ht(() => {
1160
1163
  O();
1161
1164
  }, [s]);
@@ -1187,7 +1190,7 @@ const Oc = (e) => {
1187
1190
  l(!1);
1188
1191
  }
1189
1192
  }
1190
- return c ? /* @__PURE__ */ i(tt, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(se, { children: [
1193
+ return c ? /* @__PURE__ */ i(tt, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ D(se, { children: [
1191
1194
  /* @__PURE__ */ i(gr, { style: { padding: "1rem" }, children: x.map((I, A) => {
1192
1195
  var V, F;
1193
1196
  return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ D(gr.Item, { children: [
@@ -1550,7 +1553,7 @@ const Oc = (e) => {
1550
1553
  rootContext: {},
1551
1554
  devMode: !1
1552
1555
  }, Xi = ct.createContext(_c), Zr = () => {
1553
- const e = ne(Xi);
1556
+ const e = te(Xi);
1554
1557
  if (!e)
1555
1558
  throw new Error(
1556
1559
  "useConfigContext must be used within a ConfigContextProvider"
@@ -1642,7 +1645,7 @@ async function Qi({
1642
1645
  };
1643
1646
  }
1644
1647
  const Dc = (e) => {
1645
- const [t, n] = C(), [r, o] = C(!0), [s, a] = C(), [l, c] = C(), u = ne(He), { getContext: f, getValues: d, activeId: h } = u || {}, { globalValues: p, rootContext: m } = Zr(), g = we(() => ({ ...f == null ? void 0 : f(), ...m }), [f, m]);
1648
+ const [t, n] = C(), [r, o] = C(!0), [s, a] = C(), [l, c] = C(), u = te(je), { getContext: f, getValues: d, activeId: h } = u || {}, { globalValues: p, rootContext: m } = Zr(), g = we(() => ({ ...f == null ? void 0 : f(), ...m }), [f, m]);
1646
1649
  return { actionData: s, treeShortcut: l, loading: r, error: t, fetchData: async () => {
1647
1650
  n(void 0), o(!0);
1648
1651
  try {
@@ -1695,7 +1698,7 @@ const Dc = (e) => {
1695
1698
  justifyContent: "center",
1696
1699
  alignItems: "center"
1697
1700
  },
1698
- children: /* @__PURE__ */ i(Be, {})
1701
+ children: /* @__PURE__ */ i(He, {})
1699
1702
  }
1700
1703
  ), Zi = ({
1701
1704
  error: e,
@@ -2483,7 +2486,7 @@ const Yc = ({
2483
2486
  goToResourceId: I,
2484
2487
  limit: A,
2485
2488
  isActive: V
2486
- } = e, [F, _] = C(!1), [P, E] = C(!1), [N, H] = C(!1), [M, j] = C(!0), [$, ee] = C(!0), [re, J] = C([]), [ae, Z] = C(!1), [U, R] = C([]), [W, q] = C(!1), [pe, te] = C(!0), [z, ue] = C(), [ve, ke] = C({}), [Fe, Pe] = C(0), [$e, We] = C(
2489
+ } = e, [F, _] = C(!1), [P, E] = C(!1), [N, H] = C(!1), [M, j] = C(!0), [$, ee] = C(!0), [re, J] = C([]), [ae, Z] = C(!1), [U, R] = C([]), [W, q] = C(!1), [pe, ne] = C(!0), [z, ue] = C(), [ve, ke] = C({}), [Fe, Pe] = C(0), [$e, We] = C(
2487
2490
  A !== void 0 ? A : Dt
2488
2491
  ), [xe, de] = C(r);
2489
2492
  me(() => {
@@ -2552,7 +2555,7 @@ const Yc = ({
2552
2555
  setTotalItems: x,
2553
2556
  searchTreeNameSearch: S,
2554
2557
  setSearchTreeNameSearch: O,
2555
- setGraphIsLoading: te,
2558
+ setGraphIsLoading: ne,
2556
2559
  graphIsLoading: pe,
2557
2560
  previousView: z,
2558
2561
  setPreviousView: ue,
@@ -2570,7 +2573,7 @@ const Yc = ({
2570
2573
  }
2571
2574
  );
2572
2575
  }, Jc = (e) => {
2573
- const t = ne(
2576
+ const t = te(
2574
2577
  it
2575
2578
  );
2576
2579
  if (!e)
@@ -2581,7 +2584,7 @@ const Yc = ({
2581
2584
  );
2582
2585
  return t;
2583
2586
  }, Xc = (e, t) => {
2584
- const { view_id: n, model: r, context: o, domain: s, limit: a, manualIds: l, fixedHeight: c } = e, [u, f] = C(!1), [d, h] = C(), p = ne(
2587
+ const { view_id: n, model: r, context: o, domain: s, limit: a, manualIds: l, fixedHeight: c } = e, [u, f] = C(!1), [d, h] = C(), p = te(
2585
2588
  it
2586
2589
  ), { setGraphIsLoading: m = void 0 } = p || {}, [g] = qe(k.getHandler().getView);
2587
2590
  mt(t, () => ({
@@ -2675,7 +2678,7 @@ const Zg = Object.values(nn), Qc = (e) => {
2675
2678
  graphData: f
2676
2679
  };
2677
2680
  }, Zc = (e, t) => {
2678
- const { view_id: n, model: r, context: o, domain: s, manualIds: a, fixedHeight: l } = e, c = ne(
2681
+ const { view_id: n, model: r, context: o, domain: s, manualIds: a, fixedHeight: l } = e, c = te(
2679
2682
  it
2680
2683
  ), { setGraphIsLoading: u = void 0 } = c || {}, { error: f, loading: d, graphData: h, fetchData: p } = Qc({
2681
2684
  view_id: n,
@@ -2854,7 +2857,7 @@ const Zg = Object.values(nn), Qc = (e) => {
2854
2857
  }, sd = (e) => {
2855
2858
  const { ooui: t } = e, { actionId: n } = t, { actionData: r, treeShortcut: o, loading: s, error: a, fetchData: l } = Dc(n), c = Jn(
2856
2859
  nn.FEATURE_READFORVIEW
2857
- ), u = ne(
2860
+ ), u = te(
2858
2861
  yt
2859
2862
  ), { openShortcut: f } = u || {};
2860
2863
  if (me(() => {
@@ -3037,7 +3040,7 @@ const kt = ({
3037
3040
  const { ooui: t } = e;
3038
3041
  return /* @__PURE__ */ i(Ie, { type: "array", ...e, children: /* @__PURE__ */ i(hd, { ooui: t }) });
3039
3042
  }, hd = (e) => {
3040
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((S) => S.operation !== "pendingRemove").map((S) => S.id), [a, l] = C([]), [c, u] = C(), [f, d] = C(!1), { relation: h, context: p, readOnly: m, field: g } = n, v = ne(He), { getContext: y } = v || {};
3043
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((S) => S.operation !== "pendingRemove").map((S) => S.id), [a, l] = C([]), [c, u] = C(), [f, d] = C(!1), { relation: h, context: p, readOnly: m, field: g } = n, v = te(je), { getContext: y } = v || {};
3041
3044
  ht(() => {
3042
3045
  x();
3043
3046
  }, [o]);
@@ -3332,7 +3335,7 @@ const kt = ({
3332
3335
  for (let n = 0; n < e.length; n++)
3333
3336
  await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
3334
3337
  }, Rd = (e, t) => {
3335
- const { children: n, globalValues: r = {} } = e, o = Q(), s = Q(), [a, l] = C(!1), c = ne(
3338
+ const { children: n, globalValues: r = {} } = e, o = Q(), s = Q(), [a, l] = C(!1), c = te(
3336
3339
  yt
3337
3340
  ), { openAction: u } = c || {}, f = Q([]), { t: d } = ge();
3338
3341
  mt(t, () => ({
@@ -3529,7 +3532,7 @@ const kt = ({
3529
3532
  closable: !1,
3530
3533
  centered: !0,
3531
3534
  maskClosable: !1,
3532
- children: /* @__PURE__ */ i(Be, {})
3535
+ children: /* @__PURE__ */ i(He, {})
3533
3536
  }
3534
3537
  ),
3535
3538
  /* @__PURE__ */ i(
@@ -3640,7 +3643,7 @@ function Pd(e, t) {
3640
3643
  forcedValues: S = {},
3641
3644
  parentWidth: O,
3642
3645
  onMustRefreshParent: I
3643
- } = e, { t: A } = ge(), [V, F] = C(!1), [_, P] = C(), [E, N] = C(), [H] = dt.useForm(), [M, j] = C(), [$, ee] = C(), re = ne(ls), [J, ae] = C(), [Z, U] = C(!1), R = Q(), W = Q({}), q = Q({}), pe = Q(!1), te = Q(!1), z = Q(!1), ve = (O !== void 0 ? O : J) < Ed, ke = ne(He), { activeId: Fe, getPlainValues: Pe } = ke || {}, $e = Q(!1), We = ne(
3646
+ } = e, { t: A } = ge(), [V, F] = C(!1), [_, P] = C(), [E, N] = C(), [H] = dt.useForm(), [M, j] = C(), [$, ee] = C(), re = te(ls), [J, ae] = C(), [Z, U] = C(!1), R = Q(), W = Q({}), q = Q({}), pe = Q(!1), ne = Q(!1), z = Q(!1), ve = (O !== void 0 ? O : J) < Ed, ke = te(je), { activeId: Fe, getPlainValues: Pe } = ke || {}, $e = Q(!1), We = te(
3644
3647
  it
3645
3648
  ), {
3646
3649
  setFormIsSaving: xe = void 0,
@@ -3650,9 +3653,9 @@ function Pd(e, t) {
3650
3653
  setAttachments: Me = void 0,
3651
3654
  title: X = void 0,
3652
3655
  setTitle: Oe = void 0
3653
- } = (T ? We : {}) || {}, _e = ne(
3656
+ } = (T ? We : {}) || {}, _e = te(
3654
3657
  on
3655
- ), { processAction: je, globalValues: Ve } = _e || {};
3658
+ ), { processAction: Be, globalValues: Ve } = _e || {};
3656
3659
  mt(t, () => ({
3657
3660
  submitForm: Tn,
3658
3661
  getFields: Ke,
@@ -3893,8 +3896,8 @@ function Pd(e, t) {
3893
3896
  }, Tn = async (L) => {
3894
3897
  let G = !1;
3895
3898
  const { callOnSubmitSucceed: ie = !0 } = L || {};
3896
- if (te.current = !0, P(void 0), z.current && !st() && oe() && ie) {
3897
- te.current = !1, de == null || de(!1), B == null || B(
3899
+ if (ne.current = !0, P(void 0), z.current && !st() && oe() && ie) {
3900
+ ne.current = !1, de == null || de(!1), B == null || B(
3898
3901
  oe(),
3899
3902
  Y(),
3900
3903
  Te(),
@@ -3904,16 +3907,16 @@ function Pd(e, t) {
3904
3907
  return d && (R.current = void 0, dn({ values: {}, fields: $, reset: !0 })), { succeed: !0, id: ce };
3905
3908
  }
3906
3909
  if (!st() && oe() && ie)
3907
- return te.current = !1, de == null || de(!1), le == null || le(), { succeed: !0, id: oe() };
3910
+ return ne.current = !1, de == null || de(!1), le == null || le(), { succeed: !0, id: oe() };
3908
3911
  if (await cn())
3909
- return te.current = !1, ko(A), { succeed: !1, id: oe() };
3912
+ return ne.current = !1, ko(A), { succeed: !1, id: oe() };
3910
3913
  F(!0), xe == null || xe(!0);
3911
3914
  try {
3912
3915
  h === "api" ? await mo(L) : await ca(L), d && (R.current = void 0, dn({ values: {}, fields: $, reset: !0 })), await ze({ forceRefresh: !0 }), G = !0, rr.success(A("savedRegisters"));
3913
3916
  } catch (ce) {
3914
- te.current = !1, F(!1), xe == null || xe(!1), Re == null || Re(ce), rr.error(A("errorWhileSavingForm")), P(ce != null && ce.message ? ce.message : ce);
3917
+ ne.current = !1, F(!1), xe == null || xe(!1), Re == null || Re(ce), rr.error(A("errorWhileSavingForm")), P(ce != null && ce.message ? ce.message : ce);
3915
3918
  } finally {
3916
- te.current = !1, xe == null || xe(!1), F(!1);
3919
+ ne.current = !1, xe == null || xe(!1), F(!1);
3917
3920
  }
3918
3921
  return { succeed: G, id: oe() };
3919
3922
  }, po = ({
@@ -3950,7 +3953,7 @@ function Pd(e, t) {
3950
3953
  }, Zn = async ({
3951
3954
  elementHasLostFocus: L = !1
3952
3955
  }) => {
3953
- if (te.current)
3956
+ if (ne.current)
3954
3957
  return;
3955
3958
  const G = ir({
3956
3959
  source: q.current,
@@ -4101,7 +4104,7 @@ function Pd(e, t) {
4101
4104
  actionData: L,
4102
4105
  context: G
4103
4106
  }) {
4104
- const { closeParent: ie } = await (je == null ? void 0 : je({
4107
+ const { closeParent: ie } = await (Be == null ? void 0 : Be({
4105
4108
  actionData: L,
4106
4109
  fields: $,
4107
4110
  values: Y(),
@@ -4149,8 +4152,8 @@ function Pd(e, t) {
4149
4152
  ce && er(!1), nt(Ce);
4150
4153
  }
4151
4154
  }
4152
- const va = () => !E && !_ ? /* @__PURE__ */ i(Be, {}) : !n && !m || !x ? null : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(
4153
- Gl,
4155
+ const va = () => !E && !_ ? /* @__PURE__ */ i(He, {}) : !n && !m || !x ? null : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(
4156
+ jl,
4154
4157
  {
4155
4158
  getValues: Y,
4156
4159
  getPlainValues: ye,
@@ -4415,7 +4418,7 @@ const sn = ft(Pd), an = (e) => {
4415
4418
  }
4416
4419
  )
4417
4420
  ] }), { useToken: Ld } = Ge, cs = (e) => {
4418
- const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: s } = t, { token: a } = Ld(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = ne(He), { elementHasLostFocus: u } = c || {};
4421
+ const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: s } = t, { token: a } = Ld(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = te(je), { elementHasLostFocus: u } = c || {};
4419
4422
  return /* @__PURE__ */ i(Ie, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4420
4423
  bi,
4421
4424
  {
@@ -4431,7 +4434,7 @@ const sn = ft(Pd), an = (e) => {
4431
4434
  }
4432
4435
  ) });
4433
4436
  }, { useToken: jd } = Ge, $n = (e) => {
4434
- const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: s } = t, { token: a } = jd(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = ne(He), { elementHasLostFocus: u } = c || {};
4437
+ const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: s } = t, { token: a } = jd(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = te(je), { elementHasLostFocus: u } = c || {};
4435
4438
  return /* @__PURE__ */ i(Ie, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
4436
4439
  bi,
4437
4440
  {
@@ -4825,7 +4828,7 @@ const Mo = (e, t = "14px -apple-system") => {
4825
4828
  "{numberOfSelectedRows}",
4826
4829
  e.toString()
4827
4830
  ) + " ",
4828
- s ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(Rl, { onClick: u, style: { fontWeight: 600 }, children: c.selectAllRecords.replace(
4831
+ s ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ i(Rl, { onClick: u, style: { fontWeight: 600 }, children: c.selectAllRecords.replace(
4829
4832
  "{totalRecords}",
4830
4833
  t.toString()
4831
4834
  ) })
@@ -4960,9 +4963,9 @@ const cu = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ms,
4960
4963
  )
4961
4964
  ] });
4962
4965
  }, ro = (e) => {
4963
- const { id: t, model: n, context: r = {} } = e, [o, s] = C(), [a, l] = C(), c = ne(
4966
+ const { id: t, model: n, context: r = {} } = e, [o, s] = C(), [a, l] = C(), c = te(
4964
4967
  yt
4965
- ), { openRelate: u } = c || {}, f = ne(
4968
+ ), { openRelate: u } = c || {}, f = te(
4966
4969
  on
4967
4970
  ), { processAction: d } = f || {}, [h, p] = qe(
4968
4971
  k.getHandler().getView
@@ -5254,7 +5257,7 @@ const cu = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ms,
5254
5257
  }),
5255
5258
  [o]
5256
5259
  );
5257
- return we(() => a ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(
5260
+ return we(() => a ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ i(
5258
5261
  "div",
5259
5262
  {
5260
5263
  style: {
@@ -5309,7 +5312,7 @@ const cu = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ms,
5309
5312
  context: w,
5310
5313
  readonly: S,
5311
5314
  onSelectAllRecords: O
5312
- } = e, I = Q(null), [A, V] = C([]), F = Q(!1), [_, P] = C(), { t: E } = ge(), N = Q(r), H = ne(
5315
+ } = e, I = Q(null), [A, V] = C([]), F = Q(!1), [_, P] = C(), { t: E } = ge(), N = Q(r), H = te(
5313
5316
  it
5314
5317
  ), { title: M = void 0, setTitle: j = void 0 } = (T ? H : {}) || {}, $ = we(() => {
5315
5318
  if (_)
@@ -5344,7 +5347,7 @@ const cu = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ms,
5344
5347
  const q = A == null ? void 0 : A.filter(
5345
5348
  (pe) => d && d.includes(pe.id)
5346
5349
  ).length;
5347
- return c ? null : o === void 0 ? /* @__PURE__ */ i(Be, { className: "pb-4" }) : /* @__PURE__ */ D(Ne, { align: "bottom", className: "pb-4", children: [
5350
+ return c ? null : o === void 0 ? /* @__PURE__ */ i(He, { className: "pb-4" }) : /* @__PURE__ */ D(Ne, { align: "bottom", className: "pb-4", children: [
5348
5351
  /* @__PURE__ */ i(be, { span: O ? 8 : 12, children: /* @__PURE__ */ i(
5349
5352
  _a,
5350
5353
  {
@@ -5384,16 +5387,16 @@ const cu = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ms,
5384
5387
  const q = _.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
5385
5388
  if (!q || q.length === 0)
5386
5389
  return null;
5387
- const pe = [], te = (d == null ? void 0 : d.length) > 0 ? A.filter((z) => d.includes(z.id)) : A;
5390
+ const pe = [], ne = (d == null ? void 0 : d.length) > 0 ? A.filter((z) => d.includes(z.id)) : A;
5388
5391
  return q.forEach((z) => {
5389
- const ue = te.reduce((ve, ke) => ke[z.field] && !isNaN(ke[z.field]) ? ve + ke[z.field] : ve, 0);
5392
+ const ue = ne.reduce((ve, ke) => ke[z.field] && !isNaN(ke[z.field]) ? ve + ke[z.field] : ve, 0);
5390
5393
  pe.push(`${z.label}: ${Math.round(ue * 100) / 100}`);
5391
5394
  }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: pe.join(", ") });
5392
5395
  }, [A, d, _]), U = we(() => {
5393
5396
  if (_ !== null && $ && $.length > 0)
5394
5397
  return iu($, A, 600);
5395
5398
  }, [$, A, _]), R = we(() => p && (_ != null && _.columns.some((q) => q.sum !== void 0)) ? p - 30 : p, [p, _ == null ? void 0 : _.columns]);
5396
- return _ === null || !U || ((W = U == null ? void 0 : U.columns) == null ? void 0 : W.length) === 0 ? /* @__PURE__ */ i(Be, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(Vn, { children: [
5399
+ return _ === null || !U || ((W = U == null ? void 0 : U.columns) == null ? void 0 : W.length) === 0 ? /* @__PURE__ */ i(He, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(Vn, { children: [
5397
5400
  ae,
5398
5401
  /* @__PURE__ */ i(
5399
5402
  Cl,
@@ -5403,7 +5406,7 @@ const cu = (e) => /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(ms,
5403
5406
  columns: U.columns,
5404
5407
  dataSource: A,
5405
5408
  loading: c,
5406
- loadingComponent: /* @__PURE__ */ i(Be, {}),
5409
+ loadingComponent: /* @__PURE__ */ i(He, {}),
5407
5410
  onRowStyle: (q) => {
5408
5411
  if (m[q.id])
5409
5412
  return { color: m[q.id] };
@@ -5463,7 +5466,7 @@ const gs = (e) => {
5463
5466
  v == null || v([...de]), J([...de]);
5464
5467
  },
5465
5468
  [v]
5466
- ), te = K(() => y || re, [y, re]), z = K(async () => {
5469
+ ), ne = K(() => y || re, [y, re]), z = K(async () => {
5467
5470
  const de = await k.getHandler().nameSearch({
5468
5471
  model: t,
5469
5472
  payload: l,
@@ -5483,12 +5486,12 @@ const gs = (e) => {
5483
5486
  attrs: X
5484
5487
  }), _e = Oe[0];
5485
5488
  q.current = [..._e], Z(zt(Oe[1])), R(Dn(Oe[1]));
5486
- const je = _e.map((B) => B.id), Ve = p !== void 0 ? Gt({
5489
+ const Be = _e.map((B) => B.id), Ve = p !== void 0 ? Gt({
5487
5490
  resultsToSort: _e,
5488
5491
  sorter: p,
5489
5492
  fields: { ...d.fields, ...h.fields }
5490
5493
  }) : [...q.current];
5491
- pe(Ve), je.length > 0 ? g == null || g(0) : g == null || g(void 0);
5494
+ pe(Ve), Be.length > 0 ? g == null || g(0) : g == null || g(void 0);
5492
5495
  } else
5493
5496
  pe([]), g == null || g(void 0);
5494
5497
  V(!1), c.current = !0;
@@ -5508,7 +5511,7 @@ const gs = (e) => {
5508
5511
  async (de) => {
5509
5512
  const { params: fe, newOffset: he } = de || {}, Me = Jt(fe || S, b), { colors: X, status: Oe } = xt(d), _e = {};
5510
5513
  X && (_e.colors = X), Oe && (_e.status = Oe);
5511
- const { totalItems: je, results: Ve, attrsEvaluated: B } = await k.getHandler().searchForTree({
5514
+ const { totalItems: Be, results: Ve, attrsEvaluated: B } = await k.getHandler().searchForTree({
5512
5515
  params: Me,
5513
5516
  limit: W.current,
5514
5517
  offset: he || M,
@@ -5531,7 +5534,7 @@ const gs = (e) => {
5531
5534
  } else
5532
5535
  g == null || g(void 0);
5533
5536
  V(!1);
5534
- const Re = await je();
5537
+ const Re = await Be();
5535
5538
  ee(Re), f == null || f(Re);
5536
5539
  },
5537
5540
  [
@@ -5574,7 +5577,7 @@ const gs = (e) => {
5574
5577
  return;
5575
5578
  m == null || m(de);
5576
5579
  const fe = de !== void 0 ? Gt({
5577
- resultsToSort: te(),
5580
+ resultsToSort: ne(),
5578
5581
  sorter: de,
5579
5582
  fields: { ...d.fields, ...h.fields }
5580
5583
  }) : [...q.current];
@@ -5583,7 +5586,7 @@ const gs = (e) => {
5583
5586
  [
5584
5587
  p,
5585
5588
  m,
5586
- te,
5589
+ ne,
5587
5590
  d == null ? void 0 : d.fields,
5588
5591
  h == null ? void 0 : h.fields,
5589
5592
  pe
@@ -5628,9 +5631,9 @@ const gs = (e) => {
5628
5631
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
5629
5632
  context: u
5630
5633
  });
5631
- return pe([...te(), ...he]), zn(xt(d), he);
5634
+ return pe([...ne(), ...he]), zn(xt(d), he);
5632
5635
  },
5633
- [d, t, u, te, pe]
5636
+ [d, t, u, ne, pe]
5634
5637
  ), xe = K(async () => await k.getHandler().searchAllIds({
5635
5638
  params: Jt(S, b),
5636
5639
  model: t,
@@ -5647,7 +5650,7 @@ const gs = (e) => {
5647
5650
  page: N,
5648
5651
  offset: M,
5649
5652
  limit: W.current,
5650
- getResults: te,
5653
+ getResults: ne,
5651
5654
  requestPageChange: Pe,
5652
5655
  changeSort: ke,
5653
5656
  fetchChildrenForRecord: We,
@@ -5671,9 +5674,9 @@ function Vu(e, t) {
5671
5674
  rootTree: f = !1,
5672
5675
  parentContext: d = {},
5673
5676
  onChangeSelectedRowKeys: h
5674
- } = e, [p, m] = C(!1), [g, v] = C(!1), y = Q(!1), b = Q(null), [x, T] = C(), [w, S] = C(), [O, I] = C(), [A, V] = C(), [F, _] = C(200), P = Q(), { height: E } = qn(), N = ne(
5677
+ } = e, [p, m] = C(!1), [g, v] = C(!1), y = Q(!1), b = Q(null), [x, T] = C(), [w, S] = C(), [O, I] = C(), [A, V] = C(), [F, _] = C(200), P = Q(), { height: E } = qn(), N = te(
5675
5678
  on
5676
- ), { processAction: H } = N || {}, M = ne(
5679
+ ), { processAction: H } = N || {}, M = te(
5677
5680
  it
5678
5681
  ), {
5679
5682
  setResults: j = void 0,
@@ -5688,7 +5691,7 @@ function Vu(e, t) {
5688
5691
  setSearchVisible: W = void 0,
5689
5692
  sorter: q = void 0,
5690
5693
  setSorter: pe = void 0,
5691
- setTotalItems: te = void 0,
5694
+ setTotalItems: ne = void 0,
5692
5695
  setSearchTreeNameSearch: z = void 0,
5693
5696
  setTreeIsLoading: ue = void 0,
5694
5697
  searchValues: ve = {},
@@ -5710,7 +5713,7 @@ function Vu(e, t) {
5710
5713
  page: X,
5711
5714
  limit: Oe,
5712
5715
  offset: _e,
5713
- getResults: je,
5716
+ getResults: Be,
5714
5717
  requestPageChange: Ve,
5715
5718
  changeSort: B,
5716
5719
  fetchChildrenForRecord: le,
@@ -5739,7 +5742,7 @@ function Vu(e, t) {
5739
5742
  resultsActionView: re,
5740
5743
  domain: c,
5741
5744
  currentId: ee,
5742
- setActionViewTotalItems: te,
5745
+ setActionViewTotalItems: ne,
5743
5746
  limit: Fe,
5744
5747
  setLimit: Pe,
5745
5748
  clearSelection: (cn = b.current) == null ? void 0 : cn.unselectAll
@@ -5860,7 +5863,7 @@ function Vu(e, t) {
5860
5863
  limit: Oe,
5861
5864
  page: X,
5862
5865
  treeView: w,
5863
- results: je(),
5866
+ results: Be(),
5864
5867
  onRequestPageChange: Ve,
5865
5868
  loading: fe,
5866
5869
  onRowClicked: Ee,
@@ -5885,7 +5888,7 @@ function Vu(e, t) {
5885
5888
  Re,
5886
5889
  le,
5887
5890
  O,
5888
- je,
5891
+ Be,
5889
5892
  Fe,
5890
5893
  Oe,
5891
5894
  _e,
@@ -5909,7 +5912,7 @@ function Vu(e, t) {
5909
5912
  l,
5910
5913
  w
5911
5914
  ]), On = A || Me;
5912
- return On ? /* @__PURE__ */ i(tt, { className: "mt-10", message: On, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ i(Be, {}) : vt() });
5915
+ return On ? /* @__PURE__ */ i(tt, { className: "mt-10", message: On, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ i(He, {}) : vt() });
5913
5916
  }
5914
5917
  const ys = ft(Vu), { error: Du } = rt, Et = (e) => {
5915
5918
  Du({
@@ -6058,7 +6061,7 @@ const ys = ft(Vu), { error: Du } = rt, Et = (e) => {
6058
6061
  context: l,
6059
6062
  id: c,
6060
6063
  domain: u
6061
- } = r, f = o && !a ? { backgroundColor: vs.colorPrimaryBg } : void 0, [d, h] = C(!1), [p, m] = C(!1), [g, v] = C(!1), [y, b] = C(), x = Q(!1), [T, w] = C(""), S = Q(), O = ne(He), { domain: I, getValues: A, getFields: V, getContext: F, elementHasLostFocus: _ } = O || {}, P = Q([]), [E, N] = C([]), H = t && t[0] || void 0, M = t && t[1] || "";
6064
+ } = r, f = o && !a ? { backgroundColor: vs.colorPrimaryBg } : void 0, [d, h] = C(!1), [p, m] = C(!1), [g, v] = C(!1), [y, b] = C(), x = Q(!1), [T, w] = C(""), S = Q(), O = te(je), { domain: I, getValues: A, getFields: V, getContext: F, elementHasLostFocus: _ } = O || {}, P = Q([]), [E, N] = C([]), H = t && t[0] || void 0, M = t && t[1] || "";
6062
6065
  me(() => {
6063
6066
  !Array.isArray(t) && t && J(t);
6064
6067
  }, [t]), me(() => {
@@ -6466,9 +6469,9 @@ function Hu(e) {
6466
6469
  }
6467
6470
  const Uu = (e) => {
6468
6471
  var Ke;
6469
- const { value: t, onChange: n, ooui: r, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: c, setItemIndex: u } = ne(
6472
+ const { value: t, onChange: n, ooui: r, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: c, setItemIndex: u } = te(
6470
6473
  ln
6471
- ), f = ne(He), {
6474
+ ), f = te(je), {
6472
6475
  activeId: d,
6473
6476
  getFields: h,
6474
6477
  getValues: p,
@@ -6480,7 +6483,7 @@ const Uu = (e) => {
6480
6483
  relation: U,
6481
6484
  context: R,
6482
6485
  domain: W
6483
- } = r, q = r.type === "many2many", { id: pe } = r, te = s.filter(
6486
+ } = r, q = r.type === "many2many", { id: pe } = r, ne = s.filter(
6484
6487
  (Y) => (Y.values || Y.treeValues) && Y.operation !== "pendingRemove"
6485
6488
  ), z = Q();
6486
6489
  me(() => {
@@ -6503,7 +6506,7 @@ const Uu = (e) => {
6503
6506
  items: Hu(Y)
6504
6507
  });
6505
6508
  }, ke = async () => {
6506
- await Fe(), c > te.length - 1 && c !== 0 && u(0);
6509
+ await Fe(), c > ne.length - 1 && c !== 0 && u(0);
6507
6510
  }, Fe = async (Y) => {
6508
6511
  var ye, Te, Se;
6509
6512
  w(!0), x(!1), O(void 0);
@@ -6554,12 +6557,12 @@ const Uu = (e) => {
6554
6557
  u(c - 1);
6555
6558
  }) : u(c - 1));
6556
6559
  }, xe = () => {
6557
- const Y = te.length;
6560
+ const Y = ne.length;
6558
6561
  c < Y - 1 && (a === "form" ? fe(() => {
6559
6562
  u(c + 1);
6560
6563
  }) : u(c + 1));
6561
6564
  }, de = async () => {
6562
- const Y = te[c].id, ye = (await k.getHandler().readObjects({
6565
+ const Y = ne[c].id, ye = (await k.getHandler().readObjects({
6563
6566
  model: U,
6564
6567
  ids: [Y],
6565
6568
  fields: o.get("form").fields,
@@ -6612,22 +6615,22 @@ const Uu = (e) => {
6612
6615
  }, Oe = async () => {
6613
6616
  w(!0), x(!1), O(void 0);
6614
6617
  try {
6615
- if (te[c].id > 0) {
6616
- const Y = s.map((ye) => ye.id === te[c].id ? {
6618
+ if (ne[c].id > 0) {
6619
+ const Y = s.map((ye) => ye.id === ne[c].id ? {
6617
6620
  ...ye,
6618
6621
  operation: "pendingRemove"
6619
6622
  } : ye);
6620
6623
  ve(Y);
6621
6624
  } else
6622
6625
  ve(
6623
- s.filter((Y) => Y.id !== te[c].id)
6626
+ s.filter((Y) => Y.id !== ne[c].id)
6624
6627
  );
6625
6628
  } catch (Y) {
6626
6629
  O(Y);
6627
6630
  }
6628
6631
  u(0), w(!1);
6629
6632
  }, _e = async () => {
6630
- const Y = te.filter((ye) => E.includes(ye.id));
6633
+ const Y = ne.filter((ye) => E.includes(ye.id));
6631
6634
  w(!0), x(!1), O(void 0);
6632
6635
  try {
6633
6636
  const ye = Y.map((Se) => Se.id), Te = s.filter((Se) => !(ye.includes(Se.id) && Se.id < 0)).map((Se) => ye.includes(Se.id) ? {
@@ -6639,7 +6642,7 @@ const Uu = (e) => {
6639
6642
  O(ye);
6640
6643
  }
6641
6644
  u(0), w(!1);
6642
- }, je = (Y, ye, Te, Se = !1) => {
6645
+ }, Be = (Y, ye, Te, Se = !1) => {
6643
6646
  let De;
6644
6647
  if (Se)
6645
6648
  De = s.concat({
@@ -6712,18 +6715,18 @@ const Uu = (e) => {
6712
6715
  const Re = () => {
6713
6716
  var ye, Te, Se, De;
6714
6717
  if (a === "form")
6715
- return te.length === 0 ? y("noCurrentEntries") : a !== z.current && s.some((Ee) => !Ee.values) ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(
6718
+ return ne.length === 0 ? y("noCurrentEntries") : a !== z.current && s.some((Ee) => !Ee.values) ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ i(
6716
6719
  sn,
6717
6720
  {
6718
6721
  formView: o.get("form"),
6719
- values: (ye = te[c]) == null ? void 0 : ye.values,
6722
+ values: (ye = ne[c]) == null ? void 0 : ye.values,
6720
6723
  parentContext: { ...m == null ? void 0 : m(), ...R },
6721
6724
  model: U,
6722
- id: (Te = te[c]) == null ? void 0 : Te.id,
6725
+ id: (Te = ne[c]) == null ? void 0 : Te.id,
6723
6726
  submitMode: "values",
6724
6727
  onFieldsChange: (Ee) => {
6725
6728
  var Ye;
6726
- const lt = (Ye = te[c]) == null ? void 0 : Ye.id, st = s.map((vt) => vt.id === lt ? {
6729
+ const lt = (Ye = ne[c]) == null ? void 0 : Ye.id, st = s.map((vt) => vt.id === lt ? {
6727
6730
  ...vt,
6728
6731
  operation: vt.operation === "original" ? "pendingUpdate" : vt.operation,
6729
6732
  values: { ...Ee, id: lt },
@@ -6735,19 +6738,19 @@ const Uu = (e) => {
6735
6738
  }
6736
6739
  );
6737
6740
  let Y = [];
6738
- if (te.some((Ee) => Ee.treeValues) && (Y = $ ? Gt({
6739
- resultsToSort: te.map((Ee) => Ee.treeValues),
6741
+ if (ne.some((Ee) => Ee.treeValues) && (Y = $ ? Gt({
6742
+ resultsToSort: ne.map((Ee) => Ee.treeValues),
6740
6743
  sorter: $,
6741
6744
  fields: {
6742
6745
  ...o.get("tree").fields,
6743
6746
  ...((Se = o.get("form")) == null ? void 0 : Se.fields) || {}
6744
6747
  }
6745
- }) : te.map((Ee) => Ee.treeValues)), a === "tree")
6748
+ }) : ne.map((Ee) => Ee.treeValues)), a === "tree")
6746
6749
  return /* @__PURE__ */ i(
6747
6750
  bn,
6748
6751
  {
6749
- total: te.length,
6750
- limit: te.length,
6752
+ total: ne.length,
6753
+ limit: ne.length,
6751
6754
  treeView: o.get("tree"),
6752
6755
  results: Y,
6753
6756
  loading: T,
@@ -6780,7 +6783,7 @@ const Uu = (e) => {
6780
6783
  if (S)
6781
6784
  return /* @__PURE__ */ i(tt, { className: "mt-10", message: S, type: "error", banner: !0 });
6782
6785
  const oe = H;
6783
- return T ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(se, { children: [
6786
+ return T ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ D(se, { children: [
6784
6787
  /* @__PURE__ */ i(
6785
6788
  xs,
6786
6789
  {
@@ -6789,7 +6792,7 @@ const Uu = (e) => {
6789
6792
  readOnly: Z || !1,
6790
6793
  isMany2Many: q,
6791
6794
  formHasChanges: b,
6792
- totalItems: te.length,
6795
+ totalItems: ne.length,
6793
6796
  currentItemIndex: c,
6794
6797
  onDelete: he,
6795
6798
  onCreateItem: Me,
@@ -6813,7 +6816,7 @@ const Uu = (e) => {
6813
6816
  values: _ == null ? void 0 : _.values,
6814
6817
  defaultValues: _ == null ? void 0 : _.defaultValues,
6815
6818
  visible: I,
6816
- onSubmitSucceed: je,
6819
+ onSubmitSucceed: Be,
6817
6820
  parentContext: { ...m == null ? void 0 : m(), ...R },
6818
6821
  onCancel: () => {
6819
6822
  M(!1), A(!1);
@@ -6850,7 +6853,7 @@ const Uu = (e) => {
6850
6853
  getValues: o,
6851
6854
  getContext: s,
6852
6855
  domain: a
6853
- } = ne(He) || {};
6856
+ } = te(je) || {};
6854
6857
  me(() => {
6855
6858
  l();
6856
6859
  }, [a]);
@@ -6933,7 +6936,7 @@ const Uu = (e) => {
6933
6936
  formView: o,
6934
6937
  triggerChange: s
6935
6938
  }) => {
6936
- const [a, l] = C(!1), { itemIndex: c } = ne(ln), { t: u } = ge();
6939
+ const [a, l] = C(!1), { itemIndex: c } = te(ln), { t: u } = ge();
6937
6940
  me(() => {
6938
6941
  const m = e[c];
6939
6942
  (!m || (m == null ? void 0 : m.operation) === "original") && l(!1);
@@ -6999,7 +7002,7 @@ const Uu = (e) => {
6999
7002
  onChange: s
7000
7003
  }) => {
7001
7004
  var c, u;
7002
- const { itemIndex: a } = ne(ln), { t: l } = ge();
7005
+ const { itemIndex: a } = te(ln), { t: l } = ge();
7003
7006
  return t.length === 0 ? l("noCurrentEntries") : /* @__PURE__ */ i(
7004
7007
  sn,
7005
7008
  {
@@ -7030,7 +7033,7 @@ const Uu = (e) => {
7030
7033
  selectedRowKeys: o,
7031
7034
  setSelectedRowKeys: s
7032
7035
  }) => {
7033
- const { t: a } = ge(), { currentView: l, itemIndex: c, setItemIndex: u } = ne(
7036
+ const { t: a } = ge(), { currentView: l, itemIndex: c, setItemIndex: u } = te(
7034
7037
  ln
7035
7038
  ), f = K(async () => {
7036
7039
  const m = Ju({
@@ -7392,16 +7395,16 @@ const Xu = ({
7392
7395
  sortFields: H
7393
7396
  }), U = zn(o, J), R = $.map((W) => {
7394
7397
  var pe;
7395
- const q = U.find((te) => te.id === W);
7396
- return q || ((pe = M.find((te) => te.id === W)) == null ? void 0 : pe.treeValues);
7398
+ const q = U.find((ne) => ne.id === W);
7399
+ return q || ((pe = M.find((ne) => ne.id === W)) == null ? void 0 : pe.treeValues);
7397
7400
  });
7398
7401
  return R.sort((W, q) => {
7399
7402
  const pe = U.findIndex(
7400
7403
  (z) => z.id === W.id
7401
- ), te = U.findIndex(
7404
+ ), ne = U.findIndex(
7402
7405
  (z) => z.id === q.id
7403
7406
  );
7404
- return pe - te;
7407
+ return pe - ne;
7405
7408
  }), b.current = { ...b.current, ...ae }, !x.current && Z && (x.current = {}), Z && (x.current = { ...x.current, ...Z }), R;
7406
7409
  },
7407
7410
  [a, o]
@@ -7415,7 +7418,7 @@ const Xu = ({
7415
7418
  model: u
7416
7419
  })
7417
7420
  );
7418
- return F ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(
7421
+ return F ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ i(
7419
7422
  Bi,
7420
7423
  {
7421
7424
  ref: y,
@@ -7537,7 +7540,7 @@ const Xu = ({
7537
7540
  });
7538
7541
  }, af = ["form", "tree", "graph"], lf = (e) => {
7539
7542
  var de;
7540
- const t = Q(null), { value: n, onChange: r, ooui: o, views: s } = e, { items: a = [] } = n || {}, l = qu({ one2manyItems: a }), { currentView: c, setCurrentView: u, itemIndex: f, setItemIndex: d } = ne(
7543
+ const t = Q(null), { value: n, onChange: r, ooui: o, views: s } = e, { items: a = [] } = n || {}, l = qu({ one2manyItems: a }), { currentView: c, setCurrentView: u, itemIndex: f, setItemIndex: d } = te(
7541
7544
  ln
7542
7545
  ), {
7543
7546
  readOnly: h,
@@ -7545,7 +7548,7 @@ const Xu = ({
7545
7548
  context: m,
7546
7549
  domain: g,
7547
7550
  id: v
7548
- } = o, y = ne(He), {
7551
+ } = o, y = te(je), {
7549
7552
  activeId: b,
7550
7553
  getContext: x,
7551
7554
  fetchValues: T
@@ -7602,7 +7605,7 @@ const Xu = ({
7602
7605
  onCancelFormModal: W,
7603
7606
  onFormModalSubmitSucceed: q,
7604
7607
  createItem: pe,
7605
- openItemInFormModal: te
7608
+ openItemInFormModal: ne
7606
7609
  } = Xu({
7607
7610
  activeId: b,
7608
7611
  inv_field: o.inv_field,
@@ -7643,7 +7646,7 @@ const Xu = ({
7643
7646
  }, $e = ut(
7644
7647
  (fe) => {
7645
7648
  var he;
7646
- (he = s.get("form")) != null && he.fields && te(fe);
7649
+ (he = s.get("form")) != null && he.fields && ne(fe);
7647
7650
  },
7648
7651
  // eslint-disable-next-line react-hooks/exhaustive-deps
7649
7652
  [l]
@@ -7771,7 +7774,7 @@ const Xu = ({
7771
7774
  var w;
7772
7775
  const { ooui: t } = e, { mode: n, relation: r, views: o, required: s, context: a } = t;
7773
7776
  let l;
7774
- const [c, u] = C(!0), [f, d] = C(), [h, p] = C(/* @__PURE__ */ new Map()), m = ne(He), { getContext: g, formView: v } = m || {}, { view_id: y } = v || {};
7777
+ const [c, u] = C(!0), [f, d] = C(), [h, p] = C(/* @__PURE__ */ new Map()), m = te(je), { getContext: g, formView: v } = m || {}, { view_id: y } = v || {};
7775
7778
  ht(() => {
7776
7779
  x();
7777
7780
  }, [t]);
@@ -7798,7 +7801,7 @@ const Xu = ({
7798
7801
  u(!1);
7799
7802
  }
7800
7803
  };
7801
- return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ i(Be, {}) : f ? /* @__PURE__ */ i(tt, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Mu, { initialView: l, children: /* @__PURE__ */ i(
7804
+ return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ i(He, {}) : f ? /* @__PURE__ */ i(tt, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Mu, { initialView: l, children: /* @__PURE__ */ i(
7802
7805
  Ie,
7803
7806
  {
7804
7807
  required: s,
@@ -7832,7 +7835,7 @@ const Xu = ({
7832
7835
  const { ooui: t } = e, { required: n } = t;
7833
7836
  return /* @__PURE__ */ i(Ie, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(pf, { ooui: t }) });
7834
7837
  }, pf = (e) => {
7835
- const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = ff(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = Q(), [f, d] = C(), h = ne(He), { elementHasLostFocus: p } = h || {};
7838
+ const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = ff(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = Q(), [f, d] = C(), h = te(je), { elementHasLostFocus: p } = h || {};
7836
7839
  me(() => {
7837
7840
  d(fs(n));
7838
7841
  }, [n]);
@@ -7905,7 +7908,7 @@ function gf(e) {
7905
7908
  )) });
7906
7909
  }
7907
7910
  const { useToken: yf } = Ge, { TextArea: xr } = at, vf = (e) => {
7908
- const { ooui: t } = e, { id: n, readOnly: r, required: o, height: s, translatable: a } = t, { token: l } = yf(), c = o && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ne(He), { elementHasLostFocus: f } = u || {};
7911
+ const { ooui: t } = e, { id: n, readOnly: r, required: o, height: s, translatable: a } = t, { token: l } = yf(), c = o && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, u = te(je), { elementHasLostFocus: f } = u || {};
7909
7912
  return /* @__PURE__ */ i(Ie, { required: o, ...e, children: a ? /* @__PURE__ */ i(
7910
7913
  wf,
7911
7914
  {
@@ -7934,7 +7937,7 @@ const { useToken: yf } = Ge, { TextArea: xr } = at, vf = (e) => {
7934
7937
  onChange: r,
7935
7938
  height: o
7936
7939
  }) => {
7937
- const s = ne(He), {
7940
+ const s = te(je), {
7938
7941
  activeId: a,
7939
7942
  activeModel: l,
7940
7943
  fetchValues: c,
@@ -8370,7 +8373,7 @@ const { useToken: yf } = Ge, { TextArea: xr } = at, vf = (e) => {
8370
8373
  const { ooui: t } = e, { required: n } = t;
8371
8374
  return /* @__PURE__ */ i(Ie, { required: n, ...e, children: /* @__PURE__ */ i(Mf, { ooui: t }) });
8372
8375
  }, Mf = (e) => {
8373
- const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = $f(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = Q(null), { setFieldValue: f, getFieldValue: d } = ne(He) || {}, { t: h } = ge(), p = n ? fc(n) : "", m = (x) => {
8376
+ const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = $f(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = Q(null), { setFieldValue: f, getFieldValue: d } = te(je) || {}, { t: h } = ge(), p = n ? fc(n) : "", m = (x) => {
8374
8377
  r == null || r(x);
8375
8378
  };
8376
8379
  async function g() {
@@ -8560,7 +8563,7 @@ function Ze(e) {
8560
8563
  );
8561
8564
  }
8562
8565
  function Rs(e) {
8563
- const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: r } = ne(
8566
+ const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: r } = te(
8564
8567
  it
8565
8568
  ), { t: o } = ge(), s = () => {
8566
8569
  if (n) {
@@ -8728,7 +8731,7 @@ function Hf(e) {
8728
8731
  onAddNewAttachment: r,
8729
8732
  onListAllAttachments: o,
8730
8733
  onViewAttachmentDetails: s
8731
- } = e, { formRef: a } = ne(it), [l, c] = C(!1), [u, f] = C([]), [d, h] = C(!1), { t: p } = ge(), m = K(async () => {
8734
+ } = e, { formRef: a } = te(it), [l, c] = C(!1), [u, f] = C([]), [d, h] = C(!1), { t: p } = ge(), m = K(async () => {
8732
8735
  if (!(!t || t.length === 0)) {
8733
8736
  c(!0);
8734
8737
  try {
@@ -8807,7 +8810,7 @@ function Hf(e) {
8807
8810
  closable: !1,
8808
8811
  centered: !0,
8809
8812
  maskClosable: !1,
8810
- children: /* @__PURE__ */ i(Be, {})
8813
+ children: /* @__PURE__ */ i(He, {})
8811
8814
  }
8812
8815
  )
8813
8816
  ] });
@@ -8839,7 +8842,7 @@ function Uf({ toolbar: e }) {
8839
8842
  setPreviousView: O,
8840
8843
  goToResourceId: I,
8841
8844
  isActive: A
8842
- } = ne(it);
8845
+ } = te(it);
8843
8846
  Ft(
8844
8847
  "pagedown",
8845
8848
  () => {
@@ -8869,9 +8872,9 @@ function Uf({ toolbar: e }) {
8869
8872
  { enableOnFormTags: !0, preventDefault: !0 },
8870
8873
  [S, n, A]
8871
8874
  );
8872
- const { t: V } = ge(), F = ne(
8875
+ const { t: V } = ge(), F = te(
8873
8876
  on
8874
- ), { processAction: _ } = F || {}, P = ne(
8877
+ ), { processAction: _ } = F || {}, P = te(
8875
8878
  yt
8876
8879
  ), { openRelate: E, openDefaultActionForModel: N } = P || {};
8877
8880
  function H(R) {
@@ -8968,7 +8971,7 @@ function Uf({ toolbar: e }) {
8968
8971
  }
8969
8972
  return n ? /* @__PURE__ */ D(Qe, { wrap: !0, children: [
8970
8973
  b && /* @__PURE__ */ D(se, { children: [
8971
- /* @__PURE__ */ i(Be, {}),
8974
+ /* @__PURE__ */ i(He, {}),
8972
8975
  Nt(),
8973
8976
  Nt()
8974
8977
  ] }),
@@ -9208,7 +9211,7 @@ function Wo(e, t) {
9208
9211
  };
9209
9212
  }
9210
9213
  const { useToken: Wf } = Ge, Vs = (e) => {
9211
- const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = Wf(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = ne(He), { elementHasLostFocus: h } = d || {}, [p, m] = C(!1), [g, v] = C(!1);
9214
+ const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = Wf(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = te(je), { elementHasLostFocus: h } = d || {}, [p, m] = C(!1), [g, v] = C(!1);
9212
9215
  me(() => {
9213
9216
  l && !p && v(!1), !n && !l && (m(!0), v(!0));
9214
9217
  }, [p, l]);
@@ -9404,7 +9407,7 @@ function zf({ refreshGraph: e }) {
9404
9407
  graphIsLoading: c,
9405
9408
  previousView: u,
9406
9409
  setPreviousView: f
9407
- } = ne(it);
9410
+ } = te(it);
9408
9411
  return /* @__PURE__ */ D(Qe, { wrap: !0, children: [
9409
9412
  /* @__PURE__ */ i(
9410
9413
  Ds,
@@ -9460,7 +9463,7 @@ function Xn(e) {
9460
9463
  results: c,
9461
9464
  totalItems: u,
9462
9465
  selectedRowItems: f
9463
- } = ne(it), { t: d } = ge(), { token: h } = Jf();
9466
+ } = te(it), { t: d } = ge(), { token: h } = Jf();
9464
9467
  function p() {
9465
9468
  if ((s == null ? void 0 : s.type) === "form")
9466
9469
  return a ? u === 0 ? /* @__PURE__ */ D(se, { children: [
@@ -9555,7 +9558,7 @@ function Xn(e) {
9555
9558
  );
9556
9559
  }
9557
9560
  const Qf = (e) => {
9558
- const { viewData: t, visible: n, model: r, context: o, domain: s, formView: a, treeView: l } = e, c = Q(), u = ne(
9561
+ const { viewData: t, visible: n, model: r, context: o, domain: s, formView: a, treeView: l } = e, c = Q(), u = te(
9559
9562
  it
9560
9563
  ), {
9561
9564
  setResults: f = void 0,
@@ -9637,7 +9640,7 @@ const Qf = (e) => {
9637
9640
  showLimitOptions: !1
9638
9641
  }
9639
9642
  ),
9640
- $ ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(
9643
+ $ ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ i(
9641
9644
  tn,
9642
9645
  {
9643
9646
  ref: c,
@@ -9754,9 +9757,9 @@ function tm(e) {
9754
9757
  limit: S,
9755
9758
  totalItems: O,
9756
9759
  isActive: I
9757
- } = ne(it), { parentContext: A = {}, treeExpandable: V, toolbar: F } = e, _ = Jn(
9760
+ } = te(it), { parentContext: A = {}, treeExpandable: V, toolbar: F } = e, _ = Jn(
9758
9761
  nn.FEATURE_ADVANCED_EXPORT
9759
- ), { t: P } = ge(), E = ne(
9762
+ ), { t: P } = ge(), E = te(
9760
9763
  on
9761
9764
  ), { processAction: N } = E || {}, [H, M] = C(!1);
9762
9765
  Ft(
@@ -9844,7 +9847,7 @@ function tm(e) {
9844
9847
  }
9845
9848
  return /* @__PURE__ */ D(Qe, { wrap: !0, children: [
9846
9849
  b && /* @__PURE__ */ D(se, { children: [
9847
- /* @__PURE__ */ i(Be, {}),
9850
+ /* @__PURE__ */ i(He, {}),
9848
9851
  It(),
9849
9852
  It()
9850
9853
  ] }),
@@ -10130,7 +10133,7 @@ const nm = ({
10130
10133
  children: [
10131
10134
  /* @__PURE__ */ i(be, { span: 12, children: n ? /* @__PURE__ */ i("span", { children: `${t.length} ${r("selectedRegisters")}` }) : /* @__PURE__ */ i(sm, { selectedRowKeys: t }) }),
10132
10135
  /* @__PURE__ */ D(be, { span: 12, style: { paddingRight: 10 }, className: "text-right", children: [
10133
- e === void 0 && /* @__PURE__ */ i(Be, {}),
10136
+ e === void 0 && /* @__PURE__ */ i(He, {}),
10134
10137
  e != null && `${r("totalRegisters")} ${e}`
10135
10138
  ] })
10136
10139
  ]
@@ -11259,7 +11262,7 @@ function hh(e, t) {
11259
11262
  loading: W,
11260
11263
  getColumnState: q,
11261
11264
  updateColumnState: pe
11262
- } = Ts(R), te = we(
11265
+ } = Ts(R), ne = we(
11263
11266
  () => Jt(j || [], a),
11264
11267
  [a, j]
11265
11268
  ), z = K(
@@ -11272,7 +11275,7 @@ function hh(e, t) {
11272
11275
  return [];
11273
11276
  const oe = {};
11274
11277
  Z.colors && (oe.colors = Z.colors), Z.status && (oe.status = Z.status);
11275
- const Ke = J ? a : te;
11278
+ const Ke = J ? a : ne;
11276
11279
  let Y = !1;
11277
11280
  const ye = `${JSON.stringify(Ke)}-${J}`;
11278
11281
  ye !== Ve.current && (Ve.current = ye, Y = !0, b(void 0));
@@ -11313,7 +11316,7 @@ function hh(e, t) {
11313
11316
  },
11314
11317
  [
11315
11318
  a,
11316
- te,
11319
+ ne,
11317
11320
  n,
11318
11321
  J,
11319
11322
  u,
@@ -11368,7 +11371,7 @@ function hh(e, t) {
11368
11371
  return;
11369
11372
  const Re = await k.getHandler().searchAllIds(
11370
11373
  {
11371
- params: J ? a : te,
11374
+ params: J ? a : ne,
11372
11375
  model: n,
11373
11376
  context: u,
11374
11377
  totalItems: y
@@ -11386,7 +11389,7 @@ function hh(e, t) {
11386
11389
  }) : le() : _ == null || _([]);
11387
11390
  }, [
11388
11391
  a,
11389
- te,
11392
+ ne,
11390
11393
  n,
11391
11394
  J,
11392
11395
  u,
@@ -11448,14 +11451,14 @@ function hh(e, t) {
11448
11451
  y,
11449
11452
  Z,
11450
11453
  pe
11451
- ]), _e = Q(j), je = Q(V), Ve = Q();
11454
+ ]), _e = Q(j), Be = Q(V), Ve = Q();
11452
11455
  return ht(() => {
11453
11456
  var Re;
11454
11457
  const B = !ia(
11455
11458
  j,
11456
11459
  _e.current
11457
- ), le = je.current && !V;
11458
- B && le && (Ve.current = void 0, (Re = m.current) == null || Re.refresh()), _e.current = j, je.current = V;
11460
+ ), le = Be.current && !V;
11461
+ B && le && (Ve.current = void 0, (Re = m.current) == null || Re.refresh()), _e.current = j, Be.current = V;
11459
11462
  }, [j, V]), /* @__PURE__ */ D(qt, { children: [
11460
11463
  /* @__PURE__ */ i(
11461
11464
  im,
@@ -11474,7 +11477,7 @@ function hh(e, t) {
11474
11477
  height: `${w}px`,
11475
11478
  ...l ? {} : { display: "none" }
11476
11479
  },
11477
- children: I || W ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(qt, { children: [
11480
+ children: I || W ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ D(qt, { children: [
11478
11481
  Oe,
11479
11482
  /* @__PURE__ */ i(
11480
11483
  uh,
@@ -11513,7 +11516,7 @@ const gh = ft(hh), yh = (e) => {
11513
11516
  setCurrentView: d,
11514
11517
  availableViews: h,
11515
11518
  searchTreeNameSearch: p
11516
- } = e, m = we(() => a != null && a.arch ? bc(a == null ? void 0 : a.arch, "infinite") : !1, [a]), { currentView: g, setPreviousView: v } = ne(
11519
+ } = e, m = we(() => a != null && a.arch ? bc(a == null ? void 0 : a.arch, "infinite") : !1, [a]), { currentView: g, setPreviousView: v } = te(
11517
11520
  it
11518
11521
  ), y = K(
11519
11522
  (b) => {
@@ -11591,7 +11594,7 @@ const gh = ft(hh), yh = (e) => {
11591
11594
  );
11592
11595
  };
11593
11596
  function wh() {
11594
- const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: r } = ne(fo), { t: o } = ge();
11597
+ const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: r } = te(fo), { t: o } = ge();
11595
11598
  return /* @__PURE__ */ D(Qe, { wrap: !0, children: [
11596
11599
  /* @__PURE__ */ i(
11597
11600
  Ze,
@@ -11642,7 +11645,7 @@ function bh() {
11642
11645
  return /* @__PURE__ */ i("div", { className: "inline-block w-2" });
11643
11646
  }
11644
11647
  const Sh = (e) => {
11645
- const { dashboardData: t, visible: n } = e, r = Q(), o = ne(
11648
+ const { dashboardData: t, visible: n } = e, r = Q(), o = te(
11646
11649
  yt
11647
11650
  ), { openShortcut: s } = o || {};
11648
11651
  return !t || !n ? null : /* @__PURE__ */ D(
@@ -11702,10 +11705,10 @@ function xh(e, t) {
11702
11705
  limit: v
11703
11706
  } = e, [y, b] = C(), [x, T] = C([]), [w, S] = C(!0), O = h || void 0, [I, A] = C(
11704
11707
  O
11705
- ), [V, F] = C([]), [_, P] = C(), [E, N] = C([]), [H, M] = C(), [j, $] = C(0), [ee, re] = C(!1), [J, ae] = C(!1), [Z, U] = C(), { t: R } = ge(), W = Q(), q = Q(), pe = ne(
11708
+ ), [V, F] = C([]), [_, P] = C(), [E, N] = C([]), [H, M] = C(), [j, $] = C(0), [ee, re] = C(!1), [J, ae] = C(!1), [Z, U] = C(), { t: R } = ge(), W = Q(), q = Q(), pe = te(
11706
11709
  yt
11707
11710
  ), {
11708
- setCurrentView: te,
11711
+ setCurrentView: ne,
11709
11712
  setCurrentId: z,
11710
11713
  tabs: ue,
11711
11714
  activeKey: ve,
@@ -11726,7 +11729,7 @@ function xh(e, t) {
11726
11729
  function $e(X) {
11727
11730
  b(X);
11728
11731
  const Oe = { action_id: p, action_type: m };
11729
- te == null || te({ ...X, extra: Oe });
11732
+ ne == null || ne({ ...X, extra: Oe });
11730
11733
  }
11731
11734
  mt(t, () => ({
11732
11735
  canWeClose: xe
@@ -11801,15 +11804,15 @@ function xh(e, t) {
11801
11804
  }
11802
11805
  }
11803
11806
  }
11804
- let je;
11805
- !u && X.find((Ve) => Ve.type === "tree") ? je = X.find(
11807
+ let Be;
11808
+ !u && X.find((Ve) => Ve.type === "tree") ? Be = X.find(
11806
11809
  (B) => B.type === "tree"
11807
- ) : u ? je = X.find((B) => u.id ? B.type === u.type && B.view_id === u.id : B.type === u.type) : je = X.find(
11810
+ ) : u ? Be = X.find((B) => u.id ? B.type === u.type && B.view_id === u.id : B.type === u.type) : Be = X.find(
11808
11811
  (B) => B.type === "form"
11809
- ), je || (nt(
11812
+ ), Be || (nt(
11810
11813
  `Error determining the first view to show for model ${r}.
11811
11814
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
11812
- ), Fe == null || Fe(c)), $e(je), T(X), S(!1);
11815
+ ), Fe == null || Fe(c)), $e(Be), T(X), S(!1);
11813
11816
  };
11814
11817
  l({ tabKey: c, canWeClose: xe }), me(() => {
11815
11818
  const X = x.find((_e) => _e.type === "tree"), Oe = x.find((_e) => u.id ? _e.type === u.type && _e.view_id === u.id : _e.type === u.type);
@@ -11818,7 +11821,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11818
11821
  if (ve === c) {
11819
11822
  z == null || z(I);
11820
11823
  const X = { action_id: p, action_type: m };
11821
- te == null || te({ ...y, extra: X });
11824
+ ne == null || ne({ ...y, extra: X });
11822
11825
  }
11823
11826
  }, [ue, ve]);
11824
11827
  async function xe() {
@@ -11830,9 +11833,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11830
11833
  async function fe(X, Oe) {
11831
11834
  var Ve;
11832
11835
  ae(!0);
11833
- let _e, je;
11836
+ let _e, Be;
11834
11837
  if (X.length === 1) {
11835
- _e = "form", je = [];
11838
+ _e = "form", Be = [];
11836
11839
  const B = X[0], le = E.findIndex((oe) => oe.id === B);
11837
11840
  let Re;
11838
11841
  if (le === -1) {
@@ -11851,7 +11854,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11851
11854
  } else
11852
11855
  Re = E[le];
11853
11856
  } else
11854
- _e = "tree", je = [["id", "in", X]];
11857
+ _e = "tree", Be = [["id", "in", X]];
11855
11858
  if (ae(!1), re(!1), Oe && _e === "form") {
11856
11859
  Pe(X[0]);
11857
11860
  const B = x.find(
@@ -11861,7 +11864,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11861
11864
  } else {
11862
11865
  const B = s.find((le) => le[1] === _e);
11863
11866
  ke({
11864
- domain: je,
11867
+ domain: Be,
11865
11868
  context: o,
11866
11869
  model: r,
11867
11870
  views: s,
@@ -11954,7 +11957,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
11954
11957
  $e(X);
11955
11958
  }
11956
11959
  }
11957
- return w ? /* @__PURE__ */ i(Be, {}) : y ? /* @__PURE__ */ D(
11960
+ return w ? /* @__PURE__ */ i(He, {}) : y ? /* @__PURE__ */ D(
11958
11961
  zc,
11959
11962
  {
11960
11963
  title: a,
@@ -12111,7 +12114,7 @@ function Ah(e) {
12111
12114
  model: h,
12112
12115
  treeView: m
12113
12116
  });
12114
- }, te = () => !m || !v ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
12117
+ }, ne = () => !m || !v ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
12115
12118
  H && /* @__PURE__ */ i(tt, { className: "mt-10", message: H, type: "error", banner: !0 }),
12116
12119
  /* @__PURE__ */ i(
12117
12120
  bn,
@@ -12140,7 +12143,7 @@ function Ah(e) {
12140
12143
  }
12141
12144
  )
12142
12145
  ] });
12143
- return j ? /* @__PURE__ */ i(tt, { className: "mt-10", message: j, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(Be, { style: { padding: "2rem" } }) : te();
12146
+ return j ? /* @__PURE__ */ i(tt, { className: "mt-10", message: j, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(He, { style: { padding: "2rem" } }) : ne();
12144
12147
  }
12145
12148
  const Ih = kr(Ah), Fh = (e) => {
12146
12149
  const { model: t } = e, [n, r] = C();
@@ -12162,7 +12165,7 @@ function Rh(e, t) {
12162
12165
  setIsLoading: h,
12163
12166
  openAction: p,
12164
12167
  moveItemsEnabled: m
12165
- } = ne(fo), g = Q(), v = Q(), [y] = qe(k.getHandler().getView), [b] = qe(
12168
+ } = te(fo), g = Q(), v = Q(), [y] = qe(k.getHandler().getView), [b] = qe(
12166
12169
  k.getHandler().readObjects
12167
12170
  ), [x] = qe(k.getHandler().update), T = Jn(
12168
12171
  nn.FEATURE_READFORVIEW
@@ -12382,7 +12385,7 @@ function Rh(e, t) {
12382
12385
  M
12383
12386
  );
12384
12387
  }
12385
- let te;
12388
+ let ne;
12386
12389
  const z = J.find((ue) => {
12387
12390
  const [, ve] = ue;
12388
12391
  return ve === "tree";
@@ -12394,7 +12397,7 @@ function Rh(e, t) {
12394
12397
  title: Pe,
12395
12398
  model: $e
12396
12399
  } = E;
12397
- te = {
12400
+ ne = {
12398
12401
  action_id: ke,
12399
12402
  action_type: Fe,
12400
12403
  name: Pe,
@@ -12411,7 +12414,7 @@ function Rh(e, t) {
12411
12414
  id: M,
12412
12415
  title: re,
12413
12416
  parms: q,
12414
- action: te,
12417
+ action: ne,
12415
12418
  openAction: p,
12416
12419
  children: pe
12417
12420
  },
@@ -12423,7 +12426,7 @@ const _h = ft(Rh), Vh = (e) => {
12423
12426
  const { ooui: t } = e;
12424
12427
  return /* @__PURE__ */ i(Ie, { type: "array", ...e, children: /* @__PURE__ */ i(Dh, { ooui: t }) });
12425
12428
  }, Dh = (e) => {
12426
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((I) => I.operation !== "pendingRemove").map((I) => I.id), [a, l] = C([]), [c, u] = C(), [f, d] = C(!1), { relation: h, context: p, readOnly: m, field: g, columns: v } = n, y = ne(He), { getContext: b } = y || {};
12429
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((I) => I.operation !== "pendingRemove").map((I) => I.id), [a, l] = C([]), [c, u] = C(), [f, d] = C(!1), { relation: h, context: p, readOnly: m, field: g, columns: v } = n, y = te(je), { getContext: b } = y || {};
12427
12430
  ht(() => {
12428
12431
  T();
12429
12432
  }, [o]);
@@ -12480,7 +12483,7 @@ const _h = ft(Rh), Vh = (e) => {
12480
12483
  A.push({ id: F, operation: "pendingLink" });
12481
12484
  }), x(A);
12482
12485
  };
12483
- return f && a.length === 0 ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
12486
+ return f && a.length === 0 ? /* @__PURE__ */ i(He, {}) : /* @__PURE__ */ i(se, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
12484
12487
  /* @__PURE__ */ i(
12485
12488
  mn.Group,
12486
12489
  {
@@ -12541,7 +12544,7 @@ const _h = ft(Rh), Vh = (e) => {
12541
12544
  const { ooui: t } = e, { required: n } = t;
12542
12545
  return /* @__PURE__ */ i(Ie, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(jh, { ...e }) });
12543
12546
  }, jh = (e) => {
12544
- const { ooui: t, value: n } = e, { selectionValues: r, errorField: o } = t, s = ne(He), a = Array.from(r.entries()), l = a.map((f) => f[0]).indexOf(n);
12547
+ const { ooui: t, value: n } = e, { selectionValues: r, errorField: o } = t, s = te(je), a = Array.from(r.entries()), l = a.map((f) => f[0]).indexOf(n);
12545
12548
  let c = "process", u = "";
12546
12549
  return o && (u = s.getFieldValue(o), u && (c = "error")), /* @__PURE__ */ i(wo, { current: l, status: c, children: a.map((f, d) => /* @__PURE__ */ i(
12547
12550
  wo.Step,
@@ -12551,7 +12554,7 @@ const _h = ft(Rh), Vh = (e) => {
12551
12554
  }
12552
12555
  )) });
12553
12556
  }, Bh = (e) => {
12554
- const { ooui: t } = e, { lang: n, height: r, readOnly: o } = t, s = ne(He), { elementHasLostFocus: a } = s || {};
12557
+ const { ooui: t } = e, { lang: n, height: r, readOnly: o } = t, s = te(je), { elementHasLostFocus: a } = s || {};
12555
12558
  return /* @__PURE__ */ i(Ie, { ...e, children: /* @__PURE__ */ i(
12556
12559
  kl,
12557
12560
  {
@@ -12618,7 +12621,9 @@ const Kh = (e) => {
12618
12621
  style: {
12619
12622
  height: n.height ? n.height + "px" : "100%",
12620
12623
  overflowX: "hidden",
12621
- overflowY: "auto"
12624
+ overflowY: "auto",
12625
+ paddingTop: "10px",
12626
+ paddingRight: "10px"
12622
12627
  }
12623
12628
  }
12624
12629
  );
@@ -13056,7 +13061,7 @@ function ng(e) {
13056
13061
  );
13057
13062
  }
13058
13063
  function ty() {
13059
- const e = ne(
13064
+ const e = te(
13060
13065
  yt
13061
13066
  ), { activeKey: t, tabs: n, onRemoveTab: r, onChangeTab: o } = e || {};
13062
13067
  return /* @__PURE__ */ i(se, { children: n.map((s) => /* @__PURE__ */ i(
@@ -13072,7 +13077,7 @@ function ty() {
13072
13077
  )) });
13073
13078
  }
13074
13079
  function rg(e) {
13075
- const { tab: t } = e, n = ne(
13080
+ const { tab: t } = e, n = te(
13076
13081
  yt
13077
13082
  ), { activeKey: r } = n || {}, o = {
13078
13083
  display: "none"
@@ -13081,7 +13086,7 @@ function rg(e) {
13081
13086
  }
13082
13087
  const og = ct.memo(rg, () => !0);
13083
13088
  function ny() {
13084
- const e = ne(
13089
+ const e = te(
13085
13090
  yt
13086
13091
  ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((r) => /* @__PURE__ */ i(og, { tab: r }, r.key))) || null;
13087
13092
  return /* @__PURE__ */ i(se, { children: n });
@@ -13093,7 +13098,7 @@ const { useToken: ig } = Ge, ry = (e) => {
13093
13098
  onAddFavourite: r,
13094
13099
  onRemoveFavourite: o,
13095
13100
  onDropdownClosed: s
13096
- } = e, [a, l] = C(!1), [c, u] = C(), { t: f } = ge(), { token: d } = ig(), h = Q(null), p = ne(
13101
+ } = e, [a, l] = C(!1), [c, u] = C(), { t: f } = ge(), { token: d } = ig(), h = Q(null), p = te(
13097
13102
  yt
13098
13103
  ), {
13099
13104
  openShortcut: m,