@gisce/react-ooui 2.0.0-alpha.53 → 2.0.0-alpha.54
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.
- package/dist/react-ooui.es.js +578 -555
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/widgets/views/Tree.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/widgets/views/Tree.tsx +39 -1
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var qo = Object.defineProperty;
|
|
2
2
|
var zo = (e, t, r) => t in e ? qo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var
|
|
3
|
+
var sr = (e, t, r) => (zo(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
4
|
import { jsxs as A, jsx as n, Fragment as Z } from "react/jsx-runtime";
|
|
5
|
-
import et, { useContext as H, useState as w, useEffect as
|
|
6
|
-
import { Tooltip as ht, theme as Pe, Typography as
|
|
7
|
-
import { Label as Dt, Field as Rn, Tree as
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
5
|
+
import et, { useContext as H, useState as w, useEffect as fe, useRef as de, useCallback as De, forwardRef as wt, useImperativeHandle as bt, Fragment as Jo } from "react";
|
|
6
|
+
import { Tooltip as ht, theme as Pe, Typography as Gt, Form as lt, Row as be, Col as ae, Modal as Je, Button as _e, Dropdown as Ut, Menu as He, Spin as Ae, Divider as cn, Space as je, Input as it, Select as Ct, Checkbox as Ht, Alert as tt, Timeline as On, Statistic as Xo, Card as Nn, Tag as Vr, message as xn, DatePicker as Pn, TimePicker as Ar, InputNumber as Dr, Progress as Zo, Avatar as kr, Badge as Qo, Pagination as ei, Tabs as Er, Popover as ti, Radio as ar, Switch as ni, Steps as lr, Layout as ri } from "antd";
|
|
7
|
+
import { Label as Dt, Field as Rn, Tree as Mr, Reference as oi, Selection as Ln, Many2one as Nr, Boolean as ii, Container as si, parseContext as vt, Form as Pr, Integer as Vn, SearchFieldTypes as mt, SearchFilter as ai, parseContextFields as Sn, parseDomainFields as cr, transformDomainForChildWidget as Lr, graphProcessor as $r, parseGraph as $n, graphFieldUtils as li } from "@gisce/ooui";
|
|
8
|
+
import * as dr from "@ant-design/icons";
|
|
9
|
+
import Br, { QuestionCircleOutlined as Hr, ExclamationCircleOutlined as pt, LoadingOutlined as at, DownOutlined as kt, WarningOutlined as Kr, CloseOutlined as qt, CheckOutlined as Et, TranslationOutlined as Wr, FolderOpenOutlined as Bn, DownloadOutlined as Hn, ClearOutlined as Kn, StarFilled as jr, StarOutlined as Yr, UpOutlined as ci, SearchOutlined as Wn, RightCircleOutlined as di, ThunderboltOutlined as jn, PrinterOutlined as Yn, EnterOutlined as Gr, PlusSquareOutlined as ui, MinusSquareOutlined as fi, FileAddOutlined as dn, AlignLeftOutlined as mi, ApiOutlined as hi, DeleteOutlined as Gn, LeftOutlined as Ur, RightOutlined as qr, EyeOutlined as pi, FormOutlined as Kt, TableOutlined as Un, AreaChartOutlined as gi, CalendarOutlined as yi, LinkOutlined as zr, SaveOutlined as vi, CopyOutlined as qn, InfoCircleOutlined as Jr, ReloadOutlined as un, EditOutlined as Xr, FilterOutlined as Zr, CloseCircleFilled as wi, BorderOuterOutlined as bi, SettingOutlined as Ci, ExportOutlined as xi } from "@ant-design/icons";
|
|
10
10
|
import { Interweave as zn } from "interweave";
|
|
11
|
-
import * as
|
|
11
|
+
import * as ur from "@tabler/icons-react";
|
|
12
12
|
import Si from "antd/lib/input/TextArea";
|
|
13
13
|
import Mt from "styled-components";
|
|
14
14
|
import Jn from "react-measure";
|
|
@@ -41,8 +41,8 @@ import Ji from "md5";
|
|
|
41
41
|
import { WidthProvider as Xi, Responsive as Zi } from "react-grid-layout";
|
|
42
42
|
import "react-grid-layout/css/styles.css";
|
|
43
43
|
import Qi from "antd/es/alert/ErrorBoundary";
|
|
44
|
-
import { v4 as
|
|
45
|
-
const { Text: es, Title: ts } =
|
|
44
|
+
import { v4 as Qr } from "uuid";
|
|
45
|
+
const { Text: es, Title: ts } = Gt, { useToken: ns } = Pe, rs = {
|
|
46
46
|
left: "justify-start",
|
|
47
47
|
center: "justify-center",
|
|
48
48
|
right: "justify-end"
|
|
@@ -54,7 +54,7 @@ const { Text: es, Title: ts } = Yt, { useToken: ns } = Pe, rs = {
|
|
|
54
54
|
className: `flex flex-row items-center pb-1 pt-1 ${rs[m]}`,
|
|
55
55
|
children: [
|
|
56
56
|
s && /* @__PURE__ */ n(ht, { title: s, children: /* @__PURE__ */ n(
|
|
57
|
-
|
|
57
|
+
Hr,
|
|
58
58
|
{
|
|
59
59
|
className: "pr-1 text-xs",
|
|
60
60
|
style: {
|
|
@@ -415,7 +415,7 @@ function ge({
|
|
|
415
415
|
h()
|
|
416
416
|
] }))();
|
|
417
417
|
}
|
|
418
|
-
const { confirm: cs } = Je,
|
|
418
|
+
const { confirm: cs } = Je, zt = ({
|
|
419
419
|
onOk: e,
|
|
420
420
|
confirmMessage: t,
|
|
421
421
|
lang: r
|
|
@@ -469,7 +469,7 @@ const { confirm: cs } = Je, qt = ({
|
|
|
469
469
|
children: t
|
|
470
470
|
}
|
|
471
471
|
);
|
|
472
|
-
},
|
|
472
|
+
}, fr = {
|
|
473
473
|
"terp-purchase": "ShoppingCart",
|
|
474
474
|
"terp-graph": "PieChart",
|
|
475
475
|
"terp-crm": "Contacts",
|
|
@@ -561,7 +561,7 @@ const { confirm: cs } = Je, qt = ({
|
|
|
561
561
|
STOCK_CLEAR: "CloseSquare",
|
|
562
562
|
STOCK_UNINDENT: "AlignLeft",
|
|
563
563
|
STOCK_PREFERENCES: "Setting"
|
|
564
|
-
}, ct = (e, t) => (e.indexOf("gtk-") !== -1 && (e = `STOCK_${e.replace("gtk-", "").replace(/\-/g, "_").toUpperCase()}`),
|
|
564
|
+
}, ct = (e, t) => (e.indexOf("gtk-") !== -1 && (e = `STOCK_${e.replace("gtk-", "").replace(/\-/g, "_").toUpperCase()}`), fr.hasOwnProperty(e) ? mr(fr[e], t) : mr(e, t));
|
|
565
565
|
function us(e) {
|
|
566
566
|
return `${e.split("-").map(
|
|
567
567
|
(t) => t.replace(
|
|
@@ -570,30 +570,30 @@ function us(e) {
|
|
|
570
570
|
)
|
|
571
571
|
).join("")}`;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function mr(e, t) {
|
|
574
574
|
let r = e.charAt(0).toUpperCase() + e.slice(1);
|
|
575
575
|
r.indexOf("-") !== -1 && (r = us(r));
|
|
576
576
|
const o = `${r}Outlined`;
|
|
577
|
-
if (
|
|
578
|
-
return () => et.createElement(
|
|
577
|
+
if (dr[o])
|
|
578
|
+
return () => et.createElement(dr[o], {
|
|
579
579
|
...t
|
|
580
580
|
});
|
|
581
581
|
const i = `Icon${r}`;
|
|
582
|
-
if (
|
|
582
|
+
if (ur[i]) {
|
|
583
583
|
const s = () => {
|
|
584
584
|
var l;
|
|
585
|
-
return et.createElement(
|
|
585
|
+
return et.createElement(ur[i], {
|
|
586
586
|
fill: "transparent",
|
|
587
587
|
size: ((l = t == null ? void 0 : t.style) == null ? void 0 : l.fontSize) || 17
|
|
588
588
|
});
|
|
589
589
|
};
|
|
590
|
-
return () => et.createElement(
|
|
590
|
+
return () => et.createElement(Br, {
|
|
591
591
|
component: s,
|
|
592
592
|
...t
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
const
|
|
596
|
+
const eo = (e) => {
|
|
597
597
|
const { ooui: t } = e, {
|
|
598
598
|
id: r,
|
|
599
599
|
label: o,
|
|
@@ -609,7 +609,7 @@ const Qr = (e) => {
|
|
|
609
609
|
}
|
|
610
610
|
function y() {
|
|
611
611
|
if (a) {
|
|
612
|
-
|
|
612
|
+
zt({
|
|
613
613
|
confirmMessage: a,
|
|
614
614
|
lang: h,
|
|
615
615
|
onOk: () => {
|
|
@@ -667,7 +667,7 @@ const Qr = (e) => {
|
|
|
667
667
|
}
|
|
668
668
|
function _() {
|
|
669
669
|
if (d) {
|
|
670
|
-
|
|
670
|
+
zt({
|
|
671
671
|
confirmMessage: d,
|
|
672
672
|
lang: T,
|
|
673
673
|
onOk: () => {
|
|
@@ -682,7 +682,7 @@ const Qr = (e) => {
|
|
|
682
682
|
return null;
|
|
683
683
|
if (t.buttons.length > 1)
|
|
684
684
|
return /* @__PURE__ */ n(ge, { ooui: new Rn({ ooui: t }), children: /* @__PURE__ */ A(
|
|
685
|
-
|
|
685
|
+
Ut.Button,
|
|
686
686
|
{
|
|
687
687
|
disabled: !a || p,
|
|
688
688
|
onClick: _,
|
|
@@ -703,7 +703,7 @@ const Qr = (e) => {
|
|
|
703
703
|
}
|
|
704
704
|
) });
|
|
705
705
|
if (r)
|
|
706
|
-
return /* @__PURE__ */ n(
|
|
706
|
+
return /* @__PURE__ */ n(eo, { ooui: r });
|
|
707
707
|
}, ms = (e) => {
|
|
708
708
|
const { ooui: t, executeButtonAction: r, lang: o } = e;
|
|
709
709
|
if (!t)
|
|
@@ -725,7 +725,7 @@ const Qr = (e) => {
|
|
|
725
725
|
}
|
|
726
726
|
function T() {
|
|
727
727
|
if (c) {
|
|
728
|
-
|
|
728
|
+
zt({
|
|
729
729
|
confirmMessage: c,
|
|
730
730
|
lang: o,
|
|
731
731
|
onOk: () => {
|
|
@@ -757,7 +757,7 @@ const Qr = (e) => {
|
|
|
757
757
|
});
|
|
758
758
|
return /* @__PURE__ */ n(He, { children: i });
|
|
759
759
|
}, hs = 0.7;
|
|
760
|
-
function
|
|
760
|
+
function hr() {
|
|
761
761
|
const { innerWidth: e, innerHeight: t } = window;
|
|
762
762
|
return {
|
|
763
763
|
width: e,
|
|
@@ -766,11 +766,11 @@ function mr() {
|
|
|
766
766
|
}
|
|
767
767
|
function mn() {
|
|
768
768
|
const [e, t] = w(
|
|
769
|
-
|
|
769
|
+
hr()
|
|
770
770
|
);
|
|
771
|
-
return
|
|
771
|
+
return fe(() => {
|
|
772
772
|
function r() {
|
|
773
|
-
t(
|
|
773
|
+
t(hr());
|
|
774
774
|
}
|
|
775
775
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
776
776
|
}, []), {
|
|
@@ -790,9 +790,9 @@ const _t = class _t {
|
|
|
790
790
|
return _t.handler;
|
|
791
791
|
}
|
|
792
792
|
};
|
|
793
|
-
|
|
793
|
+
sr(_t, "handler");
|
|
794
794
|
let E = _t;
|
|
795
|
-
const
|
|
795
|
+
const to = (e) => {
|
|
796
796
|
let t, r, o;
|
|
797
797
|
if (typeof e == "string" && e.indexOf(" -- ") !== -1 && e.indexOf(`
|
|
798
798
|
|
|
@@ -811,16 +811,16 @@ const eo = (e) => {
|
|
|
811
811
|
title: o
|
|
812
812
|
};
|
|
813
813
|
}, { error: ps, warning: gs } = Je, ze = (e) => {
|
|
814
|
-
const { message: t, type: r, title: o } =
|
|
814
|
+
const { message: t, type: r, title: o } = to(e);
|
|
815
815
|
(r === "error" ? ps : gs)({
|
|
816
816
|
title: o,
|
|
817
|
-
icon: r === "error" ? /* @__PURE__ */ n(pt, {}) : /* @__PURE__ */ n(
|
|
817
|
+
icon: r === "error" ? /* @__PURE__ */ n(pt, {}) : /* @__PURE__ */ n(Kr, {}),
|
|
818
818
|
centered: !0,
|
|
819
819
|
content: t
|
|
820
820
|
});
|
|
821
|
-
},
|
|
821
|
+
}, no = (e) => {
|
|
822
822
|
const { visible: t, onCloseModal: r, model: o, id: i, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = mn(), { t: d } = H(he), [u, c] = w([]), [f, m] = w(!1), [p, h] = w(!1), [g, y] = w({}), v = de();
|
|
823
|
-
|
|
823
|
+
fe(() => {
|
|
824
824
|
t ? T() : y({});
|
|
825
825
|
}, [t]);
|
|
826
826
|
async function T() {
|
|
@@ -902,7 +902,7 @@ const eo = (e) => {
|
|
|
902
902
|
/* @__PURE__ */ n(
|
|
903
903
|
_e,
|
|
904
904
|
{
|
|
905
|
-
icon: /* @__PURE__ */ n(
|
|
905
|
+
icon: /* @__PURE__ */ n(qt, {}),
|
|
906
906
|
onClick: r,
|
|
907
907
|
disabled: p,
|
|
908
908
|
children: d("cancel")
|
|
@@ -948,7 +948,7 @@ const { info: ys } = Je, ft = (e) => {
|
|
|
948
948
|
centered: !0,
|
|
949
949
|
content: e
|
|
950
950
|
});
|
|
951
|
-
}, { useToken: vs } = Pe,
|
|
951
|
+
}, { useToken: vs } = Pe, ro = (e) => {
|
|
952
952
|
const { ooui: t, isSearchField: r = !1 } = e, { id: o, readOnly: i, isPassword: s, required: a, translatable: l } = t, { token: d } = vs(), u = a && !i ? { backgroundColor: d.colorPrimaryBg } : void 0, c = H(Ne), { elementHasLostFocus: f } = c || {};
|
|
953
953
|
let m = /* @__PURE__ */ n(
|
|
954
954
|
it,
|
|
@@ -1008,7 +1008,7 @@ const { info: ys } = Je, ft = (e) => {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
),
|
|
1010
1010
|
/* @__PURE__ */ n(
|
|
1011
|
-
|
|
1011
|
+
no,
|
|
1012
1012
|
{
|
|
1013
1013
|
id: s,
|
|
1014
1014
|
model: a,
|
|
@@ -1039,7 +1039,7 @@ const { info: ys } = Je, ft = (e) => {
|
|
|
1039
1039
|
Ze,
|
|
1040
1040
|
{
|
|
1041
1041
|
tooltip: m("translate"),
|
|
1042
|
-
icon: /* @__PURE__ */ n(
|
|
1042
|
+
icon: /* @__PURE__ */ n(Wr, {}),
|
|
1043
1043
|
onClick: async () => {
|
|
1044
1044
|
d != null && d() ? ft(m("saveBeforeTranslate")) : ft(m("enterTextBeforeTranslate"));
|
|
1045
1045
|
},
|
|
@@ -1047,10 +1047,10 @@ const { info: ys } = Je, ft = (e) => {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
) })
|
|
1049
1049
|
] }) });
|
|
1050
|
-
}, { defaultAlgorithm: bs, defaultSeed: Cs } = Pe, xs = bs(Cs), { Option: Ss } = Ct,
|
|
1050
|
+
}, { defaultAlgorithm: bs, defaultSeed: Cs } = Pe, xs = bs(Cs), { Option: Ss } = Ct, oo = (e) => {
|
|
1051
1051
|
const { ooui: t } = e, { required: r } = t;
|
|
1052
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...e, children: /* @__PURE__ */ n(
|
|
1053
|
-
},
|
|
1052
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...e, children: /* @__PURE__ */ n(io, { ...e }) });
|
|
1053
|
+
}, io = (e) => {
|
|
1054
1054
|
const { ooui: t, onChange: r, value: o } = e, { selectionValues: i, readOnly: s, required: a } = t, l = Array.from(i.entries()), d = l && l.length && l.map((c) => {
|
|
1055
1055
|
const [f, m] = c;
|
|
1056
1056
|
return /* @__PURE__ */ n(Ss, { value: f, children: m }, f);
|
|
@@ -1071,7 +1071,7 @@ const { info: ys } = Je, ft = (e) => {
|
|
|
1071
1071
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
1072
1072
|
background-color: ${xs.colorPrimaryBg};
|
|
1073
1073
|
}
|
|
1074
|
-
`, { defaultAlgorithm: Is, defaultSeed: Fs } = Pe,
|
|
1074
|
+
`, { defaultAlgorithm: Is, defaultSeed: Fs } = Pe, pr = Is(Fs), _s = (e) => {
|
|
1075
1075
|
const { ooui: t } = e, { id: r, readOnly: o, required: i } = t;
|
|
1076
1076
|
return /* @__PURE__ */ n(ge, { ...e, valuePropName: "checked", children: /* @__PURE__ */ n(Os, { id: r, readOnly: o, required: i }) });
|
|
1077
1077
|
}, Os = (e) => {
|
|
@@ -1079,11 +1079,11 @@ const { info: ys } = Je, ft = (e) => {
|
|
|
1079
1079
|
return /* @__PURE__ */ n("div", { className: "flex flex-row", children: /* @__PURE__ */ n(t && !r ? Rs : Ht, { disabled: r, ...o }) });
|
|
1080
1080
|
}, Rs = Mt(Ht)`
|
|
1081
1081
|
.ant-checkbox-inner {
|
|
1082
|
-
background-color: ${
|
|
1082
|
+
background-color: ${pr.colorPrimaryBg};
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
1085
1085
|
.ant-checkbox-checked .ant-checkbox-inner {
|
|
1086
|
-
background-color: ${
|
|
1086
|
+
background-color: ${pr.colorPrimary};
|
|
1087
1087
|
}
|
|
1088
1088
|
`;
|
|
1089
1089
|
function Vs(e) {
|
|
@@ -1099,7 +1099,7 @@ async function At(e) {
|
|
|
1099
1099
|
ext: "txt"
|
|
1100
1100
|
};
|
|
1101
1101
|
}
|
|
1102
|
-
const
|
|
1102
|
+
const so = (e) => new Promise((t, r) => {
|
|
1103
1103
|
const o = new FileReader();
|
|
1104
1104
|
o.readAsDataURL(e), o.onload = (i) => t(i.target.result.split(",")[1]), o.onerror = (i) => r(i);
|
|
1105
1105
|
});
|
|
@@ -1123,7 +1123,7 @@ const As = (e) => {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
async function u(f) {
|
|
1125
1125
|
f.stopPropagation(), f.preventDefault();
|
|
1126
|
-
const m = f.target.files[0], p = await
|
|
1126
|
+
const m = f.target.files[0], p = await so(m);
|
|
1127
1127
|
l(p);
|
|
1128
1128
|
}
|
|
1129
1129
|
function c() {
|
|
@@ -1204,7 +1204,7 @@ const As = (e) => {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
);
|
|
1206
1206
|
}, Ot = (e) => {
|
|
1207
|
-
const t = e.arch, r = e.fields, o = new
|
|
1207
|
+
const t = e.arch, r = e.fields, o = new Mr(r);
|
|
1208
1208
|
return o.parse(t), o;
|
|
1209
1209
|
}, Ms = (e, t, r) => e.columns.map((i) => {
|
|
1210
1210
|
const s = i.type, a = i.id, l = t == null ? void 0 : t[s];
|
|
@@ -1220,14 +1220,14 @@ const As = (e) => {
|
|
|
1220
1220
|
return s === "many2one" && (f = ((p = u[a]) == null ? void 0 : p.value) || "", m = ((h = c[a]) == null ? void 0 : h.value) || ""), f < m ? -1 : f > m ? 1 : 0;
|
|
1221
1221
|
}
|
|
1222
1222
|
};
|
|
1223
|
-
}),
|
|
1223
|
+
}), ao = (e, t) => t.map((o) => {
|
|
1224
1224
|
const i = {};
|
|
1225
1225
|
return Object.keys(o).map((s) => {
|
|
1226
1226
|
if (s === "id")
|
|
1227
1227
|
i[s] = o[s];
|
|
1228
1228
|
else {
|
|
1229
1229
|
const a = e.findById(s);
|
|
1230
|
-
a instanceof oi || a instanceof Ln ? i[s] = o[s] : a instanceof
|
|
1230
|
+
a instanceof oi || a instanceof Ln ? i[s] = o[s] : a instanceof Nr ? i[s] = o[s] && Array.isArray(o[s]) && o[s].length === 2 && {
|
|
1231
1231
|
model: a.relation,
|
|
1232
1232
|
id: o[s][0],
|
|
1233
1233
|
value: o[s][1]
|
|
@@ -1235,13 +1235,13 @@ const As = (e) => {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}), i;
|
|
1237
1237
|
});
|
|
1238
|
-
function
|
|
1239
|
-
return
|
|
1238
|
+
function nn(e) {
|
|
1239
|
+
return lo(e, "colors");
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
return
|
|
1241
|
+
function gr(e) {
|
|
1242
|
+
return lo(e, "status");
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1244
|
+
function lo(e, t) {
|
|
1245
1245
|
if (!e)
|
|
1246
1246
|
return;
|
|
1247
1247
|
const r = {};
|
|
@@ -1296,7 +1296,7 @@ const Xn = async (e) => {
|
|
|
1296
1296
|
colors: g
|
|
1297
1297
|
}
|
|
1298
1298
|
});
|
|
1299
|
-
c = y[0], f =
|
|
1299
|
+
c = y[0], f = nn(y[1]);
|
|
1300
1300
|
} else
|
|
1301
1301
|
c = await E.getHandler().readObjects({
|
|
1302
1302
|
model: r,
|
|
@@ -1422,7 +1422,7 @@ const Xn = async (e) => {
|
|
|
1422
1422
|
] }, S) }, S);
|
|
1423
1423
|
}) }),
|
|
1424
1424
|
/* @__PURE__ */ n(
|
|
1425
|
-
|
|
1425
|
+
Zt,
|
|
1426
1426
|
{
|
|
1427
1427
|
formView: r.get("form"),
|
|
1428
1428
|
model: h,
|
|
@@ -1452,7 +1452,7 @@ const Xn = async (e) => {
|
|
|
1452
1452
|
" "
|
|
1453
1453
|
] }),
|
|
1454
1454
|
r.tooltip && /* @__PURE__ */ n(ht, { title: r.tooltip, children: /* @__PURE__ */ n(
|
|
1455
|
-
|
|
1455
|
+
Hr,
|
|
1456
1456
|
{
|
|
1457
1457
|
className: "pr-1 text-xs",
|
|
1458
1458
|
style: { color: t.colorPrimaryBg }
|
|
@@ -1563,7 +1563,7 @@ const Xn = async (e) => {
|
|
|
1563
1563
|
} else
|
|
1564
1564
|
o[i] = !1;
|
|
1565
1565
|
}), o;
|
|
1566
|
-
},
|
|
1566
|
+
}, co = (e) => {
|
|
1567
1567
|
const t = {
|
|
1568
1568
|
primary: [],
|
|
1569
1569
|
secondary: []
|
|
@@ -1573,11 +1573,11 @@ const Xn = async (e) => {
|
|
|
1573
1573
|
r.secondary
|
|
1574
1574
|
));
|
|
1575
1575
|
}), {
|
|
1576
|
-
primary: t.primary.filter(
|
|
1577
|
-
secondary: t.secondary.filter(
|
|
1576
|
+
primary: t.primary.filter(yr),
|
|
1577
|
+
secondary: t.secondary.filter(yr)
|
|
1578
1578
|
};
|
|
1579
1579
|
};
|
|
1580
|
-
function
|
|
1580
|
+
function yr(e, t, r) {
|
|
1581
1581
|
return r.indexOf(e) === t;
|
|
1582
1582
|
}
|
|
1583
1583
|
const Nt = ({
|
|
@@ -1589,7 +1589,7 @@ const Nt = ({
|
|
|
1589
1589
|
const i = e[o];
|
|
1590
1590
|
t[o] && t[o].type === "many2one" && i && Array.isArray(i) && i.length === 2 ? r[o] = i[0] : r[o] = i;
|
|
1591
1591
|
}), r;
|
|
1592
|
-
},
|
|
1592
|
+
}, Wt = (e) => {
|
|
1593
1593
|
let t = 0;
|
|
1594
1594
|
e = e.toString().padEnd(10, "0");
|
|
1595
1595
|
for (let o = 0; o < e.length; o++)
|
|
@@ -1603,21 +1603,21 @@ const Nt = ({
|
|
|
1603
1603
|
}, zs = (e, t) => e.replace(
|
|
1604
1604
|
/\{([^}]+)\}/g,
|
|
1605
1605
|
(r, o) => t[o] !== void 0 ? t[o] : r
|
|
1606
|
-
), Js = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(
|
|
1606
|
+
), Js = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(uo, { ...e }) }), uo = (e) => {
|
|
1607
1607
|
const { ooui: t, value: r } = e;
|
|
1608
1608
|
let o = r, i = r;
|
|
1609
1609
|
if (t.selectionValues.size ? o = t.selectionValues.get(r) : Array.isArray(r) && (i = r[0], o = r[1]), !r)
|
|
1610
1610
|
return null;
|
|
1611
|
-
const s = t.colors === "auto" ?
|
|
1612
|
-
return /* @__PURE__ */ n(
|
|
1613
|
-
},
|
|
1611
|
+
const s = t.colors === "auto" ? Wt(i) : t.colors[i] || Wt(i);
|
|
1612
|
+
return /* @__PURE__ */ n(Zn, { color: s, children: o });
|
|
1613
|
+
}, Zn = (e) => {
|
|
1614
1614
|
let { color: t } = e, r = {};
|
|
1615
1615
|
return !Vi(e.color) && !Ai(e.color) && (r = {
|
|
1616
1616
|
color: t,
|
|
1617
1617
|
borderColor: t,
|
|
1618
1618
|
borderStyle: "solid",
|
|
1619
1619
|
borderWidth: "1px"
|
|
1620
|
-
}, t = `${t}20`), /* @__PURE__ */ n(
|
|
1620
|
+
}, t = `${t}20`), /* @__PURE__ */ n(Vr, { ...e, style: r, color: t, children: e.children });
|
|
1621
1621
|
}, Xs = (e) => {
|
|
1622
1622
|
const { ooui: t } = e;
|
|
1623
1623
|
return /* @__PURE__ */ n(ge, { type: "array", ...e, children: /* @__PURE__ */ n(Zs, { ooui: t }) });
|
|
@@ -1675,9 +1675,9 @@ const Nt = ({
|
|
|
1675
1675
|
}, _ = (O) => {
|
|
1676
1676
|
const { label: k, closable: x, onClose: S } = O, I = (D) => {
|
|
1677
1677
|
D.preventDefault(), D.stopPropagation();
|
|
1678
|
-
}, C =
|
|
1678
|
+
}, C = Wt(k);
|
|
1679
1679
|
return /* @__PURE__ */ n(
|
|
1680
|
-
|
|
1680
|
+
Zn,
|
|
1681
1681
|
{
|
|
1682
1682
|
color: C,
|
|
1683
1683
|
onMouseDown: I,
|
|
@@ -1704,27 +1704,27 @@ const Nt = ({
|
|
|
1704
1704
|
}, Qs = (e) => {
|
|
1705
1705
|
switch (e) {
|
|
1706
1706
|
case "form":
|
|
1707
|
-
return
|
|
1707
|
+
return Xt;
|
|
1708
1708
|
case "tree":
|
|
1709
1709
|
return pn;
|
|
1710
1710
|
case "notebook":
|
|
1711
|
-
return
|
|
1711
|
+
return Xl;
|
|
1712
1712
|
case "group":
|
|
1713
1713
|
return Io;
|
|
1714
1714
|
case "label":
|
|
1715
1715
|
return fn;
|
|
1716
1716
|
case "char":
|
|
1717
|
-
return
|
|
1717
|
+
return ro;
|
|
1718
1718
|
case "text":
|
|
1719
|
-
return
|
|
1719
|
+
return Ql;
|
|
1720
1720
|
case "button":
|
|
1721
|
-
return
|
|
1721
|
+
return eo;
|
|
1722
1722
|
case "buttonGroup":
|
|
1723
1723
|
return fs;
|
|
1724
1724
|
case "selection":
|
|
1725
|
-
return
|
|
1725
|
+
return oo;
|
|
1726
1726
|
case "many2one":
|
|
1727
|
-
return
|
|
1727
|
+
return vl;
|
|
1728
1728
|
case "boolean":
|
|
1729
1729
|
return _s;
|
|
1730
1730
|
case "integer":
|
|
@@ -1734,29 +1734,29 @@ const Nt = ({
|
|
|
1734
1734
|
case "progressbar":
|
|
1735
1735
|
return Ga;
|
|
1736
1736
|
case "date":
|
|
1737
|
-
return dc;
|
|
1738
|
-
case "datetime":
|
|
1739
1737
|
return uc;
|
|
1740
|
-
case "
|
|
1738
|
+
case "datetime":
|
|
1741
1739
|
return fc;
|
|
1740
|
+
case "time":
|
|
1741
|
+
return mc;
|
|
1742
1742
|
case "one2many":
|
|
1743
1743
|
case "one2many_list":
|
|
1744
1744
|
case "many2many":
|
|
1745
|
-
return
|
|
1745
|
+
return Gl;
|
|
1746
1746
|
case "separator":
|
|
1747
|
-
return
|
|
1747
|
+
return tc;
|
|
1748
1748
|
case "reference":
|
|
1749
|
-
return
|
|
1749
|
+
return pc;
|
|
1750
1750
|
case "binary":
|
|
1751
|
-
return
|
|
1751
|
+
return vc;
|
|
1752
1752
|
case "image":
|
|
1753
1753
|
return As;
|
|
1754
1754
|
case "url":
|
|
1755
|
-
return _c;
|
|
1756
|
-
case "email":
|
|
1757
1755
|
return Oc;
|
|
1756
|
+
case "email":
|
|
1757
|
+
return Rc;
|
|
1758
1758
|
case "float_time":
|
|
1759
|
-
return
|
|
1759
|
+
return ql;
|
|
1760
1760
|
case "fiber_grid":
|
|
1761
1761
|
return ks;
|
|
1762
1762
|
case "timeline":
|
|
@@ -1768,19 +1768,19 @@ const Nt = ({
|
|
|
1768
1768
|
case "tag":
|
|
1769
1769
|
return Js;
|
|
1770
1770
|
case "multicheckbox":
|
|
1771
|
-
return
|
|
1771
|
+
return sd;
|
|
1772
1772
|
case "markdown":
|
|
1773
|
-
return
|
|
1773
|
+
return ld;
|
|
1774
1774
|
case "radio":
|
|
1775
|
-
return
|
|
1775
|
+
return dd;
|
|
1776
1776
|
case "switch":
|
|
1777
|
-
return
|
|
1777
|
+
return fd;
|
|
1778
1778
|
case "steps":
|
|
1779
|
-
return
|
|
1779
|
+
return hd;
|
|
1780
1780
|
case "codeeditor":
|
|
1781
|
-
return
|
|
1781
|
+
return gd;
|
|
1782
1782
|
case "comments_timeline":
|
|
1783
|
-
return
|
|
1783
|
+
return Sd;
|
|
1784
1784
|
default:
|
|
1785
1785
|
return;
|
|
1786
1786
|
}
|
|
@@ -1866,7 +1866,7 @@ const Nt = ({
|
|
|
1866
1866
|
minHeight: 0,
|
|
1867
1867
|
minWidth: 0
|
|
1868
1868
|
}, children: d });
|
|
1869
|
-
}, { confirm: aa } = Je,
|
|
1869
|
+
}, { confirm: aa } = Je, Jt = ({
|
|
1870
1870
|
onOk: e,
|
|
1871
1871
|
onCancel: t,
|
|
1872
1872
|
lang: r
|
|
@@ -1881,7 +1881,7 @@ const Nt = ({
|
|
|
1881
1881
|
onCancel: t,
|
|
1882
1882
|
cancelText: Fe("cancel", r)
|
|
1883
1883
|
});
|
|
1884
|
-
}, { error: la } = Je,
|
|
1884
|
+
}, { error: la } = Je, vr = (e) => {
|
|
1885
1885
|
la({
|
|
1886
1886
|
title: Fe("formHasErrors", e),
|
|
1887
1887
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
@@ -1891,7 +1891,7 @@ const Nt = ({
|
|
|
1891
1891
|
}, { warning: ca } = Je, da = (e, t, r) => {
|
|
1892
1892
|
ca({
|
|
1893
1893
|
title: e,
|
|
1894
|
-
icon: /* @__PURE__ */ n(
|
|
1894
|
+
icon: /* @__PURE__ */ n(Kr, {}),
|
|
1895
1895
|
centered: !0,
|
|
1896
1896
|
content: t,
|
|
1897
1897
|
onOk: r
|
|
@@ -1907,7 +1907,7 @@ const Nt = ({
|
|
|
1907
1907
|
children: t
|
|
1908
1908
|
}
|
|
1909
1909
|
);
|
|
1910
|
-
},
|
|
1910
|
+
}, wr = (e) => typeof e == "string" && e === "true" || e === "false" ? e === "true" : e, fa = (e, t) => {
|
|
1911
1911
|
const r = va(e), o = ga(r), i = ya(
|
|
1912
1912
|
o,
|
|
1913
1913
|
t
|
|
@@ -1934,9 +1934,9 @@ const Nt = ({
|
|
|
1934
1934
|
e,
|
|
1935
1935
|
"in",
|
|
1936
1936
|
t.map(
|
|
1937
|
-
(a) =>
|
|
1937
|
+
(a) => wr(a)
|
|
1938
1938
|
)
|
|
1939
|
-
] : [e, "=",
|
|
1939
|
+
] : [e, "=", wr(t)];
|
|
1940
1940
|
}, ha = (e) => Object.keys(e).filter((t) => t.indexOf("#date") !== -1), pa = (e) => {
|
|
1941
1941
|
const t = { ...e };
|
|
1942
1942
|
return Object.keys(t).forEach(
|
|
@@ -1975,12 +1975,12 @@ const Nt = ({
|
|
|
1975
1975
|
return e.forEach((r) => {
|
|
1976
1976
|
Array.isArray(r) && r[0] ? t[r[0]] = !0 : t[r] = !0;
|
|
1977
1977
|
}), Object.keys(t);
|
|
1978
|
-
},
|
|
1978
|
+
}, jt = (e, t) => {
|
|
1979
1979
|
const r = [...e], o = wa(e);
|
|
1980
1980
|
return t.forEach((i) => {
|
|
1981
1981
|
Array.isArray(i) && i[0] ? o.includes(i[0]) || r.push(i) : o.includes(i) || r.push(i);
|
|
1982
1982
|
}), r;
|
|
1983
|
-
},
|
|
1983
|
+
}, Yt = 80, mo = (e) => {
|
|
1984
1984
|
const {
|
|
1985
1985
|
model: t,
|
|
1986
1986
|
setSearchTreeNameSearch: r,
|
|
@@ -2005,7 +2005,7 @@ const Nt = ({
|
|
|
2005
2005
|
setLimit: _,
|
|
2006
2006
|
searchParams: O = [],
|
|
2007
2007
|
setSearchValues: k
|
|
2008
|
-
} = e, [x, S] = w(!1), [I, C] = w(!1), [D, P] = w(), [L, j] = w(1), [M, $] = w(0), [K, V] = w(), [G, ne] = w([]), [J, le] = w(void 0), [Y, R] = w(void 0), N = de(b ||
|
|
2008
|
+
} = e, [x, S] = w(!1), [I, C] = w(!1), [D, P] = w(), [L, j] = w(1), [M, $] = w(0), [K, V] = w(), [G, ne] = w([]), [J, le] = w(void 0), [Y, R] = w(void 0), N = de(b || Yt), ee = de([]), ce = De((re) => {
|
|
2009
2009
|
y == null || y([...re]), ne([...re]);
|
|
2010
2010
|
}, []), Ie = De(() => v || G, [v, G]), X = De(async () => {
|
|
2011
2011
|
const re = await E.getHandler().nameSearch({
|
|
@@ -2026,7 +2026,7 @@ const Nt = ({
|
|
|
2026
2026
|
context: u,
|
|
2027
2027
|
attrs: Ke
|
|
2028
2028
|
}), ve = q[0];
|
|
2029
|
-
ee.current = [...ve], le(
|
|
2029
|
+
ee.current = [...ve], le(nn(q[1])), R(gr(q[1]));
|
|
2030
2030
|
const Ve = ve.map((oe) => oe.id), $e = p !== void 0 ? Rt({
|
|
2031
2031
|
resultsToSort: ve,
|
|
2032
2032
|
sorter: p,
|
|
@@ -2050,7 +2050,7 @@ const Nt = ({
|
|
|
2050
2050
|
c
|
|
2051
2051
|
]), U = De(
|
|
2052
2052
|
async (re) => {
|
|
2053
|
-
const { params: Ee, newOffset: ye } = re || {}, Me =
|
|
2053
|
+
const { params: Ee, newOffset: ye } = re || {}, Me = jt(Ee || O, T), { colors: Ke, status: q } = Ot(f), ve = {};
|
|
2054
2054
|
Ke && (ve.colors = Ke), q && (ve.status = q);
|
|
2055
2055
|
const { totalItems: Ve, results: $e, attrsEvaluated: oe } = await E.getHandler().searchForTree({
|
|
2056
2056
|
params: Me,
|
|
@@ -2061,7 +2061,7 @@ const Nt = ({
|
|
|
2061
2061
|
context: u,
|
|
2062
2062
|
attrs: ve
|
|
2063
2063
|
});
|
|
2064
|
-
le(
|
|
2064
|
+
le(nn(oe)), R(gr(oe)), ee.current = [...$e];
|
|
2065
2065
|
const ue = p !== void 0 ? Rt({
|
|
2066
2066
|
resultsToSort: $e,
|
|
2067
2067
|
sorter: p,
|
|
@@ -2165,7 +2165,7 @@ const Nt = ({
|
|
|
2165
2165
|
},
|
|
2166
2166
|
[S, b, $, j]
|
|
2167
2167
|
), Le = De(() => {
|
|
2168
|
-
x || (r == null || r(void 0), i == null || i([]), k == null || k({}), P(void 0), $(0), j(1), _ == null || _(b ||
|
|
2168
|
+
x || (r == null || r(void 0), i == null || i([]), k == null || k({}), P(void 0), $(0), j(1), _ == null || _(b || Yt));
|
|
2169
2169
|
}, [
|
|
2170
2170
|
x,
|
|
2171
2171
|
r,
|
|
@@ -2183,11 +2183,11 @@ const Nt = ({
|
|
|
2183
2183
|
fields: f.field_parent ? { ...f.fields, [f.field_parent]: {} } : f.fields,
|
|
2184
2184
|
context: u
|
|
2185
2185
|
});
|
|
2186
|
-
return ce([...Ie(), ...ye]),
|
|
2186
|
+
return ce([...Ie(), ...ye]), ao(Ot(f), ye);
|
|
2187
2187
|
},
|
|
2188
2188
|
[f, t, u, Ie, ce]
|
|
2189
2189
|
), xe = De(async () => await E.getHandler().searchAllIds({
|
|
2190
|
-
params:
|
|
2190
|
+
params: jt(O, T),
|
|
2191
2191
|
model: t,
|
|
2192
2192
|
context: u,
|
|
2193
2193
|
totalItems: K
|
|
@@ -2239,19 +2239,19 @@ const Nt = ({
|
|
|
2239
2239
|
goToResourceId: x,
|
|
2240
2240
|
limit: S
|
|
2241
2241
|
} = e, [I, C] = w(!1), [D, P] = w(!1), [L, j] = w(!1), [M, $] = w(!0), [K, V] = w(!0), [G, ne] = w([]), [J, le] = w(!1), [Y, R] = w([]), [N, ee] = w(!1), [ce, Ie] = w(!0), [X, U] = w(), [Ce, we] = w({}), [Ye, ke] = w(
|
|
2242
|
-
S !== void 0 ? S :
|
|
2242
|
+
S !== void 0 ? S : Yt
|
|
2243
2243
|
), [Le, Ue] = w(o);
|
|
2244
|
-
|
|
2244
|
+
fe(() => {
|
|
2245
2245
|
m && m.length > 0 && !p && (h == null || h(0), c == null || c(m[0].id));
|
|
2246
|
-
}, [m]),
|
|
2247
|
-
ke(S !== void 0 ? S :
|
|
2248
|
-
}, [S]),
|
|
2246
|
+
}, [m]), fe(() => {
|
|
2247
|
+
ke(S !== void 0 ? S : Yt);
|
|
2248
|
+
}, [S]), fe(() => {
|
|
2249
2249
|
s.length === 1 ? U(s[0]) : s.length > 1 && U(
|
|
2250
2250
|
s.filter(
|
|
2251
2251
|
(re) => re.view_id !== r.view_id
|
|
2252
2252
|
)[0]
|
|
2253
2253
|
);
|
|
2254
|
-
}, [s]),
|
|
2254
|
+
}, [s]), fe(() => {
|
|
2255
2255
|
(X == null ? void 0 : X.view_id) === r.view_id && s.length > 1 && U(
|
|
2256
2256
|
s.filter(
|
|
2257
2257
|
(re) => re.view_id !== r.view_id
|
|
@@ -2353,7 +2353,7 @@ const Nt = ({
|
|
|
2353
2353
|
children: t
|
|
2354
2354
|
}
|
|
2355
2355
|
);
|
|
2356
|
-
}, Pt = et.createContext(null),
|
|
2356
|
+
}, Pt = et.createContext(null), br = async (e) => {
|
|
2357
2357
|
var t;
|
|
2358
2358
|
for (let r = 0; r < e.length; r++)
|
|
2359
2359
|
await ((t = e == null ? void 0 : e[r]) == null ? void 0 : t.call(e));
|
|
@@ -2528,7 +2528,7 @@ const Nt = ({
|
|
|
2528
2528
|
}), p(!1), await new Promise((D) => setTimeout(D, 300)), g({ domain: k, model: x, context: I, formView: S, actionData: C }), p(!0);
|
|
2529
2529
|
}
|
|
2530
2530
|
async function O() {
|
|
2531
|
-
|
|
2531
|
+
br(c.current), c.current = [], p(!1), g({
|
|
2532
2532
|
domain: void 0,
|
|
2533
2533
|
model: void 0,
|
|
2534
2534
|
context: {},
|
|
@@ -2558,7 +2558,7 @@ const Nt = ({
|
|
|
2558
2558
|
}
|
|
2559
2559
|
),
|
|
2560
2560
|
/* @__PURE__ */ n(
|
|
2561
|
-
|
|
2561
|
+
Zt,
|
|
2562
2562
|
{
|
|
2563
2563
|
buttonModal: !0,
|
|
2564
2564
|
parentContext: h.context,
|
|
@@ -2567,7 +2567,7 @@ const Nt = ({
|
|
|
2567
2567
|
visible: m,
|
|
2568
2568
|
onSubmitSucceed: O,
|
|
2569
2569
|
onCancel: () => {
|
|
2570
|
-
|
|
2570
|
+
br(c.current), c.current = [], p(!1), g({
|
|
2571
2571
|
domain: void 0,
|
|
2572
2572
|
model: void 0,
|
|
2573
2573
|
context: {},
|
|
@@ -2642,7 +2642,7 @@ const Ta = wt(xa), Ia = ({
|
|
|
2642
2642
|
if (typeof e == "string" && e.indexOf(" -- ") !== -1 && e.indexOf(`
|
|
2643
2643
|
|
|
2644
2644
|
`) !== -1) {
|
|
2645
|
-
const { message: i, type: s, title: a } =
|
|
2645
|
+
const { message: i, type: s, title: a } = to(e);
|
|
2646
2646
|
r = /* @__PURE__ */ n(zn, { content: `${a}<br />${i}` }), o = s;
|
|
2647
2647
|
} else
|
|
2648
2648
|
r = e.message ? JSON.stringify(e.message) : JSON.stringify(e);
|
|
@@ -2694,25 +2694,25 @@ function _a(e, t) {
|
|
|
2694
2694
|
Pt
|
|
2695
2695
|
), { processAction: Ve, globalValues: $e } = ve || {};
|
|
2696
2696
|
bt(t, () => ({
|
|
2697
|
-
submitForm:
|
|
2697
|
+
submitForm: Qt,
|
|
2698
2698
|
getFields: Qe,
|
|
2699
2699
|
getValues: We,
|
|
2700
2700
|
getPlainValues: z,
|
|
2701
2701
|
getContext: Se,
|
|
2702
2702
|
fetchValues: gt,
|
|
2703
|
-
cancelUnsavedChanges:
|
|
2703
|
+
cancelUnsavedChanges: rr,
|
|
2704
2704
|
clearAndReload: () => {
|
|
2705
|
-
N.current = void 0, j(void 0),
|
|
2705
|
+
N.current = void 0, j(void 0), nr();
|
|
2706
2706
|
}
|
|
2707
|
-
})),
|
|
2707
|
+
})), fe(() => {
|
|
2708
2708
|
if (P(void 0), !(!r && !h)) {
|
|
2709
2709
|
if (!F) {
|
|
2710
2710
|
N.current = void 0, j(void 0);
|
|
2711
2711
|
return;
|
|
2712
2712
|
}
|
|
2713
|
-
(o === void 0 && V || o !== void 0 && V && o < 0) && (N.current = void 0, j(void 0)),
|
|
2713
|
+
(o === void 0 && V || o !== void 0 && V && o < 0) && (N.current = void 0, j(void 0)), nr();
|
|
2714
2714
|
}
|
|
2715
|
-
}, [o, r, p, h, F]),
|
|
2715
|
+
}, [o, r, p, h, F]), fe(() => {
|
|
2716
2716
|
Y && (vn({
|
|
2717
2717
|
elementHasLostFocus: !0
|
|
2718
2718
|
}), R(!1));
|
|
@@ -2742,8 +2742,8 @@ function _a(e, t) {
|
|
|
2742
2742
|
function z() {
|
|
2743
2743
|
const B = We(), W = Qe(), Q = {};
|
|
2744
2744
|
return Object.keys(B).forEach((te) => {
|
|
2745
|
-
const
|
|
2746
|
-
W[te] && W[te].type === "many2one" &&
|
|
2745
|
+
const me = B[te];
|
|
2746
|
+
W[te] && W[te].type === "many2one" && me && Array.isArray(me) && me.length === 2 ? Q[te] = me[0] : W[te] && (W[te].type === "one2many" || W[te].type === "many2many") && me && me.items ? Q[te] = me.items.filter((ot) => ot.operation !== "pendingRemove").map((ot) => ot.id) : Q[te] = me;
|
|
2747
2747
|
}), Q;
|
|
2748
2748
|
}
|
|
2749
2749
|
function ie() {
|
|
@@ -2803,7 +2803,7 @@ function _a(e, t) {
|
|
|
2803
2803
|
return xn.error(x("fillRequiredFields")), !0;
|
|
2804
2804
|
}
|
|
2805
2805
|
}
|
|
2806
|
-
const
|
|
2806
|
+
const nr = async () => {
|
|
2807
2807
|
P(void 0), ye == null || ye(!0);
|
|
2808
2808
|
let B;
|
|
2809
2809
|
try {
|
|
@@ -2817,18 +2817,18 @@ function _a(e, t) {
|
|
|
2817
2817
|
P(W != null && W.message ? W.message + W.stack : W), ye == null || ye(!1);
|
|
2818
2818
|
}
|
|
2819
2819
|
}, gt = async (B) => {
|
|
2820
|
-
let W, Q, te,
|
|
2821
|
-
ye == null || ye(!0), P(void 0), B != null && B.fields ? (Q = B.fields, te = B.arch) : (Q = V, te = $), p && (B == null ? void 0 : B.forceRefresh) !== !0 ? W = p : { values: W, defaultGetCalled:
|
|
2820
|
+
let W, Q, te, me;
|
|
2821
|
+
ye == null || ye(!0), P(void 0), B != null && B.fields ? (Q = B.fields, te = B.arch) : (Q = V, te = $), p && (B == null ? void 0 : B.forceRefresh) !== !0 ? W = p : { values: W, defaultGetCalled: me } = await Eo({
|
|
2822
2822
|
fields: Q,
|
|
2823
2823
|
arch: te
|
|
2824
2824
|
}), T && (W = { ...Us(T), ...W }), ee.current = Ft(W, Q), Lt({
|
|
2825
2825
|
values: W,
|
|
2826
2826
|
fields: Q,
|
|
2827
2827
|
reset: !0,
|
|
2828
|
-
isDefaultGet:
|
|
2829
|
-
}), $t({ fields: Q, arch: te, values: W }), ye == null || ye(!1), re == null || re(!1),
|
|
2830
|
-
},
|
|
2831
|
-
rt() ?
|
|
2828
|
+
isDefaultGet: me
|
|
2829
|
+
}), $t({ fields: Q, arch: te, values: W }), ye == null || ye(!1), re == null || re(!1), me && R(!0);
|
|
2830
|
+
}, rr = async () => new Promise(async (B) => {
|
|
2831
|
+
rt() ? Jt({
|
|
2832
2832
|
lang: S,
|
|
2833
2833
|
onOk: () => {
|
|
2834
2834
|
ue == null || ue(), B(!0);
|
|
@@ -2877,7 +2877,7 @@ function _a(e, t) {
|
|
|
2877
2877
|
fields: B,
|
|
2878
2878
|
context: v
|
|
2879
2879
|
}))[0];
|
|
2880
|
-
const
|
|
2880
|
+
const me = await E.getHandler().search({
|
|
2881
2881
|
params: [
|
|
2882
2882
|
["res_model", "=", r],
|
|
2883
2883
|
["res_id", "=", se()]
|
|
@@ -2886,11 +2886,11 @@ function _a(e, t) {
|
|
|
2886
2886
|
context: Se(),
|
|
2887
2887
|
model: "ir.attachment"
|
|
2888
2888
|
});
|
|
2889
|
-
Me == null || Me(
|
|
2889
|
+
Me == null || Me(me);
|
|
2890
2890
|
} else
|
|
2891
2891
|
Me == null || Me([]), Q = await Oe(B), te = !0;
|
|
2892
2892
|
return { values: Q, defaultGetCalled: te };
|
|
2893
|
-
},
|
|
2893
|
+
}, or = async (B) => {
|
|
2894
2894
|
const { callOnSubmitSucceed: W = !0 } = B || {};
|
|
2895
2895
|
if (se()) {
|
|
2896
2896
|
const Q = Tn({
|
|
@@ -2924,7 +2924,7 @@ function _a(e, t) {
|
|
|
2924
2924
|
}, Mo = async (B) => {
|
|
2925
2925
|
const { callOnSubmitSucceed: W = !0 } = B || {};
|
|
2926
2926
|
!y && W && (oe == null || oe(se(), We(), ie()));
|
|
2927
|
-
},
|
|
2927
|
+
}, Qt = async (B) => {
|
|
2928
2928
|
let W = !1;
|
|
2929
2929
|
const { callOnSubmitSucceed: Q = !0 } = B || {};
|
|
2930
2930
|
if (X.current = !0, P(void 0), U.current && !rt() && se() && Q) {
|
|
@@ -2940,10 +2940,10 @@ function _a(e, t) {
|
|
|
2940
2940
|
if (!rt() && se() && Q)
|
|
2941
2941
|
return X.current = !1, re == null || re(!1), ue == null || ue(), { succeed: !0, id: se() };
|
|
2942
2942
|
if (await St())
|
|
2943
|
-
return X.current = !1,
|
|
2943
|
+
return X.current = !1, vr(S), { succeed: !1, id: se() };
|
|
2944
2944
|
C(!0), xe == null || xe(!0);
|
|
2945
2945
|
try {
|
|
2946
|
-
m === "api" ? await
|
|
2946
|
+
m === "api" ? await or(B) : await Mo(B), f && (N.current = void 0, Lt({ values: {}, fields: V, reset: !0 })), await gt({ forceRefresh: !0 }), W = !0, xn.success(x("savedRegisters"));
|
|
2947
2947
|
} catch (te) {
|
|
2948
2948
|
X.current = !1, C(!1), xe == null || xe(!1), Be == null || Be(te), xn.error(x("errorWhileSavingForm")), P(te != null && te.message ? te.message : te);
|
|
2949
2949
|
} finally {
|
|
@@ -2957,8 +2957,8 @@ function _a(e, t) {
|
|
|
2957
2957
|
operationInProgress: te = !1
|
|
2958
2958
|
}) => {
|
|
2959
2959
|
var ot;
|
|
2960
|
-
const
|
|
2961
|
-
|
|
2960
|
+
const me = new Pr(B);
|
|
2961
|
+
me.parse(W, {
|
|
2962
2962
|
readOnly: c || te,
|
|
2963
2963
|
values: Ls(
|
|
2964
2964
|
{
|
|
@@ -2967,7 +2967,7 @@ function _a(e, t) {
|
|
|
2967
2967
|
},
|
|
2968
2968
|
B
|
|
2969
2969
|
)
|
|
2970
|
-
}), j(
|
|
2970
|
+
}), j(me), me.string && me.string !== Ke && (q == null || q(me.string)), ne && me.string && ((ot = ne.setTitle) == null || ot.call(ne, me.string));
|
|
2971
2971
|
}, vn = async ({
|
|
2972
2972
|
elementHasLostFocus: B = !1
|
|
2973
2973
|
}) => {
|
|
@@ -3033,32 +3033,32 @@ function _a(e, t) {
|
|
|
3033
3033
|
fields: V
|
|
3034
3034
|
});
|
|
3035
3035
|
if (te.value) {
|
|
3036
|
-
const
|
|
3036
|
+
const me = {
|
|
3037
3037
|
...qe(V),
|
|
3038
3038
|
...te.value
|
|
3039
3039
|
};
|
|
3040
|
-
$t({ fields: V, arch: $, values:
|
|
3041
|
-
values:
|
|
3040
|
+
$t({ fields: V, arch: $, values: me }), Lt({
|
|
3041
|
+
values: me,
|
|
3042
3042
|
fields: V,
|
|
3043
3043
|
reset: !1
|
|
3044
3044
|
});
|
|
3045
3045
|
}
|
|
3046
3046
|
if (te.warning && te.warning.title && te.warning.message && !Ie.current) {
|
|
3047
|
-
const { title:
|
|
3048
|
-
Ie.current = !0, da(
|
|
3047
|
+
const { title: me, message: ot } = te.warning;
|
|
3048
|
+
Ie.current = !0, da(me, ot, () => {
|
|
3049
3049
|
Ie.current = !1;
|
|
3050
3050
|
});
|
|
3051
3051
|
}
|
|
3052
3052
|
if (te.domain && Object.keys(te.domain).length > 0) {
|
|
3053
|
-
const
|
|
3053
|
+
const me = Gs({
|
|
3054
3054
|
fieldsDomain: te.domain,
|
|
3055
3055
|
fields: V
|
|
3056
3056
|
});
|
|
3057
3057
|
$t({
|
|
3058
|
-
fields:
|
|
3058
|
+
fields: me,
|
|
3059
3059
|
arch: $,
|
|
3060
|
-
values: qe(
|
|
3061
|
-
}), G(
|
|
3060
|
+
values: qe(me)
|
|
3061
|
+
}), G(me);
|
|
3062
3062
|
}
|
|
3063
3063
|
};
|
|
3064
3064
|
async function $o({
|
|
@@ -3085,7 +3085,7 @@ function _a(e, t) {
|
|
|
3085
3085
|
context: Q.context,
|
|
3086
3086
|
fields: V,
|
|
3087
3087
|
values: We()
|
|
3088
|
-
})), await
|
|
3088
|
+
})), await ir({
|
|
3089
3089
|
actionData: Q,
|
|
3090
3090
|
context: { ...W, ...te }
|
|
3091
3091
|
});
|
|
@@ -3109,9 +3109,9 @@ function _a(e, t) {
|
|
|
3109
3109
|
ids: [parseInt(B)],
|
|
3110
3110
|
context: v
|
|
3111
3111
|
}))[0];
|
|
3112
|
-
await
|
|
3112
|
+
await ir({ actionData: Q, context: W });
|
|
3113
3113
|
}
|
|
3114
|
-
async function
|
|
3114
|
+
async function ir({
|
|
3115
3115
|
actionData: B,
|
|
3116
3116
|
context: W
|
|
3117
3117
|
}) {
|
|
@@ -3151,16 +3151,16 @@ function _a(e, t) {
|
|
|
3151
3151
|
return;
|
|
3152
3152
|
}
|
|
3153
3153
|
if (await St()) {
|
|
3154
|
-
|
|
3154
|
+
vr(S);
|
|
3155
3155
|
return;
|
|
3156
3156
|
}
|
|
3157
3157
|
let te = !1;
|
|
3158
3158
|
try {
|
|
3159
|
-
!c && (rt() || se() === void 0) && (te = !0, wn(!0), m === "2many" ? (await
|
|
3160
|
-
const
|
|
3159
|
+
!c && (rt() || se() === void 0) && (te = !0, wn(!0), m === "2many" ? (await or({ callOnSubmitSucceed: !1 }), U.current = !0) : await Qt({ callOnSubmitSucceed: !1 }));
|
|
3160
|
+
const me = U.current ? pe() : {}, ot = { ...Q, ...me };
|
|
3161
3161
|
B === "object" ? await $o({ action: W, context: ot }) : B === "workflow" ? await Bo({ action: W }) : B === "action" && await Ho({ action: W, context: ot }), te && wn(!1);
|
|
3162
|
-
} catch (
|
|
3163
|
-
te && wn(!1), ze(
|
|
3162
|
+
} catch (me) {
|
|
3163
|
+
te && wn(!1), ze(me);
|
|
3164
3164
|
}
|
|
3165
3165
|
}
|
|
3166
3166
|
const jo = () => !L && !D ? /* @__PURE__ */ n(Ae, {}) : !r && !h || !F ? null : /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n(
|
|
@@ -3176,7 +3176,7 @@ function _a(e, t) {
|
|
|
3176
3176
|
getFieldValue: Ge,
|
|
3177
3177
|
executeButtonAction: Wo,
|
|
3178
3178
|
getContext: Se,
|
|
3179
|
-
submitForm:
|
|
3179
|
+
submitForm: Qt,
|
|
3180
3180
|
fetchValues: gt,
|
|
3181
3181
|
formHasChanges: rt,
|
|
3182
3182
|
elementHasLostFocus: Ko,
|
|
@@ -3204,10 +3204,10 @@ function _a(e, t) {
|
|
|
3204
3204
|
/* @__PURE__ */ n(
|
|
3205
3205
|
_e,
|
|
3206
3206
|
{
|
|
3207
|
-
icon: /* @__PURE__ */ n(
|
|
3207
|
+
icon: /* @__PURE__ */ n(qt, {}),
|
|
3208
3208
|
disabled: I,
|
|
3209
3209
|
onClick: async () => {
|
|
3210
|
-
await
|
|
3210
|
+
await rr();
|
|
3211
3211
|
},
|
|
3212
3212
|
children: "Cancel"
|
|
3213
3213
|
}
|
|
@@ -3219,7 +3219,7 @@ function _a(e, t) {
|
|
|
3219
3219
|
loading: I,
|
|
3220
3220
|
icon: /* @__PURE__ */ n(Et, {}),
|
|
3221
3221
|
onClick: async () => {
|
|
3222
|
-
await
|
|
3222
|
+
await Qt();
|
|
3223
3223
|
},
|
|
3224
3224
|
type: "primary",
|
|
3225
3225
|
children: "OK"
|
|
@@ -3243,7 +3243,7 @@ function _a(e, t) {
|
|
|
3243
3243
|
}
|
|
3244
3244
|
) : null;
|
|
3245
3245
|
}
|
|
3246
|
-
const
|
|
3246
|
+
const Xt = wt(_a), Zt = (e) => {
|
|
3247
3247
|
const {
|
|
3248
3248
|
visible: t,
|
|
3249
3249
|
id: r,
|
|
@@ -3254,7 +3254,7 @@ const Jt = wt(_a), Xt = (e) => {
|
|
|
3254
3254
|
actionData: l,
|
|
3255
3255
|
...d
|
|
3256
3256
|
} = e, { model: u } = d, { modalWidth: c } = mn(), [f, m] = w(o), [p, h] = w(!1), [g, y] = w(), { action_id: v, res_id: T, action_type: F, view_id: b } = l || {};
|
|
3257
|
-
|
|
3257
|
+
fe(() => {
|
|
3258
3258
|
a && _();
|
|
3259
3259
|
}, [l, a]);
|
|
3260
3260
|
async function _() {
|
|
@@ -3288,7 +3288,7 @@ const Jt = wt(_a), Xt = (e) => {
|
|
|
3288
3288
|
_e,
|
|
3289
3289
|
{
|
|
3290
3290
|
type: p ? "primary" : "default",
|
|
3291
|
-
icon: p ? /* @__PURE__ */ n(
|
|
3291
|
+
icon: p ? /* @__PURE__ */ n(jr, { style: { color: "white" } }) : /* @__PURE__ */ n(Yr, {}),
|
|
3292
3292
|
style: { width: 30 },
|
|
3293
3293
|
onClick: O
|
|
3294
3294
|
}
|
|
@@ -3309,7 +3309,7 @@ const Jt = wt(_a), Xt = (e) => {
|
|
|
3309
3309
|
onCancel: s,
|
|
3310
3310
|
maskClosable: !1,
|
|
3311
3311
|
children: /* @__PURE__ */ n(
|
|
3312
|
-
|
|
3312
|
+
Xt,
|
|
3313
3313
|
{
|
|
3314
3314
|
id: r,
|
|
3315
3315
|
showFooter: !0,
|
|
@@ -3362,7 +3362,7 @@ const Jt = wt(_a), Xt = (e) => {
|
|
|
3362
3362
|
}
|
|
3363
3363
|
) }) }),
|
|
3364
3364
|
/* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(ge, { ...e, ooui: s[1], showLabel: !1, children: /* @__PURE__ */ n(
|
|
3365
|
-
|
|
3365
|
+
Ar.RangePicker,
|
|
3366
3366
|
{
|
|
3367
3367
|
className: "w-60",
|
|
3368
3368
|
allowEmpty: [!0, !0],
|
|
@@ -3374,7 +3374,7 @@ const Jt = wt(_a), Xt = (e) => {
|
|
|
3374
3374
|
}, { useToken: Va } = Pe, ho = (e) => {
|
|
3375
3375
|
const { ooui: t } = e, { id: r, decimalDigits: o, readOnly: i, required: s } = t, { token: a } = Va(), l = s && !i ? { backgroundColor: a.colorPrimaryBg } : void 0, d = H(Ne), { elementHasLostFocus: u } = d || {};
|
|
3376
3376
|
return /* @__PURE__ */ n(ge, { required: s, type: "number", ...e, children: /* @__PURE__ */ n(
|
|
3377
|
-
|
|
3377
|
+
Dr,
|
|
3378
3378
|
{
|
|
3379
3379
|
disabled: i,
|
|
3380
3380
|
className: "w-full",
|
|
@@ -3389,7 +3389,7 @@ const Jt = wt(_a), Xt = (e) => {
|
|
|
3389
3389
|
}, { useToken: Aa } = Pe, rn = (e) => {
|
|
3390
3390
|
const { ooui: t, onChange: r } = e, { id: o, readOnly: i, required: s } = t, { token: a } = Aa(), l = s && !i ? { backgroundColor: a.colorPrimaryBg } : void 0, d = H(Ne), { elementHasLostFocus: u } = d || {};
|
|
3391
3391
|
return /* @__PURE__ */ n(ge, { required: s, type: "number", ...e, children: /* @__PURE__ */ n(
|
|
3392
|
-
|
|
3392
|
+
Dr,
|
|
3393
3393
|
{
|
|
3394
3394
|
id: o,
|
|
3395
3395
|
className: "w-full ",
|
|
@@ -3490,7 +3490,7 @@ function Ba(e) {
|
|
|
3490
3490
|
["false", r("false")]
|
|
3491
3491
|
]
|
|
3492
3492
|
});
|
|
3493
|
-
return /* @__PURE__ */ n(
|
|
3493
|
+
return /* @__PURE__ */ n(oo, { layout: "vertical", ooui: i, showLabel: !0 });
|
|
3494
3494
|
}
|
|
3495
3495
|
case mt.float:
|
|
3496
3496
|
case mt.progressbar:
|
|
@@ -3504,7 +3504,7 @@ function Ba(e) {
|
|
|
3504
3504
|
case mt.selection:
|
|
3505
3505
|
return /* @__PURE__ */ n(Pa, { layout: "vertical", ooui: t, showLabel: !0 });
|
|
3506
3506
|
default:
|
|
3507
|
-
return /* @__PURE__ */ n(
|
|
3507
|
+
return /* @__PURE__ */ n(ro, { ooui: t, layout: "vertical", showLabel: !0, isSearchField: !0 });
|
|
3508
3508
|
}
|
|
3509
3509
|
}
|
|
3510
3510
|
function Ha(e) {
|
|
@@ -3567,7 +3567,7 @@ function po(e) {
|
|
|
3567
3567
|
searchValues: m,
|
|
3568
3568
|
showLimitOptions: p = !0
|
|
3569
3569
|
} = e, [h, g] = w(), [y, v] = w(), [T, F] = w(!1), b = de(), { token: _ } = Wa(), [O] = lt.useForm();
|
|
3570
|
-
|
|
3570
|
+
fe(() => {
|
|
3571
3571
|
O.setFieldsValue(m);
|
|
3572
3572
|
}, [m]);
|
|
3573
3573
|
const k = () => {
|
|
@@ -3639,7 +3639,7 @@ function po(e) {
|
|
|
3639
3639
|
}
|
|
3640
3640
|
);
|
|
3641
3641
|
}
|
|
3642
|
-
const
|
|
3642
|
+
const Cr = (e, t = "14px -apple-system") => {
|
|
3643
3643
|
const o = document.createElement("canvas").getContext("2d");
|
|
3644
3644
|
o.font = t;
|
|
3645
3645
|
const i = o.measureText(e);
|
|
@@ -3649,13 +3649,13 @@ const br = (e, t = "14px -apple-system") => {
|
|
|
3649
3649
|
return { columns: e };
|
|
3650
3650
|
const o = e.map(
|
|
3651
3651
|
(s) => Object.assign(s, {
|
|
3652
|
-
width:
|
|
3652
|
+
width: Cr(s.title)
|
|
3653
3653
|
})
|
|
3654
3654
|
);
|
|
3655
3655
|
t.map((s) => {
|
|
3656
3656
|
o.map((a, l) => {
|
|
3657
3657
|
const d = a.width, u = s[a.key] || "";
|
|
3658
|
-
let c =
|
|
3658
|
+
let c = Cr(u);
|
|
3659
3659
|
c < d && (c = d), c > r && (c = r), o[l].width = c;
|
|
3660
3660
|
});
|
|
3661
3661
|
});
|
|
@@ -3714,7 +3714,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3714
3714
|
.ant-progress-text {
|
|
3715
3715
|
display: none;
|
|
3716
3716
|
}
|
|
3717
|
-
`,
|
|
3717
|
+
`, xr = (e) => {
|
|
3718
3718
|
const { visible: t, onCancel: r, items: o = [], onItemClicked: i } = e, { t: s } = H(he);
|
|
3719
3719
|
return /* @__PURE__ */ n(
|
|
3720
3720
|
Je,
|
|
@@ -3738,7 +3738,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3738
3738
|
)) })
|
|
3739
3739
|
}
|
|
3740
3740
|
);
|
|
3741
|
-
},
|
|
3741
|
+
}, Qn = (e) => {
|
|
3742
3742
|
var x, S;
|
|
3743
3743
|
const { id: t, model: r, context: o = {} } = e, [i, s] = w(!1), [a, l] = w(!1), [d, u] = w(!1), [c, f] = w(), [m, p] = w(), { t: h } = H(he), g = H(
|
|
3744
3744
|
dt
|
|
@@ -3759,7 +3759,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3759
3759
|
f(j);
|
|
3760
3760
|
let M = [];
|
|
3761
3761
|
const { toolbar: $ } = j;
|
|
3762
|
-
(I = $.action) == null || I.filter((V) => V.hasOwnProperty("context")).map((V) => M.push(...Sn(V.context))), (C = $.action) == null || C.filter((V) => V.hasOwnProperty("domain")).map((V) => M.push(...
|
|
3762
|
+
(I = $.action) == null || I.filter((V) => V.hasOwnProperty("context")).map((V) => M.push(...Sn(V.context))), (C = $.action) == null || C.filter((V) => V.hasOwnProperty("domain")).map((V) => M.push(...cr(V.domain))), (D = $.relate) == null || D.filter((V) => V.hasOwnProperty("context")).map((V) => M.push(...Sn(V.context))), (P = $.relate) == null || P.filter((V) => V.hasOwnProperty("domain")).map((V) => M.push(...cr(V.domain))), (L = $.print) == null || L.filter((V) => V.hasOwnProperty("context")).map((V) => M.push(...Sn(V.context))), M = M.filter(
|
|
3763
3763
|
(V) => Object.keys(j.fields).indexOf(V) > -1
|
|
3764
3764
|
);
|
|
3765
3765
|
let K = {};
|
|
@@ -3804,7 +3804,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3804
3804
|
He.ItemGroup,
|
|
3805
3805
|
{
|
|
3806
3806
|
title: /* @__PURE__ */ A(Z, { children: [
|
|
3807
|
-
/* @__PURE__ */ n(
|
|
3807
|
+
/* @__PURE__ */ n(Gr, {}),
|
|
3808
3808
|
" ",
|
|
3809
3809
|
/* @__PURE__ */ A("span", { children: [
|
|
3810
3810
|
" ",
|
|
@@ -3853,7 +3853,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3853
3853
|
});
|
|
3854
3854
|
}
|
|
3855
3855
|
return /* @__PURE__ */ A(Z, { children: [
|
|
3856
|
-
/* @__PURE__ */ n(
|
|
3856
|
+
/* @__PURE__ */ n(Ut, { overlay: b(), trigger: ["click"], children: /* @__PURE__ */ n(
|
|
3857
3857
|
di,
|
|
3858
3858
|
{
|
|
3859
3859
|
style: { color: "rgba(0,0,0,.45)" },
|
|
@@ -3863,7 +3863,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3863
3863
|
}
|
|
3864
3864
|
) }),
|
|
3865
3865
|
/* @__PURE__ */ n(
|
|
3866
|
-
|
|
3866
|
+
xr,
|
|
3867
3867
|
{
|
|
3868
3868
|
visible: i,
|
|
3869
3869
|
items: (x = c == null ? void 0 : c.toolbar) == null ? void 0 : x.action,
|
|
@@ -3872,7 +3872,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3872
3872
|
}
|
|
3873
3873
|
),
|
|
3874
3874
|
/* @__PURE__ */ n(
|
|
3875
|
-
|
|
3875
|
+
xr,
|
|
3876
3876
|
{
|
|
3877
3877
|
visible: a,
|
|
3878
3878
|
items: (S = c == null ? void 0 : c.toolbar) == null ? void 0 : S.print,
|
|
@@ -3885,7 +3885,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3885
3885
|
const { m2oField: t } = e;
|
|
3886
3886
|
return t ? /* @__PURE__ */ A(je, { children: [
|
|
3887
3887
|
/* @__PURE__ */ n(Z, { children: t.value }),
|
|
3888
|
-
/* @__PURE__ */ n(
|
|
3888
|
+
/* @__PURE__ */ n(Qn, { id: t.id, model: t.model })
|
|
3889
3889
|
] }) : /* @__PURE__ */ n(Z, {});
|
|
3890
3890
|
}, za = (e) => {
|
|
3891
3891
|
const { value: t, context: r, selectionValues: o } = e, [i, s] = w(), [a, l] = w(!1), [d, u] = t ? t.split(",") : [], c = parseInt(u), f = De(async () => {
|
|
@@ -3900,7 +3900,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3900
3900
|
});
|
|
3901
3901
|
s(p[0][1]), l(!1);
|
|
3902
3902
|
}, [t, i]);
|
|
3903
|
-
if (
|
|
3903
|
+
if (fe(() => {
|
|
3904
3904
|
f();
|
|
3905
3905
|
}, [t]), !t && !a)
|
|
3906
3906
|
return /* @__PURE__ */ n(Z, {});
|
|
@@ -3910,7 +3910,7 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3910
3910
|
return /* @__PURE__ */ A(je, { children: [
|
|
3911
3911
|
/* @__PURE__ */ n(Z, { children: `${m}:` }),
|
|
3912
3912
|
/* @__PURE__ */ n(Z, { children: i }),
|
|
3913
|
-
/* @__PURE__ */ n(
|
|
3913
|
+
/* @__PURE__ */ n(Qn, { id: c, model: d })
|
|
3914
3914
|
] });
|
|
3915
3915
|
}, Ja = (e) => {
|
|
3916
3916
|
const { ooui: t, value: r } = e;
|
|
@@ -3918,8 +3918,8 @@ const Ga = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(yo,
|
|
|
3918
3918
|
return null;
|
|
3919
3919
|
let o = r;
|
|
3920
3920
|
t.selectionValues.size ? o = t.selectionValues.get(r) : Array.isArray(r) && (o = r[1]);
|
|
3921
|
-
const i = o.toString().split(" ").filter((a) => a.length > 1).slice(0, 3).map((a) => a[0].toUpperCase()).join(""), s =
|
|
3922
|
-
return /* @__PURE__ */ n(ht, { title: o, children: /* @__PURE__ */ n(
|
|
3921
|
+
const i = o.toString().split(" ").filter((a) => a.length > 1).slice(0, 3).map((a) => a[0].toUpperCase()).join(""), s = Wt(o);
|
|
3922
|
+
return /* @__PURE__ */ n(ht, { title: o, children: /* @__PURE__ */ n(kr, { alt: o, style: { backgroundColor: s }, children: i }) });
|
|
3923
3923
|
};
|
|
3924
3924
|
nt.extend(Di);
|
|
3925
3925
|
nt.extend(ki);
|
|
@@ -4032,23 +4032,45 @@ const { useToken: Xa } = Pe, ut = {
|
|
|
4032
4032
|
ut.time.dateInternalFormat
|
|
4033
4033
|
).format(ut.time.dateDisplayFormat);
|
|
4034
4034
|
return /* @__PURE__ */ n(Z, { children: t });
|
|
4035
|
-
},
|
|
4035
|
+
}, Sr = (e) => {
|
|
4036
4036
|
const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
|
|
4037
4037
|
return /* @__PURE__ */ n(Z, { children: `( ${t} )` });
|
|
4038
|
-
}, sl = (e) => /* @__PURE__ */ n(yo, { value: e }), al = (e) => /* @__PURE__ */ n(Z, { children: go(e) }),
|
|
4038
|
+
}, sl = (e) => /* @__PURE__ */ n(yo, { value: e }), al = (e) => /* @__PURE__ */ n(Z, { children: go(e) }), Tr = (e) => /* @__PURE__ */ n("div", { style: { textAlign: "right" }, children: e }), ll = (e) => /* @__PURE__ */ n(
|
|
4039
4039
|
"img",
|
|
4040
4040
|
{
|
|
4041
4041
|
src: `data:image/*;base64,${e}`,
|
|
4042
4042
|
style: { maxWidth: "50px", padding: "5px" }
|
|
4043
4043
|
}
|
|
4044
|
-
), cl = (e, t, r, o) => /* @__PURE__ */ n(
|
|
4044
|
+
), cl = (e, t, r, o) => /* @__PURE__ */ n(uo, { ooui: r, value: e }), dl = (e, t, r, o) => {
|
|
4045
|
+
const [i, s] = w([]), { relation: a, field: l } = r;
|
|
4046
|
+
fe(() => {
|
|
4047
|
+
e && (async () => {
|
|
4048
|
+
try {
|
|
4049
|
+
const c = await E.getHandler().search({
|
|
4050
|
+
model: a,
|
|
4051
|
+
params: [["id", "in", e.items.map((f) => f.id)]],
|
|
4052
|
+
fields: [l],
|
|
4053
|
+
context: o
|
|
4054
|
+
});
|
|
4055
|
+
s(c.map((f) => f.name));
|
|
4056
|
+
} catch (c) {
|
|
4057
|
+
console.log("Error loading data", c);
|
|
4058
|
+
}
|
|
4059
|
+
})();
|
|
4060
|
+
}, []);
|
|
4061
|
+
const d = i.map((u) => {
|
|
4062
|
+
const c = Wt(u);
|
|
4063
|
+
return /* @__PURE__ */ n(Zn, { color: c, children: u });
|
|
4064
|
+
});
|
|
4065
|
+
return /* @__PURE__ */ n("div", { style: { maxWidth: "300px", whiteSpace: "break-spaces" }, children: d });
|
|
4066
|
+
}, ul = (e, t, r, o) => /* @__PURE__ */ n(Z, { children: r.selectionValues.get(e) }), fl = (e, t, r, o) => /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n(
|
|
4045
4067
|
za,
|
|
4046
4068
|
{
|
|
4047
4069
|
value: e,
|
|
4048
4070
|
selectionValues: r.selectionValues,
|
|
4049
4071
|
context: o
|
|
4050
4072
|
}
|
|
4051
|
-
) }),
|
|
4073
|
+
) }), ml = (e, t, r, o) => /* @__PURE__ */ n(Ja, { ooui: r, value: e });
|
|
4052
4074
|
function pn(e) {
|
|
4053
4075
|
var Y;
|
|
4054
4076
|
const {
|
|
@@ -4076,7 +4098,7 @@ function pn(e) {
|
|
|
4076
4098
|
} = e, [O, k] = w([]), [x, S] = w([]), I = de(!1), C = de(null), { t: D } = H(he), P = de(r), L = H(
|
|
4077
4099
|
st
|
|
4078
4100
|
), { title: j = void 0, setTitle: M = void 0 } = (T ? L : {}) || {};
|
|
4079
|
-
|
|
4101
|
+
fe(() => {
|
|
4080
4102
|
C.current = Ot(i);
|
|
4081
4103
|
const R = Ms(
|
|
4082
4104
|
C.current,
|
|
@@ -4084,26 +4106,27 @@ function pn(e) {
|
|
|
4084
4106
|
boolean: tl,
|
|
4085
4107
|
many2one: nl,
|
|
4086
4108
|
text: rl,
|
|
4087
|
-
one2many:
|
|
4088
|
-
many2many:
|
|
4109
|
+
one2many: Sr,
|
|
4110
|
+
many2many: Sr,
|
|
4089
4111
|
progressbar: sl,
|
|
4090
4112
|
float_time: al,
|
|
4091
4113
|
image: ll,
|
|
4092
|
-
integer:
|
|
4093
|
-
float:
|
|
4094
|
-
reference:
|
|
4114
|
+
integer: Tr,
|
|
4115
|
+
float: Tr,
|
|
4116
|
+
reference: fl,
|
|
4095
4117
|
tag: cl,
|
|
4096
|
-
selection:
|
|
4118
|
+
selection: ul,
|
|
4097
4119
|
date: ol,
|
|
4098
4120
|
datetime: il,
|
|
4099
|
-
avatar:
|
|
4121
|
+
avatar: ml,
|
|
4122
|
+
tags: dl
|
|
4100
4123
|
},
|
|
4101
4124
|
F
|
|
4102
4125
|
);
|
|
4103
4126
|
S(R), C.current.string && j !== C.current.string && (M == null || M(C.current.string));
|
|
4104
|
-
}, [i]),
|
|
4127
|
+
}, [i]), fe(() => {
|
|
4105
4128
|
I.current = !1;
|
|
4106
|
-
const R =
|
|
4129
|
+
const R = ao(C.current, s);
|
|
4107
4130
|
k(R), P.current = r;
|
|
4108
4131
|
}, [s]);
|
|
4109
4132
|
const $ = (t - 1) * P.current + 1, K = $ - 1 + O.length, V = o === void 0 ? null : o === 0 ? D("no_results") : D("summary").replace("{from}", $ == null ? void 0 : $.toString()).replace("{to}", K == null ? void 0 : K.toString()).replace("{total}", o == null ? void 0 : o.toString()), G = () => {
|
|
@@ -4190,7 +4213,7 @@ function pn(e) {
|
|
|
4190
4213
|
ne()
|
|
4191
4214
|
] });
|
|
4192
4215
|
}
|
|
4193
|
-
function
|
|
4216
|
+
function hl(e, t) {
|
|
4194
4217
|
const {
|
|
4195
4218
|
model: r,
|
|
4196
4219
|
formView: o,
|
|
@@ -4225,7 +4248,7 @@ function ml(e, t) {
|
|
|
4225
4248
|
setTreeIsLoading: U = void 0,
|
|
4226
4249
|
searchValues: Ce = {},
|
|
4227
4250
|
setSearchValues: we = void 0,
|
|
4228
|
-
limit: Ye =
|
|
4251
|
+
limit: Ye = Yt,
|
|
4229
4252
|
setLimit: ke = void 0
|
|
4230
4253
|
} = (c ? M : {}) || {}, {
|
|
4231
4254
|
submit: Le,
|
|
@@ -4275,7 +4298,7 @@ function ml(e, t) {
|
|
|
4275
4298
|
},
|
|
4276
4299
|
getFields: () => b == null ? void 0 : b.fields,
|
|
4277
4300
|
getDomain: () => d
|
|
4278
|
-
})),
|
|
4301
|
+
})), fe(() => {
|
|
4279
4302
|
g && u && b && (v.current = !1, xe());
|
|
4280
4303
|
}, [Me, Ke, g, u, a, b]);
|
|
4281
4304
|
const Qe = async () => {
|
|
@@ -4302,7 +4325,7 @@ function ml(e, t) {
|
|
|
4302
4325
|
context: f
|
|
4303
4326
|
})), k(Re), _(Ge);
|
|
4304
4327
|
};
|
|
4305
|
-
|
|
4328
|
+
fe(() => {
|
|
4306
4329
|
Qe();
|
|
4307
4330
|
}, [r]);
|
|
4308
4331
|
const z = (Re) => {
|
|
@@ -4356,7 +4379,7 @@ function ml(e, t) {
|
|
|
4356
4379
|
po,
|
|
4357
4380
|
{
|
|
4358
4381
|
fields: { ...O.fields, ...b.fields },
|
|
4359
|
-
searchFields:
|
|
4382
|
+
searchFields: co([
|
|
4360
4383
|
O.search_fields,
|
|
4361
4384
|
b.search_fields
|
|
4362
4385
|
]),
|
|
@@ -4402,7 +4425,7 @@ function ml(e, t) {
|
|
|
4402
4425
|
] }), qe = x || ye;
|
|
4403
4426
|
return qe ? /* @__PURE__ */ n(tt, { className: "mt-10", message: qe, type: "error", banner: !0 }) : /* @__PURE__ */ n("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ n(Ae, {}) : rt() });
|
|
4404
4427
|
}
|
|
4405
|
-
const wo = wt(
|
|
4428
|
+
const wo = wt(hl), bo = (e) => {
|
|
4406
4429
|
const {
|
|
4407
4430
|
visible: t,
|
|
4408
4431
|
onCloseModal: r,
|
|
@@ -4462,7 +4485,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4462
4485
|
children: m("ok")
|
|
4463
4486
|
}
|
|
4464
4487
|
),
|
|
4465
|
-
/* @__PURE__ */ n(_e, { icon: /* @__PURE__ */ n(
|
|
4488
|
+
/* @__PURE__ */ n(_e, { icon: /* @__PURE__ */ n(qt, {}), onClick: g, children: m("cancel") })
|
|
4466
4489
|
] }) })
|
|
4467
4490
|
] });
|
|
4468
4491
|
return /* @__PURE__ */ A(Z, { children: [
|
|
@@ -4482,7 +4505,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4482
4505
|
}
|
|
4483
4506
|
),
|
|
4484
4507
|
/* @__PURE__ */ n(
|
|
4485
|
-
|
|
4508
|
+
Zt,
|
|
4486
4509
|
{
|
|
4487
4510
|
model: i,
|
|
4488
4511
|
visible: d,
|
|
@@ -4496,14 +4519,14 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4496
4519
|
}
|
|
4497
4520
|
)
|
|
4498
4521
|
] });
|
|
4499
|
-
}, { error:
|
|
4500
|
-
|
|
4522
|
+
}, { error: pl } = Je, on = (e) => {
|
|
4523
|
+
pl({
|
|
4501
4524
|
title: "Error",
|
|
4502
4525
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
4503
4526
|
centered: !0,
|
|
4504
4527
|
content: e
|
|
4505
4528
|
});
|
|
4506
|
-
}, { defaultAlgorithm:
|
|
4529
|
+
}, { defaultAlgorithm: gl, defaultSeed: yl } = Pe, Co = gl(yl), vl = (e) => {
|
|
4507
4530
|
const { ooui: t } = e, { required: r } = t;
|
|
4508
4531
|
return /* @__PURE__ */ n(ge, { required: r, type: "array", validator: async (i, s) => {
|
|
4509
4532
|
if (!s)
|
|
@@ -4522,9 +4545,9 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4522
4545
|
id: d,
|
|
4523
4546
|
domain: u
|
|
4524
4547
|
} = o, c = i && !a ? { backgroundColor: Co.colorPrimaryBg } : void 0, [f, m] = w(!1), [p, h] = w(!1), [g, y] = w(!1), [v, T] = w(), F = de(!1), [b, _] = w(""), O = de(), k = H(Ne), { domain: x, getValues: S, getFields: I, getContext: C, elementHasLostFocus: D } = k || {}, P = de([]), [L, j] = w([]), M = t && t[0] || void 0, $ = t && t[1] || "";
|
|
4525
|
-
|
|
4548
|
+
fe(() => {
|
|
4526
4549
|
!Array.isArray(t) && t && J(t);
|
|
4527
|
-
}, [t]),
|
|
4550
|
+
}, [t]), fe(() => {
|
|
4528
4551
|
M && $.length === 0 ? J(M) : M && $.length > 0 ? _($) : !M && !$ && _(O.current || "");
|
|
4529
4552
|
}, [t]);
|
|
4530
4553
|
const K = (N) => {
|
|
@@ -4593,7 +4616,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4593
4616
|
fields: I(),
|
|
4594
4617
|
context: C()
|
|
4595
4618
|
})), x && x.length > 0 && (P.current = P.current.concat(
|
|
4596
|
-
|
|
4619
|
+
Lr({
|
|
4597
4620
|
domain: x,
|
|
4598
4621
|
widgetFieldName: d
|
|
4599
4622
|
})
|
|
@@ -4604,7 +4627,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4604
4627
|
}
|
|
4605
4628
|
return /* @__PURE__ */ A(be, { gutter: 8, wrap: !1, children: [
|
|
4606
4629
|
/* @__PURE__ */ n(ae, { flex: "auto", children: /* @__PURE__ */ n(
|
|
4607
|
-
i && !a ?
|
|
4630
|
+
i && !a ? wl : it,
|
|
4608
4631
|
{
|
|
4609
4632
|
type: "text",
|
|
4610
4633
|
value: b,
|
|
@@ -4614,7 +4637,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4614
4637
|
onBlur: G,
|
|
4615
4638
|
onKeyDown: Y,
|
|
4616
4639
|
suffix: /* @__PURE__ */ n(
|
|
4617
|
-
|
|
4640
|
+
Qn,
|
|
4618
4641
|
{
|
|
4619
4642
|
id: M,
|
|
4620
4643
|
model: s,
|
|
@@ -4664,7 +4687,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4664
4687
|
}
|
|
4665
4688
|
),
|
|
4666
4689
|
/* @__PURE__ */ n(
|
|
4667
|
-
|
|
4690
|
+
Zt,
|
|
4668
4691
|
{
|
|
4669
4692
|
model: s,
|
|
4670
4693
|
parentContext: { ...C == null ? void 0 : C(), ...l },
|
|
@@ -4681,13 +4704,13 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4681
4704
|
}
|
|
4682
4705
|
)
|
|
4683
4706
|
] });
|
|
4684
|
-
},
|
|
4707
|
+
}, wl = Mt(it)`
|
|
4685
4708
|
.ant-input {
|
|
4686
4709
|
background-color: ${Co.colorPrimaryBg};
|
|
4687
4710
|
}
|
|
4688
4711
|
`, So = et.createContext(
|
|
4689
4712
|
null
|
|
4690
|
-
),
|
|
4713
|
+
), bl = ({
|
|
4691
4714
|
children: e,
|
|
4692
4715
|
initialView: t
|
|
4693
4716
|
}) => {
|
|
@@ -4706,7 +4729,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4706
4729
|
children: e
|
|
4707
4730
|
}
|
|
4708
4731
|
);
|
|
4709
|
-
}, { getValueForOperator:
|
|
4732
|
+
}, { getValueForOperator: Ir } = $r, sn = 0.7, an = 30, Cl = (e) => {
|
|
4710
4733
|
const {
|
|
4711
4734
|
model: t,
|
|
4712
4735
|
domain: r,
|
|
@@ -4720,7 +4743,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4720
4743
|
operator: c,
|
|
4721
4744
|
manualIds: f
|
|
4722
4745
|
} = e, [m, p] = w(!1), [h, g] = w(), [y, v] = w(), [T, F] = w(), [b, _] = w(0), [O, k] = w(0), [x, S] = w(), [I, C] = w(), [D, P] = w();
|
|
4723
|
-
|
|
4746
|
+
fe(() => {
|
|
4724
4747
|
M();
|
|
4725
4748
|
}, [t, i]);
|
|
4726
4749
|
async function L({
|
|
@@ -4740,7 +4763,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4740
4763
|
fieldsToRetrieve: [u],
|
|
4741
4764
|
context: o
|
|
4742
4765
|
});
|
|
4743
|
-
return
|
|
4766
|
+
return Ir({
|
|
4744
4767
|
values: G.map((ne) => ne[u]),
|
|
4745
4768
|
operator: c
|
|
4746
4769
|
});
|
|
@@ -4763,7 +4786,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4763
4786
|
fieldsToRetrieve: [u],
|
|
4764
4787
|
context: o
|
|
4765
4788
|
});
|
|
4766
|
-
return
|
|
4789
|
+
return Ir({
|
|
4767
4790
|
values: V.map((G) => G[u]),
|
|
4768
4791
|
operator: c
|
|
4769
4792
|
});
|
|
@@ -4824,7 +4847,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4824
4847
|
_((K = $.bounds) == null ? void 0 : K.height), k((V = $.bounds) == null ? void 0 : V.width);
|
|
4825
4848
|
},
|
|
4826
4849
|
children: ({ measureRef: $ }) => a ? /* @__PURE__ */ n(
|
|
4827
|
-
|
|
4850
|
+
Sl,
|
|
4828
4851
|
{
|
|
4829
4852
|
value: h,
|
|
4830
4853
|
total: T,
|
|
@@ -4837,7 +4860,7 @@ const wo = wt(ml), bo = (e) => {
|
|
|
4837
4860
|
suffix: d
|
|
4838
4861
|
}
|
|
4839
4862
|
) : /* @__PURE__ */ n(
|
|
4840
|
-
|
|
4863
|
+
xl,
|
|
4841
4864
|
{
|
|
4842
4865
|
value: h,
|
|
4843
4866
|
total: T,
|
|
@@ -4856,7 +4879,7 @@ function To(e, t) {
|
|
|
4856
4879
|
const o = document.createElement("canvas").getContext("2d");
|
|
4857
4880
|
return o.font = t || getComputedStyle(document.body).font, o.measureText(e).width;
|
|
4858
4881
|
}
|
|
4859
|
-
function
|
|
4882
|
+
function xl({
|
|
4860
4883
|
measureRef: e,
|
|
4861
4884
|
width: t,
|
|
4862
4885
|
height: r,
|
|
@@ -4897,7 +4920,7 @@ function Cl({
|
|
|
4897
4920
|
}
|
|
4898
4921
|
);
|
|
4899
4922
|
}
|
|
4900
|
-
function
|
|
4923
|
+
function Sl({
|
|
4901
4924
|
measureRef: e,
|
|
4902
4925
|
height: t,
|
|
4903
4926
|
width: r,
|
|
@@ -4966,34 +4989,34 @@ const In = (e) => (t) => {
|
|
|
4966
4989
|
useGrouping: !0
|
|
4967
4990
|
});
|
|
4968
4991
|
return { name: e === "pie" ? t.x : t.type, value: r };
|
|
4969
|
-
},
|
|
4970
|
-
if (typeof e == "string" &&
|
|
4992
|
+
}, en = (e) => {
|
|
4993
|
+
if (typeof e == "string" && Tl(e))
|
|
4971
4994
|
return parseFloat(e).toLocaleString("es-ES", {
|
|
4972
4995
|
useGrouping: !0
|
|
4973
4996
|
});
|
|
4974
|
-
if (
|
|
4997
|
+
if (Il(e))
|
|
4975
4998
|
return e.toLocaleString("es-ES", {
|
|
4976
4999
|
useGrouping: !0
|
|
4977
5000
|
});
|
|
4978
|
-
if (
|
|
4979
|
-
const t =
|
|
5001
|
+
if (Fl(e)) {
|
|
5002
|
+
const t = _l(e);
|
|
4980
5003
|
return t === null ? e : nt(e, ln.input[t]).format(
|
|
4981
5004
|
ln.output[t]
|
|
4982
5005
|
);
|
|
4983
5006
|
} else
|
|
4984
5007
|
return e;
|
|
4985
|
-
},
|
|
5008
|
+
}, Tl = (e) => /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/.test(e), Il = (e) => typeof e == "number" && !isNaN(e), Fr = {
|
|
4986
5009
|
default: {
|
|
4987
5010
|
padding: "auto",
|
|
4988
5011
|
xAxis: {
|
|
4989
5012
|
tickCount: 5,
|
|
4990
5013
|
label: {
|
|
4991
|
-
formatter:
|
|
5014
|
+
formatter: en
|
|
4992
5015
|
}
|
|
4993
5016
|
},
|
|
4994
5017
|
yAxis: {
|
|
4995
5018
|
label: {
|
|
4996
|
-
formatter:
|
|
5019
|
+
formatter: en
|
|
4997
5020
|
}
|
|
4998
5021
|
},
|
|
4999
5022
|
legend: {
|
|
@@ -5040,12 +5063,12 @@ const In = (e) => (t) => {
|
|
|
5040
5063
|
},
|
|
5041
5064
|
xAxis: {
|
|
5042
5065
|
label: {
|
|
5043
|
-
formatter:
|
|
5066
|
+
formatter: en
|
|
5044
5067
|
}
|
|
5045
5068
|
},
|
|
5046
5069
|
yAxis: {
|
|
5047
5070
|
label: {
|
|
5048
|
-
formatter:
|
|
5071
|
+
formatter: en
|
|
5049
5072
|
}
|
|
5050
5073
|
},
|
|
5051
5074
|
label: {
|
|
@@ -5064,7 +5087,7 @@ const In = (e) => (t) => {
|
|
|
5064
5087
|
}
|
|
5065
5088
|
}
|
|
5066
5089
|
};
|
|
5067
|
-
function
|
|
5090
|
+
function Fl(e) {
|
|
5068
5091
|
return typeof e != "string" || e === void 0 ? !1 : new Date(e).toString() !== "Invalid Date";
|
|
5069
5092
|
}
|
|
5070
5093
|
const ln = {
|
|
@@ -5083,7 +5106,7 @@ const ln = {
|
|
|
5083
5106
|
years: "YYYY"
|
|
5084
5107
|
}
|
|
5085
5108
|
};
|
|
5086
|
-
function
|
|
5109
|
+
function _l(e) {
|
|
5087
5110
|
for (const t in ln.input)
|
|
5088
5111
|
if (nt(
|
|
5089
5112
|
e,
|
|
@@ -5093,7 +5116,7 @@ function Fl(e) {
|
|
|
5093
5116
|
return t;
|
|
5094
5117
|
return null;
|
|
5095
5118
|
}
|
|
5096
|
-
const { processGraphData:
|
|
5119
|
+
const { processGraphData: Ol } = $r, { getFieldsToRetrieve: Rl } = li, Vl = (e) => {
|
|
5097
5120
|
const {
|
|
5098
5121
|
model: t,
|
|
5099
5122
|
domain: r = [],
|
|
@@ -5108,10 +5131,10 @@ const { processGraphData: _l } = Lr, { getFieldsToRetrieve: Ol } = li, Rl = (e)
|
|
|
5108
5131
|
u(!0), f(void 0);
|
|
5109
5132
|
const T = $n(i);
|
|
5110
5133
|
v(T.type || "line");
|
|
5111
|
-
const F =
|
|
5134
|
+
const F = Rl({ ooui: T });
|
|
5112
5135
|
let b, _;
|
|
5113
5136
|
try {
|
|
5114
|
-
({ values: b, fields: _ } = await
|
|
5137
|
+
({ values: b, fields: _ } = await Dl({
|
|
5115
5138
|
model: t,
|
|
5116
5139
|
domain: r,
|
|
5117
5140
|
context: o,
|
|
@@ -5130,7 +5153,7 @@ const { processGraphData: _l } = Lr, { getFieldsToRetrieve: Ol } = li, Rl = (e)
|
|
|
5130
5153
|
return;
|
|
5131
5154
|
}
|
|
5132
5155
|
g(b);
|
|
5133
|
-
const O =
|
|
5156
|
+
const O = Ol({
|
|
5134
5157
|
ooui: T,
|
|
5135
5158
|
values: b,
|
|
5136
5159
|
fields: _,
|
|
@@ -5153,7 +5176,7 @@ const { processGraphData: _l } = Lr, { getFieldsToRetrieve: Ol } = li, Rl = (e)
|
|
|
5153
5176
|
evaluatedEntries: h
|
|
5154
5177
|
};
|
|
5155
5178
|
};
|
|
5156
|
-
async function
|
|
5179
|
+
async function Al({
|
|
5157
5180
|
model: e,
|
|
5158
5181
|
context: t,
|
|
5159
5182
|
fields: r
|
|
@@ -5164,7 +5187,7 @@ async function Vl({
|
|
|
5164
5187
|
fields: r
|
|
5165
5188
|
});
|
|
5166
5189
|
}
|
|
5167
|
-
async function
|
|
5190
|
+
async function Dl({
|
|
5168
5191
|
fields: e,
|
|
5169
5192
|
model: t,
|
|
5170
5193
|
domain: r,
|
|
@@ -5173,7 +5196,7 @@ async function Al({
|
|
|
5173
5196
|
limit: s,
|
|
5174
5197
|
manualIds: a
|
|
5175
5198
|
}) {
|
|
5176
|
-
const l = await
|
|
5199
|
+
const l = await Al({ model: t, context: o, fields: e });
|
|
5177
5200
|
if (a) {
|
|
5178
5201
|
let u = await E.getHandler().readObjects({
|
|
5179
5202
|
model: t,
|
|
@@ -5198,13 +5221,13 @@ async function Al({
|
|
|
5198
5221
|
fields: l
|
|
5199
5222
|
};
|
|
5200
5223
|
}
|
|
5201
|
-
const
|
|
5224
|
+
const kl = {
|
|
5202
5225
|
line: Ii,
|
|
5203
5226
|
bar: Fi,
|
|
5204
5227
|
pie: _i
|
|
5205
|
-
},
|
|
5228
|
+
}, El = (e) => {
|
|
5206
5229
|
var v;
|
|
5207
|
-
const { model: t, domain: r, context: o, xml: i, limit: s, manualIds: a } = e, { t: l } = H(he), { error: d, loading: u, values: c, type: f, evaluatedEntries: m } =
|
|
5230
|
+
const { model: t, domain: r, context: o, xml: i, limit: s, manualIds: a } = e, { t: l } = H(he), { error: d, loading: u, values: c, type: f, evaluatedEntries: m } = Vl({
|
|
5208
5231
|
model: t,
|
|
5209
5232
|
xml: i,
|
|
5210
5233
|
limit: s,
|
|
@@ -5219,7 +5242,7 @@ const Dl = {
|
|
|
5219
5242
|
return /* @__PURE__ */ n(Ae, {});
|
|
5220
5243
|
if (!c)
|
|
5221
5244
|
return /* @__PURE__ */ n(tt, { message: "No data to display", type: "info" });
|
|
5222
|
-
const { data: p, isGroup: h, isStack: g } = c, y =
|
|
5245
|
+
const { data: p, isGroup: h, isStack: g } = c, y = kl[f];
|
|
5223
5246
|
return y ? /* @__PURE__ */ A("div", { style: { padding: "1rem" }, children: [
|
|
5224
5247
|
/* @__PURE__ */ n("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(v = m == null ? void 0 : m.length) == null ? void 0 : v.toLocaleString(
|
|
5225
5248
|
"es-ES",
|
|
@@ -5230,7 +5253,7 @@ const Dl = {
|
|
|
5230
5253
|
/* @__PURE__ */ n(
|
|
5231
5254
|
y,
|
|
5232
5255
|
{
|
|
5233
|
-
...
|
|
5256
|
+
...Ml({
|
|
5234
5257
|
type: f,
|
|
5235
5258
|
data: p,
|
|
5236
5259
|
isGroup: h,
|
|
@@ -5240,12 +5263,12 @@ const Dl = {
|
|
|
5240
5263
|
)
|
|
5241
5264
|
] }) : /* @__PURE__ */ n(Z, { children: `Unknown graph type: ${f}` });
|
|
5242
5265
|
};
|
|
5243
|
-
function
|
|
5266
|
+
function Ml(e) {
|
|
5244
5267
|
const { type: t, data: r, isGroup: o, isStack: i } = e;
|
|
5245
|
-
let s =
|
|
5246
|
-
return s || (s =
|
|
5268
|
+
let s = Fr[t];
|
|
5269
|
+
return s || (s = Fr.default), s.data = r, t === "pie" ? (s.colorField = "x", s.angleField = "value") : (s.xField = "x", s.yField = "value", s.seriesField = "type", s.isGroup = o, i && (s.isStack = !0, s.groupField = "stacked")), s;
|
|
5247
5270
|
}
|
|
5248
|
-
const
|
|
5271
|
+
const Nl = (e, t) => {
|
|
5249
5272
|
const { view_id: r, model: o, context: i, domain: s, limit: a, manualIds: l } = e, [d, u] = w(!1), [c, f] = w(), [m, p] = w(), h = H(
|
|
5250
5273
|
st
|
|
5251
5274
|
), { setGraphIsLoading: g = void 0 } = h || {};
|
|
@@ -5253,7 +5276,7 @@ const Ml = (e, t) => {
|
|
|
5253
5276
|
refresh: () => {
|
|
5254
5277
|
y();
|
|
5255
5278
|
}
|
|
5256
|
-
})),
|
|
5279
|
+
})), fe(() => {
|
|
5257
5280
|
y();
|
|
5258
5281
|
}, [r]);
|
|
5259
5282
|
async function y() {
|
|
@@ -5298,7 +5321,7 @@ const Ml = (e, t) => {
|
|
|
5298
5321
|
operator: v.operator
|
|
5299
5322
|
} : {};
|
|
5300
5323
|
return /* @__PURE__ */ n(
|
|
5301
|
-
|
|
5324
|
+
Cl,
|
|
5302
5325
|
{
|
|
5303
5326
|
showPercent: v.showPercent,
|
|
5304
5327
|
totalDomain: v.totalDomain,
|
|
@@ -5317,7 +5340,7 @@ const Ml = (e, t) => {
|
|
|
5317
5340
|
case "bar":
|
|
5318
5341
|
case "pie":
|
|
5319
5342
|
return /* @__PURE__ */ n(
|
|
5320
|
-
|
|
5343
|
+
El,
|
|
5321
5344
|
{
|
|
5322
5345
|
model: o,
|
|
5323
5346
|
context: i,
|
|
@@ -5330,8 +5353,8 @@ const Ml = (e, t) => {
|
|
|
5330
5353
|
default:
|
|
5331
5354
|
return /* @__PURE__ */ n(Z, { children: `Graph ${c.type} not implemented` });
|
|
5332
5355
|
}
|
|
5333
|
-
}, gn = wt(
|
|
5334
|
-
|
|
5356
|
+
}, gn = wt(Nl), { confirm: Pl } = Je, Ll = ({ onOk: e, lang: t }) => {
|
|
5357
|
+
Pl({
|
|
5335
5358
|
title: Fe("removeItems", t),
|
|
5336
5359
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
5337
5360
|
centered: !0,
|
|
@@ -5340,8 +5363,8 @@ const Ml = (e, t) => {
|
|
|
5340
5363
|
onOk: e,
|
|
5341
5364
|
cancelText: Fe("cancel", t)
|
|
5342
5365
|
});
|
|
5343
|
-
}, { confirm:
|
|
5344
|
-
|
|
5366
|
+
}, { confirm: $l } = Je, Bl = ({ onOk: e, lang: t }) => {
|
|
5367
|
+
$l({
|
|
5345
5368
|
title: Fe("unlinkItems", t),
|
|
5346
5369
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
5347
5370
|
centered: !0,
|
|
@@ -5350,7 +5373,7 @@ const Ml = (e, t) => {
|
|
|
5350
5373
|
onOk: e,
|
|
5351
5374
|
cancelText: Fe("cancel", t)
|
|
5352
5375
|
});
|
|
5353
|
-
}, { useToken:
|
|
5376
|
+
}, { useToken: Hl } = Pe, Kl = (e) => {
|
|
5354
5377
|
const {
|
|
5355
5378
|
title: t,
|
|
5356
5379
|
readOnly: r,
|
|
@@ -5367,7 +5390,7 @@ const Ml = (e, t) => {
|
|
|
5367
5390
|
selectedRowKeys: p,
|
|
5368
5391
|
showCreateButton: h,
|
|
5369
5392
|
showToggleButton: g
|
|
5370
|
-
} = e, { token: y } =
|
|
5393
|
+
} = e, { token: y } = Hl();
|
|
5371
5394
|
function v() {
|
|
5372
5395
|
return /* @__PURE__ */ n("div", { className: "inline-block w-3" });
|
|
5373
5396
|
}
|
|
@@ -5412,7 +5435,7 @@ const Ml = (e, t) => {
|
|
|
5412
5435
|
Ze,
|
|
5413
5436
|
{
|
|
5414
5437
|
tooltip: "Previous item",
|
|
5415
|
-
icon: /* @__PURE__ */ n(
|
|
5438
|
+
icon: /* @__PURE__ */ n(Ur, {}),
|
|
5416
5439
|
onClick: u
|
|
5417
5440
|
}
|
|
5418
5441
|
),
|
|
@@ -5421,7 +5444,7 @@ const Ml = (e, t) => {
|
|
|
5421
5444
|
Ze,
|
|
5422
5445
|
{
|
|
5423
5446
|
tooltip: "Next item",
|
|
5424
|
-
icon: /* @__PURE__ */ n(
|
|
5447
|
+
icon: /* @__PURE__ */ n(qr, {}),
|
|
5425
5448
|
onClick: c
|
|
5426
5449
|
}
|
|
5427
5450
|
)
|
|
@@ -5462,19 +5485,19 @@ const Ml = (e, t) => {
|
|
|
5462
5485
|
)
|
|
5463
5486
|
] })
|
|
5464
5487
|
] });
|
|
5465
|
-
},
|
|
5466
|
-
form:
|
|
5467
|
-
tree:
|
|
5488
|
+
}, Wl = {
|
|
5489
|
+
form: Pr,
|
|
5490
|
+
tree: Mr,
|
|
5468
5491
|
graph: gn
|
|
5469
5492
|
};
|
|
5470
|
-
function
|
|
5493
|
+
function jl(e) {
|
|
5471
5494
|
const t = e.map((o) => o.id);
|
|
5472
5495
|
return e.filter((o, i) => {
|
|
5473
5496
|
const { id: s } = o;
|
|
5474
5497
|
return !t.includes(s, i + 1);
|
|
5475
5498
|
});
|
|
5476
5499
|
}
|
|
5477
|
-
const
|
|
5500
|
+
const Yl = (e) => {
|
|
5478
5501
|
var We;
|
|
5479
5502
|
const { value: t, onChange: r, ooui: o, views: i } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = H(
|
|
5480
5503
|
So
|
|
@@ -5486,7 +5509,7 @@ const jl = (e) => {
|
|
|
5486
5509
|
} = o, ce = o.type === "many2many", { id: Ie } = o, X = s.filter(
|
|
5487
5510
|
(z) => (z.values || z.treeValues) && z.operation !== "pendingRemove"
|
|
5488
5511
|
), U = de();
|
|
5489
|
-
|
|
5512
|
+
fe(() => {
|
|
5490
5513
|
if (U.current !== a) {
|
|
5491
5514
|
U.current = a, Ce();
|
|
5492
5515
|
return;
|
|
@@ -5496,14 +5519,14 @@ const jl = (e) => {
|
|
|
5496
5519
|
const Ce = De(() => {
|
|
5497
5520
|
(a === "form" && s.some((z) => !z.values) || a === "tree" && s.some((z) => !z.treeValues)) && Ye();
|
|
5498
5521
|
}, [s, a]);
|
|
5499
|
-
|
|
5522
|
+
fe(() => {
|
|
5500
5523
|
Le();
|
|
5501
5524
|
}, [g]);
|
|
5502
5525
|
const we = (z) => {
|
|
5503
5526
|
var ie, Se;
|
|
5504
5527
|
r == null || r({
|
|
5505
5528
|
fields: ((ie = i.get("form")) == null ? void 0 : ie.fields) || ((Se = i.get("tree")) == null ? void 0 : Se.fields),
|
|
5506
|
-
items:
|
|
5529
|
+
items: jl(z)
|
|
5507
5530
|
});
|
|
5508
5531
|
}, Ye = async () => {
|
|
5509
5532
|
await ke(), d > X.length - 1 && d !== 0 && u(0);
|
|
@@ -5541,7 +5564,7 @@ const jl = (e) => {
|
|
|
5541
5564
|
fields: m(),
|
|
5542
5565
|
context: h()
|
|
5543
5566
|
})), g && g.length > 0 && (K.current = K.current.concat(
|
|
5544
|
-
|
|
5567
|
+
Lr({
|
|
5545
5568
|
domain: g,
|
|
5546
5569
|
widgetFieldName: Ie
|
|
5547
5570
|
})
|
|
@@ -5580,7 +5603,7 @@ const jl = (e) => {
|
|
|
5580
5603
|
} : Te);
|
|
5581
5604
|
we(pe);
|
|
5582
5605
|
}, ye = (z) => {
|
|
5583
|
-
T ?
|
|
5606
|
+
T ? Jt({
|
|
5584
5607
|
lang: y,
|
|
5585
5608
|
onOk: () => {
|
|
5586
5609
|
Ee(), z(), F(!1);
|
|
@@ -5588,7 +5611,7 @@ const jl = (e) => {
|
|
|
5588
5611
|
}) : z();
|
|
5589
5612
|
}, Me = () => {
|
|
5590
5613
|
if (ce) {
|
|
5591
|
-
|
|
5614
|
+
Bl({
|
|
5592
5615
|
lang: y,
|
|
5593
5616
|
onOk: () => {
|
|
5594
5617
|
a === "form" ? ve() : Ve();
|
|
@@ -5596,7 +5619,7 @@ const jl = (e) => {
|
|
|
5596
5619
|
});
|
|
5597
5620
|
return;
|
|
5598
5621
|
}
|
|
5599
|
-
|
|
5622
|
+
Ll({
|
|
5600
5623
|
lang: y,
|
|
5601
5624
|
onOk: () => {
|
|
5602
5625
|
a === "form" ? ve() : Ve();
|
|
@@ -5704,7 +5727,7 @@ const jl = (e) => {
|
|
|
5704
5727
|
}
|
|
5705
5728
|
};
|
|
5706
5729
|
function Be() {
|
|
5707
|
-
const z =
|
|
5730
|
+
const z = Wl[a];
|
|
5708
5731
|
if (a === "graph")
|
|
5709
5732
|
return $n(i.get("graph").arch).string;
|
|
5710
5733
|
{
|
|
@@ -5716,7 +5739,7 @@ const jl = (e) => {
|
|
|
5716
5739
|
var ie, Se, pe, Te;
|
|
5717
5740
|
if (a === "form")
|
|
5718
5741
|
return X.length === 0 ? v("noCurrentEntries") : a !== U.current && s.some((Oe) => !Oe.values) ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(
|
|
5719
|
-
|
|
5742
|
+
Xt,
|
|
5720
5743
|
{
|
|
5721
5744
|
formView: i.get("form"),
|
|
5722
5745
|
values: (ie = X[d]) == null ? void 0 : ie.values,
|
|
@@ -5786,7 +5809,7 @@ const jl = (e) => {
|
|
|
5786
5809
|
const Qe = M;
|
|
5787
5810
|
return b ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ A(Z, { children: [
|
|
5788
5811
|
/* @__PURE__ */ n(
|
|
5789
|
-
|
|
5812
|
+
Kl,
|
|
5790
5813
|
{
|
|
5791
5814
|
mode: a,
|
|
5792
5815
|
title: Be(),
|
|
@@ -5808,7 +5831,7 @@ const jl = (e) => {
|
|
|
5808
5831
|
),
|
|
5809
5832
|
se(),
|
|
5810
5833
|
/* @__PURE__ */ n(
|
|
5811
|
-
|
|
5834
|
+
Zt,
|
|
5812
5835
|
{
|
|
5813
5836
|
formView: i.get("form"),
|
|
5814
5837
|
model: R,
|
|
@@ -5842,7 +5865,7 @@ const jl = (e) => {
|
|
|
5842
5865
|
}
|
|
5843
5866
|
)
|
|
5844
5867
|
] });
|
|
5845
|
-
},
|
|
5868
|
+
}, Gl = (e) => {
|
|
5846
5869
|
const { ooui: t } = e, { mode: r, relation: o, views: i, required: s, context: a } = t;
|
|
5847
5870
|
let l;
|
|
5848
5871
|
const [d, u] = w(!0), [c, f] = w(), [m, p] = w(/* @__PURE__ */ new Map()), h = H(Ne), { getContext: g } = h || {};
|
|
@@ -5872,7 +5895,7 @@ const jl = (e) => {
|
|
|
5872
5895
|
u(!1);
|
|
5873
5896
|
}
|
|
5874
5897
|
};
|
|
5875
|
-
return r && r.length > 0 ? l = r[0] : l = "tree", d ? /* @__PURE__ */ n(Ae, {}) : c ? /* @__PURE__ */ n(tt, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ n(
|
|
5898
|
+
return r && r.length > 0 ? l = r[0] : l = "tree", d ? /* @__PURE__ */ n(Ae, {}) : c ? /* @__PURE__ */ n(tt, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ n(bl, { initialView: l, children: /* @__PURE__ */ n(
|
|
5876
5899
|
ge,
|
|
5877
5900
|
{
|
|
5878
5901
|
required: s,
|
|
@@ -5888,15 +5911,15 @@ const jl = (e) => {
|
|
|
5888
5911
|
throw new Error();
|
|
5889
5912
|
},
|
|
5890
5913
|
...e,
|
|
5891
|
-
children: /* @__PURE__ */ n(
|
|
5914
|
+
children: /* @__PURE__ */ n(Yl, { ooui: t, views: m })
|
|
5892
5915
|
}
|
|
5893
5916
|
) });
|
|
5894
|
-
}, { useToken:
|
|
5917
|
+
}, { useToken: Ul } = Pe, ql = (e) => {
|
|
5895
5918
|
const { ooui: t } = e, { required: r } = t;
|
|
5896
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "number", ...e, children: /* @__PURE__ */ n(
|
|
5897
|
-
},
|
|
5898
|
-
const { ooui: t, value: r, onChange: o } = e, { id: i, readOnly: s, required: a } = t, { token: l } =
|
|
5899
|
-
|
|
5919
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "number", ...e, children: /* @__PURE__ */ n(zl, { ooui: t }) });
|
|
5920
|
+
}, zl = (e) => {
|
|
5921
|
+
const { ooui: t, value: r, onChange: o } = e, { id: i, readOnly: s, required: a } = t, { token: l } = Ul(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = de(), [c, f] = w(), m = H(Ne), { elementHasLostFocus: p } = m || {};
|
|
5922
|
+
fe(() => {
|
|
5900
5923
|
f(go(r));
|
|
5901
5924
|
}, [r]);
|
|
5902
5925
|
const h = (v) => {
|
|
@@ -5938,8 +5961,8 @@ function Io(e) {
|
|
|
5938
5961
|
}
|
|
5939
5962
|
) });
|
|
5940
5963
|
}
|
|
5941
|
-
const { TabPane:
|
|
5942
|
-
function
|
|
5964
|
+
const { TabPane: Jl } = Er;
|
|
5965
|
+
function Xl(e) {
|
|
5943
5966
|
const { ooui: t, responsiveBehaviour: r } = e, o = t.pages;
|
|
5944
5967
|
function i(s) {
|
|
5945
5968
|
if (s) {
|
|
@@ -5947,8 +5970,8 @@ function Jl(e) {
|
|
|
5947
5970
|
return a && /* @__PURE__ */ n(a, {});
|
|
5948
5971
|
}
|
|
5949
5972
|
}
|
|
5950
|
-
return /* @__PURE__ */ n(
|
|
5951
|
-
|
|
5973
|
+
return /* @__PURE__ */ n(Er, { defaultActiveKey: "1", tabPosition: t.tabPosition, children: o.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ n(
|
|
5974
|
+
Jl,
|
|
5952
5975
|
{
|
|
5953
5976
|
tab: /* @__PURE__ */ A(Z, { children: [
|
|
5954
5977
|
i(s.icon),
|
|
@@ -5967,10 +5990,10 @@ function Jl(e) {
|
|
|
5967
5990
|
s.label
|
|
5968
5991
|
)) });
|
|
5969
5992
|
}
|
|
5970
|
-
const { useToken:
|
|
5971
|
-
const { ooui: t } = e, { id: r, readOnly: o, required: i, height: s, translatable: a } = t, { token: l } =
|
|
5993
|
+
const { useToken: Zl } = Pe, { TextArea: kn } = it, Ql = (e) => {
|
|
5994
|
+
const { ooui: t } = e, { id: r, readOnly: o, required: i, height: s, translatable: a } = t, { token: l } = Zl(), d = i && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = H(Ne), { elementHasLostFocus: c } = u || {};
|
|
5972
5995
|
return /* @__PURE__ */ n(ge, { required: i, ...e, children: a ? /* @__PURE__ */ n(
|
|
5973
|
-
|
|
5996
|
+
ec,
|
|
5974
5997
|
{
|
|
5975
5998
|
field: r,
|
|
5976
5999
|
height: s,
|
|
@@ -5988,7 +6011,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
5988
6011
|
onBlur: c
|
|
5989
6012
|
}
|
|
5990
6013
|
) });
|
|
5991
|
-
},
|
|
6014
|
+
}, ec = ({
|
|
5992
6015
|
value: e,
|
|
5993
6016
|
field: t,
|
|
5994
6017
|
requiredStyle: r,
|
|
@@ -6035,7 +6058,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6035
6058
|
}
|
|
6036
6059
|
),
|
|
6037
6060
|
/* @__PURE__ */ n(
|
|
6038
|
-
|
|
6061
|
+
no,
|
|
6039
6062
|
{
|
|
6040
6063
|
id: a,
|
|
6041
6064
|
model: l,
|
|
@@ -6070,7 +6093,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6070
6093
|
Ze,
|
|
6071
6094
|
{
|
|
6072
6095
|
tooltip: p("translate"),
|
|
6073
|
-
icon: /* @__PURE__ */ n(
|
|
6096
|
+
icon: /* @__PURE__ */ n(Wr, {}),
|
|
6074
6097
|
onClick: async () => {
|
|
6075
6098
|
u != null && u() ? ft(p("saveBeforeTranslate")) : ft(p("enterTextBeforeTranslate"));
|
|
6076
6099
|
},
|
|
@@ -6078,13 +6101,13 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6078
6101
|
}
|
|
6079
6102
|
) })
|
|
6080
6103
|
] });
|
|
6081
|
-
},
|
|
6104
|
+
}, tc = (e) => {
|
|
6082
6105
|
const { ooui: t } = e, { label: r, icon: o } = t, i = ct(o || "");
|
|
6083
6106
|
return /* @__PURE__ */ n(cn, { orientation: "left", className: "text-sm", children: (i || r) && /* @__PURE__ */ A(je, { children: [
|
|
6084
6107
|
i ? /* @__PURE__ */ n(i, {}) : null,
|
|
6085
6108
|
r
|
|
6086
6109
|
] }) });
|
|
6087
|
-
},
|
|
6110
|
+
}, nc = ({
|
|
6088
6111
|
model: e,
|
|
6089
6112
|
context: t,
|
|
6090
6113
|
locale: r,
|
|
@@ -6105,7 +6128,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6105
6128
|
]);
|
|
6106
6129
|
const { datas: T } = await E.getHandler().exportData({
|
|
6107
6130
|
model: e,
|
|
6108
|
-
fields:
|
|
6131
|
+
fields: lc({
|
|
6109
6132
|
keys: y.selectedKeys,
|
|
6110
6133
|
fields: l.current
|
|
6111
6134
|
}),
|
|
@@ -6125,7 +6148,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6125
6148
|
context: t,
|
|
6126
6149
|
fields: []
|
|
6127
6150
|
});
|
|
6128
|
-
return l.current["/"] = y,
|
|
6151
|
+
return l.current["/"] = y, _r({ fields: y });
|
|
6129
6152
|
}, [e, t, l]), f = De(
|
|
6130
6153
|
async (y) => {
|
|
6131
6154
|
const T = Mn(y, l.current)[En(y)], F = T.relation, b = await E.getHandler().getFields({
|
|
@@ -6134,18 +6157,18 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6134
6157
|
fields: []
|
|
6135
6158
|
});
|
|
6136
6159
|
for (const [_, O] of Object.entries(b))
|
|
6137
|
-
b[_].string =
|
|
6160
|
+
b[_].string = oc({
|
|
6138
6161
|
parentTitle: T.string,
|
|
6139
6162
|
title: O.string
|
|
6140
6163
|
});
|
|
6141
|
-
return l.current[y] = b,
|
|
6164
|
+
return l.current[y] = b, _r({
|
|
6142
6165
|
fields: b,
|
|
6143
6166
|
parentKey: y
|
|
6144
6167
|
});
|
|
6145
6168
|
},
|
|
6146
6169
|
[l.current, e, t]
|
|
6147
6170
|
), m = De(async () => {
|
|
6148
|
-
const y = await
|
|
6171
|
+
const y = await ic({ model: e, context: t }), v = await ac({
|
|
6149
6172
|
predefinedExports: y,
|
|
6150
6173
|
fields: l.current,
|
|
6151
6174
|
onGetFieldChilds: f
|
|
@@ -6217,7 +6240,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6217
6240
|
onSavePredefinedExport: p,
|
|
6218
6241
|
onRemovePredefinedExport: h
|
|
6219
6242
|
};
|
|
6220
|
-
},
|
|
6243
|
+
}, _r = ({
|
|
6221
6244
|
fields: e,
|
|
6222
6245
|
parentKey: t
|
|
6223
6246
|
}) => {
|
|
@@ -6228,7 +6251,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6228
6251
|
continue;
|
|
6229
6252
|
const s = Fo(i);
|
|
6230
6253
|
r.push({
|
|
6231
|
-
key:
|
|
6254
|
+
key: rc({ key: o, parentKey: t }),
|
|
6232
6255
|
title: i.string,
|
|
6233
6256
|
tooltip: i.help,
|
|
6234
6257
|
required: i.required,
|
|
@@ -6236,7 +6259,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6236
6259
|
});
|
|
6237
6260
|
}
|
|
6238
6261
|
return r;
|
|
6239
|
-
}, Fo = (e) => e.type === "many2one" || e.type === "one2many" || e.type === "many2many",
|
|
6262
|
+
}, Fo = (e) => e.type === "many2one" || e.type === "one2many" || e.type === "many2many", rc = ({
|
|
6240
6263
|
parentKey: e,
|
|
6241
6264
|
key: t
|
|
6242
6265
|
}) => `${e ? e + "/" : ""}${t}`, Bt = (e) => e.indexOf("/") === -1 ? e : e.split("/").slice(0, -1).join("/"), En = (e) => {
|
|
@@ -6244,10 +6267,10 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6244
6267
|
return e;
|
|
6245
6268
|
const t = e.split("/");
|
|
6246
6269
|
return t[t.length - 1];
|
|
6247
|
-
}, Mn = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[Bt(e)],
|
|
6270
|
+
}, Mn = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[Bt(e)], oc = ({
|
|
6248
6271
|
title: e,
|
|
6249
6272
|
parentTitle: t
|
|
6250
|
-
}) => `${t ? t + " → " : ""}${e}`,
|
|
6273
|
+
}) => `${t ? t + " → " : ""}${e}`, ic = async ({
|
|
6251
6274
|
model: e,
|
|
6252
6275
|
context: t
|
|
6253
6276
|
}) => {
|
|
@@ -6267,10 +6290,10 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6267
6290
|
key: i.find((d) => d.id === a).name
|
|
6268
6291
|
}))
|
|
6269
6292
|
}));
|
|
6270
|
-
},
|
|
6293
|
+
}, sc = ({
|
|
6271
6294
|
fields: e,
|
|
6272
6295
|
keys: t
|
|
6273
|
-
}) =>
|
|
6296
|
+
}) => cc([
|
|
6274
6297
|
...new Set(
|
|
6275
6298
|
t.filter((r) => {
|
|
6276
6299
|
var o, i, s;
|
|
@@ -6284,27 +6307,27 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6284
6307
|
}
|
|
6285
6308
|
}).map((r) => Bt(r))
|
|
6286
6309
|
)
|
|
6287
|
-
]),
|
|
6310
|
+
]), ac = async ({
|
|
6288
6311
|
predefinedExports: e,
|
|
6289
6312
|
fields: t,
|
|
6290
6313
|
onGetFieldChilds: r
|
|
6291
6314
|
}) => {
|
|
6292
6315
|
const o = e.flatMap(
|
|
6293
6316
|
(a) => a.fields.map((l) => l.key)
|
|
6294
|
-
), i =
|
|
6317
|
+
), i = sc({
|
|
6295
6318
|
fields: t,
|
|
6296
6319
|
keys: o
|
|
6297
6320
|
}), s = [];
|
|
6298
6321
|
for (const a of i)
|
|
6299
6322
|
s.push({ key: a, childs: await r(a) });
|
|
6300
6323
|
return s;
|
|
6301
|
-
},
|
|
6324
|
+
}, lc = ({
|
|
6302
6325
|
keys: e,
|
|
6303
6326
|
fields: t
|
|
6304
6327
|
}) => e.map((r) => {
|
|
6305
6328
|
const o = En(r), s = Mn(r, t)[o];
|
|
6306
6329
|
return Fo(s) ? `${r}/id` : r;
|
|
6307
|
-
}),
|
|
6330
|
+
}), cc = (e) => {
|
|
6308
6331
|
const t = /* @__PURE__ */ new Map(), r = [];
|
|
6309
6332
|
for (const o of e) {
|
|
6310
6333
|
const i = o.split("/");
|
|
@@ -6318,7 +6341,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6318
6341
|
const s = o.split("/").length, a = i.split("/").length;
|
|
6319
6342
|
return s - a;
|
|
6320
6343
|
}), r;
|
|
6321
|
-
},
|
|
6344
|
+
}, dc = (e) => {
|
|
6322
6345
|
const {
|
|
6323
6346
|
visible: t,
|
|
6324
6347
|
locale: r,
|
|
@@ -6337,7 +6360,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6337
6360
|
onGetPredefinedExports: h,
|
|
6338
6361
|
onSavePredefinedExport: g,
|
|
6339
6362
|
onRemovePredefinedExport: y
|
|
6340
|
-
} =
|
|
6363
|
+
} = nc({
|
|
6341
6364
|
model: i,
|
|
6342
6365
|
context: s,
|
|
6343
6366
|
domain: d,
|
|
@@ -6363,29 +6386,29 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6363
6386
|
onRemovePredefinedExport: y
|
|
6364
6387
|
}
|
|
6365
6388
|
);
|
|
6366
|
-
},
|
|
6389
|
+
}, uc = (e) => {
|
|
6367
6390
|
const { ooui: t } = e;
|
|
6368
6391
|
return /* @__PURE__ */ n(vo, { ooui: t });
|
|
6369
|
-
},
|
|
6392
|
+
}, fc = (e) => {
|
|
6370
6393
|
const { ooui: t } = e;
|
|
6371
6394
|
return /* @__PURE__ */ n(vo, { ooui: t, showTime: !0 });
|
|
6372
|
-
},
|
|
6395
|
+
}, mc = (e) => {
|
|
6373
6396
|
const { ooui: t } = e;
|
|
6374
|
-
return /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(
|
|
6375
|
-
},
|
|
6376
|
-
|
|
6397
|
+
return /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(hc, { ooui: t }) });
|
|
6398
|
+
}, hc = (e) => /* @__PURE__ */ n(
|
|
6399
|
+
Ar,
|
|
6377
6400
|
{
|
|
6378
6401
|
onChange: (r, o) => {
|
|
6379
6402
|
e.onChange && e.onChange(o);
|
|
6380
6403
|
},
|
|
6381
6404
|
value: e.value ? nt(e.value, "HH:mm:ss") : void 0
|
|
6382
6405
|
}
|
|
6383
|
-
),
|
|
6406
|
+
), pc = (e) => {
|
|
6384
6407
|
const { ooui: t } = e, { required: r } = t;
|
|
6385
|
-
return /* @__PURE__ */ n(ge, { required: r, ...e, children: /* @__PURE__ */ n(
|
|
6386
|
-
},
|
|
6408
|
+
return /* @__PURE__ */ n(ge, { required: r, ...e, children: /* @__PURE__ */ n(gc, { ooui: t }) });
|
|
6409
|
+
}, gc = (e) => {
|
|
6387
6410
|
const { value: t, onChange: r, ooui: o } = e, { required: i, selectionValues: s, readOnly: a } = o, l = t == null ? void 0 : t.split(","), [d, u] = w([]), [c, f] = w();
|
|
6388
|
-
return
|
|
6411
|
+
return fe(() => {
|
|
6389
6412
|
if (!t) {
|
|
6390
6413
|
f(void 0), u([]);
|
|
6391
6414
|
return;
|
|
@@ -6394,7 +6417,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6394
6417
|
u([p, void 0]), f(m);
|
|
6395
6418
|
}, [t]), /* @__PURE__ */ A(be, { gutter: 8, wrap: !1, children: [
|
|
6396
6419
|
/* @__PURE__ */ n(ae, { flex: "1", children: /* @__PURE__ */ n(
|
|
6397
|
-
|
|
6420
|
+
io,
|
|
6398
6421
|
{
|
|
6399
6422
|
ooui: new Ln({
|
|
6400
6423
|
name: "model_selection",
|
|
@@ -6415,7 +6438,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6415
6438
|
/* @__PURE__ */ n(ae, { flex: "3", children: /* @__PURE__ */ n(
|
|
6416
6439
|
xo,
|
|
6417
6440
|
{
|
|
6418
|
-
ooui: new
|
|
6441
|
+
ooui: new Nr({
|
|
6419
6442
|
name: "object_value",
|
|
6420
6443
|
relation: c,
|
|
6421
6444
|
readonly: a,
|
|
@@ -6430,11 +6453,11 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6430
6453
|
}
|
|
6431
6454
|
) })
|
|
6432
6455
|
] });
|
|
6433
|
-
}, { useToken:
|
|
6456
|
+
}, { useToken: yc } = Pe, vc = (e) => {
|
|
6434
6457
|
const { ooui: t } = e, { required: r } = t;
|
|
6435
|
-
return /* @__PURE__ */ n(ge, { required: r, ...e, children: /* @__PURE__ */ n(
|
|
6436
|
-
},
|
|
6437
|
-
const { ooui: t, value: r, onChange: o } = e, { readOnly: i, required: s, filenameField: a } = t, { token: l } =
|
|
6458
|
+
return /* @__PURE__ */ n(ge, { required: r, ...e, children: /* @__PURE__ */ n(wc, { ooui: t }) });
|
|
6459
|
+
}, wc = (e) => {
|
|
6460
|
+
const { ooui: t, value: r, onChange: o } = e, { readOnly: i, required: s, filenameField: a } = t, { token: l } = yc(), d = s && !i ? { backgroundColor: l.colorPrimaryBg } : void 0, u = de(null), { setFieldValue: c, getFieldValue: f } = H(Ne) || {}, { t: m } = H(he), p = r ? Vs(r) : "", h = (F) => {
|
|
6438
6461
|
o == null || o(F);
|
|
6439
6462
|
};
|
|
6440
6463
|
async function g() {
|
|
@@ -6447,7 +6470,7 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6447
6470
|
}
|
|
6448
6471
|
async function v(F) {
|
|
6449
6472
|
F.stopPropagation(), F.preventDefault();
|
|
6450
|
-
const b = F.target.files[0], _ = await
|
|
6473
|
+
const b = F.target.files[0], _ = await so(b);
|
|
6451
6474
|
h(_), a && c(a, b.name);
|
|
6452
6475
|
}
|
|
6453
6476
|
function T() {
|
|
@@ -6514,10 +6537,10 @@ const { useToken: Xl } = Pe, { TextArea: kn } = it, Zl = (e) => {
|
|
|
6514
6537
|
graph: /* @__PURE__ */ n(gi, {}),
|
|
6515
6538
|
calendar: /* @__PURE__ */ n(yi, {})
|
|
6516
6539
|
};
|
|
6517
|
-
function
|
|
6540
|
+
function Or(e) {
|
|
6518
6541
|
return e ? (Fn == null ? void 0 : Fn[e.type]) || /* @__PURE__ */ n(Kt, {}) : /* @__PURE__ */ n(Kt, {});
|
|
6519
6542
|
}
|
|
6520
|
-
function
|
|
6543
|
+
function er(e) {
|
|
6521
6544
|
const {
|
|
6522
6545
|
currentView: t,
|
|
6523
6546
|
availableViews: r,
|
|
@@ -6528,7 +6551,7 @@ function Qn(e) {
|
|
|
6528
6551
|
} = e, { t: l, lang: d } = H(he);
|
|
6529
6552
|
function u() {
|
|
6530
6553
|
const m = r.map((p, h) => /* @__PURE__ */ n(He.Item, { children: /* @__PURE__ */ A(be, { wrap: !1, children: [
|
|
6531
|
-
/* @__PURE__ */ n(ae, { flex: "none", style: { paddingRight: 20 }, children:
|
|
6554
|
+
/* @__PURE__ */ n(ae, { flex: "none", style: { paddingRight: 20 }, children: Or(p) }),
|
|
6532
6555
|
/* @__PURE__ */ n(ae, { flex: "auto", style: { paddingRight: 20 }, children: p.type.charAt(0).toUpperCase() + p.type.slice(1) }),
|
|
6533
6556
|
/* @__PURE__ */ n(ae, { flex: "none", children: /* @__PURE__ */ n(
|
|
6534
6557
|
Et,
|
|
@@ -6543,7 +6566,7 @@ function Qn(e) {
|
|
|
6543
6566
|
}
|
|
6544
6567
|
function c(m) {
|
|
6545
6568
|
if (s) {
|
|
6546
|
-
|
|
6569
|
+
Jt({
|
|
6547
6570
|
lang: d,
|
|
6548
6571
|
onOk: () => {
|
|
6549
6572
|
m();
|
|
@@ -6566,7 +6589,7 @@ function Qn(e) {
|
|
|
6566
6589
|
Ze,
|
|
6567
6590
|
{
|
|
6568
6591
|
tooltip: a ? l("viewAs") + " " + l(a.type) : "",
|
|
6569
|
-
icon:
|
|
6592
|
+
icon: Or(a),
|
|
6570
6593
|
style: {
|
|
6571
6594
|
width: 50,
|
|
6572
6595
|
borderTopRightRadius: 0,
|
|
@@ -6579,7 +6602,7 @@ function Qn(e) {
|
|
|
6579
6602
|
}
|
|
6580
6603
|
),
|
|
6581
6604
|
/* @__PURE__ */ n(
|
|
6582
|
-
|
|
6605
|
+
Ut,
|
|
6583
6606
|
{
|
|
6584
6607
|
overlay: u(),
|
|
6585
6608
|
disabled: i || r.length === 1,
|
|
@@ -6599,7 +6622,7 @@ function Qn(e) {
|
|
|
6599
6622
|
)
|
|
6600
6623
|
] });
|
|
6601
6624
|
}
|
|
6602
|
-
const { Search:
|
|
6625
|
+
const { Search: bc } = it;
|
|
6603
6626
|
function Vt(e) {
|
|
6604
6627
|
const {
|
|
6605
6628
|
icon: t,
|
|
@@ -6627,7 +6650,7 @@ function Vt(e) {
|
|
|
6627
6650
|
const h = p.map((y, v) => y.name === "divider" ? /* @__PURE__ */ n(He.Divider, {}, "divider" + v) : /* @__PURE__ */ n(He.Item, { children: y.name }, y.id)), g = l === !0 || l === "auto" && o.length > 3;
|
|
6628
6651
|
return /* @__PURE__ */ A(He, { onClick: m, children: [
|
|
6629
6652
|
/* @__PURE__ */ n("div", { children: g && /* @__PURE__ */ n(
|
|
6630
|
-
|
|
6653
|
+
bc,
|
|
6631
6654
|
{
|
|
6632
6655
|
onChange: (y) => c(y.target.value),
|
|
6633
6656
|
onSearch: c,
|
|
@@ -6643,7 +6666,7 @@ function Vt(e) {
|
|
|
6643
6666
|
i(h);
|
|
6644
6667
|
}
|
|
6645
6668
|
return /* @__PURE__ */ n(
|
|
6646
|
-
|
|
6669
|
+
Ut,
|
|
6647
6670
|
{
|
|
6648
6671
|
overlay: f(),
|
|
6649
6672
|
disabled: a || !o || o.length === 0,
|
|
@@ -6686,7 +6709,7 @@ function _o(e) {
|
|
|
6686
6709
|
st
|
|
6687
6710
|
), { t: i, lang: s } = H(he), a = () => {
|
|
6688
6711
|
if (r) {
|
|
6689
|
-
|
|
6712
|
+
Jt({
|
|
6690
6713
|
lang: s,
|
|
6691
6714
|
onOk: () => {
|
|
6692
6715
|
o();
|
|
@@ -6706,12 +6729,12 @@ function _o(e) {
|
|
|
6706
6729
|
}
|
|
6707
6730
|
);
|
|
6708
6731
|
}
|
|
6709
|
-
const { confirm:
|
|
6732
|
+
const { confirm: Cc } = Je, xc = ({
|
|
6710
6733
|
onOk: e,
|
|
6711
6734
|
onCancel: t,
|
|
6712
6735
|
lang: r
|
|
6713
6736
|
}) => {
|
|
6714
|
-
|
|
6737
|
+
Cc({
|
|
6715
6738
|
title: Fe("unsavedChanges", r),
|
|
6716
6739
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
6717
6740
|
centered: !0,
|
|
@@ -6745,9 +6768,9 @@ async function Oo(e, t, r) {
|
|
|
6745
6768
|
] })
|
|
6746
6769
|
);
|
|
6747
6770
|
}
|
|
6748
|
-
const
|
|
6771
|
+
const Sc = (e) => {
|
|
6749
6772
|
const { numberOfAttachments: t, disabled: r } = e, { t: o, lang: i } = H(he), [s, a] = w(!1), l = /* @__PURE__ */ A(_e, { disabled: r, children: [
|
|
6750
|
-
/* @__PURE__ */ n(
|
|
6773
|
+
/* @__PURE__ */ n(zr, {}),
|
|
6751
6774
|
`(${t})`,
|
|
6752
6775
|
/* @__PURE__ */ n(kt, { style: { fontSize: 12 } })
|
|
6753
6776
|
] });
|
|
@@ -6757,13 +6780,13 @@ const xc = (e) => {
|
|
|
6757
6780
|
onVisibleChange: (d) => a(d),
|
|
6758
6781
|
visible: s,
|
|
6759
6782
|
placement: "bottom",
|
|
6760
|
-
content:
|
|
6783
|
+
content: Tc(e, a, i),
|
|
6761
6784
|
title: o("attachments"),
|
|
6762
6785
|
arrowContent: null,
|
|
6763
6786
|
children: l
|
|
6764
6787
|
}
|
|
6765
6788
|
);
|
|
6766
|
-
},
|
|
6789
|
+
}, Tc = (e, t, r) => {
|
|
6767
6790
|
const {
|
|
6768
6791
|
attachments: o = [],
|
|
6769
6792
|
loading: i,
|
|
@@ -6806,7 +6829,7 @@ const xc = (e) => {
|
|
|
6806
6829
|
o.length > 0 && /* @__PURE__ */ A(Z, { children: [
|
|
6807
6830
|
/* @__PURE__ */ n("li", { className: "ant-dropdown-menu-item-divider" }),
|
|
6808
6831
|
o.map((u) => {
|
|
6809
|
-
const c = u.link ?
|
|
6832
|
+
const c = u.link ? zr : Hn;
|
|
6810
6833
|
return /* @__PURE__ */ A(
|
|
6811
6834
|
be,
|
|
6812
6835
|
{
|
|
@@ -6847,7 +6870,7 @@ const xc = (e) => {
|
|
|
6847
6870
|
] })
|
|
6848
6871
|
] });
|
|
6849
6872
|
};
|
|
6850
|
-
function
|
|
6873
|
+
function Ic(e) {
|
|
6851
6874
|
const {
|
|
6852
6875
|
attachments: t,
|
|
6853
6876
|
disabled: r = !1,
|
|
@@ -6900,11 +6923,11 @@ function Tc(e) {
|
|
|
6900
6923
|
}, []), y = De(async (v) => {
|
|
6901
6924
|
s(v);
|
|
6902
6925
|
}, []);
|
|
6903
|
-
return
|
|
6926
|
+
return fe(() => {
|
|
6904
6927
|
h();
|
|
6905
6928
|
}, [h]), /* @__PURE__ */ A(Z, { children: [
|
|
6906
6929
|
/* @__PURE__ */ n(
|
|
6907
|
-
|
|
6930
|
+
Sc,
|
|
6908
6931
|
{
|
|
6909
6932
|
numberOfAttachments: t.length,
|
|
6910
6933
|
attachments: u,
|
|
@@ -6930,7 +6953,7 @@ function Tc(e) {
|
|
|
6930
6953
|
)
|
|
6931
6954
|
] });
|
|
6932
6955
|
}
|
|
6933
|
-
function
|
|
6956
|
+
function Fc({ toolbar: e }) {
|
|
6934
6957
|
const {
|
|
6935
6958
|
availableViews: t,
|
|
6936
6959
|
currentView: r,
|
|
@@ -6963,7 +6986,7 @@ function Ic({ toolbar: e }) {
|
|
|
6963
6986
|
), { openRelate: L, openDefaultActionForModel: j } = P || {};
|
|
6964
6987
|
function M(R) {
|
|
6965
6988
|
if (s) {
|
|
6966
|
-
|
|
6989
|
+
xc({
|
|
6967
6990
|
lang: I,
|
|
6968
6991
|
onOk: () => {
|
|
6969
6992
|
R();
|
|
@@ -6975,7 +6998,7 @@ function Ic({ toolbar: e }) {
|
|
|
6975
6998
|
}
|
|
6976
6999
|
function $(R) {
|
|
6977
7000
|
if (s) {
|
|
6978
|
-
|
|
7001
|
+
Jt({
|
|
6979
7002
|
lang: I,
|
|
6980
7003
|
onOk: () => {
|
|
6981
7004
|
R();
|
|
@@ -6992,7 +7015,7 @@ function Ic({ toolbar: e }) {
|
|
|
6992
7015
|
d && c > 0 ? (u == null || u(c - 1), f == null || f(d[c - 1].id)) : d && c === 0 && (u == null || u(d.length - 1), f == null || f(d[d.length - 1].id));
|
|
6993
7016
|
}
|
|
6994
7017
|
function G() {
|
|
6995
|
-
|
|
7018
|
+
zt({
|
|
6996
7019
|
confirmMessage: S("confirmRemoveItem"),
|
|
6997
7020
|
lang: I,
|
|
6998
7021
|
onOk: () => {
|
|
@@ -7090,7 +7113,7 @@ function Ic({ toolbar: e }) {
|
|
|
7090
7113
|
/* @__PURE__ */ n(
|
|
7091
7114
|
Xe,
|
|
7092
7115
|
{
|
|
7093
|
-
icon: /* @__PURE__ */ n(
|
|
7116
|
+
icon: /* @__PURE__ */ n(Jr, {}),
|
|
7094
7117
|
tooltip: S("showLogs"),
|
|
7095
7118
|
disabled: a || l === void 0 || h || g || T,
|
|
7096
7119
|
loading: !1,
|
|
@@ -7115,7 +7138,7 @@ function Ic({ toolbar: e }) {
|
|
|
7115
7138
|
),
|
|
7116
7139
|
Tt(),
|
|
7117
7140
|
/* @__PURE__ */ n(
|
|
7118
|
-
|
|
7141
|
+
er,
|
|
7119
7142
|
{
|
|
7120
7143
|
currentView: r,
|
|
7121
7144
|
previousView: O,
|
|
@@ -7132,7 +7155,7 @@ function Ic({ toolbar: e }) {
|
|
|
7132
7155
|
/* @__PURE__ */ n(
|
|
7133
7156
|
Xe,
|
|
7134
7157
|
{
|
|
7135
|
-
icon: /* @__PURE__ */ n(
|
|
7158
|
+
icon: /* @__PURE__ */ n(Ur, {}),
|
|
7136
7159
|
tooltip: S("previous"),
|
|
7137
7160
|
disabled: le,
|
|
7138
7161
|
loading: !1,
|
|
@@ -7144,7 +7167,7 @@ function Ic({ toolbar: e }) {
|
|
|
7144
7167
|
/* @__PURE__ */ n(
|
|
7145
7168
|
Xe,
|
|
7146
7169
|
{
|
|
7147
|
-
icon: /* @__PURE__ */ n(
|
|
7170
|
+
icon: /* @__PURE__ */ n(qr, {}),
|
|
7148
7171
|
tooltip: S("next"),
|
|
7149
7172
|
disabled: le,
|
|
7150
7173
|
loading: !1,
|
|
@@ -7195,7 +7218,7 @@ function Ic({ toolbar: e }) {
|
|
|
7195
7218
|
/* @__PURE__ */ n(
|
|
7196
7219
|
Vt,
|
|
7197
7220
|
{
|
|
7198
|
-
icon: /* @__PURE__ */ n(
|
|
7221
|
+
icon: /* @__PURE__ */ n(Gr, {}),
|
|
7199
7222
|
disabled: le,
|
|
7200
7223
|
tooltip: S("related"),
|
|
7201
7224
|
items: e == null ? void 0 : e.relate,
|
|
@@ -7213,7 +7236,7 @@ function Ic({ toolbar: e }) {
|
|
|
7213
7236
|
}
|
|
7214
7237
|
),
|
|
7215
7238
|
/* @__PURE__ */ n(
|
|
7216
|
-
|
|
7239
|
+
Ic,
|
|
7217
7240
|
{
|
|
7218
7241
|
disabled: le,
|
|
7219
7242
|
attachments: F,
|
|
@@ -7225,7 +7248,7 @@ function Ic({ toolbar: e }) {
|
|
|
7225
7248
|
return;
|
|
7226
7249
|
const N = R.currentId;
|
|
7227
7250
|
j({
|
|
7228
|
-
...
|
|
7251
|
+
...Rr(m, N),
|
|
7229
7252
|
initialViewType: "form"
|
|
7230
7253
|
});
|
|
7231
7254
|
},
|
|
@@ -7237,7 +7260,7 @@ function Ic({ toolbar: e }) {
|
|
|
7237
7260
|
return;
|
|
7238
7261
|
const N = R.currentId;
|
|
7239
7262
|
j({
|
|
7240
|
-
...
|
|
7263
|
+
...Rr(m, N),
|
|
7241
7264
|
initialViewType: "tree"
|
|
7242
7265
|
});
|
|
7243
7266
|
},
|
|
@@ -7263,7 +7286,7 @@ async function It({
|
|
|
7263
7286
|
const t = await (e == null ? void 0 : e());
|
|
7264
7287
|
return t != null && t.succeed ? { succeed: !0, currentId: t.id } : { succeed: !1, currentId: void 0 };
|
|
7265
7288
|
}
|
|
7266
|
-
function
|
|
7289
|
+
function Rr(e, t) {
|
|
7267
7290
|
return {
|
|
7268
7291
|
model: "ir.attachment",
|
|
7269
7292
|
domain: [
|
|
@@ -7279,9 +7302,9 @@ function Or(e, t) {
|
|
|
7279
7302
|
}
|
|
7280
7303
|
};
|
|
7281
7304
|
}
|
|
7282
|
-
const { useToken:
|
|
7283
|
-
const { ooui: t, value: r, onChange: o, valueValidator: i, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } =
|
|
7284
|
-
|
|
7305
|
+
const { useToken: _c } = Pe, Ro = (e) => {
|
|
7306
|
+
const { ooui: t, value: r, onChange: o, valueValidator: i, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = _c(), c = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, f = H(Ne), { elementHasLostFocus: m } = f || {}, [p, h] = w(!1), [g, y] = w(!1);
|
|
7307
|
+
fe(() => {
|
|
7285
7308
|
l && !p && y(!1), !r && !l && (h(!0), y(!0));
|
|
7286
7309
|
}, [p, l]);
|
|
7287
7310
|
const v = (T) => {
|
|
@@ -7301,7 +7324,7 @@ const { useToken: Fc } = Pe, Ro = (e) => {
|
|
|
7301
7324
|
) : /* @__PURE__ */ n(
|
|
7302
7325
|
_e,
|
|
7303
7326
|
{
|
|
7304
|
-
icon: /* @__PURE__ */ n(
|
|
7327
|
+
icon: /* @__PURE__ */ n(Xr, {}),
|
|
7305
7328
|
onClick: () => {
|
|
7306
7329
|
h(!0), y(!0);
|
|
7307
7330
|
},
|
|
@@ -7335,7 +7358,7 @@ const { useToken: Fc } = Pe, Ro = (e) => {
|
|
|
7335
7358
|
}
|
|
7336
7359
|
) })
|
|
7337
7360
|
] });
|
|
7338
|
-
},
|
|
7361
|
+
}, Oc = (e) => {
|
|
7339
7362
|
const { ooui: t } = e, { required: r } = t;
|
|
7340
7363
|
return /* @__PURE__ */ n(ge, { required: r, ...e, children: /* @__PURE__ */ n(
|
|
7341
7364
|
Ro,
|
|
@@ -7344,7 +7367,7 @@ const { useToken: Fc } = Pe, Ro = (e) => {
|
|
|
7344
7367
|
valueValidator: (o) => o ? ji(o) : !1
|
|
7345
7368
|
}
|
|
7346
7369
|
) });
|
|
7347
|
-
},
|
|
7370
|
+
}, Rc = (e) => {
|
|
7348
7371
|
const { ooui: t } = e, { required: r } = t;
|
|
7349
7372
|
return /* @__PURE__ */ n(ge, { required: r, ...e, children: /* @__PURE__ */ n(
|
|
7350
7373
|
Ro,
|
|
@@ -7354,7 +7377,7 @@ const { useToken: Fc } = Pe, Ro = (e) => {
|
|
|
7354
7377
|
valueValidator: (o) => o ? Yi(o) : !1
|
|
7355
7378
|
}
|
|
7356
7379
|
) });
|
|
7357
|
-
},
|
|
7380
|
+
}, Vc = (e) => {
|
|
7358
7381
|
const { visible: t, onIdSubmitted: r, onCancel: o, isSearching: i } = e, { t: s } = H(he), a = de();
|
|
7359
7382
|
function l(d) {
|
|
7360
7383
|
const u = d.id.split(",").map((c) => parseInt(c.trim()));
|
|
@@ -7393,7 +7416,7 @@ const { useToken: Fc } = Pe, Ro = (e) => {
|
|
|
7393
7416
|
/* @__PURE__ */ n(
|
|
7394
7417
|
_e,
|
|
7395
7418
|
{
|
|
7396
|
-
icon: /* @__PURE__ */ n(
|
|
7419
|
+
icon: /* @__PURE__ */ n(qt, {}),
|
|
7397
7420
|
htmlType: "button",
|
|
7398
7421
|
onClick: o,
|
|
7399
7422
|
disabled: i,
|
|
@@ -7416,9 +7439,9 @@ const { useToken: Fc } = Pe, Ro = (e) => {
|
|
|
7416
7439
|
] })
|
|
7417
7440
|
}
|
|
7418
7441
|
);
|
|
7419
|
-
}, { useToken:
|
|
7442
|
+
}, { useToken: Ac } = Pe;
|
|
7420
7443
|
function Vo(e) {
|
|
7421
|
-
const { badgeNumber: t = 0, ...r } = e, { token: o } =
|
|
7444
|
+
const { badgeNumber: t = 0, ...r } = e, { token: o } = Ac();
|
|
7422
7445
|
return /* @__PURE__ */ A("div", { style: { position: "relative" }, children: [
|
|
7423
7446
|
t > 0 && /* @__PURE__ */ n("div", { style: { position: "absolute", left: -10, top: -10, zIndex: 2 }, children: /* @__PURE__ */ n(
|
|
7424
7447
|
"span",
|
|
@@ -7445,7 +7468,7 @@ function Vo(e) {
|
|
|
7445
7468
|
)
|
|
7446
7469
|
] });
|
|
7447
7470
|
}
|
|
7448
|
-
function
|
|
7471
|
+
function Dc({ refreshGraph: e }) {
|
|
7449
7472
|
const { t } = H(he), {
|
|
7450
7473
|
availableViews: r,
|
|
7451
7474
|
currentView: o,
|
|
@@ -7462,7 +7485,7 @@ function Ac({ refreshGraph: e }) {
|
|
|
7462
7485
|
Vo,
|
|
7463
7486
|
{
|
|
7464
7487
|
icon: /* @__PURE__ */ n(
|
|
7465
|
-
|
|
7488
|
+
Zr,
|
|
7466
7489
|
{
|
|
7467
7490
|
style: { color: a ? "white" : void 0 }
|
|
7468
7491
|
}
|
|
@@ -7489,7 +7512,7 @@ function Ac({ refreshGraph: e }) {
|
|
|
7489
7512
|
}
|
|
7490
7513
|
),
|
|
7491
7514
|
/* @__PURE__ */ n(
|
|
7492
|
-
|
|
7515
|
+
er,
|
|
7493
7516
|
{
|
|
7494
7517
|
currentView: o,
|
|
7495
7518
|
availableViews: r,
|
|
@@ -7502,7 +7525,7 @@ function Ac({ refreshGraph: e }) {
|
|
|
7502
7525
|
)
|
|
7503
7526
|
] });
|
|
7504
7527
|
}
|
|
7505
|
-
const { useToken:
|
|
7528
|
+
const { useToken: kc } = Pe, { Title: Ec, Text: tn } = Gt;
|
|
7506
7529
|
function yn(e) {
|
|
7507
7530
|
const { title: t, children: r } = e, {
|
|
7508
7531
|
title: o,
|
|
@@ -7512,7 +7535,7 @@ function yn(e) {
|
|
|
7512
7535
|
results: l,
|
|
7513
7536
|
totalItems: d,
|
|
7514
7537
|
selectedRowItems: u
|
|
7515
|
-
} = H(st), { t: c } = H(he), { token: f } =
|
|
7538
|
+
} = H(st), { t: c } = H(he), { token: f } = kc();
|
|
7516
7539
|
function m() {
|
|
7517
7540
|
if ((i == null ? void 0 : i.type) === "form")
|
|
7518
7541
|
return s ? d === 0 ? /* @__PURE__ */ A(Z, { children: [
|
|
@@ -7520,7 +7543,7 @@ function yn(e) {
|
|
|
7520
7543
|
" (id:",
|
|
7521
7544
|
" ",
|
|
7522
7545
|
/* @__PURE__ */ n(
|
|
7523
|
-
|
|
7546
|
+
tn,
|
|
7524
7547
|
{
|
|
7525
7548
|
copyable: { icon: /* @__PURE__ */ n(qn, { style: { color: "red" } }) },
|
|
7526
7549
|
children: s
|
|
@@ -7542,7 +7565,7 @@ function yn(e) {
|
|
|
7542
7565
|
c("editingDocument"),
|
|
7543
7566
|
" (id:",
|
|
7544
7567
|
" ",
|
|
7545
|
-
/* @__PURE__ */ n(
|
|
7568
|
+
/* @__PURE__ */ n(tn, { copyable: !0, children: s }),
|
|
7546
7569
|
")"
|
|
7547
7570
|
] }) : "";
|
|
7548
7571
|
if ((i == null ? void 0 : i.type) === "tree" && u) {
|
|
@@ -7552,7 +7575,7 @@ function yn(e) {
|
|
|
7552
7575
|
c("selectedRegisters"),
|
|
7553
7576
|
" - (id:",
|
|
7554
7577
|
" ",
|
|
7555
|
-
/* @__PURE__ */ n(
|
|
7578
|
+
/* @__PURE__ */ n(tn, { copyable: !0, children: u[0].id }),
|
|
7556
7579
|
")"
|
|
7557
7580
|
] });
|
|
7558
7581
|
if (u.length > 1)
|
|
@@ -7561,7 +7584,7 @@ function yn(e) {
|
|
|
7561
7584
|
" ",
|
|
7562
7585
|
c("selectedRegisters"),
|
|
7563
7586
|
/* @__PURE__ */ n(
|
|
7564
|
-
|
|
7587
|
+
tn,
|
|
7565
7588
|
{
|
|
7566
7589
|
copyable: {
|
|
7567
7590
|
text: u.map((p) => p.id).join(", ")
|
|
@@ -7585,7 +7608,7 @@ function yn(e) {
|
|
|
7585
7608
|
align: "middle",
|
|
7586
7609
|
children: [
|
|
7587
7610
|
/* @__PURE__ */ A(ae, { flex: 2, children: [
|
|
7588
|
-
/* @__PURE__ */ n(
|
|
7611
|
+
/* @__PURE__ */ n(Ec, { level: 3, style: { marginBottom: 0 }, children: t || o }),
|
|
7589
7612
|
m()
|
|
7590
7613
|
] }),
|
|
7591
7614
|
/* @__PURE__ */ n(ae, { flex: 3, children: /* @__PURE__ */ n(be, { justify: "end", children: r }) })
|
|
@@ -7595,7 +7618,7 @@ function yn(e) {
|
|
|
7595
7618
|
/* @__PURE__ */ n("div", { className: "pb-5" })
|
|
7596
7619
|
] });
|
|
7597
7620
|
}
|
|
7598
|
-
const
|
|
7621
|
+
const Mc = (e) => {
|
|
7599
7622
|
const { viewData: t, visible: r, model: o, context: i, domain: s, formView: a, treeView: l } = e, d = de(), u = H(
|
|
7600
7623
|
st
|
|
7601
7624
|
), {
|
|
@@ -7619,10 +7642,10 @@ const Ec = (e) => {
|
|
|
7619
7642
|
setSearchValues: C,
|
|
7620
7643
|
currentView: D
|
|
7621
7644
|
} = u || {}, [P, L] = w(!0);
|
|
7622
|
-
|
|
7645
|
+
fe(() => {
|
|
7623
7646
|
var G;
|
|
7624
7647
|
(G = d.current) == null || G.refresh();
|
|
7625
|
-
}, [S]),
|
|
7648
|
+
}, [S]), fe(() => {
|
|
7626
7649
|
t.view_id !== D.view_id && L(!0);
|
|
7627
7650
|
}, [D]);
|
|
7628
7651
|
const { clear: j, searchFilterLoading: M, searchError: $, offset: K, tableRefreshing: V } = mo({
|
|
@@ -7650,7 +7673,7 @@ const Ec = (e) => {
|
|
|
7650
7673
|
});
|
|
7651
7674
|
return !r || !t ? null : /* @__PURE__ */ A(Z, { children: [
|
|
7652
7675
|
/* @__PURE__ */ n(yn, { title: t.name, children: /* @__PURE__ */ n(
|
|
7653
|
-
|
|
7676
|
+
Dc,
|
|
7654
7677
|
{
|
|
7655
7678
|
refreshGraph: () => {
|
|
7656
7679
|
d.current.refresh();
|
|
@@ -7661,7 +7684,7 @@ const Ec = (e) => {
|
|
|
7661
7684
|
po,
|
|
7662
7685
|
{
|
|
7663
7686
|
fields: { ...l.fields, ...a.fields },
|
|
7664
|
-
searchFields:
|
|
7687
|
+
searchFields: co([
|
|
7665
7688
|
a.search_fields,
|
|
7666
7689
|
l.search_fields
|
|
7667
7690
|
]),
|
|
@@ -7685,13 +7708,13 @@ const Ec = (e) => {
|
|
|
7685
7708
|
view_id: t.view_id,
|
|
7686
7709
|
model: o,
|
|
7687
7710
|
context: i,
|
|
7688
|
-
domain:
|
|
7711
|
+
domain: jt(S || [], s),
|
|
7689
7712
|
limit: P ? k : void 0,
|
|
7690
7713
|
manualIds: P ? p == null ? void 0 : p.map((G) => G.id) : void 0
|
|
7691
7714
|
}
|
|
7692
7715
|
)
|
|
7693
7716
|
] });
|
|
7694
|
-
},
|
|
7717
|
+
}, Nc = (e) => {
|
|
7695
7718
|
const {
|
|
7696
7719
|
visible: t,
|
|
7697
7720
|
formRef: r,
|
|
@@ -7707,9 +7730,9 @@ const Ec = (e) => {
|
|
|
7707
7730
|
setCurrentItemIndex: m
|
|
7708
7731
|
} = e;
|
|
7709
7732
|
return t ? /* @__PURE__ */ A(Z, { children: [
|
|
7710
|
-
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
7733
|
+
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(Fc, { toolbar: a == null ? void 0 : a.toolbar }) }),
|
|
7711
7734
|
/* @__PURE__ */ n(
|
|
7712
|
-
|
|
7735
|
+
Xt,
|
|
7713
7736
|
{
|
|
7714
7737
|
rootForm: !0,
|
|
7715
7738
|
ref: r,
|
|
@@ -7727,12 +7750,12 @@ const Ec = (e) => {
|
|
|
7727
7750
|
)
|
|
7728
7751
|
] }) : null;
|
|
7729
7752
|
};
|
|
7730
|
-
function
|
|
7753
|
+
function Pc(e) {
|
|
7731
7754
|
const { onSearch: t, disabled: r = !1, searchText: o } = e, { t: i } = H(he), [s] = lt.useForm(), [a, l] = w(!1);
|
|
7732
7755
|
function d(c) {
|
|
7733
7756
|
t(c.search);
|
|
7734
7757
|
}
|
|
7735
|
-
|
|
7758
|
+
fe(() => {
|
|
7736
7759
|
s.setFieldsValue({ search: o });
|
|
7737
7760
|
}, [o]);
|
|
7738
7761
|
function u() {
|
|
@@ -7768,15 +7791,15 @@ function Nc(e) {
|
|
|
7768
7791
|
) })
|
|
7769
7792
|
] }) });
|
|
7770
7793
|
}
|
|
7771
|
-
const
|
|
7794
|
+
const Lc = et.createContext({
|
|
7772
7795
|
erpFeatures: {}
|
|
7773
7796
|
});
|
|
7774
7797
|
var Ao = /* @__PURE__ */ ((e) => (e.FEATURE_ADVANCED_EXPORT = "export_data2", e))(Ao || {});
|
|
7775
|
-
const
|
|
7776
|
-
const { erpFeatures: t } =
|
|
7798
|
+
const $c = () => H(Lc), Bc = (e) => {
|
|
7799
|
+
const { erpFeatures: t } = $c();
|
|
7777
7800
|
return !!t[e];
|
|
7778
7801
|
};
|
|
7779
|
-
function
|
|
7802
|
+
function Hc(e) {
|
|
7780
7803
|
var le;
|
|
7781
7804
|
const {
|
|
7782
7805
|
availableViews: t,
|
|
@@ -7802,13 +7825,13 @@ function Bc(e) {
|
|
|
7802
7825
|
results: _,
|
|
7803
7826
|
limit: O,
|
|
7804
7827
|
totalItems: k
|
|
7805
|
-
} = H(st), { parentContext: x = {}, treeExpandable: S, toolbar: I } = e, C =
|
|
7828
|
+
} = H(st), { parentContext: x = {}, treeExpandable: S, toolbar: I } = e, C = Bc(
|
|
7806
7829
|
Ao.FEATURE_ADVANCED_EXPORT
|
|
7807
7830
|
), { t: D, lang: P } = H(he), L = H(
|
|
7808
7831
|
Pt
|
|
7809
7832
|
), { processAction: j } = L || {}, [M, $] = w(!1), K = v !== void 0 && v.trim().length > 0;
|
|
7810
7833
|
function V() {
|
|
7811
|
-
|
|
7834
|
+
zt({
|
|
7812
7835
|
confirmMessage: D("confirmRemove"),
|
|
7813
7836
|
lang: P,
|
|
7814
7837
|
onOk: () => {
|
|
@@ -7873,7 +7896,7 @@ function Bc(e) {
|
|
|
7873
7896
|
] }),
|
|
7874
7897
|
S ? null : /* @__PURE__ */ A(Z, { children: [
|
|
7875
7898
|
/* @__PURE__ */ n(
|
|
7876
|
-
|
|
7899
|
+
Pc,
|
|
7877
7900
|
{
|
|
7878
7901
|
disabled: l || a || T,
|
|
7879
7902
|
searchText: v,
|
|
@@ -7886,7 +7909,7 @@ function Bc(e) {
|
|
|
7886
7909
|
Vo,
|
|
7887
7910
|
{
|
|
7888
7911
|
icon: /* @__PURE__ */ n(
|
|
7889
|
-
|
|
7912
|
+
Zr,
|
|
7890
7913
|
{
|
|
7891
7914
|
style: { color: h ? "white" : void 0 }
|
|
7892
7915
|
}
|
|
@@ -7927,7 +7950,7 @@ function Bc(e) {
|
|
|
7927
7950
|
/* @__PURE__ */ n(
|
|
7928
7951
|
Xe,
|
|
7929
7952
|
{
|
|
7930
|
-
icon: /* @__PURE__ */ n(
|
|
7953
|
+
icon: /* @__PURE__ */ n(Jr, {}),
|
|
7931
7954
|
tooltip: D("showLogs"),
|
|
7932
7955
|
disabled: !(i && (i == null ? void 0 : i.length) > 0) || T,
|
|
7933
7956
|
loading: !1,
|
|
@@ -7952,7 +7975,7 @@ function Bc(e) {
|
|
|
7952
7975
|
!S && /* @__PURE__ */ A(Z, { children: [
|
|
7953
7976
|
yt(),
|
|
7954
7977
|
/* @__PURE__ */ n(
|
|
7955
|
-
|
|
7978
|
+
er,
|
|
7956
7979
|
{
|
|
7957
7980
|
currentView: r,
|
|
7958
7981
|
availableViews: t,
|
|
@@ -8001,7 +8024,7 @@ function Bc(e) {
|
|
|
8001
8024
|
Vt,
|
|
8002
8025
|
{
|
|
8003
8026
|
icon: /* @__PURE__ */ n(
|
|
8004
|
-
|
|
8027
|
+
Br,
|
|
8005
8028
|
{
|
|
8006
8029
|
component: () => /* @__PURE__ */ A(
|
|
8007
8030
|
"svg",
|
|
@@ -8058,13 +8081,13 @@ function Bc(e) {
|
|
|
8058
8081
|
}
|
|
8059
8082
|
),
|
|
8060
8083
|
/* @__PURE__ */ n(
|
|
8061
|
-
|
|
8084
|
+
dc,
|
|
8062
8085
|
{
|
|
8063
8086
|
visible: M,
|
|
8064
8087
|
locale: P,
|
|
8065
8088
|
onClose: () => $(!1),
|
|
8066
8089
|
model: u,
|
|
8067
|
-
domain:
|
|
8090
|
+
domain: jt(
|
|
8068
8091
|
((le = c == null ? void 0 : c.current) == null ? void 0 : le.getDomain()) || [],
|
|
8069
8092
|
p || []
|
|
8070
8093
|
),
|
|
@@ -8081,7 +8104,7 @@ function Bc(e) {
|
|
|
8081
8104
|
function yt() {
|
|
8082
8105
|
return /* @__PURE__ */ n("div", { className: "inline-block w-2" });
|
|
8083
8106
|
}
|
|
8084
|
-
const
|
|
8107
|
+
const Kc = (e) => {
|
|
8085
8108
|
const {
|
|
8086
8109
|
visible: t,
|
|
8087
8110
|
searchTreeRef: r,
|
|
@@ -8101,7 +8124,7 @@ const Hc = (e) => {
|
|
|
8101
8124
|
);
|
|
8102
8125
|
return t ? /* @__PURE__ */ A(Z, { children: [
|
|
8103
8126
|
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
8104
|
-
|
|
8127
|
+
Hc,
|
|
8105
8128
|
{
|
|
8106
8129
|
toolbar: a == null ? void 0 : a.toolbar,
|
|
8107
8130
|
parentContext: i,
|
|
@@ -8132,10 +8155,10 @@ const Hc = (e) => {
|
|
|
8132
8155
|
}
|
|
8133
8156
|
)
|
|
8134
8157
|
] }) : null;
|
|
8135
|
-
},
|
|
8158
|
+
}, tr = et.createContext(null), Wc = (e) => {
|
|
8136
8159
|
const [t, r] = w(!1), [o, i] = w(!1), { children: s, dashboardRef: a, openAction: l } = e;
|
|
8137
8160
|
return /* @__PURE__ */ n(
|
|
8138
|
-
|
|
8161
|
+
tr.Provider,
|
|
8139
8162
|
{
|
|
8140
8163
|
value: {
|
|
8141
8164
|
isLoading: t,
|
|
@@ -8149,8 +8172,8 @@ const Hc = (e) => {
|
|
|
8149
8172
|
}
|
|
8150
8173
|
);
|
|
8151
8174
|
};
|
|
8152
|
-
function
|
|
8153
|
-
const { isLoading: e, dashboardRef: t, moveItemsEnabled: r, setMoveItemsEnabled: o } = H(
|
|
8175
|
+
function jc() {
|
|
8176
|
+
const { isLoading: e, dashboardRef: t, moveItemsEnabled: r, setMoveItemsEnabled: o } = H(tr), { t: i } = H(he);
|
|
8154
8177
|
return /* @__PURE__ */ A(je, { wrap: !0, children: [
|
|
8155
8178
|
/* @__PURE__ */ n(
|
|
8156
8179
|
Xe,
|
|
@@ -8170,7 +8193,7 @@ function Wc() {
|
|
|
8170
8193
|
}
|
|
8171
8194
|
}
|
|
8172
8195
|
),
|
|
8173
|
-
|
|
8196
|
+
Yc(),
|
|
8174
8197
|
/* @__PURE__ */ n(
|
|
8175
8198
|
Xe,
|
|
8176
8199
|
{
|
|
@@ -8197,24 +8220,24 @@ function Wc() {
|
|
|
8197
8220
|
)
|
|
8198
8221
|
] });
|
|
8199
8222
|
}
|
|
8200
|
-
function
|
|
8223
|
+
function Yc() {
|
|
8201
8224
|
return /* @__PURE__ */ n("div", { className: "inline-block w-2" });
|
|
8202
8225
|
}
|
|
8203
|
-
const
|
|
8226
|
+
const Gc = (e) => {
|
|
8204
8227
|
const { dashboardData: t, visible: r } = e, o = de(), i = H(
|
|
8205
8228
|
dt
|
|
8206
8229
|
), { openShortcut: s } = i || {};
|
|
8207
8230
|
return !t || !r ? null : /* @__PURE__ */ A(
|
|
8208
|
-
|
|
8231
|
+
Wc,
|
|
8209
8232
|
{
|
|
8210
8233
|
dashboardRef: o,
|
|
8211
8234
|
openAction: (a) => {
|
|
8212
8235
|
s(a);
|
|
8213
8236
|
},
|
|
8214
8237
|
children: [
|
|
8215
|
-
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
8238
|
+
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(jc, {}) }),
|
|
8216
8239
|
/* @__PURE__ */ n(
|
|
8217
|
-
|
|
8240
|
+
id,
|
|
8218
8241
|
{
|
|
8219
8242
|
ref: o,
|
|
8220
8243
|
model: t.model,
|
|
@@ -8227,7 +8250,7 @@ const Yc = (e) => {
|
|
|
8227
8250
|
}
|
|
8228
8251
|
);
|
|
8229
8252
|
};
|
|
8230
|
-
async function
|
|
8253
|
+
async function Uc(e) {
|
|
8231
8254
|
const t = await Promise.all(
|
|
8232
8255
|
e.map(async (o) => {
|
|
8233
8256
|
try {
|
|
@@ -8242,7 +8265,7 @@ async function Gc(e) {
|
|
|
8242
8265
|
info: t[i]
|
|
8243
8266
|
})).filter((o) => o.info !== null);
|
|
8244
8267
|
}
|
|
8245
|
-
function
|
|
8268
|
+
function qc(e, t) {
|
|
8246
8269
|
const {
|
|
8247
8270
|
domain: r,
|
|
8248
8271
|
model: o,
|
|
@@ -8304,7 +8327,7 @@ function Uc(e, t) {
|
|
|
8304
8327
|
viewTuple: oe
|
|
8305
8328
|
});
|
|
8306
8329
|
}
|
|
8307
|
-
const Ve = await
|
|
8330
|
+
const Ve = await Uc(ve);
|
|
8308
8331
|
for (const oe of Ve) {
|
|
8309
8332
|
if (!oe)
|
|
8310
8333
|
continue;
|
|
@@ -8367,10 +8390,10 @@ function Uc(e, t) {
|
|
|
8367
8390
|
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
8368
8391
|
), ke == null || ke(d)), Ue($e), b(q), O(!1);
|
|
8369
8392
|
};
|
|
8370
|
-
l({ tabKey: d, canWeClose: re }),
|
|
8393
|
+
l({ tabKey: d, canWeClose: re }), fe(() => {
|
|
8371
8394
|
const q = F.find((Ve) => Ve.type === "tree"), ve = F.find((Ve) => u.id ? Ve.type === u.type && Ve.view_id === u.id : Ve.type === u.type);
|
|
8372
8395
|
Ue(ve || q), m ? U == null || U(k) : (Le(void 0), P(void 0)), xe();
|
|
8373
|
-
}, [o, s, m]),
|
|
8396
|
+
}, [o, s, m]), fe(() => {
|
|
8374
8397
|
we === d && (U == null || U(x), X == null || X(v));
|
|
8375
8398
|
}, [Ce, we]);
|
|
8376
8399
|
async function re() {
|
|
@@ -8424,7 +8447,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8424
8447
|
switch (q.type) {
|
|
8425
8448
|
case "form":
|
|
8426
8449
|
return /* @__PURE__ */ n(
|
|
8427
|
-
|
|
8450
|
+
Nc,
|
|
8428
8451
|
{
|
|
8429
8452
|
formRef: ee,
|
|
8430
8453
|
currentId: x,
|
|
@@ -8443,7 +8466,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8443
8466
|
);
|
|
8444
8467
|
case "tree":
|
|
8445
8468
|
return /* @__PURE__ */ n(
|
|
8446
|
-
|
|
8469
|
+
Kc,
|
|
8447
8470
|
{
|
|
8448
8471
|
visible: v.type === q.type && v.view_id === q.view_id,
|
|
8449
8472
|
limit: y,
|
|
@@ -8464,7 +8487,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8464
8487
|
);
|
|
8465
8488
|
case "graph":
|
|
8466
8489
|
return /* @__PURE__ */ n(
|
|
8467
|
-
|
|
8490
|
+
Mc,
|
|
8468
8491
|
{
|
|
8469
8492
|
visible: v.type === q.type && v.view_id === q.view_id,
|
|
8470
8493
|
viewData: q,
|
|
@@ -8478,7 +8501,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8478
8501
|
);
|
|
8479
8502
|
case "dashboard":
|
|
8480
8503
|
return /* @__PURE__ */ n(
|
|
8481
|
-
|
|
8504
|
+
Gc,
|
|
8482
8505
|
{
|
|
8483
8506
|
dashboardData: q,
|
|
8484
8507
|
visible: v.type === q.type && v.view_id === q.view_id
|
|
@@ -8529,7 +8552,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8529
8552
|
children: [
|
|
8530
8553
|
Me(),
|
|
8531
8554
|
/* @__PURE__ */ n(
|
|
8532
|
-
|
|
8555
|
+
Vc,
|
|
8533
8556
|
{
|
|
8534
8557
|
visible: G,
|
|
8535
8558
|
onIdSubmitted: ye,
|
|
@@ -8543,8 +8566,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8543
8566
|
}
|
|
8544
8567
|
) : null;
|
|
8545
8568
|
}
|
|
8546
|
-
const Do = wt(
|
|
8547
|
-
async function
|
|
8569
|
+
const Do = wt(qc);
|
|
8570
|
+
async function zc({
|
|
8548
8571
|
actionId: e,
|
|
8549
8572
|
rootContext: t = {},
|
|
8550
8573
|
globalValues: r = {}
|
|
@@ -8586,7 +8609,7 @@ async function qc({
|
|
|
8586
8609
|
title: c,
|
|
8587
8610
|
actionId: e,
|
|
8588
8611
|
actionType: o,
|
|
8589
|
-
key:
|
|
8612
|
+
key: Qr(),
|
|
8590
8613
|
views: u,
|
|
8591
8614
|
model: d,
|
|
8592
8615
|
context: { ...t, ...a },
|
|
@@ -8596,7 +8619,7 @@ async function qc({
|
|
|
8596
8619
|
treeExpandable: p
|
|
8597
8620
|
};
|
|
8598
8621
|
}
|
|
8599
|
-
const
|
|
8622
|
+
const Jc = Xi(Zi), Xc = (e) => {
|
|
8600
8623
|
const { children: t = [], onPositionItemsChanged: r } = e, o = et.Children.map(
|
|
8601
8624
|
t,
|
|
8602
8625
|
(i) => {
|
|
@@ -8605,7 +8628,7 @@ const zc = Xi(Zi), Jc = (e) => {
|
|
|
8605
8628
|
}
|
|
8606
8629
|
);
|
|
8607
8630
|
return /* @__PURE__ */ n(
|
|
8608
|
-
|
|
8631
|
+
Jc,
|
|
8609
8632
|
{
|
|
8610
8633
|
className: "layout",
|
|
8611
8634
|
cols: { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 },
|
|
@@ -8625,8 +8648,8 @@ const zc = Xi(Zi), Jc = (e) => {
|
|
|
8625
8648
|
children: o
|
|
8626
8649
|
}
|
|
8627
8650
|
);
|
|
8628
|
-
}, { useToken:
|
|
8629
|
-
const { title: t, children: r, action: o, openAction: i } = e, { token: s } =
|
|
8651
|
+
}, { useToken: Zc } = Pe, { Text: Qc } = Gt, ed = (e) => {
|
|
8652
|
+
const { title: t, children: r, action: o, openAction: i } = e, { token: s } = Zc();
|
|
8630
8653
|
return /* @__PURE__ */ A(
|
|
8631
8654
|
"div",
|
|
8632
8655
|
{
|
|
@@ -8662,7 +8685,7 @@ const zc = Xi(Zi), Jc = (e) => {
|
|
|
8662
8685
|
cursor: "grab",
|
|
8663
8686
|
overflow: "hidden"
|
|
8664
8687
|
},
|
|
8665
|
-
children: /* @__PURE__ */ n(
|
|
8688
|
+
children: /* @__PURE__ */ n(Qc, { ellipsis: !0, children: t })
|
|
8666
8689
|
}
|
|
8667
8690
|
),
|
|
8668
8691
|
o && /* @__PURE__ */ n(ae, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ n(be, { justify: "end", align: "middle", children: /* @__PURE__ */ n(
|
|
@@ -8681,8 +8704,8 @@ const zc = Xi(Zi), Jc = (e) => {
|
|
|
8681
8704
|
]
|
|
8682
8705
|
}
|
|
8683
8706
|
);
|
|
8684
|
-
},
|
|
8685
|
-
function
|
|
8707
|
+
}, td = 80;
|
|
8708
|
+
function nd(e) {
|
|
8686
8709
|
const {
|
|
8687
8710
|
action: t,
|
|
8688
8711
|
model: r,
|
|
@@ -8691,10 +8714,10 @@ function td(e) {
|
|
|
8691
8714
|
domain: s = [],
|
|
8692
8715
|
visible: a = !0,
|
|
8693
8716
|
parentContext: l = {}
|
|
8694
|
-
} = e, [d, u] = w(!1), [c, f] = w(!1), [m, p] = w(), [h, g] = w(), [y, v] = w(), [T, F] = w(1), [b, _] = w(0), O = de(
|
|
8717
|
+
} = e, [d, u] = w(!1), [c, f] = w(!1), [m, p] = w(), [h, g] = w(), [y, v] = w(), [T, F] = w(1), [b, _] = w(0), O = de(td), k = de([]), [x, S] = w(0), [I, C] = w([]), [D, P] = w(void 0), [L, j] = w(), [M, $] = w(), [K, V] = w(), [G, ne] = w(!1), J = de([]), le = (U) => {
|
|
8695
8718
|
ne(!0), F(U), _((U - 1) * O.current);
|
|
8696
8719
|
}, Y = async () => {
|
|
8697
|
-
const U = J.current.length > 0 ? J.current : s, Ce =
|
|
8720
|
+
const U = J.current.length > 0 ? J.current : s, Ce = jt(k.current, U), { colors: we } = Ot(h), { totalItems: Ye, results: ke, attrsEvaluated: Le } = await E.getHandler().searchForTree({
|
|
8698
8721
|
params: Ce,
|
|
8699
8722
|
limit: O.current,
|
|
8700
8723
|
offset: b,
|
|
@@ -8703,7 +8726,7 @@ function td(e) {
|
|
|
8703
8726
|
context: l,
|
|
8704
8727
|
attrs: we && { colors: we }
|
|
8705
8728
|
});
|
|
8706
|
-
P(
|
|
8729
|
+
P(nn(Le));
|
|
8707
8730
|
const Ue = Rt({
|
|
8708
8731
|
resultsToSort: ke,
|
|
8709
8732
|
sorter: L,
|
|
@@ -8719,7 +8742,7 @@ function td(e) {
|
|
|
8719
8742
|
$(JSON.stringify(U));
|
|
8720
8743
|
}
|
|
8721
8744
|
};
|
|
8722
|
-
|
|
8745
|
+
fe(() => {
|
|
8723
8746
|
c && a && R();
|
|
8724
8747
|
}, [T, b, c, a]);
|
|
8725
8748
|
const N = async (U) => {
|
|
@@ -8753,7 +8776,7 @@ function td(e) {
|
|
|
8753
8776
|
});
|
|
8754
8777
|
g(Ce);
|
|
8755
8778
|
};
|
|
8756
|
-
|
|
8779
|
+
fe(() => {
|
|
8757
8780
|
t ? N("action") : r && N("model");
|
|
8758
8781
|
}, [t, r]);
|
|
8759
8782
|
const Ie = (U) => {
|
|
@@ -8794,9 +8817,9 @@ function td(e) {
|
|
|
8794
8817
|
] });
|
|
8795
8818
|
return K ? /* @__PURE__ */ n(tt, { className: "mt-10", message: K, type: "error", banner: !0 }) : d ? /* @__PURE__ */ n(Ae, { style: { padding: "2rem" } }) : X();
|
|
8796
8819
|
}
|
|
8797
|
-
const
|
|
8820
|
+
const rd = (e) => {
|
|
8798
8821
|
const { model: t } = e, [r, o] = w();
|
|
8799
|
-
|
|
8822
|
+
fe(() => {
|
|
8800
8823
|
i();
|
|
8801
8824
|
}, [t]);
|
|
8802
8825
|
async function i() {
|
|
@@ -8807,15 +8830,15 @@ const nd = (e) => {
|
|
|
8807
8830
|
});
|
|
8808
8831
|
s.length > 0 && o(s[0].id);
|
|
8809
8832
|
}
|
|
8810
|
-
return /* @__PURE__ */ n("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ n(
|
|
8833
|
+
return /* @__PURE__ */ n("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ n(Xt, { ...e, model: t, id: r, readOnly: !0 }) });
|
|
8811
8834
|
}, _n = "line_ids";
|
|
8812
|
-
function
|
|
8835
|
+
function od(e, t) {
|
|
8813
8836
|
const { model: r, context: o = {}, id: i, configAction: s } = e, [a, l] = w([]), [d, u] = w(!1), [c, f] = w(), {
|
|
8814
8837
|
setIsLoading: m,
|
|
8815
8838
|
openAction: p,
|
|
8816
8839
|
moveItemsEnabled: h
|
|
8817
|
-
} = H(
|
|
8818
|
-
|
|
8840
|
+
} = H(tr), g = de(), y = de();
|
|
8841
|
+
fe(() => {
|
|
8819
8842
|
v();
|
|
8820
8843
|
}, [r, i, o]), bt(t, () => ({
|
|
8821
8844
|
refresh: () => {
|
|
@@ -8882,7 +8905,7 @@ function rd(e, t) {
|
|
|
8882
8905
|
for (const I of x) {
|
|
8883
8906
|
const { values: C } = I;
|
|
8884
8907
|
if (C.action_id && C.action_id.length > 0) {
|
|
8885
|
-
const D = parseInt(C.action_id[0], 10), P = await
|
|
8908
|
+
const D = parseInt(C.action_id[0], 10), P = await zc({
|
|
8886
8909
|
actionId: D,
|
|
8887
8910
|
rootContext: o
|
|
8888
8911
|
});
|
|
@@ -8937,7 +8960,7 @@ function rd(e, t) {
|
|
|
8937
8960
|
async function k() {
|
|
8938
8961
|
p(s);
|
|
8939
8962
|
}
|
|
8940
|
-
return c ? (console.log(c), /* @__PURE__ */ n(tt, { className: "mt-10 mb-20", message: c, type: "error", banner: !0 })) : d ? /* @__PURE__ */ n(at, {}) : /* @__PURE__ */ n(
|
|
8963
|
+
return c ? (console.log(c), /* @__PURE__ */ n(tt, { className: "mt-10 mb-20", message: c, type: "error", banner: !0 })) : d ? /* @__PURE__ */ n(at, {}) : /* @__PURE__ */ n(Xc, { onPositionItemsChanged: O, children: a.map((x, S) => {
|
|
8941
8964
|
const { actionData: I, values: C } = x, { position: D, id: P } = C, {
|
|
8942
8965
|
actionId: L,
|
|
8943
8966
|
actionType: j,
|
|
@@ -8971,10 +8994,10 @@ function rd(e, t) {
|
|
|
8971
8994
|
}
|
|
8972
8995
|
);
|
|
8973
8996
|
else if ((J == null ? void 0 : J.type) === "form")
|
|
8974
|
-
R = /* @__PURE__ */ n(
|
|
8997
|
+
R = /* @__PURE__ */ n(rd, { model: V, actionDomain: ne });
|
|
8975
8998
|
else if ((J == null ? void 0 : J.type) === "tree")
|
|
8976
8999
|
R = /* @__PURE__ */ n(
|
|
8977
|
-
|
|
9000
|
+
nd,
|
|
8978
9001
|
{
|
|
8979
9002
|
model: V,
|
|
8980
9003
|
domain: ne,
|
|
@@ -9049,7 +9072,7 @@ function rd(e, t) {
|
|
|
9049
9072
|
};
|
|
9050
9073
|
}
|
|
9051
9074
|
return /* @__PURE__ */ n(
|
|
9052
|
-
|
|
9075
|
+
ed,
|
|
9053
9076
|
{
|
|
9054
9077
|
id: P,
|
|
9055
9078
|
title: $,
|
|
@@ -9062,10 +9085,10 @@ function rd(e, t) {
|
|
|
9062
9085
|
);
|
|
9063
9086
|
}) });
|
|
9064
9087
|
}
|
|
9065
|
-
const
|
|
9088
|
+
const id = wt(od), sd = (e) => {
|
|
9066
9089
|
const { ooui: t } = e;
|
|
9067
|
-
return /* @__PURE__ */ n(ge, { type: "array", ...e, children: /* @__PURE__ */ n(
|
|
9068
|
-
},
|
|
9090
|
+
return /* @__PURE__ */ n(ge, { type: "array", ...e, children: /* @__PURE__ */ n(ad, { ooui: t }) });
|
|
9091
|
+
}, ad = (e) => {
|
|
9069
9092
|
const { value: t, ooui: r, onChange: o } = e, { items: i = [] } = t || {}, s = i.filter((x) => x.operation !== "pendingRemove").map((x) => x.id), [a, l] = w([]), [d, u] = w(), [c, f] = w(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = r, v = H(Ne), { getContext: T } = v || {};
|
|
9070
9093
|
xt(() => {
|
|
9071
9094
|
b();
|
|
@@ -9146,7 +9169,7 @@ const od = wt(rd), id = (e) => {
|
|
|
9146
9169
|
/* @__PURE__ */ n(_e, { onClick: O, disabled: s.length === 0, children: "Uncheck all" })
|
|
9147
9170
|
] })
|
|
9148
9171
|
] }) });
|
|
9149
|
-
},
|
|
9172
|
+
}, ld = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(cd, { ...e }) }), cd = (e) => {
|
|
9150
9173
|
const { value: t, ooui: r } = e;
|
|
9151
9174
|
return /* @__PURE__ */ n(
|
|
9152
9175
|
"div",
|
|
@@ -9165,35 +9188,35 @@ const od = wt(rd), id = (e) => {
|
|
|
9165
9188
|
)
|
|
9166
9189
|
}
|
|
9167
9190
|
);
|
|
9168
|
-
}, cd = (e) => {
|
|
9169
|
-
const { ooui: t } = e, { required: r } = t;
|
|
9170
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...e, children: /* @__PURE__ */ n(dd, { ...e }) });
|
|
9171
9191
|
}, dd = (e) => {
|
|
9192
|
+
const { ooui: t } = e, { required: r } = t;
|
|
9193
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...e, children: /* @__PURE__ */ n(ud, { ...e }) });
|
|
9194
|
+
}, ud = (e) => {
|
|
9172
9195
|
const { ooui: t, onChange: r, value: o } = e, { selectionValues: i, readOnly: s, direction: a } = t, l = Array.from(i.entries()), d = l && l.length && l.map((u) => {
|
|
9173
9196
|
const [c, f] = u;
|
|
9174
|
-
return /* @__PURE__ */ n(
|
|
9197
|
+
return /* @__PURE__ */ n(ar, { value: c, children: f }, c);
|
|
9175
9198
|
});
|
|
9176
|
-
return /* @__PURE__ */ n(
|
|
9177
|
-
}, ud = (e) => {
|
|
9178
|
-
const { ooui: t } = e, { id: r, readOnly: o, required: i } = t;
|
|
9179
|
-
return /* @__PURE__ */ n(ge, { ...e, valuePropName: "checked", children: /* @__PURE__ */ n(fd, { id: r, readOnly: o, required: i }) });
|
|
9199
|
+
return /* @__PURE__ */ n(ar.Group, { disabled: s, onChange: r, value: o, children: /* @__PURE__ */ n(je, { direction: a, children: d }) });
|
|
9180
9200
|
}, fd = (e) => {
|
|
9201
|
+
const { ooui: t } = e, { id: r, readOnly: o, required: i } = t;
|
|
9202
|
+
return /* @__PURE__ */ n(ge, { ...e, valuePropName: "checked", children: /* @__PURE__ */ n(md, { id: r, readOnly: o, required: i }) });
|
|
9203
|
+
}, md = (e) => {
|
|
9181
9204
|
const { required: t, readOnly: r, ...o } = e;
|
|
9182
9205
|
return /* @__PURE__ */ n("div", { className: "flex flex-row", children: /* @__PURE__ */ n(ni, { disabled: r, ...o }) });
|
|
9183
|
-
}, md = (e) => {
|
|
9184
|
-
const { ooui: t } = e, { required: r } = t;
|
|
9185
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...e, children: /* @__PURE__ */ n(hd, { ...e }) });
|
|
9186
9206
|
}, hd = (e) => {
|
|
9207
|
+
const { ooui: t } = e, { required: r } = t;
|
|
9208
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...e, children: /* @__PURE__ */ n(pd, { ...e }) });
|
|
9209
|
+
}, pd = (e) => {
|
|
9187
9210
|
const { ooui: t, value: r } = e, { selectionValues: o, errorField: i } = t, s = H(Ne), a = Array.from(o.entries()), l = a.map((c) => c[0]).indexOf(r);
|
|
9188
9211
|
let d = "process", u = "";
|
|
9189
|
-
return i && (u = s.getFieldValue(i), u && (d = "error")), /* @__PURE__ */ n(
|
|
9190
|
-
|
|
9212
|
+
return i && (u = s.getFieldValue(i), u && (d = "error")), /* @__PURE__ */ n(lr, { current: l, status: d, children: a.map((c, f) => /* @__PURE__ */ n(
|
|
9213
|
+
lr.Step,
|
|
9191
9214
|
{
|
|
9192
9215
|
title: c[1],
|
|
9193
9216
|
description: f === l && d === "error" ? u : null
|
|
9194
9217
|
}
|
|
9195
9218
|
)) });
|
|
9196
|
-
},
|
|
9219
|
+
}, gd = (e) => {
|
|
9197
9220
|
const { ooui: t } = e, { lang: r, height: o } = t, i = H(Ne), { elementHasLostFocus: s } = i || {};
|
|
9198
9221
|
return /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(
|
|
9199
9222
|
zi,
|
|
@@ -9205,13 +9228,13 @@ const od = wt(rd), id = (e) => {
|
|
|
9205
9228
|
}
|
|
9206
9229
|
}
|
|
9207
9230
|
) });
|
|
9208
|
-
}, { Meta:
|
|
9231
|
+
}, { Meta: yd } = Nn, { Text: vd } = Gt, wd = ({ email: e, size: t = 40, theme: r = "" }) => {
|
|
9209
9232
|
const o = `https://www.gravatar.com/avatar/${Ji(
|
|
9210
9233
|
e
|
|
9211
9234
|
)}?s=${t}&d=${r}`;
|
|
9212
|
-
return /* @__PURE__ */ n(
|
|
9235
|
+
return /* @__PURE__ */ n(kr, { src: o, size: t });
|
|
9213
9236
|
};
|
|
9214
|
-
function
|
|
9237
|
+
function bd({ text: e }) {
|
|
9215
9238
|
const t = e.split(`
|
|
9216
9239
|
`);
|
|
9217
9240
|
return /* @__PURE__ */ n("div", { children: t.map((r, o) => /* @__PURE__ */ A(Jo, { children: [
|
|
@@ -9219,24 +9242,24 @@ function wd({ text: e }) {
|
|
|
9219
9242
|
o !== t.length - 1 && /* @__PURE__ */ n("br", {})
|
|
9220
9243
|
] }, o)) });
|
|
9221
9244
|
}
|
|
9222
|
-
const
|
|
9245
|
+
const Cd = (e) => {
|
|
9223
9246
|
const { data: t, style: r } = e, { t: o } = H(he);
|
|
9224
9247
|
return /* @__PURE__ */ A(Nn, { style: { ...r, textAlign: "start" }, children: [
|
|
9225
9248
|
/* @__PURE__ */ n(
|
|
9226
|
-
|
|
9249
|
+
yd,
|
|
9227
9250
|
{
|
|
9228
|
-
avatar: /* @__PURE__ */ n(
|
|
9251
|
+
avatar: /* @__PURE__ */ n(wd, { email: t.email, theme: "mp" }),
|
|
9229
9252
|
title: t.author,
|
|
9230
9253
|
description: /* @__PURE__ */ A(je, { direction: "horizontal", children: [
|
|
9231
9254
|
/* @__PURE__ */ n("span", { title: t.date, children: nt(t.date).fromNow() }),
|
|
9232
|
-
t.isAuthor && /* @__PURE__ */ n(
|
|
9255
|
+
t.isAuthor && /* @__PURE__ */ n(Vr, { color: "blue", children: o("author") })
|
|
9233
9256
|
] }),
|
|
9234
9257
|
style: { marginBottom: "5px" }
|
|
9235
9258
|
}
|
|
9236
9259
|
),
|
|
9237
|
-
/* @__PURE__ */ n(
|
|
9260
|
+
/* @__PURE__ */ n(vd, { children: /* @__PURE__ */ n(bd, { text: t.text }) })
|
|
9238
9261
|
] }, t.id);
|
|
9239
|
-
},
|
|
9262
|
+
}, xd = (e) => {
|
|
9240
9263
|
const { value: t } = e, r = (t || []).map((o) => {
|
|
9241
9264
|
if (o.type === "action")
|
|
9242
9265
|
return {
|
|
@@ -9247,22 +9270,22 @@ const bd = (e) => {
|
|
|
9247
9270
|
color: "gray",
|
|
9248
9271
|
position: o.event.isSender ? "left" : "right",
|
|
9249
9272
|
label: o.event.date,
|
|
9250
|
-
children: /* @__PURE__ */ n(
|
|
9273
|
+
children: /* @__PURE__ */ n(Cd, { data: o.event })
|
|
9251
9274
|
};
|
|
9252
9275
|
});
|
|
9253
9276
|
return /* @__PURE__ */ n(On, { mode: "alternate", items: r });
|
|
9254
|
-
},
|
|
9255
|
-
function
|
|
9277
|
+
}, Sd = (e) => /* @__PURE__ */ n(ge, { ...e, children: /* @__PURE__ */ n(xd, {}) }), { Content: Td } = ri, { Title: Id } = Gt;
|
|
9278
|
+
function Fd() {
|
|
9256
9279
|
const { t: e } = H(he);
|
|
9257
|
-
return /* @__PURE__ */ n(
|
|
9280
|
+
return /* @__PURE__ */ n(Td, { className: "m-5 select-none", children: /* @__PURE__ */ n(Id, { level: 5, children: e("welcome") }) });
|
|
9258
9281
|
}
|
|
9259
|
-
function
|
|
9282
|
+
function _d(e, t) {
|
|
9260
9283
|
const { children: r, globalValues: o = {}, rootContext: i = {}, lang: s } = e, [a, l] = w("welcome"), [d, u] = w([
|
|
9261
9284
|
{
|
|
9262
9285
|
title: Fe("welcome", s),
|
|
9263
9286
|
key: "welcome",
|
|
9264
9287
|
closable: !0,
|
|
9265
|
-
content: /* @__PURE__ */ n(
|
|
9288
|
+
content: /* @__PURE__ */ n(Fd, {})
|
|
9266
9289
|
}
|
|
9267
9290
|
]), c = de(/* @__PURE__ */ new Map()), f = de();
|
|
9268
9291
|
bt(t, () => ({
|
|
@@ -9508,7 +9531,7 @@ function Fd(e, t) {
|
|
|
9508
9531
|
treeExpandable: M = !1,
|
|
9509
9532
|
limit: $
|
|
9510
9533
|
}) {
|
|
9511
|
-
const K =
|
|
9534
|
+
const K = Qr();
|
|
9512
9535
|
if (S !== "current") {
|
|
9513
9536
|
const V = await E.getHandler().getView({
|
|
9514
9537
|
model: O,
|
|
@@ -9589,9 +9612,9 @@ function Fd(e, t) {
|
|
|
9589
9612
|
}
|
|
9590
9613
|
) });
|
|
9591
9614
|
}
|
|
9592
|
-
const
|
|
9593
|
-
function
|
|
9594
|
-
const { label: t, onClose: r, tabKey: o, isActive: i, onSelected: s } = e, { token: a } =
|
|
9615
|
+
const wu = wt(_d), { useToken: Od } = Pe;
|
|
9616
|
+
function Rd(e) {
|
|
9617
|
+
const { label: t, onClose: r, tabKey: o, isActive: i, onSelected: s } = e, { token: a } = Od(), l = i ? a.colorBgContainer : a.colorPrimaryBg;
|
|
9595
9618
|
return /* @__PURE__ */ A(
|
|
9596
9619
|
"div",
|
|
9597
9620
|
{
|
|
@@ -9645,7 +9668,7 @@ function Od(e) {
|
|
|
9645
9668
|
alignItems: "center"
|
|
9646
9669
|
},
|
|
9647
9670
|
children: /* @__PURE__ */ n(
|
|
9648
|
-
|
|
9671
|
+
qt,
|
|
9649
9672
|
{
|
|
9650
9673
|
style: {
|
|
9651
9674
|
color: a.colorPrimaryActive
|
|
@@ -9661,12 +9684,12 @@ function Od(e) {
|
|
|
9661
9684
|
}
|
|
9662
9685
|
);
|
|
9663
9686
|
}
|
|
9664
|
-
function
|
|
9687
|
+
function bu() {
|
|
9665
9688
|
const e = H(
|
|
9666
9689
|
dt
|
|
9667
9690
|
), { activeKey: t, tabs: r, onRemoveTab: o, onChangeTab: i } = e || {};
|
|
9668
9691
|
return /* @__PURE__ */ n(Z, { children: r.map((s) => /* @__PURE__ */ n(
|
|
9669
|
-
|
|
9692
|
+
Rd,
|
|
9670
9693
|
{
|
|
9671
9694
|
tabKey: s.key,
|
|
9672
9695
|
label: s.title,
|
|
@@ -9677,7 +9700,7 @@ function wu() {
|
|
|
9677
9700
|
s.key
|
|
9678
9701
|
)) });
|
|
9679
9702
|
}
|
|
9680
|
-
function
|
|
9703
|
+
function Vd(e) {
|
|
9681
9704
|
const { tab: t } = e, r = H(
|
|
9682
9705
|
dt
|
|
9683
9706
|
), { activeKey: o } = r || {}, i = {
|
|
@@ -9685,20 +9708,20 @@ function Rd(e) {
|
|
|
9685
9708
|
};
|
|
9686
9709
|
return /* @__PURE__ */ n("div", { style: t.key !== o ? i : void 0, children: t.content });
|
|
9687
9710
|
}
|
|
9688
|
-
const
|
|
9689
|
-
function
|
|
9711
|
+
const Ad = et.memo(Vd, () => !0);
|
|
9712
|
+
function Cu() {
|
|
9690
9713
|
const e = H(
|
|
9691
9714
|
dt
|
|
9692
|
-
), { tabs: t } = e || {}, r = (t == null ? void 0 : t.map((o) => /* @__PURE__ */ n(
|
|
9715
|
+
), { tabs: t } = e || {}, r = (t == null ? void 0 : t.map((o) => /* @__PURE__ */ n(Ad, { tab: o }, o.key))) || null;
|
|
9693
9716
|
return /* @__PURE__ */ n(Z, { children: r });
|
|
9694
9717
|
}
|
|
9695
|
-
const { useToken:
|
|
9718
|
+
const { useToken: Dd } = Pe, xu = (e) => {
|
|
9696
9719
|
const {
|
|
9697
9720
|
onRetrieveShortcuts: t,
|
|
9698
9721
|
onCheckIsFavourite: r,
|
|
9699
9722
|
onAddFavourite: o,
|
|
9700
9723
|
onRemoveFavourite: i
|
|
9701
|
-
} = e, [s, a] = w(!1), [l, d] = w(!1), [u, c] = w([]), [f, m] = w(!0), [p, h] = w(), { t: g } = H(he) || {}, { token: y } =
|
|
9724
|
+
} = e, [s, a] = w(!1), [l, d] = w(!1), [u, c] = w([]), [f, m] = w(!0), [p, h] = w(), { t: g } = H(he) || {}, { token: y } = Dd(), v = H(
|
|
9702
9725
|
dt
|
|
9703
9726
|
), {
|
|
9704
9727
|
openShortcut: T,
|
|
@@ -9708,9 +9731,9 @@ const { useToken: Ad } = Pe, Cu = (e) => {
|
|
|
9708
9731
|
currentId: O,
|
|
9709
9732
|
openDefaultActionForModel: k
|
|
9710
9733
|
} = v || {};
|
|
9711
|
-
|
|
9734
|
+
fe(() => {
|
|
9712
9735
|
x();
|
|
9713
|
-
}, []),
|
|
9736
|
+
}, []), fe(() => {
|
|
9714
9737
|
C();
|
|
9715
9738
|
}, [F, b, _, O]);
|
|
9716
9739
|
async function x() {
|
|
@@ -9757,7 +9780,7 @@ const { useToken: Ad } = Pe, Cu = (e) => {
|
|
|
9757
9780
|
/* @__PURE__ */ A("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
9758
9781
|
/* @__PURE__ */ n("div", { style: { paddingLeft: 15, color: "#ccc" }, children: g == null ? void 0 : g("favorites").toUpperCase() }),
|
|
9759
9782
|
/* @__PURE__ */ n("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ n(ht, { title: g == null ? void 0 : g("edit_favorites"), children: /* @__PURE__ */ n(
|
|
9760
|
-
|
|
9783
|
+
Xr,
|
|
9761
9784
|
{
|
|
9762
9785
|
style: { color: y.colorPrimary, cursor: "pointer" },
|
|
9763
9786
|
onClick: D
|
|
@@ -9805,7 +9828,7 @@ const { useToken: Ad } = Pe, Cu = (e) => {
|
|
|
9805
9828
|
_e,
|
|
9806
9829
|
{
|
|
9807
9830
|
type: s ? "primary" : "default",
|
|
9808
|
-
icon: s ? /* @__PURE__ */ n(
|
|
9831
|
+
icon: s ? /* @__PURE__ */ n(jr, { style: { color: "white" } }) : /* @__PURE__ */ n(Yr, {}),
|
|
9809
9832
|
style: {
|
|
9810
9833
|
width: 50,
|
|
9811
9834
|
borderTopRightRadius: 0,
|
|
@@ -9815,7 +9838,7 @@ const { useToken: Ad } = Pe, Cu = (e) => {
|
|
|
9815
9838
|
}
|
|
9816
9839
|
),
|
|
9817
9840
|
/* @__PURE__ */ n(
|
|
9818
|
-
|
|
9841
|
+
Ut,
|
|
9819
9842
|
{
|
|
9820
9843
|
overlay: P,
|
|
9821
9844
|
onVisibleChange: I,
|
|
@@ -9837,61 +9860,61 @@ const { useToken: Ad } = Pe, Cu = (e) => {
|
|
|
9837
9860
|
] });
|
|
9838
9861
|
};
|
|
9839
9862
|
export {
|
|
9840
|
-
|
|
9863
|
+
Fc as ActionBar,
|
|
9841
9864
|
Do as ActionView,
|
|
9842
|
-
|
|
9865
|
+
vc as Binary,
|
|
9843
9866
|
_s as Boolean,
|
|
9844
|
-
|
|
9867
|
+
eo as Button,
|
|
9845
9868
|
fs as ButtonGroup,
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9869
|
+
ro as Char,
|
|
9870
|
+
gd as CodeEditor,
|
|
9871
|
+
Sd as CommentsTimelineField,
|
|
9872
|
+
Lc as ConfigContext,
|
|
9850
9873
|
E as ConnectionProvider,
|
|
9851
9874
|
Ta as ContentRootProvider,
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9875
|
+
Cu as CurrentTabContent,
|
|
9876
|
+
id as Dashboard,
|
|
9877
|
+
Xc as DashboardGrid,
|
|
9878
|
+
ed as DashboardGridItem,
|
|
9879
|
+
uc as Date,
|
|
9880
|
+
fc as DateTime,
|
|
9881
|
+
Rc as Email,
|
|
9882
|
+
dc as ExportModal,
|
|
9883
|
+
xu as FavouriteButton,
|
|
9861
9884
|
ho as Float,
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9885
|
+
ql as FloatTime,
|
|
9886
|
+
Xt as Form,
|
|
9887
|
+
Zt as FormModal,
|
|
9888
|
+
Cl as GraphIndicator,
|
|
9866
9889
|
Io as Group,
|
|
9867
9890
|
As as Image,
|
|
9868
9891
|
rn as Integer,
|
|
9869
9892
|
fn as Label,
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9893
|
+
vl as Many2one,
|
|
9894
|
+
ld as Markdown,
|
|
9895
|
+
sd as MultiCheckbox,
|
|
9896
|
+
Xl as Notebook,
|
|
9897
|
+
Gl as One2many,
|
|
9875
9898
|
Ga as ProgressBar,
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9899
|
+
dd as Radio,
|
|
9900
|
+
pc as Reference,
|
|
9901
|
+
wu as RootView,
|
|
9879
9902
|
po as SearchFilter,
|
|
9880
9903
|
bo as SearchModal,
|
|
9881
9904
|
wo as SearchTree,
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9905
|
+
oo as Selection,
|
|
9906
|
+
tc as Separator,
|
|
9907
|
+
hd as Steps,
|
|
9908
|
+
fd as Switch,
|
|
9909
|
+
Rd as Tab,
|
|
9910
|
+
bu as TabSelector,
|
|
9888
9911
|
Js as Tag,
|
|
9889
9912
|
Xs as Tags,
|
|
9890
|
-
|
|
9891
|
-
|
|
9913
|
+
Ql as Text,
|
|
9914
|
+
mc as Time,
|
|
9892
9915
|
pn as Tree,
|
|
9893
|
-
|
|
9916
|
+
Oc as Url,
|
|
9894
9917
|
ct as iconMapper,
|
|
9895
|
-
|
|
9918
|
+
zt as showConfirmDialog
|
|
9896
9919
|
};
|
|
9897
9920
|
//# sourceMappingURL=react-ooui.es.js.map
|