@gisce/react-ooui 2.1.0-alpha.12 → 2.1.0-alpha.13
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
CHANGED
|
@@ -2,8 +2,8 @@ var Zo = Object.defineProperty;
|
|
|
2
2
|
var Qo = (e, t, n) => t in e ? Zo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var lr = (e, t, n) => (Qo(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsxs as D, jsx as r, Fragment as J } from "react/jsx-runtime";
|
|
5
|
-
import tt, { useContext as ne, useState as w, useEffect as fe, useRef as
|
|
6
|
-
import { Tooltip as ht, theme as He, Typography as Yt, Form as at, Row as Te, Col as de, Modal as Je, Button as De, Dropdown as kr, Menu as Bt, Spin as Le, Divider as un, Space as Ue, Input as it, Select as Ct, Checkbox as Ht, Alert as Xe, Timeline as In, Statistic as ei, Card as Ln, Tag as Er, message as Sn, DatePicker as $n, TimePicker as ti, InputNumber as
|
|
5
|
+
import tt, { useContext as ne, useState as w, useEffect as fe, useRef as le, useCallback as be, forwardRef as pt, useImperativeHandle as gt, Fragment as Ar, useMemo as Ne, memo as Dr } from "react";
|
|
6
|
+
import { Tooltip as ht, theme as He, Typography as Yt, Form as at, Row as Te, Col as de, Modal as Je, Button as De, Dropdown as kr, Menu as Bt, Spin as Le, Divider as un, Space as Ue, Input as it, Select as Ct, Checkbox as Ht, Alert as Xe, Timeline as In, Statistic as ei, Card as Ln, Tag as Er, message as Sn, DatePicker as $n, TimePicker as ti, InputNumber as Nr, Progress as ni, Avatar as Mr, Pagination as ri, Badge as oi, Tabs as Pr, Popover as ii, Radio as cr, Switch as si, Steps as dr, Layout as ai } from "antd";
|
|
7
7
|
import { Label as At, Field as On, Tree as Lr, Reference as li, Selection as Bn, Many2one as $r, Boolean as ci, Container as di, parseContext as bt, Form as Br, Integer as Vn, SearchFieldTypes as mt, SearchFilter as ui, parseContextFields as fi, parseDomainFields as mi, transformDomainForChildWidget as Hr, graphProcessor as Kr, parseGraph as Hn, graphFieldUtils as hi } from "@gisce/ooui";
|
|
8
8
|
import * as ur from "@ant-design/icons";
|
|
9
9
|
import jr, { QuestionCircleOutlined as Wr, ExclamationCircleOutlined as yt, LoadingOutlined as st, DownOutlined as Gt, WarningOutlined as Ur, CloseOutlined as qt, CheckOutlined as zt, TranslationOutlined as Yr, FolderOpenOutlined as Kn, DownloadOutlined as jn, ClearOutlined as Wn, StarFilled as Gr, StarOutlined as qr, UpOutlined as pi, SearchOutlined as Un, ThunderboltOutlined as Yn, PrinterOutlined as Gn, EnterOutlined as zr, PlusSquareOutlined as gi, MinusSquareOutlined as yi, FileAddOutlined as fn, AlignLeftOutlined as wi, ApiOutlined as vi, DeleteOutlined as qn, LeftOutlined as Jr, RightOutlined as Xr, EyeOutlined as bi, FormOutlined as Kt, TableOutlined as zn, AreaChartOutlined as Ci, CalendarOutlined as xi, LinkOutlined as Zr, SaveOutlined as Si, CopyOutlined as Jn, InfoCircleOutlined as Qr, ReloadOutlined as mn, EditOutlined as eo, FilterOutlined as to, CloseCircleFilled as Ti, BorderOuterOutlined as Fi, SettingOutlined as Ri, ExportOutlined as _i } from "@ant-design/icons";
|
|
@@ -13,10 +13,10 @@ import * as mr from "@tabler/icons-react";
|
|
|
13
13
|
import Ei from "antd/lib/input/TextArea";
|
|
14
14
|
import Dt from "styled-components";
|
|
15
15
|
import Zn from "react-measure";
|
|
16
|
-
import
|
|
16
|
+
import Ni from "lodash/debounce";
|
|
17
17
|
import An from "antd/lib/typography/Title";
|
|
18
18
|
import { nanoid as Qn } from "nanoid";
|
|
19
|
-
import { Line as
|
|
19
|
+
import { Line as Mi, Column as Pi, Pie as Li } from "@ant-design/plots";
|
|
20
20
|
import Ze from "dayjs";
|
|
21
21
|
import $i from "dayjs/plugin/advancedFormat";
|
|
22
22
|
import Bi from "dayjs/plugin/customParseFormat";
|
|
@@ -493,7 +493,7 @@ const Rt = class Rt {
|
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
495
|
lr(Rt, "handler");
|
|
496
|
-
let
|
|
496
|
+
let N = Rt;
|
|
497
497
|
const oo = (e) => {
|
|
498
498
|
let t, n, i;
|
|
499
499
|
if (typeof e == "string" && e.indexOf(" -- ") !== -1 && e.indexOf(`
|
|
@@ -521,7 +521,7 @@ const oo = (e) => {
|
|
|
521
521
|
content: t
|
|
522
522
|
});
|
|
523
523
|
}, io = (e) => {
|
|
524
|
-
const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = pn(), { t: d } = pe(), [u, f] = w([]), [c, m] = w(!1), [p, h] = w(!1), [g, y] = w({}), v =
|
|
524
|
+
const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = pn(), { t: d } = pe(), [u, f] = w([]), [c, m] = w(!1), [p, h] = w(!1), [g, y] = w({}), v = le();
|
|
525
525
|
fe(() => {
|
|
526
526
|
t ? T() : y({});
|
|
527
527
|
}, [t]);
|
|
@@ -536,7 +536,7 @@ const oo = (e) => {
|
|
|
536
536
|
m(!1);
|
|
537
537
|
}
|
|
538
538
|
async function b() {
|
|
539
|
-
const R = (await
|
|
539
|
+
const R = (await N.getHandler().search({
|
|
540
540
|
params: [["translatable", "=", "1"]],
|
|
541
541
|
fieldsToRetrieve: ["code", "name"],
|
|
542
542
|
model: "res.lang"
|
|
@@ -549,7 +549,7 @@ const oo = (e) => {
|
|
|
549
549
|
async function C(F) {
|
|
550
550
|
const R = {};
|
|
551
551
|
for (const _ of F) {
|
|
552
|
-
const x = (await
|
|
552
|
+
const x = (await N.getHandler().readObjects({
|
|
553
553
|
model: i,
|
|
554
554
|
ids: [o],
|
|
555
555
|
fieldsToRetrieve: [s],
|
|
@@ -582,7 +582,7 @@ const oo = (e) => {
|
|
|
582
582
|
h(!0);
|
|
583
583
|
try {
|
|
584
584
|
for (const F of Object.keys(g))
|
|
585
|
-
g[F] !== v.current[F] && await
|
|
585
|
+
g[F] !== v.current[F] && await N.getHandler().update({
|
|
586
586
|
model: i,
|
|
587
587
|
id: o,
|
|
588
588
|
values: { [s]: g[F] },
|
|
@@ -814,9 +814,9 @@ function gn(e, t) {
|
|
|
814
814
|
}
|
|
815
815
|
const Es = (e) => {
|
|
816
816
|
const { ooui: t } = e, { required: n, id: i } = t, o = lt(i);
|
|
817
|
-
return o ? /* @__PURE__ */ r(o, {}) : /* @__PURE__ */ r(xe, { required: n, ...e, children: /* @__PURE__ */ r(
|
|
818
|
-
},
|
|
819
|
-
const { ooui: t, value: n, onChange: i } = e, { readOnly: o } = t, s =
|
|
817
|
+
return o ? /* @__PURE__ */ r(o, {}) : /* @__PURE__ */ r(xe, { required: n, ...e, children: /* @__PURE__ */ r(Ns, { ooui: t }) });
|
|
818
|
+
}, Ns = (e) => {
|
|
819
|
+
const { ooui: t, value: n, onChange: i } = e, { readOnly: o } = t, s = le(null), { t: a } = pe(), l = (c) => {
|
|
820
820
|
i == null || i(c);
|
|
821
821
|
};
|
|
822
822
|
async function d() {
|
|
@@ -884,7 +884,7 @@ const Es = (e) => {
|
|
|
884
884
|
)
|
|
885
885
|
] }) })
|
|
886
886
|
] });
|
|
887
|
-
},
|
|
887
|
+
}, Ms = (e) => {
|
|
888
888
|
const { ooui: t } = e, { required: n } = t;
|
|
889
889
|
return /* @__PURE__ */ r(xe, { required: n, ...e, children: /* @__PURE__ */ r(Ps, {}) });
|
|
890
890
|
}, Ps = (e) => {
|
|
@@ -1000,7 +1000,7 @@ const er = async (e) => {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
let f = [], c;
|
|
1002
1002
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1003
|
-
const g = (h = It(o)) == null ? void 0 : h.colors, y = await
|
|
1003
|
+
const g = (h = It(o)) == null ? void 0 : h.colors, y = await N.getHandler().readEvalUiObjects({
|
|
1004
1004
|
model: n,
|
|
1005
1005
|
ids: d,
|
|
1006
1006
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1012,7 +1012,7 @@ const er = async (e) => {
|
|
|
1012
1012
|
});
|
|
1013
1013
|
f = y[0], c = on(y[1]);
|
|
1014
1014
|
} else
|
|
1015
|
-
f = await
|
|
1015
|
+
f = await N.getHandler().readObjects({
|
|
1016
1016
|
model: n,
|
|
1017
1017
|
ids: d,
|
|
1018
1018
|
fields: u[a],
|
|
@@ -1051,7 +1051,7 @@ const er = async (e) => {
|
|
|
1051
1051
|
xt(() => {
|
|
1052
1052
|
h();
|
|
1053
1053
|
}, [t]);
|
|
1054
|
-
const p = async (g) => o && o[g] ? o[g] : await
|
|
1054
|
+
const p = async (g) => o && o[g] ? o[g] : await N.getHandler().getView({
|
|
1055
1055
|
model: n,
|
|
1056
1056
|
type: g,
|
|
1057
1057
|
context: { ...m == null ? void 0 : m(), ...i }
|
|
@@ -1350,7 +1350,7 @@ const kt = ({
|
|
|
1350
1350
|
let V = [];
|
|
1351
1351
|
try {
|
|
1352
1352
|
if (h && (V = [["id", "in", s]]), n.domain) {
|
|
1353
|
-
const R = await
|
|
1353
|
+
const R = await N.getHandler().evalDomain({
|
|
1354
1354
|
domain: n.domain,
|
|
1355
1355
|
values: kt({
|
|
1356
1356
|
fields: y == null ? void 0 : y.getFields(),
|
|
@@ -1361,7 +1361,7 @@ const kt = ({
|
|
|
1361
1361
|
});
|
|
1362
1362
|
V = [...V, ...R];
|
|
1363
1363
|
}
|
|
1364
|
-
const F = (await
|
|
1364
|
+
const F = (await N.getHandler().search({
|
|
1365
1365
|
model: m,
|
|
1366
1366
|
params: V,
|
|
1367
1367
|
fieldsToRetrieve: [g],
|
|
@@ -1466,13 +1466,13 @@ const kt = ({
|
|
|
1466
1466
|
case "image":
|
|
1467
1467
|
return Es;
|
|
1468
1468
|
case "url":
|
|
1469
|
-
return Mc;
|
|
1470
|
-
case "email":
|
|
1471
1469
|
return Nc;
|
|
1470
|
+
case "email":
|
|
1471
|
+
return Mc;
|
|
1472
1472
|
case "float_time":
|
|
1473
1473
|
return nc;
|
|
1474
1474
|
case "fiber_grid":
|
|
1475
|
-
return
|
|
1475
|
+
return Ms;
|
|
1476
1476
|
case "timeline":
|
|
1477
1477
|
return js;
|
|
1478
1478
|
case "indicator":
|
|
@@ -1720,13 +1720,13 @@ const kt = ({
|
|
|
1720
1720
|
searchParams: V = [],
|
|
1721
1721
|
setSearchValues: A,
|
|
1722
1722
|
clearSelection: F
|
|
1723
|
-
} = e, [R, _] = w(!1), [x, O] = w(!1), [k, B] = w(), [q, E] = w(1), [K,
|
|
1723
|
+
} = e, [R, _] = w(!1), [x, O] = w(!1), [k, B] = w(), [q, E] = w(1), [K, M] = w(0), [X, z] = w(), [te, W] = w([]), [$, I] = w(void 0), [P, j] = w(void 0), ce = le(C || Ut), Z = le([]), re = be(
|
|
1724
1724
|
(se) => {
|
|
1725
1725
|
y == null || y([...se]), W([...se]);
|
|
1726
1726
|
},
|
|
1727
1727
|
[y]
|
|
1728
1728
|
), ye = be(() => v || te, [v, te]), U = be(async () => {
|
|
1729
|
-
const se = await
|
|
1729
|
+
const se = await N.getHandler().nameSearch({
|
|
1730
1730
|
model: t,
|
|
1731
1731
|
payload: l,
|
|
1732
1732
|
limit: ce.current,
|
|
@@ -1736,7 +1736,7 @@ const kt = ({
|
|
|
1736
1736
|
if (z(se.length), f == null || f(se.length), se.length > 0) {
|
|
1737
1737
|
const Ie = se.map((ge) => ge == null ? void 0 : ge[0]), { colors: We, status: Ke } = It(c), Y = {};
|
|
1738
1738
|
We && (Y.colors = We), Ke && (Y.status = Ke);
|
|
1739
|
-
const we = await
|
|
1739
|
+
const we = await N.getHandler().readEvalUiObjects({
|
|
1740
1740
|
model: t,
|
|
1741
1741
|
ids: Ie,
|
|
1742
1742
|
arch: c == null ? void 0 : c.arch,
|
|
@@ -1766,11 +1766,11 @@ const kt = ({
|
|
|
1766
1766
|
p,
|
|
1767
1767
|
g,
|
|
1768
1768
|
f
|
|
1769
|
-
]),
|
|
1769
|
+
]), ae = be(
|
|
1770
1770
|
async (se) => {
|
|
1771
1771
|
const { params: Ie, newOffset: We } = se || {}, Ke = Wt(Ie || V, T), { colors: Y, status: we } = It(c), ke = {};
|
|
1772
1772
|
Y && (ke.colors = Y), we && (ke.status = we);
|
|
1773
|
-
const { totalItems: ue, results: he, attrsEvaluated: ge } = await
|
|
1773
|
+
const { totalItems: ue, results: he, attrsEvaluated: ge } = await N.getHandler().searchForTree({
|
|
1774
1774
|
params: Ke,
|
|
1775
1775
|
limit: ce.current,
|
|
1776
1776
|
offset: We || K,
|
|
@@ -1814,7 +1814,7 @@ const kt = ({
|
|
|
1814
1814
|
), Fe = be(
|
|
1815
1815
|
async (se) => {
|
|
1816
1816
|
try {
|
|
1817
|
-
_(!0), a == null || a(!0), l && !d.current ? await U() : await
|
|
1817
|
+
_(!0), a == null || a(!0), l && !d.current ? await U() : await ae(se), F == null || F();
|
|
1818
1818
|
} catch (Ie) {
|
|
1819
1819
|
B(typeof Ie == "string" ? Ie : Ie.message), _(!1);
|
|
1820
1820
|
} finally {
|
|
@@ -1825,11 +1825,11 @@ const kt = ({
|
|
|
1825
1825
|
l,
|
|
1826
1826
|
U,
|
|
1827
1827
|
d,
|
|
1828
|
-
|
|
1828
|
+
ae,
|
|
1829
1829
|
i,
|
|
1830
1830
|
a
|
|
1831
1831
|
]
|
|
1832
|
-
),
|
|
1832
|
+
), Me = be(
|
|
1833
1833
|
(se) => {
|
|
1834
1834
|
if (JSON.stringify(se) === JSON.stringify(p))
|
|
1835
1835
|
return;
|
|
@@ -1852,7 +1852,7 @@ const kt = ({
|
|
|
1852
1852
|
), Ee = be(
|
|
1853
1853
|
(se) => {
|
|
1854
1854
|
const { params: Ie, searchValues: We, limit: Ke, offset: Y } = se;
|
|
1855
|
-
R || (n == null || n(void 0), i == null || i([]), A == null || A(We), o == null || o(Ie), s == null || s(!1), O(!0), B(void 0), E(1), Ke && (ce.current = Ke, S == null || S(Ke)), Y &&
|
|
1855
|
+
R || (n == null || n(void 0), i == null || i([]), A == null || A(We), o == null || o(Ie), s == null || s(!1), O(!0), B(void 0), E(1), Ke && (ce.current = Ke, S == null || S(Ke)), Y && M(Y), Fe({
|
|
1856
1856
|
params: Ie,
|
|
1857
1857
|
newOffset: Y
|
|
1858
1858
|
}));
|
|
@@ -1869,11 +1869,11 @@ const kt = ({
|
|
|
1869
1869
|
]
|
|
1870
1870
|
), Pe = be(
|
|
1871
1871
|
(se) => {
|
|
1872
|
-
_(!0), E(se),
|
|
1872
|
+
_(!0), E(se), M((se - 1) * C);
|
|
1873
1873
|
},
|
|
1874
|
-
[_, C,
|
|
1874
|
+
[_, C, M, E]
|
|
1875
1875
|
), me = be(() => {
|
|
1876
|
-
R || (n == null || n(void 0), o == null || o([]), A == null || A({}), B(void 0),
|
|
1876
|
+
R || (n == null || n(void 0), o == null || o([]), A == null || A({}), B(void 0), M(0), E(1), S == null || S(C || Ut));
|
|
1877
1877
|
}, [
|
|
1878
1878
|
R,
|
|
1879
1879
|
n,
|
|
@@ -1883,7 +1883,7 @@ const kt = ({
|
|
|
1883
1883
|
C
|
|
1884
1884
|
]), Re = be(
|
|
1885
1885
|
async (se) => {
|
|
1886
|
-
const Ie = se[(c == null ? void 0 : c.field_parent) || "child_id"], We = await
|
|
1886
|
+
const Ie = se[(c == null ? void 0 : c.field_parent) || "child_id"], We = await N.getHandler().readObjects({
|
|
1887
1887
|
model: t,
|
|
1888
1888
|
ids: Ie,
|
|
1889
1889
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
@@ -1892,7 +1892,7 @@ const kt = ({
|
|
|
1892
1892
|
return re([...ye(), ...We]), uo(It(c), We);
|
|
1893
1893
|
},
|
|
1894
1894
|
[c, t, u, ye, re]
|
|
1895
|
-
), $e = be(async () => await
|
|
1895
|
+
), $e = be(async () => await N.getHandler().searchAllIds({
|
|
1896
1896
|
params: Wt(V, T),
|
|
1897
1897
|
model: t,
|
|
1898
1898
|
context: u,
|
|
@@ -1910,7 +1910,7 @@ const kt = ({
|
|
|
1910
1910
|
limit: C,
|
|
1911
1911
|
getResults: ye,
|
|
1912
1912
|
requestPageChange: Pe,
|
|
1913
|
-
changeSort:
|
|
1913
|
+
changeSort: Me,
|
|
1914
1914
|
fetchChildrenForRecord: Re,
|
|
1915
1915
|
colorsForResults: $,
|
|
1916
1916
|
statusForResults: P,
|
|
@@ -1944,7 +1944,7 @@ const kt = ({
|
|
|
1944
1944
|
setSearchTreeNameSearch: A,
|
|
1945
1945
|
goToResourceId: F,
|
|
1946
1946
|
limit: R
|
|
1947
|
-
} = e, [_, x] = w(!1), [O, k] = w(!1), [B, q] = w(!1), [E, K] = w(!0), [
|
|
1947
|
+
} = e, [_, x] = w(!1), [O, k] = w(!1), [B, q] = w(!1), [E, K] = w(!0), [M, X] = w(!0), [z, te] = w([]), [W, $] = w(!1), [I, P] = w([]), [j, ce] = w(!1), [Z, re] = w(!0), [ye, U] = w(), [ae, Fe] = w({}), [Me, Ee] = w(
|
|
1948
1948
|
R !== void 0 ? R : Ut
|
|
1949
1949
|
), [Pe, me] = w(i);
|
|
1950
1950
|
fe(() => {
|
|
@@ -1995,7 +1995,7 @@ const kt = ({
|
|
|
1995
1995
|
setRemovingItem: q,
|
|
1996
1996
|
formIsLoading: E,
|
|
1997
1997
|
setFormIsLoading: K,
|
|
1998
|
-
treeIsLoading:
|
|
1998
|
+
treeIsLoading: M,
|
|
1999
1999
|
setTreeIsLoading: X,
|
|
2000
2000
|
attachments: z,
|
|
2001
2001
|
setAttachments: te,
|
|
@@ -2018,9 +2018,9 @@ const kt = ({
|
|
|
2018
2018
|
previousView: ye,
|
|
2019
2019
|
setPreviousView: U,
|
|
2020
2020
|
goToResourceId: F,
|
|
2021
|
-
searchValues:
|
|
2021
|
+
searchValues: ae,
|
|
2022
2022
|
setSearchValues: Fe,
|
|
2023
|
-
limit:
|
|
2023
|
+
limit: Me,
|
|
2024
2024
|
setLimit: Ee,
|
|
2025
2025
|
setTitle: me
|
|
2026
2026
|
},
|
|
@@ -2064,9 +2064,9 @@ const kt = ({
|
|
|
2064
2064
|
for (let n = 0; n < e.length; n++)
|
|
2065
2065
|
await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
|
|
2066
2066
|
}, Ra = (e, t) => {
|
|
2067
|
-
const { children: n, globalValues: i = {} } = e, o =
|
|
2067
|
+
const { children: n, globalValues: i = {} } = e, o = le(), s = le(), [a, l] = w(!1), d = ne(
|
|
2068
2068
|
ct
|
|
2069
|
-
), { openAction: u } = d || {}, f =
|
|
2069
|
+
), { openAction: u } = d || {}, f = le([]), { t: c } = pe();
|
|
2070
2070
|
gt(t, () => ({
|
|
2071
2071
|
openActionModal: C
|
|
2072
2072
|
}));
|
|
@@ -2087,17 +2087,17 @@ const kt = ({
|
|
|
2087
2087
|
ze(`${E} action not supported`);
|
|
2088
2088
|
return;
|
|
2089
2089
|
}
|
|
2090
|
-
const { ids: K } = B || {},
|
|
2090
|
+
const { ids: K } = B || {}, M = K || [], X = typeof O == "string" ? bt({
|
|
2091
2091
|
context: O,
|
|
2092
2092
|
fields: R,
|
|
2093
2093
|
values: _
|
|
2094
2094
|
}) : O;
|
|
2095
2095
|
try {
|
|
2096
|
-
const z = await
|
|
2096
|
+
const z = await N.getHandler().createReport({
|
|
2097
2097
|
model: k,
|
|
2098
2098
|
name: q,
|
|
2099
2099
|
datas: B,
|
|
2100
|
-
ids:
|
|
2100
|
+
ids: M,
|
|
2101
2101
|
context: { ...x, ...X }
|
|
2102
2102
|
});
|
|
2103
2103
|
l(!0), s.current = !0, o.current = setInterval(() => {
|
|
@@ -2110,7 +2110,7 @@ const kt = ({
|
|
|
2110
2110
|
async function v(A) {
|
|
2111
2111
|
let F;
|
|
2112
2112
|
try {
|
|
2113
|
-
if (F = await
|
|
2113
|
+
if (F = await N.getHandler().getReport({
|
|
2114
2114
|
id: A
|
|
2115
2115
|
}), F.state && s.current === !0) {
|
|
2116
2116
|
s.current = !1, clearInterval(o.current), l(!1);
|
|
@@ -2154,7 +2154,7 @@ const kt = ({
|
|
|
2154
2154
|
}) {
|
|
2155
2155
|
var q;
|
|
2156
2156
|
let x = A;
|
|
2157
|
-
A.res_model || (x = (await
|
|
2157
|
+
A.res_model || (x = (await N.getHandler().readObjects({
|
|
2158
2158
|
model: "ir.actions.act_window",
|
|
2159
2159
|
ids: [parseInt(A.id)],
|
|
2160
2160
|
context: _
|
|
@@ -2168,7 +2168,7 @@ const kt = ({
|
|
|
2168
2168
|
...O
|
|
2169
2169
|
};
|
|
2170
2170
|
let B = [];
|
|
2171
|
-
if (x.domain && (B = await
|
|
2171
|
+
if (x.domain && (B = await N.getHandler().evalDomain({
|
|
2172
2172
|
domain: x.domain,
|
|
2173
2173
|
values: kt({
|
|
2174
2174
|
fields: F,
|
|
@@ -2177,7 +2177,7 @@ const kt = ({
|
|
|
2177
2177
|
fields: F,
|
|
2178
2178
|
context: k
|
|
2179
2179
|
})), x.target === "new") {
|
|
2180
|
-
const E = await
|
|
2180
|
+
const E = await N.getHandler().getView({
|
|
2181
2181
|
model: x.res_model,
|
|
2182
2182
|
type: "form",
|
|
2183
2183
|
id: ((q = x == null ? void 0 : x.view_id) == null ? void 0 : q[0]) || void 0,
|
|
@@ -2302,7 +2302,7 @@ async function _a({
|
|
|
2302
2302
|
let a;
|
|
2303
2303
|
if (e)
|
|
2304
2304
|
for (const l of e) {
|
|
2305
|
-
const d = await
|
|
2305
|
+
const d = await N.getHandler().getView({
|
|
2306
2306
|
model: n,
|
|
2307
2307
|
type: l[1],
|
|
2308
2308
|
id: l[0],
|
|
@@ -2313,7 +2313,7 @@ async function _a({
|
|
|
2313
2313
|
else {
|
|
2314
2314
|
const l = t.split(",");
|
|
2315
2315
|
for (const d of l) {
|
|
2316
|
-
const u = await
|
|
2316
|
+
const u = await N.getHandler().getView({
|
|
2317
2317
|
model: n,
|
|
2318
2318
|
type: d,
|
|
2319
2319
|
context: i
|
|
@@ -2386,7 +2386,7 @@ function Aa(e, t) {
|
|
|
2386
2386
|
defaultValues: S,
|
|
2387
2387
|
forcedValues: V = {},
|
|
2388
2388
|
parentWidth: A
|
|
2389
|
-
} = e, { t: F } = pe(), [R, _] = w(!1), [x, O] = w(), [k, B] = w(), [q] = at.useForm(), [E, K] = w(), [
|
|
2389
|
+
} = e, { t: F } = pe(), [R, _] = w(!1), [x, O] = w(), [k, B] = w(), [q] = at.useForm(), [E, K] = w(), [M, X] = w(), z = ne(po), [te, W] = w(), [$, I] = w(!1), P = le(), j = le({}), ce = le({}), Z = le(!1), re = le(!1), ye = le(!1), ae = (A !== void 0 ? A : te) < Va, Fe = ne(Be), { activeId: Me, getPlainValues: Ee } = Fe || {}, Pe = ne(
|
|
2390
2390
|
ot
|
|
2391
2391
|
), {
|
|
2392
2392
|
setFormIsSaving: me = void 0,
|
|
@@ -2408,7 +2408,7 @@ function Aa(e, t) {
|
|
|
2408
2408
|
fetchValues: Ve,
|
|
2409
2409
|
cancelUnsavedChanges: nt,
|
|
2410
2410
|
clearAndReload: () => {
|
|
2411
|
-
P.current = void 0, B(void 0),
|
|
2411
|
+
P.current = void 0, B(void 0), Mt();
|
|
2412
2412
|
}
|
|
2413
2413
|
})), fe(() => {
|
|
2414
2414
|
if (O(void 0), !(!n && !h)) {
|
|
@@ -2416,7 +2416,7 @@ function Aa(e, t) {
|
|
|
2416
2416
|
P.current = void 0, B(void 0);
|
|
2417
2417
|
return;
|
|
2418
2418
|
}
|
|
2419
|
-
(i === void 0 &&
|
|
2419
|
+
(i === void 0 && M || i !== void 0 && M && i < 0) && (P.current = void 0, B(void 0)), Mt();
|
|
2420
2420
|
}
|
|
2421
2421
|
}, [i, n, p, h, b]), fe(() => {
|
|
2422
2422
|
$ && (vn({
|
|
@@ -2434,11 +2434,11 @@ function Aa(e, t) {
|
|
|
2434
2434
|
return i || P.current;
|
|
2435
2435
|
}
|
|
2436
2436
|
function je() {
|
|
2437
|
-
return
|
|
2437
|
+
return M;
|
|
2438
2438
|
}
|
|
2439
2439
|
function Ae() {
|
|
2440
2440
|
const L = {
|
|
2441
|
-
...Ye(
|
|
2441
|
+
...Ye(M),
|
|
2442
2442
|
...Se()
|
|
2443
2443
|
};
|
|
2444
2444
|
for (const H in L)
|
|
@@ -2454,7 +2454,7 @@ function Aa(e, t) {
|
|
|
2454
2454
|
}
|
|
2455
2455
|
function oe() {
|
|
2456
2456
|
const L = {
|
|
2457
|
-
...Ye(
|
|
2457
|
+
...Ye(M)
|
|
2458
2458
|
};
|
|
2459
2459
|
for (const H in L)
|
|
2460
2460
|
L[H] === void 0 && delete L[H];
|
|
@@ -2471,13 +2471,13 @@ function Aa(e, t) {
|
|
|
2471
2471
|
id: ie(),
|
|
2472
2472
|
active_id: ie(),
|
|
2473
2473
|
active_ids: [ie()],
|
|
2474
|
-
parent_id:
|
|
2474
|
+
parent_id: Me,
|
|
2475
2475
|
...ke
|
|
2476
2476
|
};
|
|
2477
2477
|
}
|
|
2478
2478
|
const Oe = async (L) => {
|
|
2479
2479
|
const H = ie() ? k == null ? void 0 : k.context : {};
|
|
2480
|
-
return await
|
|
2480
|
+
return await N.getHandler().defaultGet({
|
|
2481
2481
|
model: n,
|
|
2482
2482
|
fields: L,
|
|
2483
2483
|
context: { ...v, ...H },
|
|
@@ -2486,8 +2486,8 @@ function Aa(e, t) {
|
|
|
2486
2486
|
}, Qe = () => Object.keys(
|
|
2487
2487
|
Tn({
|
|
2488
2488
|
source: j.current,
|
|
2489
|
-
target: Ye(
|
|
2490
|
-
fields:
|
|
2489
|
+
target: Ye(M),
|
|
2490
|
+
fields: M
|
|
2491
2491
|
})
|
|
2492
2492
|
).length !== 0, Ye = (L) => {
|
|
2493
2493
|
const H = q.getFieldsValue(!0);
|
|
@@ -2495,21 +2495,21 @@ function Aa(e, t) {
|
|
|
2495
2495
|
}, wt = (L, H) => {
|
|
2496
2496
|
Lt({
|
|
2497
2497
|
values: {
|
|
2498
|
-
...Ft(q.getFieldsValue(!0),
|
|
2498
|
+
...Ft(q.getFieldsValue(!0), M),
|
|
2499
2499
|
[L]: H
|
|
2500
2500
|
},
|
|
2501
|
-
fields:
|
|
2501
|
+
fields: M,
|
|
2502
2502
|
reset: !1
|
|
2503
2503
|
});
|
|
2504
2504
|
}, dt = (L) => q.getFieldsValue(!0)[L];
|
|
2505
|
-
async function
|
|
2505
|
+
async function Nt() {
|
|
2506
2506
|
try {
|
|
2507
2507
|
return await q.validateFields(), !1;
|
|
2508
2508
|
} catch {
|
|
2509
2509
|
return Sn.error(F("fillRequiredFields")), !0;
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
|
-
const
|
|
2512
|
+
const Mt = async () => {
|
|
2513
2513
|
O(void 0), se == null || se(!0);
|
|
2514
2514
|
let L;
|
|
2515
2515
|
try {
|
|
@@ -2524,7 +2524,7 @@ function Aa(e, t) {
|
|
|
2524
2524
|
}
|
|
2525
2525
|
}, Ve = async (L) => {
|
|
2526
2526
|
let H, Q, ee, ve;
|
|
2527
|
-
se == null || se(!0), O(void 0), L != null && L.fields ? (Q = L.fields, ee = L.arch) : (Q =
|
|
2527
|
+
se == null || se(!0), O(void 0), L != null && L.fields ? (Q = L.fields, ee = L.arch) : (Q = M, ee = E), p && (L == null ? void 0 : L.forceRefresh) !== !0 ? H = p : { values: H, defaultGetCalled: ve } = await Lo({
|
|
2528
2528
|
fields: Q,
|
|
2529
2529
|
arch: ee
|
|
2530
2530
|
}), T && (H = { ...Xs(T), ...H }), j.current = Ft(H, Q), Lt({
|
|
@@ -2545,13 +2545,13 @@ function Aa(e, t) {
|
|
|
2545
2545
|
}) : (he == null || he(), L(!0));
|
|
2546
2546
|
}), Pt = async () => {
|
|
2547
2547
|
if (l) {
|
|
2548
|
-
const L = await
|
|
2549
|
-
return (await
|
|
2548
|
+
const L = await N.getHandler().getActionStringForModel(n);
|
|
2549
|
+
return (await N.getHandler().getViewsForAction({
|
|
2550
2550
|
action: L,
|
|
2551
2551
|
context: v
|
|
2552
2552
|
})).views.get("form");
|
|
2553
2553
|
}
|
|
2554
|
-
return await
|
|
2554
|
+
return await N.getHandler().getView({
|
|
2555
2555
|
model: n,
|
|
2556
2556
|
type: "form",
|
|
2557
2557
|
context: v
|
|
@@ -2577,13 +2577,13 @@ function Aa(e, t) {
|
|
|
2577
2577
|
}) => {
|
|
2578
2578
|
let Q = {}, ee = !1;
|
|
2579
2579
|
if (ie()) {
|
|
2580
|
-
Q = (await
|
|
2580
|
+
Q = (await N.getHandler().readObjects({
|
|
2581
2581
|
model: n,
|
|
2582
2582
|
ids: [ie()],
|
|
2583
2583
|
fields: L,
|
|
2584
2584
|
context: v
|
|
2585
2585
|
}))[0];
|
|
2586
|
-
const ve = await
|
|
2586
|
+
const ve = await N.getHandler().search({
|
|
2587
2587
|
params: [
|
|
2588
2588
|
["res_model", "=", n],
|
|
2589
2589
|
["res_id", "=", ie()]
|
|
@@ -2601,24 +2601,24 @@ function Aa(e, t) {
|
|
|
2601
2601
|
if (ie()) {
|
|
2602
2602
|
const Q = Tn({
|
|
2603
2603
|
source: j.current,
|
|
2604
|
-
target: Ye(
|
|
2605
|
-
fields:
|
|
2604
|
+
target: Ye(M),
|
|
2605
|
+
fields: M
|
|
2606
2606
|
});
|
|
2607
|
-
await
|
|
2607
|
+
await N.getHandler().update({
|
|
2608
2608
|
model: n,
|
|
2609
2609
|
id: ie(),
|
|
2610
2610
|
values: { ...Q, ...V },
|
|
2611
|
-
fields:
|
|
2611
|
+
fields: M,
|
|
2612
2612
|
context: {
|
|
2613
2613
|
...v,
|
|
2614
2614
|
...k == null ? void 0 : k.context
|
|
2615
2615
|
}
|
|
2616
|
-
}), j.current = Ye(
|
|
2616
|
+
}), j.current = Ye(M);
|
|
2617
2617
|
} else {
|
|
2618
|
-
const Q = Ye(
|
|
2618
|
+
const Q = Ye(M), ee = await N.getHandler().create({
|
|
2619
2619
|
model: n,
|
|
2620
2620
|
values: { ...Q, ...V },
|
|
2621
|
-
fields:
|
|
2621
|
+
fields: M,
|
|
2622
2622
|
context: {
|
|
2623
2623
|
...v,
|
|
2624
2624
|
...k == null ? void 0 : k.context
|
|
@@ -2641,15 +2641,15 @@ function Aa(e, t) {
|
|
|
2641
2641
|
ye.current
|
|
2642
2642
|
), ye.current = !1;
|
|
2643
2643
|
const ee = ie();
|
|
2644
|
-
return c && (P.current = void 0, Lt({ values: {}, fields:
|
|
2644
|
+
return c && (P.current = void 0, Lt({ values: {}, fields: M, reset: !0 })), { succeed: !0, id: ee };
|
|
2645
2645
|
}
|
|
2646
2646
|
if (!Qe() && ie() && Q)
|
|
2647
2647
|
return re.current = !1, Re == null || Re(!1), he == null || he(), { succeed: !0, id: ie() };
|
|
2648
|
-
if (await
|
|
2648
|
+
if (await Nt())
|
|
2649
2649
|
return re.current = !1, br(F), { succeed: !1, id: ie() };
|
|
2650
2650
|
_(!0), me == null || me(!0);
|
|
2651
2651
|
try {
|
|
2652
|
-
m === "api" ? await sr(L) : await $o(L), c && (P.current = void 0, Lt({ values: {}, fields:
|
|
2652
|
+
m === "api" ? await sr(L) : await $o(L), c && (P.current = void 0, Lt({ values: {}, fields: M, reset: !0 })), await Ve({ forceRefresh: !0 }), H = !0, Sn.success(F("savedRegisters"));
|
|
2653
2653
|
} catch (ee) {
|
|
2654
2654
|
re.current = !1, _(!1), me == null || me(!1), ge == null || ge(ee), Sn.error(F("errorWhileSavingForm")), O(ee != null && ee.message ? ee.message : ee);
|
|
2655
2655
|
} finally {
|
|
@@ -2681,8 +2681,8 @@ function Aa(e, t) {
|
|
|
2681
2681
|
return;
|
|
2682
2682
|
const H = Tn({
|
|
2683
2683
|
source: ce.current,
|
|
2684
|
-
target: Ye(
|
|
2685
|
-
fields:
|
|
2684
|
+
target: Ye(M),
|
|
2685
|
+
fields: M
|
|
2686
2686
|
}), Q = Object.keys(H);
|
|
2687
2687
|
if (Q.length !== 0 && !(zs({
|
|
2688
2688
|
changedFields: Q,
|
|
@@ -2699,10 +2699,10 @@ function Aa(e, t) {
|
|
|
2699
2699
|
"many2one"
|
|
2700
2700
|
]
|
|
2701
2701
|
}) && L !== !0)) {
|
|
2702
|
-
const ee = Ft(q.getFieldsValue(!0),
|
|
2702
|
+
const ee = Ft(q.getFieldsValue(!0), M);
|
|
2703
2703
|
ce.current = ee, d == null || d(ee), Re == null || Re(!0), Ho(Q);
|
|
2704
2704
|
}
|
|
2705
|
-
}, Bo =
|
|
2705
|
+
}, Bo = Ni(vn, 100), Ho = async (L) => {
|
|
2706
2706
|
try {
|
|
2707
2707
|
for (let H = 0; H < L.length; H += 1) {
|
|
2708
2708
|
const Q = L[H];
|
|
@@ -2715,15 +2715,15 @@ function Aa(e, t) {
|
|
|
2715
2715
|
const H = k == null ? void 0 : k.onChangeFields[L];
|
|
2716
2716
|
if (!H) {
|
|
2717
2717
|
$t({
|
|
2718
|
-
fields:
|
|
2718
|
+
fields: M,
|
|
2719
2719
|
arch: E,
|
|
2720
|
-
values: Ye(
|
|
2720
|
+
values: Ye(M)
|
|
2721
2721
|
});
|
|
2722
2722
|
return;
|
|
2723
2723
|
}
|
|
2724
2724
|
const Q = Zs({
|
|
2725
2725
|
values: {
|
|
2726
|
-
...Ye(
|
|
2726
|
+
...Ye(M),
|
|
2727
2727
|
context: {
|
|
2728
2728
|
...v,
|
|
2729
2729
|
...k == null ? void 0 : k.context
|
|
@@ -2731,21 +2731,21 @@ function Aa(e, t) {
|
|
|
2731
2731
|
},
|
|
2732
2732
|
parentValues: Ee == null ? void 0 : Ee(),
|
|
2733
2733
|
onChangeFieldActionArgs: H.args
|
|
2734
|
-
}), ee = await
|
|
2734
|
+
}), ee = await N.getHandler().executeOnChange({
|
|
2735
2735
|
model: n,
|
|
2736
2736
|
action: H.method,
|
|
2737
2737
|
ids: ie() ? [ie()] : [],
|
|
2738
2738
|
payload: Q,
|
|
2739
|
-
fields:
|
|
2739
|
+
fields: M
|
|
2740
2740
|
});
|
|
2741
2741
|
if (ee.value) {
|
|
2742
2742
|
const ve = {
|
|
2743
|
-
...Ye(
|
|
2743
|
+
...Ye(M),
|
|
2744
2744
|
...ee.value
|
|
2745
2745
|
};
|
|
2746
|
-
$t({ fields:
|
|
2746
|
+
$t({ fields: M, arch: E, values: ve }), Lt({
|
|
2747
2747
|
values: ve,
|
|
2748
|
-
fields:
|
|
2748
|
+
fields: M,
|
|
2749
2749
|
reset: !1
|
|
2750
2750
|
});
|
|
2751
2751
|
}
|
|
@@ -2758,7 +2758,7 @@ function Aa(e, t) {
|
|
|
2758
2758
|
if (ee.domain && Object.keys(ee.domain).length > 0) {
|
|
2759
2759
|
const ve = Js({
|
|
2760
2760
|
fieldsDomain: ee.domain,
|
|
2761
|
-
fields:
|
|
2761
|
+
fields: M
|
|
2762
2762
|
});
|
|
2763
2763
|
$t({
|
|
2764
2764
|
fields: ve,
|
|
@@ -2771,7 +2771,7 @@ function Aa(e, t) {
|
|
|
2771
2771
|
action: L,
|
|
2772
2772
|
context: H
|
|
2773
2773
|
}) {
|
|
2774
|
-
const Q = await
|
|
2774
|
+
const Q = await N.getHandler().execute({
|
|
2775
2775
|
model: n,
|
|
2776
2776
|
action: L,
|
|
2777
2777
|
payload: [ie()],
|
|
@@ -2789,7 +2789,7 @@ function Aa(e, t) {
|
|
|
2789
2789
|
let ee = {};
|
|
2790
2790
|
Q.context && (ee = bt({
|
|
2791
2791
|
context: Q.context,
|
|
2792
|
-
fields:
|
|
2792
|
+
fields: M,
|
|
2793
2793
|
values: Ae()
|
|
2794
2794
|
})), await ar({
|
|
2795
2795
|
actionData: Q,
|
|
@@ -2799,7 +2799,7 @@ function Aa(e, t) {
|
|
|
2799
2799
|
await Ve({ forceRefresh: !0 });
|
|
2800
2800
|
}
|
|
2801
2801
|
async function Wo({ action: L }) {
|
|
2802
|
-
const H = await
|
|
2802
|
+
const H = await N.getHandler().executeWorkflow({
|
|
2803
2803
|
model: n,
|
|
2804
2804
|
action: L,
|
|
2805
2805
|
payload: ie()
|
|
@@ -2810,7 +2810,7 @@ function Aa(e, t) {
|
|
|
2810
2810
|
action: L,
|
|
2811
2811
|
context: H
|
|
2812
2812
|
}) {
|
|
2813
|
-
const Q = (await
|
|
2813
|
+
const Q = (await N.getHandler().readObjects({
|
|
2814
2814
|
model: "ir.actions.actions",
|
|
2815
2815
|
ids: [parseInt(L)],
|
|
2816
2816
|
context: v
|
|
@@ -2823,7 +2823,7 @@ function Aa(e, t) {
|
|
|
2823
2823
|
}) {
|
|
2824
2824
|
const { closeParent: Q } = await (we == null ? void 0 : we({
|
|
2825
2825
|
actionData: L,
|
|
2826
|
-
fields:
|
|
2826
|
+
fields: M,
|
|
2827
2827
|
values: Ae(),
|
|
2828
2828
|
context: {
|
|
2829
2829
|
...v,
|
|
@@ -2841,9 +2841,9 @@ function Aa(e, t) {
|
|
|
2841
2841
|
}
|
|
2842
2842
|
function bn(L) {
|
|
2843
2843
|
$t({
|
|
2844
|
-
fields:
|
|
2844
|
+
fields: M,
|
|
2845
2845
|
arch: E,
|
|
2846
|
-
values: Ye(
|
|
2846
|
+
values: Ye(M),
|
|
2847
2847
|
operationInProgress: L
|
|
2848
2848
|
});
|
|
2849
2849
|
}
|
|
@@ -2856,7 +2856,7 @@ function Aa(e, t) {
|
|
|
2856
2856
|
he == null || he();
|
|
2857
2857
|
return;
|
|
2858
2858
|
}
|
|
2859
|
-
if (await
|
|
2859
|
+
if (await Nt()) {
|
|
2860
2860
|
br(F);
|
|
2861
2861
|
return;
|
|
2862
2862
|
}
|
|
@@ -2898,7 +2898,7 @@ function Aa(e, t) {
|
|
|
2898
2898
|
Dn,
|
|
2899
2899
|
{
|
|
2900
2900
|
container: k.container,
|
|
2901
|
-
responsiveBehaviour:
|
|
2901
|
+
responsiveBehaviour: ae
|
|
2902
2902
|
}
|
|
2903
2903
|
)
|
|
2904
2904
|
}
|
|
@@ -2964,7 +2964,7 @@ const Zt = pt(Aa), Qt = (e) => {
|
|
|
2964
2964
|
a && S();
|
|
2965
2965
|
}, [l, a]);
|
|
2966
2966
|
async function S() {
|
|
2967
|
-
const R = await
|
|
2967
|
+
const R = await N.getHandler().isShortcutFavorite({
|
|
2968
2968
|
action_id: v,
|
|
2969
2969
|
action_type: b,
|
|
2970
2970
|
view_id: C,
|
|
@@ -2974,12 +2974,12 @@ const Zt = pt(Aa), Qt = (e) => {
|
|
|
2974
2974
|
}
|
|
2975
2975
|
async function V() {
|
|
2976
2976
|
if (p && g)
|
|
2977
|
-
await
|
|
2977
|
+
await N.getHandler().removeFavourite({
|
|
2978
2978
|
shortcut_id: g
|
|
2979
2979
|
});
|
|
2980
2980
|
else {
|
|
2981
2981
|
const { action_id: R, res_id: _, action_type: x, view_id: O } = l;
|
|
2982
|
-
await
|
|
2982
|
+
await N.getHandler().addFavourite({
|
|
2983
2983
|
action_id: R,
|
|
2984
2984
|
action_type: x,
|
|
2985
2985
|
view_id: O,
|
|
@@ -3040,7 +3040,7 @@ const Zt = pt(Aa), Qt = (e) => {
|
|
|
3040
3040
|
numberOfSelectsToHide: n = 2,
|
|
3041
3041
|
...i
|
|
3042
3042
|
}) => {
|
|
3043
|
-
const o =
|
|
3043
|
+
const o = le(), s = le(0);
|
|
3044
3044
|
return /* @__PURE__ */ r(
|
|
3045
3045
|
ti,
|
|
3046
3046
|
{
|
|
@@ -3120,10 +3120,10 @@ const Zt = pt(Aa), Qt = (e) => {
|
|
|
3120
3120
|
}
|
|
3121
3121
|
}
|
|
3122
3122
|
)
|
|
3123
|
-
] }), { useToken:
|
|
3124
|
-
const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: o, required: s } = t, { token: a } =
|
|
3123
|
+
] }), { useToken: Na } = He, yo = (e) => {
|
|
3124
|
+
const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: o, required: s } = t, { token: a } = Na(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ne(Be), { elementHasLostFocus: u } = d || {};
|
|
3125
3125
|
return /* @__PURE__ */ r(xe, { required: s, type: "number", ...e, children: /* @__PURE__ */ r(
|
|
3126
|
-
|
|
3126
|
+
Nr,
|
|
3127
3127
|
{
|
|
3128
3128
|
disabled: o,
|
|
3129
3129
|
className: "w-full",
|
|
@@ -3135,10 +3135,10 @@ const Zt = pt(Aa), Qt = (e) => {
|
|
|
3135
3135
|
onBlur: u
|
|
3136
3136
|
}
|
|
3137
3137
|
) });
|
|
3138
|
-
}, { useToken:
|
|
3139
|
-
const { ooui: t, onChange: n } = e, { id: i, readOnly: o, required: s } = t, { token: a } =
|
|
3138
|
+
}, { useToken: Ma } = He, sn = (e) => {
|
|
3139
|
+
const { ooui: t, onChange: n } = e, { id: i, readOnly: o, required: s } = t, { token: a } = Ma(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ne(Be), { elementHasLostFocus: u } = d || {};
|
|
3140
3140
|
return /* @__PURE__ */ r(xe, { required: s, type: "number", ...e, children: /* @__PURE__ */ r(
|
|
3141
|
-
|
|
3141
|
+
Nr,
|
|
3142
3142
|
{
|
|
3143
3143
|
id: i,
|
|
3144
3144
|
className: "w-full ",
|
|
@@ -3315,7 +3315,7 @@ function wo(e) {
|
|
|
3315
3315
|
searchError: c,
|
|
3316
3316
|
searchValues: m,
|
|
3317
3317
|
showLimitOptions: p = !0
|
|
3318
|
-
} = e, [h, g] = w(), [y, v] = w(), [T, b] = w(!1), C =
|
|
3318
|
+
} = e, [h, g] = w(), [y, v] = w(), [T, b] = w(!1), C = le(), { token: S } = qa(), [V] = at.useForm();
|
|
3319
3319
|
fe(() => {
|
|
3320
3320
|
V.setFieldsValue(m);
|
|
3321
3321
|
}, [m]);
|
|
@@ -3574,40 +3574,40 @@ const Qa = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(bo,
|
|
|
3574
3574
|
)
|
|
3575
3575
|
] });
|
|
3576
3576
|
}, et = (e) => {
|
|
3577
|
-
const t =
|
|
3577
|
+
const t = le(/* @__PURE__ */ new Map());
|
|
3578
3578
|
fe(() => () => {
|
|
3579
|
-
|
|
3579
|
+
i();
|
|
3580
3580
|
}, []);
|
|
3581
|
-
const
|
|
3582
|
-
async (
|
|
3583
|
-
var
|
|
3584
|
-
const
|
|
3585
|
-
t.current.has(
|
|
3586
|
-
const
|
|
3587
|
-
t.current.set(
|
|
3581
|
+
const n = be(
|
|
3582
|
+
async (o, s) => {
|
|
3583
|
+
var d;
|
|
3584
|
+
const a = s || Qn();
|
|
3585
|
+
t.current.has(a) && ((d = t.current.get(a)) == null || d.abort());
|
|
3586
|
+
const l = new AbortController();
|
|
3587
|
+
t.current.set(a, l);
|
|
3588
3588
|
try {
|
|
3589
|
-
return await e(
|
|
3590
|
-
signal:
|
|
3589
|
+
return await e(o, {
|
|
3590
|
+
signal: l.signal
|
|
3591
3591
|
});
|
|
3592
3592
|
} finally {
|
|
3593
|
-
|
|
3593
|
+
t.current.delete(a);
|
|
3594
3594
|
}
|
|
3595
3595
|
},
|
|
3596
3596
|
[e]
|
|
3597
|
-
),
|
|
3598
|
-
var
|
|
3599
|
-
|
|
3597
|
+
), i = be((o) => {
|
|
3598
|
+
var s;
|
|
3599
|
+
o ? ((s = t.current.get(o)) == null || s.abort(), t.current.delete(o)) : (t.current.forEach((a) => a.abort()), t.current.clear());
|
|
3600
3600
|
}, []);
|
|
3601
|
-
return [
|
|
3601
|
+
return [n, i];
|
|
3602
3602
|
}, nr = (e) => {
|
|
3603
3603
|
const { id: t, model: n, context: i = {} } = e, [o, s] = w(), [a, l] = w(), d = ne(
|
|
3604
3604
|
ct
|
|
3605
3605
|
), { openRelate: u } = d || {}, f = ne(
|
|
3606
3606
|
Et
|
|
3607
3607
|
), { processAction: c } = f || {}, [m, p] = et(
|
|
3608
|
-
|
|
3608
|
+
N.getHandler().getView
|
|
3609
3609
|
), [h, g] = et(
|
|
3610
|
-
|
|
3610
|
+
N.getHandler().readObjects
|
|
3611
3611
|
), y = be(() => {
|
|
3612
3612
|
p(), g();
|
|
3613
3613
|
}, [p, g]), v = be(async () => {
|
|
@@ -3698,7 +3698,7 @@ const Qa = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(bo,
|
|
|
3698
3698
|
if (!t || t && o)
|
|
3699
3699
|
return;
|
|
3700
3700
|
l(!0);
|
|
3701
|
-
const p = await
|
|
3701
|
+
const p = await N.getHandler().execute({
|
|
3702
3702
|
action: "name_get",
|
|
3703
3703
|
payload: [f],
|
|
3704
3704
|
model: d,
|
|
@@ -3734,7 +3734,7 @@ const il = (e) => {
|
|
|
3734
3734
|
let i = n;
|
|
3735
3735
|
t.selectionValues.size ? i = t.selectionValues.get(n) : Array.isArray(n) && (i = n[1]);
|
|
3736
3736
|
const o = i.toString().split(" ").filter((a) => a.length > 1).slice(0, 3).map((a) => a[0].toUpperCase()).join(""), s = jt(i);
|
|
3737
|
-
return /* @__PURE__ */ r(ht, { title: i, children: /* @__PURE__ */ r(
|
|
3737
|
+
return /* @__PURE__ */ r(ht, { title: i, children: /* @__PURE__ */ r(Mr, { alt: i, style: { backgroundColor: s }, children: o }) });
|
|
3738
3738
|
}, { useToken: sl } = He, ut = {
|
|
3739
3739
|
date: {
|
|
3740
3740
|
placeholder: "__/__/____",
|
|
@@ -3778,7 +3778,7 @@ const il = (e) => {
|
|
|
3778
3778
|
);
|
|
3779
3779
|
}, ll = ({
|
|
3780
3780
|
value: e
|
|
3781
|
-
}) =>
|
|
3781
|
+
}) => Ne(
|
|
3782
3782
|
() => /* @__PURE__ */ r(
|
|
3783
3783
|
"div",
|
|
3784
3784
|
{
|
|
@@ -3791,7 +3791,7 @@ const il = (e) => {
|
|
|
3791
3791
|
}
|
|
3792
3792
|
),
|
|
3793
3793
|
[e]
|
|
3794
|
-
), cl = ({ value: e }) =>
|
|
3794
|
+
), cl = ({ value: e }) => Ne(() => /* @__PURE__ */ r(rl, { m2oField: e }), [e]), dl = ({ value: e }) => Ne(
|
|
3795
3795
|
() => /* @__PURE__ */ r(
|
|
3796
3796
|
Xn,
|
|
3797
3797
|
{
|
|
@@ -3799,7 +3799,7 @@ const il = (e) => {
|
|
|
3799
3799
|
}
|
|
3800
3800
|
),
|
|
3801
3801
|
[e]
|
|
3802
|
-
), ul = ({ value: e }) =>
|
|
3802
|
+
), ul = ({ value: e }) => Ne(() => {
|
|
3803
3803
|
if (!e || e && e.length === 0)
|
|
3804
3804
|
return /* @__PURE__ */ r(J, {});
|
|
3805
3805
|
const t = Ze(
|
|
@@ -3807,7 +3807,7 @@ const il = (e) => {
|
|
|
3807
3807
|
ut.date.dateInternalFormat
|
|
3808
3808
|
).format(ut.date.dateDisplayFormat);
|
|
3809
3809
|
return /* @__PURE__ */ r(J, { children: t });
|
|
3810
|
-
}, [e]), fl = ({ value: e }) =>
|
|
3810
|
+
}, [e]), fl = ({ value: e }) => Ne(() => {
|
|
3811
3811
|
if (!e || e && e.length === 0)
|
|
3812
3812
|
return /* @__PURE__ */ r(J, {});
|
|
3813
3813
|
const t = Ze(
|
|
@@ -3817,15 +3817,15 @@ const il = (e) => {
|
|
|
3817
3817
|
return /* @__PURE__ */ r(J, { children: t });
|
|
3818
3818
|
}, [e]), Tr = ({
|
|
3819
3819
|
value: e
|
|
3820
|
-
}) =>
|
|
3820
|
+
}) => Ne(() => {
|
|
3821
3821
|
const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
|
|
3822
3822
|
return /* @__PURE__ */ r(J, { children: `( ${t} )` });
|
|
3823
3823
|
}, [e]), ml = ({
|
|
3824
3824
|
value: e
|
|
3825
|
-
}) =>
|
|
3825
|
+
}) => Ne(() => /* @__PURE__ */ r(bo, { value: e }), [e]), hl = ({ value: e }) => Ne(() => /* @__PURE__ */ r(J, { children: vo(e) }), [e]), Fr = ({ value: e }) => Ne(
|
|
3826
3826
|
() => /* @__PURE__ */ r("div", { style: { textAlign: "right" }, children: e }),
|
|
3827
3827
|
[e]
|
|
3828
|
-
), pl = ({ value: e }) =>
|
|
3828
|
+
), pl = ({ value: e }) => Ne(
|
|
3829
3829
|
() => /* @__PURE__ */ r(
|
|
3830
3830
|
"img",
|
|
3831
3831
|
{
|
|
@@ -3839,12 +3839,12 @@ const il = (e) => {
|
|
|
3839
3839
|
key: t,
|
|
3840
3840
|
ooui: n,
|
|
3841
3841
|
context: i
|
|
3842
|
-
}) =>
|
|
3842
|
+
}) => Ne(() => /* @__PURE__ */ r(ho, { ooui: n, value: e }), [n, e]), yl = ({
|
|
3843
3843
|
value: e,
|
|
3844
3844
|
key: t,
|
|
3845
3845
|
ooui: n,
|
|
3846
3846
|
context: i
|
|
3847
|
-
}) =>
|
|
3847
|
+
}) => Ne(() => {
|
|
3848
3848
|
let o = e;
|
|
3849
3849
|
return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ r(J, { children: n.selectionValues.get(o) });
|
|
3850
3850
|
}, [n, e]), wl = ({
|
|
@@ -3852,7 +3852,7 @@ const il = (e) => {
|
|
|
3852
3852
|
key: t,
|
|
3853
3853
|
ooui: n,
|
|
3854
3854
|
context: i
|
|
3855
|
-
}) =>
|
|
3855
|
+
}) => Ne(
|
|
3856
3856
|
() => /* @__PURE__ */ r(
|
|
3857
3857
|
ol,
|
|
3858
3858
|
{
|
|
@@ -3867,7 +3867,7 @@ const il = (e) => {
|
|
|
3867
3867
|
key: t,
|
|
3868
3868
|
ooui: n,
|
|
3869
3869
|
context: i
|
|
3870
|
-
}) =>
|
|
3870
|
+
}) => Ne(() => /* @__PURE__ */ r(il, { ooui: n, value: e }), [n, e]), bl = ({
|
|
3871
3871
|
value: e,
|
|
3872
3872
|
key: t,
|
|
3873
3873
|
ooui: n,
|
|
@@ -3876,7 +3876,7 @@ const il = (e) => {
|
|
|
3876
3876
|
const [o, s] = w([]), [a, l] = w(!1), { relation: d, field: u } = n, f = be(async () => {
|
|
3877
3877
|
try {
|
|
3878
3878
|
l(!0);
|
|
3879
|
-
const m = await
|
|
3879
|
+
const m = await N.getHandler().search({
|
|
3880
3880
|
model: d,
|
|
3881
3881
|
params: [["id", "in", e.items.map((p) => p.id)]],
|
|
3882
3882
|
fields: [u],
|
|
@@ -3897,14 +3897,14 @@ const il = (e) => {
|
|
|
3897
3897
|
fe(() => {
|
|
3898
3898
|
e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
|
|
3899
3899
|
}, [e == null ? void 0 : e.items]);
|
|
3900
|
-
const c =
|
|
3900
|
+
const c = Ne(
|
|
3901
3901
|
() => o.map((m) => {
|
|
3902
3902
|
const { id: p, name: h } = m, g = jt(h);
|
|
3903
3903
|
return /* @__PURE__ */ r(tr, { color: g, children: h }, `${p}`);
|
|
3904
3904
|
}),
|
|
3905
3905
|
[o]
|
|
3906
3906
|
);
|
|
3907
|
-
return
|
|
3907
|
+
return Ne(() => a ? /* @__PURE__ */ r(Le, {}) : /* @__PURE__ */ r(
|
|
3908
3908
|
"div",
|
|
3909
3909
|
{
|
|
3910
3910
|
style: {
|
|
@@ -3959,9 +3959,9 @@ const il = (e) => {
|
|
|
3959
3959
|
context: S,
|
|
3960
3960
|
readonly: V,
|
|
3961
3961
|
onSelectAllRecords: A
|
|
3962
|
-
} = e, F =
|
|
3962
|
+
} = e, F = le(null), [R, _] = w([]), x = le(!1), [O, k] = w(), { t: B } = pe(), q = le(i), E = ne(
|
|
3963
3963
|
ot
|
|
3964
|
-
), { title: K = void 0, setTitle:
|
|
3964
|
+
), { title: K = void 0, setTitle: M = void 0 } = (C ? E : {}) || {}, X = Ne(() => {
|
|
3965
3965
|
if (O)
|
|
3966
3966
|
return $s(
|
|
3967
3967
|
O,
|
|
@@ -3978,7 +3978,7 @@ const il = (e) => {
|
|
|
3978
3978
|
}
|
|
3979
3979
|
})), fe(() => {
|
|
3980
3980
|
const Z = It(s);
|
|
3981
|
-
k(Z), Z.string && K !== Z.string && (
|
|
3981
|
+
k(Z), Z.string && K !== Z.string && (M == null || M(Z.string));
|
|
3982
3982
|
}, [s, K]), fe(() => {
|
|
3983
3983
|
if (!O)
|
|
3984
3984
|
return;
|
|
@@ -3988,7 +3988,7 @@ const il = (e) => {
|
|
|
3988
3988
|
}, [a]), fe(() => {
|
|
3989
3989
|
q.current = i;
|
|
3990
3990
|
}, [i]);
|
|
3991
|
-
const z = (n - 1) * q.current + 1, te = z - 1 + R.length, W = o === void 0 ? null : o === 0 ? B("no_results") : B("summary").replace("{from}", z == null ? void 0 : z.toString()).replace("{to}", te == null ? void 0 : te.toString()).replace("{total}", o == null ? void 0 : o.toString()), $ =
|
|
3991
|
+
const z = (n - 1) * q.current + 1, te = z - 1 + R.length, W = o === void 0 ? null : o === 0 ? B("no_results") : B("summary").replace("{from}", z == null ? void 0 : z.toString()).replace("{to}", te == null ? void 0 : te.toString()).replace("{total}", o == null ? void 0 : o.toString()), $ = Ne(() => {
|
|
3992
3992
|
if (!f || s.isExpandable)
|
|
3993
3993
|
return null;
|
|
3994
3994
|
const Z = R == null ? void 0 : R.filter(
|
|
@@ -4028,7 +4028,7 @@ const il = (e) => {
|
|
|
4028
4028
|
W,
|
|
4029
4029
|
o,
|
|
4030
4030
|
s.isExpandable
|
|
4031
|
-
]), I =
|
|
4031
|
+
]), I = Ne(() => {
|
|
4032
4032
|
if (!O)
|
|
4033
4033
|
return null;
|
|
4034
4034
|
const Z = O.columns.filter((U) => U.sum !== void 0).map((U) => ({ label: U.sum, field: U.id }));
|
|
@@ -4036,13 +4036,13 @@ const il = (e) => {
|
|
|
4036
4036
|
return null;
|
|
4037
4037
|
const re = [], ye = (c == null ? void 0 : c.length) > 0 ? R.filter((U) => c.includes(U.id)) : R;
|
|
4038
4038
|
return Z.forEach((U) => {
|
|
4039
|
-
const
|
|
4040
|
-
re.push(`${U.label}: ${Math.round(
|
|
4039
|
+
const ae = ye.reduce((Fe, Me) => Me[U.field] && !isNaN(Me[U.field]) ? Fe + Me[U.field] : Fe, 0);
|
|
4040
|
+
re.push(`${U.label}: ${Math.round(ae * 100) / 100}`);
|
|
4041
4041
|
}), /* @__PURE__ */ r("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: re.join(", ") });
|
|
4042
|
-
}, [R, c, O]), P =
|
|
4042
|
+
}, [R, c, O]), P = Ne(() => {
|
|
4043
4043
|
if (O !== null && X && X.length > 0)
|
|
4044
4044
|
return za(X, R, 600);
|
|
4045
|
-
}, [X, R, O]), j =
|
|
4045
|
+
}, [X, R, O]), j = Ne(() => p && (O != null && O.columns.some((Z) => Z.sum !== void 0)) ? p - 30 : p, [p, O == null ? void 0 : O.columns]);
|
|
4046
4046
|
return O === null || !P || ((ce = P == null ? void 0 : P.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ r(Le, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(no, { children: [
|
|
4047
4047
|
$,
|
|
4048
4048
|
/* @__PURE__ */ r(
|
|
@@ -4083,7 +4083,7 @@ const il = (e) => {
|
|
|
4083
4083
|
en.displayName = "Tree";
|
|
4084
4084
|
xo.displayName = "UnmemoizedTree";
|
|
4085
4085
|
function xl(e, t) {
|
|
4086
|
-
var
|
|
4086
|
+
var Mt;
|
|
4087
4087
|
const {
|
|
4088
4088
|
model: n,
|
|
4089
4089
|
formView: i,
|
|
@@ -4096,12 +4096,12 @@ function xl(e, t) {
|
|
|
4096
4096
|
rootTree: f = !1,
|
|
4097
4097
|
parentContext: c = {},
|
|
4098
4098
|
onChangeSelectedRowKeys: m
|
|
4099
|
-
} = e, [p, h] = w(!1), [g, y] = w(!1), v =
|
|
4099
|
+
} = e, [p, h] = w(!1), [g, y] = w(!1), v = le(!1), T = le(null), [b, C] = w(), [S, V] = w(), [A, F] = w(), [R, _] = w(), [x, O] = w(200), k = le(), { height: B } = pn(), q = ne(
|
|
4100
4100
|
Et
|
|
4101
4101
|
), { processAction: E } = q || {}, K = ne(
|
|
4102
4102
|
ot
|
|
4103
4103
|
), {
|
|
4104
|
-
setResults:
|
|
4104
|
+
setResults: M = void 0,
|
|
4105
4105
|
setCurrentItemIndex: X = void 0,
|
|
4106
4106
|
currentId: z = void 0,
|
|
4107
4107
|
results: te = void 0,
|
|
@@ -4115,9 +4115,9 @@ function xl(e, t) {
|
|
|
4115
4115
|
setSorter: re = void 0,
|
|
4116
4116
|
setTotalItems: ye = void 0,
|
|
4117
4117
|
setSearchTreeNameSearch: U = void 0,
|
|
4118
|
-
setTreeIsLoading:
|
|
4118
|
+
setTreeIsLoading: ae = void 0,
|
|
4119
4119
|
searchValues: Fe = {},
|
|
4120
|
-
setSearchValues:
|
|
4120
|
+
setSearchValues: Me = void 0,
|
|
4121
4121
|
limit: Ee = Ut,
|
|
4122
4122
|
setLimit: Pe = void 0
|
|
4123
4123
|
} = (f ? K : {}) || {}, me = be(
|
|
@@ -4147,10 +4147,10 @@ function xl(e, t) {
|
|
|
4147
4147
|
setSearchTreeNameSearch: U,
|
|
4148
4148
|
setSelectedRowItems: me,
|
|
4149
4149
|
setSearchParams: P,
|
|
4150
|
-
setSearchValues:
|
|
4150
|
+
setSearchValues: Me,
|
|
4151
4151
|
searchParams: I,
|
|
4152
4152
|
setSearchVisible: ce,
|
|
4153
|
-
setTreeIsLoading:
|
|
4153
|
+
setTreeIsLoading: ae,
|
|
4154
4154
|
nameSearch: a,
|
|
4155
4155
|
searchNameGetDoneRef: v,
|
|
4156
4156
|
context: c,
|
|
@@ -4159,14 +4159,14 @@ function xl(e, t) {
|
|
|
4159
4159
|
sorter: Z,
|
|
4160
4160
|
setSorter: re,
|
|
4161
4161
|
setCurrentItemIndex: X,
|
|
4162
|
-
setResultsActionView:
|
|
4162
|
+
setResultsActionView: M,
|
|
4163
4163
|
resultsActionView: te,
|
|
4164
4164
|
domain: d,
|
|
4165
4165
|
currentId: z,
|
|
4166
4166
|
setActionViewTotalItems: ye,
|
|
4167
4167
|
limit: Ee,
|
|
4168
4168
|
setLimit: Pe,
|
|
4169
|
-
clearSelection: (
|
|
4169
|
+
clearSelection: (Mt = T.current) == null ? void 0 : Mt.unselectAll
|
|
4170
4170
|
});
|
|
4171
4171
|
gt(t, () => ({
|
|
4172
4172
|
refreshResults: () => {
|
|
@@ -4178,24 +4178,24 @@ function xl(e, t) {
|
|
|
4178
4178
|
g && u && S && (v.current = !1, se());
|
|
4179
4179
|
}, [Y, we, g, u, a, S]);
|
|
4180
4180
|
const oe = async () => {
|
|
4181
|
-
y(!1), h(!0), _(void 0),
|
|
4181
|
+
y(!1), h(!0), _(void 0), ae == null || ae(!0);
|
|
4182
4182
|
try {
|
|
4183
4183
|
await _e(), y(!0);
|
|
4184
4184
|
} catch (Ve) {
|
|
4185
|
-
_(Ve),
|
|
4185
|
+
_(Ve), ae == null || ae(!1);
|
|
4186
4186
|
} finally {
|
|
4187
4187
|
h(!1);
|
|
4188
4188
|
}
|
|
4189
4189
|
}, _e = async () => {
|
|
4190
4190
|
C(n);
|
|
4191
4191
|
let Ve = i;
|
|
4192
|
-
i || (Ve = await
|
|
4192
|
+
i || (Ve = await N.getHandler().getView({
|
|
4193
4193
|
model: n,
|
|
4194
4194
|
type: "form",
|
|
4195
4195
|
context: c
|
|
4196
4196
|
}));
|
|
4197
4197
|
let nt = o;
|
|
4198
|
-
o || (nt = await
|
|
4198
|
+
o || (nt = await N.getHandler().getView({
|
|
4199
4199
|
model: n,
|
|
4200
4200
|
type: "tree",
|
|
4201
4201
|
context: c
|
|
@@ -4212,7 +4212,7 @@ function xl(e, t) {
|
|
|
4212
4212
|
), Se = be(
|
|
4213
4213
|
async (Ve) => {
|
|
4214
4214
|
const { id: nt } = Ve;
|
|
4215
|
-
k.current || (k.current = await
|
|
4215
|
+
k.current || (k.current = await N.getHandler().treeButOpen({
|
|
4216
4216
|
id: S.view_id,
|
|
4217
4217
|
model: b,
|
|
4218
4218
|
context: c
|
|
@@ -4251,7 +4251,7 @@ function xl(e, t) {
|
|
|
4251
4251
|
), Qe = be(async () => {
|
|
4252
4252
|
const Ve = await G();
|
|
4253
4253
|
$ == null || $(Ve.map((nt) => ({ id: nt }))), m == null || m(Ve);
|
|
4254
|
-
}, [G, m, $]), Ye =
|
|
4254
|
+
}, [G, m, $]), Ye = Ne(() => S != null && S.isExpandable ? B - 160 : B - (x + 240), [B, x, S == null ? void 0 : S.isExpandable]), wt = Ne(
|
|
4255
4255
|
() => W == null ? void 0 : W.map((Ve) => Ve.id),
|
|
4256
4256
|
[W]
|
|
4257
4257
|
), dt = be(() => !S || !A ? null : /* @__PURE__ */ D(J, { children: [
|
|
@@ -4331,8 +4331,8 @@ function xl(e, t) {
|
|
|
4331
4331
|
Ae,
|
|
4332
4332
|
l,
|
|
4333
4333
|
S
|
|
4334
|
-
]),
|
|
4335
|
-
return
|
|
4334
|
+
]), Nt = R || Ke;
|
|
4335
|
+
return Nt ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: Nt, type: "error", banner: !0 }) : /* @__PURE__ */ r("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ r(Le, {}) : dt() });
|
|
4336
4336
|
}
|
|
4337
4337
|
const So = pt(xl), To = (e) => {
|
|
4338
4338
|
const {
|
|
@@ -4451,20 +4451,20 @@ const So = pt(xl), To = (e) => {
|
|
|
4451
4451
|
context: l,
|
|
4452
4452
|
id: d,
|
|
4453
4453
|
domain: u
|
|
4454
|
-
} = i, f = o && !a ? { backgroundColor: Fo.colorPrimaryBg } : void 0, [c, m] = w(!1), [p, h] = w(!1), [g, y] = w(!1), [v, T] = w(), b =
|
|
4454
|
+
} = i, f = o && !a ? { backgroundColor: Fo.colorPrimaryBg } : void 0, [c, m] = w(!1), [p, h] = w(!1), [g, y] = w(!1), [v, T] = w(), b = le(!1), [C, S] = w(""), V = le(), A = ne(Be), { domain: F, getValues: R, getFields: _, getContext: x, elementHasLostFocus: O } = A || {}, k = le([]), [B, q] = w([]), E = t && t[0] || void 0, K = t && t[1] || "";
|
|
4455
4455
|
fe(() => {
|
|
4456
4456
|
!Array.isArray(t) && t && W(t);
|
|
4457
4457
|
}, [t]), fe(() => {
|
|
4458
4458
|
E && K.length === 0 ? W(E) : E && K.length > 0 ? S(K) : !E && !K && S(V.current || "");
|
|
4459
4459
|
}, [t]);
|
|
4460
|
-
const
|
|
4460
|
+
const M = (j) => {
|
|
4461
4461
|
n == null || n(j), O == null || O();
|
|
4462
4462
|
}, X = (j) => {
|
|
4463
|
-
V.current = j.target.value,
|
|
4463
|
+
V.current = j.target.value, M([void 0, ""]);
|
|
4464
4464
|
}, z = async () => {
|
|
4465
4465
|
if (!g && C !== K) {
|
|
4466
4466
|
if (await new Promise((j) => setTimeout(j, 100)), b.current) {
|
|
4467
|
-
|
|
4467
|
+
M([void 0, ""]);
|
|
4468
4468
|
return;
|
|
4469
4469
|
}
|
|
4470
4470
|
y(!0);
|
|
@@ -4472,12 +4472,12 @@ const So = pt(xl), To = (e) => {
|
|
|
4472
4472
|
if (k.current && k.current.length > 0)
|
|
4473
4473
|
te(V.current);
|
|
4474
4474
|
else {
|
|
4475
|
-
const j = await
|
|
4475
|
+
const j = await N.getHandler().nameSearch({
|
|
4476
4476
|
model: s,
|
|
4477
4477
|
payload: V.current,
|
|
4478
4478
|
context: { ...x == null ? void 0 : x(), ...l }
|
|
4479
4479
|
});
|
|
4480
|
-
j.length === 1 ? (V.current = void 0,
|
|
4480
|
+
j.length === 1 ? (V.current = void 0, M(j[0])) : te(V.current);
|
|
4481
4481
|
}
|
|
4482
4482
|
} catch (j) {
|
|
4483
4483
|
an(j);
|
|
@@ -4487,7 +4487,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4487
4487
|
}
|
|
4488
4488
|
}, te = async (j) => {
|
|
4489
4489
|
if (await $(), k.current && k.current.length > 0) {
|
|
4490
|
-
const ce = await
|
|
4490
|
+
const ce = await N.getHandler().searchAllIds({
|
|
4491
4491
|
params: k.current,
|
|
4492
4492
|
model: s,
|
|
4493
4493
|
context: { ...x == null ? void 0 : x(), ...l },
|
|
@@ -4500,13 +4500,13 @@ const So = pt(xl), To = (e) => {
|
|
|
4500
4500
|
}, W = async (j) => {
|
|
4501
4501
|
y(!0);
|
|
4502
4502
|
try {
|
|
4503
|
-
const ce = await
|
|
4503
|
+
const ce = await N.getHandler().execute({
|
|
4504
4504
|
action: "name_get",
|
|
4505
4505
|
payload: [j],
|
|
4506
4506
|
model: s,
|
|
4507
4507
|
context: { ...x == null ? void 0 : x(), ...l }
|
|
4508
4508
|
});
|
|
4509
|
-
|
|
4509
|
+
M([j, ce[0][1]]);
|
|
4510
4510
|
} catch (ce) {
|
|
4511
4511
|
an(ce);
|
|
4512
4512
|
} finally {
|
|
@@ -4514,7 +4514,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4514
4514
|
}
|
|
4515
4515
|
};
|
|
4516
4516
|
async function $() {
|
|
4517
|
-
u && (k.current = await
|
|
4517
|
+
u && (k.current = await N.getHandler().evalDomain({
|
|
4518
4518
|
domain: u,
|
|
4519
4519
|
values: kt({
|
|
4520
4520
|
fields: _(),
|
|
@@ -4530,7 +4530,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4530
4530
|
)), q(k.current);
|
|
4531
4531
|
}
|
|
4532
4532
|
async function I(j) {
|
|
4533
|
-
j.keyCode === 13 ? (j.preventDefault(), j.stopPropagation(), await z()) : j.code === "Backspace" && E !== void 0 && (j.preventDefault(), j.stopPropagation(),
|
|
4533
|
+
j.keyCode === 13 ? (j.preventDefault(), j.stopPropagation(), await z()) : j.code === "Backspace" && E !== void 0 && (j.preventDefault(), j.stopPropagation(), M([void 0, ""]));
|
|
4534
4534
|
}
|
|
4535
4535
|
return /* @__PURE__ */ D(Te, { gutter: 8, wrap: !1, children: [
|
|
4536
4536
|
/* @__PURE__ */ r(de, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ r(
|
|
@@ -4654,15 +4654,15 @@ const So = pt(xl), To = (e) => {
|
|
|
4654
4654
|
operator: f,
|
|
4655
4655
|
manualIds: c
|
|
4656
4656
|
} = e, [m, p] = w(!1), [h, g] = w(), [y, v] = w(), [T, b] = w(), [C, S] = w(0), [V, A] = w(0), [F, R] = w(), [_, x] = w(), [O, k] = w(), [B] = et(
|
|
4657
|
-
|
|
4657
|
+
N.getHandler().searchAllIds
|
|
4658
4658
|
), [q] = et(
|
|
4659
|
-
|
|
4659
|
+
N.getHandler().readObjects
|
|
4660
4660
|
), [E] = et(
|
|
4661
|
-
|
|
4661
|
+
N.getHandler().searchCount
|
|
4662
4662
|
), [K] = et(
|
|
4663
|
-
|
|
4664
|
-
), [
|
|
4665
|
-
|
|
4663
|
+
N.getHandler().evalDomain
|
|
4664
|
+
), [M] = et(
|
|
4665
|
+
N.getHandler().parseCondition
|
|
4666
4666
|
);
|
|
4667
4667
|
fe(() => {
|
|
4668
4668
|
te();
|
|
@@ -4735,7 +4735,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4735
4735
|
}), b(W);
|
|
4736
4736
|
}
|
|
4737
4737
|
if (W ? ($ = Math.round(I / W * 100 * 100) / 100, v($)) : v(0), o) {
|
|
4738
|
-
const P = await
|
|
4738
|
+
const P = await M({
|
|
4739
4739
|
condition: o,
|
|
4740
4740
|
values: { value: I, percent: $ },
|
|
4741
4741
|
context: i
|
|
@@ -4744,7 +4744,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4744
4744
|
}
|
|
4745
4745
|
if (l)
|
|
4746
4746
|
if (l.indexOf(":") !== -1) {
|
|
4747
|
-
const P = await
|
|
4747
|
+
const P = await M({
|
|
4748
4748
|
condition: l,
|
|
4749
4749
|
values: { value: I, percent: $ },
|
|
4750
4750
|
context: i
|
|
@@ -4919,7 +4919,7 @@ const Fn = (e) => (t) => {
|
|
|
4919
4919
|
useGrouping: !0
|
|
4920
4920
|
});
|
|
4921
4921
|
if (El(e)) {
|
|
4922
|
-
const t =
|
|
4922
|
+
const t = Nl(e);
|
|
4923
4923
|
return t === null ? e : Ze(e, dn.input[t]).format(
|
|
4924
4924
|
dn.output[t]
|
|
4925
4925
|
);
|
|
@@ -5026,7 +5026,7 @@ const dn = {
|
|
|
5026
5026
|
years: "YYYY"
|
|
5027
5027
|
}
|
|
5028
5028
|
};
|
|
5029
|
-
function
|
|
5029
|
+
function Nl(e) {
|
|
5030
5030
|
for (const t in dn.input)
|
|
5031
5031
|
if (Ze(
|
|
5032
5032
|
e,
|
|
@@ -5036,7 +5036,7 @@ function Ml(e) {
|
|
|
5036
5036
|
return t;
|
|
5037
5037
|
return null;
|
|
5038
5038
|
}
|
|
5039
|
-
const { processGraphData:
|
|
5039
|
+
const { processGraphData: Ml } = Kr, { getFieldsToRetrieve: Pl } = hi, Ll = (e) => {
|
|
5040
5040
|
const {
|
|
5041
5041
|
model: t,
|
|
5042
5042
|
domain: n = [],
|
|
@@ -5046,10 +5046,10 @@ const { processGraphData: Nl } = Kr, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
|
|
|
5046
5046
|
uninformedString: a,
|
|
5047
5047
|
manualIds: l
|
|
5048
5048
|
} = e, [d, u] = w(!1), [f, c] = w(), [m, p] = w(), [h, g] = w(), [y, v] = w("line"), [T] = et(
|
|
5049
|
-
|
|
5049
|
+
N.getHandler().getFields
|
|
5050
5050
|
), [b] = et(
|
|
5051
|
-
|
|
5052
|
-
), [C] = et(
|
|
5051
|
+
N.getHandler().readObjects
|
|
5052
|
+
), [C] = et(N.getHandler().search), S = be(async () => {
|
|
5053
5053
|
u(!0), c(void 0);
|
|
5054
5054
|
const V = Hn(o);
|
|
5055
5055
|
v(V.type || "line");
|
|
@@ -5085,7 +5085,7 @@ const { processGraphData: Nl } = Kr, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
|
|
|
5085
5085
|
fetchData: S
|
|
5086
5086
|
};
|
|
5087
5087
|
g(F);
|
|
5088
|
-
const _ =
|
|
5088
|
+
const _ = Ml({
|
|
5089
5089
|
ooui: V,
|
|
5090
5090
|
values: F,
|
|
5091
5091
|
fields: R,
|
|
@@ -5178,7 +5178,7 @@ async function Bl({
|
|
|
5178
5178
|
};
|
|
5179
5179
|
}
|
|
5180
5180
|
const Hl = {
|
|
5181
|
-
line:
|
|
5181
|
+
line: Mi,
|
|
5182
5182
|
bar: Pi,
|
|
5183
5183
|
pie: Li
|
|
5184
5184
|
}, Kl = (e) => {
|
|
@@ -5229,7 +5229,7 @@ function jl(e) {
|
|
|
5229
5229
|
const Wl = (e, t) => {
|
|
5230
5230
|
const { view_id: n, model: i, context: o, domain: s, limit: a, manualIds: l } = e, [d, u] = w(!1), [f, c] = w(), [m, p] = w(), h = ne(
|
|
5231
5231
|
ot
|
|
5232
|
-
), { setGraphIsLoading: g = void 0 } = h || {}, [y] = et(
|
|
5232
|
+
), { setGraphIsLoading: g = void 0 } = h || {}, [y] = et(N.getHandler().getView);
|
|
5233
5233
|
gt(t, () => ({
|
|
5234
5234
|
refresh: () => {
|
|
5235
5235
|
v();
|
|
@@ -5464,14 +5464,14 @@ const Ql = (e) => {
|
|
|
5464
5464
|
var Ae;
|
|
5465
5465
|
const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = ne(
|
|
5466
5466
|
_o
|
|
5467
|
-
), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = pe(), [v, T] = w(!1), [b, C] = w(!1), [S, V] = w(), [A, F] = w(!1), [R, _] = w(!1), [x, O] = w(), [k, B] = w([]), [q, E] = w(!1), K =
|
|
5467
|
+
), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = pe(), [v, T] = w(!1), [b, C] = w(!1), [S, V] = w(), [A, F] = w(!1), [R, _] = w(!1), [x, O] = w(), [k, B] = w([]), [q, E] = w(!1), K = le([]), [M, X] = w(), z = le(), [te, W] = w(void 0), {
|
|
5468
5468
|
readOnly: $,
|
|
5469
5469
|
relation: I,
|
|
5470
5470
|
context: P,
|
|
5471
5471
|
domain: j
|
|
5472
5472
|
} = i, ce = i.type === "many2many", { id: Z } = i, re = s.filter(
|
|
5473
5473
|
(G) => (G.values || G.treeValues) && G.operation !== "pendingRemove"
|
|
5474
|
-
), ye =
|
|
5474
|
+
), ye = le();
|
|
5475
5475
|
fe(() => {
|
|
5476
5476
|
if (ye.current !== a) {
|
|
5477
5477
|
ye.current = a, U();
|
|
@@ -5485,15 +5485,15 @@ const Ql = (e) => {
|
|
|
5485
5485
|
fe(() => {
|
|
5486
5486
|
Ee();
|
|
5487
5487
|
}, [g]);
|
|
5488
|
-
const
|
|
5488
|
+
const ae = (G) => {
|
|
5489
5489
|
var oe, _e;
|
|
5490
5490
|
n == null || n({
|
|
5491
5491
|
fields: ((oe = o.get("form")) == null ? void 0 : oe.fields) || ((_e = o.get("tree")) == null ? void 0 : _e.fields),
|
|
5492
5492
|
items: Zl(G)
|
|
5493
5493
|
});
|
|
5494
5494
|
}, Fe = async () => {
|
|
5495
|
-
await
|
|
5496
|
-
},
|
|
5495
|
+
await Me(), d > re.length - 1 && d !== 0 && u(0);
|
|
5496
|
+
}, Me = async (G) => {
|
|
5497
5497
|
var oe, _e, Ce;
|
|
5498
5498
|
C(!0), T(!1), V(void 0);
|
|
5499
5499
|
try {
|
|
@@ -5510,7 +5510,7 @@ const Ql = (e) => {
|
|
|
5510
5510
|
context: { ...h == null ? void 0 : h(), ...P },
|
|
5511
5511
|
currentView: G || a
|
|
5512
5512
|
});
|
|
5513
|
-
return z.current || (z.current = Se.map((Qe) => Qe.id)), (a || G) === "tree" && Oe && W(Oe),
|
|
5513
|
+
return z.current || (z.current = Se.map((Qe) => Qe.id)), (a || G) === "tree" && Oe && W(Oe), ae(Se), Se;
|
|
5514
5514
|
} catch (Se) {
|
|
5515
5515
|
V(Se);
|
|
5516
5516
|
} finally {
|
|
@@ -5518,7 +5518,7 @@ const Ql = (e) => {
|
|
|
5518
5518
|
}
|
|
5519
5519
|
};
|
|
5520
5520
|
async function Ee() {
|
|
5521
|
-
j && (K.current = await
|
|
5521
|
+
j && (K.current = await N.getHandler().evalDomain({
|
|
5522
5522
|
domain: j,
|
|
5523
5523
|
values: kt({
|
|
5524
5524
|
fields: m(),
|
|
@@ -5548,12 +5548,12 @@ const Ql = (e) => {
|
|
|
5548
5548
|
u(d + 1);
|
|
5549
5549
|
}) : u(d + 1));
|
|
5550
5550
|
}, $e = async () => {
|
|
5551
|
-
const G = re[d].id, oe = (await
|
|
5551
|
+
const G = re[d].id, oe = (await N.getHandler().readObjects({
|
|
5552
5552
|
model: I,
|
|
5553
5553
|
ids: [G],
|
|
5554
5554
|
fields: o.get("form").fields,
|
|
5555
5555
|
context: { ...h == null ? void 0 : h(), ...P }
|
|
5556
|
-
}))[0], _e = (await
|
|
5556
|
+
}))[0], _e = (await N.getHandler().readObjects({
|
|
5557
5557
|
model: I,
|
|
5558
5558
|
ids: [G],
|
|
5559
5559
|
fields: o.get("tree").fields,
|
|
@@ -5564,7 +5564,7 @@ const Ql = (e) => {
|
|
|
5564
5564
|
values: oe,
|
|
5565
5565
|
treeValues: _e
|
|
5566
5566
|
} : Se);
|
|
5567
|
-
|
|
5567
|
+
ae(Ce);
|
|
5568
5568
|
}, se = (G) => {
|
|
5569
5569
|
v ? Xt({
|
|
5570
5570
|
t: y,
|
|
@@ -5606,9 +5606,9 @@ const Ql = (e) => {
|
|
|
5606
5606
|
...oe,
|
|
5607
5607
|
operation: "pendingRemove"
|
|
5608
5608
|
} : oe);
|
|
5609
|
-
|
|
5609
|
+
ae(G);
|
|
5610
5610
|
} else
|
|
5611
|
-
|
|
5611
|
+
ae(
|
|
5612
5612
|
s.filter((G) => G.id !== re[d].id)
|
|
5613
5613
|
);
|
|
5614
5614
|
} catch (G) {
|
|
@@ -5623,7 +5623,7 @@ const Ql = (e) => {
|
|
|
5623
5623
|
...Ce,
|
|
5624
5624
|
operation: "pendingRemove"
|
|
5625
5625
|
} : Ce);
|
|
5626
|
-
|
|
5626
|
+
ae(_e);
|
|
5627
5627
|
} catch (oe) {
|
|
5628
5628
|
V(oe);
|
|
5629
5629
|
}
|
|
@@ -5653,23 +5653,23 @@ const Ql = (e) => {
|
|
|
5653
5653
|
treeValues: { ..._e, id: Oe }
|
|
5654
5654
|
});
|
|
5655
5655
|
}
|
|
5656
|
-
|
|
5656
|
+
ae(Se), q || F(!1);
|
|
5657
5657
|
}, ue = async (G) => {
|
|
5658
5658
|
const { id: oe } = G;
|
|
5659
5659
|
let _e = s;
|
|
5660
5660
|
const Ce = s.find((Se) => Se.id === oe);
|
|
5661
|
-
(Ce == null ? void 0 : Ce.values) === void 0 && (_e = await
|
|
5661
|
+
(Ce == null ? void 0 : Ce.values) === void 0 && (_e = await Me("form")), O(_e.find((Se) => Se.id === oe)), E(!1), F(!0);
|
|
5662
5662
|
}, he = async (G) => {
|
|
5663
5663
|
C(!0);
|
|
5664
5664
|
const oe = s, _e = G.filter((Ce) => !s.find((Se) => Se.id === Ce));
|
|
5665
5665
|
try {
|
|
5666
5666
|
for (const Ce of _e) {
|
|
5667
|
-
const Se = (await
|
|
5667
|
+
const Se = (await N.getHandler().readObjects({
|
|
5668
5668
|
model: I,
|
|
5669
5669
|
ids: [Ce],
|
|
5670
5670
|
fields: o.get("form").fields,
|
|
5671
5671
|
context: { ...h == null ? void 0 : h(), ...P }
|
|
5672
|
-
}))[0], Oe = (await
|
|
5672
|
+
}))[0], Oe = (await N.getHandler().readObjects({
|
|
5673
5673
|
model: I,
|
|
5674
5674
|
ids: [Ce],
|
|
5675
5675
|
fields: o.get("tree").fields,
|
|
@@ -5682,7 +5682,7 @@ const Ql = (e) => {
|
|
|
5682
5682
|
treeValues: Oe
|
|
5683
5683
|
});
|
|
5684
5684
|
}
|
|
5685
|
-
|
|
5685
|
+
ae(oe);
|
|
5686
5686
|
} catch (Ce) {
|
|
5687
5687
|
V(Ce);
|
|
5688
5688
|
} finally {
|
|
@@ -5718,15 +5718,15 @@ const Ql = (e) => {
|
|
|
5718
5718
|
values: { ...Oe, id: Qe },
|
|
5719
5719
|
treeValues: { ...Oe, id: Qe }
|
|
5720
5720
|
} : dt);
|
|
5721
|
-
|
|
5721
|
+
ae(Ye), T(!0);
|
|
5722
5722
|
},
|
|
5723
5723
|
readOnly: $
|
|
5724
5724
|
}
|
|
5725
5725
|
);
|
|
5726
5726
|
let G = [];
|
|
5727
|
-
if (re.some((Oe) => Oe.treeValues) && (G =
|
|
5727
|
+
if (re.some((Oe) => Oe.treeValues) && (G = M ? Ot({
|
|
5728
5728
|
resultsToSort: re.map((Oe) => Oe.treeValues),
|
|
5729
|
-
sorter:
|
|
5729
|
+
sorter: M,
|
|
5730
5730
|
fields: {
|
|
5731
5731
|
...o.get("tree").fields,
|
|
5732
5732
|
...((Ce = o.get("form")) == null ? void 0 : Ce.fields) || {}
|
|
@@ -5744,7 +5744,7 @@ const Ql = (e) => {
|
|
|
5744
5744
|
showPagination: !1,
|
|
5745
5745
|
selectedRowKeys: k,
|
|
5746
5746
|
onRowSelectionChange: B,
|
|
5747
|
-
sorter:
|
|
5747
|
+
sorter: M,
|
|
5748
5748
|
onChangeSort: X,
|
|
5749
5749
|
context: { ...h == null ? void 0 : h(), ...P },
|
|
5750
5750
|
colorsForResults: te,
|
|
@@ -5833,7 +5833,7 @@ const Ql = (e) => {
|
|
|
5833
5833
|
xt(() => {
|
|
5834
5834
|
v();
|
|
5835
5835
|
}, [t]);
|
|
5836
|
-
const y = async (b) => o && o[b] ? o[b] : await
|
|
5836
|
+
const y = async (b) => o && o[b] ? o[b] : await N.getHandler().getView({
|
|
5837
5837
|
model: i,
|
|
5838
5838
|
type: b,
|
|
5839
5839
|
context: { ...g == null ? void 0 : g(), ...a }
|
|
@@ -5879,7 +5879,7 @@ const Ql = (e) => {
|
|
|
5879
5879
|
const { ooui: t } = e, { required: n } = t;
|
|
5880
5880
|
return /* @__PURE__ */ r(xe, { required: n, type: "number", ...e, children: /* @__PURE__ */ r(rc, { ooui: t }) });
|
|
5881
5881
|
}, rc = (e) => {
|
|
5882
|
-
const { ooui: t, value: n, onChange: i } = e, { id: o, readOnly: s, required: a } = t, { token: l } = tc(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u =
|
|
5882
|
+
const { ooui: t, value: n, onChange: i } = e, { id: o, readOnly: s, required: a } = t, { token: l } = tc(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = le(), [f, c] = w(), m = ne(Be), { elementHasLostFocus: p } = m || {};
|
|
5883
5883
|
fe(() => {
|
|
5884
5884
|
c(vo(n));
|
|
5885
5885
|
}, [n]);
|
|
@@ -6076,7 +6076,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6076
6076
|
limit: o,
|
|
6077
6077
|
onClose: s
|
|
6078
6078
|
}) => {
|
|
6079
|
-
const a =
|
|
6079
|
+
const a = le({}), l = le(/* @__PURE__ */ new Map()), { t: d } = pe(), u = be(
|
|
6080
6080
|
async (y) => {
|
|
6081
6081
|
if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
|
|
6082
6082
|
ft(d("selectAtLeastOneField"));
|
|
@@ -6086,7 +6086,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6086
6086
|
y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (v = [
|
|
6087
6087
|
["id", "in", n == null ? void 0 : n.map((C) => C.id)]
|
|
6088
6088
|
]);
|
|
6089
|
-
const { datas: T } = await
|
|
6089
|
+
const { datas: T } = await N.getHandler().exportData({
|
|
6090
6090
|
model: e,
|
|
6091
6091
|
fields: gc({
|
|
6092
6092
|
keys: y.selectedKeys,
|
|
@@ -6103,7 +6103,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6103
6103
|
},
|
|
6104
6104
|
[e, i, o, t, s]
|
|
6105
6105
|
), f = be(async () => {
|
|
6106
|
-
const y = await
|
|
6106
|
+
const y = await N.getHandler().getFields({
|
|
6107
6107
|
model: e,
|
|
6108
6108
|
context: t,
|
|
6109
6109
|
fields: []
|
|
@@ -6111,7 +6111,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6111
6111
|
return a.current["/"] = y, Ir({ fields: y });
|
|
6112
6112
|
}, [e, t, a]), c = be(
|
|
6113
6113
|
async (y) => {
|
|
6114
|
-
const T = Pn(y, a.current)[
|
|
6114
|
+
const T = Pn(y, a.current)[Mn(y)], b = T.relation, C = await N.getHandler().getFields({
|
|
6115
6115
|
model: b,
|
|
6116
6116
|
context: t,
|
|
6117
6117
|
fields: []
|
|
@@ -6137,7 +6137,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6137
6137
|
predefinedExports: y.map((b) => ({
|
|
6138
6138
|
...b,
|
|
6139
6139
|
fields: b.fields.map((C) => {
|
|
6140
|
-
const S =
|
|
6140
|
+
const S = Mn(C.key), A = Pn(C.key, a.current)[S];
|
|
6141
6141
|
return {
|
|
6142
6142
|
key: C.key,
|
|
6143
6143
|
title: A.string
|
|
@@ -6148,7 +6148,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6148
6148
|
};
|
|
6149
6149
|
}, [a.current]), p = be(
|
|
6150
6150
|
async (y) => {
|
|
6151
|
-
const v = await g("ir.exports"), T = await g("ir.exports.line"), b = await
|
|
6151
|
+
const v = await g("ir.exports"), T = await g("ir.exports.line"), b = await N.getHandler().create({
|
|
6152
6152
|
model: "ir.exports",
|
|
6153
6153
|
values: {
|
|
6154
6154
|
name: y.name,
|
|
@@ -6158,7 +6158,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6158
6158
|
context: t
|
|
6159
6159
|
});
|
|
6160
6160
|
return await Promise.all(
|
|
6161
|
-
y.fields.map(async (C) => await
|
|
6161
|
+
y.fields.map(async (C) => await N.getHandler().create({
|
|
6162
6162
|
model: "ir.exports.line",
|
|
6163
6163
|
values: {
|
|
6164
6164
|
name: C.key,
|
|
@@ -6172,7 +6172,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6172
6172
|
[]
|
|
6173
6173
|
), h = be(
|
|
6174
6174
|
async (y) => {
|
|
6175
|
-
await
|
|
6175
|
+
await N.getHandler().deleteObjects({
|
|
6176
6176
|
model: "ir.exports",
|
|
6177
6177
|
ids: [y.id],
|
|
6178
6178
|
context: t
|
|
@@ -6183,7 +6183,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6183
6183
|
async (y) => {
|
|
6184
6184
|
if (l.current.has(y))
|
|
6185
6185
|
return l.current.get(y);
|
|
6186
|
-
const v =
|
|
6186
|
+
const v = N.getHandler().getFields({
|
|
6187
6187
|
model: y,
|
|
6188
6188
|
context: t,
|
|
6189
6189
|
fields: []
|
|
@@ -6222,23 +6222,23 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6222
6222
|
}, Vo = (e) => e.type === "many2one" || e.type === "one2many" || e.type === "many2many", uc = ({
|
|
6223
6223
|
parentKey: e,
|
|
6224
6224
|
key: t
|
|
6225
|
-
}) => `${e ? e + "/" : ""}${t}`,
|
|
6225
|
+
}) => `${e ? e + "/" : ""}${t}`, Nn = (e) => e.indexOf("/") === -1 ? e : e.split("/").slice(0, -1).join("/"), Mn = (e) => {
|
|
6226
6226
|
if (e.indexOf("/") === -1)
|
|
6227
6227
|
return e;
|
|
6228
6228
|
const t = e.split("/");
|
|
6229
6229
|
return t[t.length - 1];
|
|
6230
|
-
}, Pn = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[
|
|
6230
|
+
}, Pn = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[Nn(e)], fc = ({
|
|
6231
6231
|
title: e,
|
|
6232
6232
|
parentTitle: t
|
|
6233
6233
|
}) => `${t ? t + " → " : ""}${e}`, mc = async ({
|
|
6234
6234
|
model: e,
|
|
6235
6235
|
context: t
|
|
6236
6236
|
}) => {
|
|
6237
|
-
const n = await
|
|
6237
|
+
const n = await N.getHandler().search({
|
|
6238
6238
|
model: "ir.exports",
|
|
6239
6239
|
params: [["resource", "=", e]],
|
|
6240
6240
|
context: t
|
|
6241
|
-
}), i = n.flatMap((s) => s.export_fields), o = await
|
|
6241
|
+
}), i = n.flatMap((s) => s.export_fields), o = await N.getHandler().readObjects({
|
|
6242
6242
|
model: "ir.exports.line",
|
|
6243
6243
|
ids: i,
|
|
6244
6244
|
context: t
|
|
@@ -6257,8 +6257,8 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6257
6257
|
...new Set(
|
|
6258
6258
|
t.filter((n) => {
|
|
6259
6259
|
var i, o;
|
|
6260
|
-
return n.indexOf("/") === -1 ? !((i = e["/"]) != null && i[n]) : !((o = e == null ? void 0 : e[
|
|
6261
|
-
}).map((n) =>
|
|
6260
|
+
return n.indexOf("/") === -1 ? !((i = e["/"]) != null && i[n]) : !((o = e == null ? void 0 : e[Nn(n)]) != null && o[n]);
|
|
6261
|
+
}).map((n) => Nn(n))
|
|
6262
6262
|
)
|
|
6263
6263
|
]), pc = async ({
|
|
6264
6264
|
predefinedExports: e,
|
|
@@ -6278,7 +6278,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6278
6278
|
keys: e,
|
|
6279
6279
|
fields: t
|
|
6280
6280
|
}) => e.map((n) => {
|
|
6281
|
-
const i =
|
|
6281
|
+
const i = Mn(n), s = Pn(n, t)[i];
|
|
6282
6282
|
return Vo(s) ? `${n}/id` : n;
|
|
6283
6283
|
}), yc = (e) => {
|
|
6284
6284
|
const t = /* @__PURE__ */ new Map(), n = [];
|
|
@@ -6408,7 +6408,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
|
|
|
6408
6408
|
const { ooui: t } = e, { required: n } = t;
|
|
6409
6409
|
return /* @__PURE__ */ r(xe, { required: n, ...e, children: /* @__PURE__ */ r(_c, { ooui: t }) });
|
|
6410
6410
|
}, _c = (e) => {
|
|
6411
|
-
const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Fc(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u =
|
|
6411
|
+
const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Fc(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = le(null), { setFieldValue: f, getFieldValue: c } = ne(Be) || {}, { t: m } = pe(), p = n ? ks(n) : "", h = (b) => {
|
|
6412
6412
|
i == null || i(b);
|
|
6413
6413
|
};
|
|
6414
6414
|
async function g() {
|
|
@@ -6499,7 +6499,7 @@ function rr(e) {
|
|
|
6499
6499
|
disabled: o = !1,
|
|
6500
6500
|
formHasChanges: s = !1,
|
|
6501
6501
|
previousView: a
|
|
6502
|
-
} = e, { t: l } = pe(), d =
|
|
6502
|
+
} = e, { t: l } = pe(), d = Ne(() => [
|
|
6503
6503
|
{
|
|
6504
6504
|
label: l("viewAs"),
|
|
6505
6505
|
items: n.map((c, m) => {
|
|
@@ -6639,7 +6639,7 @@ const { confirm: Ic } = Je, Oc = ({
|
|
|
6639
6639
|
});
|
|
6640
6640
|
};
|
|
6641
6641
|
async function Do(e, t, n) {
|
|
6642
|
-
const i = (await
|
|
6642
|
+
const i = (await N.getHandler().getLogInfo({
|
|
6643
6643
|
model: e,
|
|
6644
6644
|
ids: [t]
|
|
6645
6645
|
}))[0], { create_date: o, create_uid: s, id: a, write_date: l, write_uid: d } = i;
|
|
@@ -6773,7 +6773,7 @@ function Dc(e) {
|
|
|
6773
6773
|
} = e, { formRef: a } = ne(ot), [l, d] = w(!1), [u, f] = w([]), [c, m] = w(!1), { t: p } = pe(), h = be(async () => {
|
|
6774
6774
|
d(!0);
|
|
6775
6775
|
try {
|
|
6776
|
-
const v = await
|
|
6776
|
+
const v = await N.getHandler().readObjects({
|
|
6777
6777
|
model: "ir.attachment",
|
|
6778
6778
|
ids: t.map((T) => T.id),
|
|
6779
6779
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
@@ -6799,7 +6799,7 @@ function Dc(e) {
|
|
|
6799
6799
|
m(!0);
|
|
6800
6800
|
let T;
|
|
6801
6801
|
try {
|
|
6802
|
-
T = (await
|
|
6802
|
+
T = (await N.getHandler().readObjects({
|
|
6803
6803
|
model: "ir.attachment",
|
|
6804
6804
|
ids: [v.id],
|
|
6805
6805
|
context: a.current.getContext()
|
|
@@ -6904,7 +6904,7 @@ function kc({ toolbar: e }) {
|
|
|
6904
6904
|
function K() {
|
|
6905
6905
|
d && d.length > f + 1 ? (u == null || u(f + 1), c == null || c(d[f + 1].id)) : d && f + 1 === d.length && (u == null || u(0), c == null || c(d[0].id));
|
|
6906
6906
|
}
|
|
6907
|
-
function
|
|
6907
|
+
function M() {
|
|
6908
6908
|
d && f > 0 ? (u == null || u(f - 1), c == null || c(d[f - 1].id)) : d && f === 0 && (u == null || u(d.length - 1), c == null || c(d[d.length - 1].id));
|
|
6909
6909
|
}
|
|
6910
6910
|
function X() {
|
|
@@ -6918,7 +6918,7 @@ function kc({ toolbar: e }) {
|
|
|
6918
6918
|
}
|
|
6919
6919
|
async function z() {
|
|
6920
6920
|
try {
|
|
6921
|
-
p == null || p(!0), await
|
|
6921
|
+
p == null || p(!0), await N.getHandler().deleteObjects({
|
|
6922
6922
|
model: m,
|
|
6923
6923
|
ids: [l],
|
|
6924
6924
|
context: C.current.getContext()
|
|
@@ -6936,7 +6936,7 @@ function kc({ toolbar: e }) {
|
|
|
6936
6936
|
async function te() {
|
|
6937
6937
|
try {
|
|
6938
6938
|
y == null || y(!0);
|
|
6939
|
-
const I = await
|
|
6939
|
+
const I = await N.getHandler().duplicate({
|
|
6940
6940
|
id: l,
|
|
6941
6941
|
model: m,
|
|
6942
6942
|
context: C.current.getContext()
|
|
@@ -7053,7 +7053,7 @@ function kc({ toolbar: e }) {
|
|
|
7053
7053
|
disabled: W,
|
|
7054
7054
|
loading: !1,
|
|
7055
7055
|
onClick: () => {
|
|
7056
|
-
E(
|
|
7056
|
+
E(M);
|
|
7057
7057
|
}
|
|
7058
7058
|
}
|
|
7059
7059
|
),
|
|
@@ -7257,7 +7257,7 @@ const { useToken: Ec } = He, ko = (e) => {
|
|
|
7257
7257
|
}
|
|
7258
7258
|
) })
|
|
7259
7259
|
] });
|
|
7260
|
-
},
|
|
7260
|
+
}, Nc = (e) => {
|
|
7261
7261
|
const { ooui: t } = e, { required: n } = t;
|
|
7262
7262
|
return /* @__PURE__ */ r(xe, { required: n, ...e, children: /* @__PURE__ */ r(
|
|
7263
7263
|
ko,
|
|
@@ -7266,7 +7266,7 @@ const { useToken: Ec } = He, ko = (e) => {
|
|
|
7266
7266
|
valueValidator: (i) => i ? Qi(i) : !1
|
|
7267
7267
|
}
|
|
7268
7268
|
) });
|
|
7269
|
-
},
|
|
7269
|
+
}, Mc = (e) => {
|
|
7270
7270
|
const { ooui: t } = e, { required: n } = t;
|
|
7271
7271
|
return /* @__PURE__ */ r(xe, { required: n, ...e, children: /* @__PURE__ */ r(
|
|
7272
7272
|
ko,
|
|
@@ -7277,7 +7277,7 @@ const { useToken: Ec } = He, ko = (e) => {
|
|
|
7277
7277
|
}
|
|
7278
7278
|
) });
|
|
7279
7279
|
}, Pc = (e) => {
|
|
7280
|
-
const { visible: t, onIdSubmitted: n, onCancel: i, isSearching: o } = e, { t: s } = pe(), a =
|
|
7280
|
+
const { visible: t, onIdSubmitted: n, onCancel: i, isSearching: o } = e, { t: s } = pe(), a = le();
|
|
7281
7281
|
function l(d) {
|
|
7282
7282
|
const u = d.id.split(",").map((f) => parseInt(f.trim()));
|
|
7283
7283
|
n(u);
|
|
@@ -7529,7 +7529,7 @@ function wn(e) {
|
|
|
7529
7529
|
);
|
|
7530
7530
|
}
|
|
7531
7531
|
const Kc = (e) => {
|
|
7532
|
-
const { viewData: t, visible: n, model: i, context: o, domain: s, formView: a, treeView: l } = e, d =
|
|
7532
|
+
const { viewData: t, visible: n, model: i, context: o, domain: s, formView: a, treeView: l } = e, d = le(), u = ne(
|
|
7533
7533
|
ot
|
|
7534
7534
|
), {
|
|
7535
7535
|
setResults: f = void 0,
|
|
@@ -7558,7 +7558,7 @@ const Kc = (e) => {
|
|
|
7558
7558
|
}, [R]), fe(() => {
|
|
7559
7559
|
t.view_id !== O.view_id && B(!0);
|
|
7560
7560
|
}, [O]);
|
|
7561
|
-
const { clear: q, searchFilterLoading: E, searchError: K, offset:
|
|
7561
|
+
const { clear: q, searchFilterLoading: E, searchError: K, offset: M, tableRefreshing: X } = go({
|
|
7562
7562
|
model: i,
|
|
7563
7563
|
setSearchTreeNameSearch: S,
|
|
7564
7564
|
setSelectedRowItems: h,
|
|
@@ -7600,7 +7600,7 @@ const Kc = (e) => {
|
|
|
7600
7600
|
]),
|
|
7601
7601
|
limit: A,
|
|
7602
7602
|
onClear: q,
|
|
7603
|
-
offset:
|
|
7603
|
+
offset: M,
|
|
7604
7604
|
isSearching: E,
|
|
7605
7605
|
onSubmit: (z) => {
|
|
7606
7606
|
B(!1), g == null || g(z.params), v == null || v(!1);
|
|
@@ -7983,15 +7983,15 @@ const Uc = {
|
|
|
7983
7983
|
globalValues: {},
|
|
7984
7984
|
rootContext: {},
|
|
7985
7985
|
devMode: !1
|
|
7986
|
-
},
|
|
7987
|
-
const e = ne(
|
|
7986
|
+
}, No = tt.createContext(zc), Mo = () => {
|
|
7987
|
+
const e = ne(No);
|
|
7988
7988
|
if (!e)
|
|
7989
7989
|
throw new Error(
|
|
7990
7990
|
"useConfigContext must be used within a ConfigContextProvider"
|
|
7991
7991
|
);
|
|
7992
7992
|
return e;
|
|
7993
7993
|
}, Jc = (e) => {
|
|
7994
|
-
const { erpFeatures: t } =
|
|
7994
|
+
const { erpFeatures: t } = Mo();
|
|
7995
7995
|
return !!t[e];
|
|
7996
7996
|
}, Xc = Dr(
|
|
7997
7997
|
({
|
|
@@ -8003,7 +8003,7 @@ const Uc = {
|
|
|
8003
8003
|
devMode: s,
|
|
8004
8004
|
children: a
|
|
8005
8005
|
}) => {
|
|
8006
|
-
const l =
|
|
8006
|
+
const l = Ne(
|
|
8007
8007
|
() => ({
|
|
8008
8008
|
erpFeatures: e,
|
|
8009
8009
|
globalValues: i,
|
|
@@ -8012,7 +8012,7 @@ const Uc = {
|
|
|
8012
8012
|
}),
|
|
8013
8013
|
[e, i, o, s]
|
|
8014
8014
|
);
|
|
8015
|
-
return /* @__PURE__ */ r(
|
|
8015
|
+
return /* @__PURE__ */ r(No.Provider, { value: l, children: /* @__PURE__ */ r(
|
|
8016
8016
|
Di,
|
|
8017
8017
|
{
|
|
8018
8018
|
locale: t,
|
|
@@ -8056,7 +8056,7 @@ function Zc(e) {
|
|
|
8056
8056
|
), { t: O } = pe(), k = ne(
|
|
8057
8057
|
Et
|
|
8058
8058
|
), { processAction: B } = k || {}, [q, E] = w(!1), K = v !== void 0 && v.trim().length > 0;
|
|
8059
|
-
function
|
|
8059
|
+
function M() {
|
|
8060
8060
|
Jt({
|
|
8061
8061
|
confirmMessage: O("confirmRemove"),
|
|
8062
8062
|
t: O,
|
|
@@ -8068,7 +8068,7 @@ function Zc(e) {
|
|
|
8068
8068
|
async function X() {
|
|
8069
8069
|
var $;
|
|
8070
8070
|
try {
|
|
8071
|
-
s == null || s(!0), await
|
|
8071
|
+
s == null || s(!0), await N.getHandler().deleteObjects({
|
|
8072
8072
|
model: u,
|
|
8073
8073
|
ids: o.map((I) => I.id),
|
|
8074
8074
|
context: { ...F }
|
|
@@ -8084,7 +8084,7 @@ function Zc(e) {
|
|
|
8084
8084
|
try {
|
|
8085
8085
|
d == null || d(!0);
|
|
8086
8086
|
const I = o[0].id;
|
|
8087
|
-
await
|
|
8087
|
+
await N.getHandler().duplicate({
|
|
8088
8088
|
id: I,
|
|
8089
8089
|
model: u,
|
|
8090
8090
|
context: { ...F }
|
|
@@ -8168,7 +8168,7 @@ function Zc(e) {
|
|
|
8168
8168
|
tooltip: O("delete"),
|
|
8169
8169
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
8170
8170
|
loading: a,
|
|
8171
|
-
onClick:
|
|
8171
|
+
onClick: M
|
|
8172
8172
|
}
|
|
8173
8173
|
),
|
|
8174
8174
|
vt()
|
|
@@ -8458,7 +8458,7 @@ function nd() {
|
|
|
8458
8458
|
return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
|
|
8459
8459
|
}
|
|
8460
8460
|
const rd = (e) => {
|
|
8461
|
-
const { dashboardData: t, visible: n } = e, i =
|
|
8461
|
+
const { dashboardData: t, visible: n } = e, i = le(), o = ne(
|
|
8462
8462
|
ct
|
|
8463
8463
|
), { openShortcut: s } = o || {};
|
|
8464
8464
|
return !t || !n ? null : /* @__PURE__ */ D(
|
|
@@ -8518,14 +8518,14 @@ function id(e, t) {
|
|
|
8518
8518
|
limit: y
|
|
8519
8519
|
} = e, [v, T] = w(), [b, C] = w([]), [S, V] = w(!0), A = m || void 0, [F, R] = w(
|
|
8520
8520
|
A
|
|
8521
|
-
), [_, x] = w([]), [O, k] = w(), [B, q] = w([]), [E, K] = w(), [
|
|
8521
|
+
), [_, x] = w([]), [O, k] = w(), [B, q] = w([]), [E, K] = w(), [M, X] = w(0), [z, te] = w(!1), [W, $] = w(!1), [I, P] = w(), { t: j } = pe(), ce = le(), Z = le(), re = ne(
|
|
8522
8522
|
ct
|
|
8523
8523
|
), {
|
|
8524
8524
|
setCurrentView: ye,
|
|
8525
8525
|
setCurrentId: U,
|
|
8526
|
-
tabs:
|
|
8526
|
+
tabs: ae,
|
|
8527
8527
|
activeKey: Fe,
|
|
8528
|
-
openAction:
|
|
8528
|
+
openAction: Me,
|
|
8529
8529
|
onRemoveTab: Ee
|
|
8530
8530
|
} = re || {};
|
|
8531
8531
|
ts(
|
|
@@ -8533,7 +8533,7 @@ function id(e, t) {
|
|
|
8533
8533
|
(Y) => {
|
|
8534
8534
|
Y.preventDefault(), se();
|
|
8535
8535
|
},
|
|
8536
|
-
[Fe,
|
|
8536
|
+
[Fe, ae, v, O, B]
|
|
8537
8537
|
);
|
|
8538
8538
|
function Pe(Y) {
|
|
8539
8539
|
R(Y), U == null || U(Y);
|
|
@@ -8551,7 +8551,7 @@ function id(e, t) {
|
|
|
8551
8551
|
const [ge, ie] = he;
|
|
8552
8552
|
ie !== "dashboard" ? we.push({
|
|
8553
8553
|
viewTuple: he,
|
|
8554
|
-
promise:
|
|
8554
|
+
promise: N.getHandler().getView({
|
|
8555
8555
|
model: i,
|
|
8556
8556
|
type: ie,
|
|
8557
8557
|
id: ge,
|
|
@@ -8629,7 +8629,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8629
8629
|
me(we || Y), m ? U == null || U(A) : (Pe(void 0), k(void 0)), Re();
|
|
8630
8630
|
}, [i, s, m]), fe(() => {
|
|
8631
8631
|
Fe === d && (U == null || U(F), ye == null || ye(v));
|
|
8632
|
-
}, [
|
|
8632
|
+
}, [ae, Fe]);
|
|
8633
8633
|
async function $e() {
|
|
8634
8634
|
return v && v.type === "form" ? await ce.current.cancelUnsavedChanges() : !0;
|
|
8635
8635
|
}
|
|
@@ -8646,7 +8646,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8646
8646
|
let je;
|
|
8647
8647
|
if (ie === -1) {
|
|
8648
8648
|
try {
|
|
8649
|
-
je = (he = await
|
|
8649
|
+
je = (he = await N.getHandler().readObjects({
|
|
8650
8650
|
model: i,
|
|
8651
8651
|
ids: [ge],
|
|
8652
8652
|
context: o
|
|
@@ -8663,7 +8663,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8663
8663
|
we = "tree", ke = [["id", "in", Y]];
|
|
8664
8664
|
$(!1), te(!1);
|
|
8665
8665
|
const ue = s.find((ge) => ge[1] === we);
|
|
8666
|
-
|
|
8666
|
+
Me({
|
|
8667
8667
|
domain: ke,
|
|
8668
8668
|
context: o,
|
|
8669
8669
|
model: i,
|
|
@@ -8775,7 +8775,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8775
8775
|
currentModel: i,
|
|
8776
8776
|
sorter: E,
|
|
8777
8777
|
setSorter: K,
|
|
8778
|
-
totalItems:
|
|
8778
|
+
totalItems: M,
|
|
8779
8779
|
setTotalItems: X,
|
|
8780
8780
|
selectedRowItems: _,
|
|
8781
8781
|
setSelectedRowItems: x,
|
|
@@ -8806,14 +8806,14 @@ async function sd({
|
|
|
8806
8806
|
rootContext: t = {},
|
|
8807
8807
|
globalValues: n = {}
|
|
8808
8808
|
}) {
|
|
8809
|
-
const i = "ir.actions.act_window", o = `${i},${e}`, s = await
|
|
8809
|
+
const i = "ir.actions.act_window", o = `${i},${e}`, s = await N.getHandler().getActionData({
|
|
8810
8810
|
action: o,
|
|
8811
8811
|
context: t
|
|
8812
8812
|
}), a = bt({
|
|
8813
8813
|
context: s.context,
|
|
8814
8814
|
values: n,
|
|
8815
8815
|
fields: {}
|
|
8816
|
-
}), l = s.domain ? await
|
|
8816
|
+
}), l = s.domain ? await N.getHandler().evalDomain({
|
|
8817
8817
|
domain: s.domain,
|
|
8818
8818
|
values: n,
|
|
8819
8819
|
context: { ...t, ...a }
|
|
@@ -8829,7 +8829,7 @@ async function sd({
|
|
|
8829
8829
|
if (b)
|
|
8830
8830
|
h.push(T);
|
|
8831
8831
|
else {
|
|
8832
|
-
const { view_id: S } = await
|
|
8832
|
+
const { view_id: S } = await N.getHandler().getView({
|
|
8833
8833
|
model: d,
|
|
8834
8834
|
type: C,
|
|
8835
8835
|
id: b,
|
|
@@ -8948,11 +8948,11 @@ function md(e) {
|
|
|
8948
8948
|
domain: s = [],
|
|
8949
8949
|
visible: a = !0,
|
|
8950
8950
|
parentContext: l = {}
|
|
8951
|
-
} = e, [d, u] = w(!1), [f, c] = w(!1), [m, p] = w(), [h, g] = w(), [y, v] = w(), [T, b] = w(1), [C, S] = w(0), V =
|
|
8951
|
+
} = e, [d, u] = w(!1), [f, c] = w(!1), [m, p] = w(), [h, g] = w(), [y, v] = w(), [T, b] = w(1), [C, S] = w(0), V = le(fd), A = le([]), [F, R] = w(0), [_, x] = w([]), [O, k] = w(void 0), [B, q] = w(), [E, K] = w(), [M, X] = w(), [z, te] = w(!1), W = le([]), $ = (U) => {
|
|
8952
8952
|
te(!0), b(U), S((U - 1) * V.current);
|
|
8953
8953
|
}, I = async () => {
|
|
8954
|
-
const U = W.current.length > 0 ? W.current : s,
|
|
8955
|
-
params:
|
|
8954
|
+
const U = W.current.length > 0 ? W.current : s, ae = Wt(A.current, U), { colors: Fe } = It(h), { totalItems: Me, results: Ee, attrsEvaluated: Pe } = await N.getHandler().searchForTree({
|
|
8955
|
+
params: ae,
|
|
8956
8956
|
limit: V.current,
|
|
8957
8957
|
offset: C,
|
|
8958
8958
|
model: m,
|
|
@@ -8967,7 +8967,7 @@ function md(e) {
|
|
|
8967
8967
|
fields: { ...h.fields, ...y.fields }
|
|
8968
8968
|
});
|
|
8969
8969
|
te(!1), x(me);
|
|
8970
|
-
const Re = await
|
|
8970
|
+
const Re = await Me;
|
|
8971
8971
|
R(Re);
|
|
8972
8972
|
}, P = async () => {
|
|
8973
8973
|
try {
|
|
@@ -8983,40 +8983,40 @@ function md(e) {
|
|
|
8983
8983
|
c(!1), u(!0), X(void 0);
|
|
8984
8984
|
try {
|
|
8985
8985
|
U === "action" ? await ce() : await Z(), c(!0);
|
|
8986
|
-
} catch (
|
|
8987
|
-
X(
|
|
8986
|
+
} catch (ae) {
|
|
8987
|
+
X(ae);
|
|
8988
8988
|
} finally {
|
|
8989
8989
|
u(!1);
|
|
8990
8990
|
}
|
|
8991
8991
|
}, ce = async () => {
|
|
8992
|
-
const U = await
|
|
8992
|
+
const U = await N.getHandler().getViewsForAction({
|
|
8993
8993
|
action: t,
|
|
8994
8994
|
context: l
|
|
8995
8995
|
});
|
|
8996
8996
|
W.current = U.domain, v(U.views.get("form")), g(U.views.get("tree")), p(U.model), V.current = U.limit;
|
|
8997
8997
|
}, Z = async () => {
|
|
8998
8998
|
p(n);
|
|
8999
|
-
const U = await
|
|
8999
|
+
const U = await N.getHandler().getView({
|
|
9000
9000
|
model: n,
|
|
9001
9001
|
type: "form",
|
|
9002
9002
|
context: l
|
|
9003
9003
|
});
|
|
9004
9004
|
v(U);
|
|
9005
|
-
const
|
|
9005
|
+
const ae = await N.getHandler().getView({
|
|
9006
9006
|
model: n,
|
|
9007
9007
|
type: "tree",
|
|
9008
9008
|
id: i,
|
|
9009
9009
|
context: l
|
|
9010
9010
|
});
|
|
9011
|
-
g(
|
|
9011
|
+
g(ae);
|
|
9012
9012
|
};
|
|
9013
9013
|
fe(() => {
|
|
9014
9014
|
t ? j("action") : n && j("model");
|
|
9015
9015
|
}, [t, n]);
|
|
9016
9016
|
const re = (U) => {
|
|
9017
|
-
const { id:
|
|
9017
|
+
const { id: ae } = U;
|
|
9018
9018
|
o({
|
|
9019
|
-
id:
|
|
9019
|
+
id: ae,
|
|
9020
9020
|
model: m,
|
|
9021
9021
|
treeView: h
|
|
9022
9022
|
});
|
|
@@ -9038,18 +9038,18 @@ function md(e) {
|
|
|
9038
9038
|
sorter: B,
|
|
9039
9039
|
onChangeSort: (U) => {
|
|
9040
9040
|
q == null || q(U);
|
|
9041
|
-
const
|
|
9041
|
+
const ae = Ot({
|
|
9042
9042
|
resultsToSort: _,
|
|
9043
9043
|
sorter: U,
|
|
9044
9044
|
fields: { ...h.fields, ...y.fields }
|
|
9045
9045
|
});
|
|
9046
|
-
x(
|
|
9046
|
+
x(ae);
|
|
9047
9047
|
},
|
|
9048
9048
|
context: l
|
|
9049
9049
|
}
|
|
9050
9050
|
)
|
|
9051
9051
|
] });
|
|
9052
|
-
return
|
|
9052
|
+
return M ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: M, type: "error", banner: !0 }) : d ? /* @__PURE__ */ r(Le, { style: { padding: "2rem" } }) : ye();
|
|
9053
9053
|
}
|
|
9054
9054
|
const hd = (e) => {
|
|
9055
9055
|
const { model: t } = e, [n, i] = w();
|
|
@@ -9057,7 +9057,7 @@ const hd = (e) => {
|
|
|
9057
9057
|
o();
|
|
9058
9058
|
}, [t]);
|
|
9059
9059
|
async function o() {
|
|
9060
|
-
const s = await
|
|
9060
|
+
const s = await N.getHandler().search({
|
|
9061
9061
|
params: [],
|
|
9062
9062
|
model: t,
|
|
9063
9063
|
limit: 1
|
|
@@ -9071,9 +9071,9 @@ function pd(e, t) {
|
|
|
9071
9071
|
setIsLoading: m,
|
|
9072
9072
|
openAction: p,
|
|
9073
9073
|
moveItemsEnabled: h
|
|
9074
|
-
} = ne(ir), g =
|
|
9075
|
-
|
|
9076
|
-
), [b] = et(
|
|
9074
|
+
} = ne(ir), g = le(), y = le(), [v] = et(N.getHandler().getView), [T] = et(
|
|
9075
|
+
N.getHandler().readObjects
|
|
9076
|
+
), [b] = et(N.getHandler().update);
|
|
9077
9077
|
fe(() => {
|
|
9078
9078
|
C();
|
|
9079
9079
|
}, [n, o, i]), gt(t, () => ({
|
|
@@ -9161,17 +9161,17 @@ function pd(e, t) {
|
|
|
9161
9161
|
return !1;
|
|
9162
9162
|
if (!K.position)
|
|
9163
9163
|
return !0;
|
|
9164
|
-
const
|
|
9164
|
+
const M = {
|
|
9165
9165
|
...JSON.parse(K.position.replace(/'/g, '"')),
|
|
9166
9166
|
id: K.id
|
|
9167
9167
|
};
|
|
9168
|
-
return JSON.stringify(E) !== JSON.stringify(
|
|
9168
|
+
return JSON.stringify(E) !== JSON.stringify(M);
|
|
9169
9169
|
});
|
|
9170
9170
|
if (O.length === 0)
|
|
9171
9171
|
return;
|
|
9172
9172
|
const B = a.filter((E) => O.map((K) => K.id).includes(E.id)).map((E) => {
|
|
9173
9173
|
const K = {
|
|
9174
|
-
...O.find((
|
|
9174
|
+
...O.find((M) => M.id === E.id)
|
|
9175
9175
|
};
|
|
9176
9176
|
return delete K.id, { ...E }, {
|
|
9177
9177
|
...E,
|
|
@@ -9199,7 +9199,7 @@ function pd(e, t) {
|
|
|
9199
9199
|
return d ? /* @__PURE__ */ r(st, {}) : f ? /* @__PURE__ */ r(Xe, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(ld, { onPositionItemsChanged: R, children: a.map((x, O) => {
|
|
9200
9200
|
const { actionData: k, values: B } = x, { position: q, id: E } = B, {
|
|
9201
9201
|
actionId: K,
|
|
9202
|
-
actionType:
|
|
9202
|
+
actionType: M,
|
|
9203
9203
|
key: X,
|
|
9204
9204
|
title: z,
|
|
9205
9205
|
views: te,
|
|
@@ -9241,12 +9241,12 @@ function pd(e, t) {
|
|
|
9241
9241
|
(U) => U[1] === "tree"
|
|
9242
9242
|
)[0][0],
|
|
9243
9243
|
onRowClicked: (U) => {
|
|
9244
|
-
const
|
|
9245
|
-
const [,
|
|
9246
|
-
return
|
|
9244
|
+
const ae = te.find((Fe) => {
|
|
9245
|
+
const [, Me] = Fe;
|
|
9246
|
+
return Me === "form";
|
|
9247
9247
|
});
|
|
9248
|
-
if (
|
|
9249
|
-
const [Fe,
|
|
9248
|
+
if (ae) {
|
|
9249
|
+
const [Fe, Me] = ae, {
|
|
9250
9250
|
actionId: Ee,
|
|
9251
9251
|
actionType: Pe,
|
|
9252
9252
|
title: me,
|
|
@@ -9258,7 +9258,7 @@ function pd(e, t) {
|
|
|
9258
9258
|
res_id: U.id,
|
|
9259
9259
|
res_model: Re,
|
|
9260
9260
|
view_id: Fe,
|
|
9261
|
-
view_type:
|
|
9261
|
+
view_type: Me
|
|
9262
9262
|
};
|
|
9263
9263
|
p($e);
|
|
9264
9264
|
}
|
|
@@ -9271,7 +9271,7 @@ function pd(e, t) {
|
|
|
9271
9271
|
Po,
|
|
9272
9272
|
{
|
|
9273
9273
|
action_id: K,
|
|
9274
|
-
action_type:
|
|
9274
|
+
action_type: M,
|
|
9275
9275
|
tabKey: X,
|
|
9276
9276
|
title: z,
|
|
9277
9277
|
views: te,
|
|
@@ -9287,24 +9287,24 @@ function pd(e, t) {
|
|
|
9287
9287
|
}
|
|
9288
9288
|
let re;
|
|
9289
9289
|
const ye = te.find((U) => {
|
|
9290
|
-
const [,
|
|
9291
|
-
return
|
|
9290
|
+
const [, ae] = U;
|
|
9291
|
+
return ae === "tree";
|
|
9292
9292
|
});
|
|
9293
9293
|
if (ye) {
|
|
9294
|
-
const [U,
|
|
9294
|
+
const [U, ae] = ye, {
|
|
9295
9295
|
actionId: Fe,
|
|
9296
|
-
actionType:
|
|
9296
|
+
actionType: Me,
|
|
9297
9297
|
title: Ee,
|
|
9298
9298
|
model: Pe
|
|
9299
9299
|
} = k;
|
|
9300
9300
|
re = {
|
|
9301
9301
|
action_id: Fe,
|
|
9302
|
-
action_type:
|
|
9302
|
+
action_type: Me,
|
|
9303
9303
|
name: Ee,
|
|
9304
9304
|
res_id: !1,
|
|
9305
9305
|
res_model: Pe,
|
|
9306
9306
|
view_id: U,
|
|
9307
|
-
view_type:
|
|
9307
|
+
view_type: ae
|
|
9308
9308
|
};
|
|
9309
9309
|
}
|
|
9310
9310
|
return /* @__PURE__ */ r(
|
|
@@ -9338,7 +9338,7 @@ const gd = pt(pd), yd = (e) => {
|
|
|
9338
9338
|
c(!0);
|
|
9339
9339
|
let F = [];
|
|
9340
9340
|
if (n.domain) {
|
|
9341
|
-
const R = await
|
|
9341
|
+
const R = await N.getHandler().evalDomain({
|
|
9342
9342
|
domain: n.domain,
|
|
9343
9343
|
values: kt({
|
|
9344
9344
|
fields: v == null ? void 0 : v.getFields(),
|
|
@@ -9350,7 +9350,7 @@ const gd = pt(pd), yd = (e) => {
|
|
|
9350
9350
|
F = [...F, ...R];
|
|
9351
9351
|
}
|
|
9352
9352
|
try {
|
|
9353
|
-
const _ = (await
|
|
9353
|
+
const _ = (await N.getHandler().search({
|
|
9354
9354
|
model: m,
|
|
9355
9355
|
params: F,
|
|
9356
9356
|
fieldsToRetrieve: [g],
|
|
@@ -9468,7 +9468,7 @@ const gd = pt(pd), yd = (e) => {
|
|
|
9468
9468
|
const i = `https://www.gravatar.com/avatar/${is(
|
|
9469
9469
|
e
|
|
9470
9470
|
)}?s=${t}&d=${n}`;
|
|
9471
|
-
return /* @__PURE__ */ r(
|
|
9471
|
+
return /* @__PURE__ */ r(Mr, { src: i, size: t });
|
|
9472
9472
|
};
|
|
9473
9473
|
function Ad({ text: e }) {
|
|
9474
9474
|
const t = e.split(`
|
|
@@ -9510,20 +9510,20 @@ const Dd = (e) => {
|
|
|
9510
9510
|
};
|
|
9511
9511
|
});
|
|
9512
9512
|
return /* @__PURE__ */ r(In, { mode: "alternate", items: n });
|
|
9513
|
-
}, Ed = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(kd, {}) }), { Content:
|
|
9513
|
+
}, Ed = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(kd, {}) }), { Content: Nd } = ai, { Title: Md } = Yt;
|
|
9514
9514
|
function Pd() {
|
|
9515
9515
|
const { t: e } = pe();
|
|
9516
|
-
return /* @__PURE__ */ r(
|
|
9516
|
+
return /* @__PURE__ */ r(Nd, { className: "m-5 select-none", children: /* @__PURE__ */ r(Md, { level: 5, children: e("welcome") }) });
|
|
9517
9517
|
}
|
|
9518
9518
|
function Ld(e, t) {
|
|
9519
|
-
const { children: n } = e, [i, o] = w("welcome"), { t: s } = pe(), { globalValues: a, rootContext: l } =
|
|
9519
|
+
const { children: n } = e, [i, o] = w("welcome"), { t: s } = pe(), { globalValues: a, rootContext: l } = Mo(), [d, u] = w([
|
|
9520
9520
|
{
|
|
9521
9521
|
title: s("welcome"),
|
|
9522
9522
|
key: "welcome",
|
|
9523
9523
|
closable: !0,
|
|
9524
9524
|
content: /* @__PURE__ */ r(Pd, {})
|
|
9525
9525
|
}
|
|
9526
|
-
]), f =
|
|
9526
|
+
]), f = le(/* @__PURE__ */ new Map()), c = le();
|
|
9527
9527
|
gt(t, () => ({
|
|
9528
9528
|
retrieveAndOpenAction: h,
|
|
9529
9529
|
openShortcut: v
|
|
@@ -9549,7 +9549,7 @@ function Ld(e, t) {
|
|
|
9549
9549
|
res_id: F,
|
|
9550
9550
|
domain: R = []
|
|
9551
9551
|
}) {
|
|
9552
|
-
const _ = await
|
|
9552
|
+
const _ = await N.getHandler().getActionData({
|
|
9553
9553
|
action: C,
|
|
9554
9554
|
context: l
|
|
9555
9555
|
});
|
|
@@ -9561,14 +9561,14 @@ function Ld(e, t) {
|
|
|
9561
9561
|
context: _.context,
|
|
9562
9562
|
values: a,
|
|
9563
9563
|
fields: {}
|
|
9564
|
-
}), q = _.domain ? await
|
|
9564
|
+
}), q = _.domain ? await N.getHandler().evalDomain({
|
|
9565
9565
|
domain: _.domain,
|
|
9566
9566
|
values: a,
|
|
9567
9567
|
context: { ...l, ...B }
|
|
9568
9568
|
}) : [], {
|
|
9569
9569
|
res_model: E,
|
|
9570
9570
|
views: K,
|
|
9571
|
-
name:
|
|
9571
|
+
name: M,
|
|
9572
9572
|
target: X,
|
|
9573
9573
|
view_type: z,
|
|
9574
9574
|
limit: te
|
|
@@ -9580,7 +9580,7 @@ function Ld(e, t) {
|
|
|
9580
9580
|
else if (ce === "dashboard")
|
|
9581
9581
|
$.push([void 0, "dashboard"]);
|
|
9582
9582
|
else {
|
|
9583
|
-
const { view_id: Z } = await
|
|
9583
|
+
const { view_id: Z } = await N.getHandler().getView({
|
|
9584
9584
|
model: E,
|
|
9585
9585
|
type: ce,
|
|
9586
9586
|
id: j,
|
|
@@ -9604,7 +9604,7 @@ function Ld(e, t) {
|
|
|
9604
9604
|
context: { ...l, ...B },
|
|
9605
9605
|
model: E,
|
|
9606
9606
|
views: $,
|
|
9607
|
-
title:
|
|
9607
|
+
title: M,
|
|
9608
9608
|
target: X,
|
|
9609
9609
|
initialView: I,
|
|
9610
9610
|
action_type: x,
|
|
@@ -9649,11 +9649,11 @@ function Ld(e, t) {
|
|
|
9649
9649
|
target: k,
|
|
9650
9650
|
string: B,
|
|
9651
9651
|
limit: q
|
|
9652
|
-
} = C, [E, K] = O[0],
|
|
9652
|
+
} = C, [E, K] = O[0], M = { id: E, type: K }, X = bt({
|
|
9653
9653
|
context: _,
|
|
9654
9654
|
values: { ...V, ...a },
|
|
9655
9655
|
fields: S
|
|
9656
|
-
}), z = x ? await
|
|
9656
|
+
}), z = x ? await N.getHandler().evalDomain({
|
|
9657
9657
|
domain: x,
|
|
9658
9658
|
values: kt({
|
|
9659
9659
|
fields: S,
|
|
@@ -9669,21 +9669,21 @@ function Ld(e, t) {
|
|
|
9669
9669
|
context: { ...l, ...X },
|
|
9670
9670
|
domain: z,
|
|
9671
9671
|
title: B,
|
|
9672
|
-
initialView:
|
|
9672
|
+
initialView: M,
|
|
9673
9673
|
action_id: A,
|
|
9674
9674
|
action_type: F,
|
|
9675
9675
|
limit: q
|
|
9676
9676
|
});
|
|
9677
9677
|
}
|
|
9678
9678
|
async function v(C) {
|
|
9679
|
-
const { action_id: S, action_type: V, res_id: A, view_id: F } = C, R = `${V},${S}`, _ = await
|
|
9679
|
+
const { action_id: S, action_type: V, res_id: A, view_id: F } = C, R = `${V},${S}`, _ = await N.getHandler().getActionData({
|
|
9680
9680
|
action: R,
|
|
9681
9681
|
context: l
|
|
9682
9682
|
}), x = bt({
|
|
9683
9683
|
context: _.context,
|
|
9684
9684
|
values: a,
|
|
9685
9685
|
fields: {}
|
|
9686
|
-
}), O = _.domain ? await
|
|
9686
|
+
}), O = _.domain ? await N.getHandler().evalDomain({
|
|
9687
9687
|
domain: _.domain,
|
|
9688
9688
|
values: a,
|
|
9689
9689
|
context: { ...l, ...x }
|
|
@@ -9693,7 +9693,7 @@ function Ld(e, t) {
|
|
|
9693
9693
|
name: q,
|
|
9694
9694
|
target: E,
|
|
9695
9695
|
view_type: K,
|
|
9696
|
-
limit:
|
|
9696
|
+
limit: M
|
|
9697
9697
|
} = _, X = K === "tree", z = [];
|
|
9698
9698
|
for (const I of B) {
|
|
9699
9699
|
const [P, j] = I;
|
|
@@ -9702,7 +9702,7 @@ function Ld(e, t) {
|
|
|
9702
9702
|
else if (j === "dashboard")
|
|
9703
9703
|
z.push([void 0, "dashboard"]);
|
|
9704
9704
|
else {
|
|
9705
|
-
const { view_id: ce } = await
|
|
9705
|
+
const { view_id: ce } = await N.getHandler().getView({
|
|
9706
9706
|
model: k,
|
|
9707
9707
|
type: j,
|
|
9708
9708
|
id: P,
|
|
@@ -9730,7 +9730,7 @@ function Ld(e, t) {
|
|
|
9730
9730
|
action_type: V,
|
|
9731
9731
|
res_id: A,
|
|
9732
9732
|
treeExpandable: X,
|
|
9733
|
-
limit:
|
|
9733
|
+
limit: M
|
|
9734
9734
|
});
|
|
9735
9735
|
}
|
|
9736
9736
|
async function T({
|
|
@@ -9741,7 +9741,7 @@ function Ld(e, t) {
|
|
|
9741
9741
|
res_id: F,
|
|
9742
9742
|
domain: R
|
|
9743
9743
|
}) {
|
|
9744
|
-
const _ = await
|
|
9744
|
+
const _ = await N.getHandler().getActionStringForModel(C);
|
|
9745
9745
|
await h({
|
|
9746
9746
|
action: _,
|
|
9747
9747
|
values: S,
|
|
@@ -9767,9 +9767,9 @@ function Ld(e, t) {
|
|
|
9767
9767
|
treeExpandable: E = !1,
|
|
9768
9768
|
limit: K
|
|
9769
9769
|
}) {
|
|
9770
|
-
const
|
|
9770
|
+
const M = Qn();
|
|
9771
9771
|
if (R !== "current") {
|
|
9772
|
-
const X = await
|
|
9772
|
+
const X = await N.getHandler().getView({
|
|
9773
9773
|
model: V,
|
|
9774
9774
|
type: "form",
|
|
9775
9775
|
id: _.type === "form" ? _.id : void 0,
|
|
@@ -9800,7 +9800,7 @@ function Ld(e, t) {
|
|
|
9800
9800
|
{
|
|
9801
9801
|
action_id: x,
|
|
9802
9802
|
action_type: O,
|
|
9803
|
-
tabKey:
|
|
9803
|
+
tabKey: M,
|
|
9804
9804
|
title: F,
|
|
9805
9805
|
views: A,
|
|
9806
9806
|
model: V,
|
|
@@ -9815,7 +9815,7 @@ function Ld(e, t) {
|
|
|
9815
9815
|
limit: K
|
|
9816
9816
|
}
|
|
9817
9817
|
),
|
|
9818
|
-
key:
|
|
9818
|
+
key: M
|
|
9819
9819
|
});
|
|
9820
9820
|
}
|
|
9821
9821
|
}
|
|
@@ -9982,8 +9982,8 @@ const { useToken: jd } = He, Eu = (e) => {
|
|
|
9982
9982
|
}
|
|
9983
9983
|
}
|
|
9984
9984
|
function R(E) {
|
|
9985
|
-
const { key: K } = E,
|
|
9986
|
-
(
|
|
9985
|
+
const { key: K } = E, M = u.find((X) => X.id === Number(K));
|
|
9986
|
+
(M == null ? void 0 : M.action_type) !== "ir.actions.wizard" && (M && T(M), d(!1));
|
|
9987
9987
|
}
|
|
9988
9988
|
function _(E) {
|
|
9989
9989
|
E && F(), d(E);
|
|
@@ -9991,8 +9991,8 @@ const { useToken: jd } = He, Eu = (e) => {
|
|
|
9991
9991
|
async function x() {
|
|
9992
9992
|
if (!S)
|
|
9993
9993
|
return;
|
|
9994
|
-
const E = b.find((W) => W.key === C), { id: K, type:
|
|
9995
|
-
if (!K || !
|
|
9994
|
+
const E = b.find((W) => W.key === C), { id: K, type: M } = (E == null ? void 0 : E.action) || {};
|
|
9995
|
+
if (!K || !M) {
|
|
9996
9996
|
a(!1);
|
|
9997
9997
|
return;
|
|
9998
9998
|
}
|
|
@@ -10001,7 +10001,7 @@ const { useToken: jd } = He, Eu = (e) => {
|
|
|
10001
10001
|
S.type === "form" && (z = V || !1);
|
|
10002
10002
|
const te = await n({
|
|
10003
10003
|
action_id: K,
|
|
10004
|
-
action_type:
|
|
10004
|
+
action_type: M,
|
|
10005
10005
|
view_id: X,
|
|
10006
10006
|
res_id: z
|
|
10007
10007
|
});
|
|
@@ -10042,15 +10042,15 @@ const { useToken: jd } = He, Eu = (e) => {
|
|
|
10042
10042
|
else {
|
|
10043
10043
|
if (!S)
|
|
10044
10044
|
return;
|
|
10045
|
-
const E = b.find((te) => te.key === C), { id: K, type:
|
|
10045
|
+
const E = b.find((te) => te.key === C), { id: K, type: M } = (E == null ? void 0 : E.action) || {}, X = S.view_id;
|
|
10046
10046
|
let z = !1;
|
|
10047
|
-
if (!K || !
|
|
10047
|
+
if (!K || !M) {
|
|
10048
10048
|
a(!1);
|
|
10049
10049
|
return;
|
|
10050
10050
|
}
|
|
10051
10051
|
S.type === "form" && (z = V || !1), await i({
|
|
10052
10052
|
action_id: K,
|
|
10053
|
-
action_type:
|
|
10053
|
+
action_type: M,
|
|
10054
10054
|
view_id: X,
|
|
10055
10055
|
res_id: z
|
|
10056
10056
|
});
|
|
@@ -10103,9 +10103,9 @@ export {
|
|
|
10103
10103
|
so as Char,
|
|
10104
10104
|
_d as CodeEditor,
|
|
10105
10105
|
Ed as CommentsTimelineField,
|
|
10106
|
-
|
|
10106
|
+
No as ConfigContext,
|
|
10107
10107
|
Xc as ConfigContextProvider,
|
|
10108
|
-
|
|
10108
|
+
N as ConnectionProvider,
|
|
10109
10109
|
Ia as ContentRootProvider,
|
|
10110
10110
|
ku as CurrentTabContent,
|
|
10111
10111
|
gd as Dashboard,
|
|
@@ -10113,7 +10113,7 @@ export {
|
|
|
10113
10113
|
ud as DashboardGridItem,
|
|
10114
10114
|
vc as Date,
|
|
10115
10115
|
bc as DateTime,
|
|
10116
|
-
|
|
10116
|
+
Mc as Email,
|
|
10117
10117
|
Vu as ErpAllFeatureKeys,
|
|
10118
10118
|
or as ErpFeatureKeys,
|
|
10119
10119
|
wc as ExportModal,
|
|
@@ -10150,7 +10150,7 @@ export {
|
|
|
10150
10150
|
ac as Text,
|
|
10151
10151
|
Cc as Time,
|
|
10152
10152
|
en as Tree,
|
|
10153
|
-
|
|
10153
|
+
Nc as Url,
|
|
10154
10154
|
lt as iconMapper,
|
|
10155
10155
|
Jt as showConfirmDialog
|
|
10156
10156
|
};
|