@gisce/react-ooui 2.61.0-rc.1 → 2.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,8 @@ var ml = Object.defineProperty;
2
2
  var pl = (e, t, n) => t in e ? ml(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Wo = (e, t, n) => (pl(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { jsx as i, jsxs as P, Fragment as le } from "react/jsx-runtime";
5
- import vt, { useContext as ee, useState as C, useEffect as se, useRef as G, memo as ze, useCallback as E, useMemo as X, createContext as hl, forwardRef as xt, useImperativeHandle as Tt, createElement as gl, Fragment as Pn } from "react";
6
- import { Tooltip as Vt, theme as He, Typography as Bt, Form as Ct, Row as je, Col as Ie, Modal as yt, Button as Le, Dropdown as yl, Menu as Yo, Spin as Ke, Divider as ar, Space as Xe, Input as rt, Select as Jt, Checkbox as On, Alert as at, Timeline as Ji, Empty as Qi, Statistic as vl, Card as ao, Tag as lo, message as In, App as wl, Progress as bl, Avatar as Xi, DatePicker as co, ColorPicker as Zi, TimePicker as Sl, InputNumber as lr, Layout as es, Badge as cr, Pagination as Cl, Tabs as ts, Popover as xl, Radio as Go, Switch as Il, Steps as Ko, Carousel as Tl } from "antd";
5
+ import vt, { useContext as ee, useState as C, useEffect as ie, useRef as G, memo as Je, useCallback as E, useMemo as X, createContext as hl, forwardRef as xt, useImperativeHandle as Tt, createElement as gl, Fragment as Pn } from "react";
6
+ import { Tooltip as Vt, theme as Ue, Typography as Bt, Form as Ct, Row as je, Col as Ie, Modal as yt, Button as Le, Dropdown as yl, Menu as Yo, Spin as Ke, Divider as ar, Space as Xe, Input as rt, Select as Jt, Checkbox as On, Alert as at, Timeline as Ji, Empty as Qi, Statistic as vl, Card as ao, Tag as lo, message as In, App as wl, Progress as bl, Avatar as Xi, DatePicker as co, ColorPicker as Zi, TimePicker as Sl, InputNumber as lr, Layout as es, Badge as cr, Pagination as Cl, Tabs as ts, Popover as xl, Radio as Go, Switch as Il, Steps as Ko, Carousel as Tl } from "antd";
7
7
  import { Label as hn, Field as Hr, Tree as ns, Reference as Al, Selection as uo, Many2one as rs, Boolean as Ol, parseContext as Nt, graphProcessor as os, graphFieldUtils as _l, parseGraph as is, Container as Fl, Form as ss, parseContextFields as Rl, parseDomainFields as Dl, Integer as Ur, SearchFieldTypes as $t, SearchFilter as as, transformDomainForChildWidget as fo, Button as El } from "@gisce/ooui";
8
8
  import * as qo from "@ant-design/icons";
9
9
  import ls, { QuestionCircleOutlined as cs, ExclamationCircleOutlined as Ht, LoadingOutlined as At, DownOutlined as dr, WarningOutlined as ds, CloseOutlined as gn, CheckOutlined as kn, TranslationOutlined as us, FolderOpenOutlined as mo, DownloadOutlined as po, ClearOutlined as ur, InfoCircleOutlined as ho, ExportOutlined as Vl, StarFilled as Pl, StarOutlined as kl, ThunderboltOutlined as go, PrinterOutlined as yo, EnterOutlined as vo, SearchOutlined as fr, UpOutlined as $l, PlusSquareOutlined as Nl, MinusSquareOutlined as Ml, FileAddOutlined as mr, LeftOutlined as fs, RightOutlined as ms, ApiOutlined as Ll, DeleteOutlined as wo, AlignLeftOutlined as jl, EyeOutlined as Bl, FormOutlined as _n, TableOutlined as bo, AreaChartOutlined as Hl, CalendarOutlined as Ul, LinkOutlined as zo, CopyOutlined as pr, SaveOutlined as Wl, ReloadOutlined as hr, EditOutlined as ps, PlusOutlined as Yl, FilterOutlined as hs, CloseCircleFilled as Gl, BorderOuterOutlined as Kl, SettingOutlined as ql } from "@ant-design/icons";
@@ -53,7 +53,7 @@ import Dc from "md5";
53
53
  import { WidthProvider as Ec, Responsive as Vc } from "react-grid-layout";
54
54
  import "react-grid-layout/css/styles.css";
55
55
  import { AnimatePresence as Pc, motion as Xo } from "framer-motion";
56
- const Ue = vt.createContext(null), kc = (e) => {
56
+ const Be = vt.createContext(null), kc = (e) => {
57
57
  const {
58
58
  children: t,
59
59
  activeId: n,
@@ -73,7 +73,7 @@ const Ue = vt.createContext(null), kc = (e) => {
73
73
  formView: y
74
74
  } = e;
75
75
  return /* @__PURE__ */ i(
76
- Ue.Provider,
76
+ Be.Provider,
77
77
  {
78
78
  value: {
79
79
  domain: m,
@@ -96,7 +96,7 @@ const Ue = vt.createContext(null), kc = (e) => {
96
96
  }
97
97
  );
98
98
  }, $c = () => {
99
- const e = ee(Ue);
99
+ const e = ee(Be);
100
100
  return e || {
101
101
  activeId: void 0,
102
102
  activeModel: "",
@@ -170,12 +170,12 @@ Qe.extend(Zl);
170
170
  Qe.extend(ec);
171
171
  Qe.extend(tc);
172
172
  Qe.extend(nc);
173
- const { Text: jc, Title: Bc } = Bt, { useToken: Hc } = He, Uc = {
173
+ const { Text: jc, Title: Bc } = Bt, { useToken: Hc } = Ue, Uc = {
174
174
  left: "justify-start",
175
175
  center: "justify-center",
176
176
  right: "justify-end"
177
177
  }, gr = (e) => {
178
- const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: a, fieldForLabel: s, labelSize: l, labelType: c } = t, u = ee(Ue);
178
+ const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: a, fieldForLabel: s, labelSize: l, labelType: c } = t, u = ee(Be);
179
179
  let d = s !== null && o.length > 1 ? o + " :" : o, f = "";
180
180
  if (!t.fieldForLabel && t._id && (d = u.getFieldValue(t._id), t.fieldType === "date" || t.fieldType === "time" || t.fieldType === "datetime")) {
181
181
  const v = {
@@ -420,7 +420,7 @@ const xo = (e) => {
420
420
  icon: l,
421
421
  context: c,
422
422
  readOnly: u
423
- } = t, m = ee(Ue), { executeButtonAction: d } = m || {}, [f, h] = C(!1), { t: p } = de();
423
+ } = t, m = ee(Be), { executeButtonAction: d } = m || {}, [f, h] = C(!1), { t: p } = de();
424
424
  async function g() {
425
425
  h(!0), await d({ type: a, action: n, context: c }), h(!1);
426
426
  }
@@ -469,7 +469,7 @@ const xo = (e) => {
469
469
  primary: m,
470
470
  context: d,
471
471
  readOnly: f
472
- } = n || {}, h = ee(Ue), { executeButtonAction: p } = h || {}, [g, y] = C(!1), { t: v } = de();
472
+ } = n || {}, h = ee(Be), { executeButtonAction: p } = h || {}, [g, y] = C(!1), { t: v } = de();
473
473
  function w() {
474
474
  if (g)
475
475
  return /* @__PURE__ */ i(At, {});
@@ -584,7 +584,7 @@ function yr() {
584
584
  const [e, t] = C(
585
585
  ti()
586
586
  );
587
- return se(() => {
587
+ return ie(() => {
588
588
  function n() {
589
589
  t(ti());
590
590
  }
@@ -636,7 +636,7 @@ const Cs = (e) => {
636
636
  });
637
637
  }, xs = (e) => {
638
638
  const { visible: t, onCloseModal: n, model: r, id: o, field: a, onSubmitSucceed: s } = e, { modalWidth: l } = yr(), { t: c } = de(), [u, m] = C([]), [d, f] = C(!1), [h, p] = C(!1), [g, y] = C({}), v = G();
639
- se(() => {
639
+ ie(() => {
640
640
  t ? w() : y({});
641
641
  }, [t]);
642
642
  async function w() {
@@ -764,12 +764,12 @@ const { info: Qc } = yt, Gt = (e) => {
764
764
  centered: !0,
765
765
  content: e
766
766
  });
767
- }, { useToken: Xc } = He, vr = ze(({ content: e }) => {
767
+ }, { useToken: Xc } = Ue, vr = Je(({ content: e }) => {
768
768
  const { token: t } = Xc();
769
769
  return /* @__PURE__ */ i("div", { style: { color: t.colorTextDisabled }, children: e });
770
770
  });
771
771
  vr.displayName = "AddonElement";
772
- const { defaultAlgorithm: Zc, defaultSeed: ed } = He, Io = Zc(ed), Dn = ze(
772
+ const { defaultAlgorithm: Zc, defaultSeed: ed } = Ue, Io = Zc(ed), Dn = Je(
773
773
  ({
774
774
  component: e,
775
775
  ooui: t,
@@ -800,14 +800,14 @@ const Is = (e) => {
800
800
  const { ooui: t, isSearchField: n = !1 } = e, { id: r, readOnly: o, required: a, translatable: s } = t;
801
801
  let l = /* @__PURE__ */ i(Ts, { ooui: t, isSearchField: n });
802
802
  return s && !o && !n && (l = /* @__PURE__ */ i(As, { ooui: t, field: r })), /* @__PURE__ */ i(Re, { required: a, ...e, children: l });
803
- }, Ts = ze(
803
+ }, Ts = Je(
804
804
  ({
805
805
  value: e,
806
806
  ooui: t,
807
807
  isSearchField: n,
808
808
  onChange: r
809
809
  }) => {
810
- const o = ee(Ue), { elementHasLostFocus: a } = o || {}, { readOnly: s, isPassword: l, translatable: c, required: u } = t, m = X(() => e && (t.selectionValues.size ? t.selectionValues.get(e) : Array.isArray(e) ? e[1] : e), [t.selectionValues, e]), d = X(
810
+ const o = ee(Be), { elementHasLostFocus: a } = o || {}, { readOnly: s, isPassword: l, translatable: c, required: u } = t, m = X(() => e && (t.selectionValues.size ? t.selectionValues.get(e) : Array.isArray(e) ? e[1] : e), [t.selectionValues, e]), d = X(
811
811
  () => u && !s,
812
812
  [u, s]
813
813
  ), f = X(
@@ -849,14 +849,14 @@ const Is = (e) => {
849
849
  }
850
850
  );
851
851
  Ts.displayName = "CharInput";
852
- const As = ze(
852
+ const As = Je(
853
853
  ({
854
854
  ooui: e,
855
855
  value: t,
856
856
  field: n,
857
857
  onChange: r
858
858
  }) => {
859
- const o = ee(Ue), {
859
+ const o = ee(Be), {
860
860
  activeId: a,
861
861
  activeModel: s,
862
862
  fetchValues: l,
@@ -949,7 +949,7 @@ const td = ut(rt)`
949
949
  &.ant-input-affix-wrapper {
950
950
  background-color: ${Io.colorPrimaryBg};
951
951
  }
952
- `, { defaultAlgorithm: od, defaultSeed: id } = He, sd = od(id), { Option: ad } = Jt, _s = (e) => {
952
+ `, { defaultAlgorithm: od, defaultSeed: id } = Ue, sd = od(id), { Option: ad } = Jt, _s = (e) => {
953
953
  const { ooui: t } = e, { required: n } = t;
954
954
  return /* @__PURE__ */ i(Re, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Fs, { ...e }) });
955
955
  }, Fs = (e) => {
@@ -974,7 +974,7 @@ const td = ut(rt)`
974
974
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
975
975
  background-color: ${sd.colorPrimaryBg};
976
976
  }
977
- `, { defaultAlgorithm: cd, defaultSeed: dd } = He, ni = cd(dd), ud = (e) => {
977
+ `, { defaultAlgorithm: cd, defaultSeed: dd } = Ue, ni = cd(dd), ud = (e) => {
978
978
  const { ooui: t } = e, { id: n, readOnly: r, required: o } = t;
979
979
  return /* @__PURE__ */ i(Re, { ...e, valuePropName: "checked", children: /* @__PURE__ */ i(fd, { id: n, readOnly: r, required: o }) });
980
980
  }, fd = (e) => {
@@ -1517,7 +1517,7 @@ const Qt = ({
1517
1517
  ]
1518
1518
  }
1519
1519
  ), Nd = (e) => {
1520
- const { ooui: t } = e, { relation: n, context: r, views: o } = t, [a, s] = C(!0), [l, c] = C(), [u, m] = C(/* @__PURE__ */ new Map()), d = ee(Ue), { getContext: f } = d || {};
1520
+ const { ooui: t } = e, { relation: n, context: r, views: o } = t, [a, s] = C(!0), [l, c] = C(), [u, m] = C(/* @__PURE__ */ new Map()), d = ee(Be), { getContext: f } = d || {};
1521
1521
  Ft(() => {
1522
1522
  p();
1523
1523
  }, [t]);
@@ -1546,7 +1546,7 @@ const Qt = ({
1546
1546
  titleField: w,
1547
1547
  iconField: I,
1548
1548
  colorField: T
1549
- } = r, S = a.filter((F) => F.values), O = ee(Ue), { getContext: b } = O || {};
1549
+ } = r, S = a.filter((F) => F.values), O = ee(Be), { getContext: b } = O || {};
1550
1550
  Ft(() => {
1551
1551
  _();
1552
1552
  }, [a]);
@@ -1979,7 +1979,7 @@ const Qt = ({
1979
1979
  }, Sr = (e) => {
1980
1980
  const { erpFeatures: t } = Nn();
1981
1981
  return !!t[e];
1982
- }, Wd = ze(
1982
+ }, Wd = Je(
1983
1983
  ({
1984
1984
  erpFeatures: e,
1985
1985
  locale: t,
@@ -2069,7 +2069,7 @@ async function $s({
2069
2069
  };
2070
2070
  }
2071
2071
  const Yd = (e) => {
2072
- const [t, n] = C(), [r, o] = C(!0), [a, s] = C(), [l, c] = C(), u = ee(Ue), { getContext: m, getPlainValues: d, activeId: f } = u || {}, { globalValues: h, rootContext: p } = Nn(), g = X(() => ({ ...m == null ? void 0 : m(), ...p }), [m, p]);
2072
+ const [t, n] = C(), [r, o] = C(!0), [a, s] = C(), [l, c] = C(), u = ee(Be), { getContext: m, getPlainValues: d, activeId: f } = u || {}, { globalValues: h, rootContext: p } = Nn(), g = X(() => ({ ...m == null ? void 0 : m(), ...p }), [m, p]);
2073
2073
  return { actionData: a, treeShortcut: l, loading: r, error: t, fetchData: async () => {
2074
2074
  n(void 0), o(!0);
2075
2075
  try {
@@ -2149,9 +2149,9 @@ const Yd = (e) => {
2149
2149
  banner: !0
2150
2150
  }
2151
2151
  );
2152
- }, Je = (e) => {
2152
+ }, ze = (e) => {
2153
2153
  const t = G(/* @__PURE__ */ new Map());
2154
- se(() => () => {
2154
+ ie(() => () => {
2155
2155
  n();
2156
2156
  }, []);
2157
2157
  const n = E((o) => {
@@ -2350,18 +2350,18 @@ const { getValueForOperator: si } = os, qd = (e) => {
2350
2350
  operator: m,
2351
2351
  manualIds: d,
2352
2352
  fixedHeight: f
2353
- } = e, [h, p] = C(!1), [g, y] = C(), [v, w] = C(0), [I, T] = C(), [S, O] = C(), [b, A] = C(), [_, R] = C(), [x] = Je(
2353
+ } = e, [h, p] = C(!1), [g, y] = C(), [v, w] = C(0), [I, T] = C(), [S, O] = C(), [b, A] = C(), [_, R] = C(), [x] = ze(
2354
2354
  k.getHandler().searchAllIds
2355
- ), [F] = Je(
2355
+ ), [F] = ze(
2356
2356
  k.getHandler().readObjects
2357
- ), [D] = Je(
2357
+ ), [D] = ze(
2358
2358
  k.getHandler().searchCount
2359
- ), [V] = Je(
2359
+ ), [V] = ze(
2360
2360
  k.getHandler().evalDomain
2361
- ), [N] = Je(
2361
+ ), [N] = ze(
2362
2362
  k.getHandler().parseCondition
2363
2363
  );
2364
- se(() => {
2364
+ ie(() => {
2365
2365
  Y();
2366
2366
  }, [t, o]);
2367
2367
  async function L({
@@ -2477,11 +2477,11 @@ const { getValueForOperator: si } = os, qd = (e) => {
2477
2477
  limit: a,
2478
2478
  uninformedString: s,
2479
2479
  manualIds: l
2480
- } = e, [c, u] = C(!1), [m, d] = C(), [f, h] = C(), [p, g] = C(), [y, v] = C("line"), [w] = Je(
2480
+ } = e, [c, u] = C(!1), [m, d] = C(), [f, h] = C(), [p, g] = C(), [y, v] = C("line"), [w] = ze(
2481
2481
  k.getHandler().getFields
2482
- ), [I] = Je(
2482
+ ), [I] = ze(
2483
2483
  k.getHandler().readObjects
2484
- ), [T] = Je(k.getHandler().search), S = E(async () => {
2484
+ ), [T] = ze(k.getHandler().search), S = E(async () => {
2485
2485
  u(!0), d(void 0), v(n.type || "line");
2486
2486
  const O = Jd({ ooui: n });
2487
2487
  let b, A;
@@ -2757,7 +2757,7 @@ const ru = {
2757
2757
  x: s.x,
2758
2758
  percent: r[l]
2759
2759
  }));
2760
- }, { Text: li } = Bt, Bs = 400, iu = ze(pc), su = ze(hc), au = ze(gc), lu = {
2760
+ }, { Text: li } = Bt, Bs = 400, iu = Je(pc), su = Je(hc), au = Je(gc), lu = {
2761
2761
  line: iu,
2762
2762
  bar: su,
2763
2763
  pie: au
@@ -3023,25 +3023,25 @@ const du = ({
3023
3023
  initialSearchParams: x
3024
3024
  } = e, [F, D] = C(!1), [V, N] = C(!1), [L, B] = C(!1), [Y, $] = C(!0), [K, Z] = C(!0), [J, Q] = C([]), [Ce, me] = C(!1), [H, j] = C(
3025
3025
  x || []
3026
- ), [q, ie] = C(!1), [te, M] = C(!0), [ne, oe] = C(), [we, ge] = C(
3026
+ ), [q, se] = C(!1), [te, M] = C(!0), [ne, oe] = C(), [we, ge] = C(
3027
3027
  vu(
3028
3028
  x || [],
3029
3029
  n.fields
3030
3030
  )
3031
- ), [Pe, Be] = C(0), [We, Ee] = C(), [ue, Te] = C(!1), [xe, Ne] = C(), [z, pe] = C(
3031
+ ), [Pe, He] = C(0), [We, Ee] = C(), [ue, Te] = C(!1), [xe, Ne] = C(), [z, pe] = C(
3032
3032
  _ !== void 0 ? _ : jt
3033
3033
  ), [_e, Ye] = C(r);
3034
- se(() => {
3034
+ ie(() => {
3035
3035
  f && f.length > 0 && !h && (p == null || p(0), m == null || m(f[0].id));
3036
- }, [f]), se(() => {
3036
+ }, [f]), ie(() => {
3037
3037
  pe(_ !== void 0 ? _ : jt);
3038
- }, [_]), se(() => {
3038
+ }, [_]), ie(() => {
3039
3039
  a.length === 1 ? oe(a[0]) : a.length > 1 && oe(
3040
3040
  a.filter(
3041
3041
  (fe) => fe.view_id !== n.view_id
3042
3042
  )[0]
3043
3043
  );
3044
- }, [a]), se(() => {
3044
+ }, [a]), ie(() => {
3045
3045
  (ne == null ? void 0 : ne.view_id) === n.view_id && a.length > 1 && oe(
3046
3046
  a.filter(
3047
3047
  (fe) => fe.view_id !== n.view_id
@@ -3090,7 +3090,7 @@ const du = ({
3090
3090
  setSearchParams: j,
3091
3091
  searchParams: H,
3092
3092
  searchVisible: q,
3093
- setSearchVisible: ie,
3093
+ setSearchVisible: se,
3094
3094
  sorter: y,
3095
3095
  setSorter: v,
3096
3096
  totalItems: w,
@@ -3108,7 +3108,7 @@ const du = ({
3108
3108
  setLimit: pe,
3109
3109
  setTitle: Ye,
3110
3110
  isActive: R,
3111
- setTreeFirstVisibleRow: Be,
3111
+ setTreeFirstVisibleRow: He,
3112
3112
  treeFirstVisibleRow: Pe,
3113
3113
  searchQuery: We,
3114
3114
  setSearchQuery: Ee,
@@ -3224,12 +3224,12 @@ const du = ({
3224
3224
  viewData: u
3225
3225
  } = e, [m, d] = C(!1), [f, h] = C(), p = ee(
3226
3226
  mt
3227
- ), { setGraphIsLoading: g = void 0 } = p || {}, [y] = Je(k.getHandler().getView);
3227
+ ), { setGraphIsLoading: g = void 0 } = p || {}, [y] = ze(k.getHandler().getView);
3228
3228
  Tt(t, () => ({
3229
3229
  refresh: () => {
3230
3230
  v();
3231
3231
  }
3232
- })), se(() => {
3232
+ })), ie(() => {
3233
3233
  v();
3234
3234
  }, [u, n]);
3235
3235
  async function v() {
@@ -3293,7 +3293,7 @@ const du = ({
3293
3293
  }, yn = xt(Su);
3294
3294
  var vn = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e.FEATURE_USERVIEWPREFS = "user_view_prefs", e))(vn || {});
3295
3295
  const Wv = Object.values(vn), Cu = (e) => {
3296
- const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: a } = e, [s, l] = C(!1), [c, u] = C(), [m, d] = C(), [f] = Je(
3296
+ const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: a } = e, [s, l] = C(!1), [c, u] = C(), [m, d] = C(), [f] = ze(
3297
3297
  k.getHandler().readForView
3298
3298
  ), h = E(async () => {
3299
3299
  l(!0), u(void 0), a && n.push(["id", "in", a]);
@@ -3326,13 +3326,13 @@ const Wv = Object.values(vn), Cu = (e) => {
3326
3326
  context: o,
3327
3327
  manualIds: s
3328
3328
  });
3329
- if (se(() => {
3329
+ if (ie(() => {
3330
3330
  u == null || u(d);
3331
3331
  }, [d]), Tt(t, () => ({
3332
3332
  refresh: () => {
3333
3333
  h();
3334
3334
  }
3335
- })), se(() => {
3335
+ })), ie(() => {
3336
3336
  h();
3337
3337
  }, [n]), d || !f)
3338
3338
  return /* @__PURE__ */ i(Mn, {});
@@ -3388,7 +3388,7 @@ const Wv = Object.values(vn), Cu = (e) => {
3388
3388
  onRemoveTab: c,
3389
3389
  tabs: u
3390
3390
  } = e, [m, d] = C(), [f, h] = C(), p = X(() => u.find((v) => v.key === s), [u, s]), { title: g } = Nn(), y = X(() => !((u == null ? void 0 : u.length) > 0), [u]);
3391
- return se(() => {
3391
+ return ie(() => {
3392
3392
  y && (document.title = g, window.history.replaceState({}, "", "/"));
3393
3393
  }, [y, g]), /* @__PURE__ */ i(
3394
3394
  bt.Provider,
@@ -3415,7 +3415,7 @@ const Wv = Object.values(vn), Cu = (e) => {
3415
3415
  function _o() {
3416
3416
  return ee(bt) || {};
3417
3417
  }
3418
- const { useToken: Tu } = He, { Text: di } = Bt, Ws = (e) => {
3418
+ const { useToken: Tu } = Ue, { Text: di } = Bt, Ws = (e) => {
3419
3419
  const { title: t, children: n, action: r, openAction: o, parms: a, tooltip: s } = e, { token: l } = Tu(), c = Object.keys(a).length > 0;
3420
3420
  return /* @__PURE__ */ P(
3421
3421
  "div",
@@ -3475,7 +3475,7 @@ const { useToken: Tu } = He, { Text: di } = Bt, Ws = (e) => {
3475
3475
  ]
3476
3476
  }
3477
3477
  );
3478
- }, { useToken: Au } = He, Ou = (e) => {
3478
+ }, { useToken: Au } = Ue, Ou = (e) => {
3479
3479
  const { ooui: t } = e, n = t.actionId !== void 0;
3480
3480
  return /* @__PURE__ */ i(Re, { ooui: t, children: n ? /* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(Fu, { ooui: t }) }) : /* @__PURE__ */ i(_u, { ooui: t }) });
3481
3481
  }, _u = (e) => {
@@ -3510,7 +3510,7 @@ const { useToken: Tu } = He, { Text: di } = Bt, Ws = (e) => {
3510
3510
  ), d = ee(
3511
3511
  bt
3512
3512
  ), { openShortcut: f } = d || {};
3513
- if (se(() => {
3513
+ if (ie(() => {
3514
3514
  t && u();
3515
3515
  }, [t, o]), c && c.message !== "active_id_not_found")
3516
3516
  return /* @__PURE__ */ i(Ns, { error: c });
@@ -3556,12 +3556,34 @@ function Du(e) {
3556
3556
  return e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1);
3557
3557
  }
3558
3558
  const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Ys, { ...e }) }), Ys = (e) => {
3559
- const { t } = de(), { ooui: n, value: r } = e;
3560
- let o = r, a = $n, s = r;
3561
- if (n.selectionValues.size ? o = n.selectionValues.get(r) : Array.isArray(r) ? (s = r[0], o = r[1]) : n.fieldType === "boolean" && (o = r ? Du(n.label) : `${t("not")} ${n.label.toLowerCase()}`, a = Pd), !o)
3562
- return null;
3563
- const l = n.colors === "auto" ? a(s) : n.colors[s] || a(s);
3564
- return /* @__PURE__ */ i(Fo, { color: l, children: o });
3559
+ const { t } = de(), [n, r] = ze(
3560
+ k.getHandler().readObjects
3561
+ ), { getFieldValue: o } = ee(Be) || {}, { ooui: a, value: s } = e, [l, c] = C("default");
3562
+ let u = s, m = $n, d = s;
3563
+ a.selectionValues.size ? u = a.selectionValues.get(s) : Array.isArray(s) ? (d = s[0], u = s[1]) : a.fieldType === "boolean" && (u = s ? Du(a.label) : `${t("not")} ${a.label.toLowerCase()}`, m = Pd);
3564
+ const f = E(async () => {
3565
+ var h, p;
3566
+ if (a.colorField)
3567
+ if (a.fieldType === "many2one" && ((h = a.raw_props) != null && h.relation)) {
3568
+ const y = (p = (await n({
3569
+ model: a.raw_props.relation,
3570
+ ids: [s[0]],
3571
+ fieldsToRetrieve: [a.colorField]
3572
+ }))[0]) == null ? void 0 : p[a.colorField];
3573
+ if (y) {
3574
+ const v = y.includes("#") ? y : `#${y}`;
3575
+ c(v);
3576
+ }
3577
+ } else
3578
+ c(o(a.colorField));
3579
+ else
3580
+ c(
3581
+ a.colors === "auto" ? m(d) : a.colors[d] || m(d)
3582
+ );
3583
+ }, [a == null ? void 0 : a.colorField]);
3584
+ return ie(() => {
3585
+ f().catch((h) => console.error(h));
3586
+ }, [a == null ? void 0 : a.colorField]), u ? /* @__PURE__ */ i(Fo, { color: l, children: u }) : null;
3565
3587
  }, Fo = (e) => {
3566
3588
  let { color: t } = e, n = {};
3567
3589
  if (!ws(e.color) && !bs(e.color)) {
@@ -3578,7 +3600,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Ys,
3578
3600
  const { ooui: t } = e;
3579
3601
  return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(Pu, { ooui: t }) });
3580
3602
  }, Pu = (e) => {
3581
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [s, l] = C([]), [c, u] = C(), [m, d] = C(!1), { relation: f, context: h, readOnly: p, field: g } = n, y = ee(Ue), { getContext: v } = y || {};
3603
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [s, l] = C([]), [c, u] = C(), [m, d] = C(!1), { relation: f, context: h, readOnly: p, field: g } = n, y = ee(Be), { getContext: v } = y || {};
3582
3604
  Ft(() => {
3583
3605
  I();
3584
3606
  }, [o]);
@@ -4175,7 +4197,7 @@ const Ju = xt(qu), Qu = (e, t) => {
4175
4197
  }), n;
4176
4198
  }, Ks = () => {
4177
4199
  const [e, t] = C(!document.hidden);
4178
- return se(() => {
4200
+ return ie(() => {
4179
4201
  const n = () => {
4180
4202
  t(!document.hidden);
4181
4203
  };
@@ -4192,10 +4214,10 @@ const Ju = xt(qu), Qu = (e, t) => {
4192
4214
  fieldDefs: a,
4193
4215
  onAutorefreshableFieldsChange: s,
4194
4216
  isActive: l
4195
- } = e, c = G(null), [u, m] = C(!0), [d, f] = Je(
4217
+ } = e, c = G(null), [u, m] = C(!0), [d, f] = ze(
4196
4218
  k.getHandler().readObjects
4197
4219
  ), h = Ks();
4198
- se(() => {
4220
+ ie(() => {
4199
4221
  l === !1 && g(), (l === void 0 || l === !0) && !h && g(), (l === void 0 || l === !0) && h && y();
4200
4222
  }, [l, h]);
4201
4223
  const p = E(async () => {
@@ -4265,7 +4287,7 @@ function tf(e, t) {
4265
4287
  forcedValues: O = {},
4266
4288
  parentWidth: b,
4267
4289
  onMustRefreshParent: A
4268
- } = e, { t: _ } = de(), [R, x] = C(!1), [F, D] = C(), [V, N] = C(), [L] = Ct.useForm(), [B, Y] = C(), [$, K] = C(), Z = ee(Gs), [J, Q] = C(), [Ce, me] = C(!1), H = G(), j = G({}), q = G({}), ie = G(!1), te = G(!1), M = G(!1), oe = (b !== void 0 ? b : J) < ef, we = ee(Ue), { activeId: ge, getPlainValues: Pe } = we || {}, Be = G(!1), We = ee(
4290
+ } = e, { t: _ } = de(), [R, x] = C(!1), [F, D] = C(), [V, N] = C(), [L] = Ct.useForm(), [B, Y] = C(), [$, K] = C(), Z = ee(Gs), [J, Q] = C(), [Ce, me] = C(!1), H = G(), j = G({}), q = G({}), se = G(!1), te = G(!1), M = G(!1), oe = (b !== void 0 ? b : J) < ef, we = ee(Be), { activeId: ge, getPlainValues: Pe } = we || {}, He = G(!1), We = ee(
4269
4291
  mt
4270
4292
  ), {
4271
4293
  setFormIsSaving: Ee = void 0,
@@ -4290,7 +4312,7 @@ function tf(e, t) {
4290
4312
  clearAndReload: () => {
4291
4313
  H.current = void 0, N(void 0), Yn();
4292
4314
  }
4293
- })), se(() => {
4315
+ })), ie(() => {
4294
4316
  if (D(void 0), !(!n && !p)) {
4295
4317
  if (!I) {
4296
4318
  H.current = void 0, N(void 0);
@@ -4298,19 +4320,19 @@ function tf(e, t) {
4298
4320
  }
4299
4321
  (r === void 0 && $ || r !== void 0 && $ && r < 0) && (H.current = void 0, N(void 0)), Yn();
4300
4322
  }
4301
- }, [r, n, h, p, I]), se(() => {
4323
+ }, [r, n, h, p, I]), ie(() => {
4302
4324
  Ce && (Zt({
4303
4325
  elementHasLostFocus: !0
4304
4326
  }), me(!1));
4305
4327
  }, [Ce]);
4306
4328
  const ye = (U, W, ae, ce) => {
4307
- ue == null || ue(!1), Ee == null || Ee(!1), a == null || a(U, W, ae, ce), Te == null || Te(U), Be.current && (A == null || A());
4329
+ ue == null || ue(!1), Ee == null || Ee(!1), a == null || a(U, W, ae, ce), Te == null || Te(U), He.current && (A == null || A());
4308
4330
  }, Me = () => {
4309
- Be.current && (A == null || A()), Ee == null || Ee(!1), o == null || o();
4331
+ He.current && (A == null || A()), Ee == null || Ee(!1), o == null || o();
4310
4332
  }, Ze = (U) => {
4311
4333
  Ee == null || Ee(!1), u == null || u(U);
4312
4334
  }, be = E(() => r || H.current, [r]), [pt, Rt] = C(() => H.current);
4313
- se(() => {
4335
+ ie(() => {
4314
4336
  H.current !== pt && Rt(H.current);
4315
4337
  }, [H.current]);
4316
4338
  const re = X(() => r || pt, [r, pt]);
@@ -4662,10 +4684,10 @@ function tf(e, t) {
4662
4684
  reset: !1
4663
4685
  });
4664
4686
  }
4665
- if (ce.warning && ce.warning.title && ce.warning.message && !ie.current) {
4687
+ if (ce.warning && ce.warning.title && ce.warning.message && !se.current) {
4666
4688
  const { title: Oe, message: tt } = ce.warning;
4667
- ie.current = !0, Gu(Oe, tt, () => {
4668
- ie.current = !1;
4689
+ se.current = !0, Gu(Oe, tt, () => {
4690
+ se.current = !1;
4669
4691
  });
4670
4692
  }
4671
4693
  if (ce.domain && Object.keys(ce.domain).length > 0) {
@@ -4744,7 +4766,7 @@ function tf(e, t) {
4744
4766
  ...W
4745
4767
  },
4746
4768
  onRefreshParentValues: async () => {
4747
- Be.current = !0, await Dt({ forceRefresh: !0 });
4769
+ He.current = !0, await Dt({ forceRefresh: !0 });
4748
4770
  }
4749
4771
  })) || {};
4750
4772
  !T && ae && (ye == null || ye(be(), Se(), Ae()));
@@ -4899,7 +4921,7 @@ const Sn = xt(tf), Cn = (e) => {
4899
4921
  actionData: l,
4900
4922
  ...c
4901
4923
  } = e, { model: u } = c, { modalWidth: m } = yr(), [d, f] = C(r), [h, p] = C(!1), [g, y] = C(), { action_id: v, res_id: w, action_type: I, view_id: T } = l || {};
4902
- se(() => {
4924
+ ie(() => {
4903
4925
  s && S();
4904
4926
  }, [l, s]);
4905
4927
  async function S() {
@@ -4998,7 +5020,7 @@ const Sn = xt(tf), Cn = (e) => {
4998
5020
  context: r,
4999
5021
  enabled: o = !0
5000
5022
  }) => {
5001
- const [a, s] = C(!0), [l, c] = C(), [u, m] = C(), d = G(!1), [f, h] = Je(
5023
+ const [a, s] = C(!0), [l, c] = C(), [u, m] = C(), d = G(!1), [f, h] = ze(
5002
5024
  k.getHandler().getView
5003
5025
  );
5004
5026
  Ft(() => (o && p(), () => {
@@ -5154,9 +5176,9 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5154
5176
  bt
5155
5177
  ), { openRelate: u } = c || {}, m = ee(
5156
5178
  bn
5157
- ), { processAction: d } = m || {}, [f, h] = Je(
5179
+ ), { processAction: d } = m || {}, [f, h] = ze(
5158
5180
  k.getHandler().getView
5159
- ), [p, g] = Je(
5181
+ ), [p, g] = ze(
5160
5182
  k.getHandler().readObjects
5161
5183
  ), y = E(() => {
5162
5184
  h(), g();
@@ -5256,7 +5278,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5256
5278
  });
5257
5279
  a(h[0][1]), l(!1);
5258
5280
  }, [t, o]);
5259
- if (se(() => {
5281
+ if (ie(() => {
5260
5282
  d();
5261
5283
  }, [t]), !t && !s)
5262
5284
  return /* @__PURE__ */ i(le, {});
@@ -5283,7 +5305,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5283
5305
  }, Eo = () => {
5284
5306
  const { locale: e } = de();
5285
5307
  return ff[e];
5286
- }, { useToken: mf } = He, Et = {
5308
+ }, { useToken: mf } = Ue, Et = {
5287
5309
  date: {
5288
5310
  placeholder: "__/__/____",
5289
5311
  dateDisplayFormat: "DD/MM/YYYY",
@@ -5348,15 +5370,15 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5348
5370
  maxLength: n,
5349
5371
  readonly: r = !1
5350
5372
  }) => {
5351
- const { token: o } = He.useToken(), [a, s] = C(
5373
+ const { token: o } = Ue.useToken(), [a, s] = C(
5352
5374
  e ? e.split(";").map((y) => y.trim()).filter((y) => y) : []
5353
- ), [l, c] = C(""), u = G(null), m = ee(Ue), { elementHasLostFocus: d } = m || {}, f = E(
5375
+ ), [l, c] = C(""), u = G(null), m = ee(Be), { elementHasLostFocus: d } = m || {}, f = E(
5354
5376
  (y) => {
5355
5377
  t && t(y.join(";"));
5356
5378
  },
5357
5379
  [t]
5358
5380
  );
5359
- se(() => {
5381
+ ie(() => {
5360
5382
  f(a);
5361
5383
  }, [f, a]);
5362
5384
  const h = (y) => {
@@ -5541,7 +5563,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5541
5563
  l(!1);
5542
5564
  }
5543
5565
  }, [r, u, c, e == null ? void 0 : e.items]);
5544
- se(() => {
5566
+ ie(() => {
5545
5567
  e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && m();
5546
5568
  }, [e == null ? void 0 : e.items]);
5547
5569
  const d = X(
@@ -5588,7 +5610,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5588
5610
  dependencies: n = []
5589
5611
  }) => {
5590
5612
  const [r, o] = C(0);
5591
- return se(() => {
5613
+ return ie(() => {
5592
5614
  const s = () => {
5593
5615
  if (e.current) {
5594
5616
  const l = window.innerHeight, c = e.current.getBoundingClientRect(), u = l - c.top;
@@ -5611,12 +5633,12 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5611
5633
  );
5612
5634
  return { getColumnState: t, updateColumnState: n };
5613
5635
  }, Vf = (e) => {
5614
- se(() => () => {
5636
+ ie(() => () => {
5615
5637
  n(), o();
5616
5638
  }, []);
5617
- const [t, n] = Je(
5639
+ const [t, n] = ze(
5618
5640
  k.getHandler().readUserViewPrefs
5619
- ), [r, o] = Je(
5641
+ ), [r, o] = ze(
5620
5642
  k.getHandler().saveUserViewPrefs
5621
5643
  ), a = wt(async () => {
5622
5644
  if (!e)
@@ -5680,7 +5702,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5680
5702
  return { getColumnState: s, updateColumnState: l };
5681
5703
  }, ea = (e) => {
5682
5704
  const [t, n] = C(!0), r = G(void 0), o = G(!1), { getColumnState: a, updateColumnState: s } = Pf(e);
5683
- return se(() => {
5705
+ return ie(() => {
5684
5706
  if (!e) {
5685
5707
  n(!1);
5686
5708
  return;
@@ -5704,7 +5726,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5704
5726
  domain: n,
5705
5727
  showEmptyValues: r
5706
5728
  }) => {
5707
- const [o, a] = C(), [s, l] = C(!1), [c, u] = Je(
5729
+ const [o, a] = C(), [s, l] = C(!1), [c, u] = ze(
5708
5730
  k.getHandler().readAggregates
5709
5731
  ), m = Rn(() => {
5710
5732
  if (e)
@@ -5942,8 +5964,8 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
5942
5964
  }
5943
5965
  }
5944
5966
  )
5945
- ] }), { defaultAlgorithm: Bf, defaultSeed: Hf } = He, Uf = Bf(Hf), Po = ze((e) => {
5946
- const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: a } = t, s = ee(Ue), { elementHasLostFocus: l } = s || {}, c = X(() => a && !o, [a, o]), u = X(
5967
+ ] }), { defaultAlgorithm: Bf, defaultSeed: Hf } = Ue, Uf = Bf(Hf), Po = Je((e) => {
5968
+ const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: a } = t, s = ee(Be), { elementHasLostFocus: l } = s || {}, c = X(() => a && !o, [a, o]), u = X(
5947
5969
  () => c ? Wf : lr,
5948
5970
  [c]
5949
5971
  ), m = E((f) => f ? /* @__PURE__ */ i(vr, { content: f }) : null, []), d = E((f) => `${f}`.replace(/[^0-9.-]+/g, ""), []);
@@ -5968,8 +5990,8 @@ const Wf = ut(lr)`
5968
5990
  &.ant-input-number {
5969
5991
  background-color: ${Uf.colorPrimaryBg};
5970
5992
  }
5971
- `, { useToken: Yf } = He, { defaultAlgorithm: Gf, defaultSeed: Kf } = He, qf = Gf(Kf), En = ze((e) => {
5972
- const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: a } = t, { token: s } = Yf(), l = a && !o ? { backgroundColor: s.colorPrimaryBg } : void 0, c = ee(Ue), { elementHasLostFocus: u } = c || {}, m = X(() => a && !o, [a, o]), d = X(
5993
+ `, { useToken: Yf } = Ue, { defaultAlgorithm: Gf, defaultSeed: Kf } = Ue, qf = Gf(Kf), En = Je((e) => {
5994
+ const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: a } = t, { token: s } = Yf(), l = a && !o ? { backgroundColor: s.colorPrimaryBg } : void 0, c = ee(Be), { elementHasLostFocus: u } = c || {}, m = X(() => a && !o, [a, o]), d = X(
5973
5995
  () => m ? zf : lr,
5974
5996
  [m]
5975
5997
  ), f = E((g) => g ? /* @__PURE__ */ i(vr, { content: g }) : null, []), h = E((g) => g === void 0 ? "" : typeof g == "string" && !isNaN(parseFloat(g)) ? `${Math.trunc(parseFloat(g))}`.replace(/[^0-9\-]+/g, "") : typeof g == "number" ? `${Math.trunc(g)}`.replace(/[^0-9\-]+/g, "") : "", []), p = E(
@@ -6044,7 +6066,7 @@ function Jf(e) {
6044
6066
  )
6045
6067
  ] });
6046
6068
  }
6047
- const { defaultAlgorithm: Qf, defaultSeed: Xf } = He, Zf = Qf(Xf), { Option: em } = Jt, tm = (e) => {
6069
+ const { defaultAlgorithm: Qf, defaultSeed: Xf } = Ue, Zf = Qf(Xf), { Option: em } = Jt, tm = (e) => {
6048
6070
  const { ooui: t } = e, { required: n } = t;
6049
6071
  return /* @__PURE__ */ i(Re, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(nm, { ...e }) });
6050
6072
  }, nm = (e) => {
@@ -6121,7 +6143,7 @@ function ra(e) {
6121
6143
  );
6122
6144
  }
6123
6145
  }
6124
- const { useToken: om } = He, { Title: im } = Bt, { Header: sm, Content: am, Footer: lm } = es, cm = ({
6146
+ const { useToken: om } = Ue, { Title: im } = Bt, { Header: sm, Content: am, Footer: lm } = es, cm = ({
6125
6147
  isOpen: e,
6126
6148
  onClose: t,
6127
6149
  children: n,
@@ -6139,7 +6161,7 @@ const { useToken: om } = He, { Title: im } = Bt, { Header: sm, Content: am, Foot
6139
6161
  },
6140
6162
  [t]
6141
6163
  );
6142
- se(() => (e ? (s(!0), document.addEventListener("keydown", m), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", m), document.body.style.overflow = ""), () => {
6164
+ ie(() => (e ? (s(!0), document.addEventListener("keydown", m), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", m), document.body.style.overflow = ""), () => {
6143
6165
  document.removeEventListener("keydown", m), document.body.style.overflow = "";
6144
6166
  }), [e, m]);
6145
6167
  const d = () => {
@@ -6985,7 +7007,7 @@ var sh = _a;
6985
7007
  const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
6986
7008
  (e, t) => {
6987
7009
  const { onSubmit: n, searchValues: r, searchFields: o, onChange: a } = e, [s] = Ct.useForm();
6988
- se(() => {
7010
+ ie(() => {
6989
7011
  s.setFieldsValue(r);
6990
7012
  }, [r]), Tt(t, () => ({
6991
7013
  submit: s.submit,
@@ -7037,7 +7059,7 @@ const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
7037
7059
  ), lh = (e) => {
7038
7060
  var I;
7039
7061
  const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: a, searchValues: s } = e, l = G(), { t: c } = de(), [u, m] = C(), d = G(null), [f, h] = C();
7040
- se(() => {
7062
+ ie(() => {
7041
7063
  n && h(void 0);
7042
7064
  }, [n]), Ft(() => {
7043
7065
  l.current = new as(o, a, 1), l.current.parse(), m(l.current._advancedSearchContainer);
@@ -7192,7 +7214,7 @@ function uh(e) {
7192
7214
  ] })
7193
7215
  ] });
7194
7216
  }
7195
- const { useToken: fh } = He;
7217
+ const { useToken: fh } = Ue;
7196
7218
  function Lo(e) {
7197
7219
  const {
7198
7220
  fields: t,
@@ -7209,7 +7231,7 @@ function Lo(e) {
7209
7231
  searchValues: f,
7210
7232
  showLimitOptions: h = !0
7211
7233
  } = e, [p, g] = C(), [y, v] = C(), [w, I] = C(!1), T = G(), { token: S } = fh(), [O] = Ct.useForm();
7212
- se(() => {
7234
+ ie(() => {
7213
7235
  O.setFieldsValue(f);
7214
7236
  }, [f]);
7215
7237
  const b = () => {
@@ -7366,10 +7388,10 @@ const ph = 3 * 1e3, hh = (e) => {
7366
7388
  autorefreshableFields: o,
7367
7389
  fieldDefs: a,
7368
7390
  isActive: s
7369
- } = e, l = G(null), [c, u] = C(!0), [m, d] = Je(
7391
+ } = e, l = G(null), [c, u] = C(!0), [m, d] = ze(
7370
7392
  k.getHandler().readObjects
7371
7393
  ), f = Ks();
7372
- se(() => {
7394
+ ie(() => {
7373
7395
  s === !1 && p(), (s === void 0 || s === !0) && !f && p(), (s === void 0 || s === !0) && f && g();
7374
7396
  }, [s, f]);
7375
7397
  const h = E(async () => {
@@ -7454,14 +7476,14 @@ function vh(e, t) {
7454
7476
  setResults: H,
7455
7477
  results: j,
7456
7478
  setSearchQuery: q,
7457
- setTotalItems: ie,
7479
+ setTotalItems: se,
7458
7480
  isActive: te,
7459
7481
  sortState: M,
7460
7482
  setSortState: ne
7461
7483
  } = mh({ useLocalState: !c }), oe = d || Ce, we = G(oe);
7462
- se(() => {
7484
+ ie(() => {
7463
7485
  Ne();
7464
- }, []), se(() => {
7486
+ }, []), ie(() => {
7465
7487
  var ve;
7466
7488
  (oe !== void 0 && we.current === void 0 || typeof oe == "string" && typeof we.current == "string" && oe !== we.current) && (K == null || K([]), Q == null || Q({}), (ve = g.current) == null || ve.unselectAll(), It()), we.current = oe;
7467
7489
  }, [oe]);
@@ -7486,7 +7508,7 @@ function vh(e, t) {
7486
7508
  },
7487
7509
  u
7488
7510
  );
7489
- }, [ge, u]), Be = X(() => {
7511
+ }, [ge, u]), He = X(() => {
7490
7512
  if (!F)
7491
7513
  return kf({
7492
7514
  treeViewId: R == null ? void 0 : R.view_id,
@@ -7496,14 +7518,14 @@ function vh(e, t) {
7496
7518
  loading: We,
7497
7519
  getColumnState: Ee,
7498
7520
  updateColumnState: ue
7499
- } = ea(Be), Te = X(
7521
+ } = ea(He), Te = X(
7500
7522
  () => mn(J || [], s),
7501
7523
  [s, J]
7502
7524
  ), xe = E(() => {
7503
7525
  const Ge = `${JSON.stringify(oe ? s : Te)}-${oe}`;
7504
7526
  return Ge !== ht.current ? (ht.current = Ge, !0) : !1;
7505
7527
  }, [s, Te, oe]), Ne = E(async () => {
7506
- O(void 0), ie(0), T(!0);
7528
+ O(void 0), se(0), T(!0);
7507
7529
  try {
7508
7530
  const ve = await k.getHandler().searchCount({
7509
7531
  params: oe ? s : Te,
@@ -7511,7 +7533,7 @@ function vh(e, t) {
7511
7533
  context: u,
7512
7534
  name_search: oe
7513
7535
  });
7514
- O(ve), ie(ve);
7536
+ O(ve), se(ve);
7515
7537
  } catch (ve) {
7516
7538
  w(ve);
7517
7539
  } finally {
@@ -7523,7 +7545,7 @@ function vh(e, t) {
7523
7545
  n,
7524
7546
  oe,
7525
7547
  u,
7526
- ie,
7548
+ se,
7527
7549
  w
7528
7550
  ]), z = wt(
7529
7551
  async ({
@@ -7576,7 +7598,7 @@ function vh(e, t) {
7576
7598
  H == null || H(ct);
7577
7599
  }
7578
7600
  if (Ot.current = St, Pt.length === 0)
7579
- return y.current = [], O(0), ie(0), [];
7601
+ return y.current = [], O(0), se(0), [];
7580
7602
  const Zt = br(ge, Pt), Tr = fn(Xt);
7581
7603
  if (h.current = {
7582
7604
  ...h.current,
@@ -7602,7 +7624,7 @@ function vh(e, t) {
7602
7624
  H,
7603
7625
  ne,
7604
7626
  q,
7605
- ie,
7627
+ se,
7606
7628
  ge,
7607
7629
  R
7608
7630
  ]
@@ -7629,12 +7651,12 @@ function vh(e, t) {
7629
7651
  state: qe
7630
7652
  });
7631
7653
  } catch (lt) {
7632
- throw console.error(lt), O(null), ie(0), w(lt), lt;
7654
+ throw console.error(lt), O(null), se(0), w(lt), lt;
7633
7655
  } finally {
7634
7656
  D == null || D(!1);
7635
7657
  }
7636
7658
  },
7637
- [z, ie, D, w]
7659
+ [z, se, D, w]
7638
7660
  ), ke = E((ve) => {
7639
7661
  var Ge, qe, lt, St;
7640
7662
  if (h.current[(qe = (Ge = ve.node) == null ? void 0 : Ge.data) == null ? void 0 : qe.id])
@@ -7971,23 +7993,23 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
7971
7993
  var q;
7972
7994
  (q = A.current) == null || q.unselectAll();
7973
7995
  }
7974
- })), se(() => {
7996
+ })), ie(() => {
7975
7997
  const q = Mt(a);
7976
7998
  D(q), q.string && B !== q.string && (Y == null || Y(q.string));
7977
- }, [a, B]), se(() => {
7999
+ }, [a, B]), ie(() => {
7978
8000
  if (!F)
7979
8001
  return;
7980
8002
  x.current = !1;
7981
8003
  const q = br(F, s);
7982
8004
  R(q);
7983
- }, [s]), se(() => {
8005
+ }, [s]), ie(() => {
7984
8006
  N.current = r;
7985
8007
  }, [r]);
7986
8008
  const K = (n - 1) * N.current + 1, Z = K - 1 + _.length, J = o === void 0 ? null : o === 0 ? V("no_results") : V("summary").replace("{from}", K == null ? void 0 : K.toString()).replace("{to}", Z == null ? void 0 : Z.toString()).replace("{total}", o == null ? void 0 : o.toString()), Q = X(() => {
7987
8009
  if (!m || a.isExpandable)
7988
8010
  return null;
7989
8011
  const q = _ == null ? void 0 : _.filter(
7990
- (ie) => d && d.includes(ie.id)
8012
+ (se) => d && d.includes(se.id)
7991
8013
  ).length;
7992
8014
  return c ? null : o === void 0 ? /* @__PURE__ */ i(Ke, { className: "pb-4" }) : /* @__PURE__ */ P(je, { align: "bottom", className: "pb-4", children: [
7993
8015
  /* @__PURE__ */ i(Ie, { span: b ? 8 : 12, children: /* @__PURE__ */ i(
@@ -8029,11 +8051,11 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
8029
8051
  const q = F.columns.filter((M) => M.sum !== void 0).map((M) => ({ label: M.sum, field: M.id }));
8030
8052
  if (!q || q.length === 0)
8031
8053
  return null;
8032
- const ie = [], te = (d == null ? void 0 : d.length) > 0 ? _.filter((M) => d.includes(M.id)) : _;
8054
+ const se = [], te = (d == null ? void 0 : d.length) > 0 ? _.filter((M) => d.includes(M.id)) : _;
8033
8055
  return q.forEach((M) => {
8034
8056
  const ne = te.reduce((oe, we) => we[M.field] && !isNaN(we[M.field]) ? oe + we[M.field] : oe, 0);
8035
- ie.push(`${M.label}: ${Math.round(ne * 100) / 100}`);
8036
- }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ie.join(", ") });
8057
+ se.push(`${M.label}: ${Math.round(ne * 100) / 100}`);
8058
+ }), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: se.join(", ") });
8037
8059
  }, [_, d, F]), me = X(() => {
8038
8060
  if (F !== null && $ && $.length > 0)
8039
8061
  return wh($, _, 600);
@@ -8074,7 +8096,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
8074
8096
  Ce
8075
8097
  ] });
8076
8098
  }
8077
- ), Un = ze(Da);
8099
+ ), Un = Je(Da);
8078
8100
  Un.displayName = "Tree";
8079
8101
  Da.displayName = "UnmemoizedTree";
8080
8102
  const Ea = (e) => {
@@ -8103,7 +8125,7 @@ const Ea = (e) => {
8103
8125
  searchParams: O = [],
8104
8126
  setSearchValues: b,
8105
8127
  clearSelection: A
8106
- } = e, [_, R] = C(!1), [x, F] = C(!1), [D, V] = C(), [N, L] = C(1), [B, Y] = C(0), [$, K] = C(), [Z, J] = C([]), [Q, Ce] = C(void 0), [me, H] = C(void 0), j = G(T || jt), q = G([]), ie = E(
8128
+ } = e, [_, R] = C(!1), [x, F] = C(!1), [D, V] = C(), [N, L] = C(1), [B, Y] = C(0), [$, K] = C(), [Z, J] = C([]), [Q, Ce] = C(void 0), [me, H] = C(void 0), j = G(T || jt), q = G([]), se = E(
8107
8129
  (ue) => {
8108
8130
  y == null || y([...ue]), J([...ue]);
8109
8131
  },
@@ -8133,12 +8155,12 @@ const Ea = (e) => {
8133
8155
  sorter: h,
8134
8156
  fields: { ...d.fields, ...f.fields }
8135
8157
  }) : [...q.current];
8136
- ie(ke), Ye.length > 0 ? g == null || g(0) : g == null || g(void 0);
8158
+ se(ke), Ye.length > 0 ? g == null || g(0) : g == null || g(void 0);
8137
8159
  } else
8138
- ie([]), g == null || g(void 0);
8160
+ se([]), g == null || g(void 0);
8139
8161
  R(!1), c.current = !0;
8140
8162
  }, [
8141
- ie,
8163
+ se,
8142
8164
  c,
8143
8165
  l,
8144
8166
  t,
@@ -8168,7 +8190,7 @@ const Ea = (e) => {
8168
8190
  sorter: h,
8169
8191
  fields: { ...d.fields, ...f.fields }
8170
8192
  }) : [...q.current];
8171
- if (ie(ye), v && ye.length > 0) {
8193
+ if (se(ye), v && ye.length > 0) {
8172
8194
  const Ze = ye.findIndex(
8173
8195
  (be) => I === be.id
8174
8196
  );
@@ -8182,7 +8204,7 @@ const Ea = (e) => {
8182
8204
  [
8183
8205
  g,
8184
8206
  v,
8185
- ie,
8207
+ se,
8186
8208
  I,
8187
8209
  t,
8188
8210
  u,
@@ -8223,7 +8245,7 @@ const Ea = (e) => {
8223
8245
  sorter: ue,
8224
8246
  fields: { ...d.fields, ...f.fields }
8225
8247
  }) : [...q.current];
8226
- ie(Te);
8248
+ se(Te);
8227
8249
  },
8228
8250
  [
8229
8251
  h,
@@ -8231,7 +8253,7 @@ const Ea = (e) => {
8231
8253
  te,
8232
8254
  d == null ? void 0 : d.fields,
8233
8255
  f == null ? void 0 : f.fields,
8234
- ie
8256
+ se
8235
8257
  ]
8236
8258
  ), ge = E(
8237
8259
  (ue) => {
@@ -8256,7 +8278,7 @@ const Ea = (e) => {
8256
8278
  R(!0), L(ue), Y((ue - 1) * T);
8257
8279
  },
8258
8280
  [R, T, Y, L]
8259
- ), Be = E(() => {
8281
+ ), He = E(() => {
8260
8282
  _ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), Y(0), L(1), S == null || S(T || jt));
8261
8283
  }, [
8262
8284
  _,
@@ -8273,9 +8295,9 @@ const Ea = (e) => {
8273
8295
  fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
8274
8296
  context: u
8275
8297
  });
8276
- return ie([...te(), ...xe]), br(Mt(d), xe);
8298
+ return se([...te(), ...xe]), br(Mt(d), xe);
8277
8299
  },
8278
- [d, t, u, te, ie]
8300
+ [d, t, u, te, se]
8279
8301
  ), Ee = E(async () => await k.getHandler().searchAllIds({
8280
8302
  params: mn(O, w),
8281
8303
  model: t,
@@ -8284,7 +8306,7 @@ const Ea = (e) => {
8284
8306
  }), [t, u, $, O, w]);
8285
8307
  return {
8286
8308
  submit: ge,
8287
- clear: Be,
8309
+ clear: He,
8288
8310
  fetchResults: oe,
8289
8311
  tableRefreshing: _,
8290
8312
  searchFilterLoading: x,
@@ -8332,7 +8354,7 @@ function Ch(e, t) {
8332
8354
  searchVisible: H = !0,
8333
8355
  setSearchVisible: j = void 0,
8334
8356
  sorter: q = void 0,
8335
- setSorter: ie = void 0,
8357
+ setSorter: se = void 0,
8336
8358
  setTotalItems: te = void 0,
8337
8359
  setSearchTreeNameSearch: M = void 0,
8338
8360
  setTreeIsLoading: ne = void 0,
@@ -8340,7 +8362,7 @@ function Ch(e, t) {
8340
8362
  setSearchValues: we = void 0,
8341
8363
  limit: ge = jt,
8342
8364
  setLimit: Pe = void 0
8343
- } = (m ? B : {}) || {}, Be = E(
8365
+ } = (m ? B : {}) || {}, He = E(
8344
8366
  (De) => {
8345
8367
  Q == null || Q(De.map((gt) => ({ id: gt }))), f == null || f(De);
8346
8368
  },
@@ -8366,7 +8388,7 @@ function Ch(e, t) {
8366
8388
  } = Ea({
8367
8389
  model: I,
8368
8390
  setSearchTreeNameSearch: M,
8369
- setSelectedRowItems: Be,
8391
+ setSelectedRowItems: He,
8370
8392
  setSearchParams: me,
8371
8393
  setSearchValues: we,
8372
8394
  searchParams: Ce,
@@ -8378,7 +8400,7 @@ function Ch(e, t) {
8378
8400
  formView: b,
8379
8401
  treeView: S,
8380
8402
  sorter: q,
8381
- setSorter: ie,
8403
+ setSorter: se,
8382
8404
  setCurrentItemIndex: $,
8383
8405
  setResultsActionView: Y,
8384
8406
  resultsActionView: Z,
@@ -8395,7 +8417,7 @@ function Ch(e, t) {
8395
8417
  },
8396
8418
  getFields: () => S == null ? void 0 : S.fields,
8397
8419
  getDomain: () => c
8398
- })), se(() => {
8420
+ })), ie(() => {
8399
8421
  g && u && S && (v.current = !1, ue());
8400
8422
  }, [z, _e, g, u, s, S]);
8401
8423
  const Rt = async () => {
@@ -8422,7 +8444,7 @@ function Ch(e, t) {
8422
8444
  context: d
8423
8445
  })), A(De), O(gt);
8424
8446
  };
8425
- se(() => {
8447
+ ie(() => {
8426
8448
  Rt();
8427
8449
  }, [n]);
8428
8450
  const he = E(
@@ -8513,7 +8535,7 @@ function Ch(e, t) {
8513
8535
  colorsForResults: Me,
8514
8536
  statusForResults: Ze,
8515
8537
  selectedRowKeys: ht,
8516
- onRowSelectionChange: Be,
8538
+ onRowSelectionChange: He,
8517
8539
  sorter: q,
8518
8540
  onChangeSort: fe,
8519
8541
  onFetchChildrenForRecord: S.isExpandable ? ye : void 0,
@@ -8524,7 +8546,7 @@ function Ch(e, t) {
8524
8546
  )
8525
8547
  ] }), [
8526
8548
  $e,
8527
- Be,
8549
+ He,
8528
8550
  fe,
8529
8551
  Ee,
8530
8552
  Me,
@@ -8679,7 +8701,7 @@ const Va = xt(Ch), jo = ({
8679
8701
  }
8680
8702
  )
8681
8703
  ] });
8682
- }, { defaultAlgorithm: xh, defaultSeed: Ih } = He, Pa = xh(Ih), Th = (e) => {
8704
+ }, { defaultAlgorithm: xh, defaultSeed: Ih } = Ue, Pa = xh(Ih), Th = (e) => {
8683
8705
  const { ooui: t } = e, { required: n } = t;
8684
8706
  return /* @__PURE__ */ i(Re, { required: n, type: "array", validator: async (o, a) => {
8685
8707
  if (!a)
@@ -8697,10 +8719,10 @@ const Va = xt(Ch), jo = ({
8697
8719
  context: l,
8698
8720
  id: c,
8699
8721
  domain: u
8700
- } = r, m = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, f] = C(!1), [h, p] = C(!1), [g, y] = C(!1), [v, w] = C(), I = G(!1), [T, S] = C(""), O = G(), b = ee(Ue), { domain: A, getValues: _, getFields: R, getContext: x, elementHasLostFocus: F } = b || {}, D = G([]), [V, N] = C([]), L = t && t[0] || void 0, B = t && t[1] || "";
8701
- se(() => {
8722
+ } = r, m = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, f] = C(!1), [h, p] = C(!1), [g, y] = C(!1), [v, w] = C(), I = G(!1), [T, S] = C(""), O = G(), b = ee(Be), { domain: A, getValues: _, getFields: R, getContext: x, elementHasLostFocus: F } = b || {}, D = G([]), [V, N] = C([]), L = t && t[0] || void 0, B = t && t[1] || "";
8723
+ ie(() => {
8702
8724
  !Array.isArray(t) && t && J(t);
8703
- }, [t]), se(() => {
8725
+ }, [t]), ie(() => {
8704
8726
  L && B.length === 0 ? J(L) : L && B.length > 0 ? S(B) : !L && !B && S(O.current || "");
8705
8727
  }, [t]);
8706
8728
  const Y = (H) => {
@@ -9123,7 +9145,7 @@ const Va = xt(Ch), jo = ({
9123
9145
  actionButtonProps: l,
9124
9146
  printButtonProps: c
9125
9147
  };
9126
- }, { useToken: Fh } = He;
9148
+ }, { useToken: Fh } = Ue;
9127
9149
  function Rh(e) {
9128
9150
  const {
9129
9151
  title: t,
@@ -9214,7 +9236,7 @@ function Rh(e) {
9214
9236
  ] })
9215
9237
  ] });
9216
9238
  }
9217
- const Ha = ze(({ title: e, token: t }) => /* @__PURE__ */ i(
9239
+ const Ha = Je(({ title: e, token: t }) => /* @__PURE__ */ i(
9218
9240
  "div",
9219
9241
  {
9220
9242
  className: "flex flex-grow h-8 text-white",
@@ -9226,9 +9248,9 @@ const Ha = ze(({ title: e, token: t }) => /* @__PURE__ */ i(
9226
9248
  }
9227
9249
  ));
9228
9250
  Ha.displayName = "Title";
9229
- const An = ze(() => /* @__PURE__ */ i("div", { className: "inline-block w-3" }));
9251
+ const An = Je(() => /* @__PURE__ */ i("div", { className: "inline-block w-3" }));
9230
9252
  An.displayName = "Separator";
9231
- const Ua = ze(
9253
+ const Ua = Je(
9232
9254
  ({
9233
9255
  currentItemIndex: e,
9234
9256
  totalItems: t
@@ -9244,7 +9266,7 @@ const Ua = ze(
9244
9266
  }
9245
9267
  );
9246
9268
  Ua.displayName = "ItemIndex";
9247
- const Wa = ze(
9269
+ const Wa = Je(
9248
9270
  ({
9249
9271
  currentItemIndex: e,
9250
9272
  totalItems: t,
@@ -9281,7 +9303,7 @@ const Wa = ze(
9281
9303
  }
9282
9304
  );
9283
9305
  Wa.displayName = "ItemBrowser";
9284
- const Ya = ze(
9306
+ const Ya = Je(
9285
9307
  ({
9286
9308
  isMany2Many: e,
9287
9309
  totalItems: t,
@@ -9305,7 +9327,7 @@ const Ya = ze(
9305
9327
  }
9306
9328
  );
9307
9329
  Ya.displayName = "DeleteButton";
9308
- const Ga = ze(Rh), Dh = {
9330
+ const Ga = Je(Rh), Dh = {
9309
9331
  form: ss,
9310
9332
  tree: ns,
9311
9333
  graph: yn
@@ -9321,7 +9343,7 @@ const Vh = (e) => {
9321
9343
  var pt, Rt;
9322
9344
  const { value: t, onChange: n, ooui: r, views: o } = e, { items: a = [] } = t || {}, { currentView: s, setCurrentView: l, itemIndex: c, setItemIndex: u } = ee(
9323
9345
  xn
9324
- ), m = ee(Ue), {
9346
+ ), m = ee(Be), {
9325
9347
  activeId: d,
9326
9348
  getFields: f,
9327
9349
  getValues: h,
@@ -9333,10 +9355,10 @@ const Vh = (e) => {
9333
9355
  relation: H,
9334
9356
  context: j,
9335
9357
  domain: q
9336
- } = r, ie = r.type === "many2many", { id: te } = r, M = a.filter(
9358
+ } = r, se = r.type === "many2many", { id: te } = r, M = a.filter(
9337
9359
  (re) => (re.values || re.treeValues) && re.operation !== "pendingRemove"
9338
9360
  ), ne = G();
9339
- se(() => {
9361
+ ie(() => {
9340
9362
  if (ne.current !== s) {
9341
9363
  ne.current = s, oe();
9342
9364
  return;
@@ -9346,8 +9368,8 @@ const Vh = (e) => {
9346
9368
  const oe = E(() => {
9347
9369
  (s === "form" && a.some((re) => !re.values) || s === "tree" && a.some((re) => !re.treeValues)) && ge();
9348
9370
  }, [a, s]);
9349
- se(() => {
9350
- Be();
9371
+ ie(() => {
9372
+ He();
9351
9373
  }, [g]);
9352
9374
  const we = (re) => {
9353
9375
  var he, Se;
@@ -9381,7 +9403,7 @@ const Vh = (e) => {
9381
9403
  S(!1);
9382
9404
  }
9383
9405
  };
9384
- async function Be() {
9406
+ async function He() {
9385
9407
  q && (Y.current = await k.getHandler().evalDomain({
9386
9408
  domain: q,
9387
9409
  values: Qt({
@@ -9437,7 +9459,7 @@ const Vh = (e) => {
9437
9459
  }
9438
9460
  }) : re();
9439
9461
  }, Ne = () => {
9440
- if (ie) {
9462
+ if (se) {
9441
9463
  Ma({
9442
9464
  t: v,
9443
9465
  onOk: async () => {
@@ -9642,7 +9664,7 @@ const Vh = (e) => {
9642
9664
  mode: s,
9643
9665
  title: Me(),
9644
9666
  readOnly: me || !1,
9645
- isMany2Many: ie,
9667
+ isMany2Many: se,
9646
9668
  formHasChanges: w,
9647
9669
  totalItems: M.length,
9648
9670
  currentItemIndex: c,
@@ -9711,8 +9733,8 @@ const Vh = (e) => {
9711
9733
  getValues: o,
9712
9734
  getContext: a,
9713
9735
  domain: s
9714
- } = ee(Ue) || {};
9715
- se(() => {
9736
+ } = ee(Be) || {};
9737
+ ie(() => {
9716
9738
  l();
9717
9739
  }, [s]);
9718
9740
  async function l() {
@@ -9799,7 +9821,7 @@ const Vh = (e) => {
9799
9821
  triggerChange: a
9800
9822
  }) => {
9801
9823
  const [s, l] = C(!1), { itemIndex: c } = ee(xn), { t: u } = de();
9802
- se(() => {
9824
+ ie(() => {
9803
9825
  const p = e[c];
9804
9826
  (!p || (p == null ? void 0 : p.operation) === "original") && l(!1);
9805
9827
  }, [c, e]);
@@ -10221,7 +10243,7 @@ const jh = ({
10221
10243
  context: p,
10222
10244
  domain: g,
10223
10245
  id: y
10224
- } = o, v = ee(Ue), {
10246
+ } = o, v = ee(Be), {
10225
10247
  activeId: w,
10226
10248
  getContext: I,
10227
10249
  fetchValues: T
@@ -10276,7 +10298,7 @@ const jh = ({
10276
10298
  modalItem: H,
10277
10299
  continuousEntryMode: j,
10278
10300
  onCancelFormModal: q,
10279
- onFormModalSubmitSucceed: ie,
10301
+ onFormModalSubmitSucceed: se,
10280
10302
  createItem: te,
10281
10303
  openItemInFormModal: M
10282
10304
  } = jh({
@@ -10311,7 +10333,7 @@ const jh = ({
10311
10333
  setFormHasChanges: Ce,
10312
10334
  selectedRowKeys: F,
10313
10335
  setSelectedRowKeys: D
10314
- }), Be = () => {
10336
+ }), He = () => {
10315
10337
  const z = Array.from(a.keys()), pe = z[(z.indexOf(c) + 1) % z.length];
10316
10338
  c === "form" ? Q(() => {
10317
10339
  u(pe);
@@ -10355,7 +10377,7 @@ const jh = ({
10355
10377
  currentItemIndex: m,
10356
10378
  onDelete: Pe,
10357
10379
  onCreateItem: te,
10358
- onToggleViewMode: Be,
10380
+ onToggleViewMode: He,
10359
10381
  onPreviousItem: Ee,
10360
10382
  onNextItem: ue,
10361
10383
  onSearchItem: ge,
@@ -10418,7 +10440,7 @@ const jh = ({
10418
10440
  values: H == null ? void 0 : H.values,
10419
10441
  defaultValues: H == null ? void 0 : H.defaultValues,
10420
10442
  visible: me,
10421
- onSubmitSucceed: ie,
10443
+ onSubmitSucceed: se,
10422
10444
  parentContext: A,
10423
10445
  onCancel: q,
10424
10446
  readOnly: f,
@@ -10459,19 +10481,15 @@ const jh = ({
10459
10481
  var S;
10460
10482
  const { ooui: t } = e, { mode: n, relation: r, views: o, required: a, context: s } = t;
10461
10483
  let l;
10462
- const [c, u] = C(!0), [m, d] = C(), [f, h] = C(/* @__PURE__ */ new Map()), p = ee(Ue), { getContext: g, formView: y } = p || {}, { view_id: v } = y || {};
10484
+ const [c, u] = C(!0), [m, d] = C(), [f, h] = C(/* @__PURE__ */ new Map()), p = ee(Be), { getContext: g, formView: y } = p || {}, { view_id: v } = y || {};
10463
10485
  Ft(() => {
10464
10486
  I();
10465
10487
  }, [t]);
10466
- const w = async (O) => (k.getHandler().getView({
10467
- model: r,
10468
- type: O,
10469
- context: { ...g == null ? void 0 : g(), ...s }
10470
- }), o && o[O] ? o[O] : await k.getHandler().getView({
10488
+ const w = async (O) => o && o[O] ? o[O] : await k.getHandler().getView({
10471
10489
  model: r,
10472
10490
  type: O,
10473
10491
  context: { ...g == null ? void 0 : g(), ...s }
10474
- })), I = async () => {
10492
+ }), I = async () => {
10475
10493
  u(!0), d(void 0);
10476
10494
  try {
10477
10495
  if (n && n.length > 0) {
@@ -10520,12 +10538,12 @@ const jh = ({
10520
10538
  }, Jh = (e) => {
10521
10539
  const { ooui: t, value: n } = e;
10522
10540
  return t.infinite || n && Array.isArray(n.items) && n.items.length >= qh ? /* @__PURE__ */ i(Kh, { ...e }) : /* @__PURE__ */ i(Vh, { ...e });
10523
- }, { useToken: Qh } = He, Xh = (e) => {
10541
+ }, { useToken: Qh } = Ue, Xh = (e) => {
10524
10542
  const { ooui: t } = e, { required: n } = t;
10525
10543
  return /* @__PURE__ */ i(Re, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(Zh, { ooui: t }) });
10526
10544
  }, Zh = (e) => {
10527
- const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: a, required: s } = t, { token: l } = Qh(), c = s && !a ? { backgroundColor: l.colorPrimaryBg } : void 0, u = G(), [m, d] = C(), f = ee(Ue), { elementHasLostFocus: h } = f || {};
10528
- se(() => {
10545
+ const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: a, required: s } = t, { token: l } = Qh(), c = s && !a ? { backgroundColor: l.colorPrimaryBg } : void 0, u = G(), [m, d] = C(), f = ee(Be), { elementHasLostFocus: h } = f || {};
10546
+ ie(() => {
10529
10547
  d(Js(n));
10530
10548
  }, [n]);
10531
10549
  const p = (v) => {
@@ -10609,7 +10627,7 @@ const { TabPane: eg } = ts, tg = ut(ts)`
10609
10627
  }
10610
10628
  `;
10611
10629
  function ng(e) {
10612
- const { ooui: t, responsiveBehaviour: n } = e, r = t.pages, { token: o } = He.useToken();
10630
+ const { ooui: t, responsiveBehaviour: n } = e, r = t.pages, { token: o } = Ue.useToken();
10613
10631
  function a(s) {
10614
10632
  if (s) {
10615
10633
  const l = ft(s);
@@ -10644,8 +10662,8 @@ function ng(e) {
10644
10662
  }
10645
10663
  );
10646
10664
  }
10647
- const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
10648
- const { ooui: t } = e, { id: n, readOnly: r, required: o, height: a, translatable: s } = t, { token: l } = rg(), c = o && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ee(Ue), { elementHasLostFocus: m } = u || {};
10665
+ const { useToken: rg } = Ue, { TextArea: ro } = rt, og = (e) => {
10666
+ const { ooui: t } = e, { id: n, readOnly: r, required: o, height: a, translatable: s } = t, { token: l } = rg(), c = o && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ee(Be), { elementHasLostFocus: m } = u || {};
10649
10667
  return /* @__PURE__ */ i(Re, { required: o, ...e, children: s ? /* @__PURE__ */ i(
10650
10668
  ig,
10651
10669
  {
@@ -10674,7 +10692,7 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
10674
10692
  onChange: r,
10675
10693
  height: o
10676
10694
  }) => {
10677
- const a = ee(Ue), {
10695
+ const a = ee(Be), {
10678
10696
  activeId: s,
10679
10697
  activeModel: l,
10680
10698
  fetchValues: c,
@@ -11060,7 +11078,7 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
11060
11078
  return /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(Sg, { ooui: t }) });
11061
11079
  }, Sg = (e) => {
11062
11080
  const { value: t, onChange: n, ooui: r } = e, { required: o, selectionValues: a, readOnly: s, domain: l } = r, c = t == null ? void 0 : t.split(","), [u, m] = C([]), [d, f] = C();
11063
- return se(() => {
11081
+ return ie(() => {
11064
11082
  if (!t) {
11065
11083
  f(void 0), m([]);
11066
11084
  return;
@@ -11106,11 +11124,11 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
11106
11124
  }
11107
11125
  ) })
11108
11126
  ] });
11109
- }, { useToken: Cg } = He, xg = (e) => {
11127
+ }, { useToken: Cg } = Ue, xg = (e) => {
11110
11128
  const { ooui: t } = e, { required: n } = t;
11111
11129
  return /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(Ig, { ooui: t }) });
11112
11130
  }, Ig = (e) => {
11113
- const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: s } = t, { token: l } = Cg(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = G(null), { setFieldValue: m, getFieldValue: d } = ee(Ue) || {}, { t: f } = de(), h = n ? pd(n) : "", p = (I) => {
11131
+ const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: s } = t, { token: l } = Cg(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = G(null), { setFieldValue: m, getFieldValue: d } = ee(Be) || {}, { t: f } = de(), h = n ? pd(n) : "", p = (I) => {
11114
11132
  r == null || r(I);
11115
11133
  };
11116
11134
  async function g() {
@@ -11510,7 +11528,7 @@ function Ag(e) {
11510
11528
  },
11511
11529
  [a]
11512
11530
  );
11513
- return se(() => {
11531
+ return ie(() => {
11514
11532
  p();
11515
11533
  }, [p]), /* @__PURE__ */ P(le, { children: [
11516
11534
  /* @__PURE__ */ i(
@@ -11549,10 +11567,10 @@ const Og = () => {
11549
11567
  setCurrentItemIndex: o,
11550
11568
  results: a,
11551
11569
  searchQuery: s
11552
- } = Ln(), [l, c] = Je(
11570
+ } = Ln(), [l, c] = ze(
11553
11571
  k.getHandler().searchForTree
11554
11572
  );
11555
- se(() => () => {
11573
+ ie(() => () => {
11556
11574
  c();
11557
11575
  }, [c]);
11558
11576
  const u = qs(), m = E(
@@ -11622,7 +11640,7 @@ const Og = () => {
11622
11640
  onNextClick: p,
11623
11641
  onPreviousClick: g
11624
11642
  };
11625
- }, et = ze(() => /* @__PURE__ */ i("div", { className: "inline-block w-2" }));
11643
+ }, et = Je(() => /* @__PURE__ */ i("div", { className: "inline-block w-2" }));
11626
11644
  et.displayName = "ActionBarSeparator";
11627
11645
  const _g = "action", Fg = ["active_id", "active_ids", "id"], Rg = ["target", "context", "domain", "fields"], Za = (e) => {
11628
11646
  const t = new URL(window.location.origin);
@@ -11648,7 +11666,7 @@ function xr({ res_id: e, searchParams: t }) {
11648
11666
  const { currentView: n } = Ln(), r = {
11649
11667
  id: n.view_id,
11650
11668
  type: n.type
11651
- }, { token: o } = He.useToken(), { t: a } = de(), [s, l] = C(!1), { currentTab: c } = _o(), u = E(
11669
+ }, { token: o } = Ue.useToken(), { t: a } = de(), [s, l] = C(!1), { currentTab: c } = _o(), u = E(
11652
11670
  (y) => {
11653
11671
  try {
11654
11672
  const v = document.createElement("textarea");
@@ -11773,7 +11791,7 @@ function Vg({ toolbar: e }) {
11773
11791
  context: A.current.getContext()
11774
11792
  });
11775
11793
  const j = f == null ? void 0 : f.filter(
11776
- (ie) => ie.id !== d
11794
+ (se) => se.id !== d
11777
11795
  );
11778
11796
  S == null || S(j);
11779
11797
  const q = Math.max(0, (p || 0) - 1);
@@ -11977,7 +11995,7 @@ function Vg({ toolbar: e }) {
11977
11995
  /* @__PURE__ */ i(xr, { res_id: d })
11978
11996
  ] }) : null;
11979
11997
  }
11980
- const Pg = ze(Vg), tl = ze(
11998
+ const Pg = Je(Vg), tl = Je(
11981
11999
  ({
11982
12000
  disabled: e,
11983
12001
  onPreviousClick: t,
@@ -12016,9 +12034,9 @@ const Ki = (e, t) => ({
12016
12034
  ],
12017
12035
  values: { selection_associated_object: `${e},${t}` },
12018
12036
  forced_values: { res_model: e, res_id: t }
12019
- }), { useToken: kg } = He, nl = (e) => {
12020
- const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: a = "" } = e, { id: s, readOnly: l, required: c } = t, { token: u } = kg(), m = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = ee(Ue), { elementHasLostFocus: f } = d || {}, [h, p] = C(!1), [g, y] = C(!1);
12021
- se(() => {
12037
+ }), { useToken: kg } = Ue, nl = (e) => {
12038
+ const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: a = "" } = e, { id: s, readOnly: l, required: c } = t, { token: u } = kg(), m = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = ee(Be), { elementHasLostFocus: f } = d || {}, [h, p] = C(!1), [g, y] = C(!1);
12039
+ ie(() => {
12022
12040
  l && !h && y(!1), !n && !l && (p(!0), y(!0));
12023
12041
  }, [h, l]);
12024
12042
  const v = (w) => {
@@ -12173,7 +12191,7 @@ const Ki = (e, t) => ({
12173
12191
  ] })
12174
12192
  }
12175
12193
  );
12176
- }, { useToken: Lg } = He;
12194
+ }, { useToken: Lg } = Ue;
12177
12195
  function rl(e) {
12178
12196
  const { badgeNumber: t = 0, ...n } = e, { token: r } = Lg();
12179
12197
  return /* @__PURE__ */ P("div", { style: { position: "relative" }, children: [
@@ -12261,7 +12279,7 @@ function jg({ refreshGraph: e }) {
12261
12279
  /* @__PURE__ */ i(xr, { searchParams: a })
12262
12280
  ] });
12263
12281
  }
12264
- const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
12282
+ const { useToken: Bg } = Ue, { Title: Hg, Text: zn } = Bt, Ir = ({
12265
12283
  title: e,
12266
12284
  children: t,
12267
12285
  showSummary: n = !0
@@ -12399,10 +12417,10 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
12399
12417
  setSearchValues: F,
12400
12418
  currentView: D
12401
12419
  } = m || {}, [V, N] = C(!0);
12402
- se(() => {
12420
+ ie(() => {
12403
12421
  var J;
12404
12422
  (J = u.current) == null || J.refresh();
12405
- }, [R]), se(() => {
12423
+ }, [R]), ie(() => {
12406
12424
  t.view_id !== D.view_id && N(!0);
12407
12425
  }, [D]);
12408
12426
  const { clear: L, searchFilterLoading: B, searchError: Y, offset: $, tableRefreshing: K } = Ea({
@@ -12525,7 +12543,7 @@ function Yg(e) {
12525
12543
  function c(m) {
12526
12544
  t(m.search);
12527
12545
  }
12528
- se(() => {
12546
+ ie(() => {
12529
12547
  a.setFieldsValue({ search: r });
12530
12548
  }, [r]);
12531
12549
  function u() {
@@ -12689,7 +12707,7 @@ function Gg({
12689
12707
  },
12690
12708
  [d, e, b, K, s]
12691
12709
  );
12692
- se(() => {
12710
+ ie(() => {
12693
12711
  var te;
12694
12712
  if (x && I === void 0) {
12695
12713
  if (L.current) {
@@ -12719,7 +12737,7 @@ function Gg({
12719
12737
  t: D,
12720
12738
  onOk: Q
12721
12739
  });
12722
- }, [Q, D]), ie = E(() => {
12740
+ }, [Q, D]), se = E(() => {
12723
12741
  Lt({
12724
12742
  confirmMessage: D("confirmRemove"),
12725
12743
  t: D,
@@ -12776,7 +12794,7 @@ function Gg({
12776
12794
  tooltip: D("delete"),
12777
12795
  disabled: !(s && (s == null ? void 0 : s.length) > 0) || T,
12778
12796
  loading: c,
12779
- onClick: ie
12797
+ onClick: se
12780
12798
  }
12781
12799
  ),
12782
12800
  /* @__PURE__ */ i(et, {})
@@ -12860,7 +12878,7 @@ function Gg({
12860
12878
  /* @__PURE__ */ i(xr, { searchParams: g })
12861
12879
  ] });
12862
12880
  }
12863
- const Kg = ze(Gg), ol = ze(() => /* @__PURE__ */ i(
12881
+ const Kg = Je(Gg), ol = Je(() => /* @__PURE__ */ i(
12864
12882
  ls,
12865
12883
  {
12866
12884
  component: () => /* @__PURE__ */ P(
@@ -12903,7 +12921,7 @@ const qg = (e) => {
12903
12921
  availableViews: f,
12904
12922
  searchTreeNameSearch: h
12905
12923
  } = e, p = G(t), g = X(() => !(s != null && s.arch) || s.isExpandable ? !1 : Es(s.arch, "infinite") === "1", [s]);
12906
- se(() => {
12924
+ ie(() => {
12907
12925
  w == null || w(g);
12908
12926
  }, [g]);
12909
12927
  const {
@@ -12932,7 +12950,7 @@ const qg = (e) => {
12932
12950
  v
12933
12951
  ]
12934
12952
  );
12935
- return se(() => {
12953
+ return ie(() => {
12936
12954
  p.current && !t && g && (I == null || I([])), p.current = t;
12937
12955
  }, [t, g]), t ? /* @__PURE__ */ P(Pn, { children: [
12938
12956
  /* @__PURE__ */ i(Ir, { showSummary: !g, children: /* @__PURE__ */ i(
@@ -13100,12 +13118,12 @@ function Zg({
13100
13118
  }
13101
13119
  const ey = () => {
13102
13120
  const { currentTab: e } = _o(), { title: t } = Nn(), { shareUrl: n } = Zg({ currentTab: e });
13103
- se(() => {
13121
+ ie(() => {
13104
13122
  if (n) {
13105
13123
  const r = new URL(n, window.location.origin);
13106
13124
  window.location.pathname + window.location.search !== r.pathname + r.search && window.history.replaceState({}, "", r.pathname + r.search);
13107
13125
  }
13108
- }, [e, n]), se(() => {
13126
+ }, [e, n]), ie(() => {
13109
13127
  document.title = t, e != null && e.title && e.title.length > 0 && (document.title = (e == null ? void 0 : e.title) + " - " + t);
13110
13128
  }, [e, t]);
13111
13129
  };
@@ -13129,7 +13147,7 @@ function ty(e, t) {
13129
13147
  initialSearchParams: v = []
13130
13148
  } = e, [w, I] = C(), [T, S] = C([]), [O, b] = C(!0), A = f || void 0, [_, R] = C(
13131
13149
  A
13132
- ), [x, F] = C([]), [D, V] = C(), [N, L] = C([]), [B, Y] = C(), [$, K] = C(0), [Z, J] = C(!1), [Q, Ce] = C(!1), [me, H] = C(), { t: j } = de(), q = G(), ie = G(), te = ee(
13150
+ ), [x, F] = C([]), [D, V] = C(), [N, L] = C([]), [B, Y] = C(), [$, K] = C(0), [Z, J] = C(!1), [Q, Ce] = C(!1), [me, H] = C(), { t: j } = de(), q = G(), se = G(), te = ee(
13133
13151
  bt
13134
13152
  ), {
13135
13153
  setCurrentView: M,
@@ -13147,7 +13165,7 @@ function ty(e, t) {
13147
13165
  { enableOnFormTags: !0, preventDefault: !0 },
13148
13166
  [we, oe, w, D, N]
13149
13167
  );
13150
- function Be(z) {
13168
+ function He(z) {
13151
13169
  R(z), ne == null || ne(z);
13152
13170
  }
13153
13171
  const We = E(
@@ -13268,7 +13286,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13268
13286
  ]);
13269
13287
  l({ tabKey: c, canWeClose: ue }), dn(() => {
13270
13288
  const z = T.find((_e) => _e.type === "tree"), pe = T.find((_e) => u.id ? _e.type === u.type && _e.view_id === u.id : _e.type === u.type);
13271
- We(pe || z), f ? ne == null || ne(A) : (Be(void 0), V(void 0)), Ee();
13289
+ We(pe || z), f ? ne == null || ne(A) : (He(void 0), V(void 0)), Ee();
13272
13290
  }, [r, a, f]), dn(() => {
13273
13291
  if (we === c) {
13274
13292
  ne == null || ne(_);
@@ -13308,7 +13326,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13308
13326
  } else
13309
13327
  _e = "tree", Ye = [["id", "in", z]];
13310
13328
  if (Ce(!1), J(!1), pe && _e === "form") {
13311
- Be(z[0]);
13329
+ He(z[0]);
13312
13330
  const fe = T.find(
13313
13331
  (ye) => ye.type === "form"
13314
13332
  );
@@ -13333,7 +13351,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13333
13351
  if (_ === void 0 && w.type === "form")
13334
13352
  q.current.clearAndReload();
13335
13353
  else {
13336
- Be(void 0);
13354
+ He(void 0);
13337
13355
  const z = T.find(
13338
13356
  (pe) => pe.type === "form"
13339
13357
  );
@@ -13348,10 +13366,10 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13348
13366
  setCurrentView: We,
13349
13367
  availableViews: T,
13350
13368
  formRef: q,
13351
- searchTreeRef: ie,
13369
+ searchTreeRef: se,
13352
13370
  onNewClicked: Ne,
13353
13371
  currentId: _,
13354
- setCurrentId: Be,
13372
+ setCurrentId: He,
13355
13373
  setCurrentItemIndex: V,
13356
13374
  currentItemIndex: D,
13357
13375
  results: N,
@@ -13386,10 +13404,10 @@ Please, make sure the view ids on the fields_view_get responses are the same as
13386
13404
  setCurrentItemIndex: V,
13387
13405
  formForcedValues: d,
13388
13406
  limit: y,
13389
- searchTreeRef: ie,
13407
+ searchTreeRef: se,
13390
13408
  searchTreeNameSearch: me,
13391
13409
  setCurrentView: We,
13392
- setCurrentId: Be
13410
+ setCurrentId: He
13393
13411
  }
13394
13412
  ),
13395
13413
  /* @__PURE__ */ i(
@@ -13547,12 +13565,12 @@ function iy(e) {
13547
13565
  attrs: oe && { colors: oe }
13548
13566
  });
13549
13567
  D(fn(Pe));
13550
- const Be = an({
13568
+ const He = an({
13551
13569
  resultsToSort: ge,
13552
13570
  sorter: V,
13553
13571
  fields: { ...p.fields, ...y.fields }
13554
13572
  });
13555
- Z(!1), x(Be);
13573
+ Z(!1), x(He);
13556
13574
  const We = await we();
13557
13575
  _(We);
13558
13576
  }, me = async () => {
@@ -13562,7 +13580,7 @@ function iy(e) {
13562
13580
  B(JSON.stringify(M));
13563
13581
  }
13564
13582
  };
13565
- se(() => {
13583
+ ie(() => {
13566
13584
  m && s && me();
13567
13585
  }, [w, T, m, s]);
13568
13586
  const H = async (M) => {
@@ -13596,10 +13614,10 @@ function iy(e) {
13596
13614
  });
13597
13615
  g(ne);
13598
13616
  };
13599
- se(() => {
13617
+ ie(() => {
13600
13618
  t ? H("action") : n && H("model");
13601
13619
  }, [t, n]);
13602
- const ie = (M) => {
13620
+ const se = (M) => {
13603
13621
  const { id: ne } = M;
13604
13622
  o({
13605
13623
  id: ne,
@@ -13619,7 +13637,7 @@ function iy(e) {
13619
13637
  results: R,
13620
13638
  onRequestPageChange: Q,
13621
13639
  loading: K,
13622
- onRowClicked: ie,
13640
+ onRowClicked: se,
13623
13641
  colorsForResults: F,
13624
13642
  sorter: V,
13625
13643
  onChangeSort: (M) => {
@@ -13637,9 +13655,9 @@ function iy(e) {
13637
13655
  ] });
13638
13656
  return Y ? /* @__PURE__ */ i(at, { className: "mt-10", message: Y, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(Ke, { style: { padding: "2rem" } }) : te();
13639
13657
  }
13640
- const sy = ze(iy), ay = (e) => {
13658
+ const sy = Je(iy), ay = (e) => {
13641
13659
  const { model: t } = e, [n, r] = C();
13642
- se(() => {
13660
+ ie(() => {
13643
13661
  o();
13644
13662
  }, [t]);
13645
13663
  async function o() {
@@ -13657,12 +13675,12 @@ function ly(e, t) {
13657
13675
  setIsLoading: f,
13658
13676
  openAction: h,
13659
13677
  moveItemsEnabled: p
13660
- } = ee(Ho), g = G(), y = G(), [v] = Je(k.getHandler().getView), [w] = Je(
13678
+ } = ee(Ho), g = G(), y = G(), [v] = ze(k.getHandler().getView), [w] = ze(
13661
13679
  k.getHandler().readObjects
13662
- ), [I] = Je(k.getHandler().update), T = Sr(
13680
+ ), [I] = ze(k.getHandler().update), T = Sr(
13663
13681
  vn.FEATURE_READFORVIEW
13664
13682
  );
13665
- se(() => {
13683
+ ie(() => {
13666
13684
  S();
13667
13685
  }, [n, o, r]), Tt(t, () => ({
13668
13686
  refresh: () => {
@@ -13798,11 +13816,11 @@ function ly(e, t) {
13798
13816
  initialView: j,
13799
13817
  limit: q
13800
13818
  } = V;
13801
- let ie = {};
13819
+ let se = {};
13802
13820
  try {
13803
- ie = JSON.parse(L.replace(/'/g, '"'));
13821
+ se = JSON.parse(L.replace(/'/g, '"'));
13804
13822
  } catch {
13805
- ie = { x: D * 2, y: 0, w: 2, h: 3 };
13823
+ se = { x: D * 2, y: 0, w: 2, h: 3 };
13806
13824
  }
13807
13825
  let te = null;
13808
13826
  if ((j == null ? void 0 : j.type) === "graph") {
@@ -13838,12 +13856,12 @@ function ly(e, t) {
13838
13856
  });
13839
13857
  if (we) {
13840
13858
  const [ge, Pe] = we, {
13841
- actionId: Be,
13859
+ actionId: He,
13842
13860
  actionType: We,
13843
13861
  title: Ee,
13844
13862
  model: ue
13845
13863
  } = V, Te = {
13846
- action_id: Be,
13864
+ action_id: He,
13847
13865
  action_type: We,
13848
13866
  name: Ee,
13849
13867
  res_id: oe.id,
@@ -13887,13 +13905,13 @@ function ly(e, t) {
13887
13905
  const [oe, we] = ne, {
13888
13906
  actionId: ge,
13889
13907
  actionType: Pe,
13890
- title: Be,
13908
+ title: He,
13891
13909
  model: We
13892
13910
  } = V;
13893
13911
  M = {
13894
13912
  action_id: ge,
13895
13913
  action_type: Pe,
13896
- name: Be,
13914
+ name: He,
13897
13915
  res_id: !1,
13898
13916
  res_model: We,
13899
13917
  view_id: oe,
@@ -13906,7 +13924,7 @@ function ly(e, t) {
13906
13924
  {
13907
13925
  id: B,
13908
13926
  title: Z,
13909
- parms: ie,
13927
+ parms: se,
13910
13928
  action: M,
13911
13929
  openAction: h,
13912
13930
  tooltip: J,
@@ -13920,7 +13938,7 @@ const cy = xt(ly), dy = (e) => {
13920
13938
  const { ooui: t } = e;
13921
13939
  return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(uy, { ooui: t }) });
13922
13940
  }, uy = (e) => {
13923
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [s, l] = C([]), [c, u] = C(), [m, d] = C(!1), { relation: f, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Ue), { getContext: w } = v || {};
13941
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [s, l] = C([]), [c, u] = C(), [m, d] = C(!1), { relation: f, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Be), { getContext: w } = v || {};
13924
13942
  Ft(() => {
13925
13943
  T();
13926
13944
  }, [o]);
@@ -14038,7 +14056,7 @@ const cy = xt(ly), dy = (e) => {
14038
14056
  const { ooui: t } = e, { required: n } = t;
14039
14057
  return /* @__PURE__ */ i(Re, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(wy, { ...e }) });
14040
14058
  }, wy = (e) => {
14041
- const { ooui: t, value: n } = e, { selectionValues: r, errorField: o, lastStep: a } = t, s = ee(Ue), l = Array.from(r.entries()), c = l.map((d) => d[0]).indexOf(n);
14059
+ const { ooui: t, value: n } = e, { selectionValues: r, errorField: o, lastStep: a } = t, s = ee(Be), l = Array.from(r.entries()), c = l.map((d) => d[0]).indexOf(n);
14042
14060
  let u = "process", m = "";
14043
14061
  return o && (m = s.getFieldValue(o), m && (u = "error")), a && c + 1 == l.length && (u = "finish"), /* @__PURE__ */ i(Ko, { current: c, status: u, children: l.map((d, f) => /* @__PURE__ */ i(
14044
14062
  Ko.Step,
@@ -14058,7 +14076,7 @@ const cy = xt(ly), dy = (e) => {
14058
14076
  fontFamily: s,
14059
14077
  fontSize: l
14060
14078
  }
14061
- } = He.useToken(), c = {
14079
+ } = Ue.useToken(), c = {
14062
14080
  padding: 0,
14063
14081
  listStyleType: "none",
14064
14082
  fontFamily: s,
@@ -14111,7 +14129,7 @@ const cy = xt(ly), dy = (e) => {
14111
14129
  /* @__PURE__ */ i("div", { style: d(h.active) })
14112
14130
  ] }, p)) });
14113
14131
  }, Sy = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(by, {}) }), Cy = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(xy, { ...e }) }), xy = (e) => {
14114
- const { ooui: t, value: n, onChange: r } = e, { lang: o, height: a, readOnly: s } = t, l = ee(Ue), { elementHasLostFocus: c } = l || {}, u = E(
14132
+ const { ooui: t, value: n, onChange: r } = e, { lang: o, height: a, readOnly: s } = t, l = ee(Be), { elementHasLostFocus: c } = l || {}, u = E(
14115
14133
  (d) => {
14116
14134
  c && d.onDidBlurEditorWidget(() => c());
14117
14135
  },
@@ -14203,7 +14221,7 @@ const _y = (e) => {
14203
14221
  }
14204
14222
  );
14205
14223
  }, Ry = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Fy, { ooui: e.ooui }) }), Dy = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(lc, {}) }), Ey = (e) => {
14206
- const { ooui: t } = e, n = ee(Ue);
14224
+ const { ooui: t } = e, n = ee(Be);
14207
14225
  let { title: r, text: o, alertType: a, icon: s, buttons: l } = t;
14208
14226
  if (t.fieldType && t.id) {
14209
14227
  const m = n.getFieldValue(t.id);
@@ -14235,7 +14253,7 @@ const _y = (e) => {
14235
14253
  icon: c(s)
14236
14254
  }
14237
14255
  );
14238
- }, { defaultAlgorithm: Vy, defaultSeed: Py } = He, zi = Vy(Py), ky = (e) => {
14256
+ }, { defaultAlgorithm: Vy, defaultSeed: Py } = Ue, zi = Vy(Py), ky = (e) => {
14239
14257
  const { ooui: t, responsiveBehaviour: n = !1 } = e;
14240
14258
  return /* @__PURE__ */ i($y, { autoplay: t.autoPlay, dots: !0, autoplaySpeed: 5e3, children: t.items.map((r, o) => /* @__PURE__ */ i(
14241
14259
  Ro,
@@ -14400,8 +14418,8 @@ function Hy(e, t) {
14400
14418
  values: s,
14401
14419
  context: { ...l, ...B }
14402
14420
  }) : [];
14403
- } catch (ie) {
14404
- return console.error(ie), [];
14421
+ } catch (se) {
14422
+ return console.error(se), [];
14405
14423
  }
14406
14424
  })(), {
14407
14425
  res_model: K,
@@ -14411,10 +14429,10 @@ function Hy(e, t) {
14411
14429
  view_type: Ce,
14412
14430
  limit: me
14413
14431
  } = F, H = Ce === "tree", j = [];
14414
- for (const ie of Z) {
14415
- const [te, M] = ie;
14432
+ for (const se of Z) {
14433
+ const [te, M] = se;
14416
14434
  if (te)
14417
- j.push(ie);
14435
+ j.push(se);
14418
14436
  else if (M === "dashboard")
14419
14437
  j.push([void 0, "dashboard"]);
14420
14438
  else {
@@ -14429,13 +14447,13 @@ function Hy(e, t) {
14429
14447
  }
14430
14448
  let q;
14431
14449
  if (_) {
14432
- const [ie, te] = j.find(
14450
+ const [se, te] = j.find(
14433
14451
  ([M, ne]) => ne === _
14434
14452
  );
14435
- q = { id: ie, type: te };
14453
+ q = { id: se, type: te };
14436
14454
  } else {
14437
- const [ie, te] = j[0];
14438
- q = { id: ie, type: te };
14455
+ const [se, te] = j[0];
14456
+ q = { id: se, type: te };
14439
14457
  }
14440
14458
  S({
14441
14459
  domain: [...$, ...x],
@@ -14570,13 +14588,13 @@ function Hy(e, t) {
14570
14588
  j.push([we, oe]);
14571
14589
  }
14572
14590
  }
14573
- let q, ie;
14591
+ let q, se;
14574
14592
  if (R == null) {
14575
14593
  const M = j.find((ne) => ne[0] === void 0);
14576
- q = void 0, ie = M[1];
14594
+ q = void 0, se = M[1];
14577
14595
  } else
14578
- [q, ie] = j.find((M) => M[0] === void 0 ? !1 : M[0] === R);
14579
- const te = { id: q, type: ie };
14596
+ [q, se] = j.find((M) => M[0] === void 0 ? !1 : M[0] === R);
14597
+ const te = { id: q, type: se };
14580
14598
  S({
14581
14599
  domain: Y,
14582
14600
  context: { ...l, ...B },
@@ -14709,7 +14727,7 @@ function Hy(e, t) {
14709
14727
  }
14710
14728
  );
14711
14729
  }
14712
- const Yv = xt(Hy), { useToken: Uy } = He;
14730
+ const Yv = xt(Hy), { useToken: Uy } = Ue;
14713
14731
  function Wy(e) {
14714
14732
  const { label: t, onClose: n, tabKey: r, isActive: o, onSelected: a } = e, { token: s } = Uy(), l = o ? s.colorBgContainer : s.colorPrimaryBg;
14715
14733
  return /* @__PURE__ */ P(
@@ -14812,7 +14830,7 @@ function Kv() {
14812
14830
  ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((r) => /* @__PURE__ */ i(Gy, { tab: r }, r.key))) || null;
14813
14831
  return /* @__PURE__ */ i(le, { children: n });
14814
14832
  }
14815
- const { useToken: Ky } = He, qv = (e) => {
14833
+ const { useToken: Ky } = Ue, qv = (e) => {
14816
14834
  const {
14817
14835
  onRetrieveShortcuts: t,
14818
14836
  onCheckIsFavourite: n,
@@ -14848,7 +14866,7 @@ const { useToken: Ky } = He, qv = (e) => {
14848
14866
  if (T)
14849
14867
  return JSON.stringify(T);
14850
14868
  }, [T]);
14851
- se(() => {
14869
+ ie(() => {
14852
14870
  b();
14853
14871
  }, [S]);
14854
14872
  function O(x) {