@gisce/react-ooui 2.1.0-alpha.4 → 2.1.0-alpha.6
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
|
@@ -624,8 +624,8 @@ const ro = (e) => {
|
|
|
624
624
|
if (m)
|
|
625
625
|
return /* @__PURE__ */ n(at, {});
|
|
626
626
|
if (l) {
|
|
627
|
-
const
|
|
628
|
-
return
|
|
627
|
+
const I = dt(l);
|
|
628
|
+
return I && /* @__PURE__ */ n(I, {});
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
return /* @__PURE__ */ n(we, { ooui: t, children: /* @__PURE__ */ n(
|
|
@@ -653,8 +653,8 @@ const ro = (e) => {
|
|
|
653
653
|
danger: u,
|
|
654
654
|
context: m,
|
|
655
655
|
readOnly: g
|
|
656
|
-
} = r || {}, h = H(Be), { executeButtonAction: p } = h || {}, [y, w] = v(!1), { lang:
|
|
657
|
-
function
|
|
656
|
+
} = r || {}, h = H(Be), { executeButtonAction: p } = h || {}, [y, w] = v(!1), { lang: I } = H(he);
|
|
657
|
+
function R() {
|
|
658
658
|
if (y)
|
|
659
659
|
return /* @__PURE__ */ n(at, {});
|
|
660
660
|
if (d) {
|
|
@@ -669,7 +669,7 @@ const ro = (e) => {
|
|
|
669
669
|
if (c) {
|
|
670
670
|
Xt({
|
|
671
671
|
confirmMessage: c,
|
|
672
|
-
lang:
|
|
672
|
+
lang: I,
|
|
673
673
|
onOk: () => {
|
|
674
674
|
S();
|
|
675
675
|
}
|
|
@@ -693,11 +693,11 @@ const ro = (e) => {
|
|
|
693
693
|
{
|
|
694
694
|
ooui: i,
|
|
695
695
|
executeButtonAction: p,
|
|
696
|
-
lang:
|
|
696
|
+
lang: I
|
|
697
697
|
}
|
|
698
698
|
),
|
|
699
699
|
children: [
|
|
700
|
-
|
|
700
|
+
R(),
|
|
701
701
|
s
|
|
702
702
|
]
|
|
703
703
|
}
|
|
@@ -723,7 +723,7 @@ const ro = (e) => {
|
|
|
723
723
|
async function w() {
|
|
724
724
|
y(!0), await r({ type: d, action: a, context: m }), y(!1);
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function I() {
|
|
727
727
|
if (f) {
|
|
728
728
|
Xt({
|
|
729
729
|
confirmMessage: f,
|
|
@@ -736,7 +736,7 @@ const ro = (e) => {
|
|
|
736
736
|
}
|
|
737
737
|
w();
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function R() {
|
|
740
740
|
if (p)
|
|
741
741
|
return /* @__PURE__ */ n(at, {});
|
|
742
742
|
if (u) {
|
|
@@ -748,8 +748,8 @@ const ro = (e) => {
|
|
|
748
748
|
Ht.Item,
|
|
749
749
|
{
|
|
750
750
|
disabled: !c || g,
|
|
751
|
-
onClick:
|
|
752
|
-
icon:
|
|
751
|
+
onClick: I,
|
|
752
|
+
icon: R(),
|
|
753
753
|
danger: h,
|
|
754
754
|
children: l
|
|
755
755
|
}
|
|
@@ -821,19 +821,19 @@ const oo = (e) => {
|
|
|
821
821
|
}, io = (e) => {
|
|
822
822
|
const { visible: t, onCloseModal: r, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = gn(), { t: c } = H(he), [d, f] = v([]), [u, m] = v(!1), [g, h] = v(!1), [p, y] = v({}), w = ce();
|
|
823
823
|
fe(() => {
|
|
824
|
-
t ?
|
|
824
|
+
t ? I() : y({});
|
|
825
825
|
}, [t]);
|
|
826
|
-
async function
|
|
826
|
+
async function I() {
|
|
827
827
|
m(!0);
|
|
828
828
|
try {
|
|
829
|
-
const b = await
|
|
829
|
+
const b = await R();
|
|
830
830
|
await S(b);
|
|
831
831
|
} catch (b) {
|
|
832
832
|
Qe(b);
|
|
833
833
|
}
|
|
834
834
|
m(!1);
|
|
835
835
|
}
|
|
836
|
-
async function
|
|
836
|
+
async function R() {
|
|
837
837
|
const C = (await k.getHandler().search({
|
|
838
838
|
params: [["translatable", "=", "1"]],
|
|
839
839
|
fieldsToRetrieve: ["code", "name"],
|
|
@@ -894,7 +894,7 @@ const oo = (e) => {
|
|
|
894
894
|
}
|
|
895
895
|
h(!1), a();
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function F() {
|
|
898
898
|
return u ? /* @__PURE__ */ n(Ee, {}) : /* @__PURE__ */ D(X, { children: [
|
|
899
899
|
x(),
|
|
900
900
|
/* @__PURE__ */ n(fn, {}),
|
|
@@ -934,7 +934,7 @@ const oo = (e) => {
|
|
|
934
934
|
footer: null,
|
|
935
935
|
destroyOnClose: !0,
|
|
936
936
|
maskClosable: !1,
|
|
937
|
-
children:
|
|
937
|
+
children: F()
|
|
938
938
|
}
|
|
939
939
|
);
|
|
940
940
|
};
|
|
@@ -1325,7 +1325,7 @@ const er = async (e) => {
|
|
|
1325
1325
|
return [
|
|
1326
1326
|
t.map((p) => {
|
|
1327
1327
|
const y = m.find(
|
|
1328
|
-
(
|
|
1328
|
+
(I) => I.id === p.id
|
|
1329
1329
|
), w = {
|
|
1330
1330
|
...p
|
|
1331
1331
|
};
|
|
@@ -1366,16 +1366,16 @@ const er = async (e) => {
|
|
|
1366
1366
|
};
|
|
1367
1367
|
return s ? /* @__PURE__ */ n(Ee, {}) : l ? /* @__PURE__ */ n(tt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ n(we, { type: "array", ...e, children: /* @__PURE__ */ n(Ys, { ooui: t, views: d }) });
|
|
1368
1368
|
}, Ys = (e) => {
|
|
1369
|
-
const { value: t, views: r, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [c, d] = v(), [f, u] = v(!1), [m, g] = v(), { relation: h, context: p, readOnly: y, summaryField: w, titleField:
|
|
1369
|
+
const { value: t, views: r, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [c, d] = v(), [f, u] = v(!1), [m, g] = v(), { relation: h, context: p, readOnly: y, summaryField: w, titleField: I } = i, R = s.filter((b) => b.values), S = H(Be), { getContext: x } = S || {};
|
|
1370
1370
|
xt(() => {
|
|
1371
|
-
|
|
1371
|
+
F();
|
|
1372
1372
|
}, [s]);
|
|
1373
1373
|
const A = (b) => {
|
|
1374
1374
|
o == null || o({
|
|
1375
1375
|
items: b
|
|
1376
1376
|
});
|
|
1377
1377
|
};
|
|
1378
|
-
async function
|
|
1378
|
+
async function F() {
|
|
1379
1379
|
l(!0), d(void 0);
|
|
1380
1380
|
try {
|
|
1381
1381
|
const [b] = await er({
|
|
@@ -1399,7 +1399,7 @@ const er = async (e) => {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
1401
|
return c ? /* @__PURE__ */ n(tt, { className: "mt-10", message: c, type: "error", banner: !0 }) : a ? /* @__PURE__ */ n(Ee, {}) : /* @__PURE__ */ D(X, { children: [
|
|
1402
|
-
/* @__PURE__ */ n(An, { style: { padding: "1rem" }, children:
|
|
1402
|
+
/* @__PURE__ */ n(An, { style: { padding: "1rem" }, children: R.map((b, C) => {
|
|
1403
1403
|
var _, T;
|
|
1404
1404
|
return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ D(An.Item, { children: [
|
|
1405
1405
|
/* @__PURE__ */ n(
|
|
@@ -1408,12 +1408,12 @@ const er = async (e) => {
|
|
|
1408
1408
|
style: { display: "inline-block", cursor: "pointer" },
|
|
1409
1409
|
onClick: () => {
|
|
1410
1410
|
g(
|
|
1411
|
-
|
|
1411
|
+
R.find(
|
|
1412
1412
|
(O) => b.id === O.id
|
|
1413
1413
|
)
|
|
1414
1414
|
), u(!0);
|
|
1415
1415
|
},
|
|
1416
|
-
children: /* @__PURE__ */ n("strong", { children: (_ = b.values) == null ? void 0 : _[
|
|
1416
|
+
children: /* @__PURE__ */ n("strong", { children: (_ = b.values) == null ? void 0 : _[I] })
|
|
1417
1417
|
}
|
|
1418
1418
|
),
|
|
1419
1419
|
/* @__PURE__ */ n("br", {}),
|
|
@@ -1423,7 +1423,7 @@ const er = async (e) => {
|
|
|
1423
1423
|
style: { display: "inline-block", cursor: "pointer" },
|
|
1424
1424
|
onClick: () => {
|
|
1425
1425
|
g(
|
|
1426
|
-
|
|
1426
|
+
R.find(
|
|
1427
1427
|
(O) => b.id === O.id
|
|
1428
1428
|
)
|
|
1429
1429
|
), u(!0);
|
|
@@ -1450,7 +1450,7 @@ const er = async (e) => {
|
|
|
1450
1450
|
u(!1);
|
|
1451
1451
|
},
|
|
1452
1452
|
readOnly: y,
|
|
1453
|
-
postSaveAction:
|
|
1453
|
+
postSaveAction: F
|
|
1454
1454
|
}
|
|
1455
1455
|
)
|
|
1456
1456
|
] });
|
|
@@ -1636,14 +1636,14 @@ const Nt = ({
|
|
|
1636
1636
|
}, oa = (e) => {
|
|
1637
1637
|
const { value: t, ooui: r, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [a, l] = v([]), [c, d] = v(), [f, u] = v(!1), { relation: m, context: g, readOnly: h, field: p } = r, y = H(Be), { getContext: w } = y || {};
|
|
1638
1638
|
xt(() => {
|
|
1639
|
-
|
|
1639
|
+
R();
|
|
1640
1640
|
}, [o]);
|
|
1641
|
-
const
|
|
1641
|
+
const I = (A) => {
|
|
1642
1642
|
i == null || i({
|
|
1643
1643
|
items: A
|
|
1644
1644
|
});
|
|
1645
1645
|
};
|
|
1646
|
-
async function
|
|
1646
|
+
async function R() {
|
|
1647
1647
|
u(!0);
|
|
1648
1648
|
let A = [];
|
|
1649
1649
|
try {
|
|
@@ -1670,24 +1670,24 @@ const Nt = ({
|
|
|
1670
1670
|
return Array.isArray(_) && (T = _[1]), { label: T, value: C.id };
|
|
1671
1671
|
});
|
|
1672
1672
|
l(b);
|
|
1673
|
-
} catch (
|
|
1674
|
-
d(
|
|
1673
|
+
} catch (F) {
|
|
1674
|
+
d(F);
|
|
1675
1675
|
} finally {
|
|
1676
1676
|
u(!1);
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
1679
|
const S = (A) => {
|
|
1680
|
-
const
|
|
1680
|
+
const F = o.map((C) => A.includes(C.id) ? C.operation == "pendingRemove" ? {
|
|
1681
1681
|
...C,
|
|
1682
1682
|
operation: "pendingLink"
|
|
1683
|
-
} : C : { id: C.id, operation: "pendingRemove" }), b =
|
|
1683
|
+
} : C : { id: C.id, operation: "pendingRemove" }), b = F.map((C) => C.id);
|
|
1684
1684
|
A.filter((C) => !b.includes(C)).map((C) => {
|
|
1685
|
-
|
|
1686
|
-
}), F
|
|
1685
|
+
F.push({ id: C, operation: "pendingLink" });
|
|
1686
|
+
}), I(F);
|
|
1687
1687
|
}, x = (A) => {
|
|
1688
|
-
const { label:
|
|
1688
|
+
const { label: F, closable: b, onClose: C } = A, _ = (O) => {
|
|
1689
1689
|
O.preventDefault(), O.stopPropagation();
|
|
1690
|
-
}, T = jt(
|
|
1690
|
+
}, T = jt(F);
|
|
1691
1691
|
return /* @__PURE__ */ n(
|
|
1692
1692
|
tr,
|
|
1693
1693
|
{
|
|
@@ -1696,7 +1696,7 @@ const Nt = ({
|
|
|
1696
1696
|
closable: b,
|
|
1697
1697
|
onClose: C,
|
|
1698
1698
|
closeIcon: /* @__PURE__ */ n("span", { style: { color: T }, children: "X" }),
|
|
1699
|
-
children:
|
|
1699
|
+
children: F
|
|
1700
1700
|
}
|
|
1701
1701
|
);
|
|
1702
1702
|
};
|
|
@@ -2011,12 +2011,12 @@ const Nt = ({
|
|
|
2011
2011
|
setCurrentItemIndex: p,
|
|
2012
2012
|
setResultsActionView: y,
|
|
2013
2013
|
resultsActionView: w,
|
|
2014
|
-
domain:
|
|
2015
|
-
currentId:
|
|
2014
|
+
domain: I,
|
|
2015
|
+
currentId: R,
|
|
2016
2016
|
limit: S,
|
|
2017
2017
|
setLimit: x,
|
|
2018
2018
|
searchParams: A = [],
|
|
2019
|
-
setSearchValues:
|
|
2019
|
+
setSearchValues: F,
|
|
2020
2020
|
clearSelection: b
|
|
2021
2021
|
} = e, [C, _] = v(!1), [T, O] = v(!1), [$, E] = v(), [z, P] = v(1), [N, W] = v(0), [M, Y] = v(), [te, Z] = v([]), [re, G] = v(void 0), [V, L] = v(void 0), ie = ce(S || Yt), q = ce([]), pe = Ie(
|
|
2022
2022
|
(be) => {
|
|
@@ -2028,7 +2028,7 @@ const Nt = ({
|
|
|
2028
2028
|
model: t,
|
|
2029
2029
|
payload: l,
|
|
2030
2030
|
limit: ie.current,
|
|
2031
|
-
attrs:
|
|
2031
|
+
attrs: I,
|
|
2032
2032
|
context: d
|
|
2033
2033
|
});
|
|
2034
2034
|
if (Y(be.length), f == null || f(be.length), be.length > 0) {
|
|
@@ -2058,7 +2058,7 @@ const Nt = ({
|
|
|
2058
2058
|
l,
|
|
2059
2059
|
t,
|
|
2060
2060
|
d,
|
|
2061
|
-
|
|
2061
|
+
I,
|
|
2062
2062
|
u,
|
|
2063
2063
|
m,
|
|
2064
2064
|
g,
|
|
@@ -2066,7 +2066,7 @@ const Nt = ({
|
|
|
2066
2066
|
f
|
|
2067
2067
|
]), ge = Ie(
|
|
2068
2068
|
async (be) => {
|
|
2069
|
-
const { params: ue, newOffset: Ne } = be || {}, Ye = Ut(ue || A,
|
|
2069
|
+
const { params: ue, newOffset: Ne } = be || {}, Ye = Ut(ue || A, I), { colors: j, status: Ce } = At(u), _e = {};
|
|
2070
2070
|
j && (_e.colors = j), Ce && (_e.status = Ce);
|
|
2071
2071
|
const { totalItems: We, results: se, attrsEvaluated: le } = await k.getHandler().searchForTree({
|
|
2072
2072
|
params: Ye,
|
|
@@ -2085,7 +2085,7 @@ const Nt = ({
|
|
|
2085
2085
|
}) : [...q.current];
|
|
2086
2086
|
if (pe(Le), w && Le.length > 0) {
|
|
2087
2087
|
const qe = Le.findIndex(
|
|
2088
|
-
($e) =>
|
|
2088
|
+
($e) => R === $e.id
|
|
2089
2089
|
);
|
|
2090
2090
|
qe === -1 ? p == null || p(0) : p == null || p(qe);
|
|
2091
2091
|
} else
|
|
@@ -2098,10 +2098,10 @@ const Nt = ({
|
|
|
2098
2098
|
p,
|
|
2099
2099
|
w,
|
|
2100
2100
|
pe,
|
|
2101
|
-
|
|
2101
|
+
R,
|
|
2102
2102
|
t,
|
|
2103
2103
|
d,
|
|
2104
|
-
|
|
2104
|
+
I,
|
|
2105
2105
|
u,
|
|
2106
2106
|
m,
|
|
2107
2107
|
g,
|
|
@@ -2150,7 +2150,7 @@ const Nt = ({
|
|
|
2150
2150
|
), Pe = Ie(
|
|
2151
2151
|
(be) => {
|
|
2152
2152
|
const { params: ue, searchValues: Ne, limit: Ye, offset: j } = be;
|
|
2153
|
-
C || (r == null || r(void 0), i == null || i([]),
|
|
2153
|
+
C || (r == null || r(void 0), i == null || i([]), F == null || F(Ne), o == null || o(ue), s == null || s(!1), O(!0), E(void 0), P(1), Ye && (ie.current = Ye, x == null || x(Ye)), j && W(j), ve({
|
|
2154
2154
|
params: ue,
|
|
2155
2155
|
newOffset: j
|
|
2156
2156
|
}));
|
|
@@ -2159,7 +2159,7 @@ const Nt = ({
|
|
|
2159
2159
|
C,
|
|
2160
2160
|
r,
|
|
2161
2161
|
i,
|
|
2162
|
-
|
|
2162
|
+
F,
|
|
2163
2163
|
o,
|
|
2164
2164
|
s,
|
|
2165
2165
|
ve,
|
|
@@ -2171,12 +2171,12 @@ const Nt = ({
|
|
|
2171
2171
|
},
|
|
2172
2172
|
[_, S, W, P]
|
|
2173
2173
|
), je = Ie(() => {
|
|
2174
|
-
C || (r == null || r(void 0), o == null || o([]),
|
|
2174
|
+
C || (r == null || r(void 0), o == null || o([]), F == null || F({}), E(void 0), W(0), P(1), x == null || x(S || Yt));
|
|
2175
2175
|
}, [
|
|
2176
2176
|
C,
|
|
2177
2177
|
r,
|
|
2178
2178
|
o,
|
|
2179
|
-
|
|
2179
|
+
F,
|
|
2180
2180
|
x,
|
|
2181
2181
|
S
|
|
2182
2182
|
]), Se = Ie(
|
|
@@ -2191,11 +2191,11 @@ const Nt = ({
|
|
|
2191
2191
|
},
|
|
2192
2192
|
[u, t, d, ee, pe]
|
|
2193
2193
|
), xe = Ie(async () => await k.getHandler().searchAllIds({
|
|
2194
|
-
params: Ut(A,
|
|
2194
|
+
params: Ut(A, I),
|
|
2195
2195
|
model: t,
|
|
2196
2196
|
context: d,
|
|
2197
2197
|
totalItems: M
|
|
2198
|
-
}), [t, d, M, A,
|
|
2198
|
+
}), [t, d, M, A, I]);
|
|
2199
2199
|
return {
|
|
2200
2200
|
submit: Pe,
|
|
2201
2201
|
clear: je,
|
|
@@ -2234,12 +2234,12 @@ const Nt = ({
|
|
|
2234
2234
|
currentModel: p,
|
|
2235
2235
|
sorter: y,
|
|
2236
2236
|
setSorter: w,
|
|
2237
|
-
totalItems:
|
|
2238
|
-
setTotalItems:
|
|
2237
|
+
totalItems: I,
|
|
2238
|
+
setTotalItems: R,
|
|
2239
2239
|
setSelectedRowItems: S,
|
|
2240
2240
|
selectedRowItems: x,
|
|
2241
2241
|
searchTreeNameSearch: A,
|
|
2242
|
-
setSearchTreeNameSearch:
|
|
2242
|
+
setSearchTreeNameSearch: F,
|
|
2243
2243
|
goToResourceId: b,
|
|
2244
2244
|
limit: C
|
|
2245
2245
|
} = e, [_, T] = v(!1), [O, $] = v(!1), [E, z] = v(!1), [P, N] = v(!0), [W, M] = v(!0), [Y, te] = v([]), [Z, re] = v(!1), [G, V] = v([]), [L, ie] = v(!1), [q, pe] = v(!0), [ee, U] = v(), [ge, ve] = v({}), [Ke, Pe] = v(
|
|
@@ -2307,10 +2307,10 @@ const Nt = ({
|
|
|
2307
2307
|
setSearchVisible: ie,
|
|
2308
2308
|
sorter: y,
|
|
2309
2309
|
setSorter: w,
|
|
2310
|
-
totalItems:
|
|
2311
|
-
setTotalItems:
|
|
2310
|
+
totalItems: I,
|
|
2311
|
+
setTotalItems: R,
|
|
2312
2312
|
searchTreeNameSearch: A,
|
|
2313
|
-
setSearchTreeNameSearch:
|
|
2313
|
+
setSearchTreeNameSearch: F,
|
|
2314
2314
|
setGraphIsLoading: pe,
|
|
2315
2315
|
graphIsLoading: q,
|
|
2316
2316
|
previousView: ee,
|
|
@@ -2373,8 +2373,8 @@ const Nt = ({
|
|
|
2373
2373
|
context: {}
|
|
2374
2374
|
}
|
|
2375
2375
|
);
|
|
2376
|
-
async function y(
|
|
2377
|
-
const { reportData: b, fields: C, values: _, context: T = {} } =
|
|
2376
|
+
async function y(F) {
|
|
2377
|
+
const { reportData: b, fields: C, values: _, context: T = {} } = F, {
|
|
2378
2378
|
context: O,
|
|
2379
2379
|
model: $,
|
|
2380
2380
|
datas: E = {},
|
|
@@ -2405,11 +2405,11 @@ const Nt = ({
|
|
|
2405
2405
|
s.current = !1, clearInterval(o.current), Qe(Y), l(!1);
|
|
2406
2406
|
}
|
|
2407
2407
|
}
|
|
2408
|
-
async function w(
|
|
2408
|
+
async function w(F) {
|
|
2409
2409
|
let b;
|
|
2410
2410
|
try {
|
|
2411
2411
|
if (b = await k.getHandler().getReport({
|
|
2412
|
-
id:
|
|
2412
|
+
id: F
|
|
2413
2413
|
}), b.state && s.current === !0) {
|
|
2414
2414
|
s.current = !1, clearInterval(o.current), l(!1);
|
|
2415
2415
|
const C = await Dt(b.result);
|
|
@@ -2419,42 +2419,42 @@ const Nt = ({
|
|
|
2419
2419
|
s.current = !1, clearInterval(o.current), l(!1), Qe(C.exception || C);
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
|
-
async function
|
|
2423
|
-
actionData:
|
|
2422
|
+
async function I({
|
|
2423
|
+
actionData: F,
|
|
2424
2424
|
fields: b,
|
|
2425
2425
|
values: C,
|
|
2426
2426
|
context: _,
|
|
2427
2427
|
onRefreshParentValues: T
|
|
2428
2428
|
}) {
|
|
2429
|
-
const { type: O } =
|
|
2429
|
+
const { type: O } = F;
|
|
2430
2430
|
if (f.current.push(T), O === "ir.actions.report.xml")
|
|
2431
2431
|
return await y({
|
|
2432
|
-
reportData:
|
|
2432
|
+
reportData: F,
|
|
2433
2433
|
fields: b,
|
|
2434
2434
|
values: C,
|
|
2435
2435
|
context: _
|
|
2436
2436
|
});
|
|
2437
2437
|
if (O === "ir.actions.act_window")
|
|
2438
|
-
return await
|
|
2438
|
+
return await R({ actionData: F, fields: b, values: C, context: _ });
|
|
2439
2439
|
if (O === "ir.actions.act_url")
|
|
2440
2440
|
window.open(
|
|
2441
|
-
ta(
|
|
2441
|
+
ta(F.url, { ...C, context: _ }),
|
|
2442
2442
|
"_blank"
|
|
2443
2443
|
);
|
|
2444
2444
|
else
|
|
2445
2445
|
return Qe(`${O} action not supported`), {};
|
|
2446
2446
|
}
|
|
2447
|
-
async function
|
|
2448
|
-
actionData:
|
|
2447
|
+
async function R({
|
|
2448
|
+
actionData: F,
|
|
2449
2449
|
fields: b = {},
|
|
2450
2450
|
values: C = {},
|
|
2451
2451
|
context: _ = {}
|
|
2452
2452
|
}) {
|
|
2453
2453
|
var z;
|
|
2454
|
-
let T =
|
|
2455
|
-
|
|
2454
|
+
let T = F;
|
|
2455
|
+
F.res_model || (T = (await k.getHandler().readObjects({
|
|
2456
2456
|
model: "ir.actions.act_window",
|
|
2457
|
-
ids: [parseInt(
|
|
2457
|
+
ids: [parseInt(F.id)],
|
|
2458
2458
|
context: _
|
|
2459
2459
|
}))[0]);
|
|
2460
2460
|
const O = typeof (T == null ? void 0 : T.context) == "string" ? bt({
|
|
@@ -2508,16 +2508,16 @@ const Nt = ({
|
|
|
2508
2508
|
}
|
|
2509
2509
|
}
|
|
2510
2510
|
function S({
|
|
2511
|
-
domain:
|
|
2511
|
+
domain: F,
|
|
2512
2512
|
model: b,
|
|
2513
2513
|
formView: C,
|
|
2514
2514
|
context: _,
|
|
2515
2515
|
actionData: T
|
|
2516
2516
|
}) {
|
|
2517
|
-
m ? x({ domain:
|
|
2517
|
+
m ? x({ domain: F, model: b, formView: C, context: _, actionData: T }) : (p({ domain: F, model: b, context: _, formView: C, actionData: T }), g(!0));
|
|
2518
2518
|
}
|
|
2519
2519
|
async function x({
|
|
2520
|
-
domain:
|
|
2520
|
+
domain: F,
|
|
2521
2521
|
model: b,
|
|
2522
2522
|
formView: C,
|
|
2523
2523
|
context: _,
|
|
@@ -2529,7 +2529,7 @@ const Nt = ({
|
|
|
2529
2529
|
context: {},
|
|
2530
2530
|
formView: void 0,
|
|
2531
2531
|
actionData: void 0
|
|
2532
|
-
}), g(!1), await new Promise((O) => setTimeout(O, 300)), p({ domain:
|
|
2532
|
+
}), g(!1), await new Promise((O) => setTimeout(O, 300)), p({ domain: F, model: b, context: _, formView: C, actionData: T }), g(!0);
|
|
2533
2533
|
}
|
|
2534
2534
|
async function A() {
|
|
2535
2535
|
Cr(f.current), f.current = [], g(!1), p({
|
|
@@ -2544,7 +2544,7 @@ const Nt = ({
|
|
|
2544
2544
|
Mt.Provider,
|
|
2545
2545
|
{
|
|
2546
2546
|
value: {
|
|
2547
|
-
processAction:
|
|
2547
|
+
processAction: I,
|
|
2548
2548
|
globalValues: i
|
|
2549
2549
|
},
|
|
2550
2550
|
children: /* @__PURE__ */ D(X, { children: [
|
|
@@ -2678,13 +2678,13 @@ function ka(e, t) {
|
|
|
2678
2678
|
postSaveAction: p,
|
|
2679
2679
|
insideButtonModal: y = !1,
|
|
2680
2680
|
parentContext: w = {},
|
|
2681
|
-
actionDomain:
|
|
2682
|
-
visible:
|
|
2681
|
+
actionDomain: I,
|
|
2682
|
+
visible: R = !0,
|
|
2683
2683
|
rootForm: S = !1,
|
|
2684
2684
|
defaultValues: x,
|
|
2685
2685
|
forcedValues: A = {},
|
|
2686
|
-
parentWidth:
|
|
2687
|
-
} = e, { t: b, lang: C } = H(he), [_, T] = v(!1), [O, $] = v(), [E, z] = v(), [P] = ct.useForm(), [N, W] = v(), [M, Y] = v(), te = H(po), [Z, re] = v(), [G, V] = v(!1), L = ce(), ie = ce({}), q = ce({}), pe = ce(!1), ee = ce(!1), U = ce(!1), ve = (
|
|
2686
|
+
parentWidth: F
|
|
2687
|
+
} = e, { t: b, lang: C } = H(he), [_, T] = v(!1), [O, $] = v(), [E, z] = v(), [P] = ct.useForm(), [N, W] = v(), [M, Y] = v(), te = H(po), [Z, re] = v(), [G, V] = v(!1), L = ce(), ie = ce({}), q = ce({}), pe = ce(!1), ee = ce(!1), U = ce(!1), ve = (F !== void 0 ? F : Z) < Da, Ke = H(Be), { activeId: Pe, getPlainValues: De } = Ke || {}, je = H(
|
|
2688
2688
|
it
|
|
2689
2689
|
), {
|
|
2690
2690
|
setFormIsSaving: Se = void 0,
|
|
@@ -2710,13 +2710,13 @@ function ka(e, t) {
|
|
|
2710
2710
|
}
|
|
2711
2711
|
})), fe(() => {
|
|
2712
2712
|
if ($(void 0), !(!r && !h)) {
|
|
2713
|
-
if (!
|
|
2713
|
+
if (!R) {
|
|
2714
2714
|
L.current = void 0, z(void 0);
|
|
2715
2715
|
return;
|
|
2716
2716
|
}
|
|
2717
2717
|
(i === void 0 && M || i !== void 0 && M && i < 0) && (L.current = void 0, z(void 0)), Me();
|
|
2718
2718
|
}
|
|
2719
|
-
}, [i, r, g, h,
|
|
2719
|
+
}, [i, r, g, h, R]), fe(() => {
|
|
2720
2720
|
G && (bn({
|
|
2721
2721
|
elementHasLostFocus: !0
|
|
2722
2722
|
}), V(!1));
|
|
@@ -2825,7 +2825,7 @@ function ka(e, t) {
|
|
|
2825
2825
|
ue == null || ue(!0), $(void 0), B != null && B.fields ? (Q = B.fields, ne = B.arch) : (Q = M, ne = N), g && (B == null ? void 0 : B.forceRefresh) !== !0 ? K = g : { values: K, defaultGetCalled: me } = await Lo({
|
|
2826
2826
|
fields: Q,
|
|
2827
2827
|
arch: ne
|
|
2828
|
-
}),
|
|
2828
|
+
}), I && (K = { ...Qs(I), ...K }), ie.current = Rt(K, Q), Lt({
|
|
2829
2829
|
values: K,
|
|
2830
2830
|
fields: Q,
|
|
2831
2831
|
reset: !0,
|
|
@@ -3167,13 +3167,13 @@ function ka(e, t) {
|
|
|
3167
3167
|
ne && Cn(!1), Qe(me);
|
|
3168
3168
|
}
|
|
3169
3169
|
}
|
|
3170
|
-
const qo = () => !E && !O ? /* @__PURE__ */ n(Ee, {}) : !r && !h || !
|
|
3170
|
+
const qo = () => !E && !O ? /* @__PURE__ */ n(Ee, {}) : !r && !h || !R ? null : /* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(
|
|
3171
3171
|
ps,
|
|
3172
3172
|
{
|
|
3173
3173
|
getValues: $e,
|
|
3174
3174
|
getPlainValues: J,
|
|
3175
3175
|
getFields: qe,
|
|
3176
|
-
domain:
|
|
3176
|
+
domain: I,
|
|
3177
3177
|
activeId: i,
|
|
3178
3178
|
activeModel: r,
|
|
3179
3179
|
setFieldValue: St,
|
|
@@ -3231,7 +3231,7 @@ function ka(e, t) {
|
|
|
3231
3231
|
)
|
|
3232
3232
|
] }) })
|
|
3233
3233
|
] });
|
|
3234
|
-
return
|
|
3234
|
+
return R ? /* @__PURE__ */ n(
|
|
3235
3235
|
Qn,
|
|
3236
3236
|
{
|
|
3237
3237
|
bounds: !0,
|
|
@@ -3257,16 +3257,16 @@ const Qt = gt(ka), en = (e) => {
|
|
|
3257
3257
|
isMenuAction: a = !1,
|
|
3258
3258
|
actionData: l,
|
|
3259
3259
|
...c
|
|
3260
|
-
} = e, { model: d } = c, { modalWidth: f } = gn(), [u, m] = v(i), [g, h] = v(!1), [p, y] = v(), { action_id: w, res_id:
|
|
3260
|
+
} = e, { model: d } = c, { modalWidth: f } = gn(), [u, m] = v(i), [g, h] = v(!1), [p, y] = v(), { action_id: w, res_id: I, action_type: R, view_id: S } = l || {};
|
|
3261
3261
|
fe(() => {
|
|
3262
3262
|
a && x();
|
|
3263
3263
|
}, [l, a]);
|
|
3264
3264
|
async function x() {
|
|
3265
3265
|
const C = await k.getHandler().isShortcutFavorite({
|
|
3266
3266
|
action_id: w,
|
|
3267
|
-
action_type:
|
|
3267
|
+
action_type: R,
|
|
3268
3268
|
view_id: S,
|
|
3269
|
-
res_id:
|
|
3269
|
+
res_id: I || !1
|
|
3270
3270
|
});
|
|
3271
3271
|
h(C !== !1), C !== !1 && y(C);
|
|
3272
3272
|
}
|
|
@@ -3286,7 +3286,7 @@ const Qt = gt(ka), en = (e) => {
|
|
|
3286
3286
|
}
|
|
3287
3287
|
h(!g);
|
|
3288
3288
|
}
|
|
3289
|
-
function
|
|
3289
|
+
function F() {
|
|
3290
3290
|
return /* @__PURE__ */ D(Re, { align: "middle", children: [
|
|
3291
3291
|
/* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(
|
|
3292
3292
|
Ve,
|
|
@@ -3304,7 +3304,7 @@ const Qt = gt(ka), en = (e) => {
|
|
|
3304
3304
|
return /* @__PURE__ */ n(ya, { setTitle: m, children: /* @__PURE__ */ n(
|
|
3305
3305
|
Je,
|
|
3306
3306
|
{
|
|
3307
|
-
title: a ?
|
|
3307
|
+
title: a ? F() : u,
|
|
3308
3308
|
centered: !0,
|
|
3309
3309
|
width: f,
|
|
3310
3310
|
open: t,
|
|
@@ -3322,7 +3322,7 @@ const Qt = gt(ka), en = (e) => {
|
|
|
3322
3322
|
parentWidth: b,
|
|
3323
3323
|
...c
|
|
3324
3324
|
},
|
|
3325
|
-
`${d}-${r}-${w}-${
|
|
3325
|
+
`${d}-${r}-${w}-${I}-${R}-${S}-${i}`
|
|
3326
3326
|
)
|
|
3327
3327
|
}
|
|
3328
3328
|
) });
|
|
@@ -3613,20 +3613,20 @@ function wo(e) {
|
|
|
3613
3613
|
searchError: u,
|
|
3614
3614
|
searchValues: m,
|
|
3615
3615
|
showLimitOptions: g = !0
|
|
3616
|
-
} = e, [h, p] = v(), [y, w] = v(), [
|
|
3616
|
+
} = e, [h, p] = v(), [y, w] = v(), [I, R] = v(!1), S = ce(), { token: x } = Ja(), [A] = ct.useForm();
|
|
3617
3617
|
fe(() => {
|
|
3618
3618
|
A.setFieldsValue(m);
|
|
3619
3619
|
}, [m]);
|
|
3620
|
-
const
|
|
3620
|
+
const F = () => {
|
|
3621
3621
|
if (!y)
|
|
3622
3622
|
return;
|
|
3623
|
-
const _ =
|
|
3623
|
+
const _ = I ? y : h, T = _ == null ? void 0 : _.rows;
|
|
3624
3624
|
return T == null ? void 0 : T.map((O, $) => /* @__PURE__ */ n(Re, { children: O.map((E, z) => /* @__PURE__ */ n(de, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ n(Ga, { field: E }) }, z)) }, $));
|
|
3625
3625
|
};
|
|
3626
3626
|
xt(() => {
|
|
3627
|
-
|
|
3627
|
+
R(!1), S.current = new mi(r, t), S.current.parse(), p(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
|
|
3628
3628
|
}, [t, r]);
|
|
3629
|
-
const b =
|
|
3629
|
+
const b = F(), C = (_) => {
|
|
3630
3630
|
var E;
|
|
3631
3631
|
const { limit: T, offset: O } = _;
|
|
3632
3632
|
delete _.offset, delete _.limit;
|
|
@@ -3655,13 +3655,13 @@ function wo(e) {
|
|
|
3655
3655
|
initialValues: { offset: a, limit: l },
|
|
3656
3656
|
children: [
|
|
3657
3657
|
b,
|
|
3658
|
-
|
|
3658
|
+
I && g && /* @__PURE__ */ n(za, { onLimitChange: c }),
|
|
3659
3659
|
/* @__PURE__ */ n(
|
|
3660
3660
|
qa,
|
|
3661
3661
|
{
|
|
3662
|
-
advancedFilter:
|
|
3662
|
+
advancedFilter: I,
|
|
3663
3663
|
onAdvancedFilterToggle: () => {
|
|
3664
|
-
|
|
3664
|
+
R(!I);
|
|
3665
3665
|
},
|
|
3666
3666
|
onClear: () => {
|
|
3667
3667
|
A.resetFields(), i();
|
|
@@ -3821,43 +3821,41 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
|
|
|
3821
3821
|
);
|
|
3822
3822
|
}, nr = (e) => {
|
|
3823
3823
|
var x, A;
|
|
3824
|
-
const { id: t, model: r, context: i = {} } = e, [o, s] = v(!1), [a, l] = v(!1)
|
|
3825
|
-
v(!1);
|
|
3826
|
-
const [c, d] = v(), [f, u] = v(), { t: m } = H(he), g = H(
|
|
3824
|
+
const { id: t, model: r, context: i = {} } = e, [o, s] = v(!1), [a, l] = v(!1), [c, d] = v(), [f, u] = v(), { t: m } = H(he), g = H(
|
|
3827
3825
|
ut
|
|
3828
3826
|
), { openRelate: h } = g || {}, p = H(
|
|
3829
3827
|
Mt
|
|
3830
3828
|
), { processAction: y } = p || {}, w = Ie(async () => {
|
|
3831
3829
|
var T, O, $, E, z, P;
|
|
3832
|
-
const
|
|
3830
|
+
const F = await k.getHandler().getView({
|
|
3833
3831
|
model: r,
|
|
3834
3832
|
type: "form",
|
|
3835
3833
|
context: i
|
|
3836
3834
|
});
|
|
3837
|
-
d(
|
|
3835
|
+
d(F);
|
|
3838
3836
|
let b = [];
|
|
3839
|
-
const { toolbar: C } =
|
|
3840
|
-
(T = C.action) == null || T.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (O = C.action) == null || O.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), ($ = C.relate) == null || $.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (E = C.relate) == null || E.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), (z = C.print) == null || z.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), b = b.filter((N) => Object.keys(
|
|
3837
|
+
const { toolbar: C } = F;
|
|
3838
|
+
(T = C.action) == null || T.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (O = C.action) == null || O.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), ($ = C.relate) == null || $.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), (E = C.relate) == null || E.filter((N) => "domain" in N).map((N) => b.push(...dr(N.domain))), (z = C.print) == null || z.filter((N) => "context" in N).map((N) => b.push(...Fn(N.context))), b = b.filter((N) => Object.keys(F.fields).indexOf(N) > -1);
|
|
3841
3839
|
let _ = {};
|
|
3842
3840
|
return b = [...new Set(b)], b.length > 0 && (_ = (await k.getHandler().readObjects({
|
|
3843
3841
|
model: r,
|
|
3844
3842
|
ids: [t],
|
|
3845
3843
|
fieldsToRetrieve: b,
|
|
3846
3844
|
context: i
|
|
3847
|
-
}))[0]), _ = { ...Rt(_, b), active_id: t }, u(_), !
|
|
3845
|
+
}))[0]), _ = { ...Rt(_, b), active_id: t }, u(_), !F || !F.toolbar ? [] : [
|
|
3848
3846
|
{
|
|
3849
3847
|
sticky: !0,
|
|
3850
3848
|
items: [
|
|
3851
3849
|
{
|
|
3852
3850
|
id: "action",
|
|
3853
3851
|
name: m("action"),
|
|
3854
|
-
disabled: !
|
|
3852
|
+
disabled: !F.toolbar.action || F.toolbar.action.length === 0,
|
|
3855
3853
|
icon: /* @__PURE__ */ n(Gn, {})
|
|
3856
3854
|
},
|
|
3857
3855
|
{
|
|
3858
3856
|
id: "print",
|
|
3859
3857
|
name: m("report"),
|
|
3860
|
-
disabled: !
|
|
3858
|
+
disabled: !F.toolbar.print || F.toolbar.print.length === 0,
|
|
3861
3859
|
icon: /* @__PURE__ */ n(qn, {})
|
|
3862
3860
|
},
|
|
3863
3861
|
{
|
|
@@ -3869,43 +3867,34 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
|
|
|
3869
3867
|
{
|
|
3870
3868
|
label: m("related"),
|
|
3871
3869
|
icon: /* @__PURE__ */ n(Gr, {}),
|
|
3872
|
-
items: (P =
|
|
3870
|
+
items: (P = F == null ? void 0 : F.toolbar) == null ? void 0 : P.relate
|
|
3873
3871
|
}
|
|
3874
3872
|
];
|
|
3875
3873
|
}, [i, t, r, m]);
|
|
3876
3874
|
if (!t)
|
|
3877
3875
|
return null;
|
|
3878
|
-
function F
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
return;
|
|
3887
|
-
h({
|
|
3888
|
-
relateData: b,
|
|
3889
|
-
values: f,
|
|
3890
|
-
fields: c.fields,
|
|
3891
|
-
action_id: b.id,
|
|
3892
|
-
action_type: b.type
|
|
3893
|
-
});
|
|
3894
|
-
}
|
|
3876
|
+
function I(F) {
|
|
3877
|
+
F.id === "action" ? s(!0) : F.id === "print" ? l(!0) : h({
|
|
3878
|
+
relateData: F,
|
|
3879
|
+
values: f,
|
|
3880
|
+
fields: c.fields,
|
|
3881
|
+
action_id: F.id,
|
|
3882
|
+
action_type: F.type
|
|
3883
|
+
});
|
|
3895
3884
|
}
|
|
3896
|
-
function
|
|
3885
|
+
function R(F) {
|
|
3897
3886
|
s(!1), y == null || y({
|
|
3898
|
-
actionData:
|
|
3887
|
+
actionData: F,
|
|
3899
3888
|
values: f,
|
|
3900
3889
|
fields: c.fields,
|
|
3901
3890
|
context: { active_id: t, active_ids: [t] }
|
|
3902
3891
|
});
|
|
3903
3892
|
}
|
|
3904
|
-
function S(
|
|
3893
|
+
function S(F) {
|
|
3905
3894
|
l(!1), y == null || y({
|
|
3906
3895
|
actionData: {
|
|
3907
|
-
...
|
|
3908
|
-
datas: { ...
|
|
3896
|
+
...F,
|
|
3897
|
+
datas: { ...F.datas || {}, ids: [t] }
|
|
3909
3898
|
},
|
|
3910
3899
|
values: f,
|
|
3911
3900
|
fields: c.fields
|
|
@@ -3916,7 +3905,7 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
|
|
|
3916
3905
|
eo,
|
|
3917
3906
|
{
|
|
3918
3907
|
onRetrieveData: w,
|
|
3919
|
-
onItemClick:
|
|
3908
|
+
onItemClick: I,
|
|
3920
3909
|
maxHeight: 300,
|
|
3921
3910
|
trigger: ["click"],
|
|
3922
3911
|
children: /* @__PURE__ */ n(gi, { style: { color: "rgba(0,0,0,.45)" } })
|
|
@@ -3927,7 +3916,7 @@ const tl = (e) => /* @__PURE__ */ n(we, { ...e, children: /* @__PURE__ */ n(bo,
|
|
|
3927
3916
|
{
|
|
3928
3917
|
visible: o,
|
|
3929
3918
|
items: (x = c == null ? void 0 : c.toolbar) == null ? void 0 : x.action,
|
|
3930
|
-
onItemClicked:
|
|
3919
|
+
onItemClicked: R,
|
|
3931
3920
|
onCancel: () => s(!1)
|
|
3932
3921
|
}
|
|
3933
3922
|
),
|
|
@@ -4207,12 +4196,12 @@ const il = (e) => {
|
|
|
4207
4196
|
statusForResults: p = {},
|
|
4208
4197
|
onChangeSort: y,
|
|
4209
4198
|
sorter: w,
|
|
4210
|
-
onFetchChildrenForRecord:
|
|
4211
|
-
childField:
|
|
4199
|
+
onFetchChildrenForRecord: I,
|
|
4200
|
+
childField: R,
|
|
4212
4201
|
rootTree: S = !1,
|
|
4213
4202
|
context: x,
|
|
4214
4203
|
readonly: A,
|
|
4215
|
-
onSelectAllRecords:
|
|
4204
|
+
onSelectAllRecords: F
|
|
4216
4205
|
} = e, b = ce(null), [C, _] = v([]), T = ce(!1), [O, $] = v(), { t: E } = H(he), z = ce(i), P = H(
|
|
4217
4206
|
it
|
|
4218
4207
|
), { title: N = void 0, setTitle: W = void 0 } = (S ? P : {}) || {}, M = ke(() => {
|
|
@@ -4249,7 +4238,7 @@ const il = (e) => {
|
|
|
4249
4238
|
(pe) => u && u.includes(pe.id)
|
|
4250
4239
|
).length;
|
|
4251
4240
|
return c ? null : o === void 0 ? /* @__PURE__ */ n(Ee, { className: "pb-4" }) : /* @__PURE__ */ D(Re, { align: "bottom", className: "pb-4", children: [
|
|
4252
|
-
/* @__PURE__ */ n(de, { span:
|
|
4241
|
+
/* @__PURE__ */ n(de, { span: F ? 8 : 12, children: /* @__PURE__ */ n(
|
|
4253
4242
|
ii,
|
|
4254
4243
|
{
|
|
4255
4244
|
total: o,
|
|
@@ -4259,23 +4248,23 @@ const il = (e) => {
|
|
|
4259
4248
|
onChange: l
|
|
4260
4249
|
}
|
|
4261
4250
|
) }),
|
|
4262
|
-
|
|
4251
|
+
F && /* @__PURE__ */ n(de, { span: 8, className: "text-center", children: /* @__PURE__ */ n(
|
|
4263
4252
|
Qa,
|
|
4264
4253
|
{
|
|
4265
4254
|
numberOfVisibleSelectedRows: q,
|
|
4266
4255
|
numberOfRealSelectedRows: (u == null ? void 0 : u.length) || 0,
|
|
4267
4256
|
numberOfTotalRows: C.length,
|
|
4268
4257
|
totalRecords: o || 0,
|
|
4269
|
-
onSelectAllRecords:
|
|
4258
|
+
onSelectAllRecords: F
|
|
4270
4259
|
}
|
|
4271
4260
|
) }),
|
|
4272
|
-
/* @__PURE__ */ n(de, { span:
|
|
4261
|
+
/* @__PURE__ */ n(de, { span: F ? 8 : 12, className: "text-right", children: Z })
|
|
4273
4262
|
] });
|
|
4274
4263
|
}, [
|
|
4275
4264
|
C,
|
|
4276
4265
|
c,
|
|
4277
4266
|
l,
|
|
4278
|
-
|
|
4267
|
+
F,
|
|
4279
4268
|
r,
|
|
4280
4269
|
u,
|
|
4281
4270
|
f,
|
|
@@ -4321,12 +4310,12 @@ const il = (e) => {
|
|
|
4321
4310
|
onChangeSort: y,
|
|
4322
4311
|
sorter: w,
|
|
4323
4312
|
readonly: A,
|
|
4324
|
-
expandableOpts:
|
|
4313
|
+
expandableOpts: I ? {
|
|
4325
4314
|
expandIcon: yi,
|
|
4326
4315
|
collapseIcon: wi,
|
|
4327
4316
|
loadingIcon: at,
|
|
4328
|
-
onFetchChildrenForRecord:
|
|
4329
|
-
childField:
|
|
4317
|
+
onFetchChildrenForRecord: I,
|
|
4318
|
+
childField: R
|
|
4330
4319
|
} : void 0
|
|
4331
4320
|
}
|
|
4332
4321
|
),
|
|
@@ -4350,7 +4339,7 @@ function xl(e, t) {
|
|
|
4350
4339
|
rootTree: f = !1,
|
|
4351
4340
|
parentContext: u = {},
|
|
4352
4341
|
onChangeSelectedRowKeys: m
|
|
4353
|
-
} = e, [g, h] = v(!1), [p, y] = v(!1), w = ce(!1),
|
|
4342
|
+
} = e, [g, h] = v(!1), [p, y] = v(!1), w = ce(!1), I = ce(null), [R, S] = v(), [x, A] = v(), [F, b] = v(), [C, _] = v(), [T, O] = v(200), $ = ce(), { height: E } = gn(), z = H(
|
|
4354
4343
|
Mt
|
|
4355
4344
|
), { processAction: P } = z || {}, N = H(
|
|
4356
4345
|
it
|
|
@@ -4397,7 +4386,7 @@ function xl(e, t) {
|
|
|
4397
4386
|
totalItems: qe,
|
|
4398
4387
|
getAllIds: $e
|
|
4399
4388
|
} = go({
|
|
4400
|
-
model:
|
|
4389
|
+
model: R,
|
|
4401
4390
|
setSearchTreeNameSearch: U,
|
|
4402
4391
|
setSelectedRowItems: je,
|
|
4403
4392
|
setSearchParams: V,
|
|
@@ -4408,7 +4397,7 @@ function xl(e, t) {
|
|
|
4408
4397
|
nameSearch: a,
|
|
4409
4398
|
searchNameGetDoneRef: w,
|
|
4410
4399
|
context: u,
|
|
4411
|
-
formView:
|
|
4400
|
+
formView: F,
|
|
4412
4401
|
treeView: x,
|
|
4413
4402
|
sorter: q,
|
|
4414
4403
|
setSorter: pe,
|
|
@@ -4420,7 +4409,7 @@ function xl(e, t) {
|
|
|
4420
4409
|
setActionViewTotalItems: ee,
|
|
4421
4410
|
limit: Pe,
|
|
4422
4411
|
setLimit: De,
|
|
4423
|
-
clearSelection: (Pt =
|
|
4412
|
+
clearSelection: (Pt = I.current) == null ? void 0 : Pt.unselectAll
|
|
4424
4413
|
});
|
|
4425
4414
|
yt(t, () => ({
|
|
4426
4415
|
refreshResults: () => {
|
|
@@ -4468,7 +4457,7 @@ function xl(e, t) {
|
|
|
4468
4457
|
const { id: Ge } = Me;
|
|
4469
4458
|
$.current || ($.current = await k.getHandler().treeButOpen({
|
|
4470
4459
|
id: x.view_id,
|
|
4471
|
-
model:
|
|
4460
|
+
model: R,
|
|
4472
4461
|
context: u
|
|
4473
4462
|
}));
|
|
4474
4463
|
const Tt = $.current[0][2];
|
|
@@ -4482,7 +4471,7 @@ function xl(e, t) {
|
|
|
4482
4471
|
context: u
|
|
4483
4472
|
}));
|
|
4484
4473
|
},
|
|
4485
|
-
[
|
|
4474
|
+
[R, u, P, x]
|
|
4486
4475
|
), Fe = Ie(
|
|
4487
4476
|
async (Me) => {
|
|
4488
4477
|
const { id: Ge } = Me;
|
|
@@ -4496,25 +4485,25 @@ function xl(e, t) {
|
|
|
4496
4485
|
}
|
|
4497
4486
|
s({
|
|
4498
4487
|
id: Ge,
|
|
4499
|
-
model:
|
|
4500
|
-
formView:
|
|
4488
|
+
model: R,
|
|
4489
|
+
formView: F,
|
|
4501
4490
|
treeView: x
|
|
4502
4491
|
});
|
|
4503
4492
|
},
|
|
4504
|
-
[
|
|
4493
|
+
[R, F, s, ye, x]
|
|
4505
4494
|
), Oe = Ie(async () => {
|
|
4506
4495
|
const Me = await $e();
|
|
4507
4496
|
re == null || re(Me.map((Ge) => ({ id: Ge }))), m == null || m(Me);
|
|
4508
4497
|
}, [$e, m, re]), rt = ke(() => x != null && x.isExpandable ? E - 160 : E - (T + 240), [E, T, x == null ? void 0 : x.isExpandable]), ze = ke(
|
|
4509
4498
|
() => Z == null ? void 0 : Z.map((Me) => Me.id),
|
|
4510
4499
|
[Z]
|
|
4511
|
-
), St = Ie(() => !x || !
|
|
4500
|
+
), St = Ie(() => !x || !F ? null : /* @__PURE__ */ D(X, { children: [
|
|
4512
4501
|
/* @__PURE__ */ n(
|
|
4513
4502
|
wo,
|
|
4514
4503
|
{
|
|
4515
|
-
fields: { ...
|
|
4504
|
+
fields: { ...F.fields, ...x.fields },
|
|
4516
4505
|
searchFields: mo([
|
|
4517
|
-
|
|
4506
|
+
F.search_fields,
|
|
4518
4507
|
x.search_fields
|
|
4519
4508
|
]),
|
|
4520
4509
|
onClear: xe,
|
|
@@ -4532,7 +4521,7 @@ function xl(e, t) {
|
|
|
4532
4521
|
/* @__PURE__ */ n(
|
|
4533
4522
|
tn,
|
|
4534
4523
|
{
|
|
4535
|
-
ref:
|
|
4524
|
+
ref: I,
|
|
4536
4525
|
context: u,
|
|
4537
4526
|
total: qe,
|
|
4538
4527
|
limit: Pe,
|
|
@@ -4562,7 +4551,7 @@ function xl(e, t) {
|
|
|
4562
4551
|
xe,
|
|
4563
4552
|
Le,
|
|
4564
4553
|
le,
|
|
4565
|
-
|
|
4554
|
+
F,
|
|
4566
4555
|
_e,
|
|
4567
4556
|
Pe,
|
|
4568
4557
|
Ce,
|
|
@@ -4598,9 +4587,9 @@ const So = gt(xl), To = (e) => {
|
|
|
4598
4587
|
domain: a,
|
|
4599
4588
|
context: l = {}
|
|
4600
4589
|
} = e, [c, d] = v(!1), { modalWidth: f, modalHeight: u } = gn(), { t: m } = H(he), [g, h] = v([]), p = async () => {
|
|
4601
|
-
await new Promise((
|
|
4602
|
-
}, y = async (
|
|
4603
|
-
const { id: S } =
|
|
4590
|
+
await new Promise((R) => setTimeout(R, 5)), r();
|
|
4591
|
+
}, y = async (R) => {
|
|
4592
|
+
const { id: S } = R;
|
|
4604
4593
|
i([S]);
|
|
4605
4594
|
};
|
|
4606
4595
|
function w() {
|
|
@@ -4610,7 +4599,7 @@ const So = gt(xl), To = (e) => {
|
|
|
4610
4599
|
}
|
|
4611
4600
|
i(g);
|
|
4612
4601
|
}
|
|
4613
|
-
const
|
|
4602
|
+
const I = () => /* @__PURE__ */ D(X, { children: [
|
|
4614
4603
|
/* @__PURE__ */ n(
|
|
4615
4604
|
So,
|
|
4616
4605
|
{
|
|
@@ -4662,7 +4651,7 @@ const So = gt(xl), To = (e) => {
|
|
|
4662
4651
|
footer: null,
|
|
4663
4652
|
destroyOnClose: !0,
|
|
4664
4653
|
maskClosable: !1,
|
|
4665
|
-
children:
|
|
4654
|
+
children: I()
|
|
4666
4655
|
}
|
|
4667
4656
|
),
|
|
4668
4657
|
/* @__PURE__ */ n(
|
|
@@ -4671,8 +4660,8 @@ const So = gt(xl), To = (e) => {
|
|
|
4671
4660
|
model: o,
|
|
4672
4661
|
visible: c,
|
|
4673
4662
|
parentContext: l,
|
|
4674
|
-
onSubmitSucceed: (
|
|
4675
|
-
d(!1), p(), i([
|
|
4663
|
+
onSubmitSucceed: (R) => {
|
|
4664
|
+
d(!1), p(), i([R]);
|
|
4676
4665
|
},
|
|
4677
4666
|
onCancel: () => {
|
|
4678
4667
|
d(!1), p();
|
|
@@ -4705,7 +4694,7 @@ const So = gt(xl), To = (e) => {
|
|
|
4705
4694
|
context: l,
|
|
4706
4695
|
id: c,
|
|
4707
4696
|
domain: d
|
|
4708
|
-
} = i, f = o && !a ? { backgroundColor: Fo.colorPrimaryBg } : void 0, [u, m] = v(!1), [g, h] = v(!1), [p, y] = v(!1), [w,
|
|
4697
|
+
} = i, f = o && !a ? { backgroundColor: Fo.colorPrimaryBg } : void 0, [u, m] = v(!1), [g, h] = v(!1), [p, y] = v(!1), [w, I] = v(), R = ce(!1), [S, x] = v(""), A = ce(), F = H(Be), { domain: b, getValues: C, getFields: _, getContext: T, elementHasLostFocus: O } = F || {}, $ = ce([]), [E, z] = v([]), P = t && t[0] || void 0, N = t && t[1] || "";
|
|
4709
4698
|
fe(() => {
|
|
4710
4699
|
!Array.isArray(t) && t && Z(t);
|
|
4711
4700
|
}, [t]), fe(() => {
|
|
@@ -4717,7 +4706,7 @@ const So = gt(xl), To = (e) => {
|
|
|
4717
4706
|
A.current = L.target.value, W([void 0, ""]);
|
|
4718
4707
|
}, Y = async () => {
|
|
4719
4708
|
if (!p && S !== N) {
|
|
4720
|
-
if (await new Promise((L) => setTimeout(L, 100)),
|
|
4709
|
+
if (await new Promise((L) => setTimeout(L, 100)), R.current) {
|
|
4721
4710
|
W([void 0, ""]);
|
|
4722
4711
|
return;
|
|
4723
4712
|
}
|
|
@@ -4747,10 +4736,10 @@ const So = gt(xl), To = (e) => {
|
|
|
4747
4736
|
context: { ...T == null ? void 0 : T(), ...l },
|
|
4748
4737
|
totalItems: 2
|
|
4749
4738
|
});
|
|
4750
|
-
ie.length === 1 ? Z(ie[0]) : (
|
|
4739
|
+
ie.length === 1 ? Z(ie[0]) : (I(L), m(!0));
|
|
4751
4740
|
return;
|
|
4752
4741
|
}
|
|
4753
|
-
|
|
4742
|
+
I(L), m(!0);
|
|
4754
4743
|
}, Z = async (L) => {
|
|
4755
4744
|
y(!0);
|
|
4756
4745
|
try {
|
|
@@ -4825,7 +4814,7 @@ const So = gt(xl), To = (e) => {
|
|
|
4825
4814
|
icon: p ? /* @__PURE__ */ n(at, {}) : /* @__PURE__ */ n(Yn, {}),
|
|
4826
4815
|
disabled: a || p,
|
|
4827
4816
|
onClick: () => {
|
|
4828
|
-
|
|
4817
|
+
R.current = !0, te(N);
|
|
4829
4818
|
},
|
|
4830
4819
|
style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
4831
4820
|
tabIndex: -1
|
|
@@ -4840,10 +4829,10 @@ const So = gt(xl), To = (e) => {
|
|
|
4840
4829
|
visible: u,
|
|
4841
4830
|
nameSearch: P ? void 0 : w,
|
|
4842
4831
|
onSelectValues: (L) => {
|
|
4843
|
-
m(!1), Z(L[0]),
|
|
4832
|
+
m(!1), Z(L[0]), R.current = !1, A.current = void 0;
|
|
4844
4833
|
},
|
|
4845
4834
|
onCloseModal: () => {
|
|
4846
|
-
m(!1),
|
|
4835
|
+
m(!1), R.current = !1;
|
|
4847
4836
|
}
|
|
4848
4837
|
}
|
|
4849
4838
|
),
|
|
@@ -4903,7 +4892,7 @@ const So = gt(xl), To = (e) => {
|
|
|
4903
4892
|
field: d,
|
|
4904
4893
|
operator: f,
|
|
4905
4894
|
manualIds: u
|
|
4906
|
-
} = e, [m, g] = v(!1), [h, p] = v(), [y, w] = v(), [
|
|
4895
|
+
} = e, [m, g] = v(!1), [h, p] = v(), [y, w] = v(), [I, R] = v(), [S, x] = v(0), [A, F] = v(0), [b, C] = v(), [_, T] = v(), [O, $] = v();
|
|
4907
4896
|
fe(() => {
|
|
4908
4897
|
P();
|
|
4909
4898
|
}, [t, o]);
|
|
@@ -4972,7 +4961,7 @@ const So = gt(xl), To = (e) => {
|
|
|
4972
4961
|
N = await E({
|
|
4973
4962
|
domain: Y,
|
|
4974
4963
|
isTotal: !0
|
|
4975
|
-
}),
|
|
4964
|
+
}), R(N);
|
|
4976
4965
|
}
|
|
4977
4966
|
if (N ? (W = Math.round(M / N * 100 * 100) / 100, w(W)) : w(0), o) {
|
|
4978
4967
|
const Y = await k.getHandler().parseCondition({
|
|
@@ -5005,13 +4994,13 @@ const So = gt(xl), To = (e) => {
|
|
|
5005
4994
|
bounds: !0,
|
|
5006
4995
|
onResize: (N) => {
|
|
5007
4996
|
var W, M;
|
|
5008
|
-
x((W = N.bounds) == null ? void 0 : W.height),
|
|
4997
|
+
x((W = N.bounds) == null ? void 0 : W.height), F((M = N.bounds) == null ? void 0 : M.width);
|
|
5009
4998
|
},
|
|
5010
4999
|
children: ({ measureRef: N }) => a ? /* @__PURE__ */ n(
|
|
5011
5000
|
Vl,
|
|
5012
5001
|
{
|
|
5013
5002
|
value: h,
|
|
5014
|
-
total:
|
|
5003
|
+
total: I,
|
|
5015
5004
|
percent: y,
|
|
5016
5005
|
measureRef: N,
|
|
5017
5006
|
height: S,
|
|
@@ -5024,7 +5013,7 @@ const So = gt(xl), To = (e) => {
|
|
|
5024
5013
|
Al,
|
|
5025
5014
|
{
|
|
5026
5015
|
value: h,
|
|
5027
|
-
total:
|
|
5016
|
+
total: I,
|
|
5028
5017
|
measureRef: N,
|
|
5029
5018
|
height: S,
|
|
5030
5019
|
width: A,
|
|
@@ -5290,9 +5279,9 @@ const { processGraphData: Ml } = Br, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
|
|
|
5290
5279
|
return xt(() => {
|
|
5291
5280
|
(async () => {
|
|
5292
5281
|
d(!0), u(void 0);
|
|
5293
|
-
const
|
|
5294
|
-
w(
|
|
5295
|
-
const
|
|
5282
|
+
const I = Kn(o);
|
|
5283
|
+
w(I.type || "line");
|
|
5284
|
+
const R = Pl({ ooui: I });
|
|
5296
5285
|
let S, x;
|
|
5297
5286
|
try {
|
|
5298
5287
|
({ values: S, fields: x } = await Bl({
|
|
@@ -5300,8 +5289,8 @@ const { processGraphData: Ml } = Br, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
|
|
|
5300
5289
|
domain: r,
|
|
5301
5290
|
context: i,
|
|
5302
5291
|
limit: s,
|
|
5303
|
-
order:
|
|
5304
|
-
fields:
|
|
5292
|
+
order: I.timerange ? I.x.name : null,
|
|
5293
|
+
fields: R,
|
|
5305
5294
|
manualIds: l
|
|
5306
5295
|
}));
|
|
5307
5296
|
} catch (A) {
|
|
@@ -5315,7 +5304,7 @@ const { processGraphData: Ml } = Br, { getFieldsToRetrieve: Pl } = hi, Ll = (e)
|
|
|
5315
5304
|
}
|
|
5316
5305
|
p(S);
|
|
5317
5306
|
const A = Ml({
|
|
5318
|
-
ooui:
|
|
5307
|
+
ooui: I,
|
|
5319
5308
|
values: S,
|
|
5320
5309
|
fields: x,
|
|
5321
5310
|
options: {
|
|
@@ -5450,8 +5439,8 @@ const jl = (e, t) => {
|
|
|
5450
5439
|
context: o
|
|
5451
5440
|
});
|
|
5452
5441
|
g(w.arch);
|
|
5453
|
-
const
|
|
5454
|
-
u(
|
|
5442
|
+
const I = Kn(w.arch);
|
|
5443
|
+
u(I);
|
|
5455
5444
|
} catch (w) {
|
|
5456
5445
|
return console.error(w), /* @__PURE__ */ n(X, { children: JSON.stringify(w) });
|
|
5457
5446
|
}
|
|
@@ -5477,7 +5466,7 @@ const jl = (e, t) => {
|
|
|
5477
5466
|
switch (f.type) {
|
|
5478
5467
|
case "indicatorField":
|
|
5479
5468
|
case "indicator": {
|
|
5480
|
-
const w = f,
|
|
5469
|
+
const w = f, I = w.type === "indicatorField" ? {
|
|
5481
5470
|
field: w.field,
|
|
5482
5471
|
operator: w.operator
|
|
5483
5472
|
} : {};
|
|
@@ -5493,7 +5482,7 @@ const jl = (e, t) => {
|
|
|
5493
5482
|
icon: w.icon,
|
|
5494
5483
|
suffix: w.suffix,
|
|
5495
5484
|
manualIds: l,
|
|
5496
|
-
...
|
|
5485
|
+
...I
|
|
5497
5486
|
}
|
|
5498
5487
|
);
|
|
5499
5488
|
}
|
|
@@ -5555,7 +5544,7 @@ const jl = (e, t) => {
|
|
|
5555
5544
|
function w() {
|
|
5556
5545
|
return /* @__PURE__ */ n("div", { className: "inline-block w-3" });
|
|
5557
5546
|
}
|
|
5558
|
-
function
|
|
5547
|
+
function I() {
|
|
5559
5548
|
return /* @__PURE__ */ n(
|
|
5560
5549
|
"div",
|
|
5561
5550
|
{
|
|
@@ -5568,7 +5557,7 @@ const jl = (e, t) => {
|
|
|
5568
5557
|
}
|
|
5569
5558
|
);
|
|
5570
5559
|
}
|
|
5571
|
-
function
|
|
5560
|
+
function R() {
|
|
5572
5561
|
return /* @__PURE__ */ n(
|
|
5573
5562
|
Ze,
|
|
5574
5563
|
{
|
|
@@ -5612,7 +5601,7 @@ const jl = (e, t) => {
|
|
|
5612
5601
|
] });
|
|
5613
5602
|
}
|
|
5614
5603
|
return /* @__PURE__ */ D("div", { className: "flex mb-2", children: [
|
|
5615
|
-
|
|
5604
|
+
I(),
|
|
5616
5605
|
/* @__PURE__ */ D("div", { className: "flex-none h-8 pl-2", children: [
|
|
5617
5606
|
s !== "graph" && h && /* @__PURE__ */ n(
|
|
5618
5607
|
Ze,
|
|
@@ -5633,7 +5622,7 @@ const jl = (e, t) => {
|
|
|
5633
5622
|
}
|
|
5634
5623
|
),
|
|
5635
5624
|
s !== "graph" && w(),
|
|
5636
|
-
s !== "graph" &&
|
|
5625
|
+
s !== "graph" && R(),
|
|
5637
5626
|
s === "form" && x(),
|
|
5638
5627
|
w(),
|
|
5639
5628
|
p && /* @__PURE__ */ n(
|
|
@@ -5662,7 +5651,7 @@ const Ql = (e) => {
|
|
|
5662
5651
|
var $e;
|
|
5663
5652
|
const { value: t, onChange: r, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: c, setItemIndex: d } = H(
|
|
5664
5653
|
Ro
|
|
5665
|
-
), f = H(Be), { activeId: u, getFields: m, getValues: g, getContext: h, domain: p } = f || {}, { lang: y, t: w } = H(he), [
|
|
5654
|
+
), f = H(Be), { activeId: u, getFields: m, getValues: g, getContext: h, domain: p } = f || {}, { lang: y, t: w } = H(he), [I, R] = v(!1), [S, x] = v(!1), [A, F] = v(), [b, C] = v(!1), [_, T] = v(!1), [O, $] = v(), [E, z] = v([]), [P, N] = v(!1), W = ce([]), [M, Y] = v(), te = ce(), [Z, re] = v(void 0), {
|
|
5666
5655
|
readOnly: G,
|
|
5667
5656
|
relation: V,
|
|
5668
5657
|
context: L,
|
|
@@ -5693,7 +5682,7 @@ const Ql = (e) => {
|
|
|
5693
5682
|
await Pe(), c > ee.length - 1 && c !== 0 && d(0);
|
|
5694
5683
|
}, Pe = async (J) => {
|
|
5695
5684
|
var oe, Te, ye;
|
|
5696
|
-
x(!0),
|
|
5685
|
+
x(!0), R(!1), F(void 0);
|
|
5697
5686
|
try {
|
|
5698
5687
|
const [Fe, Oe] = await er({
|
|
5699
5688
|
treeView: {
|
|
@@ -5710,7 +5699,7 @@ const Ql = (e) => {
|
|
|
5710
5699
|
});
|
|
5711
5700
|
return te.current || (te.current = Fe.map((rt) => rt.id)), (a || J) === "tree" && Oe && re(Oe), ve(Fe), Fe;
|
|
5712
5701
|
} catch (Fe) {
|
|
5713
|
-
|
|
5702
|
+
F(Fe);
|
|
5714
5703
|
} finally {
|
|
5715
5704
|
x(!1);
|
|
5716
5705
|
}
|
|
@@ -5764,10 +5753,10 @@ const Ql = (e) => {
|
|
|
5764
5753
|
} : Fe);
|
|
5765
5754
|
ve(ye);
|
|
5766
5755
|
}, ue = (J) => {
|
|
5767
|
-
|
|
5756
|
+
I ? Zt({
|
|
5768
5757
|
lang: y,
|
|
5769
5758
|
onOk: () => {
|
|
5770
|
-
be(), J(),
|
|
5759
|
+
be(), J(), R(!1);
|
|
5771
5760
|
}
|
|
5772
5761
|
}) : J();
|
|
5773
5762
|
}, Ne = () => {
|
|
@@ -5797,7 +5786,7 @@ const Ql = (e) => {
|
|
|
5797
5786
|
T(!0);
|
|
5798
5787
|
}) : T(!0);
|
|
5799
5788
|
}, Ce = async () => {
|
|
5800
|
-
x(!0),
|
|
5789
|
+
x(!0), R(!1), F(void 0);
|
|
5801
5790
|
try {
|
|
5802
5791
|
if (ee[c].id > 0) {
|
|
5803
5792
|
const J = s.map((oe) => oe.id === ee[c].id ? {
|
|
@@ -5810,12 +5799,12 @@ const Ql = (e) => {
|
|
|
5810
5799
|
s.filter((J) => J.id !== ee[c].id)
|
|
5811
5800
|
);
|
|
5812
5801
|
} catch (J) {
|
|
5813
|
-
|
|
5802
|
+
F(J);
|
|
5814
5803
|
}
|
|
5815
5804
|
d(0), x(!1);
|
|
5816
5805
|
}, _e = async () => {
|
|
5817
5806
|
const J = ee.filter((oe) => E.includes(oe.id));
|
|
5818
|
-
x(!0),
|
|
5807
|
+
x(!0), R(!1), F(void 0);
|
|
5819
5808
|
try {
|
|
5820
5809
|
const oe = J.map((ye) => ye.id), Te = s.filter((ye) => !(oe.includes(ye.id) && ye.id < 0)).map((ye) => oe.includes(ye.id) ? {
|
|
5821
5810
|
...ye,
|
|
@@ -5823,7 +5812,7 @@ const Ql = (e) => {
|
|
|
5823
5812
|
} : ye);
|
|
5824
5813
|
ve(Te);
|
|
5825
5814
|
} catch (oe) {
|
|
5826
|
-
|
|
5815
|
+
F(oe);
|
|
5827
5816
|
}
|
|
5828
5817
|
d(0), x(!1);
|
|
5829
5818
|
}, We = (J, oe, Te, ye = !1) => {
|
|
@@ -5882,7 +5871,7 @@ const Ql = (e) => {
|
|
|
5882
5871
|
}
|
|
5883
5872
|
ve(oe);
|
|
5884
5873
|
} catch (ye) {
|
|
5885
|
-
|
|
5874
|
+
F(ye);
|
|
5886
5875
|
} finally {
|
|
5887
5876
|
x(!1);
|
|
5888
5877
|
}
|
|
@@ -5916,7 +5905,7 @@ const Ql = (e) => {
|
|
|
5916
5905
|
values: { ...Oe, id: rt },
|
|
5917
5906
|
treeValues: { ...Oe, id: rt }
|
|
5918
5907
|
} : lt);
|
|
5919
|
-
ve(ze),
|
|
5908
|
+
ve(ze), R(!0);
|
|
5920
5909
|
},
|
|
5921
5910
|
readOnly: G
|
|
5922
5911
|
}
|
|
@@ -5974,7 +5963,7 @@ const Ql = (e) => {
|
|
|
5974
5963
|
title: Le(),
|
|
5975
5964
|
readOnly: G || !1,
|
|
5976
5965
|
isMany2Many: q,
|
|
5977
|
-
formHasChanges:
|
|
5966
|
+
formHasChanges: I,
|
|
5978
5967
|
totalItems: ee.length,
|
|
5979
5968
|
currentItemIndex: c,
|
|
5980
5969
|
onDelete: Ne,
|
|
@@ -6031,25 +6020,25 @@ const Ql = (e) => {
|
|
|
6031
6020
|
xt(() => {
|
|
6032
6021
|
w();
|
|
6033
6022
|
}, [t]);
|
|
6034
|
-
const y = async (
|
|
6023
|
+
const y = async (R) => o && o[R] ? o[R] : await k.getHandler().getView({
|
|
6035
6024
|
model: i,
|
|
6036
|
-
type:
|
|
6025
|
+
type: R,
|
|
6037
6026
|
context: { ...p == null ? void 0 : p(), ...a }
|
|
6038
6027
|
}), w = async () => {
|
|
6039
6028
|
d(!0), u(void 0);
|
|
6040
6029
|
try {
|
|
6041
6030
|
if (r && r.length > 0) {
|
|
6042
|
-
for (const
|
|
6043
|
-
const S = await y(
|
|
6044
|
-
m.set(
|
|
6031
|
+
for (const R of r) {
|
|
6032
|
+
const S = await y(R);
|
|
6033
|
+
m.set(R, S);
|
|
6045
6034
|
}
|
|
6046
6035
|
g(m);
|
|
6047
6036
|
} else {
|
|
6048
|
-
const
|
|
6049
|
-
m.set("form",
|
|
6037
|
+
const R = await y("form"), S = await y("tree");
|
|
6038
|
+
m.set("form", R), m.set("tree", S), g(m);
|
|
6050
6039
|
}
|
|
6051
|
-
} catch (
|
|
6052
|
-
u(JSON.stringify(
|
|
6040
|
+
} catch (R) {
|
|
6041
|
+
u(JSON.stringify(R));
|
|
6053
6042
|
} finally {
|
|
6054
6043
|
d(!1);
|
|
6055
6044
|
}
|
|
@@ -6059,7 +6048,7 @@ const Ql = (e) => {
|
|
|
6059
6048
|
{
|
|
6060
6049
|
required: s,
|
|
6061
6050
|
type: "array",
|
|
6062
|
-
validator: async (
|
|
6051
|
+
validator: async (R, S) => {
|
|
6063
6052
|
if (!S)
|
|
6064
6053
|
throw new Error();
|
|
6065
6054
|
if (!S.items)
|
|
@@ -6285,7 +6274,7 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6285
6274
|
y.registersAmount === "selected" && (i == null ? void 0 : i.length) !== 0 && (w = [
|
|
6286
6275
|
["id", "in", i == null ? void 0 : i.map((S) => S.id)]
|
|
6287
6276
|
]);
|
|
6288
|
-
const { datas:
|
|
6277
|
+
const { datas: I } = await k.getHandler().exportData({
|
|
6289
6278
|
model: e,
|
|
6290
6279
|
fields: gc({
|
|
6291
6280
|
keys: y.selectedKeys,
|
|
@@ -6297,8 +6286,8 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6297
6286
|
format: y.exportType
|
|
6298
6287
|
});
|
|
6299
6288
|
a(), await new Promise((S) => setTimeout(S, 200));
|
|
6300
|
-
const
|
|
6301
|
-
yn(
|
|
6289
|
+
const R = await Dt(I);
|
|
6290
|
+
yn(I, R.mime);
|
|
6302
6291
|
},
|
|
6303
6292
|
[r, e, o, s, t, a]
|
|
6304
6293
|
), f = Ie(async () => {
|
|
@@ -6310,14 +6299,14 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6310
6299
|
return l.current["/"] = y, _r({ fields: y });
|
|
6311
6300
|
}, [e, t, l]), u = Ie(
|
|
6312
6301
|
async (y) => {
|
|
6313
|
-
const
|
|
6314
|
-
model:
|
|
6302
|
+
const I = Ln(y, l.current)[Pn(y)], R = I.relation, S = await k.getHandler().getFields({
|
|
6303
|
+
model: R,
|
|
6315
6304
|
context: t,
|
|
6316
6305
|
fields: []
|
|
6317
6306
|
});
|
|
6318
6307
|
for (const [x, A] of Object.entries(S))
|
|
6319
6308
|
S[x].string = fc({
|
|
6320
|
-
parentTitle:
|
|
6309
|
+
parentTitle: I.string,
|
|
6321
6310
|
title: A.string
|
|
6322
6311
|
});
|
|
6323
6312
|
return l.current[y] = S, _r({
|
|
@@ -6333,13 +6322,13 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6333
6322
|
onGetFieldChilds: u
|
|
6334
6323
|
});
|
|
6335
6324
|
return {
|
|
6336
|
-
predefinedExports: y.map((
|
|
6337
|
-
...
|
|
6338
|
-
fields:
|
|
6339
|
-
const x = Pn(S.key),
|
|
6325
|
+
predefinedExports: y.map((R) => ({
|
|
6326
|
+
...R,
|
|
6327
|
+
fields: R.fields.map((S) => {
|
|
6328
|
+
const x = Pn(S.key), F = Ln(S.key, l.current)[x];
|
|
6340
6329
|
return {
|
|
6341
6330
|
key: S.key,
|
|
6342
|
-
title:
|
|
6331
|
+
title: F.string
|
|
6343
6332
|
};
|
|
6344
6333
|
})
|
|
6345
6334
|
})),
|
|
@@ -6347,7 +6336,7 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6347
6336
|
};
|
|
6348
6337
|
}, [l.current]), g = Ie(
|
|
6349
6338
|
async (y) => {
|
|
6350
|
-
const w = await p("ir.exports"),
|
|
6339
|
+
const w = await p("ir.exports"), I = await p("ir.exports.line"), R = await k.getHandler().create({
|
|
6351
6340
|
model: "ir.exports",
|
|
6352
6341
|
values: {
|
|
6353
6342
|
name: y.name,
|
|
@@ -6361,12 +6350,12 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6361
6350
|
model: "ir.exports.line",
|
|
6362
6351
|
values: {
|
|
6363
6352
|
name: S.key,
|
|
6364
|
-
export_id:
|
|
6353
|
+
export_id: R
|
|
6365
6354
|
},
|
|
6366
|
-
fields:
|
|
6355
|
+
fields: I,
|
|
6367
6356
|
context: t
|
|
6368
6357
|
}))
|
|
6369
|
-
), { ...y, id:
|
|
6358
|
+
), { ...y, id: R };
|
|
6370
6359
|
},
|
|
6371
6360
|
[]
|
|
6372
6361
|
), h = Ie(
|
|
@@ -6617,23 +6606,23 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6617
6606
|
const { ooui: t } = e, { required: r } = t;
|
|
6618
6607
|
return /* @__PURE__ */ n(we, { required: r, ...e, children: /* @__PURE__ */ n(Rc, { ooui: t }) });
|
|
6619
6608
|
}, Rc = (e) => {
|
|
6620
|
-
const { ooui: t, value: r, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Fc(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = ce(null), { setFieldValue: f, getFieldValue: u } = H(Be) || {}, { t: m } = H(he), g = r ? Ns(r) : "", h = (
|
|
6621
|
-
i == null || i(
|
|
6609
|
+
const { ooui: t, value: r, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Fc(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = ce(null), { setFieldValue: f, getFieldValue: u } = H(Be) || {}, { t: m } = H(he), g = r ? Ns(r) : "", h = (R) => {
|
|
6610
|
+
i == null || i(R);
|
|
6622
6611
|
};
|
|
6623
6612
|
async function p() {
|
|
6624
|
-
const
|
|
6625
|
-
x.href = S, x.download = A ||
|
|
6613
|
+
const R = await Dt(r), S = `data:${R == null ? void 0 : R.mime};base64,${r}`, x = document.createElement("a"), A = u(a), F = u("name");
|
|
6614
|
+
x.href = S, x.download = A || F, x.click();
|
|
6626
6615
|
}
|
|
6627
6616
|
async function y() {
|
|
6628
|
-
const
|
|
6629
|
-
yn(r,
|
|
6617
|
+
const R = await Dt(r);
|
|
6618
|
+
yn(r, R.mime);
|
|
6630
6619
|
}
|
|
6631
|
-
async function w(
|
|
6632
|
-
|
|
6633
|
-
const S =
|
|
6620
|
+
async function w(R) {
|
|
6621
|
+
R.stopPropagation(), R.preventDefault();
|
|
6622
|
+
const S = R.target.files[0], x = await co(S);
|
|
6634
6623
|
h(x), a && f(a, S.name);
|
|
6635
6624
|
}
|
|
6636
|
-
function
|
|
6625
|
+
function I() {
|
|
6637
6626
|
f(a, void 0), h(void 0);
|
|
6638
6627
|
}
|
|
6639
6628
|
return /* @__PURE__ */ D(Re, { gutter: 8, children: [
|
|
@@ -6685,7 +6674,7 @@ const { useToken: sc } = He, { TextArea: Mn } = st, ac = (e) => {
|
|
|
6685
6674
|
{
|
|
6686
6675
|
tooltip: m("clear"),
|
|
6687
6676
|
disabled: o || !r,
|
|
6688
|
-
onClick:
|
|
6677
|
+
onClick: I,
|
|
6689
6678
|
icon: /* @__PURE__ */ n(Un, {})
|
|
6690
6679
|
}
|
|
6691
6680
|
)
|
|
@@ -6984,16 +6973,16 @@ function Dc(e) {
|
|
|
6984
6973
|
try {
|
|
6985
6974
|
const w = await k.getHandler().readObjects({
|
|
6986
6975
|
model: "ir.attachment",
|
|
6987
|
-
ids: t.map((
|
|
6976
|
+
ids: t.map((I) => I.id),
|
|
6988
6977
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
6989
6978
|
context: a.current.getContext()
|
|
6990
6979
|
});
|
|
6991
6980
|
f(
|
|
6992
|
-
w.map((
|
|
6993
|
-
id:
|
|
6994
|
-
name:
|
|
6995
|
-
datas_fname:
|
|
6996
|
-
link:
|
|
6981
|
+
w.map((I) => ({
|
|
6982
|
+
id: I.id,
|
|
6983
|
+
name: I.name,
|
|
6984
|
+
datas_fname: I.datas_fname,
|
|
6985
|
+
link: I.link
|
|
6997
6986
|
}))
|
|
6998
6987
|
);
|
|
6999
6988
|
} catch (w) {
|
|
@@ -7006,22 +6995,22 @@ function Dc(e) {
|
|
|
7006
6995
|
return;
|
|
7007
6996
|
}
|
|
7008
6997
|
m(!0);
|
|
7009
|
-
let
|
|
6998
|
+
let I;
|
|
7010
6999
|
try {
|
|
7011
|
-
|
|
7000
|
+
I = (await k.getHandler().readObjects({
|
|
7012
7001
|
model: "ir.attachment",
|
|
7013
7002
|
ids: [w.id],
|
|
7014
7003
|
context: a.current.getContext()
|
|
7015
7004
|
}))[0];
|
|
7016
|
-
} catch (
|
|
7017
|
-
Qe(
|
|
7005
|
+
} catch (R) {
|
|
7006
|
+
Qe(R);
|
|
7018
7007
|
}
|
|
7019
|
-
if (m(!1), !!
|
|
7020
|
-
if (
|
|
7021
|
-
const
|
|
7022
|
-
yn(
|
|
7008
|
+
if (m(!1), !!I)
|
|
7009
|
+
if (I.datas) {
|
|
7010
|
+
const R = await Dt(I.datas);
|
|
7011
|
+
yn(I.datas, R.mime);
|
|
7023
7012
|
} else
|
|
7024
|
-
s(
|
|
7013
|
+
s(I);
|
|
7025
7014
|
}, []), y = Ie(async (w) => {
|
|
7026
7015
|
s(w);
|
|
7027
7016
|
}, []);
|
|
@@ -7074,12 +7063,12 @@ function kc({ toolbar: e }) {
|
|
|
7074
7063
|
duplicatingItem: p,
|
|
7075
7064
|
setDuplicatingItem: y,
|
|
7076
7065
|
setResults: w,
|
|
7077
|
-
formIsLoading:
|
|
7078
|
-
attachments:
|
|
7066
|
+
formIsLoading: I,
|
|
7067
|
+
attachments: R,
|
|
7079
7068
|
formRef: S,
|
|
7080
7069
|
setFormHasChanges: x,
|
|
7081
7070
|
previousView: A,
|
|
7082
|
-
setPreviousView:
|
|
7071
|
+
setPreviousView: F,
|
|
7083
7072
|
goToResourceId: b
|
|
7084
7073
|
} = H(it), { t: C, lang: _ } = H(he), T = H(
|
|
7085
7074
|
Mt
|
|
@@ -7157,7 +7146,7 @@ function kc({ toolbar: e }) {
|
|
|
7157
7146
|
y == null || y(!1);
|
|
7158
7147
|
}
|
|
7159
7148
|
}
|
|
7160
|
-
const re = a || h ||
|
|
7149
|
+
const re = a || h || I || p;
|
|
7161
7150
|
function G(V) {
|
|
7162
7151
|
O == null || O({
|
|
7163
7152
|
actionData: V,
|
|
@@ -7170,7 +7159,7 @@ function kc({ toolbar: e }) {
|
|
|
7170
7159
|
});
|
|
7171
7160
|
}
|
|
7172
7161
|
return r ? /* @__PURE__ */ D(Ue, { wrap: !0, children: [
|
|
7173
|
-
|
|
7162
|
+
I && /* @__PURE__ */ D(X, { children: [
|
|
7174
7163
|
/* @__PURE__ */ n(Ee, {}),
|
|
7175
7164
|
Ft(),
|
|
7176
7165
|
Ft()
|
|
@@ -7178,7 +7167,7 @@ function kc({ toolbar: e }) {
|
|
|
7178
7167
|
/* @__PURE__ */ n(
|
|
7179
7168
|
Vo,
|
|
7180
7169
|
{
|
|
7181
|
-
disabled: a ||
|
|
7170
|
+
disabled: a || I || h || p
|
|
7182
7171
|
}
|
|
7183
7172
|
),
|
|
7184
7173
|
/* @__PURE__ */ n(
|
|
@@ -7196,7 +7185,7 @@ function kc({ toolbar: e }) {
|
|
|
7196
7185
|
{
|
|
7197
7186
|
icon: /* @__PURE__ */ n(Xn, {}),
|
|
7198
7187
|
tooltip: C("duplicate"),
|
|
7199
|
-
disabled: s || a || l === void 0 || p ||
|
|
7188
|
+
disabled: s || a || l === void 0 || p || I,
|
|
7200
7189
|
loading: p,
|
|
7201
7190
|
onClick: Z
|
|
7202
7191
|
}
|
|
@@ -7206,7 +7195,7 @@ function kc({ toolbar: e }) {
|
|
|
7206
7195
|
{
|
|
7207
7196
|
icon: /* @__PURE__ */ n(zn, {}),
|
|
7208
7197
|
tooltip: C("delete"),
|
|
7209
|
-
disabled: a || l === void 0 || h || p ||
|
|
7198
|
+
disabled: a || l === void 0 || h || p || I,
|
|
7210
7199
|
loading: h,
|
|
7211
7200
|
onClick: Y
|
|
7212
7201
|
}
|
|
@@ -7217,7 +7206,7 @@ function kc({ toolbar: e }) {
|
|
|
7217
7206
|
{
|
|
7218
7207
|
icon: /* @__PURE__ */ n(Xr, {}),
|
|
7219
7208
|
tooltip: C("showLogs"),
|
|
7220
|
-
disabled: a || l === void 0 || h || p ||
|
|
7209
|
+
disabled: a || l === void 0 || h || p || I,
|
|
7221
7210
|
loading: !1,
|
|
7222
7211
|
onClick: () => {
|
|
7223
7212
|
Do(m, l, C);
|
|
@@ -7229,7 +7218,7 @@ function kc({ toolbar: e }) {
|
|
|
7229
7218
|
{
|
|
7230
7219
|
icon: /* @__PURE__ */ n(hn, {}),
|
|
7231
7220
|
tooltip: C("refresh"),
|
|
7232
|
-
disabled: a || l === void 0 || h || p ||
|
|
7221
|
+
disabled: a || l === void 0 || h || p || I,
|
|
7233
7222
|
loading: !1,
|
|
7234
7223
|
onClick: () => {
|
|
7235
7224
|
P(() => {
|
|
@@ -7246,7 +7235,7 @@ function kc({ toolbar: e }) {
|
|
|
7246
7235
|
previousView: A,
|
|
7247
7236
|
availableViews: t,
|
|
7248
7237
|
onChangeView: (V) => {
|
|
7249
|
-
|
|
7238
|
+
F == null || F(r), x == null || x(!1), i == null || i(V);
|
|
7250
7239
|
},
|
|
7251
7240
|
disabled: re,
|
|
7252
7241
|
formHasChanges: s
|
|
@@ -7347,7 +7336,7 @@ function kc({ toolbar: e }) {
|
|
|
7347
7336
|
Dc,
|
|
7348
7337
|
{
|
|
7349
7338
|
disabled: re,
|
|
7350
|
-
attachments:
|
|
7339
|
+
attachments: R,
|
|
7351
7340
|
onAddNewAttachment: async () => {
|
|
7352
7341
|
const V = await It({
|
|
7353
7342
|
onFormSave: o
|
|
@@ -7415,8 +7404,8 @@ const { useToken: Ec } = He, ko = (e) => {
|
|
|
7415
7404
|
fe(() => {
|
|
7416
7405
|
l && !g && y(!1), !r && !l && (h(!0), y(!0));
|
|
7417
7406
|
}, [g, l]);
|
|
7418
|
-
const w = (
|
|
7419
|
-
i == null || i(
|
|
7407
|
+
const w = (I) => {
|
|
7408
|
+
i == null || i(I.target.value);
|
|
7420
7409
|
};
|
|
7421
7410
|
return /* @__PURE__ */ D(Re, { gutter: 8, wrap: !1, align: "middle", children: [
|
|
7422
7411
|
l ? null : /* @__PURE__ */ n(de, { flex: "32px", children: g ? /* @__PURE__ */ n(
|
|
@@ -7749,12 +7738,12 @@ const Kc = (e) => {
|
|
|
7749
7738
|
setSearchParams: p = void 0,
|
|
7750
7739
|
searchVisible: y = !0,
|
|
7751
7740
|
setSearchVisible: w = void 0,
|
|
7752
|
-
sorter:
|
|
7753
|
-
setSorter:
|
|
7741
|
+
sorter: I = void 0,
|
|
7742
|
+
setSorter: R = void 0,
|
|
7754
7743
|
setTotalItems: S = void 0,
|
|
7755
7744
|
setSearchTreeNameSearch: x = void 0,
|
|
7756
7745
|
setTreeIsLoading: A = void 0,
|
|
7757
|
-
limit:
|
|
7746
|
+
limit: F,
|
|
7758
7747
|
setLimit: b,
|
|
7759
7748
|
searchParams: C,
|
|
7760
7749
|
searchValues: _,
|
|
@@ -7779,15 +7768,15 @@ const Kc = (e) => {
|
|
|
7779
7768
|
context: o,
|
|
7780
7769
|
formView: a,
|
|
7781
7770
|
treeView: l,
|
|
7782
|
-
sorter:
|
|
7783
|
-
setSorter:
|
|
7771
|
+
sorter: I,
|
|
7772
|
+
setSorter: R,
|
|
7784
7773
|
setCurrentItemIndex: u,
|
|
7785
7774
|
setResultsActionView: f,
|
|
7786
7775
|
resultsActionView: g,
|
|
7787
7776
|
domain: s,
|
|
7788
7777
|
currentId: m,
|
|
7789
7778
|
setActionViewTotalItems: S,
|
|
7790
|
-
limit:
|
|
7779
|
+
limit: F,
|
|
7791
7780
|
setLimit: b
|
|
7792
7781
|
});
|
|
7793
7782
|
return !r || !t ? null : /* @__PURE__ */ D(X, { children: [
|
|
@@ -7807,7 +7796,7 @@ const Kc = (e) => {
|
|
|
7807
7796
|
a.search_fields,
|
|
7808
7797
|
l.search_fields
|
|
7809
7798
|
]),
|
|
7810
|
-
limit:
|
|
7799
|
+
limit: F,
|
|
7811
7800
|
onClear: z,
|
|
7812
7801
|
offset: W,
|
|
7813
7802
|
isSearching: P,
|
|
@@ -7828,7 +7817,7 @@ const Kc = (e) => {
|
|
|
7828
7817
|
model: i,
|
|
7829
7818
|
context: o,
|
|
7830
7819
|
domain: Ut(C || [], s),
|
|
7831
|
-
limit: $ ?
|
|
7820
|
+
limit: $ ? F : void 0,
|
|
7832
7821
|
manualIds: $ ? g == null ? void 0 : g.map((Y) => Y.id) : void 0
|
|
7833
7822
|
}
|
|
7834
7823
|
)
|
|
@@ -7938,12 +7927,12 @@ function qc(e) {
|
|
|
7938
7927
|
setSearchVisible: p,
|
|
7939
7928
|
setSearchTreeNameSearch: y,
|
|
7940
7929
|
searchTreeNameSearch: w,
|
|
7941
|
-
treeIsLoading:
|
|
7942
|
-
setPreviousView:
|
|
7930
|
+
treeIsLoading: I,
|
|
7931
|
+
setPreviousView: R,
|
|
7943
7932
|
previousView: S,
|
|
7944
7933
|
results: x,
|
|
7945
7934
|
limit: A,
|
|
7946
|
-
totalItems:
|
|
7935
|
+
totalItems: F
|
|
7947
7936
|
} = H(it), { parentContext: b = {}, treeExpandable: C, toolbar: _ } = e, T = Gc(
|
|
7948
7937
|
No.FEATURE_ADVANCED_EXPORT
|
|
7949
7938
|
), { t: O, lang: $ } = H(he), E = H(
|
|
@@ -8008,7 +7997,7 @@ function qc(e) {
|
|
|
8008
7997
|
});
|
|
8009
7998
|
}
|
|
8010
7999
|
return /* @__PURE__ */ D(Ue, { wrap: !0, children: [
|
|
8011
|
-
|
|
8000
|
+
I && /* @__PURE__ */ D(X, { children: [
|
|
8012
8001
|
/* @__PURE__ */ n(Ee, {}),
|
|
8013
8002
|
vt(),
|
|
8014
8003
|
vt()
|
|
@@ -8017,7 +8006,7 @@ function qc(e) {
|
|
|
8017
8006
|
/* @__PURE__ */ n(
|
|
8018
8007
|
jc,
|
|
8019
8008
|
{
|
|
8020
|
-
disabled: l || a ||
|
|
8009
|
+
disabled: l || a || I,
|
|
8021
8010
|
searchText: w,
|
|
8022
8011
|
onSearch: (G) => {
|
|
8023
8012
|
G && G.trim().length > 0 ? y == null || y(G) : y == null || y(void 0);
|
|
@@ -8038,18 +8027,18 @@ function qc(e) {
|
|
|
8038
8027
|
onClick: () => {
|
|
8039
8028
|
p == null || p(!h);
|
|
8040
8029
|
},
|
|
8041
|
-
disabled: l || a ||
|
|
8030
|
+
disabled: l || a || I,
|
|
8042
8031
|
badgeNumber: g == null ? void 0 : g.length
|
|
8043
8032
|
}
|
|
8044
8033
|
),
|
|
8045
8034
|
vt(),
|
|
8046
|
-
/* @__PURE__ */ n(Vo, { disabled:
|
|
8035
|
+
/* @__PURE__ */ n(Vo, { disabled: I }),
|
|
8047
8036
|
/* @__PURE__ */ n(
|
|
8048
8037
|
Xe,
|
|
8049
8038
|
{
|
|
8050
8039
|
icon: /* @__PURE__ */ n(Xn, {}),
|
|
8051
8040
|
tooltip: O("duplicate"),
|
|
8052
|
-
disabled: !o || (o == null ? void 0 : o.length) !== 1 || l ||
|
|
8041
|
+
disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || I,
|
|
8053
8042
|
loading: l,
|
|
8054
8043
|
onClick: te
|
|
8055
8044
|
}
|
|
@@ -8059,7 +8048,7 @@ function qc(e) {
|
|
|
8059
8048
|
{
|
|
8060
8049
|
icon: /* @__PURE__ */ n(zn, {}),
|
|
8061
8050
|
tooltip: O("delete"),
|
|
8062
|
-
disabled: !(o && (o == null ? void 0 : o.length) > 0) ||
|
|
8051
|
+
disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
|
|
8063
8052
|
loading: a,
|
|
8064
8053
|
onClick: M
|
|
8065
8054
|
}
|
|
@@ -8071,7 +8060,7 @@ function qc(e) {
|
|
|
8071
8060
|
{
|
|
8072
8061
|
icon: /* @__PURE__ */ n(Xr, {}),
|
|
8073
8062
|
tooltip: O("showLogs"),
|
|
8074
|
-
disabled: !(o && (o == null ? void 0 : o.length) > 0) ||
|
|
8063
|
+
disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
|
|
8075
8064
|
loading: !1,
|
|
8076
8065
|
onClick: () => {
|
|
8077
8066
|
Do(d, o[0].id, O);
|
|
@@ -8083,7 +8072,7 @@ function qc(e) {
|
|
|
8083
8072
|
{
|
|
8084
8073
|
icon: /* @__PURE__ */ n(hn, {}),
|
|
8085
8074
|
tooltip: O("refresh"),
|
|
8086
|
-
disabled: l || a ||
|
|
8075
|
+
disabled: l || a || I,
|
|
8087
8076
|
loading: !1,
|
|
8088
8077
|
onClick: () => {
|
|
8089
8078
|
var G;
|
|
@@ -8099,10 +8088,10 @@ function qc(e) {
|
|
|
8099
8088
|
currentView: r,
|
|
8100
8089
|
availableViews: t,
|
|
8101
8090
|
onChangeView: (G) => {
|
|
8102
|
-
|
|
8091
|
+
R == null || R(r), i == null || i(G);
|
|
8103
8092
|
},
|
|
8104
8093
|
previousView: S,
|
|
8105
|
-
disabled:
|
|
8094
|
+
disabled: I
|
|
8106
8095
|
}
|
|
8107
8096
|
)
|
|
8108
8097
|
] }),
|
|
@@ -8112,7 +8101,7 @@ function qc(e) {
|
|
|
8112
8101
|
{
|
|
8113
8102
|
icon: /* @__PURE__ */ n(Gn, {}),
|
|
8114
8103
|
placement: "bottomRight",
|
|
8115
|
-
disabled: !(o && (o == null ? void 0 : o.length) > 0) ||
|
|
8104
|
+
disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
|
|
8116
8105
|
onRetrieveData: async () => [
|
|
8117
8106
|
{ label: O("actions"), items: _ == null ? void 0 : _.action }
|
|
8118
8107
|
],
|
|
@@ -8126,7 +8115,7 @@ function qc(e) {
|
|
|
8126
8115
|
{
|
|
8127
8116
|
icon: /* @__PURE__ */ n(qn, {}),
|
|
8128
8117
|
placement: "bottomRight",
|
|
8129
|
-
disabled: !(o && (o == null ? void 0 : o.length) > 0) ||
|
|
8118
|
+
disabled: !(o && (o == null ? void 0 : o.length) > 0) || I,
|
|
8130
8119
|
onRetrieveData: async () => [
|
|
8131
8120
|
{ label: O("reports"), items: _ == null ? void 0 : _.print }
|
|
8132
8121
|
],
|
|
@@ -8205,7 +8194,7 @@ function qc(e) {
|
|
|
8205
8194
|
}
|
|
8206
8195
|
N(!0);
|
|
8207
8196
|
},
|
|
8208
|
-
disabled: l || a ||
|
|
8197
|
+
disabled: l || a || I || W
|
|
8209
8198
|
}
|
|
8210
8199
|
),
|
|
8211
8200
|
/* @__PURE__ */ n(
|
|
@@ -8220,7 +8209,7 @@ function qc(e) {
|
|
|
8220
8209
|
g || []
|
|
8221
8210
|
),
|
|
8222
8211
|
limit: A,
|
|
8223
|
-
totalRegisters:
|
|
8212
|
+
totalRegisters: F || 0,
|
|
8224
8213
|
selectedRegistersToExport: o,
|
|
8225
8214
|
visibleRegisters: (x == null ? void 0 : x.length) || 0,
|
|
8226
8215
|
context: b
|
|
@@ -8273,12 +8262,12 @@ const zc = (e) => {
|
|
|
8273
8262
|
onRowClicked: (y) => {
|
|
8274
8263
|
const { id: w } = y;
|
|
8275
8264
|
f(w);
|
|
8276
|
-
const
|
|
8277
|
-
p == null || p(h), c(
|
|
8278
|
-
const
|
|
8265
|
+
const I = d.findIndex((S) => S.id === w);
|
|
8266
|
+
p == null || p(h), c(I);
|
|
8267
|
+
const R = m.find(
|
|
8279
8268
|
(S) => S.type === "form"
|
|
8280
8269
|
);
|
|
8281
|
-
u(
|
|
8270
|
+
u(R);
|
|
8282
8271
|
}
|
|
8283
8272
|
}
|
|
8284
8273
|
)
|
|
@@ -8410,8 +8399,8 @@ function td(e, t) {
|
|
|
8410
8399
|
action_type: h,
|
|
8411
8400
|
treeExpandable: p = !1,
|
|
8412
8401
|
limit: y
|
|
8413
|
-
} = e, [w,
|
|
8414
|
-
|
|
8402
|
+
} = e, [w, I] = v(), [R, S] = v([]), [x, A] = v(!0), F = m || void 0, [b, C] = v(
|
|
8403
|
+
F
|
|
8415
8404
|
), [_, T] = v([]), [O, $] = v(), [E, z] = v([]), [P, N] = v(), [W, M] = v(0), [Y, te] = v(!1), [Z, re] = v(!1), [G, V] = v(), { t: L } = H(he) || {}, ie = ce(), q = ce(), pe = H(
|
|
8416
8405
|
ut
|
|
8417
8406
|
), {
|
|
@@ -8433,7 +8422,7 @@ function td(e, t) {
|
|
|
8433
8422
|
C(j), U == null || U(j);
|
|
8434
8423
|
}
|
|
8435
8424
|
function je(j) {
|
|
8436
|
-
|
|
8425
|
+
I(j), ee == null || ee(j);
|
|
8437
8426
|
}
|
|
8438
8427
|
yt(t, () => ({
|
|
8439
8428
|
canWeClose: xe
|
|
@@ -8519,8 +8508,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8519
8508
|
), Pe == null || Pe(c)), je(We), S(j), A(!1);
|
|
8520
8509
|
};
|
|
8521
8510
|
l({ tabKey: c, canWeClose: xe }), fe(() => {
|
|
8522
|
-
const j =
|
|
8523
|
-
je(Ce || j), m ? U == null || U(
|
|
8511
|
+
const j = R.find((_e) => _e.type === "tree"), Ce = R.find((_e) => d.id ? _e.type === d.type && _e.view_id === d.id : _e.type === d.type);
|
|
8512
|
+
je(Ce || j), m ? U == null || U(F) : (De(void 0), $(void 0)), Se();
|
|
8524
8513
|
}, [i, s, m]), fe(() => {
|
|
8525
8514
|
ve === c && (U == null || U(b), ee == null || ee(w));
|
|
8526
8515
|
}, [ge, ve]);
|
|
@@ -8571,7 +8560,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8571
8560
|
});
|
|
8572
8561
|
}
|
|
8573
8562
|
function Ne() {
|
|
8574
|
-
return
|
|
8563
|
+
return R.map((j) => {
|
|
8575
8564
|
switch (j.type) {
|
|
8576
8565
|
case "form":
|
|
8577
8566
|
return /* @__PURE__ */ n(
|
|
@@ -8601,11 +8590,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8601
8590
|
model: i,
|
|
8602
8591
|
context: o,
|
|
8603
8592
|
domain: r,
|
|
8604
|
-
formView:
|
|
8593
|
+
formView: R.find((Ce) => Ce.type === "form"),
|
|
8605
8594
|
treeView: j,
|
|
8606
8595
|
searchTreeRef: q,
|
|
8607
8596
|
searchTreeNameSearch: G,
|
|
8608
|
-
availableViews:
|
|
8597
|
+
availableViews: R,
|
|
8609
8598
|
results: E,
|
|
8610
8599
|
setCurrentItemIndex: $,
|
|
8611
8600
|
setCurrentId: De,
|
|
@@ -8622,8 +8611,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8622
8611
|
model: i,
|
|
8623
8612
|
context: o,
|
|
8624
8613
|
domain: r,
|
|
8625
|
-
treeView:
|
|
8626
|
-
formView:
|
|
8614
|
+
treeView: R.find((Ce) => Ce.type === "tree"),
|
|
8615
|
+
formView: R.find((Ce) => Ce.type === "form")
|
|
8627
8616
|
},
|
|
8628
8617
|
`${j.type}-${j.view_id}`
|
|
8629
8618
|
);
|
|
@@ -8644,7 +8633,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8644
8633
|
ie.current.clearAndReload();
|
|
8645
8634
|
else {
|
|
8646
8635
|
De(void 0);
|
|
8647
|
-
const j =
|
|
8636
|
+
const j = R.find(
|
|
8648
8637
|
(Ce) => Ce.type === "form"
|
|
8649
8638
|
);
|
|
8650
8639
|
je(j);
|
|
@@ -8656,7 +8645,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8656
8645
|
title: a,
|
|
8657
8646
|
currentView: w,
|
|
8658
8647
|
setCurrentView: je,
|
|
8659
|
-
availableViews:
|
|
8648
|
+
availableViews: R,
|
|
8660
8649
|
formRef: ie,
|
|
8661
8650
|
searchTreeRef: q,
|
|
8662
8651
|
onNewClicked: Ye,
|
|
@@ -8718,15 +8707,15 @@ async function nd({
|
|
|
8718
8707
|
limit: u,
|
|
8719
8708
|
view_type: m
|
|
8720
8709
|
} = s, g = m === "tree", h = [];
|
|
8721
|
-
for (const
|
|
8722
|
-
const [
|
|
8723
|
-
if (
|
|
8724
|
-
h.push(
|
|
8710
|
+
for (const I of d) {
|
|
8711
|
+
const [R, S] = I;
|
|
8712
|
+
if (R)
|
|
8713
|
+
h.push(I);
|
|
8725
8714
|
else {
|
|
8726
8715
|
const { view_id: x } = await k.getHandler().getView({
|
|
8727
8716
|
model: c,
|
|
8728
8717
|
type: S,
|
|
8729
|
-
id:
|
|
8718
|
+
id: R,
|
|
8730
8719
|
context: { ...t, ...a }
|
|
8731
8720
|
});
|
|
8732
8721
|
h.push([x, S]);
|
|
@@ -8842,10 +8831,10 @@ function cd(e) {
|
|
|
8842
8831
|
domain: s = [],
|
|
8843
8832
|
visible: a = !0,
|
|
8844
8833
|
parentContext: l = {}
|
|
8845
|
-
} = e, [c, d] = v(!1), [f, u] = v(!1), [m, g] = v(), [h, p] = v(), [y, w] = v(), [
|
|
8846
|
-
te(!0),
|
|
8834
|
+
} = e, [c, d] = v(!1), [f, u] = v(!1), [m, g] = v(), [h, p] = v(), [y, w] = v(), [I, R] = v(1), [S, x] = v(0), A = ce(ld), F = ce([]), [b, C] = v(0), [_, T] = v([]), [O, $] = v(void 0), [E, z] = v(), [P, N] = v(), [W, M] = v(), [Y, te] = v(!1), Z = ce([]), re = (U) => {
|
|
8835
|
+
te(!0), R(U), x((U - 1) * A.current);
|
|
8847
8836
|
}, G = async () => {
|
|
8848
|
-
const U = Z.current.length > 0 ? Z.current : s, ge = Ut(
|
|
8837
|
+
const U = Z.current.length > 0 ? Z.current : s, ge = Ut(F.current, U), { colors: ve } = At(h), { totalItems: Ke, results: Pe, attrsEvaluated: De } = await k.getHandler().searchForTree({
|
|
8849
8838
|
params: ge,
|
|
8850
8839
|
limit: A.current,
|
|
8851
8840
|
offset: S,
|
|
@@ -8872,7 +8861,7 @@ function cd(e) {
|
|
|
8872
8861
|
};
|
|
8873
8862
|
fe(() => {
|
|
8874
8863
|
f && a && V();
|
|
8875
|
-
}, [
|
|
8864
|
+
}, [I, S, f, a]);
|
|
8876
8865
|
const L = async (U) => {
|
|
8877
8866
|
u(!1), d(!0), M(void 0);
|
|
8878
8867
|
try {
|
|
@@ -8922,7 +8911,7 @@ function cd(e) {
|
|
|
8922
8911
|
showPagination: !1,
|
|
8923
8912
|
total: b,
|
|
8924
8913
|
limit: A.current,
|
|
8925
|
-
page:
|
|
8914
|
+
page: I,
|
|
8926
8915
|
treeView: h,
|
|
8927
8916
|
results: _,
|
|
8928
8917
|
onRequestPageChange: re,
|
|
@@ -8972,14 +8961,14 @@ function ud(e, t) {
|
|
|
8972
8961
|
refresh: () => {
|
|
8973
8962
|
w();
|
|
8974
8963
|
},
|
|
8975
|
-
configDashboard:
|
|
8964
|
+
configDashboard: F
|
|
8976
8965
|
}));
|
|
8977
8966
|
async function w() {
|
|
8978
8967
|
d(!0), m(!0), u(void 0);
|
|
8979
8968
|
try {
|
|
8980
|
-
const b = await
|
|
8969
|
+
const b = await I(), C = await S(b), _ = b.fields[On].relation, T = C[On].items;
|
|
8981
8970
|
y.current = b.fields;
|
|
8982
|
-
const O = await
|
|
8971
|
+
const O = await R({
|
|
8983
8972
|
items: T,
|
|
8984
8973
|
model: _,
|
|
8985
8974
|
context: i
|
|
@@ -8989,14 +8978,14 @@ function ud(e, t) {
|
|
|
8989
8978
|
u(JSON.stringify(b));
|
|
8990
8979
|
}
|
|
8991
8980
|
}
|
|
8992
|
-
async function
|
|
8981
|
+
async function I() {
|
|
8993
8982
|
return await k.getHandler().getView({
|
|
8994
8983
|
model: r,
|
|
8995
8984
|
type: "form",
|
|
8996
8985
|
context: i
|
|
8997
8986
|
});
|
|
8998
8987
|
}
|
|
8999
|
-
async function
|
|
8988
|
+
async function R({
|
|
9000
8989
|
items: b,
|
|
9001
8990
|
model: C,
|
|
9002
8991
|
context: _
|
|
@@ -9085,7 +9074,7 @@ function ud(e, t) {
|
|
|
9085
9074
|
context: i
|
|
9086
9075
|
});
|
|
9087
9076
|
}
|
|
9088
|
-
async function
|
|
9077
|
+
async function F() {
|
|
9089
9078
|
g(s);
|
|
9090
9079
|
}
|
|
9091
9080
|
return f ? (console.log(f), /* @__PURE__ */ n(tt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : c ? /* @__PURE__ */ n(at, {}) : /* @__PURE__ */ n(od, { onPositionItemsChanged: A, children: a.map((b, C) => {
|
|
@@ -9217,11 +9206,11 @@ const fd = gt(ud), md = (e) => {
|
|
|
9217
9206
|
const { ooui: t } = e;
|
|
9218
9207
|
return /* @__PURE__ */ n(we, { type: "array", ...e, children: /* @__PURE__ */ n(hd, { ooui: t }) });
|
|
9219
9208
|
}, hd = (e) => {
|
|
9220
|
-
const { value: t, ooui: r, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((b) => b.operation !== "pendingRemove").map((b) => b.id), [a, l] = v([]), [c, d] = v(), [f, u] = v(!1), { relation: m, context: g, readOnly: h, field: p, columns: y } = r, w = H(Be), { getContext:
|
|
9209
|
+
const { value: t, ooui: r, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((b) => b.operation !== "pendingRemove").map((b) => b.id), [a, l] = v([]), [c, d] = v(), [f, u] = v(!1), { relation: m, context: g, readOnly: h, field: p, columns: y } = r, w = H(Be), { getContext: I } = w || {};
|
|
9221
9210
|
xt(() => {
|
|
9222
9211
|
S();
|
|
9223
9212
|
}, [o]);
|
|
9224
|
-
const
|
|
9213
|
+
const R = (b) => {
|
|
9225
9214
|
i == null || i({
|
|
9226
9215
|
items: b
|
|
9227
9216
|
});
|
|
@@ -9246,7 +9235,7 @@ const fd = gt(ud), md = (e) => {
|
|
|
9246
9235
|
model: m,
|
|
9247
9236
|
params: b,
|
|
9248
9237
|
fieldsToRetrieve: [p],
|
|
9249
|
-
context: { ...
|
|
9238
|
+
context: { ...I == null ? void 0 : I(), ...g }
|
|
9250
9239
|
})).map((T) => {
|
|
9251
9240
|
const O = T[p];
|
|
9252
9241
|
let $ = O;
|
|
@@ -9262,17 +9251,17 @@ const fd = gt(ud), md = (e) => {
|
|
|
9262
9251
|
return /* @__PURE__ */ n(tt, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
9263
9252
|
}
|
|
9264
9253
|
const x = () => {
|
|
9265
|
-
|
|
9254
|
+
F(a.map((b) => b.value));
|
|
9266
9255
|
}, A = () => {
|
|
9267
|
-
|
|
9268
|
-
},
|
|
9256
|
+
F([]);
|
|
9257
|
+
}, F = (b) => {
|
|
9269
9258
|
const C = o.map((T) => b.includes(T.id) ? T.operation == "pendingRemove" ? {
|
|
9270
9259
|
...T,
|
|
9271
9260
|
operation: "original"
|
|
9272
9261
|
} : T : { id: T.id, operation: "pendingRemove" }), _ = C.map((T) => T.id);
|
|
9273
9262
|
b.filter((T) => !_.includes(T)).map((T) => {
|
|
9274
9263
|
C.push({ id: T, operation: "pendingLink" });
|
|
9275
|
-
}),
|
|
9264
|
+
}), R(C);
|
|
9276
9265
|
};
|
|
9277
9266
|
return f && a.length === 0 ? /* @__PURE__ */ n(Ee, {}) : /* @__PURE__ */ n(X, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
|
|
9278
9267
|
/* @__PURE__ */ n(
|
|
@@ -9280,7 +9269,7 @@ const fd = gt(ud), md = (e) => {
|
|
|
9280
9269
|
{
|
|
9281
9270
|
value: a.length ? s : [],
|
|
9282
9271
|
disabled: h,
|
|
9283
|
-
onChange:
|
|
9272
|
+
onChange: F,
|
|
9284
9273
|
style: { width: "100%" },
|
|
9285
9274
|
children: /* @__PURE__ */ n(Re, { children: a.map((b) => /* @__PURE__ */ n(de, { span: Math.floor(24 / y), children: /* @__PURE__ */ n(Kt, { value: b.value, children: b.label }) })) })
|
|
9286
9275
|
}
|
|
@@ -9437,7 +9426,7 @@ function Ed(e, t) {
|
|
|
9437
9426
|
action: S,
|
|
9438
9427
|
values: x,
|
|
9439
9428
|
forced_values: A,
|
|
9440
|
-
initialViewType:
|
|
9429
|
+
initialViewType: F,
|
|
9441
9430
|
res_id: b,
|
|
9442
9431
|
domain: C = []
|
|
9443
9432
|
}) {
|
|
@@ -9482,16 +9471,16 @@ function Ed(e, t) {
|
|
|
9482
9471
|
}
|
|
9483
9472
|
}
|
|
9484
9473
|
let G;
|
|
9485
|
-
if (
|
|
9474
|
+
if (F) {
|
|
9486
9475
|
const [V, L] = re.find(
|
|
9487
|
-
([ie, q]) => q ===
|
|
9476
|
+
([ie, q]) => q === F
|
|
9488
9477
|
);
|
|
9489
9478
|
G = { id: V, type: L };
|
|
9490
9479
|
} else {
|
|
9491
9480
|
const [V, L] = re[0];
|
|
9492
9481
|
G = { id: V, type: L };
|
|
9493
9482
|
}
|
|
9494
|
-
|
|
9483
|
+
R({
|
|
9495
9484
|
domain: [...z, ...C],
|
|
9496
9485
|
context: { ...o, ...E },
|
|
9497
9486
|
model: P,
|
|
@@ -9512,7 +9501,7 @@ function Ed(e, t) {
|
|
|
9512
9501
|
title: S,
|
|
9513
9502
|
content: x,
|
|
9514
9503
|
key: A,
|
|
9515
|
-
action:
|
|
9504
|
+
action: F
|
|
9516
9505
|
}) {
|
|
9517
9506
|
let b = [...c];
|
|
9518
9507
|
c.length === 1 && c[0].key === "welcome" && (b = [...c.filter((C) => C.key !== "welcome")]), d([
|
|
@@ -9522,7 +9511,7 @@ function Ed(e, t) {
|
|
|
9522
9511
|
key: A,
|
|
9523
9512
|
closable: !0,
|
|
9524
9513
|
content: x,
|
|
9525
|
-
action:
|
|
9514
|
+
action: F
|
|
9526
9515
|
}
|
|
9527
9516
|
]), l(A);
|
|
9528
9517
|
}
|
|
@@ -9530,7 +9519,7 @@ function Ed(e, t) {
|
|
|
9530
9519
|
relateData: S,
|
|
9531
9520
|
fields: x,
|
|
9532
9521
|
values: A,
|
|
9533
|
-
action_id:
|
|
9522
|
+
action_id: F,
|
|
9534
9523
|
action_type: b
|
|
9535
9524
|
}) {
|
|
9536
9525
|
const {
|
|
@@ -9554,7 +9543,7 @@ function Ed(e, t) {
|
|
|
9554
9543
|
fields: x,
|
|
9555
9544
|
context: { ...o, ...M }
|
|
9556
9545
|
}) : [];
|
|
9557
|
-
|
|
9546
|
+
R({
|
|
9558
9547
|
model: C,
|
|
9559
9548
|
target: $,
|
|
9560
9549
|
views: O,
|
|
@@ -9562,13 +9551,13 @@ function Ed(e, t) {
|
|
|
9562
9551
|
domain: Y,
|
|
9563
9552
|
title: E,
|
|
9564
9553
|
initialView: W,
|
|
9565
|
-
action_id:
|
|
9554
|
+
action_id: F,
|
|
9566
9555
|
action_type: b,
|
|
9567
9556
|
limit: z
|
|
9568
9557
|
});
|
|
9569
9558
|
}
|
|
9570
9559
|
async function w(S) {
|
|
9571
|
-
const { action_id: x, action_type: A, res_id:
|
|
9560
|
+
const { action_id: x, action_type: A, res_id: F, view_id: b } = S, C = `${A},${x}`, _ = await k.getHandler().getActionData({
|
|
9572
9561
|
action: C,
|
|
9573
9562
|
context: o
|
|
9574
9563
|
}), T = bt({
|
|
@@ -9610,7 +9599,7 @@ function Ed(e, t) {
|
|
|
9610
9599
|
} else
|
|
9611
9600
|
[te, Z] = Y.find((G) => G[0] === void 0 ? !1 : G[0] === b);
|
|
9612
9601
|
const re = { id: te, type: Z };
|
|
9613
|
-
|
|
9602
|
+
R({
|
|
9614
9603
|
domain: O,
|
|
9615
9604
|
context: { ...o, ...T },
|
|
9616
9605
|
model: $,
|
|
@@ -9620,16 +9609,16 @@ function Ed(e, t) {
|
|
|
9620
9609
|
initialView: re,
|
|
9621
9610
|
action_id: x,
|
|
9622
9611
|
action_type: A,
|
|
9623
|
-
res_id:
|
|
9612
|
+
res_id: F,
|
|
9624
9613
|
treeExpandable: M,
|
|
9625
9614
|
limit: W
|
|
9626
9615
|
});
|
|
9627
9616
|
}
|
|
9628
|
-
async function
|
|
9617
|
+
async function I({
|
|
9629
9618
|
model: S,
|
|
9630
9619
|
values: x,
|
|
9631
9620
|
forced_values: A,
|
|
9632
|
-
initialViewType:
|
|
9621
|
+
initialViewType: F,
|
|
9633
9622
|
res_id: b,
|
|
9634
9623
|
domain: C
|
|
9635
9624
|
}) {
|
|
@@ -9638,16 +9627,16 @@ function Ed(e, t) {
|
|
|
9638
9627
|
action: _,
|
|
9639
9628
|
values: x,
|
|
9640
9629
|
forced_values: A,
|
|
9641
|
-
initialViewType:
|
|
9630
|
+
initialViewType: F,
|
|
9642
9631
|
res_id: b,
|
|
9643
9632
|
domain: C
|
|
9644
9633
|
});
|
|
9645
9634
|
}
|
|
9646
|
-
async function
|
|
9635
|
+
async function R({
|
|
9647
9636
|
domain: S,
|
|
9648
9637
|
context: x,
|
|
9649
9638
|
model: A,
|
|
9650
|
-
views:
|
|
9639
|
+
views: F,
|
|
9651
9640
|
title: b,
|
|
9652
9641
|
target: C,
|
|
9653
9642
|
initialView: _,
|
|
@@ -9694,7 +9683,7 @@ function Ed(e, t) {
|
|
|
9694
9683
|
action_type: O,
|
|
9695
9684
|
tabKey: W,
|
|
9696
9685
|
title: b,
|
|
9697
|
-
views:
|
|
9686
|
+
views: F,
|
|
9698
9687
|
model: A,
|
|
9699
9688
|
context: { ...o, ...x },
|
|
9700
9689
|
domain: S,
|
|
@@ -9715,9 +9704,9 @@ function Ed(e, t) {
|
|
|
9715
9704
|
Ra,
|
|
9716
9705
|
{
|
|
9717
9706
|
openShortcut: w,
|
|
9718
|
-
openAction:
|
|
9707
|
+
openAction: R,
|
|
9719
9708
|
openRelate: y,
|
|
9720
|
-
openDefaultActionForModel:
|
|
9709
|
+
openDefaultActionForModel: I,
|
|
9721
9710
|
tabs: c,
|
|
9722
9711
|
activeKey: a,
|
|
9723
9712
|
onRemoveTab: async (S) => {
|
|
@@ -9852,18 +9841,18 @@ const { useToken: $d } = He, Ou = (e) => {
|
|
|
9852
9841
|
} = e, [s, a] = v(!1), [l, c] = v(!1), [d, f] = v([]), [u, m] = v(!0), [g, h] = v(), { t: p } = H(he) || {}, { token: y } = $d(), w = H(
|
|
9853
9842
|
ut
|
|
9854
9843
|
), {
|
|
9855
|
-
openShortcut:
|
|
9856
|
-
tabs:
|
|
9844
|
+
openShortcut: I,
|
|
9845
|
+
tabs: R,
|
|
9857
9846
|
activeKey: S,
|
|
9858
9847
|
currentView: x,
|
|
9859
9848
|
currentId: A,
|
|
9860
|
-
openDefaultActionForModel:
|
|
9849
|
+
openDefaultActionForModel: F
|
|
9861
9850
|
} = w || {};
|
|
9862
9851
|
fe(() => {
|
|
9863
9852
|
b();
|
|
9864
9853
|
}, []), fe(() => {
|
|
9865
9854
|
T();
|
|
9866
|
-
}, [
|
|
9855
|
+
}, [R, S, x, A]);
|
|
9867
9856
|
async function b() {
|
|
9868
9857
|
try {
|
|
9869
9858
|
m(!0);
|
|
@@ -9877,7 +9866,7 @@ const { useToken: $d } = He, Ou = (e) => {
|
|
|
9877
9866
|
}
|
|
9878
9867
|
function C(P) {
|
|
9879
9868
|
const { key: N } = P, W = d.find((M) => M.id === Number(N));
|
|
9880
|
-
(W == null ? void 0 : W.action_type) !== "ir.actions.wizard" && (W &&
|
|
9869
|
+
(W == null ? void 0 : W.action_type) !== "ir.actions.wizard" && (W && I(W), c(!1));
|
|
9881
9870
|
}
|
|
9882
9871
|
function _(P) {
|
|
9883
9872
|
P && b(), c(P);
|
|
@@ -9885,7 +9874,7 @@ const { useToken: $d } = He, Ou = (e) => {
|
|
|
9885
9874
|
async function T() {
|
|
9886
9875
|
if (!x)
|
|
9887
9876
|
return;
|
|
9888
|
-
const P =
|
|
9877
|
+
const P = R.find((Z) => Z.key === S), { id: N, type: W } = (P == null ? void 0 : P.action) || {};
|
|
9889
9878
|
if (!N || !W) {
|
|
9890
9879
|
a(!1);
|
|
9891
9880
|
return;
|
|
@@ -9902,7 +9891,7 @@ const { useToken: $d } = He, Ou = (e) => {
|
|
|
9902
9891
|
te !== !1 && h(te), a(te !== !1);
|
|
9903
9892
|
}
|
|
9904
9893
|
async function O() {
|
|
9905
|
-
c(!1),
|
|
9894
|
+
c(!1), F == null || F({ model: "ir.ui.view_sc" });
|
|
9906
9895
|
}
|
|
9907
9896
|
const $ = /* @__PURE__ */ D(Ht, { onClick: C, children: [
|
|
9908
9897
|
/* @__PURE__ */ D("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
@@ -9936,7 +9925,7 @@ const { useToken: $d } = He, Ou = (e) => {
|
|
|
9936
9925
|
else {
|
|
9937
9926
|
if (!x)
|
|
9938
9927
|
return;
|
|
9939
|
-
const P =
|
|
9928
|
+
const P = R.find((te) => te.key === S), { id: N, type: W } = (P == null ? void 0 : P.action) || {}, M = x.view_id;
|
|
9940
9929
|
let Y = !1;
|
|
9941
9930
|
if (!N || !W) {
|
|
9942
9931
|
a(!1);
|