@gisce/react-ooui 2.94.0 → 2.94.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context/One2manyContext.d.ts +2 -2
- package/dist/context/One2manyContext.d.ts.map +1 -1
- package/dist/hooks/useErrorNotification.d.ts.map +1 -1
- package/dist/react-ooui.es.js +826 -817
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -1
- package/dist/widgets/base/one2many/useOne2manyDomain.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/react-ooui.es.js
CHANGED
|
@@ -2,8 +2,8 @@ var uc = Object.defineProperty;
|
|
|
2
2
|
var fc = (t, e, n) => e in t ? uc(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var _s = (t, e, n) => (fc(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
4
|
import { jsx as s, jsxs as L, Fragment as ge } from "react/jsx-runtime";
|
|
5
|
-
import Zt, { useContext as me, useState as F, useEffect as
|
|
6
|
-
import { Tooltip as Yt, theme as
|
|
5
|
+
import Zt, { useContext as me, useState as F, useEffect as ae, useRef as J, memo as it, useCallback as _, useMemo as te, forwardRef as Nt, useImperativeHandle as Ht, Fragment as Hn, createContext as pc, createElement as mc } from "react";
|
|
6
|
+
import { Tooltip as Yt, theme as nt, Typography as an, Form as Vt, Row as qe, Col as Ee, Modal as It, Button as We, Dropdown as hc, Menu as Es, Space as ct, Spin as tt, Divider as $r, Input as bt, Select as vn, Checkbox as Kn, Alert as Tt, Timeline as Ni, message as Os, Popover as gc, DatePicker as yc, TimePicker as vc, InputNumber as Vr, Layout as Li, Progress as bc, Avatar as Hi, Tag as Wo, ColorPicker as ji, Badge as sr, Pagination as wc, Empty as Bi, Statistic as Sc, Card as qo, Tabs as Ui, Radio as Ds, Switch as xc, Steps as Ps, Carousel as Cc } from "antd";
|
|
7
7
|
import { Label as jn, Field as Ro, Tree as Wi, Reference as Tc, Selection as Go, Many2one as qi, Boolean as Fc, parseContext as on, graphProcessor as Gi, graphFieldUtils as Ac, Integer as _o, SearchFieldTypes as rn, SearchFilter as Yi, parseContextFields as Ic, parseDomainFields as Rc, parseGraph as zi, Container as _c, Form as Ji, transformDomainForChildWidget as Yo, Button as Ec } from "@gisce/ooui";
|
|
8
8
|
import Oc, { QuestionCircleOutlined as Ki, ExclamationCircleOutlined as Nr, LoadingOutlined as jt, DownOutlined as Lr, CloseOutlined as Bn, CheckOutlined as ir, TranslationOutlined as Qi, FolderOpenOutlined as zo, DownloadOutlined as Jo, ClearOutlined as ar, FormOutlined as Qn, TableOutlined as Ko, AreaChartOutlined as Dc, CalendarOutlined as Pc, FileAddOutlined as Hr, CloseCircleFilled as kc, CopyOutlined as lr, FilterOutlined as Xi, DeleteOutlined as Qo, InfoCircleOutlined as jr, ReloadOutlined as Br, ThunderboltOutlined as Ur, PrinterOutlined as Wr, SearchOutlined as cr, UpOutlined as Mc, ExportOutlined as Zi, EnterOutlined as qr, PlusSquareOutlined as ea, MinusSquareOutlined as ta, StarFilled as $c, StarOutlined as Vc, LeftOutlined as na, RightOutlined as ra, ApiOutlined as Nc, AlignLeftOutlined as Lc, EyeOutlined as Hc, LinkOutlined as ks, SaveOutlined as jc, EditOutlined as oa, PlusOutlined as Bc, BorderOuterOutlined as Uc, SettingOutlined as Wc } from "@ant-design/icons";
|
|
9
9
|
import { Interweave as Gt } from "interweave";
|
|
@@ -24,7 +24,7 @@ import Xo from "react-measure";
|
|
|
24
24
|
import md from "lodash/debounce";
|
|
25
25
|
import { nanoid as Zo } from "nanoid";
|
|
26
26
|
import Oo from "antd/lib/typography/Title";
|
|
27
|
-
import { useDeepCompareEffect as ze, useDeepCompareCallback as Rt, useDeepCompareMemo as
|
|
27
|
+
import { useDeepCompareEffect as ze, useDeepCompareCallback as Rt, useDeepCompareMemo as kn } from "use-deep-compare";
|
|
28
28
|
import { Line as hd, Column as gd, Pie as yd } from "@ant-design/plots";
|
|
29
29
|
import { createRoot as aa } from "react-dom/client";
|
|
30
30
|
import { fileTypeFromBuffer as vd } from "file-type-buffer-browser";
|
|
@@ -275,7 +275,7 @@ lt.extend(Jc);
|
|
|
275
275
|
lt.extend(Kc);
|
|
276
276
|
lt.extend(Qc);
|
|
277
277
|
lt.extend(Xc);
|
|
278
|
-
const { Text: jd, Title: Bd } = an, { useToken: Ud } =
|
|
278
|
+
const { Text: jd, Title: Bd } = an, { useToken: Ud } = nt, Wd = {
|
|
279
279
|
left: "justify-start",
|
|
280
280
|
center: "justify-center",
|
|
281
281
|
right: "justify-end"
|
|
@@ -563,7 +563,7 @@ function zr() {
|
|
|
563
563
|
const [t, e] = F(
|
|
564
564
|
Vs()
|
|
565
565
|
);
|
|
566
|
-
return
|
|
566
|
+
return ae(() => {
|
|
567
567
|
function n() {
|
|
568
568
|
e(Vs());
|
|
569
569
|
}
|
|
@@ -575,18 +575,18 @@ function zr() {
|
|
|
575
575
|
height: t.height
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
|
-
const
|
|
578
|
+
const En = class En {
|
|
579
579
|
static init(e) {
|
|
580
|
-
|
|
580
|
+
En.handler = e;
|
|
581
581
|
}
|
|
582
582
|
static getHandler() {
|
|
583
|
-
if (!
|
|
583
|
+
if (!En.handler)
|
|
584
584
|
throw "Must call init() first with a valid ConnectionProvider instance";
|
|
585
|
-
return
|
|
585
|
+
return En.handler;
|
|
586
586
|
}
|
|
587
587
|
};
|
|
588
|
-
_s(
|
|
589
|
-
let V =
|
|
588
|
+
_s(En, "handler");
|
|
589
|
+
let V = En;
|
|
590
590
|
const ma = (t) => {
|
|
591
591
|
let e, n, r;
|
|
592
592
|
if (!t)
|
|
@@ -615,92 +615,94 @@ const ma = (t) => {
|
|
|
615
615
|
const { open: e, destroy: n } = Zc();
|
|
616
616
|
return {
|
|
617
617
|
showErrorNotification: (o) => {
|
|
618
|
-
if (
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
c.
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
618
|
+
if ((o == null ? void 0 : o.code) !== "ERR_CANCELED") {
|
|
619
|
+
if (typeof o == "object" && o !== null && "type" in o && "title" in o) {
|
|
620
|
+
const i = ["success", "error", "info", "warning"].includes(o.type) ? o.type : "info", a = o.body ? /* @__PURE__ */ s(Gt, { content: o.body.replace(/\n/g, "<br />") }) : "";
|
|
621
|
+
if (i === "warning" || i === "error") {
|
|
622
|
+
const c = o.buttons || [];
|
|
623
|
+
let d;
|
|
624
|
+
const f = c.length > 0 ? /* @__PURE__ */ s(qe, { justify: "end", style: { marginTop: 16 }, children: /* @__PURE__ */ L(ct, { children: [
|
|
625
|
+
c.map((p) => /* @__PURE__ */ s(
|
|
626
|
+
We,
|
|
627
|
+
{
|
|
628
|
+
icon: /* @__PURE__ */ s(Eo, { icon: p.icon }),
|
|
629
|
+
size: "small",
|
|
630
|
+
onClick: () => {
|
|
631
|
+
t == null || t(p.action), d == null || d.destroy();
|
|
632
|
+
},
|
|
633
|
+
children: p.name
|
|
631
634
|
},
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
635
|
+
p.name
|
|
636
|
+
)),
|
|
637
|
+
/* @__PURE__ */ s(
|
|
638
|
+
We,
|
|
639
|
+
{
|
|
640
|
+
type: "primary",
|
|
641
|
+
icon: /* @__PURE__ */ s(Eo, { icon: "check" }),
|
|
642
|
+
size: "small",
|
|
643
|
+
onClick: () => {
|
|
644
|
+
var p;
|
|
645
|
+
(p = o.onOk) == null || p.call(o), d == null || d.destroy();
|
|
646
|
+
},
|
|
647
|
+
children: "OK"
|
|
645
648
|
},
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
)
|
|
650
|
-
|
|
651
|
-
|
|
649
|
+
"ok"
|
|
650
|
+
)
|
|
651
|
+
] }) }) : void 0;
|
|
652
|
+
d = (i === "error" ? It.error : It.warning)({
|
|
653
|
+
title: o.title,
|
|
654
|
+
content: a,
|
|
655
|
+
centered: !0,
|
|
656
|
+
footer: f,
|
|
657
|
+
onOk: o.onOk
|
|
658
|
+
});
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
const l = {
|
|
652
662
|
title: o.title,
|
|
653
|
-
|
|
663
|
+
message: a,
|
|
664
|
+
type: i,
|
|
665
|
+
onButtonClick: (c) => {
|
|
666
|
+
t == null || t(c), n();
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
e(l);
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
if (typeof o == "object" && o !== null && (typeof o.message == "string" || typeof o.exception == "string")) {
|
|
673
|
+
const i = ma(
|
|
674
|
+
o.message || o.exception
|
|
675
|
+
);
|
|
676
|
+
It.error({
|
|
677
|
+
title: i.title,
|
|
678
|
+
content: /* @__PURE__ */ s(Gt, { content: i.message.replace(/\n/g, "<br />") }),
|
|
679
|
+
centered: !0,
|
|
680
|
+
onOk: o.onOk
|
|
681
|
+
});
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
if (typeof o == "string") {
|
|
685
|
+
It.error({
|
|
686
|
+
title: "Error",
|
|
687
|
+
content: /* @__PURE__ */ s(Gt, { content: o }),
|
|
654
688
|
centered: !0,
|
|
655
|
-
footer: f,
|
|
656
689
|
onOk: o.onOk
|
|
657
690
|
});
|
|
658
691
|
return;
|
|
659
692
|
}
|
|
660
|
-
const l = {
|
|
661
|
-
title: o.title,
|
|
662
|
-
message: a,
|
|
663
|
-
type: i,
|
|
664
|
-
onButtonClick: (c) => {
|
|
665
|
-
t == null || t(c), n();
|
|
666
|
-
}
|
|
667
|
-
};
|
|
668
|
-
e(l);
|
|
669
|
-
return;
|
|
670
|
-
}
|
|
671
|
-
if (typeof o == "object" && o !== null && (typeof o.message == "string" || typeof o.exception == "string")) {
|
|
672
|
-
const i = ma(
|
|
673
|
-
o.message || o.exception
|
|
674
|
-
);
|
|
675
|
-
It.error({
|
|
676
|
-
title: i.title,
|
|
677
|
-
content: /* @__PURE__ */ s(Gt, { content: i.message.replace(/\n/g, "<br />") }),
|
|
678
|
-
centered: !0,
|
|
679
|
-
onOk: o.onOk
|
|
680
|
-
});
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
if (typeof o == "string") {
|
|
684
693
|
It.error({
|
|
685
694
|
title: "Error",
|
|
686
|
-
content: /* @__PURE__ */ s(Gt, { content: o }),
|
|
695
|
+
content: /* @__PURE__ */ s(Gt, { content: JSON.stringify(o) }),
|
|
687
696
|
centered: !0,
|
|
688
697
|
onOk: o.onOk
|
|
689
698
|
});
|
|
690
|
-
return;
|
|
691
699
|
}
|
|
692
|
-
It.error({
|
|
693
|
-
title: "Error",
|
|
694
|
-
content: /* @__PURE__ */ s(Gt, { content: JSON.stringify(o) }),
|
|
695
|
-
centered: !0,
|
|
696
|
-
onOk: o.onOk
|
|
697
|
-
});
|
|
698
700
|
},
|
|
699
701
|
destroyErrorNotification: n
|
|
700
702
|
};
|
|
701
703
|
}, ha = (t) => {
|
|
702
704
|
const { visible: e, onCloseModal: n, model: r, id: o, field: i, onSubmitSucceed: a } = t, { modalWidth: l } = zr(), { t: c } = ye(), [d, f] = F([]), [u, p] = F(!1), [m, g] = F(!1), [h, y] = F({}), v = J(), { showErrorNotification: b } = ht();
|
|
703
|
-
|
|
705
|
+
ae(() => {
|
|
704
706
|
e ? w() : y({});
|
|
705
707
|
}, [e]);
|
|
706
708
|
async function w() {
|
|
@@ -775,7 +777,7 @@ const ma = (t) => {
|
|
|
775
777
|
g(!1), a();
|
|
776
778
|
}
|
|
777
779
|
function O() {
|
|
778
|
-
return u ? /* @__PURE__ */ s(
|
|
780
|
+
return u ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ L(ge, { children: [
|
|
779
781
|
P(),
|
|
780
782
|
/* @__PURE__ */ s($r, {}),
|
|
781
783
|
/* @__PURE__ */ s(qe, { justify: "end", children: /* @__PURE__ */ L(ct, { children: [
|
|
@@ -828,12 +830,12 @@ const { info: Jd } = It, hn = (t) => {
|
|
|
828
830
|
centered: !0,
|
|
829
831
|
content: t
|
|
830
832
|
});
|
|
831
|
-
}, { useToken: Kd } =
|
|
833
|
+
}, { useToken: Kd } = nt, Jr = it(({ content: t }) => {
|
|
832
834
|
const { token: e } = Kd();
|
|
833
835
|
return /* @__PURE__ */ s("div", { style: { color: e.colorTextDisabled }, children: t });
|
|
834
836
|
});
|
|
835
837
|
Jr.displayName = "AddonElement";
|
|
836
|
-
const { defaultAlgorithm: Qd, defaultSeed: Xd } =
|
|
838
|
+
const { defaultAlgorithm: Qd, defaultSeed: Xd } = nt, ns = Qd(Xd), Xn = it(
|
|
837
839
|
({
|
|
838
840
|
component: t,
|
|
839
841
|
ooui: e,
|
|
@@ -1015,7 +1017,7 @@ const Zd = xt(bt)`
|
|
|
1015
1017
|
&.ant-input-affix-wrapper {
|
|
1016
1018
|
background-color: ${ns.colorPrimaryBg};
|
|
1017
1019
|
}
|
|
1018
|
-
`, { defaultAlgorithm: nu, defaultSeed: ru } =
|
|
1020
|
+
`, { defaultAlgorithm: nu, defaultSeed: ru } = nt, ou = nu(ru), { Option: su } = vn, wa = (t) => {
|
|
1019
1021
|
const { ooui: e } = t, { required: n } = e;
|
|
1020
1022
|
return /* @__PURE__ */ s(Le, { required: n, type: "any", ...t, children: /* @__PURE__ */ s(Sa, { ...t }) });
|
|
1021
1023
|
}, Sa = (t) => {
|
|
@@ -1024,7 +1026,7 @@ const Zd = xt(bt)`
|
|
|
1024
1026
|
return /* @__PURE__ */ s(su, { value: u, children: p }, u);
|
|
1025
1027
|
});
|
|
1026
1028
|
return /* @__PURE__ */ s(
|
|
1027
|
-
a && !i ? iu :
|
|
1029
|
+
a && !i ? iu : vn,
|
|
1028
1030
|
{
|
|
1029
1031
|
disabled: i,
|
|
1030
1032
|
onChange: n,
|
|
@@ -1036,11 +1038,11 @@ const Zd = xt(bt)`
|
|
|
1036
1038
|
children: c
|
|
1037
1039
|
}
|
|
1038
1040
|
);
|
|
1039
|
-
}, iu = xt(
|
|
1041
|
+
}, iu = xt(vn)`
|
|
1040
1042
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
1041
1043
|
background-color: ${ou.colorPrimaryBg};
|
|
1042
1044
|
}
|
|
1043
|
-
`, { defaultAlgorithm: au, defaultSeed: lu } =
|
|
1045
|
+
`, { defaultAlgorithm: au, defaultSeed: lu } = nt, Ns = au(lu), cu = (t) => {
|
|
1044
1046
|
const { ooui: e } = t, { id: n, readOnly: r, required: o } = e;
|
|
1045
1047
|
return /* @__PURE__ */ s(Le, { ...t, valuePropName: "checked", children: /* @__PURE__ */ s(du, { id: n, readOnly: r, required: o }) });
|
|
1046
1048
|
}, du = (t) => {
|
|
@@ -1059,7 +1061,7 @@ function fu(t) {
|
|
|
1059
1061
|
const n = Buffer.from(t, "base64").length / 1e3;
|
|
1060
1062
|
return `${Math.round((n + Number.EPSILON) * 100) / 100} KB`;
|
|
1061
1063
|
}
|
|
1062
|
-
async function
|
|
1064
|
+
async function Mn(t) {
|
|
1063
1065
|
const e = await vd(
|
|
1064
1066
|
Buffer.from(t, "base64")
|
|
1065
1067
|
);
|
|
@@ -1099,7 +1101,7 @@ const rs = (t) => {
|
|
|
1099
1101
|
r == null || r(u);
|
|
1100
1102
|
};
|
|
1101
1103
|
async function c() {
|
|
1102
|
-
const u = await
|
|
1104
|
+
const u = await Mn(n), p = `data:${u == null ? void 0 : u.mime};base64,${n}`, m = document.createElement("a");
|
|
1103
1105
|
m.href = p, m.download = `image.${u == null ? void 0 : u.ext}`, m.click();
|
|
1104
1106
|
}
|
|
1105
1107
|
async function d(u) {
|
|
@@ -1226,7 +1228,7 @@ const os = (t, e, n, r = !1) => t.columns.map((i) => {
|
|
|
1226
1228
|
}
|
|
1227
1229
|
}), o;
|
|
1228
1230
|
});
|
|
1229
|
-
function
|
|
1231
|
+
function $n(t) {
|
|
1230
1232
|
return Ca(t, "colors");
|
|
1231
1233
|
}
|
|
1232
1234
|
function Ar(t) {
|
|
@@ -1240,7 +1242,7 @@ function Ca(t, e) {
|
|
|
1240
1242
|
n[r.id] = r[e];
|
|
1241
1243
|
}), n;
|
|
1242
1244
|
}
|
|
1243
|
-
function
|
|
1245
|
+
function On({
|
|
1244
1246
|
resultsToSort: t,
|
|
1245
1247
|
sorter: e,
|
|
1246
1248
|
fields: n
|
|
@@ -1311,7 +1313,7 @@ const ss = async (t) => {
|
|
|
1311
1313
|
colors: y
|
|
1312
1314
|
}
|
|
1313
1315
|
});
|
|
1314
|
-
u = v[0], p =
|
|
1316
|
+
u = v[0], p = $n(v[1]);
|
|
1315
1317
|
} else
|
|
1316
1318
|
u = await V.getHandler().readObjects({
|
|
1317
1319
|
model: n,
|
|
@@ -1431,7 +1433,7 @@ const xu = ({
|
|
|
1431
1433
|
});
|
|
1432
1434
|
return {
|
|
1433
1435
|
items: sn(i, a[0]),
|
|
1434
|
-
colors:
|
|
1436
|
+
colors: $n(a[1]),
|
|
1435
1437
|
status: Ar(a[1])
|
|
1436
1438
|
};
|
|
1437
1439
|
}, Iu = (t, e) => {
|
|
@@ -1448,7 +1450,7 @@ const xu = ({
|
|
|
1448
1450
|
} else
|
|
1449
1451
|
n[r] = t[r];
|
|
1450
1452
|
}), n;
|
|
1451
|
-
},
|
|
1453
|
+
}, Rn = (t, e) => Iu(t, e), io = ({
|
|
1452
1454
|
source: t,
|
|
1453
1455
|
target: e,
|
|
1454
1456
|
fields: n
|
|
@@ -1526,7 +1528,7 @@ const xu = ({
|
|
|
1526
1528
|
} else
|
|
1527
1529
|
r[o] = !1;
|
|
1528
1530
|
}), r;
|
|
1529
|
-
},
|
|
1531
|
+
}, Vn = (t) => {
|
|
1530
1532
|
const e = {
|
|
1531
1533
|
primary: [],
|
|
1532
1534
|
secondary: []
|
|
@@ -1545,7 +1547,7 @@ const xu = ({
|
|
|
1545
1547
|
function Hs(t, e, n) {
|
|
1546
1548
|
return n.indexOf(t) === e;
|
|
1547
1549
|
}
|
|
1548
|
-
const
|
|
1550
|
+
const bn = ({
|
|
1549
1551
|
values: t,
|
|
1550
1552
|
fields: e
|
|
1551
1553
|
}) => {
|
|
@@ -1606,7 +1608,7 @@ const wn = ({
|
|
|
1606
1608
|
a(!1);
|
|
1607
1609
|
}
|
|
1608
1610
|
};
|
|
1609
|
-
return i ? /* @__PURE__ */ s(
|
|
1611
|
+
return i ? /* @__PURE__ */ s(tt, {}) : l ? (console.error(l), /* @__PURE__ */ s(Tt, { className: "mt-10", message: l, type: "error", banner: !0 })) : /* @__PURE__ */ s(Le, { type: "array", ...t, children: /* @__PURE__ */ s($u, { ooui: e, views: d }) });
|
|
1610
1612
|
}, $u = (t) => {
|
|
1611
1613
|
const { value: e, views: n, ooui: r, onChange: o } = t, { items: i = [] } = e || {}, [a, l] = F(!1), [c, d] = F(), [f, u] = F(!1), [p, m] = F(), {
|
|
1612
1614
|
relation: g,
|
|
@@ -1651,7 +1653,7 @@ const wn = ({
|
|
|
1651
1653
|
if (c)
|
|
1652
1654
|
return console.error(c), /* @__PURE__ */ s(Tt, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
1653
1655
|
if (a)
|
|
1654
|
-
return /* @__PURE__ */ s(
|
|
1656
|
+
return /* @__PURE__ */ s(tt, {});
|
|
1655
1657
|
const k = (S) => {
|
|
1656
1658
|
const E = Ot(S);
|
|
1657
1659
|
return E && /* @__PURE__ */ s(E, {});
|
|
@@ -2235,7 +2237,7 @@ const Uu = (t) => {
|
|
|
2235
2237
|
justifyContent: "center",
|
|
2236
2238
|
alignItems: "center"
|
|
2237
2239
|
},
|
|
2238
|
-
children: /* @__PURE__ */ s(
|
|
2240
|
+
children: /* @__PURE__ */ s(tt, {})
|
|
2239
2241
|
}
|
|
2240
2242
|
), Ea = ({
|
|
2241
2243
|
error: t,
|
|
@@ -2265,7 +2267,7 @@ const Uu = (t) => {
|
|
|
2265
2267
|
);
|
|
2266
2268
|
}, _e = (t) => {
|
|
2267
2269
|
const e = J(/* @__PURE__ */ new Map());
|
|
2268
|
-
|
|
2270
|
+
ae(() => () => {
|
|
2269
2271
|
n();
|
|
2270
2272
|
}, []);
|
|
2271
2273
|
const n = _((o) => {
|
|
@@ -2475,7 +2477,7 @@ const { getValueForOperator: Bs } = Gi, Gu = (t) => {
|
|
|
2475
2477
|
), [I] = _e(
|
|
2476
2478
|
V.getHandler().parseCondition
|
|
2477
2479
|
);
|
|
2478
|
-
|
|
2480
|
+
ae(() => {
|
|
2479
2481
|
j();
|
|
2480
2482
|
}, [e, o]);
|
|
2481
2483
|
async function M({
|
|
@@ -3316,7 +3318,7 @@ function Va(t) {
|
|
|
3316
3318
|
}
|
|
3317
3319
|
);
|
|
3318
3320
|
}
|
|
3319
|
-
const { useToken: bf } =
|
|
3321
|
+
const { useToken: bf } = nt;
|
|
3320
3322
|
function Na(t) {
|
|
3321
3323
|
const { badgeNumber: e = 0, ...n } = t, { token: r } = bf();
|
|
3322
3324
|
return /* @__PURE__ */ L("div", { style: { position: "relative" }, children: [
|
|
@@ -3374,7 +3376,7 @@ function wf(t) {
|
|
|
3374
3376
|
const g = m.search;
|
|
3375
3377
|
d.current = g, e(g);
|
|
3376
3378
|
}
|
|
3377
|
-
|
|
3379
|
+
ae(() => {
|
|
3378
3380
|
!c.current && r !== d.current && (d.current = r, i.setFieldsValue({ search: r }), l(r ? r.length > 0 : !1));
|
|
3379
3381
|
}, [r, i]);
|
|
3380
3382
|
function u() {
|
|
@@ -3436,7 +3438,7 @@ const dw = Object.values(Dt), Bt = Zt.createContext(null), Sf = (t) => {
|
|
|
3436
3438
|
onRemoveTab: c,
|
|
3437
3439
|
tabs: d
|
|
3438
3440
|
} = t, [f, u] = F(), [p, m] = F(), g = te(() => d.find((v) => v.key === a), [d, a]), { title: h } = zt(), y = te(() => !((d == null ? void 0 : d.length) > 0), [d]);
|
|
3439
|
-
return
|
|
3441
|
+
return ae(() => {
|
|
3440
3442
|
y && (document.title = h, window.history.replaceState({}, "", "/"));
|
|
3441
3443
|
}, [y, h]), /* @__PURE__ */ s(
|
|
3442
3444
|
Bt.Provider,
|
|
@@ -3463,7 +3465,7 @@ const dw = Object.values(Dt), Bt = Zt.createContext(null), Sf = (t) => {
|
|
|
3463
3465
|
function fr() {
|
|
3464
3466
|
return me(Bt) || {};
|
|
3465
3467
|
}
|
|
3466
|
-
const
|
|
3468
|
+
const wn = Zt.createContext(null), zs = async (t) => {
|
|
3467
3469
|
var e;
|
|
3468
3470
|
for (let n = 0; n < t.length; n++)
|
|
3469
3471
|
await ((e = t == null ? void 0 : t[n]) == null ? void 0 : e.call(t));
|
|
@@ -3475,7 +3477,7 @@ const Sn = Zt.createContext(null), zs = async (t) => {
|
|
|
3475
3477
|
), [g, h] = _e(
|
|
3476
3478
|
V.getHandler().logAction
|
|
3477
3479
|
);
|
|
3478
|
-
|
|
3480
|
+
ae(() => () => {
|
|
3479
3481
|
h();
|
|
3480
3482
|
}, []), Ht(e, () => ({
|
|
3481
3483
|
openActionModal: O,
|
|
@@ -3508,7 +3510,7 @@ const Sn = Zt.createContext(null), zs = async (t) => {
|
|
|
3508
3510
|
values: D
|
|
3509
3511
|
}) : M;
|
|
3510
3512
|
try {
|
|
3511
|
-
const
|
|
3513
|
+
const q = await V.getHandler().createReport({
|
|
3512
3514
|
model: $,
|
|
3513
3515
|
name: N,
|
|
3514
3516
|
datas: j,
|
|
@@ -3516,10 +3518,10 @@ const Sn = Zt.createContext(null), zs = async (t) => {
|
|
|
3516
3518
|
context: { ...I, ...K }
|
|
3517
3519
|
});
|
|
3518
3520
|
l(!0), i.current = !0, o.current = setInterval(() => {
|
|
3519
|
-
x(
|
|
3521
|
+
x(q);
|
|
3520
3522
|
}, 1e3);
|
|
3521
|
-
} catch (
|
|
3522
|
-
i.current = !1, clearInterval(o.current), p(
|
|
3523
|
+
} catch (q) {
|
|
3524
|
+
i.current = !1, clearInterval(o.current), p(q), l(!1);
|
|
3523
3525
|
}
|
|
3524
3526
|
}
|
|
3525
3527
|
async function x(T) {
|
|
@@ -3529,7 +3531,7 @@ const Sn = Zt.createContext(null), zs = async (t) => {
|
|
|
3529
3531
|
id: T
|
|
3530
3532
|
}), S.state && i.current === !0) {
|
|
3531
3533
|
i.current = !1, clearInterval(o.current), l(!1);
|
|
3532
|
-
const E = await
|
|
3534
|
+
const E = await Mn(S.result);
|
|
3533
3535
|
Kr(S.result, E.mime);
|
|
3534
3536
|
}
|
|
3535
3537
|
} catch (E) {
|
|
@@ -3590,7 +3592,7 @@ const Sn = Zt.createContext(null), zs = async (t) => {
|
|
|
3590
3592
|
const H = I.domain;
|
|
3591
3593
|
if (I.domain && (N = await V.getHandler().evalDomain({
|
|
3592
3594
|
domain: I.domain,
|
|
3593
|
-
values:
|
|
3595
|
+
values: bn({
|
|
3594
3596
|
fields: S,
|
|
3595
3597
|
values: { ...E, ...r }
|
|
3596
3598
|
}),
|
|
@@ -3683,7 +3685,7 @@ const Sn = Zt.createContext(null), zs = async (t) => {
|
|
|
3683
3685
|
});
|
|
3684
3686
|
}
|
|
3685
3687
|
return /* @__PURE__ */ s(ge, { children: /* @__PURE__ */ s(
|
|
3686
|
-
|
|
3688
|
+
wn.Provider,
|
|
3687
3689
|
{
|
|
3688
3690
|
value: {
|
|
3689
3691
|
processAction: P,
|
|
@@ -3701,7 +3703,7 @@ const Sn = Zt.createContext(null), zs = async (t) => {
|
|
|
3701
3703
|
closable: !1,
|
|
3702
3704
|
centered: !0,
|
|
3703
3705
|
maskClosable: !1,
|
|
3704
|
-
children: /* @__PURE__ */ s(
|
|
3706
|
+
children: /* @__PURE__ */ s(tt, {})
|
|
3705
3707
|
}
|
|
3706
3708
|
),
|
|
3707
3709
|
/* @__PURE__ */ s(
|
|
@@ -3786,7 +3788,7 @@ const Tf = Nt(xf), La = ({
|
|
|
3786
3788
|
onRefreshParentValues: e
|
|
3787
3789
|
}) => {
|
|
3788
3790
|
const n = me(
|
|
3789
|
-
|
|
3791
|
+
wn
|
|
3790
3792
|
), { processAction: r } = n || {};
|
|
3791
3793
|
return _(
|
|
3792
3794
|
(o, i = {}) => {
|
|
@@ -3922,7 +3924,7 @@ function Qr({ res_id: t, searchParams: e }) {
|
|
|
3922
3924
|
const n = J(null), { currentView: r, limit: o, currentPage: i, order: a } = ln(), l = {
|
|
3923
3925
|
id: r.view_id,
|
|
3924
3926
|
type: r.type
|
|
3925
|
-
}, { token: c } =
|
|
3927
|
+
}, { token: c } = nt.useToken(), { t: d } = ye(), [f, u] = F(!1), { currentTab: p } = fr(), m = _(
|
|
3926
3928
|
(A) => {
|
|
3927
3929
|
try {
|
|
3928
3930
|
const x = document.createElement("textarea");
|
|
@@ -4036,9 +4038,9 @@ function Df({
|
|
|
4036
4038
|
} = me(_t), M = en(
|
|
4037
4039
|
Dt.FEATURE_ADVANCED_EXPORT
|
|
4038
4040
|
), { t: $ } = ye(), [j, N] = F(!1), H = J(!0), { showErrorNotification: B } = ht(), U = _(() => {
|
|
4039
|
-
var
|
|
4040
|
-
(
|
|
4041
|
-
}, [m]), { actionButtonProps: K, printButtonProps:
|
|
4041
|
+
var Y;
|
|
4042
|
+
(Y = m == null ? void 0 : m.current) == null || Y.refreshResults();
|
|
4043
|
+
}, [m]), { actionButtonProps: K, printButtonProps: q } = Ha({
|
|
4042
4044
|
toolbar: n,
|
|
4043
4045
|
model: p,
|
|
4044
4046
|
disabled: x,
|
|
@@ -4052,7 +4054,7 @@ function Df({
|
|
|
4052
4054
|
() => A !== void 0 && A.trim().length > 0,
|
|
4053
4055
|
[A]
|
|
4054
4056
|
), Q = te(() => Xt(r || [], y || []), [r, y]), re = _(async () => {
|
|
4055
|
-
var
|
|
4057
|
+
var Y;
|
|
4056
4058
|
try {
|
|
4057
4059
|
u == null || u(!0);
|
|
4058
4060
|
const le = l[0].id;
|
|
@@ -4060,7 +4062,7 @@ function Df({
|
|
|
4060
4062
|
id: le,
|
|
4061
4063
|
model: p,
|
|
4062
4064
|
context: { ...t }
|
|
4063
|
-
}) && ((
|
|
4065
|
+
}) && ((Y = m == null ? void 0 : m.current) == null || Y.refreshResults());
|
|
4064
4066
|
} catch (le) {
|
|
4065
4067
|
B(le);
|
|
4066
4068
|
} finally {
|
|
@@ -4073,14 +4075,14 @@ function Df({
|
|
|
4073
4075
|
l,
|
|
4074
4076
|
u,
|
|
4075
4077
|
B
|
|
4076
|
-
]),
|
|
4077
|
-
var
|
|
4078
|
+
]), G = _(async () => {
|
|
4079
|
+
var Y;
|
|
4078
4080
|
try {
|
|
4079
4081
|
c == null || c(!0), await V.getHandler().deleteObjects({
|
|
4080
4082
|
model: p,
|
|
4081
4083
|
ids: l.map((le) => le.id),
|
|
4082
4084
|
context: { ...t }
|
|
4083
|
-
}), g == null || g(void 0), h == null || h(void 0), (
|
|
4085
|
+
}), g == null || g(void 0), h == null || h(void 0), (Y = m == null ? void 0 : m.current) == null || Y.refreshResults();
|
|
4084
4086
|
} catch (le) {
|
|
4085
4087
|
B(le);
|
|
4086
4088
|
} finally {
|
|
@@ -4096,13 +4098,13 @@ function Df({
|
|
|
4096
4098
|
c,
|
|
4097
4099
|
B
|
|
4098
4100
|
]), oe = _(
|
|
4099
|
-
(
|
|
4100
|
-
P == null || P(i), a == null || a(
|
|
4101
|
+
(Y) => {
|
|
4102
|
+
P == null || P(i), a == null || a(Y);
|
|
4101
4103
|
},
|
|
4102
4104
|
[i, P, a]
|
|
4103
|
-
),
|
|
4104
|
-
(
|
|
4105
|
-
|
|
4105
|
+
), ie = _(
|
|
4106
|
+
(Y) => {
|
|
4107
|
+
Y !== A && (Y && Y.trim().length > 0 && !A && (E == null || E([]), D == null || D({})), w == null || w(Y), A !== void 0 && setTimeout(() => {
|
|
4106
4108
|
var le;
|
|
4107
4109
|
(le = m == null ? void 0 : m.current) == null || le.refreshResults();
|
|
4108
4110
|
}, 50));
|
|
@@ -4115,8 +4117,8 @@ function Df({
|
|
|
4115
4117
|
m
|
|
4116
4118
|
]
|
|
4117
4119
|
), X = _(
|
|
4118
|
-
(
|
|
4119
|
-
if (
|
|
4120
|
+
(Y) => {
|
|
4121
|
+
if (Y.id === "print_screen") {
|
|
4120
4122
|
let le = (l == null ? void 0 : l.map((ve) => ve.id)) || [];
|
|
4121
4123
|
le.length === 0 && (le = (O == null ? void 0 : O.map((ve) => ve.id)) || []), se(
|
|
4122
4124
|
{
|
|
@@ -4137,15 +4139,15 @@ function Df({
|
|
|
4137
4139
|
},
|
|
4138
4140
|
[p, t, O, se, l]
|
|
4139
4141
|
);
|
|
4140
|
-
|
|
4142
|
+
ae(() => {
|
|
4141
4143
|
if (S === "infinite" && A === void 0) {
|
|
4142
4144
|
if (H.current) {
|
|
4143
4145
|
H.current = !1;
|
|
4144
4146
|
return;
|
|
4145
4147
|
}
|
|
4146
4148
|
setTimeout(() => {
|
|
4147
|
-
var
|
|
4148
|
-
(
|
|
4149
|
+
var Y;
|
|
4150
|
+
(Y = m == null ? void 0 : m.current) == null || Y.refreshResults();
|
|
4149
4151
|
}, 0);
|
|
4150
4152
|
}
|
|
4151
4153
|
}, [S, A, m]), mn(
|
|
@@ -4173,12 +4175,12 @@ function Df({
|
|
|
4173
4175
|
Qt({
|
|
4174
4176
|
confirmMessage: $("confirmRemove"),
|
|
4175
4177
|
t: $,
|
|
4176
|
-
onOk:
|
|
4178
|
+
onOk: G
|
|
4177
4179
|
});
|
|
4178
|
-
}, [
|
|
4180
|
+
}, [G, $]);
|
|
4179
4181
|
return /* @__PURE__ */ L(ct, { wrap: !0, children: [
|
|
4180
4182
|
x && /* @__PURE__ */ L(ge, { children: [
|
|
4181
|
-
/* @__PURE__ */ s(
|
|
4183
|
+
/* @__PURE__ */ s(tt, {}),
|
|
4182
4184
|
/* @__PURE__ */ s(mt, {}),
|
|
4183
4185
|
/* @__PURE__ */ s(mt, {})
|
|
4184
4186
|
] }),
|
|
@@ -4188,7 +4190,7 @@ function Df({
|
|
|
4188
4190
|
{
|
|
4189
4191
|
disabled: f || d || x,
|
|
4190
4192
|
searchText: A,
|
|
4191
|
-
onSearch:
|
|
4193
|
+
onSearch: ie
|
|
4192
4194
|
}
|
|
4193
4195
|
),
|
|
4194
4196
|
/* @__PURE__ */ s(
|
|
@@ -4264,7 +4266,7 @@ function Df({
|
|
|
4264
4266
|
] }),
|
|
4265
4267
|
/* @__PURE__ */ s(mt, {}),
|
|
4266
4268
|
/* @__PURE__ */ s(Jt, { icon: /* @__PURE__ */ s(Ur, {}), ...K }),
|
|
4267
|
-
/* @__PURE__ */ s(Jt, { icon: /* @__PURE__ */ s(Wr, {}), ...
|
|
4269
|
+
/* @__PURE__ */ s(Jt, { icon: /* @__PURE__ */ s(Wr, {}), ...q }),
|
|
4268
4270
|
M && /* @__PURE__ */ L(ge, { children: [
|
|
4269
4271
|
/* @__PURE__ */ s(mt, {}),
|
|
4270
4272
|
/* @__PURE__ */ s(
|
|
@@ -4337,7 +4339,7 @@ const Pf = it(Df), Ua = it(() => /* @__PURE__ */ s(
|
|
|
4337
4339
|
}
|
|
4338
4340
|
));
|
|
4339
4341
|
Ua.displayName = "ExportIcon";
|
|
4340
|
-
const { useToken: kf } =
|
|
4342
|
+
const { useToken: kf } = nt, { Title: Mf, Text: wr } = an, Xr = ({
|
|
4341
4343
|
title: t,
|
|
4342
4344
|
children: e,
|
|
4343
4345
|
showSummary: n = !0
|
|
@@ -4488,7 +4490,7 @@ const { useToken: kf } = tt, { Title: Mf, Text: wr } = an, Xr = ({
|
|
|
4488
4490
|
dependencies: n = []
|
|
4489
4491
|
}) => {
|
|
4490
4492
|
const [r, o] = F(0);
|
|
4491
|
-
return
|
|
4493
|
+
return ae(() => {
|
|
4492
4494
|
const a = () => {
|
|
4493
4495
|
if (t.current) {
|
|
4494
4496
|
const l = window.innerHeight, c = t.current.getBoundingClientRect(), d = l - c.top;
|
|
@@ -4511,7 +4513,7 @@ const { useToken: kf } = tt, { Title: Mf, Text: wr } = an, Xr = ({
|
|
|
4511
4513
|
);
|
|
4512
4514
|
return { getColumnState: e, updateColumnState: n };
|
|
4513
4515
|
}, Vf = (t) => {
|
|
4514
|
-
|
|
4516
|
+
ae(() => () => {
|
|
4515
4517
|
n(), o();
|
|
4516
4518
|
}, []);
|
|
4517
4519
|
const [e, n] = _e(
|
|
@@ -4598,7 +4600,7 @@ const { useToken: kf } = tt, { Title: Mf, Text: wr } = an, Xr = ({
|
|
|
4598
4600
|
return o.current;
|
|
4599
4601
|
}
|
|
4600
4602
|
}, [a, e]);
|
|
4601
|
-
|
|
4603
|
+
ae(() => {
|
|
4602
4604
|
if (!t) {
|
|
4603
4605
|
r(!1);
|
|
4604
4606
|
return;
|
|
@@ -4624,7 +4626,7 @@ const { useToken: kf } = tt, { Title: Mf, Text: wr } = an, Xr = ({
|
|
|
4624
4626
|
}) => {
|
|
4625
4627
|
const [o, i] = F(), [a, l] = F(!1), [c, d] = _e(
|
|
4626
4628
|
V.getHandler().readAggregates
|
|
4627
|
-
), f =
|
|
4629
|
+
), f = kn(() => {
|
|
4628
4630
|
if (t)
|
|
4629
4631
|
return t.columns.filter((m) => Object.keys(m).some((g) => {
|
|
4630
4632
|
var h;
|
|
@@ -4897,7 +4899,7 @@ const { useToken: kf } = tt, { Title: Mf, Text: wr } = an, Xr = ({
|
|
|
4897
4899
|
}
|
|
4898
4900
|
) })
|
|
4899
4901
|
] });
|
|
4900
|
-
}, { defaultAlgorithm: qf, defaultSeed: Gf } =
|
|
4902
|
+
}, { defaultAlgorithm: qf, defaultSeed: Gf } = nt, Yf = qf(Gf), ps = it((t) => {
|
|
4901
4903
|
const { ooui: e } = t, { id: n, decimalDigits: r, readOnly: o, required: i } = e, a = me(Ke), { elementHasLostFocus: l } = a || {}, c = te(() => i && !o, [i, o]), d = te(
|
|
4902
4904
|
() => c ? zf : Vr,
|
|
4903
4905
|
[c]
|
|
@@ -4923,7 +4925,7 @@ const zf = xt(Vr)`
|
|
|
4923
4925
|
&.ant-input-number {
|
|
4924
4926
|
background-color: ${Yf.colorPrimaryBg};
|
|
4925
4927
|
}
|
|
4926
|
-
`, { useToken: Jf } =
|
|
4928
|
+
`, { useToken: Jf } = nt, { defaultAlgorithm: Kf, defaultSeed: Qf } = nt, Xf = Kf(Qf), tr = it((t) => {
|
|
4927
4929
|
const { ooui: e, onChange: n } = t, { id: r, readOnly: o, required: i } = e, { token: a } = Jf(), l = i && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = me(Ke), { elementHasLostFocus: d } = c || {}, f = te(() => i && !o, [i, o]), u = te(
|
|
4928
4930
|
() => f ? Zf : Vr,
|
|
4929
4931
|
[f]
|
|
@@ -4999,7 +5001,7 @@ function ep(t) {
|
|
|
4999
5001
|
)
|
|
5000
5002
|
] });
|
|
5001
5003
|
}
|
|
5002
|
-
const { defaultAlgorithm: tp, defaultSeed: np } =
|
|
5004
|
+
const { defaultAlgorithm: tp, defaultSeed: np } = nt, rp = tp(np), { Option: op } = vn, sp = (t) => {
|
|
5003
5005
|
const { ooui: e } = t, { required: n } = e;
|
|
5004
5006
|
return /* @__PURE__ */ s(Le, { required: n, type: "any", ...t, children: /* @__PURE__ */ s(ip, { ...t }) });
|
|
5005
5007
|
}, ip = (t) => {
|
|
@@ -5009,7 +5011,7 @@ const { defaultAlgorithm: tp, defaultSeed: np } = tt, rp = tp(np), { Option: op
|
|
|
5009
5011
|
}).map((u) => {
|
|
5010
5012
|
const [p, m] = u;
|
|
5011
5013
|
return /* @__PURE__ */ s(op, { value: m, children: m }, p);
|
|
5012
|
-
}), d = a && !i ? ap :
|
|
5014
|
+
}), d = a && !i ? ap : vn;
|
|
5013
5015
|
function f(u) {
|
|
5014
5016
|
const p = u.map((m) => {
|
|
5015
5017
|
const g = l.find(([h, y]) => m === y);
|
|
@@ -5031,7 +5033,7 @@ const { defaultAlgorithm: tp, defaultSeed: np } = tt, rp = tp(np), { Option: op
|
|
|
5031
5033
|
children: c
|
|
5032
5034
|
}
|
|
5033
5035
|
);
|
|
5034
|
-
}, ap = xt(
|
|
5036
|
+
}, ap = xt(vn)`
|
|
5035
5037
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
5036
5038
|
background-color: ${rp.colorPrimaryBg};
|
|
5037
5039
|
}
|
|
@@ -5075,7 +5077,7 @@ function Ya(t) {
|
|
|
5075
5077
|
);
|
|
5076
5078
|
}
|
|
5077
5079
|
}
|
|
5078
|
-
const { useToken: lp } =
|
|
5080
|
+
const { useToken: lp } = nt, { Title: cp } = an, { Header: dp, Content: up, Footer: fp } = Li, pp = ({
|
|
5079
5081
|
isOpen: t,
|
|
5080
5082
|
onClose: e,
|
|
5081
5083
|
children: n,
|
|
@@ -5093,7 +5095,7 @@ const { useToken: lp } = tt, { Title: cp } = an, { Header: dp, Content: up, Foot
|
|
|
5093
5095
|
},
|
|
5094
5096
|
[e]
|
|
5095
5097
|
);
|
|
5096
|
-
|
|
5098
|
+
ae(() => (t ? (a(!0), document.addEventListener("keydown", f), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", f), document.body.style.overflow = ""), () => {
|
|
5097
5099
|
document.removeEventListener("keydown", f), document.body.style.overflow = "";
|
|
5098
5100
|
}), [t, f]);
|
|
5099
5101
|
const u = () => {
|
|
@@ -5499,13 +5501,13 @@ function Jp() {
|
|
|
5499
5501
|
var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, n = pr;
|
|
5500
5502
|
return xo = n.call(t, e), xo;
|
|
5501
5503
|
}
|
|
5502
|
-
var Ne, Kp = Qa, Qp = vp, Xp = bp, Zp = wp, em = Sp,
|
|
5504
|
+
var Ne, Kp = Qa, Qp = vp, Xp = bp, Zp = wp, em = Sp, Nn = xp, Dn = Xa, tm = Cp, nm = Tp, rm = Fp, om = Ap, sm = Ip, im = Rp, am = _p, lm = Dp, nl = Function, Co = function(t) {
|
|
5503
5505
|
try {
|
|
5504
5506
|
return nl('"use strict"; return (' + t + ").constructor;")();
|
|
5505
5507
|
} catch {
|
|
5506
5508
|
}
|
|
5507
5509
|
}, nr = hs, cm = kp, To = function() {
|
|
5508
|
-
throw new
|
|
5510
|
+
throw new Dn();
|
|
5509
5511
|
}, dm = nr ? function() {
|
|
5510
5512
|
try {
|
|
5511
5513
|
return arguments.callee, To;
|
|
@@ -5516,17 +5518,17 @@ var Ne, Kp = Qa, Qp = vp, Xp = bp, Zp = wp, em = Sp, Ln = xp, Pn = Xa, tm = Cp,
|
|
|
5516
5518
|
return To;
|
|
5517
5519
|
}
|
|
5518
5520
|
}
|
|
5519
|
-
}() : To,
|
|
5521
|
+
}() : To, An = Mp()(), yt = zp(), um = el(), fm = Za(), rl = tl(), mr = gs(), _n = {}, pm = typeof Uint8Array > "u" || !yt ? Ne : yt(Uint8Array), gn = {
|
|
5520
5522
|
__proto__: null,
|
|
5521
5523
|
"%AggregateError%": typeof AggregateError > "u" ? Ne : AggregateError,
|
|
5522
5524
|
"%Array%": Array,
|
|
5523
5525
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? Ne : ArrayBuffer,
|
|
5524
|
-
"%ArrayIteratorPrototype%":
|
|
5526
|
+
"%ArrayIteratorPrototype%": An && yt ? yt([][Symbol.iterator]()) : Ne,
|
|
5525
5527
|
"%AsyncFromSyncIteratorPrototype%": Ne,
|
|
5526
|
-
"%AsyncFunction%":
|
|
5527
|
-
"%AsyncGenerator%":
|
|
5528
|
-
"%AsyncGeneratorFunction%":
|
|
5529
|
-
"%AsyncIteratorPrototype%":
|
|
5528
|
+
"%AsyncFunction%": _n,
|
|
5529
|
+
"%AsyncGenerator%": _n,
|
|
5530
|
+
"%AsyncGeneratorFunction%": _n,
|
|
5531
|
+
"%AsyncIteratorPrototype%": _n,
|
|
5530
5532
|
"%Atomics%": typeof Atomics > "u" ? Ne : Atomics,
|
|
5531
5533
|
"%BigInt%": typeof BigInt > "u" ? Ne : BigInt,
|
|
5532
5534
|
"%BigInt64Array%": typeof BigInt64Array > "u" ? Ne : BigInt64Array,
|
|
@@ -5547,16 +5549,16 @@ var Ne, Kp = Qa, Qp = vp, Xp = bp, Zp = wp, em = Sp, Ln = xp, Pn = Xa, tm = Cp,
|
|
|
5547
5549
|
"%Float64Array%": typeof Float64Array > "u" ? Ne : Float64Array,
|
|
5548
5550
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? Ne : FinalizationRegistry,
|
|
5549
5551
|
"%Function%": nl,
|
|
5550
|
-
"%GeneratorFunction%":
|
|
5552
|
+
"%GeneratorFunction%": _n,
|
|
5551
5553
|
"%Int8Array%": typeof Int8Array > "u" ? Ne : Int8Array,
|
|
5552
5554
|
"%Int16Array%": typeof Int16Array > "u" ? Ne : Int16Array,
|
|
5553
5555
|
"%Int32Array%": typeof Int32Array > "u" ? Ne : Int32Array,
|
|
5554
5556
|
"%isFinite%": isFinite,
|
|
5555
5557
|
"%isNaN%": isNaN,
|
|
5556
|
-
"%IteratorPrototype%":
|
|
5558
|
+
"%IteratorPrototype%": An && yt ? yt(yt([][Symbol.iterator]())) : Ne,
|
|
5557
5559
|
"%JSON%": typeof JSON == "object" ? JSON : Ne,
|
|
5558
5560
|
"%Map%": typeof Map > "u" ? Ne : Map,
|
|
5559
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
5561
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !An || !yt ? Ne : yt((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
5560
5562
|
"%Math%": Math,
|
|
5561
5563
|
"%Number%": Number,
|
|
5562
5564
|
"%Object%": Kp,
|
|
@@ -5570,15 +5572,15 @@ var Ne, Kp = Qa, Qp = vp, Xp = bp, Zp = wp, em = Sp, Ln = xp, Pn = Xa, tm = Cp,
|
|
|
5570
5572
|
"%Reflect%": typeof Reflect > "u" ? Ne : Reflect,
|
|
5571
5573
|
"%RegExp%": RegExp,
|
|
5572
5574
|
"%Set%": typeof Set > "u" ? Ne : Set,
|
|
5573
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
5575
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !An || !yt ? Ne : yt((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
5574
5576
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? Ne : SharedArrayBuffer,
|
|
5575
5577
|
"%String%": String,
|
|
5576
|
-
"%StringIteratorPrototype%":
|
|
5577
|
-
"%Symbol%":
|
|
5578
|
-
"%SyntaxError%":
|
|
5578
|
+
"%StringIteratorPrototype%": An && yt ? yt(""[Symbol.iterator]()) : Ne,
|
|
5579
|
+
"%Symbol%": An ? Symbol : Ne,
|
|
5580
|
+
"%SyntaxError%": Nn,
|
|
5579
5581
|
"%ThrowTypeError%": dm,
|
|
5580
5582
|
"%TypedArray%": pm,
|
|
5581
|
-
"%TypeError%":
|
|
5583
|
+
"%TypeError%": Dn,
|
|
5582
5584
|
"%Uint8Array%": typeof Uint8Array > "u" ? Ne : Uint8Array,
|
|
5583
5585
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? Ne : Uint8ClampedArray,
|
|
5584
5586
|
"%Uint16Array%": typeof Uint16Array > "u" ? Ne : Uint16Array,
|
|
@@ -5679,9 +5681,9 @@ var hm = function t(e) {
|
|
|
5679
5681
|
}, hr = pr, Dr = Jp(), gm = hr.call(mr, Array.prototype.concat), ym = hr.call(rl, Array.prototype.splice), pi = hr.call(mr, String.prototype.replace), Pr = hr.call(mr, String.prototype.slice), vm = hr.call(mr, RegExp.prototype.exec), bm = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, wm = /\\(\\)?/g, Sm = function(e) {
|
|
5680
5682
|
var n = Pr(e, 0, 1), r = Pr(e, -1);
|
|
5681
5683
|
if (n === "%" && r !== "%")
|
|
5682
|
-
throw new
|
|
5684
|
+
throw new Nn("invalid intrinsic syntax, expected closing `%`");
|
|
5683
5685
|
if (r === "%" && n !== "%")
|
|
5684
|
-
throw new
|
|
5686
|
+
throw new Nn("invalid intrinsic syntax, expected opening `%`");
|
|
5685
5687
|
var o = [];
|
|
5686
5688
|
return pi(e, bm, function(i, a, l, c) {
|
|
5687
5689
|
o[o.length] = l ? pi(c, wm, "$1") : a || i;
|
|
@@ -5690,34 +5692,34 @@ var hm = function t(e) {
|
|
|
5690
5692
|
var r = e, o;
|
|
5691
5693
|
if (Dr(fi, r) && (o = fi[r], r = "%" + o[0] + "%"), Dr(gn, r)) {
|
|
5692
5694
|
var i = gn[r];
|
|
5693
|
-
if (i ===
|
|
5694
|
-
throw new
|
|
5695
|
+
if (i === _n && (i = hm(r)), typeof i > "u" && !n)
|
|
5696
|
+
throw new Dn("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
5695
5697
|
return {
|
|
5696
5698
|
alias: o,
|
|
5697
5699
|
name: r,
|
|
5698
5700
|
value: i
|
|
5699
5701
|
};
|
|
5700
5702
|
}
|
|
5701
|
-
throw new
|
|
5703
|
+
throw new Nn("intrinsic " + e + " does not exist!");
|
|
5702
5704
|
}, Zr = function(e, n) {
|
|
5703
5705
|
if (typeof e != "string" || e.length === 0)
|
|
5704
|
-
throw new
|
|
5706
|
+
throw new Dn("intrinsic name must be a non-empty string");
|
|
5705
5707
|
if (arguments.length > 1 && typeof n != "boolean")
|
|
5706
|
-
throw new
|
|
5708
|
+
throw new Dn('"allowMissing" argument must be a boolean');
|
|
5707
5709
|
if (vm(/^%?[^%]*%?$/, e) === null)
|
|
5708
|
-
throw new
|
|
5710
|
+
throw new Nn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
5709
5711
|
var r = Sm(e), o = r.length > 0 ? r[0] : "", i = xm("%" + o + "%", n), a = i.name, l = i.value, c = !1, d = i.alias;
|
|
5710
5712
|
d && (o = d[0], ym(r, gm([0, 1], d)));
|
|
5711
5713
|
for (var f = 1, u = !0; f < r.length; f += 1) {
|
|
5712
5714
|
var p = r[f], m = Pr(p, 0, 1), g = Pr(p, -1);
|
|
5713
5715
|
if ((m === '"' || m === "'" || m === "`" || g === '"' || g === "'" || g === "`") && m !== g)
|
|
5714
|
-
throw new
|
|
5716
|
+
throw new Nn("property names with quotes must have matching quotes");
|
|
5715
5717
|
if ((p === "constructor" || !u) && (c = !0), o += "." + p, a = "%" + o + "%", Dr(gn, a))
|
|
5716
5718
|
l = gn[a];
|
|
5717
5719
|
else if (l != null) {
|
|
5718
5720
|
if (!(p in l)) {
|
|
5719
5721
|
if (!n)
|
|
5720
|
-
throw new
|
|
5722
|
+
throw new Dn("base intrinsic for " + e + " exists, but the property is not available.");
|
|
5721
5723
|
return;
|
|
5722
5724
|
}
|
|
5723
5725
|
if (nr && f + 1 >= r.length) {
|
|
@@ -5784,19 +5786,19 @@ Mo.hasArrayLengthDefineBug = function() {
|
|
|
5784
5786
|
return !0;
|
|
5785
5787
|
}
|
|
5786
5788
|
};
|
|
5787
|
-
var vs = Mo, _m = vs(), bs = Zr, mi = _m && bs("%Object.defineProperty%", !0), Em = bs("%SyntaxError%"),
|
|
5789
|
+
var vs = Mo, _m = vs(), bs = Zr, mi = _m && bs("%Object.defineProperty%", !0), Em = bs("%SyntaxError%"), In = bs("%TypeError%"), hi = hs, cl = function(e, n, r) {
|
|
5788
5790
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
5789
|
-
throw new
|
|
5791
|
+
throw new In("`obj` must be an object or a function`");
|
|
5790
5792
|
if (typeof n != "string" && typeof n != "symbol")
|
|
5791
|
-
throw new
|
|
5793
|
+
throw new In("`property` must be a string or a symbol`");
|
|
5792
5794
|
if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
|
|
5793
|
-
throw new
|
|
5795
|
+
throw new In("`nonEnumerable`, if provided, must be a boolean or null");
|
|
5794
5796
|
if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
|
|
5795
|
-
throw new
|
|
5797
|
+
throw new In("`nonWritable`, if provided, must be a boolean or null");
|
|
5796
5798
|
if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
|
|
5797
|
-
throw new
|
|
5799
|
+
throw new In("`nonConfigurable`, if provided, must be a boolean or null");
|
|
5798
5800
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
5799
|
-
throw new
|
|
5801
|
+
throw new In("`loose`, if provided, must be a boolean");
|
|
5800
5802
|
var o = arguments.length > 3 ? arguments[3] : null, i = arguments.length > 4 ? arguments[4] : null, a = arguments.length > 5 ? arguments[5] : null, l = arguments.length > 6 ? arguments[6] : !1, c = !!hi && hi(e, n);
|
|
5801
5803
|
if (mi)
|
|
5802
5804
|
mi(e, n, {
|
|
@@ -5999,7 +6001,7 @@ const ws = /* @__PURE__ */ fa(Ih), Tl = Nt(
|
|
|
5999
6001
|
const { onSubmit: n, searchValues: r, searchFields: o, onChange: i, onClear: a } = t, [l] = Vt.useForm(), [c, d] = F({}), [f, u] = F(
|
|
6000
6002
|
{}
|
|
6001
6003
|
), [p, m] = F(""), { t: g } = ye();
|
|
6002
|
-
|
|
6004
|
+
ae(() => {
|
|
6003
6005
|
l.setFieldsValue(r);
|
|
6004
6006
|
const b = er(r || {});
|
|
6005
6007
|
d(b), u(b);
|
|
@@ -6148,7 +6150,7 @@ Tl.displayName = "SideSearchFilterComponent";
|
|
|
6148
6150
|
const Fl = (t) => {
|
|
6149
6151
|
var w;
|
|
6150
6152
|
const { onSubmit: e, isOpen: n, onClose: r, searchFields: o, fields: i, searchValues: a } = t, l = J(), { t: c } = ye(), [d, f] = F(), u = J(null), [p, m] = F();
|
|
6151
|
-
|
|
6153
|
+
ae(() => {
|
|
6152
6154
|
n && (m(void 0), setTimeout(() => {
|
|
6153
6155
|
const A = document.querySelector(
|
|
6154
6156
|
"#floating-drawer-overlay input"
|
|
@@ -6330,7 +6332,7 @@ function Oh(t) {
|
|
|
6330
6332
|
] })
|
|
6331
6333
|
] });
|
|
6332
6334
|
}
|
|
6333
|
-
const { useToken: Dh } =
|
|
6335
|
+
const { useToken: Dh } = nt;
|
|
6334
6336
|
function to(t) {
|
|
6335
6337
|
const {
|
|
6336
6338
|
fields: e,
|
|
@@ -6347,9 +6349,9 @@ function to(t) {
|
|
|
6347
6349
|
searchValues: p,
|
|
6348
6350
|
showLimitOptions: m = !0
|
|
6349
6351
|
} = t, [g, h] = F(), [y, v] = F(), [b, w] = F(!1), A = J(), { token: x } = Dh(), [P] = Vt.useForm();
|
|
6350
|
-
|
|
6352
|
+
ae(() => {
|
|
6351
6353
|
P.setFieldsValue(p);
|
|
6352
|
-
}, [p]),
|
|
6354
|
+
}, [p]), ae(() => {
|
|
6353
6355
|
u && console.error(u);
|
|
6354
6356
|
}, [u]);
|
|
6355
6357
|
const R = () => {
|
|
@@ -6436,7 +6438,7 @@ function to(t) {
|
|
|
6436
6438
|
function Al({
|
|
6437
6439
|
useLocalState: t = !1
|
|
6438
6440
|
}) {
|
|
6439
|
-
const e = Eg() && !t, n = ln(), [r, o] = F(!1), [i, a] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, p] = F(void 0), [m, g] = F([]), [h, y] = F({}), [v, b] = F(), [w, A] = F([]), [x, P] = F(), [R, O] = F(0), [C, k] = F(), [T, S] = F(1), [E, D] = F(
|
|
6441
|
+
const e = Eg() && !t, n = ln(), [r, o] = F(!1), [i, a] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, p] = F(void 0), [m, g] = F([]), [h, y] = F({}), [v, b] = F(), [w, A] = F([]), [x, P] = F(), [R, O] = F(0), [C, k] = F(), [T, S] = F(1), [E, D] = F(Ln), [I, M] = F(St);
|
|
6440
6442
|
return e ? {
|
|
6441
6443
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
6442
6444
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -6478,7 +6480,7 @@ function Al({
|
|
|
6478
6480
|
currentPage: n.currentPage ?? 1,
|
|
6479
6481
|
setCurrentPage: n.setCurrentPage ?? (() => {
|
|
6480
6482
|
}),
|
|
6481
|
-
treeType: n.treeType ??
|
|
6483
|
+
treeType: n.treeType ?? Ln,
|
|
6482
6484
|
setTreeType: n.setTreeType ?? (() => {
|
|
6483
6485
|
}),
|
|
6484
6486
|
limit: n.limit ?? St,
|
|
@@ -6520,7 +6522,7 @@ function Al({
|
|
|
6520
6522
|
}
|
|
6521
6523
|
const Ss = () => {
|
|
6522
6524
|
const [t, e] = F(!document.hidden);
|
|
6523
|
-
return
|
|
6525
|
+
return ae(() => {
|
|
6524
6526
|
const n = () => {
|
|
6525
6527
|
e(!document.hidden);
|
|
6526
6528
|
};
|
|
@@ -6539,7 +6541,7 @@ function Il({
|
|
|
6539
6541
|
colorsForResults: e,
|
|
6540
6542
|
statusForResults: n,
|
|
6541
6543
|
updateAttributes: (i, a) => {
|
|
6542
|
-
const l =
|
|
6544
|
+
const l = $n(i);
|
|
6543
6545
|
if (e.current = {
|
|
6544
6546
|
...e.current,
|
|
6545
6547
|
...l
|
|
@@ -6590,7 +6592,7 @@ const or = ({
|
|
|
6590
6592
|
) : !0,
|
|
6591
6593
|
[o]
|
|
6592
6594
|
);
|
|
6593
|
-
|
|
6595
|
+
ae(() => {
|
|
6594
6596
|
i === !1 && C(), (i === void 0 || i === !0) && !A && C(), (i === void 0 || i === !0) && A && k();
|
|
6595
6597
|
}, [i, A]);
|
|
6596
6598
|
const R = _(() => {
|
|
@@ -6656,7 +6658,7 @@ const or = ({
|
|
|
6656
6658
|
b,
|
|
6657
6659
|
f
|
|
6658
6660
|
]);
|
|
6659
|
-
|
|
6661
|
+
ae(() => () => {
|
|
6660
6662
|
v(), w();
|
|
6661
6663
|
}, []), ze(() => ((o == null ? void 0 : o.length) && g && (O(), m.current = setInterval(O, Ph)), () => {
|
|
6662
6664
|
m.current && (clearInterval(m.current), m.current = null);
|
|
@@ -6673,7 +6675,7 @@ const or = ({
|
|
|
6673
6675
|
}, [v, w]), k = _(() => {
|
|
6674
6676
|
h(!0);
|
|
6675
6677
|
}, []);
|
|
6676
|
-
|
|
6678
|
+
ae(() => () => {
|
|
6677
6679
|
x.current = {};
|
|
6678
6680
|
}, []);
|
|
6679
6681
|
const T = _(() => {
|
|
@@ -6705,13 +6707,13 @@ const or = ({
|
|
|
6705
6707
|
), [O, C] = _e(
|
|
6706
6708
|
V.getHandler().parseConditions
|
|
6707
6709
|
), k = Ss();
|
|
6708
|
-
|
|
6710
|
+
ae(() => {
|
|
6709
6711
|
o === !1 && $(), (o === void 0 || o === !0) && !k && $(), (o === void 0 || o === !0) && k && j();
|
|
6710
|
-
}, [o, k]),
|
|
6712
|
+
}, [o, k]), ae(() => () => {
|
|
6711
6713
|
R(), C();
|
|
6712
|
-
}, []),
|
|
6714
|
+
}, []), ae(() => (o || (R(), C()), () => {
|
|
6713
6715
|
R(), C();
|
|
6714
|
-
}), [o, R, C]),
|
|
6716
|
+
}), [o, R, C]), ae(() => {
|
|
6715
6717
|
if (!m) {
|
|
6716
6718
|
u(!1), p.current = [];
|
|
6717
6719
|
return;
|
|
@@ -6724,7 +6726,7 @@ const or = ({
|
|
|
6724
6726
|
if (!e)
|
|
6725
6727
|
return !1;
|
|
6726
6728
|
const H = ((U = e.fields_in_conditions) == null ? void 0 : U.colors) || [], B = ((K = e.fields_in_conditions) == null ? void 0 : K.status) || [];
|
|
6727
|
-
return H.some((
|
|
6729
|
+
return H.some((q) => p.current.includes(q)) || B.some((q) => p.current.includes(q));
|
|
6728
6730
|
}, [e]), S = _(async () => {
|
|
6729
6731
|
if (!f || h.size === 0 || !o || !p.current.length || !a)
|
|
6730
6732
|
return;
|
|
@@ -6733,16 +6735,16 @@ const or = ({
|
|
|
6733
6735
|
);
|
|
6734
6736
|
if (H.length !== 0)
|
|
6735
6737
|
try {
|
|
6736
|
-
H.forEach((
|
|
6738
|
+
H.forEach((q) => v.current.add(q));
|
|
6737
6739
|
const { results: B } = await P({
|
|
6738
6740
|
searchIds: H,
|
|
6739
6741
|
fieldsToRetrieve: p.current
|
|
6740
6742
|
}), U = sn(a, B), K = [...b.current];
|
|
6741
|
-
U.forEach((
|
|
6743
|
+
U.forEach((q) => {
|
|
6742
6744
|
const se = K.findIndex(
|
|
6743
|
-
(ee) => ee.id ===
|
|
6745
|
+
(ee) => ee.id === q.id
|
|
6744
6746
|
);
|
|
6745
|
-
se >= 0 ? K[se] =
|
|
6747
|
+
se >= 0 ? K[se] = q : K.push(q);
|
|
6746
6748
|
}), b.current = K;
|
|
6747
6749
|
} catch (B) {
|
|
6748
6750
|
B.name !== "AbortError" && console.error("Error updating function fields:", B);
|
|
@@ -6771,21 +6773,21 @@ const or = ({
|
|
|
6771
6773
|
async (H) => {
|
|
6772
6774
|
var K;
|
|
6773
6775
|
if (i == null || i(H), H.length === 0 || !p.current.some(
|
|
6774
|
-
(
|
|
6776
|
+
(q) => H.some((se) => se[q] !== void 0)
|
|
6775
6777
|
) || !T() || !a || !l)
|
|
6776
6778
|
return;
|
|
6777
|
-
const B = H.map((
|
|
6779
|
+
const B = H.map((q) => ({ ...c == null ? void 0 : c.find((ee) => ee.id === q.id), ...q })), U = or({
|
|
6778
6780
|
treeOoui: a
|
|
6779
6781
|
});
|
|
6780
6782
|
try {
|
|
6781
|
-
const
|
|
6783
|
+
const q = await O({
|
|
6782
6784
|
conditions: U,
|
|
6783
6785
|
values: B,
|
|
6784
6786
|
context: r
|
|
6785
6787
|
});
|
|
6786
|
-
l(
|
|
6787
|
-
} catch (
|
|
6788
|
-
|
|
6788
|
+
l(q, a), (K = n == null ? void 0 : n.current) == null || K.refreshRowStyles();
|
|
6789
|
+
} catch (q) {
|
|
6790
|
+
q.name !== "AbortError" && console.error("Error parsing conditions:", q);
|
|
6789
6791
|
}
|
|
6790
6792
|
},
|
|
6791
6793
|
[
|
|
@@ -6803,15 +6805,15 @@ const or = ({
|
|
|
6803
6805
|
const H = ((U = n == null ? void 0 : n.current) == null ? void 0 : U.getVisibleRows()) || [];
|
|
6804
6806
|
if (H.length === 0 || b.current.length === 0)
|
|
6805
6807
|
return;
|
|
6806
|
-
const B = b.current.filter((
|
|
6808
|
+
const B = b.current.filter((q) => {
|
|
6807
6809
|
const se = H.find(
|
|
6808
|
-
(Q) => (Q == null ? void 0 : Q.id) === (
|
|
6810
|
+
(Q) => (Q == null ? void 0 : Q.id) === (q == null ? void 0 : q.id)
|
|
6809
6811
|
);
|
|
6810
6812
|
return se ? p.current.some(
|
|
6811
|
-
(Q) =>
|
|
6813
|
+
(Q) => q[Q] !== se[Q]
|
|
6812
6814
|
) : !1;
|
|
6813
6815
|
}).filter(Boolean);
|
|
6814
|
-
B.length > 0 && (B.forEach((
|
|
6816
|
+
B.length > 0 && (B.forEach((q) => v.current.delete(q.id)), D(B), (K = n == null ? void 0 : n.current) == null || K.updateRows(B));
|
|
6815
6817
|
}, [n, D]), M = _((H, B) => p.current.includes(B) ? !b.current.find((U) => U.id === (H == null ? void 0 : H.id)) : !1, []);
|
|
6816
6818
|
ze(() => (f && A && (I(), w.current = setInterval(
|
|
6817
6819
|
I,
|
|
@@ -6829,20 +6831,20 @@ const or = ({
|
|
|
6829
6831
|
const B = [...b.current];
|
|
6830
6832
|
H.forEach((U) => {
|
|
6831
6833
|
const K = B.findIndex(
|
|
6832
|
-
(
|
|
6834
|
+
(q) => q.id === U.id
|
|
6833
6835
|
);
|
|
6834
6836
|
if (K >= 0) {
|
|
6835
|
-
const
|
|
6837
|
+
const q = { ...B[K] };
|
|
6836
6838
|
p.current.forEach((se) => {
|
|
6837
|
-
U[se] !== void 0 && (
|
|
6838
|
-
}), B[K] =
|
|
6839
|
+
U[se] !== void 0 && (q[se] = U[se]);
|
|
6840
|
+
}), B[K] = q;
|
|
6839
6841
|
} else
|
|
6840
6842
|
p.current.some(
|
|
6841
6843
|
(se) => U[se] !== void 0
|
|
6842
6844
|
) && B.push(U);
|
|
6843
6845
|
}), b.current = B;
|
|
6844
6846
|
}, []);
|
|
6845
|
-
return
|
|
6847
|
+
return ae(() => {
|
|
6846
6848
|
d && d(N);
|
|
6847
6849
|
}, [d, N]), {
|
|
6848
6850
|
refresh: () => {
|
|
@@ -6900,7 +6902,7 @@ const or = ({
|
|
|
6900
6902
|
style: { paddingRight: 10 },
|
|
6901
6903
|
className: "text-right",
|
|
6902
6904
|
children: [
|
|
6903
|
-
t === void 0 && /* @__PURE__ */ s(
|
|
6905
|
+
t === void 0 && /* @__PURE__ */ s(tt, {}),
|
|
6904
6906
|
t != null && `${r("totalRegisters")} ${t}`
|
|
6905
6907
|
]
|
|
6906
6908
|
}
|
|
@@ -7087,7 +7089,7 @@ const Nh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Dl,
|
|
|
7087
7089
|
const { id: e, model: n, context: r = {} } = t, [o, i] = F(), [a, l] = F(), c = me(
|
|
7088
7090
|
Bt
|
|
7089
7091
|
), { openRelate: d, openAction: f } = c || {}, u = me(
|
|
7090
|
-
|
|
7092
|
+
wn
|
|
7091
7093
|
), { processAction: p } = u || {}, [m, g] = _e(
|
|
7092
7094
|
V.getHandler().getView
|
|
7093
7095
|
), [h, y] = _e(
|
|
@@ -7138,7 +7140,7 @@ const Nh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Dl,
|
|
|
7138
7140
|
ids: [e],
|
|
7139
7141
|
fieldsToRetrieve: S,
|
|
7140
7142
|
context: r
|
|
7141
|
-
})) == null ? void 0 : T[0] }), E = { ...
|
|
7143
|
+
})) == null ? void 0 : T[0] }), E = { ...Rn(E, C), active_id: e }, l(E), k ? {
|
|
7142
7144
|
actionItems: k.action,
|
|
7143
7145
|
relateItems: k.relate,
|
|
7144
7146
|
printItems: k.print
|
|
@@ -7318,9 +7320,9 @@ const zh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Pl,
|
|
|
7318
7320
|
o,
|
|
7319
7321
|
f
|
|
7320
7322
|
]);
|
|
7321
|
-
return
|
|
7323
|
+
return ae(() => {
|
|
7322
7324
|
p().catch((g) => console.error(g));
|
|
7323
|
-
}, [p]),
|
|
7325
|
+
}, [p]), ae(() => () => {
|
|
7324
7326
|
r();
|
|
7325
7327
|
}, []), d ? /* @__PURE__ */ s(Cs, { color: l, children: d }) : null;
|
|
7326
7328
|
}, Cs = (t) => {
|
|
@@ -7358,7 +7360,7 @@ const zh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Pl,
|
|
|
7358
7360
|
maxLength: n,
|
|
7359
7361
|
readonly: r = !1
|
|
7360
7362
|
}) => {
|
|
7361
|
-
const { token: o } =
|
|
7363
|
+
const { token: o } = nt.useToken(), [i, a] = F(
|
|
7362
7364
|
t ? t.replace(/,/g, ";").split(";").map((y) => y.trim()).filter((y) => y) : []
|
|
7363
7365
|
), [l, c] = F(""), d = J(null), f = me(Ke), { elementHasLostFocus: u } = f || {};
|
|
7364
7366
|
ze(() => {
|
|
@@ -7442,15 +7444,15 @@ const zh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Pl,
|
|
|
7442
7444
|
]
|
|
7443
7445
|
}
|
|
7444
7446
|
);
|
|
7445
|
-
},
|
|
7447
|
+
}, Sn = Zt.createContext(
|
|
7446
7448
|
null
|
|
7447
7449
|
), Kh = ({
|
|
7448
7450
|
children: t,
|
|
7449
7451
|
initialView: e
|
|
7450
7452
|
}) => {
|
|
7451
|
-
const [n, r] = F(e), [o, i] = F(0), [a, l] = F(!1), [c, d] = F(
|
|
7453
|
+
const [n, r] = F(e), [o, i] = F(0), [a, l] = F(!1), [c, d] = F(void 0);
|
|
7452
7454
|
return /* @__PURE__ */ s(
|
|
7453
|
-
|
|
7455
|
+
Sn.Provider,
|
|
7454
7456
|
{
|
|
7455
7457
|
value: {
|
|
7456
7458
|
currentView: n,
|
|
@@ -7465,7 +7467,7 @@ const zh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Pl,
|
|
|
7465
7467
|
children: t
|
|
7466
7468
|
}
|
|
7467
7469
|
);
|
|
7468
|
-
}, Ml = () => me(
|
|
7470
|
+
}, Ml = () => me(Sn), Qh = ({
|
|
7469
7471
|
value: t
|
|
7470
7472
|
}) => te(
|
|
7471
7473
|
() => /* @__PURE__ */ s(
|
|
@@ -7622,9 +7624,9 @@ const zh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Pl,
|
|
|
7622
7624
|
l(!1);
|
|
7623
7625
|
}
|
|
7624
7626
|
}, [r, u, f, t == null ? void 0 : t.items, c]);
|
|
7625
|
-
|
|
7627
|
+
ae(() => {
|
|
7626
7628
|
t != null && t.items && (t == null ? void 0 : t.items.length) > 0 && p();
|
|
7627
|
-
}, [t == null ? void 0 : t.items]),
|
|
7629
|
+
}, [t == null ? void 0 : t.items]), ae(() => () => {
|
|
7628
7630
|
d();
|
|
7629
7631
|
}, []);
|
|
7630
7632
|
const m = te(
|
|
@@ -7634,7 +7636,7 @@ const zh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Pl,
|
|
|
7634
7636
|
}),
|
|
7635
7637
|
[o]
|
|
7636
7638
|
);
|
|
7637
|
-
return te(() => a ? /* @__PURE__ */ s(
|
|
7639
|
+
return te(() => a ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(
|
|
7638
7640
|
"div",
|
|
7639
7641
|
{
|
|
7640
7642
|
style: {
|
|
@@ -7669,7 +7671,7 @@ const zh = (t) => /* @__PURE__ */ s(Le, { ...t, children: /* @__PURE__ */ s(Pl,
|
|
|
7669
7671
|
}, $l = (t, e) => {
|
|
7670
7672
|
const { t: n } = ye(), r = en(
|
|
7671
7673
|
Dt.FEATURE_MANY2ONE_SORT
|
|
7672
|
-
), o =
|
|
7674
|
+
), o = kn(() => {
|
|
7673
7675
|
if (t)
|
|
7674
7676
|
return os(
|
|
7675
7677
|
t,
|
|
@@ -7715,7 +7717,7 @@ function hg(t, e) {
|
|
|
7715
7717
|
), [E, D] = _e(
|
|
7716
7718
|
V.getHandler().searchAllIds
|
|
7717
7719
|
);
|
|
7718
|
-
|
|
7720
|
+
ae(() => () => {
|
|
7719
7721
|
k(), S(), D();
|
|
7720
7722
|
}, []);
|
|
7721
7723
|
const { treeView: I, formView: M, loading: $ } = cs({
|
|
@@ -7730,22 +7732,22 @@ function hg(t, e) {
|
|
|
7730
7732
|
setSelectedRowItems: B,
|
|
7731
7733
|
setTreeFirstVisibleRow: U,
|
|
7732
7734
|
treeFirstVisibleRow: K,
|
|
7733
|
-
selectedRowItems:
|
|
7735
|
+
selectedRowItems: q,
|
|
7734
7736
|
setSearchParams: se,
|
|
7735
7737
|
searchValues: ee,
|
|
7736
7738
|
searchParams: Q,
|
|
7737
7739
|
setSearchValues: re,
|
|
7738
|
-
searchTreeNameSearch:
|
|
7740
|
+
searchTreeNameSearch: G,
|
|
7739
7741
|
setSearchTreeNameSearch: oe,
|
|
7740
|
-
setResults:
|
|
7742
|
+
setResults: ie,
|
|
7741
7743
|
results: X,
|
|
7742
7744
|
setSearchQuery: ne,
|
|
7743
7745
|
setTotalItems: de,
|
|
7744
|
-
isActive:
|
|
7746
|
+
isActive: Y,
|
|
7745
7747
|
order: le,
|
|
7746
7748
|
setOrder: ve
|
|
7747
|
-
} = Al({ useLocalState: !c }), fe = u ||
|
|
7748
|
-
|
|
7749
|
+
} = Al({ useLocalState: !c }), fe = u || G, Fe = J(fe), he = J(!1), Me = J(), Re = J(), De = J(!1);
|
|
7750
|
+
ae(() => {
|
|
7749
7751
|
var ue, Ie;
|
|
7750
7752
|
fe !== void 0 && Fe.current === void 0 || typeof fe == "string" && typeof Fe.current == "string" && fe !== Fe.current ? (he.current = !!fe, se == null || se([]), re == null || re({}), (ue = g.current) == null || ue.unselectAll()) : fe === void 0 && Fe.current !== void 0 && (he.current = !1, (Ie = g.current) == null || Ie.unselectAll()), Fe.current = fe;
|
|
7751
7753
|
}, [fe]);
|
|
@@ -7756,7 +7758,7 @@ function hg(t, e) {
|
|
|
7756
7758
|
colorsForResults: Te,
|
|
7757
7759
|
statusForResults: je,
|
|
7758
7760
|
updateAttributes: Qe,
|
|
7759
|
-
clearAttributes:
|
|
7761
|
+
clearAttributes: rt
|
|
7760
7762
|
} = Il({
|
|
7761
7763
|
tableRef: g
|
|
7762
7764
|
}), {
|
|
@@ -7770,7 +7772,7 @@ function hg(t, e) {
|
|
|
7770
7772
|
treeView: I,
|
|
7771
7773
|
tableRef: g,
|
|
7772
7774
|
context: d,
|
|
7773
|
-
isActive:
|
|
7775
|
+
isActive: Y,
|
|
7774
7776
|
treeOoui: Ce,
|
|
7775
7777
|
updateAttributes: Qe,
|
|
7776
7778
|
results: X
|
|
@@ -7780,7 +7782,7 @@ function hg(t, e) {
|
|
|
7780
7782
|
autorefreshableFields: Ce == null ? void 0 : Ce.autorefreshableFields,
|
|
7781
7783
|
treeView: I,
|
|
7782
7784
|
context: d,
|
|
7783
|
-
isActive:
|
|
7785
|
+
isActive: Y,
|
|
7784
7786
|
treeOoui: Ce,
|
|
7785
7787
|
updateAttributes: Qe,
|
|
7786
7788
|
results: X,
|
|
@@ -7789,17 +7791,17 @@ function hg(t, e) {
|
|
|
7789
7791
|
if (Ae)
|
|
7790
7792
|
return Ae.map((ue) => ({
|
|
7791
7793
|
...ue,
|
|
7792
|
-
render: (Ie,
|
|
7794
|
+
render: (Ie, ot) => /* @__PURE__ */ s(
|
|
7793
7795
|
xs,
|
|
7794
7796
|
{
|
|
7795
7797
|
value: Ie,
|
|
7796
|
-
record:
|
|
7798
|
+
record: ot,
|
|
7797
7799
|
column: ue,
|
|
7798
7800
|
isFieldLoading: Xe
|
|
7799
7801
|
}
|
|
7800
7802
|
)
|
|
7801
7803
|
}));
|
|
7802
|
-
}, [Ae, Xe]),
|
|
7804
|
+
}, [Ae, Xe]), W = te(() => {
|
|
7803
7805
|
if (!$)
|
|
7804
7806
|
return qa({
|
|
7805
7807
|
treeViewId: I == null ? void 0 : I.view_id,
|
|
@@ -7809,7 +7811,7 @@ function hg(t, e) {
|
|
|
7809
7811
|
loading: be,
|
|
7810
7812
|
getColumnState: ce,
|
|
7811
7813
|
updateColumnState: Pe
|
|
7812
|
-
} = ds({ key:
|
|
7814
|
+
} = ds({ key: W }), Oe = te(
|
|
7813
7815
|
() => Xt(Q || [], a),
|
|
7814
7816
|
[a, Q]
|
|
7815
7817
|
), He = _(() => {
|
|
@@ -7845,7 +7847,7 @@ function hg(t, e) {
|
|
|
7845
7847
|
async ({
|
|
7846
7848
|
startRow: ue,
|
|
7847
7849
|
endRow: Ie,
|
|
7848
|
-
state:
|
|
7850
|
+
state: ot
|
|
7849
7851
|
}) => {
|
|
7850
7852
|
if (!Ce)
|
|
7851
7853
|
return [];
|
|
@@ -7856,7 +7858,7 @@ function hg(t, e) {
|
|
|
7856
7858
|
});
|
|
7857
7859
|
at = Rr($t);
|
|
7858
7860
|
} else {
|
|
7859
|
-
const $t =
|
|
7861
|
+
const $t = ot == null ? void 0 : ot.filter((pe) => pe.sort || pe.sortIndex).map((pe) => ({
|
|
7860
7862
|
sort: pe.sort || void 0,
|
|
7861
7863
|
sortIndex: pe.sortIndex || void 0,
|
|
7862
7864
|
colId: pe.colId
|
|
@@ -7891,10 +7893,10 @@ function hg(t, e) {
|
|
|
7891
7893
|
context: d,
|
|
7892
7894
|
order: at
|
|
7893
7895
|
}), He() || Re.current !== at)
|
|
7894
|
-
|
|
7896
|
+
ie == null || ie(Mt);
|
|
7895
7897
|
else {
|
|
7896
7898
|
const $t = [...X || [], ...Mt];
|
|
7897
|
-
|
|
7899
|
+
ie == null || ie($t);
|
|
7898
7900
|
}
|
|
7899
7901
|
if (Re.current = at, fe ? (w(Mt.length), de(Mt.length), x(!0)) : x(!1), Mt.length === 0)
|
|
7900
7902
|
return h.current = [], w(0), de(0), [];
|
|
@@ -7910,7 +7912,7 @@ function hg(t, e) {
|
|
|
7910
7912
|
He,
|
|
7911
7913
|
fe,
|
|
7912
7914
|
d,
|
|
7913
|
-
|
|
7915
|
+
ie,
|
|
7914
7916
|
ve,
|
|
7915
7917
|
ne,
|
|
7916
7918
|
de,
|
|
@@ -7936,14 +7938,14 @@ function hg(t, e) {
|
|
|
7936
7938
|
async ({
|
|
7937
7939
|
startRow: ue,
|
|
7938
7940
|
endRow: Ie,
|
|
7939
|
-
state:
|
|
7941
|
+
state: ot
|
|
7940
7942
|
}) => {
|
|
7941
7943
|
try {
|
|
7942
7944
|
j == null || j(!0), ue === 0 && !fe && Ft();
|
|
7943
7945
|
const at = await gt({
|
|
7944
7946
|
startRow: ue,
|
|
7945
7947
|
endRow: Ie,
|
|
7946
|
-
state:
|
|
7948
|
+
state: ot
|
|
7947
7949
|
});
|
|
7948
7950
|
return j == null || j(!1), at;
|
|
7949
7951
|
} catch (at) {
|
|
@@ -7959,10 +7961,10 @@ function hg(t, e) {
|
|
|
7959
7961
|
fe
|
|
7960
7962
|
]
|
|
7961
7963
|
), Ut = _((ue) => {
|
|
7962
|
-
var Ie,
|
|
7963
|
-
if (Te.current[(
|
|
7964
|
+
var Ie, ot, at, Lt;
|
|
7965
|
+
if (Te.current[(ot = (Ie = ue.node) == null ? void 0 : Ie.data) == null ? void 0 : ot.id])
|
|
7964
7966
|
return { color: Te.current[(Lt = (at = ue.node) == null ? void 0 : at.data) == null ? void 0 : Lt.id] };
|
|
7965
|
-
}, []), At = te(() => (
|
|
7967
|
+
}, []), At = te(() => (q == null ? void 0 : q.map((ue) => ue.id)) || [], [q]), [ut, ft, wt] = us({
|
|
7966
7968
|
ooui: Ce,
|
|
7967
7969
|
model: n,
|
|
7968
7970
|
showEmptyValues: !0,
|
|
@@ -7970,9 +7972,9 @@ function hg(t, e) {
|
|
|
7970
7972
|
// eslint-disable-next-line @typescript-eslint/require-array-sort-compare
|
|
7971
7973
|
[["id", "in", At.sort()]]
|
|
7972
7974
|
) : void 0
|
|
7973
|
-
}),
|
|
7975
|
+
}), xn = _(async () => {
|
|
7974
7976
|
let ue = !1;
|
|
7975
|
-
(
|
|
7977
|
+
(q == null ? void 0 : q.length) === 0 ? ue = !0 : ue = !1;
|
|
7976
7978
|
const Ie = async () => {
|
|
7977
7979
|
if (fe) {
|
|
7978
7980
|
et(h.current);
|
|
@@ -7980,13 +7982,13 @@ function hg(t, e) {
|
|
|
7980
7982
|
}
|
|
7981
7983
|
if (!b)
|
|
7982
7984
|
return;
|
|
7983
|
-
const
|
|
7985
|
+
const ot = await E({
|
|
7984
7986
|
params: fe ? a : Oe,
|
|
7985
7987
|
model: n,
|
|
7986
7988
|
context: d,
|
|
7987
7989
|
totalItems: b
|
|
7988
7990
|
});
|
|
7989
|
-
et(
|
|
7991
|
+
et(ot.map((at) => ({ id: at })));
|
|
7990
7992
|
};
|
|
7991
7993
|
ue ? b && b > mg ? Qt({
|
|
7992
7994
|
confirmMessage: P("confirmSelectAllRegisters").replace(
|
|
@@ -8003,12 +8005,12 @@ function hg(t, e) {
|
|
|
8003
8005
|
n,
|
|
8004
8006
|
fe,
|
|
8005
8007
|
d,
|
|
8006
|
-
|
|
8008
|
+
q == null ? void 0 : q.length,
|
|
8007
8009
|
B,
|
|
8008
8010
|
P,
|
|
8009
8011
|
b,
|
|
8010
8012
|
E
|
|
8011
|
-
]),
|
|
8013
|
+
]), Cn = _(() => K, [K]), cn = te(() => wt ? /* @__PURE__ */ s(fs, { aggregates: ft, isLoading: ut }) : null, [ft, ut, wt]), dn = _((ue) => /* @__PURE__ */ s(sr, { color: ue, style: { marginLeft: 7 } }), []), Et = _(
|
|
8012
8014
|
(ue) => {
|
|
8013
8015
|
var Ie;
|
|
8014
8016
|
return (Ie = je.current) == null ? void 0 : Ie[ue.id];
|
|
@@ -8033,9 +8035,9 @@ function hg(t, e) {
|
|
|
8033
8035
|
onColumnChanged: Pe,
|
|
8034
8036
|
onGetColumnsState: ce,
|
|
8035
8037
|
onChangeFirstVisibleRowIndex: U,
|
|
8036
|
-
onGetFirstVisibleRowIndex:
|
|
8038
|
+
onGetFirstVisibleRowIndex: Cn,
|
|
8037
8039
|
selectedRowKeys: At,
|
|
8038
|
-
onSelectionCheckboxClicked:
|
|
8040
|
+
onSelectionCheckboxClicked: xn,
|
|
8039
8041
|
totalRows: b || 99999,
|
|
8040
8042
|
footer: cn,
|
|
8041
8043
|
hasStatusColumn: Ce.status !== null,
|
|
@@ -8059,9 +8061,9 @@ function hg(t, e) {
|
|
|
8059
8061
|
Pe,
|
|
8060
8062
|
ce,
|
|
8061
8063
|
U,
|
|
8062
|
-
Tn,
|
|
8063
|
-
At,
|
|
8064
8064
|
Cn,
|
|
8065
|
+
At,
|
|
8066
|
+
xn,
|
|
8065
8067
|
b,
|
|
8066
8068
|
cn,
|
|
8067
8069
|
dn,
|
|
@@ -8069,25 +8071,25 @@ function hg(t, e) {
|
|
|
8069
8071
|
Ue,
|
|
8070
8072
|
le,
|
|
8071
8073
|
m
|
|
8072
|
-
]),
|
|
8074
|
+
]), Tn = J(Q), Pt = J(N);
|
|
8073
8075
|
ze(() => {
|
|
8074
8076
|
const ue = !ws(
|
|
8075
8077
|
Q,
|
|
8076
|
-
|
|
8078
|
+
Tn.current
|
|
8077
8079
|
), Ie = Pt.current && !N;
|
|
8078
|
-
ue && (Ie || p === "top") &&
|
|
8080
|
+
ue && (Ie || p === "top") && Fn(), Tn.current = Q, Pt.current = N;
|
|
8079
8081
|
}, [Q, N]);
|
|
8080
|
-
const
|
|
8082
|
+
const Fn = _(async () => {
|
|
8081
8083
|
var ue;
|
|
8082
|
-
et([]),
|
|
8084
|
+
et([]), rt(), Ye(), Me.current = void 0, x(!1), (ue = g == null ? void 0 : g.current) == null || ue.refresh(), we();
|
|
8083
8085
|
}, [
|
|
8084
8086
|
et,
|
|
8085
|
-
|
|
8087
|
+
rt,
|
|
8086
8088
|
Ye,
|
|
8087
8089
|
we
|
|
8088
8090
|
]);
|
|
8089
8091
|
Ht(e, () => ({
|
|
8090
|
-
refreshResults:
|
|
8092
|
+
refreshResults: Fn,
|
|
8091
8093
|
getFields: () => I == null ? void 0 : I.fields
|
|
8092
8094
|
}));
|
|
8093
8095
|
const tn = te(
|
|
@@ -8100,7 +8102,7 @@ function hg(t, e) {
|
|
|
8100
8102
|
), Yn = te(
|
|
8101
8103
|
() => ({
|
|
8102
8104
|
fields: { ...M == null ? void 0 : M.fields, ...I == null ? void 0 : I.fields },
|
|
8103
|
-
searchFields:
|
|
8105
|
+
searchFields: Vn([
|
|
8104
8106
|
M == null ? void 0 : M.search_fields,
|
|
8105
8107
|
I == null ? void 0 : I.search_fields
|
|
8106
8108
|
]),
|
|
@@ -8128,8 +8130,8 @@ function hg(t, e) {
|
|
|
8128
8130
|
re
|
|
8129
8131
|
]), fn = _(
|
|
8130
8132
|
({ params: ue, searchValues: Ie }) => {
|
|
8131
|
-
var
|
|
8132
|
-
et([]), (
|
|
8133
|
+
var ot;
|
|
8134
|
+
et([]), (ot = g.current) == null || ot.unselectAll(), oe == null || oe(void 0), se == null || se(ue), re == null || re(Ie);
|
|
8133
8135
|
},
|
|
8134
8136
|
[
|
|
8135
8137
|
et,
|
|
@@ -8141,7 +8143,7 @@ function hg(t, e) {
|
|
|
8141
8143
|
() => ({
|
|
8142
8144
|
isOpen: N,
|
|
8143
8145
|
fields: { ...M == null ? void 0 : M.fields, ...I == null ? void 0 : I.fields },
|
|
8144
|
-
searchFields:
|
|
8146
|
+
searchFields: Vn([
|
|
8145
8147
|
M == null ? void 0 : M.search_fields,
|
|
8146
8148
|
I == null ? void 0 : I.search_fields
|
|
8147
8149
|
]),
|
|
@@ -8160,8 +8162,8 @@ function hg(t, e) {
|
|
|
8160
8162
|
[H]
|
|
8161
8163
|
), $e = _(
|
|
8162
8164
|
({ params: ue, values: Ie }) => {
|
|
8163
|
-
var
|
|
8164
|
-
et([]), (
|
|
8165
|
+
var ot;
|
|
8166
|
+
et([]), (ot = g.current) == null || ot.unselectAll(), oe == null || oe(void 0), se == null || se(ue), re == null || re(Ie), H == null || H(!1);
|
|
8165
8167
|
},
|
|
8166
8168
|
[
|
|
8167
8169
|
et,
|
|
@@ -8201,7 +8203,7 @@ function hg(t, e) {
|
|
|
8201
8203
|
)
|
|
8202
8204
|
}
|
|
8203
8205
|
),
|
|
8204
|
-
/* @__PURE__ */ s("div", { ref: R, style: tn, children: $ || be ? /* @__PURE__ */ s(
|
|
8206
|
+
/* @__PURE__ */ s("div", { ref: R, style: tn, children: $ || be ? /* @__PURE__ */ s(tt, {}) : un })
|
|
8205
8207
|
] });
|
|
8206
8208
|
}
|
|
8207
8209
|
const Vl = Nt(hg), Di = (t, e = "14px -apple-system") => {
|
|
@@ -8255,7 +8257,7 @@ const Vl = Nt(hg), Di = (t, e = "14px -apple-system") => {
|
|
|
8255
8257
|
"{numberOfSelectedRows}",
|
|
8256
8258
|
t.toString()
|
|
8257
8259
|
) + " ",
|
|
8258
|
-
i ? /* @__PURE__ */ s(
|
|
8260
|
+
i ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(ca, { onClick: d, style: { fontWeight: 600 }, children: c.selectAllRecords.replace(
|
|
8259
8261
|
"{totalRecords}",
|
|
8260
8262
|
e.toString()
|
|
8261
8263
|
) })
|
|
@@ -8307,28 +8309,28 @@ const Vl = Nt(hg), Di = (t, e = "14px -apple-system") => {
|
|
|
8307
8309
|
}, [S, x, N]);
|
|
8308
8310
|
Ht(e, () => ({
|
|
8309
8311
|
unselectAll: () => {
|
|
8310
|
-
var
|
|
8311
|
-
(
|
|
8312
|
+
var G;
|
|
8313
|
+
(G = O.current) == null || G.unselectAll();
|
|
8312
8314
|
}
|
|
8313
|
-
})),
|
|
8314
|
-
const
|
|
8315
|
-
E(
|
|
8316
|
-
}, [i, $]),
|
|
8315
|
+
})), ae(() => {
|
|
8316
|
+
const G = Kt(i);
|
|
8317
|
+
E(G), G.string && $ !== G.string && (j == null || j(G.string));
|
|
8318
|
+
}, [i, $]), ae(() => {
|
|
8317
8319
|
if (!S)
|
|
8318
8320
|
return;
|
|
8319
8321
|
T.current = !1;
|
|
8320
|
-
const
|
|
8321
|
-
k(
|
|
8322
|
-
}, [a]),
|
|
8322
|
+
const G = sn(S, a);
|
|
8323
|
+
k(G);
|
|
8324
|
+
}, [a]), ae(() => {
|
|
8323
8325
|
I.current = r;
|
|
8324
8326
|
}, [r]);
|
|
8325
|
-
const B = (n - 1) * I.current + 1, U = B - 1 + C.length, K = o === void 0 ? null : o === 0 ? D("no_results") : D("summary").replace("{from}", B == null ? void 0 : B.toString()).replace("{to}", U == null ? void 0 : U.toString()).replace("{total}", o == null ? void 0 : o.toString()),
|
|
8327
|
+
const B = (n - 1) * I.current + 1, U = B - 1 + C.length, K = o === void 0 ? null : o === 0 ? D("no_results") : D("summary").replace("{from}", B == null ? void 0 : B.toString()).replace("{to}", U == null ? void 0 : U.toString()).replace("{total}", o == null ? void 0 : o.toString()), q = te(() => {
|
|
8326
8328
|
if (!f || i.isExpandable)
|
|
8327
8329
|
return null;
|
|
8328
|
-
const
|
|
8330
|
+
const G = C == null ? void 0 : C.filter(
|
|
8329
8331
|
(oe) => u && u.includes(oe.id)
|
|
8330
8332
|
).length;
|
|
8331
|
-
return c ? null : o === void 0 ? /* @__PURE__ */ s(
|
|
8333
|
+
return c ? null : o === void 0 ? /* @__PURE__ */ s(tt, { className: "pb-4" }) : /* @__PURE__ */ L(qe, { align: "bottom", className: "pb-4", children: [
|
|
8332
8334
|
/* @__PURE__ */ s(Ee, { span: R ? 8 : 12, children: /* @__PURE__ */ s(
|
|
8333
8335
|
wc,
|
|
8334
8336
|
{
|
|
@@ -8342,7 +8344,7 @@ const Vl = Nt(hg), Di = (t, e = "14px -apple-system") => {
|
|
|
8342
8344
|
R && /* @__PURE__ */ s(Ee, { span: 8, className: "text-center", children: /* @__PURE__ */ s(
|
|
8343
8345
|
vg,
|
|
8344
8346
|
{
|
|
8345
|
-
numberOfVisibleSelectedRows:
|
|
8347
|
+
numberOfVisibleSelectedRows: G,
|
|
8346
8348
|
numberOfRealSelectedRows: (u == null ? void 0 : u.length) || 0,
|
|
8347
8349
|
numberOfTotalRows: C.length,
|
|
8348
8350
|
totalRecords: o || 0,
|
|
@@ -8365,20 +8367,20 @@ const Vl = Nt(hg), Di = (t, e = "14px -apple-system") => {
|
|
|
8365
8367
|
]), se = te(() => {
|
|
8366
8368
|
if (!S)
|
|
8367
8369
|
return null;
|
|
8368
|
-
const
|
|
8369
|
-
if (!
|
|
8370
|
+
const G = S.columns.filter((X) => X.sum !== void 0).map((X) => ({ label: X.sum, field: X.id }));
|
|
8371
|
+
if (!G || G.length === 0)
|
|
8370
8372
|
return null;
|
|
8371
|
-
const oe = [],
|
|
8372
|
-
return
|
|
8373
|
-
const ne =
|
|
8373
|
+
const oe = [], ie = (u == null ? void 0 : u.length) > 0 ? C.filter((X) => u.includes(X.id)) : C;
|
|
8374
|
+
return G.forEach((X) => {
|
|
8375
|
+
const ne = ie.reduce((de, Y) => Y[X.field] && !isNaN(Y[X.field]) ? de + Y[X.field] : de, 0);
|
|
8374
8376
|
oe.push(`${X.label}: ${Math.round(ne * 100) / 100}`);
|
|
8375
8377
|
}), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: oe.join(", ") });
|
|
8376
8378
|
}, [C, u, S]), ee = te(() => {
|
|
8377
8379
|
if (S !== null && H && H.length > 0)
|
|
8378
8380
|
return gg(H, C, 600);
|
|
8379
|
-
}, [H, C, S]), Q = te(() => m && (S != null && S.columns.some((
|
|
8380
|
-
return S === null || !ee || ((re = ee == null ? void 0 : ee.columns) == null ? void 0 : re.length) === 0 ? /* @__PURE__ */ s(
|
|
8381
|
-
|
|
8381
|
+
}, [H, C, S]), Q = te(() => m && (S != null && S.columns.some((G) => G.sum !== void 0)) ? m - 30 : m, [m, S == null ? void 0 : S.columns]);
|
|
8382
|
+
return S === null || !ee || ((re = ee == null ? void 0 : ee.columns) == null ? void 0 : re.length) === 0 ? /* @__PURE__ */ s(tt, { style: { padding: "2rem" } }) : /* @__PURE__ */ L(Fr, { children: [
|
|
8383
|
+
q,
|
|
8382
8384
|
/* @__PURE__ */ s(
|
|
8383
8385
|
wd,
|
|
8384
8386
|
{
|
|
@@ -8387,14 +8389,14 @@ const Vl = Nt(hg), Di = (t, e = "14px -apple-system") => {
|
|
|
8387
8389
|
columns: ee.columns,
|
|
8388
8390
|
dataSource: C,
|
|
8389
8391
|
loading: c,
|
|
8390
|
-
loadingComponent: /* @__PURE__ */ s(
|
|
8391
|
-
onRowStyle: (
|
|
8392
|
-
if (g[
|
|
8393
|
-
return { color: g[
|
|
8392
|
+
loadingComponent: /* @__PURE__ */ s(tt, {}),
|
|
8393
|
+
onRowStyle: (G) => {
|
|
8394
|
+
if (g[G.id])
|
|
8395
|
+
return { color: g[G.id] };
|
|
8394
8396
|
},
|
|
8395
|
-
onRowStatus: vu(h) ? (
|
|
8396
|
-
if (h[
|
|
8397
|
-
return /* @__PURE__ */ s(sr, { color: h[
|
|
8397
|
+
onRowStatus: vu(h) ? (G) => {
|
|
8398
|
+
if (h[G.id])
|
|
8399
|
+
return /* @__PURE__ */ s(sr, { color: h[G.id] });
|
|
8398
8400
|
} : void 0,
|
|
8399
8401
|
onRowDoubleClick: d,
|
|
8400
8402
|
onRowSelectionChange: p,
|
|
@@ -8442,12 +8444,12 @@ const Ll = (t) => {
|
|
|
8442
8444
|
searchParams: P = [],
|
|
8443
8445
|
setSearchValues: R,
|
|
8444
8446
|
clearSelection: O
|
|
8445
|
-
} = t, [C, k] = F(!1), [T, S] = F(!1), [E, D] = F(), [I, M] = F(1), [$, j] = F(0), [N, H] = F(), [B, U] = F([]), [K,
|
|
8447
|
+
} = t, [C, k] = F(!1), [T, S] = F(!1), [E, D] = F(), [I, M] = F(1), [$, j] = F(0), [N, H] = F(), [B, U] = F([]), [K, q] = F(void 0), [se, ee] = F(void 0), Q = J(A || St), re = J([]), G = _(
|
|
8446
8448
|
(he) => {
|
|
8447
8449
|
y == null || y([...he]), U([...he]);
|
|
8448
8450
|
},
|
|
8449
8451
|
[y]
|
|
8450
|
-
), oe = _(() => v || B, [v, B]),
|
|
8452
|
+
), oe = _(() => v || B, [v, B]), ie = _(async () => {
|
|
8451
8453
|
const he = await V.getHandler().nameSearch({
|
|
8452
8454
|
model: e,
|
|
8453
8455
|
payload: l,
|
|
@@ -8466,18 +8468,18 @@ const Ll = (t) => {
|
|
|
8466
8468
|
context: d,
|
|
8467
8469
|
attrs: Ce
|
|
8468
8470
|
}), je = Te[0];
|
|
8469
|
-
re.current = [...je],
|
|
8470
|
-
const Qe = je.map((Xe) => Xe.id),
|
|
8471
|
+
re.current = [...je], q($n(Te[1])), ee(Ar(Te[1]));
|
|
8472
|
+
const Qe = je.map((Xe) => Xe.id), rt = m !== void 0 ? On({
|
|
8471
8473
|
resultsToSort: je,
|
|
8472
8474
|
sorter: m,
|
|
8473
8475
|
fields: { ...u.fields, ...p.fields }
|
|
8474
8476
|
}) : [...re.current];
|
|
8475
|
-
|
|
8477
|
+
G(rt), Qe.length > 0 ? h == null || h(0) : h == null || h(void 0);
|
|
8476
8478
|
} else
|
|
8477
|
-
|
|
8479
|
+
G([]), h == null || h(void 0);
|
|
8478
8480
|
k(!1), c.current = !0;
|
|
8479
8481
|
}, [
|
|
8480
|
-
|
|
8482
|
+
G,
|
|
8481
8483
|
c,
|
|
8482
8484
|
l,
|
|
8483
8485
|
e,
|
|
@@ -8492,7 +8494,7 @@ const Ll = (t) => {
|
|
|
8492
8494
|
async (he) => {
|
|
8493
8495
|
const { params: Me, newOffset: Re } = he || {}, De = Xt(Me || P, b), { colors: Ce, status: Te } = Kt(u), je = {};
|
|
8494
8496
|
Ce && (je.colors = Ce), Te && (je.status = Te);
|
|
8495
|
-
const { totalItems: Qe, results:
|
|
8497
|
+
const { totalItems: Qe, results: rt, attrsEvaluated: Xe } = await V.getHandler().searchForTree({
|
|
8496
8498
|
params: De,
|
|
8497
8499
|
limit: Q.current,
|
|
8498
8500
|
offset: Re || $,
|
|
@@ -8501,13 +8503,13 @@ const Ll = (t) => {
|
|
|
8501
8503
|
context: d,
|
|
8502
8504
|
attrs: je
|
|
8503
8505
|
});
|
|
8504
|
-
|
|
8505
|
-
const we = m !== void 0 ?
|
|
8506
|
-
resultsToSort:
|
|
8506
|
+
q($n(Xe)), ee(Ar(Xe)), re.current = [...rt];
|
|
8507
|
+
const we = m !== void 0 ? On({
|
|
8508
|
+
resultsToSort: rt,
|
|
8507
8509
|
sorter: m,
|
|
8508
8510
|
fields: { ...u.fields, ...p.fields }
|
|
8509
8511
|
}) : [...re.current];
|
|
8510
|
-
if (
|
|
8512
|
+
if (G(we), v && we.length > 0) {
|
|
8511
8513
|
const Be = we.findIndex(
|
|
8512
8514
|
(Ze) => w === Ze.id
|
|
8513
8515
|
);
|
|
@@ -8521,7 +8523,7 @@ const Ll = (t) => {
|
|
|
8521
8523
|
[
|
|
8522
8524
|
h,
|
|
8523
8525
|
v,
|
|
8524
|
-
|
|
8526
|
+
G,
|
|
8525
8527
|
w,
|
|
8526
8528
|
e,
|
|
8527
8529
|
d,
|
|
@@ -8536,7 +8538,7 @@ const Ll = (t) => {
|
|
|
8536
8538
|
), ne = _(
|
|
8537
8539
|
async (he) => {
|
|
8538
8540
|
try {
|
|
8539
|
-
k(!0), a == null || a(!0), l && !c.current ? await
|
|
8541
|
+
k(!0), a == null || a(!0), l && !c.current ? await ie() : await X(he), O == null || O();
|
|
8540
8542
|
} catch (Me) {
|
|
8541
8543
|
D(typeof Me == "string" ? Me : Me.message), k(!1);
|
|
8542
8544
|
} finally {
|
|
@@ -8546,7 +8548,7 @@ const Ll = (t) => {
|
|
|
8546
8548
|
[
|
|
8547
8549
|
O,
|
|
8548
8550
|
l,
|
|
8549
|
-
|
|
8551
|
+
ie,
|
|
8550
8552
|
c,
|
|
8551
8553
|
X,
|
|
8552
8554
|
r,
|
|
@@ -8557,12 +8559,12 @@ const Ll = (t) => {
|
|
|
8557
8559
|
if (JSON.stringify(he) === JSON.stringify(m))
|
|
8558
8560
|
return;
|
|
8559
8561
|
g == null || g(he);
|
|
8560
|
-
const Me = he !== void 0 ?
|
|
8562
|
+
const Me = he !== void 0 ? On({
|
|
8561
8563
|
resultsToSort: oe(),
|
|
8562
8564
|
sorter: he,
|
|
8563
8565
|
fields: { ...u.fields, ...p.fields }
|
|
8564
8566
|
}) : [...re.current];
|
|
8565
|
-
|
|
8567
|
+
G(Me);
|
|
8566
8568
|
},
|
|
8567
8569
|
[
|
|
8568
8570
|
m,
|
|
@@ -8570,9 +8572,9 @@ const Ll = (t) => {
|
|
|
8570
8572
|
oe,
|
|
8571
8573
|
u == null ? void 0 : u.fields,
|
|
8572
8574
|
p == null ? void 0 : p.fields,
|
|
8573
|
-
|
|
8575
|
+
G
|
|
8574
8576
|
]
|
|
8575
|
-
),
|
|
8577
|
+
), Y = _(
|
|
8576
8578
|
(he) => {
|
|
8577
8579
|
const { params: Me, searchValues: Re, limit: De, offset: Ce } = he;
|
|
8578
8580
|
C || (n == null || n(void 0), r == null || r([]), R == null || R(Re), o == null || o(Me), i == null || i(!1), S(!0), D(void 0), M(1), De && (Q.current = De, x == null || x(De)), Ce && j(Ce), ne({
|
|
@@ -8612,9 +8614,9 @@ const Ll = (t) => {
|
|
|
8612
8614
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
8613
8615
|
context: d
|
|
8614
8616
|
});
|
|
8615
|
-
return
|
|
8617
|
+
return G([...oe(), ...Re]), sn(Kt(u), Re);
|
|
8616
8618
|
},
|
|
8617
|
-
[u, e, d, oe,
|
|
8619
|
+
[u, e, d, oe, G]
|
|
8618
8620
|
), Fe = _(async () => await V.getHandler().searchAllIds({
|
|
8619
8621
|
params: Xt(P, b),
|
|
8620
8622
|
model: e,
|
|
@@ -8622,7 +8624,7 @@ const Ll = (t) => {
|
|
|
8622
8624
|
totalItems: N
|
|
8623
8625
|
}), [e, d, N, P, b]);
|
|
8624
8626
|
return {
|
|
8625
|
-
submit:
|
|
8627
|
+
submit: Y,
|
|
8626
8628
|
clear: ve,
|
|
8627
8629
|
fetchResults: ne,
|
|
8628
8630
|
tableRefreshing: C,
|
|
@@ -8656,7 +8658,7 @@ function bg(t, e) {
|
|
|
8656
8658
|
parentContext: u = {},
|
|
8657
8659
|
onChangeSelectedRowKeys: p
|
|
8658
8660
|
} = t, [m, g] = F(!1), [h, y] = F(!1), v = J(!1), b = J(null), [w, A] = F(), [x, P] = F(), [R, O] = F(), [C, k] = F(), [T, S] = F(200), E = J(), { height: D } = zr(), I = me(
|
|
8659
|
-
|
|
8661
|
+
wn
|
|
8660
8662
|
), { processAction: M } = I || {}, $ = me(
|
|
8661
8663
|
_t
|
|
8662
8664
|
), {
|
|
@@ -8666,18 +8668,18 @@ function bg(t, e) {
|
|
|
8666
8668
|
results: B = void 0,
|
|
8667
8669
|
selectedRowItems: U = void 0,
|
|
8668
8670
|
setSelectedRowItems: K = void 0,
|
|
8669
|
-
searchParams:
|
|
8671
|
+
searchParams: q = [],
|
|
8670
8672
|
setSearchParams: se = void 0,
|
|
8671
8673
|
searchVisible: ee = !0,
|
|
8672
8674
|
setSearchVisible: Q = void 0,
|
|
8673
8675
|
sorter: re = void 0,
|
|
8674
|
-
setSorter:
|
|
8676
|
+
setSorter: G = void 0,
|
|
8675
8677
|
setTotalItems: oe = void 0,
|
|
8676
|
-
setSearchTreeNameSearch:
|
|
8678
|
+
setSearchTreeNameSearch: ie = void 0,
|
|
8677
8679
|
setTreeIsLoading: X = void 0,
|
|
8678
8680
|
searchValues: ne = {},
|
|
8679
8681
|
setSearchValues: de = void 0,
|
|
8680
|
-
limit:
|
|
8682
|
+
limit: Y = St,
|
|
8681
8683
|
setLimit: le = void 0
|
|
8682
8684
|
} = (f ? $ : {}) || {}, { showErrorNotification: ve } = ht(), fe = _(
|
|
8683
8685
|
(Ve) => {
|
|
@@ -8694,7 +8696,7 @@ function bg(t, e) {
|
|
|
8694
8696
|
page: Te,
|
|
8695
8697
|
limit: je,
|
|
8696
8698
|
offset: Qe,
|
|
8697
|
-
getResults:
|
|
8699
|
+
getResults: rt,
|
|
8698
8700
|
requestPageChange: Xe,
|
|
8699
8701
|
changeSort: we,
|
|
8700
8702
|
fetchChildrenForRecord: Ge,
|
|
@@ -8704,11 +8706,11 @@ function bg(t, e) {
|
|
|
8704
8706
|
getAllIds: Ae
|
|
8705
8707
|
} = Ll({
|
|
8706
8708
|
model: w,
|
|
8707
|
-
setSearchTreeNameSearch:
|
|
8709
|
+
setSearchTreeNameSearch: ie,
|
|
8708
8710
|
setSelectedRowItems: fe,
|
|
8709
8711
|
setSearchParams: se,
|
|
8710
8712
|
setSearchValues: de,
|
|
8711
|
-
searchParams:
|
|
8713
|
+
searchParams: q,
|
|
8712
8714
|
setSearchVisible: Q,
|
|
8713
8715
|
setTreeIsLoading: X,
|
|
8714
8716
|
nameSearch: a,
|
|
@@ -8717,14 +8719,14 @@ function bg(t, e) {
|
|
|
8717
8719
|
formView: R,
|
|
8718
8720
|
treeView: x,
|
|
8719
8721
|
sorter: re,
|
|
8720
|
-
setSorter:
|
|
8722
|
+
setSorter: G,
|
|
8721
8723
|
setCurrentItemIndex: N,
|
|
8722
8724
|
setResultsActionView: j,
|
|
8723
8725
|
resultsActionView: B,
|
|
8724
8726
|
domain: c,
|
|
8725
8727
|
currentId: H,
|
|
8726
8728
|
setActionViewTotalItems: oe,
|
|
8727
|
-
limit:
|
|
8729
|
+
limit: Y,
|
|
8728
8730
|
setLimit: le,
|
|
8729
8731
|
clearSelection: (et = b.current) == null ? void 0 : et.unselectAll
|
|
8730
8732
|
});
|
|
@@ -8733,7 +8735,7 @@ function bg(t, e) {
|
|
|
8733
8735
|
v.current = !1, Me();
|
|
8734
8736
|
},
|
|
8735
8737
|
getFields: () => x == null ? void 0 : x.fields
|
|
8736
|
-
})),
|
|
8738
|
+
})), ae(() => {
|
|
8737
8739
|
h && d && x && (v.current = !1, Me());
|
|
8738
8740
|
}, [Te, Qe, h, d, a, x]);
|
|
8739
8741
|
const Ue = async () => {
|
|
@@ -8760,10 +8762,10 @@ function bg(t, e) {
|
|
|
8760
8762
|
context: u
|
|
8761
8763
|
})), O(Ve), P(dt);
|
|
8762
8764
|
};
|
|
8763
|
-
|
|
8765
|
+
ae(() => {
|
|
8764
8766
|
Ue();
|
|
8765
8767
|
}, [n]);
|
|
8766
|
-
const
|
|
8768
|
+
const W = _(
|
|
8767
8769
|
(Ve) => {
|
|
8768
8770
|
le == null || le(Ve);
|
|
8769
8771
|
},
|
|
@@ -8818,16 +8820,16 @@ function bg(t, e) {
|
|
|
8818
8820
|
to,
|
|
8819
8821
|
{
|
|
8820
8822
|
fields: { ...R.fields, ...x.fields },
|
|
8821
|
-
searchFields:
|
|
8823
|
+
searchFields: Vn([
|
|
8822
8824
|
R.search_fields,
|
|
8823
8825
|
x.search_fields
|
|
8824
8826
|
]),
|
|
8825
8827
|
onClear: he,
|
|
8826
|
-
limit:
|
|
8828
|
+
limit: Y,
|
|
8827
8829
|
offset: Qe,
|
|
8828
8830
|
isSearching: De,
|
|
8829
8831
|
onSubmit: Fe,
|
|
8830
|
-
onLimitChange:
|
|
8832
|
+
onLimitChange: W,
|
|
8831
8833
|
setSearchFilterHeight: S,
|
|
8832
8834
|
searchError: Ce,
|
|
8833
8835
|
searchVisible: ee,
|
|
@@ -8843,7 +8845,7 @@ function bg(t, e) {
|
|
|
8843
8845
|
limit: je,
|
|
8844
8846
|
page: Te,
|
|
8845
8847
|
treeView: x,
|
|
8846
|
-
results:
|
|
8848
|
+
results: rt(),
|
|
8847
8849
|
onRequestPageChange: Xe,
|
|
8848
8850
|
loading: Re,
|
|
8849
8851
|
onRowClicked: ce,
|
|
@@ -8868,12 +8870,12 @@ function bg(t, e) {
|
|
|
8868
8870
|
Be,
|
|
8869
8871
|
Ge,
|
|
8870
8872
|
R,
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
+
rt,
|
|
8874
|
+
Y,
|
|
8873
8875
|
je,
|
|
8874
8876
|
Qe,
|
|
8875
8877
|
ce,
|
|
8876
|
-
|
|
8878
|
+
W,
|
|
8877
8879
|
Te,
|
|
8878
8880
|
u,
|
|
8879
8881
|
Xe,
|
|
@@ -8892,7 +8894,7 @@ function bg(t, e) {
|
|
|
8892
8894
|
l,
|
|
8893
8895
|
x
|
|
8894
8896
|
]), gt = C || Ce;
|
|
8895
|
-
return gt ? (console.error(gt), /* @__PURE__ */ s(Tt, { className: "mt-10", message: gt, type: "error", banner: !0 })) : /* @__PURE__ */ s("div", { style: d ? {} : { display: "none" }, children: m ? /* @__PURE__ */ s(
|
|
8897
|
+
return gt ? (console.error(gt), /* @__PURE__ */ s(Tt, { className: "mt-10", message: gt, type: "error", banner: !0 })) : /* @__PURE__ */ s("div", { style: d ? {} : { display: "none" }, children: m ? /* @__PURE__ */ s(tt, {}) : Ft() });
|
|
8896
8898
|
}
|
|
8897
8899
|
const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
8898
8900
|
const {
|
|
@@ -8935,7 +8937,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
8935
8937
|
setOrder: H,
|
|
8936
8938
|
limit: B,
|
|
8937
8939
|
setLimit: U
|
|
8938
|
-
} = Al({ useLocalState: !i }), { treeMaxLimit: K } = zt(),
|
|
8940
|
+
} = Al({ useLocalState: !i }), { treeMaxLimit: K } = zt(), q = Math.min(B, K), [se, ee] = F(!0), [Q, re] = F(), [G, oe] = F([]), [ie, X] = F(!1), ne = a || k, de = J(ne), Y = J(O), le = J(g), ve = J(), fe = J([]), Fe = J(!1), he = (r == null ? void 0 : r.fields_in_conditions) !== void 0, Me = te(() => qa({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), [Re, De] = _e(
|
|
8939
8941
|
V.getHandler().parseConditions
|
|
8940
8942
|
), {
|
|
8941
8943
|
fetchColumnState: Ce,
|
|
@@ -8945,7 +8947,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
8945
8947
|
} = ds({
|
|
8946
8948
|
key: Me,
|
|
8947
8949
|
treeViewFetching: e
|
|
8948
|
-
}),
|
|
8950
|
+
}), rt = _((Se) => {
|
|
8949
8951
|
fe.current = fe.current.map(($e) => {
|
|
8950
8952
|
const Je = Se.find((ue) => ue.id === $e.id);
|
|
8951
8953
|
return { ...$e, ...Je };
|
|
@@ -8972,11 +8974,11 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
8972
8974
|
tableRef: l,
|
|
8973
8975
|
context: d,
|
|
8974
8976
|
isActive: M,
|
|
8975
|
-
onResultsUpdated:
|
|
8977
|
+
onResultsUpdated: rt,
|
|
8976
8978
|
treeOoui: n,
|
|
8977
8979
|
updateAttributes: Ge,
|
|
8978
8980
|
results: E
|
|
8979
|
-
}), { clear:
|
|
8981
|
+
}), { clear: W } = Rl({
|
|
8980
8982
|
model: o,
|
|
8981
8983
|
tableRef: l,
|
|
8982
8984
|
autorefreshableFields: n == null ? void 0 : n.autorefreshableFields,
|
|
@@ -9033,7 +9035,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9033
9035
|
},
|
|
9034
9036
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9035
9037
|
[]
|
|
9036
|
-
),
|
|
9038
|
+
), xn = _(() => {
|
|
9037
9039
|
var Se;
|
|
9038
9040
|
y([]), (Se = l.current) == null || Se.unselectAll(), T == null || T(void 0), P == null || P([]), C == null || C(void 0);
|
|
9039
9041
|
}, [
|
|
@@ -9042,7 +9044,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9042
9044
|
T,
|
|
9043
9045
|
P,
|
|
9044
9046
|
C
|
|
9045
|
-
]),
|
|
9047
|
+
]), Cn = _(
|
|
9046
9048
|
({ params: Se, searchValues: $e }) => {
|
|
9047
9049
|
var Je;
|
|
9048
9050
|
y([]), (Je = l.current) == null || Je.unselectAll(), T == null || T(void 0), P == null || P(Se), C == null || C($e);
|
|
@@ -9071,24 +9073,24 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9071
9073
|
h
|
|
9072
9074
|
]
|
|
9073
9075
|
);
|
|
9074
|
-
|
|
9076
|
+
ae(() => {
|
|
9075
9077
|
if (!e)
|
|
9076
9078
|
return () => {
|
|
9077
9079
|
Pe(), He(), gt();
|
|
9078
9080
|
};
|
|
9079
|
-
}, [e]),
|
|
9081
|
+
}, [e]), ae(() => () => {
|
|
9080
9082
|
De();
|
|
9081
9083
|
}, []), ze(() => {
|
|
9082
9084
|
!n || !r || e || Et();
|
|
9083
9085
|
}, [
|
|
9084
9086
|
r,
|
|
9085
9087
|
n,
|
|
9086
|
-
|
|
9088
|
+
q,
|
|
9087
9089
|
$,
|
|
9088
9090
|
ne,
|
|
9089
9091
|
c,
|
|
9090
9092
|
N
|
|
9091
|
-
]),
|
|
9093
|
+
]), ae(() => {
|
|
9092
9094
|
var Se;
|
|
9093
9095
|
if (ne !== de.current) {
|
|
9094
9096
|
if (ne !== void 0 && de.current === void 0 || typeof ne == "string" && typeof de.current == "string" && ne !== de.current) {
|
|
@@ -9100,9 +9102,9 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9100
9102
|
}, [ne]), ze(() => {
|
|
9101
9103
|
const Se = !ws(
|
|
9102
9104
|
O,
|
|
9103
|
-
|
|
9105
|
+
Y.current
|
|
9104
9106
|
), $e = le.current && !g;
|
|
9105
|
-
Se && ($e || f === "top") && un(),
|
|
9107
|
+
Se && ($e || f === "top") && un(), Y.current = O, le.current = g;
|
|
9106
9108
|
}, [O, g]);
|
|
9107
9109
|
const Et = _(async () => {
|
|
9108
9110
|
if (!n || e)
|
|
@@ -9126,8 +9128,8 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9126
9128
|
!ne && dt() && Ut();
|
|
9127
9129
|
const { results: ue, attrsEvaluated: Ie } = await Oe({
|
|
9128
9130
|
params: $e,
|
|
9129
|
-
limit:
|
|
9130
|
-
offset: (($ || 1) - 1) *
|
|
9131
|
+
limit: q,
|
|
9132
|
+
offset: (($ || 1) - 1) * q,
|
|
9131
9133
|
model: o,
|
|
9132
9134
|
fields: r.field_parent ? { ...r.fields, [r.field_parent]: {} } : r.fields,
|
|
9133
9135
|
context: d,
|
|
@@ -9148,8 +9150,8 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9148
9150
|
fe.current = [], re(0), I(0), oe([]), m(!1);
|
|
9149
9151
|
return;
|
|
9150
9152
|
}
|
|
9151
|
-
const
|
|
9152
|
-
Ge(Ie, n), m(!1), fe.current = [...
|
|
9153
|
+
const ot = sn(n, ue);
|
|
9154
|
+
Ge(Ie, n), m(!1), fe.current = [...ot], oe([...ot]);
|
|
9153
9155
|
} catch (Se) {
|
|
9154
9156
|
throw m(!1), be(Se), console.error(Se), Se;
|
|
9155
9157
|
} finally {
|
|
@@ -9167,7 +9169,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9167
9169
|
Ue,
|
|
9168
9170
|
dt,
|
|
9169
9171
|
Oe,
|
|
9170
|
-
|
|
9172
|
+
q,
|
|
9171
9173
|
$,
|
|
9172
9174
|
o,
|
|
9173
9175
|
r,
|
|
@@ -9180,17 +9182,17 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9180
9182
|
I,
|
|
9181
9183
|
be
|
|
9182
9184
|
]), un = _(async () => {
|
|
9183
|
-
Be(),
|
|
9185
|
+
Be(), W(), ee(!0), v(0), Ce(), y([]), ve.current = void 0, ne || Ye(), await Et();
|
|
9184
9186
|
}, [
|
|
9185
9187
|
Be,
|
|
9186
|
-
|
|
9188
|
+
W,
|
|
9187
9189
|
v,
|
|
9188
9190
|
Ce,
|
|
9189
9191
|
y,
|
|
9190
9192
|
ne,
|
|
9191
9193
|
Et,
|
|
9192
9194
|
Ye
|
|
9193
|
-
]),
|
|
9195
|
+
]), Tn = _(
|
|
9194
9196
|
(Se, $e) => {
|
|
9195
9197
|
if ($e === -1) {
|
|
9196
9198
|
u == null || u("infinite");
|
|
@@ -9211,13 +9213,13 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9211
9213
|
model: o,
|
|
9212
9214
|
context: d,
|
|
9213
9215
|
totalItems: Q
|
|
9214
|
-
}), [Ft, O, c, o, d, Q]),
|
|
9216
|
+
}), [Ft, O, c, o, d, Q]), Fn = _(async () => {
|
|
9215
9217
|
const Se = await Pt();
|
|
9216
9218
|
y == null || y(Se.map(($e) => ({ id: $e })));
|
|
9217
|
-
}, [Pt, y]), tn = te(() => Ve.length === 0 ? "unchecked" : Ve.length ===
|
|
9219
|
+
}, [Pt, y]), tn = te(() => Ve.length === 0 ? "unchecked" : Ve.length === q && q > 0 || Ve.length === Q ? "checked" : "indeterminate", [Ve, q, Q]), Yn = _(() => {
|
|
9218
9220
|
var Se, $e;
|
|
9219
|
-
tn === "unchecked" ? ((Se = l.current) == null || Se.selectAll(), y(
|
|
9220
|
-
}, [l, y,
|
|
9221
|
+
tn === "unchecked" ? ((Se = l.current) == null || Se.selectAll(), y(G.map((Je) => ({ id: Je.id })))) : (y([]), ($e = l.current) == null || $e.unselectAll());
|
|
9222
|
+
}, [l, y, G, tn]), nn = _(
|
|
9221
9223
|
(Se) => {
|
|
9222
9224
|
H(Se), v(0), A(void 0), j(1);
|
|
9223
9225
|
},
|
|
@@ -9231,13 +9233,13 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9231
9233
|
({ id: Se, selected: $e }) => {
|
|
9232
9234
|
y((Je) => {
|
|
9233
9235
|
if ($e) {
|
|
9234
|
-
const ue =
|
|
9236
|
+
const ue = G.find((Ie) => Ie.id === Se);
|
|
9235
9237
|
return ue && !Je.some((Ie) => Ie.id === Se) ? [...Je, ue] : Je;
|
|
9236
9238
|
}
|
|
9237
9239
|
return Je.filter((ue) => ue.id !== Se);
|
|
9238
9240
|
});
|
|
9239
9241
|
},
|
|
9240
|
-
[
|
|
9242
|
+
[G, y]
|
|
9241
9243
|
), Wt = _(
|
|
9242
9244
|
async (Se) => {
|
|
9243
9245
|
var Lt;
|
|
@@ -9252,20 +9254,20 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9252
9254
|
ids: $e,
|
|
9253
9255
|
fields: Je,
|
|
9254
9256
|
context: d
|
|
9255
|
-
}), Ie = sn(n, ue),
|
|
9257
|
+
}), Ie = sn(n, ue), ot = [...G, ...Ie], at = or({
|
|
9256
9258
|
treeOoui: n
|
|
9257
9259
|
});
|
|
9258
9260
|
try {
|
|
9259
9261
|
const kt = await Re({
|
|
9260
9262
|
conditions: at,
|
|
9261
|
-
values:
|
|
9263
|
+
values: ot,
|
|
9262
9264
|
context: d
|
|
9263
9265
|
});
|
|
9264
9266
|
Ge(kt, n), (Lt = l == null ? void 0 : l.current) == null || Lt.refreshRowStyles();
|
|
9265
9267
|
} catch (kt) {
|
|
9266
9268
|
console.error(kt);
|
|
9267
9269
|
}
|
|
9268
|
-
return fe.current = [...
|
|
9270
|
+
return fe.current = [...ot], oe([...ot]), Ae(ue.map((kt) => kt.id)), Ie;
|
|
9269
9271
|
},
|
|
9270
9272
|
[
|
|
9271
9273
|
r,
|
|
@@ -9273,7 +9275,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9273
9275
|
o,
|
|
9274
9276
|
d,
|
|
9275
9277
|
n,
|
|
9276
|
-
|
|
9278
|
+
G,
|
|
9277
9279
|
Ae,
|
|
9278
9280
|
Re,
|
|
9279
9281
|
Ge,
|
|
@@ -9290,24 +9292,24 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9290
9292
|
onGetFirstVisibleRowIndex: At,
|
|
9291
9293
|
setTreeFirstVisibleRow: v,
|
|
9292
9294
|
onRowHasBeenSelected: fn,
|
|
9293
|
-
onSearchFilterClear:
|
|
9294
|
-
onSearchFilterSubmit:
|
|
9295
|
+
onSearchFilterClear: xn,
|
|
9296
|
+
onSearchFilterSubmit: Cn,
|
|
9295
9297
|
onSideSearchFilterClose: cn,
|
|
9296
9298
|
onSideSearchFilterSubmit: dn,
|
|
9297
9299
|
totalRowsLoading: se,
|
|
9298
9300
|
totalRows: Q,
|
|
9299
9301
|
onRowStyle: ft,
|
|
9300
|
-
results:
|
|
9301
|
-
onRequestPageChange:
|
|
9302
|
+
results: G,
|
|
9303
|
+
onRequestPageChange: Tn,
|
|
9302
9304
|
treeIsLoading: p,
|
|
9303
|
-
selectAllRecords:
|
|
9305
|
+
selectAllRecords: Fn,
|
|
9304
9306
|
onHeaderCheckboxClick: Yn,
|
|
9305
9307
|
headerCheckboxState: tn,
|
|
9306
9308
|
getColumnStateInProgress: Te,
|
|
9307
9309
|
getColumnState: je,
|
|
9308
9310
|
updateColumnState: Qe,
|
|
9309
9311
|
currentPage: $,
|
|
9310
|
-
limit:
|
|
9312
|
+
limit: q,
|
|
9311
9313
|
order: N,
|
|
9312
9314
|
setOrder: H,
|
|
9313
9315
|
setTreeFirstVisibleColumn: A,
|
|
@@ -9315,7 +9317,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9315
9317
|
onSortChange: nn,
|
|
9316
9318
|
isFieldLoading: Ze,
|
|
9317
9319
|
setSearchVisible: h,
|
|
9318
|
-
nameSearchFetchCompleted:
|
|
9320
|
+
nameSearchFetchCompleted: ie,
|
|
9319
9321
|
nameSearch: ne,
|
|
9320
9322
|
fetchChildrenForRecord: Wt
|
|
9321
9323
|
};
|
|
@@ -9333,7 +9335,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9333
9335
|
const d = te(
|
|
9334
9336
|
() => ({
|
|
9335
9337
|
fields: { ...e == null ? void 0 : e.fields, ...n == null ? void 0 : n.fields },
|
|
9336
|
-
searchFields:
|
|
9338
|
+
searchFields: Vn([
|
|
9337
9339
|
e == null ? void 0 : e.search_fields,
|
|
9338
9340
|
n == null ? void 0 : n.search_fields
|
|
9339
9341
|
]),
|
|
@@ -9355,7 +9357,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9355
9357
|
() => ({
|
|
9356
9358
|
isOpen: r,
|
|
9357
9359
|
fields: { ...e == null ? void 0 : e.fields, ...n == null ? void 0 : n.fields },
|
|
9358
|
-
searchFields:
|
|
9360
|
+
searchFields: Vn([
|
|
9359
9361
|
e == null ? void 0 : e.search_fields,
|
|
9360
9362
|
n == null ? void 0 : n.search_fields
|
|
9361
9363
|
]),
|
|
@@ -9470,7 +9472,7 @@ const Hl = Nt(bg), wg = St, Sg = (t) => {
|
|
|
9470
9472
|
jl.displayName = "PaginatedTableComponent";
|
|
9471
9473
|
const Ao = (t) => {
|
|
9472
9474
|
const e = J(t);
|
|
9473
|
-
return
|
|
9475
|
+
return ae(() => {
|
|
9474
9476
|
e.current = t;
|
|
9475
9477
|
}, [t]), J((...n) => {
|
|
9476
9478
|
var r;
|
|
@@ -9482,11 +9484,11 @@ const Ao = (t) => {
|
|
|
9482
9484
|
parentContext: n
|
|
9483
9485
|
}) => {
|
|
9484
9486
|
const r = J(), o = me(
|
|
9485
|
-
|
|
9487
|
+
wn
|
|
9486
9488
|
), { processAction: i } = o || {}, [a, l] = _e(
|
|
9487
9489
|
V.getHandler().treeButOpen
|
|
9488
9490
|
), { showErrorNotification: c } = ht();
|
|
9489
|
-
return
|
|
9491
|
+
return ae(() => () => {
|
|
9490
9492
|
l();
|
|
9491
9493
|
}, []), { handleExpandableRowDoubleClick: _(
|
|
9492
9494
|
async (f) => {
|
|
@@ -9562,18 +9564,18 @@ function Ag(t, e) {
|
|
|
9562
9564
|
totalRowsLoading: B,
|
|
9563
9565
|
totalRows: U,
|
|
9564
9566
|
onRowStyle: K,
|
|
9565
|
-
results:
|
|
9567
|
+
results: q,
|
|
9566
9568
|
onRequestPageChange: se,
|
|
9567
9569
|
treeIsLoading: ee,
|
|
9568
9570
|
selectAllRecords: Q,
|
|
9569
9571
|
onHeaderCheckboxClick: re,
|
|
9570
|
-
headerCheckboxState:
|
|
9572
|
+
headerCheckboxState: G,
|
|
9571
9573
|
getColumnStateInProgress: oe,
|
|
9572
|
-
getColumnState:
|
|
9574
|
+
getColumnState: ie,
|
|
9573
9575
|
updateColumnState: X,
|
|
9574
9576
|
currentPage: ne,
|
|
9575
9577
|
limit: de,
|
|
9576
|
-
order:
|
|
9578
|
+
order: Y,
|
|
9577
9579
|
setTreeFirstVisibleColumn: le,
|
|
9578
9580
|
onGetFirstVisibleColumn: ve,
|
|
9579
9581
|
onSortChange: fe,
|
|
@@ -9598,9 +9600,9 @@ function Ag(t, e) {
|
|
|
9598
9600
|
treeView: v,
|
|
9599
9601
|
currentModel: n,
|
|
9600
9602
|
parentContext: d
|
|
9601
|
-
}), Te = Ao((
|
|
9602
|
-
v != null && v.isExpandable ? Ce(
|
|
9603
|
-
}), je = Ao(S), [Qe,
|
|
9603
|
+
}), Te = Ao((W) => {
|
|
9604
|
+
v != null && v.isExpandable ? Ce(W) : h(W);
|
|
9605
|
+
}), je = Ao(S), [Qe, rt, Xe] = us({
|
|
9604
9606
|
ooui: x,
|
|
9605
9607
|
model: n,
|
|
9606
9608
|
showEmptyValues: !0,
|
|
@@ -9613,8 +9615,8 @@ function Ag(t, e) {
|
|
|
9613
9615
|
refreshResults: S,
|
|
9614
9616
|
getFields: () => v == null ? void 0 : v.fields
|
|
9615
9617
|
}));
|
|
9616
|
-
const we = te(() => Xe ? /* @__PURE__ */ s(fs, { aggregates:
|
|
9617
|
-
(
|
|
9618
|
+
const we = te(() => Xe ? /* @__PURE__ */ s(fs, { aggregates: rt, isLoading: Qe }) : null, [rt, Qe, Xe]), Ge = _(
|
|
9619
|
+
(W) => /* @__PURE__ */ s(sr, { color: W, style: { marginLeft: 7 } }),
|
|
9618
9620
|
[]
|
|
9619
9621
|
), Be = te(
|
|
9620
9622
|
() => ({
|
|
@@ -9623,7 +9625,7 @@ function Ag(t, e) {
|
|
|
9623
9625
|
...l ? {} : { display: "none" }
|
|
9624
9626
|
}),
|
|
9625
9627
|
[A, l]
|
|
9626
|
-
), Ze = Re !== void 0 && Me, Ye = Ze && U !== void 0 && U !== null && U === St, Ae = te(() => typeof U != "number" || isNaN(U) || U < 0 ? (
|
|
9628
|
+
), Ze = Re !== void 0 && Me, Ye = Ze && U !== void 0 && U !== null && U === St, Ae = te(() => typeof U != "number" || isNaN(U) || U < 0 ? (q == null ? void 0 : q.length) || 0 : U || 0, [U, q]), Ue = te(() => (q == null ? void 0 : q.length) > 0 && (typeof U != "number" || isNaN(U) || U < 0) ? q == null ? void 0 : q.length : f ? St : de || wg, [q == null ? void 0 : q.length, U, f, de]), st = v == null ? void 0 : v.isExpandable;
|
|
9627
9629
|
return /* @__PURE__ */ L(Hn, { children: [
|
|
9628
9630
|
!st && /* @__PURE__ */ s(
|
|
9629
9631
|
xg,
|
|
@@ -9661,7 +9663,7 @@ function Ag(t, e) {
|
|
|
9661
9663
|
)
|
|
9662
9664
|
}
|
|
9663
9665
|
),
|
|
9664
|
-
/* @__PURE__ */ s("div", { ref: g, style: Be, children: w ? /* @__PURE__ */ s(
|
|
9666
|
+
/* @__PURE__ */ s("div", { ref: g, style: Be, children: w ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(
|
|
9665
9667
|
jl,
|
|
9666
9668
|
{
|
|
9667
9669
|
columns: O,
|
|
@@ -9669,11 +9671,11 @@ function Ag(t, e) {
|
|
|
9669
9671
|
strings: R,
|
|
9670
9672
|
isLoading: ee || oe,
|
|
9671
9673
|
availableHeight: A,
|
|
9672
|
-
results:
|
|
9674
|
+
results: q,
|
|
9673
9675
|
handleRowDoubleClick: Te,
|
|
9674
9676
|
onRowHasBeenSelected: M,
|
|
9675
9677
|
updateColumnState: X,
|
|
9676
|
-
getColumnState:
|
|
9678
|
+
getColumnState: ie,
|
|
9677
9679
|
setTreeFirstVisibleRow: I,
|
|
9678
9680
|
onGetFirstVisibleRowIndex: D,
|
|
9679
9681
|
onGetFirstVisibleColumn: ve,
|
|
@@ -9682,10 +9684,10 @@ function Ag(t, e) {
|
|
|
9682
9684
|
statusComp: Ge,
|
|
9683
9685
|
onRowStatus: E,
|
|
9684
9686
|
onRowStyle: K,
|
|
9685
|
-
headerCheckboxState:
|
|
9687
|
+
headerCheckboxState: G,
|
|
9686
9688
|
onHeaderCheckboxClick: re,
|
|
9687
9689
|
refresh: je,
|
|
9688
|
-
actionViewSortState:
|
|
9690
|
+
actionViewSortState: Y,
|
|
9689
9691
|
onSortChange: fe,
|
|
9690
9692
|
tableRef: m,
|
|
9691
9693
|
isFieldLoading: Fe,
|
|
@@ -9696,7 +9698,7 @@ function Ag(t, e) {
|
|
|
9696
9698
|
) })
|
|
9697
9699
|
] });
|
|
9698
9700
|
}
|
|
9699
|
-
const Ig = Nt(Ag),
|
|
9701
|
+
const Ig = Nt(Ag), Ln = "legacy", Rg = (t) => {
|
|
9700
9702
|
const {
|
|
9701
9703
|
visible: e,
|
|
9702
9704
|
searchTreeRef: n,
|
|
@@ -9712,7 +9714,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
9712
9714
|
availableViews: p,
|
|
9713
9715
|
searchTreeNameSearch: m,
|
|
9714
9716
|
limit: g
|
|
9715
|
-
} = t, h = J(e), [y, v] = F(
|
|
9717
|
+
} = t, h = J(e), [y, v] = F(Ln), { treeMaxLimit: b } = zt(), { setLimit: w } = ln();
|
|
9716
9718
|
ze(() => {
|
|
9717
9719
|
if (a.isExpandable) {
|
|
9718
9720
|
v("paginated");
|
|
@@ -9751,7 +9753,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
9751
9753
|
setTreeType: P,
|
|
9752
9754
|
setSelectedRowItems: R
|
|
9753
9755
|
} = me(_t);
|
|
9754
|
-
|
|
9756
|
+
ae(() => {
|
|
9755
9757
|
P == null || P(y);
|
|
9756
9758
|
}, [y]);
|
|
9757
9759
|
const O = _(
|
|
@@ -9775,7 +9777,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
9775
9777
|
x
|
|
9776
9778
|
]
|
|
9777
9779
|
);
|
|
9778
|
-
|
|
9780
|
+
ae(() => {
|
|
9779
9781
|
h.current && !e && y === "infinite" && (R == null || R([])), h.current = e;
|
|
9780
9782
|
}, [e, y]);
|
|
9781
9783
|
const C = _((k) => {
|
|
@@ -9871,40 +9873,40 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
9871
9873
|
permissions: D,
|
|
9872
9874
|
permissionsLoading: I,
|
|
9873
9875
|
permissionsError: M
|
|
9874
|
-
} = t, [$, j] = F(!1), [N, H] = F(!1), [B, U] = F(!1), [K,
|
|
9876
|
+
} = t, [$, j] = F(!1), [N, H] = F(!1), [B, U] = F(!1), [K, q] = F(!0), [se, ee] = F(!0), [Q, re] = F([]), [G, oe] = F(!1), [ie, X] = F(
|
|
9875
9877
|
T || []
|
|
9876
|
-
), [ne, de] = F(!1), [
|
|
9878
|
+
), [ne, de] = F(!1), [Y, le] = F(!0), [ve, fe] = F(), [Fe, he] = F(
|
|
9877
9879
|
yf(
|
|
9878
9880
|
T || [],
|
|
9879
9881
|
n.fields
|
|
9880
9882
|
)
|
|
9881
|
-
), [Me, Re] = F(0), [De, Ce] = F(void 0), [Te, je] = F(), [Qe,
|
|
9883
|
+
), [Me, Re] = F(0), [De, Ce] = F(void 0), [Te, je] = F(), [Qe, rt] = F(Ln), [Xe, we] = F(
|
|
9882
9884
|
E
|
|
9883
9885
|
), [Ge, Be] = F(
|
|
9884
9886
|
C !== void 0 ? C : St
|
|
9885
9887
|
), [Ze, Ye] = F(r), [Ae, Ue] = F(
|
|
9886
9888
|
S || 1
|
|
9887
9889
|
);
|
|
9888
|
-
|
|
9890
|
+
ae(() => {
|
|
9889
9891
|
p && p.length > 0 && !m && (g == null || g(0), f == null || f(p[0].id));
|
|
9890
|
-
}, [p]),
|
|
9892
|
+
}, [p]), ae(() => {
|
|
9891
9893
|
Be(C !== void 0 ? C : St);
|
|
9892
|
-
}, [C]),
|
|
9894
|
+
}, [C]), ae(() => {
|
|
9893
9895
|
i.length === 1 ? fe(i[0]) : i.length > 1 && fe(
|
|
9894
9896
|
i.filter(
|
|
9895
|
-
(
|
|
9897
|
+
(W) => W.view_id !== n.view_id
|
|
9896
9898
|
)[0]
|
|
9897
9899
|
);
|
|
9898
|
-
}, [i]),
|
|
9900
|
+
}, [i]), ae(() => {
|
|
9899
9901
|
(ve == null ? void 0 : ve.view_id) === n.view_id && i.length > 1 && fe(
|
|
9900
9902
|
i.filter(
|
|
9901
|
-
(
|
|
9903
|
+
(W) => W.view_id !== n.view_id
|
|
9902
9904
|
)[0]
|
|
9903
9905
|
);
|
|
9904
9906
|
}, [n]);
|
|
9905
9907
|
const st = async () => {
|
|
9906
|
-
var
|
|
9907
|
-
return await ((
|
|
9908
|
+
var W;
|
|
9909
|
+
return await ((W = a.current) == null ? void 0 : W.submitForm());
|
|
9908
9910
|
};
|
|
9909
9911
|
return /* @__PURE__ */ s(
|
|
9910
9912
|
_t.Provider,
|
|
@@ -9932,17 +9934,17 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
9932
9934
|
removingItem: B,
|
|
9933
9935
|
setRemovingItem: U,
|
|
9934
9936
|
formIsLoading: K,
|
|
9935
|
-
setFormIsLoading:
|
|
9937
|
+
setFormIsLoading: q,
|
|
9936
9938
|
treeIsLoading: se,
|
|
9937
9939
|
setTreeIsLoading: ee,
|
|
9938
9940
|
attachments: Q,
|
|
9939
9941
|
setAttachments: re,
|
|
9940
9942
|
selectedRowItems: x,
|
|
9941
9943
|
setSelectedRowItems: A,
|
|
9942
|
-
duplicatingItem:
|
|
9944
|
+
duplicatingItem: G,
|
|
9943
9945
|
setDuplicatingItem: oe,
|
|
9944
9946
|
setSearchParams: X,
|
|
9945
|
-
searchParams:
|
|
9947
|
+
searchParams: ie,
|
|
9946
9948
|
searchVisible: ne,
|
|
9947
9949
|
setSearchVisible: de,
|
|
9948
9950
|
sorter: y,
|
|
@@ -9952,7 +9954,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
9952
9954
|
searchTreeNameSearch: P,
|
|
9953
9955
|
setSearchTreeNameSearch: R,
|
|
9954
9956
|
setGraphIsLoading: le,
|
|
9955
|
-
graphIsLoading:
|
|
9957
|
+
graphIsLoading: Y,
|
|
9956
9958
|
previousView: ve,
|
|
9957
9959
|
setPreviousView: fe,
|
|
9958
9960
|
goToResourceId: O,
|
|
@@ -9969,7 +9971,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
9969
9971
|
searchQuery: Te,
|
|
9970
9972
|
setSearchQuery: je,
|
|
9971
9973
|
treeType: Qe,
|
|
9972
|
-
setTreeType:
|
|
9974
|
+
setTreeType: rt,
|
|
9973
9975
|
order: Xe,
|
|
9974
9976
|
setOrder: we,
|
|
9975
9977
|
currentPage: Ae,
|
|
@@ -10069,7 +10071,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
10069
10071
|
searchQuery: void 0,
|
|
10070
10072
|
setSearchQuery: () => {
|
|
10071
10073
|
},
|
|
10072
|
-
treeType:
|
|
10074
|
+
treeType: Ln,
|
|
10073
10075
|
setTreeType: () => {
|
|
10074
10076
|
},
|
|
10075
10077
|
order: void 0,
|
|
@@ -10099,7 +10101,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
10099
10101
|
refresh: () => {
|
|
10100
10102
|
v();
|
|
10101
10103
|
}
|
|
10102
|
-
})),
|
|
10104
|
+
})), ae(() => {
|
|
10103
10105
|
v();
|
|
10104
10106
|
}, [d, n]);
|
|
10105
10107
|
async function v() {
|
|
@@ -10194,13 +10196,13 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
10194
10196
|
context: o,
|
|
10195
10197
|
manualIds: a
|
|
10196
10198
|
});
|
|
10197
|
-
if (
|
|
10199
|
+
if (ae(() => {
|
|
10198
10200
|
d == null || d(u);
|
|
10199
10201
|
}, [u]), Ht(e, () => ({
|
|
10200
10202
|
refresh: () => {
|
|
10201
10203
|
m();
|
|
10202
10204
|
}
|
|
10203
|
-
})),
|
|
10205
|
+
})), ae(() => {
|
|
10204
10206
|
m();
|
|
10205
10207
|
}, [n]), u || !p)
|
|
10206
10208
|
return /* @__PURE__ */ s(ur, {});
|
|
@@ -10244,7 +10246,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
10244
10246
|
default:
|
|
10245
10247
|
return /* @__PURE__ */ s(ge, { children: `Graph ${p.type} not implemented` });
|
|
10246
10248
|
}
|
|
10247
|
-
}, Fs = Nt(Pg), { useToken: kg } =
|
|
10249
|
+
}, Fs = Nt(Pg), { useToken: kg } = nt, { Text: Pi } = an, Bl = (t) => {
|
|
10248
10250
|
const {
|
|
10249
10251
|
title: e,
|
|
10250
10252
|
children: n,
|
|
@@ -10324,7 +10326,7 @@ const Ig = Nt(Ag), vn = "legacy", Rg = (t) => {
|
|
|
10324
10326
|
);
|
|
10325
10327
|
}, Ul = (t) => {
|
|
10326
10328
|
const { model: e } = t, [n, r] = F();
|
|
10327
|
-
|
|
10329
|
+
ae(() => {
|
|
10328
10330
|
o();
|
|
10329
10331
|
}, [e]);
|
|
10330
10332
|
async function o() {
|
|
@@ -10346,10 +10348,10 @@ function Mg(t) {
|
|
|
10346
10348
|
domain: i = [],
|
|
10347
10349
|
visible: a = !0,
|
|
10348
10350
|
parentContext: l = {}
|
|
10349
|
-
} = t, [c, d] = F(!1), [f, u] = F(!1), [p, m] = F(), [g, h] = F(), [y, v] = F(), [b, w] = F(1), [A, x] = F(0), P = J(St), R = J([]), [O, C] = F(0), [k, T] = F([]), [S, E] = F(void 0), [D, I] = F(), [M, $] = F(), [j, N] = F(), [H, B] = F(!1), U = J([]), K = (
|
|
10350
|
-
B(!0), w(
|
|
10351
|
-
},
|
|
10352
|
-
const
|
|
10351
|
+
} = t, [c, d] = F(!1), [f, u] = F(!1), [p, m] = F(), [g, h] = F(), [y, v] = F(), [b, w] = F(1), [A, x] = F(0), P = J(St), R = J([]), [O, C] = F(0), [k, T] = F([]), [S, E] = F(void 0), [D, I] = F(), [M, $] = F(), [j, N] = F(), [H, B] = F(!1), U = J([]), K = (ie) => {
|
|
10352
|
+
B(!0), w(ie), x((ie - 1) * P.current);
|
|
10353
|
+
}, q = async () => {
|
|
10354
|
+
const ie = U.current.length > 0 ? U.current : i, X = Xt(R.current, ie), { colors: ne } = Kt(g), { totalItems: de, results: Y, attrsEvaluated: le } = await V.getHandler().searchForTree({
|
|
10353
10355
|
params: X,
|
|
10354
10356
|
limit: P.current,
|
|
10355
10357
|
offset: A,
|
|
@@ -10358,9 +10360,9 @@ function Mg(t) {
|
|
|
10358
10360
|
context: l,
|
|
10359
10361
|
attrs: ne && { colors: ne }
|
|
10360
10362
|
});
|
|
10361
|
-
E(
|
|
10362
|
-
const ve =
|
|
10363
|
-
resultsToSort:
|
|
10363
|
+
E($n(le));
|
|
10364
|
+
const ve = On({
|
|
10365
|
+
resultsToSort: Y,
|
|
10364
10366
|
sorter: D,
|
|
10365
10367
|
fields: { ...g.fields, ...y.fields }
|
|
10366
10368
|
});
|
|
@@ -10369,37 +10371,37 @@ function Mg(t) {
|
|
|
10369
10371
|
C(fe);
|
|
10370
10372
|
}, se = async () => {
|
|
10371
10373
|
try {
|
|
10372
|
-
B(!0), await
|
|
10373
|
-
} catch (
|
|
10374
|
-
$(JSON.stringify(
|
|
10374
|
+
B(!0), await q();
|
|
10375
|
+
} catch (ie) {
|
|
10376
|
+
$(JSON.stringify(ie));
|
|
10375
10377
|
}
|
|
10376
10378
|
};
|
|
10377
|
-
|
|
10379
|
+
ae(() => {
|
|
10378
10380
|
f && a && se();
|
|
10379
10381
|
}, [b, A, f, a]);
|
|
10380
|
-
const ee = async (
|
|
10382
|
+
const ee = async (ie) => {
|
|
10381
10383
|
u(!1), d(!0), N(void 0);
|
|
10382
10384
|
try {
|
|
10383
|
-
|
|
10385
|
+
ie === "action" ? await Q() : await re(), u(!0);
|
|
10384
10386
|
} catch (X) {
|
|
10385
10387
|
N(X);
|
|
10386
10388
|
} finally {
|
|
10387
10389
|
d(!1);
|
|
10388
10390
|
}
|
|
10389
10391
|
}, Q = async () => {
|
|
10390
|
-
const
|
|
10392
|
+
const ie = await V.getHandler().getViewsForAction({
|
|
10391
10393
|
action: e,
|
|
10392
10394
|
context: l
|
|
10393
10395
|
});
|
|
10394
|
-
U.current =
|
|
10396
|
+
U.current = ie.domain, v(ie.views.get("form")), h(ie.views.get("tree")), m(ie.model), P.current = ie.limit;
|
|
10395
10397
|
}, re = async () => {
|
|
10396
10398
|
m(n);
|
|
10397
|
-
const
|
|
10399
|
+
const ie = await V.getHandler().getView({
|
|
10398
10400
|
model: n,
|
|
10399
10401
|
type: "form",
|
|
10400
10402
|
context: l
|
|
10401
10403
|
});
|
|
10402
|
-
v(
|
|
10404
|
+
v(ie);
|
|
10403
10405
|
const X = await V.getHandler().getView({
|
|
10404
10406
|
model: n,
|
|
10405
10407
|
type: "tree",
|
|
@@ -10408,11 +10410,11 @@ function Mg(t) {
|
|
|
10408
10410
|
});
|
|
10409
10411
|
h(X);
|
|
10410
10412
|
};
|
|
10411
|
-
|
|
10413
|
+
ae(() => {
|
|
10412
10414
|
e ? ee("action") : n && ee("model");
|
|
10413
10415
|
}, [e, n]);
|
|
10414
|
-
const
|
|
10415
|
-
const { id: X } =
|
|
10416
|
+
const G = (ie) => {
|
|
10417
|
+
const { id: X } = ie;
|
|
10416
10418
|
o({
|
|
10417
10419
|
id: X,
|
|
10418
10420
|
model: p,
|
|
@@ -10431,14 +10433,14 @@ function Mg(t) {
|
|
|
10431
10433
|
results: k,
|
|
10432
10434
|
onRequestPageChange: K,
|
|
10433
10435
|
loading: H,
|
|
10434
|
-
onRowClicked:
|
|
10436
|
+
onRowClicked: G,
|
|
10435
10437
|
colorsForResults: S,
|
|
10436
10438
|
sorter: D,
|
|
10437
|
-
onChangeSort: (
|
|
10438
|
-
I == null || I(
|
|
10439
|
-
const X =
|
|
10439
|
+
onChangeSort: (ie) => {
|
|
10440
|
+
I == null || I(ie);
|
|
10441
|
+
const X = On({
|
|
10440
10442
|
resultsToSort: k,
|
|
10441
|
-
sorter:
|
|
10443
|
+
sorter: ie,
|
|
10442
10444
|
fields: { ...g.fields, ...y.fields }
|
|
10443
10445
|
});
|
|
10444
10446
|
T(X);
|
|
@@ -10447,9 +10449,9 @@ function Mg(t) {
|
|
|
10447
10449
|
}
|
|
10448
10450
|
)
|
|
10449
10451
|
] }));
|
|
10450
|
-
return j ? (console.error(j), /* @__PURE__ */ s(Tt, { className: "mt-10", message: j, type: "error", banner: !0 })) : c ? /* @__PURE__ */ s(
|
|
10452
|
+
return j ? (console.error(j), /* @__PURE__ */ s(Tt, { className: "mt-10", message: j, type: "error", banner: !0 })) : c ? /* @__PURE__ */ s(tt, { style: { padding: "2rem" } }) : oe();
|
|
10451
10453
|
}
|
|
10452
|
-
const Wl = it(Mg), { useToken: $g } =
|
|
10454
|
+
const Wl = it(Mg), { useToken: $g } = nt, Vg = (t) => {
|
|
10453
10455
|
const { ooui: e } = t, n = e.actionId !== void 0, r = e.actionField !== void 0;
|
|
10454
10456
|
return /* @__PURE__ */ s(Le, { ooui: e, children: n || r ? /* @__PURE__ */ s(Fr, { children: /* @__PURE__ */ s(Lg, { ooui: e }) }) : /* @__PURE__ */ s(Ng, { ooui: e }) });
|
|
10455
10457
|
}, Ng = (t) => {
|
|
@@ -10459,7 +10461,7 @@ const Wl = it(Mg), { useToken: $g } = tt, Vg = (t) => {
|
|
|
10459
10461
|
), u = Zn(
|
|
10460
10462
|
yn.FEATURE_MANY2ONE_DISABLE_ARROW_MENU
|
|
10461
10463
|
);
|
|
10462
|
-
|
|
10464
|
+
ae(() => {
|
|
10463
10465
|
async function b(w, A) {
|
|
10464
10466
|
if (w && w.includes(":"))
|
|
10465
10467
|
try {
|
|
@@ -10534,7 +10536,7 @@ const Wl = it(Mg), { useToken: $g } = tt, Vg = (t) => {
|
|
|
10534
10536
|
return n.card ? /* @__PURE__ */ s(qo, { children: y }) : y;
|
|
10535
10537
|
}, Lg = (t) => {
|
|
10536
10538
|
const { ooui: e } = t, { actionId: n, height: r } = e, { getFieldValue: o, activeId: i } = es(), a = e.actionField && parseInt(o(e.actionField) || "0", 10) || n, { actionData: l, treeShortcut: c, loading: d, error: f, fetchData: u } = Uu(a), { openShortcut: p } = fr();
|
|
10537
|
-
if (
|
|
10539
|
+
if (ae(() => {
|
|
10538
10540
|
!e || !a || u();
|
|
10539
10541
|
}, [e, i, a]), f && f.message !== "active_id_not_found")
|
|
10540
10542
|
return /* @__PURE__ */ s(Ea, { error: f });
|
|
@@ -10630,7 +10632,7 @@ const Wl = it(Mg), { useToken: $g } = tt, Vg = (t) => {
|
|
|
10630
10632
|
), [A, x] = _e(
|
|
10631
10633
|
V.getHandler().search
|
|
10632
10634
|
);
|
|
10633
|
-
|
|
10635
|
+
ae(() => () => {
|
|
10634
10636
|
w(), x();
|
|
10635
10637
|
}, []), ze(() => {
|
|
10636
10638
|
R();
|
|
@@ -10647,7 +10649,7 @@ const Wl = it(Mg), { useToken: $g } = tt, Vg = (t) => {
|
|
|
10647
10649
|
if (g && (k = [["id", "in", i]]), n.domain) {
|
|
10648
10650
|
const E = await b({
|
|
10649
10651
|
domain: n.domain,
|
|
10650
|
-
values:
|
|
10652
|
+
values: bn({
|
|
10651
10653
|
fields: y == null ? void 0 : y.getFields(),
|
|
10652
10654
|
values: y.getAllHierarchyValues()
|
|
10653
10655
|
}),
|
|
@@ -10698,7 +10700,7 @@ const Wl = it(Mg), { useToken: $g } = tt, Vg = (t) => {
|
|
|
10698
10700
|
);
|
|
10699
10701
|
};
|
|
10700
10702
|
return c ? (console.error(c), /* @__PURE__ */ s(Tt, { className: "mt-10", message: c, type: "error", banner: !0 })) : /* @__PURE__ */ s(ge, { children: /* @__PURE__ */ s("div", { className: "flex flex-row", children: /* @__PURE__ */ s(
|
|
10701
|
-
|
|
10703
|
+
vn,
|
|
10702
10704
|
{
|
|
10703
10705
|
mode: "multiple",
|
|
10704
10706
|
value: a.length ? i : [],
|
|
@@ -10917,7 +10919,7 @@ const Wl = it(Mg), { useToken: $g } = tt, Vg = (t) => {
|
|
|
10917
10919
|
} = t, c = J(null), [d, f] = F(!0), [u, p] = _e(
|
|
10918
10920
|
V.getHandler().readObjects
|
|
10919
10921
|
), m = Ss();
|
|
10920
|
-
|
|
10922
|
+
ae(() => {
|
|
10921
10923
|
l === !1 && h(), (l === void 0 || l === !0) && !m && h(), (l === void 0 || l === !0) && m && y();
|
|
10922
10924
|
}, [l, m]);
|
|
10923
10925
|
const g = _(async () => {
|
|
@@ -11027,7 +11029,7 @@ function oy(t, e) {
|
|
|
11027
11029
|
forcedValues: P = {},
|
|
11028
11030
|
parentWidth: R,
|
|
11029
11031
|
onMustRefreshParent: O
|
|
11030
|
-
} = t, { t: C } = ye(), [k, T] = F(!1), [S, E] = F(), [D, I] = F(), [M] = Vt.useForm(), [$, j] = F(), [N, H] = F(), B = me(ql), [U, K] = F(), [
|
|
11032
|
+
} = t, { t: C } = ye(), [k, T] = F(!1), [S, E] = F(), [D, I] = F(), [M] = Vt.useForm(), [$, j] = F(), [N, H] = F(), B = me(ql), [U, K] = F(), [q, se] = F(!1), ee = J(), Q = J({}), re = J({}), G = J(!1), oe = J(!1), ie = J(!1), ne = (R !== void 0 ? R : U) < ry, de = me(Ke), { activeId: Y, getPlainValues: le } = de || {}, ve = J(!1), fe = me(
|
|
11031
11033
|
_t
|
|
11032
11034
|
), {
|
|
11033
11035
|
setFormIsSaving: Fe = void 0,
|
|
@@ -11039,8 +11041,8 @@ function oy(t, e) {
|
|
|
11039
11041
|
setTitle: Te = void 0,
|
|
11040
11042
|
isActive: je = void 0
|
|
11041
11043
|
} = (A ? fe : {}) || {}, Qe = me(
|
|
11042
|
-
|
|
11043
|
-
), { processAction:
|
|
11044
|
+
wn
|
|
11045
|
+
), { processAction: rt, globalValues: Xe } = Qe || {}, { showErrorNotification: we } = ht({
|
|
11044
11046
|
onButtonAction: (z) => {
|
|
11045
11047
|
Lt({ actionData: z });
|
|
11046
11048
|
}
|
|
@@ -11064,7 +11066,7 @@ function oy(t, e) {
|
|
|
11064
11066
|
clearAndReload: () => {
|
|
11065
11067
|
ee.current = void 0, I(void 0), dn();
|
|
11066
11068
|
}
|
|
11067
|
-
})),
|
|
11069
|
+
})), ae(() => {
|
|
11068
11070
|
if (E(void 0), Ue(), !(!n && !g)) {
|
|
11069
11071
|
if (!w) {
|
|
11070
11072
|
ee.current = void 0, I(void 0);
|
|
@@ -11072,11 +11074,11 @@ function oy(t, e) {
|
|
|
11072
11074
|
}
|
|
11073
11075
|
(r === void 0 && N || r !== void 0 && N && r < 0) && (ee.current = void 0, I(void 0)), dn();
|
|
11074
11076
|
}
|
|
11075
|
-
}, [r, n, m, g, w]),
|
|
11076
|
-
|
|
11077
|
+
}, [r, n, m, g, w]), ae(() => {
|
|
11078
|
+
q && (Se({
|
|
11077
11079
|
elementHasLostFocus: !0
|
|
11078
11080
|
}), se(!1));
|
|
11079
|
-
}, [
|
|
11081
|
+
}, [q]), ze(() => {
|
|
11080
11082
|
var z;
|
|
11081
11083
|
if (S) {
|
|
11082
11084
|
const Z = S;
|
|
@@ -11088,7 +11090,7 @@ function oy(t, e) {
|
|
|
11088
11090
|
), we(S);
|
|
11089
11091
|
}
|
|
11090
11092
|
}, [S]);
|
|
11091
|
-
const
|
|
11093
|
+
const W = (z, Z, pe, xe) => {
|
|
11092
11094
|
he == null || he(!1), Fe == null || Fe(!1), i == null || i(z, Z, pe, xe), Me == null || Me(z), ve.current && (O == null || O());
|
|
11093
11095
|
}, be = (z) => {
|
|
11094
11096
|
Fe == null || Fe(!1), d == null || d(z);
|
|
@@ -11132,9 +11134,9 @@ function oy(t, e) {
|
|
|
11132
11134
|
id: ce(),
|
|
11133
11135
|
active_id: ce(),
|
|
11134
11136
|
active_ids: [ce()],
|
|
11135
|
-
parent_id:
|
|
11137
|
+
parent_id: Y,
|
|
11136
11138
|
...Xe
|
|
11137
|
-
}), [ce,
|
|
11139
|
+
}), [ce, Y, Xe]), Ut = async (z) => {
|
|
11138
11140
|
const Z = ce() ? D == null ? void 0 : D.context : {};
|
|
11139
11141
|
return await V.getHandler().defaultGet({
|
|
11140
11142
|
model: n,
|
|
@@ -11151,7 +11153,7 @@ function oy(t, e) {
|
|
|
11151
11153
|
).length !== 0, ut = _(
|
|
11152
11154
|
(z) => {
|
|
11153
11155
|
const Z = M.getFieldsValue(!0);
|
|
11154
|
-
return
|
|
11156
|
+
return Rn(Z, z);
|
|
11155
11157
|
},
|
|
11156
11158
|
[M]
|
|
11157
11159
|
), ft = _(() => {
|
|
@@ -11170,16 +11172,16 @@ function oy(t, e) {
|
|
|
11170
11172
|
O,
|
|
11171
11173
|
o,
|
|
11172
11174
|
Fe
|
|
11173
|
-
]),
|
|
11175
|
+
]), xn = (z, Z) => {
|
|
11174
11176
|
Pt({
|
|
11175
11177
|
values: {
|
|
11176
|
-
...
|
|
11178
|
+
...Rn(M.getFieldsValue(!0), N),
|
|
11177
11179
|
[z]: Z
|
|
11178
11180
|
},
|
|
11179
11181
|
fields: N,
|
|
11180
11182
|
reset: !1
|
|
11181
11183
|
});
|
|
11182
|
-
},
|
|
11184
|
+
}, Cn = (z) => M.getFieldsValue(!0)[z];
|
|
11183
11185
|
async function cn() {
|
|
11184
11186
|
try {
|
|
11185
11187
|
return await M.validateFields(), !1;
|
|
@@ -11191,7 +11193,7 @@ function oy(t, e) {
|
|
|
11191
11193
|
E(void 0), Ue(), Re == null || Re(!0);
|
|
11192
11194
|
let z;
|
|
11193
11195
|
try {
|
|
11194
|
-
g ? z = { arch: g.arch, fields: g.fields } : z = await
|
|
11196
|
+
g ? z = { arch: g.arch, fields: g.fields } : z = await Tn();
|
|
11195
11197
|
const { fields: Z, arch: pe } = z;
|
|
11196
11198
|
H(Z), j(pe), await Et({
|
|
11197
11199
|
fields: Z,
|
|
@@ -11202,10 +11204,10 @@ function oy(t, e) {
|
|
|
11202
11204
|
}
|
|
11203
11205
|
}, Et = async (z) => {
|
|
11204
11206
|
let Z, pe, xe, ke;
|
|
11205
|
-
Re == null || Re(!0), E(void 0), Ue(), z != null && z.fields ? (pe = z.fields, xe = z.arch) : (pe = N, xe = $), m && (z == null ? void 0 : z.forceRefresh) !== !0 ? Z = m : { values: Z, defaultGetCalled: ke } = await
|
|
11207
|
+
Re == null || Re(!0), E(void 0), Ue(), z != null && z.fields ? (pe = z.fields, xe = z.arch) : (pe = N, xe = $), m && (z == null ? void 0 : z.forceRefresh) !== !0 ? Z = m : { values: Z, defaultGetCalled: ke } = await Fn({
|
|
11206
11208
|
fields: pe,
|
|
11207
11209
|
arch: xe
|
|
11208
|
-
}), b && (Z = { ...Eu(b), ...Z }), Q.current =
|
|
11210
|
+
}), b && (Z = { ...Eu(b), ...Z }), Q.current = Rn(Z, pe), Pt({
|
|
11209
11211
|
values: Z,
|
|
11210
11212
|
fields: pe,
|
|
11211
11213
|
reset: !0,
|
|
@@ -11221,7 +11223,7 @@ function oy(t, e) {
|
|
|
11221
11223
|
z(!1);
|
|
11222
11224
|
}
|
|
11223
11225
|
}) : (wt == null || wt(), z(!0));
|
|
11224
|
-
}),
|
|
11226
|
+
}), Tn = async () => {
|
|
11225
11227
|
if (l) {
|
|
11226
11228
|
const z = await V.getHandler().getActionStringForModel(n);
|
|
11227
11229
|
return (await V.getHandler().getViewsForAction({
|
|
@@ -11241,7 +11243,7 @@ function oy(t, e) {
|
|
|
11241
11243
|
reset: pe,
|
|
11242
11244
|
isDefaultGet: xe = !1
|
|
11243
11245
|
}) => {
|
|
11244
|
-
const pt = { ...pe ? {} : M.getFieldsValue(!0), ...z }, oo =
|
|
11246
|
+
const pt = { ...pe ? {} : M.getFieldsValue(!0), ...z }, oo = Rn(pt, Z), dc = Object.keys(Z).map((so) => ({
|
|
11245
11247
|
name: so,
|
|
11246
11248
|
touched: !1,
|
|
11247
11249
|
value: oo[so] !== void 0 ? oo[so] : void 0
|
|
@@ -11249,7 +11251,7 @@ function oy(t, e) {
|
|
|
11249
11251
|
xe || (re.current = oo), M.setFields(dc);
|
|
11250
11252
|
},
|
|
11251
11253
|
[M]
|
|
11252
|
-
),
|
|
11254
|
+
), Fn = async ({
|
|
11253
11255
|
fields: z,
|
|
11254
11256
|
arch: Z
|
|
11255
11257
|
}) => {
|
|
@@ -11310,20 +11312,20 @@ function oy(t, e) {
|
|
|
11310
11312
|
});
|
|
11311
11313
|
ee.current = xe, Q.current = pe;
|
|
11312
11314
|
}
|
|
11313
|
-
h && await h([ce()]), !y && Z && (
|
|
11315
|
+
h && await h([ce()]), !y && Z && (W == null || W(ce(), ft(), gt()));
|
|
11314
11316
|
}, Yn = async (z) => {
|
|
11315
11317
|
const { callOnSubmitSucceed: Z = !0 } = z || {};
|
|
11316
|
-
!y && Z && (
|
|
11318
|
+
!y && Z && (W == null || W(ce(), ft(), gt()));
|
|
11317
11319
|
}, nn = async (z) => {
|
|
11318
11320
|
let Z = !1;
|
|
11319
11321
|
const { callOnSubmitSucceed: pe = !0 } = z || {};
|
|
11320
|
-
if (oe.current = !0, E(void 0), Ue(),
|
|
11321
|
-
oe.current = !1, he == null || he(!1),
|
|
11322
|
+
if (oe.current = !0, E(void 0), Ue(), ie.current && !At() && ce() && pe) {
|
|
11323
|
+
oe.current = !1, he == null || he(!1), W == null || W(
|
|
11322
11324
|
ce(),
|
|
11323
11325
|
ft(),
|
|
11324
11326
|
gt(),
|
|
11325
|
-
|
|
11326
|
-
),
|
|
11327
|
+
ie.current
|
|
11328
|
+
), ie.current = !1;
|
|
11327
11329
|
const xe = ce();
|
|
11328
11330
|
return u && (ee.current = void 0, Pt({ values: {}, fields: N, reset: !0 })), { succeed: !0, id: xe };
|
|
11329
11331
|
}
|
|
@@ -11410,7 +11412,7 @@ function oy(t, e) {
|
|
|
11410
11412
|
"many2one"
|
|
11411
11413
|
]
|
|
11412
11414
|
}) && z !== !0)) {
|
|
11413
|
-
const xe =
|
|
11415
|
+
const xe = Rn(M.getFieldsValue(!0), N);
|
|
11414
11416
|
re.current = xe, c == null || c(xe), he == null || he(!0), Object.keys(xe).forEach((ke) => {
|
|
11415
11417
|
Ae(ke);
|
|
11416
11418
|
}), Je(pe);
|
|
@@ -11469,9 +11471,9 @@ function oy(t, e) {
|
|
|
11469
11471
|
reset: !1
|
|
11470
11472
|
});
|
|
11471
11473
|
}
|
|
11472
|
-
if (xe.warning && xe.warning.title && xe.warning.message && !
|
|
11474
|
+
if (xe.warning && xe.warning.title && xe.warning.message && !G.current) {
|
|
11473
11475
|
const { title: ke, message: pt } = xe.warning;
|
|
11474
|
-
|
|
11476
|
+
G.current = !0, st([
|
|
11475
11477
|
{
|
|
11476
11478
|
field: z,
|
|
11477
11479
|
message: pt,
|
|
@@ -11482,7 +11484,7 @@ function oy(t, e) {
|
|
|
11482
11484
|
title: ke,
|
|
11483
11485
|
body: pt,
|
|
11484
11486
|
onOk: () => {
|
|
11485
|
-
|
|
11487
|
+
G.current = !1;
|
|
11486
11488
|
}
|
|
11487
11489
|
});
|
|
11488
11490
|
}
|
|
@@ -11513,9 +11515,9 @@ function oy(t, e) {
|
|
|
11513
11515
|
}
|
|
11514
11516
|
});
|
|
11515
11517
|
if (typeof pe == "object" && pe !== null && Object.keys(pe).length === 0 && y)
|
|
11516
|
-
|
|
11518
|
+
W == null || W(ce(), ft(), gt());
|
|
11517
11519
|
else if (pe.type && pe.type === "ir.actions.act_window_close")
|
|
11518
|
-
|
|
11520
|
+
W == null || W(ce(), ft(), gt());
|
|
11519
11521
|
else if (pe.type) {
|
|
11520
11522
|
let xe = {};
|
|
11521
11523
|
pe.context && (xe = on({
|
|
@@ -11529,13 +11531,13 @@ function oy(t, e) {
|
|
|
11529
11531
|
} else
|
|
11530
11532
|
await Et({ forceRefresh: !0 });
|
|
11531
11533
|
}
|
|
11532
|
-
async function
|
|
11534
|
+
async function ot({ action: z }) {
|
|
11533
11535
|
const Z = await V.getHandler().executeWorkflow({
|
|
11534
11536
|
model: n,
|
|
11535
11537
|
action: z,
|
|
11536
11538
|
payload: ce()
|
|
11537
11539
|
});
|
|
11538
|
-
Z.type && Z.type === "ir.actions.act_window_close" ?
|
|
11540
|
+
Z.type && Z.type === "ir.actions.act_window_close" ? W == null || W(ce(), ft(), gt()) : await Et({ forceRefresh: !0 });
|
|
11539
11541
|
}
|
|
11540
11542
|
async function at({
|
|
11541
11543
|
action: z,
|
|
@@ -11552,7 +11554,7 @@ function oy(t, e) {
|
|
|
11552
11554
|
actionData: z,
|
|
11553
11555
|
context: Z = {}
|
|
11554
11556
|
}) {
|
|
11555
|
-
const { closeParent: pe } = await (
|
|
11557
|
+
const { closeParent: pe } = await (rt == null ? void 0 : rt({
|
|
11556
11558
|
actionData: z,
|
|
11557
11559
|
fields: N,
|
|
11558
11560
|
values: ft(),
|
|
@@ -11565,7 +11567,7 @@ function oy(t, e) {
|
|
|
11565
11567
|
ve.current = !0, await Et({ forceRefresh: !0 });
|
|
11566
11568
|
}
|
|
11567
11569
|
})) || {};
|
|
11568
|
-
!A && pe && (
|
|
11570
|
+
!A && pe && (W == null || W(ce(), ft(), gt()));
|
|
11569
11571
|
}
|
|
11570
11572
|
function kt() {
|
|
11571
11573
|
Se({ elementHasLostFocus: !0 });
|
|
@@ -11622,14 +11624,14 @@ function oy(t, e) {
|
|
|
11622
11624
|
}
|
|
11623
11625
|
let xe = !1;
|
|
11624
11626
|
try {
|
|
11625
|
-
!f && (At() || ce() === void 0) && (xe = !0, pn(!0), p === "2many" ? (await tn({ callOnSubmitSucceed: !1 }),
|
|
11626
|
-
const ke =
|
|
11627
|
-
z === "object" ? await Ie({ action: Z, context: pt }) : z === "workflow" ? await
|
|
11627
|
+
!f && (At() || ce() === void 0) && (xe = !0, pn(!0), p === "2many" ? (await tn({ callOnSubmitSucceed: !1 }), ie.current = !0) : await nn({ callOnSubmitSucceed: !1 }));
|
|
11628
|
+
const ke = ie.current ? Ve() : {}, pt = { ...pe, ...ke };
|
|
11629
|
+
z === "object" ? await Ie({ action: Z, context: pt }) : z === "workflow" ? await ot({ action: Z }) : z === "action" && await at({ action: Z, context: pt }), xe && pn(!1);
|
|
11628
11630
|
} catch (ke) {
|
|
11629
11631
|
xe && pn(!1), we(ke);
|
|
11630
11632
|
}
|
|
11631
11633
|
}
|
|
11632
|
-
const vr = () => !D && !S ? /* @__PURE__ */ s(
|
|
11634
|
+
const vr = () => !D && !S ? /* @__PURE__ */ s(tt, {}) : !n && !g || !w ? null : /* @__PURE__ */ s(ge, { children: /* @__PURE__ */ s(
|
|
11633
11635
|
Md,
|
|
11634
11636
|
{
|
|
11635
11637
|
getValues: ft,
|
|
@@ -11639,8 +11641,8 @@ function oy(t, e) {
|
|
|
11639
11641
|
domain: b,
|
|
11640
11642
|
activeId: Pe,
|
|
11641
11643
|
activeModel: n,
|
|
11642
|
-
setFieldValue:
|
|
11643
|
-
getFieldValue:
|
|
11644
|
+
setFieldValue: xn,
|
|
11645
|
+
getFieldValue: Cn,
|
|
11644
11646
|
executeButtonAction: ro,
|
|
11645
11647
|
getContext: et,
|
|
11646
11648
|
submitForm: nn,
|
|
@@ -11727,7 +11729,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
11727
11729
|
actionData: l,
|
|
11728
11730
|
...c
|
|
11729
11731
|
} = t, { model: d } = c, { modalWidth: f } = zr(), [u, p] = F(r), [m, g] = F(!1), [h, y] = F(), { action_id: v, res_id: b, action_type: w, view_id: A } = l || {};
|
|
11730
|
-
|
|
11732
|
+
ae(() => {
|
|
11731
11733
|
a && x();
|
|
11732
11734
|
}, [l, a]);
|
|
11733
11735
|
async function x() {
|
|
@@ -11923,7 +11925,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
11923
11925
|
const [t, e] = _e(
|
|
11924
11926
|
V.getHandler().checkPermission
|
|
11925
11927
|
);
|
|
11926
|
-
return
|
|
11928
|
+
return ae(() => () => {
|
|
11927
11929
|
e();
|
|
11928
11930
|
}, []), { checkPermissions: _(
|
|
11929
11931
|
async (r, o) => {
|
|
@@ -11975,7 +11977,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
11975
11977
|
}),
|
|
11976
11978
|
[r, i, l]
|
|
11977
11979
|
);
|
|
11978
|
-
}, { defaultAlgorithm: iy, defaultSeed: ay } =
|
|
11980
|
+
}, { defaultAlgorithm: iy, defaultSeed: ay } = nt, Gl = iy(ay), ly = (t) => {
|
|
11979
11981
|
const { ooui: e } = t, { required: n } = e;
|
|
11980
11982
|
return /* @__PURE__ */ s(Le, { required: n, type: "array", validator: async (o, i) => {
|
|
11981
11983
|
if (!i)
|
|
@@ -12004,18 +12006,18 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12004
12006
|
permissions: ["create", "write"],
|
|
12005
12007
|
enabled: !0
|
|
12006
12008
|
}), j = ($ == null ? void 0 : $.create) ?? !1, N = ($ == null ? void 0 : $.write) ?? !1, H = r.showSearch ?? !0, B = e && e[0] || void 0, U = e && e[1] || "";
|
|
12007
|
-
|
|
12009
|
+
ae(() => {
|
|
12008
12010
|
!Array.isArray(e) && e && Q(e);
|
|
12009
|
-
}, [e]),
|
|
12011
|
+
}, [e]), ae(() => {
|
|
12010
12012
|
B && U.length === 0 ? Q(B) : B && U.length > 0 ? x(U) : !B && !U && x(P.current || "");
|
|
12011
12013
|
}, [e]);
|
|
12012
|
-
const K = (
|
|
12013
|
-
n == null || n(
|
|
12014
|
-
},
|
|
12015
|
-
P.current =
|
|
12014
|
+
const K = (Y) => {
|
|
12015
|
+
n == null || n(Y), T == null || T();
|
|
12016
|
+
}, q = (Y) => {
|
|
12017
|
+
P.current = Y.target.value, K([void 0, ""]);
|
|
12016
12018
|
}, se = async () => {
|
|
12017
12019
|
if (!h && A !== U) {
|
|
12018
|
-
if (await new Promise((
|
|
12020
|
+
if (await new Promise((Y) => setTimeout(Y, 100)), w.current) {
|
|
12019
12021
|
K([void 0, ""]);
|
|
12020
12022
|
return;
|
|
12021
12023
|
}
|
|
@@ -12024,20 +12026,20 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12024
12026
|
if (E.current && E.current.length > 0)
|
|
12025
12027
|
ee(P.current);
|
|
12026
12028
|
else {
|
|
12027
|
-
const
|
|
12029
|
+
const Y = await V.getHandler().nameSearch({
|
|
12028
12030
|
model: i,
|
|
12029
12031
|
payload: P.current,
|
|
12030
12032
|
context: { ...k == null ? void 0 : k(), ...l }
|
|
12031
12033
|
});
|
|
12032
|
-
|
|
12034
|
+
Y.length === 1 ? (P.current = void 0, K(Y[0])) : ee(P.current);
|
|
12033
12035
|
}
|
|
12034
|
-
} catch (
|
|
12035
|
-
M(
|
|
12036
|
+
} catch (Y) {
|
|
12037
|
+
M(Y);
|
|
12036
12038
|
} finally {
|
|
12037
12039
|
y(!1);
|
|
12038
12040
|
}
|
|
12039
12041
|
}
|
|
12040
|
-
}, ee = async (
|
|
12042
|
+
}, ee = async (Y) => {
|
|
12041
12043
|
if (await re(), E.current && E.current.length > 0) {
|
|
12042
12044
|
const le = await V.getHandler().searchAllIds({
|
|
12043
12045
|
params: E.current,
|
|
@@ -12045,20 +12047,20 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12045
12047
|
context: { ...k == null ? void 0 : k(), ...l },
|
|
12046
12048
|
totalItems: 2
|
|
12047
12049
|
});
|
|
12048
|
-
le.length === 1 ? Q(le[0]) : (b(
|
|
12050
|
+
le.length === 1 ? Q(le[0]) : (b(Y), p(!0));
|
|
12049
12051
|
return;
|
|
12050
12052
|
}
|
|
12051
|
-
b(
|
|
12052
|
-
}, Q = async (
|
|
12053
|
+
b(Y), p(!0);
|
|
12054
|
+
}, Q = async (Y) => {
|
|
12053
12055
|
y(!0);
|
|
12054
12056
|
try {
|
|
12055
12057
|
const le = await V.getHandler().execute({
|
|
12056
12058
|
action: "name_get",
|
|
12057
|
-
payload: [
|
|
12059
|
+
payload: [Y],
|
|
12058
12060
|
model: i,
|
|
12059
12061
|
context: { ...k == null ? void 0 : k(), ...l }
|
|
12060
12062
|
});
|
|
12061
|
-
K([
|
|
12063
|
+
K([Y, le[0][1]]);
|
|
12062
12064
|
} catch (le) {
|
|
12063
12065
|
M(le);
|
|
12064
12066
|
} finally {
|
|
@@ -12068,7 +12070,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12068
12070
|
async function re() {
|
|
12069
12071
|
d && (E.current = await V.getHandler().evalDomain({
|
|
12070
12072
|
domain: d,
|
|
12071
|
-
values:
|
|
12073
|
+
values: bn({
|
|
12072
12074
|
fields: C(),
|
|
12073
12075
|
values: S()
|
|
12074
12076
|
}),
|
|
@@ -12081,19 +12083,19 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12081
12083
|
})
|
|
12082
12084
|
)), I(E.current);
|
|
12083
12085
|
}
|
|
12084
|
-
async function
|
|
12085
|
-
|
|
12086
|
+
async function G(Y) {
|
|
12087
|
+
Y.keyCode === 13 ? (Y.preventDefault(), Y.stopPropagation(), await se()) : Y.code === "Backspace" && B !== void 0 && (Y.preventDefault(), Y.stopPropagation(), K([void 0, ""]));
|
|
12086
12088
|
}
|
|
12087
|
-
const oe = o && !a ? cy : bt,
|
|
12089
|
+
const oe = o && !a ? cy : bt, ie = Zn(
|
|
12088
12090
|
yn.FEATURE_MANY2ONE_DISABLE_FOLDER
|
|
12089
12091
|
), X = Zn(
|
|
12090
12092
|
yn.FEATURE_MANY2ONE_DISABLE_ARROW_MENU
|
|
12091
12093
|
), ne = te(() => {
|
|
12092
|
-
let
|
|
12093
|
-
return
|
|
12094
|
-
}, [r.showFolder,
|
|
12095
|
-
let
|
|
12096
|
-
return X === !0 && (
|
|
12094
|
+
let Y = !0;
|
|
12095
|
+
return ie === !0 && (Y = !1), r.showFolder !== void 0 && (Y = r.showFolder), Y;
|
|
12096
|
+
}, [r.showFolder, ie]), de = te(() => {
|
|
12097
|
+
let Y = !0;
|
|
12098
|
+
return X === !0 && (Y = !1), r.showMenu !== void 0 && (Y = r.showMenu), Y;
|
|
12097
12099
|
}, [r.showMenu, X]);
|
|
12098
12100
|
return /* @__PURE__ */ L(qe, { gutter: 8, wrap: !1, children: [
|
|
12099
12101
|
/* @__PURE__ */ s(Ee, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ s(
|
|
@@ -12102,13 +12104,13 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12102
12104
|
type: "text",
|
|
12103
12105
|
value: A,
|
|
12104
12106
|
disabled: a,
|
|
12105
|
-
onChange:
|
|
12107
|
+
onChange: q,
|
|
12106
12108
|
style: {
|
|
12107
12109
|
...f,
|
|
12108
12110
|
...H || ne ? { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
|
|
12109
12111
|
},
|
|
12110
12112
|
onBlur: se,
|
|
12111
|
-
onKeyDown:
|
|
12113
|
+
onKeyDown: G,
|
|
12112
12114
|
suffix: de && /* @__PURE__ */ s(
|
|
12113
12115
|
no,
|
|
12114
12116
|
{
|
|
@@ -12152,8 +12154,8 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12152
12154
|
visible: u,
|
|
12153
12155
|
nameSearch: B ? void 0 : v,
|
|
12154
12156
|
canCreate: j,
|
|
12155
|
-
onSelectValues: async (
|
|
12156
|
-
p(!1), Q(
|
|
12157
|
+
onSelectValues: async (Y) => {
|
|
12158
|
+
p(!1), Q(Y[0]), w.current = !1, P.current = void 0;
|
|
12157
12159
|
},
|
|
12158
12160
|
onCloseModal: () => {
|
|
12159
12161
|
p(!1), w.current = !1;
|
|
@@ -12167,8 +12169,8 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12167
12169
|
parentContext: { ...k == null ? void 0 : k(), ...l },
|
|
12168
12170
|
id: e && e[0],
|
|
12169
12171
|
visible: m,
|
|
12170
|
-
onSubmitSucceed: (
|
|
12171
|
-
g(!1), Q(
|
|
12172
|
+
onSubmitSucceed: (Y) => {
|
|
12173
|
+
g(!1), Q(Y);
|
|
12172
12174
|
},
|
|
12173
12175
|
onCancel: () => {
|
|
12174
12176
|
g(!1);
|
|
@@ -12280,7 +12282,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12280
12282
|
toolbar: o
|
|
12281
12283
|
}) => {
|
|
12282
12284
|
const { t: i } = ye(), a = me(
|
|
12283
|
-
|
|
12285
|
+
wn
|
|
12284
12286
|
), l = me(
|
|
12285
12287
|
Bt
|
|
12286
12288
|
), { processAction: c } = a || {}, { openRelate: d } = l || {}, [f, u] = F(null), [p, m] = F(!1), [g] = _e(
|
|
@@ -12337,7 +12339,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12337
12339
|
];
|
|
12338
12340
|
},
|
|
12339
12341
|
onItemClick: async (R) => {
|
|
12340
|
-
R && (await
|
|
12342
|
+
R && (await Pn({ onFormSave: y })).succeed && v(R);
|
|
12341
12343
|
}
|
|
12342
12344
|
}, x = {
|
|
12343
12345
|
disabled: t || p || !e.current,
|
|
@@ -12354,7 +12356,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12354
12356
|
},
|
|
12355
12357
|
onItemClick: async (R) => {
|
|
12356
12358
|
if (R) {
|
|
12357
|
-
const O = await
|
|
12359
|
+
const O = await Pn({ onFormSave: y });
|
|
12358
12360
|
O.succeed && v({
|
|
12359
12361
|
...R,
|
|
12360
12362
|
datas: {
|
|
@@ -12379,7 +12381,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12379
12381
|
},
|
|
12380
12382
|
onItemClick: async (R) => {
|
|
12381
12383
|
var O, C;
|
|
12382
|
-
R && (await
|
|
12384
|
+
R && (await Pn({ onFormSave: y })).succeed && d({
|
|
12383
12385
|
relateData: R,
|
|
12384
12386
|
values: (O = e.current) == null ? void 0 : O.getValues(),
|
|
12385
12387
|
fields: (C = e.current) == null ? void 0 : C.getFields(),
|
|
@@ -12393,7 +12395,7 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12393
12395
|
printButtonProps: x,
|
|
12394
12396
|
relateButtonProps: P
|
|
12395
12397
|
};
|
|
12396
|
-
},
|
|
12398
|
+
}, Pn = async ({
|
|
12397
12399
|
onFormSave: t
|
|
12398
12400
|
}) => {
|
|
12399
12401
|
const e = await (t == null ? void 0 : t());
|
|
@@ -12431,9 +12433,9 @@ const qn = Nt(oy), Gn = (t) => {
|
|
|
12431
12433
|
duplicatingItem: o,
|
|
12432
12434
|
duplicate: l
|
|
12433
12435
|
};
|
|
12434
|
-
}, { useToken: fy } =
|
|
12436
|
+
}, { useToken: fy } = nt;
|
|
12435
12437
|
function py(t) {
|
|
12436
|
-
var ee, Q, re,
|
|
12438
|
+
var ee, Q, re, G;
|
|
12437
12439
|
const {
|
|
12438
12440
|
title: e,
|
|
12439
12441
|
readOnly: n,
|
|
@@ -12487,7 +12489,7 @@ function py(t) {
|
|
|
12487
12489
|
parentContext: b,
|
|
12488
12490
|
selectedRowItems: g.map((oe) => ({ id: oe })),
|
|
12489
12491
|
onRefreshParentValues: A
|
|
12490
|
-
}), U = n || !T || !D, K = n || !S,
|
|
12492
|
+
}), U = n || !T || !D, K = n || !S, q = c === 0 || n || a !== "form" && g.length === 0 || (p ? !S : !E || !D), se = n || I || a === "tree" && g.length !== 1 || a === "form" && (x === void 0 || x < 0) || !T || !D;
|
|
12491
12493
|
return /* @__PURE__ */ L("div", { className: "flex mb-2 pt-3", children: [
|
|
12492
12494
|
/* @__PURE__ */ s(Xl, { title: e, token: P }),
|
|
12493
12495
|
/* @__PURE__ */ L("div", { className: "flex-none h-8 pl-2", children: [
|
|
@@ -12519,7 +12521,7 @@ function py(t) {
|
|
|
12519
12521
|
isMany2Many: p,
|
|
12520
12522
|
selectedRowKeys: n ? [] : g,
|
|
12521
12523
|
onDelete: l,
|
|
12522
|
-
disabled:
|
|
12524
|
+
disabled: q
|
|
12523
12525
|
}
|
|
12524
12526
|
),
|
|
12525
12527
|
(a === "tree" || a === "form") && /* @__PURE__ */ L(ge, { children: [
|
|
@@ -12596,7 +12598,7 @@ function py(t) {
|
|
|
12596
12598
|
}
|
|
12597
12599
|
)
|
|
12598
12600
|
] }),
|
|
12599
|
-
a === "form" && ((
|
|
12601
|
+
a === "form" && ((G = v.relate) == null ? void 0 : G.length) > 0 && /* @__PURE__ */ L(ge, { children: [
|
|
12600
12602
|
/* @__PURE__ */ s(qt, {}),
|
|
12601
12603
|
/* @__PURE__ */ s(
|
|
12602
12604
|
Jt,
|
|
@@ -12716,7 +12718,7 @@ function hy(t) {
|
|
|
12716
12718
|
const gy = (t) => {
|
|
12717
12719
|
var Ae, Ue, st;
|
|
12718
12720
|
const { value: e, onChange: n, ooui: r, views: o } = t, { items: i = [] } = e || {}, { currentView: a, setCurrentView: l, itemIndex: c, setItemIndex: d } = me(
|
|
12719
|
-
|
|
12721
|
+
Sn
|
|
12720
12722
|
), f = me(Ke), {
|
|
12721
12723
|
activeId: u,
|
|
12722
12724
|
getFields: p,
|
|
@@ -12724,15 +12726,15 @@ const gy = (t) => {
|
|
|
12724
12726
|
domain: g,
|
|
12725
12727
|
fetchValues: h,
|
|
12726
12728
|
getAllHierarchyValues: y
|
|
12727
|
-
} = f || {}, { t: v } = ye(), [b, w] = F(!1), [A, x] = F(!1), [P, R] = F(), [O, C] = F(!1), [k, T] = F(!1), [S, E] = F(), [D, I] = F([]), [M, $] = F(!1), [j, N] = F([]), [H, B] = F(), U = J(), [K,
|
|
12729
|
+
} = f || {}, { t: v } = ye(), [b, w] = F(!1), [A, x] = F(!1), [P, R] = F(), [O, C] = F(!1), [k, T] = F(!1), [S, E] = F(), [D, I] = F([]), [M, $] = F(!1), [j, N] = F([]), [H, B] = F(), U = J(), [K, q] = F(void 0), se = J(), {
|
|
12728
12730
|
readOnly: ee,
|
|
12729
12731
|
relation: Q,
|
|
12730
12732
|
context: re,
|
|
12731
|
-
domain:
|
|
12732
|
-
} = r, oe = r.type === "many2many", { id:
|
|
12733
|
-
(
|
|
12733
|
+
domain: G
|
|
12734
|
+
} = r, oe = r.type === "many2many", { id: ie } = r, X = i.filter(
|
|
12735
|
+
(W) => (W.values || W.treeValues) && W.operation !== "pendingRemove"
|
|
12734
12736
|
), ne = J();
|
|
12735
|
-
|
|
12737
|
+
ae(() => {
|
|
12736
12738
|
if (ne.current !== a) {
|
|
12737
12739
|
ne.current = a, de();
|
|
12738
12740
|
return;
|
|
@@ -12740,20 +12742,20 @@ const gy = (t) => {
|
|
|
12740
12742
|
de();
|
|
12741
12743
|
}, [i, a]);
|
|
12742
12744
|
const de = _(() => {
|
|
12743
|
-
(a === "form" && i.some((
|
|
12745
|
+
(a === "form" && i.some((W) => !W.values) || a === "tree" && i.some((W) => !W.treeValues)) && le();
|
|
12744
12746
|
}, [i, a]);
|
|
12745
12747
|
ze(() => {
|
|
12746
12748
|
fe();
|
|
12747
12749
|
}, [g]);
|
|
12748
|
-
const
|
|
12750
|
+
const Y = (W) => {
|
|
12749
12751
|
var be, ce;
|
|
12750
12752
|
n == null || n({
|
|
12751
12753
|
fields: ((be = o.get("form")) == null ? void 0 : be.fields) || ((ce = o.get("tree")) == null ? void 0 : ce.fields),
|
|
12752
|
-
items: hy(
|
|
12754
|
+
items: hy(W)
|
|
12753
12755
|
});
|
|
12754
12756
|
}, le = async () => {
|
|
12755
12757
|
await ve(), c > X.length - 1 && c !== 0 && d(0);
|
|
12756
|
-
}, ve = async (
|
|
12758
|
+
}, ve = async (W) => {
|
|
12757
12759
|
var be, ce, Pe;
|
|
12758
12760
|
x(!0), w(!1), R(void 0);
|
|
12759
12761
|
try {
|
|
@@ -12768,9 +12770,9 @@ const gy = (t) => {
|
|
|
12768
12770
|
model: Q,
|
|
12769
12771
|
items: i,
|
|
12770
12772
|
context: { ...m == null ? void 0 : m(), ...re },
|
|
12771
|
-
currentView:
|
|
12773
|
+
currentView: W || a
|
|
12772
12774
|
});
|
|
12773
|
-
return U.current || (U.current = Oe.map((Ft) => Ft.id)), (a ||
|
|
12775
|
+
return U.current || (U.current = Oe.map((Ft) => Ft.id)), (a || W) === "tree" && He && q(He), Y(Oe), Oe;
|
|
12774
12776
|
} catch (Oe) {
|
|
12775
12777
|
R(Oe);
|
|
12776
12778
|
} finally {
|
|
@@ -12780,28 +12782,31 @@ const gy = (t) => {
|
|
|
12780
12782
|
ze(() => {
|
|
12781
12783
|
fe();
|
|
12782
12784
|
}, [y()]);
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
fields: p(),
|
|
12789
|
-
values: y()
|
|
12790
|
-
}),
|
|
12785
|
+
const fe = _(async () => {
|
|
12786
|
+
let W = [];
|
|
12787
|
+
G && (W = await V.getHandler().evalDomain({
|
|
12788
|
+
domain: G,
|
|
12789
|
+
values: bn({
|
|
12791
12790
|
fields: p(),
|
|
12792
|
-
|
|
12791
|
+
values: y()
|
|
12792
|
+
}),
|
|
12793
|
+
fields: p(),
|
|
12794
|
+
context: m()
|
|
12795
|
+
})), g && g.length > 0 && (W = W.concat(
|
|
12796
|
+
Yo({
|
|
12797
|
+
domain: g,
|
|
12798
|
+
widgetFieldName: ie
|
|
12793
12799
|
})
|
|
12794
|
-
),
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
const Y = Array.from(o.keys()), be = Y[(Y.indexOf(a) + 1) % Y.length];
|
|
12800
|
+
)), W.length > 0 && N(W);
|
|
12801
|
+
}, [
|
|
12802
|
+
G,
|
|
12803
|
+
g,
|
|
12804
|
+
p,
|
|
12805
|
+
y,
|
|
12806
|
+
m,
|
|
12807
|
+
ie
|
|
12808
|
+
]), Fe = () => {
|
|
12809
|
+
const W = Array.from(o.keys()), be = W[(W.indexOf(a) + 1) % W.length];
|
|
12805
12810
|
a === "form" ? De(() => {
|
|
12806
12811
|
l(be);
|
|
12807
12812
|
}) : l(be);
|
|
@@ -12810,41 +12815,41 @@ const gy = (t) => {
|
|
|
12810
12815
|
d(c - 1);
|
|
12811
12816
|
}) : d(c - 1));
|
|
12812
12817
|
}, Me = () => {
|
|
12813
|
-
const
|
|
12814
|
-
c <
|
|
12818
|
+
const W = X.length;
|
|
12819
|
+
c < W - 1 && (a === "form" ? De(() => {
|
|
12815
12820
|
d(c + 1);
|
|
12816
12821
|
}) : d(c + 1));
|
|
12817
12822
|
}, Re = async () => {
|
|
12818
|
-
const
|
|
12823
|
+
const W = X[c].id, be = (await V.getHandler().readObjects({
|
|
12819
12824
|
model: Q,
|
|
12820
|
-
ids: [
|
|
12825
|
+
ids: [W],
|
|
12821
12826
|
fields: o.get("form").fields,
|
|
12822
12827
|
context: { ...m == null ? void 0 : m(), ...re }
|
|
12823
12828
|
}))[0], ce = (await V.getHandler().readObjects({
|
|
12824
12829
|
model: Q,
|
|
12825
|
-
ids: [
|
|
12830
|
+
ids: [W],
|
|
12826
12831
|
fields: o.get("tree").fields,
|
|
12827
12832
|
context: { ...m == null ? void 0 : m(), ...re }
|
|
12828
|
-
}))[0], Pe = i.map((Oe) => Oe.id ===
|
|
12833
|
+
}))[0], Pe = i.map((Oe) => Oe.id === W ? {
|
|
12829
12834
|
...Oe,
|
|
12830
12835
|
operation: "original",
|
|
12831
12836
|
values: be,
|
|
12832
12837
|
treeValues: ce
|
|
12833
12838
|
} : Oe);
|
|
12834
|
-
|
|
12835
|
-
}, De = (
|
|
12839
|
+
Y(Pe);
|
|
12840
|
+
}, De = (W) => {
|
|
12836
12841
|
b ? Un({
|
|
12837
12842
|
t: v,
|
|
12838
12843
|
onOk: () => {
|
|
12839
|
-
Re(),
|
|
12844
|
+
Re(), W(), w(!1);
|
|
12840
12845
|
}
|
|
12841
|
-
}) :
|
|
12846
|
+
}) : W();
|
|
12842
12847
|
}, Ce = () => {
|
|
12843
12848
|
if (oe) {
|
|
12844
12849
|
Kl({
|
|
12845
12850
|
t: v,
|
|
12846
12851
|
onOk: async () => {
|
|
12847
|
-
a === "form" ? Qe() :
|
|
12852
|
+
a === "form" ? Qe() : rt();
|
|
12848
12853
|
}
|
|
12849
12854
|
});
|
|
12850
12855
|
return;
|
|
@@ -12852,13 +12857,13 @@ const gy = (t) => {
|
|
|
12852
12857
|
Jl({
|
|
12853
12858
|
t: v,
|
|
12854
12859
|
onOk: async () => {
|
|
12855
|
-
a === "form" ? Qe() :
|
|
12860
|
+
a === "form" ? Qe() : rt();
|
|
12856
12861
|
}
|
|
12857
12862
|
});
|
|
12858
12863
|
}, Te = async () => {
|
|
12859
|
-
const { inv_field:
|
|
12864
|
+
const { inv_field: W } = r;
|
|
12860
12865
|
let be;
|
|
12861
|
-
|
|
12866
|
+
W && u && (be = { [W]: u }), a === "form" ? De(() => {
|
|
12862
12867
|
$(!0), E({ defaultValues: be }), C(!0);
|
|
12863
12868
|
}) : ($(!0), E({ defaultValues: be }), C(!0));
|
|
12864
12869
|
}, je = async () => {
|
|
@@ -12869,47 +12874,47 @@ const gy = (t) => {
|
|
|
12869
12874
|
x(!0), w(!1), R(void 0);
|
|
12870
12875
|
try {
|
|
12871
12876
|
if (X[c].id > 0) {
|
|
12872
|
-
const
|
|
12877
|
+
const W = i.map((be) => be.id === X[c].id ? {
|
|
12873
12878
|
...be,
|
|
12874
12879
|
operation: "pendingRemove"
|
|
12875
12880
|
} : be);
|
|
12876
|
-
|
|
12881
|
+
Y(W);
|
|
12877
12882
|
} else
|
|
12878
|
-
|
|
12879
|
-
i.filter((
|
|
12883
|
+
Y(
|
|
12884
|
+
i.filter((W) => W.id !== X[c].id)
|
|
12880
12885
|
);
|
|
12881
|
-
} catch (
|
|
12882
|
-
R(
|
|
12886
|
+
} catch (W) {
|
|
12887
|
+
R(W);
|
|
12883
12888
|
}
|
|
12884
12889
|
d(0), x(!1);
|
|
12885
|
-
},
|
|
12886
|
-
const
|
|
12890
|
+
}, rt = async () => {
|
|
12891
|
+
const W = X.filter((be) => D.includes(be.id));
|
|
12887
12892
|
x(!0), w(!1), R(void 0);
|
|
12888
12893
|
try {
|
|
12889
|
-
const be =
|
|
12894
|
+
const be = W.map((Pe) => Pe.id), ce = i.filter((Pe) => !(be.includes(Pe.id) && Pe.id < 0)).map((Pe) => be.includes(Pe.id) ? {
|
|
12890
12895
|
...Pe,
|
|
12891
12896
|
operation: "pendingRemove"
|
|
12892
12897
|
} : Pe);
|
|
12893
|
-
|
|
12898
|
+
Y(ce);
|
|
12894
12899
|
} catch (be) {
|
|
12895
12900
|
R(be);
|
|
12896
12901
|
}
|
|
12897
12902
|
d(0), x(!1);
|
|
12898
|
-
}, Xe = (
|
|
12903
|
+
}, Xe = (W, be, ce, Pe = !1) => {
|
|
12899
12904
|
let Oe;
|
|
12900
12905
|
if (Pe)
|
|
12901
12906
|
Oe = i.concat({
|
|
12902
|
-
id:
|
|
12907
|
+
id: W,
|
|
12903
12908
|
operation: "pendingLink",
|
|
12904
|
-
values: { ...ce, id:
|
|
12905
|
-
treeValues: { ...ce, id:
|
|
12909
|
+
values: { ...ce, id: W },
|
|
12910
|
+
treeValues: { ...ce, id: W }
|
|
12906
12911
|
});
|
|
12907
|
-
else if (
|
|
12908
|
-
Oe = i.map((He) => He.id ===
|
|
12909
|
-
id:
|
|
12910
|
-
operation:
|
|
12911
|
-
values: { ...ce, id:
|
|
12912
|
-
treeValues: { ...ce, id:
|
|
12912
|
+
else if (W)
|
|
12913
|
+
Oe = i.map((He) => He.id === W ? {
|
|
12914
|
+
id: W,
|
|
12915
|
+
operation: W > 0 ? "pendingUpdate" : "pendingCreate",
|
|
12916
|
+
values: { ...ce, id: W },
|
|
12917
|
+
treeValues: { ...ce, id: W }
|
|
12913
12918
|
} : He);
|
|
12914
12919
|
else {
|
|
12915
12920
|
const He = Fa(i);
|
|
@@ -12920,15 +12925,15 @@ const gy = (t) => {
|
|
|
12920
12925
|
treeValues: { ...ce, id: He }
|
|
12921
12926
|
});
|
|
12922
12927
|
}
|
|
12923
|
-
|
|
12924
|
-
}, we = async (
|
|
12925
|
-
const { id: be } =
|
|
12928
|
+
Y(Oe), M || C(!1);
|
|
12929
|
+
}, we = async (W) => {
|
|
12930
|
+
const { id: be } = W;
|
|
12926
12931
|
let ce = i;
|
|
12927
12932
|
const Pe = i.find((Oe) => Oe.id === be);
|
|
12928
12933
|
(Pe == null ? void 0 : Pe.values) === void 0 && (ce = await ve("form")), E(ce.find((Oe) => Oe.id === be)), $(!1), C(!0);
|
|
12929
|
-
}, Ge = async (
|
|
12934
|
+
}, Ge = async (W) => {
|
|
12930
12935
|
x(!0);
|
|
12931
|
-
const be = i, ce =
|
|
12936
|
+
const be = i, ce = W.filter((Pe) => !i.find((Oe) => Oe.id === Pe));
|
|
12932
12937
|
try {
|
|
12933
12938
|
for (const Pe of ce) {
|
|
12934
12939
|
const Oe = (await V.getHandler().readObjects({
|
|
@@ -12949,7 +12954,7 @@ const gy = (t) => {
|
|
|
12949
12954
|
treeValues: He
|
|
12950
12955
|
});
|
|
12951
12956
|
}
|
|
12952
|
-
|
|
12957
|
+
Y(be);
|
|
12953
12958
|
} catch (Pe) {
|
|
12954
12959
|
R(Pe);
|
|
12955
12960
|
} finally {
|
|
@@ -12957,18 +12962,18 @@ const gy = (t) => {
|
|
|
12957
12962
|
}
|
|
12958
12963
|
};
|
|
12959
12964
|
function Be() {
|
|
12960
|
-
const
|
|
12965
|
+
const W = my[a];
|
|
12961
12966
|
if (a === "graph")
|
|
12962
12967
|
return zi(o.get("graph").arch).string;
|
|
12963
12968
|
{
|
|
12964
|
-
const be = new
|
|
12969
|
+
const be = new W(o.get(a).fields);
|
|
12965
12970
|
return be.parse(o.get(a).arch), be.string;
|
|
12966
12971
|
}
|
|
12967
12972
|
}
|
|
12968
12973
|
const Ze = () => {
|
|
12969
12974
|
var be, ce, Pe, Oe;
|
|
12970
12975
|
if (a === "form")
|
|
12971
|
-
return X.length === 0 ? v("noCurrentEntries") : a !== ne.current && i.some((He) => !He.values) ? /* @__PURE__ */ s(
|
|
12976
|
+
return X.length === 0 ? v("noCurrentEntries") : a !== ne.current && i.some((He) => !He.values) ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(
|
|
12972
12977
|
qn,
|
|
12973
12978
|
{
|
|
12974
12979
|
ref: se,
|
|
@@ -12986,13 +12991,13 @@ const gy = (t) => {
|
|
|
12986
12991
|
values: { ...He, id: Ft },
|
|
12987
12992
|
treeValues: { ...He, id: Ft }
|
|
12988
12993
|
} : Ve);
|
|
12989
|
-
|
|
12994
|
+
Y(gt), w(!0);
|
|
12990
12995
|
},
|
|
12991
12996
|
readOnly: ee
|
|
12992
12997
|
}
|
|
12993
12998
|
);
|
|
12994
|
-
let
|
|
12995
|
-
if (X.some((He) => He.treeValues) && (
|
|
12999
|
+
let W = [];
|
|
13000
|
+
if (X.some((He) => He.treeValues) && (W = H ? On({
|
|
12996
13001
|
resultsToSort: X.map((He) => He.treeValues),
|
|
12997
13002
|
sorter: H,
|
|
12998
13003
|
fields: {
|
|
@@ -13006,7 +13011,7 @@ const gy = (t) => {
|
|
|
13006
13011
|
total: X.length,
|
|
13007
13012
|
limit: X.length,
|
|
13008
13013
|
treeView: o.get("tree"),
|
|
13009
|
-
results:
|
|
13014
|
+
results: W,
|
|
13010
13015
|
loading: A,
|
|
13011
13016
|
onRowClicked: ((Oe = o.get("form")) == null ? void 0 : Oe.fields) !== void 0 ? we : void 0,
|
|
13012
13017
|
showPagination: !1,
|
|
@@ -13038,7 +13043,7 @@ const gy = (t) => {
|
|
|
13038
13043
|
if (P)
|
|
13039
13044
|
return /* @__PURE__ */ s(Tt, { className: "mt-10", message: P, type: "error", banner: !0 });
|
|
13040
13045
|
const Ye = M;
|
|
13041
|
-
return A ? /* @__PURE__ */ s(
|
|
13046
|
+
return A ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ L(ge, { children: [
|
|
13042
13047
|
/* @__PURE__ */ s(
|
|
13043
13048
|
nc,
|
|
13044
13049
|
{
|
|
@@ -13081,16 +13086,16 @@ const gy = (t) => {
|
|
|
13081
13086
|
visible: O,
|
|
13082
13087
|
onSubmitSucceed: Xe,
|
|
13083
13088
|
parentContext: { ...m == null ? void 0 : m(), ...re },
|
|
13084
|
-
onCancel: (
|
|
13085
|
-
if ($(!1),
|
|
13089
|
+
onCancel: (W) => {
|
|
13090
|
+
if ($(!1), W != null && W.id && (W != null && W.values)) {
|
|
13086
13091
|
const be = i.map(
|
|
13087
|
-
(ce) => ce.id ===
|
|
13092
|
+
(ce) => ce.id === W.id ? {
|
|
13088
13093
|
...ce,
|
|
13089
|
-
values: { ...ce.values, ...
|
|
13090
|
-
treeValues: { ...ce.treeValues, ...
|
|
13094
|
+
values: { ...ce.values, ...W.values },
|
|
13095
|
+
treeValues: { ...ce.treeValues, ...W.values }
|
|
13091
13096
|
} : ce
|
|
13092
13097
|
);
|
|
13093
|
-
|
|
13098
|
+
Y(be);
|
|
13094
13099
|
}
|
|
13095
13100
|
C(!1);
|
|
13096
13101
|
},
|
|
@@ -13108,8 +13113,8 @@ const gy = (t) => {
|
|
|
13108
13113
|
model: Q,
|
|
13109
13114
|
context: { ...m == null ? void 0 : m(), ...re },
|
|
13110
13115
|
visible: k,
|
|
13111
|
-
onSelectValues: async (
|
|
13112
|
-
T(!1), Ge(
|
|
13116
|
+
onSelectValues: async (W) => {
|
|
13117
|
+
T(!1), Ge(W);
|
|
13113
13118
|
},
|
|
13114
13119
|
onCloseModal: () => {
|
|
13115
13120
|
T(!1);
|
|
@@ -13132,26 +13137,30 @@ const gy = (t) => {
|
|
|
13132
13137
|
}, [a]), ze(() => {
|
|
13133
13138
|
c();
|
|
13134
13139
|
}, [l()]);
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
fields: o(),
|
|
13141
|
-
values: l()
|
|
13142
|
-
}),
|
|
13140
|
+
const c = _(async () => {
|
|
13141
|
+
let d = [];
|
|
13142
|
+
e && (d = await V.getHandler().evalDomain({
|
|
13143
|
+
domain: e,
|
|
13144
|
+
values: bn({
|
|
13143
13145
|
fields: o(),
|
|
13144
|
-
|
|
13146
|
+
values: l()
|
|
13147
|
+
}),
|
|
13148
|
+
fields: o(),
|
|
13149
|
+
context: i()
|
|
13150
|
+
})), a && a.length > 0 && (d = d.concat(
|
|
13151
|
+
Yo({
|
|
13152
|
+
domain: a,
|
|
13153
|
+
widgetFieldName: t
|
|
13145
13154
|
})
|
|
13146
|
-
),
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
+
)), d.length > 0 && r(d);
|
|
13156
|
+
}, [
|
|
13157
|
+
e,
|
|
13158
|
+
a,
|
|
13159
|
+
o,
|
|
13160
|
+
l,
|
|
13161
|
+
i,
|
|
13162
|
+
t
|
|
13163
|
+
]);
|
|
13155
13164
|
return n;
|
|
13156
13165
|
}, vy = ({
|
|
13157
13166
|
treeView: t,
|
|
@@ -13219,8 +13228,8 @@ const gy = (t) => {
|
|
|
13219
13228
|
formView: o,
|
|
13220
13229
|
triggerChange: i
|
|
13221
13230
|
}) => {
|
|
13222
|
-
const [a, l] = F(!1), { itemIndex: c } = me(
|
|
13223
|
-
|
|
13231
|
+
const [a, l] = F(!1), { itemIndex: c } = me(Sn), { t: d } = ye();
|
|
13232
|
+
ae(() => {
|
|
13224
13233
|
const g = t[c];
|
|
13225
13234
|
(!g || (g == null ? void 0 : g.operation) === "original") && l(!1);
|
|
13226
13235
|
}, [c, t]);
|
|
@@ -13286,7 +13295,7 @@ const gy = (t) => {
|
|
|
13286
13295
|
};
|
|
13287
13296
|
}, wy = ({
|
|
13288
13297
|
one2manyItems: t
|
|
13289
|
-
}) =>
|
|
13298
|
+
}) => kn(() => t.filter((e) => e.operation !== "pendingRemove"), [t]), rc = Nt(
|
|
13290
13299
|
({
|
|
13291
13300
|
formView: t,
|
|
13292
13301
|
items: e,
|
|
@@ -13296,7 +13305,7 @@ const gy = (t) => {
|
|
|
13296
13305
|
onChange: i
|
|
13297
13306
|
}, a) => {
|
|
13298
13307
|
var d, f;
|
|
13299
|
-
const { itemIndex: l } = me(
|
|
13308
|
+
const { itemIndex: l } = me(Sn), { t: c } = ye();
|
|
13300
13309
|
return e.length === 0 ? c("noCurrentEntries") : /* @__PURE__ */ s(
|
|
13301
13310
|
qn,
|
|
13302
13311
|
{
|
|
@@ -13332,7 +13341,7 @@ const Sy = ({
|
|
|
13332
13341
|
setSelectedRowKeys: i
|
|
13333
13342
|
}) => {
|
|
13334
13343
|
const { t: a } = ye(), { currentView: l, itemIndex: c, setItemIndex: d } = me(
|
|
13335
|
-
|
|
13344
|
+
Sn
|
|
13336
13345
|
), { showErrorNotification: f } = ht(), u = _(async () => {
|
|
13337
13346
|
const h = xy({
|
|
13338
13347
|
selectedRowKeys: o,
|
|
@@ -13576,7 +13585,7 @@ const Cy = ({
|
|
|
13576
13585
|
}
|
|
13577
13586
|
x.current = t, (M = b == null ? void 0 : b.current) == null || M.refresh(), ($ = b == null ? void 0 : b.current) == null || $.unselectAll();
|
|
13578
13587
|
}, [t]);
|
|
13579
|
-
const C =
|
|
13588
|
+
const C = kn(() => t.length, [t]), k = kn(() => os(
|
|
13580
13589
|
o,
|
|
13581
13590
|
{
|
|
13582
13591
|
...Ts
|
|
@@ -13610,7 +13619,7 @@ const Cy = ({
|
|
|
13610
13619
|
model: d
|
|
13611
13620
|
})
|
|
13612
13621
|
});
|
|
13613
|
-
return E ? /* @__PURE__ */ s(
|
|
13622
|
+
return E ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(
|
|
13614
13623
|
la,
|
|
13615
13624
|
{
|
|
13616
13625
|
ref: b,
|
|
@@ -13657,7 +13666,7 @@ const Cy = ({
|
|
|
13657
13666
|
}, _y = ["form", "tree", "graph"], Ey = (t) => {
|
|
13658
13667
|
var Re, De, Ce;
|
|
13659
13668
|
const e = J(null), { value: n, onChange: r, ooui: o, views: i } = t, { items: a = [] } = n || {}, l = wy({ one2manyItems: a }), { currentView: c, setCurrentView: d, itemIndex: f, setItemIndex: u } = me(
|
|
13660
|
-
|
|
13669
|
+
Sn
|
|
13661
13670
|
), {
|
|
13662
13671
|
readOnly: p,
|
|
13663
13672
|
relation: m,
|
|
@@ -13706,7 +13715,7 @@ const Cy = ({
|
|
|
13706
13715
|
formHasChanges: B,
|
|
13707
13716
|
onFormChanges: U,
|
|
13708
13717
|
showFormChangesDialogIfNeeded: K,
|
|
13709
|
-
setFormHasChanges:
|
|
13718
|
+
setFormHasChanges: q
|
|
13710
13719
|
} = by({
|
|
13711
13720
|
items: l,
|
|
13712
13721
|
formView: i.get("form"),
|
|
@@ -13719,9 +13728,9 @@ const Cy = ({
|
|
|
13719
13728
|
modalItem: ee,
|
|
13720
13729
|
continuousEntryMode: Q,
|
|
13721
13730
|
onCancelFormModal: re,
|
|
13722
|
-
onFormModalSubmitSucceed:
|
|
13731
|
+
onFormModalSubmitSucceed: G,
|
|
13723
13732
|
createItem: oe,
|
|
13724
|
-
openItemInFormModal:
|
|
13733
|
+
openItemInFormModal: ie
|
|
13725
13734
|
} = Cy({
|
|
13726
13735
|
activeId: b,
|
|
13727
13736
|
inv_field: o.inv_field,
|
|
@@ -13738,7 +13747,7 @@ const Cy = ({
|
|
|
13738
13747
|
showSearchModal: X,
|
|
13739
13748
|
onSelectSearchValues: ne,
|
|
13740
13749
|
onCloseSearchModal: de,
|
|
13741
|
-
searchItem:
|
|
13750
|
+
searchItem: Y
|
|
13742
13751
|
} = Ty({
|
|
13743
13752
|
showFormChangesDialogIfNeeded: K,
|
|
13744
13753
|
currentView: c,
|
|
@@ -13751,7 +13760,7 @@ const Cy = ({
|
|
|
13751
13760
|
isMany2many: N,
|
|
13752
13761
|
items: l,
|
|
13753
13762
|
triggerChange: H,
|
|
13754
|
-
setFormHasChanges:
|
|
13763
|
+
setFormHasChanges: q,
|
|
13755
13764
|
selectedRowKeys: S,
|
|
13756
13765
|
setSelectedRowKeys: E
|
|
13757
13766
|
}), ve = () => {
|
|
@@ -13762,7 +13771,7 @@ const Cy = ({
|
|
|
13762
13771
|
}, fe = Rt(
|
|
13763
13772
|
(Te) => {
|
|
13764
13773
|
var je;
|
|
13765
|
-
(je = i.get("form")) != null && je.fields &&
|
|
13774
|
+
(je = i.get("form")) != null && je.fields && ie(Te);
|
|
13766
13775
|
},
|
|
13767
13776
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13768
13777
|
[l]
|
|
@@ -13803,7 +13812,7 @@ const Cy = ({
|
|
|
13803
13812
|
onToggleViewMode: ve,
|
|
13804
13813
|
onPreviousItem: Fe,
|
|
13805
13814
|
onNextItem: he,
|
|
13806
|
-
onSearchItem:
|
|
13815
|
+
onSearchItem: Y,
|
|
13807
13816
|
selectedRowKeys: S,
|
|
13808
13817
|
showCreateButton: R,
|
|
13809
13818
|
showToggleButton: P,
|
|
@@ -13864,7 +13873,7 @@ const Cy = ({
|
|
|
13864
13873
|
values: ee == null ? void 0 : ee.values,
|
|
13865
13874
|
defaultValues: ee == null ? void 0 : ee.defaultValues,
|
|
13866
13875
|
visible: se,
|
|
13867
|
-
onSubmitSucceed:
|
|
13876
|
+
onSubmitSucceed: G,
|
|
13868
13877
|
parentContext: O,
|
|
13869
13878
|
onCancel: re,
|
|
13870
13879
|
readOnly: p,
|
|
@@ -13967,7 +13976,7 @@ const Cy = ({
|
|
|
13967
13976
|
d(!1);
|
|
13968
13977
|
}
|
|
13969
13978
|
};
|
|
13970
|
-
return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ s(
|
|
13979
|
+
return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ s(tt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Tt, { className: "mt-10", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(Kh, { initialView: l, children: /* @__PURE__ */ s(
|
|
13971
13980
|
Le,
|
|
13972
13981
|
{
|
|
13973
13982
|
required: i,
|
|
@@ -14005,14 +14014,14 @@ const Cy = ({
|
|
|
14005
14014
|
o("infinite");
|
|
14006
14015
|
return;
|
|
14007
14016
|
}
|
|
14008
|
-
o(
|
|
14009
|
-
}, [e.infinite, n]), r === "infinite" ? /* @__PURE__ */ s(Ey, { ...t }) : /* @__PURE__ */ s(gy, { ...t });
|
|
14010
|
-
}, { useToken: ky } =
|
|
14017
|
+
o(Ln);
|
|
14018
|
+
}, [e.infinite, n]), r === void 0 ? /* @__PURE__ */ s(tt, {}) : r === "infinite" ? /* @__PURE__ */ s(Ey, { ...t }) : /* @__PURE__ */ s(gy, { ...t });
|
|
14019
|
+
}, { useToken: ky } = nt, My = (t) => {
|
|
14011
14020
|
const { ooui: e } = t, { required: n } = e;
|
|
14012
14021
|
return /* @__PURE__ */ s(Le, { required: n, type: "number", ...t, children: /* @__PURE__ */ s($y, { ooui: e }) });
|
|
14013
14022
|
}, $y = (t) => {
|
|
14014
14023
|
const { ooui: e, value: n, onChange: r } = t, { id: o, readOnly: i, required: a } = e, { token: l } = ky(), c = a && !i ? { backgroundColor: l.colorPrimaryBg } : void 0, d = J(), [f, u] = F(), p = me(Ke), { elementHasLostFocus: m } = p || {};
|
|
14015
|
-
|
|
14024
|
+
ae(() => {
|
|
14016
14025
|
u(Ol(n));
|
|
14017
14026
|
}, [n]);
|
|
14018
14027
|
const g = (v) => {
|
|
@@ -14039,7 +14048,7 @@ const Cy = ({
|
|
|
14039
14048
|
);
|
|
14040
14049
|
}, Lo = (t) => {
|
|
14041
14050
|
const { ooui: e, responsiveBehaviour: n = !1, tip: r } = t;
|
|
14042
|
-
return /* @__PURE__ */ s(
|
|
14051
|
+
return /* @__PURE__ */ s(tt, { tip: r ?? e.label, size: "large", spinning: e.loading, children: /* @__PURE__ */ s(
|
|
14043
14052
|
As,
|
|
14044
14053
|
{
|
|
14045
14054
|
container: e.container,
|
|
@@ -14106,7 +14115,7 @@ const { TabPane: Vy } = Ui, Ny = xt(Ui)`
|
|
|
14106
14115
|
}
|
|
14107
14116
|
`;
|
|
14108
14117
|
function Ly(t) {
|
|
14109
|
-
const { ooui: e, responsiveBehaviour: n } = t, r = e.pages, { token: o } =
|
|
14118
|
+
const { ooui: e, responsiveBehaviour: n } = t, r = e.pages, { token: o } = nt.useToken();
|
|
14110
14119
|
function i(a) {
|
|
14111
14120
|
if (a) {
|
|
14112
14121
|
const l = Ot(a);
|
|
@@ -14141,7 +14150,7 @@ function Ly(t) {
|
|
|
14141
14150
|
}
|
|
14142
14151
|
);
|
|
14143
14152
|
}
|
|
14144
|
-
const { useToken: Hy } =
|
|
14153
|
+
const { useToken: Hy } = nt, { TextArea: Ho } = bt, jy = (t) => {
|
|
14145
14154
|
const { ooui: e } = t, { id: n, readOnly: r, required: o, height: i, translatable: a } = e, { token: l } = Hy(), c = o && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, d = me(Ke), { elementHasLostFocus: f } = d || {};
|
|
14146
14155
|
return /* @__PURE__ */ s(Le, { required: o, ...t, children: a ? /* @__PURE__ */ s(
|
|
14147
14156
|
By,
|
|
@@ -14290,7 +14299,7 @@ const { useToken: Hy } = tt, { TextArea: Ho } = bt, jy = (t) => {
|
|
|
14290
14299
|
format: y.exportType
|
|
14291
14300
|
});
|
|
14292
14301
|
i(), await new Promise((A) => setTimeout(A, 200));
|
|
14293
|
-
const w = await
|
|
14302
|
+
const w = await Mn(b);
|
|
14294
14303
|
Kr(b, w.mime);
|
|
14295
14304
|
},
|
|
14296
14305
|
[r, n, t, o, e, i, c]
|
|
@@ -14578,7 +14587,7 @@ const { useToken: Hy } = tt, { TextArea: Ho } = bt, jy = (t) => {
|
|
|
14578
14587
|
return /* @__PURE__ */ s(Le, { required: n, ...t, children: /* @__PURE__ */ s(sv, { ooui: e }) });
|
|
14579
14588
|
}, sv = (t) => {
|
|
14580
14589
|
const { value: e, onChange: n, ooui: r } = t, { required: o, selectionValues: i, readOnly: a, domain: l } = r, c = e == null ? void 0 : e.split(","), [d, f] = F([]), [u, p] = F();
|
|
14581
|
-
return
|
|
14590
|
+
return ae(() => {
|
|
14582
14591
|
if (!e) {
|
|
14583
14592
|
p(void 0), f([]);
|
|
14584
14593
|
return;
|
|
@@ -14624,7 +14633,7 @@ const { useToken: Hy } = tt, { TextArea: Ho } = bt, jy = (t) => {
|
|
|
14624
14633
|
}
|
|
14625
14634
|
) })
|
|
14626
14635
|
] });
|
|
14627
|
-
}, { useToken: iv } =
|
|
14636
|
+
}, { useToken: iv } = nt, av = (t) => {
|
|
14628
14637
|
const { ooui: e } = t, { required: n } = e;
|
|
14629
14638
|
return /* @__PURE__ */ s(Le, { required: n, ...t, children: /* @__PURE__ */ s(lv, { ooui: e }) });
|
|
14630
14639
|
}, lv = (t) => {
|
|
@@ -14632,11 +14641,11 @@ const { useToken: Hy } = tt, { TextArea: Ho } = bt, jy = (t) => {
|
|
|
14632
14641
|
r == null || r(w);
|
|
14633
14642
|
};
|
|
14634
14643
|
async function h() {
|
|
14635
|
-
const w = await
|
|
14644
|
+
const w = await Mn(n), A = `data:${w == null ? void 0 : w.mime};base64,${n}`, x = document.createElement("a"), P = u(a), R = u("name");
|
|
14636
14645
|
x.href = A, x.download = P || R, x.click();
|
|
14637
14646
|
}
|
|
14638
14647
|
async function y() {
|
|
14639
|
-
const w = await
|
|
14648
|
+
const w = await Mn(n);
|
|
14640
14649
|
Kr(n, w.mime);
|
|
14641
14650
|
}
|
|
14642
14651
|
async function v(w) {
|
|
@@ -14849,7 +14858,7 @@ function dv(t) {
|
|
|
14849
14858
|
}
|
|
14850
14859
|
if (p(!1), !!w)
|
|
14851
14860
|
if (w.datas) {
|
|
14852
|
-
const A = await
|
|
14861
|
+
const A = await Mn(w.datas);
|
|
14853
14862
|
Kr(w.datas, A.mime);
|
|
14854
14863
|
} else
|
|
14855
14864
|
i(w);
|
|
@@ -14861,7 +14870,7 @@ function dv(t) {
|
|
|
14861
14870
|
},
|
|
14862
14871
|
[i]
|
|
14863
14872
|
);
|
|
14864
|
-
return
|
|
14873
|
+
return ae(() => {
|
|
14865
14874
|
h();
|
|
14866
14875
|
}, []), /* @__PURE__ */ L(ge, { children: [
|
|
14867
14876
|
/* @__PURE__ */ s(
|
|
@@ -14886,7 +14895,7 @@ function dv(t) {
|
|
|
14886
14895
|
closable: !1,
|
|
14887
14896
|
centered: !0,
|
|
14888
14897
|
maskClosable: !1,
|
|
14889
|
-
children: /* @__PURE__ */ s(
|
|
14898
|
+
children: /* @__PURE__ */ s(tt, {})
|
|
14890
14899
|
}
|
|
14891
14900
|
)
|
|
14892
14901
|
] });
|
|
@@ -14903,7 +14912,7 @@ const uv = () => {
|
|
|
14903
14912
|
} = ln(), [l, c] = _e(
|
|
14904
14913
|
V.getHandler().searchForTree
|
|
14905
14914
|
);
|
|
14906
|
-
|
|
14915
|
+
ae(() => () => {
|
|
14907
14916
|
c();
|
|
14908
14917
|
}, []);
|
|
14909
14918
|
const { showErrorNotification: d } = ht(), f = _(
|
|
@@ -15008,8 +15017,8 @@ function fv({ toolbar: t }) {
|
|
|
15008
15017
|
() => u || w || R || A,
|
|
15009
15018
|
[u, w, R, A]
|
|
15010
15019
|
), j = _(
|
|
15011
|
-
(
|
|
15012
|
-
f ? Un({ t: n, onOk:
|
|
15020
|
+
(G) => {
|
|
15021
|
+
f ? Un({ t: n, onOk: G }) : G();
|
|
15013
15022
|
},
|
|
15014
15023
|
[f, n]
|
|
15015
15024
|
), N = _(() => {
|
|
@@ -15027,14 +15036,14 @@ function fv({ toolbar: t }) {
|
|
|
15027
15036
|
ids: [p],
|
|
15028
15037
|
context: C.current.getContext()
|
|
15029
15038
|
});
|
|
15030
|
-
const
|
|
15031
|
-
(
|
|
15039
|
+
const G = m == null ? void 0 : m.filter(
|
|
15040
|
+
(ie) => ie.id !== p
|
|
15032
15041
|
);
|
|
15033
|
-
P == null || P(
|
|
15042
|
+
P == null || P(G);
|
|
15034
15043
|
const oe = Math.max(0, (h || 0) - 1);
|
|
15035
|
-
|
|
15036
|
-
} catch (
|
|
15037
|
-
i(
|
|
15044
|
+
G != null && G[oe] ? (y == null || y(G[oe].id), g == null || g(oe)) : (y == null || y(void 0), g == null || g(void 0));
|
|
15045
|
+
} catch (G) {
|
|
15046
|
+
i(G);
|
|
15038
15047
|
} finally {
|
|
15039
15048
|
b == null || b(!1);
|
|
15040
15049
|
}
|
|
@@ -15049,17 +15058,17 @@ function fv({ toolbar: t }) {
|
|
|
15049
15058
|
b,
|
|
15050
15059
|
P,
|
|
15051
15060
|
i
|
|
15052
|
-
]),
|
|
15061
|
+
]), q = _(async () => {
|
|
15053
15062
|
try {
|
|
15054
15063
|
x == null || x(!0);
|
|
15055
|
-
const
|
|
15064
|
+
const G = await V.getHandler().duplicate({
|
|
15056
15065
|
id: p,
|
|
15057
15066
|
model: v,
|
|
15058
15067
|
context: C.current.getContext()
|
|
15059
15068
|
});
|
|
15060
|
-
|
|
15061
|
-
} catch (
|
|
15062
|
-
i(
|
|
15069
|
+
G && await (E == null ? void 0 : E([G]));
|
|
15070
|
+
} catch (G) {
|
|
15071
|
+
i(G);
|
|
15063
15072
|
} finally {
|
|
15064
15073
|
x == null || x(!1);
|
|
15065
15074
|
}
|
|
@@ -15071,33 +15080,33 @@ function fv({ toolbar: t }) {
|
|
|
15071
15080
|
x,
|
|
15072
15081
|
i
|
|
15073
15082
|
]), se = _(
|
|
15074
|
-
(
|
|
15075
|
-
S == null || S(l), k == null || k(!1), c == null || c(
|
|
15083
|
+
(G) => {
|
|
15084
|
+
S == null || S(l), k == null || k(!1), c == null || c(G);
|
|
15076
15085
|
},
|
|
15077
15086
|
[l, S, k, c]
|
|
15078
15087
|
), ee = _(async () => {
|
|
15079
|
-
const
|
|
15080
|
-
|
|
15088
|
+
const G = await Pn({ onFormSave: d });
|
|
15089
|
+
G.succeed && (M == null || M({
|
|
15081
15090
|
...Mi(
|
|
15082
15091
|
v,
|
|
15083
|
-
|
|
15092
|
+
G.currentId
|
|
15084
15093
|
),
|
|
15085
15094
|
initialViewType: "form"
|
|
15086
15095
|
}));
|
|
15087
15096
|
}, [v, d, M]), Q = _(async () => {
|
|
15088
|
-
const
|
|
15089
|
-
|
|
15097
|
+
const G = await Pn({ onFormSave: d });
|
|
15098
|
+
G.succeed && (M == null || M({
|
|
15090
15099
|
...Mi(
|
|
15091
15100
|
v,
|
|
15092
|
-
|
|
15101
|
+
G.currentId
|
|
15093
15102
|
),
|
|
15094
15103
|
initialViewType: "tree"
|
|
15095
15104
|
}));
|
|
15096
15105
|
}, [v, d, M]), re = _(
|
|
15097
|
-
async (
|
|
15098
|
-
(await
|
|
15106
|
+
async (G) => {
|
|
15107
|
+
(await Pn({ onFormSave: d })).succeed && (M == null || M({
|
|
15099
15108
|
model: "ir.attachment",
|
|
15100
|
-
res_id:
|
|
15109
|
+
res_id: G.id,
|
|
15101
15110
|
initialViewType: "form"
|
|
15102
15111
|
}));
|
|
15103
15112
|
},
|
|
@@ -15138,7 +15147,7 @@ function fv({ toolbar: t }) {
|
|
|
15138
15147
|
]
|
|
15139
15148
|
), l ? /* @__PURE__ */ L(ct, { wrap: !0, children: [
|
|
15140
15149
|
R && /* @__PURE__ */ L(ge, { children: [
|
|
15141
|
-
/* @__PURE__ */ s(
|
|
15150
|
+
/* @__PURE__ */ s(tt, {}),
|
|
15142
15151
|
/* @__PURE__ */ s(mt, {}),
|
|
15143
15152
|
/* @__PURE__ */ s(mt, {})
|
|
15144
15153
|
] }),
|
|
@@ -15163,7 +15172,7 @@ function fv({ toolbar: t }) {
|
|
|
15163
15172
|
onClick: () => Qt({
|
|
15164
15173
|
confirmMessage: n("confirmDuplicate"),
|
|
15165
15174
|
t: n,
|
|
15166
|
-
onOk:
|
|
15175
|
+
onOk: q
|
|
15167
15176
|
})
|
|
15168
15177
|
}
|
|
15169
15178
|
),
|
|
@@ -15279,9 +15288,9 @@ const Mi = (t, e) => ({
|
|
|
15279
15288
|
],
|
|
15280
15289
|
values: { selection_associated_object: `${t},${e}` },
|
|
15281
15290
|
forced_values: { res_model: t, res_id: e }
|
|
15282
|
-
}), { useToken: mv } =
|
|
15291
|
+
}), { useToken: mv } = nt, lc = (t) => {
|
|
15283
15292
|
const { ooui: e, value: n, onChange: r, valueValidator: o, linkPrefix: i = "" } = t, { id: a, readOnly: l, required: c } = e, { token: d } = mv(), f = c && !l ? { backgroundColor: d.colorPrimaryBg } : void 0, u = me(Ke), { elementHasLostFocus: p } = u || {}, [m, g] = F(!1), [h, y] = F(!1);
|
|
15284
|
-
|
|
15293
|
+
ae(() => {
|
|
15285
15294
|
l && !m && y(!1), !n && !l && (g(!0), y(!0));
|
|
15286
15295
|
}, [m, l]);
|
|
15287
15296
|
const v = (b) => {
|
|
@@ -15533,13 +15542,13 @@ const bv = (t) => {
|
|
|
15533
15542
|
totalItems: I,
|
|
15534
15543
|
searchTreeNameSearch: M
|
|
15535
15544
|
} = u || {}, [$, j] = F(!0), [N, H] = F(!0), [B, U] = F();
|
|
15536
|
-
|
|
15545
|
+
ae(() => {
|
|
15537
15546
|
n && H(!0);
|
|
15538
15547
|
}, [n]);
|
|
15539
|
-
const K =
|
|
15548
|
+
const K = kn(
|
|
15540
15549
|
() => Xt(T || [], i),
|
|
15541
15550
|
[i, T]
|
|
15542
|
-
),
|
|
15551
|
+
), q = Rt(async () => {
|
|
15543
15552
|
if (!n)
|
|
15544
15553
|
return;
|
|
15545
15554
|
const de = await V.getHandler().searchAllIds({
|
|
@@ -15560,14 +15569,14 @@ const bv = (t) => {
|
|
|
15560
15569
|
]), se = Rt(async () => {
|
|
15561
15570
|
if (n) {
|
|
15562
15571
|
if (H(!0), I === void 0 || (h == null ? void 0 : h.length) !== I && I !== void 0)
|
|
15563
|
-
await
|
|
15572
|
+
await q();
|
|
15564
15573
|
else {
|
|
15565
|
-
const de = $ && h && h.length > 0 ? h.map((
|
|
15574
|
+
const de = $ && h && h.length > 0 ? h.map((Y) => Y.id) : void 0;
|
|
15566
15575
|
U(de);
|
|
15567
15576
|
}
|
|
15568
15577
|
H(!1);
|
|
15569
15578
|
}
|
|
15570
|
-
}, [n, I, h,
|
|
15579
|
+
}, [n, I, h, q, $]);
|
|
15571
15580
|
ze(() => {
|
|
15572
15581
|
se();
|
|
15573
15582
|
}, [
|
|
@@ -15580,10 +15589,10 @@ const bv = (t) => {
|
|
|
15580
15589
|
h
|
|
15581
15590
|
]);
|
|
15582
15591
|
const ee = te(() => e.view_id !== D.view_id, [D.view_id, e.view_id]);
|
|
15583
|
-
|
|
15592
|
+
ae(() => {
|
|
15584
15593
|
ee && j(!0);
|
|
15585
15594
|
}, [ee]);
|
|
15586
|
-
const { clear: Q, searchFilterLoading: re, searchError:
|
|
15595
|
+
const { clear: Q, searchFilterLoading: re, searchError: G, offset: oe, tableRefreshing: ie } = Ll({
|
|
15587
15596
|
model: r,
|
|
15588
15597
|
setSearchTreeNameSearch: R,
|
|
15589
15598
|
setSelectedRowItems: y,
|
|
@@ -15605,7 +15614,7 @@ const bv = (t) => {
|
|
|
15605
15614
|
limit: C,
|
|
15606
15615
|
setLimit: k
|
|
15607
15616
|
}), X = te(
|
|
15608
|
-
() =>
|
|
15617
|
+
() => Vn([
|
|
15609
15618
|
a == null ? void 0 : a.search_fields,
|
|
15610
15619
|
l == null ? void 0 : l.search_fields,
|
|
15611
15620
|
c == null ? void 0 : c.search_fields
|
|
@@ -15644,13 +15653,13 @@ const bv = (t) => {
|
|
|
15644
15653
|
onSubmit: (de) => {
|
|
15645
15654
|
j(!1), v == null || v(de.params), w == null || w(!1);
|
|
15646
15655
|
},
|
|
15647
|
-
searchError:
|
|
15656
|
+
searchError: G,
|
|
15648
15657
|
searchVisible: b,
|
|
15649
15658
|
searchValues: S,
|
|
15650
15659
|
showLimitOptions: !1
|
|
15651
15660
|
}
|
|
15652
15661
|
),
|
|
15653
|
-
|
|
15662
|
+
ie || N ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(
|
|
15654
15663
|
ne,
|
|
15655
15664
|
{
|
|
15656
15665
|
ref: d,
|
|
@@ -15832,12 +15841,12 @@ function Fv({
|
|
|
15832
15841
|
}
|
|
15833
15842
|
const Av = () => {
|
|
15834
15843
|
const { currentTab: t } = fr(), { title: e } = zt(), { shareUrl: n } = Fv({ currentTab: t });
|
|
15835
|
-
|
|
15844
|
+
ae(() => {
|
|
15836
15845
|
if (n) {
|
|
15837
15846
|
const r = new URL(n, window.location.origin);
|
|
15838
15847
|
window.location.pathname + window.location.search !== r.pathname + r.search && window.history.replaceState({}, "", r.pathname + r.search);
|
|
15839
15848
|
}
|
|
15840
|
-
}, [t, n]),
|
|
15849
|
+
}, [t, n]), ae(() => {
|
|
15841
15850
|
document.title = e, t != null && t.title && t.title.length > 0 && (document.title = (t == null ? void 0 : t.title) + " - " + e);
|
|
15842
15851
|
}, [t, e]);
|
|
15843
15852
|
};
|
|
@@ -15863,15 +15872,15 @@ function Iv(t, e) {
|
|
|
15863
15872
|
order: w
|
|
15864
15873
|
} = t, [A, x] = F(), [P, R] = F([]), [O, C] = F(!0), k = p || void 0, [T, S] = F(
|
|
15865
15874
|
k
|
|
15866
|
-
), [E, D] = F([]), [I, M] = F(), [$, j] = F([]), [N, H] = F(), [B, U] = F(), [K,
|
|
15867
|
-
permissions:
|
|
15875
|
+
), [E, D] = F([]), [I, M] = F(), [$, j] = F([]), [N, H] = F(), [B, U] = F(), [K, q] = F(!1), [se, ee] = F(!1), [Q, re] = F(), { t: G } = ye(), { showErrorNotification: oe } = ht(), {
|
|
15876
|
+
permissions: ie,
|
|
15868
15877
|
loading: X,
|
|
15869
15878
|
error: ne
|
|
15870
15879
|
} = Mr({
|
|
15871
15880
|
model: r,
|
|
15872
15881
|
permissions: ["create", "write", "unlink"],
|
|
15873
15882
|
enabled: !!r
|
|
15874
|
-
}), de = J(),
|
|
15883
|
+
}), de = J(), Y = J(), le = me(
|
|
15875
15884
|
Bt
|
|
15876
15885
|
), {
|
|
15877
15886
|
setCurrentView: ve,
|
|
@@ -15929,8 +15938,8 @@ function Iv(t, e) {
|
|
|
15929
15938
|
const [, ce] = be;
|
|
15930
15939
|
return ce === "form";
|
|
15931
15940
|
});
|
|
15932
|
-
let
|
|
15933
|
-
st && (
|
|
15941
|
+
let W;
|
|
15942
|
+
st && (W = {
|
|
15934
15943
|
action_id: m,
|
|
15935
15944
|
action_type: g,
|
|
15936
15945
|
name: a,
|
|
@@ -15943,7 +15952,7 @@ function Iv(t, e) {
|
|
|
15943
15952
|
id: o.active_id,
|
|
15944
15953
|
model: r,
|
|
15945
15954
|
context: o,
|
|
15946
|
-
configAction:
|
|
15955
|
+
configAction: W,
|
|
15947
15956
|
extra: { action_id: m, action_type: g }
|
|
15948
15957
|
});
|
|
15949
15958
|
break;
|
|
@@ -16020,7 +16029,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16020
16029
|
const we = { action_id: m, action_type: g };
|
|
16021
16030
|
ve == null || ve({ ...A, extra: we });
|
|
16022
16031
|
}
|
|
16023
|
-
}, [Fe, he]),
|
|
16032
|
+
}, [Fe, he]), ae(() => {
|
|
16024
16033
|
ne && oe({
|
|
16025
16034
|
type: "error",
|
|
16026
16035
|
title: "Permissions Error",
|
|
@@ -16031,15 +16040,15 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16031
16040
|
return A && A.type === "form" ? await de.current.cancelUnsavedChanges() : !0;
|
|
16032
16041
|
}
|
|
16033
16042
|
async function Qe() {
|
|
16034
|
-
he === c && (A.type === "form" && !await de.current.cancelUnsavedChanges() ||
|
|
16043
|
+
he === c && (A.type === "form" && !await de.current.cancelUnsavedChanges() || q(!0));
|
|
16035
16044
|
}
|
|
16036
|
-
async function
|
|
16045
|
+
async function rt(we, Ge) {
|
|
16037
16046
|
var Ye;
|
|
16038
16047
|
ee(!0);
|
|
16039
16048
|
let Be, Ze;
|
|
16040
16049
|
if (we.length === 1) {
|
|
16041
16050
|
Be = "form", Ze = [];
|
|
16042
|
-
const Ae = we[0], Ue = $.findIndex((
|
|
16051
|
+
const Ae = we[0], Ue = $.findIndex((W) => W.id === Ae);
|
|
16043
16052
|
let st;
|
|
16044
16053
|
if (Ue === -1) {
|
|
16045
16054
|
try {
|
|
@@ -16054,14 +16063,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16054
16063
|
} catch {
|
|
16055
16064
|
}
|
|
16056
16065
|
if (!st) {
|
|
16057
|
-
ee(!1),
|
|
16066
|
+
ee(!1), q(!1), hn(G("idNotFound"));
|
|
16058
16067
|
return;
|
|
16059
16068
|
}
|
|
16060
16069
|
} else
|
|
16061
16070
|
st = $[Ue];
|
|
16062
16071
|
} else
|
|
16063
16072
|
Be = "tree", Ze = [["id", "in", we]];
|
|
16064
|
-
if (ee(!1),
|
|
16073
|
+
if (ee(!1), q(!1), Ge && Be === "form") {
|
|
16065
16074
|
De(we[0]);
|
|
16066
16075
|
const Ae = P.find(
|
|
16067
16076
|
(Ue) => Ue.type === "form"
|
|
@@ -16094,7 +16103,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16094
16103
|
Ce(we);
|
|
16095
16104
|
}
|
|
16096
16105
|
}
|
|
16097
|
-
return O || X ? /* @__PURE__ */ s(
|
|
16106
|
+
return O || X ? /* @__PURE__ */ s(tt, {}) : A ? /* @__PURE__ */ L(
|
|
16098
16107
|
_g,
|
|
16099
16108
|
{
|
|
16100
16109
|
title: a,
|
|
@@ -16102,7 +16111,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16102
16111
|
setCurrentView: Ce,
|
|
16103
16112
|
availableViews: P,
|
|
16104
16113
|
formRef: de,
|
|
16105
|
-
searchTreeRef:
|
|
16114
|
+
searchTreeRef: Y,
|
|
16106
16115
|
onNewClicked: Xe,
|
|
16107
16116
|
currentId: T,
|
|
16108
16117
|
setCurrentId: De,
|
|
@@ -16119,13 +16128,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16119
16128
|
setSelectedRowItems: D,
|
|
16120
16129
|
setSearchTreeNameSearch: re,
|
|
16121
16130
|
searchTreeNameSearch: Q,
|
|
16122
|
-
goToResourceId:
|
|
16131
|
+
goToResourceId: rt,
|
|
16123
16132
|
limit: y,
|
|
16124
16133
|
isActive: c === he,
|
|
16125
16134
|
initialSearchParams: v,
|
|
16126
16135
|
initialCurrentPage: b,
|
|
16127
16136
|
initialOrder: w,
|
|
16128
|
-
permissions:
|
|
16137
|
+
permissions: ie,
|
|
16129
16138
|
permissionsLoading: X,
|
|
16130
16139
|
permissionsError: ne,
|
|
16131
16140
|
children: [
|
|
@@ -16145,7 +16154,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16145
16154
|
setCurrentItemIndex: M,
|
|
16146
16155
|
formForcedValues: u,
|
|
16147
16156
|
limit: y,
|
|
16148
|
-
searchTreeRef:
|
|
16157
|
+
searchTreeRef: Y,
|
|
16149
16158
|
searchTreeNameSearch: Q,
|
|
16150
16159
|
setCurrentView: Ce,
|
|
16151
16160
|
setCurrentId: De
|
|
@@ -16155,10 +16164,10 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
16155
16164
|
yv,
|
|
16156
16165
|
{
|
|
16157
16166
|
visible: K,
|
|
16158
|
-
onIdSubmitted:
|
|
16167
|
+
onIdSubmitted: rt,
|
|
16159
16168
|
isSearching: se,
|
|
16160
16169
|
onCancel: () => {
|
|
16161
|
-
|
|
16170
|
+
q(!1);
|
|
16162
16171
|
}
|
|
16163
16172
|
}
|
|
16164
16173
|
)
|
|
@@ -16294,7 +16303,7 @@ function Ov(t, e) {
|
|
|
16294
16303
|
), [w] = _e(V.getHandler().update), A = en(
|
|
16295
16304
|
Dt.FEATURE_READFORVIEW
|
|
16296
16305
|
);
|
|
16297
|
-
|
|
16306
|
+
ae(() => {
|
|
16298
16307
|
x();
|
|
16299
16308
|
}, [n, o, r]), Ht(e, () => ({
|
|
16300
16309
|
refresh: () => {
|
|
@@ -16424,17 +16433,17 @@ function Ov(t, e) {
|
|
|
16424
16433
|
title: B,
|
|
16425
16434
|
description: U,
|
|
16426
16435
|
views: K,
|
|
16427
|
-
model:
|
|
16436
|
+
model: q,
|
|
16428
16437
|
context: se,
|
|
16429
16438
|
domain: ee,
|
|
16430
16439
|
initialView: Q,
|
|
16431
16440
|
limit: re
|
|
16432
16441
|
} = D;
|
|
16433
|
-
let
|
|
16442
|
+
let G = {};
|
|
16434
16443
|
try {
|
|
16435
|
-
|
|
16444
|
+
G = JSON.parse(M.replace(/'/g, '"'));
|
|
16436
16445
|
} catch {
|
|
16437
|
-
|
|
16446
|
+
G = { x: E * 2, y: 0, w: 2, h: 3 };
|
|
16438
16447
|
}
|
|
16439
16448
|
let oe = null;
|
|
16440
16449
|
if ((Q == null ? void 0 : Q.type) === "graph") {
|
|
@@ -16443,9 +16452,9 @@ function Ov(t, e) {
|
|
|
16443
16452
|
de,
|
|
16444
16453
|
{
|
|
16445
16454
|
view_id: K.filter(
|
|
16446
|
-
(
|
|
16455
|
+
(Y) => Y[1] === "graph"
|
|
16447
16456
|
)[0][0],
|
|
16448
|
-
model:
|
|
16457
|
+
model: q,
|
|
16449
16458
|
context: se,
|
|
16450
16459
|
domain: ee,
|
|
16451
16460
|
limit: re
|
|
@@ -16453,23 +16462,23 @@ function Ov(t, e) {
|
|
|
16453
16462
|
$
|
|
16454
16463
|
);
|
|
16455
16464
|
} else if ((Q == null ? void 0 : Q.type) === "form")
|
|
16456
|
-
oe = /* @__PURE__ */ s(Ul, { model:
|
|
16465
|
+
oe = /* @__PURE__ */ s(Ul, { model: q, actionDomain: ee }, $);
|
|
16457
16466
|
else if ((Q == null ? void 0 : Q.type) === "tree")
|
|
16458
16467
|
oe = /* @__PURE__ */ s(
|
|
16459
16468
|
Wl,
|
|
16460
16469
|
{
|
|
16461
|
-
model:
|
|
16470
|
+
model: q,
|
|
16462
16471
|
domain: ee,
|
|
16463
16472
|
view_id: K.filter(
|
|
16464
16473
|
(ne) => ne[1] === "tree"
|
|
16465
16474
|
)[0][0],
|
|
16466
16475
|
onRowClicked: (ne) => {
|
|
16467
|
-
const de = K.find((
|
|
16468
|
-
const [, le] =
|
|
16476
|
+
const de = K.find((Y) => {
|
|
16477
|
+
const [, le] = Y;
|
|
16469
16478
|
return le === "form";
|
|
16470
16479
|
});
|
|
16471
16480
|
if (de) {
|
|
16472
|
-
const [
|
|
16481
|
+
const [Y, le] = de, {
|
|
16473
16482
|
actionId: ve,
|
|
16474
16483
|
actionType: fe,
|
|
16475
16484
|
title: Fe,
|
|
@@ -16480,7 +16489,7 @@ function Ov(t, e) {
|
|
|
16480
16489
|
name: Fe,
|
|
16481
16490
|
res_id: ne.id,
|
|
16482
16491
|
res_model: he,
|
|
16483
|
-
view_id:
|
|
16492
|
+
view_id: Y,
|
|
16484
16493
|
view_type: le
|
|
16485
16494
|
};
|
|
16486
16495
|
m(Me);
|
|
@@ -16499,7 +16508,7 @@ function Ov(t, e) {
|
|
|
16499
16508
|
tabKey: H,
|
|
16500
16509
|
title: B,
|
|
16501
16510
|
views: K,
|
|
16502
|
-
model:
|
|
16511
|
+
model: q,
|
|
16503
16512
|
context: se,
|
|
16504
16513
|
domain: ee,
|
|
16505
16514
|
setCanWeClose: () => {
|
|
@@ -16510,20 +16519,20 @@ function Ov(t, e) {
|
|
|
16510
16519
|
$
|
|
16511
16520
|
);
|
|
16512
16521
|
}
|
|
16513
|
-
let
|
|
16522
|
+
let ie;
|
|
16514
16523
|
const X = K.find((ne) => {
|
|
16515
16524
|
const [, de] = ne;
|
|
16516
16525
|
return de === "tree";
|
|
16517
16526
|
});
|
|
16518
16527
|
if (X) {
|
|
16519
16528
|
const [ne, de] = X, {
|
|
16520
|
-
actionId:
|
|
16529
|
+
actionId: Y,
|
|
16521
16530
|
actionType: le,
|
|
16522
16531
|
title: ve,
|
|
16523
16532
|
model: fe
|
|
16524
16533
|
} = D;
|
|
16525
|
-
|
|
16526
|
-
action_id:
|
|
16534
|
+
ie = {
|
|
16535
|
+
action_id: Y,
|
|
16527
16536
|
action_type: le,
|
|
16528
16537
|
name: ve,
|
|
16529
16538
|
res_id: !1,
|
|
@@ -16538,8 +16547,8 @@ function Ov(t, e) {
|
|
|
16538
16547
|
{
|
|
16539
16548
|
id: $,
|
|
16540
16549
|
title: B,
|
|
16541
|
-
parms:
|
|
16542
|
-
action:
|
|
16550
|
+
parms: G,
|
|
16551
|
+
action: ie,
|
|
16543
16552
|
openAction: m,
|
|
16544
16553
|
tooltip: U,
|
|
16545
16554
|
children: oe
|
|
@@ -16567,7 +16576,7 @@ const Dv = Nt(Ov), Pv = (t) => {
|
|
|
16567
16576
|
if (n.domain) {
|
|
16568
16577
|
const C = await V.getHandler().evalDomain({
|
|
16569
16578
|
domain: n.domain,
|
|
16570
|
-
values:
|
|
16579
|
+
values: bn({
|
|
16571
16580
|
fields: v == null ? void 0 : v.getFields(),
|
|
16572
16581
|
values: v.getAllHierarchyValues()
|
|
16573
16582
|
}),
|
|
@@ -16609,7 +16618,7 @@ const Dv = Nt(Ov), Pv = (t) => {
|
|
|
16609
16618
|
C.push({ id: T, operation: "pendingLink" });
|
|
16610
16619
|
}), w(C);
|
|
16611
16620
|
};
|
|
16612
|
-
return f && a.length === 0 ? /* @__PURE__ */ s(
|
|
16621
|
+
return f && a.length === 0 ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(ge, { children: /* @__PURE__ */ L("div", { className: "flex flex-row", children: [
|
|
16613
16622
|
/* @__PURE__ */ s(
|
|
16614
16623
|
Kn.Group,
|
|
16615
16624
|
{
|
|
@@ -16692,7 +16701,7 @@ const Dv = Nt(Ov), Pv = (t) => {
|
|
|
16692
16701
|
fontFamily: a,
|
|
16693
16702
|
fontSize: l
|
|
16694
16703
|
}
|
|
16695
|
-
} =
|
|
16704
|
+
} = nt.useToken(), c = {
|
|
16696
16705
|
padding: 0,
|
|
16697
16706
|
listStyleType: "none",
|
|
16698
16707
|
fontFamily: a,
|
|
@@ -16869,7 +16878,7 @@ const Qv = (t) => {
|
|
|
16869
16878
|
icon: c(a)
|
|
16870
16879
|
}
|
|
16871
16880
|
);
|
|
16872
|
-
}, { defaultAlgorithm: nb, defaultSeed: rb } =
|
|
16881
|
+
}, { defaultAlgorithm: nb, defaultSeed: rb } = nt, Vi = nb(rb), ob = (t) => {
|
|
16873
16882
|
const { ooui: e, responsiveBehaviour: n = !1 } = t;
|
|
16874
16883
|
return /* @__PURE__ */ s(sb, { autoplay: e.autoPlay, dots: !0, autoplaySpeed: 5e3, children: e.items.map((r, o) => /* @__PURE__ */ s(
|
|
16875
16884
|
As,
|
|
@@ -16914,7 +16923,7 @@ function ub(t, e) {
|
|
|
16914
16923
|
), [f, u] = _e(
|
|
16915
16924
|
V.getHandler().logAction
|
|
16916
16925
|
);
|
|
16917
|
-
|
|
16926
|
+
ae(() => () => {
|
|
16918
16927
|
u();
|
|
16919
16928
|
}, []);
|
|
16920
16929
|
const [p, m] = F([
|
|
@@ -17041,7 +17050,7 @@ function ub(t, e) {
|
|
|
17041
17050
|
const [j, N] = T.split(","), H = parseInt(N), B = $.context, U = on({
|
|
17042
17051
|
context: B,
|
|
17043
17052
|
values: l
|
|
17044
|
-
}), K = $.domain,
|
|
17053
|
+
}), K = $.domain, q = await (async () => {
|
|
17045
17054
|
try {
|
|
17046
17055
|
return K ? await V.getHandler().evalDomain({
|
|
17047
17056
|
domain: K,
|
|
@@ -17056,12 +17065,12 @@ function ub(t, e) {
|
|
|
17056
17065
|
views: ee,
|
|
17057
17066
|
name: Q,
|
|
17058
17067
|
target: re,
|
|
17059
|
-
view_type:
|
|
17068
|
+
view_type: G,
|
|
17060
17069
|
limit: oe
|
|
17061
|
-
} = $,
|
|
17070
|
+
} = $, ie = G === "tree", X = [];
|
|
17062
17071
|
for (const de of ee) {
|
|
17063
|
-
const [
|
|
17064
|
-
if (
|
|
17072
|
+
const [Y, le] = de;
|
|
17073
|
+
if (Y)
|
|
17065
17074
|
X.push(de);
|
|
17066
17075
|
else if (le === "dashboard")
|
|
17067
17076
|
X.push([void 0, "dashboard"]);
|
|
@@ -17069,7 +17078,7 @@ function ub(t, e) {
|
|
|
17069
17078
|
const { view_id: ve } = await V.getHandler().getView({
|
|
17070
17079
|
model: se,
|
|
17071
17080
|
type: le,
|
|
17072
|
-
id:
|
|
17081
|
+
id: Y,
|
|
17073
17082
|
context: { ...c, ...U }
|
|
17074
17083
|
});
|
|
17075
17084
|
X.push([ve, le]);
|
|
@@ -17077,16 +17086,16 @@ function ub(t, e) {
|
|
|
17077
17086
|
}
|
|
17078
17087
|
let ne;
|
|
17079
17088
|
if (D) {
|
|
17080
|
-
const [de,
|
|
17089
|
+
const [de, Y] = X.find(
|
|
17081
17090
|
([le, ve]) => ve === D
|
|
17082
17091
|
);
|
|
17083
|
-
ne = { id: de, type:
|
|
17092
|
+
ne = { id: de, type: Y };
|
|
17084
17093
|
} else {
|
|
17085
|
-
const [de,
|
|
17086
|
-
ne = { id: de, type:
|
|
17094
|
+
const [de, Y] = X[0];
|
|
17095
|
+
ne = { id: de, type: Y };
|
|
17087
17096
|
}
|
|
17088
17097
|
C({
|
|
17089
|
-
domain: [...
|
|
17098
|
+
domain: [...q, ...M],
|
|
17090
17099
|
context: { ...c, ...U },
|
|
17091
17100
|
model: se,
|
|
17092
17101
|
views: X,
|
|
@@ -17098,7 +17107,7 @@ function ub(t, e) {
|
|
|
17098
17107
|
values: S,
|
|
17099
17108
|
forced_values: E,
|
|
17100
17109
|
res_id: I,
|
|
17101
|
-
treeExpandable:
|
|
17110
|
+
treeExpandable: ie,
|
|
17102
17111
|
limit: oe,
|
|
17103
17112
|
actionRawData: {
|
|
17104
17113
|
context: B,
|
|
@@ -17139,12 +17148,12 @@ function ub(t, e) {
|
|
|
17139
17148
|
target: H,
|
|
17140
17149
|
string: B,
|
|
17141
17150
|
limit: U
|
|
17142
|
-
} = T, [K,
|
|
17151
|
+
} = T, [K, q] = N[0], se = { id: K, type: q }, ee = $, Q = on({
|
|
17143
17152
|
context: ee,
|
|
17144
17153
|
values: { ...E, ...l }
|
|
17145
|
-
}), re = j,
|
|
17154
|
+
}), re = j, G = j ? await V.getHandler().evalDomain({
|
|
17146
17155
|
domain: j,
|
|
17147
|
-
values:
|
|
17156
|
+
values: bn({
|
|
17148
17157
|
fields: S,
|
|
17149
17158
|
values: { ...E, ...l }
|
|
17150
17159
|
}),
|
|
@@ -17156,7 +17165,7 @@ function ub(t, e) {
|
|
|
17156
17165
|
target: H,
|
|
17157
17166
|
views: N,
|
|
17158
17167
|
context: { ...c, ...Q },
|
|
17159
|
-
domain:
|
|
17168
|
+
domain: G,
|
|
17160
17169
|
title: B,
|
|
17161
17170
|
initialView: se,
|
|
17162
17171
|
action_id: D,
|
|
@@ -17188,7 +17197,7 @@ function ub(t, e) {
|
|
|
17188
17197
|
fields: {}
|
|
17189
17198
|
});
|
|
17190
17199
|
let K = [];
|
|
17191
|
-
const
|
|
17200
|
+
const q = j && j.length > 0 ? j : H.domain;
|
|
17192
17201
|
(j == null ? void 0 : j.length) > 0 ? K = j : H.domain && (K = await V.getHandler().evalDomain({
|
|
17193
17202
|
domain: H.domain,
|
|
17194
17203
|
values: { ...l, ...$ },
|
|
@@ -17199,9 +17208,9 @@ function ub(t, e) {
|
|
|
17199
17208
|
views: ee,
|
|
17200
17209
|
name: Q,
|
|
17201
17210
|
target: re,
|
|
17202
|
-
view_type:
|
|
17211
|
+
view_type: G,
|
|
17203
17212
|
limit: oe
|
|
17204
|
-
} = H,
|
|
17213
|
+
} = H, ie = G === "tree", X = [];
|
|
17205
17214
|
for (const le of ee) {
|
|
17206
17215
|
const [ve, fe] = le;
|
|
17207
17216
|
if (ve)
|
|
@@ -17224,7 +17233,7 @@ function ub(t, e) {
|
|
|
17224
17233
|
ne = void 0, de = le[1];
|
|
17225
17234
|
} else
|
|
17226
17235
|
[ne, de] = X.find((le) => le[0] === void 0 ? !1 : le[0] === I);
|
|
17227
|
-
const
|
|
17236
|
+
const Y = { id: ne, type: de };
|
|
17228
17237
|
C({
|
|
17229
17238
|
domain: K,
|
|
17230
17239
|
context: { ...c, ...U },
|
|
@@ -17232,15 +17241,15 @@ function ub(t, e) {
|
|
|
17232
17241
|
views: X,
|
|
17233
17242
|
title: Q,
|
|
17234
17243
|
target: re,
|
|
17235
|
-
initialView:
|
|
17244
|
+
initialView: Y,
|
|
17236
17245
|
action_id: S,
|
|
17237
17246
|
action_type: E,
|
|
17238
17247
|
res_id: D,
|
|
17239
|
-
treeExpandable:
|
|
17248
|
+
treeExpandable: ie,
|
|
17240
17249
|
limit: M && (oe === 0 || oe === !1) ? St : oe,
|
|
17241
17250
|
actionRawData: {
|
|
17242
17251
|
context: B,
|
|
17243
|
-
domain:
|
|
17252
|
+
domain: q,
|
|
17244
17253
|
values: $
|
|
17245
17254
|
}
|
|
17246
17255
|
});
|
|
@@ -17278,12 +17287,12 @@ function ub(t, e) {
|
|
|
17278
17287
|
res_id: B,
|
|
17279
17288
|
values: U,
|
|
17280
17289
|
forced_values: K,
|
|
17281
|
-
treeExpandable:
|
|
17290
|
+
treeExpandable: q = !1,
|
|
17282
17291
|
limit: se,
|
|
17283
17292
|
searchParams: ee,
|
|
17284
17293
|
currentPage: Q,
|
|
17285
17294
|
order: re
|
|
17286
|
-
} = T,
|
|
17295
|
+
} = T, G = Zo();
|
|
17287
17296
|
if (d != null && d.isEnabled && (((oe = d == null ? void 0 : d.params) == null ? void 0 : oe.types) || []).includes(H))
|
|
17288
17297
|
try {
|
|
17289
17298
|
f({
|
|
@@ -17291,11 +17300,11 @@ function ub(t, e) {
|
|
|
17291
17300
|
action_id: N,
|
|
17292
17301
|
context: E
|
|
17293
17302
|
});
|
|
17294
|
-
} catch (
|
|
17295
|
-
console.error(
|
|
17303
|
+
} catch (ie) {
|
|
17304
|
+
console.error(ie);
|
|
17296
17305
|
}
|
|
17297
17306
|
if ($ !== "current" && $ !== void 0) {
|
|
17298
|
-
const
|
|
17307
|
+
const ie = await V.getHandler().getView({
|
|
17299
17308
|
model: D,
|
|
17300
17309
|
type: "form",
|
|
17301
17310
|
id: j.type === "form" ? j.id : void 0,
|
|
@@ -17304,17 +17313,17 @@ function ub(t, e) {
|
|
|
17304
17313
|
h.current.openActionModal({
|
|
17305
17314
|
domain: S,
|
|
17306
17315
|
model: D,
|
|
17307
|
-
formView:
|
|
17316
|
+
formView: ie,
|
|
17308
17317
|
context: { ...c, ...E },
|
|
17309
17318
|
actionData: {
|
|
17310
17319
|
action_id: N,
|
|
17311
17320
|
action_type: H,
|
|
17312
17321
|
res_id: B,
|
|
17313
|
-
view_id:
|
|
17322
|
+
view_id: ie.view_id
|
|
17314
17323
|
}
|
|
17315
17324
|
});
|
|
17316
17325
|
} else {
|
|
17317
|
-
const
|
|
17326
|
+
const ie = j && Array.isArray(j.id) ? { ...j, id: j.id[0] } : j;
|
|
17318
17327
|
x({
|
|
17319
17328
|
title: M,
|
|
17320
17329
|
content: /* @__PURE__ */ s(
|
|
@@ -17322,25 +17331,25 @@ function ub(t, e) {
|
|
|
17322
17331
|
{
|
|
17323
17332
|
action_id: N,
|
|
17324
17333
|
action_type: H,
|
|
17325
|
-
tabKey:
|
|
17334
|
+
tabKey: G,
|
|
17326
17335
|
title: M,
|
|
17327
17336
|
views: I,
|
|
17328
17337
|
model: D,
|
|
17329
17338
|
context: { ...E, ...c },
|
|
17330
17339
|
domain: S,
|
|
17331
17340
|
setCanWeClose: v,
|
|
17332
|
-
initialView:
|
|
17341
|
+
initialView: ie,
|
|
17333
17342
|
res_id: B,
|
|
17334
17343
|
formDefaultValues: U,
|
|
17335
17344
|
formForcedValues: K,
|
|
17336
|
-
treeExpandable:
|
|
17345
|
+
treeExpandable: q,
|
|
17337
17346
|
limit: se,
|
|
17338
17347
|
initialSearchParams: ee,
|
|
17339
17348
|
currentPage: Q,
|
|
17340
17349
|
order: re
|
|
17341
17350
|
}
|
|
17342
17351
|
),
|
|
17343
|
-
key:
|
|
17352
|
+
key: G,
|
|
17344
17353
|
action: T
|
|
17345
17354
|
});
|
|
17346
17355
|
}
|
|
@@ -17406,7 +17415,7 @@ function ub(t, e) {
|
|
|
17406
17415
|
}
|
|
17407
17416
|
);
|
|
17408
17417
|
}
|
|
17409
|
-
const fw = Nt(ub), { useToken: fb } =
|
|
17418
|
+
const fw = Nt(ub), { useToken: fb } = nt;
|
|
17410
17419
|
function pb(t) {
|
|
17411
17420
|
const { label: e, onClose: n, tabKey: r, isActive: o, onSelected: i } = t, { token: a } = fb(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
|
|
17412
17421
|
return /* @__PURE__ */ L(
|
|
@@ -17514,7 +17523,7 @@ function mw() {
|
|
|
17514
17523
|
), { tabs: e } = t || {}, n = (e == null ? void 0 : e.map((r) => /* @__PURE__ */ s(hb, { tab: r }, r.key))) || null;
|
|
17515
17524
|
return /* @__PURE__ */ s(ge, { children: n });
|
|
17516
17525
|
}
|
|
17517
|
-
const { useToken: gb } =
|
|
17526
|
+
const { useToken: gb } = nt, hw = (t) => {
|
|
17518
17527
|
const {
|
|
17519
17528
|
onRetrieveShortcuts: e,
|
|
17520
17529
|
onCheckIsFavourite: n,
|
|
@@ -17550,7 +17559,7 @@ const { useToken: gb } = tt, hw = (t) => {
|
|
|
17550
17559
|
if (A)
|
|
17551
17560
|
return JSON.stringify(A);
|
|
17552
17561
|
}, [A]);
|
|
17553
|
-
|
|
17562
|
+
ae(() => {
|
|
17554
17563
|
R();
|
|
17555
17564
|
}, [x]);
|
|
17556
17565
|
function P(T) {
|