@gisce/react-ooui 2.103.0-alpha.6 → 2.103.0-alpha.8

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 qc = Object.defineProperty;
2
2
  var Gc = (t, e, n) => e in t ? qc(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var qs = (t, e, n) => (Gc(t, typeof e != "symbol" ? e + "" : e, n), n);
4
4
  import { jsx as s, jsxs as L, Fragment as xe } from "react/jsx-runtime";
5
- import Kt, { useContext as ge, useState as F, useEffect as ae, useRef as J, memo as at, useCallback as I, useMemo as ee, forwardRef as Ht, useImperativeHandle as Gt, Fragment as Qn, createContext as Yc, createElement as zc } from "react";
6
- import { Tooltip as Pt, theme as tt, Typography as ln, Form as Nt, Row as Xe, Col as Ne, Modal as Rt, Button as qe, Dropdown as ia, Menu as aa, Space as it, Spin as ot, Divider as Kr, Input as ht, Select as Sn, Checkbox as fr, Alert as _t, Timeline as la, Badge as Zn, message as Gs, Popover as Kc, Progress as Jc, Avatar as ca, Tag as ss, ColorPicker as da, DatePicker as Xc, TimePicker as Qc, InputNumber as Jr, Layout as ua, Pagination as Zc, Empty as fa, Statistic as ed, Card as is, Tabs as pa, Radio as Ys, Switch as td, Steps as zs, Carousel as nd } from "antd";
5
+ import Kt, { useContext as ge, useState as F, useEffect as ae, useRef as J, memo as it, useCallback as I, useMemo as ee, forwardRef as Ht, useImperativeHandle as Gt, Fragment as Qn, createContext as Yc, createElement as zc } from "react";
6
+ import { Tooltip as Pt, theme as tt, Typography as ln, Form as Nt, Row as Xe, Col as Ne, Modal as Rt, Button as qe, Dropdown as ia, Menu as aa, Space as lt, Spin as ot, Divider as Kr, Input as ht, Select as Sn, Checkbox as fr, Alert as _t, Timeline as la, Badge as Zn, message as Gs, Popover as Kc, Progress as Jc, Avatar as ca, Tag as ss, ColorPicker as da, DatePicker as Xc, TimePicker as Qc, InputNumber as Jr, Layout as ua, Pagination as Zc, Empty as fa, Statistic as ed, Card as is, Tabs as pa, Radio as Ys, Switch as td, Steps as zs, Carousel as nd } from "antd";
7
7
  import { Label as er, Field as Bo, Tree as ma, Tags as Ks, Reference as Js, Selection as as, Many2one as ha, Boolean as rd, parseContext as pn, graphProcessor as ga, graphFieldUtils as od, parseContextFields as sd, parseDomainFields as id, Integer as jo, SearchFieldTypes as fn, SearchFilter as ya, parseGraph as va, Container as ad, Form as ba, transformDomainForChildWidget as ls, Button as ld } from "@gisce/ooui";
8
8
  import cd, { QuestionCircleOutlined as wa, ExclamationCircleOutlined as Xr, LoadingOutlined as Yt, DownOutlined as xr, CloseOutlined as Fn, CheckOutlined as tr, TranslationOutlined as xa, FolderOpenOutlined as cs, DownloadOutlined as ds, ClearOutlined as nr, FormOutlined as pr, TableOutlined as us, AreaChartOutlined as dd, CalendarOutlined as ud, FileAddOutlined as Qr, CloseCircleFilled as fd, FilterOutlined as Bn, EditOutlined as fs, CopyOutlined as Cr, DeleteOutlined as ps, InfoCircleOutlined as Zr, ReloadOutlined as eo, ThunderboltOutlined as to, PrinterOutlined as no, ExportOutlined as Ca, EnterOutlined as ro, SearchOutlined as Tr, SaveOutlined as Uo, PlusOutlined as Wo, UpOutlined as pd, PlusSquareOutlined as Ta, MinusSquareOutlined as Sa, StarFilled as md, StarOutlined as hd, LeftOutlined as Fa, RightOutlined as Aa, ApiOutlined as gd, AlignLeftOutlined as yd, EyeOutlined as vd, LinkOutlined as Xs, BorderOuterOutlined as bd, SettingOutlined as wd } from "@ant-design/icons";
9
9
  import { Interweave as Zt } from "interweave";
@@ -634,7 +634,7 @@ const Na = (t) => {
634
634
  if (i === "warning" || i === "error") {
635
635
  const l = o.buttons || [];
636
636
  let d;
637
- const f = l.length > 0 ? /* @__PURE__ */ s(Xe, { justify: "end", style: { marginTop: 16 }, children: /* @__PURE__ */ L(it, { children: [
637
+ const f = l.length > 0 ? /* @__PURE__ */ s(Xe, { justify: "end", style: { marginTop: 16 }, children: /* @__PURE__ */ L(lt, { children: [
638
638
  l.map((p) => /* @__PURE__ */ s(
639
639
  qe,
640
640
  {
@@ -793,7 +793,7 @@ const Na = (t) => {
793
793
  return u ? /* @__PURE__ */ s(ot, {}) : /* @__PURE__ */ L(xe, { children: [
794
794
  O(),
795
795
  /* @__PURE__ */ s(Kr, {}),
796
- /* @__PURE__ */ s(Xe, { justify: "end", children: /* @__PURE__ */ L(it, { children: [
796
+ /* @__PURE__ */ s(Xe, { justify: "end", children: /* @__PURE__ */ L(lt, { children: [
797
797
  /* @__PURE__ */ s(
798
798
  qe,
799
799
  {
@@ -843,12 +843,12 @@ const { info: Nu } = Rt, bn = (t) => {
843
843
  centered: !0,
844
844
  content: t
845
845
  });
846
- }, { useToken: $u } = tt, ao = at(({ content: t }) => {
846
+ }, { useToken: $u } = tt, ao = it(({ content: t }) => {
847
847
  const { token: e } = $u();
848
848
  return /* @__PURE__ */ s("div", { style: { color: e.colorTextDisabled }, children: t });
849
849
  });
850
850
  ao.displayName = "AddonElement";
851
- const { defaultAlgorithm: Vu, defaultSeed: Lu } = tt, vs = Vu(Lu), mr = at(
851
+ const { defaultAlgorithm: Vu, defaultSeed: Lu } = tt, vs = Vu(Lu), mr = it(
852
852
  ({
853
853
  component: t,
854
854
  ooui: e,
@@ -879,7 +879,7 @@ const Va = (t) => {
879
879
  const { ooui: e, isSearchField: n = !1 } = t, { id: r, readOnly: o, required: i, translatable: a } = e;
880
880
  let c = /* @__PURE__ */ s(La, { ooui: e, isSearchField: n });
881
881
  return a && !o && !n && (c = /* @__PURE__ */ s(Ha, { ooui: e, field: r })), /* @__PURE__ */ s(Ge, { required: i, ...t, children: c });
882
- }, La = at(
882
+ }, La = it(
883
883
  ({
884
884
  value: t,
885
885
  ooui: e,
@@ -928,7 +928,7 @@ const Va = (t) => {
928
928
  }
929
929
  );
930
930
  La.displayName = "CharInput";
931
- const Ha = at(
931
+ const Ha = it(
932
932
  ({
933
933
  ooui: t,
934
934
  value: e,
@@ -1143,7 +1143,7 @@ const bs = (t) => {
1143
1143
  }
1144
1144
  )
1145
1145
  ] }),
1146
- e.showControls && /* @__PURE__ */ s(Xe, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ L(it, { children: [
1146
+ e.showControls && /* @__PURE__ */ s(Xe, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ L(lt, { children: [
1147
1147
  /* @__PURE__ */ s(
1148
1148
  Tt,
1149
1149
  {
@@ -2260,7 +2260,7 @@ const An = ({
2260
2260
  }, co = (t) => {
2261
2261
  const { erpFeatures: e } = Jt();
2262
2262
  return e[t];
2263
- }, Ff = at(
2263
+ }, Ff = it(
2264
2264
  ({
2265
2265
  erpFeatures: t,
2266
2266
  locale: e,
@@ -3119,7 +3119,7 @@ const Bf = {
3119
3119
  x: l.x,
3120
3120
  percent: c[d]
3121
3121
  }));
3122
- }, { Text: ci } = ln, Uf = 400, Wf = at(qd), qf = at(Gd), Gf = at(Yd), Yf = {
3122
+ }, { Text: ci } = ln, Uf = 400, Wf = it(qd), qf = it(Gd), Gf = it(Yd), Yf = {
3123
3123
  line: Wf,
3124
3124
  bar: qf,
3125
3125
  pie: Gf
@@ -4272,7 +4272,7 @@ const dp = Ht(lp), hl = ({
4272
4272
  actionButtonProps: v,
4273
4273
  printButtonProps: y
4274
4274
  };
4275
- }, bt = at(() => /* @__PURE__ */ s("div", { className: "inline-block w-2" }));
4275
+ }, bt = it(() => /* @__PURE__ */ s("div", { className: "inline-block w-2" }));
4276
4276
  bt.displayName = "ActionBarSeparator";
4277
4277
  const up = "action", fp = ["active_id", "active_ids", "id"], pp = ["target", "context", "domain", "fields"], yl = (t) => {
4278
4278
  const e = new URL(window.location.origin);
@@ -4327,7 +4327,7 @@ function uo({ res_id: t, searchParams: e }) {
4327
4327
  }, v = yl(h), { type: y } = c || {};
4328
4328
  let b = !g;
4329
4329
  y === "form" && (b = !g || !t);
4330
- const x = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ L(it.Compact, { style: { width: "100%" }, children: [
4330
+ const x = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ L(lt.Compact, { style: { width: "100%" }, children: [
4331
4331
  /* @__PURE__ */ s(
4332
4332
  ht,
4333
4333
  {
@@ -4558,7 +4558,7 @@ function vp({
4558
4558
  onOk: Q
4559
4559
  });
4560
4560
  }, [Q, $]);
4561
- return /* @__PURE__ */ L(it, { wrap: !0, children: [
4561
+ return /* @__PURE__ */ L(lt, { wrap: !0, children: [
4562
4562
  T && /* @__PURE__ */ L(xe, { children: [
4563
4563
  /* @__PURE__ */ s(ot, {}),
4564
4564
  /* @__PURE__ */ s(bt, {}),
@@ -4704,7 +4704,7 @@ function vp({
4704
4704
  /* @__PURE__ */ s(uo, { searchParams: b })
4705
4705
  ] });
4706
4706
  }
4707
- const bp = at(vp), bl = at(() => /* @__PURE__ */ s(
4707
+ const bp = it(vp), bl = it(() => /* @__PURE__ */ s(
4708
4708
  cd,
4709
4709
  {
4710
4710
  component: () => /* @__PURE__ */ L(
@@ -5291,7 +5291,7 @@ const a0 = Object.values(an), Dp = (t) => {
5291
5291
  let i = !0;
5292
5292
  return r === !0 && (i = !1), n.showMenu !== void 0 && (i = n.showMenu), i;
5293
5293
  }, [n.showMenu, r]);
5294
- return e ? /* @__PURE__ */ L(it, { children: [
5294
+ return e ? /* @__PURE__ */ L(lt, { children: [
5295
5295
  /* @__PURE__ */ s(xe, { children: e.value }),
5296
5296
  o && /* @__PURE__ */ s(gr, { id: e.id, model: e.model })
5297
5297
  ] }) : /* @__PURE__ */ s(xe, {});
@@ -5302,7 +5302,7 @@ const a0 = Object.values(an), Dp = (t) => {
5302
5302
  if (!e || !e.model || !e.name)
5303
5303
  return /* @__PURE__ */ s(xe, {});
5304
5304
  const { model: o, id: i, name: a } = e, c = n.get(o);
5305
- return /* @__PURE__ */ L(it, { children: [
5305
+ return /* @__PURE__ */ L(lt, { children: [
5306
5306
  /* @__PURE__ */ s(xe, { children: `${c}:` }),
5307
5307
  /* @__PURE__ */ s(xe, { children: a }),
5308
5308
  !r && /* @__PURE__ */ s(gr, { id: i, model: o })
@@ -6149,7 +6149,7 @@ const yr = ({
6149
6149
  }
6150
6150
  ) })
6151
6151
  ] });
6152
- }, { defaultAlgorithm: cm, defaultSeed: dm } = tt, um = cm(dm), _s = at((t) => {
6152
+ }, { defaultAlgorithm: cm, defaultSeed: dm } = tt, um = cm(dm), _s = it((t) => {
6153
6153
  const { ooui: e } = t, { id: n, decimalDigits: r, readOnly: o, required: i } = e, a = ge(et), { elementHasLostFocus: c } = a || {}, l = ee(() => i && !o, [i, o]), d = ee(
6154
6154
  () => l ? fm : Jr,
6155
6155
  [l]
@@ -6175,7 +6175,7 @@ const fm = It(Jr)`
6175
6175
  &.ant-input-number {
6176
6176
  background-color: ${um.colorPrimaryBg};
6177
6177
  }
6178
- `, { useToken: pm } = tt, { defaultAlgorithm: mm, defaultSeed: hm } = tt, gm = mm(hm), vr = at((t) => {
6178
+ `, { useToken: pm } = tt, { defaultAlgorithm: mm, defaultSeed: hm } = tt, gm = mm(hm), vr = it((t) => {
6179
6179
  const { ooui: e, onChange: n } = t, { id: r, readOnly: o, required: i } = e, { token: a } = pm(), c = i && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, l = ge(et), { elementHasLostFocus: d } = l || {}, f = ee(() => i && !o, [i, o]), u = ee(
6180
6180
  () => f ? ym : Jr,
6181
6181
  [f]
@@ -7759,7 +7759,7 @@ const or = /* @__PURE__ */ Ma(qg), { Text: Gg } = ln, Yg = ({
7759
7759
  });
7760
7760
  },
7761
7761
  children: /* @__PURE__ */ s(
7762
- it,
7762
+ lt,
7763
7763
  {
7764
7764
  direction: "vertical",
7765
7765
  style: { rowGap: 0, width: "100%" },
@@ -7974,7 +7974,7 @@ const lc = (t) => {
7974
7974
  (Y = m.current) == null || Y.resetFields(), (me = m.current) == null || me.setFieldsValue({}), (oe = (he = m.current) == null ? void 0 : he.resetInitialValues) == null || oe.call(he), y([]), x({}), B(), o && o();
7975
7975
  },
7976
7976
  [v, o, B]
7977
- ), j = Bt(() => V ? K ? /* @__PURE__ */ L(it.Compact, { size: "small", children: [
7977
+ ), j = Bt(() => V ? K ? /* @__PURE__ */ L(lt.Compact, { size: "small", children: [
7978
7978
  /* @__PURE__ */ s(
7979
7979
  qe,
7980
7980
  {
@@ -8197,7 +8197,7 @@ function Xg(t) {
8197
8197
  const { onLimitChange: e } = t, { t: n } = Fe(), r = new jo({ name: "limit" }), o = new jo({ name: "offset" });
8198
8198
  return /* @__PURE__ */ L("div", { className: "pl-2 pt-2", children: [
8199
8199
  /* @__PURE__ */ s(Xe, { children: n("parameters") }, "count_params"),
8200
- /* @__PURE__ */ L(it, { align: "center", children: [
8200
+ /* @__PURE__ */ L(lt, { align: "center", children: [
8201
8201
  n("limit") + " :",
8202
8202
  /* @__PURE__ */ s(
8203
8203
  vr,
@@ -8867,7 +8867,7 @@ const sr = () => {
8867
8867
  }
8868
8868
  )
8869
8869
  ] });
8870
- }, go = at(
8870
+ }, go = it(
8871
8871
  ({
8872
8872
  value: t,
8873
8873
  record: e,
@@ -9140,7 +9140,7 @@ function ay(t, e) {
9140
9140
  n,
9141
9141
  d
9142
9142
  ]), {
9143
- changeSelectedRowItems: lt,
9143
+ changeSelectedRowItems: at,
9144
9144
  changeSelectedRowKeys: En,
9145
9145
  onSelectionCheckboxClicked: _n
9146
9146
  } = nm({
@@ -9250,9 +9250,9 @@ function ay(t, e) {
9250
9250
  }, [z, U]);
9251
9251
  const Be = I(async () => {
9252
9252
  var Ue;
9253
- lt([]), Ie(), nt(), $e.current = void 0, _(!1), (Ue = b == null ? void 0 : b.current) == null || Ue.refresh(), De();
9253
+ at([]), Ie(), nt(), $e.current = void 0, _(!1), (Ue = b == null ? void 0 : b.current) == null || Ue.refresh(), De();
9254
9254
  }, [
9255
- lt,
9255
+ at,
9256
9256
  Ie,
9257
9257
  nt,
9258
9258
  De
@@ -9291,19 +9291,19 @@ function ay(t, e) {
9291
9291
  ]
9292
9292
  ), ut = I(() => {
9293
9293
  var Ue;
9294
- lt([]), (Ue = b.current) == null || Ue.unselectAll(), Y == null || Y(void 0), j == null || j([]), Q == null || Q(void 0);
9294
+ at([]), (Ue = b.current) == null || Ue.unselectAll(), Y == null || Y(void 0), j == null || j([]), Q == null || Q(void 0);
9295
9295
  }, [
9296
- lt,
9296
+ at,
9297
9297
  Y,
9298
9298
  j,
9299
9299
  Q
9300
9300
  ]), Mt = I(
9301
9301
  ({ params: Ue, searchValues: ft }) => {
9302
9302
  var Ft;
9303
- lt([]), (Ft = b.current) == null || Ft.unselectAll(), Y == null || Y(void 0), j == null || j(Ue), Q == null || Q(ft);
9303
+ at([]), (Ft = b.current) == null || Ft.unselectAll(), Y == null || Y(void 0), j == null || j(Ue), Q == null || Q(ft);
9304
9304
  },
9305
9305
  [
9306
- lt,
9306
+ at,
9307
9307
  Y,
9308
9308
  j,
9309
9309
  Q
@@ -9338,10 +9338,10 @@ function ay(t, e) {
9338
9338
  ), Ut = I(
9339
9339
  ({ params: Ue, values: ft, closeSidebar: Ft = !0 }) => {
9340
9340
  var vt;
9341
- lt([]), (vt = b.current) == null || vt.unselectAll(), Y == null || Y(void 0), j == null || j(Ue), Q == null || Q(ft), W == null || W(!Ft), Ft || Be(), (!Ue || Ue.length === 0) && (O == null || O(null));
9341
+ at([]), (vt = b.current) == null || vt.unselectAll(), Y == null || Y(void 0), j == null || j(Ue), Q == null || Q(ft), W == null || W(!Ft), Ft || Be(), (!Ue || Ue.length === 0) && (O == null || O(null));
9342
9342
  },
9343
9343
  [
9344
- lt,
9344
+ at,
9345
9345
  Y,
9346
9346
  j,
9347
9347
  Q,
@@ -9655,7 +9655,7 @@ const fc = Ht(
9655
9655
  ne
9656
9656
  ] });
9657
9657
  }
9658
- ), Dr = at(fc);
9658
+ ), Dr = it(fc);
9659
9659
  Dr.displayName = "Tree";
9660
9660
  fc.displayName = "UnmemoizedTree";
9661
9661
  const pc = (t) => {
@@ -10365,7 +10365,7 @@ const mc = Ht(uy), fy = At, py = (t) => {
10365
10365
  Ke,
10366
10366
  V,
10367
10367
  Se
10368
- ]), lt = I(async () => {
10368
+ ]), at = I(async () => {
10369
10369
  m == null || m(), He(), Q(!0), T(0), O([]), Ae.current = void 0, re || Ze(), await yt();
10370
10370
  }, [
10371
10371
  m,
@@ -10378,7 +10378,7 @@ const mc = Ht(uy), fy = At, py = (t) => {
10378
10378
  ]), En = I(
10379
10379
  ({ params: Ee, values: Be, closeSidebar: Qe = !0 }) => {
10380
10380
  var rt;
10381
- O([]), (rt = c.current) == null || rt.unselectAll(), N == null || N(void 0), k == null || k(Ee), M == null || M(Be), w == null || w(!Qe), Qe || lt(), (!Ee || Ee.length === 0) && (j == null || j(null));
10381
+ O([]), (rt = c.current) == null || rt.unselectAll(), N == null || N(void 0), k == null || k(Ee), M == null || M(Be), w == null || w(!Qe), Qe || at(), (!Ee || Ee.length === 0) && (j == null || j(null));
10382
10382
  },
10383
10383
  [
10384
10384
  O,
@@ -10388,7 +10388,7 @@ const mc = Ht(uy), fy = At, py = (t) => {
10388
10388
  M,
10389
10389
  w,
10390
10390
  j,
10391
- lt
10391
+ at
10392
10392
  ]
10393
10393
  );
10394
10394
  ae(() => {
@@ -10422,7 +10422,7 @@ const mc = Ht(uy), fy = At, py = (t) => {
10422
10422
  E,
10423
10423
  _e.current
10424
10424
  ), Be = ve.current && !C;
10425
- Ee && (Be || f === "top") && lt(), _e.current = E, ve.current = C;
10425
+ Ee && (Be || f === "top") && at(), _e.current = E, ve.current = C;
10426
10426
  }, [E, C]);
10427
10427
  const _n = I(
10428
10428
  (Ee, Be) => {
@@ -10524,7 +10524,7 @@ const mc = Ht(uy), fy = At, py = (t) => {
10524
10524
  searchVisible: C,
10525
10525
  searchValues: S,
10526
10526
  selectedRowKeys: nt,
10527
- refresh: lt,
10527
+ refresh: at,
10528
10528
  onRowStatus: xt,
10529
10529
  onGetFirstVisibleRowIndex: Le,
10530
10530
  setTreeFirstVisibleRow: T,
@@ -10627,7 +10627,7 @@ const mc = Ht(uy), fy = At, py = (t) => {
10627
10627
  onSubmit: l
10628
10628
  }
10629
10629
  );
10630
- }, Ls = at(
10630
+ }, Ls = it(
10631
10631
  ({
10632
10632
  columns: t,
10633
10633
  treeOoui: e,
@@ -10697,7 +10697,7 @@ const mc = Ht(uy), fy = At, py = (t) => {
10697
10697
  )
10698
10698
  );
10699
10699
  Ls.displayName = "PaginatedTableComponent";
10700
- const hy = at(Ls), Wt = (t) => {
10700
+ const hy = it(Ls), Wt = (t) => {
10701
10701
  const e = J(t);
10702
10702
  return ae(() => {
10703
10703
  e.current = t;
@@ -12016,7 +12016,7 @@ function Ey(t) {
12016
12016
  ] }));
12017
12017
  return V ? (console.error(V), /* @__PURE__ */ s(_t, { className: "mt-10", message: V, type: "error", banner: !0 })) : u ? /* @__PURE__ */ s(ot, { style: { padding: "2rem" } }) : he();
12018
12018
  }
12019
- const vc = at(Ey), { useToken: _y } = tt, Oy = 3 * 1e3, Dy = (t) => {
12019
+ const vc = it(Ey), { useToken: _y } = tt, Oy = 3 * 1e3, Dy = (t) => {
12020
12020
  const { ooui: e } = t, { refreshCounter: n } = Sr(), r = e.actionId !== void 0, o = e.actionField !== void 0;
12021
12021
  return /* @__PURE__ */ s(Ge, { ooui: e, children: r || o ? /* @__PURE__ */ s(Gn, { children: /* @__PURE__ */ s(My, { ooui: e }, n) }) : /* @__PURE__ */ s(ky, { ooui: e }, n) });
12022
12022
  }, ky = (t) => {
@@ -12082,7 +12082,7 @@ const vc = at(Ey), { useToken: _y } = tt, Oy = 3 * 1e3, Dy = (t) => {
12082
12082
  ] }), C = $t(a);
12083
12083
  let w = r;
12084
12084
  if (n.fieldType === "reference")
12085
- p ? w = /* @__PURE__ */ s(ot, { size: "small" }) : f ? w = /* @__PURE__ */ L(it, { children: [
12085
+ p ? w = /* @__PURE__ */ s(ot, { size: "small" }) : f ? w = /* @__PURE__ */ L(lt, { children: [
12086
12086
  /* @__PURE__ */ L("span", { children: [
12087
12087
  f.modelName,
12088
12088
  ":",
@@ -12109,7 +12109,7 @@ const vc = at(Ey), { useToken: _y } = tt, Oy = 3 * 1e3, Dy = (t) => {
12109
12109
  };
12110
12110
  w = r ? dt(r).format(A[n.fieldType]) : " ";
12111
12111
  }
12112
- if (n.fieldType === "many2one" && r && ((T = n.raw_props) != null && T.relation) && (w = /* @__PURE__ */ L(it, { children: [
12112
+ if (n.fieldType === "many2one" && r && ((T = n.raw_props) != null && T.relation) && (w = /* @__PURE__ */ L(lt, { children: [
12113
12113
  w,
12114
12114
  b && /* @__PURE__ */ s(gr, { id: r[0], model: n.raw_props.relation })
12115
12115
  ] })), r && (n.fieldType === "float" || n.fieldType === "integer"))
@@ -12344,29 +12344,29 @@ const vc = at(Ey), { useToken: _y } = tt, Oy = 3 * 1e3, Dy = (t) => {
12344
12344
  const { ooui: e } = t;
12345
12345
  return /* @__PURE__ */ s(Gn, { children: /* @__PURE__ */ s(Ge, { ...t, children: /* @__PURE__ */ s(Hy, { ...t, ooui: e }) }) });
12346
12346
  }, Hy = (t) => {
12347
- var f;
12347
+ var u, p, m;
12348
12348
  const { value: e, ooui: n } = t, r = ge(
12349
12349
  mn
12350
12350
  ), o = ge(et), i = ee(() => {
12351
12351
  if (!e)
12352
12352
  return console.warn("ActionButtons: No value provided"), [];
12353
12353
  try {
12354
- const u = typeof e == "string" ? JSON.parse(e) : e;
12355
- return Array.isArray(u) ? u : [];
12356
- } catch (u) {
12354
+ const g = typeof e == "string" ? JSON.parse(e) : e;
12355
+ return Array.isArray(g) ? g : [];
12356
+ } catch (g) {
12357
12357
  return console.error(
12358
12358
  "Failed to parse action buttons value:",
12359
- u,
12359
+ g,
12360
12360
  "Value:",
12361
12361
  e
12362
12362
  ), [];
12363
12363
  }
12364
12364
  }, [e]), a = ee(
12365
12365
  () => {
12366
- var u;
12367
- return $t(((u = n.raw_props) == null ? void 0 : u.icon) || "");
12366
+ var g;
12367
+ return $t(((g = n.raw_props) == null ? void 0 : g.icon) || "");
12368
12368
  },
12369
- [(f = n.raw_props) == null ? void 0 : f.icon]
12369
+ [(u = n.raw_props) == null ? void 0 : u.icon]
12370
12370
  ), c = ee(
12371
12371
  () => !!n.label || !!a,
12372
12372
  [n.label, a]
@@ -12376,16 +12376,30 @@ const vc = at(Ey), { useToken: _y } = tt, Oy = 3 * 1e3, Dy = (t) => {
12376
12376
  );
12377
12377
  if (i.length === 0)
12378
12378
  return null;
12379
- const d = /* @__PURE__ */ s(it, { direction: "vertical", style: { width: "100%" }, children: i.map((u, p) => /* @__PURE__ */ s(
12380
- By,
12379
+ const d = parseInt(
12380
+ ((p = n.parsedWidgetProps) == null ? void 0 : p.col) || ((m = n.raw_props) == null ? void 0 : m.col) || "1",
12381
+ 10
12382
+ ), f = /* @__PURE__ */ s(
12383
+ "div",
12381
12384
  {
12382
- button: u,
12383
- processAction: r.processAction,
12384
- formContext: o,
12385
- disabled: l
12386
- },
12387
- p
12388
- )) });
12385
+ style: {
12386
+ display: "grid",
12387
+ gridTemplateColumns: `repeat(${d}, 1fr)`,
12388
+ gap: "8px",
12389
+ width: "100%"
12390
+ },
12391
+ children: i.map((g, h) => /* @__PURE__ */ s(
12392
+ By,
12393
+ {
12394
+ button: g,
12395
+ processAction: r.processAction,
12396
+ formContext: o,
12397
+ disabled: l
12398
+ },
12399
+ h
12400
+ ))
12401
+ }
12402
+ );
12389
12403
  return /* @__PURE__ */ s(
12390
12404
  "div",
12391
12405
  {
@@ -12394,7 +12408,7 @@ const vc = at(Ey), { useToken: _y } = tt, Oy = 3 * 1e3, Dy = (t) => {
12394
12408
  overflowX: "hidden",
12395
12409
  overflowY: "auto"
12396
12410
  },
12397
- children: c ? /* @__PURE__ */ s(Ea, { label: n.label, icon: a, children: d }) : d
12411
+ children: c ? /* @__PURE__ */ s(Ea, { label: n.label, icon: a, children: f }) : f
12398
12412
  }
12399
12413
  );
12400
12414
  }, By = ({
@@ -12925,7 +12939,7 @@ function nv(t, e) {
12925
12939
  for (const se in X)
12926
12940
  X[se] === void 0 && delete X[se];
12927
12941
  return X;
12928
- }, [gt, xt, B]), lt = I(() => {
12942
+ }, [gt, xt, B]), at = I(() => {
12929
12943
  ce.current && (A == null || A()), pe == null || pe(!1), o == null || o({ id: de(), values: yt() });
12930
12944
  }, [
12931
12945
  de,
@@ -12979,12 +12993,12 @@ function nv(t, e) {
12979
12993
  Xt() ? rr({
12980
12994
  t: R,
12981
12995
  onOk: () => {
12982
- lt == null || lt(), X(!0);
12996
+ at == null || at(), X(!0);
12983
12997
  },
12984
12998
  onCancel: () => {
12985
12999
  X(!1);
12986
13000
  }
12987
- }) : (lt == null || lt(), X(!0));
13001
+ }) : (at == null || at(), X(!0));
12988
13002
  }), On = async () => {
12989
13003
  if (c) {
12990
13004
  const X = await H.getHandler().getActionStringForModel(n);
@@ -13092,7 +13106,7 @@ function nv(t, e) {
13092
13106
  return u && (ie.current = void 0, zt({ values: {}, fields: B, reset: !0 })), { succeed: !0, id: Te };
13093
13107
  }
13094
13108
  if (!Xt() && de() && Ce)
13095
- return z.current = !1, _e == null || _e(!1), lt == null || lt(), { succeed: !0, id: de() };
13109
+ return z.current = !1, _e == null || _e(!1), at == null || at(), { succeed: !0, id: de() };
13096
13110
  if (await dn())
13097
13111
  return z.current = !1, He({
13098
13112
  type: "error",
@@ -13373,7 +13387,7 @@ function nv(t, e) {
13373
13387
  context: Ce
13374
13388
  }) {
13375
13389
  if (X === "cancel") {
13376
- lt == null || lt();
13390
+ at == null || at();
13377
13391
  return;
13378
13392
  }
13379
13393
  if (await dn()) {
@@ -13439,7 +13453,7 @@ function nv(t, e) {
13439
13453
  }
13440
13454
  ) }), kr = () => /* @__PURE__ */ L(xe, { children: [
13441
13455
  /* @__PURE__ */ s(Kr, {}),
13442
- /* @__PURE__ */ s(Xe, { justify: "end", children: /* @__PURE__ */ L(it, { children: [
13456
+ /* @__PURE__ */ s(Xe, { justify: "end", children: /* @__PURE__ */ L(lt, { children: [
13443
13457
  /* @__PURE__ */ s(
13444
13458
  qe,
13445
13459
  {
@@ -13648,7 +13662,7 @@ const ir = Ht(nv), Rn = (t) => {
13648
13662
  }
13649
13663
  ),
13650
13664
  /* @__PURE__ */ s(Kr, {}),
13651
- /* @__PURE__ */ s(Xe, { justify: "end", children: /* @__PURE__ */ L(it, { children: [
13665
+ /* @__PURE__ */ s(Xe, { justify: "end", children: /* @__PURE__ */ L(lt, { children: [
13652
13666
  /* @__PURE__ */ s(
13653
13667
  qe,
13654
13668
  {
@@ -14375,7 +14389,7 @@ function uv(t) {
14375
14389
  ] })
14376
14390
  ] });
14377
14391
  }
14378
- const Ac = at(({ title: t, token: e }) => /* @__PURE__ */ s(
14392
+ const Ac = it(({ title: t, token: e }) => /* @__PURE__ */ s(
14379
14393
  "div",
14380
14394
  {
14381
14395
  className: "flex flex-grow h-8 text-white",
@@ -14387,9 +14401,9 @@ const Ac = at(({ title: t, token: e }) => /* @__PURE__ */ s(
14387
14401
  }
14388
14402
  ));
14389
14403
  Ac.displayName = "Title";
14390
- const Qt = at(() => /* @__PURE__ */ s("div", { className: "inline-block w-3" }));
14404
+ const Qt = it(() => /* @__PURE__ */ s("div", { className: "inline-block w-3" }));
14391
14405
  Qt.displayName = "Separator";
14392
- const Ic = at(
14406
+ const Ic = it(
14393
14407
  ({
14394
14408
  currentItemIndex: t,
14395
14409
  totalItems: e
@@ -14405,7 +14419,7 @@ const Ic = at(
14405
14419
  }
14406
14420
  );
14407
14421
  Ic.displayName = "ItemIndex";
14408
- const Rc = at(
14422
+ const Rc = it(
14409
14423
  ({
14410
14424
  currentItemIndex: t,
14411
14425
  totalItems: e,
@@ -14444,7 +14458,7 @@ const Rc = at(
14444
14458
  }
14445
14459
  );
14446
14460
  Rc.displayName = "ItemBrowser";
14447
- const Ec = at(
14461
+ const Ec = it(
14448
14462
  ({
14449
14463
  isMany2Many: t,
14450
14464
  selectedRowKeys: e,
@@ -14466,7 +14480,7 @@ const Ec = at(
14466
14480
  }
14467
14481
  );
14468
14482
  Ec.displayName = "DeleteButton";
14469
- const js = at(uv), fv = {
14483
+ const js = it(uv), fv = {
14470
14484
  form: ba,
14471
14485
  tree: ma,
14472
14486
  graph: In
@@ -16611,7 +16625,7 @@ const { useToken: Mv } = tt, { TextArea: ts } = ht, Pv = (t) => {
16611
16625
  ] });
16612
16626
  }, $v = (t) => {
16613
16627
  const { ooui: e } = t, { label: n, icon: r } = e, o = $t(r || "");
16614
- return /* @__PURE__ */ s(Kr, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ L(it, { children: [
16628
+ return /* @__PURE__ */ s(Kr, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ L(lt, { children: [
16615
16629
  o ? /* @__PURE__ */ s(o, {}) : null,
16616
16630
  n
16617
16631
  ] }) });
@@ -16906,7 +16920,7 @@ const { useToken: Mv } = tt, { TextArea: ts } = ht, Pv = (t) => {
16906
16920
  timezone: i
16907
16921
  }
16908
16922
  ) });
16909
- }, Lc = at(Yv), zv = (t) => {
16923
+ }, Lc = it(Yv), zv = (t) => {
16910
16924
  const { ooui: e } = t;
16911
16925
  return /* @__PURE__ */ s(Lc, { ooui: e });
16912
16926
  }, Kv = (t) => {
@@ -17024,7 +17038,7 @@ const { useToken: Mv } = tt, { TextArea: ts } = ht, Pv = (t) => {
17024
17038
  }
17025
17039
  )
17026
17040
  ] }),
17027
- /* @__PURE__ */ s(Ne, { children: /* @__PURE__ */ L(it, { children: [
17041
+ /* @__PURE__ */ s(Ne, { children: /* @__PURE__ */ L(lt, { children: [
17028
17042
  /* @__PURE__ */ s(
17029
17043
  qe,
17030
17044
  {
@@ -17488,7 +17502,7 @@ function ib({ toolbar: t }) {
17488
17502
  d,
17489
17503
  _
17490
17504
  ]
17491
- ), l ? /* @__PURE__ */ L(it, { wrap: !0, children: [
17505
+ ), l ? /* @__PURE__ */ L(lt, { wrap: !0, children: [
17492
17506
  A && /* @__PURE__ */ L(xe, { children: [
17493
17507
  /* @__PURE__ */ s(ot, {}),
17494
17508
  /* @__PURE__ */ s(bt, {}),
@@ -17592,7 +17606,7 @@ function ib({ toolbar: t }) {
17592
17606
  /* @__PURE__ */ s(uo, { res_id: m })
17593
17607
  ] }) : null;
17594
17608
  }
17595
- const ab = at(ib), Hc = at(
17609
+ const ab = it(ib), Hc = it(
17596
17610
  ({
17597
17611
  disabled: t,
17598
17612
  onPreviousClick: e,
@@ -17600,7 +17614,7 @@ const ab = at(ib), Hc = at(
17600
17614
  tryAction: r
17601
17615
  }) => {
17602
17616
  const { t: o } = Fe();
17603
- return /* @__PURE__ */ L(it, { children: [
17617
+ return /* @__PURE__ */ L(lt, { children: [
17604
17618
  /* @__PURE__ */ s(
17605
17619
  Et,
17606
17620
  {
@@ -17742,7 +17756,7 @@ const ra = (t, e) => ({
17742
17756
  children: /* @__PURE__ */ s(ht, { style: { width: "100%" }, autoFocus: !0, ref: a })
17743
17757
  }
17744
17758
  ),
17745
- /* @__PURE__ */ s(Xe, { align: "middle", justify: "end", children: /* @__PURE__ */ s(Ne, { children: /* @__PURE__ */ L(it, { children: [
17759
+ /* @__PURE__ */ s(Xe, { align: "middle", justify: "end", children: /* @__PURE__ */ s(Ne, { children: /* @__PURE__ */ L(lt, { children: [
17746
17760
  /* @__PURE__ */ s(
17747
17761
  qe,
17748
17762
  {
@@ -17801,7 +17815,7 @@ function fb({ refreshGraph: t }) {
17801
17815
  previousView: d,
17802
17816
  setPreviousView: f
17803
17817
  } = ge(Ot);
17804
- return /* @__PURE__ */ L(it, { wrap: !0, children: [
17818
+ return /* @__PURE__ */ L(lt, { wrap: !0, children: [
17805
17819
  /* @__PURE__ */ s(
17806
17820
  ml,
17807
17821
  {
@@ -18071,7 +18085,7 @@ const pb = (t) => {
18071
18085
  };
18072
18086
  function gb() {
18073
18087
  const { isLoading: t, dashboardRef: e, moveItemsEnabled: n, setMoveItemsEnabled: r } = ge(Ws), { permissions: o } = Vt(), { t: i } = Fe();
18074
- return /* @__PURE__ */ L(it, { wrap: !0, children: [
18088
+ return /* @__PURE__ */ L(lt, { wrap: !0, children: [
18075
18089
  (o == null ? void 0 : o.write) && /* @__PURE__ */ s(
18076
18090
  Et,
18077
18091
  {
@@ -18973,7 +18987,7 @@ const Ab = Ht(Fb), Ib = (t) => {
18973
18987
  children: /* @__PURE__ */ s(Xe, { children: a.map((A) => /* @__PURE__ */ s(Ne, { span: Math.floor(24 / v), children: /* @__PURE__ */ s(fr, { value: A.value, children: A.label }) }, A.value)) })
18974
18988
  }
18975
18989
  ),
18976
- !g && /* @__PURE__ */ L(it, { children: [
18990
+ !g && /* @__PURE__ */ L(lt, { children: [
18977
18991
  /* @__PURE__ */ s(
18978
18992
  qe,
18979
18993
  {
@@ -19003,21 +19017,22 @@ const Ab = Ht(Fb), Ib = (t) => {
19003
19017
  'input[type="checkbox"]'
19004
19018
  );
19005
19019
  let m = -1;
19006
- if (p.forEach((y, b) => {
19007
- y === f && (m = b);
19020
+ if (p.forEach((b, x) => {
19021
+ b === f && (m = x);
19008
19022
  }), m === -1)
19009
19023
  return;
19010
19024
  const g = (a || "").split(`
19011
19025
  `);
19012
19026
  let h = 0, v = !1;
19013
- for (let y = 0; y < g.length; y++) {
19014
- const b = g[y], x = b.match(/^(\s*[-*+]\s*)\[([ xX])\]/);
19015
- if (x) {
19027
+ const y = /^(\s*[-*+]\s*)\[([ xX])\](\s+)(\S)/;
19028
+ for (let b = 0; b < g.length; b++) {
19029
+ const x = g[b], C = x.match(y);
19030
+ if (C) {
19016
19031
  if (h === m) {
19017
- const w = !(x[2].trim() !== "");
19018
- g[y] = b.replace(
19019
- /^(\s*[-*+]\s*)\[([ xX])\]/,
19020
- (O, T) => `${T}[${w ? "x" : " "}]`
19032
+ const T = !(C[2] !== " ");
19033
+ g[b] = x.replace(
19034
+ y,
19035
+ (A, R, _, D, k) => `${R}[${T ? "x" : " "}]${D}${k}`
19021
19036
  ), v = !0;
19022
19037
  break;
19023
19038
  }
@@ -19025,9 +19040,9 @@ const Ab = Ht(Fb), Ib = (t) => {
19025
19040
  }
19026
19041
  }
19027
19042
  if (v) {
19028
- const y = g.join(`
19043
+ const b = g.join(`
19029
19044
  `);
19030
- c(y), r(y);
19045
+ c(b), r(b);
19031
19046
  }
19032
19047
  } catch (u) {
19033
19048
  console.error("Error handling checkbox click:", u);
@@ -19082,7 +19097,7 @@ const _b = (t) => {
19082
19097
  const [f, u] = d;
19083
19098
  return /* @__PURE__ */ s(Ys, { value: f, children: u }, f);
19084
19099
  });
19085
- return /* @__PURE__ */ s(Ys.Group, { disabled: i, onChange: n, value: r, children: /* @__PURE__ */ s(it, { direction: a, children: l }) });
19100
+ return /* @__PURE__ */ s(Ys.Group, { disabled: i, onChange: n, value: r, children: /* @__PURE__ */ s(lt, { direction: a, children: l }) });
19086
19101
  }, Db = (t) => {
19087
19102
  const { ooui: e } = t, { id: n, readOnly: r, required: o } = e;
19088
19103
  return /* @__PURE__ */ s(Ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ s(kb, { id: n, readOnly: r, required: o }) });
@@ -19160,7 +19175,7 @@ const _b = (t) => {
19160
19175
  return g && /* @__PURE__ */ s(g, {});
19161
19176
  };
19162
19177
  return /* @__PURE__ */ s("ul", { style: l, children: (t.value || []).map((m, g) => /* @__PURE__ */ L("li", { style: d(m.active), children: [
19163
- /* @__PURE__ */ L(it, { children: [
19178
+ /* @__PURE__ */ L(lt, { children: [
19164
19179
  m.icon && p(m.icon),
19165
19180
  " ",
19166
19181
  m.title
@@ -19218,7 +19233,7 @@ const Wb = (t) => {
19218
19233
  {
19219
19234
  avatar: /* @__PURE__ */ s(jb, { email: e.email, theme: "mp" }),
19220
19235
  title: e.author,
19221
- description: /* @__PURE__ */ L(it, { direction: "horizontal", children: [
19236
+ description: /* @__PURE__ */ L(lt, { direction: "horizontal", children: [
19222
19237
  /* @__PURE__ */ s("span", { title: e.date, children: dt(e.date).fromNow() }),
19223
19238
  e.isAuthor && /* @__PURE__ */ s(ss, { color: "blue", children: r("author") })
19224
19239
  ] }),
@@ -19289,7 +19304,7 @@ const Wb = (t) => {
19289
19304
  description: /* @__PURE__ */ s(Zt, { content: o }),
19290
19305
  type: i,
19291
19306
  showIcon: !0,
19292
- action: d ? /* @__PURE__ */ s(it, { direction: "vertical", children: d }) : null,
19307
+ action: d ? /* @__PURE__ */ s(lt, { direction: "vertical", children: d }) : null,
19293
19308
  icon: l(a)
19294
19309
  }
19295
19310
  );