@gisce/react-ooui 2.7.0-alpha.7 → 2.7.0-alpha.8
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 +227 -226
- package/dist/react-ooui.es.js.map +1 -1
- package/package.json +1 -1
package/dist/react-ooui.es.js
CHANGED
|
@@ -543,22 +543,22 @@ const fo = (e) => {
|
|
|
543
543
|
params: [["translatable", "=", "1"]],
|
|
544
544
|
fieldsToRetrieve: ["code", "name"],
|
|
545
545
|
model: "res.lang"
|
|
546
|
-
})).map((
|
|
547
|
-
code:
|
|
548
|
-
name:
|
|
546
|
+
})).map((O) => ({
|
|
547
|
+
code: O.code,
|
|
548
|
+
name: O.name
|
|
549
549
|
}));
|
|
550
550
|
return f == null || f(S), S;
|
|
551
551
|
}
|
|
552
552
|
async function T(F) {
|
|
553
553
|
const S = {};
|
|
554
|
-
for (const
|
|
554
|
+
for (const O of F) {
|
|
555
555
|
const x = (await E.getHandler().readObjects({
|
|
556
556
|
model: o,
|
|
557
557
|
ids: [r],
|
|
558
558
|
fieldsToRetrieve: [s],
|
|
559
|
-
context: { lang:
|
|
559
|
+
context: { lang: O.code }
|
|
560
560
|
}))[0];
|
|
561
|
-
S[
|
|
561
|
+
S[O.code] = x[s] || "";
|
|
562
562
|
}
|
|
563
563
|
w.current = S, g(S);
|
|
564
564
|
}
|
|
@@ -570,10 +570,10 @@ const fo = (e) => {
|
|
|
570
570
|
{
|
|
571
571
|
rows: 4,
|
|
572
572
|
value: y[F.code] || "",
|
|
573
|
-
onChange: (
|
|
573
|
+
onChange: (O) => {
|
|
574
574
|
g({
|
|
575
575
|
...y,
|
|
576
|
-
[F.code]:
|
|
576
|
+
[F.code]: O.target.value
|
|
577
577
|
});
|
|
578
578
|
},
|
|
579
579
|
disabled: p
|
|
@@ -1131,7 +1131,7 @@ const ca = (e) => {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
return d ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: d, type: "error", banner: !0 }) : a ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ D(oe, { children: [
|
|
1133
1133
|
/* @__PURE__ */ i(An, { style: { padding: "1rem" }, children: I.map((F, S) => {
|
|
1134
|
-
var
|
|
1134
|
+
var O, x;
|
|
1135
1135
|
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ D(An.Item, { children: [
|
|
1136
1136
|
/* @__PURE__ */ i(
|
|
1137
1137
|
"div",
|
|
@@ -1140,11 +1140,11 @@ const ca = (e) => {
|
|
|
1140
1140
|
onClick: () => {
|
|
1141
1141
|
p(
|
|
1142
1142
|
I.find(
|
|
1143
|
-
(
|
|
1143
|
+
(R) => F.id === R.id
|
|
1144
1144
|
)
|
|
1145
1145
|
), c(!0);
|
|
1146
1146
|
},
|
|
1147
|
-
children: /* @__PURE__ */ i("strong", { children: (
|
|
1147
|
+
children: /* @__PURE__ */ i("strong", { children: (O = F.values) == null ? void 0 : O[C] })
|
|
1148
1148
|
}
|
|
1149
1149
|
),
|
|
1150
1150
|
/* @__PURE__ */ i("br", {}),
|
|
@@ -1155,7 +1155,7 @@ const ca = (e) => {
|
|
|
1155
1155
|
onClick: () => {
|
|
1156
1156
|
p(
|
|
1157
1157
|
I.find(
|
|
1158
|
-
(
|
|
1158
|
+
(R) => F.id === R.id
|
|
1159
1159
|
)
|
|
1160
1160
|
), c(!0);
|
|
1161
1161
|
},
|
|
@@ -1396,9 +1396,9 @@ const Rt = ({
|
|
|
1396
1396
|
fieldsToRetrieve: [y],
|
|
1397
1397
|
context: { ...w == null ? void 0 : w(), ...p }
|
|
1398
1398
|
})).map((S) => {
|
|
1399
|
-
const
|
|
1400
|
-
let x =
|
|
1401
|
-
return Array.isArray(
|
|
1399
|
+
const O = S[y];
|
|
1400
|
+
let x = O;
|
|
1401
|
+
return Array.isArray(O) && (x = O[1]), { label: x, value: S.id };
|
|
1402
1402
|
});
|
|
1403
1403
|
l(F);
|
|
1404
1404
|
} catch (_) {
|
|
@@ -1416,14 +1416,14 @@ const Rt = ({
|
|
|
1416
1416
|
_.push({ id: S, operation: "pendingLink" });
|
|
1417
1417
|
}), C(_);
|
|
1418
1418
|
}, b = (V) => {
|
|
1419
|
-
const { label: _, closable: F, onClose: S } = V,
|
|
1420
|
-
|
|
1419
|
+
const { label: _, closable: F, onClose: S } = V, O = (R) => {
|
|
1420
|
+
R.preventDefault(), R.stopPropagation();
|
|
1421
1421
|
}, x = zt(_);
|
|
1422
1422
|
return /* @__PURE__ */ i(
|
|
1423
1423
|
ar,
|
|
1424
1424
|
{
|
|
1425
1425
|
color: x,
|
|
1426
|
-
onMouseDown:
|
|
1426
|
+
onMouseDown: O,
|
|
1427
1427
|
closable: F,
|
|
1428
1428
|
onClose: S,
|
|
1429
1429
|
closeIcon: /* @__PURE__ */ i("span", { style: { color: x }, children: "X" }),
|
|
@@ -1682,7 +1682,7 @@ const Rt = ({
|
|
|
1682
1682
|
setSearchTreeNameSearch: _,
|
|
1683
1683
|
goToResourceId: F,
|
|
1684
1684
|
limit: S
|
|
1685
|
-
} = e, [
|
|
1685
|
+
} = e, [O, x] = v(!1), [R, A] = v(!1), [P, K] = v(!1), [j, W] = v(!0), [k, Y] = v(!0), [U, X] = v([]), [z, H] = v(!1), [M, L] = v([]), [$, de] = v(!1), [Z, ne] = v(!0), [ye, Q] = v(), [se, xe] = v({}), [Ae, De] = v(
|
|
1686
1686
|
S !== void 0 ? S : Ft
|
|
1687
1687
|
), [Pe, fe] = v(o);
|
|
1688
1688
|
ue(() => {
|
|
@@ -1714,9 +1714,9 @@ const Rt = ({
|
|
|
1714
1714
|
currentView: n,
|
|
1715
1715
|
setCurrentView: r,
|
|
1716
1716
|
availableViews: s,
|
|
1717
|
-
formIsSaving:
|
|
1717
|
+
formIsSaving: O,
|
|
1718
1718
|
setFormIsSaving: x,
|
|
1719
|
-
formHasChanges:
|
|
1719
|
+
formHasChanges: R,
|
|
1720
1720
|
setFormHasChanges: A,
|
|
1721
1721
|
formRef: a,
|
|
1722
1722
|
searchTreeRef: l,
|
|
@@ -1814,8 +1814,8 @@ const Rt = ({
|
|
|
1814
1814
|
}
|
|
1815
1815
|
);
|
|
1816
1816
|
async function g(_) {
|
|
1817
|
-
const { reportData: F, fields: S, values:
|
|
1818
|
-
context:
|
|
1817
|
+
const { reportData: F, fields: S, values: O, context: x = {} } = _, {
|
|
1818
|
+
context: R,
|
|
1819
1819
|
model: A,
|
|
1820
1820
|
datas: P = {},
|
|
1821
1821
|
report_name: K,
|
|
@@ -1825,11 +1825,11 @@ const Rt = ({
|
|
|
1825
1825
|
Xe(`${j} action not supported`);
|
|
1826
1826
|
return;
|
|
1827
1827
|
}
|
|
1828
|
-
const { ids: W } = P || {}, k = W || [], Y = typeof
|
|
1829
|
-
context:
|
|
1828
|
+
const { ids: W } = P || {}, k = W || [], Y = typeof R == "string" ? St({
|
|
1829
|
+
context: R,
|
|
1830
1830
|
fields: S,
|
|
1831
|
-
values:
|
|
1832
|
-
}) :
|
|
1831
|
+
values: O
|
|
1832
|
+
}) : R;
|
|
1833
1833
|
try {
|
|
1834
1834
|
const U = await E.getHandler().createReport({
|
|
1835
1835
|
model: A,
|
|
@@ -1863,47 +1863,47 @@ const Rt = ({
|
|
|
1863
1863
|
actionData: _,
|
|
1864
1864
|
fields: F,
|
|
1865
1865
|
values: S,
|
|
1866
|
-
context:
|
|
1866
|
+
context: O,
|
|
1867
1867
|
onRefreshParentValues: x
|
|
1868
1868
|
}) {
|
|
1869
|
-
const { type:
|
|
1870
|
-
if (f.current.push(x),
|
|
1869
|
+
const { type: R } = _;
|
|
1870
|
+
if (f.current.push(x), R === "ir.actions.report.xml")
|
|
1871
1871
|
return await g({
|
|
1872
1872
|
reportData: _,
|
|
1873
1873
|
fields: F,
|
|
1874
1874
|
values: S,
|
|
1875
|
-
context:
|
|
1875
|
+
context: O
|
|
1876
1876
|
});
|
|
1877
|
-
if (
|
|
1878
|
-
return await I({ actionData: _, fields: F, values: S, context:
|
|
1879
|
-
if (
|
|
1877
|
+
if (R === "ir.actions.act_window")
|
|
1878
|
+
return await I({ actionData: _, fields: F, values: S, context: O });
|
|
1879
|
+
if (R === "ir.actions.act_url")
|
|
1880
1880
|
window.open(
|
|
1881
|
-
va(_.url, { ...S, context:
|
|
1881
|
+
va(_.url, { ...S, context: O }),
|
|
1882
1882
|
"_blank"
|
|
1883
1883
|
);
|
|
1884
1884
|
else
|
|
1885
|
-
return Xe(`${
|
|
1885
|
+
return Xe(`${R} action not supported`), {};
|
|
1886
1886
|
}
|
|
1887
1887
|
async function I({
|
|
1888
1888
|
actionData: _,
|
|
1889
1889
|
fields: F = {},
|
|
1890
1890
|
values: S = {},
|
|
1891
|
-
context:
|
|
1891
|
+
context: O = {}
|
|
1892
1892
|
}) {
|
|
1893
1893
|
var K;
|
|
1894
1894
|
let x = _;
|
|
1895
1895
|
_.res_model || (x = (await E.getHandler().readObjects({
|
|
1896
1896
|
model: "ir.actions.act_window",
|
|
1897
1897
|
ids: [parseInt(_.id)],
|
|
1898
|
-
context:
|
|
1898
|
+
context: O
|
|
1899
1899
|
}))[0]);
|
|
1900
|
-
const
|
|
1900
|
+
const R = typeof (x == null ? void 0 : x.context) == "string" ? St({
|
|
1901
1901
|
context: x.context,
|
|
1902
1902
|
fields: F,
|
|
1903
1903
|
values: { ...S, ...o }
|
|
1904
1904
|
}) : x.context, A = {
|
|
1905
|
-
...
|
|
1906
|
-
...
|
|
1905
|
+
...O,
|
|
1906
|
+
...R
|
|
1907
1907
|
};
|
|
1908
1908
|
let P = [];
|
|
1909
1909
|
if (x.domain && (P = await E.getHandler().evalDomain({
|
|
@@ -1951,16 +1951,16 @@ const Rt = ({
|
|
|
1951
1951
|
domain: _,
|
|
1952
1952
|
model: F,
|
|
1953
1953
|
formView: S,
|
|
1954
|
-
context:
|
|
1954
|
+
context: O,
|
|
1955
1955
|
actionData: x
|
|
1956
1956
|
}) {
|
|
1957
|
-
h ? b({ domain: _, model: F, formView: S, context:
|
|
1957
|
+
h ? b({ domain: _, model: F, formView: S, context: O, actionData: x }) : (y({ domain: _, model: F, context: O, formView: S, actionData: x }), p(!0));
|
|
1958
1958
|
}
|
|
1959
1959
|
async function b({
|
|
1960
1960
|
domain: _,
|
|
1961
1961
|
model: F,
|
|
1962
1962
|
formView: S,
|
|
1963
|
-
context:
|
|
1963
|
+
context: O,
|
|
1964
1964
|
actionData: x
|
|
1965
1965
|
}) {
|
|
1966
1966
|
y({
|
|
@@ -1969,7 +1969,7 @@ const Rt = ({
|
|
|
1969
1969
|
context: {},
|
|
1970
1970
|
formView: void 0,
|
|
1971
1971
|
actionData: void 0
|
|
1972
|
-
}), p(!1), await new Promise((
|
|
1972
|
+
}), p(!1), await new Promise((R) => setTimeout(R, 300)), y({ domain: _, model: F, context: O, formView: S, actionData: x }), p(!0);
|
|
1973
1973
|
}
|
|
1974
1974
|
async function V() {
|
|
1975
1975
|
Ar(f.current), f.current = [], p(!1), y({
|
|
@@ -2124,7 +2124,7 @@ function Ka(e, t) {
|
|
|
2124
2124
|
defaultValues: b,
|
|
2125
2125
|
forcedValues: V = {},
|
|
2126
2126
|
parentWidth: _
|
|
2127
|
-
} = e, { t: F } = he(), [S,
|
|
2127
|
+
} = e, { t: F } = he(), [S, O] = v(!1), [x, R] = v(), [A, P] = v(), [K] = lt.useForm(), [j, W] = v(), [k, Y] = v(), U = ee(So), [X, z] = v(), [H, M] = v(!1), L = re(), $ = re({}), de = re({}), Z = re(!1), ne = re(!1), ye = re(!1), se = (_ !== void 0 ? _ : X) < ja, xe = ee($e), { activeId: Ae, getPlainValues: De } = xe || {}, Pe = ee(
|
|
2128
2128
|
nt
|
|
2129
2129
|
), {
|
|
2130
2130
|
setFormIsSaving: fe = void 0,
|
|
@@ -2149,7 +2149,7 @@ function Ka(e, t) {
|
|
|
2149
2149
|
L.current = void 0, P(void 0), Kt();
|
|
2150
2150
|
}
|
|
2151
2151
|
})), ue(() => {
|
|
2152
|
-
if (
|
|
2152
|
+
if (R(void 0), !(!n && !m)) {
|
|
2153
2153
|
if (!I) {
|
|
2154
2154
|
L.current = void 0, P(void 0);
|
|
2155
2155
|
return;
|
|
@@ -2248,7 +2248,7 @@ function Ka(e, t) {
|
|
|
2248
2248
|
}
|
|
2249
2249
|
}
|
|
2250
2250
|
const Kt = async () => {
|
|
2251
|
-
|
|
2251
|
+
R(void 0), ae == null || ae(!0);
|
|
2252
2252
|
let N;
|
|
2253
2253
|
try {
|
|
2254
2254
|
m ? N = { arch: m.arch, fields: m.fields } : N = await ot();
|
|
@@ -2258,11 +2258,11 @@ function Ka(e, t) {
|
|
|
2258
2258
|
arch: te
|
|
2259
2259
|
});
|
|
2260
2260
|
} catch (B) {
|
|
2261
|
-
|
|
2261
|
+
R(B != null && B.message ? B.message + B.stack : B), ae == null || ae(!1);
|
|
2262
2262
|
}
|
|
2263
2263
|
}, at = async (N) => {
|
|
2264
2264
|
let B, te, ie, Se;
|
|
2265
|
-
ae == null || ae(!0),
|
|
2265
|
+
ae == null || ae(!0), R(void 0), N != null && N.fields ? (te = N.fields, ie = N.arch) : (te = k, ie = j), p && (N == null ? void 0 : N.forceRefresh) !== !0 ? B = p : { values: B, defaultGetCalled: Se } = await Zo({
|
|
2266
2266
|
fields: te,
|
|
2267
2267
|
arch: ie
|
|
2268
2268
|
}), C && (B = { ...ya(C), ...B }), $.current = _t(B, te), ut({
|
|
@@ -2372,7 +2372,7 @@ function Ka(e, t) {
|
|
|
2372
2372
|
}, nn = async (N) => {
|
|
2373
2373
|
let B = !1;
|
|
2374
2374
|
const { callOnSubmitSucceed: te = !0 } = N || {};
|
|
2375
|
-
if (ne.current = !0,
|
|
2375
|
+
if (ne.current = !0, R(void 0), ye.current && !tt() && ce() && te) {
|
|
2376
2376
|
ne.current = !1, Ie == null || Ie(!1), pe == null || pe(
|
|
2377
2377
|
ce(),
|
|
2378
2378
|
Me(),
|
|
@@ -2386,13 +2386,13 @@ function Ka(e, t) {
|
|
|
2386
2386
|
return ne.current = !1, Ie == null || Ie(!1), we == null || we(), { succeed: !0, id: ce() };
|
|
2387
2387
|
if (await tn())
|
|
2388
2388
|
return ne.current = !1, _r(F), { succeed: !1, id: ce() };
|
|
2389
|
-
|
|
2389
|
+
O(!0), fe == null || fe(!0);
|
|
2390
2390
|
try {
|
|
2391
2391
|
h === "api" ? await fr(N) : await ei(N), c && (L.current = void 0, ut({ values: {}, fields: k, reset: !0 })), await at({ forceRefresh: !0 }), B = !0, In.success(F("savedRegisters"));
|
|
2392
2392
|
} catch (ie) {
|
|
2393
|
-
ne.current = !1,
|
|
2393
|
+
ne.current = !1, O(!1), fe == null || fe(!1), be == null || be(ie), In.error(F("errorWhileSavingForm")), R(ie != null && ie.message ? ie.message : ie);
|
|
2394
2394
|
} finally {
|
|
2395
|
-
ne.current = !1, fe == null || fe(!1),
|
|
2395
|
+
ne.current = !1, fe == null || fe(!1), O(!1);
|
|
2396
2396
|
}
|
|
2397
2397
|
return { succeed: B, id: ce() };
|
|
2398
2398
|
}, Wt = ({
|
|
@@ -2724,12 +2724,12 @@ const Ht = ht(Ka), Bt = (e) => {
|
|
|
2724
2724
|
shortcut_id: y
|
|
2725
2725
|
});
|
|
2726
2726
|
else {
|
|
2727
|
-
const { action_id: S, res_id:
|
|
2727
|
+
const { action_id: S, res_id: O, action_type: x, view_id: R } = l;
|
|
2728
2728
|
await E.getHandler().addFavourite({
|
|
2729
2729
|
action_id: S,
|
|
2730
2730
|
action_type: x,
|
|
2731
|
-
view_id:
|
|
2732
|
-
res_id:
|
|
2731
|
+
view_id: R,
|
|
2732
|
+
res_id: O || !1
|
|
2733
2733
|
});
|
|
2734
2734
|
}
|
|
2735
2735
|
m(!p);
|
|
@@ -3143,31 +3143,31 @@ function Fo(e) {
|
|
|
3143
3143
|
const _ = () => {
|
|
3144
3144
|
if (!g)
|
|
3145
3145
|
return;
|
|
3146
|
-
const
|
|
3147
|
-
return x == null ? void 0 : x.map((
|
|
3146
|
+
const O = C ? g : m, x = O == null ? void 0 : O.rows;
|
|
3147
|
+
return x == null ? void 0 : x.map((R, A) => /* @__PURE__ */ i(Ve, { children: R.map((P, K) => /* @__PURE__ */ i(ge, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(rl, { field: P }) }, K)) }, A));
|
|
3148
3148
|
};
|
|
3149
3149
|
bt(() => {
|
|
3150
3150
|
I(!1), T.current = new Ri(n, t), T.current.parse(), y(T.current._simpleSearchContainer), w(T.current._advancedSearchContainer);
|
|
3151
3151
|
}, [t, n]);
|
|
3152
|
-
const F = _(), S = (
|
|
3152
|
+
const F = _(), S = (O) => {
|
|
3153
3153
|
var P;
|
|
3154
|
-
const { limit: x, offset:
|
|
3155
|
-
delete
|
|
3154
|
+
const { limit: x, offset: R } = O;
|
|
3155
|
+
delete O.offset, delete O.limit;
|
|
3156
3156
|
const A = sl(
|
|
3157
|
-
|
|
3157
|
+
O,
|
|
3158
3158
|
(P = T.current) == null ? void 0 : P._advancedSearchContainer
|
|
3159
3159
|
);
|
|
3160
|
-
r({ params: A, offset:
|
|
3160
|
+
r({ params: A, offset: R, limit: x, searchValues: O });
|
|
3161
3161
|
};
|
|
3162
3162
|
return /* @__PURE__ */ i(
|
|
3163
3163
|
rr,
|
|
3164
3164
|
{
|
|
3165
3165
|
bounds: !0,
|
|
3166
|
-
onResize: (
|
|
3166
|
+
onResize: (O) => {
|
|
3167
3167
|
var x;
|
|
3168
|
-
f == null || f((x =
|
|
3168
|
+
f == null || f((x = O.bounds) == null ? void 0 : x.height);
|
|
3169
3169
|
},
|
|
3170
|
-
children: ({ measureRef:
|
|
3170
|
+
children: ({ measureRef: O }) => /* @__PURE__ */ i("div", { ref: O, children: /* @__PURE__ */ D("div", { style: { display: u ? "block" : "none" }, children: [
|
|
3171
3171
|
/* @__PURE__ */ D(
|
|
3172
3172
|
lt,
|
|
3173
3173
|
{
|
|
@@ -3777,18 +3777,18 @@ const Fl = (e) => {
|
|
|
3777
3777
|
context: b,
|
|
3778
3778
|
readonly: V,
|
|
3779
3779
|
onSelectAllRecords: _
|
|
3780
|
-
} = e, F = re(null), [S,
|
|
3780
|
+
} = e, F = re(null), [S, O] = v([]), x = re(!1), [R, A] = v(), { t: P } = he(), K = re(o), j = ee(
|
|
3781
3781
|
nt
|
|
3782
3782
|
), { title: W = void 0, setTitle: k = void 0 } = (T ? j : {}) || {}, Y = Fe(() => {
|
|
3783
|
-
if (
|
|
3783
|
+
if (R)
|
|
3784
3784
|
return wo(
|
|
3785
|
-
|
|
3785
|
+
R,
|
|
3786
3786
|
{
|
|
3787
3787
|
...Vo
|
|
3788
3788
|
},
|
|
3789
3789
|
b
|
|
3790
3790
|
);
|
|
3791
|
-
}, [b,
|
|
3791
|
+
}, [b, R]);
|
|
3792
3792
|
pt(t, () => ({
|
|
3793
3793
|
unselectAll: () => {
|
|
3794
3794
|
var Z;
|
|
@@ -3798,11 +3798,11 @@ const Fl = (e) => {
|
|
|
3798
3798
|
const Z = Tt(s);
|
|
3799
3799
|
A(Z), Z.string && W !== Z.string && (k == null || k(Z.string));
|
|
3800
3800
|
}, [s, W]), ue(() => {
|
|
3801
|
-
if (!
|
|
3801
|
+
if (!R)
|
|
3802
3802
|
return;
|
|
3803
3803
|
x.current = !1;
|
|
3804
|
-
const Z = ir(
|
|
3805
|
-
|
|
3804
|
+
const Z = ir(R, a);
|
|
3805
|
+
O(Z);
|
|
3806
3806
|
}, [a]), ue(() => {
|
|
3807
3807
|
K.current = o;
|
|
3808
3808
|
}, [o]);
|
|
@@ -3847,9 +3847,9 @@ const Fl = (e) => {
|
|
|
3847
3847
|
r,
|
|
3848
3848
|
s.isExpandable
|
|
3849
3849
|
]), M = Fe(() => {
|
|
3850
|
-
if (!
|
|
3850
|
+
if (!R)
|
|
3851
3851
|
return null;
|
|
3852
|
-
const Z =
|
|
3852
|
+
const Z = R.columns.filter((Q) => Q.sum !== void 0).map((Q) => ({ label: Q.sum, field: Q.id }));
|
|
3853
3853
|
if (!Z || Z.length === 0)
|
|
3854
3854
|
return null;
|
|
3855
3855
|
const ne = [], ye = (c == null ? void 0 : c.length) > 0 ? S.filter((Q) => c.includes(Q.id)) : S;
|
|
@@ -3857,11 +3857,11 @@ const Fl = (e) => {
|
|
|
3857
3857
|
const se = ye.reduce((xe, Ae) => Ae[Q.field] && !isNaN(Ae[Q.field]) ? xe + Ae[Q.field] : xe, 0);
|
|
3858
3858
|
ne.push(`${Q.label}: ${Math.round(se * 100) / 100}`);
|
|
3859
3859
|
}), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ne.join(", ") });
|
|
3860
|
-
}, [S, c,
|
|
3861
|
-
if (
|
|
3860
|
+
}, [S, c, R]), L = Fe(() => {
|
|
3861
|
+
if (R !== null && Y && Y.length > 0)
|
|
3862
3862
|
return pl(Y, S, 600);
|
|
3863
|
-
}, [Y, S,
|
|
3864
|
-
return
|
|
3863
|
+
}, [Y, S, R]), $ = Fe(() => p && (R != null && R.columns.some((Z) => Z.sum !== void 0)) ? p - 30 : p, [p, R == null ? void 0 : R.columns]);
|
|
3864
|
+
return R === null || !L || ((de = L == null ? void 0 : L.columns) == null ? void 0 : de.length) === 0 ? /* @__PURE__ */ i(je, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(co, { children: [
|
|
3865
3865
|
H,
|
|
3866
3866
|
/* @__PURE__ */ i(
|
|
3867
3867
|
fs,
|
|
@@ -3926,7 +3926,7 @@ const Ao = (e) => {
|
|
|
3926
3926
|
searchParams: V = [],
|
|
3927
3927
|
setSearchValues: _,
|
|
3928
3928
|
clearSelection: F
|
|
3929
|
-
} = e, [S,
|
|
3929
|
+
} = e, [S, O] = v(!1), [x, R] = v(!1), [A, P] = v(), [K, j] = v(1), [W, k] = v(0), [Y, U] = v(), [X, z] = v([]), [H, M] = v(void 0), [L, $] = v(void 0), de = re(T || Ft), Z = re([]), ne = J(
|
|
3930
3930
|
(ae) => {
|
|
3931
3931
|
g == null || g([...ae]), z([...ae]);
|
|
3932
3932
|
},
|
|
@@ -3959,7 +3959,7 @@ const Ao = (e) => {
|
|
|
3959
3959
|
ne(we), pe.length > 0 ? y == null || y(0) : y == null || y(void 0);
|
|
3960
3960
|
} else
|
|
3961
3961
|
ne([]), y == null || y(void 0);
|
|
3962
|
-
|
|
3962
|
+
O(!1), d.current = !0;
|
|
3963
3963
|
}, [
|
|
3964
3964
|
ne,
|
|
3965
3965
|
d,
|
|
@@ -3998,7 +3998,7 @@ const Ao = (e) => {
|
|
|
3998
3998
|
Me === -1 ? y == null || y(0) : y == null || y(Me);
|
|
3999
3999
|
} else
|
|
4000
4000
|
y == null || y(void 0);
|
|
4001
|
-
|
|
4001
|
+
O(!1);
|
|
4002
4002
|
const We = await pe;
|
|
4003
4003
|
U(We), f == null || f(We);
|
|
4004
4004
|
},
|
|
@@ -4020,11 +4020,11 @@ const Ao = (e) => {
|
|
|
4020
4020
|
), xe = J(
|
|
4021
4021
|
async (ae) => {
|
|
4022
4022
|
try {
|
|
4023
|
-
|
|
4023
|
+
O(!0), a == null || a(!0), l && !d.current ? await Q() : await se(ae), F == null || F();
|
|
4024
4024
|
} catch (me) {
|
|
4025
|
-
P(typeof me == "string" ? me : me.message),
|
|
4025
|
+
P(typeof me == "string" ? me : me.message), O(!1);
|
|
4026
4026
|
} finally {
|
|
4027
|
-
o == null || o([]),
|
|
4027
|
+
o == null || o([]), R(!1), a == null || a(!1);
|
|
4028
4028
|
}
|
|
4029
4029
|
},
|
|
4030
4030
|
[
|
|
@@ -4059,7 +4059,7 @@ const Ao = (e) => {
|
|
|
4059
4059
|
), De = J(
|
|
4060
4060
|
(ae) => {
|
|
4061
4061
|
const { params: me, searchValues: Ee, limit: He, offset: G } = ae;
|
|
4062
|
-
S || (n == null || n(void 0), o == null || o([]), _ == null || _(Ee), r == null || r(me), s == null || s(!1),
|
|
4062
|
+
S || (n == null || n(void 0), o == null || o([]), _ == null || _(Ee), r == null || r(me), s == null || s(!1), R(!0), P(void 0), j(1), He && (de.current = He, b == null || b(He)), G && k(G), xe({
|
|
4063
4063
|
params: me,
|
|
4064
4064
|
newOffset: G
|
|
4065
4065
|
}));
|
|
@@ -4076,9 +4076,9 @@ const Ao = (e) => {
|
|
|
4076
4076
|
]
|
|
4077
4077
|
), Pe = J(
|
|
4078
4078
|
(ae) => {
|
|
4079
|
-
|
|
4079
|
+
O(!0), j(ae), k((ae - 1) * T);
|
|
4080
4080
|
},
|
|
4081
|
-
[
|
|
4081
|
+
[O, T, k, j]
|
|
4082
4082
|
), fe = J(() => {
|
|
4083
4083
|
S || (n == null || n(void 0), r == null || r([]), _ == null || _({}), P(void 0), k(0), j(1), b == null || b(T || Ft));
|
|
4084
4084
|
}, [
|
|
@@ -4139,7 +4139,7 @@ function Bl(e, t) {
|
|
|
4139
4139
|
rootTree: f = !1,
|
|
4140
4140
|
parentContext: c = {},
|
|
4141
4141
|
onChangeSelectedRowKeys: h
|
|
4142
|
-
} = e, [p, m] = v(!1), [y, g] = v(!1), w = re(!1), C = re(null), [I, T] = v(), [b, V] = v(), [_, F] = v(), [S,
|
|
4142
|
+
} = e, [p, m] = v(!1), [y, g] = v(!1), w = re(!1), C = re(null), [I, T] = v(), [b, V] = v(), [_, F] = v(), [S, O] = v(), [x, R] = v(200), A = re(), { height: P } = gn(), K = ee(
|
|
4143
4143
|
$t
|
|
4144
4144
|
), { processAction: j } = K || {}, W = ee(
|
|
4145
4145
|
nt
|
|
@@ -4222,11 +4222,11 @@ function Bl(e, t) {
|
|
|
4222
4222
|
y && u && b && (w.current = !1, ae());
|
|
4223
4223
|
}, [G, ke, y, u, a, b]);
|
|
4224
4224
|
const Oe = async () => {
|
|
4225
|
-
g(!1), m(!0),
|
|
4225
|
+
g(!1), m(!0), O(void 0), se == null || se(!0);
|
|
4226
4226
|
try {
|
|
4227
4227
|
await Te(), g(!0);
|
|
4228
4228
|
} catch (Be) {
|
|
4229
|
-
|
|
4229
|
+
O(Be), se == null || se(!1);
|
|
4230
4230
|
} finally {
|
|
4231
4231
|
m(!1);
|
|
4232
4232
|
}
|
|
@@ -4313,7 +4313,7 @@ function Bl(e, t) {
|
|
|
4313
4313
|
isSearching: Ee,
|
|
4314
4314
|
onSubmit: Ie,
|
|
4315
4315
|
onLimitChange: Re,
|
|
4316
|
-
setSearchFilterHeight:
|
|
4316
|
+
setSearchFilterHeight: R,
|
|
4317
4317
|
searchError: He,
|
|
4318
4318
|
searchVisible: $,
|
|
4319
4319
|
searchValues: xe
|
|
@@ -4496,14 +4496,14 @@ const Do = ht(Bl), cr = (e) => {
|
|
|
4496
4496
|
context: l,
|
|
4497
4497
|
id: d,
|
|
4498
4498
|
domain: u
|
|
4499
|
-
} = o, f = r && !a ? { backgroundColor: Eo.colorPrimaryBg } : void 0, [c, h] = v(!1), [p, m] = v(!1), [y, g] = v(!1), [w, C] = v(), I = re(!1), [T, b] = v(""), V = re(), _ = ee($e), { domain: F, getValues: S, getFields:
|
|
4499
|
+
} = o, f = r && !a ? { backgroundColor: Eo.colorPrimaryBg } : void 0, [c, h] = v(!1), [p, m] = v(!1), [y, g] = v(!1), [w, C] = v(), I = re(!1), [T, b] = v(""), V = re(), _ = ee($e), { domain: F, getValues: S, getFields: O, getContext: x, elementHasLostFocus: R } = _ || {}, A = re([]), [P, K] = v([]), j = t && t[0] || void 0, W = t && t[1] || "";
|
|
4500
4500
|
ue(() => {
|
|
4501
4501
|
!Array.isArray(t) && t && z(t);
|
|
4502
4502
|
}, [t]), ue(() => {
|
|
4503
4503
|
j && W.length === 0 ? z(j) : j && W.length > 0 ? b(W) : !j && !W && b(V.current || "");
|
|
4504
4504
|
}, [t]);
|
|
4505
4505
|
const k = ($) => {
|
|
4506
|
-
n == null || n($),
|
|
4506
|
+
n == null || n($), R == null || R();
|
|
4507
4507
|
}, Y = ($) => {
|
|
4508
4508
|
V.current = $.target.value, k([void 0, ""]);
|
|
4509
4509
|
}, U = async () => {
|
|
@@ -4562,10 +4562,10 @@ const Do = ht(Bl), cr = (e) => {
|
|
|
4562
4562
|
u && (A.current = await E.getHandler().evalDomain({
|
|
4563
4563
|
domain: u,
|
|
4564
4564
|
values: Rt({
|
|
4565
|
-
fields:
|
|
4565
|
+
fields: O(),
|
|
4566
4566
|
values: S()
|
|
4567
4567
|
}),
|
|
4568
|
-
fields:
|
|
4568
|
+
fields: O(),
|
|
4569
4569
|
context: x()
|
|
4570
4570
|
})), F && F.length > 0 && (A.current = A.current.concat(
|
|
4571
4571
|
Un({
|
|
@@ -4860,11 +4860,11 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
4860
4860
|
field: u,
|
|
4861
4861
|
operator: f,
|
|
4862
4862
|
manualIds: c
|
|
4863
|
-
} = e, [h, p] = v(!1), [m, y] = v(), [g, w] = v(), [C, I] = v(), [T, b] = v(), [V, _] = v(), [F, S] = v(), [
|
|
4863
|
+
} = e, [h, p] = v(!1), [m, y] = v(), [g, w] = v(), [C, I] = v(), [T, b] = v(), [V, _] = v(), [F, S] = v(), [O] = Je(
|
|
4864
4864
|
E.getHandler().searchAllIds
|
|
4865
4865
|
), [x] = Je(
|
|
4866
4866
|
E.getHandler().readObjects
|
|
4867
|
-
), [
|
|
4867
|
+
), [R] = Je(
|
|
4868
4868
|
E.getHandler().searchCount
|
|
4869
4869
|
), [A] = Je(
|
|
4870
4870
|
E.getHandler().evalDomain
|
|
@@ -4881,7 +4881,7 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
4881
4881
|
if (Y)
|
|
4882
4882
|
return await j({ domain: k });
|
|
4883
4883
|
if (u && f) {
|
|
4884
|
-
const U = c || await
|
|
4884
|
+
const U = c || await O({
|
|
4885
4885
|
params: k,
|
|
4886
4886
|
model: t,
|
|
4887
4887
|
context: o
|
|
@@ -4896,7 +4896,7 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
4896
4896
|
operator: f
|
|
4897
4897
|
});
|
|
4898
4898
|
} else
|
|
4899
|
-
return c ? c.length : await
|
|
4899
|
+
return c ? c.length : await R({
|
|
4900
4900
|
model: t,
|
|
4901
4901
|
params: k,
|
|
4902
4902
|
context: o
|
|
@@ -4904,7 +4904,7 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
4904
4904
|
}
|
|
4905
4905
|
async function j({ domain: k }) {
|
|
4906
4906
|
if (u && f) {
|
|
4907
|
-
const Y = await
|
|
4907
|
+
const Y = await O({
|
|
4908
4908
|
params: k,
|
|
4909
4909
|
model: t,
|
|
4910
4910
|
context: o
|
|
@@ -4919,7 +4919,7 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
4919
4919
|
operator: f
|
|
4920
4920
|
});
|
|
4921
4921
|
} else
|
|
4922
|
-
return await
|
|
4922
|
+
return await R({
|
|
4923
4923
|
model: t,
|
|
4924
4924
|
params: k,
|
|
4925
4925
|
context: o
|
|
@@ -5011,8 +5011,8 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
5011
5011
|
search: T
|
|
5012
5012
|
}
|
|
5013
5013
|
}));
|
|
5014
|
-
} catch (
|
|
5015
|
-
c("Error fetching graph data values: " + JSON.stringify(
|
|
5014
|
+
} catch (O) {
|
|
5015
|
+
c("Error fetching graph data values: " + JSON.stringify(O)), u(!1);
|
|
5016
5016
|
return;
|
|
5017
5017
|
}
|
|
5018
5018
|
try {
|
|
@@ -5026,7 +5026,7 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
5026
5026
|
fetchData: b
|
|
5027
5027
|
};
|
|
5028
5028
|
y(F);
|
|
5029
|
-
const
|
|
5029
|
+
const O = Xl({
|
|
5030
5030
|
ooui: V,
|
|
5031
5031
|
values: F,
|
|
5032
5032
|
fields: S,
|
|
@@ -5034,9 +5034,9 @@ const wn = () => /* @__PURE__ */ i(
|
|
|
5034
5034
|
uninformedString: a
|
|
5035
5035
|
}
|
|
5036
5036
|
});
|
|
5037
|
-
c(void 0), p(
|
|
5038
|
-
} catch (
|
|
5039
|
-
c("Error processing graph data: " +
|
|
5037
|
+
c(void 0), p(O);
|
|
5038
|
+
} catch (O) {
|
|
5039
|
+
c("Error processing graph data: " + O), u(!1);
|
|
5040
5040
|
return;
|
|
5041
5041
|
}
|
|
5042
5042
|
u(!1);
|
|
@@ -5662,7 +5662,7 @@ const pc = (e) => {
|
|
|
5662
5662
|
var Me;
|
|
5663
5663
|
const { value: t, onChange: n, ooui: o, views: r } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = ee(
|
|
5664
5664
|
jt
|
|
5665
|
-
), f = ee($e), { activeId: c, getFields: h, getValues: p, getContext: m, domain: y } = f || {}, { t: g } = he(), [w, C] = v(!1), [I, T] = v(!1), [b, V] = v(), [_, F] = v(!1), [S,
|
|
5665
|
+
), f = ee($e), { activeId: c, getFields: h, getValues: p, getContext: m, domain: y } = f || {}, { t: g } = he(), [w, C] = v(!1), [I, T] = v(!1), [b, V] = v(), [_, F] = v(!1), [S, O] = v(!1), [x, R] = v(), [A, P] = v([]), [K, j] = v(!1), W = re([]), [k, Y] = v(), U = re(), [X, z] = v(void 0), {
|
|
5666
5666
|
readOnly: H,
|
|
5667
5667
|
relation: M,
|
|
5668
5668
|
context: L,
|
|
@@ -5790,12 +5790,12 @@ const pc = (e) => {
|
|
|
5790
5790
|
const { inv_field: q } = o;
|
|
5791
5791
|
let le;
|
|
5792
5792
|
q && c && (le = { [q]: c }), a === "form" ? ae(() => {
|
|
5793
|
-
j(!0),
|
|
5794
|
-
}) : (j(!0),
|
|
5793
|
+
j(!0), R({ defaultValues: le }), F(!0);
|
|
5794
|
+
}) : (j(!0), R({ defaultValues: le }), F(!0));
|
|
5795
5795
|
}, He = async () => {
|
|
5796
5796
|
a === "form" ? ae(() => {
|
|
5797
|
-
|
|
5798
|
-
}) :
|
|
5797
|
+
O(!0);
|
|
5798
|
+
}) : O(!0);
|
|
5799
5799
|
}, G = async () => {
|
|
5800
5800
|
T(!0), C(!1), V(void 0);
|
|
5801
5801
|
try {
|
|
@@ -5856,7 +5856,7 @@ const pc = (e) => {
|
|
|
5856
5856
|
const { id: le } = q;
|
|
5857
5857
|
let Oe = s;
|
|
5858
5858
|
const Te = s.find((Re) => Re.id === le);
|
|
5859
|
-
(Te == null ? void 0 : Te.values) === void 0 && (Oe = await Ae("form")),
|
|
5859
|
+
(Te == null ? void 0 : Te.values) === void 0 && (Oe = await Ae("form")), R(Oe.find((Re) => Re.id === le)), j(!1), F(!0);
|
|
5860
5860
|
}, we = async (q) => {
|
|
5861
5861
|
T(!0);
|
|
5862
5862
|
const le = s, Oe = q.filter((Te) => !s.find((Re) => Re.id === Te));
|
|
@@ -6017,10 +6017,10 @@ const pc = (e) => {
|
|
|
6017
6017
|
context: { ...m == null ? void 0 : m(), ...L },
|
|
6018
6018
|
visible: S,
|
|
6019
6019
|
onSelectValues: async (q) => {
|
|
6020
|
-
|
|
6020
|
+
O(!1), we(q);
|
|
6021
6021
|
},
|
|
6022
6022
|
onCloseModal: () => {
|
|
6023
|
-
|
|
6023
|
+
O(!1);
|
|
6024
6024
|
}
|
|
6025
6025
|
}
|
|
6026
6026
|
)
|
|
@@ -6293,19 +6293,19 @@ const Sc = ({
|
|
|
6293
6293
|
treeValues: { ..._, id: b }
|
|
6294
6294
|
});
|
|
6295
6295
|
else if (b)
|
|
6296
|
-
S = r.map((
|
|
6296
|
+
S = r.map((O) => O.id === b ? {
|
|
6297
6297
|
id: b,
|
|
6298
6298
|
operation: b > 0 ? "pendingUpdate" : "pendingCreate",
|
|
6299
6299
|
values: { ..._, id: b },
|
|
6300
6300
|
treeValues: { ..._, id: b }
|
|
6301
|
-
} :
|
|
6301
|
+
} : O);
|
|
6302
6302
|
else {
|
|
6303
|
-
const
|
|
6303
|
+
const O = bo(r);
|
|
6304
6304
|
S = r.concat({
|
|
6305
|
-
id:
|
|
6305
|
+
id: O,
|
|
6306
6306
|
operation: "pendingCreate",
|
|
6307
|
-
values: { ..._, id:
|
|
6308
|
-
treeValues: { ..._, id:
|
|
6307
|
+
values: { ..._, id: O },
|
|
6308
|
+
treeValues: { ..._, id: O }
|
|
6309
6309
|
});
|
|
6310
6310
|
}
|
|
6311
6311
|
s(S), y || h(!1);
|
|
@@ -6420,12 +6420,12 @@ const Sc = ({
|
|
|
6420
6420
|
}) => {
|
|
6421
6421
|
const y = re(), g = d || y, w = re({}), C = re(), I = re(e);
|
|
6422
6422
|
bt(() => {
|
|
6423
|
-
var
|
|
6423
|
+
var O, x;
|
|
6424
6424
|
if (I.current = e, C.current === void 0) {
|
|
6425
6425
|
C.current = e;
|
|
6426
6426
|
return;
|
|
6427
6427
|
}
|
|
6428
|
-
C.current = e, (
|
|
6428
|
+
C.current = e, (O = g == null ? void 0 : g.current) == null || O.refresh(), (x = g == null ? void 0 : g.current) == null || x.unselectAll();
|
|
6429
6429
|
}, [e]);
|
|
6430
6430
|
const T = xr(() => e.length, [e]), b = xr(() => wo(
|
|
6431
6431
|
r,
|
|
@@ -6434,9 +6434,9 @@ const Sc = ({
|
|
|
6434
6434
|
},
|
|
6435
6435
|
s
|
|
6436
6436
|
), [s, r]), V = J(
|
|
6437
|
-
async (
|
|
6438
|
-
const
|
|
6439
|
-
const X =
|
|
6437
|
+
async (O, x) => {
|
|
6438
|
+
const R = I.current, P = R.map((U) => U.id).slice(O, x), K = P.filter((U) => {
|
|
6439
|
+
const X = R.find((z) => z.id === U);
|
|
6440
6440
|
return X && (X.operation === "original" || X.operation === "pendingLink");
|
|
6441
6441
|
});
|
|
6442
6442
|
if (K.length === 0)
|
|
@@ -6444,14 +6444,15 @@ const Sc = ({
|
|
|
6444
6444
|
const { results: j, colors: W } = await a(K), k = ir(r, j), Y = P.map((U) => {
|
|
6445
6445
|
var z;
|
|
6446
6446
|
const X = k.find((H) => H.id === U);
|
|
6447
|
-
return X || ((z =
|
|
6447
|
+
return X || ((z = R.find((H) => H.id === U)) == null ? void 0 : z.treeValues);
|
|
6448
6448
|
});
|
|
6449
6449
|
return w.current = { ...w.current, ...W }, Y;
|
|
6450
6450
|
},
|
|
6451
6451
|
[a, r]
|
|
6452
|
-
), _ = J((
|
|
6453
|
-
|
|
6454
|
-
|
|
6452
|
+
), _ = J((O) => {
|
|
6453
|
+
var x, R, A, P;
|
|
6454
|
+
if (w.current[(R = (x = O.node) == null ? void 0 : x.data) == null ? void 0 : R.id])
|
|
6455
|
+
return { color: w.current[(P = (A = O.node) == null ? void 0 : A.data) == null ? void 0 : P.id] };
|
|
6455
6456
|
}, []), { getColumnState: F, updateColumnState: S } = Fc({
|
|
6456
6457
|
model: u
|
|
6457
6458
|
});
|
|
@@ -6492,9 +6493,9 @@ const Sc = ({
|
|
|
6492
6493
|
}), {
|
|
6493
6494
|
treeOoui: F,
|
|
6494
6495
|
onTreeFetchRows: S,
|
|
6495
|
-
selectedRowKeys:
|
|
6496
|
+
selectedRowKeys: O,
|
|
6496
6497
|
setSelectedRowKeys: x,
|
|
6497
|
-
onChangeFirstVisibleRowIndex:
|
|
6498
|
+
onChangeFirstVisibleRowIndex: R,
|
|
6498
6499
|
onGetFirstVisibileRowIndex: A,
|
|
6499
6500
|
onGetSelectedRowKeys: P,
|
|
6500
6501
|
allRowSelectedMode: K,
|
|
@@ -6565,7 +6566,7 @@ const Sc = ({
|
|
|
6565
6566
|
items: l,
|
|
6566
6567
|
triggerChange: Y,
|
|
6567
6568
|
setFormHasChanges: H,
|
|
6568
|
-
selectedRowKeys:
|
|
6569
|
+
selectedRowKeys: O,
|
|
6569
6570
|
setSelectedRowKeys: x
|
|
6570
6571
|
}), Pe = () => {
|
|
6571
6572
|
const me = Array.from(s.keys()), Ee = me[(me.indexOf(d) + 1) % me.length];
|
|
@@ -6612,7 +6613,7 @@ const Sc = ({
|
|
|
6612
6613
|
onPreviousItem: Ie,
|
|
6613
6614
|
onNextItem: Le,
|
|
6614
6615
|
onSearchItem: Ae,
|
|
6615
|
-
selectedRowKeys:
|
|
6616
|
+
selectedRowKeys: O,
|
|
6616
6617
|
showCreateButton: b,
|
|
6617
6618
|
showToggleButton: T
|
|
6618
6619
|
}
|
|
@@ -6629,7 +6630,7 @@ const Sc = ({
|
|
|
6629
6630
|
onRowDoubleClick: fe,
|
|
6630
6631
|
onRowSelectionChange: x,
|
|
6631
6632
|
relation: p,
|
|
6632
|
-
onChangeFirstVisibleRowIndex:
|
|
6633
|
+
onChangeFirstVisibleRowIndex: R,
|
|
6633
6634
|
onGetFirstVisibleRowIndex: A,
|
|
6634
6635
|
onGetSelectedRowKeys: P,
|
|
6635
6636
|
allRowSelectedMode: K,
|
|
@@ -7745,11 +7746,11 @@ function ld({ toolbar: e }) {
|
|
|
7745
7746
|
previousView: V,
|
|
7746
7747
|
setPreviousView: _,
|
|
7747
7748
|
goToResourceId: F
|
|
7748
|
-
} = ee(nt), { t: S } = he(),
|
|
7749
|
+
} = ee(nt), { t: S } = he(), O = ee(
|
|
7749
7750
|
$t
|
|
7750
|
-
), { processAction: x } =
|
|
7751
|
+
), { processAction: x } = O || {}, R = ee(
|
|
7751
7752
|
dt
|
|
7752
|
-
), { openRelate: A, openDefaultActionForModel: P } =
|
|
7753
|
+
), { openRelate: A, openDefaultActionForModel: P } = R || {};
|
|
7753
7754
|
function K(M) {
|
|
7754
7755
|
if (s) {
|
|
7755
7756
|
id({
|
|
@@ -8421,16 +8422,16 @@ const yd = (e) => {
|
|
|
8421
8422
|
limit: _,
|
|
8422
8423
|
setLimit: F,
|
|
8423
8424
|
searchParams: S,
|
|
8424
|
-
searchValues:
|
|
8425
|
+
searchValues: O,
|
|
8425
8426
|
setSearchValues: x,
|
|
8426
|
-
currentView:
|
|
8427
|
+
currentView: R
|
|
8427
8428
|
} = u || {}, [A, P] = v(!0);
|
|
8428
8429
|
ue(() => {
|
|
8429
8430
|
var U;
|
|
8430
8431
|
(U = d.current) == null || U.refresh();
|
|
8431
8432
|
}, [S]), ue(() => {
|
|
8432
|
-
t.view_id !==
|
|
8433
|
-
}, [
|
|
8433
|
+
t.view_id !== R.view_id && P(!0);
|
|
8434
|
+
}, [R]);
|
|
8434
8435
|
const { clear: K, searchFilterLoading: j, searchError: W, offset: k, tableRefreshing: Y } = Ao({
|
|
8435
8436
|
model: o,
|
|
8436
8437
|
setSearchTreeNameSearch: b,
|
|
@@ -8480,7 +8481,7 @@ const yd = (e) => {
|
|
|
8480
8481
|
},
|
|
8481
8482
|
searchError: W,
|
|
8482
8483
|
searchVisible: g,
|
|
8483
|
-
searchValues:
|
|
8484
|
+
searchValues: O,
|
|
8484
8485
|
showLimitOptions: !1
|
|
8485
8486
|
}
|
|
8486
8487
|
),
|
|
@@ -8927,15 +8928,15 @@ function Id(e) {
|
|
|
8927
8928
|
results: b,
|
|
8928
8929
|
limit: V,
|
|
8929
8930
|
totalItems: _
|
|
8930
|
-
} = ee(nt), { parentContext: F = {}, treeExpandable: S, toolbar:
|
|
8931
|
+
} = ee(nt), { parentContext: F = {}, treeExpandable: S, toolbar: O } = e, x = Xo(
|
|
8931
8932
|
Cn.FEATURE_ADVANCED_EXPORT
|
|
8932
|
-
), { t:
|
|
8933
|
+
), { t: R } = he(), A = ee(
|
|
8933
8934
|
$t
|
|
8934
8935
|
), { processAction: P } = A || {}, [K, j] = v(!1), W = w !== void 0 && w.trim().length > 0;
|
|
8935
8936
|
function k() {
|
|
8936
8937
|
Zt({
|
|
8937
|
-
confirmMessage:
|
|
8938
|
-
t:
|
|
8938
|
+
confirmMessage: R("confirmRemove"),
|
|
8939
|
+
t: R,
|
|
8939
8940
|
onOk: () => {
|
|
8940
8941
|
Y();
|
|
8941
8942
|
}
|
|
@@ -9016,7 +9017,7 @@ function Id(e) {
|
|
|
9016
9017
|
style: { color: m ? "white" : void 0 }
|
|
9017
9018
|
}
|
|
9018
9019
|
),
|
|
9019
|
-
tooltip:
|
|
9020
|
+
tooltip: R("advanced_search"),
|
|
9020
9021
|
type: m ? "primary" : "default",
|
|
9021
9022
|
onClick: () => {
|
|
9022
9023
|
y == null || y(!m);
|
|
@@ -9031,7 +9032,7 @@ function Id(e) {
|
|
|
9031
9032
|
qe,
|
|
9032
9033
|
{
|
|
9033
9034
|
icon: /* @__PURE__ */ i(tr, {}),
|
|
9034
|
-
tooltip:
|
|
9035
|
+
tooltip: R("duplicate"),
|
|
9035
9036
|
disabled: !r || (r == null ? void 0 : r.length) !== 1 || l || C,
|
|
9036
9037
|
loading: l,
|
|
9037
9038
|
onClick: U
|
|
@@ -9041,7 +9042,7 @@ function Id(e) {
|
|
|
9041
9042
|
qe,
|
|
9042
9043
|
{
|
|
9043
9044
|
icon: /* @__PURE__ */ i(Zn, {}),
|
|
9044
|
-
tooltip:
|
|
9045
|
+
tooltip: R("delete"),
|
|
9045
9046
|
disabled: !(r && (r == null ? void 0 : r.length) > 0) || C,
|
|
9046
9047
|
loading: a,
|
|
9047
9048
|
onClick: k
|
|
@@ -9053,11 +9054,11 @@ function Id(e) {
|
|
|
9053
9054
|
qe,
|
|
9054
9055
|
{
|
|
9055
9056
|
icon: /* @__PURE__ */ i(oo, {}),
|
|
9056
|
-
tooltip:
|
|
9057
|
+
tooltip: R("showLogs"),
|
|
9057
9058
|
disabled: !(r && (r == null ? void 0 : r.length) > 0) || C,
|
|
9058
9059
|
loading: !1,
|
|
9059
9060
|
onClick: () => {
|
|
9060
|
-
Go(u, r[0].id,
|
|
9061
|
+
Go(u, r[0].id, R);
|
|
9061
9062
|
}
|
|
9062
9063
|
}
|
|
9063
9064
|
),
|
|
@@ -9065,7 +9066,7 @@ function Id(e) {
|
|
|
9065
9066
|
qe,
|
|
9066
9067
|
{
|
|
9067
9068
|
icon: /* @__PURE__ */ i(hn, {}),
|
|
9068
|
-
tooltip:
|
|
9069
|
+
tooltip: R("refresh"),
|
|
9069
9070
|
disabled: l || a || C,
|
|
9070
9071
|
loading: !1,
|
|
9071
9072
|
onClick: () => {
|
|
@@ -9096,7 +9097,7 @@ function Id(e) {
|
|
|
9096
9097
|
placement: "bottomRight",
|
|
9097
9098
|
disabled: !(r && (r == null ? void 0 : r.length) > 0) || C,
|
|
9098
9099
|
onRetrieveData: async () => [
|
|
9099
|
-
{ label:
|
|
9100
|
+
{ label: R("actions"), items: O == null ? void 0 : O.action }
|
|
9100
9101
|
],
|
|
9101
9102
|
onItemClick: (H) => {
|
|
9102
9103
|
H && X(H);
|
|
@@ -9110,7 +9111,7 @@ function Id(e) {
|
|
|
9110
9111
|
placement: "bottomRight",
|
|
9111
9112
|
disabled: !(r && (r == null ? void 0 : r.length) > 0) || C,
|
|
9112
9113
|
onRetrieveData: async () => [
|
|
9113
|
-
{ label:
|
|
9114
|
+
{ label: R("reports"), items: O == null ? void 0 : O.print }
|
|
9114
9115
|
],
|
|
9115
9116
|
onItemClick: (H) => {
|
|
9116
9117
|
H && X({
|
|
@@ -9157,15 +9158,15 @@ function Id(e) {
|
|
|
9157
9158
|
),
|
|
9158
9159
|
onRetrieveData: async () => [
|
|
9159
9160
|
{
|
|
9160
|
-
label:
|
|
9161
|
+
label: R("export"),
|
|
9161
9162
|
items: [
|
|
9162
9163
|
{
|
|
9163
9164
|
id: "print_screen",
|
|
9164
|
-
name:
|
|
9165
|
+
name: R("printScreen")
|
|
9165
9166
|
},
|
|
9166
9167
|
{
|
|
9167
9168
|
id: "export",
|
|
9168
|
-
name:
|
|
9169
|
+
name: R("advancedExport")
|
|
9169
9170
|
}
|
|
9170
9171
|
]
|
|
9171
9172
|
}
|
|
@@ -9393,7 +9394,7 @@ function Ed(e, t) {
|
|
|
9393
9394
|
limit: g
|
|
9394
9395
|
} = e, [w, C] = v(), [I, T] = v([]), [b, V] = v(!0), _ = h || void 0, [F, S] = v(
|
|
9395
9396
|
_
|
|
9396
|
-
), [
|
|
9397
|
+
), [O, x] = v([]), [R, A] = v(), [P, K] = v([]), [j, W] = v(), [k, Y] = v(0), [U, X] = v(!1), [z, H] = v(!1), [M, L] = v(), { t: $ } = he(), de = re(), Z = re(), ne = ee(
|
|
9397
9398
|
dt
|
|
9398
9399
|
), {
|
|
9399
9400
|
setCurrentView: ye,
|
|
@@ -9408,7 +9409,7 @@ function Ed(e, t) {
|
|
|
9408
9409
|
(G) => {
|
|
9409
9410
|
G.preventDefault(), ae();
|
|
9410
9411
|
},
|
|
9411
|
-
[xe, se, w,
|
|
9412
|
+
[xe, se, w, R, P]
|
|
9412
9413
|
);
|
|
9413
9414
|
function Pe(G) {
|
|
9414
9415
|
S(G), Q == null || Q(G);
|
|
@@ -9650,7 +9651,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9650
9651
|
currentId: F,
|
|
9651
9652
|
setCurrentId: Pe,
|
|
9652
9653
|
setCurrentItemIndex: A,
|
|
9653
|
-
currentItemIndex:
|
|
9654
|
+
currentItemIndex: R,
|
|
9654
9655
|
results: P,
|
|
9655
9656
|
setResults: K,
|
|
9656
9657
|
currentModel: o,
|
|
@@ -9658,7 +9659,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9658
9659
|
setSorter: W,
|
|
9659
9660
|
totalItems: k,
|
|
9660
9661
|
setTotalItems: Y,
|
|
9661
|
-
selectedRowItems:
|
|
9662
|
+
selectedRowItems: O,
|
|
9662
9663
|
setSelectedRowItems: x,
|
|
9663
9664
|
setSearchTreeNameSearch: L,
|
|
9664
9665
|
searchTreeNameSearch: M,
|
|
@@ -9829,7 +9830,7 @@ function Hd(e) {
|
|
|
9829
9830
|
domain: s = [],
|
|
9830
9831
|
visible: a = !0,
|
|
9831
9832
|
parentContext: l = {}
|
|
9832
|
-
} = e, [d, u] = v(!1), [f, c] = v(!1), [h, p] = v(), [m, y] = v(), [g, w] = v(), [C, I] = v(1), [T, b] = v(0), V = re(Ft), _ = re([]), [F, S] = v(0), [
|
|
9833
|
+
} = e, [d, u] = v(!1), [f, c] = v(!1), [h, p] = v(), [m, y] = v(), [g, w] = v(), [C, I] = v(1), [T, b] = v(0), V = re(Ft), _ = re([]), [F, S] = v(0), [O, x] = v([]), [R, A] = v(void 0), [P, K] = v(), [j, W] = v(), [k, Y] = v(), [U, X] = v(!1), z = re([]), H = (Q) => {
|
|
9833
9834
|
X(!0), I(Q), b((Q - 1) * V.current);
|
|
9834
9835
|
}, M = async () => {
|
|
9835
9836
|
const Q = z.current.length > 0 ? z.current : s, se = Jt(_.current, Q), { colors: xe } = Tt(m), { totalItems: Ae, results: De, attrsEvaluated: Pe } = await E.getHandler().searchForTree({
|
|
@@ -9911,16 +9912,16 @@ function Hd(e) {
|
|
|
9911
9912
|
limit: V.current,
|
|
9912
9913
|
page: C,
|
|
9913
9914
|
treeView: m,
|
|
9914
|
-
results:
|
|
9915
|
+
results: O,
|
|
9915
9916
|
onRequestPageChange: H,
|
|
9916
9917
|
loading: U,
|
|
9917
9918
|
onRowClicked: ne,
|
|
9918
|
-
colorsForResults:
|
|
9919
|
+
colorsForResults: R,
|
|
9919
9920
|
sorter: P,
|
|
9920
9921
|
onChangeSort: (Q) => {
|
|
9921
9922
|
K == null || K(Q);
|
|
9922
9923
|
const se = Et({
|
|
9923
|
-
resultsToSort:
|
|
9924
|
+
resultsToSort: O,
|
|
9924
9925
|
sorter: Q,
|
|
9925
9926
|
fields: { ...m.fields, ...g.fields }
|
|
9926
9927
|
});
|
|
@@ -10049,16 +10050,16 @@ function Gd(e, t) {
|
|
|
10049
10050
|
async function b() {
|
|
10050
10051
|
u(!0), h(!0), c(void 0);
|
|
10051
10052
|
try {
|
|
10052
|
-
const
|
|
10053
|
-
g.current =
|
|
10053
|
+
const R = await V(), A = await F(R), P = R.fields[_n].relation, K = A[_n].items;
|
|
10054
|
+
g.current = R.fields;
|
|
10054
10055
|
const j = await _({
|
|
10055
10056
|
items: K,
|
|
10056
10057
|
model: P,
|
|
10057
10058
|
context: o
|
|
10058
10059
|
}), W = await S(j);
|
|
10059
10060
|
c(void 0), l(W), u(!1), h(!1);
|
|
10060
|
-
} catch (
|
|
10061
|
-
c(JSON.stringify(
|
|
10061
|
+
} catch (R) {
|
|
10062
|
+
c(JSON.stringify(R));
|
|
10062
10063
|
}
|
|
10063
10064
|
}
|
|
10064
10065
|
async function V() {
|
|
@@ -10069,7 +10070,7 @@ function Gd(e, t) {
|
|
|
10069
10070
|
});
|
|
10070
10071
|
}
|
|
10071
10072
|
async function _({
|
|
10072
|
-
items:
|
|
10073
|
+
items: R,
|
|
10073
10074
|
model: A,
|
|
10074
10075
|
context: P
|
|
10075
10076
|
}) {
|
|
@@ -10086,23 +10087,23 @@ function Gd(e, t) {
|
|
|
10086
10087
|
fields: y.current
|
|
10087
10088
|
},
|
|
10088
10089
|
model: A,
|
|
10089
|
-
items:
|
|
10090
|
+
items: R,
|
|
10090
10091
|
context: P,
|
|
10091
10092
|
currentView: "form"
|
|
10092
10093
|
});
|
|
10093
10094
|
return K;
|
|
10094
10095
|
}
|
|
10095
|
-
async function F(
|
|
10096
|
+
async function F(R) {
|
|
10096
10097
|
return (await C({
|
|
10097
10098
|
model: n,
|
|
10098
10099
|
ids: [r],
|
|
10099
|
-
fields:
|
|
10100
|
+
fields: R.fields,
|
|
10100
10101
|
context: o
|
|
10101
10102
|
}))[0];
|
|
10102
10103
|
}
|
|
10103
|
-
async function S(
|
|
10104
|
+
async function S(R) {
|
|
10104
10105
|
const A = [];
|
|
10105
|
-
for (const K of
|
|
10106
|
+
for (const K of R) {
|
|
10106
10107
|
const { values: j } = K;
|
|
10107
10108
|
if (j.action_id && j.action_id.length > 0) {
|
|
10108
10109
|
const W = parseInt(j.action_id[0], 10), k = kd({
|
|
@@ -10114,10 +10115,10 @@ function Gd(e, t) {
|
|
|
10114
10115
|
}
|
|
10115
10116
|
return await Promise.all(A);
|
|
10116
10117
|
}
|
|
10117
|
-
async function R
|
|
10118
|
+
async function O(R) {
|
|
10118
10119
|
if (!m)
|
|
10119
10120
|
return;
|
|
10120
|
-
const A =
|
|
10121
|
+
const A = R.filter((W) => {
|
|
10121
10122
|
const k = a.find(
|
|
10122
10123
|
(U) => U.id === W.id
|
|
10123
10124
|
);
|
|
@@ -10160,8 +10161,8 @@ function Gd(e, t) {
|
|
|
10160
10161
|
async function x() {
|
|
10161
10162
|
p(s);
|
|
10162
10163
|
}
|
|
10163
|
-
return d ? /* @__PURE__ */ i(gt, {}) : f ? /* @__PURE__ */ i(Qe, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Pd, { onPositionItemsChanged:
|
|
10164
|
-
const { actionData: P, values: K } =
|
|
10164
|
+
return d ? /* @__PURE__ */ i(gt, {}) : f ? /* @__PURE__ */ i(Qe, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Pd, { onPositionItemsChanged: O, children: a.map((R, A) => {
|
|
10165
|
+
const { actionData: P, values: K } = R, { position: j, id: W } = K, {
|
|
10165
10166
|
actionId: k,
|
|
10166
10167
|
actionType: Y,
|
|
10167
10168
|
key: U,
|
|
@@ -10319,17 +10320,17 @@ const Yd = ht(Gd), qd = (e) => {
|
|
|
10319
10320
|
F = [...F, ...S];
|
|
10320
10321
|
}
|
|
10321
10322
|
try {
|
|
10322
|
-
const
|
|
10323
|
+
const O = (await E.getHandler().search({
|
|
10323
10324
|
model: h,
|
|
10324
10325
|
params: F,
|
|
10325
10326
|
fieldsToRetrieve: [y],
|
|
10326
10327
|
context: { ...C == null ? void 0 : C(), ...p }
|
|
10327
10328
|
})).map((x) => {
|
|
10328
|
-
const
|
|
10329
|
-
let A =
|
|
10330
|
-
return Array.isArray(
|
|
10329
|
+
const R = x[y];
|
|
10330
|
+
let A = R;
|
|
10331
|
+
return Array.isArray(R) && (A = R[1]), { label: A, value: x.id };
|
|
10331
10332
|
});
|
|
10332
|
-
l(
|
|
10333
|
+
l(O);
|
|
10333
10334
|
} catch (S) {
|
|
10334
10335
|
u(S);
|
|
10335
10336
|
} finally {
|
|
@@ -10346,8 +10347,8 @@ const Yd = ht(Gd), qd = (e) => {
|
|
|
10346
10347
|
const S = r.map((x) => F.includes(x.id) ? x.operation == "pendingRemove" ? {
|
|
10347
10348
|
...x,
|
|
10348
10349
|
operation: "original"
|
|
10349
|
-
} : x : { id: x.id, operation: "pendingRemove" }),
|
|
10350
|
-
F.filter((x) => !
|
|
10350
|
+
} : x : { id: x.id, operation: "pendingRemove" }), O = S.map((x) => x.id);
|
|
10351
|
+
F.filter((x) => !O.includes(x)).map((x) => {
|
|
10351
10352
|
S.push({ id: x, operation: "pendingLink" });
|
|
10352
10353
|
}), I(S);
|
|
10353
10354
|
};
|
|
@@ -10521,20 +10522,20 @@ function gu(e, t) {
|
|
|
10521
10522
|
res_id: F,
|
|
10522
10523
|
domain: S = []
|
|
10523
10524
|
}) {
|
|
10524
|
-
const
|
|
10525
|
+
const O = await E.getHandler().getActionData({
|
|
10525
10526
|
action: T,
|
|
10526
10527
|
context: l
|
|
10527
10528
|
});
|
|
10528
|
-
if (
|
|
10529
|
+
if (O.type === "ir.actions.wizard") {
|
|
10529
10530
|
Xe("Action type not supported");
|
|
10530
10531
|
return;
|
|
10531
10532
|
}
|
|
10532
|
-
const [x,
|
|
10533
|
-
context:
|
|
10533
|
+
const [x, R] = T.split(","), A = parseInt(R), P = St({
|
|
10534
|
+
context: O.context,
|
|
10534
10535
|
values: a,
|
|
10535
10536
|
fields: {}
|
|
10536
|
-
}), K =
|
|
10537
|
-
domain:
|
|
10537
|
+
}), K = O.domain ? await E.getHandler().evalDomain({
|
|
10538
|
+
domain: O.domain,
|
|
10538
10539
|
values: a,
|
|
10539
10540
|
context: { ...l, ...P }
|
|
10540
10541
|
}) : [], {
|
|
@@ -10544,7 +10545,7 @@ function gu(e, t) {
|
|
|
10544
10545
|
target: Y,
|
|
10545
10546
|
view_type: U,
|
|
10546
10547
|
limit: X
|
|
10547
|
-
} =
|
|
10548
|
+
} = O, z = U === "tree", H = [];
|
|
10548
10549
|
for (const L of W) {
|
|
10549
10550
|
const [$, de] = L;
|
|
10550
10551
|
if ($)
|
|
@@ -10615,14 +10616,14 @@ function gu(e, t) {
|
|
|
10615
10616
|
}) {
|
|
10616
10617
|
const {
|
|
10617
10618
|
res_model: S,
|
|
10618
|
-
context:
|
|
10619
|
+
context: O,
|
|
10619
10620
|
domain: x,
|
|
10620
|
-
views:
|
|
10621
|
+
views: R,
|
|
10621
10622
|
target: A,
|
|
10622
10623
|
string: P,
|
|
10623
10624
|
limit: K
|
|
10624
|
-
} = T, [j, W] =
|
|
10625
|
-
context:
|
|
10625
|
+
} = T, [j, W] = R[0], k = { id: j, type: W }, Y = St({
|
|
10626
|
+
context: O,
|
|
10626
10627
|
values: { ...V, ...a },
|
|
10627
10628
|
fields: b
|
|
10628
10629
|
}), U = x ? await E.getHandler().evalDomain({
|
|
@@ -10637,7 +10638,7 @@ function gu(e, t) {
|
|
|
10637
10638
|
I({
|
|
10638
10639
|
model: S,
|
|
10639
10640
|
target: A,
|
|
10640
|
-
views:
|
|
10641
|
+
views: R,
|
|
10641
10642
|
context: { ...l, ...Y },
|
|
10642
10643
|
domain: U,
|
|
10643
10644
|
title: P,
|
|
@@ -10654,17 +10655,17 @@ function gu(e, t) {
|
|
|
10654
10655
|
res_id: _,
|
|
10655
10656
|
view_id: F,
|
|
10656
10657
|
overrideUnsettedLimit: S = !1
|
|
10657
|
-
} = T,
|
|
10658
|
-
action:
|
|
10658
|
+
} = T, O = `${V},${b}`, x = await E.getHandler().getActionData({
|
|
10659
|
+
action: O,
|
|
10659
10660
|
context: l
|
|
10660
|
-
}),
|
|
10661
|
+
}), R = St({
|
|
10661
10662
|
context: x.context,
|
|
10662
10663
|
values: a,
|
|
10663
10664
|
fields: {}
|
|
10664
10665
|
}), A = x.domain ? await E.getHandler().evalDomain({
|
|
10665
10666
|
domain: x.domain,
|
|
10666
10667
|
values: a,
|
|
10667
|
-
context: { ...l, ...
|
|
10668
|
+
context: { ...l, ...R }
|
|
10668
10669
|
}) : [], {
|
|
10669
10670
|
res_model: P,
|
|
10670
10671
|
views: K,
|
|
@@ -10684,7 +10685,7 @@ function gu(e, t) {
|
|
|
10684
10685
|
model: P,
|
|
10685
10686
|
type: de,
|
|
10686
10687
|
id: $,
|
|
10687
|
-
context: { ...l, ...
|
|
10688
|
+
context: { ...l, ...R }
|
|
10688
10689
|
});
|
|
10689
10690
|
X.push([Z, de]);
|
|
10690
10691
|
}
|
|
@@ -10698,7 +10699,7 @@ function gu(e, t) {
|
|
|
10698
10699
|
const M = { id: z, type: H };
|
|
10699
10700
|
I({
|
|
10700
10701
|
domain: A,
|
|
10701
|
-
context: { ...l, ...
|
|
10702
|
+
context: { ...l, ...R },
|
|
10702
10703
|
model: P,
|
|
10703
10704
|
views: X,
|
|
10704
10705
|
title: j,
|
|
@@ -10719,9 +10720,9 @@ function gu(e, t) {
|
|
|
10719
10720
|
res_id: F,
|
|
10720
10721
|
domain: S
|
|
10721
10722
|
}) {
|
|
10722
|
-
const
|
|
10723
|
+
const O = await E.getHandler().getActionStringForModel(T);
|
|
10723
10724
|
await m({
|
|
10724
|
-
action:
|
|
10725
|
+
action: O,
|
|
10725
10726
|
values: b,
|
|
10726
10727
|
forced_values: V,
|
|
10727
10728
|
initialViewType: _,
|
|
@@ -10736,9 +10737,9 @@ function gu(e, t) {
|
|
|
10736
10737
|
views: _,
|
|
10737
10738
|
title: F,
|
|
10738
10739
|
target: S,
|
|
10739
|
-
initialView:
|
|
10740
|
+
initialView: O,
|
|
10740
10741
|
action_id: x,
|
|
10741
|
-
action_type:
|
|
10742
|
+
action_type: R,
|
|
10742
10743
|
res_id: A,
|
|
10743
10744
|
values: P,
|
|
10744
10745
|
forced_values: K,
|
|
@@ -10750,7 +10751,7 @@ function gu(e, t) {
|
|
|
10750
10751
|
const Y = await E.getHandler().getView({
|
|
10751
10752
|
model: V,
|
|
10752
10753
|
type: "form",
|
|
10753
|
-
id:
|
|
10754
|
+
id: O.type === "form" ? O.id : void 0,
|
|
10754
10755
|
context: { ...l, ...b }
|
|
10755
10756
|
});
|
|
10756
10757
|
c.current.openActionModal({
|
|
@@ -10760,24 +10761,24 @@ function gu(e, t) {
|
|
|
10760
10761
|
context: { ...l, ...b },
|
|
10761
10762
|
actionData: {
|
|
10762
10763
|
action_id: x,
|
|
10763
|
-
action_type:
|
|
10764
|
+
action_type: R,
|
|
10764
10765
|
res_id: A,
|
|
10765
10766
|
view_id: Y.view_id
|
|
10766
10767
|
}
|
|
10767
10768
|
});
|
|
10768
10769
|
} else {
|
|
10769
|
-
const Y =
|
|
10770
|
+
const Y = O && Array.isArray(O.id) ? { ...O, id: O.id[0] } : O;
|
|
10770
10771
|
y({
|
|
10771
10772
|
title: F,
|
|
10772
10773
|
action: {
|
|
10773
10774
|
id: x,
|
|
10774
|
-
type:
|
|
10775
|
+
type: R
|
|
10775
10776
|
},
|
|
10776
10777
|
content: /* @__PURE__ */ i(
|
|
10777
10778
|
Qo,
|
|
10778
10779
|
{
|
|
10779
10780
|
action_id: x,
|
|
10780
|
-
action_type:
|
|
10781
|
+
action_type: R,
|
|
10781
10782
|
tabKey: k,
|
|
10782
10783
|
title: F,
|
|
10783
10784
|
views: _,
|
|
@@ -10946,8 +10947,8 @@ const { useToken: Cu } = Ke, gf = (e) => {
|
|
|
10946
10947
|
} = p || {}, T = Fe(() => {
|
|
10947
10948
|
if (!w || !w.view_id || !w.extra)
|
|
10948
10949
|
return;
|
|
10949
|
-
const { action_id: x, action_type:
|
|
10950
|
-
if (!x || !
|
|
10950
|
+
const { action_id: x, action_type: R } = w.extra || {};
|
|
10951
|
+
if (!x || !R) {
|
|
10951
10952
|
l(!1);
|
|
10952
10953
|
return;
|
|
10953
10954
|
}
|
|
@@ -10955,7 +10956,7 @@ const { useToken: Cu } = Ke, gf = (e) => {
|
|
|
10955
10956
|
let P = !1;
|
|
10956
10957
|
return w.type === "form" && (P = C || !1), {
|
|
10957
10958
|
action_id: x,
|
|
10958
|
-
action_type:
|
|
10959
|
+
action_type: R,
|
|
10959
10960
|
view_id: A,
|
|
10960
10961
|
res_id: P
|
|
10961
10962
|
};
|
|
@@ -10967,8 +10968,8 @@ const { useToken: Cu } = Ke, gf = (e) => {
|
|
|
10967
10968
|
_();
|
|
10968
10969
|
}, [b]);
|
|
10969
10970
|
function V(x) {
|
|
10970
|
-
const
|
|
10971
|
-
(
|
|
10971
|
+
const R = x;
|
|
10972
|
+
(R == null ? void 0 : R.action_type) !== "ir.actions.wizard" && m(R);
|
|
10972
10973
|
}
|
|
10973
10974
|
const _ = J(async () => {
|
|
10974
10975
|
if (!T)
|
|
@@ -10997,20 +10998,20 @@ const { useToken: Cu } = Ke, gf = (e) => {
|
|
|
10997
10998
|
}))
|
|
10998
10999
|
}
|
|
10999
11000
|
];
|
|
11000
|
-
}, [t, f]),
|
|
11001
|
+
}, [t, f]), O = J(async () => {
|
|
11001
11002
|
if (a && d)
|
|
11002
11003
|
await r(d);
|
|
11003
11004
|
else {
|
|
11004
11005
|
if (!w)
|
|
11005
11006
|
return;
|
|
11006
|
-
const x = y.find((j) => j.key === g), { id:
|
|
11007
|
+
const x = y.find((j) => j.key === g), { id: R, type: A } = (x == null ? void 0 : x.action) || {}, P = w.view_id;
|
|
11007
11008
|
let K = !1;
|
|
11008
|
-
if (!
|
|
11009
|
+
if (!R || !A) {
|
|
11009
11010
|
l(!1);
|
|
11010
11011
|
return;
|
|
11011
11012
|
}
|
|
11012
11013
|
w.type === "form" && (K = C || !1), await o({
|
|
11013
|
-
action_id:
|
|
11014
|
+
action_id: R,
|
|
11014
11015
|
action_type: A,
|
|
11015
11016
|
view_id: P,
|
|
11016
11017
|
res_id: K
|
|
@@ -11033,7 +11034,7 @@ const { useToken: Cu } = Ke, gf = (e) => {
|
|
|
11033
11034
|
{
|
|
11034
11035
|
ref: h,
|
|
11035
11036
|
isFavourite: a,
|
|
11036
|
-
onToggleFavourite:
|
|
11037
|
+
onToggleFavourite: O,
|
|
11037
11038
|
onItemClick: V,
|
|
11038
11039
|
placement: "bottomRight",
|
|
11039
11040
|
header: /* @__PURE__ */ D("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|