@gisce/react-ooui 2.59.1 → 2.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -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 T() {
|
|
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: T,
|
|
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 T = ft(d);
|
|
550
|
+
return T && /* @__PURE__ */ i(T, {});
|
|
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 A
|
|
638
|
-
} catch (
|
|
639
|
-
dt(
|
|
636
|
+
const A = await I();
|
|
637
|
+
await T(A);
|
|
638
|
+
} catch (A) {
|
|
639
|
+
dt(A);
|
|
640
640
|
}
|
|
641
641
|
m(!1);
|
|
642
642
|
}
|
|
@@ -651,9 +651,9 @@ const Cs = (e) => {
|
|
|
651
651
|
}));
|
|
652
652
|
return f == null || f(_), _;
|
|
653
653
|
}
|
|
654
|
-
async function A
|
|
654
|
+
async function T(A) {
|
|
655
655
|
const _ = {};
|
|
656
|
-
for (const R of
|
|
656
|
+
for (const R of A) {
|
|
657
657
|
const x = (await k.getHandler().readObjects({
|
|
658
658
|
model: r,
|
|
659
659
|
ids: [o],
|
|
@@ -665,17 +665,17 @@ const Cs = (e) => {
|
|
|
665
665
|
v.current = _, y(_);
|
|
666
666
|
}
|
|
667
667
|
function S() {
|
|
668
|
-
return u.map((
|
|
669
|
-
/* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children:
|
|
668
|
+
return u.map((A, _) => /* @__PURE__ */ P(je, { style: { paddingBottom: 20 }, children: [
|
|
669
|
+
/* @__PURE__ */ i(Ie, { flex: "8rem", style: { paddingRight: 10 }, children: A.name }),
|
|
670
670
|
/* @__PURE__ */ i(Ie, { flex: "auto", children: /* @__PURE__ */ i(
|
|
671
671
|
fc,
|
|
672
672
|
{
|
|
673
673
|
rows: 4,
|
|
674
|
-
value: g[
|
|
674
|
+
value: g[A.code] || "",
|
|
675
675
|
onChange: (R) => {
|
|
676
676
|
y({
|
|
677
677
|
...g,
|
|
678
|
-
[
|
|
678
|
+
[A.code]: R.target.value
|
|
679
679
|
});
|
|
680
680
|
},
|
|
681
681
|
disabled: h
|
|
@@ -686,18 +686,18 @@ const Cs = (e) => {
|
|
|
686
686
|
async function O() {
|
|
687
687
|
p(!0);
|
|
688
688
|
try {
|
|
689
|
-
for (const
|
|
690
|
-
g[
|
|
689
|
+
for (const A of Object.keys(g))
|
|
690
|
+
g[A] !== v.current[A] && await k.getHandler().update({
|
|
691
691
|
model: r,
|
|
692
692
|
id: o,
|
|
693
|
-
values: { [a]: g[
|
|
693
|
+
values: { [a]: g[A] },
|
|
694
694
|
context: {
|
|
695
|
-
lang:
|
|
695
|
+
lang: A
|
|
696
696
|
},
|
|
697
697
|
fields: {}
|
|
698
698
|
});
|
|
699
|
-
} catch (
|
|
700
|
-
dt(
|
|
699
|
+
} catch (A) {
|
|
700
|
+
dt(A);
|
|
701
701
|
}
|
|
702
702
|
p(!1), s();
|
|
703
703
|
}
|
|
@@ -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]), T = 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: T,
|
|
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:
|
|
1539
|
+
colorField: T
|
|
1540
1540
|
} = r, S = a.filter((F) => F.values), O = ee(Ue), { getContext: b } = O || {};
|
|
1541
1541
|
Ft(() => {
|
|
1542
1542
|
_();
|
|
1543
1543
|
}, [a]);
|
|
1544
|
-
const
|
|
1544
|
+
const A = (F) => {
|
|
1545
1545
|
o == null || o({
|
|
1546
1546
|
items: F
|
|
1547
1547
|
});
|
|
@@ -1562,7 +1562,7 @@ const Qt = ({
|
|
|
1562
1562
|
context: { ...b == null ? void 0 : b(), ...g },
|
|
1563
1563
|
currentView: "form"
|
|
1564
1564
|
});
|
|
1565
|
-
|
|
1565
|
+
A(F);
|
|
1566
1566
|
} catch (F) {
|
|
1567
1567
|
u(F);
|
|
1568
1568
|
} finally {
|
|
@@ -1592,7 +1592,7 @@ const Qt = ({
|
|
|
1592
1592
|
}
|
|
1593
1593
|
)
|
|
1594
1594
|
};
|
|
1595
|
-
return (L = F.values) != null && L[I] && (D.dot = R(F.values[I])), (B = F.values) != null && B[
|
|
1595
|
+
return (L = F.values) != null && L[I] && (D.dot = R(F.values[I])), (B = F.values) != null && B[T] && (D.color = !ws(F.values[T]) && !bs(F.values[T]) && !F.values[T].toString().startsWith("#") ? $n(F.values[T]) : F.values[T]), D;
|
|
1596
1596
|
});
|
|
1597
1597
|
return /* @__PURE__ */ P(le, { children: [
|
|
1598
1598
|
/* @__PURE__ */ i(Ji, { style: { padding: "1rem" }, items: x }),
|
|
@@ -2029,10 +2029,10 @@ async function $s({
|
|
|
2029
2029
|
values: n,
|
|
2030
2030
|
context: l
|
|
2031
2031
|
}) : [], y = [];
|
|
2032
|
-
for (const
|
|
2033
|
-
const [S, O] =
|
|
2032
|
+
for (const T of u) {
|
|
2033
|
+
const [S, O] = T;
|
|
2034
2034
|
if (S)
|
|
2035
|
-
y.push(
|
|
2035
|
+
y.push(T);
|
|
2036
2036
|
else {
|
|
2037
2037
|
const { view_id: b } = await k.getHandler().getView({
|
|
2038
2038
|
model: c,
|
|
@@ -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((T) => {
|
|
2078
|
+
const [, S] = T;
|
|
2079
2079
|
return S === "tree";
|
|
2080
2080
|
});
|
|
2081
2081
|
if (I) {
|
|
2082
|
-
const [
|
|
2082
|
+
const [T, S] = I, {
|
|
2083
2083
|
actionId: O,
|
|
2084
2084
|
actionType: b,
|
|
2085
|
-
title:
|
|
2085
|
+
title: A,
|
|
2086
2086
|
model: _
|
|
2087
2087
|
} = v;
|
|
2088
2088
|
c({
|
|
2089
2089
|
domain: v.domain,
|
|
2090
2090
|
action_id: O,
|
|
2091
2091
|
action_type: b,
|
|
2092
|
-
name:
|
|
2092
|
+
name: A,
|
|
2093
2093
|
res_id: !1,
|
|
2094
2094
|
res_model: _,
|
|
2095
|
-
view_id:
|
|
2095
|
+
view_id: T,
|
|
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, T] = C(), [S, O] = C(), [b, A] = C(), [_, R] = C(), [x] = Je(
|
|
2345
2345
|
k.getHandler().searchAllIds
|
|
2346
2346
|
), [F] = Je(
|
|
2347
2347
|
k.getHandler().readObjects
|
|
@@ -2420,7 +2420,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2420
2420
|
$ = await L({
|
|
2421
2421
|
domain: J,
|
|
2422
2422
|
isTotal: !0
|
|
2423
|
-
}),
|
|
2423
|
+
}), T($);
|
|
2424
2424
|
}
|
|
2425
2425
|
if ($ ? (K = Math.round(Z / $ * 100 * 100) / 100, w(K)) : w(0), o) {
|
|
2426
2426
|
const J = await N({
|
|
@@ -2437,9 +2437,9 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2437
2437
|
values: { value: Z, percent: K },
|
|
2438
2438
|
context: r
|
|
2439
2439
|
});
|
|
2440
|
-
|
|
2440
|
+
A(J);
|
|
2441
2441
|
} else
|
|
2442
|
-
|
|
2442
|
+
A(l);
|
|
2443
2443
|
R(void 0);
|
|
2444
2444
|
} catch (Z) {
|
|
2445
2445
|
R(JSON.stringify(Z));
|
|
@@ -2472,12 +2472,12 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2472
2472
|
k.getHandler().getFields
|
|
2473
2473
|
), [I] = Je(
|
|
2474
2474
|
k.getHandler().readObjects
|
|
2475
|
-
), [
|
|
2475
|
+
), [T] = Je(k.getHandler().search), S = E(async () => {
|
|
2476
2476
|
u(!0), d(void 0), v(n.type || "line");
|
|
2477
2477
|
const O = Jd({ ooui: n });
|
|
2478
|
-
let b,
|
|
2478
|
+
let b, A;
|
|
2479
2479
|
try {
|
|
2480
|
-
({ values: b, fields:
|
|
2480
|
+
({ values: b, fields: A } = await Zd({
|
|
2481
2481
|
model: t,
|
|
2482
2482
|
domain: r,
|
|
2483
2483
|
context: o,
|
|
@@ -2488,7 +2488,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2488
2488
|
methods: {
|
|
2489
2489
|
getFields: w,
|
|
2490
2490
|
readObjects: I,
|
|
2491
|
-
search:
|
|
2491
|
+
search: T
|
|
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 || !A)
|
|
2500
2500
|
return d("No values or fields returned"), u(!1), {
|
|
2501
2501
|
loading: c,
|
|
2502
2502
|
error: f,
|
|
@@ -2509,7 +2509,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2509
2509
|
const _ = zd({
|
|
2510
2510
|
ooui: n,
|
|
2511
2511
|
values: b,
|
|
2512
|
-
fields:
|
|
2512
|
+
fields: A,
|
|
2513
2513
|
options: {
|
|
2514
2514
|
uninformedString: s
|
|
2515
2515
|
}
|
|
@@ -2533,7 +2533,7 @@ const { getValueForOperator: si } = os, qd = (e) => {
|
|
|
2533
2533
|
n,
|
|
2534
2534
|
m,
|
|
2535
2535
|
I,
|
|
2536
|
-
|
|
2536
|
+
T,
|
|
2537
2537
|
y,
|
|
2538
2538
|
s
|
|
2539
2539
|
]);
|
|
@@ -3004,11 +3004,11 @@ const du = ({
|
|
|
3004
3004
|
setSorter: v,
|
|
3005
3005
|
totalItems: w,
|
|
3006
3006
|
setTotalItems: I,
|
|
3007
|
-
setSelectedRowItems:
|
|
3007
|
+
setSelectedRowItems: T,
|
|
3008
3008
|
selectedRowItems: S,
|
|
3009
3009
|
searchTreeNameSearch: O,
|
|
3010
3010
|
setSearchTreeNameSearch: b,
|
|
3011
|
-
goToResourceId:
|
|
3011
|
+
goToResourceId: A,
|
|
3012
3012
|
limit: _,
|
|
3013
3013
|
isActive: R,
|
|
3014
3014
|
initialSearchParams: x
|
|
@@ -3075,7 +3075,7 @@ const du = ({
|
|
|
3075
3075
|
attachments: J,
|
|
3076
3076
|
setAttachments: Q,
|
|
3077
3077
|
selectedRowItems: S,
|
|
3078
|
-
setSelectedRowItems:
|
|
3078
|
+
setSelectedRowItems: T,
|
|
3079
3079
|
duplicatingItem: Ce,
|
|
3080
3080
|
setDuplicatingItem: me,
|
|
3081
3081
|
setSearchParams: j,
|
|
@@ -3092,7 +3092,7 @@ const du = ({
|
|
|
3092
3092
|
graphIsLoading: te,
|
|
3093
3093
|
previousView: ne,
|
|
3094
3094
|
setPreviousView: oe,
|
|
3095
|
-
goToResourceId:
|
|
3095
|
+
goToResourceId: A,
|
|
3096
3096
|
searchValues: we,
|
|
3097
3097
|
setSearchValues: ge,
|
|
3098
3098
|
limit: z,
|
|
@@ -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 || {}, T = 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
|
+
T,
|
|
3522
3522
|
{
|
|
3523
3523
|
view_id: w.id,
|
|
3524
3524
|
model: p,
|
|
@@ -3594,7 +3594,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3594
3594
|
});
|
|
3595
3595
|
O = [...O, ..._];
|
|
3596
3596
|
}
|
|
3597
|
-
const
|
|
3597
|
+
const A = (await k.getHandler().search({
|
|
3598
3598
|
model: m,
|
|
3599
3599
|
params: O,
|
|
3600
3600
|
fieldsToRetrieve: [g],
|
|
@@ -3604,23 +3604,23 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3604
3604
|
let x = R;
|
|
3605
3605
|
return Array.isArray(R) && (x = R[1]), { label: x, value: _.id };
|
|
3606
3606
|
});
|
|
3607
|
-
l(
|
|
3607
|
+
l(A);
|
|
3608
3608
|
} catch (b) {
|
|
3609
3609
|
u(b);
|
|
3610
3610
|
} finally {
|
|
3611
3611
|
d(!1);
|
|
3612
3612
|
}
|
|
3613
3613
|
}
|
|
3614
|
-
const
|
|
3614
|
+
const T = (O) => {
|
|
3615
3615
|
const b = o.map((_) => O.includes(_.id) ? _.operation === "pendingRemove" ? {
|
|
3616
3616
|
..._,
|
|
3617
3617
|
operation: "pendingLink"
|
|
3618
|
-
} : _ : { id: _.id, operation: "pendingRemove" }),
|
|
3619
|
-
O.filter((_) => !
|
|
3618
|
+
} : _ : { id: _.id, operation: "pendingRemove" }), A = b.map((_) => _.id);
|
|
3619
|
+
O.filter((_) => !A.includes(_)).forEach((_) => {
|
|
3620
3620
|
b.push({ id: _, operation: "pendingLink" });
|
|
3621
3621
|
}), w(b);
|
|
3622
3622
|
}, S = (O) => {
|
|
3623
|
-
const { label: b, closable:
|
|
3623
|
+
const { label: b, closable: A, onClose: _ } = O, R = (D) => {
|
|
3624
3624
|
D.preventDefault(), D.stopPropagation();
|
|
3625
3625
|
}, x = $n(b), F = Ps(x);
|
|
3626
3626
|
return /* @__PURE__ */ i(
|
|
@@ -3628,7 +3628,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3628
3628
|
{
|
|
3629
3629
|
color: x,
|
|
3630
3630
|
onMouseDown: R,
|
|
3631
|
-
closable:
|
|
3631
|
+
closable: A,
|
|
3632
3632
|
onClose: _,
|
|
3633
3633
|
closeIcon: /* @__PURE__ */ i("span", { style: { color: F.text }, children: "X" }),
|
|
3634
3634
|
children: b
|
|
@@ -3644,7 +3644,7 @@ 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: T,
|
|
3648
3648
|
loading: f,
|
|
3649
3649
|
filterOption: (O, b) => b.label.toLowerCase().includes(O.toString())
|
|
3650
3650
|
}
|
|
@@ -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: T,
|
|
3881
3881
|
processAction: w
|
|
3882
3882
|
}));
|
|
3883
3883
|
const [m, h] = C(!1), [p, g] = C(
|
|
@@ -3886,13 +3886,13 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3886
3886
|
}
|
|
3887
3887
|
);
|
|
3888
3888
|
async function y(b) {
|
|
3889
|
-
const { reportData:
|
|
3889
|
+
const { reportData: A, fields: _, values: R, context: x = {} } = b, {
|
|
3890
3890
|
context: F,
|
|
3891
3891
|
model: D,
|
|
3892
3892
|
datas: V = {},
|
|
3893
3893
|
report_name: N,
|
|
3894
3894
|
type: L
|
|
3895
|
-
} =
|
|
3895
|
+
} = A;
|
|
3896
3896
|
if (L !== "ir.actions.report.xml") {
|
|
3897
3897
|
dt(`${L} action not supported`);
|
|
3898
3898
|
return;
|
|
@@ -3918,14 +3918,14 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3918
3918
|
}
|
|
3919
3919
|
}
|
|
3920
3920
|
async function v(b) {
|
|
3921
|
-
let
|
|
3921
|
+
let A;
|
|
3922
3922
|
try {
|
|
3923
|
-
if (
|
|
3923
|
+
if (A = await k.getHandler().getReport({
|
|
3924
3924
|
id: b
|
|
3925
|
-
}),
|
|
3925
|
+
}), A.state && a.current === !0) {
|
|
3926
3926
|
a.current = !1, clearInterval(o.current), l(!1);
|
|
3927
|
-
const _ = await un(
|
|
3928
|
-
wr(
|
|
3927
|
+
const _ = await un(A.result);
|
|
3928
|
+
wr(A.result, _.mime);
|
|
3929
3929
|
}
|
|
3930
3930
|
} catch (_) {
|
|
3931
3931
|
a.current = !1, clearInterval(o.current), l(!1), dt(_.exception || _);
|
|
@@ -3933,7 +3933,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3933
3933
|
}
|
|
3934
3934
|
async function w({
|
|
3935
3935
|
actionData: b,
|
|
3936
|
-
fields:
|
|
3936
|
+
fields: A,
|
|
3937
3937
|
values: _,
|
|
3938
3938
|
context: R,
|
|
3939
3939
|
onRefreshParentValues: x
|
|
@@ -3942,12 +3942,12 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3942
3942
|
if (x && f.current.push(x), F === "ir.actions.report.xml")
|
|
3943
3943
|
return await y({
|
|
3944
3944
|
reportData: b,
|
|
3945
|
-
fields:
|
|
3945
|
+
fields: A,
|
|
3946
3946
|
values: _,
|
|
3947
3947
|
context: R
|
|
3948
3948
|
});
|
|
3949
3949
|
if (F === "ir.actions.act_window")
|
|
3950
|
-
return await I({ actionData: b, fields:
|
|
3950
|
+
return await I({ actionData: b, fields: A, values: _, context: R });
|
|
3951
3951
|
if (F === "ir.actions.act_url")
|
|
3952
3952
|
window.open(
|
|
3953
3953
|
kd(b.url, { ..._, context: R }),
|
|
@@ -3958,7 +3958,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3958
3958
|
}
|
|
3959
3959
|
async function I({
|
|
3960
3960
|
actionData: b,
|
|
3961
|
-
fields:
|
|
3961
|
+
fields: A = {},
|
|
3962
3962
|
values: _ = {},
|
|
3963
3963
|
context: R = {}
|
|
3964
3964
|
}) {
|
|
@@ -3971,7 +3971,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3971
3971
|
}))[0]);
|
|
3972
3972
|
const F = x.context, D = typeof (x == null ? void 0 : x.context) == "string" ? Nt({
|
|
3973
3973
|
context: x.context,
|
|
3974
|
-
fields:
|
|
3974
|
+
fields: A,
|
|
3975
3975
|
values: { ..._, ...r }
|
|
3976
3976
|
}) : (x == null ? void 0 : x.context) || {}, V = {
|
|
3977
3977
|
...R,
|
|
@@ -3982,10 +3982,10 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
3982
3982
|
if (x.domain && (N = await k.getHandler().evalDomain({
|
|
3983
3983
|
domain: x.domain,
|
|
3984
3984
|
values: Qt({
|
|
3985
|
-
fields:
|
|
3985
|
+
fields: A,
|
|
3986
3986
|
values: { ..._, ...r }
|
|
3987
3987
|
}),
|
|
3988
|
-
fields:
|
|
3988
|
+
fields: A,
|
|
3989
3989
|
context: V
|
|
3990
3990
|
})), x.target === "new") {
|
|
3991
3991
|
const G = await k.getHandler().getView({
|
|
@@ -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 T({
|
|
3998
3998
|
domain: N,
|
|
3999
3999
|
model: x.res_model,
|
|
4000
4000
|
formView: G,
|
|
@@ -4021,24 +4021,24 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
4021
4021
|
actionRawData: {
|
|
4022
4022
|
context: F,
|
|
4023
4023
|
domain: L,
|
|
4024
|
-
fields:
|
|
4024
|
+
fields: A,
|
|
4025
4025
|
values: _
|
|
4026
4026
|
}
|
|
4027
4027
|
}), { closeParent: !0 };
|
|
4028
4028
|
}
|
|
4029
4029
|
}
|
|
4030
|
-
function
|
|
4030
|
+
function T({
|
|
4031
4031
|
domain: b,
|
|
4032
|
-
model:
|
|
4032
|
+
model: A,
|
|
4033
4033
|
formView: _,
|
|
4034
4034
|
context: R,
|
|
4035
4035
|
actionData: x
|
|
4036
4036
|
}) {
|
|
4037
|
-
m ? S({ domain: b, model:
|
|
4037
|
+
m ? S({ domain: b, model: A, formView: _, context: R, actionData: x }) : (g({ domain: b, model: A, context: R, formView: _, actionData: x }), h(!0));
|
|
4038
4038
|
}
|
|
4039
4039
|
async function S({
|
|
4040
4040
|
domain: b,
|
|
4041
|
-
model:
|
|
4041
|
+
model: A,
|
|
4042
4042
|
formView: _,
|
|
4043
4043
|
context: R,
|
|
4044
4044
|
actionData: x
|
|
@@ -4049,7 +4049,7 @@ const Eu = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Gs,
|
|
|
4049
4049
|
context: {},
|
|
4050
4050
|
formView: void 0,
|
|
4051
4051
|
actionData: void 0
|
|
4052
|
-
}), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model:
|
|
4052
|
+
}), h(!1), await new Promise((F) => setTimeout(F, 300)), g({ domain: b, model: A, context: R, formView: _, actionData: x }), h(!0);
|
|
4053
4053
|
}
|
|
4054
4054
|
async function O() {
|
|
4055
4055
|
fi(f.current), f.current = [], h(!1), g({
|
|
@@ -4251,11 +4251,11 @@ function tf(e, t) {
|
|
|
4251
4251
|
parentContext: v = {},
|
|
4252
4252
|
actionDomain: w,
|
|
4253
4253
|
visible: I = !0,
|
|
4254
|
-
rootForm:
|
|
4254
|
+
rootForm: T = !1,
|
|
4255
4255
|
defaultValues: S,
|
|
4256
4256
|
forcedValues: O = {},
|
|
4257
4257
|
parentWidth: b,
|
|
4258
|
-
onMustRefreshParent:
|
|
4258
|
+
onMustRefreshParent: A
|
|
4259
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
|
), {
|
|
@@ -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
|
+
} = (T ? 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 && (A == null || A());
|
|
4299
4299
|
}, Me = () => {
|
|
4300
|
-
Be.current && (
|
|
4300
|
+
Be.current && (A == null || A()), Ee == null || Ee(!1), o == null || o();
|
|
4301
4301
|
}, Ze = (U) => {
|
|
4302
4302
|
Ee == null || Ee(!1), u == null || u(U);
|
|
4303
4303
|
}, be = E(() => r || H.current, [r]), [pt, Rt] = C(() => H.current);
|
|
@@ -4738,7 +4738,7 @@ function tf(e, t) {
|
|
|
4738
4738
|
Be.current = !0, await Dt({ forceRefresh: !0 });
|
|
4739
4739
|
}
|
|
4740
4740
|
})) || {};
|
|
4741
|
-
!
|
|
4741
|
+
!T && ae && (ye == null || ye(be(), Se(), Ae()));
|
|
4742
4742
|
}
|
|
4743
4743
|
function al() {
|
|
4744
4744
|
Zt({ elementHasLostFocus: !0 });
|
|
@@ -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: T } = l || {};
|
|
4893
4893
|
se(() => {
|
|
4894
4894
|
s && S();
|
|
4895
4895
|
}, [l, s]);
|
|
@@ -4897,7 +4897,7 @@ 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: T,
|
|
4901
4901
|
res_id: w || !1
|
|
4902
4902
|
});
|
|
4903
4903
|
p(_ !== !1), _ !== !1 && y(_);
|
|
@@ -4932,7 +4932,7 @@ const Sn = xt(tf), Cn = (e) => {
|
|
|
4932
4932
|
/* @__PURE__ */ i(Ie, { style: { paddingLeft: 10 }, children: d })
|
|
4933
4933
|
] });
|
|
4934
4934
|
}
|
|
4935
|
-
const
|
|
4935
|
+
const A = f * 0.95;
|
|
4936
4936
|
return /* @__PURE__ */ i(Ku, { setTitle: m, children: /* @__PURE__ */ i(
|
|
4937
4937
|
yt,
|
|
4938
4938
|
{
|
|
@@ -4951,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: A,
|
|
4955
4955
|
...c
|
|
4956
4956
|
},
|
|
4957
|
-
`${u}-${n}-${v}-${w}-${I}-${
|
|
4957
|
+
`${u}-${n}-${v}-${w}-${I}-${T}-${r}`
|
|
4958
4958
|
)
|
|
4959
4959
|
}
|
|
4960
4960
|
) });
|
|
@@ -5159,14 +5159,14 @@ const of = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Qs,
|
|
|
5159
5159
|
context: r
|
|
5160
5160
|
});
|
|
5161
5161
|
a(I);
|
|
5162
|
-
const
|
|
5162
|
+
const T = lf(I);
|
|
5163
5163
|
let S = {};
|
|
5164
|
-
if (
|
|
5164
|
+
if (T.length > 0 && (S = { ...(O = await p({
|
|
5165
5165
|
model: n,
|
|
5166
5166
|
ids: [t],
|
|
5167
|
-
fieldsToRetrieve:
|
|
5167
|
+
fieldsToRetrieve: T,
|
|
5168
5168
|
context: r
|
|
5169
|
-
})) == null ? void 0 : O[0] }), S = { ...nn(S,
|
|
5169
|
+
})) == null ? void 0 : O[0] }), S = { ...nn(S, T), active_id: t }, l(S), !(!I || !I.toolbar))
|
|
5170
5170
|
return {
|
|
5171
5171
|
actionItems: I.toolbar.action,
|
|
5172
5172
|
relateItems: I.toolbar.relate,
|
|
@@ -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: T }) {
|
|
5179
5179
|
const S = {
|
|
5180
5180
|
values: s,
|
|
5181
5181
|
fields: o.fields
|
|
5182
5182
|
};
|
|
5183
|
-
switch (
|
|
5183
|
+
switch (T) {
|
|
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)), T = [...a, ...I].join(";");
|
|
5355
|
+
(!n || T.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
|
+
(T) => T.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((T) => T.id === y);
|
|
5748
5748
|
return {
|
|
5749
5749
|
operation: w,
|
|
5750
5750
|
label: I[w],
|
|
@@ -6238,19 +6238,19 @@ function Im(e, t, n) {
|
|
|
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
6240
|
function h(O) {
|
|
6241
|
-
var b = r,
|
|
6242
|
-
return r = o = void 0, u = O, s = e.apply(
|
|
6241
|
+
var b = r, A = o;
|
|
6242
|
+
return r = o = void 0, u = O, s = e.apply(A, b), s;
|
|
6243
6243
|
}
|
|
6244
6244
|
function p(O) {
|
|
6245
6245
|
return u = O, l = setTimeout(v, t), f ? h(O) : s;
|
|
6246
6246
|
}
|
|
6247
6247
|
function g(O) {
|
|
6248
|
-
var b = O - c,
|
|
6249
|
-
return d ? xm(_, a -
|
|
6248
|
+
var b = O - c, A = O - u, _ = t - b;
|
|
6249
|
+
return d ? xm(_, a - A) : _;
|
|
6250
6250
|
}
|
|
6251
6251
|
function y(O) {
|
|
6252
|
-
var b = O - c,
|
|
6253
|
-
return c === void 0 || b >= t || b < 0 || d &&
|
|
6252
|
+
var b = O - c, A = O - u;
|
|
6253
|
+
return c === void 0 || b >= t || b < 0 || d && A >= a;
|
|
6254
6254
|
}
|
|
6255
6255
|
function v() {
|
|
6256
6256
|
var O = Er();
|
|
@@ -6264,7 +6264,7 @@ function Im(e, t, n) {
|
|
|
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 T() {
|
|
6268
6268
|
return l === void 0 ? s : w(Er());
|
|
6269
6269
|
}
|
|
6270
6270
|
function S() {
|
|
@@ -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 = T, S;
|
|
6281
6281
|
}
|
|
6282
6282
|
function zr(e) {
|
|
6283
6283
|
var t = typeof e;
|
|
@@ -6382,8 +6382,8 @@ 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 T = 0; T < h.length; ++T)
|
|
6386
|
+
w.push(String(T));
|
|
6387
6387
|
if (y && h.length > 0)
|
|
6388
6388
|
for (var S = 0; S < h.length; ++S)
|
|
6389
6389
|
w.push(String(S));
|
|
@@ -6391,8 +6391,8 @@ function Fm() {
|
|
|
6391
6391
|
for (var O in h)
|
|
6392
6392
|
!(I && O === "prototype") && t.call(h, O) && w.push(String(O));
|
|
6393
6393
|
if (a)
|
|
6394
|
-
for (var b = d(h),
|
|
6395
|
-
!(b && l[
|
|
6394
|
+
for (var b = d(h), A = 0; A < l.length; ++A)
|
|
6395
|
+
!(b && l[A] === "constructor") && t.call(h, l[A]) && w.push(l[A]);
|
|
6396
6396
|
return w;
|
|
6397
6397
|
};
|
|
6398
6398
|
}
|
|
@@ -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
|
-
(
|
|
7037
|
+
(T) => {
|
|
7038
7038
|
var O;
|
|
7039
7039
|
const S = Jn(
|
|
7040
|
-
|
|
7040
|
+
T,
|
|
7041
7041
|
(O = l.current) == null ? void 0 : O._advancedSearchContainer
|
|
7042
7042
|
);
|
|
7043
|
-
t({ params: S, values: or(
|
|
7043
|
+
t({ params: S, values: or(T) });
|
|
7044
7044
|
},
|
|
7045
7045
|
[t]
|
|
7046
7046
|
), g = E(() => {
|
|
7047
|
-
var
|
|
7048
|
-
(
|
|
7047
|
+
var T;
|
|
7048
|
+
(T = d.current) == null || T.submit();
|
|
7049
7049
|
}, []), y = E(
|
|
7050
|
-
(
|
|
7050
|
+
(T) => {
|
|
7051
7051
|
var b;
|
|
7052
|
-
const S = or(
|
|
7052
|
+
const S = or(T);
|
|
7053
7053
|
if (Fa(S, s)) {
|
|
7054
7054
|
h([]);
|
|
7055
7055
|
return;
|
|
7056
7056
|
}
|
|
7057
7057
|
const O = Jn(
|
|
7058
|
-
|
|
7058
|
+
T,
|
|
7059
7059
|
(b = l.current) == null ? void 0 : b._advancedSearchContainer
|
|
7060
7060
|
);
|
|
7061
7061
|
h(O);
|
|
7062
7062
|
},
|
|
7063
7063
|
[s]
|
|
7064
7064
|
), v = E(() => {
|
|
7065
|
-
var
|
|
7066
|
-
(
|
|
7065
|
+
var T, S;
|
|
7066
|
+
(T = d.current) == null || T.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,7 +7199,7 @@ 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), T = Y(), { token: S } = fh(), [O] = Ct.useForm();
|
|
7203
7203
|
se(() => {
|
|
7204
7204
|
O.setFieldsValue(m);
|
|
7205
7205
|
}, [m]);
|
|
@@ -7210,15 +7210,15 @@ function Lo(e) {
|
|
|
7210
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), T.current = new as(n, t), T.current.parse(), g(T.current._simpleSearchContainer), v(T.current._advancedSearchContainer);
|
|
7214
7214
|
}, [t, n]);
|
|
7215
|
-
const
|
|
7215
|
+
const A = b(), _ = (x) => {
|
|
7216
7216
|
var N;
|
|
7217
7217
|
const { limit: F, offset: D } = x;
|
|
7218
7218
|
delete x.offset, delete x.limit;
|
|
7219
7219
|
const V = Jn(
|
|
7220
7220
|
x,
|
|
7221
|
-
(N =
|
|
7221
|
+
(N = T.current) == null ? void 0 : N._advancedSearchContainer
|
|
7222
7222
|
);
|
|
7223
7223
|
o({ params: V, offset: D, limit: F, searchValues: x });
|
|
7224
7224
|
}, R = E(() => {
|
|
@@ -7251,7 +7251,7 @@ function Lo(e) {
|
|
|
7251
7251
|
onFinish: _,
|
|
7252
7252
|
initialValues: { offset: s, limit: l },
|
|
7253
7253
|
children: [
|
|
7254
|
-
|
|
7254
|
+
A,
|
|
7255
7255
|
w && h && /* @__PURE__ */ i(uh, { onLimitChange: c }),
|
|
7256
7256
|
/* @__PURE__ */ i(
|
|
7257
7257
|
dh,
|
|
@@ -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, T] = C(), [S, O] = C(0), [b, A] = 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: T,
|
|
7345
7345
|
totalItems: S,
|
|
7346
7346
|
setTotalItems: O,
|
|
7347
7347
|
isActive: void 0,
|
|
7348
7348
|
sortState: b,
|
|
7349
|
-
setSortState:
|
|
7349
|
+
setSortState: A
|
|
7350
7350
|
};
|
|
7351
7351
|
}
|
|
7352
7352
|
const ph = 3 * 1e3, hh = (e) => {
|
|
@@ -7420,8 +7420,8 @@ function vh(e, t) {
|
|
|
7420
7420
|
onChangeSelectedRowKeys: f,
|
|
7421
7421
|
nameSearch: d,
|
|
7422
7422
|
filterType: m = "side"
|
|
7423
|
-
} = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I,
|
|
7424
|
-
elementRef:
|
|
7423
|
+
} = e, h = Y({}), p = Y(), g = Y(null), y = Y([]), v = Y(!1), w = qs(), [I, T] = C(!0), [S, O] = C(), { t: b } = de(), A = Y(null), _ = Df({
|
|
7424
|
+
elementRef: A,
|
|
7425
7425
|
offset: gh
|
|
7426
7426
|
}), { treeView: R, formView: x, loading: F } = zs({
|
|
7427
7427
|
model: n,
|
|
@@ -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
|
-
O(void 0), ie(0),
|
|
7497
|
+
O(void 0), ie(0), T(!0);
|
|
7498
7498
|
try {
|
|
7499
7499
|
const ve = await k.getHandler().searchCount({
|
|
7500
7500
|
params: oe ? s : Te,
|
|
@@ -7506,7 +7506,7 @@ function vh(e, t) {
|
|
|
7506
7506
|
} catch (ve) {
|
|
7507
7507
|
w(ve);
|
|
7508
7508
|
} finally {
|
|
7509
|
-
|
|
7509
|
+
T(!1);
|
|
7510
7510
|
}
|
|
7511
7511
|
}, [
|
|
7512
7512
|
s,
|
|
@@ -7856,7 +7856,7 @@ function vh(e, t) {
|
|
|
7856
7856
|
totalRows: S
|
|
7857
7857
|
}
|
|
7858
7858
|
),
|
|
7859
|
-
/* @__PURE__ */ i("div", { ref:
|
|
7859
|
+
/* @__PURE__ */ i("div", { ref: A, style: ot, children: F || We || I ? /* @__PURE__ */ i(Ke, {}) : Fe })
|
|
7860
7860
|
] });
|
|
7861
7861
|
}
|
|
7862
7862
|
const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
@@ -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: T = !1,
|
|
7945
7945
|
context: S,
|
|
7946
7946
|
readonly: O,
|
|
7947
7947
|
onSelectAllRecords: b
|
|
7948
|
-
} = e,
|
|
7948
|
+
} = e, A = Y(null), [_, R] = C([]), x = Y(!1), [F, D] = C(), { t: V } = de(), N = Y(r), L = ee(
|
|
7949
7949
|
mt
|
|
7950
|
-
), { title: B = void 0, setTitle: G = void 0 } = (
|
|
7950
|
+
), { title: B = void 0, setTitle: G = void 0 } = (T ? L : {}) || {}, $ = X(() => {
|
|
7951
7951
|
if (F)
|
|
7952
7952
|
return Ao(
|
|
7953
7953
|
F,
|
|
@@ -7960,7 +7960,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
7960
7960
|
Tt(t, () => ({
|
|
7961
7961
|
unselectAll: () => {
|
|
7962
7962
|
var q;
|
|
7963
|
-
(q =
|
|
7963
|
+
(q = A.current) == null || q.unselectAll();
|
|
7964
7964
|
}
|
|
7965
7965
|
})), se(() => {
|
|
7966
7966
|
const q = Mt(a);
|
|
@@ -8034,7 +8034,7 @@ const Ra = xt(vh), Wi = (e, t = "14px -apple-system") => {
|
|
|
8034
8034
|
/* @__PURE__ */ i(
|
|
8035
8035
|
wc,
|
|
8036
8036
|
{
|
|
8037
|
-
ref:
|
|
8037
|
+
ref: A,
|
|
8038
8038
|
height: H,
|
|
8039
8039
|
columns: me.columns,
|
|
8040
8040
|
dataSource: _,
|
|
@@ -8089,12 +8089,12 @@ const Ea = (e) => {
|
|
|
8089
8089
|
resultsActionView: v,
|
|
8090
8090
|
domain: w,
|
|
8091
8091
|
currentId: I,
|
|
8092
|
-
limit:
|
|
8092
|
+
limit: T,
|
|
8093
8093
|
setLimit: S,
|
|
8094
8094
|
searchParams: O = [],
|
|
8095
8095
|
setSearchValues: b,
|
|
8096
|
-
clearSelection:
|
|
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(
|
|
8096
|
+
clearSelection: A
|
|
8097
|
+
} = e, [_, R] = C(!1), [x, F] = C(!1), [D, V] = C(), [N, L] = C(1), [B, G] = C(0), [$, K] = C(), [Z, J] = C([]), [Q, Ce] = C(void 0), [me, H] = C(void 0), j = Y(T || jt), q = Y([]), ie = E(
|
|
8098
8098
|
(ue) => {
|
|
8099
8099
|
y == null || y([...ue]), J([...ue]);
|
|
8100
8100
|
},
|
|
@@ -8188,7 +8188,7 @@ const Ea = (e) => {
|
|
|
8188
8188
|
), oe = E(
|
|
8189
8189
|
async (ue) => {
|
|
8190
8190
|
try {
|
|
8191
|
-
R(!0), s == null || s(!0), l && !c.current ? await M() : await ne(ue),
|
|
8191
|
+
R(!0), s == null || s(!0), l && !c.current ? await M() : await ne(ue), A == null || A();
|
|
8192
8192
|
} catch (Te) {
|
|
8193
8193
|
V(typeof Te == "string" ? Te : Te.message), R(!1);
|
|
8194
8194
|
} finally {
|
|
@@ -8196,7 +8196,7 @@ const Ea = (e) => {
|
|
|
8196
8196
|
}
|
|
8197
8197
|
},
|
|
8198
8198
|
[
|
|
8199
|
-
|
|
8199
|
+
A,
|
|
8200
8200
|
l,
|
|
8201
8201
|
M,
|
|
8202
8202
|
c,
|
|
@@ -8244,18 +8244,18 @@ const Ea = (e) => {
|
|
|
8244
8244
|
]
|
|
8245
8245
|
), Pe = E(
|
|
8246
8246
|
(ue) => {
|
|
8247
|
-
R(!0), L(ue), G((ue - 1) *
|
|
8247
|
+
R(!0), L(ue), G((ue - 1) * T);
|
|
8248
8248
|
},
|
|
8249
|
-
[R,
|
|
8249
|
+
[R, T, G, L]
|
|
8250
8250
|
), Be = E(() => {
|
|
8251
|
-
_ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0), L(1), S == null || S(
|
|
8251
|
+
_ || (n == null || n(void 0), o == null || o([]), b == null || b({}), V(void 0), G(0), L(1), S == null || S(T || jt));
|
|
8252
8252
|
}, [
|
|
8253
8253
|
_,
|
|
8254
8254
|
n,
|
|
8255
8255
|
o,
|
|
8256
8256
|
b,
|
|
8257
8257
|
S,
|
|
8258
|
-
|
|
8258
|
+
T
|
|
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({
|
|
@@ -8307,7 +8307,7 @@ 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, T] = C(), [S, O] = C(), [b, A] = C(), [_, R] = C(), [x, F] = C(200), D = Y(), { height: V } = yr(), N = ee(
|
|
8311
8311
|
bn
|
|
8312
8312
|
), { processAction: L } = N || {}, B = ee(
|
|
8313
8313
|
mt
|
|
@@ -8399,7 +8399,7 @@ function Ch(e, t) {
|
|
|
8399
8399
|
p(!1);
|
|
8400
8400
|
}
|
|
8401
8401
|
}, re = async () => {
|
|
8402
|
-
|
|
8402
|
+
T(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
|
+
})), A(De), O(gt);
|
|
8415
8415
|
};
|
|
8416
8416
|
se(() => {
|
|
8417
8417
|
Rt();
|
|
@@ -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]), T = E(
|
|
8570
8570
|
async (F) => {
|
|
8571
8571
|
m(!0);
|
|
8572
8572
|
try {
|
|
@@ -8582,16 +8582,16 @@ const Va = xt(Ch), jo = ({
|
|
|
8582
8582
|
t();
|
|
8583
8583
|
}, [t]), O = E(
|
|
8584
8584
|
({ id: F }) => {
|
|
8585
|
-
|
|
8585
|
+
T([F]);
|
|
8586
8586
|
},
|
|
8587
|
-
[
|
|
8587
|
+
[T]
|
|
8588
8588
|
), b = E(() => {
|
|
8589
8589
|
if (u.length === 0) {
|
|
8590
8590
|
S();
|
|
8591
8591
|
return;
|
|
8592
8592
|
}
|
|
8593
|
-
|
|
8594
|
-
}, [u, S,
|
|
8593
|
+
T(u);
|
|
8594
|
+
}, [u, S, T]), A = 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 && T([F]);
|
|
8604
8604
|
},
|
|
8605
|
-
[S,
|
|
8605
|
+
[S, T]
|
|
8606
8606
|
);
|
|
8607
8607
|
return /* @__PURE__ */ P(le, { children: [
|
|
8608
8608
|
/* @__PURE__ */ P(
|
|
@@ -8619,7 +8619,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8619
8619
|
maskClosable: !1,
|
|
8620
8620
|
children: [
|
|
8621
8621
|
!w && /* @__PURE__ */ i(
|
|
8622
|
-
|
|
8622
|
+
A,
|
|
8623
8623
|
{
|
|
8624
8624
|
formView: v,
|
|
8625
8625
|
treeView: y,
|
|
@@ -8688,7 +8688,7 @@ 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), [T, S] = C(""), O = Y(), b = ee(Ue), { domain: A, getValues: _, getFields: R, getContext: x, elementHasLostFocus: F } = b || {}, D = Y([]), [V, N] = C([]), L = t && t[0] || void 0, B = t && t[1] || "";
|
|
8692
8692
|
se(() => {
|
|
8693
8693
|
!Array.isArray(t) && t && J(t);
|
|
8694
8694
|
}, [t]), se(() => {
|
|
@@ -8699,7 +8699,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8699
8699
|
}, $ = (H) => {
|
|
8700
8700
|
O.current = H.target.value, G([void 0, ""]);
|
|
8701
8701
|
}, K = async () => {
|
|
8702
|
-
if (!g &&
|
|
8702
|
+
if (!g && T !== B) {
|
|
8703
8703
|
if (await new Promise((H) => setTimeout(H, 100)), I.current) {
|
|
8704
8704
|
G([void 0, ""]);
|
|
8705
8705
|
return;
|
|
@@ -8759,9 +8759,9 @@ const Va = xt(Ch), jo = ({
|
|
|
8759
8759
|
}),
|
|
8760
8760
|
fields: R(),
|
|
8761
8761
|
context: x()
|
|
8762
|
-
})),
|
|
8762
|
+
})), A && A.length > 0 && (D.current = D.current.concat(
|
|
8763
8763
|
fo({
|
|
8764
|
-
domain:
|
|
8764
|
+
domain: A,
|
|
8765
8765
|
widgetFieldName: c
|
|
8766
8766
|
})
|
|
8767
8767
|
)), N(D.current);
|
|
@@ -8774,7 +8774,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8774
8774
|
o && !s ? Ah : rt,
|
|
8775
8775
|
{
|
|
8776
8776
|
type: "text",
|
|
8777
|
-
value:
|
|
8777
|
+
value: T,
|
|
8778
8778
|
disabled: s,
|
|
8779
8779
|
onChange: $,
|
|
8780
8780
|
style: {
|
|
@@ -8798,7 +8798,7 @@ const Va = xt(Ch), jo = ({
|
|
|
8798
8798
|
Le,
|
|
8799
8799
|
{
|
|
8800
8800
|
icon: /* @__PURE__ */ i(mo, {}),
|
|
8801
|
-
disabled: L === void 0 || B === "" ||
|
|
8801
|
+
disabled: L === void 0 || B === "" || T === void 0,
|
|
8802
8802
|
onClick: () => {
|
|
8803
8803
|
p(!0);
|
|
8804
8804
|
},
|
|
@@ -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: T } = Fh(), { t: S } = de();
|
|
9140
9140
|
return La({
|
|
9141
9141
|
toolbar: y,
|
|
9142
9142
|
mustDisableButtons: n,
|
|
@@ -9149,7 +9149,7 @@ function Rh(e) {
|
|
|
9149
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: T }),
|
|
9153
9153
|
/* @__PURE__ */ P("div", { className: "flex-none h-8 pl-2", children: [
|
|
9154
9154
|
a !== "graph" && p && /* @__PURE__ */ i(
|
|
9155
9155
|
st,
|
|
@@ -9319,7 +9319,7 @@ 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), [T, S] = C(!1), [O, b] = C(), [A, _] = C(!1), [R, x] = C(!1), [F, D] = C(), [V, N] = C([]), [L, B] = C(!1), G = Y([]), [$, K] = C(), Z = Y(), [J, Q] = C(void 0), Ce = Y(), {
|
|
9323
9323
|
readOnly: me,
|
|
9324
9324
|
relation: H,
|
|
9325
9325
|
context: j,
|
|
@@ -9595,7 +9595,7 @@ const Vh = (e) => {
|
|
|
9595
9595
|
limit: M.length,
|
|
9596
9596
|
treeView: o.get("tree"),
|
|
9597
9597
|
results: re,
|
|
9598
|
-
loading:
|
|
9598
|
+
loading: T,
|
|
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,
|
|
@@ -9626,7 +9626,7 @@ const Vh = (e) => {
|
|
|
9626
9626
|
if (O)
|
|
9627
9627
|
return /* @__PURE__ */ i(at, { className: "mt-10", message: O, type: "error", banner: !0 });
|
|
9628
9628
|
const be = L;
|
|
9629
|
-
return
|
|
9629
|
+
return T ? /* @__PURE__ */ i(Ke, {}) : /* @__PURE__ */ P(le, { children: [
|
|
9630
9630
|
/* @__PURE__ */ i(
|
|
9631
9631
|
Ya,
|
|
9632
9632
|
{
|
|
@@ -9664,7 +9664,7 @@ const Vh = (e) => {
|
|
|
9664
9664
|
submitMode: "2many",
|
|
9665
9665
|
values: F == null ? void 0 : F.values,
|
|
9666
9666
|
defaultValues: F == null ? void 0 : F.defaultValues,
|
|
9667
|
-
visible:
|
|
9667
|
+
visible: A,
|
|
9668
9668
|
onSubmitSucceed: ke,
|
|
9669
9669
|
parentContext: { ...p == null ? void 0 : p(), ...j },
|
|
9670
9670
|
onCancel: () => {
|
|
@@ -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 T = v ? (await Ad(w, t, n, v)).slice(
|
|
9755
9755
|
p,
|
|
9756
9756
|
g
|
|
9757
9757
|
) : w, S = Od(d), {
|
|
9758
9758
|
items: O,
|
|
9759
9759
|
colors: b,
|
|
9760
|
-
status:
|
|
9760
|
+
status: A
|
|
9761
9761
|
} = await _d({
|
|
9762
9762
|
relation: t,
|
|
9763
|
-
ids:
|
|
9763
|
+
ids: T,
|
|
9764
9764
|
treeView: e,
|
|
9765
9765
|
context: n,
|
|
9766
9766
|
attrs: S,
|
|
9767
9767
|
treeOoui: d
|
|
9768
|
-
}), R =
|
|
9768
|
+
}), R = T.length < g - p && I.length > 0 ? [...T, ...I.map((F) => F.id)] : T;
|
|
9769
9769
|
return { results: Td({
|
|
9770
9770
|
finalResultIds: R,
|
|
9771
9771
|
fetchedItems: O,
|
|
9772
9772
|
otherItems: I
|
|
9773
|
-
}), colors: b, status:
|
|
9773
|
+
}), colors: b, status: A };
|
|
9774
9774
|
},
|
|
9775
9775
|
[n, t, d, e]
|
|
9776
9776
|
),
|
|
@@ -9986,9 +9986,9 @@ const jh = ({
|
|
|
9986
9986
|
}, [n, e, t, r]), w = E(() => {
|
|
9987
9987
|
m(!1), y(!1);
|
|
9988
9988
|
}, []), I = wt(
|
|
9989
|
-
(S, O, b,
|
|
9989
|
+
(S, O, b, A = !1) => {
|
|
9990
9990
|
let _;
|
|
9991
|
-
if (
|
|
9991
|
+
if (A)
|
|
9992
9992
|
_ = o.concat({
|
|
9993
9993
|
id: S,
|
|
9994
9994
|
operation: "pendingLink",
|
|
@@ -10014,14 +10014,14 @@ const jh = ({
|
|
|
10014
10014
|
a(_), g || m(!1);
|
|
10015
10015
|
},
|
|
10016
10016
|
[g, o, a]
|
|
10017
|
-
),
|
|
10017
|
+
), T = wt(
|
|
10018
10018
|
async (S) => {
|
|
10019
10019
|
if (!u)
|
|
10020
10020
|
return;
|
|
10021
10021
|
const { id: O } = S;
|
|
10022
10022
|
let b = o;
|
|
10023
|
-
const
|
|
10024
|
-
(
|
|
10023
|
+
const A = o.find((_) => _.id === O);
|
|
10024
|
+
(A == null ? void 0 : A.values) === void 0 && (b = await k.getHandler().readObjects({
|
|
10025
10025
|
model: c,
|
|
10026
10026
|
ids: [S.id],
|
|
10027
10027
|
fields: u.fields,
|
|
@@ -10037,7 +10037,7 @@ const jh = ({
|
|
|
10037
10037
|
createItem: v,
|
|
10038
10038
|
onCancelFormModal: w,
|
|
10039
10039
|
onFormModalSubmitSucceed: I,
|
|
10040
|
-
openItemInFormModal:
|
|
10040
|
+
openItemInFormModal: T
|
|
10041
10041
|
};
|
|
10042
10042
|
}, Bh = ({
|
|
10043
10043
|
currentView: e,
|
|
@@ -10116,7 +10116,7 @@ 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({}), T = Y(), S = Y(), O = Y(e), { t: b } = de();
|
|
10120
10120
|
Ft(() => {
|
|
10121
10121
|
var N, L;
|
|
10122
10122
|
if (O.current = e, S.current === void 0) {
|
|
@@ -10125,7 +10125,7 @@ const jh = ({
|
|
|
10125
10125
|
}
|
|
10126
10126
|
S.current = e, (N = w == null ? void 0 : w.current) == null || N.refresh(), (L = w == null ? void 0 : w.current) == null || L.unselectAll();
|
|
10127
10127
|
}, [e]);
|
|
10128
|
-
const
|
|
10128
|
+
const A = Rn(() => e.length, [e]), _ = Rn(() => Ao(
|
|
10129
10129
|
o,
|
|
10130
10130
|
{
|
|
10131
10131
|
...Vo
|
|
@@ -10145,7 +10145,7 @@ const jh = ({
|
|
|
10145
10145
|
endRow: L,
|
|
10146
10146
|
sortFields: G
|
|
10147
10147
|
});
|
|
10148
|
-
return I.current = { ...I.current, ...K }, !
|
|
10148
|
+
return I.current = { ...I.current, ...K }, !T.current && Z && (T.current = {}), Z && (T.current = { ...T.current, ...Z }), $;
|
|
10149
10149
|
},
|
|
10150
10150
|
[s]
|
|
10151
10151
|
), x = E((N) => {
|
|
@@ -10176,13 +10176,13 @@ const jh = ({
|
|
|
10176
10176
|
onGetFirstVisibleRowIndex: d,
|
|
10177
10177
|
selectedRowKeys: g,
|
|
10178
10178
|
onSelectionCheckboxClicked: m,
|
|
10179
|
-
totalRows:
|
|
10179
|
+
totalRows: A,
|
|
10180
10180
|
footer: p && /* @__PURE__ */ i(na, { aggregates: p, isLoading: !1 }),
|
|
10181
10181
|
hasStatusColumn: o.status !== null,
|
|
10182
10182
|
statusComponent: (N) => /* @__PURE__ */ i(cr, { color: N, style: { marginLeft: 7 } }),
|
|
10183
10183
|
onRowStatus: (N) => {
|
|
10184
10184
|
var L;
|
|
10185
|
-
return (L =
|
|
10185
|
+
return (L = T.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(), O = a.size > 1, b = ((xe = a.get("form")) == null ? void 0 : xe.fields) !== void 0,
|
|
10218
|
+
fetchValues: T
|
|
10219
|
+
} = v || {}, S = Y(), O = a.size > 1, b = ((xe = a.get("form")) == null ? void 0 : xe.fields) !== void 0, A = X(() => ({ ...I == null ? void 0 : I(), ...p }), [I, p]), _ = Ph({
|
|
10220
10220
|
widgetDomain: g,
|
|
10221
10221
|
fieldName: y
|
|
10222
10222
|
}), {
|
|
@@ -10230,7 +10230,7 @@ const jh = ({
|
|
|
10230
10230
|
} = kh({
|
|
10231
10231
|
treeView: a.get("tree"),
|
|
10232
10232
|
relation: h,
|
|
10233
|
-
context:
|
|
10233
|
+
context: A,
|
|
10234
10234
|
allRowsIds: l.filter((z) => z.id !== void 0).map((z) => z.id),
|
|
10235
10235
|
gridRef: t
|
|
10236
10236
|
}), [, B] = Gh({
|
|
@@ -10260,7 +10260,7 @@ const jh = ({
|
|
|
10260
10260
|
formView: a.get("form"),
|
|
10261
10261
|
treeView: a.get("tree"),
|
|
10262
10262
|
relation: h,
|
|
10263
|
-
context:
|
|
10263
|
+
context: A,
|
|
10264
10264
|
triggerChange: K
|
|
10265
10265
|
}), {
|
|
10266
10266
|
showFormModal: me,
|
|
@@ -10279,7 +10279,7 @@ const jh = ({
|
|
|
10279
10279
|
items: l,
|
|
10280
10280
|
setCurrentView: u,
|
|
10281
10281
|
setItemIndex: d,
|
|
10282
|
-
context:
|
|
10282
|
+
context: A,
|
|
10283
10283
|
relation: h,
|
|
10284
10284
|
formView: a.get("form")
|
|
10285
10285
|
}), {
|
|
@@ -10293,7 +10293,7 @@ const jh = ({
|
|
|
10293
10293
|
triggerChange: K,
|
|
10294
10294
|
items: l,
|
|
10295
10295
|
views: a,
|
|
10296
|
-
context:
|
|
10296
|
+
context: A,
|
|
10297
10297
|
relation: h
|
|
10298
10298
|
}), { showRemoveConfirm: Pe } = Mh({
|
|
10299
10299
|
isMany2many: $,
|
|
@@ -10354,10 +10354,10 @@ const jh = ({
|
|
|
10354
10354
|
showCreateButton: b,
|
|
10355
10355
|
showToggleButton: O,
|
|
10356
10356
|
toolbar: (Ne = a.get(c)) == null ? void 0 : Ne.toolbar,
|
|
10357
|
-
context: { ...I == null ? void 0 : I(), ...
|
|
10357
|
+
context: { ...I == null ? void 0 : I(), ...A },
|
|
10358
10358
|
formRef: S,
|
|
10359
10359
|
onRefreshParentValues: () => {
|
|
10360
|
-
|
|
10360
|
+
T == null || T({ forceRefresh: !0 });
|
|
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: A,
|
|
10374
10374
|
onRowDoubleClick: We,
|
|
10375
10375
|
showPointerCursorInRows: Te,
|
|
10376
10376
|
onRowSelectionChange: D,
|
|
@@ -10393,7 +10393,7 @@ const jh = ({
|
|
|
10393
10393
|
ref: S,
|
|
10394
10394
|
items: l,
|
|
10395
10395
|
formView: a.get("form"),
|
|
10396
|
-
context:
|
|
10396
|
+
context: A,
|
|
10397
10397
|
relation: h,
|
|
10398
10398
|
readOnly: m || !1,
|
|
10399
10399
|
onChange: J
|
|
@@ -10410,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: A,
|
|
10414
10414
|
onCancel: q,
|
|
10415
10415
|
readOnly: m,
|
|
10416
10416
|
mustClearAfterSave: j,
|
|
10417
10417
|
onMustRefreshParent: () => {
|
|
10418
|
-
|
|
10418
|
+
T == null || T({ 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: A,
|
|
10428
10428
|
visible: ne,
|
|
10429
10429
|
onSelectValues: oe,
|
|
10430
10430
|
onCloseModal: we
|
|
@@ -10437,7 +10437,7 @@ const jh = ({
|
|
|
10437
10437
|
view_id: a.get("graph").view_id,
|
|
10438
10438
|
model: h,
|
|
10439
10439
|
domain: [[`${o.inv_field}`, "=", w]],
|
|
10440
|
-
context:
|
|
10440
|
+
context: A,
|
|
10441
10441
|
limit: 0
|
|
10442
10442
|
}
|
|
10443
10443
|
),
|
|
@@ -10454,26 +10454,11 @@ const jh = ({
|
|
|
10454
10454
|
Ft(() => {
|
|
10455
10455
|
I();
|
|
10456
10456
|
}, [t]);
|
|
10457
|
-
const w = async (O) => {
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
});
|
|
10463
|
-
if (o && o[O]) {
|
|
10464
|
-
const T = o[O];
|
|
10465
|
-
if (!T.toolbar && (O === "form" || O === "tree")) {
|
|
10466
|
-
const _ = await b;
|
|
10467
|
-
return { ...T, toolbar: _.toolbar };
|
|
10468
|
-
}
|
|
10469
|
-
return T;
|
|
10470
|
-
}
|
|
10471
|
-
return await k.getHandler().getView({
|
|
10472
|
-
model: r,
|
|
10473
|
-
type: O,
|
|
10474
|
-
context: { ...g == null ? void 0 : g(), ...s }
|
|
10475
|
-
});
|
|
10476
|
-
}, I = async () => {
|
|
10457
|
+
const w = async (O) => o && o[O] ? o[O] : await k.getHandler().getView({
|
|
10458
|
+
model: r,
|
|
10459
|
+
type: O,
|
|
10460
|
+
context: { ...g == null ? void 0 : g(), ...s }
|
|
10461
|
+
}), I = async () => {
|
|
10477
10462
|
u(!0), d(void 0);
|
|
10478
10463
|
try {
|
|
10479
10464
|
if (n && n.length > 0) {
|
|
@@ -10781,7 +10766,7 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10781
10766
|
}
|
|
10782
10767
|
let v = r;
|
|
10783
10768
|
y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (v = [
|
|
10784
|
-
["id", "in", n == null ? void 0 : n.map((
|
|
10769
|
+
["id", "in", n == null ? void 0 : n.map((T) => T.id)]
|
|
10785
10770
|
]);
|
|
10786
10771
|
const { datas: w } = await k.getHandler().exportData({
|
|
10787
10772
|
model: e,
|
|
@@ -10794,7 +10779,7 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10794
10779
|
context: t,
|
|
10795
10780
|
format: y.exportType
|
|
10796
10781
|
});
|
|
10797
|
-
a(), await new Promise((
|
|
10782
|
+
a(), await new Promise((T) => setTimeout(T, 200));
|
|
10798
10783
|
const I = await un(w);
|
|
10799
10784
|
wr(w, I.mime);
|
|
10800
10785
|
},
|
|
@@ -10808,18 +10793,18 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10808
10793
|
return s.current["/"] = y, Gi({ fields: y });
|
|
10809
10794
|
}, [e, t, s]), d = E(
|
|
10810
10795
|
async (y) => {
|
|
10811
|
-
const w = so(y, s.current)[io(y)], I = w.relation,
|
|
10796
|
+
const w = so(y, s.current)[io(y)], I = w.relation, T = await k.getHandler().getFields({
|
|
10812
10797
|
model: I,
|
|
10813
10798
|
context: t,
|
|
10814
10799
|
fields: []
|
|
10815
10800
|
});
|
|
10816
|
-
for (const [S, O] of Object.entries(
|
|
10817
|
-
|
|
10801
|
+
for (const [S, O] of Object.entries(T))
|
|
10802
|
+
T[S].string = cg({
|
|
10818
10803
|
parentTitle: w.string,
|
|
10819
10804
|
title: O.string
|
|
10820
10805
|
});
|
|
10821
|
-
return s.current[y] =
|
|
10822
|
-
fields:
|
|
10806
|
+
return s.current[y] = T, Gi({
|
|
10807
|
+
fields: T,
|
|
10823
10808
|
parentKey: y
|
|
10824
10809
|
});
|
|
10825
10810
|
},
|
|
@@ -10833,13 +10818,13 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10833
10818
|
return {
|
|
10834
10819
|
predefinedExports: y.map((I) => ({
|
|
10835
10820
|
...I,
|
|
10836
|
-
fields: I.fields.map((
|
|
10837
|
-
const S = io(
|
|
10821
|
+
fields: I.fields.map((T) => {
|
|
10822
|
+
const S = io(T.key), b = so(T.key, s.current)[S];
|
|
10838
10823
|
return b ? {
|
|
10839
|
-
key:
|
|
10824
|
+
key: T.key,
|
|
10840
10825
|
title: b.string
|
|
10841
10826
|
} : {
|
|
10842
|
-
key:
|
|
10827
|
+
key: T.key
|
|
10843
10828
|
};
|
|
10844
10829
|
})
|
|
10845
10830
|
})),
|
|
@@ -10878,10 +10863,10 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
10878
10863
|
context: t
|
|
10879
10864
|
});
|
|
10880
10865
|
return await Promise.all(
|
|
10881
|
-
y.fields.map(async (
|
|
10866
|
+
y.fields.map(async (T) => await k.getHandler().create({
|
|
10882
10867
|
model: "ir.exports.line",
|
|
10883
10868
|
values: {
|
|
10884
|
-
name:
|
|
10869
|
+
name: T.key,
|
|
10885
10870
|
export_id: I
|
|
10886
10871
|
},
|
|
10887
10872
|
fields: w,
|
|
@@ -11116,8 +11101,8 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
11116
11101
|
r == null || r(I);
|
|
11117
11102
|
};
|
|
11118
11103
|
async function g() {
|
|
11119
|
-
const I = await un(n),
|
|
11120
|
-
S.href =
|
|
11104
|
+
const I = await un(n), T = `data:${I == null ? void 0 : I.mime};base64,${n}`, S = document.createElement("a"), O = d(s), b = d("name");
|
|
11105
|
+
S.href = T, S.download = O || b, S.click();
|
|
11121
11106
|
}
|
|
11122
11107
|
async function y() {
|
|
11123
11108
|
const I = await un(n);
|
|
@@ -11125,8 +11110,8 @@ const { useToken: rg } = He, { TextArea: ro } = rt, og = (e) => {
|
|
|
11125
11110
|
}
|
|
11126
11111
|
async function v(I) {
|
|
11127
11112
|
I.stopPropagation(), I.preventDefault();
|
|
11128
|
-
const
|
|
11129
|
-
p(S), s && f(s,
|
|
11113
|
+
const T = I.target.files[0], S = await Rs(T);
|
|
11114
|
+
p(S), s && f(s, T.name);
|
|
11130
11115
|
}
|
|
11131
11116
|
function w() {
|
|
11132
11117
|
f(s, void 0), p(void 0);
|
|
@@ -11561,14 +11546,14 @@ const Og = () => {
|
|
|
11561
11546
|
async (y) => {
|
|
11562
11547
|
var v;
|
|
11563
11548
|
try {
|
|
11564
|
-
const { params: w, model: I, name_search:
|
|
11549
|
+
const { params: w, model: I, name_search: T, context: S, order: O } = s, { results: b } = await l({
|
|
11565
11550
|
params: w,
|
|
11566
11551
|
model: I,
|
|
11567
11552
|
context: S,
|
|
11568
11553
|
limit: 1,
|
|
11569
11554
|
offset: y,
|
|
11570
11555
|
order: O,
|
|
11571
|
-
name_search:
|
|
11556
|
+
name_search: T,
|
|
11572
11557
|
skipRead: !0
|
|
11573
11558
|
});
|
|
11574
11559
|
return (v = b[0]) == null ? void 0 : v.id;
|
|
@@ -11587,19 +11572,19 @@ const Og = () => {
|
|
|
11587
11572
|
var S, O;
|
|
11588
11573
|
if (!a)
|
|
11589
11574
|
return;
|
|
11590
|
-
const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0,
|
|
11575
|
+
const v = y === "next", w = v ? n + 1 : n - 1, I = v ? w < t : w >= 0, T = v ? w === t : w === -1;
|
|
11591
11576
|
if (I) {
|
|
11592
11577
|
const b = (S = a[w]) == null ? void 0 : S.id;
|
|
11593
11578
|
if (b)
|
|
11594
11579
|
d(w, b);
|
|
11595
11580
|
else {
|
|
11596
|
-
const
|
|
11597
|
-
|
|
11581
|
+
const A = await f(w);
|
|
11582
|
+
A && d(w, A);
|
|
11598
11583
|
}
|
|
11599
|
-
} else if (
|
|
11600
|
-
const b = v ? 0 : t - 1,
|
|
11601
|
-
if (
|
|
11602
|
-
d(b,
|
|
11584
|
+
} else if (T) {
|
|
11585
|
+
const b = v ? 0 : t - 1, A = (O = a[b]) == null ? void 0 : O.id;
|
|
11586
|
+
if (A)
|
|
11587
|
+
d(b, A);
|
|
11603
11588
|
else {
|
|
11604
11589
|
const _ = await f(b);
|
|
11605
11590
|
_ && d(b, _);
|
|
@@ -11611,8 +11596,8 @@ const Og = () => {
|
|
|
11611
11596
|
(y) => {
|
|
11612
11597
|
if (!a || a.length === 0)
|
|
11613
11598
|
return;
|
|
11614
|
-
const v = y === "next", w = v ? n + 1 : n - 1,
|
|
11615
|
-
d(
|
|
11599
|
+
const v = y === "next", w = v ? n + 1 : n - 1, T = (v ? w === a.length : w === -1) ? v ? 0 : a.length - 1 : w;
|
|
11600
|
+
d(T, a[T].id);
|
|
11616
11601
|
},
|
|
11617
11602
|
[a, n, d]
|
|
11618
11603
|
), p = E(() => {
|
|
@@ -11742,11 +11727,11 @@ function Vg({ toolbar: e }) {
|
|
|
11742
11727
|
setRemovingItem: v,
|
|
11743
11728
|
removingItem: w,
|
|
11744
11729
|
duplicatingItem: I,
|
|
11745
|
-
setDuplicatingItem:
|
|
11730
|
+
setDuplicatingItem: T,
|
|
11746
11731
|
setResults: S,
|
|
11747
11732
|
formIsLoading: O,
|
|
11748
11733
|
attachments: b,
|
|
11749
|
-
formRef:
|
|
11734
|
+
formRef: A,
|
|
11750
11735
|
setFormHasChanges: _,
|
|
11751
11736
|
previousView: R,
|
|
11752
11737
|
setPreviousView: x,
|
|
@@ -11761,18 +11746,18 @@ function Vg({ toolbar: e }) {
|
|
|
11761
11746
|
},
|
|
11762
11747
|
[u, n]
|
|
11763
11748
|
), B = E(() => {
|
|
11764
|
-
L(() =>
|
|
11765
|
-
}, [L,
|
|
11749
|
+
L(() => A.current.fetchValues());
|
|
11750
|
+
}, [L, A]), { actionButtonProps: G, printButtonProps: $, relateButtonProps: K } = La({
|
|
11766
11751
|
toolbar: e,
|
|
11767
11752
|
mustDisableButtons: N,
|
|
11768
|
-
formRef:
|
|
11753
|
+
formRef: A,
|
|
11769
11754
|
onRefreshParentValues: B
|
|
11770
11755
|
}), Z = E(async () => {
|
|
11771
11756
|
try {
|
|
11772
11757
|
v == null || v(!0), await k.getHandler().deleteObjects({
|
|
11773
11758
|
model: y,
|
|
11774
11759
|
ids: [d],
|
|
11775
|
-
context:
|
|
11760
|
+
context: A.current.getContext()
|
|
11776
11761
|
});
|
|
11777
11762
|
const j = m == null ? void 0 : m.filter(
|
|
11778
11763
|
(ie) => ie.id !== d
|
|
@@ -11789,7 +11774,7 @@ function Vg({ toolbar: e }) {
|
|
|
11789
11774
|
d,
|
|
11790
11775
|
p,
|
|
11791
11776
|
y,
|
|
11792
|
-
|
|
11777
|
+
A,
|
|
11793
11778
|
m,
|
|
11794
11779
|
g,
|
|
11795
11780
|
h,
|
|
@@ -11797,19 +11782,19 @@ function Vg({ toolbar: e }) {
|
|
|
11797
11782
|
S
|
|
11798
11783
|
]), J = E(async () => {
|
|
11799
11784
|
try {
|
|
11800
|
-
|
|
11785
|
+
T == null || T(!0);
|
|
11801
11786
|
const j = await k.getHandler().duplicate({
|
|
11802
11787
|
id: d,
|
|
11803
11788
|
model: y,
|
|
11804
|
-
context:
|
|
11789
|
+
context: A.current.getContext()
|
|
11805
11790
|
});
|
|
11806
11791
|
j && await (F == null ? void 0 : F([j]));
|
|
11807
11792
|
} catch (j) {
|
|
11808
11793
|
zt(JSON.stringify(j));
|
|
11809
11794
|
} finally {
|
|
11810
|
-
|
|
11795
|
+
T == null || T(!1);
|
|
11811
11796
|
}
|
|
11812
|
-
}, [d, y,
|
|
11797
|
+
}, [d, y, A, F, T]), Q = E(
|
|
11813
11798
|
(j) => {
|
|
11814
11799
|
x == null || x(s), _ == null || _(!1), l == null || l(j);
|
|
11815
11800
|
},
|
|
@@ -11845,17 +11830,17 @@ function Vg({ toolbar: e }) {
|
|
|
11845
11830
|
return Wt(
|
|
11846
11831
|
"pagedown",
|
|
11847
11832
|
async () => {
|
|
11848
|
-
!D || !await
|
|
11833
|
+
!D || !await A.current.cancelUnsavedChanges() || r();
|
|
11849
11834
|
},
|
|
11850
11835
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11851
|
-
[D, r,
|
|
11836
|
+
[D, r, A]
|
|
11852
11837
|
), Wt(
|
|
11853
11838
|
"pageup",
|
|
11854
11839
|
async () => {
|
|
11855
|
-
!D || !await
|
|
11840
|
+
!D || !await A.current.cancelUnsavedChanges() || o();
|
|
11856
11841
|
},
|
|
11857
11842
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11858
|
-
[D, o,
|
|
11843
|
+
[D, o, A]
|
|
11859
11844
|
), Wt(
|
|
11860
11845
|
"ctrl+s,command+s",
|
|
11861
11846
|
() => D && (c == null ? void 0 : c()),
|
|
@@ -11864,7 +11849,7 @@ function Vg({ toolbar: e }) {
|
|
|
11864
11849
|
), Wt(
|
|
11865
11850
|
"ctrl+l,command+l",
|
|
11866
11851
|
async () => {
|
|
11867
|
-
!D || !R || !await
|
|
11852
|
+
!D || !R || !await A.current.cancelUnsavedChanges() || (x == null || x(s), l == null || l(R));
|
|
11868
11853
|
},
|
|
11869
11854
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11870
11855
|
[
|
|
@@ -11873,7 +11858,7 @@ function Vg({ toolbar: e }) {
|
|
|
11873
11858
|
s,
|
|
11874
11859
|
x,
|
|
11875
11860
|
l,
|
|
11876
|
-
|
|
11861
|
+
A
|
|
11877
11862
|
]
|
|
11878
11863
|
), s ? /* @__PURE__ */ P(Xe, { wrap: !0, children: [
|
|
11879
11864
|
O && /* @__PURE__ */ P(le, { children: [
|
|
@@ -12390,11 +12375,11 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12390
12375
|
searchVisible: v = !0,
|
|
12391
12376
|
setSearchVisible: w = void 0,
|
|
12392
12377
|
sorter: I = void 0,
|
|
12393
|
-
setSorter:
|
|
12378
|
+
setSorter: T = void 0,
|
|
12394
12379
|
setTotalItems: S = void 0,
|
|
12395
12380
|
setSearchTreeNameSearch: O = void 0,
|
|
12396
12381
|
setTreeIsLoading: b = void 0,
|
|
12397
|
-
limit:
|
|
12382
|
+
limit: A,
|
|
12398
12383
|
setLimit: _,
|
|
12399
12384
|
searchParams: R,
|
|
12400
12385
|
searchValues: x,
|
|
@@ -12420,14 +12405,14 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12420
12405
|
formView: s,
|
|
12421
12406
|
treeView: l,
|
|
12422
12407
|
sorter: I,
|
|
12423
|
-
setSorter:
|
|
12408
|
+
setSorter: T,
|
|
12424
12409
|
setCurrentItemIndex: m,
|
|
12425
12410
|
setResultsActionView: d,
|
|
12426
12411
|
resultsActionView: p,
|
|
12427
12412
|
domain: a,
|
|
12428
12413
|
currentId: h,
|
|
12429
12414
|
setActionViewTotalItems: S,
|
|
12430
|
-
limit:
|
|
12415
|
+
limit: A,
|
|
12431
12416
|
setLimit: _
|
|
12432
12417
|
}), Z = X(
|
|
12433
12418
|
() => er([
|
|
@@ -12459,7 +12444,7 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12459
12444
|
...c == null ? void 0 : c.fields
|
|
12460
12445
|
},
|
|
12461
12446
|
searchFields: Z,
|
|
12462
|
-
limit:
|
|
12447
|
+
limit: A,
|
|
12463
12448
|
onClear: L,
|
|
12464
12449
|
offset: $,
|
|
12465
12450
|
isSearching: B,
|
|
@@ -12481,7 +12466,7 @@ const { useToken: Bg } = He, { Title: Hg, Text: zn } = Bt, Ir = ({
|
|
|
12481
12466
|
model: r,
|
|
12482
12467
|
context: o,
|
|
12483
12468
|
domain: mn(R || [], a),
|
|
12484
|
-
limit: V ?
|
|
12469
|
+
limit: V ? A : void 0,
|
|
12485
12470
|
manualIds: V && p && p.length > 0 ? p.map((J) => J.id) : void 0
|
|
12486
12471
|
}
|
|
12487
12472
|
)
|
|
@@ -12586,11 +12571,11 @@ function Yg({
|
|
|
12586
12571
|
setSearchVisible: v,
|
|
12587
12572
|
setSearchTreeNameSearch: w,
|
|
12588
12573
|
searchTreeNameSearch: I,
|
|
12589
|
-
treeIsLoading:
|
|
12574
|
+
treeIsLoading: T,
|
|
12590
12575
|
setPreviousView: S,
|
|
12591
12576
|
previousView: O,
|
|
12592
12577
|
results: b,
|
|
12593
|
-
limit:
|
|
12578
|
+
limit: A,
|
|
12594
12579
|
totalItems: _,
|
|
12595
12580
|
isActive: R,
|
|
12596
12581
|
isInfiniteTree: x
|
|
@@ -12601,7 +12586,7 @@ function Yg({
|
|
|
12601
12586
|
(te = m == null ? void 0 : m.current) == null || te.refreshResults();
|
|
12602
12587
|
}, [m]), { actionButtonProps: G, printButtonProps: $ } = Ba({
|
|
12603
12588
|
toolbar: n,
|
|
12604
|
-
disabled:
|
|
12589
|
+
disabled: T,
|
|
12605
12590
|
parentContext: e,
|
|
12606
12591
|
selectedRowItems: s,
|
|
12607
12592
|
onRefreshParentValues: B
|
|
@@ -12729,7 +12714,7 @@ function Yg({
|
|
|
12729
12714
|
});
|
|
12730
12715
|
}, [Ce, D]);
|
|
12731
12716
|
return /* @__PURE__ */ P(Xe, { wrap: !0, children: [
|
|
12732
|
-
|
|
12717
|
+
T && /* @__PURE__ */ P(le, { children: [
|
|
12733
12718
|
/* @__PURE__ */ i(Ke, {}),
|
|
12734
12719
|
/* @__PURE__ */ i(et, {}),
|
|
12735
12720
|
/* @__PURE__ */ i(et, {})
|
|
@@ -12738,7 +12723,7 @@ function Yg({
|
|
|
12738
12723
|
/* @__PURE__ */ i(
|
|
12739
12724
|
Gg,
|
|
12740
12725
|
{
|
|
12741
|
-
disabled: u || c ||
|
|
12726
|
+
disabled: u || c || T,
|
|
12742
12727
|
searchText: I,
|
|
12743
12728
|
onSearch: H
|
|
12744
12729
|
}
|
|
@@ -12755,18 +12740,18 @@ function Yg({
|
|
|
12755
12740
|
tooltip: D("advanced_search"),
|
|
12756
12741
|
type: y ? "primary" : "default",
|
|
12757
12742
|
onClick: () => v == null ? void 0 : v(!y),
|
|
12758
|
-
disabled: u || c ||
|
|
12743
|
+
disabled: u || c || T,
|
|
12759
12744
|
badgeNumber: g == null ? void 0 : g.length
|
|
12760
12745
|
}
|
|
12761
12746
|
),
|
|
12762
12747
|
/* @__PURE__ */ i(et, {}),
|
|
12763
|
-
/* @__PURE__ */ i(Qa, { disabled:
|
|
12748
|
+
/* @__PURE__ */ i(Qa, { disabled: T }),
|
|
12764
12749
|
/* @__PURE__ */ i(
|
|
12765
12750
|
it,
|
|
12766
12751
|
{
|
|
12767
12752
|
icon: /* @__PURE__ */ i(pr, {}),
|
|
12768
12753
|
tooltip: D("duplicate"),
|
|
12769
|
-
disabled: !s || (s == null ? void 0 : s.length) !== 1 || u ||
|
|
12754
|
+
disabled: !s || (s == null ? void 0 : s.length) !== 1 || u || T,
|
|
12770
12755
|
loading: u,
|
|
12771
12756
|
onClick: q
|
|
12772
12757
|
}
|
|
@@ -12776,7 +12761,7 @@ function Yg({
|
|
|
12776
12761
|
{
|
|
12777
12762
|
icon: /* @__PURE__ */ i(wo, {}),
|
|
12778
12763
|
tooltip: D("delete"),
|
|
12779
|
-
disabled: !(s && (s == null ? void 0 : s.length) > 0) ||
|
|
12764
|
+
disabled: !(s && (s == null ? void 0 : s.length) > 0) || T,
|
|
12780
12765
|
loading: c,
|
|
12781
12766
|
onClick: ie
|
|
12782
12767
|
}
|
|
@@ -12788,7 +12773,7 @@ function Yg({
|
|
|
12788
12773
|
{
|
|
12789
12774
|
icon: /* @__PURE__ */ i(ho, {}),
|
|
12790
12775
|
tooltip: D("showLogs"),
|
|
12791
|
-
disabled: !(s && (s == null ? void 0 : s.length) > 0) ||
|
|
12776
|
+
disabled: !(s && (s == null ? void 0 : s.length) > 0) || T,
|
|
12792
12777
|
onClick: () => Xa(d, s[0].id, D)
|
|
12793
12778
|
}
|
|
12794
12779
|
),
|
|
@@ -12797,7 +12782,7 @@ function Yg({
|
|
|
12797
12782
|
{
|
|
12798
12783
|
icon: /* @__PURE__ */ i(hr, {}),
|
|
12799
12784
|
tooltip: D("refresh"),
|
|
12800
|
-
disabled: u || c ||
|
|
12785
|
+
disabled: u || c || T,
|
|
12801
12786
|
onClick: B
|
|
12802
12787
|
}
|
|
12803
12788
|
),
|
|
@@ -12810,7 +12795,7 @@ function Yg({
|
|
|
12810
12795
|
availableViews: r,
|
|
12811
12796
|
onChangeView: me,
|
|
12812
12797
|
previousView: O,
|
|
12813
|
-
disabled:
|
|
12798
|
+
disabled: T
|
|
12814
12799
|
}
|
|
12815
12800
|
)
|
|
12816
12801
|
] }),
|
|
@@ -12840,7 +12825,7 @@ function Yg({
|
|
|
12840
12825
|
}
|
|
12841
12826
|
],
|
|
12842
12827
|
onItemClick: j,
|
|
12843
|
-
disabled: u || c ||
|
|
12828
|
+
disabled: u || c || T || Z
|
|
12844
12829
|
}
|
|
12845
12830
|
),
|
|
12846
12831
|
/* @__PURE__ */ i(
|
|
@@ -12850,7 +12835,7 @@ function Yg({
|
|
|
12850
12835
|
onClose: () => N(!1),
|
|
12851
12836
|
model: d,
|
|
12852
12837
|
domain: J,
|
|
12853
|
-
limit:
|
|
12838
|
+
limit: A,
|
|
12854
12839
|
totalRegisters: _ || 0,
|
|
12855
12840
|
selectedRegistersToExport: s,
|
|
12856
12841
|
visibleRegisters: (b == null ? void 0 : b.length) || 0,
|
|
@@ -12913,16 +12898,16 @@ const qg = (e) => {
|
|
|
12913
12898
|
setPreviousView: v,
|
|
12914
12899
|
setIsInfiniteTree: w,
|
|
12915
12900
|
setSelectedRowItems: I
|
|
12916
|
-
} = ee(mt),
|
|
12901
|
+
} = ee(mt), T = E(
|
|
12917
12902
|
(S) => {
|
|
12918
12903
|
const { id: O } = S;
|
|
12919
12904
|
f(O);
|
|
12920
12905
|
const b = u.findIndex((_) => _.id === O);
|
|
12921
12906
|
v == null || v(y), c(b);
|
|
12922
|
-
const
|
|
12907
|
+
const A = m.find(
|
|
12923
12908
|
(_) => _.type === "form"
|
|
12924
12909
|
);
|
|
12925
|
-
d(
|
|
12910
|
+
d(A);
|
|
12926
12911
|
},
|
|
12927
12912
|
[
|
|
12928
12913
|
m,
|
|
@@ -12955,7 +12940,7 @@ const qg = (e) => {
|
|
|
12955
12940
|
formView: a,
|
|
12956
12941
|
treeView: s,
|
|
12957
12942
|
domain: l,
|
|
12958
|
-
onRowClicked:
|
|
12943
|
+
onRowClicked: T
|
|
12959
12944
|
}
|
|
12960
12945
|
),
|
|
12961
12946
|
!g && /* @__PURE__ */ i(
|
|
@@ -12969,7 +12954,7 @@ const qg = (e) => {
|
|
|
12969
12954
|
formView: a,
|
|
12970
12955
|
treeView: s,
|
|
12971
12956
|
domain: l,
|
|
12972
|
-
onRowClicked:
|
|
12957
|
+
onRowClicked: T
|
|
12973
12958
|
}
|
|
12974
12959
|
)
|
|
12975
12960
|
] }) : null;
|
|
@@ -13129,8 +13114,8 @@ function ty(e, t) {
|
|
|
13129
13114
|
treeExpandable: g = !1,
|
|
13130
13115
|
limit: y,
|
|
13131
13116
|
initialSearchParams: v = []
|
|
13132
|
-
} = e, [w, I] = C(), [
|
|
13133
|
-
|
|
13117
|
+
} = e, [w, I] = C(), [T, S] = C([]), [O, b] = C(!0), A = m || void 0, [_, R] = C(
|
|
13118
|
+
A
|
|
13134
13119
|
), [x, F] = C([]), [D, V] = C(), [N, L] = C([]), [B, G] = C(), [$, K] = C(0), [Z, J] = C(!1), [Q, Ce] = C(!1), [me, H] = C(), { t: j } = de(), q = Y(), ie = Y(), te = ee(
|
|
13135
13120
|
bt
|
|
13136
13121
|
), {
|
|
@@ -13269,8 +13254,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13269
13254
|
c
|
|
13270
13255
|
]);
|
|
13271
13256
|
l({ tabKey: c, canWeClose: ue }), dn(() => {
|
|
13272
|
-
const z =
|
|
13273
|
-
We(pe || z), m ? ne == null || ne(
|
|
13257
|
+
const z = T.find((_e) => _e.type === "tree"), pe = T.find((_e) => u.id ? _e.type === u.type && _e.view_id === u.id : _e.type === u.type);
|
|
13258
|
+
We(pe || z), m ? ne == null || ne(A) : (Be(void 0), V(void 0)), Ee();
|
|
13274
13259
|
}, [r, a, m]), dn(() => {
|
|
13275
13260
|
if (we === c) {
|
|
13276
13261
|
ne == null || ne(_);
|
|
@@ -13311,7 +13296,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13311
13296
|
_e = "tree", Ge = [["id", "in", z]];
|
|
13312
13297
|
if (Ce(!1), J(!1), pe && _e === "form") {
|
|
13313
13298
|
Be(z[0]);
|
|
13314
|
-
const fe =
|
|
13299
|
+
const fe = T.find(
|
|
13315
13300
|
(ye) => ye.type === "form"
|
|
13316
13301
|
);
|
|
13317
13302
|
We(fe);
|
|
@@ -13336,7 +13321,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13336
13321
|
q.current.clearAndReload();
|
|
13337
13322
|
else {
|
|
13338
13323
|
Be(void 0);
|
|
13339
|
-
const z =
|
|
13324
|
+
const z = T.find(
|
|
13340
13325
|
(pe) => pe.type === "form"
|
|
13341
13326
|
);
|
|
13342
13327
|
We(z);
|
|
@@ -13348,7 +13333,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13348
13333
|
title: s,
|
|
13349
13334
|
currentView: w,
|
|
13350
13335
|
setCurrentView: We,
|
|
13351
|
-
availableViews:
|
|
13336
|
+
availableViews: T,
|
|
13352
13337
|
formRef: q,
|
|
13353
13338
|
searchTreeRef: ie,
|
|
13354
13339
|
onNewClicked: Ne,
|
|
@@ -13375,7 +13360,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
13375
13360
|
/* @__PURE__ */ i(
|
|
13376
13361
|
ny,
|
|
13377
13362
|
{
|
|
13378
|
-
availableViews:
|
|
13363
|
+
availableViews: T,
|
|
13379
13364
|
formRef: q,
|
|
13380
13365
|
currentId: _,
|
|
13381
13366
|
currentView: w,
|
|
@@ -13536,13 +13521,13 @@ function iy(e) {
|
|
|
13536
13521
|
domain: a = [],
|
|
13537
13522
|
visible: s = !0,
|
|
13538
13523
|
parentContext: l = {}
|
|
13539
|
-
} = e, [c, u] = C(!1), [f, d] = C(!1), [m, h] = C(), [p, g] = C(), [y, v] = C(), [w, I] = C(1), [
|
|
13524
|
+
} = e, [c, u] = C(!1), [f, d] = C(!1), [m, h] = C(), [p, g] = C(), [y, v] = C(), [w, I] = C(1), [T, S] = C(0), O = Y(jt), b = Y([]), [A, _] = C(0), [R, x] = C([]), [F, D] = C(void 0), [V, N] = C(), [L, B] = C(), [G, $] = C(), [K, Z] = C(!1), J = Y([]), Q = (M) => {
|
|
13540
13525
|
Z(!0), I(M), S((M - 1) * O.current);
|
|
13541
13526
|
}, Ce = async () => {
|
|
13542
13527
|
const M = J.current.length > 0 ? J.current : a, ne = mn(b.current, M), { colors: oe } = Mt(p), { totalItems: we, results: ge, attrsEvaluated: Pe } = await k.getHandler().searchForTree({
|
|
13543
13528
|
params: ne,
|
|
13544
13529
|
limit: O.current,
|
|
13545
|
-
offset:
|
|
13530
|
+
offset: T,
|
|
13546
13531
|
model: m,
|
|
13547
13532
|
fields: p.fields,
|
|
13548
13533
|
context: l,
|
|
@@ -13566,7 +13551,7 @@ function iy(e) {
|
|
|
13566
13551
|
};
|
|
13567
13552
|
se(() => {
|
|
13568
13553
|
f && s && me();
|
|
13569
|
-
}, [w,
|
|
13554
|
+
}, [w, T, f, s]);
|
|
13570
13555
|
const H = async (M) => {
|
|
13571
13556
|
d(!1), u(!0), $(void 0);
|
|
13572
13557
|
try {
|
|
@@ -13614,7 +13599,7 @@ function iy(e) {
|
|
|
13614
13599
|
Un,
|
|
13615
13600
|
{
|
|
13616
13601
|
showPagination: !1,
|
|
13617
|
-
total:
|
|
13602
|
+
total: A,
|
|
13618
13603
|
limit: O.current,
|
|
13619
13604
|
page: w,
|
|
13620
13605
|
treeView: p,
|
|
@@ -13661,7 +13646,7 @@ function ly(e, t) {
|
|
|
13661
13646
|
moveItemsEnabled: p
|
|
13662
13647
|
} = ee(Ho), g = Y(), y = Y(), [v] = Je(k.getHandler().getView), [w] = Je(
|
|
13663
13648
|
k.getHandler().readObjects
|
|
13664
|
-
), [I] = Je(k.getHandler().update),
|
|
13649
|
+
), [I] = Je(k.getHandler().update), T = Sr(
|
|
13665
13650
|
vn.FEATURE_READFORVIEW
|
|
13666
13651
|
);
|
|
13667
13652
|
se(() => {
|
|
@@ -13675,7 +13660,7 @@ function ly(e, t) {
|
|
|
13675
13660
|
async function S() {
|
|
13676
13661
|
u(!0), m(!0), d(void 0);
|
|
13677
13662
|
try {
|
|
13678
|
-
const F = await O(), D = await
|
|
13663
|
+
const F = await O(), D = await A(F), V = F.fields[Br].relation, N = D[Br].items;
|
|
13679
13664
|
y.current = F.fields;
|
|
13680
13665
|
const L = await b({
|
|
13681
13666
|
items: N,
|
|
@@ -13718,7 +13703,7 @@ function ly(e, t) {
|
|
|
13718
13703
|
});
|
|
13719
13704
|
return N;
|
|
13720
13705
|
}
|
|
13721
|
-
async function
|
|
13706
|
+
async function A(F) {
|
|
13722
13707
|
return (await w({
|
|
13723
13708
|
model: n,
|
|
13724
13709
|
ids: [o],
|
|
@@ -13808,7 +13793,7 @@ function ly(e, t) {
|
|
|
13808
13793
|
}
|
|
13809
13794
|
let te = null;
|
|
13810
13795
|
if ((j == null ? void 0 : j.type) === "graph") {
|
|
13811
|
-
const we = N.server_action === !0 &&
|
|
13796
|
+
const we = N.server_action === !0 && T ? Us : yn;
|
|
13812
13797
|
te = /* @__PURE__ */ i(
|
|
13813
13798
|
we,
|
|
13814
13799
|
{
|
|
@@ -13922,18 +13907,18 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13922
13907
|
const { ooui: t } = e;
|
|
13923
13908
|
return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(uy, { ooui: t }) });
|
|
13924
13909
|
}, uy = (e) => {
|
|
13925
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((
|
|
13910
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [s, l] = C([]), [c, u] = C(), [f, d] = C(!1), { relation: m, context: h, readOnly: p, field: g, columns: y } = n, v = ee(Ue), { getContext: w } = v || {};
|
|
13926
13911
|
Ft(() => {
|
|
13927
|
-
|
|
13912
|
+
T();
|
|
13928
13913
|
}, [o]);
|
|
13929
|
-
const I = (
|
|
13914
|
+
const I = (A) => {
|
|
13930
13915
|
r == null || r({
|
|
13931
|
-
items:
|
|
13916
|
+
items: A
|
|
13932
13917
|
});
|
|
13933
13918
|
};
|
|
13934
|
-
async function
|
|
13919
|
+
async function T() {
|
|
13935
13920
|
d(!0);
|
|
13936
|
-
let
|
|
13921
|
+
let A = [];
|
|
13937
13922
|
if (n.domain) {
|
|
13938
13923
|
const _ = await k.getHandler().evalDomain({
|
|
13939
13924
|
domain: n.domain,
|
|
@@ -13944,12 +13929,12 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13944
13929
|
fields: v == null ? void 0 : v.getFields(),
|
|
13945
13930
|
context: v.getContext()
|
|
13946
13931
|
});
|
|
13947
|
-
|
|
13932
|
+
A = [...A, ..._];
|
|
13948
13933
|
}
|
|
13949
13934
|
try {
|
|
13950
13935
|
const R = (await k.getHandler().search({
|
|
13951
13936
|
model: m,
|
|
13952
|
-
params:
|
|
13937
|
+
params: A,
|
|
13953
13938
|
fieldsToRetrieve: [g],
|
|
13954
13939
|
context: { ...w == null ? void 0 : w(), ...h }
|
|
13955
13940
|
})).map((x) => {
|
|
@@ -13967,15 +13952,15 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13967
13952
|
return /* @__PURE__ */ i(at, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
13968
13953
|
}
|
|
13969
13954
|
const S = () => {
|
|
13970
|
-
b(s.map((
|
|
13955
|
+
b(s.map((A) => A.value));
|
|
13971
13956
|
}, O = () => {
|
|
13972
13957
|
b([]);
|
|
13973
|
-
}, b = (
|
|
13974
|
-
const _ = o.map((x) =>
|
|
13958
|
+
}, b = (A) => {
|
|
13959
|
+
const _ = o.map((x) => A.includes(x.id) ? x.operation == "pendingRemove" ? {
|
|
13975
13960
|
...x,
|
|
13976
13961
|
operation: "original"
|
|
13977
13962
|
} : x : { id: x.id, operation: "pendingRemove" }), R = _.map((x) => x.id);
|
|
13978
|
-
|
|
13963
|
+
A.filter((x) => !R.includes(x)).map((x) => {
|
|
13979
13964
|
_.push({ id: x, operation: "pendingLink" });
|
|
13980
13965
|
}), I(_);
|
|
13981
13966
|
};
|
|
@@ -13987,7 +13972,7 @@ const cy = xt(ly), dy = (e) => {
|
|
|
13987
13972
|
disabled: p,
|
|
13988
13973
|
onChange: b,
|
|
13989
13974
|
style: { width: "100%" },
|
|
13990
|
-
children: /* @__PURE__ */ i(je, { children: s.map((
|
|
13975
|
+
children: /* @__PURE__ */ i(je, { children: s.map((A) => /* @__PURE__ */ i(Ie, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(On, { value: A.value, children: A.label }) })) })
|
|
13991
13976
|
}
|
|
13992
13977
|
),
|
|
13993
13978
|
!p && /* @__PURE__ */ P(Xe, { children: [
|
|
@@ -14295,7 +14280,7 @@ function Hy(e, t) {
|
|
|
14295
14280
|
}));
|
|
14296
14281
|
function m(O) {
|
|
14297
14282
|
if (O === r) {
|
|
14298
|
-
const b = c.findIndex((
|
|
14283
|
+
const b = c.findIndex((A) => A.key === O);
|
|
14299
14284
|
c[b - 1] && o(c[b - 1].key), c[b + 1] && o(c[b + 1].key);
|
|
14300
14285
|
}
|
|
14301
14286
|
u(c.filter((b) => b.key !== O)), f.current.delete(O);
|
|
@@ -14307,14 +14292,14 @@ function Hy(e, t) {
|
|
|
14307
14292
|
f.current.set(O, b);
|
|
14308
14293
|
}
|
|
14309
14294
|
async function p(O) {
|
|
14310
|
-
const { actionRawData: b, res_id:
|
|
14295
|
+
const { actionRawData: b, res_id: A, initialView: _ } = O, R = await k.getHandler().getFields({
|
|
14311
14296
|
model: O.model,
|
|
14312
14297
|
context: l
|
|
14313
14298
|
});
|
|
14314
14299
|
let x = el(
|
|
14315
14300
|
b == null ? void 0 : b.values
|
|
14316
14301
|
);
|
|
14317
|
-
const F =
|
|
14302
|
+
const F = A || x.active_id || x.id;
|
|
14318
14303
|
if (F) {
|
|
14319
14304
|
const N = await k.getHandler().readObjects({
|
|
14320
14305
|
model: O.model,
|
|
@@ -14355,7 +14340,7 @@ function Hy(e, t) {
|
|
|
14355
14340
|
async function g({
|
|
14356
14341
|
model: O,
|
|
14357
14342
|
view_id: b,
|
|
14358
|
-
res_id:
|
|
14343
|
+
res_id: A
|
|
14359
14344
|
}) {
|
|
14360
14345
|
const _ = await k.getHandler().getView({
|
|
14361
14346
|
model: O,
|
|
@@ -14373,13 +14358,13 @@ function Hy(e, t) {
|
|
|
14373
14358
|
title: _.title || O,
|
|
14374
14359
|
target: "current",
|
|
14375
14360
|
initialView: { id: _.view_id, type: "form" },
|
|
14376
|
-
res_id:
|
|
14361
|
+
res_id: A
|
|
14377
14362
|
});
|
|
14378
14363
|
}
|
|
14379
14364
|
async function y({
|
|
14380
14365
|
action: O,
|
|
14381
14366
|
values: b,
|
|
14382
|
-
forced_values:
|
|
14367
|
+
forced_values: A,
|
|
14383
14368
|
initialViewType: _,
|
|
14384
14369
|
res_id: R,
|
|
14385
14370
|
domain: x = []
|
|
@@ -14450,7 +14435,7 @@ function Hy(e, t) {
|
|
|
14450
14435
|
action_type: D,
|
|
14451
14436
|
action_id: N,
|
|
14452
14437
|
values: b,
|
|
14453
|
-
forced_values:
|
|
14438
|
+
forced_values: A,
|
|
14454
14439
|
res_id: R,
|
|
14455
14440
|
treeExpandable: H,
|
|
14456
14441
|
limit: me,
|
|
@@ -14463,7 +14448,7 @@ function Hy(e, t) {
|
|
|
14463
14448
|
function v({
|
|
14464
14449
|
title: O,
|
|
14465
14450
|
content: b,
|
|
14466
|
-
key:
|
|
14451
|
+
key: A,
|
|
14467
14452
|
action: _
|
|
14468
14453
|
}) {
|
|
14469
14454
|
let R = [...c];
|
|
@@ -14471,17 +14456,17 @@ function Hy(e, t) {
|
|
|
14471
14456
|
...R,
|
|
14472
14457
|
{
|
|
14473
14458
|
title: O,
|
|
14474
|
-
key:
|
|
14459
|
+
key: A,
|
|
14475
14460
|
closable: !0,
|
|
14476
14461
|
content: b,
|
|
14477
14462
|
action: _
|
|
14478
14463
|
}
|
|
14479
|
-
]), o(
|
|
14464
|
+
]), o(A);
|
|
14480
14465
|
}
|
|
14481
14466
|
async function w({
|
|
14482
14467
|
relateData: O,
|
|
14483
14468
|
fields: b,
|
|
14484
|
-
values:
|
|
14469
|
+
values: A,
|
|
14485
14470
|
action_id: _,
|
|
14486
14471
|
action_type: R
|
|
14487
14472
|
}) {
|
|
@@ -14495,12 +14480,12 @@ function Hy(e, t) {
|
|
|
14495
14480
|
limit: B
|
|
14496
14481
|
} = O, [G, $] = V[0], K = { id: G, type: $ }, Z = F, J = Nt({
|
|
14497
14482
|
context: Z,
|
|
14498
|
-
values: { ...
|
|
14483
|
+
values: { ...A, ...s }
|
|
14499
14484
|
}), Q = D, Ce = D ? await k.getHandler().evalDomain({
|
|
14500
14485
|
domain: D,
|
|
14501
14486
|
values: Qt({
|
|
14502
14487
|
fields: b,
|
|
14503
|
-
values: { ...
|
|
14488
|
+
values: { ...A, ...s }
|
|
14504
14489
|
}),
|
|
14505
14490
|
fields: b,
|
|
14506
14491
|
context: { ...l, ...J }
|
|
@@ -14520,20 +14505,20 @@ function Hy(e, t) {
|
|
|
14520
14505
|
context: Z,
|
|
14521
14506
|
domain: Q,
|
|
14522
14507
|
fields: b,
|
|
14523
|
-
values:
|
|
14508
|
+
values: A
|
|
14524
14509
|
}
|
|
14525
14510
|
});
|
|
14526
14511
|
}
|
|
14527
14512
|
async function I(O) {
|
|
14528
14513
|
const {
|
|
14529
14514
|
action_id: b,
|
|
14530
|
-
action_type:
|
|
14515
|
+
action_type: A,
|
|
14531
14516
|
res_id: _,
|
|
14532
14517
|
view_id: R,
|
|
14533
14518
|
overrideUnsettedLimit: x = !1,
|
|
14534
14519
|
values: F = {},
|
|
14535
14520
|
domain: D
|
|
14536
|
-
} = O, V = `${
|
|
14521
|
+
} = O, V = `${A},${b}`, N = await k.getHandler().getActionData({
|
|
14537
14522
|
action: V,
|
|
14538
14523
|
context: l
|
|
14539
14524
|
}), L = N.context, B = Nt({
|
|
@@ -14588,7 +14573,7 @@ function Hy(e, t) {
|
|
|
14588
14573
|
target: Q,
|
|
14589
14574
|
initialView: te,
|
|
14590
14575
|
action_id: b,
|
|
14591
|
-
action_type:
|
|
14576
|
+
action_type: A,
|
|
14592
14577
|
res_id: _,
|
|
14593
14578
|
treeExpandable: H,
|
|
14594
14579
|
limit: x && (me === 0 || me === !1) ? jt : me,
|
|
@@ -14599,10 +14584,10 @@ function Hy(e, t) {
|
|
|
14599
14584
|
}
|
|
14600
14585
|
});
|
|
14601
14586
|
}
|
|
14602
|
-
async function
|
|
14587
|
+
async function T({
|
|
14603
14588
|
model: O,
|
|
14604
14589
|
values: b,
|
|
14605
|
-
forced_values:
|
|
14590
|
+
forced_values: A,
|
|
14606
14591
|
initialViewType: _,
|
|
14607
14592
|
res_id: R,
|
|
14608
14593
|
domain: x
|
|
@@ -14611,7 +14596,7 @@ function Hy(e, t) {
|
|
|
14611
14596
|
await y({
|
|
14612
14597
|
action: F,
|
|
14613
14598
|
values: b,
|
|
14614
|
-
forced_values:
|
|
14599
|
+
forced_values: A,
|
|
14615
14600
|
initialViewType: _,
|
|
14616
14601
|
res_id: R,
|
|
14617
14602
|
domain: x
|
|
@@ -14620,7 +14605,7 @@ function Hy(e, t) {
|
|
|
14620
14605
|
async function S(O) {
|
|
14621
14606
|
const {
|
|
14622
14607
|
domain: b,
|
|
14623
|
-
context:
|
|
14608
|
+
context: A,
|
|
14624
14609
|
model: _,
|
|
14625
14610
|
views: R,
|
|
14626
14611
|
title: x,
|
|
@@ -14640,13 +14625,13 @@ function Hy(e, t) {
|
|
|
14640
14625
|
model: _,
|
|
14641
14626
|
type: "form",
|
|
14642
14627
|
id: D.type === "form" ? D.id : void 0,
|
|
14643
|
-
context: { ...l, ...
|
|
14628
|
+
context: { ...l, ...A }
|
|
14644
14629
|
});
|
|
14645
14630
|
d.current.openActionModal({
|
|
14646
14631
|
domain: b,
|
|
14647
14632
|
model: _,
|
|
14648
14633
|
formView: Q,
|
|
14649
|
-
context: { ...l, ...
|
|
14634
|
+
context: { ...l, ...A },
|
|
14650
14635
|
actionData: {
|
|
14651
14636
|
action_id: V,
|
|
14652
14637
|
action_type: N,
|
|
@@ -14667,7 +14652,7 @@ function Hy(e, t) {
|
|
|
14667
14652
|
title: x,
|
|
14668
14653
|
views: R,
|
|
14669
14654
|
model: _,
|
|
14670
|
-
context: { ...
|
|
14655
|
+
context: { ...A, ...l },
|
|
14671
14656
|
domain: b,
|
|
14672
14657
|
setCanWeClose: h,
|
|
14673
14658
|
initialView: Q,
|
|
@@ -14690,7 +14675,7 @@ function Hy(e, t) {
|
|
|
14690
14675
|
openShortcut: I,
|
|
14691
14676
|
openAction: S,
|
|
14692
14677
|
openRelate: w,
|
|
14693
|
-
openDefaultActionForModel:
|
|
14678
|
+
openDefaultActionForModel: T,
|
|
14694
14679
|
tabs: c,
|
|
14695
14680
|
activeKey: r,
|
|
14696
14681
|
onRemoveTab: async (O) => {
|
|
@@ -14830,7 +14815,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14830
14815
|
currentView: v,
|
|
14831
14816
|
currentId: w,
|
|
14832
14817
|
openDefaultActionForModel: I
|
|
14833
|
-
} = h || {},
|
|
14818
|
+
} = h || {}, T = X(() => {
|
|
14834
14819
|
if (!v || !v.view_id || !v.extra)
|
|
14835
14820
|
return;
|
|
14836
14821
|
const { action_id: x, action_type: F } = v.extra || {};
|
|
@@ -14847,9 +14832,9 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14847
14832
|
res_id: V
|
|
14848
14833
|
};
|
|
14849
14834
|
}, [w, v]), S = X(() => {
|
|
14850
|
-
if (
|
|
14851
|
-
return JSON.stringify(
|
|
14852
|
-
}, [
|
|
14835
|
+
if (T)
|
|
14836
|
+
return JSON.stringify(T);
|
|
14837
|
+
}, [T]);
|
|
14853
14838
|
se(() => {
|
|
14854
14839
|
b();
|
|
14855
14840
|
}, [S]);
|
|
@@ -14858,12 +14843,12 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14858
14843
|
(F == null ? void 0 : F.action_type) !== "ir.actions.wizard" && p(F);
|
|
14859
14844
|
}
|
|
14860
14845
|
const b = E(async () => {
|
|
14861
|
-
if (!
|
|
14846
|
+
if (!T)
|
|
14862
14847
|
return;
|
|
14863
|
-
const x = await n(
|
|
14848
|
+
const x = await n(T);
|
|
14864
14849
|
x !== !1 && u(x), l(x !== !1);
|
|
14865
|
-
}, [
|
|
14866
|
-
async function
|
|
14850
|
+
}, [T, n]);
|
|
14851
|
+
async function A() {
|
|
14867
14852
|
var x;
|
|
14868
14853
|
(x = m == null ? void 0 : m.current) == null || x.close(), I == null || I({ model: "ir.ui.view_sc" });
|
|
14869
14854
|
}
|
|
@@ -14929,7 +14914,7 @@ const { useToken: Ky } = He, qv = (e) => {
|
|
|
14929
14914
|
ps,
|
|
14930
14915
|
{
|
|
14931
14916
|
style: { color: d.colorPrimary, cursor: "pointer" },
|
|
14932
|
-
onClick:
|
|
14917
|
+
onClick: A
|
|
14933
14918
|
}
|
|
14934
14919
|
) }) })
|
|
14935
14920
|
] }),
|