@gisce/react-ooui 2.26.0-alpha.5 → 2.26.0-rc.2

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