@gisce/react-ooui 2.97.0-alpha.2 → 2.97.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,12 +2,12 @@ var Oc = Object.defineProperty;
2
2
  var Dc = (t, e, n) => e in t ? Oc(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var ks = (t, e, n) => (Dc(t, typeof e != "symbol" ? e + "" : e, n), n);
4
4
  import { jsx as s, jsxs as L, Fragment as ge } from "react/jsx-runtime";
5
- import jt, { useContext as pe, useState as I, useEffect as de, useRef as K, memo as ot, useCallback as D, useMemo as te, forwardRef as $t, useImperativeHandle as Lt, Fragment as Wn, createContext as Pc, createElement as Mc } from "react";
6
- import { Tooltip as Kt, theme as rt, Typography as un, Form as Mt, Row as Ke, Col as Pe, Modal as Et, Button as Je, Dropdown as $c, Menu as zi, Space as ct, Spin as nt, Divider as Nr, Input as St, Select as Sn, Checkbox as Qn, Alert as _t, Timeline as Ji, message as Ns, Popover as kc, Progress as Nc, Avatar as Ki, Tag as Yo, ColorPicker as Xi, Badge as ar, DatePicker as Vc, TimePicker as Lc, InputNumber as Vr, Layout as Qi, Pagination as Hc, Empty as Zi, Statistic as Bc, Card as zo, Tabs as ea, Radio as Vs, Switch as jc, Steps as Ls, Carousel as Uc } from "antd";
5
+ import jt, { useContext as pe, useState as I, useEffect as de, useRef as K, memo as ot, useCallback as D, useMemo as te, forwardRef as kt, useImperativeHandle as Lt, Fragment as Wn, createContext as Pc, createElement as Mc } from "react";
6
+ import { Tooltip as Kt, theme as rt, Typography as un, Form as $t, Row as Ke, Col as Pe, Modal as Et, Button as Je, Dropdown as $c, Menu as zi, Space as dt, Spin as nt, Divider as Nr, Input as xt, Select as Sn, Checkbox as Qn, Alert as _t, Timeline as Ji, message as Ns, Popover as kc, Progress as Nc, Avatar as Ki, Tag as Yo, ColorPicker as Xi, Badge as ar, DatePicker as Vc, TimePicker as Lc, InputNumber as Vr, Layout as Qi, Pagination as Hc, Empty as Zi, Statistic as Bc, Card as zo, Tabs as ea, Radio as Vs, Switch as jc, Steps as Ls, Carousel as Uc } from "antd";
7
7
  import { Label as qn, Field as Oo, Tree as ta, Tags as Hs, Reference as Bs, Selection as Jo, Many2one as na, Boolean as Wc, parseContext as dn, graphProcessor as ra, graphFieldUtils as qc, parseContextFields as Gc, parseDomainFields as Yc, Integer as Do, SearchFieldTypes as cn, SearchFilter as oa, parseGraph as sa, Container as zc, Form as ia, transformDomainForChildWidget as Ko, Button as Jc } from "@gisce/ooui";
8
8
  import Kc, { QuestionCircleOutlined as aa, ExclamationCircleOutlined as Lr, LoadingOutlined as Ut, DownOutlined as Hr, CloseOutlined as Gn, CheckOutlined as lr, TranslationOutlined as la, FolderOpenOutlined as Xo, DownloadOutlined as Qo, ClearOutlined as cr, FormOutlined as Zn, TableOutlined as Zo, AreaChartOutlined as Xc, CalendarOutlined as Qc, FileAddOutlined as Br, CloseCircleFilled as Zc, CopyOutlined as dr, FilterOutlined as ca, DeleteOutlined as es, InfoCircleOutlined as jr, ReloadOutlined as Ur, ThunderboltOutlined as Wr, PrinterOutlined as qr, ExportOutlined as da, EnterOutlined as Gr, SearchOutlined as ur, UpOutlined as ed, PlusSquareOutlined as ua, MinusSquareOutlined as fa, StarFilled as td, StarOutlined as nd, LeftOutlined as pa, RightOutlined as ma, ApiOutlined as rd, AlignLeftOutlined as od, EyeOutlined as sd, LinkOutlined as js, SaveOutlined as id, EditOutlined as ha, PlusOutlined as ad, BorderOuterOutlined as ld, SettingOutlined as cd } from "@ant-design/icons";
9
9
  import { Interweave as zt } from "interweave";
10
- import lt from "dayjs";
10
+ import ct from "dayjs";
11
11
  import { default as Pw } from "dayjs";
12
12
  import dd from "dayjs/plugin/advancedFormat";
13
13
  import ud from "dayjs/plugin/customParseFormat";
@@ -17,14 +17,14 @@ import md from "dayjs/plugin/duration";
17
17
  import hd from "dayjs/plugin/relativeTime";
18
18
  import gd from "dayjs/plugin/weekday";
19
19
  import yd from "dayjs/plugin/localeData";
20
- import { useLocale as xe, Icon as Po, iconMapper as Dt, useNotificationContext as vd, FormigaConfigProvider as bd, mergeStrings as wd, Dropdown as ga, getTablerIcon as ya, DropdownButton as Zt, Many2OneSuffix as Sd, Many2OneSuffixModal as Us, DateValue as xd, DateTimeValue as Cd, useDatePickerLocale as Td, SkeletonPill as Fd, PaginationHeader as Id, FieldSet as Ad, ExportModal as Rd, DateInput as _d, HTMLPreview as Ed, FavouriteButton as Od } from "@gisce/react-formiga-components";
20
+ import { useLocale as xe, Icon as Po, iconMapper as Pt, useNotificationContext as vd, FormigaConfigProvider as bd, mergeStrings as wd, Dropdown as ga, getTablerIcon as ya, DropdownButton as Zt, Many2OneSuffix as Sd, Many2OneSuffixModal as Us, DateValue as xd, DateTimeValue as Cd, useDatePickerLocale as Td, SkeletonPill as Fd, PaginationHeader as Id, FieldSet as Ad, ExportModal as Rd, DateInput as _d, HTMLPreview as Ed, FavouriteButton as Od } from "@gisce/react-formiga-components";
21
21
  import Dd from "antd/lib/input/TextArea";
22
- import Ft from "styled-components";
22
+ import It from "styled-components";
23
23
  import ts from "react-measure";
24
24
  import Pd from "lodash/debounce";
25
25
  import { nanoid as ns } from "nanoid";
26
26
  import Mo from "antd/lib/typography/Title";
27
- import { useDeepCompareEffect as Xe, useDeepCompareCallback as Ct, useDeepCompareMemo as en } from "use-deep-compare";
27
+ import { useDeepCompareEffect as Xe, useDeepCompareCallback as Tt, useDeepCompareMemo as en } from "use-deep-compare";
28
28
  import { Line as Md, Column as $d, Pie as kd } from "@ant-design/plots";
29
29
  import { createRoot as va } from "react-dom/client";
30
30
  import { fileTypeFromBuffer as Nd } from "file-type-buffer-browser";
@@ -48,7 +48,7 @@ import { WidthProvider as Kd, Responsive as Xd } from "react-grid-layout";
48
48
  import "react-grid-layout/css/styles.css";
49
49
  import { AnimatePresence as Qd, motion as Ws } from "framer-motion";
50
50
  import Zd from "focus-trap-react";
51
- const Ze = jt.createContext(null), eu = (t) => {
51
+ const et = jt.createContext(null), eu = (t) => {
52
52
  const {
53
53
  children: e,
54
54
  activeId: n,
@@ -76,7 +76,7 @@ const Ze = jt.createContext(null), eu = (t) => {
76
76
  refreshCounter: E
77
77
  } = t;
78
78
  return /* @__PURE__ */ s(
79
- Ze.Provider,
79
+ et.Provider,
80
80
  {
81
81
  value: {
82
82
  domain: u,
@@ -107,7 +107,7 @@ const Ze = jt.createContext(null), eu = (t) => {
107
107
  }
108
108
  );
109
109
  }, os = () => {
110
- const t = pe(Ze);
110
+ const t = pe(et);
111
111
  return t || {
112
112
  activeId: void 0,
113
113
  activeModel: "",
@@ -233,7 +233,7 @@ const nu = /* @__PURE__ */ xa(tu);
233
233
  var ru = { exports: {} };
234
234
  (function(t, e) {
235
235
  (function(n, r) {
236
- t.exports = r(lt);
236
+ t.exports = r(ct);
237
237
  })(Yr, function(n) {
238
238
  function r(a) {
239
239
  return a && typeof a == "object" && "default" in a ? a : { default: a };
@@ -258,7 +258,7 @@ var ou = { exports: {} };
258
258
  var su = { exports: {} };
259
259
  (function(t, e) {
260
260
  (function(n, r) {
261
- t.exports = r(lt);
261
+ t.exports = r(ct);
262
262
  })(Yr, function(n) {
263
263
  function r(a) {
264
264
  return a && typeof a == "object" && "default" in a ? a : { default: a };
@@ -269,21 +269,21 @@ var su = { exports: {} };
269
269
  return o.default.locale(i, null, !0), i;
270
270
  });
271
271
  })(su);
272
- lt.extend(nu);
273
- lt.extend(dd);
274
- lt.extend(ud);
275
- lt.extend(fd);
276
- lt.extend(pd);
277
- lt.extend(md);
278
- lt.extend(hd);
279
- lt.extend(gd);
280
- lt.extend(yd);
272
+ ct.extend(nu);
273
+ ct.extend(dd);
274
+ ct.extend(ud);
275
+ ct.extend(fd);
276
+ ct.extend(pd);
277
+ ct.extend(md);
278
+ ct.extend(hd);
279
+ ct.extend(gd);
280
+ ct.extend(yd);
281
281
  const { Text: iu, Title: au } = un, { useToken: lu } = rt, cu = {
282
282
  left: "justify-start",
283
283
  center: "justify-center",
284
284
  right: "justify-end"
285
285
  }, zr = (t) => {
286
- const { ooui: e, align: n, responsiveBehaviour: r } = t, { label: o, tooltip: i, fieldForLabel: a, labelSize: c, labelType: l } = e, d = pe(Ze);
286
+ const { ooui: e, align: n, responsiveBehaviour: r } = t, { label: o, tooltip: i, fieldForLabel: a, labelSize: c, labelType: l } = e, d = pe(et);
287
287
  let u = a !== null && o.length > 1 ? o + " :" : o, f = "";
288
288
  if (!e.fieldForLabel && e._id) {
289
289
  if (u = d.getFieldValue(e._id), e.fieldType === "many2one")
@@ -296,9 +296,9 @@ const { Text: iu, Title: au } = un, { useToken: lu } = rt, cu = {
296
296
  time: "HH:mm",
297
297
  datetime: "DD/MM/YYYY HH:mm"
298
298
  };
299
- f = u ? lt(u).format(
299
+ f = u ? ct(u).format(
300
300
  y[e.fieldType]
301
- ) : "", e.humanDate ? u = u ? lt(u).fromNow() : "" : (u = f, f = "");
301
+ ) : "", e.humanDate ? u = u ? ct(u).fromNow() : "" : (u = f, f = "");
302
302
  }
303
303
  }
304
304
  const g = n || (a ? r ? "left" : "right" : "left"), { token: h } = lu(), v = c === void 0 ? iu : au;
@@ -333,7 +333,7 @@ function We({
333
333
  validator: l
334
334
  }) {
335
335
  var P;
336
- const { id: d, label: p, tooltip: u } = t, { t: f } = xe(), m = Mt.useFormInstance(), g = a ? [
336
+ const { id: d, label: p, tooltip: u } = t, { t: f } = xe(), m = $t.useFormInstance(), g = a ? [
337
337
  {
338
338
  required: !0,
339
339
  message: f("fillRequiredField"),
@@ -341,7 +341,7 @@ function We({
341
341
  validator: l
342
342
  }
343
343
  ] : void 0, { getFieldMessage: h, getFieldMessageType: v } = os(), y = h(d), b = v(d), C = y || (t.tooltipInline ? t.tooltip : null), S = ((P = m.getFieldError(d)) == null ? void 0 : P.length) > 0 || !!y && b === "error", w = !!y && b === "warning", M = () => /* @__PURE__ */ s(
344
- Mt.Item,
344
+ $t.Item,
345
345
  {
346
346
  className: "mb-0",
347
347
  name: d,
@@ -402,7 +402,7 @@ const { confirm: du } = Et, tn = ({
402
402
  icon: c,
403
403
  context: l,
404
404
  readOnly: d
405
- } = e, p = pe(Ze), { executeButtonAction: u } = p || {}, [f, m] = I(!1), { t: g } = xe();
405
+ } = e, p = pe(et), { executeButtonAction: u } = p || {}, [f, m] = I(!1), { t: g } = xe();
406
406
  async function h() {
407
407
  m(!0), await u({ type: i, action: n, context: l }), m(!1);
408
408
  }
@@ -451,12 +451,12 @@ const { confirm: du } = Et, tn = ({
451
451
  primary: p,
452
452
  context: u,
453
453
  readOnly: f
454
- } = n || {}, m = pe(Ze), { executeButtonAction: g } = m || {}, [h, v] = I(!1), { t: y } = xe();
454
+ } = n || {}, m = pe(et), { executeButtonAction: g } = m || {}, [h, v] = I(!1), { t: y } = xe();
455
455
  function b() {
456
456
  if (h)
457
457
  return /* @__PURE__ */ s(Ut, {});
458
458
  if (d) {
459
- const w = Dt(d);
459
+ const w = Pt(d);
460
460
  return w && /* @__PURE__ */ s(w, {});
461
461
  }
462
462
  }
@@ -533,7 +533,7 @@ const { confirm: du } = Et, tn = ({
533
533
  if (m)
534
534
  return /* @__PURE__ */ s(Ut, {});
535
535
  if (d) {
536
- const b = Dt(d);
536
+ const b = Pt(d);
537
537
  return b && /* @__PURE__ */ s(b, {});
538
538
  }
539
539
  }
@@ -631,7 +631,7 @@ const Ta = (t) => {
631
631
  if (i === "warning" || i === "error") {
632
632
  const l = o.buttons || [];
633
633
  let d;
634
- const p = l.length > 0 ? /* @__PURE__ */ s(Ke, { justify: "end", style: { marginTop: 16 }, children: /* @__PURE__ */ L(ct, { children: [
634
+ const p = l.length > 0 ? /* @__PURE__ */ s(Ke, { justify: "end", style: { marginTop: 16 }, children: /* @__PURE__ */ L(dt, { children: [
635
635
  l.map((f) => /* @__PURE__ */ s(
636
636
  Je,
637
637
  {
@@ -790,7 +790,7 @@ const Ta = (t) => {
790
790
  return u ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ L(ge, { children: [
791
791
  M(),
792
792
  /* @__PURE__ */ s(Nr, {}),
793
- /* @__PURE__ */ s(Ke, { justify: "end", children: /* @__PURE__ */ L(ct, { children: [
793
+ /* @__PURE__ */ s(Ke, { justify: "end", children: /* @__PURE__ */ L(dt, { children: [
794
794
  /* @__PURE__ */ s(
795
795
  Je,
796
796
  {
@@ -830,7 +830,7 @@ const Ta = (t) => {
830
830
  }
831
831
  );
832
832
  };
833
- function wt(t) {
833
+ function St(t) {
834
834
  const { tooltip: e, ...n } = t;
835
835
  return /* @__PURE__ */ s(Kt, { title: e, children: /* @__PURE__ */ s(Je, { ...n }) });
836
836
  }
@@ -883,7 +883,7 @@ const Ia = (t) => {
883
883
  isSearchField: n,
884
884
  onChange: r
885
885
  }) => {
886
- const o = pe(Ze), { elementHasLostFocus: i } = o || {}, { readOnly: a, isPassword: c, translatable: l, required: d } = e, p = te(() => t && (e.selectionValues.size ? e.selectionValues.get(t) : Array.isArray(t) ? t[1] : t), [e.selectionValues, t]), u = te(
886
+ const o = pe(et), { elementHasLostFocus: i } = o || {}, { readOnly: a, isPassword: c, translatable: l, required: d } = e, p = te(() => t && (e.selectionValues.size ? e.selectionValues.get(t) : Array.isArray(t) ? t[1] : t), [e.selectionValues, t]), u = te(
887
887
  () => d && !a,
888
888
  [d, a]
889
889
  ), f = te(
@@ -896,7 +896,7 @@ const Ia = (t) => {
896
896
  [r]
897
897
  );
898
898
  if (c) {
899
- const h = u ? Su : St.Password;
899
+ const h = u ? Su : xt.Password;
900
900
  return /* @__PURE__ */ s(
901
901
  er,
902
902
  {
@@ -912,7 +912,7 @@ const Ia = (t) => {
912
912
  return /* @__PURE__ */ s(
913
913
  er,
914
914
  {
915
- component: u ? _a : St,
915
+ component: u ? _a : xt,
916
916
  ooui: e,
917
917
  value: p,
918
918
  disabled: a || f || l && !n,
@@ -932,7 +932,7 @@ const Ra = ot(
932
932
  field: n,
933
933
  onChange: r
934
934
  }) => {
935
- const o = pe(Ze), {
935
+ const o = pe(et), {
936
936
  activeId: i,
937
937
  activeModel: a,
938
938
  fetchValues: c,
@@ -987,7 +987,7 @@ const Ra = ot(
987
987
  /* @__PURE__ */ s(Pe, { flex: "auto", children: /* @__PURE__ */ s(
988
988
  er,
989
989
  {
990
- component: h ? _a : St,
990
+ component: h ? _a : xt,
991
991
  ooui: t,
992
992
  value: e,
993
993
  id: n,
@@ -996,7 +996,7 @@ const Ra = ot(
996
996
  }
997
997
  ) }),
998
998
  /* @__PURE__ */ s(Pe, { flex: "none", children: /* @__PURE__ */ s(
999
- wt,
999
+ St,
1000
1000
  {
1001
1001
  tooltip: f("translate"),
1002
1002
  icon: /* @__PURE__ */ s(la, {}),
@@ -1008,22 +1008,22 @@ const Ra = ot(
1008
1008
  }
1009
1009
  );
1010
1010
  Ra.displayName = "TranslatableCharComp";
1011
- const bu = Ft(St)`
1011
+ const bu = It(xt)`
1012
1012
  &.ant-input {
1013
1013
  cursor: ${(t) => t.disabled ? "pointer" : "text"};
1014
1014
  pointer-events: ${(t) => t.disabled ? "none" : "auto"};
1015
1015
  }
1016
- `, wu = Ft(St)`
1016
+ `, wu = It(xt)`
1017
1017
  &.ant-input {
1018
1018
  background-color: ${is.colorPrimaryBg};
1019
1019
  cursor: pointer;
1020
1020
  pointer-events: none;
1021
1021
  }
1022
- `, _a = Ft(St)`
1022
+ `, _a = It(xt)`
1023
1023
  &.ant-input {
1024
1024
  background-color: ${is.colorPrimaryBg};
1025
1025
  }
1026
- `, Su = Ft(St.Password)`
1026
+ `, Su = It(xt.Password)`
1027
1027
  &.ant-input-affix-wrapper {
1028
1028
  background-color: ${is.colorPrimaryBg};
1029
1029
  }
@@ -1048,7 +1048,7 @@ const bu = Ft(St)`
1048
1048
  children: l
1049
1049
  }
1050
1050
  );
1051
- }, Iu = Ft(Sn)`
1051
+ }, Iu = It(Sn)`
1052
1052
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
1053
1053
  background-color: ${Tu.colorPrimaryBg};
1054
1054
  }
@@ -1058,7 +1058,7 @@ const bu = Ft(St)`
1058
1058
  }, Eu = (t) => {
1059
1059
  const { required: e, readOnly: n, ...r } = t;
1060
1060
  return /* @__PURE__ */ s("div", { className: "flex flex-row", children: /* @__PURE__ */ s(e && !n ? Ou : Qn, { disabled: n, ...r }) });
1061
- }, Ou = Ft(Qn)`
1061
+ }, Ou = It(Qn)`
1062
1062
  .ant-checkbox-inner {
1063
1063
  background-color: ${Gs.colorPrimaryBg};
1064
1064
  }
@@ -1094,7 +1094,7 @@ function Xr(t, e) {
1094
1094
  const as = (t) => {
1095
1095
  const { value: e, style: n = {} } = t;
1096
1096
  if (e) {
1097
- const r = Dt(e);
1097
+ const r = Pt(e);
1098
1098
  return r ? /* @__PURE__ */ s(r, {}) : /* @__PURE__ */ s(
1099
1099
  "img",
1100
1100
  {
@@ -1105,7 +1105,7 @@ const as = (t) => {
1105
1105
  }
1106
1106
  }, Pu = (t) => {
1107
1107
  const { ooui: e } = t, { required: n, id: r } = e;
1108
- return Dt(r) ? /* @__PURE__ */ s(as, { value: r }) : /* @__PURE__ */ s(We, { required: n, ...t, children: /* @__PURE__ */ s(Mu, { ooui: e }) });
1108
+ return Pt(r) ? /* @__PURE__ */ s(as, { value: r }) : /* @__PURE__ */ s(We, { required: n, ...t, children: /* @__PURE__ */ s(Mu, { ooui: e }) });
1109
1109
  }, Mu = (t) => {
1110
1110
  const { ooui: e, value: n, onChange: r } = t, { readOnly: o } = e, i = K(null), { t: a } = xe(), c = (u) => {
1111
1111
  r == null || r(u);
@@ -1140,9 +1140,9 @@ const as = (t) => {
1140
1140
  }
1141
1141
  )
1142
1142
  ] }),
1143
- e.showControls && /* @__PURE__ */ s(Ke, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ L(ct, { children: [
1143
+ e.showControls && /* @__PURE__ */ s(Ke, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ L(dt, { children: [
1144
1144
  /* @__PURE__ */ s(
1145
- wt,
1145
+ St,
1146
1146
  {
1147
1147
  tooltip: a("uploadNewImage"),
1148
1148
  icon: /* @__PURE__ */ s(Xo, {}),
@@ -1153,7 +1153,7 @@ const as = (t) => {
1153
1153
  }
1154
1154
  ),
1155
1155
  /* @__PURE__ */ s(
1156
- wt,
1156
+ St,
1157
1157
  {
1158
1158
  tooltip: a("download"),
1159
1159
  disabled: !n,
@@ -1162,7 +1162,7 @@ const as = (t) => {
1162
1162
  }
1163
1163
  ),
1164
1164
  /* @__PURE__ */ s(
1165
- wt,
1165
+ St,
1166
1166
  {
1167
1167
  tooltip: a("clear"),
1168
1168
  disabled: o || !n,
@@ -1732,7 +1732,7 @@ const xn = ({
1732
1732
  ]
1733
1733
  }
1734
1734
  ), Ku = (t) => {
1735
- const { ooui: e } = t, { relation: n, context: r, views: o } = e, [i, a] = I(!0), [c, l] = I(), [d, p] = I(/* @__PURE__ */ new Map()), u = pe(Ze), { getContext: f } = u || {};
1735
+ const { ooui: e } = t, { relation: n, context: r, views: o } = e, [i, a] = I(!0), [c, l] = I(), [d, p] = I(/* @__PURE__ */ new Map()), u = pe(et), { getContext: f } = u || {};
1736
1736
  Xe(() => {
1737
1737
  g();
1738
1738
  }, [e]);
@@ -1761,7 +1761,7 @@ const xn = ({
1761
1761
  titleField: b,
1762
1762
  iconField: C,
1763
1763
  colorField: S
1764
- } = r, w = i.filter((x) => x.values), M = pe(Ze), { getContext: F } = M || {};
1764
+ } = r, w = i.filter((x) => x.values), M = pe(et), { getContext: F } = M || {};
1765
1765
  Xe(() => {
1766
1766
  A();
1767
1767
  }, [i]);
@@ -1798,7 +1798,7 @@ const xn = ({
1798
1798
  if (a)
1799
1799
  return /* @__PURE__ */ s(nt, {});
1800
1800
  const P = (x) => {
1801
- const O = Dt(x);
1801
+ const O = Pt(x);
1802
1802
  return O && /* @__PURE__ */ s(O, {});
1803
1803
  }, _ = w.map((x) => {
1804
1804
  var T, R, k, $;
@@ -2323,7 +2323,7 @@ async function qa({
2323
2323
  };
2324
2324
  }
2325
2325
  const of = (t) => {
2326
- const [e, n] = I(), [r, o] = I(!0), [i, a] = I(), [c, l] = I(), d = pe(Ze), { getContext: p, getPlainValues: u, activeId: f } = d || {}, { globalValues: m, rootContext: g } = Wt(), h = te(() => ({ ...p == null ? void 0 : p(), ...g }), [p, g]);
2326
+ const [e, n] = I(), [r, o] = I(!0), [i, a] = I(), [c, l] = I(), d = pe(et), { getContext: p, getPlainValues: u, activeId: f } = d || {}, { globalValues: m, rootContext: g } = Wt(), h = te(() => ({ ...p == null ? void 0 : p(), ...g }), [p, g]);
2327
2327
  return { actionData: i, treeShortcut: c, loading: r, error: e, fetchData: async () => {
2328
2328
  n(void 0), o(!0);
2329
2329
  try {
@@ -2511,7 +2511,7 @@ function sf({
2511
2511
  `bold ${Math.floor(l * 1.03)}px sans-serif`
2512
2512
  );
2513
2513
  a && (f = f * 2), f >= e * 0.85 && (l = e * 0.85 / f * l);
2514
- const m = a && Dt(a, { style: { fontSize: l * 0.7 } });
2514
+ const m = a && Pt(a, { style: { fontSize: l * 0.7 } });
2515
2515
  return /* @__PURE__ */ s(
2516
2516
  "div",
2517
2517
  {
@@ -2559,7 +2559,7 @@ function af({
2559
2559
  `bold ${Math.floor(p * 1.03)}px sans-serif`
2560
2560
  );
2561
2561
  c && (g = g * 1.5), (g >= n * 0.85 || p * 2 < d) && (p = n * 0.85 / g * p);
2562
- const h = c && Dt(c, { style: { fontSize: p } });
2562
+ const h = c && Pt(c, { style: { fontSize: p } });
2563
2563
  return /* @__PURE__ */ s(
2564
2564
  "div",
2565
2565
  {
@@ -2937,7 +2937,7 @@ const fo = (t) => (e) => {
2937
2937
  });
2938
2938
  if (hf(t)) {
2939
2939
  const e = gf(t);
2940
- return e === null ? t : lt(t, Dr.input[e]).format(
2940
+ return e === null ? t : ct(t, Dr.input[e]).format(
2941
2941
  Dr.output[e]
2942
2942
  );
2943
2943
  } else
@@ -3038,7 +3038,7 @@ const Dr = {
3038
3038
  };
3039
3039
  function gf(t) {
3040
3040
  for (const e in Dr.input)
3041
- if (lt(
3041
+ if (ct(
3042
3042
  t,
3043
3043
  Dr.input[e],
3044
3044
  !0
@@ -3291,9 +3291,9 @@ const Ff = ({
3291
3291
  if (Array.isArray(o)) {
3292
3292
  const [a, c, l] = o, d = a.split("#")[0], p = (i = e == null ? void 0 : e[d]) == null ? void 0 : i.type;
3293
3293
  if (p === "date")
3294
- r[d] || (r[d] = [null, null]), c === ">=" ? r[d][0] = lt(l) : c === "<=" && (r[d][1] = lt(l));
3294
+ r[d] || (r[d] = [null, null]), c === ">=" ? r[d][0] = ct(l) : c === "<=" && (r[d][1] = ct(l));
3295
3295
  else if (p === "datetime") {
3296
- const u = lt(l), f = a.split("#")[0];
3296
+ const u = ct(l), f = a.split("#")[0];
3297
3297
  r[f + "#date"] || (r[f + "#date"] = [null, null]), r[f + "#time"] || (r[f + "#time"] = [null, null]), c === ">=" ? (r[f + "#date"][0] = u, r[f + "#time"][0] = u) : c === "<=" && (r[f + "#date"][1] = u, r[f + "#time"][1] = u);
3298
3298
  } else
3299
3299
  r[a] = l;
@@ -3302,7 +3302,7 @@ const Ff = ({
3302
3302
  return r;
3303
3303
  }, {});
3304
3304
  return nr(n);
3305
- }, Tt = 80, { confirm: Pf } = Et, Yn = ({
3305
+ }, Ft = 80, { confirm: Pf } = Et, Yn = ({
3306
3306
  onOk: t,
3307
3307
  onCancel: e,
3308
3308
  t: n
@@ -3370,7 +3370,7 @@ function us(t) {
3370
3370
  }
3371
3371
  return /* @__PURE__ */ L("div", { style: { display: "flex" }, children: [
3372
3372
  /* @__PURE__ */ s(
3373
- wt,
3373
+ St,
3374
3374
  {
3375
3375
  tooltip: a ? c("viewAs") + " " + c(a.type) : "",
3376
3376
  icon: ti(a),
@@ -3420,7 +3420,7 @@ function Rt(t) {
3420
3420
  ...l
3421
3421
  } = t;
3422
3422
  return /* @__PURE__ */ L(
3423
- wt,
3423
+ St,
3424
3424
  {
3425
3425
  type: c,
3426
3426
  tooltip: o,
@@ -3482,7 +3482,7 @@ function el(t) {
3482
3482
  }
3483
3483
  ) }),
3484
3484
  /* @__PURE__ */ s(
3485
- wt,
3485
+ St,
3486
3486
  {
3487
3487
  ...n,
3488
3488
  style: { width: 46, zIndex: 0 }
@@ -3514,7 +3514,7 @@ async function fs(t, e, n) {
3514
3514
  );
3515
3515
  }
3516
3516
  function $f(t) {
3517
- const { onSearch: e, disabled: n = !1, searchText: r } = t, { t: o } = xe(), [i] = Mt.useForm(), [a, c] = I(!1), l = K(!1), d = K(r);
3517
+ const { onSearch: e, disabled: n = !1, searchText: r } = t, { t: o } = xe(), [i] = $t.useForm(), [a, c] = I(!1), l = K(!1), d = K(r);
3518
3518
  function p(m) {
3519
3519
  const g = m.search;
3520
3520
  d.current = g, e(g);
@@ -3532,15 +3532,15 @@ function $f(t) {
3532
3532
  d.current = g, c(g.length > 0);
3533
3533
  };
3534
3534
  return /* @__PURE__ */ s(
3535
- Mt,
3535
+ $t,
3536
3536
  {
3537
3537
  form: i,
3538
3538
  onFinish: p,
3539
3539
  autoComplete: "off",
3540
3540
  initialValues: { search: r },
3541
3541
  children: /* @__PURE__ */ L(Ke, { align: "middle", justify: "end", children: [
3542
- /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ s(Mt.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ s(
3543
- St,
3542
+ /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ s($t.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ s(
3543
+ xt,
3544
3544
  {
3545
3545
  autoFocus: !0,
3546
3546
  disabled: n,
@@ -3568,8 +3568,8 @@ function $f(t) {
3568
3568
  }
3569
3569
  );
3570
3570
  }
3571
- var Pt = /* @__PURE__ */ ((t) => (t.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", t.FEATURE_ADVANCED_EXPORT = "export_data2", t.FEATURE_OMNISEARCH = "omnisearch", t.FEATURE_READFORVIEW = "read_for_view", t.FEATURE_USERVIEWPREFS = "user_view_prefs", t.FEATURE_GET_TOOLBAR = "get_toolbar", t.FEATURE_MANY2ONE_SORT = "many2one_sort", t.FEATURE_LOGGABLE_ACTIONS = "user_action_logs", t.FEATURE_USER_FLAGS = "user_feature_flags", t.FEATURE_CHECK_PERMS = "check_perms", t))(Pt || {});
3572
- const Fw = Object.values(Pt), Ht = jt.createContext(null), kf = (t) => {
3571
+ var Mt = /* @__PURE__ */ ((t) => (t.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", t.FEATURE_ADVANCED_EXPORT = "export_data2", t.FEATURE_OMNISEARCH = "omnisearch", t.FEATURE_READFORVIEW = "read_for_view", t.FEATURE_USERVIEWPREFS = "user_view_prefs", t.FEATURE_GET_TOOLBAR = "get_toolbar", t.FEATURE_MANY2ONE_SORT = "many2one_sort", t.FEATURE_LOGGABLE_ACTIONS = "user_action_logs", t.FEATURE_USER_FLAGS = "user_feature_flags", t.FEATURE_CHECK_PERMS = "check_perms", t))(Mt || {});
3572
+ const Fw = Object.values(Mt), Ht = jt.createContext(null), kf = (t) => {
3573
3573
  const {
3574
3574
  children: e,
3575
3575
  openAction: n,
@@ -3616,7 +3616,7 @@ const Cn = jt.createContext(null), ni = async (t) => {
3616
3616
  const { children: n, globalValues: r = {} } = t, o = K(), i = K(), [a, c] = I(!1), l = pe(
3617
3617
  Ht
3618
3618
  ), { openAction: d } = l || {}, p = K([]), { t: u } = xe(), { showErrorNotification: f } = yt(), m = ds(
3619
- Pt.FEATURE_LOGGABLE_ACTIONS
3619
+ Mt.FEATURE_LOGGABLE_ACTIONS
3620
3620
  ), [g, h] = Me(
3621
3621
  V.getHandler().logAction
3622
3622
  );
@@ -3653,7 +3653,7 @@ const Cn = jt.createContext(null), ni = async (t) => {
3653
3653
  values: T
3654
3654
  }) : k;
3655
3655
  try {
3656
- const Y = await V.getHandler().createReport({
3656
+ const z = await V.getHandler().createReport({
3657
3657
  model: $,
3658
3658
  name: N,
3659
3659
  datas: j,
@@ -3661,10 +3661,10 @@ const Cn = jt.createContext(null), ni = async (t) => {
3661
3661
  context: { ...R, ...J }
3662
3662
  });
3663
3663
  c(!0), i.current = !0, o.current = setInterval(() => {
3664
- w(Y);
3664
+ w(z);
3665
3665
  }, 1e3);
3666
- } catch (Y) {
3667
- i.current = !1, clearInterval(o.current), f(Y), c(!1);
3666
+ } catch (z) {
3667
+ i.current = !1, clearInterval(o.current), f(z), c(!1);
3668
3668
  }
3669
3669
  }
3670
3670
  async function w(_) {
@@ -3926,7 +3926,7 @@ async function Vf({
3926
3926
  }
3927
3927
  return { views: i, initialView: a };
3928
3928
  }
3929
- const Lf = $t(Nf), tl = ({
3929
+ const Lf = kt(Nf), tl = ({
3930
3930
  selectedRowItems: t,
3931
3931
  onRefreshParentValues: e
3932
3932
  }) => {
@@ -4096,9 +4096,9 @@ function Qr({ res_id: t, searchParams: e }) {
4096
4096
  }, v = rl(h), { type: y } = c || {};
4097
4097
  let b = !g;
4098
4098
  y === "form" && (b = !g || !t);
4099
- const C = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ L(ct.Compact, { style: { width: "100%" }, children: [
4099
+ const C = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ L(dt.Compact, { style: { width: "100%" }, children: [
4100
4100
  /* @__PURE__ */ s(
4101
- St,
4101
+ xt,
4102
4102
  {
4103
4103
  value: v,
4104
4104
  readOnly: !0,
@@ -4179,11 +4179,11 @@ function Yf({
4179
4179
  setSearchValues: T,
4180
4180
  permissions: R
4181
4181
  } = pe(Ot), k = on(
4182
- Pt.FEATURE_ADVANCED_EXPORT
4182
+ Mt.FEATURE_ADVANCED_EXPORT
4183
4183
  ), { t: $ } = xe(), [j, N] = I(!1), H = K(!0), { showErrorNotification: U } = yt(), W = D(() => {
4184
4184
  var q;
4185
4185
  (q = m == null ? void 0 : m.current) == null || q.refreshResults();
4186
- }, [m]), { actionButtonProps: J, printButtonProps: Y } = nl({
4186
+ }, [m]), { actionButtonProps: J, printButtonProps: z } = nl({
4187
4187
  toolbar: n,
4188
4188
  model: f,
4189
4189
  disabled: w,
@@ -4262,8 +4262,8 @@ function Yf({
4262
4262
  ), Z = D(
4263
4263
  (q) => {
4264
4264
  if (q.id === "print_screen") {
4265
- let ee = (c == null ? void 0 : c.map((z) => z.id)) || [];
4266
- ee.length === 0 && (ee = (E == null ? void 0 : E.map((z) => z.id)) || []), le(
4265
+ let ee = (c == null ? void 0 : c.map((G) => G.id)) || [];
4266
+ ee.length === 0 && (ee = (E == null ? void 0 : E.map((G) => G.id)) || []), le(
4267
4267
  {
4268
4268
  id: -1,
4269
4269
  model: f,
@@ -4321,7 +4321,7 @@ function Yf({
4321
4321
  onOk: B
4322
4322
  });
4323
4323
  }, [B, $]);
4324
- return /* @__PURE__ */ L(ct, { wrap: !0, children: [
4324
+ return /* @__PURE__ */ L(dt, { wrap: !0, children: [
4325
4325
  w && /* @__PURE__ */ L(ge, { children: [
4326
4326
  /* @__PURE__ */ s(nt, {}),
4327
4327
  /* @__PURE__ */ s(gt, {}),
@@ -4409,7 +4409,7 @@ function Yf({
4409
4409
  ] }),
4410
4410
  /* @__PURE__ */ s(gt, {}),
4411
4411
  /* @__PURE__ */ s(Zt, { icon: /* @__PURE__ */ s(Wr, {}), ...J }),
4412
- /* @__PURE__ */ s(Zt, { icon: /* @__PURE__ */ s(qr, {}), ...Y }),
4412
+ /* @__PURE__ */ s(Zt, { icon: /* @__PURE__ */ s(qr, {}), ...z }),
4413
4413
  k && /* @__PURE__ */ L(ge, { children: [
4414
4414
  /* @__PURE__ */ s(gt, {}),
4415
4415
  /* @__PURE__ */ s(
@@ -4643,12 +4643,12 @@ const { useToken: Jf } = rt, { Title: Kf, Text: xr } = un, Zr = ({
4643
4643
  return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
4644
4644
  }, [t, ...n]), te(() => r, [r]) - e;
4645
4645
  }, al = (t) => t.model ? `columnState-${t.treeViewId ?? "tree"}-${t.model}` : void 0, Xf = (t) => {
4646
- const e = Ct(async () => {
4646
+ const e = Tt(async () => {
4647
4647
  if (!t)
4648
4648
  return;
4649
4649
  const r = localStorage.getItem(t);
4650
4650
  return r ? JSON.parse(r) : void 0;
4651
- }, [t]), n = Ct(
4651
+ }, [t]), n = Tt(
4652
4652
  async (r) => {
4653
4653
  t && localStorage.setItem(t, JSON.stringify(r));
4654
4654
  },
@@ -4663,7 +4663,7 @@ const { useToken: Jf } = rt, { Title: Kf, Text: xr } = un, Zr = ({
4663
4663
  V.getHandler().readUserViewPrefs
4664
4664
  ), [r, o] = Me(
4665
4665
  V.getHandler().saveUserViewPrefs
4666
- ), i = Ct(async () => {
4666
+ ), i = Tt(async () => {
4667
4667
  if (!t)
4668
4668
  throw new Error("Unknown column state key");
4669
4669
  const c = await e({
@@ -4672,7 +4672,7 @@ const { useToken: Jf } = rt, { Title: Kf, Text: xr } = un, Zr = ({
4672
4672
  if (c === !1)
4673
4673
  throw new Error("Empty column state");
4674
4674
  return c;
4675
- }, [t]), a = Ct(
4675
+ }, [t]), a = Tt(
4676
4676
  async (c) => {
4677
4677
  if (!t)
4678
4678
  return;
@@ -4691,14 +4691,14 @@ const { useToken: Jf } = rt, { Title: Kf, Text: xr } = un, Zr = ({
4691
4691
  return { getColumnState: i, updateColumnState: a };
4692
4692
  }, Zf = (t) => {
4693
4693
  const e = on(
4694
- Pt.FEATURE_USERVIEWPREFS
4694
+ Mt.FEATURE_USERVIEWPREFS
4695
4695
  ), {
4696
4696
  getColumnState: n,
4697
4697
  updateColumnState: r
4698
4698
  } = Xf(t), {
4699
4699
  getColumnState: o,
4700
4700
  updateColumnState: i
4701
- } = Qf(t), a = Ct(async () => {
4701
+ } = Qf(t), a = Tt(async () => {
4702
4702
  if (!e)
4703
4703
  return n();
4704
4704
  try {
@@ -4706,7 +4706,7 @@ const { useToken: Jf } = rt, { Title: Kf, Text: xr } = un, Zr = ({
4706
4706
  } catch (l) {
4707
4707
  return console.error(l), n();
4708
4708
  }
4709
- }, [t]), c = Ct(
4709
+ }, [t]), c = Tt(
4710
4710
  async (l) => {
4711
4711
  const d = l.map((p) => {
4712
4712
  const { sort: u, ...f } = p;
@@ -4802,12 +4802,12 @@ const tp = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(dl,
4802
4802
  /* @__PURE__ */ s(rp, { percent: t }),
4803
4803
  /* @__PURE__ */ s(op, { children: e })
4804
4804
  ] });
4805
- }, np = Ft.div`
4805
+ }, np = It.div`
4806
4806
  display: flex;
4807
4807
  align-items: center;
4808
4808
  width: 100%;
4809
4809
  min-width: 0;
4810
- `, rp = Ft(Nc)`
4810
+ `, rp = It(Nc)`
4811
4811
  flex: 1;
4812
4812
  min-width: 0;
4813
4813
  .ant-progress-outer {
@@ -4817,7 +4817,7 @@ const tp = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(dl,
4817
4817
  .ant-progress-text {
4818
4818
  display: none;
4819
4819
  }
4820
- `, op = Ft.div`
4820
+ `, op = It.div`
4821
4821
  padding-left: 10px;
4822
4822
  white-space: nowrap;
4823
4823
  `, sp = ({
@@ -4915,7 +4915,7 @@ const tp = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(dl,
4915
4915
  ), [C, S] = Me(
4916
4916
  V.getHandler().readObjects
4917
4917
  ), w = on(
4918
- Pt.FEATURE_GET_TOOLBAR
4918
+ Mt.FEATURE_GET_TOOLBAR
4919
4919
  ), M = D(() => {
4920
4920
  g(), v(), b(), S();
4921
4921
  }, [
@@ -5045,7 +5045,7 @@ const Iw = Object.values(rn), ap = (t) => {
5045
5045
  let i = !0;
5046
5046
  return r === !0 && (i = !1), n.showMenu !== void 0 && (i = n.showMenu), i;
5047
5047
  }, [n.showMenu, r]);
5048
- return e ? /* @__PURE__ */ L(ct, { children: [
5048
+ return e ? /* @__PURE__ */ L(dt, { children: [
5049
5049
  /* @__PURE__ */ s(ge, { children: e.value }),
5050
5050
  o && /* @__PURE__ */ s(eo, { id: e.id, model: e.model })
5051
5051
  ] }) : /* @__PURE__ */ s(ge, {});
@@ -5056,7 +5056,7 @@ const Iw = Object.values(rn), ap = (t) => {
5056
5056
  if (!e || !e.model || !e.name)
5057
5057
  return /* @__PURE__ */ s(ge, {});
5058
5058
  const { model: o, id: i, name: a } = e, c = n.get(o);
5059
- return /* @__PURE__ */ L(ct, { children: [
5059
+ return /* @__PURE__ */ L(dt, { children: [
5060
5060
  /* @__PURE__ */ s(ge, { children: `${c}:` }),
5061
5061
  /* @__PURE__ */ s(ge, { children: a }),
5062
5062
  !r && /* @__PURE__ */ s(eo, { id: i, model: o })
@@ -5077,7 +5077,7 @@ const up = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(ul,
5077
5077
  var m;
5078
5078
  const { t: e } = xe(), [n, r] = Me(
5079
5079
  V.getHandler().readObjects
5080
- ), { getFieldValue: o } = pe(Ze) || {}, { ooui: i, value: a } = t, [c, l] = I("default");
5080
+ ), { getFieldValue: o } = pe(et) || {}, { ooui: i, value: a } = t, [c, l] = I("default");
5081
5081
  let d = a, p = fr, u = a;
5082
5082
  i.selectionValues.size ? d = i.selectionValues.get(a) : Array.isArray(a) ? (u = a[0], d = a[1]) : i.fieldType === "boolean" && (d = a ? dp(i.label) : `${e("not")} ${i.label.toLowerCase()}`, p = Yu);
5083
5083
  const f = D(async () => {
@@ -5152,7 +5152,7 @@ const up = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(ul,
5152
5152
  }) => {
5153
5153
  const { token: o } = rt.useToken(), [i, a] = I(
5154
5154
  t ? t.replace(/,/g, ";").split(";").map((v) => v.trim()).filter((v) => v) : []
5155
- ), [c, l] = I(""), d = K(null), p = pe(Ze), { elementHasLostFocus: u } = p || {};
5155
+ ), [c, l] = I(""), d = K(null), p = pe(et), { elementHasLostFocus: u } = p || {};
5156
5156
  Xe(() => {
5157
5157
  if (t) {
5158
5158
  const v = t.replace(/,/g, ";").split(";").map((y) => y.trim()).filter(Boolean);
@@ -5210,7 +5210,7 @@ const up = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(ul,
5210
5210
  }
5211
5211
  ),
5212
5212
  /* @__PURE__ */ s(
5213
- St,
5213
+ xt,
5214
5214
  {
5215
5215
  readOnly: r,
5216
5216
  ref: d,
@@ -5480,7 +5480,7 @@ const rr = ({
5480
5480
  } = Ep({
5481
5481
  tableRef: o
5482
5482
  }), p = on(
5483
- Pt.FEATURE_MANY2ONE_SORT
5483
+ Mt.FEATURE_MANY2ONE_SORT
5484
5484
  ), u = en(() => {
5485
5485
  if (t)
5486
5486
  return ls(
@@ -5583,7 +5583,7 @@ const rr = ({
5583
5583
  const h = Object.keys(g)[0];
5584
5584
  return m[h] = g[h], m;
5585
5585
  }, {});
5586
- }, [t == null ? void 0 : t.columns]), u = Ct(async () => {
5586
+ }, [t == null ? void 0 : t.columns]), u = Tt(async () => {
5587
5587
  if (t)
5588
5588
  try {
5589
5589
  if (c(!0), !n && r && p) {
@@ -5768,11 +5768,11 @@ const rr = ({
5768
5768
  i.preventDefault();
5769
5769
  const l = Mp(
5770
5770
  c,
5771
- lt(),
5771
+ ct(),
5772
5772
  n
5773
5773
  );
5774
5774
  if (l) {
5775
- const d = lt(`2000-01-01 ${l}`);
5775
+ const d = ct(`2000-01-01 ${l}`);
5776
5776
  e == null || e(d, l);
5777
5777
  }
5778
5778
  } else if (i.key === "Escape") {
@@ -5870,7 +5870,7 @@ const rr = ({
5870
5870
  onChange: e
5871
5871
  }) => {
5872
5872
  const n = te(
5873
- () => lt().hour(0).minute(0).second(0),
5873
+ () => ct().hour(0).minute(0).second(0),
5874
5874
  []
5875
5875
  );
5876
5876
  return /* @__PURE__ */ L(Ke, { gutter: 8, children: [
@@ -5902,7 +5902,7 @@ const rr = ({
5902
5902
  ) })
5903
5903
  ] });
5904
5904
  }, { defaultAlgorithm: Vp, defaultSeed: Lp } = rt, Hp = Vp(Lp), bs = ot((t) => {
5905
- const { ooui: e } = t, { id: n, decimalDigits: r, readOnly: o, required: i } = e, a = pe(Ze), { elementHasLostFocus: c } = a || {}, l = te(() => i && !o, [i, o]), d = te(
5905
+ const { ooui: e } = t, { id: n, decimalDigits: r, readOnly: o, required: i } = e, a = pe(et), { elementHasLostFocus: c } = a || {}, l = te(() => i && !o, [i, o]), d = te(
5906
5906
  () => l ? Bp : Vr,
5907
5907
  [l]
5908
5908
  ), p = D((f) => f ? /* @__PURE__ */ s(Kr, { content: f }) : null, []), u = D((f) => `${f}`.replace(/[^0-9.-]+/g, ""), []);
@@ -5923,12 +5923,12 @@ const rr = ({
5923
5923
  ) });
5924
5924
  });
5925
5925
  bs.displayName = "Float";
5926
- const Bp = Ft(Vr)`
5926
+ const Bp = It(Vr)`
5927
5927
  &.ant-input-number {
5928
5928
  background-color: ${Hp.colorPrimaryBg};
5929
5929
  }
5930
5930
  `, { useToken: jp } = rt, { defaultAlgorithm: Up, defaultSeed: Wp } = rt, qp = Up(Wp), or = ot((t) => {
5931
- const { ooui: e, onChange: n } = t, { id: r, readOnly: o, required: i } = e, { token: a } = jp(), c = i && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, l = pe(Ze), { elementHasLostFocus: d } = l || {}, p = te(() => i && !o, [i, o]), u = te(
5931
+ const { ooui: e, onChange: n } = t, { id: r, readOnly: o, required: i } = e, { token: a } = jp(), c = i && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, l = pe(et), { elementHasLostFocus: d } = l || {}, p = te(() => i && !o, [i, o]), u = te(
5932
5932
  () => p ? Gp : Vr,
5933
5933
  [p]
5934
5934
  ), f = D((h) => h ? /* @__PURE__ */ s(Kr, { content: h }) : null, []), m = D((h) => h === void 0 ? "" : typeof h == "string" && !isNaN(parseFloat(h)) ? `${Math.trunc(parseFloat(h))}`.replace(/[^0-9-]+/g, "") : typeof h == "number" ? `${Math.trunc(h)}`.replace(/[^0-9-]+/g, "") : "", []), g = D(
@@ -5956,7 +5956,7 @@ const Bp = Ft(Vr)`
5956
5956
  ) });
5957
5957
  });
5958
5958
  or.displayName = "Integer";
5959
- const Gp = Ft(Vr)`
5959
+ const Gp = It(Vr)`
5960
5960
  &.ant-input-number {
5961
5961
  background-color: ${qp.colorPrimaryBg};
5962
5962
  }
@@ -6035,7 +6035,7 @@ const { defaultAlgorithm: zp, defaultSeed: Jp } = rt, Kp = zp(Jp), { Option: Xp
6035
6035
  children: l
6036
6036
  }
6037
6037
  );
6038
- }, em = Ft(Sn)`
6038
+ }, em = It(Sn)`
6039
6039
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
6040
6040
  background-color: ${Kp.colorPrimaryBg};
6041
6041
  }
@@ -6520,12 +6520,12 @@ var Ue, Um = wl, Wm = um, qm = fm, Gm = pm, Ym = mm, Un = hm, Nn = Sl, zm = gm,
6520
6520
  return Ro;
6521
6521
  }
6522
6522
  }
6523
- }() : Ro, On = Rm()(), bt = Bm(), oh = Cl(), sh = xl(), Il = Tl(), gr = xs(), Mn = {}, ih = typeof Uint8Array > "u" || !bt ? Ue : bt(Uint8Array), vn = {
6523
+ }() : Ro, On = Rm()(), wt = Bm(), oh = Cl(), sh = xl(), Il = Tl(), gr = xs(), Mn = {}, ih = typeof Uint8Array > "u" || !wt ? Ue : wt(Uint8Array), vn = {
6524
6524
  __proto__: null,
6525
6525
  "%AggregateError%": typeof AggregateError > "u" ? Ue : AggregateError,
6526
6526
  "%Array%": Array,
6527
6527
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? Ue : ArrayBuffer,
6528
- "%ArrayIteratorPrototype%": On && bt ? bt([][Symbol.iterator]()) : Ue,
6528
+ "%ArrayIteratorPrototype%": On && wt ? wt([][Symbol.iterator]()) : Ue,
6529
6529
  "%AsyncFromSyncIteratorPrototype%": Ue,
6530
6530
  "%AsyncFunction%": Mn,
6531
6531
  "%AsyncGenerator%": Mn,
@@ -6557,10 +6557,10 @@ var Ue, Um = wl, Wm = um, qm = fm, Gm = pm, Ym = mm, Un = hm, Nn = Sl, zm = gm,
6557
6557
  "%Int32Array%": typeof Int32Array > "u" ? Ue : Int32Array,
6558
6558
  "%isFinite%": isFinite,
6559
6559
  "%isNaN%": isNaN,
6560
- "%IteratorPrototype%": On && bt ? bt(bt([][Symbol.iterator]())) : Ue,
6560
+ "%IteratorPrototype%": On && wt ? wt(wt([][Symbol.iterator]())) : Ue,
6561
6561
  "%JSON%": typeof JSON == "object" ? JSON : Ue,
6562
6562
  "%Map%": typeof Map > "u" ? Ue : Map,
6563
- "%MapIteratorPrototype%": typeof Map > "u" || !On || !bt ? Ue : bt((/* @__PURE__ */ new Map())[Symbol.iterator]()),
6563
+ "%MapIteratorPrototype%": typeof Map > "u" || !On || !wt ? Ue : wt((/* @__PURE__ */ new Map())[Symbol.iterator]()),
6564
6564
  "%Math%": Math,
6565
6565
  "%Number%": Number,
6566
6566
  "%Object%": Um,
@@ -6574,10 +6574,10 @@ var Ue, Um = wl, Wm = um, qm = fm, Gm = pm, Ym = mm, Un = hm, Nn = Sl, zm = gm,
6574
6574
  "%Reflect%": typeof Reflect > "u" ? Ue : Reflect,
6575
6575
  "%RegExp%": RegExp,
6576
6576
  "%Set%": typeof Set > "u" ? Ue : Set,
6577
- "%SetIteratorPrototype%": typeof Set > "u" || !On || !bt ? Ue : bt((/* @__PURE__ */ new Set())[Symbol.iterator]()),
6577
+ "%SetIteratorPrototype%": typeof Set > "u" || !On || !wt ? Ue : wt((/* @__PURE__ */ new Set())[Symbol.iterator]()),
6578
6578
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? Ue : SharedArrayBuffer,
6579
6579
  "%String%": String,
6580
- "%StringIteratorPrototype%": On && bt ? bt(""[Symbol.iterator]()) : Ue,
6580
+ "%StringIteratorPrototype%": On && wt ? wt(""[Symbol.iterator]()) : Ue,
6581
6581
  "%Symbol%": On ? Symbol : Ue,
6582
6582
  "%SyntaxError%": Un,
6583
6583
  "%ThrowTypeError%": rh,
@@ -6604,11 +6604,11 @@ var Ue, Um = wl, Wm = um, qm = fm, Gm = pm, Ym = mm, Un = hm, Nn = Sl, zm = gm,
6604
6604
  "%Math.sign%": th,
6605
6605
  "%Reflect.getPrototypeOf%": sh
6606
6606
  };
6607
- if (bt)
6607
+ if (wt)
6608
6608
  try {
6609
6609
  null.error;
6610
6610
  } catch (t) {
6611
- var ah = bt(bt(t));
6611
+ var ah = wt(wt(t));
6612
6612
  vn["%Error.prototype%"] = ah;
6613
6613
  }
6614
6614
  var lh = function t(e) {
@@ -6624,7 +6624,7 @@ var lh = function t(e) {
6624
6624
  r && (n = r.prototype);
6625
6625
  } else if (e === "%AsyncIteratorPrototype%") {
6626
6626
  var o = t("%AsyncGenerator%");
6627
- o && bt && (n = bt(o.prototype));
6627
+ o && wt && (n = wt(o.prototype));
6628
6628
  }
6629
6629
  return vn[e] = n, n;
6630
6630
  }, xi = {
@@ -6998,9 +6998,9 @@ function bg(t, e, n) {
6998
6998
  return !0;
6999
6999
  }
7000
7000
  var wg = Gl;
7001
- const Is = /* @__PURE__ */ xa(wg), Yl = $t(
7001
+ const Is = /* @__PURE__ */ xa(wg), Yl = kt(
7002
7002
  (t, e) => {
7003
- const { onSubmit: n, searchValues: r, searchFields: o, onChange: i, onClear: a } = t, [c] = Mt.useForm(), [l, d] = I({}), [p, u] = I(
7003
+ const { onSubmit: n, searchValues: r, searchFields: o, onChange: i, onClear: a } = t, [c] = $t.useForm(), [l, d] = I({}), [p, u] = I(
7004
7004
  {}
7005
7005
  ), [f, m] = I(""), { t: g } = xe(), [h, v] = I(0), y = K(null), [b, C] = I([]);
7006
7006
  de(() => {
@@ -7128,7 +7128,7 @@ const Is = /* @__PURE__ */ xa(wg), Yl = $t(
7128
7128
  [c]
7129
7129
  );
7130
7130
  return /* @__PURE__ */ s(Wn, { children: /* @__PURE__ */ s(
7131
- Mt,
7131
+ $t,
7132
7132
  {
7133
7133
  form: c,
7134
7134
  onFinish: n,
@@ -7163,7 +7163,7 @@ const Is = /* @__PURE__ */ xa(wg), Yl = $t(
7163
7163
  });
7164
7164
  },
7165
7165
  children: /* @__PURE__ */ s(
7166
- ct,
7166
+ dt,
7167
7167
  {
7168
7168
  direction: "vertical",
7169
7169
  style: { rowGap: 0, width: "100%" },
@@ -7191,7 +7191,7 @@ const Is = /* @__PURE__ */ xa(wg), Yl = $t(
7191
7191
  transition: "top 0.2s ease"
7192
7192
  },
7193
7193
  children: /* @__PURE__ */ s(
7194
- St,
7194
+ xt,
7195
7195
  {
7196
7196
  placeholder: g("enterFieldToFilter"),
7197
7197
  value: f,
@@ -7407,7 +7407,7 @@ function Tg(t) {
7407
7407
  const { onLimitChange: e } = t, { t: n } = xe(), r = new Do({ name: "limit" }), o = new Do({ name: "offset" });
7408
7408
  return /* @__PURE__ */ L("div", { className: "pl-2 pt-2", children: [
7409
7409
  /* @__PURE__ */ s(Ke, { children: n("parameters") }, "count_params"),
7410
- /* @__PURE__ */ L(ct, { align: "center", children: [
7410
+ /* @__PURE__ */ L(dt, { align: "center", children: [
7411
7411
  n("limit") + " :",
7412
7412
  /* @__PURE__ */ s(
7413
7413
  or,
@@ -7439,7 +7439,7 @@ function ro(t) {
7439
7439
  searchError: u,
7440
7440
  searchValues: f,
7441
7441
  showLimitOptions: m = !0
7442
- } = t, [g, h] = I(), [v, y] = I(), [b, C] = I(!1), S = K(), { token: w } = Fg(), [M] = Mt.useForm();
7442
+ } = t, [g, h] = I(), [v, y] = I(), [b, C] = I(!1), S = K(), { token: w } = Fg(), [M] = $t.useForm();
7443
7443
  de(() => {
7444
7444
  M.setFieldsValue(f);
7445
7445
  }, [f]), de(() => {
@@ -7485,7 +7485,7 @@ function ro(t) {
7485
7485
  },
7486
7486
  children: ({ measureRef: _ }) => /* @__PURE__ */ s("div", { ref: _, children: /* @__PURE__ */ L("div", { style: { display: d ? "block" : "none" }, children: [
7487
7487
  /* @__PURE__ */ L(
7488
- Mt,
7488
+ $t,
7489
7489
  {
7490
7490
  className: "p-3 shadow-md",
7491
7491
  style: { borderRadius: w.borderRadius },
@@ -7529,7 +7529,7 @@ function ro(t) {
7529
7529
  function Jl({
7530
7530
  useLocalState: t = !1
7531
7531
  }) {
7532
- const e = Jg() && !t, n = pn(), [r, o] = I(!1), [i, a] = I(!1), [c, l] = I([]), [d, p] = I(0), [u, f] = I(void 0), [m, g] = I([]), [h, v] = I({}), [y, b] = I(), [C, S] = I([]), [w, M] = I(), [F, E] = I(0), [A, P] = I(), [_, x] = I(1), [O, T] = I(wn), [R, k] = I(Tt);
7532
+ const e = Jg() && !t, n = pn(), [r, o] = I(!1), [i, a] = I(!1), [c, l] = I([]), [d, p] = I(0), [u, f] = I(void 0), [m, g] = I([]), [h, v] = I({}), [y, b] = I(), [C, S] = I([]), [w, M] = I(), [F, E] = I(0), [A, P] = I(), [_, x] = I(1), [O, T] = I(wn), [R, k] = I(Ft);
7533
7533
  return e ? {
7534
7534
  treeIsLoading: n.treeIsLoading ?? !1,
7535
7535
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -7574,7 +7574,7 @@ function Jl({
7574
7574
  treeType: n.treeType ?? wn,
7575
7575
  setTreeType: n.setTreeType ?? (() => {
7576
7576
  }),
7577
- limit: n.limit ?? Tt,
7577
+ limit: n.limit ?? Ft,
7578
7578
  setLimit: n.setLimit ?? (() => {
7579
7579
  })
7580
7580
  } : {
@@ -7665,7 +7665,7 @@ const As = () => {
7665
7665
  if (!e)
7666
7666
  return !1;
7667
7667
  const H = ((W = e.fields_in_conditions) == null ? void 0 : W.colors) || [], U = ((J = e.fields_in_conditions) == null ? void 0 : J.status) || [];
7668
- return H.some((Y) => f.current.includes(Y)) || U.some((Y) => f.current.includes(Y));
7668
+ return H.some((z) => f.current.includes(z)) || U.some((z) => f.current.includes(z));
7669
7669
  }, [e]), x = D(async () => {
7670
7670
  if (!p || h.size === 0 || !o || !f.current.length || !a)
7671
7671
  return;
@@ -7675,7 +7675,7 @@ const As = () => {
7675
7675
  );
7676
7676
  if (H.length !== 0)
7677
7677
  try {
7678
- H.forEach((Y) => y.current.add(Y));
7678
+ H.forEach((z) => y.current.add(z));
7679
7679
  const { results: U } = await M({
7680
7680
  searchIds: H,
7681
7681
  fieldsToRetrieve: f.current
@@ -7684,11 +7684,11 @@ const As = () => {
7684
7684
  U,
7685
7685
  r
7686
7686
  ), J = [...b.current];
7687
- W.forEach((Y) => {
7687
+ W.forEach((z) => {
7688
7688
  const le = J.findIndex(
7689
- (re) => re.id === Y.id
7689
+ (re) => re.id === z.id
7690
7690
  );
7691
- le >= 0 ? J[le] = Y : J.push(Y), y.current.delete(Y.id);
7691
+ le >= 0 ? J[le] = z : J.push(z), y.current.delete(z.id);
7692
7692
  }), b.current = J;
7693
7693
  } catch (U) {
7694
7694
  H.forEach((W) => y.current.delete(W)), U.name !== "AbortError" && console.error("Error updating function fields:", U);
@@ -7711,8 +7711,8 @@ const As = () => {
7711
7711
  if (U.length === 0)
7712
7712
  return;
7713
7713
  v((J) => {
7714
- const Y = new Set(J);
7715
- return U.forEach((le) => Y.add(le)), Y;
7714
+ const z = new Set(J);
7715
+ return U.forEach((le) => z.add(le)), z;
7716
7716
  }), f.current.length > 0 && o && a && setTimeout(() => {
7717
7717
  x();
7718
7718
  }, 100);
@@ -7722,21 +7722,21 @@ const As = () => {
7722
7722
  async (H) => {
7723
7723
  var J;
7724
7724
  if (i == null || i(H), H.length === 0 || !f.current.some(
7725
- (Y) => H.some((le) => le[Y] !== void 0)
7725
+ (z) => H.some((le) => le[z] !== void 0)
7726
7726
  ) || !_() || !a || !c)
7727
7727
  return;
7728
- const U = H.map((Y) => ({ ...l == null ? void 0 : l.find((re) => re.id === Y.id), ...Y })), W = rr({
7728
+ const U = H.map((z) => ({ ...l == null ? void 0 : l.find((re) => re.id === z.id), ...z })), W = rr({
7729
7729
  treeOoui: a
7730
7730
  });
7731
7731
  try {
7732
- const Y = await E({
7732
+ const z = await E({
7733
7733
  conditions: W,
7734
7734
  values: U,
7735
7735
  context: r
7736
7736
  });
7737
- c(Y, a), (J = n == null ? void 0 : n.current) == null || J.refreshRowStyles();
7738
- } catch (Y) {
7739
- Y.name !== "AbortError" && console.error("Error parsing conditions:", Y);
7737
+ c(z, a), (J = n == null ? void 0 : n.current) == null || J.refreshRowStyles();
7738
+ } catch (z) {
7739
+ z.name !== "AbortError" && console.error("Error parsing conditions:", z);
7740
7740
  }
7741
7741
  },
7742
7742
  [
@@ -7754,12 +7754,12 @@ const As = () => {
7754
7754
  const H = ((W = n == null ? void 0 : n.current) == null ? void 0 : W.getVisibleRows()) || [];
7755
7755
  if (H.length === 0 || b.current.length === 0)
7756
7756
  return;
7757
- const U = b.current.filter((Y) => {
7757
+ const U = b.current.filter((z) => {
7758
7758
  const le = H.find(
7759
- (X) => (X == null ? void 0 : X.id) === (Y == null ? void 0 : Y.id)
7759
+ (X) => (X == null ? void 0 : X.id) === (z == null ? void 0 : z.id)
7760
7760
  );
7761
7761
  return le ? f.current.some(
7762
- (X) => Y[X] !== le[X]
7762
+ (X) => z[X] !== le[X]
7763
7763
  ) : !1;
7764
7764
  }).filter(Boolean);
7765
7765
  U.length > 0 && (T(U), (J = n == null ? void 0 : n.current) == null || J.updateRows(U));
@@ -7780,13 +7780,13 @@ const As = () => {
7780
7780
  const U = [...b.current];
7781
7781
  H.forEach((W) => {
7782
7782
  const J = U.findIndex(
7783
- (Y) => Y.id === W.id
7783
+ (z) => z.id === W.id
7784
7784
  );
7785
7785
  if (J >= 0) {
7786
- const Y = { ...U[J] };
7786
+ const z = { ...U[J] };
7787
7787
  f.current.forEach((le) => {
7788
- W[le] !== void 0 && (Y[le] = W[le]);
7789
- }), U[J] = Y;
7788
+ W[le] !== void 0 && (z[le] = W[le]);
7789
+ }), U[J] = z;
7790
7790
  } else
7791
7791
  f.current.some(
7792
7792
  (le) => W[le] !== void 0
@@ -8118,7 +8118,7 @@ function Mg(t, e) {
8118
8118
  setTreeFirstVisibleRow: U,
8119
8119
  treeFirstVisibleRow: W,
8120
8120
  selectedRowItems: J,
8121
- setSearchParams: Y,
8121
+ setSearchParams: z,
8122
8122
  searchValues: le,
8123
8123
  searchParams: re,
8124
8124
  setSearchValues: X,
@@ -8131,18 +8131,18 @@ function Mg(t, e) {
8131
8131
  isActive: fe,
8132
8132
  order: q,
8133
8133
  setOrder: ee
8134
- } = Jl({ useLocalState: !l }), z = u || ie, he = K(z), qe = K(!1), Fe = K(), ve = K(), Ce = K(!1);
8134
+ } = Jl({ useLocalState: !l }), G = u || ie, he = K(G), qe = K(!1), Fe = K(), ve = K(), Ce = K(!1);
8135
8135
  de(() => {
8136
- var Ve, tt;
8137
- z !== void 0 && he.current === void 0 || typeof z == "string" && typeof he.current == "string" && z !== he.current ? (qe.current = !!z, Y == null || Y([]), X == null || X({}), (Ve = g.current) == null || Ve.unselectAll()) : z === void 0 && he.current !== void 0 && (qe.current = !1, (tt = g.current) == null || tt.unselectAll()), he.current = z;
8138
- }, [z]);
8136
+ var Le, Ze;
8137
+ G !== void 0 && he.current === void 0 || typeof G == "string" && typeof he.current == "string" && G !== he.current ? (qe.current = !!G, z == null || z([]), X == null || X({}), (Le = g.current) == null || Le.unselectAll()) : G === void 0 && he.current !== void 0 && (qe.current = !1, (Ze = g.current) == null || Ze.unselectAll()), he.current = G;
8138
+ }, [G]);
8139
8139
  const Ie = te(() => {
8140
8140
  if (T)
8141
8141
  return Jt(T);
8142
8142
  }, [T]), {
8143
8143
  columns: Te,
8144
8144
  strings: be,
8145
- colorsForResults: He,
8145
+ colorsForResults: ke,
8146
8146
  statusForResults: Qe,
8147
8147
  onRowStyle: Re,
8148
8148
  statusComponent: Be,
@@ -8151,7 +8151,7 @@ function Mg(t, e) {
8151
8151
  updateColumnState: $e,
8152
8152
  isColumnStateLoading: ze,
8153
8153
  updateAttributes: Ge,
8154
- clearAttributes: ke
8154
+ clearAttributes: Ne
8155
8155
  } = gs({
8156
8156
  treeOoui: Ie,
8157
8157
  parentContext: d,
@@ -8162,8 +8162,8 @@ function Mg(t, e) {
8162
8162
  tableRef: g
8163
8163
  }), {
8164
8164
  isFieldLoading: Se,
8165
- refreshFunctionFields: Ne,
8166
- clearAutorefreshableFields: G,
8165
+ refreshFunctionFields: Ve,
8166
+ clearAutorefreshableFields: Y,
8167
8167
  addRecordsToCheckFunctionFields: me,
8168
8168
  onHasFunctionFieldsToParseConditions: ce
8169
8169
  } = Rs({
@@ -8175,66 +8175,69 @@ function Mg(t, e) {
8175
8175
  treeOoui: Ie,
8176
8176
  updateAttributes: Ge,
8177
8177
  results: ue
8178
- }), we = te(() => (J == null ? void 0 : J.map((Ve) => Ve.id)) || [], [J]), oe = te(() => {
8179
- if (Te)
8180
- return Te.map((Ve) => ({
8181
- ...Ve,
8182
- render: (tt, st) => /* @__PURE__ */ s(
8183
- oo,
8184
- {
8185
- value: tt,
8186
- record: st,
8187
- column: Ve,
8188
- isFieldLoading: Se
8189
- }
8190
- )
8191
- }));
8192
- }, [Te, Se]), Ee = te(
8178
+ }), we = te(() => (J == null ? void 0 : J.map((Le) => Le.id)) || [], [J]), oe = te(() => {
8179
+ if (!Te)
8180
+ return;
8181
+ const Le = G !== void 0;
8182
+ return Te.map((Ze) => ({
8183
+ ...Ze,
8184
+ isSortable: Le ? !1 : Ze.isSortable,
8185
+ render: (st, bt) => /* @__PURE__ */ s(
8186
+ oo,
8187
+ {
8188
+ value: st,
8189
+ record: bt,
8190
+ column: Ze,
8191
+ isFieldLoading: Se
8192
+ }
8193
+ )
8194
+ }));
8195
+ }, [Te, Se, G]), Oe = te(
8193
8196
  () => nn(re || [], a),
8194
8197
  [a, re]
8195
- ), dt = D(() => {
8196
- const tt = `${JSON.stringify(z ? a : Ee)}-${z}`;
8197
- return tt !== Fe.current ? (Fe.current = tt, !0) : !1;
8198
- }, [a, Ee, z]), mt = D(async () => {
8199
- if (!z && !Ce.current) {
8198
+ ), lt = D(() => {
8199
+ const Ze = `${JSON.stringify(G ? a : Oe)}-${G}`;
8200
+ return Ze !== Fe.current ? (Fe.current = Ze, !0) : !1;
8201
+ }, [a, Oe, G]), mt = D(async () => {
8202
+ if (!G && !Ce.current) {
8200
8203
  Ce.current = !0, C(void 0), ae(0);
8201
8204
  try {
8202
- const Ve = await E({
8203
- params: z ? a : Ee,
8205
+ const Le = await E({
8206
+ params: G ? a : Oe,
8204
8207
  model: n,
8205
8208
  context: d,
8206
- name_search: z
8209
+ name_search: G
8207
8210
  });
8208
- C(Ve), ae(Ve);
8209
- } catch (Ve) {
8210
- y(Ve);
8211
+ C(Le), ae(Le);
8212
+ } catch (Le) {
8213
+ y(Le);
8211
8214
  } finally {
8212
8215
  Ce.current = !1;
8213
8216
  }
8214
8217
  }
8215
8218
  }, [
8216
8219
  a,
8217
- Ee,
8220
+ Oe,
8218
8221
  n,
8219
- z,
8222
+ G,
8220
8223
  d,
8221
8224
  E,
8222
8225
  ae,
8223
8226
  y
8224
- ]), kt = Ct(
8227
+ ]), Dt = Tt(
8225
8228
  async ({
8226
- startRow: Ve,
8227
- endRow: tt,
8229
+ startRow: Le,
8230
+ endRow: Ze,
8228
8231
  state: st
8229
8232
  }) => {
8230
8233
  if (!Ie)
8231
8234
  return [];
8232
- let At;
8235
+ let bt;
8233
8236
  if (!v.current && q) {
8234
8237
  const ft = Bn({
8235
8238
  state: q
8236
8239
  });
8237
- At = tr(ft);
8240
+ bt = tr(ft);
8238
8241
  } else {
8239
8242
  const ft = st == null ? void 0 : st.filter((ln) => ln.sort || ln.sortIndex).map((ln) => ({
8240
8243
  sort: ln.sort || void 0,
@@ -8243,22 +8246,22 @@ function Mg(t, e) {
8243
8246
  })), En = ft && (ft == null ? void 0 : ft.length) > 0 ? ft : void 0, ao = Bn({
8244
8247
  state: En
8245
8248
  });
8246
- ee == null || ee(En), At = tr(ao);
8249
+ ee == null || ee(En), bt = tr(ao);
8247
8250
  }
8248
8251
  v.current = !0;
8249
- const Qt = z ? a : Ee, wr = (T == null ? void 0 : T.fields_in_conditions) !== void 0, io = rr({
8252
+ const Qt = G ? a : Oe, wr = (T == null ? void 0 : T.fields_in_conditions) !== void 0, io = rr({
8250
8253
  treeOoui: Ie,
8251
8254
  hasFunctionFieldsToParseConditions: wr && ce()
8252
8255
  }), { results: an, attrsEvaluated: Rn } = await P({
8253
8256
  params: Qt,
8254
- limit: tt - Ve,
8255
- offset: Ve,
8257
+ limit: Ze - Le,
8258
+ offset: Le,
8256
8259
  model: n,
8257
8260
  fields: T != null && T.field_parent ? { ...T == null ? void 0 : T.fields, [T == null ? void 0 : T.field_parent]: {} } : T == null ? void 0 : T.fields,
8258
8261
  context: d,
8259
8262
  attrs: io,
8260
- order: At,
8261
- name_search: z,
8263
+ order: bt,
8264
+ name_search: G,
8262
8265
  skipFunctionFields: wr,
8263
8266
  onIdsRetrieved: (ft) => {
8264
8267
  me(ft);
@@ -8267,16 +8270,16 @@ function Mg(t, e) {
8267
8270
  if (Z == null || Z({
8268
8271
  model: n,
8269
8272
  params: Qt,
8270
- name_search: z,
8273
+ name_search: G,
8271
8274
  context: d,
8272
- order: At
8273
- }), dt() || ve.current !== At)
8275
+ order: bt
8276
+ }), lt() || ve.current !== bt)
8274
8277
  se == null || se(an);
8275
8278
  else {
8276
8279
  const ft = [...ue || [], ...an];
8277
8280
  se == null || se(ft);
8278
8281
  }
8279
- if (ve.current = At, z ? (C(an.length), ae(an.length), w(!0)) : w(!1), an.length === 0)
8282
+ if (ve.current = bt, G ? (C(an.length), ae(an.length), w(!0)) : w(!1), an.length === 0)
8280
8283
  return h.current = [], C(0), ae(0), [];
8281
8284
  const _n = await Xt(
8282
8285
  Ie,
@@ -8284,7 +8287,7 @@ function Mg(t, e) {
8284
8287
  d
8285
8288
  );
8286
8289
  return Ge(Rn, Ie), Rn && Array.isArray(Rn) && Rn.forEach((ft) => {
8287
- ft.id !== void 0 && (ft.colors && (He.current[ft.id] = ft.colors), ft.status && (Qe.current[ft.id] = ft.status));
8290
+ ft.id !== void 0 && (ft.colors && (ke.current[ft.id] = ft.colors), ft.status && (Qe.current[ft.id] = ft.status));
8288
8291
  }), h.current = [..._n], _n;
8289
8292
  },
8290
8293
  [
@@ -8292,10 +8295,10 @@ function Mg(t, e) {
8292
8295
  q,
8293
8296
  me,
8294
8297
  a,
8295
- Ee,
8298
+ Oe,
8296
8299
  n,
8297
- dt,
8298
- z,
8300
+ lt,
8301
+ G,
8299
8302
  ce,
8300
8303
  d,
8301
8304
  P,
@@ -8308,17 +8311,17 @@ function Mg(t, e) {
8308
8311
  T,
8309
8312
  Ge
8310
8313
  ]
8311
- ), je = D(async () => z ? h.current : b ? (await x({
8312
- params: z ? a : Ee,
8314
+ ), je = D(async () => G ? h.current : b ? (await x({
8315
+ params: G ? a : Oe,
8313
8316
  model: n,
8314
8317
  context: d,
8315
8318
  totalItems: b
8316
- })).map((tt) => ({ id: tt })) : [], [
8317
- z,
8319
+ })).map((Ze) => ({ id: Ze })) : [], [
8320
+ G,
8318
8321
  b,
8319
8322
  x,
8320
8323
  a,
8321
- Ee,
8324
+ Oe,
8322
8325
  n,
8323
8326
  d
8324
8327
  ]), {
@@ -8334,29 +8337,29 @@ function Mg(t, e) {
8334
8337
  onSelectAll: je
8335
8338
  }), In = D(
8336
8339
  async ({
8337
- startRow: Ve,
8338
- endRow: tt,
8340
+ startRow: Le,
8341
+ endRow: Ze,
8339
8342
  state: st
8340
8343
  }) => {
8341
8344
  try {
8342
- $ == null || $(!0), Ve === 0 && !z && mt();
8343
- const At = await kt({
8344
- startRow: Ve,
8345
- endRow: tt,
8345
+ $ == null || $(!0), Le === 0 && !G && mt();
8346
+ const bt = await Dt({
8347
+ startRow: Le,
8348
+ endRow: Ze,
8346
8349
  state: st
8347
8350
  });
8348
- return $ == null || $(!1), At;
8349
- } catch (At) {
8350
- throw console.error(At), C(null), ae(0), $ == null || $(!1), y(At), At;
8351
+ return $ == null || $(!1), bt;
8352
+ } catch (bt) {
8353
+ throw console.error(bt), C(null), ae(0), $ == null || $(!1), y(bt), bt;
8351
8354
  }
8352
8355
  },
8353
8356
  [
8354
- kt,
8357
+ Dt,
8355
8358
  ae,
8356
8359
  $,
8357
8360
  y,
8358
8361
  mt,
8359
- z
8362
+ G
8360
8363
  ]
8361
8364
  ), { footerComponent: Nt } = ml({
8362
8365
  treeOoui: Ie,
@@ -8365,7 +8368,7 @@ function Mg(t, e) {
8365
8368
  showEmptyValues: !0
8366
8369
  }), ut = K(W);
8367
8370
  ut.current = W;
8368
- const ht = D(() => ut.current, []), vt = qe.current ? Tt : void 0, Jn = en(() => !oe || !Ie ? null : /* @__PURE__ */ s(
8371
+ const ht = D(() => ut.current, []), vt = qe.current ? Ft : void 0, Jn = en(() => !oe || !Ie ? null : /* @__PURE__ */ s(
8369
8372
  rs,
8370
8373
  {
8371
8374
  readonly: !1,
@@ -8416,20 +8419,20 @@ function Mg(t, e) {
8416
8419
  m
8417
8420
  ]), sn = K(re), mn = K(j);
8418
8421
  Xe(() => {
8419
- const Ve = !Is(
8422
+ const Le = !Is(
8420
8423
  re,
8421
8424
  sn.current
8422
- ), tt = mn.current && !j;
8423
- Ve && (tt || f === "top") && hn(), sn.current = re, mn.current = j;
8425
+ ), Ze = mn.current && !j;
8426
+ Le && (Ze || f === "top") && hn(), sn.current = re, mn.current = j;
8424
8427
  }, [re, j]);
8425
8428
  const hn = D(async () => {
8426
- var Ve;
8427
- it([]), ke(), G(), Fe.current = void 0, w(!1), (Ve = g == null ? void 0 : g.current) == null || Ve.refresh(), Ne();
8429
+ var Le;
8430
+ it([]), Ne(), Y(), Fe.current = void 0, w(!1), (Le = g == null ? void 0 : g.current) == null || Le.refresh(), Ve();
8428
8431
  }, [
8429
8432
  it,
8430
- ke,
8431
- G,
8432
- Ne
8433
+ Ne,
8434
+ Y,
8435
+ Ve
8433
8436
  ]);
8434
8437
  Lt(e, () => ({
8435
8438
  refreshResults: hn,
@@ -8463,26 +8466,26 @@ function Mg(t, e) {
8463
8466
  T == null ? void 0 : T.search_fields,
8464
8467
  le
8465
8468
  ]
8466
- ), Oe = D(() => {
8467
- var Ve;
8468
- it([]), (Ve = g.current) == null || Ve.unselectAll(), B == null || B(void 0), Y == null || Y([]), X == null || X(void 0);
8469
+ ), Ee = D(() => {
8470
+ var Le;
8471
+ it([]), (Le = g.current) == null || Le.unselectAll(), B == null || B(void 0), z == null || z([]), X == null || X(void 0);
8469
8472
  }, [
8470
8473
  it,
8471
8474
  B,
8472
- Y,
8475
+ z,
8473
8476
  X
8474
8477
  ]), De = D(
8475
- ({ params: Ve, searchValues: tt }) => {
8478
+ ({ params: Le, searchValues: Ze }) => {
8476
8479
  var st;
8477
- it([]), (st = g.current) == null || st.unselectAll(), B == null || B(void 0), Y == null || Y(Ve), X == null || X(tt);
8480
+ it([]), (st = g.current) == null || st.unselectAll(), B == null || B(void 0), z == null || z(Le), X == null || X(Ze);
8478
8481
  },
8479
8482
  [
8480
8483
  it,
8481
8484
  B,
8482
- Y,
8485
+ z,
8483
8486
  X
8484
8487
  ]
8485
- ), et = te(
8488
+ ), tt = te(
8486
8489
  () => ({
8487
8490
  isOpen: j,
8488
8491
  fields: { ...R == null ? void 0 : R.fields, ...T == null ? void 0 : T.fields },
@@ -8503,34 +8506,34 @@ function Mg(t, e) {
8503
8506
  ), at = D(
8504
8507
  () => N == null ? void 0 : N(!1),
8505
8508
  [N]
8506
- ), xt = D(
8507
- ({ params: Ve, values: tt }) => {
8509
+ ), Ct = D(
8510
+ ({ params: Le, values: Ze }) => {
8508
8511
  var st;
8509
- it([]), (st = g.current) == null || st.unselectAll(), B == null || B(void 0), Y == null || Y(Ve), X == null || X(tt), N == null || N(!1);
8512
+ it([]), (st = g.current) == null || st.unselectAll(), B == null || B(void 0), z == null || z(Le), X == null || X(Ze), N == null || N(!1);
8510
8513
  },
8511
8514
  [
8512
8515
  it,
8513
8516
  B,
8514
- Y,
8517
+ z,
8515
8518
  X,
8516
8519
  N
8517
8520
  ]
8518
- ), It = z && S && b !== void 0 && b !== null && b === Tt;
8521
+ ), At = G && S && b !== void 0 && b !== null && b === Ft;
8519
8522
  return /* @__PURE__ */ L(Wn, { children: [
8520
8523
  f === "top" && /* @__PURE__ */ s(
8521
8524
  ro,
8522
8525
  {
8523
8526
  ...An,
8524
- onClear: Oe,
8527
+ onClear: Ee,
8525
8528
  onSubmit: De
8526
8529
  }
8527
8530
  ),
8528
8531
  f === "side" && /* @__PURE__ */ s(
8529
8532
  zl,
8530
8533
  {
8531
- ...et,
8534
+ ...tt,
8532
8535
  onClose: at,
8533
- onSubmit: xt
8536
+ onSubmit: Ct
8534
8537
  }
8535
8538
  ),
8536
8539
  /* @__PURE__ */ s(
@@ -8538,7 +8541,7 @@ function Mg(t, e) {
8538
8541
  {
8539
8542
  selectedRowKeys: we,
8540
8543
  totalRows: b,
8541
- customMiddleComponent: It && /* @__PURE__ */ s(
8544
+ customMiddleComponent: At && /* @__PURE__ */ s(
8542
8545
  Kl,
8543
8546
  {
8544
8547
  onFilterSearchClick: () => N == null ? void 0 : N(!0)
@@ -8549,7 +8552,7 @@ function Mg(t, e) {
8549
8552
  /* @__PURE__ */ s("div", { ref: M, style: Bt, children: k || ze ? /* @__PURE__ */ s(nt, {}) : Jn })
8550
8553
  ] });
8551
8554
  }
8552
- const _s = $t(Mg), Hi = (t, e = "14px -apple-system") => {
8555
+ const _s = kt(Mg), Hi = (t, e = "14px -apple-system") => {
8553
8556
  const r = document.createElement("canvas").getContext("2d");
8554
8557
  r.font = e;
8555
8558
  const o = r.measureText(t);
@@ -8575,7 +8578,7 @@ const _s = $t(Mg), Hi = (t, e = "14px -apple-system") => {
8575
8578
  source: e,
8576
8579
  tableWidth: o
8577
8580
  };
8578
- }, kg = Ft.div`
8581
+ }, kg = It.div`
8579
8582
  display: flex;
8580
8583
  align-items: center;
8581
8584
  justify-content: center;
@@ -8609,7 +8612,7 @@ const _s = $t(Mg), Hi = (t, e = "14px -apple-system") => {
8609
8612
  o.toString()
8610
8613
  ) + " " });
8611
8614
  return /* @__PURE__ */ s(kg, { children: o > n ? u : p });
8612
- }, Xl = $t(
8615
+ }, Xl = kt(
8613
8616
  (t, e) => {
8614
8617
  var ie;
8615
8618
  const {
@@ -8638,7 +8641,7 @@ const _s = $t(Mg), Hi = (t, e = "14px -apple-system") => {
8638
8641
  } = t, E = K(null), [A, P] = I([]), _ = K(!1), [x, O] = I(), { t: T } = xe(), R = K(r), k = pe(
8639
8642
  Ot
8640
8643
  ), { title: $ = void 0, setTitle: j = void 0 } = (S ? k : {}) || {}, N = on(
8641
- Pt.FEATURE_MANY2ONE_SORT
8644
+ Mt.FEATURE_MANY2ONE_SORT
8642
8645
  ), H = te(() => {
8643
8646
  if (x)
8644
8647
  return ls(
@@ -8668,7 +8671,7 @@ const _s = $t(Mg), Hi = (t, e = "14px -apple-system") => {
8668
8671
  }, [a, x, w]), de(() => {
8669
8672
  R.current = r;
8670
8673
  }, [r]);
8671
- const U = (n - 1) * R.current + 1, W = U - 1 + A.length, J = o === void 0 ? null : o === 0 ? T("no_results") : T("summary").replace("{from}", U == null ? void 0 : U.toString()).replace("{to}", W == null ? void 0 : W.toString()).replace("{total}", o == null ? void 0 : o.toString()), Y = te(() => {
8674
+ const U = (n - 1) * R.current + 1, W = U - 1 + A.length, J = o === void 0 ? null : o === 0 ? T("no_results") : T("summary").replace("{from}", U == null ? void 0 : U.toString()).replace("{to}", W == null ? void 0 : W.toString()).replace("{total}", o == null ? void 0 : o.toString()), z = te(() => {
8672
8675
  if (!p || i.isExpandable)
8673
8676
  return null;
8674
8677
  const B = A == null ? void 0 : A.filter(
@@ -8724,7 +8727,7 @@ const _s = $t(Mg), Hi = (t, e = "14px -apple-system") => {
8724
8727
  return $g(H, A, 600);
8725
8728
  }, [H, A, x]), X = te(() => m && (x != null && x.columns.some((B) => B.sum !== void 0)) ? m - 30 : m, [m, x == null ? void 0 : x.columns]);
8726
8729
  return x === null || !re || ((ie = re == null ? void 0 : re.columns) == null ? void 0 : ie.length) === 0 ? /* @__PURE__ */ s(nt, { style: { padding: "2rem" } }) : /* @__PURE__ */ L(Ar, { children: [
8727
- Y,
8730
+ z,
8728
8731
  /* @__PURE__ */ s(
8729
8732
  Ld,
8730
8733
  {
@@ -8788,7 +8791,7 @@ const Ql = (t) => {
8788
8791
  searchParams: M = [],
8789
8792
  setSearchValues: F,
8790
8793
  clearSelection: E
8791
- } = t, [A, P] = I(!1), [_, x] = I(!1), [O, T] = I(), [R, k] = I(1), [$, j] = I(0), [N, H] = I(), [U, W] = I([]), [J, Y] = I(void 0), [le, re] = I(void 0), X = K(S || Tt), ie = K([]), B = D(
8794
+ } = t, [A, P] = I(!1), [_, x] = I(!1), [O, T] = I(), [R, k] = I(1), [$, j] = I(0), [N, H] = I(), [U, W] = I([]), [J, z] = I(void 0), [le, re] = I(void 0), X = K(S || Ft), ie = K([]), B = D(
8792
8795
  (Fe) => {
8793
8796
  v == null || v([...Fe]), W([...Fe]);
8794
8797
  },
@@ -8811,10 +8814,10 @@ const Ql = (t) => {
8811
8814
  fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
8812
8815
  context: d,
8813
8816
  attrs: Te
8814
- }), He = be[0];
8815
- ie.current = [...He], Y(Hn(be[1])), re(Rr(be[1]));
8816
- const Qe = He.map((Be) => Be.id), Re = m !== void 0 ? kn({
8817
- resultsToSort: He,
8817
+ }), ke = be[0];
8818
+ ie.current = [...ke], z(Hn(be[1])), re(Rr(be[1]));
8819
+ const Qe = ke.map((Be) => Be.id), Re = m !== void 0 ? kn({
8820
+ resultsToSort: ke,
8818
8821
  sorter: m,
8819
8822
  fields: { ...u.fields, ...f.fields }
8820
8823
  }) : [...ie.current];
@@ -8836,8 +8839,8 @@ const Ql = (t) => {
8836
8839
  p
8837
8840
  ]), Z = D(
8838
8841
  async (Fe) => {
8839
- const { params: ve, newOffset: Ce } = Fe || {}, Ie = nn(ve || M, b), { colors: Te, status: be } = Jt(u), He = {};
8840
- Te && (He.colors = Te), be && (He.status = be);
8842
+ const { params: ve, newOffset: Ce } = Fe || {}, Ie = nn(ve || M, b), { colors: Te, status: be } = Jt(u), ke = {};
8843
+ Te && (ke.colors = Te), be && (ke.status = be);
8841
8844
  const { totalItems: Qe, results: Re, attrsEvaluated: Be } = await V.getHandler().searchForTree({
8842
8845
  params: Ie,
8843
8846
  limit: X.current,
@@ -8845,9 +8848,9 @@ const Ql = (t) => {
8845
8848
  model: e,
8846
8849
  fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
8847
8850
  context: d,
8848
- attrs: He
8851
+ attrs: ke
8849
8852
  });
8850
- Y(Hn(Be)), re(Rr(Be)), ie.current = [...Re];
8853
+ z(Hn(Be)), re(Rr(Be)), ie.current = [...Re];
8851
8854
  const Ae = m !== void 0 ? kn({
8852
8855
  resultsToSort: Re,
8853
8856
  sorter: m,
@@ -8941,8 +8944,8 @@ const Ql = (t) => {
8941
8944
  P(!0), k(Fe), j((Fe - 1) * S);
8942
8945
  },
8943
8946
  [P, S, j, k]
8944
- ), z = D(() => {
8945
- A || (n == null || n(void 0), o == null || o([]), F == null || F({}), T(void 0), j(0), k(1), w == null || w(S || Tt));
8947
+ ), G = D(() => {
8948
+ A || (n == null || n(void 0), o == null || o([]), F == null || F({}), T(void 0), j(0), k(1), w == null || w(S || Ft));
8946
8949
  }, [
8947
8950
  A,
8948
8951
  n,
@@ -8969,7 +8972,7 @@ const Ql = (t) => {
8969
8972
  }), [e, d, N, M, b]);
8970
8973
  return {
8971
8974
  submit: q,
8972
- clear: z,
8975
+ clear: G,
8973
8976
  fetchResults: ae,
8974
8977
  tableRefreshing: A,
8975
8978
  searchFilterLoading: _,
@@ -8988,7 +8991,7 @@ const Ql = (t) => {
8988
8991
  };
8989
8992
  };
8990
8993
  function Vg(t, e) {
8991
- var kt;
8994
+ var Dt;
8992
8995
  const {
8993
8996
  model: n,
8994
8997
  formView: r,
@@ -9012,7 +9015,7 @@ function Vg(t, e) {
9012
9015
  results: U = void 0,
9013
9016
  selectedRowItems: W = void 0,
9014
9017
  setSelectedRowItems: J = void 0,
9015
- searchParams: Y = [],
9018
+ searchParams: z = [],
9016
9019
  setSearchParams: le = void 0,
9017
9020
  searchVisible: re = !0,
9018
9021
  setSearchVisible: X = void 0,
@@ -9023,9 +9026,9 @@ function Vg(t, e) {
9023
9026
  setTreeIsLoading: Z = void 0,
9024
9027
  searchValues: ae = {},
9025
9028
  setSearchValues: fe = void 0,
9026
- limit: q = Tt,
9029
+ limit: q = Ft,
9027
9030
  setLimit: ee = void 0
9028
- } = (p ? $ : {}) || {}, { showErrorNotification: z } = yt(), he = D(
9031
+ } = (p ? $ : {}) || {}, { showErrorNotification: G } = yt(), he = D(
9029
9032
  (je) => {
9030
9033
  J == null || J(je.map((it) => ({ id: it }))), f == null || f(je);
9031
9034
  },
@@ -9038,7 +9041,7 @@ function Vg(t, e) {
9038
9041
  searchFilterLoading: Ie,
9039
9042
  searchError: Te,
9040
9043
  page: be,
9041
- limit: He,
9044
+ limit: ke,
9042
9045
  offset: Qe,
9043
9046
  getResults: Re,
9044
9047
  requestPageChange: Be,
@@ -9047,14 +9050,14 @@ function Vg(t, e) {
9047
9050
  colorsForResults: $e,
9048
9051
  statusForResults: ze,
9049
9052
  totalItems: Ge,
9050
- getAllIds: ke
9053
+ getAllIds: Ne
9051
9054
  } = Ql({
9052
9055
  model: C,
9053
9056
  setSearchTreeNameSearch: ue,
9054
9057
  setSelectedRowItems: he,
9055
9058
  setSearchParams: le,
9056
9059
  setSearchValues: fe,
9057
- searchParams: Y,
9060
+ searchParams: z,
9058
9061
  setSearchVisible: X,
9059
9062
  setTreeIsLoading: Z,
9060
9063
  nameSearch: a,
@@ -9072,7 +9075,7 @@ function Vg(t, e) {
9072
9075
  setActionViewTotalItems: se,
9073
9076
  limit: q,
9074
9077
  setLimit: ee,
9075
- clearSelection: (kt = b.current) == null ? void 0 : kt.unselectAll
9078
+ clearSelection: (Dt = b.current) == null ? void 0 : Dt.unselectAll
9076
9079
  });
9077
9080
  Lt(e, () => ({
9078
9081
  refreshResults: () => {
@@ -9085,13 +9088,13 @@ function Vg(t, e) {
9085
9088
  const Se = async () => {
9086
9089
  v(!1), g(!0), P(void 0), Z == null || Z(!0);
9087
9090
  try {
9088
- await Ne(), v(!0);
9091
+ await Ve(), v(!0);
9089
9092
  } catch (je) {
9090
- z(je), Z == null || Z(!1);
9093
+ G(je), Z == null || Z(!1);
9091
9094
  } finally {
9092
9095
  g(!1);
9093
9096
  }
9094
- }, Ne = async () => {
9097
+ }, Ve = async () => {
9095
9098
  S(n);
9096
9099
  let je = r;
9097
9100
  r || (je = await V.getHandler().getView({
@@ -9109,7 +9112,7 @@ function Vg(t, e) {
9109
9112
  de(() => {
9110
9113
  Se();
9111
9114
  }, [n]);
9112
- const G = D(
9115
+ const Y = D(
9113
9116
  (je) => {
9114
9117
  ee == null || ee(je);
9115
9118
  },
@@ -9141,7 +9144,7 @@ function Vg(t, e) {
9141
9144
  try {
9142
9145
  await me(je);
9143
9146
  } catch (qt) {
9144
- z(qt);
9147
+ G(qt);
9145
9148
  }
9146
9149
  return;
9147
9150
  }
@@ -9156,17 +9159,17 @@ function Vg(t, e) {
9156
9159
  C,
9157
9160
  F,
9158
9161
  i,
9159
- z,
9162
+ G,
9160
9163
  me,
9161
9164
  w
9162
9165
  ]
9163
9166
  ), we = D(async () => {
9164
- const je = await ke();
9167
+ const je = await Ne();
9165
9168
  J == null || J(je.map((it) => ({ id: it }))), f == null || f(je);
9166
- }, [ke, f, J]), oe = te(() => w != null && w.isExpandable ? T - 160 : T - (_ + 240), [T, _, w == null ? void 0 : w.isExpandable]), Ee = te(
9169
+ }, [Ne, f, J]), oe = te(() => w != null && w.isExpandable ? T - 160 : T - (_ + 240), [T, _, w == null ? void 0 : w.isExpandable]), Oe = te(
9167
9170
  () => W == null ? void 0 : W.map((je) => je.id),
9168
9171
  [W]
9169
- ), dt = D(() => !w || !F ? null : /* @__PURE__ */ L(ge, { children: [
9172
+ ), lt = D(() => !w || !F ? null : /* @__PURE__ */ L(ge, { children: [
9170
9173
  /* @__PURE__ */ s(
9171
9174
  ro,
9172
9175
  {
@@ -9180,7 +9183,7 @@ function Vg(t, e) {
9180
9183
  offset: Qe,
9181
9184
  isSearching: Ie,
9182
9185
  onSubmit: qe,
9183
- onLimitChange: G,
9186
+ onLimitChange: Y,
9184
9187
  setSearchFilterHeight: x,
9185
9188
  searchError: Te,
9186
9189
  searchVisible: re,
@@ -9193,7 +9196,7 @@ function Vg(t, e) {
9193
9196
  ref: b,
9194
9197
  context: u,
9195
9198
  total: Ge,
9196
- limit: He,
9199
+ limit: ke,
9197
9200
  page: be,
9198
9201
  treeView: w,
9199
9202
  results: Re(),
@@ -9203,7 +9206,7 @@ function Vg(t, e) {
9203
9206
  scrollY: c || oe,
9204
9207
  colorsForResults: $e,
9205
9208
  statusForResults: ze,
9206
- selectedRowKeys: Ee,
9209
+ selectedRowKeys: Oe,
9207
9210
  onRowSelectionChange: he,
9208
9211
  sorter: ie,
9209
9212
  onChangeSort: Ae,
@@ -9223,10 +9226,10 @@ function Vg(t, e) {
9223
9226
  F,
9224
9227
  Re,
9225
9228
  q,
9226
- He,
9229
+ ke,
9227
9230
  Qe,
9228
9231
  ce,
9229
- G,
9232
+ Y,
9230
9233
  be,
9231
9234
  u,
9232
9235
  Be,
@@ -9236,7 +9239,7 @@ function Vg(t, e) {
9236
9239
  ae,
9237
9240
  re,
9238
9241
  we,
9239
- Ee,
9242
+ Oe,
9240
9243
  ie,
9241
9244
  ze,
9242
9245
  qe,
@@ -9245,9 +9248,9 @@ function Vg(t, e) {
9245
9248
  c,
9246
9249
  w
9247
9250
  ]), mt = A || Te;
9248
- return mt ? (console.error(mt), /* @__PURE__ */ s(_t, { className: "mt-10", message: mt, type: "error", banner: !0 })) : /* @__PURE__ */ s("div", { style: d ? {} : { display: "none" }, children: m ? /* @__PURE__ */ s(nt, {}) : dt() });
9251
+ return mt ? (console.error(mt), /* @__PURE__ */ s(_t, { className: "mt-10", message: mt, type: "error", banner: !0 })) : /* @__PURE__ */ s("div", { style: d ? {} : { display: "none" }, children: m ? /* @__PURE__ */ s(nt, {}) : lt() });
9249
9252
  }
9250
- const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9253
+ const Zl = kt(Vg), Lg = Ft, Hg = (t) => {
9251
9254
  const {
9252
9255
  treeViewFetching: e,
9253
9256
  treeOoui: n,
@@ -9289,18 +9292,18 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9289
9292
  currentPage: U,
9290
9293
  setCurrentPage: W,
9291
9294
  order: J,
9292
- setOrder: Y,
9295
+ setOrder: z,
9293
9296
  limit: le,
9294
9297
  setLimit: re
9295
- } = Jl({ useLocalState: !i }), { treeMaxLimit: X } = Wt(), ie = Math.min(le, X), [B, se] = I(!0), [ue, Z] = I(), [ae, fe] = I([]), [q, ee] = I(!1), z = a || T, he = K(z), qe = K(x), Fe = K(b), ve = K(), Ce = K([]), Ie = K(!1), Te = (r == null ? void 0 : r.fields_in_conditions) !== void 0, [be, He] = Me(
9298
+ } = Jl({ useLocalState: !i }), { treeMaxLimit: X } = Wt(), ie = Math.min(le, X), [B, se] = I(!0), [ue, Z] = I(), [ae, fe] = I([]), [q, ee] = I(!1), G = a || T, he = K(G), qe = K(x), Fe = K(b), ve = K(), Ce = K([]), Ie = K(!1), Te = (r == null ? void 0 : r.fields_in_conditions) !== void 0, [be, ke] = Me(
9296
9299
  V.getHandler().parseConditions
9297
- ), Qe = D((Oe) => {
9300
+ ), Qe = D((Ee) => {
9298
9301
  Ce.current = Ce.current.map((De) => {
9299
- const et = Oe.find((at) => at.id === De.id);
9300
- return { ...De, ...et };
9301
- }), fe((De) => De.map((et) => {
9302
- const at = Oe.find((xt) => xt.id === et.id);
9303
- return { ...et, ...at };
9302
+ const tt = Ee.find((at) => at.id === De.id);
9303
+ return { ...De, ...tt };
9304
+ }), fe((De) => De.map((tt) => {
9305
+ const at = Ee.find((Ct) => Ct.id === tt.id);
9306
+ return { ...tt, ...at };
9304
9307
  }));
9305
9308
  }, []), {
9306
9309
  isFieldLoading: Re,
@@ -9318,55 +9321,55 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9318
9321
  treeOoui: n,
9319
9322
  updateAttributes: f,
9320
9323
  results: $
9321
- }), { showErrorNotification: ze } = yt(), [Ge, ke] = Me(
9324
+ }), { showErrorNotification: ze } = yt(), [Ge, Ne] = Me(
9322
9325
  V.getHandler().searchCount
9323
- ), [Se, Ne] = Me(
9326
+ ), [Se, Ve] = Me(
9324
9327
  V.getHandler().searchForTree
9325
- ), [G, me] = Me(
9328
+ ), [Y, me] = Me(
9326
9329
  V.getHandler().searchAllIds
9327
9330
  ), ce = te(
9328
9331
  () => nn(x || [], l),
9329
9332
  [l, x]
9330
- ), we = te(() => (A == null ? void 0 : A.map((Oe) => Oe.id)) || [], [A]), oe = D(() => {
9331
- const De = `${JSON.stringify(z ? l : ce)}-${z}`;
9333
+ ), we = te(() => (A == null ? void 0 : A.map((Ee) => Ee.id)) || [], [A]), oe = D(() => {
9334
+ const De = `${JSON.stringify(G ? l : ce)}-${G}`;
9332
9335
  return De !== ve.current ? (ve.current = De, !0) : !1;
9333
- }, [l, ce, z]), Ee = D(async () => {
9336
+ }, [l, ce, G]), Oe = D(async () => {
9334
9337
  Z(void 0), N(0), se(!0);
9335
9338
  try {
9336
- const Oe = await Ge({
9337
- params: z ? l : ce,
9339
+ const Ee = await Ge({
9340
+ params: G ? l : ce,
9338
9341
  model: o,
9339
9342
  context: d,
9340
- name_search: z
9343
+ name_search: G
9341
9344
  });
9342
- Z(Oe), N(Oe);
9343
- } catch (Oe) {
9344
- ze(Oe);
9345
+ Z(Ee), N(Ee);
9346
+ } catch (Ee) {
9347
+ ze(Ee);
9345
9348
  } finally {
9346
9349
  se(!1);
9347
9350
  }
9348
9351
  }, [
9349
9352
  N,
9350
9353
  Ge,
9351
- z,
9354
+ G,
9352
9355
  l,
9353
9356
  ce,
9354
9357
  o,
9355
9358
  d,
9356
9359
  ze
9357
- ]), dt = D(() => M, [M]), mt = D(() => F, [F]), kt = D((Oe) => {
9358
- var De, et, at, xt, It;
9359
- return (at = g == null ? void 0 : g.current) != null && at[(et = (De = Oe.node) == null ? void 0 : De.data) == null ? void 0 : et.id] ? { color: g.current[(It = (xt = Oe.node) == null ? void 0 : xt.data) == null ? void 0 : It.id] } : {};
9360
+ ]), lt = D(() => M, [M]), mt = D(() => F, [F]), Dt = D((Ee) => {
9361
+ var De, tt, at, Ct, At;
9362
+ return (at = g == null ? void 0 : g.current) != null && at[(tt = (De = Ee.node) == null ? void 0 : De.data) == null ? void 0 : tt.id] ? { color: g.current[(At = (Ct = Ee.node) == null ? void 0 : Ct.data) == null ? void 0 : At.id] } : {};
9360
9363
  }, []), je = D(
9361
- (Oe) => {
9364
+ (Ee) => {
9362
9365
  var De;
9363
- return (De = h == null ? void 0 : h.current) == null ? void 0 : De[Oe.id];
9366
+ return (De = h == null ? void 0 : h.current) == null ? void 0 : De[Ee.id];
9364
9367
  },
9365
9368
  // eslint-disable-next-line react-hooks/exhaustive-deps
9366
9369
  []
9367
9370
  ), it = D(() => {
9368
- var Oe;
9369
- S([]), (Oe = c.current) == null || Oe.unselectAll(), R == null || R(void 0), P == null || P([]), O == null || O(void 0);
9371
+ var Ee;
9372
+ S([]), (Ee = c.current) == null || Ee.unselectAll(), R == null || R(void 0), P == null || P([]), O == null || O(void 0);
9370
9373
  }, [
9371
9374
  S,
9372
9375
  c,
@@ -9374,9 +9377,9 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9374
9377
  P,
9375
9378
  O
9376
9379
  ]), qt = D(
9377
- ({ params: Oe, searchValues: De }) => {
9378
- var et;
9379
- S([]), (et = c.current) == null || et.unselectAll(), R == null || R(void 0), P == null || P(Oe), O == null || O(De);
9380
+ ({ params: Ee, searchValues: De }) => {
9381
+ var tt;
9382
+ S([]), (tt = c.current) == null || tt.unselectAll(), R == null || R(void 0), P == null || P(Ee), O == null || O(De);
9380
9383
  },
9381
9384
  [
9382
9385
  S,
@@ -9389,9 +9392,9 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9389
9392
  () => C == null ? void 0 : C(!1),
9390
9393
  [C]
9391
9394
  ), In = D(
9392
- ({ params: Oe, values: De }) => {
9393
- var et;
9394
- S([]), (et = c.current) == null || et.unselectAll(), R == null || R(void 0), P == null || P(Oe), O == null || O(De), C == null || C(!1);
9395
+ ({ params: Ee, values: De }) => {
9396
+ var tt;
9397
+ S([]), (tt = c.current) == null || tt.unselectAll(), R == null || R(void 0), P == null || P(Ee), O == null || O(De), C == null || C(!1);
9395
9398
  },
9396
9399
  [
9397
9400
  S,
@@ -9405,10 +9408,10 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9405
9408
  de(() => {
9406
9409
  if (!e)
9407
9410
  return () => {
9408
- ke(), Ne(), me();
9411
+ Ne(), Ve(), me();
9409
9412
  };
9410
9413
  }, [e]), de(() => () => {
9411
- He();
9414
+ ke();
9412
9415
  }, []), Xe(() => {
9413
9416
  !n || !r || e || Nt();
9414
9417
  }, [
@@ -9416,24 +9419,24 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9416
9419
  n,
9417
9420
  ie,
9418
9421
  U,
9419
- z,
9422
+ G,
9420
9423
  l,
9421
9424
  J
9422
9425
  ]), de(() => {
9423
- var Oe;
9424
- if (z !== he.current) {
9425
- if (z !== void 0 && he.current === void 0 || typeof z == "string" && typeof he.current == "string" && z !== he.current) {
9426
- P == null || P([]), O == null || O({}), (Oe = c.current) == null || Oe.unselectAll(), he.current = z;
9426
+ var Ee;
9427
+ if (G !== he.current) {
9428
+ if (G !== void 0 && he.current === void 0 || typeof G == "string" && typeof he.current == "string" && G !== he.current) {
9429
+ P == null || P([]), O == null || O({}), (Ee = c.current) == null || Ee.unselectAll(), he.current = G;
9427
9430
  return;
9428
9431
  }
9429
- z === void 0 && he.current !== void 0 && se(!0), he.current = z;
9432
+ G === void 0 && he.current !== void 0 && se(!0), he.current = G;
9430
9433
  }
9431
- }, [z]), Xe(() => {
9432
- const Oe = !Is(
9434
+ }, [G]), Xe(() => {
9435
+ const Ee = !Is(
9433
9436
  x,
9434
9437
  qe.current
9435
9438
  ), De = Fe.current && !b;
9436
- Oe && (De || p === "top") && ut(), qe.current = x, Fe.current = b;
9439
+ Ee && (De || p === "top") && ut(), qe.current = x, Fe.current = b;
9437
9440
  }, [x, b]);
9438
9441
  const Nt = D(async () => {
9439
9442
  if (!n || e)
@@ -9443,46 +9446,46 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9443
9446
  Ie.current = !0;
9444
9447
  try {
9445
9448
  y(!0);
9446
- let Oe;
9449
+ let Ee;
9447
9450
  if (J != null && J.length) {
9448
- const Ve = Bn({
9451
+ const Le = Bn({
9449
9452
  state: J
9450
9453
  });
9451
- Oe = tr(Ve);
9454
+ Ee = tr(Le);
9452
9455
  }
9453
- const De = z ? l : ce, et = rr({
9456
+ const De = G ? l : ce, tt = rr({
9454
9457
  treeOoui: n,
9455
9458
  hasFunctionFieldsToParseConditions: Te && $e()
9456
9459
  });
9457
- !z && oe() && Ee();
9458
- const { results: at, attrsEvaluated: xt } = await Se({
9460
+ !G && oe() && Oe();
9461
+ const { results: at, attrsEvaluated: Ct } = await Se({
9459
9462
  params: De,
9460
9463
  limit: ie,
9461
9464
  offset: ((U || 1) - 1) * ie,
9462
9465
  model: o,
9463
9466
  fields: r.field_parent ? { ...r.fields, [r.field_parent]: {} } : r.fields,
9464
9467
  context: d,
9465
- attrs: et,
9466
- order: Oe,
9467
- name_search: z,
9468
+ attrs: tt,
9469
+ order: Ee,
9470
+ name_search: G,
9468
9471
  skipFunctionFields: Te,
9469
- onIdsRetrieved: (Ve) => {
9470
- Ye(Ve);
9472
+ onIdsRetrieved: (Le) => {
9473
+ Ye(Le);
9471
9474
  }
9472
9475
  });
9473
9476
  if (j == null || j({
9474
9477
  model: o,
9475
9478
  params: De,
9476
- name_search: z,
9479
+ name_search: G,
9477
9480
  context: d
9478
- }), k == null || k(at), z ? (Z(at.length), N(at.length), ee(!0), se(!1)) : ee(!1), at.length === 0) {
9481
+ }), k == null || k(at), G ? (Z(at.length), N(at.length), ee(!0), se(!1)) : ee(!1), at.length === 0) {
9479
9482
  Ce.current = [], Z(0), N(0), fe([]), y(!1);
9480
9483
  return;
9481
9484
  }
9482
- const It = await Xt(n, at, d);
9483
- f == null || f(xt, n), y(!1), Ce.current = [...It], fe([...It]);
9484
- } catch (Oe) {
9485
- throw y(!1), ze(Oe), console.error(Oe), Oe;
9485
+ const At = await Xt(n, at, d);
9486
+ f == null || f(Ct, n), y(!1), Ce.current = [...At], fe([...At]);
9487
+ } catch (Ee) {
9488
+ throw y(!1), ze(Ee), console.error(Ee), Ee;
9486
9489
  } finally {
9487
9490
  Ie.current = !1;
9488
9491
  }
@@ -9491,7 +9494,7 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9491
9494
  e,
9492
9495
  y,
9493
9496
  J,
9494
- z,
9497
+ G,
9495
9498
  l,
9496
9499
  ce,
9497
9500
  Te,
@@ -9506,27 +9509,27 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9506
9509
  j,
9507
9510
  k,
9508
9511
  f,
9509
- Ee,
9512
+ Oe,
9510
9513
  Ye,
9511
9514
  N,
9512
9515
  ze
9513
9516
  ]), ut = D(async () => {
9514
- m == null || m(), Ae(), se(!0), w(0), S([]), ve.current = void 0, z || Be(), await Nt();
9517
+ m == null || m(), Ae(), se(!0), w(0), S([]), ve.current = void 0, G || Be(), await Nt();
9515
9518
  }, [
9516
9519
  m,
9517
9520
  Ae,
9518
9521
  w,
9519
9522
  S,
9520
- z,
9523
+ G,
9521
9524
  Nt,
9522
9525
  Be
9523
9526
  ]), ht = D(
9524
- (Oe, De) => {
9527
+ (Ee, De) => {
9525
9528
  if (De === -1) {
9526
9529
  u == null || u("infinite");
9527
9530
  return;
9528
9531
  }
9529
- w(0), E(void 0), S([]), W(Oe), De && re(De);
9532
+ w(0), E(void 0), S([]), W(Ee), De && re(De);
9530
9533
  },
9531
9534
  [
9532
9535
  u,
@@ -9536,66 +9539,66 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9536
9539
  E,
9537
9540
  w
9538
9541
  ]
9539
- ), vt = D(async () => await G({
9542
+ ), vt = D(async () => await Y({
9540
9543
  params: nn(x, l),
9541
9544
  model: o,
9542
9545
  context: d,
9543
9546
  totalItems: ue
9544
- }), [G, x, l, o, d, ue]), Jn = D(async () => {
9545
- const Oe = await vt();
9546
- S == null || S(Oe.map((De) => ({ id: De })));
9547
+ }), [Y, x, l, o, d, ue]), Jn = D(async () => {
9548
+ const Ee = await vt();
9549
+ S == null || S(Ee.map((De) => ({ id: De })));
9547
9550
  }, [vt, S]), sn = te(() => we.length === 0 ? "unchecked" : we.length === ie && ie > 0 || we.length === ue ? "checked" : "indeterminate", [we, ie, ue]), mn = D(() => {
9548
- var Oe, De;
9549
- sn === "unchecked" ? ((Oe = c.current) == null || Oe.selectAll(), S(ae.map((et) => ({ id: et.id })))) : (S([]), (De = c.current) == null || De.unselectAll());
9551
+ var Ee, De;
9552
+ sn === "unchecked" ? ((Ee = c.current) == null || Ee.selectAll(), S(ae.map((tt) => ({ id: tt.id })))) : (S([]), (De = c.current) == null || De.unselectAll());
9550
9553
  }, [c, S, ae, sn]), hn = D(
9551
- (Oe) => {
9552
- Y(Oe), w(0), E(void 0), W(1);
9554
+ (Ee) => {
9555
+ z(Ee), w(0), E(void 0), W(1);
9553
9556
  },
9554
9557
  [
9555
- Y,
9558
+ z,
9556
9559
  W,
9557
9560
  E,
9558
9561
  w
9559
9562
  ]
9560
9563
  ), Bt = D(
9561
- ({ id: Oe, selected: De }) => {
9562
- S((et) => {
9564
+ ({ id: Ee, selected: De }) => {
9565
+ S((tt) => {
9563
9566
  if (De) {
9564
- const at = ae.find((xt) => xt.id === Oe);
9565
- return at && !et.some((xt) => xt.id === Oe) ? [...et, at] : et;
9567
+ const at = ae.find((Ct) => Ct.id === Ee);
9568
+ return at && !tt.some((Ct) => Ct.id === Ee) ? [...tt, at] : tt;
9566
9569
  }
9567
- return et.filter((at) => at.id !== Oe);
9570
+ return tt.filter((at) => at.id !== Ee);
9568
9571
  });
9569
9572
  },
9570
9573
  [ae, S]
9571
9574
  ), An = D(
9572
- async (Oe) => {
9573
- var tt;
9574
- const De = Oe[(r == null ? void 0 : r.field_parent) || "child_id"];
9575
- let et = r.field_parent ? { ...r.fields, [r.field_parent]: {} } : r.fields;
9576
- Te && (et = Object.entries(et).reduce(
9577
- (st, [At, Qt]) => (Qt != null && Qt.is_function || (st[At] = Qt), st),
9575
+ async (Ee) => {
9576
+ var Ze;
9577
+ const De = Ee[(r == null ? void 0 : r.field_parent) || "child_id"];
9578
+ let tt = r.field_parent ? { ...r.fields, [r.field_parent]: {} } : r.fields;
9579
+ Te && (tt = Object.entries(tt).reduce(
9580
+ (st, [bt, Qt]) => (Qt != null && Qt.is_function || (st[bt] = Qt), st),
9578
9581
  {}
9579
9582
  ));
9580
9583
  const at = await V.getHandler().readObjects({
9581
9584
  model: o,
9582
9585
  ids: De,
9583
- fields: et,
9586
+ fields: tt,
9584
9587
  context: d
9585
- }), xt = await Xt(n, at, d), It = [...ae, ...xt], Ve = rr({
9588
+ }), Ct = await Xt(n, at, d), At = [...ae, ...Ct], Le = rr({
9586
9589
  treeOoui: n
9587
9590
  });
9588
9591
  try {
9589
9592
  const st = await be({
9590
- conditions: Ve,
9591
- values: It,
9593
+ conditions: Le,
9594
+ values: At,
9592
9595
  context: d
9593
9596
  });
9594
- f == null || f(st, n), (tt = c == null ? void 0 : c.current) == null || tt.refreshRowStyles();
9597
+ f == null || f(st, n), (Ze = c == null ? void 0 : c.current) == null || Ze.refreshRowStyles();
9595
9598
  } catch (st) {
9596
9599
  console.error(st);
9597
9600
  }
9598
- return Ce.current = [...It], fe([...It]), Ye(at.map((st) => st.id)), xt;
9601
+ return Ce.current = [...At], fe([...At]), Ye(at.map((st) => st.id)), Ct;
9599
9602
  },
9600
9603
  [
9601
9604
  r,
@@ -9617,7 +9620,7 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9617
9620
  selectedRowKeys: we,
9618
9621
  refresh: ut,
9619
9622
  onRowStatus: je,
9620
- onGetFirstVisibleRowIndex: dt,
9623
+ onGetFirstVisibleRowIndex: lt,
9621
9624
  setTreeFirstVisibleRow: w,
9622
9625
  onRowHasBeenSelected: Bt,
9623
9626
  onSearchFilterClear: it,
@@ -9626,7 +9629,7 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9626
9629
  onSideSearchFilterSubmit: In,
9627
9630
  totalRowsLoading: B,
9628
9631
  totalRows: ue,
9629
- onRowStyle: kt,
9632
+ onRowStyle: Dt,
9630
9633
  results: ae,
9631
9634
  onRequestPageChange: ht,
9632
9635
  treeIsLoading: v,
@@ -9636,14 +9639,14 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9636
9639
  currentPage: U,
9637
9640
  limit: ie,
9638
9641
  order: J,
9639
- setOrder: Y,
9642
+ setOrder: z,
9640
9643
  setTreeFirstVisibleColumn: E,
9641
9644
  onGetFirstVisibleColumn: mt,
9642
9645
  onSortChange: hn,
9643
9646
  isFieldLoading: Re,
9644
9647
  setSearchVisible: C,
9645
9648
  nameSearchFetchCompleted: q,
9646
- nameSearch: z,
9649
+ nameSearch: G,
9647
9650
  fetchChildrenForRecord: An
9648
9651
  };
9649
9652
  }, Bg = ({
@@ -9665,7 +9668,7 @@ const Zl = $t(Vg), Lg = Tt, Hg = (t) => {
9665
9668
  n == null ? void 0 : n.search_fields
9666
9669
  ]),
9667
9670
  showLimitOptions: !1,
9668
- limit: Tt,
9671
+ limit: Ft,
9669
9672
  offset: 0,
9670
9673
  isSearching: !1,
9671
9674
  searchValues: o,
@@ -9885,7 +9888,7 @@ function Gg(t, e) {
9885
9888
  onGetFirstVisibleRowIndex: U,
9886
9889
  setTreeFirstVisibleRow: W,
9887
9890
  onRowHasBeenSelected: J,
9888
- onSearchFilterClear: Y,
9891
+ onSearchFilterClear: z,
9889
9892
  onSearchFilterSubmit: le,
9890
9893
  onSideSearchFilterClose: re,
9891
9894
  onSideSearchFilterSubmit: X,
@@ -9898,7 +9901,7 @@ function Gg(t, e) {
9898
9901
  selectAllRecords: fe,
9899
9902
  onHeaderCheckboxClick: q,
9900
9903
  headerCheckboxState: ee,
9901
- currentPage: z,
9904
+ currentPage: G,
9902
9905
  limit: he,
9903
9906
  order: qe,
9904
9907
  setTreeFirstVisibleColumn: Fe,
@@ -9907,7 +9910,7 @@ function Gg(t, e) {
9907
9910
  isFieldLoading: Ie,
9908
9911
  setSearchVisible: Te,
9909
9912
  nameSearchFetchCompleted: be,
9910
- nameSearch: He,
9913
+ nameSearch: ke,
9911
9914
  fetchChildrenForRecord: Qe
9912
9915
  } = Hg({
9913
9916
  treeViewFetching: C,
@@ -9925,23 +9928,27 @@ function Gg(t, e) {
9925
9928
  clearAttributes: x,
9926
9929
  colorsForResults: O,
9927
9930
  statusForResults: T
9928
- }), Re = te(() => R.map((Ee) => ({
9929
- ...Ee,
9930
- render: (dt, mt) => /* @__PURE__ */ s(
9931
- oo,
9932
- {
9933
- value: dt,
9934
- record: mt,
9935
- column: Ee,
9936
- isFieldLoading: Ie
9937
- }
9938
- )
9939
- })), [Ie, R]), { handleExpandableRowDoubleClick: Be } = Ug({
9931
+ }), Re = te(() => {
9932
+ const Oe = ke !== void 0;
9933
+ return R.map((lt) => ({
9934
+ ...lt,
9935
+ isSortable: Oe ? !1 : lt.isSortable,
9936
+ render: (mt, Dt) => /* @__PURE__ */ s(
9937
+ oo,
9938
+ {
9939
+ value: mt,
9940
+ record: Dt,
9941
+ column: lt,
9942
+ isFieldLoading: Ie
9943
+ }
9944
+ )
9945
+ }));
9946
+ }, [Ie, R, ke]), { handleExpandableRowDoubleClick: Be } = Ug({
9940
9947
  treeView: y,
9941
9948
  currentModel: n,
9942
9949
  parentContext: d
9943
- }), Ae = Vt((Ee) => {
9944
- y != null && y.isExpandable ? Be(Ee) : h(Ee);
9950
+ }), Ae = Vt((Oe) => {
9951
+ y != null && y.isExpandable ? Be(Oe) : h(Oe);
9945
9952
  }), Ye = Vt(N), [$e, ze, Ge] = vs({
9946
9953
  ooui: w,
9947
9954
  model: n,
@@ -9955,17 +9962,17 @@ function Gg(t, e) {
9955
9962
  refreshResults: N,
9956
9963
  getFields: () => y == null ? void 0 : y.fields
9957
9964
  }));
9958
- const ke = te(() => Ge ? /* @__PURE__ */ s(ys, { aggregates: ze, isLoading: $e }) : null, [ze, $e, Ge]), Se = D(
9959
- (Ee) => /* @__PURE__ */ s(ar, { color: Ee, style: { marginLeft: 7 } }),
9965
+ const Ne = te(() => Ge ? /* @__PURE__ */ s(ys, { aggregates: ze, isLoading: $e }) : null, [ze, $e, Ge]), Se = D(
9966
+ (Oe) => /* @__PURE__ */ s(ar, { color: Oe, style: { marginLeft: 7 } }),
9960
9967
  []
9961
- ), Ne = te(
9968
+ ), Ve = te(
9962
9969
  () => ({
9963
9970
  overflow: "hidden",
9964
9971
  height: `${S}px`,
9965
9972
  ...c ? {} : { display: "none" }
9966
9973
  }),
9967
9974
  [S, c]
9968
- ), G = He !== void 0 && be, me = G && B !== void 0 && B !== null && B === Tt, ce = te(() => typeof B != "number" || isNaN(B) || B < 0 ? (ue == null ? void 0 : ue.length) || 0 : B || 0, [B, ue]), we = te(() => (ue == null ? void 0 : ue.length) > 0 && (typeof B != "number" || isNaN(B) || B < 0) ? ue == null ? void 0 : ue.length : p ? Tt : he || Lg, [ue == null ? void 0 : ue.length, B, p, he]), oe = y == null ? void 0 : y.isExpandable;
9975
+ ), Y = ke !== void 0 && be, me = Y && B !== void 0 && B !== null && B === Ft, ce = te(() => typeof B != "number" || isNaN(B) || B < 0 ? (ue == null ? void 0 : ue.length) || 0 : B || 0, [B, ue]), we = te(() => (ue == null ? void 0 : ue.length) > 0 && (typeof B != "number" || isNaN(B) || B < 0) ? ue == null ? void 0 : ue.length : p ? Ft : he || Lg, [ue == null ? void 0 : ue.length, B, p, he]), oe = y == null ? void 0 : y.isExpandable;
9969
9976
  return /* @__PURE__ */ L(Wn, { children: [
9970
9977
  !oe && /* @__PURE__ */ s(
9971
9978
  Bg,
@@ -9975,7 +9982,7 @@ function Gg(t, e) {
9975
9982
  treeView: y,
9976
9983
  searchVisible: k,
9977
9984
  searchValues: $,
9978
- onSearchFilterClear: Y,
9985
+ onSearchFilterClear: z,
9979
9986
  onSearchFilterSubmit: le,
9980
9987
  onSideSearchFilterClose: re,
9981
9988
  onSideSearchFilterSubmit: X
@@ -9986,14 +9993,14 @@ function Gg(t, e) {
9986
9993
  {
9987
9994
  total: ce,
9988
9995
  totalRowsLoading: ie,
9989
- page: p ? 1 : z || 1,
9996
+ page: p ? 1 : G || 1,
9990
9997
  pageSize: we,
9991
9998
  maxPageSize: v,
9992
9999
  currentPageSelectedCount: j.length,
9993
10000
  onRequestPageChange: Z,
9994
10001
  totalSelectedCount: j.length,
9995
10002
  onSelectAllGlobalRecords: fe,
9996
- simpleSummary: G,
10003
+ simpleSummary: Y,
9997
10004
  showAllOptionInPageSizeOptions: f !== void 0,
9998
10005
  customMiddleComponent: me && /* @__PURE__ */ s(
9999
10006
  Kl,
@@ -10003,7 +10010,7 @@ function Gg(t, e) {
10003
10010
  )
10004
10011
  }
10005
10012
  ),
10006
- /* @__PURE__ */ s("div", { ref: g, style: Ne, children: C ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ s(
10013
+ /* @__PURE__ */ s("div", { ref: g, style: Ve, children: C ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ s(
10007
10014
  Es,
10008
10015
  {
10009
10016
  columns: Re,
@@ -10020,7 +10027,7 @@ function Gg(t, e) {
10020
10027
  onGetFirstVisibleRowIndex: U,
10021
10028
  onGetFirstVisibleColumn: ve,
10022
10029
  setTreeFirstVisibleColumn: Fe,
10023
- footerComp: ke,
10030
+ footerComp: Ne,
10024
10031
  statusComp: Se,
10025
10032
  onRowStatus: H,
10026
10033
  onRowStyle: se,
@@ -10037,7 +10044,7 @@ function Gg(t, e) {
10037
10044
  ) })
10038
10045
  ] });
10039
10046
  }
10040
- const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10047
+ const ec = kt(Gg), wn = "legacy", Yg = (t) => {
10041
10048
  const {
10042
10049
  visible: e,
10043
10050
  searchTreeRef: n,
@@ -10097,7 +10104,7 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10097
10104
  }, [e, v]);
10098
10105
  const A = D(
10099
10106
  (P) => {
10100
- y(P), P === "paginated" && (C == null || C(g || Tt)), P === "infinite" && (C == null || C(0));
10107
+ y(P), P === "paginated" && (C == null || C(g || Ft)), P === "infinite" && (C == null || C(0));
10101
10108
  },
10102
10109
  [g, C]
10103
10110
  );
@@ -10191,40 +10198,40 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10191
10198
  permissions: T,
10192
10199
  permissionsLoading: R,
10193
10200
  permissionsError: k
10194
- } = t, [$, j] = I(!1), [N, H] = I(!1), [U, W] = I(!1), [J, Y] = I(!0), [le, re] = I(!0), [X, ie] = I([]), [B, se] = I(!1), [ue, Z] = I(
10201
+ } = t, [$, j] = I(!1), [N, H] = I(!1), [U, W] = I(!1), [J, z] = I(!0), [le, re] = I(!0), [X, ie] = I([]), [B, se] = I(!1), [ue, Z] = I(
10195
10202
  _ || []
10196
- ), [ae, fe] = I(!1), [q, ee] = I(!0), [z, he] = I(), [qe, Fe] = I(
10203
+ ), [ae, fe] = I(!1), [q, ee] = I(!0), [G, he] = I(), [qe, Fe] = I(
10197
10204
  Df(
10198
10205
  _ || [],
10199
10206
  n.fields
10200
10207
  )
10201
- ), [ve, Ce] = I(0), [Ie, Te] = I(void 0), [be, He] = I(), [Qe, Re] = I(wn), [Be, Ae] = I(
10208
+ ), [ve, Ce] = I(0), [Ie, Te] = I(void 0), [be, ke] = I(), [Qe, Re] = I(wn), [Be, Ae] = I(
10202
10209
  O
10203
10210
  ), [Ye, $e] = I(
10204
- A !== void 0 ? A : Tt
10205
- ), [ze, Ge] = I(r), [ke, Se] = I(
10211
+ A !== void 0 ? A : Ft
10212
+ ), [ze, Ge] = I(r), [Ne, Se] = I(
10206
10213
  x || 1
10207
10214
  );
10208
10215
  de(() => {
10209
10216
  f && f.length > 0 && !m && (g == null || g(0), p == null || p(f[0].id));
10210
10217
  }, [f]), de(() => {
10211
- $e(A !== void 0 ? A : Tt);
10218
+ $e(A !== void 0 ? A : Ft);
10212
10219
  }, [A]), de(() => {
10213
10220
  i.length === 1 ? he(i[0]) : i.length > 1 && he(
10214
10221
  i.filter(
10215
- (G) => G.view_id !== n.view_id
10222
+ (Y) => Y.view_id !== n.view_id
10216
10223
  )[0]
10217
10224
  );
10218
10225
  }, [i]), de(() => {
10219
- (z == null ? void 0 : z.view_id) === n.view_id && i.length > 1 && he(
10226
+ (G == null ? void 0 : G.view_id) === n.view_id && i.length > 1 && he(
10220
10227
  i.filter(
10221
- (G) => G.view_id !== n.view_id
10228
+ (Y) => Y.view_id !== n.view_id
10222
10229
  )[0]
10223
10230
  );
10224
10231
  }, [n]);
10225
- const Ne = async () => {
10226
- var G;
10227
- return await ((G = a.current) == null ? void 0 : G.submitForm());
10232
+ const Ve = async () => {
10233
+ var Y;
10234
+ return await ((Y = a.current) == null ? void 0 : Y.submitForm());
10228
10235
  };
10229
10236
  return /* @__PURE__ */ s(
10230
10237
  Ot.Provider,
@@ -10240,7 +10247,7 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10240
10247
  setFormHasChanges: H,
10241
10248
  formRef: a,
10242
10249
  searchTreeRef: c,
10243
- onFormSave: Ne,
10250
+ onFormSave: Ve,
10244
10251
  onNewClicked: l,
10245
10252
  currentId: d,
10246
10253
  setCurrentId: p,
@@ -10252,7 +10259,7 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10252
10259
  removingItem: U,
10253
10260
  setRemovingItem: W,
10254
10261
  formIsLoading: J,
10255
- setFormIsLoading: Y,
10262
+ setFormIsLoading: z,
10256
10263
  treeIsLoading: le,
10257
10264
  setTreeIsLoading: re,
10258
10265
  attachments: X,
@@ -10273,7 +10280,7 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10273
10280
  setSearchTreeNameSearch: F,
10274
10281
  setGraphIsLoading: ee,
10275
10282
  graphIsLoading: q,
10276
- previousView: z,
10283
+ previousView: G,
10277
10284
  setPreviousView: he,
10278
10285
  goToResourceId: E,
10279
10286
  searchValues: qe,
@@ -10287,12 +10294,12 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10287
10294
  treeFirstVisibleColumn: Ie,
10288
10295
  setTreeFirstVisibleColumn: Te,
10289
10296
  searchQuery: be,
10290
- setSearchQuery: He,
10297
+ setSearchQuery: ke,
10291
10298
  treeType: Qe,
10292
10299
  setTreeType: Re,
10293
10300
  order: Be,
10294
10301
  setOrder: Ae,
10295
- currentPage: ke,
10302
+ currentPage: Ne,
10296
10303
  setCurrentPage: Se,
10297
10304
  permissions: T,
10298
10305
  permissionsLoading: R,
@@ -10337,7 +10344,7 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10337
10344
  searchTreeNameSearch: void 0,
10338
10345
  goToResourceId: async () => {
10339
10346
  },
10340
- limit: Tt,
10347
+ limit: Ft,
10341
10348
  isActive: void 0,
10342
10349
  formIsSaving: !1,
10343
10350
  setFormIsSaving: () => {
@@ -10480,7 +10487,7 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10480
10487
  default:
10481
10488
  return /* @__PURE__ */ s(ge, { children: `Graph ${f.type} not implemented` });
10482
10489
  }
10483
- }, Tn = $t(Kg), Xg = (t) => {
10490
+ }, Tn = kt(Kg), Xg = (t) => {
10484
10491
  const { model: e, domain: n = [], context: r = {}, view_id: o, manualIds: i } = t, [a, c] = I(!1), [l, d] = I(), [p, u] = I(), [f] = Me(
10485
10492
  V.getHandler().readForView
10486
10493
  ), m = D(async () => {
@@ -10564,7 +10571,7 @@ const ec = $t(Gg), wn = "legacy", Yg = (t) => {
10564
10571
  default:
10565
10572
  return /* @__PURE__ */ s(ge, { children: `Graph ${f.type} not implemented` });
10566
10573
  }
10567
- }, Os = $t(Qg), { useToken: Zg } = rt, { Text: Bi } = un, tc = (t) => {
10574
+ }, Os = kt(Qg), { useToken: Zg } = rt, { Text: Bi } = un, tc = (t) => {
10568
10575
  const {
10569
10576
  title: e,
10570
10577
  children: n,
@@ -10667,11 +10674,11 @@ function ey(t) {
10667
10674
  visible: a = !0,
10668
10675
  parentContext: c = {},
10669
10676
  treeExpandable: l
10670
- } = t, [d, p] = I(!1), [u, f] = I(!1), [m, g] = I(), [h, v] = I(), [y, b] = I(), [C, S] = I(1), [w, M] = I(0), F = K(Tt), E = K([]), [A, P] = I(0), [_, x] = I([]), [O, T] = I(void 0), [R, k] = I(), [$, j] = I(), [N, H] = I(), [U, W] = I(!1), [J, Y] = I(wn), le = K([]), { treeMaxLimit: re } = Wt(), X = (ee) => {
10677
+ } = t, [d, p] = I(!1), [u, f] = I(!1), [m, g] = I(), [h, v] = I(), [y, b] = I(), [C, S] = I(1), [w, M] = I(0), F = K(Ft), E = K([]), [A, P] = I(0), [_, x] = I([]), [O, T] = I(void 0), [R, k] = I(), [$, j] = I(), [N, H] = I(), [U, W] = I(!1), [J, z] = I(wn), le = K([]), { treeMaxLimit: re } = Wt(), X = (ee) => {
10671
10678
  W(!0), S(ee), M((ee - 1) * F.current);
10672
10679
  }, ie = async () => {
10673
- const ee = le.current.length > 0 ? le.current : i, z = nn(E.current, ee), { colors: he } = Jt(h), { totalItems: qe, results: Fe, attrsEvaluated: ve } = await V.getHandler().searchForTree({
10674
- params: z,
10680
+ const ee = le.current.length > 0 ? le.current : i, G = nn(E.current, ee), { colors: he } = Jt(h), { totalItems: qe, results: Fe, attrsEvaluated: ve } = await V.getHandler().searchForTree({
10681
+ params: G,
10675
10682
  limit: F.current,
10676
10683
  offset: w,
10677
10684
  model: m,
@@ -10702,8 +10709,8 @@ function ey(t) {
10702
10709
  f(!1), p(!0), H(void 0);
10703
10710
  try {
10704
10711
  ee === "action" ? await ue() : await Z(), f(!0);
10705
- } catch (z) {
10706
- H(z);
10712
+ } catch (G) {
10713
+ H(G);
10707
10714
  } finally {
10708
10715
  p(!1);
10709
10716
  }
@@ -10713,8 +10720,8 @@ function ey(t) {
10713
10720
  context: c
10714
10721
  });
10715
10722
  le.current = ee.domain, b(ee.views.get("form"));
10716
- const z = ee.views.get("tree");
10717
- l !== void 0 && (z.isExpandable = l), v(z), g(ee.model), F.current = ee.limit;
10723
+ const G = ee.views.get("tree");
10724
+ l !== void 0 && (G.isExpandable = l), v(G), g(ee.model), F.current = ee.limit;
10718
10725
  }, Z = async () => {
10719
10726
  g(n);
10720
10727
  const ee = await V.getHandler().getView({
@@ -10723,13 +10730,13 @@ function ey(t) {
10723
10730
  context: c
10724
10731
  });
10725
10732
  b(ee);
10726
- const z = await V.getHandler().getView({
10733
+ const G = await V.getHandler().getView({
10727
10734
  model: n,
10728
10735
  type: "tree",
10729
10736
  id: r,
10730
10737
  context: c
10731
10738
  });
10732
- l !== void 0 && (z.isExpandable = l), v(z);
10739
+ l !== void 0 && (G.isExpandable = l), v(G);
10733
10740
  };
10734
10741
  Xe(() => {
10735
10742
  if (!h)
@@ -10739,16 +10746,16 @@ function ey(t) {
10739
10746
  limit: F.current,
10740
10747
  treeMaxLimit: re
10741
10748
  });
10742
- Y(ee);
10749
+ z(ee);
10743
10750
  }, [h, re]), de(() => {
10744
10751
  e ? se("action") : n && se("model");
10745
10752
  }, [e, n]);
10746
10753
  const ae = D((ee) => {
10747
- Y(ee);
10754
+ z(ee);
10748
10755
  }, []), fe = (ee) => {
10749
- const { id: z } = ee;
10756
+ const { id: G } = ee;
10750
10757
  o({
10751
- id: z,
10758
+ id: G,
10752
10759
  model: m,
10753
10760
  treeView: h
10754
10761
  });
@@ -10796,12 +10803,12 @@ function ey(t) {
10796
10803
  sorter: R,
10797
10804
  onChangeSort: (ee) => {
10798
10805
  k == null || k(ee);
10799
- const z = kn({
10806
+ const G = kn({
10800
10807
  resultsToSort: _,
10801
10808
  sorter: ee,
10802
10809
  fields: { ...h.fields, ...y.fields }
10803
10810
  });
10804
- x(z);
10811
+ x(G);
10805
10812
  },
10806
10813
  context: c
10807
10814
  }
@@ -10854,7 +10861,7 @@ const rc = ot(ey), { useToken: ty } = rt, ny = (t) => {
10854
10861
  style: { color: e.colorPrimaryBg }
10855
10862
  }
10856
10863
  ) })
10857
- ] }), g = Dt(i);
10864
+ ] }), g = Pt(i);
10858
10865
  let h = r;
10859
10866
  if (n.selectionValues.size)
10860
10867
  h = n.selectionValues.get(r);
@@ -10866,9 +10873,9 @@ const rc = ot(ey), { useToken: ty } = rt, ny = (t) => {
10866
10873
  time: "HH:mm",
10867
10874
  datetime: "DD/MM/YYYY HH:mm"
10868
10875
  };
10869
- h = r ? lt(r).format(b[n.fieldType]) : " ";
10876
+ h = r ? ct(r).format(b[n.fieldType]) : " ";
10870
10877
  }
10871
- if (n.fieldType === "many2one" && r && ((y = n.raw_props) != null && y.relation) && (h = /* @__PURE__ */ L(ct, { children: [
10878
+ if (n.fieldType === "many2one" && r && ((y = n.raw_props) != null && y.relation) && (h = /* @__PURE__ */ L(dt, { children: [
10872
10879
  h,
10873
10880
  f && /* @__PURE__ */ s(eo, { id: r[0], model: n.raw_props.relation })
10874
10881
  ] })), r && (n.fieldType === "float" || n.fieldType === "integer"))
@@ -10925,7 +10932,7 @@ const rc = ot(ey), { useToken: ty } = rt, ny = (t) => {
10925
10932
  actionData: t,
10926
10933
  fixedHeight: e
10927
10934
  }) => {
10928
- const { initialView: n, views: r, model: o, domain: i, context: a, limit: c } = t, l = ds(Pt.FEATURE_READFORVIEW), d = l != null && l.isEnabled ? Os : Tn, { openShortcut: p } = mr(), u = D(
10935
+ const { initialView: n, views: r, model: o, domain: i, context: a, limit: c } = t, l = ds(Mt.FEATURE_READFORVIEW), d = l != null && l.isEnabled ? Os : Tn, { openShortcut: p } = mr(), u = D(
10929
10936
  (f) => {
10930
10937
  const m = r.find((g) => {
10931
10938
  const [, h] = g;
@@ -10977,7 +10984,7 @@ const rc = ot(ey), { useToken: ty } = rt, ny = (t) => {
10977
10984
  error: new Error("Unsupported view type: " + n.type)
10978
10985
  }
10979
10986
  );
10980
- }, iy = Ft(Zi)`
10987
+ }, iy = It(Zi)`
10981
10988
  &.ant-empty.ant-empty-normal {
10982
10989
  margin: 0;
10983
10990
  margin-top: 5px;
@@ -10986,7 +10993,7 @@ const rc = ot(ey), { useToken: ty } = rt, ny = (t) => {
10986
10993
  const { ooui: e } = t;
10987
10994
  return /* @__PURE__ */ s(We, { type: "array", ...t, children: /* @__PURE__ */ s(ly, { ooui: e }) });
10988
10995
  }, ly = (t) => {
10989
- const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((P) => P.operation !== "pendingRemove").map((P) => P.id), [a, c] = I([]), [l, d] = I(), [p, u] = I(!1), { relation: f, context: m, readOnly: g, field: h } = n, v = pe(Ze), { getContext: y } = v || {}, [b, C] = Me(
10996
+ const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((P) => P.operation !== "pendingRemove").map((P) => P.id), [a, c] = I([]), [l, d] = I(), [p, u] = I(!1), { relation: f, context: m, readOnly: g, field: h } = n, v = pe(et), { getContext: y } = v || {}, [b, C] = Me(
10990
10997
  V.getHandler().evalDomain
10991
10998
  ), [S, w] = Me(
10992
10999
  V.getHandler().search
@@ -11388,7 +11395,7 @@ function Cy(t, e) {
11388
11395
  forcedValues: M = {},
11389
11396
  parentWidth: F,
11390
11397
  onMustRefreshParent: E
11391
- } = t, { t: A } = xe(), [P, _] = I(!1), [x, O] = I(), [T, R] = I(), [k] = Mt.useForm(), [$, j] = I(), [N, H] = I(), U = pe(oc), [W, J] = I(), [Y, le] = I(!1), [re, X] = I(0), ie = K(), B = K({}), se = K({}), ue = K(!1), Z = K(!1), ae = K(!1), q = (F !== void 0 ? F : W) < xy, ee = pe(Ze), { activeId: z, getPlainValues: he } = ee || {}, qe = K(!1), Fe = pe(
11398
+ } = t, { t: A } = xe(), [P, _] = I(!1), [x, O] = I(), [T, R] = I(), [k] = $t.useForm(), [$, j] = I(), [N, H] = I(), U = pe(oc), [W, J] = I(), [z, le] = I(!1), [re, X] = I(0), ie = K(), B = K({}), se = K({}), ue = K(!1), Z = K(!1), ae = K(!1), q = (F !== void 0 ? F : W) < xy, ee = pe(et), { activeId: G, getPlainValues: he } = ee || {}, qe = K(!1), Fe = pe(
11392
11399
  Ot
11393
11400
  ), {
11394
11401
  setFormIsSaving: ve = void 0,
@@ -11396,7 +11403,7 @@ function Cy(t, e) {
11396
11403
  setCurrentId: Ie = void 0,
11397
11404
  setFormIsLoading: Te = void 0,
11398
11405
  setAttachments: be = void 0,
11399
- title: He = void 0,
11406
+ title: ke = void 0,
11400
11407
  setTitle: Qe = void 0,
11401
11408
  isActive: Re = void 0
11402
11409
  } = (S ? Fe : {}) || {}, Be = pe(
@@ -11408,15 +11415,15 @@ function Cy(t, e) {
11408
11415
  }), {
11409
11416
  fieldMessages: ze,
11410
11417
  setFieldMessage: Ge,
11411
- getFieldMessage: ke,
11418
+ getFieldMessage: Ne,
11412
11419
  getFieldMessageType: Se,
11413
- clearFieldMessage: Ne,
11414
- clearAllFieldMessages: G,
11420
+ clearFieldMessage: Ve,
11421
+ clearAllFieldMessages: Y,
11415
11422
  setFieldMessagesArray: me
11416
11423
  } = Sy();
11417
11424
  Lt(e, () => ({
11418
- submitForm: It,
11419
- getFields: dt,
11425
+ submitForm: At,
11426
+ getFields: lt,
11420
11427
  getValues: ht,
11421
11428
  getPlainValues: mt,
11422
11429
  getContext: it,
@@ -11426,7 +11433,7 @@ function Cy(t, e) {
11426
11433
  ie.current = void 0, R(void 0), hn();
11427
11434
  }
11428
11435
  })), de(() => {
11429
- if (O(void 0), G(), !(!n && !g)) {
11436
+ if (O(void 0), Y(), !(!n && !g)) {
11430
11437
  if (!C) {
11431
11438
  ie.current = void 0, R(void 0);
11432
11439
  return;
@@ -11434,10 +11441,10 @@ function Cy(t, e) {
11434
11441
  (r === void 0 && N || r !== void 0 && N && r < 0) && (ie.current = void 0, R(void 0)), hn();
11435
11442
  }
11436
11443
  }, [r, n, m, g, C]), de(() => {
11437
- Y && (st({
11444
+ z && (st({
11438
11445
  elementHasLostFocus: !0
11439
11446
  }), le(!1));
11440
- }, [Y]), Xe(() => {
11447
+ }, [z]), Xe(() => {
11441
11448
  var Q;
11442
11449
  if (x) {
11443
11450
  const ne = x;
@@ -11453,21 +11460,21 @@ function Cy(t, e) {
11453
11460
  Ce == null || Ce(!1), ve == null || ve(!1), i == null || i(Q, ne, ye, _e), Ie == null || Ie(Q), qe.current && (E == null || E());
11454
11461
  }, we = (Q) => {
11455
11462
  ve == null || ve(!1), d == null || d(Q);
11456
- }, oe = D(() => r || ie.current, [r]), Ee = r || ie.current;
11457
- function dt() {
11463
+ }, oe = D(() => r || ie.current, [r]), Oe = r || ie.current;
11464
+ function lt() {
11458
11465
  return N;
11459
11466
  }
11460
11467
  function mt() {
11461
- const Q = ht(), ne = dt(), ye = {};
11468
+ const Q = ht(), ne = lt(), ye = {};
11462
11469
  return Object.keys(Q).forEach((_e) => {
11463
- const Le = Q[_e];
11464
- ne[_e] && ne[_e].type === "many2one" && Le && Array.isArray(Le) && Le.length === 2 ? ye[_e] = Le[0] : ne[_e] && (ne[_e].type === "one2many" || ne[_e].type === "many2many") && Le && Le.items ? ye[_e] = Le.items.filter((pt) => pt.operation !== "pendingRemove").map((pt) => pt.id) : ye[_e] = Le;
11470
+ const He = Q[_e];
11471
+ ne[_e] && ne[_e].type === "many2one" && He && Array.isArray(He) && He.length === 2 ? ye[_e] = He[0] : ne[_e] && (ne[_e].type === "one2many" || ne[_e].type === "many2many") && He && He.items ? ye[_e] = He.items.filter((pt) => pt.operation !== "pendingRemove").map((pt) => pt.id) : ye[_e] = He;
11465
11472
  }), {
11466
11473
  ...Gt(),
11467
11474
  ...ye
11468
11475
  };
11469
11476
  }
11470
- function kt() {
11477
+ function Dt() {
11471
11478
  const Q = mt(), ne = he == null ? void 0 : he();
11472
11479
  return ne ? {
11473
11480
  ...Q,
@@ -11493,9 +11500,9 @@ function Cy(t, e) {
11493
11500
  id: oe(),
11494
11501
  active_id: oe(),
11495
11502
  active_ids: [oe()],
11496
- parent_id: z,
11503
+ parent_id: G,
11497
11504
  ...Ye
11498
- }), [oe, z, Ye]), In = async (Q) => {
11505
+ }), [oe, G, Ye]), In = async (Q) => {
11499
11506
  const ne = oe() ? T == null ? void 0 : T.context : {};
11500
11507
  return await V.getHandler().defaultGet({
11501
11508
  model: n,
@@ -11549,10 +11556,10 @@ function Cy(t, e) {
11549
11556
  }
11550
11557
  }
11551
11558
  const hn = async () => {
11552
- O(void 0), G(), Te == null || Te(!0);
11559
+ O(void 0), Y(), Te == null || Te(!0);
11553
11560
  let Q;
11554
11561
  try {
11555
- g ? Q = { arch: g.arch, fields: g.fields } : Q = await Oe();
11562
+ g ? Q = { arch: g.arch, fields: g.fields } : Q = await Ee();
11556
11563
  const { fields: ne, arch: ye } = Q;
11557
11564
  H(ne), j(ye), await Bt({
11558
11565
  fields: ne,
@@ -11563,16 +11570,16 @@ function Cy(t, e) {
11563
11570
  }
11564
11571
  }, Bt = async (Q) => {
11565
11572
  X((pt) => pt + 1);
11566
- let ne, ye, _e, Le;
11567
- Te == null || Te(!0), O(void 0), G(), Q != null && Q.fields ? (ye = Q.fields, _e = Q.arch) : (ye = N, _e = $), m && (Q == null ? void 0 : Q.forceRefresh) !== !0 ? ne = m : { values: ne, defaultGetCalled: Le } = await et({
11573
+ let ne, ye, _e, He;
11574
+ Te == null || Te(!0), O(void 0), Y(), Q != null && Q.fields ? (ye = Q.fields, _e = Q.arch) : (ye = N, _e = $), m && (Q == null ? void 0 : Q.forceRefresh) !== !0 ? ne = m : { values: ne, defaultGetCalled: He } = await tt({
11568
11575
  fields: ye,
11569
11576
  arch: _e
11570
11577
  }), b && (ne = { ...qu(b), ...ne }), B.current = Pn(ne, ye), De({
11571
11578
  values: ne,
11572
11579
  fields: ye,
11573
11580
  reset: !0,
11574
- isDefaultGet: Le
11575
- }), tt({ fields: ye, arch: _e, values: ne }), Te == null || Te(!1), Ce == null || Ce(!1), Le && le(!0);
11581
+ isDefaultGet: He
11582
+ }), Ze({ fields: ye, arch: _e, values: ne }), Te == null || Te(!1), Ce == null || Ce(!1), He && le(!0);
11576
11583
  }, An = async () => new Promise(async (Q) => {
11577
11584
  Nt() ? Yn({
11578
11585
  t: A,
@@ -11583,7 +11590,7 @@ function Cy(t, e) {
11583
11590
  Q(!1);
11584
11591
  }
11585
11592
  }) : (vt == null || vt(), Q(!0));
11586
- }), Oe = async () => {
11593
+ }), Ee = async () => {
11587
11594
  if (c) {
11588
11595
  const Q = await V.getHandler().getActionStringForModel(n);
11589
11596
  return (await V.getHandler().getViewsForAction({
@@ -11611,13 +11618,13 @@ function Cy(t, e) {
11611
11618
  _e || (se.current = lo), k.setFields(Ec);
11612
11619
  },
11613
11620
  [k]
11614
- ), et = async ({
11621
+ ), tt = async ({
11615
11622
  fields: Q,
11616
11623
  arch: ne
11617
11624
  }) => {
11618
11625
  let ye = {}, _e = !1;
11619
11626
  if (oe()) {
11620
- const Le = T || Ve({
11627
+ const He = T || Le({
11621
11628
  arch: ne,
11622
11629
  fields: Q,
11623
11630
  values: {}
@@ -11625,7 +11632,7 @@ function Cy(t, e) {
11625
11632
  if (ye = (await V.getHandler().readObjects({
11626
11633
  model: n,
11627
11634
  ids: [oe()],
11628
- fields: vy(Q, Le == null ? void 0 : Le.contextForFields),
11635
+ fields: vy(Q, He == null ? void 0 : He.contextForFields),
11629
11636
  context: y
11630
11637
  }))[0], v)
11631
11638
  return { values: ye, defaultGetCalled: _e };
@@ -11673,13 +11680,13 @@ function Cy(t, e) {
11673
11680
  ie.current = _e, B.current = ye;
11674
11681
  }
11675
11682
  h && await h([oe()]), !v && ne && (ce == null || ce(oe(), ht(), je()));
11676
- }, xt = async (Q) => {
11683
+ }, Ct = async (Q) => {
11677
11684
  const { callOnSubmitSucceed: ne = !0 } = Q || {};
11678
11685
  !v && ne && (ce == null || ce(oe(), ht(), je()));
11679
- }, It = async (Q) => {
11686
+ }, At = async (Q) => {
11680
11687
  let ne = !1;
11681
11688
  const { callOnSubmitSucceed: ye = !0 } = Q || {};
11682
- if (Z.current = !0, O(void 0), G(), ae.current && !Nt() && oe() && ye) {
11689
+ if (Z.current = !0, O(void 0), Y(), ae.current && !Nt() && oe() && ye) {
11683
11690
  Z.current = !1, Ce == null || Ce(!1), ce == null || ce(
11684
11691
  oe(),
11685
11692
  ht(),
@@ -11699,7 +11706,7 @@ function Cy(t, e) {
11699
11706
  }), { succeed: !1, id: oe() };
11700
11707
  _(!0), ve == null || ve(!0);
11701
11708
  try {
11702
- f === "api" ? await at(Q) : await xt(Q), u && (ie.current = void 0, De({ values: {}, fields: N, reset: !0 })), await Bt({ forceRefresh: !0 }), ne = !0, $e({
11709
+ f === "api" ? await at(Q) : await Ct(Q), u && (ie.current = void 0, De({ values: {}, fields: N, reset: !0 })), await Bt({ forceRefresh: !0 }), ne = !0, $e({
11703
11710
  type: "success",
11704
11711
  title: A("savedRegisters"),
11705
11712
  duration: 3
@@ -11710,15 +11717,15 @@ function Cy(t, e) {
11710
11717
  Z.current = !1, ve == null || ve(!1), _(!1);
11711
11718
  }
11712
11719
  return { succeed: ne, id: oe() };
11713
- }, Ve = D(
11720
+ }, Le = D(
11714
11721
  ({
11715
11722
  fields: Q,
11716
11723
  arch: ne,
11717
11724
  values: ye,
11718
11725
  operationInProgress: _e = !1
11719
11726
  }) => {
11720
- const Le = new ia(Q);
11721
- return Le.parse(ne, {
11727
+ const He = new ia(Q);
11728
+ return He.parse(ne, {
11722
11729
  readOnly: p || _e,
11723
11730
  values: Lu(
11724
11731
  {
@@ -11727,10 +11734,10 @@ function Cy(t, e) {
11727
11734
  },
11728
11735
  Q
11729
11736
  )
11730
- }), Le;
11737
+ }), He;
11731
11738
  },
11732
11739
  [Gt, p]
11733
- ), tt = D(
11740
+ ), Ze = D(
11734
11741
  ({
11735
11742
  fields: Q,
11736
11743
  arch: ne,
@@ -11738,15 +11745,15 @@ function Cy(t, e) {
11738
11745
  operationInProgress: _e = !1
11739
11746
  }) => {
11740
11747
  var pt;
11741
- const Le = Ve({
11748
+ const He = Le({
11742
11749
  arch: ne,
11743
11750
  fields: Q,
11744
11751
  values: ye,
11745
11752
  operationInProgress: _e
11746
11753
  });
11747
- R(Le), Le.string && Le.string !== He && (Qe == null || Qe(Le.string)), U && Le.string && ((pt = U.setTitle) == null || pt.call(U, Le.string));
11754
+ R(He), He.string && He.string !== ke && (Qe == null || Qe(He.string)), U && He.string && ((pt = U.setTitle) == null || pt.call(U, He.string));
11748
11755
  },
11749
- [U, Ve, Qe, He]
11756
+ [U, Le, Qe, ke]
11750
11757
  ), st = async ({
11751
11758
  elementHasLostFocus: Q = !1
11752
11759
  }) => {
@@ -11773,11 +11780,11 @@ function Cy(t, e) {
11773
11780
  ]
11774
11781
  }) && Q !== !0)) {
11775
11782
  const _e = Pn(k.getFieldsValue(!0), N);
11776
- se.current = _e, l == null || l(_e), Ce == null || Ce(!0), Object.keys(_e).forEach((Le) => {
11777
- Ne(Le);
11783
+ se.current = _e, l == null || l(_e), Ce == null || Ce(!0), Object.keys(_e).forEach((He) => {
11784
+ Ve(He);
11778
11785
  }), Qt(ye);
11779
11786
  }
11780
- }, At = Pd(st, 100), Qt = async (Q) => {
11787
+ }, bt = Pd(st, 100), Qt = async (Q) => {
11781
11788
  try {
11782
11789
  for (let ne = 0; ne < Q.length; ne += 1) {
11783
11790
  const ye = Q[ne];
@@ -11789,7 +11796,7 @@ function Cy(t, e) {
11789
11796
  }, wr = async (Q) => {
11790
11797
  const ne = T == null ? void 0 : T.onChangeFields[Q];
11791
11798
  if (!ne) {
11792
- tt({
11799
+ Ze({
11793
11800
  fields: N,
11794
11801
  arch: $,
11795
11802
  values: ut(N)
@@ -11814,14 +11821,14 @@ function Cy(t, e) {
11814
11821
  fields: N
11815
11822
  });
11816
11823
  if (_e.value) {
11817
- const Le = {
11824
+ const He = {
11818
11825
  ...ut(N),
11819
11826
  ..._e.value
11820
11827
  }, pt = Hu({
11821
- values: Le,
11828
+ values: He,
11822
11829
  fields: N
11823
11830
  });
11824
- tt({
11831
+ Ze({
11825
11832
  fields: N,
11826
11833
  arch: $,
11827
11834
  values: pt
@@ -11832,7 +11839,7 @@ function Cy(t, e) {
11832
11839
  });
11833
11840
  }
11834
11841
  if (_e.warning && _e.warning.title && _e.warning.message && !ue.current) {
11835
- const { title: Le, message: pt } = _e.warning;
11842
+ const { title: He, message: pt } = _e.warning;
11836
11843
  ue.current = !0, me([
11837
11844
  {
11838
11845
  field: Q,
@@ -11841,7 +11848,7 @@ function Cy(t, e) {
11841
11848
  }
11842
11849
  ]), $e({
11843
11850
  type: "warning",
11844
- title: Le,
11851
+ title: He,
11845
11852
  body: pt,
11846
11853
  onOk: () => {
11847
11854
  ue.current = !1;
@@ -11849,15 +11856,15 @@ function Cy(t, e) {
11849
11856
  });
11850
11857
  }
11851
11858
  if (_e.domain && Object.keys(_e.domain).length > 0) {
11852
- const Le = Wu({
11859
+ const He = Wu({
11853
11860
  fieldsDomain: _e.domain,
11854
11861
  fields: N
11855
11862
  });
11856
- tt({
11857
- fields: Le,
11863
+ Ze({
11864
+ fields: He,
11858
11865
  arch: $,
11859
- values: ut(Le)
11860
- }), H(Le);
11866
+ values: ut(He)
11867
+ }), H(He);
11861
11868
  }
11862
11869
  };
11863
11870
  async function io({
@@ -11933,7 +11940,7 @@ function Cy(t, e) {
11933
11940
  st({ elementHasLostFocus: !0 });
11934
11941
  }
11935
11942
  function En(Q) {
11936
- tt({
11943
+ Ze({
11937
11944
  fields: N,
11938
11945
  arch: $,
11939
11946
  values: ut(N),
@@ -11948,17 +11955,17 @@ function Cy(t, e) {
11948
11955
  B.current = {
11949
11956
  ...B.current,
11950
11957
  ...Q
11951
- }, tt({ fields: N, arch: $, values: ne }), De({
11958
+ }, Ze({ fields: N, arch: $, values: ne }), De({
11952
11959
  values: ne,
11953
11960
  fields: N,
11954
11961
  reset: !1
11955
11962
  });
11956
11963
  },
11957
- [$, De, N, ut, tt]
11964
+ [$, De, N, ut, Ze]
11958
11965
  );
11959
11966
  wy({
11960
11967
  model: n,
11961
- id: Ee,
11968
+ id: Oe,
11962
11969
  context: y,
11963
11970
  autorefreshableFields: T == null ? void 0 : T.autorefreshableFields,
11964
11971
  fieldDefs: N,
@@ -11984,11 +11991,11 @@ function Cy(t, e) {
11984
11991
  }
11985
11992
  let _e = !1;
11986
11993
  try {
11987
- !p && (Nt() || oe() === void 0) && (_e = !0, En(!0), f === "2many" ? (await at({ callOnSubmitSucceed: !1 }), ae.current = !0) : await It({ callOnSubmitSucceed: !1 }));
11988
- const Le = ae.current ? qt() : {}, pt = { ...ye, ...Le };
11994
+ !p && (Nt() || oe() === void 0) && (_e = !0, En(!0), f === "2many" ? (await at({ callOnSubmitSucceed: !1 }), ae.current = !0) : await At({ callOnSubmitSucceed: !1 }));
11995
+ const He = ae.current ? qt() : {}, pt = { ...ye, ...He };
11989
11996
  Q === "object" ? await io({ action: ne, context: pt }) : Q === "workflow" ? await an({ action: ne }) : Q === "action" && await Rn({ action: ne, context: pt }), _e && En(!1);
11990
- } catch (Le) {
11991
- _e && En(!1), $e(Le);
11997
+ } catch (He) {
11998
+ _e && En(!1), $e(He);
11992
11999
  }
11993
12000
  }
11994
12001
  const Rc = () => !T && !x ? /* @__PURE__ */ s(nt, {}) : !n && !g || !C ? null : /* @__PURE__ */ s(ge, { children: /* @__PURE__ */ s(
@@ -11996,33 +12003,33 @@ function Cy(t, e) {
11996
12003
  {
11997
12004
  getValues: ht,
11998
12005
  getPlainValues: mt,
11999
- getAllHierarchyValues: kt,
12000
- getFields: dt,
12006
+ getAllHierarchyValues: Dt,
12007
+ getFields: lt,
12001
12008
  domain: b,
12002
- activeId: Ee,
12009
+ activeId: Oe,
12003
12010
  activeModel: n,
12004
12011
  setFieldValue: Jn,
12005
12012
  getFieldValue: sn,
12006
12013
  executeButtonAction: ln,
12007
12014
  getContext: it,
12008
- submitForm: It,
12015
+ submitForm: At,
12009
12016
  fetchValues: Bt,
12010
12017
  formHasChanges: Nt,
12011
12018
  elementHasLostFocus: ft,
12012
12019
  formView: g,
12013
12020
  fieldMessages: ze,
12014
12021
  setFieldMessage: Ge,
12015
- getFieldMessage: ke,
12022
+ getFieldMessage: Ne,
12016
12023
  getFieldMessageType: Se,
12017
- clearFieldMessage: Ne,
12018
- clearAllFieldMessages: G,
12024
+ clearFieldMessage: Ve,
12025
+ clearAllFieldMessages: Y,
12019
12026
  refreshCounter: re,
12020
12027
  children: /* @__PURE__ */ s(
12021
- Mt,
12028
+ $t,
12022
12029
  {
12023
12030
  form: k,
12024
12031
  onFieldsChange: () => {
12025
- At({ elementHasLostFocus: !1 });
12032
+ bt({ elementHasLostFocus: !1 });
12026
12033
  },
12027
12034
  component: !1,
12028
12035
  children: T && /* @__PURE__ */ s(
@@ -12037,7 +12044,7 @@ function Cy(t, e) {
12037
12044
  }
12038
12045
  ) }), _c = () => /* @__PURE__ */ L(ge, { children: [
12039
12046
  /* @__PURE__ */ s(Nr, {}),
12040
- /* @__PURE__ */ s(Ke, { justify: "end", children: /* @__PURE__ */ L(ct, { children: [
12047
+ /* @__PURE__ */ s(Ke, { justify: "end", children: /* @__PURE__ */ L(dt, { children: [
12041
12048
  /* @__PURE__ */ s(
12042
12049
  Je,
12043
12050
  {
@@ -12056,7 +12063,7 @@ function Cy(t, e) {
12056
12063
  loading: P,
12057
12064
  icon: /* @__PURE__ */ s(lr, {}),
12058
12065
  onClick: async () => {
12059
- await It();
12066
+ await At();
12060
12067
  },
12061
12068
  type: "primary",
12062
12069
  children: "OK"
@@ -12079,7 +12086,7 @@ function Cy(t, e) {
12079
12086
  }
12080
12087
  ) : null;
12081
12088
  }
12082
- const zn = $t(Cy), Fn = (t) => {
12089
+ const zn = kt(Cy), Fn = (t) => {
12083
12090
  const {
12084
12091
  visible: e,
12085
12092
  id: n,
@@ -12246,7 +12253,7 @@ const zn = $t(Cy), Fn = (t) => {
12246
12253
  }
12247
12254
  ),
12248
12255
  /* @__PURE__ */ s(Nr, {}),
12249
- /* @__PURE__ */ s(Ke, { justify: "end", children: /* @__PURE__ */ L(ct, { children: [
12256
+ /* @__PURE__ */ s(Ke, { justify: "end", children: /* @__PURE__ */ L(dt, { children: [
12250
12257
  /* @__PURE__ */ s(
12251
12258
  Je,
12252
12259
  {
@@ -12356,7 +12363,7 @@ const zn = $t(Cy), Fn = (t) => {
12356
12363
  context: c,
12357
12364
  id: l,
12358
12365
  domain: d
12359
- } = r, p = o && !a ? { backgroundColor: sc.colorPrimaryBg } : void 0, [u, f] = I(!1), [m, g] = I(!1), [h, v] = I(!1), [y, b] = I(), C = K(!1), [S, w] = I(""), M = K(), F = pe(Ze), {
12366
+ } = r, p = o && !a ? { backgroundColor: sc.colorPrimaryBg } : void 0, [u, f] = I(!1), [m, g] = I(!1), [h, v] = I(!1), [y, b] = I(), C = K(!1), [S, w] = I(""), M = K(), F = pe(et), {
12360
12367
  domain: E,
12361
12368
  getFields: A,
12362
12369
  getContext: P,
@@ -12374,7 +12381,7 @@ const zn = $t(Cy), Fn = (t) => {
12374
12381
  }, [e]);
12375
12382
  const J = (q) => {
12376
12383
  n == null || n(q), _ == null || _();
12377
- }, Y = (q) => {
12384
+ }, z = (q) => {
12378
12385
  M.current = q.target.value, J([void 0, ""]);
12379
12386
  }, le = async () => {
12380
12387
  if (!h && S !== W) {
@@ -12447,7 +12454,7 @@ const zn = $t(Cy), Fn = (t) => {
12447
12454
  async function B(q) {
12448
12455
  q.keyCode === 13 ? (q.preventDefault(), q.stopPropagation(), await le()) : q.code === "Backspace" && U !== void 0 && (q.preventDefault(), q.stopPropagation(), J([void 0, ""]));
12449
12456
  }
12450
- const se = o && !a ? Ry : St, ue = bn(
12457
+ const se = o && !a ? Ry : xt, ue = bn(
12451
12458
  rn.FEATURE_MANY2ONE_DISABLE_FOLDER
12452
12459
  ), Z = bn(
12453
12460
  rn.FEATURE_MANY2ONE_DISABLE_ARROW_MENU
@@ -12465,7 +12472,7 @@ const zn = $t(Cy), Fn = (t) => {
12465
12472
  type: "text",
12466
12473
  value: S,
12467
12474
  disabled: a,
12468
- onChange: Y,
12475
+ onChange: z,
12469
12476
  style: {
12470
12477
  ...p,
12471
12478
  ...H || ae ? { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
@@ -12541,7 +12548,7 @@ const zn = $t(Cy), Fn = (t) => {
12541
12548
  }
12542
12549
  )
12543
12550
  ] });
12544
- }, Ry = Ft(St)`
12551
+ }, Ry = It(xt)`
12545
12552
  .ant-input {
12546
12553
  background-color: ${sc.colorPrimaryBg};
12547
12554
  }
@@ -12850,12 +12857,12 @@ function Dy(t) {
12850
12857
  parentContext: b,
12851
12858
  selectedRowItems: g.map((se) => ({ id: se })),
12852
12859
  onRefreshParentValues: S
12853
- }), W = n || !_ || !T, J = n || !x, Y = l === 0 || n || a !== "form" && g.length === 0 || (f ? !x : !O || !T), le = n || R || a === "tree" && g.length !== 1 || a === "form" && (w === void 0 || w < 0) || !_ || !T;
12860
+ }), W = n || !_ || !T, J = n || !x, z = l === 0 || n || a !== "form" && g.length === 0 || (f ? !x : !O || !T), le = n || R || a === "tree" && g.length !== 1 || a === "form" && (w === void 0 || w < 0) || !_ || !T;
12854
12861
  return /* @__PURE__ */ L("div", { className: "flex mb-2 pt-3", children: [
12855
12862
  /* @__PURE__ */ s(uc, { title: e, token: M }),
12856
12863
  /* @__PURE__ */ L("div", { className: "flex-none h-8 pl-2", children: [
12857
12864
  a !== "graph" && h && /* @__PURE__ */ s(
12858
- wt,
12865
+ St,
12859
12866
  {
12860
12867
  tooltip: F("createNewItem"),
12861
12868
  icon: /* @__PURE__ */ s(Br, {}),
@@ -12866,7 +12873,7 @@ function Dy(t) {
12866
12873
  f && h && /* @__PURE__ */ L(ge, { children: [
12867
12874
  /* @__PURE__ */ s(Yt, {}),
12868
12875
  /* @__PURE__ */ s(
12869
- wt,
12876
+ St,
12870
12877
  {
12871
12878
  tooltip: F("searchExistingItem"),
12872
12879
  icon: /* @__PURE__ */ s(ur, {}),
@@ -12882,13 +12889,13 @@ function Dy(t) {
12882
12889
  isMany2Many: f,
12883
12890
  selectedRowKeys: n ? [] : g,
12884
12891
  onDelete: c,
12885
- disabled: Y
12892
+ disabled: z
12886
12893
  }
12887
12894
  ),
12888
12895
  (a === "tree" || a === "form") && /* @__PURE__ */ L(ge, { children: [
12889
12896
  /* @__PURE__ */ s(Yt, {}),
12890
12897
  /* @__PURE__ */ s(
12891
- wt,
12898
+ St,
12892
12899
  {
12893
12900
  icon: /* @__PURE__ */ s(jr, {}),
12894
12901
  tooltip: F("showLogs"),
@@ -12904,7 +12911,7 @@ function Dy(t) {
12904
12911
  (a === "form" || a === "tree") && /* @__PURE__ */ L(ge, { children: [
12905
12912
  /* @__PURE__ */ s(Yt, {}),
12906
12913
  /* @__PURE__ */ s(
12907
- wt,
12914
+ St,
12908
12915
  {
12909
12916
  icon: /* @__PURE__ */ s(dr, {}),
12910
12917
  tooltip: F("duplicate"),
@@ -12930,7 +12937,7 @@ function Dy(t) {
12930
12937
  v && /* @__PURE__ */ L(ge, { children: [
12931
12938
  /* @__PURE__ */ s(Yt, {}),
12932
12939
  /* @__PURE__ */ s(
12933
- wt,
12940
+ St,
12934
12941
  {
12935
12942
  tooltip: F("toggleViewMode"),
12936
12943
  icon: /* @__PURE__ */ s(od, {}),
@@ -13014,7 +13021,7 @@ const pc = ot(
13014
13021
  return /* @__PURE__ */ L(ge, { children: [
13015
13022
  /* @__PURE__ */ s(Yt, {}),
13016
13023
  /* @__PURE__ */ s(
13017
- wt,
13024
+ St,
13018
13025
  {
13019
13026
  tooltip: o("previousItem"),
13020
13027
  icon: /* @__PURE__ */ s(pa, {}),
@@ -13030,7 +13037,7 @@ const pc = ot(
13030
13037
  }
13031
13038
  ),
13032
13039
  /* @__PURE__ */ s(
13033
- wt,
13040
+ St,
13034
13041
  {
13035
13042
  tooltip: o("nextItem"),
13036
13043
  icon: /* @__PURE__ */ s(ma, {}),
@@ -13051,7 +13058,7 @@ const mc = ot(
13051
13058
  }) => {
13052
13059
  const { t: o } = xe();
13053
13060
  return /* @__PURE__ */ s(ar, { count: e.length, children: /* @__PURE__ */ s(
13054
- wt,
13061
+ St,
13055
13062
  {
13056
13063
  tooltip: o(t ? "unlink" : "delete"),
13057
13064
  icon: t ? /* @__PURE__ */ s(rd, {}) : /* @__PURE__ */ s(es, {}),
@@ -13077,23 +13084,23 @@ function My(t) {
13077
13084
  });
13078
13085
  }
13079
13086
  const $y = (t) => {
13080
- var ke, Se, Ne;
13087
+ var Ne, Se, Ve;
13081
13088
  const { value: e, onChange: n, ooui: r, views: o } = t, { items: i = [] } = e || {}, { currentView: a, setCurrentView: c, itemIndex: l, setItemIndex: d } = pe(
13082
13089
  fn
13083
- ), p = pe(Ze), {
13090
+ ), p = pe(et), {
13084
13091
  activeId: u,
13085
13092
  getFields: f,
13086
13093
  getContext: m,
13087
13094
  domain: g,
13088
13095
  fetchValues: h,
13089
13096
  getAllHierarchyValues: v
13090
- } = p || {}, { t: y } = xe(), [b, C] = I(!1), [S, w] = I(!1), [M, F] = I(), [E, A] = I(!1), [P, _] = I(!1), [x, O] = I(), [T, R] = I([]), [k, $] = I(!1), [j, N] = I([]), [H, U] = I(), W = K(), [J, Y] = I(void 0), le = K(), {
13097
+ } = p || {}, { t: y } = xe(), [b, C] = I(!1), [S, w] = I(!1), [M, F] = I(), [E, A] = I(!1), [P, _] = I(!1), [x, O] = I(), [T, R] = I([]), [k, $] = I(!1), [j, N] = I([]), [H, U] = I(), W = K(), [J, z] = I(void 0), le = K(), {
13091
13098
  readOnly: re,
13092
13099
  relation: X,
13093
13100
  context: ie,
13094
13101
  domain: B
13095
13102
  } = r, se = r.type === "many2many", { id: ue } = r, Z = i.filter(
13096
- (G) => (G.values || G.treeValues) && G.operation !== "pendingRemove"
13103
+ (Y) => (Y.values || Y.treeValues) && Y.operation !== "pendingRemove"
13097
13104
  ), ae = K();
13098
13105
  de(() => {
13099
13106
  if (ae.current !== a) {
@@ -13103,24 +13110,24 @@ const $y = (t) => {
13103
13110
  fe();
13104
13111
  }, [i, a]);
13105
13112
  const fe = D(() => {
13106
- (a === "form" && i.some((G) => !G.values) || a === "tree" && i.some((G) => !G.treeValues)) && ee();
13113
+ (a === "form" && i.some((Y) => !Y.values) || a === "tree" && i.some((Y) => !Y.treeValues)) && ee();
13107
13114
  }, [i, a]);
13108
13115
  Xe(() => {
13109
13116
  he();
13110
13117
  }, [g]);
13111
- const q = (G) => {
13118
+ const q = (Y) => {
13112
13119
  var me, ce;
13113
13120
  n == null || n({
13114
13121
  fields: ((me = o.get("form")) == null ? void 0 : me.fields) || ((ce = o.get("tree")) == null ? void 0 : ce.fields),
13115
- items: My(G)
13122
+ items: My(Y)
13116
13123
  });
13117
13124
  }, ee = async () => {
13118
- await z(), l > Z.length - 1 && l !== 0 && d(0);
13119
- }, z = async (G) => {
13125
+ await G(), l > Z.length - 1 && l !== 0 && d(0);
13126
+ }, G = async (Y) => {
13120
13127
  var me, ce, we;
13121
13128
  w(!0), C(!1), F(void 0);
13122
13129
  try {
13123
- const [oe, Ee] = await cs({
13130
+ const [oe, Oe] = await cs({
13124
13131
  treeView: {
13125
13132
  arch: (me = o.get("tree")) == null ? void 0 : me.arch,
13126
13133
  fields: (ce = o.get("tree")) == null ? void 0 : ce.fields
@@ -13131,9 +13138,9 @@ const $y = (t) => {
13131
13138
  model: X,
13132
13139
  items: i,
13133
13140
  context: { ...m == null ? void 0 : m(), ...ie },
13134
- currentView: G || a
13141
+ currentView: Y || a
13135
13142
  });
13136
- return W.current || (W.current = oe.map((dt) => dt.id)), (a || G) === "tree" && Ee && Y(Ee), q(oe), oe;
13143
+ return W.current || (W.current = oe.map((lt) => lt.id)), (a || Y) === "tree" && Oe && z(Oe), q(oe), oe;
13137
13144
  } catch (oe) {
13138
13145
  F(oe);
13139
13146
  } finally {
@@ -13144,8 +13151,8 @@ const $y = (t) => {
13144
13151
  he();
13145
13152
  }, [v()]);
13146
13153
  const he = D(async () => {
13147
- let G = [];
13148
- B && (G = await V.getHandler().evalDomain({
13154
+ let Y = [];
13155
+ B && (Y = await V.getHandler().evalDomain({
13149
13156
  domain: B,
13150
13157
  values: xn({
13151
13158
  fields: f(),
@@ -13153,12 +13160,12 @@ const $y = (t) => {
13153
13160
  }),
13154
13161
  fields: f(),
13155
13162
  context: m()
13156
- })), g && g.length > 0 && (G = G.concat(
13163
+ })), g && g.length > 0 && (Y = Y.concat(
13157
13164
  Ko({
13158
13165
  domain: g,
13159
13166
  widgetFieldName: ue
13160
13167
  })
13161
- )), G.length > 0 && N(G);
13168
+ )), Y.length > 0 && N(Y);
13162
13169
  }, [
13163
13170
  B,
13164
13171
  g,
@@ -13167,7 +13174,7 @@ const $y = (t) => {
13167
13174
  m,
13168
13175
  ue
13169
13176
  ]), qe = () => {
13170
- const G = Array.from(o.keys()), me = G[(G.indexOf(a) + 1) % G.length];
13177
+ const Y = Array.from(o.keys()), me = Y[(Y.indexOf(a) + 1) % Y.length];
13171
13178
  a === "form" ? Ie(() => {
13172
13179
  c(me);
13173
13180
  }) : c(me);
@@ -13176,35 +13183,35 @@ const $y = (t) => {
13176
13183
  d(l - 1);
13177
13184
  }) : d(l - 1));
13178
13185
  }, ve = () => {
13179
- const G = Z.length;
13180
- l < G - 1 && (a === "form" ? Ie(() => {
13186
+ const Y = Z.length;
13187
+ l < Y - 1 && (a === "form" ? Ie(() => {
13181
13188
  d(l + 1);
13182
13189
  }) : d(l + 1));
13183
13190
  }, Ce = async () => {
13184
- const G = Z[l].id, me = (await V.getHandler().readObjects({
13191
+ const Y = Z[l].id, me = (await V.getHandler().readObjects({
13185
13192
  model: X,
13186
- ids: [G],
13193
+ ids: [Y],
13187
13194
  fields: o.get("form").fields,
13188
13195
  context: { ...m == null ? void 0 : m(), ...ie }
13189
13196
  }))[0], ce = (await V.getHandler().readObjects({
13190
13197
  model: X,
13191
- ids: [G],
13198
+ ids: [Y],
13192
13199
  fields: o.get("tree").fields,
13193
13200
  context: { ...m == null ? void 0 : m(), ...ie }
13194
- }))[0], we = i.map((oe) => oe.id === G ? {
13201
+ }))[0], we = i.map((oe) => oe.id === Y ? {
13195
13202
  ...oe,
13196
13203
  operation: "original",
13197
13204
  values: me,
13198
13205
  treeValues: ce
13199
13206
  } : oe);
13200
13207
  q(we);
13201
- }, Ie = (G) => {
13208
+ }, Ie = (Y) => {
13202
13209
  b ? Yn({
13203
13210
  t: y,
13204
13211
  onOk: () => {
13205
- Ce(), G(), C(!1);
13212
+ Ce(), Y(), C(!1);
13206
13213
  }
13207
- }) : G();
13214
+ }) : Y();
13208
13215
  }, Te = () => {
13209
13216
  if (se) {
13210
13217
  cc({
@@ -13222,12 +13229,12 @@ const $y = (t) => {
13222
13229
  }
13223
13230
  });
13224
13231
  }, be = async () => {
13225
- const { inv_field: G } = r;
13232
+ const { inv_field: Y } = r;
13226
13233
  let me;
13227
- G && u && (me = { [G]: u }), a === "form" ? Ie(() => {
13234
+ Y && u && (me = { [Y]: u }), a === "form" ? Ie(() => {
13228
13235
  $(!0), O({ defaultValues: me }), A(!0);
13229
13236
  }) : ($(!0), O({ defaultValues: me }), A(!0));
13230
- }, He = async () => {
13237
+ }, ke = async () => {
13231
13238
  a === "form" ? Ie(() => {
13232
13239
  _(!0);
13233
13240
  }) : _(!0);
@@ -13235,24 +13242,24 @@ const $y = (t) => {
13235
13242
  w(!0), C(!1), F(void 0);
13236
13243
  try {
13237
13244
  if (Z[l].id > 0) {
13238
- const G = i.map((me) => me.id === Z[l].id ? {
13245
+ const Y = i.map((me) => me.id === Z[l].id ? {
13239
13246
  ...me,
13240
13247
  operation: "pendingRemove"
13241
13248
  } : me);
13242
- q(G);
13249
+ q(Y);
13243
13250
  } else
13244
13251
  q(
13245
- i.filter((G) => G.id !== Z[l].id)
13252
+ i.filter((Y) => Y.id !== Z[l].id)
13246
13253
  );
13247
- } catch (G) {
13248
- F(G);
13254
+ } catch (Y) {
13255
+ F(Y);
13249
13256
  }
13250
13257
  d(0), w(!1);
13251
13258
  }, Re = async () => {
13252
- const G = Z.filter((me) => T.includes(me.id));
13259
+ const Y = Z.filter((me) => T.includes(me.id));
13253
13260
  w(!0), C(!1), F(void 0);
13254
13261
  try {
13255
- const me = G.map((we) => we.id), ce = i.filter((we) => !(me.includes(we.id) && we.id < 0)).map((we) => me.includes(we.id) ? {
13262
+ const me = Y.map((we) => we.id), ce = i.filter((we) => !(me.includes(we.id) && we.id < 0)).map((we) => me.includes(we.id) ? {
13256
13263
  ...we,
13257
13264
  operation: "pendingRemove"
13258
13265
  } : we);
@@ -13261,40 +13268,40 @@ const $y = (t) => {
13261
13268
  F(me);
13262
13269
  }
13263
13270
  d(0), w(!1);
13264
- }, Be = (G, me, ce, we = !1) => {
13271
+ }, Be = (Y, me, ce, we = !1) => {
13265
13272
  let oe;
13266
13273
  if (we)
13267
13274
  oe = i.concat({
13268
- id: G,
13275
+ id: Y,
13269
13276
  operation: "pendingLink",
13270
- values: { ...ce, id: G },
13271
- treeValues: { ...ce, id: G }
13277
+ values: { ...ce, id: Y },
13278
+ treeValues: { ...ce, id: Y }
13272
13279
  });
13273
- else if (G)
13274
- oe = i.map((Ee) => Ee.id === G ? {
13275
- id: G,
13276
- operation: G > 0 ? "pendingUpdate" : "pendingCreate",
13277
- values: { ...ce, id: G },
13278
- treeValues: { ...ce, id: G }
13279
- } : Ee);
13280
+ else if (Y)
13281
+ oe = i.map((Oe) => Oe.id === Y ? {
13282
+ id: Y,
13283
+ operation: Y > 0 ? "pendingUpdate" : "pendingCreate",
13284
+ values: { ...ce, id: Y },
13285
+ treeValues: { ...ce, id: Y }
13286
+ } : Oe);
13280
13287
  else {
13281
- const Ee = ka(i);
13288
+ const Oe = ka(i);
13282
13289
  oe = i.concat({
13283
- id: Ee,
13290
+ id: Oe,
13284
13291
  operation: "pendingCreate",
13285
- values: { ...ce, id: Ee },
13286
- treeValues: { ...ce, id: Ee }
13292
+ values: { ...ce, id: Oe },
13293
+ treeValues: { ...ce, id: Oe }
13287
13294
  });
13288
13295
  }
13289
13296
  q(oe), k || A(!1);
13290
- }, Ae = async (G) => {
13291
- const { id: me } = G;
13297
+ }, Ae = async (Y) => {
13298
+ const { id: me } = Y;
13292
13299
  let ce = i;
13293
13300
  const we = i.find((oe) => oe.id === me);
13294
- (we == null ? void 0 : we.values) === void 0 && (ce = await z("form")), O(ce.find((oe) => oe.id === me)), $(!1), A(!0);
13295
- }, Ye = async (G) => {
13301
+ (we == null ? void 0 : we.values) === void 0 && (ce = await G("form")), O(ce.find((oe) => oe.id === me)), $(!1), A(!0);
13302
+ }, Ye = async (Y) => {
13296
13303
  w(!0);
13297
- const me = i, ce = G.filter((we) => !i.find((oe) => oe.id === we));
13304
+ const me = i, ce = Y.filter((we) => !i.find((oe) => oe.id === we));
13298
13305
  try {
13299
13306
  for (const we of ce) {
13300
13307
  const oe = (await V.getHandler().readObjects({
@@ -13302,7 +13309,7 @@ const $y = (t) => {
13302
13309
  ids: [we],
13303
13310
  fields: o.get("form").fields,
13304
13311
  context: { ...m == null ? void 0 : m(), ...ie }
13305
- }))[0], Ee = (await V.getHandler().readObjects({
13312
+ }))[0], Oe = (await V.getHandler().readObjects({
13306
13313
  model: X,
13307
13314
  ids: [we],
13308
13315
  fields: o.get("tree").fields,
@@ -13312,7 +13319,7 @@ const $y = (t) => {
13312
13319
  id: we,
13313
13320
  operation: "pendingLink",
13314
13321
  values: oe,
13315
- treeValues: Ee
13322
+ treeValues: Oe
13316
13323
  });
13317
13324
  }
13318
13325
  q(me);
@@ -13323,18 +13330,18 @@ const $y = (t) => {
13323
13330
  }
13324
13331
  };
13325
13332
  function $e() {
13326
- const G = Py[a];
13333
+ const Y = Py[a];
13327
13334
  if (a === "graph")
13328
13335
  return sa(o.get("graph").arch).string;
13329
13336
  {
13330
- const me = new G(o.get(a).fields);
13337
+ const me = new Y(o.get(a).fields);
13331
13338
  return me.parse(o.get(a).arch), me.string;
13332
13339
  }
13333
13340
  }
13334
13341
  const ze = () => {
13335
13342
  var me, ce, we, oe;
13336
13343
  if (a === "form")
13337
- return Z.length === 0 ? y("noCurrentEntries") : a !== ae.current && i.some((Ee) => !Ee.values) ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ s(
13344
+ return Z.length === 0 ? y("noCurrentEntries") : a !== ae.current && i.some((Oe) => !Oe.values) ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ s(
13338
13345
  zn,
13339
13346
  {
13340
13347
  ref: le,
@@ -13344,35 +13351,35 @@ const $y = (t) => {
13344
13351
  model: X,
13345
13352
  id: (ce = Z[l]) == null ? void 0 : ce.id,
13346
13353
  submitMode: "values",
13347
- onFieldsChange: (Ee) => {
13348
- var kt;
13349
- const dt = (kt = Z[l]) == null ? void 0 : kt.id, mt = i.map((je) => je.id === dt ? {
13354
+ onFieldsChange: (Oe) => {
13355
+ var Dt;
13356
+ const lt = (Dt = Z[l]) == null ? void 0 : Dt.id, mt = i.map((je) => je.id === lt ? {
13350
13357
  ...je,
13351
13358
  operation: je.operation === "original" ? "pendingUpdate" : je.operation,
13352
- values: { ...Ee, id: dt },
13353
- treeValues: { ...Ee, id: dt }
13359
+ values: { ...Oe, id: lt },
13360
+ treeValues: { ...Oe, id: lt }
13354
13361
  } : je);
13355
13362
  q(mt), C(!0);
13356
13363
  },
13357
13364
  readOnly: re
13358
13365
  }
13359
13366
  );
13360
- let G = [];
13361
- if (Z.some((Ee) => Ee.treeValues) && (G = H ? kn({
13362
- resultsToSort: Z.map((Ee) => Ee.treeValues),
13367
+ let Y = [];
13368
+ if (Z.some((Oe) => Oe.treeValues) && (Y = H ? kn({
13369
+ resultsToSort: Z.map((Oe) => Oe.treeValues),
13363
13370
  sorter: H,
13364
13371
  fields: {
13365
13372
  ...o.get("tree").fields,
13366
13373
  ...((we = o.get("form")) == null ? void 0 : we.fields) || {}
13367
13374
  }
13368
- }) : Z.map((Ee) => Ee.treeValues)), a === "tree")
13375
+ }) : Z.map((Oe) => Oe.treeValues)), a === "tree")
13369
13376
  return /* @__PURE__ */ s(
13370
13377
  br,
13371
13378
  {
13372
13379
  total: Z.length,
13373
13380
  limit: Z.length,
13374
13381
  treeView: o.get("tree"),
13375
- results: G,
13382
+ results: Y,
13376
13383
  loading: S,
13377
13384
  onRowClicked: ((oe = o.get("form")) == null ? void 0 : oe.fields) !== void 0 ? Ae : void 0,
13378
13385
  showPagination: !1,
@@ -13387,14 +13394,14 @@ const $y = (t) => {
13387
13394
  }
13388
13395
  );
13389
13396
  if (a === "graph") {
13390
- const Ee = [[`${r.inv_field}`, "=", u]];
13397
+ const Oe = [[`${r.inv_field}`, "=", u]];
13391
13398
  return /* @__PURE__ */ s(
13392
13399
  Tn,
13393
13400
  {
13394
13401
  viewData: o.get("graph"),
13395
13402
  view_id: o.get("graph").view_id,
13396
13403
  model: r.relation,
13397
- domain: Ee,
13404
+ domain: Oe,
13398
13405
  context: { ...m == null ? void 0 : m(), ...ie },
13399
13406
  limit: 0
13400
13407
  }
@@ -13410,7 +13417,7 @@ const $y = (t) => {
13410
13417
  {
13411
13418
  mode: a,
13412
13419
  model: X,
13413
- currentId: (ke = Z[l]) == null ? void 0 : ke.id,
13420
+ currentId: (Ne = Z[l]) == null ? void 0 : Ne.id,
13414
13421
  title: $e(),
13415
13422
  readOnly: re || !1,
13416
13423
  isMany2Many: se,
@@ -13422,11 +13429,11 @@ const $y = (t) => {
13422
13429
  onToggleViewMode: qe,
13423
13430
  onPreviousItem: Fe,
13424
13431
  onNextItem: ve,
13425
- onSearchItem: He,
13432
+ onSearchItem: ke,
13426
13433
  selectedRowKeys: T,
13427
13434
  showCreateButton: ((Se = o.get("form")) == null ? void 0 : Se.fields) !== void 0,
13428
13435
  showToggleButton: o.size > 1,
13429
- toolbar: (Ne = o.get(a)) == null ? void 0 : Ne.toolbar,
13436
+ toolbar: (Ve = o.get(a)) == null ? void 0 : Ve.toolbar,
13430
13437
  context: { ...m == null ? void 0 : m(), ...ie },
13431
13438
  formRef: le,
13432
13439
  onRefreshParentValues: () => {
@@ -13447,13 +13454,13 @@ const $y = (t) => {
13447
13454
  visible: E,
13448
13455
  onSubmitSucceed: Be,
13449
13456
  parentContext: { ...m == null ? void 0 : m(), ...ie },
13450
- onCancel: (G) => {
13451
- if ($(!1), G != null && G.id && (G != null && G.values)) {
13457
+ onCancel: (Y) => {
13458
+ if ($(!1), Y != null && Y.id && (Y != null && Y.values)) {
13452
13459
  const me = i.map(
13453
- (ce) => ce.id === G.id ? {
13460
+ (ce) => ce.id === Y.id ? {
13454
13461
  ...ce,
13455
- values: { ...ce.values, ...G.values },
13456
- treeValues: { ...ce.treeValues, ...G.values }
13462
+ values: { ...ce.values, ...Y.values },
13463
+ treeValues: { ...ce.treeValues, ...Y.values }
13457
13464
  } : ce
13458
13465
  );
13459
13466
  q(me);
@@ -13474,8 +13481,8 @@ const $y = (t) => {
13474
13481
  model: X,
13475
13482
  context: { ...m == null ? void 0 : m(), ...ie },
13476
13483
  visible: P,
13477
- onSelectValues: async (G) => {
13478
- _(!1), Ye(G);
13484
+ onSelectValues: async (Y) => {
13485
+ _(!1), Ye(Y);
13479
13486
  },
13480
13487
  onCloseModal: () => {
13481
13488
  _(!1);
@@ -13492,7 +13499,7 @@ const $y = (t) => {
13492
13499
  getContext: i,
13493
13500
  domain: a,
13494
13501
  getAllHierarchyValues: c
13495
- } = pe(Ze) || {};
13502
+ } = pe(et) || {};
13496
13503
  Xe(() => {
13497
13504
  l();
13498
13505
  }, [a]), Xe(() => {
@@ -13538,7 +13545,7 @@ const $y = (t) => {
13538
13545
  c.current = m;
13539
13546
  }, []), p = D(() => c.current, []), u = te(() => Jt(t), [t]);
13540
13547
  return {
13541
- onTreeFetchRows: Ct(
13548
+ onTreeFetchRows: Tt(
13542
13549
  async ({
13543
13550
  allItems: m,
13544
13551
  startRow: g,
@@ -13657,7 +13664,7 @@ const $y = (t) => {
13657
13664
  };
13658
13665
  }, yc = ({
13659
13666
  one2manyItems: t
13660
- }) => en(() => t.filter((e) => e.operation !== "pendingRemove"), [t]), Ms = $t(
13667
+ }) => en(() => t.filter((e) => e.operation !== "pendingRemove"), [t]), Ms = kt(
13661
13668
  ({
13662
13669
  formView: t,
13663
13670
  items: e,
@@ -13805,7 +13812,7 @@ const bc = ({
13805
13812
  f(!1);
13806
13813
  },
13807
13814
  [o, i]
13808
- ), C = Ct(
13815
+ ), C = Tt(
13809
13816
  (w, M, F, E = !1) => {
13810
13817
  let A;
13811
13818
  if (E)
@@ -13834,7 +13841,7 @@ const bc = ({
13834
13841
  i(A), h || f(!1);
13835
13842
  },
13836
13843
  [h, o, i]
13837
- ), S = Ct(
13844
+ ), S = Tt(
13838
13845
  async (w) => {
13839
13846
  if (!d)
13840
13847
  return;
@@ -13874,7 +13881,7 @@ const bc = ({
13874
13881
  }) : l(!0);
13875
13882
  }, u = D(() => {
13876
13883
  l(!1);
13877
- }, []), f = Ct(
13884
+ }, []), f = Tt(
13878
13885
  async (g) => {
13879
13886
  const h = [...n], v = g.filter((y) => !n.find((b) => b.id === y));
13880
13887
  try {
@@ -13944,7 +13951,7 @@ const bc = ({
13944
13951
  colorsForResults: U,
13945
13952
  statusForResults: W,
13946
13953
  onRowStyle: J,
13947
- statusComponent: Y,
13954
+ statusComponent: z,
13948
13955
  onRowStatus: le,
13949
13956
  getColumnState: re,
13950
13957
  updateColumnState: X,
@@ -13981,10 +13988,10 @@ const bc = ({
13981
13988
  results: Z
13982
13989
  }), q = te(() => N ? N.map((Se) => ({
13983
13990
  ...Se,
13984
- render: (G, me) => /* @__PURE__ */ s(
13991
+ render: (Y, me) => /* @__PURE__ */ s(
13985
13992
  oo,
13986
13993
  {
13987
- value: G,
13994
+ value: Y,
13988
13995
  record: me,
13989
13996
  column: Se,
13990
13997
  isFieldLoading: ae
@@ -13993,25 +14000,25 @@ const bc = ({
13993
14000
  })) : [], [N, ae]), ee = D(
13994
14001
  async ({
13995
14002
  startRow: Se,
13996
- endRow: Ne,
13997
- state: G
14003
+ endRow: Ve,
14004
+ state: Y
13998
14005
  }) => {
13999
- const me = Bn({ state: G }), { results: ce, colors: we, status: oe } = await c({
14006
+ const me = Bn({ state: Y }), { results: ce, colors: we, status: oe } = await c({
14000
14007
  allItems: M.current,
14001
14008
  startRow: Se,
14002
- endRow: Ne,
14009
+ endRow: Ve,
14003
14010
  sortFields: me
14004
14011
  });
14005
14012
  if (we && (U.current = { ...U.current, ...we }), oe && (W.current || (W.current = {}), W.current = { ...W.current, ...oe }), we || oe) {
14006
- const dt = ce.map((mt) => ({
14013
+ const lt = ce.map((mt) => ({
14007
14014
  id: mt.id,
14008
14015
  colors: we == null ? void 0 : we[mt.id],
14009
14016
  status: oe == null ? void 0 : oe[mt.id]
14010
14017
  }));
14011
- B(dt, o);
14018
+ B(lt, o);
14012
14019
  }
14013
- const Ee = ce.map((dt) => dt.id).filter(Boolean);
14014
- return Ee.length > 0 && fe(Ee), ce;
14020
+ const Oe = ce.map((lt) => lt.id).filter(Boolean);
14021
+ return Oe.length > 0 && fe(Oe), ce;
14015
14022
  },
14016
14023
  [
14017
14024
  U,
@@ -14021,29 +14028,29 @@ const bc = ({
14021
14028
  fe,
14022
14029
  B
14023
14030
  ]
14024
- ), z = D(async () => {
14031
+ ), G = D(async () => {
14025
14032
  if (y !== "paginated" || t.length === 0)
14026
14033
  return $(!1), [];
14027
14034
  $(!0);
14028
14035
  try {
14029
14036
  const Se = Bn({
14030
14037
  state: O.current
14031
- }), { results: Ne, colors: G, status: me } = await c({
14038
+ }), { results: Ve, colors: Y, status: me } = await c({
14032
14039
  allItems: t,
14033
14040
  startRow: 0,
14034
14041
  endRow: t.length,
14035
14042
  sortFields: Se
14036
14043
  });
14037
- if (G && (U.current = { ...U.current, ...G }), me && (W.current || (W.current = {}), W.current = { ...W.current, ...me }), G || me) {
14038
- const we = Ne.map((oe) => ({
14044
+ if (Y && (U.current = { ...U.current, ...Y }), me && (W.current || (W.current = {}), W.current = { ...W.current, ...me }), Y || me) {
14045
+ const we = Ve.map((oe) => ({
14039
14046
  id: oe.id,
14040
- colors: G == null ? void 0 : G[oe.id],
14047
+ colors: Y == null ? void 0 : Y[oe.id],
14041
14048
  status: me == null ? void 0 : me[oe.id]
14042
14049
  }));
14043
14050
  B(we, o);
14044
14051
  }
14045
- const ce = Ne.map((we) => we.id).filter(Boolean);
14046
- return ce.length > 0 && fe(ce), Ne;
14052
+ const ce = Ve.map((we) => we.id).filter(Boolean);
14053
+ return ce.length > 0 && fe(ce), Ve;
14047
14054
  } finally {
14048
14055
  $(!1);
14049
14056
  }
@@ -14058,12 +14065,12 @@ const bc = ({
14058
14065
  B
14059
14066
  ]);
14060
14067
  Xe(() => {
14061
- var Se, Ne;
14068
+ var Se, Ve;
14062
14069
  if (M.current = t, w.current === void 0) {
14063
14070
  w.current = t;
14064
14071
  return;
14065
14072
  }
14066
- w.current = t, se(), y === "paginated" ? (x((G) => G + 1), t.length > 0 ? z().then(R) : (R([]), $(!1))) : (Se = S == null ? void 0 : S.current) == null || Se.refresh(), (Ne = S == null ? void 0 : S.current) == null || Ne.unselectAll();
14073
+ w.current = t, se(), y === "paginated" ? (x((Y) => Y + 1), t.length > 0 ? G().then(R) : (R([]), $(!1))) : (Se = S == null ? void 0 : S.current) == null || Se.refresh(), (Ve = S == null ? void 0 : S.current) == null || Ve.unselectAll();
14067
14074
  }, [t, y]);
14068
14075
  const he = D(() => {
14069
14076
  if (f) {
@@ -14076,19 +14083,19 @@ const bc = ({
14076
14083
  [m]
14077
14084
  ), ve = D(() => {
14078
14085
  var Se;
14079
- se(), y === "paginated" ? x((Ne) => Ne + 1) : (Se = S == null ? void 0 : S.current) == null || Se.refresh();
14086
+ se(), y === "paginated" ? x((Ve) => Ve + 1) : (Se = S == null ? void 0 : S.current) == null || Se.refresh();
14080
14087
  }, [se, y, S]), Ce = Vt(E), Ie = Vt(
14081
14088
  P
14082
- ), Te = Vt(X), be = Vt(re), He = Vt(le), Qe = Vt(J), Re = D(
14089
+ ), Te = Vt(X), be = Vt(re), ke = Vt(le), Qe = Vt(J), Re = D(
14083
14090
  (Se) => {
14084
14091
  Se.selected ? l([...h, Se.id]) : l(
14085
- h.filter((Ne) => Ne !== Se.id)
14092
+ h.filter((Ve) => Ve !== Se.id)
14086
14093
  );
14087
14094
  },
14088
14095
  [h, l]
14089
14096
  ), Be = te(() => h.length === 0 ? "unchecked" : h.length === Z.length ? "checked" : "indeterminate", [h, Z.length]), Ae = Vt((Se) => {
14090
- O.current = Se, E(0), P(void 0), y === "paginated" && t.length > 0 && z().then(R);
14091
- }), Ye = Vt(z);
14097
+ O.current = Se, E(0), P(void 0), y === "paginated" && t.length > 0 && G().then(R);
14098
+ }), Ye = Vt(G);
14092
14099
  Xe(() => {
14093
14100
  y === "paginated" && t.length > 0 && Ye().then(R);
14094
14101
  }, [y]);
@@ -14096,23 +14103,23 @@ const bc = ({
14096
14103
  async (Se) => {
14097
14104
  if (!(i != null && i.field_parent))
14098
14105
  return [];
14099
- const Ne = Se[i.field_parent];
14100
- if (!Ne || Ne.length === 0)
14106
+ const Ve = Se[i.field_parent];
14107
+ if (!Ve || Ve.length === 0)
14101
14108
  return [];
14102
14109
  try {
14103
- const G = i.field_parent ? { ...i.fields, [i.field_parent]: {} } : i.fields, me = await V.getHandler().readObjects({
14110
+ const Y = i.field_parent ? { ...i.fields, [i.field_parent]: {} } : i.fields, me = await V.getHandler().readObjects({
14104
14111
  model: p,
14105
- ids: Ne,
14106
- fields: G,
14112
+ ids: Ve,
14113
+ fields: Y,
14107
14114
  context: a
14108
14115
  });
14109
14116
  return await Xt(o, me, a);
14110
- } catch (G) {
14111
- return console.error("Error fetching children:", G), [];
14117
+ } catch (Y) {
14118
+ return console.error("Error fetching children:", Y), [];
14112
14119
  }
14113
14120
  },
14114
14121
  [i, o, p, a]
14115
- ), Ge = te(() => i != null && i.field_parent ? ze : void 0, [i == null ? void 0 : i.field_parent, ze]), ke = D(
14122
+ ), Ge = te(() => i != null && i.field_parent ? ze : void 0, [i == null ? void 0 : i.field_parent, ze]), Ne = D(
14116
14123
  (Se) => {
14117
14124
  n == null || n(Se);
14118
14125
  },
@@ -14129,7 +14136,7 @@ const bc = ({
14129
14136
  strings: H,
14130
14137
  isLoading: k,
14131
14138
  results: $e,
14132
- handleRowDoubleClick: ke,
14139
+ handleRowDoubleClick: Ne,
14133
14140
  onRowHasBeenSelected: Re,
14134
14141
  updateColumnState: Te,
14135
14142
  getColumnState: be,
@@ -14138,8 +14145,8 @@ const bc = ({
14138
14145
  onGetFirstVisibleColumn: qe,
14139
14146
  setTreeFirstVisibleColumn: Ie,
14140
14147
  footerComp: ue,
14141
- statusComp: Y,
14142
- onRowStatus: He,
14148
+ statusComp: z,
14149
+ onRowStatus: ke,
14143
14150
  headerCheckboxState: Be,
14144
14151
  onHeaderCheckboxClick: Fe,
14145
14152
  refresh: ve,
@@ -14171,21 +14178,21 @@ const bc = ({
14171
14178
  footer: ue,
14172
14179
  isLoading: !1,
14173
14180
  hasStatusColumn: o.status !== null,
14174
- statusComponent: Y,
14181
+ statusComponent: z,
14175
14182
  onRowStatus: le,
14176
14183
  strings: H,
14177
14184
  onChangeTableType: b
14178
14185
  }
14179
14186
  );
14180
14187
  }, Ly = ["form", "tree", "graph"], Hy = (t) => {
14181
- var be, He, Qe;
14188
+ var be, ke, Qe;
14182
14189
  const e = K(null), { value: n, onChange: r, ooui: o, views: i, treeType: a } = t, { items: c = [] } = n || {}, l = yc({ one2manyItems: c }), { currentView: d, setCurrentView: p, itemIndex: u, setItemIndex: f, setTreeType: m } = pe(fn), {
14183
14190
  readOnly: g,
14184
14191
  relation: h,
14185
14192
  context: v,
14186
14193
  domain: y,
14187
14194
  id: b
14188
- } = o, C = pe(Ze), {
14195
+ } = o, C = pe(et), {
14189
14196
  activeId: S,
14190
14197
  getContext: w,
14191
14198
  fetchValues: M
@@ -14221,7 +14228,7 @@ const bc = ({
14221
14228
  ), {
14222
14229
  formHasChanges: W,
14223
14230
  onFormChanges: J,
14224
- showFormChangesDialogIfNeeded: Y,
14231
+ showFormChangesDialogIfNeeded: z,
14225
14232
  setFormHasChanges: le
14226
14233
  } = gc({
14227
14234
  items: l,
@@ -14241,7 +14248,7 @@ const bc = ({
14241
14248
  } = bc({
14242
14249
  activeId: S,
14243
14250
  inv_field: o.inv_field,
14244
- showFormChangesDialogIfNeeded: Y,
14251
+ showFormChangesDialogIfNeeded: z,
14245
14252
  currentView: d,
14246
14253
  triggerChange: U,
14247
14254
  items: l,
@@ -14256,14 +14263,14 @@ const bc = ({
14256
14263
  onCloseSearchModal: q,
14257
14264
  searchItem: ee
14258
14265
  } = wc({
14259
- showFormChangesDialogIfNeeded: Y,
14266
+ showFormChangesDialogIfNeeded: z,
14260
14267
  currentView: d,
14261
14268
  triggerChange: U,
14262
14269
  items: l,
14263
14270
  views: i,
14264
14271
  context: P,
14265
14272
  relation: h
14266
- }), { showRemoveConfirm: z } = vc({
14273
+ }), { showRemoveConfirm: G } = vc({
14267
14274
  isMany2many: H,
14268
14275
  items: l,
14269
14276
  triggerChange: U,
@@ -14272,10 +14279,10 @@ const bc = ({
14272
14279
  setSelectedRowKeys: R
14273
14280
  }), he = () => {
14274
14281
  const Re = Array.from(i.keys()), Be = Re[(Re.indexOf(d) + 1) % Re.length];
14275
- d === "form" ? Y(() => {
14282
+ d === "form" ? z(() => {
14276
14283
  p(Be);
14277
14284
  }) : p(Be);
14278
- }, qe = Ct(
14285
+ }, qe = Tt(
14279
14286
  (Re) => {
14280
14287
  var Be;
14281
14288
  (Be = i.get("form")) != null && Be.fields && Z(Re);
@@ -14283,12 +14290,12 @@ const bc = ({
14283
14290
  // eslint-disable-next-line react-hooks/exhaustive-deps
14284
14291
  [l]
14285
14292
  ), Fe = D(() => {
14286
- u > 0 && (d === "form" ? Y(() => {
14293
+ u > 0 && (d === "form" ? z(() => {
14287
14294
  f(u - 1);
14288
14295
  }) : f(u - 1));
14289
- }, [d, u, f, Y]), ve = D(() => {
14296
+ }, [d, u, f, z]), ve = D(() => {
14290
14297
  const Re = l.length;
14291
- u < Re - 1 && (d === "form" ? Y(() => {
14298
+ u < Re - 1 && (d === "form" ? z(() => {
14292
14299
  f(u + 1);
14293
14300
  }) : f(u + 1));
14294
14301
  }, [
@@ -14296,7 +14303,7 @@ const bc = ({
14296
14303
  u,
14297
14304
  l.length,
14298
14305
  f,
14299
- Y
14306
+ z
14300
14307
  ]), Ce = te(() => {
14301
14308
  var Re;
14302
14309
  return ((Re = i.get("form")) == null ? void 0 : Re.fields) !== void 0;
@@ -14314,14 +14321,14 @@ const bc = ({
14314
14321
  {
14315
14322
  mode: d,
14316
14323
  title: N,
14317
- currentId: (He = l[u]) == null ? void 0 : He.id,
14324
+ currentId: (ke = l[u]) == null ? void 0 : ke.id,
14318
14325
  model: h,
14319
14326
  readOnly: g || !1,
14320
14327
  isMany2Many: H,
14321
14328
  formHasChanges: W,
14322
14329
  totalItems: l.length,
14323
14330
  currentItemIndex: u,
14324
- onDelete: z,
14331
+ onDelete: G,
14325
14332
  onCreateItem: ue,
14326
14333
  onToggleViewMode: he,
14327
14334
  onPreviousItem: Fe,
@@ -14442,7 +14449,7 @@ const bc = ({
14442
14449
  c.current = m;
14443
14450
  }, []), p = D(() => c.current, []), u = te(() => Jt(t), [t]);
14444
14451
  return {
14445
- onTreeFetchRows: Ct(
14452
+ onTreeFetchRows: Tt(
14446
14453
  async ({
14447
14454
  allItems: m,
14448
14455
  startRow: g,
@@ -14505,7 +14512,7 @@ const bc = ({
14505
14512
  showPointerCursorInRows: v = !0
14506
14513
  }) => {
14507
14514
  const y = K(), b = l || y, C = K({}), S = K(), w = K(), M = K(t), { t: F } = xe(), E = on(
14508
- Pt.FEATURE_MANY2ONE_SORT
14515
+ Mt.FEATURE_MANY2ONE_SORT
14509
14516
  );
14510
14517
  Xe(() => {
14511
14518
  var k, $;
@@ -14603,7 +14610,7 @@ const bc = ({
14603
14610
  context: g,
14604
14611
  domain: h,
14605
14612
  id: v
14606
- } = o, y = pe(Ze), {
14613
+ } = o, y = pe(et), {
14607
14614
  activeId: b,
14608
14615
  getContext: C,
14609
14616
  fetchValues: S
@@ -14634,9 +14641,9 @@ const bc = ({
14634
14641
  return be || o.label;
14635
14642
  }, [l, o.label, i]), N = o.type === "many2many", H = D(
14636
14643
  (be) => {
14637
- var He, Qe;
14644
+ var ke, Qe;
14638
14645
  r == null || r({
14639
- fields: ((He = i.get("form")) == null ? void 0 : He.fields) || ((Qe = i.get("tree")) == null ? void 0 : Qe.fields),
14646
+ fields: ((ke = i.get("form")) == null ? void 0 : ke.fields) || ((Qe = i.get("tree")) == null ? void 0 : Qe.fields),
14640
14647
  items: be
14641
14648
  });
14642
14649
  },
@@ -14645,7 +14652,7 @@ const bc = ({
14645
14652
  formHasChanges: U,
14646
14653
  onFormChanges: W,
14647
14654
  showFormChangesDialogIfNeeded: J,
14648
- setFormHasChanges: Y
14655
+ setFormHasChanges: z
14649
14656
  } = gc({
14650
14657
  items: c,
14651
14658
  formView: i.get("form"),
@@ -14690,18 +14697,18 @@ const bc = ({
14690
14697
  isMany2many: N,
14691
14698
  items: c,
14692
14699
  triggerChange: H,
14693
- setFormHasChanges: Y,
14700
+ setFormHasChanges: z,
14694
14701
  selectedRowKeys: x,
14695
14702
  setSelectedRowKeys: O
14696
- }), z = () => {
14697
- const be = Array.from(i.keys()), He = be[(be.indexOf(l) + 1) % be.length];
14703
+ }), G = () => {
14704
+ const be = Array.from(i.keys()), ke = be[(be.indexOf(l) + 1) % be.length];
14698
14705
  l === "form" ? J(() => {
14699
- d(He);
14700
- }) : d(He);
14701
- }, he = Ct(
14706
+ d(ke);
14707
+ }) : d(ke);
14708
+ }, he = Tt(
14702
14709
  (be) => {
14703
- var He;
14704
- (He = i.get("form")) != null && He.fields && ue(be);
14710
+ var ke;
14711
+ (ke = i.get("form")) != null && ke.fields && ue(be);
14705
14712
  },
14706
14713
  // eslint-disable-next-line react-hooks/exhaustive-deps
14707
14714
  [c]
@@ -14739,7 +14746,7 @@ const bc = ({
14739
14746
  currentItemIndex: p,
14740
14747
  onDelete: ee,
14741
14748
  onCreateItem: se,
14742
- onToggleViewMode: z,
14749
+ onToggleViewMode: G,
14743
14750
  onPreviousItem: qe,
14744
14751
  onNextItem: Fe,
14745
14752
  onSearchItem: q,
@@ -14845,12 +14852,12 @@ const bc = ({
14845
14852
  var F;
14846
14853
  const { ooui: e } = t, { mode: n, relation: r, views: o, required: i, context: a } = e;
14847
14854
  let c;
14848
- const [l, d] = I(!0), [p, u] = I(), [f, m] = I(/* @__PURE__ */ new Map()), g = pe(Ze), { getContext: h, formView: v, refreshCounter: y } = g || {}, { view_id: b } = v || {};
14855
+ const [l, d] = I(!0), [p, u] = I(), [f, m] = I(/* @__PURE__ */ new Map()), g = pe(et), { getContext: h, formView: v, refreshCounter: y } = g || {}, { view_id: b } = v || {};
14849
14856
  Xe(() => {
14850
14857
  w();
14851
14858
  }, [e]);
14852
14859
  const C = on(
14853
- Pt.FEATURE_GET_TOOLBAR
14860
+ Mt.FEATURE_GET_TOOLBAR
14854
14861
  ), S = async (E) => {
14855
14862
  if (o && o[E]) {
14856
14863
  const A = o[E];
@@ -14964,7 +14971,7 @@ const bc = ({
14964
14971
  const { ooui: e } = t, { required: n } = e;
14965
14972
  return /* @__PURE__ */ s(We, { required: n, type: "number", ...t, children: /* @__PURE__ */ s(Xy, { ooui: e }) });
14966
14973
  }, Xy = (t) => {
14967
- const { ooui: e, value: n, onChange: r } = t, { id: o, readOnly: i, required: a } = e, { token: c } = Jy(), l = a && !i ? { backgroundColor: c.colorPrimaryBg } : void 0, d = K(), [p, u] = I(), f = pe(Ze), { elementHasLostFocus: m } = f || {};
14974
+ const { ooui: e, value: n, onChange: r } = t, { id: o, readOnly: i, required: a } = e, { token: c } = Jy(), l = a && !i ? { backgroundColor: c.colorPrimaryBg } : void 0, d = K(), [p, u] = I(), f = pe(et), { elementHasLostFocus: m } = f || {};
14968
14975
  de(() => {
14969
14976
  u(cl(n));
14970
14977
  }, [n]);
@@ -14978,7 +14985,7 @@ const bc = ({
14978
14985
  g(ep(p)), await new Promise((y) => setTimeout(y, 300)), m == null || m();
14979
14986
  }
14980
14987
  return /* @__PURE__ */ s(
14981
- St,
14988
+ xt,
14982
14989
  {
14983
14990
  value: p,
14984
14991
  disabled: i,
@@ -15001,7 +15008,7 @@ const bc = ({
15001
15008
  ) });
15002
15009
  };
15003
15010
  function xc(t) {
15004
- const { ooui: e, showLabel: n = !0, responsiveBehaviour: r } = t, o = Dt(e.icon || ""), { t: i } = xe(), a = e.backgroundColor, c = a ? Ud(a).darken(30).toString() : void 0, l = (e.label || o) && n;
15011
+ const { ooui: e, showLabel: n = !0, responsiveBehaviour: r } = t, o = Pt(e.icon || ""), { t: i } = xe(), a = e.backgroundColor, c = a ? Ud(a).darken(30).toString() : void 0, l = (e.label || o) && n;
15005
15012
  return /* @__PURE__ */ s(
15006
15013
  "div",
15007
15014
  {
@@ -15038,7 +15045,7 @@ function xc(t) {
15038
15045
  }
15039
15046
  );
15040
15047
  }
15041
- const { TabPane: Qy } = ea, Zy = Ft(ea)`
15048
+ const { TabPane: Qy } = ea, Zy = It(ea)`
15042
15049
  .ant-tabs-content-holder {
15043
15050
  border-left: 1px solid rgba(228, 228, 231, var(--tw-border-opacity));
15044
15051
  border-right: 1px solid rgba(228, 228, 231, var(--tw-border-opacity));
@@ -15062,7 +15069,7 @@ function ev(t) {
15062
15069
  const { ooui: e, responsiveBehaviour: n } = t, r = e.pages, { token: o } = rt.useToken();
15063
15070
  function i(a) {
15064
15071
  if (a) {
15065
- const c = Dt(a);
15072
+ const c = Pt(a);
15066
15073
  return c && /* @__PURE__ */ s(c, {});
15067
15074
  }
15068
15075
  }
@@ -15094,8 +15101,8 @@ function ev(t) {
15094
15101
  }
15095
15102
  );
15096
15103
  }
15097
- const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15098
- const { ooui: e } = t, { id: n, readOnly: r, required: o, height: i, translatable: a } = e, { token: c } = tv(), l = o && !r ? { backgroundColor: c.colorPrimaryBg } : void 0, d = pe(Ze), { elementHasLostFocus: p } = d || {};
15104
+ const { useToken: tv } = rt, { TextArea: Uo } = xt, nv = (t) => {
15105
+ const { ooui: e } = t, { id: n, readOnly: r, required: o, height: i, translatable: a } = e, { token: c } = tv(), l = o && !r ? { backgroundColor: c.colorPrimaryBg } : void 0, d = pe(et), { elementHasLostFocus: p } = d || {};
15099
15106
  return /* @__PURE__ */ s(We, { required: o, ...t, children: a ? /* @__PURE__ */ s(
15100
15107
  rv,
15101
15108
  {
@@ -15124,7 +15131,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15124
15131
  onChange: r,
15125
15132
  height: o
15126
15133
  }) => {
15127
- const i = pe(Ze), {
15134
+ const i = pe(et), {
15128
15135
  activeId: a,
15129
15136
  activeModel: c,
15130
15137
  fetchValues: l,
@@ -15196,7 +15203,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15196
15203
  }
15197
15204
  ) }),
15198
15205
  /* @__PURE__ */ s(Ke, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ s(
15199
- wt,
15206
+ St,
15200
15207
  {
15201
15208
  tooltip: m("translate"),
15202
15209
  icon: /* @__PURE__ */ s(la, {}),
@@ -15208,8 +15215,8 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15208
15215
  ) })
15209
15216
  ] });
15210
15217
  }, ov = (t) => {
15211
- const { ooui: e } = t, { label: n, icon: r } = e, o = Dt(r || "");
15212
- return /* @__PURE__ */ s(Nr, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ L(ct, { children: [
15218
+ const { ooui: e } = t, { label: n, icon: r } = e, o = Pt(r || "");
15219
+ return /* @__PURE__ */ s(Nr, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ L(dt, { children: [
15213
15220
  o ? /* @__PURE__ */ s(o, {}) : null,
15214
15221
  n
15215
15222
  ] }) });
@@ -15522,7 +15529,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15522
15529
  t.onChange && t.onChange(o);
15523
15530
  },
15524
15531
  numberOfSelectsToHide: 3,
15525
- value: t.value ? lt(t.value, "HH:mm:ss") : void 0,
15532
+ value: t.value ? ct(t.value, "HH:mm:ss") : void 0,
15526
15533
  disabled: e
15527
15534
  }
15528
15535
  );
@@ -15581,7 +15588,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15581
15588
  const { ooui: e } = t, { required: n } = e;
15582
15589
  return /* @__PURE__ */ s(We, { required: n, ...t, children: /* @__PURE__ */ s(Cv, { ooui: e }) });
15583
15590
  }, Cv = (t) => {
15584
- const { ooui: e, value: n, onChange: r } = t, { readOnly: o, required: i, filenameField: a } = e, { token: c } = Sv(), l = i && !o ? { backgroundColor: c.colorPrimaryBg } : void 0, d = K(null), { setFieldValue: p, getFieldValue: u } = pe(Ze) || {}, { t: f } = xe(), m = n ? Du(n) : "", g = (C) => {
15591
+ const { ooui: e, value: n, onChange: r } = t, { readOnly: o, required: i, filenameField: a } = e, { token: c } = Sv(), l = i && !o ? { backgroundColor: c.colorPrimaryBg } : void 0, d = K(null), { setFieldValue: p, getFieldValue: u } = pe(et) || {}, { t: f } = xe(), m = n ? Du(n) : "", g = (C) => {
15585
15592
  r == null || r(C);
15586
15593
  };
15587
15594
  async function h() {
@@ -15613,7 +15620,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15613
15620
  }
15614
15621
  ),
15615
15622
  /* @__PURE__ */ s(
15616
- St,
15623
+ xt,
15617
15624
  {
15618
15625
  type: "text",
15619
15626
  disabled: !0,
@@ -15622,7 +15629,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15622
15629
  }
15623
15630
  )
15624
15631
  ] }),
15625
- /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ L(ct, { children: [
15632
+ /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ L(dt, { children: [
15626
15633
  /* @__PURE__ */ s(
15627
15634
  Je,
15628
15635
  {
@@ -15636,7 +15643,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15636
15643
  ),
15637
15644
  /* @__PURE__ */ s(Je, { icon: /* @__PURE__ */ s(sd, {}), disabled: !n, onClick: v, children: f("open") }),
15638
15645
  /* @__PURE__ */ s(
15639
- wt,
15646
+ St,
15640
15647
  {
15641
15648
  tooltip: f("download"),
15642
15649
  disabled: !n,
@@ -15645,7 +15652,7 @@ const { useToken: tv } = rt, { TextArea: Uo } = St, nv = (t) => {
15645
15652
  }
15646
15653
  ),
15647
15654
  /* @__PURE__ */ s(
15648
- wt,
15655
+ St,
15649
15656
  {
15650
15657
  tooltip: f("clear"),
15651
15658
  disabled: o || !n,
@@ -15998,7 +16005,7 @@ function Av({ toolbar: t }) {
15998
16005
  b,
15999
16006
  M,
16000
16007
  i
16001
- ]), Y = D(async () => {
16008
+ ]), z = D(async () => {
16002
16009
  try {
16003
16010
  w == null || w(!0);
16004
16011
  const B = await V.getHandler().duplicate({
@@ -16085,7 +16092,7 @@ function Av({ toolbar: t }) {
16085
16092
  l,
16086
16093
  A
16087
16094
  ]
16088
- ), c ? /* @__PURE__ */ L(ct, { wrap: !0, children: [
16095
+ ), c ? /* @__PURE__ */ L(dt, { wrap: !0, children: [
16089
16096
  F && /* @__PURE__ */ L(ge, { children: [
16090
16097
  /* @__PURE__ */ s(nt, {}),
16091
16098
  /* @__PURE__ */ s(gt, {}),
@@ -16112,7 +16119,7 @@ function Av({ toolbar: t }) {
16112
16119
  onClick: () => tn({
16113
16120
  confirmMessage: n("confirmDuplicate"),
16114
16121
  t: n,
16115
- onOk: Y
16122
+ onOk: z
16116
16123
  })
16117
16124
  }
16118
16125
  ),
@@ -16197,7 +16204,7 @@ const Rv = ot(Av), Fc = ot(
16197
16204
  tryAction: r
16198
16205
  }) => {
16199
16206
  const { t: o } = xe();
16200
- return /* @__PURE__ */ L(ct, { children: [
16207
+ return /* @__PURE__ */ L(dt, { children: [
16201
16208
  /* @__PURE__ */ s(
16202
16209
  Rt,
16203
16210
  {
@@ -16229,7 +16236,7 @@ const qi = (t, e) => ({
16229
16236
  values: { selection_associated_object: `${t},${e}` },
16230
16237
  forced_values: { res_model: t, res_id: e }
16231
16238
  }), { useToken: _v } = rt, Ic = (t) => {
16232
- const { ooui: e, value: n, onChange: r, valueValidator: o, linkPrefix: i = "" } = t, { id: a, readOnly: c, required: l } = e, { token: d } = _v(), p = l && !c ? { backgroundColor: d.colorPrimaryBg } : void 0, u = pe(Ze), { elementHasLostFocus: f } = u || {}, [m, g] = I(!1), [h, v] = I(!1);
16239
+ const { ooui: e, value: n, onChange: r, valueValidator: o, linkPrefix: i = "" } = t, { id: a, readOnly: c, required: l } = e, { token: d } = _v(), p = l && !c ? { backgroundColor: d.colorPrimaryBg } : void 0, u = pe(et), { elementHasLostFocus: f } = u || {}, [m, g] = I(!1), [h, v] = I(!1);
16233
16240
  de(() => {
16234
16241
  c && !m && v(!1), !n && !c && (g(!0), v(!0));
16235
16242
  }, [m, c]);
@@ -16259,7 +16266,7 @@ const qi = (t, e) => ({
16259
16266
  }
16260
16267
  ) }),
16261
16268
  /* @__PURE__ */ s(Pe, { flex: "auto", style: { paddingLeft: 0 }, children: h ? /* @__PURE__ */ s(
16262
- St,
16269
+ xt,
16263
16270
  {
16264
16271
  style: {
16265
16272
  borderTopLeftRadius: 0,
@@ -16324,9 +16331,9 @@ const qi = (t, e) => ({
16324
16331
  var p;
16325
16332
  return d && ((p = a.current) == null ? void 0 : p.focus());
16326
16333
  },
16327
- children: /* @__PURE__ */ L(Mt, { layout: "vertical", onFinish: l, autoComplete: "off", children: [
16334
+ children: /* @__PURE__ */ L($t, { layout: "vertical", onFinish: l, autoComplete: "off", children: [
16328
16335
  /* @__PURE__ */ s(
16329
- Mt.Item,
16336
+ $t.Item,
16330
16337
  {
16331
16338
  name: "id",
16332
16339
  label: i("searchId"),
@@ -16336,10 +16343,10 @@ const qi = (t, e) => ({
16336
16343
  }
16337
16344
  ],
16338
16345
  help: i("searchIdHelp"),
16339
- children: /* @__PURE__ */ s(St, { style: { width: "100%" }, autoFocus: !0, ref: a })
16346
+ children: /* @__PURE__ */ s(xt, { style: { width: "100%" }, autoFocus: !0, ref: a })
16340
16347
  }
16341
16348
  ),
16342
- /* @__PURE__ */ s(Ke, { align: "middle", justify: "end", children: /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ L(ct, { children: [
16349
+ /* @__PURE__ */ s(Ke, { align: "middle", justify: "end", children: /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ L(dt, { children: [
16343
16350
  /* @__PURE__ */ s(
16344
16351
  Je,
16345
16352
  {
@@ -16398,7 +16405,7 @@ function Pv({ refreshGraph: t }) {
16398
16405
  previousView: d,
16399
16406
  setPreviousView: p
16400
16407
  } = pe(Ot);
16401
- return /* @__PURE__ */ L(ct, { wrap: !0, children: [
16408
+ return /* @__PURE__ */ L(dt, { wrap: !0, children: [
16402
16409
  /* @__PURE__ */ s(
16403
16410
  el,
16404
16411
  {
@@ -16456,7 +16463,7 @@ const Mv = (t) => {
16456
16463
  treeView: c,
16457
16464
  graphView: l
16458
16465
  } = t, d = K(), p = on(
16459
- Pt.FEATURE_READFORVIEW
16466
+ Mt.FEATURE_READFORVIEW
16460
16467
  ), u = pe(
16461
16468
  Ot
16462
16469
  ), {
@@ -16488,7 +16495,7 @@ const Mv = (t) => {
16488
16495
  const J = en(
16489
16496
  () => nn(_ || [], i),
16490
16497
  [i, _]
16491
- ), Y = Ct(async () => {
16498
+ ), z = Tt(async () => {
16492
16499
  if (!n)
16493
16500
  return;
16494
16501
  const fe = await V.getHandler().searchAllIds({
@@ -16506,17 +16513,17 @@ const Mv = (t) => {
16506
16513
  r,
16507
16514
  o,
16508
16515
  R
16509
- ]), le = Ct(async () => {
16516
+ ]), le = Tt(async () => {
16510
16517
  if (n) {
16511
16518
  if (H(!0), R === void 0 || (h == null ? void 0 : h.length) !== R && R !== void 0)
16512
- await Y();
16519
+ await z();
16513
16520
  else {
16514
16521
  const fe = $ && h && h.length > 0 ? h.map((q) => q.id) : void 0;
16515
16522
  W(fe);
16516
16523
  }
16517
16524
  H(!1);
16518
16525
  }
16519
- }, [n, R, h, Y, $]);
16526
+ }, [n, R, h, z, $]);
16520
16527
  Xe(() => {
16521
16528
  le();
16522
16529
  }, [
@@ -16668,7 +16675,7 @@ const Mv = (t) => {
16668
16675
  };
16669
16676
  function Nv() {
16670
16677
  const { isLoading: t, dashboardRef: e, moveItemsEnabled: n, setMoveItemsEnabled: r } = pe($s), { permissions: o } = pn(), { t: i } = xe();
16671
- return /* @__PURE__ */ L(ct, { wrap: !0, children: [
16678
+ return /* @__PURE__ */ L(dt, { wrap: !0, children: [
16672
16679
  (o == null ? void 0 : o.write) && /* @__PURE__ */ s(
16673
16680
  Rt,
16674
16681
  {
@@ -16812,7 +16819,7 @@ function jv(t, e) {
16812
16819
  order: C
16813
16820
  } = t, [S, w] = I(), [M, F] = I([]), [E, A] = I(!0), P = f || void 0, [_, x] = I(
16814
16821
  P
16815
- ), [O, T] = I([]), [R, k] = I(), [$, j] = I([]), [N, H] = I(), [U, W] = I(), [J, Y] = I(!1), [le, re] = I(!1), [X, ie] = I(), { t: B } = xe(), { showErrorNotification: se } = yt(), {
16822
+ ), [O, T] = I([]), [R, k] = I(), [$, j] = I([]), [N, H] = I(), [U, W] = I(), [J, z] = I(!1), [le, re] = I(!1), [X, ie] = I(), { t: B } = xe(), { showErrorNotification: se } = yt(), {
16816
16823
  permissions: ue,
16817
16824
  loading: Z,
16818
16825
  error: ae
@@ -16823,7 +16830,7 @@ function jv(t, e) {
16823
16830
  }), fe = K(), q = K(), ee = pe(
16824
16831
  Ht
16825
16832
  ), {
16826
- setCurrentView: z,
16833
+ setCurrentView: G,
16827
16834
  setCurrentId: he,
16828
16835
  tabs: qe,
16829
16836
  activeKey: Fe,
@@ -16843,24 +16850,24 @@ function jv(t, e) {
16843
16850
  }
16844
16851
  const Te = D(
16845
16852
  (Ae) => {
16846
- w(Ae), z == null || z(Ae);
16853
+ w(Ae), G == null || G(Ae);
16847
16854
  },
16848
- [z]
16855
+ [G]
16849
16856
  );
16850
16857
  Lt(e, () => ({
16851
- canWeClose: He
16858
+ canWeClose: ke
16852
16859
  }));
16853
16860
  const be = D(async () => {
16854
16861
  A(!0);
16855
16862
  const Ae = [], Ye = [];
16856
16863
  for (const Ge of i) {
16857
- const [ke, Se] = Ge;
16864
+ const [Ne, Se] = Ge;
16858
16865
  Se !== "dashboard" ? Ye.push({
16859
16866
  viewTuple: Ge,
16860
16867
  promise: V.getHandler().getView({
16861
16868
  model: r,
16862
16869
  type: Se,
16863
- id: ke,
16870
+ id: Ne,
16864
16871
  context: o
16865
16872
  })
16866
16873
  }) : Ye.push({
@@ -16871,28 +16878,28 @@ function jv(t, e) {
16871
16878
  for (const Ge of $e) {
16872
16879
  if (!Ge)
16873
16880
  continue;
16874
- const [, ke] = Ge.viewTuple, Se = Ge.info;
16875
- switch (ke) {
16881
+ const [, Ne] = Ge.viewTuple, Se = Ge.info;
16882
+ switch (Ne) {
16876
16883
  case "dashboard": {
16877
- const Ne = i.find((me) => {
16884
+ const Ve = i.find((me) => {
16878
16885
  const [, ce] = me;
16879
16886
  return ce === "form";
16880
16887
  });
16881
- let G;
16882
- Ne && (G = {
16888
+ let Y;
16889
+ Ve && (Y = {
16883
16890
  action_id: m,
16884
16891
  action_type: g,
16885
16892
  name: a,
16886
16893
  res_id: o.active_id,
16887
16894
  res_model: r,
16888
- view_id: Ne[0],
16889
- view_type: Ne[1]
16895
+ view_id: Ve[0],
16896
+ view_type: Ve[1]
16890
16897
  }), Ae.push({
16891
16898
  type: "dashboard",
16892
16899
  id: o.active_id,
16893
16900
  model: r,
16894
16901
  context: o,
16895
- configAction: G,
16902
+ configAction: Y,
16896
16903
  extra: { action_id: m, action_type: g }
16897
16904
  });
16898
16905
  break;
@@ -16900,7 +16907,7 @@ function jv(t, e) {
16900
16907
  case "form": {
16901
16908
  Ae.push({
16902
16909
  ...Se,
16903
- type: ke,
16910
+ type: Ne,
16904
16911
  extra: { action_id: m, action_type: g }
16905
16912
  });
16906
16913
  break;
@@ -16909,7 +16916,7 @@ function jv(t, e) {
16909
16916
  Ae.push({
16910
16917
  ...Se,
16911
16918
  isExpandable: h,
16912
- type: ke,
16919
+ type: Ne,
16913
16920
  extra: { action_id: m, action_type: g }
16914
16921
  });
16915
16922
  break;
@@ -16917,7 +16924,7 @@ function jv(t, e) {
16917
16924
  case "graph": {
16918
16925
  Ae.push({
16919
16926
  ...Se,
16920
- type: ke,
16927
+ type: Ne,
16921
16928
  extra: { action_id: m, action_type: g }
16922
16929
  });
16923
16930
  break;
@@ -16926,9 +16933,9 @@ function jv(t, e) {
16926
16933
  }
16927
16934
  let ze;
16928
16935
  !d && Ae.find((Ge) => Ge.type === "tree") ? ze = Ae.find(
16929
- (ke) => ke.type === "tree"
16930
- ) : d ? ze = Ae.find((ke) => d.id ? ke.type === d.type && ke.view_id === d.id : ke.type === d.type) : ze = Ae.find(
16931
- (ke) => ke.type === "form"
16936
+ (Ne) => Ne.type === "tree"
16937
+ ) : d ? ze = Ae.find((Ne) => d.id ? Ne.type === d.type && Ne.view_id === d.id : Ne.type === d.type) : ze = Ae.find(
16938
+ (Ne) => Ne.type === "form"
16932
16939
  ), ze || (se({
16933
16940
  type: "error",
16934
16941
  title: "Error determining the first view to show for model",
@@ -16960,14 +16967,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
16960
16967
  l,
16961
16968
  se
16962
16969
  ]);
16963
- c({ tabKey: l, canWeClose: He }), Xe(() => {
16970
+ c({ tabKey: l, canWeClose: ke }), Xe(() => {
16964
16971
  const Ae = M.find(($e) => $e.type === "tree"), Ye = M.find(($e) => d.id ? $e.type === d.type && $e.view_id === d.id : $e.type === d.type);
16965
16972
  Te(Ye || Ae), f ? he == null || he(P) : (Ie(void 0), k(void 0)), be();
16966
16973
  }, [r, i, f]), Xe(() => {
16967
16974
  if (Fe === l) {
16968
16975
  he == null || he(_);
16969
16976
  const Ae = { action_id: m, action_type: g };
16970
- z == null || z({ ...S, extra: Ae });
16977
+ G == null || G({ ...S, extra: Ae });
16971
16978
  }
16972
16979
  }, [qe, Fe]), de(() => {
16973
16980
  ae && se({
@@ -16976,11 +16983,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
16976
16983
  message: `Error loading permissions for model ${r}: ${ae.message}`
16977
16984
  });
16978
16985
  }, [ae, r, se]);
16979
- async function He() {
16986
+ async function ke() {
16980
16987
  return S && S.type === "form" ? await fe.current.cancelUnsavedChanges() : !0;
16981
16988
  }
16982
16989
  async function Qe() {
16983
- Fe === l && (S.type === "form" && !await fe.current.cancelUnsavedChanges() || Y(!0));
16990
+ Fe === l && (S.type === "form" && !await fe.current.cancelUnsavedChanges() || z(!0));
16984
16991
  }
16985
16992
  async function Re(Ae, Ye) {
16986
16993
  var Ge;
@@ -16988,13 +16995,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
16988
16995
  let $e, ze;
16989
16996
  if (Ae.length === 1) {
16990
16997
  $e = "form", ze = [];
16991
- const ke = Ae[0], Se = $.findIndex((G) => G.id === ke);
16992
- let Ne;
16998
+ const Ne = Ae[0], Se = $.findIndex((Y) => Y.id === Ne);
16999
+ let Ve;
16993
17000
  if (Se === -1) {
16994
17001
  try {
16995
- Ne = (Ge = await V.getHandler().search({
17002
+ Ve = (Ge = await V.getHandler().search({
16996
17003
  model: r,
16997
- params: [["id", "in", [ke]]],
17004
+ params: [["id", "in", [Ne]]],
16998
17005
  skipRead: !0,
16999
17006
  context: {
17000
17007
  active_test: !1
@@ -17002,22 +17009,22 @@ Please, make sure the view ids on the fields_view_get responses are the same as
17002
17009
  })) == null ? void 0 : Ge[0];
17003
17010
  } catch {
17004
17011
  }
17005
- if (!Ne) {
17006
- re(!1), Y(!1), yn(B("idNotFound"));
17012
+ if (!Ve) {
17013
+ re(!1), z(!1), yn(B("idNotFound"));
17007
17014
  return;
17008
17015
  }
17009
17016
  } else
17010
- Ne = $[Se];
17017
+ Ve = $[Se];
17011
17018
  } else
17012
17019
  $e = "tree", ze = [["id", "in", Ae]];
17013
- if (re(!1), Y(!1), Ye && $e === "form") {
17020
+ if (re(!1), z(!1), Ye && $e === "form") {
17014
17021
  Ie(Ae[0]);
17015
- const ke = M.find(
17022
+ const Ne = M.find(
17016
17023
  (Se) => Se.type === "form"
17017
17024
  );
17018
- Te(ke);
17025
+ Te(Ne);
17019
17026
  } else {
17020
- const ke = i.find((Se) => Se[1] === $e);
17027
+ const Ne = i.find((Se) => Se[1] === $e);
17021
17028
  ve({
17022
17029
  domain: ze,
17023
17030
  context: o,
@@ -17025,7 +17032,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
17025
17032
  views: i,
17026
17033
  title: a,
17027
17034
  target: "current",
17028
- initialView: { id: ke == null ? void 0 : ke[0], type: $e },
17035
+ initialView: { id: Ne == null ? void 0 : Ne[0], type: $e },
17029
17036
  action_id: m,
17030
17037
  action_type: g,
17031
17038
  res_id: Ae[0]
@@ -17107,7 +17114,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
17107
17114
  onIdSubmitted: Re,
17108
17115
  isSearching: le,
17109
17116
  onCancel: () => {
17110
- Y(!1);
17117
+ z(!1);
17111
17118
  }
17112
17119
  }
17113
17120
  )
@@ -17202,7 +17209,7 @@ const Uv = ({
17202
17209
  `${y.type}-${y.view_id}`
17203
17210
  );
17204
17211
  }
17205
- })), Ac = $t(jv);
17212
+ })), Ac = kt(jv);
17206
17213
  const Wv = Kd(Xd), qv = (t) => {
17207
17214
  const { children: e = [], onPositionItemsChanged: n } = t, r = jt.Children.map(
17208
17215
  e,
@@ -17241,7 +17248,7 @@ function Gv(t, e) {
17241
17248
  } = pe($s), h = K(), v = K(), [y] = Me(V.getHandler().getView), [b] = Me(
17242
17249
  V.getHandler().readObjects
17243
17250
  ), [C] = Me(V.getHandler().update), S = on(
17244
- Pt.FEATURE_READFORVIEW
17251
+ Mt.FEATURE_READFORVIEW
17245
17252
  );
17246
17253
  de(() => {
17247
17254
  w();
@@ -17373,7 +17380,7 @@ function Gv(t, e) {
17373
17380
  title: U,
17374
17381
  description: W,
17375
17382
  views: J,
17376
- model: Y,
17383
+ model: z,
17377
17384
  context: le,
17378
17385
  domain: re,
17379
17386
  initialView: X,
@@ -17394,7 +17401,7 @@ function Gv(t, e) {
17394
17401
  view_id: J.filter(
17395
17402
  (q) => q[1] === "graph"
17396
17403
  )[0][0],
17397
- model: Y,
17404
+ model: z,
17398
17405
  context: le,
17399
17406
  domain: re,
17400
17407
  limit: ie
@@ -17402,12 +17409,12 @@ function Gv(t, e) {
17402
17409
  $
17403
17410
  );
17404
17411
  } else if ((X == null ? void 0 : X.type) === "form")
17405
- se = /* @__PURE__ */ s(nc, { model: Y, actionDomain: re }, $);
17412
+ se = /* @__PURE__ */ s(nc, { model: z, actionDomain: re }, $);
17406
17413
  else if ((X == null ? void 0 : X.type) === "tree")
17407
17414
  se = /* @__PURE__ */ s(
17408
17415
  rc,
17409
17416
  {
17410
- model: Y,
17417
+ model: z,
17411
17418
  domain: re,
17412
17419
  view_id: J.filter(
17413
17420
  (ae) => ae[1] === "tree"
@@ -17420,12 +17427,12 @@ function Gv(t, e) {
17420
17427
  });
17421
17428
  if (fe) {
17422
17429
  const [q, ee] = fe, {
17423
- actionId: z,
17430
+ actionId: G,
17424
17431
  actionType: he,
17425
17432
  title: qe,
17426
17433
  model: Fe
17427
17434
  } = T, ve = {
17428
- action_id: z,
17435
+ action_id: G,
17429
17436
  action_type: he,
17430
17437
  name: qe,
17431
17438
  res_id: ae.id,
@@ -17449,7 +17456,7 @@ function Gv(t, e) {
17449
17456
  tabKey: H,
17450
17457
  title: U,
17451
17458
  views: J,
17452
- model: Y,
17459
+ model: z,
17453
17460
  context: le,
17454
17461
  domain: re,
17455
17462
  setCanWeClose: () => {
@@ -17469,13 +17476,13 @@ function Gv(t, e) {
17469
17476
  const [ae, fe] = Z, {
17470
17477
  actionId: q,
17471
17478
  actionType: ee,
17472
- title: z,
17479
+ title: G,
17473
17480
  model: he
17474
17481
  } = T;
17475
17482
  ue = {
17476
17483
  action_id: q,
17477
17484
  action_type: ee,
17478
- name: z,
17485
+ name: G,
17479
17486
  res_id: !1,
17480
17487
  res_model: he,
17481
17488
  view_id: ae,
@@ -17498,11 +17505,11 @@ function Gv(t, e) {
17498
17505
  );
17499
17506
  }) });
17500
17507
  }
17501
- const Yv = $t(Gv), zv = (t) => {
17508
+ const Yv = kt(Gv), zv = (t) => {
17502
17509
  const { ooui: e } = t;
17503
17510
  return /* @__PURE__ */ s(We, { type: "array", ...t, children: /* @__PURE__ */ s(Jv, { ooui: e }) });
17504
17511
  }, Jv = (t) => {
17505
- const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((E) => E.operation !== "pendingRemove").map((E) => E.id), [a, c] = I([]), [l, d] = I(), [p, u] = I(!1), { relation: f, context: m, readOnly: g, field: h, columns: v } = n, y = pe(Ze), { getContext: b } = y || {};
17512
+ const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((E) => E.operation !== "pendingRemove").map((E) => E.id), [a, c] = I([]), [l, d] = I(), [p, u] = I(!1), { relation: f, context: m, readOnly: g, field: h, columns: v } = n, y = pe(et), { getContext: b } = y || {};
17506
17513
  Xe(() => {
17507
17514
  S();
17508
17515
  }, [o]);
@@ -17570,7 +17577,7 @@ const Yv = $t(Gv), zv = (t) => {
17570
17577
  children: /* @__PURE__ */ s(Ke, { children: a.map((E) => /* @__PURE__ */ s(Pe, { span: Math.floor(24 / v), children: /* @__PURE__ */ s(Qn, { value: E.value, children: E.label }) }, E.value)) })
17571
17578
  }
17572
17579
  ),
17573
- !g && /* @__PURE__ */ L(ct, { children: [
17580
+ !g && /* @__PURE__ */ L(dt, { children: [
17574
17581
  /* @__PURE__ */ s(
17575
17582
  Je,
17576
17583
  {
@@ -17609,7 +17616,7 @@ const Yv = $t(Gv), zv = (t) => {
17609
17616
  const [p, u] = d;
17610
17617
  return /* @__PURE__ */ s(Vs, { value: p, children: u }, p);
17611
17618
  });
17612
- return /* @__PURE__ */ s(Vs.Group, { disabled: i, onChange: n, value: r, children: /* @__PURE__ */ s(ct, { direction: a, children: l }) });
17619
+ return /* @__PURE__ */ s(Vs.Group, { disabled: i, onChange: n, value: r, children: /* @__PURE__ */ s(dt, { direction: a, children: l }) });
17613
17620
  }, eb = (t) => {
17614
17621
  const { ooui: e } = t, { id: n, readOnly: r, required: o } = e;
17615
17622
  return /* @__PURE__ */ s(We, { ...t, valuePropName: "checked", children: /* @__PURE__ */ s(tb, { id: n, readOnly: r, required: o }) });
@@ -17620,7 +17627,7 @@ const Yv = $t(Gv), zv = (t) => {
17620
17627
  const { ooui: e } = t, { required: n } = e;
17621
17628
  return /* @__PURE__ */ s(We, { required: n, type: "any", ...t, children: /* @__PURE__ */ s(rb, { ...t }) });
17622
17629
  }, rb = (t) => {
17623
- const { ooui: e, value: n } = t, { selectionValues: r, errorField: o, lastStep: i } = e, a = pe(Ze);
17630
+ const { ooui: e, value: n } = t, { selectionValues: r, errorField: o, lastStep: i } = e, a = pe(et);
17624
17631
  let c = [], l;
17625
17632
  e.fieldType === "json" && n ? (c = n.map((u) => [u.title, u.title]), l = n.findIndex((u) => u.active)) : (c = Array.from(r.entries()), l = c.map((u) => u[0]).indexOf(n));
17626
17633
  let d = "process", p = "";
@@ -17683,11 +17690,11 @@ const Yv = $t(Gv), zv = (t) => {
17683
17690
  borderTop: "16px solid transparent",
17684
17691
  borderBottom: "16px solid transparent"
17685
17692
  }), f = (m) => {
17686
- const g = Dt(m);
17693
+ const g = Pt(m);
17687
17694
  return g && /* @__PURE__ */ s(g, {});
17688
17695
  };
17689
17696
  return /* @__PURE__ */ s("ul", { style: l, children: (t.value || []).map((m, g) => /* @__PURE__ */ L("li", { style: d(m.active), children: [
17690
- /* @__PURE__ */ L(ct, { children: [
17697
+ /* @__PURE__ */ L(dt, { children: [
17691
17698
  m.icon && f(m.icon),
17692
17699
  " ",
17693
17700
  m.title
@@ -17696,7 +17703,7 @@ const Yv = $t(Gv), zv = (t) => {
17696
17703
  /* @__PURE__ */ s("div", { style: u(m.active) })
17697
17704
  ] }, g)) });
17698
17705
  }, sb = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(ob, {}) }), ib = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(ab, { ...t }) }), ab = (t) => {
17699
- const { ooui: e, value: n, onChange: r } = t, { lang: o, height: i, readOnly: a } = e, c = pe(Ze), { elementHasLostFocus: l } = c || {}, d = D(
17706
+ const { ooui: e, value: n, onChange: r } = t, { lang: o, height: i, readOnly: a } = e, c = pe(et), { elementHasLostFocus: l } = c || {}, d = D(
17700
17707
  (u) => {
17701
17708
  l && u.onDidBlurEditorWidget(() => l());
17702
17709
  },
@@ -17745,8 +17752,8 @@ const fb = (t) => {
17745
17752
  {
17746
17753
  avatar: /* @__PURE__ */ s(db, { email: e.email, theme: "mp" }),
17747
17754
  title: e.author,
17748
- description: /* @__PURE__ */ L(ct, { direction: "horizontal", children: [
17749
- /* @__PURE__ */ s("span", { title: e.date, children: lt(e.date).fromNow() }),
17755
+ description: /* @__PURE__ */ L(dt, { direction: "horizontal", children: [
17756
+ /* @__PURE__ */ s("span", { title: e.date, children: ct(e.date).fromNow() }),
17750
17757
  e.isAuthor && /* @__PURE__ */ s(Yo, { color: "blue", children: r("author") })
17751
17758
  ] }),
17752
17759
  style: { marginBottom: "5px" }
@@ -17755,7 +17762,7 @@ const fb = (t) => {
17755
17762
  /* @__PURE__ */ s(cb, { children: /* @__PURE__ */ s(ub, { text: e.text }) })
17756
17763
  ] }, e.id);
17757
17764
  }, Gi = (t) => {
17758
- const e = Dt(t);
17765
+ const e = Pt(t);
17759
17766
  return e && /* @__PURE__ */ s(e, {});
17760
17767
  }, pb = (t) => {
17761
17768
  const { value: e, ooui: n } = t, r = (e || []).map((o) => {
@@ -17788,7 +17795,7 @@ const fb = (t) => {
17788
17795
  }
17789
17796
  );
17790
17797
  }, mb = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(pb, { ooui: t.ooui }) }), hb = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Ed, {}) }), gb = (t) => {
17791
- const { ooui: e } = t, n = pe(Ze);
17798
+ const { ooui: e } = t, n = pe(et);
17792
17799
  let { title: r, text: o, alertType: i, icon: a, buttons: c } = e;
17793
17800
  if (e.fieldType && e.id) {
17794
17801
  const p = n.getFieldValue(e.id);
@@ -17804,7 +17811,7 @@ const fb = (t) => {
17804
17811
  }
17805
17812
  function l(p) {
17806
17813
  if (p) {
17807
- const u = Dt(p);
17814
+ const u = Pt(p);
17808
17815
  return u && /* @__PURE__ */ s(u, {});
17809
17816
  }
17810
17817
  }
@@ -17816,7 +17823,7 @@ const fb = (t) => {
17816
17823
  description: /* @__PURE__ */ s(zt, { content: o }),
17817
17824
  type: i,
17818
17825
  showIcon: !0,
17819
- action: d ? /* @__PURE__ */ s(ct, { direction: "vertical", children: d }) : null,
17826
+ action: d ? /* @__PURE__ */ s(dt, { direction: "vertical", children: d }) : null,
17820
17827
  icon: l(a)
17821
17828
  }
17822
17829
  );
@@ -17830,7 +17837,7 @@ const fb = (t) => {
17830
17837
  },
17831
17838
  o
17832
17839
  )) });
17833
- }, wb = Ft(Uc)`
17840
+ }, wb = It(Uc)`
17834
17841
  .slick-dots li button {
17835
17842
  background-color: ${Yi.colorPrimary};
17836
17843
  }
@@ -17861,7 +17868,7 @@ function Fb() {
17861
17868
  }
17862
17869
  function Ib(t, e) {
17863
17870
  const { children: n } = t, [r, o] = I("welcome"), { t: i } = xe(), { showErrorNotification: a } = yt(), { globalValues: c, rootContext: l } = Wt(), d = ds(
17864
- Pt.FEATURE_LOGGABLE_ACTIONS
17871
+ Mt.FEATURE_LOGGABLE_ACTIONS
17865
17872
  ), [p, u] = Me(
17866
17873
  V.getHandler().logAction
17867
17874
  );
@@ -17992,7 +17999,7 @@ function Ib(t, e) {
17992
17999
  const [j, N] = _.split(","), H = parseInt(N), U = $.context, W = dn({
17993
18000
  context: U,
17994
18001
  values: c
17995
- }), J = $.domain, Y = await (async () => {
18002
+ }), J = $.domain, z = await (async () => {
17996
18003
  try {
17997
18004
  return J ? await V.getHandler().evalDomain({
17998
18005
  domain: J,
@@ -18017,19 +18024,19 @@ function Ib(t, e) {
18017
18024
  else if (ee === "dashboard")
18018
18025
  Z.push([void 0, "dashboard"]);
18019
18026
  else {
18020
- const { view_id: z } = await V.getHandler().getView({
18027
+ const { view_id: G } = await V.getHandler().getView({
18021
18028
  model: le,
18022
18029
  type: ee,
18023
18030
  id: q,
18024
18031
  context: { ...l, ...W }
18025
18032
  });
18026
- Z.push([z, ee]);
18033
+ Z.push([G, ee]);
18027
18034
  }
18028
18035
  }
18029
18036
  let ae;
18030
18037
  if (T) {
18031
18038
  const [fe, q] = Z.find(
18032
- ([ee, z]) => z === T
18039
+ ([ee, G]) => G === T
18033
18040
  );
18034
18041
  ae = { id: fe, type: q };
18035
18042
  } else {
@@ -18037,7 +18044,7 @@ function Ib(t, e) {
18037
18044
  ae = { id: fe, type: q };
18038
18045
  }
18039
18046
  A({
18040
- domain: [...Y, ...k],
18047
+ domain: [...z, ...k],
18041
18048
  context: { ...l, ...W },
18042
18049
  model: le,
18043
18050
  views: Z,
@@ -18090,7 +18097,7 @@ function Ib(t, e) {
18090
18097
  target: H,
18091
18098
  string: U,
18092
18099
  limit: W
18093
- } = _, [J, Y] = N[0], le = { id: J, type: Y }, re = $, X = dn({
18100
+ } = _, [J, z] = N[0], le = { id: J, type: z }, re = $, X = dn({
18094
18101
  context: re,
18095
18102
  values: { ...O, ...c }
18096
18103
  }), ie = j, B = j ? await V.getHandler().evalDomain({
@@ -18139,7 +18146,7 @@ function Ib(t, e) {
18139
18146
  fields: {}
18140
18147
  });
18141
18148
  let J = [];
18142
- const Y = j && j.length > 0 ? j : H.domain;
18149
+ const z = j && j.length > 0 ? j : H.domain;
18143
18150
  (j == null ? void 0 : j.length) > 0 ? J = j : H.domain && (J = await V.getHandler().evalDomain({
18144
18151
  domain: H.domain,
18145
18152
  values: { ...c, ...$ },
@@ -18154,8 +18161,8 @@ function Ib(t, e) {
18154
18161
  limit: se
18155
18162
  } = H, ue = B === "tree", Z = [];
18156
18163
  for (const ee of re) {
18157
- const [z, he] = ee;
18158
- if (z)
18164
+ const [G, he] = ee;
18165
+ if (G)
18159
18166
  Z.push(ee);
18160
18167
  else if (he === "dashboard")
18161
18168
  Z.push([void 0, "dashboard"]);
@@ -18163,7 +18170,7 @@ function Ib(t, e) {
18163
18170
  const { view_id: qe } = await V.getHandler().getView({
18164
18171
  model: le,
18165
18172
  type: he,
18166
- id: z,
18173
+ id: G,
18167
18174
  context: { ...l, ...W }
18168
18175
  });
18169
18176
  Z.push([qe, he]);
@@ -18171,7 +18178,7 @@ function Ib(t, e) {
18171
18178
  }
18172
18179
  let ae, fe;
18173
18180
  if (R == null) {
18174
- const ee = Z.find((z) => z[0] === void 0);
18181
+ const ee = Z.find((G) => G[0] === void 0);
18175
18182
  ae = void 0, fe = ee[1];
18176
18183
  } else
18177
18184
  [ae, fe] = Z.find((ee) => ee[0] === void 0 ? !1 : ee[0] === R);
@@ -18188,10 +18195,10 @@ function Ib(t, e) {
18188
18195
  action_type: O,
18189
18196
  res_id: T,
18190
18197
  treeExpandable: ue,
18191
- limit: k && (se === 0 || se === !1) ? Tt : se,
18198
+ limit: k && (se === 0 || se === !1) ? Ft : se,
18192
18199
  actionRawData: {
18193
18200
  context: U,
18194
- domain: Y,
18201
+ domain: z,
18195
18202
  values: $
18196
18203
  }
18197
18204
  });
@@ -18229,7 +18236,7 @@ function Ib(t, e) {
18229
18236
  res_id: U,
18230
18237
  values: W,
18231
18238
  forced_values: J,
18232
- treeExpandable: Y = !1,
18239
+ treeExpandable: z = !1,
18233
18240
  limit: le,
18234
18241
  searchParams: re,
18235
18242
  currentPage: X,
@@ -18284,7 +18291,7 @@ function Ib(t, e) {
18284
18291
  res_id: U,
18285
18292
  formDefaultValues: W,
18286
18293
  formForcedValues: J,
18287
- treeExpandable: Y,
18294
+ treeExpandable: z,
18288
18295
  limit: le,
18289
18296
  initialSearchParams: re,
18290
18297
  currentPage: X,
@@ -18357,7 +18364,7 @@ function Ib(t, e) {
18357
18364
  }
18358
18365
  );
18359
18366
  }
18360
- const Aw = $t(Ib), { useToken: Ab } = rt;
18367
+ const Aw = kt(Ib), { useToken: Ab } = rt;
18361
18368
  function Rb(t) {
18362
18369
  const { label: e, onClose: n, tabKey: r, isActive: o, onSelected: i } = t, { token: a } = Ab(), c = o ? a.colorBgContainer : a.colorPrimaryBg, l = a.colorPrimaryActive;
18363
18370
  return /* @__PURE__ */ L(
@@ -18366,6 +18373,9 @@ function Rb(t) {
18366
18373
  onClick: () => {
18367
18374
  !o && i(r);
18368
18375
  },
18376
+ onMouseDown: (d) => {
18377
+ d.button === 1 && (d.preventDefault(), n(r));
18378
+ },
18369
18379
  style: {
18370
18380
  cursor: "pointer",
18371
18381
  height: 40,
@@ -18647,14 +18657,14 @@ export {
18647
18657
  V as ConnectionProvider,
18648
18658
  Lf as ContentRootProvider,
18649
18659
  _w as CurrentTabContent,
18650
- Tt as DEFAULT_SEARCH_LIMIT,
18660
+ Ft as DEFAULT_SEARCH_LIMIT,
18651
18661
  Yv as Dashboard,
18652
18662
  qv as DashboardGrid,
18653
18663
  hv as Date,
18654
18664
  gv as DateTime,
18655
18665
  Ov as Email,
18656
18666
  Fw as ErpAllFeatureKeys,
18657
- Pt as ErpFeatureKeys,
18667
+ Mt as ErpFeatureKeys,
18658
18668
  pv as ExportModal,
18659
18669
  Ew as FavouriteButton,
18660
18670
  bs as Float,