@gisce/react-ooui 2.0.0-alpha.24 → 2.0.0-alpha.26
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 +837 -829
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/widgets/custom/Markdown.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/types/index.ts +1 -1
- package/src/widgets/custom/Markdown.tsx +8 -2
- package/src/widgets/custom/MultiCheckbox.tsx +1 -1
- package/src/widgets/custom/Tags.tsx +1 -1
- package/src/widgets/modals/TranslationModal.tsx +1 -1
- package/src/widgets/views/Form.tsx +1 -1
- package/src/widgets/views/Graph/useGraphData.tsx +1 -1
package/dist/react-ooui.es.js
CHANGED
|
@@ -2,11 +2,11 @@ var Go = Object.defineProperty;
|
|
|
2
2
|
var Uo = (t, e, r) => e in t ? Go(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var sr = (t, e, r) => (Uo(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
4
|
import { jsxs as V, jsx as n, Fragment as Q } from "react/jsx-runtime";
|
|
5
|
-
import Qe, { useContext as H, useState as b, useEffect as me, useRef as de, useCallback as De, forwardRef as
|
|
6
|
-
import { Tooltip as ht, theme as Pe, Typography as Yt, Form as lt, Row as
|
|
7
|
-
import { Label as Dt, Field as Rn, Tree as kr, Reference as ti, Selection as Bn, Many2one as Er, Boolean as ni, Container as ri, parseContext as
|
|
5
|
+
import Qe, { useContext as H, useState as b, useEffect as me, useRef as de, useCallback as De, forwardRef as wt, useImperativeHandle as bt } from "react";
|
|
6
|
+
import { Tooltip as ht, theme as Pe, Typography as Yt, Form as lt, Row as we, Col as ae, Modal as Je, Button as Oe, Dropdown as Gt, Menu as $e, Spin as Ae, Divider as cn, Space as We, Input as it, Select as Ct, Checkbox as Ht, Alert as et, Timeline as _n, Statistic as qo, Card as Nn, Tag as Rr, message as xn, DatePicker as Pn, TimePicker as Vr, InputNumber as Ln, Progress as zo, Avatar as Ar, Badge as Jo, Pagination as Zo, Tabs as Dr, Popover as Xo, Radio as ar, Switch as Qo, Steps as lr, Layout as ei } from "antd";
|
|
7
|
+
import { Label as Dt, Field as Rn, Tree as kr, Reference as ti, Selection as Bn, Many2one as Er, Boolean as ni, Container as ri, parseContext as vt, Form as Mr, Integer as Vn, SearchFieldTypes as mt, SearchFilter as oi, parseContextFields as Sn, parseDomainFields as cr, transformDomainForChildWidget as Nr, graphProcessor as Pr, parseGraph as $n, graphFieldUtils as ii } from "@gisce/ooui";
|
|
8
8
|
import * as dr from "@ant-design/icons";
|
|
9
|
-
import Lr, { QuestionCircleOutlined as Br, ExclamationCircleOutlined as pt, LoadingOutlined as st, DownOutlined as kt, WarningOutlined as $r, CloseOutlined as Ut, CheckOutlined as Et, TranslationOutlined as Hr, FolderOpenOutlined as Hn, DownloadOutlined as Kn, ClearOutlined as Wn, StarFilled as Kr, StarOutlined as Wr, UpOutlined as si, SearchOutlined as jn, RightCircleOutlined as ai, ThunderboltOutlined as Yn, PrinterOutlined as Gn, EnterOutlined as jr, PlusSquareOutlined as li, MinusSquareOutlined as ci, FileAddOutlined as dn, AlignLeftOutlined as di, ApiOutlined as ui, DeleteOutlined as Un, LeftOutlined as Yr, RightOutlined as Gr, EyeOutlined as fi, FormOutlined as Kt, TableOutlined as qn, AreaChartOutlined as mi, CalendarOutlined as hi, LinkOutlined as Ur, SaveOutlined as pi, CopyOutlined as zn, InfoCircleOutlined as qr, ReloadOutlined as un, EditOutlined as zr, FilterOutlined as Jr, CloseCircleFilled as gi, BorderOuterOutlined as yi, SettingOutlined as
|
|
9
|
+
import Lr, { QuestionCircleOutlined as Br, ExclamationCircleOutlined as pt, LoadingOutlined as st, DownOutlined as kt, WarningOutlined as $r, CloseOutlined as Ut, CheckOutlined as Et, TranslationOutlined as Hr, FolderOpenOutlined as Hn, DownloadOutlined as Kn, ClearOutlined as Wn, StarFilled as Kr, StarOutlined as Wr, UpOutlined as si, SearchOutlined as jn, RightCircleOutlined as ai, ThunderboltOutlined as Yn, PrinterOutlined as Gn, EnterOutlined as jr, PlusSquareOutlined as li, MinusSquareOutlined as ci, FileAddOutlined as dn, AlignLeftOutlined as di, ApiOutlined as ui, DeleteOutlined as Un, LeftOutlined as Yr, RightOutlined as Gr, EyeOutlined as fi, FormOutlined as Kt, TableOutlined as qn, AreaChartOutlined as mi, CalendarOutlined as hi, LinkOutlined as Ur, SaveOutlined as pi, CopyOutlined as zn, InfoCircleOutlined as qr, ReloadOutlined as un, EditOutlined as zr, FilterOutlined as Jr, CloseCircleFilled as gi, BorderOuterOutlined as yi, SettingOutlined as vi, ExportOutlined as wi } from "@ant-design/icons";
|
|
10
10
|
import { Interweave as Jn } from "interweave";
|
|
11
11
|
import * as ur from "@tabler/icons-react";
|
|
12
12
|
import bi from "antd/lib/input/TextArea";
|
|
@@ -30,22 +30,23 @@ import Ni from "validator/lib/isURL";
|
|
|
30
30
|
import Pi from "validator/lib/isEmail";
|
|
31
31
|
import { useHotkeys as Li } from "react-hotkeys-hook";
|
|
32
32
|
import Bi from "react-markdown";
|
|
33
|
-
import $i from "
|
|
34
|
-
import Hi from "
|
|
35
|
-
import Ki from "
|
|
36
|
-
import
|
|
33
|
+
import $i from "remark-gfm";
|
|
34
|
+
import Hi from "@monaco-editor/react";
|
|
35
|
+
import Ki from "dayjs/plugin/relativeTime";
|
|
36
|
+
import Wi from "md5";
|
|
37
|
+
import { WidthProvider as ji, Responsive as Yi } from "react-grid-layout";
|
|
37
38
|
import "react-grid-layout/css/styles.css";
|
|
38
39
|
import { v4 as Zr } from "uuid";
|
|
39
|
-
const { Text:
|
|
40
|
+
const { Text: Gi, Title: Ui } = Yt, { useToken: qi } = Pe, zi = {
|
|
40
41
|
left: "justify-start",
|
|
41
42
|
center: "justify-center",
|
|
42
43
|
right: "justify-end"
|
|
43
44
|
}, fn = (t) => {
|
|
44
|
-
const { ooui: e, align: r, responsiveBehaviour: i } = t, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: d } = e, c = a !== null && o.length > 1 ? o + " :" : o, m = r || (a ? i ? "left" : "right" : "left"), { token: g } =
|
|
45
|
+
const { ooui: e, align: r, responsiveBehaviour: i } = t, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: d } = e, c = a !== null && o.length > 1 ? o + " :" : o, m = r || (a ? i ? "left" : "right" : "left"), { token: g } = qi(), h = l === void 0 ? Gi : Ui;
|
|
45
46
|
return /* @__PURE__ */ V(
|
|
46
47
|
"div",
|
|
47
48
|
{
|
|
48
|
-
className: `flex flex-row items-center pb-1 pt-1 ${
|
|
49
|
+
className: `flex flex-row items-center pb-1 pt-1 ${zi[m]}`,
|
|
49
50
|
children: [
|
|
50
51
|
s && /* @__PURE__ */ n(ht, { title: s, children: /* @__PURE__ */ n(
|
|
51
52
|
Br,
|
|
@@ -60,7 +61,7 @@ const { Text: Yi, Title: Gi } = Yt, { useToken: Ui } = Pe, qi = {
|
|
|
60
61
|
]
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
|
-
},
|
|
64
|
+
}, Ji = {
|
|
64
65
|
true: "Sí",
|
|
65
66
|
false: "No",
|
|
66
67
|
simple_search: "Búsqueda simple",
|
|
@@ -150,7 +151,7 @@ const { Text: Yi, Title: Gi } = Yt, { useToken: Ui } = Pe, qi = {
|
|
|
150
151
|
recordsSelected: "Hi ha {numberOfSelectedRows} registres seleccionats en aquesta pàgina.",
|
|
151
152
|
selectAllRecords: "Seleccionar tots els {totalRecords} registres.",
|
|
152
153
|
allRecordsSelected: "Hi ha {totalRecords} registres seleccionats."
|
|
153
|
-
},
|
|
154
|
+
}, Zi = {
|
|
154
155
|
true: "Yes",
|
|
155
156
|
false: "No",
|
|
156
157
|
simple_search: "Simple search",
|
|
@@ -240,7 +241,7 @@ const { Text: Yi, Title: Gi } = Yt, { useToken: Ui } = Pe, qi = {
|
|
|
240
241
|
recordsSelected: "Hi ha {numberOfSelectedRows} registres seleccionats en aquesta pàgina.",
|
|
241
242
|
selectAllRecords: "Seleccionar tots els {totalRecords} registres.",
|
|
242
243
|
allRecordsSelected: "Hi ha {totalRecords} registres seleccionats."
|
|
243
|
-
},
|
|
244
|
+
}, Xi = {
|
|
244
245
|
true: "Sí",
|
|
245
246
|
false: "No",
|
|
246
247
|
simple_search: "Búsqueda simple",
|
|
@@ -330,13 +331,13 @@ const { Text: Yi, Title: Gi } = Yt, { useToken: Ui } = Pe, qi = {
|
|
|
330
331
|
recordsSelected: "Hay {numberOfSelectedRows} registros seleccionados en ésta página.",
|
|
331
332
|
selectAllRecords: "Seleccionar todos los {totalRecords} registros.",
|
|
332
333
|
allRecordsSelected: "Hay {totalRecords} registros seleccionados."
|
|
333
|
-
},
|
|
334
|
-
ca_ES:
|
|
335
|
-
en_US:
|
|
336
|
-
es_ES:
|
|
334
|
+
}, Qi = {
|
|
335
|
+
ca_ES: Ji,
|
|
336
|
+
en_US: Zi,
|
|
337
|
+
es_ES: Xi
|
|
337
338
|
}, he = Qe.createContext(
|
|
338
339
|
null
|
|
339
|
-
),
|
|
340
|
+
), es = (t) => {
|
|
340
341
|
const { children: e, lang: r } = t;
|
|
341
342
|
function i(o) {
|
|
342
343
|
return Ie(o, r);
|
|
@@ -353,7 +354,7 @@ const { Text: Yi, Title: Gi } = Yt, { useToken: Ui } = Pe, qi = {
|
|
|
353
354
|
);
|
|
354
355
|
}, Ie = (t, e) => {
|
|
355
356
|
var i;
|
|
356
|
-
return ((i =
|
|
357
|
+
return ((i = Qi[e]) == null ? void 0 : i[t]) || t;
|
|
357
358
|
};
|
|
358
359
|
function ge({
|
|
359
360
|
ooui: t,
|
|
@@ -397,7 +398,7 @@ function ge({
|
|
|
397
398
|
align: s
|
|
398
399
|
}
|
|
399
400
|
);
|
|
400
|
-
return r === "horizontal" ? (() => /* @__PURE__ */ V(
|
|
401
|
+
return r === "horizontal" ? (() => /* @__PURE__ */ V(we, { align: "middle", className: "pb-1 pt-1", children: [
|
|
401
402
|
/* @__PURE__ */ n(ae, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ n("div", { className: "flex flex-col items-end", children: p }) }),
|
|
402
403
|
/* @__PURE__ */ n(ae, { flex: "auto", children: h() })
|
|
403
404
|
] }))() : (() => /* @__PURE__ */ V(Q, { children: [
|
|
@@ -405,12 +406,12 @@ function ge({
|
|
|
405
406
|
h()
|
|
406
407
|
] }))();
|
|
407
408
|
}
|
|
408
|
-
const { confirm:
|
|
409
|
+
const { confirm: ts } = Je, qt = ({
|
|
409
410
|
onOk: t,
|
|
410
411
|
confirmMessage: e,
|
|
411
412
|
lang: r
|
|
412
413
|
}) => {
|
|
413
|
-
|
|
414
|
+
ts({
|
|
414
415
|
title: Ie("confirmation", r),
|
|
415
416
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
416
417
|
centered: !0,
|
|
@@ -419,7 +420,7 @@ const { confirm: es } = Je, qt = ({
|
|
|
419
420
|
cancelText: Ie("cancel", r),
|
|
420
421
|
onOk: t
|
|
421
422
|
});
|
|
422
|
-
}, Ne = Qe.createContext(null),
|
|
423
|
+
}, Ne = Qe.createContext(null), ns = (t) => {
|
|
423
424
|
const {
|
|
424
425
|
children: e,
|
|
425
426
|
activeId: r,
|
|
@@ -552,7 +553,7 @@ const { confirm: es } = Je, qt = ({
|
|
|
552
553
|
STOCK_UNINDENT: "AlignLeft",
|
|
553
554
|
STOCK_PREFERENCES: "Setting"
|
|
554
555
|
}, ct = (t, e) => (t.indexOf("gtk-") !== -1 && (t = `STOCK_${t.replace("gtk-", "").replace(/\-/g, "_").toUpperCase()}`), fr.hasOwnProperty(t) ? mr(fr[t], e) : mr(t, e));
|
|
555
|
-
function
|
|
556
|
+
function rs(t) {
|
|
556
557
|
return `${t.split("-").map(
|
|
557
558
|
(e) => e.replace(
|
|
558
559
|
/\w\S*/g,
|
|
@@ -562,7 +563,7 @@ function ns(t) {
|
|
|
562
563
|
}
|
|
563
564
|
function mr(t, e) {
|
|
564
565
|
let r = t.charAt(0).toUpperCase() + t.slice(1);
|
|
565
|
-
r.indexOf("-") !== -1 && (r =
|
|
566
|
+
r.indexOf("-") !== -1 && (r = rs(r));
|
|
566
567
|
const i = `${r}Outlined`;
|
|
567
568
|
if (dr[i])
|
|
568
569
|
return () => Qe.createElement(dr[i], {
|
|
@@ -610,7 +611,7 @@ const Xr = (t) => {
|
|
|
610
611
|
}
|
|
611
612
|
p();
|
|
612
613
|
}
|
|
613
|
-
function
|
|
614
|
+
function v() {
|
|
614
615
|
if (m)
|
|
615
616
|
return /* @__PURE__ */ n(st, {});
|
|
616
617
|
if (l) {
|
|
@@ -624,14 +625,14 @@ const Xr = (t) => {
|
|
|
624
625
|
block: !0,
|
|
625
626
|
disabled: !o || u,
|
|
626
627
|
onClick: y,
|
|
627
|
-
icon:
|
|
628
|
+
icon: v(),
|
|
628
629
|
type: e.primary ? "primary" : "default",
|
|
629
630
|
danger: e.danger,
|
|
630
631
|
style: { whiteSpace: "normal", height: "auto" },
|
|
631
632
|
children: i
|
|
632
633
|
}
|
|
633
634
|
) });
|
|
634
|
-
},
|
|
635
|
+
}, os = (t) => {
|
|
635
636
|
const { ooui: e } = t, { defaultButton: r, secondaryButtons: i } = e, {
|
|
636
637
|
id: o,
|
|
637
638
|
caption: s,
|
|
@@ -643,7 +644,7 @@ const Xr = (t) => {
|
|
|
643
644
|
danger: f,
|
|
644
645
|
context: m,
|
|
645
646
|
readOnly: g
|
|
646
|
-
} = r || {}, h = H(Ne), { executeButtonAction: p } = h || {}, [y,
|
|
647
|
+
} = r || {}, h = H(Ne), { executeButtonAction: p } = h || {}, [y, v] = b(!1), { lang: T } = H(he);
|
|
647
648
|
function I() {
|
|
648
649
|
if (y)
|
|
649
650
|
return /* @__PURE__ */ n(st, {});
|
|
@@ -653,7 +654,7 @@ const Xr = (t) => {
|
|
|
653
654
|
}
|
|
654
655
|
}
|
|
655
656
|
async function C() {
|
|
656
|
-
l && o && (
|
|
657
|
+
l && o && (v(!0), await p({ type: l, action: o, context: m }), v(!1));
|
|
657
658
|
}
|
|
658
659
|
function O() {
|
|
659
660
|
if (d) {
|
|
@@ -679,7 +680,7 @@ const Xr = (t) => {
|
|
|
679
680
|
icon: /* @__PURE__ */ n(kt, {}),
|
|
680
681
|
type: c ? "primary" : void 0,
|
|
681
682
|
overlay: /* @__PURE__ */ n(
|
|
682
|
-
|
|
683
|
+
is,
|
|
683
684
|
{
|
|
684
685
|
ooui: i,
|
|
685
686
|
executeButtonAction: p,
|
|
@@ -694,7 +695,7 @@ const Xr = (t) => {
|
|
|
694
695
|
) });
|
|
695
696
|
if (r)
|
|
696
697
|
return /* @__PURE__ */ n(Xr, { ooui: r });
|
|
697
|
-
},
|
|
698
|
+
}, is = (t) => {
|
|
698
699
|
const { ooui: e, executeButtonAction: r, lang: i } = t;
|
|
699
700
|
if (!e)
|
|
700
701
|
return null;
|
|
@@ -710,7 +711,7 @@ const Xr = (t) => {
|
|
|
710
711
|
readOnly: g,
|
|
711
712
|
danger: h
|
|
712
713
|
} = s, [p, y] = b(!1);
|
|
713
|
-
async function
|
|
714
|
+
async function v() {
|
|
714
715
|
y(!0), await r({ type: u, action: a, context: m }), y(!1);
|
|
715
716
|
}
|
|
716
717
|
function T() {
|
|
@@ -719,12 +720,12 @@ const Xr = (t) => {
|
|
|
719
720
|
confirmMessage: c,
|
|
720
721
|
lang: i,
|
|
721
722
|
onOk: () => {
|
|
722
|
-
|
|
723
|
+
v();
|
|
723
724
|
}
|
|
724
725
|
});
|
|
725
726
|
return;
|
|
726
727
|
}
|
|
727
|
-
|
|
728
|
+
v();
|
|
728
729
|
}
|
|
729
730
|
function I() {
|
|
730
731
|
if (p)
|
|
@@ -746,7 +747,7 @@ const Xr = (t) => {
|
|
|
746
747
|
);
|
|
747
748
|
});
|
|
748
749
|
return /* @__PURE__ */ n($e, { children: o });
|
|
749
|
-
},
|
|
750
|
+
}, ss = 0.7;
|
|
750
751
|
function hr() {
|
|
751
752
|
const { innerWidth: t, innerHeight: e } = window;
|
|
752
753
|
return {
|
|
@@ -764,7 +765,7 @@ function mn() {
|
|
|
764
765
|
}
|
|
765
766
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
766
767
|
}, []), {
|
|
767
|
-
modalWidth: t.width *
|
|
768
|
+
modalWidth: t.width * ss,
|
|
768
769
|
modalHeight: t.height,
|
|
769
770
|
width: t.width,
|
|
770
771
|
height: t.height
|
|
@@ -800,16 +801,16 @@ const Qr = (t) => {
|
|
|
800
801
|
message: e,
|
|
801
802
|
title: i
|
|
802
803
|
};
|
|
803
|
-
}, { error:
|
|
804
|
+
}, { error: as, warning: ls } = Je, ze = (t) => {
|
|
804
805
|
const { message: e, type: r, title: i } = Qr(t);
|
|
805
|
-
(r === "error" ?
|
|
806
|
+
(r === "error" ? as : ls)({
|
|
806
807
|
title: i,
|
|
807
808
|
icon: r === "error" ? /* @__PURE__ */ n(pt, {}) : /* @__PURE__ */ n($r, {}),
|
|
808
809
|
centered: !0,
|
|
809
810
|
content: e
|
|
810
811
|
});
|
|
811
812
|
}, eo = (t) => {
|
|
812
|
-
const { visible: e, onCloseModal: r, model: i, id: o, field: s, onSubmitSucceed: a } = t, { modalWidth: l } = mn(), { t: d } = H(he), [u, c] = b([]), [f, m] = b(!1), [g, h] = b(!1), [p, y] = b({}),
|
|
813
|
+
const { visible: e, onCloseModal: r, model: i, id: o, field: s, onSubmitSucceed: a } = t, { modalWidth: l } = mn(), { t: d } = H(he), [u, c] = b([]), [f, m] = b(!1), [g, h] = b(!1), [p, y] = b({}), v = de();
|
|
813
814
|
me(() => {
|
|
814
815
|
e ? T() : y({});
|
|
815
816
|
}, [e]);
|
|
@@ -826,7 +827,7 @@ const Qr = (t) => {
|
|
|
826
827
|
async function I() {
|
|
827
828
|
const S = (await D.getHandler().search({
|
|
828
829
|
params: [["translatable", "=", "1"]],
|
|
829
|
-
|
|
830
|
+
fieldsToRetrieve: ["code", "name"],
|
|
830
831
|
model: "res.lang"
|
|
831
832
|
})).map((F) => ({
|
|
832
833
|
code: F.code,
|
|
@@ -837,18 +838,18 @@ const Qr = (t) => {
|
|
|
837
838
|
async function C(x) {
|
|
838
839
|
const S = {};
|
|
839
840
|
for (const F of x) {
|
|
840
|
-
const
|
|
841
|
+
const w = (await D.getHandler().readObjects({
|
|
841
842
|
model: i,
|
|
842
843
|
ids: [o],
|
|
843
844
|
fieldsToRetrieve: [s],
|
|
844
845
|
context: { lang: F.code }
|
|
845
846
|
}))[0];
|
|
846
|
-
S[F.code] =
|
|
847
|
+
S[F.code] = w[s] || "";
|
|
847
848
|
}
|
|
848
|
-
|
|
849
|
+
v.current = S, y(S);
|
|
849
850
|
}
|
|
850
851
|
function O() {
|
|
851
|
-
return u.map((x, S) => /* @__PURE__ */ V(
|
|
852
|
+
return u.map((x, S) => /* @__PURE__ */ V(we, { style: { paddingBottom: 20 }, children: [
|
|
852
853
|
/* @__PURE__ */ n(ae, { flex: "8rem", style: { paddingRight: 10 }, children: x.name }),
|
|
853
854
|
/* @__PURE__ */ n(ae, { flex: "auto", children: /* @__PURE__ */ n(
|
|
854
855
|
bi,
|
|
@@ -870,7 +871,7 @@ const Qr = (t) => {
|
|
|
870
871
|
h(!0);
|
|
871
872
|
try {
|
|
872
873
|
for (const x of Object.keys(p))
|
|
873
|
-
p[x] !==
|
|
874
|
+
p[x] !== v.current[x] && await D.getHandler().update({
|
|
874
875
|
model: i,
|
|
875
876
|
id: o,
|
|
876
877
|
values: { [s]: p[x] },
|
|
@@ -888,7 +889,7 @@ const Qr = (t) => {
|
|
|
888
889
|
return f ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ V(Q, { children: [
|
|
889
890
|
O(),
|
|
890
891
|
/* @__PURE__ */ n(cn, {}),
|
|
891
|
-
/* @__PURE__ */ n(
|
|
892
|
+
/* @__PURE__ */ n(we, { justify: "end", children: /* @__PURE__ */ V(We, { children: [
|
|
892
893
|
/* @__PURE__ */ n(
|
|
893
894
|
Oe,
|
|
894
895
|
{
|
|
@@ -932,14 +933,14 @@ function Xe(t) {
|
|
|
932
933
|
const { tooltip: e, ...r } = t;
|
|
933
934
|
return /* @__PURE__ */ n(ht, { title: e, children: /* @__PURE__ */ n(Oe, { ...r }) });
|
|
934
935
|
}
|
|
935
|
-
const { info:
|
|
936
|
-
|
|
936
|
+
const { info: cs } = Je, ft = (t) => {
|
|
937
|
+
cs({
|
|
937
938
|
title: "",
|
|
938
939
|
centered: !0,
|
|
939
940
|
content: t
|
|
940
941
|
});
|
|
941
|
-
}, { useToken:
|
|
942
|
-
const { ooui: e, isSearchField: r = !1 } = t, { id: i, readOnly: o, isPassword: s, required: a, translatable: l } = e, { token: d } =
|
|
942
|
+
}, { useToken: ds } = Pe, to = (t) => {
|
|
943
|
+
const { ooui: e, isSearchField: r = !1 } = t, { id: i, readOnly: o, isPassword: s, required: a, translatable: l } = e, { token: d } = ds(), u = a && !o ? { backgroundColor: d.colorPrimaryBg } : void 0, c = H(Ne), { elementHasLostFocus: f } = c || {};
|
|
943
944
|
let m = /* @__PURE__ */ n(
|
|
944
945
|
it,
|
|
945
946
|
{
|
|
@@ -957,8 +958,8 @@ const { info: ls } = Je, ft = (t) => {
|
|
|
957
958
|
id: i,
|
|
958
959
|
onBlur: f
|
|
959
960
|
}
|
|
960
|
-
)), l && !o && !r && (m = /* @__PURE__ */ n(
|
|
961
|
-
},
|
|
961
|
+
)), l && !o && !r && (m = /* @__PURE__ */ n(us, { field: i, requiredStyle: u })), /* @__PURE__ */ n(ge, { required: a, ...t, children: m });
|
|
962
|
+
}, us = ({
|
|
962
963
|
value: t,
|
|
963
964
|
field: e,
|
|
964
965
|
requiredStyle: r,
|
|
@@ -1012,7 +1013,7 @@ const { info: ls } = Je, ft = (t) => {
|
|
|
1012
1013
|
}
|
|
1013
1014
|
}
|
|
1014
1015
|
)
|
|
1015
|
-
] }) : /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ V(
|
|
1016
|
+
] }) : /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ V(we, { gutter: 8, wrap: !1, children: [
|
|
1016
1017
|
/* @__PURE__ */ n(ae, { flex: "auto", children: /* @__PURE__ */ n(
|
|
1017
1018
|
it,
|
|
1018
1019
|
{
|
|
@@ -1037,16 +1038,16 @@ const { info: ls } = Je, ft = (t) => {
|
|
|
1037
1038
|
}
|
|
1038
1039
|
) })
|
|
1039
1040
|
] }) });
|
|
1040
|
-
}, { defaultAlgorithm:
|
|
1041
|
+
}, { defaultAlgorithm: fs, defaultSeed: ms } = Pe, hs = fs(ms), { Option: ps } = Ct, no = (t) => {
|
|
1041
1042
|
const { ooui: e } = t, { required: r } = e;
|
|
1042
1043
|
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(ro, { ...t }) });
|
|
1043
1044
|
}, ro = (t) => {
|
|
1044
1045
|
const { ooui: e, onChange: r, value: i } = t, { selectionValues: o, readOnly: s, required: a } = e, l = Array.from(o.entries()), d = l && l.length && l.map((c) => {
|
|
1045
1046
|
const [f, m] = c;
|
|
1046
|
-
return /* @__PURE__ */ n(
|
|
1047
|
+
return /* @__PURE__ */ n(ps, { value: f, children: m }, f);
|
|
1047
1048
|
});
|
|
1048
1049
|
return /* @__PURE__ */ n(
|
|
1049
|
-
a && !s ?
|
|
1050
|
+
a && !s ? gs : Ct,
|
|
1050
1051
|
{
|
|
1051
1052
|
disabled: s,
|
|
1052
1053
|
onChange: r,
|
|
@@ -1057,17 +1058,17 @@ const { info: ls } = Je, ft = (t) => {
|
|
|
1057
1058
|
children: d
|
|
1058
1059
|
}
|
|
1059
1060
|
);
|
|
1060
|
-
},
|
|
1061
|
+
}, gs = Mt(Ct)`
|
|
1061
1062
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
1062
|
-
background-color: ${
|
|
1063
|
+
background-color: ${hs.colorPrimaryBg};
|
|
1063
1064
|
}
|
|
1064
|
-
`, { defaultAlgorithm:
|
|
1065
|
+
`, { defaultAlgorithm: ys, defaultSeed: vs } = Pe, pr = ys(vs), ws = (t) => {
|
|
1065
1066
|
const { ooui: e } = t, { id: r, readOnly: i, required: o } = e;
|
|
1066
|
-
return /* @__PURE__ */ n(ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ n(
|
|
1067
|
-
},
|
|
1067
|
+
return /* @__PURE__ */ n(ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ n(bs, { id: r, readOnly: i, required: o }) });
|
|
1068
|
+
}, bs = (t) => {
|
|
1068
1069
|
const { required: e, readOnly: r, ...i } = t;
|
|
1069
|
-
return /* @__PURE__ */ n("div", { className: "flex flex-row", children: /* @__PURE__ */ n(e && !r ?
|
|
1070
|
-
},
|
|
1070
|
+
return /* @__PURE__ */ n("div", { className: "flex flex-row", children: /* @__PURE__ */ n(e && !r ? Cs : Ht, { disabled: r, ...i }) });
|
|
1071
|
+
}, Cs = Mt(Ht)`
|
|
1071
1072
|
.ant-checkbox-inner {
|
|
1072
1073
|
background-color: ${pr.colorPrimaryBg};
|
|
1073
1074
|
}
|
|
@@ -1076,7 +1077,7 @@ const { info: ls } = Je, ft = (t) => {
|
|
|
1076
1077
|
background-color: ${pr.colorPrimary};
|
|
1077
1078
|
}
|
|
1078
1079
|
`;
|
|
1079
|
-
function
|
|
1080
|
+
function xs(t) {
|
|
1080
1081
|
const r = Buffer.from(t, "base64").length / 1e3;
|
|
1081
1082
|
return `${Math.round((r + Number.EPSILON) * 100) / 100} KB`;
|
|
1082
1083
|
}
|
|
@@ -1100,10 +1101,10 @@ function hn(t, e) {
|
|
|
1100
1101
|
const o = new Uint8Array(i), s = new Blob([o], { type: e + ";base64" }), a = URL.createObjectURL(s);
|
|
1101
1102
|
window.open(a);
|
|
1102
1103
|
}
|
|
1103
|
-
const
|
|
1104
|
+
const Ss = (t) => {
|
|
1104
1105
|
const { ooui: e } = t, { required: r, id: i } = e, o = ct(i);
|
|
1105
|
-
return o ? /* @__PURE__ */ n(o, {}) : /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(
|
|
1106
|
-
},
|
|
1106
|
+
return o ? /* @__PURE__ */ n(o, {}) : /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(Ts, { ooui: e }) });
|
|
1107
|
+
}, Ts = (t) => {
|
|
1107
1108
|
const { ooui: e, value: r, onChange: i } = t, { readOnly: o } = e, s = de(null), { t: a } = H(he), l = (f) => {
|
|
1108
1109
|
i == null || i(f);
|
|
1109
1110
|
};
|
|
@@ -1120,7 +1121,7 @@ const xs = (t) => {
|
|
|
1120
1121
|
l(void 0);
|
|
1121
1122
|
}
|
|
1122
1123
|
return /* @__PURE__ */ V(Q, { children: [
|
|
1123
|
-
/* @__PURE__ */ V(
|
|
1124
|
+
/* @__PURE__ */ V(we, { gutter: 8, wrap: !1, justify: "center", children: [
|
|
1124
1125
|
r && /* @__PURE__ */ n(
|
|
1125
1126
|
"img",
|
|
1126
1127
|
{
|
|
@@ -1140,7 +1141,7 @@ const xs = (t) => {
|
|
|
1140
1141
|
}
|
|
1141
1142
|
)
|
|
1142
1143
|
] }),
|
|
1143
|
-
/* @__PURE__ */ n(
|
|
1144
|
+
/* @__PURE__ */ n(we, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ V(We, { children: [
|
|
1144
1145
|
/* @__PURE__ */ n(
|
|
1145
1146
|
Xe,
|
|
1146
1147
|
{
|
|
@@ -1172,10 +1173,10 @@ const xs = (t) => {
|
|
|
1172
1173
|
)
|
|
1173
1174
|
] }) })
|
|
1174
1175
|
] });
|
|
1175
|
-
}, Ts = (t) => {
|
|
1176
|
-
const { ooui: e } = t, { required: r } = e;
|
|
1177
|
-
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(Fs, {}) });
|
|
1178
1176
|
}, Fs = (t) => {
|
|
1177
|
+
const { ooui: e } = t, { required: r } = e;
|
|
1178
|
+
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(Is, {}) });
|
|
1179
|
+
}, Is = (t) => {
|
|
1179
1180
|
const { value: e, onChange: r } = t;
|
|
1180
1181
|
if (!e)
|
|
1181
1182
|
return null;
|
|
@@ -1196,7 +1197,7 @@ const xs = (t) => {
|
|
|
1196
1197
|
}, _t = (t) => {
|
|
1197
1198
|
const e = t.arch, r = t.fields, i = new kr(r);
|
|
1198
1199
|
return i.parse(e), i;
|
|
1199
|
-
},
|
|
1200
|
+
}, Os = (t, e, r) => t.columns.map((o) => {
|
|
1200
1201
|
const s = o.type, a = o.id, l = e == null ? void 0 : e[s];
|
|
1201
1202
|
let d;
|
|
1202
1203
|
return l && (d = (u) => l(u, a, o, r)), {
|
|
@@ -1253,7 +1254,7 @@ function Rt({
|
|
|
1253
1254
|
};
|
|
1254
1255
|
return t.sort(l);
|
|
1255
1256
|
}
|
|
1256
|
-
function
|
|
1257
|
+
function _s(t) {
|
|
1257
1258
|
for (const e in t)
|
|
1258
1259
|
if (Object.prototype.hasOwnProperty.call(t, e) && t[e] !== void 0)
|
|
1259
1260
|
return !0;
|
|
@@ -1296,25 +1297,25 @@ const Xn = async (t) => {
|
|
|
1296
1297
|
});
|
|
1297
1298
|
const m = c.map((p) => {
|
|
1298
1299
|
const y = {};
|
|
1299
|
-
return Object.keys(p).forEach((
|
|
1300
|
-
(u[a].hasOwnProperty(
|
|
1300
|
+
return Object.keys(p).forEach((v) => {
|
|
1301
|
+
(u[a].hasOwnProperty(v) || v === "id") && (y[v] = p[v]);
|
|
1301
1302
|
}), y;
|
|
1302
1303
|
});
|
|
1303
1304
|
return [
|
|
1304
1305
|
e.map((p) => {
|
|
1305
1306
|
const y = m.find(
|
|
1306
1307
|
(T) => T.id === p.id
|
|
1307
|
-
),
|
|
1308
|
+
), v = {
|
|
1308
1309
|
...p
|
|
1309
1310
|
};
|
|
1310
|
-
return a === "form" ?
|
|
1311
|
+
return a === "form" ? v.values = y : a === "tree" && (v.treeValues = y), v;
|
|
1311
1312
|
}).concat(l),
|
|
1312
1313
|
f
|
|
1313
1314
|
];
|
|
1314
|
-
},
|
|
1315
|
+
}, Rs = (t) => {
|
|
1315
1316
|
const e = t.filter((r) => r.id && r.id < 0).map((r) => r.id);
|
|
1316
1317
|
return e.length === 0 ? -1 : Math.min(...e) - 1;
|
|
1317
|
-
},
|
|
1318
|
+
}, Vs = (t, e) => {
|
|
1318
1319
|
const r = {};
|
|
1319
1320
|
return Object.keys(t).forEach((i) => {
|
|
1320
1321
|
var o;
|
|
@@ -1322,7 +1323,7 @@ const Xn = async (t) => {
|
|
|
1322
1323
|
(s) => s.operation !== "pendingRemove"
|
|
1323
1324
|
) : r[i] = t[i];
|
|
1324
1325
|
}), r;
|
|
1325
|
-
},
|
|
1326
|
+
}, As = (t) => {
|
|
1326
1327
|
const { ooui: e } = t, { relation: r, context: i, views: o } = e, [s, a] = b(!0), [l, d] = b(), [u, c] = b(/* @__PURE__ */ new Map()), f = H(Ne), { getContext: m } = f || {};
|
|
1327
1328
|
xt(() => {
|
|
1328
1329
|
h();
|
|
@@ -1342,9 +1343,9 @@ const Xn = async (t) => {
|
|
|
1342
1343
|
a(!1);
|
|
1343
1344
|
}
|
|
1344
1345
|
};
|
|
1345
|
-
return s ? /* @__PURE__ */ n(Ae, {}) : l ? /* @__PURE__ */ n(et, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(
|
|
1346
|
-
},
|
|
1347
|
-
const { value: e, views: r, ooui: i, onChange: o } = t, { items: s = [] } = e || {}, [a, l] = b(!1), [d, u] = b(), [c, f] = b(!1), [m, g] = b(), { relation: h, context: p, readOnly: y, summaryField:
|
|
1346
|
+
return s ? /* @__PURE__ */ n(Ae, {}) : l ? /* @__PURE__ */ n(et, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(Ds, { ooui: e, views: u }) });
|
|
1347
|
+
}, Ds = (t) => {
|
|
1348
|
+
const { value: e, views: r, ooui: i, onChange: o } = t, { items: s = [] } = e || {}, [a, l] = b(!1), [d, u] = b(), [c, f] = b(!1), [m, g] = b(), { relation: h, context: p, readOnly: y, summaryField: v, titleField: T } = i, I = s.filter((x) => x.values), C = H(Ne), { getContext: O } = C || {};
|
|
1348
1349
|
xt(() => {
|
|
1349
1350
|
A();
|
|
1350
1351
|
}, [s]);
|
|
@@ -1378,7 +1379,7 @@ const Xn = async (t) => {
|
|
|
1378
1379
|
}
|
|
1379
1380
|
return d ? /* @__PURE__ */ n(et, { className: "mt-10", message: d, type: "error", banner: !0 }) : a ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ V(Q, { children: [
|
|
1380
1381
|
/* @__PURE__ */ n(_n, { style: { padding: "1rem" }, children: I.map((x, S) => {
|
|
1381
|
-
var F,
|
|
1382
|
+
var F, w;
|
|
1382
1383
|
return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ V(_n.Item, { children: [
|
|
1383
1384
|
/* @__PURE__ */ n(
|
|
1384
1385
|
"div",
|
|
@@ -1406,7 +1407,7 @@ const Xn = async (t) => {
|
|
|
1406
1407
|
)
|
|
1407
1408
|
), f(!0);
|
|
1408
1409
|
},
|
|
1409
|
-
children: (
|
|
1410
|
+
children: (w = x.values) == null ? void 0 : w[v]
|
|
1410
1411
|
}
|
|
1411
1412
|
)
|
|
1412
1413
|
] }, S) }, S);
|
|
@@ -1432,11 +1433,11 @@ const Xn = async (t) => {
|
|
|
1432
1433
|
}
|
|
1433
1434
|
)
|
|
1434
1435
|
] });
|
|
1435
|
-
}, { useToken:
|
|
1436
|
+
}, { useToken: ks } = Pe, Es = (t) => {
|
|
1436
1437
|
const { ooui: e } = t;
|
|
1437
|
-
return /* @__PURE__ */ n(ge, { ooui: e, children: /* @__PURE__ */ n(
|
|
1438
|
-
},
|
|
1439
|
-
const { token: e } =
|
|
1438
|
+
return /* @__PURE__ */ n(ge, { ooui: e, children: /* @__PURE__ */ n(Ms, { ooui: e }) });
|
|
1439
|
+
}, Ms = (t) => {
|
|
1440
|
+
const { token: e } = ks(), { ooui: r, value: i } = t, o = /* @__PURE__ */ V(Q, { children: [
|
|
1440
1441
|
/* @__PURE__ */ V("span", { children: [
|
|
1441
1442
|
r.label,
|
|
1442
1443
|
" "
|
|
@@ -1461,7 +1462,7 @@ const Xn = async (t) => {
|
|
|
1461
1462
|
}
|
|
1462
1463
|
);
|
|
1463
1464
|
return r.card ? /* @__PURE__ */ n(Nn, { children: l }) : l;
|
|
1464
|
-
},
|
|
1465
|
+
}, Ns = (t, e) => {
|
|
1465
1466
|
if (!e)
|
|
1466
1467
|
return t;
|
|
1467
1468
|
const r = {};
|
|
@@ -1475,7 +1476,7 @@ const Xn = async (t) => {
|
|
|
1475
1476
|
} else
|
|
1476
1477
|
r[i] = t[i];
|
|
1477
1478
|
}), r;
|
|
1478
|
-
}, It = (t, e) =>
|
|
1479
|
+
}, It = (t, e) => Ns(t, e), Tn = ({
|
|
1479
1480
|
source: t,
|
|
1480
1481
|
target: e,
|
|
1481
1482
|
fields: r
|
|
@@ -1508,7 +1509,7 @@ const Xn = async (t) => {
|
|
|
1508
1509
|
else
|
|
1509
1510
|
t[o] !== e[o] && (e[o] === void 0 ? i[o] = null : i[o] = e[o]);
|
|
1510
1511
|
}), i;
|
|
1511
|
-
},
|
|
1512
|
+
}, Ps = ({
|
|
1512
1513
|
changedFields: t,
|
|
1513
1514
|
formOoui: e,
|
|
1514
1515
|
types: r
|
|
@@ -1516,7 +1517,7 @@ const Xn = async (t) => {
|
|
|
1516
1517
|
var a;
|
|
1517
1518
|
const s = (a = e == null ? void 0 : e.findById(o)) == null ? void 0 : a.type;
|
|
1518
1519
|
return r.includes(s);
|
|
1519
|
-
}).some((o) => o === !0),
|
|
1520
|
+
}).some((o) => o === !0), Ls = ({
|
|
1520
1521
|
fieldsDomain: t,
|
|
1521
1522
|
fields: e
|
|
1522
1523
|
}) => {
|
|
@@ -1524,12 +1525,12 @@ const Xn = async (t) => {
|
|
|
1524
1525
|
return Object.keys(e).forEach((i) => {
|
|
1525
1526
|
r[i] = e[i], t[i] && (r[i].domain = t[i]);
|
|
1526
1527
|
}), r;
|
|
1527
|
-
},
|
|
1528
|
+
}, Bs = (t) => {
|
|
1528
1529
|
const e = {};
|
|
1529
1530
|
return !t || !Array.isArray(t) || (t == null ? void 0 : t.length) === 0 ? {} : (t.forEach((r) => {
|
|
1530
1531
|
(r == null ? void 0 : r[1]) === "=" && (e[r[0]] = r[2]);
|
|
1531
1532
|
}), e);
|
|
1532
|
-
},
|
|
1533
|
+
}, $s = ({
|
|
1533
1534
|
onChangeFieldActionArgs: t,
|
|
1534
1535
|
values: e,
|
|
1535
1536
|
parentValues: r = {}
|
|
@@ -1590,10 +1591,10 @@ const Nt = ({
|
|
|
1590
1591
|
r += ("00" + o.toString(16)).slice(-2);
|
|
1591
1592
|
}
|
|
1592
1593
|
return r;
|
|
1593
|
-
},
|
|
1594
|
+
}, Hs = (t, e) => t.replace(
|
|
1594
1595
|
/\{([^}]+)\}/g,
|
|
1595
1596
|
(r, i) => e[i] !== void 0 ? e[i] : r
|
|
1596
|
-
),
|
|
1597
|
+
), Ks = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(lo, { ...t }) }), lo = (t) => {
|
|
1597
1598
|
const { ooui: e, value: r } = t;
|
|
1598
1599
|
let i = r, o = r;
|
|
1599
1600
|
if (e.selectionValues.size ? i = e.selectionValues.get(r) : Array.isArray(r) && (o = r[0], i = r[1]), !r)
|
|
@@ -1608,11 +1609,11 @@ const Nt = ({
|
|
|
1608
1609
|
borderStyle: "solid",
|
|
1609
1610
|
borderWidth: "1px"
|
|
1610
1611
|
}, e = `${e}20`), /* @__PURE__ */ n(Rr, { ...t, style: r, color: e, children: t.children });
|
|
1611
|
-
}, Ks = (t) => {
|
|
1612
|
-
const { ooui: e } = t;
|
|
1613
|
-
return /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(Ws, { ooui: e }) });
|
|
1614
1612
|
}, Ws = (t) => {
|
|
1615
|
-
const {
|
|
1613
|
+
const { ooui: e } = t;
|
|
1614
|
+
return /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(js, { ooui: e }) });
|
|
1615
|
+
}, js = (t) => {
|
|
1616
|
+
const { value: e, ooui: r, onChange: i } = t, { items: o = [] } = e || {}, s = o.filter((_) => _.operation !== "pendingRemove").map((_) => _.id), [a, l] = b([]), [d, u] = b(), [c, f] = b(!1), { relation: m, context: g, readOnly: h, field: p } = r, y = H(Ne), { getContext: v } = y || {};
|
|
1616
1617
|
xt(() => {
|
|
1617
1618
|
I();
|
|
1618
1619
|
}, [o]);
|
|
@@ -1640,12 +1641,12 @@ const Nt = ({
|
|
|
1640
1641
|
const x = (await D.getHandler().search({
|
|
1641
1642
|
model: m,
|
|
1642
1643
|
params: _,
|
|
1643
|
-
|
|
1644
|
-
context: { ...
|
|
1644
|
+
fieldsToRetrieve: [p],
|
|
1645
|
+
context: { ...v == null ? void 0 : v(), ...g }
|
|
1645
1646
|
})).map((S) => {
|
|
1646
1647
|
const F = S[p];
|
|
1647
|
-
let
|
|
1648
|
-
return Array.isArray(F) && (
|
|
1648
|
+
let w = F;
|
|
1649
|
+
return Array.isArray(F) && (w = F[1]), { label: w, value: S.id };
|
|
1649
1650
|
});
|
|
1650
1651
|
l(x);
|
|
1651
1652
|
} catch (A) {
|
|
@@ -1665,15 +1666,15 @@ const Nt = ({
|
|
|
1665
1666
|
}, O = (_) => {
|
|
1666
1667
|
const { label: A, closable: x, onClose: S } = _, F = (E) => {
|
|
1667
1668
|
E.preventDefault(), E.stopPropagation();
|
|
1668
|
-
},
|
|
1669
|
+
}, w = nn(A);
|
|
1669
1670
|
return /* @__PURE__ */ n(
|
|
1670
1671
|
co,
|
|
1671
1672
|
{
|
|
1672
|
-
color:
|
|
1673
|
+
color: w,
|
|
1673
1674
|
onMouseDown: F,
|
|
1674
1675
|
closable: x,
|
|
1675
1676
|
onClose: S,
|
|
1676
|
-
closeIcon: /* @__PURE__ */ n("span", { style: { color:
|
|
1677
|
+
closeIcon: /* @__PURE__ */ n("span", { style: { color: w }, children: "X" }),
|
|
1677
1678
|
children: A
|
|
1678
1679
|
}
|
|
1679
1680
|
);
|
|
@@ -1691,14 +1692,14 @@ const Nt = ({
|
|
|
1691
1692
|
loading: c
|
|
1692
1693
|
}
|
|
1693
1694
|
) }) });
|
|
1694
|
-
},
|
|
1695
|
+
}, Ys = (t) => {
|
|
1695
1696
|
switch (t) {
|
|
1696
1697
|
case "form":
|
|
1697
1698
|
return Jt;
|
|
1698
1699
|
case "tree":
|
|
1699
1700
|
return pn;
|
|
1700
1701
|
case "notebook":
|
|
1701
|
-
return
|
|
1702
|
+
return Kl;
|
|
1702
1703
|
case "group":
|
|
1703
1704
|
return To;
|
|
1704
1705
|
case "label":
|
|
@@ -1706,15 +1707,15 @@ const Nt = ({
|
|
|
1706
1707
|
case "char":
|
|
1707
1708
|
return to;
|
|
1708
1709
|
case "text":
|
|
1709
|
-
return
|
|
1710
|
+
return jl;
|
|
1710
1711
|
case "button":
|
|
1711
1712
|
return Xr;
|
|
1712
1713
|
case "buttonGroup":
|
|
1713
|
-
return
|
|
1714
|
+
return os;
|
|
1714
1715
|
case "selection":
|
|
1715
1716
|
return no;
|
|
1716
1717
|
case "many2one":
|
|
1717
|
-
return
|
|
1718
|
+
return cl;
|
|
1718
1719
|
case "boolean":
|
|
1719
1720
|
return ws;
|
|
1720
1721
|
case "integer":
|
|
@@ -1722,67 +1723,67 @@ const Nt = ({
|
|
|
1722
1723
|
case "float":
|
|
1723
1724
|
return mo;
|
|
1724
1725
|
case "progressbar":
|
|
1725
|
-
return
|
|
1726
|
+
return La;
|
|
1726
1727
|
case "date":
|
|
1727
|
-
return tc;
|
|
1728
|
-
case "datetime":
|
|
1729
1728
|
return nc;
|
|
1730
|
-
case "
|
|
1729
|
+
case "datetime":
|
|
1731
1730
|
return rc;
|
|
1731
|
+
case "time":
|
|
1732
|
+
return oc;
|
|
1732
1733
|
case "one2many":
|
|
1733
1734
|
case "one2many_list":
|
|
1734
1735
|
case "many2many":
|
|
1735
|
-
return
|
|
1736
|
+
return Pl;
|
|
1736
1737
|
case "separator":
|
|
1737
|
-
return
|
|
1738
|
+
return Gl;
|
|
1738
1739
|
case "reference":
|
|
1739
|
-
return
|
|
1740
|
+
return sc;
|
|
1740
1741
|
case "binary":
|
|
1741
|
-
return
|
|
1742
|
+
return cc;
|
|
1742
1743
|
case "image":
|
|
1743
|
-
return
|
|
1744
|
+
return Ss;
|
|
1744
1745
|
case "url":
|
|
1745
|
-
return
|
|
1746
|
+
return vc;
|
|
1746
1747
|
case "email":
|
|
1747
1748
|
return wc;
|
|
1748
1749
|
case "float_time":
|
|
1749
|
-
return
|
|
1750
|
+
return Bl;
|
|
1750
1751
|
case "fiber_grid":
|
|
1751
|
-
return
|
|
1752
|
+
return Fs;
|
|
1752
1753
|
case "timeline":
|
|
1753
|
-
return
|
|
1754
|
+
return As;
|
|
1754
1755
|
case "indicator":
|
|
1755
|
-
return
|
|
1756
|
+
return Es;
|
|
1756
1757
|
case "tags":
|
|
1757
|
-
return
|
|
1758
|
+
return Ws;
|
|
1758
1759
|
case "tag":
|
|
1759
|
-
return
|
|
1760
|
+
return Ks;
|
|
1760
1761
|
case "multicheckbox":
|
|
1761
|
-
return
|
|
1762
|
+
return qc;
|
|
1762
1763
|
case "markdown":
|
|
1763
|
-
return
|
|
1764
|
+
return Jc;
|
|
1764
1765
|
case "radio":
|
|
1765
|
-
return
|
|
1766
|
+
return Xc;
|
|
1766
1767
|
case "switch":
|
|
1767
|
-
return
|
|
1768
|
+
return ed;
|
|
1768
1769
|
case "steps":
|
|
1769
|
-
return
|
|
1770
|
+
return nd;
|
|
1770
1771
|
case "codeeditor":
|
|
1771
|
-
return
|
|
1772
|
+
return od;
|
|
1772
1773
|
case "comments_timeline":
|
|
1773
|
-
return
|
|
1774
|
+
return ud;
|
|
1774
1775
|
default:
|
|
1775
1776
|
return;
|
|
1776
1777
|
}
|
|
1777
|
-
},
|
|
1778
|
-
const { ooui: e } = t, { type: r } = e, i =
|
|
1778
|
+
}, Gs = (t) => {
|
|
1779
|
+
const { ooui: e } = t, { type: r } = e, i = Ys(r);
|
|
1779
1780
|
return i ? Qe.createElement(i, t) : null;
|
|
1780
|
-
},
|
|
1781
|
+
}, Us = ({
|
|
1781
1782
|
item: t,
|
|
1782
1783
|
responsiveBehaviour: e
|
|
1783
1784
|
}) => ({
|
|
1784
1785
|
gridColumnStart: "span " + (e ? 1 : t.colspan)
|
|
1785
|
-
}),
|
|
1786
|
+
}), qs = ({
|
|
1786
1787
|
row: t,
|
|
1787
1788
|
mustFillWithEmpties: e,
|
|
1788
1789
|
numberOfColumns: r
|
|
@@ -1801,10 +1802,10 @@ const Nt = ({
|
|
|
1801
1802
|
i.push(new Dt({ string: "" }));
|
|
1802
1803
|
}
|
|
1803
1804
|
}), i;
|
|
1804
|
-
},
|
|
1805
|
+
}, zs = ({
|
|
1805
1806
|
row: t,
|
|
1806
1807
|
numberOfColumns: e
|
|
1807
|
-
}) => t.map((r) => (r._mustExpand && (r.colspan = e), r)),
|
|
1808
|
+
}) => t.map((r) => (r._mustExpand && (r.colspan = e), r)), Js = (t, e) => {
|
|
1808
1809
|
const r = t.map((i) => i instanceof Dt && i.fieldForLabel || i instanceof ri ? "auto" : "1fr");
|
|
1809
1810
|
if (r.length < e) {
|
|
1810
1811
|
const i = e - r.length;
|
|
@@ -1812,25 +1813,25 @@ const Nt = ({
|
|
|
1812
1813
|
r.push("1fr");
|
|
1813
1814
|
}
|
|
1814
1815
|
return r.join(" ");
|
|
1815
|
-
},
|
|
1816
|
+
}, Zs = (t, e) => {
|
|
1816
1817
|
const r = e ? "1fr" : "auto", i = "auto";
|
|
1817
1818
|
let o = "";
|
|
1818
1819
|
for (let s = 0; s < t; s++)
|
|
1819
1820
|
o += s % 2 ? r : i, s + 1 < t && (o += " ");
|
|
1820
1821
|
return o;
|
|
1821
|
-
},
|
|
1822
|
+
}, Xs = (t) => t.map((r) => r.reduce((i, o) => i + o.colspan, 0)).reduce((r, i) => Math.max(r, i)), Dn = (t) => {
|
|
1822
1823
|
const { container: e, responsiveBehaviour: r } = t, { rows: i } = e;
|
|
1823
1824
|
let { columns: o } = e;
|
|
1824
|
-
const s =
|
|
1825
|
+
const s = Xs(i);
|
|
1825
1826
|
s < o && (o = s);
|
|
1826
1827
|
let a = !1, l = [];
|
|
1827
1828
|
const d = i.map((f, m) => {
|
|
1828
|
-
const g = f.filter((y) => !y.invisible), h =
|
|
1829
|
+
const g = f.filter((y) => !y.invisible), h = zs({
|
|
1829
1830
|
row: g,
|
|
1830
1831
|
numberOfColumns: o
|
|
1831
1832
|
});
|
|
1832
1833
|
let p = h;
|
|
1833
|
-
return (m === 0 || !(f.length === 1 && f.some((y) => y.type === "group"))) && (p =
|
|
1834
|
+
return (m === 0 || !(f.length === 1 && f.some((y) => y.type === "group"))) && (p = qs({
|
|
1834
1835
|
row: h,
|
|
1835
1836
|
numberOfColumns: o,
|
|
1836
1837
|
mustFillWithEmpties: r
|
|
@@ -1838,17 +1839,17 @@ const Nt = ({
|
|
|
1838
1839
|
"div",
|
|
1839
1840
|
{
|
|
1840
1841
|
style: {
|
|
1841
|
-
...
|
|
1842
|
+
...Us({ item: y, responsiveBehaviour: r }),
|
|
1842
1843
|
minWidth: 0
|
|
1843
1844
|
},
|
|
1844
|
-
children:
|
|
1845
|
+
children: Gs({
|
|
1845
1846
|
ooui: y,
|
|
1846
1847
|
responsiveBehaviour: r
|
|
1847
1848
|
})
|
|
1848
1849
|
},
|
|
1849
1850
|
y.key
|
|
1850
1851
|
)));
|
|
1851
|
-
}), u = i.length === 1 ?
|
|
1852
|
+
}), u = i.length === 1 ? Js(l, o) : Zs(o, a);
|
|
1852
1853
|
return /* @__PURE__ */ n("div", { style: {
|
|
1853
1854
|
display: "grid",
|
|
1854
1855
|
gridTemplateColumns: r ? "auto" : u,
|
|
@@ -1856,12 +1857,12 @@ const Nt = ({
|
|
|
1856
1857
|
minHeight: 0,
|
|
1857
1858
|
minWidth: 0
|
|
1858
1859
|
}, children: d });
|
|
1859
|
-
}, { confirm:
|
|
1860
|
+
}, { confirm: Qs } = Je, zt = ({
|
|
1860
1861
|
onOk: t,
|
|
1861
1862
|
onCancel: e,
|
|
1862
1863
|
lang: r
|
|
1863
1864
|
}) => {
|
|
1864
|
-
|
|
1865
|
+
Qs({
|
|
1865
1866
|
title: Ie("unsavedChanges", r),
|
|
1866
1867
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
1867
1868
|
centered: !0,
|
|
@@ -1871,22 +1872,22 @@ const Nt = ({
|
|
|
1871
1872
|
onCancel: e,
|
|
1872
1873
|
cancelText: Ie("cancel", r)
|
|
1873
1874
|
});
|
|
1874
|
-
}, { error:
|
|
1875
|
-
|
|
1875
|
+
}, { error: ea } = Je, vr = (t) => {
|
|
1876
|
+
ea({
|
|
1876
1877
|
title: Ie("formHasErrors", t),
|
|
1877
1878
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
1878
1879
|
centered: !0,
|
|
1879
1880
|
content: Ie("fillRequiredFields", t)
|
|
1880
1881
|
});
|
|
1881
|
-
}, { warning:
|
|
1882
|
-
|
|
1882
|
+
}, { warning: ta } = Je, na = (t, e, r) => {
|
|
1883
|
+
ta({
|
|
1883
1884
|
title: t,
|
|
1884
1885
|
icon: /* @__PURE__ */ n($r, {}),
|
|
1885
1886
|
centered: !0,
|
|
1886
1887
|
content: e,
|
|
1887
1888
|
onOk: r
|
|
1888
1889
|
});
|
|
1889
|
-
}, uo = Qe.createContext(null),
|
|
1890
|
+
}, uo = Qe.createContext(null), ra = (t) => {
|
|
1890
1891
|
const { children: e, setTitle: r } = t;
|
|
1891
1892
|
return /* @__PURE__ */ n(
|
|
1892
1893
|
uo.Provider,
|
|
@@ -1897,15 +1898,15 @@ const Nt = ({
|
|
|
1897
1898
|
children: e
|
|
1898
1899
|
}
|
|
1899
1900
|
);
|
|
1900
|
-
},
|
|
1901
|
-
const r =
|
|
1901
|
+
}, wr = (t) => typeof t == "string" && t === "true" || t === "false" ? t === "true" : t, oa = (t, e) => {
|
|
1902
|
+
const r = da(t), i = la(r), o = ca(
|
|
1902
1903
|
i,
|
|
1903
1904
|
e
|
|
1904
1905
|
);
|
|
1905
1906
|
return [
|
|
1906
|
-
...Object.keys(o).map((l) =>
|
|
1907
|
+
...Object.keys(o).map((l) => ia(l, o[l], e))
|
|
1907
1908
|
].reduce((l, d) => Array.isArray(d[0]) ? l.concat(d) : [...l, d], []);
|
|
1908
|
-
},
|
|
1909
|
+
}, ia = (t, e, r) => {
|
|
1909
1910
|
var s;
|
|
1910
1911
|
const i = t.split("#")[0], o = (s = r.findById(i)) == null ? void 0 : s.type;
|
|
1911
1912
|
if (o === "char" || o === "text" || o === "many2one" || o === "many2many" || o === "one2many")
|
|
@@ -1924,17 +1925,17 @@ const Nt = ({
|
|
|
1924
1925
|
t,
|
|
1925
1926
|
"in",
|
|
1926
1927
|
e.map(
|
|
1927
|
-
(a) =>
|
|
1928
|
+
(a) => wr(a)
|
|
1928
1929
|
)
|
|
1929
|
-
] : [t, "=",
|
|
1930
|
-
},
|
|
1930
|
+
] : [t, "=", wr(e)];
|
|
1931
|
+
}, sa = (t) => Object.keys(t).filter((e) => e.indexOf("#date") !== -1), aa = (t) => {
|
|
1931
1932
|
const e = { ...t };
|
|
1932
1933
|
return Object.keys(e).forEach(
|
|
1933
1934
|
(r) => (r.indexOf("#time") !== -1 || r.indexOf("#date") !== -1) && delete e[r]
|
|
1934
1935
|
), e;
|
|
1935
|
-
},
|
|
1936
|
-
const e = { ...
|
|
1937
|
-
return
|
|
1936
|
+
}, la = (t) => {
|
|
1937
|
+
const e = { ...aa(t) };
|
|
1938
|
+
return sa(t).forEach((i) => {
|
|
1938
1939
|
const o = t[i], s = i.split("#")[0], a = s + "#time", l = t[a];
|
|
1939
1940
|
let d, u;
|
|
1940
1941
|
if (o[0] !== null && (d = o[0].format("YYYY-MM-DD"), l && l[0] !== null)) {
|
|
@@ -1947,7 +1948,7 @@ const Nt = ({
|
|
|
1947
1948
|
}
|
|
1948
1949
|
e[s + "#datetime"] = [d, u];
|
|
1949
1950
|
}), e;
|
|
1950
|
-
},
|
|
1951
|
+
}, ca = (t, e) => {
|
|
1951
1952
|
const r = Object.keys(t).filter((o) => {
|
|
1952
1953
|
const s = e.findById(o);
|
|
1953
1954
|
return s && s.type === "date";
|
|
@@ -1955,18 +1956,18 @@ const Nt = ({
|
|
|
1955
1956
|
return r.forEach((o) => {
|
|
1956
1957
|
delete i[o], t[o][0] !== null && (i[o + "#from"] = t[o][0]), t[o][1] !== null && (i[o + "#to"] = t[o][1]);
|
|
1957
1958
|
}), i;
|
|
1958
|
-
},
|
|
1959
|
+
}, da = (t) => {
|
|
1959
1960
|
const e = { ...t };
|
|
1960
1961
|
return Object.keys(e).forEach(
|
|
1961
1962
|
(r) => (e[r] === void 0 || e[r] === null || e[r] === "") && delete e[r]
|
|
1962
1963
|
), e;
|
|
1963
|
-
},
|
|
1964
|
+
}, ua = (t) => {
|
|
1964
1965
|
const e = {};
|
|
1965
1966
|
return t.forEach((r) => {
|
|
1966
1967
|
Array.isArray(r) && r[0] ? e[r[0]] = !0 : e[r] = !0;
|
|
1967
1968
|
}), Object.keys(e);
|
|
1968
1969
|
}, Wt = (t, e) => {
|
|
1969
|
-
const r = [...t], i =
|
|
1970
|
+
const r = [...t], i = ua(t);
|
|
1970
1971
|
return e.forEach((o) => {
|
|
1971
1972
|
Array.isArray(o) && o[0] ? i.includes(o[0]) || r.push(o) : i.includes(o) || r.push(o);
|
|
1972
1973
|
}), r;
|
|
@@ -1988,16 +1989,16 @@ const Nt = ({
|
|
|
1988
1989
|
setSorter: h,
|
|
1989
1990
|
setCurrentItemIndex: p,
|
|
1990
1991
|
setResultsActionView: y,
|
|
1991
|
-
resultsActionView:
|
|
1992
|
+
resultsActionView: v,
|
|
1992
1993
|
domain: T,
|
|
1993
1994
|
currentId: I,
|
|
1994
1995
|
limit: C,
|
|
1995
1996
|
setLimit: O,
|
|
1996
1997
|
searchParams: _ = [],
|
|
1997
1998
|
setSearchValues: A
|
|
1998
|
-
} = t, [x, S] = b(!1), [F,
|
|
1999
|
+
} = t, [x, S] = b(!1), [F, w] = b(!1), [E, P] = b(), [M, j] = b(1), [N, B] = b(0), [K, R] = b(), [U, ne] = b([]), [X, Y] = b(void 0), [G, k] = b(void 0), L = de(C || jt), ee = de([]), le = De((oe) => {
|
|
1999
2000
|
y == null || y([...oe]), ne([...oe]);
|
|
2000
|
-
}, []), Fe = De(() =>
|
|
2001
|
+
}, []), Fe = De(() => v || U, [v, U]), J = De(async () => {
|
|
2001
2002
|
const oe = await D.getHandler().nameSearch({
|
|
2002
2003
|
model: e,
|
|
2003
2004
|
payload: l,
|
|
@@ -2057,7 +2058,7 @@ const Nt = ({
|
|
|
2057
2058
|
sorter: g,
|
|
2058
2059
|
fields: { ...f.fields, ...m.fields }
|
|
2059
2060
|
}) : [...ee.current];
|
|
2060
|
-
if (le(ue),
|
|
2061
|
+
if (le(ue), v && ue.length > 0) {
|
|
2061
2062
|
const ce = ue.findIndex(
|
|
2062
2063
|
(ot) => I === ot.id
|
|
2063
2064
|
);
|
|
@@ -2070,7 +2071,7 @@ const Nt = ({
|
|
|
2070
2071
|
},
|
|
2071
2072
|
[
|
|
2072
2073
|
p,
|
|
2073
|
-
|
|
2074
|
+
v,
|
|
2074
2075
|
le,
|
|
2075
2076
|
I,
|
|
2076
2077
|
e,
|
|
@@ -2091,7 +2092,7 @@ const Nt = ({
|
|
|
2091
2092
|
} catch (Ee) {
|
|
2092
2093
|
P(Ee.message);
|
|
2093
2094
|
} finally {
|
|
2094
|
-
i == null || i([]),
|
|
2095
|
+
i == null || i([]), w(!1), a == null || a(!1);
|
|
2095
2096
|
}
|
|
2096
2097
|
},
|
|
2097
2098
|
[
|
|
@@ -2103,19 +2104,19 @@ const Nt = ({
|
|
|
2103
2104
|
e,
|
|
2104
2105
|
l,
|
|
2105
2106
|
N,
|
|
2106
|
-
|
|
2107
|
+
v,
|
|
2107
2108
|
d,
|
|
2108
2109
|
c,
|
|
2109
2110
|
p,
|
|
2110
2111
|
le,
|
|
2111
2112
|
P,
|
|
2112
|
-
|
|
2113
|
+
w,
|
|
2113
2114
|
S,
|
|
2114
2115
|
a,
|
|
2115
2116
|
g,
|
|
2116
2117
|
f
|
|
2117
2118
|
]
|
|
2118
|
-
),
|
|
2119
|
+
), ve = De(
|
|
2119
2120
|
(oe) => {
|
|
2120
2121
|
if (JSON.stringify(oe) === JSON.stringify(g))
|
|
2121
2122
|
return;
|
|
@@ -2131,7 +2132,7 @@ const Nt = ({
|
|
|
2131
2132
|
), je = De(
|
|
2132
2133
|
(oe) => {
|
|
2133
2134
|
const { params: Ee, searchValues: ye, limit: Me, offset: He } = oe;
|
|
2134
|
-
x || (r == null || r(void 0), i == null || i([]), A == null || A(ye), o == null || o(Ee), s == null || s(!1),
|
|
2135
|
+
x || (r == null || r(void 0), i == null || i([]), A == null || A(ye), o == null || o(Ee), s == null || s(!1), w(!0), P(void 0), j(1), Me && (L.current = Me, O == null || O(Me)), He && B(He), be({
|
|
2135
2136
|
params: Ee,
|
|
2136
2137
|
newOffset: He
|
|
2137
2138
|
}));
|
|
@@ -2142,7 +2143,7 @@ const Nt = ({
|
|
|
2142
2143
|
i,
|
|
2143
2144
|
o,
|
|
2144
2145
|
s,
|
|
2145
|
-
|
|
2146
|
+
w,
|
|
2146
2147
|
P,
|
|
2147
2148
|
j,
|
|
2148
2149
|
O,
|
|
@@ -2194,14 +2195,14 @@ const Nt = ({
|
|
|
2194
2195
|
limit: C,
|
|
2195
2196
|
getResults: Fe,
|
|
2196
2197
|
requestPageChange: ke,
|
|
2197
|
-
changeSort:
|
|
2198
|
+
changeSort: ve,
|
|
2198
2199
|
fetchChildrenForRecord: Ge,
|
|
2199
2200
|
colorsForResults: X,
|
|
2200
2201
|
statusForResults: G,
|
|
2201
2202
|
totalItems: K,
|
|
2202
2203
|
getAllIds: Ce
|
|
2203
2204
|
};
|
|
2204
|
-
}, rt = Qe.createContext(null),
|
|
2205
|
+
}, rt = Qe.createContext(null), fa = (t) => {
|
|
2205
2206
|
const {
|
|
2206
2207
|
children: e,
|
|
2207
2208
|
currentView: r,
|
|
@@ -2219,7 +2220,7 @@ const Nt = ({
|
|
|
2219
2220
|
setCurrentItemIndex: h,
|
|
2220
2221
|
currentModel: p,
|
|
2221
2222
|
sorter: y,
|
|
2222
|
-
setSorter:
|
|
2223
|
+
setSorter: v,
|
|
2223
2224
|
totalItems: T,
|
|
2224
2225
|
setTotalItems: I,
|
|
2225
2226
|
setSelectedRowItems: C,
|
|
@@ -2228,7 +2229,7 @@ const Nt = ({
|
|
|
2228
2229
|
setSearchTreeNameSearch: A,
|
|
2229
2230
|
goToResourceId: x,
|
|
2230
2231
|
limit: S
|
|
2231
|
-
} = t, [F,
|
|
2232
|
+
} = t, [F, w] = b(!1), [E, P] = b(!1), [M, j] = b(!1), [N, B] = b(!0), [K, R] = b(!0), [U, ne] = b([]), [X, Y] = b(!1), [G, k] = b([]), [L, ee] = b(!1), [le, Fe] = b(!0), [J, q] = b(), [be, ve] = b({}), [je, ke] = b(
|
|
2232
2233
|
S !== void 0 ? S : jt
|
|
2233
2234
|
), [Le, Ge] = b(i);
|
|
2234
2235
|
me(() => {
|
|
@@ -2261,7 +2262,7 @@ const Nt = ({
|
|
|
2261
2262
|
setCurrentView: o,
|
|
2262
2263
|
availableViews: s,
|
|
2263
2264
|
formIsSaving: F,
|
|
2264
|
-
setFormIsSaving:
|
|
2265
|
+
setFormIsSaving: w,
|
|
2265
2266
|
formHasChanges: E,
|
|
2266
2267
|
setFormHasChanges: P,
|
|
2267
2268
|
formRef: a,
|
|
@@ -2292,7 +2293,7 @@ const Nt = ({
|
|
|
2292
2293
|
searchVisible: L,
|
|
2293
2294
|
setSearchVisible: ee,
|
|
2294
2295
|
sorter: y,
|
|
2295
|
-
setSorter:
|
|
2296
|
+
setSorter: v,
|
|
2296
2297
|
totalItems: T,
|
|
2297
2298
|
setTotalItems: I,
|
|
2298
2299
|
searchTreeNameSearch: _,
|
|
@@ -2303,7 +2304,7 @@ const Nt = ({
|
|
|
2303
2304
|
setPreviousView: q,
|
|
2304
2305
|
goToResourceId: x,
|
|
2305
2306
|
searchValues: be,
|
|
2306
|
-
setSearchValues:
|
|
2307
|
+
setSearchValues: ve,
|
|
2307
2308
|
limit: je,
|
|
2308
2309
|
setLimit: ke,
|
|
2309
2310
|
setTitle: Ge
|
|
@@ -2311,7 +2312,7 @@ const Nt = ({
|
|
|
2311
2312
|
children: e
|
|
2312
2313
|
}
|
|
2313
2314
|
);
|
|
2314
|
-
}, dt = Qe.createContext(null),
|
|
2315
|
+
}, dt = Qe.createContext(null), ma = (t) => {
|
|
2315
2316
|
const {
|
|
2316
2317
|
children: e,
|
|
2317
2318
|
openAction: r,
|
|
@@ -2347,7 +2348,7 @@ const Nt = ({
|
|
|
2347
2348
|
var e;
|
|
2348
2349
|
for (let r = 0; r < t.length; r++)
|
|
2349
2350
|
await ((e = t == null ? void 0 : t[r]) == null ? void 0 : e.call(t));
|
|
2350
|
-
},
|
|
2351
|
+
}, ha = (t, e) => {
|
|
2351
2352
|
const { children: r, globalValues: i = {} } = t, o = de(), s = de(), [a, l] = b(!1), d = H(
|
|
2352
2353
|
dt
|
|
2353
2354
|
), { openAction: u } = d || {}, c = de([]), { t: f } = H(he);
|
|
@@ -2360,7 +2361,7 @@ const Nt = ({
|
|
|
2360
2361
|
}
|
|
2361
2362
|
);
|
|
2362
2363
|
async function y(A) {
|
|
2363
|
-
const { reportData: x, fields: S, values: F, context:
|
|
2364
|
+
const { reportData: x, fields: S, values: F, context: w = {} } = A, {
|
|
2364
2365
|
context: E,
|
|
2365
2366
|
model: P,
|
|
2366
2367
|
datas: M = {},
|
|
@@ -2371,7 +2372,7 @@ const Nt = ({
|
|
|
2371
2372
|
ze(`${N} action not supported`);
|
|
2372
2373
|
return;
|
|
2373
2374
|
}
|
|
2374
|
-
const { ids: B } = M || {}, K = B || [], R = typeof E == "string" ?
|
|
2375
|
+
const { ids: B } = M || {}, K = B || [], R = typeof E == "string" ? vt({
|
|
2375
2376
|
context: E,
|
|
2376
2377
|
fields: S,
|
|
2377
2378
|
values: F
|
|
@@ -2382,16 +2383,16 @@ const Nt = ({
|
|
|
2382
2383
|
name: j,
|
|
2383
2384
|
datas: M,
|
|
2384
2385
|
ids: K,
|
|
2385
|
-
context: { ...
|
|
2386
|
+
context: { ...w, ...R }
|
|
2386
2387
|
});
|
|
2387
2388
|
l(!0), s.current = !0, o.current = setInterval(() => {
|
|
2388
|
-
|
|
2389
|
+
v(U);
|
|
2389
2390
|
}, 1e3);
|
|
2390
2391
|
} catch (U) {
|
|
2391
2392
|
s.current = !1, clearInterval(o.current), ze(U), l(!1);
|
|
2392
2393
|
}
|
|
2393
2394
|
}
|
|
2394
|
-
async function
|
|
2395
|
+
async function v(A) {
|
|
2395
2396
|
let x;
|
|
2396
2397
|
try {
|
|
2397
2398
|
if (x = await D.getHandler().getReport({
|
|
@@ -2410,10 +2411,10 @@ const Nt = ({
|
|
|
2410
2411
|
fields: x,
|
|
2411
2412
|
values: S,
|
|
2412
2413
|
context: F,
|
|
2413
|
-
onRefreshParentValues:
|
|
2414
|
+
onRefreshParentValues: w
|
|
2414
2415
|
}) {
|
|
2415
2416
|
const { type: E } = A;
|
|
2416
|
-
if (c.current.push(
|
|
2417
|
+
if (c.current.push(w), E === "ir.actions.report.xml")
|
|
2417
2418
|
return await y({
|
|
2418
2419
|
reportData: A,
|
|
2419
2420
|
fields: x,
|
|
@@ -2424,7 +2425,7 @@ const Nt = ({
|
|
|
2424
2425
|
return await I({ actionData: A, fields: x, values: S, context: F });
|
|
2425
2426
|
if (E === "ir.actions.act_url")
|
|
2426
2427
|
window.open(
|
|
2427
|
-
|
|
2428
|
+
Hs(A.url, { ...S, context: F }),
|
|
2428
2429
|
"_blank"
|
|
2429
2430
|
);
|
|
2430
2431
|
else
|
|
@@ -2437,59 +2438,59 @@ const Nt = ({
|
|
|
2437
2438
|
context: F = {}
|
|
2438
2439
|
}) {
|
|
2439
2440
|
var j;
|
|
2440
|
-
let
|
|
2441
|
-
A.res_model || (
|
|
2441
|
+
let w = A;
|
|
2442
|
+
A.res_model || (w = (await D.getHandler().readObjects({
|
|
2442
2443
|
model: "ir.actions.act_window",
|
|
2443
2444
|
ids: [parseInt(A.id)],
|
|
2444
2445
|
context: F
|
|
2445
2446
|
}))[0]);
|
|
2446
|
-
const E = typeof (
|
|
2447
|
-
context:
|
|
2447
|
+
const E = typeof (w == null ? void 0 : w.context) == "string" ? vt({
|
|
2448
|
+
context: w.context,
|
|
2448
2449
|
fields: x,
|
|
2449
2450
|
values: { ...S, ...i }
|
|
2450
|
-
}) :
|
|
2451
|
+
}) : w.context, P = {
|
|
2451
2452
|
...F,
|
|
2452
2453
|
...E
|
|
2453
2454
|
};
|
|
2454
2455
|
let M = [];
|
|
2455
|
-
if (
|
|
2456
|
-
domain:
|
|
2456
|
+
if (w.domain && (M = await D.getHandler().evalDomain({
|
|
2457
|
+
domain: w.domain,
|
|
2457
2458
|
values: Nt({
|
|
2458
2459
|
fields: x,
|
|
2459
2460
|
values: { ...S, ...i }
|
|
2460
2461
|
}),
|
|
2461
2462
|
fields: x,
|
|
2462
2463
|
context: P
|
|
2463
|
-
})),
|
|
2464
|
+
})), w.target === "new") {
|
|
2464
2465
|
const N = await D.getHandler().getView({
|
|
2465
|
-
model:
|
|
2466
|
+
model: w.res_model,
|
|
2466
2467
|
type: "form",
|
|
2467
|
-
id: ((j =
|
|
2468
|
+
id: ((j = w == null ? void 0 : w.view_id) == null ? void 0 : j[0]) || void 0,
|
|
2468
2469
|
context: P
|
|
2469
2470
|
});
|
|
2470
2471
|
return C({
|
|
2471
2472
|
domain: M,
|
|
2472
|
-
model:
|
|
2473
|
+
model: w.res_model,
|
|
2473
2474
|
formView: N,
|
|
2474
2475
|
context: P
|
|
2475
2476
|
}), {};
|
|
2476
2477
|
} else {
|
|
2477
|
-
const { initialView: N, views: B } = await
|
|
2478
|
-
model:
|
|
2478
|
+
const { initialView: N, views: B } = await pa({
|
|
2479
|
+
model: w.res_model,
|
|
2479
2480
|
context: P,
|
|
2480
|
-
view_mode:
|
|
2481
|
-
views:
|
|
2481
|
+
view_mode: w.view_mode,
|
|
2482
|
+
views: w.views
|
|
2482
2483
|
});
|
|
2483
2484
|
return u == null || u({
|
|
2484
2485
|
target: "current",
|
|
2485
2486
|
context: P,
|
|
2486
2487
|
domain: M,
|
|
2487
|
-
model:
|
|
2488
|
+
model: w.res_model,
|
|
2488
2489
|
views: B,
|
|
2489
|
-
title:
|
|
2490
|
+
title: w.name,
|
|
2490
2491
|
initialView: N,
|
|
2491
|
-
action_id:
|
|
2492
|
-
action_type:
|
|
2492
|
+
action_id: w.id,
|
|
2493
|
+
action_type: w.type
|
|
2493
2494
|
}), { closeParent: !0 };
|
|
2494
2495
|
}
|
|
2495
2496
|
}
|
|
@@ -2498,16 +2499,16 @@ const Nt = ({
|
|
|
2498
2499
|
model: x,
|
|
2499
2500
|
formView: S,
|
|
2500
2501
|
context: F,
|
|
2501
|
-
actionData:
|
|
2502
|
+
actionData: w
|
|
2502
2503
|
}) {
|
|
2503
|
-
m ? O({ domain: A, model: x, formView: S, context: F, actionData:
|
|
2504
|
+
m ? O({ domain: A, model: x, formView: S, context: F, actionData: w }) : (p({ domain: A, model: x, context: F, formView: S, actionData: w }), g(!0));
|
|
2504
2505
|
}
|
|
2505
2506
|
async function O({
|
|
2506
2507
|
domain: A,
|
|
2507
2508
|
model: x,
|
|
2508
2509
|
formView: S,
|
|
2509
2510
|
context: F,
|
|
2510
|
-
actionData:
|
|
2511
|
+
actionData: w
|
|
2511
2512
|
}) {
|
|
2512
2513
|
p({
|
|
2513
2514
|
domain: void 0,
|
|
@@ -2515,7 +2516,7 @@ const Nt = ({
|
|
|
2515
2516
|
context: {},
|
|
2516
2517
|
formView: void 0,
|
|
2517
2518
|
actionData: void 0
|
|
2518
|
-
}), g(!1), await new Promise((E) => setTimeout(E, 300)), p({ domain: A, model: x, context: F, formView: S, actionData:
|
|
2519
|
+
}), g(!1), await new Promise((E) => setTimeout(E, 300)), p({ domain: A, model: x, context: F, formView: S, actionData: w }), g(!0);
|
|
2519
2520
|
}
|
|
2520
2521
|
async function _() {
|
|
2521
2522
|
br(c.current), c.current = [], g(!1), p({
|
|
@@ -2575,7 +2576,7 @@ const Nt = ({
|
|
|
2575
2576
|
}
|
|
2576
2577
|
) });
|
|
2577
2578
|
};
|
|
2578
|
-
async function
|
|
2579
|
+
async function pa({
|
|
2579
2580
|
views: t,
|
|
2580
2581
|
view_mode: e,
|
|
2581
2582
|
model: r,
|
|
@@ -2624,7 +2625,7 @@ async function ha({
|
|
|
2624
2625
|
}
|
|
2625
2626
|
return { views: s, initialView: a };
|
|
2626
2627
|
}
|
|
2627
|
-
const
|
|
2628
|
+
const ga = wt(ha), ya = ({
|
|
2628
2629
|
error: t,
|
|
2629
2630
|
className: e
|
|
2630
2631
|
}) => {
|
|
@@ -2645,7 +2646,7 @@ const pa = vt(ma), ga = ({
|
|
|
2645
2646
|
banner: !0
|
|
2646
2647
|
}
|
|
2647
2648
|
);
|
|
2648
|
-
},
|
|
2649
|
+
}, va = 800;
|
|
2649
2650
|
function wa(t, e) {
|
|
2650
2651
|
const {
|
|
2651
2652
|
model: r,
|
|
@@ -2663,14 +2664,14 @@ function wa(t, e) {
|
|
|
2663
2664
|
formView: h,
|
|
2664
2665
|
postSaveAction: p,
|
|
2665
2666
|
insideButtonModal: y = !1,
|
|
2666
|
-
parentContext:
|
|
2667
|
+
parentContext: v = {},
|
|
2667
2668
|
actionDomain: T,
|
|
2668
2669
|
visible: I = !0,
|
|
2669
2670
|
rootForm: C = !1,
|
|
2670
2671
|
defaultValues: O,
|
|
2671
2672
|
forcedValues: _ = {},
|
|
2672
2673
|
parentWidth: A
|
|
2673
|
-
} = t, { t: x, lang: S } = H(he), [F,
|
|
2674
|
+
} = t, { t: x, lang: S } = H(he), [F, w] = b(!1), [E, P] = b(), [M, j] = b(), [N] = lt.useForm(), [B, K] = b(), [R, U] = b(), ne = H(uo), [X, Y] = b(), [G, k] = b(!1), L = de(), ee = de({}), le = de({}), Fe = de(!1), J = de(!1), q = de(!1), ve = (A !== void 0 ? A : X) < va, je = H(Ne), { activeId: ke, getPlainValues: Le } = je || {}, Ge = H(
|
|
2674
2675
|
rt
|
|
2675
2676
|
), {
|
|
2676
2677
|
setFormIsSaving: Ce = void 0,
|
|
@@ -2703,7 +2704,7 @@ function wa(t, e) {
|
|
|
2703
2704
|
(i === void 0 && R || i !== void 0 && R && i < 0) && (L.current = void 0, j(void 0)), nr();
|
|
2704
2705
|
}
|
|
2705
2706
|
}, [i, r, g, h, I]), me(() => {
|
|
2706
|
-
G && (
|
|
2707
|
+
G && (vn({
|
|
2707
2708
|
elementHasLostFocus: !0
|
|
2708
2709
|
}), k(!1));
|
|
2709
2710
|
}, [G]);
|
|
@@ -2745,7 +2746,7 @@ function wa(t, e) {
|
|
|
2745
2746
|
return $;
|
|
2746
2747
|
}
|
|
2747
2748
|
function Se() {
|
|
2748
|
-
return { ...
|
|
2749
|
+
return { ...v, ...M == null ? void 0 : M.context };
|
|
2749
2750
|
}
|
|
2750
2751
|
function pe() {
|
|
2751
2752
|
return ce() ? { active_id: ce(), active_ids: [ce()] } : {};
|
|
@@ -2764,7 +2765,7 @@ function wa(t, e) {
|
|
|
2764
2765
|
return await D.getHandler().defaultGet({
|
|
2765
2766
|
model: r,
|
|
2766
2767
|
fields: $,
|
|
2767
|
-
context: { ...
|
|
2768
|
+
context: { ...v, ...W },
|
|
2768
2769
|
extraValues: O
|
|
2769
2770
|
});
|
|
2770
2771
|
}, tt = () => Object.keys(
|
|
@@ -2811,7 +2812,7 @@ function wa(t, e) {
|
|
|
2811
2812
|
ye == null || ye(!0), P(void 0), $ != null && $.fields ? (te = $.fields, re = $.arch) : (te = R, re = B), g && ($ == null ? void 0 : $.forceRefresh) !== !0 ? W = g : { values: W, defaultGetCalled: fe } = await Do({
|
|
2812
2813
|
fields: te,
|
|
2813
2814
|
arch: re
|
|
2814
|
-
}), T && (W = { ...
|
|
2815
|
+
}), T && (W = { ...Bs(T), ...W }), ee.current = It(W, te), Lt({
|
|
2815
2816
|
values: W,
|
|
2816
2817
|
fields: te,
|
|
2817
2818
|
reset: !0,
|
|
@@ -2832,13 +2833,13 @@ function wa(t, e) {
|
|
|
2832
2833
|
const $ = await D.getHandler().getActionStringForModel(r);
|
|
2833
2834
|
return (await D.getHandler().getViewsForAction({
|
|
2834
2835
|
action: $,
|
|
2835
|
-
context:
|
|
2836
|
+
context: v
|
|
2836
2837
|
})).views.get("form");
|
|
2837
2838
|
}
|
|
2838
2839
|
return await D.getHandler().getView({
|
|
2839
2840
|
model: r,
|
|
2840
2841
|
type: "form",
|
|
2841
|
-
context:
|
|
2842
|
+
context: v
|
|
2842
2843
|
});
|
|
2843
2844
|
}, Lt = ({
|
|
2844
2845
|
values: $,
|
|
@@ -2865,14 +2866,14 @@ function wa(t, e) {
|
|
|
2865
2866
|
model: r,
|
|
2866
2867
|
ids: [ce()],
|
|
2867
2868
|
fields: $,
|
|
2868
|
-
context:
|
|
2869
|
+
context: v
|
|
2869
2870
|
}))[0];
|
|
2870
2871
|
const fe = await D.getHandler().search({
|
|
2871
2872
|
params: [
|
|
2872
2873
|
["res_model", "=", r],
|
|
2873
2874
|
["res_id", "=", ce()]
|
|
2874
2875
|
],
|
|
2875
|
-
|
|
2876
|
+
fieldsToRetrieve: ["id", "name"],
|
|
2876
2877
|
context: Se(),
|
|
2877
2878
|
model: "ir.attachment"
|
|
2878
2879
|
});
|
|
@@ -2894,7 +2895,7 @@ function wa(t, e) {
|
|
|
2894
2895
|
values: { ...te, ..._ },
|
|
2895
2896
|
fields: R,
|
|
2896
2897
|
context: {
|
|
2897
|
-
...
|
|
2898
|
+
...v,
|
|
2898
2899
|
...M == null ? void 0 : M.context
|
|
2899
2900
|
}
|
|
2900
2901
|
}), ee.current = qe(R);
|
|
@@ -2904,7 +2905,7 @@ function wa(t, e) {
|
|
|
2904
2905
|
values: { ...te, ..._ },
|
|
2905
2906
|
fields: R,
|
|
2906
2907
|
context: {
|
|
2907
|
-
...
|
|
2908
|
+
...v,
|
|
2908
2909
|
...M == null ? void 0 : M.context
|
|
2909
2910
|
}
|
|
2910
2911
|
});
|
|
@@ -2930,14 +2931,14 @@ function wa(t, e) {
|
|
|
2930
2931
|
if (!tt() && ce() && te)
|
|
2931
2932
|
return J.current = !1, oe == null || oe(!1), ue == null || ue(), { succeed: !0, id: ce() };
|
|
2932
2933
|
if (await St())
|
|
2933
|
-
return J.current = !1,
|
|
2934
|
-
|
|
2934
|
+
return J.current = !1, vr(S), { succeed: !1, id: ce() };
|
|
2935
|
+
w(!0), Ce == null || Ce(!0);
|
|
2935
2936
|
try {
|
|
2936
2937
|
m === "api" ? await or($) : await ko($), f && (L.current = void 0, Lt({ values: {}, fields: R, reset: !0 })), await gt({ forceRefresh: !0 }), W = !0, xn.success(x("savedRegisters"));
|
|
2937
2938
|
} catch (re) {
|
|
2938
|
-
J.current = !1,
|
|
2939
|
+
J.current = !1, w(!1), Ce == null || Ce(!1), Ue == null || Ue(re), xn.error(x("errorWhileSavingForm")), P(re != null && re.message ? re.message : re);
|
|
2939
2940
|
} finally {
|
|
2940
|
-
J.current = !1, Ce == null || Ce(!1),
|
|
2941
|
+
J.current = !1, Ce == null || Ce(!1), w(!1);
|
|
2941
2942
|
}
|
|
2942
2943
|
return { succeed: W, id: ce() };
|
|
2943
2944
|
}, Bt = ({
|
|
@@ -2950,7 +2951,7 @@ function wa(t, e) {
|
|
|
2950
2951
|
const fe = new Mr($);
|
|
2951
2952
|
fe.parse(W, {
|
|
2952
2953
|
readOnly: c || re,
|
|
2953
|
-
values:
|
|
2954
|
+
values: Vs(
|
|
2954
2955
|
{
|
|
2955
2956
|
...te,
|
|
2956
2957
|
...Te()
|
|
@@ -2958,7 +2959,7 @@ function wa(t, e) {
|
|
|
2958
2959
|
$
|
|
2959
2960
|
)
|
|
2960
2961
|
}), j(fe), fe.string && fe.string !== He && (Z == null || Z(fe.string)), ne && fe.string && ((nt = ne.setTitle) == null || nt.call(ne, fe.string));
|
|
2961
|
-
},
|
|
2962
|
+
}, vn = async ({
|
|
2962
2963
|
elementHasLostFocus: $ = !1
|
|
2963
2964
|
}) => {
|
|
2964
2965
|
if (J.current)
|
|
@@ -2968,7 +2969,7 @@ function wa(t, e) {
|
|
|
2968
2969
|
target: qe(R),
|
|
2969
2970
|
fields: R
|
|
2970
2971
|
}), te = Object.keys(W);
|
|
2971
|
-
if (te.length !== 0 && !(
|
|
2972
|
+
if (te.length !== 0 && !(Ps({
|
|
2972
2973
|
changedFields: te,
|
|
2973
2974
|
formOoui: M,
|
|
2974
2975
|
types: [
|
|
@@ -2986,7 +2987,7 @@ function wa(t, e) {
|
|
|
2986
2987
|
const re = It(N.getFieldsValue(!0), R);
|
|
2987
2988
|
le.current = re, d == null || d(re), oe == null || oe(!0), Mo(te);
|
|
2988
2989
|
}
|
|
2989
|
-
}, Eo = Ci(
|
|
2990
|
+
}, Eo = Ci(vn, 100), Mo = async ($) => {
|
|
2990
2991
|
try {
|
|
2991
2992
|
for (let W = 0; W < $.length; W += 1) {
|
|
2992
2993
|
const te = $[W];
|
|
@@ -3005,11 +3006,11 @@ function wa(t, e) {
|
|
|
3005
3006
|
});
|
|
3006
3007
|
return;
|
|
3007
3008
|
}
|
|
3008
|
-
const te =
|
|
3009
|
+
const te = $s({
|
|
3009
3010
|
values: {
|
|
3010
3011
|
...qe(R),
|
|
3011
3012
|
context: {
|
|
3012
|
-
...
|
|
3013
|
+
...v,
|
|
3013
3014
|
...M == null ? void 0 : M.context
|
|
3014
3015
|
}
|
|
3015
3016
|
},
|
|
@@ -3035,12 +3036,12 @@ function wa(t, e) {
|
|
|
3035
3036
|
}
|
|
3036
3037
|
if (re.warning && re.warning.title && re.warning.message && !Fe.current) {
|
|
3037
3038
|
const { title: fe, message: nt } = re.warning;
|
|
3038
|
-
Fe.current = !0,
|
|
3039
|
+
Fe.current = !0, na(fe, nt, () => {
|
|
3039
3040
|
Fe.current = !1;
|
|
3040
3041
|
});
|
|
3041
3042
|
}
|
|
3042
3043
|
if (re.domain && Object.keys(re.domain).length > 0) {
|
|
3043
|
-
const fe =
|
|
3044
|
+
const fe = Ls({
|
|
3044
3045
|
fieldsDomain: re.domain,
|
|
3045
3046
|
fields: R
|
|
3046
3047
|
});
|
|
@@ -3061,7 +3062,7 @@ function wa(t, e) {
|
|
|
3061
3062
|
payload: [ce()],
|
|
3062
3063
|
context: {
|
|
3063
3064
|
...M == null ? void 0 : M.context,
|
|
3064
|
-
...
|
|
3065
|
+
...v,
|
|
3065
3066
|
...W
|
|
3066
3067
|
}
|
|
3067
3068
|
});
|
|
@@ -3071,7 +3072,7 @@ function wa(t, e) {
|
|
|
3071
3072
|
ie == null || ie(ce(), Ke(), se());
|
|
3072
3073
|
else if (te.type) {
|
|
3073
3074
|
let re = {};
|
|
3074
|
-
te.context && (re =
|
|
3075
|
+
te.context && (re = vt({
|
|
3075
3076
|
context: te.context,
|
|
3076
3077
|
fields: R,
|
|
3077
3078
|
values: Ke()
|
|
@@ -3097,7 +3098,7 @@ function wa(t, e) {
|
|
|
3097
3098
|
const te = (await D.getHandler().readObjects({
|
|
3098
3099
|
model: "ir.actions.actions",
|
|
3099
3100
|
ids: [parseInt($)],
|
|
3100
|
-
context:
|
|
3101
|
+
context: v
|
|
3101
3102
|
}))[0];
|
|
3102
3103
|
await ir({ actionData: te, context: W });
|
|
3103
3104
|
}
|
|
@@ -3110,7 +3111,7 @@ function wa(t, e) {
|
|
|
3110
3111
|
fields: R,
|
|
3111
3112
|
values: Ke(),
|
|
3112
3113
|
context: {
|
|
3113
|
-
...
|
|
3114
|
+
...v,
|
|
3114
3115
|
...M == null ? void 0 : M.context,
|
|
3115
3116
|
...W
|
|
3116
3117
|
},
|
|
@@ -3121,9 +3122,9 @@ function wa(t, e) {
|
|
|
3121
3122
|
!C && te && (ie == null || ie(ce(), Ke(), se()));
|
|
3122
3123
|
}
|
|
3123
3124
|
function $o() {
|
|
3124
|
-
|
|
3125
|
+
vn({ elementHasLostFocus: !0 });
|
|
3125
3126
|
}
|
|
3126
|
-
function
|
|
3127
|
+
function wn($) {
|
|
3127
3128
|
Bt({
|
|
3128
3129
|
fields: R,
|
|
3129
3130
|
arch: B,
|
|
@@ -3141,20 +3142,20 @@ function wa(t, e) {
|
|
|
3141
3142
|
return;
|
|
3142
3143
|
}
|
|
3143
3144
|
if (await St()) {
|
|
3144
|
-
|
|
3145
|
+
vr(S);
|
|
3145
3146
|
return;
|
|
3146
3147
|
}
|
|
3147
3148
|
let re = !1;
|
|
3148
3149
|
try {
|
|
3149
|
-
!c && (tt() || ce() === void 0) && (re = !0,
|
|
3150
|
+
!c && (tt() || ce() === void 0) && (re = !0, wn(!0), m === "2many" ? (await or({ callOnSubmitSucceed: !1 }), q.current = !0) : await Xt({ callOnSubmitSucceed: !1 }));
|
|
3150
3151
|
const fe = q.current ? pe() : {}, nt = { ...te, ...fe };
|
|
3151
|
-
$ === "object" ? await Po({ action: W, context: nt }) : $ === "workflow" ? await Lo({ action: W }) : $ === "action" && await Bo({ action: W, context: nt }), re &&
|
|
3152
|
+
$ === "object" ? await Po({ action: W, context: nt }) : $ === "workflow" ? await Lo({ action: W }) : $ === "action" && await Bo({ action: W, context: nt }), re && wn(!1);
|
|
3152
3153
|
} catch (fe) {
|
|
3153
|
-
re &&
|
|
3154
|
+
re && wn(!1), ze(fe);
|
|
3154
3155
|
}
|
|
3155
3156
|
}
|
|
3156
3157
|
const Ko = () => !M && !E ? /* @__PURE__ */ n(Ae, {}) : !r && !h || !I ? null : /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ n(
|
|
3157
|
-
|
|
3158
|
+
ns,
|
|
3158
3159
|
{
|
|
3159
3160
|
getValues: Ke,
|
|
3160
3161
|
getPlainValues: z,
|
|
@@ -3182,7 +3183,7 @@ function wa(t, e) {
|
|
|
3182
3183
|
Dn,
|
|
3183
3184
|
{
|
|
3184
3185
|
container: M.container,
|
|
3185
|
-
responsiveBehaviour:
|
|
3186
|
+
responsiveBehaviour: ve
|
|
3186
3187
|
}
|
|
3187
3188
|
)
|
|
3188
3189
|
}
|
|
@@ -3190,7 +3191,7 @@ function wa(t, e) {
|
|
|
3190
3191
|
}
|
|
3191
3192
|
) }), Wo = () => /* @__PURE__ */ V(Q, { children: [
|
|
3192
3193
|
/* @__PURE__ */ n(cn, {}),
|
|
3193
|
-
/* @__PURE__ */ n(
|
|
3194
|
+
/* @__PURE__ */ n(we, { justify: "end", children: /* @__PURE__ */ V(We, { children: [
|
|
3194
3195
|
/* @__PURE__ */ n(
|
|
3195
3196
|
Oe,
|
|
3196
3197
|
{
|
|
@@ -3226,14 +3227,14 @@ function wa(t, e) {
|
|
|
3226
3227
|
Y((W = $.bounds) == null ? void 0 : W.width);
|
|
3227
3228
|
},
|
|
3228
3229
|
children: ({ measureRef: $ }) => /* @__PURE__ */ V("div", { className: "pb-2", ref: $, children: [
|
|
3229
|
-
E && /* @__PURE__ */ n(
|
|
3230
|
+
E && /* @__PURE__ */ n(ya, { className: "mt-5 mb-10", error: E }),
|
|
3230
3231
|
Ko(),
|
|
3231
3232
|
a && Wo()
|
|
3232
3233
|
] })
|
|
3233
3234
|
}
|
|
3234
3235
|
) : null;
|
|
3235
3236
|
}
|
|
3236
|
-
const Jt =
|
|
3237
|
+
const Jt = wt(wa), Zt = (t) => {
|
|
3237
3238
|
const {
|
|
3238
3239
|
visible: e,
|
|
3239
3240
|
id: r,
|
|
@@ -3256,7 +3257,7 @@ const Jt = vt(wa), Zt = (t) => {
|
|
|
3256
3257
|
});
|
|
3257
3258
|
g(x !== !1), x !== !1 && p(x);
|
|
3258
3259
|
}
|
|
3259
|
-
async function
|
|
3260
|
+
async function v() {
|
|
3260
3261
|
if (m && h)
|
|
3261
3262
|
await D.getHandler().removeFavourite({
|
|
3262
3263
|
shortcut_id: h
|
|
@@ -3273,21 +3274,21 @@ const Jt = vt(wa), Zt = (t) => {
|
|
|
3273
3274
|
g(!m);
|
|
3274
3275
|
}
|
|
3275
3276
|
function T() {
|
|
3276
|
-
return /* @__PURE__ */ V(
|
|
3277
|
+
return /* @__PURE__ */ V(we, { align: "middle", children: [
|
|
3277
3278
|
/* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
|
|
3278
3279
|
Oe,
|
|
3279
3280
|
{
|
|
3280
3281
|
type: m ? "primary" : "default",
|
|
3281
3282
|
icon: m ? /* @__PURE__ */ n(Kr, { style: { color: "white" } }) : /* @__PURE__ */ n(Wr, {}),
|
|
3282
3283
|
style: { width: 30 },
|
|
3283
|
-
onClick:
|
|
3284
|
+
onClick: v
|
|
3284
3285
|
}
|
|
3285
3286
|
) }),
|
|
3286
3287
|
/* @__PURE__ */ n(ae, { style: { paddingLeft: 10 }, children: c })
|
|
3287
3288
|
] });
|
|
3288
3289
|
}
|
|
3289
3290
|
const I = u * 0.95;
|
|
3290
|
-
return /* @__PURE__ */ n(
|
|
3291
|
+
return /* @__PURE__ */ n(ra, { setTitle: f, children: /* @__PURE__ */ n(
|
|
3291
3292
|
Je,
|
|
3292
3293
|
{
|
|
3293
3294
|
title: a ? T() : c,
|
|
@@ -3311,13 +3312,13 @@ const Jt = vt(wa), Zt = (t) => {
|
|
|
3311
3312
|
)
|
|
3312
3313
|
}
|
|
3313
3314
|
) });
|
|
3314
|
-
},
|
|
3315
|
+
}, ba = (t) => /* @__PURE__ */ n(ge, { ...t, layout: "vertical", children: /* @__PURE__ */ n(
|
|
3315
3316
|
Pn.RangePicker,
|
|
3316
3317
|
{
|
|
3317
3318
|
allowEmpty: [!0, !0],
|
|
3318
3319
|
format: "DD/MM/YYYY"
|
|
3319
3320
|
}
|
|
3320
|
-
) }),
|
|
3321
|
+
) }), Ca = (t) => {
|
|
3321
3322
|
const { ooui: e, showLabel: r = !1 } = t, { label: i, id: o } = e, s = [
|
|
3322
3323
|
new Rn({
|
|
3323
3324
|
name: o + "#date",
|
|
@@ -3341,7 +3342,7 @@ const Jt = vt(wa), Zt = (t) => {
|
|
|
3341
3342
|
align: "left"
|
|
3342
3343
|
}
|
|
3343
3344
|
),
|
|
3344
|
-
/* @__PURE__ */ V(
|
|
3345
|
+
/* @__PURE__ */ V(we, { align: "bottom", className: "p-0", children: [
|
|
3345
3346
|
/* @__PURE__ */ n(ae, { className: "mr-2", children: /* @__PURE__ */ n(ge, { ...t, ooui: s[0], showLabel: !1, children: /* @__PURE__ */ n(
|
|
3346
3347
|
Pn.RangePicker,
|
|
3347
3348
|
{
|
|
@@ -3360,8 +3361,8 @@ const Jt = vt(wa), Zt = (t) => {
|
|
|
3360
3361
|
) }) })
|
|
3361
3362
|
] })
|
|
3362
3363
|
] });
|
|
3363
|
-
}, { useToken:
|
|
3364
|
-
const { ooui: e } = t, { id: r, decimalDigits: i, readOnly: o, required: s } = e, { token: a } =
|
|
3364
|
+
}, { useToken: xa } = Pe, mo = (t) => {
|
|
3365
|
+
const { ooui: e } = t, { id: r, decimalDigits: i, readOnly: o, required: s } = e, { token: a } = xa(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = H(Ne), { elementHasLostFocus: u } = d || {};
|
|
3365
3366
|
return /* @__PURE__ */ n(ge, { required: s, type: "number", ...t, children: /* @__PURE__ */ n(
|
|
3366
3367
|
Ln,
|
|
3367
3368
|
{
|
|
@@ -3375,8 +3376,8 @@ const Jt = vt(wa), Zt = (t) => {
|
|
|
3375
3376
|
onBlur: u
|
|
3376
3377
|
}
|
|
3377
3378
|
) });
|
|
3378
|
-
}, { useToken:
|
|
3379
|
-
const { ooui: e, onChange: r } = t, { id: i, readOnly: o, required: s } = e, { token: a } =
|
|
3379
|
+
}, { useToken: Sa } = Pe, rn = (t) => {
|
|
3380
|
+
const { ooui: e, onChange: r } = t, { id: i, readOnly: o, required: s } = e, { token: a } = Sa(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = H(Ne), { elementHasLostFocus: u } = d || {};
|
|
3380
3381
|
return /* @__PURE__ */ n(ge, { required: s, type: "number", ...t, children: /* @__PURE__ */ n(
|
|
3381
3382
|
Ln,
|
|
3382
3383
|
{
|
|
@@ -3394,7 +3395,7 @@ const Jt = vt(wa), Zt = (t) => {
|
|
|
3394
3395
|
}
|
|
3395
3396
|
) });
|
|
3396
3397
|
};
|
|
3397
|
-
function
|
|
3398
|
+
function Ta(t) {
|
|
3398
3399
|
const { ooui: e, showLabel: r } = t, { id: i, label: o, tooltip: s } = e, a = e instanceof Vn ? rn : mo, l = (d) => /* @__PURE__ */ n(
|
|
3399
3400
|
a,
|
|
3400
3401
|
{
|
|
@@ -3420,24 +3421,24 @@ function Sa(t) {
|
|
|
3420
3421
|
align: "left"
|
|
3421
3422
|
}
|
|
3422
3423
|
),
|
|
3423
|
-
/* @__PURE__ */ V(
|
|
3424
|
+
/* @__PURE__ */ V(we, { align: "bottom", className: "mt-0", wrap: !1, children: [
|
|
3424
3425
|
/* @__PURE__ */ n(ae, { children: l("#from") }),
|
|
3425
3426
|
/* @__PURE__ */ n(ae, { className: "pb-1", children: /* @__PURE__ */ n("span", { className: "pl-2 pr-2 h-full", children: " - " }) }),
|
|
3426
3427
|
/* @__PURE__ */ n(ae, { children: l("#to") })
|
|
3427
3428
|
] })
|
|
3428
3429
|
] });
|
|
3429
3430
|
}
|
|
3430
|
-
const { defaultAlgorithm:
|
|
3431
|
+
const { defaultAlgorithm: Fa, defaultSeed: Ia } = Pe, Oa = Fa(Ia), { Option: _a } = Ct, Ra = (t) => {
|
|
3431
3432
|
const { ooui: e } = t, { required: r } = e;
|
|
3432
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(
|
|
3433
|
-
},
|
|
3433
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(Va, { ...t }) });
|
|
3434
|
+
}, Va = (t) => {
|
|
3434
3435
|
const { ooui: e, onChange: r, value: i } = t, { selectionValues: o, readOnly: s, required: a } = e, l = Array.from(o.entries()), d = l && l.length && l.filter((f) => {
|
|
3435
3436
|
const [m] = f;
|
|
3436
3437
|
return i ? !i.includes(m) : !0;
|
|
3437
3438
|
}).map((f) => {
|
|
3438
3439
|
const [m, g] = f;
|
|
3439
|
-
return /* @__PURE__ */ n(
|
|
3440
|
-
}), u = a && !s ?
|
|
3440
|
+
return /* @__PURE__ */ n(_a, { value: g, children: g }, m);
|
|
3441
|
+
}), u = a && !s ? Aa : Ct;
|
|
3441
3442
|
function c(f) {
|
|
3442
3443
|
const m = f.map((g) => {
|
|
3443
3444
|
const h = l.find(([p, y]) => g === y);
|
|
@@ -3460,12 +3461,12 @@ const { defaultAlgorithm: Ta, defaultSeed: Fa } = Pe, Ia = Ta(Fa), { Option: Oa
|
|
|
3460
3461
|
children: d
|
|
3461
3462
|
}
|
|
3462
3463
|
);
|
|
3463
|
-
},
|
|
3464
|
+
}, Aa = Mt(Ct)`
|
|
3464
3465
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
3465
|
-
background-color: ${
|
|
3466
|
+
background-color: ${Oa.colorPrimaryBg};
|
|
3466
3467
|
}
|
|
3467
3468
|
`;
|
|
3468
|
-
function
|
|
3469
|
+
function Da(t) {
|
|
3469
3470
|
const { field: e } = t;
|
|
3470
3471
|
e.readOnly = !1, e.required = !1;
|
|
3471
3472
|
const { t: r } = H(he);
|
|
@@ -3485,20 +3486,20 @@ function Aa(t) {
|
|
|
3485
3486
|
case mt.progressbar:
|
|
3486
3487
|
case mt.float_time:
|
|
3487
3488
|
case mt.integer:
|
|
3488
|
-
return /* @__PURE__ */ n(
|
|
3489
|
+
return /* @__PURE__ */ n(Ta, { ooui: e, showLabel: !0 });
|
|
3489
3490
|
case mt.date:
|
|
3490
|
-
return /* @__PURE__ */ n(va, { ooui: e, layout: "vertical", showLabel: !0 });
|
|
3491
|
-
case mt.datetime:
|
|
3492
3491
|
return /* @__PURE__ */ n(ba, { ooui: e, layout: "vertical", showLabel: !0 });
|
|
3492
|
+
case mt.datetime:
|
|
3493
|
+
return /* @__PURE__ */ n(Ca, { ooui: e, layout: "vertical", showLabel: !0 });
|
|
3493
3494
|
case mt.selection:
|
|
3494
|
-
return /* @__PURE__ */ n(
|
|
3495
|
+
return /* @__PURE__ */ n(Ra, { layout: "vertical", ooui: e, showLabel: !0 });
|
|
3495
3496
|
default:
|
|
3496
3497
|
return /* @__PURE__ */ n(to, { ooui: e, layout: "vertical", showLabel: !0, isSearchField: !0 });
|
|
3497
3498
|
}
|
|
3498
3499
|
}
|
|
3499
|
-
function
|
|
3500
|
+
function ka(t) {
|
|
3500
3501
|
const { onAdvancedFilterToggle: e, advancedFilter: r, onClear: i, isSearching: o } = t, { t: s } = H(he);
|
|
3501
|
-
return /* @__PURE__ */ V(
|
|
3502
|
+
return /* @__PURE__ */ V(we, { children: [
|
|
3502
3503
|
/* @__PURE__ */ n(ae, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ V("a", { className: "text-xs", onClick: e, children: [
|
|
3503
3504
|
r ? /* @__PURE__ */ n(si, { className: "pr-1" }) : /* @__PURE__ */ n(kt, { className: "pr-1" }),
|
|
3504
3505
|
s(r ? "simple_search" : "advanced_search")
|
|
@@ -3519,10 +3520,10 @@ function Da(t) {
|
|
|
3519
3520
|
] })
|
|
3520
3521
|
] });
|
|
3521
3522
|
}
|
|
3522
|
-
function
|
|
3523
|
+
function Ea(t) {
|
|
3523
3524
|
const { onLimitChange: e } = t, { t: r } = H(he), i = new Vn({ name: "limit" }), o = new Vn({ name: "offset" });
|
|
3524
3525
|
return /* @__PURE__ */ V("div", { className: "pl-2 pt-2", children: [
|
|
3525
|
-
/* @__PURE__ */ n(
|
|
3526
|
+
/* @__PURE__ */ n(we, { children: r("parameters") }, "count_params"),
|
|
3526
3527
|
/* @__PURE__ */ V(We, { align: "center", children: [
|
|
3527
3528
|
r("limit") + " :",
|
|
3528
3529
|
/* @__PURE__ */ n(
|
|
@@ -3539,7 +3540,7 @@ function ka(t) {
|
|
|
3539
3540
|
] })
|
|
3540
3541
|
] });
|
|
3541
3542
|
}
|
|
3542
|
-
const { useToken:
|
|
3543
|
+
const { useToken: Ma } = Pe;
|
|
3543
3544
|
function ho(t) {
|
|
3544
3545
|
const {
|
|
3545
3546
|
fields: e,
|
|
@@ -3555,36 +3556,36 @@ function ho(t) {
|
|
|
3555
3556
|
searchError: f,
|
|
3556
3557
|
searchValues: m,
|
|
3557
3558
|
showLimitOptions: g = !0
|
|
3558
|
-
} = t, [h, p] = b(), [y,
|
|
3559
|
+
} = t, [h, p] = b(), [y, v] = b(), [T, I] = b(!1), C = de(), { token: O } = Ma(), [_] = lt.useForm();
|
|
3559
3560
|
me(() => {
|
|
3560
3561
|
_.setFieldsValue(m);
|
|
3561
3562
|
}, [m]);
|
|
3562
3563
|
const A = () => {
|
|
3563
3564
|
if (!y)
|
|
3564
3565
|
return;
|
|
3565
|
-
const F = T ? y : h,
|
|
3566
|
-
return
|
|
3566
|
+
const F = T ? y : h, w = F == null ? void 0 : F.rows;
|
|
3567
|
+
return w == null ? void 0 : w.map((E, P) => /* @__PURE__ */ n(we, { children: E.map((M, j) => /* @__PURE__ */ n(ae, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ n(Da, { field: M }) }, j)) }, P));
|
|
3567
3568
|
};
|
|
3568
3569
|
xt(() => {
|
|
3569
|
-
I(!1), C.current = new oi(r, e), C.current.parse(), p(C.current._simpleSearchContainer),
|
|
3570
|
+
I(!1), C.current = new oi(r, e), C.current.parse(), p(C.current._simpleSearchContainer), v(C.current._advancedSearchContainer);
|
|
3570
3571
|
}, [e, r]);
|
|
3571
3572
|
const x = A(), S = (F) => {
|
|
3572
3573
|
var M;
|
|
3573
|
-
const { limit:
|
|
3574
|
+
const { limit: w, offset: E } = F;
|
|
3574
3575
|
delete F.offset, delete F.limit;
|
|
3575
|
-
const P =
|
|
3576
|
+
const P = oa(
|
|
3576
3577
|
F,
|
|
3577
3578
|
(M = C.current) == null ? void 0 : M._advancedSearchContainer
|
|
3578
3579
|
);
|
|
3579
|
-
o({ params: P, offset: E, limit:
|
|
3580
|
+
o({ params: P, offset: E, limit: w, searchValues: F });
|
|
3580
3581
|
};
|
|
3581
3582
|
return /* @__PURE__ */ n(
|
|
3582
3583
|
Zn,
|
|
3583
3584
|
{
|
|
3584
3585
|
bounds: !0,
|
|
3585
3586
|
onResize: (F) => {
|
|
3586
|
-
var
|
|
3587
|
-
c == null || c((
|
|
3587
|
+
var w;
|
|
3588
|
+
c == null || c((w = F.bounds) == null ? void 0 : w.height);
|
|
3588
3589
|
},
|
|
3589
3590
|
children: ({ measureRef: F }) => /* @__PURE__ */ n("div", { ref: F, children: /* @__PURE__ */ V("div", { style: { display: u ? "block" : "none" }, children: [
|
|
3590
3591
|
/* @__PURE__ */ V(
|
|
@@ -3597,9 +3598,9 @@ function ho(t) {
|
|
|
3597
3598
|
initialValues: { offset: a, limit: l },
|
|
3598
3599
|
children: [
|
|
3599
3600
|
x,
|
|
3600
|
-
T && g && /* @__PURE__ */ n(
|
|
3601
|
+
T && g && /* @__PURE__ */ n(Ea, { onLimitChange: d }),
|
|
3601
3602
|
/* @__PURE__ */ n(
|
|
3602
|
-
|
|
3603
|
+
ka,
|
|
3603
3604
|
{
|
|
3604
3605
|
advancedFilter: T,
|
|
3605
3606
|
onAdvancedFilterToggle: () => {
|
|
@@ -3633,7 +3634,7 @@ const Cr = (t, e = "14px -apple-system") => {
|
|
|
3633
3634
|
i.font = e;
|
|
3634
3635
|
const o = i.measureText(t);
|
|
3635
3636
|
return Math.round((o.width + 80) * 1.5);
|
|
3636
|
-
},
|
|
3637
|
+
}, Na = (t, e, r = 500) => {
|
|
3637
3638
|
if (t.length === 0)
|
|
3638
3639
|
return { columns: t };
|
|
3639
3640
|
const i = t.map(
|
|
@@ -3655,7 +3656,7 @@ const Cr = (t, e = "14px -apple-system") => {
|
|
|
3655
3656
|
tableWidth: o
|
|
3656
3657
|
};
|
|
3657
3658
|
};
|
|
3658
|
-
function
|
|
3659
|
+
function Pa(t) {
|
|
3659
3660
|
if (t)
|
|
3660
3661
|
try {
|
|
3661
3662
|
if (t.includes(":")) {
|
|
@@ -3685,17 +3686,17 @@ function po(t) {
|
|
|
3685
3686
|
});
|
|
3686
3687
|
return e = `${o}:${s}`, t < 0 && (e = "-" + e), e;
|
|
3687
3688
|
}
|
|
3688
|
-
const
|
|
3689
|
+
const La = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go, {}) }), go = ({ value: t }) => {
|
|
3689
3690
|
const e = `${(t || 0).toLocaleString("en-US", {
|
|
3690
3691
|
minimumIntegerDigits: 1,
|
|
3691
3692
|
maximumFractionDigits: 4,
|
|
3692
3693
|
useGrouping: !1
|
|
3693
3694
|
})}%`;
|
|
3694
3695
|
return /* @__PURE__ */ V("div", { style: { flex: 1, display: "flex", alignItems: "center" }, children: [
|
|
3695
|
-
/* @__PURE__ */ n(
|
|
3696
|
+
/* @__PURE__ */ n(Ba, { percent: t }),
|
|
3696
3697
|
/* @__PURE__ */ n("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: e })
|
|
3697
3698
|
] });
|
|
3698
|
-
},
|
|
3699
|
+
}, Ba = Mt(zo)`
|
|
3699
3700
|
.ant-progress-outer {
|
|
3700
3701
|
margin-right: 0px;
|
|
3701
3702
|
padding-right: 0px;
|
|
@@ -3731,13 +3732,13 @@ const Pa = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3731
3732
|
var x, S;
|
|
3732
3733
|
const { id: e, model: r, context: i = {} } = t, [o, s] = b(!1), [a, l] = b(!1), [d, u] = b(!1), [c, f] = b(), [m, g] = b(), { t: h } = H(he), p = H(
|
|
3733
3734
|
dt
|
|
3734
|
-
), { openRelate: y } = p || {},
|
|
3735
|
+
), { openRelate: y } = p || {}, v = H(
|
|
3735
3736
|
Pt
|
|
3736
|
-
), { processAction: T } =
|
|
3737
|
+
), { processAction: T } = v || {};
|
|
3737
3738
|
if (!e)
|
|
3738
3739
|
return null;
|
|
3739
3740
|
async function I() {
|
|
3740
|
-
var F,
|
|
3741
|
+
var F, w, E, P, M;
|
|
3741
3742
|
u(!0);
|
|
3742
3743
|
try {
|
|
3743
3744
|
const j = await D.getHandler().getView({
|
|
@@ -3748,7 +3749,7 @@ const Pa = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3748
3749
|
f(j);
|
|
3749
3750
|
let N = [];
|
|
3750
3751
|
const { toolbar: B } = j;
|
|
3751
|
-
(F = B.action) == null || F.filter((R) => R.hasOwnProperty("context")).map((R) => N.push(...Sn(R.context))), (
|
|
3752
|
+
(F = B.action) == null || F.filter((R) => R.hasOwnProperty("context")).map((R) => N.push(...Sn(R.context))), (w = B.action) == null || w.filter((R) => R.hasOwnProperty("domain")).map((R) => N.push(...cr(R.domain))), (E = B.relate) == null || E.filter((R) => R.hasOwnProperty("context")).map((R) => N.push(...Sn(R.context))), (P = B.relate) == null || P.filter((R) => R.hasOwnProperty("domain")).map((R) => N.push(...cr(R.domain))), (M = B.print) == null || M.filter((R) => R.hasOwnProperty("context")).map((R) => N.push(...Sn(R.context))), N = N.filter(
|
|
3752
3753
|
(R) => Object.keys(j.fields).indexOf(R) > -1
|
|
3753
3754
|
);
|
|
3754
3755
|
let K = {};
|
|
@@ -3763,12 +3764,12 @@ const Pa = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3763
3764
|
}
|
|
3764
3765
|
}
|
|
3765
3766
|
function C() {
|
|
3766
|
-
var
|
|
3767
|
+
var w;
|
|
3767
3768
|
if (d)
|
|
3768
3769
|
return /* @__PURE__ */ n($e, { children: /* @__PURE__ */ n("div", { style: { padding: 15 }, children: /* @__PURE__ */ n(Ae, {}) }) });
|
|
3769
3770
|
if (!c || !c.toolbar)
|
|
3770
3771
|
return /* @__PURE__ */ n($e, {});
|
|
3771
|
-
const F = (
|
|
3772
|
+
const F = (w = c == null ? void 0 : c.toolbar) == null ? void 0 : w.relate.map((E) => /* @__PURE__ */ n($e.Item, { children: E.name }, E.id));
|
|
3772
3773
|
return /* @__PURE__ */ n($e, { onClick: O, children: [
|
|
3773
3774
|
/* @__PURE__ */ n(
|
|
3774
3775
|
$e.Item,
|
|
@@ -3811,15 +3812,15 @@ const Pa = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3811
3812
|
else if (F.key === "print")
|
|
3812
3813
|
l(!0);
|
|
3813
3814
|
else {
|
|
3814
|
-
const
|
|
3815
|
-
if (!
|
|
3815
|
+
const w = c.toolbar.relate.find((E) => E.id === parseInt(F.key));
|
|
3816
|
+
if (!w)
|
|
3816
3817
|
return;
|
|
3817
3818
|
y({
|
|
3818
|
-
relateData:
|
|
3819
|
+
relateData: w,
|
|
3819
3820
|
values: m,
|
|
3820
3821
|
fields: c.fields,
|
|
3821
|
-
action_id:
|
|
3822
|
-
action_type:
|
|
3822
|
+
action_id: w.id,
|
|
3823
|
+
action_type: w.type
|
|
3823
3824
|
});
|
|
3824
3825
|
}
|
|
3825
3826
|
}
|
|
@@ -3870,13 +3871,13 @@ const Pa = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3870
3871
|
}
|
|
3871
3872
|
)
|
|
3872
3873
|
] });
|
|
3873
|
-
},
|
|
3874
|
+
}, $a = (t) => {
|
|
3874
3875
|
const { m2oField: e } = t;
|
|
3875
3876
|
return e ? /* @__PURE__ */ V(We, { children: [
|
|
3876
3877
|
/* @__PURE__ */ n(Q, { children: e.value }),
|
|
3877
3878
|
/* @__PURE__ */ n(Qn, { id: e.id, model: e.model })
|
|
3878
3879
|
] }) : /* @__PURE__ */ n(Q, {});
|
|
3879
|
-
},
|
|
3880
|
+
}, Ha = (t) => {
|
|
3880
3881
|
const { value: e, context: r, selectionValues: i } = t, [o, s] = b(), [a, l] = b(!1), [d, u] = e ? e.split(",") : [], c = parseInt(u), f = De(async () => {
|
|
3881
3882
|
if (!e || e && o)
|
|
3882
3883
|
return;
|
|
@@ -3901,7 +3902,7 @@ const Pa = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3901
3902
|
/* @__PURE__ */ n(Q, { children: o }),
|
|
3902
3903
|
/* @__PURE__ */ n(Qn, { id: c, model: d })
|
|
3903
3904
|
] });
|
|
3904
|
-
},
|
|
3905
|
+
}, Ka = (t) => {
|
|
3905
3906
|
const { ooui: e, value: r } = t;
|
|
3906
3907
|
if (!r)
|
|
3907
3908
|
return null;
|
|
@@ -3909,7 +3910,7 @@ const Pa = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3909
3910
|
e.selectionValues.size ? i = e.selectionValues.get(r) : Array.isArray(r) && (i = r[1]);
|
|
3910
3911
|
const o = i.toString().split(" ").filter((a) => a.length > 1).slice(0, 3).map((a) => a[0].toUpperCase()).join(""), s = nn(i);
|
|
3911
3912
|
return /* @__PURE__ */ n(ht, { title: i, children: /* @__PURE__ */ n(Ar, { alt: i, style: { backgroundColor: s }, children: o }) });
|
|
3912
|
-
}, { useToken:
|
|
3913
|
+
}, { useToken: Wa } = Pe;
|
|
3913
3914
|
at.extend(Ri);
|
|
3914
3915
|
at.extend(Vi);
|
|
3915
3916
|
const ut = {
|
|
@@ -3925,9 +3926,9 @@ const ut = {
|
|
|
3925
3926
|
}
|
|
3926
3927
|
}, yo = (t) => {
|
|
3927
3928
|
const { ooui: e, showTime: r = !1 } = t, { required: i } = e;
|
|
3928
|
-
return /* @__PURE__ */ n(ge, { required: i, ...t, children: /* @__PURE__ */ n(
|
|
3929
|
-
},
|
|
3930
|
-
const { value: e, onChange: r, ooui: i, showTime: o } = t, { id: s, readOnly: a, required: l } = i, { token: d } =
|
|
3929
|
+
return /* @__PURE__ */ n(ge, { required: i, ...t, children: /* @__PURE__ */ n(ja, { ooui: e, showTime: r }) });
|
|
3930
|
+
}, ja = (t) => {
|
|
3931
|
+
const { value: e, onChange: r, ooui: i, showTime: o } = t, { id: s, readOnly: a, required: l } = i, { token: d } = Wa(), u = l && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, c = o ? "time" : "date", f = (h) => {
|
|
3931
3932
|
r == null || r(h);
|
|
3932
3933
|
}, m = (h) => {
|
|
3933
3934
|
if (h === null) {
|
|
@@ -3950,11 +3951,11 @@ const ut = {
|
|
|
3950
3951
|
onChange: m
|
|
3951
3952
|
}
|
|
3952
3953
|
);
|
|
3953
|
-
},
|
|
3954
|
+
}, Ya = Mt.div`
|
|
3954
3955
|
display: flex;
|
|
3955
3956
|
align-items: center;
|
|
3956
3957
|
justify-content: center;
|
|
3957
|
-
`,
|
|
3958
|
+
`, Ga = ({
|
|
3958
3959
|
numberOfVisibleSelectedRows: t,
|
|
3959
3960
|
totalRecords: e,
|
|
3960
3961
|
numberOfTotalRows: r,
|
|
@@ -3983,8 +3984,8 @@ const ut = {
|
|
|
3983
3984
|
"{totalRecords}",
|
|
3984
3985
|
o.toString()
|
|
3985
3986
|
) + " " });
|
|
3986
|
-
return /* @__PURE__ */ n(
|
|
3987
|
-
},
|
|
3987
|
+
return /* @__PURE__ */ n(Ya, { children: o > r ? f : c });
|
|
3988
|
+
}, Ua = (t) => /* @__PURE__ */ n(
|
|
3988
3989
|
"div",
|
|
3989
3990
|
{
|
|
3990
3991
|
style: {
|
|
@@ -3994,12 +3995,12 @@ const ut = {
|
|
|
3994
3995
|
},
|
|
3995
3996
|
children: /* @__PURE__ */ n(Ht, { checked: t, disabled: !0 })
|
|
3996
3997
|
}
|
|
3997
|
-
),
|
|
3998
|
+
), qa = (t) => /* @__PURE__ */ n($a, { m2oField: t }), za = (t) => /* @__PURE__ */ n(
|
|
3998
3999
|
Jn,
|
|
3999
4000
|
{
|
|
4000
4001
|
content: t == null ? void 0 : t.toString().replace(/(?:\r\n|\r|\n)/g, "<br>")
|
|
4001
4002
|
}
|
|
4002
|
-
),
|
|
4003
|
+
), Ja = (t) => {
|
|
4003
4004
|
if (!t || t && t.length === 0)
|
|
4004
4005
|
return /* @__PURE__ */ n(Q, {});
|
|
4005
4006
|
const e = at(
|
|
@@ -4007,7 +4008,7 @@ const ut = {
|
|
|
4007
4008
|
ut.date.dateInternalFormat
|
|
4008
4009
|
).format(ut.date.dateDisplayFormat);
|
|
4009
4010
|
return /* @__PURE__ */ n(Q, { children: e });
|
|
4010
|
-
},
|
|
4011
|
+
}, Za = (t) => {
|
|
4011
4012
|
if (!t || t && t.length === 0)
|
|
4012
4013
|
return /* @__PURE__ */ n(Q, {});
|
|
4013
4014
|
const e = at(
|
|
@@ -4018,20 +4019,20 @@ const ut = {
|
|
|
4018
4019
|
}, Sr = (t) => {
|
|
4019
4020
|
const e = Array.isArray(t == null ? void 0 : t.items) ? t == null ? void 0 : t.items.length : 0;
|
|
4020
4021
|
return /* @__PURE__ */ n(Q, { children: `( ${e} )` });
|
|
4021
|
-
},
|
|
4022
|
+
}, Xa = (t) => /* @__PURE__ */ n(go, { value: t }), Qa = (t) => /* @__PURE__ */ n(Q, { children: po(t) }), Tr = (t) => /* @__PURE__ */ n("div", { style: { textAlign: "right" }, children: t }), el = (t) => /* @__PURE__ */ n(
|
|
4022
4023
|
"img",
|
|
4023
4024
|
{
|
|
4024
4025
|
src: `data:image/*;base64,${t}`,
|
|
4025
4026
|
style: { maxWidth: "50px", padding: "5px" }
|
|
4026
4027
|
}
|
|
4027
|
-
),
|
|
4028
|
-
|
|
4028
|
+
), tl = (t, e, r, i) => /* @__PURE__ */ n(lo, { ooui: r, value: t }), nl = (t, e, r, i) => /* @__PURE__ */ n(Q, { children: r.selectionValues.get(t) }), rl = (t, e, r, i) => /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ n(
|
|
4029
|
+
Ha,
|
|
4029
4030
|
{
|
|
4030
4031
|
value: t,
|
|
4031
4032
|
selectionValues: r.selectionValues,
|
|
4032
4033
|
context: i
|
|
4033
4034
|
}
|
|
4034
|
-
) }),
|
|
4035
|
+
) }), ol = (t, e, r, i) => /* @__PURE__ */ n(Ka, { ooui: r, value: t });
|
|
4035
4036
|
function pn(t) {
|
|
4036
4037
|
var G;
|
|
4037
4038
|
const {
|
|
@@ -4051,42 +4052,42 @@ function pn(t) {
|
|
|
4051
4052
|
onChangeSort: h,
|
|
4052
4053
|
sorter: p,
|
|
4053
4054
|
onFetchChildrenForRecord: y,
|
|
4054
|
-
childField:
|
|
4055
|
+
childField: v,
|
|
4055
4056
|
rootTree: T = !1,
|
|
4056
4057
|
context: I,
|
|
4057
4058
|
readonly: C,
|
|
4058
4059
|
onSelectAllRecords: O
|
|
4059
|
-
} = t, [_, A] = b([]), [x, S] = b([]), F = de(!1),
|
|
4060
|
+
} = t, [_, A] = b([]), [x, S] = b([]), F = de(!1), w = de(null), { t: E } = H(he), P = de(r), M = H(
|
|
4060
4061
|
rt
|
|
4061
4062
|
), { title: j = void 0, setTitle: N = void 0 } = (T ? M : {}) || {};
|
|
4062
4063
|
me(() => {
|
|
4063
|
-
|
|
4064
|
-
const k =
|
|
4065
|
-
|
|
4064
|
+
w.current = _t(o);
|
|
4065
|
+
const k = Os(
|
|
4066
|
+
w.current,
|
|
4066
4067
|
{
|
|
4067
|
-
boolean:
|
|
4068
|
-
many2one:
|
|
4069
|
-
text:
|
|
4068
|
+
boolean: Ua,
|
|
4069
|
+
many2one: qa,
|
|
4070
|
+
text: za,
|
|
4070
4071
|
one2many: Sr,
|
|
4071
4072
|
many2many: Sr,
|
|
4072
|
-
progressbar:
|
|
4073
|
-
float_time:
|
|
4074
|
-
image:
|
|
4073
|
+
progressbar: Xa,
|
|
4074
|
+
float_time: Qa,
|
|
4075
|
+
image: el,
|
|
4075
4076
|
integer: Tr,
|
|
4076
4077
|
float: Tr,
|
|
4077
|
-
reference:
|
|
4078
|
-
tag:
|
|
4079
|
-
selection:
|
|
4080
|
-
date:
|
|
4081
|
-
datetime:
|
|
4082
|
-
avatar:
|
|
4078
|
+
reference: rl,
|
|
4079
|
+
tag: tl,
|
|
4080
|
+
selection: nl,
|
|
4081
|
+
date: Ja,
|
|
4082
|
+
datetime: Za,
|
|
4083
|
+
avatar: ol
|
|
4083
4084
|
},
|
|
4084
4085
|
I
|
|
4085
4086
|
);
|
|
4086
|
-
S(k),
|
|
4087
|
+
S(k), w.current.string && j !== w.current.string && (N == null || N(w.current.string));
|
|
4087
4088
|
}, [o]), me(() => {
|
|
4088
4089
|
F.current = !1;
|
|
4089
|
-
const k = io(
|
|
4090
|
+
const k = io(w.current, s);
|
|
4090
4091
|
A(k), P.current = r;
|
|
4091
4092
|
}, [s]);
|
|
4092
4093
|
const B = (e - 1) * P.current + 1, K = B - 1 + _.length, R = i === void 0 ? null : i === 0 ? E("no_results") : E("summary").replace("{from}", B == null ? void 0 : B.toString()).replace("{to}", K == null ? void 0 : K.toString()).replace("{total}", i == null ? void 0 : i.toString()), U = () => {
|
|
@@ -4096,7 +4097,7 @@ function pn(t) {
|
|
|
4096
4097
|
const k = _ == null ? void 0 : _.filter(
|
|
4097
4098
|
(ee) => (c == null ? void 0 : c.selectedRowKeys) && (c == null ? void 0 : c.selectedRowKeys.includes(ee.id))
|
|
4098
4099
|
).length;
|
|
4099
|
-
return l ? null : i === void 0 ? /* @__PURE__ */ n(Ae, { className: "pb-4" }) : /* @__PURE__ */ V(
|
|
4100
|
+
return l ? null : i === void 0 ? /* @__PURE__ */ n(Ae, { className: "pb-4" }) : /* @__PURE__ */ V(we, { align: "bottom", className: "pb-4", children: [
|
|
4100
4101
|
/* @__PURE__ */ n(ae, { span: O ? 8 : 12, children: /* @__PURE__ */ n(
|
|
4101
4102
|
Zo,
|
|
4102
4103
|
{
|
|
@@ -4108,7 +4109,7 @@ function pn(t) {
|
|
|
4108
4109
|
}
|
|
4109
4110
|
) }),
|
|
4110
4111
|
O && /* @__PURE__ */ n(ae, { span: 8, className: "text-center", children: /* @__PURE__ */ n(
|
|
4111
|
-
|
|
4112
|
+
Ga,
|
|
4112
4113
|
{
|
|
4113
4114
|
numberOfVisibleSelectedRows: k,
|
|
4114
4115
|
numberOfRealSelectedRows: ((L = c == null ? void 0 : c.selectedRowKeys) == null ? void 0 : L.length) || 0,
|
|
@@ -4122,22 +4123,22 @@ function pn(t) {
|
|
|
4122
4123
|
};
|
|
4123
4124
|
function ne() {
|
|
4124
4125
|
var Fe;
|
|
4125
|
-
const L =
|
|
4126
|
+
const L = w.current.columns.filter((J) => J.sum !== void 0).map((J) => ({ label: J.sum, field: J.id }));
|
|
4126
4127
|
if (!L || L.length === 0)
|
|
4127
4128
|
return null;
|
|
4128
4129
|
const ee = [], le = ((Fe = c == null ? void 0 : c.selectedRowKeys) == null ? void 0 : Fe.length) > 0 ? _.filter((J) => c == null ? void 0 : c.selectedRowKeys.includes(J.id)) : _;
|
|
4129
4130
|
return L.forEach((J) => {
|
|
4130
|
-
const q = le.reduce((be,
|
|
4131
|
+
const q = le.reduce((be, ve) => ve[J.field] && !isNaN(ve[J.field]) ? be + ve[J.field] : be, 0);
|
|
4131
4132
|
ee.push(`${J.label}: ${Math.round(q * 100) / 100}`);
|
|
4132
4133
|
}), /* @__PURE__ */ n("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ee.join(", ") });
|
|
4133
4134
|
}
|
|
4134
4135
|
let X, Y = f;
|
|
4135
|
-
if (
|
|
4136
|
-
X =
|
|
4137
|
-
const L =
|
|
4136
|
+
if (w.current !== null) {
|
|
4137
|
+
X = Na(x, _, 600);
|
|
4138
|
+
const L = w.current;
|
|
4138
4139
|
f && L.columns.some((ee) => ee.sum !== void 0) && (Y = f - 30);
|
|
4139
4140
|
}
|
|
4140
|
-
return
|
|
4141
|
+
return w.current === null || !X || ((G = X.columns) == null ? void 0 : G.length) === 0 ? /* @__PURE__ */ n(Ae, { style: { padding: "2rem" } }) : /* @__PURE__ */ V("div", { children: [
|
|
4141
4142
|
U(),
|
|
4142
4143
|
/* @__PURE__ */ n(
|
|
4143
4144
|
Fi,
|
|
@@ -4151,7 +4152,7 @@ function pn(t) {
|
|
|
4151
4152
|
if (m[k.id])
|
|
4152
4153
|
return { color: m[k.id] };
|
|
4153
4154
|
},
|
|
4154
|
-
onRowStatus:
|
|
4155
|
+
onRowStatus: _s(g) ? (k) => {
|
|
4155
4156
|
if (g[k.id])
|
|
4156
4157
|
return /* @__PURE__ */ n(Jo, { color: g[k.id] });
|
|
4157
4158
|
} : void 0,
|
|
@@ -4166,14 +4167,14 @@ function pn(t) {
|
|
|
4166
4167
|
collapseIcon: ci,
|
|
4167
4168
|
loadingIcon: st,
|
|
4168
4169
|
onFetchChildrenForRecord: y,
|
|
4169
|
-
childField:
|
|
4170
|
+
childField: v
|
|
4170
4171
|
} : void 0
|
|
4171
4172
|
}
|
|
4172
4173
|
),
|
|
4173
4174
|
ne()
|
|
4174
4175
|
] });
|
|
4175
4176
|
}
|
|
4176
|
-
function
|
|
4177
|
+
function il(t, e) {
|
|
4177
4178
|
const {
|
|
4178
4179
|
model: r,
|
|
4179
4180
|
formView: i,
|
|
@@ -4186,7 +4187,7 @@ function ol(t, e) {
|
|
|
4186
4187
|
rootTree: c = !1,
|
|
4187
4188
|
parentContext: f = {},
|
|
4188
4189
|
onChangeSelectedRowKeys: m
|
|
4189
|
-
} = t, [g, h] = b(!1), [p, y] = b(!1),
|
|
4190
|
+
} = t, [g, h] = b(!1), [p, y] = b(!1), v = de(!1), [T, I] = b(), [C, O] = b(), [_, A] = b(), [x, S] = b(), [F, w] = b(200), E = de(), { height: P } = mn(), M = H(
|
|
4190
4191
|
Pt
|
|
4191
4192
|
), { processAction: j } = M || {}, N = H(
|
|
4192
4193
|
rt
|
|
@@ -4207,7 +4208,7 @@ function ol(t, e) {
|
|
|
4207
4208
|
setSearchTreeNameSearch: J = void 0,
|
|
4208
4209
|
setTreeIsLoading: q = void 0,
|
|
4209
4210
|
searchValues: be = {},
|
|
4210
|
-
setSearchValues:
|
|
4211
|
+
setSearchValues: ve = void 0,
|
|
4211
4212
|
limit: je = jt,
|
|
4212
4213
|
setLimit: ke = void 0
|
|
4213
4214
|
} = (c ? N : {}) || {}, {
|
|
@@ -4232,12 +4233,12 @@ function ol(t, e) {
|
|
|
4232
4233
|
setSearchTreeNameSearch: J,
|
|
4233
4234
|
setSelectedRowItems: pe,
|
|
4234
4235
|
setSearchParams: G,
|
|
4235
|
-
setSearchValues:
|
|
4236
|
+
setSearchValues: ve,
|
|
4236
4237
|
searchParams: Y,
|
|
4237
4238
|
setSearchVisible: L,
|
|
4238
4239
|
setTreeIsLoading: q,
|
|
4239
4240
|
nameSearch: a,
|
|
4240
|
-
searchNameGetDoneRef:
|
|
4241
|
+
searchNameGetDoneRef: v,
|
|
4241
4242
|
context: f,
|
|
4242
4243
|
formView: _,
|
|
4243
4244
|
treeView: C,
|
|
@@ -4254,12 +4255,12 @@ function ol(t, e) {
|
|
|
4254
4255
|
});
|
|
4255
4256
|
bt(e, () => ({
|
|
4256
4257
|
refreshResults: () => {
|
|
4257
|
-
|
|
4258
|
+
v.current = !1, Ce();
|
|
4258
4259
|
},
|
|
4259
4260
|
getFields: () => C == null ? void 0 : C.fields,
|
|
4260
4261
|
getDomain: () => d
|
|
4261
4262
|
})), me(() => {
|
|
4262
|
-
p && u && C && (
|
|
4263
|
+
p && u && C && (v.current = !1, Ce());
|
|
4263
4264
|
}, [Me, He, p, u, a, C]);
|
|
4264
4265
|
const ot = async () => {
|
|
4265
4266
|
y(!1), h(!0), S(void 0), q == null || q(!0);
|
|
@@ -4349,7 +4350,7 @@ function ol(t, e) {
|
|
|
4349
4350
|
isSearching: Ee,
|
|
4350
4351
|
onSubmit: Le,
|
|
4351
4352
|
onLimitChange: z,
|
|
4352
|
-
setSearchFilterHeight:
|
|
4353
|
+
setSearchFilterHeight: w,
|
|
4353
4354
|
searchError: ye,
|
|
4354
4355
|
searchVisible: k,
|
|
4355
4356
|
searchValues: be
|
|
@@ -4385,7 +4386,7 @@ function ol(t, e) {
|
|
|
4385
4386
|
] }), qe = x || ye;
|
|
4386
4387
|
return qe ? /* @__PURE__ */ n(et, { className: "mt-10", message: qe, type: "error", banner: !0 }) : /* @__PURE__ */ n("div", { style: u ? {} : { display: "none" }, children: g ? /* @__PURE__ */ n(Ae, {}) : tt() });
|
|
4387
4388
|
}
|
|
4388
|
-
const
|
|
4389
|
+
const vo = wt(il), wo = (t) => {
|
|
4389
4390
|
const {
|
|
4390
4391
|
visible: e,
|
|
4391
4392
|
onCloseModal: r,
|
|
@@ -4400,7 +4401,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4400
4401
|
const { id: C } = I;
|
|
4401
4402
|
i([C]);
|
|
4402
4403
|
};
|
|
4403
|
-
function
|
|
4404
|
+
function v() {
|
|
4404
4405
|
if (g.length === 0) {
|
|
4405
4406
|
p();
|
|
4406
4407
|
return;
|
|
@@ -4409,7 +4410,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4409
4410
|
}
|
|
4410
4411
|
const T = () => /* @__PURE__ */ V(Q, { children: [
|
|
4411
4412
|
/* @__PURE__ */ n(
|
|
4412
|
-
|
|
4413
|
+
vo,
|
|
4413
4414
|
{
|
|
4414
4415
|
model: o,
|
|
4415
4416
|
nameSearch: s,
|
|
@@ -4423,7 +4424,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4423
4424
|
}
|
|
4424
4425
|
),
|
|
4425
4426
|
/* @__PURE__ */ n(cn, {}),
|
|
4426
|
-
/* @__PURE__ */ n(
|
|
4427
|
+
/* @__PURE__ */ n(we, { justify: "end", children: /* @__PURE__ */ V(We, { children: [
|
|
4427
4428
|
/* @__PURE__ */ n(
|
|
4428
4429
|
Oe,
|
|
4429
4430
|
{
|
|
@@ -4439,7 +4440,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4439
4440
|
{
|
|
4440
4441
|
icon: /* @__PURE__ */ n(Et, {}),
|
|
4441
4442
|
onClick: () => {
|
|
4442
|
-
|
|
4443
|
+
v();
|
|
4443
4444
|
},
|
|
4444
4445
|
type: "primary",
|
|
4445
4446
|
children: m("ok")
|
|
@@ -4479,14 +4480,14 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4479
4480
|
}
|
|
4480
4481
|
)
|
|
4481
4482
|
] });
|
|
4482
|
-
}, { error:
|
|
4483
|
-
|
|
4483
|
+
}, { error: sl } = Je, on = (t) => {
|
|
4484
|
+
sl({
|
|
4484
4485
|
title: "Error",
|
|
4485
4486
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
4486
4487
|
centered: !0,
|
|
4487
4488
|
content: t
|
|
4488
4489
|
});
|
|
4489
|
-
}, { defaultAlgorithm:
|
|
4490
|
+
}, { defaultAlgorithm: al, defaultSeed: ll } = Pe, bo = al(ll), cl = (t) => {
|
|
4490
4491
|
const { ooui: e } = t, { required: r } = e;
|
|
4491
4492
|
return /* @__PURE__ */ n(ge, { required: r, type: "array", validator: async (o, s) => {
|
|
4492
4493
|
if (!s)
|
|
@@ -4504,7 +4505,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4504
4505
|
context: l,
|
|
4505
4506
|
id: d,
|
|
4506
4507
|
domain: u
|
|
4507
|
-
} = i, c = o && !a ? { backgroundColor: bo.colorPrimaryBg } : void 0, [f, m] = b(!1), [g, h] = b(!1), [p, y] = b(!1), [
|
|
4508
|
+
} = i, c = o && !a ? { backgroundColor: bo.colorPrimaryBg } : void 0, [f, m] = b(!1), [g, h] = b(!1), [p, y] = b(!1), [v, T] = b(), I = de(!1), [C, O] = b(""), _ = de(), A = H(Ne), { domain: x, getValues: S, getFields: F, getContext: w, elementHasLostFocus: E } = A || {}, P = de([]), [M, j] = b([]), N = e && e[0] || void 0, B = e && e[1] || "";
|
|
4508
4509
|
me(() => {
|
|
4509
4510
|
!Array.isArray(e) && e && X(e);
|
|
4510
4511
|
}, [e]), me(() => {
|
|
@@ -4528,7 +4529,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4528
4529
|
const L = await D.getHandler().nameSearch({
|
|
4529
4530
|
model: s,
|
|
4530
4531
|
payload: _.current,
|
|
4531
|
-
context: { ...
|
|
4532
|
+
context: { ...w == null ? void 0 : w(), ...l }
|
|
4532
4533
|
});
|
|
4533
4534
|
L.length === 1 ? (_.current = void 0, K(L[0])) : ne(_.current);
|
|
4534
4535
|
}
|
|
@@ -4543,7 +4544,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4543
4544
|
const ee = await D.getHandler().searchAllIds({
|
|
4544
4545
|
params: P.current,
|
|
4545
4546
|
model: s,
|
|
4546
|
-
context: { ...
|
|
4547
|
+
context: { ...w == null ? void 0 : w(), ...l },
|
|
4547
4548
|
totalItems: 2
|
|
4548
4549
|
});
|
|
4549
4550
|
ee.length === 1 ? X(ee[0]) : (T(L), m(!0));
|
|
@@ -4557,7 +4558,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4557
4558
|
action: "name_get",
|
|
4558
4559
|
payload: [L],
|
|
4559
4560
|
model: s,
|
|
4560
|
-
context: { ...
|
|
4561
|
+
context: { ...w == null ? void 0 : w(), ...l }
|
|
4561
4562
|
});
|
|
4562
4563
|
K([L, ee[0][1]]);
|
|
4563
4564
|
} catch (ee) {
|
|
@@ -4574,7 +4575,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4574
4575
|
values: S()
|
|
4575
4576
|
}),
|
|
4576
4577
|
fields: F(),
|
|
4577
|
-
context:
|
|
4578
|
+
context: w()
|
|
4578
4579
|
})), x && x.length > 0 && (P.current = P.current.concat(
|
|
4579
4580
|
Nr({
|
|
4580
4581
|
domain: x,
|
|
@@ -4585,9 +4586,9 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4585
4586
|
async function G(L) {
|
|
4586
4587
|
L.keyCode === 13 ? (L.preventDefault(), L.stopPropagation(), await U()) : L.code === "Backspace" && N !== void 0 && (L.preventDefault(), L.stopPropagation(), K([void 0, ""]));
|
|
4587
4588
|
}
|
|
4588
|
-
return /* @__PURE__ */ V(
|
|
4589
|
+
return /* @__PURE__ */ V(we, { gutter: 8, wrap: !1, children: [
|
|
4589
4590
|
/* @__PURE__ */ n(ae, { flex: "auto", children: /* @__PURE__ */ n(
|
|
4590
|
-
o && !a ?
|
|
4591
|
+
o && !a ? dl : it,
|
|
4591
4592
|
{
|
|
4592
4593
|
type: "text",
|
|
4593
4594
|
value: C,
|
|
@@ -4601,7 +4602,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4601
4602
|
{
|
|
4602
4603
|
id: N,
|
|
4603
4604
|
model: s,
|
|
4604
|
-
context: { ...
|
|
4605
|
+
context: { ...w == null ? void 0 : w(), ...l }
|
|
4605
4606
|
}
|
|
4606
4607
|
)
|
|
4607
4608
|
}
|
|
@@ -4631,13 +4632,13 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4631
4632
|
}
|
|
4632
4633
|
) }),
|
|
4633
4634
|
/* @__PURE__ */ n(
|
|
4634
|
-
|
|
4635
|
+
wo,
|
|
4635
4636
|
{
|
|
4636
4637
|
model: s,
|
|
4637
4638
|
domain: M,
|
|
4638
|
-
context: { ...
|
|
4639
|
+
context: { ...w == null ? void 0 : w(), ...l },
|
|
4639
4640
|
visible: f,
|
|
4640
|
-
nameSearch: N ? void 0 :
|
|
4641
|
+
nameSearch: N ? void 0 : v,
|
|
4641
4642
|
onSelectValues: (L) => {
|
|
4642
4643
|
m(!1), X(L[0]), I.current = !1, _.current = void 0;
|
|
4643
4644
|
},
|
|
@@ -4650,7 +4651,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4650
4651
|
Zt,
|
|
4651
4652
|
{
|
|
4652
4653
|
model: s,
|
|
4653
|
-
parentContext: { ...
|
|
4654
|
+
parentContext: { ...w == null ? void 0 : w(), ...l },
|
|
4654
4655
|
id: e && e[0],
|
|
4655
4656
|
visible: g,
|
|
4656
4657
|
onSubmitSucceed: (L) => {
|
|
@@ -4664,13 +4665,13 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4664
4665
|
}
|
|
4665
4666
|
)
|
|
4666
4667
|
] });
|
|
4667
|
-
},
|
|
4668
|
+
}, dl = Mt(it)`
|
|
4668
4669
|
.ant-input {
|
|
4669
4670
|
background-color: ${bo.colorPrimaryBg};
|
|
4670
4671
|
}
|
|
4671
4672
|
`, xo = Qe.createContext(
|
|
4672
4673
|
null
|
|
4673
|
-
),
|
|
4674
|
+
), ul = ({
|
|
4674
4675
|
children: t,
|
|
4675
4676
|
initialView: e
|
|
4676
4677
|
}) => {
|
|
@@ -4689,7 +4690,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4689
4690
|
children: t
|
|
4690
4691
|
}
|
|
4691
4692
|
);
|
|
4692
|
-
}, { getValueForOperator: Fr } = Pr, sn = 0.7, an = 30,
|
|
4693
|
+
}, { getValueForOperator: Fr } = Pr, sn = 0.7, an = 30, fl = (t) => {
|
|
4693
4694
|
const {
|
|
4694
4695
|
model: e,
|
|
4695
4696
|
domain: r,
|
|
@@ -4702,7 +4703,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4702
4703
|
field: u,
|
|
4703
4704
|
operator: c,
|
|
4704
4705
|
manualIds: f
|
|
4705
|
-
} = t, [m, g] = b(!1), [h, p] = b(), [y,
|
|
4706
|
+
} = t, [m, g] = b(!1), [h, p] = b(), [y, v] = b(), [T, I] = b(), [C, O] = b(0), [_, A] = b(0), [x, S] = b(), [F, w] = b(), [E, P] = b();
|
|
4706
4707
|
me(() => {
|
|
4707
4708
|
N();
|
|
4708
4709
|
}, [e, o]);
|
|
@@ -4773,7 +4774,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4773
4774
|
isTotal: !0
|
|
4774
4775
|
}), I(B);
|
|
4775
4776
|
}
|
|
4776
|
-
if (B ? (K = Math.round(R / B * 100 * 100) / 100,
|
|
4777
|
+
if (B ? (K = Math.round(R / B * 100 * 100) / 100, v(K)) : v(0), o) {
|
|
4777
4778
|
const U = await D.getHandler().parseCondition({
|
|
4778
4779
|
condition: o,
|
|
4779
4780
|
values: { value: R, percent: K },
|
|
@@ -4790,9 +4791,9 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4790
4791
|
context: i
|
|
4791
4792
|
}
|
|
4792
4793
|
);
|
|
4793
|
-
|
|
4794
|
+
w(U);
|
|
4794
4795
|
} else
|
|
4795
|
-
|
|
4796
|
+
w(l);
|
|
4796
4797
|
} catch (R) {
|
|
4797
4798
|
P(JSON.stringify(R));
|
|
4798
4799
|
}
|
|
@@ -4807,7 +4808,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4807
4808
|
O((K = B.bounds) == null ? void 0 : K.height), A((R = B.bounds) == null ? void 0 : R.width);
|
|
4808
4809
|
},
|
|
4809
4810
|
children: ({ measureRef: B }) => a ? /* @__PURE__ */ n(
|
|
4810
|
-
|
|
4811
|
+
hl,
|
|
4811
4812
|
{
|
|
4812
4813
|
value: h,
|
|
4813
4814
|
total: T,
|
|
@@ -4820,7 +4821,7 @@ const wo = vt(ol), vo = (t) => {
|
|
|
4820
4821
|
suffix: d
|
|
4821
4822
|
}
|
|
4822
4823
|
) : /* @__PURE__ */ n(
|
|
4823
|
-
|
|
4824
|
+
ml,
|
|
4824
4825
|
{
|
|
4825
4826
|
value: h,
|
|
4826
4827
|
total: T,
|
|
@@ -4839,7 +4840,7 @@ function So(t, e) {
|
|
|
4839
4840
|
const i = document.createElement("canvas").getContext("2d");
|
|
4840
4841
|
return i.font = e || getComputedStyle(document.body).font, i.measureText(t).width;
|
|
4841
4842
|
}
|
|
4842
|
-
function
|
|
4843
|
+
function ml({
|
|
4843
4844
|
measureRef: t,
|
|
4844
4845
|
width: e,
|
|
4845
4846
|
height: r,
|
|
@@ -4880,7 +4881,7 @@ function fl({
|
|
|
4880
4881
|
}
|
|
4881
4882
|
);
|
|
4882
4883
|
}
|
|
4883
|
-
function
|
|
4884
|
+
function hl({
|
|
4884
4885
|
measureRef: t,
|
|
4885
4886
|
height: e,
|
|
4886
4887
|
width: r,
|
|
@@ -4923,7 +4924,7 @@ function ml({
|
|
|
4923
4924
|
flexDirection: "column",
|
|
4924
4925
|
padding: "0.2rem"
|
|
4925
4926
|
},
|
|
4926
|
-
children: /* @__PURE__ */ V(
|
|
4927
|
+
children: /* @__PURE__ */ V(we, { align: "middle", children: [
|
|
4927
4928
|
p && /* @__PURE__ */ n(ae, { style: { fontSize: c * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ n(p, {}) }),
|
|
4928
4929
|
/* @__PURE__ */ V(ae, { children: [
|
|
4929
4930
|
/* @__PURE__ */ n(An, { style: { fontSize: c * 0.8, margin: 0, color: a }, children: p ? ` ${i}%` : `${i}%` }),
|
|
@@ -4950,22 +4951,22 @@ const Fn = (t) => (e) => {
|
|
|
4950
4951
|
});
|
|
4951
4952
|
return { name: t === "pie" ? e.x : e.type, value: r };
|
|
4952
4953
|
}, Qt = (t) => {
|
|
4953
|
-
if (typeof t == "string" &&
|
|
4954
|
+
if (typeof t == "string" && pl(t))
|
|
4954
4955
|
return parseFloat(t).toLocaleString("es-ES", {
|
|
4955
4956
|
useGrouping: !0
|
|
4956
4957
|
});
|
|
4957
|
-
if (
|
|
4958
|
+
if (gl(t))
|
|
4958
4959
|
return t.toLocaleString("es-ES", {
|
|
4959
4960
|
useGrouping: !0
|
|
4960
4961
|
});
|
|
4961
|
-
if (
|
|
4962
|
-
const e =
|
|
4962
|
+
if (yl(t)) {
|
|
4963
|
+
const e = vl(t);
|
|
4963
4964
|
return e === null ? t : at(t, ln.input[e]).format(
|
|
4964
4965
|
ln.output[e]
|
|
4965
4966
|
);
|
|
4966
4967
|
} else
|
|
4967
4968
|
return t;
|
|
4968
|
-
},
|
|
4969
|
+
}, pl = (t) => /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/.test(t), gl = (t) => typeof t == "number" && !isNaN(t), Ir = {
|
|
4969
4970
|
default: {
|
|
4970
4971
|
padding: "auto",
|
|
4971
4972
|
xAxis: {
|
|
@@ -5047,7 +5048,7 @@ const Fn = (t) => (e) => {
|
|
|
5047
5048
|
}
|
|
5048
5049
|
}
|
|
5049
5050
|
};
|
|
5050
|
-
function
|
|
5051
|
+
function yl(t) {
|
|
5051
5052
|
return typeof t != "string" || t === void 0 ? !1 : new Date(t).toString() !== "Invalid Date";
|
|
5052
5053
|
}
|
|
5053
5054
|
const ln = {
|
|
@@ -5066,7 +5067,7 @@ const ln = {
|
|
|
5066
5067
|
years: "YYYY"
|
|
5067
5068
|
}
|
|
5068
5069
|
};
|
|
5069
|
-
function
|
|
5070
|
+
function vl(t) {
|
|
5070
5071
|
for (const e in ln.input)
|
|
5071
5072
|
if (at(
|
|
5072
5073
|
t,
|
|
@@ -5076,7 +5077,7 @@ function yl(t) {
|
|
|
5076
5077
|
return e;
|
|
5077
5078
|
return null;
|
|
5078
5079
|
}
|
|
5079
|
-
const { processGraphData: wl } = Pr, { getFieldsToRetrieve:
|
|
5080
|
+
const { processGraphData: wl } = Pr, { getFieldsToRetrieve: bl } = ii, Cl = (t) => {
|
|
5080
5081
|
const {
|
|
5081
5082
|
model: e,
|
|
5082
5083
|
domain: r = [],
|
|
@@ -5085,16 +5086,16 @@ const { processGraphData: wl } = Pr, { getFieldsToRetrieve: vl } = ii, bl = (t)
|
|
|
5085
5086
|
limit: s,
|
|
5086
5087
|
uninformedString: a,
|
|
5087
5088
|
manualIds: l
|
|
5088
|
-
} = t, [d, u] = b(!1), [c, f] = b(), [m, g] = b(), [h, p] = b(), [y,
|
|
5089
|
+
} = t, [d, u] = b(!1), [c, f] = b(), [m, g] = b(), [h, p] = b(), [y, v] = b("line");
|
|
5089
5090
|
return xt(() => {
|
|
5090
5091
|
(async () => {
|
|
5091
5092
|
u(!0), f(void 0);
|
|
5092
5093
|
const T = $n(o);
|
|
5093
|
-
|
|
5094
|
-
const I =
|
|
5094
|
+
v(T.type || "line");
|
|
5095
|
+
const I = bl({ ooui: T });
|
|
5095
5096
|
let C, O;
|
|
5096
5097
|
try {
|
|
5097
|
-
({ values: C, fields: O } = await
|
|
5098
|
+
({ values: C, fields: O } = await Sl({
|
|
5098
5099
|
model: e,
|
|
5099
5100
|
domain: r,
|
|
5100
5101
|
context: i,
|
|
@@ -5136,7 +5137,7 @@ const { processGraphData: wl } = Pr, { getFieldsToRetrieve: vl } = ii, bl = (t)
|
|
|
5136
5137
|
evaluatedEntries: h
|
|
5137
5138
|
};
|
|
5138
5139
|
};
|
|
5139
|
-
async function
|
|
5140
|
+
async function xl({
|
|
5140
5141
|
model: t,
|
|
5141
5142
|
context: e,
|
|
5142
5143
|
fields: r
|
|
@@ -5147,7 +5148,7 @@ async function Cl({
|
|
|
5147
5148
|
fields: r
|
|
5148
5149
|
});
|
|
5149
5150
|
}
|
|
5150
|
-
async function
|
|
5151
|
+
async function Sl({
|
|
5151
5152
|
fields: t,
|
|
5152
5153
|
model: e,
|
|
5153
5154
|
domain: r,
|
|
@@ -5156,7 +5157,7 @@ async function xl({
|
|
|
5156
5157
|
limit: s,
|
|
5157
5158
|
manualIds: a
|
|
5158
5159
|
}) {
|
|
5159
|
-
const l = await
|
|
5160
|
+
const l = await xl({ model: e, context: i, fields: t });
|
|
5160
5161
|
if (a) {
|
|
5161
5162
|
let u = await D.getHandler().readObjects({
|
|
5162
5163
|
model: e,
|
|
@@ -5173,7 +5174,7 @@ async function xl({
|
|
|
5173
5174
|
values: await D.getHandler().search({
|
|
5174
5175
|
model: e,
|
|
5175
5176
|
params: r,
|
|
5176
|
-
|
|
5177
|
+
fieldsToRetrieve: t,
|
|
5177
5178
|
context: i,
|
|
5178
5179
|
limit: s,
|
|
5179
5180
|
order: o
|
|
@@ -5181,13 +5182,13 @@ async function xl({
|
|
|
5181
5182
|
fields: l
|
|
5182
5183
|
};
|
|
5183
5184
|
}
|
|
5184
|
-
const
|
|
5185
|
+
const Tl = {
|
|
5185
5186
|
line: xi,
|
|
5186
5187
|
bar: Si,
|
|
5187
5188
|
pie: Ti
|
|
5188
|
-
},
|
|
5189
|
-
var
|
|
5190
|
-
const { model: e, domain: r, context: i, xml: o, limit: s, manualIds: a } = t, { t: l } = H(he), { error: d, loading: u, values: c, type: f, evaluatedEntries: m } =
|
|
5189
|
+
}, Fl = (t) => {
|
|
5190
|
+
var v;
|
|
5191
|
+
const { model: e, domain: r, context: i, xml: o, limit: s, manualIds: a } = t, { t: l } = H(he), { error: d, loading: u, values: c, type: f, evaluatedEntries: m } = Cl({
|
|
5191
5192
|
model: e,
|
|
5192
5193
|
xml: o,
|
|
5193
5194
|
limit: s,
|
|
@@ -5202,9 +5203,9 @@ const Sl = {
|
|
|
5202
5203
|
return /* @__PURE__ */ n(Ae, {});
|
|
5203
5204
|
if (!c)
|
|
5204
5205
|
return /* @__PURE__ */ n(et, { message: "No data to display", type: "info" });
|
|
5205
|
-
const { data: g, isGroup: h, isStack: p } = c, y =
|
|
5206
|
+
const { data: g, isGroup: h, isStack: p } = c, y = Tl[f];
|
|
5206
5207
|
return y ? /* @__PURE__ */ V("div", { style: { padding: "1rem" }, children: [
|
|
5207
|
-
/* @__PURE__ */ n("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(
|
|
5208
|
+
/* @__PURE__ */ n("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(v = m == null ? void 0 : m.length) == null ? void 0 : v.toLocaleString(
|
|
5208
5209
|
"es-ES",
|
|
5209
5210
|
{
|
|
5210
5211
|
useGrouping: !0
|
|
@@ -5213,7 +5214,7 @@ const Sl = {
|
|
|
5213
5214
|
/* @__PURE__ */ n(
|
|
5214
5215
|
y,
|
|
5215
5216
|
{
|
|
5216
|
-
...
|
|
5217
|
+
...Il({
|
|
5217
5218
|
type: f,
|
|
5218
5219
|
data: g,
|
|
5219
5220
|
isGroup: h,
|
|
@@ -5223,12 +5224,12 @@ const Sl = {
|
|
|
5223
5224
|
)
|
|
5224
5225
|
] }) : /* @__PURE__ */ n(Q, { children: `Unknown graph type: ${f}` });
|
|
5225
5226
|
};
|
|
5226
|
-
function
|
|
5227
|
+
function Il(t) {
|
|
5227
5228
|
const { type: e, data: r, isGroup: i, isStack: o } = t;
|
|
5228
5229
|
let s = Ir[e];
|
|
5229
5230
|
return s || (s = Ir.default), s.data = r, e === "pie" ? (s.colorField = "x", s.angleField = "value") : (s.xField = "x", s.yField = "value", s.seriesField = "type", s.isGroup = i, o && (s.isStack = !0, s.groupField = "stacked")), s;
|
|
5230
5231
|
}
|
|
5231
|
-
const
|
|
5232
|
+
const Ol = (t, e) => {
|
|
5232
5233
|
const { view_id: r, model: i, context: o, domain: s, limit: a, manualIds: l } = t, [d, u] = b(!1), [c, f] = b(), [m, g] = b(), h = H(
|
|
5233
5234
|
rt
|
|
5234
5235
|
), { setGraphIsLoading: p = void 0 } = h || {};
|
|
@@ -5242,17 +5243,17 @@ const Il = (t, e) => {
|
|
|
5242
5243
|
async function y() {
|
|
5243
5244
|
u(!0), p == null || p(!0);
|
|
5244
5245
|
try {
|
|
5245
|
-
const
|
|
5246
|
+
const v = await D.getHandler().getView({
|
|
5246
5247
|
model: i,
|
|
5247
5248
|
id: r,
|
|
5248
5249
|
type: "graph",
|
|
5249
5250
|
context: o
|
|
5250
5251
|
});
|
|
5251
|
-
g(
|
|
5252
|
-
const T = $n(
|
|
5252
|
+
g(v.arch);
|
|
5253
|
+
const T = $n(v.arch);
|
|
5253
5254
|
f(T);
|
|
5254
|
-
} catch (
|
|
5255
|
-
return console.error(
|
|
5255
|
+
} catch (v) {
|
|
5256
|
+
return console.error(v), /* @__PURE__ */ n(Q, { children: JSON.stringify(v) });
|
|
5256
5257
|
}
|
|
5257
5258
|
u(!1), p == null || p(!1);
|
|
5258
5259
|
}
|
|
@@ -5276,21 +5277,21 @@ const Il = (t, e) => {
|
|
|
5276
5277
|
switch (c.type) {
|
|
5277
5278
|
case "indicatorField":
|
|
5278
5279
|
case "indicator": {
|
|
5279
|
-
const
|
|
5280
|
-
field:
|
|
5281
|
-
operator:
|
|
5280
|
+
const v = c, T = v.type === "indicatorField" ? {
|
|
5281
|
+
field: v.field,
|
|
5282
|
+
operator: v.operator
|
|
5282
5283
|
} : {};
|
|
5283
5284
|
return /* @__PURE__ */ n(
|
|
5284
|
-
|
|
5285
|
+
fl,
|
|
5285
5286
|
{
|
|
5286
|
-
showPercent:
|
|
5287
|
-
totalDomain:
|
|
5288
|
-
colorCondition:
|
|
5287
|
+
showPercent: v.showPercent,
|
|
5288
|
+
totalDomain: v.totalDomain,
|
|
5289
|
+
colorCondition: v.color,
|
|
5289
5290
|
model: i,
|
|
5290
5291
|
context: o,
|
|
5291
5292
|
domain: s,
|
|
5292
|
-
icon:
|
|
5293
|
-
suffix:
|
|
5293
|
+
icon: v.icon,
|
|
5294
|
+
suffix: v.suffix,
|
|
5294
5295
|
manualIds: l,
|
|
5295
5296
|
...T
|
|
5296
5297
|
}
|
|
@@ -5300,7 +5301,7 @@ const Il = (t, e) => {
|
|
|
5300
5301
|
case "bar":
|
|
5301
5302
|
case "pie":
|
|
5302
5303
|
return /* @__PURE__ */ n(
|
|
5303
|
-
|
|
5304
|
+
Fl,
|
|
5304
5305
|
{
|
|
5305
5306
|
model: i,
|
|
5306
5307
|
context: o,
|
|
@@ -5313,8 +5314,8 @@ const Il = (t, e) => {
|
|
|
5313
5314
|
default:
|
|
5314
5315
|
return /* @__PURE__ */ n(Q, { children: `Graph ${c.type} not implemented` });
|
|
5315
5316
|
}
|
|
5316
|
-
}, gn =
|
|
5317
|
-
|
|
5317
|
+
}, gn = wt(Ol), { confirm: _l } = Je, Rl = ({ onOk: t, lang: e }) => {
|
|
5318
|
+
_l({
|
|
5318
5319
|
title: Ie("removeItems", e),
|
|
5319
5320
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
5320
5321
|
centered: !0,
|
|
@@ -5323,8 +5324,8 @@ const Il = (t, e) => {
|
|
|
5323
5324
|
onOk: t,
|
|
5324
5325
|
cancelText: Ie("cancel", e)
|
|
5325
5326
|
});
|
|
5326
|
-
}, { confirm:
|
|
5327
|
-
|
|
5327
|
+
}, { confirm: Vl } = Je, Al = ({ onOk: t, lang: e }) => {
|
|
5328
|
+
Vl({
|
|
5328
5329
|
title: Ie("unlinkItems", e),
|
|
5329
5330
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
5330
5331
|
centered: !0,
|
|
@@ -5333,7 +5334,7 @@ const Il = (t, e) => {
|
|
|
5333
5334
|
onOk: t,
|
|
5334
5335
|
cancelText: Ie("cancel", e)
|
|
5335
5336
|
});
|
|
5336
|
-
}, { useToken:
|
|
5337
|
+
}, { useToken: Dl } = Pe, kl = (t) => {
|
|
5337
5338
|
const {
|
|
5338
5339
|
title: e,
|
|
5339
5340
|
readOnly: r,
|
|
@@ -5350,8 +5351,8 @@ const Il = (t, e) => {
|
|
|
5350
5351
|
selectedRowKeys: g,
|
|
5351
5352
|
showCreateButton: h,
|
|
5352
5353
|
showToggleButton: p
|
|
5353
|
-
} = t, { token: y } =
|
|
5354
|
-
function
|
|
5354
|
+
} = t, { token: y } = Dl();
|
|
5355
|
+
function v() {
|
|
5355
5356
|
return /* @__PURE__ */ n("div", { className: "inline-block w-3" });
|
|
5356
5357
|
}
|
|
5357
5358
|
function T() {
|
|
@@ -5390,7 +5391,7 @@ const Il = (t, e) => {
|
|
|
5390
5391
|
}
|
|
5391
5392
|
function O() {
|
|
5392
5393
|
return /* @__PURE__ */ V(Q, { children: [
|
|
5393
|
-
|
|
5394
|
+
v(),
|
|
5394
5395
|
/* @__PURE__ */ n(
|
|
5395
5396
|
Xe,
|
|
5396
5397
|
{
|
|
@@ -5431,10 +5432,10 @@ const Il = (t, e) => {
|
|
|
5431
5432
|
onClick: m
|
|
5432
5433
|
}
|
|
5433
5434
|
),
|
|
5434
|
-
s !== "graph" &&
|
|
5435
|
+
s !== "graph" && v(),
|
|
5435
5436
|
s !== "graph" && I(),
|
|
5436
5437
|
s === "form" && O(),
|
|
5437
|
-
|
|
5438
|
+
v(),
|
|
5438
5439
|
p && /* @__PURE__ */ n(
|
|
5439
5440
|
Xe,
|
|
5440
5441
|
{
|
|
@@ -5445,23 +5446,23 @@ const Il = (t, e) => {
|
|
|
5445
5446
|
)
|
|
5446
5447
|
] })
|
|
5447
5448
|
] });
|
|
5448
|
-
},
|
|
5449
|
+
}, El = {
|
|
5449
5450
|
form: Mr,
|
|
5450
5451
|
tree: kr,
|
|
5451
5452
|
graph: gn
|
|
5452
5453
|
};
|
|
5453
|
-
function
|
|
5454
|
+
function Ml(t) {
|
|
5454
5455
|
const e = t.map((i) => i.id);
|
|
5455
5456
|
return t.filter((i, o) => {
|
|
5456
5457
|
const { id: s } = i;
|
|
5457
5458
|
return !e.includes(s, o + 1);
|
|
5458
5459
|
});
|
|
5459
5460
|
}
|
|
5460
|
-
const
|
|
5461
|
+
const Nl = (t) => {
|
|
5461
5462
|
var Ke;
|
|
5462
5463
|
const { value: e, onChange: r, ooui: i, views: o } = t, { items: s = [] } = e || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = H(
|
|
5463
5464
|
xo
|
|
5464
|
-
), c = H(Ne), { activeId: f, getFields: m, getValues: g, getContext: h, domain: p } = c || {}, { lang: y, t:
|
|
5465
|
+
), c = H(Ne), { activeId: f, getFields: m, getValues: g, getContext: h, domain: p } = c || {}, { lang: y, t: v } = H(he), [T, I] = b(!1), [C, O] = b(!1), [_, A] = b(), [x, S] = b(!1), [F, w] = b(!1), [E, P] = b(), [M, j] = b([]), [N, B] = b(!1), K = de([]), [R, U] = b(), ne = de(), [X, Y] = b(void 0), {
|
|
5465
5466
|
readOnly: G,
|
|
5466
5467
|
relation: k,
|
|
5467
5468
|
context: L,
|
|
@@ -5482,11 +5483,11 @@ const Ml = (t) => {
|
|
|
5482
5483
|
me(() => {
|
|
5483
5484
|
Le();
|
|
5484
5485
|
}, [p]);
|
|
5485
|
-
const
|
|
5486
|
+
const ve = (z) => {
|
|
5486
5487
|
var se, Se;
|
|
5487
5488
|
r == null || r({
|
|
5488
5489
|
fields: ((se = o.get("form")) == null ? void 0 : se.fields) || ((Se = o.get("tree")) == null ? void 0 : Se.fields),
|
|
5489
|
-
items:
|
|
5490
|
+
items: Ml(z)
|
|
5490
5491
|
});
|
|
5491
5492
|
}, je = async () => {
|
|
5492
5493
|
await ke(), d > J.length - 1 && d !== 0 && u(0);
|
|
@@ -5507,7 +5508,7 @@ const Ml = (t) => {
|
|
|
5507
5508
|
context: { ...h == null ? void 0 : h(), ...L },
|
|
5508
5509
|
currentView: z || a
|
|
5509
5510
|
});
|
|
5510
|
-
return ne.current || (ne.current = Te.map((tt) => tt.id)), (a || z) === "tree" && _e && Y(_e),
|
|
5511
|
+
return ne.current || (ne.current = Te.map((tt) => tt.id)), (a || z) === "tree" && _e && Y(_e), ve(Te), Te;
|
|
5511
5512
|
} catch (Te) {
|
|
5512
5513
|
A(Te);
|
|
5513
5514
|
} finally {
|
|
@@ -5561,7 +5562,7 @@ const Ml = (t) => {
|
|
|
5561
5562
|
values: se,
|
|
5562
5563
|
treeValues: Se
|
|
5563
5564
|
} : Te);
|
|
5564
|
-
|
|
5565
|
+
ve(pe);
|
|
5565
5566
|
}, ye = (z) => {
|
|
5566
5567
|
T ? zt({
|
|
5567
5568
|
lang: y,
|
|
@@ -5571,7 +5572,7 @@ const Ml = (t) => {
|
|
|
5571
5572
|
}) : z();
|
|
5572
5573
|
}, Me = () => {
|
|
5573
5574
|
if (le) {
|
|
5574
|
-
|
|
5575
|
+
Al({
|
|
5575
5576
|
lang: y,
|
|
5576
5577
|
onOk: () => {
|
|
5577
5578
|
a === "form" ? xe() : Ve();
|
|
@@ -5579,7 +5580,7 @@ const Ml = (t) => {
|
|
|
5579
5580
|
});
|
|
5580
5581
|
return;
|
|
5581
5582
|
}
|
|
5582
|
-
|
|
5583
|
+
Rl({
|
|
5583
5584
|
lang: y,
|
|
5584
5585
|
onOk: () => {
|
|
5585
5586
|
a === "form" ? xe() : Ve();
|
|
@@ -5593,8 +5594,8 @@ const Ml = (t) => {
|
|
|
5593
5594
|
}) : (B(!0), P({ defaultValues: se }), S(!0));
|
|
5594
5595
|
}, Z = async () => {
|
|
5595
5596
|
a === "form" ? ye(() => {
|
|
5596
|
-
|
|
5597
|
-
}) :
|
|
5597
|
+
w(!0);
|
|
5598
|
+
}) : w(!0);
|
|
5598
5599
|
}, xe = async () => {
|
|
5599
5600
|
O(!0), I(!1), A(void 0);
|
|
5600
5601
|
try {
|
|
@@ -5603,9 +5604,9 @@ const Ml = (t) => {
|
|
|
5603
5604
|
...se,
|
|
5604
5605
|
operation: "pendingRemove"
|
|
5605
5606
|
} : se);
|
|
5606
|
-
|
|
5607
|
+
ve(z);
|
|
5607
5608
|
} else
|
|
5608
|
-
|
|
5609
|
+
ve(
|
|
5609
5610
|
s.filter((z) => z.id !== J[d].id)
|
|
5610
5611
|
);
|
|
5611
5612
|
} catch (z) {
|
|
@@ -5620,7 +5621,7 @@ const Ml = (t) => {
|
|
|
5620
5621
|
...pe,
|
|
5621
5622
|
operation: "pendingRemove"
|
|
5622
5623
|
} : pe);
|
|
5623
|
-
|
|
5624
|
+
ve(Se);
|
|
5624
5625
|
} catch (se) {
|
|
5625
5626
|
A(se);
|
|
5626
5627
|
}
|
|
@@ -5642,7 +5643,7 @@ const Ml = (t) => {
|
|
|
5642
5643
|
treeValues: { ...Se, id: z }
|
|
5643
5644
|
} : _e);
|
|
5644
5645
|
else {
|
|
5645
|
-
const _e =
|
|
5646
|
+
const _e = Rs(s);
|
|
5646
5647
|
Te = s.concat({
|
|
5647
5648
|
id: _e,
|
|
5648
5649
|
operation: "pendingCreate",
|
|
@@ -5650,7 +5651,7 @@ const Ml = (t) => {
|
|
|
5650
5651
|
treeValues: { ...Se, id: _e }
|
|
5651
5652
|
});
|
|
5652
5653
|
}
|
|
5653
|
-
|
|
5654
|
+
ve(Te), N || S(!1);
|
|
5654
5655
|
}, ie = async (z) => {
|
|
5655
5656
|
const { id: se } = z;
|
|
5656
5657
|
let Se = s;
|
|
@@ -5679,7 +5680,7 @@ const Ml = (t) => {
|
|
|
5679
5680
|
treeValues: _e
|
|
5680
5681
|
});
|
|
5681
5682
|
}
|
|
5682
|
-
|
|
5683
|
+
ve(se);
|
|
5683
5684
|
} catch (pe) {
|
|
5684
5685
|
A(pe);
|
|
5685
5686
|
} finally {
|
|
@@ -5687,7 +5688,7 @@ const Ml = (t) => {
|
|
|
5687
5688
|
}
|
|
5688
5689
|
};
|
|
5689
5690
|
function Ue() {
|
|
5690
|
-
const z =
|
|
5691
|
+
const z = El[a];
|
|
5691
5692
|
if (a === "graph")
|
|
5692
5693
|
return $n(o.get("graph").arch).string;
|
|
5693
5694
|
{
|
|
@@ -5698,7 +5699,7 @@ const Ml = (t) => {
|
|
|
5698
5699
|
const ce = () => {
|
|
5699
5700
|
var se, Se, pe, Te;
|
|
5700
5701
|
if (a === "form")
|
|
5701
|
-
return J.length === 0 ?
|
|
5702
|
+
return J.length === 0 ? v("noCurrentEntries") : a !== q.current && s.some((_e) => !_e.values) ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(
|
|
5702
5703
|
Jt,
|
|
5703
5704
|
{
|
|
5704
5705
|
formView: o.get("form"),
|
|
@@ -5715,7 +5716,7 @@ const Ml = (t) => {
|
|
|
5715
5716
|
values: { ..._e, id: tt },
|
|
5716
5717
|
treeValues: { ..._e, id: tt }
|
|
5717
5718
|
} : Ye);
|
|
5718
|
-
|
|
5719
|
+
ve(qe), I(!0);
|
|
5719
5720
|
},
|
|
5720
5721
|
readOnly: G
|
|
5721
5722
|
}
|
|
@@ -5769,7 +5770,7 @@ const Ml = (t) => {
|
|
|
5769
5770
|
const ot = N;
|
|
5770
5771
|
return C ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ V(Q, { children: [
|
|
5771
5772
|
/* @__PURE__ */ n(
|
|
5772
|
-
|
|
5773
|
+
kl,
|
|
5773
5774
|
{
|
|
5774
5775
|
mode: a,
|
|
5775
5776
|
title: Ue(),
|
|
@@ -5810,33 +5811,33 @@ const Ml = (t) => {
|
|
|
5810
5811
|
}
|
|
5811
5812
|
),
|
|
5812
5813
|
/* @__PURE__ */ n(
|
|
5813
|
-
|
|
5814
|
+
wo,
|
|
5814
5815
|
{
|
|
5815
5816
|
domain: K.current,
|
|
5816
5817
|
model: k,
|
|
5817
5818
|
context: { ...h == null ? void 0 : h(), ...L },
|
|
5818
5819
|
visible: F,
|
|
5819
5820
|
onSelectValues: async (z) => {
|
|
5820
|
-
|
|
5821
|
+
w(!1), ue(z);
|
|
5821
5822
|
},
|
|
5822
5823
|
onCloseModal: () => {
|
|
5823
|
-
|
|
5824
|
+
w(!1);
|
|
5824
5825
|
}
|
|
5825
5826
|
}
|
|
5826
5827
|
)
|
|
5827
5828
|
] });
|
|
5828
|
-
},
|
|
5829
|
+
}, Pl = (t) => {
|
|
5829
5830
|
const { ooui: e } = t, { mode: r, relation: i, views: o, required: s, context: a } = e;
|
|
5830
5831
|
let l;
|
|
5831
5832
|
const [d, u] = b(!0), [c, f] = b(), [m, g] = b(/* @__PURE__ */ new Map()), h = H(Ne), { getContext: p } = h || {};
|
|
5832
5833
|
xt(() => {
|
|
5833
|
-
|
|
5834
|
+
v();
|
|
5834
5835
|
}, [e]);
|
|
5835
5836
|
const y = async (I) => o && o[I] ? o[I] : await D.getHandler().getView({
|
|
5836
5837
|
model: i,
|
|
5837
5838
|
type: I,
|
|
5838
5839
|
context: { ...p == null ? void 0 : p(), ...a }
|
|
5839
|
-
}),
|
|
5840
|
+
}), v = async () => {
|
|
5840
5841
|
u(!0), f(void 0);
|
|
5841
5842
|
try {
|
|
5842
5843
|
if (r && r.length > 0) {
|
|
@@ -5855,7 +5856,7 @@ const Ml = (t) => {
|
|
|
5855
5856
|
u(!1);
|
|
5856
5857
|
}
|
|
5857
5858
|
};
|
|
5858
|
-
return r && r.length > 0 ? l = r[0] : l = "tree", d ? /* @__PURE__ */ n(Ae, {}) : c ? /* @__PURE__ */ n(et, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ n(
|
|
5859
|
+
return r && r.length > 0 ? l = r[0] : l = "tree", d ? /* @__PURE__ */ n(Ae, {}) : c ? /* @__PURE__ */ n(et, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ n(ul, { initialView: l, children: /* @__PURE__ */ n(
|
|
5859
5860
|
ge,
|
|
5860
5861
|
{
|
|
5861
5862
|
required: s,
|
|
@@ -5871,25 +5872,25 @@ const Ml = (t) => {
|
|
|
5871
5872
|
throw new Error();
|
|
5872
5873
|
},
|
|
5873
5874
|
...t,
|
|
5874
|
-
children: /* @__PURE__ */ n(
|
|
5875
|
+
children: /* @__PURE__ */ n(Nl, { ooui: e, views: m })
|
|
5875
5876
|
}
|
|
5876
5877
|
) });
|
|
5877
|
-
}, { useToken:
|
|
5878
|
+
}, { useToken: Ll } = Pe, Bl = (t) => {
|
|
5878
5879
|
const { ooui: e } = t, { required: r } = e;
|
|
5879
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "number", ...t, children: /* @__PURE__ */ n(
|
|
5880
|
-
},
|
|
5881
|
-
const { ooui: e, value: r, onChange: i } = t, { id: o, readOnly: s, required: a } = e, { token: l } =
|
|
5880
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "number", ...t, children: /* @__PURE__ */ n($l, { ooui: e }) });
|
|
5881
|
+
}, $l = (t) => {
|
|
5882
|
+
const { ooui: e, value: r, onChange: i } = t, { id: o, readOnly: s, required: a } = e, { token: l } = Ll(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = de(), [c, f] = b(), m = H(Ne), { elementHasLostFocus: g } = m || {};
|
|
5882
5883
|
me(() => {
|
|
5883
5884
|
f(po(r));
|
|
5884
5885
|
}, [r]);
|
|
5885
|
-
const h = (
|
|
5886
|
-
i == null || i(
|
|
5886
|
+
const h = (v) => {
|
|
5887
|
+
i == null || i(v);
|
|
5887
5888
|
};
|
|
5888
|
-
function p(
|
|
5889
|
-
u.current =
|
|
5889
|
+
function p(v) {
|
|
5890
|
+
u.current = v.target.value, f(v.target.value);
|
|
5890
5891
|
}
|
|
5891
5892
|
async function y() {
|
|
5892
|
-
h(
|
|
5893
|
+
h(Pa(c)), await new Promise((v) => setTimeout(v, 300)), g == null || g();
|
|
5893
5894
|
}
|
|
5894
5895
|
return /* @__PURE__ */ n(
|
|
5895
5896
|
it,
|
|
@@ -5921,8 +5922,8 @@ function To(t) {
|
|
|
5921
5922
|
}
|
|
5922
5923
|
) });
|
|
5923
5924
|
}
|
|
5924
|
-
const { TabPane:
|
|
5925
|
-
function
|
|
5925
|
+
const { TabPane: Hl } = Dr;
|
|
5926
|
+
function Kl(t) {
|
|
5926
5927
|
const { ooui: e, responsiveBehaviour: r } = t, i = e.pages;
|
|
5927
5928
|
function o(s) {
|
|
5928
5929
|
if (s) {
|
|
@@ -5931,7 +5932,7 @@ function Hl(t) {
|
|
|
5931
5932
|
}
|
|
5932
5933
|
}
|
|
5933
5934
|
return /* @__PURE__ */ n(Dr, { defaultActiveKey: "1", tabPosition: e.tabPosition, children: i.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ n(
|
|
5934
|
-
|
|
5935
|
+
Hl,
|
|
5935
5936
|
{
|
|
5936
5937
|
tab: /* @__PURE__ */ V(Q, { children: [
|
|
5937
5938
|
o(s.icon),
|
|
@@ -5950,10 +5951,10 @@ function Hl(t) {
|
|
|
5950
5951
|
s.label
|
|
5951
5952
|
)) });
|
|
5952
5953
|
}
|
|
5953
|
-
const { useToken:
|
|
5954
|
-
const { ooui: e } = t, { id: r, readOnly: i, required: o, height: s, translatable: a } = e, { token: l } =
|
|
5954
|
+
const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
5955
|
+
const { ooui: e } = t, { id: r, readOnly: i, required: o, height: s, translatable: a } = e, { token: l } = Wl(), d = o && !i ? { backgroundColor: l.colorPrimaryBg } : void 0, u = H(Ne), { elementHasLostFocus: c } = u || {};
|
|
5955
5956
|
return /* @__PURE__ */ n(ge, { required: o, ...t, children: a ? /* @__PURE__ */ n(
|
|
5956
|
-
|
|
5957
|
+
Yl,
|
|
5957
5958
|
{
|
|
5958
5959
|
field: r,
|
|
5959
5960
|
height: s,
|
|
@@ -5971,7 +5972,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
5971
5972
|
onBlur: c
|
|
5972
5973
|
}
|
|
5973
5974
|
) });
|
|
5974
|
-
},
|
|
5975
|
+
}, Yl = ({
|
|
5975
5976
|
value: t,
|
|
5976
5977
|
field: e,
|
|
5977
5978
|
requiredStyle: r,
|
|
@@ -6033,7 +6034,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6033
6034
|
}
|
|
6034
6035
|
)
|
|
6035
6036
|
] }) : /* @__PURE__ */ V(Q, { children: [
|
|
6036
|
-
/* @__PURE__ */ n(
|
|
6037
|
+
/* @__PURE__ */ n(we, { gutter: 8, wrap: !1, children: /* @__PURE__ */ n(
|
|
6037
6038
|
kn,
|
|
6038
6039
|
{
|
|
6039
6040
|
value: t,
|
|
@@ -6049,7 +6050,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6049
6050
|
onBlur: c
|
|
6050
6051
|
}
|
|
6051
6052
|
) }),
|
|
6052
|
-
/* @__PURE__ */ n(
|
|
6053
|
+
/* @__PURE__ */ n(we, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ n(
|
|
6053
6054
|
Xe,
|
|
6054
6055
|
{
|
|
6055
6056
|
tooltip: g("translate"),
|
|
@@ -6061,13 +6062,13 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6061
6062
|
}
|
|
6062
6063
|
) })
|
|
6063
6064
|
] });
|
|
6064
|
-
},
|
|
6065
|
+
}, Gl = (t) => {
|
|
6065
6066
|
const { ooui: e } = t, { label: r, icon: i } = e, o = ct(i || "");
|
|
6066
6067
|
return /* @__PURE__ */ n(cn, { orientation: "left", className: "text-sm", children: (o || r) && /* @__PURE__ */ V(We, { children: [
|
|
6067
6068
|
o ? /* @__PURE__ */ n(o, {}) : null,
|
|
6068
6069
|
r
|
|
6069
6070
|
] }) });
|
|
6070
|
-
},
|
|
6071
|
+
}, Ul = ({
|
|
6071
6072
|
model: t,
|
|
6072
6073
|
context: e,
|
|
6073
6074
|
locale: r,
|
|
@@ -6082,17 +6083,17 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6082
6083
|
ft(Ie("selectAtLeastOneField", r));
|
|
6083
6084
|
return;
|
|
6084
6085
|
}
|
|
6085
|
-
let
|
|
6086
|
-
y.registersAmount === "selected" && (i == null ? void 0 : i.length) !== 0 && (
|
|
6086
|
+
let v = o;
|
|
6087
|
+
y.registersAmount === "selected" && (i == null ? void 0 : i.length) !== 0 && (v = [
|
|
6087
6088
|
["id", "in", i == null ? void 0 : i.map((C) => C.id)]
|
|
6088
6089
|
]);
|
|
6089
6090
|
const { datas: T } = await D.getHandler().exportData({
|
|
6090
6091
|
model: t,
|
|
6091
|
-
fields:
|
|
6092
|
+
fields: Ql({
|
|
6092
6093
|
keys: y.selectedKeys,
|
|
6093
6094
|
fields: l.current
|
|
6094
6095
|
}),
|
|
6095
|
-
domain:
|
|
6096
|
+
domain: v,
|
|
6096
6097
|
limit: y.registersAmount === "all" ? 0 : s,
|
|
6097
6098
|
context: e,
|
|
6098
6099
|
format: y.exportType
|
|
@@ -6117,7 +6118,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6117
6118
|
fields: []
|
|
6118
6119
|
});
|
|
6119
6120
|
for (const [O, _] of Object.entries(C))
|
|
6120
|
-
C[O].string =
|
|
6121
|
+
C[O].string = zl({
|
|
6121
6122
|
parentTitle: T.string,
|
|
6122
6123
|
title: _.string
|
|
6123
6124
|
});
|
|
@@ -6128,7 +6129,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6128
6129
|
},
|
|
6129
6130
|
[l.current, t, e]
|
|
6130
6131
|
), m = De(async () => {
|
|
6131
|
-
const y = await
|
|
6132
|
+
const y = await Jl({ model: t, context: e }), v = await Xl({
|
|
6132
6133
|
predefinedExports: y,
|
|
6133
6134
|
fields: l.current,
|
|
6134
6135
|
onGetFieldChilds: f
|
|
@@ -6144,17 +6145,17 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6144
6145
|
};
|
|
6145
6146
|
})
|
|
6146
6147
|
})),
|
|
6147
|
-
keysWithChilds:
|
|
6148
|
+
keysWithChilds: v
|
|
6148
6149
|
};
|
|
6149
6150
|
}, [l.current]), g = De(
|
|
6150
6151
|
async (y) => {
|
|
6151
|
-
const
|
|
6152
|
+
const v = await p("ir.exports"), T = await p("ir.exports.line"), I = await D.getHandler().create({
|
|
6152
6153
|
model: "ir.exports",
|
|
6153
6154
|
values: {
|
|
6154
6155
|
name: y.name,
|
|
6155
6156
|
resource: t
|
|
6156
6157
|
},
|
|
6157
|
-
fields:
|
|
6158
|
+
fields: v,
|
|
6158
6159
|
context: e
|
|
6159
6160
|
});
|
|
6160
6161
|
return await Promise.all(
|
|
@@ -6182,12 +6183,12 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6182
6183
|
async (y) => {
|
|
6183
6184
|
if (d.current.has(y))
|
|
6184
6185
|
return d.current.get(y);
|
|
6185
|
-
const
|
|
6186
|
+
const v = D.getHandler().getFields({
|
|
6186
6187
|
model: y,
|
|
6187
6188
|
context: e,
|
|
6188
6189
|
fields: []
|
|
6189
6190
|
});
|
|
6190
|
-
d.current.set(y,
|
|
6191
|
+
d.current.set(y, v);
|
|
6191
6192
|
},
|
|
6192
6193
|
[d, e]
|
|
6193
6194
|
);
|
|
@@ -6210,7 +6211,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6210
6211
|
continue;
|
|
6211
6212
|
const s = Fo(o);
|
|
6212
6213
|
r.push({
|
|
6213
|
-
key:
|
|
6214
|
+
key: ql({ key: i, parentKey: e }),
|
|
6214
6215
|
title: o.string,
|
|
6215
6216
|
tooltip: o.help,
|
|
6216
6217
|
required: o.required,
|
|
@@ -6218,7 +6219,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6218
6219
|
});
|
|
6219
6220
|
}
|
|
6220
6221
|
return r;
|
|
6221
|
-
}, Fo = (t) => t.type === "many2one" || t.type === "one2many" || t.type === "many2many",
|
|
6222
|
+
}, Fo = (t) => t.type === "many2one" || t.type === "one2many" || t.type === "many2many", ql = ({
|
|
6222
6223
|
parentKey: t,
|
|
6223
6224
|
key: e
|
|
6224
6225
|
}) => `${t ? t + "/" : ""}${e}`, $t = (t) => t.indexOf("/") === -1 ? t : t.split("/").slice(0, -1).join("/"), En = (t) => {
|
|
@@ -6226,10 +6227,10 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6226
6227
|
return t;
|
|
6227
6228
|
const e = t.split("/");
|
|
6228
6229
|
return e[e.length - 1];
|
|
6229
|
-
}, Mn = (t, e) => t.indexOf("/") === -1 ? e["/"] : e[$t(t)],
|
|
6230
|
+
}, Mn = (t, e) => t.indexOf("/") === -1 ? e["/"] : e[$t(t)], zl = ({
|
|
6230
6231
|
title: t,
|
|
6231
6232
|
parentTitle: e
|
|
6232
|
-
}) => `${e ? e + " → " : ""}${t}`,
|
|
6233
|
+
}) => `${e ? e + " → " : ""}${t}`, Jl = async ({
|
|
6233
6234
|
model: t,
|
|
6234
6235
|
context: e
|
|
6235
6236
|
}) => {
|
|
@@ -6249,10 +6250,10 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6249
6250
|
key: o.find((d) => d.id === a).name
|
|
6250
6251
|
}))
|
|
6251
6252
|
}));
|
|
6252
|
-
},
|
|
6253
|
+
}, Zl = ({
|
|
6253
6254
|
fields: t,
|
|
6254
6255
|
keys: e
|
|
6255
|
-
}) =>
|
|
6256
|
+
}) => ec([
|
|
6256
6257
|
...new Set(
|
|
6257
6258
|
e.filter((r) => {
|
|
6258
6259
|
var i, o, s;
|
|
@@ -6266,27 +6267,27 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6266
6267
|
}
|
|
6267
6268
|
}).map((r) => $t(r))
|
|
6268
6269
|
)
|
|
6269
|
-
]),
|
|
6270
|
+
]), Xl = async ({
|
|
6270
6271
|
predefinedExports: t,
|
|
6271
6272
|
fields: e,
|
|
6272
6273
|
onGetFieldChilds: r
|
|
6273
6274
|
}) => {
|
|
6274
6275
|
const i = t.flatMap(
|
|
6275
6276
|
(a) => a.fields.map((l) => l.key)
|
|
6276
|
-
), o =
|
|
6277
|
+
), o = Zl({
|
|
6277
6278
|
fields: e,
|
|
6278
6279
|
keys: i
|
|
6279
6280
|
}), s = [];
|
|
6280
6281
|
for (const a of o)
|
|
6281
6282
|
s.push({ key: a, childs: await r(a) });
|
|
6282
6283
|
return s;
|
|
6283
|
-
},
|
|
6284
|
+
}, Ql = ({
|
|
6284
6285
|
keys: t,
|
|
6285
6286
|
fields: e
|
|
6286
6287
|
}) => t.map((r) => {
|
|
6287
6288
|
const i = En(r), s = Mn(r, e)[i];
|
|
6288
6289
|
return Fo(s) ? `${r}/id` : r;
|
|
6289
|
-
}),
|
|
6290
|
+
}), ec = (t) => {
|
|
6290
6291
|
const e = /* @__PURE__ */ new Map(), r = [];
|
|
6291
6292
|
for (const i of t) {
|
|
6292
6293
|
const o = i.split("/");
|
|
@@ -6300,7 +6301,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6300
6301
|
const s = i.split("/").length, a = o.split("/").length;
|
|
6301
6302
|
return s - a;
|
|
6302
6303
|
}), r;
|
|
6303
|
-
},
|
|
6304
|
+
}, tc = (t) => {
|
|
6304
6305
|
const {
|
|
6305
6306
|
visible: e,
|
|
6306
6307
|
locale: r,
|
|
@@ -6319,7 +6320,7 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6319
6320
|
onGetPredefinedExports: h,
|
|
6320
6321
|
onSavePredefinedExport: p,
|
|
6321
6322
|
onRemovePredefinedExport: y
|
|
6322
|
-
} =
|
|
6323
|
+
} = Ul({
|
|
6323
6324
|
model: o,
|
|
6324
6325
|
context: s,
|
|
6325
6326
|
domain: d,
|
|
@@ -6345,18 +6346,18 @@ const { useToken: Kl } = Pe, { TextArea: kn } = it, Wl = (t) => {
|
|
|
6345
6346
|
onRemovePredefinedExport: y
|
|
6346
6347
|
}
|
|
6347
6348
|
);
|
|
6348
|
-
},
|
|
6349
|
+
}, nc = (t) => {
|
|
6349
6350
|
const { ooui: e } = t;
|
|
6350
6351
|
return /* @__PURE__ */ n(yo, { ooui: e });
|
|
6351
|
-
},
|
|
6352
|
+
}, rc = (t) => {
|
|
6352
6353
|
const { ooui: e } = t;
|
|
6353
6354
|
return /* @__PURE__ */ n(yo, { ooui: e, showTime: !0 });
|
|
6354
6355
|
};
|
|
6355
6356
|
at.extend(Mi);
|
|
6356
|
-
const
|
|
6357
|
+
const oc = (t) => {
|
|
6357
6358
|
const { ooui: e } = t;
|
|
6358
|
-
return /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(
|
|
6359
|
-
},
|
|
6359
|
+
return /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(ic, { ooui: e }) });
|
|
6360
|
+
}, ic = (t) => /* @__PURE__ */ n(
|
|
6360
6361
|
Vr,
|
|
6361
6362
|
{
|
|
6362
6363
|
onChange: (r, i) => {
|
|
@@ -6364,10 +6365,10 @@ const rc = (t) => {
|
|
|
6364
6365
|
},
|
|
6365
6366
|
value: t.value ? at(t.value, "HH:mm:ss") : void 0
|
|
6366
6367
|
}
|
|
6367
|
-
),
|
|
6368
|
+
), sc = (t) => {
|
|
6368
6369
|
const { ooui: e } = t, { required: r } = e;
|
|
6369
|
-
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(
|
|
6370
|
-
},
|
|
6370
|
+
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(ac, { ooui: e }) });
|
|
6371
|
+
}, ac = (t) => {
|
|
6371
6372
|
const { value: e, onChange: r, ooui: i } = t, { required: o, selectionValues: s, readOnly: a } = i, l = e == null ? void 0 : e.split(","), [d, u] = b([]), [c, f] = b();
|
|
6372
6373
|
return me(() => {
|
|
6373
6374
|
if (!e) {
|
|
@@ -6376,7 +6377,7 @@ const rc = (t) => {
|
|
|
6376
6377
|
}
|
|
6377
6378
|
const m = e && l && l[0], g = e && l && l[1] && parseInt(l[1]);
|
|
6378
6379
|
u([g, void 0]), f(m);
|
|
6379
|
-
}, [e]), /* @__PURE__ */ V(
|
|
6380
|
+
}, [e]), /* @__PURE__ */ V(we, { gutter: 8, wrap: !1, children: [
|
|
6380
6381
|
/* @__PURE__ */ n(ae, { flex: "1", children: /* @__PURE__ */ n(
|
|
6381
6382
|
ro,
|
|
6382
6383
|
{
|
|
@@ -6414,11 +6415,11 @@ const rc = (t) => {
|
|
|
6414
6415
|
}
|
|
6415
6416
|
) })
|
|
6416
6417
|
] });
|
|
6417
|
-
}, { useToken:
|
|
6418
|
+
}, { useToken: lc } = Pe, cc = (t) => {
|
|
6418
6419
|
const { ooui: e } = t, { required: r } = e;
|
|
6419
|
-
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(
|
|
6420
|
-
},
|
|
6421
|
-
const { ooui: e, value: r, onChange: i } = t, { readOnly: o, required: s, filenameField: a } = e, { token: l } =
|
|
6420
|
+
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(dc, { ooui: e }) });
|
|
6421
|
+
}, dc = (t) => {
|
|
6422
|
+
const { ooui: e, value: r, onChange: i } = t, { readOnly: o, required: s, filenameField: a } = e, { token: l } = lc(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = de(null), { setFieldValue: c, getFieldValue: f } = H(Ne) || {}, { t: m } = H(he), g = r ? xs(r) : "", h = (I) => {
|
|
6422
6423
|
i == null || i(I);
|
|
6423
6424
|
};
|
|
6424
6425
|
async function p() {
|
|
@@ -6429,7 +6430,7 @@ const rc = (t) => {
|
|
|
6429
6430
|
const I = await At(r);
|
|
6430
6431
|
hn(r, I.mime);
|
|
6431
6432
|
}
|
|
6432
|
-
async function
|
|
6433
|
+
async function v(I) {
|
|
6433
6434
|
I.stopPropagation(), I.preventDefault();
|
|
6434
6435
|
const C = I.target.files[0], O = await oo(C);
|
|
6435
6436
|
h(O), a && c(a, C.name);
|
|
@@ -6437,7 +6438,7 @@ const rc = (t) => {
|
|
|
6437
6438
|
function T() {
|
|
6438
6439
|
c(a, void 0), h(void 0);
|
|
6439
6440
|
}
|
|
6440
|
-
return /* @__PURE__ */ V(
|
|
6441
|
+
return /* @__PURE__ */ V(we, { gutter: 8, children: [
|
|
6441
6442
|
/* @__PURE__ */ V(ae, { style: { paddingBottom: 5 }, children: [
|
|
6442
6443
|
/* @__PURE__ */ n(
|
|
6443
6444
|
"input",
|
|
@@ -6446,7 +6447,7 @@ const rc = (t) => {
|
|
|
6446
6447
|
id: "file",
|
|
6447
6448
|
ref: u,
|
|
6448
6449
|
style: { display: "none" },
|
|
6449
|
-
onChange:
|
|
6450
|
+
onChange: v
|
|
6450
6451
|
}
|
|
6451
6452
|
),
|
|
6452
6453
|
/* @__PURE__ */ n(
|
|
@@ -6511,7 +6512,7 @@ function er(t) {
|
|
|
6511
6512
|
previousView: a
|
|
6512
6513
|
} = t, { t: l, lang: d } = H(he);
|
|
6513
6514
|
function u() {
|
|
6514
|
-
const m = r.map((g, h) => /* @__PURE__ */ n($e.Item, { children: /* @__PURE__ */ V(
|
|
6515
|
+
const m = r.map((g, h) => /* @__PURE__ */ n($e.Item, { children: /* @__PURE__ */ V(we, { wrap: !1, children: [
|
|
6515
6516
|
/* @__PURE__ */ n(ae, { flex: "none", style: { paddingRight: 20 }, children: _r(g) }),
|
|
6516
6517
|
/* @__PURE__ */ n(ae, { flex: "auto", style: { paddingRight: 20 }, children: g.type.charAt(0).toUpperCase() + g.type.slice(1) }),
|
|
6517
6518
|
/* @__PURE__ */ n(ae, { flex: "none", children: /* @__PURE__ */ n(
|
|
@@ -6664,12 +6665,12 @@ function Io(t) {
|
|
|
6664
6665
|
}
|
|
6665
6666
|
);
|
|
6666
6667
|
}
|
|
6667
|
-
const { confirm:
|
|
6668
|
+
const { confirm: uc } = Je, fc = ({
|
|
6668
6669
|
onOk: t,
|
|
6669
6670
|
onCancel: e,
|
|
6670
6671
|
lang: r
|
|
6671
6672
|
}) => {
|
|
6672
|
-
|
|
6673
|
+
uc({
|
|
6673
6674
|
title: Ie("unsavedChanges", r),
|
|
6674
6675
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
6675
6676
|
centered: !0,
|
|
@@ -6703,7 +6704,7 @@ async function Oo(t, e, r) {
|
|
|
6703
6704
|
] })
|
|
6704
6705
|
);
|
|
6705
6706
|
}
|
|
6706
|
-
const
|
|
6707
|
+
const mc = (t) => {
|
|
6707
6708
|
const { numberOfAttachments: e, disabled: r } = t, { t: i, lang: o } = H(he), [s, a] = b(!1), l = /* @__PURE__ */ V(Oe, { disabled: r, children: [
|
|
6708
6709
|
/* @__PURE__ */ n(Ur, {}),
|
|
6709
6710
|
`(${e})`,
|
|
@@ -6715,13 +6716,13 @@ const fc = (t) => {
|
|
|
6715
6716
|
onVisibleChange: (d) => a(d),
|
|
6716
6717
|
visible: s,
|
|
6717
6718
|
placement: "bottom",
|
|
6718
|
-
content:
|
|
6719
|
+
content: hc(t, a, o),
|
|
6719
6720
|
title: i("attachments"),
|
|
6720
6721
|
arrowContent: null,
|
|
6721
6722
|
children: l
|
|
6722
6723
|
}
|
|
6723
6724
|
);
|
|
6724
|
-
},
|
|
6725
|
+
}, hc = (t, e, r) => {
|
|
6725
6726
|
const {
|
|
6726
6727
|
attachments: i = [],
|
|
6727
6728
|
loading: o,
|
|
@@ -6766,7 +6767,7 @@ const fc = (t) => {
|
|
|
6766
6767
|
i.map((u) => {
|
|
6767
6768
|
const c = u.link ? Ur : Kn;
|
|
6768
6769
|
return /* @__PURE__ */ V(
|
|
6769
|
-
|
|
6770
|
+
we,
|
|
6770
6771
|
{
|
|
6771
6772
|
style: { paddingTop: 4, paddingBottom: 4 },
|
|
6772
6773
|
wrap: !1,
|
|
@@ -6805,7 +6806,7 @@ const fc = (t) => {
|
|
|
6805
6806
|
] })
|
|
6806
6807
|
] });
|
|
6807
6808
|
};
|
|
6808
|
-
function
|
|
6809
|
+
function pc(t) {
|
|
6809
6810
|
const {
|
|
6810
6811
|
attachments: e,
|
|
6811
6812
|
disabled: r = !1,
|
|
@@ -6815,27 +6816,27 @@ function hc(t) {
|
|
|
6815
6816
|
} = t, { formRef: a } = H(rt), [l, d] = b(!1), [u, c] = b([]), [f, m] = b(!1), { t: g } = H(he), h = De(async () => {
|
|
6816
6817
|
d(!0);
|
|
6817
6818
|
try {
|
|
6818
|
-
const
|
|
6819
|
+
const v = await D.getHandler().readObjects({
|
|
6819
6820
|
model: "ir.attachment",
|
|
6820
6821
|
ids: e.map((T) => T.id),
|
|
6821
6822
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
6822
6823
|
context: a.current.getContext()
|
|
6823
6824
|
});
|
|
6824
6825
|
c(
|
|
6825
|
-
|
|
6826
|
+
v.map((T) => ({
|
|
6826
6827
|
id: T.id,
|
|
6827
6828
|
name: T.name,
|
|
6828
6829
|
datas_fname: T.datas_fname,
|
|
6829
6830
|
link: T.link
|
|
6830
6831
|
}))
|
|
6831
6832
|
);
|
|
6832
|
-
} catch (
|
|
6833
|
-
ze(
|
|
6833
|
+
} catch (v) {
|
|
6834
|
+
ze(v);
|
|
6834
6835
|
}
|
|
6835
6836
|
d(!1);
|
|
6836
|
-
}, e), p = De(async (
|
|
6837
|
-
if (
|
|
6838
|
-
window.open(
|
|
6837
|
+
}, e), p = De(async (v) => {
|
|
6838
|
+
if (v.link) {
|
|
6839
|
+
window.open(v.link);
|
|
6839
6840
|
return;
|
|
6840
6841
|
}
|
|
6841
6842
|
m(!0);
|
|
@@ -6843,7 +6844,7 @@ function hc(t) {
|
|
|
6843
6844
|
try {
|
|
6844
6845
|
T = (await D.getHandler().readObjects({
|
|
6845
6846
|
model: "ir.attachment",
|
|
6846
|
-
ids: [
|
|
6847
|
+
ids: [v.id],
|
|
6847
6848
|
context: a.current.getContext()
|
|
6848
6849
|
}))[0];
|
|
6849
6850
|
} catch (I) {
|
|
@@ -6855,14 +6856,14 @@ function hc(t) {
|
|
|
6855
6856
|
hn(T.datas, I.mime);
|
|
6856
6857
|
} else
|
|
6857
6858
|
s(T);
|
|
6858
|
-
}, []), y = De(async (
|
|
6859
|
-
s(
|
|
6859
|
+
}, []), y = De(async (v) => {
|
|
6860
|
+
s(v);
|
|
6860
6861
|
}, []);
|
|
6861
6862
|
return me(() => {
|
|
6862
6863
|
h();
|
|
6863
6864
|
}, [h]), /* @__PURE__ */ V(Q, { children: [
|
|
6864
6865
|
/* @__PURE__ */ n(
|
|
6865
|
-
|
|
6866
|
+
mc,
|
|
6866
6867
|
{
|
|
6867
6868
|
numberOfAttachments: e.length,
|
|
6868
6869
|
attachments: u,
|
|
@@ -6888,7 +6889,7 @@ function hc(t) {
|
|
|
6888
6889
|
)
|
|
6889
6890
|
] });
|
|
6890
6891
|
}
|
|
6891
|
-
function
|
|
6892
|
+
function gc({ toolbar: t }) {
|
|
6892
6893
|
const {
|
|
6893
6894
|
availableViews: e,
|
|
6894
6895
|
currentView: r,
|
|
@@ -6906,7 +6907,7 @@ function pc({ toolbar: t }) {
|
|
|
6906
6907
|
removingItem: h,
|
|
6907
6908
|
duplicatingItem: p,
|
|
6908
6909
|
setDuplicatingItem: y,
|
|
6909
|
-
setResults:
|
|
6910
|
+
setResults: v,
|
|
6910
6911
|
formIsLoading: T,
|
|
6911
6912
|
attachments: I,
|
|
6912
6913
|
formRef: C,
|
|
@@ -6914,14 +6915,14 @@ function pc({ toolbar: t }) {
|
|
|
6914
6915
|
previousView: _,
|
|
6915
6916
|
setPreviousView: A,
|
|
6916
6917
|
goToResourceId: x
|
|
6917
|
-
} = H(rt), { t: S, lang: F } = H(he),
|
|
6918
|
+
} = H(rt), { t: S, lang: F } = H(he), w = H(
|
|
6918
6919
|
Pt
|
|
6919
|
-
), { processAction: E } =
|
|
6920
|
+
), { processAction: E } = w || {}, P = H(
|
|
6920
6921
|
dt
|
|
6921
6922
|
), { openRelate: M, openDefaultActionForModel: j } = P || {};
|
|
6922
6923
|
function N(k) {
|
|
6923
6924
|
if (s) {
|
|
6924
|
-
|
|
6925
|
+
fc({
|
|
6925
6926
|
lang: F,
|
|
6926
6927
|
onOk: () => {
|
|
6927
6928
|
k();
|
|
@@ -6965,7 +6966,7 @@ function pc({ toolbar: t }) {
|
|
|
6965
6966
|
ids: [l]
|
|
6966
6967
|
});
|
|
6967
6968
|
const k = d == null ? void 0 : d.filter((ee) => ee.id !== l);
|
|
6968
|
-
|
|
6969
|
+
v == null || v(k);
|
|
6969
6970
|
let L = 0;
|
|
6970
6971
|
c > 0 && c <= d.length - 1 && (L = c - 1), k != null && k[L] ? (f == null || f(k == null ? void 0 : k[L].id), u == null || u(L)) : (f == null || f(void 0), u == null || u(void 0));
|
|
6971
6972
|
} catch (k) {
|
|
@@ -7170,7 +7171,7 @@ function pc({ toolbar: t }) {
|
|
|
7170
7171
|
}
|
|
7171
7172
|
),
|
|
7172
7173
|
/* @__PURE__ */ n(
|
|
7173
|
-
|
|
7174
|
+
pc,
|
|
7174
7175
|
{
|
|
7175
7176
|
disabled: Y,
|
|
7176
7177
|
attachments: I,
|
|
@@ -7231,15 +7232,15 @@ async function Ft({
|
|
|
7231
7232
|
const e = await (t == null ? void 0 : t());
|
|
7232
7233
|
return e != null && e.succeed ? { succeed: !0, currentId: e.id } : { succeed: !1, currentId: void 0 };
|
|
7233
7234
|
}
|
|
7234
|
-
const { useToken:
|
|
7235
|
-
const { ooui: e, value: r, onChange: i, valueValidator: o, linkPrefix: s = "" } = t, { id: a, readOnly: l, required: d } = e, { token: u } =
|
|
7235
|
+
const { useToken: yc } = Pe, _o = (t) => {
|
|
7236
|
+
const { ooui: e, value: r, onChange: i, valueValidator: o, linkPrefix: s = "" } = t, { id: a, readOnly: l, required: d } = e, { token: u } = yc(), c = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, f = H(Ne), { elementHasLostFocus: m } = f || {}, [g, h] = b(!1), [p, y] = b(!1);
|
|
7236
7237
|
me(() => {
|
|
7237
7238
|
l && !g && y(!1), !r && !l && (h(!0), y(!0));
|
|
7238
7239
|
}, [g, l]);
|
|
7239
|
-
const
|
|
7240
|
+
const v = (T) => {
|
|
7240
7241
|
i == null || i(T.target.value);
|
|
7241
7242
|
};
|
|
7242
|
-
return /* @__PURE__ */ V(
|
|
7243
|
+
return /* @__PURE__ */ V(we, { gutter: 8, wrap: !1, align: "middle", children: [
|
|
7243
7244
|
l ? null : /* @__PURE__ */ n(ae, { flex: "32px", children: g ? /* @__PURE__ */ n(
|
|
7244
7245
|
Oe,
|
|
7245
7246
|
{
|
|
@@ -7270,7 +7271,7 @@ const { useToken: gc } = Pe, _o = (t) => {
|
|
|
7270
7271
|
...c
|
|
7271
7272
|
},
|
|
7272
7273
|
id: a,
|
|
7273
|
-
onChange:
|
|
7274
|
+
onChange: v,
|
|
7274
7275
|
value: r,
|
|
7275
7276
|
onBlur: () => {
|
|
7276
7277
|
o(r) && (h(!1), y(!1), m == null || m());
|
|
@@ -7287,7 +7288,7 @@ const { useToken: gc } = Pe, _o = (t) => {
|
|
|
7287
7288
|
}
|
|
7288
7289
|
) })
|
|
7289
7290
|
] });
|
|
7290
|
-
},
|
|
7291
|
+
}, vc = (t) => {
|
|
7291
7292
|
const { ooui: e } = t, { required: r } = e;
|
|
7292
7293
|
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(
|
|
7293
7294
|
_o,
|
|
@@ -7306,7 +7307,7 @@ const { useToken: gc } = Pe, _o = (t) => {
|
|
|
7306
7307
|
valueValidator: (i) => i ? Pi(i) : !1
|
|
7307
7308
|
}
|
|
7308
7309
|
) });
|
|
7309
|
-
},
|
|
7310
|
+
}, bc = (t) => {
|
|
7310
7311
|
const { visible: e, onIdSubmitted: r, onCancel: i, isSearching: o } = t, { t: s } = H(he), a = de();
|
|
7311
7312
|
function l(d) {
|
|
7312
7313
|
r(d.id);
|
|
@@ -7347,7 +7348,7 @@ const { useToken: gc } = Pe, _o = (t) => {
|
|
|
7347
7348
|
)
|
|
7348
7349
|
}
|
|
7349
7350
|
),
|
|
7350
|
-
/* @__PURE__ */ n(
|
|
7351
|
+
/* @__PURE__ */ n(we, { align: "middle", justify: "end", children: /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ V(We, { children: [
|
|
7351
7352
|
/* @__PURE__ */ n(
|
|
7352
7353
|
Oe,
|
|
7353
7354
|
{
|
|
@@ -7374,9 +7375,9 @@ const { useToken: gc } = Pe, _o = (t) => {
|
|
|
7374
7375
|
] })
|
|
7375
7376
|
}
|
|
7376
7377
|
);
|
|
7377
|
-
}, { useToken:
|
|
7378
|
+
}, { useToken: Cc } = Pe;
|
|
7378
7379
|
function Ro(t) {
|
|
7379
|
-
const { badgeNumber: e = 0, ...r } = t, { token: i } =
|
|
7380
|
+
const { badgeNumber: e = 0, ...r } = t, { token: i } = Cc();
|
|
7380
7381
|
return /* @__PURE__ */ V("div", { style: { position: "relative" }, children: [
|
|
7381
7382
|
e > 0 && /* @__PURE__ */ n("div", { style: { position: "absolute", left: -10, top: -10, zIndex: 2 }, children: /* @__PURE__ */ n(
|
|
7382
7383
|
"span",
|
|
@@ -7403,7 +7404,7 @@ function Ro(t) {
|
|
|
7403
7404
|
)
|
|
7404
7405
|
] });
|
|
7405
7406
|
}
|
|
7406
|
-
function
|
|
7407
|
+
function xc({ refreshGraph: t }) {
|
|
7407
7408
|
const { t: e } = H(he), {
|
|
7408
7409
|
availableViews: r,
|
|
7409
7410
|
currentView: i,
|
|
@@ -7460,7 +7461,7 @@ function Cc({ refreshGraph: t }) {
|
|
|
7460
7461
|
)
|
|
7461
7462
|
] });
|
|
7462
7463
|
}
|
|
7463
|
-
const { useToken:
|
|
7464
|
+
const { useToken: Sc } = Pe, { Title: Tc, Text: en } = Yt;
|
|
7464
7465
|
function yn(t) {
|
|
7465
7466
|
const { title: e, children: r } = t, {
|
|
7466
7467
|
title: i,
|
|
@@ -7470,7 +7471,7 @@ function yn(t) {
|
|
|
7470
7471
|
results: l,
|
|
7471
7472
|
totalItems: d,
|
|
7472
7473
|
selectedRowItems: u
|
|
7473
|
-
} = H(rt), { t: c } = H(he), { token: f } =
|
|
7474
|
+
} = H(rt), { t: c } = H(he), { token: f } = Sc();
|
|
7474
7475
|
function m() {
|
|
7475
7476
|
if ((o == null ? void 0 : o.type) === "form")
|
|
7476
7477
|
return s ? d === 0 ? /* @__PURE__ */ V(Q, { children: [
|
|
@@ -7532,7 +7533,7 @@ function yn(t) {
|
|
|
7532
7533
|
}
|
|
7533
7534
|
return /* @__PURE__ */ V("div", { style: { position: "sticky", top: 80, zIndex: 3 }, children: [
|
|
7534
7535
|
/* @__PURE__ */ V(
|
|
7535
|
-
|
|
7536
|
+
we,
|
|
7536
7537
|
{
|
|
7537
7538
|
className: "shadow-md",
|
|
7538
7539
|
style: {
|
|
@@ -7543,17 +7544,17 @@ function yn(t) {
|
|
|
7543
7544
|
align: "middle",
|
|
7544
7545
|
children: [
|
|
7545
7546
|
/* @__PURE__ */ V(ae, { flex: 2, children: [
|
|
7546
|
-
/* @__PURE__ */ n(
|
|
7547
|
+
/* @__PURE__ */ n(Tc, { level: 3, style: { marginBottom: 0 }, children: e || i }),
|
|
7547
7548
|
m()
|
|
7548
7549
|
] }),
|
|
7549
|
-
/* @__PURE__ */ n(ae, { flex: 3, children: /* @__PURE__ */ n(
|
|
7550
|
+
/* @__PURE__ */ n(ae, { flex: 3, children: /* @__PURE__ */ n(we, { justify: "end", children: r }) })
|
|
7550
7551
|
]
|
|
7551
7552
|
}
|
|
7552
7553
|
),
|
|
7553
7554
|
/* @__PURE__ */ n("div", { className: "pb-5" })
|
|
7554
7555
|
] });
|
|
7555
7556
|
}
|
|
7556
|
-
const
|
|
7557
|
+
const Fc = (t) => {
|
|
7557
7558
|
const { viewData: e, visible: r, model: i, context: o, domain: s, formView: a, treeView: l } = t, d = de(), u = H(
|
|
7558
7559
|
rt
|
|
7559
7560
|
), {
|
|
@@ -7564,7 +7565,7 @@ const Tc = (t) => {
|
|
|
7564
7565
|
setSelectedRowItems: h = void 0,
|
|
7565
7566
|
setSearchParams: p = void 0,
|
|
7566
7567
|
searchVisible: y = !0,
|
|
7567
|
-
setSearchVisible:
|
|
7568
|
+
setSearchVisible: v = void 0,
|
|
7568
7569
|
sorter: T = void 0,
|
|
7569
7570
|
setSorter: I = void 0,
|
|
7570
7571
|
setTotalItems: C = void 0,
|
|
@@ -7574,7 +7575,7 @@ const Tc = (t) => {
|
|
|
7574
7575
|
setLimit: x,
|
|
7575
7576
|
searchParams: S,
|
|
7576
7577
|
searchValues: F,
|
|
7577
|
-
setSearchValues:
|
|
7578
|
+
setSearchValues: w,
|
|
7578
7579
|
currentView: E
|
|
7579
7580
|
} = u || {}, [P, M] = b(!0);
|
|
7580
7581
|
me(() => {
|
|
@@ -7588,9 +7589,9 @@ const Tc = (t) => {
|
|
|
7588
7589
|
setSearchTreeNameSearch: O,
|
|
7589
7590
|
setSelectedRowItems: h,
|
|
7590
7591
|
searchParams: S,
|
|
7591
|
-
setSearchValues:
|
|
7592
|
+
setSearchValues: w,
|
|
7592
7593
|
setSearchParams: p,
|
|
7593
|
-
setSearchVisible:
|
|
7594
|
+
setSearchVisible: v,
|
|
7594
7595
|
setTreeIsLoading: _,
|
|
7595
7596
|
context: o,
|
|
7596
7597
|
formView: a,
|
|
@@ -7608,7 +7609,7 @@ const Tc = (t) => {
|
|
|
7608
7609
|
});
|
|
7609
7610
|
return !r || !e ? null : /* @__PURE__ */ V(Q, { children: [
|
|
7610
7611
|
/* @__PURE__ */ n(yn, { title: e.name, children: /* @__PURE__ */ n(
|
|
7611
|
-
|
|
7612
|
+
xc,
|
|
7612
7613
|
{
|
|
7613
7614
|
refreshGraph: () => {
|
|
7614
7615
|
d.current.refresh();
|
|
@@ -7628,7 +7629,7 @@ const Tc = (t) => {
|
|
|
7628
7629
|
offset: K,
|
|
7629
7630
|
isSearching: N,
|
|
7630
7631
|
onSubmit: (U) => {
|
|
7631
|
-
M(!1), p == null || p(U.params),
|
|
7632
|
+
M(!1), p == null || p(U.params), v == null || v(!1);
|
|
7632
7633
|
},
|
|
7633
7634
|
searchError: B,
|
|
7634
7635
|
searchVisible: y,
|
|
@@ -7649,7 +7650,7 @@ const Tc = (t) => {
|
|
|
7649
7650
|
}
|
|
7650
7651
|
)
|
|
7651
7652
|
] });
|
|
7652
|
-
},
|
|
7653
|
+
}, Ic = (t) => {
|
|
7653
7654
|
const {
|
|
7654
7655
|
visible: e,
|
|
7655
7656
|
formRef: r,
|
|
@@ -7665,7 +7666,7 @@ const Tc = (t) => {
|
|
|
7665
7666
|
setCurrentItemIndex: m
|
|
7666
7667
|
} = t;
|
|
7667
7668
|
return e ? /* @__PURE__ */ V(Q, { children: [
|
|
7668
|
-
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
7669
|
+
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(gc, { toolbar: a == null ? void 0 : a.toolbar }) }),
|
|
7669
7670
|
/* @__PURE__ */ n(
|
|
7670
7671
|
Jt,
|
|
7671
7672
|
{
|
|
@@ -7685,7 +7686,7 @@ const Tc = (t) => {
|
|
|
7685
7686
|
)
|
|
7686
7687
|
] }) : null;
|
|
7687
7688
|
};
|
|
7688
|
-
function
|
|
7689
|
+
function Oc(t) {
|
|
7689
7690
|
const { onSearch: e, disabled: r = !1, searchText: i } = t, { t: o } = H(he), [s] = lt.useForm(), [a, l] = b(!1);
|
|
7690
7691
|
function d(c) {
|
|
7691
7692
|
e(c.search);
|
|
@@ -7696,7 +7697,7 @@ function Ic(t) {
|
|
|
7696
7697
|
function u() {
|
|
7697
7698
|
l(!1), s.setFieldsValue({ search: void 0 }), e(void 0);
|
|
7698
7699
|
}
|
|
7699
|
-
return /* @__PURE__ */ n(lt, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ V(
|
|
7700
|
+
return /* @__PURE__ */ n(lt, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ V(we, { align: "middle", justify: "end", children: [
|
|
7700
7701
|
/* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(lt.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ n(
|
|
7701
7702
|
it,
|
|
7702
7703
|
{
|
|
@@ -7726,10 +7727,10 @@ function Ic(t) {
|
|
|
7726
7727
|
) })
|
|
7727
7728
|
] }) });
|
|
7728
7729
|
}
|
|
7729
|
-
const
|
|
7730
|
+
const _c = Qe.createContext({
|
|
7730
7731
|
previewFeatures: !1
|
|
7731
7732
|
});
|
|
7732
|
-
function
|
|
7733
|
+
function Rc(t) {
|
|
7733
7734
|
var X;
|
|
7734
7735
|
const {
|
|
7735
7736
|
availableViews: e,
|
|
@@ -7748,7 +7749,7 @@ function _c(t) {
|
|
|
7748
7749
|
searchVisible: h,
|
|
7749
7750
|
setSearchVisible: p,
|
|
7750
7751
|
setSearchTreeNameSearch: y,
|
|
7751
|
-
searchTreeNameSearch:
|
|
7752
|
+
searchTreeNameSearch: v,
|
|
7752
7753
|
treeIsLoading: T,
|
|
7753
7754
|
setPreviousView: I,
|
|
7754
7755
|
previousView: C,
|
|
@@ -7756,13 +7757,13 @@ function _c(t) {
|
|
|
7756
7757
|
limit: _,
|
|
7757
7758
|
totalItems: A
|
|
7758
7759
|
} = H(rt), { parentContext: x = {}, treeExpandable: S, toolbar: F } = t;
|
|
7759
|
-
H(
|
|
7760
|
-
const { t:
|
|
7760
|
+
H(_c);
|
|
7761
|
+
const { t: w, lang: E } = H(he), P = H(
|
|
7761
7762
|
Pt
|
|
7762
|
-
), { processAction: M } = P || {}, [j, N] = b(!1), B =
|
|
7763
|
+
), { processAction: M } = P || {}, [j, N] = b(!1), B = v !== void 0 && v.trim().length > 0;
|
|
7763
7764
|
function K() {
|
|
7764
7765
|
qt({
|
|
7765
|
-
confirmMessage:
|
|
7766
|
+
confirmMessage: w("confirmRemove"),
|
|
7766
7767
|
lang: E,
|
|
7767
7768
|
onOk: () => {
|
|
7768
7769
|
R();
|
|
@@ -7825,10 +7826,10 @@ function _c(t) {
|
|
|
7825
7826
|
] }),
|
|
7826
7827
|
S ? null : /* @__PURE__ */ V(Q, { children: [
|
|
7827
7828
|
/* @__PURE__ */ n(
|
|
7828
|
-
|
|
7829
|
+
Oc,
|
|
7829
7830
|
{
|
|
7830
7831
|
disabled: l || a || T,
|
|
7831
|
-
searchText:
|
|
7832
|
+
searchText: v,
|
|
7832
7833
|
onSearch: (Y) => {
|
|
7833
7834
|
Y && Y.trim().length > 0 ? y == null || y(Y) : y == null || y(void 0);
|
|
7834
7835
|
}
|
|
@@ -7843,7 +7844,7 @@ function _c(t) {
|
|
|
7843
7844
|
style: { color: h ? "white" : void 0 }
|
|
7844
7845
|
}
|
|
7845
7846
|
),
|
|
7846
|
-
tooltip:
|
|
7847
|
+
tooltip: w("advanced_search"),
|
|
7847
7848
|
type: h ? "primary" : "default",
|
|
7848
7849
|
onClick: () => {
|
|
7849
7850
|
p == null || p(!h);
|
|
@@ -7858,7 +7859,7 @@ function _c(t) {
|
|
|
7858
7859
|
Ze,
|
|
7859
7860
|
{
|
|
7860
7861
|
icon: /* @__PURE__ */ n(zn, {}),
|
|
7861
|
-
tooltip:
|
|
7862
|
+
tooltip: w("duplicate"),
|
|
7862
7863
|
disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || T,
|
|
7863
7864
|
loading: l,
|
|
7864
7865
|
onClick: U
|
|
@@ -7868,7 +7869,7 @@ function _c(t) {
|
|
|
7868
7869
|
Ze,
|
|
7869
7870
|
{
|
|
7870
7871
|
icon: /* @__PURE__ */ n(Un, {}),
|
|
7871
|
-
tooltip:
|
|
7872
|
+
tooltip: w("delete"),
|
|
7872
7873
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7873
7874
|
loading: a,
|
|
7874
7875
|
onClick: K
|
|
@@ -7880,11 +7881,11 @@ function _c(t) {
|
|
|
7880
7881
|
Ze,
|
|
7881
7882
|
{
|
|
7882
7883
|
icon: /* @__PURE__ */ n(qr, {}),
|
|
7883
|
-
tooltip:
|
|
7884
|
+
tooltip: w("showLogs"),
|
|
7884
7885
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7885
7886
|
loading: !1,
|
|
7886
7887
|
onClick: () => {
|
|
7887
|
-
Oo(u, o[0].id,
|
|
7888
|
+
Oo(u, o[0].id, w);
|
|
7888
7889
|
}
|
|
7889
7890
|
}
|
|
7890
7891
|
),
|
|
@@ -7892,7 +7893,7 @@ function _c(t) {
|
|
|
7892
7893
|
Ze,
|
|
7893
7894
|
{
|
|
7894
7895
|
icon: /* @__PURE__ */ n(un, {}),
|
|
7895
|
-
tooltip:
|
|
7896
|
+
tooltip: w("refresh"),
|
|
7896
7897
|
disabled: l || a || T,
|
|
7897
7898
|
loading: !1,
|
|
7898
7899
|
onClick: () => {
|
|
@@ -7922,7 +7923,7 @@ function _c(t) {
|
|
|
7922
7923
|
{
|
|
7923
7924
|
icon: /* @__PURE__ */ n(Yn, {}),
|
|
7924
7925
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7925
|
-
tooltip:
|
|
7926
|
+
tooltip: w("actions"),
|
|
7926
7927
|
items: F == null ? void 0 : F.action,
|
|
7927
7928
|
onItemClick: (Y) => {
|
|
7928
7929
|
Y && ne(Y);
|
|
@@ -7934,7 +7935,7 @@ function _c(t) {
|
|
|
7934
7935
|
{
|
|
7935
7936
|
icon: /* @__PURE__ */ n(Gn, {}),
|
|
7936
7937
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7937
|
-
tooltip:
|
|
7938
|
+
tooltip: w("reports"),
|
|
7938
7939
|
items: F == null ? void 0 : F.print,
|
|
7939
7940
|
onItemClick: (Y) => {
|
|
7940
7941
|
Y && ne({
|
|
@@ -7977,15 +7978,15 @@ function _c(t) {
|
|
|
7977
7978
|
)
|
|
7978
7979
|
}
|
|
7979
7980
|
),
|
|
7980
|
-
tooltip:
|
|
7981
|
+
tooltip: w("export"),
|
|
7981
7982
|
items: [
|
|
7982
7983
|
{
|
|
7983
7984
|
id: "print_screen",
|
|
7984
|
-
name:
|
|
7985
|
+
name: w("printScreen")
|
|
7985
7986
|
},
|
|
7986
7987
|
{
|
|
7987
7988
|
id: "export",
|
|
7988
|
-
name:
|
|
7989
|
+
name: w("advancedExport")
|
|
7989
7990
|
}
|
|
7990
7991
|
],
|
|
7991
7992
|
onItemClick: (Y) => {
|
|
@@ -8009,7 +8010,7 @@ function _c(t) {
|
|
|
8009
8010
|
}
|
|
8010
8011
|
),
|
|
8011
8012
|
/* @__PURE__ */ n(
|
|
8012
|
-
|
|
8013
|
+
tc,
|
|
8013
8014
|
{
|
|
8014
8015
|
visible: j,
|
|
8015
8016
|
locale: E,
|
|
@@ -8031,7 +8032,7 @@ function _c(t) {
|
|
|
8031
8032
|
function yt() {
|
|
8032
8033
|
return /* @__PURE__ */ n("div", { className: "inline-block w-2" });
|
|
8033
8034
|
}
|
|
8034
|
-
const
|
|
8035
|
+
const Vc = (t) => {
|
|
8035
8036
|
const {
|
|
8036
8037
|
visible: e,
|
|
8037
8038
|
searchTreeRef: r,
|
|
@@ -8051,7 +8052,7 @@ const Rc = (t) => {
|
|
|
8051
8052
|
);
|
|
8052
8053
|
return e ? /* @__PURE__ */ V(Q, { children: [
|
|
8053
8054
|
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
8054
|
-
|
|
8055
|
+
Rc,
|
|
8055
8056
|
{
|
|
8056
8057
|
toolbar: a == null ? void 0 : a.toolbar,
|
|
8057
8058
|
parentContext: o,
|
|
@@ -8059,7 +8060,7 @@ const Rc = (t) => {
|
|
|
8059
8060
|
}
|
|
8060
8061
|
) }),
|
|
8061
8062
|
/* @__PURE__ */ n(
|
|
8062
|
-
|
|
8063
|
+
vo,
|
|
8063
8064
|
{
|
|
8064
8065
|
ref: r,
|
|
8065
8066
|
rootTree: !0,
|
|
@@ -8070,9 +8071,9 @@ const Rc = (t) => {
|
|
|
8070
8071
|
treeView: a,
|
|
8071
8072
|
domain: l,
|
|
8072
8073
|
onRowClicked: (y) => {
|
|
8073
|
-
const { id:
|
|
8074
|
-
c(
|
|
8075
|
-
const T = u.findIndex((C) => C.id ===
|
|
8074
|
+
const { id: v } = y;
|
|
8075
|
+
c(v);
|
|
8076
|
+
const T = u.findIndex((C) => C.id === v);
|
|
8076
8077
|
p == null || p(h), d(T);
|
|
8077
8078
|
const I = m.find(
|
|
8078
8079
|
(C) => C.type === "form"
|
|
@@ -8082,7 +8083,7 @@ const Rc = (t) => {
|
|
|
8082
8083
|
}
|
|
8083
8084
|
)
|
|
8084
8085
|
] }) : null;
|
|
8085
|
-
}, tr = Qe.createContext(null),
|
|
8086
|
+
}, tr = Qe.createContext(null), Ac = (t) => {
|
|
8086
8087
|
const [e, r] = b(!1), [i, o] = b(!1), { children: s, dashboardRef: a, openAction: l } = t;
|
|
8087
8088
|
return /* @__PURE__ */ n(
|
|
8088
8089
|
tr.Provider,
|
|
@@ -8099,7 +8100,7 @@ const Rc = (t) => {
|
|
|
8099
8100
|
}
|
|
8100
8101
|
);
|
|
8101
8102
|
};
|
|
8102
|
-
function
|
|
8103
|
+
function Dc() {
|
|
8103
8104
|
const { isLoading: t, dashboardRef: e, moveItemsEnabled: r, setMoveItemsEnabled: i } = H(tr), { t: o } = H(he);
|
|
8104
8105
|
return /* @__PURE__ */ V(We, { wrap: !0, children: [
|
|
8105
8106
|
/* @__PURE__ */ n(
|
|
@@ -8120,11 +8121,11 @@ function Ac() {
|
|
|
8120
8121
|
}
|
|
8121
8122
|
}
|
|
8122
8123
|
),
|
|
8123
|
-
|
|
8124
|
+
kc(),
|
|
8124
8125
|
/* @__PURE__ */ n(
|
|
8125
8126
|
Ze,
|
|
8126
8127
|
{
|
|
8127
|
-
icon: /* @__PURE__ */ n(
|
|
8128
|
+
icon: /* @__PURE__ */ n(vi, {}),
|
|
8128
8129
|
tooltip: o("configDashboard"),
|
|
8129
8130
|
disabled: t,
|
|
8130
8131
|
loading: !1,
|
|
@@ -8147,24 +8148,24 @@ function Ac() {
|
|
|
8147
8148
|
)
|
|
8148
8149
|
] });
|
|
8149
8150
|
}
|
|
8150
|
-
function
|
|
8151
|
+
function kc() {
|
|
8151
8152
|
return /* @__PURE__ */ n("div", { className: "inline-block w-2" });
|
|
8152
8153
|
}
|
|
8153
|
-
const
|
|
8154
|
+
const Ec = (t) => {
|
|
8154
8155
|
const { dashboardData: e } = t, r = de(), i = H(
|
|
8155
8156
|
dt
|
|
8156
8157
|
), { openShortcut: o } = i || {};
|
|
8157
8158
|
return e ? /* @__PURE__ */ V(
|
|
8158
|
-
|
|
8159
|
+
Ac,
|
|
8159
8160
|
{
|
|
8160
8161
|
dashboardRef: r,
|
|
8161
8162
|
openAction: (s) => {
|
|
8162
8163
|
o(s);
|
|
8163
8164
|
},
|
|
8164
8165
|
children: [
|
|
8165
|
-
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
8166
|
+
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(Dc, {}) }),
|
|
8166
8167
|
/* @__PURE__ */ n(
|
|
8167
|
-
|
|
8168
|
+
Uc,
|
|
8168
8169
|
{
|
|
8169
8170
|
ref: r,
|
|
8170
8171
|
model: e.model,
|
|
@@ -8177,7 +8178,7 @@ const kc = (t) => {
|
|
|
8177
8178
|
}
|
|
8178
8179
|
) : null;
|
|
8179
8180
|
};
|
|
8180
|
-
async function
|
|
8181
|
+
async function Mc(t) {
|
|
8181
8182
|
const e = await Promise.all(
|
|
8182
8183
|
t.map(async (i) => {
|
|
8183
8184
|
try {
|
|
@@ -8192,7 +8193,7 @@ async function Ec(t) {
|
|
|
8192
8193
|
info: e[o]
|
|
8193
8194
|
})).filter((i) => i.info !== null);
|
|
8194
8195
|
}
|
|
8195
|
-
function
|
|
8196
|
+
function Nc(t, e) {
|
|
8196
8197
|
const {
|
|
8197
8198
|
domain: r,
|
|
8198
8199
|
model: i,
|
|
@@ -8209,15 +8210,15 @@ function Mc(t, e) {
|
|
|
8209
8210
|
action_type: h,
|
|
8210
8211
|
treeExpandable: p = !1,
|
|
8211
8212
|
limit: y
|
|
8212
|
-
} = t, [
|
|
8213
|
+
} = t, [v, T] = b(), [I, C] = b([]), [O, _] = b(!0), A = m || void 0, [x, S] = b(
|
|
8213
8214
|
A
|
|
8214
|
-
), [F,
|
|
8215
|
+
), [F, w] = b([]), [E, P] = b(), [M, j] = b([]), [N, B] = b(), [K, R] = b(0), [U, ne] = b(!1), [X, Y] = b(!1), [G, k] = b(), { t: L } = H(he) || {}, ee = de(), le = de(), Fe = H(
|
|
8215
8216
|
dt
|
|
8216
8217
|
), {
|
|
8217
8218
|
setCurrentView: J,
|
|
8218
8219
|
setCurrentId: q,
|
|
8219
8220
|
tabs: be,
|
|
8220
|
-
activeKey:
|
|
8221
|
+
activeKey: ve,
|
|
8221
8222
|
openAction: je,
|
|
8222
8223
|
onRemoveTab: ke
|
|
8223
8224
|
} = Fe || {};
|
|
@@ -8226,7 +8227,7 @@ function Mc(t, e) {
|
|
|
8226
8227
|
(Z) => {
|
|
8227
8228
|
Z.preventDefault(), Ee();
|
|
8228
8229
|
},
|
|
8229
|
-
[
|
|
8230
|
+
[ve, be, v, E, M]
|
|
8230
8231
|
);
|
|
8231
8232
|
function Le(Z) {
|
|
8232
8233
|
S(Z), q == null || q(Z);
|
|
@@ -8254,7 +8255,7 @@ function Mc(t, e) {
|
|
|
8254
8255
|
viewTuple: ie
|
|
8255
8256
|
});
|
|
8256
8257
|
}
|
|
8257
|
-
const Ve = await
|
|
8258
|
+
const Ve = await Mc(xe);
|
|
8258
8259
|
for (const ie of Ve) {
|
|
8259
8260
|
if (!ie)
|
|
8260
8261
|
continue;
|
|
@@ -8321,13 +8322,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8321
8322
|
const Z = I.find((Ve) => Ve.type === "tree"), xe = I.find((Ve) => u.id ? Ve.type === u.type && Ve.view_id === u.id : Ve.type === u.type);
|
|
8322
8323
|
Ge(xe || Z), m ? q == null || q(A) : (Le(void 0), P(void 0)), Ce();
|
|
8323
8324
|
}, [i, s, m]), me(() => {
|
|
8324
|
-
|
|
8325
|
-
}, [be,
|
|
8325
|
+
ve === d && (q == null || q(x), J == null || J(v));
|
|
8326
|
+
}, [be, ve]);
|
|
8326
8327
|
async function oe() {
|
|
8327
|
-
return
|
|
8328
|
+
return v && v.type === "form" ? await ee.current.cancelUnsavedChanges() : !0;
|
|
8328
8329
|
}
|
|
8329
8330
|
async function Ee() {
|
|
8330
|
-
|
|
8331
|
+
ve === d && (v.type === "form" && !await ee.current.cancelUnsavedChanges() || ne(!0));
|
|
8331
8332
|
}
|
|
8332
8333
|
async function ye(Z) {
|
|
8333
8334
|
var ie;
|
|
@@ -8369,11 +8370,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8369
8370
|
switch (Z.type) {
|
|
8370
8371
|
case "form":
|
|
8371
8372
|
return /* @__PURE__ */ n(
|
|
8372
|
-
|
|
8373
|
+
Ic,
|
|
8373
8374
|
{
|
|
8374
8375
|
formRef: ee,
|
|
8375
8376
|
currentId: x,
|
|
8376
|
-
visible:
|
|
8377
|
+
visible: v.type === Z.type && v.view_id === Z.view_id,
|
|
8377
8378
|
formView: Z,
|
|
8378
8379
|
model: i,
|
|
8379
8380
|
context: o,
|
|
@@ -8388,9 +8389,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8388
8389
|
);
|
|
8389
8390
|
case "tree":
|
|
8390
8391
|
return /* @__PURE__ */ n(
|
|
8391
|
-
|
|
8392
|
+
Vc,
|
|
8392
8393
|
{
|
|
8393
|
-
visible:
|
|
8394
|
+
visible: v.type === Z.type && v.view_id === Z.view_id,
|
|
8394
8395
|
limit: y,
|
|
8395
8396
|
model: i,
|
|
8396
8397
|
context: o,
|
|
@@ -8409,9 +8410,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8409
8410
|
);
|
|
8410
8411
|
case "graph":
|
|
8411
8412
|
return /* @__PURE__ */ n(
|
|
8412
|
-
|
|
8413
|
+
Fc,
|
|
8413
8414
|
{
|
|
8414
|
-
visible:
|
|
8415
|
+
visible: v.type === Z.type && v.view_id === Z.view_id,
|
|
8415
8416
|
viewData: Z,
|
|
8416
8417
|
model: i,
|
|
8417
8418
|
context: o,
|
|
@@ -8423,7 +8424,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8423
8424
|
);
|
|
8424
8425
|
case "dashboard":
|
|
8425
8426
|
return /* @__PURE__ */ n(
|
|
8426
|
-
|
|
8427
|
+
Ec,
|
|
8427
8428
|
{
|
|
8428
8429
|
dashboardData: Z
|
|
8429
8430
|
},
|
|
@@ -8433,7 +8434,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8433
8434
|
});
|
|
8434
8435
|
}
|
|
8435
8436
|
function He() {
|
|
8436
|
-
if (x === void 0 &&
|
|
8437
|
+
if (x === void 0 && v.type === "form")
|
|
8437
8438
|
ee.current.clearAndReload();
|
|
8438
8439
|
else {
|
|
8439
8440
|
Le(void 0);
|
|
@@ -8443,11 +8444,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8443
8444
|
Ge(Z);
|
|
8444
8445
|
}
|
|
8445
8446
|
}
|
|
8446
|
-
return O ? /* @__PURE__ */ n(Ae, {}) :
|
|
8447
|
-
|
|
8447
|
+
return O ? /* @__PURE__ */ n(Ae, {}) : v ? /* @__PURE__ */ V(
|
|
8448
|
+
fa,
|
|
8448
8449
|
{
|
|
8449
8450
|
title: a,
|
|
8450
|
-
currentView:
|
|
8451
|
+
currentView: v,
|
|
8451
8452
|
setCurrentView: Ge,
|
|
8452
8453
|
availableViews: I,
|
|
8453
8454
|
formRef: ee,
|
|
@@ -8465,7 +8466,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8465
8466
|
totalItems: K,
|
|
8466
8467
|
setTotalItems: R,
|
|
8467
8468
|
selectedRowItems: F,
|
|
8468
|
-
setSelectedRowItems:
|
|
8469
|
+
setSelectedRowItems: w,
|
|
8469
8470
|
setSearchTreeNameSearch: k,
|
|
8470
8471
|
searchTreeNameSearch: G,
|
|
8471
8472
|
goToResourceId: ye,
|
|
@@ -8473,7 +8474,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8473
8474
|
children: [
|
|
8474
8475
|
Me(),
|
|
8475
8476
|
/* @__PURE__ */ n(
|
|
8476
|
-
|
|
8477
|
+
bc,
|
|
8477
8478
|
{
|
|
8478
8479
|
visible: U,
|
|
8479
8480
|
onIdSubmitted: ye,
|
|
@@ -8487,8 +8488,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8487
8488
|
}
|
|
8488
8489
|
) : null;
|
|
8489
8490
|
}
|
|
8490
|
-
const Vo =
|
|
8491
|
-
async function
|
|
8491
|
+
const Vo = wt(Nc);
|
|
8492
|
+
async function Pc({
|
|
8492
8493
|
actionId: t,
|
|
8493
8494
|
rootContext: e = {},
|
|
8494
8495
|
globalValues: r = {}
|
|
@@ -8496,7 +8497,7 @@ async function Nc({
|
|
|
8496
8497
|
const i = "ir.actions.act_window", o = `${i},${t}`, s = await D.getHandler().getActionData({
|
|
8497
8498
|
action: o,
|
|
8498
8499
|
context: e
|
|
8499
|
-
}), a =
|
|
8500
|
+
}), a = vt({
|
|
8500
8501
|
context: s.context,
|
|
8501
8502
|
values: r,
|
|
8502
8503
|
fields: {}
|
|
@@ -8525,7 +8526,7 @@ async function Nc({
|
|
|
8525
8526
|
h.push([O, C]);
|
|
8526
8527
|
}
|
|
8527
8528
|
}
|
|
8528
|
-
const [p, y] = h[0],
|
|
8529
|
+
const [p, y] = h[0], v = { id: p, type: y };
|
|
8529
8530
|
return {
|
|
8530
8531
|
title: c,
|
|
8531
8532
|
actionId: t,
|
|
@@ -8535,12 +8536,12 @@ async function Nc({
|
|
|
8535
8536
|
model: d,
|
|
8536
8537
|
context: { ...e, ...a },
|
|
8537
8538
|
domain: l,
|
|
8538
|
-
initialView:
|
|
8539
|
+
initialView: v,
|
|
8539
8540
|
limit: f,
|
|
8540
8541
|
treeExpandable: g
|
|
8541
8542
|
};
|
|
8542
8543
|
}
|
|
8543
|
-
const
|
|
8544
|
+
const Lc = ji(Yi), Bc = (t) => {
|
|
8544
8545
|
const { children: e = [], onPositionItemsChanged: r } = t, i = Qe.Children.map(
|
|
8545
8546
|
e,
|
|
8546
8547
|
(o) => {
|
|
@@ -8549,7 +8550,7 @@ const Pc = Wi(ji), Lc = (t) => {
|
|
|
8549
8550
|
}
|
|
8550
8551
|
);
|
|
8551
8552
|
return /* @__PURE__ */ n(
|
|
8552
|
-
|
|
8553
|
+
Lc,
|
|
8553
8554
|
{
|
|
8554
8555
|
className: "layout",
|
|
8555
8556
|
cols: { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 },
|
|
@@ -8569,8 +8570,8 @@ const Pc = Wi(ji), Lc = (t) => {
|
|
|
8569
8570
|
children: i
|
|
8570
8571
|
}
|
|
8571
8572
|
);
|
|
8572
|
-
}, { useToken:
|
|
8573
|
-
const { title: e, children: r, action: i, openAction: o } = t, { token: s } =
|
|
8573
|
+
}, { useToken: $c } = Pe, { Text: Hc } = Yt, Kc = (t) => {
|
|
8574
|
+
const { title: e, children: r, action: i, openAction: o } = t, { token: s } = $c();
|
|
8574
8575
|
return /* @__PURE__ */ V(
|
|
8575
8576
|
"div",
|
|
8576
8577
|
{
|
|
@@ -8586,7 +8587,7 @@ const Pc = Wi(ji), Lc = (t) => {
|
|
|
8586
8587
|
},
|
|
8587
8588
|
children: [
|
|
8588
8589
|
/* @__PURE__ */ V(
|
|
8589
|
-
|
|
8590
|
+
we,
|
|
8590
8591
|
{
|
|
8591
8592
|
align: "middle",
|
|
8592
8593
|
style: {
|
|
@@ -8606,11 +8607,11 @@ const Pc = Wi(ji), Lc = (t) => {
|
|
|
8606
8607
|
cursor: "grab",
|
|
8607
8608
|
overflow: "hidden"
|
|
8608
8609
|
},
|
|
8609
|
-
children: /* @__PURE__ */ n(
|
|
8610
|
+
children: /* @__PURE__ */ n(Hc, { ellipsis: !0, children: e })
|
|
8610
8611
|
}
|
|
8611
8612
|
),
|
|
8612
|
-
i && /* @__PURE__ */ n(ae, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ n(
|
|
8613
|
-
|
|
8613
|
+
i && /* @__PURE__ */ n(ae, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ n(we, { justify: "end", align: "middle", children: /* @__PURE__ */ n(
|
|
8614
|
+
wi,
|
|
8614
8615
|
{
|
|
8615
8616
|
style: { cursor: "pointer" },
|
|
8616
8617
|
onClick: () => {
|
|
@@ -8625,8 +8626,8 @@ const Pc = Wi(ji), Lc = (t) => {
|
|
|
8625
8626
|
]
|
|
8626
8627
|
}
|
|
8627
8628
|
);
|
|
8628
|
-
},
|
|
8629
|
-
function
|
|
8629
|
+
}, Wc = 80;
|
|
8630
|
+
function jc(t) {
|
|
8630
8631
|
const {
|
|
8631
8632
|
action: e,
|
|
8632
8633
|
model: r,
|
|
@@ -8635,17 +8636,17 @@ function Wc(t) {
|
|
|
8635
8636
|
domain: s = [],
|
|
8636
8637
|
visible: a = !0,
|
|
8637
8638
|
parentContext: l = {}
|
|
8638
|
-
} = t, [d, u] = b(!1), [c, f] = b(!1), [m, g] = b(), [h, p] = b(), [y,
|
|
8639
|
+
} = t, [d, u] = b(!1), [c, f] = b(!1), [m, g] = b(), [h, p] = b(), [y, v] = b(), [T, I] = b(1), [C, O] = b(0), _ = de(Wc), A = de([]), [x, S] = b(0), [F, w] = b([]), [E, P] = b(void 0), [M, j] = b(), [N, B] = b(), [K, R] = b(), [U, ne] = b(!1), X = de([]), Y = (q) => {
|
|
8639
8640
|
ne(!0), I(q), O((q - 1) * _.current);
|
|
8640
8641
|
}, G = async () => {
|
|
8641
|
-
const q = X.current.length > 0 ? X.current : s, be = Wt(A.current, q), { colors:
|
|
8642
|
+
const q = X.current.length > 0 ? X.current : s, be = Wt(A.current, q), { colors: ve } = _t(h), { totalItems: je, results: ke, attrsEvaluated: Le } = await D.getHandler().searchForTree({
|
|
8642
8643
|
params: be,
|
|
8643
8644
|
limit: _.current,
|
|
8644
8645
|
offset: C,
|
|
8645
8646
|
model: m,
|
|
8646
8647
|
fields: h.fields,
|
|
8647
8648
|
context: l,
|
|
8648
|
-
attrs:
|
|
8649
|
+
attrs: ve && { colors: ve }
|
|
8649
8650
|
});
|
|
8650
8651
|
P(tn(Le));
|
|
8651
8652
|
const Ge = Rt({
|
|
@@ -8653,7 +8654,7 @@ function Wc(t) {
|
|
|
8653
8654
|
sorter: M,
|
|
8654
8655
|
fields: { ...h.fields, ...y.fields }
|
|
8655
8656
|
});
|
|
8656
|
-
ne(!1),
|
|
8657
|
+
ne(!1), w(Ge);
|
|
8657
8658
|
const Ce = await je;
|
|
8658
8659
|
S(Ce);
|
|
8659
8660
|
}, k = async () => {
|
|
@@ -8680,7 +8681,7 @@ function Wc(t) {
|
|
|
8680
8681
|
action: e,
|
|
8681
8682
|
context: l
|
|
8682
8683
|
});
|
|
8683
|
-
X.current = q.domain,
|
|
8684
|
+
X.current = q.domain, v(q.views.get("form")), p(q.views.get("tree")), g(q.model), _.current = q.limit;
|
|
8684
8685
|
}, le = async () => {
|
|
8685
8686
|
g(r);
|
|
8686
8687
|
const q = await D.getHandler().getView({
|
|
@@ -8688,7 +8689,7 @@ function Wc(t) {
|
|
|
8688
8689
|
type: "form",
|
|
8689
8690
|
context: l
|
|
8690
8691
|
});
|
|
8691
|
-
|
|
8692
|
+
v(q);
|
|
8692
8693
|
const be = await D.getHandler().getView({
|
|
8693
8694
|
model: r,
|
|
8694
8695
|
type: "tree",
|
|
@@ -8730,7 +8731,7 @@ function Wc(t) {
|
|
|
8730
8731
|
sorter: q,
|
|
8731
8732
|
fields: { ...h.fields, ...y.fields }
|
|
8732
8733
|
});
|
|
8733
|
-
|
|
8734
|
+
w(be);
|
|
8734
8735
|
},
|
|
8735
8736
|
context: l
|
|
8736
8737
|
}
|
|
@@ -8738,7 +8739,7 @@ function Wc(t) {
|
|
|
8738
8739
|
] });
|
|
8739
8740
|
return K ? /* @__PURE__ */ n(et, { className: "mt-10", message: K, type: "error", banner: !0 }) : d ? /* @__PURE__ */ n(Ae, { style: { padding: "2rem" } }) : J();
|
|
8740
8741
|
}
|
|
8741
|
-
const
|
|
8742
|
+
const Yc = (t) => {
|
|
8742
8743
|
const { model: e } = t, [r, i] = b();
|
|
8743
8744
|
me(() => {
|
|
8744
8745
|
o();
|
|
@@ -8753,27 +8754,27 @@ const jc = (t) => {
|
|
|
8753
8754
|
}
|
|
8754
8755
|
return /* @__PURE__ */ n("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ n(Jt, { ...t, model: e, id: r, readOnly: !0 }) });
|
|
8755
8756
|
}, On = "line_ids";
|
|
8756
|
-
function
|
|
8757
|
+
function Gc(t, e) {
|
|
8757
8758
|
const { model: r, context: i = {}, id: o, configAction: s } = t, [a, l] = b([]), [d, u] = b(!1), [c, f] = b(), {
|
|
8758
8759
|
setIsLoading: m,
|
|
8759
8760
|
openAction: g,
|
|
8760
8761
|
moveItemsEnabled: h
|
|
8761
8762
|
} = H(tr), p = de(), y = de();
|
|
8762
8763
|
me(() => {
|
|
8763
|
-
|
|
8764
|
+
v();
|
|
8764
8765
|
}, [r, o, i]), bt(e, () => ({
|
|
8765
8766
|
refresh: () => {
|
|
8766
|
-
|
|
8767
|
+
v();
|
|
8767
8768
|
},
|
|
8768
8769
|
configDashboard: A
|
|
8769
8770
|
}));
|
|
8770
|
-
async function
|
|
8771
|
+
async function v() {
|
|
8771
8772
|
u(!0), m(!0), f(void 0);
|
|
8772
8773
|
try {
|
|
8773
|
-
const x = await T(), S = await C(x), F = x.fields[On].relation,
|
|
8774
|
+
const x = await T(), S = await C(x), F = x.fields[On].relation, w = S[On].items;
|
|
8774
8775
|
y.current = x.fields;
|
|
8775
8776
|
const E = await I({
|
|
8776
|
-
items:
|
|
8777
|
+
items: w,
|
|
8777
8778
|
model: F,
|
|
8778
8779
|
context: i
|
|
8779
8780
|
}), P = await O(E);
|
|
@@ -8799,7 +8800,7 @@ function Yc(t, e) {
|
|
|
8799
8800
|
type: "form",
|
|
8800
8801
|
context: F
|
|
8801
8802
|
})).fields;
|
|
8802
|
-
const [
|
|
8803
|
+
const [w] = await Xn({
|
|
8803
8804
|
treeView: {
|
|
8804
8805
|
fields: p.current
|
|
8805
8806
|
},
|
|
@@ -8811,7 +8812,7 @@ function Yc(t, e) {
|
|
|
8811
8812
|
context: F,
|
|
8812
8813
|
currentView: "form"
|
|
8813
8814
|
});
|
|
8814
|
-
return
|
|
8815
|
+
return w;
|
|
8815
8816
|
}
|
|
8816
8817
|
async function C(x) {
|
|
8817
8818
|
return (await D.getHandler().readObjects({
|
|
@@ -8824,9 +8825,9 @@ function Yc(t, e) {
|
|
|
8824
8825
|
async function O(x) {
|
|
8825
8826
|
const S = [];
|
|
8826
8827
|
for (const F of x) {
|
|
8827
|
-
const { values:
|
|
8828
|
-
if (
|
|
8829
|
-
const E = parseInt(
|
|
8828
|
+
const { values: w } = F;
|
|
8829
|
+
if (w.action_id && w.action_id.length > 0) {
|
|
8830
|
+
const E = parseInt(w.action_id[0], 10), P = await Pc({
|
|
8830
8831
|
actionId: E,
|
|
8831
8832
|
rootContext: i
|
|
8832
8833
|
});
|
|
@@ -8854,7 +8855,7 @@ function Yc(t, e) {
|
|
|
8854
8855
|
});
|
|
8855
8856
|
if (S.length === 0)
|
|
8856
8857
|
return;
|
|
8857
|
-
const
|
|
8858
|
+
const w = a.filter((P) => S.map((M) => M.id).includes(P.id)).map((P) => {
|
|
8858
8859
|
const M = {
|
|
8859
8860
|
...S.find((j) => j.id === P.id)
|
|
8860
8861
|
};
|
|
@@ -8868,7 +8869,7 @@ function Yc(t, e) {
|
|
|
8868
8869
|
};
|
|
8869
8870
|
}), E = {
|
|
8870
8871
|
fields: p.current,
|
|
8871
|
-
items:
|
|
8872
|
+
items: w
|
|
8872
8873
|
};
|
|
8873
8874
|
await D.getHandler().update({
|
|
8874
8875
|
model: r,
|
|
@@ -8881,8 +8882,8 @@ function Yc(t, e) {
|
|
|
8881
8882
|
async function A() {
|
|
8882
8883
|
g(s);
|
|
8883
8884
|
}
|
|
8884
|
-
return c ? (console.log(c), /* @__PURE__ */ n(et, { className: "mt-10 mb-20", message: c, type: "error", banner: !0 })) : d ? /* @__PURE__ */ n(st, {}) : /* @__PURE__ */ n(
|
|
8885
|
-
const { actionData: F, values:
|
|
8885
|
+
return c ? (console.log(c), /* @__PURE__ */ n(et, { className: "mt-10 mb-20", message: c, type: "error", banner: !0 })) : d ? /* @__PURE__ */ n(st, {}) : /* @__PURE__ */ n(Bc, { onPositionItemsChanged: _, children: a.map((x, S) => {
|
|
8886
|
+
const { actionData: F, values: w } = x, { position: E, id: P } = w, {
|
|
8886
8887
|
actionId: M,
|
|
8887
8888
|
actionType: j,
|
|
8888
8889
|
key: N,
|
|
@@ -8915,10 +8916,10 @@ function Yc(t, e) {
|
|
|
8915
8916
|
}
|
|
8916
8917
|
);
|
|
8917
8918
|
else if ((X == null ? void 0 : X.type) === "form")
|
|
8918
|
-
k = /* @__PURE__ */ n(
|
|
8919
|
+
k = /* @__PURE__ */ n(Yc, { model: R, actionDomain: ne });
|
|
8919
8920
|
else if ((X == null ? void 0 : X.type) === "tree")
|
|
8920
8921
|
k = /* @__PURE__ */ n(
|
|
8921
|
-
|
|
8922
|
+
jc,
|
|
8922
8923
|
{
|
|
8923
8924
|
model: R,
|
|
8924
8925
|
domain: ne,
|
|
@@ -8933,12 +8934,12 @@ function Yc(t, e) {
|
|
|
8933
8934
|
if (Fe) {
|
|
8934
8935
|
const [J, q] = Fe, {
|
|
8935
8936
|
actionId: be,
|
|
8936
|
-
actionType:
|
|
8937
|
+
actionType: ve,
|
|
8937
8938
|
title: je,
|
|
8938
8939
|
model: ke
|
|
8939
8940
|
} = F, Le = {
|
|
8940
8941
|
action_id: be,
|
|
8941
|
-
action_type:
|
|
8942
|
+
action_type: ve,
|
|
8942
8943
|
name: je,
|
|
8943
8944
|
res_id: le.id,
|
|
8944
8945
|
res_model: ke,
|
|
@@ -8980,20 +8981,20 @@ function Yc(t, e) {
|
|
|
8980
8981
|
actionId: J,
|
|
8981
8982
|
actionType: q,
|
|
8982
8983
|
title: be,
|
|
8983
|
-
model:
|
|
8984
|
+
model: ve
|
|
8984
8985
|
} = F;
|
|
8985
8986
|
L = {
|
|
8986
8987
|
action_id: J,
|
|
8987
8988
|
action_type: q,
|
|
8988
8989
|
name: be,
|
|
8989
8990
|
res_id: !1,
|
|
8990
|
-
res_model:
|
|
8991
|
+
res_model: ve,
|
|
8991
8992
|
view_id: le,
|
|
8992
8993
|
view_type: Fe
|
|
8993
8994
|
};
|
|
8994
8995
|
}
|
|
8995
8996
|
return /* @__PURE__ */ n(
|
|
8996
|
-
|
|
8997
|
+
Kc,
|
|
8997
8998
|
{
|
|
8998
8999
|
id: P,
|
|
8999
9000
|
title: B,
|
|
@@ -9006,11 +9007,11 @@ function Yc(t, e) {
|
|
|
9006
9007
|
);
|
|
9007
9008
|
}) });
|
|
9008
9009
|
}
|
|
9009
|
-
const
|
|
9010
|
+
const Uc = wt(Gc), qc = (t) => {
|
|
9010
9011
|
const { ooui: e } = t;
|
|
9011
|
-
return /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(
|
|
9012
|
-
},
|
|
9013
|
-
const { value: e, ooui: r, onChange: i } = t, { items: o = [] } = e || {}, s = o.filter((x) => x.operation !== "pendingRemove").map((x) => x.id), [a, l] = b([]), [d, u] = b(), [c, f] = b(!1), { relation: m, context: g, readOnly: h, field: p, columns: y } = r,
|
|
9012
|
+
return /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(zc, { ooui: e }) });
|
|
9013
|
+
}, zc = (t) => {
|
|
9014
|
+
const { value: e, ooui: r, onChange: i } = t, { items: o = [] } = e || {}, s = o.filter((x) => x.operation !== "pendingRemove").map((x) => x.id), [a, l] = b([]), [d, u] = b(), [c, f] = b(!1), { relation: m, context: g, readOnly: h, field: p, columns: y } = r, v = H(Ne), { getContext: T } = v || {};
|
|
9014
9015
|
xt(() => {
|
|
9015
9016
|
C();
|
|
9016
9017
|
}, [o]);
|
|
@@ -9026,11 +9027,11 @@ const Gc = vt(Yc), Uc = (t) => {
|
|
|
9026
9027
|
const S = await D.getHandler().evalDomain({
|
|
9027
9028
|
domain: r.domain,
|
|
9028
9029
|
values: Nt({
|
|
9029
|
-
fields:
|
|
9030
|
-
values:
|
|
9030
|
+
fields: v == null ? void 0 : v.getFields(),
|
|
9031
|
+
values: v.getPlainValues()
|
|
9031
9032
|
}),
|
|
9032
|
-
fields:
|
|
9033
|
-
context:
|
|
9033
|
+
fields: v == null ? void 0 : v.getFields(),
|
|
9034
|
+
context: v.getContext()
|
|
9034
9035
|
});
|
|
9035
9036
|
x = [...x, ...S];
|
|
9036
9037
|
}
|
|
@@ -9038,12 +9039,12 @@ const Gc = vt(Yc), Uc = (t) => {
|
|
|
9038
9039
|
const F = (await D.getHandler().search({
|
|
9039
9040
|
model: m,
|
|
9040
9041
|
params: x,
|
|
9041
|
-
|
|
9042
|
+
fieldsToRetrieve: [p],
|
|
9042
9043
|
context: { ...T == null ? void 0 : T(), ...g }
|
|
9043
|
-
})).map((
|
|
9044
|
-
const E =
|
|
9044
|
+
})).map((w) => {
|
|
9045
|
+
const E = w[p];
|
|
9045
9046
|
let P = E;
|
|
9046
|
-
return Array.isArray(E) && (P = E[1]), { label: P, value:
|
|
9047
|
+
return Array.isArray(E) && (P = E[1]), { label: P, value: w.id };
|
|
9047
9048
|
});
|
|
9048
9049
|
l(F);
|
|
9049
9050
|
} catch (S) {
|
|
@@ -9059,12 +9060,12 @@ const Gc = vt(Yc), Uc = (t) => {
|
|
|
9059
9060
|
}, _ = () => {
|
|
9060
9061
|
A([]);
|
|
9061
9062
|
}, A = (x) => {
|
|
9062
|
-
const S = o.map((
|
|
9063
|
-
...
|
|
9063
|
+
const S = o.map((w) => x.includes(w.id) ? w.operation == "pendingRemove" ? {
|
|
9064
|
+
...w,
|
|
9064
9065
|
operation: "original"
|
|
9065
|
-
} :
|
|
9066
|
-
x.filter((
|
|
9067
|
-
S.push({ id:
|
|
9066
|
+
} : w : { id: w.id, operation: "pendingRemove" }), F = S.map((w) => w.id);
|
|
9067
|
+
x.filter((w) => !F.includes(w)).map((w) => {
|
|
9068
|
+
S.push({ id: w, operation: "pendingLink" });
|
|
9068
9069
|
}), I(S);
|
|
9069
9070
|
};
|
|
9070
9071
|
return c && a.length === 0 ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ V("div", { className: "flex flex-row", children: [
|
|
@@ -9075,7 +9076,7 @@ const Gc = vt(Yc), Uc = (t) => {
|
|
|
9075
9076
|
disabled: h,
|
|
9076
9077
|
onChange: A,
|
|
9077
9078
|
style: { width: "100%" },
|
|
9078
|
-
children: /* @__PURE__ */ n(
|
|
9079
|
+
children: /* @__PURE__ */ n(we, { children: a.map((x) => /* @__PURE__ */ n(ae, { span: Math.floor(24 / y), children: /* @__PURE__ */ n(Ht, { value: x.value, children: x.label }) })) })
|
|
9079
9080
|
}
|
|
9080
9081
|
),
|
|
9081
9082
|
!h && /* @__PURE__ */ V(We, { children: [
|
|
@@ -9090,37 +9091,44 @@ const Gc = vt(Yc), Uc = (t) => {
|
|
|
9090
9091
|
/* @__PURE__ */ n(Oe, { onClick: _, disabled: s.length === 0, children: "Uncheck all" })
|
|
9091
9092
|
] })
|
|
9092
9093
|
] }) });
|
|
9093
|
-
},
|
|
9094
|
+
}, Jc = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(Zc, { ...t }) }), Zc = (t) => {
|
|
9094
9095
|
const { value: e, ooui: r } = t;
|
|
9095
9096
|
return /* @__PURE__ */ n(
|
|
9096
9097
|
"div",
|
|
9097
9098
|
{
|
|
9098
9099
|
style: {
|
|
9099
|
-
height: r.height ? r.height + "px" : "100%",
|
|
9100
|
+
height: r != null && r.height ? r.height + "px" : "100%",
|
|
9100
9101
|
overflow: "auto"
|
|
9101
9102
|
},
|
|
9102
|
-
children: /* @__PURE__ */ n(
|
|
9103
|
+
children: /* @__PURE__ */ n(
|
|
9104
|
+
Bi,
|
|
9105
|
+
{
|
|
9106
|
+
remarkPlugins: [$i],
|
|
9107
|
+
className: "markdown-typography",
|
|
9108
|
+
children: e
|
|
9109
|
+
}
|
|
9110
|
+
)
|
|
9103
9111
|
}
|
|
9104
9112
|
);
|
|
9105
|
-
}, Zc = (t) => {
|
|
9106
|
-
const { ooui: e } = t, { required: r } = e;
|
|
9107
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(Xc, { ...t }) });
|
|
9108
9113
|
}, Xc = (t) => {
|
|
9114
|
+
const { ooui: e } = t, { required: r } = e;
|
|
9115
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(Qc, { ...t }) });
|
|
9116
|
+
}, Qc = (t) => {
|
|
9109
9117
|
const { ooui: e, onChange: r, value: i } = t, { selectionValues: o, readOnly: s, direction: a } = e, l = Array.from(o.entries()), d = l && l.length && l.map((u) => {
|
|
9110
9118
|
const [c, f] = u;
|
|
9111
9119
|
return /* @__PURE__ */ n(ar, { value: c, children: f }, c);
|
|
9112
9120
|
});
|
|
9113
9121
|
return /* @__PURE__ */ n(ar.Group, { disabled: s, onChange: r, value: i, children: /* @__PURE__ */ n(We, { direction: a, children: d }) });
|
|
9114
|
-
}, Qc = (t) => {
|
|
9115
|
-
const { ooui: e } = t, { id: r, readOnly: i, required: o } = e;
|
|
9116
|
-
return /* @__PURE__ */ n(ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ n(ed, { id: r, readOnly: i, required: o }) });
|
|
9117
9122
|
}, ed = (t) => {
|
|
9123
|
+
const { ooui: e } = t, { id: r, readOnly: i, required: o } = e;
|
|
9124
|
+
return /* @__PURE__ */ n(ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ n(td, { id: r, readOnly: i, required: o }) });
|
|
9125
|
+
}, td = (t) => {
|
|
9118
9126
|
const { required: e, readOnly: r, ...i } = t;
|
|
9119
9127
|
return /* @__PURE__ */ n("div", { className: "flex flex-row", children: /* @__PURE__ */ n(Qo, { disabled: r, ...i }) });
|
|
9120
|
-
}, td = (t) => {
|
|
9121
|
-
const { ooui: e } = t, { required: r } = e;
|
|
9122
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(nd, { ...t }) });
|
|
9123
9128
|
}, nd = (t) => {
|
|
9129
|
+
const { ooui: e } = t, { required: r } = e;
|
|
9130
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(rd, { ...t }) });
|
|
9131
|
+
}, rd = (t) => {
|
|
9124
9132
|
const { ooui: e, value: r } = t, { selectionValues: i, errorField: o } = e, s = H(Ne), a = Array.from(i.entries()), l = a.map((c) => c[0]).indexOf(r);
|
|
9125
9133
|
let d = "process", u = "";
|
|
9126
9134
|
return o && (u = s.getFieldValue(o), u && (d = "error")), /* @__PURE__ */ n(lr, { current: l, status: d, children: a.map((c, f) => /* @__PURE__ */ n(
|
|
@@ -9130,10 +9138,10 @@ const Gc = vt(Yc), Uc = (t) => {
|
|
|
9130
9138
|
description: f === l && d === "error" ? u : null
|
|
9131
9139
|
}
|
|
9132
9140
|
)) });
|
|
9133
|
-
},
|
|
9141
|
+
}, od = (t) => {
|
|
9134
9142
|
const { ooui: e } = t, { lang: r, height: i } = e, o = H(Ne), { elementHasLostFocus: s } = o || {};
|
|
9135
9143
|
return /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(
|
|
9136
|
-
|
|
9144
|
+
Hi,
|
|
9137
9145
|
{
|
|
9138
9146
|
defaultLanguage: r || "",
|
|
9139
9147
|
height: i || 300,
|
|
@@ -9142,15 +9150,15 @@ const Gc = vt(Yc), Uc = (t) => {
|
|
|
9142
9150
|
}
|
|
9143
9151
|
}
|
|
9144
9152
|
) });
|
|
9145
|
-
}, { Meta:
|
|
9146
|
-
at.extend(
|
|
9147
|
-
const
|
|
9148
|
-
const i = `https://www.gravatar.com/avatar/${
|
|
9153
|
+
}, { Meta: id } = Nn, { Text: sd } = Yt;
|
|
9154
|
+
at.extend(Ki);
|
|
9155
|
+
const ad = ({ email: t, size: e = 40, theme: r = "" }) => {
|
|
9156
|
+
const i = `https://www.gravatar.com/avatar/${Wi(
|
|
9149
9157
|
t
|
|
9150
9158
|
)}?s=${e}&d=${r}`;
|
|
9151
9159
|
return /* @__PURE__ */ n(Ar, { src: i, size: e });
|
|
9152
9160
|
};
|
|
9153
|
-
function
|
|
9161
|
+
function ld({ text: t }) {
|
|
9154
9162
|
const e = t.split(`
|
|
9155
9163
|
`);
|
|
9156
9164
|
return /* @__PURE__ */ n("div", { children: e.map((r, i) => /* @__PURE__ */ V(Qe.Fragment, { children: [
|
|
@@ -9158,13 +9166,13 @@ function ad({ text: t }) {
|
|
|
9158
9166
|
i !== e.length - 1 && /* @__PURE__ */ n("br", {})
|
|
9159
9167
|
] }, i)) });
|
|
9160
9168
|
}
|
|
9161
|
-
const
|
|
9169
|
+
const cd = (t) => {
|
|
9162
9170
|
const { data: e, style: r } = t, { t: i } = H(he);
|
|
9163
9171
|
return /* @__PURE__ */ V(Nn, { style: { ...r, textAlign: "start" }, children: [
|
|
9164
9172
|
/* @__PURE__ */ n(
|
|
9165
|
-
|
|
9173
|
+
id,
|
|
9166
9174
|
{
|
|
9167
|
-
avatar: /* @__PURE__ */ n(
|
|
9175
|
+
avatar: /* @__PURE__ */ n(ad, { email: e.email, theme: "mp" }),
|
|
9168
9176
|
title: e.author,
|
|
9169
9177
|
description: /* @__PURE__ */ V(We, { direction: "horizontal", children: [
|
|
9170
9178
|
/* @__PURE__ */ n("span", { title: e.date, children: at(e.date).fromNow() }),
|
|
@@ -9173,9 +9181,9 @@ const ld = (t) => {
|
|
|
9173
9181
|
style: { marginBottom: "5px" }
|
|
9174
9182
|
}
|
|
9175
9183
|
),
|
|
9176
|
-
/* @__PURE__ */ n(
|
|
9184
|
+
/* @__PURE__ */ n(sd, { children: /* @__PURE__ */ n(ld, { text: e.text }) })
|
|
9177
9185
|
] }, e.id);
|
|
9178
|
-
},
|
|
9186
|
+
}, dd = (t) => {
|
|
9179
9187
|
const { value: e } = t, r = (e || []).map((i) => {
|
|
9180
9188
|
if (i.type === "action")
|
|
9181
9189
|
return {
|
|
@@ -9186,27 +9194,27 @@ const ld = (t) => {
|
|
|
9186
9194
|
color: "gray",
|
|
9187
9195
|
position: i.event.isSender ? "left" : "right",
|
|
9188
9196
|
label: i.event.date,
|
|
9189
|
-
children: /* @__PURE__ */ n(
|
|
9197
|
+
children: /* @__PURE__ */ n(cd, { data: i.event })
|
|
9190
9198
|
};
|
|
9191
9199
|
});
|
|
9192
9200
|
return /* @__PURE__ */ n(_n, { mode: "alternate", items: r });
|
|
9193
|
-
},
|
|
9194
|
-
function
|
|
9201
|
+
}, ud = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(dd, {}) }), { Content: fd } = ei, { Title: md } = Yt;
|
|
9202
|
+
function hd() {
|
|
9195
9203
|
const { t } = H(he);
|
|
9196
|
-
return /* @__PURE__ */ n(
|
|
9204
|
+
return /* @__PURE__ */ n(fd, { className: "m-5 select-none", children: /* @__PURE__ */ n(md, { level: 5, children: t("welcome") }) });
|
|
9197
9205
|
}
|
|
9198
|
-
function
|
|
9206
|
+
function pd(t, e) {
|
|
9199
9207
|
const { children: r, globalValues: i = {}, rootContext: o = {}, lang: s } = t, [a, l] = b("welcome"), [d, u] = b([
|
|
9200
9208
|
{
|
|
9201
9209
|
title: Ie("welcome", s),
|
|
9202
9210
|
key: "welcome",
|
|
9203
9211
|
closable: !0,
|
|
9204
|
-
content: /* @__PURE__ */ n(
|
|
9212
|
+
content: /* @__PURE__ */ n(hd, {})
|
|
9205
9213
|
}
|
|
9206
9214
|
]), c = de(/* @__PURE__ */ new Map()), f = de();
|
|
9207
9215
|
bt(e, () => ({
|
|
9208
9216
|
retrieveAndOpenAction: h,
|
|
9209
|
-
openShortcut:
|
|
9217
|
+
openShortcut: v
|
|
9210
9218
|
}));
|
|
9211
9219
|
function m(C) {
|
|
9212
9220
|
if (C === a) {
|
|
@@ -9237,7 +9245,7 @@ function hd(t, e) {
|
|
|
9237
9245
|
ze("Action type not supported");
|
|
9238
9246
|
return;
|
|
9239
9247
|
}
|
|
9240
|
-
const [
|
|
9248
|
+
const [w, E] = C.split(","), P = parseInt(E), M = vt({
|
|
9241
9249
|
context: F.context,
|
|
9242
9250
|
values: i,
|
|
9243
9251
|
fields: {}
|
|
@@ -9287,7 +9295,7 @@ function hd(t, e) {
|
|
|
9287
9295
|
title: K,
|
|
9288
9296
|
target: R,
|
|
9289
9297
|
initialView: G,
|
|
9290
|
-
action_type:
|
|
9298
|
+
action_type: w,
|
|
9291
9299
|
action_id: P,
|
|
9292
9300
|
values: O,
|
|
9293
9301
|
forced_values: _,
|
|
@@ -9324,17 +9332,17 @@ function hd(t, e) {
|
|
|
9324
9332
|
const {
|
|
9325
9333
|
res_model: S,
|
|
9326
9334
|
context: F,
|
|
9327
|
-
domain:
|
|
9335
|
+
domain: w,
|
|
9328
9336
|
views: E,
|
|
9329
9337
|
target: P,
|
|
9330
9338
|
string: M,
|
|
9331
9339
|
limit: j
|
|
9332
|
-
} = C, [N, B] = E[0], K = { id: N, type: B }, R =
|
|
9340
|
+
} = C, [N, B] = E[0], K = { id: N, type: B }, R = vt({
|
|
9333
9341
|
context: F,
|
|
9334
9342
|
values: { ..._, ...i },
|
|
9335
9343
|
fields: O
|
|
9336
|
-
}), U =
|
|
9337
|
-
domain:
|
|
9344
|
+
}), U = w ? await D.getHandler().evalDomain({
|
|
9345
|
+
domain: w,
|
|
9338
9346
|
values: Nt({
|
|
9339
9347
|
fields: O,
|
|
9340
9348
|
values: { ..._, ...i }
|
|
@@ -9355,18 +9363,18 @@ function hd(t, e) {
|
|
|
9355
9363
|
limit: j
|
|
9356
9364
|
});
|
|
9357
9365
|
}
|
|
9358
|
-
async function
|
|
9366
|
+
async function v(C) {
|
|
9359
9367
|
const { action_id: O, action_type: _, res_id: A, view_id: x } = C, S = `${_},${O}`, F = await D.getHandler().getActionData({
|
|
9360
9368
|
action: S,
|
|
9361
9369
|
context: o
|
|
9362
|
-
}),
|
|
9370
|
+
}), w = vt({
|
|
9363
9371
|
context: F.context,
|
|
9364
9372
|
values: i,
|
|
9365
9373
|
fields: {}
|
|
9366
9374
|
}), E = F.domain ? await D.getHandler().evalDomain({
|
|
9367
9375
|
domain: F.domain,
|
|
9368
9376
|
values: i,
|
|
9369
|
-
context: { ...o, ...
|
|
9377
|
+
context: { ...o, ...w }
|
|
9370
9378
|
}) : [], {
|
|
9371
9379
|
res_model: P,
|
|
9372
9380
|
views: M,
|
|
@@ -9386,7 +9394,7 @@ function hd(t, e) {
|
|
|
9386
9394
|
model: P,
|
|
9387
9395
|
type: L,
|
|
9388
9396
|
id: k,
|
|
9389
|
-
context: { ...o, ...
|
|
9397
|
+
context: { ...o, ...w }
|
|
9390
9398
|
});
|
|
9391
9399
|
U.push([ee, L]);
|
|
9392
9400
|
}
|
|
@@ -9400,7 +9408,7 @@ function hd(t, e) {
|
|
|
9400
9408
|
const Y = { id: ne, type: X };
|
|
9401
9409
|
I({
|
|
9402
9410
|
domain: E,
|
|
9403
|
-
context: { ...o, ...
|
|
9411
|
+
context: { ...o, ...w },
|
|
9404
9412
|
model: P,
|
|
9405
9413
|
views: U,
|
|
9406
9414
|
title: j,
|
|
@@ -9439,7 +9447,7 @@ function hd(t, e) {
|
|
|
9439
9447
|
title: x,
|
|
9440
9448
|
target: S,
|
|
9441
9449
|
initialView: F,
|
|
9442
|
-
action_id:
|
|
9450
|
+
action_id: w,
|
|
9443
9451
|
action_type: E,
|
|
9444
9452
|
res_id: P,
|
|
9445
9453
|
values: M,
|
|
@@ -9461,7 +9469,7 @@ function hd(t, e) {
|
|
|
9461
9469
|
formView: R,
|
|
9462
9470
|
context: { ...o, ...O },
|
|
9463
9471
|
actionData: {
|
|
9464
|
-
action_id:
|
|
9472
|
+
action_id: w,
|
|
9465
9473
|
action_type: E,
|
|
9466
9474
|
res_id: P,
|
|
9467
9475
|
view_id: R.view_id
|
|
@@ -9472,13 +9480,13 @@ function hd(t, e) {
|
|
|
9472
9480
|
p({
|
|
9473
9481
|
title: x,
|
|
9474
9482
|
action: {
|
|
9475
|
-
id:
|
|
9483
|
+
id: w,
|
|
9476
9484
|
type: E
|
|
9477
9485
|
},
|
|
9478
9486
|
content: /* @__PURE__ */ n(
|
|
9479
9487
|
Vo,
|
|
9480
9488
|
{
|
|
9481
|
-
action_id:
|
|
9489
|
+
action_id: w,
|
|
9482
9490
|
action_type: E,
|
|
9483
9491
|
tabKey: K,
|
|
9484
9492
|
title: x,
|
|
@@ -9499,10 +9507,10 @@ function hd(t, e) {
|
|
|
9499
9507
|
});
|
|
9500
9508
|
}
|
|
9501
9509
|
}
|
|
9502
|
-
return /* @__PURE__ */ n(
|
|
9503
|
-
|
|
9510
|
+
return /* @__PURE__ */ n(es, { lang: s, children: /* @__PURE__ */ n(
|
|
9511
|
+
ma,
|
|
9504
9512
|
{
|
|
9505
|
-
openShortcut:
|
|
9513
|
+
openShortcut: v,
|
|
9506
9514
|
openAction: I,
|
|
9507
9515
|
openRelate: y,
|
|
9508
9516
|
openDefaultActionForModel: T,
|
|
@@ -9518,7 +9526,7 @@ function hd(t, e) {
|
|
|
9518
9526
|
l(C);
|
|
9519
9527
|
},
|
|
9520
9528
|
children: /* @__PURE__ */ n(
|
|
9521
|
-
|
|
9529
|
+
ga,
|
|
9522
9530
|
{
|
|
9523
9531
|
ref: f,
|
|
9524
9532
|
globalValues: i,
|
|
@@ -9528,9 +9536,9 @@ function hd(t, e) {
|
|
|
9528
9536
|
}
|
|
9529
9537
|
) });
|
|
9530
9538
|
}
|
|
9531
|
-
const
|
|
9532
|
-
function
|
|
9533
|
-
const { label: e, onClose: r, tabKey: i, isActive: o, onSelected: s } = t, { token: a } =
|
|
9539
|
+
const nu = wt(pd), { useToken: gd } = Pe;
|
|
9540
|
+
function yd(t) {
|
|
9541
|
+
const { label: e, onClose: r, tabKey: i, isActive: o, onSelected: s } = t, { token: a } = gd(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
|
|
9534
9542
|
return /* @__PURE__ */ V(
|
|
9535
9543
|
"div",
|
|
9536
9544
|
{
|
|
@@ -9600,12 +9608,12 @@ function gd(t) {
|
|
|
9600
9608
|
}
|
|
9601
9609
|
);
|
|
9602
9610
|
}
|
|
9603
|
-
function
|
|
9611
|
+
function ru() {
|
|
9604
9612
|
const t = H(
|
|
9605
9613
|
dt
|
|
9606
9614
|
), { activeKey: e, tabs: r, onRemoveTab: i, onChangeTab: o } = t || {};
|
|
9607
9615
|
return /* @__PURE__ */ n(Q, { children: r.map((s) => /* @__PURE__ */ n(
|
|
9608
|
-
|
|
9616
|
+
yd,
|
|
9609
9617
|
{
|
|
9610
9618
|
tabKey: s.key,
|
|
9611
9619
|
label: s.title,
|
|
@@ -9616,7 +9624,7 @@ function tu() {
|
|
|
9616
9624
|
s.key
|
|
9617
9625
|
)) });
|
|
9618
9626
|
}
|
|
9619
|
-
function
|
|
9627
|
+
function vd(t) {
|
|
9620
9628
|
const { tab: e } = t, r = H(
|
|
9621
9629
|
dt
|
|
9622
9630
|
), { activeKey: i } = r || {}, o = {
|
|
@@ -9624,20 +9632,20 @@ function yd(t) {
|
|
|
9624
9632
|
};
|
|
9625
9633
|
return /* @__PURE__ */ n("div", { style: e.key !== i ? o : void 0, children: e.content });
|
|
9626
9634
|
}
|
|
9627
|
-
const wd = Qe.memo(
|
|
9628
|
-
function
|
|
9635
|
+
const wd = Qe.memo(vd, () => !0);
|
|
9636
|
+
function ou() {
|
|
9629
9637
|
const t = H(
|
|
9630
9638
|
dt
|
|
9631
9639
|
), { tabs: e } = t || {}, r = (e == null ? void 0 : e.map((i) => /* @__PURE__ */ n(wd, { tab: i }, i.key))) || null;
|
|
9632
9640
|
return /* @__PURE__ */ n(Q, { children: r });
|
|
9633
9641
|
}
|
|
9634
|
-
const { useToken:
|
|
9642
|
+
const { useToken: bd } = Pe, iu = (t) => {
|
|
9635
9643
|
const {
|
|
9636
9644
|
onRetrieveShortcuts: e,
|
|
9637
9645
|
onCheckIsFavourite: r,
|
|
9638
9646
|
onAddFavourite: i,
|
|
9639
9647
|
onRemoveFavourite: o
|
|
9640
|
-
} = t, [s, a] = b(!1), [l, d] = b(!1), [u, c] = b([]), [f, m] = b(!0), [g, h] = b(), { t: p } = H(he) || {}, { token: y } =
|
|
9648
|
+
} = t, [s, a] = b(!1), [l, d] = b(!1), [u, c] = b([]), [f, m] = b(!0), [g, h] = b(), { t: p } = H(he) || {}, { token: y } = bd(), v = H(
|
|
9641
9649
|
dt
|
|
9642
9650
|
), {
|
|
9643
9651
|
openShortcut: T,
|
|
@@ -9646,11 +9654,11 @@ const { useToken: vd } = Pe, ru = (t) => {
|
|
|
9646
9654
|
currentView: O,
|
|
9647
9655
|
currentId: _,
|
|
9648
9656
|
openDefaultActionForModel: A
|
|
9649
|
-
} =
|
|
9657
|
+
} = v || {};
|
|
9650
9658
|
me(() => {
|
|
9651
9659
|
x();
|
|
9652
9660
|
}, []), me(() => {
|
|
9653
|
-
|
|
9661
|
+
w();
|
|
9654
9662
|
}, [I, C, O, _]);
|
|
9655
9663
|
async function x() {
|
|
9656
9664
|
try {
|
|
@@ -9670,7 +9678,7 @@ const { useToken: vd } = Pe, ru = (t) => {
|
|
|
9670
9678
|
function F(N) {
|
|
9671
9679
|
N && x(), d(N);
|
|
9672
9680
|
}
|
|
9673
|
-
async function
|
|
9681
|
+
async function w() {
|
|
9674
9682
|
if (!O)
|
|
9675
9683
|
return;
|
|
9676
9684
|
const N = I.find((X) => X.key === C), { id: B, type: K } = (N == null ? void 0 : N.action) || {};
|
|
@@ -9713,7 +9721,7 @@ const { useToken: vd } = Pe, ru = (t) => {
|
|
|
9713
9721
|
) }, N.id)) }) : /* @__PURE__ */ n("div", { style: { width: 300, padding: 5, paddingLeft: 15 }, children: p == null ? void 0 : p("no_favorites") })
|
|
9714
9722
|
] });
|
|
9715
9723
|
function M({ title: N, type: B }) {
|
|
9716
|
-
return /* @__PURE__ */ V(
|
|
9724
|
+
return /* @__PURE__ */ V(we, { wrap: !1, children: [
|
|
9717
9725
|
/* @__PURE__ */ n(ae, { flex: "none", style: { paddingRight: 20 }, children: B === "tree" ? /* @__PURE__ */ n(qn, {}) : /* @__PURE__ */ n(Kt, {}) }),
|
|
9718
9726
|
/* @__PURE__ */ n(ae, { flex: "auto", children: N })
|
|
9719
9727
|
] });
|
|
@@ -9776,60 +9784,60 @@ const { useToken: vd } = Pe, ru = (t) => {
|
|
|
9776
9784
|
] });
|
|
9777
9785
|
};
|
|
9778
9786
|
export {
|
|
9779
|
-
|
|
9787
|
+
gc as ActionBar,
|
|
9780
9788
|
Vo as ActionView,
|
|
9781
|
-
|
|
9789
|
+
cc as Binary,
|
|
9782
9790
|
ws as Boolean,
|
|
9783
9791
|
Xr as Button,
|
|
9784
|
-
|
|
9792
|
+
os as ButtonGroup,
|
|
9785
9793
|
to as Char,
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9794
|
+
od as CodeEditor,
|
|
9795
|
+
ud as CommentsTimelineField,
|
|
9796
|
+
_c as ConfigContext,
|
|
9789
9797
|
D as ConnectionProvider,
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9798
|
+
ga as ContentRootProvider,
|
|
9799
|
+
ou as CurrentTabContent,
|
|
9800
|
+
Uc as Dashboard,
|
|
9801
|
+
Bc as DashboardGrid,
|
|
9802
|
+
Kc as DashboardGridItem,
|
|
9803
|
+
nc as Date,
|
|
9804
|
+
rc as DateTime,
|
|
9797
9805
|
wc as Email,
|
|
9798
|
-
|
|
9799
|
-
|
|
9806
|
+
tc as ExportModal,
|
|
9807
|
+
iu as FavouriteButton,
|
|
9800
9808
|
mo as Float,
|
|
9801
|
-
|
|
9809
|
+
Bl as FloatTime,
|
|
9802
9810
|
Jt as Form,
|
|
9803
9811
|
Zt as FormModal,
|
|
9804
|
-
|
|
9812
|
+
fl as GraphIndicator,
|
|
9805
9813
|
To as Group,
|
|
9806
|
-
|
|
9814
|
+
Ss as Image,
|
|
9807
9815
|
rn as Integer,
|
|
9808
9816
|
fn as Label,
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9817
|
+
cl as Many2one,
|
|
9818
|
+
Jc as Markdown,
|
|
9819
|
+
qc as MultiCheckbox,
|
|
9820
|
+
Kl as Notebook,
|
|
9821
|
+
Pl as One2many,
|
|
9822
|
+
La as ProgressBar,
|
|
9823
|
+
Xc as Radio,
|
|
9824
|
+
sc as Reference,
|
|
9825
|
+
nu as RootView,
|
|
9818
9826
|
ho as SearchFilter,
|
|
9819
|
-
|
|
9820
|
-
|
|
9827
|
+
wo as SearchModal,
|
|
9828
|
+
vo as SearchTree,
|
|
9821
9829
|
no as Selection,
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9830
|
+
Gl as Separator,
|
|
9831
|
+
nd as Steps,
|
|
9832
|
+
ed as Switch,
|
|
9833
|
+
yd as Tab,
|
|
9834
|
+
ru as TabSelector,
|
|
9835
|
+
Ks as Tag,
|
|
9836
|
+
Ws as Tags,
|
|
9837
|
+
jl as Text,
|
|
9838
|
+
oc as Time,
|
|
9831
9839
|
pn as Tree,
|
|
9832
|
-
|
|
9840
|
+
vc as Url,
|
|
9833
9841
|
ct as iconMapper,
|
|
9834
9842
|
qt as showConfirmDialog
|
|
9835
9843
|
};
|