@gisce/react-ooui 2.59.0 → 2.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -633,10 +633,10 @@ const Cs = (e) => {
|
|
|
633
633
|
async function w() {
|
|
634
634
|
m(!0);
|
|
635
635
|
try {
|
|
636
|
-
const
|
|
637
|
-
await T(
|
|
638
|
-
} catch (
|
|
639
|
-
dt(
|
|
636
|
+
const A = await I();
|
|
637
|
+
await T(A);
|
|
638
|
+
} catch (A) {
|
|
639
|
+
dt(A);
|
|
640
640
|
}
|
|
641
641
|
m(!1);
|
|
642
642
|
}
|
|
@@ -651,9 +651,9 @@ const Cs = (e) => {
|
|
|
651
651
|
}));
|
|
652
652
|
return f == null || f(_), _;
|
|
653
653
|
}
|
|
654
|
-
async function T(
|
|
654
|
+
async function T(A) {
|
|
655
655
|
const _ = {};
|
|
656
|
-
for (const R of
|
|
656
|
+
for (const R of A) {
|
|
657
657
|
const x = (await k.getHandler().readObjects({
|
|
658
658
|
model: r,
|
|
659
659
|
ids: [o],
|
|
@@ -665,17 +665,17 @@ const Cs = (e) => {
|
|
|
665
665
|
v.current = _, y(_);
|
|
666
666
|
}
|
|
667
667
|
function S() {
|
|
668
|
-
return u.map((
|
|
669
|
-
/* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children:
|
|
668
|
+
return u.map((A, _) => /* @__PURE__ */ P(je, { style: { paddingBottom: 20 }, children: [
|
|
669
|
+
/* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children: A.name }),
|
|
670
670
|
/* @__PURE__ */ i(Ie, { flex: "auto", children: /* @__PURE__ */ i(
|
|
671
671
|
fc,
|
|
672
672
|
{
|
|
673
673
|
rows: 4,
|
|
674
|
-
value: g[
|
|
674
|
+
value: g[A.code] || "",
|
|
675
675
|
onChange: (R) => {
|
|
676
676
|
y({
|
|
677
677
|
...g,
|
|
678
|
-
[
|
|
678
|
+
[A.code]: R.target.value
|
|
679
679
|
});
|
|
680
680
|
},
|
|
681
681
|
disabled: h
|
|
@@ -683,21 +683,21 @@ const Cs = (e) => {
|
|
|
683
683
|
) })
|
|
684
684
|
] }, _));
|
|
685
685
|
}
|
|
686
|
-
async function
|
|
686
|
+
async function O() {
|
|
687
687
|
p(!0);
|
|
688
688
|
try {
|
|
689
|
-
for (const
|
|
690
|
-
g[
|
|
689
|
+
for (const A of Object.keys(g))
|
|
690
|
+
g[A] !== v.current[A] && await k.getHandler().update({
|
|
691
691
|
model: r,
|
|
692
692
|
id: o,
|
|
693
|
-
values: { [a]: g[
|
|
693
|
+
values: { [a]: g[A] },
|
|
694
694
|
context: {
|
|
695
|
-
lang:
|
|
695
|
+
lang: A
|
|
696
696
|
},
|
|
697
697
|
fields: {}
|
|
698
698
|
});
|
|
699
|
-
} catch (
|
|
700
|
-
dt(
|
|
699
|
+
} catch (A) {
|
|
700
|
+
dt(A);
|
|
701
701
|
}
|
|
702
702
|
p(!1), s();
|
|
703
703
|
}
|
|
@@ -720,7 +720,7 @@ const Cs = (e) => {
|
|
|
720
720
|
{
|
|
721
721
|
icon: h ? /* @__PURE__ */ i(At, {}) : /* @__PURE__ */ i(kn, {}),
|
|
722
722
|
disabled: h,
|
|
723
|
-
onClick:
|
|
723
|
+
onClick: O,
|
|
724
724
|
style: { marginLeft: 15 },
|
|
725
725
|
type: "primary",
|
|
726
726
|
children: c("ok")
|
|
@@ -1537,11 +1537,11 @@ const Qt = ({
|
|
|
1537
1537
|
titleField: w,
|
|
1538
1538
|
iconField: I,
|
|
1539
1539
|
colorField: T
|
|
1540
|
-
} = r, S = a.filter((F) => F.values),
|
|
1540
|
+
} = r, S = a.filter((F) => F.values), O = ee(Ue), { getContext: b } = O || {};
|
|
1541
1541
|
Ft(() => {
|
|
1542
1542
|
_();
|
|
1543
1543
|
}, [a]);
|
|
1544
|
-
const
|
|
1544
|
+
const A = (F) => {
|
|
1545
1545
|
o == null || o({
|
|
1546
1546
|
items: F
|
|
1547
1547
|
});
|
|
@@ -1562,7 +1562,7 @@ const Qt = ({
|
|
|
1562
1562
|
context: { ...b == null ? void 0 : b(), ...g },
|
|
1563
1563
|
currentView: "form"
|
|
1564
1564
|
});
|
|
1565
|
-
|
|
1565
|
+
A(F);
|
|
1566
1566
|
} catch (F) {
|
|
1567
1567
|
u(F);
|
|
1568
1568
|
} finally {
|
|
@@ -1577,7 +1577,7 @@ const Qt = ({
|
|
|
1577
1577
|
const D = ft(F);
|
|
1578
1578
|
return D && /* @__PURE__ */ i(D, {});
|
|
1579
1579
|
}, x = S.map((F) => {
|
|
1580
|
-
var V, N,
|
|
1580
|
+
var V, N, L, B;
|
|
1581
1581
|
const D = {
|
|
1582
1582
|
children: /* @__PURE__ */ i(
|
|
1583
1583
|
$d,
|
|
@@ -1592,7 +1592,7 @@ const Qt = ({
|
|
|
1592
1592
|
}
|
|
1593
1593
|
)
|
|
1594
1594
|
};
|
|
1595
|
-
return (
|
|
1595
|
+
return (L = F.values) != null && L[I] && (D.dot = R(F.values[I])), (B = F.values) != null && B[T] && (D.color = !ws(F.values[T]) && !bs(F.values[T]) && !F.values[T].toString().startsWith("#") ? $n(F.values[T]) : F.values[T]), D;
|
|
1596
1596
|
});
|
|
1597
1597
|
return /* @__PURE__ */ P(le, { children: [
|
|
1598
1598
|
/* @__PURE__ */ i(Ji, { style: { padding: "1rem" }, items: x }),
|
|
@@ -2030,17 +2030,17 @@ async function $s({
|
|
|
2030
2030
|
context: l
|
|
2031
2031
|
}) : [], y = [];
|
|
2032
2032
|
for (const T of u) {
|
|
2033
|
-
const [S,
|
|
2033
|
+
const [S, O] = T;
|
|
2034
2034
|
if (S)
|
|
2035
2035
|
y.push(T);
|
|
2036
2036
|
else {
|
|
2037
2037
|
const { view_id: b } = await k.getHandler().getView({
|
|
2038
2038
|
model: c,
|
|
2039
|
-
type:
|
|
2039
|
+
type: O,
|
|
2040
2040
|
id: S,
|
|
2041
2041
|
context: { ...t, ...s }
|
|
2042
2042
|
});
|
|
2043
|
-
y.push([b,
|
|
2043
|
+
y.push([b, O]);
|
|
2044
2044
|
}
|
|
2045
2045
|
}
|
|
2046
2046
|
const [v, w] = y[0], I = { id: v, type: w };
|
|
@@ -2080,16 +2080,16 @@ const Gd = (e) => {
|
|
|
2080
2080
|
});
|
|
2081
2081
|
if (I) {
|
|
2082
2082
|
const [T, S] = I, {
|
|
2083
|
-
actionId:
|
|
2083
|
+
actionId: O,
|
|
2084
2084
|
actionType: b,
|
|
2085
|
-
title:
|
|
2085
|
+
title: A,
|
|
2086
2086
|
model: _
|
|
2087
2087
|
} = v;
|
|
2088
2088
|
c({
|
|
2089
2089
|
domain: v.domain,
|
|
2090
|
-
action_id:
|
|
2090
|
+
action_id: O,
|
|
2091
2091
|
action_type: b,
|
|
2092
|
-
name:
|
|
2092
|
+
name: A,
|
|
2093
2093
|
res_id: !1,
|
|
2094
2094
|
res_model: _,
|
|
2095
2095
|
view_id: T,
|
|
@@ -2341,7 +2341,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2341
2341
|
operator: f,
|
|
2342
2342
|
manualIds: d,
|
|
2343
2343
|
fixedHeight: m
|
|
2344
|
-
} = e, [h, p] = C(!1), [g, y] = C(), [v, w] = C(0), [I, T] = C(), [S,
|
|
2344
|
+
} = e, [h, p] = C(!1), [g, y] = C(), [v, w] = C(0), [I, T] = C(), [S, O] = C(), [b, A] = C(), [_, R] = C(), [x] = Je(
|
|
2345
2345
|
k.getHandler().searchAllIds
|
|
2346
2346
|
), [F] = Je(
|
|
2347
2347
|
k.getHandler().readObjects
|
|
@@ -2355,7 +2355,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2355
2355
|
se(() => {
|
|
2356
2356
|
G();
|
|
2357
2357
|
}, [t, o]);
|
|
2358
|
-
async function
|
|
2358
|
+
async function L({
|
|
2359
2359
|
domain: $,
|
|
2360
2360
|
isTotal: K
|
|
2361
2361
|
}) {
|
|
@@ -2410,14 +2410,14 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2410
2410
|
p(!0), R(void 0);
|
|
2411
2411
|
let $, K;
|
|
2412
2412
|
try {
|
|
2413
|
-
const Z = await
|
|
2413
|
+
const Z = await L({ domain: n, isTotal: !1 });
|
|
2414
2414
|
if (y(Z), a) {
|
|
2415
2415
|
const J = await V({
|
|
2416
2416
|
domain: a,
|
|
2417
2417
|
values: {},
|
|
2418
2418
|
context: r
|
|
2419
2419
|
});
|
|
2420
|
-
$ = await
|
|
2420
|
+
$ = await L({
|
|
2421
2421
|
domain: J,
|
|
2422
2422
|
isTotal: !0
|
|
2423
2423
|
}), T($);
|
|
@@ -2428,7 +2428,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2428
2428
|
values: { value: Z, percent: K },
|
|
2429
2429
|
context: r
|
|
2430
2430
|
});
|
|
2431
|
-
|
|
2431
|
+
O(J);
|
|
2432
2432
|
}
|
|
2433
2433
|
if (l)
|
|
2434
2434
|
if (l.indexOf(":") !== -1) {
|
|
@@ -2437,9 +2437,9 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2437
2437
|
values: { value: Z, percent: K },
|
|
2438
2438
|
context: r
|
|
2439
2439
|
});
|
|
2440
|
-
|
|
2440
|
+
A(J);
|
|
2441
2441
|
} else
|
|
2442
|
-
|
|
2442
|
+
A(l);
|
|
2443
2443
|
R(void 0);
|
|
2444
2444
|
} catch (Z) {
|
|
2445
2445
|
R(JSON.stringify(Z));
|
|
@@ -2474,16 +2474,16 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2474
2474
|
k.getHandler().readObjects
|
|
2475
2475
|
), [T] = Je(k.getHandler().search), S = E(async () => {
|
|
2476
2476
|
u(!0), d(void 0), v(n.type || "line");
|
|
2477
|
-
const
|
|
2478
|
-
let b,
|
|
2477
|
+
const O = Jd({ ooui: n });
|
|
2478
|
+
let b, A;
|
|
2479
2479
|
try {
|
|
2480
|
-
({ values: b, fields:
|
|
2480
|
+
({ values: b, fields: A } = await Zd({
|
|
2481
2481
|
model: t,
|
|
2482
2482
|
domain: r,
|
|
2483
2483
|
context: o,
|
|
2484
2484
|
limit: a,
|
|
2485
2485
|
order: n.timerange ? n.x.name : null,
|
|
2486
|
-
fields:
|
|
2486
|
+
fields: O,
|
|
2487
2487
|
manualIds: l,
|
|
2488
2488
|
methods: {
|
|
2489
2489
|
getFields: w,
|
|
@@ -2496,7 +2496,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2496
2496
|
return;
|
|
2497
2497
|
}
|
|
2498
2498
|
try {
|
|
2499
|
-
if (!b || !
|
|
2499
|
+
if (!b || !A)
|
|
2500
2500
|
return d("No values or fields returned"), u(!1), {
|
|
2501
2501
|
loading: c,
|
|
2502
2502
|
error: f,
|
|
@@ -2509,7 +2509,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2509
2509
|
const _ = zd({
|
|
2510
2510
|
ooui: n,
|
|
2511
2511
|
values: b,
|
|
2512
|
-
fields:
|
|
2512
|
+
fields: A,
|
|
2513
2513
|
options: {
|
|
2514
2514
|
uninformedString: s
|
|
2515
2515
|
}
|
|
@@ -3006,15 +3006,15 @@ const du = ({
|
|
|
3006
3006
|
setTotalItems: I,
|
|
3007
3007
|
setSelectedRowItems: T,
|
|
3008
3008
|
selectedRowItems: S,
|
|
3009
|
-
searchTreeNameSearch:
|
|
3009
|
+
searchTreeNameSearch: O,
|
|
3010
3010
|
setSearchTreeNameSearch: b,
|
|
3011
|
-
goToResourceId:
|
|
3011
|
+
goToResourceId: A,
|
|
3012
3012
|
limit: _,
|
|
3013
3013
|
isActive: R,
|
|
3014
3014
|
initialSearchParams: x
|
|
3015
|
-
} = e, [F, D] = C(!1), [V, N] = C(!1), [
|
|
3015
|
+
} = e, [F, D] = C(!1), [V, N] = C(!1), [L, B] = C(!1), [G, $] = C(!0), [K, Z] = C(!0), [J, Q] = C([]), [Ce, me] = C(!1), [H, j] = C(
|
|
3016
3016
|
x || []
|
|
3017
|
-
), [q, ie] = C(!1), [te,
|
|
3017
|
+
), [q, ie] = C(!1), [te, M] = C(!0), [ne, oe] = C(), [we, ge] = C(
|
|
3018
3018
|
vu(
|
|
3019
3019
|
x || [],
|
|
3020
3020
|
n.fields
|
|
@@ -3066,7 +3066,7 @@ const du = ({
|
|
|
3066
3066
|
results: m,
|
|
3067
3067
|
setResults: d,
|
|
3068
3068
|
currentModel: g,
|
|
3069
|
-
removingItem:
|
|
3069
|
+
removingItem: L,
|
|
3070
3070
|
setRemovingItem: B,
|
|
3071
3071
|
formIsLoading: G,
|
|
3072
3072
|
setFormIsLoading: $,
|
|
@@ -3086,13 +3086,13 @@ const du = ({
|
|
|
3086
3086
|
setSorter: v,
|
|
3087
3087
|
totalItems: w,
|
|
3088
3088
|
setTotalItems: I,
|
|
3089
|
-
searchTreeNameSearch:
|
|
3089
|
+
searchTreeNameSearch: O,
|
|
3090
3090
|
setSearchTreeNameSearch: b,
|
|
3091
|
-
setGraphIsLoading:
|
|
3091
|
+
setGraphIsLoading: M,
|
|
3092
3092
|
graphIsLoading: te,
|
|
3093
3093
|
previousView: ne,
|
|
3094
3094
|
setPreviousView: oe,
|
|
3095
|
-
goToResourceId:
|
|
3095
|
+
goToResourceId: A,
|
|
3096
3096
|
searchValues: we,
|
|
3097
3097
|
setSearchValues: ge,
|
|
3098
3098
|
limit: z,
|
|
@@ -3569,20 +3569,20 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3569
3569
|
const { ooui: t } = e;
|
|
3570
3570
|
return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(Pu, { ooui: t }) });
|
|
3571
3571
|
}, Pu = (e) => {
|
|
3572
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((
|
|
3572
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [s, l] = C([]), [c, u] = C(), [f, d] = C(!1), { relation: m, context: h, readOnly: p, field: g } = n, y = ee(Ue), { getContext: v } = y || {};
|
|
3573
3573
|
Ft(() => {
|
|
3574
3574
|
I();
|
|
3575
3575
|
}, [o]);
|
|
3576
|
-
const w = (
|
|
3576
|
+
const w = (O) => {
|
|
3577
3577
|
r == null || r({
|
|
3578
|
-
items:
|
|
3578
|
+
items: O
|
|
3579
3579
|
});
|
|
3580
3580
|
};
|
|
3581
3581
|
async function I() {
|
|
3582
3582
|
d(!0);
|
|
3583
|
-
let
|
|
3583
|
+
let O = [];
|
|
3584
3584
|
try {
|
|
3585
|
-
if (p && (
|
|
3585
|
+
if (p && (O = [["id", "in", a]]), n.domain) {
|
|
3586
3586
|
const _ = await k.getHandler().evalDomain({
|
|
3587
3587
|
domain: n.domain,
|
|
3588
3588
|
values: Qt({
|
|
@@ -3592,11 +3592,11 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3592
3592
|
fields: y == null ? void 0 : y.getFields(),
|
|
3593
3593
|
context: y.getContext()
|
|
3594
3594
|
});
|
|
3595
|
-
|
|
3595
|
+
O = [...O, ..._];
|
|
3596
3596
|
}
|
|
3597
|
-
const
|
|
3597
|
+
const A = (await k.getHandler().search({
|
|
3598
3598
|
model: m,
|
|
3599
|
-
params:
|
|
3599
|
+
params: O,
|
|
3600
3600
|
fieldsToRetrieve: [g],
|
|
3601
3601
|
context: { ...v == null ? void 0 : v(), ...h }
|
|
3602
3602
|
})).map((_) => {
|
|
@@ -3604,23 +3604,23 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3604
3604
|
let x = R;
|
|
3605
3605
|
return Array.isArray(R) && (x = R[1]), { label: x, value: _.id };
|
|
3606
3606
|
});
|
|
3607
|
-
l(
|
|
3607
|
+
l(A);
|
|
3608
3608
|
} catch (b) {
|
|
3609
3609
|
u(b);
|
|
3610
3610
|
} finally {
|
|
3611
3611
|
d(!1);
|
|
3612
3612
|
}
|
|
3613
3613
|
}
|
|
3614
|
-
const T = (
|
|
3615
|
-
const b = o.map((_) =>
|
|
3614
|
+
const T = (O) => {
|
|
3615
|
+
const b = o.map((_) => O.includes(_.id) ? _.operation === "pendingRemove" ? {
|
|
3616
3616
|
..._,
|
|
3617
3617
|
operation: "pendingLink"
|
|
3618
|
-
} : _ : { id: _.id, operation: "pendingRemove" }),
|
|
3619
|
-
|
|
3618
|
+
} : _ : { id: _.id, operation: "pendingRemove" }), A = b.map((_) => _.id);
|
|
3619
|
+
O.filter((_) => !A.includes(_)).forEach((_) => {
|
|
3620
3620
|
b.push({ id: _, operation: "pendingLink" });
|
|
3621
3621
|
}), w(b);
|
|
3622
|
-
}, S = (
|
|
3623
|
-
const { label: b, closable:
|
|
3622
|
+
}, S = (O) => {
|
|
3623
|
+
const { label: b, closable: A, onClose: _ } = O, R = (D) => {
|
|
3624
3624
|
D.preventDefault(), D.stopPropagation();
|
|
3625
3625
|
}, x = $n(b), F = Ps(x);
|
|
3626
3626
|
return /* @__PURE__ */ i(
|
|
@@ -3628,7 +3628,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3628
3628
|
{
|
|
3629
3629
|
color: x,
|
|
3630
3630
|
onMouseDown: R,
|
|
3631
|
-
closable:
|
|
3631
|
+
closable: A,
|
|
3632
3632
|
onClose: _,
|
|
3633
3633
|
closeIcon: /* @__PURE__ */ i("span", { style: { color: F.text }, children: "X" }),
|
|
3634
3634
|
children: b
|
|
@@ -3646,7 +3646,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3646
3646
|
options: s,
|
|
3647
3647
|
onChange: T,
|
|
3648
3648
|
loading: f,
|
|
3649
|
-
filterOption: (
|
|
3649
|
+
filterOption: (O, b) => b.label.toLowerCase().includes(O.toString())
|
|
3650
3650
|
}
|
|
3651
3651
|
) }) });
|
|
3652
3652
|
}, ku = (e) => {
|
|
@@ -3886,15 +3886,15 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3886
3886
|
}
|
|
3887
3887
|
);
|
|
3888
3888
|
async function y(b) {
|
|
3889
|
-
const { reportData:
|
|
3889
|
+
const { reportData: A, fields: _, values: R, context: x = {} } = b, {
|
|
3890
3890
|
context: F,
|
|
3891
3891
|
model: D,
|
|
3892
3892
|
datas: V = {},
|
|
3893
3893
|
report_name: N,
|
|
3894
|
-
type:
|
|
3895
|
-
} =
|
|
3896
|
-
if (
|
|
3897
|
-
dt(`${
|
|
3894
|
+
type: L
|
|
3895
|
+
} = A;
|
|
3896
|
+
if (L !== "ir.actions.report.xml") {
|
|
3897
|
+
dt(`${L} action not supported`);
|
|
3898
3898
|
return;
|
|
3899
3899
|
}
|
|
3900
3900
|
const { ids: B } = V || {}, G = B || [], $ = typeof F == "string" ? Nt({
|
|
@@ -3918,14 +3918,14 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3918
3918
|
}
|
|
3919
3919
|
}
|
|
3920
3920
|
async function v(b) {
|
|
3921
|
-
let
|
|
3921
|
+
let A;
|
|
3922
3922
|
try {
|
|
3923
|
-
if (
|
|
3923
|
+
if (A = await k.getHandler().getReport({
|
|
3924
3924
|
id: b
|
|
3925
|
-
}),
|
|
3925
|
+
}), A.state && a.current === !0) {
|
|
3926
3926
|
a.current = !1, clearInterval(o.current), l(!1);
|
|
3927
|
-
const _ = await un(
|
|
3928
|
-
wr(
|
|
3927
|
+
const _ = await un(A.result);
|
|
3928
|
+
wr(A.result, _.mime);
|
|
3929
3929
|
}
|
|
3930
3930
|
} catch (_) {
|
|
3931
3931
|
a.current = !1, clearInterval(o.current), l(!1), dt(_.exception || _);
|
|
@@ -3933,7 +3933,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3933
3933
|
}
|
|
3934
3934
|
async function w({
|
|
3935
3935
|
actionData: b,
|
|
3936
|
-
fields:
|
|
3936
|
+
fields: A,
|
|
3937
3937
|
values: _,
|
|
3938
3938
|
context: R,
|
|
3939
3939
|
onRefreshParentValues: x
|
|
@@ -3942,12 +3942,12 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3942
3942
|
if (x && f.current.push(x), F === "ir.actions.report.xml")
|
|
3943
3943
|
return await y({
|
|
3944
3944
|
reportData: b,
|
|
3945
|
-
fields:
|
|
3945
|
+
fields: A,
|
|
3946
3946
|
values: _,
|
|
3947
3947
|
context: R
|
|
3948
3948
|
});
|
|
3949
3949
|
if (F === "ir.actions.act_window")
|
|
3950
|
-
return await I({ actionData: b, fields:
|
|
3950
|
+
return await I({ actionData: b, fields: A, values: _, context: R });
|
|
3951
3951
|
if (F === "ir.actions.act_url")
|
|
3952
3952
|
window.open(
|
|
3953
3953
|
kd(b.url, { ..._, context: R }),
|
|
@@ -3958,7 +3958,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3958
3958
|
}
|
|
3959
3959
|
async function I({
|
|
3960
3960
|
actionData: b,
|
|
3961
|
-
fields:
|
|
3961
|
+
fields: A = {},
|
|
3962
3962
|
values: _ = {},
|
|
3963
3963
|
context: R = {}
|
|
3964
3964
|
}) {
|
|
@@ -3971,21 +3971,21 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3971
3971
|
}))[0]);
|
|
3972
3972
|
const F = x.context, D = typeof (x == null ? void 0 : x.context) == "string" ? Nt({
|
|
3973
3973
|
context: x.context,
|
|
3974
|
-
fields:
|
|
3974
|
+
fields: A,
|
|
3975
3975
|
values: { ..._, ...r }
|
|
3976
3976
|
}) : (x == null ? void 0 : x.context) || {}, V = {
|
|
3977
3977
|
...R,
|
|
3978
3978
|
...D
|
|
3979
3979
|
};
|
|
3980
3980
|
let N = [];
|
|
3981
|
-
const
|
|
3981
|
+
const L = x.domain;
|
|
3982
3982
|
if (x.domain && (N = await k.getHandler().evalDomain({
|
|
3983
3983
|
domain: x.domain,
|
|
3984
3984
|
values: Qt({
|
|
3985
|
-
fields:
|
|
3985
|
+
fields: A,
|
|
3986
3986
|
values: { ..._, ...r }
|
|
3987
3987
|
}),
|
|
3988
|
-
fields:
|
|
3988
|
+
fields: A,
|
|
3989
3989
|
context: V
|
|
3990
3990
|
})), x.target === "new") {
|
|
3991
3991
|
const G = await k.getHandler().getView({
|
|
@@ -4020,8 +4020,8 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
4020
4020
|
res_id: x.res_id,
|
|
4021
4021
|
actionRawData: {
|
|
4022
4022
|
context: F,
|
|
4023
|
-
domain:
|
|
4024
|
-
fields:
|
|
4023
|
+
domain: L,
|
|
4024
|
+
fields: A,
|
|
4025
4025
|
values: _
|
|
4026
4026
|
}
|
|
4027
4027
|
}), { closeParent: !0 };
|
|
@@ -4029,16 +4029,16 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
4029
4029
|
}
|
|
4030
4030
|
function T({
|
|
4031
4031
|
domain: b,
|
|
4032
|
-
model:
|
|
4032
|
+
model: A,
|
|
4033
4033
|
formView: _,
|
|
4034
4034
|
context: R,
|
|
4035
4035
|
actionData: x
|
|
4036
4036
|
}) {
|
|
4037
|
-
m ? S({ domain: b, model:
|
|
4037
|
+
m ? S({ domain: b, model: A, formView: _, context: R, actionData: x }) : (g({ domain: b, model: A, context: R, formView: _, actionData: x }), h(!0));
|
|
4038
4038
|
}
|
|
4039
4039
|
async function S({
|
|
4040
4040
|
domain: b,
|
|
4041
|
-
model:
|
|
4041
|
+
model: A,
|
|
4042
4042
|
formView: _,
|
|
4043
4043
|
context: R,
|
|
4044
4044
|
actionData: x
|
|
@@ -4049,9 +4049,9 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
4049
4049
|
context: {},
|
|
4050
4050
|
formView: void 0,
|
|
4051
4051
|
actionData: void 0
|
|
4052
|
-
}), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model:
|
|
4052
|
+
}), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model: A, context: R, formView: _, actionData: x }), h(!0);
|
|
4053
4053
|
}
|
|
4054
|
-
async function
|
|
4054
|
+
async function O() {
|
|
4055
4055
|
fi(f.current), f.current = [], h(!1), g({
|
|
4056
4056
|
domain: void 0,
|
|
4057
4057
|
model: void 0,
|
|
@@ -4090,7 +4090,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
4090
4090
|
model: p.model,
|
|
4091
4091
|
formView: p.formView,
|
|
4092
4092
|
visible: m,
|
|
4093
|
-
onSubmitSucceed:
|
|
4093
|
+
onSubmitSucceed: O,
|
|
4094
4094
|
onCancel: () => {
|
|
4095
4095
|
fi(f.current), f.current = [], h(!1), g({
|
|
4096
4096
|
domain: void 0,
|
|
@@ -4253,10 +4253,10 @@ function tf(e, t) {
|
|
|
4253
4253
|
visible: I = !0,
|
|
4254
4254
|
rootForm: T = !1,
|
|
4255
4255
|
defaultValues: S,
|
|
4256
|
-
forcedValues:
|
|
4256
|
+
forcedValues: O = {},
|
|
4257
4257
|
parentWidth: b,
|
|
4258
|
-
onMustRefreshParent:
|
|
4259
|
-
} = e, { t: _ } = de(), [R, x] = C(!1), [F, D] = C(), [V, N] = C(), [
|
|
4258
|
+
onMustRefreshParent: A
|
|
4259
|
+
} = e, { t: _ } = de(), [R, x] = C(!1), [F, D] = C(), [V, N] = C(), [L] = Ct.useForm(), [B, G] = C(), [$, K] = C(), Z = ee(Ys), [J, Q] = C(), [Ce, me] = C(!1), H = Y(), j = Y({}), q = Y({}), ie = Y(!1), te = Y(!1), M = Y(!1), oe = (b !== void 0 ? b : J) < ef, we = ee(Ue), { activeId: ge, getPlainValues: Pe } = we || {}, Be = Y(!1), We = ee(
|
|
4260
4260
|
mt
|
|
4261
4261
|
), {
|
|
4262
4262
|
setFormIsSaving: Ee = void 0,
|
|
@@ -4295,9 +4295,9 @@ function tf(e, t) {
|
|
|
4295
4295
|
}), me(!1));
|
|
4296
4296
|
}, [Ce]);
|
|
4297
4297
|
const ye = (U, W, ae, ce) => {
|
|
4298
|
-
ue == null || ue(!1), Ee == null || Ee(!1), a == null || a(U, W, ae, ce), Te == null || Te(U), Be.current && (
|
|
4298
|
+
ue == null || ue(!1), Ee == null || Ee(!1), a == null || a(U, W, ae, ce), Te == null || Te(U), Be.current && (A == null || A());
|
|
4299
4299
|
}, Me = () => {
|
|
4300
|
-
Be.current && (
|
|
4300
|
+
Be.current && (A == null || A()), Ee == null || Ee(!1), o == null || o();
|
|
4301
4301
|
}, Ze = (U) => {
|
|
4302
4302
|
Ee == null || Ee(!1), u == null || u(U);
|
|
4303
4303
|
}, be = E(() => r || H.current, [r]), [pt, Rt] = C(() => H.current);
|
|
@@ -4360,23 +4360,23 @@ function tf(e, t) {
|
|
|
4360
4360
|
})
|
|
4361
4361
|
).length !== 0, De = E(
|
|
4362
4362
|
(U) => {
|
|
4363
|
-
const W =
|
|
4363
|
+
const W = L.getFieldsValue(!0);
|
|
4364
4364
|
return nn(W, U);
|
|
4365
4365
|
},
|
|
4366
|
-
[
|
|
4366
|
+
[L]
|
|
4367
4367
|
), gt = (U, W) => {
|
|
4368
4368
|
qe({
|
|
4369
4369
|
values: {
|
|
4370
|
-
...nn(
|
|
4370
|
+
...nn(L.getFieldsValue(!0), $),
|
|
4371
4371
|
[U]: W
|
|
4372
4372
|
},
|
|
4373
4373
|
fields: $,
|
|
4374
4374
|
reset: !1
|
|
4375
4375
|
});
|
|
4376
|
-
}, Ut = (U) =>
|
|
4376
|
+
}, Ut = (U) => L.getFieldsValue(!0)[U];
|
|
4377
4377
|
async function Wn() {
|
|
4378
4378
|
try {
|
|
4379
|
-
return await
|
|
4379
|
+
return await L.validateFields(), !1;
|
|
4380
4380
|
} catch {
|
|
4381
4381
|
return In.error(_("fillRequiredFields")), !0;
|
|
4382
4382
|
}
|
|
@@ -4435,14 +4435,14 @@ function tf(e, t) {
|
|
|
4435
4435
|
reset: ae,
|
|
4436
4436
|
isDefaultGet: ce = !1
|
|
4437
4437
|
}) => {
|
|
4438
|
-
const tt = { ...ae ? {} :
|
|
4438
|
+
const tt = { ...ae ? {} : L.getFieldsValue(!0), ...U }, _r = nn(tt, W), fl = Object.keys(W).map((Fr) => ({
|
|
4439
4439
|
name: Fr,
|
|
4440
4440
|
touched: !1,
|
|
4441
4441
|
value: _r[Fr] !== void 0 ? _r[Fr] : void 0
|
|
4442
4442
|
}));
|
|
4443
|
-
ce || (q.current = _r),
|
|
4443
|
+
ce || (q.current = _r), L.setFields(fl);
|
|
4444
4444
|
},
|
|
4445
|
-
[
|
|
4445
|
+
[L]
|
|
4446
4446
|
), lt = async ({
|
|
4447
4447
|
fields: U,
|
|
4448
4448
|
arch: W
|
|
@@ -4485,7 +4485,7 @@ function tf(e, t) {
|
|
|
4485
4485
|
await k.getHandler().update({
|
|
4486
4486
|
model: n,
|
|
4487
4487
|
id: be(),
|
|
4488
|
-
values: { ...ae, ...
|
|
4488
|
+
values: { ...ae, ...O },
|
|
4489
4489
|
fields: $,
|
|
4490
4490
|
context: {
|
|
4491
4491
|
...v,
|
|
@@ -4495,7 +4495,7 @@ function tf(e, t) {
|
|
|
4495
4495
|
} else {
|
|
4496
4496
|
const ae = De($), ce = await k.getHandler().create({
|
|
4497
4497
|
model: n,
|
|
4498
|
-
values: { ...ae, ...
|
|
4498
|
+
values: { ...ae, ...O },
|
|
4499
4499
|
fields: $,
|
|
4500
4500
|
context: {
|
|
4501
4501
|
...v,
|
|
@@ -4511,13 +4511,13 @@ function tf(e, t) {
|
|
|
4511
4511
|
}, Pt = async (U) => {
|
|
4512
4512
|
let W = !1;
|
|
4513
4513
|
const { callOnSubmitSucceed: ae = !0 } = U || {};
|
|
4514
|
-
if (te.current = !0, D(void 0),
|
|
4514
|
+
if (te.current = !0, D(void 0), M.current && !ot() && be() && ae) {
|
|
4515
4515
|
te.current = !1, ue == null || ue(!1), ye == null || ye(
|
|
4516
4516
|
be(),
|
|
4517
4517
|
Se(),
|
|
4518
4518
|
Ae(),
|
|
4519
|
-
|
|
4520
|
-
),
|
|
4519
|
+
M.current
|
|
4520
|
+
), M.current = !1;
|
|
4521
4521
|
const ce = be();
|
|
4522
4522
|
return d && (H.current = void 0, qe({ values: {}, fields: $, reset: !0 })), { succeed: !0, id: ce };
|
|
4523
4523
|
}
|
|
@@ -4596,7 +4596,7 @@ function tf(e, t) {
|
|
|
4596
4596
|
"many2one"
|
|
4597
4597
|
]
|
|
4598
4598
|
}) && U !== !0)) {
|
|
4599
|
-
const ce = nn(
|
|
4599
|
+
const ce = nn(L.getFieldsValue(!0), $);
|
|
4600
4600
|
q.current = ce, c == null || c(ce), ue == null || ue(!0), ct(ae);
|
|
4601
4601
|
}
|
|
4602
4602
|
}, Tr = mc(Zt, 100), ct = async (U) => {
|
|
@@ -4791,8 +4791,8 @@ function tf(e, t) {
|
|
|
4791
4791
|
}
|
|
4792
4792
|
let ce = !1;
|
|
4793
4793
|
try {
|
|
4794
|
-
!f && (ot() || be() === void 0) && (ce = !0, Or(!0), m === "2many" ? (await St({ callOnSubmitSucceed: !1 }),
|
|
4795
|
-
const Oe =
|
|
4794
|
+
!f && (ot() || be() === void 0) && (ce = !0, Or(!0), m === "2many" ? (await St({ callOnSubmitSucceed: !1 }), M.current = !0) : await Pt({ callOnSubmitSucceed: !1 }));
|
|
4795
|
+
const Oe = M.current ? ht() : {}, tt = { ...ae, ...Oe };
|
|
4796
4796
|
U === "object" ? await Ar({ action: W, context: tt }) : U === "workflow" ? await kt({ action: W }) : U === "action" && await sl({ action: W, context: tt }), ce && Or(!1);
|
|
4797
4797
|
} catch (Oe) {
|
|
4798
4798
|
ce && Or(!1), dt(Oe);
|
|
@@ -4819,7 +4819,7 @@ function tf(e, t) {
|
|
|
4819
4819
|
children: /* @__PURE__ */ i(
|
|
4820
4820
|
Ct,
|
|
4821
4821
|
{
|
|
4822
|
-
form:
|
|
4822
|
+
form: L,
|
|
4823
4823
|
onFieldsChange: () => {
|
|
4824
4824
|
Tr({ elementHasLostFocus: !1 });
|
|
4825
4825
|
},
|
|
@@ -4902,7 +4902,7 @@ const Sn = xt(tf), Cn = (e) => {
|
|
|
4902
4902
|
});
|
|
4903
4903
|
p(_ !== !1), _ !== !1 && y(_);
|
|
4904
4904
|
}
|
|
4905
|
-
async function
|
|
4905
|
+
async function O() {
|
|
4906
4906
|
if (h && g)
|
|
4907
4907
|
await k.getHandler().removeFavourite({
|
|
4908
4908
|
shortcut_id: g
|
|
@@ -4926,13 +4926,13 @@ const Sn = xt(tf), Cn = (e) => {
|
|
|
4926
4926
|
type: h ? "primary" : "default",
|
|
4927
4927
|
icon: h ? /* @__PURE__ */ i(Pl, { style: { color: "white" } }) : /* @__PURE__ */ i(kl, {}),
|
|
4928
4928
|
style: { width: 30 },
|
|
4929
|
-
onClick:
|
|
4929
|
+
onClick: O
|
|
4930
4930
|
}
|
|
4931
4931
|
) }),
|
|
4932
4932
|
/* @__PURE__ */ i(Ie, { style: { paddingLeft: 10 }, children: d })
|
|
4933
4933
|
] });
|
|
4934
4934
|
}
|
|
4935
|
-
const
|
|
4935
|
+
const A = f * 0.95;
|
|
4936
4936
|
return /* @__PURE__ */ i(Ku, { setTitle: m, children: /* @__PURE__ */ i(
|
|
4937
4937
|
yt,
|
|
4938
4938
|
{
|
|
@@ -4951,7 +4951,7 @@ const Sn = xt(tf), Cn = (e) => {
|
|
|
4951
4951
|
showFooter: !0,
|
|
4952
4952
|
insideButtonModal: o,
|
|
4953
4953
|
onCancel: a,
|
|
4954
|
-
parentWidth:
|
|
4954
|
+
parentWidth: A,
|
|
4955
4955
|
...c
|
|
4956
4956
|
},
|
|
4957
4957
|
`${u}-${n}-${v}-${w}-${I}-${T}-${r}`
|
|
@@ -5152,7 +5152,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
|
|
|
5152
5152
|
), y = E(() => {
|
|
5153
5153
|
h(), g();
|
|
5154
5154
|
}, [h, g]), v = E(async () => {
|
|
5155
|
-
var
|
|
5155
|
+
var O;
|
|
5156
5156
|
const I = await m({
|
|
5157
5157
|
model: n,
|
|
5158
5158
|
type: "form",
|
|
@@ -5161,12 +5161,12 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
|
|
|
5161
5161
|
a(I);
|
|
5162
5162
|
const T = lf(I);
|
|
5163
5163
|
let S = {};
|
|
5164
|
-
if (T.length > 0 && (S = { ...(
|
|
5164
|
+
if (T.length > 0 && (S = { ...(O = await p({
|
|
5165
5165
|
model: n,
|
|
5166
5166
|
ids: [t],
|
|
5167
5167
|
fieldsToRetrieve: T,
|
|
5168
5168
|
context: r
|
|
5169
|
-
})) == null ? void 0 :
|
|
5169
|
+
})) == null ? void 0 : O[0] }), S = { ...nn(S, T), active_id: t }, l(S), !(!I || !I.toolbar))
|
|
5170
5170
|
return {
|
|
5171
5171
|
actionItems: I.toolbar.action,
|
|
5172
5172
|
relateItems: I.toolbar.relate,
|
|
@@ -6237,29 +6237,29 @@ function Im(e, t, n) {
|
|
|
6237
6237
|
if (typeof e != "function")
|
|
6238
6238
|
throw new TypeError(dm);
|
|
6239
6239
|
t = vi(t) || 0, zr(n) && (f = !!n.leading, d = "maxWait" in n, a = d ? Cm(vi(n.maxWait) || 0, t) : a, m = "trailing" in n ? !!n.trailing : m);
|
|
6240
|
-
function h(
|
|
6241
|
-
var b = r,
|
|
6242
|
-
return r = o = void 0, u =
|
|
6240
|
+
function h(O) {
|
|
6241
|
+
var b = r, A = o;
|
|
6242
|
+
return r = o = void 0, u = O, s = e.apply(A, b), s;
|
|
6243
6243
|
}
|
|
6244
|
-
function p(
|
|
6245
|
-
return u =
|
|
6244
|
+
function p(O) {
|
|
6245
|
+
return u = O, l = setTimeout(v, t), f ? h(O) : s;
|
|
6246
6246
|
}
|
|
6247
|
-
function g(
|
|
6248
|
-
var b =
|
|
6249
|
-
return d ? xm(_, a -
|
|
6247
|
+
function g(O) {
|
|
6248
|
+
var b = O - c, A = O - u, _ = t - b;
|
|
6249
|
+
return d ? xm(_, a - A) : _;
|
|
6250
6250
|
}
|
|
6251
|
-
function y(
|
|
6252
|
-
var b =
|
|
6253
|
-
return c === void 0 || b >= t || b < 0 || d &&
|
|
6251
|
+
function y(O) {
|
|
6252
|
+
var b = O - c, A = O - u;
|
|
6253
|
+
return c === void 0 || b >= t || b < 0 || d && A >= a;
|
|
6254
6254
|
}
|
|
6255
6255
|
function v() {
|
|
6256
|
-
var
|
|
6257
|
-
if (y(
|
|
6258
|
-
return w(
|
|
6259
|
-
l = setTimeout(v, g(
|
|
6256
|
+
var O = Er();
|
|
6257
|
+
if (y(O))
|
|
6258
|
+
return w(O);
|
|
6259
|
+
l = setTimeout(v, g(O));
|
|
6260
6260
|
}
|
|
6261
|
-
function w(
|
|
6262
|
-
return l = void 0, m && r ? h(
|
|
6261
|
+
function w(O) {
|
|
6262
|
+
return l = void 0, m && r ? h(O) : (r = o = void 0, s);
|
|
6263
6263
|
}
|
|
6264
6264
|
function I() {
|
|
6265
6265
|
l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
|
|
@@ -6268,8 +6268,8 @@ function Im(e, t, n) {
|
|
|
6268
6268
|
return l === void 0 ? s : w(Er());
|
|
6269
6269
|
}
|
|
6270
6270
|
function S() {
|
|
6271
|
-
var
|
|
6272
|
-
if (r = arguments, o = this, c =
|
|
6271
|
+
var O = Er(), b = y(O);
|
|
6272
|
+
if (r = arguments, o = this, c = O, b) {
|
|
6273
6273
|
if (l === void 0)
|
|
6274
6274
|
return p(c);
|
|
6275
6275
|
if (d)
|
|
@@ -6388,11 +6388,11 @@ function Fm() {
|
|
|
6388
6388
|
for (var S = 0; S < h.length; ++S)
|
|
6389
6389
|
w.push(String(S));
|
|
6390
6390
|
else
|
|
6391
|
-
for (var
|
|
6392
|
-
!(I &&
|
|
6391
|
+
for (var O in h)
|
|
6392
|
+
!(I && O === "prototype") && t.call(h, O) && w.push(String(O));
|
|
6393
6393
|
if (a)
|
|
6394
|
-
for (var b = d(h),
|
|
6395
|
-
!(b && l[
|
|
6394
|
+
for (var b = d(h), A = 0; A < l.length; ++A)
|
|
6395
|
+
!(b && l[A] === "constructor") && t.call(h, l[A]) && w.push(l[A]);
|
|
6396
6396
|
return w;
|
|
6397
6397
|
};
|
|
6398
6398
|
}
|
|
@@ -7035,10 +7035,10 @@ const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
|
|
|
7035
7035
|
}, [a, o, n]);
|
|
7036
7036
|
const p = E(
|
|
7037
7037
|
(T) => {
|
|
7038
|
-
var
|
|
7038
|
+
var O;
|
|
7039
7039
|
const S = Jn(
|
|
7040
7040
|
T,
|
|
7041
|
-
(
|
|
7041
|
+
(O = l.current) == null ? void 0 : O._advancedSearchContainer
|
|
7042
7042
|
);
|
|
7043
7043
|
t({ params: S, values: or(T) });
|
|
7044
7044
|
},
|
|
@@ -7054,11 +7054,11 @@ const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
|
|
|
7054
7054
|
h([]);
|
|
7055
7055
|
return;
|
|
7056
7056
|
}
|
|
7057
|
-
const
|
|
7057
|
+
const O = Jn(
|
|
7058
7058
|
T,
|
|
7059
7059
|
(b = l.current) == null ? void 0 : b._advancedSearchContainer
|
|
7060
7060
|
);
|
|
7061
|
-
h(
|
|
7061
|
+
h(O);
|
|
7062
7062
|
},
|
|
7063
7063
|
[s]
|
|
7064
7064
|
), v = E(() => {
|
|
@@ -7199,20 +7199,20 @@ function Lo(e) {
|
|
|
7199
7199
|
searchError: d,
|
|
7200
7200
|
searchValues: m,
|
|
7201
7201
|
showLimitOptions: h = !0
|
|
7202
|
-
} = e, [p, g] = C(), [y, v] = C(), [w, I] = C(!1), T = Y(), { token: S } = fh(), [
|
|
7202
|
+
} = e, [p, g] = C(), [y, v] = C(), [w, I] = C(!1), T = Y(), { token: S } = fh(), [O] = Ct.useForm();
|
|
7203
7203
|
se(() => {
|
|
7204
|
-
|
|
7204
|
+
O.setFieldsValue(m);
|
|
7205
7205
|
}, [m]);
|
|
7206
7206
|
const b = () => {
|
|
7207
7207
|
if (!y)
|
|
7208
7208
|
return;
|
|
7209
7209
|
const x = w ? y : p, F = x == null ? void 0 : x.rows;
|
|
7210
|
-
return F == null ? void 0 : F.map((D, V) => /* @__PURE__ */ i(je, { children: D.map((N,
|
|
7210
|
+
return F == null ? void 0 : F.map((D, V) => /* @__PURE__ */ i(je, { children: D.map((N, L) => /* @__PURE__ */ i(Ie, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(ra, { field: N }) }, L)) }, V));
|
|
7211
7211
|
};
|
|
7212
7212
|
Ft(() => {
|
|
7213
7213
|
I(!1), T.current = new as(n, t), T.current.parse(), g(T.current._simpleSearchContainer), v(T.current._advancedSearchContainer);
|
|
7214
7214
|
}, [t, n]);
|
|
7215
|
-
const
|
|
7215
|
+
const A = b(), _ = (x) => {
|
|
7216
7216
|
var N;
|
|
7217
7217
|
const { limit: F, offset: D } = x;
|
|
7218
7218
|
delete x.offset, delete x.limit;
|
|
@@ -7247,11 +7247,11 @@ function Lo(e) {
|
|
|
7247
7247
|
{
|
|
7248
7248
|
className: "p-3 shadow-md",
|
|
7249
7249
|
style: { borderRadius: S.borderRadius },
|
|
7250
|
-
form:
|
|
7250
|
+
form: O,
|
|
7251
7251
|
onFinish: _,
|
|
7252
7252
|
initialValues: { offset: s, limit: l },
|
|
7253
7253
|
children: [
|
|
7254
|
-
|
|
7254
|
+
A,
|
|
7255
7255
|
w && h && /* @__PURE__ */ i(uh, { onLimitChange: c }),
|
|
7256
7256
|
/* @__PURE__ */ i(
|
|
7257
7257
|
dh,
|
|
@@ -7262,7 +7262,7 @@ function Lo(e) {
|
|
|
7262
7262
|
I(!w);
|
|
7263
7263
|
},
|
|
7264
7264
|
onClear: () => {
|
|
7265
|
-
|
|
7265
|
+
O.resetFields(), r();
|
|
7266
7266
|
},
|
|
7267
7267
|
isSearching: a
|
|
7268
7268
|
}
|
|
@@ -7287,7 +7287,7 @@ function Lo(e) {
|
|
|
7287
7287
|
function mh({
|
|
7288
7288
|
useLocalState: e = !1
|
|
7289
7289
|
}) {
|
|
7290
|
-
const t = bu() && !e, n = Ln(), [r, o] = C(!1), [a, s] = C(!1), [l, c] = C([]), [u, f] = C(0), [d, m] = C([]), [h, p] = C({}), [g, y] = C(), [v, w] = C([]), [I, T] = C(), [S,
|
|
7290
|
+
const t = bu() && !e, n = Ln(), [r, o] = C(!1), [a, s] = C(!1), [l, c] = C([]), [u, f] = C(0), [d, m] = C([]), [h, p] = C({}), [g, y] = C(), [v, w] = C([]), [I, T] = C(), [S, O] = C(0), [b, A] = C();
|
|
7291
7291
|
return t ? {
|
|
7292
7292
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
7293
7293
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -7343,10 +7343,10 @@ function mh({
|
|
|
7343
7343
|
searchQuery: I,
|
|
7344
7344
|
setSearchQuery: T,
|
|
7345
7345
|
totalItems: S,
|
|
7346
|
-
setTotalItems:
|
|
7346
|
+
setTotalItems: O,
|
|
7347
7347
|
isActive: void 0,
|
|
7348
7348
|
sortState: b,
|
|
7349
|
-
setSortState:
|
|
7349
|
+
setSortState: A
|
|
7350
7350
|
};
|
|
7351
7351
|
}
|
|
7352
7352
|
const ph = 3 * 1e3, hh = (e) => {
|
|
@@ -7420,8 +7420,8 @@ function vh(e, t) {
|
|
|
7420
7420
|
onChangeSelectedRowKeys: f,
|
|
7421
7421
|
nameSearch: d,
|
|
7422
7422
|
filterType: m = "side"
|
|
7423
|
-
} = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, T] = C(!0), [S,
|
|
7424
|
-
elementRef:
|
|
7423
|
+
} = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, T] = C(!0), [S, O] = C(), { t: b } = de(), A = Y(null), _ = Df({
|
|
7424
|
+
elementRef: A,
|
|
7425
7425
|
offset: gh
|
|
7426
7426
|
}), { treeView: R, formView: x, loading: F } = zs({
|
|
7427
7427
|
model: n,
|
|
@@ -7432,7 +7432,7 @@ function vh(e, t) {
|
|
|
7432
7432
|
setTreeIsLoading: D,
|
|
7433
7433
|
searchVisible: V,
|
|
7434
7434
|
setSearchVisible: N,
|
|
7435
|
-
setSelectedRowItems:
|
|
7435
|
+
setSelectedRowItems: L,
|
|
7436
7436
|
setTreeFirstVisibleRow: B,
|
|
7437
7437
|
treeFirstVisibleRow: G,
|
|
7438
7438
|
selectedRowItems: $,
|
|
@@ -7447,7 +7447,7 @@ function vh(e, t) {
|
|
|
7447
7447
|
setSearchQuery: q,
|
|
7448
7448
|
setTotalItems: ie,
|
|
7449
7449
|
isActive: te,
|
|
7450
|
-
sortState:
|
|
7450
|
+
sortState: M,
|
|
7451
7451
|
setSortState: ne
|
|
7452
7452
|
} = mh({ useLocalState: !c }), oe = d || Ce, we = Y(oe);
|
|
7453
7453
|
se(() => {
|
|
@@ -7494,7 +7494,7 @@ function vh(e, t) {
|
|
|
7494
7494
|
const Ye = `${JSON.stringify(oe ? s : Te)}-${oe}`;
|
|
7495
7495
|
return Ye !== ht.current ? (ht.current = Ye, !0) : !1;
|
|
7496
7496
|
}, [s, Te, oe]), Ne = E(async () => {
|
|
7497
|
-
|
|
7497
|
+
O(void 0), ie(0), T(!0);
|
|
7498
7498
|
try {
|
|
7499
7499
|
const ve = await k.getHandler().searchCount({
|
|
7500
7500
|
params: oe ? s : Te,
|
|
@@ -7502,7 +7502,7 @@ function vh(e, t) {
|
|
|
7502
7502
|
context: u,
|
|
7503
7503
|
name_search: oe
|
|
7504
7504
|
});
|
|
7505
|
-
|
|
7505
|
+
O(ve), ie(ve);
|
|
7506
7506
|
} catch (ve) {
|
|
7507
7507
|
w(ve);
|
|
7508
7508
|
} finally {
|
|
@@ -7527,10 +7527,10 @@ function vh(e, t) {
|
|
|
7527
7527
|
const lt = {};
|
|
7528
7528
|
ge.colors && (lt.colors = ge.colors), ge.status && (lt.status = ge.status);
|
|
7529
7529
|
let St;
|
|
7530
|
-
if (!v.current &&
|
|
7530
|
+
if (!v.current && M) {
|
|
7531
7531
|
v.current = !0;
|
|
7532
7532
|
const ct = Gr({
|
|
7533
|
-
state:
|
|
7533
|
+
state: M
|
|
7534
7534
|
});
|
|
7535
7535
|
St = Yr(ct);
|
|
7536
7536
|
} else {
|
|
@@ -7567,7 +7567,7 @@ function vh(e, t) {
|
|
|
7567
7567
|
H == null || H(ct);
|
|
7568
7568
|
}
|
|
7569
7569
|
if (Ot.current = St, Pt.length === 0)
|
|
7570
|
-
return y.current = [],
|
|
7570
|
+
return y.current = [], O(0), ie(0), [];
|
|
7571
7571
|
const Zt = br(ge, Pt), Tr = fn(Xt);
|
|
7572
7572
|
if (h.current = {
|
|
7573
7573
|
...h.current,
|
|
@@ -7583,7 +7583,7 @@ function vh(e, t) {
|
|
|
7583
7583
|
},
|
|
7584
7584
|
[
|
|
7585
7585
|
j,
|
|
7586
|
-
|
|
7586
|
+
M,
|
|
7587
7587
|
s,
|
|
7588
7588
|
Te,
|
|
7589
7589
|
n,
|
|
@@ -7599,14 +7599,14 @@ function vh(e, t) {
|
|
|
7599
7599
|
]
|
|
7600
7600
|
), pe = E(
|
|
7601
7601
|
(ve) => {
|
|
7602
|
-
|
|
7602
|
+
L == null || L(ve), f == null || f(ve.map((Ye) => Ye.id));
|
|
7603
7603
|
},
|
|
7604
|
-
[f,
|
|
7604
|
+
[f, L]
|
|
7605
7605
|
), _e = E(
|
|
7606
7606
|
(ve) => {
|
|
7607
|
-
|
|
7607
|
+
L == null || L(ve.map((Ye) => ({ id: Ye }))), f == null || f(ve);
|
|
7608
7608
|
},
|
|
7609
|
-
[f,
|
|
7609
|
+
[f, L]
|
|
7610
7610
|
), Ge = E(
|
|
7611
7611
|
async ({
|
|
7612
7612
|
startRow: ve,
|
|
@@ -7620,7 +7620,7 @@ function vh(e, t) {
|
|
|
7620
7620
|
state: qe
|
|
7621
7621
|
});
|
|
7622
7622
|
} catch (lt) {
|
|
7623
|
-
throw console.error(lt),
|
|
7623
|
+
throw console.error(lt), O(null), ie(0), w(lt), lt;
|
|
7624
7624
|
} finally {
|
|
7625
7625
|
D == null || D(!1);
|
|
7626
7626
|
}
|
|
@@ -7665,7 +7665,7 @@ function vh(e, t) {
|
|
|
7665
7665
|
),
|
|
7666
7666
|
t: b,
|
|
7667
7667
|
onOk: Ye
|
|
7668
|
-
}) : Ye() :
|
|
7668
|
+
}) : Ye() : L([]);
|
|
7669
7669
|
}, [
|
|
7670
7670
|
pe,
|
|
7671
7671
|
s,
|
|
@@ -7674,7 +7674,7 @@ function vh(e, t) {
|
|
|
7674
7674
|
oe,
|
|
7675
7675
|
u,
|
|
7676
7676
|
$ == null ? void 0 : $.length,
|
|
7677
|
-
|
|
7677
|
+
L,
|
|
7678
7678
|
b,
|
|
7679
7679
|
S
|
|
7680
7680
|
]), pt = E(() => G, [G]), Rt = X(() => Ze ? /* @__PURE__ */ i(na, { aggregates: Me, isLoading: ye }) : null, [Me, ye, Ze]), re = E((ve) => /* @__PURE__ */ i(cr, { color: ve, style: { marginLeft: 7 } }), []), he = E(
|
|
@@ -7711,10 +7711,10 @@ function vh(e, t) {
|
|
|
7711
7711
|
statusComponent: re,
|
|
7712
7712
|
onRowStatus: he,
|
|
7713
7713
|
strings: Se,
|
|
7714
|
-
initialSortState:
|
|
7714
|
+
initialSortState: M
|
|
7715
7715
|
}
|
|
7716
7716
|
), [
|
|
7717
|
-
|
|
7717
|
+
M,
|
|
7718
7718
|
_,
|
|
7719
7719
|
_e,
|
|
7720
7720
|
Pe,
|
|
@@ -7856,7 +7856,7 @@ function vh(e, t) {
|
|
|
7856
7856
|
totalRows: S
|
|
7857
7857
|
}
|
|
7858
7858
|
),
|
|
7859
|
-
/* @__PURE__ */ i("div", { ref:
|
|
7859
|
+
/* @__PURE__ */ i("div", { ref: A, style: ot, children: F || We || I ? /* @__PURE__ */ i(Ke, {}) : Fe })
|
|
7860
7860
|
] });
|
|
7861
7861
|
}
|
|
7862
7862
|
const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
@@ -7943,11 +7943,11 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
7943
7943
|
childField: I,
|
|
7944
7944
|
rootTree: T = !1,
|
|
7945
7945
|
context: S,
|
|
7946
|
-
readonly:
|
|
7946
|
+
readonly: O,
|
|
7947
7947
|
onSelectAllRecords: b
|
|
7948
|
-
} = e,
|
|
7948
|
+
} = e, A = Y(null), [_, R] = C([]), x = Y(!1), [F, D] = C(), { t: V } = de(), N = Y(r), L = ee(
|
|
7949
7949
|
mt
|
|
7950
|
-
), { title: B = void 0, setTitle: G = void 0 } = (T ?
|
|
7950
|
+
), { title: B = void 0, setTitle: G = void 0 } = (T ? L : {}) || {}, $ = X(() => {
|
|
7951
7951
|
if (F)
|
|
7952
7952
|
return Ao(
|
|
7953
7953
|
F,
|
|
@@ -7960,7 +7960,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
7960
7960
|
Tt(t, () => ({
|
|
7961
7961
|
unselectAll: () => {
|
|
7962
7962
|
var q;
|
|
7963
|
-
(q =
|
|
7963
|
+
(q = A.current) == null || q.unselectAll();
|
|
7964
7964
|
}
|
|
7965
7965
|
})), se(() => {
|
|
7966
7966
|
const q = Mt(a);
|
|
@@ -8017,13 +8017,13 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
8017
8017
|
]), Ce = X(() => {
|
|
8018
8018
|
if (!F)
|
|
8019
8019
|
return null;
|
|
8020
|
-
const q = F.columns.filter((
|
|
8020
|
+
const q = F.columns.filter((M) => M.sum !== void 0).map((M) => ({ label: M.sum, field: M.id }));
|
|
8021
8021
|
if (!q || q.length === 0)
|
|
8022
8022
|
return null;
|
|
8023
|
-
const ie = [], te = (d == null ? void 0 : d.length) > 0 ? _.filter((
|
|
8024
|
-
return q.forEach((
|
|
8025
|
-
const ne = te.reduce((oe, we) => we[
|
|
8026
|
-
ie.push(`${
|
|
8023
|
+
const ie = [], te = (d == null ? void 0 : d.length) > 0 ? _.filter((M) => d.includes(M.id)) : _;
|
|
8024
|
+
return q.forEach((M) => {
|
|
8025
|
+
const ne = te.reduce((oe, we) => we[M.field] && !isNaN(we[M.field]) ? oe + we[M.field] : oe, 0);
|
|
8026
|
+
ie.push(`${M.label}: ${Math.round(ne * 100) / 100}`);
|
|
8027
8027
|
}), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ie.join(", ") });
|
|
8028
8028
|
}, [_, d, F]), me = X(() => {
|
|
8029
8029
|
if (F !== null && $ && $.length > 0)
|
|
@@ -8034,7 +8034,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
8034
8034
|
/* @__PURE__ */ i(
|
|
8035
8035
|
wc,
|
|
8036
8036
|
{
|
|
8037
|
-
ref:
|
|
8037
|
+
ref: A,
|
|
8038
8038
|
height: H,
|
|
8039
8039
|
columns: me.columns,
|
|
8040
8040
|
dataSource: _,
|
|
@@ -8052,7 +8052,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
8052
8052
|
onRowSelectionChange: m,
|
|
8053
8053
|
onChangeSort: y,
|
|
8054
8054
|
sorter: v,
|
|
8055
|
-
readonly:
|
|
8055
|
+
readonly: O,
|
|
8056
8056
|
expandableOpts: w ? {
|
|
8057
8057
|
expandIcon: Nl,
|
|
8058
8058
|
collapseIcon: Ml,
|
|
@@ -8091,15 +8091,15 @@ const Ea = (e) => {
|
|
|
8091
8091
|
currentId: I,
|
|
8092
8092
|
limit: T,
|
|
8093
8093
|
setLimit: S,
|
|
8094
|
-
searchParams:
|
|
8094
|
+
searchParams: O = [],
|
|
8095
8095
|
setSearchValues: b,
|
|
8096
|
-
clearSelection:
|
|
8097
|
-
} = e, [_, R] = C(!1), [x, F] = C(!1), [D, V] = C(), [N,
|
|
8096
|
+
clearSelection: A
|
|
8097
|
+
} = e, [_, R] = C(!1), [x, F] = C(!1), [D, V] = C(), [N, L] = C(1), [B, G] = C(0), [$, K] = C(), [Z, J] = C([]), [Q, Ce] = C(void 0), [me, H] = C(void 0), j = Y(T || jt), q = Y([]), ie = E(
|
|
8098
8098
|
(ue) => {
|
|
8099
8099
|
y == null || y([...ue]), J([...ue]);
|
|
8100
8100
|
},
|
|
8101
8101
|
[y]
|
|
8102
|
-
), te = E(() => v || Z, [v, Z]),
|
|
8102
|
+
), te = E(() => v || Z, [v, Z]), M = E(async () => {
|
|
8103
8103
|
const ue = await k.getHandler().nameSearch({
|
|
8104
8104
|
model: t,
|
|
8105
8105
|
payload: l,
|
|
@@ -8142,7 +8142,7 @@ const Ea = (e) => {
|
|
|
8142
8142
|
f
|
|
8143
8143
|
]), ne = E(
|
|
8144
8144
|
async (ue) => {
|
|
8145
|
-
const { params: Te, newOffset: xe } = ue || {}, Ne = mn(Te ||
|
|
8145
|
+
const { params: Te, newOffset: xe } = ue || {}, Ne = mn(Te || O, w), { colors: z, status: pe } = Mt(d), _e = {};
|
|
8146
8146
|
z && (_e.colors = z), pe && (_e.status = pe);
|
|
8147
8147
|
const { totalItems: Ge, results: ke, attrsEvaluated: fe } = await k.getHandler().searchForTree({
|
|
8148
8148
|
params: Ne,
|
|
@@ -8183,12 +8183,12 @@ const Ea = (e) => {
|
|
|
8183
8183
|
h,
|
|
8184
8184
|
f,
|
|
8185
8185
|
B,
|
|
8186
|
-
|
|
8186
|
+
O
|
|
8187
8187
|
]
|
|
8188
8188
|
), oe = E(
|
|
8189
8189
|
async (ue) => {
|
|
8190
8190
|
try {
|
|
8191
|
-
R(!0), s == null || s(!0), l && !c.current ? await
|
|
8191
|
+
R(!0), s == null || s(!0), l && !c.current ? await M() : await ne(ue), A == null || A();
|
|
8192
8192
|
} catch (Te) {
|
|
8193
8193
|
V(typeof Te == "string" ? Te : Te.message), R(!1);
|
|
8194
8194
|
} finally {
|
|
@@ -8196,9 +8196,9 @@ const Ea = (e) => {
|
|
|
8196
8196
|
}
|
|
8197
8197
|
},
|
|
8198
8198
|
[
|
|
8199
|
-
|
|
8199
|
+
A,
|
|
8200
8200
|
l,
|
|
8201
|
-
|
|
8201
|
+
M,
|
|
8202
8202
|
c,
|
|
8203
8203
|
ne,
|
|
8204
8204
|
r,
|
|
@@ -8227,7 +8227,7 @@ const Ea = (e) => {
|
|
|
8227
8227
|
), ge = E(
|
|
8228
8228
|
(ue) => {
|
|
8229
8229
|
const { params: Te, searchValues: xe, limit: Ne, offset: z } = ue;
|
|
8230
|
-
_ || (n == null || n(void 0), r == null || r([]), b == null || b(xe), o == null || o(Te), a == null || a(!1), F(!0), V(void 0),
|
|
8230
|
+
_ || (n == null || n(void 0), r == null || r([]), b == null || b(xe), o == null || o(Te), a == null || a(!1), F(!0), V(void 0), L(1), Ne && (j.current = Ne, S == null || S(Ne)), z && G(z), oe({
|
|
8231
8231
|
params: Te,
|
|
8232
8232
|
newOffset: z
|
|
8233
8233
|
}));
|
|
@@ -8244,11 +8244,11 @@ const Ea = (e) => {
|
|
|
8244
8244
|
]
|
|
8245
8245
|
), Pe = E(
|
|
8246
8246
|
(ue) => {
|
|
8247
|
-
R(!0),
|
|
8247
|
+
R(!0), L(ue), G((ue - 1) * T);
|
|
8248
8248
|
},
|
|
8249
|
-
[R, T, G,
|
|
8249
|
+
[R, T, G, L]
|
|
8250
8250
|
), Be = E(() => {
|
|
8251
|
-
_ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0),
|
|
8251
|
+
_ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0), L(1), S == null || S(T || jt));
|
|
8252
8252
|
}, [
|
|
8253
8253
|
_,
|
|
8254
8254
|
n,
|
|
@@ -8268,11 +8268,11 @@ const Ea = (e) => {
|
|
|
8268
8268
|
},
|
|
8269
8269
|
[d, t, u, te, ie]
|
|
8270
8270
|
), Ee = E(async () => await k.getHandler().searchAllIds({
|
|
8271
|
-
params: mn(
|
|
8271
|
+
params: mn(O, w),
|
|
8272
8272
|
model: t,
|
|
8273
8273
|
context: u,
|
|
8274
8274
|
totalItems: $
|
|
8275
|
-
}), [t, u, $,
|
|
8275
|
+
}), [t, u, $, O, w]);
|
|
8276
8276
|
return {
|
|
8277
8277
|
submit: ge,
|
|
8278
8278
|
clear: Be,
|
|
@@ -8307,9 +8307,9 @@ function Ch(e, t) {
|
|
|
8307
8307
|
rootTree: f = !1,
|
|
8308
8308
|
parentContext: d = {},
|
|
8309
8309
|
onChangeSelectedRowKeys: m
|
|
8310
|
-
} = e, [h, p] = C(!1), [g, y] = C(!1), v = Y(!1), w = Y(null), [I, T] = C(), [S,
|
|
8310
|
+
} = e, [h, p] = C(!1), [g, y] = C(!1), v = Y(!1), w = Y(null), [I, T] = C(), [S, O] = C(), [b, A] = C(), [_, R] = C(), [x, F] = C(200), D = Y(), { height: V } = yr(), N = ee(
|
|
8311
8311
|
bn
|
|
8312
|
-
), { processAction:
|
|
8312
|
+
), { processAction: L } = N || {}, B = ee(
|
|
8313
8313
|
mt
|
|
8314
8314
|
), {
|
|
8315
8315
|
setResults: G = void 0,
|
|
@@ -8325,7 +8325,7 @@ function Ch(e, t) {
|
|
|
8325
8325
|
sorter: q = void 0,
|
|
8326
8326
|
setSorter: ie = void 0,
|
|
8327
8327
|
setTotalItems: te = void 0,
|
|
8328
|
-
setSearchTreeNameSearch:
|
|
8328
|
+
setSearchTreeNameSearch: M = void 0,
|
|
8329
8329
|
setTreeIsLoading: ne = void 0,
|
|
8330
8330
|
searchValues: oe = {},
|
|
8331
8331
|
setSearchValues: we = void 0,
|
|
@@ -8356,7 +8356,7 @@ function Ch(e, t) {
|
|
|
8356
8356
|
getAllIds: pt
|
|
8357
8357
|
} = Ea({
|
|
8358
8358
|
model: I,
|
|
8359
|
-
setSearchTreeNameSearch:
|
|
8359
|
+
setSearchTreeNameSearch: M,
|
|
8360
8360
|
setSelectedRowItems: Be,
|
|
8361
8361
|
setSearchParams: me,
|
|
8362
8362
|
setSearchValues: we,
|
|
@@ -8411,7 +8411,7 @@ function Ch(e, t) {
|
|
|
8411
8411
|
model: n,
|
|
8412
8412
|
type: "tree",
|
|
8413
8413
|
context: d
|
|
8414
|
-
})),
|
|
8414
|
+
})), A(De), O(gt);
|
|
8415
8415
|
};
|
|
8416
8416
|
se(() => {
|
|
8417
8417
|
Rt();
|
|
@@ -8430,7 +8430,7 @@ function Ch(e, t) {
|
|
|
8430
8430
|
context: d
|
|
8431
8431
|
}));
|
|
8432
8432
|
const Ut = D.current[0][2];
|
|
8433
|
-
await (
|
|
8433
|
+
await (L == null ? void 0 : L({
|
|
8434
8434
|
actionData: Ut,
|
|
8435
8435
|
fields: S.fields,
|
|
8436
8436
|
values: {
|
|
@@ -8440,7 +8440,7 @@ function Ch(e, t) {
|
|
|
8440
8440
|
context: d
|
|
8441
8441
|
}));
|
|
8442
8442
|
},
|
|
8443
|
-
[I, d,
|
|
8443
|
+
[I, d, L, S]
|
|
8444
8444
|
), Fe = E(
|
|
8445
8445
|
async (De) => {
|
|
8446
8446
|
const { id: gt } = De;
|
|
@@ -8580,7 +8580,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8580
8580
|
[n]
|
|
8581
8581
|
), S = E(() => {
|
|
8582
8582
|
t();
|
|
8583
|
-
}, [t]),
|
|
8583
|
+
}, [t]), O = E(
|
|
8584
8584
|
({ id: F }) => {
|
|
8585
8585
|
T([F]);
|
|
8586
8586
|
},
|
|
@@ -8591,7 +8591,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8591
8591
|
return;
|
|
8592
8592
|
}
|
|
8593
8593
|
T(u);
|
|
8594
|
-
}, [u, S, T]),
|
|
8594
|
+
}, [u, S, T]), A = X(
|
|
8595
8595
|
() => I ? Ra : Va,
|
|
8596
8596
|
[I]
|
|
8597
8597
|
), _ = E(() => {
|
|
@@ -8619,13 +8619,13 @@ const Va = xt(Ch), jo = ({
|
|
|
8619
8619
|
maskClosable: !1,
|
|
8620
8620
|
children: [
|
|
8621
8621
|
!w && /* @__PURE__ */ i(
|
|
8622
|
-
|
|
8622
|
+
A,
|
|
8623
8623
|
{
|
|
8624
8624
|
formView: v,
|
|
8625
8625
|
treeView: y,
|
|
8626
8626
|
model: r,
|
|
8627
8627
|
nameSearch: o,
|
|
8628
|
-
onRowClicked:
|
|
8628
|
+
onRowClicked: O,
|
|
8629
8629
|
treeScrollY: p * 0.3,
|
|
8630
8630
|
domain: a,
|
|
8631
8631
|
parentContext: s,
|
|
@@ -8688,16 +8688,16 @@ const Va = xt(Ch), jo = ({
|
|
|
8688
8688
|
context: l,
|
|
8689
8689
|
id: c,
|
|
8690
8690
|
domain: u
|
|
8691
|
-
} = r, f = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, m] = C(!1), [h, p] = C(!1), [g, y] = C(!1), [v, w] = C(), I = Y(!1), [T, S] = C(""),
|
|
8691
|
+
} = r, f = o && !s ? { backgroundColor: Pa.colorPrimaryBg } : void 0, [d, m] = C(!1), [h, p] = C(!1), [g, y] = C(!1), [v, w] = C(), I = Y(!1), [T, S] = C(""), O = Y(), b = ee(Ue), { domain: A, getValues: _, getFields: R, getContext: x, elementHasLostFocus: F } = b || {}, D = Y([]), [V, N] = C([]), L = t && t[0] || void 0, B = t && t[1] || "";
|
|
8692
8692
|
se(() => {
|
|
8693
8693
|
!Array.isArray(t) && t && J(t);
|
|
8694
8694
|
}, [t]), se(() => {
|
|
8695
|
-
|
|
8695
|
+
L && B.length === 0 ? J(L) : L && B.length > 0 ? S(B) : !L && !B && S(O.current || "");
|
|
8696
8696
|
}, [t]);
|
|
8697
8697
|
const G = (H) => {
|
|
8698
8698
|
n == null || n(H), F == null || F();
|
|
8699
8699
|
}, $ = (H) => {
|
|
8700
|
-
|
|
8700
|
+
O.current = H.target.value, G([void 0, ""]);
|
|
8701
8701
|
}, K = async () => {
|
|
8702
8702
|
if (!g && T !== B) {
|
|
8703
8703
|
if (await new Promise((H) => setTimeout(H, 100)), I.current) {
|
|
@@ -8707,14 +8707,14 @@ const Va = xt(Ch), jo = ({
|
|
|
8707
8707
|
y(!0);
|
|
8708
8708
|
try {
|
|
8709
8709
|
if (D.current && D.current.length > 0)
|
|
8710
|
-
Z(
|
|
8710
|
+
Z(O.current);
|
|
8711
8711
|
else {
|
|
8712
8712
|
const H = await k.getHandler().nameSearch({
|
|
8713
8713
|
model: a,
|
|
8714
|
-
payload:
|
|
8714
|
+
payload: O.current,
|
|
8715
8715
|
context: { ...x == null ? void 0 : x(), ...l }
|
|
8716
8716
|
});
|
|
8717
|
-
H.length === 1 ? (
|
|
8717
|
+
H.length === 1 ? (O.current = void 0, G(H[0])) : Z(O.current);
|
|
8718
8718
|
}
|
|
8719
8719
|
} catch (H) {
|
|
8720
8720
|
zt(H);
|
|
@@ -8759,15 +8759,15 @@ const Va = xt(Ch), jo = ({
|
|
|
8759
8759
|
}),
|
|
8760
8760
|
fields: R(),
|
|
8761
8761
|
context: x()
|
|
8762
|
-
})),
|
|
8762
|
+
})), A && A.length > 0 && (D.current = D.current.concat(
|
|
8763
8763
|
fo({
|
|
8764
|
-
domain:
|
|
8764
|
+
domain: A,
|
|
8765
8765
|
widgetFieldName: c
|
|
8766
8766
|
})
|
|
8767
8767
|
)), N(D.current);
|
|
8768
8768
|
}
|
|
8769
8769
|
async function Ce(H) {
|
|
8770
|
-
H.keyCode === 13 ? (H.preventDefault(), H.stopPropagation(), await K()) : H.code === "Backspace" &&
|
|
8770
|
+
H.keyCode === 13 ? (H.preventDefault(), H.stopPropagation(), await K()) : H.code === "Backspace" && L !== void 0 && (H.preventDefault(), H.stopPropagation(), G([void 0, ""]));
|
|
8771
8771
|
}
|
|
8772
8772
|
return /* @__PURE__ */ P(je, { gutter: 8, wrap: !1, children: [
|
|
8773
8773
|
/* @__PURE__ */ i(Ie, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ i(
|
|
@@ -8787,7 +8787,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8787
8787
|
suffix: /* @__PURE__ */ i(
|
|
8788
8788
|
Do,
|
|
8789
8789
|
{
|
|
8790
|
-
id:
|
|
8790
|
+
id: L,
|
|
8791
8791
|
model: a,
|
|
8792
8792
|
context: { ...x == null ? void 0 : x(), ...l }
|
|
8793
8793
|
}
|
|
@@ -8798,7 +8798,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8798
8798
|
Le,
|
|
8799
8799
|
{
|
|
8800
8800
|
icon: /* @__PURE__ */ i(mo, {}),
|
|
8801
|
-
disabled:
|
|
8801
|
+
disabled: L === void 0 || B === "" || T === void 0,
|
|
8802
8802
|
onClick: () => {
|
|
8803
8803
|
p(!0);
|
|
8804
8804
|
},
|
|
@@ -8825,9 +8825,9 @@ const Va = xt(Ch), jo = ({
|
|
|
8825
8825
|
domain: V,
|
|
8826
8826
|
context: { ...x == null ? void 0 : x(), ...l },
|
|
8827
8827
|
visible: d,
|
|
8828
|
-
nameSearch:
|
|
8828
|
+
nameSearch: L ? void 0 : v,
|
|
8829
8829
|
onSelectValues: async (H) => {
|
|
8830
|
-
m(!1), J(H[0]), I.current = !1,
|
|
8830
|
+
m(!1), J(H[0]), I.current = !1, O.current = void 0;
|
|
8831
8831
|
},
|
|
8832
8832
|
onCloseModal: () => {
|
|
8833
8833
|
m(!1), I.current = !1;
|
|
@@ -9146,7 +9146,7 @@ function Rh(e) {
|
|
|
9146
9146
|
toolbar: y,
|
|
9147
9147
|
disabled: n,
|
|
9148
9148
|
parentContext: v,
|
|
9149
|
-
selectedRowItems: h.map((
|
|
9149
|
+
selectedRowItems: h.map((O) => ({ id: O })),
|
|
9150
9150
|
onRefreshParentValues: I
|
|
9151
9151
|
}), /* @__PURE__ */ P("div", { className: "flex mb-2 pt-3", children: [
|
|
9152
9152
|
/* @__PURE__ */ i(Ha, { title: t, token: T }),
|
|
@@ -9319,12 +9319,12 @@ const Vh = (e) => {
|
|
|
9319
9319
|
getContext: p,
|
|
9320
9320
|
domain: g,
|
|
9321
9321
|
fetchValues: y
|
|
9322
|
-
} = f || {}, { t: v } = de(), [w, I] = C(!1), [T, S] = C(!1), [
|
|
9322
|
+
} = f || {}, { t: v } = de(), [w, I] = C(!1), [T, S] = C(!1), [O, b] = C(), [A, _] = C(!1), [R, x] = C(!1), [F, D] = C(), [V, N] = C([]), [L, B] = C(!1), G = Y([]), [$, K] = C(), Z = Y(), [J, Q] = C(void 0), Ce = Y(), {
|
|
9323
9323
|
readOnly: me,
|
|
9324
9324
|
relation: H,
|
|
9325
9325
|
context: j,
|
|
9326
9326
|
domain: q
|
|
9327
|
-
} = r, ie = r.type === "many2many", { id: te } = r,
|
|
9327
|
+
} = r, ie = r.type === "many2many", { id: te } = r, M = a.filter(
|
|
9328
9328
|
(re) => (re.values || re.treeValues) && re.operation !== "pendingRemove"
|
|
9329
9329
|
), ne = Y();
|
|
9330
9330
|
se(() => {
|
|
@@ -9347,7 +9347,7 @@ const Vh = (e) => {
|
|
|
9347
9347
|
items: Eh(re)
|
|
9348
9348
|
});
|
|
9349
9349
|
}, ge = async () => {
|
|
9350
|
-
await Pe(), c >
|
|
9350
|
+
await Pe(), c > M.length - 1 && c !== 0 && u(0);
|
|
9351
9351
|
}, Pe = async (re) => {
|
|
9352
9352
|
var he, Se, Fe;
|
|
9353
9353
|
S(!0), I(!1), b(void 0);
|
|
@@ -9398,12 +9398,12 @@ const Vh = (e) => {
|
|
|
9398
9398
|
u(c - 1);
|
|
9399
9399
|
}) : u(c - 1));
|
|
9400
9400
|
}, ue = () => {
|
|
9401
|
-
const re =
|
|
9401
|
+
const re = M.length;
|
|
9402
9402
|
c < re - 1 && (s === "form" ? xe(() => {
|
|
9403
9403
|
u(c + 1);
|
|
9404
9404
|
}) : u(c + 1));
|
|
9405
9405
|
}, Te = async () => {
|
|
9406
|
-
const re =
|
|
9406
|
+
const re = M[c].id, he = (await k.getHandler().readObjects({
|
|
9407
9407
|
model: H,
|
|
9408
9408
|
ids: [re],
|
|
9409
9409
|
fields: o.get("form").fields,
|
|
@@ -9456,22 +9456,22 @@ const Vh = (e) => {
|
|
|
9456
9456
|
}, _e = async () => {
|
|
9457
9457
|
S(!0), I(!1), b(void 0);
|
|
9458
9458
|
try {
|
|
9459
|
-
if (
|
|
9460
|
-
const re = a.map((he) => he.id ===
|
|
9459
|
+
if (M[c].id > 0) {
|
|
9460
|
+
const re = a.map((he) => he.id === M[c].id ? {
|
|
9461
9461
|
...he,
|
|
9462
9462
|
operation: "pendingRemove"
|
|
9463
9463
|
} : he);
|
|
9464
9464
|
we(re);
|
|
9465
9465
|
} else
|
|
9466
9466
|
we(
|
|
9467
|
-
a.filter((re) => re.id !==
|
|
9467
|
+
a.filter((re) => re.id !== M[c].id)
|
|
9468
9468
|
);
|
|
9469
9469
|
} catch (re) {
|
|
9470
9470
|
b(re);
|
|
9471
9471
|
}
|
|
9472
9472
|
u(0), S(!1);
|
|
9473
9473
|
}, Ge = async () => {
|
|
9474
|
-
const re =
|
|
9474
|
+
const re = M.filter((he) => V.includes(he.id));
|
|
9475
9475
|
S(!0), I(!1), b(void 0);
|
|
9476
9476
|
try {
|
|
9477
9477
|
const he = re.map((Fe) => Fe.id), Se = a.filter((Fe) => !(he.includes(Fe.id) && Fe.id < 0)).map((Fe) => he.includes(Fe.id) ? {
|
|
@@ -9508,7 +9508,7 @@ const Vh = (e) => {
|
|
|
9508
9508
|
treeValues: { ...Se, id: $e }
|
|
9509
9509
|
});
|
|
9510
9510
|
}
|
|
9511
|
-
we(Ae),
|
|
9511
|
+
we(Ae), L || _(!1);
|
|
9512
9512
|
}, fe = async (re) => {
|
|
9513
9513
|
const { id: he } = re;
|
|
9514
9514
|
let Se = a;
|
|
@@ -9556,19 +9556,19 @@ const Vh = (e) => {
|
|
|
9556
9556
|
const Ze = () => {
|
|
9557
9557
|
var he, Se, Fe, Ae;
|
|
9558
9558
|
if (s === "form")
|
|
9559
|
-
return
|
|
9559
|
+
return M.length === 0 ? v("noCurrentEntries") : s !== ne.current && a.some(($e) => !$e.values) ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ i(
|
|
9560
9560
|
Sn,
|
|
9561
9561
|
{
|
|
9562
9562
|
ref: Ce,
|
|
9563
9563
|
formView: o.get("form"),
|
|
9564
|
-
values: (he =
|
|
9564
|
+
values: (he = M[c]) == null ? void 0 : he.values,
|
|
9565
9565
|
parentContext: { ...p == null ? void 0 : p(), ...j },
|
|
9566
9566
|
model: H,
|
|
9567
|
-
id: (Se =
|
|
9567
|
+
id: (Se = M[c]) == null ? void 0 : Se.id,
|
|
9568
9568
|
submitMode: "values",
|
|
9569
9569
|
onFieldsChange: ($e) => {
|
|
9570
9570
|
var It;
|
|
9571
|
-
const ht = (It =
|
|
9571
|
+
const ht = (It = M[c]) == null ? void 0 : It.id, Ot = a.map((ot) => ot.id === ht ? {
|
|
9572
9572
|
...ot,
|
|
9573
9573
|
operation: ot.operation === "original" ? "pendingUpdate" : ot.operation,
|
|
9574
9574
|
values: { ...$e, id: ht },
|
|
@@ -9580,19 +9580,19 @@ const Vh = (e) => {
|
|
|
9580
9580
|
}
|
|
9581
9581
|
);
|
|
9582
9582
|
let re = [];
|
|
9583
|
-
if (
|
|
9584
|
-
resultsToSort:
|
|
9583
|
+
if (M.some(($e) => $e.treeValues) && (re = $ ? an({
|
|
9584
|
+
resultsToSort: M.map(($e) => $e.treeValues),
|
|
9585
9585
|
sorter: $,
|
|
9586
9586
|
fields: {
|
|
9587
9587
|
...o.get("tree").fields,
|
|
9588
9588
|
...((Fe = o.get("form")) == null ? void 0 : Fe.fields) || {}
|
|
9589
9589
|
}
|
|
9590
|
-
}) :
|
|
9590
|
+
}) : M.map(($e) => $e.treeValues)), s === "tree")
|
|
9591
9591
|
return /* @__PURE__ */ i(
|
|
9592
9592
|
Un,
|
|
9593
9593
|
{
|
|
9594
|
-
total:
|
|
9595
|
-
limit:
|
|
9594
|
+
total: M.length,
|
|
9595
|
+
limit: M.length,
|
|
9596
9596
|
treeView: o.get("tree"),
|
|
9597
9597
|
results: re,
|
|
9598
9598
|
loading: T,
|
|
@@ -9623,9 +9623,9 @@ const Vh = (e) => {
|
|
|
9623
9623
|
);
|
|
9624
9624
|
}
|
|
9625
9625
|
};
|
|
9626
|
-
if (
|
|
9627
|
-
return /* @__PURE__ */ i(at, { className: "mt-10", message:
|
|
9628
|
-
const be =
|
|
9626
|
+
if (O)
|
|
9627
|
+
return /* @__PURE__ */ i(at, { className: "mt-10", message: O, type: "error", banner: !0 });
|
|
9628
|
+
const be = L;
|
|
9629
9629
|
return T ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(le, { children: [
|
|
9630
9630
|
/* @__PURE__ */ i(
|
|
9631
9631
|
Ya,
|
|
@@ -9635,7 +9635,7 @@ const Vh = (e) => {
|
|
|
9635
9635
|
readOnly: me || !1,
|
|
9636
9636
|
isMany2Many: ie,
|
|
9637
9637
|
formHasChanges: w,
|
|
9638
|
-
totalItems:
|
|
9638
|
+
totalItems: M.length,
|
|
9639
9639
|
currentItemIndex: c,
|
|
9640
9640
|
onDelete: Ne,
|
|
9641
9641
|
onCreateItem: z,
|
|
@@ -9664,7 +9664,7 @@ const Vh = (e) => {
|
|
|
9664
9664
|
submitMode: "2many",
|
|
9665
9665
|
values: F == null ? void 0 : F.values,
|
|
9666
9666
|
defaultValues: F == null ? void 0 : F.defaultValues,
|
|
9667
|
-
visible:
|
|
9667
|
+
visible: A,
|
|
9668
9668
|
onSubmitSucceed: ke,
|
|
9669
9669
|
parentContext: { ...p == null ? void 0 : p(), ...j },
|
|
9670
9670
|
onCancel: () => {
|
|
@@ -9755,9 +9755,9 @@ const Vh = (e) => {
|
|
|
9755
9755
|
p,
|
|
9756
9756
|
g
|
|
9757
9757
|
) : w, S = Od(d), {
|
|
9758
|
-
items:
|
|
9758
|
+
items: O,
|
|
9759
9759
|
colors: b,
|
|
9760
|
-
status:
|
|
9760
|
+
status: A
|
|
9761
9761
|
} = await _d({
|
|
9762
9762
|
relation: t,
|
|
9763
9763
|
ids: T,
|
|
@@ -9768,9 +9768,9 @@ const Vh = (e) => {
|
|
|
9768
9768
|
}), R = T.length < g - p && I.length > 0 ? [...T, ...I.map((F) => F.id)] : T;
|
|
9769
9769
|
return { results: Td({
|
|
9770
9770
|
finalResultIds: R,
|
|
9771
|
-
fetchedItems:
|
|
9771
|
+
fetchedItems: O,
|
|
9772
9772
|
otherItems: I
|
|
9773
|
-
}), colors: b, status:
|
|
9773
|
+
}), colors: b, status: A };
|
|
9774
9774
|
},
|
|
9775
9775
|
[n, t, d, e]
|
|
9776
9776
|
),
|
|
@@ -9986,9 +9986,9 @@ const jh = ({
|
|
|
9986
9986
|
}, [n, e, t, r]), w = E(() => {
|
|
9987
9987
|
m(!1), y(!1);
|
|
9988
9988
|
}, []), I = wt(
|
|
9989
|
-
(S,
|
|
9989
|
+
(S, O, b, A = !1) => {
|
|
9990
9990
|
let _;
|
|
9991
|
-
if (
|
|
9991
|
+
if (A)
|
|
9992
9992
|
_ = o.concat({
|
|
9993
9993
|
id: S,
|
|
9994
9994
|
operation: "pendingLink",
|
|
@@ -10018,15 +10018,15 @@ const jh = ({
|
|
|
10018
10018
|
async (S) => {
|
|
10019
10019
|
if (!u)
|
|
10020
10020
|
return;
|
|
10021
|
-
const { id:
|
|
10021
|
+
const { id: O } = S;
|
|
10022
10022
|
let b = o;
|
|
10023
|
-
const
|
|
10024
|
-
(
|
|
10023
|
+
const A = o.find((_) => _.id === O);
|
|
10024
|
+
(A == null ? void 0 : A.values) === void 0 && (b = await k.getHandler().readObjects({
|
|
10025
10025
|
model: c,
|
|
10026
10026
|
ids: [S.id],
|
|
10027
10027
|
fields: u.fields,
|
|
10028
10028
|
context: f
|
|
10029
|
-
})), p(b.find((_) => _.id ===
|
|
10029
|
+
})), p(b.find((_) => _.id === O)), y(!1), m(!0);
|
|
10030
10030
|
},
|
|
10031
10031
|
[f, u, o, c, s, l]
|
|
10032
10032
|
);
|
|
@@ -10116,16 +10116,16 @@ const jh = ({
|
|
|
10116
10116
|
selectedRowKeys: g = [],
|
|
10117
10117
|
showPointerCursorInRows: y = !0
|
|
10118
10118
|
}) => {
|
|
10119
|
-
const v = Y(), w = c || v, I = Y({}), T = Y(), S = Y(),
|
|
10119
|
+
const v = Y(), w = c || v, I = Y({}), T = Y(), S = Y(), O = Y(e), { t: b } = de();
|
|
10120
10120
|
Ft(() => {
|
|
10121
|
-
var N,
|
|
10122
|
-
if (
|
|
10121
|
+
var N, L;
|
|
10122
|
+
if (O.current = e, S.current === void 0) {
|
|
10123
10123
|
S.current = e;
|
|
10124
10124
|
return;
|
|
10125
10125
|
}
|
|
10126
|
-
S.current = e, (N = w == null ? void 0 : w.current) == null || N.refresh(), (
|
|
10126
|
+
S.current = e, (N = w == null ? void 0 : w.current) == null || N.refresh(), (L = w == null ? void 0 : w.current) == null || L.unselectAll();
|
|
10127
10127
|
}, [e]);
|
|
10128
|
-
const
|
|
10128
|
+
const A = Rn(() => e.length, [e]), _ = Rn(() => Ao(
|
|
10129
10129
|
o,
|
|
10130
10130
|
{
|
|
10131
10131
|
...Vo
|
|
@@ -10134,23 +10134,23 @@ const jh = ({
|
|
|
10134
10134
|
), [a, o]), R = E(
|
|
10135
10135
|
async ({
|
|
10136
10136
|
startRow: N,
|
|
10137
|
-
endRow:
|
|
10137
|
+
endRow: L,
|
|
10138
10138
|
state: B
|
|
10139
10139
|
}) => {
|
|
10140
10140
|
const G = Gr({
|
|
10141
10141
|
state: B
|
|
10142
10142
|
}), { results: $, colors: K, status: Z } = await s({
|
|
10143
|
-
allItems:
|
|
10143
|
+
allItems: O.current,
|
|
10144
10144
|
startRow: N,
|
|
10145
|
-
endRow:
|
|
10145
|
+
endRow: L,
|
|
10146
10146
|
sortFields: G
|
|
10147
10147
|
});
|
|
10148
10148
|
return I.current = { ...I.current, ...K }, !T.current && Z && (T.current = {}), Z && (T.current = { ...T.current, ...Z }), $;
|
|
10149
10149
|
},
|
|
10150
10150
|
[s]
|
|
10151
10151
|
), x = E((N) => {
|
|
10152
|
-
var
|
|
10153
|
-
if (I.current[(B = (
|
|
10152
|
+
var L, B, G, $;
|
|
10153
|
+
if (I.current[(B = (L = N.node) == null ? void 0 : L.data) == null ? void 0 : B.id])
|
|
10154
10154
|
return { color: I.current[($ = (G = N.node) == null ? void 0 : G.data) == null ? void 0 : $.id] };
|
|
10155
10155
|
}, []), { loading: F, getColumnState: D, updateColumnState: V } = ea(
|
|
10156
10156
|
Hh({
|
|
@@ -10176,13 +10176,13 @@ const jh = ({
|
|
|
10176
10176
|
onGetFirstVisibleRowIndex: d,
|
|
10177
10177
|
selectedRowKeys: g,
|
|
10178
10178
|
onSelectionCheckboxClicked: m,
|
|
10179
|
-
totalRows:
|
|
10179
|
+
totalRows: A,
|
|
10180
10180
|
footer: p && /* @__PURE__ */ i(na, { aggregates: p, isLoading: !1 }),
|
|
10181
10181
|
hasStatusColumn: o.status !== null,
|
|
10182
10182
|
statusComponent: (N) => /* @__PURE__ */ i(cr, { color: N, style: { marginLeft: 7 } }),
|
|
10183
10183
|
onRowStatus: (N) => {
|
|
10184
|
-
var
|
|
10185
|
-
return (
|
|
10184
|
+
var L;
|
|
10185
|
+
return (L = T.current) == null ? void 0 : L[N.id];
|
|
10186
10186
|
},
|
|
10187
10187
|
strings: {
|
|
10188
10188
|
resetTableViewLabel: b("resetTableView")
|
|
@@ -10216,7 +10216,7 @@ const jh = ({
|
|
|
10216
10216
|
activeId: w,
|
|
10217
10217
|
getContext: I,
|
|
10218
10218
|
fetchValues: T
|
|
10219
|
-
} = v || {}, S = Y(),
|
|
10219
|
+
} = v || {}, S = Y(), O = a.size > 1, b = ((xe = a.get("form")) == null ? void 0 : xe.fields) !== void 0, A = X(() => ({ ...I == null ? void 0 : I(), ...p }), [I, p]), _ = Ph({
|
|
10220
10220
|
widgetDomain: g,
|
|
10221
10221
|
fieldName: y
|
|
10222
10222
|
}), {
|
|
@@ -10226,11 +10226,11 @@ const jh = ({
|
|
|
10226
10226
|
setSelectedRowKeys: D,
|
|
10227
10227
|
onChangeFirstVisibleRowIndex: V,
|
|
10228
10228
|
onGetFirstVisibileRowIndex: N,
|
|
10229
|
-
onSelectionCheckboxClicked:
|
|
10229
|
+
onSelectionCheckboxClicked: L
|
|
10230
10230
|
} = kh({
|
|
10231
10231
|
treeView: a.get("tree"),
|
|
10232
10232
|
relation: h,
|
|
10233
|
-
context:
|
|
10233
|
+
context: A,
|
|
10234
10234
|
allRowsIds: l.filter((z) => z.id !== void 0).map((z) => z.id),
|
|
10235
10235
|
gridRef: t
|
|
10236
10236
|
}), [, B] = Gh({
|
|
@@ -10260,7 +10260,7 @@ const jh = ({
|
|
|
10260
10260
|
formView: a.get("form"),
|
|
10261
10261
|
treeView: a.get("tree"),
|
|
10262
10262
|
relation: h,
|
|
10263
|
-
context:
|
|
10263
|
+
context: A,
|
|
10264
10264
|
triggerChange: K
|
|
10265
10265
|
}), {
|
|
10266
10266
|
showFormModal: me,
|
|
@@ -10269,7 +10269,7 @@ const jh = ({
|
|
|
10269
10269
|
onCancelFormModal: q,
|
|
10270
10270
|
onFormModalSubmitSucceed: ie,
|
|
10271
10271
|
createItem: te,
|
|
10272
|
-
openItemInFormModal:
|
|
10272
|
+
openItemInFormModal: M
|
|
10273
10273
|
} = jh({
|
|
10274
10274
|
activeId: w,
|
|
10275
10275
|
inv_field: o.inv_field,
|
|
@@ -10279,7 +10279,7 @@ const jh = ({
|
|
|
10279
10279
|
items: l,
|
|
10280
10280
|
setCurrentView: u,
|
|
10281
10281
|
setItemIndex: d,
|
|
10282
|
-
context:
|
|
10282
|
+
context: A,
|
|
10283
10283
|
relation: h,
|
|
10284
10284
|
formView: a.get("form")
|
|
10285
10285
|
}), {
|
|
@@ -10293,7 +10293,7 @@ const jh = ({
|
|
|
10293
10293
|
triggerChange: K,
|
|
10294
10294
|
items: l,
|
|
10295
10295
|
views: a,
|
|
10296
|
-
context:
|
|
10296
|
+
context: A,
|
|
10297
10297
|
relation: h
|
|
10298
10298
|
}), { showRemoveConfirm: Pe } = Mh({
|
|
10299
10299
|
isMany2many: $,
|
|
@@ -10310,7 +10310,7 @@ const jh = ({
|
|
|
10310
10310
|
}, We = wt(
|
|
10311
10311
|
(z) => {
|
|
10312
10312
|
var pe;
|
|
10313
|
-
(pe = a.get("form")) != null && pe.fields &&
|
|
10313
|
+
(pe = a.get("form")) != null && pe.fields && M(z);
|
|
10314
10314
|
},
|
|
10315
10315
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10316
10316
|
[l]
|
|
@@ -10352,9 +10352,9 @@ const jh = ({
|
|
|
10352
10352
|
onSearchItem: ge,
|
|
10353
10353
|
selectedRowKeys: F,
|
|
10354
10354
|
showCreateButton: b,
|
|
10355
|
-
showToggleButton:
|
|
10355
|
+
showToggleButton: O,
|
|
10356
10356
|
toolbar: (Ne = a.get(c)) == null ? void 0 : Ne.toolbar,
|
|
10357
|
-
context: { ...I == null ? void 0 : I(), ...
|
|
10357
|
+
context: { ...I == null ? void 0 : I(), ...A },
|
|
10358
10358
|
formRef: S,
|
|
10359
10359
|
onRefreshParentValues: () => {
|
|
10360
10360
|
T == null || T({ forceRefresh: !0 });
|
|
@@ -10370,7 +10370,7 @@ const jh = ({
|
|
|
10370
10370
|
readOnly: m || !1,
|
|
10371
10371
|
onFetchRecords: x,
|
|
10372
10372
|
ooui: R,
|
|
10373
|
-
context:
|
|
10373
|
+
context: A,
|
|
10374
10374
|
onRowDoubleClick: We,
|
|
10375
10375
|
showPointerCursorInRows: Te,
|
|
10376
10376
|
onRowSelectionChange: D,
|
|
@@ -10378,7 +10378,7 @@ const jh = ({
|
|
|
10378
10378
|
onChangeFirstVisibleRowIndex: V,
|
|
10379
10379
|
onGetFirstVisibleRowIndex: N,
|
|
10380
10380
|
selectedRowKeys: F,
|
|
10381
|
-
onSelectionCheckboxClicked:
|
|
10381
|
+
onSelectionCheckboxClicked: L,
|
|
10382
10382
|
dataForHash: {
|
|
10383
10383
|
parentViewId: e.parentViewId,
|
|
10384
10384
|
treeViewId: e.treeViewId,
|
|
@@ -10393,7 +10393,7 @@ const jh = ({
|
|
|
10393
10393
|
ref: S,
|
|
10394
10394
|
items: l,
|
|
10395
10395
|
formView: a.get("form"),
|
|
10396
|
-
context:
|
|
10396
|
+
context: A,
|
|
10397
10397
|
relation: h,
|
|
10398
10398
|
readOnly: m || !1,
|
|
10399
10399
|
onChange: J
|
|
@@ -10410,7 +10410,7 @@ const jh = ({
|
|
|
10410
10410
|
defaultValues: H == null ? void 0 : H.defaultValues,
|
|
10411
10411
|
visible: me,
|
|
10412
10412
|
onSubmitSucceed: ie,
|
|
10413
|
-
parentContext:
|
|
10413
|
+
parentContext: A,
|
|
10414
10414
|
onCancel: q,
|
|
10415
10415
|
readOnly: m,
|
|
10416
10416
|
mustClearAfterSave: j,
|
|
@@ -10424,7 +10424,7 @@ const jh = ({
|
|
|
10424
10424
|
{
|
|
10425
10425
|
domain: _,
|
|
10426
10426
|
model: h,
|
|
10427
|
-
context:
|
|
10427
|
+
context: A,
|
|
10428
10428
|
visible: ne,
|
|
10429
10429
|
onSelectValues: oe,
|
|
10430
10430
|
onCloseModal: we
|
|
@@ -10437,7 +10437,7 @@ const jh = ({
|
|
|
10437
10437
|
view_id: a.get("graph").view_id,
|
|
10438
10438
|
model: h,
|
|
10439
10439
|
domain: [[`${o.inv_field}`, "=", w]],
|
|
10440
|
-
context:
|
|
10440
|
+
context: A,
|
|
10441
10441
|
limit: 0
|
|
10442
10442
|
}
|
|
10443
10443
|
),
|
|
@@ -10454,40 +10454,25 @@ const jh = ({
|
|
|
10454
10454
|
Ft(() => {
|
|
10455
10455
|
I();
|
|
10456
10456
|
}, [t]);
|
|
10457
|
-
const w = async (
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
});
|
|
10463
|
-
if (o && o[A]) {
|
|
10464
|
-
const O = o[A];
|
|
10465
|
-
if (!O.toolbar && (A === "form" || A === "tree")) {
|
|
10466
|
-
const _ = await b;
|
|
10467
|
-
return { ...O, toolbar: _.toolbar };
|
|
10468
|
-
}
|
|
10469
|
-
return O;
|
|
10470
|
-
}
|
|
10471
|
-
return await k.getHandler().getView({
|
|
10472
|
-
model: r,
|
|
10473
|
-
type: A,
|
|
10474
|
-
context: { ...g == null ? void 0 : g(), ...s }
|
|
10475
|
-
});
|
|
10476
|
-
}, I = async () => {
|
|
10457
|
+
const w = async (O) => o && o[O] ? o[O] : await k.getHandler().getView({
|
|
10458
|
+
model: r,
|
|
10459
|
+
type: O,
|
|
10460
|
+
context: { ...g == null ? void 0 : g(), ...s }
|
|
10461
|
+
}), I = async () => {
|
|
10477
10462
|
u(!0), d(void 0);
|
|
10478
10463
|
try {
|
|
10479
10464
|
if (n && n.length > 0) {
|
|
10480
|
-
for (const
|
|
10481
|
-
const b = await w(
|
|
10482
|
-
m.set(
|
|
10465
|
+
for (const O of n) {
|
|
10466
|
+
const b = await w(O);
|
|
10467
|
+
m.set(O, b);
|
|
10483
10468
|
}
|
|
10484
10469
|
h(m);
|
|
10485
10470
|
} else {
|
|
10486
|
-
const
|
|
10487
|
-
m.set("form",
|
|
10471
|
+
const O = await w("form"), b = await w("tree");
|
|
10472
|
+
m.set("form", O), m.set("tree", b), h(m);
|
|
10488
10473
|
}
|
|
10489
|
-
} catch (
|
|
10490
|
-
d(JSON.stringify(
|
|
10474
|
+
} catch (O) {
|
|
10475
|
+
d(JSON.stringify(O));
|
|
10491
10476
|
} finally {
|
|
10492
10477
|
u(!1);
|
|
10493
10478
|
}
|
|
@@ -10497,7 +10482,7 @@ const jh = ({
|
|
|
10497
10482
|
{
|
|
10498
10483
|
required: a,
|
|
10499
10484
|
type: "array",
|
|
10500
|
-
validator: async (
|
|
10485
|
+
validator: async (O, b) => {
|
|
10501
10486
|
if (!b)
|
|
10502
10487
|
throw new Error();
|
|
10503
10488
|
if (!b.items)
|
|
@@ -10813,10 +10798,10 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10813
10798
|
context: t,
|
|
10814
10799
|
fields: []
|
|
10815
10800
|
});
|
|
10816
|
-
for (const [S,
|
|
10801
|
+
for (const [S, O] of Object.entries(T))
|
|
10817
10802
|
T[S].string = cg({
|
|
10818
10803
|
parentTitle: w.string,
|
|
10819
|
-
title:
|
|
10804
|
+
title: O.string
|
|
10820
10805
|
});
|
|
10821
10806
|
return s.current[y] = T, Gi({
|
|
10822
10807
|
fields: T,
|
|
@@ -11116,8 +11101,8 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
11116
11101
|
r == null || r(I);
|
|
11117
11102
|
};
|
|
11118
11103
|
async function g() {
|
|
11119
|
-
const I = await un(n), T = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"),
|
|
11120
|
-
S.href = T, S.download =
|
|
11104
|
+
const I = await un(n), T = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"), O = d(s), b = d("name");
|
|
11105
|
+
S.href = T, S.download = O || b, S.click();
|
|
11121
11106
|
}
|
|
11122
11107
|
async function y() {
|
|
11123
11108
|
const I = await un(n);
|
|
@@ -11561,13 +11546,13 @@ const Og = () => {
|
|
|
11561
11546
|
async (y) => {
|
|
11562
11547
|
var v;
|
|
11563
11548
|
try {
|
|
11564
|
-
const { params: w, model: I, name_search: T, context: S, order:
|
|
11549
|
+
const { params: w, model: I, name_search: T, context: S, order: O } = s, { results: b } = await l({
|
|
11565
11550
|
params: w,
|
|
11566
11551
|
model: I,
|
|
11567
11552
|
context: S,
|
|
11568
11553
|
limit: 1,
|
|
11569
11554
|
offset: y,
|
|
11570
|
-
order:
|
|
11555
|
+
order: O,
|
|
11571
11556
|
name_search: T,
|
|
11572
11557
|
skipRead: !0
|
|
11573
11558
|
});
|
|
@@ -11584,7 +11569,7 @@ const Og = () => {
|
|
|
11584
11569
|
[o, r]
|
|
11585
11570
|
), m = E(
|
|
11586
11571
|
async (y) => {
|
|
11587
|
-
var S,
|
|
11572
|
+
var S, O;
|
|
11588
11573
|
if (!a)
|
|
11589
11574
|
return;
|
|
11590
11575
|
const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0, T = v ? w === t : w === -1;
|
|
@@ -11593,13 +11578,13 @@ const Og = () => {
|
|
|
11593
11578
|
if (b)
|
|
11594
11579
|
d(w, b);
|
|
11595
11580
|
else {
|
|
11596
|
-
const
|
|
11597
|
-
|
|
11581
|
+
const A = await f(w);
|
|
11582
|
+
A && d(w, A);
|
|
11598
11583
|
}
|
|
11599
11584
|
} else if (T) {
|
|
11600
|
-
const b = v ? 0 : t - 1,
|
|
11601
|
-
if (
|
|
11602
|
-
d(b,
|
|
11585
|
+
const b = v ? 0 : t - 1, A = (O = a[b]) == null ? void 0 : O.id;
|
|
11586
|
+
if (A)
|
|
11587
|
+
d(b, A);
|
|
11603
11588
|
else {
|
|
11604
11589
|
const _ = await f(b);
|
|
11605
11590
|
_ && d(b, _);
|
|
@@ -11744,35 +11729,35 @@ function Vg({ toolbar: e }) {
|
|
|
11744
11729
|
duplicatingItem: I,
|
|
11745
11730
|
setDuplicatingItem: T,
|
|
11746
11731
|
setResults: S,
|
|
11747
|
-
formIsLoading:
|
|
11732
|
+
formIsLoading: O,
|
|
11748
11733
|
attachments: b,
|
|
11749
|
-
formRef:
|
|
11734
|
+
formRef: A,
|
|
11750
11735
|
setFormHasChanges: _,
|
|
11751
11736
|
previousView: R,
|
|
11752
11737
|
setPreviousView: x,
|
|
11753
11738
|
goToResourceId: F,
|
|
11754
11739
|
isActive: D
|
|
11755
11740
|
} = Ln(), { openDefaultActionForModel: V } = t || {}, N = X(
|
|
11756
|
-
() => f || w ||
|
|
11757
|
-
[f, w,
|
|
11758
|
-
),
|
|
11741
|
+
() => f || w || O || I,
|
|
11742
|
+
[f, w, O, I]
|
|
11743
|
+
), L = E(
|
|
11759
11744
|
(j) => {
|
|
11760
11745
|
u ? wn({ t: n, onOk: j }) : j();
|
|
11761
11746
|
},
|
|
11762
11747
|
[u, n]
|
|
11763
11748
|
), B = E(() => {
|
|
11764
|
-
|
|
11765
|
-
}, [
|
|
11749
|
+
L(() => A.current.fetchValues());
|
|
11750
|
+
}, [L, A]), { actionButtonProps: G, printButtonProps: $, relateButtonProps: K } = La({
|
|
11766
11751
|
toolbar: e,
|
|
11767
11752
|
mustDisableButtons: N,
|
|
11768
|
-
formRef:
|
|
11753
|
+
formRef: A,
|
|
11769
11754
|
onRefreshParentValues: B
|
|
11770
11755
|
}), Z = E(async () => {
|
|
11771
11756
|
try {
|
|
11772
11757
|
v == null || v(!0), await k.getHandler().deleteObjects({
|
|
11773
11758
|
model: y,
|
|
11774
11759
|
ids: [d],
|
|
11775
|
-
context:
|
|
11760
|
+
context: A.current.getContext()
|
|
11776
11761
|
});
|
|
11777
11762
|
const j = m == null ? void 0 : m.filter(
|
|
11778
11763
|
(ie) => ie.id !== d
|
|
@@ -11789,7 +11774,7 @@ function Vg({ toolbar: e }) {
|
|
|
11789
11774
|
d,
|
|
11790
11775
|
p,
|
|
11791
11776
|
y,
|
|
11792
|
-
|
|
11777
|
+
A,
|
|
11793
11778
|
m,
|
|
11794
11779
|
g,
|
|
11795
11780
|
h,
|
|
@@ -11801,7 +11786,7 @@ function Vg({ toolbar: e }) {
|
|
|
11801
11786
|
const j = await k.getHandler().duplicate({
|
|
11802
11787
|
id: d,
|
|
11803
11788
|
model: y,
|
|
11804
|
-
context:
|
|
11789
|
+
context: A.current.getContext()
|
|
11805
11790
|
});
|
|
11806
11791
|
j && await (F == null ? void 0 : F([j]));
|
|
11807
11792
|
} catch (j) {
|
|
@@ -11809,7 +11794,7 @@ function Vg({ toolbar: e }) {
|
|
|
11809
11794
|
} finally {
|
|
11810
11795
|
T == null || T(!1);
|
|
11811
11796
|
}
|
|
11812
|
-
}, [d, y,
|
|
11797
|
+
}, [d, y, A, F, T]), Q = E(
|
|
11813
11798
|
(j) => {
|
|
11814
11799
|
x == null || x(s), _ == null || _(!1), l == null || l(j);
|
|
11815
11800
|
},
|
|
@@ -11844,14 +11829,18 @@ function Vg({ toolbar: e }) {
|
|
|
11844
11829
|
);
|
|
11845
11830
|
return Wt(
|
|
11846
11831
|
"pagedown",
|
|
11847
|
-
() =>
|
|
11832
|
+
async () => {
|
|
11833
|
+
!D || !await A.current.cancelUnsavedChanges() || r();
|
|
11834
|
+
},
|
|
11848
11835
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11849
|
-
[D,
|
|
11836
|
+
[D, r, A]
|
|
11850
11837
|
), Wt(
|
|
11851
11838
|
"pageup",
|
|
11852
|
-
() =>
|
|
11839
|
+
async () => {
|
|
11840
|
+
!D || !await A.current.cancelUnsavedChanges() || o();
|
|
11841
|
+
},
|
|
11853
11842
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11854
|
-
[D,
|
|
11843
|
+
[D, o, A]
|
|
11855
11844
|
), Wt(
|
|
11856
11845
|
"ctrl+s,command+s",
|
|
11857
11846
|
() => D && (c == null ? void 0 : c()),
|
|
@@ -11859,13 +11848,20 @@ function Vg({ toolbar: e }) {
|
|
|
11859
11848
|
[D, c]
|
|
11860
11849
|
), Wt(
|
|
11861
11850
|
"ctrl+l,command+l",
|
|
11862
|
-
() => {
|
|
11863
|
-
D
|
|
11851
|
+
async () => {
|
|
11852
|
+
!D || !R || !await A.current.cancelUnsavedChanges() || (x == null || x(s), l == null || l(R));
|
|
11864
11853
|
},
|
|
11865
11854
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11866
|
-
[
|
|
11855
|
+
[
|
|
11856
|
+
D,
|
|
11857
|
+
R,
|
|
11858
|
+
s,
|
|
11859
|
+
x,
|
|
11860
|
+
l,
|
|
11861
|
+
A
|
|
11862
|
+
]
|
|
11867
11863
|
), s ? /* @__PURE__ */ P(Xe, { wrap: !0, children: [
|
|
11868
|
-
|
|
11864
|
+
O && /* @__PURE__ */ P(le, { children: [
|
|
11869
11865
|
/* @__PURE__ */ i(Ke, {}),
|
|
11870
11866
|
/* @__PURE__ */ i(et, {}),
|
|
11871
11867
|
/* @__PURE__ */ i(et, {})
|
|
@@ -11947,7 +11943,7 @@ function Vg({ toolbar: e }) {
|
|
|
11947
11943
|
disabled: N || !1,
|
|
11948
11944
|
onPreviousClick: o,
|
|
11949
11945
|
onNextClick: r,
|
|
11950
|
-
tryAction:
|
|
11946
|
+
tryAction: L
|
|
11951
11947
|
}
|
|
11952
11948
|
),
|
|
11953
11949
|
/* @__PURE__ */ i(et, {}),
|
|
@@ -12381,9 +12377,9 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12381
12377
|
sorter: I = void 0,
|
|
12382
12378
|
setSorter: T = void 0,
|
|
12383
12379
|
setTotalItems: S = void 0,
|
|
12384
|
-
setSearchTreeNameSearch:
|
|
12380
|
+
setSearchTreeNameSearch: O = void 0,
|
|
12385
12381
|
setTreeIsLoading: b = void 0,
|
|
12386
|
-
limit:
|
|
12382
|
+
limit: A,
|
|
12387
12383
|
setLimit: _,
|
|
12388
12384
|
searchParams: R,
|
|
12389
12385
|
searchValues: x,
|
|
@@ -12396,9 +12392,9 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12396
12392
|
}, [R]), se(() => {
|
|
12397
12393
|
t.view_id !== D.view_id && N(!0);
|
|
12398
12394
|
}, [D]);
|
|
12399
|
-
const { clear:
|
|
12395
|
+
const { clear: L, searchFilterLoading: B, searchError: G, offset: $, tableRefreshing: K } = Ea({
|
|
12400
12396
|
model: r,
|
|
12401
|
-
setSearchTreeNameSearch:
|
|
12397
|
+
setSearchTreeNameSearch: O,
|
|
12402
12398
|
setSelectedRowItems: g,
|
|
12403
12399
|
searchParams: R,
|
|
12404
12400
|
setSearchValues: F,
|
|
@@ -12416,7 +12412,7 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12416
12412
|
domain: a,
|
|
12417
12413
|
currentId: h,
|
|
12418
12414
|
setActionViewTotalItems: S,
|
|
12419
|
-
limit:
|
|
12415
|
+
limit: A,
|
|
12420
12416
|
setLimit: _
|
|
12421
12417
|
}), Z = X(
|
|
12422
12418
|
() => er([
|
|
@@ -12448,8 +12444,8 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12448
12444
|
...c == null ? void 0 : c.fields
|
|
12449
12445
|
},
|
|
12450
12446
|
searchFields: Z,
|
|
12451
|
-
limit:
|
|
12452
|
-
onClear:
|
|
12447
|
+
limit: A,
|
|
12448
|
+
onClear: L,
|
|
12453
12449
|
offset: $,
|
|
12454
12450
|
isSearching: B,
|
|
12455
12451
|
onSubmit: (J) => {
|
|
@@ -12470,7 +12466,7 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12470
12466
|
model: r,
|
|
12471
12467
|
context: o,
|
|
12472
12468
|
domain: mn(R || [], a),
|
|
12473
|
-
limit: V ?
|
|
12469
|
+
limit: V ? A : void 0,
|
|
12474
12470
|
manualIds: V && p && p.length > 0 ? p.map((J) => J.id) : void 0
|
|
12475
12471
|
}
|
|
12476
12472
|
)
|
|
@@ -12577,15 +12573,15 @@ function Yg({
|
|
|
12577
12573
|
searchTreeNameSearch: I,
|
|
12578
12574
|
treeIsLoading: T,
|
|
12579
12575
|
setPreviousView: S,
|
|
12580
|
-
previousView:
|
|
12576
|
+
previousView: O,
|
|
12581
12577
|
results: b,
|
|
12582
|
-
limit:
|
|
12578
|
+
limit: A,
|
|
12583
12579
|
totalItems: _,
|
|
12584
12580
|
isActive: R,
|
|
12585
12581
|
isInfiniteTree: x
|
|
12586
12582
|
} = ee(mt), F = Sr(
|
|
12587
12583
|
vn.FEATURE_ADVANCED_EXPORT
|
|
12588
|
-
), { t: D } = de(), [V, N] = C(!1),
|
|
12584
|
+
), { t: D } = de(), [V, N] = C(!1), L = Y(!0), B = E(() => {
|
|
12589
12585
|
var te;
|
|
12590
12586
|
(te = m == null ? void 0 : m.current) == null || te.refreshResults();
|
|
12591
12587
|
}, [m]), { actionButtonProps: G, printButtonProps: $ } = Ba({
|
|
@@ -12601,21 +12597,21 @@ function Yg({
|
|
|
12601
12597
|
() => I !== void 0 && I.trim().length > 0,
|
|
12602
12598
|
[I]
|
|
12603
12599
|
), J = X(() => {
|
|
12604
|
-
var
|
|
12605
|
-
const te = (
|
|
12600
|
+
var M;
|
|
12601
|
+
const te = (M = m == null ? void 0 : m.current) == null ? void 0 : M.getDomain();
|
|
12606
12602
|
return mn(te || [], g || []);
|
|
12607
12603
|
}, [m, g]), Q = E(async () => {
|
|
12608
12604
|
var te;
|
|
12609
12605
|
try {
|
|
12610
12606
|
f == null || f(!0);
|
|
12611
|
-
const
|
|
12607
|
+
const M = s[0].id;
|
|
12612
12608
|
await k.getHandler().duplicate({
|
|
12613
|
-
id:
|
|
12609
|
+
id: M,
|
|
12614
12610
|
model: d,
|
|
12615
12611
|
context: { ...e }
|
|
12616
12612
|
}) && ((te = m == null ? void 0 : m.current) == null || te.refreshResults());
|
|
12617
|
-
} catch (
|
|
12618
|
-
dt(
|
|
12613
|
+
} catch (M) {
|
|
12614
|
+
dt(M);
|
|
12619
12615
|
} finally {
|
|
12620
12616
|
f == null || f(!1);
|
|
12621
12617
|
}
|
|
@@ -12630,11 +12626,11 @@ function Yg({
|
|
|
12630
12626
|
try {
|
|
12631
12627
|
l == null || l(!0), await k.getHandler().deleteObjects({
|
|
12632
12628
|
model: d,
|
|
12633
|
-
ids: s.map((
|
|
12629
|
+
ids: s.map((M) => M.id),
|
|
12634
12630
|
context: { ...e }
|
|
12635
12631
|
}), h == null || h(void 0), p == null || p(void 0), (te = m == null ? void 0 : m.current) == null || te.refreshResults();
|
|
12636
|
-
} catch (
|
|
12637
|
-
dt(
|
|
12632
|
+
} catch (M) {
|
|
12633
|
+
dt(M);
|
|
12638
12634
|
} finally {
|
|
12639
12635
|
l == null || l(!1);
|
|
12640
12636
|
}
|
|
@@ -12653,15 +12649,15 @@ function Yg({
|
|
|
12653
12649
|
[o, S, a]
|
|
12654
12650
|
), H = E(
|
|
12655
12651
|
(te) => {
|
|
12656
|
-
var
|
|
12657
|
-
te && te.trim().length > 0 ? w == null || w(te) : (w == null || w(void 0), x || (
|
|
12652
|
+
var M;
|
|
12653
|
+
te && te.trim().length > 0 ? w == null || w(te) : (w == null || w(void 0), x || (M = m == null ? void 0 : m.current) == null || M.refreshResults());
|
|
12658
12654
|
},
|
|
12659
12655
|
[x, m, w]
|
|
12660
12656
|
), j = E(
|
|
12661
12657
|
(te) => {
|
|
12662
12658
|
if (te.id === "print_screen") {
|
|
12663
|
-
let
|
|
12664
|
-
|
|
12659
|
+
let M = (s == null ? void 0 : s.map((ne) => ne.id)) || [];
|
|
12660
|
+
M.length === 0 && (M = (b == null ? void 0 : b.map((ne) => ne.id)) || []), K(
|
|
12665
12661
|
{
|
|
12666
12662
|
id: -1,
|
|
12667
12663
|
model: d,
|
|
@@ -12669,7 +12665,7 @@ function Yg({
|
|
|
12669
12665
|
type: "ir.actions.report.xml",
|
|
12670
12666
|
datas: {
|
|
12671
12667
|
model: d,
|
|
12672
|
-
ids:
|
|
12668
|
+
ids: M
|
|
12673
12669
|
}
|
|
12674
12670
|
},
|
|
12675
12671
|
e
|
|
@@ -12683,8 +12679,8 @@ function Yg({
|
|
|
12683
12679
|
se(() => {
|
|
12684
12680
|
var te;
|
|
12685
12681
|
if (x && I === void 0) {
|
|
12686
|
-
if (
|
|
12687
|
-
|
|
12682
|
+
if (L.current) {
|
|
12683
|
+
L.current = !1;
|
|
12688
12684
|
return;
|
|
12689
12685
|
}
|
|
12690
12686
|
(te = m == null ? void 0 : m.current) == null || te.refreshResults();
|
|
@@ -12692,10 +12688,10 @@ function Yg({
|
|
|
12692
12688
|
}, [x, I, m]), Wt(
|
|
12693
12689
|
"ctrl+l,command+l",
|
|
12694
12690
|
() => {
|
|
12695
|
-
R &&
|
|
12691
|
+
R && O && (S == null || S(o), a == null || a(O));
|
|
12696
12692
|
},
|
|
12697
12693
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
12698
|
-
[
|
|
12694
|
+
[O, o, R, S, a]
|
|
12699
12695
|
), Wt(
|
|
12700
12696
|
"ctrl+f,command+f",
|
|
12701
12697
|
() => {
|
|
@@ -12798,7 +12794,7 @@ function Yg({
|
|
|
12798
12794
|
currentView: o,
|
|
12799
12795
|
availableViews: r,
|
|
12800
12796
|
onChangeView: me,
|
|
12801
|
-
previousView:
|
|
12797
|
+
previousView: O,
|
|
12802
12798
|
disabled: T
|
|
12803
12799
|
}
|
|
12804
12800
|
)
|
|
@@ -12839,7 +12835,7 @@ function Yg({
|
|
|
12839
12835
|
onClose: () => N(!1),
|
|
12840
12836
|
model: d,
|
|
12841
12837
|
domain: J,
|
|
12842
|
-
limit:
|
|
12838
|
+
limit: A,
|
|
12843
12839
|
totalRegisters: _ || 0,
|
|
12844
12840
|
selectedRegistersToExport: s,
|
|
12845
12841
|
visibleRegisters: (b == null ? void 0 : b.length) || 0,
|
|
@@ -12904,14 +12900,14 @@ const qg = (e) => {
|
|
|
12904
12900
|
setSelectedRowItems: I
|
|
12905
12901
|
} = ee(mt), T = E(
|
|
12906
12902
|
(S) => {
|
|
12907
|
-
const { id:
|
|
12908
|
-
f(
|
|
12909
|
-
const b = u.findIndex((_) => _.id ===
|
|
12903
|
+
const { id: O } = S;
|
|
12904
|
+
f(O);
|
|
12905
|
+
const b = u.findIndex((_) => _.id === O);
|
|
12910
12906
|
v == null || v(y), c(b);
|
|
12911
|
-
const
|
|
12907
|
+
const A = m.find(
|
|
12912
12908
|
(_) => _.type === "form"
|
|
12913
12909
|
);
|
|
12914
|
-
d(
|
|
12910
|
+
d(A);
|
|
12915
12911
|
},
|
|
12916
12912
|
[
|
|
12917
12913
|
m,
|
|
@@ -13118,12 +13114,12 @@ function ty(e, t) {
|
|
|
13118
13114
|
treeExpandable: g = !1,
|
|
13119
13115
|
limit: y,
|
|
13120
13116
|
initialSearchParams: v = []
|
|
13121
|
-
} = e, [w, I] = C(), [T, S] = C([]), [
|
|
13122
|
-
|
|
13123
|
-
), [x, F] = C([]), [D, V] = C(), [N,
|
|
13117
|
+
} = e, [w, I] = C(), [T, S] = C([]), [O, b] = C(!0), A = m || void 0, [_, R] = C(
|
|
13118
|
+
A
|
|
13119
|
+
), [x, F] = C([]), [D, V] = C(), [N, L] = C([]), [B, G] = C(), [$, K] = C(0), [Z, J] = C(!1), [Q, Ce] = C(!1), [me, H] = C(), { t: j } = de(), q = Y(), ie = Y(), te = ee(
|
|
13124
13120
|
bt
|
|
13125
13121
|
), {
|
|
13126
|
-
setCurrentView:
|
|
13122
|
+
setCurrentView: M,
|
|
13127
13123
|
setCurrentId: ne,
|
|
13128
13124
|
tabs: oe,
|
|
13129
13125
|
activeKey: we,
|
|
@@ -13143,9 +13139,9 @@ function ty(e, t) {
|
|
|
13143
13139
|
}
|
|
13144
13140
|
const We = E(
|
|
13145
13141
|
(z) => {
|
|
13146
|
-
I(z),
|
|
13142
|
+
I(z), M == null || M(z);
|
|
13147
13143
|
},
|
|
13148
|
-
[
|
|
13144
|
+
[M]
|
|
13149
13145
|
);
|
|
13150
13146
|
Tt(t, () => ({
|
|
13151
13147
|
canWeClose: ue
|
|
@@ -13259,12 +13255,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13259
13255
|
]);
|
|
13260
13256
|
l({ tabKey: c, canWeClose: ue }), dn(() => {
|
|
13261
13257
|
const z = T.find((_e) => _e.type === "tree"), pe = T.find((_e) => u.id ? _e.type === u.type && _e.view_id === u.id : _e.type === u.type);
|
|
13262
|
-
We(pe || z), m ? ne == null || ne(
|
|
13258
|
+
We(pe || z), m ? ne == null || ne(A) : (Be(void 0), V(void 0)), Ee();
|
|
13263
13259
|
}, [r, a, m]), dn(() => {
|
|
13264
13260
|
if (we === c) {
|
|
13265
13261
|
ne == null || ne(_);
|
|
13266
13262
|
const z = { action_id: h, action_type: p };
|
|
13267
|
-
|
|
13263
|
+
M == null || M({ ...w, extra: z });
|
|
13268
13264
|
}
|
|
13269
13265
|
}, [oe, we]);
|
|
13270
13266
|
async function ue() {
|
|
@@ -13331,7 +13327,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13331
13327
|
We(z);
|
|
13332
13328
|
}
|
|
13333
13329
|
}
|
|
13334
|
-
return
|
|
13330
|
+
return O ? /* @__PURE__ */ i(Ke, {}) : w ? /* @__PURE__ */ P(
|
|
13335
13331
|
wu,
|
|
13336
13332
|
{
|
|
13337
13333
|
title: s,
|
|
@@ -13346,7 +13342,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13346
13342
|
setCurrentItemIndex: V,
|
|
13347
13343
|
currentItemIndex: D,
|
|
13348
13344
|
results: N,
|
|
13349
|
-
setResults:
|
|
13345
|
+
setResults: L,
|
|
13350
13346
|
currentModel: r,
|
|
13351
13347
|
sorter: B,
|
|
13352
13348
|
setSorter: G,
|
|
@@ -13373,7 +13369,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13373
13369
|
domain: n,
|
|
13374
13370
|
formDefaultValues: f,
|
|
13375
13371
|
results: N,
|
|
13376
|
-
setResults:
|
|
13372
|
+
setResults: L,
|
|
13377
13373
|
setCurrentItemIndex: V,
|
|
13378
13374
|
formForcedValues: d,
|
|
13379
13375
|
limit: y,
|
|
@@ -13525,12 +13521,12 @@ function iy(e) {
|
|
|
13525
13521
|
domain: a = [],
|
|
13526
13522
|
visible: s = !0,
|
|
13527
13523
|
parentContext: l = {}
|
|
13528
|
-
} = e, [c, u] = C(!1), [f, d] = C(!1), [m, h] = C(), [p, g] = C(), [y, v] = C(), [w, I] = C(1), [T, S] = C(0),
|
|
13529
|
-
Z(!0), I(
|
|
13524
|
+
} = e, [c, u] = C(!1), [f, d] = C(!1), [m, h] = C(), [p, g] = C(), [y, v] = C(), [w, I] = C(1), [T, S] = C(0), O = Y(jt), b = Y([]), [A, _] = C(0), [R, x] = C([]), [F, D] = C(void 0), [V, N] = C(), [L, B] = C(), [G, $] = C(), [K, Z] = C(!1), J = Y([]), Q = (M) => {
|
|
13525
|
+
Z(!0), I(M), S((M - 1) * O.current);
|
|
13530
13526
|
}, Ce = async () => {
|
|
13531
|
-
const
|
|
13527
|
+
const M = J.current.length > 0 ? J.current : a, ne = mn(b.current, M), { colors: oe } = Mt(p), { totalItems: we, results: ge, attrsEvaluated: Pe } = await k.getHandler().searchForTree({
|
|
13532
13528
|
params: ne,
|
|
13533
|
-
limit:
|
|
13529
|
+
limit: O.current,
|
|
13534
13530
|
offset: T,
|
|
13535
13531
|
model: m,
|
|
13536
13532
|
fields: p.fields,
|
|
@@ -13549,36 +13545,36 @@ function iy(e) {
|
|
|
13549
13545
|
}, me = async () => {
|
|
13550
13546
|
try {
|
|
13551
13547
|
Z(!0), await Ce();
|
|
13552
|
-
} catch (
|
|
13553
|
-
B(JSON.stringify(
|
|
13548
|
+
} catch (M) {
|
|
13549
|
+
B(JSON.stringify(M));
|
|
13554
13550
|
}
|
|
13555
13551
|
};
|
|
13556
13552
|
se(() => {
|
|
13557
13553
|
f && s && me();
|
|
13558
13554
|
}, [w, T, f, s]);
|
|
13559
|
-
const H = async (
|
|
13555
|
+
const H = async (M) => {
|
|
13560
13556
|
d(!1), u(!0), $(void 0);
|
|
13561
13557
|
try {
|
|
13562
|
-
|
|
13558
|
+
M === "action" ? await j() : await q(), d(!0);
|
|
13563
13559
|
} catch (ne) {
|
|
13564
13560
|
$(ne);
|
|
13565
13561
|
} finally {
|
|
13566
13562
|
u(!1);
|
|
13567
13563
|
}
|
|
13568
13564
|
}, j = async () => {
|
|
13569
|
-
const
|
|
13565
|
+
const M = await k.getHandler().getViewsForAction({
|
|
13570
13566
|
action: t,
|
|
13571
13567
|
context: l
|
|
13572
13568
|
});
|
|
13573
|
-
J.current =
|
|
13569
|
+
J.current = M.domain, v(M.views.get("form")), g(M.views.get("tree")), h(M.model), O.current = M.limit;
|
|
13574
13570
|
}, q = async () => {
|
|
13575
13571
|
h(n);
|
|
13576
|
-
const
|
|
13572
|
+
const M = await k.getHandler().getView({
|
|
13577
13573
|
model: n,
|
|
13578
13574
|
type: "form",
|
|
13579
13575
|
context: l
|
|
13580
13576
|
});
|
|
13581
|
-
v(
|
|
13577
|
+
v(M);
|
|
13582
13578
|
const ne = await k.getHandler().getView({
|
|
13583
13579
|
model: n,
|
|
13584
13580
|
type: "tree",
|
|
@@ -13590,21 +13586,21 @@ function iy(e) {
|
|
|
13590
13586
|
se(() => {
|
|
13591
13587
|
t ? H("action") : n && H("model");
|
|
13592
13588
|
}, [t, n]);
|
|
13593
|
-
const ie = (
|
|
13594
|
-
const { id: ne } =
|
|
13589
|
+
const ie = (M) => {
|
|
13590
|
+
const { id: ne } = M;
|
|
13595
13591
|
o({
|
|
13596
13592
|
id: ne,
|
|
13597
13593
|
model: m,
|
|
13598
13594
|
treeView: p
|
|
13599
13595
|
});
|
|
13600
13596
|
}, te = () => !p || !y ? null : /* @__PURE__ */ P("div", { style: { overflowY: "scroll" }, children: [
|
|
13601
|
-
|
|
13597
|
+
L && /* @__PURE__ */ i(at, { className: "mt-10", message: L, type: "error", banner: !0 }),
|
|
13602
13598
|
/* @__PURE__ */ i(
|
|
13603
13599
|
Un,
|
|
13604
13600
|
{
|
|
13605
13601
|
showPagination: !1,
|
|
13606
|
-
total:
|
|
13607
|
-
limit:
|
|
13602
|
+
total: A,
|
|
13603
|
+
limit: O.current,
|
|
13608
13604
|
page: w,
|
|
13609
13605
|
treeView: p,
|
|
13610
13606
|
results: R,
|
|
@@ -13613,11 +13609,11 @@ function iy(e) {
|
|
|
13613
13609
|
onRowClicked: ie,
|
|
13614
13610
|
colorsForResults: F,
|
|
13615
13611
|
sorter: V,
|
|
13616
|
-
onChangeSort: (
|
|
13617
|
-
N == null || N(
|
|
13612
|
+
onChangeSort: (M) => {
|
|
13613
|
+
N == null || N(M);
|
|
13618
13614
|
const ne = an({
|
|
13619
13615
|
resultsToSort: R,
|
|
13620
|
-
sorter:
|
|
13616
|
+
sorter: M,
|
|
13621
13617
|
fields: { ...p.fields, ...y.fields }
|
|
13622
13618
|
});
|
|
13623
13619
|
x(ne);
|
|
@@ -13664,19 +13660,19 @@ function ly(e, t) {
|
|
|
13664
13660
|
async function S() {
|
|
13665
13661
|
u(!0), m(!0), d(void 0);
|
|
13666
13662
|
try {
|
|
13667
|
-
const F = await
|
|
13663
|
+
const F = await O(), D = await A(F), V = F.fields[Br].relation, N = D[Br].items;
|
|
13668
13664
|
y.current = F.fields;
|
|
13669
|
-
const
|
|
13665
|
+
const L = await b({
|
|
13670
13666
|
items: N,
|
|
13671
13667
|
model: V,
|
|
13672
13668
|
context: r
|
|
13673
|
-
}), B = await _(
|
|
13669
|
+
}), B = await _(L);
|
|
13674
13670
|
d(void 0), l(B), u(!1), m(!1);
|
|
13675
13671
|
} catch (F) {
|
|
13676
13672
|
d(JSON.stringify(F));
|
|
13677
13673
|
}
|
|
13678
13674
|
}
|
|
13679
|
-
async function
|
|
13675
|
+
async function O() {
|
|
13680
13676
|
return await v({
|
|
13681
13677
|
model: n,
|
|
13682
13678
|
type: "form",
|
|
@@ -13707,7 +13703,7 @@ function ly(e, t) {
|
|
|
13707
13703
|
});
|
|
13708
13704
|
return N;
|
|
13709
13705
|
}
|
|
13710
|
-
async function
|
|
13706
|
+
async function A(F) {
|
|
13711
13707
|
return (await w({
|
|
13712
13708
|
model: n,
|
|
13713
13709
|
ids: [o],
|
|
@@ -13718,9 +13714,9 @@ function ly(e, t) {
|
|
|
13718
13714
|
async function _(F) {
|
|
13719
13715
|
const D = [];
|
|
13720
13716
|
for (const N of F) {
|
|
13721
|
-
const { values:
|
|
13722
|
-
if (
|
|
13723
|
-
const B = parseInt(
|
|
13717
|
+
const { values: L } = N;
|
|
13718
|
+
if (L.action_id && L.action_id.length > 0) {
|
|
13719
|
+
const B = parseInt(L.action_id[0], 10), G = $s({
|
|
13724
13720
|
actionId: B,
|
|
13725
13721
|
rootContext: r
|
|
13726
13722
|
}).then(($) => ({ ...N, actionData: $ }));
|
|
@@ -13760,14 +13756,14 @@ function ly(e, t) {
|
|
|
13760
13756
|
position: JSON.stringify(G).replace(/"/g, "'")
|
|
13761
13757
|
}
|
|
13762
13758
|
};
|
|
13763
|
-
}),
|
|
13759
|
+
}), L = {
|
|
13764
13760
|
fields: g.current,
|
|
13765
13761
|
items: N
|
|
13766
13762
|
};
|
|
13767
13763
|
await I({
|
|
13768
13764
|
model: n,
|
|
13769
13765
|
id: o,
|
|
13770
|
-
values: { [Br]:
|
|
13766
|
+
values: { [Br]: L },
|
|
13771
13767
|
fields: y.current,
|
|
13772
13768
|
context: r
|
|
13773
13769
|
});
|
|
@@ -13776,7 +13772,7 @@ function ly(e, t) {
|
|
|
13776
13772
|
h(a);
|
|
13777
13773
|
}
|
|
13778
13774
|
return c ? /* @__PURE__ */ i(At, {}) : f ? /* @__PURE__ */ i(at, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(oy, { onPositionItemsChanged: R, children: s.map((F, D) => {
|
|
13779
|
-
const { actionData: V, values: N } = F, { position:
|
|
13775
|
+
const { actionData: V, values: N } = F, { position: L, id: B } = N, {
|
|
13780
13776
|
actionId: G,
|
|
13781
13777
|
actionType: $,
|
|
13782
13778
|
key: K,
|
|
@@ -13791,7 +13787,7 @@ function ly(e, t) {
|
|
|
13791
13787
|
} = V;
|
|
13792
13788
|
let ie = {};
|
|
13793
13789
|
try {
|
|
13794
|
-
ie = JSON.parse(
|
|
13790
|
+
ie = JSON.parse(L.replace(/'/g, '"'));
|
|
13795
13791
|
} catch {
|
|
13796
13792
|
ie = { x: D * 2, y: 0, w: 2, h: 3 };
|
|
13797
13793
|
}
|
|
@@ -13869,7 +13865,7 @@ function ly(e, t) {
|
|
|
13869
13865
|
B
|
|
13870
13866
|
);
|
|
13871
13867
|
}
|
|
13872
|
-
let
|
|
13868
|
+
let M;
|
|
13873
13869
|
const ne = Q.find((oe) => {
|
|
13874
13870
|
const [, we] = oe;
|
|
13875
13871
|
return we === "tree";
|
|
@@ -13881,7 +13877,7 @@ function ly(e, t) {
|
|
|
13881
13877
|
title: Be,
|
|
13882
13878
|
model: We
|
|
13883
13879
|
} = V;
|
|
13884
|
-
|
|
13880
|
+
M = {
|
|
13885
13881
|
action_id: ge,
|
|
13886
13882
|
action_type: Pe,
|
|
13887
13883
|
name: Be,
|
|
@@ -13898,7 +13894,7 @@ function ly(e, t) {
|
|
|
13898
13894
|
id: B,
|
|
13899
13895
|
title: Z,
|
|
13900
13896
|
parms: ie,
|
|
13901
|
-
action:
|
|
13897
|
+
action: M,
|
|
13902
13898
|
openAction: h,
|
|
13903
13899
|
tooltip: J,
|
|
13904
13900
|
children: te
|
|
@@ -13911,18 +13907,18 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13911
13907
|
const { ooui: t } = e;
|
|
13912
13908
|
return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(uy, { ooui: t }) });
|
|
13913
13909
|
}, uy = (e) => {
|
|
13914
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((
|
|
13910
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [s, l] = C([]), [c, u] = C(), [f, d] = C(!1), { relation: m, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Ue), { getContext: w } = v || {};
|
|
13915
13911
|
Ft(() => {
|
|
13916
13912
|
T();
|
|
13917
13913
|
}, [o]);
|
|
13918
|
-
const I = (
|
|
13914
|
+
const I = (A) => {
|
|
13919
13915
|
r == null || r({
|
|
13920
|
-
items:
|
|
13916
|
+
items: A
|
|
13921
13917
|
});
|
|
13922
13918
|
};
|
|
13923
13919
|
async function T() {
|
|
13924
13920
|
d(!0);
|
|
13925
|
-
let
|
|
13921
|
+
let A = [];
|
|
13926
13922
|
if (n.domain) {
|
|
13927
13923
|
const _ = await k.getHandler().evalDomain({
|
|
13928
13924
|
domain: n.domain,
|
|
@@ -13933,12 +13929,12 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13933
13929
|
fields: v == null ? void 0 : v.getFields(),
|
|
13934
13930
|
context: v.getContext()
|
|
13935
13931
|
});
|
|
13936
|
-
|
|
13932
|
+
A = [...A, ..._];
|
|
13937
13933
|
}
|
|
13938
13934
|
try {
|
|
13939
13935
|
const R = (await k.getHandler().search({
|
|
13940
13936
|
model: m,
|
|
13941
|
-
params:
|
|
13937
|
+
params: A,
|
|
13942
13938
|
fieldsToRetrieve: [g],
|
|
13943
13939
|
context: { ...w == null ? void 0 : w(), ...h }
|
|
13944
13940
|
})).map((x) => {
|
|
@@ -13956,15 +13952,15 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13956
13952
|
return /* @__PURE__ */ i(at, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
13957
13953
|
}
|
|
13958
13954
|
const S = () => {
|
|
13959
|
-
b(s.map((
|
|
13960
|
-
},
|
|
13955
|
+
b(s.map((A) => A.value));
|
|
13956
|
+
}, O = () => {
|
|
13961
13957
|
b([]);
|
|
13962
|
-
}, b = (
|
|
13963
|
-
const _ = o.map((x) =>
|
|
13958
|
+
}, b = (A) => {
|
|
13959
|
+
const _ = o.map((x) => A.includes(x.id) ? x.operation == "pendingRemove" ? {
|
|
13964
13960
|
...x,
|
|
13965
13961
|
operation: "original"
|
|
13966
13962
|
} : x : { id: x.id, operation: "pendingRemove" }), R = _.map((x) => x.id);
|
|
13967
|
-
|
|
13963
|
+
A.filter((x) => !R.includes(x)).map((x) => {
|
|
13968
13964
|
_.push({ id: x, operation: "pendingLink" });
|
|
13969
13965
|
}), I(_);
|
|
13970
13966
|
};
|
|
@@ -13976,7 +13972,7 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13976
13972
|
disabled: p,
|
|
13977
13973
|
onChange: b,
|
|
13978
13974
|
style: { width: "100%" },
|
|
13979
|
-
children: /* @__PURE__ */ i(je, { children: s.map((
|
|
13975
|
+
children: /* @__PURE__ */ i(je, { children: s.map((A) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(On, { value: A.value, children: A.label }) })) })
|
|
13980
13976
|
}
|
|
13981
13977
|
),
|
|
13982
13978
|
!p && /* @__PURE__ */ P(Xe, { children: [
|
|
@@ -13988,7 +13984,7 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13988
13984
|
children: "Check all"
|
|
13989
13985
|
}
|
|
13990
13986
|
),
|
|
13991
|
-
/* @__PURE__ */ i(Le, { onClick:
|
|
13987
|
+
/* @__PURE__ */ i(Le, { onClick: O, disabled: a.length === 0, children: "Uncheck all" })
|
|
13992
13988
|
] })
|
|
13993
13989
|
] }) });
|
|
13994
13990
|
}, fy = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(my, { ...e }) }), my = (e) => {
|
|
@@ -14282,31 +14278,31 @@ function Hy(e, t) {
|
|
|
14282
14278
|
handleOpenActionUrl: p,
|
|
14283
14279
|
handleOpenActionResourceUrl: g
|
|
14284
14280
|
}));
|
|
14285
|
-
function m(
|
|
14286
|
-
if (
|
|
14287
|
-
const b = c.findIndex((
|
|
14281
|
+
function m(O) {
|
|
14282
|
+
if (O === r) {
|
|
14283
|
+
const b = c.findIndex((A) => A.key === O);
|
|
14288
14284
|
c[b - 1] && o(c[b - 1].key), c[b + 1] && o(c[b + 1].key);
|
|
14289
14285
|
}
|
|
14290
|
-
u(c.filter((b) => b.key !==
|
|
14286
|
+
u(c.filter((b) => b.key !== O)), f.current.delete(O);
|
|
14291
14287
|
}
|
|
14292
14288
|
function h({
|
|
14293
|
-
tabKey:
|
|
14289
|
+
tabKey: O,
|
|
14294
14290
|
canWeClose: b
|
|
14295
14291
|
}) {
|
|
14296
|
-
f.current.set(
|
|
14292
|
+
f.current.set(O, b);
|
|
14297
14293
|
}
|
|
14298
|
-
async function p(
|
|
14299
|
-
const { actionRawData: b, res_id:
|
|
14300
|
-
model:
|
|
14294
|
+
async function p(O) {
|
|
14295
|
+
const { actionRawData: b, res_id: A, initialView: _ } = O, R = await k.getHandler().getFields({
|
|
14296
|
+
model: O.model,
|
|
14301
14297
|
context: l
|
|
14302
14298
|
});
|
|
14303
14299
|
let x = el(
|
|
14304
14300
|
b == null ? void 0 : b.values
|
|
14305
14301
|
);
|
|
14306
|
-
const F =
|
|
14302
|
+
const F = A || x.active_id || x.id;
|
|
14307
14303
|
if (F) {
|
|
14308
14304
|
const N = await k.getHandler().readObjects({
|
|
14309
|
-
model:
|
|
14305
|
+
model: O.model,
|
|
14310
14306
|
context: l,
|
|
14311
14307
|
ids: [F]
|
|
14312
14308
|
});
|
|
@@ -14331,7 +14327,7 @@ function Hy(e, t) {
|
|
|
14331
14327
|
}
|
|
14332
14328
|
})();
|
|
14333
14329
|
S({
|
|
14334
|
-
...
|
|
14330
|
+
...O,
|
|
14335
14331
|
context: { ...l, ...D },
|
|
14336
14332
|
domain: V,
|
|
14337
14333
|
actionRawData: {
|
|
@@ -14342,12 +14338,12 @@ function Hy(e, t) {
|
|
|
14342
14338
|
});
|
|
14343
14339
|
}
|
|
14344
14340
|
async function g({
|
|
14345
|
-
model:
|
|
14341
|
+
model: O,
|
|
14346
14342
|
view_id: b,
|
|
14347
|
-
res_id:
|
|
14343
|
+
res_id: A
|
|
14348
14344
|
}) {
|
|
14349
14345
|
const _ = await k.getHandler().getView({
|
|
14350
|
-
model:
|
|
14346
|
+
model: O,
|
|
14351
14347
|
id: b || void 0,
|
|
14352
14348
|
type: "form",
|
|
14353
14349
|
context: l
|
|
@@ -14355,34 +14351,34 @@ function Hy(e, t) {
|
|
|
14355
14351
|
return await S({
|
|
14356
14352
|
action_id: -1,
|
|
14357
14353
|
action_type: "ir.actions.act_window",
|
|
14358
|
-
model:
|
|
14354
|
+
model: O,
|
|
14359
14355
|
views: [[_.view_id, "form"]],
|
|
14360
14356
|
context: l,
|
|
14361
14357
|
domain: [],
|
|
14362
|
-
title: _.title ||
|
|
14358
|
+
title: _.title || O,
|
|
14363
14359
|
target: "current",
|
|
14364
14360
|
initialView: { id: _.view_id, type: "form" },
|
|
14365
|
-
res_id:
|
|
14361
|
+
res_id: A
|
|
14366
14362
|
});
|
|
14367
14363
|
}
|
|
14368
14364
|
async function y({
|
|
14369
|
-
action:
|
|
14365
|
+
action: O,
|
|
14370
14366
|
values: b,
|
|
14371
|
-
forced_values:
|
|
14367
|
+
forced_values: A,
|
|
14372
14368
|
initialViewType: _,
|
|
14373
14369
|
res_id: R,
|
|
14374
14370
|
domain: x = []
|
|
14375
14371
|
}) {
|
|
14376
14372
|
const F = await k.getHandler().getActionData({
|
|
14377
|
-
action:
|
|
14373
|
+
action: O,
|
|
14378
14374
|
context: l
|
|
14379
14375
|
});
|
|
14380
14376
|
if (F.type === "ir.actions.wizard") {
|
|
14381
14377
|
dt("Action type not supported");
|
|
14382
14378
|
return;
|
|
14383
14379
|
}
|
|
14384
|
-
const [D, V] =
|
|
14385
|
-
context:
|
|
14380
|
+
const [D, V] = O.split(","), N = parseInt(V), L = F.context, B = Nt({
|
|
14381
|
+
context: L,
|
|
14386
14382
|
values: s
|
|
14387
14383
|
}), G = F.domain, $ = await (async () => {
|
|
14388
14384
|
try {
|
|
@@ -14403,25 +14399,25 @@ function Hy(e, t) {
|
|
|
14403
14399
|
limit: me
|
|
14404
14400
|
} = F, H = Ce === "tree", j = [];
|
|
14405
14401
|
for (const ie of Z) {
|
|
14406
|
-
const [te,
|
|
14402
|
+
const [te, M] = ie;
|
|
14407
14403
|
if (te)
|
|
14408
14404
|
j.push(ie);
|
|
14409
|
-
else if (
|
|
14405
|
+
else if (M === "dashboard")
|
|
14410
14406
|
j.push([void 0, "dashboard"]);
|
|
14411
14407
|
else {
|
|
14412
14408
|
const { view_id: ne } = await k.getHandler().getView({
|
|
14413
14409
|
model: K,
|
|
14414
|
-
type:
|
|
14410
|
+
type: M,
|
|
14415
14411
|
id: te,
|
|
14416
14412
|
context: { ...l, ...B }
|
|
14417
14413
|
});
|
|
14418
|
-
j.push([ne,
|
|
14414
|
+
j.push([ne, M]);
|
|
14419
14415
|
}
|
|
14420
14416
|
}
|
|
14421
14417
|
let q;
|
|
14422
14418
|
if (_) {
|
|
14423
14419
|
const [ie, te] = j.find(
|
|
14424
|
-
([
|
|
14420
|
+
([M, ne]) => ne === _
|
|
14425
14421
|
);
|
|
14426
14422
|
q = { id: ie, type: te };
|
|
14427
14423
|
} else {
|
|
@@ -14439,38 +14435,38 @@ function Hy(e, t) {
|
|
|
14439
14435
|
action_type: D,
|
|
14440
14436
|
action_id: N,
|
|
14441
14437
|
values: b,
|
|
14442
|
-
forced_values:
|
|
14438
|
+
forced_values: A,
|
|
14443
14439
|
res_id: R,
|
|
14444
14440
|
treeExpandable: H,
|
|
14445
14441
|
limit: me,
|
|
14446
14442
|
actionRawData: {
|
|
14447
|
-
context:
|
|
14443
|
+
context: L,
|
|
14448
14444
|
domain: G
|
|
14449
14445
|
}
|
|
14450
14446
|
});
|
|
14451
14447
|
}
|
|
14452
14448
|
function v({
|
|
14453
|
-
title:
|
|
14449
|
+
title: O,
|
|
14454
14450
|
content: b,
|
|
14455
|
-
key:
|
|
14451
|
+
key: A,
|
|
14456
14452
|
action: _
|
|
14457
14453
|
}) {
|
|
14458
14454
|
let R = [...c];
|
|
14459
14455
|
c.length === 1 && c[0].key === "welcome" && (R = [...c.filter((x) => x.key !== "welcome")]), u([
|
|
14460
14456
|
...R,
|
|
14461
14457
|
{
|
|
14462
|
-
title:
|
|
14463
|
-
key:
|
|
14458
|
+
title: O,
|
|
14459
|
+
key: A,
|
|
14464
14460
|
closable: !0,
|
|
14465
14461
|
content: b,
|
|
14466
14462
|
action: _
|
|
14467
14463
|
}
|
|
14468
|
-
]), o(
|
|
14464
|
+
]), o(A);
|
|
14469
14465
|
}
|
|
14470
14466
|
async function w({
|
|
14471
|
-
relateData:
|
|
14467
|
+
relateData: O,
|
|
14472
14468
|
fields: b,
|
|
14473
|
-
values:
|
|
14469
|
+
values: A,
|
|
14474
14470
|
action_id: _,
|
|
14475
14471
|
action_type: R
|
|
14476
14472
|
}) {
|
|
@@ -14480,16 +14476,16 @@ function Hy(e, t) {
|
|
|
14480
14476
|
domain: D,
|
|
14481
14477
|
views: V,
|
|
14482
14478
|
target: N,
|
|
14483
|
-
string:
|
|
14479
|
+
string: L,
|
|
14484
14480
|
limit: B
|
|
14485
|
-
} =
|
|
14481
|
+
} = O, [G, $] = V[0], K = { id: G, type: $ }, Z = F, J = Nt({
|
|
14486
14482
|
context: Z,
|
|
14487
|
-
values: { ...
|
|
14483
|
+
values: { ...A, ...s }
|
|
14488
14484
|
}), Q = D, Ce = D ? await k.getHandler().evalDomain({
|
|
14489
14485
|
domain: D,
|
|
14490
14486
|
values: Qt({
|
|
14491
14487
|
fields: b,
|
|
14492
|
-
values: { ...
|
|
14488
|
+
values: { ...A, ...s }
|
|
14493
14489
|
}),
|
|
14494
14490
|
fields: b,
|
|
14495
14491
|
context: { ...l, ...J }
|
|
@@ -14500,7 +14496,7 @@ function Hy(e, t) {
|
|
|
14500
14496
|
views: V,
|
|
14501
14497
|
context: { ...l, ...J },
|
|
14502
14498
|
domain: Ce,
|
|
14503
|
-
title:
|
|
14499
|
+
title: L,
|
|
14504
14500
|
initialView: K,
|
|
14505
14501
|
action_id: _,
|
|
14506
14502
|
action_type: R,
|
|
@@ -14509,24 +14505,24 @@ function Hy(e, t) {
|
|
|
14509
14505
|
context: Z,
|
|
14510
14506
|
domain: Q,
|
|
14511
14507
|
fields: b,
|
|
14512
|
-
values:
|
|
14508
|
+
values: A
|
|
14513
14509
|
}
|
|
14514
14510
|
});
|
|
14515
14511
|
}
|
|
14516
|
-
async function I(
|
|
14512
|
+
async function I(O) {
|
|
14517
14513
|
const {
|
|
14518
14514
|
action_id: b,
|
|
14519
|
-
action_type:
|
|
14515
|
+
action_type: A,
|
|
14520
14516
|
res_id: _,
|
|
14521
14517
|
view_id: R,
|
|
14522
14518
|
overrideUnsettedLimit: x = !1,
|
|
14523
14519
|
values: F = {},
|
|
14524
14520
|
domain: D
|
|
14525
|
-
} =
|
|
14521
|
+
} = O, V = `${A},${b}`, N = await k.getHandler().getActionData({
|
|
14526
14522
|
action: V,
|
|
14527
14523
|
context: l
|
|
14528
|
-
}),
|
|
14529
|
-
context:
|
|
14524
|
+
}), L = N.context, B = Nt({
|
|
14525
|
+
context: L,
|
|
14530
14526
|
values: { ...s, ...F },
|
|
14531
14527
|
fields: {}
|
|
14532
14528
|
});
|
|
@@ -14545,10 +14541,10 @@ function Hy(e, t) {
|
|
|
14545
14541
|
view_type: Ce,
|
|
14546
14542
|
limit: me
|
|
14547
14543
|
} = N, H = Ce === "tree", j = [];
|
|
14548
|
-
for (const
|
|
14549
|
-
const [ne, oe] =
|
|
14544
|
+
for (const M of Z) {
|
|
14545
|
+
const [ne, oe] = M;
|
|
14550
14546
|
if (ne)
|
|
14551
|
-
j.push(
|
|
14547
|
+
j.push(M);
|
|
14552
14548
|
else if (oe === "dashboard")
|
|
14553
14549
|
j.push([void 0, "dashboard"]);
|
|
14554
14550
|
else {
|
|
@@ -14563,10 +14559,10 @@ function Hy(e, t) {
|
|
|
14563
14559
|
}
|
|
14564
14560
|
let q, ie;
|
|
14565
14561
|
if (R == null) {
|
|
14566
|
-
const
|
|
14567
|
-
q = void 0, ie =
|
|
14562
|
+
const M = j.find((ne) => ne[0] === void 0);
|
|
14563
|
+
q = void 0, ie = M[1];
|
|
14568
14564
|
} else
|
|
14569
|
-
[q, ie] = j.find((
|
|
14565
|
+
[q, ie] = j.find((M) => M[0] === void 0 ? !1 : M[0] === R);
|
|
14570
14566
|
const te = { id: q, type: ie };
|
|
14571
14567
|
S({
|
|
14572
14568
|
domain: G,
|
|
@@ -14577,39 +14573,39 @@ function Hy(e, t) {
|
|
|
14577
14573
|
target: Q,
|
|
14578
14574
|
initialView: te,
|
|
14579
14575
|
action_id: b,
|
|
14580
|
-
action_type:
|
|
14576
|
+
action_type: A,
|
|
14581
14577
|
res_id: _,
|
|
14582
14578
|
treeExpandable: H,
|
|
14583
14579
|
limit: x && (me === 0 || me === !1) ? jt : me,
|
|
14584
14580
|
actionRawData: {
|
|
14585
|
-
context:
|
|
14581
|
+
context: L,
|
|
14586
14582
|
domain: $,
|
|
14587
14583
|
values: F
|
|
14588
14584
|
}
|
|
14589
14585
|
});
|
|
14590
14586
|
}
|
|
14591
14587
|
async function T({
|
|
14592
|
-
model:
|
|
14588
|
+
model: O,
|
|
14593
14589
|
values: b,
|
|
14594
|
-
forced_values:
|
|
14590
|
+
forced_values: A,
|
|
14595
14591
|
initialViewType: _,
|
|
14596
14592
|
res_id: R,
|
|
14597
14593
|
domain: x
|
|
14598
14594
|
}) {
|
|
14599
|
-
const F = await k.getHandler().getActionStringForModel(
|
|
14595
|
+
const F = await k.getHandler().getActionStringForModel(O);
|
|
14600
14596
|
await y({
|
|
14601
14597
|
action: F,
|
|
14602
14598
|
values: b,
|
|
14603
|
-
forced_values:
|
|
14599
|
+
forced_values: A,
|
|
14604
14600
|
initialViewType: _,
|
|
14605
14601
|
res_id: R,
|
|
14606
14602
|
domain: x
|
|
14607
14603
|
});
|
|
14608
14604
|
}
|
|
14609
|
-
async function S(
|
|
14605
|
+
async function S(O) {
|
|
14610
14606
|
const {
|
|
14611
14607
|
domain: b,
|
|
14612
|
-
context:
|
|
14608
|
+
context: A,
|
|
14613
14609
|
model: _,
|
|
14614
14610
|
views: R,
|
|
14615
14611
|
title: x,
|
|
@@ -14617,29 +14613,29 @@ function Hy(e, t) {
|
|
|
14617
14613
|
initialView: D,
|
|
14618
14614
|
action_id: V,
|
|
14619
14615
|
action_type: N,
|
|
14620
|
-
res_id:
|
|
14616
|
+
res_id: L,
|
|
14621
14617
|
values: B,
|
|
14622
14618
|
forced_values: G,
|
|
14623
14619
|
treeExpandable: $ = !1,
|
|
14624
14620
|
limit: K,
|
|
14625
14621
|
searchParams: Z
|
|
14626
|
-
} =
|
|
14622
|
+
} = O, J = Co();
|
|
14627
14623
|
if (F !== "current" && F !== void 0) {
|
|
14628
14624
|
const Q = await k.getHandler().getView({
|
|
14629
14625
|
model: _,
|
|
14630
14626
|
type: "form",
|
|
14631
14627
|
id: D.type === "form" ? D.id : void 0,
|
|
14632
|
-
context: { ...l, ...
|
|
14628
|
+
context: { ...l, ...A }
|
|
14633
14629
|
});
|
|
14634
14630
|
d.current.openActionModal({
|
|
14635
14631
|
domain: b,
|
|
14636
14632
|
model: _,
|
|
14637
14633
|
formView: Q,
|
|
14638
|
-
context: { ...l, ...
|
|
14634
|
+
context: { ...l, ...A },
|
|
14639
14635
|
actionData: {
|
|
14640
14636
|
action_id: V,
|
|
14641
14637
|
action_type: N,
|
|
14642
|
-
res_id:
|
|
14638
|
+
res_id: L,
|
|
14643
14639
|
view_id: Q.view_id
|
|
14644
14640
|
}
|
|
14645
14641
|
});
|
|
@@ -14656,11 +14652,11 @@ function Hy(e, t) {
|
|
|
14656
14652
|
title: x,
|
|
14657
14653
|
views: R,
|
|
14658
14654
|
model: _,
|
|
14659
|
-
context: { ...
|
|
14655
|
+
context: { ...A, ...l },
|
|
14660
14656
|
domain: b,
|
|
14661
14657
|
setCanWeClose: h,
|
|
14662
14658
|
initialView: Q,
|
|
14663
|
-
res_id:
|
|
14659
|
+
res_id: L,
|
|
14664
14660
|
formDefaultValues: B,
|
|
14665
14661
|
formForcedValues: G,
|
|
14666
14662
|
treeExpandable: $,
|
|
@@ -14669,7 +14665,7 @@ function Hy(e, t) {
|
|
|
14669
14665
|
}
|
|
14670
14666
|
),
|
|
14671
14667
|
key: J,
|
|
14672
|
-
action:
|
|
14668
|
+
action: O
|
|
14673
14669
|
});
|
|
14674
14670
|
}
|
|
14675
14671
|
}
|
|
@@ -14682,12 +14678,12 @@ function Hy(e, t) {
|
|
|
14682
14678
|
openDefaultActionForModel: T,
|
|
14683
14679
|
tabs: c,
|
|
14684
14680
|
activeKey: r,
|
|
14685
|
-
onRemoveTab: async (
|
|
14686
|
-
const b = f.current.get(
|
|
14687
|
-
(await (b == null ? void 0 : b()) || r === "welcome") && m(
|
|
14681
|
+
onRemoveTab: async (O) => {
|
|
14682
|
+
const b = f.current.get(O);
|
|
14683
|
+
(await (b == null ? void 0 : b()) || r === "welcome") && m(O);
|
|
14688
14684
|
},
|
|
14689
|
-
onChangeTab: (
|
|
14690
|
-
o(
|
|
14685
|
+
onChangeTab: (O) => {
|
|
14686
|
+
o(O);
|
|
14691
14687
|
},
|
|
14692
14688
|
children: /* @__PURE__ */ i(
|
|
14693
14689
|
Ju,
|
|
@@ -14842,7 +14838,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14842
14838
|
se(() => {
|
|
14843
14839
|
b();
|
|
14844
14840
|
}, [S]);
|
|
14845
|
-
function
|
|
14841
|
+
function O(x) {
|
|
14846
14842
|
const F = x;
|
|
14847
14843
|
(F == null ? void 0 : F.action_type) !== "ir.actions.wizard" && p(F);
|
|
14848
14844
|
}
|
|
@@ -14852,7 +14848,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14852
14848
|
const x = await n(T);
|
|
14853
14849
|
x !== !1 && u(x), l(x !== !1);
|
|
14854
14850
|
}, [T, n]);
|
|
14855
|
-
async function
|
|
14851
|
+
async function A() {
|
|
14856
14852
|
var x;
|
|
14857
14853
|
(x = m == null ? void 0 : m.current) == null || x.close(), I == null || I({ model: "ir.ui.view_sc" });
|
|
14858
14854
|
}
|
|
@@ -14879,7 +14875,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14879
14875
|
else {
|
|
14880
14876
|
if (!v)
|
|
14881
14877
|
return;
|
|
14882
|
-
const x = g.find((
|
|
14878
|
+
const x = g.find((L) => L.key === y), { action_id: F, action_type: D } = (x == null ? void 0 : x.action) || {}, V = v.view_id;
|
|
14883
14879
|
let N = !1;
|
|
14884
14880
|
if (!F || !D) {
|
|
14885
14881
|
l(!1);
|
|
@@ -14910,7 +14906,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14910
14906
|
ref: m,
|
|
14911
14907
|
isFavourite: s,
|
|
14912
14908
|
onToggleFavourite: R,
|
|
14913
|
-
onItemClick:
|
|
14909
|
+
onItemClick: O,
|
|
14914
14910
|
placement: "bottomRight",
|
|
14915
14911
|
header: /* @__PURE__ */ P("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
14916
14912
|
/* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
|
|
@@ -14918,7 +14914,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14918
14914
|
ps,
|
|
14919
14915
|
{
|
|
14920
14916
|
style: { color: d.colorPrimary, cursor: "pointer" },
|
|
14921
|
-
onClick:
|
|
14917
|
+
onClick: A
|
|
14922
14918
|
}
|
|
14923
14919
|
) }) })
|
|
14924
14920
|
] }),
|