@gisce/react-ooui 2.0.0-alpha.28 → 2.0.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -2,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 ir = (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 be, Col as le, Modal as Je, Button as Oe, Dropdown as Gt, Menu as He, Spin as Ae, Divider as cn, Space as je, Input as
|
|
7
|
-
import { Label as Dt, Field as Rn, Tree as kr, Reference as ti, Selection as Ln, 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 vt, useImperativeHandle as bt } from "react";
|
|
6
|
+
import { Tooltip as ht, theme as Pe, Typography as Yt, Form as lt, Row as be, Col as le, Modal as Je, Button as Oe, Dropdown as Gt, Menu as He, Spin as Ae, Divider as cn, Space as je, Input as ot, Select as Ct, Checkbox as Ht, Alert as tt, Timeline as _n, Statistic as qo, Card as Nn, Tag as _r, message as xn, DatePicker as Pn, TimePicker as Rr, InputNumber as Vr, Progress as zo, Avatar as Ar, Badge as Jo, Pagination as Zo, Tabs as Dr, Popover as Xo, Radio as sr, Switch as Qo, Steps as ar, Layout as ei } from "antd";
|
|
7
|
+
import { Label as Dt, Field as Rn, Tree as kr, Reference as ti, Selection as Ln, Many2one as Er, Boolean as ni, Container as ri, parseContext as wt, Form as Mr, Integer as Vn, SearchFieldTypes as mt, SearchFilter as oi, parseContextFields as Sn, parseDomainFields as lr, transformDomainForChildWidget as Nr, graphProcessor as Pr, parseGraph as Bn, graphFieldUtils as ii } from "@gisce/ooui";
|
|
8
8
|
import * as cr 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 $n, DownloadOutlined as Hn, ClearOutlined as Kn, StarFilled as Kr, StarOutlined as Wr, UpOutlined as si, SearchOutlined as Wn, RightCircleOutlined as ai, ThunderboltOutlined as jn, PrinterOutlined as Yn, EnterOutlined as jr, PlusSquareOutlined as li, MinusSquareOutlined as ci, FileAddOutlined as dn, AlignLeftOutlined as di, ApiOutlined as ui, DeleteOutlined as Gn, LeftOutlined as Yr, RightOutlined as Gr, EyeOutlined as fi, FormOutlined as Kt, TableOutlined as Un, AreaChartOutlined as mi, CalendarOutlined as hi, LinkOutlined as Ur, SaveOutlined as pi, CopyOutlined as qn, 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 $n, DownloadOutlined as Hn, ClearOutlined as Kn, StarFilled as Kr, StarOutlined as Wr, UpOutlined as si, SearchOutlined as Wn, RightCircleOutlined as ai, ThunderboltOutlined as jn, PrinterOutlined as Yn, EnterOutlined as jr, PlusSquareOutlined as li, MinusSquareOutlined as ci, FileAddOutlined as dn, AlignLeftOutlined as di, ApiOutlined as ui, DeleteOutlined as Gn, LeftOutlined as Yr, RightOutlined as Gr, EyeOutlined as fi, FormOutlined as Kt, TableOutlined as Un, AreaChartOutlined as mi, CalendarOutlined as hi, LinkOutlined as Ur, SaveOutlined as pi, CopyOutlined as qn, InfoCircleOutlined as qr, ReloadOutlined as un, EditOutlined as zr, FilterOutlined as Jr, CloseCircleFilled as gi, BorderOuterOutlined as yi, SettingOutlined as wi, ExportOutlined as vi } from "@ant-design/icons";
|
|
10
10
|
import { Interweave as zn } from "interweave";
|
|
11
11
|
import * as dr from "@tabler/icons-react";
|
|
12
12
|
import bi from "antd/lib/input/TextArea";
|
|
@@ -42,7 +42,7 @@ const { Text: Gi, Title: Ui } = Yt, { useToken: qi } = Pe, zi = {
|
|
|
42
42
|
center: "justify-center",
|
|
43
43
|
right: "justify-end"
|
|
44
44
|
}, fn = (t) => {
|
|
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:
|
|
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: p } = qi(), h = l === void 0 ? Gi : Ui;
|
|
46
46
|
return /* @__PURE__ */ V(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
@@ -53,7 +53,7 @@ const { Text: Gi, Title: Ui } = Yt, { useToken: qi } = Pe, zi = {
|
|
|
53
53
|
{
|
|
54
54
|
className: "pr-1 text-xs",
|
|
55
55
|
style: {
|
|
56
|
-
color:
|
|
56
|
+
color: p.colorPrimary
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
) }),
|
|
@@ -370,7 +370,7 @@ function ge({
|
|
|
370
370
|
type: l,
|
|
371
371
|
validator: d
|
|
372
372
|
}) {
|
|
373
|
-
const { id: u, label: c, tooltip: f } = t, { t: m } = H(he),
|
|
373
|
+
const { id: u, label: c, tooltip: f } = t, { t: m } = H(he), p = a ? [
|
|
374
374
|
{
|
|
375
375
|
required: !0,
|
|
376
376
|
message: m("fillRequiredField"),
|
|
@@ -383,13 +383,13 @@ function ge({
|
|
|
383
383
|
className: "mb-0",
|
|
384
384
|
name: u,
|
|
385
385
|
valuePropName: i,
|
|
386
|
-
rules:
|
|
386
|
+
rules: p,
|
|
387
387
|
children: e
|
|
388
388
|
}
|
|
389
389
|
);
|
|
390
390
|
if (!o)
|
|
391
391
|
return h();
|
|
392
|
-
const
|
|
392
|
+
const g = /* @__PURE__ */ n(
|
|
393
393
|
fn,
|
|
394
394
|
{
|
|
395
395
|
ooui: new Dt({
|
|
@@ -402,10 +402,10 @@ function ge({
|
|
|
402
402
|
}
|
|
403
403
|
);
|
|
404
404
|
return r === "horizontal" ? (() => /* @__PURE__ */ V(be, { align: "middle", className: "pb-1 pt-1", children: [
|
|
405
|
-
/* @__PURE__ */ n(le, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ n("div", { className: "flex flex-col items-end", children:
|
|
405
|
+
/* @__PURE__ */ n(le, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ n("div", { className: "flex flex-col items-end", children: g }) }),
|
|
406
406
|
/* @__PURE__ */ n(le, { flex: "auto", children: h() })
|
|
407
407
|
] }))() : (() => /* @__PURE__ */ V(Q, { children: [
|
|
408
|
-
|
|
408
|
+
g,
|
|
409
409
|
h()
|
|
410
410
|
] }))();
|
|
411
411
|
}
|
|
@@ -437,9 +437,9 @@ const { confirm: ts } = Je, qt = ({
|
|
|
437
437
|
domain: c,
|
|
438
438
|
submitForm: f,
|
|
439
439
|
fetchValues: m,
|
|
440
|
-
formHasChanges:
|
|
440
|
+
formHasChanges: p,
|
|
441
441
|
elementHasLostFocus: h,
|
|
442
|
-
getFields:
|
|
442
|
+
getFields: g
|
|
443
443
|
} = t;
|
|
444
444
|
return /* @__PURE__ */ n(
|
|
445
445
|
Ne.Provider,
|
|
@@ -448,7 +448,7 @@ const { confirm: ts } = Je, qt = ({
|
|
|
448
448
|
domain: c,
|
|
449
449
|
getValues: d,
|
|
450
450
|
getPlainValues: u,
|
|
451
|
-
getFields:
|
|
451
|
+
getFields: g,
|
|
452
452
|
activeId: r,
|
|
453
453
|
activeModel: i,
|
|
454
454
|
setFieldValue: o,
|
|
@@ -457,7 +457,7 @@ const { confirm: ts } = Je, qt = ({
|
|
|
457
457
|
getContext: l,
|
|
458
458
|
submitForm: f,
|
|
459
459
|
fetchValues: m,
|
|
460
|
-
formHasChanges:
|
|
460
|
+
formHasChanges: p,
|
|
461
461
|
elementHasLostFocus: h
|
|
462
462
|
},
|
|
463
463
|
children: e
|
|
@@ -597,9 +597,9 @@ const Xr = (t) => {
|
|
|
597
597
|
icon: l,
|
|
598
598
|
context: d,
|
|
599
599
|
readOnly: u
|
|
600
|
-
} = e, c = H(Ne), { executeButtonAction: f } = c || {}, [m,
|
|
601
|
-
async function
|
|
602
|
-
|
|
600
|
+
} = e, c = H(Ne), { executeButtonAction: f } = c || {}, [m, p] = b(!1), { lang: h } = H(he);
|
|
601
|
+
async function g() {
|
|
602
|
+
p(!0), await f({ type: s, action: r, context: d }), p(!1);
|
|
603
603
|
}
|
|
604
604
|
function y() {
|
|
605
605
|
if (a) {
|
|
@@ -607,14 +607,14 @@ const Xr = (t) => {
|
|
|
607
607
|
confirmMessage: a,
|
|
608
608
|
lang: h,
|
|
609
609
|
onOk: () => {
|
|
610
|
-
|
|
610
|
+
g();
|
|
611
611
|
}
|
|
612
612
|
});
|
|
613
613
|
return;
|
|
614
614
|
}
|
|
615
|
-
|
|
615
|
+
g();
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function w() {
|
|
618
618
|
if (m)
|
|
619
619
|
return /* @__PURE__ */ n(st, {});
|
|
620
620
|
if (l) {
|
|
@@ -628,7 +628,7 @@ const Xr = (t) => {
|
|
|
628
628
|
block: !0,
|
|
629
629
|
disabled: !o || u || m,
|
|
630
630
|
onClick: y,
|
|
631
|
-
icon:
|
|
631
|
+
icon: w(),
|
|
632
632
|
type: e.primary ? "primary" : "default",
|
|
633
633
|
danger: e.danger,
|
|
634
634
|
style: { whiteSpace: "normal", height: "auto" },
|
|
@@ -646,8 +646,8 @@ const Xr = (t) => {
|
|
|
646
646
|
primary: c,
|
|
647
647
|
danger: f,
|
|
648
648
|
context: m,
|
|
649
|
-
readOnly:
|
|
650
|
-
} = r || {}, h = H(Ne), { executeButtonAction:
|
|
649
|
+
readOnly: p
|
|
650
|
+
} = r || {}, h = H(Ne), { executeButtonAction: g } = h || {}, [y, w] = b(!1), { lang: T } = H(he);
|
|
651
651
|
function F() {
|
|
652
652
|
if (y)
|
|
653
653
|
return /* @__PURE__ */ n(st, {});
|
|
@@ -657,7 +657,7 @@ const Xr = (t) => {
|
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
async function C() {
|
|
660
|
-
l && o && (
|
|
660
|
+
l && o && (w(!0), await g({ type: l, action: o, context: m }), w(!1));
|
|
661
661
|
}
|
|
662
662
|
function O() {
|
|
663
663
|
if (d) {
|
|
@@ -678,7 +678,7 @@ const Xr = (t) => {
|
|
|
678
678
|
return /* @__PURE__ */ n(ge, { ooui: new Rn({ ooui: e }), children: /* @__PURE__ */ V(
|
|
679
679
|
Gt.Button,
|
|
680
680
|
{
|
|
681
|
-
disabled: !a ||
|
|
681
|
+
disabled: !a || p,
|
|
682
682
|
onClick: O,
|
|
683
683
|
icon: /* @__PURE__ */ n(kt, {}),
|
|
684
684
|
type: c ? "primary" : void 0,
|
|
@@ -686,7 +686,7 @@ const Xr = (t) => {
|
|
|
686
686
|
is,
|
|
687
687
|
{
|
|
688
688
|
ooui: i,
|
|
689
|
-
executeButtonAction:
|
|
689
|
+
executeButtonAction: g,
|
|
690
690
|
lang: T
|
|
691
691
|
}
|
|
692
692
|
),
|
|
@@ -711,10 +711,10 @@ const Xr = (t) => {
|
|
|
711
711
|
confirmMessage: c,
|
|
712
712
|
icon: f,
|
|
713
713
|
context: m,
|
|
714
|
-
readOnly:
|
|
714
|
+
readOnly: p,
|
|
715
715
|
danger: h
|
|
716
|
-
} = s, [
|
|
717
|
-
async function
|
|
716
|
+
} = s, [g, y] = b(!1);
|
|
717
|
+
async function w() {
|
|
718
718
|
y(!0), await r({ type: u, action: a, context: m }), y(!1);
|
|
719
719
|
}
|
|
720
720
|
function T() {
|
|
@@ -723,15 +723,15 @@ const Xr = (t) => {
|
|
|
723
723
|
confirmMessage: c,
|
|
724
724
|
lang: i,
|
|
725
725
|
onOk: () => {
|
|
726
|
-
|
|
726
|
+
w();
|
|
727
727
|
}
|
|
728
728
|
});
|
|
729
729
|
return;
|
|
730
730
|
}
|
|
731
|
-
|
|
731
|
+
w();
|
|
732
732
|
}
|
|
733
733
|
function F() {
|
|
734
|
-
if (
|
|
734
|
+
if (g)
|
|
735
735
|
return /* @__PURE__ */ n(st, {});
|
|
736
736
|
if (f) {
|
|
737
737
|
const C = ct(f);
|
|
@@ -741,7 +741,7 @@ const Xr = (t) => {
|
|
|
741
741
|
return /* @__PURE__ */ n(
|
|
742
742
|
He.Item,
|
|
743
743
|
{
|
|
744
|
-
disabled: !d ||
|
|
744
|
+
disabled: !d || p,
|
|
745
745
|
onClick: T,
|
|
746
746
|
icon: F(),
|
|
747
747
|
danger: h,
|
|
@@ -813,7 +813,7 @@ const Qr = (t) => {
|
|
|
813
813
|
content: e
|
|
814
814
|
});
|
|
815
815
|
}, eo = (t) => {
|
|
816
|
-
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), [
|
|
816
|
+
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), [p, h] = b(!1), [g, y] = b({}), w = de();
|
|
817
817
|
me(() => {
|
|
818
818
|
e ? T() : y({});
|
|
819
819
|
}, [e]);
|
|
@@ -841,15 +841,15 @@ const Qr = (t) => {
|
|
|
841
841
|
async function C(x) {
|
|
842
842
|
const S = {};
|
|
843
843
|
for (const I of x) {
|
|
844
|
-
const
|
|
844
|
+
const v = (await D.getHandler().readObjects({
|
|
845
845
|
model: i,
|
|
846
846
|
ids: [o],
|
|
847
847
|
fieldsToRetrieve: [s],
|
|
848
848
|
context: { lang: I.code }
|
|
849
849
|
}))[0];
|
|
850
|
-
S[I.code] =
|
|
850
|
+
S[I.code] = v[s] || "";
|
|
851
851
|
}
|
|
852
|
-
|
|
852
|
+
w.current = S, y(S);
|
|
853
853
|
}
|
|
854
854
|
function O() {
|
|
855
855
|
return u.map((x, S) => /* @__PURE__ */ V(be, { style: { paddingBottom: 20 }, children: [
|
|
@@ -858,14 +858,14 @@ const Qr = (t) => {
|
|
|
858
858
|
bi,
|
|
859
859
|
{
|
|
860
860
|
rows: 4,
|
|
861
|
-
value:
|
|
861
|
+
value: g[x.code] || "",
|
|
862
862
|
onChange: (I) => {
|
|
863
863
|
y({
|
|
864
|
-
...
|
|
864
|
+
...g,
|
|
865
865
|
[x.code]: I.target.value
|
|
866
866
|
});
|
|
867
867
|
},
|
|
868
|
-
disabled:
|
|
868
|
+
disabled: p
|
|
869
869
|
}
|
|
870
870
|
) })
|
|
871
871
|
] }, S));
|
|
@@ -873,11 +873,11 @@ const Qr = (t) => {
|
|
|
873
873
|
async function _() {
|
|
874
874
|
h(!0);
|
|
875
875
|
try {
|
|
876
|
-
for (const x of Object.keys(
|
|
877
|
-
|
|
876
|
+
for (const x of Object.keys(g))
|
|
877
|
+
g[x] !== w.current[x] && await D.getHandler().update({
|
|
878
878
|
model: i,
|
|
879
879
|
id: o,
|
|
880
|
-
values: { [s]:
|
|
880
|
+
values: { [s]: g[x] },
|
|
881
881
|
context: {
|
|
882
882
|
lang: x
|
|
883
883
|
},
|
|
@@ -898,15 +898,15 @@ const Qr = (t) => {
|
|
|
898
898
|
{
|
|
899
899
|
icon: /* @__PURE__ */ n(Ut, {}),
|
|
900
900
|
onClick: r,
|
|
901
|
-
disabled:
|
|
901
|
+
disabled: p,
|
|
902
902
|
children: d("cancel")
|
|
903
903
|
}
|
|
904
904
|
),
|
|
905
905
|
/* @__PURE__ */ n(
|
|
906
906
|
Oe,
|
|
907
907
|
{
|
|
908
|
-
icon:
|
|
909
|
-
disabled:
|
|
908
|
+
icon: p ? /* @__PURE__ */ n(st, {}) : /* @__PURE__ */ n(Et, {}),
|
|
909
|
+
disabled: p,
|
|
910
910
|
onClick: _,
|
|
911
911
|
style: { marginLeft: 15 },
|
|
912
912
|
type: "primary",
|
|
@@ -945,7 +945,7 @@ const { info: cs } = Je, ft = (t) => {
|
|
|
945
945
|
}, { useToken: ds } = Pe, to = (t) => {
|
|
946
946
|
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 || {};
|
|
947
947
|
let m = /* @__PURE__ */ n(
|
|
948
|
-
|
|
948
|
+
ot,
|
|
949
949
|
{
|
|
950
950
|
disabled: o || l && !r,
|
|
951
951
|
id: i,
|
|
@@ -955,7 +955,7 @@ const { info: cs } = Je, ft = (t) => {
|
|
|
955
955
|
}
|
|
956
956
|
);
|
|
957
957
|
return s && (m = /* @__PURE__ */ n(
|
|
958
|
-
|
|
958
|
+
ot.Password,
|
|
959
959
|
{
|
|
960
960
|
disabled: o,
|
|
961
961
|
id: i,
|
|
@@ -987,13 +987,13 @@ const { info: cs } = Je, ft = (t) => {
|
|
|
987
987
|
c || f(!0);
|
|
988
988
|
},
|
|
989
989
|
children: /* @__PURE__ */ n(
|
|
990
|
-
|
|
990
|
+
ot,
|
|
991
991
|
{
|
|
992
992
|
value: t,
|
|
993
993
|
disabled: !0,
|
|
994
994
|
id: e,
|
|
995
|
-
onChange: (
|
|
996
|
-
i == null || i(
|
|
995
|
+
onChange: (p) => {
|
|
996
|
+
i == null || i(p.target.value);
|
|
997
997
|
},
|
|
998
998
|
onBlur: u,
|
|
999
999
|
style: { cursor: "pointer", pointerEvents: "none", ...r }
|
|
@@ -1018,13 +1018,13 @@ const { info: cs } = Je, ft = (t) => {
|
|
|
1018
1018
|
)
|
|
1019
1019
|
] }) : /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ V(be, { gutter: 8, wrap: !1, children: [
|
|
1020
1020
|
/* @__PURE__ */ n(le, { flex: "auto", children: /* @__PURE__ */ n(
|
|
1021
|
-
|
|
1021
|
+
ot,
|
|
1022
1022
|
{
|
|
1023
1023
|
value: t,
|
|
1024
1024
|
id: e,
|
|
1025
1025
|
style: r,
|
|
1026
|
-
onChange: (
|
|
1027
|
-
i == null || i(
|
|
1026
|
+
onChange: (p) => {
|
|
1027
|
+
i == null || i(p.target.value);
|
|
1028
1028
|
},
|
|
1029
1029
|
onBlur: u
|
|
1030
1030
|
}
|
|
@@ -1065,7 +1065,7 @@ const { info: cs } = Je, ft = (t) => {
|
|
|
1065
1065
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
1066
1066
|
background-color: ${hs.colorPrimaryBg};
|
|
1067
1067
|
}
|
|
1068
|
-
`, { defaultAlgorithm: ys, defaultSeed:
|
|
1068
|
+
`, { defaultAlgorithm: ys, defaultSeed: ws } = Pe, hr = ys(ws), vs = (t) => {
|
|
1069
1069
|
const { ooui: e } = t, { id: r, readOnly: i, required: o } = e;
|
|
1070
1070
|
return /* @__PURE__ */ n(ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ n(bs, { id: r, readOnly: i, required: o }) });
|
|
1071
1071
|
}, bs = (t) => {
|
|
@@ -1112,13 +1112,13 @@ const Ss = (t) => {
|
|
|
1112
1112
|
i == null || i(f);
|
|
1113
1113
|
};
|
|
1114
1114
|
async function d() {
|
|
1115
|
-
const f = await At(r), m = `data:${f == null ? void 0 : f.mime};base64,${r}`,
|
|
1116
|
-
|
|
1115
|
+
const f = await At(r), m = `data:${f == null ? void 0 : f.mime};base64,${r}`, p = document.createElement("a");
|
|
1116
|
+
p.href = m, p.download = `image.${f == null ? void 0 : f.ext}`, p.click();
|
|
1117
1117
|
}
|
|
1118
1118
|
async function u(f) {
|
|
1119
1119
|
f.stopPropagation(), f.preventDefault();
|
|
1120
|
-
const m = f.target.files[0],
|
|
1121
|
-
l(
|
|
1120
|
+
const m = f.target.files[0], p = await oo(m);
|
|
1121
|
+
l(p);
|
|
1122
1122
|
}
|
|
1123
1123
|
function c() {
|
|
1124
1124
|
l(void 0);
|
|
@@ -1209,9 +1209,9 @@ const Ss = (t) => {
|
|
|
1209
1209
|
title: o.label,
|
|
1210
1210
|
render: d,
|
|
1211
1211
|
sorter: (u, c) => {
|
|
1212
|
-
var
|
|
1212
|
+
var p, h;
|
|
1213
1213
|
let f = u[a] || "", m = c[a] || "";
|
|
1214
|
-
return s === "many2one" && (f = ((
|
|
1214
|
+
return s === "many2one" && (f = ((p = u[a]) == null ? void 0 : p.value) || "", m = ((h = c[a]) == null ? void 0 : h.value) || ""), f < m ? -1 : f > m ? 1 : 0;
|
|
1215
1215
|
}
|
|
1216
1216
|
};
|
|
1217
1217
|
}), io = (t, e) => e.map((i) => {
|
|
@@ -1251,9 +1251,9 @@ function Rt({
|
|
|
1251
1251
|
if (!e)
|
|
1252
1252
|
return t;
|
|
1253
1253
|
const { id: i, desc: o } = e, s = o === !1 ? "ascend" : "descend", a = r[i].type, l = (d, u) => {
|
|
1254
|
-
var m,
|
|
1254
|
+
var m, p;
|
|
1255
1255
|
let c = d[i] || "", f = u[i] || "";
|
|
1256
|
-
return a === "many2one" && (c = ((m = d[i]) == null ? void 0 : m[1]) || "", f = ((
|
|
1256
|
+
return a === "many2one" && (c = ((m = d[i]) == null ? void 0 : m[1]) || "", f = ((p = u[i]) == null ? void 0 : p[1]) || ""), c === f ? 0 : s === "ascend" ? c > f ? 1 : -1 : c < f ? 1 : -1;
|
|
1257
1257
|
};
|
|
1258
1258
|
return t.sort(l);
|
|
1259
1259
|
}
|
|
@@ -1273,21 +1273,21 @@ const Zn = async (t) => {
|
|
|
1273
1273
|
context: s,
|
|
1274
1274
|
currentView: a = {}
|
|
1275
1275
|
} = t, l = e.filter(
|
|
1276
|
-
(
|
|
1277
|
-
), d = e.filter((
|
|
1276
|
+
(g) => g.operation !== "original"
|
|
1277
|
+
), d = e.filter((g) => g.operation === "original").map((g) => g.id), u = {
|
|
1278
1278
|
form: i.fields,
|
|
1279
1279
|
tree: o.fields
|
|
1280
1280
|
};
|
|
1281
1281
|
let c = [], f;
|
|
1282
1282
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1283
|
-
const
|
|
1283
|
+
const g = (h = _t(o)) == null ? void 0 : h.colors, y = await D.getHandler().readEvalUiObjects({
|
|
1284
1284
|
model: r,
|
|
1285
1285
|
ids: d,
|
|
1286
1286
|
arch: o == null ? void 0 : o.arch,
|
|
1287
1287
|
fields: o.fields,
|
|
1288
1288
|
context: s,
|
|
1289
|
-
attrs:
|
|
1290
|
-
colors:
|
|
1289
|
+
attrs: g && {
|
|
1290
|
+
colors: g
|
|
1291
1291
|
}
|
|
1292
1292
|
});
|
|
1293
1293
|
c = y[0], f = tn(y[1]);
|
|
@@ -1298,20 +1298,20 @@ const Zn = async (t) => {
|
|
|
1298
1298
|
fields: u[a],
|
|
1299
1299
|
context: s
|
|
1300
1300
|
});
|
|
1301
|
-
const m = c.map((
|
|
1301
|
+
const m = c.map((g) => {
|
|
1302
1302
|
const y = {};
|
|
1303
|
-
return Object.keys(
|
|
1304
|
-
(u[a].hasOwnProperty(
|
|
1303
|
+
return Object.keys(g).forEach((w) => {
|
|
1304
|
+
(u[a].hasOwnProperty(w) || w === "id") && (y[w] = g[w]);
|
|
1305
1305
|
}), y;
|
|
1306
1306
|
});
|
|
1307
1307
|
return [
|
|
1308
|
-
e.map((
|
|
1308
|
+
e.map((g) => {
|
|
1309
1309
|
const y = m.find(
|
|
1310
|
-
(T) => T.id ===
|
|
1311
|
-
),
|
|
1312
|
-
...
|
|
1310
|
+
(T) => T.id === g.id
|
|
1311
|
+
), w = {
|
|
1312
|
+
...g
|
|
1313
1313
|
};
|
|
1314
|
-
return a === "form" ?
|
|
1314
|
+
return a === "form" ? w.values = y : a === "tree" && (w.treeValues = y), w;
|
|
1315
1315
|
}).concat(l),
|
|
1316
1316
|
f
|
|
1317
1317
|
];
|
|
@@ -1331,24 +1331,24 @@ const Zn = async (t) => {
|
|
|
1331
1331
|
xt(() => {
|
|
1332
1332
|
h();
|
|
1333
1333
|
}, [e]);
|
|
1334
|
-
const
|
|
1334
|
+
const p = async (g) => o && o[g] ? o[g] : await D.getHandler().getView({
|
|
1335
1335
|
model: r,
|
|
1336
|
-
type:
|
|
1336
|
+
type: g,
|
|
1337
1337
|
context: { ...m == null ? void 0 : m(), ...i }
|
|
1338
1338
|
}), h = async () => {
|
|
1339
1339
|
a(!0), d(void 0);
|
|
1340
1340
|
try {
|
|
1341
|
-
const
|
|
1342
|
-
u.set("form",
|
|
1343
|
-
} catch (
|
|
1344
|
-
d(
|
|
1341
|
+
const g = await p("form"), y = await p("tree");
|
|
1342
|
+
u.set("form", g), u.set("tree", y), c(u);
|
|
1343
|
+
} catch (g) {
|
|
1344
|
+
d(g);
|
|
1345
1345
|
} finally {
|
|
1346
1346
|
a(!1);
|
|
1347
1347
|
}
|
|
1348
1348
|
};
|
|
1349
1349
|
return s ? /* @__PURE__ */ n(Ae, {}) : l ? /* @__PURE__ */ n(tt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(Ds, { ooui: e, views: u }) });
|
|
1350
1350
|
}, Ds = (t) => {
|
|
1351
|
-
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,
|
|
1351
|
+
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, p] = b(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: T } = i, F = s.filter((x) => x.values), C = H(Ne), { getContext: O } = C || {};
|
|
1352
1352
|
xt(() => {
|
|
1353
1353
|
A();
|
|
1354
1354
|
}, [s]);
|
|
@@ -1370,7 +1370,7 @@ const Zn = async (t) => {
|
|
|
1370
1370
|
},
|
|
1371
1371
|
model: h,
|
|
1372
1372
|
items: s,
|
|
1373
|
-
context: { ...O == null ? void 0 : O(), ...
|
|
1373
|
+
context: { ...O == null ? void 0 : O(), ...g },
|
|
1374
1374
|
currentView: "form"
|
|
1375
1375
|
});
|
|
1376
1376
|
_(x);
|
|
@@ -1382,14 +1382,14 @@ const Zn = async (t) => {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
return d ? /* @__PURE__ */ n(tt, { className: "mt-10", message: d, type: "error", banner: !0 }) : a ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ V(Q, { children: [
|
|
1384
1384
|
/* @__PURE__ */ n(_n, { style: { padding: "1rem" }, children: F.map((x, S) => {
|
|
1385
|
-
var I,
|
|
1385
|
+
var I, v;
|
|
1386
1386
|
return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ V(_n.Item, { children: [
|
|
1387
1387
|
/* @__PURE__ */ n(
|
|
1388
1388
|
"div",
|
|
1389
1389
|
{
|
|
1390
1390
|
style: { display: "inline-block", cursor: "pointer" },
|
|
1391
1391
|
onClick: () => {
|
|
1392
|
-
|
|
1392
|
+
p(
|
|
1393
1393
|
F.find(
|
|
1394
1394
|
(E) => x.id === E.id
|
|
1395
1395
|
)
|
|
@@ -1404,13 +1404,13 @@ const Zn = async (t) => {
|
|
|
1404
1404
|
{
|
|
1405
1405
|
style: { display: "inline-block", cursor: "pointer" },
|
|
1406
1406
|
onClick: () => {
|
|
1407
|
-
|
|
1407
|
+
p(
|
|
1408
1408
|
F.find(
|
|
1409
1409
|
(E) => x.id === E.id
|
|
1410
1410
|
)
|
|
1411
1411
|
), f(!0);
|
|
1412
1412
|
},
|
|
1413
|
-
children: (
|
|
1413
|
+
children: (v = x.values) == null ? void 0 : v[w]
|
|
1414
1414
|
}
|
|
1415
1415
|
)
|
|
1416
1416
|
] }, S) }, S);
|
|
@@ -1427,7 +1427,7 @@ const Zn = async (t) => {
|
|
|
1427
1427
|
onSubmitSucceed: () => {
|
|
1428
1428
|
f(!1);
|
|
1429
1429
|
},
|
|
1430
|
-
parentContext: { ...O == null ? void 0 : O(), ...
|
|
1430
|
+
parentContext: { ...O == null ? void 0 : O(), ...g },
|
|
1431
1431
|
onCancel: () => {
|
|
1432
1432
|
f(!1);
|
|
1433
1433
|
},
|
|
@@ -1616,7 +1616,7 @@ const Nt = ({
|
|
|
1616
1616
|
const { ooui: e } = t;
|
|
1617
1617
|
return /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(js, { ooui: e }) });
|
|
1618
1618
|
}, js = (t) => {
|
|
1619
|
-
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:
|
|
1619
|
+
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: p, readOnly: h, field: g } = r, y = H(Ne), { getContext: w } = y || {};
|
|
1620
1620
|
xt(() => {
|
|
1621
1621
|
F();
|
|
1622
1622
|
}, [o]);
|
|
@@ -1644,12 +1644,12 @@ const Nt = ({
|
|
|
1644
1644
|
const x = (await D.getHandler().search({
|
|
1645
1645
|
model: m,
|
|
1646
1646
|
params: _,
|
|
1647
|
-
fieldsToRetrieve: [
|
|
1648
|
-
context: { ...
|
|
1647
|
+
fieldsToRetrieve: [g],
|
|
1648
|
+
context: { ...w == null ? void 0 : w(), ...p }
|
|
1649
1649
|
})).map((S) => {
|
|
1650
|
-
const I = S[
|
|
1651
|
-
let
|
|
1652
|
-
return Array.isArray(I) && (
|
|
1650
|
+
const I = S[g];
|
|
1651
|
+
let v = I;
|
|
1652
|
+
return Array.isArray(I) && (v = I[1]), { label: v, value: S.id };
|
|
1653
1653
|
});
|
|
1654
1654
|
l(x);
|
|
1655
1655
|
} catch (A) {
|
|
@@ -1669,15 +1669,15 @@ const Nt = ({
|
|
|
1669
1669
|
}, O = (_) => {
|
|
1670
1670
|
const { label: A, closable: x, onClose: S } = _, I = (E) => {
|
|
1671
1671
|
E.preventDefault(), E.stopPropagation();
|
|
1672
|
-
},
|
|
1672
|
+
}, v = nn(A);
|
|
1673
1673
|
return /* @__PURE__ */ n(
|
|
1674
1674
|
co,
|
|
1675
1675
|
{
|
|
1676
|
-
color:
|
|
1676
|
+
color: v,
|
|
1677
1677
|
onMouseDown: I,
|
|
1678
1678
|
closable: x,
|
|
1679
1679
|
onClose: S,
|
|
1680
|
-
closeIcon: /* @__PURE__ */ n("span", { style: { color:
|
|
1680
|
+
closeIcon: /* @__PURE__ */ n("span", { style: { color: v }, children: "X" }),
|
|
1681
1681
|
children: A
|
|
1682
1682
|
}
|
|
1683
1683
|
);
|
|
@@ -1720,7 +1720,7 @@ const Nt = ({
|
|
|
1720
1720
|
case "many2one":
|
|
1721
1721
|
return cl;
|
|
1722
1722
|
case "boolean":
|
|
1723
|
-
return
|
|
1723
|
+
return vs;
|
|
1724
1724
|
case "integer":
|
|
1725
1725
|
return rn;
|
|
1726
1726
|
case "float":
|
|
@@ -1748,7 +1748,7 @@ const Nt = ({
|
|
|
1748
1748
|
case "url":
|
|
1749
1749
|
return vc;
|
|
1750
1750
|
case "email":
|
|
1751
|
-
return
|
|
1751
|
+
return bc;
|
|
1752
1752
|
case "float_time":
|
|
1753
1753
|
return Bl;
|
|
1754
1754
|
case "fiber_grid":
|
|
@@ -1762,19 +1762,19 @@ const Nt = ({
|
|
|
1762
1762
|
case "tag":
|
|
1763
1763
|
return Ks;
|
|
1764
1764
|
case "multicheckbox":
|
|
1765
|
-
return
|
|
1765
|
+
return zc;
|
|
1766
1766
|
case "markdown":
|
|
1767
|
-
return
|
|
1767
|
+
return Zc;
|
|
1768
1768
|
case "radio":
|
|
1769
|
-
return
|
|
1769
|
+
return Qc;
|
|
1770
1770
|
case "switch":
|
|
1771
|
-
return
|
|
1771
|
+
return td;
|
|
1772
1772
|
case "steps":
|
|
1773
|
-
return
|
|
1773
|
+
return rd;
|
|
1774
1774
|
case "codeeditor":
|
|
1775
|
-
return
|
|
1775
|
+
return id;
|
|
1776
1776
|
case "comments_timeline":
|
|
1777
|
-
return
|
|
1777
|
+
return fd;
|
|
1778
1778
|
default:
|
|
1779
1779
|
return;
|
|
1780
1780
|
}
|
|
@@ -1829,16 +1829,16 @@ const Nt = ({
|
|
|
1829
1829
|
s < o && (o = s);
|
|
1830
1830
|
let a = !1, l = [];
|
|
1831
1831
|
const d = i.map((f, m) => {
|
|
1832
|
-
const
|
|
1833
|
-
row:
|
|
1832
|
+
const p = f.filter((y) => !y.invisible), h = zs({
|
|
1833
|
+
row: p,
|
|
1834
1834
|
numberOfColumns: o
|
|
1835
1835
|
});
|
|
1836
|
-
let
|
|
1837
|
-
return (m === 0 || !(f.length === 1 && f.some((y) => y.type === "group"))) && (
|
|
1836
|
+
let g = h;
|
|
1837
|
+
return (m === 0 || !(f.length === 1 && f.some((y) => y.type === "group"))) && (g = qs({
|
|
1838
1838
|
row: h,
|
|
1839
1839
|
numberOfColumns: o,
|
|
1840
1840
|
mustFillWithEmpties: r
|
|
1841
|
-
}), l = l.concat(
|
|
1841
|
+
}), l = l.concat(g)), g.map((y) => (y instanceof Dt && y.fieldForLabel && (a = !0), /* @__PURE__ */ n(
|
|
1842
1842
|
"div",
|
|
1843
1843
|
{
|
|
1844
1844
|
style: {
|
|
@@ -1901,7 +1901,7 @@ const Nt = ({
|
|
|
1901
1901
|
children: e
|
|
1902
1902
|
}
|
|
1903
1903
|
);
|
|
1904
|
-
},
|
|
1904
|
+
}, wr = (t) => typeof t == "string" && t === "true" || t === "false" ? t === "true" : t, oa = (t, e) => {
|
|
1905
1905
|
const r = da(t), i = la(r), o = ca(
|
|
1906
1906
|
i,
|
|
1907
1907
|
e
|
|
@@ -1928,9 +1928,9 @@ const Nt = ({
|
|
|
1928
1928
|
t,
|
|
1929
1929
|
"in",
|
|
1930
1930
|
e.map(
|
|
1931
|
-
(a) =>
|
|
1931
|
+
(a) => wr(a)
|
|
1932
1932
|
)
|
|
1933
|
-
] : [t, "=",
|
|
1933
|
+
] : [t, "=", wr(e)];
|
|
1934
1934
|
}, sa = (t) => Object.keys(t).filter((e) => e.indexOf("#date") !== -1), aa = (t) => {
|
|
1935
1935
|
const e = { ...t };
|
|
1936
1936
|
return Object.keys(e).forEach(
|
|
@@ -1988,20 +1988,20 @@ const Nt = ({
|
|
|
1988
1988
|
setActionViewTotalItems: c,
|
|
1989
1989
|
treeView: f,
|
|
1990
1990
|
formView: m,
|
|
1991
|
-
sorter:
|
|
1991
|
+
sorter: p,
|
|
1992
1992
|
setSorter: h,
|
|
1993
|
-
setCurrentItemIndex:
|
|
1993
|
+
setCurrentItemIndex: g,
|
|
1994
1994
|
setResultsActionView: y,
|
|
1995
|
-
resultsActionView:
|
|
1995
|
+
resultsActionView: w,
|
|
1996
1996
|
domain: T,
|
|
1997
1997
|
currentId: F,
|
|
1998
1998
|
limit: C,
|
|
1999
1999
|
setLimit: O,
|
|
2000
2000
|
searchParams: _ = [],
|
|
2001
2001
|
setSearchValues: A
|
|
2002
|
-
} = t, [x, S] = b(!1), [I,
|
|
2002
|
+
} = t, [x, S] = b(!1), [I, v] = 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([]), ce = De((oe) => {
|
|
2003
2003
|
y == null || y([...oe]), ne([...oe]);
|
|
2004
|
-
}, []), Ie = De(() =>
|
|
2004
|
+
}, []), Ie = De(() => w || U, [w, U]), Z = De(async () => {
|
|
2005
2005
|
const oe = await D.getHandler().nameSearch({
|
|
2006
2006
|
model: e,
|
|
2007
2007
|
payload: l,
|
|
@@ -2019,16 +2019,16 @@ const Nt = ({
|
|
|
2019
2019
|
fields: f.field_parent ? { ...f.fields, [f.field_parent]: {} } : f.fields,
|
|
2020
2020
|
context: u,
|
|
2021
2021
|
attrs: Ke
|
|
2022
|
-
}),
|
|
2023
|
-
ee.current = [...
|
|
2024
|
-
const Ve =
|
|
2025
|
-
resultsToSort:
|
|
2026
|
-
sorter:
|
|
2022
|
+
}), we = J[0];
|
|
2023
|
+
ee.current = [...we], Y(tn(J[1])), k(pr(J[1]));
|
|
2024
|
+
const Ve = we.map((ie) => ie.id), Be = p !== void 0 ? Rt({
|
|
2025
|
+
resultsToSort: we,
|
|
2026
|
+
sorter: p,
|
|
2027
2027
|
fields: { ...f.fields, ...m.fields }
|
|
2028
2028
|
}) : [...ee.current];
|
|
2029
|
-
ce(Be), Ve.length > 0 ?
|
|
2029
|
+
ce(Be), Ve.length > 0 ? g == null || g(0) : g == null || g(void 0);
|
|
2030
2030
|
} else
|
|
2031
|
-
ce([]),
|
|
2031
|
+
ce([]), g == null || g(void 0);
|
|
2032
2032
|
S(!1), d.current = !0;
|
|
2033
2033
|
}, [
|
|
2034
2034
|
ce,
|
|
@@ -2039,13 +2039,13 @@ const Nt = ({
|
|
|
2039
2039
|
T,
|
|
2040
2040
|
f,
|
|
2041
2041
|
m,
|
|
2042
|
-
g,
|
|
2043
2042
|
p,
|
|
2043
|
+
g,
|
|
2044
2044
|
c
|
|
2045
2045
|
]), q = De(
|
|
2046
2046
|
async (oe) => {
|
|
2047
|
-
const { params: Ee, newOffset: ye } = oe || {}, Me = Wt(Ee || _, T), { colors: Ke, status: J } = _t(f),
|
|
2048
|
-
Ke && (
|
|
2047
|
+
const { params: Ee, newOffset: ye } = oe || {}, Me = Wt(Ee || _, T), { colors: Ke, status: J } = _t(f), we = {};
|
|
2048
|
+
Ke && (we.colors = Ke), J && (we.status = J);
|
|
2049
2049
|
const { totalItems: Ve, results: Be, attrsEvaluated: ie } = await D.getHandler().searchForTree({
|
|
2050
2050
|
params: Me,
|
|
2051
2051
|
limit: L.current,
|
|
@@ -2053,28 +2053,28 @@ const Nt = ({
|
|
|
2053
2053
|
model: e,
|
|
2054
2054
|
fields: f.field_parent ? { ...f.fields, [f.field_parent]: {} } : f.fields,
|
|
2055
2055
|
context: u,
|
|
2056
|
-
attrs:
|
|
2056
|
+
attrs: we
|
|
2057
2057
|
});
|
|
2058
2058
|
Y(tn(ie)), k(pr(ie)), ee.current = [...Be];
|
|
2059
|
-
const ue =
|
|
2059
|
+
const ue = p !== void 0 ? Rt({
|
|
2060
2060
|
resultsToSort: Be,
|
|
2061
|
-
sorter:
|
|
2061
|
+
sorter: p,
|
|
2062
2062
|
fields: { ...f.fields, ...m.fields }
|
|
2063
2063
|
}) : [...ee.current];
|
|
2064
|
-
if (ce(ue),
|
|
2064
|
+
if (ce(ue), w && ue.length > 0) {
|
|
2065
2065
|
const ae = ue.findIndex(
|
|
2066
2066
|
(et) => F === et.id
|
|
2067
2067
|
);
|
|
2068
|
-
ae === -1 ?
|
|
2068
|
+
ae === -1 ? g == null || g(0) : g == null || g(ae);
|
|
2069
2069
|
} else
|
|
2070
|
-
|
|
2070
|
+
g == null || g(void 0);
|
|
2071
2071
|
S(!1);
|
|
2072
2072
|
const $e = await Ve;
|
|
2073
2073
|
R($e), c == null || c($e);
|
|
2074
2074
|
},
|
|
2075
2075
|
[
|
|
2076
|
-
|
|
2077
|
-
|
|
2076
|
+
g,
|
|
2077
|
+
w,
|
|
2078
2078
|
ce,
|
|
2079
2079
|
F,
|
|
2080
2080
|
e,
|
|
@@ -2082,7 +2082,7 @@ const Nt = ({
|
|
|
2082
2082
|
T,
|
|
2083
2083
|
f,
|
|
2084
2084
|
m,
|
|
2085
|
-
|
|
2085
|
+
p,
|
|
2086
2086
|
c,
|
|
2087
2087
|
C,
|
|
2088
2088
|
N,
|
|
@@ -2095,7 +2095,7 @@ const Nt = ({
|
|
|
2095
2095
|
} catch (Ee) {
|
|
2096
2096
|
P(Ee.message);
|
|
2097
2097
|
} finally {
|
|
2098
|
-
i == null || i([]),
|
|
2098
|
+
i == null || i([]), v(!1), a == null || a(!1);
|
|
2099
2099
|
}
|
|
2100
2100
|
},
|
|
2101
2101
|
[
|
|
@@ -2107,21 +2107,21 @@ const Nt = ({
|
|
|
2107
2107
|
e,
|
|
2108
2108
|
l,
|
|
2109
2109
|
N,
|
|
2110
|
-
|
|
2110
|
+
w,
|
|
2111
2111
|
d,
|
|
2112
2112
|
c,
|
|
2113
|
-
|
|
2113
|
+
g,
|
|
2114
2114
|
ce,
|
|
2115
2115
|
P,
|
|
2116
|
-
|
|
2116
|
+
v,
|
|
2117
2117
|
S,
|
|
2118
2118
|
a,
|
|
2119
|
-
|
|
2119
|
+
p,
|
|
2120
2120
|
f
|
|
2121
2121
|
]
|
|
2122
|
-
),
|
|
2122
|
+
), ve = De(
|
|
2123
2123
|
(oe) => {
|
|
2124
|
-
if (JSON.stringify(oe) === JSON.stringify(
|
|
2124
|
+
if (JSON.stringify(oe) === JSON.stringify(p))
|
|
2125
2125
|
return;
|
|
2126
2126
|
h == null || h(oe);
|
|
2127
2127
|
const Ee = oe !== void 0 ? Rt({
|
|
@@ -2135,7 +2135,7 @@ const Nt = ({
|
|
|
2135
2135
|
), Ye = De(
|
|
2136
2136
|
(oe) => {
|
|
2137
2137
|
const { params: Ee, searchValues: ye, limit: Me, offset: Ke } = oe;
|
|
2138
|
-
x || (r == null || r(void 0), i == null || i([]), A == null || A(ye), o == null || o(Ee), s == null || s(!1),
|
|
2138
|
+
x || (r == null || r(void 0), i == null || i([]), A == null || A(ye), o == null || o(Ee), s == null || s(!1), v(!0), P(void 0), j(1), Me && (L.current = Me, O == null || O(Me)), Ke && B(Ke), Ce({
|
|
2139
2139
|
params: Ee,
|
|
2140
2140
|
newOffset: Ke
|
|
2141
2141
|
}));
|
|
@@ -2146,7 +2146,7 @@ const Nt = ({
|
|
|
2146
2146
|
i,
|
|
2147
2147
|
o,
|
|
2148
2148
|
s,
|
|
2149
|
-
|
|
2149
|
+
v,
|
|
2150
2150
|
P,
|
|
2151
2151
|
j,
|
|
2152
2152
|
O,
|
|
@@ -2198,14 +2198,14 @@ const Nt = ({
|
|
|
2198
2198
|
limit: C,
|
|
2199
2199
|
getResults: Ie,
|
|
2200
2200
|
requestPageChange: ke,
|
|
2201
|
-
changeSort:
|
|
2201
|
+
changeSort: ve,
|
|
2202
2202
|
fetchChildrenForRecord: Ue,
|
|
2203
2203
|
colorsForResults: X,
|
|
2204
2204
|
statusForResults: G,
|
|
2205
2205
|
totalItems: K,
|
|
2206
2206
|
getAllIds: xe
|
|
2207
2207
|
};
|
|
2208
|
-
},
|
|
2208
|
+
}, it = Qe.createContext(null), fa = (t) => {
|
|
2209
2209
|
const {
|
|
2210
2210
|
children: e,
|
|
2211
2211
|
currentView: r,
|
|
@@ -2219,11 +2219,11 @@ const Nt = ({
|
|
|
2219
2219
|
setCurrentId: c,
|
|
2220
2220
|
setResults: f,
|
|
2221
2221
|
results: m,
|
|
2222
|
-
currentItemIndex:
|
|
2222
|
+
currentItemIndex: p,
|
|
2223
2223
|
setCurrentItemIndex: h,
|
|
2224
|
-
currentModel:
|
|
2224
|
+
currentModel: g,
|
|
2225
2225
|
sorter: y,
|
|
2226
|
-
setSorter:
|
|
2226
|
+
setSorter: w,
|
|
2227
2227
|
totalItems: T,
|
|
2228
2228
|
setTotalItems: F,
|
|
2229
2229
|
setSelectedRowItems: C,
|
|
@@ -2232,11 +2232,11 @@ const Nt = ({
|
|
|
2232
2232
|
setSearchTreeNameSearch: A,
|
|
2233
2233
|
goToResourceId: x,
|
|
2234
2234
|
limit: S
|
|
2235
|
-
} = t, [I,
|
|
2235
|
+
} = t, [I, v] = 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), [ce, Ie] = b(!0), [Z, q] = b(), [Ce, ve] = b({}), [Ye, ke] = b(
|
|
2236
2236
|
S !== void 0 ? S : jt
|
|
2237
2237
|
), [Le, Ue] = b(i);
|
|
2238
2238
|
me(() => {
|
|
2239
|
-
m && m.length > 0 && !
|
|
2239
|
+
m && m.length > 0 && !p && (h == null || h(0), c == null || c(m[0].id));
|
|
2240
2240
|
}, [m]), me(() => {
|
|
2241
2241
|
ke(S !== void 0 ? S : jt);
|
|
2242
2242
|
}, [S]), me(() => {
|
|
@@ -2257,7 +2257,7 @@ const Nt = ({
|
|
|
2257
2257
|
return await ((oe = a.current) == null ? void 0 : oe.submitForm());
|
|
2258
2258
|
};
|
|
2259
2259
|
return /* @__PURE__ */ n(
|
|
2260
|
-
|
|
2260
|
+
it.Provider,
|
|
2261
2261
|
{
|
|
2262
2262
|
value: {
|
|
2263
2263
|
title: Le,
|
|
@@ -2265,7 +2265,7 @@ const Nt = ({
|
|
|
2265
2265
|
setCurrentView: o,
|
|
2266
2266
|
availableViews: s,
|
|
2267
2267
|
formIsSaving: I,
|
|
2268
|
-
setFormIsSaving:
|
|
2268
|
+
setFormIsSaving: v,
|
|
2269
2269
|
formHasChanges: E,
|
|
2270
2270
|
setFormHasChanges: P,
|
|
2271
2271
|
formRef: a,
|
|
@@ -2274,11 +2274,11 @@ const Nt = ({
|
|
|
2274
2274
|
onNewClicked: d,
|
|
2275
2275
|
currentId: u,
|
|
2276
2276
|
setCurrentId: c,
|
|
2277
|
-
currentItemIndex:
|
|
2277
|
+
currentItemIndex: p,
|
|
2278
2278
|
setCurrentItemIndex: h,
|
|
2279
2279
|
results: m,
|
|
2280
2280
|
setResults: f,
|
|
2281
|
-
currentModel:
|
|
2281
|
+
currentModel: g,
|
|
2282
2282
|
removingItem: M,
|
|
2283
2283
|
setRemovingItem: j,
|
|
2284
2284
|
formIsLoading: N,
|
|
@@ -2296,7 +2296,7 @@ const Nt = ({
|
|
|
2296
2296
|
searchVisible: L,
|
|
2297
2297
|
setSearchVisible: ee,
|
|
2298
2298
|
sorter: y,
|
|
2299
|
-
setSorter:
|
|
2299
|
+
setSorter: w,
|
|
2300
2300
|
totalItems: T,
|
|
2301
2301
|
setTotalItems: F,
|
|
2302
2302
|
searchTreeNameSearch: _,
|
|
@@ -2307,7 +2307,7 @@ const Nt = ({
|
|
|
2307
2307
|
setPreviousView: q,
|
|
2308
2308
|
goToResourceId: x,
|
|
2309
2309
|
searchValues: Ce,
|
|
2310
|
-
setSearchValues:
|
|
2310
|
+
setSearchValues: ve,
|
|
2311
2311
|
limit: Ye,
|
|
2312
2312
|
setLimit: ke,
|
|
2313
2313
|
setTitle: Ue
|
|
@@ -2326,7 +2326,7 @@ const Nt = ({
|
|
|
2326
2326
|
onChangeTab: l,
|
|
2327
2327
|
onRemoveTab: d,
|
|
2328
2328
|
tabs: u
|
|
2329
|
-
} = t, [c, f] = b(), [m,
|
|
2329
|
+
} = t, [c, f] = b(), [m, p] = b();
|
|
2330
2330
|
return /* @__PURE__ */ n(
|
|
2331
2331
|
dt.Provider,
|
|
2332
2332
|
{
|
|
@@ -2341,13 +2341,13 @@ const Nt = ({
|
|
|
2341
2341
|
tabs: u,
|
|
2342
2342
|
currentId: m,
|
|
2343
2343
|
currentView: c,
|
|
2344
|
-
setCurrentId:
|
|
2344
|
+
setCurrentId: p,
|
|
2345
2345
|
setCurrentView: f
|
|
2346
2346
|
},
|
|
2347
2347
|
children: e
|
|
2348
2348
|
}
|
|
2349
2349
|
);
|
|
2350
|
-
}, Pt = Qe.createContext(null),
|
|
2350
|
+
}, Pt = Qe.createContext(null), vr = async (t) => {
|
|
2351
2351
|
var e;
|
|
2352
2352
|
for (let r = 0; r < t.length; r++)
|
|
2353
2353
|
await ((e = t == null ? void 0 : t[r]) == null ? void 0 : e.call(t));
|
|
@@ -2358,13 +2358,13 @@ const Nt = ({
|
|
|
2358
2358
|
bt(e, () => ({
|
|
2359
2359
|
openActionModal: C
|
|
2360
2360
|
}));
|
|
2361
|
-
const [m,
|
|
2361
|
+
const [m, p] = b(!1), [h, g] = b(
|
|
2362
2362
|
{
|
|
2363
2363
|
context: {}
|
|
2364
2364
|
}
|
|
2365
2365
|
);
|
|
2366
2366
|
async function y(A) {
|
|
2367
|
-
const { reportData: x, fields: S, values: I, context:
|
|
2367
|
+
const { reportData: x, fields: S, values: I, context: v = {} } = A, {
|
|
2368
2368
|
context: E,
|
|
2369
2369
|
model: P,
|
|
2370
2370
|
datas: M = {},
|
|
@@ -2375,7 +2375,7 @@ const Nt = ({
|
|
|
2375
2375
|
ze(`${N} action not supported`);
|
|
2376
2376
|
return;
|
|
2377
2377
|
}
|
|
2378
|
-
const { ids: B } = M || {}, K = B || [], R = typeof E == "string" ?
|
|
2378
|
+
const { ids: B } = M || {}, K = B || [], R = typeof E == "string" ? wt({
|
|
2379
2379
|
context: E,
|
|
2380
2380
|
fields: S,
|
|
2381
2381
|
values: I
|
|
@@ -2386,16 +2386,16 @@ const Nt = ({
|
|
|
2386
2386
|
name: j,
|
|
2387
2387
|
datas: M,
|
|
2388
2388
|
ids: K,
|
|
2389
|
-
context: { ...
|
|
2389
|
+
context: { ...v, ...R }
|
|
2390
2390
|
});
|
|
2391
2391
|
l(!0), s.current = !0, o.current = setInterval(() => {
|
|
2392
|
-
|
|
2392
|
+
w(U);
|
|
2393
2393
|
}, 1e3);
|
|
2394
2394
|
} catch (U) {
|
|
2395
2395
|
s.current = !1, clearInterval(o.current), ze(U), l(!1);
|
|
2396
2396
|
}
|
|
2397
2397
|
}
|
|
2398
|
-
async function
|
|
2398
|
+
async function w(A) {
|
|
2399
2399
|
let x;
|
|
2400
2400
|
try {
|
|
2401
2401
|
if (x = await D.getHandler().getReport({
|
|
@@ -2414,10 +2414,10 @@ const Nt = ({
|
|
|
2414
2414
|
fields: x,
|
|
2415
2415
|
values: S,
|
|
2416
2416
|
context: I,
|
|
2417
|
-
onRefreshParentValues:
|
|
2417
|
+
onRefreshParentValues: v
|
|
2418
2418
|
}) {
|
|
2419
2419
|
const { type: E } = A;
|
|
2420
|
-
if (c.current.push(
|
|
2420
|
+
if (c.current.push(v), E === "ir.actions.report.xml")
|
|
2421
2421
|
return await y({
|
|
2422
2422
|
reportData: A,
|
|
2423
2423
|
fields: x,
|
|
@@ -2441,59 +2441,59 @@ const Nt = ({
|
|
|
2441
2441
|
context: I = {}
|
|
2442
2442
|
}) {
|
|
2443
2443
|
var j;
|
|
2444
|
-
let
|
|
2445
|
-
A.res_model || (
|
|
2444
|
+
let v = A;
|
|
2445
|
+
A.res_model || (v = (await D.getHandler().readObjects({
|
|
2446
2446
|
model: "ir.actions.act_window",
|
|
2447
2447
|
ids: [parseInt(A.id)],
|
|
2448
2448
|
context: I
|
|
2449
2449
|
}))[0]);
|
|
2450
|
-
const E = typeof (
|
|
2451
|
-
context:
|
|
2450
|
+
const E = typeof (v == null ? void 0 : v.context) == "string" ? wt({
|
|
2451
|
+
context: v.context,
|
|
2452
2452
|
fields: x,
|
|
2453
2453
|
values: { ...S, ...i }
|
|
2454
|
-
}) :
|
|
2454
|
+
}) : v.context, P = {
|
|
2455
2455
|
...I,
|
|
2456
2456
|
...E
|
|
2457
2457
|
};
|
|
2458
2458
|
let M = [];
|
|
2459
|
-
if (
|
|
2460
|
-
domain:
|
|
2459
|
+
if (v.domain && (M = await D.getHandler().evalDomain({
|
|
2460
|
+
domain: v.domain,
|
|
2461
2461
|
values: Nt({
|
|
2462
2462
|
fields: x,
|
|
2463
2463
|
values: { ...S, ...i }
|
|
2464
2464
|
}),
|
|
2465
2465
|
fields: x,
|
|
2466
2466
|
context: P
|
|
2467
|
-
})),
|
|
2467
|
+
})), v.target === "new") {
|
|
2468
2468
|
const N = await D.getHandler().getView({
|
|
2469
|
-
model:
|
|
2469
|
+
model: v.res_model,
|
|
2470
2470
|
type: "form",
|
|
2471
|
-
id: ((j =
|
|
2471
|
+
id: ((j = v == null ? void 0 : v.view_id) == null ? void 0 : j[0]) || void 0,
|
|
2472
2472
|
context: P
|
|
2473
2473
|
});
|
|
2474
2474
|
return C({
|
|
2475
2475
|
domain: M,
|
|
2476
|
-
model:
|
|
2476
|
+
model: v.res_model,
|
|
2477
2477
|
formView: N,
|
|
2478
2478
|
context: P
|
|
2479
2479
|
}), {};
|
|
2480
2480
|
} else {
|
|
2481
2481
|
const { initialView: N, views: B } = await pa({
|
|
2482
|
-
model:
|
|
2482
|
+
model: v.res_model,
|
|
2483
2483
|
context: P,
|
|
2484
|
-
view_mode:
|
|
2485
|
-
views:
|
|
2484
|
+
view_mode: v.view_mode,
|
|
2485
|
+
views: v.views
|
|
2486
2486
|
});
|
|
2487
2487
|
return u == null || u({
|
|
2488
2488
|
target: "current",
|
|
2489
2489
|
context: P,
|
|
2490
2490
|
domain: M,
|
|
2491
|
-
model:
|
|
2491
|
+
model: v.res_model,
|
|
2492
2492
|
views: B,
|
|
2493
|
-
title:
|
|
2493
|
+
title: v.name,
|
|
2494
2494
|
initialView: N,
|
|
2495
|
-
action_id:
|
|
2496
|
-
action_type:
|
|
2495
|
+
action_id: v.id,
|
|
2496
|
+
action_type: v.type
|
|
2497
2497
|
}), { closeParent: !0 };
|
|
2498
2498
|
}
|
|
2499
2499
|
}
|
|
@@ -2502,27 +2502,27 @@ const Nt = ({
|
|
|
2502
2502
|
model: x,
|
|
2503
2503
|
formView: S,
|
|
2504
2504
|
context: I,
|
|
2505
|
-
actionData:
|
|
2505
|
+
actionData: v
|
|
2506
2506
|
}) {
|
|
2507
|
-
m ? O({ domain: A, model: x, formView: S, context: I, actionData:
|
|
2507
|
+
m ? O({ domain: A, model: x, formView: S, context: I, actionData: v }) : (g({ domain: A, model: x, context: I, formView: S, actionData: v }), p(!0));
|
|
2508
2508
|
}
|
|
2509
2509
|
async function O({
|
|
2510
2510
|
domain: A,
|
|
2511
2511
|
model: x,
|
|
2512
2512
|
formView: S,
|
|
2513
2513
|
context: I,
|
|
2514
|
-
actionData:
|
|
2514
|
+
actionData: v
|
|
2515
2515
|
}) {
|
|
2516
|
-
|
|
2516
|
+
g({
|
|
2517
2517
|
domain: void 0,
|
|
2518
2518
|
model: void 0,
|
|
2519
2519
|
context: {},
|
|
2520
2520
|
formView: void 0,
|
|
2521
2521
|
actionData: void 0
|
|
2522
|
-
}),
|
|
2522
|
+
}), p(!1), await new Promise((E) => setTimeout(E, 300)), g({ domain: A, model: x, context: I, formView: S, actionData: v }), p(!0);
|
|
2523
2523
|
}
|
|
2524
2524
|
async function _() {
|
|
2525
|
-
|
|
2525
|
+
vr(c.current), c.current = [], p(!1), g({
|
|
2526
2526
|
domain: void 0,
|
|
2527
2527
|
model: void 0,
|
|
2528
2528
|
context: {},
|
|
@@ -2561,7 +2561,7 @@ const Nt = ({
|
|
|
2561
2561
|
visible: m,
|
|
2562
2562
|
onSubmitSucceed: _,
|
|
2563
2563
|
onCancel: () => {
|
|
2564
|
-
|
|
2564
|
+
vr(c.current), c.current = [], p(!1), g({
|
|
2565
2565
|
domain: void 0,
|
|
2566
2566
|
model: void 0,
|
|
2567
2567
|
context: {},
|
|
@@ -2628,7 +2628,7 @@ async function pa({
|
|
|
2628
2628
|
}
|
|
2629
2629
|
return { views: s, initialView: a };
|
|
2630
2630
|
}
|
|
2631
|
-
const ga =
|
|
2631
|
+
const ga = vt(ha), ya = ({
|
|
2632
2632
|
error: t,
|
|
2633
2633
|
className: e
|
|
2634
2634
|
}) => {
|
|
@@ -2649,8 +2649,8 @@ const ga = wt(ha), ya = ({
|
|
|
2649
2649
|
banner: !0
|
|
2650
2650
|
}
|
|
2651
2651
|
);
|
|
2652
|
-
},
|
|
2653
|
-
function
|
|
2652
|
+
}, wa = 800;
|
|
2653
|
+
function va(t, e) {
|
|
2654
2654
|
const {
|
|
2655
2655
|
model: r,
|
|
2656
2656
|
id: i,
|
|
@@ -2663,19 +2663,19 @@ function wa(t, e) {
|
|
|
2663
2663
|
readOnly: c = !1,
|
|
2664
2664
|
mustClearAfterSave: f = !1,
|
|
2665
2665
|
submitMode: m = "api",
|
|
2666
|
-
values:
|
|
2666
|
+
values: p,
|
|
2667
2667
|
formView: h,
|
|
2668
|
-
postSaveAction:
|
|
2668
|
+
postSaveAction: g,
|
|
2669
2669
|
insideButtonModal: y = !1,
|
|
2670
|
-
parentContext:
|
|
2670
|
+
parentContext: w = {},
|
|
2671
2671
|
actionDomain: T,
|
|
2672
2672
|
visible: F = !0,
|
|
2673
2673
|
rootForm: C = !1,
|
|
2674
2674
|
defaultValues: O,
|
|
2675
2675
|
forcedValues: _ = {},
|
|
2676
2676
|
parentWidth: A
|
|
2677
|
-
} = t, { t: x, lang: S } = H(he), [I,
|
|
2678
|
-
|
|
2677
|
+
} = t, { t: x, lang: S } = H(he), [I, v] = 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({}), ce = de({}), Ie = de(!1), Z = de(!1), q = de(!1), ve = (A !== void 0 ? A : X) < wa, Ye = H(Ne), { activeId: ke, getPlainValues: Le } = Ye || {}, Ue = H(
|
|
2678
|
+
it
|
|
2679
2679
|
), {
|
|
2680
2680
|
setFormIsSaving: xe = void 0,
|
|
2681
2681
|
setFormHasChanges: oe = void 0,
|
|
@@ -2684,9 +2684,9 @@ function wa(t, e) {
|
|
|
2684
2684
|
setAttachments: Me = void 0,
|
|
2685
2685
|
title: Ke = void 0,
|
|
2686
2686
|
setTitle: J = void 0
|
|
2687
|
-
} = (C ? Ue : {}) || {},
|
|
2687
|
+
} = (C ? Ue : {}) || {}, we = H(
|
|
2688
2688
|
Pt
|
|
2689
|
-
), { processAction: Ve, globalValues: Be } =
|
|
2689
|
+
), { processAction: Ve, globalValues: Be } = we || {};
|
|
2690
2690
|
bt(e, () => ({
|
|
2691
2691
|
submitForm: Xt,
|
|
2692
2692
|
getFields: et,
|
|
@@ -2706,8 +2706,8 @@ function wa(t, e) {
|
|
|
2706
2706
|
}
|
|
2707
2707
|
(i === void 0 && R || i !== void 0 && R && i < 0) && (L.current = void 0, j(void 0)), tr();
|
|
2708
2708
|
}
|
|
2709
|
-
}, [i, r,
|
|
2710
|
-
G && (
|
|
2709
|
+
}, [i, r, p, h, F]), me(() => {
|
|
2710
|
+
G && (wn({
|
|
2711
2711
|
elementHasLostFocus: !0
|
|
2712
2712
|
}), k(!1));
|
|
2713
2713
|
}, [G]);
|
|
@@ -2749,7 +2749,7 @@ function wa(t, e) {
|
|
|
2749
2749
|
return $;
|
|
2750
2750
|
}
|
|
2751
2751
|
function Se() {
|
|
2752
|
-
return { ...
|
|
2752
|
+
return { ...w, ...M == null ? void 0 : M.context };
|
|
2753
2753
|
}
|
|
2754
2754
|
function pe() {
|
|
2755
2755
|
return ae() ? { active_id: ae(), active_ids: [ae()] } : {};
|
|
@@ -2768,7 +2768,7 @@ function wa(t, e) {
|
|
|
2768
2768
|
return await D.getHandler().defaultGet({
|
|
2769
2769
|
model: r,
|
|
2770
2770
|
fields: $,
|
|
2771
|
-
context: { ...
|
|
2771
|
+
context: { ...w, ...W },
|
|
2772
2772
|
extraValues: O
|
|
2773
2773
|
});
|
|
2774
2774
|
}, nt = () => Object.keys(
|
|
@@ -2812,7 +2812,7 @@ function wa(t, e) {
|
|
|
2812
2812
|
}
|
|
2813
2813
|
}, gt = async ($) => {
|
|
2814
2814
|
let W, te, re, fe;
|
|
2815
|
-
ye == null || ye(!0), P(void 0), $ != null && $.fields ? (te = $.fields, re = $.arch) : (te = R, re = B),
|
|
2815
|
+
ye == null || ye(!0), P(void 0), $ != null && $.fields ? (te = $.fields, re = $.arch) : (te = R, re = B), p && ($ == null ? void 0 : $.forceRefresh) !== !0 ? W = p : { values: W, defaultGetCalled: fe } = await Do({
|
|
2816
2816
|
fields: te,
|
|
2817
2817
|
arch: re
|
|
2818
2818
|
}), T && (W = { ...Bs(T), ...W }), ee.current = Ft(W, te), Lt({
|
|
@@ -2836,13 +2836,13 @@ function wa(t, e) {
|
|
|
2836
2836
|
const $ = await D.getHandler().getActionStringForModel(r);
|
|
2837
2837
|
return (await D.getHandler().getViewsForAction({
|
|
2838
2838
|
action: $,
|
|
2839
|
-
context:
|
|
2839
|
+
context: w
|
|
2840
2840
|
})).views.get("form");
|
|
2841
2841
|
}
|
|
2842
2842
|
return await D.getHandler().getView({
|
|
2843
2843
|
model: r,
|
|
2844
2844
|
type: "form",
|
|
2845
|
-
context:
|
|
2845
|
+
context: w
|
|
2846
2846
|
});
|
|
2847
2847
|
}, Lt = ({
|
|
2848
2848
|
values: $,
|
|
@@ -2869,7 +2869,7 @@ function wa(t, e) {
|
|
|
2869
2869
|
model: r,
|
|
2870
2870
|
ids: [ae()],
|
|
2871
2871
|
fields: $,
|
|
2872
|
-
context:
|
|
2872
|
+
context: w
|
|
2873
2873
|
}))[0];
|
|
2874
2874
|
const fe = await D.getHandler().search({
|
|
2875
2875
|
params: [
|
|
@@ -2898,7 +2898,7 @@ function wa(t, e) {
|
|
|
2898
2898
|
values: { ...te, ..._ },
|
|
2899
2899
|
fields: R,
|
|
2900
2900
|
context: {
|
|
2901
|
-
...
|
|
2901
|
+
...w,
|
|
2902
2902
|
...M == null ? void 0 : M.context
|
|
2903
2903
|
}
|
|
2904
2904
|
}), ee.current = qe(R);
|
|
@@ -2908,13 +2908,13 @@ function wa(t, e) {
|
|
|
2908
2908
|
values: { ...te, ..._ },
|
|
2909
2909
|
fields: R,
|
|
2910
2910
|
context: {
|
|
2911
|
-
...
|
|
2911
|
+
...w,
|
|
2912
2912
|
...M == null ? void 0 : M.context
|
|
2913
2913
|
}
|
|
2914
2914
|
});
|
|
2915
2915
|
L.current = re, ee.current = te;
|
|
2916
2916
|
}
|
|
2917
|
-
|
|
2917
|
+
g && await g([ae()]), !y && W && (ie == null || ie(ae(), We(), se()));
|
|
2918
2918
|
}, ko = async ($) => {
|
|
2919
2919
|
const { callOnSubmitSucceed: W = !0 } = $ || {};
|
|
2920
2920
|
!y && W && (ie == null || ie(ae(), We(), se()));
|
|
@@ -2935,13 +2935,13 @@ function wa(t, e) {
|
|
|
2935
2935
|
return Z.current = !1, oe == null || oe(!1), ue == null || ue(), { succeed: !0, id: ae() };
|
|
2936
2936
|
if (await St())
|
|
2937
2937
|
return Z.current = !1, yr(S), { succeed: !1, id: ae() };
|
|
2938
|
-
|
|
2938
|
+
v(!0), xe == null || xe(!0);
|
|
2939
2939
|
try {
|
|
2940
2940
|
m === "api" ? await rr($) : await ko($), f && (L.current = void 0, Lt({ values: {}, fields: R, reset: !0 })), await gt({ forceRefresh: !0 }), W = !0, xn.success(x("savedRegisters"));
|
|
2941
2941
|
} catch (re) {
|
|
2942
|
-
Z.current = !1,
|
|
2942
|
+
Z.current = !1, v(!1), xe == null || xe(!1), $e == null || $e(re), xn.error(x("errorWhileSavingForm")), P(re != null && re.message ? re.message : re);
|
|
2943
2943
|
} finally {
|
|
2944
|
-
Z.current = !1, xe == null || xe(!1),
|
|
2944
|
+
Z.current = !1, xe == null || xe(!1), v(!1);
|
|
2945
2945
|
}
|
|
2946
2946
|
return { succeed: W, id: ae() };
|
|
2947
2947
|
}, Bt = ({
|
|
@@ -2962,7 +2962,7 @@ function wa(t, e) {
|
|
|
2962
2962
|
$
|
|
2963
2963
|
)
|
|
2964
2964
|
}), j(fe), fe.string && fe.string !== Ke && (J == null || J(fe.string)), ne && fe.string && ((rt = ne.setTitle) == null || rt.call(ne, fe.string));
|
|
2965
|
-
},
|
|
2965
|
+
}, wn = async ({
|
|
2966
2966
|
elementHasLostFocus: $ = !1
|
|
2967
2967
|
}) => {
|
|
2968
2968
|
if (Z.current)
|
|
@@ -2990,7 +2990,7 @@ function wa(t, e) {
|
|
|
2990
2990
|
const re = Ft(N.getFieldsValue(!0), R);
|
|
2991
2991
|
ce.current = re, d == null || d(re), oe == null || oe(!0), Mo(te);
|
|
2992
2992
|
}
|
|
2993
|
-
}, Eo = Ci(
|
|
2993
|
+
}, Eo = Ci(wn, 100), Mo = async ($) => {
|
|
2994
2994
|
try {
|
|
2995
2995
|
for (let W = 0; W < $.length; W += 1) {
|
|
2996
2996
|
const te = $[W];
|
|
@@ -3013,7 +3013,7 @@ function wa(t, e) {
|
|
|
3013
3013
|
values: {
|
|
3014
3014
|
...qe(R),
|
|
3015
3015
|
context: {
|
|
3016
|
-
...
|
|
3016
|
+
...w,
|
|
3017
3017
|
...M == null ? void 0 : M.context
|
|
3018
3018
|
}
|
|
3019
3019
|
},
|
|
@@ -3065,7 +3065,7 @@ function wa(t, e) {
|
|
|
3065
3065
|
payload: [ae()],
|
|
3066
3066
|
context: {
|
|
3067
3067
|
...M == null ? void 0 : M.context,
|
|
3068
|
-
...
|
|
3068
|
+
...w,
|
|
3069
3069
|
...W
|
|
3070
3070
|
}
|
|
3071
3071
|
});
|
|
@@ -3075,7 +3075,7 @@ function wa(t, e) {
|
|
|
3075
3075
|
ie == null || ie(ae(), We(), se());
|
|
3076
3076
|
else if (te.type) {
|
|
3077
3077
|
let re = {};
|
|
3078
|
-
te.context && (re =
|
|
3078
|
+
te.context && (re = wt({
|
|
3079
3079
|
context: te.context,
|
|
3080
3080
|
fields: R,
|
|
3081
3081
|
values: We()
|
|
@@ -3101,7 +3101,7 @@ function wa(t, e) {
|
|
|
3101
3101
|
const te = (await D.getHandler().readObjects({
|
|
3102
3102
|
model: "ir.actions.actions",
|
|
3103
3103
|
ids: [parseInt($)],
|
|
3104
|
-
context:
|
|
3104
|
+
context: w
|
|
3105
3105
|
}))[0];
|
|
3106
3106
|
await or({ actionData: te, context: W });
|
|
3107
3107
|
}
|
|
@@ -3114,7 +3114,7 @@ function wa(t, e) {
|
|
|
3114
3114
|
fields: R,
|
|
3115
3115
|
values: We(),
|
|
3116
3116
|
context: {
|
|
3117
|
-
...
|
|
3117
|
+
...w,
|
|
3118
3118
|
...M == null ? void 0 : M.context,
|
|
3119
3119
|
...W
|
|
3120
3120
|
},
|
|
@@ -3125,9 +3125,9 @@ function wa(t, e) {
|
|
|
3125
3125
|
!C && te && (ie == null || ie(ae(), We(), se()));
|
|
3126
3126
|
}
|
|
3127
3127
|
function $o() {
|
|
3128
|
-
|
|
3128
|
+
wn({ elementHasLostFocus: !0 });
|
|
3129
3129
|
}
|
|
3130
|
-
function
|
|
3130
|
+
function vn($) {
|
|
3131
3131
|
Bt({
|
|
3132
3132
|
fields: R,
|
|
3133
3133
|
arch: B,
|
|
@@ -3150,11 +3150,11 @@ function wa(t, e) {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
let re = !1;
|
|
3152
3152
|
try {
|
|
3153
|
-
!c && (nt() || ae() === void 0) && (re = !0,
|
|
3153
|
+
!c && (nt() || ae() === void 0) && (re = !0, vn(!0), m === "2many" ? (await rr({ callOnSubmitSucceed: !1 }), q.current = !0) : await Xt({ callOnSubmitSucceed: !1 }));
|
|
3154
3154
|
const fe = q.current ? pe() : {}, rt = { ...te, ...fe };
|
|
3155
|
-
$ === "object" ? await Po({ action: W, context: rt }) : $ === "workflow" ? await Lo({ action: W }) : $ === "action" && await Bo({ action: W, context: rt }), re &&
|
|
3155
|
+
$ === "object" ? await Po({ action: W, context: rt }) : $ === "workflow" ? await Lo({ action: W }) : $ === "action" && await Bo({ action: W, context: rt }), re && vn(!1);
|
|
3156
3156
|
} catch (fe) {
|
|
3157
|
-
re &&
|
|
3157
|
+
re && vn(!1), ze(fe);
|
|
3158
3158
|
}
|
|
3159
3159
|
}
|
|
3160
3160
|
const Ko = () => !M && !E ? /* @__PURE__ */ n(Ae, {}) : !r && !h || !F ? null : /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ n(
|
|
@@ -3186,7 +3186,7 @@ function wa(t, e) {
|
|
|
3186
3186
|
Dn,
|
|
3187
3187
|
{
|
|
3188
3188
|
container: M.container,
|
|
3189
|
-
responsiveBehaviour:
|
|
3189
|
+
responsiveBehaviour: ve
|
|
3190
3190
|
}
|
|
3191
3191
|
)
|
|
3192
3192
|
}
|
|
@@ -3237,7 +3237,7 @@ function wa(t, e) {
|
|
|
3237
3237
|
}
|
|
3238
3238
|
) : null;
|
|
3239
3239
|
}
|
|
3240
|
-
const Jt =
|
|
3240
|
+
const Jt = vt(va), Zt = (t) => {
|
|
3241
3241
|
const {
|
|
3242
3242
|
visible: e,
|
|
3243
3243
|
id: r,
|
|
@@ -3247,7 +3247,7 @@ const Jt = wt(wa), Zt = (t) => {
|
|
|
3247
3247
|
isMenuAction: a = !1,
|
|
3248
3248
|
actionData: l,
|
|
3249
3249
|
...d
|
|
3250
|
-
} = t, { modalWidth: u } = mn(), [c, f] = b(i), [m,
|
|
3250
|
+
} = t, { modalWidth: u } = mn(), [c, f] = b(i), [m, p] = b(!1), [h, g] = b();
|
|
3251
3251
|
me(() => {
|
|
3252
3252
|
a && y();
|
|
3253
3253
|
}, [l, a]);
|
|
@@ -3258,9 +3258,9 @@ const Jt = wt(wa), Zt = (t) => {
|
|
|
3258
3258
|
view_id: A,
|
|
3259
3259
|
res_id: O || !1
|
|
3260
3260
|
});
|
|
3261
|
-
|
|
3261
|
+
p(x !== !1), x !== !1 && g(x);
|
|
3262
3262
|
}
|
|
3263
|
-
async function
|
|
3263
|
+
async function w() {
|
|
3264
3264
|
if (m && h)
|
|
3265
3265
|
await D.getHandler().removeFavourite({
|
|
3266
3266
|
shortcut_id: h
|
|
@@ -3274,7 +3274,7 @@ const Jt = wt(wa), Zt = (t) => {
|
|
|
3274
3274
|
res_id: O || !1
|
|
3275
3275
|
});
|
|
3276
3276
|
}
|
|
3277
|
-
|
|
3277
|
+
p(!m);
|
|
3278
3278
|
}
|
|
3279
3279
|
function T() {
|
|
3280
3280
|
return /* @__PURE__ */ V(be, { align: "middle", children: [
|
|
@@ -3284,7 +3284,7 @@ const Jt = wt(wa), Zt = (t) => {
|
|
|
3284
3284
|
type: m ? "primary" : "default",
|
|
3285
3285
|
icon: m ? /* @__PURE__ */ n(Kr, { style: { color: "white" } }) : /* @__PURE__ */ n(Wr, {}),
|
|
3286
3286
|
style: { width: 30 },
|
|
3287
|
-
onClick:
|
|
3287
|
+
onClick: w
|
|
3288
3288
|
}
|
|
3289
3289
|
) }),
|
|
3290
3290
|
/* @__PURE__ */ n(le, { style: { paddingLeft: 10 }, children: c })
|
|
@@ -3439,12 +3439,12 @@ const { defaultAlgorithm: Ia, defaultSeed: Fa } = Pe, Oa = Ia(Fa), { Option: _a
|
|
|
3439
3439
|
const [m] = f;
|
|
3440
3440
|
return i ? !i.includes(m) : !0;
|
|
3441
3441
|
}).map((f) => {
|
|
3442
|
-
const [m,
|
|
3443
|
-
return /* @__PURE__ */ n(_a, { value:
|
|
3442
|
+
const [m, p] = f;
|
|
3443
|
+
return /* @__PURE__ */ n(_a, { value: p, children: p }, m);
|
|
3444
3444
|
}), u = a && !s ? Aa : Ct;
|
|
3445
3445
|
function c(f) {
|
|
3446
|
-
const m = f.map((
|
|
3447
|
-
const h = l.find(([
|
|
3446
|
+
const m = f.map((p) => {
|
|
3447
|
+
const h = l.find(([g, y]) => p === y);
|
|
3448
3448
|
return h && h[0];
|
|
3449
3449
|
});
|
|
3450
3450
|
if (m.length === 0) {
|
|
@@ -3558,37 +3558,37 @@ function ho(t) {
|
|
|
3558
3558
|
setSearchFilterHeight: c,
|
|
3559
3559
|
searchError: f,
|
|
3560
3560
|
searchValues: m,
|
|
3561
|
-
showLimitOptions:
|
|
3562
|
-
} = t, [h,
|
|
3561
|
+
showLimitOptions: p = !0
|
|
3562
|
+
} = t, [h, g] = b(), [y, w] = b(), [T, F] = b(!1), C = de(), { token: O } = Ma(), [_] = lt.useForm();
|
|
3563
3563
|
me(() => {
|
|
3564
3564
|
_.setFieldsValue(m);
|
|
3565
3565
|
}, [m]);
|
|
3566
3566
|
const A = () => {
|
|
3567
3567
|
if (!y)
|
|
3568
3568
|
return;
|
|
3569
|
-
const I = T ? y : h,
|
|
3570
|
-
return
|
|
3569
|
+
const I = T ? y : h, v = I == null ? void 0 : I.rows;
|
|
3570
|
+
return v == null ? void 0 : v.map((E, P) => /* @__PURE__ */ n(be, { children: E.map((M, j) => /* @__PURE__ */ n(le, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ n(Da, { field: M }) }, j)) }, P));
|
|
3571
3571
|
};
|
|
3572
3572
|
xt(() => {
|
|
3573
|
-
F(!1), C.current = new oi(r, e), C.current.parse(),
|
|
3573
|
+
F(!1), C.current = new oi(r, e), C.current.parse(), g(C.current._simpleSearchContainer), w(C.current._advancedSearchContainer);
|
|
3574
3574
|
}, [e, r]);
|
|
3575
3575
|
const x = A(), S = (I) => {
|
|
3576
3576
|
var M;
|
|
3577
|
-
const { limit:
|
|
3577
|
+
const { limit: v, offset: E } = I;
|
|
3578
3578
|
delete I.offset, delete I.limit;
|
|
3579
3579
|
const P = oa(
|
|
3580
3580
|
I,
|
|
3581
3581
|
(M = C.current) == null ? void 0 : M._advancedSearchContainer
|
|
3582
3582
|
);
|
|
3583
|
-
o({ params: P, offset: E, limit:
|
|
3583
|
+
o({ params: P, offset: E, limit: v, searchValues: I });
|
|
3584
3584
|
};
|
|
3585
3585
|
return /* @__PURE__ */ n(
|
|
3586
3586
|
Jn,
|
|
3587
3587
|
{
|
|
3588
3588
|
bounds: !0,
|
|
3589
3589
|
onResize: (I) => {
|
|
3590
|
-
var
|
|
3591
|
-
c == null || c((
|
|
3590
|
+
var v;
|
|
3591
|
+
c == null || c((v = I.bounds) == null ? void 0 : v.height);
|
|
3592
3592
|
},
|
|
3593
3593
|
children: ({ measureRef: I }) => /* @__PURE__ */ n("div", { ref: I, children: /* @__PURE__ */ V("div", { style: { display: u ? "block" : "none" }, children: [
|
|
3594
3594
|
/* @__PURE__ */ V(
|
|
@@ -3601,7 +3601,7 @@ function ho(t) {
|
|
|
3601
3601
|
initialValues: { offset: a, limit: l },
|
|
3602
3602
|
children: [
|
|
3603
3603
|
x,
|
|
3604
|
-
T &&
|
|
3604
|
+
T && p && /* @__PURE__ */ n(Ea, { onLimitChange: d }),
|
|
3605
3605
|
/* @__PURE__ */ n(
|
|
3606
3606
|
ka,
|
|
3607
3607
|
{
|
|
@@ -3733,15 +3733,15 @@ const La = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3733
3733
|
);
|
|
3734
3734
|
}, Xn = (t) => {
|
|
3735
3735
|
var x, S;
|
|
3736
|
-
const { id: e, model: r, context: i = {} } = t, [o, s] = b(!1), [a, l] = b(!1), [d, u] = b(!1), [c, f] = b(), [m,
|
|
3736
|
+
const { id: e, model: r, context: i = {} } = t, [o, s] = b(!1), [a, l] = b(!1), [d, u] = b(!1), [c, f] = b(), [m, p] = b(), { t: h } = H(he), g = H(
|
|
3737
3737
|
dt
|
|
3738
|
-
), { openRelate: y } =
|
|
3738
|
+
), { openRelate: y } = g || {}, w = H(
|
|
3739
3739
|
Pt
|
|
3740
|
-
), { processAction: T } =
|
|
3740
|
+
), { processAction: T } = w || {};
|
|
3741
3741
|
if (!e)
|
|
3742
3742
|
return null;
|
|
3743
3743
|
async function F() {
|
|
3744
|
-
var I,
|
|
3744
|
+
var I, v, E, P, M;
|
|
3745
3745
|
u(!0);
|
|
3746
3746
|
try {
|
|
3747
3747
|
const j = await D.getHandler().getView({
|
|
@@ -3752,7 +3752,7 @@ const La = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3752
3752
|
f(j);
|
|
3753
3753
|
let N = [];
|
|
3754
3754
|
const { toolbar: B } = j;
|
|
3755
|
-
(I = B.action) == null || I.filter((R) => R.hasOwnProperty("context")).map((R) => N.push(...Sn(R.context))), (
|
|
3755
|
+
(I = B.action) == null || I.filter((R) => R.hasOwnProperty("context")).map((R) => N.push(...Sn(R.context))), (v = B.action) == null || v.filter((R) => R.hasOwnProperty("domain")).map((R) => N.push(...lr(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(...lr(R.domain))), (M = B.print) == null || M.filter((R) => R.hasOwnProperty("context")).map((R) => N.push(...Sn(R.context))), N = N.filter(
|
|
3756
3756
|
(R) => Object.keys(j.fields).indexOf(R) > -1
|
|
3757
3757
|
);
|
|
3758
3758
|
let K = {};
|
|
@@ -3761,18 +3761,18 @@ const La = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3761
3761
|
ids: [e],
|
|
3762
3762
|
fieldsToRetrieve: N,
|
|
3763
3763
|
context: i
|
|
3764
|
-
}))[0]), K = { ...Ft(K, N), active_id: e },
|
|
3764
|
+
}))[0]), K = { ...Ft(K, N), active_id: e }, p(K), u(!1);
|
|
3765
3765
|
} catch (j) {
|
|
3766
3766
|
u(!1), ze(j);
|
|
3767
3767
|
}
|
|
3768
3768
|
}
|
|
3769
3769
|
function C() {
|
|
3770
|
-
var
|
|
3770
|
+
var v;
|
|
3771
3771
|
if (d)
|
|
3772
3772
|
return /* @__PURE__ */ n(He, { children: /* @__PURE__ */ n("div", { style: { padding: 15 }, children: /* @__PURE__ */ n(Ae, {}) }) });
|
|
3773
3773
|
if (!c || !c.toolbar)
|
|
3774
3774
|
return /* @__PURE__ */ n(He, {});
|
|
3775
|
-
const I = (
|
|
3775
|
+
const I = (v = c == null ? void 0 : c.toolbar) == null ? void 0 : v.relate.map((E) => /* @__PURE__ */ n(He.Item, { children: E.name }, E.id));
|
|
3776
3776
|
return /* @__PURE__ */ n(He, { onClick: O, children: [
|
|
3777
3777
|
/* @__PURE__ */ n(
|
|
3778
3778
|
He.Item,
|
|
@@ -3815,15 +3815,15 @@ const La = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3815
3815
|
else if (I.key === "print")
|
|
3816
3816
|
l(!0);
|
|
3817
3817
|
else {
|
|
3818
|
-
const
|
|
3819
|
-
if (!
|
|
3818
|
+
const v = c.toolbar.relate.find((E) => E.id === parseInt(I.key));
|
|
3819
|
+
if (!v)
|
|
3820
3820
|
return;
|
|
3821
3821
|
y({
|
|
3822
|
-
relateData:
|
|
3822
|
+
relateData: v,
|
|
3823
3823
|
values: m,
|
|
3824
3824
|
fields: c.fields,
|
|
3825
|
-
action_id:
|
|
3826
|
-
action_type:
|
|
3825
|
+
action_id: v.id,
|
|
3826
|
+
action_type: v.type
|
|
3827
3827
|
});
|
|
3828
3828
|
}
|
|
3829
3829
|
}
|
|
@@ -3885,13 +3885,13 @@ const La = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(go,
|
|
|
3885
3885
|
if (!e || e && o)
|
|
3886
3886
|
return;
|
|
3887
3887
|
l(!0);
|
|
3888
|
-
const
|
|
3888
|
+
const p = await D.getHandler().execute({
|
|
3889
3889
|
action: "name_get",
|
|
3890
3890
|
payload: [c],
|
|
3891
3891
|
model: d,
|
|
3892
3892
|
context: r
|
|
3893
3893
|
});
|
|
3894
|
-
s(
|
|
3894
|
+
s(p[0][1]), l(!1);
|
|
3895
3895
|
}, [e, o]);
|
|
3896
3896
|
if (me(() => {
|
|
3897
3897
|
f();
|
|
@@ -3939,7 +3939,7 @@ const ut = {
|
|
|
3939
3939
|
return;
|
|
3940
3940
|
}
|
|
3941
3941
|
f(h.format(ut[c].dateInternalFormat));
|
|
3942
|
-
},
|
|
3942
|
+
}, p = e ? at(e, ut[c].dateInternalFormat) : void 0;
|
|
3943
3943
|
return /* @__PURE__ */ n(
|
|
3944
3944
|
Pn,
|
|
3945
3945
|
{
|
|
@@ -3950,7 +3950,7 @@ const ut = {
|
|
|
3950
3950
|
picker: "date",
|
|
3951
3951
|
showTime: o,
|
|
3952
3952
|
format: ut[c].dateDisplayFormat,
|
|
3953
|
-
value:
|
|
3953
|
+
value: p,
|
|
3954
3954
|
onChange: m
|
|
3955
3955
|
}
|
|
3956
3956
|
);
|
|
@@ -4051,22 +4051,22 @@ function pn(t) {
|
|
|
4051
4051
|
rowSelection: c,
|
|
4052
4052
|
scrollY: f,
|
|
4053
4053
|
colorsForResults: m = {},
|
|
4054
|
-
statusForResults:
|
|
4054
|
+
statusForResults: p = {},
|
|
4055
4055
|
onChangeSort: h,
|
|
4056
|
-
sorter:
|
|
4056
|
+
sorter: g,
|
|
4057
4057
|
onFetchChildrenForRecord: y,
|
|
4058
|
-
childField:
|
|
4058
|
+
childField: w,
|
|
4059
4059
|
rootTree: T = !1,
|
|
4060
4060
|
context: F,
|
|
4061
4061
|
readonly: C,
|
|
4062
4062
|
onSelectAllRecords: O
|
|
4063
|
-
} = t, [_, A] = b([]), [x, S] = b([]), I = de(!1),
|
|
4064
|
-
|
|
4063
|
+
} = t, [_, A] = b([]), [x, S] = b([]), I = de(!1), v = de(null), { t: E } = H(he), P = de(r), M = H(
|
|
4064
|
+
it
|
|
4065
4065
|
), { title: j = void 0, setTitle: N = void 0 } = (T ? M : {}) || {};
|
|
4066
4066
|
me(() => {
|
|
4067
|
-
|
|
4067
|
+
v.current = _t(o);
|
|
4068
4068
|
const k = Os(
|
|
4069
|
-
|
|
4069
|
+
v.current,
|
|
4070
4070
|
{
|
|
4071
4071
|
boolean: Ua,
|
|
4072
4072
|
many2one: qa,
|
|
@@ -4087,10 +4087,10 @@ function pn(t) {
|
|
|
4087
4087
|
},
|
|
4088
4088
|
F
|
|
4089
4089
|
);
|
|
4090
|
-
S(k),
|
|
4090
|
+
S(k), v.current.string && j !== v.current.string && (N == null || N(v.current.string));
|
|
4091
4091
|
}, [o]), me(() => {
|
|
4092
4092
|
I.current = !1;
|
|
4093
|
-
const k = io(
|
|
4093
|
+
const k = io(v.current, s);
|
|
4094
4094
|
A(k), P.current = r;
|
|
4095
4095
|
}, [s]);
|
|
4096
4096
|
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 = () => {
|
|
@@ -4126,22 +4126,22 @@ function pn(t) {
|
|
|
4126
4126
|
};
|
|
4127
4127
|
function ne() {
|
|
4128
4128
|
var Ie;
|
|
4129
|
-
const L =
|
|
4129
|
+
const L = v.current.columns.filter((Z) => Z.sum !== void 0).map((Z) => ({ label: Z.sum, field: Z.id }));
|
|
4130
4130
|
if (!L || L.length === 0)
|
|
4131
4131
|
return null;
|
|
4132
4132
|
const ee = [], ce = ((Ie = c == null ? void 0 : c.selectedRowKeys) == null ? void 0 : Ie.length) > 0 ? _.filter((Z) => c == null ? void 0 : c.selectedRowKeys.includes(Z.id)) : _;
|
|
4133
4133
|
return L.forEach((Z) => {
|
|
4134
|
-
const q = ce.reduce((Ce,
|
|
4134
|
+
const q = ce.reduce((Ce, ve) => ve[Z.field] && !isNaN(ve[Z.field]) ? Ce + ve[Z.field] : Ce, 0);
|
|
4135
4135
|
ee.push(`${Z.label}: ${Math.round(q * 100) / 100}`);
|
|
4136
4136
|
}), /* @__PURE__ */ n("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ee.join(", ") });
|
|
4137
4137
|
}
|
|
4138
4138
|
let X, Y = f;
|
|
4139
|
-
if (
|
|
4139
|
+
if (v.current !== null) {
|
|
4140
4140
|
X = Na(x, _, 600);
|
|
4141
|
-
const L =
|
|
4141
|
+
const L = v.current;
|
|
4142
4142
|
f && L.columns.some((ee) => ee.sum !== void 0) && (Y = f - 30);
|
|
4143
4143
|
}
|
|
4144
|
-
return
|
|
4144
|
+
return v.current === null || !X || ((G = X.columns) == null ? void 0 : G.length) === 0 ? /* @__PURE__ */ n(Ae, { style: { padding: "2rem" } }) : /* @__PURE__ */ V("div", { children: [
|
|
4145
4145
|
U(),
|
|
4146
4146
|
/* @__PURE__ */ n(
|
|
4147
4147
|
Ii,
|
|
@@ -4155,22 +4155,22 @@ function pn(t) {
|
|
|
4155
4155
|
if (m[k.id])
|
|
4156
4156
|
return { color: m[k.id] };
|
|
4157
4157
|
},
|
|
4158
|
-
onRowStatus: _s(
|
|
4159
|
-
if (
|
|
4160
|
-
return /* @__PURE__ */ n(Jo, { color:
|
|
4158
|
+
onRowStatus: _s(p) ? (k) => {
|
|
4159
|
+
if (p[k.id])
|
|
4160
|
+
return /* @__PURE__ */ n(Jo, { color: p[k.id] });
|
|
4161
4161
|
} : void 0,
|
|
4162
4162
|
onRowDoubleClick: d,
|
|
4163
4163
|
selectionRowKeys: c == null ? void 0 : c.selectedRowKeys,
|
|
4164
4164
|
onRowSelectionChange: c == null ? void 0 : c.onChange,
|
|
4165
4165
|
onChangeSort: h,
|
|
4166
|
-
sorter:
|
|
4166
|
+
sorter: g,
|
|
4167
4167
|
readonly: C,
|
|
4168
4168
|
expandableOpts: y ? {
|
|
4169
4169
|
expandIcon: li,
|
|
4170
4170
|
collapseIcon: ci,
|
|
4171
4171
|
loadingIcon: st,
|
|
4172
4172
|
onFetchChildrenForRecord: y,
|
|
4173
|
-
childField:
|
|
4173
|
+
childField: w
|
|
4174
4174
|
} : void 0
|
|
4175
4175
|
}
|
|
4176
4176
|
),
|
|
@@ -4190,10 +4190,10 @@ function il(t, e) {
|
|
|
4190
4190
|
rootTree: c = !1,
|
|
4191
4191
|
parentContext: f = {},
|
|
4192
4192
|
onChangeSelectedRowKeys: m
|
|
4193
|
-
} = t, [
|
|
4193
|
+
} = t, [p, h] = b(!1), [g, y] = b(!1), w = de(!1), [T, F] = b(), [C, O] = b(), [_, A] = b(), [x, S] = b(), [I, v] = b(200), E = de(), { height: P } = mn(), M = H(
|
|
4194
4194
|
Pt
|
|
4195
4195
|
), { processAction: j } = M || {}, N = H(
|
|
4196
|
-
|
|
4196
|
+
it
|
|
4197
4197
|
), {
|
|
4198
4198
|
setResults: B = void 0,
|
|
4199
4199
|
setCurrentItemIndex: K = void 0,
|
|
@@ -4211,7 +4211,7 @@ function il(t, e) {
|
|
|
4211
4211
|
setSearchTreeNameSearch: Z = void 0,
|
|
4212
4212
|
setTreeIsLoading: q = void 0,
|
|
4213
4213
|
searchValues: Ce = {},
|
|
4214
|
-
setSearchValues:
|
|
4214
|
+
setSearchValues: ve = void 0,
|
|
4215
4215
|
limit: Ye = jt,
|
|
4216
4216
|
setLimit: ke = void 0
|
|
4217
4217
|
} = (c ? N : {}) || {}, {
|
|
@@ -4224,7 +4224,7 @@ function il(t, e) {
|
|
|
4224
4224
|
page: Me,
|
|
4225
4225
|
offset: Ke,
|
|
4226
4226
|
getResults: J,
|
|
4227
|
-
requestPageChange:
|
|
4227
|
+
requestPageChange: we,
|
|
4228
4228
|
changeSort: Ve,
|
|
4229
4229
|
fetchChildrenForRecord: Be,
|
|
4230
4230
|
colorsForResults: ie,
|
|
@@ -4236,12 +4236,12 @@ function il(t, e) {
|
|
|
4236
4236
|
setSearchTreeNameSearch: Z,
|
|
4237
4237
|
setSelectedRowItems: pe,
|
|
4238
4238
|
setSearchParams: G,
|
|
4239
|
-
setSearchValues:
|
|
4239
|
+
setSearchValues: ve,
|
|
4240
4240
|
searchParams: Y,
|
|
4241
4241
|
setSearchVisible: L,
|
|
4242
4242
|
setTreeIsLoading: q,
|
|
4243
4243
|
nameSearch: a,
|
|
4244
|
-
searchNameGetDoneRef:
|
|
4244
|
+
searchNameGetDoneRef: w,
|
|
4245
4245
|
context: f,
|
|
4246
4246
|
formView: _,
|
|
4247
4247
|
treeView: C,
|
|
@@ -4258,13 +4258,13 @@ function il(t, e) {
|
|
|
4258
4258
|
});
|
|
4259
4259
|
bt(e, () => ({
|
|
4260
4260
|
refreshResults: () => {
|
|
4261
|
-
|
|
4261
|
+
w.current = !1, xe();
|
|
4262
4262
|
},
|
|
4263
4263
|
getFields: () => C == null ? void 0 : C.fields,
|
|
4264
4264
|
getDomain: () => d
|
|
4265
4265
|
})), me(() => {
|
|
4266
|
-
|
|
4267
|
-
}, [Me, Ke,
|
|
4266
|
+
g && u && C && (w.current = !1, xe());
|
|
4267
|
+
}, [Me, Ke, g, u, a, C]);
|
|
4268
4268
|
const et = async () => {
|
|
4269
4269
|
y(!1), h(!0), S(void 0), q == null || q(!0);
|
|
4270
4270
|
try {
|
|
@@ -4353,7 +4353,7 @@ function il(t, e) {
|
|
|
4353
4353
|
isSearching: Ee,
|
|
4354
4354
|
onSubmit: Le,
|
|
4355
4355
|
onLimitChange: z,
|
|
4356
|
-
setSearchFilterHeight:
|
|
4356
|
+
setSearchFilterHeight: v,
|
|
4357
4357
|
searchError: ye,
|
|
4358
4358
|
searchVisible: k,
|
|
4359
4359
|
searchValues: Ce
|
|
@@ -4368,7 +4368,7 @@ function il(t, e) {
|
|
|
4368
4368
|
page: Me,
|
|
4369
4369
|
treeView: C,
|
|
4370
4370
|
results: J(),
|
|
4371
|
-
onRequestPageChange:
|
|
4371
|
+
onRequestPageChange: we,
|
|
4372
4372
|
loading: oe,
|
|
4373
4373
|
onRowClicked: Se,
|
|
4374
4374
|
scrollY: l || _e(),
|
|
@@ -4387,9 +4387,9 @@ function il(t, e) {
|
|
|
4387
4387
|
}
|
|
4388
4388
|
)
|
|
4389
4389
|
] }), qe = x || ye;
|
|
4390
|
-
return qe ? /* @__PURE__ */ n(tt, { className: "mt-10", message: qe, type: "error", banner: !0 }) : /* @__PURE__ */ n("div", { style: u ? {} : { display: "none" }, children:
|
|
4390
|
+
return qe ? /* @__PURE__ */ n(tt, { className: "mt-10", message: qe, type: "error", banner: !0 }) : /* @__PURE__ */ n("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ n(Ae, {}) : nt() });
|
|
4391
4391
|
}
|
|
4392
|
-
const
|
|
4392
|
+
const wo = vt(il), vo = (t) => {
|
|
4393
4393
|
const {
|
|
4394
4394
|
visible: e,
|
|
4395
4395
|
onCloseModal: r,
|
|
@@ -4398,22 +4398,22 @@ const vo = wt(il), wo = (t) => {
|
|
|
4398
4398
|
nameSearch: s,
|
|
4399
4399
|
domain: a,
|
|
4400
4400
|
context: l = {}
|
|
4401
|
-
} = t, [d, u] = b(!1), { modalWidth: c, modalHeight: f } = mn(), { t: m } = H(he), [
|
|
4401
|
+
} = t, [d, u] = b(!1), { modalWidth: c, modalHeight: f } = mn(), { t: m } = H(he), [p, h] = b([]), g = async () => {
|
|
4402
4402
|
await new Promise((F) => setTimeout(F, 5)), r();
|
|
4403
4403
|
}, y = async (F) => {
|
|
4404
4404
|
const { id: C } = F;
|
|
4405
4405
|
i([C]);
|
|
4406
4406
|
};
|
|
4407
|
-
function
|
|
4408
|
-
if (
|
|
4409
|
-
|
|
4407
|
+
function w() {
|
|
4408
|
+
if (p.length === 0) {
|
|
4409
|
+
g();
|
|
4410
4410
|
return;
|
|
4411
4411
|
}
|
|
4412
|
-
i(
|
|
4412
|
+
i(p);
|
|
4413
4413
|
}
|
|
4414
4414
|
const T = () => /* @__PURE__ */ V(Q, { children: [
|
|
4415
4415
|
/* @__PURE__ */ n(
|
|
4416
|
-
|
|
4416
|
+
wo,
|
|
4417
4417
|
{
|
|
4418
4418
|
model: o,
|
|
4419
4419
|
nameSearch: s,
|
|
@@ -4443,13 +4443,13 @@ const vo = wt(il), wo = (t) => {
|
|
|
4443
4443
|
{
|
|
4444
4444
|
icon: /* @__PURE__ */ n(Et, {}),
|
|
4445
4445
|
onClick: () => {
|
|
4446
|
-
|
|
4446
|
+
w();
|
|
4447
4447
|
},
|
|
4448
4448
|
type: "primary",
|
|
4449
4449
|
children: m("ok")
|
|
4450
4450
|
}
|
|
4451
4451
|
),
|
|
4452
|
-
/* @__PURE__ */ n(Oe, { icon: /* @__PURE__ */ n(Ut, {}), onClick:
|
|
4452
|
+
/* @__PURE__ */ n(Oe, { icon: /* @__PURE__ */ n(Ut, {}), onClick: g, children: m("cancel") })
|
|
4453
4453
|
] }) })
|
|
4454
4454
|
] });
|
|
4455
4455
|
return /* @__PURE__ */ V(Q, { children: [
|
|
@@ -4461,7 +4461,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4461
4461
|
width: c,
|
|
4462
4462
|
open: e && !d,
|
|
4463
4463
|
closable: !0,
|
|
4464
|
-
onCancel:
|
|
4464
|
+
onCancel: g,
|
|
4465
4465
|
footer: null,
|
|
4466
4466
|
destroyOnClose: !0,
|
|
4467
4467
|
maskClosable: !1,
|
|
@@ -4475,10 +4475,10 @@ const vo = wt(il), wo = (t) => {
|
|
|
4475
4475
|
visible: d,
|
|
4476
4476
|
parentContext: l,
|
|
4477
4477
|
onSubmitSucceed: (F) => {
|
|
4478
|
-
u(!1),
|
|
4478
|
+
u(!1), g(), i([F]);
|
|
4479
4479
|
},
|
|
4480
4480
|
onCancel: () => {
|
|
4481
|
-
u(!1),
|
|
4481
|
+
u(!1), g();
|
|
4482
4482
|
}
|
|
4483
4483
|
}
|
|
4484
4484
|
)
|
|
@@ -4508,7 +4508,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4508
4508
|
context: l,
|
|
4509
4509
|
id: d,
|
|
4510
4510
|
domain: u
|
|
4511
|
-
} = i, c = o && !a ? { backgroundColor: bo.colorPrimaryBg } : void 0, [f, m] = b(!1), [
|
|
4511
|
+
} = i, c = o && !a ? { backgroundColor: bo.colorPrimaryBg } : void 0, [f, m] = b(!1), [p, h] = b(!1), [g, y] = b(!1), [w, T] = b(), F = de(!1), [C, O] = b(""), _ = de(), A = H(Ne), { domain: x, getValues: S, getFields: I, getContext: v, elementHasLostFocus: E } = A || {}, P = de([]), [M, j] = b([]), N = e && e[0] || void 0, B = e && e[1] || "";
|
|
4512
4512
|
me(() => {
|
|
4513
4513
|
!Array.isArray(e) && e && X(e);
|
|
4514
4514
|
}, [e]), me(() => {
|
|
@@ -4519,7 +4519,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4519
4519
|
}, R = (L) => {
|
|
4520
4520
|
_.current = L.target.value, K([void 0, ""]);
|
|
4521
4521
|
}, U = async () => {
|
|
4522
|
-
if (!
|
|
4522
|
+
if (!g && C !== B) {
|
|
4523
4523
|
if (await new Promise((L) => setTimeout(L, 100)), F.current) {
|
|
4524
4524
|
K([void 0, ""]);
|
|
4525
4525
|
return;
|
|
@@ -4532,7 +4532,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4532
4532
|
const L = await D.getHandler().nameSearch({
|
|
4533
4533
|
model: s,
|
|
4534
4534
|
payload: _.current,
|
|
4535
|
-
context: { ...
|
|
4535
|
+
context: { ...v == null ? void 0 : v(), ...l }
|
|
4536
4536
|
});
|
|
4537
4537
|
L.length === 1 ? (_.current = void 0, K(L[0])) : ne(_.current);
|
|
4538
4538
|
}
|
|
@@ -4547,7 +4547,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4547
4547
|
const ee = await D.getHandler().searchAllIds({
|
|
4548
4548
|
params: P.current,
|
|
4549
4549
|
model: s,
|
|
4550
|
-
context: { ...
|
|
4550
|
+
context: { ...v == null ? void 0 : v(), ...l },
|
|
4551
4551
|
totalItems: 2
|
|
4552
4552
|
});
|
|
4553
4553
|
ee.length === 1 ? X(ee[0]) : (T(L), m(!0));
|
|
@@ -4561,7 +4561,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4561
4561
|
action: "name_get",
|
|
4562
4562
|
payload: [L],
|
|
4563
4563
|
model: s,
|
|
4564
|
-
context: { ...
|
|
4564
|
+
context: { ...v == null ? void 0 : v(), ...l }
|
|
4565
4565
|
});
|
|
4566
4566
|
K([L, ee[0][1]]);
|
|
4567
4567
|
} catch (ee) {
|
|
@@ -4578,7 +4578,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4578
4578
|
values: S()
|
|
4579
4579
|
}),
|
|
4580
4580
|
fields: I(),
|
|
4581
|
-
context:
|
|
4581
|
+
context: v()
|
|
4582
4582
|
})), x && x.length > 0 && (P.current = P.current.concat(
|
|
4583
4583
|
Nr({
|
|
4584
4584
|
domain: x,
|
|
@@ -4591,7 +4591,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4591
4591
|
}
|
|
4592
4592
|
return /* @__PURE__ */ V(be, { gutter: 8, wrap: !1, children: [
|
|
4593
4593
|
/* @__PURE__ */ n(le, { flex: "auto", children: /* @__PURE__ */ n(
|
|
4594
|
-
o && !a ? dl :
|
|
4594
|
+
o && !a ? dl : ot,
|
|
4595
4595
|
{
|
|
4596
4596
|
type: "text",
|
|
4597
4597
|
value: C,
|
|
@@ -4605,7 +4605,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4605
4605
|
{
|
|
4606
4606
|
id: N,
|
|
4607
4607
|
model: s,
|
|
4608
|
-
context: { ...
|
|
4608
|
+
context: { ...v == null ? void 0 : v(), ...l }
|
|
4609
4609
|
}
|
|
4610
4610
|
)
|
|
4611
4611
|
}
|
|
@@ -4625,8 +4625,8 @@ const vo = wt(il), wo = (t) => {
|
|
|
4625
4625
|
/* @__PURE__ */ n(le, { flex: "32px", style: { paddingLeft: 0 }, children: /* @__PURE__ */ n(
|
|
4626
4626
|
Oe,
|
|
4627
4627
|
{
|
|
4628
|
-
icon:
|
|
4629
|
-
disabled: a ||
|
|
4628
|
+
icon: g ? /* @__PURE__ */ n(st, {}) : /* @__PURE__ */ n(Wn, {}),
|
|
4629
|
+
disabled: a || g,
|
|
4630
4630
|
onClick: () => {
|
|
4631
4631
|
F.current = !0, ne(B);
|
|
4632
4632
|
},
|
|
@@ -4635,13 +4635,13 @@ const vo = wt(il), wo = (t) => {
|
|
|
4635
4635
|
}
|
|
4636
4636
|
) }),
|
|
4637
4637
|
/* @__PURE__ */ n(
|
|
4638
|
-
|
|
4638
|
+
vo,
|
|
4639
4639
|
{
|
|
4640
4640
|
model: s,
|
|
4641
4641
|
domain: M,
|
|
4642
|
-
context: { ...
|
|
4642
|
+
context: { ...v == null ? void 0 : v(), ...l },
|
|
4643
4643
|
visible: f,
|
|
4644
|
-
nameSearch: N ? void 0 :
|
|
4644
|
+
nameSearch: N ? void 0 : w,
|
|
4645
4645
|
onSelectValues: (L) => {
|
|
4646
4646
|
m(!1), X(L[0]), F.current = !1, _.current = void 0;
|
|
4647
4647
|
},
|
|
@@ -4654,9 +4654,9 @@ const vo = wt(il), wo = (t) => {
|
|
|
4654
4654
|
Zt,
|
|
4655
4655
|
{
|
|
4656
4656
|
model: s,
|
|
4657
|
-
parentContext: { ...
|
|
4657
|
+
parentContext: { ...v == null ? void 0 : v(), ...l },
|
|
4658
4658
|
id: e && e[0],
|
|
4659
|
-
visible:
|
|
4659
|
+
visible: p,
|
|
4660
4660
|
onSubmitSucceed: (L) => {
|
|
4661
4661
|
h(!1), X(L);
|
|
4662
4662
|
},
|
|
@@ -4668,7 +4668,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4668
4668
|
}
|
|
4669
4669
|
)
|
|
4670
4670
|
] });
|
|
4671
|
-
}, dl = Mt(
|
|
4671
|
+
}, dl = Mt(ot)`
|
|
4672
4672
|
.ant-input {
|
|
4673
4673
|
background-color: ${bo.colorPrimaryBg};
|
|
4674
4674
|
}
|
|
@@ -4706,7 +4706,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4706
4706
|
field: u,
|
|
4707
4707
|
operator: c,
|
|
4708
4708
|
manualIds: f
|
|
4709
|
-
} = t, [m,
|
|
4709
|
+
} = t, [m, p] = b(!1), [h, g] = b(), [y, w] = b(), [T, F] = b(), [C, O] = b(0), [_, A] = b(0), [x, S] = b(), [I, v] = b(), [E, P] = b();
|
|
4710
4710
|
me(() => {
|
|
4711
4711
|
N();
|
|
4712
4712
|
}, [e, o]);
|
|
@@ -4762,11 +4762,11 @@ const vo = wt(il), wo = (t) => {
|
|
|
4762
4762
|
});
|
|
4763
4763
|
}
|
|
4764
4764
|
async function N() {
|
|
4765
|
-
|
|
4765
|
+
p(!0);
|
|
4766
4766
|
let B, K;
|
|
4767
4767
|
try {
|
|
4768
4768
|
const R = await M({ domain: r, isTotal: !1 });
|
|
4769
|
-
if (
|
|
4769
|
+
if (g(R), s) {
|
|
4770
4770
|
const U = await D.getHandler().evalDomain({
|
|
4771
4771
|
domain: s,
|
|
4772
4772
|
values: {},
|
|
@@ -4777,7 +4777,7 @@ const vo = wt(il), wo = (t) => {
|
|
|
4777
4777
|
isTotal: !0
|
|
4778
4778
|
}), F(B);
|
|
4779
4779
|
}
|
|
4780
|
-
if (B ? (K = Math.round(R / B * 100 * 100) / 100,
|
|
4780
|
+
if (B ? (K = Math.round(R / B * 100 * 100) / 100, w(K)) : w(0), o) {
|
|
4781
4781
|
const U = await D.getHandler().parseCondition({
|
|
4782
4782
|
condition: o,
|
|
4783
4783
|
values: { value: R, percent: K },
|
|
@@ -4794,13 +4794,13 @@ const vo = wt(il), wo = (t) => {
|
|
|
4794
4794
|
context: i
|
|
4795
4795
|
}
|
|
4796
4796
|
);
|
|
4797
|
-
|
|
4797
|
+
v(U);
|
|
4798
4798
|
} else
|
|
4799
|
-
|
|
4799
|
+
v(l);
|
|
4800
4800
|
} catch (R) {
|
|
4801
4801
|
P(JSON.stringify(R));
|
|
4802
4802
|
}
|
|
4803
|
-
|
|
4803
|
+
p(!1);
|
|
4804
4804
|
}
|
|
4805
4805
|
return E ? /* @__PURE__ */ n(tt, { className: "mt-10", message: E, type: "error", banner: !0 }) : m ? /* @__PURE__ */ n("div", { style: { padding: "1rem" }, children: /* @__PURE__ */ n(st, { style: { height: "12px" } }) }) : /* @__PURE__ */ n(
|
|
4806
4806
|
Jn,
|
|
@@ -4904,15 +4904,15 @@ function hl({
|
|
|
4904
4904
|
useGrouping: !0
|
|
4905
4905
|
})}` : `${f}`;
|
|
4906
4906
|
d && (m += " " + d);
|
|
4907
|
-
const
|
|
4907
|
+
const p = `${i == null ? void 0 : i.toLocaleString("es-ES", {
|
|
4908
4908
|
useGrouping: !0
|
|
4909
4909
|
})}%`;
|
|
4910
4910
|
let h = So(
|
|
4911
|
-
|
|
4911
|
+
p,
|
|
4912
4912
|
`bold ${Math.floor(c * 1.03)}px sans-serif`
|
|
4913
4913
|
);
|
|
4914
4914
|
l && (h = h * 1.5), (h >= r * 0.85 || c * 2 < u) && (c = r * 0.85 / h * c);
|
|
4915
|
-
const
|
|
4915
|
+
const g = l && ct(l, { style: { fontSize: c } });
|
|
4916
4916
|
return /* @__PURE__ */ n(
|
|
4917
4917
|
"div",
|
|
4918
4918
|
{
|
|
@@ -4928,9 +4928,9 @@ function hl({
|
|
|
4928
4928
|
padding: "0.2rem"
|
|
4929
4929
|
},
|
|
4930
4930
|
children: /* @__PURE__ */ V(be, { align: "middle", children: [
|
|
4931
|
-
|
|
4931
|
+
g && /* @__PURE__ */ n(le, { style: { fontSize: c * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ n(g, {}) }),
|
|
4932
4932
|
/* @__PURE__ */ V(le, { children: [
|
|
4933
|
-
/* @__PURE__ */ n(An, { style: { fontSize: c * 0.8, margin: 0, color: a }, children:
|
|
4933
|
+
/* @__PURE__ */ n(An, { style: { fontSize: c * 0.8, margin: 0, color: a }, children: g ? ` ${i}%` : `${i}%` }),
|
|
4934
4934
|
/* @__PURE__ */ n(
|
|
4935
4935
|
An,
|
|
4936
4936
|
{
|
|
@@ -4963,7 +4963,7 @@ const In = (t) => (e) => {
|
|
|
4963
4963
|
useGrouping: !0
|
|
4964
4964
|
});
|
|
4965
4965
|
if (yl(t)) {
|
|
4966
|
-
const e =
|
|
4966
|
+
const e = wl(t);
|
|
4967
4967
|
return e === null ? t : at(t, ln.input[e]).format(
|
|
4968
4968
|
ln.output[e]
|
|
4969
4969
|
);
|
|
@@ -5070,7 +5070,7 @@ const ln = {
|
|
|
5070
5070
|
years: "YYYY"
|
|
5071
5071
|
}
|
|
5072
5072
|
};
|
|
5073
|
-
function
|
|
5073
|
+
function wl(t) {
|
|
5074
5074
|
for (const e in ln.input)
|
|
5075
5075
|
if (at(
|
|
5076
5076
|
t,
|
|
@@ -5080,7 +5080,7 @@ function vl(t) {
|
|
|
5080
5080
|
return e;
|
|
5081
5081
|
return null;
|
|
5082
5082
|
}
|
|
5083
|
-
const { processGraphData:
|
|
5083
|
+
const { processGraphData: vl } = Pr, { getFieldsToRetrieve: bl } = ii, Cl = (t) => {
|
|
5084
5084
|
const {
|
|
5085
5085
|
model: e,
|
|
5086
5086
|
domain: r = [],
|
|
@@ -5089,12 +5089,12 @@ const { processGraphData: wl } = Pr, { getFieldsToRetrieve: bl } = ii, Cl = (t)
|
|
|
5089
5089
|
limit: s,
|
|
5090
5090
|
uninformedString: a,
|
|
5091
5091
|
manualIds: l
|
|
5092
|
-
} = t, [d, u] = b(!1), [c, f] = b(), [m,
|
|
5092
|
+
} = t, [d, u] = b(!1), [c, f] = b(), [m, p] = b(), [h, g] = b(), [y, w] = b("line");
|
|
5093
5093
|
return xt(() => {
|
|
5094
5094
|
(async () => {
|
|
5095
5095
|
u(!0), f(void 0);
|
|
5096
5096
|
const T = Bn(o);
|
|
5097
|
-
|
|
5097
|
+
w(T.type || "line");
|
|
5098
5098
|
const F = bl({ ooui: T });
|
|
5099
5099
|
let C, O;
|
|
5100
5100
|
try {
|
|
@@ -5116,8 +5116,8 @@ const { processGraphData: wl } = Pr, { getFieldsToRetrieve: bl } = ii, Cl = (t)
|
|
|
5116
5116
|
f("No values or fields returned"), u(!1);
|
|
5117
5117
|
return;
|
|
5118
5118
|
}
|
|
5119
|
-
|
|
5120
|
-
const _ =
|
|
5119
|
+
g(C);
|
|
5120
|
+
const _ = vl({
|
|
5121
5121
|
ooui: T,
|
|
5122
5122
|
values: C,
|
|
5123
5123
|
fields: O,
|
|
@@ -5125,7 +5125,7 @@ const { processGraphData: wl } = Pr, { getFieldsToRetrieve: bl } = ii, Cl = (t)
|
|
|
5125
5125
|
uninformedString: a
|
|
5126
5126
|
}
|
|
5127
5127
|
});
|
|
5128
|
-
|
|
5128
|
+
p(_);
|
|
5129
5129
|
} catch (_) {
|
|
5130
5130
|
f("Error processing graph data: " + _), u(!1);
|
|
5131
5131
|
return;
|
|
@@ -5190,7 +5190,7 @@ const Tl = {
|
|
|
5190
5190
|
bar: Si,
|
|
5191
5191
|
pie: Ti
|
|
5192
5192
|
}, Il = (t) => {
|
|
5193
|
-
var
|
|
5193
|
+
var w;
|
|
5194
5194
|
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({
|
|
5195
5195
|
model: e,
|
|
5196
5196
|
xml: o,
|
|
@@ -5206,9 +5206,9 @@ const Tl = {
|
|
|
5206
5206
|
return /* @__PURE__ */ n(Ae, {});
|
|
5207
5207
|
if (!c)
|
|
5208
5208
|
return /* @__PURE__ */ n(tt, { message: "No data to display", type: "info" });
|
|
5209
|
-
const { data:
|
|
5209
|
+
const { data: p, isGroup: h, isStack: g } = c, y = Tl[f];
|
|
5210
5210
|
return y ? /* @__PURE__ */ V("div", { style: { padding: "1rem" }, children: [
|
|
5211
|
-
/* @__PURE__ */ n("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(
|
|
5211
|
+
/* @__PURE__ */ n("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(w = m == null ? void 0 : m.length) == null ? void 0 : w.toLocaleString(
|
|
5212
5212
|
"es-ES",
|
|
5213
5213
|
{
|
|
5214
5214
|
useGrouping: !0
|
|
@@ -5219,9 +5219,9 @@ const Tl = {
|
|
|
5219
5219
|
{
|
|
5220
5220
|
...Fl({
|
|
5221
5221
|
type: f,
|
|
5222
|
-
data:
|
|
5222
|
+
data: p,
|
|
5223
5223
|
isGroup: h,
|
|
5224
|
-
isStack:
|
|
5224
|
+
isStack: g
|
|
5225
5225
|
})
|
|
5226
5226
|
}
|
|
5227
5227
|
)
|
|
@@ -5233,9 +5233,9 @@ function Fl(t) {
|
|
|
5233
5233
|
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;
|
|
5234
5234
|
}
|
|
5235
5235
|
const Ol = (t, e) => {
|
|
5236
|
-
const { view_id: r, model: i, context: o, domain: s, limit: a, manualIds: l } = t, [d, u] = b(!1), [c, f] = b(), [m,
|
|
5237
|
-
|
|
5238
|
-
), { setGraphIsLoading:
|
|
5236
|
+
const { view_id: r, model: i, context: o, domain: s, limit: a, manualIds: l } = t, [d, u] = b(!1), [c, f] = b(), [m, p] = b(), h = H(
|
|
5237
|
+
it
|
|
5238
|
+
), { setGraphIsLoading: g = void 0 } = h || {};
|
|
5239
5239
|
bt(e, () => ({
|
|
5240
5240
|
refresh: () => {
|
|
5241
5241
|
y();
|
|
@@ -5244,21 +5244,21 @@ const Ol = (t, e) => {
|
|
|
5244
5244
|
y();
|
|
5245
5245
|
}, [r]);
|
|
5246
5246
|
async function y() {
|
|
5247
|
-
u(!0),
|
|
5247
|
+
u(!0), g == null || g(!0);
|
|
5248
5248
|
try {
|
|
5249
|
-
const
|
|
5249
|
+
const w = await D.getHandler().getView({
|
|
5250
5250
|
model: i,
|
|
5251
5251
|
id: r,
|
|
5252
5252
|
type: "graph",
|
|
5253
5253
|
context: o
|
|
5254
5254
|
});
|
|
5255
|
-
|
|
5256
|
-
const T = Bn(
|
|
5255
|
+
p(w.arch);
|
|
5256
|
+
const T = Bn(w.arch);
|
|
5257
5257
|
f(T);
|
|
5258
|
-
} catch (
|
|
5259
|
-
return console.error(
|
|
5258
|
+
} catch (w) {
|
|
5259
|
+
return console.error(w), /* @__PURE__ */ n(Q, { children: JSON.stringify(w) });
|
|
5260
5260
|
}
|
|
5261
|
-
u(!1),
|
|
5261
|
+
u(!1), g == null || g(!1);
|
|
5262
5262
|
}
|
|
5263
5263
|
if (d)
|
|
5264
5264
|
return /* @__PURE__ */ n(
|
|
@@ -5280,21 +5280,21 @@ const Ol = (t, e) => {
|
|
|
5280
5280
|
switch (c.type) {
|
|
5281
5281
|
case "indicatorField":
|
|
5282
5282
|
case "indicator": {
|
|
5283
|
-
const
|
|
5284
|
-
field:
|
|
5285
|
-
operator:
|
|
5283
|
+
const w = c, T = w.type === "indicatorField" ? {
|
|
5284
|
+
field: w.field,
|
|
5285
|
+
operator: w.operator
|
|
5286
5286
|
} : {};
|
|
5287
5287
|
return /* @__PURE__ */ n(
|
|
5288
5288
|
fl,
|
|
5289
5289
|
{
|
|
5290
|
-
showPercent:
|
|
5291
|
-
totalDomain:
|
|
5292
|
-
colorCondition:
|
|
5290
|
+
showPercent: w.showPercent,
|
|
5291
|
+
totalDomain: w.totalDomain,
|
|
5292
|
+
colorCondition: w.color,
|
|
5293
5293
|
model: i,
|
|
5294
5294
|
context: o,
|
|
5295
5295
|
domain: s,
|
|
5296
|
-
icon:
|
|
5297
|
-
suffix:
|
|
5296
|
+
icon: w.icon,
|
|
5297
|
+
suffix: w.suffix,
|
|
5298
5298
|
manualIds: l,
|
|
5299
5299
|
...T
|
|
5300
5300
|
}
|
|
@@ -5317,7 +5317,7 @@ const Ol = (t, e) => {
|
|
|
5317
5317
|
default:
|
|
5318
5318
|
return /* @__PURE__ */ n(Q, { children: `Graph ${c.type} not implemented` });
|
|
5319
5319
|
}
|
|
5320
|
-
}, gn =
|
|
5320
|
+
}, gn = vt(Ol), { confirm: _l } = Je, Rl = ({ onOk: t, lang: e }) => {
|
|
5321
5321
|
_l({
|
|
5322
5322
|
title: Fe("removeItems", e),
|
|
5323
5323
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
@@ -5351,11 +5351,11 @@ const Ol = (t, e) => {
|
|
|
5351
5351
|
onNextItem: c,
|
|
5352
5352
|
isMany2Many: f,
|
|
5353
5353
|
onSearchItem: m,
|
|
5354
|
-
selectedRowKeys:
|
|
5354
|
+
selectedRowKeys: p,
|
|
5355
5355
|
showCreateButton: h,
|
|
5356
|
-
showToggleButton:
|
|
5356
|
+
showToggleButton: g
|
|
5357
5357
|
} = t, { token: y } = Dl();
|
|
5358
|
-
function
|
|
5358
|
+
function w() {
|
|
5359
5359
|
return /* @__PURE__ */ n("div", { className: "inline-block w-3" });
|
|
5360
5360
|
}
|
|
5361
5361
|
function T() {
|
|
@@ -5378,7 +5378,7 @@ const Ol = (t, e) => {
|
|
|
5378
5378
|
tooltip: f ? "Unlink" : "Delete",
|
|
5379
5379
|
icon: f ? /* @__PURE__ */ n(ui, {}) : /* @__PURE__ */ n(Gn, {}),
|
|
5380
5380
|
onClick: a,
|
|
5381
|
-
disabled: l === 0 || r || s !== "form" &&
|
|
5381
|
+
disabled: l === 0 || r || s !== "form" && p.length === 0
|
|
5382
5382
|
}
|
|
5383
5383
|
);
|
|
5384
5384
|
}
|
|
@@ -5394,7 +5394,7 @@ const Ol = (t, e) => {
|
|
|
5394
5394
|
}
|
|
5395
5395
|
function O() {
|
|
5396
5396
|
return /* @__PURE__ */ V(Q, { children: [
|
|
5397
|
-
|
|
5397
|
+
w(),
|
|
5398
5398
|
/* @__PURE__ */ n(
|
|
5399
5399
|
Xe,
|
|
5400
5400
|
{
|
|
@@ -5435,11 +5435,11 @@ const Ol = (t, e) => {
|
|
|
5435
5435
|
onClick: m
|
|
5436
5436
|
}
|
|
5437
5437
|
),
|
|
5438
|
-
s !== "graph" &&
|
|
5438
|
+
s !== "graph" && w(),
|
|
5439
5439
|
s !== "graph" && F(),
|
|
5440
5440
|
s === "form" && O(),
|
|
5441
|
-
|
|
5442
|
-
|
|
5441
|
+
w(),
|
|
5442
|
+
g && /* @__PURE__ */ n(
|
|
5443
5443
|
Xe,
|
|
5444
5444
|
{
|
|
5445
5445
|
tooltip: "Toggle view mode",
|
|
@@ -5465,7 +5465,7 @@ const Nl = (t) => {
|
|
|
5465
5465
|
var We;
|
|
5466
5466
|
const { value: e, onChange: r, ooui: i, views: o } = t, { items: s = [] } = e || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = H(
|
|
5467
5467
|
xo
|
|
5468
|
-
), c = H(Ne), { activeId: f, getFields: m, getValues:
|
|
5468
|
+
), c = H(Ne), { activeId: f, getFields: m, getValues: p, getContext: h, domain: g } = c || {}, { lang: y, t: w } = H(he), [T, F] = b(!1), [C, O] = b(!1), [_, A] = b(), [x, S] = b(!1), [I, v] = b(!1), [E, P] = b(), [M, j] = b([]), [N, B] = b(!1), K = de([]), [R, U] = b(), ne = de(), [X, Y] = b(void 0), {
|
|
5469
5469
|
readOnly: G,
|
|
5470
5470
|
relation: k,
|
|
5471
5471
|
context: L,
|
|
@@ -5485,8 +5485,8 @@ const Nl = (t) => {
|
|
|
5485
5485
|
}, [s, a]);
|
|
5486
5486
|
me(() => {
|
|
5487
5487
|
Le();
|
|
5488
|
-
}, [
|
|
5489
|
-
const
|
|
5488
|
+
}, [g]);
|
|
5489
|
+
const ve = (z) => {
|
|
5490
5490
|
var se, Se;
|
|
5491
5491
|
r == null || r({
|
|
5492
5492
|
fields: ((se = o.get("form")) == null ? void 0 : se.fields) || ((Se = o.get("tree")) == null ? void 0 : Se.fields),
|
|
@@ -5511,7 +5511,7 @@ const Nl = (t) => {
|
|
|
5511
5511
|
context: { ...h == null ? void 0 : h(), ...L },
|
|
5512
5512
|
currentView: z || a
|
|
5513
5513
|
});
|
|
5514
|
-
return ne.current || (ne.current = Te.map((nt) => nt.id)), (a || z) === "tree" && _e && Y(_e),
|
|
5514
|
+
return ne.current || (ne.current = Te.map((nt) => nt.id)), (a || z) === "tree" && _e && Y(_e), ve(Te), Te;
|
|
5515
5515
|
} catch (Te) {
|
|
5516
5516
|
A(Te);
|
|
5517
5517
|
} finally {
|
|
@@ -5523,13 +5523,13 @@ const Nl = (t) => {
|
|
|
5523
5523
|
domain: ee,
|
|
5524
5524
|
values: Nt({
|
|
5525
5525
|
fields: m(),
|
|
5526
|
-
values:
|
|
5526
|
+
values: p()
|
|
5527
5527
|
}),
|
|
5528
5528
|
fields: m(),
|
|
5529
5529
|
context: h()
|
|
5530
|
-
})),
|
|
5530
|
+
})), g && g.length > 0 && (K.current = K.current.concat(
|
|
5531
5531
|
Nr({
|
|
5532
|
-
domain:
|
|
5532
|
+
domain: g,
|
|
5533
5533
|
widgetFieldName: Ie
|
|
5534
5534
|
})
|
|
5535
5535
|
));
|
|
@@ -5565,7 +5565,7 @@ const Nl = (t) => {
|
|
|
5565
5565
|
values: se,
|
|
5566
5566
|
treeValues: Se
|
|
5567
5567
|
} : Te);
|
|
5568
|
-
|
|
5568
|
+
ve(pe);
|
|
5569
5569
|
}, ye = (z) => {
|
|
5570
5570
|
T ? zt({
|
|
5571
5571
|
lang: y,
|
|
@@ -5578,7 +5578,7 @@ const Nl = (t) => {
|
|
|
5578
5578
|
Al({
|
|
5579
5579
|
lang: y,
|
|
5580
5580
|
onOk: () => {
|
|
5581
|
-
a === "form" ?
|
|
5581
|
+
a === "form" ? we() : Ve();
|
|
5582
5582
|
}
|
|
5583
5583
|
});
|
|
5584
5584
|
return;
|
|
@@ -5586,7 +5586,7 @@ const Nl = (t) => {
|
|
|
5586
5586
|
Rl({
|
|
5587
5587
|
lang: y,
|
|
5588
5588
|
onOk: () => {
|
|
5589
|
-
a === "form" ?
|
|
5589
|
+
a === "form" ? we() : Ve();
|
|
5590
5590
|
}
|
|
5591
5591
|
});
|
|
5592
5592
|
}, Ke = async () => {
|
|
@@ -5597,9 +5597,9 @@ const Nl = (t) => {
|
|
|
5597
5597
|
}) : (B(!0), P({ defaultValues: se }), S(!0));
|
|
5598
5598
|
}, J = async () => {
|
|
5599
5599
|
a === "form" ? ye(() => {
|
|
5600
|
-
|
|
5601
|
-
}) :
|
|
5602
|
-
},
|
|
5600
|
+
v(!0);
|
|
5601
|
+
}) : v(!0);
|
|
5602
|
+
}, we = async () => {
|
|
5603
5603
|
O(!0), F(!1), A(void 0);
|
|
5604
5604
|
try {
|
|
5605
5605
|
if (Z[d].id > 0) {
|
|
@@ -5607,9 +5607,9 @@ const Nl = (t) => {
|
|
|
5607
5607
|
...se,
|
|
5608
5608
|
operation: "pendingRemove"
|
|
5609
5609
|
} : se);
|
|
5610
|
-
|
|
5610
|
+
ve(z);
|
|
5611
5611
|
} else
|
|
5612
|
-
|
|
5612
|
+
ve(
|
|
5613
5613
|
s.filter((z) => z.id !== Z[d].id)
|
|
5614
5614
|
);
|
|
5615
5615
|
} catch (z) {
|
|
@@ -5624,7 +5624,7 @@ const Nl = (t) => {
|
|
|
5624
5624
|
...pe,
|
|
5625
5625
|
operation: "pendingRemove"
|
|
5626
5626
|
} : pe);
|
|
5627
|
-
|
|
5627
|
+
ve(Se);
|
|
5628
5628
|
} catch (se) {
|
|
5629
5629
|
A(se);
|
|
5630
5630
|
}
|
|
@@ -5654,7 +5654,7 @@ const Nl = (t) => {
|
|
|
5654
5654
|
treeValues: { ...Se, id: _e }
|
|
5655
5655
|
});
|
|
5656
5656
|
}
|
|
5657
|
-
|
|
5657
|
+
ve(Te), N || S(!1);
|
|
5658
5658
|
}, ie = async (z) => {
|
|
5659
5659
|
const { id: se } = z;
|
|
5660
5660
|
let Se = s;
|
|
@@ -5683,7 +5683,7 @@ const Nl = (t) => {
|
|
|
5683
5683
|
treeValues: _e
|
|
5684
5684
|
});
|
|
5685
5685
|
}
|
|
5686
|
-
|
|
5686
|
+
ve(se);
|
|
5687
5687
|
} catch (pe) {
|
|
5688
5688
|
A(pe);
|
|
5689
5689
|
} finally {
|
|
@@ -5702,7 +5702,7 @@ const Nl = (t) => {
|
|
|
5702
5702
|
const ae = () => {
|
|
5703
5703
|
var se, Se, pe, Te;
|
|
5704
5704
|
if (a === "form")
|
|
5705
|
-
return Z.length === 0 ?
|
|
5705
|
+
return Z.length === 0 ? w("noCurrentEntries") : a !== q.current && s.some((_e) => !_e.values) ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(
|
|
5706
5706
|
Jt,
|
|
5707
5707
|
{
|
|
5708
5708
|
formView: o.get("form"),
|
|
@@ -5719,7 +5719,7 @@ const Nl = (t) => {
|
|
|
5719
5719
|
values: { ..._e, id: nt },
|
|
5720
5720
|
treeValues: { ..._e, id: nt }
|
|
5721
5721
|
} : Ge);
|
|
5722
|
-
|
|
5722
|
+
ve(qe), F(!0);
|
|
5723
5723
|
},
|
|
5724
5724
|
readOnly: G
|
|
5725
5725
|
}
|
|
@@ -5814,17 +5814,17 @@ const Nl = (t) => {
|
|
|
5814
5814
|
}
|
|
5815
5815
|
),
|
|
5816
5816
|
/* @__PURE__ */ n(
|
|
5817
|
-
|
|
5817
|
+
vo,
|
|
5818
5818
|
{
|
|
5819
5819
|
domain: K.current,
|
|
5820
5820
|
model: k,
|
|
5821
5821
|
context: { ...h == null ? void 0 : h(), ...L },
|
|
5822
5822
|
visible: I,
|
|
5823
5823
|
onSelectValues: async (z) => {
|
|
5824
|
-
|
|
5824
|
+
v(!1), ue(z);
|
|
5825
5825
|
},
|
|
5826
5826
|
onCloseModal: () => {
|
|
5827
|
-
|
|
5827
|
+
v(!1);
|
|
5828
5828
|
}
|
|
5829
5829
|
}
|
|
5830
5830
|
)
|
|
@@ -5832,15 +5832,15 @@ const Nl = (t) => {
|
|
|
5832
5832
|
}, Pl = (t) => {
|
|
5833
5833
|
const { ooui: e } = t, { mode: r, relation: i, views: o, required: s, context: a } = e;
|
|
5834
5834
|
let l;
|
|
5835
|
-
const [d, u] = b(!0), [c, f] = b(), [m,
|
|
5835
|
+
const [d, u] = b(!0), [c, f] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = H(Ne), { getContext: g } = h || {};
|
|
5836
5836
|
xt(() => {
|
|
5837
|
-
|
|
5837
|
+
w();
|
|
5838
5838
|
}, [e]);
|
|
5839
5839
|
const y = async (F) => o && o[F] ? o[F] : await D.getHandler().getView({
|
|
5840
5840
|
model: i,
|
|
5841
5841
|
type: F,
|
|
5842
|
-
context: { ...
|
|
5843
|
-
}),
|
|
5842
|
+
context: { ...g == null ? void 0 : g(), ...a }
|
|
5843
|
+
}), w = async () => {
|
|
5844
5844
|
u(!0), f(void 0);
|
|
5845
5845
|
try {
|
|
5846
5846
|
if (r && r.length > 0) {
|
|
@@ -5848,10 +5848,10 @@ const Nl = (t) => {
|
|
|
5848
5848
|
const C = await y(F);
|
|
5849
5849
|
m.set(F, C);
|
|
5850
5850
|
}
|
|
5851
|
-
|
|
5851
|
+
p(m);
|
|
5852
5852
|
} else {
|
|
5853
5853
|
const F = await y("form"), C = await y("tree");
|
|
5854
|
-
m.set("form", F), m.set("tree", C),
|
|
5854
|
+
m.set("form", F), m.set("tree", C), p(m);
|
|
5855
5855
|
}
|
|
5856
5856
|
} catch (F) {
|
|
5857
5857
|
f(JSON.stringify(F));
|
|
@@ -5882,21 +5882,21 @@ const Nl = (t) => {
|
|
|
5882
5882
|
const { ooui: e } = t, { required: r } = e;
|
|
5883
5883
|
return /* @__PURE__ */ n(ge, { required: r, type: "number", ...t, children: /* @__PURE__ */ n($l, { ooui: e }) });
|
|
5884
5884
|
}, $l = (t) => {
|
|
5885
|
-
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:
|
|
5885
|
+
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: p } = m || {};
|
|
5886
5886
|
me(() => {
|
|
5887
5887
|
f(po(r));
|
|
5888
5888
|
}, [r]);
|
|
5889
|
-
const h = (
|
|
5890
|
-
i == null || i(
|
|
5889
|
+
const h = (w) => {
|
|
5890
|
+
i == null || i(w);
|
|
5891
5891
|
};
|
|
5892
|
-
function
|
|
5893
|
-
u.current =
|
|
5892
|
+
function g(w) {
|
|
5893
|
+
u.current = w.target.value, f(w.target.value);
|
|
5894
5894
|
}
|
|
5895
5895
|
async function y() {
|
|
5896
|
-
h(Pa(c)), await new Promise((
|
|
5896
|
+
h(Pa(c)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
|
|
5897
5897
|
}
|
|
5898
5898
|
return /* @__PURE__ */ n(
|
|
5899
|
-
|
|
5899
|
+
ot,
|
|
5900
5900
|
{
|
|
5901
5901
|
value: c,
|
|
5902
5902
|
disabled: s,
|
|
@@ -5904,7 +5904,7 @@ const Nl = (t) => {
|
|
|
5904
5904
|
style: d,
|
|
5905
5905
|
id: o,
|
|
5906
5906
|
placeholder: "00:00",
|
|
5907
|
-
onChange:
|
|
5907
|
+
onChange: g,
|
|
5908
5908
|
onBlur: y
|
|
5909
5909
|
}
|
|
5910
5910
|
);
|
|
@@ -5954,7 +5954,7 @@ function Kl(t) {
|
|
|
5954
5954
|
s.label
|
|
5955
5955
|
)) });
|
|
5956
5956
|
}
|
|
5957
|
-
const { useToken: Wl } = Pe, { TextArea: kn } =
|
|
5957
|
+
const { useToken: Wl } = Pe, { TextArea: kn } = ot, jl = (t) => {
|
|
5958
5958
|
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 || {};
|
|
5959
5959
|
return /* @__PURE__ */ n(ge, { required: o, ...t, children: a ? /* @__PURE__ */ n(
|
|
5960
5960
|
Yl,
|
|
@@ -5988,14 +5988,14 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
5988
5988
|
fetchValues: d,
|
|
5989
5989
|
formHasChanges: u,
|
|
5990
5990
|
elementHasLostFocus: c
|
|
5991
|
-
} = s || {}, [f, m] = b(!1), { t:
|
|
5991
|
+
} = s || {}, [f, m] = b(!1), { t: p } = H(he);
|
|
5992
5992
|
return a ? /* @__PURE__ */ V(Q, { children: [
|
|
5993
5993
|
/* @__PURE__ */ n(
|
|
5994
5994
|
"div",
|
|
5995
5995
|
{
|
|
5996
5996
|
onClick: () => {
|
|
5997
5997
|
if (u != null && u()) {
|
|
5998
|
-
ft(
|
|
5998
|
+
ft(p("saveBeforeTranslate"));
|
|
5999
5999
|
return;
|
|
6000
6000
|
}
|
|
6001
6001
|
f || m(!0);
|
|
@@ -6056,12 +6056,12 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6056
6056
|
/* @__PURE__ */ n(be, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ n(
|
|
6057
6057
|
Xe,
|
|
6058
6058
|
{
|
|
6059
|
-
tooltip:
|
|
6059
|
+
tooltip: p("translate"),
|
|
6060
6060
|
icon: /* @__PURE__ */ n(Hr, {}),
|
|
6061
6061
|
onClick: async () => {
|
|
6062
|
-
u != null && u() ? ft(
|
|
6062
|
+
u != null && u() ? ft(p("saveBeforeTranslate")) : ft(p("enterTextBeforeTranslate"));
|
|
6063
6063
|
},
|
|
6064
|
-
children:
|
|
6064
|
+
children: p("translate")
|
|
6065
6065
|
}
|
|
6066
6066
|
) })
|
|
6067
6067
|
] });
|
|
@@ -6086,8 +6086,8 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6086
6086
|
ft(Fe("selectAtLeastOneField", r));
|
|
6087
6087
|
return;
|
|
6088
6088
|
}
|
|
6089
|
-
let
|
|
6090
|
-
y.registersAmount === "selected" && (i == null ? void 0 : i.length) !== 0 && (
|
|
6089
|
+
let w = o;
|
|
6090
|
+
y.registersAmount === "selected" && (i == null ? void 0 : i.length) !== 0 && (w = [
|
|
6091
6091
|
["id", "in", i == null ? void 0 : i.map((C) => C.id)]
|
|
6092
6092
|
]);
|
|
6093
6093
|
const { datas: T } = await D.getHandler().exportData({
|
|
@@ -6096,7 +6096,7 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6096
6096
|
keys: y.selectedKeys,
|
|
6097
6097
|
fields: l.current
|
|
6098
6098
|
}),
|
|
6099
|
-
domain:
|
|
6099
|
+
domain: w,
|
|
6100
6100
|
limit: y.registersAmount === "all" ? 0 : s,
|
|
6101
6101
|
context: e,
|
|
6102
6102
|
format: y.exportType
|
|
@@ -6132,7 +6132,7 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6132
6132
|
},
|
|
6133
6133
|
[l.current, t, e]
|
|
6134
6134
|
), m = De(async () => {
|
|
6135
|
-
const y = await Jl({ model: t, context: e }),
|
|
6135
|
+
const y = await Jl({ model: t, context: e }), w = await Xl({
|
|
6136
6136
|
predefinedExports: y,
|
|
6137
6137
|
fields: l.current,
|
|
6138
6138
|
onGetFieldChilds: f
|
|
@@ -6148,17 +6148,17 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6148
6148
|
};
|
|
6149
6149
|
})
|
|
6150
6150
|
})),
|
|
6151
|
-
keysWithChilds:
|
|
6151
|
+
keysWithChilds: w
|
|
6152
6152
|
};
|
|
6153
|
-
}, [l.current]),
|
|
6153
|
+
}, [l.current]), p = De(
|
|
6154
6154
|
async (y) => {
|
|
6155
|
-
const
|
|
6155
|
+
const w = await g("ir.exports"), T = await g("ir.exports.line"), F = await D.getHandler().create({
|
|
6156
6156
|
model: "ir.exports",
|
|
6157
6157
|
values: {
|
|
6158
6158
|
name: y.name,
|
|
6159
6159
|
resource: t
|
|
6160
6160
|
},
|
|
6161
|
-
fields:
|
|
6161
|
+
fields: w,
|
|
6162
6162
|
context: e
|
|
6163
6163
|
});
|
|
6164
6164
|
return await Promise.all(
|
|
@@ -6182,16 +6182,16 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6182
6182
|
});
|
|
6183
6183
|
},
|
|
6184
6184
|
[]
|
|
6185
|
-
),
|
|
6185
|
+
), g = De(
|
|
6186
6186
|
async (y) => {
|
|
6187
6187
|
if (d.current.has(y))
|
|
6188
6188
|
return d.current.get(y);
|
|
6189
|
-
const
|
|
6189
|
+
const w = D.getHandler().getFields({
|
|
6190
6190
|
model: y,
|
|
6191
6191
|
context: e,
|
|
6192
6192
|
fields: []
|
|
6193
6193
|
});
|
|
6194
|
-
d.current.set(y,
|
|
6194
|
+
d.current.set(y, w);
|
|
6195
6195
|
},
|
|
6196
6196
|
[d, e]
|
|
6197
6197
|
);
|
|
@@ -6200,7 +6200,7 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6200
6200
|
onGetFieldChilds: f,
|
|
6201
6201
|
onExport: u,
|
|
6202
6202
|
onGetPredefinedExports: m,
|
|
6203
|
-
onSavePredefinedExport:
|
|
6203
|
+
onSavePredefinedExport: p,
|
|
6204
6204
|
onRemovePredefinedExport: h
|
|
6205
6205
|
};
|
|
6206
6206
|
}, Fr = ({
|
|
@@ -6319,9 +6319,9 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6319
6319
|
} = t, {
|
|
6320
6320
|
onExport: f,
|
|
6321
6321
|
onGetFieldChilds: m,
|
|
6322
|
-
onGetFields:
|
|
6322
|
+
onGetFields: p,
|
|
6323
6323
|
onGetPredefinedExports: h,
|
|
6324
|
-
onSavePredefinedExport:
|
|
6324
|
+
onSavePredefinedExport: g,
|
|
6325
6325
|
onRemovePredefinedExport: y
|
|
6326
6326
|
} = Ul({
|
|
6327
6327
|
model: o,
|
|
@@ -6342,10 +6342,10 @@ const { useToken: Wl } = Pe, { TextArea: kn } = it, jl = (t) => {
|
|
|
6342
6342
|
selectedRegistersToExport: a && a.length && a.length > 0 ? a.length : void 0,
|
|
6343
6343
|
totalRegisters: l,
|
|
6344
6344
|
onGetFieldChilds: m,
|
|
6345
|
-
onGetFields:
|
|
6345
|
+
onGetFields: p,
|
|
6346
6346
|
visibleRegisters: c,
|
|
6347
6347
|
onGetPredefinedExports: h,
|
|
6348
|
-
onSavePredefinedExport:
|
|
6348
|
+
onSavePredefinedExport: g,
|
|
6349
6349
|
onRemovePredefinedExport: y
|
|
6350
6350
|
}
|
|
6351
6351
|
);
|
|
@@ -6378,8 +6378,8 @@ const oc = (t) => {
|
|
|
6378
6378
|
f(void 0), u([]);
|
|
6379
6379
|
return;
|
|
6380
6380
|
}
|
|
6381
|
-
const m = e && l && l[0],
|
|
6382
|
-
u([
|
|
6381
|
+
const m = e && l && l[0], p = e && l && l[1] && parseInt(l[1]);
|
|
6382
|
+
u([p, void 0]), f(m);
|
|
6383
6383
|
}, [e]), /* @__PURE__ */ V(be, { gutter: 8, wrap: !1, children: [
|
|
6384
6384
|
/* @__PURE__ */ n(le, { flex: "1", children: /* @__PURE__ */ n(
|
|
6385
6385
|
ro,
|
|
@@ -6392,9 +6392,9 @@ const oc = (t) => {
|
|
|
6392
6392
|
}),
|
|
6393
6393
|
onChange: (m) => {
|
|
6394
6394
|
f(m);
|
|
6395
|
-
let
|
|
6396
|
-
m !== c && (u([]),
|
|
6397
|
-
const h = `${m},${
|
|
6395
|
+
let p = d[0] || 0;
|
|
6396
|
+
m !== c && (u([]), p = 0);
|
|
6397
|
+
const h = `${m},${p}`;
|
|
6398
6398
|
h !== e && (r == null || r(h));
|
|
6399
6399
|
},
|
|
6400
6400
|
value: c
|
|
@@ -6412,8 +6412,8 @@ const oc = (t) => {
|
|
|
6412
6412
|
value: d,
|
|
6413
6413
|
onChange: (m) => {
|
|
6414
6414
|
u(m);
|
|
6415
|
-
const
|
|
6416
|
-
|
|
6415
|
+
const p = `${c},${m[0] || 0}`;
|
|
6416
|
+
p !== e && (r == null || r(p));
|
|
6417
6417
|
}
|
|
6418
6418
|
}
|
|
6419
6419
|
) })
|
|
@@ -6422,10 +6422,10 @@ const oc = (t) => {
|
|
|
6422
6422
|
const { ooui: e } = t, { required: r } = e;
|
|
6423
6423
|
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(dc, { ooui: e }) });
|
|
6424
6424
|
}, dc = (t) => {
|
|
6425
|
-
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),
|
|
6425
|
+
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), p = r ? xs(r) : "", h = (F) => {
|
|
6426
6426
|
i == null || i(F);
|
|
6427
6427
|
};
|
|
6428
|
-
async function
|
|
6428
|
+
async function g() {
|
|
6429
6429
|
const F = await At(r), C = `data:${F == null ? void 0 : F.mime};base64,${r}`, O = document.createElement("a"), _ = f(a), A = f("name");
|
|
6430
6430
|
O.href = C, O.download = _ || A, O.click();
|
|
6431
6431
|
}
|
|
@@ -6433,7 +6433,7 @@ const oc = (t) => {
|
|
|
6433
6433
|
const F = await At(r);
|
|
6434
6434
|
hn(r, F.mime);
|
|
6435
6435
|
}
|
|
6436
|
-
async function
|
|
6436
|
+
async function w(F) {
|
|
6437
6437
|
F.stopPropagation(), F.preventDefault();
|
|
6438
6438
|
const C = F.target.files[0], O = await oo(C);
|
|
6439
6439
|
h(O), a && c(a, C.name);
|
|
@@ -6450,16 +6450,16 @@ const oc = (t) => {
|
|
|
6450
6450
|
id: "file",
|
|
6451
6451
|
ref: u,
|
|
6452
6452
|
style: { display: "none" },
|
|
6453
|
-
onChange:
|
|
6453
|
+
onChange: w
|
|
6454
6454
|
}
|
|
6455
6455
|
),
|
|
6456
6456
|
/* @__PURE__ */ n(
|
|
6457
|
-
|
|
6457
|
+
ot,
|
|
6458
6458
|
{
|
|
6459
6459
|
type: "text",
|
|
6460
6460
|
disabled: !0,
|
|
6461
6461
|
style: d,
|
|
6462
|
-
value:
|
|
6462
|
+
value: p
|
|
6463
6463
|
}
|
|
6464
6464
|
)
|
|
6465
6465
|
] }),
|
|
@@ -6481,7 +6481,7 @@ const oc = (t) => {
|
|
|
6481
6481
|
{
|
|
6482
6482
|
tooltip: m("download"),
|
|
6483
6483
|
disabled: !r,
|
|
6484
|
-
onClick:
|
|
6484
|
+
onClick: g,
|
|
6485
6485
|
icon: /* @__PURE__ */ n(Hn, {})
|
|
6486
6486
|
}
|
|
6487
6487
|
),
|
|
@@ -6515,18 +6515,18 @@ function Qn(t) {
|
|
|
6515
6515
|
previousView: a
|
|
6516
6516
|
} = t, { t: l, lang: d } = H(he);
|
|
6517
6517
|
function u() {
|
|
6518
|
-
const m = r.map((
|
|
6519
|
-
/* @__PURE__ */ n(le, { flex: "none", style: { paddingRight: 20 }, children: Or(
|
|
6520
|
-
/* @__PURE__ */ n(le, { flex: "auto", style: { paddingRight: 20 }, children:
|
|
6518
|
+
const m = r.map((p, h) => /* @__PURE__ */ n(He.Item, { children: /* @__PURE__ */ V(be, { wrap: !1, children: [
|
|
6519
|
+
/* @__PURE__ */ n(le, { flex: "none", style: { paddingRight: 20 }, children: Or(p) }),
|
|
6520
|
+
/* @__PURE__ */ n(le, { flex: "auto", style: { paddingRight: 20 }, children: p.type.charAt(0).toUpperCase() + p.type.slice(1) }),
|
|
6521
6521
|
/* @__PURE__ */ n(le, { flex: "none", children: /* @__PURE__ */ n(
|
|
6522
6522
|
Et,
|
|
6523
6523
|
{
|
|
6524
6524
|
style: {
|
|
6525
|
-
opacity: e.view_id ===
|
|
6525
|
+
opacity: e.view_id === p.view_id ? 1 : 0
|
|
6526
6526
|
}
|
|
6527
6527
|
}
|
|
6528
6528
|
) })
|
|
6529
|
-
] }) },
|
|
6529
|
+
] }) }, p.view_id || h));
|
|
6530
6530
|
return /* @__PURE__ */ n(He, { onClick: f, children: /* @__PURE__ */ n(He.ItemGroup, { title: l("viewAs"), children: m }) });
|
|
6531
6531
|
}
|
|
6532
6532
|
function c(m) {
|
|
@@ -6543,10 +6543,10 @@ function Qn(t) {
|
|
|
6543
6543
|
}
|
|
6544
6544
|
function f(m) {
|
|
6545
6545
|
c(() => {
|
|
6546
|
-
const
|
|
6546
|
+
const p = r.find(
|
|
6547
6547
|
(h) => h.view_id === parseInt(m.key)
|
|
6548
6548
|
);
|
|
6549
|
-
i(
|
|
6549
|
+
i(p);
|
|
6550
6550
|
});
|
|
6551
6551
|
}
|
|
6552
6552
|
return /* @__PURE__ */ V("div", { style: { display: "flex" }, children: [
|
|
@@ -6587,6 +6587,7 @@ function Qn(t) {
|
|
|
6587
6587
|
)
|
|
6588
6588
|
] });
|
|
6589
6589
|
}
|
|
6590
|
+
const { Search: uc } = ot;
|
|
6590
6591
|
function Vt(t) {
|
|
6591
6592
|
const {
|
|
6592
6593
|
icon: e,
|
|
@@ -6594,20 +6595,37 @@ function Vt(t) {
|
|
|
6594
6595
|
items: i = [],
|
|
6595
6596
|
onItemClick: o,
|
|
6596
6597
|
label: s,
|
|
6597
|
-
disabled: a = !1
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6598
|
+
disabled: a = !1,
|
|
6599
|
+
searchable: l = "auto"
|
|
6600
|
+
} = t, [d, u] = b([...i]), c = (p) => {
|
|
6601
|
+
u(
|
|
6602
|
+
p ? i.filter(
|
|
6603
|
+
(h) => h.name.toLowerCase().indexOf(p.toLowerCase()) !== -1
|
|
6604
|
+
) : [...i]
|
|
6605
|
+
);
|
|
6606
|
+
};
|
|
6607
|
+
function f() {
|
|
6608
|
+
const p = d == null ? void 0 : d.map((h, g) => h.name === "divider" ? /* @__PURE__ */ n(He.Divider, {}, "divider" + g) : /* @__PURE__ */ n(He.Item, { children: h.name }, h.id));
|
|
6609
|
+
return /* @__PURE__ */ V(He, { onClick: m, children: [
|
|
6610
|
+
(l === "auto" && i.length > 3 || l === !0) && /* @__PURE__ */ n(
|
|
6611
|
+
uc,
|
|
6612
|
+
{
|
|
6613
|
+
onChange: (h) => c(h.target.value),
|
|
6614
|
+
onSearch: c,
|
|
6615
|
+
allowClear: !0
|
|
6616
|
+
}
|
|
6617
|
+
),
|
|
6618
|
+
/* @__PURE__ */ n(He.ItemGroup, { title: r, children: p })
|
|
6619
|
+
] });
|
|
6602
6620
|
}
|
|
6603
|
-
function
|
|
6604
|
-
const
|
|
6605
|
-
o(
|
|
6621
|
+
function m(p) {
|
|
6622
|
+
const h = i.find((g) => isNaN(p.key) ? g.id === p.key : g.id === parseInt(p.key));
|
|
6623
|
+
o(h);
|
|
6606
6624
|
}
|
|
6607
6625
|
return /* @__PURE__ */ n(
|
|
6608
6626
|
Gt,
|
|
6609
6627
|
{
|
|
6610
|
-
overlay:
|
|
6628
|
+
overlay: f(),
|
|
6611
6629
|
disabled: a || !i || i.length === 0,
|
|
6612
6630
|
children: /* @__PURE__ */ V(Oe, { children: [
|
|
6613
6631
|
e,
|
|
@@ -6645,7 +6663,7 @@ function Ze(t) {
|
|
|
6645
6663
|
}
|
|
6646
6664
|
function Fo(t) {
|
|
6647
6665
|
const { disabled: e = !1 } = t, { formHasChanges: r, onNewClicked: i } = H(
|
|
6648
|
-
|
|
6666
|
+
it
|
|
6649
6667
|
), { t: o, lang: s } = H(he), a = () => {
|
|
6650
6668
|
if (r) {
|
|
6651
6669
|
zt({
|
|
@@ -6668,12 +6686,12 @@ function Fo(t) {
|
|
|
6668
6686
|
}
|
|
6669
6687
|
);
|
|
6670
6688
|
}
|
|
6671
|
-
const { confirm:
|
|
6689
|
+
const { confirm: fc } = Je, mc = ({
|
|
6672
6690
|
onOk: t,
|
|
6673
6691
|
onCancel: e,
|
|
6674
6692
|
lang: r
|
|
6675
6693
|
}) => {
|
|
6676
|
-
|
|
6694
|
+
fc({
|
|
6677
6695
|
title: Fe("unsavedChanges", r),
|
|
6678
6696
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
6679
6697
|
centered: !0,
|
|
@@ -6707,7 +6725,7 @@ async function Oo(t, e, r) {
|
|
|
6707
6725
|
] })
|
|
6708
6726
|
);
|
|
6709
6727
|
}
|
|
6710
|
-
const
|
|
6728
|
+
const hc = (t) => {
|
|
6711
6729
|
const { numberOfAttachments: e, disabled: r } = t, { t: i, lang: o } = H(he), [s, a] = b(!1), l = /* @__PURE__ */ V(Oe, { disabled: r, children: [
|
|
6712
6730
|
/* @__PURE__ */ n(Ur, {}),
|
|
6713
6731
|
`(${e})`,
|
|
@@ -6719,13 +6737,13 @@ const mc = (t) => {
|
|
|
6719
6737
|
onVisibleChange: (d) => a(d),
|
|
6720
6738
|
visible: s,
|
|
6721
6739
|
placement: "bottom",
|
|
6722
|
-
content:
|
|
6740
|
+
content: pc(t, a, o),
|
|
6723
6741
|
title: i("attachments"),
|
|
6724
6742
|
arrowContent: null,
|
|
6725
6743
|
children: l
|
|
6726
6744
|
}
|
|
6727
6745
|
);
|
|
6728
|
-
},
|
|
6746
|
+
}, pc = (t, e, r) => {
|
|
6729
6747
|
const {
|
|
6730
6748
|
attachments: i = [],
|
|
6731
6749
|
loading: o,
|
|
@@ -6809,37 +6827,37 @@ const mc = (t) => {
|
|
|
6809
6827
|
] })
|
|
6810
6828
|
] });
|
|
6811
6829
|
};
|
|
6812
|
-
function
|
|
6830
|
+
function gc(t) {
|
|
6813
6831
|
const {
|
|
6814
6832
|
attachments: e,
|
|
6815
6833
|
disabled: r = !1,
|
|
6816
6834
|
onAddNewAttachment: i,
|
|
6817
6835
|
onListAllAttachments: o,
|
|
6818
6836
|
onViewAttachmentDetails: s
|
|
6819
|
-
} = t, { formRef: a } = H(
|
|
6837
|
+
} = t, { formRef: a } = H(it), [l, d] = b(!1), [u, c] = b([]), [f, m] = b(!1), { t: p } = H(he), h = De(async () => {
|
|
6820
6838
|
d(!0);
|
|
6821
6839
|
try {
|
|
6822
|
-
const
|
|
6840
|
+
const w = await D.getHandler().readObjects({
|
|
6823
6841
|
model: "ir.attachment",
|
|
6824
6842
|
ids: e.map((T) => T.id),
|
|
6825
6843
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
6826
6844
|
context: a.current.getContext()
|
|
6827
6845
|
});
|
|
6828
6846
|
c(
|
|
6829
|
-
|
|
6847
|
+
w.map((T) => ({
|
|
6830
6848
|
id: T.id,
|
|
6831
6849
|
name: T.name,
|
|
6832
6850
|
datas_fname: T.datas_fname,
|
|
6833
6851
|
link: T.link
|
|
6834
6852
|
}))
|
|
6835
6853
|
);
|
|
6836
|
-
} catch (
|
|
6837
|
-
ze(
|
|
6854
|
+
} catch (w) {
|
|
6855
|
+
ze(w);
|
|
6838
6856
|
}
|
|
6839
6857
|
d(!1);
|
|
6840
|
-
}, e),
|
|
6841
|
-
if (
|
|
6842
|
-
window.open(
|
|
6858
|
+
}, e), g = De(async (w) => {
|
|
6859
|
+
if (w.link) {
|
|
6860
|
+
window.open(w.link);
|
|
6843
6861
|
return;
|
|
6844
6862
|
}
|
|
6845
6863
|
m(!0);
|
|
@@ -6847,7 +6865,7 @@ function pc(t) {
|
|
|
6847
6865
|
try {
|
|
6848
6866
|
T = (await D.getHandler().readObjects({
|
|
6849
6867
|
model: "ir.attachment",
|
|
6850
|
-
ids: [
|
|
6868
|
+
ids: [w.id],
|
|
6851
6869
|
context: a.current.getContext()
|
|
6852
6870
|
}))[0];
|
|
6853
6871
|
} catch (F) {
|
|
@@ -6859,14 +6877,14 @@ function pc(t) {
|
|
|
6859
6877
|
hn(T.datas, F.mime);
|
|
6860
6878
|
} else
|
|
6861
6879
|
s(T);
|
|
6862
|
-
}, []), y = De(async (
|
|
6863
|
-
s(
|
|
6880
|
+
}, []), y = De(async (w) => {
|
|
6881
|
+
s(w);
|
|
6864
6882
|
}, []);
|
|
6865
6883
|
return me(() => {
|
|
6866
6884
|
h();
|
|
6867
6885
|
}, [h]), /* @__PURE__ */ V(Q, { children: [
|
|
6868
6886
|
/* @__PURE__ */ n(
|
|
6869
|
-
|
|
6887
|
+
hc,
|
|
6870
6888
|
{
|
|
6871
6889
|
numberOfAttachments: e.length,
|
|
6872
6890
|
attachments: u,
|
|
@@ -6874,14 +6892,14 @@ function pc(t) {
|
|
|
6874
6892
|
loading: l,
|
|
6875
6893
|
onAddNewAttachment: i,
|
|
6876
6894
|
onListAllAttachments: o,
|
|
6877
|
-
onopenAttachmentLink:
|
|
6895
|
+
onopenAttachmentLink: g,
|
|
6878
6896
|
onOpenAttachmentDetail: y
|
|
6879
6897
|
}
|
|
6880
6898
|
),
|
|
6881
6899
|
/* @__PURE__ */ n(
|
|
6882
6900
|
Je,
|
|
6883
6901
|
{
|
|
6884
|
-
title:
|
|
6902
|
+
title: p("downloadingAttachment"),
|
|
6885
6903
|
open: f,
|
|
6886
6904
|
footer: null,
|
|
6887
6905
|
closable: !1,
|
|
@@ -6892,7 +6910,7 @@ function pc(t) {
|
|
|
6892
6910
|
)
|
|
6893
6911
|
] });
|
|
6894
6912
|
}
|
|
6895
|
-
function
|
|
6913
|
+
function yc({ toolbar: t }) {
|
|
6896
6914
|
const {
|
|
6897
6915
|
availableViews: e,
|
|
6898
6916
|
currentView: r,
|
|
@@ -6906,11 +6924,11 @@ function gc({ toolbar: t }) {
|
|
|
6906
6924
|
currentItemIndex: c,
|
|
6907
6925
|
setCurrentId: f,
|
|
6908
6926
|
currentModel: m,
|
|
6909
|
-
setRemovingItem:
|
|
6927
|
+
setRemovingItem: p,
|
|
6910
6928
|
removingItem: h,
|
|
6911
|
-
duplicatingItem:
|
|
6929
|
+
duplicatingItem: g,
|
|
6912
6930
|
setDuplicatingItem: y,
|
|
6913
|
-
setResults:
|
|
6931
|
+
setResults: w,
|
|
6914
6932
|
formIsLoading: T,
|
|
6915
6933
|
attachments: F,
|
|
6916
6934
|
formRef: C,
|
|
@@ -6918,14 +6936,14 @@ function gc({ toolbar: t }) {
|
|
|
6918
6936
|
previousView: _,
|
|
6919
6937
|
setPreviousView: A,
|
|
6920
6938
|
goToResourceId: x
|
|
6921
|
-
} = H(
|
|
6939
|
+
} = H(it), { t: S, lang: I } = H(he), v = H(
|
|
6922
6940
|
Pt
|
|
6923
|
-
), { processAction: E } =
|
|
6941
|
+
), { processAction: E } = v || {}, P = H(
|
|
6924
6942
|
dt
|
|
6925
6943
|
), { openRelate: M, openDefaultActionForModel: j } = P || {};
|
|
6926
6944
|
function N(k) {
|
|
6927
6945
|
if (s) {
|
|
6928
|
-
|
|
6946
|
+
mc({
|
|
6929
6947
|
lang: I,
|
|
6930
6948
|
onOk: () => {
|
|
6931
6949
|
k();
|
|
@@ -6964,18 +6982,18 @@ function gc({ toolbar: t }) {
|
|
|
6964
6982
|
}
|
|
6965
6983
|
async function ne() {
|
|
6966
6984
|
try {
|
|
6967
|
-
|
|
6985
|
+
p == null || p(!0), await D.getHandler().deleteObjects({
|
|
6968
6986
|
model: m,
|
|
6969
6987
|
ids: [l]
|
|
6970
6988
|
});
|
|
6971
6989
|
const k = d == null ? void 0 : d.filter((ee) => ee.id !== l);
|
|
6972
|
-
|
|
6990
|
+
w == null || w(k);
|
|
6973
6991
|
let L = 0;
|
|
6974
6992
|
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));
|
|
6975
6993
|
} catch (k) {
|
|
6976
6994
|
on(JSON.stringify(k));
|
|
6977
6995
|
} finally {
|
|
6978
|
-
|
|
6996
|
+
p == null || p(!1);
|
|
6979
6997
|
}
|
|
6980
6998
|
}
|
|
6981
6999
|
async function X() {
|
|
@@ -6993,7 +7011,7 @@ function gc({ toolbar: t }) {
|
|
|
6993
7011
|
y == null || y(!1);
|
|
6994
7012
|
}
|
|
6995
7013
|
}
|
|
6996
|
-
const Y = a || h || T ||
|
|
7014
|
+
const Y = a || h || T || g;
|
|
6997
7015
|
function G(k) {
|
|
6998
7016
|
E == null || E({
|
|
6999
7017
|
actionData: k,
|
|
@@ -7014,7 +7032,7 @@ function gc({ toolbar: t }) {
|
|
|
7014
7032
|
/* @__PURE__ */ n(
|
|
7015
7033
|
Fo,
|
|
7016
7034
|
{
|
|
7017
|
-
disabled: a || T || h ||
|
|
7035
|
+
disabled: a || T || h || g
|
|
7018
7036
|
}
|
|
7019
7037
|
),
|
|
7020
7038
|
/* @__PURE__ */ n(
|
|
@@ -7032,8 +7050,8 @@ function gc({ toolbar: t }) {
|
|
|
7032
7050
|
{
|
|
7033
7051
|
icon: /* @__PURE__ */ n(qn, {}),
|
|
7034
7052
|
tooltip: S("duplicate"),
|
|
7035
|
-
disabled: s || a || l === void 0 ||
|
|
7036
|
-
loading:
|
|
7053
|
+
disabled: s || a || l === void 0 || g || T,
|
|
7054
|
+
loading: g,
|
|
7037
7055
|
onClick: X
|
|
7038
7056
|
}
|
|
7039
7057
|
),
|
|
@@ -7042,7 +7060,7 @@ function gc({ toolbar: t }) {
|
|
|
7042
7060
|
{
|
|
7043
7061
|
icon: /* @__PURE__ */ n(Gn, {}),
|
|
7044
7062
|
tooltip: S("delete"),
|
|
7045
|
-
disabled: a || l === void 0 || h ||
|
|
7063
|
+
disabled: a || l === void 0 || h || g || T,
|
|
7046
7064
|
loading: h,
|
|
7047
7065
|
onClick: U
|
|
7048
7066
|
}
|
|
@@ -7053,7 +7071,7 @@ function gc({ toolbar: t }) {
|
|
|
7053
7071
|
{
|
|
7054
7072
|
icon: /* @__PURE__ */ n(qr, {}),
|
|
7055
7073
|
tooltip: S("showLogs"),
|
|
7056
|
-
disabled: a || l === void 0 || h ||
|
|
7074
|
+
disabled: a || l === void 0 || h || g || T,
|
|
7057
7075
|
loading: !1,
|
|
7058
7076
|
onClick: () => {
|
|
7059
7077
|
Oo(m, l, S);
|
|
@@ -7065,7 +7083,7 @@ function gc({ toolbar: t }) {
|
|
|
7065
7083
|
{
|
|
7066
7084
|
icon: /* @__PURE__ */ n(un, {}),
|
|
7067
7085
|
tooltip: S("refresh"),
|
|
7068
|
-
disabled: a || l === void 0 || h ||
|
|
7086
|
+
disabled: a || l === void 0 || h || g || T,
|
|
7069
7087
|
loading: !1,
|
|
7070
7088
|
onClick: () => {
|
|
7071
7089
|
N(() => {
|
|
@@ -7174,7 +7192,7 @@ function gc({ toolbar: t }) {
|
|
|
7174
7192
|
}
|
|
7175
7193
|
),
|
|
7176
7194
|
/* @__PURE__ */ n(
|
|
7177
|
-
|
|
7195
|
+
gc,
|
|
7178
7196
|
{
|
|
7179
7197
|
disabled: Y,
|
|
7180
7198
|
attachments: F,
|
|
@@ -7235,16 +7253,16 @@ async function It({
|
|
|
7235
7253
|
const e = await (t == null ? void 0 : t());
|
|
7236
7254
|
return e != null && e.succeed ? { succeed: !0, currentId: e.id } : { succeed: !1, currentId: void 0 };
|
|
7237
7255
|
}
|
|
7238
|
-
const { useToken:
|
|
7239
|
-
const { ooui: e, value: r, onChange: i, valueValidator: o, linkPrefix: s = "" } = t, { id: a, readOnly: l, required: d } = e, { token: u } =
|
|
7256
|
+
const { useToken: wc } = Pe, _o = (t) => {
|
|
7257
|
+
const { ooui: e, value: r, onChange: i, valueValidator: o, linkPrefix: s = "" } = t, { id: a, readOnly: l, required: d } = e, { token: u } = wc(), c = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, f = H(Ne), { elementHasLostFocus: m } = f || {}, [p, h] = b(!1), [g, y] = b(!1);
|
|
7240
7258
|
me(() => {
|
|
7241
|
-
l && !
|
|
7242
|
-
}, [
|
|
7243
|
-
const
|
|
7259
|
+
l && !p && y(!1), !r && !l && (h(!0), y(!0));
|
|
7260
|
+
}, [p, l]);
|
|
7261
|
+
const w = (T) => {
|
|
7244
7262
|
i == null || i(T.target.value);
|
|
7245
7263
|
};
|
|
7246
7264
|
return /* @__PURE__ */ V(be, { gutter: 8, wrap: !1, align: "middle", children: [
|
|
7247
|
-
l ? null : /* @__PURE__ */ n(le, { flex: "32px", children:
|
|
7265
|
+
l ? null : /* @__PURE__ */ n(le, { flex: "32px", children: p ? /* @__PURE__ */ n(
|
|
7248
7266
|
Oe,
|
|
7249
7267
|
{
|
|
7250
7268
|
icon: /* @__PURE__ */ n(Et, {}),
|
|
@@ -7265,8 +7283,8 @@ const { useToken: yc } = Pe, _o = (t) => {
|
|
|
7265
7283
|
tabIndex: -1
|
|
7266
7284
|
}
|
|
7267
7285
|
) }),
|
|
7268
|
-
/* @__PURE__ */ n(le, { flex: "auto", children:
|
|
7269
|
-
|
|
7286
|
+
/* @__PURE__ */ n(le, { flex: "auto", children: g ? /* @__PURE__ */ n(
|
|
7287
|
+
ot,
|
|
7270
7288
|
{
|
|
7271
7289
|
style: {
|
|
7272
7290
|
borderTopLeftRadius: 0,
|
|
@@ -7274,7 +7292,7 @@ const { useToken: yc } = Pe, _o = (t) => {
|
|
|
7274
7292
|
...c
|
|
7275
7293
|
},
|
|
7276
7294
|
id: a,
|
|
7277
|
-
onChange:
|
|
7295
|
+
onChange: w,
|
|
7278
7296
|
value: r,
|
|
7279
7297
|
onBlur: () => {
|
|
7280
7298
|
o(r) && (h(!1), y(!1), m == null || m());
|
|
@@ -7300,7 +7318,7 @@ const { useToken: yc } = Pe, _o = (t) => {
|
|
|
7300
7318
|
valueValidator: (i) => i ? Ni(i) : !1
|
|
7301
7319
|
}
|
|
7302
7320
|
) });
|
|
7303
|
-
},
|
|
7321
|
+
}, bc = (t) => {
|
|
7304
7322
|
const { ooui: e } = t, { required: r } = e;
|
|
7305
7323
|
return /* @__PURE__ */ n(ge, { required: r, ...t, children: /* @__PURE__ */ n(
|
|
7306
7324
|
_o,
|
|
@@ -7310,7 +7328,7 @@ const { useToken: yc } = Pe, _o = (t) => {
|
|
|
7310
7328
|
valueValidator: (i) => i ? Pi(i) : !1
|
|
7311
7329
|
}
|
|
7312
7330
|
) });
|
|
7313
|
-
},
|
|
7331
|
+
}, Cc = (t) => {
|
|
7314
7332
|
const { visible: e, onIdSubmitted: r, onCancel: i, isSearching: o } = t, { t: s } = H(he), a = de();
|
|
7315
7333
|
function l(d) {
|
|
7316
7334
|
const u = d.id.split(",").map((c) => parseInt(c.trim()));
|
|
@@ -7342,7 +7360,7 @@ const { useToken: yc } = Pe, _o = (t) => {
|
|
|
7342
7360
|
}
|
|
7343
7361
|
],
|
|
7344
7362
|
help: s("searchIdHelp"),
|
|
7345
|
-
children: /* @__PURE__ */ n(
|
|
7363
|
+
children: /* @__PURE__ */ n(ot, { style: { width: "100%" }, autoFocus: !0, ref: a })
|
|
7346
7364
|
}
|
|
7347
7365
|
),
|
|
7348
7366
|
/* @__PURE__ */ n(be, { align: "middle", justify: "end", children: /* @__PURE__ */ n(le, { children: /* @__PURE__ */ V(je, { children: [
|
|
@@ -7372,9 +7390,9 @@ const { useToken: yc } = Pe, _o = (t) => {
|
|
|
7372
7390
|
] })
|
|
7373
7391
|
}
|
|
7374
7392
|
);
|
|
7375
|
-
}, { useToken:
|
|
7393
|
+
}, { useToken: xc } = Pe;
|
|
7376
7394
|
function Ro(t) {
|
|
7377
|
-
const { badgeNumber: e = 0, ...r } = t, { token: i } =
|
|
7395
|
+
const { badgeNumber: e = 0, ...r } = t, { token: i } = xc();
|
|
7378
7396
|
return /* @__PURE__ */ V("div", { style: { position: "relative" }, children: [
|
|
7379
7397
|
e > 0 && /* @__PURE__ */ n("div", { style: { position: "absolute", left: -10, top: -10, zIndex: 2 }, children: /* @__PURE__ */ n(
|
|
7380
7398
|
"span",
|
|
@@ -7401,7 +7419,7 @@ function Ro(t) {
|
|
|
7401
7419
|
)
|
|
7402
7420
|
] });
|
|
7403
7421
|
}
|
|
7404
|
-
function
|
|
7422
|
+
function Sc({ refreshGraph: t }) {
|
|
7405
7423
|
const { t: e } = H(he), {
|
|
7406
7424
|
availableViews: r,
|
|
7407
7425
|
currentView: i,
|
|
@@ -7412,7 +7430,7 @@ function xc({ refreshGraph: t }) {
|
|
|
7412
7430
|
graphIsLoading: d,
|
|
7413
7431
|
previousView: u,
|
|
7414
7432
|
setPreviousView: c
|
|
7415
|
-
} = H(
|
|
7433
|
+
} = H(it);
|
|
7416
7434
|
return /* @__PURE__ */ V(je, { wrap: !0, children: [
|
|
7417
7435
|
/* @__PURE__ */ n(
|
|
7418
7436
|
Ro,
|
|
@@ -7458,7 +7476,7 @@ function xc({ refreshGraph: t }) {
|
|
|
7458
7476
|
)
|
|
7459
7477
|
] });
|
|
7460
7478
|
}
|
|
7461
|
-
const { useToken:
|
|
7479
|
+
const { useToken: Tc } = Pe, { Title: Ic, Text: en } = Yt;
|
|
7462
7480
|
function yn(t) {
|
|
7463
7481
|
const { title: e, children: r } = t, {
|
|
7464
7482
|
title: i,
|
|
@@ -7468,7 +7486,7 @@ function yn(t) {
|
|
|
7468
7486
|
results: l,
|
|
7469
7487
|
totalItems: d,
|
|
7470
7488
|
selectedRowItems: u
|
|
7471
|
-
} = H(
|
|
7489
|
+
} = H(it), { t: c } = H(he), { token: f } = Tc();
|
|
7472
7490
|
function m() {
|
|
7473
7491
|
if ((o == null ? void 0 : o.type) === "form")
|
|
7474
7492
|
return s ? d === 0 ? /* @__PURE__ */ V(Q, { children: [
|
|
@@ -7520,7 +7538,7 @@ function yn(t) {
|
|
|
7520
7538
|
en,
|
|
7521
7539
|
{
|
|
7522
7540
|
copyable: {
|
|
7523
|
-
text: u.map((
|
|
7541
|
+
text: u.map((p) => p.id).join(", ")
|
|
7524
7542
|
}
|
|
7525
7543
|
}
|
|
7526
7544
|
)
|
|
@@ -7541,7 +7559,7 @@ function yn(t) {
|
|
|
7541
7559
|
align: "middle",
|
|
7542
7560
|
children: [
|
|
7543
7561
|
/* @__PURE__ */ V(le, { flex: 2, children: [
|
|
7544
|
-
/* @__PURE__ */ n(
|
|
7562
|
+
/* @__PURE__ */ n(Ic, { level: 3, style: { marginBottom: 0 }, children: e || i }),
|
|
7545
7563
|
m()
|
|
7546
7564
|
] }),
|
|
7547
7565
|
/* @__PURE__ */ n(le, { flex: 3, children: /* @__PURE__ */ n(be, { justify: "end", children: r }) })
|
|
@@ -7551,18 +7569,18 @@ function yn(t) {
|
|
|
7551
7569
|
/* @__PURE__ */ n("div", { className: "pb-5" })
|
|
7552
7570
|
] });
|
|
7553
7571
|
}
|
|
7554
|
-
const
|
|
7572
|
+
const Fc = (t) => {
|
|
7555
7573
|
const { viewData: e, visible: r, model: i, context: o, domain: s, formView: a, treeView: l } = t, d = de(), u = H(
|
|
7556
|
-
|
|
7574
|
+
it
|
|
7557
7575
|
), {
|
|
7558
7576
|
setResults: c = void 0,
|
|
7559
7577
|
setCurrentItemIndex: f = void 0,
|
|
7560
7578
|
currentId: m = void 0,
|
|
7561
|
-
results:
|
|
7579
|
+
results: p = void 0,
|
|
7562
7580
|
setSelectedRowItems: h = void 0,
|
|
7563
|
-
setSearchParams:
|
|
7581
|
+
setSearchParams: g = void 0,
|
|
7564
7582
|
searchVisible: y = !0,
|
|
7565
|
-
setSearchVisible:
|
|
7583
|
+
setSearchVisible: w = void 0,
|
|
7566
7584
|
sorter: T = void 0,
|
|
7567
7585
|
setSorter: F = void 0,
|
|
7568
7586
|
setTotalItems: C = void 0,
|
|
@@ -7572,7 +7590,7 @@ const Ic = (t) => {
|
|
|
7572
7590
|
setLimit: x,
|
|
7573
7591
|
searchParams: S,
|
|
7574
7592
|
searchValues: I,
|
|
7575
|
-
setSearchValues:
|
|
7593
|
+
setSearchValues: v,
|
|
7576
7594
|
currentView: E
|
|
7577
7595
|
} = u || {}, [P, M] = b(!0);
|
|
7578
7596
|
me(() => {
|
|
@@ -7586,9 +7604,9 @@ const Ic = (t) => {
|
|
|
7586
7604
|
setSearchTreeNameSearch: O,
|
|
7587
7605
|
setSelectedRowItems: h,
|
|
7588
7606
|
searchParams: S,
|
|
7589
|
-
setSearchValues:
|
|
7590
|
-
setSearchParams:
|
|
7591
|
-
setSearchVisible:
|
|
7607
|
+
setSearchValues: v,
|
|
7608
|
+
setSearchParams: g,
|
|
7609
|
+
setSearchVisible: w,
|
|
7592
7610
|
setTreeIsLoading: _,
|
|
7593
7611
|
context: o,
|
|
7594
7612
|
formView: a,
|
|
@@ -7597,7 +7615,7 @@ const Ic = (t) => {
|
|
|
7597
7615
|
setSorter: F,
|
|
7598
7616
|
setCurrentItemIndex: f,
|
|
7599
7617
|
setResultsActionView: c,
|
|
7600
|
-
resultsActionView:
|
|
7618
|
+
resultsActionView: p,
|
|
7601
7619
|
domain: s,
|
|
7602
7620
|
currentId: m,
|
|
7603
7621
|
setActionViewTotalItems: C,
|
|
@@ -7606,7 +7624,7 @@ const Ic = (t) => {
|
|
|
7606
7624
|
});
|
|
7607
7625
|
return !r || !e ? null : /* @__PURE__ */ V(Q, { children: [
|
|
7608
7626
|
/* @__PURE__ */ n(yn, { title: e.name, children: /* @__PURE__ */ n(
|
|
7609
|
-
|
|
7627
|
+
Sc,
|
|
7610
7628
|
{
|
|
7611
7629
|
refreshGraph: () => {
|
|
7612
7630
|
d.current.refresh();
|
|
@@ -7626,7 +7644,7 @@ const Ic = (t) => {
|
|
|
7626
7644
|
offset: K,
|
|
7627
7645
|
isSearching: N,
|
|
7628
7646
|
onSubmit: (U) => {
|
|
7629
|
-
M(!1),
|
|
7647
|
+
M(!1), g == null || g(U.params), w == null || w(!1);
|
|
7630
7648
|
},
|
|
7631
7649
|
searchError: B,
|
|
7632
7650
|
searchVisible: y,
|
|
@@ -7643,11 +7661,11 @@ const Ic = (t) => {
|
|
|
7643
7661
|
context: o,
|
|
7644
7662
|
domain: Wt(S || [], s),
|
|
7645
7663
|
limit: P ? A : void 0,
|
|
7646
|
-
manualIds: P ?
|
|
7664
|
+
manualIds: P ? p == null ? void 0 : p.map((U) => U.id) : void 0
|
|
7647
7665
|
}
|
|
7648
7666
|
)
|
|
7649
7667
|
] });
|
|
7650
|
-
},
|
|
7668
|
+
}, Oc = (t) => {
|
|
7651
7669
|
const {
|
|
7652
7670
|
visible: e,
|
|
7653
7671
|
formRef: r,
|
|
@@ -7663,7 +7681,7 @@ const Ic = (t) => {
|
|
|
7663
7681
|
setCurrentItemIndex: m
|
|
7664
7682
|
} = t;
|
|
7665
7683
|
return e ? /* @__PURE__ */ V(Q, { children: [
|
|
7666
|
-
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
7684
|
+
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(yc, { toolbar: a == null ? void 0 : a.toolbar }) }),
|
|
7667
7685
|
/* @__PURE__ */ n(
|
|
7668
7686
|
Jt,
|
|
7669
7687
|
{
|
|
@@ -7676,14 +7694,14 @@ const Ic = (t) => {
|
|
|
7676
7694
|
actionDomain: s,
|
|
7677
7695
|
id: o,
|
|
7678
7696
|
parentContext: l,
|
|
7679
|
-
onSubmitSucceed: (
|
|
7680
|
-
c.findIndex((y) => y.id ===
|
|
7697
|
+
onSubmitSucceed: (p, h) => {
|
|
7698
|
+
c.findIndex((y) => y.id === p) === -1 && (c.push(h), f(c), m(c.length - 1));
|
|
7681
7699
|
}
|
|
7682
7700
|
}
|
|
7683
7701
|
)
|
|
7684
7702
|
] }) : null;
|
|
7685
7703
|
};
|
|
7686
|
-
function
|
|
7704
|
+
function _c(t) {
|
|
7687
7705
|
const { onSearch: e, disabled: r = !1, searchText: i } = t, { t: o } = H(he), [s] = lt.useForm(), [a, l] = b(!1);
|
|
7688
7706
|
function d(c) {
|
|
7689
7707
|
e(c.search);
|
|
@@ -7696,7 +7714,7 @@ function Oc(t) {
|
|
|
7696
7714
|
}
|
|
7697
7715
|
return /* @__PURE__ */ n(lt, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ V(be, { align: "middle", justify: "end", children: [
|
|
7698
7716
|
/* @__PURE__ */ n(le, { children: /* @__PURE__ */ n(lt.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ n(
|
|
7699
|
-
|
|
7717
|
+
ot,
|
|
7700
7718
|
{
|
|
7701
7719
|
autoFocus: !0,
|
|
7702
7720
|
disabled: r,
|
|
@@ -7724,10 +7742,10 @@ function Oc(t) {
|
|
|
7724
7742
|
) })
|
|
7725
7743
|
] }) });
|
|
7726
7744
|
}
|
|
7727
|
-
const
|
|
7745
|
+
const Rc = Qe.createContext({
|
|
7728
7746
|
previewFeatures: !1
|
|
7729
7747
|
});
|
|
7730
|
-
function
|
|
7748
|
+
function Vc(t) {
|
|
7731
7749
|
var X;
|
|
7732
7750
|
const {
|
|
7733
7751
|
availableViews: e,
|
|
@@ -7742,25 +7760,25 @@ function Rc(t) {
|
|
|
7742
7760
|
searchTreeRef: c,
|
|
7743
7761
|
setCurrentId: f,
|
|
7744
7762
|
setCurrentItemIndex: m,
|
|
7745
|
-
searchParams:
|
|
7763
|
+
searchParams: p,
|
|
7746
7764
|
searchVisible: h,
|
|
7747
|
-
setSearchVisible:
|
|
7765
|
+
setSearchVisible: g,
|
|
7748
7766
|
setSearchTreeNameSearch: y,
|
|
7749
|
-
searchTreeNameSearch:
|
|
7767
|
+
searchTreeNameSearch: w,
|
|
7750
7768
|
treeIsLoading: T,
|
|
7751
7769
|
setPreviousView: F,
|
|
7752
7770
|
previousView: C,
|
|
7753
7771
|
results: O,
|
|
7754
7772
|
limit: _,
|
|
7755
7773
|
totalItems: A
|
|
7756
|
-
} = H(
|
|
7757
|
-
H(
|
|
7758
|
-
const { t:
|
|
7774
|
+
} = H(it), { parentContext: x = {}, treeExpandable: S, toolbar: I } = t;
|
|
7775
|
+
H(Rc);
|
|
7776
|
+
const { t: v, lang: E } = H(he), P = H(
|
|
7759
7777
|
Pt
|
|
7760
|
-
), { processAction: M } = P || {}, [j, N] = b(!1), B =
|
|
7778
|
+
), { processAction: M } = P || {}, [j, N] = b(!1), B = w !== void 0 && w.trim().length > 0;
|
|
7761
7779
|
function K() {
|
|
7762
7780
|
qt({
|
|
7763
|
-
confirmMessage:
|
|
7781
|
+
confirmMessage: v("confirmRemove"),
|
|
7764
7782
|
lang: E,
|
|
7765
7783
|
onOk: () => {
|
|
7766
7784
|
R();
|
|
@@ -7823,10 +7841,10 @@ function Rc(t) {
|
|
|
7823
7841
|
] }),
|
|
7824
7842
|
S ? null : /* @__PURE__ */ V(Q, { children: [
|
|
7825
7843
|
/* @__PURE__ */ n(
|
|
7826
|
-
|
|
7844
|
+
_c,
|
|
7827
7845
|
{
|
|
7828
7846
|
disabled: l || a || T,
|
|
7829
|
-
searchText:
|
|
7847
|
+
searchText: w,
|
|
7830
7848
|
onSearch: (Y) => {
|
|
7831
7849
|
Y && Y.trim().length > 0 ? y == null || y(Y) : y == null || y(void 0);
|
|
7832
7850
|
}
|
|
@@ -7841,13 +7859,13 @@ function Rc(t) {
|
|
|
7841
7859
|
style: { color: h ? "white" : void 0 }
|
|
7842
7860
|
}
|
|
7843
7861
|
),
|
|
7844
|
-
tooltip:
|
|
7862
|
+
tooltip: v("advanced_search"),
|
|
7845
7863
|
type: h ? "primary" : "default",
|
|
7846
7864
|
onClick: () => {
|
|
7847
|
-
|
|
7865
|
+
g == null || g(!h);
|
|
7848
7866
|
},
|
|
7849
7867
|
disabled: l || a || T,
|
|
7850
|
-
badgeNumber:
|
|
7868
|
+
badgeNumber: p == null ? void 0 : p.length
|
|
7851
7869
|
}
|
|
7852
7870
|
),
|
|
7853
7871
|
yt(),
|
|
@@ -7856,7 +7874,7 @@ function Rc(t) {
|
|
|
7856
7874
|
Ze,
|
|
7857
7875
|
{
|
|
7858
7876
|
icon: /* @__PURE__ */ n(qn, {}),
|
|
7859
|
-
tooltip:
|
|
7877
|
+
tooltip: v("duplicate"),
|
|
7860
7878
|
disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || T,
|
|
7861
7879
|
loading: l,
|
|
7862
7880
|
onClick: U
|
|
@@ -7866,7 +7884,7 @@ function Rc(t) {
|
|
|
7866
7884
|
Ze,
|
|
7867
7885
|
{
|
|
7868
7886
|
icon: /* @__PURE__ */ n(Gn, {}),
|
|
7869
|
-
tooltip:
|
|
7887
|
+
tooltip: v("delete"),
|
|
7870
7888
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7871
7889
|
loading: a,
|
|
7872
7890
|
onClick: K
|
|
@@ -7878,11 +7896,11 @@ function Rc(t) {
|
|
|
7878
7896
|
Ze,
|
|
7879
7897
|
{
|
|
7880
7898
|
icon: /* @__PURE__ */ n(qr, {}),
|
|
7881
|
-
tooltip:
|
|
7899
|
+
tooltip: v("showLogs"),
|
|
7882
7900
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7883
7901
|
loading: !1,
|
|
7884
7902
|
onClick: () => {
|
|
7885
|
-
Oo(u, o[0].id,
|
|
7903
|
+
Oo(u, o[0].id, v);
|
|
7886
7904
|
}
|
|
7887
7905
|
}
|
|
7888
7906
|
),
|
|
@@ -7890,7 +7908,7 @@ function Rc(t) {
|
|
|
7890
7908
|
Ze,
|
|
7891
7909
|
{
|
|
7892
7910
|
icon: /* @__PURE__ */ n(un, {}),
|
|
7893
|
-
tooltip:
|
|
7911
|
+
tooltip: v("refresh"),
|
|
7894
7912
|
disabled: l || a || T,
|
|
7895
7913
|
loading: !1,
|
|
7896
7914
|
onClick: () => {
|
|
@@ -7920,7 +7938,7 @@ function Rc(t) {
|
|
|
7920
7938
|
{
|
|
7921
7939
|
icon: /* @__PURE__ */ n(jn, {}),
|
|
7922
7940
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7923
|
-
tooltip:
|
|
7941
|
+
tooltip: v("actions"),
|
|
7924
7942
|
items: I == null ? void 0 : I.action,
|
|
7925
7943
|
onItemClick: (Y) => {
|
|
7926
7944
|
Y && ne(Y);
|
|
@@ -7932,7 +7950,7 @@ function Rc(t) {
|
|
|
7932
7950
|
{
|
|
7933
7951
|
icon: /* @__PURE__ */ n(Yn, {}),
|
|
7934
7952
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
|
|
7935
|
-
tooltip:
|
|
7953
|
+
tooltip: v("reports"),
|
|
7936
7954
|
items: I == null ? void 0 : I.print,
|
|
7937
7955
|
onItemClick: (Y) => {
|
|
7938
7956
|
Y && ne({
|
|
@@ -7975,15 +7993,15 @@ function Rc(t) {
|
|
|
7975
7993
|
)
|
|
7976
7994
|
}
|
|
7977
7995
|
),
|
|
7978
|
-
tooltip:
|
|
7996
|
+
tooltip: v("export"),
|
|
7979
7997
|
items: [
|
|
7980
7998
|
{
|
|
7981
7999
|
id: "print_screen",
|
|
7982
|
-
name:
|
|
8000
|
+
name: v("printScreen")
|
|
7983
8001
|
},
|
|
7984
8002
|
{
|
|
7985
8003
|
id: "export",
|
|
7986
|
-
name:
|
|
8004
|
+
name: v("advancedExport")
|
|
7987
8005
|
}
|
|
7988
8006
|
],
|
|
7989
8007
|
onItemClick: (Y) => {
|
|
@@ -8015,7 +8033,7 @@ function Rc(t) {
|
|
|
8015
8033
|
model: u,
|
|
8016
8034
|
domain: Wt(
|
|
8017
8035
|
((X = c == null ? void 0 : c.current) == null ? void 0 : X.getDomain()) || [],
|
|
8018
|
-
|
|
8036
|
+
p || []
|
|
8019
8037
|
),
|
|
8020
8038
|
limit: _,
|
|
8021
8039
|
totalRegisters: A || 0,
|
|
@@ -8029,7 +8047,7 @@ function Rc(t) {
|
|
|
8029
8047
|
function yt() {
|
|
8030
8048
|
return /* @__PURE__ */ n("div", { className: "inline-block w-2" });
|
|
8031
8049
|
}
|
|
8032
|
-
const
|
|
8050
|
+
const Ac = (t) => {
|
|
8033
8051
|
const {
|
|
8034
8052
|
visible: e,
|
|
8035
8053
|
searchTreeRef: r,
|
|
@@ -8043,13 +8061,13 @@ const Vc = (t) => {
|
|
|
8043
8061
|
setCurrentId: c,
|
|
8044
8062
|
setCurrentView: f,
|
|
8045
8063
|
availableViews: m,
|
|
8046
|
-
searchTreeNameSearch:
|
|
8047
|
-
} = t, { currentView: h, setPreviousView:
|
|
8048
|
-
|
|
8064
|
+
searchTreeNameSearch: p
|
|
8065
|
+
} = t, { currentView: h, setPreviousView: g } = H(
|
|
8066
|
+
it
|
|
8049
8067
|
);
|
|
8050
8068
|
return e ? /* @__PURE__ */ V(Q, { children: [
|
|
8051
8069
|
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
8052
|
-
|
|
8070
|
+
Vc,
|
|
8053
8071
|
{
|
|
8054
8072
|
toolbar: a == null ? void 0 : a.toolbar,
|
|
8055
8073
|
parentContext: o,
|
|
@@ -8057,21 +8075,21 @@ const Vc = (t) => {
|
|
|
8057
8075
|
}
|
|
8058
8076
|
) }),
|
|
8059
8077
|
/* @__PURE__ */ n(
|
|
8060
|
-
|
|
8078
|
+
wo,
|
|
8061
8079
|
{
|
|
8062
8080
|
ref: r,
|
|
8063
8081
|
rootTree: !0,
|
|
8064
8082
|
model: i,
|
|
8065
8083
|
parentContext: o,
|
|
8066
|
-
nameSearch:
|
|
8084
|
+
nameSearch: p,
|
|
8067
8085
|
formView: s,
|
|
8068
8086
|
treeView: a,
|
|
8069
8087
|
domain: l,
|
|
8070
8088
|
onRowClicked: (y) => {
|
|
8071
|
-
const { id:
|
|
8072
|
-
c(
|
|
8073
|
-
const T = u.findIndex((C) => C.id ===
|
|
8074
|
-
|
|
8089
|
+
const { id: w } = y;
|
|
8090
|
+
c(w);
|
|
8091
|
+
const T = u.findIndex((C) => C.id === w);
|
|
8092
|
+
g == null || g(h), d(T);
|
|
8075
8093
|
const F = m.find(
|
|
8076
8094
|
(C) => C.type === "form"
|
|
8077
8095
|
);
|
|
@@ -8080,7 +8098,7 @@ const Vc = (t) => {
|
|
|
8080
8098
|
}
|
|
8081
8099
|
)
|
|
8082
8100
|
] }) : null;
|
|
8083
|
-
}, er = Qe.createContext(null),
|
|
8101
|
+
}, er = Qe.createContext(null), Dc = (t) => {
|
|
8084
8102
|
const [e, r] = b(!1), [i, o] = b(!1), { children: s, dashboardRef: a, openAction: l } = t;
|
|
8085
8103
|
return /* @__PURE__ */ n(
|
|
8086
8104
|
er.Provider,
|
|
@@ -8097,7 +8115,7 @@ const Vc = (t) => {
|
|
|
8097
8115
|
}
|
|
8098
8116
|
);
|
|
8099
8117
|
};
|
|
8100
|
-
function
|
|
8118
|
+
function kc() {
|
|
8101
8119
|
const { isLoading: t, dashboardRef: e, moveItemsEnabled: r, setMoveItemsEnabled: i } = H(er), { t: o } = H(he);
|
|
8102
8120
|
return /* @__PURE__ */ V(je, { wrap: !0, children: [
|
|
8103
8121
|
/* @__PURE__ */ n(
|
|
@@ -8118,11 +8136,11 @@ function Dc() {
|
|
|
8118
8136
|
}
|
|
8119
8137
|
}
|
|
8120
8138
|
),
|
|
8121
|
-
|
|
8139
|
+
Ec(),
|
|
8122
8140
|
/* @__PURE__ */ n(
|
|
8123
8141
|
Ze,
|
|
8124
8142
|
{
|
|
8125
|
-
icon: /* @__PURE__ */ n(
|
|
8143
|
+
icon: /* @__PURE__ */ n(wi, {}),
|
|
8126
8144
|
tooltip: o("configDashboard"),
|
|
8127
8145
|
disabled: t,
|
|
8128
8146
|
loading: !1,
|
|
@@ -8145,24 +8163,24 @@ function Dc() {
|
|
|
8145
8163
|
)
|
|
8146
8164
|
] });
|
|
8147
8165
|
}
|
|
8148
|
-
function
|
|
8166
|
+
function Ec() {
|
|
8149
8167
|
return /* @__PURE__ */ n("div", { className: "inline-block w-2" });
|
|
8150
8168
|
}
|
|
8151
|
-
const
|
|
8169
|
+
const Mc = (t) => {
|
|
8152
8170
|
const { dashboardData: e } = t, r = de(), i = H(
|
|
8153
8171
|
dt
|
|
8154
8172
|
), { openShortcut: o } = i || {};
|
|
8155
8173
|
return e ? /* @__PURE__ */ V(
|
|
8156
|
-
|
|
8174
|
+
Dc,
|
|
8157
8175
|
{
|
|
8158
8176
|
dashboardRef: r,
|
|
8159
8177
|
openAction: (s) => {
|
|
8160
8178
|
o(s);
|
|
8161
8179
|
},
|
|
8162
8180
|
children: [
|
|
8163
|
-
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(
|
|
8181
|
+
/* @__PURE__ */ n(yn, { children: /* @__PURE__ */ n(kc, {}) }),
|
|
8164
8182
|
/* @__PURE__ */ n(
|
|
8165
|
-
|
|
8183
|
+
qc,
|
|
8166
8184
|
{
|
|
8167
8185
|
ref: r,
|
|
8168
8186
|
model: e.model,
|
|
@@ -8175,7 +8193,7 @@ const Ec = (t) => {
|
|
|
8175
8193
|
}
|
|
8176
8194
|
) : null;
|
|
8177
8195
|
};
|
|
8178
|
-
async function
|
|
8196
|
+
async function Nc(t) {
|
|
8179
8197
|
const e = await Promise.all(
|
|
8180
8198
|
t.map(async (i) => {
|
|
8181
8199
|
try {
|
|
@@ -8190,7 +8208,7 @@ async function Mc(t) {
|
|
|
8190
8208
|
info: e[o]
|
|
8191
8209
|
})).filter((i) => i.info !== null);
|
|
8192
8210
|
}
|
|
8193
|
-
function
|
|
8211
|
+
function Pc(t, e) {
|
|
8194
8212
|
const {
|
|
8195
8213
|
domain: r,
|
|
8196
8214
|
model: i,
|
|
@@ -8203,19 +8221,19 @@ function Nc(t, e) {
|
|
|
8203
8221
|
formDefaultValues: c,
|
|
8204
8222
|
formForcedValues: f = {},
|
|
8205
8223
|
res_id: m = !1,
|
|
8206
|
-
action_id:
|
|
8224
|
+
action_id: p,
|
|
8207
8225
|
action_type: h,
|
|
8208
|
-
treeExpandable:
|
|
8226
|
+
treeExpandable: g = !1,
|
|
8209
8227
|
limit: y
|
|
8210
|
-
} = t, [
|
|
8228
|
+
} = t, [w, T] = b(), [F, C] = b([]), [O, _] = b(!0), A = m || void 0, [x, S] = b(
|
|
8211
8229
|
A
|
|
8212
|
-
), [I,
|
|
8230
|
+
), [I, v] = 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(), ce = de(), Ie = H(
|
|
8213
8231
|
dt
|
|
8214
8232
|
), {
|
|
8215
8233
|
setCurrentView: Z,
|
|
8216
8234
|
setCurrentId: q,
|
|
8217
8235
|
tabs: Ce,
|
|
8218
|
-
activeKey:
|
|
8236
|
+
activeKey: ve,
|
|
8219
8237
|
openAction: Ye,
|
|
8220
8238
|
onRemoveTab: ke
|
|
8221
8239
|
} = Ie || {};
|
|
@@ -8224,7 +8242,7 @@ function Nc(t, e) {
|
|
|
8224
8242
|
(J) => {
|
|
8225
8243
|
J.preventDefault(), Ee();
|
|
8226
8244
|
},
|
|
8227
|
-
[
|
|
8245
|
+
[ve, Ce, w, E, M]
|
|
8228
8246
|
);
|
|
8229
8247
|
function Le(J) {
|
|
8230
8248
|
S(J), q == null || q(J);
|
|
@@ -8237,10 +8255,10 @@ function Nc(t, e) {
|
|
|
8237
8255
|
}));
|
|
8238
8256
|
const xe = async () => {
|
|
8239
8257
|
_(!0);
|
|
8240
|
-
const J = [],
|
|
8258
|
+
const J = [], we = [];
|
|
8241
8259
|
for (const ie of s) {
|
|
8242
8260
|
const [ue, $e] = ie;
|
|
8243
|
-
$e !== "dashboard" ?
|
|
8261
|
+
$e !== "dashboard" ? we.push({
|
|
8244
8262
|
viewTuple: ie,
|
|
8245
8263
|
promise: D.getHandler().getView({
|
|
8246
8264
|
model: i,
|
|
@@ -8248,11 +8266,11 @@ function Nc(t, e) {
|
|
|
8248
8266
|
id: ue,
|
|
8249
8267
|
context: o
|
|
8250
8268
|
})
|
|
8251
|
-
}) :
|
|
8269
|
+
}) : we.push({
|
|
8252
8270
|
viewTuple: ie
|
|
8253
8271
|
});
|
|
8254
8272
|
}
|
|
8255
|
-
const Ve = await
|
|
8273
|
+
const Ve = await Nc(we);
|
|
8256
8274
|
for (const ie of Ve) {
|
|
8257
8275
|
if (!ie)
|
|
8258
8276
|
continue;
|
|
@@ -8265,7 +8283,7 @@ function Nc(t, e) {
|
|
|
8265
8283
|
});
|
|
8266
8284
|
let et;
|
|
8267
8285
|
ae && (et = {
|
|
8268
|
-
action_id:
|
|
8286
|
+
action_id: p,
|
|
8269
8287
|
action_type: h,
|
|
8270
8288
|
name: a,
|
|
8271
8289
|
res_id: o.active_id,
|
|
@@ -8291,7 +8309,7 @@ function Nc(t, e) {
|
|
|
8291
8309
|
case "tree": {
|
|
8292
8310
|
J.push({
|
|
8293
8311
|
...$e,
|
|
8294
|
-
isExpandable:
|
|
8312
|
+
isExpandable: g,
|
|
8295
8313
|
type: ue
|
|
8296
8314
|
});
|
|
8297
8315
|
break;
|
|
@@ -8316,23 +8334,23 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8316
8334
|
), ke == null || ke(d)), Ue(Be), C(J), _(!1);
|
|
8317
8335
|
};
|
|
8318
8336
|
l({ tabKey: d, canWeClose: oe }), me(() => {
|
|
8319
|
-
const J = F.find((Ve) => Ve.type === "tree"),
|
|
8320
|
-
Ue(
|
|
8337
|
+
const J = F.find((Ve) => Ve.type === "tree"), we = F.find((Ve) => u.id ? Ve.type === u.type && Ve.view_id === u.id : Ve.type === u.type);
|
|
8338
|
+
Ue(we || J), m ? q == null || q(A) : (Le(void 0), P(void 0)), xe();
|
|
8321
8339
|
}, [i, s, m]), me(() => {
|
|
8322
|
-
|
|
8323
|
-
}, [Ce,
|
|
8340
|
+
ve === d && (q == null || q(x), Z == null || Z(w));
|
|
8341
|
+
}, [Ce, ve]);
|
|
8324
8342
|
async function oe() {
|
|
8325
|
-
return
|
|
8343
|
+
return w && w.type === "form" ? await ee.current.cancelUnsavedChanges() : !0;
|
|
8326
8344
|
}
|
|
8327
8345
|
async function Ee() {
|
|
8328
|
-
|
|
8346
|
+
ve === d && (w.type === "form" && !await ee.current.cancelUnsavedChanges() || ne(!0));
|
|
8329
8347
|
}
|
|
8330
8348
|
async function ye(J) {
|
|
8331
8349
|
var ie;
|
|
8332
8350
|
Y(!0);
|
|
8333
|
-
let
|
|
8351
|
+
let we, Ve;
|
|
8334
8352
|
if (J.length === 1) {
|
|
8335
|
-
|
|
8353
|
+
we = "form", Ve = [];
|
|
8336
8354
|
const ue = J[0], $e = M.findIndex((et) => et.id === ue);
|
|
8337
8355
|
let ae;
|
|
8338
8356
|
if ($e === -1) {
|
|
@@ -8351,9 +8369,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8351
8369
|
} else
|
|
8352
8370
|
ae = M[$e];
|
|
8353
8371
|
} else
|
|
8354
|
-
|
|
8372
|
+
we = "tree", Ve = [["id", "in", J]];
|
|
8355
8373
|
Y(!1), ne(!1);
|
|
8356
|
-
const Be = s.find((ue) => ue[1] ===
|
|
8374
|
+
const Be = s.find((ue) => ue[1] === we);
|
|
8357
8375
|
Ye({
|
|
8358
8376
|
domain: Ve,
|
|
8359
8377
|
context: o,
|
|
@@ -8361,8 +8379,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8361
8379
|
views: s,
|
|
8362
8380
|
title: a,
|
|
8363
8381
|
target: "current",
|
|
8364
|
-
initialView: { id: Be == null ? void 0 : Be[0], type:
|
|
8365
|
-
action_id:
|
|
8382
|
+
initialView: { id: Be == null ? void 0 : Be[0], type: we },
|
|
8383
|
+
action_id: p,
|
|
8366
8384
|
action_type: h,
|
|
8367
8385
|
res_id: J[0]
|
|
8368
8386
|
});
|
|
@@ -8372,11 +8390,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8372
8390
|
switch (J.type) {
|
|
8373
8391
|
case "form":
|
|
8374
8392
|
return /* @__PURE__ */ n(
|
|
8375
|
-
|
|
8393
|
+
Oc,
|
|
8376
8394
|
{
|
|
8377
8395
|
formRef: ee,
|
|
8378
8396
|
currentId: x,
|
|
8379
|
-
visible:
|
|
8397
|
+
visible: w.type === J.type && w.view_id === J.view_id,
|
|
8380
8398
|
formView: J,
|
|
8381
8399
|
model: i,
|
|
8382
8400
|
context: o,
|
|
@@ -8391,14 +8409,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8391
8409
|
);
|
|
8392
8410
|
case "tree":
|
|
8393
8411
|
return /* @__PURE__ */ n(
|
|
8394
|
-
|
|
8412
|
+
Ac,
|
|
8395
8413
|
{
|
|
8396
|
-
visible:
|
|
8414
|
+
visible: w.type === J.type && w.view_id === J.view_id,
|
|
8397
8415
|
limit: y,
|
|
8398
8416
|
model: i,
|
|
8399
8417
|
context: o,
|
|
8400
8418
|
domain: r,
|
|
8401
|
-
formView: F.find((
|
|
8419
|
+
formView: F.find((we) => we.type === "form"),
|
|
8402
8420
|
treeView: J,
|
|
8403
8421
|
searchTreeRef: ce,
|
|
8404
8422
|
searchTreeNameSearch: G,
|
|
@@ -8412,21 +8430,21 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8412
8430
|
);
|
|
8413
8431
|
case "graph":
|
|
8414
8432
|
return /* @__PURE__ */ n(
|
|
8415
|
-
|
|
8433
|
+
Fc,
|
|
8416
8434
|
{
|
|
8417
|
-
visible:
|
|
8435
|
+
visible: w.type === J.type && w.view_id === J.view_id,
|
|
8418
8436
|
viewData: J,
|
|
8419
8437
|
model: i,
|
|
8420
8438
|
context: o,
|
|
8421
8439
|
domain: r,
|
|
8422
|
-
treeView: F.find((
|
|
8423
|
-
formView: F.find((
|
|
8440
|
+
treeView: F.find((we) => we.type === "tree"),
|
|
8441
|
+
formView: F.find((we) => we.type === "form")
|
|
8424
8442
|
},
|
|
8425
8443
|
`${J.type}-${J.view_id}`
|
|
8426
8444
|
);
|
|
8427
8445
|
case "dashboard":
|
|
8428
8446
|
return /* @__PURE__ */ n(
|
|
8429
|
-
|
|
8447
|
+
Mc,
|
|
8430
8448
|
{
|
|
8431
8449
|
dashboardData: J
|
|
8432
8450
|
},
|
|
@@ -8436,21 +8454,21 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8436
8454
|
});
|
|
8437
8455
|
}
|
|
8438
8456
|
function Ke() {
|
|
8439
|
-
if (x === void 0 &&
|
|
8457
|
+
if (x === void 0 && w.type === "form")
|
|
8440
8458
|
ee.current.clearAndReload();
|
|
8441
8459
|
else {
|
|
8442
8460
|
Le(void 0);
|
|
8443
8461
|
const J = F.find(
|
|
8444
|
-
(
|
|
8462
|
+
(we) => we.type === "form"
|
|
8445
8463
|
);
|
|
8446
8464
|
Ue(J);
|
|
8447
8465
|
}
|
|
8448
8466
|
}
|
|
8449
|
-
return O ? /* @__PURE__ */ n(Ae, {}) :
|
|
8467
|
+
return O ? /* @__PURE__ */ n(Ae, {}) : w ? /* @__PURE__ */ V(
|
|
8450
8468
|
fa,
|
|
8451
8469
|
{
|
|
8452
8470
|
title: a,
|
|
8453
|
-
currentView:
|
|
8471
|
+
currentView: w,
|
|
8454
8472
|
setCurrentView: Ue,
|
|
8455
8473
|
availableViews: F,
|
|
8456
8474
|
formRef: ee,
|
|
@@ -8468,7 +8486,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8468
8486
|
totalItems: K,
|
|
8469
8487
|
setTotalItems: R,
|
|
8470
8488
|
selectedRowItems: I,
|
|
8471
|
-
setSelectedRowItems:
|
|
8489
|
+
setSelectedRowItems: v,
|
|
8472
8490
|
setSearchTreeNameSearch: k,
|
|
8473
8491
|
searchTreeNameSearch: G,
|
|
8474
8492
|
goToResourceId: ye,
|
|
@@ -8476,7 +8494,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8476
8494
|
children: [
|
|
8477
8495
|
Me(),
|
|
8478
8496
|
/* @__PURE__ */ n(
|
|
8479
|
-
|
|
8497
|
+
Cc,
|
|
8480
8498
|
{
|
|
8481
8499
|
visible: U,
|
|
8482
8500
|
onIdSubmitted: ye,
|
|
@@ -8490,8 +8508,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8490
8508
|
}
|
|
8491
8509
|
) : null;
|
|
8492
8510
|
}
|
|
8493
|
-
const Vo =
|
|
8494
|
-
async function
|
|
8511
|
+
const Vo = vt(Pc);
|
|
8512
|
+
async function Lc({
|
|
8495
8513
|
actionId: t,
|
|
8496
8514
|
rootContext: e = {},
|
|
8497
8515
|
globalValues: r = {}
|
|
@@ -8499,7 +8517,7 @@ async function Pc({
|
|
|
8499
8517
|
const i = "ir.actions.act_window", o = `${i},${t}`, s = await D.getHandler().getActionData({
|
|
8500
8518
|
action: o,
|
|
8501
8519
|
context: e
|
|
8502
|
-
}), a =
|
|
8520
|
+
}), a = wt({
|
|
8503
8521
|
context: s.context,
|
|
8504
8522
|
values: r,
|
|
8505
8523
|
fields: {}
|
|
@@ -8513,7 +8531,7 @@ async function Pc({
|
|
|
8513
8531
|
name: c,
|
|
8514
8532
|
limit: f,
|
|
8515
8533
|
view_type: m
|
|
8516
|
-
} = s,
|
|
8534
|
+
} = s, p = m === "tree", h = [];
|
|
8517
8535
|
for (const T of u) {
|
|
8518
8536
|
const [F, C] = T;
|
|
8519
8537
|
if (F)
|
|
@@ -8528,7 +8546,7 @@ async function Pc({
|
|
|
8528
8546
|
h.push([O, C]);
|
|
8529
8547
|
}
|
|
8530
8548
|
}
|
|
8531
|
-
const [
|
|
8549
|
+
const [g, y] = h[0], w = { id: g, type: y };
|
|
8532
8550
|
return {
|
|
8533
8551
|
title: c,
|
|
8534
8552
|
actionId: t,
|
|
@@ -8538,12 +8556,12 @@ async function Pc({
|
|
|
8538
8556
|
model: d,
|
|
8539
8557
|
context: { ...e, ...a },
|
|
8540
8558
|
domain: l,
|
|
8541
|
-
initialView:
|
|
8559
|
+
initialView: w,
|
|
8542
8560
|
limit: f,
|
|
8543
|
-
treeExpandable:
|
|
8561
|
+
treeExpandable: p
|
|
8544
8562
|
};
|
|
8545
8563
|
}
|
|
8546
|
-
const
|
|
8564
|
+
const Bc = ji(Yi), $c = (t) => {
|
|
8547
8565
|
const { children: e = [], onPositionItemsChanged: r } = t, i = Qe.Children.map(
|
|
8548
8566
|
e,
|
|
8549
8567
|
(o) => {
|
|
@@ -8552,7 +8570,7 @@ const Lc = ji(Yi), Bc = (t) => {
|
|
|
8552
8570
|
}
|
|
8553
8571
|
);
|
|
8554
8572
|
return /* @__PURE__ */ n(
|
|
8555
|
-
|
|
8573
|
+
Bc,
|
|
8556
8574
|
{
|
|
8557
8575
|
className: "layout",
|
|
8558
8576
|
cols: { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 },
|
|
@@ -8572,8 +8590,8 @@ const Lc = ji(Yi), Bc = (t) => {
|
|
|
8572
8590
|
children: i
|
|
8573
8591
|
}
|
|
8574
8592
|
);
|
|
8575
|
-
}, { useToken:
|
|
8576
|
-
const { title: e, children: r, action: i, openAction: o } = t, { token: s } =
|
|
8593
|
+
}, { useToken: Hc } = Pe, { Text: Kc } = Yt, Wc = (t) => {
|
|
8594
|
+
const { title: e, children: r, action: i, openAction: o } = t, { token: s } = Hc();
|
|
8577
8595
|
return /* @__PURE__ */ V(
|
|
8578
8596
|
"div",
|
|
8579
8597
|
{
|
|
@@ -8609,11 +8627,11 @@ const Lc = ji(Yi), Bc = (t) => {
|
|
|
8609
8627
|
cursor: "grab",
|
|
8610
8628
|
overflow: "hidden"
|
|
8611
8629
|
},
|
|
8612
|
-
children: /* @__PURE__ */ n(
|
|
8630
|
+
children: /* @__PURE__ */ n(Kc, { ellipsis: !0, children: e })
|
|
8613
8631
|
}
|
|
8614
8632
|
),
|
|
8615
8633
|
i && /* @__PURE__ */ n(le, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ n(be, { justify: "end", align: "middle", children: /* @__PURE__ */ n(
|
|
8616
|
-
|
|
8634
|
+
vi,
|
|
8617
8635
|
{
|
|
8618
8636
|
style: { cursor: "pointer" },
|
|
8619
8637
|
onClick: () => {
|
|
@@ -8628,8 +8646,8 @@ const Lc = ji(Yi), Bc = (t) => {
|
|
|
8628
8646
|
]
|
|
8629
8647
|
}
|
|
8630
8648
|
);
|
|
8631
|
-
},
|
|
8632
|
-
function
|
|
8649
|
+
}, jc = 80;
|
|
8650
|
+
function Yc(t) {
|
|
8633
8651
|
const {
|
|
8634
8652
|
action: e,
|
|
8635
8653
|
model: r,
|
|
@@ -8638,17 +8656,17 @@ function jc(t) {
|
|
|
8638
8656
|
domain: s = [],
|
|
8639
8657
|
visible: a = !0,
|
|
8640
8658
|
parentContext: l = {}
|
|
8641
|
-
} = t, [d, u] = b(!1), [c, f] = b(!1), [m,
|
|
8659
|
+
} = t, [d, u] = b(!1), [c, f] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [T, F] = b(1), [C, O] = b(0), _ = de(jc), A = de([]), [x, S] = b(0), [I, v] = b([]), [E, P] = b(void 0), [M, j] = b(), [N, B] = b(), [K, R] = b(), [U, ne] = b(!1), X = de([]), Y = (q) => {
|
|
8642
8660
|
ne(!0), F(q), O((q - 1) * _.current);
|
|
8643
8661
|
}, G = async () => {
|
|
8644
|
-
const q = X.current.length > 0 ? X.current : s, Ce = Wt(A.current, q), { colors:
|
|
8662
|
+
const q = X.current.length > 0 ? X.current : s, Ce = Wt(A.current, q), { colors: ve } = _t(h), { totalItems: Ye, results: ke, attrsEvaluated: Le } = await D.getHandler().searchForTree({
|
|
8645
8663
|
params: Ce,
|
|
8646
8664
|
limit: _.current,
|
|
8647
8665
|
offset: C,
|
|
8648
8666
|
model: m,
|
|
8649
8667
|
fields: h.fields,
|
|
8650
8668
|
context: l,
|
|
8651
|
-
attrs:
|
|
8669
|
+
attrs: ve && { colors: ve }
|
|
8652
8670
|
});
|
|
8653
8671
|
P(tn(Le));
|
|
8654
8672
|
const Ue = Rt({
|
|
@@ -8656,7 +8674,7 @@ function jc(t) {
|
|
|
8656
8674
|
sorter: M,
|
|
8657
8675
|
fields: { ...h.fields, ...y.fields }
|
|
8658
8676
|
});
|
|
8659
|
-
ne(!1),
|
|
8677
|
+
ne(!1), v(Ue);
|
|
8660
8678
|
const xe = await Ye;
|
|
8661
8679
|
S(xe);
|
|
8662
8680
|
}, k = async () => {
|
|
@@ -8683,22 +8701,22 @@ function jc(t) {
|
|
|
8683
8701
|
action: e,
|
|
8684
8702
|
context: l
|
|
8685
8703
|
});
|
|
8686
|
-
X.current = q.domain,
|
|
8704
|
+
X.current = q.domain, w(q.views.get("form")), g(q.views.get("tree")), p(q.model), _.current = q.limit;
|
|
8687
8705
|
}, ce = async () => {
|
|
8688
|
-
|
|
8706
|
+
p(r);
|
|
8689
8707
|
const q = await D.getHandler().getView({
|
|
8690
8708
|
model: r,
|
|
8691
8709
|
type: "form",
|
|
8692
8710
|
context: l
|
|
8693
8711
|
});
|
|
8694
|
-
|
|
8712
|
+
w(q);
|
|
8695
8713
|
const Ce = await D.getHandler().getView({
|
|
8696
8714
|
model: r,
|
|
8697
8715
|
type: "tree",
|
|
8698
8716
|
id: i,
|
|
8699
8717
|
context: l
|
|
8700
8718
|
});
|
|
8701
|
-
|
|
8719
|
+
g(Ce);
|
|
8702
8720
|
};
|
|
8703
8721
|
me(() => {
|
|
8704
8722
|
e ? L("action") : r && L("model");
|
|
@@ -8733,7 +8751,7 @@ function jc(t) {
|
|
|
8733
8751
|
sorter: q,
|
|
8734
8752
|
fields: { ...h.fields, ...y.fields }
|
|
8735
8753
|
});
|
|
8736
|
-
|
|
8754
|
+
v(Ce);
|
|
8737
8755
|
},
|
|
8738
8756
|
context: l
|
|
8739
8757
|
}
|
|
@@ -8741,7 +8759,7 @@ function jc(t) {
|
|
|
8741
8759
|
] });
|
|
8742
8760
|
return K ? /* @__PURE__ */ n(tt, { className: "mt-10", message: K, type: "error", banner: !0 }) : d ? /* @__PURE__ */ n(Ae, { style: { padding: "2rem" } }) : Z();
|
|
8743
8761
|
}
|
|
8744
|
-
const
|
|
8762
|
+
const Gc = (t) => {
|
|
8745
8763
|
const { model: e } = t, [r, i] = b();
|
|
8746
8764
|
me(() => {
|
|
8747
8765
|
o();
|
|
@@ -8756,27 +8774,27 @@ const Yc = (t) => {
|
|
|
8756
8774
|
}
|
|
8757
8775
|
return /* @__PURE__ */ n("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ n(Jt, { ...t, model: e, id: r, readOnly: !0 }) });
|
|
8758
8776
|
}, On = "line_ids";
|
|
8759
|
-
function
|
|
8777
|
+
function Uc(t, e) {
|
|
8760
8778
|
const { model: r, context: i = {}, id: o, configAction: s } = t, [a, l] = b([]), [d, u] = b(!1), [c, f] = b(), {
|
|
8761
8779
|
setIsLoading: m,
|
|
8762
|
-
openAction:
|
|
8780
|
+
openAction: p,
|
|
8763
8781
|
moveItemsEnabled: h
|
|
8764
|
-
} = H(er),
|
|
8782
|
+
} = H(er), g = de(), y = de();
|
|
8765
8783
|
me(() => {
|
|
8766
|
-
|
|
8784
|
+
w();
|
|
8767
8785
|
}, [r, o, i]), bt(e, () => ({
|
|
8768
8786
|
refresh: () => {
|
|
8769
|
-
|
|
8787
|
+
w();
|
|
8770
8788
|
},
|
|
8771
8789
|
configDashboard: A
|
|
8772
8790
|
}));
|
|
8773
|
-
async function
|
|
8791
|
+
async function w() {
|
|
8774
8792
|
u(!0), m(!0), f(void 0);
|
|
8775
8793
|
try {
|
|
8776
|
-
const x = await T(), S = await C(x), I = x.fields[On].relation,
|
|
8794
|
+
const x = await T(), S = await C(x), I = x.fields[On].relation, v = S[On].items;
|
|
8777
8795
|
y.current = x.fields;
|
|
8778
8796
|
const E = await F({
|
|
8779
|
-
items:
|
|
8797
|
+
items: v,
|
|
8780
8798
|
model: I,
|
|
8781
8799
|
context: i
|
|
8782
8800
|
}), P = await O(E);
|
|
@@ -8797,24 +8815,24 @@ function Gc(t, e) {
|
|
|
8797
8815
|
model: S,
|
|
8798
8816
|
context: I
|
|
8799
8817
|
}) {
|
|
8800
|
-
|
|
8818
|
+
g.current = (await D.getHandler().getView({
|
|
8801
8819
|
model: S,
|
|
8802
8820
|
type: "form",
|
|
8803
8821
|
context: I
|
|
8804
8822
|
})).fields;
|
|
8805
|
-
const [
|
|
8823
|
+
const [v] = await Zn({
|
|
8806
8824
|
treeView: {
|
|
8807
|
-
fields:
|
|
8825
|
+
fields: g.current
|
|
8808
8826
|
},
|
|
8809
8827
|
formView: {
|
|
8810
|
-
fields:
|
|
8828
|
+
fields: g.current
|
|
8811
8829
|
},
|
|
8812
8830
|
model: S,
|
|
8813
8831
|
items: x,
|
|
8814
8832
|
context: I,
|
|
8815
8833
|
currentView: "form"
|
|
8816
8834
|
});
|
|
8817
|
-
return
|
|
8835
|
+
return v;
|
|
8818
8836
|
}
|
|
8819
8837
|
async function C(x) {
|
|
8820
8838
|
return (await D.getHandler().readObjects({
|
|
@@ -8827,9 +8845,9 @@ function Gc(t, e) {
|
|
|
8827
8845
|
async function O(x) {
|
|
8828
8846
|
const S = [];
|
|
8829
8847
|
for (const I of x) {
|
|
8830
|
-
const { values:
|
|
8831
|
-
if (
|
|
8832
|
-
const E = parseInt(
|
|
8848
|
+
const { values: v } = I;
|
|
8849
|
+
if (v.action_id && v.action_id.length > 0) {
|
|
8850
|
+
const E = parseInt(v.action_id[0], 10), P = await Lc({
|
|
8833
8851
|
actionId: E,
|
|
8834
8852
|
rootContext: i
|
|
8835
8853
|
});
|
|
@@ -8857,7 +8875,7 @@ function Gc(t, e) {
|
|
|
8857
8875
|
});
|
|
8858
8876
|
if (S.length === 0)
|
|
8859
8877
|
return;
|
|
8860
|
-
const
|
|
8878
|
+
const v = a.filter((P) => S.map((M) => M.id).includes(P.id)).map((P) => {
|
|
8861
8879
|
const M = {
|
|
8862
8880
|
...S.find((j) => j.id === P.id)
|
|
8863
8881
|
};
|
|
@@ -8870,8 +8888,8 @@ function Gc(t, e) {
|
|
|
8870
8888
|
}
|
|
8871
8889
|
};
|
|
8872
8890
|
}), E = {
|
|
8873
|
-
fields:
|
|
8874
|
-
items:
|
|
8891
|
+
fields: g.current,
|
|
8892
|
+
items: v
|
|
8875
8893
|
};
|
|
8876
8894
|
await D.getHandler().update({
|
|
8877
8895
|
model: r,
|
|
@@ -8882,10 +8900,10 @@ function Gc(t, e) {
|
|
|
8882
8900
|
});
|
|
8883
8901
|
}
|
|
8884
8902
|
async function A() {
|
|
8885
|
-
|
|
8903
|
+
p(s);
|
|
8886
8904
|
}
|
|
8887
|
-
return c ? (console.log(c), /* @__PURE__ */ n(tt, { className: "mt-10 mb-20", message: c, type: "error", banner: !0 })) : d ? /* @__PURE__ */ n(st, {}) : /* @__PURE__ */ n(
|
|
8888
|
-
const { actionData: I, values:
|
|
8905
|
+
return c ? (console.log(c), /* @__PURE__ */ n(tt, { className: "mt-10 mb-20", message: c, type: "error", banner: !0 })) : d ? /* @__PURE__ */ n(st, {}) : /* @__PURE__ */ n($c, { onPositionItemsChanged: _, children: a.map((x, S) => {
|
|
8906
|
+
const { actionData: I, values: v } = x, { position: E, id: P } = v, {
|
|
8889
8907
|
actionId: M,
|
|
8890
8908
|
actionType: j,
|
|
8891
8909
|
key: N,
|
|
@@ -8918,10 +8936,10 @@ function Gc(t, e) {
|
|
|
8918
8936
|
}
|
|
8919
8937
|
);
|
|
8920
8938
|
else if ((X == null ? void 0 : X.type) === "form")
|
|
8921
|
-
k = /* @__PURE__ */ n(
|
|
8939
|
+
k = /* @__PURE__ */ n(Gc, { model: R, actionDomain: ne });
|
|
8922
8940
|
else if ((X == null ? void 0 : X.type) === "tree")
|
|
8923
8941
|
k = /* @__PURE__ */ n(
|
|
8924
|
-
|
|
8942
|
+
Yc,
|
|
8925
8943
|
{
|
|
8926
8944
|
model: R,
|
|
8927
8945
|
domain: ne,
|
|
@@ -8936,19 +8954,19 @@ function Gc(t, e) {
|
|
|
8936
8954
|
if (Ie) {
|
|
8937
8955
|
const [Z, q] = Ie, {
|
|
8938
8956
|
actionId: Ce,
|
|
8939
|
-
actionType:
|
|
8957
|
+
actionType: ve,
|
|
8940
8958
|
title: Ye,
|
|
8941
8959
|
model: ke
|
|
8942
8960
|
} = I, Le = {
|
|
8943
8961
|
action_id: Ce,
|
|
8944
|
-
action_type:
|
|
8962
|
+
action_type: ve,
|
|
8945
8963
|
name: Ye,
|
|
8946
8964
|
res_id: ce.id,
|
|
8947
8965
|
res_model: ke,
|
|
8948
8966
|
view_id: Z,
|
|
8949
8967
|
view_type: q
|
|
8950
8968
|
};
|
|
8951
|
-
|
|
8969
|
+
p(Le);
|
|
8952
8970
|
}
|
|
8953
8971
|
}
|
|
8954
8972
|
}
|
|
@@ -8983,37 +9001,37 @@ function Gc(t, e) {
|
|
|
8983
9001
|
actionId: Z,
|
|
8984
9002
|
actionType: q,
|
|
8985
9003
|
title: Ce,
|
|
8986
|
-
model:
|
|
9004
|
+
model: ve
|
|
8987
9005
|
} = I;
|
|
8988
9006
|
L = {
|
|
8989
9007
|
action_id: Z,
|
|
8990
9008
|
action_type: q,
|
|
8991
9009
|
name: Ce,
|
|
8992
9010
|
res_id: !1,
|
|
8993
|
-
res_model:
|
|
9011
|
+
res_model: ve,
|
|
8994
9012
|
view_id: ce,
|
|
8995
9013
|
view_type: Ie
|
|
8996
9014
|
};
|
|
8997
9015
|
}
|
|
8998
9016
|
return /* @__PURE__ */ n(
|
|
8999
|
-
|
|
9017
|
+
Wc,
|
|
9000
9018
|
{
|
|
9001
9019
|
id: P,
|
|
9002
9020
|
title: B,
|
|
9003
9021
|
parms: G,
|
|
9004
9022
|
action: L,
|
|
9005
|
-
openAction:
|
|
9023
|
+
openAction: p,
|
|
9006
9024
|
children: k
|
|
9007
9025
|
},
|
|
9008
9026
|
P
|
|
9009
9027
|
);
|
|
9010
9028
|
}) });
|
|
9011
9029
|
}
|
|
9012
|
-
const
|
|
9030
|
+
const qc = vt(Uc), zc = (t) => {
|
|
9013
9031
|
const { ooui: e } = t;
|
|
9014
|
-
return /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(
|
|
9015
|
-
},
|
|
9016
|
-
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:
|
|
9032
|
+
return /* @__PURE__ */ n(ge, { type: "array", ...t, children: /* @__PURE__ */ n(Jc, { ooui: e }) });
|
|
9033
|
+
}, Jc = (t) => {
|
|
9034
|
+
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: p, readOnly: h, field: g, columns: y } = r, w = H(Ne), { getContext: T } = w || {};
|
|
9017
9035
|
xt(() => {
|
|
9018
9036
|
C();
|
|
9019
9037
|
}, [o]);
|
|
@@ -9029,11 +9047,11 @@ const Uc = wt(Gc), qc = (t) => {
|
|
|
9029
9047
|
const S = await D.getHandler().evalDomain({
|
|
9030
9048
|
domain: r.domain,
|
|
9031
9049
|
values: Nt({
|
|
9032
|
-
fields:
|
|
9033
|
-
values:
|
|
9050
|
+
fields: w == null ? void 0 : w.getFields(),
|
|
9051
|
+
values: w.getPlainValues()
|
|
9034
9052
|
}),
|
|
9035
|
-
fields:
|
|
9036
|
-
context:
|
|
9053
|
+
fields: w == null ? void 0 : w.getFields(),
|
|
9054
|
+
context: w.getContext()
|
|
9037
9055
|
});
|
|
9038
9056
|
x = [...x, ...S];
|
|
9039
9057
|
}
|
|
@@ -9041,12 +9059,12 @@ const Uc = wt(Gc), qc = (t) => {
|
|
|
9041
9059
|
const I = (await D.getHandler().search({
|
|
9042
9060
|
model: m,
|
|
9043
9061
|
params: x,
|
|
9044
|
-
fieldsToRetrieve: [
|
|
9045
|
-
context: { ...T == null ? void 0 : T(), ...
|
|
9046
|
-
})).map((
|
|
9047
|
-
const E =
|
|
9062
|
+
fieldsToRetrieve: [g],
|
|
9063
|
+
context: { ...T == null ? void 0 : T(), ...p }
|
|
9064
|
+
})).map((v) => {
|
|
9065
|
+
const E = v[g];
|
|
9048
9066
|
let P = E;
|
|
9049
|
-
return Array.isArray(E) && (P = E[1]), { label: P, value:
|
|
9067
|
+
return Array.isArray(E) && (P = E[1]), { label: P, value: v.id };
|
|
9050
9068
|
});
|
|
9051
9069
|
l(I);
|
|
9052
9070
|
} catch (S) {
|
|
@@ -9062,12 +9080,12 @@ const Uc = wt(Gc), qc = (t) => {
|
|
|
9062
9080
|
}, _ = () => {
|
|
9063
9081
|
A([]);
|
|
9064
9082
|
}, A = (x) => {
|
|
9065
|
-
const S = o.map((
|
|
9066
|
-
...
|
|
9083
|
+
const S = o.map((v) => x.includes(v.id) ? v.operation == "pendingRemove" ? {
|
|
9084
|
+
...v,
|
|
9067
9085
|
operation: "original"
|
|
9068
|
-
} :
|
|
9069
|
-
x.filter((
|
|
9070
|
-
S.push({ id:
|
|
9086
|
+
} : v : { id: v.id, operation: "pendingRemove" }), I = S.map((v) => v.id);
|
|
9087
|
+
x.filter((v) => !I.includes(v)).map((v) => {
|
|
9088
|
+
S.push({ id: v, operation: "pendingLink" });
|
|
9071
9089
|
}), F(S);
|
|
9072
9090
|
};
|
|
9073
9091
|
return c && a.length === 0 ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(Q, { children: /* @__PURE__ */ V("div", { className: "flex flex-row", children: [
|
|
@@ -9093,7 +9111,7 @@ const Uc = wt(Gc), qc = (t) => {
|
|
|
9093
9111
|
/* @__PURE__ */ n(Oe, { onClick: _, disabled: s.length === 0, children: "Uncheck all" })
|
|
9094
9112
|
] })
|
|
9095
9113
|
] }) });
|
|
9096
|
-
},
|
|
9114
|
+
}, Zc = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(Xc, { ...t }) }), Xc = (t) => {
|
|
9097
9115
|
const { value: e, ooui: r } = t;
|
|
9098
9116
|
return /* @__PURE__ */ n(
|
|
9099
9117
|
"div",
|
|
@@ -9112,25 +9130,25 @@ const Uc = wt(Gc), qc = (t) => {
|
|
|
9112
9130
|
)
|
|
9113
9131
|
}
|
|
9114
9132
|
);
|
|
9115
|
-
}, Xc = (t) => {
|
|
9116
|
-
const { ooui: e } = t, { required: r } = e;
|
|
9117
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(Qc, { ...t }) });
|
|
9118
9133
|
}, Qc = (t) => {
|
|
9134
|
+
const { ooui: e } = t, { required: r } = e;
|
|
9135
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(ed, { ...t }) });
|
|
9136
|
+
}, ed = (t) => {
|
|
9119
9137
|
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) => {
|
|
9120
9138
|
const [c, f] = u;
|
|
9121
9139
|
return /* @__PURE__ */ n(sr, { value: c, children: f }, c);
|
|
9122
9140
|
});
|
|
9123
9141
|
return /* @__PURE__ */ n(sr.Group, { disabled: s, onChange: r, value: i, children: /* @__PURE__ */ n(je, { direction: a, children: d }) });
|
|
9124
|
-
}, ed = (t) => {
|
|
9125
|
-
const { ooui: e } = t, { id: r, readOnly: i, required: o } = e;
|
|
9126
|
-
return /* @__PURE__ */ n(ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ n(td, { id: r, readOnly: i, required: o }) });
|
|
9127
9142
|
}, td = (t) => {
|
|
9143
|
+
const { ooui: e } = t, { id: r, readOnly: i, required: o } = e;
|
|
9144
|
+
return /* @__PURE__ */ n(ge, { ...t, valuePropName: "checked", children: /* @__PURE__ */ n(nd, { id: r, readOnly: i, required: o }) });
|
|
9145
|
+
}, nd = (t) => {
|
|
9128
9146
|
const { required: e, readOnly: r, ...i } = t;
|
|
9129
9147
|
return /* @__PURE__ */ n("div", { className: "flex flex-row", children: /* @__PURE__ */ n(Qo, { disabled: r, ...i }) });
|
|
9130
|
-
}, nd = (t) => {
|
|
9131
|
-
const { ooui: e } = t, { required: r } = e;
|
|
9132
|
-
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(rd, { ...t }) });
|
|
9133
9148
|
}, rd = (t) => {
|
|
9149
|
+
const { ooui: e } = t, { required: r } = e;
|
|
9150
|
+
return /* @__PURE__ */ n(ge, { required: r, type: "any", ...t, children: /* @__PURE__ */ n(od, { ...t }) });
|
|
9151
|
+
}, od = (t) => {
|
|
9134
9152
|
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);
|
|
9135
9153
|
let d = "process", u = "";
|
|
9136
9154
|
return o && (u = s.getFieldValue(o), u && (d = "error")), /* @__PURE__ */ n(ar, { current: l, status: d, children: a.map((c, f) => /* @__PURE__ */ n(
|
|
@@ -9140,7 +9158,7 @@ const Uc = wt(Gc), qc = (t) => {
|
|
|
9140
9158
|
description: f === l && d === "error" ? u : null
|
|
9141
9159
|
}
|
|
9142
9160
|
)) });
|
|
9143
|
-
},
|
|
9161
|
+
}, id = (t) => {
|
|
9144
9162
|
const { ooui: e } = t, { lang: r, height: i } = e, o = H(Ne), { elementHasLostFocus: s } = o || {};
|
|
9145
9163
|
return /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(
|
|
9146
9164
|
Hi,
|
|
@@ -9152,15 +9170,15 @@ const Uc = wt(Gc), qc = (t) => {
|
|
|
9152
9170
|
}
|
|
9153
9171
|
}
|
|
9154
9172
|
) });
|
|
9155
|
-
}, { Meta:
|
|
9173
|
+
}, { Meta: sd } = Nn, { Text: ad } = Yt;
|
|
9156
9174
|
at.extend(Ki);
|
|
9157
|
-
const
|
|
9175
|
+
const ld = ({ email: t, size: e = 40, theme: r = "" }) => {
|
|
9158
9176
|
const i = `https://www.gravatar.com/avatar/${Wi(
|
|
9159
9177
|
t
|
|
9160
9178
|
)}?s=${e}&d=${r}`;
|
|
9161
9179
|
return /* @__PURE__ */ n(Ar, { src: i, size: e });
|
|
9162
9180
|
};
|
|
9163
|
-
function
|
|
9181
|
+
function cd({ text: t }) {
|
|
9164
9182
|
const e = t.split(`
|
|
9165
9183
|
`);
|
|
9166
9184
|
return /* @__PURE__ */ n("div", { children: e.map((r, i) => /* @__PURE__ */ V(Qe.Fragment, { children: [
|
|
@@ -9168,13 +9186,13 @@ function ld({ text: t }) {
|
|
|
9168
9186
|
i !== e.length - 1 && /* @__PURE__ */ n("br", {})
|
|
9169
9187
|
] }, i)) });
|
|
9170
9188
|
}
|
|
9171
|
-
const
|
|
9189
|
+
const dd = (t) => {
|
|
9172
9190
|
const { data: e, style: r } = t, { t: i } = H(he);
|
|
9173
9191
|
return /* @__PURE__ */ V(Nn, { style: { ...r, textAlign: "start" }, children: [
|
|
9174
9192
|
/* @__PURE__ */ n(
|
|
9175
|
-
|
|
9193
|
+
sd,
|
|
9176
9194
|
{
|
|
9177
|
-
avatar: /* @__PURE__ */ n(
|
|
9195
|
+
avatar: /* @__PURE__ */ n(ld, { email: e.email, theme: "mp" }),
|
|
9178
9196
|
title: e.author,
|
|
9179
9197
|
description: /* @__PURE__ */ V(je, { direction: "horizontal", children: [
|
|
9180
9198
|
/* @__PURE__ */ n("span", { title: e.date, children: at(e.date).fromNow() }),
|
|
@@ -9183,9 +9201,9 @@ const cd = (t) => {
|
|
|
9183
9201
|
style: { marginBottom: "5px" }
|
|
9184
9202
|
}
|
|
9185
9203
|
),
|
|
9186
|
-
/* @__PURE__ */ n(
|
|
9204
|
+
/* @__PURE__ */ n(ad, { children: /* @__PURE__ */ n(cd, { text: e.text }) })
|
|
9187
9205
|
] }, e.id);
|
|
9188
|
-
},
|
|
9206
|
+
}, ud = (t) => {
|
|
9189
9207
|
const { value: e } = t, r = (e || []).map((i) => {
|
|
9190
9208
|
if (i.type === "action")
|
|
9191
9209
|
return {
|
|
@@ -9196,27 +9214,27 @@ const cd = (t) => {
|
|
|
9196
9214
|
color: "gray",
|
|
9197
9215
|
position: i.event.isSender ? "left" : "right",
|
|
9198
9216
|
label: i.event.date,
|
|
9199
|
-
children: /* @__PURE__ */ n(
|
|
9217
|
+
children: /* @__PURE__ */ n(dd, { data: i.event })
|
|
9200
9218
|
};
|
|
9201
9219
|
});
|
|
9202
9220
|
return /* @__PURE__ */ n(_n, { mode: "alternate", items: r });
|
|
9203
|
-
},
|
|
9204
|
-
function
|
|
9221
|
+
}, fd = (t) => /* @__PURE__ */ n(ge, { ...t, children: /* @__PURE__ */ n(ud, {}) }), { Content: md } = ei, { Title: hd } = Yt;
|
|
9222
|
+
function pd() {
|
|
9205
9223
|
const { t } = H(he);
|
|
9206
|
-
return /* @__PURE__ */ n(
|
|
9224
|
+
return /* @__PURE__ */ n(md, { className: "m-5 select-none", children: /* @__PURE__ */ n(hd, { level: 5, children: t("welcome") }) });
|
|
9207
9225
|
}
|
|
9208
|
-
function
|
|
9226
|
+
function gd(t, e) {
|
|
9209
9227
|
const { children: r, globalValues: i = {}, rootContext: o = {}, lang: s } = t, [a, l] = b("welcome"), [d, u] = b([
|
|
9210
9228
|
{
|
|
9211
9229
|
title: Fe("welcome", s),
|
|
9212
9230
|
key: "welcome",
|
|
9213
9231
|
closable: !0,
|
|
9214
|
-
content: /* @__PURE__ */ n(
|
|
9232
|
+
content: /* @__PURE__ */ n(pd, {})
|
|
9215
9233
|
}
|
|
9216
9234
|
]), c = de(/* @__PURE__ */ new Map()), f = de();
|
|
9217
9235
|
bt(e, () => ({
|
|
9218
9236
|
retrieveAndOpenAction: h,
|
|
9219
|
-
openShortcut:
|
|
9237
|
+
openShortcut: w
|
|
9220
9238
|
}));
|
|
9221
9239
|
function m(C) {
|
|
9222
9240
|
if (C === a) {
|
|
@@ -9225,7 +9243,7 @@ function pd(t, e) {
|
|
|
9225
9243
|
}
|
|
9226
9244
|
u(d.filter((O) => O.key !== C)), c.current.delete(C);
|
|
9227
9245
|
}
|
|
9228
|
-
function
|
|
9246
|
+
function p({
|
|
9229
9247
|
tabKey: C,
|
|
9230
9248
|
canWeClose: O
|
|
9231
9249
|
}) {
|
|
@@ -9247,7 +9265,7 @@ function pd(t, e) {
|
|
|
9247
9265
|
ze("Action type not supported");
|
|
9248
9266
|
return;
|
|
9249
9267
|
}
|
|
9250
|
-
const [
|
|
9268
|
+
const [v, E] = C.split(","), P = parseInt(E), M = wt({
|
|
9251
9269
|
context: I.context,
|
|
9252
9270
|
values: i,
|
|
9253
9271
|
fields: {}
|
|
@@ -9297,7 +9315,7 @@ function pd(t, e) {
|
|
|
9297
9315
|
title: K,
|
|
9298
9316
|
target: R,
|
|
9299
9317
|
initialView: G,
|
|
9300
|
-
action_type:
|
|
9318
|
+
action_type: v,
|
|
9301
9319
|
action_id: P,
|
|
9302
9320
|
values: O,
|
|
9303
9321
|
forced_values: _,
|
|
@@ -9306,7 +9324,7 @@ function pd(t, e) {
|
|
|
9306
9324
|
limit: ne
|
|
9307
9325
|
});
|
|
9308
9326
|
}
|
|
9309
|
-
function
|
|
9327
|
+
function g({
|
|
9310
9328
|
title: C,
|
|
9311
9329
|
content: O,
|
|
9312
9330
|
key: _,
|
|
@@ -9334,17 +9352,17 @@ function pd(t, e) {
|
|
|
9334
9352
|
const {
|
|
9335
9353
|
res_model: S,
|
|
9336
9354
|
context: I,
|
|
9337
|
-
domain:
|
|
9355
|
+
domain: v,
|
|
9338
9356
|
views: E,
|
|
9339
9357
|
target: P,
|
|
9340
9358
|
string: M,
|
|
9341
9359
|
limit: j
|
|
9342
|
-
} = C, [N, B] = E[0], K = { id: N, type: B }, R =
|
|
9360
|
+
} = C, [N, B] = E[0], K = { id: N, type: B }, R = wt({
|
|
9343
9361
|
context: I,
|
|
9344
9362
|
values: { ..._, ...i },
|
|
9345
9363
|
fields: O
|
|
9346
|
-
}), U =
|
|
9347
|
-
domain:
|
|
9364
|
+
}), U = v ? await D.getHandler().evalDomain({
|
|
9365
|
+
domain: v,
|
|
9348
9366
|
values: Nt({
|
|
9349
9367
|
fields: O,
|
|
9350
9368
|
values: { ..._, ...i }
|
|
@@ -9365,18 +9383,18 @@ function pd(t, e) {
|
|
|
9365
9383
|
limit: j
|
|
9366
9384
|
});
|
|
9367
9385
|
}
|
|
9368
|
-
async function
|
|
9386
|
+
async function w(C) {
|
|
9369
9387
|
const { action_id: O, action_type: _, res_id: A, view_id: x } = C, S = `${_},${O}`, I = await D.getHandler().getActionData({
|
|
9370
9388
|
action: S,
|
|
9371
9389
|
context: o
|
|
9372
|
-
}),
|
|
9390
|
+
}), v = wt({
|
|
9373
9391
|
context: I.context,
|
|
9374
9392
|
values: i,
|
|
9375
9393
|
fields: {}
|
|
9376
9394
|
}), E = I.domain ? await D.getHandler().evalDomain({
|
|
9377
9395
|
domain: I.domain,
|
|
9378
9396
|
values: i,
|
|
9379
|
-
context: { ...o, ...
|
|
9397
|
+
context: { ...o, ...v }
|
|
9380
9398
|
}) : [], {
|
|
9381
9399
|
res_model: P,
|
|
9382
9400
|
views: M,
|
|
@@ -9396,7 +9414,7 @@ function pd(t, e) {
|
|
|
9396
9414
|
model: P,
|
|
9397
9415
|
type: L,
|
|
9398
9416
|
id: k,
|
|
9399
|
-
context: { ...o, ...
|
|
9417
|
+
context: { ...o, ...v }
|
|
9400
9418
|
});
|
|
9401
9419
|
U.push([ee, L]);
|
|
9402
9420
|
}
|
|
@@ -9410,7 +9428,7 @@ function pd(t, e) {
|
|
|
9410
9428
|
const Y = { id: ne, type: X };
|
|
9411
9429
|
F({
|
|
9412
9430
|
domain: E,
|
|
9413
|
-
context: { ...o, ...
|
|
9431
|
+
context: { ...o, ...v },
|
|
9414
9432
|
model: P,
|
|
9415
9433
|
views: U,
|
|
9416
9434
|
title: j,
|
|
@@ -9449,7 +9467,7 @@ function pd(t, e) {
|
|
|
9449
9467
|
title: x,
|
|
9450
9468
|
target: S,
|
|
9451
9469
|
initialView: I,
|
|
9452
|
-
action_id:
|
|
9470
|
+
action_id: v,
|
|
9453
9471
|
action_type: E,
|
|
9454
9472
|
res_id: P,
|
|
9455
9473
|
values: M,
|
|
@@ -9471,7 +9489,7 @@ function pd(t, e) {
|
|
|
9471
9489
|
formView: R,
|
|
9472
9490
|
context: { ...o, ...O },
|
|
9473
9491
|
actionData: {
|
|
9474
|
-
action_id:
|
|
9492
|
+
action_id: v,
|
|
9475
9493
|
action_type: E,
|
|
9476
9494
|
res_id: P,
|
|
9477
9495
|
view_id: R.view_id
|
|
@@ -9479,16 +9497,16 @@ function pd(t, e) {
|
|
|
9479
9497
|
});
|
|
9480
9498
|
} else {
|
|
9481
9499
|
const R = I && Array.isArray(I.id) ? { ...I, id: I.id[0] } : I;
|
|
9482
|
-
|
|
9500
|
+
g({
|
|
9483
9501
|
title: x,
|
|
9484
9502
|
action: {
|
|
9485
|
-
id:
|
|
9503
|
+
id: v,
|
|
9486
9504
|
type: E
|
|
9487
9505
|
},
|
|
9488
9506
|
content: /* @__PURE__ */ n(
|
|
9489
9507
|
Vo,
|
|
9490
9508
|
{
|
|
9491
|
-
action_id:
|
|
9509
|
+
action_id: v,
|
|
9492
9510
|
action_type: E,
|
|
9493
9511
|
tabKey: K,
|
|
9494
9512
|
title: x,
|
|
@@ -9496,7 +9514,7 @@ function pd(t, e) {
|
|
|
9496
9514
|
model: _,
|
|
9497
9515
|
context: { ...o, ...O },
|
|
9498
9516
|
domain: C,
|
|
9499
|
-
setCanWeClose:
|
|
9517
|
+
setCanWeClose: p,
|
|
9500
9518
|
initialView: R,
|
|
9501
9519
|
res_id: P,
|
|
9502
9520
|
formDefaultValues: M,
|
|
@@ -9512,7 +9530,7 @@ function pd(t, e) {
|
|
|
9512
9530
|
return /* @__PURE__ */ n(es, { lang: s, children: /* @__PURE__ */ n(
|
|
9513
9531
|
ma,
|
|
9514
9532
|
{
|
|
9515
|
-
openShortcut:
|
|
9533
|
+
openShortcut: w,
|
|
9516
9534
|
openAction: F,
|
|
9517
9535
|
openRelate: y,
|
|
9518
9536
|
openDefaultActionForModel: T,
|
|
@@ -9538,9 +9556,9 @@ function pd(t, e) {
|
|
|
9538
9556
|
}
|
|
9539
9557
|
) });
|
|
9540
9558
|
}
|
|
9541
|
-
const
|
|
9542
|
-
function
|
|
9543
|
-
const { label: e, onClose: r, tabKey: i, isActive: o, onSelected: s } = t, { token: a } =
|
|
9559
|
+
const ru = vt(gd), { useToken: yd } = Pe;
|
|
9560
|
+
function wd(t) {
|
|
9561
|
+
const { label: e, onClose: r, tabKey: i, isActive: o, onSelected: s } = t, { token: a } = yd(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
|
|
9544
9562
|
return /* @__PURE__ */ V(
|
|
9545
9563
|
"div",
|
|
9546
9564
|
{
|
|
@@ -9610,12 +9628,12 @@ function yd(t) {
|
|
|
9610
9628
|
}
|
|
9611
9629
|
);
|
|
9612
9630
|
}
|
|
9613
|
-
function
|
|
9631
|
+
function ou() {
|
|
9614
9632
|
const t = H(
|
|
9615
9633
|
dt
|
|
9616
9634
|
), { activeKey: e, tabs: r, onRemoveTab: i, onChangeTab: o } = t || {};
|
|
9617
9635
|
return /* @__PURE__ */ n(Q, { children: r.map((s) => /* @__PURE__ */ n(
|
|
9618
|
-
|
|
9636
|
+
wd,
|
|
9619
9637
|
{
|
|
9620
9638
|
tabKey: s.key,
|
|
9621
9639
|
label: s.title,
|
|
@@ -9634,20 +9652,20 @@ function vd(t) {
|
|
|
9634
9652
|
};
|
|
9635
9653
|
return /* @__PURE__ */ n("div", { style: e.key !== i ? o : void 0, children: e.content });
|
|
9636
9654
|
}
|
|
9637
|
-
const
|
|
9638
|
-
function
|
|
9655
|
+
const bd = Qe.memo(vd, () => !0);
|
|
9656
|
+
function iu() {
|
|
9639
9657
|
const t = H(
|
|
9640
9658
|
dt
|
|
9641
|
-
), { tabs: e } = t || {}, r = (e == null ? void 0 : e.map((i) => /* @__PURE__ */ n(
|
|
9659
|
+
), { tabs: e } = t || {}, r = (e == null ? void 0 : e.map((i) => /* @__PURE__ */ n(bd, { tab: i }, i.key))) || null;
|
|
9642
9660
|
return /* @__PURE__ */ n(Q, { children: r });
|
|
9643
9661
|
}
|
|
9644
|
-
const { useToken:
|
|
9662
|
+
const { useToken: Cd } = Pe, su = (t) => {
|
|
9645
9663
|
const {
|
|
9646
9664
|
onRetrieveShortcuts: e,
|
|
9647
9665
|
onCheckIsFavourite: r,
|
|
9648
9666
|
onAddFavourite: i,
|
|
9649
9667
|
onRemoveFavourite: o
|
|
9650
|
-
} = t, [s, a] = b(!1), [l, d] = b(!1), [u, c] = b([]), [f, m] = b(!0), [
|
|
9668
|
+
} = t, [s, a] = b(!1), [l, d] = b(!1), [u, c] = b([]), [f, m] = b(!0), [p, h] = b(), { t: g } = H(he) || {}, { token: y } = Cd(), w = H(
|
|
9651
9669
|
dt
|
|
9652
9670
|
), {
|
|
9653
9671
|
openShortcut: T,
|
|
@@ -9656,11 +9674,11 @@ const { useToken: bd } = Pe, iu = (t) => {
|
|
|
9656
9674
|
currentView: O,
|
|
9657
9675
|
currentId: _,
|
|
9658
9676
|
openDefaultActionForModel: A
|
|
9659
|
-
} =
|
|
9677
|
+
} = w || {};
|
|
9660
9678
|
me(() => {
|
|
9661
9679
|
x();
|
|
9662
9680
|
}, []), me(() => {
|
|
9663
|
-
|
|
9681
|
+
v();
|
|
9664
9682
|
}, [F, C, O, _]);
|
|
9665
9683
|
async function x() {
|
|
9666
9684
|
try {
|
|
@@ -9680,7 +9698,7 @@ const { useToken: bd } = Pe, iu = (t) => {
|
|
|
9680
9698
|
function I(N) {
|
|
9681
9699
|
N && x(), d(N);
|
|
9682
9700
|
}
|
|
9683
|
-
async function
|
|
9701
|
+
async function v() {
|
|
9684
9702
|
if (!O)
|
|
9685
9703
|
return;
|
|
9686
9704
|
const N = F.find((X) => X.key === C), { id: B, type: K } = (N == null ? void 0 : N.action) || {};
|
|
@@ -9704,8 +9722,8 @@ const { useToken: bd } = Pe, iu = (t) => {
|
|
|
9704
9722
|
}
|
|
9705
9723
|
const P = /* @__PURE__ */ V(He, { onClick: S, children: [
|
|
9706
9724
|
/* @__PURE__ */ V("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
9707
|
-
/* @__PURE__ */ n("div", { style: { paddingLeft: 15, color: "#ccc" }, children:
|
|
9708
|
-
/* @__PURE__ */ n("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ n(ht, { title:
|
|
9725
|
+
/* @__PURE__ */ n("div", { style: { paddingLeft: 15, color: "#ccc" }, children: g == null ? void 0 : g("favorites").toUpperCase() }),
|
|
9726
|
+
/* @__PURE__ */ n("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ n(ht, { title: g == null ? void 0 : g("edit_favorites"), children: /* @__PURE__ */ n(
|
|
9709
9727
|
zr,
|
|
9710
9728
|
{
|
|
9711
9729
|
style: { color: y.colorPrimary, cursor: "pointer" },
|
|
@@ -9720,7 +9738,7 @@ const { useToken: bd } = Pe, iu = (t) => {
|
|
|
9720
9738
|
title: N.name,
|
|
9721
9739
|
type: N.view_type
|
|
9722
9740
|
}
|
|
9723
|
-
) }, N.id)) }) : /* @__PURE__ */ n("div", { style: { width: 300, padding: 5, paddingLeft: 15 }, children:
|
|
9741
|
+
) }, N.id)) }) : /* @__PURE__ */ n("div", { style: { width: 300, padding: 5, paddingLeft: 15 }, children: g == null ? void 0 : g("no_favorites") })
|
|
9724
9742
|
] });
|
|
9725
9743
|
function M({ title: N, type: B }) {
|
|
9726
9744
|
return /* @__PURE__ */ V(be, { wrap: !1, children: [
|
|
@@ -9729,8 +9747,8 @@ const { useToken: bd } = Pe, iu = (t) => {
|
|
|
9729
9747
|
] });
|
|
9730
9748
|
}
|
|
9731
9749
|
async function j() {
|
|
9732
|
-
if (s &&
|
|
9733
|
-
await o(
|
|
9750
|
+
if (s && p)
|
|
9751
|
+
await o(p);
|
|
9734
9752
|
else {
|
|
9735
9753
|
if (!O)
|
|
9736
9754
|
return;
|
|
@@ -9786,27 +9804,27 @@ const { useToken: bd } = Pe, iu = (t) => {
|
|
|
9786
9804
|
] });
|
|
9787
9805
|
};
|
|
9788
9806
|
export {
|
|
9789
|
-
|
|
9807
|
+
yc as ActionBar,
|
|
9790
9808
|
Vo as ActionView,
|
|
9791
9809
|
cc as Binary,
|
|
9792
|
-
|
|
9810
|
+
vs as Boolean,
|
|
9793
9811
|
Xr as Button,
|
|
9794
9812
|
os as ButtonGroup,
|
|
9795
9813
|
to as Char,
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9814
|
+
id as CodeEditor,
|
|
9815
|
+
fd as CommentsTimelineField,
|
|
9816
|
+
Rc as ConfigContext,
|
|
9799
9817
|
D as ConnectionProvider,
|
|
9800
9818
|
ga as ContentRootProvider,
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9819
|
+
iu as CurrentTabContent,
|
|
9820
|
+
qc as Dashboard,
|
|
9821
|
+
$c as DashboardGrid,
|
|
9822
|
+
Wc as DashboardGridItem,
|
|
9805
9823
|
nc as Date,
|
|
9806
9824
|
rc as DateTime,
|
|
9807
|
-
|
|
9825
|
+
bc as Email,
|
|
9808
9826
|
tc as ExportModal,
|
|
9809
|
-
|
|
9827
|
+
su as FavouriteButton,
|
|
9810
9828
|
mo as Float,
|
|
9811
9829
|
Bl as FloatTime,
|
|
9812
9830
|
Jt as Form,
|
|
@@ -9817,23 +9835,23 @@ export {
|
|
|
9817
9835
|
rn as Integer,
|
|
9818
9836
|
fn as Label,
|
|
9819
9837
|
cl as Many2one,
|
|
9820
|
-
|
|
9821
|
-
|
|
9838
|
+
Zc as Markdown,
|
|
9839
|
+
zc as MultiCheckbox,
|
|
9822
9840
|
Kl as Notebook,
|
|
9823
9841
|
Pl as One2many,
|
|
9824
9842
|
La as ProgressBar,
|
|
9825
|
-
|
|
9843
|
+
Qc as Radio,
|
|
9826
9844
|
sc as Reference,
|
|
9827
|
-
|
|
9845
|
+
ru as RootView,
|
|
9828
9846
|
ho as SearchFilter,
|
|
9829
|
-
|
|
9830
|
-
|
|
9847
|
+
vo as SearchModal,
|
|
9848
|
+
wo as SearchTree,
|
|
9831
9849
|
no as Selection,
|
|
9832
9850
|
Gl as Separator,
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9851
|
+
rd as Steps,
|
|
9852
|
+
td as Switch,
|
|
9853
|
+
wd as Tab,
|
|
9854
|
+
ou as TabSelector,
|
|
9837
9855
|
Ks as Tag,
|
|
9838
9856
|
Ws as Tags,
|
|
9839
9857
|
jl as Text,
|