@gisce/react-ooui 2.59.0 → 2.59.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -472,7 +472,7 @@ const xo = (e) => {
|
|
|
472
472
|
async function I() {
|
|
473
473
|
l && o && (y(!0), await p({ type: l, action: o, context: d }), y(!1));
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function A() {
|
|
476
476
|
if (c) {
|
|
477
477
|
Lt({
|
|
478
478
|
confirmMessage: c,
|
|
@@ -492,7 +492,7 @@ const xo = (e) => {
|
|
|
492
492
|
yl.Button,
|
|
493
493
|
{
|
|
494
494
|
disabled: !s || m,
|
|
495
|
-
onClick:
|
|
495
|
+
onClick: A,
|
|
496
496
|
icon: /* @__PURE__ */ i(dr, {}),
|
|
497
497
|
type: f ? "primary" : void 0,
|
|
498
498
|
overlay: /* @__PURE__ */ i(
|
|
@@ -546,8 +546,8 @@ const xo = (e) => {
|
|
|
546
546
|
if (g)
|
|
547
547
|
return /* @__PURE__ */ i(At, {});
|
|
548
548
|
if (d) {
|
|
549
|
-
const
|
|
550
|
-
return
|
|
549
|
+
const A = ft(d);
|
|
550
|
+
return A && /* @__PURE__ */ i(A, {});
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
return /* @__PURE__ */ i(
|
|
@@ -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 T = await I();
|
|
637
|
+
await A(T);
|
|
638
|
+
} catch (T) {
|
|
639
|
+
dt(T);
|
|
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 A(T) {
|
|
655
655
|
const _ = {};
|
|
656
|
-
for (const R of
|
|
656
|
+
for (const R of T) {
|
|
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((T, _) => /* @__PURE__ */ P(je, { style: { paddingBottom: 20 }, children: [
|
|
669
|
+
/* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children: T.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[T.code] || "",
|
|
675
675
|
onChange: (R) => {
|
|
676
676
|
y({
|
|
677
677
|
...g,
|
|
678
|
-
[
|
|
678
|
+
[T.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 T of Object.keys(g))
|
|
690
|
+
g[T] !== v.current[T] && await k.getHandler().update({
|
|
691
691
|
model: r,
|
|
692
692
|
id: o,
|
|
693
|
-
values: { [a]: g[
|
|
693
|
+
values: { [a]: g[T] },
|
|
694
694
|
context: {
|
|
695
|
-
lang:
|
|
695
|
+
lang: T
|
|
696
696
|
},
|
|
697
697
|
fields: {}
|
|
698
698
|
});
|
|
699
|
-
} catch (
|
|
700
|
-
dt(
|
|
699
|
+
} catch (T) {
|
|
700
|
+
dt(T);
|
|
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")
|
|
@@ -871,12 +871,12 @@ const As = ze(
|
|
|
871
871
|
d(!1);
|
|
872
872
|
}, []), I = E(() => {
|
|
873
873
|
d(!1), l == null || l();
|
|
874
|
-
}, [l]),
|
|
874
|
+
}, [l]), A = g ? nd : td;
|
|
875
875
|
return a ? /* @__PURE__ */ P(le, { children: [
|
|
876
876
|
/* @__PURE__ */ i("div", { onClick: v, children: /* @__PURE__ */ i(
|
|
877
877
|
Dn,
|
|
878
878
|
{
|
|
879
|
-
component:
|
|
879
|
+
component: A,
|
|
880
880
|
ooui: e,
|
|
881
881
|
value: t,
|
|
882
882
|
disabled: !0,
|
|
@@ -1536,12 +1536,12 @@ const Qt = ({
|
|
|
1536
1536
|
summaryField: v,
|
|
1537
1537
|
titleField: w,
|
|
1538
1538
|
iconField: I,
|
|
1539
|
-
colorField:
|
|
1540
|
-
} = r, S = a.filter((F) => F.values),
|
|
1539
|
+
colorField: A
|
|
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 T = (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
|
+
T(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[A] && (D.color = !ws(F.values[A]) && !bs(F.values[A]) && !F.values[A].toString().startsWith("#") ? $n(F.values[A]) : F.values[A]), D;
|
|
1596
1596
|
});
|
|
1597
1597
|
return /* @__PURE__ */ P(le, { children: [
|
|
1598
1598
|
/* @__PURE__ */ i(Ji, { style: { padding: "1rem" }, items: x }),
|
|
@@ -2029,18 +2029,18 @@ async function $s({
|
|
|
2029
2029
|
values: n,
|
|
2030
2030
|
context: l
|
|
2031
2031
|
}) : [], y = [];
|
|
2032
|
-
for (const
|
|
2033
|
-
const [S,
|
|
2032
|
+
for (const A of u) {
|
|
2033
|
+
const [S, O] = A;
|
|
2034
2034
|
if (S)
|
|
2035
|
-
y.push(
|
|
2035
|
+
y.push(A);
|
|
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 };
|
|
@@ -2074,25 +2074,25 @@ const Gd = (e) => {
|
|
|
2074
2074
|
});
|
|
2075
2075
|
if (!g.active_id)
|
|
2076
2076
|
throw s(v), new Error("active_id_not_found");
|
|
2077
|
-
const { views: w } = v, I = w.find((
|
|
2078
|
-
const [, S] =
|
|
2077
|
+
const { views: w } = v, I = w.find((A) => {
|
|
2078
|
+
const [, S] = A;
|
|
2079
2079
|
return S === "tree";
|
|
2080
2080
|
});
|
|
2081
2081
|
if (I) {
|
|
2082
|
-
const [
|
|
2083
|
-
actionId:
|
|
2082
|
+
const [A, S] = I, {
|
|
2083
|
+
actionId: O,
|
|
2084
2084
|
actionType: b,
|
|
2085
|
-
title:
|
|
2085
|
+
title: T,
|
|
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: T,
|
|
2093
2093
|
res_id: !1,
|
|
2094
2094
|
res_model: _,
|
|
2095
|
-
view_id:
|
|
2095
|
+
view_id: A,
|
|
2096
2096
|
view_type: S,
|
|
2097
2097
|
overrideUnsettedLimit: !0,
|
|
2098
2098
|
values: {
|
|
@@ -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,
|
|
2344
|
+
} = e, [h, p] = C(!1), [g, y] = C(), [v, w] = C(0), [I, A] = C(), [S, O] = C(), [b, T] = 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,17 +2410,17 @@ 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
|
+
}), A($);
|
|
2424
2424
|
}
|
|
2425
2425
|
if ($ ? (K = Math.round(Z / $ * 100 * 100) / 100, w(K)) : w(0), o) {
|
|
2426
2426
|
const J = await N({
|
|
@@ -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
|
+
T(J);
|
|
2441
2441
|
} else
|
|
2442
|
-
|
|
2442
|
+
T(l);
|
|
2443
2443
|
R(void 0);
|
|
2444
2444
|
} catch (Z) {
|
|
2445
2445
|
R(JSON.stringify(Z));
|
|
@@ -2472,23 +2472,23 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2472
2472
|
k.getHandler().getFields
|
|
2473
2473
|
), [I] = Je(
|
|
2474
2474
|
k.getHandler().readObjects
|
|
2475
|
-
), [
|
|
2475
|
+
), [A] = 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, T;
|
|
2479
2479
|
try {
|
|
2480
|
-
({ values: b, fields:
|
|
2480
|
+
({ values: b, fields: T } = 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,
|
|
2490
2490
|
readObjects: I,
|
|
2491
|
-
search:
|
|
2491
|
+
search: A
|
|
2492
2492
|
}
|
|
2493
2493
|
}));
|
|
2494
2494
|
} catch (_) {
|
|
@@ -2496,7 +2496,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2496
2496
|
return;
|
|
2497
2497
|
}
|
|
2498
2498
|
try {
|
|
2499
|
-
if (!b || !
|
|
2499
|
+
if (!b || !T)
|
|
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: T,
|
|
2513
2513
|
options: {
|
|
2514
2514
|
uninformedString: s
|
|
2515
2515
|
}
|
|
@@ -2533,7 +2533,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2533
2533
|
n,
|
|
2534
2534
|
m,
|
|
2535
2535
|
I,
|
|
2536
|
-
|
|
2536
|
+
A,
|
|
2537
2537
|
y,
|
|
2538
2538
|
s
|
|
2539
2539
|
]);
|
|
@@ -3004,17 +3004,17 @@ const du = ({
|
|
|
3004
3004
|
setSorter: v,
|
|
3005
3005
|
totalItems: w,
|
|
3006
3006
|
setTotalItems: I,
|
|
3007
|
-
setSelectedRowItems:
|
|
3007
|
+
setSelectedRowItems: A,
|
|
3008
3008
|
selectedRowItems: S,
|
|
3009
|
-
searchTreeNameSearch:
|
|
3009
|
+
searchTreeNameSearch: O,
|
|
3010
3010
|
setSearchTreeNameSearch: b,
|
|
3011
|
-
goToResourceId:
|
|
3011
|
+
goToResourceId: T,
|
|
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: $,
|
|
@@ -3075,7 +3075,7 @@ const du = ({
|
|
|
3075
3075
|
attachments: J,
|
|
3076
3076
|
setAttachments: Q,
|
|
3077
3077
|
selectedRowItems: S,
|
|
3078
|
-
setSelectedRowItems:
|
|
3078
|
+
setSelectedRowItems: A,
|
|
3079
3079
|
duplicatingItem: Ce,
|
|
3080
3080
|
setDuplicatingItem: me,
|
|
3081
3081
|
setSearchParams: j,
|
|
@@ -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: T,
|
|
3096
3096
|
searchValues: we,
|
|
3097
3097
|
setSearchValues: ge,
|
|
3098
3098
|
limit: z,
|
|
@@ -3505,7 +3505,7 @@ const { useToken: Tu } = He, { Text: di } = Bt, Ws = (e) => {
|
|
|
3505
3505
|
t && u();
|
|
3506
3506
|
}, [t, o]), c && c.message !== "active_id_not_found")
|
|
3507
3507
|
return /* @__PURE__ */ i(Ns, { error: c });
|
|
3508
|
-
const { id: h, model: p, limit: g, domain: y, context: v, initialView: w, description: I } = a || {},
|
|
3508
|
+
const { id: h, model: p, limit: g, domain: y, context: v, initialView: w, description: I } = a || {}, A = f ? Us : yn;
|
|
3509
3509
|
return /* @__PURE__ */ P(
|
|
3510
3510
|
Ws,
|
|
3511
3511
|
{
|
|
@@ -3518,7 +3518,7 @@ const { useToken: Tu } = He, { Text: di } = Bt, Ws = (e) => {
|
|
|
3518
3518
|
children: [
|
|
3519
3519
|
l && /* @__PURE__ */ i(Mn, {}),
|
|
3520
3520
|
!l && /* @__PURE__ */ i(le, { children: o ? (w == null ? void 0 : w.id) && /* @__PURE__ */ i(
|
|
3521
|
-
|
|
3521
|
+
A,
|
|
3522
3522
|
{
|
|
3523
3523
|
view_id: w.id,
|
|
3524
3524
|
model: p,
|
|
@@ -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 T = (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(T);
|
|
3608
3608
|
} catch (b) {
|
|
3609
3609
|
u(b);
|
|
3610
3610
|
} finally {
|
|
3611
3611
|
d(!1);
|
|
3612
3612
|
}
|
|
3613
3613
|
}
|
|
3614
|
-
const
|
|
3615
|
-
const b = o.map((_) =>
|
|
3614
|
+
const A = (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" }), T = b.map((_) => _.id);
|
|
3619
|
+
O.filter((_) => !T.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: T, 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: T,
|
|
3632
3632
|
onClose: _,
|
|
3633
3633
|
closeIcon: /* @__PURE__ */ i("span", { style: { color: F.text }, children: "X" }),
|
|
3634
3634
|
children: b
|
|
@@ -3644,9 +3644,9 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3644
3644
|
bordered: !p,
|
|
3645
3645
|
disabled: p,
|
|
3646
3646
|
options: s,
|
|
3647
|
-
onChange:
|
|
3647
|
+
onChange: A,
|
|
3648
3648
|
loading: f,
|
|
3649
|
-
filterOption: (
|
|
3649
|
+
filterOption: (O, b) => b.label.toLowerCase().includes(O.toString())
|
|
3650
3650
|
}
|
|
3651
3651
|
) }) });
|
|
3652
3652
|
}, ku = (e) => {
|
|
@@ -3877,7 +3877,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3877
3877
|
bt
|
|
3878
3878
|
), { openAction: u } = c || {}, f = Y([]), { t: d } = de();
|
|
3879
3879
|
Tt(t, () => ({
|
|
3880
|
-
openActionModal:
|
|
3880
|
+
openActionModal: A,
|
|
3881
3881
|
processAction: w
|
|
3882
3882
|
}));
|
|
3883
3883
|
const [m, h] = C(!1), [p, g] = C(
|
|
@@ -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: T, 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
|
+
} = T;
|
|
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 T;
|
|
3922
3922
|
try {
|
|
3923
|
-
if (
|
|
3923
|
+
if (T = await k.getHandler().getReport({
|
|
3924
3924
|
id: b
|
|
3925
|
-
}),
|
|
3925
|
+
}), T.state && a.current === !0) {
|
|
3926
3926
|
a.current = !1, clearInterval(o.current), l(!1);
|
|
3927
|
-
const _ = await un(
|
|
3928
|
-
wr(
|
|
3927
|
+
const _ = await un(T.result);
|
|
3928
|
+
wr(T.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: T,
|
|
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: T,
|
|
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: T, 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: T = {},
|
|
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: T,
|
|
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: T,
|
|
3986
3986
|
values: { ..._, ...r }
|
|
3987
3987
|
}),
|
|
3988
|
-
fields:
|
|
3988
|
+
fields: T,
|
|
3989
3989
|
context: V
|
|
3990
3990
|
})), x.target === "new") {
|
|
3991
3991
|
const G = await k.getHandler().getView({
|
|
@@ -3994,7 +3994,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3994
3994
|
id: ((B = x == null ? void 0 : x.view_id) == null ? void 0 : B[0]) || void 0,
|
|
3995
3995
|
context: V
|
|
3996
3996
|
});
|
|
3997
|
-
return
|
|
3997
|
+
return A({
|
|
3998
3998
|
domain: N,
|
|
3999
3999
|
model: x.res_model,
|
|
4000
4000
|
formView: G,
|
|
@@ -4020,25 +4020,25 @@ 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: T,
|
|
4025
4025
|
values: _
|
|
4026
4026
|
}
|
|
4027
4027
|
}), { closeParent: !0 };
|
|
4028
4028
|
}
|
|
4029
4029
|
}
|
|
4030
|
-
function
|
|
4030
|
+
function A({
|
|
4031
4031
|
domain: b,
|
|
4032
|
-
model:
|
|
4032
|
+
model: T,
|
|
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: T, formView: _, context: R, actionData: x }) : (g({ domain: b, model: T, context: R, formView: _, actionData: x }), h(!0));
|
|
4038
4038
|
}
|
|
4039
4039
|
async function S({
|
|
4040
4040
|
domain: b,
|
|
4041
|
-
model:
|
|
4041
|
+
model: T,
|
|
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: T, 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,
|
|
@@ -4251,12 +4251,12 @@ function tf(e, t) {
|
|
|
4251
4251
|
parentContext: v = {},
|
|
4252
4252
|
actionDomain: w,
|
|
4253
4253
|
visible: I = !0,
|
|
4254
|
-
rootForm:
|
|
4254
|
+
rootForm: A = !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: T
|
|
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,
|
|
@@ -4267,7 +4267,7 @@ function tf(e, t) {
|
|
|
4267
4267
|
title: z = void 0,
|
|
4268
4268
|
setTitle: pe = void 0,
|
|
4269
4269
|
isActive: _e = void 0
|
|
4270
|
-
} = (
|
|
4270
|
+
} = (A ? We : {}) || {}, Ge = ee(
|
|
4271
4271
|
bn
|
|
4272
4272
|
), { processAction: ke, globalValues: fe } = Ge || {};
|
|
4273
4273
|
Tt(t, () => ({
|
|
@@ -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 && (T == null || T());
|
|
4299
4299
|
}, Me = () => {
|
|
4300
|
-
Be.current && (
|
|
4300
|
+
Be.current && (T == null || T()), 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) => {
|
|
@@ -4738,7 +4738,7 @@ function tf(e, t) {
|
|
|
4738
4738
|
Be.current = !0, await Dt({ forceRefresh: !0 });
|
|
4739
4739
|
}
|
|
4740
4740
|
})) || {};
|
|
4741
|
-
!
|
|
4741
|
+
!A && ae && (ye == null || ye(be(), Se(), Ae()));
|
|
4742
4742
|
}
|
|
4743
4743
|
function al() {
|
|
4744
4744
|
Zt({ elementHasLostFocus: !0 });
|
|
@@ -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
|
},
|
|
@@ -4889,7 +4889,7 @@ const Sn = xt(tf), Cn = (e) => {
|
|
|
4889
4889
|
isMenuAction: s = !1,
|
|
4890
4890
|
actionData: l,
|
|
4891
4891
|
...c
|
|
4892
|
-
} = e, { model: u } = c, { modalWidth: f } = yr(), [d, m] = C(r), [h, p] = C(!1), [g, y] = C(), { action_id: v, res_id: w, action_type: I, view_id:
|
|
4892
|
+
} = e, { model: u } = c, { modalWidth: f } = yr(), [d, m] = C(r), [h, p] = C(!1), [g, y] = C(), { action_id: v, res_id: w, action_type: I, view_id: A } = l || {};
|
|
4893
4893
|
se(() => {
|
|
4894
4894
|
s && S();
|
|
4895
4895
|
}, [l, s]);
|
|
@@ -4897,12 +4897,12 @@ const Sn = xt(tf), Cn = (e) => {
|
|
|
4897
4897
|
const _ = await k.getHandler().isShortcutFavorite({
|
|
4898
4898
|
action_id: v,
|
|
4899
4899
|
action_type: I,
|
|
4900
|
-
view_id:
|
|
4900
|
+
view_id: A,
|
|
4901
4901
|
res_id: w || !1
|
|
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 T = f * 0.95;
|
|
4936
4936
|
return /* @__PURE__ */ i(Ku, { setTitle: m, children: /* @__PURE__ */ i(
|
|
4937
4937
|
yt,
|
|
4938
4938
|
{
|
|
@@ -4951,10 +4951,10 @@ const Sn = xt(tf), Cn = (e) => {
|
|
|
4951
4951
|
showFooter: !0,
|
|
4952
4952
|
insideButtonModal: o,
|
|
4953
4953
|
onCancel: a,
|
|
4954
|
-
parentWidth:
|
|
4954
|
+
parentWidth: T,
|
|
4955
4955
|
...c
|
|
4956
4956
|
},
|
|
4957
|
-
`${u}-${n}-${v}-${w}-${I}-${
|
|
4957
|
+
`${u}-${n}-${v}-${w}-${I}-${A}-${r}`
|
|
4958
4958
|
)
|
|
4959
4959
|
}
|
|
4960
4960
|
) });
|
|
@@ -5152,21 +5152,21 @@ 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",
|
|
5159
5159
|
context: r
|
|
5160
5160
|
});
|
|
5161
5161
|
a(I);
|
|
5162
|
-
const
|
|
5162
|
+
const A = lf(I);
|
|
5163
5163
|
let S = {};
|
|
5164
|
-
if (
|
|
5164
|
+
if (A.length > 0 && (S = { ...(O = await p({
|
|
5165
5165
|
model: n,
|
|
5166
5166
|
ids: [t],
|
|
5167
|
-
fieldsToRetrieve:
|
|
5167
|
+
fieldsToRetrieve: A,
|
|
5168
5168
|
context: r
|
|
5169
|
-
})) == null ? void 0 :
|
|
5169
|
+
})) == null ? void 0 : O[0] }), S = { ...nn(S, A), active_id: t }, l(S), !(!I || !I.toolbar))
|
|
5170
5170
|
return {
|
|
5171
5171
|
actionItems: I.toolbar.action,
|
|
5172
5172
|
relateItems: I.toolbar.relate,
|
|
@@ -5175,12 +5175,12 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
|
|
|
5175
5175
|
}, [r, m, t, n, p]);
|
|
5176
5176
|
if (!t)
|
|
5177
5177
|
return null;
|
|
5178
|
-
function w({ item: I, type:
|
|
5178
|
+
function w({ item: I, type: A }) {
|
|
5179
5179
|
const S = {
|
|
5180
5180
|
values: s,
|
|
5181
5181
|
fields: o.fields
|
|
5182
5182
|
};
|
|
5183
|
-
switch (
|
|
5183
|
+
switch (A) {
|
|
5184
5184
|
case "action":
|
|
5185
5185
|
d == null || d({
|
|
5186
5186
|
actionData: I,
|
|
@@ -5351,8 +5351,8 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
|
|
|
5351
5351
|
m(a);
|
|
5352
5352
|
}, [m, a]);
|
|
5353
5353
|
const h = (y) => {
|
|
5354
|
-
const w = y.target.value.split(/[ ,;]+/), I = w.slice(0, -1).map((S) => S.trim()).filter((S) => S && !a.includes(S)),
|
|
5355
|
-
(!n ||
|
|
5354
|
+
const w = y.target.value.split(/[ ,;]+/), I = w.slice(0, -1).map((S) => S.trim()).filter((S) => S && !a.includes(S)), A = [...a, ...I].join(";");
|
|
5355
|
+
(!n || A.length + w[w.length - 1].length <= n) && (I.length > 0 && (s([...a, ...I]), m([...a, ...I])), c(w[w.length - 1]));
|
|
5356
5356
|
}, p = () => {
|
|
5357
5357
|
if (l) {
|
|
5358
5358
|
const y = l.split(";").map((w) => w.trim()).filter((w) => w && !a.includes(w)), v = [...a, ...y].join(";");
|
|
@@ -5720,7 +5720,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
|
|
|
5720
5720
|
([y, v]) => {
|
|
5721
5721
|
g[y] = v.map((w) => {
|
|
5722
5722
|
const I = e.columns.find(
|
|
5723
|
-
(
|
|
5723
|
+
(A) => A.id === y
|
|
5724
5724
|
);
|
|
5725
5725
|
return {
|
|
5726
5726
|
operation: w,
|
|
@@ -5744,7 +5744,7 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
|
|
|
5744
5744
|
Object.entries(h).forEach((g) => {
|
|
5745
5745
|
const y = g[0], v = g[1];
|
|
5746
5746
|
p || (p = {}), p[y] = Object.keys(v).map((w) => {
|
|
5747
|
-
const I = e.columns.find((
|
|
5747
|
+
const I = e.columns.find((A) => A.id === y);
|
|
5748
5748
|
return {
|
|
5749
5749
|
operation: w,
|
|
5750
5750
|
label: I[w],
|
|
@@ -6237,39 +6237,39 @@ 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, T = o;
|
|
6242
|
+
return r = o = void 0, u = O, s = e.apply(T, 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, T = O - u, _ = t - b;
|
|
6249
|
+
return d ? xm(_, a - T) : _;
|
|
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, T = O - u;
|
|
6253
|
+
return c === void 0 || b >= t || b < 0 || d && T >= 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;
|
|
6266
6266
|
}
|
|
6267
|
-
function
|
|
6267
|
+
function A() {
|
|
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)
|
|
@@ -6277,7 +6277,7 @@ function Im(e, t, n) {
|
|
|
6277
6277
|
}
|
|
6278
6278
|
return l === void 0 && (l = setTimeout(v, t)), s;
|
|
6279
6279
|
}
|
|
6280
|
-
return S.cancel = I, S.flush =
|
|
6280
|
+
return S.cancel = I, S.flush = A, S;
|
|
6281
6281
|
}
|
|
6282
6282
|
function zr(e) {
|
|
6283
6283
|
var t = typeof e;
|
|
@@ -6382,17 +6382,17 @@ function Fm() {
|
|
|
6382
6382
|
throw new TypeError("Object.keys called on a non-object");
|
|
6383
6383
|
var I = s && g;
|
|
6384
6384
|
if (v && h.length > 0 && !t.call(h, 0))
|
|
6385
|
-
for (var
|
|
6386
|
-
w.push(String(
|
|
6385
|
+
for (var A = 0; A < h.length; ++A)
|
|
6386
|
+
w.push(String(A));
|
|
6387
6387
|
if (y && h.length > 0)
|
|
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), T = 0; T < l.length; ++T)
|
|
6395
|
+
!(b && l[T] === "constructor") && t.call(h, l[T]) && w.push(l[T]);
|
|
6396
6396
|
return w;
|
|
6397
6397
|
};
|
|
6398
6398
|
}
|
|
@@ -7034,36 +7034,36 @@ const Fa = /* @__PURE__ */ Ss(sh), ah = xt(
|
|
|
7034
7034
|
l.current = new as(o, a, 1), l.current.parse(), f(l.current._advancedSearchContainer);
|
|
7035
7035
|
}, [a, o, n]);
|
|
7036
7036
|
const p = E(
|
|
7037
|
-
(
|
|
7038
|
-
var
|
|
7037
|
+
(A) => {
|
|
7038
|
+
var O;
|
|
7039
7039
|
const S = Jn(
|
|
7040
|
-
|
|
7041
|
-
(
|
|
7040
|
+
A,
|
|
7041
|
+
(O = l.current) == null ? void 0 : O._advancedSearchContainer
|
|
7042
7042
|
);
|
|
7043
|
-
t({ params: S, values: or(
|
|
7043
|
+
t({ params: S, values: or(A) });
|
|
7044
7044
|
},
|
|
7045
7045
|
[t]
|
|
7046
7046
|
), g = E(() => {
|
|
7047
|
-
var
|
|
7048
|
-
(
|
|
7047
|
+
var A;
|
|
7048
|
+
(A = d.current) == null || A.submit();
|
|
7049
7049
|
}, []), y = E(
|
|
7050
|
-
(
|
|
7050
|
+
(A) => {
|
|
7051
7051
|
var b;
|
|
7052
|
-
const S = or(
|
|
7052
|
+
const S = or(A);
|
|
7053
7053
|
if (Fa(S, s)) {
|
|
7054
7054
|
h([]);
|
|
7055
7055
|
return;
|
|
7056
7056
|
}
|
|
7057
|
-
const
|
|
7058
|
-
|
|
7057
|
+
const O = Jn(
|
|
7058
|
+
A,
|
|
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(() => {
|
|
7065
|
-
var
|
|
7066
|
-
(
|
|
7065
|
+
var A, S;
|
|
7066
|
+
(A = d.current) == null || A.resetFields(), (S = d == null ? void 0 : d.current) == null || S.setFieldsValue({}), h([]);
|
|
7067
7067
|
}, []), w = n ? m || Jn(s, (I = l.current) == null ? void 0 : I._advancedSearchContainer) : [];
|
|
7068
7068
|
return /* @__PURE__ */ i(
|
|
7069
7069
|
cm,
|
|
@@ -7199,26 +7199,26 @@ 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),
|
|
7202
|
+
} = e, [p, g] = C(), [y, v] = C(), [w, I] = C(!1), A = 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
|
-
I(!1),
|
|
7213
|
+
I(!1), A.current = new as(n, t), A.current.parse(), g(A.current._simpleSearchContainer), v(A.current._advancedSearchContainer);
|
|
7214
7214
|
}, [t, n]);
|
|
7215
|
-
const
|
|
7215
|
+
const T = b(), _ = (x) => {
|
|
7216
7216
|
var N;
|
|
7217
7217
|
const { limit: F, offset: D } = x;
|
|
7218
7218
|
delete x.offset, delete x.limit;
|
|
7219
7219
|
const V = Jn(
|
|
7220
7220
|
x,
|
|
7221
|
-
(N =
|
|
7221
|
+
(N = A.current) == null ? void 0 : N._advancedSearchContainer
|
|
7222
7222
|
);
|
|
7223
7223
|
o({ params: V, offset: D, limit: F, searchValues: x });
|
|
7224
7224
|
}, R = E(() => {
|
|
@@ -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
|
+
T,
|
|
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,
|
|
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, A] = C(), [S, O] = C(0), [b, T] = C();
|
|
7291
7291
|
return t ? {
|
|
7292
7292
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
7293
7293
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -7341,12 +7341,12 @@ function mh({
|
|
|
7341
7341
|
results: v,
|
|
7342
7342
|
setResults: w,
|
|
7343
7343
|
searchQuery: I,
|
|
7344
|
-
setSearchQuery:
|
|
7344
|
+
setSearchQuery: A,
|
|
7345
7345
|
totalItems: S,
|
|
7346
|
-
setTotalItems:
|
|
7346
|
+
setTotalItems: O,
|
|
7347
7347
|
isActive: void 0,
|
|
7348
7348
|
sortState: b,
|
|
7349
|
-
setSortState:
|
|
7349
|
+
setSortState: T
|
|
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,
|
|
7424
|
-
elementRef:
|
|
7423
|
+
} = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, A] = C(!0), [S, O] = C(), { t: b } = de(), T = Y(null), _ = Df({
|
|
7424
|
+
elementRef: T,
|
|
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), A(!0);
|
|
7498
7498
|
try {
|
|
7499
7499
|
const ve = await k.getHandler().searchCount({
|
|
7500
7500
|
params: oe ? s : Te,
|
|
@@ -7502,11 +7502,11 @@ 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 {
|
|
7509
|
-
|
|
7509
|
+
A(!1);
|
|
7510
7510
|
}
|
|
7511
7511
|
}, [
|
|
7512
7512
|
s,
|
|
@@ -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: T, 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") => {
|
|
@@ -7941,13 +7941,13 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
7941
7941
|
sorter: v,
|
|
7942
7942
|
onFetchChildrenForRecord: w,
|
|
7943
7943
|
childField: I,
|
|
7944
|
-
rootTree:
|
|
7944
|
+
rootTree: A = !1,
|
|
7945
7945
|
context: S,
|
|
7946
|
-
readonly:
|
|
7946
|
+
readonly: O,
|
|
7947
7947
|
onSelectAllRecords: b
|
|
7948
|
-
} = e,
|
|
7948
|
+
} = e, T = 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 } = (
|
|
7950
|
+
), { title: B = void 0, setTitle: G = void 0 } = (A ? 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 = T.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: T,
|
|
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,
|
|
@@ -8089,17 +8089,17 @@ const Ea = (e) => {
|
|
|
8089
8089
|
resultsActionView: v,
|
|
8090
8090
|
domain: w,
|
|
8091
8091
|
currentId: I,
|
|
8092
|
-
limit:
|
|
8092
|
+
limit: A,
|
|
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: T
|
|
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(A || 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), T == null || T();
|
|
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
|
+
T,
|
|
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,18 +8244,18 @@ const Ea = (e) => {
|
|
|
8244
8244
|
]
|
|
8245
8245
|
), Pe = E(
|
|
8246
8246
|
(ue) => {
|
|
8247
|
-
R(!0),
|
|
8247
|
+
R(!0), L(ue), G((ue - 1) * A);
|
|
8248
8248
|
},
|
|
8249
|
-
[R,
|
|
8249
|
+
[R, A, 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(A || jt));
|
|
8252
8252
|
}, [
|
|
8253
8253
|
_,
|
|
8254
8254
|
n,
|
|
8255
8255
|
o,
|
|
8256
8256
|
b,
|
|
8257
8257
|
S,
|
|
8258
|
-
|
|
8258
|
+
A
|
|
8259
8259
|
]), We = E(
|
|
8260
8260
|
async (ue) => {
|
|
8261
8261
|
const Te = ue[(d == null ? void 0 : d.field_parent) || "child_id"], xe = await k.getHandler().readObjects({
|
|
@@ -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,
|
|
8310
|
+
} = e, [h, p] = C(!1), [g, y] = C(!1), v = Y(!1), w = Y(null), [I, A] = C(), [S, O] = C(), [b, T] = 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,
|
|
@@ -8399,7 +8399,7 @@ function Ch(e, t) {
|
|
|
8399
8399
|
p(!1);
|
|
8400
8400
|
}
|
|
8401
8401
|
}, re = async () => {
|
|
8402
|
-
|
|
8402
|
+
A(n);
|
|
8403
8403
|
let De = r;
|
|
8404
8404
|
r || (De = await k.getHandler().getView({
|
|
8405
8405
|
model: n,
|
|
@@ -8411,7 +8411,7 @@ function Ch(e, t) {
|
|
|
8411
8411
|
model: n,
|
|
8412
8412
|
type: "tree",
|
|
8413
8413
|
context: d
|
|
8414
|
-
})),
|
|
8414
|
+
})), T(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;
|
|
@@ -8566,7 +8566,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8566
8566
|
treeViewProps: void 0,
|
|
8567
8567
|
context: s,
|
|
8568
8568
|
enabled: e
|
|
8569
|
-
}), I = X(() => y != null && y.arch ? Es(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]),
|
|
8569
|
+
}), I = X(() => y != null && y.arch ? Es(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]), A = E(
|
|
8570
8570
|
async (F) => {
|
|
8571
8571
|
m(!0);
|
|
8572
8572
|
try {
|
|
@@ -8580,18 +8580,18 @@ 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
|
+
A([F]);
|
|
8586
8586
|
},
|
|
8587
|
-
[
|
|
8587
|
+
[A]
|
|
8588
8588
|
), b = E(() => {
|
|
8589
8589
|
if (u.length === 0) {
|
|
8590
8590
|
S();
|
|
8591
8591
|
return;
|
|
8592
8592
|
}
|
|
8593
|
-
|
|
8594
|
-
}, [u, S,
|
|
8593
|
+
A(u);
|
|
8594
|
+
}, [u, S, A]), T = X(
|
|
8595
8595
|
() => I ? Ra : Va,
|
|
8596
8596
|
[I]
|
|
8597
8597
|
), _ = E(() => {
|
|
@@ -8600,9 +8600,9 @@ const Va = xt(Ch), jo = ({
|
|
|
8600
8600
|
c(!1), S();
|
|
8601
8601
|
}, [S]), x = E(
|
|
8602
8602
|
(F) => {
|
|
8603
|
-
c(!1), S(), F &&
|
|
8603
|
+
c(!1), S(), F && A([F]);
|
|
8604
8604
|
},
|
|
8605
|
-
[S,
|
|
8605
|
+
[S, A]
|
|
8606
8606
|
);
|
|
8607
8607
|
return /* @__PURE__ */ P(le, { children: [
|
|
8608
8608
|
/* @__PURE__ */ P(
|
|
@@ -8619,13 +8619,13 @@ const Va = xt(Ch), jo = ({
|
|
|
8619
8619
|
maskClosable: !1,
|
|
8620
8620
|
children: [
|
|
8621
8621
|
!w && /* @__PURE__ */ i(
|
|
8622
|
-
|
|
8622
|
+
T,
|
|
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,18 +8688,18 @@ 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), [
|
|
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), [A, S] = C(""), O = Y(), b = ee(Ue), { domain: T, 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
|
-
if (!g &&
|
|
8702
|
+
if (!g && A !== B) {
|
|
8703
8703
|
if (await new Promise((H) => setTimeout(H, 100)), I.current) {
|
|
8704
8704
|
G([void 0, ""]);
|
|
8705
8705
|
return;
|
|
@@ -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,22 +8759,22 @@ const Va = xt(Ch), jo = ({
|
|
|
8759
8759
|
}),
|
|
8760
8760
|
fields: R(),
|
|
8761
8761
|
context: x()
|
|
8762
|
-
})),
|
|
8762
|
+
})), T && T.length > 0 && (D.current = D.current.concat(
|
|
8763
8763
|
fo({
|
|
8764
|
-
domain:
|
|
8764
|
+
domain: T,
|
|
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(
|
|
8774
8774
|
o && !s ? Ah : rt,
|
|
8775
8775
|
{
|
|
8776
8776
|
type: "text",
|
|
8777
|
-
value:
|
|
8777
|
+
value: A,
|
|
8778
8778
|
disabled: s,
|
|
8779
8779
|
onChange: $,
|
|
8780
8780
|
style: {
|
|
@@ -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 === "" || A === 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;
|
|
@@ -9136,7 +9136,7 @@ function Rh(e) {
|
|
|
9136
9136
|
context: v,
|
|
9137
9137
|
formRef: w,
|
|
9138
9138
|
onRefreshParentValues: I
|
|
9139
|
-
} = e, { token:
|
|
9139
|
+
} = e, { token: A } = Fh(), { t: S } = de();
|
|
9140
9140
|
return La({
|
|
9141
9141
|
toolbar: y,
|
|
9142
9142
|
mustDisableButtons: n,
|
|
@@ -9146,10 +9146,10 @@ 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
|
-
/* @__PURE__ */ i(Ha, { title: t, token:
|
|
9152
|
+
/* @__PURE__ */ i(Ha, { title: t, token: A }),
|
|
9153
9153
|
/* @__PURE__ */ P("div", { className: "flex-none h-8 pl-2", children: [
|
|
9154
9154
|
a !== "graph" && p && /* @__PURE__ */ i(
|
|
9155
9155
|
st,
|
|
@@ -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), [
|
|
9322
|
+
} = f || {}, { t: v } = de(), [w, I] = C(!1), [A, S] = C(!1), [O, b] = C(), [T, _] = 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,22 +9580,22 @@ 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
|
-
loading:
|
|
9598
|
+
loading: A,
|
|
9599
9599
|
onRowClicked: ((Ae = o.get("form")) == null ? void 0 : Ae.fields) !== void 0 ? fe : void 0,
|
|
9600
9600
|
showPagination: !1,
|
|
9601
9601
|
selectedRowKeys: V,
|
|
@@ -9623,10 +9623,10 @@ const Vh = (e) => {
|
|
|
9623
9623
|
);
|
|
9624
9624
|
}
|
|
9625
9625
|
};
|
|
9626
|
-
if (
|
|
9627
|
-
return /* @__PURE__ */ i(at, { className: "mt-10", message:
|
|
9628
|
-
const be =
|
|
9629
|
-
return
|
|
9626
|
+
if (O)
|
|
9627
|
+
return /* @__PURE__ */ i(at, { className: "mt-10", message: O, type: "error", banner: !0 });
|
|
9628
|
+
const be = L;
|
|
9629
|
+
return A ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(le, { children: [
|
|
9630
9630
|
/* @__PURE__ */ i(
|
|
9631
9631
|
Ya,
|
|
9632
9632
|
{
|
|
@@ -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: T,
|
|
9668
9668
|
onSubmitSucceed: ke,
|
|
9669
9669
|
parentContext: { ...p == null ? void 0 : p(), ...j },
|
|
9670
9670
|
onCancel: () => {
|
|
@@ -9751,26 +9751,26 @@ const Vh = (e) => {
|
|
|
9751
9751
|
});
|
|
9752
9752
|
if (w.length === 0 && I.length === 0)
|
|
9753
9753
|
return { results: [], colors: {}, status: {} };
|
|
9754
|
-
const
|
|
9754
|
+
const A = v ? (await Ad(w, t, n, v)).slice(
|
|
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: T
|
|
9761
9761
|
} = await _d({
|
|
9762
9762
|
relation: t,
|
|
9763
|
-
ids:
|
|
9763
|
+
ids: A,
|
|
9764
9764
|
treeView: e,
|
|
9765
9765
|
context: n,
|
|
9766
9766
|
attrs: S,
|
|
9767
9767
|
treeOoui: d
|
|
9768
|
-
}), R =
|
|
9768
|
+
}), R = A.length < g - p && I.length > 0 ? [...A, ...I.map((F) => F.id)] : A;
|
|
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: T };
|
|
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, T = !1) => {
|
|
9990
9990
|
let _;
|
|
9991
|
-
if (
|
|
9991
|
+
if (T)
|
|
9992
9992
|
_ = o.concat({
|
|
9993
9993
|
id: S,
|
|
9994
9994
|
operation: "pendingLink",
|
|
@@ -10014,19 +10014,19 @@ const jh = ({
|
|
|
10014
10014
|
a(_), g || m(!1);
|
|
10015
10015
|
},
|
|
10016
10016
|
[g, o, a]
|
|
10017
|
-
),
|
|
10017
|
+
), A = wt(
|
|
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 T = o.find((_) => _.id === O);
|
|
10024
|
+
(T == null ? void 0 : T.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
|
);
|
|
@@ -10037,7 +10037,7 @@ const jh = ({
|
|
|
10037
10037
|
createItem: v,
|
|
10038
10038
|
onCancelFormModal: w,
|
|
10039
10039
|
onFormModalSubmitSucceed: I,
|
|
10040
|
-
openItemInFormModal:
|
|
10040
|
+
openItemInFormModal: A
|
|
10041
10041
|
};
|
|
10042
10042
|
}, Bh = ({
|
|
10043
10043
|
currentView: e,
|
|
@@ -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({}),
|
|
10119
|
+
const v = Y(), w = c || v, I = Y({}), A = 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 T = 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
|
-
return I.current = { ...I.current, ...K }, !
|
|
10148
|
+
return I.current = { ...I.current, ...K }, !A.current && Z && (A.current = {}), Z && (A.current = { ...A.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: T,
|
|
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 = A.current) == null ? void 0 : L[N.id];
|
|
10186
10186
|
},
|
|
10187
10187
|
strings: {
|
|
10188
10188
|
resetTableViewLabel: b("resetTableView")
|
|
@@ -10215,8 +10215,8 @@ const jh = ({
|
|
|
10215
10215
|
} = o, v = ee(Ue), {
|
|
10216
10216
|
activeId: w,
|
|
10217
10217
|
getContext: I,
|
|
10218
|
-
fetchValues:
|
|
10219
|
-
} = v || {}, S = Y(),
|
|
10218
|
+
fetchValues: A
|
|
10219
|
+
} = v || {}, S = Y(), O = a.size > 1, b = ((xe = a.get("form")) == null ? void 0 : xe.fields) !== void 0, T = 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: T,
|
|
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: T,
|
|
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: T,
|
|
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: T,
|
|
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,12 +10352,12 @@ 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(), ...T },
|
|
10358
10358
|
formRef: S,
|
|
10359
10359
|
onRefreshParentValues: () => {
|
|
10360
|
-
|
|
10360
|
+
A == null || A({ forceRefresh: !0 });
|
|
10361
10361
|
}
|
|
10362
10362
|
}
|
|
10363
10363
|
),
|
|
@@ -10370,7 +10370,7 @@ const jh = ({
|
|
|
10370
10370
|
readOnly: m || !1,
|
|
10371
10371
|
onFetchRecords: x,
|
|
10372
10372
|
ooui: R,
|
|
10373
|
-
context:
|
|
10373
|
+
context: T,
|
|
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: T,
|
|
10397
10397
|
relation: h,
|
|
10398
10398
|
readOnly: m || !1,
|
|
10399
10399
|
onChange: J
|
|
@@ -10410,12 +10410,12 @@ const jh = ({
|
|
|
10410
10410
|
defaultValues: H == null ? void 0 : H.defaultValues,
|
|
10411
10411
|
visible: me,
|
|
10412
10412
|
onSubmitSucceed: ie,
|
|
10413
|
-
parentContext:
|
|
10413
|
+
parentContext: T,
|
|
10414
10414
|
onCancel: q,
|
|
10415
10415
|
readOnly: m,
|
|
10416
10416
|
mustClearAfterSave: j,
|
|
10417
10417
|
onMustRefreshParent: () => {
|
|
10418
|
-
|
|
10418
|
+
A == null || A({ forceRefresh: !0 });
|
|
10419
10419
|
}
|
|
10420
10420
|
}
|
|
10421
10421
|
),
|
|
@@ -10424,7 +10424,7 @@ const jh = ({
|
|
|
10424
10424
|
{
|
|
10425
10425
|
domain: _,
|
|
10426
10426
|
model: h,
|
|
10427
|
-
context:
|
|
10427
|
+
context: T,
|
|
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: T,
|
|
10441
10441
|
limit: 0
|
|
10442
10442
|
}
|
|
10443
10443
|
),
|
|
@@ -10454,40 +10454,40 @@ const jh = ({
|
|
|
10454
10454
|
Ft(() => {
|
|
10455
10455
|
I();
|
|
10456
10456
|
}, [t]);
|
|
10457
|
-
const w = async (
|
|
10457
|
+
const w = async (O) => {
|
|
10458
10458
|
const b = k.getHandler().getView({
|
|
10459
10459
|
model: r,
|
|
10460
|
-
type:
|
|
10460
|
+
type: O,
|
|
10461
10461
|
context: { ...g == null ? void 0 : g(), ...s }
|
|
10462
10462
|
});
|
|
10463
|
-
if (o && o[
|
|
10464
|
-
const
|
|
10465
|
-
if (!
|
|
10463
|
+
if (o && o[O]) {
|
|
10464
|
+
const T = o[O];
|
|
10465
|
+
if (!T.toolbar && (O === "form" || O === "tree")) {
|
|
10466
10466
|
const _ = await b;
|
|
10467
|
-
return { ...
|
|
10467
|
+
return { ...T, toolbar: _.toolbar };
|
|
10468
10468
|
}
|
|
10469
|
-
return
|
|
10469
|
+
return T;
|
|
10470
10470
|
}
|
|
10471
10471
|
return await k.getHandler().getView({
|
|
10472
10472
|
model: r,
|
|
10473
|
-
type:
|
|
10473
|
+
type: O,
|
|
10474
10474
|
context: { ...g == null ? void 0 : g(), ...s }
|
|
10475
10475
|
});
|
|
10476
10476
|
}, I = async () => {
|
|
10477
10477
|
u(!0), d(void 0);
|
|
10478
10478
|
try {
|
|
10479
10479
|
if (n && n.length > 0) {
|
|
10480
|
-
for (const
|
|
10481
|
-
const b = await w(
|
|
10482
|
-
m.set(
|
|
10480
|
+
for (const O of n) {
|
|
10481
|
+
const b = await w(O);
|
|
10482
|
+
m.set(O, b);
|
|
10483
10483
|
}
|
|
10484
10484
|
h(m);
|
|
10485
10485
|
} else {
|
|
10486
|
-
const
|
|
10487
|
-
m.set("form",
|
|
10486
|
+
const O = await w("form"), b = await w("tree");
|
|
10487
|
+
m.set("form", O), m.set("tree", b), h(m);
|
|
10488
10488
|
}
|
|
10489
|
-
} catch (
|
|
10490
|
-
d(JSON.stringify(
|
|
10489
|
+
} catch (O) {
|
|
10490
|
+
d(JSON.stringify(O));
|
|
10491
10491
|
} finally {
|
|
10492
10492
|
u(!1);
|
|
10493
10493
|
}
|
|
@@ -10497,7 +10497,7 @@ const jh = ({
|
|
|
10497
10497
|
{
|
|
10498
10498
|
required: a,
|
|
10499
10499
|
type: "array",
|
|
10500
|
-
validator: async (
|
|
10500
|
+
validator: async (O, b) => {
|
|
10501
10501
|
if (!b)
|
|
10502
10502
|
throw new Error();
|
|
10503
10503
|
if (!b.items)
|
|
@@ -10781,7 +10781,7 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10781
10781
|
}
|
|
10782
10782
|
let v = r;
|
|
10783
10783
|
y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (v = [
|
|
10784
|
-
["id", "in", n == null ? void 0 : n.map((
|
|
10784
|
+
["id", "in", n == null ? void 0 : n.map((A) => A.id)]
|
|
10785
10785
|
]);
|
|
10786
10786
|
const { datas: w } = await k.getHandler().exportData({
|
|
10787
10787
|
model: e,
|
|
@@ -10794,7 +10794,7 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10794
10794
|
context: t,
|
|
10795
10795
|
format: y.exportType
|
|
10796
10796
|
});
|
|
10797
|
-
a(), await new Promise((
|
|
10797
|
+
a(), await new Promise((A) => setTimeout(A, 200));
|
|
10798
10798
|
const I = await un(w);
|
|
10799
10799
|
wr(w, I.mime);
|
|
10800
10800
|
},
|
|
@@ -10808,18 +10808,18 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10808
10808
|
return s.current["/"] = y, Gi({ fields: y });
|
|
10809
10809
|
}, [e, t, s]), d = E(
|
|
10810
10810
|
async (y) => {
|
|
10811
|
-
const w = so(y, s.current)[io(y)], I = w.relation,
|
|
10811
|
+
const w = so(y, s.current)[io(y)], I = w.relation, A = await k.getHandler().getFields({
|
|
10812
10812
|
model: I,
|
|
10813
10813
|
context: t,
|
|
10814
10814
|
fields: []
|
|
10815
10815
|
});
|
|
10816
|
-
for (const [S,
|
|
10817
|
-
|
|
10816
|
+
for (const [S, O] of Object.entries(A))
|
|
10817
|
+
A[S].string = cg({
|
|
10818
10818
|
parentTitle: w.string,
|
|
10819
|
-
title:
|
|
10819
|
+
title: O.string
|
|
10820
10820
|
});
|
|
10821
|
-
return s.current[y] =
|
|
10822
|
-
fields:
|
|
10821
|
+
return s.current[y] = A, Gi({
|
|
10822
|
+
fields: A,
|
|
10823
10823
|
parentKey: y
|
|
10824
10824
|
});
|
|
10825
10825
|
},
|
|
@@ -10833,13 +10833,13 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10833
10833
|
return {
|
|
10834
10834
|
predefinedExports: y.map((I) => ({
|
|
10835
10835
|
...I,
|
|
10836
|
-
fields: I.fields.map((
|
|
10837
|
-
const S = io(
|
|
10836
|
+
fields: I.fields.map((A) => {
|
|
10837
|
+
const S = io(A.key), b = so(A.key, s.current)[S];
|
|
10838
10838
|
return b ? {
|
|
10839
|
-
key:
|
|
10839
|
+
key: A.key,
|
|
10840
10840
|
title: b.string
|
|
10841
10841
|
} : {
|
|
10842
|
-
key:
|
|
10842
|
+
key: A.key
|
|
10843
10843
|
};
|
|
10844
10844
|
})
|
|
10845
10845
|
})),
|
|
@@ -10878,10 +10878,10 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10878
10878
|
context: t
|
|
10879
10879
|
});
|
|
10880
10880
|
return await Promise.all(
|
|
10881
|
-
y.fields.map(async (
|
|
10881
|
+
y.fields.map(async (A) => await k.getHandler().create({
|
|
10882
10882
|
model: "ir.exports.line",
|
|
10883
10883
|
values: {
|
|
10884
|
-
name:
|
|
10884
|
+
name: A.key,
|
|
10885
10885
|
export_id: I
|
|
10886
10886
|
},
|
|
10887
10887
|
fields: w,
|
|
@@ -11116,8 +11116,8 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
11116
11116
|
r == null || r(I);
|
|
11117
11117
|
};
|
|
11118
11118
|
async function g() {
|
|
11119
|
-
const I = await un(n),
|
|
11120
|
-
S.href =
|
|
11119
|
+
const I = await un(n), A = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"), O = d(s), b = d("name");
|
|
11120
|
+
S.href = A, S.download = O || b, S.click();
|
|
11121
11121
|
}
|
|
11122
11122
|
async function y() {
|
|
11123
11123
|
const I = await un(n);
|
|
@@ -11125,8 +11125,8 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
11125
11125
|
}
|
|
11126
11126
|
async function v(I) {
|
|
11127
11127
|
I.stopPropagation(), I.preventDefault();
|
|
11128
|
-
const
|
|
11129
|
-
p(S), s && f(s,
|
|
11128
|
+
const A = I.target.files[0], S = await Rs(A);
|
|
11129
|
+
p(S), s && f(s, A.name);
|
|
11130
11130
|
}
|
|
11131
11131
|
function w() {
|
|
11132
11132
|
f(s, void 0), p(void 0);
|
|
@@ -11561,14 +11561,14 @@ const Og = () => {
|
|
|
11561
11561
|
async (y) => {
|
|
11562
11562
|
var v;
|
|
11563
11563
|
try {
|
|
11564
|
-
const { params: w, model: I, name_search:
|
|
11564
|
+
const { params: w, model: I, name_search: A, context: S, order: O } = s, { results: b } = await l({
|
|
11565
11565
|
params: w,
|
|
11566
11566
|
model: I,
|
|
11567
11567
|
context: S,
|
|
11568
11568
|
limit: 1,
|
|
11569
11569
|
offset: y,
|
|
11570
|
-
order:
|
|
11571
|
-
name_search:
|
|
11570
|
+
order: O,
|
|
11571
|
+
name_search: A,
|
|
11572
11572
|
skipRead: !0
|
|
11573
11573
|
});
|
|
11574
11574
|
return (v = b[0]) == null ? void 0 : v.id;
|
|
@@ -11584,22 +11584,22 @@ const Og = () => {
|
|
|
11584
11584
|
[o, r]
|
|
11585
11585
|
), m = E(
|
|
11586
11586
|
async (y) => {
|
|
11587
|
-
var S,
|
|
11587
|
+
var S, O;
|
|
11588
11588
|
if (!a)
|
|
11589
11589
|
return;
|
|
11590
|
-
const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0,
|
|
11590
|
+
const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0, A = v ? w === t : w === -1;
|
|
11591
11591
|
if (I) {
|
|
11592
11592
|
const b = (S = a[w]) == null ? void 0 : S.id;
|
|
11593
11593
|
if (b)
|
|
11594
11594
|
d(w, b);
|
|
11595
11595
|
else {
|
|
11596
|
-
const
|
|
11597
|
-
|
|
11596
|
+
const T = await f(w);
|
|
11597
|
+
T && d(w, T);
|
|
11598
11598
|
}
|
|
11599
|
-
} else if (
|
|
11600
|
-
const b = v ? 0 : t - 1,
|
|
11601
|
-
if (
|
|
11602
|
-
d(b,
|
|
11599
|
+
} else if (A) {
|
|
11600
|
+
const b = v ? 0 : t - 1, T = (O = a[b]) == null ? void 0 : O.id;
|
|
11601
|
+
if (T)
|
|
11602
|
+
d(b, T);
|
|
11603
11603
|
else {
|
|
11604
11604
|
const _ = await f(b);
|
|
11605
11605
|
_ && d(b, _);
|
|
@@ -11611,8 +11611,8 @@ const Og = () => {
|
|
|
11611
11611
|
(y) => {
|
|
11612
11612
|
if (!a || a.length === 0)
|
|
11613
11613
|
return;
|
|
11614
|
-
const v = y === "next", w = v ? n + 1 : n - 1,
|
|
11615
|
-
d(
|
|
11614
|
+
const v = y === "next", w = v ? n + 1 : n - 1, A = (v ? w === a.length : w === -1) ? v ? 0 : a.length - 1 : w;
|
|
11615
|
+
d(A, a[A].id);
|
|
11616
11616
|
},
|
|
11617
11617
|
[a, n, d]
|
|
11618
11618
|
), p = E(() => {
|
|
@@ -11742,37 +11742,37 @@ function Vg({ toolbar: e }) {
|
|
|
11742
11742
|
setRemovingItem: v,
|
|
11743
11743
|
removingItem: w,
|
|
11744
11744
|
duplicatingItem: I,
|
|
11745
|
-
setDuplicatingItem:
|
|
11745
|
+
setDuplicatingItem: A,
|
|
11746
11746
|
setResults: S,
|
|
11747
|
-
formIsLoading:
|
|
11747
|
+
formIsLoading: O,
|
|
11748
11748
|
attachments: b,
|
|
11749
|
-
formRef:
|
|
11749
|
+
formRef: T,
|
|
11750
11750
|
setFormHasChanges: _,
|
|
11751
11751
|
previousView: R,
|
|
11752
11752
|
setPreviousView: x,
|
|
11753
11753
|
goToResourceId: F,
|
|
11754
11754
|
isActive: D
|
|
11755
11755
|
} = Ln(), { openDefaultActionForModel: V } = t || {}, N = X(
|
|
11756
|
-
() => f || w ||
|
|
11757
|
-
[f, w,
|
|
11758
|
-
),
|
|
11756
|
+
() => f || w || O || I,
|
|
11757
|
+
[f, w, O, I]
|
|
11758
|
+
), L = E(
|
|
11759
11759
|
(j) => {
|
|
11760
11760
|
u ? wn({ t: n, onOk: j }) : j();
|
|
11761
11761
|
},
|
|
11762
11762
|
[u, n]
|
|
11763
11763
|
), B = E(() => {
|
|
11764
|
-
|
|
11765
|
-
}, [
|
|
11764
|
+
L(() => T.current.fetchValues());
|
|
11765
|
+
}, [L, T]), { actionButtonProps: G, printButtonProps: $, relateButtonProps: K } = La({
|
|
11766
11766
|
toolbar: e,
|
|
11767
11767
|
mustDisableButtons: N,
|
|
11768
|
-
formRef:
|
|
11768
|
+
formRef: T,
|
|
11769
11769
|
onRefreshParentValues: B
|
|
11770
11770
|
}), Z = E(async () => {
|
|
11771
11771
|
try {
|
|
11772
11772
|
v == null || v(!0), await k.getHandler().deleteObjects({
|
|
11773
11773
|
model: y,
|
|
11774
11774
|
ids: [d],
|
|
11775
|
-
context:
|
|
11775
|
+
context: T.current.getContext()
|
|
11776
11776
|
});
|
|
11777
11777
|
const j = m == null ? void 0 : m.filter(
|
|
11778
11778
|
(ie) => ie.id !== d
|
|
@@ -11789,7 +11789,7 @@ function Vg({ toolbar: e }) {
|
|
|
11789
11789
|
d,
|
|
11790
11790
|
p,
|
|
11791
11791
|
y,
|
|
11792
|
-
|
|
11792
|
+
T,
|
|
11793
11793
|
m,
|
|
11794
11794
|
g,
|
|
11795
11795
|
h,
|
|
@@ -11797,19 +11797,19 @@ function Vg({ toolbar: e }) {
|
|
|
11797
11797
|
S
|
|
11798
11798
|
]), J = E(async () => {
|
|
11799
11799
|
try {
|
|
11800
|
-
|
|
11800
|
+
A == null || A(!0);
|
|
11801
11801
|
const j = await k.getHandler().duplicate({
|
|
11802
11802
|
id: d,
|
|
11803
11803
|
model: y,
|
|
11804
|
-
context:
|
|
11804
|
+
context: T.current.getContext()
|
|
11805
11805
|
});
|
|
11806
11806
|
j && await (F == null ? void 0 : F([j]));
|
|
11807
11807
|
} catch (j) {
|
|
11808
11808
|
zt(JSON.stringify(j));
|
|
11809
11809
|
} finally {
|
|
11810
|
-
|
|
11810
|
+
A == null || A(!1);
|
|
11811
11811
|
}
|
|
11812
|
-
}, [d, y,
|
|
11812
|
+
}, [d, y, T, F, A]), Q = E(
|
|
11813
11813
|
(j) => {
|
|
11814
11814
|
x == null || x(s), _ == null || _(!1), l == null || l(j);
|
|
11815
11815
|
},
|
|
@@ -11844,14 +11844,18 @@ function Vg({ toolbar: e }) {
|
|
|
11844
11844
|
);
|
|
11845
11845
|
return Wt(
|
|
11846
11846
|
"pagedown",
|
|
11847
|
-
() =>
|
|
11847
|
+
async () => {
|
|
11848
|
+
!D || !await T.current.cancelUnsavedChanges() || r();
|
|
11849
|
+
},
|
|
11848
11850
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11849
|
-
[D,
|
|
11851
|
+
[D, r, T]
|
|
11850
11852
|
), Wt(
|
|
11851
11853
|
"pageup",
|
|
11852
|
-
() =>
|
|
11854
|
+
async () => {
|
|
11855
|
+
!D || !await T.current.cancelUnsavedChanges() || o();
|
|
11856
|
+
},
|
|
11853
11857
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11854
|
-
[D,
|
|
11858
|
+
[D, o, T]
|
|
11855
11859
|
), Wt(
|
|
11856
11860
|
"ctrl+s,command+s",
|
|
11857
11861
|
() => D && (c == null ? void 0 : c()),
|
|
@@ -11859,13 +11863,20 @@ function Vg({ toolbar: e }) {
|
|
|
11859
11863
|
[D, c]
|
|
11860
11864
|
), Wt(
|
|
11861
11865
|
"ctrl+l,command+l",
|
|
11862
|
-
() => {
|
|
11863
|
-
D
|
|
11866
|
+
async () => {
|
|
11867
|
+
!D || !R || !await T.current.cancelUnsavedChanges() || (x == null || x(s), l == null || l(R));
|
|
11864
11868
|
},
|
|
11865
11869
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11866
|
-
[
|
|
11870
|
+
[
|
|
11871
|
+
D,
|
|
11872
|
+
R,
|
|
11873
|
+
s,
|
|
11874
|
+
x,
|
|
11875
|
+
l,
|
|
11876
|
+
T
|
|
11877
|
+
]
|
|
11867
11878
|
), s ? /* @__PURE__ */ P(Xe, { wrap: !0, children: [
|
|
11868
|
-
|
|
11879
|
+
O && /* @__PURE__ */ P(le, { children: [
|
|
11869
11880
|
/* @__PURE__ */ i(Ke, {}),
|
|
11870
11881
|
/* @__PURE__ */ i(et, {}),
|
|
11871
11882
|
/* @__PURE__ */ i(et, {})
|
|
@@ -11947,7 +11958,7 @@ function Vg({ toolbar: e }) {
|
|
|
11947
11958
|
disabled: N || !1,
|
|
11948
11959
|
onPreviousClick: o,
|
|
11949
11960
|
onNextClick: r,
|
|
11950
|
-
tryAction:
|
|
11961
|
+
tryAction: L
|
|
11951
11962
|
}
|
|
11952
11963
|
),
|
|
11953
11964
|
/* @__PURE__ */ i(et, {}),
|
|
@@ -12379,11 +12390,11 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12379
12390
|
searchVisible: v = !0,
|
|
12380
12391
|
setSearchVisible: w = void 0,
|
|
12381
12392
|
sorter: I = void 0,
|
|
12382
|
-
setSorter:
|
|
12393
|
+
setSorter: A = void 0,
|
|
12383
12394
|
setTotalItems: S = void 0,
|
|
12384
|
-
setSearchTreeNameSearch:
|
|
12395
|
+
setSearchTreeNameSearch: O = void 0,
|
|
12385
12396
|
setTreeIsLoading: b = void 0,
|
|
12386
|
-
limit:
|
|
12397
|
+
limit: T,
|
|
12387
12398
|
setLimit: _,
|
|
12388
12399
|
searchParams: R,
|
|
12389
12400
|
searchValues: x,
|
|
@@ -12396,9 +12407,9 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12396
12407
|
}, [R]), se(() => {
|
|
12397
12408
|
t.view_id !== D.view_id && N(!0);
|
|
12398
12409
|
}, [D]);
|
|
12399
|
-
const { clear:
|
|
12410
|
+
const { clear: L, searchFilterLoading: B, searchError: G, offset: $, tableRefreshing: K } = Ea({
|
|
12400
12411
|
model: r,
|
|
12401
|
-
setSearchTreeNameSearch:
|
|
12412
|
+
setSearchTreeNameSearch: O,
|
|
12402
12413
|
setSelectedRowItems: g,
|
|
12403
12414
|
searchParams: R,
|
|
12404
12415
|
setSearchValues: F,
|
|
@@ -12409,14 +12420,14 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12409
12420
|
formView: s,
|
|
12410
12421
|
treeView: l,
|
|
12411
12422
|
sorter: I,
|
|
12412
|
-
setSorter:
|
|
12423
|
+
setSorter: A,
|
|
12413
12424
|
setCurrentItemIndex: m,
|
|
12414
12425
|
setResultsActionView: d,
|
|
12415
12426
|
resultsActionView: p,
|
|
12416
12427
|
domain: a,
|
|
12417
12428
|
currentId: h,
|
|
12418
12429
|
setActionViewTotalItems: S,
|
|
12419
|
-
limit:
|
|
12430
|
+
limit: T,
|
|
12420
12431
|
setLimit: _
|
|
12421
12432
|
}), Z = X(
|
|
12422
12433
|
() => er([
|
|
@@ -12448,8 +12459,8 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12448
12459
|
...c == null ? void 0 : c.fields
|
|
12449
12460
|
},
|
|
12450
12461
|
searchFields: Z,
|
|
12451
|
-
limit:
|
|
12452
|
-
onClear:
|
|
12462
|
+
limit: T,
|
|
12463
|
+
onClear: L,
|
|
12453
12464
|
offset: $,
|
|
12454
12465
|
isSearching: B,
|
|
12455
12466
|
onSubmit: (J) => {
|
|
@@ -12470,7 +12481,7 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12470
12481
|
model: r,
|
|
12471
12482
|
context: o,
|
|
12472
12483
|
domain: mn(R || [], a),
|
|
12473
|
-
limit: V ?
|
|
12484
|
+
limit: V ? T : void 0,
|
|
12474
12485
|
manualIds: V && p && p.length > 0 ? p.map((J) => J.id) : void 0
|
|
12475
12486
|
}
|
|
12476
12487
|
)
|
|
@@ -12575,22 +12586,22 @@ function Yg({
|
|
|
12575
12586
|
setSearchVisible: v,
|
|
12576
12587
|
setSearchTreeNameSearch: w,
|
|
12577
12588
|
searchTreeNameSearch: I,
|
|
12578
|
-
treeIsLoading:
|
|
12589
|
+
treeIsLoading: A,
|
|
12579
12590
|
setPreviousView: S,
|
|
12580
|
-
previousView:
|
|
12591
|
+
previousView: O,
|
|
12581
12592
|
results: b,
|
|
12582
|
-
limit:
|
|
12593
|
+
limit: T,
|
|
12583
12594
|
totalItems: _,
|
|
12584
12595
|
isActive: R,
|
|
12585
12596
|
isInfiniteTree: x
|
|
12586
12597
|
} = ee(mt), F = Sr(
|
|
12587
12598
|
vn.FEATURE_ADVANCED_EXPORT
|
|
12588
|
-
), { t: D } = de(), [V, N] = C(!1),
|
|
12599
|
+
), { t: D } = de(), [V, N] = C(!1), L = Y(!0), B = E(() => {
|
|
12589
12600
|
var te;
|
|
12590
12601
|
(te = m == null ? void 0 : m.current) == null || te.refreshResults();
|
|
12591
12602
|
}, [m]), { actionButtonProps: G, printButtonProps: $ } = Ba({
|
|
12592
12603
|
toolbar: n,
|
|
12593
|
-
disabled:
|
|
12604
|
+
disabled: A,
|
|
12594
12605
|
parentContext: e,
|
|
12595
12606
|
selectedRowItems: s,
|
|
12596
12607
|
onRefreshParentValues: B
|
|
@@ -12601,21 +12612,21 @@ function Yg({
|
|
|
12601
12612
|
() => I !== void 0 && I.trim().length > 0,
|
|
12602
12613
|
[I]
|
|
12603
12614
|
), J = X(() => {
|
|
12604
|
-
var
|
|
12605
|
-
const te = (
|
|
12615
|
+
var M;
|
|
12616
|
+
const te = (M = m == null ? void 0 : m.current) == null ? void 0 : M.getDomain();
|
|
12606
12617
|
return mn(te || [], g || []);
|
|
12607
12618
|
}, [m, g]), Q = E(async () => {
|
|
12608
12619
|
var te;
|
|
12609
12620
|
try {
|
|
12610
12621
|
f == null || f(!0);
|
|
12611
|
-
const
|
|
12622
|
+
const M = s[0].id;
|
|
12612
12623
|
await k.getHandler().duplicate({
|
|
12613
|
-
id:
|
|
12624
|
+
id: M,
|
|
12614
12625
|
model: d,
|
|
12615
12626
|
context: { ...e }
|
|
12616
12627
|
}) && ((te = m == null ? void 0 : m.current) == null || te.refreshResults());
|
|
12617
|
-
} catch (
|
|
12618
|
-
dt(
|
|
12628
|
+
} catch (M) {
|
|
12629
|
+
dt(M);
|
|
12619
12630
|
} finally {
|
|
12620
12631
|
f == null || f(!1);
|
|
12621
12632
|
}
|
|
@@ -12630,11 +12641,11 @@ function Yg({
|
|
|
12630
12641
|
try {
|
|
12631
12642
|
l == null || l(!0), await k.getHandler().deleteObjects({
|
|
12632
12643
|
model: d,
|
|
12633
|
-
ids: s.map((
|
|
12644
|
+
ids: s.map((M) => M.id),
|
|
12634
12645
|
context: { ...e }
|
|
12635
12646
|
}), h == null || h(void 0), p == null || p(void 0), (te = m == null ? void 0 : m.current) == null || te.refreshResults();
|
|
12636
|
-
} catch (
|
|
12637
|
-
dt(
|
|
12647
|
+
} catch (M) {
|
|
12648
|
+
dt(M);
|
|
12638
12649
|
} finally {
|
|
12639
12650
|
l == null || l(!1);
|
|
12640
12651
|
}
|
|
@@ -12653,15 +12664,15 @@ function Yg({
|
|
|
12653
12664
|
[o, S, a]
|
|
12654
12665
|
), H = E(
|
|
12655
12666
|
(te) => {
|
|
12656
|
-
var
|
|
12657
|
-
te && te.trim().length > 0 ? w == null || w(te) : (w == null || w(void 0), x || (
|
|
12667
|
+
var M;
|
|
12668
|
+
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
12669
|
},
|
|
12659
12670
|
[x, m, w]
|
|
12660
12671
|
), j = E(
|
|
12661
12672
|
(te) => {
|
|
12662
12673
|
if (te.id === "print_screen") {
|
|
12663
|
-
let
|
|
12664
|
-
|
|
12674
|
+
let M = (s == null ? void 0 : s.map((ne) => ne.id)) || [];
|
|
12675
|
+
M.length === 0 && (M = (b == null ? void 0 : b.map((ne) => ne.id)) || []), K(
|
|
12665
12676
|
{
|
|
12666
12677
|
id: -1,
|
|
12667
12678
|
model: d,
|
|
@@ -12669,7 +12680,7 @@ function Yg({
|
|
|
12669
12680
|
type: "ir.actions.report.xml",
|
|
12670
12681
|
datas: {
|
|
12671
12682
|
model: d,
|
|
12672
|
-
ids:
|
|
12683
|
+
ids: M
|
|
12673
12684
|
}
|
|
12674
12685
|
},
|
|
12675
12686
|
e
|
|
@@ -12683,8 +12694,8 @@ function Yg({
|
|
|
12683
12694
|
se(() => {
|
|
12684
12695
|
var te;
|
|
12685
12696
|
if (x && I === void 0) {
|
|
12686
|
-
if (
|
|
12687
|
-
|
|
12697
|
+
if (L.current) {
|
|
12698
|
+
L.current = !1;
|
|
12688
12699
|
return;
|
|
12689
12700
|
}
|
|
12690
12701
|
(te = m == null ? void 0 : m.current) == null || te.refreshResults();
|
|
@@ -12692,10 +12703,10 @@ function Yg({
|
|
|
12692
12703
|
}, [x, I, m]), Wt(
|
|
12693
12704
|
"ctrl+l,command+l",
|
|
12694
12705
|
() => {
|
|
12695
|
-
R &&
|
|
12706
|
+
R && O && (S == null || S(o), a == null || a(O));
|
|
12696
12707
|
},
|
|
12697
12708
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
12698
|
-
[
|
|
12709
|
+
[O, o, R, S, a]
|
|
12699
12710
|
), Wt(
|
|
12700
12711
|
"ctrl+f,command+f",
|
|
12701
12712
|
() => {
|
|
@@ -12718,7 +12729,7 @@ function Yg({
|
|
|
12718
12729
|
});
|
|
12719
12730
|
}, [Ce, D]);
|
|
12720
12731
|
return /* @__PURE__ */ P(Xe, { wrap: !0, children: [
|
|
12721
|
-
|
|
12732
|
+
A && /* @__PURE__ */ P(le, { children: [
|
|
12722
12733
|
/* @__PURE__ */ i(Ke, {}),
|
|
12723
12734
|
/* @__PURE__ */ i(et, {}),
|
|
12724
12735
|
/* @__PURE__ */ i(et, {})
|
|
@@ -12727,7 +12738,7 @@ function Yg({
|
|
|
12727
12738
|
/* @__PURE__ */ i(
|
|
12728
12739
|
Gg,
|
|
12729
12740
|
{
|
|
12730
|
-
disabled: u || c ||
|
|
12741
|
+
disabled: u || c || A,
|
|
12731
12742
|
searchText: I,
|
|
12732
12743
|
onSearch: H
|
|
12733
12744
|
}
|
|
@@ -12744,18 +12755,18 @@ function Yg({
|
|
|
12744
12755
|
tooltip: D("advanced_search"),
|
|
12745
12756
|
type: y ? "primary" : "default",
|
|
12746
12757
|
onClick: () => v == null ? void 0 : v(!y),
|
|
12747
|
-
disabled: u || c ||
|
|
12758
|
+
disabled: u || c || A,
|
|
12748
12759
|
badgeNumber: g == null ? void 0 : g.length
|
|
12749
12760
|
}
|
|
12750
12761
|
),
|
|
12751
12762
|
/* @__PURE__ */ i(et, {}),
|
|
12752
|
-
/* @__PURE__ */ i(Qa, { disabled:
|
|
12763
|
+
/* @__PURE__ */ i(Qa, { disabled: A }),
|
|
12753
12764
|
/* @__PURE__ */ i(
|
|
12754
12765
|
it,
|
|
12755
12766
|
{
|
|
12756
12767
|
icon: /* @__PURE__ */ i(pr, {}),
|
|
12757
12768
|
tooltip: D("duplicate"),
|
|
12758
|
-
disabled: !s || (s == null ? void 0 : s.length) !== 1 || u ||
|
|
12769
|
+
disabled: !s || (s == null ? void 0 : s.length) !== 1 || u || A,
|
|
12759
12770
|
loading: u,
|
|
12760
12771
|
onClick: q
|
|
12761
12772
|
}
|
|
@@ -12765,7 +12776,7 @@ function Yg({
|
|
|
12765
12776
|
{
|
|
12766
12777
|
icon: /* @__PURE__ */ i(wo, {}),
|
|
12767
12778
|
tooltip: D("delete"),
|
|
12768
|
-
disabled: !(s && (s == null ? void 0 : s.length) > 0) ||
|
|
12779
|
+
disabled: !(s && (s == null ? void 0 : s.length) > 0) || A,
|
|
12769
12780
|
loading: c,
|
|
12770
12781
|
onClick: ie
|
|
12771
12782
|
}
|
|
@@ -12777,7 +12788,7 @@ function Yg({
|
|
|
12777
12788
|
{
|
|
12778
12789
|
icon: /* @__PURE__ */ i(ho, {}),
|
|
12779
12790
|
tooltip: D("showLogs"),
|
|
12780
|
-
disabled: !(s && (s == null ? void 0 : s.length) > 0) ||
|
|
12791
|
+
disabled: !(s && (s == null ? void 0 : s.length) > 0) || A,
|
|
12781
12792
|
onClick: () => Xa(d, s[0].id, D)
|
|
12782
12793
|
}
|
|
12783
12794
|
),
|
|
@@ -12786,7 +12797,7 @@ function Yg({
|
|
|
12786
12797
|
{
|
|
12787
12798
|
icon: /* @__PURE__ */ i(hr, {}),
|
|
12788
12799
|
tooltip: D("refresh"),
|
|
12789
|
-
disabled: u || c ||
|
|
12800
|
+
disabled: u || c || A,
|
|
12790
12801
|
onClick: B
|
|
12791
12802
|
}
|
|
12792
12803
|
),
|
|
@@ -12798,8 +12809,8 @@ function Yg({
|
|
|
12798
12809
|
currentView: o,
|
|
12799
12810
|
availableViews: r,
|
|
12800
12811
|
onChangeView: me,
|
|
12801
|
-
previousView:
|
|
12802
|
-
disabled:
|
|
12812
|
+
previousView: O,
|
|
12813
|
+
disabled: A
|
|
12803
12814
|
}
|
|
12804
12815
|
)
|
|
12805
12816
|
] }),
|
|
@@ -12829,7 +12840,7 @@ function Yg({
|
|
|
12829
12840
|
}
|
|
12830
12841
|
],
|
|
12831
12842
|
onItemClick: j,
|
|
12832
|
-
disabled: u || c ||
|
|
12843
|
+
disabled: u || c || A || Z
|
|
12833
12844
|
}
|
|
12834
12845
|
),
|
|
12835
12846
|
/* @__PURE__ */ i(
|
|
@@ -12839,7 +12850,7 @@ function Yg({
|
|
|
12839
12850
|
onClose: () => N(!1),
|
|
12840
12851
|
model: d,
|
|
12841
12852
|
domain: J,
|
|
12842
|
-
limit:
|
|
12853
|
+
limit: T,
|
|
12843
12854
|
totalRegisters: _ || 0,
|
|
12844
12855
|
selectedRegistersToExport: s,
|
|
12845
12856
|
visibleRegisters: (b == null ? void 0 : b.length) || 0,
|
|
@@ -12902,16 +12913,16 @@ const qg = (e) => {
|
|
|
12902
12913
|
setPreviousView: v,
|
|
12903
12914
|
setIsInfiniteTree: w,
|
|
12904
12915
|
setSelectedRowItems: I
|
|
12905
|
-
} = ee(mt),
|
|
12916
|
+
} = ee(mt), A = E(
|
|
12906
12917
|
(S) => {
|
|
12907
|
-
const { id:
|
|
12908
|
-
f(
|
|
12909
|
-
const b = u.findIndex((_) => _.id ===
|
|
12918
|
+
const { id: O } = S;
|
|
12919
|
+
f(O);
|
|
12920
|
+
const b = u.findIndex((_) => _.id === O);
|
|
12910
12921
|
v == null || v(y), c(b);
|
|
12911
|
-
const
|
|
12922
|
+
const T = m.find(
|
|
12912
12923
|
(_) => _.type === "form"
|
|
12913
12924
|
);
|
|
12914
|
-
d(
|
|
12925
|
+
d(T);
|
|
12915
12926
|
},
|
|
12916
12927
|
[
|
|
12917
12928
|
m,
|
|
@@ -12944,7 +12955,7 @@ const qg = (e) => {
|
|
|
12944
12955
|
formView: a,
|
|
12945
12956
|
treeView: s,
|
|
12946
12957
|
domain: l,
|
|
12947
|
-
onRowClicked:
|
|
12958
|
+
onRowClicked: A
|
|
12948
12959
|
}
|
|
12949
12960
|
),
|
|
12950
12961
|
!g && /* @__PURE__ */ i(
|
|
@@ -12958,7 +12969,7 @@ const qg = (e) => {
|
|
|
12958
12969
|
formView: a,
|
|
12959
12970
|
treeView: s,
|
|
12960
12971
|
domain: l,
|
|
12961
|
-
onRowClicked:
|
|
12972
|
+
onRowClicked: A
|
|
12962
12973
|
}
|
|
12963
12974
|
)
|
|
12964
12975
|
] }) : null;
|
|
@@ -13118,12 +13129,12 @@ function ty(e, t) {
|
|
|
13118
13129
|
treeExpandable: g = !1,
|
|
13119
13130
|
limit: y,
|
|
13120
13131
|
initialSearchParams: v = []
|
|
13121
|
-
} = e, [w, I] = C(), [
|
|
13122
|
-
|
|
13123
|
-
), [x, F] = C([]), [D, V] = C(), [N,
|
|
13132
|
+
} = e, [w, I] = C(), [A, S] = C([]), [O, b] = C(!0), T = m || void 0, [_, R] = C(
|
|
13133
|
+
T
|
|
13134
|
+
), [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
13135
|
bt
|
|
13125
13136
|
), {
|
|
13126
|
-
setCurrentView:
|
|
13137
|
+
setCurrentView: M,
|
|
13127
13138
|
setCurrentId: ne,
|
|
13128
13139
|
tabs: oe,
|
|
13129
13140
|
activeKey: we,
|
|
@@ -13143,9 +13154,9 @@ function ty(e, t) {
|
|
|
13143
13154
|
}
|
|
13144
13155
|
const We = E(
|
|
13145
13156
|
(z) => {
|
|
13146
|
-
I(z),
|
|
13157
|
+
I(z), M == null || M(z);
|
|
13147
13158
|
},
|
|
13148
|
-
[
|
|
13159
|
+
[M]
|
|
13149
13160
|
);
|
|
13150
13161
|
Tt(t, () => ({
|
|
13151
13162
|
canWeClose: ue
|
|
@@ -13258,13 +13269,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13258
13269
|
c
|
|
13259
13270
|
]);
|
|
13260
13271
|
l({ tabKey: c, canWeClose: ue }), dn(() => {
|
|
13261
|
-
const z =
|
|
13262
|
-
We(pe || z), m ? ne == null || ne(
|
|
13272
|
+
const z = A.find((_e) => _e.type === "tree"), pe = A.find((_e) => u.id ? _e.type === u.type && _e.view_id === u.id : _e.type === u.type);
|
|
13273
|
+
We(pe || z), m ? ne == null || ne(T) : (Be(void 0), V(void 0)), Ee();
|
|
13263
13274
|
}, [r, a, m]), dn(() => {
|
|
13264
13275
|
if (we === c) {
|
|
13265
13276
|
ne == null || ne(_);
|
|
13266
13277
|
const z = { action_id: h, action_type: p };
|
|
13267
|
-
|
|
13278
|
+
M == null || M({ ...w, extra: z });
|
|
13268
13279
|
}
|
|
13269
13280
|
}, [oe, we]);
|
|
13270
13281
|
async function ue() {
|
|
@@ -13300,7 +13311,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13300
13311
|
_e = "tree", Ge = [["id", "in", z]];
|
|
13301
13312
|
if (Ce(!1), J(!1), pe && _e === "form") {
|
|
13302
13313
|
Be(z[0]);
|
|
13303
|
-
const fe =
|
|
13314
|
+
const fe = A.find(
|
|
13304
13315
|
(ye) => ye.type === "form"
|
|
13305
13316
|
);
|
|
13306
13317
|
We(fe);
|
|
@@ -13325,19 +13336,19 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13325
13336
|
q.current.clearAndReload();
|
|
13326
13337
|
else {
|
|
13327
13338
|
Be(void 0);
|
|
13328
|
-
const z =
|
|
13339
|
+
const z = A.find(
|
|
13329
13340
|
(pe) => pe.type === "form"
|
|
13330
13341
|
);
|
|
13331
13342
|
We(z);
|
|
13332
13343
|
}
|
|
13333
13344
|
}
|
|
13334
|
-
return
|
|
13345
|
+
return O ? /* @__PURE__ */ i(Ke, {}) : w ? /* @__PURE__ */ P(
|
|
13335
13346
|
wu,
|
|
13336
13347
|
{
|
|
13337
13348
|
title: s,
|
|
13338
13349
|
currentView: w,
|
|
13339
13350
|
setCurrentView: We,
|
|
13340
|
-
availableViews:
|
|
13351
|
+
availableViews: A,
|
|
13341
13352
|
formRef: q,
|
|
13342
13353
|
searchTreeRef: ie,
|
|
13343
13354
|
onNewClicked: Ne,
|
|
@@ -13346,7 +13357,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13346
13357
|
setCurrentItemIndex: V,
|
|
13347
13358
|
currentItemIndex: D,
|
|
13348
13359
|
results: N,
|
|
13349
|
-
setResults:
|
|
13360
|
+
setResults: L,
|
|
13350
13361
|
currentModel: r,
|
|
13351
13362
|
sorter: B,
|
|
13352
13363
|
setSorter: G,
|
|
@@ -13364,7 +13375,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13364
13375
|
/* @__PURE__ */ i(
|
|
13365
13376
|
ny,
|
|
13366
13377
|
{
|
|
13367
|
-
availableViews:
|
|
13378
|
+
availableViews: A,
|
|
13368
13379
|
formRef: q,
|
|
13369
13380
|
currentId: _,
|
|
13370
13381
|
currentView: w,
|
|
@@ -13373,7 +13384,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13373
13384
|
domain: n,
|
|
13374
13385
|
formDefaultValues: f,
|
|
13375
13386
|
results: N,
|
|
13376
|
-
setResults:
|
|
13387
|
+
setResults: L,
|
|
13377
13388
|
setCurrentItemIndex: V,
|
|
13378
13389
|
formForcedValues: d,
|
|
13379
13390
|
limit: y,
|
|
@@ -13525,13 +13536,13 @@ function iy(e) {
|
|
|
13525
13536
|
domain: a = [],
|
|
13526
13537
|
visible: s = !0,
|
|
13527
13538
|
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), [
|
|
13529
|
-
Z(!0), I(
|
|
13539
|
+
} = e, [c, u] = C(!1), [f, d] = C(!1), [m, h] = C(), [p, g] = C(), [y, v] = C(), [w, I] = C(1), [A, S] = C(0), O = Y(jt), b = Y([]), [T, _] = 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) => {
|
|
13540
|
+
Z(!0), I(M), S((M - 1) * O.current);
|
|
13530
13541
|
}, Ce = async () => {
|
|
13531
|
-
const
|
|
13542
|
+
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
13543
|
params: ne,
|
|
13533
|
-
limit:
|
|
13534
|
-
offset:
|
|
13544
|
+
limit: O.current,
|
|
13545
|
+
offset: A,
|
|
13535
13546
|
model: m,
|
|
13536
13547
|
fields: p.fields,
|
|
13537
13548
|
context: l,
|
|
@@ -13549,36 +13560,36 @@ function iy(e) {
|
|
|
13549
13560
|
}, me = async () => {
|
|
13550
13561
|
try {
|
|
13551
13562
|
Z(!0), await Ce();
|
|
13552
|
-
} catch (
|
|
13553
|
-
B(JSON.stringify(
|
|
13563
|
+
} catch (M) {
|
|
13564
|
+
B(JSON.stringify(M));
|
|
13554
13565
|
}
|
|
13555
13566
|
};
|
|
13556
13567
|
se(() => {
|
|
13557
13568
|
f && s && me();
|
|
13558
|
-
}, [w,
|
|
13559
|
-
const H = async (
|
|
13569
|
+
}, [w, A, f, s]);
|
|
13570
|
+
const H = async (M) => {
|
|
13560
13571
|
d(!1), u(!0), $(void 0);
|
|
13561
13572
|
try {
|
|
13562
|
-
|
|
13573
|
+
M === "action" ? await j() : await q(), d(!0);
|
|
13563
13574
|
} catch (ne) {
|
|
13564
13575
|
$(ne);
|
|
13565
13576
|
} finally {
|
|
13566
13577
|
u(!1);
|
|
13567
13578
|
}
|
|
13568
13579
|
}, j = async () => {
|
|
13569
|
-
const
|
|
13580
|
+
const M = await k.getHandler().getViewsForAction({
|
|
13570
13581
|
action: t,
|
|
13571
13582
|
context: l
|
|
13572
13583
|
});
|
|
13573
|
-
J.current =
|
|
13584
|
+
J.current = M.domain, v(M.views.get("form")), g(M.views.get("tree")), h(M.model), O.current = M.limit;
|
|
13574
13585
|
}, q = async () => {
|
|
13575
13586
|
h(n);
|
|
13576
|
-
const
|
|
13587
|
+
const M = await k.getHandler().getView({
|
|
13577
13588
|
model: n,
|
|
13578
13589
|
type: "form",
|
|
13579
13590
|
context: l
|
|
13580
13591
|
});
|
|
13581
|
-
v(
|
|
13592
|
+
v(M);
|
|
13582
13593
|
const ne = await k.getHandler().getView({
|
|
13583
13594
|
model: n,
|
|
13584
13595
|
type: "tree",
|
|
@@ -13590,21 +13601,21 @@ function iy(e) {
|
|
|
13590
13601
|
se(() => {
|
|
13591
13602
|
t ? H("action") : n && H("model");
|
|
13592
13603
|
}, [t, n]);
|
|
13593
|
-
const ie = (
|
|
13594
|
-
const { id: ne } =
|
|
13604
|
+
const ie = (M) => {
|
|
13605
|
+
const { id: ne } = M;
|
|
13595
13606
|
o({
|
|
13596
13607
|
id: ne,
|
|
13597
13608
|
model: m,
|
|
13598
13609
|
treeView: p
|
|
13599
13610
|
});
|
|
13600
13611
|
}, te = () => !p || !y ? null : /* @__PURE__ */ P("div", { style: { overflowY: "scroll" }, children: [
|
|
13601
|
-
|
|
13612
|
+
L && /* @__PURE__ */ i(at, { className: "mt-10", message: L, type: "error", banner: !0 }),
|
|
13602
13613
|
/* @__PURE__ */ i(
|
|
13603
13614
|
Un,
|
|
13604
13615
|
{
|
|
13605
13616
|
showPagination: !1,
|
|
13606
|
-
total:
|
|
13607
|
-
limit:
|
|
13617
|
+
total: T,
|
|
13618
|
+
limit: O.current,
|
|
13608
13619
|
page: w,
|
|
13609
13620
|
treeView: p,
|
|
13610
13621
|
results: R,
|
|
@@ -13613,11 +13624,11 @@ function iy(e) {
|
|
|
13613
13624
|
onRowClicked: ie,
|
|
13614
13625
|
colorsForResults: F,
|
|
13615
13626
|
sorter: V,
|
|
13616
|
-
onChangeSort: (
|
|
13617
|
-
N == null || N(
|
|
13627
|
+
onChangeSort: (M) => {
|
|
13628
|
+
N == null || N(M);
|
|
13618
13629
|
const ne = an({
|
|
13619
13630
|
resultsToSort: R,
|
|
13620
|
-
sorter:
|
|
13631
|
+
sorter: M,
|
|
13621
13632
|
fields: { ...p.fields, ...y.fields }
|
|
13622
13633
|
});
|
|
13623
13634
|
x(ne);
|
|
@@ -13650,7 +13661,7 @@ function ly(e, t) {
|
|
|
13650
13661
|
moveItemsEnabled: p
|
|
13651
13662
|
} = ee(Ho), g = Y(), y = Y(), [v] = Je(k.getHandler().getView), [w] = Je(
|
|
13652
13663
|
k.getHandler().readObjects
|
|
13653
|
-
), [I] = Je(k.getHandler().update),
|
|
13664
|
+
), [I] = Je(k.getHandler().update), A = Sr(
|
|
13654
13665
|
vn.FEATURE_READFORVIEW
|
|
13655
13666
|
);
|
|
13656
13667
|
se(() => {
|
|
@@ -13664,19 +13675,19 @@ function ly(e, t) {
|
|
|
13664
13675
|
async function S() {
|
|
13665
13676
|
u(!0), m(!0), d(void 0);
|
|
13666
13677
|
try {
|
|
13667
|
-
const F = await
|
|
13678
|
+
const F = await O(), D = await T(F), V = F.fields[Br].relation, N = D[Br].items;
|
|
13668
13679
|
y.current = F.fields;
|
|
13669
|
-
const
|
|
13680
|
+
const L = await b({
|
|
13670
13681
|
items: N,
|
|
13671
13682
|
model: V,
|
|
13672
13683
|
context: r
|
|
13673
|
-
}), B = await _(
|
|
13684
|
+
}), B = await _(L);
|
|
13674
13685
|
d(void 0), l(B), u(!1), m(!1);
|
|
13675
13686
|
} catch (F) {
|
|
13676
13687
|
d(JSON.stringify(F));
|
|
13677
13688
|
}
|
|
13678
13689
|
}
|
|
13679
|
-
async function
|
|
13690
|
+
async function O() {
|
|
13680
13691
|
return await v({
|
|
13681
13692
|
model: n,
|
|
13682
13693
|
type: "form",
|
|
@@ -13707,7 +13718,7 @@ function ly(e, t) {
|
|
|
13707
13718
|
});
|
|
13708
13719
|
return N;
|
|
13709
13720
|
}
|
|
13710
|
-
async function
|
|
13721
|
+
async function T(F) {
|
|
13711
13722
|
return (await w({
|
|
13712
13723
|
model: n,
|
|
13713
13724
|
ids: [o],
|
|
@@ -13718,9 +13729,9 @@ function ly(e, t) {
|
|
|
13718
13729
|
async function _(F) {
|
|
13719
13730
|
const D = [];
|
|
13720
13731
|
for (const N of F) {
|
|
13721
|
-
const { values:
|
|
13722
|
-
if (
|
|
13723
|
-
const B = parseInt(
|
|
13732
|
+
const { values: L } = N;
|
|
13733
|
+
if (L.action_id && L.action_id.length > 0) {
|
|
13734
|
+
const B = parseInt(L.action_id[0], 10), G = $s({
|
|
13724
13735
|
actionId: B,
|
|
13725
13736
|
rootContext: r
|
|
13726
13737
|
}).then(($) => ({ ...N, actionData: $ }));
|
|
@@ -13760,14 +13771,14 @@ function ly(e, t) {
|
|
|
13760
13771
|
position: JSON.stringify(G).replace(/"/g, "'")
|
|
13761
13772
|
}
|
|
13762
13773
|
};
|
|
13763
|
-
}),
|
|
13774
|
+
}), L = {
|
|
13764
13775
|
fields: g.current,
|
|
13765
13776
|
items: N
|
|
13766
13777
|
};
|
|
13767
13778
|
await I({
|
|
13768
13779
|
model: n,
|
|
13769
13780
|
id: o,
|
|
13770
|
-
values: { [Br]:
|
|
13781
|
+
values: { [Br]: L },
|
|
13771
13782
|
fields: y.current,
|
|
13772
13783
|
context: r
|
|
13773
13784
|
});
|
|
@@ -13776,7 +13787,7 @@ function ly(e, t) {
|
|
|
13776
13787
|
h(a);
|
|
13777
13788
|
}
|
|
13778
13789
|
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:
|
|
13790
|
+
const { actionData: V, values: N } = F, { position: L, id: B } = N, {
|
|
13780
13791
|
actionId: G,
|
|
13781
13792
|
actionType: $,
|
|
13782
13793
|
key: K,
|
|
@@ -13791,13 +13802,13 @@ function ly(e, t) {
|
|
|
13791
13802
|
} = V;
|
|
13792
13803
|
let ie = {};
|
|
13793
13804
|
try {
|
|
13794
|
-
ie = JSON.parse(
|
|
13805
|
+
ie = JSON.parse(L.replace(/'/g, '"'));
|
|
13795
13806
|
} catch {
|
|
13796
13807
|
ie = { x: D * 2, y: 0, w: 2, h: 3 };
|
|
13797
13808
|
}
|
|
13798
13809
|
let te = null;
|
|
13799
13810
|
if ((j == null ? void 0 : j.type) === "graph") {
|
|
13800
|
-
const we = N.server_action === !0 &&
|
|
13811
|
+
const we = N.server_action === !0 && A ? Us : yn;
|
|
13801
13812
|
te = /* @__PURE__ */ i(
|
|
13802
13813
|
we,
|
|
13803
13814
|
{
|
|
@@ -13869,7 +13880,7 @@ function ly(e, t) {
|
|
|
13869
13880
|
B
|
|
13870
13881
|
);
|
|
13871
13882
|
}
|
|
13872
|
-
let
|
|
13883
|
+
let M;
|
|
13873
13884
|
const ne = Q.find((oe) => {
|
|
13874
13885
|
const [, we] = oe;
|
|
13875
13886
|
return we === "tree";
|
|
@@ -13881,7 +13892,7 @@ function ly(e, t) {
|
|
|
13881
13892
|
title: Be,
|
|
13882
13893
|
model: We
|
|
13883
13894
|
} = V;
|
|
13884
|
-
|
|
13895
|
+
M = {
|
|
13885
13896
|
action_id: ge,
|
|
13886
13897
|
action_type: Pe,
|
|
13887
13898
|
name: Be,
|
|
@@ -13898,7 +13909,7 @@ function ly(e, t) {
|
|
|
13898
13909
|
id: B,
|
|
13899
13910
|
title: Z,
|
|
13900
13911
|
parms: ie,
|
|
13901
|
-
action:
|
|
13912
|
+
action: M,
|
|
13902
13913
|
openAction: h,
|
|
13903
13914
|
tooltip: J,
|
|
13904
13915
|
children: te
|
|
@@ -13911,18 +13922,18 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13911
13922
|
const { ooui: t } = e;
|
|
13912
13923
|
return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(uy, { ooui: t }) });
|
|
13913
13924
|
}, uy = (e) => {
|
|
13914
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((
|
|
13925
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((T) => T.operation !== "pendingRemove").map((T) => T.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
13926
|
Ft(() => {
|
|
13916
|
-
|
|
13927
|
+
A();
|
|
13917
13928
|
}, [o]);
|
|
13918
|
-
const I = (
|
|
13929
|
+
const I = (T) => {
|
|
13919
13930
|
r == null || r({
|
|
13920
|
-
items:
|
|
13931
|
+
items: T
|
|
13921
13932
|
});
|
|
13922
13933
|
};
|
|
13923
|
-
async function
|
|
13934
|
+
async function A() {
|
|
13924
13935
|
d(!0);
|
|
13925
|
-
let
|
|
13936
|
+
let T = [];
|
|
13926
13937
|
if (n.domain) {
|
|
13927
13938
|
const _ = await k.getHandler().evalDomain({
|
|
13928
13939
|
domain: n.domain,
|
|
@@ -13933,12 +13944,12 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13933
13944
|
fields: v == null ? void 0 : v.getFields(),
|
|
13934
13945
|
context: v.getContext()
|
|
13935
13946
|
});
|
|
13936
|
-
|
|
13947
|
+
T = [...T, ..._];
|
|
13937
13948
|
}
|
|
13938
13949
|
try {
|
|
13939
13950
|
const R = (await k.getHandler().search({
|
|
13940
13951
|
model: m,
|
|
13941
|
-
params:
|
|
13952
|
+
params: T,
|
|
13942
13953
|
fieldsToRetrieve: [g],
|
|
13943
13954
|
context: { ...w == null ? void 0 : w(), ...h }
|
|
13944
13955
|
})).map((x) => {
|
|
@@ -13956,15 +13967,15 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13956
13967
|
return /* @__PURE__ */ i(at, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
13957
13968
|
}
|
|
13958
13969
|
const S = () => {
|
|
13959
|
-
b(s.map((
|
|
13960
|
-
},
|
|
13970
|
+
b(s.map((T) => T.value));
|
|
13971
|
+
}, O = () => {
|
|
13961
13972
|
b([]);
|
|
13962
|
-
}, b = (
|
|
13963
|
-
const _ = o.map((x) =>
|
|
13973
|
+
}, b = (T) => {
|
|
13974
|
+
const _ = o.map((x) => T.includes(x.id) ? x.operation == "pendingRemove" ? {
|
|
13964
13975
|
...x,
|
|
13965
13976
|
operation: "original"
|
|
13966
13977
|
} : x : { id: x.id, operation: "pendingRemove" }), R = _.map((x) => x.id);
|
|
13967
|
-
|
|
13978
|
+
T.filter((x) => !R.includes(x)).map((x) => {
|
|
13968
13979
|
_.push({ id: x, operation: "pendingLink" });
|
|
13969
13980
|
}), I(_);
|
|
13970
13981
|
};
|
|
@@ -13976,7 +13987,7 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13976
13987
|
disabled: p,
|
|
13977
13988
|
onChange: b,
|
|
13978
13989
|
style: { width: "100%" },
|
|
13979
|
-
children: /* @__PURE__ */ i(je, { children: s.map((
|
|
13990
|
+
children: /* @__PURE__ */ i(je, { children: s.map((T) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(On, { value: T.value, children: T.label }) })) })
|
|
13980
13991
|
}
|
|
13981
13992
|
),
|
|
13982
13993
|
!p && /* @__PURE__ */ P(Xe, { children: [
|
|
@@ -13988,7 +13999,7 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13988
13999
|
children: "Check all"
|
|
13989
14000
|
}
|
|
13990
14001
|
),
|
|
13991
|
-
/* @__PURE__ */ i(Le, { onClick:
|
|
14002
|
+
/* @__PURE__ */ i(Le, { onClick: O, disabled: a.length === 0, children: "Uncheck all" })
|
|
13992
14003
|
] })
|
|
13993
14004
|
] }) });
|
|
13994
14005
|
}, fy = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(my, { ...e }) }), my = (e) => {
|
|
@@ -14282,31 +14293,31 @@ function Hy(e, t) {
|
|
|
14282
14293
|
handleOpenActionUrl: p,
|
|
14283
14294
|
handleOpenActionResourceUrl: g
|
|
14284
14295
|
}));
|
|
14285
|
-
function m(
|
|
14286
|
-
if (
|
|
14287
|
-
const b = c.findIndex((
|
|
14296
|
+
function m(O) {
|
|
14297
|
+
if (O === r) {
|
|
14298
|
+
const b = c.findIndex((T) => T.key === O);
|
|
14288
14299
|
c[b - 1] && o(c[b - 1].key), c[b + 1] && o(c[b + 1].key);
|
|
14289
14300
|
}
|
|
14290
|
-
u(c.filter((b) => b.key !==
|
|
14301
|
+
u(c.filter((b) => b.key !== O)), f.current.delete(O);
|
|
14291
14302
|
}
|
|
14292
14303
|
function h({
|
|
14293
|
-
tabKey:
|
|
14304
|
+
tabKey: O,
|
|
14294
14305
|
canWeClose: b
|
|
14295
14306
|
}) {
|
|
14296
|
-
f.current.set(
|
|
14307
|
+
f.current.set(O, b);
|
|
14297
14308
|
}
|
|
14298
|
-
async function p(
|
|
14299
|
-
const { actionRawData: b, res_id:
|
|
14300
|
-
model:
|
|
14309
|
+
async function p(O) {
|
|
14310
|
+
const { actionRawData: b, res_id: T, initialView: _ } = O, R = await k.getHandler().getFields({
|
|
14311
|
+
model: O.model,
|
|
14301
14312
|
context: l
|
|
14302
14313
|
});
|
|
14303
14314
|
let x = el(
|
|
14304
14315
|
b == null ? void 0 : b.values
|
|
14305
14316
|
);
|
|
14306
|
-
const F =
|
|
14317
|
+
const F = T || x.active_id || x.id;
|
|
14307
14318
|
if (F) {
|
|
14308
14319
|
const N = await k.getHandler().readObjects({
|
|
14309
|
-
model:
|
|
14320
|
+
model: O.model,
|
|
14310
14321
|
context: l,
|
|
14311
14322
|
ids: [F]
|
|
14312
14323
|
});
|
|
@@ -14331,7 +14342,7 @@ function Hy(e, t) {
|
|
|
14331
14342
|
}
|
|
14332
14343
|
})();
|
|
14333
14344
|
S({
|
|
14334
|
-
...
|
|
14345
|
+
...O,
|
|
14335
14346
|
context: { ...l, ...D },
|
|
14336
14347
|
domain: V,
|
|
14337
14348
|
actionRawData: {
|
|
@@ -14342,12 +14353,12 @@ function Hy(e, t) {
|
|
|
14342
14353
|
});
|
|
14343
14354
|
}
|
|
14344
14355
|
async function g({
|
|
14345
|
-
model:
|
|
14356
|
+
model: O,
|
|
14346
14357
|
view_id: b,
|
|
14347
|
-
res_id:
|
|
14358
|
+
res_id: T
|
|
14348
14359
|
}) {
|
|
14349
14360
|
const _ = await k.getHandler().getView({
|
|
14350
|
-
model:
|
|
14361
|
+
model: O,
|
|
14351
14362
|
id: b || void 0,
|
|
14352
14363
|
type: "form",
|
|
14353
14364
|
context: l
|
|
@@ -14355,34 +14366,34 @@ function Hy(e, t) {
|
|
|
14355
14366
|
return await S({
|
|
14356
14367
|
action_id: -1,
|
|
14357
14368
|
action_type: "ir.actions.act_window",
|
|
14358
|
-
model:
|
|
14369
|
+
model: O,
|
|
14359
14370
|
views: [[_.view_id, "form"]],
|
|
14360
14371
|
context: l,
|
|
14361
14372
|
domain: [],
|
|
14362
|
-
title: _.title ||
|
|
14373
|
+
title: _.title || O,
|
|
14363
14374
|
target: "current",
|
|
14364
14375
|
initialView: { id: _.view_id, type: "form" },
|
|
14365
|
-
res_id:
|
|
14376
|
+
res_id: T
|
|
14366
14377
|
});
|
|
14367
14378
|
}
|
|
14368
14379
|
async function y({
|
|
14369
|
-
action:
|
|
14380
|
+
action: O,
|
|
14370
14381
|
values: b,
|
|
14371
|
-
forced_values:
|
|
14382
|
+
forced_values: T,
|
|
14372
14383
|
initialViewType: _,
|
|
14373
14384
|
res_id: R,
|
|
14374
14385
|
domain: x = []
|
|
14375
14386
|
}) {
|
|
14376
14387
|
const F = await k.getHandler().getActionData({
|
|
14377
|
-
action:
|
|
14388
|
+
action: O,
|
|
14378
14389
|
context: l
|
|
14379
14390
|
});
|
|
14380
14391
|
if (F.type === "ir.actions.wizard") {
|
|
14381
14392
|
dt("Action type not supported");
|
|
14382
14393
|
return;
|
|
14383
14394
|
}
|
|
14384
|
-
const [D, V] =
|
|
14385
|
-
context:
|
|
14395
|
+
const [D, V] = O.split(","), N = parseInt(V), L = F.context, B = Nt({
|
|
14396
|
+
context: L,
|
|
14386
14397
|
values: s
|
|
14387
14398
|
}), G = F.domain, $ = await (async () => {
|
|
14388
14399
|
try {
|
|
@@ -14403,25 +14414,25 @@ function Hy(e, t) {
|
|
|
14403
14414
|
limit: me
|
|
14404
14415
|
} = F, H = Ce === "tree", j = [];
|
|
14405
14416
|
for (const ie of Z) {
|
|
14406
|
-
const [te,
|
|
14417
|
+
const [te, M] = ie;
|
|
14407
14418
|
if (te)
|
|
14408
14419
|
j.push(ie);
|
|
14409
|
-
else if (
|
|
14420
|
+
else if (M === "dashboard")
|
|
14410
14421
|
j.push([void 0, "dashboard"]);
|
|
14411
14422
|
else {
|
|
14412
14423
|
const { view_id: ne } = await k.getHandler().getView({
|
|
14413
14424
|
model: K,
|
|
14414
|
-
type:
|
|
14425
|
+
type: M,
|
|
14415
14426
|
id: te,
|
|
14416
14427
|
context: { ...l, ...B }
|
|
14417
14428
|
});
|
|
14418
|
-
j.push([ne,
|
|
14429
|
+
j.push([ne, M]);
|
|
14419
14430
|
}
|
|
14420
14431
|
}
|
|
14421
14432
|
let q;
|
|
14422
14433
|
if (_) {
|
|
14423
14434
|
const [ie, te] = j.find(
|
|
14424
|
-
([
|
|
14435
|
+
([M, ne]) => ne === _
|
|
14425
14436
|
);
|
|
14426
14437
|
q = { id: ie, type: te };
|
|
14427
14438
|
} else {
|
|
@@ -14439,38 +14450,38 @@ function Hy(e, t) {
|
|
|
14439
14450
|
action_type: D,
|
|
14440
14451
|
action_id: N,
|
|
14441
14452
|
values: b,
|
|
14442
|
-
forced_values:
|
|
14453
|
+
forced_values: T,
|
|
14443
14454
|
res_id: R,
|
|
14444
14455
|
treeExpandable: H,
|
|
14445
14456
|
limit: me,
|
|
14446
14457
|
actionRawData: {
|
|
14447
|
-
context:
|
|
14458
|
+
context: L,
|
|
14448
14459
|
domain: G
|
|
14449
14460
|
}
|
|
14450
14461
|
});
|
|
14451
14462
|
}
|
|
14452
14463
|
function v({
|
|
14453
|
-
title:
|
|
14464
|
+
title: O,
|
|
14454
14465
|
content: b,
|
|
14455
|
-
key:
|
|
14466
|
+
key: T,
|
|
14456
14467
|
action: _
|
|
14457
14468
|
}) {
|
|
14458
14469
|
let R = [...c];
|
|
14459
14470
|
c.length === 1 && c[0].key === "welcome" && (R = [...c.filter((x) => x.key !== "welcome")]), u([
|
|
14460
14471
|
...R,
|
|
14461
14472
|
{
|
|
14462
|
-
title:
|
|
14463
|
-
key:
|
|
14473
|
+
title: O,
|
|
14474
|
+
key: T,
|
|
14464
14475
|
closable: !0,
|
|
14465
14476
|
content: b,
|
|
14466
14477
|
action: _
|
|
14467
14478
|
}
|
|
14468
|
-
]), o(
|
|
14479
|
+
]), o(T);
|
|
14469
14480
|
}
|
|
14470
14481
|
async function w({
|
|
14471
|
-
relateData:
|
|
14482
|
+
relateData: O,
|
|
14472
14483
|
fields: b,
|
|
14473
|
-
values:
|
|
14484
|
+
values: T,
|
|
14474
14485
|
action_id: _,
|
|
14475
14486
|
action_type: R
|
|
14476
14487
|
}) {
|
|
@@ -14480,16 +14491,16 @@ function Hy(e, t) {
|
|
|
14480
14491
|
domain: D,
|
|
14481
14492
|
views: V,
|
|
14482
14493
|
target: N,
|
|
14483
|
-
string:
|
|
14494
|
+
string: L,
|
|
14484
14495
|
limit: B
|
|
14485
|
-
} =
|
|
14496
|
+
} = O, [G, $] = V[0], K = { id: G, type: $ }, Z = F, J = Nt({
|
|
14486
14497
|
context: Z,
|
|
14487
|
-
values: { ...
|
|
14498
|
+
values: { ...T, ...s }
|
|
14488
14499
|
}), Q = D, Ce = D ? await k.getHandler().evalDomain({
|
|
14489
14500
|
domain: D,
|
|
14490
14501
|
values: Qt({
|
|
14491
14502
|
fields: b,
|
|
14492
|
-
values: { ...
|
|
14503
|
+
values: { ...T, ...s }
|
|
14493
14504
|
}),
|
|
14494
14505
|
fields: b,
|
|
14495
14506
|
context: { ...l, ...J }
|
|
@@ -14500,7 +14511,7 @@ function Hy(e, t) {
|
|
|
14500
14511
|
views: V,
|
|
14501
14512
|
context: { ...l, ...J },
|
|
14502
14513
|
domain: Ce,
|
|
14503
|
-
title:
|
|
14514
|
+
title: L,
|
|
14504
14515
|
initialView: K,
|
|
14505
14516
|
action_id: _,
|
|
14506
14517
|
action_type: R,
|
|
@@ -14509,24 +14520,24 @@ function Hy(e, t) {
|
|
|
14509
14520
|
context: Z,
|
|
14510
14521
|
domain: Q,
|
|
14511
14522
|
fields: b,
|
|
14512
|
-
values:
|
|
14523
|
+
values: T
|
|
14513
14524
|
}
|
|
14514
14525
|
});
|
|
14515
14526
|
}
|
|
14516
|
-
async function I(
|
|
14527
|
+
async function I(O) {
|
|
14517
14528
|
const {
|
|
14518
14529
|
action_id: b,
|
|
14519
|
-
action_type:
|
|
14530
|
+
action_type: T,
|
|
14520
14531
|
res_id: _,
|
|
14521
14532
|
view_id: R,
|
|
14522
14533
|
overrideUnsettedLimit: x = !1,
|
|
14523
14534
|
values: F = {},
|
|
14524
14535
|
domain: D
|
|
14525
|
-
} =
|
|
14536
|
+
} = O, V = `${T},${b}`, N = await k.getHandler().getActionData({
|
|
14526
14537
|
action: V,
|
|
14527
14538
|
context: l
|
|
14528
|
-
}),
|
|
14529
|
-
context:
|
|
14539
|
+
}), L = N.context, B = Nt({
|
|
14540
|
+
context: L,
|
|
14530
14541
|
values: { ...s, ...F },
|
|
14531
14542
|
fields: {}
|
|
14532
14543
|
});
|
|
@@ -14545,10 +14556,10 @@ function Hy(e, t) {
|
|
|
14545
14556
|
view_type: Ce,
|
|
14546
14557
|
limit: me
|
|
14547
14558
|
} = N, H = Ce === "tree", j = [];
|
|
14548
|
-
for (const
|
|
14549
|
-
const [ne, oe] =
|
|
14559
|
+
for (const M of Z) {
|
|
14560
|
+
const [ne, oe] = M;
|
|
14550
14561
|
if (ne)
|
|
14551
|
-
j.push(
|
|
14562
|
+
j.push(M);
|
|
14552
14563
|
else if (oe === "dashboard")
|
|
14553
14564
|
j.push([void 0, "dashboard"]);
|
|
14554
14565
|
else {
|
|
@@ -14563,10 +14574,10 @@ function Hy(e, t) {
|
|
|
14563
14574
|
}
|
|
14564
14575
|
let q, ie;
|
|
14565
14576
|
if (R == null) {
|
|
14566
|
-
const
|
|
14567
|
-
q = void 0, ie =
|
|
14577
|
+
const M = j.find((ne) => ne[0] === void 0);
|
|
14578
|
+
q = void 0, ie = M[1];
|
|
14568
14579
|
} else
|
|
14569
|
-
[q, ie] = j.find((
|
|
14580
|
+
[q, ie] = j.find((M) => M[0] === void 0 ? !1 : M[0] === R);
|
|
14570
14581
|
const te = { id: q, type: ie };
|
|
14571
14582
|
S({
|
|
14572
14583
|
domain: G,
|
|
@@ -14577,39 +14588,39 @@ function Hy(e, t) {
|
|
|
14577
14588
|
target: Q,
|
|
14578
14589
|
initialView: te,
|
|
14579
14590
|
action_id: b,
|
|
14580
|
-
action_type:
|
|
14591
|
+
action_type: T,
|
|
14581
14592
|
res_id: _,
|
|
14582
14593
|
treeExpandable: H,
|
|
14583
14594
|
limit: x && (me === 0 || me === !1) ? jt : me,
|
|
14584
14595
|
actionRawData: {
|
|
14585
|
-
context:
|
|
14596
|
+
context: L,
|
|
14586
14597
|
domain: $,
|
|
14587
14598
|
values: F
|
|
14588
14599
|
}
|
|
14589
14600
|
});
|
|
14590
14601
|
}
|
|
14591
|
-
async function
|
|
14592
|
-
model:
|
|
14602
|
+
async function A({
|
|
14603
|
+
model: O,
|
|
14593
14604
|
values: b,
|
|
14594
|
-
forced_values:
|
|
14605
|
+
forced_values: T,
|
|
14595
14606
|
initialViewType: _,
|
|
14596
14607
|
res_id: R,
|
|
14597
14608
|
domain: x
|
|
14598
14609
|
}) {
|
|
14599
|
-
const F = await k.getHandler().getActionStringForModel(
|
|
14610
|
+
const F = await k.getHandler().getActionStringForModel(O);
|
|
14600
14611
|
await y({
|
|
14601
14612
|
action: F,
|
|
14602
14613
|
values: b,
|
|
14603
|
-
forced_values:
|
|
14614
|
+
forced_values: T,
|
|
14604
14615
|
initialViewType: _,
|
|
14605
14616
|
res_id: R,
|
|
14606
14617
|
domain: x
|
|
14607
14618
|
});
|
|
14608
14619
|
}
|
|
14609
|
-
async function S(
|
|
14620
|
+
async function S(O) {
|
|
14610
14621
|
const {
|
|
14611
14622
|
domain: b,
|
|
14612
|
-
context:
|
|
14623
|
+
context: T,
|
|
14613
14624
|
model: _,
|
|
14614
14625
|
views: R,
|
|
14615
14626
|
title: x,
|
|
@@ -14617,29 +14628,29 @@ function Hy(e, t) {
|
|
|
14617
14628
|
initialView: D,
|
|
14618
14629
|
action_id: V,
|
|
14619
14630
|
action_type: N,
|
|
14620
|
-
res_id:
|
|
14631
|
+
res_id: L,
|
|
14621
14632
|
values: B,
|
|
14622
14633
|
forced_values: G,
|
|
14623
14634
|
treeExpandable: $ = !1,
|
|
14624
14635
|
limit: K,
|
|
14625
14636
|
searchParams: Z
|
|
14626
|
-
} =
|
|
14637
|
+
} = O, J = Co();
|
|
14627
14638
|
if (F !== "current" && F !== void 0) {
|
|
14628
14639
|
const Q = await k.getHandler().getView({
|
|
14629
14640
|
model: _,
|
|
14630
14641
|
type: "form",
|
|
14631
14642
|
id: D.type === "form" ? D.id : void 0,
|
|
14632
|
-
context: { ...l, ...
|
|
14643
|
+
context: { ...l, ...T }
|
|
14633
14644
|
});
|
|
14634
14645
|
d.current.openActionModal({
|
|
14635
14646
|
domain: b,
|
|
14636
14647
|
model: _,
|
|
14637
14648
|
formView: Q,
|
|
14638
|
-
context: { ...l, ...
|
|
14649
|
+
context: { ...l, ...T },
|
|
14639
14650
|
actionData: {
|
|
14640
14651
|
action_id: V,
|
|
14641
14652
|
action_type: N,
|
|
14642
|
-
res_id:
|
|
14653
|
+
res_id: L,
|
|
14643
14654
|
view_id: Q.view_id
|
|
14644
14655
|
}
|
|
14645
14656
|
});
|
|
@@ -14656,11 +14667,11 @@ function Hy(e, t) {
|
|
|
14656
14667
|
title: x,
|
|
14657
14668
|
views: R,
|
|
14658
14669
|
model: _,
|
|
14659
|
-
context: { ...
|
|
14670
|
+
context: { ...T, ...l },
|
|
14660
14671
|
domain: b,
|
|
14661
14672
|
setCanWeClose: h,
|
|
14662
14673
|
initialView: Q,
|
|
14663
|
-
res_id:
|
|
14674
|
+
res_id: L,
|
|
14664
14675
|
formDefaultValues: B,
|
|
14665
14676
|
formForcedValues: G,
|
|
14666
14677
|
treeExpandable: $,
|
|
@@ -14669,7 +14680,7 @@ function Hy(e, t) {
|
|
|
14669
14680
|
}
|
|
14670
14681
|
),
|
|
14671
14682
|
key: J,
|
|
14672
|
-
action:
|
|
14683
|
+
action: O
|
|
14673
14684
|
});
|
|
14674
14685
|
}
|
|
14675
14686
|
}
|
|
@@ -14679,15 +14690,15 @@ function Hy(e, t) {
|
|
|
14679
14690
|
openShortcut: I,
|
|
14680
14691
|
openAction: S,
|
|
14681
14692
|
openRelate: w,
|
|
14682
|
-
openDefaultActionForModel:
|
|
14693
|
+
openDefaultActionForModel: A,
|
|
14683
14694
|
tabs: c,
|
|
14684
14695
|
activeKey: r,
|
|
14685
|
-
onRemoveTab: async (
|
|
14686
|
-
const b = f.current.get(
|
|
14687
|
-
(await (b == null ? void 0 : b()) || r === "welcome") && m(
|
|
14696
|
+
onRemoveTab: async (O) => {
|
|
14697
|
+
const b = f.current.get(O);
|
|
14698
|
+
(await (b == null ? void 0 : b()) || r === "welcome") && m(O);
|
|
14688
14699
|
},
|
|
14689
|
-
onChangeTab: (
|
|
14690
|
-
o(
|
|
14700
|
+
onChangeTab: (O) => {
|
|
14701
|
+
o(O);
|
|
14691
14702
|
},
|
|
14692
14703
|
children: /* @__PURE__ */ i(
|
|
14693
14704
|
Ju,
|
|
@@ -14819,7 +14830,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14819
14830
|
currentView: v,
|
|
14820
14831
|
currentId: w,
|
|
14821
14832
|
openDefaultActionForModel: I
|
|
14822
|
-
} = h || {},
|
|
14833
|
+
} = h || {}, A = X(() => {
|
|
14823
14834
|
if (!v || !v.view_id || !v.extra)
|
|
14824
14835
|
return;
|
|
14825
14836
|
const { action_id: x, action_type: F } = v.extra || {};
|
|
@@ -14836,23 +14847,23 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14836
14847
|
res_id: V
|
|
14837
14848
|
};
|
|
14838
14849
|
}, [w, v]), S = X(() => {
|
|
14839
|
-
if (
|
|
14840
|
-
return JSON.stringify(
|
|
14841
|
-
}, [
|
|
14850
|
+
if (A)
|
|
14851
|
+
return JSON.stringify(A);
|
|
14852
|
+
}, [A]);
|
|
14842
14853
|
se(() => {
|
|
14843
14854
|
b();
|
|
14844
14855
|
}, [S]);
|
|
14845
|
-
function
|
|
14856
|
+
function O(x) {
|
|
14846
14857
|
const F = x;
|
|
14847
14858
|
(F == null ? void 0 : F.action_type) !== "ir.actions.wizard" && p(F);
|
|
14848
14859
|
}
|
|
14849
14860
|
const b = E(async () => {
|
|
14850
|
-
if (!
|
|
14861
|
+
if (!A)
|
|
14851
14862
|
return;
|
|
14852
|
-
const x = await n(
|
|
14863
|
+
const x = await n(A);
|
|
14853
14864
|
x !== !1 && u(x), l(x !== !1);
|
|
14854
|
-
}, [
|
|
14855
|
-
async function
|
|
14865
|
+
}, [A, n]);
|
|
14866
|
+
async function T() {
|
|
14856
14867
|
var x;
|
|
14857
14868
|
(x = m == null ? void 0 : m.current) == null || x.close(), I == null || I({ model: "ir.ui.view_sc" });
|
|
14858
14869
|
}
|
|
@@ -14879,7 +14890,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14879
14890
|
else {
|
|
14880
14891
|
if (!v)
|
|
14881
14892
|
return;
|
|
14882
|
-
const x = g.find((
|
|
14893
|
+
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
14894
|
let N = !1;
|
|
14884
14895
|
if (!F || !D) {
|
|
14885
14896
|
l(!1);
|
|
@@ -14910,7 +14921,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14910
14921
|
ref: m,
|
|
14911
14922
|
isFavourite: s,
|
|
14912
14923
|
onToggleFavourite: R,
|
|
14913
|
-
onItemClick:
|
|
14924
|
+
onItemClick: O,
|
|
14914
14925
|
placement: "bottomRight",
|
|
14915
14926
|
header: /* @__PURE__ */ P("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
14916
14927
|
/* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
|
|
@@ -14918,7 +14929,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14918
14929
|
ps,
|
|
14919
14930
|
{
|
|
14920
14931
|
style: { color: d.colorPrimary, cursor: "pointer" },
|
|
14921
|
-
onClick:
|
|
14932
|
+
onClick: T
|
|
14922
14933
|
}
|
|
14923
14934
|
) }) })
|
|
14924
14935
|
] }),
|