@gisce/react-ooui 2.98.0 → 2.98.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -732,13 +732,13 @@ const va = (t) => {
|
|
|
732
732
|
async function x(F) {
|
|
733
733
|
const $ = {};
|
|
734
734
|
for (const R of F) {
|
|
735
|
-
const
|
|
735
|
+
const E = (await H.getHandler().readObjects({
|
|
736
736
|
model: r,
|
|
737
737
|
ids: [o],
|
|
738
738
|
fieldsToRetrieve: [i],
|
|
739
739
|
context: { lang: R.code }
|
|
740
740
|
}))[0];
|
|
741
|
-
$[R.code] =
|
|
741
|
+
$[R.code] = E[i] || "";
|
|
742
742
|
}
|
|
743
743
|
y.current = $, v($);
|
|
744
744
|
}
|
|
@@ -1621,19 +1621,19 @@ const Cn = ({
|
|
|
1621
1621
|
titleField: b,
|
|
1622
1622
|
iconField: w,
|
|
1623
1623
|
colorField: C
|
|
1624
|
-
} = r, x = i.filter((
|
|
1624
|
+
} = r, x = i.filter((E) => E.values), D = pe(Qe), { getContext: S } = D || {};
|
|
1625
1625
|
Ue(() => {
|
|
1626
1626
|
F();
|
|
1627
1627
|
}, [i]);
|
|
1628
|
-
const P = (
|
|
1628
|
+
const P = (E) => {
|
|
1629
1629
|
o == null || o({
|
|
1630
|
-
items:
|
|
1630
|
+
items: E
|
|
1631
1631
|
});
|
|
1632
1632
|
};
|
|
1633
1633
|
async function F() {
|
|
1634
1634
|
l(!0), d(void 0);
|
|
1635
1635
|
try {
|
|
1636
|
-
const [
|
|
1636
|
+
const [E] = await us({
|
|
1637
1637
|
treeView: {
|
|
1638
1638
|
fields: n.get("tree").fields,
|
|
1639
1639
|
arch: n.get("tree").arch
|
|
@@ -1646,9 +1646,9 @@ const Cn = ({
|
|
|
1646
1646
|
context: { ...S == null ? void 0 : S(), ...h },
|
|
1647
1647
|
currentView: "form"
|
|
1648
1648
|
});
|
|
1649
|
-
P(
|
|
1650
|
-
} catch (
|
|
1651
|
-
d(
|
|
1649
|
+
P(E);
|
|
1650
|
+
} catch (E) {
|
|
1651
|
+
d(E);
|
|
1652
1652
|
} finally {
|
|
1653
1653
|
l(!1);
|
|
1654
1654
|
}
|
|
@@ -1657,26 +1657,26 @@ const Cn = ({
|
|
|
1657
1657
|
return console.error(c), /* @__PURE__ */ s(Rt, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
1658
1658
|
if (a)
|
|
1659
1659
|
return /* @__PURE__ */ s(nt, {});
|
|
1660
|
-
const $ = (
|
|
1661
|
-
const I = Pt(
|
|
1660
|
+
const $ = (E) => {
|
|
1661
|
+
const I = Pt(E);
|
|
1662
1662
|
return I && /* @__PURE__ */ s(I, {});
|
|
1663
|
-
}, R = x.map((
|
|
1664
|
-
var A, k,
|
|
1663
|
+
}, R = x.map((E) => {
|
|
1664
|
+
var A, k, _, M;
|
|
1665
1665
|
const I = {
|
|
1666
1666
|
children: /* @__PURE__ */ s(
|
|
1667
1667
|
Yu,
|
|
1668
1668
|
{
|
|
1669
|
-
title: (A =
|
|
1670
|
-
summary: (k =
|
|
1669
|
+
title: (A = E.values) == null ? void 0 : A[b],
|
|
1670
|
+
summary: (k = E.values) == null ? void 0 : k[y],
|
|
1671
1671
|
onClick: () => {
|
|
1672
1672
|
m(
|
|
1673
|
-
x.find((W) =>
|
|
1673
|
+
x.find((W) => E.id === W.id)
|
|
1674
1674
|
), u(!0);
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
1677
|
)
|
|
1678
1678
|
};
|
|
1679
|
-
return (
|
|
1679
|
+
return (_ = E.values) != null && _[w] && (I.dot = $(E.values[w])), (M = E.values) != null && M[C] && (I.color = !ma(E.values[C]) && !ha(E.values[C]) && !E.values[C].toString().startsWith("#") ? mr(E.values[C]) : E.values[C]), I;
|
|
1680
1680
|
});
|
|
1681
1681
|
return /* @__PURE__ */ L(he, { children: [
|
|
1682
1682
|
/* @__PURE__ */ s(Wi, { style: { padding: "1rem" }, items: R }),
|
|
@@ -2495,7 +2495,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2495
2495
|
fixedHeight: p
|
|
2496
2496
|
} = t, [m, g] = T(!1), [h, v] = T(), [y, b] = T(0), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R] = Re(
|
|
2497
2497
|
H.getHandler().searchAllIds
|
|
2498
|
-
), [
|
|
2498
|
+
), [E] = Re(
|
|
2499
2499
|
H.getHandler().readObjects
|
|
2500
2500
|
), [I] = Re(
|
|
2501
2501
|
H.getHandler().searchCount
|
|
@@ -2507,7 +2507,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2507
2507
|
ce(() => {
|
|
2508
2508
|
W();
|
|
2509
2509
|
}, [e, o]);
|
|
2510
|
-
async function
|
|
2510
|
+
async function _({
|
|
2511
2511
|
domain: V,
|
|
2512
2512
|
isTotal: N
|
|
2513
2513
|
}) {
|
|
@@ -2518,7 +2518,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2518
2518
|
params: V,
|
|
2519
2519
|
model: e,
|
|
2520
2520
|
context: r
|
|
2521
|
-
}), j = await
|
|
2521
|
+
}), j = await E({
|
|
2522
2522
|
model: e,
|
|
2523
2523
|
ids: U,
|
|
2524
2524
|
fieldsToRetrieve: [d],
|
|
@@ -2541,7 +2541,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2541
2541
|
params: V,
|
|
2542
2542
|
model: e,
|
|
2543
2543
|
context: r
|
|
2544
|
-
}), U = await
|
|
2544
|
+
}), U = await E({
|
|
2545
2545
|
model: e,
|
|
2546
2546
|
ids: N,
|
|
2547
2547
|
fieldsToRetrieve: [d],
|
|
@@ -2562,14 +2562,14 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2562
2562
|
g(!0), $(void 0);
|
|
2563
2563
|
let V, N;
|
|
2564
2564
|
try {
|
|
2565
|
-
const U = await
|
|
2565
|
+
const U = await _({ domain: n, isTotal: !1 });
|
|
2566
2566
|
if (v(U), i) {
|
|
2567
2567
|
const j = await A({
|
|
2568
2568
|
domain: i,
|
|
2569
2569
|
values: {},
|
|
2570
2570
|
context: r
|
|
2571
2571
|
});
|
|
2572
|
-
V = await
|
|
2572
|
+
V = await _({
|
|
2573
2573
|
domain: j,
|
|
2574
2574
|
isTotal: !0
|
|
2575
2575
|
}), C(V);
|
|
@@ -3531,6 +3531,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3531
3531
|
return {
|
|
3532
3532
|
icon: /* @__PURE__ */ s(Dn, {}),
|
|
3533
3533
|
...W,
|
|
3534
|
+
originalData: W,
|
|
3534
3535
|
name: V ? /* @__PURE__ */ L(
|
|
3535
3536
|
"div",
|
|
3536
3537
|
{
|
|
@@ -3550,14 +3551,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3550
3551
|
}
|
|
3551
3552
|
)
|
|
3552
3553
|
}
|
|
3553
|
-
], [l, C, f.colorPrimary]), F = re(() => !w || w.length === 0 ? (b == null ? void 0 : b.fields) || {} : w.reduce((
|
|
3554
|
-
async (
|
|
3554
|
+
], [l, C, f.colorPrimary]), F = re(() => !w || w.length === 0 ? (b == null ? void 0 : b.fields) || {} : w.reduce((_, M) => ({ ..._, ...M.fields || {} }), {}), [w, b]), $ = O(
|
|
3555
|
+
async (_) => {
|
|
3555
3556
|
var M;
|
|
3556
3557
|
if (D != null && D.isEnabled && (((M = D == null ? void 0 : D.params) == null ? void 0 : M.types) || []).includes("ir.search"))
|
|
3557
3558
|
try {
|
|
3558
3559
|
await S({
|
|
3559
3560
|
action_type: "ir.search",
|
|
3560
|
-
action_id:
|
|
3561
|
+
action_id: _,
|
|
3561
3562
|
context: i
|
|
3562
3563
|
});
|
|
3563
3564
|
} catch (W) {
|
|
@@ -3566,8 +3567,8 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3566
3567
|
},
|
|
3567
3568
|
[i, S, D]
|
|
3568
3569
|
), R = O(
|
|
3569
|
-
(
|
|
3570
|
-
const M =
|
|
3570
|
+
(_) => {
|
|
3571
|
+
const M = _.originalData || _;
|
|
3571
3572
|
if (M != null && M.domain) {
|
|
3572
3573
|
x == null || x(M), v == null || v(M.domain);
|
|
3573
3574
|
const W = Ha(
|
|
@@ -3587,17 +3588,17 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3587
3588
|
F,
|
|
3588
3589
|
x
|
|
3589
3590
|
]
|
|
3590
|
-
),
|
|
3591
|
-
var
|
|
3592
|
-
(
|
|
3591
|
+
), E = O(async () => {
|
|
3592
|
+
var _;
|
|
3593
|
+
(_ = u == null ? void 0 : u.current) == null || _.close(), m == null || m({
|
|
3593
3594
|
model: "ir.search",
|
|
3594
3595
|
context: {
|
|
3595
3596
|
model: h
|
|
3596
3597
|
}
|
|
3597
3598
|
});
|
|
3598
3599
|
}, [h, m]), I = O(() => {
|
|
3599
|
-
var
|
|
3600
|
-
(
|
|
3600
|
+
var _;
|
|
3601
|
+
(_ = u == null ? void 0 : u.current) == null || _.close(), c == null || c();
|
|
3601
3602
|
}, [c]);
|
|
3602
3603
|
return /* @__PURE__ */ s(
|
|
3603
3604
|
Un,
|
|
@@ -3660,7 +3661,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3660
3661
|
ns,
|
|
3661
3662
|
{
|
|
3662
3663
|
style: { color: f.colorPrimary, cursor: "pointer" },
|
|
3663
|
-
onClick:
|
|
3664
|
+
onClick: E
|
|
3664
3665
|
}
|
|
3665
3666
|
) }) })
|
|
3666
3667
|
] })
|
|
@@ -3695,14 +3696,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3695
3696
|
);
|
|
3696
3697
|
async function C(R) {
|
|
3697
3698
|
var z;
|
|
3698
|
-
const { reportData:
|
|
3699
|
-
context:
|
|
3699
|
+
const { reportData: E, fields: I, values: A, context: k = {} } = R, {
|
|
3700
|
+
context: _,
|
|
3700
3701
|
model: M,
|
|
3701
3702
|
datas: W = {},
|
|
3702
3703
|
report_name: V,
|
|
3703
3704
|
type: N,
|
|
3704
3705
|
id: U
|
|
3705
|
-
} =
|
|
3706
|
+
} = E;
|
|
3706
3707
|
if (N !== "ir.actions.report.xml") {
|
|
3707
3708
|
p({
|
|
3708
3709
|
type: "error",
|
|
@@ -3711,11 +3712,11 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3711
3712
|
});
|
|
3712
3713
|
return;
|
|
3713
3714
|
}
|
|
3714
|
-
const { ids: j } = W || {}, ee = j || [], B = typeof
|
|
3715
|
-
context:
|
|
3715
|
+
const { ids: j } = W || {}, ee = j || [], B = typeof _ == "string" ? ln({
|
|
3716
|
+
context: _,
|
|
3716
3717
|
fields: I,
|
|
3717
3718
|
values: A
|
|
3718
|
-
}) :
|
|
3719
|
+
}) : _;
|
|
3719
3720
|
try {
|
|
3720
3721
|
if (m != null && m.isEnabled && (((z = m == null ? void 0 : m.params) == null ? void 0 : z.types) || []).includes(N))
|
|
3721
3722
|
try {
|
|
@@ -3742,14 +3743,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3742
3743
|
}
|
|
3743
3744
|
}
|
|
3744
3745
|
async function x(R) {
|
|
3745
|
-
let
|
|
3746
|
+
let E;
|
|
3746
3747
|
try {
|
|
3747
|
-
if (
|
|
3748
|
+
if (E = await H.getHandler().getReport({
|
|
3748
3749
|
id: R
|
|
3749
|
-
}),
|
|
3750
|
+
}), E.state && i.current === !0) {
|
|
3750
3751
|
i.current = !1, clearInterval(o.current), l(!1);
|
|
3751
|
-
const I = await Nn(
|
|
3752
|
-
Qr(
|
|
3752
|
+
const I = await Nn(E.result);
|
|
3753
|
+
Qr(E.result, I.mime);
|
|
3753
3754
|
}
|
|
3754
3755
|
} catch (I) {
|
|
3755
3756
|
i.current = !1, clearInterval(o.current), l(!1), p(I.exception || I);
|
|
@@ -3757,22 +3758,22 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3757
3758
|
}
|
|
3758
3759
|
async function D({
|
|
3759
3760
|
actionData: R,
|
|
3760
|
-
fields:
|
|
3761
|
+
fields: E,
|
|
3761
3762
|
values: I,
|
|
3762
3763
|
context: A,
|
|
3763
3764
|
onRefreshParentValues: k
|
|
3764
3765
|
}) {
|
|
3765
|
-
const { type:
|
|
3766
|
-
if (k && f.current.push(k),
|
|
3766
|
+
const { type: _ } = R;
|
|
3767
|
+
if (k && f.current.push(k), _ === "ir.actions.report.xml")
|
|
3767
3768
|
return await C({
|
|
3768
3769
|
reportData: R,
|
|
3769
|
-
fields:
|
|
3770
|
+
fields: E,
|
|
3770
3771
|
values: I,
|
|
3771
3772
|
context: A
|
|
3772
3773
|
});
|
|
3773
|
-
if (
|
|
3774
|
-
return await S({ actionData: R, fields:
|
|
3775
|
-
if (
|
|
3774
|
+
if (_ === "ir.actions.act_window")
|
|
3775
|
+
return await S({ actionData: R, fields: E, values: I, context: A });
|
|
3776
|
+
if (_ === "ir.actions.act_url")
|
|
3776
3777
|
window.open(
|
|
3777
3778
|
Gu(R.url, { ...I, context: A }),
|
|
3778
3779
|
"_blank"
|
|
@@ -3781,12 +3782,12 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3781
3782
|
return p({
|
|
3782
3783
|
type: "error",
|
|
3783
3784
|
title: "Error",
|
|
3784
|
-
body: `${
|
|
3785
|
+
body: `${_} action not supported`
|
|
3785
3786
|
}), {};
|
|
3786
3787
|
}
|
|
3787
3788
|
async function S({
|
|
3788
3789
|
actionData: R,
|
|
3789
|
-
fields:
|
|
3790
|
+
fields: E = {},
|
|
3790
3791
|
values: I = {},
|
|
3791
3792
|
context: A = {}
|
|
3792
3793
|
}) {
|
|
@@ -3797,9 +3798,9 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3797
3798
|
ids: [parseInt(R.id)],
|
|
3798
3799
|
context: A
|
|
3799
3800
|
}))[0]);
|
|
3800
|
-
const
|
|
3801
|
+
const _ = k.context, M = typeof (k == null ? void 0 : k.context) == "string" ? ln({
|
|
3801
3802
|
context: k.context,
|
|
3802
|
-
fields:
|
|
3803
|
+
fields: E,
|
|
3803
3804
|
values: { ...I, ...r }
|
|
3804
3805
|
}) : (k == null ? void 0 : k.context) || {}, W = {
|
|
3805
3806
|
...A,
|
|
@@ -3810,10 +3811,10 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3810
3811
|
if (k.domain && (V = await H.getHandler().evalDomain({
|
|
3811
3812
|
domain: k.domain,
|
|
3812
3813
|
values: Cn({
|
|
3813
|
-
fields:
|
|
3814
|
+
fields: E,
|
|
3814
3815
|
values: { ...I, ...r }
|
|
3815
3816
|
}),
|
|
3816
|
-
fields:
|
|
3817
|
+
fields: E,
|
|
3817
3818
|
context: W
|
|
3818
3819
|
})), k.target === "new") {
|
|
3819
3820
|
const j = await H.getHandler().getView({
|
|
@@ -3848,9 +3849,9 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3848
3849
|
action_type: k.type,
|
|
3849
3850
|
res_id: k.res_id,
|
|
3850
3851
|
actionRawData: {
|
|
3851
|
-
context:
|
|
3852
|
+
context: _,
|
|
3852
3853
|
domain: N,
|
|
3853
|
-
fields:
|
|
3854
|
+
fields: E,
|
|
3854
3855
|
values: I
|
|
3855
3856
|
}
|
|
3856
3857
|
}), { closeParent: !0 };
|
|
@@ -3858,28 +3859,28 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3858
3859
|
}
|
|
3859
3860
|
function P({
|
|
3860
3861
|
domain: R,
|
|
3861
|
-
model:
|
|
3862
|
+
model: E,
|
|
3862
3863
|
formView: I,
|
|
3863
3864
|
context: A,
|
|
3864
3865
|
actionData: k
|
|
3865
3866
|
}) {
|
|
3866
3867
|
var W;
|
|
3867
|
-
const { type:
|
|
3868
|
-
if (m != null && m.isEnabled && (((W = m == null ? void 0 : m.params) == null ? void 0 : W.types) || []).includes(
|
|
3868
|
+
const { type: _, id: M } = k || {};
|
|
3869
|
+
if (m != null && m.isEnabled && (((W = m == null ? void 0 : m.params) == null ? void 0 : W.types) || []).includes(_))
|
|
3869
3870
|
try {
|
|
3870
3871
|
g({
|
|
3871
|
-
action_type:
|
|
3872
|
+
action_type: _,
|
|
3872
3873
|
action_id: M,
|
|
3873
3874
|
context: A
|
|
3874
3875
|
});
|
|
3875
3876
|
} catch (V) {
|
|
3876
3877
|
console.error(V);
|
|
3877
3878
|
}
|
|
3878
|
-
v ? F({ domain: R, model:
|
|
3879
|
+
v ? F({ domain: R, model: E, formView: I, context: A, actionData: k }) : (w({ domain: R, model: E, context: A, formView: I, actionData: k }), y(!0));
|
|
3879
3880
|
}
|
|
3880
3881
|
async function F({
|
|
3881
3882
|
domain: R,
|
|
3882
|
-
model:
|
|
3883
|
+
model: E,
|
|
3883
3884
|
formView: I,
|
|
3884
3885
|
context: A,
|
|
3885
3886
|
actionData: k
|
|
@@ -3890,7 +3891,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3890
3891
|
context: {},
|
|
3891
3892
|
formView: void 0,
|
|
3892
3893
|
actionData: void 0
|
|
3893
|
-
}), y(!1), await new Promise((
|
|
3894
|
+
}), y(!1), await new Promise((_) => setTimeout(_, 300)), w({ domain: R, model: E, context: A, formView: I, actionData: k }), y(!0);
|
|
3894
3895
|
}
|
|
3895
3896
|
async function $() {
|
|
3896
3897
|
Zs(f.current), f.current = [], y(!1), w({
|
|
@@ -4248,11 +4249,11 @@ function Gf({
|
|
|
4248
4249
|
previousView: F,
|
|
4249
4250
|
results: $,
|
|
4250
4251
|
limit: R,
|
|
4251
|
-
totalItems:
|
|
4252
|
+
totalItems: E,
|
|
4252
4253
|
isActive: I,
|
|
4253
4254
|
treeType: A,
|
|
4254
4255
|
setSearchParams: k,
|
|
4255
|
-
setSearchValues:
|
|
4256
|
+
setSearchValues: _,
|
|
4256
4257
|
permissions: M
|
|
4257
4258
|
} = pe(It), W = Lt(
|
|
4258
4259
|
wt.FEATURE_ADVANCED_EXPORT
|
|
@@ -4327,7 +4328,7 @@ function Gf({
|
|
|
4327
4328
|
[l, P, c]
|
|
4328
4329
|
), Y = O(
|
|
4329
4330
|
(ne) => {
|
|
4330
|
-
ne !== D && (ne && ne.trim().length > 0 && !D && (k == null || k([]),
|
|
4331
|
+
ne !== D && (ne && ne.trim().length > 0 && !D && (k == null || k([]), _ == null || _({})), x == null || x(ne), D !== void 0 && setTimeout(() => {
|
|
4331
4332
|
var ie;
|
|
4332
4333
|
(ie = h == null ? void 0 : h.current) == null || ie.refreshResults();
|
|
4333
4334
|
}, 50));
|
|
@@ -4336,7 +4337,7 @@ function Gf({
|
|
|
4336
4337
|
D,
|
|
4337
4338
|
x,
|
|
4338
4339
|
k,
|
|
4339
|
-
|
|
4340
|
+
_,
|
|
4340
4341
|
h
|
|
4341
4342
|
]
|
|
4342
4343
|
), ge = O(
|
|
@@ -4536,7 +4537,7 @@ function Gf({
|
|
|
4536
4537
|
model: g,
|
|
4537
4538
|
domain: se,
|
|
4538
4539
|
limit: R,
|
|
4539
|
-
totalRegisters:
|
|
4540
|
+
totalRegisters: E || 0,
|
|
4540
4541
|
selectedRegistersToExport: d,
|
|
4541
4542
|
visibleRegisters: ($ == null ? void 0 : $.length) || 0,
|
|
4542
4543
|
context: t
|
|
@@ -6379,7 +6380,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6379
6380
|
i
|
|
6380
6381
|
]), R = O(() => {
|
|
6381
6382
|
l && (x(!0), S(p || ""), w(!0));
|
|
6382
|
-
}, [l, p]),
|
|
6383
|
+
}, [l, p]), E = ut(async () => {
|
|
6383
6384
|
if (!l || !t || !(n != null && n.length))
|
|
6384
6385
|
return;
|
|
6385
6386
|
const B = (D || p || "Unnamed Search").trim();
|
|
@@ -6496,7 +6497,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6496
6497
|
f,
|
|
6497
6498
|
u,
|
|
6498
6499
|
i
|
|
6499
|
-
]),
|
|
6500
|
+
]), _ = O(
|
|
6500
6501
|
(B) => {
|
|
6501
6502
|
B.key === "Enter" ? (h(!1), k()) : B.key === "Escape" && (m((o == null ? void 0 : o.name) || ""), h(!1));
|
|
6502
6503
|
},
|
|
@@ -6515,7 +6516,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6515
6516
|
{
|
|
6516
6517
|
value: p,
|
|
6517
6518
|
onChange: A,
|
|
6518
|
-
onKeyDown:
|
|
6519
|
+
onKeyDown: _,
|
|
6519
6520
|
onBlur: M,
|
|
6520
6521
|
size: "small",
|
|
6521
6522
|
style: { width: "200px", fontSize: "14px" },
|
|
@@ -6542,7 +6543,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6542
6543
|
v,
|
|
6543
6544
|
g,
|
|
6544
6545
|
A,
|
|
6545
|
-
|
|
6546
|
+
_,
|
|
6546
6547
|
M,
|
|
6547
6548
|
I,
|
|
6548
6549
|
l
|
|
@@ -6575,7 +6576,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6575
6576
|
setModalInputValue: S,
|
|
6576
6577
|
handleSave: $,
|
|
6577
6578
|
handleSaveAsNew: R,
|
|
6578
|
-
handleModalSave:
|
|
6579
|
+
handleModalSave: E,
|
|
6579
6580
|
handleClear: ee,
|
|
6580
6581
|
renderSavedSearchTitle: W,
|
|
6581
6582
|
shouldShowSaveButtons: V,
|
|
@@ -6622,25 +6623,25 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6622
6623
|
}) => {
|
|
6623
6624
|
if (!o)
|
|
6624
6625
|
return;
|
|
6625
|
-
const P = o == null ? void 0 : o.rows, F = P == null ? void 0 : P.flatMap((
|
|
6626
|
+
const P = o == null ? void 0 : o.rows, F = P == null ? void 0 : P.flatMap((E) => E), $ = Object.keys(c).reduce((E, I) => {
|
|
6626
6627
|
const A = I.replace(/#.*$/, "");
|
|
6627
|
-
return
|
|
6628
|
-
}, {}), R = D ? F.reduce((
|
|
6629
|
-
return F.filter((
|
|
6630
|
-
const A =
|
|
6628
|
+
return E[A] === void 0 && (E[A] = c[I] !== void 0), E;
|
|
6629
|
+
}, {}), R = D ? F.reduce((E, I) => (E[I.id] = $[I.id], E), {}) : $;
|
|
6630
|
+
return F.filter((E) => D ? R[E.id] === !0 : !0).sort((E, I) => {
|
|
6631
|
+
const A = E, k = I;
|
|
6631
6632
|
if (D) {
|
|
6632
|
-
const
|
|
6633
|
-
return
|
|
6633
|
+
const _ = v.indexOf(A.id), M = v.indexOf(k.id);
|
|
6634
|
+
return _ - M;
|
|
6634
6635
|
}
|
|
6635
6636
|
return Nr(A.label).localeCompare(
|
|
6636
6637
|
Nr(k.label)
|
|
6637
6638
|
);
|
|
6638
|
-
}).map((
|
|
6639
|
-
const I =
|
|
6639
|
+
}).map((E) => {
|
|
6640
|
+
const I = E, A = R[I.id] === !0, k = D ? !1 : x && !qh(x, I), _ = S ? `${I.id}-top` : `${I.id}-bottom`;
|
|
6640
6641
|
return /* @__PURE__ */ s(
|
|
6641
6642
|
"div",
|
|
6642
6643
|
{
|
|
6643
|
-
id: `field-container-${
|
|
6644
|
+
id: `field-container-${_}`,
|
|
6644
6645
|
style: {
|
|
6645
6646
|
display: k ? "none" : "block",
|
|
6646
6647
|
paddingTop: 5,
|
|
@@ -6656,9 +6657,9 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6656
6657
|
alignItems: "flex-end",
|
|
6657
6658
|
gap: "8px"
|
|
6658
6659
|
},
|
|
6659
|
-
"data-field-id":
|
|
6660
|
+
"data-field-id": _,
|
|
6660
6661
|
children: [
|
|
6661
|
-
/* @__PURE__ */ s("div", { style: { flex: 1 }, children: /* @__PURE__ */ s(Qa, { field: I }, `sf-${
|
|
6662
|
+
/* @__PURE__ */ s("div", { style: { flex: 1 }, children: /* @__PURE__ */ s(Qa, { field: I }, `sf-${_}`) }),
|
|
6662
6663
|
A && /* @__PURE__ */ s(
|
|
6663
6664
|
je,
|
|
6664
6665
|
{
|
|
@@ -6677,7 +6678,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6677
6678
|
}
|
|
6678
6679
|
) })
|
|
6679
6680
|
},
|
|
6680
|
-
|
|
6681
|
+
_
|
|
6681
6682
|
);
|
|
6682
6683
|
});
|
|
6683
6684
|
}, w = ut(() => {
|
|
@@ -6689,20 +6690,20 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6689
6690
|
(R) => D[R] !== void 0
|
|
6690
6691
|
);
|
|
6691
6692
|
if (F.length > P.length) {
|
|
6692
|
-
const R = F.find((
|
|
6693
|
+
const R = F.find((E) => !P.includes(E));
|
|
6693
6694
|
if (R) {
|
|
6694
|
-
const
|
|
6695
|
-
y((I) => I.includes(
|
|
6695
|
+
const E = R.replace(/#.*$/, "");
|
|
6696
|
+
y((I) => I.includes(E) ? I : [...I, E]), h.current && setTimeout(() => {
|
|
6696
6697
|
h.current && (h.current.scrollTop = h.current.scrollHeight);
|
|
6697
6698
|
}, 150);
|
|
6698
6699
|
}
|
|
6699
6700
|
}
|
|
6700
6701
|
const $ = P.filter((R) => !F.includes(R));
|
|
6701
6702
|
$.length > 0 && y((R) => {
|
|
6702
|
-
const
|
|
6703
|
+
const E = $.map(
|
|
6703
6704
|
(I) => I.replace(/#.*$/, "")
|
|
6704
6705
|
);
|
|
6705
|
-
return R.filter((I) => !
|
|
6706
|
+
return R.filter((I) => !E.includes(I));
|
|
6706
6707
|
});
|
|
6707
6708
|
}, [l, i, c]), C = O(
|
|
6708
6709
|
(x) => {
|
|
@@ -6855,11 +6856,11 @@ const El = (t) => {
|
|
|
6855
6856
|
savedSearchName: F,
|
|
6856
6857
|
hasChanges: $,
|
|
6857
6858
|
showSaveModal: R,
|
|
6858
|
-
isModalSaveAsNew:
|
|
6859
|
+
isModalSaveAsNew: E,
|
|
6859
6860
|
modalInputValue: I,
|
|
6860
6861
|
setShowSaveModal: A,
|
|
6861
6862
|
setModalInputValue: k,
|
|
6862
|
-
handleSave:
|
|
6863
|
+
handleSave: _,
|
|
6863
6864
|
handleSaveAsNew: M,
|
|
6864
6865
|
handleModalSave: W,
|
|
6865
6866
|
handleClear: V,
|
|
@@ -6967,7 +6968,7 @@ const El = (t) => {
|
|
|
6967
6968
|
{
|
|
6968
6969
|
size: "small",
|
|
6969
6970
|
icon: /* @__PURE__ */ s(ko, {}),
|
|
6970
|
-
onClick:
|
|
6971
|
+
onClick: _,
|
|
6971
6972
|
style: { height: "24px" },
|
|
6972
6973
|
children: u("saveSearchFilter")
|
|
6973
6974
|
}
|
|
@@ -7003,7 +7004,7 @@ const El = (t) => {
|
|
|
7003
7004
|
{
|
|
7004
7005
|
size: "small",
|
|
7005
7006
|
icon: B ? /* @__PURE__ */ s(Po, {}) : /* @__PURE__ */ s(ko, {}),
|
|
7006
|
-
onClick: B ? M :
|
|
7007
|
+
onClick: B ? M : _,
|
|
7007
7008
|
style: { height: "24px" },
|
|
7008
7009
|
children: u(B ? "saveAsNewSearchFilter" : "saveSearchFilter")
|
|
7009
7010
|
}
|
|
@@ -7014,7 +7015,7 @@ const El = (t) => {
|
|
|
7014
7015
|
B,
|
|
7015
7016
|
$,
|
|
7016
7017
|
u,
|
|
7017
|
-
|
|
7018
|
+
_,
|
|
7018
7019
|
M
|
|
7019
7020
|
]);
|
|
7020
7021
|
return /* @__PURE__ */ L(he, { children: [
|
|
@@ -7050,7 +7051,7 @@ const El = (t) => {
|
|
|
7050
7051
|
/* @__PURE__ */ s(
|
|
7051
7052
|
Ft,
|
|
7052
7053
|
{
|
|
7053
|
-
title: u(
|
|
7054
|
+
title: u(E ? "saveAsNewSearchFilter" : "saveSearchFilter"),
|
|
7054
7055
|
open: R,
|
|
7055
7056
|
onOk: W,
|
|
7056
7057
|
okButtonProps: {
|
|
@@ -7225,40 +7226,40 @@ function oo(t) {
|
|
|
7225
7226
|
const S = () => {
|
|
7226
7227
|
if (!v)
|
|
7227
7228
|
return;
|
|
7228
|
-
const R = b ? v : g,
|
|
7229
|
-
return
|
|
7229
|
+
const R = b ? v : g, E = R == null ? void 0 : R.rows;
|
|
7230
|
+
return E == null ? void 0 : E.map((I, A) => /* @__PURE__ */ s(Ge, { children: I.map((k, _) => /* @__PURE__ */ s(Oe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Qa, { field: k }) }, _)) }, A));
|
|
7230
7231
|
};
|
|
7231
7232
|
Ue(() => {
|
|
7232
7233
|
w(!1), C.current = new Zi(n, e), C.current.parse(), h(C.current._simpleSearchContainer), y(C.current._advancedSearchContainer);
|
|
7233
7234
|
}, [e, n]);
|
|
7234
7235
|
const P = S(), F = (R) => {
|
|
7235
7236
|
var k;
|
|
7236
|
-
const { limit:
|
|
7237
|
+
const { limit: E, offset: I } = R;
|
|
7237
7238
|
delete R.offset, delete R.limit;
|
|
7238
7239
|
const A = er(
|
|
7239
7240
|
R,
|
|
7240
7241
|
(k = C.current) == null ? void 0 : k._advancedSearchContainer
|
|
7241
7242
|
);
|
|
7242
|
-
o({ params: A, offset: I, limit:
|
|
7243
|
+
o({ params: A, offset: I, limit: E, searchValues: R });
|
|
7243
7244
|
}, $ = O(() => {
|
|
7244
7245
|
if (!g || !v)
|
|
7245
7246
|
return !1;
|
|
7246
7247
|
const R = g.rows.reduce(
|
|
7247
7248
|
(I, A) => I + A.length,
|
|
7248
7249
|
0
|
|
7249
|
-
),
|
|
7250
|
+
), E = v.rows.reduce(
|
|
7250
7251
|
(I, A) => I + A.length,
|
|
7251
7252
|
0
|
|
7252
7253
|
);
|
|
7253
|
-
return R ===
|
|
7254
|
+
return R === E;
|
|
7254
7255
|
}, [g, v]);
|
|
7255
7256
|
return /* @__PURE__ */ s(
|
|
7256
7257
|
os,
|
|
7257
7258
|
{
|
|
7258
7259
|
bounds: !0,
|
|
7259
7260
|
onResize: (R) => {
|
|
7260
|
-
var
|
|
7261
|
-
f == null || f((
|
|
7261
|
+
var E;
|
|
7262
|
+
f == null || f((E = R.bounds) == null ? void 0 : E.height);
|
|
7262
7263
|
},
|
|
7263
7264
|
children: ({ measureRef: R }) => /* @__PURE__ */ s("div", { ref: R, children: /* @__PURE__ */ L("div", { style: { display: d ? "block" : "none" }, children: [
|
|
7264
7265
|
/* @__PURE__ */ L(
|
|
@@ -7306,7 +7307,7 @@ function oo(t) {
|
|
|
7306
7307
|
function Ol({
|
|
7307
7308
|
useLocalState: t = !1
|
|
7308
7309
|
}) {
|
|
7309
|
-
const e = Yg() && !t, n = jt(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, f] = T(0), [u, p] = T(void 0), [m, g] = T([]), [h, v] = T({}), [y, b] = T(), [w, C] = T([]), [x, D] = T(), [S, P] = T(0), [F, $] = T(), [R,
|
|
7310
|
+
const e = Yg() && !t, n = jt(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, f] = T(0), [u, p] = T(void 0), [m, g] = T([]), [h, v] = T({}), [y, b] = T(), [w, C] = T([]), [x, D] = T(), [S, P] = T(0), [F, $] = T(), [R, E] = T(1), [I, A] = T(Bn), [k, _] = T(Ct);
|
|
7310
7311
|
return e ? {
|
|
7311
7312
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
7312
7313
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -7381,11 +7382,11 @@ function Ol({
|
|
|
7381
7382
|
order: F,
|
|
7382
7383
|
setOrder: $,
|
|
7383
7384
|
currentPage: R,
|
|
7384
|
-
setCurrentPage:
|
|
7385
|
+
setCurrentPage: E,
|
|
7385
7386
|
treeType: I,
|
|
7386
7387
|
setTreeType: A,
|
|
7387
7388
|
limit: k,
|
|
7388
|
-
setLimit:
|
|
7389
|
+
setLimit: _
|
|
7389
7390
|
};
|
|
7390
7391
|
}
|
|
7391
7392
|
const Fs = () => {
|
|
@@ -7455,8 +7456,8 @@ const dr = ({
|
|
|
7455
7456
|
), [b, w] = Re(
|
|
7456
7457
|
H.getHandler().parseConditions
|
|
7457
7458
|
), C = Fs(), x = Z({}), D = O(
|
|
7458
|
-
(
|
|
7459
|
-
(A) => JSON.stringify(
|
|
7459
|
+
(E, I) => I ? o == null ? void 0 : o.some(
|
|
7460
|
+
(A) => JSON.stringify(E[A]) !== JSON.stringify(I[A])
|
|
7460
7461
|
) : !0,
|
|
7461
7462
|
[o]
|
|
7462
7463
|
);
|
|
@@ -7467,22 +7468,22 @@ const dr = ({
|
|
|
7467
7468
|
var A, k;
|
|
7468
7469
|
if (!c)
|
|
7469
7470
|
return !1;
|
|
7470
|
-
const
|
|
7471
|
-
return
|
|
7471
|
+
const E = ((A = c.fields_in_conditions) == null ? void 0 : A.colors) || [], I = ((k = c.fields_in_conditions) == null ? void 0 : k.status) || [];
|
|
7472
|
+
return E.some((_) => o == null ? void 0 : o.includes(_)) || I.some((_) => o == null ? void 0 : o.includes(_));
|
|
7472
7473
|
}, [c, o]), P = O(async () => {
|
|
7473
7474
|
var I, A;
|
|
7474
7475
|
if (!(o != null && o.length) || !g)
|
|
7475
7476
|
return;
|
|
7476
|
-
const
|
|
7477
|
-
if (!(!
|
|
7477
|
+
const E = (I = e.current) == null ? void 0 : I.getVisibleRowIds().filter((k) => k != null);
|
|
7478
|
+
if (!(!E || E.length === 0) && a)
|
|
7478
7479
|
try {
|
|
7479
7480
|
const k = await v({
|
|
7480
7481
|
model: n,
|
|
7481
|
-
ids:
|
|
7482
|
+
ids: E,
|
|
7482
7483
|
fields: u,
|
|
7483
7484
|
fieldsToRetrieve: o,
|
|
7484
7485
|
context: r
|
|
7485
|
-
}),
|
|
7486
|
+
}), _ = cn(a, k), M = _.filter((W) => {
|
|
7486
7487
|
const V = x.current[W.id];
|
|
7487
7488
|
return D(W, V);
|
|
7488
7489
|
});
|
|
@@ -7505,7 +7506,7 @@ const dr = ({
|
|
|
7505
7506
|
N.name !== "AbortError" && console.error("Error parsing conditions:", N);
|
|
7506
7507
|
}
|
|
7507
7508
|
}
|
|
7508
|
-
(A = e.current) == null || A.updateRows(
|
|
7509
|
+
(A = e.current) == null || A.updateRows(_), f == null || f(M);
|
|
7509
7510
|
} catch (k) {
|
|
7510
7511
|
console.error(k);
|
|
7511
7512
|
}
|
|
@@ -7595,7 +7596,7 @@ const dr = ({
|
|
|
7595
7596
|
return !1;
|
|
7596
7597
|
const N = ((j = e.fields_in_conditions) == null ? void 0 : j.colors) || [], U = ((ee = e.fields_in_conditions) == null ? void 0 : ee.status) || [];
|
|
7597
7598
|
return N.some((B) => p.current.includes(B)) || U.some((B) => p.current.includes(B));
|
|
7598
|
-
}, [e]),
|
|
7599
|
+
}, [e]), E = O(async () => {
|
|
7599
7600
|
if (!f || h.size === 0 || !o || !p.current.length || !a)
|
|
7600
7601
|
return;
|
|
7601
7602
|
const N = Array.from(h).filter(
|
|
@@ -7625,18 +7626,18 @@ const dr = ({
|
|
|
7625
7626
|
D
|
|
7626
7627
|
]);
|
|
7627
7628
|
Ue(() => {
|
|
7628
|
-
h.size !== 0 &&
|
|
7629
|
-
}, [h,
|
|
7629
|
+
h.size !== 0 && E();
|
|
7630
|
+
}, [h, E]);
|
|
7630
7631
|
const I = O(
|
|
7631
7632
|
(N) => {
|
|
7632
7633
|
!N || N.length === 0 || (v((U) => {
|
|
7633
7634
|
const j = new Set(U);
|
|
7634
7635
|
return N.forEach((ee) => j.add(ee)), j;
|
|
7635
7636
|
}), f && o && a && setTimeout(() => {
|
|
7636
|
-
|
|
7637
|
+
E();
|
|
7637
7638
|
}, 100));
|
|
7638
7639
|
},
|
|
7639
|
-
[f, o, a,
|
|
7640
|
+
[f, o, a, E]
|
|
7640
7641
|
), A = O(
|
|
7641
7642
|
async (N) => {
|
|
7642
7643
|
var ee;
|
|
@@ -7682,7 +7683,7 @@ const dr = ({
|
|
|
7682
7683
|
) : !1;
|
|
7683
7684
|
}).filter(Boolean);
|
|
7684
7685
|
U.length > 0 && (U.forEach((B) => y.current.delete(B.id)), A(U), (ee = n == null ? void 0 : n.current) == null || ee.updateRows(U));
|
|
7685
|
-
}, [n, A]),
|
|
7686
|
+
}, [n, A]), _ = O((N, U) => p.current.includes(U) ? !b.current.find((j) => j.id === (N == null ? void 0 : N.id)) : !1, []);
|
|
7686
7687
|
Ue(() => (f && C && (k(), w.current = setInterval(
|
|
7687
7688
|
k,
|
|
7688
7689
|
Jh
|
|
@@ -7719,7 +7720,7 @@ const dr = ({
|
|
|
7719
7720
|
v(/* @__PURE__ */ new Set()), b.current = [], y.current.clear();
|
|
7720
7721
|
},
|
|
7721
7722
|
addRecordsToCheckFunctionFields: I,
|
|
7722
|
-
isFieldLoading:
|
|
7723
|
+
isFieldLoading: _,
|
|
7723
7724
|
hasFunctionFields: f,
|
|
7724
7725
|
pause: M,
|
|
7725
7726
|
resume: W,
|
|
@@ -8001,20 +8002,20 @@ const eg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Nl,
|
|
|
8001
8002
|
});
|
|
8002
8003
|
i(A), F = A.fields, $ = A.toolbar;
|
|
8003
8004
|
}
|
|
8004
|
-
const
|
|
8005
|
+
const E = sg({ fields: F, toolbar: $ });
|
|
8005
8006
|
let I = {};
|
|
8006
|
-
return
|
|
8007
|
+
return E.length > 0 && (I = { ...(R = await w({
|
|
8007
8008
|
model: n,
|
|
8008
8009
|
ids: [e],
|
|
8009
|
-
fieldsToRetrieve:
|
|
8010
|
+
fieldsToRetrieve: E,
|
|
8010
8011
|
context: r
|
|
8011
8012
|
})) == null ? void 0 : R[0] }), I = { ..._n(I, F), active_id: e }, l(I), $ ? {
|
|
8012
8013
|
actionItems: $.action,
|
|
8013
8014
|
relateItems: $.relate,
|
|
8014
8015
|
printItems: $.print
|
|
8015
8016
|
} : void 0;
|
|
8016
|
-
} catch (
|
|
8017
|
-
console.error("Error in Many2oneSuffix fetchData:",
|
|
8017
|
+
} catch (E) {
|
|
8018
|
+
console.error("Error in Many2oneSuffix fetchData:", E);
|
|
8018
8019
|
return;
|
|
8019
8020
|
}
|
|
8020
8021
|
}, [
|
|
@@ -8580,7 +8581,7 @@ function Og(t, e) {
|
|
|
8580
8581
|
offset: _g
|
|
8581
8582
|
}), [$, R] = Re(
|
|
8582
8583
|
H.getHandler().searchCount
|
|
8583
|
-
), [
|
|
8584
|
+
), [E, I] = Re(
|
|
8584
8585
|
H.getHandler().searchForTree
|
|
8585
8586
|
), [A, k] = Re(
|
|
8586
8587
|
H.getHandler().searchAllIds
|
|
@@ -8588,7 +8589,7 @@ function Og(t, e) {
|
|
|
8588
8589
|
ce(() => () => {
|
|
8589
8590
|
R(), I(), k();
|
|
8590
8591
|
}, []);
|
|
8591
|
-
const { treeView:
|
|
8592
|
+
const { treeView: _, formView: M, loading: W } = ms({
|
|
8592
8593
|
model: n,
|
|
8593
8594
|
formViewProps: r,
|
|
8594
8595
|
treeViewProps: o,
|
|
@@ -8620,9 +8621,9 @@ function Og(t, e) {
|
|
|
8620
8621
|
ne !== void 0 && ie.current === void 0 || typeof ne == "string" && typeof ie.current == "string" && ne !== ie.current ? (Te.current = !!ne, K == null || K([]), q == null || q({}), (fe = g.current) == null || fe.unselectAll()) : ne === void 0 && ie.current !== void 0 && (Te.current = !1, (_e = g.current) == null || _e.unselectAll()), ie.current = ne;
|
|
8621
8622
|
}, [ne]);
|
|
8622
8623
|
const me = re(() => {
|
|
8623
|
-
if (
|
|
8624
|
-
return en(
|
|
8625
|
-
}, [
|
|
8624
|
+
if (_)
|
|
8625
|
+
return en(_);
|
|
8626
|
+
}, [_]), {
|
|
8626
8627
|
colorsForResults: qe,
|
|
8627
8628
|
statusForResults: st,
|
|
8628
8629
|
updateAttributes: Ze,
|
|
@@ -8637,7 +8638,7 @@ function Og(t, e) {
|
|
|
8637
8638
|
syncExternalRecordUpdates: ze
|
|
8638
8639
|
} = Pl({
|
|
8639
8640
|
model: n,
|
|
8640
|
-
treeView:
|
|
8641
|
+
treeView: _,
|
|
8641
8642
|
tableRef: g,
|
|
8642
8643
|
context: d,
|
|
8643
8644
|
isActive: ge,
|
|
@@ -8648,7 +8649,7 @@ function Og(t, e) {
|
|
|
8648
8649
|
model: n,
|
|
8649
8650
|
tableRef: g,
|
|
8650
8651
|
autorefreshableFields: me == null ? void 0 : me.autorefreshableFields,
|
|
8651
|
-
treeView:
|
|
8652
|
+
treeView: _,
|
|
8652
8653
|
context: d,
|
|
8653
8654
|
isActive: ge,
|
|
8654
8655
|
treeOoui: me,
|
|
@@ -8672,10 +8673,10 @@ function Og(t, e) {
|
|
|
8672
8673
|
}, [Ne, Se]), Ce = re(() => {
|
|
8673
8674
|
if (!W)
|
|
8674
8675
|
return Ja({
|
|
8675
|
-
treeViewId:
|
|
8676
|
+
treeViewId: _ == null ? void 0 : _.view_id,
|
|
8676
8677
|
model: n
|
|
8677
8678
|
});
|
|
8678
|
-
}, [n,
|
|
8679
|
+
}, [n, _ == null ? void 0 : _.view_id, W]), {
|
|
8679
8680
|
loading: ue,
|
|
8680
8681
|
getColumnState: De,
|
|
8681
8682
|
updateColumnState: Ve
|
|
@@ -8736,15 +8737,15 @@ function Og(t, e) {
|
|
|
8736
8737
|
ve == null || ve(ae), Je = Or(ye);
|
|
8737
8738
|
}
|
|
8738
8739
|
v.current = !0;
|
|
8739
|
-
const Yt = ne ? a : Ae, _t = (
|
|
8740
|
+
const Yt = ne ? a : Ae, _t = (_ == null ? void 0 : _.fields_in_conditions) !== void 0, Zn = dr({
|
|
8740
8741
|
treeOoui: me,
|
|
8741
8742
|
hasFunctionFieldsToParseConditions: _t && Ye()
|
|
8742
|
-
}), { results: Mt, attrsEvaluated: io } = await
|
|
8743
|
+
}), { results: Mt, attrsEvaluated: io } = await E({
|
|
8743
8744
|
params: Yt,
|
|
8744
8745
|
limit: _e - fe,
|
|
8745
8746
|
offset: fe,
|
|
8746
8747
|
model: n,
|
|
8747
|
-
fields:
|
|
8748
|
+
fields: _.field_parent ? { ..._.fields, [_.field_parent]: {} } : _.fields,
|
|
8748
8749
|
context: d,
|
|
8749
8750
|
attrs: Zn,
|
|
8750
8751
|
order: Je,
|
|
@@ -8785,12 +8786,12 @@ function Og(t, e) {
|
|
|
8785
8786
|
te,
|
|
8786
8787
|
Y,
|
|
8787
8788
|
me,
|
|
8788
|
-
|
|
8789
|
+
_,
|
|
8789
8790
|
He,
|
|
8790
8791
|
Ye,
|
|
8791
8792
|
D,
|
|
8792
8793
|
Ze,
|
|
8793
|
-
|
|
8794
|
+
E
|
|
8794
8795
|
]
|
|
8795
8796
|
), Ie = O(
|
|
8796
8797
|
(fe) => {
|
|
@@ -8958,7 +8959,7 @@ function Og(t, e) {
|
|
|
8958
8959
|
]);
|
|
8959
8960
|
Ht(e, () => ({
|
|
8960
8961
|
refreshResults: Qt,
|
|
8961
|
-
getFields: () =>
|
|
8962
|
+
getFields: () => _ == null ? void 0 : _.fields
|
|
8962
8963
|
}));
|
|
8963
8964
|
const pn = re(
|
|
8964
8965
|
() => ({
|
|
@@ -8969,10 +8970,10 @@ function Og(t, e) {
|
|
|
8969
8970
|
[F, l]
|
|
8970
8971
|
), sn = re(
|
|
8971
8972
|
() => ({
|
|
8972
|
-
fields: { ...M == null ? void 0 : M.fields, ...
|
|
8973
|
+
fields: { ...M == null ? void 0 : M.fields, ..._ == null ? void 0 : _.fields },
|
|
8973
8974
|
searchFields: Ln([
|
|
8974
8975
|
M == null ? void 0 : M.search_fields,
|
|
8975
|
-
|
|
8976
|
+
_ == null ? void 0 : _.search_fields
|
|
8976
8977
|
]),
|
|
8977
8978
|
showLimitOptions: !1,
|
|
8978
8979
|
limit: 0,
|
|
@@ -8984,8 +8985,8 @@ function Og(t, e) {
|
|
|
8984
8985
|
[
|
|
8985
8986
|
M == null ? void 0 : M.fields,
|
|
8986
8987
|
M == null ? void 0 : M.search_fields,
|
|
8987
|
-
|
|
8988
|
-
|
|
8988
|
+
_ == null ? void 0 : _.fields,
|
|
8989
|
+
_ == null ? void 0 : _.search_fields,
|
|
8989
8990
|
Q
|
|
8990
8991
|
]
|
|
8991
8992
|
), mn = O(() => {
|
|
@@ -9010,10 +9011,10 @@ function Og(t, e) {
|
|
|
9010
9011
|
), hn = re(
|
|
9011
9012
|
() => ({
|
|
9012
9013
|
isOpen: N,
|
|
9013
|
-
fields: { ...M == null ? void 0 : M.fields, ...
|
|
9014
|
+
fields: { ...M == null ? void 0 : M.fields, ..._ == null ? void 0 : _.fields },
|
|
9014
9015
|
searchFields: Ln([
|
|
9015
9016
|
M == null ? void 0 : M.search_fields,
|
|
9016
|
-
|
|
9017
|
+
_ == null ? void 0 : _.search_fields
|
|
9017
9018
|
]),
|
|
9018
9019
|
searchValues: Q,
|
|
9019
9020
|
currentModel: n,
|
|
@@ -9024,8 +9025,8 @@ function Og(t, e) {
|
|
|
9024
9025
|
N,
|
|
9025
9026
|
M == null ? void 0 : M.fields,
|
|
9026
9027
|
M == null ? void 0 : M.search_fields,
|
|
9027
|
-
|
|
9028
|
-
|
|
9028
|
+
_ == null ? void 0 : _.fields,
|
|
9029
|
+
_ == null ? void 0 : _.search_fields,
|
|
9029
9030
|
Q,
|
|
9030
9031
|
n,
|
|
9031
9032
|
d,
|
|
@@ -9168,21 +9169,21 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9168
9169
|
context: x,
|
|
9169
9170
|
readonly: D,
|
|
9170
9171
|
onSelectAllRecords: S
|
|
9171
|
-
} = t, P = Z(null), [F, $] = T([]), R = Z(!1), [
|
|
9172
|
+
} = t, P = Z(null), [F, $] = T([]), R = Z(!1), [E, I] = T(), { t: A } = we(), k = Z(r), _ = pe(
|
|
9172
9173
|
It
|
|
9173
|
-
), { title: M = void 0, setTitle: W = void 0 } = (C ?
|
|
9174
|
+
), { title: M = void 0, setTitle: W = void 0 } = (C ? _ : {}) || {}, V = Lt(
|
|
9174
9175
|
wt.FEATURE_MANY2ONE_SORT
|
|
9175
9176
|
), N = re(() => {
|
|
9176
|
-
if (
|
|
9177
|
+
if (E)
|
|
9177
9178
|
return ds(
|
|
9178
|
-
|
|
9179
|
+
E,
|
|
9179
9180
|
{
|
|
9180
9181
|
...Is
|
|
9181
9182
|
},
|
|
9182
9183
|
x,
|
|
9183
9184
|
V
|
|
9184
9185
|
);
|
|
9185
|
-
}, [
|
|
9186
|
+
}, [E, x, V]);
|
|
9186
9187
|
Ht(e, () => ({
|
|
9187
9188
|
unselectAll: () => {
|
|
9188
9189
|
var q;
|
|
@@ -9192,10 +9193,10 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9192
9193
|
const q = en(i);
|
|
9193
9194
|
I(q), q.string && M !== q.string && (W == null || W(q.string));
|
|
9194
9195
|
}, [i, M]), ce(() => {
|
|
9195
|
-
if (!
|
|
9196
|
+
if (!E)
|
|
9196
9197
|
return;
|
|
9197
9198
|
R.current = !1;
|
|
9198
|
-
const q = cn(
|
|
9199
|
+
const q = cn(E, a);
|
|
9199
9200
|
$(q);
|
|
9200
9201
|
}, [a]), ce(() => {
|
|
9201
9202
|
k.current = r;
|
|
@@ -9241,9 +9242,9 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9241
9242
|
o,
|
|
9242
9243
|
i.isExpandable
|
|
9243
9244
|
]), z = re(() => {
|
|
9244
|
-
if (!
|
|
9245
|
+
if (!E)
|
|
9245
9246
|
return null;
|
|
9246
|
-
const q =
|
|
9247
|
+
const q = E.columns.filter((G) => G.sum !== void 0).map((G) => ({ label: G.sum, field: G.id }));
|
|
9247
9248
|
if (!q || q.length === 0)
|
|
9248
9249
|
return null;
|
|
9249
9250
|
const oe = [], se = (u == null ? void 0 : u.length) > 0 ? F.filter((G) => u.includes(G.id)) : F;
|
|
@@ -9251,11 +9252,11 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9251
9252
|
const le = se.reduce((te, Y) => Y[G.field] && !isNaN(Y[G.field]) ? te + Y[G.field] : te, 0);
|
|
9252
9253
|
oe.push(`${G.label}: ${Math.round(le * 100) / 100}`);
|
|
9253
9254
|
}), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: oe.join(", ") });
|
|
9254
|
-
}, [F, u,
|
|
9255
|
-
if (
|
|
9255
|
+
}, [F, u, E]), K = re(() => {
|
|
9256
|
+
if (E !== null && N && N.length > 0)
|
|
9256
9257
|
return Dg(N, F, 600);
|
|
9257
|
-
}, [N, F,
|
|
9258
|
-
return
|
|
9258
|
+
}, [N, F, E]), Q = re(() => m && (E != null && E.columns.some((q) => q.sum !== void 0)) ? m - 30 : m, [m, E == null ? void 0 : E.columns]);
|
|
9259
|
+
return E === null || !K || ((de = K == null ? void 0 : K.columns) == null ? void 0 : de.length) === 0 ? /* @__PURE__ */ s(nt, { style: { padding: "2rem" } }) : /* @__PURE__ */ L(Ir, { children: [
|
|
9259
9260
|
B,
|
|
9260
9261
|
/* @__PURE__ */ s(
|
|
9261
9262
|
Sd,
|
|
@@ -9320,7 +9321,7 @@ const Wl = (t) => {
|
|
|
9320
9321
|
searchParams: D = [],
|
|
9321
9322
|
setSearchValues: S,
|
|
9322
9323
|
clearSelection: P
|
|
9323
|
-
} = t, [F, $] = T(!1), [R,
|
|
9324
|
+
} = t, [F, $] = T(!1), [R, E] = T(!1), [I, A] = T(), [k, _] = T(1), [M, W] = T(0), [V, N] = T(), [U, j] = T([]), [ee, B] = T(void 0), [z, K] = T(void 0), Q = Z(C || Ct), de = Z([]), q = O(
|
|
9324
9325
|
(ie) => {
|
|
9325
9326
|
v == null || v([...ie]), j([...ie]);
|
|
9326
9327
|
},
|
|
@@ -9418,7 +9419,7 @@ const Wl = (t) => {
|
|
|
9418
9419
|
} catch (Te) {
|
|
9419
9420
|
A(typeof Te == "string" ? Te : Te.message), $(!1);
|
|
9420
9421
|
} finally {
|
|
9421
|
-
r == null || r([]),
|
|
9422
|
+
r == null || r([]), E(!1), a == null || a(!1);
|
|
9422
9423
|
}
|
|
9423
9424
|
},
|
|
9424
9425
|
[
|
|
@@ -9453,7 +9454,7 @@ const Wl = (t) => {
|
|
|
9453
9454
|
), Y = O(
|
|
9454
9455
|
(ie) => {
|
|
9455
9456
|
const { params: Te, searchValues: Ee, limit: ke, offset: $e } = ie;
|
|
9456
|
-
F || (n == null || n(void 0), r == null || r([]), S == null || S(Ee), o == null || o(Te), i == null || i(!1),
|
|
9457
|
+
F || (n == null || n(void 0), r == null || r([]), S == null || S(Ee), o == null || o(Te), i == null || i(!1), E(!0), A(void 0), _(1), ke && (Q.current = ke, x == null || x(ke)), $e && W($e), le({
|
|
9457
9458
|
params: Te,
|
|
9458
9459
|
newOffset: $e
|
|
9459
9460
|
}));
|
|
@@ -9470,11 +9471,11 @@ const Wl = (t) => {
|
|
|
9470
9471
|
]
|
|
9471
9472
|
), ge = O(
|
|
9472
9473
|
(ie) => {
|
|
9473
|
-
$(!0),
|
|
9474
|
+
$(!0), _(ie), W((ie - 1) * C);
|
|
9474
9475
|
},
|
|
9475
|
-
[$, C, W,
|
|
9476
|
+
[$, C, W, _]
|
|
9476
9477
|
), be = O(() => {
|
|
9477
|
-
F || (n == null || n(void 0), o == null || o([]), S == null || S({}), A(void 0), W(0),
|
|
9478
|
+
F || (n == null || n(void 0), o == null || o([]), S == null || S({}), A(void 0), W(0), _(1), x == null || x(C || Ct));
|
|
9478
9479
|
}, [
|
|
9479
9480
|
F,
|
|
9480
9481
|
n,
|
|
@@ -9533,9 +9534,9 @@ function Mg(t, e) {
|
|
|
9533
9534
|
rootTree: f = !1,
|
|
9534
9535
|
parentContext: u = {},
|
|
9535
9536
|
onChangeSelectedRowKeys: p
|
|
9536
|
-
} = t, [m, g] = T(!1), [h, v] = T(!1), y = Z(!1), b = Z(null), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R,
|
|
9537
|
+
} = t, [m, g] = T(!1), [h, v] = T(!1), y = Z(!1), b = Z(null), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R, E] = T(200), I = Z(), { height: A } = Jr(), k = pe(
|
|
9537
9538
|
Sn
|
|
9538
|
-
), { processAction:
|
|
9539
|
+
), { processAction: _ } = k || {}, M = pe(
|
|
9539
9540
|
It
|
|
9540
9541
|
), {
|
|
9541
9542
|
setResults: W = void 0,
|
|
@@ -9655,7 +9656,7 @@ function Mg(t, e) {
|
|
|
9655
9656
|
context: u
|
|
9656
9657
|
}));
|
|
9657
9658
|
const Ut = I.current[0][2];
|
|
9658
|
-
await (
|
|
9659
|
+
await (_ == null ? void 0 : _({
|
|
9659
9660
|
actionData: Ut,
|
|
9660
9661
|
fields: x.fields,
|
|
9661
9662
|
values: {
|
|
@@ -9665,7 +9666,7 @@ function Mg(t, e) {
|
|
|
9665
9666
|
context: u
|
|
9666
9667
|
}));
|
|
9667
9668
|
},
|
|
9668
|
-
[w, u,
|
|
9669
|
+
[w, u, _, x]
|
|
9669
9670
|
), ue = O(
|
|
9670
9671
|
async (Ie) => {
|
|
9671
9672
|
const { id: at } = Ie;
|
|
@@ -9713,7 +9714,7 @@ function Mg(t, e) {
|
|
|
9713
9714
|
isSearching: ke,
|
|
9714
9715
|
onSubmit: ne,
|
|
9715
9716
|
onLimitChange: J,
|
|
9716
|
-
setSearchFilterHeight:
|
|
9717
|
+
setSearchFilterHeight: E,
|
|
9717
9718
|
searchError: $e,
|
|
9718
9719
|
searchVisible: K,
|
|
9719
9720
|
searchValues: le
|
|
@@ -9809,11 +9810,11 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9809
9810
|
setSearchValues: F,
|
|
9810
9811
|
searchTreeNameSearch: $,
|
|
9811
9812
|
setSearchTreeNameSearch: R,
|
|
9812
|
-
setResults:
|
|
9813
|
+
setResults: E,
|
|
9813
9814
|
results: I,
|
|
9814
9815
|
setSearchQuery: A,
|
|
9815
9816
|
setTotalItems: k,
|
|
9816
|
-
isActive:
|
|
9817
|
+
isActive: _,
|
|
9817
9818
|
currentPage: M,
|
|
9818
9819
|
setCurrentPage: W,
|
|
9819
9820
|
order: V,
|
|
@@ -9856,7 +9857,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9856
9857
|
treeView: r,
|
|
9857
9858
|
tableRef: l,
|
|
9858
9859
|
context: d,
|
|
9859
|
-
isActive:
|
|
9860
|
+
isActive: _,
|
|
9860
9861
|
onResultsUpdated: et,
|
|
9861
9862
|
treeOoui: n,
|
|
9862
9863
|
updateAttributes: He,
|
|
@@ -9867,7 +9868,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9867
9868
|
autorefreshableFields: n == null ? void 0 : n.autorefreshableFields,
|
|
9868
9869
|
treeView: r,
|
|
9869
9870
|
context: d,
|
|
9870
|
-
isActive:
|
|
9871
|
+
isActive: _,
|
|
9871
9872
|
treeOoui: n,
|
|
9872
9873
|
updateAttributes: He,
|
|
9873
9874
|
results: I,
|
|
@@ -9982,7 +9983,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9982
9983
|
params: Le,
|
|
9983
9984
|
name_search: te,
|
|
9984
9985
|
context: d
|
|
9985
|
-
}),
|
|
9986
|
+
}), E == null || E(fe), te ? (q(fe.length), k(fe.length), le(!0), Q(!1)) : le(!1), fe.length === 0) {
|
|
9986
9987
|
ne.current = [], q(0), k(0), se([]), m(!1);
|
|
9987
9988
|
return;
|
|
9988
9989
|
}
|
|
@@ -10011,7 +10012,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10011
10012
|
r,
|
|
10012
10013
|
d,
|
|
10013
10014
|
A,
|
|
10014
|
-
|
|
10015
|
+
E,
|
|
10015
10016
|
He,
|
|
10016
10017
|
Wt,
|
|
10017
10018
|
Ne,
|
|
@@ -10168,7 +10169,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10168
10169
|
]
|
|
10169
10170
|
);
|
|
10170
10171
|
return {
|
|
10171
|
-
isActive:
|
|
10172
|
+
isActive: _,
|
|
10172
10173
|
searchVisible: g,
|
|
10173
10174
|
searchValues: S,
|
|
10174
10175
|
selectedRowKeys: at,
|
|
@@ -10309,7 +10310,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10309
10310
|
onFetchChildrenForRecord: $,
|
|
10310
10311
|
childField: R
|
|
10311
10312
|
}) => {
|
|
10312
|
-
const
|
|
10313
|
+
const E = re(() => t.map((I) => ({
|
|
10313
10314
|
...I,
|
|
10314
10315
|
render: (A, k) => /* @__PURE__ */ s(
|
|
10315
10316
|
As,
|
|
@@ -10328,7 +10329,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10328
10329
|
strings: n,
|
|
10329
10330
|
isLoading: r,
|
|
10330
10331
|
height: o,
|
|
10331
|
-
columns:
|
|
10332
|
+
columns: E,
|
|
10332
10333
|
dataSource: i,
|
|
10333
10334
|
onRowDoubleClick: a,
|
|
10334
10335
|
onRowSelectionChange: l,
|
|
@@ -10443,11 +10444,11 @@ function jg(t, e) {
|
|
|
10443
10444
|
searchVisible: F,
|
|
10444
10445
|
searchValues: $,
|
|
10445
10446
|
selectedRowKeys: R,
|
|
10446
|
-
refresh:
|
|
10447
|
+
refresh: E,
|
|
10447
10448
|
onRowStatus: I,
|
|
10448
10449
|
onGetFirstVisibleRowIndex: A,
|
|
10449
10450
|
setTreeFirstVisibleRow: k,
|
|
10450
|
-
onRowHasBeenSelected:
|
|
10451
|
+
onRowHasBeenSelected: _,
|
|
10451
10452
|
onSearchFilterClear: M,
|
|
10452
10453
|
onSearchFilterSubmit: W,
|
|
10453
10454
|
onSideSearchFilterClose: V,
|
|
@@ -10493,7 +10494,7 @@ function jg(t, e) {
|
|
|
10493
10494
|
parentContext: d
|
|
10494
10495
|
}), me = _o((J) => {
|
|
10495
10496
|
y != null && y.isExpandable ? $e(J) : h(J);
|
|
10496
|
-
}), qe = _o(
|
|
10497
|
+
}), qe = _o(E), [st, Ze, et] = gs({
|
|
10497
10498
|
ooui: x,
|
|
10498
10499
|
model: n,
|
|
10499
10500
|
showEmptyValues: !0,
|
|
@@ -10503,7 +10504,7 @@ function jg(t, e) {
|
|
|
10503
10504
|
) : void 0
|
|
10504
10505
|
});
|
|
10505
10506
|
Ht(e, () => ({
|
|
10506
|
-
refreshResults:
|
|
10507
|
+
refreshResults: E,
|
|
10507
10508
|
getFields: () => y == null ? void 0 : y.fields
|
|
10508
10509
|
}));
|
|
10509
10510
|
const Se = re(() => et ? /* @__PURE__ */ s(ys, { aggregates: Ze, isLoading: st }) : null, [Ze, st, et]), tt = O(
|
|
@@ -10566,7 +10567,7 @@ function jg(t, e) {
|
|
|
10566
10567
|
availableHeight: C,
|
|
10567
10568
|
results: B,
|
|
10568
10569
|
handleRowDoubleClick: me,
|
|
10569
|
-
onRowHasBeenSelected:
|
|
10570
|
+
onRowHasBeenSelected: _,
|
|
10570
10571
|
updateColumnState: G,
|
|
10571
10572
|
getColumnState: se,
|
|
10572
10573
|
setTreeFirstVisibleRow: k,
|
|
@@ -10648,11 +10649,11 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10648
10649
|
currentSavedSearch: F,
|
|
10649
10650
|
setCurrentSavedSearch: $,
|
|
10650
10651
|
setSavedSearches: R,
|
|
10651
|
-
savedSearches:
|
|
10652
|
+
savedSearches: E,
|
|
10652
10653
|
setSearchVisible: I,
|
|
10653
10654
|
setSearchParams: A,
|
|
10654
10655
|
setSearchValues: k,
|
|
10655
|
-
searchParams:
|
|
10656
|
+
searchParams: _,
|
|
10656
10657
|
isActive: M
|
|
10657
10658
|
} = pe(It), { token: W } = Wg(), { t: V } = we(), N = Lt(
|
|
10658
10659
|
wt.FEATURE_SAVED_SEARCHES
|
|
@@ -10704,16 +10705,16 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10704
10705
|
ce(() => {
|
|
10705
10706
|
M && !B.current && N && ee(), B.current = M;
|
|
10706
10707
|
}, [M]), ce(() => {
|
|
10707
|
-
if (N &&
|
|
10708
|
-
const oe =
|
|
10709
|
-
(se) => zn(se.domain,
|
|
10708
|
+
if (N && E && E.length > 0 && _ && !F) {
|
|
10709
|
+
const oe = E.find(
|
|
10710
|
+
(se) => zn(se.domain, _)
|
|
10710
10711
|
);
|
|
10711
10712
|
oe && ($ == null || $(oe));
|
|
10712
10713
|
}
|
|
10713
10714
|
}, [
|
|
10714
10715
|
N,
|
|
10715
|
-
_,
|
|
10716
10716
|
E,
|
|
10717
|
+
_,
|
|
10717
10718
|
F,
|
|
10718
10719
|
$
|
|
10719
10720
|
]);
|
|
@@ -10920,11 +10921,11 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10920
10921
|
limit: F,
|
|
10921
10922
|
isActive: $,
|
|
10922
10923
|
initialSearchParams: R,
|
|
10923
|
-
initialCurrentPage:
|
|
10924
|
+
initialCurrentPage: E,
|
|
10924
10925
|
initialOrder: I,
|
|
10925
10926
|
permissions: A,
|
|
10926
10927
|
permissionsLoading: k,
|
|
10927
|
-
permissionsError:
|
|
10928
|
+
permissionsError: _
|
|
10928
10929
|
} = t, [M, W] = T(!1), [V, N] = T(!1), [U, j] = T(!1), [ee, B] = T(!0), [z, K] = T(!0), [Q, de] = T([]), [q, oe] = T(!1), [se, G] = T(
|
|
10929
10930
|
R || []
|
|
10930
10931
|
), [le, te] = T(!1), [Y, ge] = T(!0), [be, ve] = T(), ne = re(() => !i || i.length === 0 ? (n == null ? void 0 : n.fields) || {} : i.reduce((Ae, Tt) => ({ ...Ae, ...Tt.fields || {} }), {}), [i, n]), [ie, Te] = T(
|
|
@@ -10934,7 +10935,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10934
10935
|
), [He, Ye] = T(
|
|
10935
10936
|
F !== void 0 ? F : Ct
|
|
10936
10937
|
), [ze, Pe] = T(r), [Ne, rt] = T(
|
|
10937
|
-
|
|
10938
|
+
E || 1
|
|
10938
10939
|
), [J, Ce] = T(null), [ue, De] = T([]);
|
|
10939
10940
|
ce(() => {
|
|
10940
10941
|
p && p.length > 0 && !m && (g == null || g(0), f == null || f(p[0].id));
|
|
@@ -11031,7 +11032,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11031
11032
|
setSavedSearches: De,
|
|
11032
11033
|
permissions: A,
|
|
11033
11034
|
permissionsLoading: k,
|
|
11034
|
-
permissionsError:
|
|
11035
|
+
permissionsError: _
|
|
11035
11036
|
},
|
|
11036
11037
|
children: e
|
|
11037
11038
|
}
|
|
@@ -11407,7 +11408,7 @@ function Qg(t) {
|
|
|
11407
11408
|
domain: i = [],
|
|
11408
11409
|
visible: a = !0,
|
|
11409
11410
|
parentContext: l = {}
|
|
11410
|
-
} = t, [c, d] = T(!1), [f, u] = T(!1), [p, m] = T(), [g, h] = T(), [v, y] = T(), [b, w] = T(1), [C, x] = T(0), D = Z(Ct), S = Z([]), [P, F] = T(0), [$, R] = T([]), [
|
|
11411
|
+
} = t, [c, d] = T(!1), [f, u] = T(!1), [p, m] = T(), [g, h] = T(), [v, y] = T(), [b, w] = T(1), [C, x] = T(0), D = Z(Ct), S = Z([]), [P, F] = T(0), [$, R] = T([]), [E, I] = T(void 0), [A, k] = T(), [_, M] = T(), [W, V] = T(), [N, U] = T(!1), j = Z([]), ee = (se) => {
|
|
11411
11412
|
U(!0), w(se), x((se - 1) * D.current);
|
|
11412
11413
|
}, B = async () => {
|
|
11413
11414
|
const se = j.current.length > 0 ? j.current : i, G = nn(S.current, se), { colors: le } = en(g), { totalItems: te, results: Y, attrsEvaluated: ge } = await H.getHandler().searchForTree({
|
|
@@ -11479,8 +11480,8 @@ function Qg(t) {
|
|
|
11479
11480
|
model: p,
|
|
11480
11481
|
treeView: g
|
|
11481
11482
|
});
|
|
11482
|
-
}, oe = () => !g || !v ? null : (
|
|
11483
|
-
|
|
11483
|
+
}, oe = () => !g || !v ? null : (_ && console.error(_), /* @__PURE__ */ L("div", { style: { overflowY: "scroll" }, children: [
|
|
11484
|
+
_ && /* @__PURE__ */ s(Rt, { className: "mt-10", message: _, type: "error", banner: !0 }),
|
|
11484
11485
|
/* @__PURE__ */ s(
|
|
11485
11486
|
xr,
|
|
11486
11487
|
{
|
|
@@ -11493,7 +11494,7 @@ function Qg(t) {
|
|
|
11493
11494
|
onRequestPageChange: ee,
|
|
11494
11495
|
loading: N,
|
|
11495
11496
|
onRowClicked: q,
|
|
11496
|
-
colorsForResults:
|
|
11497
|
+
colorsForResults: E,
|
|
11497
11498
|
sorter: A,
|
|
11498
11499
|
onChangeSort: (se) => {
|
|
11499
11500
|
k == null || k(se);
|
|
@@ -11717,7 +11718,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11717
11718
|
});
|
|
11718
11719
|
$ = [...$, ...I];
|
|
11719
11720
|
}
|
|
11720
|
-
const
|
|
11721
|
+
const E = (await C({
|
|
11721
11722
|
model: p,
|
|
11722
11723
|
params: $,
|
|
11723
11724
|
fieldsToRetrieve: [h],
|
|
@@ -11727,7 +11728,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11727
11728
|
let k = A;
|
|
11728
11729
|
return Array.isArray(A) && (k = A[1]), { label: k, value: I.id };
|
|
11729
11730
|
});
|
|
11730
|
-
l(
|
|
11731
|
+
l(E);
|
|
11731
11732
|
} catch (R) {
|
|
11732
11733
|
d(R);
|
|
11733
11734
|
} finally {
|
|
@@ -11738,22 +11739,22 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11738
11739
|
const R = o.map((I) => $.includes(I.id) ? I.operation === "pendingRemove" ? {
|
|
11739
11740
|
...I,
|
|
11740
11741
|
operation: "pendingLink"
|
|
11741
|
-
} : I : { id: I.id, operation: "pendingRemove" }),
|
|
11742
|
-
$.filter((I) => !
|
|
11742
|
+
} : I : { id: I.id, operation: "pendingRemove" }), E = R.map((I) => I.id);
|
|
11743
|
+
$.filter((I) => !E.includes(I)).forEach((I) => {
|
|
11743
11744
|
R.push({ id: I, operation: "pendingLink" });
|
|
11744
11745
|
}), D(R);
|
|
11745
11746
|
}, F = ($) => {
|
|
11746
|
-
const { label: R, closable:
|
|
11747
|
+
const { label: R, closable: E, onClose: I } = $, A = (M) => {
|
|
11747
11748
|
M.preventDefault(), M.stopPropagation();
|
|
11748
|
-
}, k = mr(R),
|
|
11749
|
+
}, k = mr(R), _ = k && Ea(k);
|
|
11749
11750
|
return /* @__PURE__ */ s(
|
|
11750
11751
|
Rs,
|
|
11751
11752
|
{
|
|
11752
11753
|
color: k,
|
|
11753
11754
|
onMouseDown: A,
|
|
11754
|
-
closable:
|
|
11755
|
+
closable: E,
|
|
11755
11756
|
onClose: I,
|
|
11756
|
-
closeIcon: /* @__PURE__ */ s("span", { style: { color:
|
|
11757
|
+
closeIcon: /* @__PURE__ */ s("span", { style: { color: _ && _.text }, children: "X" }),
|
|
11757
11758
|
children: R
|
|
11758
11759
|
}
|
|
11759
11760
|
);
|
|
@@ -12088,7 +12089,7 @@ function xy(t, e) {
|
|
|
12088
12089
|
forcedValues: D = {},
|
|
12089
12090
|
parentWidth: S,
|
|
12090
12091
|
onMustRefreshParent: P
|
|
12091
|
-
} = t, { t: F } = we(), [$, R] = T(!1), [
|
|
12092
|
+
} = t, { t: F } = we(), [$, R] = T(!1), [E, I] = T(), [A, k] = T(), [_] = Ot.useForm(), [M, W] = T(), [V, N] = T(), U = pe(Jl), [j, ee] = T(), [B, z] = T(!1), K = Z(), Q = Z({}), de = Z({}), q = Z(!1), oe = Z(!1), se = Z(!1), le = (S !== void 0 ? S : j) < wy, te = pe(Qe), { activeId: Y, getPlainValues: ge } = te || {}, be = Z(!1), ve = pe(
|
|
12092
12093
|
It
|
|
12093
12094
|
), {
|
|
12094
12095
|
setFormIsSaving: ne = void 0,
|
|
@@ -12139,16 +12140,16 @@ function xy(t, e) {
|
|
|
12139
12140
|
}), z(!1));
|
|
12140
12141
|
}, [B]), Ue(() => {
|
|
12141
12142
|
var X;
|
|
12142
|
-
if (
|
|
12143
|
-
const ae =
|
|
12143
|
+
if (E) {
|
|
12144
|
+
const ae = E;
|
|
12144
12145
|
ae.fields && Array.isArray(ae.fields) && rt(
|
|
12145
12146
|
((X = ae.fields) == null ? void 0 : X.map((ye) => ({
|
|
12146
12147
|
...ye,
|
|
12147
12148
|
type: ae.type || "error"
|
|
12148
12149
|
}))) || []
|
|
12149
|
-
), Se(
|
|
12150
|
+
), Se(E);
|
|
12150
12151
|
}
|
|
12151
|
-
}, [
|
|
12152
|
+
}, [E]);
|
|
12152
12153
|
const J = (X, ae, ye, xe) => {
|
|
12153
12154
|
ie == null || ie(!1), ne == null || ne(!1), i == null || i(X, ae, ye, xe), Te == null || Te(X), be.current && (P == null || P());
|
|
12154
12155
|
}, Ce = (X) => {
|
|
@@ -12211,10 +12212,10 @@ function xy(t, e) {
|
|
|
12211
12212
|
})
|
|
12212
12213
|
).length !== 0, lt = O(
|
|
12213
12214
|
(X) => {
|
|
12214
|
-
const ae =
|
|
12215
|
+
const ae = _.getFieldsValue(!0);
|
|
12215
12216
|
return _n(ae, X);
|
|
12216
12217
|
},
|
|
12217
|
-
[
|
|
12218
|
+
[_]
|
|
12218
12219
|
), mt = O(() => {
|
|
12219
12220
|
const X = {
|
|
12220
12221
|
...lt(V),
|
|
@@ -12234,16 +12235,16 @@ function xy(t, e) {
|
|
|
12234
12235
|
]), Fn = (X, ae) => {
|
|
12235
12236
|
Vt({
|
|
12236
12237
|
values: {
|
|
12237
|
-
..._n(
|
|
12238
|
+
..._n(_.getFieldsValue(!0), V),
|
|
12238
12239
|
[X]: ae
|
|
12239
12240
|
},
|
|
12240
12241
|
fields: V,
|
|
12241
12242
|
reset: !1
|
|
12242
12243
|
});
|
|
12243
|
-
}, An = (X) =>
|
|
12244
|
+
}, An = (X) => _.getFieldsValue(!0)[X];
|
|
12244
12245
|
async function dn() {
|
|
12245
12246
|
try {
|
|
12246
|
-
return await
|
|
12247
|
+
return await _.validateFields(), !1;
|
|
12247
12248
|
} catch {
|
|
12248
12249
|
return !0;
|
|
12249
12250
|
}
|
|
@@ -12302,14 +12303,14 @@ function xy(t, e) {
|
|
|
12302
12303
|
reset: ye,
|
|
12303
12304
|
isDefaultGet: xe = !1
|
|
12304
12305
|
}) => {
|
|
12305
|
-
const ht = { ...ye ? {} :
|
|
12306
|
+
const ht = { ...ye ? {} : _.getFieldsValue(!0), ...X }, ao = _n(ht, ae), hc = Object.keys(ae).map((lo) => ({
|
|
12306
12307
|
name: lo,
|
|
12307
12308
|
touched: !1,
|
|
12308
12309
|
value: ao[lo] !== void 0 ? ao[lo] : void 0
|
|
12309
12310
|
}));
|
|
12310
|
-
xe || (de.current = ao),
|
|
12311
|
+
xe || (de.current = ao), _.setFields(hc);
|
|
12311
12312
|
},
|
|
12312
|
-
[
|
|
12313
|
+
[_]
|
|
12313
12314
|
), fn = async ({
|
|
12314
12315
|
fields: X,
|
|
12315
12316
|
arch: ae
|
|
@@ -12471,7 +12472,7 @@ function xy(t, e) {
|
|
|
12471
12472
|
"many2one"
|
|
12472
12473
|
]
|
|
12473
12474
|
}) && X !== !0)) {
|
|
12474
|
-
const xe = _n(
|
|
12475
|
+
const xe = _n(_.getFieldsValue(!0), V);
|
|
12475
12476
|
de.current = xe, c == null || c(xe), ie == null || ie(!0), Object.keys(xe).forEach((Me) => {
|
|
12476
12477
|
Pe(Me);
|
|
12477
12478
|
}), Le(ye);
|
|
@@ -12690,7 +12691,7 @@ function xy(t, e) {
|
|
|
12690
12691
|
xe && _t(!1), Se(Me);
|
|
12691
12692
|
}
|
|
12692
12693
|
}
|
|
12693
|
-
const io = () => !A && !
|
|
12694
|
+
const io = () => !A && !E ? /* @__PURE__ */ s(nt, {}) : !n && !g || !w ? null : /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s(
|
|
12694
12695
|
zd,
|
|
12695
12696
|
{
|
|
12696
12697
|
getValues: mt,
|
|
@@ -12718,7 +12719,7 @@ function xy(t, e) {
|
|
|
12718
12719
|
children: /* @__PURE__ */ s(
|
|
12719
12720
|
Ot,
|
|
12720
12721
|
{
|
|
12721
|
-
form:
|
|
12722
|
+
form: _,
|
|
12722
12723
|
onFieldsChange: () => {
|
|
12723
12724
|
Fe({ elementHasLostFocus: !1 });
|
|
12724
12725
|
},
|
|
@@ -12806,11 +12807,11 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12806
12807
|
shortcut_id: h
|
|
12807
12808
|
});
|
|
12808
12809
|
else {
|
|
12809
|
-
const { action_id: F, res_id: $, action_type: R, view_id:
|
|
12810
|
+
const { action_id: F, res_id: $, action_type: R, view_id: E } = l;
|
|
12810
12811
|
await H.getHandler().addFavourite({
|
|
12811
12812
|
action_id: F,
|
|
12812
12813
|
action_type: R,
|
|
12813
|
-
view_id:
|
|
12814
|
+
view_id: E,
|
|
12814
12815
|
res_id: $ || !1
|
|
12815
12816
|
});
|
|
12816
12817
|
}
|
|
@@ -12906,7 +12907,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12906
12907
|
[x]
|
|
12907
12908
|
), R = O(() => {
|
|
12908
12909
|
d(!0);
|
|
12909
|
-
}, []),
|
|
12910
|
+
}, []), E = O(() => {
|
|
12910
12911
|
d(!1), S();
|
|
12911
12912
|
}, [S]), I = O(
|
|
12912
12913
|
(A) => {
|
|
@@ -12976,7 +12977,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12976
12977
|
visible: c,
|
|
12977
12978
|
parentContext: a,
|
|
12978
12979
|
onSubmitSucceed: I,
|
|
12979
|
-
onCancel:
|
|
12980
|
+
onCancel: E
|
|
12980
12981
|
}
|
|
12981
12982
|
)
|
|
12982
12983
|
] });
|
|
@@ -13059,8 +13060,8 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13059
13060
|
getFields: F,
|
|
13060
13061
|
getContext: $,
|
|
13061
13062
|
elementHasLostFocus: R,
|
|
13062
|
-
getAllHierarchyValues:
|
|
13063
|
-
} = S || {}, I = Z([]), [A, k] = T([]), { showErrorNotification:
|
|
13063
|
+
getAllHierarchyValues: E
|
|
13064
|
+
} = S || {}, I = Z([]), [A, k] = T([]), { showErrorNotification: _ } = yt(), { permissions: M } = Vr({
|
|
13064
13065
|
model: i,
|
|
13065
13066
|
permissions: ["create", "write"],
|
|
13066
13067
|
enabled: !0
|
|
@@ -13093,7 +13094,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13093
13094
|
Y.length === 1 ? (D.current = void 0, ee(Y[0])) : K(D.current);
|
|
13094
13095
|
}
|
|
13095
13096
|
} catch (Y) {
|
|
13096
|
-
|
|
13097
|
+
_(Y);
|
|
13097
13098
|
} finally {
|
|
13098
13099
|
v(!1);
|
|
13099
13100
|
}
|
|
@@ -13121,7 +13122,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13121
13122
|
});
|
|
13122
13123
|
ee([Y, ge[0][1]]);
|
|
13123
13124
|
} catch (ge) {
|
|
13124
|
-
|
|
13125
|
+
_(ge);
|
|
13125
13126
|
} finally {
|
|
13126
13127
|
v(!1);
|
|
13127
13128
|
}
|
|
@@ -13131,7 +13132,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13131
13132
|
domain: d,
|
|
13132
13133
|
values: Cn({
|
|
13133
13134
|
fields: F(),
|
|
13134
|
-
values:
|
|
13135
|
+
values: E()
|
|
13135
13136
|
}),
|
|
13136
13137
|
fields: F(),
|
|
13137
13138
|
context: $()
|
|
@@ -13525,7 +13526,7 @@ function Ey(t) {
|
|
|
13525
13526
|
model: P,
|
|
13526
13527
|
permissions: ["write"],
|
|
13527
13528
|
enabled: !!P
|
|
13528
|
-
}), R = (F == null ? void 0 : F.create) ?? !1,
|
|
13529
|
+
}), R = (F == null ? void 0 : F.create) ?? !1, E = (F == null ? void 0 : F.write) ?? !1, I = (F == null ? void 0 : F.unlink) ?? !1, A = ($ == null ? void 0 : $.write) ?? !1, { duplicatingItem: k, duplicate: _ } = Iy({
|
|
13529
13530
|
currentId: a === "form" ? x : parseInt(g[0]),
|
|
13530
13531
|
currentModel: o,
|
|
13531
13532
|
onItemDuplicated: () => {
|
|
@@ -13548,7 +13549,7 @@ function Ey(t) {
|
|
|
13548
13549
|
parentContext: b,
|
|
13549
13550
|
selectedRowItems: g.map((oe) => ({ id: oe })),
|
|
13550
13551
|
onRefreshParentValues: C
|
|
13551
|
-
}), j = n || !R || !A, ee = n || !
|
|
13552
|
+
}), j = n || !R || !A, ee = n || !E, B = c === 0 || n || a !== "form" && g.length === 0 || (p ? !E : !I || !A), z = n || k || a === "tree" && g.length !== 1 || a === "form" && (x === void 0 || x < 0) || !R || !A;
|
|
13552
13553
|
return /* @__PURE__ */ L("div", { className: "flex mb-2 pt-3", children: [
|
|
13553
13554
|
/* @__PURE__ */ s(rc, { title: e, token: D }),
|
|
13554
13555
|
/* @__PURE__ */ L("div", { className: "flex-none h-8 pl-2", children: [
|
|
@@ -13611,7 +13612,7 @@ function Ey(t) {
|
|
|
13611
13612
|
onClick: () => tn({
|
|
13612
13613
|
confirmMessage: S("confirmDuplicate"),
|
|
13613
13614
|
t: S,
|
|
13614
|
-
onOk: async () =>
|
|
13615
|
+
onOk: async () => _()
|
|
13615
13616
|
})
|
|
13616
13617
|
}
|
|
13617
13618
|
)
|
|
@@ -13785,7 +13786,7 @@ const ky = (t) => {
|
|
|
13785
13786
|
domain: g,
|
|
13786
13787
|
fetchValues: h,
|
|
13787
13788
|
getAllHierarchyValues: v
|
|
13788
|
-
} = f || {}, { t: y } = we(), [b, w] = T(!1), [C, x] = T(!1), [D, S] = T(), [P, F] = T(!1), [$, R] = T(!1), [
|
|
13789
|
+
} = f || {}, { t: y } = we(), [b, w] = T(!1), [C, x] = T(!1), [D, S] = T(), [P, F] = T(!1), [$, R] = T(!1), [E, I] = T(), [A, k] = T([]), [_, M] = T(!1), [W, V] = T([]), [N, U] = T(), j = Z(), [ee, B] = T(void 0), z = Z(), {
|
|
13789
13790
|
readOnly: K,
|
|
13790
13791
|
relation: Q,
|
|
13791
13792
|
context: de,
|
|
@@ -13984,7 +13985,7 @@ const ky = (t) => {
|
|
|
13984
13985
|
treeValues: { ...ue, id: Ae }
|
|
13985
13986
|
});
|
|
13986
13987
|
}
|
|
13987
|
-
Y(Ve),
|
|
13988
|
+
Y(Ve), _ || F(!1);
|
|
13988
13989
|
}, Se = async (J) => {
|
|
13989
13990
|
const { id: Ce } = J;
|
|
13990
13991
|
let ue = i;
|
|
@@ -14101,7 +14102,7 @@ const ky = (t) => {
|
|
|
14101
14102
|
};
|
|
14102
14103
|
if (D)
|
|
14103
14104
|
return /* @__PURE__ */ s(Rt, { className: "mt-10", message: D, type: "error", banner: !0 });
|
|
14104
|
-
const ze =
|
|
14105
|
+
const ze = _;
|
|
14105
14106
|
return C ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ L(he, { children: [
|
|
14106
14107
|
/* @__PURE__ */ s(
|
|
14107
14108
|
ac,
|
|
@@ -14138,10 +14139,10 @@ const ky = (t) => {
|
|
|
14138
14139
|
{
|
|
14139
14140
|
formView: o.get("form"),
|
|
14140
14141
|
model: Q,
|
|
14141
|
-
id:
|
|
14142
|
+
id: E == null ? void 0 : E.id,
|
|
14142
14143
|
submitMode: "2many",
|
|
14143
|
-
values:
|
|
14144
|
-
defaultValues:
|
|
14144
|
+
values: E == null ? void 0 : E.values,
|
|
14145
|
+
defaultValues: E == null ? void 0 : E.defaultValues,
|
|
14145
14146
|
visible: P,
|
|
14146
14147
|
onSubmitSucceed: et,
|
|
14147
14148
|
parentContext: { ...m == null ? void 0 : m(), ...de },
|
|
@@ -14263,7 +14264,7 @@ const ky = (t) => {
|
|
|
14263
14264
|
context: n,
|
|
14264
14265
|
attrs: x,
|
|
14265
14266
|
treeOoui: u
|
|
14266
|
-
}), $ = C.length < h - g && w.length > 0 ? [...C, ...w.map((
|
|
14267
|
+
}), $ = C.length < h - g && w.length > 0 ? [...C, ...w.map((E) => E.id)] : C;
|
|
14267
14268
|
return { results: $u({
|
|
14268
14269
|
finalResultIds: $,
|
|
14269
14270
|
fetchedItems: D,
|
|
@@ -14637,12 +14638,12 @@ const Hy = ({
|
|
|
14637
14638
|
wt.FEATURE_MANY2ONE_SORT
|
|
14638
14639
|
);
|
|
14639
14640
|
Ue(() => {
|
|
14640
|
-
var
|
|
14641
|
+
var _, M;
|
|
14641
14642
|
if (D.current = t, x.current === void 0) {
|
|
14642
14643
|
x.current = t;
|
|
14643
14644
|
return;
|
|
14644
14645
|
}
|
|
14645
|
-
x.current = t, (
|
|
14646
|
+
x.current = t, (_ = b == null ? void 0 : b.current) == null || _.refresh(), (M = b == null ? void 0 : b.current) == null || M.unselectAll();
|
|
14646
14647
|
}, [t]);
|
|
14647
14648
|
const F = Jt(() => t.length, [t]), $ = Jt(() => ds(
|
|
14648
14649
|
o,
|
|
@@ -14653,7 +14654,7 @@ const Hy = ({
|
|
|
14653
14654
|
P
|
|
14654
14655
|
), [i, o, P]), R = O(
|
|
14655
14656
|
async ({
|
|
14656
|
-
startRow:
|
|
14657
|
+
startRow: _,
|
|
14657
14658
|
endRow: M,
|
|
14658
14659
|
state: W
|
|
14659
14660
|
}) => {
|
|
@@ -14661,17 +14662,17 @@ const Hy = ({
|
|
|
14661
14662
|
state: W
|
|
14662
14663
|
}), { results: N, colors: U, status: j } = await a({
|
|
14663
14664
|
allItems: D.current,
|
|
14664
|
-
startRow:
|
|
14665
|
+
startRow: _,
|
|
14665
14666
|
endRow: M,
|
|
14666
14667
|
sortFields: V
|
|
14667
14668
|
});
|
|
14668
14669
|
return w.current = { ...w.current, ...U }, !C.current && j && (C.current = {}), j && (C.current = { ...C.current, ...j }), N;
|
|
14669
14670
|
},
|
|
14670
14671
|
[a]
|
|
14671
|
-
),
|
|
14672
|
+
), E = O((_) => {
|
|
14672
14673
|
var M, W, V, N;
|
|
14673
|
-
if (w.current[(W = (M =
|
|
14674
|
-
return { color: w.current[(N = (V =
|
|
14674
|
+
if (w.current[(W = (M = _.node) == null ? void 0 : M.data) == null ? void 0 : W.id])
|
|
14675
|
+
return { color: w.current[(N = (V = _.node) == null ? void 0 : V.data) == null ? void 0 : N.id] };
|
|
14675
14676
|
}, []), { loading: I, getColumnState: A, updateColumnState: k } = hs({
|
|
14676
14677
|
key: jy({
|
|
14677
14678
|
...m,
|
|
@@ -14688,7 +14689,7 @@ const Hy = ({
|
|
|
14688
14689
|
onRowDoubleClick: n,
|
|
14689
14690
|
showPointerCursorInRows: v,
|
|
14690
14691
|
readonly: r,
|
|
14691
|
-
onRowStyle:
|
|
14692
|
+
onRowStyle: E,
|
|
14692
14693
|
onRowSelectionChange: l,
|
|
14693
14694
|
onColumnChanged: k,
|
|
14694
14695
|
onGetColumnsState: A,
|
|
@@ -14699,10 +14700,10 @@ const Hy = ({
|
|
|
14699
14700
|
totalRows: F,
|
|
14700
14701
|
footer: g && /* @__PURE__ */ s(ys, { aggregates: g, isLoading: !1 }),
|
|
14701
14702
|
hasStatusColumn: o.status !== null,
|
|
14702
|
-
statusComponent: (
|
|
14703
|
-
onRowStatus: (
|
|
14703
|
+
statusComponent: (_) => /* @__PURE__ */ s(Un, { color: _, style: { marginLeft: 7 } }),
|
|
14704
|
+
onRowStatus: (_) => {
|
|
14704
14705
|
var M;
|
|
14705
|
-
return (M = C.current) == null ? void 0 : M[
|
|
14706
|
+
return (M = C.current) == null ? void 0 : M[_.id];
|
|
14706
14707
|
},
|
|
14707
14708
|
strings: {
|
|
14708
14709
|
resetTableViewLabel: S("resetTableView")
|
|
@@ -14742,11 +14743,11 @@ const Hy = ({
|
|
|
14742
14743
|
}), {
|
|
14743
14744
|
treeOoui: $,
|
|
14744
14745
|
onTreeFetchRows: R,
|
|
14745
|
-
selectedRowKeys:
|
|
14746
|
+
selectedRowKeys: E,
|
|
14746
14747
|
setSelectedRowKeys: I,
|
|
14747
14748
|
onChangeFirstVisibleRowIndex: A,
|
|
14748
14749
|
onGetFirstVisibileRowIndex: k,
|
|
14749
|
-
onSelectionCheckboxClicked:
|
|
14750
|
+
onSelectionCheckboxClicked: _
|
|
14750
14751
|
} = My({
|
|
14751
14752
|
treeView: i.get("tree"),
|
|
14752
14753
|
relation: m,
|
|
@@ -14757,7 +14758,7 @@ const Hy = ({
|
|
|
14757
14758
|
ooui: $,
|
|
14758
14759
|
model: m,
|
|
14759
14760
|
items: l,
|
|
14760
|
-
selectedRowKeys:
|
|
14761
|
+
selectedRowKeys: E
|
|
14761
14762
|
}), W = re(() => {
|
|
14762
14763
|
const { title: me } = i.get(c) || {};
|
|
14763
14764
|
return me || o.label;
|
|
@@ -14820,7 +14821,7 @@ const Hy = ({
|
|
|
14820
14821
|
items: l,
|
|
14821
14822
|
triggerChange: N,
|
|
14822
14823
|
setFormHasChanges: B,
|
|
14823
|
-
selectedRowKeys:
|
|
14824
|
+
selectedRowKeys: E,
|
|
14824
14825
|
setSelectedRowKeys: I
|
|
14825
14826
|
}), be = () => {
|
|
14826
14827
|
const me = Array.from(i.keys()), qe = me[(me.indexOf(c) + 1) % me.length];
|
|
@@ -14872,7 +14873,7 @@ const Hy = ({
|
|
|
14872
14873
|
onPreviousItem: ne,
|
|
14873
14874
|
onNextItem: ie,
|
|
14874
14875
|
onSearchItem: Y,
|
|
14875
|
-
selectedRowKeys:
|
|
14876
|
+
selectedRowKeys: E,
|
|
14876
14877
|
showCreateButton: S,
|
|
14877
14878
|
showToggleButton: D,
|
|
14878
14879
|
toolbar: ($e = i.get(c)) == null ? void 0 : $e.toolbar,
|
|
@@ -14900,8 +14901,8 @@ const Hy = ({
|
|
|
14900
14901
|
relation: m,
|
|
14901
14902
|
onChangeFirstVisibleRowIndex: A,
|
|
14902
14903
|
onGetFirstVisibleRowIndex: k,
|
|
14903
|
-
selectedRowKeys:
|
|
14904
|
-
onSelectionCheckboxClicked:
|
|
14904
|
+
selectedRowKeys: E,
|
|
14905
|
+
onSelectionCheckboxClicked: _,
|
|
14905
14906
|
dataForHash: {
|
|
14906
14907
|
parentViewId: t.parentViewId,
|
|
14907
14908
|
treeViewId: t.treeViewId,
|
|
@@ -16068,11 +16069,11 @@ function _v({ toolbar: t }) {
|
|
|
16068
16069
|
formRef: F,
|
|
16069
16070
|
setFormHasChanges: $,
|
|
16070
16071
|
previousView: R,
|
|
16071
|
-
setPreviousView:
|
|
16072
|
+
setPreviousView: E,
|
|
16072
16073
|
goToResourceId: I,
|
|
16073
16074
|
isActive: A,
|
|
16074
16075
|
permissions: k
|
|
16075
|
-
} = jt(), { openDefaultActionForModel:
|
|
16076
|
+
} = jt(), { openDefaultActionForModel: _ } = e || {}, M = re(
|
|
16076
16077
|
() => u || w || S || C,
|
|
16077
16078
|
[u, w, S, C]
|
|
16078
16079
|
), W = O(
|
|
@@ -16140,36 +16141,36 @@ function _v({ toolbar: t }) {
|
|
|
16140
16141
|
i
|
|
16141
16142
|
]), z = O(
|
|
16142
16143
|
(q) => {
|
|
16143
|
-
|
|
16144
|
+
E == null || E(l), $ == null || $(!1), c == null || c(q);
|
|
16144
16145
|
},
|
|
16145
|
-
[l,
|
|
16146
|
+
[l, E, $, c]
|
|
16146
16147
|
), K = O(async () => {
|
|
16147
16148
|
const q = await $n({ onFormSave: d });
|
|
16148
|
-
q.succeed && (
|
|
16149
|
+
q.succeed && (_ == null || _({
|
|
16149
16150
|
...Hi(
|
|
16150
16151
|
y,
|
|
16151
16152
|
q.currentId
|
|
16152
16153
|
),
|
|
16153
16154
|
initialViewType: "form"
|
|
16154
16155
|
}));
|
|
16155
|
-
}, [y, d,
|
|
16156
|
+
}, [y, d, _]), Q = O(async () => {
|
|
16156
16157
|
const q = await $n({ onFormSave: d });
|
|
16157
|
-
q.succeed && (
|
|
16158
|
+
q.succeed && (_ == null || _({
|
|
16158
16159
|
...Hi(
|
|
16159
16160
|
y,
|
|
16160
16161
|
q.currentId
|
|
16161
16162
|
),
|
|
16162
16163
|
initialViewType: "tree"
|
|
16163
16164
|
}));
|
|
16164
|
-
}, [y, d,
|
|
16165
|
+
}, [y, d, _]), de = O(
|
|
16165
16166
|
async (q) => {
|
|
16166
|
-
(await $n({ onFormSave: d })).succeed && (
|
|
16167
|
+
(await $n({ onFormSave: d })).succeed && (_ == null || _({
|
|
16167
16168
|
model: "ir.attachment",
|
|
16168
16169
|
res_id: q.id,
|
|
16169
16170
|
initialViewType: "form"
|
|
16170
16171
|
}));
|
|
16171
16172
|
},
|
|
16172
|
-
[d,
|
|
16173
|
+
[d, _]
|
|
16173
16174
|
);
|
|
16174
16175
|
return gn(
|
|
16175
16176
|
"pagedown",
|
|
@@ -16193,14 +16194,14 @@ function _v({ toolbar: t }) {
|
|
|
16193
16194
|
), gn(
|
|
16194
16195
|
"ctrl+l,command+l",
|
|
16195
16196
|
async () => {
|
|
16196
|
-
!A || !R || !await F.current.cancelUnsavedChanges() || (
|
|
16197
|
+
!A || !R || !await F.current.cancelUnsavedChanges() || (E == null || E(l), c == null || c(R));
|
|
16197
16198
|
},
|
|
16198
16199
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
16199
16200
|
[
|
|
16200
16201
|
A,
|
|
16201
16202
|
R,
|
|
16202
16203
|
l,
|
|
16203
|
-
|
|
16204
|
+
E,
|
|
16204
16205
|
c,
|
|
16205
16206
|
F
|
|
16206
16207
|
]
|
|
@@ -16595,11 +16596,11 @@ const $v = (t) => {
|
|
|
16595
16596
|
limit: F,
|
|
16596
16597
|
setLimit: $,
|
|
16597
16598
|
searchParams: R,
|
|
16598
|
-
searchValues:
|
|
16599
|
+
searchValues: E,
|
|
16599
16600
|
setSearchValues: I,
|
|
16600
16601
|
currentView: A,
|
|
16601
16602
|
totalItems: k,
|
|
16602
|
-
searchTreeNameSearch:
|
|
16603
|
+
searchTreeNameSearch: _
|
|
16603
16604
|
} = u || {}, [M, W] = T(!0), [V, N] = T(!0), [U, j] = T();
|
|
16604
16605
|
ce(() => {
|
|
16605
16606
|
n && N(!0);
|
|
@@ -16611,7 +16612,7 @@ const $v = (t) => {
|
|
|
16611
16612
|
if (!n)
|
|
16612
16613
|
return;
|
|
16613
16614
|
const te = await H.getHandler().searchAllIds({
|
|
16614
|
-
params:
|
|
16615
|
+
params: _ ? i : ee,
|
|
16615
16616
|
model: r,
|
|
16616
16617
|
context: o,
|
|
16617
16618
|
totalItems: k
|
|
@@ -16619,7 +16620,7 @@ const $v = (t) => {
|
|
|
16619
16620
|
j(te);
|
|
16620
16621
|
}, [
|
|
16621
16622
|
n,
|
|
16622
|
-
|
|
16623
|
+
_,
|
|
16623
16624
|
i,
|
|
16624
16625
|
ee,
|
|
16625
16626
|
r,
|
|
@@ -16640,7 +16641,7 @@ const $v = (t) => {
|
|
|
16640
16641
|
z();
|
|
16641
16642
|
}, [
|
|
16642
16643
|
n,
|
|
16643
|
-
|
|
16644
|
+
_,
|
|
16644
16645
|
i,
|
|
16645
16646
|
ee,
|
|
16646
16647
|
k,
|
|
@@ -16714,7 +16715,7 @@ const $v = (t) => {
|
|
|
16714
16715
|
},
|
|
16715
16716
|
searchError: q,
|
|
16716
16717
|
searchVisible: b,
|
|
16717
|
-
searchValues:
|
|
16718
|
+
searchValues: E,
|
|
16718
16719
|
showLimitOptions: !1
|
|
16719
16720
|
}
|
|
16720
16721
|
),
|
|
@@ -16929,9 +16930,9 @@ function Wv(t, e) {
|
|
|
16929
16930
|
initialSearchParams: y = [],
|
|
16930
16931
|
currentPage: b,
|
|
16931
16932
|
order: w
|
|
16932
|
-
} = t, [C, x] = T(), [D, S] = T([]), [P, F] = T(!0), $ = p || void 0, [R,
|
|
16933
|
+
} = t, [C, x] = T(), [D, S] = T([]), [P, F] = T(!0), $ = p || void 0, [R, E] = T(
|
|
16933
16934
|
$
|
|
16934
|
-
), [I, A] = T([]), [k,
|
|
16935
|
+
), [I, A] = T([]), [k, _] = T(), [M, W] = T([]), [V, N] = T(), [U, j] = T(), [ee, B] = T(!1), [z, K] = T(!1), [Q, de] = T(), { t: q } = we(), { showErrorNotification: oe } = yt(), {
|
|
16935
16936
|
permissions: se,
|
|
16936
16937
|
loading: G,
|
|
16937
16938
|
error: le
|
|
@@ -16958,7 +16959,7 @@ function Wv(t, e) {
|
|
|
16958
16959
|
[ie, ne, C, k, M]
|
|
16959
16960
|
);
|
|
16960
16961
|
function ke(Se) {
|
|
16961
|
-
|
|
16962
|
+
E(Se), ve == null || ve(Se);
|
|
16962
16963
|
}
|
|
16963
16964
|
const $e = O(
|
|
16964
16965
|
(Se) => {
|
|
@@ -17081,7 +17082,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17081
17082
|
]);
|
|
17082
17083
|
l({ tabKey: c, canWeClose: qe }), Ue(() => {
|
|
17083
17084
|
const Se = D.find((He) => He.type === "tree"), tt = D.find((He) => d.id ? He.type === d.type && He.view_id === d.id : He.type === d.type);
|
|
17084
|
-
$e(tt || Se), p ? ve == null || ve($) : (ke(void 0),
|
|
17085
|
+
$e(tt || Se), p ? ve == null || ve($) : (ke(void 0), _(void 0)), me();
|
|
17085
17086
|
}, [r, i, p]), Ue(() => {
|
|
17086
17087
|
if (ie === c) {
|
|
17087
17088
|
ve == null || ve(R);
|
|
@@ -17174,7 +17175,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17174
17175
|
onNewClicked: et,
|
|
17175
17176
|
currentId: R,
|
|
17176
17177
|
setCurrentId: ke,
|
|
17177
|
-
setCurrentItemIndex:
|
|
17178
|
+
setCurrentItemIndex: _,
|
|
17178
17179
|
currentItemIndex: k,
|
|
17179
17180
|
results: M,
|
|
17180
17181
|
setResults: W,
|
|
@@ -17210,7 +17211,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17210
17211
|
formDefaultValues: f,
|
|
17211
17212
|
results: M,
|
|
17212
17213
|
setResults: W,
|
|
17213
|
-
setCurrentItemIndex:
|
|
17214
|
+
setCurrentItemIndex: _,
|
|
17214
17215
|
formForcedValues: u,
|
|
17215
17216
|
limit: v,
|
|
17216
17217
|
searchTreeRef: Y,
|
|
@@ -17373,16 +17374,16 @@ function zv(t, e) {
|
|
|
17373
17374
|
async function x() {
|
|
17374
17375
|
d(!0), p(!0), u(void 0);
|
|
17375
17376
|
try {
|
|
17376
|
-
const
|
|
17377
|
-
v.current =
|
|
17378
|
-
const
|
|
17377
|
+
const E = await D(), I = await P(E), A = E.fields[Eo].relation, k = I[Eo].items;
|
|
17378
|
+
v.current = E.fields;
|
|
17379
|
+
const _ = await S({
|
|
17379
17380
|
items: k,
|
|
17380
17381
|
model: A,
|
|
17381
17382
|
context: r
|
|
17382
|
-
}), M = await F(
|
|
17383
|
+
}), M = await F(_);
|
|
17383
17384
|
u(void 0), l(M), d(!1), p(!1);
|
|
17384
|
-
} catch (
|
|
17385
|
-
u(JSON.stringify(
|
|
17385
|
+
} catch (E) {
|
|
17386
|
+
u(JSON.stringify(E));
|
|
17386
17387
|
}
|
|
17387
17388
|
}
|
|
17388
17389
|
async function D() {
|
|
@@ -17393,7 +17394,7 @@ function zv(t, e) {
|
|
|
17393
17394
|
});
|
|
17394
17395
|
}
|
|
17395
17396
|
async function S({
|
|
17396
|
-
items:
|
|
17397
|
+
items: E,
|
|
17397
17398
|
model: I,
|
|
17398
17399
|
context: A
|
|
17399
17400
|
}) {
|
|
@@ -17410,26 +17411,26 @@ function zv(t, e) {
|
|
|
17410
17411
|
fields: h.current
|
|
17411
17412
|
},
|
|
17412
17413
|
model: I,
|
|
17413
|
-
items:
|
|
17414
|
+
items: E,
|
|
17414
17415
|
context: A,
|
|
17415
17416
|
currentView: "form"
|
|
17416
17417
|
});
|
|
17417
17418
|
return k;
|
|
17418
17419
|
}
|
|
17419
|
-
async function P(
|
|
17420
|
+
async function P(E) {
|
|
17420
17421
|
return (await b({
|
|
17421
17422
|
model: n,
|
|
17422
17423
|
ids: [o],
|
|
17423
|
-
fields:
|
|
17424
|
+
fields: E.fields,
|
|
17424
17425
|
context: r
|
|
17425
17426
|
}))[0];
|
|
17426
17427
|
}
|
|
17427
|
-
async function F(
|
|
17428
|
+
async function F(E) {
|
|
17428
17429
|
const I = [];
|
|
17429
|
-
for (const k of
|
|
17430
|
-
const { values:
|
|
17431
|
-
if (
|
|
17432
|
-
const M = parseInt(
|
|
17430
|
+
for (const k of E) {
|
|
17431
|
+
const { values: _ } = k;
|
|
17432
|
+
if (_.action_id && _.action_id.length > 0) {
|
|
17433
|
+
const M = parseInt(_.action_id[0], 10), W = ka({
|
|
17433
17434
|
actionId: M,
|
|
17434
17435
|
rootContext: r
|
|
17435
17436
|
}).then((V) => ({ ...k, actionData: V }));
|
|
@@ -17438,10 +17439,10 @@ function zv(t, e) {
|
|
|
17438
17439
|
}
|
|
17439
17440
|
return await Promise.all(I);
|
|
17440
17441
|
}
|
|
17441
|
-
async function $(
|
|
17442
|
+
async function $(E) {
|
|
17442
17443
|
if (!g)
|
|
17443
17444
|
return;
|
|
17444
|
-
const I =
|
|
17445
|
+
const I = E.filter((M) => {
|
|
17445
17446
|
const W = a.find(
|
|
17446
17447
|
(N) => N.id === M.id
|
|
17447
17448
|
);
|
|
@@ -17469,14 +17470,14 @@ function zv(t, e) {
|
|
|
17469
17470
|
position: JSON.stringify(W).replace(/"/g, "'")
|
|
17470
17471
|
}
|
|
17471
17472
|
};
|
|
17472
|
-
}),
|
|
17473
|
+
}), _ = {
|
|
17473
17474
|
fields: h.current,
|
|
17474
17475
|
items: k
|
|
17475
17476
|
};
|
|
17476
17477
|
await w({
|
|
17477
17478
|
model: n,
|
|
17478
17479
|
id: o,
|
|
17479
|
-
values: { [Eo]:
|
|
17480
|
+
values: { [Eo]: _ },
|
|
17480
17481
|
fields: v.current,
|
|
17481
17482
|
context: r
|
|
17482
17483
|
});
|
|
@@ -17484,8 +17485,8 @@ function zv(t, e) {
|
|
|
17484
17485
|
async function R() {
|
|
17485
17486
|
m(i);
|
|
17486
17487
|
}
|
|
17487
|
-
return c ? /* @__PURE__ */ s(Bt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Rt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(Yv, { onPositionItemsChanged: $, children: a.map((
|
|
17488
|
-
const { actionData: A, values: k } =
|
|
17488
|
+
return c ? /* @__PURE__ */ s(Bt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Rt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(Yv, { onPositionItemsChanged: $, children: a.map((E, I) => {
|
|
17489
|
+
const { actionData: A, values: k } = E, { position: _, id: M } = k, {
|
|
17489
17490
|
actionId: W,
|
|
17490
17491
|
actionType: V,
|
|
17491
17492
|
key: N,
|
|
@@ -17500,7 +17501,7 @@ function zv(t, e) {
|
|
|
17500
17501
|
} = A;
|
|
17501
17502
|
let q = {};
|
|
17502
17503
|
try {
|
|
17503
|
-
q = JSON.parse(
|
|
17504
|
+
q = JSON.parse(_.replace(/'/g, '"'));
|
|
17504
17505
|
} catch {
|
|
17505
17506
|
q = { x: I * 2, y: 0, w: 2, h: 3 };
|
|
17506
17507
|
}
|
|
@@ -17651,9 +17652,9 @@ const Kv = $t(zv), Jv = (t) => {
|
|
|
17651
17652
|
fieldsToRetrieve: [h],
|
|
17652
17653
|
context: { ...b == null ? void 0 : b(), ...m }
|
|
17653
17654
|
})).map((R) => {
|
|
17654
|
-
const
|
|
17655
|
-
let I =
|
|
17656
|
-
return Array.isArray(
|
|
17655
|
+
const E = R[h];
|
|
17656
|
+
let I = E;
|
|
17657
|
+
return Array.isArray(E) && (I = E[1]), { label: I, value: R.id };
|
|
17657
17658
|
});
|
|
17658
17659
|
l($);
|
|
17659
17660
|
} catch (F) {
|
|
@@ -18000,7 +18001,7 @@ function Ib(t, e) {
|
|
|
18000
18001
|
processAction: h.current.processAction,
|
|
18001
18002
|
handleOpenActionUrl: C,
|
|
18002
18003
|
handleOpenActionResourceUrl: x,
|
|
18003
|
-
handleOpenModelAndViews:
|
|
18004
|
+
handleOpenModelAndViews: E
|
|
18004
18005
|
}));
|
|
18005
18006
|
function v(I) {
|
|
18006
18007
|
if (I === r) {
|
|
@@ -18011,14 +18012,14 @@ function Ib(t, e) {
|
|
|
18011
18012
|
}
|
|
18012
18013
|
const y = O(
|
|
18013
18014
|
(I, A) => {
|
|
18014
|
-
const k = [...p], [
|
|
18015
|
-
k.splice(A, 0,
|
|
18015
|
+
const k = [...p], [_] = k.splice(I, 1);
|
|
18016
|
+
k.splice(A, 0, _), m(k);
|
|
18016
18017
|
},
|
|
18017
18018
|
[p]
|
|
18018
18019
|
), b = O((I, A) => {
|
|
18019
18020
|
m(
|
|
18020
18021
|
(k) => k.map(
|
|
18021
|
-
(
|
|
18022
|
+
(_) => _.key === I ? { ..._, title: A } : _
|
|
18022
18023
|
)
|
|
18023
18024
|
);
|
|
18024
18025
|
}, []);
|
|
@@ -18029,7 +18030,7 @@ function Ib(t, e) {
|
|
|
18029
18030
|
g.current.set(I, A);
|
|
18030
18031
|
}
|
|
18031
18032
|
async function C(I) {
|
|
18032
|
-
const { actionRawData: A, res_id: k, limit:
|
|
18033
|
+
const { actionRawData: A, res_id: k, limit: _ } = I, M = await H.getHandler().getFields({
|
|
18033
18034
|
model: I.model,
|
|
18034
18035
|
context: c
|
|
18035
18036
|
});
|
|
@@ -18065,7 +18066,7 @@ function Ib(t, e) {
|
|
|
18065
18066
|
})();
|
|
18066
18067
|
R({
|
|
18067
18068
|
...I,
|
|
18068
|
-
limit:
|
|
18069
|
+
limit: _,
|
|
18069
18070
|
context: { ...c, ...N },
|
|
18070
18071
|
domain: U,
|
|
18071
18072
|
actionRawData: {
|
|
@@ -18080,7 +18081,7 @@ function Ib(t, e) {
|
|
|
18080
18081
|
view_id: A,
|
|
18081
18082
|
res_id: k
|
|
18082
18083
|
}) {
|
|
18083
|
-
const
|
|
18084
|
+
const _ = await H.getHandler().getView({
|
|
18084
18085
|
model: I,
|
|
18085
18086
|
id: A || void 0,
|
|
18086
18087
|
type: "form",
|
|
@@ -18090,12 +18091,12 @@ function Ib(t, e) {
|
|
|
18090
18091
|
action_id: -1,
|
|
18091
18092
|
action_type: "ir.actions.act_window",
|
|
18092
18093
|
model: I,
|
|
18093
|
-
views: [[
|
|
18094
|
+
views: [[_.view_id, "form"]],
|
|
18094
18095
|
context: c,
|
|
18095
18096
|
domain: [],
|
|
18096
|
-
title:
|
|
18097
|
+
title: _.title || I,
|
|
18097
18098
|
target: "current",
|
|
18098
|
-
initialView: { id:
|
|
18099
|
+
initialView: { id: _.view_id, type: "form" },
|
|
18099
18100
|
res_id: k
|
|
18100
18101
|
});
|
|
18101
18102
|
}
|
|
@@ -18103,7 +18104,7 @@ function Ib(t, e) {
|
|
|
18103
18104
|
action: I,
|
|
18104
18105
|
values: A,
|
|
18105
18106
|
forced_values: k,
|
|
18106
|
-
initialViewType:
|
|
18107
|
+
initialViewType: _,
|
|
18107
18108
|
res_id: M,
|
|
18108
18109
|
domain: W = [],
|
|
18109
18110
|
context: V = {}
|
|
@@ -18158,9 +18159,9 @@ function Ib(t, e) {
|
|
|
18158
18159
|
}
|
|
18159
18160
|
}
|
|
18160
18161
|
let ge;
|
|
18161
|
-
if (
|
|
18162
|
+
if (_) {
|
|
18162
18163
|
const [be, ve] = Y.find(
|
|
18163
|
-
([ne, ie]) => ie ===
|
|
18164
|
+
([ne, ie]) => ie === _
|
|
18164
18165
|
);
|
|
18165
18166
|
ge = { id: be, type: ve };
|
|
18166
18167
|
} else {
|
|
@@ -18192,7 +18193,7 @@ function Ib(t, e) {
|
|
|
18192
18193
|
title: I,
|
|
18193
18194
|
content: A,
|
|
18194
18195
|
key: k,
|
|
18195
|
-
action:
|
|
18196
|
+
action: _
|
|
18196
18197
|
}) {
|
|
18197
18198
|
let M = [...p];
|
|
18198
18199
|
p.length === 1 && p[0].key === "welcome" && (M = [...p.filter((W) => W.key !== "welcome")]), m([
|
|
@@ -18202,7 +18203,7 @@ function Ib(t, e) {
|
|
|
18202
18203
|
key: k,
|
|
18203
18204
|
closable: !0,
|
|
18204
18205
|
content: A,
|
|
18205
|
-
action:
|
|
18206
|
+
action: _
|
|
18206
18207
|
}
|
|
18207
18208
|
]), o(k);
|
|
18208
18209
|
}
|
|
@@ -18210,7 +18211,7 @@ function Ib(t, e) {
|
|
|
18210
18211
|
relateData: I,
|
|
18211
18212
|
fields: A,
|
|
18212
18213
|
values: k,
|
|
18213
|
-
action_id:
|
|
18214
|
+
action_id: _,
|
|
18214
18215
|
action_type: M
|
|
18215
18216
|
}) {
|
|
18216
18217
|
const {
|
|
@@ -18241,7 +18242,7 @@ function Ib(t, e) {
|
|
|
18241
18242
|
domain: se,
|
|
18242
18243
|
title: ee,
|
|
18243
18244
|
initialView: Q,
|
|
18244
|
-
action_id:
|
|
18245
|
+
action_id: _,
|
|
18245
18246
|
action_type: M,
|
|
18246
18247
|
limit: B,
|
|
18247
18248
|
actionRawData: {
|
|
@@ -18256,7 +18257,7 @@ function Ib(t, e) {
|
|
|
18256
18257
|
const {
|
|
18257
18258
|
action_id: A,
|
|
18258
18259
|
action_type: k,
|
|
18259
|
-
res_id:
|
|
18260
|
+
res_id: _,
|
|
18260
18261
|
view_id: M,
|
|
18261
18262
|
overrideUnsettedLimit: W = !1,
|
|
18262
18263
|
values: V = {},
|
|
@@ -18317,7 +18318,7 @@ function Ib(t, e) {
|
|
|
18317
18318
|
initialView: be,
|
|
18318
18319
|
action_id: A,
|
|
18319
18320
|
action_type: k,
|
|
18320
|
-
res_id:
|
|
18321
|
+
res_id: _,
|
|
18321
18322
|
treeExpandable: le,
|
|
18322
18323
|
limit: W && (G === 0 || G === !1) ? Ct : G,
|
|
18323
18324
|
actionRawData: {
|
|
@@ -18331,7 +18332,7 @@ function Ib(t, e) {
|
|
|
18331
18332
|
model: I,
|
|
18332
18333
|
values: A,
|
|
18333
18334
|
forced_values: k,
|
|
18334
|
-
initialViewType:
|
|
18335
|
+
initialViewType: _,
|
|
18335
18336
|
res_id: M,
|
|
18336
18337
|
domain: W,
|
|
18337
18338
|
context: V
|
|
@@ -18341,7 +18342,7 @@ function Ib(t, e) {
|
|
|
18341
18342
|
action: N,
|
|
18342
18343
|
values: A,
|
|
18343
18344
|
forced_values: k,
|
|
18344
|
-
initialViewType:
|
|
18345
|
+
initialViewType: _,
|
|
18345
18346
|
res_id: M,
|
|
18346
18347
|
domain: W,
|
|
18347
18348
|
context: V
|
|
@@ -18352,7 +18353,7 @@ function Ib(t, e) {
|
|
|
18352
18353
|
const {
|
|
18353
18354
|
domain: A,
|
|
18354
18355
|
context: k,
|
|
18355
|
-
model:
|
|
18356
|
+
model: _,
|
|
18356
18357
|
views: M,
|
|
18357
18358
|
title: W,
|
|
18358
18359
|
target: V,
|
|
@@ -18380,14 +18381,14 @@ function Ib(t, e) {
|
|
|
18380
18381
|
}
|
|
18381
18382
|
if (V !== "current" && V !== void 0) {
|
|
18382
18383
|
const le = await H.getHandler().getView({
|
|
18383
|
-
model:
|
|
18384
|
+
model: _,
|
|
18384
18385
|
type: "form",
|
|
18385
18386
|
id: N.type === "form" ? N.id : void 0,
|
|
18386
18387
|
context: { ...c, ...k }
|
|
18387
18388
|
});
|
|
18388
18389
|
h.current.openActionModal({
|
|
18389
18390
|
domain: A,
|
|
18390
|
-
model:
|
|
18391
|
+
model: _,
|
|
18391
18392
|
formView: le,
|
|
18392
18393
|
context: { ...c, ...k },
|
|
18393
18394
|
actionData: {
|
|
@@ -18409,7 +18410,7 @@ function Ib(t, e) {
|
|
|
18409
18410
|
tabKey: se,
|
|
18410
18411
|
title: W,
|
|
18411
18412
|
views: M,
|
|
18412
|
-
model:
|
|
18413
|
+
model: _,
|
|
18413
18414
|
context: { ...k, ...c },
|
|
18414
18415
|
domain: A,
|
|
18415
18416
|
setCanWeClose: w,
|
|
@@ -18429,14 +18430,14 @@ function Ib(t, e) {
|
|
|
18429
18430
|
});
|
|
18430
18431
|
}
|
|
18431
18432
|
}
|
|
18432
|
-
async function
|
|
18433
|
+
async function E({
|
|
18433
18434
|
model: I,
|
|
18434
18435
|
domain: A = [],
|
|
18435
18436
|
title: k,
|
|
18436
|
-
viewModes:
|
|
18437
|
+
viewModes: _ = ["tree", "form"]
|
|
18437
18438
|
}) {
|
|
18438
18439
|
const M = [];
|
|
18439
|
-
for (const U of
|
|
18440
|
+
for (const U of _)
|
|
18440
18441
|
if (U === "dashboard")
|
|
18441
18442
|
M.push([void 0, "dashboard"]);
|
|
18442
18443
|
else {
|
|
@@ -18795,8 +18796,8 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18795
18796
|
} = m || {}, C = re(() => {
|
|
18796
18797
|
if (!y || !y.view_id || !y.extra)
|
|
18797
18798
|
return;
|
|
18798
|
-
const { action_id: R, action_type:
|
|
18799
|
-
if (!R || !
|
|
18799
|
+
const { action_id: R, action_type: E } = y.extra || {};
|
|
18800
|
+
if (!R || !E) {
|
|
18800
18801
|
l(!1);
|
|
18801
18802
|
return;
|
|
18802
18803
|
}
|
|
@@ -18804,7 +18805,7 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18804
18805
|
let A = !1;
|
|
18805
18806
|
return y.type === "form" && (A = b || !1), {
|
|
18806
18807
|
action_id: R,
|
|
18807
|
-
action_type:
|
|
18808
|
+
action_type: E,
|
|
18808
18809
|
view_id: I,
|
|
18809
18810
|
res_id: A
|
|
18810
18811
|
};
|
|
@@ -18816,8 +18817,8 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18816
18817
|
S();
|
|
18817
18818
|
}, [x]);
|
|
18818
18819
|
function D(R) {
|
|
18819
|
-
const
|
|
18820
|
-
(
|
|
18820
|
+
const E = R;
|
|
18821
|
+
(E == null ? void 0 : E.action_type) !== "ir.actions.wizard" && g(E);
|
|
18821
18822
|
}
|
|
18822
18823
|
const S = O(async () => {
|
|
18823
18824
|
if (!C)
|
|
@@ -18852,14 +18853,14 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18852
18853
|
else {
|
|
18853
18854
|
if (!y)
|
|
18854
18855
|
return;
|
|
18855
|
-
const R = h.find((
|
|
18856
|
+
const R = h.find((_) => _.key === v), { action_id: E, action_type: I } = (R == null ? void 0 : R.action) || {}, A = y.view_id;
|
|
18856
18857
|
let k = !1;
|
|
18857
|
-
if (!
|
|
18858
|
+
if (!E || !I) {
|
|
18858
18859
|
l(!1);
|
|
18859
18860
|
return;
|
|
18860
18861
|
}
|
|
18861
18862
|
y.type === "form" && (k = b || !1), await r({
|
|
18862
|
-
action_id:
|
|
18863
|
+
action_id: E,
|
|
18863
18864
|
action_type: I,
|
|
18864
18865
|
view_id: A,
|
|
18865
18866
|
res_id: k
|