@gisce/react-ooui 2.98.0-rc.6 → 2.98.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var gc = Object.defineProperty;
|
|
2
2
|
var yc = (t, e, n) => e in t ? gc(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var ks = (t, e, n) => (yc(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
-
import { jsx as s, jsxs as
|
|
4
|
+
import { jsx as s, jsxs as L, Fragment as he } from "react/jsx-runtime";
|
|
5
5
|
import rn, { useContext as pe, useState as T, useEffect as ce, useRef as Z, memo as it, useCallback as O, useMemo as re, forwardRef as $t, useImperativeHandle as Ht, Fragment as jn, createContext as vc, createElement as bc } from "react";
|
|
6
6
|
import { Tooltip as Et, theme as Xe, Typography as on, Form as Ot, Row as Ge, Col as Oe, Modal as Ft, Button as je, Dropdown as Ui, Menu as Ps, Space as ct, Spin as nt, Divider as Lr, Input as ft, Select as wn, Checkbox as rr, Alert as Rt, Timeline as Wi, Badge as Un, message as Ms, Popover as wc, DatePicker as xc, TimePicker as Cc, InputNumber as Hr, Layout as qi, Progress as Sc, Avatar as Gi, Tag as Ko, ColorPicker as Yi, Pagination as Tc, Empty as zi, Statistic as Fc, Card as Jo, Tabs as Ki, Radio as $s, Switch as Ac, Steps as Ns, Carousel as Rc } from "antd";
|
|
7
7
|
import { Label as Wn, Field as Oo, Tree as Ji, Reference as Ic, Selection as Xo, Many2one as Xi, Boolean as _c, parseContext as ln, graphProcessor as Qi, graphFieldUtils as Ec, Integer as Do, SearchFieldTypes as an, SearchFilter as Zi, parseContextFields as Oc, parseDomainFields as Dc, parseGraph as ea, Container as kc, Form as ta, transformDomainForChildWidget as Qo, Button as Pc } from "@gisce/ooui";
|
|
@@ -302,7 +302,7 @@ const { Text: eu, Title: tu } = on, { useToken: nu } = Xe, ru = {
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
const g = n || (a ? r ? "left" : "right" : "left"), { token: h } = nu(), v = l === void 0 ? eu : tu;
|
|
305
|
-
return /* @__PURE__ */
|
|
305
|
+
return /* @__PURE__ */ L(
|
|
306
306
|
"div",
|
|
307
307
|
{
|
|
308
308
|
className: `flex flex-row items-center pb-1 pt-1 ${ru[g]}`,
|
|
@@ -368,10 +368,10 @@ function We({
|
|
|
368
368
|
align: i
|
|
369
369
|
}
|
|
370
370
|
);
|
|
371
|
-
return n === "horizontal" ? (() => /* @__PURE__ */
|
|
371
|
+
return n === "horizontal" ? (() => /* @__PURE__ */ L(Ge, { align: "middle", className: "pb-1 pt-1", children: [
|
|
372
372
|
/* @__PURE__ */ s(Oe, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-end", children: S }) }),
|
|
373
373
|
/* @__PURE__ */ s(Oe, { flex: "auto", children: D() })
|
|
374
|
-
] }))() : (() => /* @__PURE__ */
|
|
374
|
+
] }))() : (() => /* @__PURE__ */ L(he, { children: [
|
|
375
375
|
S,
|
|
376
376
|
D()
|
|
377
377
|
] }))();
|
|
@@ -479,7 +479,7 @@ const { confirm: ou } = Ft, tn = ({
|
|
|
479
479
|
if (e.buttons.length === 0)
|
|
480
480
|
return null;
|
|
481
481
|
if (e.buttons.length > 1)
|
|
482
|
-
return /* @__PURE__ */ s(We, { ooui: new Oo({ defaultButton: n }), children: /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ s(We, { ooui: new Oo({ defaultButton: n }), children: /* @__PURE__ */ L(
|
|
483
483
|
Ui.Button,
|
|
484
484
|
{
|
|
485
485
|
disabled: !a || p,
|
|
@@ -589,7 +589,7 @@ const On = class On {
|
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
591
|
ks(On, "handler");
|
|
592
|
-
let
|
|
592
|
+
let H = On;
|
|
593
593
|
const va = (t) => {
|
|
594
594
|
let e, n, r;
|
|
595
595
|
if (!t)
|
|
@@ -624,7 +624,7 @@ const va = (t) => {
|
|
|
624
624
|
if (i === "warning" || i === "error") {
|
|
625
625
|
const c = o.buttons || [];
|
|
626
626
|
let d;
|
|
627
|
-
const f = c.length > 0 ? /* @__PURE__ */ s(Ge, { justify: "end", style: { marginTop: 16 }, children: /* @__PURE__ */
|
|
627
|
+
const f = c.length > 0 ? /* @__PURE__ */ s(Ge, { justify: "end", style: { marginTop: 16 }, children: /* @__PURE__ */ L(ct, { children: [
|
|
628
628
|
c.map((p) => /* @__PURE__ */ s(
|
|
629
629
|
je,
|
|
630
630
|
{
|
|
@@ -719,7 +719,7 @@ const va = (t) => {
|
|
|
719
719
|
p(!1);
|
|
720
720
|
}
|
|
721
721
|
async function C() {
|
|
722
|
-
const $ = (await
|
|
722
|
+
const $ = (await H.getHandler().search({
|
|
723
723
|
params: [["translatable", "=", "1"]],
|
|
724
724
|
fieldsToRetrieve: ["code", "name"],
|
|
725
725
|
model: "res.lang"
|
|
@@ -732,18 +732,18 @@ const va = (t) => {
|
|
|
732
732
|
async function x(F) {
|
|
733
733
|
const $ = {};
|
|
734
734
|
for (const R of F) {
|
|
735
|
-
const
|
|
735
|
+
const E = (await H.getHandler().readObjects({
|
|
736
736
|
model: r,
|
|
737
737
|
ids: [o],
|
|
738
738
|
fieldsToRetrieve: [i],
|
|
739
739
|
context: { lang: R.code }
|
|
740
740
|
}))[0];
|
|
741
|
-
$[R.code] =
|
|
741
|
+
$[R.code] = E[i] || "";
|
|
742
742
|
}
|
|
743
743
|
y.current = $, v($);
|
|
744
744
|
}
|
|
745
745
|
function D() {
|
|
746
|
-
return d.map((F, $) => /* @__PURE__ */
|
|
746
|
+
return d.map((F, $) => /* @__PURE__ */ L(Ge, { style: { paddingBottom: 20 }, children: [
|
|
747
747
|
/* @__PURE__ */ s(Oe, { flex: "8rem", style: { paddingRight: 10 }, children: F.name }),
|
|
748
748
|
/* @__PURE__ */ s(Oe, { flex: "auto", children: /* @__PURE__ */ s(
|
|
749
749
|
gd,
|
|
@@ -765,7 +765,7 @@ const va = (t) => {
|
|
|
765
765
|
g(!0);
|
|
766
766
|
try {
|
|
767
767
|
for (const F of Object.keys(h))
|
|
768
|
-
h[F] !== y.current[F] && await
|
|
768
|
+
h[F] !== y.current[F] && await H.getHandler().update({
|
|
769
769
|
model: r,
|
|
770
770
|
id: o,
|
|
771
771
|
values: { [i]: h[F] },
|
|
@@ -780,10 +780,10 @@ const va = (t) => {
|
|
|
780
780
|
g(!1), a();
|
|
781
781
|
}
|
|
782
782
|
function P() {
|
|
783
|
-
return u ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */
|
|
783
|
+
return u ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ L(he, { children: [
|
|
784
784
|
D(),
|
|
785
785
|
/* @__PURE__ */ s(Lr, {}),
|
|
786
|
-
/* @__PURE__ */ s(Ge, { justify: "end", children: /* @__PURE__ */
|
|
786
|
+
/* @__PURE__ */ s(Ge, { justify: "end", children: /* @__PURE__ */ L(ct, { children: [
|
|
787
787
|
/* @__PURE__ */ s(
|
|
788
788
|
je,
|
|
789
789
|
{
|
|
@@ -952,7 +952,7 @@ const Ca = it(
|
|
|
952
952
|
forceRefresh: !0
|
|
953
953
|
});
|
|
954
954
|
}, [l]), C = h ? pu : fu;
|
|
955
|
-
return i ? /* @__PURE__ */
|
|
955
|
+
return i ? /* @__PURE__ */ L(he, { children: [
|
|
956
956
|
/* @__PURE__ */ s("div", { onClick: y, children: /* @__PURE__ */ s(
|
|
957
957
|
sr,
|
|
958
958
|
{
|
|
@@ -976,7 +976,7 @@ const Ca = it(
|
|
|
976
976
|
onSubmitSucceed: w
|
|
977
977
|
}
|
|
978
978
|
)
|
|
979
|
-
] }) : /* @__PURE__ */
|
|
979
|
+
] }) : /* @__PURE__ */ L(Ge, { gutter: 8, wrap: !1, children: [
|
|
980
980
|
/* @__PURE__ */ s(Oe, { flex: "auto", children: /* @__PURE__ */ s(
|
|
981
981
|
sr,
|
|
982
982
|
{
|
|
@@ -1115,8 +1115,8 @@ const cs = (t) => {
|
|
|
1115
1115
|
function f() {
|
|
1116
1116
|
l(void 0);
|
|
1117
1117
|
}
|
|
1118
|
-
return /* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */
|
|
1118
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
1119
|
+
/* @__PURE__ */ L(Ge, { gutter: 8, wrap: !1, justify: "center", children: [
|
|
1120
1120
|
re(
|
|
1121
1121
|
() => /* @__PURE__ */ s(cs, { value: n }),
|
|
1122
1122
|
[n, e]
|
|
@@ -1133,7 +1133,7 @@ const cs = (t) => {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
)
|
|
1135
1135
|
] }),
|
|
1136
|
-
e.showControls && /* @__PURE__ */ s(Ge, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */
|
|
1136
|
+
e.showControls && /* @__PURE__ */ s(Ge, { gutter: 8, wrap: !1, justify: "center", className: "pt-5", children: /* @__PURE__ */ L(ct, { children: [
|
|
1137
1137
|
/* @__PURE__ */ s(
|
|
1138
1138
|
bt,
|
|
1139
1139
|
{
|
|
@@ -1196,9 +1196,9 @@ function Eu(t) {
|
|
|
1196
1196
|
const ds = (t, e, n, r = !1) => t.columns.map((i) => {
|
|
1197
1197
|
const a = i.type, l = i.id, c = e == null ? void 0 : e[a];
|
|
1198
1198
|
let d;
|
|
1199
|
-
return c ? d = (f) => c({ value: f, key: l, ooui: i, context: n }) : d = (f) => Eu(f) ? f : /* @__PURE__ */
|
|
1199
|
+
return c ? d = (f) => c({ value: f, key: l, ooui: i, context: n }) : d = (f) => Eu(f) ? f : /* @__PURE__ */ L("p", { style: { color: "red" }, children: [
|
|
1200
1200
|
"Unsupported widget value for a Tree cell:",
|
|
1201
|
-
/* @__PURE__ */ s("pre", { children: /* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ s("pre", { children: /* @__PURE__ */ L("strong", { children: [
|
|
1202
1202
|
"Type: ",
|
|
1203
1203
|
a,
|
|
1204
1204
|
" - Value: ",
|
|
@@ -1306,7 +1306,7 @@ const us = async (t) => {
|
|
|
1306
1306
|
};
|
|
1307
1307
|
let u = [], p;
|
|
1308
1308
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1309
|
-
const v = (h = en(o)) == null ? void 0 : h.colors, y = await
|
|
1309
|
+
const v = (h = en(o)) == null ? void 0 : h.colors, y = await H.getHandler().readEvalUiObjects({
|
|
1310
1310
|
model: n,
|
|
1311
1311
|
ids: d,
|
|
1312
1312
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1318,7 +1318,7 @@ const us = async (t) => {
|
|
|
1318
1318
|
});
|
|
1319
1319
|
u = y[0], p = Vn(y[1]);
|
|
1320
1320
|
} else
|
|
1321
|
-
u = await
|
|
1321
|
+
u = await H.getHandler().readObjects({
|
|
1322
1322
|
model: n,
|
|
1323
1323
|
ids: d,
|
|
1324
1324
|
fields: f[a],
|
|
@@ -1410,7 +1410,7 @@ const Mu = ({
|
|
|
1410
1410
|
const a = e.findIndex((c) => c.id === o.id), l = e.findIndex((c) => c.id === i.id);
|
|
1411
1411
|
return a - l;
|
|
1412
1412
|
}), r;
|
|
1413
|
-
}, Nu = async (t, e, n, r) => await
|
|
1413
|
+
}, Nu = async (t, e, n, r) => await H.getHandler().searchAllIds({
|
|
1414
1414
|
model: e,
|
|
1415
1415
|
params: [["id", "in", t]],
|
|
1416
1416
|
context: n,
|
|
@@ -1426,7 +1426,7 @@ const Mu = ({
|
|
|
1426
1426
|
attrs: o,
|
|
1427
1427
|
treeOoui: i
|
|
1428
1428
|
}) => {
|
|
1429
|
-
const a = await
|
|
1429
|
+
const a = await H.getHandler().readEvalUiObjects({
|
|
1430
1430
|
model: t,
|
|
1431
1431
|
ids: e,
|
|
1432
1432
|
arch: n.arch,
|
|
@@ -1578,14 +1578,14 @@ const Cn = ({
|
|
|
1578
1578
|
}), Gu = (t, e) => t.replace(
|
|
1579
1579
|
/\{([^}]+)\}/g,
|
|
1580
1580
|
(n, r) => e[r] !== void 0 ? e[r] : n
|
|
1581
|
-
), Gs = (t) => !(!Array.isArray(t) || t.length !== 2 || t[0] === void 0 && t[1] === ""), Yu = (t) => /* @__PURE__ */
|
|
1581
|
+
), Gs = (t) => !(!Array.isArray(t) || t.length !== 2 || t[0] === void 0 && t[1] === ""), Yu = (t) => /* @__PURE__ */ L(
|
|
1582
1582
|
"div",
|
|
1583
1583
|
{
|
|
1584
1584
|
style: { display: "inline-block", cursor: "pointer" },
|
|
1585
1585
|
onClick: t.onClick,
|
|
1586
1586
|
children: [
|
|
1587
1587
|
/* @__PURE__ */ s("strong", { children: t.title }),
|
|
1588
|
-
t.summary && /* @__PURE__ */
|
|
1588
|
+
t.summary && /* @__PURE__ */ L(he, { children: [
|
|
1589
1589
|
/* @__PURE__ */ s("br", {}),
|
|
1590
1590
|
/* @__PURE__ */ s("span", { children: t.summary })
|
|
1591
1591
|
] })
|
|
@@ -1596,7 +1596,7 @@ const Cn = ({
|
|
|
1596
1596
|
Ue(() => {
|
|
1597
1597
|
g();
|
|
1598
1598
|
}, [e]);
|
|
1599
|
-
const m = async (h) => o && o[h] ? o[h] : await
|
|
1599
|
+
const m = async (h) => o && o[h] ? o[h] : await H.getHandler().getView({
|
|
1600
1600
|
model: n,
|
|
1601
1601
|
type: h,
|
|
1602
1602
|
context: { ...p == null ? void 0 : p(), ...r }
|
|
@@ -1621,19 +1621,19 @@ const Cn = ({
|
|
|
1621
1621
|
titleField: b,
|
|
1622
1622
|
iconField: w,
|
|
1623
1623
|
colorField: C
|
|
1624
|
-
} = r, x = i.filter((
|
|
1624
|
+
} = r, x = i.filter((E) => E.values), D = pe(Qe), { getContext: S } = D || {};
|
|
1625
1625
|
Ue(() => {
|
|
1626
1626
|
F();
|
|
1627
1627
|
}, [i]);
|
|
1628
|
-
const P = (
|
|
1628
|
+
const P = (E) => {
|
|
1629
1629
|
o == null || o({
|
|
1630
|
-
items:
|
|
1630
|
+
items: E
|
|
1631
1631
|
});
|
|
1632
1632
|
};
|
|
1633
1633
|
async function F() {
|
|
1634
1634
|
l(!0), d(void 0);
|
|
1635
1635
|
try {
|
|
1636
|
-
const [
|
|
1636
|
+
const [E] = await us({
|
|
1637
1637
|
treeView: {
|
|
1638
1638
|
fields: n.get("tree").fields,
|
|
1639
1639
|
arch: n.get("tree").arch
|
|
@@ -1646,9 +1646,9 @@ const Cn = ({
|
|
|
1646
1646
|
context: { ...S == null ? void 0 : S(), ...h },
|
|
1647
1647
|
currentView: "form"
|
|
1648
1648
|
});
|
|
1649
|
-
P(
|
|
1650
|
-
} catch (
|
|
1651
|
-
d(
|
|
1649
|
+
P(E);
|
|
1650
|
+
} catch (E) {
|
|
1651
|
+
d(E);
|
|
1652
1652
|
} finally {
|
|
1653
1653
|
l(!1);
|
|
1654
1654
|
}
|
|
@@ -1657,28 +1657,28 @@ const Cn = ({
|
|
|
1657
1657
|
return console.error(c), /* @__PURE__ */ s(Rt, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
1658
1658
|
if (a)
|
|
1659
1659
|
return /* @__PURE__ */ s(nt, {});
|
|
1660
|
-
const $ = (
|
|
1661
|
-
const I = Pt(
|
|
1660
|
+
const $ = (E) => {
|
|
1661
|
+
const I = Pt(E);
|
|
1662
1662
|
return I && /* @__PURE__ */ s(I, {});
|
|
1663
|
-
}, R = x.map((
|
|
1664
|
-
var A, k,
|
|
1663
|
+
}, R = x.map((E) => {
|
|
1664
|
+
var A, k, _, M;
|
|
1665
1665
|
const I = {
|
|
1666
1666
|
children: /* @__PURE__ */ s(
|
|
1667
1667
|
Yu,
|
|
1668
1668
|
{
|
|
1669
|
-
title: (A =
|
|
1670
|
-
summary: (k =
|
|
1669
|
+
title: (A = E.values) == null ? void 0 : A[b],
|
|
1670
|
+
summary: (k = E.values) == null ? void 0 : k[y],
|
|
1671
1671
|
onClick: () => {
|
|
1672
1672
|
m(
|
|
1673
|
-
x.find((W) =>
|
|
1673
|
+
x.find((W) => E.id === W.id)
|
|
1674
1674
|
), u(!0);
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
1677
|
)
|
|
1678
1678
|
};
|
|
1679
|
-
return (
|
|
1679
|
+
return (_ = E.values) != null && _[w] && (I.dot = $(E.values[w])), (M = E.values) != null && M[C] && (I.color = !ma(E.values[C]) && !ha(E.values[C]) && !E.values[C].toString().startsWith("#") ? mr(E.values[C]) : E.values[C]), I;
|
|
1680
1680
|
});
|
|
1681
|
-
return /* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
1682
1682
|
/* @__PURE__ */ s(Wi, { style: { padding: "1rem" }, items: R }),
|
|
1683
1683
|
/* @__PURE__ */ s(
|
|
1684
1684
|
Xn,
|
|
@@ -2154,7 +2154,7 @@ async function ka({
|
|
|
2154
2154
|
rootContext: e = {},
|
|
2155
2155
|
globalValues: n = {}
|
|
2156
2156
|
}) {
|
|
2157
|
-
const r = "ir.actions.act_window", o = `${r},${t}`, i = await
|
|
2157
|
+
const r = "ir.actions.act_window", o = `${r},${t}`, i = await H.getHandler().getActionData({
|
|
2158
2158
|
action: o,
|
|
2159
2159
|
context: e
|
|
2160
2160
|
}), a = ln({
|
|
@@ -2171,7 +2171,7 @@ async function ka({
|
|
|
2171
2171
|
} = i, g = p === "tree";
|
|
2172
2172
|
if (!l.active_id)
|
|
2173
2173
|
return { title: f };
|
|
2174
|
-
const h = i.domain ? await
|
|
2174
|
+
const h = i.domain ? await H.getHandler().evalDomain({
|
|
2175
2175
|
domain: i.domain,
|
|
2176
2176
|
values: n,
|
|
2177
2177
|
context: l
|
|
@@ -2181,7 +2181,7 @@ async function ka({
|
|
|
2181
2181
|
if (x)
|
|
2182
2182
|
v.push(C);
|
|
2183
2183
|
else {
|
|
2184
|
-
const { view_id: S } = await
|
|
2184
|
+
const { view_id: S } = await H.getHandler().getView({
|
|
2185
2185
|
model: c,
|
|
2186
2186
|
type: D,
|
|
2187
2187
|
id: x,
|
|
@@ -2408,7 +2408,7 @@ function rf({
|
|
|
2408
2408
|
justifyContent: "center",
|
|
2409
2409
|
overflow: "hidden"
|
|
2410
2410
|
},
|
|
2411
|
-
children: /* @__PURE__ */
|
|
2411
|
+
children: /* @__PURE__ */ L($o, { style: { fontSize: c, margin: 0, color: i }, children: [
|
|
2412
2412
|
m && /* @__PURE__ */ s(m, { style: { fontSize: c * 0.7 } }),
|
|
2413
2413
|
m ? ` ${u}` : u
|
|
2414
2414
|
] })
|
|
@@ -2458,9 +2458,9 @@ function of({
|
|
|
2458
2458
|
flexDirection: "column",
|
|
2459
2459
|
padding: "0.2rem"
|
|
2460
2460
|
},
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2461
|
+
children: /* @__PURE__ */ L(Ge, { align: "middle", children: [
|
|
2462
2462
|
h && /* @__PURE__ */ s(Oe, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ s(h, {}) }),
|
|
2463
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ L(Oe, { children: [
|
|
2464
2464
|
/* @__PURE__ */ s($o, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: h ? ` ${r}%` : `${r}%` }),
|
|
2465
2465
|
/* @__PURE__ */ s(
|
|
2466
2466
|
$o,
|
|
@@ -2494,20 +2494,20 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2494
2494
|
manualIds: u,
|
|
2495
2495
|
fixedHeight: p
|
|
2496
2496
|
} = t, [m, g] = T(!1), [h, v] = T(), [y, b] = T(0), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R] = Re(
|
|
2497
|
-
|
|
2498
|
-
), [
|
|
2499
|
-
|
|
2497
|
+
H.getHandler().searchAllIds
|
|
2498
|
+
), [E] = Re(
|
|
2499
|
+
H.getHandler().readObjects
|
|
2500
2500
|
), [I] = Re(
|
|
2501
|
-
|
|
2501
|
+
H.getHandler().searchCount
|
|
2502
2502
|
), [A] = Re(
|
|
2503
|
-
|
|
2503
|
+
H.getHandler().evalDomain
|
|
2504
2504
|
), [k] = Re(
|
|
2505
|
-
|
|
2505
|
+
H.getHandler().parseCondition
|
|
2506
2506
|
);
|
|
2507
2507
|
ce(() => {
|
|
2508
2508
|
W();
|
|
2509
2509
|
}, [e, o]);
|
|
2510
|
-
async function
|
|
2510
|
+
async function _({
|
|
2511
2511
|
domain: V,
|
|
2512
2512
|
isTotal: N
|
|
2513
2513
|
}) {
|
|
@@ -2518,7 +2518,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2518
2518
|
params: V,
|
|
2519
2519
|
model: e,
|
|
2520
2520
|
context: r
|
|
2521
|
-
}), j = await
|
|
2521
|
+
}), j = await E({
|
|
2522
2522
|
model: e,
|
|
2523
2523
|
ids: U,
|
|
2524
2524
|
fieldsToRetrieve: [d],
|
|
@@ -2541,7 +2541,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2541
2541
|
params: V,
|
|
2542
2542
|
model: e,
|
|
2543
2543
|
context: r
|
|
2544
|
-
}), U = await
|
|
2544
|
+
}), U = await E({
|
|
2545
2545
|
model: e,
|
|
2546
2546
|
ids: N,
|
|
2547
2547
|
fieldsToRetrieve: [d],
|
|
@@ -2562,14 +2562,14 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2562
2562
|
g(!0), $(void 0);
|
|
2563
2563
|
let V, N;
|
|
2564
2564
|
try {
|
|
2565
|
-
const U = await
|
|
2565
|
+
const U = await _({ domain: n, isTotal: !1 });
|
|
2566
2566
|
if (v(U), i) {
|
|
2567
2567
|
const j = await A({
|
|
2568
2568
|
domain: i,
|
|
2569
2569
|
values: {},
|
|
2570
2570
|
context: r
|
|
2571
2571
|
});
|
|
2572
|
-
V = await
|
|
2572
|
+
V = await _({
|
|
2573
2573
|
domain: j,
|
|
2574
2574
|
isTotal: !0
|
|
2575
2575
|
}), C(V);
|
|
@@ -2621,10 +2621,10 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
|
|
|
2621
2621
|
uninformedString: a,
|
|
2622
2622
|
manualIds: l
|
|
2623
2623
|
} = t, [c, d] = T(!1), [f, u] = T(), [p, m] = T(), [g, h] = T(), [v, y] = T("line"), [b] = Re(
|
|
2624
|
-
|
|
2624
|
+
H.getHandler().getFields
|
|
2625
2625
|
), [w] = Re(
|
|
2626
|
-
|
|
2627
|
-
), [C] = Re(
|
|
2626
|
+
H.getHandler().readObjects
|
|
2627
|
+
), [C] = Re(H.getHandler().search), x = O(async () => {
|
|
2628
2628
|
d(!0), u(void 0), y(n.type || "line");
|
|
2629
2629
|
const D = lf({ ooui: n });
|
|
2630
2630
|
let S, P;
|
|
@@ -2779,7 +2779,7 @@ async function zs({
|
|
|
2779
2779
|
});
|
|
2780
2780
|
const c = await Promise.all(
|
|
2781
2781
|
Object.entries(l).map(async ([f, u]) => {
|
|
2782
|
-
const p = await
|
|
2782
|
+
const p = await H.getHandler().execute({
|
|
2783
2783
|
action: "name_get",
|
|
2784
2784
|
payload: u,
|
|
2785
2785
|
model: f,
|
|
@@ -3022,7 +3022,7 @@ const hf = {
|
|
|
3022
3022
|
i,
|
|
3023
3023
|
a
|
|
3024
3024
|
]);
|
|
3025
|
-
return m ? /* @__PURE__ */
|
|
3025
|
+
return m ? /* @__PURE__ */ L(
|
|
3026
3026
|
"div",
|
|
3027
3027
|
{
|
|
3028
3028
|
style: {
|
|
@@ -3252,7 +3252,7 @@ function fs(t) {
|
|
|
3252
3252
|
r(p);
|
|
3253
3253
|
});
|
|
3254
3254
|
}
|
|
3255
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ L("div", { style: { display: "flex" }, children: [
|
|
3256
3256
|
/* @__PURE__ */ s(
|
|
3257
3257
|
bt,
|
|
3258
3258
|
{
|
|
@@ -3303,7 +3303,7 @@ function At(t) {
|
|
|
3303
3303
|
type: l = "default",
|
|
3304
3304
|
...c
|
|
3305
3305
|
} = t;
|
|
3306
|
-
return /* @__PURE__ */
|
|
3306
|
+
return /* @__PURE__ */ L(
|
|
3307
3307
|
bt,
|
|
3308
3308
|
{
|
|
3309
3309
|
type: l,
|
|
@@ -3348,7 +3348,7 @@ function ja(t) {
|
|
|
3348
3348
|
const { useToken: Of } = Xe;
|
|
3349
3349
|
function Ua(t) {
|
|
3350
3350
|
const { badgeNumber: e = 0, ...n } = t, { token: r } = Of();
|
|
3351
|
-
return /* @__PURE__ */
|
|
3351
|
+
return /* @__PURE__ */ L("div", { style: { position: "relative" }, children: [
|
|
3352
3352
|
e > 0 && /* @__PURE__ */ s("div", { style: { position: "absolute", left: -10, top: -10, zIndex: 2 }, children: /* @__PURE__ */ s(
|
|
3353
3353
|
"span",
|
|
3354
3354
|
{
|
|
@@ -3375,12 +3375,12 @@ function Ua(t) {
|
|
|
3375
3375
|
] });
|
|
3376
3376
|
}
|
|
3377
3377
|
async function ps(t, e, n) {
|
|
3378
|
-
const r = (await
|
|
3378
|
+
const r = (await H.getHandler().getLogInfo({
|
|
3379
3379
|
model: t,
|
|
3380
3380
|
ids: [e]
|
|
3381
3381
|
}))[0], { create_date: o, create_uid: i, id: a, write_date: l, write_uid: c } = r;
|
|
3382
3382
|
yn(
|
|
3383
|
-
/* @__PURE__ */
|
|
3383
|
+
/* @__PURE__ */ L("div", { children: [
|
|
3384
3384
|
"ID: " + a,
|
|
3385
3385
|
" ",
|
|
3386
3386
|
/* @__PURE__ */ s("br", {}),
|
|
@@ -3422,7 +3422,7 @@ function Df(t) {
|
|
|
3422
3422
|
onFinish: f,
|
|
3423
3423
|
autoComplete: "off",
|
|
3424
3424
|
initialValues: { search: r },
|
|
3425
|
-
children: /* @__PURE__ */
|
|
3425
|
+
children: /* @__PURE__ */ L(Ge, { align: "middle", justify: "end", children: [
|
|
3426
3426
|
/* @__PURE__ */ s(Oe, { children: /* @__PURE__ */ s(Ot.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ s(
|
|
3427
3427
|
ft,
|
|
3428
3428
|
{
|
|
@@ -3522,7 +3522,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3522
3522
|
} = g || {}, D = Zr(
|
|
3523
3523
|
wt.FEATURE_LOGGABLE_ACTIONS
|
|
3524
3524
|
), [S] = Re(
|
|
3525
|
-
|
|
3525
|
+
H.getHandler().logAction
|
|
3526
3526
|
), P = O(async () => [
|
|
3527
3527
|
{
|
|
3528
3528
|
items: (await (l == null ? void 0 : l()) || []).map(
|
|
@@ -3531,7 +3531,8 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3531
3531
|
return {
|
|
3532
3532
|
icon: /* @__PURE__ */ s(Dn, {}),
|
|
3533
3533
|
...W,
|
|
3534
|
-
|
|
3534
|
+
originalData: W,
|
|
3535
|
+
name: V ? /* @__PURE__ */ L(
|
|
3535
3536
|
"div",
|
|
3536
3537
|
{
|
|
3537
3538
|
style: {
|
|
@@ -3550,14 +3551,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3550
3551
|
}
|
|
3551
3552
|
)
|
|
3552
3553
|
}
|
|
3553
|
-
], [l, C, f.colorPrimary]), F = re(() => !w || w.length === 0 ? (b == null ? void 0 : b.fields) || {} : w.reduce((
|
|
3554
|
-
async (
|
|
3554
|
+
], [l, C, f.colorPrimary]), F = re(() => !w || w.length === 0 ? (b == null ? void 0 : b.fields) || {} : w.reduce((_, M) => ({ ..._, ...M.fields || {} }), {}), [w, b]), $ = O(
|
|
3555
|
+
async (_) => {
|
|
3555
3556
|
var M;
|
|
3556
3557
|
if (D != null && D.isEnabled && (((M = D == null ? void 0 : D.params) == null ? void 0 : M.types) || []).includes("ir.search"))
|
|
3557
3558
|
try {
|
|
3558
3559
|
await S({
|
|
3559
3560
|
action_type: "ir.search",
|
|
3560
|
-
action_id:
|
|
3561
|
+
action_id: _,
|
|
3561
3562
|
context: i
|
|
3562
3563
|
});
|
|
3563
3564
|
} catch (W) {
|
|
@@ -3566,8 +3567,8 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3566
3567
|
},
|
|
3567
3568
|
[i, S, D]
|
|
3568
3569
|
), R = O(
|
|
3569
|
-
(
|
|
3570
|
-
const M =
|
|
3570
|
+
(_) => {
|
|
3571
|
+
const M = _.originalData || _;
|
|
3571
3572
|
if (M != null && M.domain) {
|
|
3572
3573
|
x == null || x(M), v == null || v(M.domain);
|
|
3573
3574
|
const W = Ha(
|
|
@@ -3587,17 +3588,17 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3587
3588
|
F,
|
|
3588
3589
|
x
|
|
3589
3590
|
]
|
|
3590
|
-
),
|
|
3591
|
-
var
|
|
3592
|
-
(
|
|
3591
|
+
), E = O(async () => {
|
|
3592
|
+
var _;
|
|
3593
|
+
(_ = u == null ? void 0 : u.current) == null || _.close(), m == null || m({
|
|
3593
3594
|
model: "ir.search",
|
|
3594
3595
|
context: {
|
|
3595
3596
|
model: h
|
|
3596
3597
|
}
|
|
3597
3598
|
});
|
|
3598
3599
|
}, [h, m]), I = O(() => {
|
|
3599
|
-
var
|
|
3600
|
-
(
|
|
3600
|
+
var _;
|
|
3601
|
+
(_ = u == null ? void 0 : u.current) == null || _.close(), c == null || c();
|
|
3601
3602
|
}, [c]);
|
|
3602
3603
|
return /* @__PURE__ */ s(
|
|
3603
3604
|
Un,
|
|
@@ -3616,8 +3617,8 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3616
3617
|
onItemClick: R,
|
|
3617
3618
|
placement: "bottomRight",
|
|
3618
3619
|
disabled: o,
|
|
3619
|
-
header: /* @__PURE__ */
|
|
3620
|
-
r && r.length > 0 && /* @__PURE__ */
|
|
3620
|
+
header: /* @__PURE__ */ L("div", { style: { width: 300, padding: 5 }, children: [
|
|
3621
|
+
r && r.length > 0 && /* @__PURE__ */ L(he, { children: [
|
|
3621
3622
|
/* @__PURE__ */ s(
|
|
3622
3623
|
"div",
|
|
3623
3624
|
{
|
|
@@ -3625,7 +3626,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3625
3626
|
children: (A = d == null ? void 0 : d("actions")) == null ? void 0 : A.toUpperCase()
|
|
3626
3627
|
}
|
|
3627
3628
|
),
|
|
3628
|
-
/* @__PURE__ */ s("div", { style: { paddingBottom: 5 }, children: /* @__PURE__ */ s(Et, { title: d == null ? void 0 : d("clear_search"), children: /* @__PURE__ */
|
|
3629
|
+
/* @__PURE__ */ s("div", { style: { paddingBottom: 5 }, children: /* @__PURE__ */ s(Et, { title: d == null ? void 0 : d("clear_search"), children: /* @__PURE__ */ L(
|
|
3629
3630
|
"div",
|
|
3630
3631
|
{
|
|
3631
3632
|
style: {
|
|
@@ -3654,13 +3655,13 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3654
3655
|
}
|
|
3655
3656
|
)
|
|
3656
3657
|
] }),
|
|
3657
|
-
/* @__PURE__ */
|
|
3658
|
+
/* @__PURE__ */ L("div", { style: { display: "flex" }, children: [
|
|
3658
3659
|
/* @__PURE__ */ s("div", { style: { paddingLeft: 15, color: "#ccc" }, children: (k = d == null ? void 0 : d("saved_searches")) == null ? void 0 : k.toUpperCase() }),
|
|
3659
3660
|
/* @__PURE__ */ s("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ s(Et, { title: d == null ? void 0 : d("edit_saved_searches"), children: /* @__PURE__ */ s(
|
|
3660
3661
|
ns,
|
|
3661
3662
|
{
|
|
3662
3663
|
style: { color: f.colorPrimary, cursor: "pointer" },
|
|
3663
|
-
onClick:
|
|
3664
|
+
onClick: E
|
|
3664
3665
|
}
|
|
3665
3666
|
) }) })
|
|
3666
3667
|
] })
|
|
@@ -3680,7 +3681,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3680
3681
|
), { openAction: d } = c || {}, f = Z([]), { t: u } = we(), { showErrorNotification: p } = yt(), m = Zr(
|
|
3681
3682
|
wt.FEATURE_LOGGABLE_ACTIONS
|
|
3682
3683
|
), [g, h] = Re(
|
|
3683
|
-
|
|
3684
|
+
H.getHandler().logAction
|
|
3684
3685
|
);
|
|
3685
3686
|
ce(() => () => {
|
|
3686
3687
|
h();
|
|
@@ -3695,14 +3696,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3695
3696
|
);
|
|
3696
3697
|
async function C(R) {
|
|
3697
3698
|
var z;
|
|
3698
|
-
const { reportData:
|
|
3699
|
-
context:
|
|
3699
|
+
const { reportData: E, fields: I, values: A, context: k = {} } = R, {
|
|
3700
|
+
context: _,
|
|
3700
3701
|
model: M,
|
|
3701
3702
|
datas: W = {},
|
|
3702
3703
|
report_name: V,
|
|
3703
3704
|
type: N,
|
|
3704
3705
|
id: U
|
|
3705
|
-
} =
|
|
3706
|
+
} = E;
|
|
3706
3707
|
if (N !== "ir.actions.report.xml") {
|
|
3707
3708
|
p({
|
|
3708
3709
|
type: "error",
|
|
@@ -3711,11 +3712,11 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3711
3712
|
});
|
|
3712
3713
|
return;
|
|
3713
3714
|
}
|
|
3714
|
-
const { ids: j } = W || {}, ee = j || [], B = typeof
|
|
3715
|
-
context:
|
|
3715
|
+
const { ids: j } = W || {}, ee = j || [], B = typeof _ == "string" ? ln({
|
|
3716
|
+
context: _,
|
|
3716
3717
|
fields: I,
|
|
3717
3718
|
values: A
|
|
3718
|
-
}) :
|
|
3719
|
+
}) : _;
|
|
3719
3720
|
try {
|
|
3720
3721
|
if (m != null && m.isEnabled && (((z = m == null ? void 0 : m.params) == null ? void 0 : z.types) || []).includes(N))
|
|
3721
3722
|
try {
|
|
@@ -3727,7 +3728,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3727
3728
|
} catch (Q) {
|
|
3728
3729
|
console.error(Q);
|
|
3729
3730
|
}
|
|
3730
|
-
const K = await
|
|
3731
|
+
const K = await H.getHandler().createReport({
|
|
3731
3732
|
model: M,
|
|
3732
3733
|
name: V,
|
|
3733
3734
|
datas: W,
|
|
@@ -3742,14 +3743,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3742
3743
|
}
|
|
3743
3744
|
}
|
|
3744
3745
|
async function x(R) {
|
|
3745
|
-
let
|
|
3746
|
+
let E;
|
|
3746
3747
|
try {
|
|
3747
|
-
if (
|
|
3748
|
+
if (E = await H.getHandler().getReport({
|
|
3748
3749
|
id: R
|
|
3749
|
-
}),
|
|
3750
|
+
}), E.state && i.current === !0) {
|
|
3750
3751
|
i.current = !1, clearInterval(o.current), l(!1);
|
|
3751
|
-
const I = await Nn(
|
|
3752
|
-
Qr(
|
|
3752
|
+
const I = await Nn(E.result);
|
|
3753
|
+
Qr(E.result, I.mime);
|
|
3753
3754
|
}
|
|
3754
3755
|
} catch (I) {
|
|
3755
3756
|
i.current = !1, clearInterval(o.current), l(!1), p(I.exception || I);
|
|
@@ -3757,22 +3758,22 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3757
3758
|
}
|
|
3758
3759
|
async function D({
|
|
3759
3760
|
actionData: R,
|
|
3760
|
-
fields:
|
|
3761
|
+
fields: E,
|
|
3761
3762
|
values: I,
|
|
3762
3763
|
context: A,
|
|
3763
3764
|
onRefreshParentValues: k
|
|
3764
3765
|
}) {
|
|
3765
|
-
const { type:
|
|
3766
|
-
if (k && f.current.push(k),
|
|
3766
|
+
const { type: _ } = R;
|
|
3767
|
+
if (k && f.current.push(k), _ === "ir.actions.report.xml")
|
|
3767
3768
|
return await C({
|
|
3768
3769
|
reportData: R,
|
|
3769
|
-
fields:
|
|
3770
|
+
fields: E,
|
|
3770
3771
|
values: I,
|
|
3771
3772
|
context: A
|
|
3772
3773
|
});
|
|
3773
|
-
if (
|
|
3774
|
-
return await S({ actionData: R, fields:
|
|
3775
|
-
if (
|
|
3774
|
+
if (_ === "ir.actions.act_window")
|
|
3775
|
+
return await S({ actionData: R, fields: E, values: I, context: A });
|
|
3776
|
+
if (_ === "ir.actions.act_url")
|
|
3776
3777
|
window.open(
|
|
3777
3778
|
Gu(R.url, { ...I, context: A }),
|
|
3778
3779
|
"_blank"
|
|
@@ -3781,25 +3782,25 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3781
3782
|
return p({
|
|
3782
3783
|
type: "error",
|
|
3783
3784
|
title: "Error",
|
|
3784
|
-
body: `${
|
|
3785
|
+
body: `${_} action not supported`
|
|
3785
3786
|
}), {};
|
|
3786
3787
|
}
|
|
3787
3788
|
async function S({
|
|
3788
3789
|
actionData: R,
|
|
3789
|
-
fields:
|
|
3790
|
+
fields: E = {},
|
|
3790
3791
|
values: I = {},
|
|
3791
3792
|
context: A = {}
|
|
3792
3793
|
}) {
|
|
3793
3794
|
var U;
|
|
3794
3795
|
let k = R;
|
|
3795
|
-
R.res_model || (k = (await
|
|
3796
|
+
R.res_model || (k = (await H.getHandler().readObjects({
|
|
3796
3797
|
model: "ir.actions.act_window",
|
|
3797
3798
|
ids: [parseInt(R.id)],
|
|
3798
3799
|
context: A
|
|
3799
3800
|
}))[0]);
|
|
3800
|
-
const
|
|
3801
|
+
const _ = k.context, M = typeof (k == null ? void 0 : k.context) == "string" ? ln({
|
|
3801
3802
|
context: k.context,
|
|
3802
|
-
fields:
|
|
3803
|
+
fields: E,
|
|
3803
3804
|
values: { ...I, ...r }
|
|
3804
3805
|
}) : (k == null ? void 0 : k.context) || {}, W = {
|
|
3805
3806
|
...A,
|
|
@@ -3807,16 +3808,16 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3807
3808
|
};
|
|
3808
3809
|
let V = [];
|
|
3809
3810
|
const N = k.domain;
|
|
3810
|
-
if (k.domain && (V = await
|
|
3811
|
+
if (k.domain && (V = await H.getHandler().evalDomain({
|
|
3811
3812
|
domain: k.domain,
|
|
3812
3813
|
values: Cn({
|
|
3813
|
-
fields:
|
|
3814
|
+
fields: E,
|
|
3814
3815
|
values: { ...I, ...r }
|
|
3815
3816
|
}),
|
|
3816
|
-
fields:
|
|
3817
|
+
fields: E,
|
|
3817
3818
|
context: W
|
|
3818
3819
|
})), k.target === "new") {
|
|
3819
|
-
const j = await
|
|
3820
|
+
const j = await H.getHandler().getView({
|
|
3820
3821
|
model: k.res_model,
|
|
3821
3822
|
type: "form",
|
|
3822
3823
|
id: ((U = k == null ? void 0 : k.view_id) == null ? void 0 : U[0]) || void 0,
|
|
@@ -3848,9 +3849,9 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3848
3849
|
action_type: k.type,
|
|
3849
3850
|
res_id: k.res_id,
|
|
3850
3851
|
actionRawData: {
|
|
3851
|
-
context:
|
|
3852
|
+
context: _,
|
|
3852
3853
|
domain: N,
|
|
3853
|
-
fields:
|
|
3854
|
+
fields: E,
|
|
3854
3855
|
values: I
|
|
3855
3856
|
}
|
|
3856
3857
|
}), { closeParent: !0 };
|
|
@@ -3858,28 +3859,28 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3858
3859
|
}
|
|
3859
3860
|
function P({
|
|
3860
3861
|
domain: R,
|
|
3861
|
-
model:
|
|
3862
|
+
model: E,
|
|
3862
3863
|
formView: I,
|
|
3863
3864
|
context: A,
|
|
3864
3865
|
actionData: k
|
|
3865
3866
|
}) {
|
|
3866
3867
|
var W;
|
|
3867
|
-
const { type:
|
|
3868
|
-
if (m != null && m.isEnabled && (((W = m == null ? void 0 : m.params) == null ? void 0 : W.types) || []).includes(
|
|
3868
|
+
const { type: _, id: M } = k || {};
|
|
3869
|
+
if (m != null && m.isEnabled && (((W = m == null ? void 0 : m.params) == null ? void 0 : W.types) || []).includes(_))
|
|
3869
3870
|
try {
|
|
3870
3871
|
g({
|
|
3871
|
-
action_type:
|
|
3872
|
+
action_type: _,
|
|
3872
3873
|
action_id: M,
|
|
3873
3874
|
context: A
|
|
3874
3875
|
});
|
|
3875
3876
|
} catch (V) {
|
|
3876
3877
|
console.error(V);
|
|
3877
3878
|
}
|
|
3878
|
-
v ? F({ domain: R, model:
|
|
3879
|
+
v ? F({ domain: R, model: E, formView: I, context: A, actionData: k }) : (w({ domain: R, model: E, context: A, formView: I, actionData: k }), y(!0));
|
|
3879
3880
|
}
|
|
3880
3881
|
async function F({
|
|
3881
3882
|
domain: R,
|
|
3882
|
-
model:
|
|
3883
|
+
model: E,
|
|
3883
3884
|
formView: I,
|
|
3884
3885
|
context: A,
|
|
3885
3886
|
actionData: k
|
|
@@ -3890,7 +3891,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3890
3891
|
context: {},
|
|
3891
3892
|
formView: void 0,
|
|
3892
3893
|
actionData: void 0
|
|
3893
|
-
}), y(!1), await new Promise((
|
|
3894
|
+
}), y(!1), await new Promise((_) => setTimeout(_, 300)), w({ domain: R, model: E, context: A, formView: I, actionData: k }), y(!0);
|
|
3894
3895
|
}
|
|
3895
3896
|
async function $() {
|
|
3896
3897
|
Zs(f.current), f.current = [], y(!1), w({
|
|
@@ -3908,7 +3909,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
|
|
|
3908
3909
|
processAction: D,
|
|
3909
3910
|
globalValues: r
|
|
3910
3911
|
},
|
|
3911
|
-
children: /* @__PURE__ */
|
|
3912
|
+
children: /* @__PURE__ */ L(he, { children: [
|
|
3912
3913
|
n,
|
|
3913
3914
|
/* @__PURE__ */ s(
|
|
3914
3915
|
Ft,
|
|
@@ -3962,7 +3963,7 @@ async function Nf({
|
|
|
3962
3963
|
let a;
|
|
3963
3964
|
if (t)
|
|
3964
3965
|
for (const l of t) {
|
|
3965
|
-
const c = await
|
|
3966
|
+
const c = await H.getHandler().getView({
|
|
3966
3967
|
model: n,
|
|
3967
3968
|
type: l[1],
|
|
3968
3969
|
id: l[0],
|
|
@@ -3973,7 +3974,7 @@ async function Nf({
|
|
|
3973
3974
|
else {
|
|
3974
3975
|
const l = e.split(",");
|
|
3975
3976
|
for (const c of l) {
|
|
3976
|
-
const d = await
|
|
3977
|
+
const d = await H.getHandler().getView({
|
|
3977
3978
|
model: n,
|
|
3978
3979
|
type: c,
|
|
3979
3980
|
context: r
|
|
@@ -4038,7 +4039,7 @@ const Vf = $t($f), Wa = ({
|
|
|
4038
4039
|
selectedRowItems: n,
|
|
4039
4040
|
onRefreshParentValues: r
|
|
4040
4041
|
}), [c, d] = T(null), [f, u] = T(!1), [p] = Re(
|
|
4041
|
-
|
|
4042
|
+
H.getHandler().getToolbar
|
|
4042
4043
|
), m = i || c, g = O(async () => {
|
|
4043
4044
|
if (i || c != null && c.action || c != null && c.print)
|
|
4044
4045
|
return m;
|
|
@@ -4170,7 +4171,7 @@ function eo({ res_id: t, searchParams: e }) {
|
|
|
4170
4171
|
}, v = Ga(h), { type: y } = l || {};
|
|
4171
4172
|
let b = !g;
|
|
4172
4173
|
y === "form" && (b = !g || !t);
|
|
4173
|
-
const w = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */
|
|
4174
|
+
const w = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ L(ct.Compact, { style: { width: "100%" }, children: [
|
|
4174
4175
|
/* @__PURE__ */ s(
|
|
4175
4176
|
ft,
|
|
4176
4177
|
{
|
|
@@ -4248,11 +4249,11 @@ function Gf({
|
|
|
4248
4249
|
previousView: F,
|
|
4249
4250
|
results: $,
|
|
4250
4251
|
limit: R,
|
|
4251
|
-
totalItems:
|
|
4252
|
+
totalItems: E,
|
|
4252
4253
|
isActive: I,
|
|
4253
4254
|
treeType: A,
|
|
4254
4255
|
setSearchParams: k,
|
|
4255
|
-
setSearchValues:
|
|
4256
|
+
setSearchValues: _,
|
|
4256
4257
|
permissions: M
|
|
4257
4258
|
} = pe(It), W = Lt(
|
|
4258
4259
|
wt.FEATURE_ADVANCED_EXPORT
|
|
@@ -4281,7 +4282,7 @@ function Gf({
|
|
|
4281
4282
|
try {
|
|
4282
4283
|
m == null || m(!0);
|
|
4283
4284
|
const ie = d[0].id;
|
|
4284
|
-
await
|
|
4285
|
+
await H.getHandler().duplicate({
|
|
4285
4286
|
id: ie,
|
|
4286
4287
|
model: g,
|
|
4287
4288
|
context: { ...t }
|
|
@@ -4301,7 +4302,7 @@ function Gf({
|
|
|
4301
4302
|
]), le = O(async () => {
|
|
4302
4303
|
var ne;
|
|
4303
4304
|
try {
|
|
4304
|
-
f == null || f(!0), await
|
|
4305
|
+
f == null || f(!0), await H.getHandler().deleteObjects({
|
|
4305
4306
|
model: g,
|
|
4306
4307
|
ids: d.map((ie) => ie.id),
|
|
4307
4308
|
context: { ...t }
|
|
@@ -4327,7 +4328,7 @@ function Gf({
|
|
|
4327
4328
|
[l, P, c]
|
|
4328
4329
|
), Y = O(
|
|
4329
4330
|
(ne) => {
|
|
4330
|
-
ne !== D && (ne && ne.trim().length > 0 && !D && (k == null || k([]),
|
|
4331
|
+
ne !== D && (ne && ne.trim().length > 0 && !D && (k == null || k([]), _ == null || _({})), x == null || x(ne), D !== void 0 && setTimeout(() => {
|
|
4331
4332
|
var ie;
|
|
4332
4333
|
(ie = h == null ? void 0 : h.current) == null || ie.refreshResults();
|
|
4333
4334
|
}, 50));
|
|
@@ -4336,7 +4337,7 @@ function Gf({
|
|
|
4336
4337
|
D,
|
|
4337
4338
|
x,
|
|
4338
4339
|
k,
|
|
4339
|
-
|
|
4340
|
+
_,
|
|
4340
4341
|
h
|
|
4341
4342
|
]
|
|
4342
4343
|
), ge = O(
|
|
@@ -4401,13 +4402,13 @@ function Gf({
|
|
|
4401
4402
|
onOk: le
|
|
4402
4403
|
});
|
|
4403
4404
|
}, [le, N]);
|
|
4404
|
-
return /* @__PURE__ */
|
|
4405
|
-
S && /* @__PURE__ */
|
|
4405
|
+
return /* @__PURE__ */ L(ct, { wrap: !0, children: [
|
|
4406
|
+
S && /* @__PURE__ */ L(he, { children: [
|
|
4406
4407
|
/* @__PURE__ */ s(nt, {}),
|
|
4407
4408
|
/* @__PURE__ */ s(gt, {}),
|
|
4408
4409
|
/* @__PURE__ */ s(gt, {})
|
|
4409
4410
|
] }),
|
|
4410
|
-
!e && /* @__PURE__ */
|
|
4411
|
+
!e && /* @__PURE__ */ L(he, { children: [
|
|
4411
4412
|
/* @__PURE__ */ s(
|
|
4412
4413
|
Df,
|
|
4413
4414
|
{
|
|
@@ -4486,7 +4487,7 @@ function Gf({
|
|
|
4486
4487
|
onClick: z
|
|
4487
4488
|
}
|
|
4488
4489
|
),
|
|
4489
|
-
!e && /* @__PURE__ */
|
|
4490
|
+
!e && /* @__PURE__ */ L(he, { children: [
|
|
4490
4491
|
/* @__PURE__ */ s(gt, {}),
|
|
4491
4492
|
/* @__PURE__ */ s(
|
|
4492
4493
|
fs,
|
|
@@ -4502,7 +4503,7 @@ function Gf({
|
|
|
4502
4503
|
/* @__PURE__ */ s(gt, {}),
|
|
4503
4504
|
/* @__PURE__ */ s(Zt, { icon: /* @__PURE__ */ s(qr, {}), ...Q }),
|
|
4504
4505
|
/* @__PURE__ */ s(Zt, { icon: /* @__PURE__ */ s(Gr, {}), ...de }),
|
|
4505
|
-
W && /* @__PURE__ */
|
|
4506
|
+
W && /* @__PURE__ */ L(he, { children: [
|
|
4506
4507
|
/* @__PURE__ */ s(gt, {}),
|
|
4507
4508
|
/* @__PURE__ */ s(
|
|
4508
4509
|
Zt,
|
|
@@ -4536,7 +4537,7 @@ function Gf({
|
|
|
4536
4537
|
model: g,
|
|
4537
4538
|
domain: se,
|
|
4538
4539
|
limit: R,
|
|
4539
|
-
totalRegisters:
|
|
4540
|
+
totalRegisters: E || 0,
|
|
4540
4541
|
selectedRegistersToExport: d,
|
|
4541
4542
|
visibleRegisters: ($ == null ? void 0 : $.length) || 0,
|
|
4542
4543
|
context: t
|
|
@@ -4550,7 +4551,7 @@ function Gf({
|
|
|
4550
4551
|
const Yf = it(Gf), za = it(() => /* @__PURE__ */ s(
|
|
4551
4552
|
Mc,
|
|
4552
4553
|
{
|
|
4553
|
-
component: () => /* @__PURE__ */
|
|
4554
|
+
component: () => /* @__PURE__ */ L(
|
|
4554
4555
|
"svg",
|
|
4555
4556
|
{
|
|
4556
4557
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4594,7 +4595,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4594
4595
|
return null;
|
|
4595
4596
|
if ((i == null ? void 0 : i.type) === "form" && a) {
|
|
4596
4597
|
if (d === 0)
|
|
4597
|
-
return /* @__PURE__ */
|
|
4598
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
4598
4599
|
p("editingDocument"),
|
|
4599
4600
|
" (id:",
|
|
4600
4601
|
" ",
|
|
@@ -4608,7 +4609,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4608
4609
|
")"
|
|
4609
4610
|
] });
|
|
4610
4611
|
const h = (l ?? 0) + 1, v = u === "infinite" ? d : c == null ? void 0 : c.length;
|
|
4611
|
-
return /* @__PURE__ */
|
|
4612
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
4612
4613
|
p("register"),
|
|
4613
4614
|
" ",
|
|
4614
4615
|
h,
|
|
@@ -4626,14 +4627,14 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4626
4627
|
")"
|
|
4627
4628
|
] });
|
|
4628
4629
|
}
|
|
4629
|
-
return (i == null ? void 0 : i.type) === "tree" && (f != null && f.length) ? f.length === 1 ? /* @__PURE__ */
|
|
4630
|
+
return (i == null ? void 0 : i.type) === "tree" && (f != null && f.length) ? f.length === 1 ? /* @__PURE__ */ L(he, { children: [
|
|
4630
4631
|
"1 ",
|
|
4631
4632
|
p("selectedRegisters"),
|
|
4632
4633
|
" - (id:",
|
|
4633
4634
|
" ",
|
|
4634
4635
|
/* @__PURE__ */ s(Tr, { copyable: !0, children: f[0].id }),
|
|
4635
4636
|
")"
|
|
4636
|
-
] }) : /* @__PURE__ */
|
|
4637
|
+
] }) : /* @__PURE__ */ L(he, { children: [
|
|
4637
4638
|
f.length,
|
|
4638
4639
|
" ",
|
|
4639
4640
|
p("selectedRegisters"),
|
|
@@ -4657,8 +4658,8 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4657
4658
|
c == null ? void 0 : c.length,
|
|
4658
4659
|
p
|
|
4659
4660
|
]);
|
|
4660
|
-
return /* @__PURE__ */
|
|
4661
|
-
/* @__PURE__ */
|
|
4661
|
+
return /* @__PURE__ */ L("div", { style: { position: "sticky", top: 80, zIndex: 3 }, children: [
|
|
4662
|
+
/* @__PURE__ */ L(
|
|
4662
4663
|
Ge,
|
|
4663
4664
|
{
|
|
4664
4665
|
className: "shadow-md",
|
|
@@ -4670,7 +4671,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4670
4671
|
},
|
|
4671
4672
|
align: "middle",
|
|
4672
4673
|
children: [
|
|
4673
|
-
/* @__PURE__ */
|
|
4674
|
+
/* @__PURE__ */ L(Oe, { flex: 2, children: [
|
|
4674
4675
|
/* @__PURE__ */ s(Kf, { level: 3, style: { marginBottom: 0 }, children: t || o }),
|
|
4675
4676
|
r,
|
|
4676
4677
|
g
|
|
@@ -4689,7 +4690,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4689
4690
|
enabled: o = !0
|
|
4690
4691
|
}) => {
|
|
4691
4692
|
const [i, a] = T(!0), [l, c] = T(), [d, f] = T(), u = Z(!1), [p, m] = Re(
|
|
4692
|
-
|
|
4693
|
+
H.getHandler().getView
|
|
4693
4694
|
), { showErrorNotification: g } = yt();
|
|
4694
4695
|
Ue(() => (o && h(), () => {
|
|
4695
4696
|
m();
|
|
@@ -4754,9 +4755,9 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4754
4755
|
n(), o();
|
|
4755
4756
|
}, []);
|
|
4756
4757
|
const [e, n] = Re(
|
|
4757
|
-
|
|
4758
|
+
H.getHandler().readUserViewPrefs
|
|
4758
4759
|
), [r, o] = Re(
|
|
4759
|
-
|
|
4760
|
+
H.getHandler().saveUserViewPrefs
|
|
4760
4761
|
), i = ut(async () => {
|
|
4761
4762
|
if (!t)
|
|
4762
4763
|
throw new Error("Unknown column state key");
|
|
@@ -4862,7 +4863,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4862
4863
|
showEmptyValues: r
|
|
4863
4864
|
}) => {
|
|
4864
4865
|
const [o, i] = T(), [a, l] = T(!1), [c, d] = Re(
|
|
4865
|
-
|
|
4866
|
+
H.getHandler().readAggregates
|
|
4866
4867
|
), f = Jt(() => {
|
|
4867
4868
|
if (t)
|
|
4868
4869
|
return t.columns.filter((m) => Object.keys(m).some((g) => {
|
|
@@ -4937,7 +4938,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
4937
4938
|
isLoading: e
|
|
4938
4939
|
}) => {
|
|
4939
4940
|
const n = t && Object.keys(t).sort().map((r) => t[r].map((a) => `${a.label}: ${a.amount}`).join(", "));
|
|
4940
|
-
return /* @__PURE__ */
|
|
4941
|
+
return /* @__PURE__ */ L(
|
|
4941
4942
|
"div",
|
|
4942
4943
|
{
|
|
4943
4944
|
style: {
|
|
@@ -5082,7 +5083,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
5082
5083
|
label: ""
|
|
5083
5084
|
})
|
|
5084
5085
|
];
|
|
5085
|
-
return /* @__PURE__ */
|
|
5086
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
5086
5087
|
n && /* @__PURE__ */ s(
|
|
5087
5088
|
Kr,
|
|
5088
5089
|
{
|
|
@@ -5095,7 +5096,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
5095
5096
|
align: "left"
|
|
5096
5097
|
}
|
|
5097
5098
|
),
|
|
5098
|
-
/* @__PURE__ */
|
|
5099
|
+
/* @__PURE__ */ L("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
5099
5100
|
/* @__PURE__ */ s(Ge, { className: "w-full", children: /* @__PURE__ */ s(Oe, { span: 24, children: /* @__PURE__ */ s(Xa, { ...t, ooui: i[0], showLabel: !1 }) }) }),
|
|
5100
5101
|
/* @__PURE__ */ s(Ge, { className: "w-full", children: /* @__PURE__ */ s(Oe, { span: 24, children: /* @__PURE__ */ s(We, { ...t, ooui: i[1], showLabel: !1, children: /* @__PURE__ */ s(op, {}) }) }) })
|
|
5101
5102
|
] })
|
|
@@ -5108,7 +5109,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
|
|
|
5108
5109
|
() => dt().hour(0).minute(0).second(0),
|
|
5109
5110
|
[]
|
|
5110
5111
|
);
|
|
5111
|
-
return /* @__PURE__ */
|
|
5112
|
+
return /* @__PURE__ */ L(Ge, { gutter: 8, children: [
|
|
5112
5113
|
/* @__PURE__ */ s(Oe, { span: 12, children: /* @__PURE__ */ s(
|
|
5113
5114
|
No,
|
|
5114
5115
|
{
|
|
@@ -5209,7 +5210,7 @@ function mp(t) {
|
|
|
5209
5210
|
layout: "vertical"
|
|
5210
5211
|
}
|
|
5211
5212
|
);
|
|
5212
|
-
return /* @__PURE__ */
|
|
5213
|
+
return /* @__PURE__ */ L("div", { style: { width: "100%" }, children: [
|
|
5213
5214
|
n && /* @__PURE__ */ s(
|
|
5214
5215
|
Kr,
|
|
5215
5216
|
{
|
|
@@ -5222,7 +5223,7 @@ function mp(t) {
|
|
|
5222
5223
|
align: "left"
|
|
5223
5224
|
}
|
|
5224
5225
|
),
|
|
5225
|
-
/* @__PURE__ */
|
|
5226
|
+
/* @__PURE__ */ L(
|
|
5226
5227
|
Ge,
|
|
5227
5228
|
{
|
|
5228
5229
|
align: "bottom",
|
|
@@ -5365,7 +5366,7 @@ const { useToken: Cp } = Xe, { Title: Sp } = on, { Header: Tp, Content: Fp, Foot
|
|
|
5365
5366
|
padding: "0 16px",
|
|
5366
5367
|
borderBottom: "1px solid #f0f0f0"
|
|
5367
5368
|
};
|
|
5368
|
-
return /* @__PURE__ */ s(Gd, { children: t && /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ s(Gd, { children: t && /* @__PURE__ */ L(he, { children: [
|
|
5369
5370
|
/* @__PURE__ */ s(
|
|
5370
5371
|
Bs.div,
|
|
5371
5372
|
{
|
|
@@ -5394,7 +5395,7 @@ const { useToken: Cp } = Xe, { Title: Sp } = on, { Header: Tp, Content: Fp, Foot
|
|
|
5394
5395
|
allowOutsideClick: !0,
|
|
5395
5396
|
returnFocusOnDeactivate: !0
|
|
5396
5397
|
},
|
|
5397
|
-
children: /* @__PURE__ */
|
|
5398
|
+
children: /* @__PURE__ */ L(
|
|
5398
5399
|
Bs.div,
|
|
5399
5400
|
{
|
|
5400
5401
|
ref: f,
|
|
@@ -5417,7 +5418,7 @@ const { useToken: Cp } = Xe, { Title: Sp } = on, { Header: Tp, Content: Fp, Foot
|
|
|
5417
5418
|
flexDirection: "column"
|
|
5418
5419
|
},
|
|
5419
5420
|
children: [
|
|
5420
|
-
/* @__PURE__ */
|
|
5421
|
+
/* @__PURE__ */ L(Tp, { style: h, children: [
|
|
5421
5422
|
/* @__PURE__ */ s(Sp, { level: 3, style: { margin: 0, flex: 1 }, children: r }),
|
|
5422
5423
|
i && /* @__PURE__ */ s(
|
|
5423
5424
|
"div",
|
|
@@ -6278,9 +6279,9 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6278
6279
|
} = jt(), [p, m] = T(
|
|
6279
6280
|
(o == null ? void 0 : o.name) || ""
|
|
6280
6281
|
), [g, h] = T(!1), [v, y] = T(!1), [b, w] = T(!1), [C, x] = T(!1), [D, S] = T(""), [P] = Re(
|
|
6281
|
-
|
|
6282
|
+
H.getHandler().update
|
|
6282
6283
|
), [F] = Re(
|
|
6283
|
-
|
|
6284
|
+
H.getHandler().create
|
|
6284
6285
|
);
|
|
6285
6286
|
Ue(() => {
|
|
6286
6287
|
if (!l) {
|
|
@@ -6379,7 +6380,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6379
6380
|
i
|
|
6380
6381
|
]), R = O(() => {
|
|
6381
6382
|
l && (x(!0), S(p || ""), w(!0));
|
|
6382
|
-
}, [l, p]),
|
|
6383
|
+
}, [l, p]), E = ut(async () => {
|
|
6383
6384
|
if (!l || !t || !(n != null && n.length))
|
|
6384
6385
|
return;
|
|
6385
6386
|
const B = (D || p || "Unnamed Search").trim();
|
|
@@ -6496,7 +6497,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6496
6497
|
f,
|
|
6497
6498
|
u,
|
|
6498
6499
|
i
|
|
6499
|
-
]),
|
|
6500
|
+
]), _ = O(
|
|
6500
6501
|
(B) => {
|
|
6501
6502
|
B.key === "Enter" ? (h(!1), k()) : B.key === "Escape" && (m((o == null ? void 0 : o.name) || ""), h(!1));
|
|
6502
6503
|
},
|
|
@@ -6504,7 +6505,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6504
6505
|
), M = ut(async () => {
|
|
6505
6506
|
h(!1), k();
|
|
6506
6507
|
}, [k]), W = ut(
|
|
6507
|
-
(B) => l && p && (o || v) ? /* @__PURE__ */
|
|
6508
|
+
(B) => l && p && (o || v) ? /* @__PURE__ */ L("div", { children: [
|
|
6508
6509
|
/* @__PURE__ */ s("div", { children: B }),
|
|
6509
6510
|
/* @__PURE__ */ s(
|
|
6510
6511
|
"div",
|
|
@@ -6515,7 +6516,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6515
6516
|
{
|
|
6516
6517
|
value: p,
|
|
6517
6518
|
onChange: A,
|
|
6518
|
-
onKeyDown:
|
|
6519
|
+
onKeyDown: _,
|
|
6519
6520
|
onBlur: M,
|
|
6520
6521
|
size: "small",
|
|
6521
6522
|
style: { width: "200px", fontSize: "14px" },
|
|
@@ -6542,7 +6543,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6542
6543
|
v,
|
|
6543
6544
|
g,
|
|
6544
6545
|
A,
|
|
6545
|
-
|
|
6546
|
+
_,
|
|
6546
6547
|
M,
|
|
6547
6548
|
I,
|
|
6548
6549
|
l
|
|
@@ -6575,7 +6576,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6575
6576
|
setModalInputValue: S,
|
|
6576
6577
|
handleSave: $,
|
|
6577
6578
|
handleSaveAsNew: R,
|
|
6578
|
-
handleModalSave:
|
|
6579
|
+
handleModalSave: E,
|
|
6579
6580
|
handleClear: ee,
|
|
6580
6581
|
renderSavedSearchTitle: W,
|
|
6581
6582
|
shouldShowSaveButtons: V,
|
|
@@ -6622,25 +6623,25 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6622
6623
|
}) => {
|
|
6623
6624
|
if (!o)
|
|
6624
6625
|
return;
|
|
6625
|
-
const P = o == null ? void 0 : o.rows, F = P == null ? void 0 : P.flatMap((
|
|
6626
|
+
const P = o == null ? void 0 : o.rows, F = P == null ? void 0 : P.flatMap((E) => E), $ = Object.keys(c).reduce((E, I) => {
|
|
6626
6627
|
const A = I.replace(/#.*$/, "");
|
|
6627
|
-
return
|
|
6628
|
-
}, {}), R = D ? F.reduce((
|
|
6629
|
-
return F.filter((
|
|
6630
|
-
const A =
|
|
6628
|
+
return E[A] === void 0 && (E[A] = c[I] !== void 0), E;
|
|
6629
|
+
}, {}), R = D ? F.reduce((E, I) => (E[I.id] = $[I.id], E), {}) : $;
|
|
6630
|
+
return F.filter((E) => D ? R[E.id] === !0 : !0).sort((E, I) => {
|
|
6631
|
+
const A = E, k = I;
|
|
6631
6632
|
if (D) {
|
|
6632
|
-
const
|
|
6633
|
-
return
|
|
6633
|
+
const _ = v.indexOf(A.id), M = v.indexOf(k.id);
|
|
6634
|
+
return _ - M;
|
|
6634
6635
|
}
|
|
6635
6636
|
return Nr(A.label).localeCompare(
|
|
6636
6637
|
Nr(k.label)
|
|
6637
6638
|
);
|
|
6638
|
-
}).map((
|
|
6639
|
-
const I =
|
|
6639
|
+
}).map((E) => {
|
|
6640
|
+
const I = E, A = R[I.id] === !0, k = D ? !1 : x && !qh(x, I), _ = S ? `${I.id}-top` : `${I.id}-bottom`;
|
|
6640
6641
|
return /* @__PURE__ */ s(
|
|
6641
6642
|
"div",
|
|
6642
6643
|
{
|
|
6643
|
-
id: `field-container-${
|
|
6644
|
+
id: `field-container-${_}`,
|
|
6644
6645
|
style: {
|
|
6645
6646
|
display: k ? "none" : "block",
|
|
6646
6647
|
paddingTop: 5,
|
|
@@ -6648,7 +6649,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6648
6649
|
backgroundColor: A ? "#f0f0f0" : void 0,
|
|
6649
6650
|
fontWeight: A ? "bold" : void 0
|
|
6650
6651
|
},
|
|
6651
|
-
children: /* @__PURE__ */ s("div", { style: { paddingLeft: 18, paddingRight: 18 }, children: /* @__PURE__ */
|
|
6652
|
+
children: /* @__PURE__ */ s("div", { style: { paddingLeft: 18, paddingRight: 18 }, children: /* @__PURE__ */ L(
|
|
6652
6653
|
"div",
|
|
6653
6654
|
{
|
|
6654
6655
|
style: {
|
|
@@ -6656,9 +6657,9 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6656
6657
|
alignItems: "flex-end",
|
|
6657
6658
|
gap: "8px"
|
|
6658
6659
|
},
|
|
6659
|
-
"data-field-id":
|
|
6660
|
+
"data-field-id": _,
|
|
6660
6661
|
children: [
|
|
6661
|
-
/* @__PURE__ */ s("div", { style: { flex: 1 }, children: /* @__PURE__ */ s(Qa, { field: I }, `sf-${
|
|
6662
|
+
/* @__PURE__ */ s("div", { style: { flex: 1 }, children: /* @__PURE__ */ s(Qa, { field: I }, `sf-${_}`) }),
|
|
6662
6663
|
A && /* @__PURE__ */ s(
|
|
6663
6664
|
je,
|
|
6664
6665
|
{
|
|
@@ -6677,7 +6678,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6677
6678
|
}
|
|
6678
6679
|
) })
|
|
6679
6680
|
},
|
|
6680
|
-
|
|
6681
|
+
_
|
|
6681
6682
|
);
|
|
6682
6683
|
});
|
|
6683
6684
|
}, w = ut(() => {
|
|
@@ -6689,20 +6690,20 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6689
6690
|
(R) => D[R] !== void 0
|
|
6690
6691
|
);
|
|
6691
6692
|
if (F.length > P.length) {
|
|
6692
|
-
const R = F.find((
|
|
6693
|
+
const R = F.find((E) => !P.includes(E));
|
|
6693
6694
|
if (R) {
|
|
6694
|
-
const
|
|
6695
|
-
y((I) => I.includes(
|
|
6695
|
+
const E = R.replace(/#.*$/, "");
|
|
6696
|
+
y((I) => I.includes(E) ? I : [...I, E]), h.current && setTimeout(() => {
|
|
6696
6697
|
h.current && (h.current.scrollTop = h.current.scrollHeight);
|
|
6697
6698
|
}, 150);
|
|
6698
6699
|
}
|
|
6699
6700
|
}
|
|
6700
6701
|
const $ = P.filter((R) => !F.includes(R));
|
|
6701
6702
|
$.length > 0 && y((R) => {
|
|
6702
|
-
const
|
|
6703
|
+
const E = $.map(
|
|
6703
6704
|
(I) => I.replace(/#.*$/, "")
|
|
6704
6705
|
);
|
|
6705
|
-
return R.filter((I) => !
|
|
6706
|
+
return R.filter((I) => !E.includes(I));
|
|
6706
6707
|
});
|
|
6707
6708
|
}, [l, i, c]), C = O(
|
|
6708
6709
|
(x) => {
|
|
@@ -6721,7 +6722,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
|
|
|
6721
6722
|
style: {
|
|
6722
6723
|
height: "100%"
|
|
6723
6724
|
},
|
|
6724
|
-
children: /* @__PURE__ */
|
|
6725
|
+
children: /* @__PURE__ */ L("div", { style: { position: "relative", height: "100%" }, children: [
|
|
6725
6726
|
Object.keys(c).filter(
|
|
6726
6727
|
(x) => c[x] !== void 0
|
|
6727
6728
|
).length > 0 && /* @__PURE__ */ s(
|
|
@@ -6855,11 +6856,11 @@ const El = (t) => {
|
|
|
6855
6856
|
savedSearchName: F,
|
|
6856
6857
|
hasChanges: $,
|
|
6857
6858
|
showSaveModal: R,
|
|
6858
|
-
isModalSaveAsNew:
|
|
6859
|
+
isModalSaveAsNew: E,
|
|
6859
6860
|
modalInputValue: I,
|
|
6860
6861
|
setShowSaveModal: A,
|
|
6861
6862
|
setModalInputValue: k,
|
|
6862
|
-
handleSave:
|
|
6863
|
+
handleSave: _,
|
|
6863
6864
|
handleSaveAsNew: M,
|
|
6864
6865
|
handleModalSave: W,
|
|
6865
6866
|
handleClear: V,
|
|
@@ -6961,13 +6962,13 @@ const El = (t) => {
|
|
|
6961
6962
|
(Y = m.current) == null || Y.resetFields(), (ge = m.current) == null || ge.setFieldsValue({}), (ve = (be = m.current) == null ? void 0 : be.resetInitialValues) == null || ve.call(be), y([]), w({}), V(), o && o();
|
|
6962
6963
|
},
|
|
6963
6964
|
[v, o, V]
|
|
6964
|
-
), oe = Jt(() => U ? ee ? /* @__PURE__ */
|
|
6965
|
+
), oe = Jt(() => U ? ee ? /* @__PURE__ */ L(ct.Compact, { size: "small", children: [
|
|
6965
6966
|
/* @__PURE__ */ s(
|
|
6966
6967
|
je,
|
|
6967
6968
|
{
|
|
6968
6969
|
size: "small",
|
|
6969
6970
|
icon: /* @__PURE__ */ s(ko, {}),
|
|
6970
|
-
onClick:
|
|
6971
|
+
onClick: _,
|
|
6971
6972
|
style: { height: "24px" },
|
|
6972
6973
|
children: u("saveSearchFilter")
|
|
6973
6974
|
}
|
|
@@ -7003,7 +7004,7 @@ const El = (t) => {
|
|
|
7003
7004
|
{
|
|
7004
7005
|
size: "small",
|
|
7005
7006
|
icon: B ? /* @__PURE__ */ s(Po, {}) : /* @__PURE__ */ s(ko, {}),
|
|
7006
|
-
onClick: B ? M :
|
|
7007
|
+
onClick: B ? M : _,
|
|
7007
7008
|
style: { height: "24px" },
|
|
7008
7009
|
children: u(B ? "saveAsNewSearchFilter" : "saveSearchFilter")
|
|
7009
7010
|
}
|
|
@@ -7014,10 +7015,10 @@ const El = (t) => {
|
|
|
7014
7015
|
B,
|
|
7015
7016
|
$,
|
|
7016
7017
|
u,
|
|
7017
|
-
|
|
7018
|
+
_,
|
|
7018
7019
|
M
|
|
7019
7020
|
]);
|
|
7020
|
-
return /* @__PURE__ */
|
|
7021
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
7021
7022
|
/* @__PURE__ */ s(
|
|
7022
7023
|
Rp,
|
|
7023
7024
|
{
|
|
@@ -7050,7 +7051,7 @@ const El = (t) => {
|
|
|
7050
7051
|
/* @__PURE__ */ s(
|
|
7051
7052
|
Ft,
|
|
7052
7053
|
{
|
|
7053
|
-
title: u(
|
|
7054
|
+
title: u(E ? "saveAsNewSearchFilter" : "saveSearchFilter"),
|
|
7054
7055
|
open: R,
|
|
7055
7056
|
onOk: W,
|
|
7056
7057
|
okButtonProps: {
|
|
@@ -7107,7 +7108,7 @@ const El = (t) => {
|
|
|
7107
7108
|
searchParams: n
|
|
7108
7109
|
}) => {
|
|
7109
7110
|
const { t: r } = we();
|
|
7110
|
-
return /* @__PURE__ */
|
|
7111
|
+
return /* @__PURE__ */ L(
|
|
7111
7112
|
"div",
|
|
7112
7113
|
{
|
|
7113
7114
|
style: {
|
|
@@ -7159,12 +7160,12 @@ function Gh(t) {
|
|
|
7159
7160
|
isSearching: o,
|
|
7160
7161
|
hideAdvancedFilter: i
|
|
7161
7162
|
} = t, { t: a } = we();
|
|
7162
|
-
return /* @__PURE__ */
|
|
7163
|
-
!i && /* @__PURE__ */ s(Oe, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */
|
|
7163
|
+
return /* @__PURE__ */ L(Ge, { children: [
|
|
7164
|
+
!i && /* @__PURE__ */ s(Oe, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ L("a", { className: "text-xs", onClick: e, children: [
|
|
7164
7165
|
n ? /* @__PURE__ */ s(Lc, { className: "pr-1" }) : /* @__PURE__ */ s(ur, { className: "pr-1" }),
|
|
7165
7166
|
a(n ? "simple_search" : "advanced_search")
|
|
7166
7167
|
] }) }),
|
|
7167
|
-
/* @__PURE__ */
|
|
7168
|
+
/* @__PURE__ */ L(Oe, { span: i ? 24 : 12, className: "text-right pb-2", children: [
|
|
7168
7169
|
/* @__PURE__ */ s(je, { className: "mr-5", icon: /* @__PURE__ */ s(Gn, {}), onClick: r, children: a("clear") }),
|
|
7169
7170
|
/* @__PURE__ */ s(
|
|
7170
7171
|
je,
|
|
@@ -7182,9 +7183,9 @@ function Gh(t) {
|
|
|
7182
7183
|
}
|
|
7183
7184
|
function Yh(t) {
|
|
7184
7185
|
const { onLimitChange: e } = t, { t: n } = we(), r = new Do({ name: "limit" }), o = new Do({ name: "offset" });
|
|
7185
|
-
return /* @__PURE__ */
|
|
7186
|
+
return /* @__PURE__ */ L("div", { className: "pl-2 pt-2", children: [
|
|
7186
7187
|
/* @__PURE__ */ s(Ge, { children: n("parameters") }, "count_params"),
|
|
7187
|
-
/* @__PURE__ */
|
|
7188
|
+
/* @__PURE__ */ L(ct, { align: "center", children: [
|
|
7188
7189
|
n("limit") + " :",
|
|
7189
7190
|
/* @__PURE__ */ s(
|
|
7190
7191
|
ar,
|
|
@@ -7225,43 +7226,43 @@ function oo(t) {
|
|
|
7225
7226
|
const S = () => {
|
|
7226
7227
|
if (!v)
|
|
7227
7228
|
return;
|
|
7228
|
-
const R = b ? v : g,
|
|
7229
|
-
return
|
|
7229
|
+
const R = b ? v : g, E = R == null ? void 0 : R.rows;
|
|
7230
|
+
return E == null ? void 0 : E.map((I, A) => /* @__PURE__ */ s(Ge, { children: I.map((k, _) => /* @__PURE__ */ s(Oe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Qa, { field: k }) }, _)) }, A));
|
|
7230
7231
|
};
|
|
7231
7232
|
Ue(() => {
|
|
7232
7233
|
w(!1), C.current = new Zi(n, e), C.current.parse(), h(C.current._simpleSearchContainer), y(C.current._advancedSearchContainer);
|
|
7233
7234
|
}, [e, n]);
|
|
7234
7235
|
const P = S(), F = (R) => {
|
|
7235
7236
|
var k;
|
|
7236
|
-
const { limit:
|
|
7237
|
+
const { limit: E, offset: I } = R;
|
|
7237
7238
|
delete R.offset, delete R.limit;
|
|
7238
7239
|
const A = er(
|
|
7239
7240
|
R,
|
|
7240
7241
|
(k = C.current) == null ? void 0 : k._advancedSearchContainer
|
|
7241
7242
|
);
|
|
7242
|
-
o({ params: A, offset: I, limit:
|
|
7243
|
+
o({ params: A, offset: I, limit: E, searchValues: R });
|
|
7243
7244
|
}, $ = O(() => {
|
|
7244
7245
|
if (!g || !v)
|
|
7245
7246
|
return !1;
|
|
7246
7247
|
const R = g.rows.reduce(
|
|
7247
7248
|
(I, A) => I + A.length,
|
|
7248
7249
|
0
|
|
7249
|
-
),
|
|
7250
|
+
), E = v.rows.reduce(
|
|
7250
7251
|
(I, A) => I + A.length,
|
|
7251
7252
|
0
|
|
7252
7253
|
);
|
|
7253
|
-
return R ===
|
|
7254
|
+
return R === E;
|
|
7254
7255
|
}, [g, v]);
|
|
7255
7256
|
return /* @__PURE__ */ s(
|
|
7256
7257
|
os,
|
|
7257
7258
|
{
|
|
7258
7259
|
bounds: !0,
|
|
7259
7260
|
onResize: (R) => {
|
|
7260
|
-
var
|
|
7261
|
-
f == null || f((
|
|
7261
|
+
var E;
|
|
7262
|
+
f == null || f((E = R.bounds) == null ? void 0 : E.height);
|
|
7262
7263
|
},
|
|
7263
|
-
children: ({ measureRef: R }) => /* @__PURE__ */ s("div", { ref: R, children: /* @__PURE__ */
|
|
7264
|
-
/* @__PURE__ */
|
|
7264
|
+
children: ({ measureRef: R }) => /* @__PURE__ */ s("div", { ref: R, children: /* @__PURE__ */ L("div", { style: { display: d ? "block" : "none" }, children: [
|
|
7265
|
+
/* @__PURE__ */ L(
|
|
7265
7266
|
Ot,
|
|
7266
7267
|
{
|
|
7267
7268
|
className: "p-3 shadow-md",
|
|
@@ -7306,7 +7307,7 @@ function oo(t) {
|
|
|
7306
7307
|
function Ol({
|
|
7307
7308
|
useLocalState: t = !1
|
|
7308
7309
|
}) {
|
|
7309
|
-
const e = Yg() && !t, n = jt(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, f] = T(0), [u, p] = T(void 0), [m, g] = T([]), [h, v] = T({}), [y, b] = T(), [w, C] = T([]), [x, D] = T(), [S, P] = T(0), [F, $] = T(), [R,
|
|
7310
|
+
const e = Yg() && !t, n = jt(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, f] = T(0), [u, p] = T(void 0), [m, g] = T([]), [h, v] = T({}), [y, b] = T(), [w, C] = T([]), [x, D] = T(), [S, P] = T(0), [F, $] = T(), [R, E] = T(1), [I, A] = T(Bn), [k, _] = T(Ct);
|
|
7310
7311
|
return e ? {
|
|
7311
7312
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
7312
7313
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -7381,11 +7382,11 @@ function Ol({
|
|
|
7381
7382
|
order: F,
|
|
7382
7383
|
setOrder: $,
|
|
7383
7384
|
currentPage: R,
|
|
7384
|
-
setCurrentPage:
|
|
7385
|
+
setCurrentPage: E,
|
|
7385
7386
|
treeType: I,
|
|
7386
7387
|
setTreeType: A,
|
|
7387
7388
|
limit: k,
|
|
7388
|
-
setLimit:
|
|
7389
|
+
setLimit: _
|
|
7389
7390
|
};
|
|
7390
7391
|
}
|
|
7391
7392
|
const Fs = () => {
|
|
@@ -7451,12 +7452,12 @@ const dr = ({
|
|
|
7451
7452
|
results: d,
|
|
7452
7453
|
onRecordsUpdated: f
|
|
7453
7454
|
} = t, u = re(() => c != null && c.field_parent ? { ...c == null ? void 0 : c.fields, [c == null ? void 0 : c.field_parent]: {} } : c == null ? void 0 : c.fields, [c]), p = (c == null ? void 0 : c.fields_in_conditions) !== void 0, m = Z(null), [g, h] = T(!0), [v, y] = Re(
|
|
7454
|
-
|
|
7455
|
+
H.getHandler().readObjects
|
|
7455
7456
|
), [b, w] = Re(
|
|
7456
|
-
|
|
7457
|
+
H.getHandler().parseConditions
|
|
7457
7458
|
), C = Fs(), x = Z({}), D = O(
|
|
7458
|
-
(
|
|
7459
|
-
(A) => JSON.stringify(
|
|
7459
|
+
(E, I) => I ? o == null ? void 0 : o.some(
|
|
7460
|
+
(A) => JSON.stringify(E[A]) !== JSON.stringify(I[A])
|
|
7460
7461
|
) : !0,
|
|
7461
7462
|
[o]
|
|
7462
7463
|
);
|
|
@@ -7467,22 +7468,22 @@ const dr = ({
|
|
|
7467
7468
|
var A, k;
|
|
7468
7469
|
if (!c)
|
|
7469
7470
|
return !1;
|
|
7470
|
-
const
|
|
7471
|
-
return
|
|
7471
|
+
const E = ((A = c.fields_in_conditions) == null ? void 0 : A.colors) || [], I = ((k = c.fields_in_conditions) == null ? void 0 : k.status) || [];
|
|
7472
|
+
return E.some((_) => o == null ? void 0 : o.includes(_)) || I.some((_) => o == null ? void 0 : o.includes(_));
|
|
7472
7473
|
}, [c, o]), P = O(async () => {
|
|
7473
7474
|
var I, A;
|
|
7474
7475
|
if (!(o != null && o.length) || !g)
|
|
7475
7476
|
return;
|
|
7476
|
-
const
|
|
7477
|
-
if (!(!
|
|
7477
|
+
const E = (I = e.current) == null ? void 0 : I.getVisibleRowIds().filter((k) => k != null);
|
|
7478
|
+
if (!(!E || E.length === 0) && a)
|
|
7478
7479
|
try {
|
|
7479
7480
|
const k = await v({
|
|
7480
7481
|
model: n,
|
|
7481
|
-
ids:
|
|
7482
|
+
ids: E,
|
|
7482
7483
|
fields: u,
|
|
7483
7484
|
fieldsToRetrieve: o,
|
|
7484
7485
|
context: r
|
|
7485
|
-
}),
|
|
7486
|
+
}), _ = cn(a, k), M = _.filter((W) => {
|
|
7486
7487
|
const V = x.current[W.id];
|
|
7487
7488
|
return D(W, V);
|
|
7488
7489
|
});
|
|
@@ -7505,7 +7506,7 @@ const dr = ({
|
|
|
7505
7506
|
N.name !== "AbortError" && console.error("Error parsing conditions:", N);
|
|
7506
7507
|
}
|
|
7507
7508
|
}
|
|
7508
|
-
(A = e.current) == null || A.updateRows(
|
|
7509
|
+
(A = e.current) == null || A.updateRows(_), f == null || f(M);
|
|
7509
7510
|
} catch (k) {
|
|
7510
7511
|
console.error(k);
|
|
7511
7512
|
}
|
|
@@ -7565,7 +7566,7 @@ const dr = ({
|
|
|
7565
7566
|
const [f, u] = T(!1), p = Z([]), m = e == null ? void 0 : e.fields, g = (e == null ? void 0 : e.fields_in_conditions) !== void 0, [h, v] = T(
|
|
7566
7567
|
/* @__PURE__ */ new Set()
|
|
7567
7568
|
), y = Z(/* @__PURE__ */ new Set()), b = Z([]), w = Z(null), [C, x] = T(!0), [D, S] = Re(
|
|
7568
|
-
async (N) =>
|
|
7569
|
+
async (N) => H.getHandler().processSearchResults({
|
|
7569
7570
|
searchIds: N.searchIds,
|
|
7570
7571
|
model: t,
|
|
7571
7572
|
fieldsToRetrieve: N.fieldsToRetrieve,
|
|
@@ -7573,7 +7574,7 @@ const dr = ({
|
|
|
7573
7574
|
fields: m
|
|
7574
7575
|
})
|
|
7575
7576
|
), [P, F] = Re(
|
|
7576
|
-
|
|
7577
|
+
H.getHandler().parseConditions
|
|
7577
7578
|
), $ = Fs();
|
|
7578
7579
|
ce(() => {
|
|
7579
7580
|
o === !1 && M(), (o === void 0 || o === !0) && !$ && M(), (o === void 0 || o === !0) && $ && W();
|
|
@@ -7595,7 +7596,7 @@ const dr = ({
|
|
|
7595
7596
|
return !1;
|
|
7596
7597
|
const N = ((j = e.fields_in_conditions) == null ? void 0 : j.colors) || [], U = ((ee = e.fields_in_conditions) == null ? void 0 : ee.status) || [];
|
|
7597
7598
|
return N.some((B) => p.current.includes(B)) || U.some((B) => p.current.includes(B));
|
|
7598
|
-
}, [e]),
|
|
7599
|
+
}, [e]), E = O(async () => {
|
|
7599
7600
|
if (!f || h.size === 0 || !o || !p.current.length || !a)
|
|
7600
7601
|
return;
|
|
7601
7602
|
const N = Array.from(h).filter(
|
|
@@ -7625,18 +7626,18 @@ const dr = ({
|
|
|
7625
7626
|
D
|
|
7626
7627
|
]);
|
|
7627
7628
|
Ue(() => {
|
|
7628
|
-
h.size !== 0 &&
|
|
7629
|
-
}, [h,
|
|
7629
|
+
h.size !== 0 && E();
|
|
7630
|
+
}, [h, E]);
|
|
7630
7631
|
const I = O(
|
|
7631
7632
|
(N) => {
|
|
7632
7633
|
!N || N.length === 0 || (v((U) => {
|
|
7633
7634
|
const j = new Set(U);
|
|
7634
7635
|
return N.forEach((ee) => j.add(ee)), j;
|
|
7635
7636
|
}), f && o && a && setTimeout(() => {
|
|
7636
|
-
|
|
7637
|
+
E();
|
|
7637
7638
|
}, 100));
|
|
7638
7639
|
},
|
|
7639
|
-
[f, o, a,
|
|
7640
|
+
[f, o, a, E]
|
|
7640
7641
|
), A = O(
|
|
7641
7642
|
async (N) => {
|
|
7642
7643
|
var ee;
|
|
@@ -7682,7 +7683,7 @@ const dr = ({
|
|
|
7682
7683
|
) : !1;
|
|
7683
7684
|
}).filter(Boolean);
|
|
7684
7685
|
U.length > 0 && (U.forEach((B) => y.current.delete(B.id)), A(U), (ee = n == null ? void 0 : n.current) == null || ee.updateRows(U));
|
|
7685
|
-
}, [n, A]),
|
|
7686
|
+
}, [n, A]), _ = O((N, U) => p.current.includes(U) ? !b.current.find((j) => j.id === (N == null ? void 0 : N.id)) : !1, []);
|
|
7686
7687
|
Ue(() => (f && C && (k(), w.current = setInterval(
|
|
7687
7688
|
k,
|
|
7688
7689
|
Jh
|
|
@@ -7719,7 +7720,7 @@ const dr = ({
|
|
|
7719
7720
|
v(/* @__PURE__ */ new Set()), b.current = [], y.current.clear();
|
|
7720
7721
|
},
|
|
7721
7722
|
addRecordsToCheckFunctionFields: I,
|
|
7722
|
-
isFieldLoading:
|
|
7723
|
+
isFieldLoading: _,
|
|
7723
7724
|
hasFunctionFields: f,
|
|
7724
7725
|
pause: M,
|
|
7725
7726
|
resume: W,
|
|
@@ -7732,7 +7733,7 @@ const dr = ({
|
|
|
7732
7733
|
const { t: e } = we(), n = (a) => {
|
|
7733
7734
|
a.preventDefault(), t();
|
|
7734
7735
|
}, r = e("nameSearchLimitNote"), o = e("filterSearchLink"), i = r.split(o);
|
|
7735
|
-
return i.length > 1 ? /* @__PURE__ */
|
|
7736
|
+
return i.length > 1 ? /* @__PURE__ */ L("span", { style: { fontSize: "12px", color: "#666" }, children: [
|
|
7736
7737
|
i[0],
|
|
7737
7738
|
/* @__PURE__ */ s(
|
|
7738
7739
|
pa,
|
|
@@ -7754,7 +7755,7 @@ const dr = ({
|
|
|
7754
7755
|
customMiddleComponent: n
|
|
7755
7756
|
}) => {
|
|
7756
7757
|
const { t: r } = we(), o = n ? 6 : 12;
|
|
7757
|
-
return /* @__PURE__ */
|
|
7758
|
+
return /* @__PURE__ */ L(
|
|
7758
7759
|
Ge,
|
|
7759
7760
|
{
|
|
7760
7761
|
align: "bottom",
|
|
@@ -7763,7 +7764,7 @@ const dr = ({
|
|
|
7763
7764
|
children: [
|
|
7764
7765
|
/* @__PURE__ */ s(Oe, { span: o, children: /* @__PURE__ */ s(Qh, { selectedRowKeys: e }) }),
|
|
7765
7766
|
n && /* @__PURE__ */ s(Oe, { span: 12, className: "text-center", children: n }),
|
|
7766
|
-
/* @__PURE__ */
|
|
7767
|
+
/* @__PURE__ */ L(
|
|
7767
7768
|
Oe,
|
|
7768
7769
|
{
|
|
7769
7770
|
span: o,
|
|
@@ -7783,7 +7784,7 @@ const dr = ({
|
|
|
7783
7784
|
}) => {
|
|
7784
7785
|
const { t: e } = we();
|
|
7785
7786
|
if (t.length === 1)
|
|
7786
|
-
return /* @__PURE__ */
|
|
7787
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
7787
7788
|
"1 ",
|
|
7788
7789
|
e("selectedRegisters"),
|
|
7789
7790
|
" - (id:",
|
|
@@ -7792,7 +7793,7 @@ const dr = ({
|
|
|
7792
7793
|
")"
|
|
7793
7794
|
] });
|
|
7794
7795
|
if (t.length > 1)
|
|
7795
|
-
return /* @__PURE__ */
|
|
7796
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
7796
7797
|
t.length,
|
|
7797
7798
|
" ",
|
|
7798
7799
|
e("selectedRegisters") + " ",
|
|
@@ -7850,7 +7851,7 @@ const eg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Nl,
|
|
|
7850
7851
|
maximumFractionDigits: 4,
|
|
7851
7852
|
useGrouping: !1
|
|
7852
7853
|
})}%`;
|
|
7853
|
-
return /* @__PURE__ */
|
|
7854
|
+
return /* @__PURE__ */ L(tg, { children: [
|
|
7854
7855
|
/* @__PURE__ */ s(ng, { percent: t }),
|
|
7855
7856
|
/* @__PURE__ */ s(rg, { children: e })
|
|
7856
7857
|
] });
|
|
@@ -7917,7 +7918,7 @@ const eg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Nl,
|
|
|
7917
7918
|
}
|
|
7918
7919
|
];
|
|
7919
7920
|
}, [l, t]);
|
|
7920
|
-
return /* @__PURE__ */
|
|
7921
|
+
return /* @__PURE__ */ L(jn, { children: [
|
|
7921
7922
|
/* @__PURE__ */ s(
|
|
7922
7923
|
ad,
|
|
7923
7924
|
{
|
|
@@ -7959,13 +7960,13 @@ const eg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Nl,
|
|
|
7959
7960
|
), { openRelate: d, openAction: f } = c || {}, u = pe(
|
|
7960
7961
|
Sn
|
|
7961
7962
|
), { processAction: p } = u || {}, [m, g] = Re(
|
|
7962
|
-
|
|
7963
|
+
H.getHandler().getView
|
|
7963
7964
|
), [h, v] = Re(
|
|
7964
|
-
|
|
7965
|
+
H.getHandler().getToolbar
|
|
7965
7966
|
), [y, b] = Re(
|
|
7966
|
-
|
|
7967
|
+
H.getHandler().getFields
|
|
7967
7968
|
), [w, C] = Re(
|
|
7968
|
-
|
|
7969
|
+
H.getHandler().readObjects
|
|
7969
7970
|
), x = Lt(
|
|
7970
7971
|
wt.FEATURE_GET_TOOLBAR
|
|
7971
7972
|
), D = O(() => {
|
|
@@ -8001,20 +8002,20 @@ const eg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Nl,
|
|
|
8001
8002
|
});
|
|
8002
8003
|
i(A), F = A.fields, $ = A.toolbar;
|
|
8003
8004
|
}
|
|
8004
|
-
const
|
|
8005
|
+
const E = sg({ fields: F, toolbar: $ });
|
|
8005
8006
|
let I = {};
|
|
8006
|
-
return
|
|
8007
|
+
return E.length > 0 && (I = { ...(R = await w({
|
|
8007
8008
|
model: n,
|
|
8008
8009
|
ids: [e],
|
|
8009
|
-
fieldsToRetrieve:
|
|
8010
|
+
fieldsToRetrieve: E,
|
|
8010
8011
|
context: r
|
|
8011
8012
|
})) == null ? void 0 : R[0] }), I = { ..._n(I, F), active_id: e }, l(I), $ ? {
|
|
8012
8013
|
actionItems: $.action,
|
|
8013
8014
|
relateItems: $.relate,
|
|
8014
8015
|
printItems: $.print
|
|
8015
8016
|
} : void 0;
|
|
8016
|
-
} catch (
|
|
8017
|
-
console.error("Error in Many2oneSuffix fetchData:",
|
|
8017
|
+
} catch (E) {
|
|
8018
|
+
console.error("Error in Many2oneSuffix fetchData:", E);
|
|
8018
8019
|
return;
|
|
8019
8020
|
}
|
|
8020
8021
|
}, [
|
|
@@ -8106,7 +8107,7 @@ const Ow = Object.values(bn), ig = (t) => {
|
|
|
8106
8107
|
let i = !0;
|
|
8107
8108
|
return r === !0 && (i = !1), n.showMenu !== void 0 && (i = n.showMenu), i;
|
|
8108
8109
|
}, [n.showMenu, r]);
|
|
8109
|
-
return e ? /* @__PURE__ */
|
|
8110
|
+
return e ? /* @__PURE__ */ L(ct, { children: [
|
|
8110
8111
|
/* @__PURE__ */ s(he, { children: e.value }),
|
|
8111
8112
|
o && /* @__PURE__ */ s(so, { id: e.id, model: e.model })
|
|
8112
8113
|
] }) : /* @__PURE__ */ s(he, {});
|
|
@@ -8115,7 +8116,7 @@ const Ow = Object.values(bn), ig = (t) => {
|
|
|
8115
8116
|
if (!e || e && o && a)
|
|
8116
8117
|
return;
|
|
8117
8118
|
l(!0);
|
|
8118
|
-
const h = (await
|
|
8119
|
+
const h = (await H.getHandler().execute({
|
|
8119
8120
|
action: "name_get",
|
|
8120
8121
|
payload: [f],
|
|
8121
8122
|
model: c,
|
|
@@ -8134,7 +8135,7 @@ const Ow = Object.values(bn), ig = (t) => {
|
|
|
8134
8135
|
if (a)
|
|
8135
8136
|
return /* @__PURE__ */ s(Bt, {});
|
|
8136
8137
|
const m = r.get(c);
|
|
8137
|
-
return /* @__PURE__ */
|
|
8138
|
+
return /* @__PURE__ */ L(ct, { children: [
|
|
8138
8139
|
/* @__PURE__ */ s(he, { children: `${m}:` }),
|
|
8139
8140
|
/* @__PURE__ */ s(he, { children: o }),
|
|
8140
8141
|
!p && /* @__PURE__ */ s(so, { id: f, model: c })
|
|
@@ -8154,7 +8155,7 @@ function cg(t) {
|
|
|
8154
8155
|
const dg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Vl, { ...t }) }), Vl = (t) => {
|
|
8155
8156
|
var m;
|
|
8156
8157
|
const { t: e } = we(), [n, r] = Re(
|
|
8157
|
-
|
|
8158
|
+
H.getHandler().readObjects
|
|
8158
8159
|
), { getFieldValue: o } = pe(Qe) || {}, { ooui: i, value: a } = t, [l, c] = T("default");
|
|
8159
8160
|
let d = a, f = mr, u = a;
|
|
8160
8161
|
i.selectionValues.size ? d = i.selectionValues.get(a) : Array.isArray(a) ? (u = a[0], d = a[1]) : i.fieldType === "boolean" && (d = a ? cg(i.label) : `${e("not")} ${i.label.toLowerCase()}`, f = qu);
|
|
@@ -8263,7 +8264,7 @@ const dg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Vl,
|
|
|
8263
8264
|
const y = i.filter((b) => b !== v);
|
|
8264
8265
|
a(y), p(y), u && u();
|
|
8265
8266
|
};
|
|
8266
|
-
return /* @__PURE__ */
|
|
8267
|
+
return /* @__PURE__ */ L(
|
|
8267
8268
|
"div",
|
|
8268
8269
|
{
|
|
8269
8270
|
style: {
|
|
@@ -8473,7 +8474,7 @@ const dg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Vl,
|
|
|
8473
8474
|
context: r
|
|
8474
8475
|
}) => {
|
|
8475
8476
|
const [o, i] = T([]), [a, l] = T(!1), [c, d] = Re(
|
|
8476
|
-
|
|
8477
|
+
H.getHandler().readObjects
|
|
8477
8478
|
), { relation: f, field: u } = n, p = O(async () => {
|
|
8478
8479
|
try {
|
|
8479
8480
|
l(!0);
|
|
@@ -8579,16 +8580,16 @@ function Og(t, e) {
|
|
|
8579
8580
|
elementRef: P,
|
|
8580
8581
|
offset: _g
|
|
8581
8582
|
}), [$, R] = Re(
|
|
8582
|
-
|
|
8583
|
-
), [
|
|
8584
|
-
|
|
8583
|
+
H.getHandler().searchCount
|
|
8584
|
+
), [E, I] = Re(
|
|
8585
|
+
H.getHandler().searchForTree
|
|
8585
8586
|
), [A, k] = Re(
|
|
8586
|
-
|
|
8587
|
+
H.getHandler().searchAllIds
|
|
8587
8588
|
);
|
|
8588
8589
|
ce(() => () => {
|
|
8589
8590
|
R(), I(), k();
|
|
8590
8591
|
}, []);
|
|
8591
|
-
const { treeView:
|
|
8592
|
+
const { treeView: _, formView: M, loading: W } = ms({
|
|
8592
8593
|
model: n,
|
|
8593
8594
|
formViewProps: r,
|
|
8594
8595
|
treeViewProps: o,
|
|
@@ -8620,9 +8621,9 @@ function Og(t, e) {
|
|
|
8620
8621
|
ne !== void 0 && ie.current === void 0 || typeof ne == "string" && typeof ie.current == "string" && ne !== ie.current ? (Te.current = !!ne, K == null || K([]), q == null || q({}), (fe = g.current) == null || fe.unselectAll()) : ne === void 0 && ie.current !== void 0 && (Te.current = !1, (_e = g.current) == null || _e.unselectAll()), ie.current = ne;
|
|
8621
8622
|
}, [ne]);
|
|
8622
8623
|
const me = re(() => {
|
|
8623
|
-
if (
|
|
8624
|
-
return en(
|
|
8625
|
-
}, [
|
|
8624
|
+
if (_)
|
|
8625
|
+
return en(_);
|
|
8626
|
+
}, [_]), {
|
|
8626
8627
|
colorsForResults: qe,
|
|
8627
8628
|
statusForResults: st,
|
|
8628
8629
|
updateAttributes: Ze,
|
|
@@ -8637,7 +8638,7 @@ function Og(t, e) {
|
|
|
8637
8638
|
syncExternalRecordUpdates: ze
|
|
8638
8639
|
} = Pl({
|
|
8639
8640
|
model: n,
|
|
8640
|
-
treeView:
|
|
8641
|
+
treeView: _,
|
|
8641
8642
|
tableRef: g,
|
|
8642
8643
|
context: d,
|
|
8643
8644
|
isActive: ge,
|
|
@@ -8648,7 +8649,7 @@ function Og(t, e) {
|
|
|
8648
8649
|
model: n,
|
|
8649
8650
|
tableRef: g,
|
|
8650
8651
|
autorefreshableFields: me == null ? void 0 : me.autorefreshableFields,
|
|
8651
|
-
treeView:
|
|
8652
|
+
treeView: _,
|
|
8652
8653
|
context: d,
|
|
8653
8654
|
isActive: ge,
|
|
8654
8655
|
treeOoui: me,
|
|
@@ -8672,10 +8673,10 @@ function Og(t, e) {
|
|
|
8672
8673
|
}, [Ne, Se]), Ce = re(() => {
|
|
8673
8674
|
if (!W)
|
|
8674
8675
|
return Ja({
|
|
8675
|
-
treeViewId:
|
|
8676
|
+
treeViewId: _ == null ? void 0 : _.view_id,
|
|
8676
8677
|
model: n
|
|
8677
8678
|
});
|
|
8678
|
-
}, [n,
|
|
8679
|
+
}, [n, _ == null ? void 0 : _.view_id, W]), {
|
|
8679
8680
|
loading: ue,
|
|
8680
8681
|
getColumnState: De,
|
|
8681
8682
|
updateColumnState: Ve
|
|
@@ -8736,15 +8737,15 @@ function Og(t, e) {
|
|
|
8736
8737
|
ve == null || ve(ae), Je = Or(ye);
|
|
8737
8738
|
}
|
|
8738
8739
|
v.current = !0;
|
|
8739
|
-
const Yt = ne ? a : Ae, _t = (
|
|
8740
|
+
const Yt = ne ? a : Ae, _t = (_ == null ? void 0 : _.fields_in_conditions) !== void 0, Zn = dr({
|
|
8740
8741
|
treeOoui: me,
|
|
8741
8742
|
hasFunctionFieldsToParseConditions: _t && Ye()
|
|
8742
|
-
}), { results: Mt, attrsEvaluated: io } = await
|
|
8743
|
+
}), { results: Mt, attrsEvaluated: io } = await E({
|
|
8743
8744
|
params: Yt,
|
|
8744
8745
|
limit: _e - fe,
|
|
8745
8746
|
offset: fe,
|
|
8746
8747
|
model: n,
|
|
8747
|
-
fields:
|
|
8748
|
+
fields: _.field_parent ? { ..._.fields, [_.field_parent]: {} } : _.fields,
|
|
8748
8749
|
context: d,
|
|
8749
8750
|
attrs: Zn,
|
|
8750
8751
|
order: Je,
|
|
@@ -8785,12 +8786,12 @@ function Og(t, e) {
|
|
|
8785
8786
|
te,
|
|
8786
8787
|
Y,
|
|
8787
8788
|
me,
|
|
8788
|
-
|
|
8789
|
+
_,
|
|
8789
8790
|
He,
|
|
8790
8791
|
Ye,
|
|
8791
8792
|
D,
|
|
8792
8793
|
Ze,
|
|
8793
|
-
|
|
8794
|
+
E
|
|
8794
8795
|
]
|
|
8795
8796
|
), Ie = O(
|
|
8796
8797
|
(fe) => {
|
|
@@ -8958,7 +8959,7 @@ function Og(t, e) {
|
|
|
8958
8959
|
]);
|
|
8959
8960
|
Ht(e, () => ({
|
|
8960
8961
|
refreshResults: Qt,
|
|
8961
|
-
getFields: () =>
|
|
8962
|
+
getFields: () => _ == null ? void 0 : _.fields
|
|
8962
8963
|
}));
|
|
8963
8964
|
const pn = re(
|
|
8964
8965
|
() => ({
|
|
@@ -8969,10 +8970,10 @@ function Og(t, e) {
|
|
|
8969
8970
|
[F, l]
|
|
8970
8971
|
), sn = re(
|
|
8971
8972
|
() => ({
|
|
8972
|
-
fields: { ...M == null ? void 0 : M.fields, ...
|
|
8973
|
+
fields: { ...M == null ? void 0 : M.fields, ..._ == null ? void 0 : _.fields },
|
|
8973
8974
|
searchFields: Ln([
|
|
8974
8975
|
M == null ? void 0 : M.search_fields,
|
|
8975
|
-
|
|
8976
|
+
_ == null ? void 0 : _.search_fields
|
|
8976
8977
|
]),
|
|
8977
8978
|
showLimitOptions: !1,
|
|
8978
8979
|
limit: 0,
|
|
@@ -8984,8 +8985,8 @@ function Og(t, e) {
|
|
|
8984
8985
|
[
|
|
8985
8986
|
M == null ? void 0 : M.fields,
|
|
8986
8987
|
M == null ? void 0 : M.search_fields,
|
|
8987
|
-
|
|
8988
|
-
|
|
8988
|
+
_ == null ? void 0 : _.fields,
|
|
8989
|
+
_ == null ? void 0 : _.search_fields,
|
|
8989
8990
|
Q
|
|
8990
8991
|
]
|
|
8991
8992
|
), mn = O(() => {
|
|
@@ -9010,10 +9011,10 @@ function Og(t, e) {
|
|
|
9010
9011
|
), hn = re(
|
|
9011
9012
|
() => ({
|
|
9012
9013
|
isOpen: N,
|
|
9013
|
-
fields: { ...M == null ? void 0 : M.fields, ...
|
|
9014
|
+
fields: { ...M == null ? void 0 : M.fields, ..._ == null ? void 0 : _.fields },
|
|
9014
9015
|
searchFields: Ln([
|
|
9015
9016
|
M == null ? void 0 : M.search_fields,
|
|
9016
|
-
|
|
9017
|
+
_ == null ? void 0 : _.search_fields
|
|
9017
9018
|
]),
|
|
9018
9019
|
searchValues: Q,
|
|
9019
9020
|
currentModel: n,
|
|
@@ -9024,8 +9025,8 @@ function Og(t, e) {
|
|
|
9024
9025
|
N,
|
|
9025
9026
|
M == null ? void 0 : M.fields,
|
|
9026
9027
|
M == null ? void 0 : M.search_fields,
|
|
9027
|
-
|
|
9028
|
-
|
|
9028
|
+
_ == null ? void 0 : _.fields,
|
|
9029
|
+
_ == null ? void 0 : _.search_fields,
|
|
9029
9030
|
Q,
|
|
9030
9031
|
n,
|
|
9031
9032
|
d,
|
|
@@ -9049,7 +9050,7 @@ function Og(t, e) {
|
|
|
9049
9050
|
Qt
|
|
9050
9051
|
]
|
|
9051
9052
|
), Ke = ne && x && w !== void 0 && w !== null && w === Ct;
|
|
9052
|
-
return /* @__PURE__ */
|
|
9053
|
+
return /* @__PURE__ */ L(jn, { children: [
|
|
9053
9054
|
p === "top" && /* @__PURE__ */ s(
|
|
9054
9055
|
oo,
|
|
9055
9056
|
{
|
|
@@ -9128,7 +9129,7 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9128
9129
|
return null;
|
|
9129
9130
|
const d = async (p) => {
|
|
9130
9131
|
p.preventDefault(), p.stopPropagation(), a(!0), await r(), a(!1);
|
|
9131
|
-
}, f = /* @__PURE__ */
|
|
9132
|
+
}, f = /* @__PURE__ */ L("span", { children: [
|
|
9132
9133
|
c.recordsSelected.replace(
|
|
9133
9134
|
"{numberOfSelectedRows}",
|
|
9134
9135
|
t.toString()
|
|
@@ -9168,21 +9169,21 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9168
9169
|
context: x,
|
|
9169
9170
|
readonly: D,
|
|
9170
9171
|
onSelectAllRecords: S
|
|
9171
|
-
} = t, P = Z(null), [F, $] = T([]), R = Z(!1), [
|
|
9172
|
+
} = t, P = Z(null), [F, $] = T([]), R = Z(!1), [E, I] = T(), { t: A } = we(), k = Z(r), _ = pe(
|
|
9172
9173
|
It
|
|
9173
|
-
), { title: M = void 0, setTitle: W = void 0 } = (C ?
|
|
9174
|
+
), { title: M = void 0, setTitle: W = void 0 } = (C ? _ : {}) || {}, V = Lt(
|
|
9174
9175
|
wt.FEATURE_MANY2ONE_SORT
|
|
9175
9176
|
), N = re(() => {
|
|
9176
|
-
if (
|
|
9177
|
+
if (E)
|
|
9177
9178
|
return ds(
|
|
9178
|
-
|
|
9179
|
+
E,
|
|
9179
9180
|
{
|
|
9180
9181
|
...Is
|
|
9181
9182
|
},
|
|
9182
9183
|
x,
|
|
9183
9184
|
V
|
|
9184
9185
|
);
|
|
9185
|
-
}, [
|
|
9186
|
+
}, [E, x, V]);
|
|
9186
9187
|
Ht(e, () => ({
|
|
9187
9188
|
unselectAll: () => {
|
|
9188
9189
|
var q;
|
|
@@ -9192,10 +9193,10 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9192
9193
|
const q = en(i);
|
|
9193
9194
|
I(q), q.string && M !== q.string && (W == null || W(q.string));
|
|
9194
9195
|
}, [i, M]), ce(() => {
|
|
9195
|
-
if (!
|
|
9196
|
+
if (!E)
|
|
9196
9197
|
return;
|
|
9197
9198
|
R.current = !1;
|
|
9198
|
-
const q = cn(
|
|
9199
|
+
const q = cn(E, a);
|
|
9199
9200
|
$(q);
|
|
9200
9201
|
}, [a]), ce(() => {
|
|
9201
9202
|
k.current = r;
|
|
@@ -9206,7 +9207,7 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9206
9207
|
const q = F == null ? void 0 : F.filter(
|
|
9207
9208
|
(oe) => u && u.includes(oe.id)
|
|
9208
9209
|
).length;
|
|
9209
|
-
return c ? null : o === void 0 ? /* @__PURE__ */ s(nt, { className: "pb-4" }) : /* @__PURE__ */
|
|
9210
|
+
return c ? null : o === void 0 ? /* @__PURE__ */ s(nt, { className: "pb-4" }) : /* @__PURE__ */ L(Ge, { align: "bottom", className: "pb-4", children: [
|
|
9210
9211
|
/* @__PURE__ */ s(Oe, { span: S ? 8 : 12, children: /* @__PURE__ */ s(
|
|
9211
9212
|
Tc,
|
|
9212
9213
|
{
|
|
@@ -9241,9 +9242,9 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9241
9242
|
o,
|
|
9242
9243
|
i.isExpandable
|
|
9243
9244
|
]), z = re(() => {
|
|
9244
|
-
if (!
|
|
9245
|
+
if (!E)
|
|
9245
9246
|
return null;
|
|
9246
|
-
const q =
|
|
9247
|
+
const q = E.columns.filter((G) => G.sum !== void 0).map((G) => ({ label: G.sum, field: G.id }));
|
|
9247
9248
|
if (!q || q.length === 0)
|
|
9248
9249
|
return null;
|
|
9249
9250
|
const oe = [], se = (u == null ? void 0 : u.length) > 0 ? F.filter((G) => u.includes(G.id)) : F;
|
|
@@ -9251,11 +9252,11 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
|
|
|
9251
9252
|
const le = se.reduce((te, Y) => Y[G.field] && !isNaN(Y[G.field]) ? te + Y[G.field] : te, 0);
|
|
9252
9253
|
oe.push(`${G.label}: ${Math.round(le * 100) / 100}`);
|
|
9253
9254
|
}), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: oe.join(", ") });
|
|
9254
|
-
}, [F, u,
|
|
9255
|
-
if (
|
|
9255
|
+
}, [F, u, E]), K = re(() => {
|
|
9256
|
+
if (E !== null && N && N.length > 0)
|
|
9256
9257
|
return Dg(N, F, 600);
|
|
9257
|
-
}, [N, F,
|
|
9258
|
-
return
|
|
9258
|
+
}, [N, F, E]), Q = re(() => m && (E != null && E.columns.some((q) => q.sum !== void 0)) ? m - 30 : m, [m, E == null ? void 0 : E.columns]);
|
|
9259
|
+
return E === null || !K || ((de = K == null ? void 0 : K.columns) == null ? void 0 : de.length) === 0 ? /* @__PURE__ */ s(nt, { style: { padding: "2rem" } }) : /* @__PURE__ */ L(Ir, { children: [
|
|
9259
9260
|
B,
|
|
9260
9261
|
/* @__PURE__ */ s(
|
|
9261
9262
|
Sd,
|
|
@@ -9320,13 +9321,13 @@ const Wl = (t) => {
|
|
|
9320
9321
|
searchParams: D = [],
|
|
9321
9322
|
setSearchValues: S,
|
|
9322
9323
|
clearSelection: P
|
|
9323
|
-
} = t, [F, $] = T(!1), [R,
|
|
9324
|
+
} = t, [F, $] = T(!1), [R, E] = T(!1), [I, A] = T(), [k, _] = T(1), [M, W] = T(0), [V, N] = T(), [U, j] = T([]), [ee, B] = T(void 0), [z, K] = T(void 0), Q = Z(C || Ct), de = Z([]), q = O(
|
|
9324
9325
|
(ie) => {
|
|
9325
9326
|
v == null || v([...ie]), j([...ie]);
|
|
9326
9327
|
},
|
|
9327
9328
|
[v]
|
|
9328
9329
|
), oe = O(() => y || U, [y, U]), se = O(async () => {
|
|
9329
|
-
const ie = await
|
|
9330
|
+
const ie = await H.getHandler().nameSearch({
|
|
9330
9331
|
model: e,
|
|
9331
9332
|
payload: l,
|
|
9332
9333
|
limit: Q.current,
|
|
@@ -9336,7 +9337,7 @@ const Wl = (t) => {
|
|
|
9336
9337
|
if (N(ie.length), f == null || f(ie.length), ie.length > 0) {
|
|
9337
9338
|
const Te = ie.map((et) => et == null ? void 0 : et[0]), { colors: Ee, status: ke } = en(u), $e = {};
|
|
9338
9339
|
Ee && ($e.colors = Ee), ke && ($e.status = ke);
|
|
9339
|
-
const me = await
|
|
9340
|
+
const me = await H.getHandler().readEvalUiObjects({
|
|
9340
9341
|
model: e,
|
|
9341
9342
|
ids: Te,
|
|
9342
9343
|
arch: u == null ? void 0 : u.arch,
|
|
@@ -9370,7 +9371,7 @@ const Wl = (t) => {
|
|
|
9370
9371
|
async (ie) => {
|
|
9371
9372
|
const { params: Te, newOffset: Ee } = ie || {}, ke = nn(Te || D, b), { colors: $e, status: me } = en(u), qe = {};
|
|
9372
9373
|
$e && (qe.colors = $e), me && (qe.status = me);
|
|
9373
|
-
const { totalItems: st, results: Ze, attrsEvaluated: et } = await
|
|
9374
|
+
const { totalItems: st, results: Ze, attrsEvaluated: et } = await H.getHandler().searchForTree({
|
|
9374
9375
|
params: ke,
|
|
9375
9376
|
limit: Q.current,
|
|
9376
9377
|
offset: Ee || M,
|
|
@@ -9418,7 +9419,7 @@ const Wl = (t) => {
|
|
|
9418
9419
|
} catch (Te) {
|
|
9419
9420
|
A(typeof Te == "string" ? Te : Te.message), $(!1);
|
|
9420
9421
|
} finally {
|
|
9421
|
-
r == null || r([]),
|
|
9422
|
+
r == null || r([]), E(!1), a == null || a(!1);
|
|
9422
9423
|
}
|
|
9423
9424
|
},
|
|
9424
9425
|
[
|
|
@@ -9453,7 +9454,7 @@ const Wl = (t) => {
|
|
|
9453
9454
|
), Y = O(
|
|
9454
9455
|
(ie) => {
|
|
9455
9456
|
const { params: Te, searchValues: Ee, limit: ke, offset: $e } = ie;
|
|
9456
|
-
F || (n == null || n(void 0), r == null || r([]), S == null || S(Ee), o == null || o(Te), i == null || i(!1),
|
|
9457
|
+
F || (n == null || n(void 0), r == null || r([]), S == null || S(Ee), o == null || o(Te), i == null || i(!1), E(!0), A(void 0), _(1), ke && (Q.current = ke, x == null || x(ke)), $e && W($e), le({
|
|
9457
9458
|
params: Te,
|
|
9458
9459
|
newOffset: $e
|
|
9459
9460
|
}));
|
|
@@ -9470,11 +9471,11 @@ const Wl = (t) => {
|
|
|
9470
9471
|
]
|
|
9471
9472
|
), ge = O(
|
|
9472
9473
|
(ie) => {
|
|
9473
|
-
$(!0),
|
|
9474
|
+
$(!0), _(ie), W((ie - 1) * C);
|
|
9474
9475
|
},
|
|
9475
|
-
[$, C, W,
|
|
9476
|
+
[$, C, W, _]
|
|
9476
9477
|
), be = O(() => {
|
|
9477
|
-
F || (n == null || n(void 0), o == null || o([]), S == null || S({}), A(void 0), W(0),
|
|
9478
|
+
F || (n == null || n(void 0), o == null || o([]), S == null || S({}), A(void 0), W(0), _(1), x == null || x(C || Ct));
|
|
9478
9479
|
}, [
|
|
9479
9480
|
F,
|
|
9480
9481
|
n,
|
|
@@ -9484,7 +9485,7 @@ const Wl = (t) => {
|
|
|
9484
9485
|
C
|
|
9485
9486
|
]), ve = O(
|
|
9486
9487
|
async (ie) => {
|
|
9487
|
-
const Te = ie[(u == null ? void 0 : u.field_parent) || "child_id"], Ee = await
|
|
9488
|
+
const Te = ie[(u == null ? void 0 : u.field_parent) || "child_id"], Ee = await H.getHandler().readObjects({
|
|
9488
9489
|
model: e,
|
|
9489
9490
|
ids: Te,
|
|
9490
9491
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
@@ -9493,7 +9494,7 @@ const Wl = (t) => {
|
|
|
9493
9494
|
return q([...oe(), ...Ee]), cn(en(u), Ee);
|
|
9494
9495
|
},
|
|
9495
9496
|
[u, e, d, oe, q]
|
|
9496
|
-
), ne = O(async () => await
|
|
9497
|
+
), ne = O(async () => await H.getHandler().searchAllIds({
|
|
9497
9498
|
params: nn(D, b),
|
|
9498
9499
|
model: e,
|
|
9499
9500
|
context: d,
|
|
@@ -9533,9 +9534,9 @@ function Mg(t, e) {
|
|
|
9533
9534
|
rootTree: f = !1,
|
|
9534
9535
|
parentContext: u = {},
|
|
9535
9536
|
onChangeSelectedRowKeys: p
|
|
9536
|
-
} = t, [m, g] = T(!1), [h, v] = T(!1), y = Z(!1), b = Z(null), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R,
|
|
9537
|
+
} = t, [m, g] = T(!1), [h, v] = T(!1), y = Z(!1), b = Z(null), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R, E] = T(200), I = Z(), { height: A } = Jr(), k = pe(
|
|
9537
9538
|
Sn
|
|
9538
|
-
), { processAction:
|
|
9539
|
+
), { processAction: _ } = k || {}, M = pe(
|
|
9539
9540
|
It
|
|
9540
9541
|
), {
|
|
9541
9542
|
setResults: W = void 0,
|
|
@@ -9626,13 +9627,13 @@ function Mg(t, e) {
|
|
|
9626
9627
|
}, rt = async () => {
|
|
9627
9628
|
C(n);
|
|
9628
9629
|
let Ie = r;
|
|
9629
|
-
r || (Ie = await
|
|
9630
|
+
r || (Ie = await H.getHandler().getView({
|
|
9630
9631
|
model: n,
|
|
9631
9632
|
type: "form",
|
|
9632
9633
|
context: u
|
|
9633
9634
|
}));
|
|
9634
9635
|
let at = o;
|
|
9635
|
-
o || (at = await
|
|
9636
|
+
o || (at = await H.getHandler().getView({
|
|
9636
9637
|
model: n,
|
|
9637
9638
|
type: "tree",
|
|
9638
9639
|
context: u
|
|
@@ -9649,13 +9650,13 @@ function Mg(t, e) {
|
|
|
9649
9650
|
), Ce = O(
|
|
9650
9651
|
async (Ie) => {
|
|
9651
9652
|
const { id: at } = Ie;
|
|
9652
|
-
I.current || (I.current = await
|
|
9653
|
+
I.current || (I.current = await H.getHandler().treeButOpen({
|
|
9653
9654
|
id: x.view_id,
|
|
9654
9655
|
model: w,
|
|
9655
9656
|
context: u
|
|
9656
9657
|
}));
|
|
9657
9658
|
const Ut = I.current[0][2];
|
|
9658
|
-
await (
|
|
9659
|
+
await (_ == null ? void 0 : _({
|
|
9659
9660
|
actionData: Ut,
|
|
9660
9661
|
fields: x.fields,
|
|
9661
9662
|
values: {
|
|
@@ -9665,7 +9666,7 @@ function Mg(t, e) {
|
|
|
9665
9666
|
context: u
|
|
9666
9667
|
}));
|
|
9667
9668
|
},
|
|
9668
|
-
[w, u,
|
|
9669
|
+
[w, u, _, x]
|
|
9669
9670
|
), ue = O(
|
|
9670
9671
|
async (Ie) => {
|
|
9671
9672
|
const { id: at } = Ie;
|
|
@@ -9698,7 +9699,7 @@ function Mg(t, e) {
|
|
|
9698
9699
|
}, [Pe, p, ee]), Ve = re(() => x != null && x.isExpandable ? A - 160 : A - (R + 240), [A, R, x == null ? void 0 : x.isExpandable]), Ae = re(
|
|
9699
9700
|
() => j == null ? void 0 : j.map((Ie) => Ie.id),
|
|
9700
9701
|
[j]
|
|
9701
|
-
), Tt = O(() => !x || !S ? null : /* @__PURE__ */
|
|
9702
|
+
), Tt = O(() => !x || !S ? null : /* @__PURE__ */ L(he, { children: [
|
|
9702
9703
|
/* @__PURE__ */ s(
|
|
9703
9704
|
oo,
|
|
9704
9705
|
{
|
|
@@ -9713,7 +9714,7 @@ function Mg(t, e) {
|
|
|
9713
9714
|
isSearching: ke,
|
|
9714
9715
|
onSubmit: ne,
|
|
9715
9716
|
onLimitChange: J,
|
|
9716
|
-
setSearchFilterHeight:
|
|
9717
|
+
setSearchFilterHeight: E,
|
|
9717
9718
|
searchError: $e,
|
|
9718
9719
|
searchVisible: K,
|
|
9719
9720
|
searchValues: le
|
|
@@ -9809,11 +9810,11 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9809
9810
|
setSearchValues: F,
|
|
9810
9811
|
searchTreeNameSearch: $,
|
|
9811
9812
|
setSearchTreeNameSearch: R,
|
|
9812
|
-
setResults:
|
|
9813
|
+
setResults: E,
|
|
9813
9814
|
results: I,
|
|
9814
9815
|
setSearchQuery: A,
|
|
9815
9816
|
setTotalItems: k,
|
|
9816
|
-
isActive:
|
|
9817
|
+
isActive: _,
|
|
9817
9818
|
currentPage: M,
|
|
9818
9819
|
setCurrentPage: W,
|
|
9819
9820
|
order: V,
|
|
@@ -9821,7 +9822,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9821
9822
|
limit: U,
|
|
9822
9823
|
setLimit: j
|
|
9823
9824
|
} = Ol({ useLocalState: !i }), { treeMaxLimit: ee } = Xt(), { setCurrentSavedSearch: B } = jt(), z = Math.min(U, ee), [K, Q] = T(!0), [de, q] = T(), [oe, se] = T([]), [G, le] = T(!1), te = a || $, Y = Z(te), ge = Z(P), be = Z(g), ve = Z(), ne = Z([]), ie = Z(!1), Te = (r == null ? void 0 : r.fields_in_conditions) !== void 0, Ee = re(() => Ja({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), [ke, $e] = Re(
|
|
9824
|
-
|
|
9825
|
+
H.getHandler().parseConditions
|
|
9825
9826
|
), {
|
|
9826
9827
|
fetchColumnState: me,
|
|
9827
9828
|
loading: qe,
|
|
@@ -9856,7 +9857,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9856
9857
|
treeView: r,
|
|
9857
9858
|
tableRef: l,
|
|
9858
9859
|
context: d,
|
|
9859
|
-
isActive:
|
|
9860
|
+
isActive: _,
|
|
9860
9861
|
onResultsUpdated: et,
|
|
9861
9862
|
treeOoui: n,
|
|
9862
9863
|
updateAttributes: He,
|
|
@@ -9867,17 +9868,17 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9867
9868
|
autorefreshableFields: n == null ? void 0 : n.autorefreshableFields,
|
|
9868
9869
|
treeView: r,
|
|
9869
9870
|
context: d,
|
|
9870
|
-
isActive:
|
|
9871
|
+
isActive: _,
|
|
9871
9872
|
treeOoui: n,
|
|
9872
9873
|
updateAttributes: He,
|
|
9873
9874
|
results: I,
|
|
9874
9875
|
onRecordsUpdated: J
|
|
9875
9876
|
}), { showErrorNotification: ue } = yt(), [De, Ve] = Re(
|
|
9876
|
-
|
|
9877
|
+
H.getHandler().searchCount
|
|
9877
9878
|
), [Ae, Tt] = Re(
|
|
9878
|
-
|
|
9879
|
+
H.getHandler().searchForTree
|
|
9879
9880
|
), [pt, Dt] = Re(
|
|
9880
|
-
|
|
9881
|
+
H.getHandler().searchAllIds
|
|
9881
9882
|
), Ie = re(
|
|
9882
9883
|
() => nn(P || [], c),
|
|
9883
9884
|
[c, P]
|
|
@@ -9982,7 +9983,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
9982
9983
|
params: Le,
|
|
9983
9984
|
name_search: te,
|
|
9984
9985
|
context: d
|
|
9985
|
-
}),
|
|
9986
|
+
}), E == null || E(fe), te ? (q(fe.length), k(fe.length), le(!0), Q(!1)) : le(!1), fe.length === 0) {
|
|
9986
9987
|
ne.current = [], q(0), k(0), se([]), m(!1);
|
|
9987
9988
|
return;
|
|
9988
9989
|
}
|
|
@@ -10011,7 +10012,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10011
10012
|
r,
|
|
10012
10013
|
d,
|
|
10013
10014
|
A,
|
|
10014
|
-
|
|
10015
|
+
E,
|
|
10015
10016
|
He,
|
|
10016
10017
|
Wt,
|
|
10017
10018
|
Ne,
|
|
@@ -10134,7 +10135,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10134
10135
|
(_t, [Zn, Mt]) => (Mt != null && Mt.is_function || (_t[Zn] = Mt), _t),
|
|
10135
10136
|
{}
|
|
10136
10137
|
));
|
|
10137
|
-
const fe = await
|
|
10138
|
+
const fe = await H.getHandler().readObjects({
|
|
10138
10139
|
model: o,
|
|
10139
10140
|
ids: Le,
|
|
10140
10141
|
fields: Ke,
|
|
@@ -10168,7 +10169,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10168
10169
|
]
|
|
10169
10170
|
);
|
|
10170
10171
|
return {
|
|
10171
|
-
isActive:
|
|
10172
|
+
isActive: _,
|
|
10172
10173
|
searchVisible: g,
|
|
10173
10174
|
searchValues: S,
|
|
10174
10175
|
selectedRowKeys: at,
|
|
@@ -10309,7 +10310,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10309
10310
|
onFetchChildrenForRecord: $,
|
|
10310
10311
|
childField: R
|
|
10311
10312
|
}) => {
|
|
10312
|
-
const
|
|
10313
|
+
const E = re(() => t.map((I) => ({
|
|
10313
10314
|
...I,
|
|
10314
10315
|
render: (A, k) => /* @__PURE__ */ s(
|
|
10315
10316
|
As,
|
|
@@ -10328,7 +10329,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
|
|
|
10328
10329
|
strings: n,
|
|
10329
10330
|
isLoading: r,
|
|
10330
10331
|
height: o,
|
|
10331
|
-
columns:
|
|
10332
|
+
columns: E,
|
|
10332
10333
|
dataSource: i,
|
|
10333
10334
|
onRowDoubleClick: a,
|
|
10334
10335
|
onRowSelectionChange: l,
|
|
@@ -10377,7 +10378,7 @@ const _o = (t) => {
|
|
|
10377
10378
|
const r = Z(), o = pe(
|
|
10378
10379
|
Sn
|
|
10379
10380
|
), { processAction: i } = o || {}, [a, l] = Re(
|
|
10380
|
-
|
|
10381
|
+
H.getHandler().treeButOpen
|
|
10381
10382
|
), { showErrorNotification: c } = yt();
|
|
10382
10383
|
return ce(() => () => {
|
|
10383
10384
|
l();
|
|
@@ -10443,11 +10444,11 @@ function jg(t, e) {
|
|
|
10443
10444
|
searchVisible: F,
|
|
10444
10445
|
searchValues: $,
|
|
10445
10446
|
selectedRowKeys: R,
|
|
10446
|
-
refresh:
|
|
10447
|
+
refresh: E,
|
|
10447
10448
|
onRowStatus: I,
|
|
10448
10449
|
onGetFirstVisibleRowIndex: A,
|
|
10449
10450
|
setTreeFirstVisibleRow: k,
|
|
10450
|
-
onRowHasBeenSelected:
|
|
10451
|
+
onRowHasBeenSelected: _,
|
|
10451
10452
|
onSearchFilterClear: M,
|
|
10452
10453
|
onSearchFilterSubmit: W,
|
|
10453
10454
|
onSideSearchFilterClose: V,
|
|
@@ -10493,7 +10494,7 @@ function jg(t, e) {
|
|
|
10493
10494
|
parentContext: d
|
|
10494
10495
|
}), me = _o((J) => {
|
|
10495
10496
|
y != null && y.isExpandable ? $e(J) : h(J);
|
|
10496
|
-
}), qe = _o(
|
|
10497
|
+
}), qe = _o(E), [st, Ze, et] = gs({
|
|
10497
10498
|
ooui: x,
|
|
10498
10499
|
model: n,
|
|
10499
10500
|
showEmptyValues: !0,
|
|
@@ -10503,7 +10504,7 @@ function jg(t, e) {
|
|
|
10503
10504
|
) : void 0
|
|
10504
10505
|
});
|
|
10505
10506
|
Ht(e, () => ({
|
|
10506
|
-
refreshResults:
|
|
10507
|
+
refreshResults: E,
|
|
10507
10508
|
getFields: () => y == null ? void 0 : y.fields
|
|
10508
10509
|
}));
|
|
10509
10510
|
const Se = re(() => et ? /* @__PURE__ */ s(ys, { aggregates: Ze, isLoading: st }) : null, [Ze, st, et]), tt = O(
|
|
@@ -10517,7 +10518,7 @@ function jg(t, e) {
|
|
|
10517
10518
|
}),
|
|
10518
10519
|
[C, l]
|
|
10519
10520
|
), Ye = Ee !== void 0 && Te, ze = Ye && j !== void 0 && j !== null && j === Ct, Pe = re(() => typeof j != "number" || isNaN(j) || j < 0 ? (B == null ? void 0 : B.length) || 0 : j || 0, [j, B]), Ne = re(() => (B == null ? void 0 : B.length) > 0 && (typeof j != "number" || isNaN(j) || j < 0) ? B == null ? void 0 : B.length : f ? Ct : te || $g, [B == null ? void 0 : B.length, j, f, te]), rt = y == null ? void 0 : y.isExpandable;
|
|
10520
|
-
return /* @__PURE__ */
|
|
10521
|
+
return /* @__PURE__ */ L(jn, { children: [
|
|
10521
10522
|
!rt && /* @__PURE__ */ s(
|
|
10522
10523
|
Vg,
|
|
10523
10524
|
{
|
|
@@ -10566,7 +10567,7 @@ function jg(t, e) {
|
|
|
10566
10567
|
availableHeight: C,
|
|
10567
10568
|
results: B,
|
|
10568
10569
|
handleRowDoubleClick: me,
|
|
10569
|
-
onRowHasBeenSelected:
|
|
10570
|
+
onRowHasBeenSelected: _,
|
|
10570
10571
|
updateColumnState: G,
|
|
10571
10572
|
getColumnState: se,
|
|
10572
10573
|
setTreeFirstVisibleRow: k,
|
|
@@ -10648,18 +10649,18 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10648
10649
|
currentSavedSearch: F,
|
|
10649
10650
|
setCurrentSavedSearch: $,
|
|
10650
10651
|
setSavedSearches: R,
|
|
10651
|
-
savedSearches:
|
|
10652
|
+
savedSearches: E,
|
|
10652
10653
|
setSearchVisible: I,
|
|
10653
10654
|
setSearchParams: A,
|
|
10654
10655
|
setSearchValues: k,
|
|
10655
|
-
searchParams:
|
|
10656
|
+
searchParams: _,
|
|
10656
10657
|
isActive: M
|
|
10657
10658
|
} = pe(It), { token: W } = Wg(), { t: V } = we(), N = Lt(
|
|
10658
10659
|
wt.FEATURE_SAVED_SEARCHES
|
|
10659
10660
|
), [U] = Re(
|
|
10660
|
-
|
|
10661
|
+
H.getHandler().searchAllIds
|
|
10661
10662
|
), [j] = Re(
|
|
10662
|
-
|
|
10663
|
+
H.getHandler().readEvalUiObjects
|
|
10663
10664
|
), ee = O(async () => {
|
|
10664
10665
|
if (!N || !r)
|
|
10665
10666
|
return R == null || R([]), $ == null || $(null), [];
|
|
@@ -10704,16 +10705,16 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10704
10705
|
ce(() => {
|
|
10705
10706
|
M && !B.current && N && ee(), B.current = M;
|
|
10706
10707
|
}, [M]), ce(() => {
|
|
10707
|
-
if (N &&
|
|
10708
|
-
const oe =
|
|
10709
|
-
(se) => zn(se.domain,
|
|
10708
|
+
if (N && E && E.length > 0 && _ && !F) {
|
|
10709
|
+
const oe = E.find(
|
|
10710
|
+
(se) => zn(se.domain, _)
|
|
10710
10711
|
);
|
|
10711
10712
|
oe && ($ == null || $(oe));
|
|
10712
10713
|
}
|
|
10713
10714
|
}, [
|
|
10714
10715
|
N,
|
|
10715
|
-
_,
|
|
10716
10716
|
E,
|
|
10717
|
+
_,
|
|
10717
10718
|
F,
|
|
10718
10719
|
$
|
|
10719
10720
|
]);
|
|
@@ -10750,7 +10751,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10750
10751
|
}, 100);
|
|
10751
10752
|
}, [$, A, k, n]), de = O(() => {
|
|
10752
10753
|
I == null || I(!0);
|
|
10753
|
-
}, [I]), q = re(() => F != null && F.name ? /* @__PURE__ */
|
|
10754
|
+
}, [I]), q = re(() => F != null && F.name ? /* @__PURE__ */ L(
|
|
10754
10755
|
"div",
|
|
10755
10756
|
{
|
|
10756
10757
|
style: {
|
|
@@ -10762,11 +10763,11 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10762
10763
|
/* @__PURE__ */ s(
|
|
10763
10764
|
Et,
|
|
10764
10765
|
{
|
|
10765
|
-
title: /* @__PURE__ */
|
|
10766
|
+
title: /* @__PURE__ */ L("div", { children: [
|
|
10766
10767
|
/* @__PURE__ */ s("div", { children: V("openSavedSearchInSidebar") }),
|
|
10767
10768
|
/* @__PURE__ */ s("div", { style: { fontWeight: "bold", marginTop: "2px" }, children: F.name })
|
|
10768
10769
|
] }),
|
|
10769
|
-
children: /* @__PURE__ */
|
|
10770
|
+
children: /* @__PURE__ */ L(
|
|
10770
10771
|
"div",
|
|
10771
10772
|
{
|
|
10772
10773
|
style: {
|
|
@@ -10833,7 +10834,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10833
10834
|
Q,
|
|
10834
10835
|
V
|
|
10835
10836
|
]);
|
|
10836
|
-
return e ? /* @__PURE__ */
|
|
10837
|
+
return e ? /* @__PURE__ */ L(jn, { children: [
|
|
10837
10838
|
/* @__PURE__ */ s(to, { showSummary: v !== "infinite", subtitle: q, children: /* @__PURE__ */ s(
|
|
10838
10839
|
Yf,
|
|
10839
10840
|
{
|
|
@@ -10920,11 +10921,11 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10920
10921
|
limit: F,
|
|
10921
10922
|
isActive: $,
|
|
10922
10923
|
initialSearchParams: R,
|
|
10923
|
-
initialCurrentPage:
|
|
10924
|
+
initialCurrentPage: E,
|
|
10924
10925
|
initialOrder: I,
|
|
10925
10926
|
permissions: A,
|
|
10926
10927
|
permissionsLoading: k,
|
|
10927
|
-
permissionsError:
|
|
10928
|
+
permissionsError: _
|
|
10928
10929
|
} = t, [M, W] = T(!1), [V, N] = T(!1), [U, j] = T(!1), [ee, B] = T(!0), [z, K] = T(!0), [Q, de] = T([]), [q, oe] = T(!1), [se, G] = T(
|
|
10929
10930
|
R || []
|
|
10930
10931
|
), [le, te] = T(!1), [Y, ge] = T(!0), [be, ve] = T(), ne = re(() => !i || i.length === 0 ? (n == null ? void 0 : n.fields) || {} : i.reduce((Ae, Tt) => ({ ...Ae, ...Tt.fields || {} }), {}), [i, n]), [ie, Te] = T(
|
|
@@ -10934,7 +10935,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
10934
10935
|
), [He, Ye] = T(
|
|
10935
10936
|
F !== void 0 ? F : Ct
|
|
10936
10937
|
), [ze, Pe] = T(r), [Ne, rt] = T(
|
|
10937
|
-
|
|
10938
|
+
E || 1
|
|
10938
10939
|
), [J, Ce] = T(null), [ue, De] = T([]);
|
|
10939
10940
|
ce(() => {
|
|
10940
10941
|
p && p.length > 0 && !m && (g == null || g(0), f == null || f(p[0].id));
|
|
@@ -11031,7 +11032,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11031
11032
|
setSavedSearches: De,
|
|
11032
11033
|
permissions: A,
|
|
11033
11034
|
permissionsLoading: k,
|
|
11034
|
-
permissionsError:
|
|
11035
|
+
permissionsError: _
|
|
11035
11036
|
},
|
|
11036
11037
|
children: e
|
|
11037
11038
|
}
|
|
@@ -11155,7 +11156,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11155
11156
|
viewData: d
|
|
11156
11157
|
} = t, [f, u] = T(!1), [p, m] = T(), g = pe(
|
|
11157
11158
|
It
|
|
11158
|
-
), { setGraphIsLoading: h = void 0 } = g || {}, [v] = Re(
|
|
11159
|
+
), { setGraphIsLoading: h = void 0 } = g || {}, [v] = Re(H.getHandler().getView);
|
|
11159
11160
|
Ht(e, () => ({
|
|
11160
11161
|
refresh: () => {
|
|
11161
11162
|
y();
|
|
@@ -11223,7 +11224,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11223
11224
|
}
|
|
11224
11225
|
}, Kn = $t(zg), Kg = (t) => {
|
|
11225
11226
|
const { model: e, domain: n = [], context: r = {}, view_id: o, manualIds: i } = t, [a, l] = T(!1), [c, d] = T(), [f, u] = T(), [p] = Re(
|
|
11226
|
-
|
|
11227
|
+
H.getHandler().readForView
|
|
11227
11228
|
), m = O(async () => {
|
|
11228
11229
|
l(!0), d(void 0), i && n.push(["id", "in", i]);
|
|
11229
11230
|
try {
|
|
@@ -11315,7 +11316,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11315
11316
|
tooltip: a,
|
|
11316
11317
|
card: l = !1
|
|
11317
11318
|
} = t, { token: c } = Xg(), d = Object.keys(i).length > 0;
|
|
11318
|
-
return /* @__PURE__ */
|
|
11319
|
+
return /* @__PURE__ */ L(
|
|
11319
11320
|
"div",
|
|
11320
11321
|
{
|
|
11321
11322
|
className: d ? "shadow-md" : void 0,
|
|
@@ -11329,7 +11330,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11329
11330
|
borderRadius: c.borderRadius
|
|
11330
11331
|
},
|
|
11331
11332
|
children: [
|
|
11332
|
-
/* @__PURE__ */
|
|
11333
|
+
/* @__PURE__ */ L(
|
|
11333
11334
|
Ge,
|
|
11334
11335
|
{
|
|
11335
11336
|
align: "middle",
|
|
@@ -11350,7 +11351,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11350
11351
|
cursor: d ? "grab" : void 0,
|
|
11351
11352
|
overflow: "hidden"
|
|
11352
11353
|
},
|
|
11353
|
-
children: a ? /* @__PURE__ */
|
|
11354
|
+
children: a ? /* @__PURE__ */ L(he, { children: [
|
|
11354
11355
|
/* @__PURE__ */ s(Et, { title: a, children: /* @__PURE__ */ s(Ur, { className: "pr-1 text-xs" }) }),
|
|
11355
11356
|
/* @__PURE__ */ s(Vi, { ellipsis: !0, children: e })
|
|
11356
11357
|
] }) : /* @__PURE__ */ s(
|
|
@@ -11389,7 +11390,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
|
|
|
11389
11390
|
o();
|
|
11390
11391
|
}, [e]);
|
|
11391
11392
|
async function o() {
|
|
11392
|
-
const i = await
|
|
11393
|
+
const i = await H.getHandler().search({
|
|
11393
11394
|
params: [],
|
|
11394
11395
|
model: e,
|
|
11395
11396
|
limit: 1
|
|
@@ -11407,10 +11408,10 @@ function Qg(t) {
|
|
|
11407
11408
|
domain: i = [],
|
|
11408
11409
|
visible: a = !0,
|
|
11409
11410
|
parentContext: l = {}
|
|
11410
|
-
} = t, [c, d] = T(!1), [f, u] = T(!1), [p, m] = T(), [g, h] = T(), [v, y] = T(), [b, w] = T(1), [C, x] = T(0), D = Z(Ct), S = Z([]), [P, F] = T(0), [$, R] = T([]), [
|
|
11411
|
+
} = t, [c, d] = T(!1), [f, u] = T(!1), [p, m] = T(), [g, h] = T(), [v, y] = T(), [b, w] = T(1), [C, x] = T(0), D = Z(Ct), S = Z([]), [P, F] = T(0), [$, R] = T([]), [E, I] = T(void 0), [A, k] = T(), [_, M] = T(), [W, V] = T(), [N, U] = T(!1), j = Z([]), ee = (se) => {
|
|
11411
11412
|
U(!0), w(se), x((se - 1) * D.current);
|
|
11412
11413
|
}, B = async () => {
|
|
11413
|
-
const se = j.current.length > 0 ? j.current : i, G = nn(S.current, se), { colors: le } = en(g), { totalItems: te, results: Y, attrsEvaluated: ge } = await
|
|
11414
|
+
const se = j.current.length > 0 ? j.current : i, G = nn(S.current, se), { colors: le } = en(g), { totalItems: te, results: Y, attrsEvaluated: ge } = await H.getHandler().searchForTree({
|
|
11414
11415
|
params: G,
|
|
11415
11416
|
limit: D.current,
|
|
11416
11417
|
offset: C,
|
|
@@ -11448,20 +11449,20 @@ function Qg(t) {
|
|
|
11448
11449
|
d(!1);
|
|
11449
11450
|
}
|
|
11450
11451
|
}, Q = async () => {
|
|
11451
|
-
const se = await
|
|
11452
|
+
const se = await H.getHandler().getViewsForAction({
|
|
11452
11453
|
action: e,
|
|
11453
11454
|
context: l
|
|
11454
11455
|
});
|
|
11455
11456
|
j.current = se.domain, y(se.views.get("form")), h(se.views.get("tree")), m(se.model), D.current = se.limit;
|
|
11456
11457
|
}, de = async () => {
|
|
11457
11458
|
m(n);
|
|
11458
|
-
const se = await
|
|
11459
|
+
const se = await H.getHandler().getView({
|
|
11459
11460
|
model: n,
|
|
11460
11461
|
type: "form",
|
|
11461
11462
|
context: l
|
|
11462
11463
|
});
|
|
11463
11464
|
y(se);
|
|
11464
|
-
const G = await
|
|
11465
|
+
const G = await H.getHandler().getView({
|
|
11465
11466
|
model: n,
|
|
11466
11467
|
type: "tree",
|
|
11467
11468
|
id: r,
|
|
@@ -11479,8 +11480,8 @@ function Qg(t) {
|
|
|
11479
11480
|
model: p,
|
|
11480
11481
|
treeView: g
|
|
11481
11482
|
});
|
|
11482
|
-
}, oe = () => !g || !v ? null : (
|
|
11483
|
-
|
|
11483
|
+
}, oe = () => !g || !v ? null : (_ && console.error(_), /* @__PURE__ */ L("div", { style: { overflowY: "scroll" }, children: [
|
|
11484
|
+
_ && /* @__PURE__ */ s(Rt, { className: "mt-10", message: _, type: "error", banner: !0 }),
|
|
11484
11485
|
/* @__PURE__ */ s(
|
|
11485
11486
|
xr,
|
|
11486
11487
|
{
|
|
@@ -11493,7 +11494,7 @@ function Qg(t) {
|
|
|
11493
11494
|
onRequestPageChange: ee,
|
|
11494
11495
|
loading: N,
|
|
11495
11496
|
onRowClicked: q,
|
|
11496
|
-
colorsForResults:
|
|
11497
|
+
colorsForResults: E,
|
|
11497
11498
|
sorter: A,
|
|
11498
11499
|
onChangeSort: (se) => {
|
|
11499
11500
|
k == null || k(se);
|
|
@@ -11516,7 +11517,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11516
11517
|
}, ty = (t) => {
|
|
11517
11518
|
var y;
|
|
11518
11519
|
const { token: e } = Zg(), { ooui: n, value: r } = t, { locale: o } = we(), [i, a] = T(n.icon), [l, c] = T(n.color), [d, f] = Re(
|
|
11519
|
-
|
|
11520
|
+
H.getHandler().parseCondition
|
|
11520
11521
|
), u = ir(
|
|
11521
11522
|
bn.FEATURE_MANY2ONE_DISABLE_ARROW_MENU
|
|
11522
11523
|
);
|
|
@@ -11543,8 +11544,8 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11543
11544
|
return !1;
|
|
11544
11545
|
let b = !0;
|
|
11545
11546
|
return u === !0 && (b = !1), n.showMenu !== void 0 && (b = n.showMenu), b;
|
|
11546
|
-
}, [n, u]), m = /* @__PURE__ */
|
|
11547
|
-
/* @__PURE__ */
|
|
11547
|
+
}, [n, u]), m = /* @__PURE__ */ L(he, { children: [
|
|
11548
|
+
/* @__PURE__ */ L("span", { children: [
|
|
11548
11549
|
n.label,
|
|
11549
11550
|
" "
|
|
11550
11551
|
] }),
|
|
@@ -11569,7 +11570,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11569
11570
|
};
|
|
11570
11571
|
h = r ? dt(r).format(b[n.fieldType]) : " ";
|
|
11571
11572
|
}
|
|
11572
|
-
if (n.fieldType === "many2one" && r && ((y = n.raw_props) != null && y.relation) && (h = /* @__PURE__ */
|
|
11573
|
+
if (n.fieldType === "many2one" && r && ((y = n.raw_props) != null && y.relation) && (h = /* @__PURE__ */ L(ct, { children: [
|
|
11573
11574
|
h,
|
|
11574
11575
|
p && /* @__PURE__ */ s(so, { id: r[0], model: n.raw_props.relation })
|
|
11575
11576
|
] })), r && (n.fieldType === "float" || n.fieldType === "integer"))
|
|
@@ -11600,7 +11601,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11600
11601
|
}, [e, i, a]), f && f.message !== "active_id_not_found")
|
|
11601
11602
|
return /* @__PURE__ */ s(Pa, { error: f });
|
|
11602
11603
|
const { id: m, initialView: g, description: h } = l || {};
|
|
11603
|
-
return /* @__PURE__ */
|
|
11604
|
+
return /* @__PURE__ */ L(
|
|
11604
11605
|
Yl,
|
|
11605
11606
|
{
|
|
11606
11607
|
id: m,
|
|
@@ -11687,9 +11688,9 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11687
11688
|
return /* @__PURE__ */ s(We, { type: "array", ...t, children: /* @__PURE__ */ s(iy, { ooui: e }) });
|
|
11688
11689
|
}, iy = (t) => {
|
|
11689
11690
|
const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter(($) => $.operation !== "pendingRemove").map(($) => $.id), [a, l] = T([]), [c, d] = T(), [f, u] = T(!1), { relation: p, context: m, readOnly: g, field: h } = n, v = pe(Qe), { getContext: y } = v || {}, [b, w] = Re(
|
|
11690
|
-
|
|
11691
|
+
H.getHandler().evalDomain
|
|
11691
11692
|
), [C, x] = Re(
|
|
11692
|
-
|
|
11693
|
+
H.getHandler().search
|
|
11693
11694
|
);
|
|
11694
11695
|
ce(() => () => {
|
|
11695
11696
|
w(), x();
|
|
@@ -11717,7 +11718,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11717
11718
|
});
|
|
11718
11719
|
$ = [...$, ...I];
|
|
11719
11720
|
}
|
|
11720
|
-
const
|
|
11721
|
+
const E = (await C({
|
|
11721
11722
|
model: p,
|
|
11722
11723
|
params: $,
|
|
11723
11724
|
fieldsToRetrieve: [h],
|
|
@@ -11727,7 +11728,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11727
11728
|
let k = A;
|
|
11728
11729
|
return Array.isArray(A) && (k = A[1]), { label: k, value: I.id };
|
|
11729
11730
|
});
|
|
11730
|
-
l(
|
|
11731
|
+
l(E);
|
|
11731
11732
|
} catch (R) {
|
|
11732
11733
|
d(R);
|
|
11733
11734
|
} finally {
|
|
@@ -11738,22 +11739,22 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11738
11739
|
const R = o.map((I) => $.includes(I.id) ? I.operation === "pendingRemove" ? {
|
|
11739
11740
|
...I,
|
|
11740
11741
|
operation: "pendingLink"
|
|
11741
|
-
} : I : { id: I.id, operation: "pendingRemove" }),
|
|
11742
|
-
$.filter((I) => !
|
|
11742
|
+
} : I : { id: I.id, operation: "pendingRemove" }), E = R.map((I) => I.id);
|
|
11743
|
+
$.filter((I) => !E.includes(I)).forEach((I) => {
|
|
11743
11744
|
R.push({ id: I, operation: "pendingLink" });
|
|
11744
11745
|
}), D(R);
|
|
11745
11746
|
}, F = ($) => {
|
|
11746
|
-
const { label: R, closable:
|
|
11747
|
+
const { label: R, closable: E, onClose: I } = $, A = (M) => {
|
|
11747
11748
|
M.preventDefault(), M.stopPropagation();
|
|
11748
|
-
}, k = mr(R),
|
|
11749
|
+
}, k = mr(R), _ = k && Ea(k);
|
|
11749
11750
|
return /* @__PURE__ */ s(
|
|
11750
11751
|
Rs,
|
|
11751
11752
|
{
|
|
11752
11753
|
color: k,
|
|
11753
11754
|
onMouseDown: A,
|
|
11754
|
-
closable:
|
|
11755
|
+
closable: E,
|
|
11755
11756
|
onClose: I,
|
|
11756
|
-
closeIcon: /* @__PURE__ */ s("span", { style: { color:
|
|
11757
|
+
closeIcon: /* @__PURE__ */ s("span", { style: { color: _ && _.text }, children: "X" }),
|
|
11757
11758
|
children: R
|
|
11758
11759
|
}
|
|
11759
11760
|
);
|
|
@@ -11976,7 +11977,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
|
|
|
11976
11977
|
onAutorefreshableFieldsChange: a,
|
|
11977
11978
|
isActive: l
|
|
11978
11979
|
} = t, c = Z(null), [d, f] = T(!0), [u, p] = Re(
|
|
11979
|
-
|
|
11980
|
+
H.getHandler().readObjects
|
|
11980
11981
|
), m = Fs();
|
|
11981
11982
|
ce(() => {
|
|
11982
11983
|
l === !1 && h(), (l === void 0 || l === !0) && !m && h(), (l === void 0 || l === !0) && m && v();
|
|
@@ -12088,7 +12089,7 @@ function xy(t, e) {
|
|
|
12088
12089
|
forcedValues: D = {},
|
|
12089
12090
|
parentWidth: S,
|
|
12090
12091
|
onMustRefreshParent: P
|
|
12091
|
-
} = t, { t: F } = we(), [$, R] = T(!1), [
|
|
12092
|
+
} = t, { t: F } = we(), [$, R] = T(!1), [E, I] = T(), [A, k] = T(), [_] = Ot.useForm(), [M, W] = T(), [V, N] = T(), U = pe(Jl), [j, ee] = T(), [B, z] = T(!1), K = Z(), Q = Z({}), de = Z({}), q = Z(!1), oe = Z(!1), se = Z(!1), le = (S !== void 0 ? S : j) < wy, te = pe(Qe), { activeId: Y, getPlainValues: ge } = te || {}, be = Z(!1), ve = pe(
|
|
12092
12093
|
It
|
|
12093
12094
|
), {
|
|
12094
12095
|
setFormIsSaving: ne = void 0,
|
|
@@ -12139,16 +12140,16 @@ function xy(t, e) {
|
|
|
12139
12140
|
}), z(!1));
|
|
12140
12141
|
}, [B]), Ue(() => {
|
|
12141
12142
|
var X;
|
|
12142
|
-
if (
|
|
12143
|
-
const ae =
|
|
12143
|
+
if (E) {
|
|
12144
|
+
const ae = E;
|
|
12144
12145
|
ae.fields && Array.isArray(ae.fields) && rt(
|
|
12145
12146
|
((X = ae.fields) == null ? void 0 : X.map((ye) => ({
|
|
12146
12147
|
...ye,
|
|
12147
12148
|
type: ae.type || "error"
|
|
12148
12149
|
}))) || []
|
|
12149
|
-
), Se(
|
|
12150
|
+
), Se(E);
|
|
12150
12151
|
}
|
|
12151
|
-
}, [
|
|
12152
|
+
}, [E]);
|
|
12152
12153
|
const J = (X, ae, ye, xe) => {
|
|
12153
12154
|
ie == null || ie(!1), ne == null || ne(!1), i == null || i(X, ae, ye, xe), Te == null || Te(X), be.current && (P == null || P());
|
|
12154
12155
|
}, Ce = (X) => {
|
|
@@ -12197,7 +12198,7 @@ function xy(t, e) {
|
|
|
12197
12198
|
...et
|
|
12198
12199
|
}), [ue, Y, et]), Ut = async (X) => {
|
|
12199
12200
|
const ae = ue() ? A == null ? void 0 : A.context : {};
|
|
12200
|
-
return await
|
|
12201
|
+
return await H.getHandler().defaultGet({
|
|
12201
12202
|
model: n,
|
|
12202
12203
|
fields: X,
|
|
12203
12204
|
context: { ...y, ...ae },
|
|
@@ -12211,10 +12212,10 @@ function xy(t, e) {
|
|
|
12211
12212
|
})
|
|
12212
12213
|
).length !== 0, lt = O(
|
|
12213
12214
|
(X) => {
|
|
12214
|
-
const ae =
|
|
12215
|
+
const ae = _.getFieldsValue(!0);
|
|
12215
12216
|
return _n(ae, X);
|
|
12216
12217
|
},
|
|
12217
|
-
[
|
|
12218
|
+
[_]
|
|
12218
12219
|
), mt = O(() => {
|
|
12219
12220
|
const X = {
|
|
12220
12221
|
...lt(V),
|
|
@@ -12234,16 +12235,16 @@ function xy(t, e) {
|
|
|
12234
12235
|
]), Fn = (X, ae) => {
|
|
12235
12236
|
Vt({
|
|
12236
12237
|
values: {
|
|
12237
|
-
..._n(
|
|
12238
|
+
..._n(_.getFieldsValue(!0), V),
|
|
12238
12239
|
[X]: ae
|
|
12239
12240
|
},
|
|
12240
12241
|
fields: V,
|
|
12241
12242
|
reset: !1
|
|
12242
12243
|
});
|
|
12243
|
-
}, An = (X) =>
|
|
12244
|
+
}, An = (X) => _.getFieldsValue(!0)[X];
|
|
12244
12245
|
async function dn() {
|
|
12245
12246
|
try {
|
|
12246
|
-
return await
|
|
12247
|
+
return await _.validateFields(), !1;
|
|
12247
12248
|
} catch {
|
|
12248
12249
|
return !0;
|
|
12249
12250
|
}
|
|
@@ -12284,13 +12285,13 @@ function xy(t, e) {
|
|
|
12284
12285
|
}) : (xt == null || xt(), X(!0));
|
|
12285
12286
|
}), Qn = async () => {
|
|
12286
12287
|
if (l) {
|
|
12287
|
-
const X = await
|
|
12288
|
-
return (await
|
|
12288
|
+
const X = await H.getHandler().getActionStringForModel(n);
|
|
12289
|
+
return (await H.getHandler().getViewsForAction({
|
|
12289
12290
|
action: X,
|
|
12290
12291
|
context: y
|
|
12291
12292
|
})).views.get("form");
|
|
12292
12293
|
}
|
|
12293
|
-
return await
|
|
12294
|
+
return await H.getHandler().getView({
|
|
12294
12295
|
model: n,
|
|
12295
12296
|
type: "form",
|
|
12296
12297
|
context: y
|
|
@@ -12302,14 +12303,14 @@ function xy(t, e) {
|
|
|
12302
12303
|
reset: ye,
|
|
12303
12304
|
isDefaultGet: xe = !1
|
|
12304
12305
|
}) => {
|
|
12305
|
-
const ht = { ...ye ? {} :
|
|
12306
|
+
const ht = { ...ye ? {} : _.getFieldsValue(!0), ...X }, ao = _n(ht, ae), hc = Object.keys(ae).map((lo) => ({
|
|
12306
12307
|
name: lo,
|
|
12307
12308
|
touched: !1,
|
|
12308
12309
|
value: ao[lo] !== void 0 ? ao[lo] : void 0
|
|
12309
12310
|
}));
|
|
12310
|
-
xe || (de.current = ao),
|
|
12311
|
+
xe || (de.current = ao), _.setFields(hc);
|
|
12311
12312
|
},
|
|
12312
|
-
[
|
|
12313
|
+
[_]
|
|
12313
12314
|
), fn = async ({
|
|
12314
12315
|
fields: X,
|
|
12315
12316
|
arch: ae
|
|
@@ -12321,14 +12322,14 @@ function xy(t, e) {
|
|
|
12321
12322
|
fields: X,
|
|
12322
12323
|
values: {}
|
|
12323
12324
|
});
|
|
12324
|
-
if (ye = (await
|
|
12325
|
+
if (ye = (await H.getHandler().readObjects({
|
|
12325
12326
|
model: n,
|
|
12326
12327
|
ids: [ue()],
|
|
12327
12328
|
fields: gy(X, Me == null ? void 0 : Me.contextForFields),
|
|
12328
12329
|
context: y
|
|
12329
12330
|
}))[0], v)
|
|
12330
12331
|
return { values: ye, defaultGetCalled: xe };
|
|
12331
|
-
const ht = await
|
|
12332
|
+
const ht = await H.getHandler().search({
|
|
12332
12333
|
params: [
|
|
12333
12334
|
["res_model", "=", n],
|
|
12334
12335
|
["res_id", "=", ue()]
|
|
@@ -12349,7 +12350,7 @@ function xy(t, e) {
|
|
|
12349
12350
|
target: lt(V),
|
|
12350
12351
|
fields: V
|
|
12351
12352
|
});
|
|
12352
|
-
await
|
|
12353
|
+
await H.getHandler().update({
|
|
12353
12354
|
model: n,
|
|
12354
12355
|
id: ue(),
|
|
12355
12356
|
values: { ...ye, ...D },
|
|
@@ -12360,7 +12361,7 @@ function xy(t, e) {
|
|
|
12360
12361
|
}
|
|
12361
12362
|
}), Q.current = lt(V);
|
|
12362
12363
|
} else {
|
|
12363
|
-
const ye = lt(V), xe = await
|
|
12364
|
+
const ye = lt(V), xe = await H.getHandler().create({
|
|
12364
12365
|
model: n,
|
|
12365
12366
|
values: { ...ye, ...D },
|
|
12366
12367
|
fields: V,
|
|
@@ -12471,7 +12472,7 @@ function xy(t, e) {
|
|
|
12471
12472
|
"many2one"
|
|
12472
12473
|
]
|
|
12473
12474
|
}) && X !== !0)) {
|
|
12474
|
-
const xe = _n(
|
|
12475
|
+
const xe = _n(_.getFieldsValue(!0), V);
|
|
12475
12476
|
de.current = xe, c == null || c(xe), ie == null || ie(!0), Object.keys(xe).forEach((Me) => {
|
|
12476
12477
|
Pe(Me);
|
|
12477
12478
|
}), Le(ye);
|
|
@@ -12505,7 +12506,7 @@ function xy(t, e) {
|
|
|
12505
12506
|
},
|
|
12506
12507
|
parentValues: ge == null ? void 0 : ge(),
|
|
12507
12508
|
onChangeFieldActionArgs: ae.args
|
|
12508
|
-
}), xe = await
|
|
12509
|
+
}), xe = await H.getHandler().executeOnChange({
|
|
12509
12510
|
model: n,
|
|
12510
12511
|
action: ae.method,
|
|
12511
12512
|
ids: ue() ? [ue()] : [],
|
|
@@ -12563,7 +12564,7 @@ function xy(t, e) {
|
|
|
12563
12564
|
action: X,
|
|
12564
12565
|
context: ae
|
|
12565
12566
|
}) {
|
|
12566
|
-
const ye = await
|
|
12567
|
+
const ye = await H.getHandler().execute({
|
|
12567
12568
|
model: n,
|
|
12568
12569
|
action: X,
|
|
12569
12570
|
payload: [ue()],
|
|
@@ -12591,7 +12592,7 @@ function xy(t, e) {
|
|
|
12591
12592
|
await kt({ forceRefresh: !0 });
|
|
12592
12593
|
}
|
|
12593
12594
|
async function _e({ action: X }) {
|
|
12594
|
-
const ae = await
|
|
12595
|
+
const ae = await H.getHandler().executeWorkflow({
|
|
12595
12596
|
model: n,
|
|
12596
12597
|
action: X,
|
|
12597
12598
|
payload: ue()
|
|
@@ -12602,7 +12603,7 @@ function xy(t, e) {
|
|
|
12602
12603
|
action: X,
|
|
12603
12604
|
context: ae
|
|
12604
12605
|
}) {
|
|
12605
|
-
const ye = (await
|
|
12606
|
+
const ye = (await H.getHandler().readObjects({
|
|
12606
12607
|
model: "ir.actions.actions",
|
|
12607
12608
|
ids: [parseInt(X)],
|
|
12608
12609
|
context: y
|
|
@@ -12690,7 +12691,7 @@ function xy(t, e) {
|
|
|
12690
12691
|
xe && _t(!1), Se(Me);
|
|
12691
12692
|
}
|
|
12692
12693
|
}
|
|
12693
|
-
const io = () => !A && !
|
|
12694
|
+
const io = () => !A && !E ? /* @__PURE__ */ s(nt, {}) : !n && !g || !w ? null : /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s(
|
|
12694
12695
|
zd,
|
|
12695
12696
|
{
|
|
12696
12697
|
getValues: mt,
|
|
@@ -12718,7 +12719,7 @@ function xy(t, e) {
|
|
|
12718
12719
|
children: /* @__PURE__ */ s(
|
|
12719
12720
|
Ot,
|
|
12720
12721
|
{
|
|
12721
|
-
form:
|
|
12722
|
+
form: _,
|
|
12722
12723
|
onFieldsChange: () => {
|
|
12723
12724
|
Fe({ elementHasLostFocus: !1 });
|
|
12724
12725
|
},
|
|
@@ -12733,9 +12734,9 @@ function xy(t, e) {
|
|
|
12733
12734
|
}
|
|
12734
12735
|
)
|
|
12735
12736
|
}
|
|
12736
|
-
) }), Cr = () => /* @__PURE__ */
|
|
12737
|
+
) }), Cr = () => /* @__PURE__ */ L(he, { children: [
|
|
12737
12738
|
/* @__PURE__ */ s(Lr, {}),
|
|
12738
|
-
/* @__PURE__ */ s(Ge, { justify: "end", children: /* @__PURE__ */
|
|
12739
|
+
/* @__PURE__ */ s(Ge, { justify: "end", children: /* @__PURE__ */ L(ct, { children: [
|
|
12739
12740
|
/* @__PURE__ */ s(
|
|
12740
12741
|
je,
|
|
12741
12742
|
{
|
|
@@ -12770,7 +12771,7 @@ function xy(t, e) {
|
|
|
12770
12771
|
var ae;
|
|
12771
12772
|
ee((ae = X.bounds) == null ? void 0 : ae.width);
|
|
12772
12773
|
},
|
|
12773
|
-
children: ({ measureRef: X }) => /* @__PURE__ */
|
|
12774
|
+
children: ({ measureRef: X }) => /* @__PURE__ */ L("div", { className: "pb-2", ref: X, children: [
|
|
12774
12775
|
io(),
|
|
12775
12776
|
a && Cr()
|
|
12776
12777
|
] })
|
|
@@ -12792,7 +12793,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12792
12793
|
a && x();
|
|
12793
12794
|
}, [l, a]);
|
|
12794
12795
|
async function x() {
|
|
12795
|
-
const F = await
|
|
12796
|
+
const F = await H.getHandler().isShortcutFavorite({
|
|
12796
12797
|
action_id: y,
|
|
12797
12798
|
action_type: w,
|
|
12798
12799
|
view_id: C,
|
|
@@ -12802,22 +12803,22 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12802
12803
|
}
|
|
12803
12804
|
async function D() {
|
|
12804
12805
|
if (m && h)
|
|
12805
|
-
await
|
|
12806
|
+
await H.getHandler().removeFavourite({
|
|
12806
12807
|
shortcut_id: h
|
|
12807
12808
|
});
|
|
12808
12809
|
else {
|
|
12809
|
-
const { action_id: F, res_id: $, action_type: R, view_id:
|
|
12810
|
-
await
|
|
12810
|
+
const { action_id: F, res_id: $, action_type: R, view_id: E } = l;
|
|
12811
|
+
await H.getHandler().addFavourite({
|
|
12811
12812
|
action_id: F,
|
|
12812
12813
|
action_type: R,
|
|
12813
|
-
view_id:
|
|
12814
|
+
view_id: E,
|
|
12814
12815
|
res_id: $ || !1
|
|
12815
12816
|
});
|
|
12816
12817
|
}
|
|
12817
12818
|
g(!m);
|
|
12818
12819
|
}
|
|
12819
12820
|
function S() {
|
|
12820
|
-
return /* @__PURE__ */
|
|
12821
|
+
return /* @__PURE__ */ L(Ge, { align: "middle", children: [
|
|
12821
12822
|
/* @__PURE__ */ s(Oe, { children: /* @__PURE__ */ s(
|
|
12822
12823
|
je,
|
|
12823
12824
|
{
|
|
@@ -12906,7 +12907,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12906
12907
|
[x]
|
|
12907
12908
|
), R = O(() => {
|
|
12908
12909
|
d(!0);
|
|
12909
|
-
}, []),
|
|
12910
|
+
}, []), E = O(() => {
|
|
12910
12911
|
d(!1), S();
|
|
12911
12912
|
}, [S]), I = O(
|
|
12912
12913
|
(A) => {
|
|
@@ -12914,8 +12915,8 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12914
12915
|
},
|
|
12915
12916
|
[S, D]
|
|
12916
12917
|
);
|
|
12917
|
-
return /* @__PURE__ */
|
|
12918
|
-
/* @__PURE__ */
|
|
12918
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
12919
|
+
/* @__PURE__ */ L(
|
|
12919
12920
|
Ft,
|
|
12920
12921
|
{
|
|
12921
12922
|
title: v("search"),
|
|
@@ -12944,7 +12945,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12944
12945
|
}
|
|
12945
12946
|
),
|
|
12946
12947
|
/* @__PURE__ */ s(Lr, {}),
|
|
12947
|
-
/* @__PURE__ */ s(Ge, { justify: "end", children: /* @__PURE__ */
|
|
12948
|
+
/* @__PURE__ */ s(Ge, { justify: "end", children: /* @__PURE__ */ L(ct, { children: [
|
|
12948
12949
|
/* @__PURE__ */ s(
|
|
12949
12950
|
je,
|
|
12950
12951
|
{
|
|
@@ -12976,13 +12977,13 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
12976
12977
|
visible: c,
|
|
12977
12978
|
parentContext: a,
|
|
12978
12979
|
onSubmitSucceed: I,
|
|
12979
|
-
onCancel:
|
|
12980
|
+
onCancel: E
|
|
12980
12981
|
}
|
|
12981
12982
|
)
|
|
12982
12983
|
] });
|
|
12983
12984
|
}, Cy = () => {
|
|
12984
12985
|
const [t, e] = Re(
|
|
12985
|
-
|
|
12986
|
+
H.getHandler().checkPermission
|
|
12986
12987
|
);
|
|
12987
12988
|
return ce(() => () => {
|
|
12988
12989
|
e();
|
|
@@ -13059,8 +13060,8 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13059
13060
|
getFields: F,
|
|
13060
13061
|
getContext: $,
|
|
13061
13062
|
elementHasLostFocus: R,
|
|
13062
|
-
getAllHierarchyValues:
|
|
13063
|
-
} = S || {}, I = Z([]), [A, k] = T([]), { showErrorNotification:
|
|
13063
|
+
getAllHierarchyValues: E
|
|
13064
|
+
} = S || {}, I = Z([]), [A, k] = T([]), { showErrorNotification: _ } = yt(), { permissions: M } = Vr({
|
|
13064
13065
|
model: i,
|
|
13065
13066
|
permissions: ["create", "write"],
|
|
13066
13067
|
enabled: !0
|
|
@@ -13085,7 +13086,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13085
13086
|
if (I.current && I.current.length > 0)
|
|
13086
13087
|
K(D.current);
|
|
13087
13088
|
else {
|
|
13088
|
-
const Y = await
|
|
13089
|
+
const Y = await H.getHandler().nameSearch({
|
|
13089
13090
|
model: i,
|
|
13090
13091
|
payload: D.current,
|
|
13091
13092
|
context: { ...$ == null ? void 0 : $(), ...l }
|
|
@@ -13093,14 +13094,14 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13093
13094
|
Y.length === 1 ? (D.current = void 0, ee(Y[0])) : K(D.current);
|
|
13094
13095
|
}
|
|
13095
13096
|
} catch (Y) {
|
|
13096
|
-
|
|
13097
|
+
_(Y);
|
|
13097
13098
|
} finally {
|
|
13098
13099
|
v(!1);
|
|
13099
13100
|
}
|
|
13100
13101
|
}
|
|
13101
13102
|
}, K = async (Y) => {
|
|
13102
13103
|
if (await de(), I.current && I.current.length > 0) {
|
|
13103
|
-
const ge = await
|
|
13104
|
+
const ge = await H.getHandler().searchAllIds({
|
|
13104
13105
|
params: I.current,
|
|
13105
13106
|
model: i,
|
|
13106
13107
|
context: { ...$ == null ? void 0 : $(), ...l },
|
|
@@ -13113,7 +13114,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13113
13114
|
}, Q = async (Y) => {
|
|
13114
13115
|
v(!0);
|
|
13115
13116
|
try {
|
|
13116
|
-
const ge = await
|
|
13117
|
+
const ge = await H.getHandler().execute({
|
|
13117
13118
|
action: "name_get",
|
|
13118
13119
|
payload: [Y],
|
|
13119
13120
|
model: i,
|
|
@@ -13121,17 +13122,17 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13121
13122
|
});
|
|
13122
13123
|
ee([Y, ge[0][1]]);
|
|
13123
13124
|
} catch (ge) {
|
|
13124
|
-
|
|
13125
|
+
_(ge);
|
|
13125
13126
|
} finally {
|
|
13126
13127
|
v(!1);
|
|
13127
13128
|
}
|
|
13128
13129
|
};
|
|
13129
13130
|
async function de() {
|
|
13130
|
-
d && (I.current = await
|
|
13131
|
+
d && (I.current = await H.getHandler().evalDomain({
|
|
13131
13132
|
domain: d,
|
|
13132
13133
|
values: Cn({
|
|
13133
13134
|
fields: F(),
|
|
13134
|
-
values:
|
|
13135
|
+
values: E()
|
|
13135
13136
|
}),
|
|
13136
13137
|
fields: F(),
|
|
13137
13138
|
context: $()
|
|
@@ -13156,7 +13157,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13156
13157
|
let Y = !0;
|
|
13157
13158
|
return G === !0 && (Y = !1), r.showMenu !== void 0 && (Y = r.showMenu), Y;
|
|
13158
13159
|
}, [r.showMenu, G]);
|
|
13159
|
-
return /* @__PURE__ */
|
|
13160
|
+
return /* @__PURE__ */ L(Ge, { gutter: 8, wrap: !1, children: [
|
|
13160
13161
|
/* @__PURE__ */ s(Oe, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ s(
|
|
13161
13162
|
oe,
|
|
13162
13163
|
{
|
|
@@ -13269,7 +13270,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13269
13270
|
return /* @__PURE__ */ s(
|
|
13270
13271
|
Ft,
|
|
13271
13272
|
{
|
|
13272
|
-
title: /* @__PURE__ */
|
|
13273
|
+
title: /* @__PURE__ */ L("span", { children: [
|
|
13273
13274
|
r && /* @__PURE__ */ s("span", { style: { marginRight: 8 }, children: r }),
|
|
13274
13275
|
t
|
|
13275
13276
|
] }),
|
|
@@ -13345,7 +13346,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13345
13346
|
), l = pe(
|
|
13346
13347
|
Nt
|
|
13347
13348
|
), { processAction: c } = a || {}, { openRelate: d } = l || {}, [f, u] = T(null), [p, m] = T(!1), [g] = Re(
|
|
13348
|
-
|
|
13349
|
+
H.getHandler().getToolbar
|
|
13349
13350
|
), h = o || f, v = O(async () => {
|
|
13350
13351
|
var S;
|
|
13351
13352
|
return await ((S = e.current) == null ? void 0 : S.submitForm());
|
|
@@ -13470,7 +13471,7 @@ const Jn = $t(xy), Xn = (t) => {
|
|
|
13470
13471
|
if (!t)
|
|
13471
13472
|
return;
|
|
13472
13473
|
i(!0);
|
|
13473
|
-
const c = await
|
|
13474
|
+
const c = await H.getHandler().duplicate({
|
|
13474
13475
|
id: t,
|
|
13475
13476
|
model: e,
|
|
13476
13477
|
context: r
|
|
@@ -13525,7 +13526,7 @@ function Ey(t) {
|
|
|
13525
13526
|
model: P,
|
|
13526
13527
|
permissions: ["write"],
|
|
13527
13528
|
enabled: !!P
|
|
13528
|
-
}), R = (F == null ? void 0 : F.create) ?? !1,
|
|
13529
|
+
}), R = (F == null ? void 0 : F.create) ?? !1, E = (F == null ? void 0 : F.write) ?? !1, I = (F == null ? void 0 : F.unlink) ?? !1, A = ($ == null ? void 0 : $.write) ?? !1, { duplicatingItem: k, duplicate: _ } = Iy({
|
|
13529
13530
|
currentId: a === "form" ? x : parseInt(g[0]),
|
|
13530
13531
|
currentModel: o,
|
|
13531
13532
|
onItemDuplicated: () => {
|
|
@@ -13548,10 +13549,10 @@ function Ey(t) {
|
|
|
13548
13549
|
parentContext: b,
|
|
13549
13550
|
selectedRowItems: g.map((oe) => ({ id: oe })),
|
|
13550
13551
|
onRefreshParentValues: C
|
|
13551
|
-
}), j = n || !R || !A, ee = n || !
|
|
13552
|
-
return /* @__PURE__ */
|
|
13552
|
+
}), j = n || !R || !A, ee = n || !E, B = c === 0 || n || a !== "form" && g.length === 0 || (p ? !E : !I || !A), z = n || k || a === "tree" && g.length !== 1 || a === "form" && (x === void 0 || x < 0) || !R || !A;
|
|
13553
|
+
return /* @__PURE__ */ L("div", { className: "flex mb-2 pt-3", children: [
|
|
13553
13554
|
/* @__PURE__ */ s(rc, { title: e, token: D }),
|
|
13554
|
-
/* @__PURE__ */
|
|
13555
|
+
/* @__PURE__ */ L("div", { className: "flex-none h-8 pl-2", children: [
|
|
13555
13556
|
a !== "graph" && h && /* @__PURE__ */ s(
|
|
13556
13557
|
bt,
|
|
13557
13558
|
{
|
|
@@ -13561,7 +13562,7 @@ function Ey(t) {
|
|
|
13561
13562
|
onClick: r
|
|
13562
13563
|
}
|
|
13563
13564
|
),
|
|
13564
|
-
p && h && /* @__PURE__ */
|
|
13565
|
+
p && h && /* @__PURE__ */ L(he, { children: [
|
|
13565
13566
|
/* @__PURE__ */ s(zt, {}),
|
|
13566
13567
|
/* @__PURE__ */ s(
|
|
13567
13568
|
bt,
|
|
@@ -13583,7 +13584,7 @@ function Ey(t) {
|
|
|
13583
13584
|
disabled: B
|
|
13584
13585
|
}
|
|
13585
13586
|
),
|
|
13586
|
-
(a === "tree" || a === "form") && /* @__PURE__ */
|
|
13587
|
+
(a === "tree" || a === "form") && /* @__PURE__ */ L(he, { children: [
|
|
13587
13588
|
/* @__PURE__ */ s(zt, {}),
|
|
13588
13589
|
/* @__PURE__ */ s(
|
|
13589
13590
|
bt,
|
|
@@ -13599,7 +13600,7 @@ function Ey(t) {
|
|
|
13599
13600
|
}
|
|
13600
13601
|
)
|
|
13601
13602
|
] }),
|
|
13602
|
-
(a === "form" || a === "tree") && /* @__PURE__ */
|
|
13603
|
+
(a === "form" || a === "tree") && /* @__PURE__ */ L(he, { children: [
|
|
13603
13604
|
/* @__PURE__ */ s(zt, {}),
|
|
13604
13605
|
/* @__PURE__ */ s(
|
|
13605
13606
|
bt,
|
|
@@ -13611,7 +13612,7 @@ function Ey(t) {
|
|
|
13611
13612
|
onClick: () => tn({
|
|
13612
13613
|
confirmMessage: S("confirmDuplicate"),
|
|
13613
13614
|
t: S,
|
|
13614
|
-
onOk: async () =>
|
|
13615
|
+
onOk: async () => _()
|
|
13615
13616
|
})
|
|
13616
13617
|
}
|
|
13617
13618
|
)
|
|
@@ -13625,7 +13626,7 @@ function Ey(t) {
|
|
|
13625
13626
|
onNextItem: u
|
|
13626
13627
|
}
|
|
13627
13628
|
),
|
|
13628
|
-
v && /* @__PURE__ */
|
|
13629
|
+
v && /* @__PURE__ */ L(he, { children: [
|
|
13629
13630
|
/* @__PURE__ */ s(zt, {}),
|
|
13630
13631
|
/* @__PURE__ */ s(
|
|
13631
13632
|
bt,
|
|
@@ -13636,8 +13637,8 @@ function Ey(t) {
|
|
|
13636
13637
|
}
|
|
13637
13638
|
)
|
|
13638
13639
|
] }),
|
|
13639
|
-
y && /* @__PURE__ */
|
|
13640
|
-
((Q = y.action) == null ? void 0 : Q.length) > 0 && /* @__PURE__ */
|
|
13640
|
+
y && /* @__PURE__ */ L(he, { children: [
|
|
13641
|
+
((Q = y.action) == null ? void 0 : Q.length) > 0 && /* @__PURE__ */ L(he, { children: [
|
|
13641
13642
|
/* @__PURE__ */ s(zt, {}),
|
|
13642
13643
|
/* @__PURE__ */ s(
|
|
13643
13644
|
Zt,
|
|
@@ -13647,7 +13648,7 @@ function Ey(t) {
|
|
|
13647
13648
|
}
|
|
13648
13649
|
)
|
|
13649
13650
|
] }),
|
|
13650
|
-
((de = y.print) == null ? void 0 : de.length) > 0 && /* @__PURE__ */
|
|
13651
|
+
((de = y.print) == null ? void 0 : de.length) > 0 && /* @__PURE__ */ L(he, { children: [
|
|
13651
13652
|
/* @__PURE__ */ s(zt, {}),
|
|
13652
13653
|
/* @__PURE__ */ s(
|
|
13653
13654
|
Zt,
|
|
@@ -13657,7 +13658,7 @@ function Ey(t) {
|
|
|
13657
13658
|
}
|
|
13658
13659
|
)
|
|
13659
13660
|
] }),
|
|
13660
|
-
a === "form" && ((q = y.relate) == null ? void 0 : q.length) > 0 && /* @__PURE__ */
|
|
13661
|
+
a === "form" && ((q = y.relate) == null ? void 0 : q.length) > 0 && /* @__PURE__ */ L(he, { children: [
|
|
13661
13662
|
/* @__PURE__ */ s(zt, {}),
|
|
13662
13663
|
/* @__PURE__ */ s(
|
|
13663
13664
|
Zt,
|
|
@@ -13691,7 +13692,7 @@ const oc = it(
|
|
|
13691
13692
|
totalItems: e
|
|
13692
13693
|
}) => {
|
|
13693
13694
|
const n = e === 0 ? "_" : (t + 1).toString();
|
|
13694
|
-
return /* @__PURE__ */
|
|
13695
|
+
return /* @__PURE__ */ L("span", { className: "pl-1 pr-1", children: [
|
|
13695
13696
|
"(",
|
|
13696
13697
|
n,
|
|
13697
13698
|
"/",
|
|
@@ -13709,7 +13710,7 @@ const sc = it(
|
|
|
13709
13710
|
onNextItem: r
|
|
13710
13711
|
}) => {
|
|
13711
13712
|
const { t: o } = we();
|
|
13712
|
-
return /* @__PURE__ */
|
|
13713
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
13713
13714
|
/* @__PURE__ */ s(zt, {}),
|
|
13714
13715
|
/* @__PURE__ */ s(
|
|
13715
13716
|
bt,
|
|
@@ -13785,7 +13786,7 @@ const ky = (t) => {
|
|
|
13785
13786
|
domain: g,
|
|
13786
13787
|
fetchValues: h,
|
|
13787
13788
|
getAllHierarchyValues: v
|
|
13788
|
-
} = f || {}, { t: y } = we(), [b, w] = T(!1), [C, x] = T(!1), [D, S] = T(), [P, F] = T(!1), [$, R] = T(!1), [
|
|
13789
|
+
} = f || {}, { t: y } = we(), [b, w] = T(!1), [C, x] = T(!1), [D, S] = T(), [P, F] = T(!1), [$, R] = T(!1), [E, I] = T(), [A, k] = T([]), [_, M] = T(!1), [W, V] = T([]), [N, U] = T(), j = Z(), [ee, B] = T(void 0), z = Z(), {
|
|
13789
13790
|
readOnly: K,
|
|
13790
13791
|
relation: Q,
|
|
13791
13792
|
context: de,
|
|
@@ -13843,7 +13844,7 @@ const ky = (t) => {
|
|
|
13843
13844
|
}, [v()]);
|
|
13844
13845
|
const ve = O(async () => {
|
|
13845
13846
|
let J = [];
|
|
13846
|
-
q && (J = await
|
|
13847
|
+
q && (J = await H.getHandler().evalDomain({
|
|
13847
13848
|
domain: q,
|
|
13848
13849
|
values: Cn({
|
|
13849
13850
|
fields: p(),
|
|
@@ -13879,12 +13880,12 @@ const ky = (t) => {
|
|
|
13879
13880
|
d(c + 1);
|
|
13880
13881
|
}) : d(c + 1));
|
|
13881
13882
|
}, Ee = async () => {
|
|
13882
|
-
const J = G[c].id, Ce = (await
|
|
13883
|
+
const J = G[c].id, Ce = (await H.getHandler().readObjects({
|
|
13883
13884
|
model: Q,
|
|
13884
13885
|
ids: [J],
|
|
13885
13886
|
fields: o.get("form").fields,
|
|
13886
13887
|
context: { ...m == null ? void 0 : m(), ...de }
|
|
13887
|
-
}))[0], ue = (await
|
|
13888
|
+
}))[0], ue = (await H.getHandler().readObjects({
|
|
13888
13889
|
model: Q,
|
|
13889
13890
|
ids: [J],
|
|
13890
13891
|
fields: o.get("tree").fields,
|
|
@@ -13984,7 +13985,7 @@ const ky = (t) => {
|
|
|
13984
13985
|
treeValues: { ...ue, id: Ae }
|
|
13985
13986
|
});
|
|
13986
13987
|
}
|
|
13987
|
-
Y(Ve),
|
|
13988
|
+
Y(Ve), _ || F(!1);
|
|
13988
13989
|
}, Se = async (J) => {
|
|
13989
13990
|
const { id: Ce } = J;
|
|
13990
13991
|
let ue = i;
|
|
@@ -13995,12 +13996,12 @@ const ky = (t) => {
|
|
|
13995
13996
|
const Ce = i, ue = J.filter((De) => !i.find((Ve) => Ve.id === De));
|
|
13996
13997
|
try {
|
|
13997
13998
|
for (const De of ue) {
|
|
13998
|
-
const Ve = (await
|
|
13999
|
+
const Ve = (await H.getHandler().readObjects({
|
|
13999
14000
|
model: Q,
|
|
14000
14001
|
ids: [De],
|
|
14001
14002
|
fields: o.get("form").fields,
|
|
14002
14003
|
context: { ...m == null ? void 0 : m(), ...de }
|
|
14003
|
-
}))[0], Ae = (await
|
|
14004
|
+
}))[0], Ae = (await H.getHandler().readObjects({
|
|
14004
14005
|
model: Q,
|
|
14005
14006
|
ids: [De],
|
|
14006
14007
|
fields: o.get("tree").fields,
|
|
@@ -14101,8 +14102,8 @@ const ky = (t) => {
|
|
|
14101
14102
|
};
|
|
14102
14103
|
if (D)
|
|
14103
14104
|
return /* @__PURE__ */ s(Rt, { className: "mt-10", message: D, type: "error", banner: !0 });
|
|
14104
|
-
const ze =
|
|
14105
|
-
return C ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */
|
|
14105
|
+
const ze = _;
|
|
14106
|
+
return C ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ L(he, { children: [
|
|
14106
14107
|
/* @__PURE__ */ s(
|
|
14107
14108
|
ac,
|
|
14108
14109
|
{
|
|
@@ -14138,10 +14139,10 @@ const ky = (t) => {
|
|
|
14138
14139
|
{
|
|
14139
14140
|
formView: o.get("form"),
|
|
14140
14141
|
model: Q,
|
|
14141
|
-
id:
|
|
14142
|
+
id: E == null ? void 0 : E.id,
|
|
14142
14143
|
submitMode: "2many",
|
|
14143
|
-
values:
|
|
14144
|
-
defaultValues:
|
|
14144
|
+
values: E == null ? void 0 : E.values,
|
|
14145
|
+
defaultValues: E == null ? void 0 : E.defaultValues,
|
|
14145
14146
|
visible: P,
|
|
14146
14147
|
onSubmitSucceed: et,
|
|
14147
14148
|
parentContext: { ...m == null ? void 0 : m(), ...de },
|
|
@@ -14198,7 +14199,7 @@ const ky = (t) => {
|
|
|
14198
14199
|
}, [l()]);
|
|
14199
14200
|
const c = O(async () => {
|
|
14200
14201
|
let d = [];
|
|
14201
|
-
e && (d = await
|
|
14202
|
+
e && (d = await H.getHandler().evalDomain({
|
|
14202
14203
|
domain: e,
|
|
14203
14204
|
values: Cn({
|
|
14204
14205
|
fields: o(),
|
|
@@ -14263,7 +14264,7 @@ const ky = (t) => {
|
|
|
14263
14264
|
context: n,
|
|
14264
14265
|
attrs: x,
|
|
14265
14266
|
treeOoui: u
|
|
14266
|
-
}), $ = C.length < h - g && w.length > 0 ? [...C, ...w.map((
|
|
14267
|
+
}), $ = C.length < h - g && w.length > 0 ? [...C, ...w.map((E) => E.id)] : C;
|
|
14267
14268
|
return { results: $u({
|
|
14268
14269
|
finalResultIds: $,
|
|
14269
14270
|
fetchedItems: D,
|
|
@@ -14296,12 +14297,12 @@ const ky = (t) => {
|
|
|
14296
14297
|
async ({ id: g }) => {
|
|
14297
14298
|
if (!o)
|
|
14298
14299
|
return;
|
|
14299
|
-
const h = (await
|
|
14300
|
+
const h = (await H.getHandler().readObjects({
|
|
14300
14301
|
model: e,
|
|
14301
14302
|
ids: [g],
|
|
14302
14303
|
fields: o.fields,
|
|
14303
14304
|
context: n
|
|
14304
|
-
}))[0], v = (await
|
|
14305
|
+
}))[0], v = (await H.getHandler().readObjects({
|
|
14305
14306
|
model: e,
|
|
14306
14307
|
ids: [g],
|
|
14307
14308
|
fields: r.fields,
|
|
@@ -14538,7 +14539,7 @@ const Hy = ({
|
|
|
14538
14539
|
const { id: D } = x;
|
|
14539
14540
|
let S = o;
|
|
14540
14541
|
const P = o.find((F) => F.id === D);
|
|
14541
|
-
(P == null ? void 0 : P.values) === void 0 && (S = await
|
|
14542
|
+
(P == null ? void 0 : P.values) === void 0 && (S = await H.getHandler().readObjects({
|
|
14542
14543
|
model: c,
|
|
14543
14544
|
ids: [x.id],
|
|
14544
14545
|
fields: d.fields,
|
|
@@ -14575,7 +14576,7 @@ const Hy = ({
|
|
|
14575
14576
|
async (g) => {
|
|
14576
14577
|
const h = [...n], v = g.filter((y) => !n.find((b) => b.id === y));
|
|
14577
14578
|
try {
|
|
14578
|
-
(await
|
|
14579
|
+
(await H.getHandler().readObjects({
|
|
14579
14580
|
model: a,
|
|
14580
14581
|
ids: v,
|
|
14581
14582
|
fields: {
|
|
@@ -14637,12 +14638,12 @@ const Hy = ({
|
|
|
14637
14638
|
wt.FEATURE_MANY2ONE_SORT
|
|
14638
14639
|
);
|
|
14639
14640
|
Ue(() => {
|
|
14640
|
-
var
|
|
14641
|
+
var _, M;
|
|
14641
14642
|
if (D.current = t, x.current === void 0) {
|
|
14642
14643
|
x.current = t;
|
|
14643
14644
|
return;
|
|
14644
14645
|
}
|
|
14645
|
-
x.current = t, (
|
|
14646
|
+
x.current = t, (_ = b == null ? void 0 : b.current) == null || _.refresh(), (M = b == null ? void 0 : b.current) == null || M.unselectAll();
|
|
14646
14647
|
}, [t]);
|
|
14647
14648
|
const F = Jt(() => t.length, [t]), $ = Jt(() => ds(
|
|
14648
14649
|
o,
|
|
@@ -14653,7 +14654,7 @@ const Hy = ({
|
|
|
14653
14654
|
P
|
|
14654
14655
|
), [i, o, P]), R = O(
|
|
14655
14656
|
async ({
|
|
14656
|
-
startRow:
|
|
14657
|
+
startRow: _,
|
|
14657
14658
|
endRow: M,
|
|
14658
14659
|
state: W
|
|
14659
14660
|
}) => {
|
|
@@ -14661,17 +14662,17 @@ const Hy = ({
|
|
|
14661
14662
|
state: W
|
|
14662
14663
|
}), { results: N, colors: U, status: j } = await a({
|
|
14663
14664
|
allItems: D.current,
|
|
14664
|
-
startRow:
|
|
14665
|
+
startRow: _,
|
|
14665
14666
|
endRow: M,
|
|
14666
14667
|
sortFields: V
|
|
14667
14668
|
});
|
|
14668
14669
|
return w.current = { ...w.current, ...U }, !C.current && j && (C.current = {}), j && (C.current = { ...C.current, ...j }), N;
|
|
14669
14670
|
},
|
|
14670
14671
|
[a]
|
|
14671
|
-
),
|
|
14672
|
+
), E = O((_) => {
|
|
14672
14673
|
var M, W, V, N;
|
|
14673
|
-
if (w.current[(W = (M =
|
|
14674
|
-
return { color: w.current[(N = (V =
|
|
14674
|
+
if (w.current[(W = (M = _.node) == null ? void 0 : M.data) == null ? void 0 : W.id])
|
|
14675
|
+
return { color: w.current[(N = (V = _.node) == null ? void 0 : V.data) == null ? void 0 : N.id] };
|
|
14675
14676
|
}, []), { loading: I, getColumnState: A, updateColumnState: k } = hs({
|
|
14676
14677
|
key: jy({
|
|
14677
14678
|
...m,
|
|
@@ -14688,7 +14689,7 @@ const Hy = ({
|
|
|
14688
14689
|
onRowDoubleClick: n,
|
|
14689
14690
|
showPointerCursorInRows: v,
|
|
14690
14691
|
readonly: r,
|
|
14691
|
-
onRowStyle:
|
|
14692
|
+
onRowStyle: E,
|
|
14692
14693
|
onRowSelectionChange: l,
|
|
14693
14694
|
onColumnChanged: k,
|
|
14694
14695
|
onGetColumnsState: A,
|
|
@@ -14699,10 +14700,10 @@ const Hy = ({
|
|
|
14699
14700
|
totalRows: F,
|
|
14700
14701
|
footer: g && /* @__PURE__ */ s(ys, { aggregates: g, isLoading: !1 }),
|
|
14701
14702
|
hasStatusColumn: o.status !== null,
|
|
14702
|
-
statusComponent: (
|
|
14703
|
-
onRowStatus: (
|
|
14703
|
+
statusComponent: (_) => /* @__PURE__ */ s(Un, { color: _, style: { marginLeft: 7 } }),
|
|
14704
|
+
onRowStatus: (_) => {
|
|
14704
14705
|
var M;
|
|
14705
|
-
return (M = C.current) == null ? void 0 : M[
|
|
14706
|
+
return (M = C.current) == null ? void 0 : M[_.id];
|
|
14706
14707
|
},
|
|
14707
14708
|
strings: {
|
|
14708
14709
|
resetTableViewLabel: S("resetTableView")
|
|
@@ -14742,11 +14743,11 @@ const Hy = ({
|
|
|
14742
14743
|
}), {
|
|
14743
14744
|
treeOoui: $,
|
|
14744
14745
|
onTreeFetchRows: R,
|
|
14745
|
-
selectedRowKeys:
|
|
14746
|
+
selectedRowKeys: E,
|
|
14746
14747
|
setSelectedRowKeys: I,
|
|
14747
14748
|
onChangeFirstVisibleRowIndex: A,
|
|
14748
14749
|
onGetFirstVisibileRowIndex: k,
|
|
14749
|
-
onSelectionCheckboxClicked:
|
|
14750
|
+
onSelectionCheckboxClicked: _
|
|
14750
14751
|
} = My({
|
|
14751
14752
|
treeView: i.get("tree"),
|
|
14752
14753
|
relation: m,
|
|
@@ -14757,7 +14758,7 @@ const Hy = ({
|
|
|
14757
14758
|
ooui: $,
|
|
14758
14759
|
model: m,
|
|
14759
14760
|
items: l,
|
|
14760
|
-
selectedRowKeys:
|
|
14761
|
+
selectedRowKeys: E
|
|
14761
14762
|
}), W = re(() => {
|
|
14762
14763
|
const { title: me } = i.get(c) || {};
|
|
14763
14764
|
return me || o.label;
|
|
@@ -14820,7 +14821,7 @@ const Hy = ({
|
|
|
14820
14821
|
items: l,
|
|
14821
14822
|
triggerChange: N,
|
|
14822
14823
|
setFormHasChanges: B,
|
|
14823
|
-
selectedRowKeys:
|
|
14824
|
+
selectedRowKeys: E,
|
|
14824
14825
|
setSelectedRowKeys: I
|
|
14825
14826
|
}), be = () => {
|
|
14826
14827
|
const me = Array.from(i.keys()), qe = me[(me.indexOf(c) + 1) % me.length];
|
|
@@ -14853,7 +14854,7 @@ const Hy = ({
|
|
|
14853
14854
|
var me;
|
|
14854
14855
|
return ((me = i.get("form")) == null ? void 0 : me.fields) !== void 0;
|
|
14855
14856
|
}, [i]);
|
|
14856
|
-
return /* @__PURE__ */
|
|
14857
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
14857
14858
|
/* @__PURE__ */ s(
|
|
14858
14859
|
ac,
|
|
14859
14860
|
{
|
|
@@ -14872,7 +14873,7 @@ const Hy = ({
|
|
|
14872
14873
|
onPreviousItem: ne,
|
|
14873
14874
|
onNextItem: ie,
|
|
14874
14875
|
onSearchItem: Y,
|
|
14875
|
-
selectedRowKeys:
|
|
14876
|
+
selectedRowKeys: E,
|
|
14876
14877
|
showCreateButton: S,
|
|
14877
14878
|
showToggleButton: D,
|
|
14878
14879
|
toolbar: ($e = i.get(c)) == null ? void 0 : $e.toolbar,
|
|
@@ -14900,8 +14901,8 @@ const Hy = ({
|
|
|
14900
14901
|
relation: m,
|
|
14901
14902
|
onChangeFirstVisibleRowIndex: A,
|
|
14902
14903
|
onGetFirstVisibleRowIndex: k,
|
|
14903
|
-
selectedRowKeys:
|
|
14904
|
-
onSelectionCheckboxClicked:
|
|
14904
|
+
selectedRowKeys: E,
|
|
14905
|
+
onSelectionCheckboxClicked: _,
|
|
14905
14906
|
dataForHash: {
|
|
14906
14907
|
parentViewId: t.parentViewId,
|
|
14907
14908
|
treeViewId: t.treeViewId,
|
|
@@ -14965,7 +14966,7 @@ const Hy = ({
|
|
|
14965
14966
|
limit: 0
|
|
14966
14967
|
}
|
|
14967
14968
|
),
|
|
14968
|
-
!Gy.includes(c) && /* @__PURE__ */
|
|
14969
|
+
!Gy.includes(c) && /* @__PURE__ */ L("span", { children: [
|
|
14969
14970
|
"Unsupported view ",
|
|
14970
14971
|
c
|
|
14971
14972
|
] })
|
|
@@ -14981,14 +14982,10 @@ const Hy = ({
|
|
|
14981
14982
|
const b = Lt(
|
|
14982
14983
|
wt.FEATURE_GET_TOOLBAR
|
|
14983
14984
|
), w = async (S) => {
|
|
14984
|
-
if (
|
|
14985
|
-
model: r,
|
|
14986
|
-
type: S,
|
|
14987
|
-
context: { ...h == null ? void 0 : h(), ...a }
|
|
14988
|
-
}), o && o[S]) {
|
|
14985
|
+
if (o && o[S]) {
|
|
14989
14986
|
const P = o[S];
|
|
14990
14987
|
if (b && !P.toolbar && (S === "form" || S === "tree")) {
|
|
14991
|
-
const F = await
|
|
14988
|
+
const F = await H.getHandler().getToolbar({
|
|
14992
14989
|
model: r,
|
|
14993
14990
|
type: S,
|
|
14994
14991
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
@@ -14999,12 +14996,12 @@ const Hy = ({
|
|
|
14999
14996
|
}
|
|
15000
14997
|
if (b && (S === "form" || S === "tree")) {
|
|
15001
14998
|
const [P, F] = await Promise.all([
|
|
15002
|
-
|
|
14999
|
+
H.getHandler().getView({
|
|
15003
15000
|
model: r,
|
|
15004
15001
|
type: S,
|
|
15005
15002
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
15006
15003
|
}),
|
|
15007
|
-
|
|
15004
|
+
H.getHandler().getToolbar({
|
|
15008
15005
|
model: r,
|
|
15009
15006
|
type: S,
|
|
15010
15007
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
@@ -15012,7 +15009,7 @@ const Hy = ({
|
|
|
15012
15009
|
]);
|
|
15013
15010
|
return { ...P, toolbar: F };
|
|
15014
15011
|
}
|
|
15015
|
-
return await
|
|
15012
|
+
return await H.getHandler().getView({
|
|
15016
15013
|
model: r,
|
|
15017
15014
|
type: S,
|
|
15018
15015
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
@@ -15194,7 +15191,7 @@ function nv(t) {
|
|
|
15194
15191
|
children: r.filter((a) => !a.invisible).map((a) => /* @__PURE__ */ s(
|
|
15195
15192
|
ev,
|
|
15196
15193
|
{
|
|
15197
|
-
tab: /* @__PURE__ */
|
|
15194
|
+
tab: /* @__PURE__ */ L(he, { children: [
|
|
15198
15195
|
i(a.icon),
|
|
15199
15196
|
" ",
|
|
15200
15197
|
a.label
|
|
@@ -15250,7 +15247,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15250
15247
|
formHasChanges: d,
|
|
15251
15248
|
elementHasLostFocus: f
|
|
15252
15249
|
} = i || {}, [u, p] = T(!1), { t: m } = we();
|
|
15253
|
-
return a ? /* @__PURE__ */
|
|
15250
|
+
return a ? /* @__PURE__ */ L(he, { children: [
|
|
15254
15251
|
/* @__PURE__ */ s(
|
|
15255
15252
|
"div",
|
|
15256
15253
|
{
|
|
@@ -15297,7 +15294,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15297
15294
|
}
|
|
15298
15295
|
}
|
|
15299
15296
|
)
|
|
15300
|
-
] }) : /* @__PURE__ */
|
|
15297
|
+
] }) : /* @__PURE__ */ L(he, { children: [
|
|
15301
15298
|
/* @__PURE__ */ s(Ge, { gutter: 8, wrap: !1, children: /* @__PURE__ */ s(
|
|
15302
15299
|
qo,
|
|
15303
15300
|
{
|
|
@@ -15328,7 +15325,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15328
15325
|
] });
|
|
15329
15326
|
}, iv = (t) => {
|
|
15330
15327
|
const { ooui: e } = t, { label: n, icon: r } = e, o = Pt(r || "");
|
|
15331
|
-
return /* @__PURE__ */ s(Lr, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */
|
|
15328
|
+
return /* @__PURE__ */ s(Lr, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ L(ct, { children: [
|
|
15332
15329
|
o ? /* @__PURE__ */ s(o, {}) : null,
|
|
15333
15330
|
n
|
|
15334
15331
|
] }) });
|
|
@@ -15350,7 +15347,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15350
15347
|
v.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (y = [
|
|
15351
15348
|
["id", "in", n == null ? void 0 : n.map((C) => C.id)]
|
|
15352
15349
|
]);
|
|
15353
|
-
const { datas: b } = await
|
|
15350
|
+
const { datas: b } = await H.getHandler().exportData({
|
|
15354
15351
|
model: t,
|
|
15355
15352
|
fields: pv({
|
|
15356
15353
|
keys: v.selectedKeys,
|
|
@@ -15367,7 +15364,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15367
15364
|
},
|
|
15368
15365
|
[r, n, t, o, e, i, c]
|
|
15369
15366
|
), f = O(async () => {
|
|
15370
|
-
const v = await
|
|
15367
|
+
const v = await H.getHandler().getFields({
|
|
15371
15368
|
model: t,
|
|
15372
15369
|
context: e,
|
|
15373
15370
|
fields: []
|
|
@@ -15375,7 +15372,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15375
15372
|
return a.current["/"] = v, Li({ fields: v });
|
|
15376
15373
|
}, [t, e, a]), u = O(
|
|
15377
15374
|
async (v) => {
|
|
15378
|
-
const b = zo(v, a.current)[Yo(v)], w = b.relation, C = await
|
|
15375
|
+
const b = zo(v, a.current)[Yo(v)], w = b.relation, C = await H.getHandler().getFields({
|
|
15379
15376
|
model: w,
|
|
15380
15377
|
context: e,
|
|
15381
15378
|
fields: []
|
|
@@ -15419,7 +15416,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15419
15416
|
};
|
|
15420
15417
|
}, [e, t, u]), m = O(
|
|
15421
15418
|
async (v) => {
|
|
15422
|
-
await
|
|
15419
|
+
await H.getHandler().deleteObjects({
|
|
15423
15420
|
model: "ir.exports",
|
|
15424
15421
|
ids: [v.id],
|
|
15425
15422
|
context: e
|
|
@@ -15430,7 +15427,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15430
15427
|
async (v) => {
|
|
15431
15428
|
if (l.current.has(v))
|
|
15432
15429
|
return l.current.get(v);
|
|
15433
|
-
const y =
|
|
15430
|
+
const y = H.getHandler().getFields({
|
|
15434
15431
|
model: v,
|
|
15435
15432
|
context: e,
|
|
15436
15433
|
fields: []
|
|
@@ -15440,7 +15437,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15440
15437
|
[l, e]
|
|
15441
15438
|
), h = O(
|
|
15442
15439
|
async (v) => {
|
|
15443
|
-
const y = await g("ir.exports"), b = await g("ir.exports.line"), w = await
|
|
15440
|
+
const y = await g("ir.exports"), b = await g("ir.exports.line"), w = await H.getHandler().create({
|
|
15444
15441
|
model: "ir.exports",
|
|
15445
15442
|
values: {
|
|
15446
15443
|
name: v.name,
|
|
@@ -15450,7 +15447,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15450
15447
|
context: e
|
|
15451
15448
|
});
|
|
15452
15449
|
return await Promise.all(
|
|
15453
|
-
v.fields.map(async (C) => await
|
|
15450
|
+
v.fields.map(async (C) => await H.getHandler().create({
|
|
15454
15451
|
model: "ir.exports.line",
|
|
15455
15452
|
values: {
|
|
15456
15453
|
name: C.key,
|
|
@@ -15502,11 +15499,11 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15502
15499
|
model: t,
|
|
15503
15500
|
context: e
|
|
15504
15501
|
}) => {
|
|
15505
|
-
const n = await
|
|
15502
|
+
const n = await H.getHandler().search({
|
|
15506
15503
|
model: "ir.exports",
|
|
15507
15504
|
params: [["resource", "=", t]],
|
|
15508
15505
|
context: e
|
|
15509
|
-
}), r = n.flatMap((i) => i.export_fields), o = await
|
|
15506
|
+
}), r = n.flatMap((i) => i.export_fields), o = await H.getHandler().readObjects({
|
|
15510
15507
|
model: "ir.exports.line",
|
|
15511
15508
|
ids: r,
|
|
15512
15509
|
context: e
|
|
@@ -15657,7 +15654,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15657
15654
|
}
|
|
15658
15655
|
const m = e && c && c[0], g = e && c && c[1] && parseInt(c[1]);
|
|
15659
15656
|
f([g, void 0]), p(m);
|
|
15660
|
-
}, [e]), /* @__PURE__ */
|
|
15657
|
+
}, [e]), /* @__PURE__ */ L(Ge, { gutter: 8, wrap: !1, children: [
|
|
15661
15658
|
/* @__PURE__ */ s(Oe, { flex: "1", children: /* @__PURE__ */ s(
|
|
15662
15659
|
Fa,
|
|
15663
15660
|
{
|
|
@@ -15719,8 +15716,8 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15719
15716
|
function b() {
|
|
15720
15717
|
f(a, void 0), g(void 0);
|
|
15721
15718
|
}
|
|
15722
|
-
return /* @__PURE__ */
|
|
15723
|
-
/* @__PURE__ */
|
|
15719
|
+
return /* @__PURE__ */ L(Ge, { gutter: 8, children: [
|
|
15720
|
+
/* @__PURE__ */ L(Oe, { style: { paddingBottom: 5 }, children: [
|
|
15724
15721
|
/* @__PURE__ */ s(
|
|
15725
15722
|
"input",
|
|
15726
15723
|
{
|
|
@@ -15741,7 +15738,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15741
15738
|
}
|
|
15742
15739
|
)
|
|
15743
15740
|
] }),
|
|
15744
|
-
/* @__PURE__ */ s(Oe, { children: /* @__PURE__ */
|
|
15741
|
+
/* @__PURE__ */ s(Oe, { children: /* @__PURE__ */ L(ct, { children: [
|
|
15745
15742
|
/* @__PURE__ */ s(
|
|
15746
15743
|
je,
|
|
15747
15744
|
{
|
|
@@ -15783,7 +15780,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15783
15780
|
onOpenAttachmentLink: i,
|
|
15784
15781
|
onOpenAttachmentDetail: a,
|
|
15785
15782
|
onListAllAttachments: l
|
|
15786
|
-
} = t, { t: c } = we(), d = Z(null), f = /* @__PURE__ */
|
|
15783
|
+
} = t, { t: c } = we(), d = Z(null), f = /* @__PURE__ */ L(je, { children: [
|
|
15787
15784
|
/* @__PURE__ */ s(Vs, {}),
|
|
15788
15785
|
`(${e})`,
|
|
15789
15786
|
/* @__PURE__ */ s(ur, { style: { fontSize: 12 } })
|
|
@@ -15795,7 +15792,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15795
15792
|
onRetrieveData: async () => [
|
|
15796
15793
|
{
|
|
15797
15794
|
items: n.map((u) => {
|
|
15798
|
-
const p = u.link ? Vs : es, m = /* @__PURE__ */
|
|
15795
|
+
const p = u.link ? Vs : es, m = /* @__PURE__ */ L(Ge, { wrap: !1, align: "middle", gutter: 8, children: [
|
|
15799
15796
|
/* @__PURE__ */ s(Oe, { style: { textAlign: "center" }, children: (u.datas_fname || u.link) && /* @__PURE__ */ s(
|
|
15800
15797
|
Et,
|
|
15801
15798
|
{
|
|
@@ -15834,8 +15831,8 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15834
15831
|
],
|
|
15835
15832
|
placement: "bottomRight",
|
|
15836
15833
|
disabled: r,
|
|
15837
|
-
header: /* @__PURE__ */
|
|
15838
|
-
/* @__PURE__ */
|
|
15834
|
+
header: /* @__PURE__ */ L("div", { style: { padding: 5 }, children: [
|
|
15835
|
+
/* @__PURE__ */ L(
|
|
15839
15836
|
"a",
|
|
15840
15837
|
{
|
|
15841
15838
|
style: { display: "block", paddingBottom: 5 },
|
|
@@ -15851,7 +15848,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
|
|
|
15851
15848
|
]
|
|
15852
15849
|
}
|
|
15853
15850
|
),
|
|
15854
|
-
/* @__PURE__ */
|
|
15851
|
+
/* @__PURE__ */ L(
|
|
15855
15852
|
"a",
|
|
15856
15853
|
{
|
|
15857
15854
|
style: { display: "block" },
|
|
@@ -15883,7 +15880,7 @@ function Rv(t) {
|
|
|
15883
15880
|
if (!(!e || e.length === 0)) {
|
|
15884
15881
|
c(!0);
|
|
15885
15882
|
try {
|
|
15886
|
-
const b = await
|
|
15883
|
+
const b = await H.getHandler().readObjects({
|
|
15887
15884
|
model: "ir.attachment",
|
|
15888
15885
|
ids: e.map((w) => w.id),
|
|
15889
15886
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
@@ -15911,7 +15908,7 @@ function Rv(t) {
|
|
|
15911
15908
|
p(!0);
|
|
15912
15909
|
let w;
|
|
15913
15910
|
try {
|
|
15914
|
-
w = (await
|
|
15911
|
+
w = (await H.getHandler().readObjects({
|
|
15915
15912
|
model: "ir.attachment",
|
|
15916
15913
|
ids: [b.id],
|
|
15917
15914
|
context: a.current.getContext()
|
|
@@ -15935,7 +15932,7 @@ function Rv(t) {
|
|
|
15935
15932
|
);
|
|
15936
15933
|
return ce(() => {
|
|
15937
15934
|
h();
|
|
15938
|
-
}, []), /* @__PURE__ */
|
|
15935
|
+
}, []), /* @__PURE__ */ L(he, { children: [
|
|
15939
15936
|
/* @__PURE__ */ s(
|
|
15940
15937
|
Av,
|
|
15941
15938
|
{
|
|
@@ -15973,7 +15970,7 @@ const Iv = () => {
|
|
|
15973
15970
|
results: i,
|
|
15974
15971
|
searchQuery: a
|
|
15975
15972
|
} = jt(), [l, c] = Re(
|
|
15976
|
-
|
|
15973
|
+
H.getHandler().searchForTree
|
|
15977
15974
|
);
|
|
15978
15975
|
ce(() => () => {
|
|
15979
15976
|
c();
|
|
@@ -16072,11 +16069,11 @@ function _v({ toolbar: t }) {
|
|
|
16072
16069
|
formRef: F,
|
|
16073
16070
|
setFormHasChanges: $,
|
|
16074
16071
|
previousView: R,
|
|
16075
|
-
setPreviousView:
|
|
16072
|
+
setPreviousView: E,
|
|
16076
16073
|
goToResourceId: I,
|
|
16077
16074
|
isActive: A,
|
|
16078
16075
|
permissions: k
|
|
16079
|
-
} = jt(), { openDefaultActionForModel:
|
|
16076
|
+
} = jt(), { openDefaultActionForModel: _ } = e || {}, M = re(
|
|
16080
16077
|
() => u || w || S || C,
|
|
16081
16078
|
[u, w, S, C]
|
|
16082
16079
|
), W = O(
|
|
@@ -16094,7 +16091,7 @@ function _v({ toolbar: t }) {
|
|
|
16094
16091
|
onRefreshParentValues: V
|
|
16095
16092
|
}), ee = O(async () => {
|
|
16096
16093
|
try {
|
|
16097
|
-
b == null || b(!0), await
|
|
16094
|
+
b == null || b(!0), await H.getHandler().deleteObjects({
|
|
16098
16095
|
model: y,
|
|
16099
16096
|
ids: [p],
|
|
16100
16097
|
context: F.current.getContext()
|
|
@@ -16124,7 +16121,7 @@ function _v({ toolbar: t }) {
|
|
|
16124
16121
|
]), B = O(async () => {
|
|
16125
16122
|
try {
|
|
16126
16123
|
x == null || x(!0);
|
|
16127
|
-
const q = await
|
|
16124
|
+
const q = await H.getHandler().duplicate({
|
|
16128
16125
|
id: p,
|
|
16129
16126
|
model: y,
|
|
16130
16127
|
context: F.current.getContext()
|
|
@@ -16144,36 +16141,36 @@ function _v({ toolbar: t }) {
|
|
|
16144
16141
|
i
|
|
16145
16142
|
]), z = O(
|
|
16146
16143
|
(q) => {
|
|
16147
|
-
|
|
16144
|
+
E == null || E(l), $ == null || $(!1), c == null || c(q);
|
|
16148
16145
|
},
|
|
16149
|
-
[l,
|
|
16146
|
+
[l, E, $, c]
|
|
16150
16147
|
), K = O(async () => {
|
|
16151
16148
|
const q = await $n({ onFormSave: d });
|
|
16152
|
-
q.succeed && (
|
|
16149
|
+
q.succeed && (_ == null || _({
|
|
16153
16150
|
...Hi(
|
|
16154
16151
|
y,
|
|
16155
16152
|
q.currentId
|
|
16156
16153
|
),
|
|
16157
16154
|
initialViewType: "form"
|
|
16158
16155
|
}));
|
|
16159
|
-
}, [y, d,
|
|
16156
|
+
}, [y, d, _]), Q = O(async () => {
|
|
16160
16157
|
const q = await $n({ onFormSave: d });
|
|
16161
|
-
q.succeed && (
|
|
16158
|
+
q.succeed && (_ == null || _({
|
|
16162
16159
|
...Hi(
|
|
16163
16160
|
y,
|
|
16164
16161
|
q.currentId
|
|
16165
16162
|
),
|
|
16166
16163
|
initialViewType: "tree"
|
|
16167
16164
|
}));
|
|
16168
|
-
}, [y, d,
|
|
16165
|
+
}, [y, d, _]), de = O(
|
|
16169
16166
|
async (q) => {
|
|
16170
|
-
(await $n({ onFormSave: d })).succeed && (
|
|
16167
|
+
(await $n({ onFormSave: d })).succeed && (_ == null || _({
|
|
16171
16168
|
model: "ir.attachment",
|
|
16172
16169
|
res_id: q.id,
|
|
16173
16170
|
initialViewType: "form"
|
|
16174
16171
|
}));
|
|
16175
16172
|
},
|
|
16176
|
-
[d,
|
|
16173
|
+
[d, _]
|
|
16177
16174
|
);
|
|
16178
16175
|
return gn(
|
|
16179
16176
|
"pagedown",
|
|
@@ -16197,19 +16194,19 @@ function _v({ toolbar: t }) {
|
|
|
16197
16194
|
), gn(
|
|
16198
16195
|
"ctrl+l,command+l",
|
|
16199
16196
|
async () => {
|
|
16200
|
-
!A || !R || !await F.current.cancelUnsavedChanges() || (
|
|
16197
|
+
!A || !R || !await F.current.cancelUnsavedChanges() || (E == null || E(l), c == null || c(R));
|
|
16201
16198
|
},
|
|
16202
16199
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
16203
16200
|
[
|
|
16204
16201
|
A,
|
|
16205
16202
|
R,
|
|
16206
16203
|
l,
|
|
16207
|
-
|
|
16204
|
+
E,
|
|
16208
16205
|
c,
|
|
16209
16206
|
F
|
|
16210
16207
|
]
|
|
16211
|
-
), l ? /* @__PURE__ */
|
|
16212
|
-
S && /* @__PURE__ */
|
|
16208
|
+
), l ? /* @__PURE__ */ L(ct, { wrap: !0, children: [
|
|
16209
|
+
S && /* @__PURE__ */ L(he, { children: [
|
|
16213
16210
|
/* @__PURE__ */ s(nt, {}),
|
|
16214
16211
|
/* @__PURE__ */ s(gt, {}),
|
|
16215
16212
|
/* @__PURE__ */ s(gt, {})
|
|
@@ -16320,7 +16317,7 @@ const Ev = it(_v), fc = it(
|
|
|
16320
16317
|
tryAction: r
|
|
16321
16318
|
}) => {
|
|
16322
16319
|
const { t: o } = we();
|
|
16323
|
-
return /* @__PURE__ */
|
|
16320
|
+
return /* @__PURE__ */ L(ct, { children: [
|
|
16324
16321
|
/* @__PURE__ */ s(
|
|
16325
16322
|
At,
|
|
16326
16323
|
{
|
|
@@ -16359,7 +16356,7 @@ const Hi = (t, e) => ({
|
|
|
16359
16356
|
const y = (b) => {
|
|
16360
16357
|
r == null || r(b.target.value);
|
|
16361
16358
|
};
|
|
16362
|
-
return /* @__PURE__ */
|
|
16359
|
+
return /* @__PURE__ */ L(Ge, { gutter: 8, wrap: !1, align: "middle", children: [
|
|
16363
16360
|
l ? null : /* @__PURE__ */ s(Oe, { flex: "none", style: { paddingRight: 0 }, children: m ? /* @__PURE__ */ s(
|
|
16364
16361
|
je,
|
|
16365
16362
|
{
|
|
@@ -16447,7 +16444,7 @@ const Hi = (t, e) => ({
|
|
|
16447
16444
|
var f;
|
|
16448
16445
|
return d && ((f = a.current) == null ? void 0 : f.focus());
|
|
16449
16446
|
},
|
|
16450
|
-
children: /* @__PURE__ */
|
|
16447
|
+
children: /* @__PURE__ */ L(Ot, { layout: "vertical", onFinish: c, autoComplete: "off", children: [
|
|
16451
16448
|
/* @__PURE__ */ s(
|
|
16452
16449
|
Ot.Item,
|
|
16453
16450
|
{
|
|
@@ -16462,7 +16459,7 @@ const Hi = (t, e) => ({
|
|
|
16462
16459
|
children: /* @__PURE__ */ s(ft, { style: { width: "100%" }, autoFocus: !0, ref: a })
|
|
16463
16460
|
}
|
|
16464
16461
|
),
|
|
16465
|
-
/* @__PURE__ */ s(Ge, { align: "middle", justify: "end", children: /* @__PURE__ */ s(Oe, { children: /* @__PURE__ */
|
|
16462
|
+
/* @__PURE__ */ s(Ge, { align: "middle", justify: "end", children: /* @__PURE__ */ s(Oe, { children: /* @__PURE__ */ L(ct, { children: [
|
|
16466
16463
|
/* @__PURE__ */ s(
|
|
16467
16464
|
je,
|
|
16468
16465
|
{
|
|
@@ -16521,7 +16518,7 @@ function Mv({ refreshGraph: t }) {
|
|
|
16521
16518
|
previousView: d,
|
|
16522
16519
|
setPreviousView: f
|
|
16523
16520
|
} = pe(It);
|
|
16524
|
-
return /* @__PURE__ */
|
|
16521
|
+
return /* @__PURE__ */ L(ct, { wrap: !0, children: [
|
|
16525
16522
|
/* @__PURE__ */ s(
|
|
16526
16523
|
Ua,
|
|
16527
16524
|
{
|
|
@@ -16599,11 +16596,11 @@ const $v = (t) => {
|
|
|
16599
16596
|
limit: F,
|
|
16600
16597
|
setLimit: $,
|
|
16601
16598
|
searchParams: R,
|
|
16602
|
-
searchValues:
|
|
16599
|
+
searchValues: E,
|
|
16603
16600
|
setSearchValues: I,
|
|
16604
16601
|
currentView: A,
|
|
16605
16602
|
totalItems: k,
|
|
16606
|
-
searchTreeNameSearch:
|
|
16603
|
+
searchTreeNameSearch: _
|
|
16607
16604
|
} = u || {}, [M, W] = T(!0), [V, N] = T(!0), [U, j] = T();
|
|
16608
16605
|
ce(() => {
|
|
16609
16606
|
n && N(!0);
|
|
@@ -16614,8 +16611,8 @@ const $v = (t) => {
|
|
|
16614
16611
|
), B = ut(async () => {
|
|
16615
16612
|
if (!n)
|
|
16616
16613
|
return;
|
|
16617
|
-
const te = await
|
|
16618
|
-
params:
|
|
16614
|
+
const te = await H.getHandler().searchAllIds({
|
|
16615
|
+
params: _ ? i : ee,
|
|
16619
16616
|
model: r,
|
|
16620
16617
|
context: o,
|
|
16621
16618
|
totalItems: k
|
|
@@ -16623,7 +16620,7 @@ const $v = (t) => {
|
|
|
16623
16620
|
j(te);
|
|
16624
16621
|
}, [
|
|
16625
16622
|
n,
|
|
16626
|
-
|
|
16623
|
+
_,
|
|
16627
16624
|
i,
|
|
16628
16625
|
ee,
|
|
16629
16626
|
r,
|
|
@@ -16644,7 +16641,7 @@ const $v = (t) => {
|
|
|
16644
16641
|
z();
|
|
16645
16642
|
}, [
|
|
16646
16643
|
n,
|
|
16647
|
-
|
|
16644
|
+
_,
|
|
16648
16645
|
i,
|
|
16649
16646
|
ee,
|
|
16650
16647
|
k,
|
|
@@ -16691,7 +16688,7 @@ const $v = (t) => {
|
|
|
16691
16688
|
if (!n || !e)
|
|
16692
16689
|
return null;
|
|
16693
16690
|
const le = f ? _s : Kn;
|
|
16694
|
-
return /* @__PURE__ */
|
|
16691
|
+
return /* @__PURE__ */ L(he, { children: [
|
|
16695
16692
|
/* @__PURE__ */ s(to, { title: e.title || e.name, children: /* @__PURE__ */ s(
|
|
16696
16693
|
Mv,
|
|
16697
16694
|
{
|
|
@@ -16718,7 +16715,7 @@ const $v = (t) => {
|
|
|
16718
16715
|
},
|
|
16719
16716
|
searchError: q,
|
|
16720
16717
|
searchVisible: b,
|
|
16721
|
-
searchValues:
|
|
16718
|
+
searchValues: E,
|
|
16722
16719
|
showLimitOptions: !1
|
|
16723
16720
|
}
|
|
16724
16721
|
),
|
|
@@ -16752,7 +16749,7 @@ const $v = (t) => {
|
|
|
16752
16749
|
setResults: u,
|
|
16753
16750
|
setCurrentItemIndex: p
|
|
16754
16751
|
} = t;
|
|
16755
|
-
return e ? /* @__PURE__ */
|
|
16752
|
+
return e ? /* @__PURE__ */ L(he, { children: [
|
|
16756
16753
|
/* @__PURE__ */ s(to, { children: /* @__PURE__ */ s(Ev, { toolbar: a == null ? void 0 : a.toolbar }) }),
|
|
16757
16754
|
/* @__PURE__ */ s(
|
|
16758
16755
|
Jn,
|
|
@@ -16791,7 +16788,7 @@ const $v = (t) => {
|
|
|
16791
16788
|
};
|
|
16792
16789
|
function Lv() {
|
|
16793
16790
|
const { isLoading: t, dashboardRef: e, moveItemsEnabled: n, setMoveItemsEnabled: r } = pe(Ds), { permissions: o } = jt(), { t: i } = we();
|
|
16794
|
-
return /* @__PURE__ */
|
|
16791
|
+
return /* @__PURE__ */ L(ct, { wrap: !0, children: [
|
|
16795
16792
|
(o == null ? void 0 : o.write) && /* @__PURE__ */ s(
|
|
16796
16793
|
At,
|
|
16797
16794
|
{
|
|
@@ -16843,7 +16840,7 @@ const Hv = (t) => {
|
|
|
16843
16840
|
const { dashboardData: e, visible: n } = t, r = Z(), o = pe(
|
|
16844
16841
|
Nt
|
|
16845
16842
|
), { openShortcut: i } = o || {};
|
|
16846
|
-
return !e || !n ? null : /* @__PURE__ */
|
|
16843
|
+
return !e || !n ? null : /* @__PURE__ */ L(
|
|
16847
16844
|
Vv,
|
|
16848
16845
|
{
|
|
16849
16846
|
dashboardRef: r,
|
|
@@ -16933,9 +16930,9 @@ function Wv(t, e) {
|
|
|
16933
16930
|
initialSearchParams: y = [],
|
|
16934
16931
|
currentPage: b,
|
|
16935
16932
|
order: w
|
|
16936
|
-
} = t, [C, x] = T(), [D, S] = T([]), [P, F] = T(!0), $ = p || void 0, [R,
|
|
16933
|
+
} = t, [C, x] = T(), [D, S] = T([]), [P, F] = T(!0), $ = p || void 0, [R, E] = T(
|
|
16937
16934
|
$
|
|
16938
|
-
), [I, A] = T([]), [k,
|
|
16935
|
+
), [I, A] = T([]), [k, _] = T(), [M, W] = T([]), [V, N] = T(), [U, j] = T(), [ee, B] = T(!1), [z, K] = T(!1), [Q, de] = T(), { t: q } = we(), { showErrorNotification: oe } = yt(), {
|
|
16939
16936
|
permissions: se,
|
|
16940
16937
|
loading: G,
|
|
16941
16938
|
error: le
|
|
@@ -16962,7 +16959,7 @@ function Wv(t, e) {
|
|
|
16962
16959
|
[ie, ne, C, k, M]
|
|
16963
16960
|
);
|
|
16964
16961
|
function ke(Se) {
|
|
16965
|
-
|
|
16962
|
+
E(Se), ve == null || ve(Se);
|
|
16966
16963
|
}
|
|
16967
16964
|
const $e = O(
|
|
16968
16965
|
(Se) => {
|
|
@@ -16980,7 +16977,7 @@ function Wv(t, e) {
|
|
|
16980
16977
|
const [Pe, Ne] = ze;
|
|
16981
16978
|
Ne !== "dashboard" ? tt.push({
|
|
16982
16979
|
viewTuple: ze,
|
|
16983
|
-
promise:
|
|
16980
|
+
promise: H.getHandler().getView({
|
|
16984
16981
|
model: r,
|
|
16985
16982
|
type: Ne,
|
|
16986
16983
|
id: Pe,
|
|
@@ -17085,7 +17082,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17085
17082
|
]);
|
|
17086
17083
|
l({ tabKey: c, canWeClose: qe }), Ue(() => {
|
|
17087
17084
|
const Se = D.find((He) => He.type === "tree"), tt = D.find((He) => d.id ? He.type === d.type && He.view_id === d.id : He.type === d.type);
|
|
17088
|
-
$e(tt || Se), p ? ve == null || ve($) : (ke(void 0),
|
|
17085
|
+
$e(tt || Se), p ? ve == null || ve($) : (ke(void 0), _(void 0)), me();
|
|
17089
17086
|
}, [r, i, p]), Ue(() => {
|
|
17090
17087
|
if (ie === c) {
|
|
17091
17088
|
ve == null || ve(R);
|
|
@@ -17115,7 +17112,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17115
17112
|
let rt;
|
|
17116
17113
|
if (Ne === -1) {
|
|
17117
17114
|
try {
|
|
17118
|
-
rt = (ze = await
|
|
17115
|
+
rt = (ze = await H.getHandler().search({
|
|
17119
17116
|
model: r,
|
|
17120
17117
|
params: [["id", "in", [Pe]]],
|
|
17121
17118
|
skipRead: !0,
|
|
@@ -17166,7 +17163,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17166
17163
|
$e(Se);
|
|
17167
17164
|
}
|
|
17168
17165
|
}
|
|
17169
|
-
return P || G ? /* @__PURE__ */ s(nt, {}) : C ? /* @__PURE__ */
|
|
17166
|
+
return P || G ? /* @__PURE__ */ s(nt, {}) : C ? /* @__PURE__ */ L(
|
|
17170
17167
|
Gg,
|
|
17171
17168
|
{
|
|
17172
17169
|
title: a,
|
|
@@ -17178,7 +17175,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17178
17175
|
onNewClicked: et,
|
|
17179
17176
|
currentId: R,
|
|
17180
17177
|
setCurrentId: ke,
|
|
17181
|
-
setCurrentItemIndex:
|
|
17178
|
+
setCurrentItemIndex: _,
|
|
17182
17179
|
currentItemIndex: k,
|
|
17183
17180
|
results: M,
|
|
17184
17181
|
setResults: W,
|
|
@@ -17214,7 +17211,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17214
17211
|
formDefaultValues: f,
|
|
17215
17212
|
results: M,
|
|
17216
17213
|
setResults: W,
|
|
17217
|
-
setCurrentItemIndex:
|
|
17214
|
+
setCurrentItemIndex: _,
|
|
17218
17215
|
formForcedValues: u,
|
|
17219
17216
|
limit: v,
|
|
17220
17217
|
searchTreeRef: Y,
|
|
@@ -17361,9 +17358,9 @@ function zv(t, e) {
|
|
|
17361
17358
|
setIsLoading: p,
|
|
17362
17359
|
openAction: m,
|
|
17363
17360
|
moveItemsEnabled: g
|
|
17364
|
-
} = pe(Ds), h = Z(), v = Z(), [y] = Re(
|
|
17365
|
-
|
|
17366
|
-
), [w] = Re(
|
|
17361
|
+
} = pe(Ds), h = Z(), v = Z(), [y] = Re(H.getHandler().getView), [b] = Re(
|
|
17362
|
+
H.getHandler().readObjects
|
|
17363
|
+
), [w] = Re(H.getHandler().update), C = Lt(
|
|
17367
17364
|
wt.FEATURE_READFORVIEW
|
|
17368
17365
|
);
|
|
17369
17366
|
ce(() => {
|
|
@@ -17377,16 +17374,16 @@ function zv(t, e) {
|
|
|
17377
17374
|
async function x() {
|
|
17378
17375
|
d(!0), p(!0), u(void 0);
|
|
17379
17376
|
try {
|
|
17380
|
-
const
|
|
17381
|
-
v.current =
|
|
17382
|
-
const
|
|
17377
|
+
const E = await D(), I = await P(E), A = E.fields[Eo].relation, k = I[Eo].items;
|
|
17378
|
+
v.current = E.fields;
|
|
17379
|
+
const _ = await S({
|
|
17383
17380
|
items: k,
|
|
17384
17381
|
model: A,
|
|
17385
17382
|
context: r
|
|
17386
|
-
}), M = await F(
|
|
17383
|
+
}), M = await F(_);
|
|
17387
17384
|
u(void 0), l(M), d(!1), p(!1);
|
|
17388
|
-
} catch (
|
|
17389
|
-
u(JSON.stringify(
|
|
17385
|
+
} catch (E) {
|
|
17386
|
+
u(JSON.stringify(E));
|
|
17390
17387
|
}
|
|
17391
17388
|
}
|
|
17392
17389
|
async function D() {
|
|
@@ -17397,7 +17394,7 @@ function zv(t, e) {
|
|
|
17397
17394
|
});
|
|
17398
17395
|
}
|
|
17399
17396
|
async function S({
|
|
17400
|
-
items:
|
|
17397
|
+
items: E,
|
|
17401
17398
|
model: I,
|
|
17402
17399
|
context: A
|
|
17403
17400
|
}) {
|
|
@@ -17414,26 +17411,26 @@ function zv(t, e) {
|
|
|
17414
17411
|
fields: h.current
|
|
17415
17412
|
},
|
|
17416
17413
|
model: I,
|
|
17417
|
-
items:
|
|
17414
|
+
items: E,
|
|
17418
17415
|
context: A,
|
|
17419
17416
|
currentView: "form"
|
|
17420
17417
|
});
|
|
17421
17418
|
return k;
|
|
17422
17419
|
}
|
|
17423
|
-
async function P(
|
|
17420
|
+
async function P(E) {
|
|
17424
17421
|
return (await b({
|
|
17425
17422
|
model: n,
|
|
17426
17423
|
ids: [o],
|
|
17427
|
-
fields:
|
|
17424
|
+
fields: E.fields,
|
|
17428
17425
|
context: r
|
|
17429
17426
|
}))[0];
|
|
17430
17427
|
}
|
|
17431
|
-
async function F(
|
|
17428
|
+
async function F(E) {
|
|
17432
17429
|
const I = [];
|
|
17433
|
-
for (const k of
|
|
17434
|
-
const { values:
|
|
17435
|
-
if (
|
|
17436
|
-
const M = parseInt(
|
|
17430
|
+
for (const k of E) {
|
|
17431
|
+
const { values: _ } = k;
|
|
17432
|
+
if (_.action_id && _.action_id.length > 0) {
|
|
17433
|
+
const M = parseInt(_.action_id[0], 10), W = ka({
|
|
17437
17434
|
actionId: M,
|
|
17438
17435
|
rootContext: r
|
|
17439
17436
|
}).then((V) => ({ ...k, actionData: V }));
|
|
@@ -17442,10 +17439,10 @@ function zv(t, e) {
|
|
|
17442
17439
|
}
|
|
17443
17440
|
return await Promise.all(I);
|
|
17444
17441
|
}
|
|
17445
|
-
async function $(
|
|
17442
|
+
async function $(E) {
|
|
17446
17443
|
if (!g)
|
|
17447
17444
|
return;
|
|
17448
|
-
const I =
|
|
17445
|
+
const I = E.filter((M) => {
|
|
17449
17446
|
const W = a.find(
|
|
17450
17447
|
(N) => N.id === M.id
|
|
17451
17448
|
);
|
|
@@ -17473,14 +17470,14 @@ function zv(t, e) {
|
|
|
17473
17470
|
position: JSON.stringify(W).replace(/"/g, "'")
|
|
17474
17471
|
}
|
|
17475
17472
|
};
|
|
17476
|
-
}),
|
|
17473
|
+
}), _ = {
|
|
17477
17474
|
fields: h.current,
|
|
17478
17475
|
items: k
|
|
17479
17476
|
};
|
|
17480
17477
|
await w({
|
|
17481
17478
|
model: n,
|
|
17482
17479
|
id: o,
|
|
17483
|
-
values: { [Eo]:
|
|
17480
|
+
values: { [Eo]: _ },
|
|
17484
17481
|
fields: v.current,
|
|
17485
17482
|
context: r
|
|
17486
17483
|
});
|
|
@@ -17488,8 +17485,8 @@ function zv(t, e) {
|
|
|
17488
17485
|
async function R() {
|
|
17489
17486
|
m(i);
|
|
17490
17487
|
}
|
|
17491
|
-
return c ? /* @__PURE__ */ s(Bt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Rt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(Yv, { onPositionItemsChanged: $, children: a.map((
|
|
17492
|
-
const { actionData: A, values: k } =
|
|
17488
|
+
return c ? /* @__PURE__ */ s(Bt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Rt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(Yv, { onPositionItemsChanged: $, children: a.map((E, I) => {
|
|
17489
|
+
const { actionData: A, values: k } = E, { position: _, id: M } = k, {
|
|
17493
17490
|
actionId: W,
|
|
17494
17491
|
actionType: V,
|
|
17495
17492
|
key: N,
|
|
@@ -17504,7 +17501,7 @@ function zv(t, e) {
|
|
|
17504
17501
|
} = A;
|
|
17505
17502
|
let q = {};
|
|
17506
17503
|
try {
|
|
17507
|
-
q = JSON.parse(
|
|
17504
|
+
q = JSON.parse(_.replace(/'/g, '"'));
|
|
17508
17505
|
} catch {
|
|
17509
17506
|
q = { x: I * 2, y: 0, w: 2, h: 3 };
|
|
17510
17507
|
}
|
|
@@ -17637,7 +17634,7 @@ const Kv = $t(zv), Jv = (t) => {
|
|
|
17637
17634
|
u(!0);
|
|
17638
17635
|
let P = [];
|
|
17639
17636
|
if (n.domain) {
|
|
17640
|
-
const F = await
|
|
17637
|
+
const F = await H.getHandler().evalDomain({
|
|
17641
17638
|
domain: n.domain,
|
|
17642
17639
|
values: Cn({
|
|
17643
17640
|
fields: y == null ? void 0 : y.getFields(),
|
|
@@ -17649,15 +17646,15 @@ const Kv = $t(zv), Jv = (t) => {
|
|
|
17649
17646
|
P = [...P, ...F];
|
|
17650
17647
|
}
|
|
17651
17648
|
try {
|
|
17652
|
-
const $ = (await
|
|
17649
|
+
const $ = (await H.getHandler().search({
|
|
17653
17650
|
model: p,
|
|
17654
17651
|
params: P,
|
|
17655
17652
|
fieldsToRetrieve: [h],
|
|
17656
17653
|
context: { ...b == null ? void 0 : b(), ...m }
|
|
17657
17654
|
})).map((R) => {
|
|
17658
|
-
const
|
|
17659
|
-
let I =
|
|
17660
|
-
return Array.isArray(
|
|
17655
|
+
const E = R[h];
|
|
17656
|
+
let I = E;
|
|
17657
|
+
return Array.isArray(E) && (I = E[1]), { label: I, value: R.id };
|
|
17661
17658
|
});
|
|
17662
17659
|
l($);
|
|
17663
17660
|
} catch (F) {
|
|
@@ -17681,7 +17678,7 @@ const Kv = $t(zv), Jv = (t) => {
|
|
|
17681
17678
|
F.push({ id: R, operation: "pendingLink" });
|
|
17682
17679
|
}), w(F);
|
|
17683
17680
|
};
|
|
17684
|
-
return f && a.length === 0 ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ s(he, { children: /* @__PURE__ */
|
|
17681
|
+
return f && a.length === 0 ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ s(he, { children: /* @__PURE__ */ L("div", { className: "flex flex-row", children: [
|
|
17685
17682
|
/* @__PURE__ */ s(
|
|
17686
17683
|
rr.Group,
|
|
17687
17684
|
{
|
|
@@ -17692,7 +17689,7 @@ const Kv = $t(zv), Jv = (t) => {
|
|
|
17692
17689
|
children: /* @__PURE__ */ s(Ge, { children: a.map((P) => /* @__PURE__ */ s(Oe, { span: Math.floor(24 / v), children: /* @__PURE__ */ s(rr, { value: P.value, children: P.label }) })) })
|
|
17693
17690
|
}
|
|
17694
17691
|
),
|
|
17695
|
-
!g && /* @__PURE__ */
|
|
17692
|
+
!g && /* @__PURE__ */ L(ct, { children: [
|
|
17696
17693
|
/* @__PURE__ */ s(
|
|
17697
17694
|
je,
|
|
17698
17695
|
{
|
|
@@ -17807,8 +17804,8 @@ const Kv = $t(zv), Jv = (t) => {
|
|
|
17807
17804
|
const g = Pt(m);
|
|
17808
17805
|
return g && /* @__PURE__ */ s(g, {});
|
|
17809
17806
|
};
|
|
17810
|
-
return /* @__PURE__ */ s("ul", { style: c, children: (t.value || []).map((m, g) => /* @__PURE__ */
|
|
17811
|
-
/* @__PURE__ */
|
|
17807
|
+
return /* @__PURE__ */ s("ul", { style: c, children: (t.value || []).map((m, g) => /* @__PURE__ */ L("li", { style: d(m.active), children: [
|
|
17808
|
+
/* @__PURE__ */ L(ct, { children: [
|
|
17812
17809
|
m.icon && p(m.icon),
|
|
17813
17810
|
" ",
|
|
17814
17811
|
m.title
|
|
@@ -17853,20 +17850,20 @@ const Kv = $t(zv), Jv = (t) => {
|
|
|
17853
17850
|
function pb({ text: t }) {
|
|
17854
17851
|
const e = t.split(`
|
|
17855
17852
|
`);
|
|
17856
|
-
return /* @__PURE__ */ s("div", { children: e.map((n, r) => /* @__PURE__ */
|
|
17853
|
+
return /* @__PURE__ */ s("div", { children: e.map((n, r) => /* @__PURE__ */ L(jn, { children: [
|
|
17857
17854
|
n,
|
|
17858
17855
|
r !== e.length - 1 && /* @__PURE__ */ s("br", {})
|
|
17859
17856
|
] }, r)) });
|
|
17860
17857
|
}
|
|
17861
17858
|
const mb = (t) => {
|
|
17862
17859
|
const { data: e, style: n } = t, { t: r } = we();
|
|
17863
|
-
return /* @__PURE__ */
|
|
17860
|
+
return /* @__PURE__ */ L(Jo, { style: { ...n, textAlign: "start" }, children: [
|
|
17864
17861
|
/* @__PURE__ */ s(
|
|
17865
17862
|
db,
|
|
17866
17863
|
{
|
|
17867
17864
|
avatar: /* @__PURE__ */ s(fb, { email: e.email, theme: "mp" }),
|
|
17868
17865
|
title: e.author,
|
|
17869
|
-
description: /* @__PURE__ */
|
|
17866
|
+
description: /* @__PURE__ */ L(ct, { direction: "horizontal", children: [
|
|
17870
17867
|
/* @__PURE__ */ s("span", { title: e.date, children: dt(e.date).fromNow() }),
|
|
17871
17868
|
e.isAuthor && /* @__PURE__ */ s(Ko, { color: "blue", children: r("author") })
|
|
17872
17869
|
] }),
|
|
@@ -17984,7 +17981,7 @@ function Ib(t, e) {
|
|
|
17984
17981
|
const { children: n } = t, [r, o] = T("welcome"), { t: i } = we(), { showErrorNotification: a } = yt(), { globalValues: l, rootContext: c } = Xt(), d = Zr(
|
|
17985
17982
|
wt.FEATURE_LOGGABLE_ACTIONS
|
|
17986
17983
|
), [f, u] = Re(
|
|
17987
|
-
|
|
17984
|
+
H.getHandler().logAction
|
|
17988
17985
|
);
|
|
17989
17986
|
ce(() => () => {
|
|
17990
17987
|
u();
|
|
@@ -18004,7 +18001,7 @@ function Ib(t, e) {
|
|
|
18004
18001
|
processAction: h.current.processAction,
|
|
18005
18002
|
handleOpenActionUrl: C,
|
|
18006
18003
|
handleOpenActionResourceUrl: x,
|
|
18007
|
-
handleOpenModelAndViews:
|
|
18004
|
+
handleOpenModelAndViews: E
|
|
18008
18005
|
}));
|
|
18009
18006
|
function v(I) {
|
|
18010
18007
|
if (I === r) {
|
|
@@ -18015,14 +18012,14 @@ function Ib(t, e) {
|
|
|
18015
18012
|
}
|
|
18016
18013
|
const y = O(
|
|
18017
18014
|
(I, A) => {
|
|
18018
|
-
const k = [...p], [
|
|
18019
|
-
k.splice(A, 0,
|
|
18015
|
+
const k = [...p], [_] = k.splice(I, 1);
|
|
18016
|
+
k.splice(A, 0, _), m(k);
|
|
18020
18017
|
},
|
|
18021
18018
|
[p]
|
|
18022
18019
|
), b = O((I, A) => {
|
|
18023
18020
|
m(
|
|
18024
18021
|
(k) => k.map(
|
|
18025
|
-
(
|
|
18022
|
+
(_) => _.key === I ? { ..._, title: A } : _
|
|
18026
18023
|
)
|
|
18027
18024
|
);
|
|
18028
18025
|
}, []);
|
|
@@ -18033,7 +18030,7 @@ function Ib(t, e) {
|
|
|
18033
18030
|
g.current.set(I, A);
|
|
18034
18031
|
}
|
|
18035
18032
|
async function C(I) {
|
|
18036
|
-
const { actionRawData: A, res_id: k, limit:
|
|
18033
|
+
const { actionRawData: A, res_id: k, limit: _ } = I, M = await H.getHandler().getFields({
|
|
18037
18034
|
model: I.model,
|
|
18038
18035
|
context: c
|
|
18039
18036
|
});
|
|
@@ -18042,7 +18039,7 @@ function Ib(t, e) {
|
|
|
18042
18039
|
);
|
|
18043
18040
|
const V = k || W.active_id || W.id;
|
|
18044
18041
|
if (V) {
|
|
18045
|
-
const j = await
|
|
18042
|
+
const j = await H.getHandler().readObjects({
|
|
18046
18043
|
model: I.model,
|
|
18047
18044
|
context: c,
|
|
18048
18045
|
ids: [V]
|
|
@@ -18057,7 +18054,7 @@ function Ib(t, e) {
|
|
|
18057
18054
|
}) : N = {};
|
|
18058
18055
|
const U = await (async () => {
|
|
18059
18056
|
try {
|
|
18060
|
-
return A != null && A.domain && Array.isArray(A.domain) && A.domain.length > 0 ? A.domain : A && A.domain && !Array.isArray(A.domain) ? await
|
|
18057
|
+
return A != null && A.domain && Array.isArray(A.domain) && A.domain.length > 0 ? A.domain : A && A.domain && !Array.isArray(A.domain) ? await H.getHandler().evalDomain({
|
|
18061
18058
|
domain: A.domain,
|
|
18062
18059
|
values: { ...W || {}, ...l },
|
|
18063
18060
|
context: { ...c, ...N },
|
|
@@ -18069,7 +18066,7 @@ function Ib(t, e) {
|
|
|
18069
18066
|
})();
|
|
18070
18067
|
R({
|
|
18071
18068
|
...I,
|
|
18072
|
-
limit:
|
|
18069
|
+
limit: _,
|
|
18073
18070
|
context: { ...c, ...N },
|
|
18074
18071
|
domain: U,
|
|
18075
18072
|
actionRawData: {
|
|
@@ -18084,7 +18081,7 @@ function Ib(t, e) {
|
|
|
18084
18081
|
view_id: A,
|
|
18085
18082
|
res_id: k
|
|
18086
18083
|
}) {
|
|
18087
|
-
const
|
|
18084
|
+
const _ = await H.getHandler().getView({
|
|
18088
18085
|
model: I,
|
|
18089
18086
|
id: A || void 0,
|
|
18090
18087
|
type: "form",
|
|
@@ -18094,12 +18091,12 @@ function Ib(t, e) {
|
|
|
18094
18091
|
action_id: -1,
|
|
18095
18092
|
action_type: "ir.actions.act_window",
|
|
18096
18093
|
model: I,
|
|
18097
|
-
views: [[
|
|
18094
|
+
views: [[_.view_id, "form"]],
|
|
18098
18095
|
context: c,
|
|
18099
18096
|
domain: [],
|
|
18100
|
-
title:
|
|
18097
|
+
title: _.title || I,
|
|
18101
18098
|
target: "current",
|
|
18102
|
-
initialView: { id:
|
|
18099
|
+
initialView: { id: _.view_id, type: "form" },
|
|
18103
18100
|
res_id: k
|
|
18104
18101
|
});
|
|
18105
18102
|
}
|
|
@@ -18107,12 +18104,12 @@ function Ib(t, e) {
|
|
|
18107
18104
|
action: I,
|
|
18108
18105
|
values: A,
|
|
18109
18106
|
forced_values: k,
|
|
18110
|
-
initialViewType:
|
|
18107
|
+
initialViewType: _,
|
|
18111
18108
|
res_id: M,
|
|
18112
18109
|
domain: W = [],
|
|
18113
18110
|
context: V = {}
|
|
18114
18111
|
}) {
|
|
18115
|
-
const N = await
|
|
18112
|
+
const N = await H.getHandler().getActionData({
|
|
18116
18113
|
action: I,
|
|
18117
18114
|
context: c
|
|
18118
18115
|
});
|
|
@@ -18129,7 +18126,7 @@ function Ib(t, e) {
|
|
|
18129
18126
|
values: l
|
|
18130
18127
|
}), K = N.domain, Q = await (async () => {
|
|
18131
18128
|
try {
|
|
18132
|
-
return K ? await
|
|
18129
|
+
return K ? await H.getHandler().evalDomain({
|
|
18133
18130
|
domain: K,
|
|
18134
18131
|
values: l,
|
|
18135
18132
|
context: { ...c, ...z, ...V }
|
|
@@ -18152,7 +18149,7 @@ function Ib(t, e) {
|
|
|
18152
18149
|
else if (ne === "dashboard")
|
|
18153
18150
|
Y.push([void 0, "dashboard"]);
|
|
18154
18151
|
else {
|
|
18155
|
-
const { view_id: ie } = await
|
|
18152
|
+
const { view_id: ie } = await H.getHandler().getView({
|
|
18156
18153
|
model: de,
|
|
18157
18154
|
type: ne,
|
|
18158
18155
|
id: ve,
|
|
@@ -18162,9 +18159,9 @@ function Ib(t, e) {
|
|
|
18162
18159
|
}
|
|
18163
18160
|
}
|
|
18164
18161
|
let ge;
|
|
18165
|
-
if (
|
|
18162
|
+
if (_) {
|
|
18166
18163
|
const [be, ve] = Y.find(
|
|
18167
|
-
([ne, ie]) => ie ===
|
|
18164
|
+
([ne, ie]) => ie === _
|
|
18168
18165
|
);
|
|
18169
18166
|
ge = { id: be, type: ve };
|
|
18170
18167
|
} else {
|
|
@@ -18196,7 +18193,7 @@ function Ib(t, e) {
|
|
|
18196
18193
|
title: I,
|
|
18197
18194
|
content: A,
|
|
18198
18195
|
key: k,
|
|
18199
|
-
action:
|
|
18196
|
+
action: _
|
|
18200
18197
|
}) {
|
|
18201
18198
|
let M = [...p];
|
|
18202
18199
|
p.length === 1 && p[0].key === "welcome" && (M = [...p.filter((W) => W.key !== "welcome")]), m([
|
|
@@ -18206,7 +18203,7 @@ function Ib(t, e) {
|
|
|
18206
18203
|
key: k,
|
|
18207
18204
|
closable: !0,
|
|
18208
18205
|
content: A,
|
|
18209
|
-
action:
|
|
18206
|
+
action: _
|
|
18210
18207
|
}
|
|
18211
18208
|
]), o(k);
|
|
18212
18209
|
}
|
|
@@ -18214,7 +18211,7 @@ function Ib(t, e) {
|
|
|
18214
18211
|
relateData: I,
|
|
18215
18212
|
fields: A,
|
|
18216
18213
|
values: k,
|
|
18217
|
-
action_id:
|
|
18214
|
+
action_id: _,
|
|
18218
18215
|
action_type: M
|
|
18219
18216
|
}) {
|
|
18220
18217
|
const {
|
|
@@ -18228,7 +18225,7 @@ function Ib(t, e) {
|
|
|
18228
18225
|
} = I, [z, K] = U[0], Q = { id: z, type: K }, de = V, q = ln({
|
|
18229
18226
|
context: de,
|
|
18230
18227
|
values: { ...k, ...l }
|
|
18231
|
-
}), oe = N, se = N ? await
|
|
18228
|
+
}), oe = N, se = N ? await H.getHandler().evalDomain({
|
|
18232
18229
|
domain: N,
|
|
18233
18230
|
values: Cn({
|
|
18234
18231
|
fields: A,
|
|
@@ -18245,7 +18242,7 @@ function Ib(t, e) {
|
|
|
18245
18242
|
domain: se,
|
|
18246
18243
|
title: ee,
|
|
18247
18244
|
initialView: Q,
|
|
18248
|
-
action_id:
|
|
18245
|
+
action_id: _,
|
|
18249
18246
|
action_type: M,
|
|
18250
18247
|
limit: B,
|
|
18251
18248
|
actionRawData: {
|
|
@@ -18260,12 +18257,12 @@ function Ib(t, e) {
|
|
|
18260
18257
|
const {
|
|
18261
18258
|
action_id: A,
|
|
18262
18259
|
action_type: k,
|
|
18263
|
-
res_id:
|
|
18260
|
+
res_id: _,
|
|
18264
18261
|
view_id: M,
|
|
18265
18262
|
overrideUnsettedLimit: W = !1,
|
|
18266
18263
|
values: V = {},
|
|
18267
18264
|
domain: N
|
|
18268
|
-
} = I, U = `${k},${A}`, j = await
|
|
18265
|
+
} = I, U = `${k},${A}`, j = await H.getHandler().getActionData({
|
|
18269
18266
|
action: U,
|
|
18270
18267
|
context: c
|
|
18271
18268
|
}), ee = j.context, B = ln({
|
|
@@ -18275,7 +18272,7 @@ function Ib(t, e) {
|
|
|
18275
18272
|
});
|
|
18276
18273
|
let z = [];
|
|
18277
18274
|
const K = N && N.length > 0 ? N : j.domain;
|
|
18278
|
-
(N == null ? void 0 : N.length) > 0 ? z = N : j.domain && (z = await
|
|
18275
|
+
(N == null ? void 0 : N.length) > 0 ? z = N : j.domain && (z = await H.getHandler().evalDomain({
|
|
18279
18276
|
domain: j.domain,
|
|
18280
18277
|
values: { ...l, ...V },
|
|
18281
18278
|
context: { ...c, ...B }
|
|
@@ -18295,7 +18292,7 @@ function Ib(t, e) {
|
|
|
18295
18292
|
else if (ie === "dashboard")
|
|
18296
18293
|
te.push([void 0, "dashboard"]);
|
|
18297
18294
|
else {
|
|
18298
|
-
const { view_id: Te } = await
|
|
18295
|
+
const { view_id: Te } = await H.getHandler().getView({
|
|
18299
18296
|
model: Q,
|
|
18300
18297
|
type: ie,
|
|
18301
18298
|
id: ne,
|
|
@@ -18321,7 +18318,7 @@ function Ib(t, e) {
|
|
|
18321
18318
|
initialView: be,
|
|
18322
18319
|
action_id: A,
|
|
18323
18320
|
action_type: k,
|
|
18324
|
-
res_id:
|
|
18321
|
+
res_id: _,
|
|
18325
18322
|
treeExpandable: le,
|
|
18326
18323
|
limit: W && (G === 0 || G === !1) ? Ct : G,
|
|
18327
18324
|
actionRawData: {
|
|
@@ -18335,17 +18332,17 @@ function Ib(t, e) {
|
|
|
18335
18332
|
model: I,
|
|
18336
18333
|
values: A,
|
|
18337
18334
|
forced_values: k,
|
|
18338
|
-
initialViewType:
|
|
18335
|
+
initialViewType: _,
|
|
18339
18336
|
res_id: M,
|
|
18340
18337
|
domain: W,
|
|
18341
18338
|
context: V
|
|
18342
18339
|
}) {
|
|
18343
|
-
const N = await
|
|
18340
|
+
const N = await H.getHandler().getActionStringForModel(I);
|
|
18344
18341
|
await D({
|
|
18345
18342
|
action: N,
|
|
18346
18343
|
values: A,
|
|
18347
18344
|
forced_values: k,
|
|
18348
|
-
initialViewType:
|
|
18345
|
+
initialViewType: _,
|
|
18349
18346
|
res_id: M,
|
|
18350
18347
|
domain: W,
|
|
18351
18348
|
context: V
|
|
@@ -18356,7 +18353,7 @@ function Ib(t, e) {
|
|
|
18356
18353
|
const {
|
|
18357
18354
|
domain: A,
|
|
18358
18355
|
context: k,
|
|
18359
|
-
model:
|
|
18356
|
+
model: _,
|
|
18360
18357
|
views: M,
|
|
18361
18358
|
title: W,
|
|
18362
18359
|
target: V,
|
|
@@ -18383,15 +18380,15 @@ function Ib(t, e) {
|
|
|
18383
18380
|
console.error(le);
|
|
18384
18381
|
}
|
|
18385
18382
|
if (V !== "current" && V !== void 0) {
|
|
18386
|
-
const le = await
|
|
18387
|
-
model:
|
|
18383
|
+
const le = await H.getHandler().getView({
|
|
18384
|
+
model: _,
|
|
18388
18385
|
type: "form",
|
|
18389
18386
|
id: N.type === "form" ? N.id : void 0,
|
|
18390
18387
|
context: { ...c, ...k }
|
|
18391
18388
|
});
|
|
18392
18389
|
h.current.openActionModal({
|
|
18393
18390
|
domain: A,
|
|
18394
|
-
model:
|
|
18391
|
+
model: _,
|
|
18395
18392
|
formView: le,
|
|
18396
18393
|
context: { ...c, ...k },
|
|
18397
18394
|
actionData: {
|
|
@@ -18413,7 +18410,7 @@ function Ib(t, e) {
|
|
|
18413
18410
|
tabKey: se,
|
|
18414
18411
|
title: W,
|
|
18415
18412
|
views: M,
|
|
18416
|
-
model:
|
|
18413
|
+
model: _,
|
|
18417
18414
|
context: { ...k, ...c },
|
|
18418
18415
|
domain: A,
|
|
18419
18416
|
setCanWeClose: w,
|
|
@@ -18433,18 +18430,18 @@ function Ib(t, e) {
|
|
|
18433
18430
|
});
|
|
18434
18431
|
}
|
|
18435
18432
|
}
|
|
18436
|
-
async function
|
|
18433
|
+
async function E({
|
|
18437
18434
|
model: I,
|
|
18438
18435
|
domain: A = [],
|
|
18439
18436
|
title: k,
|
|
18440
|
-
viewModes:
|
|
18437
|
+
viewModes: _ = ["tree", "form"]
|
|
18441
18438
|
}) {
|
|
18442
18439
|
const M = [];
|
|
18443
|
-
for (const U of
|
|
18440
|
+
for (const U of _)
|
|
18444
18441
|
if (U === "dashboard")
|
|
18445
18442
|
M.push([void 0, "dashboard"]);
|
|
18446
18443
|
else {
|
|
18447
|
-
const { view_id: j } = await
|
|
18444
|
+
const { view_id: j } = await H.getHandler().getView({
|
|
18448
18445
|
model: I,
|
|
18449
18446
|
type: U,
|
|
18450
18447
|
context: c
|
|
@@ -18533,7 +18530,7 @@ function Eb(t) {
|
|
|
18533
18530
|
), $ = O(() => {
|
|
18534
18531
|
S();
|
|
18535
18532
|
}, [S]);
|
|
18536
|
-
return /* @__PURE__ */
|
|
18533
|
+
return /* @__PURE__ */ L(
|
|
18537
18534
|
"div",
|
|
18538
18535
|
{
|
|
18539
18536
|
ref: y,
|
|
@@ -18799,8 +18796,8 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18799
18796
|
} = m || {}, C = re(() => {
|
|
18800
18797
|
if (!y || !y.view_id || !y.extra)
|
|
18801
18798
|
return;
|
|
18802
|
-
const { action_id: R, action_type:
|
|
18803
|
-
if (!R || !
|
|
18799
|
+
const { action_id: R, action_type: E } = y.extra || {};
|
|
18800
|
+
if (!R || !E) {
|
|
18804
18801
|
l(!1);
|
|
18805
18802
|
return;
|
|
18806
18803
|
}
|
|
@@ -18808,7 +18805,7 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18808
18805
|
let A = !1;
|
|
18809
18806
|
return y.type === "form" && (A = b || !1), {
|
|
18810
18807
|
action_id: R,
|
|
18811
|
-
action_type:
|
|
18808
|
+
action_type: E,
|
|
18812
18809
|
view_id: I,
|
|
18813
18810
|
res_id: A
|
|
18814
18811
|
};
|
|
@@ -18820,8 +18817,8 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18820
18817
|
S();
|
|
18821
18818
|
}, [x]);
|
|
18822
18819
|
function D(R) {
|
|
18823
|
-
const
|
|
18824
|
-
(
|
|
18820
|
+
const E = R;
|
|
18821
|
+
(E == null ? void 0 : E.action_type) !== "ir.actions.wizard" && g(E);
|
|
18825
18822
|
}
|
|
18826
18823
|
const S = O(async () => {
|
|
18827
18824
|
if (!C)
|
|
@@ -18856,14 +18853,14 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18856
18853
|
else {
|
|
18857
18854
|
if (!y)
|
|
18858
18855
|
return;
|
|
18859
|
-
const R = h.find((
|
|
18856
|
+
const R = h.find((_) => _.key === v), { action_id: E, action_type: I } = (R == null ? void 0 : R.action) || {}, A = y.view_id;
|
|
18860
18857
|
let k = !1;
|
|
18861
|
-
if (!
|
|
18858
|
+
if (!E || !I) {
|
|
18862
18859
|
l(!1);
|
|
18863
18860
|
return;
|
|
18864
18861
|
}
|
|
18865
18862
|
y.type === "form" && (k = b || !1), await r({
|
|
18866
|
-
action_id:
|
|
18863
|
+
action_id: E,
|
|
18867
18864
|
action_type: I,
|
|
18868
18865
|
view_id: A,
|
|
18869
18866
|
res_id: k
|
|
@@ -18889,7 +18886,7 @@ const { useToken: kb } = Xe, Mw = (t) => {
|
|
|
18889
18886
|
onToggleFavourite: $,
|
|
18890
18887
|
onItemClick: D,
|
|
18891
18888
|
placement: "bottomRight",
|
|
18892
|
-
header: /* @__PURE__ */
|
|
18889
|
+
header: /* @__PURE__ */ L("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
18893
18890
|
/* @__PURE__ */ s("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
|
|
18894
18891
|
/* @__PURE__ */ s("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ s(Et, { title: f == null ? void 0 : f("edit_favorites"), children: /* @__PURE__ */ s(
|
|
18895
18892
|
ns,
|
|
@@ -18923,7 +18920,7 @@ export {
|
|
|
18923
18920
|
gb as CommentsTimelineField,
|
|
18924
18921
|
Da as ConfigContext,
|
|
18925
18922
|
tf as ConfigContextProvider,
|
|
18926
|
-
|
|
18923
|
+
H as ConnectionProvider,
|
|
18927
18924
|
Vf as ContentRootProvider,
|
|
18928
18925
|
Pw as CurrentTabContent,
|
|
18929
18926
|
Ct as DEFAULT_SEARCH_LIMIT,
|