@gisce/react-ooui 2.2.0 → 2.2.1-rc.2
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
|
@@ -3,10 +3,10 @@ var Qo = (e, t, n) => t in e ? Zo(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
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
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
|
|
6
|
+
import { Tooltip as ht, theme as He, Typography as Ut, 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
|
-
import jr, { QuestionCircleOutlined as Wr, ExclamationCircleOutlined as yt, LoadingOutlined as st, DownOutlined as
|
|
9
|
+
import jr, { QuestionCircleOutlined as Wr, ExclamationCircleOutlined as yt, LoadingOutlined as st, DownOutlined as Yt, WarningOutlined as Ur, CloseOutlined as Gt, CheckOutlined as qt, 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";
|
|
10
10
|
import { Interweave as Xn } from "interweave";
|
|
11
11
|
import { useLocale as pe, Many2OneSuffix as Ii, Many2OneSuffixModal as fr, FieldSet as Oi, ExportModal as Vi, Dropdown as Ai, DropdownButton as _t, FormigaConfigProvider as Di, mergeStrings as ki } from "@gisce/react-formiga-components";
|
|
12
12
|
import * as mr from "@tabler/icons-react";
|
|
@@ -42,7 +42,7 @@ import os from "@monaco-editor/react";
|
|
|
42
42
|
import is from "md5";
|
|
43
43
|
import { WidthProvider as ss, Responsive as as } from "react-grid-layout";
|
|
44
44
|
import "react-grid-layout/css/styles.css";
|
|
45
|
-
const { Text: ls, Title: cs } =
|
|
45
|
+
const { Text: ls, Title: cs } = Ut, { useToken: ds } = He, us = {
|
|
46
46
|
left: "justify-start",
|
|
47
47
|
center: "justify-center",
|
|
48
48
|
right: "justify-end"
|
|
@@ -118,7 +118,7 @@ function xe({
|
|
|
118
118
|
h()
|
|
119
119
|
] }))();
|
|
120
120
|
}
|
|
121
|
-
const { confirm: fs } = Je,
|
|
121
|
+
const { confirm: fs } = Je, zt = ({
|
|
122
122
|
onOk: e,
|
|
123
123
|
confirmMessage: t,
|
|
124
124
|
t: n
|
|
@@ -312,7 +312,7 @@ const ro = (e) => {
|
|
|
312
312
|
}
|
|
313
313
|
function y() {
|
|
314
314
|
if (a) {
|
|
315
|
-
|
|
315
|
+
zt({
|
|
316
316
|
confirmMessage: a,
|
|
317
317
|
t: h,
|
|
318
318
|
onOk: () => {
|
|
@@ -369,7 +369,7 @@ const ro = (e) => {
|
|
|
369
369
|
}
|
|
370
370
|
function C() {
|
|
371
371
|
if (d) {
|
|
372
|
-
|
|
372
|
+
zt({
|
|
373
373
|
confirmMessage: d,
|
|
374
374
|
t: v,
|
|
375
375
|
onOk: () => {
|
|
@@ -388,7 +388,7 @@ const ro = (e) => {
|
|
|
388
388
|
{
|
|
389
389
|
disabled: !a || m,
|
|
390
390
|
onClick: C,
|
|
391
|
-
icon: /* @__PURE__ */ r(
|
|
391
|
+
icon: /* @__PURE__ */ r(Yt, {}),
|
|
392
392
|
type: f ? "primary" : void 0,
|
|
393
393
|
overlay: /* @__PURE__ */ r(
|
|
394
394
|
gs,
|
|
@@ -426,7 +426,7 @@ const ro = (e) => {
|
|
|
426
426
|
}
|
|
427
427
|
function T() {
|
|
428
428
|
if (f) {
|
|
429
|
-
|
|
429
|
+
zt({
|
|
430
430
|
confirmMessage: f,
|
|
431
431
|
t,
|
|
432
432
|
onOk: () => {
|
|
@@ -604,7 +604,7 @@ const oo = (e) => {
|
|
|
604
604
|
/* @__PURE__ */ r(
|
|
605
605
|
De,
|
|
606
606
|
{
|
|
607
|
-
icon: /* @__PURE__ */ r(
|
|
607
|
+
icon: /* @__PURE__ */ r(Gt, {}),
|
|
608
608
|
onClick: n,
|
|
609
609
|
disabled: p,
|
|
610
610
|
children: d("cancel")
|
|
@@ -613,7 +613,7 @@ const oo = (e) => {
|
|
|
613
613
|
/* @__PURE__ */ r(
|
|
614
614
|
De,
|
|
615
615
|
{
|
|
616
|
-
icon: p ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(
|
|
616
|
+
icon: p ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(qt, {}),
|
|
617
617
|
disabled: p,
|
|
618
618
|
onClick: V,
|
|
619
619
|
style: { marginLeft: 15 },
|
|
@@ -949,7 +949,7 @@ const $s = (e, t, n) => e.columns.map((o) => {
|
|
|
949
949
|
}
|
|
950
950
|
}), o;
|
|
951
951
|
});
|
|
952
|
-
function
|
|
952
|
+
function rn(e) {
|
|
953
953
|
return fo(e, "colors");
|
|
954
954
|
}
|
|
955
955
|
function wr(e) {
|
|
@@ -1010,7 +1010,7 @@ const er = async (e) => {
|
|
|
1010
1010
|
colors: g
|
|
1011
1011
|
}
|
|
1012
1012
|
});
|
|
1013
|
-
f = y[0], c =
|
|
1013
|
+
f = y[0], c = rn(y[1]);
|
|
1014
1014
|
} else
|
|
1015
1015
|
f = await N.getHandler().readObjects({
|
|
1016
1016
|
model: n,
|
|
@@ -1136,7 +1136,7 @@ const er = async (e) => {
|
|
|
1136
1136
|
] }, R) }, R);
|
|
1137
1137
|
}) }),
|
|
1138
1138
|
/* @__PURE__ */ r(
|
|
1139
|
-
|
|
1139
|
+
Zt,
|
|
1140
1140
|
{
|
|
1141
1141
|
formView: n.get("form"),
|
|
1142
1142
|
model: h,
|
|
@@ -1418,9 +1418,9 @@ const kt = ({
|
|
|
1418
1418
|
}, ra = (e) => {
|
|
1419
1419
|
switch (e) {
|
|
1420
1420
|
case "form":
|
|
1421
|
-
return
|
|
1421
|
+
return Xt;
|
|
1422
1422
|
case "tree":
|
|
1423
|
-
return
|
|
1423
|
+
return Qt;
|
|
1424
1424
|
case "notebook":
|
|
1425
1425
|
return ic;
|
|
1426
1426
|
case "group":
|
|
@@ -1580,7 +1580,7 @@ const kt = ({
|
|
|
1580
1580
|
minHeight: 0,
|
|
1581
1581
|
minWidth: 0
|
|
1582
1582
|
}, children: d });
|
|
1583
|
-
}, { confirm: ua } = Je,
|
|
1583
|
+
}, { confirm: ua } = Je, Jt = ({
|
|
1584
1584
|
onOk: e,
|
|
1585
1585
|
onCancel: t,
|
|
1586
1586
|
t: n
|
|
@@ -1694,7 +1694,7 @@ const kt = ({
|
|
|
1694
1694
|
return t.forEach((o) => {
|
|
1695
1695
|
Array.isArray(o) && o[0] ? i.includes(o[0]) || n.push(o) : i.includes(o) || n.push(o);
|
|
1696
1696
|
}), n;
|
|
1697
|
-
},
|
|
1697
|
+
}, on = 80, go = (e) => {
|
|
1698
1698
|
const {
|
|
1699
1699
|
model: t,
|
|
1700
1700
|
setSearchTreeNameSearch: n,
|
|
@@ -1720,7 +1720,7 @@ 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, M] = w(0), [X, z] = w(), [te, W] = w([]), [$, I] = w(void 0), [P, j] = w(void 0), ce = le(C
|
|
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), Z = le([]), re = be(
|
|
1724
1724
|
(se) => {
|
|
1725
1725
|
y == null || y([...se]), W([...se]);
|
|
1726
1726
|
},
|
|
@@ -1744,7 +1744,7 @@ const kt = ({
|
|
|
1744
1744
|
context: u,
|
|
1745
1745
|
attrs: Y
|
|
1746
1746
|
}), ke = we[0];
|
|
1747
|
-
Z.current = [...ke], I(
|
|
1747
|
+
Z.current = [...ke], I(rn(we[1])), j(wr(we[1]));
|
|
1748
1748
|
const ue = ke.map((ge) => ge.id), he = p !== void 0 ? Ot({
|
|
1749
1749
|
resultsToSort: ke,
|
|
1750
1750
|
sorter: p,
|
|
@@ -1779,7 +1779,7 @@ const kt = ({
|
|
|
1779
1779
|
context: u,
|
|
1780
1780
|
attrs: ke
|
|
1781
1781
|
});
|
|
1782
|
-
I(
|
|
1782
|
+
I(rn(ge)), j(wr(ge)), Z.current = [...he];
|
|
1783
1783
|
const ie = p !== void 0 ? Ot({
|
|
1784
1784
|
resultsToSort: he,
|
|
1785
1785
|
sorter: p,
|
|
@@ -1873,7 +1873,7 @@ const kt = ({
|
|
|
1873
1873
|
},
|
|
1874
1874
|
[_, C, M, E]
|
|
1875
1875
|
), me = be(() => {
|
|
1876
|
-
R || (n == null || n(void 0), o == null || o([]), A == null || A({}), B(void 0), M(0), E(1), S == null || S(C ||
|
|
1876
|
+
R || (n == null || n(void 0), o == null || o([]), A == null || A({}), B(void 0), M(0), E(1), S == null || S(C || on));
|
|
1877
1877
|
}, [
|
|
1878
1878
|
R,
|
|
1879
1879
|
n,
|
|
@@ -1945,12 +1945,12 @@ const kt = ({
|
|
|
1945
1945
|
goToResourceId: F,
|
|
1946
1946
|
limit: R
|
|
1947
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
|
-
R !== void 0 ? R :
|
|
1948
|
+
R !== void 0 ? R : on
|
|
1949
1949
|
), [Pe, me] = w(i);
|
|
1950
1950
|
fe(() => {
|
|
1951
1951
|
m && m.length > 0 && !p && (h == null || h(0), f == null || f(m[0].id));
|
|
1952
1952
|
}, [m]), fe(() => {
|
|
1953
|
-
Ee(R !== void 0 ? R :
|
|
1953
|
+
Ee(R !== void 0 ? R : on);
|
|
1954
1954
|
}, [R]), fe(() => {
|
|
1955
1955
|
s.length === 1 ? U(s[0]) : s.length > 1 && U(
|
|
1956
1956
|
s.filter(
|
|
@@ -2264,7 +2264,7 @@ const kt = ({
|
|
|
2264
2264
|
}
|
|
2265
2265
|
),
|
|
2266
2266
|
/* @__PURE__ */ r(
|
|
2267
|
-
|
|
2267
|
+
Zt,
|
|
2268
2268
|
{
|
|
2269
2269
|
buttonModal: !0,
|
|
2270
2270
|
parentContext: h.context,
|
|
@@ -2400,7 +2400,7 @@ function Aa(e, t) {
|
|
|
2400
2400
|
Et
|
|
2401
2401
|
), { processAction: we, globalValues: ke } = Y || {};
|
|
2402
2402
|
gt(t, () => ({
|
|
2403
|
-
submitForm:
|
|
2403
|
+
submitForm: en,
|
|
2404
2404
|
getFields: je,
|
|
2405
2405
|
getValues: Ae,
|
|
2406
2406
|
getPlainValues: G,
|
|
@@ -2534,7 +2534,7 @@ function Aa(e, t) {
|
|
|
2534
2534
|
isDefaultGet: ve
|
|
2535
2535
|
}), $t({ fields: Q, arch: ee, values: H }), se == null || se(!1), Re == null || Re(!1), ve && I(!0);
|
|
2536
2536
|
}, nt = async () => new Promise(async (L) => {
|
|
2537
|
-
Qe() ?
|
|
2537
|
+
Qe() ? Jt({
|
|
2538
2538
|
t: F,
|
|
2539
2539
|
onOk: () => {
|
|
2540
2540
|
he == null || he(), L(!0);
|
|
@@ -2577,12 +2577,13 @@ function Aa(e, t) {
|
|
|
2577
2577
|
}) => {
|
|
2578
2578
|
let Q = {}, ee = !1;
|
|
2579
2579
|
if (ie()) {
|
|
2580
|
-
Q = (await N.getHandler().readObjects({
|
|
2580
|
+
if (Q = (await N.getHandler().readObjects({
|
|
2581
2581
|
model: n,
|
|
2582
2582
|
ids: [ie()],
|
|
2583
2583
|
fields: L,
|
|
2584
2584
|
context: v
|
|
2585
|
-
}))[0]
|
|
2585
|
+
}))[0], y)
|
|
2586
|
+
return { values: Q, defaultGetCalled: ee };
|
|
2586
2587
|
const ve = await N.getHandler().search({
|
|
2587
2588
|
params: [
|
|
2588
2589
|
["res_model", "=", n],
|
|
@@ -2630,7 +2631,7 @@ function Aa(e, t) {
|
|
|
2630
2631
|
}, $o = async (L) => {
|
|
2631
2632
|
const { callOnSubmitSucceed: H = !0 } = L || {};
|
|
2632
2633
|
!y && H && (ue == null || ue(ie(), Ae(), oe()));
|
|
2633
|
-
},
|
|
2634
|
+
}, en = async (L) => {
|
|
2634
2635
|
let H = !1;
|
|
2635
2636
|
const { callOnSubmitSucceed: Q = !0 } = L || {};
|
|
2636
2637
|
if (re.current = !0, O(void 0), ye.current && !Qe() && ie() && Q) {
|
|
@@ -2862,7 +2863,7 @@ function Aa(e, t) {
|
|
|
2862
2863
|
}
|
|
2863
2864
|
let ee = !1;
|
|
2864
2865
|
try {
|
|
2865
|
-
!f && (Qe() || ie() === void 0) && (ee = !0, bn(!0), m === "2many" ? (await sr({ callOnSubmitSucceed: !1 }), ye.current = !0) : await
|
|
2866
|
+
!f && (Qe() || ie() === void 0) && (ee = !0, bn(!0), m === "2many" ? (await sr({ callOnSubmitSucceed: !1 }), ye.current = !0) : await en({ callOnSubmitSucceed: !1 }));
|
|
2866
2867
|
const ve = ye.current ? Ce() : {}, rt = { ...Q, ...ve };
|
|
2867
2868
|
L === "object" ? await jo({ action: H, context: rt }) : L === "workflow" ? await Wo({ action: H }) : L === "action" && await Uo({ action: H, context: rt }), ee && bn(!1);
|
|
2868
2869
|
} catch (ve) {
|
|
@@ -2882,7 +2883,7 @@ function Aa(e, t) {
|
|
|
2882
2883
|
getFieldValue: dt,
|
|
2883
2884
|
executeButtonAction: Go,
|
|
2884
2885
|
getContext: _e,
|
|
2885
|
-
submitForm:
|
|
2886
|
+
submitForm: en,
|
|
2886
2887
|
fetchValues: Ve,
|
|
2887
2888
|
formHasChanges: Qe,
|
|
2888
2889
|
elementHasLostFocus: Yo,
|
|
@@ -2910,7 +2911,7 @@ function Aa(e, t) {
|
|
|
2910
2911
|
/* @__PURE__ */ r(
|
|
2911
2912
|
De,
|
|
2912
2913
|
{
|
|
2913
|
-
icon: /* @__PURE__ */ r(
|
|
2914
|
+
icon: /* @__PURE__ */ r(Gt, {}),
|
|
2914
2915
|
disabled: R,
|
|
2915
2916
|
onClick: async () => {
|
|
2916
2917
|
await nt();
|
|
@@ -2923,9 +2924,9 @@ function Aa(e, t) {
|
|
|
2923
2924
|
{
|
|
2924
2925
|
disabled: R || f,
|
|
2925
2926
|
loading: R,
|
|
2926
|
-
icon: /* @__PURE__ */ r(
|
|
2927
|
+
icon: /* @__PURE__ */ r(qt, {}),
|
|
2927
2928
|
onClick: async () => {
|
|
2928
|
-
await
|
|
2929
|
+
await en();
|
|
2929
2930
|
},
|
|
2930
2931
|
type: "primary",
|
|
2931
2932
|
children: "OK"
|
|
@@ -2949,7 +2950,7 @@ function Aa(e, t) {
|
|
|
2949
2950
|
}
|
|
2950
2951
|
) : null;
|
|
2951
2952
|
}
|
|
2952
|
-
const
|
|
2953
|
+
const Xt = pt(Aa), Zt = (e) => {
|
|
2953
2954
|
const {
|
|
2954
2955
|
visible: t,
|
|
2955
2956
|
id: n,
|
|
@@ -3015,7 +3016,7 @@ const Zt = pt(Aa), Qt = (e) => {
|
|
|
3015
3016
|
onCancel: s,
|
|
3016
3017
|
maskClosable: !1,
|
|
3017
3018
|
children: /* @__PURE__ */ r(
|
|
3018
|
-
|
|
3019
|
+
Xt,
|
|
3019
3020
|
{
|
|
3020
3021
|
id: n,
|
|
3021
3022
|
showFooter: !0,
|
|
@@ -3262,7 +3263,7 @@ function Ya(e) {
|
|
|
3262
3263
|
const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: i, isSearching: o } = e, { t: s } = pe();
|
|
3263
3264
|
return /* @__PURE__ */ D(Te, { children: [
|
|
3264
3265
|
/* @__PURE__ */ r(de, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ D("a", { className: "text-xs", onClick: t, children: [
|
|
3265
|
-
n ? /* @__PURE__ */ r(pi, { className: "pr-1" }) : /* @__PURE__ */ r(
|
|
3266
|
+
n ? /* @__PURE__ */ r(pi, { className: "pr-1" }) : /* @__PURE__ */ r(Yt, { className: "pr-1" }),
|
|
3266
3267
|
s(n ? "simple_search" : "advanced_search")
|
|
3267
3268
|
] }) }),
|
|
3268
3269
|
/* @__PURE__ */ D(de, { span: 12, className: "text-right pb-2", children: [
|
|
@@ -4081,8 +4082,8 @@ const il = (e) => {
|
|
|
4081
4082
|
I
|
|
4082
4083
|
] });
|
|
4083
4084
|
}
|
|
4084
|
-
),
|
|
4085
|
-
|
|
4085
|
+
), Qt = Dr(xo);
|
|
4086
|
+
Qt.displayName = "Tree";
|
|
4086
4087
|
xo.displayName = "UnmemoizedTree";
|
|
4087
4088
|
function xl(e, t) {
|
|
4088
4089
|
var Mt;
|
|
@@ -4120,7 +4121,7 @@ function xl(e, t) {
|
|
|
4120
4121
|
setTreeIsLoading: ae = void 0,
|
|
4121
4122
|
searchValues: Fe = {},
|
|
4122
4123
|
setSearchValues: Me = void 0,
|
|
4123
|
-
limit: Ee =
|
|
4124
|
+
limit: Ee = on,
|
|
4124
4125
|
setLimit: Pe = void 0
|
|
4125
4126
|
} = (f ? K : {}) || {}, me = be(
|
|
4126
4127
|
(Ve) => {
|
|
@@ -4278,7 +4279,7 @@ function xl(e, t) {
|
|
|
4278
4279
|
}
|
|
4279
4280
|
),
|
|
4280
4281
|
/* @__PURE__ */ r(
|
|
4281
|
-
|
|
4282
|
+
Qt,
|
|
4282
4283
|
{
|
|
4283
4284
|
ref: T,
|
|
4284
4285
|
context: c,
|
|
@@ -4386,7 +4387,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4386
4387
|
/* @__PURE__ */ r(
|
|
4387
4388
|
De,
|
|
4388
4389
|
{
|
|
4389
|
-
icon: /* @__PURE__ */ r(
|
|
4390
|
+
icon: /* @__PURE__ */ r(qt, {}),
|
|
4390
4391
|
onClick: () => {
|
|
4391
4392
|
v();
|
|
4392
4393
|
},
|
|
@@ -4394,7 +4395,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4394
4395
|
children: m("ok")
|
|
4395
4396
|
}
|
|
4396
4397
|
),
|
|
4397
|
-
/* @__PURE__ */ r(De, { icon: /* @__PURE__ */ r(
|
|
4398
|
+
/* @__PURE__ */ r(De, { icon: /* @__PURE__ */ r(Gt, {}), onClick: g, children: m("cancel") })
|
|
4398
4399
|
] }) })
|
|
4399
4400
|
] });
|
|
4400
4401
|
return /* @__PURE__ */ D(J, { children: [
|
|
@@ -4414,7 +4415,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4414
4415
|
}
|
|
4415
4416
|
),
|
|
4416
4417
|
/* @__PURE__ */ r(
|
|
4417
|
-
|
|
4418
|
+
Zt,
|
|
4418
4419
|
{
|
|
4419
4420
|
model: o,
|
|
4420
4421
|
visible: d,
|
|
@@ -4600,7 +4601,7 @@ const So = pt(xl), To = (e) => {
|
|
|
4600
4601
|
}
|
|
4601
4602
|
),
|
|
4602
4603
|
/* @__PURE__ */ r(
|
|
4603
|
-
|
|
4604
|
+
Zt,
|
|
4604
4605
|
{
|
|
4605
4606
|
model: s,
|
|
4606
4607
|
parentContext: { ...x == null ? void 0 : x(), ...l },
|
|
@@ -4911,7 +4912,7 @@ const Fn = (e) => (t) => {
|
|
|
4911
4912
|
useGrouping: !0
|
|
4912
4913
|
});
|
|
4913
4914
|
return { name: e === "pie" ? t.x : t.type, value: n };
|
|
4914
|
-
},
|
|
4915
|
+
}, tn = (e) => {
|
|
4915
4916
|
if (typeof e == "string" && Dl(e))
|
|
4916
4917
|
return parseFloat(e).toLocaleString("es-ES", {
|
|
4917
4918
|
useGrouping: !0
|
|
@@ -4933,12 +4934,12 @@ const Fn = (e) => (t) => {
|
|
|
4933
4934
|
xAxis: {
|
|
4934
4935
|
tickCount: 5,
|
|
4935
4936
|
label: {
|
|
4936
|
-
formatter:
|
|
4937
|
+
formatter: tn
|
|
4937
4938
|
}
|
|
4938
4939
|
},
|
|
4939
4940
|
yAxis: {
|
|
4940
4941
|
label: {
|
|
4941
|
-
formatter:
|
|
4942
|
+
formatter: tn
|
|
4942
4943
|
}
|
|
4943
4944
|
},
|
|
4944
4945
|
legend: {
|
|
@@ -4985,12 +4986,12 @@ const Fn = (e) => (t) => {
|
|
|
4985
4986
|
},
|
|
4986
4987
|
xAxis: {
|
|
4987
4988
|
label: {
|
|
4988
|
-
formatter:
|
|
4989
|
+
formatter: tn
|
|
4989
4990
|
}
|
|
4990
4991
|
},
|
|
4991
4992
|
yAxis: {
|
|
4992
4993
|
label: {
|
|
4993
|
-
formatter:
|
|
4994
|
+
formatter: tn
|
|
4994
4995
|
}
|
|
4995
4996
|
},
|
|
4996
4997
|
label: {
|
|
@@ -5568,7 +5569,7 @@ const Ql = (e) => {
|
|
|
5568
5569
|
} : Se);
|
|
5569
5570
|
ae(Ce);
|
|
5570
5571
|
}, se = (G) => {
|
|
5571
|
-
v ?
|
|
5572
|
+
v ? Jt({
|
|
5572
5573
|
t: y,
|
|
5573
5574
|
onOk: () => {
|
|
5574
5575
|
$e(), G(), T(!1);
|
|
@@ -5704,7 +5705,7 @@ const Ql = (e) => {
|
|
|
5704
5705
|
var oe, _e, Ce, Se;
|
|
5705
5706
|
if (a === "form")
|
|
5706
5707
|
return re.length === 0 ? y("noCurrentEntries") : a !== ye.current && s.some((Oe) => !Oe.values) ? /* @__PURE__ */ r(Le, {}) : /* @__PURE__ */ r(
|
|
5707
|
-
|
|
5708
|
+
Xt,
|
|
5708
5709
|
{
|
|
5709
5710
|
formView: o.get("form"),
|
|
5710
5711
|
values: (oe = re[d]) == null ? void 0 : oe.values,
|
|
@@ -5735,7 +5736,7 @@ const Ql = (e) => {
|
|
|
5735
5736
|
}
|
|
5736
5737
|
}) : re.map((Oe) => Oe.treeValues)), a === "tree")
|
|
5737
5738
|
return /* @__PURE__ */ r(
|
|
5738
|
-
|
|
5739
|
+
Qt,
|
|
5739
5740
|
{
|
|
5740
5741
|
total: re.length,
|
|
5741
5742
|
limit: re.length,
|
|
@@ -5795,7 +5796,7 @@ const Ql = (e) => {
|
|
|
5795
5796
|
),
|
|
5796
5797
|
ie(),
|
|
5797
5798
|
/* @__PURE__ */ r(
|
|
5798
|
-
|
|
5799
|
+
Zt,
|
|
5799
5800
|
{
|
|
5800
5801
|
formView: o.get("form"),
|
|
5801
5802
|
model: I,
|
|
@@ -6518,7 +6519,7 @@ function rr(e) {
|
|
|
6518
6519
|
], [n, t.view_id, l]);
|
|
6519
6520
|
function u(c) {
|
|
6520
6521
|
if (s) {
|
|
6521
|
-
|
|
6522
|
+
Jt({
|
|
6522
6523
|
t: l,
|
|
6523
6524
|
onOk: () => {
|
|
6524
6525
|
c();
|
|
@@ -6568,7 +6569,7 @@ function rr(e) {
|
|
|
6568
6569
|
borderTopLeftRadius: 0,
|
|
6569
6570
|
borderBottomLeftRadius: 0
|
|
6570
6571
|
},
|
|
6571
|
-
icon: /* @__PURE__ */ r(
|
|
6572
|
+
icon: /* @__PURE__ */ r(Yt, { style: { fontSize: "0.5em" } }),
|
|
6572
6573
|
onClick: (c) => c.preventDefault()
|
|
6573
6574
|
}
|
|
6574
6575
|
)
|
|
@@ -6605,7 +6606,7 @@ function Ao(e) {
|
|
|
6605
6606
|
ot
|
|
6606
6607
|
), { t: o } = pe(), s = () => {
|
|
6607
6608
|
if (n) {
|
|
6608
|
-
|
|
6609
|
+
Jt({
|
|
6609
6610
|
t: o,
|
|
6610
6611
|
onOk: () => {
|
|
6611
6612
|
i();
|
|
@@ -6668,7 +6669,7 @@ const Vc = (e) => {
|
|
|
6668
6669
|
const { numberOfAttachments: t, disabled: n } = e, { t: i } = pe(), [o, s] = w(!1), a = /* @__PURE__ */ D(De, { disabled: n, children: [
|
|
6669
6670
|
/* @__PURE__ */ r(Zr, {}),
|
|
6670
6671
|
`(${t})`,
|
|
6671
|
-
/* @__PURE__ */ r(
|
|
6672
|
+
/* @__PURE__ */ r(Yt, { style: { fontSize: 12 } })
|
|
6672
6673
|
] });
|
|
6673
6674
|
return n ? a : /* @__PURE__ */ r(
|
|
6674
6675
|
ii,
|
|
@@ -6774,26 +6775,28 @@ function Dc(e) {
|
|
|
6774
6775
|
onListAllAttachments: o,
|
|
6775
6776
|
onViewAttachmentDetails: s
|
|
6776
6777
|
} = e, { formRef: a } = ne(ot), [l, d] = w(!1), [u, f] = w([]), [c, m] = w(!1), { t: p } = pe(), h = be(async () => {
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6778
|
+
if (!(!t || t.length === 0)) {
|
|
6779
|
+
d(!0);
|
|
6780
|
+
try {
|
|
6781
|
+
const v = await N.getHandler().readObjects({
|
|
6782
|
+
model: "ir.attachment",
|
|
6783
|
+
ids: t.map((T) => T.id),
|
|
6784
|
+
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
6785
|
+
context: a.current.getContext()
|
|
6786
|
+
});
|
|
6787
|
+
f(
|
|
6788
|
+
v.map((T) => ({
|
|
6789
|
+
id: T.id,
|
|
6790
|
+
name: T.name,
|
|
6791
|
+
datas_fname: T.datas_fname,
|
|
6792
|
+
link: T.link
|
|
6793
|
+
}))
|
|
6794
|
+
);
|
|
6795
|
+
} catch (v) {
|
|
6796
|
+
ze(v);
|
|
6797
|
+
}
|
|
6798
|
+
d(!1);
|
|
6795
6799
|
}
|
|
6796
|
-
d(!1);
|
|
6797
6800
|
}, [t, a]), g = be(
|
|
6798
6801
|
async (v) => {
|
|
6799
6802
|
if (v.link) {
|
|
@@ -6900,7 +6903,7 @@ function kc({ toolbar: e }) {
|
|
|
6900
6903
|
}
|
|
6901
6904
|
function E(I) {
|
|
6902
6905
|
if (s) {
|
|
6903
|
-
|
|
6906
|
+
Jt({
|
|
6904
6907
|
t: R,
|
|
6905
6908
|
onOk: () => {
|
|
6906
6909
|
I();
|
|
@@ -6917,7 +6920,7 @@ function kc({ toolbar: e }) {
|
|
|
6917
6920
|
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));
|
|
6918
6921
|
}
|
|
6919
6922
|
function X() {
|
|
6920
|
-
|
|
6923
|
+
zt({
|
|
6921
6924
|
confirmMessage: R("confirmRemoveItem"),
|
|
6922
6925
|
t: R,
|
|
6923
6926
|
onOk: () => {
|
|
@@ -7222,7 +7225,7 @@ const { useToken: Ec } = He, ko = (e) => {
|
|
|
7222
7225
|
l ? null : /* @__PURE__ */ r(de, { flex: "none", children: p ? /* @__PURE__ */ r(
|
|
7223
7226
|
De,
|
|
7224
7227
|
{
|
|
7225
|
-
icon: /* @__PURE__ */ r(
|
|
7228
|
+
icon: /* @__PURE__ */ r(qt, {}),
|
|
7226
7229
|
onClick: () => {
|
|
7227
7230
|
o(n) && (h(!1), y(!1));
|
|
7228
7231
|
},
|
|
@@ -7324,7 +7327,7 @@ const { useToken: Ec } = He, ko = (e) => {
|
|
|
7324
7327
|
/* @__PURE__ */ r(
|
|
7325
7328
|
De,
|
|
7326
7329
|
{
|
|
7327
|
-
icon: /* @__PURE__ */ r(
|
|
7330
|
+
icon: /* @__PURE__ */ r(Gt, {}),
|
|
7328
7331
|
htmlType: "button",
|
|
7329
7332
|
onClick: i,
|
|
7330
7333
|
disabled: o,
|
|
@@ -7336,7 +7339,7 @@ const { useToken: Ec } = He, ko = (e) => {
|
|
|
7336
7339
|
{
|
|
7337
7340
|
loading: o,
|
|
7338
7341
|
style: { marginLeft: 15 },
|
|
7339
|
-
icon: /* @__PURE__ */ r(
|
|
7342
|
+
icon: /* @__PURE__ */ r(qt, {}),
|
|
7340
7343
|
htmlType: "submit",
|
|
7341
7344
|
type: "primary",
|
|
7342
7345
|
disabled: o,
|
|
@@ -7433,7 +7436,7 @@ function $c({ refreshGraph: e }) {
|
|
|
7433
7436
|
)
|
|
7434
7437
|
] });
|
|
7435
7438
|
}
|
|
7436
|
-
const { useToken: Bc } = He, { Title: Hc, Text:
|
|
7439
|
+
const { useToken: Bc } = He, { Title: Hc, Text: nn } = Ut;
|
|
7437
7440
|
function wn(e) {
|
|
7438
7441
|
const { title: t, children: n } = e, {
|
|
7439
7442
|
title: i,
|
|
@@ -7451,7 +7454,7 @@ function wn(e) {
|
|
|
7451
7454
|
" (id:",
|
|
7452
7455
|
" ",
|
|
7453
7456
|
/* @__PURE__ */ r(
|
|
7454
|
-
|
|
7457
|
+
nn,
|
|
7455
7458
|
{
|
|
7456
7459
|
copyable: { icon: /* @__PURE__ */ r(Jn, { style: { color: "red" } }) },
|
|
7457
7460
|
children: s
|
|
@@ -7473,7 +7476,7 @@ function wn(e) {
|
|
|
7473
7476
|
f("editingDocument"),
|
|
7474
7477
|
" (id:",
|
|
7475
7478
|
" ",
|
|
7476
|
-
/* @__PURE__ */ r(
|
|
7479
|
+
/* @__PURE__ */ r(nn, { copyable: !0, children: s }),
|
|
7477
7480
|
")"
|
|
7478
7481
|
] }) : "";
|
|
7479
7482
|
if ((o == null ? void 0 : o.type) === "tree" && u) {
|
|
@@ -7483,7 +7486,7 @@ function wn(e) {
|
|
|
7483
7486
|
f("selectedRegisters"),
|
|
7484
7487
|
" - (id:",
|
|
7485
7488
|
" ",
|
|
7486
|
-
/* @__PURE__ */ r(
|
|
7489
|
+
/* @__PURE__ */ r(nn, { copyable: !0, children: u[0].id }),
|
|
7487
7490
|
")"
|
|
7488
7491
|
] });
|
|
7489
7492
|
if (u.length > 1)
|
|
@@ -7492,7 +7495,7 @@ function wn(e) {
|
|
|
7492
7495
|
" ",
|
|
7493
7496
|
f("selectedRegisters"),
|
|
7494
7497
|
/* @__PURE__ */ r(
|
|
7495
|
-
|
|
7498
|
+
nn,
|
|
7496
7499
|
{
|
|
7497
7500
|
copyable: {
|
|
7498
7501
|
text: u.map((p) => p.id).join(", ")
|
|
@@ -7651,7 +7654,7 @@ const Kc = (e) => {
|
|
|
7651
7654
|
return t ? /* @__PURE__ */ D(J, { children: [
|
|
7652
7655
|
/* @__PURE__ */ r(wn, { children: /* @__PURE__ */ r(kc, { toolbar: a == null ? void 0 : a.toolbar }) }),
|
|
7653
7656
|
/* @__PURE__ */ r(
|
|
7654
|
-
|
|
7657
|
+
Xt,
|
|
7655
7658
|
{
|
|
7656
7659
|
rootForm: !0,
|
|
7657
7660
|
ref: n,
|
|
@@ -8066,7 +8069,7 @@ function Zc(e) {
|
|
|
8066
8069
|
Et
|
|
8067
8070
|
), { processAction: B } = k || {}, [q, E] = w(!1), K = v !== void 0 && v.trim().length > 0;
|
|
8068
8071
|
function M() {
|
|
8069
|
-
|
|
8072
|
+
zt({
|
|
8070
8073
|
confirmMessage: O("confirmRemove"),
|
|
8071
8074
|
t: O,
|
|
8072
8075
|
onOk: () => {
|
|
@@ -8891,7 +8894,7 @@ const ad = ss(as), ld = (e) => {
|
|
|
8891
8894
|
children: i
|
|
8892
8895
|
}
|
|
8893
8896
|
);
|
|
8894
|
-
}, { useToken: cd } = He, { Text: dd } =
|
|
8897
|
+
}, { useToken: cd } = He, { Text: dd } = Ut, ud = (e) => {
|
|
8895
8898
|
const { title: t, children: n, action: i, openAction: o } = e, { token: s } = cd();
|
|
8896
8899
|
return /* @__PURE__ */ D(
|
|
8897
8900
|
"div",
|
|
@@ -8969,7 +8972,7 @@ function md(e) {
|
|
|
8969
8972
|
context: l,
|
|
8970
8973
|
attrs: Fe && { colors: Fe }
|
|
8971
8974
|
});
|
|
8972
|
-
k(
|
|
8975
|
+
k(rn(Pe));
|
|
8973
8976
|
const me = Ot({
|
|
8974
8977
|
resultsToSort: Ee,
|
|
8975
8978
|
sorter: B,
|
|
@@ -9032,7 +9035,7 @@ function md(e) {
|
|
|
9032
9035
|
}, ye = () => !h || !y ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
|
|
9033
9036
|
E && /* @__PURE__ */ r(Xe, { className: "mt-10", message: E, type: "error", banner: !0 }),
|
|
9034
9037
|
/* @__PURE__ */ r(
|
|
9035
|
-
|
|
9038
|
+
Qt,
|
|
9036
9039
|
{
|
|
9037
9040
|
showPagination: !1,
|
|
9038
9041
|
total: F,
|
|
@@ -9073,7 +9076,7 @@ const hd = (e) => {
|
|
|
9073
9076
|
});
|
|
9074
9077
|
s.length > 0 && i(s[0].id);
|
|
9075
9078
|
}
|
|
9076
|
-
return /* @__PURE__ */ r("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ r(
|
|
9079
|
+
return /* @__PURE__ */ r("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ r(Xt, { ...e, model: t, id: n, readOnly: !0 }) });
|
|
9077
9080
|
}, _n = "line_ids";
|
|
9078
9081
|
function pd(e, t) {
|
|
9079
9082
|
const { model: n, context: i = {}, id: o, configAction: s } = e, [a, l] = w([]), [d, u] = w(!1), [f, c] = w(), {
|
|
@@ -9473,7 +9476,7 @@ const gd = pt(pd), yd = (e) => {
|
|
|
9473
9476
|
}
|
|
9474
9477
|
}
|
|
9475
9478
|
) });
|
|
9476
|
-
}, { Meta: Id } = Ln, { Text: Od } =
|
|
9479
|
+
}, { Meta: Id } = Ln, { Text: Od } = Ut, Vd = ({ email: e, size: t = 40, theme: n = "" }) => {
|
|
9477
9480
|
const i = `https://www.gravatar.com/avatar/${is(
|
|
9478
9481
|
e
|
|
9479
9482
|
)}?s=${t}&d=${n}`;
|
|
@@ -9519,7 +9522,7 @@ const Dd = (e) => {
|
|
|
9519
9522
|
};
|
|
9520
9523
|
});
|
|
9521
9524
|
return /* @__PURE__ */ r(In, { mode: "alternate", items: n });
|
|
9522
|
-
}, Ed = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(kd, {}) }), { Content: Nd } = ai, { Title: Md } =
|
|
9525
|
+
}, Ed = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(kd, {}) }), { Content: Nd } = ai, { Title: Md } = Ut;
|
|
9523
9526
|
function Pd() {
|
|
9524
9527
|
const { t: e } = pe();
|
|
9525
9528
|
return /* @__PURE__ */ r(Nd, { className: "m-5 select-none", children: /* @__PURE__ */ r(Md, { level: 5, children: e("welcome") }) });
|
|
@@ -9911,7 +9914,7 @@ function Bd(e) {
|
|
|
9911
9914
|
alignItems: "center"
|
|
9912
9915
|
},
|
|
9913
9916
|
children: /* @__PURE__ */ r(
|
|
9914
|
-
|
|
9917
|
+
Gt,
|
|
9915
9918
|
{
|
|
9916
9919
|
style: {
|
|
9917
9920
|
color: a.colorPrimaryActive
|
|
@@ -10094,7 +10097,7 @@ const { useToken: jd } = He, Eu = (e) => {
|
|
|
10094
10097
|
borderTopLeftRadius: 0,
|
|
10095
10098
|
borderBottomLeftRadius: 0
|
|
10096
10099
|
},
|
|
10097
|
-
icon: /* @__PURE__ */ r(
|
|
10100
|
+
icon: /* @__PURE__ */ r(Yt, { style: { fontSize: "0.5em" } }),
|
|
10098
10101
|
onClick: (E) => E.preventDefault()
|
|
10099
10102
|
}
|
|
10100
10103
|
)
|
|
@@ -10129,8 +10132,8 @@ export {
|
|
|
10129
10132
|
Eu as FavouriteButton,
|
|
10130
10133
|
yo as Float,
|
|
10131
10134
|
nc as FloatTime,
|
|
10132
|
-
|
|
10133
|
-
|
|
10135
|
+
Xt as Form,
|
|
10136
|
+
Zt as FormModal,
|
|
10134
10137
|
Ol as GraphIndicator,
|
|
10135
10138
|
Oo as Group,
|
|
10136
10139
|
Es as Image,
|
|
@@ -10158,9 +10161,9 @@ export {
|
|
|
10158
10161
|
ta as Tags,
|
|
10159
10162
|
ac as Text,
|
|
10160
10163
|
Cc as Time,
|
|
10161
|
-
|
|
10164
|
+
Qt as Tree,
|
|
10162
10165
|
Nc as Url,
|
|
10163
10166
|
lt as iconMapper,
|
|
10164
|
-
|
|
10167
|
+
zt as showConfirmDialog
|
|
10165
10168
|
};
|
|
10166
10169
|
//# sourceMappingURL=react-ooui.es.js.map
|