@gisce/react-ooui 2.14.0-alpha.2 → 2.14.0
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
|
@@ -334,8 +334,8 @@ const vo = (e) => {
|
|
|
334
334
|
if (p)
|
|
335
335
|
return /* @__PURE__ */ i(ut, {});
|
|
336
336
|
if (l) {
|
|
337
|
-
const
|
|
338
|
-
return
|
|
337
|
+
const x = at(l);
|
|
338
|
+
return x && /* @__PURE__ */ i(x, {});
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
return /* @__PURE__ */ i(Ce, { ooui: t, children: /* @__PURE__ */ i(
|
|
@@ -363,7 +363,7 @@ const vo = (e) => {
|
|
|
363
363
|
context: d,
|
|
364
364
|
readOnly: p
|
|
365
365
|
} = n || {}, h = Z(Le), { executeButtonAction: m } = h || {}, [w, g] = b(!1), { t: y } = he();
|
|
366
|
-
function
|
|
366
|
+
function x() {
|
|
367
367
|
if (w)
|
|
368
368
|
return /* @__PURE__ */ i(ut, {});
|
|
369
369
|
if (f) {
|
|
@@ -405,7 +405,7 @@ const vo = (e) => {
|
|
|
405
405
|
}
|
|
406
406
|
),
|
|
407
407
|
children: [
|
|
408
|
-
|
|
408
|
+
x(),
|
|
409
409
|
s
|
|
410
410
|
]
|
|
411
411
|
}
|
|
@@ -431,7 +431,7 @@ const vo = (e) => {
|
|
|
431
431
|
async function y() {
|
|
432
432
|
g(!0), await o({ type: f, action: a, context: p }), g(!1);
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function x() {
|
|
435
435
|
if (u) {
|
|
436
436
|
rn({
|
|
437
437
|
confirmMessage: u,
|
|
@@ -456,7 +456,7 @@ const vo = (e) => {
|
|
|
456
456
|
Sr.Item,
|
|
457
457
|
{
|
|
458
458
|
disabled: !c || h,
|
|
459
|
-
onClick:
|
|
459
|
+
onClick: x,
|
|
460
460
|
icon: I(),
|
|
461
461
|
danger: m,
|
|
462
462
|
children: l
|
|
@@ -530,9 +530,9 @@ const bo = (e) => {
|
|
|
530
530
|
}, Co = (e) => {
|
|
531
531
|
const { visible: t, onCloseModal: n, model: o, id: r, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = Sn(), { t: c } = he(), [f, u] = b([]), [d, p] = b(!1), [h, m] = b(!1), [w, g] = b({}), y = re();
|
|
532
532
|
fe(() => {
|
|
533
|
-
t ?
|
|
533
|
+
t ? x() : g({});
|
|
534
534
|
}, [t]);
|
|
535
|
-
async function
|
|
535
|
+
async function x() {
|
|
536
536
|
p(!0);
|
|
537
537
|
try {
|
|
538
538
|
const F = await I();
|
|
@@ -556,13 +556,13 @@ const bo = (e) => {
|
|
|
556
556
|
async function O(F) {
|
|
557
557
|
const C = {};
|
|
558
558
|
for (const _ of F) {
|
|
559
|
-
const
|
|
559
|
+
const T = (await k.getHandler().readObjects({
|
|
560
560
|
model: o,
|
|
561
561
|
ids: [r],
|
|
562
562
|
fieldsToRetrieve: [s],
|
|
563
563
|
context: { lang: _.code }
|
|
564
564
|
}))[0];
|
|
565
|
-
C[_.code] =
|
|
565
|
+
C[_.code] = T[s] || "";
|
|
566
566
|
}
|
|
567
567
|
y.current = C, g(C);
|
|
568
568
|
}
|
|
@@ -603,7 +603,7 @@ const bo = (e) => {
|
|
|
603
603
|
}
|
|
604
604
|
m(!1), a();
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function S() {
|
|
607
607
|
return d ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(ie, { children: [
|
|
608
608
|
v(),
|
|
609
609
|
/* @__PURE__ */ i(yn, {}),
|
|
@@ -643,7 +643,7 @@ const bo = (e) => {
|
|
|
643
643
|
footer: null,
|
|
644
644
|
destroyOnClose: !0,
|
|
645
645
|
maskClosable: !1,
|
|
646
|
-
children:
|
|
646
|
+
children: S()
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
};
|
|
@@ -1028,18 +1028,18 @@ const ur = async (e) => {
|
|
|
1028
1028
|
});
|
|
1029
1029
|
const h = d.map((g) => {
|
|
1030
1030
|
const y = {};
|
|
1031
|
-
return Object.keys(g).forEach((
|
|
1032
|
-
(u[a].hasOwnProperty(
|
|
1031
|
+
return Object.keys(g).forEach((x) => {
|
|
1032
|
+
(u[a].hasOwnProperty(x) || x === "id") && (y[x] = g[x]);
|
|
1033
1033
|
}), y;
|
|
1034
1034
|
});
|
|
1035
1035
|
return [
|
|
1036
1036
|
t.map((g) => {
|
|
1037
1037
|
const y = h.find(
|
|
1038
1038
|
(I) => I.id === g.id
|
|
1039
|
-
),
|
|
1039
|
+
), x = {
|
|
1040
1040
|
...g
|
|
1041
1041
|
};
|
|
1042
|
-
return a === "form" ?
|
|
1042
|
+
return a === "form" ? x.values = y : a === "tree" && (x.treeValues = y), x;
|
|
1043
1043
|
}).concat(c),
|
|
1044
1044
|
p
|
|
1045
1045
|
];
|
|
@@ -1111,16 +1111,16 @@ const Ca = (e) => {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
return s ? /* @__PURE__ */ i(Be, {}) : l ? /* @__PURE__ */ i(Xe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(xa, { ooui: t, views: f }) });
|
|
1113
1113
|
}, xa = (e) => {
|
|
1114
|
-
const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, l] = b(!1), [c, f] = b(), [u, d] = b(!1), [p, h] = b(), { relation: m, context: w, readOnly: g, summaryField: y, titleField:
|
|
1114
|
+
const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, l] = b(!1), [c, f] = b(), [u, d] = b(!1), [p, h] = b(), { relation: m, context: w, readOnly: g, summaryField: y, titleField: x } = o, I = s.filter((F) => F.values), O = Z(Le), { getContext: v } = O || {};
|
|
1115
1115
|
bt(() => {
|
|
1116
|
-
|
|
1116
|
+
S();
|
|
1117
1117
|
}, [s]);
|
|
1118
1118
|
const V = (F) => {
|
|
1119
1119
|
r == null || r({
|
|
1120
1120
|
items: F
|
|
1121
1121
|
});
|
|
1122
1122
|
};
|
|
1123
|
-
async function
|
|
1123
|
+
async function S() {
|
|
1124
1124
|
l(!0), f(void 0);
|
|
1125
1125
|
try {
|
|
1126
1126
|
const [F] = await ur({
|
|
@@ -1145,7 +1145,7 @@ const Ca = (e) => {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
return c ? /* @__PURE__ */ i(Xe, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ D(ie, { children: [
|
|
1147
1147
|
/* @__PURE__ */ i(Mn, { style: { padding: "1rem" }, children: I.map((F, C) => {
|
|
1148
|
-
var _,
|
|
1148
|
+
var _, T;
|
|
1149
1149
|
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ D(Mn.Item, { children: [
|
|
1150
1150
|
/* @__PURE__ */ i(
|
|
1151
1151
|
"div",
|
|
@@ -1158,7 +1158,7 @@ const Ca = (e) => {
|
|
|
1158
1158
|
)
|
|
1159
1159
|
), d(!0);
|
|
1160
1160
|
},
|
|
1161
|
-
children: /* @__PURE__ */ i("strong", { children: (_ = F.values) == null ? void 0 : _[
|
|
1161
|
+
children: /* @__PURE__ */ i("strong", { children: (_ = F.values) == null ? void 0 : _[x] })
|
|
1162
1162
|
}
|
|
1163
1163
|
),
|
|
1164
1164
|
/* @__PURE__ */ i("br", {}),
|
|
@@ -1173,7 +1173,7 @@ const Ca = (e) => {
|
|
|
1173
1173
|
)
|
|
1174
1174
|
), d(!0);
|
|
1175
1175
|
},
|
|
1176
|
-
children: (
|
|
1176
|
+
children: (T = F.values) == null ? void 0 : T[y]
|
|
1177
1177
|
}
|
|
1178
1178
|
)
|
|
1179
1179
|
] }, C) }, C);
|
|
@@ -1195,7 +1195,7 @@ const Ca = (e) => {
|
|
|
1195
1195
|
d(!1);
|
|
1196
1196
|
},
|
|
1197
1197
|
readOnly: g,
|
|
1198
|
-
postSaveAction:
|
|
1198
|
+
postSaveAction: S
|
|
1199
1199
|
}
|
|
1200
1200
|
)
|
|
1201
1201
|
] });
|
|
@@ -1553,10 +1553,10 @@ async function _o({
|
|
|
1553
1553
|
limit: d,
|
|
1554
1554
|
view_type: p
|
|
1555
1555
|
} = s, h = p === "tree", m = [];
|
|
1556
|
-
for (const
|
|
1557
|
-
const [I, O] =
|
|
1556
|
+
for (const x of f) {
|
|
1557
|
+
const [I, O] = x;
|
|
1558
1558
|
if (I)
|
|
1559
|
-
m.push(
|
|
1559
|
+
m.push(x);
|
|
1560
1560
|
else {
|
|
1561
1561
|
const { view_id: v } = await k.getHandler().getView({
|
|
1562
1562
|
model: c,
|
|
@@ -1594,20 +1594,20 @@ const Va = (e) => {
|
|
|
1594
1594
|
...h,
|
|
1595
1595
|
...d()
|
|
1596
1596
|
}
|
|
1597
|
-
}), { views:
|
|
1597
|
+
}), { views: x } = y, I = x.find((O) => {
|
|
1598
1598
|
const [, v] = O;
|
|
1599
1599
|
return v === "tree";
|
|
1600
1600
|
});
|
|
1601
1601
|
if (I) {
|
|
1602
1602
|
const [O, v] = I, {
|
|
1603
1603
|
actionId: V,
|
|
1604
|
-
actionType:
|
|
1604
|
+
actionType: S,
|
|
1605
1605
|
title: F,
|
|
1606
1606
|
model: C
|
|
1607
1607
|
} = y;
|
|
1608
1608
|
c({
|
|
1609
1609
|
action_id: V,
|
|
1610
|
-
action_type:
|
|
1610
|
+
action_type: S,
|
|
1611
1611
|
name: F,
|
|
1612
1612
|
res_id: !1,
|
|
1613
1613
|
res_model: C,
|
|
@@ -1848,9 +1848,9 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
1848
1848
|
field: f,
|
|
1849
1849
|
operator: u,
|
|
1850
1850
|
manualIds: d
|
|
1851
|
-
} = e, [p, h] = b(!1), [m, w] = b(), [g, y] = b(), [
|
|
1851
|
+
} = e, [p, h] = b(!1), [m, w] = b(), [g, y] = b(), [x, I] = b(), [O, v] = b(), [V, S] = b(), [F, C] = b(), [_] = Ze(
|
|
1852
1852
|
k.getHandler().searchAllIds
|
|
1853
|
-
), [
|
|
1853
|
+
), [T] = Ze(
|
|
1854
1854
|
k.getHandler().readObjects
|
|
1855
1855
|
), [R] = Ze(
|
|
1856
1856
|
k.getHandler().searchCount
|
|
@@ -1873,7 +1873,7 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
1873
1873
|
params: K,
|
|
1874
1874
|
model: t,
|
|
1875
1875
|
context: o
|
|
1876
|
-
}), ne = await
|
|
1876
|
+
}), ne = await T({
|
|
1877
1877
|
model: t,
|
|
1878
1878
|
ids: q,
|
|
1879
1879
|
fieldsToRetrieve: [f],
|
|
@@ -1896,7 +1896,7 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
1896
1896
|
params: K,
|
|
1897
1897
|
model: t,
|
|
1898
1898
|
context: o
|
|
1899
|
-
}), q = await
|
|
1899
|
+
}), q = await T({
|
|
1900
1900
|
model: t,
|
|
1901
1901
|
ids: P,
|
|
1902
1902
|
fieldsToRetrieve: [f],
|
|
@@ -1944,9 +1944,9 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
1944
1944
|
values: { value: q, percent: P },
|
|
1945
1945
|
context: o
|
|
1946
1946
|
});
|
|
1947
|
-
|
|
1947
|
+
S(ne);
|
|
1948
1948
|
} else
|
|
1949
|
-
|
|
1949
|
+
S(l);
|
|
1950
1950
|
C(void 0);
|
|
1951
1951
|
} catch (q) {
|
|
1952
1952
|
C(JSON.stringify(q));
|
|
@@ -1957,7 +1957,7 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
1957
1957
|
Do,
|
|
1958
1958
|
{
|
|
1959
1959
|
value: m,
|
|
1960
|
-
totalValue:
|
|
1960
|
+
totalValue: x,
|
|
1961
1961
|
percent: g,
|
|
1962
1962
|
color: O,
|
|
1963
1963
|
icon: V,
|
|
@@ -1974,16 +1974,16 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
1974
1974
|
limit: s,
|
|
1975
1975
|
uninformedString: a,
|
|
1976
1976
|
manualIds: l
|
|
1977
|
-
} = e, [c, f] = b(!1), [u, d] = b(), [p, h] = b(), [m, w] = b(), [g, y] = b("line"), [
|
|
1977
|
+
} = e, [c, f] = b(!1), [u, d] = b(), [p, h] = b(), [m, w] = b(), [g, y] = b("line"), [x] = Ze(
|
|
1978
1978
|
k.getHandler().getFields
|
|
1979
1979
|
), [I] = Ze(
|
|
1980
1980
|
k.getHandler().readObjects
|
|
1981
1981
|
), [O] = Ze(k.getHandler().search), v = Q(async () => {
|
|
1982
1982
|
f(!0), d(void 0), y(n.type || "line");
|
|
1983
1983
|
const V = ka({ ooui: n });
|
|
1984
|
-
let
|
|
1984
|
+
let S, F;
|
|
1985
1985
|
try {
|
|
1986
|
-
({ values:
|
|
1986
|
+
({ values: S, fields: F } = await Pa({
|
|
1987
1987
|
model: t,
|
|
1988
1988
|
domain: o,
|
|
1989
1989
|
context: r,
|
|
@@ -1992,7 +1992,7 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
1992
1992
|
fields: V,
|
|
1993
1993
|
manualIds: l,
|
|
1994
1994
|
methods: {
|
|
1995
|
-
getFields:
|
|
1995
|
+
getFields: x,
|
|
1996
1996
|
readObjects: I,
|
|
1997
1997
|
search: O
|
|
1998
1998
|
}
|
|
@@ -2002,7 +2002,7 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
2002
2002
|
return;
|
|
2003
2003
|
}
|
|
2004
2004
|
try {
|
|
2005
|
-
if (!
|
|
2005
|
+
if (!S || !F)
|
|
2006
2006
|
return d("No values or fields returned"), f(!1), {
|
|
2007
2007
|
loading: c,
|
|
2008
2008
|
error: u,
|
|
@@ -2011,10 +2011,10 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
2011
2011
|
evaluatedEntries: m,
|
|
2012
2012
|
fetchData: v
|
|
2013
2013
|
};
|
|
2014
|
-
w(
|
|
2014
|
+
w(S);
|
|
2015
2015
|
const C = Ea({
|
|
2016
2016
|
ooui: n,
|
|
2017
|
-
values:
|
|
2017
|
+
values: S,
|
|
2018
2018
|
fields: F,
|
|
2019
2019
|
options: {
|
|
2020
2020
|
uninformedString: a
|
|
@@ -2031,7 +2031,7 @@ const { getValueForOperator: Nr } = oo, Da = (e) => {
|
|
|
2031
2031
|
o,
|
|
2032
2032
|
u,
|
|
2033
2033
|
m,
|
|
2034
|
-
|
|
2034
|
+
x,
|
|
2035
2035
|
s,
|
|
2036
2036
|
c,
|
|
2037
2037
|
l,
|
|
@@ -2410,15 +2410,15 @@ const Ua = ({
|
|
|
2410
2410
|
currentModel: w,
|
|
2411
2411
|
sorter: g,
|
|
2412
2412
|
setSorter: y,
|
|
2413
|
-
totalItems:
|
|
2413
|
+
totalItems: x,
|
|
2414
2414
|
setTotalItems: I,
|
|
2415
2415
|
setSelectedRowItems: O,
|
|
2416
2416
|
selectedRowItems: v,
|
|
2417
2417
|
searchTreeNameSearch: V,
|
|
2418
|
-
setSearchTreeNameSearch:
|
|
2418
|
+
setSearchTreeNameSearch: S,
|
|
2419
2419
|
goToResourceId: F,
|
|
2420
2420
|
limit: C
|
|
2421
|
-
} = e, [_,
|
|
2421
|
+
} = e, [_, T] = b(!1), [R, M] = b(!1), [A, U] = b(!1), [$, j] = b(!0), [K, P] = b(!0), [q, ne] = b([]), [Y, H] = b(!1), [E, z] = b([]), [N, ae] = b(!1), [X, ve] = b(!0), [se, J] = b(), [ce, me] = b({}), [Ae, ke] = b(
|
|
2422
2422
|
C !== void 0 ? C : Ot
|
|
2423
2423
|
), [_e, De] = b(o);
|
|
2424
2424
|
fe(() => {
|
|
@@ -2451,7 +2451,7 @@ const Ua = ({
|
|
|
2451
2451
|
setCurrentView: r,
|
|
2452
2452
|
availableViews: s,
|
|
2453
2453
|
formIsSaving: _,
|
|
2454
|
-
setFormIsSaving:
|
|
2454
|
+
setFormIsSaving: T,
|
|
2455
2455
|
formHasChanges: R,
|
|
2456
2456
|
setFormHasChanges: M,
|
|
2457
2457
|
formRef: a,
|
|
@@ -2483,10 +2483,10 @@ const Ua = ({
|
|
|
2483
2483
|
setSearchVisible: ae,
|
|
2484
2484
|
sorter: g,
|
|
2485
2485
|
setSorter: y,
|
|
2486
|
-
totalItems:
|
|
2486
|
+
totalItems: x,
|
|
2487
2487
|
setTotalItems: I,
|
|
2488
2488
|
searchTreeNameSearch: V,
|
|
2489
|
-
setSearchTreeNameSearch:
|
|
2489
|
+
setSearchTreeNameSearch: S,
|
|
2490
2490
|
setGraphIsLoading: ve,
|
|
2491
2491
|
graphIsLoading: X,
|
|
2492
2492
|
previousView: se,
|
|
@@ -2619,7 +2619,7 @@ const Tf = Object.values(sn), qa = (e) => {
|
|
|
2619
2619
|
switch (d.type) {
|
|
2620
2620
|
case "indicatorField":
|
|
2621
2621
|
case "indicator": {
|
|
2622
|
-
const { value: h, total: m, percent: w, icon: g, color: y, suffix:
|
|
2622
|
+
const { value: h, total: m, percent: w, icon: g, color: y, suffix: x } = d;
|
|
2623
2623
|
return /* @__PURE__ */ i(
|
|
2624
2624
|
Do,
|
|
2625
2625
|
{
|
|
@@ -2628,7 +2628,7 @@ const Tf = Object.values(sn), qa = (e) => {
|
|
|
2628
2628
|
percent: w,
|
|
2629
2629
|
color: y,
|
|
2630
2630
|
icon: g,
|
|
2631
|
-
suffix:
|
|
2631
|
+
suffix: x,
|
|
2632
2632
|
showPercent: ko(w)
|
|
2633
2633
|
}
|
|
2634
2634
|
);
|
|
@@ -2959,7 +2959,7 @@ const Rt = ({
|
|
|
2959
2959
|
bt(() => {
|
|
2960
2960
|
I();
|
|
2961
2961
|
}, [r]);
|
|
2962
|
-
const
|
|
2962
|
+
const x = (V) => {
|
|
2963
2963
|
o == null || o({
|
|
2964
2964
|
items: V
|
|
2965
2965
|
});
|
|
@@ -2987,37 +2987,37 @@ const Rt = ({
|
|
|
2987
2987
|
context: { ...y == null ? void 0 : y(), ...h }
|
|
2988
2988
|
})).map((C) => {
|
|
2989
2989
|
const _ = C[w];
|
|
2990
|
-
let
|
|
2991
|
-
return Array.isArray(_) && (
|
|
2990
|
+
let T = _;
|
|
2991
|
+
return Array.isArray(_) && (T = _[1]), { label: T, value: C.id };
|
|
2992
2992
|
});
|
|
2993
2993
|
l(F);
|
|
2994
|
-
} catch (
|
|
2995
|
-
f(
|
|
2994
|
+
} catch (S) {
|
|
2995
|
+
f(S);
|
|
2996
2996
|
} finally {
|
|
2997
2997
|
d(!1);
|
|
2998
2998
|
}
|
|
2999
2999
|
}
|
|
3000
3000
|
const O = (V) => {
|
|
3001
|
-
const
|
|
3001
|
+
const S = r.map((C) => V.includes(C.id) ? C.operation === "pendingRemove" ? {
|
|
3002
3002
|
...C,
|
|
3003
3003
|
operation: "pendingLink"
|
|
3004
|
-
} : C : { id: C.id, operation: "pendingRemove" }), F =
|
|
3004
|
+
} : C : { id: C.id, operation: "pendingRemove" }), F = S.map((C) => C.id);
|
|
3005
3005
|
V.filter((C) => !F.includes(C)).forEach((C) => {
|
|
3006
|
-
|
|
3007
|
-
}),
|
|
3006
|
+
S.push({ id: C, operation: "pendingLink" });
|
|
3007
|
+
}), x(S);
|
|
3008
3008
|
}, v = (V) => {
|
|
3009
|
-
const { label:
|
|
3009
|
+
const { label: S, closable: F, onClose: C } = V, _ = (R) => {
|
|
3010
3010
|
R.preventDefault(), R.stopPropagation();
|
|
3011
|
-
},
|
|
3011
|
+
}, T = en(S);
|
|
3012
3012
|
return /* @__PURE__ */ i(
|
|
3013
3013
|
pr,
|
|
3014
3014
|
{
|
|
3015
|
-
color:
|
|
3015
|
+
color: T,
|
|
3016
3016
|
onMouseDown: _,
|
|
3017
3017
|
closable: F,
|
|
3018
3018
|
onClose: C,
|
|
3019
|
-
closeIcon: /* @__PURE__ */ i("span", { style: { color:
|
|
3020
|
-
children:
|
|
3019
|
+
closeIcon: /* @__PURE__ */ i("span", { style: { color: T }, children: "X" }),
|
|
3020
|
+
children: S
|
|
3021
3021
|
}
|
|
3022
3022
|
);
|
|
3023
3023
|
};
|
|
@@ -3032,7 +3032,7 @@ const Rt = ({
|
|
|
3032
3032
|
options: a,
|
|
3033
3033
|
onChange: O,
|
|
3034
3034
|
loading: u,
|
|
3035
|
-
filterOption: (V,
|
|
3035
|
+
filterOption: (V, S) => S.label.toLowerCase().includes(V.toString())
|
|
3036
3036
|
}
|
|
3037
3037
|
) }) });
|
|
3038
3038
|
}, fl = (e) => {
|
|
@@ -3199,7 +3199,6 @@ const Rt = ({
|
|
|
3199
3199
|
}), f = o.length === 1 ? yl(l, r) : wl(r, a);
|
|
3200
3200
|
return /* @__PURE__ */ i("div", { style: {
|
|
3201
3201
|
display: "grid",
|
|
3202
|
-
alignItems: "center",
|
|
3203
3202
|
gridTemplateColumns: n ? "auto" : f,
|
|
3204
3203
|
gap: "1rem",
|
|
3205
3204
|
minHeight: 0,
|
|
@@ -3262,8 +3261,8 @@ const Rt = ({
|
|
|
3262
3261
|
context: {}
|
|
3263
3262
|
}
|
|
3264
3263
|
);
|
|
3265
|
-
async function g(
|
|
3266
|
-
const { reportData: F, fields: C, values: _, context:
|
|
3264
|
+
async function g(S) {
|
|
3265
|
+
const { reportData: F, fields: C, values: _, context: T = {} } = S, {
|
|
3267
3266
|
context: R,
|
|
3268
3267
|
model: M,
|
|
3269
3268
|
datas: A = {},
|
|
@@ -3285,7 +3284,7 @@ const Rt = ({
|
|
|
3285
3284
|
name: U,
|
|
3286
3285
|
datas: A,
|
|
3287
3286
|
ids: K,
|
|
3288
|
-
context: { ...
|
|
3287
|
+
context: { ...T, ...P }
|
|
3289
3288
|
});
|
|
3290
3289
|
l(!0), s.current = !0, r.current = setInterval(() => {
|
|
3291
3290
|
y(q);
|
|
@@ -3294,11 +3293,11 @@ const Rt = ({
|
|
|
3294
3293
|
s.current = !1, clearInterval(r.current), et(q), l(!1);
|
|
3295
3294
|
}
|
|
3296
3295
|
}
|
|
3297
|
-
async function y(
|
|
3296
|
+
async function y(S) {
|
|
3298
3297
|
let F;
|
|
3299
3298
|
try {
|
|
3300
3299
|
if (F = await k.getHandler().getReport({
|
|
3301
|
-
id:
|
|
3300
|
+
id: S
|
|
3302
3301
|
}), F.state && s.current === !0) {
|
|
3303
3302
|
s.current = !1, clearInterval(r.current), l(!1);
|
|
3304
3303
|
const C = await Nt(F.result);
|
|
@@ -3308,109 +3307,109 @@ const Rt = ({
|
|
|
3308
3307
|
s.current = !1, clearInterval(r.current), l(!1), et(C.exception || C);
|
|
3309
3308
|
}
|
|
3310
3309
|
}
|
|
3311
|
-
async function
|
|
3312
|
-
actionData:
|
|
3310
|
+
async function x({
|
|
3311
|
+
actionData: S,
|
|
3313
3312
|
fields: F,
|
|
3314
3313
|
values: C,
|
|
3315
3314
|
context: _,
|
|
3316
|
-
onRefreshParentValues:
|
|
3315
|
+
onRefreshParentValues: T
|
|
3317
3316
|
}) {
|
|
3318
|
-
const { type: R } =
|
|
3319
|
-
if (u.current.push(
|
|
3317
|
+
const { type: R } = S;
|
|
3318
|
+
if (u.current.push(T), R === "ir.actions.report.xml")
|
|
3320
3319
|
return await g({
|
|
3321
|
-
reportData:
|
|
3320
|
+
reportData: S,
|
|
3322
3321
|
fields: F,
|
|
3323
3322
|
values: C,
|
|
3324
3323
|
context: _
|
|
3325
3324
|
});
|
|
3326
3325
|
if (R === "ir.actions.act_window")
|
|
3327
|
-
return await I({ actionData:
|
|
3326
|
+
return await I({ actionData: S, fields: F, values: C, context: _ });
|
|
3328
3327
|
if (R === "ir.actions.act_url")
|
|
3329
3328
|
window.open(
|
|
3330
|
-
ll(
|
|
3329
|
+
ll(S.url, { ...C, context: _ }),
|
|
3331
3330
|
"_blank"
|
|
3332
3331
|
);
|
|
3333
3332
|
else
|
|
3334
3333
|
return et(`${R} action not supported`), {};
|
|
3335
3334
|
}
|
|
3336
3335
|
async function I({
|
|
3337
|
-
actionData:
|
|
3336
|
+
actionData: S,
|
|
3338
3337
|
fields: F = {},
|
|
3339
3338
|
values: C = {},
|
|
3340
3339
|
context: _ = {}
|
|
3341
3340
|
}) {
|
|
3342
3341
|
var U;
|
|
3343
|
-
let
|
|
3344
|
-
|
|
3342
|
+
let T = S;
|
|
3343
|
+
S.res_model || (T = (await k.getHandler().readObjects({
|
|
3345
3344
|
model: "ir.actions.act_window",
|
|
3346
|
-
ids: [parseInt(
|
|
3345
|
+
ids: [parseInt(S.id)],
|
|
3347
3346
|
context: _
|
|
3348
3347
|
}))[0]);
|
|
3349
|
-
const R = typeof (
|
|
3350
|
-
context:
|
|
3348
|
+
const R = typeof (T == null ? void 0 : T.context) == "string" ? St({
|
|
3349
|
+
context: T.context,
|
|
3351
3350
|
fields: F,
|
|
3352
3351
|
values: { ...C, ...o }
|
|
3353
|
-
}) :
|
|
3352
|
+
}) : T.context, M = {
|
|
3354
3353
|
..._,
|
|
3355
3354
|
...R
|
|
3356
3355
|
};
|
|
3357
3356
|
let A = [];
|
|
3358
|
-
if (
|
|
3359
|
-
domain:
|
|
3357
|
+
if (T.domain && (A = await k.getHandler().evalDomain({
|
|
3358
|
+
domain: T.domain,
|
|
3360
3359
|
values: Rt({
|
|
3361
3360
|
fields: F,
|
|
3362
3361
|
values: { ...C, ...o }
|
|
3363
3362
|
}),
|
|
3364
3363
|
fields: F,
|
|
3365
3364
|
context: M
|
|
3366
|
-
})),
|
|
3365
|
+
})), T.target === "new") {
|
|
3367
3366
|
const $ = await k.getHandler().getView({
|
|
3368
|
-
model:
|
|
3367
|
+
model: T.res_model,
|
|
3369
3368
|
type: "form",
|
|
3370
|
-
id: ((U =
|
|
3369
|
+
id: ((U = T == null ? void 0 : T.view_id) == null ? void 0 : U[0]) || void 0,
|
|
3371
3370
|
context: M
|
|
3372
3371
|
});
|
|
3373
3372
|
return O({
|
|
3374
3373
|
domain: A,
|
|
3375
|
-
model:
|
|
3374
|
+
model: T.res_model,
|
|
3376
3375
|
formView: $,
|
|
3377
3376
|
context: M
|
|
3378
3377
|
}), {};
|
|
3379
3378
|
} else {
|
|
3380
3379
|
const { initialView: $, views: j } = await Ol({
|
|
3381
|
-
model:
|
|
3380
|
+
model: T.res_model,
|
|
3382
3381
|
context: M,
|
|
3383
|
-
view_mode:
|
|
3384
|
-
views:
|
|
3382
|
+
view_mode: T.view_mode,
|
|
3383
|
+
views: T.views
|
|
3385
3384
|
});
|
|
3386
3385
|
return f == null || f({
|
|
3387
3386
|
target: "current",
|
|
3388
3387
|
context: M,
|
|
3389
3388
|
domain: A,
|
|
3390
|
-
model:
|
|
3389
|
+
model: T.res_model,
|
|
3391
3390
|
views: j,
|
|
3392
|
-
title:
|
|
3391
|
+
title: T.name,
|
|
3393
3392
|
initialView: $,
|
|
3394
|
-
action_id:
|
|
3395
|
-
action_type:
|
|
3393
|
+
action_id: T.id,
|
|
3394
|
+
action_type: T.type
|
|
3396
3395
|
}), { closeParent: !0 };
|
|
3397
3396
|
}
|
|
3398
3397
|
}
|
|
3399
3398
|
function O({
|
|
3400
|
-
domain:
|
|
3399
|
+
domain: S,
|
|
3401
3400
|
model: F,
|
|
3402
3401
|
formView: C,
|
|
3403
3402
|
context: _,
|
|
3404
|
-
actionData:
|
|
3403
|
+
actionData: T
|
|
3405
3404
|
}) {
|
|
3406
|
-
p ? v({ domain:
|
|
3405
|
+
p ? v({ domain: S, model: F, formView: C, context: _, actionData: T }) : (w({ domain: S, model: F, context: _, formView: C, actionData: T }), h(!0));
|
|
3407
3406
|
}
|
|
3408
3407
|
async function v({
|
|
3409
|
-
domain:
|
|
3408
|
+
domain: S,
|
|
3410
3409
|
model: F,
|
|
3411
3410
|
formView: C,
|
|
3412
3411
|
context: _,
|
|
3413
|
-
actionData:
|
|
3412
|
+
actionData: T
|
|
3414
3413
|
}) {
|
|
3415
3414
|
w({
|
|
3416
3415
|
domain: void 0,
|
|
@@ -3418,7 +3417,7 @@ const Rt = ({
|
|
|
3418
3417
|
context: {},
|
|
3419
3418
|
formView: void 0,
|
|
3420
3419
|
actionData: void 0
|
|
3421
|
-
}), h(!1), await new Promise((R) => setTimeout(R, 300)), w({ domain:
|
|
3420
|
+
}), h(!1), await new Promise((R) => setTimeout(R, 300)), w({ domain: S, model: F, context: _, formView: C, actionData: T }), h(!0);
|
|
3422
3421
|
}
|
|
3423
3422
|
async function V() {
|
|
3424
3423
|
jr(u.current), u.current = [], h(!1), w({
|
|
@@ -3433,7 +3432,7 @@ const Rt = ({
|
|
|
3433
3432
|
Kt.Provider,
|
|
3434
3433
|
{
|
|
3435
3434
|
value: {
|
|
3436
|
-
processAction:
|
|
3435
|
+
processAction: x,
|
|
3437
3436
|
globalValues: o
|
|
3438
3437
|
},
|
|
3439
3438
|
children: /* @__PURE__ */ D(ie, { children: [
|
|
@@ -3551,14 +3550,14 @@ function _l(e, t) {
|
|
|
3551
3550
|
postSaveAction: w,
|
|
3552
3551
|
insideButtonModal: g = !1,
|
|
3553
3552
|
parentContext: y = {},
|
|
3554
|
-
actionDomain:
|
|
3553
|
+
actionDomain: x,
|
|
3555
3554
|
visible: I = !0,
|
|
3556
3555
|
rootForm: O = !1,
|
|
3557
3556
|
defaultValues: v,
|
|
3558
3557
|
forcedValues: V = {},
|
|
3559
|
-
parentWidth:
|
|
3558
|
+
parentWidth: S,
|
|
3560
3559
|
onMustRefreshParent: F
|
|
3561
|
-
} = e, { t: C } = he(), [_,
|
|
3560
|
+
} = e, { t: C } = he(), [_, T] = b(!1), [R, M] = b(), [A, U] = b(), [$] = dt.useForm(), [j, K] = b(), [P, q] = b(), ne = Z(Ho), [Y, H] = b(), [E, z] = b(!1), N = re(), ae = re({}), X = re({}), ve = re(!1), se = re(!1), J = re(!1), me = (S !== void 0 ? S : Y) < Vl, Ae = Z(Le), { activeId: ke, getPlainValues: _e } = Ae || {}, De = re(!1), We = Z(
|
|
3562
3561
|
rt
|
|
3563
3562
|
), {
|
|
3564
3563
|
setFormIsSaving: ye = void 0,
|
|
@@ -3699,7 +3698,7 @@ function _l(e, t) {
|
|
|
3699
3698
|
pe == null || pe(!0), M(void 0), L != null && L.fields ? (te = L.fields, oe = L.arch) : (te = P, oe = j), h && (L == null ? void 0 : L.forceRefresh) !== !0 ? B = h : { values: B, defaultGetCalled: we } = await di({
|
|
3700
3699
|
fields: te,
|
|
3701
3700
|
arch: oe
|
|
3702
|
-
}),
|
|
3701
|
+
}), x && (B = { ...sl(x), ...B }), ae.current = Dt(B, te), qt({
|
|
3703
3702
|
values: B,
|
|
3704
3703
|
fields: te,
|
|
3705
3704
|
reset: !0,
|
|
@@ -3825,13 +3824,13 @@ function _l(e, t) {
|
|
|
3825
3824
|
return se.current = !1, le == null || le(!1), xe == null || xe(), { succeed: !0, id: de() };
|
|
3826
3825
|
if (await Yt())
|
|
3827
3826
|
return se.current = !1, Br(C), { succeed: !1, id: de() };
|
|
3828
|
-
|
|
3827
|
+
T(!0), ye == null || ye(!0);
|
|
3829
3828
|
try {
|
|
3830
3829
|
p === "api" ? await vr(L) : await ui(L), d && (N.current = void 0, qt({ values: {}, fields: P, reset: !0 })), await Ge({ forceRefresh: !0 }), B = !0, _n.success(C("savedRegisters"));
|
|
3831
3830
|
} catch (oe) {
|
|
3832
|
-
se.current = !1,
|
|
3831
|
+
se.current = !1, T(!1), ye == null || ye(!1), Ke == null || Ke(oe), _n.error(C("errorWhileSavingForm")), M(oe != null && oe.message ? oe.message : oe);
|
|
3833
3832
|
} finally {
|
|
3834
|
-
se.current = !1, ye == null || ye(!1),
|
|
3833
|
+
se.current = !1, ye == null || ye(!1), T(!1);
|
|
3835
3834
|
}
|
|
3836
3835
|
return { succeed: B, id: de() };
|
|
3837
3836
|
}, br = ({
|
|
@@ -4073,7 +4072,7 @@ function _l(e, t) {
|
|
|
4073
4072
|
getValues: W,
|
|
4074
4073
|
getPlainValues: ue,
|
|
4075
4074
|
getFields: ot,
|
|
4076
|
-
domain:
|
|
4075
|
+
domain: x,
|
|
4077
4076
|
activeId: o,
|
|
4078
4077
|
activeModel: n,
|
|
4079
4078
|
setFieldValue: ft,
|
|
@@ -4158,7 +4157,7 @@ const Wt = ht(_l), Ut = (e) => {
|
|
|
4158
4157
|
isMenuAction: a = !1,
|
|
4159
4158
|
actionData: l,
|
|
4160
4159
|
...c
|
|
4161
|
-
} = e, { model: f } = c, { modalWidth: u } = Sn(), [d, p] = b(o), [h, m] = b(!1), [w, g] = b(), { action_id: y, res_id:
|
|
4160
|
+
} = e, { model: f } = c, { modalWidth: u } = Sn(), [d, p] = b(o), [h, m] = b(!1), [w, g] = b(), { action_id: y, res_id: x, action_type: I, view_id: O } = l || {};
|
|
4162
4161
|
fe(() => {
|
|
4163
4162
|
a && v();
|
|
4164
4163
|
}, [l, a]);
|
|
@@ -4167,7 +4166,7 @@ const Wt = ht(_l), Ut = (e) => {
|
|
|
4167
4166
|
action_id: y,
|
|
4168
4167
|
action_type: I,
|
|
4169
4168
|
view_id: O,
|
|
4170
|
-
res_id:
|
|
4169
|
+
res_id: x || !1
|
|
4171
4170
|
});
|
|
4172
4171
|
m(C !== !1), C !== !1 && g(C);
|
|
4173
4172
|
}
|
|
@@ -4177,17 +4176,17 @@ const Wt = ht(_l), Ut = (e) => {
|
|
|
4177
4176
|
shortcut_id: w
|
|
4178
4177
|
});
|
|
4179
4178
|
else {
|
|
4180
|
-
const { action_id: C, res_id: _, action_type:
|
|
4179
|
+
const { action_id: C, res_id: _, action_type: T, view_id: R } = l;
|
|
4181
4180
|
await k.getHandler().addFavourite({
|
|
4182
4181
|
action_id: C,
|
|
4183
|
-
action_type:
|
|
4182
|
+
action_type: T,
|
|
4184
4183
|
view_id: R,
|
|
4185
4184
|
res_id: _ || !1
|
|
4186
4185
|
});
|
|
4187
4186
|
}
|
|
4188
4187
|
m(!h);
|
|
4189
4188
|
}
|
|
4190
|
-
function
|
|
4189
|
+
function S() {
|
|
4191
4190
|
return /* @__PURE__ */ D(Ve, { align: "middle", children: [
|
|
4192
4191
|
/* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(
|
|
4193
4192
|
Pe,
|
|
@@ -4205,7 +4204,7 @@ const Wt = ht(_l), Ut = (e) => {
|
|
|
4205
4204
|
return /* @__PURE__ */ i(Tl, { setTitle: p, children: /* @__PURE__ */ i(
|
|
4206
4205
|
tt,
|
|
4207
4206
|
{
|
|
4208
|
-
title: a ?
|
|
4207
|
+
title: a ? S() : d,
|
|
4209
4208
|
centered: !0,
|
|
4210
4209
|
width: u,
|
|
4211
4210
|
open: t,
|
|
@@ -4223,7 +4222,7 @@ const Wt = ht(_l), Ut = (e) => {
|
|
|
4223
4222
|
parentWidth: F,
|
|
4224
4223
|
...c
|
|
4225
4224
|
},
|
|
4226
|
-
`${f}-${n}-${y}-${
|
|
4225
|
+
`${f}-${n}-${y}-${x}-${I}-${O}-${o}`
|
|
4227
4226
|
)
|
|
4228
4227
|
}
|
|
4229
4228
|
) });
|
|
@@ -4597,36 +4596,36 @@ function jo(e) {
|
|
|
4597
4596
|
searchError: d,
|
|
4598
4597
|
searchValues: p,
|
|
4599
4598
|
showLimitOptions: h = !0
|
|
4600
|
-
} = e, [m, w] = b(), [g, y] = b(), [
|
|
4599
|
+
} = e, [m, w] = b(), [g, y] = b(), [x, I] = b(!1), O = re(), { token: v } = tc(), [V] = dt.useForm();
|
|
4601
4600
|
fe(() => {
|
|
4602
4601
|
V.setFieldsValue(p);
|
|
4603
4602
|
}, [p]);
|
|
4604
|
-
const
|
|
4603
|
+
const S = () => {
|
|
4605
4604
|
if (!g)
|
|
4606
4605
|
return;
|
|
4607
|
-
const _ =
|
|
4608
|
-
return
|
|
4606
|
+
const _ = x ? g : m, T = _ == null ? void 0 : _.rows;
|
|
4607
|
+
return T == null ? void 0 : T.map((R, M) => /* @__PURE__ */ i(Ve, { children: R.map((A, U) => /* @__PURE__ */ i(ge, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(Wl, { field: A }) }, U)) }, M));
|
|
4609
4608
|
};
|
|
4610
4609
|
bt(() => {
|
|
4611
4610
|
I(!1), O.current = new Hi(n, t), O.current.parse(), w(O.current._simpleSearchContainer), y(O.current._advancedSearchContainer);
|
|
4612
4611
|
}, [t, n]);
|
|
4613
|
-
const F =
|
|
4612
|
+
const F = S(), C = (_) => {
|
|
4614
4613
|
var A;
|
|
4615
|
-
const { limit:
|
|
4614
|
+
const { limit: T, offset: R } = _;
|
|
4616
4615
|
delete _.offset, delete _.limit;
|
|
4617
4616
|
const M = Yl(
|
|
4618
4617
|
_,
|
|
4619
4618
|
(A = O.current) == null ? void 0 : A._advancedSearchContainer
|
|
4620
4619
|
);
|
|
4621
|
-
r({ params: M, offset: R, limit:
|
|
4620
|
+
r({ params: M, offset: R, limit: T, searchValues: _ });
|
|
4622
4621
|
};
|
|
4623
4622
|
return /* @__PURE__ */ i(
|
|
4624
4623
|
lr,
|
|
4625
4624
|
{
|
|
4626
4625
|
bounds: !0,
|
|
4627
4626
|
onResize: (_) => {
|
|
4628
|
-
var
|
|
4629
|
-
u == null || u((
|
|
4627
|
+
var T;
|
|
4628
|
+
u == null || u((T = _.bounds) == null ? void 0 : T.height);
|
|
4630
4629
|
},
|
|
4631
4630
|
children: ({ measureRef: _ }) => /* @__PURE__ */ i("div", { ref: _, children: /* @__PURE__ */ D("div", { style: { display: f ? "block" : "none" }, children: [
|
|
4632
4631
|
/* @__PURE__ */ D(
|
|
@@ -4639,13 +4638,13 @@ function jo(e) {
|
|
|
4639
4638
|
initialValues: { offset: a, limit: l },
|
|
4640
4639
|
children: [
|
|
4641
4640
|
F,
|
|
4642
|
-
|
|
4641
|
+
x && h && /* @__PURE__ */ i(Gl, { onLimitChange: c }),
|
|
4643
4642
|
/* @__PURE__ */ i(
|
|
4644
4643
|
Ul,
|
|
4645
4644
|
{
|
|
4646
|
-
advancedFilter:
|
|
4645
|
+
advancedFilter: x,
|
|
4647
4646
|
onAdvancedFilterToggle: () => {
|
|
4648
|
-
I(!
|
|
4647
|
+
I(!x);
|
|
4649
4648
|
},
|
|
4650
4649
|
onClear: () => {
|
|
4651
4650
|
V.resetFields(), o();
|
|
@@ -4890,7 +4889,7 @@ const sc = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Wo,
|
|
|
4890
4889
|
}, [o, p, t, n, m]);
|
|
4891
4890
|
if (!t)
|
|
4892
4891
|
return null;
|
|
4893
|
-
function
|
|
4892
|
+
function x({ item: I, type: O }) {
|
|
4894
4893
|
const v = {
|
|
4895
4894
|
values: a,
|
|
4896
4895
|
fields: r.fields
|
|
@@ -4926,7 +4925,7 @@ const sc = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Wo,
|
|
|
4926
4925
|
lc,
|
|
4927
4926
|
{
|
|
4928
4927
|
onRetrieveData: y,
|
|
4929
|
-
onItemClick:
|
|
4928
|
+
onItemClick: x,
|
|
4930
4929
|
onOpenChange: (I) => {
|
|
4931
4930
|
I || g();
|
|
4932
4931
|
}
|
|
@@ -5197,13 +5196,13 @@ const sc = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Wo,
|
|
|
5197
5196
|
statusForResults: w = {},
|
|
5198
5197
|
onChangeSort: g,
|
|
5199
5198
|
sorter: y,
|
|
5200
|
-
onFetchChildrenForRecord:
|
|
5199
|
+
onFetchChildrenForRecord: x,
|
|
5201
5200
|
childField: I,
|
|
5202
5201
|
rootTree: O = !1,
|
|
5203
5202
|
context: v,
|
|
5204
5203
|
readonly: V,
|
|
5205
|
-
onSelectAllRecords:
|
|
5206
|
-
} = e, F = re(null), [C, _] = b([]),
|
|
5204
|
+
onSelectAllRecords: S
|
|
5205
|
+
} = e, F = re(null), [C, _] = b([]), T = re(!1), [R, M] = b(), { t: A } = he(), U = re(o), $ = Z(
|
|
5207
5206
|
rt
|
|
5208
5207
|
), { title: j = void 0, setTitle: K = void 0 } = (O ? $ : {}) || {}, P = Ie(() => {
|
|
5209
5208
|
if (R)
|
|
@@ -5226,7 +5225,7 @@ const sc = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Wo,
|
|
|
5226
5225
|
}, [s, j]), fe(() => {
|
|
5227
5226
|
if (!R)
|
|
5228
5227
|
return;
|
|
5229
|
-
|
|
5228
|
+
T.current = !1;
|
|
5230
5229
|
const X = dr(R, a);
|
|
5231
5230
|
_(X);
|
|
5232
5231
|
}, [a]), fe(() => {
|
|
@@ -5239,7 +5238,7 @@ const sc = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Wo,
|
|
|
5239
5238
|
(ve) => d && d.includes(ve.id)
|
|
5240
5239
|
).length;
|
|
5241
5240
|
return c ? null : r === void 0 ? /* @__PURE__ */ i(Be, { className: "pb-4" }) : /* @__PURE__ */ D(Ve, { align: "bottom", className: "pb-4", children: [
|
|
5242
|
-
/* @__PURE__ */ i(ge, { span:
|
|
5241
|
+
/* @__PURE__ */ i(ge, { span: S ? 8 : 12, children: /* @__PURE__ */ i(
|
|
5243
5242
|
Di,
|
|
5244
5243
|
{
|
|
5245
5244
|
total: r,
|
|
@@ -5249,23 +5248,23 @@ const sc = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Wo,
|
|
|
5249
5248
|
onChange: l
|
|
5250
5249
|
}
|
|
5251
5250
|
) }),
|
|
5252
|
-
|
|
5251
|
+
S && /* @__PURE__ */ i(ge, { span: 8, className: "text-center", children: /* @__PURE__ */ i(
|
|
5253
5252
|
oc,
|
|
5254
5253
|
{
|
|
5255
5254
|
numberOfVisibleSelectedRows: X,
|
|
5256
5255
|
numberOfRealSelectedRows: (d == null ? void 0 : d.length) || 0,
|
|
5257
5256
|
numberOfTotalRows: C.length,
|
|
5258
5257
|
totalRecords: r || 0,
|
|
5259
|
-
onSelectAllRecords:
|
|
5258
|
+
onSelectAllRecords: S
|
|
5260
5259
|
}
|
|
5261
5260
|
) }),
|
|
5262
|
-
/* @__PURE__ */ i(ge, { span:
|
|
5261
|
+
/* @__PURE__ */ i(ge, { span: S ? 8 : 12, className: "text-right", children: Y })
|
|
5263
5262
|
] });
|
|
5264
5263
|
}, [
|
|
5265
5264
|
C,
|
|
5266
5265
|
c,
|
|
5267
5266
|
l,
|
|
5268
|
-
|
|
5267
|
+
S,
|
|
5269
5268
|
n,
|
|
5270
5269
|
d,
|
|
5271
5270
|
u,
|
|
@@ -5311,11 +5310,11 @@ const sc = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Wo,
|
|
|
5311
5310
|
onChangeSort: g,
|
|
5312
5311
|
sorter: y,
|
|
5313
5312
|
readonly: V,
|
|
5314
|
-
expandableOpts:
|
|
5313
|
+
expandableOpts: x ? {
|
|
5315
5314
|
expandIcon: Yi,
|
|
5316
5315
|
collapseIcon: qi,
|
|
5317
5316
|
loadingIcon: ut,
|
|
5318
|
-
onFetchChildrenForRecord:
|
|
5317
|
+
onFetchChildrenForRecord: x,
|
|
5319
5318
|
childField: I
|
|
5320
5319
|
} : void 0
|
|
5321
5320
|
}
|
|
@@ -5345,14 +5344,14 @@ const qo = (e) => {
|
|
|
5345
5344
|
setCurrentItemIndex: w,
|
|
5346
5345
|
setResultsActionView: g,
|
|
5347
5346
|
resultsActionView: y,
|
|
5348
|
-
domain:
|
|
5347
|
+
domain: x,
|
|
5349
5348
|
currentId: I,
|
|
5350
5349
|
limit: O,
|
|
5351
5350
|
setLimit: v,
|
|
5352
5351
|
searchParams: V = [],
|
|
5353
|
-
setSearchValues:
|
|
5352
|
+
setSearchValues: S,
|
|
5354
5353
|
clearSelection: F
|
|
5355
|
-
} = e, [C, _] = b(!1), [
|
|
5354
|
+
} = e, [C, _] = b(!1), [T, R] = b(!1), [M, A] = b(), [U, $] = b(1), [j, K] = b(0), [P, q] = b(), [ne, Y] = b([]), [H, E] = b(void 0), [z, N] = b(void 0), ae = re(O || Ot), X = re([]), ve = Q(
|
|
5356
5355
|
(le) => {
|
|
5357
5356
|
g == null || g([...le]), Y([...le]);
|
|
5358
5357
|
},
|
|
@@ -5362,7 +5361,7 @@ const qo = (e) => {
|
|
|
5362
5361
|
model: t,
|
|
5363
5362
|
payload: l,
|
|
5364
5363
|
limit: ae.current,
|
|
5365
|
-
attrs:
|
|
5364
|
+
attrs: x,
|
|
5366
5365
|
context: f
|
|
5367
5366
|
});
|
|
5368
5367
|
if (q(le.length), u == null || u(le.length), le.length > 0) {
|
|
@@ -5392,7 +5391,7 @@ const qo = (e) => {
|
|
|
5392
5391
|
l,
|
|
5393
5392
|
t,
|
|
5394
5393
|
f,
|
|
5395
|
-
|
|
5394
|
+
x,
|
|
5396
5395
|
d,
|
|
5397
5396
|
p,
|
|
5398
5397
|
h,
|
|
@@ -5400,7 +5399,7 @@ const qo = (e) => {
|
|
|
5400
5399
|
u
|
|
5401
5400
|
]), ce = Q(
|
|
5402
5401
|
async (le) => {
|
|
5403
|
-
const { params: Oe, newOffset: pe } = le || {}, Fe = tn(Oe || V,
|
|
5402
|
+
const { params: Oe, newOffset: pe } = le || {}, Fe = tn(Oe || V, x), { colors: G, status: Se } = Tt(d), Re = {};
|
|
5404
5403
|
G && (Re.colors = G), Se && (Re.status = Se);
|
|
5405
5404
|
const { totalItems: He, results: Me, attrsEvaluated: ee } = await k.getHandler().searchForTree({
|
|
5406
5405
|
params: Fe,
|
|
@@ -5435,7 +5434,7 @@ const qo = (e) => {
|
|
|
5435
5434
|
I,
|
|
5436
5435
|
t,
|
|
5437
5436
|
f,
|
|
5438
|
-
|
|
5437
|
+
x,
|
|
5439
5438
|
d,
|
|
5440
5439
|
p,
|
|
5441
5440
|
h,
|
|
@@ -5485,7 +5484,7 @@ const qo = (e) => {
|
|
|
5485
5484
|
), ke = Q(
|
|
5486
5485
|
(le) => {
|
|
5487
5486
|
const { params: Oe, searchValues: pe, limit: Fe, offset: G } = le;
|
|
5488
|
-
C || (n == null || n(void 0), o == null || o([]),
|
|
5487
|
+
C || (n == null || n(void 0), o == null || o([]), S == null || S(pe), r == null || r(Oe), s == null || s(!1), R(!0), A(void 0), $(1), Fe && (ae.current = Fe, v == null || v(Fe)), G && K(G), me({
|
|
5489
5488
|
params: Oe,
|
|
5490
5489
|
newOffset: G
|
|
5491
5490
|
}));
|
|
@@ -5494,7 +5493,7 @@ const qo = (e) => {
|
|
|
5494
5493
|
C,
|
|
5495
5494
|
n,
|
|
5496
5495
|
o,
|
|
5497
|
-
|
|
5496
|
+
S,
|
|
5498
5497
|
r,
|
|
5499
5498
|
s,
|
|
5500
5499
|
me,
|
|
@@ -5506,12 +5505,12 @@ const qo = (e) => {
|
|
|
5506
5505
|
},
|
|
5507
5506
|
[_, O, K, $]
|
|
5508
5507
|
), De = Q(() => {
|
|
5509
|
-
C || (n == null || n(void 0), r == null || r([]),
|
|
5508
|
+
C || (n == null || n(void 0), r == null || r([]), S == null || S({}), A(void 0), K(0), $(1), v == null || v(O || Ot));
|
|
5510
5509
|
}, [
|
|
5511
5510
|
C,
|
|
5512
5511
|
n,
|
|
5513
5512
|
r,
|
|
5514
|
-
|
|
5513
|
+
S,
|
|
5515
5514
|
v,
|
|
5516
5515
|
O
|
|
5517
5516
|
]), We = Q(
|
|
@@ -5526,17 +5525,17 @@ const qo = (e) => {
|
|
|
5526
5525
|
},
|
|
5527
5526
|
[d, t, f, se, ve]
|
|
5528
5527
|
), ye = Q(async () => await k.getHandler().searchAllIds({
|
|
5529
|
-
params: tn(V,
|
|
5528
|
+
params: tn(V, x),
|
|
5530
5529
|
model: t,
|
|
5531
5530
|
context: f,
|
|
5532
5531
|
totalItems: P
|
|
5533
|
-
}), [t, f, P, V,
|
|
5532
|
+
}), [t, f, P, V, x]);
|
|
5534
5533
|
return {
|
|
5535
5534
|
submit: ke,
|
|
5536
5535
|
clear: De,
|
|
5537
5536
|
fetchResults: me,
|
|
5538
5537
|
tableRefreshing: C,
|
|
5539
|
-
searchFilterLoading:
|
|
5538
|
+
searchFilterLoading: T,
|
|
5540
5539
|
searchError: M,
|
|
5541
5540
|
page: U,
|
|
5542
5541
|
offset: j,
|
|
@@ -5565,7 +5564,7 @@ function Rc(e, t) {
|
|
|
5565
5564
|
rootTree: u = !1,
|
|
5566
5565
|
parentContext: d = {},
|
|
5567
5566
|
onChangeSelectedRowKeys: p
|
|
5568
|
-
} = e, [h, m] = b(!1), [w, g] = b(!1), y = re(!1),
|
|
5567
|
+
} = e, [h, m] = b(!1), [w, g] = b(!1), y = re(!1), x = re(null), [I, O] = b(), [v, V] = b(), [S, F] = b(), [C, _] = b(), [T, R] = b(200), M = re(), { height: A } = Sn(), U = Z(
|
|
5569
5568
|
Kt
|
|
5570
5569
|
), { processAction: $ } = U || {}, j = Z(
|
|
5571
5570
|
rt
|
|
@@ -5624,7 +5623,7 @@ function Rc(e, t) {
|
|
|
5624
5623
|
nameSearch: a,
|
|
5625
5624
|
searchNameGetDoneRef: y,
|
|
5626
5625
|
context: d,
|
|
5627
|
-
formView:
|
|
5626
|
+
formView: S,
|
|
5628
5627
|
treeView: v,
|
|
5629
5628
|
sorter: X,
|
|
5630
5629
|
setSorter: ve,
|
|
@@ -5636,7 +5635,7 @@ function Rc(e, t) {
|
|
|
5636
5635
|
setActionViewTotalItems: se,
|
|
5637
5636
|
limit: ke,
|
|
5638
5637
|
setLimit: _e,
|
|
5639
|
-
clearSelection: (Yt =
|
|
5638
|
+
clearSelection: (Yt = x.current) == null ? void 0 : Yt.unselectAll
|
|
5640
5639
|
});
|
|
5641
5640
|
gt(t, () => ({
|
|
5642
5641
|
refreshResults: () => {
|
|
@@ -5713,24 +5712,24 @@ function Rc(e, t) {
|
|
|
5713
5712
|
s({
|
|
5714
5713
|
id: Ge,
|
|
5715
5714
|
model: I,
|
|
5716
|
-
formView:
|
|
5715
|
+
formView: S,
|
|
5717
5716
|
treeView: v
|
|
5718
5717
|
});
|
|
5719
5718
|
},
|
|
5720
|
-
[I,
|
|
5719
|
+
[I, S, s, Ne, v]
|
|
5721
5720
|
), ze = Q(async () => {
|
|
5722
5721
|
const $e = await W();
|
|
5723
5722
|
H == null || H($e.map((Ge) => ({ id: Ge }))), p == null || p($e);
|
|
5724
|
-
}, [W, p, H]), ct = Ie(() => v != null && v.isExpandable ? A - 160 : A - (
|
|
5723
|
+
}, [W, p, H]), ct = Ie(() => v != null && v.isExpandable ? A - 160 : A - (T + 240), [A, T, v == null ? void 0 : v.isExpandable]), Ue = Ie(
|
|
5725
5724
|
() => Y == null ? void 0 : Y.map(($e) => $e.id),
|
|
5726
5725
|
[Y]
|
|
5727
|
-
), ft = Q(() => !v || !
|
|
5726
|
+
), ft = Q(() => !v || !S ? null : /* @__PURE__ */ D(ie, { children: [
|
|
5728
5727
|
/* @__PURE__ */ i(
|
|
5729
5728
|
jo,
|
|
5730
5729
|
{
|
|
5731
|
-
fields: { ...
|
|
5730
|
+
fields: { ...S.fields, ...v.fields },
|
|
5732
5731
|
searchFields: Lo([
|
|
5733
|
-
|
|
5732
|
+
S.search_fields,
|
|
5734
5733
|
v.search_fields
|
|
5735
5734
|
]),
|
|
5736
5735
|
onClear: ye,
|
|
@@ -5748,7 +5747,7 @@ function Rc(e, t) {
|
|
|
5748
5747
|
/* @__PURE__ */ i(
|
|
5749
5748
|
an,
|
|
5750
5749
|
{
|
|
5751
|
-
ref:
|
|
5750
|
+
ref: x,
|
|
5752
5751
|
context: d,
|
|
5753
5752
|
total: ot,
|
|
5754
5753
|
limit: Se,
|
|
@@ -5778,7 +5777,7 @@ function Rc(e, t) {
|
|
|
5778
5777
|
ye,
|
|
5779
5778
|
Ke,
|
|
5780
5779
|
xe,
|
|
5781
|
-
|
|
5780
|
+
S,
|
|
5782
5781
|
He,
|
|
5783
5782
|
ke,
|
|
5784
5783
|
Se,
|
|
@@ -5829,21 +5828,21 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5829
5828
|
g(!0);
|
|
5830
5829
|
try {
|
|
5831
5830
|
await o(V);
|
|
5832
|
-
} catch (
|
|
5833
|
-
Pt(
|
|
5831
|
+
} catch (S) {
|
|
5832
|
+
Pt(S);
|
|
5834
5833
|
}
|
|
5835
5834
|
g(!1);
|
|
5836
5835
|
},
|
|
5837
5836
|
[o]
|
|
5838
|
-
),
|
|
5837
|
+
), x = async () => {
|
|
5839
5838
|
await new Promise((V) => setTimeout(V, 5)), n();
|
|
5840
5839
|
}, I = async (V) => {
|
|
5841
|
-
const { id:
|
|
5842
|
-
y([
|
|
5840
|
+
const { id: S } = V;
|
|
5841
|
+
y([S]);
|
|
5843
5842
|
};
|
|
5844
5843
|
function O() {
|
|
5845
5844
|
if (h.length === 0) {
|
|
5846
|
-
|
|
5845
|
+
x();
|
|
5847
5846
|
return;
|
|
5848
5847
|
}
|
|
5849
5848
|
y(h);
|
|
@@ -5886,7 +5885,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5886
5885
|
children: p("ok")
|
|
5887
5886
|
}
|
|
5888
5887
|
),
|
|
5889
|
-
/* @__PURE__ */ i(Pe, { icon: /* @__PURE__ */ i(nn, {}), onClick:
|
|
5888
|
+
/* @__PURE__ */ i(Pe, { icon: /* @__PURE__ */ i(nn, {}), onClick: x, children: p("cancel") })
|
|
5890
5889
|
] }) })
|
|
5891
5890
|
] });
|
|
5892
5891
|
return /* @__PURE__ */ D(ie, { children: [
|
|
@@ -5898,7 +5897,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5898
5897
|
width: u,
|
|
5899
5898
|
open: t && !c,
|
|
5900
5899
|
closable: !0,
|
|
5901
|
-
onCancel:
|
|
5900
|
+
onCancel: x,
|
|
5902
5901
|
footer: null,
|
|
5903
5902
|
destroyOnClose: !0,
|
|
5904
5903
|
maskClosable: !1,
|
|
@@ -5912,10 +5911,10 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5912
5911
|
visible: c,
|
|
5913
5912
|
parentContext: l,
|
|
5914
5913
|
onSubmitSucceed: (V) => {
|
|
5915
|
-
f(!1),
|
|
5914
|
+
f(!1), x(), y([V]);
|
|
5916
5915
|
},
|
|
5917
5916
|
onCancel: () => {
|
|
5918
|
-
f(!1),
|
|
5917
|
+
f(!1), x();
|
|
5919
5918
|
}
|
|
5920
5919
|
}
|
|
5921
5920
|
)
|
|
@@ -5938,7 +5937,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5938
5937
|
context: l,
|
|
5939
5938
|
id: c,
|
|
5940
5939
|
domain: f
|
|
5941
|
-
} = o, u = r && !a ? { backgroundColor: Jo.colorPrimaryBg } : void 0, [d, p] = b(!1), [h, m] = b(!1), [w, g] = b(!1), [y,
|
|
5940
|
+
} = o, u = r && !a ? { backgroundColor: Jo.colorPrimaryBg } : void 0, [d, p] = b(!1), [h, m] = b(!1), [w, g] = b(!1), [y, x] = b(), I = re(!1), [O, v] = b(""), V = re(), S = Z(Le), { domain: F, getValues: C, getFields: _, getContext: T, elementHasLostFocus: R } = S || {}, M = re([]), [A, U] = b([]), $ = t && t[0] || void 0, j = t && t[1] || "";
|
|
5942
5941
|
fe(() => {
|
|
5943
5942
|
!Array.isArray(t) && t && Y(t);
|
|
5944
5943
|
}, [t]), fe(() => {
|
|
@@ -5962,7 +5961,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5962
5961
|
const N = await k.getHandler().nameSearch({
|
|
5963
5962
|
model: s,
|
|
5964
5963
|
payload: V.current,
|
|
5965
|
-
context: { ...
|
|
5964
|
+
context: { ...T == null ? void 0 : T(), ...l }
|
|
5966
5965
|
});
|
|
5967
5966
|
N.length === 1 ? (V.current = void 0, K(N[0])) : ne(V.current);
|
|
5968
5967
|
}
|
|
@@ -5977,13 +5976,13 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5977
5976
|
const ae = await k.getHandler().searchAllIds({
|
|
5978
5977
|
params: M.current,
|
|
5979
5978
|
model: s,
|
|
5980
|
-
context: { ...
|
|
5979
|
+
context: { ...T == null ? void 0 : T(), ...l },
|
|
5981
5980
|
totalItems: 2
|
|
5982
5981
|
});
|
|
5983
|
-
ae.length === 1 ? Y(ae[0]) : (
|
|
5982
|
+
ae.length === 1 ? Y(ae[0]) : (x(N), p(!0));
|
|
5984
5983
|
return;
|
|
5985
5984
|
}
|
|
5986
|
-
|
|
5985
|
+
x(N), p(!0);
|
|
5987
5986
|
}, Y = async (N) => {
|
|
5988
5987
|
g(!0);
|
|
5989
5988
|
try {
|
|
@@ -5991,7 +5990,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
5991
5990
|
action: "name_get",
|
|
5992
5991
|
payload: [N],
|
|
5993
5992
|
model: s,
|
|
5994
|
-
context: { ...
|
|
5993
|
+
context: { ...T == null ? void 0 : T(), ...l }
|
|
5995
5994
|
});
|
|
5996
5995
|
K([N, ae[0][1]]);
|
|
5997
5996
|
} catch (ae) {
|
|
@@ -6008,7 +6007,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
6008
6007
|
values: C()
|
|
6009
6008
|
}),
|
|
6010
6009
|
fields: _(),
|
|
6011
|
-
context:
|
|
6010
|
+
context: T()
|
|
6012
6011
|
})), F && F.length > 0 && (M.current = M.current.concat(
|
|
6013
6012
|
Qn({
|
|
6014
6013
|
domain: F,
|
|
@@ -6039,7 +6038,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
6039
6038
|
{
|
|
6040
6039
|
id: $,
|
|
6041
6040
|
model: s,
|
|
6042
|
-
context: { ...
|
|
6041
|
+
context: { ...T == null ? void 0 : T(), ...l }
|
|
6043
6042
|
}
|
|
6044
6043
|
)
|
|
6045
6044
|
}
|
|
@@ -6073,7 +6072,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
6073
6072
|
{
|
|
6074
6073
|
model: s,
|
|
6075
6074
|
domain: A,
|
|
6076
|
-
context: { ...
|
|
6075
|
+
context: { ...T == null ? void 0 : T(), ...l },
|
|
6077
6076
|
visible: d,
|
|
6078
6077
|
nameSearch: $ ? void 0 : y,
|
|
6079
6078
|
onSelectValues: async (N) => {
|
|
@@ -6088,7 +6087,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
6088
6087
|
Ut,
|
|
6089
6088
|
{
|
|
6090
6089
|
model: s,
|
|
6091
|
-
parentContext: { ...
|
|
6090
|
+
parentContext: { ...T == null ? void 0 : T(), ...l },
|
|
6092
6091
|
id: t && t[0],
|
|
6093
6092
|
visible: h,
|
|
6094
6093
|
onSubmitSucceed: (N) => {
|
|
@@ -6238,7 +6237,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
6238
6237
|
function y() {
|
|
6239
6238
|
return /* @__PURE__ */ i("div", { className: "inline-block w-3" });
|
|
6240
6239
|
}
|
|
6241
|
-
function
|
|
6240
|
+
function x() {
|
|
6242
6241
|
return /* @__PURE__ */ i(
|
|
6243
6242
|
"div",
|
|
6244
6243
|
{
|
|
@@ -6295,7 +6294,7 @@ const zo = ht(Rc), { error: Vc } = tt, Pt = (e) => {
|
|
|
6295
6294
|
] });
|
|
6296
6295
|
}
|
|
6297
6296
|
return /* @__PURE__ */ D("div", { className: "flex mb-2", children: [
|
|
6298
|
-
|
|
6297
|
+
x(),
|
|
6299
6298
|
/* @__PURE__ */ D("div", { className: "flex-none h-8 pl-2", children: [
|
|
6300
6299
|
s !== "graph" && m && /* @__PURE__ */ i(
|
|
6301
6300
|
Qe,
|
|
@@ -6355,7 +6354,7 @@ const $c = (e) => {
|
|
|
6355
6354
|
getContext: m,
|
|
6356
6355
|
domain: w,
|
|
6357
6356
|
fetchValues: g
|
|
6358
|
-
} = u || {}, { t: y } = he(), [
|
|
6357
|
+
} = u || {}, { t: y } = he(), [x, I] = b(!1), [O, v] = b(!1), [V, S] = b(), [F, C] = b(!1), [_, T] = b(!1), [R, M] = b(), [A, U] = b([]), [$, j] = b(!1), K = re([]), [P, q] = b(), ne = re(), [Y, H] = b(void 0), {
|
|
6359
6358
|
readOnly: E,
|
|
6360
6359
|
relation: z,
|
|
6361
6360
|
context: N,
|
|
@@ -6386,7 +6385,7 @@ const $c = (e) => {
|
|
|
6386
6385
|
await ke(), c > se.length - 1 && c !== 0 && f(0);
|
|
6387
6386
|
}, ke = async (W) => {
|
|
6388
6387
|
var ue, Te, be;
|
|
6389
|
-
v(!0), I(!1),
|
|
6388
|
+
v(!0), I(!1), S(void 0);
|
|
6390
6389
|
try {
|
|
6391
6390
|
const [Ne, Ee] = await ur({
|
|
6392
6391
|
treeView: {
|
|
@@ -6403,7 +6402,7 @@ const $c = (e) => {
|
|
|
6403
6402
|
});
|
|
6404
6403
|
return ne.current || (ne.current = Ne.map((ze) => ze.id)), (a || W) === "tree" && Ee && H(Ee), me(Ne), Ne;
|
|
6405
6404
|
} catch (Ne) {
|
|
6406
|
-
|
|
6405
|
+
S(Ne);
|
|
6407
6406
|
} finally {
|
|
6408
6407
|
v(!1);
|
|
6409
6408
|
}
|
|
@@ -6457,7 +6456,7 @@ const $c = (e) => {
|
|
|
6457
6456
|
} : Ne);
|
|
6458
6457
|
me(be);
|
|
6459
6458
|
}, Oe = (W) => {
|
|
6460
|
-
|
|
6459
|
+
x ? jt({
|
|
6461
6460
|
t: y,
|
|
6462
6461
|
onOk: () => {
|
|
6463
6462
|
le(), W(), I(!1);
|
|
@@ -6487,10 +6486,10 @@ const $c = (e) => {
|
|
|
6487
6486
|
}) : (j(!0), M({ defaultValues: ue }), C(!0));
|
|
6488
6487
|
}, G = async () => {
|
|
6489
6488
|
a === "form" ? Oe(() => {
|
|
6490
|
-
|
|
6491
|
-
}) :
|
|
6489
|
+
T(!0);
|
|
6490
|
+
}) : T(!0);
|
|
6492
6491
|
}, Se = async () => {
|
|
6493
|
-
v(!0), I(!1),
|
|
6492
|
+
v(!0), I(!1), S(void 0);
|
|
6494
6493
|
try {
|
|
6495
6494
|
if (se[c].id > 0) {
|
|
6496
6495
|
const W = s.map((ue) => ue.id === se[c].id ? {
|
|
@@ -6503,12 +6502,12 @@ const $c = (e) => {
|
|
|
6503
6502
|
s.filter((W) => W.id !== se[c].id)
|
|
6504
6503
|
);
|
|
6505
6504
|
} catch (W) {
|
|
6506
|
-
|
|
6505
|
+
S(W);
|
|
6507
6506
|
}
|
|
6508
6507
|
f(0), v(!1);
|
|
6509
6508
|
}, Re = async () => {
|
|
6510
6509
|
const W = se.filter((ue) => A.includes(ue.id));
|
|
6511
|
-
v(!0), I(!1),
|
|
6510
|
+
v(!0), I(!1), S(void 0);
|
|
6512
6511
|
try {
|
|
6513
6512
|
const ue = W.map((be) => be.id), Te = s.filter((be) => !(ue.includes(be.id) && be.id < 0)).map((be) => ue.includes(be.id) ? {
|
|
6514
6513
|
...be,
|
|
@@ -6516,7 +6515,7 @@ const $c = (e) => {
|
|
|
6516
6515
|
} : be);
|
|
6517
6516
|
me(Te);
|
|
6518
6517
|
} catch (ue) {
|
|
6519
|
-
|
|
6518
|
+
S(ue);
|
|
6520
6519
|
}
|
|
6521
6520
|
f(0), v(!1);
|
|
6522
6521
|
}, He = (W, ue, Te, be = !1, Ne = !1) => {
|
|
@@ -6575,7 +6574,7 @@ const $c = (e) => {
|
|
|
6575
6574
|
}
|
|
6576
6575
|
me(ue);
|
|
6577
6576
|
} catch (be) {
|
|
6578
|
-
|
|
6577
|
+
S(be);
|
|
6579
6578
|
} finally {
|
|
6580
6579
|
v(!1);
|
|
6581
6580
|
}
|
|
@@ -6668,7 +6667,7 @@ const $c = (e) => {
|
|
|
6668
6667
|
title: xe(),
|
|
6669
6668
|
readOnly: E || !1,
|
|
6670
6669
|
isMany2Many: X,
|
|
6671
|
-
formHasChanges:
|
|
6670
|
+
formHasChanges: x,
|
|
6672
6671
|
totalItems: se.length,
|
|
6673
6672
|
currentItemIndex: c,
|
|
6674
6673
|
onDelete: pe,
|
|
@@ -6713,10 +6712,10 @@ const $c = (e) => {
|
|
|
6713
6712
|
context: { ...m == null ? void 0 : m(), ...N },
|
|
6714
6713
|
visible: _,
|
|
6715
6714
|
onSelectValues: async (W) => {
|
|
6716
|
-
|
|
6715
|
+
T(!1), ee(W);
|
|
6717
6716
|
},
|
|
6718
6717
|
onCloseModal: () => {
|
|
6719
|
-
|
|
6718
|
+
T(!1);
|
|
6720
6719
|
}
|
|
6721
6720
|
}
|
|
6722
6721
|
)
|
|
@@ -6817,12 +6816,12 @@ const $c = (e) => {
|
|
|
6817
6816
|
fields: o.fields,
|
|
6818
6817
|
context: n
|
|
6819
6818
|
}))[0];
|
|
6820
|
-
return e.map((
|
|
6821
|
-
...
|
|
6819
|
+
return e.map((x) => x.id === m ? {
|
|
6820
|
+
...x,
|
|
6822
6821
|
operation: "original",
|
|
6823
6822
|
values: w,
|
|
6824
6823
|
treeValues: g
|
|
6825
|
-
} :
|
|
6824
|
+
} : x);
|
|
6826
6825
|
},
|
|
6827
6826
|
[n, r.fields, e, t, o.fields]
|
|
6828
6827
|
), d = Q(
|
|
@@ -6978,32 +6977,32 @@ const Yc = ({
|
|
|
6978
6977
|
t && n && (v = { [t]: n }), e === "form" ? o(() => {
|
|
6979
6978
|
g(!0), m({ defaultValues: v }), p(!0);
|
|
6980
6979
|
}) : (g(!0), m({ defaultValues: v }), p(!0));
|
|
6981
|
-
}, [n, e, t, o]),
|
|
6980
|
+
}, [n, e, t, o]), x = Q(() => {
|
|
6982
6981
|
p(!1), g(!1);
|
|
6983
6982
|
}, []), I = It(
|
|
6984
|
-
(v, V,
|
|
6983
|
+
(v, V, S, F = !1) => {
|
|
6985
6984
|
let C;
|
|
6986
6985
|
if (F)
|
|
6987
6986
|
C = r.concat({
|
|
6988
6987
|
id: v,
|
|
6989
6988
|
operation: "pendingLink",
|
|
6990
|
-
values: { ...
|
|
6991
|
-
treeValues: { ...
|
|
6989
|
+
values: { ...S, id: v },
|
|
6990
|
+
treeValues: { ...S, id: v }
|
|
6992
6991
|
});
|
|
6993
6992
|
else if (v)
|
|
6994
6993
|
C = r.map((_) => _.id === v ? {
|
|
6995
6994
|
id: v,
|
|
6996
6995
|
operation: v > 0 ? "pendingUpdate" : "pendingCreate",
|
|
6997
|
-
values: { ...
|
|
6998
|
-
treeValues: { ...
|
|
6996
|
+
values: { ...S, id: v },
|
|
6997
|
+
treeValues: { ...S, id: v }
|
|
6999
6998
|
} : _);
|
|
7000
6999
|
else {
|
|
7001
7000
|
const _ = Ro(r);
|
|
7002
7001
|
C = r.concat({
|
|
7003
7002
|
id: _,
|
|
7004
7003
|
operation: "pendingCreate",
|
|
7005
|
-
values: { ...
|
|
7006
|
-
treeValues: { ...
|
|
7004
|
+
values: { ...S, id: _ },
|
|
7005
|
+
treeValues: { ...S, id: _ }
|
|
7007
7006
|
});
|
|
7008
7007
|
}
|
|
7009
7008
|
s(C), w || p(!1);
|
|
@@ -7012,14 +7011,14 @@ const Yc = ({
|
|
|
7012
7011
|
), O = It(
|
|
7013
7012
|
async (v) => {
|
|
7014
7013
|
const { id: V } = v;
|
|
7015
|
-
let
|
|
7014
|
+
let S = r;
|
|
7016
7015
|
const F = r.find((C) => C.id === V);
|
|
7017
|
-
(F == null ? void 0 : F.values) === void 0 && (
|
|
7016
|
+
(F == null ? void 0 : F.values) === void 0 && (S = await k.getHandler().readObjects({
|
|
7018
7017
|
model: c,
|
|
7019
7018
|
ids: [v.id],
|
|
7020
7019
|
fields: f.fields,
|
|
7021
7020
|
context: u
|
|
7022
|
-
})), m(
|
|
7021
|
+
})), m(S.find((C) => C.id === V)), g(!1), p(!0);
|
|
7023
7022
|
},
|
|
7024
7023
|
[u, f.fields, r, c, a, l]
|
|
7025
7024
|
);
|
|
@@ -7028,7 +7027,7 @@ const Yc = ({
|
|
|
7028
7027
|
modalItem: h,
|
|
7029
7028
|
continuousEntryMode: w,
|
|
7030
7029
|
createItem: y,
|
|
7031
|
-
onCancelFormModal:
|
|
7030
|
+
onCancelFormModal: x,
|
|
7032
7031
|
onFormModalSubmitSucceed: I,
|
|
7033
7032
|
openItemInFormModal: O
|
|
7034
7033
|
};
|
|
@@ -7119,14 +7118,14 @@ const Yc = ({
|
|
|
7119
7118
|
allRowSelectedMode: m,
|
|
7120
7119
|
dataForHash: w
|
|
7121
7120
|
}) => {
|
|
7122
|
-
const g = re(), y = c || g,
|
|
7121
|
+
const g = re(), y = c || g, x = re({}), I = re(), O = re(e);
|
|
7123
7122
|
bt(() => {
|
|
7124
|
-
var
|
|
7123
|
+
var T, R;
|
|
7125
7124
|
if (O.current = e, I.current === void 0) {
|
|
7126
7125
|
I.current = e;
|
|
7127
7126
|
return;
|
|
7128
7127
|
}
|
|
7129
|
-
I.current = e, (
|
|
7128
|
+
I.current = e, (T = y == null ? void 0 : y.current) == null || T.refresh(), (R = y == null ? void 0 : y.current) == null || R.unselectAll();
|
|
7130
7129
|
}, [e]);
|
|
7131
7130
|
const v = $n(() => e.length, [e]), V = $n(() => Oo(
|
|
7132
7131
|
r,
|
|
@@ -7134,9 +7133,9 @@ const Yc = ({
|
|
|
7134
7133
|
...Go
|
|
7135
7134
|
},
|
|
7136
7135
|
s
|
|
7137
|
-
), [s, r]),
|
|
7138
|
-
async (
|
|
7139
|
-
const M = O.current, U = M.map((Y) => Y.id).slice(
|
|
7136
|
+
), [s, r]), S = Q(
|
|
7137
|
+
async (T, R) => {
|
|
7138
|
+
const M = O.current, U = M.map((Y) => Y.id).slice(T, R), $ = U.filter((Y) => {
|
|
7140
7139
|
const H = M.find((E) => E.id === Y);
|
|
7141
7140
|
return H && (H.operation === "original" || H.operation === "pendingLink");
|
|
7142
7141
|
}), j = M.filter((Y) => Y && Y.operation !== "original" && Y.operation !== "pendingLink");
|
|
@@ -7147,13 +7146,13 @@ const Yc = ({
|
|
|
7147
7146
|
const H = q.find((z) => z.id === Y);
|
|
7148
7147
|
return H || ((E = M.find((z) => z.id === Y)) == null ? void 0 : E.treeValues);
|
|
7149
7148
|
});
|
|
7150
|
-
return
|
|
7149
|
+
return x.current = { ...x.current, ...P }, ne;
|
|
7151
7150
|
},
|
|
7152
7151
|
[a, r]
|
|
7153
|
-
), F = Q((
|
|
7152
|
+
), F = Q((T) => {
|
|
7154
7153
|
var R, M, A, U;
|
|
7155
|
-
if (
|
|
7156
|
-
return { color:
|
|
7154
|
+
if (x.current[(M = (R = T.node) == null ? void 0 : R.data) == null ? void 0 : M.id])
|
|
7155
|
+
return { color: x.current[(U = (A = T.node) == null ? void 0 : A.data) == null ? void 0 : U.id] };
|
|
7157
7156
|
}, []), { getColumnState: C, updateColumnState: _ } = zc({
|
|
7158
7157
|
...w,
|
|
7159
7158
|
model: f
|
|
@@ -7164,7 +7163,7 @@ const Yc = ({
|
|
|
7164
7163
|
ref: y,
|
|
7165
7164
|
height: t || Jc,
|
|
7166
7165
|
columns: V,
|
|
7167
|
-
onRequestData:
|
|
7166
|
+
onRequestData: S,
|
|
7168
7167
|
onRowDoubleClick: n,
|
|
7169
7168
|
readonly: o,
|
|
7170
7169
|
onRowStyle: F,
|
|
@@ -7190,16 +7189,16 @@ const Yc = ({
|
|
|
7190
7189
|
domain: w,
|
|
7191
7190
|
id: g
|
|
7192
7191
|
} = r, y = Z(Le), {
|
|
7193
|
-
activeId:
|
|
7192
|
+
activeId: x,
|
|
7194
7193
|
getContext: I,
|
|
7195
7194
|
fetchValues: O
|
|
7196
|
-
} = y || {}, v = s.size > 1, V = ((Oe = s.get("form")) == null ? void 0 : Oe.fields) !== void 0,
|
|
7195
|
+
} = y || {}, v = s.size > 1, V = ((Oe = s.get("form")) == null ? void 0 : Oe.fields) !== void 0, S = Ie(() => ({ ...I == null ? void 0 : I(), ...m }), [I, m]), F = Hc({
|
|
7197
7196
|
widgetDomain: w,
|
|
7198
7197
|
fieldName: g
|
|
7199
7198
|
}), {
|
|
7200
7199
|
treeOoui: C,
|
|
7201
7200
|
onTreeFetchRows: _,
|
|
7202
|
-
selectedRowKeys:
|
|
7201
|
+
selectedRowKeys: T,
|
|
7203
7202
|
setSelectedRowKeys: R,
|
|
7204
7203
|
onChangeFirstVisibleRowIndex: M,
|
|
7205
7204
|
onGetFirstVisibileRowIndex: A,
|
|
@@ -7209,7 +7208,7 @@ const Yc = ({
|
|
|
7209
7208
|
} = Bc({
|
|
7210
7209
|
treeView: s.get("tree"),
|
|
7211
7210
|
relation: h,
|
|
7212
|
-
context:
|
|
7211
|
+
context: S
|
|
7213
7212
|
}), K = Ie(() => {
|
|
7214
7213
|
const { title: pe } = s.get(c) || {};
|
|
7215
7214
|
return pe || r.label;
|
|
@@ -7232,7 +7231,7 @@ const Yc = ({
|
|
|
7232
7231
|
formView: s.get("form"),
|
|
7233
7232
|
treeView: s.get("tree"),
|
|
7234
7233
|
relation: h,
|
|
7235
|
-
context:
|
|
7234
|
+
context: S,
|
|
7236
7235
|
triggerChange: q
|
|
7237
7236
|
}), {
|
|
7238
7237
|
showFormModal: z,
|
|
@@ -7243,7 +7242,7 @@ const Yc = ({
|
|
|
7243
7242
|
createItem: se,
|
|
7244
7243
|
openItemInFormModal: J
|
|
7245
7244
|
} = Yc({
|
|
7246
|
-
activeId:
|
|
7245
|
+
activeId: x,
|
|
7247
7246
|
inv_field: r.inv_field,
|
|
7248
7247
|
showFormChangesDialogIfNeeded: H,
|
|
7249
7248
|
currentView: c,
|
|
@@ -7251,7 +7250,7 @@ const Yc = ({
|
|
|
7251
7250
|
items: l,
|
|
7252
7251
|
setCurrentView: f,
|
|
7253
7252
|
setItemIndex: d,
|
|
7254
|
-
context:
|
|
7253
|
+
context: S,
|
|
7255
7254
|
relation: h,
|
|
7256
7255
|
formView: s.get("form")
|
|
7257
7256
|
}), {
|
|
@@ -7265,14 +7264,14 @@ const Yc = ({
|
|
|
7265
7264
|
triggerChange: q,
|
|
7266
7265
|
items: l,
|
|
7267
7266
|
views: s,
|
|
7268
|
-
context:
|
|
7267
|
+
context: S,
|
|
7269
7268
|
relation: h
|
|
7270
7269
|
}), { showRemoveConfirm: _e } = Uc({
|
|
7271
7270
|
isMany2many: P,
|
|
7272
7271
|
items: l,
|
|
7273
7272
|
triggerChange: q,
|
|
7274
7273
|
setFormHasChanges: E,
|
|
7275
|
-
selectedRowKeys:
|
|
7274
|
+
selectedRowKeys: T,
|
|
7276
7275
|
setSelectedRowKeys: R
|
|
7277
7276
|
}), De = () => {
|
|
7278
7277
|
const pe = Array.from(s.keys()), Fe = pe[(pe.indexOf(c) + 1) % pe.length];
|
|
@@ -7319,7 +7318,7 @@ const Yc = ({
|
|
|
7319
7318
|
onPreviousItem: ye,
|
|
7320
7319
|
onNextItem: le,
|
|
7321
7320
|
onSearchItem: ke,
|
|
7322
|
-
selectedRowKeys:
|
|
7321
|
+
selectedRowKeys: T,
|
|
7323
7322
|
showCreateButton: V,
|
|
7324
7323
|
showToggleButton: v
|
|
7325
7324
|
}
|
|
@@ -7332,7 +7331,7 @@ const Yc = ({
|
|
|
7332
7331
|
readOnly: p || !1,
|
|
7333
7332
|
onFetchRecords: _,
|
|
7334
7333
|
ooui: C,
|
|
7335
|
-
context:
|
|
7334
|
+
context: S,
|
|
7336
7335
|
onRowDoubleClick: We,
|
|
7337
7336
|
onRowSelectionChange: R,
|
|
7338
7337
|
relation: h,
|
|
@@ -7353,7 +7352,7 @@ const Yc = ({
|
|
|
7353
7352
|
{
|
|
7354
7353
|
items: l,
|
|
7355
7354
|
formView: s.get("form"),
|
|
7356
|
-
context:
|
|
7355
|
+
context: S,
|
|
7357
7356
|
relation: h,
|
|
7358
7357
|
readOnly: p || !1,
|
|
7359
7358
|
onChange: Y
|
|
@@ -7370,7 +7369,7 @@ const Yc = ({
|
|
|
7370
7369
|
defaultValues: N == null ? void 0 : N.defaultValues,
|
|
7371
7370
|
visible: z,
|
|
7372
7371
|
onSubmitSucceed: ve,
|
|
7373
|
-
parentContext:
|
|
7372
|
+
parentContext: S,
|
|
7374
7373
|
onCancel: X,
|
|
7375
7374
|
readOnly: p,
|
|
7376
7375
|
mustClearAfterSave: ae,
|
|
@@ -7384,7 +7383,7 @@ const Yc = ({
|
|
|
7384
7383
|
{
|
|
7385
7384
|
domain: F,
|
|
7386
7385
|
model: h,
|
|
7387
|
-
context:
|
|
7386
|
+
context: S,
|
|
7388
7387
|
visible: ce,
|
|
7389
7388
|
onSelectValues: me,
|
|
7390
7389
|
onCloseModal: Ae
|
|
@@ -7395,8 +7394,8 @@ const Yc = ({
|
|
|
7395
7394
|
{
|
|
7396
7395
|
view_id: s.get("graph").view_id,
|
|
7397
7396
|
model: h,
|
|
7398
|
-
domain: [[`${r.inv_field}`, "=",
|
|
7399
|
-
context:
|
|
7397
|
+
domain: [[`${r.inv_field}`, "=", x]],
|
|
7398
|
+
context: S,
|
|
7400
7399
|
limit: 0
|
|
7401
7400
|
}
|
|
7402
7401
|
),
|
|
@@ -7413,7 +7412,7 @@ const Yc = ({
|
|
|
7413
7412
|
bt(() => {
|
|
7414
7413
|
I();
|
|
7415
7414
|
}, [t]);
|
|
7416
|
-
const
|
|
7415
|
+
const x = async (V) => r && r[V] ? r[V] : await k.getHandler().getView({
|
|
7417
7416
|
model: o,
|
|
7418
7417
|
type: V,
|
|
7419
7418
|
context: { ...w == null ? void 0 : w(), ...a }
|
|
@@ -7422,13 +7421,13 @@ const Yc = ({
|
|
|
7422
7421
|
try {
|
|
7423
7422
|
if (n && n.length > 0) {
|
|
7424
7423
|
for (const V of n) {
|
|
7425
|
-
const
|
|
7426
|
-
p.set(V,
|
|
7424
|
+
const S = await x(V);
|
|
7425
|
+
p.set(V, S);
|
|
7427
7426
|
}
|
|
7428
7427
|
h(p);
|
|
7429
7428
|
} else {
|
|
7430
|
-
const V = await
|
|
7431
|
-
p.set("form", V), p.set("tree",
|
|
7429
|
+
const V = await x("form"), S = await x("tree");
|
|
7430
|
+
p.set("form", V), p.set("tree", S), h(p);
|
|
7432
7431
|
}
|
|
7433
7432
|
} catch (V) {
|
|
7434
7433
|
d(JSON.stringify(V));
|
|
@@ -7441,14 +7440,14 @@ const Yc = ({
|
|
|
7441
7440
|
{
|
|
7442
7441
|
required: s,
|
|
7443
7442
|
type: "array",
|
|
7444
|
-
validator: async (V,
|
|
7445
|
-
if (!
|
|
7443
|
+
validator: async (V, S) => {
|
|
7444
|
+
if (!S)
|
|
7446
7445
|
throw new Error();
|
|
7447
|
-
if (!
|
|
7446
|
+
if (!S.items)
|
|
7448
7447
|
throw new Error();
|
|
7449
|
-
if (!Array.isArray(
|
|
7448
|
+
if (!Array.isArray(S.items))
|
|
7450
7449
|
throw new Error();
|
|
7451
|
-
if (
|
|
7450
|
+
if (S.items.length === 0)
|
|
7452
7451
|
throw new Error();
|
|
7453
7452
|
},
|
|
7454
7453
|
...e,
|
|
@@ -7676,7 +7675,7 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
7676
7675
|
g.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (y = [
|
|
7677
7676
|
["id", "in", n == null ? void 0 : n.map((O) => O.id)]
|
|
7678
7677
|
]);
|
|
7679
|
-
const { datas:
|
|
7678
|
+
const { datas: x } = await k.getHandler().exportData({
|
|
7680
7679
|
model: e,
|
|
7681
7680
|
fields: gd({
|
|
7682
7681
|
keys: g.selectedKeys,
|
|
@@ -7688,8 +7687,8 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
7688
7687
|
format: g.exportType
|
|
7689
7688
|
});
|
|
7690
7689
|
s(), await new Promise((O) => setTimeout(O, 200));
|
|
7691
|
-
const I = await Nt(
|
|
7692
|
-
Tn(
|
|
7690
|
+
const I = await Nt(x);
|
|
7691
|
+
Tn(x, I.mime);
|
|
7693
7692
|
},
|
|
7694
7693
|
[o, n, e, r, t, s, c]
|
|
7695
7694
|
), u = Q(async () => {
|
|
@@ -7701,14 +7700,14 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
7701
7700
|
return a.current["/"] = g, qr({ fields: g });
|
|
7702
7701
|
}, [e, t, a]), d = Q(
|
|
7703
7702
|
async (g) => {
|
|
7704
|
-
const
|
|
7703
|
+
const x = Gn(g, a.current)[Un(g)], I = x.relation, O = await k.getHandler().getFields({
|
|
7705
7704
|
model: I,
|
|
7706
7705
|
context: t,
|
|
7707
7706
|
fields: []
|
|
7708
7707
|
});
|
|
7709
7708
|
for (const [v, V] of Object.entries(O))
|
|
7710
7709
|
O[v].string = fd({
|
|
7711
|
-
parentTitle:
|
|
7710
|
+
parentTitle: x.string,
|
|
7712
7711
|
title: V.string
|
|
7713
7712
|
});
|
|
7714
7713
|
return a.current[g] = O, qr({
|
|
@@ -7727,10 +7726,10 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
7727
7726
|
predefinedExports: g.map((I) => ({
|
|
7728
7727
|
...I,
|
|
7729
7728
|
fields: I.fields.map((O) => {
|
|
7730
|
-
const v = Un(O.key),
|
|
7731
|
-
return
|
|
7729
|
+
const v = Un(O.key), S = Gn(O.key, a.current)[v];
|
|
7730
|
+
return S ? {
|
|
7732
7731
|
key: O.key,
|
|
7733
|
-
title:
|
|
7732
|
+
title: S.string
|
|
7734
7733
|
} : {
|
|
7735
7734
|
key: O.key
|
|
7736
7735
|
};
|
|
@@ -7761,7 +7760,7 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
7761
7760
|
[l, t]
|
|
7762
7761
|
), w = Q(
|
|
7763
7762
|
async (g) => {
|
|
7764
|
-
const y = await m("ir.exports"),
|
|
7763
|
+
const y = await m("ir.exports"), x = await m("ir.exports.line"), I = await k.getHandler().create({
|
|
7765
7764
|
model: "ir.exports",
|
|
7766
7765
|
values: {
|
|
7767
7766
|
name: g.name,
|
|
@@ -7777,7 +7776,7 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
7777
7776
|
name: O.key,
|
|
7778
7777
|
export_id: I
|
|
7779
7778
|
},
|
|
7780
|
-
fields:
|
|
7779
|
+
fields: x,
|
|
7781
7780
|
context: t
|
|
7782
7781
|
}))
|
|
7783
7782
|
), { ...g, id: I };
|
|
@@ -8012,8 +8011,8 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
8012
8011
|
o == null || o(I);
|
|
8013
8012
|
};
|
|
8014
8013
|
async function w() {
|
|
8015
|
-
const I = await Nt(n), O = `data:${I == null ? void 0 : I.mime};base64,${n}`, v = document.createElement("a"), V = d(a),
|
|
8016
|
-
v.href = O, v.download = V ||
|
|
8014
|
+
const I = await Nt(n), O = `data:${I == null ? void 0 : I.mime};base64,${n}`, v = document.createElement("a"), V = d(a), S = d("name");
|
|
8015
|
+
v.href = O, v.download = V || S, v.click();
|
|
8017
8016
|
}
|
|
8018
8017
|
async function g() {
|
|
8019
8018
|
const I = await Nt(n);
|
|
@@ -8024,7 +8023,7 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
8024
8023
|
const O = I.target.files[0], v = await Io(O);
|
|
8025
8024
|
m(v), a && u(a, O.name);
|
|
8026
8025
|
}
|
|
8027
|
-
function
|
|
8026
|
+
function x() {
|
|
8028
8027
|
u(a, void 0), m(void 0);
|
|
8029
8028
|
}
|
|
8030
8029
|
return /* @__PURE__ */ D(Ve, { gutter: 8, children: [
|
|
@@ -8076,7 +8075,7 @@ const { useToken: sd } = je, { TextArea: Kn } = st, ad = (e) => {
|
|
|
8076
8075
|
{
|
|
8077
8076
|
tooltip: p("clear"),
|
|
8078
8077
|
disabled: r || !n,
|
|
8079
|
-
onClick:
|
|
8078
|
+
onClick: x,
|
|
8080
8079
|
icon: /* @__PURE__ */ i(er, {})
|
|
8081
8080
|
}
|
|
8082
8081
|
)
|
|
@@ -8372,16 +8371,16 @@ function Ad(e) {
|
|
|
8372
8371
|
try {
|
|
8373
8372
|
const y = await k.getHandler().readObjects({
|
|
8374
8373
|
model: "ir.attachment",
|
|
8375
|
-
ids: t.map((
|
|
8374
|
+
ids: t.map((x) => x.id),
|
|
8376
8375
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
8377
8376
|
context: a.current.getContext()
|
|
8378
8377
|
});
|
|
8379
8378
|
u(
|
|
8380
|
-
y.map((
|
|
8381
|
-
id:
|
|
8382
|
-
name:
|
|
8383
|
-
datas_fname:
|
|
8384
|
-
link:
|
|
8379
|
+
y.map((x) => ({
|
|
8380
|
+
id: x.id,
|
|
8381
|
+
name: x.name,
|
|
8382
|
+
datas_fname: x.datas_fname,
|
|
8383
|
+
link: x.link
|
|
8385
8384
|
}))
|
|
8386
8385
|
);
|
|
8387
8386
|
} catch (y) {
|
|
@@ -8396,9 +8395,9 @@ function Ad(e) {
|
|
|
8396
8395
|
return;
|
|
8397
8396
|
}
|
|
8398
8397
|
p(!0);
|
|
8399
|
-
let
|
|
8398
|
+
let x;
|
|
8400
8399
|
try {
|
|
8401
|
-
|
|
8400
|
+
x = (await k.getHandler().readObjects({
|
|
8402
8401
|
model: "ir.attachment",
|
|
8403
8402
|
ids: [y.id],
|
|
8404
8403
|
context: a.current.getContext()
|
|
@@ -8406,12 +8405,12 @@ function Ad(e) {
|
|
|
8406
8405
|
} catch (I) {
|
|
8407
8406
|
et(I);
|
|
8408
8407
|
}
|
|
8409
|
-
if (p(!1), !!
|
|
8410
|
-
if (
|
|
8411
|
-
const I = await Nt(
|
|
8412
|
-
Tn(
|
|
8408
|
+
if (p(!1), !!x)
|
|
8409
|
+
if (x.datas) {
|
|
8410
|
+
const I = await Nt(x.datas);
|
|
8411
|
+
Tn(x.datas, I.mime);
|
|
8413
8412
|
} else
|
|
8414
|
-
s(
|
|
8413
|
+
s(x);
|
|
8415
8414
|
},
|
|
8416
8415
|
[a, s]
|
|
8417
8416
|
), g = Q(
|
|
@@ -8469,12 +8468,12 @@ function Dd({ toolbar: e }) {
|
|
|
8469
8468
|
duplicatingItem: w,
|
|
8470
8469
|
setDuplicatingItem: g,
|
|
8471
8470
|
setResults: y,
|
|
8472
|
-
formIsLoading:
|
|
8471
|
+
formIsLoading: x,
|
|
8473
8472
|
attachments: I,
|
|
8474
8473
|
formRef: O,
|
|
8475
8474
|
setFormHasChanges: v,
|
|
8476
8475
|
previousView: V,
|
|
8477
|
-
setPreviousView:
|
|
8476
|
+
setPreviousView: S,
|
|
8478
8477
|
goToResourceId: F
|
|
8479
8478
|
} = Z(rt);
|
|
8480
8479
|
xt(
|
|
@@ -8501,14 +8500,14 @@ function Dd({ toolbar: e }) {
|
|
|
8501
8500
|
), xt(
|
|
8502
8501
|
"ctrl+l,command+l",
|
|
8503
8502
|
(E) => {
|
|
8504
|
-
V && (
|
|
8503
|
+
V && (S == null || S(n), o == null || o(V));
|
|
8505
8504
|
},
|
|
8506
8505
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
8507
8506
|
[V, n]
|
|
8508
8507
|
);
|
|
8509
8508
|
const { t: C } = he(), _ = Z(
|
|
8510
8509
|
Kt
|
|
8511
|
-
), { processAction:
|
|
8510
|
+
), { processAction: T } = _ || {}, R = Z(
|
|
8512
8511
|
lt
|
|
8513
8512
|
), { openRelate: M, openDefaultActionForModel: A } = R || {};
|
|
8514
8513
|
function U(E) {
|
|
@@ -8582,9 +8581,9 @@ function Dd({ toolbar: e }) {
|
|
|
8582
8581
|
g == null || g(!1);
|
|
8583
8582
|
}
|
|
8584
8583
|
}
|
|
8585
|
-
const Y = a || m ||
|
|
8584
|
+
const Y = a || m || x || w;
|
|
8586
8585
|
function H(E) {
|
|
8587
|
-
|
|
8586
|
+
T == null || T({
|
|
8588
8587
|
actionData: E,
|
|
8589
8588
|
values: O.current.getValues(),
|
|
8590
8589
|
fields: O.current.getFields(),
|
|
@@ -8595,7 +8594,7 @@ function Dd({ toolbar: e }) {
|
|
|
8595
8594
|
});
|
|
8596
8595
|
}
|
|
8597
8596
|
return n ? /* @__PURE__ */ D(qe, { wrap: !0, children: [
|
|
8598
|
-
|
|
8597
|
+
x && /* @__PURE__ */ D(ie, { children: [
|
|
8599
8598
|
/* @__PURE__ */ i(Be, {}),
|
|
8600
8599
|
_t(),
|
|
8601
8600
|
_t()
|
|
@@ -8603,7 +8602,7 @@ function Dd({ toolbar: e }) {
|
|
|
8603
8602
|
/* @__PURE__ */ i(
|
|
8604
8603
|
oi,
|
|
8605
8604
|
{
|
|
8606
|
-
disabled: a ||
|
|
8605
|
+
disabled: a || x || m || w
|
|
8607
8606
|
}
|
|
8608
8607
|
),
|
|
8609
8608
|
/* @__PURE__ */ i(
|
|
@@ -8621,7 +8620,7 @@ function Dd({ toolbar: e }) {
|
|
|
8621
8620
|
{
|
|
8622
8621
|
icon: /* @__PURE__ */ i(ar, {}),
|
|
8623
8622
|
tooltip: C("duplicate"),
|
|
8624
|
-
disabled: s || a || l === void 0 || w ||
|
|
8623
|
+
disabled: s || a || l === void 0 || w || x,
|
|
8625
8624
|
loading: w,
|
|
8626
8625
|
onClick: ne
|
|
8627
8626
|
}
|
|
@@ -8631,7 +8630,7 @@ function Dd({ toolbar: e }) {
|
|
|
8631
8630
|
{
|
|
8632
8631
|
icon: /* @__PURE__ */ i(ir, {}),
|
|
8633
8632
|
tooltip: C("delete"),
|
|
8634
|
-
disabled: a || l === void 0 || m || w ||
|
|
8633
|
+
disabled: a || l === void 0 || m || w || x,
|
|
8635
8634
|
loading: m,
|
|
8636
8635
|
onClick: P
|
|
8637
8636
|
}
|
|
@@ -8642,7 +8641,7 @@ function Dd({ toolbar: e }) {
|
|
|
8642
8641
|
{
|
|
8643
8642
|
icon: /* @__PURE__ */ i(po, {}),
|
|
8644
8643
|
tooltip: C("showLogs"),
|
|
8645
|
-
disabled: a || l === void 0 || m || w ||
|
|
8644
|
+
disabled: a || l === void 0 || m || w || x,
|
|
8646
8645
|
loading: !1,
|
|
8647
8646
|
onClick: () => {
|
|
8648
8647
|
ii(p, l, C);
|
|
@@ -8654,7 +8653,7 @@ function Dd({ toolbar: e }) {
|
|
|
8654
8653
|
{
|
|
8655
8654
|
icon: /* @__PURE__ */ i(Cn, {}),
|
|
8656
8655
|
tooltip: C("refresh"),
|
|
8657
|
-
disabled: a || l === void 0 || m || w ||
|
|
8656
|
+
disabled: a || l === void 0 || m || w || x,
|
|
8658
8657
|
loading: !1,
|
|
8659
8658
|
onClick: () => {
|
|
8660
8659
|
U(() => {
|
|
@@ -8671,7 +8670,7 @@ function Dd({ toolbar: e }) {
|
|
|
8671
8670
|
previousView: V,
|
|
8672
8671
|
availableViews: t,
|
|
8673
8672
|
onChangeView: (E) => {
|
|
8674
|
-
|
|
8673
|
+
S == null || S(n), v == null || v(!1), o == null || o(E);
|
|
8675
8674
|
},
|
|
8676
8675
|
disabled: Y,
|
|
8677
8676
|
formHasChanges: s
|
|
@@ -8840,8 +8839,8 @@ const { useToken: Ed } = je, si = (e) => {
|
|
|
8840
8839
|
fe(() => {
|
|
8841
8840
|
l && !h && g(!1), !n && !l && (m(!0), g(!0));
|
|
8842
8841
|
}, [h, l]);
|
|
8843
|
-
const y = (
|
|
8844
|
-
o == null || o(
|
|
8842
|
+
const y = (x) => {
|
|
8843
|
+
o == null || o(x.target.value);
|
|
8845
8844
|
};
|
|
8846
8845
|
return /* @__PURE__ */ D(Ve, { gutter: 8, wrap: !1, align: "middle", children: [
|
|
8847
8846
|
l ? null : /* @__PURE__ */ i(ge, { flex: "none", children: h ? /* @__PURE__ */ i(
|
|
@@ -9194,16 +9193,16 @@ const Bd = (e) => {
|
|
|
9194
9193
|
setSearchParams: w = void 0,
|
|
9195
9194
|
searchVisible: g = !0,
|
|
9196
9195
|
setSearchVisible: y = void 0,
|
|
9197
|
-
sorter:
|
|
9196
|
+
sorter: x = void 0,
|
|
9198
9197
|
setSorter: I = void 0,
|
|
9199
9198
|
setTotalItems: O = void 0,
|
|
9200
9199
|
setSearchTreeNameSearch: v = void 0,
|
|
9201
9200
|
setTreeIsLoading: V = void 0,
|
|
9202
|
-
limit:
|
|
9201
|
+
limit: S,
|
|
9203
9202
|
setLimit: F,
|
|
9204
9203
|
searchParams: C,
|
|
9205
9204
|
searchValues: _,
|
|
9206
|
-
setSearchValues:
|
|
9205
|
+
setSearchValues: T,
|
|
9207
9206
|
currentView: R
|
|
9208
9207
|
} = f || {}, [M, A] = b(!0);
|
|
9209
9208
|
fe(() => {
|
|
@@ -9217,14 +9216,14 @@ const Bd = (e) => {
|
|
|
9217
9216
|
setSearchTreeNameSearch: v,
|
|
9218
9217
|
setSelectedRowItems: m,
|
|
9219
9218
|
searchParams: C,
|
|
9220
|
-
setSearchValues:
|
|
9219
|
+
setSearchValues: T,
|
|
9221
9220
|
setSearchParams: w,
|
|
9222
9221
|
setSearchVisible: y,
|
|
9223
9222
|
setTreeIsLoading: V,
|
|
9224
9223
|
context: r,
|
|
9225
9224
|
formView: a,
|
|
9226
9225
|
treeView: l,
|
|
9227
|
-
sorter:
|
|
9226
|
+
sorter: x,
|
|
9228
9227
|
setSorter: I,
|
|
9229
9228
|
setCurrentItemIndex: d,
|
|
9230
9229
|
setResultsActionView: u,
|
|
@@ -9232,7 +9231,7 @@ const Bd = (e) => {
|
|
|
9232
9231
|
domain: s,
|
|
9233
9232
|
currentId: p,
|
|
9234
9233
|
setActionViewTotalItems: O,
|
|
9235
|
-
limit:
|
|
9234
|
+
limit: S,
|
|
9236
9235
|
setLimit: F
|
|
9237
9236
|
});
|
|
9238
9237
|
return !n || !t ? null : /* @__PURE__ */ D(ie, { children: [
|
|
@@ -9252,7 +9251,7 @@ const Bd = (e) => {
|
|
|
9252
9251
|
a.search_fields,
|
|
9253
9252
|
l.search_fields
|
|
9254
9253
|
]),
|
|
9255
|
-
limit:
|
|
9254
|
+
limit: S,
|
|
9256
9255
|
onClear: U,
|
|
9257
9256
|
offset: K,
|
|
9258
9257
|
isSearching: $,
|
|
@@ -9273,7 +9272,7 @@ const Bd = (e) => {
|
|
|
9273
9272
|
model: o,
|
|
9274
9273
|
context: r,
|
|
9275
9274
|
domain: tn(C || [], s),
|
|
9276
|
-
limit: M ?
|
|
9275
|
+
limit: M ? S : void 0,
|
|
9277
9276
|
manualIds: M ? h == null ? void 0 : h.map((q) => q.id) : void 0
|
|
9278
9277
|
}
|
|
9279
9278
|
)
|
|
@@ -9375,13 +9374,13 @@ function Wd(e) {
|
|
|
9375
9374
|
setSearchVisible: w,
|
|
9376
9375
|
setSearchTreeNameSearch: g,
|
|
9377
9376
|
searchTreeNameSearch: y,
|
|
9378
|
-
treeIsLoading:
|
|
9377
|
+
treeIsLoading: x,
|
|
9379
9378
|
setPreviousView: I,
|
|
9380
9379
|
previousView: O,
|
|
9381
9380
|
results: v,
|
|
9382
9381
|
limit: V,
|
|
9383
|
-
totalItems:
|
|
9384
|
-
} = Z(rt), { parentContext: F = {}, treeExpandable: C, toolbar: _ } = e,
|
|
9382
|
+
totalItems: S
|
|
9383
|
+
} = Z(rt), { parentContext: F = {}, treeExpandable: C, toolbar: _ } = e, T = mr(
|
|
9385
9384
|
sn.FEATURE_ADVANCED_EXPORT
|
|
9386
9385
|
), { t: R } = he(), M = Z(
|
|
9387
9386
|
Kt
|
|
@@ -9461,7 +9460,7 @@ function Wd(e) {
|
|
|
9461
9460
|
});
|
|
9462
9461
|
}
|
|
9463
9462
|
return /* @__PURE__ */ D(qe, { wrap: !0, children: [
|
|
9464
|
-
|
|
9463
|
+
x && /* @__PURE__ */ D(ie, { children: [
|
|
9465
9464
|
/* @__PURE__ */ i(Be, {}),
|
|
9466
9465
|
Ct(),
|
|
9467
9466
|
Ct()
|
|
@@ -9470,7 +9469,7 @@ function Wd(e) {
|
|
|
9470
9469
|
/* @__PURE__ */ i(
|
|
9471
9470
|
Kd,
|
|
9472
9471
|
{
|
|
9473
|
-
disabled: l || a,
|
|
9472
|
+
disabled: l || a || x,
|
|
9474
9473
|
searchText: y,
|
|
9475
9474
|
onSearch: (H) => {
|
|
9476
9475
|
H && H.trim().length > 0 ? g == null || g(H) : g == null || g(void 0);
|
|
@@ -9491,18 +9490,18 @@ function Wd(e) {
|
|
|
9491
9490
|
onClick: () => {
|
|
9492
9491
|
w == null || w(!m);
|
|
9493
9492
|
},
|
|
9494
|
-
disabled: l || a,
|
|
9493
|
+
disabled: l || a || x,
|
|
9495
9494
|
badgeNumber: h == null ? void 0 : h.length
|
|
9496
9495
|
}
|
|
9497
9496
|
),
|
|
9498
9497
|
Ct(),
|
|
9499
|
-
/* @__PURE__ */ i(oi, {}),
|
|
9498
|
+
/* @__PURE__ */ i(oi, { disabled: x }),
|
|
9500
9499
|
/* @__PURE__ */ i(
|
|
9501
9500
|
Je,
|
|
9502
9501
|
{
|
|
9503
9502
|
icon: /* @__PURE__ */ i(ar, {}),
|
|
9504
9503
|
tooltip: R("duplicate"),
|
|
9505
|
-
disabled: !r || (r == null ? void 0 : r.length) !== 1 || l ||
|
|
9504
|
+
disabled: !r || (r == null ? void 0 : r.length) !== 1 || l || x,
|
|
9506
9505
|
loading: l,
|
|
9507
9506
|
onClick: q
|
|
9508
9507
|
}
|
|
@@ -9512,7 +9511,7 @@ function Wd(e) {
|
|
|
9512
9511
|
{
|
|
9513
9512
|
icon: /* @__PURE__ */ i(ir, {}),
|
|
9514
9513
|
tooltip: R("delete"),
|
|
9515
|
-
disabled: !(r && (r == null ? void 0 : r.length) > 0) ||
|
|
9514
|
+
disabled: !(r && (r == null ? void 0 : r.length) > 0) || x,
|
|
9516
9515
|
loading: a,
|
|
9517
9516
|
onClick: K
|
|
9518
9517
|
}
|
|
@@ -9524,7 +9523,7 @@ function Wd(e) {
|
|
|
9524
9523
|
{
|
|
9525
9524
|
icon: /* @__PURE__ */ i(po, {}),
|
|
9526
9525
|
tooltip: R("showLogs"),
|
|
9527
|
-
disabled: !(r && (r == null ? void 0 : r.length) > 0) ||
|
|
9526
|
+
disabled: !(r && (r == null ? void 0 : r.length) > 0) || x,
|
|
9528
9527
|
loading: !1,
|
|
9529
9528
|
onClick: () => {
|
|
9530
9529
|
ii(f, r[0].id, R);
|
|
@@ -9536,7 +9535,7 @@ function Wd(e) {
|
|
|
9536
9535
|
{
|
|
9537
9536
|
icon: /* @__PURE__ */ i(Cn, {}),
|
|
9538
9537
|
tooltip: R("refresh"),
|
|
9539
|
-
disabled: l || a ||
|
|
9538
|
+
disabled: l || a || x,
|
|
9540
9539
|
loading: !1,
|
|
9541
9540
|
onClick: () => {
|
|
9542
9541
|
var H;
|
|
@@ -9554,7 +9553,8 @@ function Wd(e) {
|
|
|
9554
9553
|
onChangeView: (H) => {
|
|
9555
9554
|
I == null || I(n), o == null || o(H);
|
|
9556
9555
|
},
|
|
9557
|
-
previousView: O
|
|
9556
|
+
previousView: O,
|
|
9557
|
+
disabled: x
|
|
9558
9558
|
}
|
|
9559
9559
|
)
|
|
9560
9560
|
] }),
|
|
@@ -9564,7 +9564,7 @@ function Wd(e) {
|
|
|
9564
9564
|
{
|
|
9565
9565
|
icon: /* @__PURE__ */ i(nr, {}),
|
|
9566
9566
|
placement: "bottomRight",
|
|
9567
|
-
disabled: !(r && (r == null ? void 0 : r.length) > 0) ||
|
|
9567
|
+
disabled: !(r && (r == null ? void 0 : r.length) > 0) || x,
|
|
9568
9568
|
onRetrieveData: async () => [
|
|
9569
9569
|
{ label: R("actions"), items: _ == null ? void 0 : _.action }
|
|
9570
9570
|
],
|
|
@@ -9578,7 +9578,7 @@ function Wd(e) {
|
|
|
9578
9578
|
{
|
|
9579
9579
|
icon: /* @__PURE__ */ i(rr, {}),
|
|
9580
9580
|
placement: "bottomRight",
|
|
9581
|
-
disabled: !(r && (r == null ? void 0 : r.length) > 0) ||
|
|
9581
|
+
disabled: !(r && (r == null ? void 0 : r.length) > 0) || x,
|
|
9582
9582
|
onRetrieveData: async () => [
|
|
9583
9583
|
{ label: R("reports"), items: _ == null ? void 0 : _.print }
|
|
9584
9584
|
],
|
|
@@ -9593,7 +9593,7 @@ function Wd(e) {
|
|
|
9593
9593
|
}
|
|
9594
9594
|
}
|
|
9595
9595
|
),
|
|
9596
|
-
|
|
9596
|
+
T && /* @__PURE__ */ D(ie, { children: [
|
|
9597
9597
|
Ct(),
|
|
9598
9598
|
/* @__PURE__ */ i(
|
|
9599
9599
|
kt,
|
|
@@ -9657,7 +9657,7 @@ function Wd(e) {
|
|
|
9657
9657
|
}
|
|
9658
9658
|
$(!0);
|
|
9659
9659
|
},
|
|
9660
|
-
disabled: l || a ||
|
|
9660
|
+
disabled: l || a || x || j
|
|
9661
9661
|
}
|
|
9662
9662
|
),
|
|
9663
9663
|
/* @__PURE__ */ i(
|
|
@@ -9671,7 +9671,7 @@ function Wd(e) {
|
|
|
9671
9671
|
h || []
|
|
9672
9672
|
),
|
|
9673
9673
|
limit: V,
|
|
9674
|
-
totalRegisters:
|
|
9674
|
+
totalRegisters: S || 0,
|
|
9675
9675
|
selectedRegistersToExport: r,
|
|
9676
9676
|
visibleRegisters: (v == null ? void 0 : v.length) || 0,
|
|
9677
9677
|
context: F
|
|
@@ -9724,8 +9724,8 @@ const Ud = (e) => {
|
|
|
9724
9724
|
onRowClicked: (g) => {
|
|
9725
9725
|
const { id: y } = g;
|
|
9726
9726
|
u(y);
|
|
9727
|
-
const
|
|
9728
|
-
w == null || w(m), c(
|
|
9727
|
+
const x = f.findIndex((O) => O.id === y);
|
|
9728
|
+
w == null || w(m), c(x);
|
|
9729
9729
|
const I = p.find(
|
|
9730
9730
|
(O) => O.type === "form"
|
|
9731
9731
|
);
|
|
@@ -9861,9 +9861,9 @@ function Qd(e, t) {
|
|
|
9861
9861
|
action_type: m,
|
|
9862
9862
|
treeExpandable: w = !1,
|
|
9863
9863
|
limit: g
|
|
9864
|
-
} = e, [y,
|
|
9865
|
-
|
|
9866
|
-
), [_,
|
|
9864
|
+
} = e, [y, x] = b(), [I, O] = b([]), [v, V] = b(!0), S = p || void 0, [F, C] = b(
|
|
9865
|
+
S
|
|
9866
|
+
), [_, T] = b([]), [R, M] = b(), [A, U] = b([]), [$, j] = b(), [K, P] = b(0), [q, ne] = b(!1), [Y, H] = b(!1), [E, z] = b(), { t: N } = he(), ae = re(), X = re(), ve = Z(
|
|
9867
9867
|
lt
|
|
9868
9868
|
), {
|
|
9869
9869
|
setCurrentView: se,
|
|
@@ -9885,7 +9885,7 @@ function Qd(e, t) {
|
|
|
9885
9885
|
C(G), J == null || J(G);
|
|
9886
9886
|
}
|
|
9887
9887
|
function De(G) {
|
|
9888
|
-
|
|
9888
|
+
x(G);
|
|
9889
9889
|
const Se = { action_id: h, action_type: m };
|
|
9890
9890
|
se == null || se({ ...G, extra: Se });
|
|
9891
9891
|
}
|
|
@@ -9974,7 +9974,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9974
9974
|
};
|
|
9975
9975
|
l({ tabKey: c, canWeClose: ye }), fe(() => {
|
|
9976
9976
|
const G = I.find((Re) => Re.type === "tree"), Se = I.find((Re) => f.id ? Re.type === f.type && Re.view_id === f.id : Re.type === f.type);
|
|
9977
|
-
De(Se || G), p ? J == null || J(
|
|
9977
|
+
De(Se || G), p ? J == null || J(S) : (_e(void 0), M(void 0)), We();
|
|
9978
9978
|
}, [o, s, p]), fe(() => {
|
|
9979
9979
|
if (me === c) {
|
|
9980
9980
|
J == null || J(F);
|
|
@@ -10137,7 +10137,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
10137
10137
|
totalItems: K,
|
|
10138
10138
|
setTotalItems: P,
|
|
10139
10139
|
selectedRowItems: _,
|
|
10140
|
-
setSelectedRowItems:
|
|
10140
|
+
setSelectedRowItems: T,
|
|
10141
10141
|
setSearchTreeNameSearch: z,
|
|
10142
10142
|
searchTreeNameSearch: E,
|
|
10143
10143
|
goToResourceId: Oe,
|
|
@@ -10199,10 +10199,10 @@ function eu(e) {
|
|
|
10199
10199
|
domain: s = [],
|
|
10200
10200
|
visible: a = !0,
|
|
10201
10201
|
parentContext: l = {}
|
|
10202
|
-
} = e, [c, f] = b(!1), [u, d] = b(!1), [p, h] = b(), [m, w] = b(), [g, y] = b(), [
|
|
10202
|
+
} = e, [c, f] = b(!1), [u, d] = b(!1), [p, h] = b(), [m, w] = b(), [g, y] = b(), [x, I] = b(1), [O, v] = b(0), V = re(Ot), S = re([]), [F, C] = b(0), [_, T] = b([]), [R, M] = b(void 0), [A, U] = b(), [$, j] = b(), [K, P] = b(), [q, ne] = b(!1), Y = re([]), H = (J) => {
|
|
10203
10203
|
ne(!0), I(J), v((J - 1) * V.current);
|
|
10204
10204
|
}, E = async () => {
|
|
10205
|
-
const J = Y.current.length > 0 ? Y.current : s, ce = tn(
|
|
10205
|
+
const J = Y.current.length > 0 ? Y.current : s, ce = tn(S.current, J), { colors: me } = Tt(m), { totalItems: Ae, results: ke, attrsEvaluated: _e } = await k.getHandler().searchForTree({
|
|
10206
10206
|
params: ce,
|
|
10207
10207
|
limit: V.current,
|
|
10208
10208
|
offset: O,
|
|
@@ -10217,7 +10217,7 @@ function eu(e) {
|
|
|
10217
10217
|
sorter: A,
|
|
10218
10218
|
fields: { ...m.fields, ...g.fields }
|
|
10219
10219
|
});
|
|
10220
|
-
ne(!1),
|
|
10220
|
+
ne(!1), T(De);
|
|
10221
10221
|
const We = await Ae;
|
|
10222
10222
|
C(We);
|
|
10223
10223
|
}, z = async () => {
|
|
@@ -10229,7 +10229,7 @@ function eu(e) {
|
|
|
10229
10229
|
};
|
|
10230
10230
|
fe(() => {
|
|
10231
10231
|
u && a && z();
|
|
10232
|
-
}, [
|
|
10232
|
+
}, [x, O, u, a]);
|
|
10233
10233
|
const N = async (J) => {
|
|
10234
10234
|
d(!1), f(!0), P(void 0);
|
|
10235
10235
|
try {
|
|
@@ -10279,7 +10279,7 @@ function eu(e) {
|
|
|
10279
10279
|
showPagination: !1,
|
|
10280
10280
|
total: F,
|
|
10281
10281
|
limit: V.current,
|
|
10282
|
-
page:
|
|
10282
|
+
page: x,
|
|
10283
10283
|
treeView: m,
|
|
10284
10284
|
results: _,
|
|
10285
10285
|
onRequestPageChange: H,
|
|
@@ -10294,7 +10294,7 @@ function eu(e) {
|
|
|
10294
10294
|
sorter: J,
|
|
10295
10295
|
fields: { ...m.fields, ...g.fields }
|
|
10296
10296
|
});
|
|
10297
|
-
|
|
10297
|
+
T(ce);
|
|
10298
10298
|
},
|
|
10299
10299
|
context: l
|
|
10300
10300
|
}
|
|
@@ -10322,7 +10322,7 @@ function ru(e, t) {
|
|
|
10322
10322
|
setIsLoading: p,
|
|
10323
10323
|
openAction: h,
|
|
10324
10324
|
moveItemsEnabled: m
|
|
10325
|
-
} = Z(wr), w = re(), g = re(), [y] = Ze(k.getHandler().getView), [
|
|
10325
|
+
} = Z(wr), w = re(), g = re(), [y] = Ze(k.getHandler().getView), [x] = Ze(
|
|
10326
10326
|
k.getHandler().readObjects
|
|
10327
10327
|
), [I] = Ze(k.getHandler().update), O = mr(
|
|
10328
10328
|
sn.FEATURE_READFORVIEW
|
|
@@ -10333,14 +10333,14 @@ function ru(e, t) {
|
|
|
10333
10333
|
refresh: () => {
|
|
10334
10334
|
v();
|
|
10335
10335
|
},
|
|
10336
|
-
configDashboard:
|
|
10336
|
+
configDashboard: T
|
|
10337
10337
|
}));
|
|
10338
10338
|
async function v() {
|
|
10339
10339
|
f(!0), p(!0), d(void 0);
|
|
10340
10340
|
try {
|
|
10341
10341
|
const R = await V(), M = await F(R), A = R.fields[kn].relation, U = M[kn].items;
|
|
10342
10342
|
g.current = R.fields;
|
|
10343
|
-
const $ = await
|
|
10343
|
+
const $ = await S({
|
|
10344
10344
|
items: U,
|
|
10345
10345
|
model: A,
|
|
10346
10346
|
context: o
|
|
@@ -10357,7 +10357,7 @@ function ru(e, t) {
|
|
|
10357
10357
|
context: o
|
|
10358
10358
|
});
|
|
10359
10359
|
}
|
|
10360
|
-
async function
|
|
10360
|
+
async function S({
|
|
10361
10361
|
items: R,
|
|
10362
10362
|
model: M,
|
|
10363
10363
|
context: A
|
|
@@ -10382,7 +10382,7 @@ function ru(e, t) {
|
|
|
10382
10382
|
return U;
|
|
10383
10383
|
}
|
|
10384
10384
|
async function F(R) {
|
|
10385
|
-
return (await
|
|
10385
|
+
return (await x({
|
|
10386
10386
|
model: n,
|
|
10387
10387
|
ids: [r],
|
|
10388
10388
|
fields: R.fields,
|
|
@@ -10446,7 +10446,7 @@ function ru(e, t) {
|
|
|
10446
10446
|
context: o
|
|
10447
10447
|
});
|
|
10448
10448
|
}
|
|
10449
|
-
async function
|
|
10449
|
+
async function T() {
|
|
10450
10450
|
h(s);
|
|
10451
10451
|
}
|
|
10452
10452
|
return c ? /* @__PURE__ */ i(ut, {}) : u ? /* @__PURE__ */ i(Xe, { className: "mt-10 mb-20", message: u, type: "error", banner: !0 }) : /* @__PURE__ */ i(Zd, { onPositionItemsChanged: _, children: a.map((R, M) => {
|
|
@@ -10583,7 +10583,7 @@ const ou = ht(ru), iu = (e) => {
|
|
|
10583
10583
|
const { ooui: t } = e;
|
|
10584
10584
|
return /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(su, { ooui: t }) });
|
|
10585
10585
|
}, su = (e) => {
|
|
10586
|
-
const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = b([]), [c, f] = b(), [u, d] = b(!1), { relation: p, context: h, readOnly: m, field: w, columns: g } = n, y = Z(Le), { getContext:
|
|
10586
|
+
const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = b([]), [c, f] = b(), [u, d] = b(!1), { relation: p, context: h, readOnly: m, field: w, columns: g } = n, y = Z(Le), { getContext: x } = y || {};
|
|
10587
10587
|
bt(() => {
|
|
10588
10588
|
O();
|
|
10589
10589
|
}, [r]);
|
|
@@ -10612,11 +10612,11 @@ const ou = ht(ru), iu = (e) => {
|
|
|
10612
10612
|
model: p,
|
|
10613
10613
|
params: F,
|
|
10614
10614
|
fieldsToRetrieve: [w],
|
|
10615
|
-
context: { ...
|
|
10616
|
-
})).map((
|
|
10617
|
-
const R =
|
|
10615
|
+
context: { ...x == null ? void 0 : x(), ...h }
|
|
10616
|
+
})).map((T) => {
|
|
10617
|
+
const R = T[w];
|
|
10618
10618
|
let M = R;
|
|
10619
|
-
return Array.isArray(R) && (M = R[1]), { label: M, value:
|
|
10619
|
+
return Array.isArray(R) && (M = R[1]), { label: M, value: T.id };
|
|
10620
10620
|
});
|
|
10621
10621
|
l(_);
|
|
10622
10622
|
} catch (C) {
|
|
@@ -10628,16 +10628,16 @@ const ou = ht(ru), iu = (e) => {
|
|
|
10628
10628
|
return /* @__PURE__ */ i(Xe, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
10629
10629
|
}
|
|
10630
10630
|
const v = () => {
|
|
10631
|
-
|
|
10631
|
+
S(a.map((F) => F.value));
|
|
10632
10632
|
}, V = () => {
|
|
10633
|
-
|
|
10634
|
-
},
|
|
10635
|
-
const C = r.map((
|
|
10636
|
-
...
|
|
10633
|
+
S([]);
|
|
10634
|
+
}, S = (F) => {
|
|
10635
|
+
const C = r.map((T) => F.includes(T.id) ? T.operation == "pendingRemove" ? {
|
|
10636
|
+
...T,
|
|
10637
10637
|
operation: "original"
|
|
10638
|
-
} :
|
|
10639
|
-
F.filter((
|
|
10640
|
-
C.push({ id:
|
|
10638
|
+
} : T : { id: T.id, operation: "pendingRemove" }), _ = C.map((T) => T.id);
|
|
10639
|
+
F.filter((T) => !_.includes(T)).map((T) => {
|
|
10640
|
+
C.push({ id: T, operation: "pendingLink" });
|
|
10641
10641
|
}), I(C);
|
|
10642
10642
|
};
|
|
10643
10643
|
return u && a.length === 0 ? /* @__PURE__ */ i(Be, {}) : /* @__PURE__ */ i(ie, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
|
|
@@ -10646,7 +10646,7 @@ const ou = ht(ru), iu = (e) => {
|
|
|
10646
10646
|
{
|
|
10647
10647
|
value: a.length ? s : [],
|
|
10648
10648
|
disabled: m,
|
|
10649
|
-
onChange:
|
|
10649
|
+
onChange: S,
|
|
10650
10650
|
style: { width: "100%" },
|
|
10651
10651
|
children: /* @__PURE__ */ i(Ve, { children: a.map((F) => /* @__PURE__ */ i(ge, { span: Math.floor(24 / g), children: /* @__PURE__ */ i(Jt, { value: F.value, children: F.label }) })) })
|
|
10652
10652
|
}
|
|
@@ -10824,7 +10824,7 @@ function Ru(e, t) {
|
|
|
10824
10824
|
action: O,
|
|
10825
10825
|
values: v,
|
|
10826
10826
|
forced_values: V,
|
|
10827
|
-
initialViewType:
|
|
10827
|
+
initialViewType: S,
|
|
10828
10828
|
res_id: F,
|
|
10829
10829
|
domain: C = []
|
|
10830
10830
|
}) {
|
|
@@ -10836,7 +10836,7 @@ function Ru(e, t) {
|
|
|
10836
10836
|
et("Action type not supported");
|
|
10837
10837
|
return;
|
|
10838
10838
|
}
|
|
10839
|
-
const [
|
|
10839
|
+
const [T, R] = O.split(","), M = parseInt(R), A = St({
|
|
10840
10840
|
context: _.context,
|
|
10841
10841
|
values: a,
|
|
10842
10842
|
fields: {}
|
|
@@ -10869,9 +10869,9 @@ function Ru(e, t) {
|
|
|
10869
10869
|
}
|
|
10870
10870
|
}
|
|
10871
10871
|
let E;
|
|
10872
|
-
if (
|
|
10872
|
+
if (S) {
|
|
10873
10873
|
const [z, N] = H.find(
|
|
10874
|
-
([ae, X]) => X ===
|
|
10874
|
+
([ae, X]) => X === S
|
|
10875
10875
|
);
|
|
10876
10876
|
E = { id: z, type: N };
|
|
10877
10877
|
} else {
|
|
@@ -10886,7 +10886,7 @@ function Ru(e, t) {
|
|
|
10886
10886
|
title: K,
|
|
10887
10887
|
target: P,
|
|
10888
10888
|
initialView: E,
|
|
10889
|
-
action_type:
|
|
10889
|
+
action_type: T,
|
|
10890
10890
|
action_id: M,
|
|
10891
10891
|
values: v,
|
|
10892
10892
|
forced_values: V,
|
|
@@ -10899,7 +10899,7 @@ function Ru(e, t) {
|
|
|
10899
10899
|
title: O,
|
|
10900
10900
|
content: v,
|
|
10901
10901
|
key: V,
|
|
10902
|
-
action:
|
|
10902
|
+
action: S
|
|
10903
10903
|
}) {
|
|
10904
10904
|
let F = [...c];
|
|
10905
10905
|
c.length === 1 && c[0].key === "welcome" && (F = [...c.filter((C) => C.key !== "welcome")]), f([
|
|
@@ -10909,7 +10909,7 @@ function Ru(e, t) {
|
|
|
10909
10909
|
key: V,
|
|
10910
10910
|
closable: !0,
|
|
10911
10911
|
content: v,
|
|
10912
|
-
action:
|
|
10912
|
+
action: S
|
|
10913
10913
|
}
|
|
10914
10914
|
]), r(V);
|
|
10915
10915
|
}
|
|
@@ -10917,13 +10917,13 @@ function Ru(e, t) {
|
|
|
10917
10917
|
relateData: O,
|
|
10918
10918
|
fields: v,
|
|
10919
10919
|
values: V,
|
|
10920
|
-
action_id:
|
|
10920
|
+
action_id: S,
|
|
10921
10921
|
action_type: F
|
|
10922
10922
|
}) {
|
|
10923
10923
|
const {
|
|
10924
10924
|
res_model: C,
|
|
10925
10925
|
context: _,
|
|
10926
|
-
domain:
|
|
10926
|
+
domain: T,
|
|
10927
10927
|
views: R,
|
|
10928
10928
|
target: M,
|
|
10929
10929
|
string: A,
|
|
@@ -10932,8 +10932,8 @@ function Ru(e, t) {
|
|
|
10932
10932
|
context: _,
|
|
10933
10933
|
values: { ...V, ...a },
|
|
10934
10934
|
fields: v
|
|
10935
|
-
}), q =
|
|
10936
|
-
domain:
|
|
10935
|
+
}), q = T ? await k.getHandler().evalDomain({
|
|
10936
|
+
domain: T,
|
|
10937
10937
|
values: Rt({
|
|
10938
10938
|
fields: v,
|
|
10939
10939
|
values: { ...V, ...a }
|
|
@@ -10949,7 +10949,7 @@ function Ru(e, t) {
|
|
|
10949
10949
|
domain: q,
|
|
10950
10950
|
title: A,
|
|
10951
10951
|
initialView: K,
|
|
10952
|
-
action_id:
|
|
10952
|
+
action_id: S,
|
|
10953
10953
|
action_type: F,
|
|
10954
10954
|
limit: U
|
|
10955
10955
|
});
|
|
@@ -10958,12 +10958,12 @@ function Ru(e, t) {
|
|
|
10958
10958
|
const {
|
|
10959
10959
|
action_id: v,
|
|
10960
10960
|
action_type: V,
|
|
10961
|
-
res_id:
|
|
10961
|
+
res_id: S,
|
|
10962
10962
|
view_id: F,
|
|
10963
10963
|
overrideUnsettedLimit: C = !1,
|
|
10964
10964
|
values: _ = {}
|
|
10965
|
-
} = O,
|
|
10966
|
-
action:
|
|
10965
|
+
} = O, T = `${V},${v}`, R = await k.getHandler().getActionData({
|
|
10966
|
+
action: T,
|
|
10967
10967
|
context: l
|
|
10968
10968
|
}), M = St({
|
|
10969
10969
|
context: R.context,
|
|
@@ -11014,16 +11014,16 @@ function Ru(e, t) {
|
|
|
11014
11014
|
initialView: z,
|
|
11015
11015
|
action_id: v,
|
|
11016
11016
|
action_type: V,
|
|
11017
|
-
res_id:
|
|
11017
|
+
res_id: S,
|
|
11018
11018
|
treeExpandable: ne,
|
|
11019
11019
|
limit: C && (q === 0 || q === !1) ? Ot : q
|
|
11020
11020
|
});
|
|
11021
11021
|
}
|
|
11022
|
-
async function
|
|
11022
|
+
async function x({
|
|
11023
11023
|
model: O,
|
|
11024
11024
|
values: v,
|
|
11025
11025
|
forced_values: V,
|
|
11026
|
-
initialViewType:
|
|
11026
|
+
initialViewType: S,
|
|
11027
11027
|
res_id: F,
|
|
11028
11028
|
domain: C
|
|
11029
11029
|
}) {
|
|
@@ -11032,7 +11032,7 @@ function Ru(e, t) {
|
|
|
11032
11032
|
action: _,
|
|
11033
11033
|
values: v,
|
|
11034
11034
|
forced_values: V,
|
|
11035
|
-
initialViewType:
|
|
11035
|
+
initialViewType: S,
|
|
11036
11036
|
res_id: F,
|
|
11037
11037
|
domain: C
|
|
11038
11038
|
});
|
|
@@ -11041,11 +11041,11 @@ function Ru(e, t) {
|
|
|
11041
11041
|
domain: O,
|
|
11042
11042
|
context: v,
|
|
11043
11043
|
model: V,
|
|
11044
|
-
views:
|
|
11044
|
+
views: S,
|
|
11045
11045
|
title: F,
|
|
11046
11046
|
target: C,
|
|
11047
11047
|
initialView: _,
|
|
11048
|
-
action_id:
|
|
11048
|
+
action_id: T,
|
|
11049
11049
|
action_type: R,
|
|
11050
11050
|
res_id: M,
|
|
11051
11051
|
values: A,
|
|
@@ -11067,7 +11067,7 @@ function Ru(e, t) {
|
|
|
11067
11067
|
formView: P,
|
|
11068
11068
|
context: { ...l, ...v },
|
|
11069
11069
|
actionData: {
|
|
11070
|
-
action_id:
|
|
11070
|
+
action_id: T,
|
|
11071
11071
|
action_type: R,
|
|
11072
11072
|
res_id: M,
|
|
11073
11073
|
view_id: P.view_id
|
|
@@ -11078,17 +11078,17 @@ function Ru(e, t) {
|
|
|
11078
11078
|
w({
|
|
11079
11079
|
title: F,
|
|
11080
11080
|
action: {
|
|
11081
|
-
id:
|
|
11081
|
+
id: T,
|
|
11082
11082
|
type: R
|
|
11083
11083
|
},
|
|
11084
11084
|
content: /* @__PURE__ */ i(
|
|
11085
11085
|
li,
|
|
11086
11086
|
{
|
|
11087
|
-
action_id:
|
|
11087
|
+
action_id: T,
|
|
11088
11088
|
action_type: R,
|
|
11089
11089
|
tabKey: K,
|
|
11090
11090
|
title: F,
|
|
11091
|
-
views:
|
|
11091
|
+
views: S,
|
|
11092
11092
|
model: V,
|
|
11093
11093
|
context: { ...l, ...v },
|
|
11094
11094
|
domain: O,
|
|
@@ -11111,7 +11111,7 @@ function Ru(e, t) {
|
|
|
11111
11111
|
openShortcut: y,
|
|
11112
11112
|
openAction: I,
|
|
11113
11113
|
openRelate: g,
|
|
11114
|
-
openDefaultActionForModel:
|
|
11114
|
+
openDefaultActionForModel: x,
|
|
11115
11115
|
tabs: c,
|
|
11116
11116
|
activeKey: o,
|
|
11117
11117
|
onRemoveTab: async (O) => {
|
|
@@ -11249,55 +11249,55 @@ const { useToken: Eu } = je, Rf = (e) => {
|
|
|
11249
11249
|
tabs: w,
|
|
11250
11250
|
activeKey: g,
|
|
11251
11251
|
currentView: y,
|
|
11252
|
-
currentId:
|
|
11252
|
+
currentId: x,
|
|
11253
11253
|
openDefaultActionForModel: I
|
|
11254
11254
|
} = h || {}, O = Ie(() => {
|
|
11255
11255
|
if (!y || !y.view_id || !y.extra)
|
|
11256
11256
|
return;
|
|
11257
|
-
const { action_id:
|
|
11258
|
-
if (!
|
|
11257
|
+
const { action_id: T, action_type: R } = y.extra || {};
|
|
11258
|
+
if (!T || !R) {
|
|
11259
11259
|
l(!1);
|
|
11260
11260
|
return;
|
|
11261
11261
|
}
|
|
11262
11262
|
const M = y.view_id;
|
|
11263
11263
|
let A = !1;
|
|
11264
|
-
return y.type === "form" && (A =
|
|
11265
|
-
action_id:
|
|
11264
|
+
return y.type === "form" && (A = x || !1), {
|
|
11265
|
+
action_id: T,
|
|
11266
11266
|
action_type: R,
|
|
11267
11267
|
view_id: M,
|
|
11268
11268
|
res_id: A
|
|
11269
11269
|
};
|
|
11270
|
-
}, [
|
|
11270
|
+
}, [x, y]), v = Ie(() => {
|
|
11271
11271
|
if (O)
|
|
11272
11272
|
return JSON.stringify(O);
|
|
11273
11273
|
}, [O]);
|
|
11274
11274
|
fe(() => {
|
|
11275
|
-
|
|
11275
|
+
S();
|
|
11276
11276
|
}, [v]);
|
|
11277
|
-
function V(
|
|
11278
|
-
const R =
|
|
11277
|
+
function V(T) {
|
|
11278
|
+
const R = T;
|
|
11279
11279
|
(R == null ? void 0 : R.action_type) !== "ir.actions.wizard" && m(R);
|
|
11280
11280
|
}
|
|
11281
|
-
const
|
|
11281
|
+
const S = Q(async () => {
|
|
11282
11282
|
if (!O)
|
|
11283
11283
|
return;
|
|
11284
|
-
const
|
|
11285
|
-
|
|
11284
|
+
const T = await n(O);
|
|
11285
|
+
T !== !1 && f(T), l(T !== !1);
|
|
11286
11286
|
}, [O, n]);
|
|
11287
11287
|
async function F() {
|
|
11288
|
-
var
|
|
11289
|
-
(
|
|
11288
|
+
var T;
|
|
11289
|
+
(T = p == null ? void 0 : p.current) == null || T.close(), I == null || I({ model: "ir.ui.view_sc" });
|
|
11290
11290
|
}
|
|
11291
11291
|
const C = Q(async () => {
|
|
11292
|
-
const
|
|
11293
|
-
return
|
|
11292
|
+
const T = await t();
|
|
11293
|
+
return T.length === 0 ? [
|
|
11294
11294
|
{
|
|
11295
11295
|
label: u == null ? void 0 : u("no_favorites"),
|
|
11296
11296
|
items: []
|
|
11297
11297
|
}
|
|
11298
11298
|
] : [
|
|
11299
11299
|
{
|
|
11300
|
-
items:
|
|
11300
|
+
items: T.map((M) => ({
|
|
11301
11301
|
...M,
|
|
11302
11302
|
id: M.id,
|
|
11303
11303
|
name: M.name,
|
|
@@ -11311,13 +11311,13 @@ const { useToken: Eu } = je, Rf = (e) => {
|
|
|
11311
11311
|
else {
|
|
11312
11312
|
if (!y)
|
|
11313
11313
|
return;
|
|
11314
|
-
const
|
|
11314
|
+
const T = w.find(($) => $.key === g), { id: R, type: M } = (T == null ? void 0 : T.action) || {}, A = y.view_id;
|
|
11315
11315
|
let U = !1;
|
|
11316
11316
|
if (!R || !M) {
|
|
11317
11317
|
l(!1);
|
|
11318
11318
|
return;
|
|
11319
11319
|
}
|
|
11320
|
-
y.type === "form" && (U =
|
|
11320
|
+
y.type === "form" && (U = x || !1), await o({
|
|
11321
11321
|
action_id: R,
|
|
11322
11322
|
action_type: M,
|
|
11323
11323
|
view_id: A,
|
|
@@ -11327,7 +11327,7 @@ const { useToken: Eu } = je, Rf = (e) => {
|
|
|
11327
11327
|
await C(), l(!a);
|
|
11328
11328
|
}, [
|
|
11329
11329
|
g,
|
|
11330
|
-
|
|
11330
|
+
x,
|
|
11331
11331
|
c,
|
|
11332
11332
|
y,
|
|
11333
11333
|
C,
|
|
@@ -11354,8 +11354,8 @@ const { useToken: Eu } = je, Rf = (e) => {
|
|
|
11354
11354
|
}
|
|
11355
11355
|
) }) })
|
|
11356
11356
|
] }),
|
|
11357
|
-
onOpenChange: (
|
|
11358
|
-
|
|
11357
|
+
onOpenChange: (T) => {
|
|
11358
|
+
T || s == null || s();
|
|
11359
11359
|
},
|
|
11360
11360
|
onRetrieveData: C
|
|
11361
11361
|
}
|