@gisce/react-ooui 1.4.0-rc.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionbar/TreeActionBar.d.ts.map +1 -1
- package/dist/hooks/useSearch.d.ts.map +1 -1
- package/dist/react-ooui.es.js +641 -648
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +9 -9
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/views/Tree.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/actionbar/TreeActionBar.tsx +1 -8
- package/src/hooks/useSearch.ts +17 -8
- package/src/widgets/views/SearchTree.tsx +1 -1
- package/src/widgets/views/Tree.tsx +12 -12
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import Je, { useContext as Y, useState as T, useEffect as
|
|
2
|
-
import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as
|
|
3
|
-
import { Label as
|
|
1
|
+
import Je, { useContext as Y, useState as T, useEffect as pe, useRef as ue, useCallback as $e, forwardRef as wt, useImperativeHandle as bt } from "react";
|
|
2
|
+
import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as Ge, Button as Ie, Dropdown as Bt, Menu as He, Spin as Le, Divider as ln, Space as Ye, Input as nt, Select as xt, Checkbox as Nt, Alert as Ze, Timeline as tr, Statistic as ei, Card as ti, Tag as Dr, message as xn, DatePicker as Mn, TimePicker as Vr, InputNumber as En, Progress as ni, Avatar as ri, Badge as oi, Pagination as ii, Tabs as Ar, Popover as si, Radio as nr, Switch as ai, Steps as rr, Layout as li } from "antd";
|
|
3
|
+
import { Label as Vt, Field as In, Tree as Rr, Reference as ci, Selection as $n, Many2one as kr, Boolean as di, Container as ui, parseContext as vt, Form as Mr, Integer as _n, SearchFieldTypes as ft, SearchFilter as fi, transformDomainForChildWidget as Er, graphProcessor as $r, parseGraph as Ln, graphFieldUtils as mi } from "@gisce/ooui";
|
|
4
4
|
import * as or from "@ant-design/icons";
|
|
5
|
-
import Lr, { QuestionCircleOutlined as Nr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as
|
|
5
|
+
import Lr, { QuestionCircleOutlined as Nr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as At, WarningOutlined as Pr, CloseOutlined as jt, CheckOutlined as Rt, TranslationOutlined as Hr, FolderOpenOutlined as Nn, DownloadOutlined as Pn, ClearOutlined as Hn, StarFilled as Br, StarOutlined as jr, UpOutlined as hi, SearchOutlined as Bn, RightCircleOutlined as pi, ThunderboltOutlined as jn, PrinterOutlined as Kn, EnterOutlined as Kr, PlusSquareOutlined as gi, MinusSquareOutlined as yi, FileAddOutlined as cn, AlignLeftOutlined as vi, ApiOutlined as wi, DeleteOutlined as Yn, LeftOutlined as Yr, RightOutlined as Wr, EyeOutlined as bi, FormOutlined as Pt, TableOutlined as Wn, AreaChartOutlined as xi, CalendarOutlined as Ci, LinkOutlined as Ur, SaveOutlined as Si, CopyOutlined as Un, InfoCircleOutlined as Gr, ReloadOutlined as dn, EditOutlined as qr, FilterOutlined as zr, CloseCircleFilled as Ti, BorderOuterOutlined as Fi, SettingOutlined as Oi, ExportOutlined as Ii } from "@ant-design/icons";
|
|
6
6
|
import { Interweave as Gn } from "interweave";
|
|
7
|
-
import { jsxs as P, jsx as n, Fragment as
|
|
7
|
+
import { jsxs as P, jsx as n, Fragment as ne } from "react/jsx-runtime";
|
|
8
8
|
import * as ir from "@tabler/icons-react";
|
|
9
9
|
import _i from "antd/lib/input/TextArea";
|
|
10
10
|
import Kt from "styled-components";
|
|
11
11
|
import qn from "react-measure";
|
|
12
12
|
import Dn from "antd/lib/typography/Title";
|
|
13
13
|
import { Line as Di, Column as Vi, Pie as Ai } from "@ant-design/plots";
|
|
14
|
-
import
|
|
14
|
+
import Ct from "use-deep-compare-effect";
|
|
15
15
|
import { Table as Ri } from "@gisce/react-formiga-table";
|
|
16
16
|
import { fileTypeFromBuffer as ki } from "file-type-buffer-browser";
|
|
17
17
|
import { isPresetStatusColor as Mi } from "antd/lib/_util/colors";
|
|
@@ -382,7 +382,7 @@ function ve({
|
|
|
382
382
|
if (!o)
|
|
383
383
|
return p();
|
|
384
384
|
const h = /* @__PURE__ */ n(un, {
|
|
385
|
-
ooui: new
|
|
385
|
+
ooui: new Vt({
|
|
386
386
|
name: c + "_label",
|
|
387
387
|
string: f,
|
|
388
388
|
help: d,
|
|
@@ -404,13 +404,13 @@ function ve({
|
|
|
404
404
|
flex: "auto",
|
|
405
405
|
children: p()
|
|
406
406
|
})]
|
|
407
|
-
}))() : (() => /* @__PURE__ */ P(
|
|
407
|
+
}))() : (() => /* @__PURE__ */ P(ne, {
|
|
408
408
|
children: [h, p()]
|
|
409
409
|
}))();
|
|
410
410
|
}
|
|
411
411
|
const {
|
|
412
412
|
confirm: es
|
|
413
|
-
} =
|
|
413
|
+
} = Ge, Yt = ({
|
|
414
414
|
onOk: e,
|
|
415
415
|
confirmMessage: t,
|
|
416
416
|
lang: r
|
|
@@ -704,7 +704,7 @@ const Zr = (e) => {
|
|
|
704
704
|
children: /* @__PURE__ */ P(Bt.Button, {
|
|
705
705
|
disabled: !a || v,
|
|
706
706
|
onClick: V,
|
|
707
|
-
icon: /* @__PURE__ */ n(
|
|
707
|
+
icon: /* @__PURE__ */ n(At, {}),
|
|
708
708
|
type: f ? "primary" : void 0,
|
|
709
709
|
overlay: /* @__PURE__ */ n(os, {
|
|
710
710
|
ooui: i,
|
|
@@ -789,7 +789,7 @@ function fn() {
|
|
|
789
789
|
const [e, t] = T(
|
|
790
790
|
lr()
|
|
791
791
|
);
|
|
792
|
-
return
|
|
792
|
+
return pe(() => {
|
|
793
793
|
function r() {
|
|
794
794
|
t(lr());
|
|
795
795
|
}
|
|
@@ -832,7 +832,7 @@ const Xr = (e) => {
|
|
|
832
832
|
}, {
|
|
833
833
|
error: ss,
|
|
834
834
|
warning: as
|
|
835
|
-
} =
|
|
835
|
+
} = Ge, Ue = (e) => {
|
|
836
836
|
const {
|
|
837
837
|
message: t,
|
|
838
838
|
type: r,
|
|
@@ -856,8 +856,8 @@ const Xr = (e) => {
|
|
|
856
856
|
modalWidth: l
|
|
857
857
|
} = fn(), {
|
|
858
858
|
t: u
|
|
859
|
-
} = Y(we), [c, f] = T([]), [d, m] = T(!1), [v, p] = T(!1), [h, g] = T({}), y =
|
|
860
|
-
|
|
859
|
+
} = Y(we), [c, f] = T([]), [d, m] = T(!1), [v, p] = T(!1), [h, g] = T({}), y = ue();
|
|
860
|
+
pe(() => {
|
|
861
861
|
t ? O() : g({});
|
|
862
862
|
}, [t]);
|
|
863
863
|
async function O() {
|
|
@@ -866,7 +866,7 @@ const Xr = (e) => {
|
|
|
866
866
|
const b = await _();
|
|
867
867
|
await w(b);
|
|
868
868
|
} catch (b) {
|
|
869
|
-
|
|
869
|
+
Ue(b);
|
|
870
870
|
}
|
|
871
871
|
m(!1);
|
|
872
872
|
}
|
|
@@ -939,12 +939,12 @@ const Xr = (e) => {
|
|
|
939
939
|
fields: {}
|
|
940
940
|
});
|
|
941
941
|
} catch (b) {
|
|
942
|
-
|
|
942
|
+
Ue(b);
|
|
943
943
|
}
|
|
944
944
|
p(!1), a();
|
|
945
945
|
}
|
|
946
946
|
function E() {
|
|
947
|
-
return d ? /* @__PURE__ */ n(
|
|
947
|
+
return d ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
|
|
948
948
|
children: [V(), /* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(Ce, {
|
|
949
949
|
justify: "end",
|
|
950
950
|
children: /* @__PURE__ */ P(Ye, {
|
|
@@ -954,7 +954,7 @@ const Xr = (e) => {
|
|
|
954
954
|
disabled: v,
|
|
955
955
|
children: u("cancel")
|
|
956
956
|
}), /* @__PURE__ */ n(Ie, {
|
|
957
|
-
icon: v ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(
|
|
957
|
+
icon: v ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(Rt, {}),
|
|
958
958
|
disabled: v,
|
|
959
959
|
onClick: D,
|
|
960
960
|
style: {
|
|
@@ -967,7 +967,7 @@ const Xr = (e) => {
|
|
|
967
967
|
})]
|
|
968
968
|
});
|
|
969
969
|
}
|
|
970
|
-
return /* @__PURE__ */ n(
|
|
970
|
+
return /* @__PURE__ */ n(Ge, {
|
|
971
971
|
title: u("translate"),
|
|
972
972
|
centered: !0,
|
|
973
973
|
width: l,
|
|
@@ -994,7 +994,7 @@ function ze(e) {
|
|
|
994
994
|
}
|
|
995
995
|
const {
|
|
996
996
|
info: ls
|
|
997
|
-
} =
|
|
997
|
+
} = Ge, ct = (e) => {
|
|
998
998
|
ls({
|
|
999
999
|
title: "",
|
|
1000
1000
|
centered: !0,
|
|
@@ -1053,7 +1053,7 @@ const {
|
|
|
1053
1053
|
} = o || {}, [f, d] = T(!1), {
|
|
1054
1054
|
t: m
|
|
1055
1055
|
} = Y(we);
|
|
1056
|
-
return s ? /* @__PURE__ */ P(
|
|
1056
|
+
return s ? /* @__PURE__ */ P(ne, {
|
|
1057
1057
|
children: [/* @__PURE__ */ n("div", {
|
|
1058
1058
|
onClick: () => {
|
|
1059
1059
|
if (u != null && u()) {
|
|
@@ -1088,7 +1088,7 @@ const {
|
|
|
1088
1088
|
d(!1), l == null || l();
|
|
1089
1089
|
}
|
|
1090
1090
|
})]
|
|
1091
|
-
}) : /* @__PURE__ */ n(
|
|
1091
|
+
}) : /* @__PURE__ */ n(ne, {
|
|
1092
1092
|
children: /* @__PURE__ */ P(Ce, {
|
|
1093
1093
|
gutter: 8,
|
|
1094
1094
|
wrap: !1,
|
|
@@ -1121,7 +1121,7 @@ const {
|
|
|
1121
1121
|
defaultSeed: fs
|
|
1122
1122
|
} = Pe, ms = us(fs), {
|
|
1123
1123
|
Option: hs
|
|
1124
|
-
} =
|
|
1124
|
+
} = xt, to = (e) => {
|
|
1125
1125
|
const {
|
|
1126
1126
|
ooui: t
|
|
1127
1127
|
} = e, {
|
|
@@ -1151,7 +1151,7 @@ const {
|
|
|
1151
1151
|
children: m
|
|
1152
1152
|
}, d);
|
|
1153
1153
|
});
|
|
1154
|
-
return /* @__PURE__ */ n(a && !s ? ps :
|
|
1154
|
+
return /* @__PURE__ */ n(a && !s ? ps : xt, {
|
|
1155
1155
|
disabled: s,
|
|
1156
1156
|
onChange: r,
|
|
1157
1157
|
value: i,
|
|
@@ -1160,7 +1160,7 @@ const {
|
|
|
1160
1160
|
showSearch: !0,
|
|
1161
1161
|
children: u
|
|
1162
1162
|
});
|
|
1163
|
-
}, ps = Kt(
|
|
1163
|
+
}, ps = Kt(xt)`
|
|
1164
1164
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
1165
1165
|
background-color: ${ms.colorPrimaryBg};
|
|
1166
1166
|
}
|
|
@@ -1223,16 +1223,16 @@ var Rs = As, ks = Rs, Ms = /^\s+/;
|
|
|
1223
1223
|
function Es(e) {
|
|
1224
1224
|
return e && e.slice(0, ks(e) + 1).replace(Ms, "");
|
|
1225
1225
|
}
|
|
1226
|
-
var $s = Es, Ls = oo, Ns = Ls.Symbol, io = Ns, dr = io, so = Object.prototype, Ps = so.hasOwnProperty, Hs = so.toString,
|
|
1226
|
+
var $s = Es, Ls = oo, Ns = Ls.Symbol, io = Ns, dr = io, so = Object.prototype, Ps = so.hasOwnProperty, Hs = so.toString, Et = dr ? dr.toStringTag : void 0;
|
|
1227
1227
|
function Bs(e) {
|
|
1228
|
-
var t = Ps.call(e,
|
|
1228
|
+
var t = Ps.call(e, Et), r = e[Et];
|
|
1229
1229
|
try {
|
|
1230
|
-
e[
|
|
1230
|
+
e[Et] = void 0;
|
|
1231
1231
|
var i = !0;
|
|
1232
1232
|
} catch {
|
|
1233
1233
|
}
|
|
1234
1234
|
var o = Hs.call(e);
|
|
1235
|
-
return i && (t ? e[
|
|
1235
|
+
return i && (t ? e[Et] = r : delete e[Et]), o;
|
|
1236
1236
|
}
|
|
1237
1237
|
var js = Bs, Ks = Object.prototype, Ys = Ks.toString;
|
|
1238
1238
|
function Ws(e) {
|
|
@@ -1319,7 +1319,7 @@ function ba(e) {
|
|
|
1319
1319
|
const r = Buffer.from(e, "base64").length / 1e3;
|
|
1320
1320
|
return `${Math.round((r + Number.EPSILON) * 100) / 100} KB`;
|
|
1321
1321
|
}
|
|
1322
|
-
async function
|
|
1322
|
+
async function Dt(e) {
|
|
1323
1323
|
const t = await ki(
|
|
1324
1324
|
Buffer.from(e, "base64")
|
|
1325
1325
|
);
|
|
@@ -1359,13 +1359,13 @@ const xa = (e) => {
|
|
|
1359
1359
|
onChange: i
|
|
1360
1360
|
} = e, {
|
|
1361
1361
|
readOnly: o
|
|
1362
|
-
} = t, s =
|
|
1362
|
+
} = t, s = ue(null), {
|
|
1363
1363
|
t: a
|
|
1364
1364
|
} = Y(we), l = (d) => {
|
|
1365
1365
|
i == null || i(d);
|
|
1366
1366
|
};
|
|
1367
1367
|
async function u() {
|
|
1368
|
-
const d = await
|
|
1368
|
+
const d = await Dt(r), m = `data:${d == null ? void 0 : d.mime};base64,${r}`, v = document.createElement("a");
|
|
1369
1369
|
v.href = m, v.download = `image.${d == null ? void 0 : d.ext}`, v.click();
|
|
1370
1370
|
}
|
|
1371
1371
|
async function c(d) {
|
|
@@ -1376,7 +1376,7 @@ const xa = (e) => {
|
|
|
1376
1376
|
function f() {
|
|
1377
1377
|
l(void 0);
|
|
1378
1378
|
}
|
|
1379
|
-
return /* @__PURE__ */ P(
|
|
1379
|
+
return /* @__PURE__ */ P(ne, {
|
|
1380
1380
|
children: [/* @__PURE__ */ P(Ce, {
|
|
1381
1381
|
gutter: 8,
|
|
1382
1382
|
wrap: !1,
|
|
@@ -1452,7 +1452,7 @@ const xa = (e) => {
|
|
|
1452
1452
|
r && r(i);
|
|
1453
1453
|
}
|
|
1454
1454
|
});
|
|
1455
|
-
},
|
|
1455
|
+
}, Ot = (e) => {
|
|
1456
1456
|
const t = e.arch, r = e.fields, i = new Rr(r);
|
|
1457
1457
|
return i.parse(t), i;
|
|
1458
1458
|
}, Fa = (e, t, r) => e.columns.map((o) => {
|
|
@@ -1498,7 +1498,7 @@ function co(e, t) {
|
|
|
1498
1498
|
r[i.id] = i[t];
|
|
1499
1499
|
}), r;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function It({
|
|
1502
1502
|
resultsToSort: e,
|
|
1503
1503
|
sorter: t,
|
|
1504
1504
|
fields: r
|
|
@@ -1529,7 +1529,7 @@ const zn = async (e) => {
|
|
|
1529
1529
|
};
|
|
1530
1530
|
let f = [], d;
|
|
1531
1531
|
if (a === "tree" && (o == null ? void 0 : o.arch)) {
|
|
1532
|
-
const h = (p =
|
|
1532
|
+
const h = (p = Ot(o)) == null ? void 0 : p.colors, g = await H.getHandler().readEvalUiObjects({
|
|
1533
1533
|
model: r,
|
|
1534
1534
|
ids: u,
|
|
1535
1535
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1585,7 +1585,7 @@ const zn = async (e) => {
|
|
|
1585
1585
|
} = t, [s, a] = T(!0), [l, u] = T(), [c, f] = T(/* @__PURE__ */ new Map()), d = Y(Ne), {
|
|
1586
1586
|
getContext: m
|
|
1587
1587
|
} = d || {};
|
|
1588
|
-
|
|
1588
|
+
Ct(() => {
|
|
1589
1589
|
p();
|
|
1590
1590
|
}, [t]);
|
|
1591
1591
|
const v = async (h) => o && o[h] ? o[h] : await H.getHandler().getView({
|
|
@@ -1606,7 +1606,7 @@ const zn = async (e) => {
|
|
|
1606
1606
|
a(!1);
|
|
1607
1607
|
}
|
|
1608
1608
|
};
|
|
1609
|
-
return s ? /* @__PURE__ */ n(
|
|
1609
|
+
return s ? /* @__PURE__ */ n(Le, {}) : l ? /* @__PURE__ */ n(Ze, {
|
|
1610
1610
|
className: "mt-10",
|
|
1611
1611
|
message: l,
|
|
1612
1612
|
type: "error",
|
|
@@ -1636,7 +1636,7 @@ const zn = async (e) => {
|
|
|
1636
1636
|
} = i, _ = s.filter((b) => b.values), w = Y(Ne), {
|
|
1637
1637
|
getContext: V
|
|
1638
1638
|
} = w || {};
|
|
1639
|
-
|
|
1639
|
+
Ct(() => {
|
|
1640
1640
|
E();
|
|
1641
1641
|
}, [s]);
|
|
1642
1642
|
const D = (b) => {
|
|
@@ -1675,7 +1675,7 @@ const zn = async (e) => {
|
|
|
1675
1675
|
message: u,
|
|
1676
1676
|
type: "error",
|
|
1677
1677
|
banner: !0
|
|
1678
|
-
}) : a ? /* @__PURE__ */ n(
|
|
1678
|
+
}) : a ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
|
|
1679
1679
|
children: [/* @__PURE__ */ n(tr, {
|
|
1680
1680
|
style: {
|
|
1681
1681
|
padding: "1rem"
|
|
@@ -1747,7 +1747,7 @@ const zn = async (e) => {
|
|
|
1747
1747
|
} = Va(), {
|
|
1748
1748
|
ooui: r,
|
|
1749
1749
|
value: i
|
|
1750
|
-
} = e, o = /* @__PURE__ */ P(
|
|
1750
|
+
} = e, o = /* @__PURE__ */ P(ne, {
|
|
1751
1751
|
children: [/* @__PURE__ */ P("span", {
|
|
1752
1752
|
children: [r.label, " "]
|
|
1753
1753
|
}), r.tooltip && /* @__PURE__ */ n(ht, {
|
|
@@ -1785,7 +1785,7 @@ const zn = async (e) => {
|
|
|
1785
1785
|
} else
|
|
1786
1786
|
r[i] = e[i];
|
|
1787
1787
|
}), r;
|
|
1788
|
-
},
|
|
1788
|
+
}, Ft = (e, t) => ka(e, t), Sn = ({
|
|
1789
1789
|
source: e,
|
|
1790
1790
|
target: t,
|
|
1791
1791
|
fields: r
|
|
@@ -1880,7 +1880,7 @@ const zn = async (e) => {
|
|
|
1880
1880
|
function yr(e, t, r) {
|
|
1881
1881
|
return r.indexOf(e) === t;
|
|
1882
1882
|
}
|
|
1883
|
-
const
|
|
1883
|
+
const kt = ({
|
|
1884
1884
|
values: e,
|
|
1885
1885
|
fields: t
|
|
1886
1886
|
}) => {
|
|
@@ -1951,7 +1951,7 @@ const Mt = ({
|
|
|
1951
1951
|
} = r, g = Y(Ne), {
|
|
1952
1952
|
getContext: y
|
|
1953
1953
|
} = g || {};
|
|
1954
|
-
|
|
1954
|
+
Ct(() => {
|
|
1955
1955
|
_();
|
|
1956
1956
|
}, [o]);
|
|
1957
1957
|
const O = (D) => {
|
|
@@ -1966,7 +1966,7 @@ const Mt = ({
|
|
|
1966
1966
|
if (p && (D = [["id", "in", s]]), r.domain) {
|
|
1967
1967
|
const C = await H.getHandler().evalDomain({
|
|
1968
1968
|
domain: r.domain,
|
|
1969
|
-
values:
|
|
1969
|
+
values: kt({
|
|
1970
1970
|
fields: g == null ? void 0 : g.getFields(),
|
|
1971
1971
|
values: g.getPlainValues()
|
|
1972
1972
|
}),
|
|
@@ -2037,10 +2037,10 @@ const Mt = ({
|
|
|
2037
2037
|
message: u,
|
|
2038
2038
|
type: "error",
|
|
2039
2039
|
banner: !0
|
|
2040
|
-
}) : /* @__PURE__ */ n(
|
|
2040
|
+
}) : /* @__PURE__ */ n(ne, {
|
|
2041
2041
|
children: /* @__PURE__ */ n("div", {
|
|
2042
2042
|
className: "flex flex-row",
|
|
2043
|
-
children: /* @__PURE__ */ n(
|
|
2043
|
+
children: /* @__PURE__ */ n(xt, {
|
|
2044
2044
|
mode: "multiple",
|
|
2045
2045
|
value: a.length ? s : [],
|
|
2046
2046
|
tagRender: V,
|
|
@@ -2161,14 +2161,14 @@ const Mt = ({
|
|
|
2161
2161
|
if (i.push(a), s(l)) {
|
|
2162
2162
|
const u = r - o;
|
|
2163
2163
|
for (let c = 0; c < u; c += 1)
|
|
2164
|
-
i.push(new
|
|
2164
|
+
i.push(new Vt({ string: "" }));
|
|
2165
2165
|
}
|
|
2166
2166
|
}), i;
|
|
2167
2167
|
}, Wa = ({
|
|
2168
2168
|
row: e,
|
|
2169
2169
|
numberOfColumns: t
|
|
2170
2170
|
}) => e.map((r) => (r._mustExpand && (r.colspan = t), r)), Ua = (e, t) => {
|
|
2171
|
-
const r = e.map((i) => i instanceof
|
|
2171
|
+
const r = e.map((i) => i instanceof Vt && i.fieldForLabel || i instanceof ui ? "auto" : "1fr");
|
|
2172
2172
|
if (r.length < t) {
|
|
2173
2173
|
const i = t - r.length;
|
|
2174
2174
|
for (let o = 0; o < i; o++)
|
|
@@ -2204,7 +2204,7 @@ const Mt = ({
|
|
|
2204
2204
|
row: p,
|
|
2205
2205
|
numberOfColumns: o,
|
|
2206
2206
|
mustFillWithEmpties: r
|
|
2207
|
-
}), l = l.concat(h)), h.map((g) => (g instanceof
|
|
2207
|
+
}), l = l.concat(h)), h.map((g) => (g instanceof Vt && g.fieldForLabel && (a = !0), /* @__PURE__ */ n("div", {
|
|
2208
2208
|
style: {
|
|
2209
2209
|
...Ka({
|
|
2210
2210
|
item: g,
|
|
@@ -2230,7 +2230,7 @@ const Mt = ({
|
|
|
2230
2230
|
});
|
|
2231
2231
|
}, {
|
|
2232
2232
|
confirm: za
|
|
2233
|
-
} =
|
|
2233
|
+
} = Ge, Wt = ({
|
|
2234
2234
|
onOk: e,
|
|
2235
2235
|
onCancel: t,
|
|
2236
2236
|
lang: r
|
|
@@ -2247,7 +2247,7 @@ const Mt = ({
|
|
|
2247
2247
|
});
|
|
2248
2248
|
}, {
|
|
2249
2249
|
error: Ja
|
|
2250
|
-
} =
|
|
2250
|
+
} = Ge, vr = (e) => {
|
|
2251
2251
|
Ja({
|
|
2252
2252
|
title: Oe("formHasErrors", e),
|
|
2253
2253
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
@@ -2256,7 +2256,7 @@ const Mt = ({
|
|
|
2256
2256
|
});
|
|
2257
2257
|
}, {
|
|
2258
2258
|
warning: Za
|
|
2259
|
-
} =
|
|
2259
|
+
} = Ge, Xa = (e, t, r) => {
|
|
2260
2260
|
Za({
|
|
2261
2261
|
title: e,
|
|
2262
2262
|
icon: /* @__PURE__ */ n(Pr, {}),
|
|
@@ -2371,9 +2371,9 @@ const Mt = ({
|
|
|
2371
2371
|
setLimit: V,
|
|
2372
2372
|
searchParams: D = [],
|
|
2373
2373
|
setSearchValues: E
|
|
2374
|
-
} = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B =
|
|
2374
|
+
} = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B = ue(w || Ht), ee = ue([]), Z = $e((se) => {
|
|
2375
2375
|
g == null || g([...se]), q([...se]);
|
|
2376
|
-
}, []), ie =
|
|
2376
|
+
}, []), ie = $e(() => y || j, [y, j]), Q = $e(async () => {
|
|
2377
2377
|
const se = await H.getHandler().nameSearch({
|
|
2378
2378
|
model: t,
|
|
2379
2379
|
payload: l,
|
|
@@ -2382,26 +2382,23 @@ const Mt = ({
|
|
|
2382
2382
|
context: c
|
|
2383
2383
|
});
|
|
2384
2384
|
if (k(se.length), f == null || f(se.length), se.length > 0) {
|
|
2385
|
-
const Se = se.map((
|
|
2386
|
-
|
|
2387
|
-
const
|
|
2385
|
+
const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ve } = Ot(d), je = {};
|
|
2386
|
+
De && (je.colors = De), Ve && (je.status = Ve);
|
|
2387
|
+
const We = await H.getHandler().readEvalUiObjects({
|
|
2388
2388
|
model: t,
|
|
2389
2389
|
ids: Se,
|
|
2390
2390
|
arch: d == null ? void 0 : d.arch,
|
|
2391
2391
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
2392
2392
|
context: c,
|
|
2393
|
-
attrs:
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
ee.current = [...Ge], z(Qt(je[1])), L(gr(je[1]));
|
|
2399
|
-
const ne = Ge.map((Ae) => Ae.id), Te = v !== void 0 ? _t({
|
|
2400
|
-
resultsToSort: Ge,
|
|
2393
|
+
attrs: je
|
|
2394
|
+
}), te = We[0];
|
|
2395
|
+
ee.current = [...te], z(Qt(We[1])), L(gr(We[1]));
|
|
2396
|
+
const Fe = te.map((ce) => ce.id), Me = v !== void 0 ? It({
|
|
2397
|
+
resultsToSort: te,
|
|
2401
2398
|
sorter: v,
|
|
2402
2399
|
fields: { ...d.fields, ...m.fields }
|
|
2403
2400
|
}) : [...ee.current];
|
|
2404
|
-
Z(
|
|
2401
|
+
Z(Me), Fe.length > 0 ? h == null || h(0) : h == null || h(void 0);
|
|
2405
2402
|
} else
|
|
2406
2403
|
Z([]), h == null || h(void 0);
|
|
2407
2404
|
C(!1), u.current = !0;
|
|
@@ -2417,33 +2414,35 @@ const Mt = ({
|
|
|
2417
2414
|
v,
|
|
2418
2415
|
h,
|
|
2419
2416
|
f
|
|
2420
|
-
]), J =
|
|
2417
|
+
]), J = $e(
|
|
2421
2418
|
async (se) => {
|
|
2422
|
-
const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status:
|
|
2419
|
+
const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status: We } = Ot(d), te = {};
|
|
2420
|
+
je && (te.colors = je), We && (te.status = We);
|
|
2421
|
+
const { totalItems: Fe, results: Me, attrsEvaluated: ce } = await H.getHandler().searchForTree({
|
|
2423
2422
|
params: Ve,
|
|
2424
2423
|
limit: B.current,
|
|
2425
2424
|
offset: De || M,
|
|
2426
2425
|
model: t,
|
|
2427
2426
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
2428
2427
|
context: c,
|
|
2429
|
-
attrs:
|
|
2428
|
+
attrs: te
|
|
2430
2429
|
});
|
|
2431
|
-
z(Qt(
|
|
2432
|
-
const
|
|
2433
|
-
resultsToSort:
|
|
2430
|
+
z(Qt(ce)), L(gr(ce)), ee.current = [...Me];
|
|
2431
|
+
const me = v !== void 0 ? It({
|
|
2432
|
+
resultsToSort: Me,
|
|
2434
2433
|
sorter: v,
|
|
2435
2434
|
fields: { ...d.fields, ...m.fields }
|
|
2436
2435
|
}) : [...ee.current];
|
|
2437
|
-
if (Z(
|
|
2438
|
-
const
|
|
2439
|
-
(
|
|
2436
|
+
if (Z(me), y && me.length > 0) {
|
|
2437
|
+
const de = me.findIndex(
|
|
2438
|
+
(Xe) => _ === Xe.id
|
|
2440
2439
|
);
|
|
2441
|
-
|
|
2440
|
+
de === -1 ? h == null || h(0) : h == null || h(de);
|
|
2442
2441
|
} else
|
|
2443
2442
|
h == null || h(void 0);
|
|
2444
2443
|
C(!1);
|
|
2445
|
-
const
|
|
2446
|
-
k(
|
|
2444
|
+
const Te = await Fe;
|
|
2445
|
+
k(Te), f == null || f(Te);
|
|
2447
2446
|
},
|
|
2448
2447
|
[
|
|
2449
2448
|
h,
|
|
@@ -2461,7 +2460,7 @@ const Mt = ({
|
|
|
2461
2460
|
M,
|
|
2462
2461
|
D
|
|
2463
2462
|
]
|
|
2464
|
-
),
|
|
2463
|
+
), fe = $e(
|
|
2465
2464
|
async (se) => {
|
|
2466
2465
|
try {
|
|
2467
2466
|
C(!0), a == null || a(!0), l && !u.current ? await Q() : await J(se);
|
|
@@ -2492,12 +2491,10 @@ const Mt = ({
|
|
|
2492
2491
|
v,
|
|
2493
2492
|
d
|
|
2494
2493
|
]
|
|
2495
|
-
), be =
|
|
2494
|
+
), be = $e(
|
|
2496
2495
|
(se) => {
|
|
2497
|
-
if (JSON.stringify(se) === JSON.stringify(v))
|
|
2498
|
-
return;
|
|
2499
2496
|
p == null || p(se);
|
|
2500
|
-
const Se = se !== void 0 ?
|
|
2497
|
+
const Se = se !== void 0 ? It({
|
|
2501
2498
|
resultsToSort: ie(),
|
|
2502
2499
|
sorter: se,
|
|
2503
2500
|
fields: { ...d.fields, ...m.fields }
|
|
@@ -2505,10 +2502,10 @@ const Mt = ({
|
|
|
2505
2502
|
Z(Se);
|
|
2506
2503
|
},
|
|
2507
2504
|
[p, ie, d, m, Z]
|
|
2508
|
-
),
|
|
2505
|
+
), Ee = $e(
|
|
2509
2506
|
(se) => {
|
|
2510
2507
|
const { params: Se, searchValues: De, limit: Ve, offset: je } = se;
|
|
2511
|
-
b || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), x(!0), R(void 0), A(1), Ve && (B.current = Ve, V == null || V(Ve)), je && I(je),
|
|
2508
|
+
b || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), x(!0), R(void 0), A(1), Ve && (B.current = Ve, V == null || V(Ve)), je && I(je), fe({
|
|
2512
2509
|
params: Se,
|
|
2513
2510
|
newOffset: je
|
|
2514
2511
|
}));
|
|
@@ -2524,14 +2521,14 @@ const Mt = ({
|
|
|
2524
2521
|
A,
|
|
2525
2522
|
V,
|
|
2526
2523
|
I,
|
|
2527
|
-
|
|
2524
|
+
fe
|
|
2528
2525
|
]
|
|
2529
|
-
), _e =
|
|
2526
|
+
), _e = $e(
|
|
2530
2527
|
(se) => {
|
|
2531
2528
|
C(!0), A(se), I((se - 1) * w);
|
|
2532
2529
|
},
|
|
2533
2530
|
[C, w, I, A]
|
|
2534
|
-
), Be =
|
|
2531
|
+
), Be = $e(() => {
|
|
2535
2532
|
b || (r == null || r(void 0), o == null || o([]), E == null || E({}), R(void 0), I(0), A(1), V == null || V(w || Ht));
|
|
2536
2533
|
}, [
|
|
2537
2534
|
b,
|
|
@@ -2542,7 +2539,7 @@ const Mt = ({
|
|
|
2542
2539
|
A,
|
|
2543
2540
|
V,
|
|
2544
2541
|
w
|
|
2545
|
-
]), ge =
|
|
2542
|
+
]), ge = $e(
|
|
2546
2543
|
async (se) => {
|
|
2547
2544
|
const Se = se[(d == null ? void 0 : d.field_parent) || "child_id"], De = await H.getHandler().readObjects({
|
|
2548
2545
|
model: t,
|
|
@@ -2550,14 +2547,14 @@ const Mt = ({
|
|
|
2550
2547
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
2551
2548
|
context: c
|
|
2552
2549
|
});
|
|
2553
|
-
return Z([...ie(), ...De]), lo(
|
|
2550
|
+
return Z([...ie(), ...De]), lo(Ot(d), De);
|
|
2554
2551
|
},
|
|
2555
2552
|
[d, t, c, ie, Z]
|
|
2556
2553
|
);
|
|
2557
2554
|
return {
|
|
2558
|
-
submit:
|
|
2555
|
+
submit: Ee,
|
|
2559
2556
|
clear: Be,
|
|
2560
|
-
fetchResults:
|
|
2557
|
+
fetchResults: fe,
|
|
2561
2558
|
tableRefreshing: b,
|
|
2562
2559
|
searchFilterLoading: S,
|
|
2563
2560
|
searchError: $,
|
|
@@ -2572,7 +2569,7 @@ const Mt = ({
|
|
|
2572
2569
|
statusForResults: U,
|
|
2573
2570
|
totalItems: N
|
|
2574
2571
|
};
|
|
2575
|
-
},
|
|
2572
|
+
}, Qe = Je.createContext(null), ll = (e) => {
|
|
2576
2573
|
const {
|
|
2577
2574
|
children: t,
|
|
2578
2575
|
currentView: r,
|
|
@@ -2599,21 +2596,21 @@ const Mt = ({
|
|
|
2599
2596
|
setSearchTreeNameSearch: E,
|
|
2600
2597
|
goToResourceId: b,
|
|
2601
2598
|
limit: C
|
|
2602
|
-
} = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [
|
|
2603
|
-
|
|
2599
|
+
} = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [fe, be] = T({}), [Ee, _e] = T(C !== void 0 ? C : Ht), [Be, ge] = T(i);
|
|
2600
|
+
pe(() => {
|
|
2604
2601
|
m && m.length > 0 && !v && (p == null || p(0), f == null || f(m[0].id));
|
|
2605
|
-
}, [m]),
|
|
2602
|
+
}, [m]), pe(() => {
|
|
2606
2603
|
_e(C !== void 0 ? C : Ht);
|
|
2607
|
-
}, [C]),
|
|
2604
|
+
}, [C]), pe(() => {
|
|
2608
2605
|
s.length === 1 ? J(s[0]) : s.length > 1 && J(s.filter((Se) => Se.view_id !== r.view_id)[0]);
|
|
2609
|
-
}, [s]),
|
|
2606
|
+
}, [s]), pe(() => {
|
|
2610
2607
|
(Q == null ? void 0 : Q.view_id) === r.view_id && s.length > 1 && J(s.filter((Se) => Se.view_id !== r.view_id)[0]);
|
|
2611
2608
|
}, [r]);
|
|
2612
2609
|
const se = async () => {
|
|
2613
2610
|
var Se;
|
|
2614
2611
|
return await ((Se = a.current) == null ? void 0 : Se.submitForm());
|
|
2615
2612
|
};
|
|
2616
|
-
return /* @__PURE__ */ n(
|
|
2613
|
+
return /* @__PURE__ */ n(Qe.Provider, {
|
|
2617
2614
|
value: {
|
|
2618
2615
|
title: Be,
|
|
2619
2616
|
currentView: r,
|
|
@@ -2661,9 +2658,9 @@ const Mt = ({
|
|
|
2661
2658
|
previousView: Q,
|
|
2662
2659
|
setPreviousView: J,
|
|
2663
2660
|
goToResourceId: b,
|
|
2664
|
-
searchValues:
|
|
2661
|
+
searchValues: fe,
|
|
2665
2662
|
setSearchValues: be,
|
|
2666
|
-
limit:
|
|
2663
|
+
limit: Ee,
|
|
2667
2664
|
setLimit: _e,
|
|
2668
2665
|
setTitle: ge
|
|
2669
2666
|
},
|
|
@@ -2698,7 +2695,7 @@ const Mt = ({
|
|
|
2698
2695
|
},
|
|
2699
2696
|
children: t
|
|
2700
2697
|
});
|
|
2701
|
-
},
|
|
2698
|
+
}, Mt = Je.createContext(null), br = async (e) => {
|
|
2702
2699
|
var t;
|
|
2703
2700
|
for (let r = 0; r < e.length; r++)
|
|
2704
2701
|
await ((t = e == null ? void 0 : e[r]) == null ? void 0 : t.call(e));
|
|
@@ -2706,12 +2703,12 @@ const Mt = ({
|
|
|
2706
2703
|
const {
|
|
2707
2704
|
children: r,
|
|
2708
2705
|
globalValues: i = {}
|
|
2709
|
-
} = e, o =
|
|
2706
|
+
} = e, o = ue(), s = ue(), [a, l] = T(!1), u = Y(st), {
|
|
2710
2707
|
openAction: c
|
|
2711
|
-
} = u || {}, f =
|
|
2708
|
+
} = u || {}, f = ue([]), {
|
|
2712
2709
|
t: d
|
|
2713
2710
|
} = Y(we);
|
|
2714
|
-
|
|
2711
|
+
bt(t, () => ({
|
|
2715
2712
|
openActionModal: w
|
|
2716
2713
|
}));
|
|
2717
2714
|
const [m, v] = T(!1), [p, h] = T({
|
|
@@ -2731,14 +2728,14 @@ const Mt = ({
|
|
|
2731
2728
|
type: M
|
|
2732
2729
|
} = b;
|
|
2733
2730
|
if (M !== "ir.actions.report.xml") {
|
|
2734
|
-
|
|
2731
|
+
Ue(`${M} action not supported`);
|
|
2735
2732
|
return;
|
|
2736
2733
|
}
|
|
2737
2734
|
const {
|
|
2738
2735
|
ids: I
|
|
2739
2736
|
} = F || {};
|
|
2740
2737
|
let N = I || [];
|
|
2741
|
-
const k = typeof $ == "string" ?
|
|
2738
|
+
const k = typeof $ == "string" ? vt({
|
|
2742
2739
|
context: $,
|
|
2743
2740
|
fields: C,
|
|
2744
2741
|
values: S
|
|
@@ -2758,7 +2755,7 @@ const Mt = ({
|
|
|
2758
2755
|
y(j);
|
|
2759
2756
|
}, 1e3);
|
|
2760
2757
|
} catch (j) {
|
|
2761
|
-
s.current = !1, clearInterval(o.current),
|
|
2758
|
+
s.current = !1, clearInterval(o.current), Ue(j), l(!1);
|
|
2762
2759
|
}
|
|
2763
2760
|
}
|
|
2764
2761
|
async function y(E) {
|
|
@@ -2768,11 +2765,11 @@ const Mt = ({
|
|
|
2768
2765
|
id: E
|
|
2769
2766
|
}), b.state && s.current === !0) {
|
|
2770
2767
|
s.current = !1, clearInterval(o.current), l(!1);
|
|
2771
|
-
const C = await
|
|
2768
|
+
const C = await Dt(b.result);
|
|
2772
2769
|
mn(b.result, C.mime);
|
|
2773
2770
|
}
|
|
2774
2771
|
} catch (C) {
|
|
2775
|
-
s.current = !1, clearInterval(o.current), l(!1),
|
|
2772
|
+
s.current = !1, clearInterval(o.current), l(!1), Ue(C.exception || C);
|
|
2776
2773
|
}
|
|
2777
2774
|
}
|
|
2778
2775
|
async function O({
|
|
@@ -2795,7 +2792,7 @@ const Mt = ({
|
|
|
2795
2792
|
fields: b,
|
|
2796
2793
|
values: C,
|
|
2797
2794
|
context: S
|
|
2798
|
-
}) : (
|
|
2795
|
+
}) : (Ue(`${$} action not supported`), {});
|
|
2799
2796
|
}
|
|
2800
2797
|
async function _({
|
|
2801
2798
|
actionData: E,
|
|
@@ -2811,7 +2808,7 @@ const Mt = ({
|
|
|
2811
2808
|
context: S
|
|
2812
2809
|
}))[0]);
|
|
2813
2810
|
const R = {
|
|
2814
|
-
...typeof (x == null ? void 0 : x.context) == "string" ?
|
|
2811
|
+
...typeof (x == null ? void 0 : x.context) == "string" ? vt({
|
|
2815
2812
|
context: x.context,
|
|
2816
2813
|
fields: b,
|
|
2817
2814
|
values: {
|
|
@@ -2824,7 +2821,7 @@ const Mt = ({
|
|
|
2824
2821
|
let F = [];
|
|
2825
2822
|
if (x.domain && (F = await H.getHandler().evalDomain({
|
|
2826
2823
|
domain: x.domain,
|
|
2827
|
-
values:
|
|
2824
|
+
values: kt({
|
|
2828
2825
|
fields: b,
|
|
2829
2826
|
values: {
|
|
2830
2827
|
...C,
|
|
@@ -2922,21 +2919,21 @@ const Mt = ({
|
|
|
2922
2919
|
actionData: void 0
|
|
2923
2920
|
});
|
|
2924
2921
|
}
|
|
2925
|
-
return /* @__PURE__ */ n(
|
|
2926
|
-
children: /* @__PURE__ */ n(
|
|
2922
|
+
return /* @__PURE__ */ n(ne, {
|
|
2923
|
+
children: /* @__PURE__ */ n(Mt.Provider, {
|
|
2927
2924
|
value: {
|
|
2928
2925
|
processAction: O,
|
|
2929
2926
|
globalValues: i
|
|
2930
2927
|
},
|
|
2931
|
-
children: /* @__PURE__ */ P(
|
|
2932
|
-
children: [r, /* @__PURE__ */ n(
|
|
2928
|
+
children: /* @__PURE__ */ P(ne, {
|
|
2929
|
+
children: [r, /* @__PURE__ */ n(Ge, {
|
|
2933
2930
|
title: d("generatingReport"),
|
|
2934
2931
|
open: a,
|
|
2935
2932
|
footer: null,
|
|
2936
2933
|
closable: !1,
|
|
2937
2934
|
centered: !0,
|
|
2938
2935
|
maskClosable: !1,
|
|
2939
|
-
children: /* @__PURE__ */ n(
|
|
2936
|
+
children: /* @__PURE__ */ n(Le, {})
|
|
2940
2937
|
}), /* @__PURE__ */ n(Gt, {
|
|
2941
2938
|
buttonModal: !0,
|
|
2942
2939
|
parentContext: p.context,
|
|
@@ -3015,7 +3012,7 @@ async function ul({
|
|
|
3015
3012
|
initialView: a
|
|
3016
3013
|
};
|
|
3017
3014
|
}
|
|
3018
|
-
const fl =
|
|
3015
|
+
const fl = wt(dl), ml = ({
|
|
3019
3016
|
error: e,
|
|
3020
3017
|
className: t
|
|
3021
3018
|
}) => {
|
|
@@ -3067,24 +3064,24 @@ function pl(e, t) {
|
|
|
3067
3064
|
} = e, {
|
|
3068
3065
|
t: b,
|
|
3069
3066
|
lang: C
|
|
3070
|
-
} = Y(we), [S, x] = T(!1), [$, R] = T(), [F, A] = T(), [M] = ot.useForm(), [I, N] = T(), [k, j] = T(), q = Y(mo), [W, z] = T(), [U, L] = T(!1), B =
|
|
3071
|
-
activeId:
|
|
3067
|
+
} = Y(we), [S, x] = T(!1), [$, R] = T(), [F, A] = T(), [M] = ot.useForm(), [I, N] = T(), [k, j] = T(), q = Y(mo), [W, z] = T(), [U, L] = T(!1), B = ue(), ee = ue({}), Z = ue({}), ie = ue(!1), Q = ue(!1), fe = (E !== void 0 ? E : W) < hl, be = Y(Ne), {
|
|
3068
|
+
activeId: Ee,
|
|
3072
3069
|
getPlainValues: _e
|
|
3073
|
-
} = be || {}, Be = Y(
|
|
3070
|
+
} = be || {}, Be = Y(Qe), {
|
|
3074
3071
|
setFormIsSaving: ge = void 0,
|
|
3075
3072
|
setFormHasChanges: se = void 0,
|
|
3076
3073
|
setCurrentId: Se = void 0,
|
|
3077
3074
|
setFormIsLoading: De = void 0,
|
|
3078
3075
|
setAttachments: Ve = void 0,
|
|
3079
3076
|
title: je = void 0,
|
|
3080
|
-
setTitle:
|
|
3081
|
-
} = (w ? Be : {}) || {},
|
|
3082
|
-
processAction:
|
|
3083
|
-
globalValues:
|
|
3084
|
-
} =
|
|
3085
|
-
|
|
3077
|
+
setTitle: We = void 0
|
|
3078
|
+
} = (w ? Be : {}) || {}, te = Y(Mt), {
|
|
3079
|
+
processAction: Fe,
|
|
3080
|
+
globalValues: Me
|
|
3081
|
+
} = te || {};
|
|
3082
|
+
bt(t, () => ({
|
|
3086
3083
|
submitForm: zt,
|
|
3087
|
-
getFields:
|
|
3084
|
+
getFields: Xe,
|
|
3088
3085
|
getValues: Ke,
|
|
3089
3086
|
getPlainValues: at,
|
|
3090
3087
|
getContext: ae,
|
|
@@ -3093,7 +3090,7 @@ function pl(e, t) {
|
|
|
3093
3090
|
clearAndReload: () => {
|
|
3094
3091
|
B.current = void 0, A(void 0), ut();
|
|
3095
3092
|
}
|
|
3096
|
-
})),
|
|
3093
|
+
})), pe(() => {
|
|
3097
3094
|
if (R(void 0), !(!r && !p)) {
|
|
3098
3095
|
if (!_) {
|
|
3099
3096
|
B.current = void 0, A(void 0);
|
|
@@ -3101,39 +3098,39 @@ function pl(e, t) {
|
|
|
3101
3098
|
}
|
|
3102
3099
|
(i === void 0 && k || i !== void 0 && k && i < 0) && (B.current = void 0, A(void 0)), ut();
|
|
3103
3100
|
}
|
|
3104
|
-
}, [i, r, v, p, _]),
|
|
3101
|
+
}, [i, r, v, p, _]), pe(() => {
|
|
3105
3102
|
U && (vn({
|
|
3106
3103
|
elementHasLostFocus: !0
|
|
3107
3104
|
}), L(!1));
|
|
3108
3105
|
}, [U]);
|
|
3109
|
-
const
|
|
3106
|
+
const ce = (K, G, re) => {
|
|
3110
3107
|
se == null || se(!1), ge == null || ge(!1), s == null || s(K, G, re), Se == null || Se(K);
|
|
3111
|
-
},
|
|
3108
|
+
}, me = () => {
|
|
3112
3109
|
ge == null || ge(!1), o == null || o();
|
|
3113
|
-
},
|
|
3110
|
+
}, Te = (K) => {
|
|
3114
3111
|
ge == null || ge(!1), c == null || c(K);
|
|
3115
3112
|
};
|
|
3116
|
-
function
|
|
3113
|
+
function de() {
|
|
3117
3114
|
return i || B.current;
|
|
3118
3115
|
}
|
|
3119
|
-
function
|
|
3116
|
+
function Xe() {
|
|
3120
3117
|
return k;
|
|
3121
3118
|
}
|
|
3122
3119
|
function Ke() {
|
|
3123
3120
|
const K = {
|
|
3124
3121
|
...xe(k),
|
|
3125
|
-
...
|
|
3122
|
+
...Ae()
|
|
3126
3123
|
};
|
|
3127
3124
|
for (const G in K)
|
|
3128
3125
|
K[G] === void 0 && delete K[G];
|
|
3129
3126
|
return K;
|
|
3130
3127
|
}
|
|
3131
3128
|
function at() {
|
|
3132
|
-
const K = Ke(), G =
|
|
3129
|
+
const K = Ke(), G = Xe();
|
|
3133
3130
|
let re = {};
|
|
3134
3131
|
return Object.keys(K).forEach((oe) => {
|
|
3135
|
-
const
|
|
3136
|
-
G[oe] && G[oe].type === "many2one" &&
|
|
3132
|
+
const Re = K[oe];
|
|
3133
|
+
G[oe] && G[oe].type === "many2one" && Re && Array.isArray(Re) && Re.length === 2 ? re[oe] = Re[0] : G[oe] && (G[oe].type === "one2many" || G[oe].type === "many2many") && Re && Re.items ? re[oe] = Re.items.filter((yt) => yt.operation !== "pendingRemove").map((yt) => yt.id) : re[oe] = Re;
|
|
3137
3134
|
}), re;
|
|
3138
3135
|
}
|
|
3139
3136
|
function X() {
|
|
@@ -3150,17 +3147,17 @@ function pl(e, t) {
|
|
|
3150
3147
|
...F == null ? void 0 : F.context
|
|
3151
3148
|
};
|
|
3152
3149
|
}
|
|
3153
|
-
function
|
|
3150
|
+
function Ae() {
|
|
3154
3151
|
return {
|
|
3155
|
-
id:
|
|
3156
|
-
active_id:
|
|
3157
|
-
active_ids: [
|
|
3158
|
-
parent_id:
|
|
3159
|
-
...
|
|
3152
|
+
id: de(),
|
|
3153
|
+
active_id: de(),
|
|
3154
|
+
active_ids: [de()],
|
|
3155
|
+
parent_id: Ee,
|
|
3156
|
+
...Me
|
|
3160
3157
|
};
|
|
3161
3158
|
}
|
|
3162
|
-
const
|
|
3163
|
-
const G =
|
|
3159
|
+
const he = async (K) => {
|
|
3160
|
+
const G = de() ? F == null ? void 0 : F.context : {};
|
|
3164
3161
|
return await H.getHandler().defaultGet({
|
|
3165
3162
|
model: r,
|
|
3166
3163
|
fields: K,
|
|
@@ -3176,17 +3173,17 @@ function pl(e, t) {
|
|
|
3176
3173
|
fields: k
|
|
3177
3174
|
})).length !== 0, xe = (K) => {
|
|
3178
3175
|
const G = M.getFieldsValue(!0);
|
|
3179
|
-
return
|
|
3180
|
-
},
|
|
3176
|
+
return Ft(G, K);
|
|
3177
|
+
}, ke = (K, G) => {
|
|
3181
3178
|
qt({
|
|
3182
3179
|
values: {
|
|
3183
|
-
...
|
|
3180
|
+
...Ft(M.getFieldsValue(!0), k),
|
|
3184
3181
|
[K]: G
|
|
3185
3182
|
},
|
|
3186
3183
|
fields: k,
|
|
3187
3184
|
reset: !1
|
|
3188
3185
|
});
|
|
3189
|
-
},
|
|
3186
|
+
}, et = (K) => M.getFieldsValue(!0)[K];
|
|
3190
3187
|
async function tt() {
|
|
3191
3188
|
try {
|
|
3192
3189
|
return await M.validateFields(), !1;
|
|
@@ -3214,36 +3211,36 @@ function pl(e, t) {
|
|
|
3214
3211
|
R(G != null && G.message ? G.message + G.stack : G), De == null || De(!1);
|
|
3215
3212
|
}
|
|
3216
3213
|
}, gt = async (K) => {
|
|
3217
|
-
let G, re, oe,
|
|
3214
|
+
let G, re, oe, Re;
|
|
3218
3215
|
De == null || De(!0), R(void 0), K != null && K.fields ? (re = K.fields, oe = K.arch) : (re = k, oe = I), v && (K == null ? void 0 : K.forceRefresh) !== !0 ? G = v : {
|
|
3219
3216
|
values: G,
|
|
3220
|
-
defaultGetCalled:
|
|
3217
|
+
defaultGetCalled: Re
|
|
3221
3218
|
} = await Po({
|
|
3222
3219
|
fields: re,
|
|
3223
3220
|
arch: oe
|
|
3224
3221
|
}), O && (G = {
|
|
3225
3222
|
...$a(O),
|
|
3226
3223
|
...G
|
|
3227
|
-
}), ee.current =
|
|
3224
|
+
}), ee.current = Ft(G, re), qt({
|
|
3228
3225
|
values: G,
|
|
3229
3226
|
fields: re,
|
|
3230
3227
|
reset: !0,
|
|
3231
|
-
isDefaultGet:
|
|
3228
|
+
isDefaultGet: Re
|
|
3232
3229
|
}), Jt({
|
|
3233
3230
|
fields: re,
|
|
3234
3231
|
arch: oe,
|
|
3235
3232
|
values: G
|
|
3236
|
-
}), De == null || De(!1), se == null || se(!1),
|
|
3233
|
+
}), De == null || De(!1), se == null || se(!1), Re && L(!0);
|
|
3237
3234
|
}, Qn = async () => new Promise(async (K) => {
|
|
3238
3235
|
ye() ? Wt({
|
|
3239
3236
|
lang: C,
|
|
3240
3237
|
onOk: () => {
|
|
3241
|
-
|
|
3238
|
+
me == null || me(), K(!0);
|
|
3242
3239
|
},
|
|
3243
3240
|
onCancel: () => {
|
|
3244
3241
|
K(!1);
|
|
3245
3242
|
}
|
|
3246
|
-
}) : (
|
|
3243
|
+
}) : (me == null || me(), K(!0));
|
|
3247
3244
|
}), No = async () => {
|
|
3248
3245
|
if (l) {
|
|
3249
3246
|
const K = await H.getHandler().getActionStringForModel(r);
|
|
@@ -3266,7 +3263,7 @@ function pl(e, t) {
|
|
|
3266
3263
|
const yt = {
|
|
3267
3264
|
...re ? {} : M.getFieldsValue(!0),
|
|
3268
3265
|
...K
|
|
3269
|
-
}, wn =
|
|
3266
|
+
}, wn = Ft(yt, G), Xo = Object.keys(G).map((bn) => {
|
|
3270
3267
|
const Qo = wn[bn] !== void 0 ? wn[bn] : void 0;
|
|
3271
3268
|
return {
|
|
3272
3269
|
name: bn,
|
|
@@ -3280,22 +3277,22 @@ function pl(e, t) {
|
|
|
3280
3277
|
arch: G
|
|
3281
3278
|
}) => {
|
|
3282
3279
|
let re = {}, oe = !1;
|
|
3283
|
-
if (
|
|
3280
|
+
if (de()) {
|
|
3284
3281
|
re = (await H.getHandler().readObjects({
|
|
3285
3282
|
model: r,
|
|
3286
|
-
ids: [
|
|
3283
|
+
ids: [de()],
|
|
3287
3284
|
fields: K,
|
|
3288
3285
|
context: y
|
|
3289
3286
|
}))[0];
|
|
3290
|
-
const
|
|
3291
|
-
params: [["res_model", "=", r], ["res_id", "=",
|
|
3287
|
+
const Re = await H.getHandler().search({
|
|
3288
|
+
params: [["res_model", "=", r], ["res_id", "=", de()]],
|
|
3292
3289
|
fields: ["id", "name"],
|
|
3293
3290
|
context: ae(),
|
|
3294
3291
|
model: "ir.attachment"
|
|
3295
3292
|
});
|
|
3296
|
-
Ve == null || Ve(
|
|
3293
|
+
Ve == null || Ve(Re);
|
|
3297
3294
|
} else
|
|
3298
|
-
Ve == null || Ve([]), re = await
|
|
3295
|
+
Ve == null || Ve([]), re = await he(K), oe = !0;
|
|
3299
3296
|
return {
|
|
3300
3297
|
values: re,
|
|
3301
3298
|
defaultGetCalled: oe
|
|
@@ -3304,7 +3301,7 @@ function pl(e, t) {
|
|
|
3304
3301
|
const {
|
|
3305
3302
|
callOnSubmitSucceed: G = !0
|
|
3306
3303
|
} = K || {};
|
|
3307
|
-
if (
|
|
3304
|
+
if (de()) {
|
|
3308
3305
|
const re = Sn({
|
|
3309
3306
|
source: ee.current,
|
|
3310
3307
|
target: xe(k),
|
|
@@ -3312,7 +3309,7 @@ function pl(e, t) {
|
|
|
3312
3309
|
});
|
|
3313
3310
|
await H.getHandler().update({
|
|
3314
3311
|
model: r,
|
|
3315
|
-
id:
|
|
3312
|
+
id: de(),
|
|
3316
3313
|
values: {
|
|
3317
3314
|
...re,
|
|
3318
3315
|
...D
|
|
@@ -3338,26 +3335,26 @@ function pl(e, t) {
|
|
|
3338
3335
|
});
|
|
3339
3336
|
B.current = oe, ee.current = re;
|
|
3340
3337
|
}
|
|
3341
|
-
h && await h([
|
|
3338
|
+
h && await h([de()]), !g && G && (ce == null || ce(de(), Ke(), X()));
|
|
3342
3339
|
}, Bo = async (K) => {
|
|
3343
3340
|
const {
|
|
3344
3341
|
callOnSubmitSucceed: G = !0
|
|
3345
3342
|
} = K || {};
|
|
3346
|
-
!g && G && (
|
|
3343
|
+
!g && G && (ce == null || ce(de(), Ke(), X()));
|
|
3347
3344
|
}, zt = async (K) => {
|
|
3348
3345
|
let G = !1;
|
|
3349
3346
|
const {
|
|
3350
3347
|
callOnSubmitSucceed: re = !0
|
|
3351
3348
|
} = K || {};
|
|
3352
|
-
if (Q.current = !0, R(void 0), !ye() &&
|
|
3353
|
-
return Q.current = !1, se == null || se(!1),
|
|
3349
|
+
if (Q.current = !0, R(void 0), !ye() && de() && re)
|
|
3350
|
+
return Q.current = !1, se == null || se(!1), me == null || me(), {
|
|
3354
3351
|
succeed: !0,
|
|
3355
|
-
id:
|
|
3352
|
+
id: de()
|
|
3356
3353
|
};
|
|
3357
3354
|
if (await tt())
|
|
3358
3355
|
return Q.current = !1, vr(C), {
|
|
3359
3356
|
succeed: !1,
|
|
3360
|
-
id:
|
|
3357
|
+
id: de()
|
|
3361
3358
|
};
|
|
3362
3359
|
x(!0), ge == null || ge(!0);
|
|
3363
3360
|
try {
|
|
@@ -3369,28 +3366,28 @@ function pl(e, t) {
|
|
|
3369
3366
|
forceRefresh: !0
|
|
3370
3367
|
}), G = !0, xn.success(b("savedRegisters"));
|
|
3371
3368
|
} catch (oe) {
|
|
3372
|
-
Q.current = !1, x(!1), ge == null || ge(!1),
|
|
3369
|
+
Q.current = !1, x(!1), ge == null || ge(!1), Te == null || Te(oe), xn.error(b("errorWhileSavingForm")), R(oe != null && oe.message ? oe.message : oe);
|
|
3373
3370
|
} finally {
|
|
3374
3371
|
Q.current = !1, ge == null || ge(!1), x(!1);
|
|
3375
3372
|
}
|
|
3376
3373
|
return {
|
|
3377
3374
|
succeed: G,
|
|
3378
|
-
id:
|
|
3375
|
+
id: de()
|
|
3379
3376
|
};
|
|
3380
3377
|
}, Jt = ({
|
|
3381
3378
|
fields: K,
|
|
3382
3379
|
arch: G,
|
|
3383
3380
|
values: re
|
|
3384
3381
|
}) => {
|
|
3385
|
-
var
|
|
3382
|
+
var Re;
|
|
3386
3383
|
const oe = new Mr(K);
|
|
3387
3384
|
oe.parse(G, {
|
|
3388
3385
|
readOnly: f,
|
|
3389
3386
|
values: Ia({
|
|
3390
3387
|
...re,
|
|
3391
|
-
...
|
|
3388
|
+
...Ae()
|
|
3392
3389
|
}, K)
|
|
3393
|
-
}), A(oe), oe.string && oe.string !== je && (
|
|
3390
|
+
}), A(oe), oe.string && oe.string !== je && (We == null || We(oe.string)), q && oe.string && ((Re = q.setTitle) == null || Re.call(q, oe.string));
|
|
3394
3391
|
}, vn = async ({
|
|
3395
3392
|
elementHasLostFocus: K = !1
|
|
3396
3393
|
}) => {
|
|
@@ -3409,7 +3406,7 @@ function pl(e, t) {
|
|
|
3409
3406
|
}) && K !== !0)
|
|
3410
3407
|
return;
|
|
3411
3408
|
{
|
|
3412
|
-
const oe =
|
|
3409
|
+
const oe = Ft(M.getFieldsValue(!0), k);
|
|
3413
3410
|
Z.current = oe, u == null || u(oe), se == null || se(!0), Ko(re);
|
|
3414
3411
|
}
|
|
3415
3412
|
}
|
|
@@ -3420,7 +3417,7 @@ function pl(e, t) {
|
|
|
3420
3417
|
await Yo(re);
|
|
3421
3418
|
}
|
|
3422
3419
|
} catch (G) {
|
|
3423
|
-
|
|
3420
|
+
Ue(G);
|
|
3424
3421
|
}
|
|
3425
3422
|
}, Yo = async (K) => {
|
|
3426
3423
|
const G = F == null ? void 0 : F.onChangeFields[K];
|
|
@@ -3445,44 +3442,44 @@ function pl(e, t) {
|
|
|
3445
3442
|
}), oe = await H.getHandler().executeOnChange({
|
|
3446
3443
|
model: r,
|
|
3447
3444
|
action: G.method,
|
|
3448
|
-
ids:
|
|
3445
|
+
ids: de() ? [de()] : [],
|
|
3449
3446
|
payload: re,
|
|
3450
3447
|
fields: k
|
|
3451
3448
|
});
|
|
3452
3449
|
if (oe.value) {
|
|
3453
|
-
const
|
|
3450
|
+
const Re = {
|
|
3454
3451
|
...xe(k),
|
|
3455
3452
|
...oe.value
|
|
3456
3453
|
};
|
|
3457
3454
|
Jt({
|
|
3458
3455
|
fields: k,
|
|
3459
3456
|
arch: I,
|
|
3460
|
-
values:
|
|
3457
|
+
values: Re
|
|
3461
3458
|
}), qt({
|
|
3462
|
-
values:
|
|
3459
|
+
values: Re,
|
|
3463
3460
|
fields: k,
|
|
3464
3461
|
reset: !1
|
|
3465
3462
|
});
|
|
3466
3463
|
}
|
|
3467
3464
|
if (oe.warning && oe.warning.title && oe.warning.message && !ie.current) {
|
|
3468
3465
|
const {
|
|
3469
|
-
title:
|
|
3466
|
+
title: Re,
|
|
3470
3467
|
message: yt
|
|
3471
3468
|
} = oe.warning;
|
|
3472
|
-
ie.current = !0, Xa(
|
|
3469
|
+
ie.current = !0, Xa(Re, yt, () => {
|
|
3473
3470
|
ie.current = !1;
|
|
3474
3471
|
});
|
|
3475
3472
|
}
|
|
3476
3473
|
if (oe.domain && Object.keys(oe.domain).length > 0) {
|
|
3477
|
-
const
|
|
3474
|
+
const Re = Ea({
|
|
3478
3475
|
fieldsDomain: oe.domain,
|
|
3479
3476
|
fields: k
|
|
3480
3477
|
});
|
|
3481
3478
|
Jt({
|
|
3482
|
-
fields:
|
|
3479
|
+
fields: Re,
|
|
3483
3480
|
arch: I,
|
|
3484
|
-
values: xe(
|
|
3485
|
-
}), j(
|
|
3481
|
+
values: xe(Re)
|
|
3482
|
+
}), j(Re);
|
|
3486
3483
|
}
|
|
3487
3484
|
};
|
|
3488
3485
|
async function Wo({
|
|
@@ -3492,7 +3489,7 @@ function pl(e, t) {
|
|
|
3492
3489
|
const re = await H.getHandler().execute({
|
|
3493
3490
|
model: r,
|
|
3494
3491
|
action: K,
|
|
3495
|
-
payload: [
|
|
3492
|
+
payload: [de()],
|
|
3496
3493
|
context: {
|
|
3497
3494
|
...G,
|
|
3498
3495
|
...F == null ? void 0 : F.context,
|
|
@@ -3500,12 +3497,12 @@ function pl(e, t) {
|
|
|
3500
3497
|
}
|
|
3501
3498
|
});
|
|
3502
3499
|
if (typeof re == "object" && re !== null && Object.keys(re).length === 0 && g)
|
|
3503
|
-
|
|
3500
|
+
ce == null || ce(de(), Ke(), X());
|
|
3504
3501
|
else if (re.type && re.type === "ir.actions.act_window_close")
|
|
3505
|
-
|
|
3502
|
+
ce == null || ce(de(), Ke(), X());
|
|
3506
3503
|
else if (re.type) {
|
|
3507
3504
|
let oe = {};
|
|
3508
|
-
re.context && (oe =
|
|
3505
|
+
re.context && (oe = vt({
|
|
3509
3506
|
context: re.context,
|
|
3510
3507
|
fields: k,
|
|
3511
3508
|
values: Ke()
|
|
@@ -3527,9 +3524,9 @@ function pl(e, t) {
|
|
|
3527
3524
|
const G = await H.getHandler().executeWorkflow({
|
|
3528
3525
|
model: r,
|
|
3529
3526
|
action: K,
|
|
3530
|
-
payload:
|
|
3527
|
+
payload: de()
|
|
3531
3528
|
});
|
|
3532
|
-
G.type && G.type === "ir.actions.act_window_close" ?
|
|
3529
|
+
G.type && G.type === "ir.actions.act_window_close" ? ce == null || ce(de(), Ke(), X()) : await gt({
|
|
3533
3530
|
forceRefresh: !0
|
|
3534
3531
|
});
|
|
3535
3532
|
}
|
|
@@ -3553,7 +3550,7 @@ function pl(e, t) {
|
|
|
3553
3550
|
}) {
|
|
3554
3551
|
const {
|
|
3555
3552
|
closeParent: re
|
|
3556
|
-
} = await (
|
|
3553
|
+
} = await (Fe == null ? void 0 : Fe({
|
|
3557
3554
|
actionData: K,
|
|
3558
3555
|
fields: k,
|
|
3559
3556
|
values: Ke(),
|
|
@@ -3568,7 +3565,7 @@ function pl(e, t) {
|
|
|
3568
3565
|
});
|
|
3569
3566
|
}
|
|
3570
3567
|
})) || {};
|
|
3571
|
-
!w && re && (
|
|
3568
|
+
!w && re && (ce == null || ce(de(), Ke(), X()));
|
|
3572
3569
|
}
|
|
3573
3570
|
function qo() {
|
|
3574
3571
|
vn({
|
|
@@ -3581,7 +3578,7 @@ function pl(e, t) {
|
|
|
3581
3578
|
context: re
|
|
3582
3579
|
}) {
|
|
3583
3580
|
if (K === "cancel") {
|
|
3584
|
-
|
|
3581
|
+
me == null || me();
|
|
3585
3582
|
return;
|
|
3586
3583
|
}
|
|
3587
3584
|
if (await tt()) {
|
|
@@ -3589,7 +3586,7 @@ function pl(e, t) {
|
|
|
3589
3586
|
return;
|
|
3590
3587
|
}
|
|
3591
3588
|
try {
|
|
3592
|
-
(ye() ||
|
|
3589
|
+
(ye() || de() === void 0) && await zt({
|
|
3593
3590
|
callOnSubmitSucceed: !1
|
|
3594
3591
|
}), K === "object" ? await Wo({
|
|
3595
3592
|
action: G,
|
|
@@ -3601,19 +3598,19 @@ function pl(e, t) {
|
|
|
3601
3598
|
context: re
|
|
3602
3599
|
});
|
|
3603
3600
|
} catch (oe) {
|
|
3604
|
-
|
|
3601
|
+
Ue(oe);
|
|
3605
3602
|
}
|
|
3606
3603
|
}
|
|
3607
|
-
const Jo = () => !F && !$ ? /* @__PURE__ */ n(
|
|
3604
|
+
const Jo = () => !F && !$ ? /* @__PURE__ */ n(Le, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(ne, {
|
|
3608
3605
|
children: /* @__PURE__ */ n(ts, {
|
|
3609
3606
|
getValues: Ke,
|
|
3610
3607
|
getPlainValues: at,
|
|
3611
|
-
getFields:
|
|
3608
|
+
getFields: Xe,
|
|
3612
3609
|
domain: O,
|
|
3613
3610
|
activeId: i,
|
|
3614
3611
|
activeModel: r,
|
|
3615
|
-
setFieldValue:
|
|
3616
|
-
getFieldValue:
|
|
3612
|
+
setFieldValue: ke,
|
|
3613
|
+
getFieldValue: et,
|
|
3617
3614
|
executeButtonAction: zo,
|
|
3618
3615
|
getContext: ae,
|
|
3619
3616
|
submitForm: zt,
|
|
@@ -3630,11 +3627,11 @@ function pl(e, t) {
|
|
|
3630
3627
|
component: !1,
|
|
3631
3628
|
children: F && /* @__PURE__ */ n(Vn, {
|
|
3632
3629
|
container: F.container,
|
|
3633
|
-
responsiveBehaviour:
|
|
3630
|
+
responsiveBehaviour: fe
|
|
3634
3631
|
})
|
|
3635
3632
|
})
|
|
3636
3633
|
})
|
|
3637
|
-
}), Zo = () => /* @__PURE__ */ P(
|
|
3634
|
+
}), Zo = () => /* @__PURE__ */ P(ne, {
|
|
3638
3635
|
children: [/* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(Ce, {
|
|
3639
3636
|
justify: "end",
|
|
3640
3637
|
children: /* @__PURE__ */ P(Ye, {
|
|
@@ -3648,7 +3645,7 @@ function pl(e, t) {
|
|
|
3648
3645
|
}), /* @__PURE__ */ n(Ie, {
|
|
3649
3646
|
disabled: S || f,
|
|
3650
3647
|
loading: S,
|
|
3651
|
-
icon: /* @__PURE__ */ n(
|
|
3648
|
+
icon: /* @__PURE__ */ n(Rt, {}),
|
|
3652
3649
|
onClick: async () => {
|
|
3653
3650
|
await zt();
|
|
3654
3651
|
},
|
|
@@ -3676,7 +3673,7 @@ function pl(e, t) {
|
|
|
3676
3673
|
})
|
|
3677
3674
|
}) : null;
|
|
3678
3675
|
}
|
|
3679
|
-
const Ut =
|
|
3676
|
+
const Ut = wt(pl), Gt = (e) => {
|
|
3680
3677
|
const {
|
|
3681
3678
|
visible: t,
|
|
3682
3679
|
id: r,
|
|
@@ -3689,7 +3686,7 @@ const Ut = bt(pl), Gt = (e) => {
|
|
|
3689
3686
|
} = e, {
|
|
3690
3687
|
modalWidth: c
|
|
3691
3688
|
} = fn(), [f, d] = T(i), [m, v] = T(!1), [p, h] = T();
|
|
3692
|
-
|
|
3689
|
+
pe(() => {
|
|
3693
3690
|
a && g();
|
|
3694
3691
|
}, [l, a]);
|
|
3695
3692
|
async function g() {
|
|
@@ -3754,7 +3751,7 @@ const Ut = bt(pl), Gt = (e) => {
|
|
|
3754
3751
|
const _ = c * 0.95;
|
|
3755
3752
|
return /* @__PURE__ */ n(Qa, {
|
|
3756
3753
|
setTitle: d,
|
|
3757
|
-
children: /* @__PURE__ */ n(
|
|
3754
|
+
children: /* @__PURE__ */ n(Ge, {
|
|
3758
3755
|
title: a ? O() : f,
|
|
3759
3756
|
centered: !0,
|
|
3760
3757
|
width: c,
|
|
@@ -3794,9 +3791,9 @@ const Ut = bt(pl), Gt = (e) => {
|
|
|
3794
3791
|
name: o + "#time",
|
|
3795
3792
|
label: ""
|
|
3796
3793
|
})];
|
|
3797
|
-
return /* @__PURE__ */ P(
|
|
3794
|
+
return /* @__PURE__ */ P(ne, {
|
|
3798
3795
|
children: [r && /* @__PURE__ */ n(un, {
|
|
3799
|
-
ooui: new
|
|
3796
|
+
ooui: new Vt({
|
|
3800
3797
|
name: o + "_label",
|
|
3801
3798
|
string: i,
|
|
3802
3799
|
help: t.tooltip,
|
|
@@ -3919,9 +3916,9 @@ function bl(e) {
|
|
|
3919
3916
|
},
|
|
3920
3917
|
layout: "vertical"
|
|
3921
3918
|
});
|
|
3922
|
-
return /* @__PURE__ */ P(
|
|
3919
|
+
return /* @__PURE__ */ P(ne, {
|
|
3923
3920
|
children: [r && /* @__PURE__ */ n(un, {
|
|
3924
|
-
ooui: new
|
|
3921
|
+
ooui: new Vt({
|
|
3925
3922
|
name: i + "_label",
|
|
3926
3923
|
string: o,
|
|
3927
3924
|
help: s,
|
|
@@ -3951,7 +3948,7 @@ const {
|
|
|
3951
3948
|
defaultSeed: Cl
|
|
3952
3949
|
} = Pe, Sl = xl(Cl), {
|
|
3953
3950
|
Option: Tl
|
|
3954
|
-
} =
|
|
3951
|
+
} = xt, Fl = (e) => {
|
|
3955
3952
|
const {
|
|
3956
3953
|
ooui: t
|
|
3957
3954
|
} = e, {
|
|
@@ -3983,7 +3980,7 @@ const {
|
|
|
3983
3980
|
value: v,
|
|
3984
3981
|
children: v
|
|
3985
3982
|
}, m);
|
|
3986
|
-
}), c = a && !s ? Il :
|
|
3983
|
+
}), c = a && !s ? Il : xt;
|
|
3987
3984
|
function f(d) {
|
|
3988
3985
|
const m = d.map((v) => {
|
|
3989
3986
|
const p = l.find(([h, g]) => v === g);
|
|
@@ -4003,7 +4000,7 @@ const {
|
|
|
4003
4000
|
showArrow: !0,
|
|
4004
4001
|
children: u
|
|
4005
4002
|
});
|
|
4006
|
-
}, Il = Kt(
|
|
4003
|
+
}, Il = Kt(xt)`
|
|
4007
4004
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
4008
4005
|
background-color: ${Sl.colorPrimaryBg};
|
|
4009
4006
|
}
|
|
@@ -4082,7 +4079,7 @@ function Dl(e) {
|
|
|
4082
4079
|
onClick: t,
|
|
4083
4080
|
children: [r ? /* @__PURE__ */ n(hi, {
|
|
4084
4081
|
className: "pr-1"
|
|
4085
|
-
}) : /* @__PURE__ */ n(
|
|
4082
|
+
}) : /* @__PURE__ */ n(At, {
|
|
4086
4083
|
className: "pr-1"
|
|
4087
4084
|
}), s(r ? "simple_search" : "advanced_search")]
|
|
4088
4085
|
})
|
|
@@ -4154,10 +4151,10 @@ function go(e) {
|
|
|
4154
4151
|
searchValues: m,
|
|
4155
4152
|
showLimitOptions: v = !0,
|
|
4156
4153
|
formXml: p
|
|
4157
|
-
} = e, [h, g] = T(), [y, O] = T(), [_, w] = T(!1), V =
|
|
4154
|
+
} = e, [h, g] = T(), [y, O] = T(), [_, w] = T(!1), V = ue(), {
|
|
4158
4155
|
token: D
|
|
4159
4156
|
} = Al(), [E] = ot.useForm();
|
|
4160
|
-
|
|
4157
|
+
pe(() => {
|
|
4161
4158
|
E.setFieldsValue(m);
|
|
4162
4159
|
}, [m]);
|
|
4163
4160
|
const b = () => {
|
|
@@ -4175,7 +4172,7 @@ function go(e) {
|
|
|
4175
4172
|
}, M))
|
|
4176
4173
|
}, F));
|
|
4177
4174
|
};
|
|
4178
|
-
|
|
4175
|
+
Ct(() => {
|
|
4179
4176
|
w(!1), V.current = new fi(r, t, p), V.current.parse(), g(V.current._simpleSearchContainer), O(V.current._advancedSearchContainer);
|
|
4180
4177
|
}, [t, r]);
|
|
4181
4178
|
const C = b(), S = (x) => {
|
|
@@ -4343,7 +4340,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4343
4340
|
} = e, {
|
|
4344
4341
|
t: s
|
|
4345
4342
|
} = Y(we);
|
|
4346
|
-
return /* @__PURE__ */ n(
|
|
4343
|
+
return /* @__PURE__ */ n(Ge, {
|
|
4347
4344
|
title: s("selectAction"),
|
|
4348
4345
|
centered: !0,
|
|
4349
4346
|
open: t,
|
|
@@ -4373,7 +4370,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4373
4370
|
t: p
|
|
4374
4371
|
} = Y(we), h = Y(st), {
|
|
4375
4372
|
openRelate: g
|
|
4376
|
-
} = h || {}, y = Y(
|
|
4373
|
+
} = h || {}, y = Y(Mt), {
|
|
4377
4374
|
processAction: O
|
|
4378
4375
|
} = y || {};
|
|
4379
4376
|
if (!t)
|
|
@@ -4397,11 +4394,11 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4397
4394
|
context: i
|
|
4398
4395
|
}))[0];
|
|
4399
4396
|
v({
|
|
4400
|
-
...
|
|
4397
|
+
...Ft(R, x),
|
|
4401
4398
|
active_id: t
|
|
4402
4399
|
}), c(!1);
|
|
4403
4400
|
} catch (S) {
|
|
4404
|
-
c(!1),
|
|
4401
|
+
c(!1), Ue(S);
|
|
4405
4402
|
return;
|
|
4406
4403
|
}
|
|
4407
4404
|
}
|
|
@@ -4413,7 +4410,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4413
4410
|
style: {
|
|
4414
4411
|
padding: 15
|
|
4415
4412
|
},
|
|
4416
|
-
children: /* @__PURE__ */ n(
|
|
4413
|
+
children: /* @__PURE__ */ n(Le, {})
|
|
4417
4414
|
})
|
|
4418
4415
|
});
|
|
4419
4416
|
if (!f || !f.toolbar)
|
|
@@ -4432,7 +4429,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4432
4429
|
icon: /* @__PURE__ */ n(Kn, {}),
|
|
4433
4430
|
children: p("report")
|
|
4434
4431
|
}, "print"), /* @__PURE__ */ n(He.Divider, {}), /* @__PURE__ */ n(He.ItemGroup, {
|
|
4435
|
-
title: /* @__PURE__ */ P(
|
|
4432
|
+
title: /* @__PURE__ */ P(ne, {
|
|
4436
4433
|
children: [/* @__PURE__ */ n(Kr, {}), " ", /* @__PURE__ */ P("span", {
|
|
4437
4434
|
children: [" ", p("related")]
|
|
4438
4435
|
})]
|
|
@@ -4483,7 +4480,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4483
4480
|
fields: f.fields
|
|
4484
4481
|
});
|
|
4485
4482
|
}
|
|
4486
|
-
return /* @__PURE__ */ P(
|
|
4483
|
+
return /* @__PURE__ */ P(ne, {
|
|
4487
4484
|
children: [/* @__PURE__ */ n(Bt, {
|
|
4488
4485
|
overlay: w(),
|
|
4489
4486
|
trigger: ["click"],
|
|
@@ -4512,19 +4509,19 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4512
4509
|
m2oField: t
|
|
4513
4510
|
} = e;
|
|
4514
4511
|
return t ? /* @__PURE__ */ P(Ye, {
|
|
4515
|
-
children: [/* @__PURE__ */ n(
|
|
4512
|
+
children: [/* @__PURE__ */ n(ne, {
|
|
4516
4513
|
children: t.value
|
|
4517
4514
|
}), /* @__PURE__ */ n(Jn, {
|
|
4518
4515
|
id: t.id,
|
|
4519
4516
|
model: t.model
|
|
4520
4517
|
})]
|
|
4521
|
-
}) : /* @__PURE__ */ n(
|
|
4518
|
+
}) : /* @__PURE__ */ n(ne, {});
|
|
4522
4519
|
}, Ll = (e) => {
|
|
4523
4520
|
const {
|
|
4524
4521
|
value: t,
|
|
4525
4522
|
context: r,
|
|
4526
4523
|
selectionValues: i
|
|
4527
|
-
} = e, [o, s] = T(), [a, l] = T(!1), [u, c] = t ? t.split(",") : [], f = parseInt(c), d =
|
|
4524
|
+
} = e, [o, s] = T(), [a, l] = T(!1), [u, c] = t ? t.split(",") : [], f = parseInt(c), d = $e(async () => {
|
|
4528
4525
|
if (!t || t && o)
|
|
4529
4526
|
return;
|
|
4530
4527
|
l(!0);
|
|
@@ -4536,17 +4533,17 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4536
4533
|
});
|
|
4537
4534
|
s(v[0][1]), l(!1);
|
|
4538
4535
|
}, [t, o]);
|
|
4539
|
-
if (
|
|
4536
|
+
if (pe(() => {
|
|
4540
4537
|
d();
|
|
4541
4538
|
}, [t]), !t && !a)
|
|
4542
|
-
return /* @__PURE__ */ n(
|
|
4539
|
+
return /* @__PURE__ */ n(ne, {});
|
|
4543
4540
|
if (a)
|
|
4544
4541
|
return /* @__PURE__ */ n(rt, {});
|
|
4545
4542
|
const m = i.get(u);
|
|
4546
4543
|
return /* @__PURE__ */ P(Ye, {
|
|
4547
|
-
children: [/* @__PURE__ */ n(
|
|
4544
|
+
children: [/* @__PURE__ */ n(ne, {
|
|
4548
4545
|
children: `${m}:`
|
|
4549
|
-
}), /* @__PURE__ */ n(
|
|
4546
|
+
}), /* @__PURE__ */ n(ne, {
|
|
4550
4547
|
children: o
|
|
4551
4548
|
}), /* @__PURE__ */ n(Jn, {
|
|
4552
4549
|
id: f,
|
|
@@ -4714,13 +4711,13 @@ var wo = { exports: {} };
|
|
|
4714
4711
|
var M = this, I = this.$locale();
|
|
4715
4712
|
if (!this.isValid())
|
|
4716
4713
|
return I.invalidDate || h;
|
|
4717
|
-
var N = A || "YYYY-MM-DDTHH:mm:ssZ", k = S.z(this), j = this.$H, q = this.$m, W = this.$M, z = I.weekdays, U = I.months, L = function(ie, Q, J,
|
|
4718
|
-
return ie && (ie[Q] || ie(M, N)) || J[Q].slice(0,
|
|
4714
|
+
var N = A || "YYYY-MM-DDTHH:mm:ssZ", k = S.z(this), j = this.$H, q = this.$m, W = this.$M, z = I.weekdays, U = I.months, L = function(ie, Q, J, fe) {
|
|
4715
|
+
return ie && (ie[Q] || ie(M, N)) || J[Q].slice(0, fe);
|
|
4719
4716
|
}, B = function(ie) {
|
|
4720
4717
|
return S.s(j % 12 || 12, ie, "0");
|
|
4721
4718
|
}, ee = I.meridiem || function(ie, Q, J) {
|
|
4722
|
-
var
|
|
4723
|
-
return J ?
|
|
4719
|
+
var fe = ie < 12 ? "AM" : "PM";
|
|
4720
|
+
return J ? fe.toLowerCase() : fe;
|
|
4724
4721
|
}, Z = { YY: String(this.$y).slice(-2), YYYY: S.s(this.$y, 4, "0"), M: W + 1, MM: S.s(W + 1, 2, "0"), MMM: L(I.monthsShort, W, U, 3), MMMM: L(U, W), D: this.$D, DD: S.s(this.$D, 2, "0"), d: String(this.$W), dd: L(I.weekdaysMin, this.$W, z, 2), ddd: L(I.weekdaysShort, this.$W, z, 3), dddd: z[this.$W], H: String(j), HH: S.s(j, 2, "0"), h: B(1), hh: B(2), a: ee(j, q, !0), A: ee(j, q, !1), m: String(q), mm: S.s(q, 2, "0"), s: String(this.$s), ss: S.s(this.$s, 2, "0"), SSS: S.s(this.$ms, 3, "0"), Z: k };
|
|
4725
4722
|
return N.replace(y, function(ie, Q) {
|
|
4726
4723
|
return Q || Z[ie] || k.replace(":", "");
|
|
@@ -4980,26 +4977,26 @@ const lt = {
|
|
|
4980
4977
|
content: e == null ? void 0 : e.replace(/(?:\r\n|\r|\n)/g, "<br>")
|
|
4981
4978
|
}), Gl = (e) => {
|
|
4982
4979
|
if (!e || e && e.length === 0)
|
|
4983
|
-
return /* @__PURE__ */ n(
|
|
4980
|
+
return /* @__PURE__ */ n(ne, {});
|
|
4984
4981
|
const t = dt(e, lt.date.dateInternalFormat).format(lt.date.dateDisplayFormat);
|
|
4985
|
-
return /* @__PURE__ */ n(
|
|
4982
|
+
return /* @__PURE__ */ n(ne, {
|
|
4986
4983
|
children: t
|
|
4987
4984
|
});
|
|
4988
4985
|
}, ql = (e) => {
|
|
4989
4986
|
if (!e || e && e.length === 0)
|
|
4990
|
-
return /* @__PURE__ */ n(
|
|
4987
|
+
return /* @__PURE__ */ n(ne, {});
|
|
4991
4988
|
const t = dt(e, lt.time.dateInternalFormat).format(lt.time.dateDisplayFormat);
|
|
4992
|
-
return /* @__PURE__ */ n(
|
|
4989
|
+
return /* @__PURE__ */ n(ne, {
|
|
4993
4990
|
children: t
|
|
4994
4991
|
});
|
|
4995
4992
|
}, Sr = (e) => {
|
|
4996
4993
|
const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
|
|
4997
|
-
return /* @__PURE__ */ n(
|
|
4994
|
+
return /* @__PURE__ */ n(ne, {
|
|
4998
4995
|
children: `( ${t} )`
|
|
4999
4996
|
});
|
|
5000
4997
|
}, zl = (e) => /* @__PURE__ */ n(vo, {
|
|
5001
4998
|
value: e
|
|
5002
|
-
}), Jl = (e) => /* @__PURE__ */ n(
|
|
4999
|
+
}), Jl = (e) => /* @__PURE__ */ n(ne, {
|
|
5003
5000
|
children: yo(e)
|
|
5004
5001
|
}), Tr = (e) => /* @__PURE__ */ n("div", {
|
|
5005
5002
|
style: {
|
|
@@ -5015,9 +5012,9 @@ const lt = {
|
|
|
5015
5012
|
}), Xl = (e, t, r, i) => /* @__PURE__ */ n(bo, {
|
|
5016
5013
|
ooui: r,
|
|
5017
5014
|
value: e
|
|
5018
|
-
}), Ql = (e, t, r, i) => /* @__PURE__ */ n(
|
|
5015
|
+
}), Ql = (e, t, r, i) => /* @__PURE__ */ n(ne, {
|
|
5019
5016
|
children: r.selectionValues.get(e)
|
|
5020
|
-
}), ec = (e, t, r, i) => /* @__PURE__ */ n(
|
|
5017
|
+
}), ec = (e, t, r, i) => /* @__PURE__ */ n(ne, {
|
|
5021
5018
|
children: /* @__PURE__ */ n(Ll, {
|
|
5022
5019
|
value: e,
|
|
5023
5020
|
selectionValues: r.selectionValues,
|
|
@@ -5049,14 +5046,14 @@ function pn(e) {
|
|
|
5049
5046
|
rootTree: O = !1,
|
|
5050
5047
|
context: _,
|
|
5051
5048
|
readonly: w
|
|
5052
|
-
} = e, [V, D] = T([]), [E, b] = T([]), C =
|
|
5049
|
+
} = e, [V, D] = T([]), [E, b] = T([]), C = ue(!1), S = ue(null), {
|
|
5053
5050
|
t: x
|
|
5054
|
-
} = Y(we), $ =
|
|
5051
|
+
} = Y(we), $ = ue(r), R = Y(Qe), {
|
|
5055
5052
|
title: F = void 0,
|
|
5056
5053
|
setTitle: A = void 0
|
|
5057
5054
|
} = (O ? R : {}) || {};
|
|
5058
|
-
|
|
5059
|
-
S.current =
|
|
5055
|
+
pe(() => {
|
|
5056
|
+
S.current = Ot(o);
|
|
5060
5057
|
const z = Fa(S.current, {
|
|
5061
5058
|
boolean: Yl,
|
|
5062
5059
|
many2one: Wl,
|
|
@@ -5076,12 +5073,12 @@ function pn(e) {
|
|
|
5076
5073
|
avatar: tc
|
|
5077
5074
|
}, _);
|
|
5078
5075
|
b(z), S.current.string && F !== S.current.string && (A == null || A(S.current.string));
|
|
5079
|
-
}, [o]),
|
|
5076
|
+
}, [o]), pe(() => {
|
|
5080
5077
|
C.current = !1;
|
|
5081
5078
|
const z = lo(S.current, s);
|
|
5082
5079
|
D(z), $.current = r;
|
|
5083
5080
|
}, [s]);
|
|
5084
|
-
const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(
|
|
5081
|
+
const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Le, {
|
|
5085
5082
|
className: "pb-4"
|
|
5086
5083
|
}) : /* @__PURE__ */ P(Ce, {
|
|
5087
5084
|
align: "bottom",
|
|
@@ -5124,19 +5121,17 @@ function pn(e) {
|
|
|
5124
5121
|
const U = S.current;
|
|
5125
5122
|
d && U.columns.some((L) => L.sum !== void 0) && (W = d - 30);
|
|
5126
5123
|
}
|
|
5127
|
-
return S.current === null ? /* @__PURE__ */ n(
|
|
5124
|
+
return S.current === null ? /* @__PURE__ */ n(Le, {
|
|
5128
5125
|
style: {
|
|
5129
5126
|
padding: "2rem"
|
|
5130
5127
|
}
|
|
5131
5128
|
}) : /* @__PURE__ */ P("div", {
|
|
5132
|
-
children: [k(),
|
|
5133
|
-
className: "pb-4"
|
|
5134
|
-
}), /* @__PURE__ */ n(Ri, {
|
|
5129
|
+
children: [k(), /* @__PURE__ */ n(Ri, {
|
|
5135
5130
|
height: W,
|
|
5136
5131
|
columns: q.columns,
|
|
5137
5132
|
dataSource: V,
|
|
5138
|
-
loading:
|
|
5139
|
-
loadingComponent: /* @__PURE__ */ n(
|
|
5133
|
+
loading: l,
|
|
5134
|
+
loadingComponent: /* @__PURE__ */ n(Le, {}),
|
|
5140
5135
|
onRowStyle: (z) => {
|
|
5141
5136
|
if (m[z.id])
|
|
5142
5137
|
return {
|
|
@@ -5177,11 +5172,11 @@ function nc(e, t) {
|
|
|
5177
5172
|
rootTree: f = !1,
|
|
5178
5173
|
parentContext: d = {},
|
|
5179
5174
|
onChangeSelectedRowKeys: m
|
|
5180
|
-
} = e, [v, p] = T(!1), [h, g] = T(!1), y =
|
|
5175
|
+
} = e, [v, p] = T(!1), [h, g] = T(!1), y = ue(!1), [O, _] = T(), [w, V] = T(), [D, E] = T(), [b, C] = T(), [S, x] = T(200), $ = ue(), {
|
|
5181
5176
|
height: R
|
|
5182
|
-
} = fn(), F = Y(
|
|
5177
|
+
} = fn(), F = Y(Mt), {
|
|
5183
5178
|
processAction: A
|
|
5184
|
-
} = F || {}, M = Y(
|
|
5179
|
+
} = F || {}, M = Y(Qe), {
|
|
5185
5180
|
setResults: I = void 0,
|
|
5186
5181
|
setCurrentItemIndex: N = void 0,
|
|
5187
5182
|
currentId: k = void 0,
|
|
@@ -5197,9 +5192,9 @@ function nc(e, t) {
|
|
|
5197
5192
|
setTotalItems: ie = void 0,
|
|
5198
5193
|
setSearchTreeNameSearch: Q = void 0,
|
|
5199
5194
|
setTreeIsLoading: J = void 0,
|
|
5200
|
-
searchValues:
|
|
5195
|
+
searchValues: fe = {},
|
|
5201
5196
|
setSearchValues: be = void 0,
|
|
5202
|
-
limit:
|
|
5197
|
+
limit: Ee = Ht,
|
|
5203
5198
|
setLimit: _e = void 0
|
|
5204
5199
|
} = (f ? M : {}) || {}, {
|
|
5205
5200
|
submit: Be,
|
|
@@ -5209,14 +5204,14 @@ function nc(e, t) {
|
|
|
5209
5204
|
searchFilterLoading: De,
|
|
5210
5205
|
searchError: Ve,
|
|
5211
5206
|
page: je,
|
|
5212
|
-
offset:
|
|
5213
|
-
getResults:
|
|
5214
|
-
requestPageChange:
|
|
5215
|
-
changeSort:
|
|
5216
|
-
fetchChildrenForRecord:
|
|
5217
|
-
colorsForResults:
|
|
5218
|
-
statusForResults:
|
|
5219
|
-
totalItems:
|
|
5207
|
+
offset: We,
|
|
5208
|
+
getResults: te,
|
|
5209
|
+
requestPageChange: Fe,
|
|
5210
|
+
changeSort: Me,
|
|
5211
|
+
fetchChildrenForRecord: ce,
|
|
5212
|
+
colorsForResults: me,
|
|
5213
|
+
statusForResults: Te,
|
|
5214
|
+
totalItems: de
|
|
5220
5215
|
} = ho({
|
|
5221
5216
|
model: O,
|
|
5222
5217
|
setSearchTreeNameSearch: Q,
|
|
@@ -5239,51 +5234,51 @@ function nc(e, t) {
|
|
|
5239
5234
|
domain: u,
|
|
5240
5235
|
currentId: k,
|
|
5241
5236
|
setActionViewTotalItems: ie,
|
|
5242
|
-
limit:
|
|
5237
|
+
limit: Ee,
|
|
5243
5238
|
setLimit: _e
|
|
5244
5239
|
});
|
|
5245
|
-
|
|
5240
|
+
bt(t, () => ({
|
|
5246
5241
|
refreshResults: () => {
|
|
5247
5242
|
y.current = !1, se();
|
|
5248
5243
|
},
|
|
5249
5244
|
getFields: () => w == null ? void 0 : w.fields,
|
|
5250
5245
|
getDomain: () => u
|
|
5251
|
-
})),
|
|
5246
|
+
})), pe(() => {
|
|
5252
5247
|
!h || c && (y.current = !1, se());
|
|
5253
|
-
}, [je,
|
|
5254
|
-
const
|
|
5248
|
+
}, [je, We, h, c, a]);
|
|
5249
|
+
const Xe = async () => {
|
|
5255
5250
|
g(!1), p(!0), C(void 0), J == null || J(!0);
|
|
5256
5251
|
try {
|
|
5257
5252
|
await Ke(), g(!0);
|
|
5258
|
-
} catch (
|
|
5259
|
-
C(
|
|
5253
|
+
} catch (ke) {
|
|
5254
|
+
C(ke);
|
|
5260
5255
|
} finally {
|
|
5261
|
-
p(!1);
|
|
5256
|
+
p(!1), J == null || J(!1);
|
|
5262
5257
|
}
|
|
5263
5258
|
}, Ke = async () => {
|
|
5264
5259
|
_(r);
|
|
5265
|
-
let
|
|
5266
|
-
i || (
|
|
5260
|
+
let ke = i;
|
|
5261
|
+
i || (ke = await H.getHandler().getView({
|
|
5267
5262
|
model: r,
|
|
5268
5263
|
type: "form",
|
|
5269
5264
|
context: d
|
|
5270
5265
|
}));
|
|
5271
|
-
let
|
|
5272
|
-
o || (
|
|
5266
|
+
let et = o;
|
|
5267
|
+
o || (et = await H.getHandler().getView({
|
|
5273
5268
|
model: r,
|
|
5274
5269
|
type: "tree",
|
|
5275
5270
|
context: d
|
|
5276
|
-
})), E(
|
|
5271
|
+
})), E(ke), V(et);
|
|
5277
5272
|
};
|
|
5278
|
-
|
|
5279
|
-
|
|
5273
|
+
pe(() => {
|
|
5274
|
+
Xe();
|
|
5280
5275
|
}, [r]);
|
|
5281
|
-
const at = (
|
|
5282
|
-
_e == null || _e(
|
|
5283
|
-
}, X = async (
|
|
5276
|
+
const at = (ke) => {
|
|
5277
|
+
_e == null || _e(ke);
|
|
5278
|
+
}, X = async (ke) => {
|
|
5284
5279
|
const {
|
|
5285
|
-
id:
|
|
5286
|
-
} =
|
|
5280
|
+
id: et
|
|
5281
|
+
} = ke;
|
|
5287
5282
|
$.current || ($.current = await H.getHandler().treeButOpen({
|
|
5288
5283
|
id: w.view_id,
|
|
5289
5284
|
model: O,
|
|
@@ -5294,38 +5289,38 @@ function nc(e, t) {
|
|
|
5294
5289
|
actionData: tt,
|
|
5295
5290
|
fields: w.fields,
|
|
5296
5291
|
values: {
|
|
5297
|
-
active_id:
|
|
5298
|
-
...
|
|
5292
|
+
active_id: et,
|
|
5293
|
+
...ke
|
|
5299
5294
|
},
|
|
5300
5295
|
context: d
|
|
5301
5296
|
}));
|
|
5302
|
-
}, ae = async (
|
|
5297
|
+
}, ae = async (ke) => {
|
|
5303
5298
|
const {
|
|
5304
|
-
id:
|
|
5305
|
-
} =
|
|
5299
|
+
id: et
|
|
5300
|
+
} = ke;
|
|
5306
5301
|
if (w != null && w.isExpandable) {
|
|
5307
5302
|
try {
|
|
5308
|
-
await X(
|
|
5303
|
+
await X(ke);
|
|
5309
5304
|
} catch (tt) {
|
|
5310
|
-
|
|
5305
|
+
Ue(tt);
|
|
5311
5306
|
}
|
|
5312
5307
|
return;
|
|
5313
5308
|
}
|
|
5314
5309
|
s({
|
|
5315
|
-
id:
|
|
5310
|
+
id: et,
|
|
5316
5311
|
model: O,
|
|
5317
5312
|
formView: D,
|
|
5318
5313
|
treeView: w
|
|
5319
5314
|
});
|
|
5320
5315
|
};
|
|
5321
|
-
function
|
|
5322
|
-
const
|
|
5323
|
-
W == null || W(
|
|
5316
|
+
function Ae(ke) {
|
|
5317
|
+
const et = te().filter((tt) => ke.includes(tt.id));
|
|
5318
|
+
W == null || W(et), m == null || m(ke);
|
|
5324
5319
|
}
|
|
5325
|
-
function
|
|
5320
|
+
function he() {
|
|
5326
5321
|
return w != null && w.isExpandable ? R - 160 : R - (S + 210);
|
|
5327
5322
|
}
|
|
5328
|
-
const ye = () => !w || !D ? null : /* @__PURE__ */ P(
|
|
5323
|
+
const ye = () => !w || !D ? null : /* @__PURE__ */ P(ne, {
|
|
5329
5324
|
children: [/* @__PURE__ */ n(go, {
|
|
5330
5325
|
fields: {
|
|
5331
5326
|
...w.fields,
|
|
@@ -5334,35 +5329,35 @@ function nc(e, t) {
|
|
|
5334
5329
|
searchFields: uo([D.search_fields, w.search_fields]),
|
|
5335
5330
|
formXml: D.arch,
|
|
5336
5331
|
onClear: ge,
|
|
5337
|
-
limit:
|
|
5338
|
-
offset:
|
|
5332
|
+
limit: Ee,
|
|
5333
|
+
offset: We,
|
|
5339
5334
|
isSearching: De,
|
|
5340
5335
|
onSubmit: Be,
|
|
5341
5336
|
onLimitChange: at,
|
|
5342
5337
|
setSearchFilterHeight: x,
|
|
5343
5338
|
searchError: Ve,
|
|
5344
5339
|
searchVisible: L,
|
|
5345
|
-
searchValues:
|
|
5340
|
+
searchValues: fe
|
|
5346
5341
|
}), /* @__PURE__ */ n(pn, {
|
|
5347
5342
|
context: d,
|
|
5348
|
-
total:
|
|
5349
|
-
limit:
|
|
5343
|
+
total: de,
|
|
5344
|
+
limit: Ee,
|
|
5350
5345
|
page: je,
|
|
5351
5346
|
treeView: w,
|
|
5352
|
-
results:
|
|
5353
|
-
onRequestPageChange:
|
|
5347
|
+
results: te(),
|
|
5348
|
+
onRequestPageChange: Fe,
|
|
5354
5349
|
loading: Se,
|
|
5355
5350
|
onRowClicked: ae,
|
|
5356
|
-
scrollY: l ||
|
|
5357
|
-
colorsForResults:
|
|
5358
|
-
statusForResults:
|
|
5351
|
+
scrollY: l || he(),
|
|
5352
|
+
colorsForResults: me,
|
|
5353
|
+
statusForResults: Te,
|
|
5359
5354
|
rowSelection: {
|
|
5360
|
-
selectedRowKeys: q == null ? void 0 : q.map((
|
|
5361
|
-
onChange:
|
|
5355
|
+
selectedRowKeys: q == null ? void 0 : q.map((ke) => ke.id),
|
|
5356
|
+
onChange: Ae
|
|
5362
5357
|
},
|
|
5363
5358
|
sorter: ee,
|
|
5364
|
-
onChangeSort:
|
|
5365
|
-
onFetchChildrenForRecord: w.isExpandable ?
|
|
5359
|
+
onChangeSort: Me,
|
|
5360
|
+
onFetchChildrenForRecord: w.isExpandable ? ce : void 0,
|
|
5366
5361
|
childField: w.field_parent,
|
|
5367
5362
|
rootTree: f
|
|
5368
5363
|
})]
|
|
@@ -5376,10 +5371,10 @@ function nc(e, t) {
|
|
|
5376
5371
|
style: c ? {} : {
|
|
5377
5372
|
display: "none"
|
|
5378
5373
|
},
|
|
5379
|
-
children: v ? /* @__PURE__ */ n(
|
|
5374
|
+
children: v ? /* @__PURE__ */ n(Le, {}) : ye()
|
|
5380
5375
|
});
|
|
5381
5376
|
}
|
|
5382
|
-
const To =
|
|
5377
|
+
const To = wt(nc), Fo = (e) => {
|
|
5383
5378
|
const {
|
|
5384
5379
|
visible: t,
|
|
5385
5380
|
onCloseModal: r,
|
|
@@ -5408,7 +5403,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5408
5403
|
}
|
|
5409
5404
|
i(v);
|
|
5410
5405
|
}
|
|
5411
|
-
const O = () => /* @__PURE__ */ P(
|
|
5406
|
+
const O = () => /* @__PURE__ */ P(ne, {
|
|
5412
5407
|
children: [/* @__PURE__ */ n(To, {
|
|
5413
5408
|
model: o,
|
|
5414
5409
|
nameSearch: s,
|
|
@@ -5429,7 +5424,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5429
5424
|
},
|
|
5430
5425
|
children: m("new")
|
|
5431
5426
|
}), /* @__PURE__ */ n(Ie, {
|
|
5432
|
-
icon: /* @__PURE__ */ n(
|
|
5427
|
+
icon: /* @__PURE__ */ n(Rt, {}),
|
|
5433
5428
|
onClick: () => {
|
|
5434
5429
|
y();
|
|
5435
5430
|
},
|
|
@@ -5443,8 +5438,8 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5443
5438
|
})
|
|
5444
5439
|
})]
|
|
5445
5440
|
});
|
|
5446
|
-
return /* @__PURE__ */ P(
|
|
5447
|
-
children: [/* @__PURE__ */ n(
|
|
5441
|
+
return /* @__PURE__ */ P(ne, {
|
|
5442
|
+
children: [/* @__PURE__ */ n(Ge, {
|
|
5448
5443
|
title: m("search"),
|
|
5449
5444
|
centered: !0,
|
|
5450
5445
|
width: f,
|
|
@@ -5469,7 +5464,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5469
5464
|
});
|
|
5470
5465
|
}, {
|
|
5471
5466
|
error: rc
|
|
5472
|
-
} =
|
|
5467
|
+
} = Ge, nn = (e) => {
|
|
5473
5468
|
rc({
|
|
5474
5469
|
title: "Error",
|
|
5475
5470
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
@@ -5515,16 +5510,16 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5515
5510
|
domain: c
|
|
5516
5511
|
} = i, f = o && !a ? {
|
|
5517
5512
|
backgroundColor: Oo.colorPrimaryBg
|
|
5518
|
-
} : void 0, [d, m] = T(!1), [v, p] = T(!1), [h, g] = T(!1), [y, O] = T(), _ =
|
|
5513
|
+
} : void 0, [d, m] = T(!1), [v, p] = T(!1), [h, g] = T(!1), [y, O] = T(), _ = ue(!1), [w, V] = T(""), D = ue(), E = Y(Ne), {
|
|
5519
5514
|
domain: b,
|
|
5520
5515
|
getValues: C,
|
|
5521
5516
|
getFields: S,
|
|
5522
5517
|
getContext: x,
|
|
5523
5518
|
elementHasLostFocus: $
|
|
5524
|
-
} = E || {}, R =
|
|
5525
|
-
|
|
5519
|
+
} = E || {}, R = ue([]), [F, A] = T([]), M = t && t[0] || void 0, I = t && t[1] || "";
|
|
5520
|
+
pe(() => {
|
|
5526
5521
|
!Array.isArray(t) && t && W(t);
|
|
5527
|
-
}, [t]),
|
|
5522
|
+
}, [t]), pe(() => {
|
|
5528
5523
|
M && I.length === 0 ? W(M) : M && I.length > 0 ? V(I) : !M && !I && V(D.current || "");
|
|
5529
5524
|
}, [t]);
|
|
5530
5525
|
const N = (B) => {
|
|
@@ -5595,7 +5590,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5595
5590
|
async function z() {
|
|
5596
5591
|
c && (R.current = await H.getHandler().evalDomain({
|
|
5597
5592
|
domain: c,
|
|
5598
|
-
values:
|
|
5593
|
+
values: kt({
|
|
5599
5594
|
fields: S(),
|
|
5600
5595
|
values: C()
|
|
5601
5596
|
}),
|
|
@@ -5734,7 +5729,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5734
5729
|
operator: f,
|
|
5735
5730
|
manualIds: d
|
|
5736
5731
|
} = e, [m, v] = T(!1), [p, h] = T(), [g, y] = T(), [O, _] = T(), [w, V] = T(0), [D, E] = T(0), [b, C] = T(), [S, x] = T(), [$, R] = T();
|
|
5737
|
-
|
|
5732
|
+
pe(() => {
|
|
5738
5733
|
M();
|
|
5739
5734
|
}, [t, o]);
|
|
5740
5735
|
async function F({
|
|
@@ -6145,7 +6140,7 @@ const {
|
|
|
6145
6140
|
uninformedString: a,
|
|
6146
6141
|
manualIds: l
|
|
6147
6142
|
} = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), [p, h] = T(), [g, y] = T("line");
|
|
6148
|
-
return
|
|
6143
|
+
return Ct(() => {
|
|
6149
6144
|
(async () => {
|
|
6150
6145
|
c(!0), d(void 0);
|
|
6151
6146
|
const O = Ln(o);
|
|
@@ -6286,7 +6281,7 @@ const xc = {
|
|
|
6286
6281
|
banner: !0
|
|
6287
6282
|
});
|
|
6288
6283
|
if (c)
|
|
6289
|
-
return /* @__PURE__ */ n(
|
|
6284
|
+
return /* @__PURE__ */ n(Le, {});
|
|
6290
6285
|
if (!f)
|
|
6291
6286
|
return /* @__PURE__ */ n(Ze, {
|
|
6292
6287
|
message: "No data to display",
|
|
@@ -6316,7 +6311,7 @@ const xc = {
|
|
|
6316
6311
|
isStack: h
|
|
6317
6312
|
})
|
|
6318
6313
|
})]
|
|
6319
|
-
}) : /* @__PURE__ */ n(
|
|
6314
|
+
}) : /* @__PURE__ */ n(ne, {
|
|
6320
6315
|
children: `Unknown graph type: ${d}`
|
|
6321
6316
|
});
|
|
6322
6317
|
};
|
|
@@ -6338,14 +6333,14 @@ const Tc = (e, t) => {
|
|
|
6338
6333
|
domain: s,
|
|
6339
6334
|
limit: a,
|
|
6340
6335
|
manualIds: l
|
|
6341
|
-
} = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), p = Y(
|
|
6336
|
+
} = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), p = Y(Qe), {
|
|
6342
6337
|
setGraphIsLoading: h = void 0
|
|
6343
6338
|
} = p || {};
|
|
6344
|
-
|
|
6339
|
+
bt(t, () => ({
|
|
6345
6340
|
refresh: () => {
|
|
6346
6341
|
g();
|
|
6347
6342
|
}
|
|
6348
|
-
})),
|
|
6343
|
+
})), pe(() => {
|
|
6349
6344
|
g();
|
|
6350
6345
|
}, [r]);
|
|
6351
6346
|
async function g() {
|
|
@@ -6361,7 +6356,7 @@ const Tc = (e, t) => {
|
|
|
6361
6356
|
const O = Ln(y.arch);
|
|
6362
6357
|
d(O);
|
|
6363
6358
|
} catch (y) {
|
|
6364
|
-
return console.error(y), /* @__PURE__ */ n(
|
|
6359
|
+
return console.error(y), /* @__PURE__ */ n(ne, {
|
|
6365
6360
|
children: JSON.stringify(y)
|
|
6366
6361
|
});
|
|
6367
6362
|
}
|
|
@@ -6417,13 +6412,13 @@ const Tc = (e, t) => {
|
|
|
6417
6412
|
manualIds: l
|
|
6418
6413
|
});
|
|
6419
6414
|
default:
|
|
6420
|
-
return /* @__PURE__ */ n(
|
|
6415
|
+
return /* @__PURE__ */ n(ne, {
|
|
6421
6416
|
children: `Graph ${f.type} not implemented`
|
|
6422
6417
|
});
|
|
6423
6418
|
}
|
|
6424
|
-
}, gn =
|
|
6419
|
+
}, gn = wt(Tc), {
|
|
6425
6420
|
confirm: Fc
|
|
6426
|
-
} =
|
|
6421
|
+
} = Ge, Oc = ({
|
|
6427
6422
|
onOk: e,
|
|
6428
6423
|
lang: t
|
|
6429
6424
|
}) => {
|
|
@@ -6438,7 +6433,7 @@ const Tc = (e, t) => {
|
|
|
6438
6433
|
});
|
|
6439
6434
|
}, {
|
|
6440
6435
|
confirm: Ic
|
|
6441
|
-
} =
|
|
6436
|
+
} = Ge, _c = ({
|
|
6442
6437
|
onOk: e,
|
|
6443
6438
|
lang: t
|
|
6444
6439
|
}) => {
|
|
@@ -6510,7 +6505,7 @@ const Tc = (e, t) => {
|
|
|
6510
6505
|
});
|
|
6511
6506
|
}
|
|
6512
6507
|
function V() {
|
|
6513
|
-
return /* @__PURE__ */ P(
|
|
6508
|
+
return /* @__PURE__ */ P(ne, {
|
|
6514
6509
|
children: [y(), /* @__PURE__ */ n(ze, {
|
|
6515
6510
|
tooltip: "Previous item",
|
|
6516
6511
|
icon: /* @__PURE__ */ n(Yr, {}),
|
|
@@ -6580,46 +6575,46 @@ const kc = (e) => {
|
|
|
6580
6575
|
} = f || {}, {
|
|
6581
6576
|
lang: g,
|
|
6582
6577
|
t: y
|
|
6583
|
-
} = Y(we), [O, _] = T(!1), [w, V] = T(!1), [D, E] = T(), [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T([]), [M, I] = T(!1), N =
|
|
6578
|
+
} = Y(we), [O, _] = T(!1), [w, V] = T(!1), [D, E] = T(), [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T([]), [M, I] = T(!1), N = ue([]), [k, j] = T(), q = ue(), [W, z] = T(void 0), {
|
|
6584
6579
|
readOnly: U,
|
|
6585
6580
|
relation: L,
|
|
6586
6581
|
context: B,
|
|
6587
6582
|
domain: ee
|
|
6588
6583
|
} = i, Z = i.type === "many2many", {
|
|
6589
6584
|
id: ie
|
|
6590
|
-
} = i, Q = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), J =
|
|
6591
|
-
|
|
6585
|
+
} = i, Q = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), J = ue();
|
|
6586
|
+
pe(() => {
|
|
6592
6587
|
if (J.current !== a) {
|
|
6593
|
-
J.current = a,
|
|
6588
|
+
J.current = a, fe();
|
|
6594
6589
|
return;
|
|
6595
6590
|
}
|
|
6596
|
-
|
|
6591
|
+
fe();
|
|
6597
6592
|
}, [s, a]);
|
|
6598
|
-
const
|
|
6599
|
-
(a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) &&
|
|
6593
|
+
const fe = $e(() => {
|
|
6594
|
+
(a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && Ee();
|
|
6600
6595
|
}, [s, a]);
|
|
6601
|
-
|
|
6596
|
+
pe(() => {
|
|
6602
6597
|
Be();
|
|
6603
6598
|
}, [h]);
|
|
6604
6599
|
const be = (X) => {
|
|
6605
|
-
var ae,
|
|
6600
|
+
var ae, Ae;
|
|
6606
6601
|
r == null || r({
|
|
6607
|
-
fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((
|
|
6602
|
+
fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((Ae = o.get("tree")) == null ? void 0 : Ae.fields),
|
|
6608
6603
|
items: Rc(X)
|
|
6609
6604
|
});
|
|
6610
|
-
},
|
|
6605
|
+
}, Ee = async () => {
|
|
6611
6606
|
await _e(), u > Q.length - 1 && u !== 0 && c(0);
|
|
6612
6607
|
}, _e = async (X) => {
|
|
6613
|
-
var ae,
|
|
6608
|
+
var ae, Ae, he;
|
|
6614
6609
|
V(!0), _(!1), E(void 0);
|
|
6615
6610
|
try {
|
|
6616
6611
|
const [ye, xe] = await zn({
|
|
6617
6612
|
treeView: {
|
|
6618
6613
|
arch: (ae = o.get("tree")) == null ? void 0 : ae.arch,
|
|
6619
|
-
fields: (
|
|
6614
|
+
fields: (Ae = o.get("tree")) == null ? void 0 : Ae.fields
|
|
6620
6615
|
},
|
|
6621
6616
|
formView: {
|
|
6622
|
-
fields: ((
|
|
6617
|
+
fields: ((he = o.get("form")) == null ? void 0 : he.fields) || {}
|
|
6623
6618
|
},
|
|
6624
6619
|
model: L,
|
|
6625
6620
|
items: s,
|
|
@@ -6629,7 +6624,7 @@ const kc = (e) => {
|
|
|
6629
6624
|
},
|
|
6630
6625
|
currentView: X || a
|
|
6631
6626
|
});
|
|
6632
|
-
return q.current || (q.current = ye.map((
|
|
6627
|
+
return q.current || (q.current = ye.map((ke) => ke.id)), (a || X) === "tree" && xe && z(xe), be(ye), ye;
|
|
6633
6628
|
} catch (ye) {
|
|
6634
6629
|
E(ye);
|
|
6635
6630
|
} finally {
|
|
@@ -6639,7 +6634,7 @@ const kc = (e) => {
|
|
|
6639
6634
|
async function Be() {
|
|
6640
6635
|
ee && (N.current = await H.getHandler().evalDomain({
|
|
6641
6636
|
domain: ee,
|
|
6642
|
-
values:
|
|
6637
|
+
values: kt({
|
|
6643
6638
|
fields: m(),
|
|
6644
6639
|
values: v()
|
|
6645
6640
|
}),
|
|
@@ -6673,7 +6668,7 @@ const kc = (e) => {
|
|
|
6673
6668
|
...p == null ? void 0 : p(),
|
|
6674
6669
|
...B
|
|
6675
6670
|
}
|
|
6676
|
-
}))[0],
|
|
6671
|
+
}))[0], Ae = (await H.getHandler().readObjects({
|
|
6677
6672
|
model: L,
|
|
6678
6673
|
ids: [X],
|
|
6679
6674
|
fields: o.get("tree").fields,
|
|
@@ -6681,13 +6676,13 @@ const kc = (e) => {
|
|
|
6681
6676
|
...p == null ? void 0 : p(),
|
|
6682
6677
|
...B
|
|
6683
6678
|
}
|
|
6684
|
-
}))[0],
|
|
6679
|
+
}))[0], he = s.map((ye) => ye.id === X ? {
|
|
6685
6680
|
...ye,
|
|
6686
6681
|
operation: "original",
|
|
6687
6682
|
values: ae,
|
|
6688
|
-
treeValues:
|
|
6683
|
+
treeValues: Ae
|
|
6689
6684
|
} : ye);
|
|
6690
|
-
be(
|
|
6685
|
+
be(he);
|
|
6691
6686
|
}, Ve = (X) => {
|
|
6692
6687
|
O ? Wt({
|
|
6693
6688
|
lang: g,
|
|
@@ -6700,7 +6695,7 @@ const kc = (e) => {
|
|
|
6700
6695
|
_c({
|
|
6701
6696
|
lang: g,
|
|
6702
6697
|
onOk: () => {
|
|
6703
|
-
a === "form" ?
|
|
6698
|
+
a === "form" ? Fe() : Me();
|
|
6704
6699
|
}
|
|
6705
6700
|
});
|
|
6706
6701
|
return;
|
|
@@ -6708,10 +6703,10 @@ const kc = (e) => {
|
|
|
6708
6703
|
Oc({
|
|
6709
6704
|
lang: g,
|
|
6710
6705
|
onOk: () => {
|
|
6711
|
-
a === "form" ?
|
|
6706
|
+
a === "form" ? Fe() : Me();
|
|
6712
6707
|
}
|
|
6713
6708
|
});
|
|
6714
|
-
},
|
|
6709
|
+
}, We = async () => {
|
|
6715
6710
|
const {
|
|
6716
6711
|
inv_field: X
|
|
6717
6712
|
} = i;
|
|
@@ -6725,11 +6720,11 @@ const kc = (e) => {
|
|
|
6725
6720
|
}) : (I(!0), R({
|
|
6726
6721
|
defaultValues: ae
|
|
6727
6722
|
}), C(!0));
|
|
6728
|
-
},
|
|
6723
|
+
}, te = async () => {
|
|
6729
6724
|
a === "form" ? Ve(() => {
|
|
6730
6725
|
x(!0);
|
|
6731
6726
|
}) : x(!0);
|
|
6732
|
-
},
|
|
6727
|
+
}, Fe = async () => {
|
|
6733
6728
|
V(!0), _(!1), E(void 0);
|
|
6734
6729
|
try {
|
|
6735
6730
|
if (Q[u].id > 0) {
|
|
@@ -6744,66 +6739,66 @@ const kc = (e) => {
|
|
|
6744
6739
|
E(X);
|
|
6745
6740
|
}
|
|
6746
6741
|
c(0), V(!1);
|
|
6747
|
-
},
|
|
6742
|
+
}, Me = async () => {
|
|
6748
6743
|
const X = Q.filter((ae) => F.includes(ae.id));
|
|
6749
6744
|
V(!0), _(!1), E(void 0);
|
|
6750
6745
|
try {
|
|
6751
|
-
const ae = X.map((
|
|
6752
|
-
...
|
|
6746
|
+
const ae = X.map((he) => he.id), Ae = s.filter((he) => !(ae.includes(he.id) && he.id < 0)).map((he) => ae.includes(he.id) ? {
|
|
6747
|
+
...he,
|
|
6753
6748
|
operation: "pendingRemove"
|
|
6754
|
-
} :
|
|
6755
|
-
be(
|
|
6749
|
+
} : he);
|
|
6750
|
+
be(Ae);
|
|
6756
6751
|
} catch (ae) {
|
|
6757
6752
|
E(ae);
|
|
6758
6753
|
}
|
|
6759
6754
|
c(0), V(!1);
|
|
6760
|
-
},
|
|
6761
|
-
let
|
|
6755
|
+
}, ce = (X, ae, Ae) => {
|
|
6756
|
+
let he;
|
|
6762
6757
|
if (X)
|
|
6763
|
-
|
|
6758
|
+
he = s.map((ye) => ye.id === X ? {
|
|
6764
6759
|
id: X,
|
|
6765
6760
|
operation: X > 0 ? "pendingUpdate" : "pendingCreate",
|
|
6766
6761
|
values: {
|
|
6767
|
-
...
|
|
6762
|
+
...Ae,
|
|
6768
6763
|
id: X
|
|
6769
6764
|
},
|
|
6770
6765
|
treeValues: {
|
|
6771
|
-
...
|
|
6766
|
+
...Ae,
|
|
6772
6767
|
id: X
|
|
6773
6768
|
}
|
|
6774
6769
|
} : ye);
|
|
6775
6770
|
else {
|
|
6776
6771
|
const ye = Oa(s);
|
|
6777
|
-
|
|
6772
|
+
he = s.concat({
|
|
6778
6773
|
id: ye,
|
|
6779
6774
|
operation: "pendingCreate",
|
|
6780
6775
|
values: {
|
|
6781
|
-
...
|
|
6776
|
+
...Ae,
|
|
6782
6777
|
id: ye
|
|
6783
6778
|
},
|
|
6784
6779
|
treeValues: {
|
|
6785
|
-
...
|
|
6780
|
+
...Ae,
|
|
6786
6781
|
id: ye
|
|
6787
6782
|
}
|
|
6788
6783
|
});
|
|
6789
6784
|
}
|
|
6790
|
-
be(
|
|
6791
|
-
},
|
|
6785
|
+
be(he), M || C(!1);
|
|
6786
|
+
}, me = async (X) => {
|
|
6792
6787
|
const {
|
|
6793
6788
|
id: ae
|
|
6794
6789
|
} = X;
|
|
6795
|
-
let
|
|
6796
|
-
const
|
|
6797
|
-
(
|
|
6798
|
-
},
|
|
6790
|
+
let Ae = s;
|
|
6791
|
+
const he = s.find((ye) => ye.id === ae);
|
|
6792
|
+
(he == null ? void 0 : he.values) === void 0 && (Ae = await _e("form")), R(Ae.find((ye) => ye.id === ae)), I(!1), C(!0);
|
|
6793
|
+
}, Te = async (X) => {
|
|
6799
6794
|
V(!0);
|
|
6800
6795
|
let ae = s;
|
|
6801
|
-
const
|
|
6796
|
+
const Ae = X.filter((he) => !s.find((ye) => ye.id === he));
|
|
6802
6797
|
try {
|
|
6803
|
-
for (const
|
|
6798
|
+
for (const he of Ae) {
|
|
6804
6799
|
const ye = (await H.getHandler().readObjects({
|
|
6805
6800
|
model: L,
|
|
6806
|
-
ids: [
|
|
6801
|
+
ids: [he],
|
|
6807
6802
|
fields: o.get("form").fields,
|
|
6808
6803
|
context: {
|
|
6809
6804
|
...p == null ? void 0 : p(),
|
|
@@ -6811,7 +6806,7 @@ const kc = (e) => {
|
|
|
6811
6806
|
}
|
|
6812
6807
|
}))[0], xe = (await H.getHandler().readObjects({
|
|
6813
6808
|
model: L,
|
|
6814
|
-
ids: [
|
|
6809
|
+
ids: [he],
|
|
6815
6810
|
fields: o.get("tree").fields,
|
|
6816
6811
|
context: {
|
|
6817
6812
|
...p == null ? void 0 : p(),
|
|
@@ -6819,20 +6814,20 @@ const kc = (e) => {
|
|
|
6819
6814
|
}
|
|
6820
6815
|
}))[0];
|
|
6821
6816
|
ae.push({
|
|
6822
|
-
id:
|
|
6817
|
+
id: he,
|
|
6823
6818
|
operation: "pendingLink",
|
|
6824
6819
|
values: ye,
|
|
6825
6820
|
treeValues: xe
|
|
6826
6821
|
});
|
|
6827
6822
|
}
|
|
6828
6823
|
be(ae);
|
|
6829
|
-
} catch (
|
|
6830
|
-
E(
|
|
6824
|
+
} catch (he) {
|
|
6825
|
+
E(he);
|
|
6831
6826
|
} finally {
|
|
6832
6827
|
V(!1);
|
|
6833
6828
|
}
|
|
6834
6829
|
};
|
|
6835
|
-
function
|
|
6830
|
+
function de() {
|
|
6836
6831
|
const X = Ac[a];
|
|
6837
6832
|
if (a === "graph")
|
|
6838
6833
|
return Ln(o.get("graph").arch).string;
|
|
@@ -6841,10 +6836,10 @@ const kc = (e) => {
|
|
|
6841
6836
|
return ae.parse(o.get(a).arch), ae.string;
|
|
6842
6837
|
}
|
|
6843
6838
|
}
|
|
6844
|
-
const
|
|
6845
|
-
var ae,
|
|
6839
|
+
const Xe = () => {
|
|
6840
|
+
var ae, Ae, he, ye;
|
|
6846
6841
|
if (a === "form")
|
|
6847
|
-
return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(
|
|
6842
|
+
return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(Ut, {
|
|
6848
6843
|
formView: o.get("form"),
|
|
6849
6844
|
values: (ae = Q[u]) == null ? void 0 : ae.values,
|
|
6850
6845
|
parentContext: {
|
|
@@ -6852,33 +6847,33 @@ const kc = (e) => {
|
|
|
6852
6847
|
...B
|
|
6853
6848
|
},
|
|
6854
6849
|
model: L,
|
|
6855
|
-
id: (
|
|
6850
|
+
id: (Ae = Q[u]) == null ? void 0 : Ae.id,
|
|
6856
6851
|
submitMode: "values",
|
|
6857
6852
|
onFieldsChange: (xe) => {
|
|
6858
6853
|
var tt;
|
|
6859
|
-
const
|
|
6854
|
+
const ke = (tt = Q[u]) == null ? void 0 : tt.id, et = s.map((ut) => ut.id === ke ? {
|
|
6860
6855
|
...ut,
|
|
6861
6856
|
operation: ut.operation === "original" ? "pendingUpdate" : ut.operation,
|
|
6862
6857
|
values: {
|
|
6863
6858
|
...xe,
|
|
6864
|
-
id:
|
|
6859
|
+
id: ke
|
|
6865
6860
|
},
|
|
6866
6861
|
treeValues: {
|
|
6867
6862
|
...xe,
|
|
6868
|
-
id:
|
|
6863
|
+
id: ke
|
|
6869
6864
|
}
|
|
6870
6865
|
} : ut);
|
|
6871
|
-
be(
|
|
6866
|
+
be(et), _(!0);
|
|
6872
6867
|
},
|
|
6873
6868
|
readOnly: U
|
|
6874
6869
|
});
|
|
6875
6870
|
let X = [];
|
|
6876
|
-
if (Q.some((xe) => xe.treeValues) && (X = k ?
|
|
6871
|
+
if (Q.some((xe) => xe.treeValues) && (X = k ? It({
|
|
6877
6872
|
resultsToSort: Q.map((xe) => xe.treeValues),
|
|
6878
6873
|
sorter: k,
|
|
6879
6874
|
fields: {
|
|
6880
6875
|
...o.get("tree").fields,
|
|
6881
|
-
...((
|
|
6876
|
+
...((he = o.get("form")) == null ? void 0 : he.fields) || {}
|
|
6882
6877
|
}
|
|
6883
6878
|
}) : Q.map((xe) => xe.treeValues)), a === "tree")
|
|
6884
6879
|
return /* @__PURE__ */ n(pn, {
|
|
@@ -6887,7 +6882,7 @@ const kc = (e) => {
|
|
|
6887
6882
|
treeView: o.get("tree"),
|
|
6888
6883
|
results: X,
|
|
6889
6884
|
loading: w,
|
|
6890
|
-
onRowClicked: ((ye = o.get("form")) == null ? void 0 : ye.fields) !== void 0 ?
|
|
6885
|
+
onRowClicked: ((ye = o.get("form")) == null ? void 0 : ye.fields) !== void 0 ? me : void 0,
|
|
6891
6886
|
showPagination: !1,
|
|
6892
6887
|
rowSelection: {
|
|
6893
6888
|
selectedRowKeys: F,
|
|
@@ -6924,25 +6919,25 @@ const kc = (e) => {
|
|
|
6924
6919
|
banner: !0
|
|
6925
6920
|
});
|
|
6926
6921
|
const Ke = M;
|
|
6927
|
-
return w ? /* @__PURE__ */ n(
|
|
6922
|
+
return w ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
|
|
6928
6923
|
children: [/* @__PURE__ */ n(Vc, {
|
|
6929
6924
|
mode: a,
|
|
6930
|
-
title:
|
|
6925
|
+
title: de(),
|
|
6931
6926
|
readOnly: U,
|
|
6932
6927
|
isMany2Many: Z,
|
|
6933
6928
|
formHasChanges: O,
|
|
6934
6929
|
totalItems: Q.length,
|
|
6935
6930
|
currentItemIndex: u,
|
|
6936
6931
|
onDelete: je,
|
|
6937
|
-
onCreateItem:
|
|
6932
|
+
onCreateItem: We,
|
|
6938
6933
|
onToggleViewMode: ge,
|
|
6939
6934
|
onPreviousItem: se,
|
|
6940
6935
|
onNextItem: Se,
|
|
6941
|
-
onSearchItem:
|
|
6936
|
+
onSearchItem: te,
|
|
6942
6937
|
selectedRowKeys: F,
|
|
6943
6938
|
showCreateButton: ((at = o.get("form")) == null ? void 0 : at.fields) !== void 0,
|
|
6944
6939
|
showToggleButton: o.size > 1
|
|
6945
|
-
}),
|
|
6940
|
+
}), Xe(), /* @__PURE__ */ n(Gt, {
|
|
6946
6941
|
formView: o.get("form"),
|
|
6947
6942
|
model: L,
|
|
6948
6943
|
id: $ == null ? void 0 : $.id,
|
|
@@ -6950,7 +6945,7 @@ const kc = (e) => {
|
|
|
6950
6945
|
values: $ == null ? void 0 : $.values,
|
|
6951
6946
|
defaultValues: $ == null ? void 0 : $.defaultValues,
|
|
6952
6947
|
visible: b,
|
|
6953
|
-
onSubmitSucceed:
|
|
6948
|
+
onSubmitSucceed: ce,
|
|
6954
6949
|
parentContext: {
|
|
6955
6950
|
...p == null ? void 0 : p(),
|
|
6956
6951
|
...B
|
|
@@ -6969,7 +6964,7 @@ const kc = (e) => {
|
|
|
6969
6964
|
},
|
|
6970
6965
|
visible: S,
|
|
6971
6966
|
onSelectValues: async (X) => {
|
|
6972
|
-
x(!1),
|
|
6967
|
+
x(!1), Te(X);
|
|
6973
6968
|
},
|
|
6974
6969
|
onCloseModal: () => {
|
|
6975
6970
|
x(!1);
|
|
@@ -6990,7 +6985,7 @@ const kc = (e) => {
|
|
|
6990
6985
|
const [u, c] = T(!0), [f, d] = T(), [m, v] = T(/* @__PURE__ */ new Map()), p = Y(Ne), {
|
|
6991
6986
|
getContext: h
|
|
6992
6987
|
} = p || {};
|
|
6993
|
-
|
|
6988
|
+
Ct(() => {
|
|
6994
6989
|
y();
|
|
6995
6990
|
}, [t]);
|
|
6996
6991
|
const g = async (_) => o && o[_] ? o[_] : await H.getHandler().getView({
|
|
@@ -7019,7 +7014,7 @@ const kc = (e) => {
|
|
|
7019
7014
|
c(!1);
|
|
7020
7015
|
}
|
|
7021
7016
|
};
|
|
7022
|
-
return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(
|
|
7017
|
+
return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(Le, {}) : f ? /* @__PURE__ */ n(Ze, {
|
|
7023
7018
|
className: "mt-10",
|
|
7024
7019
|
message: f,
|
|
7025
7020
|
type: "error",
|
|
@@ -7075,10 +7070,10 @@ const kc = (e) => {
|
|
|
7075
7070
|
token: l
|
|
7076
7071
|
} = Ec(), u = a && !s ? {
|
|
7077
7072
|
backgroundColor: l.colorPrimaryBg
|
|
7078
|
-
} : void 0, c =
|
|
7073
|
+
} : void 0, c = ue(), [f, d] = T(), m = Y(Ne), {
|
|
7079
7074
|
elementHasLostFocus: v
|
|
7080
7075
|
} = m || {};
|
|
7081
|
-
|
|
7076
|
+
pe(() => {
|
|
7082
7077
|
d(yo(r));
|
|
7083
7078
|
}, [r]);
|
|
7084
7079
|
const p = (y) => {
|
|
@@ -7107,7 +7102,7 @@ function Vo(e) {
|
|
|
7107
7102
|
showLabel: r = !0,
|
|
7108
7103
|
responsiveBehaviour: i
|
|
7109
7104
|
} = e, o = it(t.icon || "");
|
|
7110
|
-
return /* @__PURE__ */ n(
|
|
7105
|
+
return /* @__PURE__ */ n(ne, {
|
|
7111
7106
|
children: (t.label || o) && r ? /* @__PURE__ */ n($i, {
|
|
7112
7107
|
label: t.label,
|
|
7113
7108
|
icon: o,
|
|
@@ -7139,7 +7134,7 @@ function Pc(e) {
|
|
|
7139
7134
|
defaultActiveKey: "1",
|
|
7140
7135
|
tabPosition: t.tabPosition,
|
|
7141
7136
|
children: i.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ n(Nc, {
|
|
7142
|
-
tab: /* @__PURE__ */ P(
|
|
7137
|
+
tab: /* @__PURE__ */ P(ne, {
|
|
7143
7138
|
children: [o(s.icon), " ", s.label]
|
|
7144
7139
|
}),
|
|
7145
7140
|
children: /* @__PURE__ */ n(Vo, {
|
|
@@ -7203,7 +7198,7 @@ const {
|
|
|
7203
7198
|
} = s || {}, [d, m] = T(!1), {
|
|
7204
7199
|
t: v
|
|
7205
7200
|
} = Y(we);
|
|
7206
|
-
return a ? /* @__PURE__ */ P(
|
|
7201
|
+
return a ? /* @__PURE__ */ P(ne, {
|
|
7207
7202
|
children: [/* @__PURE__ */ n("div", {
|
|
7208
7203
|
onClick: () => {
|
|
7209
7204
|
if (c != null && c()) {
|
|
@@ -7240,7 +7235,7 @@ const {
|
|
|
7240
7235
|
m(!1), u == null || u();
|
|
7241
7236
|
}
|
|
7242
7237
|
})]
|
|
7243
|
-
}) : /* @__PURE__ */ P(
|
|
7238
|
+
}) : /* @__PURE__ */ P(ne, {
|
|
7244
7239
|
children: [/* @__PURE__ */ n(Ce, {
|
|
7245
7240
|
gutter: 8,
|
|
7246
7241
|
wrap: !1,
|
|
@@ -7295,7 +7290,7 @@ const {
|
|
|
7295
7290
|
limit: s,
|
|
7296
7291
|
onClose: a
|
|
7297
7292
|
}) => {
|
|
7298
|
-
const l =
|
|
7293
|
+
const l = ue({}), u = ue(/* @__PURE__ */ new Map()), c = $e(
|
|
7299
7294
|
async (g) => {
|
|
7300
7295
|
if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
|
|
7301
7296
|
ct(Oe("selectAtLeastOneField", r));
|
|
@@ -7317,18 +7312,18 @@ const {
|
|
|
7317
7312
|
format: g.exportType
|
|
7318
7313
|
});
|
|
7319
7314
|
a(), await new Promise((w) => setTimeout(w, 200));
|
|
7320
|
-
const _ = await
|
|
7315
|
+
const _ = await Dt(O);
|
|
7321
7316
|
mn(O, _.mime);
|
|
7322
7317
|
},
|
|
7323
7318
|
[r, e, o, s, t, a]
|
|
7324
|
-
), f =
|
|
7319
|
+
), f = $e(async () => {
|
|
7325
7320
|
const g = await H.getHandler().getFields({
|
|
7326
7321
|
model: e,
|
|
7327
7322
|
context: t,
|
|
7328
7323
|
fields: []
|
|
7329
7324
|
});
|
|
7330
7325
|
return l.current["/"] = g, Ir({ fields: g });
|
|
7331
|
-
}, [e, t, l]), d =
|
|
7326
|
+
}, [e, t, l]), d = $e(
|
|
7332
7327
|
async (g) => {
|
|
7333
7328
|
const O = kn(g, l.current)[Rn(g)], _ = O.relation, w = await H.getHandler().getFields({
|
|
7334
7329
|
model: _,
|
|
@@ -7346,7 +7341,7 @@ const {
|
|
|
7346
7341
|
});
|
|
7347
7342
|
},
|
|
7348
7343
|
[l.current, e, t]
|
|
7349
|
-
), m =
|
|
7344
|
+
), m = $e(async () => {
|
|
7350
7345
|
const g = await Gc({ model: e, context: t }), y = await zc({
|
|
7351
7346
|
predefinedExports: g,
|
|
7352
7347
|
fields: l.current,
|
|
@@ -7365,7 +7360,7 @@ const {
|
|
|
7365
7360
|
})),
|
|
7366
7361
|
keysWithChilds: y
|
|
7367
7362
|
};
|
|
7368
|
-
}, [l.current]), v =
|
|
7363
|
+
}, [l.current]), v = $e(
|
|
7369
7364
|
async (g) => {
|
|
7370
7365
|
const y = await h("ir.exports"), O = await h("ir.exports.line"), _ = await H.getHandler().create({
|
|
7371
7366
|
model: "ir.exports",
|
|
@@ -7389,7 +7384,7 @@ const {
|
|
|
7389
7384
|
), { ...g, id: _ };
|
|
7390
7385
|
},
|
|
7391
7386
|
[]
|
|
7392
|
-
), p =
|
|
7387
|
+
), p = $e(
|
|
7393
7388
|
async (g) => {
|
|
7394
7389
|
await H.getHandler().delete({
|
|
7395
7390
|
model: "ir.exports",
|
|
@@ -7397,7 +7392,7 @@ const {
|
|
|
7397
7392
|
});
|
|
7398
7393
|
},
|
|
7399
7394
|
[]
|
|
7400
|
-
), h =
|
|
7395
|
+
), h = $e(
|
|
7401
7396
|
async (g) => {
|
|
7402
7397
|
if (u.current.has(g))
|
|
7403
7398
|
return u.current.get(g);
|
|
@@ -7685,8 +7680,8 @@ var Ro = { exports: {} };
|
|
|
7685
7680
|
return new Date((I === "X" ? 1e3 : 1) * M);
|
|
7686
7681
|
var k = p(I)(M), j = k.year, q = k.month, W = k.day, z = k.hours, U = k.minutes, L = k.seconds, B = k.milliseconds, ee = k.zone, Z = new Date(), ie = W || (j || q ? 1 : Z.getDate()), Q = j || Z.getFullYear(), J = 0;
|
|
7687
7682
|
j && !q || (J = q > 0 ? q - 1 : Z.getMonth());
|
|
7688
|
-
var
|
|
7689
|
-
return ee ? new Date(Date.UTC(Q, J, ie,
|
|
7683
|
+
var fe = z || 0, be = U || 0, Ee = L || 0, _e = B || 0;
|
|
7684
|
+
return ee ? new Date(Date.UTC(Q, J, ie, fe, be, Ee, _e + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Q, J, ie, fe, be, Ee, _e)) : new Date(Q, J, ie, fe, be, Ee, _e);
|
|
7690
7685
|
} catch {
|
|
7691
7686
|
return new Date("");
|
|
7692
7687
|
}
|
|
@@ -7747,7 +7742,7 @@ const nd = (e) => {
|
|
|
7747
7742
|
selectionValues: s,
|
|
7748
7743
|
readOnly: a
|
|
7749
7744
|
} = i, l = t == null ? void 0 : t.split(","), [u, c] = T([]), [f, d] = T();
|
|
7750
|
-
return
|
|
7745
|
+
return pe(() => {
|
|
7751
7746
|
if (!t) {
|
|
7752
7747
|
d(void 0), c([]);
|
|
7753
7748
|
return;
|
|
@@ -7821,7 +7816,7 @@ const nd = (e) => {
|
|
|
7821
7816
|
token: l
|
|
7822
7817
|
} = sd(), u = s && !o ? {
|
|
7823
7818
|
backgroundColor: l.colorPrimaryBg
|
|
7824
|
-
} : void 0, c =
|
|
7819
|
+
} : void 0, c = ue(null), {
|
|
7825
7820
|
setFieldValue: f,
|
|
7826
7821
|
getFieldValue: d
|
|
7827
7822
|
} = Y(Ne) || {}, {
|
|
@@ -7830,11 +7825,11 @@ const nd = (e) => {
|
|
|
7830
7825
|
i == null || i(_);
|
|
7831
7826
|
};
|
|
7832
7827
|
async function h() {
|
|
7833
|
-
const _ = await
|
|
7828
|
+
const _ = await Dt(r), w = `data:${_ == null ? void 0 : _.mime};base64,${r}`, V = document.createElement("a"), D = d(a), E = d("name");
|
|
7834
7829
|
V.href = w, V.download = D || E, V.click();
|
|
7835
7830
|
}
|
|
7836
7831
|
async function g() {
|
|
7837
|
-
const _ = await
|
|
7832
|
+
const _ = await Dt(r);
|
|
7838
7833
|
mn(r, _.mime);
|
|
7839
7834
|
}
|
|
7840
7835
|
async function y(_) {
|
|
@@ -7932,7 +7927,7 @@ function Zn(e) {
|
|
|
7932
7927
|
children: v.type.charAt(0).toUpperCase() + v.type.slice(1)
|
|
7933
7928
|
}), /* @__PURE__ */ n(le, {
|
|
7934
7929
|
flex: "none",
|
|
7935
|
-
children: /* @__PURE__ */ n(
|
|
7930
|
+
children: /* @__PURE__ */ n(Rt, {
|
|
7936
7931
|
style: {
|
|
7937
7932
|
opacity: t.view_id === v.view_id ? 1 : 0
|
|
7938
7933
|
}
|
|
@@ -7993,7 +7988,7 @@ function Zn(e) {
|
|
|
7993
7988
|
borderTopLeftRadius: 0,
|
|
7994
7989
|
borderBottomLeftRadius: 0
|
|
7995
7990
|
},
|
|
7996
|
-
icon: /* @__PURE__ */ n(
|
|
7991
|
+
icon: /* @__PURE__ */ n(At, {
|
|
7997
7992
|
style: {
|
|
7998
7993
|
fontSize: "0.5em"
|
|
7999
7994
|
}
|
|
@@ -8003,7 +7998,7 @@ function Zn(e) {
|
|
|
8003
7998
|
})]
|
|
8004
7999
|
});
|
|
8005
8000
|
}
|
|
8006
|
-
function
|
|
8001
|
+
function _t(e) {
|
|
8007
8002
|
const {
|
|
8008
8003
|
icon: t,
|
|
8009
8004
|
tooltip: r,
|
|
@@ -8032,7 +8027,7 @@ function Dt(e) {
|
|
|
8032
8027
|
overlay: l(),
|
|
8033
8028
|
disabled: a || !i || i.length === 0,
|
|
8034
8029
|
children: /* @__PURE__ */ P(Ie, {
|
|
8035
|
-
children: [t, " ", s, " ", /* @__PURE__ */ n(
|
|
8030
|
+
children: [t, " ", s, " ", /* @__PURE__ */ n(At, {})]
|
|
8036
8031
|
})
|
|
8037
8032
|
});
|
|
8038
8033
|
}
|
|
@@ -8060,7 +8055,7 @@ function ko(e) {
|
|
|
8060
8055
|
} = e, {
|
|
8061
8056
|
formHasChanges: r,
|
|
8062
8057
|
onNewClicked: i
|
|
8063
|
-
} = Y(
|
|
8058
|
+
} = Y(Qe), {
|
|
8064
8059
|
t: o,
|
|
8065
8060
|
lang: s
|
|
8066
8061
|
} = Y(we), a = () => {
|
|
@@ -8084,7 +8079,7 @@ function ko(e) {
|
|
|
8084
8079
|
}
|
|
8085
8080
|
const {
|
|
8086
8081
|
confirm: cd
|
|
8087
|
-
} =
|
|
8082
|
+
} = Ge, dd = ({
|
|
8088
8083
|
onOk: e,
|
|
8089
8084
|
onCancel: t,
|
|
8090
8085
|
lang: r
|
|
@@ -8124,7 +8119,7 @@ const ud = (e) => {
|
|
|
8124
8119
|
lang: o
|
|
8125
8120
|
} = Y(we), [s, a] = T(!1), l = /* @__PURE__ */ P(Ie, {
|
|
8126
8121
|
disabled: r,
|
|
8127
|
-
children: [/* @__PURE__ */ n(Ur, {}), `(${t})`, /* @__PURE__ */ n(
|
|
8122
|
+
children: [/* @__PURE__ */ n(Ur, {}), `(${t})`, /* @__PURE__ */ n(At, {
|
|
8128
8123
|
style: {
|
|
8129
8124
|
fontSize: 12
|
|
8130
8125
|
}
|
|
@@ -8148,11 +8143,11 @@ const ud = (e) => {
|
|
|
8148
8143
|
onOpenAttachmentDetail: l,
|
|
8149
8144
|
onListAllAttachments: u
|
|
8150
8145
|
} = e;
|
|
8151
|
-
return o ? /* @__PURE__ */ n(
|
|
8146
|
+
return o ? /* @__PURE__ */ n(Le, {
|
|
8152
8147
|
style: {
|
|
8153
8148
|
padding: 20
|
|
8154
8149
|
}
|
|
8155
|
-
}) : /* @__PURE__ */ P(
|
|
8150
|
+
}) : /* @__PURE__ */ P(ne, {
|
|
8156
8151
|
children: [/* @__PURE__ */ P("a", {
|
|
8157
8152
|
style: {
|
|
8158
8153
|
display: "block",
|
|
@@ -8172,7 +8167,7 @@ const ud = (e) => {
|
|
|
8172
8167
|
t(!1), s();
|
|
8173
8168
|
},
|
|
8174
8169
|
children: [/* @__PURE__ */ n(cn, {}), " ", Oe("addNewAttachment", r)]
|
|
8175
|
-
}), i.length > 0 && /* @__PURE__ */ P(
|
|
8170
|
+
}), i.length > 0 && /* @__PURE__ */ P(ne, {
|
|
8176
8171
|
children: [/* @__PURE__ */ n("li", {
|
|
8177
8172
|
className: "ant-dropdown-menu-item-divider"
|
|
8178
8173
|
}), i.map((c) => {
|
|
@@ -8234,9 +8229,9 @@ function md(e) {
|
|
|
8234
8229
|
onViewAttachmentDetails: s
|
|
8235
8230
|
} = e, {
|
|
8236
8231
|
formRef: a
|
|
8237
|
-
} = Y(
|
|
8232
|
+
} = Y(Qe), [l, u] = T(!1), [c, f] = T([]), [d, m] = T(!1), {
|
|
8238
8233
|
t: v
|
|
8239
|
-
} = Y(we), p =
|
|
8234
|
+
} = Y(we), p = $e(async () => {
|
|
8240
8235
|
u(!0);
|
|
8241
8236
|
try {
|
|
8242
8237
|
const y = await H.getHandler().readObjects({
|
|
@@ -8252,10 +8247,10 @@ function md(e) {
|
|
|
8252
8247
|
link: O.link
|
|
8253
8248
|
})));
|
|
8254
8249
|
} catch (y) {
|
|
8255
|
-
|
|
8250
|
+
Ue(y);
|
|
8256
8251
|
}
|
|
8257
8252
|
u(!1);
|
|
8258
|
-
}, t), h =
|
|
8253
|
+
}, t), h = $e(async (y) => {
|
|
8259
8254
|
if (y.link) {
|
|
8260
8255
|
window.open(y.link);
|
|
8261
8256
|
return;
|
|
@@ -8269,20 +8264,20 @@ function md(e) {
|
|
|
8269
8264
|
context: a.current.getContext()
|
|
8270
8265
|
}))[0];
|
|
8271
8266
|
} catch (_) {
|
|
8272
|
-
|
|
8267
|
+
Ue(_);
|
|
8273
8268
|
}
|
|
8274
8269
|
if (m(!1), !!O)
|
|
8275
8270
|
if (O.datas) {
|
|
8276
|
-
const _ = await
|
|
8271
|
+
const _ = await Dt(O.datas);
|
|
8277
8272
|
mn(O.datas, _.mime);
|
|
8278
8273
|
} else
|
|
8279
8274
|
s(O);
|
|
8280
|
-
}, []), g =
|
|
8275
|
+
}, []), g = $e(async (y) => {
|
|
8281
8276
|
s(y);
|
|
8282
8277
|
}, []);
|
|
8283
|
-
return
|
|
8278
|
+
return pe(() => {
|
|
8284
8279
|
p();
|
|
8285
|
-
}, [p]), /* @__PURE__ */ P(
|
|
8280
|
+
}, [p]), /* @__PURE__ */ P(ne, {
|
|
8286
8281
|
children: [/* @__PURE__ */ n(ud, {
|
|
8287
8282
|
numberOfAttachments: t.length,
|
|
8288
8283
|
attachments: c,
|
|
@@ -8292,14 +8287,14 @@ function md(e) {
|
|
|
8292
8287
|
onListAllAttachments: o,
|
|
8293
8288
|
onopenAttachmentLink: h,
|
|
8294
8289
|
onOpenAttachmentDetail: g
|
|
8295
|
-
}), /* @__PURE__ */ n(
|
|
8290
|
+
}), /* @__PURE__ */ n(Ge, {
|
|
8296
8291
|
title: v("downloadingAttachment"),
|
|
8297
8292
|
open: d,
|
|
8298
8293
|
footer: null,
|
|
8299
8294
|
closable: !1,
|
|
8300
8295
|
centered: !0,
|
|
8301
8296
|
maskClosable: !1,
|
|
8302
|
-
children: /* @__PURE__ */ n(
|
|
8297
|
+
children: /* @__PURE__ */ n(Le, {})
|
|
8303
8298
|
})]
|
|
8304
8299
|
});
|
|
8305
8300
|
}
|
|
@@ -8331,10 +8326,10 @@ function hd({
|
|
|
8331
8326
|
previousView: D,
|
|
8332
8327
|
setPreviousView: E,
|
|
8333
8328
|
goToResourceId: b
|
|
8334
|
-
} = Y(
|
|
8329
|
+
} = Y(Qe), {
|
|
8335
8330
|
t: C,
|
|
8336
8331
|
lang: S
|
|
8337
|
-
} = Y(we), x = Y(
|
|
8332
|
+
} = Y(we), x = Y(Mt), {
|
|
8338
8333
|
processAction: $
|
|
8339
8334
|
} = x || {}, R = Y(st), {
|
|
8340
8335
|
openRelate: F,
|
|
@@ -8424,8 +8419,8 @@ function hd({
|
|
|
8424
8419
|
}
|
|
8425
8420
|
return r ? /* @__PURE__ */ P(Ye, {
|
|
8426
8421
|
wrap: !0,
|
|
8427
|
-
children: [O && /* @__PURE__ */ P(
|
|
8428
|
-
children: [/* @__PURE__ */ n(
|
|
8422
|
+
children: [O && /* @__PURE__ */ P(ne, {
|
|
8423
|
+
children: [/* @__PURE__ */ n(Le, {}), St(), St()]
|
|
8429
8424
|
}), /* @__PURE__ */ n(ko, {
|
|
8430
8425
|
disabled: a || O || p || h
|
|
8431
8426
|
}), /* @__PURE__ */ n(qe, {
|
|
@@ -8446,7 +8441,7 @@ function hd({
|
|
|
8446
8441
|
disabled: a || l === void 0 || p || h || O,
|
|
8447
8442
|
loading: p,
|
|
8448
8443
|
onClick: j
|
|
8449
|
-
}),
|
|
8444
|
+
}), St(), /* @__PURE__ */ n(qe, {
|
|
8450
8445
|
icon: /* @__PURE__ */ n(Gr, {}),
|
|
8451
8446
|
tooltip: C("showLogs"),
|
|
8452
8447
|
disabled: a || l === void 0 || p || h || O,
|
|
@@ -8464,7 +8459,7 @@ function hd({
|
|
|
8464
8459
|
w.current.fetchValues();
|
|
8465
8460
|
});
|
|
8466
8461
|
}
|
|
8467
|
-
}),
|
|
8462
|
+
}), St(), /* @__PURE__ */ n(Zn, {
|
|
8468
8463
|
currentView: r,
|
|
8469
8464
|
previousView: D,
|
|
8470
8465
|
availableViews: t,
|
|
@@ -8473,7 +8468,7 @@ function hd({
|
|
|
8473
8468
|
},
|
|
8474
8469
|
disabled: z,
|
|
8475
8470
|
formHasChanges: s
|
|
8476
|
-
}),
|
|
8471
|
+
}), St(), /* @__PURE__ */ P(Ye, {
|
|
8477
8472
|
children: [/* @__PURE__ */ n(qe, {
|
|
8478
8473
|
icon: /* @__PURE__ */ n(Yr, {}),
|
|
8479
8474
|
tooltip: C("previous"),
|
|
@@ -8491,17 +8486,17 @@ function hd({
|
|
|
8491
8486
|
I(N);
|
|
8492
8487
|
}
|
|
8493
8488
|
})]
|
|
8494
|
-
}),
|
|
8489
|
+
}), St(), /* @__PURE__ */ n(_t, {
|
|
8495
8490
|
icon: /* @__PURE__ */ n(jn, {}),
|
|
8496
8491
|
disabled: z,
|
|
8497
8492
|
tooltip: C("actions"),
|
|
8498
8493
|
items: e == null ? void 0 : e.action,
|
|
8499
8494
|
onItemClick: async (L) => {
|
|
8500
|
-
!L || !(await
|
|
8495
|
+
!L || !(await Tt({
|
|
8501
8496
|
onFormSave: o
|
|
8502
8497
|
})).succeed || U(L);
|
|
8503
8498
|
}
|
|
8504
|
-
}), /* @__PURE__ */ n(
|
|
8499
|
+
}), /* @__PURE__ */ n(_t, {
|
|
8505
8500
|
icon: /* @__PURE__ */ n(Kn, {}),
|
|
8506
8501
|
disabled: z,
|
|
8507
8502
|
tooltip: C("reports"),
|
|
@@ -8509,7 +8504,7 @@ function hd({
|
|
|
8509
8504
|
onItemClick: async (L) => {
|
|
8510
8505
|
if (!L)
|
|
8511
8506
|
return;
|
|
8512
|
-
const B = await
|
|
8507
|
+
const B = await Tt({
|
|
8513
8508
|
onFormSave: o
|
|
8514
8509
|
});
|
|
8515
8510
|
!B.succeed || U({
|
|
@@ -8520,13 +8515,13 @@ function hd({
|
|
|
8520
8515
|
}
|
|
8521
8516
|
});
|
|
8522
8517
|
}
|
|
8523
|
-
}), /* @__PURE__ */ n(
|
|
8518
|
+
}), /* @__PURE__ */ n(_t, {
|
|
8524
8519
|
icon: /* @__PURE__ */ n(Kr, {}),
|
|
8525
8520
|
disabled: z,
|
|
8526
8521
|
tooltip: C("related"),
|
|
8527
8522
|
items: e == null ? void 0 : e.relate,
|
|
8528
8523
|
onItemClick: async (L) => {
|
|
8529
|
-
!L || !(await
|
|
8524
|
+
!L || !(await Tt({
|
|
8530
8525
|
onFormSave: o
|
|
8531
8526
|
})).succeed || F({
|
|
8532
8527
|
relateData: L,
|
|
@@ -8540,7 +8535,7 @@ function hd({
|
|
|
8540
8535
|
disabled: z,
|
|
8541
8536
|
attachments: _,
|
|
8542
8537
|
onAddNewAttachment: async () => {
|
|
8543
|
-
const L = await
|
|
8538
|
+
const L = await Tt({
|
|
8544
8539
|
onFormSave: o
|
|
8545
8540
|
});
|
|
8546
8541
|
if (!L.succeed)
|
|
@@ -8559,7 +8554,7 @@ function hd({
|
|
|
8559
8554
|
});
|
|
8560
8555
|
},
|
|
8561
8556
|
onListAllAttachments: async () => {
|
|
8562
|
-
const L = await
|
|
8557
|
+
const L = await Tt({
|
|
8563
8558
|
onFormSave: o
|
|
8564
8559
|
});
|
|
8565
8560
|
if (!L.succeed)
|
|
@@ -8572,7 +8567,7 @@ function hd({
|
|
|
8572
8567
|
});
|
|
8573
8568
|
},
|
|
8574
8569
|
onViewAttachmentDetails: async (L) => {
|
|
8575
|
-
!(await
|
|
8570
|
+
!(await Tt({
|
|
8576
8571
|
onFormSave: o
|
|
8577
8572
|
})).succeed || A({
|
|
8578
8573
|
model: "ir.attachment",
|
|
@@ -8583,12 +8578,12 @@ function hd({
|
|
|
8583
8578
|
})]
|
|
8584
8579
|
}) : null;
|
|
8585
8580
|
}
|
|
8586
|
-
function
|
|
8581
|
+
function St() {
|
|
8587
8582
|
return /* @__PURE__ */ n("div", {
|
|
8588
8583
|
className: "inline-block w-2"
|
|
8589
8584
|
});
|
|
8590
8585
|
}
|
|
8591
|
-
async function
|
|
8586
|
+
async function Tt({
|
|
8592
8587
|
onFormSave: e
|
|
8593
8588
|
}) {
|
|
8594
8589
|
const t = await (e == null ? void 0 : e());
|
|
@@ -8620,7 +8615,7 @@ const {
|
|
|
8620
8615
|
} : void 0, d = Y(Ne), {
|
|
8621
8616
|
elementHasLostFocus: m
|
|
8622
8617
|
} = d || {}, [v, p] = T(!1), [h, g] = T(!1);
|
|
8623
|
-
|
|
8618
|
+
pe(() => {
|
|
8624
8619
|
l && !v && g(!1), !r && !l && (p(!0), g(!0));
|
|
8625
8620
|
}, [v, l]);
|
|
8626
8621
|
const y = (O) => {
|
|
@@ -8633,7 +8628,7 @@ const {
|
|
|
8633
8628
|
children: [l ? null : /* @__PURE__ */ n(le, {
|
|
8634
8629
|
flex: "32px",
|
|
8635
8630
|
children: v ? /* @__PURE__ */ n(Ie, {
|
|
8636
|
-
icon: /* @__PURE__ */ n(
|
|
8631
|
+
icon: /* @__PURE__ */ n(Rt, {}),
|
|
8637
8632
|
onClick: () => {
|
|
8638
8633
|
o(r) && (p(!1), g(!1));
|
|
8639
8634
|
},
|
|
@@ -8719,7 +8714,7 @@ const {
|
|
|
8719
8714
|
function a(l) {
|
|
8720
8715
|
r(l.id);
|
|
8721
8716
|
}
|
|
8722
|
-
return /* @__PURE__ */ n(
|
|
8717
|
+
return /* @__PURE__ */ n(Ge, {
|
|
8723
8718
|
title: s("goToResourceId"),
|
|
8724
8719
|
centered: !0,
|
|
8725
8720
|
open: t,
|
|
@@ -8760,7 +8755,7 @@ const {
|
|
|
8760
8755
|
style: {
|
|
8761
8756
|
marginLeft: 15
|
|
8762
8757
|
},
|
|
8763
|
-
icon: /* @__PURE__ */ n(
|
|
8758
|
+
icon: /* @__PURE__ */ n(Rt, {}),
|
|
8764
8759
|
htmlType: "submit",
|
|
8765
8760
|
type: "primary",
|
|
8766
8761
|
disabled: o,
|
|
@@ -8829,7 +8824,7 @@ function bd({
|
|
|
8829
8824
|
graphIsLoading: u,
|
|
8830
8825
|
previousView: c,
|
|
8831
8826
|
setPreviousView: f
|
|
8832
|
-
} = Y(
|
|
8827
|
+
} = Y(Qe);
|
|
8833
8828
|
return /* @__PURE__ */ P(Ye, {
|
|
8834
8829
|
wrap: !0,
|
|
8835
8830
|
children: [/* @__PURE__ */ n($o, {
|
|
@@ -8882,14 +8877,14 @@ function yn(e) {
|
|
|
8882
8877
|
results: l,
|
|
8883
8878
|
totalItems: u,
|
|
8884
8879
|
selectedRowItems: c
|
|
8885
|
-
} = Y(
|
|
8880
|
+
} = Y(Qe), {
|
|
8886
8881
|
t: f
|
|
8887
8882
|
} = Y(we), {
|
|
8888
8883
|
token: d
|
|
8889
8884
|
} = xd();
|
|
8890
8885
|
function m() {
|
|
8891
8886
|
if ((o == null ? void 0 : o.type) === "form")
|
|
8892
|
-
return s ? u === 0 ? /* @__PURE__ */ P(
|
|
8887
|
+
return s ? u === 0 ? /* @__PURE__ */ P(ne, {
|
|
8893
8888
|
children: [f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8894
8889
|
copyable: {
|
|
8895
8890
|
icon: /* @__PURE__ */ n(Un, {
|
|
@@ -8900,7 +8895,7 @@ function yn(e) {
|
|
|
8900
8895
|
},
|
|
8901
8896
|
children: s
|
|
8902
8897
|
}), ")"]
|
|
8903
|
-
}) : /* @__PURE__ */ P(
|
|
8898
|
+
}) : /* @__PURE__ */ P(ne, {
|
|
8904
8899
|
children: [f("register"), " ", a === void 0 ? 1 : a + 1, " /", " ", l.length, " ", f("of"), " ", u, " - ", f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8905
8900
|
copyable: !0,
|
|
8906
8901
|
children: s
|
|
@@ -8908,14 +8903,14 @@ function yn(e) {
|
|
|
8908
8903
|
}) : "";
|
|
8909
8904
|
if ((o == null ? void 0 : o.type) === "tree" && c) {
|
|
8910
8905
|
if (c.length === 1)
|
|
8911
|
-
return /* @__PURE__ */ P(
|
|
8906
|
+
return /* @__PURE__ */ P(ne, {
|
|
8912
8907
|
children: ["1 ", f("selectedRegisters"), " - (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8913
8908
|
copyable: !0,
|
|
8914
8909
|
children: c[0].id
|
|
8915
8910
|
}), ")"]
|
|
8916
8911
|
});
|
|
8917
8912
|
if (c.length > 1)
|
|
8918
|
-
return /* @__PURE__ */ P(
|
|
8913
|
+
return /* @__PURE__ */ P(ne, {
|
|
8919
8914
|
children: [c.length, " ", f("selectedRegisters"), /* @__PURE__ */ n(Xt, {
|
|
8920
8915
|
copyable: {
|
|
8921
8916
|
text: c.map((v) => v.id).join(", ")
|
|
@@ -8969,7 +8964,7 @@ const Sd = (e) => {
|
|
|
8969
8964
|
domain: s,
|
|
8970
8965
|
formView: a,
|
|
8971
8966
|
treeView: l
|
|
8972
|
-
} = e, u =
|
|
8967
|
+
} = e, u = ue(), c = Y(Qe), {
|
|
8973
8968
|
setResults: f = void 0,
|
|
8974
8969
|
setCurrentItemIndex: d = void 0,
|
|
8975
8970
|
currentId: m = void 0,
|
|
@@ -8990,10 +8985,10 @@ const Sd = (e) => {
|
|
|
8990
8985
|
setSearchValues: x,
|
|
8991
8986
|
currentView: $
|
|
8992
8987
|
} = c || {}, [R, F] = T(!0);
|
|
8993
|
-
|
|
8988
|
+
pe(() => {
|
|
8994
8989
|
var j;
|
|
8995
8990
|
(j = u.current) == null || j.refresh();
|
|
8996
|
-
}, [C]),
|
|
8991
|
+
}, [C]), pe(() => {
|
|
8997
8992
|
t.view_id !== $.view_id && F(!0);
|
|
8998
8993
|
}, [$]);
|
|
8999
8994
|
const {
|
|
@@ -9025,7 +9020,7 @@ const Sd = (e) => {
|
|
|
9025
9020
|
limit: E,
|
|
9026
9021
|
setLimit: b
|
|
9027
9022
|
});
|
|
9028
|
-
return !r || !t ? null : /* @__PURE__ */ P(
|
|
9023
|
+
return !r || !t ? null : /* @__PURE__ */ P(ne, {
|
|
9029
9024
|
children: [/* @__PURE__ */ n(yn, {
|
|
9030
9025
|
title: t.name,
|
|
9031
9026
|
children: /* @__PURE__ */ n(bd, {
|
|
@@ -9051,7 +9046,7 @@ const Sd = (e) => {
|
|
|
9051
9046
|
searchVisible: g,
|
|
9052
9047
|
searchValues: S,
|
|
9053
9048
|
showLimitOptions: !1
|
|
9054
|
-
}), k ? /* @__PURE__ */ n(
|
|
9049
|
+
}), k ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(gn, {
|
|
9055
9050
|
ref: u,
|
|
9056
9051
|
view_id: t.view_id,
|
|
9057
9052
|
model: i,
|
|
@@ -9076,7 +9071,7 @@ const Sd = (e) => {
|
|
|
9076
9071
|
setResults: d,
|
|
9077
9072
|
setCurrentItemIndex: m
|
|
9078
9073
|
} = e;
|
|
9079
|
-
return t ? /* @__PURE__ */ P(
|
|
9074
|
+
return t ? /* @__PURE__ */ P(ne, {
|
|
9080
9075
|
children: [/* @__PURE__ */ n(yn, {
|
|
9081
9076
|
children: /* @__PURE__ */ n(hd, {
|
|
9082
9077
|
toolbar: a == null ? void 0 : a.toolbar
|
|
@@ -9108,7 +9103,7 @@ function Fd(e) {
|
|
|
9108
9103
|
function u(f) {
|
|
9109
9104
|
t(f.search);
|
|
9110
9105
|
}
|
|
9111
|
-
|
|
9106
|
+
pe(() => {
|
|
9112
9107
|
s.setFieldsValue({
|
|
9113
9108
|
search: i
|
|
9114
9109
|
});
|
|
@@ -9193,7 +9188,7 @@ function Id(e) {
|
|
|
9193
9188
|
results: V,
|
|
9194
9189
|
limit: D,
|
|
9195
9190
|
totalItems: E
|
|
9196
|
-
} = Y(
|
|
9191
|
+
} = Y(Qe), {
|
|
9197
9192
|
parentContext: b = {},
|
|
9198
9193
|
treeExpandable: C,
|
|
9199
9194
|
toolbar: S
|
|
@@ -9202,7 +9197,7 @@ function Id(e) {
|
|
|
9202
9197
|
} = Y(Od), {
|
|
9203
9198
|
t: $,
|
|
9204
9199
|
lang: R
|
|
9205
|
-
} = Y(we), F = Y(
|
|
9200
|
+
} = Y(we), F = Y(Mt), {
|
|
9206
9201
|
processAction: A
|
|
9207
9202
|
} = F || {}, [M, I] = T(!1), N = y !== void 0 && y.trim().length > 0;
|
|
9208
9203
|
function k() {
|
|
@@ -9222,7 +9217,7 @@ function Id(e) {
|
|
|
9222
9217
|
ids: o.map((L) => L.id)
|
|
9223
9218
|
}), d == null || d(void 0), m == null || m(void 0), (U = f == null ? void 0 : f.current) == null || U.refreshResults();
|
|
9224
9219
|
} catch (L) {
|
|
9225
|
-
|
|
9220
|
+
Ue(L);
|
|
9226
9221
|
} finally {
|
|
9227
9222
|
s == null || s(!1);
|
|
9228
9223
|
}
|
|
@@ -9240,7 +9235,7 @@ function Id(e) {
|
|
|
9240
9235
|
}
|
|
9241
9236
|
}) && ((U = f == null ? void 0 : f.current) == null || U.refreshResults());
|
|
9242
9237
|
} catch (L) {
|
|
9243
|
-
|
|
9238
|
+
Ue(L);
|
|
9244
9239
|
} finally {
|
|
9245
9240
|
u == null || u(!1);
|
|
9246
9241
|
}
|
|
@@ -9266,9 +9261,7 @@ function Id(e) {
|
|
|
9266
9261
|
}
|
|
9267
9262
|
return /* @__PURE__ */ P(Ye, {
|
|
9268
9263
|
wrap: !0,
|
|
9269
|
-
children: [
|
|
9270
|
-
children: [/* @__PURE__ */ n(Ee, {}), vt(), vt()]
|
|
9271
|
-
}), C ? null : /* @__PURE__ */ P(te, {
|
|
9264
|
+
children: [C ? null : /* @__PURE__ */ P(ne, {
|
|
9272
9265
|
children: [/* @__PURE__ */ n(Fd, {
|
|
9273
9266
|
disabled: l || a || O,
|
|
9274
9267
|
searchText: y,
|
|
@@ -9288,7 +9281,7 @@ function Id(e) {
|
|
|
9288
9281
|
},
|
|
9289
9282
|
disabled: l || a || O,
|
|
9290
9283
|
badgeNumber: v == null ? void 0 : v.length
|
|
9291
|
-
}),
|
|
9284
|
+
}), $t(), /* @__PURE__ */ n(ko, {
|
|
9292
9285
|
disabled: O
|
|
9293
9286
|
}), /* @__PURE__ */ n(qe, {
|
|
9294
9287
|
icon: /* @__PURE__ */ n(Un, {}),
|
|
@@ -9302,7 +9295,7 @@ function Id(e) {
|
|
|
9302
9295
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
|
|
9303
9296
|
loading: a,
|
|
9304
9297
|
onClick: k
|
|
9305
|
-
}),
|
|
9298
|
+
}), $t()]
|
|
9306
9299
|
}), /* @__PURE__ */ n(qe, {
|
|
9307
9300
|
icon: /* @__PURE__ */ n(Gr, {}),
|
|
9308
9301
|
tooltip: $("showLogs"),
|
|
@@ -9320,8 +9313,8 @@ function Id(e) {
|
|
|
9320
9313
|
var U;
|
|
9321
9314
|
(U = f == null ? void 0 : f.current) == null || U.refreshResults();
|
|
9322
9315
|
}
|
|
9323
|
-
}), !C && /* @__PURE__ */ P(
|
|
9324
|
-
children: [
|
|
9316
|
+
}), !C && /* @__PURE__ */ P(ne, {
|
|
9317
|
+
children: [$t(), /* @__PURE__ */ n(Zn, {
|
|
9325
9318
|
currentView: r,
|
|
9326
9319
|
availableViews: t,
|
|
9327
9320
|
onChangeView: (U) => {
|
|
@@ -9330,7 +9323,7 @@ function Id(e) {
|
|
|
9330
9323
|
previousView: w,
|
|
9331
9324
|
disabled: O
|
|
9332
9325
|
})]
|
|
9333
|
-
}),
|
|
9326
|
+
}), $t(), /* @__PURE__ */ n(_t, {
|
|
9334
9327
|
icon: /* @__PURE__ */ n(jn, {}),
|
|
9335
9328
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
|
|
9336
9329
|
tooltip: $("actions"),
|
|
@@ -9338,7 +9331,7 @@ function Id(e) {
|
|
|
9338
9331
|
onItemClick: (U) => {
|
|
9339
9332
|
!U || W(U);
|
|
9340
9333
|
}
|
|
9341
|
-
}), /* @__PURE__ */ n(
|
|
9334
|
+
}), /* @__PURE__ */ n(_t, {
|
|
9342
9335
|
icon: /* @__PURE__ */ n(Kn, {}),
|
|
9343
9336
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
|
|
9344
9337
|
tooltip: $("reports"),
|
|
@@ -9352,8 +9345,8 @@ function Id(e) {
|
|
|
9352
9345
|
}
|
|
9353
9346
|
});
|
|
9354
9347
|
}
|
|
9355
|
-
}), x && /* @__PURE__ */ P(
|
|
9356
|
-
children: [
|
|
9348
|
+
}), x && /* @__PURE__ */ P(ne, {
|
|
9349
|
+
children: [$t(), /* @__PURE__ */ n(_t, {
|
|
9357
9350
|
icon: /* @__PURE__ */ n(Lr, {
|
|
9358
9351
|
component: () => /* @__PURE__ */ P("svg", {
|
|
9359
9352
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9423,7 +9416,7 @@ function Id(e) {
|
|
|
9423
9416
|
})]
|
|
9424
9417
|
});
|
|
9425
9418
|
}
|
|
9426
|
-
function
|
|
9419
|
+
function $t() {
|
|
9427
9420
|
return /* @__PURE__ */ n("div", {
|
|
9428
9421
|
className: "inline-block w-2"
|
|
9429
9422
|
});
|
|
@@ -9446,8 +9439,8 @@ const _d = (e) => {
|
|
|
9446
9439
|
} = e, {
|
|
9447
9440
|
currentView: p,
|
|
9448
9441
|
setPreviousView: h
|
|
9449
|
-
} = Y(
|
|
9450
|
-
return t ? /* @__PURE__ */ P(
|
|
9442
|
+
} = Y(Qe);
|
|
9443
|
+
return t ? /* @__PURE__ */ P(ne, {
|
|
9451
9444
|
children: [/* @__PURE__ */ n(yn, {
|
|
9452
9445
|
children: /* @__PURE__ */ n(Id, {
|
|
9453
9446
|
toolbar: a == null ? void 0 : a.toolbar,
|
|
@@ -9544,7 +9537,7 @@ function Ad() {
|
|
|
9544
9537
|
const Rd = (e) => {
|
|
9545
9538
|
const {
|
|
9546
9539
|
dashboardData: t
|
|
9547
|
-
} = e, r =
|
|
9540
|
+
} = e, r = ue(), i = Y(st), {
|
|
9548
9541
|
openShortcut: o
|
|
9549
9542
|
} = i || {};
|
|
9550
9543
|
return t ? /* @__PURE__ */ P(Dd, {
|
|
@@ -9597,65 +9590,65 @@ function Md(e, t) {
|
|
|
9597
9590
|
limit: g
|
|
9598
9591
|
} = e, [y, O] = T(), [_, w] = T([]), [V, D] = T(!0), E = m || void 0, [b, C] = T(E), [S, x] = T([]), [$, R] = T(), [F, A] = T([]), [M, I] = T(), [N, k] = T(0), [j, q] = T(!1), [W, z] = T(!1), [U, L] = T(), {
|
|
9599
9592
|
t: B
|
|
9600
|
-
} = Y(we), ee =
|
|
9593
|
+
} = Y(we), ee = ue(), Z = ue(), ie = Y(st), {
|
|
9601
9594
|
setCurrentView: Q,
|
|
9602
9595
|
setCurrentId: J,
|
|
9603
|
-
tabs:
|
|
9596
|
+
tabs: fe,
|
|
9604
9597
|
activeKey: be,
|
|
9605
|
-
openAction:
|
|
9598
|
+
openAction: Ee,
|
|
9606
9599
|
onRemoveTab: _e
|
|
9607
9600
|
} = ie || {};
|
|
9608
|
-
Hi("ctrl+g,command+g", (
|
|
9609
|
-
|
|
9610
|
-
}, [be,
|
|
9611
|
-
function Be(
|
|
9612
|
-
C(
|
|
9601
|
+
Hi("ctrl+g,command+g", (te) => {
|
|
9602
|
+
te.preventDefault(), De();
|
|
9603
|
+
}, [be, fe, y, $, F]);
|
|
9604
|
+
function Be(te) {
|
|
9605
|
+
C(te), J == null || J(te);
|
|
9613
9606
|
}
|
|
9614
|
-
function ge(
|
|
9615
|
-
O(
|
|
9607
|
+
function ge(te) {
|
|
9608
|
+
O(te), Q == null || Q(te);
|
|
9616
9609
|
}
|
|
9617
|
-
|
|
9610
|
+
bt(t, () => ({
|
|
9618
9611
|
canWeClose: Se
|
|
9619
9612
|
}));
|
|
9620
9613
|
const se = async () => {
|
|
9621
9614
|
D(!0);
|
|
9622
|
-
const
|
|
9623
|
-
for (const
|
|
9624
|
-
const [
|
|
9625
|
-
|
|
9626
|
-
viewTuple:
|
|
9615
|
+
const te = [], Fe = [];
|
|
9616
|
+
for (const me of s) {
|
|
9617
|
+
const [Te, de] = me;
|
|
9618
|
+
de !== "dashboard" ? Fe.push({
|
|
9619
|
+
viewTuple: me,
|
|
9627
9620
|
promise: H.getHandler().getView({
|
|
9628
9621
|
model: i,
|
|
9629
|
-
type:
|
|
9630
|
-
id:
|
|
9622
|
+
type: de,
|
|
9623
|
+
id: Te,
|
|
9631
9624
|
context: o
|
|
9632
9625
|
})
|
|
9633
|
-
}) :
|
|
9634
|
-
viewTuple:
|
|
9626
|
+
}) : Fe.push({
|
|
9627
|
+
viewTuple: me
|
|
9635
9628
|
});
|
|
9636
9629
|
}
|
|
9637
|
-
const
|
|
9638
|
-
for (const
|
|
9639
|
-
if (!
|
|
9630
|
+
const Me = await kd(Fe);
|
|
9631
|
+
for (const me of Me) {
|
|
9632
|
+
if (!me)
|
|
9640
9633
|
continue;
|
|
9641
|
-
const [,
|
|
9642
|
-
let
|
|
9643
|
-
switch (
|
|
9634
|
+
const [, Te] = me.viewTuple;
|
|
9635
|
+
let de = me.info;
|
|
9636
|
+
switch (Te) {
|
|
9644
9637
|
case "dashboard": {
|
|
9645
|
-
const
|
|
9638
|
+
const Xe = s.find((at) => {
|
|
9646
9639
|
const [, X] = at;
|
|
9647
9640
|
return X === "form";
|
|
9648
9641
|
});
|
|
9649
9642
|
let Ke;
|
|
9650
|
-
|
|
9643
|
+
Xe && (Ke = {
|
|
9651
9644
|
action_id: v,
|
|
9652
9645
|
action_type: p,
|
|
9653
9646
|
name: a,
|
|
9654
9647
|
res_id: o.active_id,
|
|
9655
9648
|
res_model: i,
|
|
9656
|
-
view_id:
|
|
9657
|
-
view_type:
|
|
9658
|
-
}),
|
|
9649
|
+
view_id: Xe[0],
|
|
9650
|
+
view_type: Xe[1]
|
|
9651
|
+
}), te.push({
|
|
9659
9652
|
type: "dashboard",
|
|
9660
9653
|
id: o.active_id,
|
|
9661
9654
|
model: i,
|
|
@@ -9665,71 +9658,71 @@ function Md(e, t) {
|
|
|
9665
9658
|
break;
|
|
9666
9659
|
}
|
|
9667
9660
|
case "form": {
|
|
9668
|
-
|
|
9669
|
-
...
|
|
9670
|
-
type:
|
|
9661
|
+
te.push({
|
|
9662
|
+
...de,
|
|
9663
|
+
type: Te
|
|
9671
9664
|
});
|
|
9672
9665
|
break;
|
|
9673
9666
|
}
|
|
9674
9667
|
case "tree": {
|
|
9675
|
-
|
|
9676
|
-
...
|
|
9668
|
+
te.push({
|
|
9669
|
+
...de,
|
|
9677
9670
|
isExpandable: h,
|
|
9678
|
-
type:
|
|
9671
|
+
type: Te
|
|
9679
9672
|
});
|
|
9680
9673
|
break;
|
|
9681
9674
|
}
|
|
9682
9675
|
case "graph": {
|
|
9683
|
-
|
|
9684
|
-
...
|
|
9685
|
-
type:
|
|
9676
|
+
te.push({
|
|
9677
|
+
...de,
|
|
9678
|
+
type: Te
|
|
9686
9679
|
});
|
|
9687
9680
|
break;
|
|
9688
9681
|
}
|
|
9689
9682
|
}
|
|
9690
9683
|
}
|
|
9691
|
-
let
|
|
9692
|
-
!c &&
|
|
9693
|
-
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), _e == null || _e(u)), ge(
|
|
9684
|
+
let ce;
|
|
9685
|
+
!c && te.find((me) => me.type === "tree") ? ce = te.find((Te) => Te.type === "tree") : c ? ce = te.find((Te) => c.id ? Te.type === c.type && Te.view_id === c.id : Te.type === c.type) : ce = te.find((Te) => Te.type === "form"), ce || (Ue(`Error determining the first view to show for model ${i}.
|
|
9686
|
+
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), _e == null || _e(u)), ge(ce), w(te), D(!1);
|
|
9694
9687
|
};
|
|
9695
9688
|
l({
|
|
9696
9689
|
tabKey: u,
|
|
9697
9690
|
canWeClose: Se
|
|
9698
|
-
}),
|
|
9699
|
-
const
|
|
9700
|
-
ge(
|
|
9701
|
-
}, [i, s, m]),
|
|
9691
|
+
}), pe(() => {
|
|
9692
|
+
const te = _.find((Me) => Me.type === "tree"), Fe = _.find((Me) => c.id ? Me.type === c.type && Me.view_id === c.id : Me.type === c.type);
|
|
9693
|
+
ge(Fe || te), m ? J == null || J(E) : (Be(void 0), R(void 0)), se();
|
|
9694
|
+
}, [i, s, m]), pe(() => {
|
|
9702
9695
|
be === u && (J == null || J(b), Q == null || Q(y));
|
|
9703
|
-
}, [
|
|
9696
|
+
}, [fe, be]);
|
|
9704
9697
|
async function Se() {
|
|
9705
9698
|
return y && y.type === "form" ? await ee.current.cancelUnsavedChanges() : !0;
|
|
9706
9699
|
}
|
|
9707
9700
|
async function De() {
|
|
9708
9701
|
be === u && (y.type === "form" && !await ee.current.cancelUnsavedChanges() || q(!0));
|
|
9709
9702
|
}
|
|
9710
|
-
async function Ve(
|
|
9711
|
-
var
|
|
9703
|
+
async function Ve(te) {
|
|
9704
|
+
var me;
|
|
9712
9705
|
z(!0);
|
|
9713
|
-
const
|
|
9714
|
-
let
|
|
9715
|
-
if (
|
|
9706
|
+
const Fe = F.findIndex((Te) => Te.id === te);
|
|
9707
|
+
let Me;
|
|
9708
|
+
if (Fe === -1) {
|
|
9716
9709
|
try {
|
|
9717
|
-
|
|
9710
|
+
Me = (me = await H.getHandler().readObjects({
|
|
9718
9711
|
model: i,
|
|
9719
|
-
ids: [
|
|
9712
|
+
ids: [te],
|
|
9720
9713
|
context: o
|
|
9721
|
-
})) == null ? void 0 :
|
|
9714
|
+
})) == null ? void 0 : me[0];
|
|
9722
9715
|
} catch {
|
|
9723
9716
|
}
|
|
9724
|
-
if (!
|
|
9717
|
+
if (!Me) {
|
|
9725
9718
|
z(!1), q(!1), ct(B("idNotFound"));
|
|
9726
9719
|
return;
|
|
9727
9720
|
}
|
|
9728
9721
|
} else
|
|
9729
|
-
|
|
9722
|
+
Me = F[Fe];
|
|
9730
9723
|
z(!1), q(!1);
|
|
9731
|
-
const
|
|
9732
|
-
|
|
9724
|
+
const ce = s.find((Te) => Te[1] === "form");
|
|
9725
|
+
Ee({
|
|
9733
9726
|
domain: [],
|
|
9734
9727
|
context: o,
|
|
9735
9728
|
model: i,
|
|
@@ -9737,23 +9730,23 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9737
9730
|
title: a,
|
|
9738
9731
|
target: "current",
|
|
9739
9732
|
initialView: {
|
|
9740
|
-
id:
|
|
9733
|
+
id: ce == null ? void 0 : ce[0],
|
|
9741
9734
|
type: "form"
|
|
9742
9735
|
},
|
|
9743
9736
|
action_id: v,
|
|
9744
9737
|
action_type: p,
|
|
9745
|
-
res_id:
|
|
9738
|
+
res_id: te
|
|
9746
9739
|
});
|
|
9747
9740
|
}
|
|
9748
9741
|
function je() {
|
|
9749
|
-
return _.map((
|
|
9750
|
-
switch (
|
|
9742
|
+
return _.map((te) => {
|
|
9743
|
+
switch (te.type) {
|
|
9751
9744
|
case "form":
|
|
9752
9745
|
return /* @__PURE__ */ n(Td, {
|
|
9753
9746
|
formRef: ee,
|
|
9754
9747
|
currentId: b,
|
|
9755
|
-
visible: y.type ===
|
|
9756
|
-
formView:
|
|
9748
|
+
visible: y.type === te.type && y.view_id === te.view_id,
|
|
9749
|
+
formView: te,
|
|
9757
9750
|
model: i,
|
|
9758
9751
|
context: o,
|
|
9759
9752
|
domain: r,
|
|
@@ -9762,16 +9755,16 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9762
9755
|
results: F,
|
|
9763
9756
|
setResults: A,
|
|
9764
9757
|
setCurrentItemIndex: R
|
|
9765
|
-
}, `${
|
|
9758
|
+
}, `${te.type}-${te.view_id}`);
|
|
9766
9759
|
case "tree":
|
|
9767
9760
|
return /* @__PURE__ */ n(_d, {
|
|
9768
|
-
visible: y.type ===
|
|
9761
|
+
visible: y.type === te.type && y.view_id === te.view_id,
|
|
9769
9762
|
limit: g,
|
|
9770
9763
|
model: i,
|
|
9771
9764
|
context: o,
|
|
9772
9765
|
domain: r,
|
|
9773
|
-
formView: _.find((
|
|
9774
|
-
treeView:
|
|
9766
|
+
formView: _.find((Fe) => Fe.type === "form"),
|
|
9767
|
+
treeView: te,
|
|
9775
9768
|
searchTreeRef: Z,
|
|
9776
9769
|
searchTreeNameSearch: U,
|
|
9777
9770
|
availableViews: _,
|
|
@@ -9779,41 +9772,41 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9779
9772
|
setCurrentItemIndex: R,
|
|
9780
9773
|
setCurrentId: Be,
|
|
9781
9774
|
setCurrentView: ge
|
|
9782
|
-
}, `${
|
|
9775
|
+
}, `${te.type}-${te.view_id}`);
|
|
9783
9776
|
case "graph":
|
|
9784
9777
|
return /* @__PURE__ */ n(Sd, {
|
|
9785
|
-
visible: y.type ===
|
|
9786
|
-
viewData:
|
|
9778
|
+
visible: y.type === te.type && y.view_id === te.view_id,
|
|
9779
|
+
viewData: te,
|
|
9787
9780
|
model: i,
|
|
9788
9781
|
context: o,
|
|
9789
9782
|
domain: r,
|
|
9790
|
-
treeView: _.find((
|
|
9791
|
-
formView: _.find((
|
|
9792
|
-
}, `${
|
|
9783
|
+
treeView: _.find((Fe) => Fe.type === "tree"),
|
|
9784
|
+
formView: _.find((Fe) => Fe.type === "form")
|
|
9785
|
+
}, `${te.type}-${te.view_id}`);
|
|
9793
9786
|
case "dashboard":
|
|
9794
9787
|
return /* @__PURE__ */ n(Rd, {
|
|
9795
|
-
dashboardData:
|
|
9796
|
-
}, `${
|
|
9788
|
+
dashboardData: te
|
|
9789
|
+
}, `${te.type}-${te.view_id}`);
|
|
9797
9790
|
}
|
|
9798
9791
|
});
|
|
9799
9792
|
}
|
|
9800
|
-
function
|
|
9793
|
+
function We() {
|
|
9801
9794
|
if (b === void 0 && y.type === "form")
|
|
9802
9795
|
ee.current.clearAndReload();
|
|
9803
9796
|
else {
|
|
9804
9797
|
Be(void 0);
|
|
9805
|
-
const
|
|
9806
|
-
ge(
|
|
9798
|
+
const te = _.find((Fe) => Fe.type === "form");
|
|
9799
|
+
ge(te);
|
|
9807
9800
|
}
|
|
9808
9801
|
}
|
|
9809
|
-
return V ? /* @__PURE__ */ n(
|
|
9802
|
+
return V ? /* @__PURE__ */ n(Le, {}) : y ? /* @__PURE__ */ P(ll, {
|
|
9810
9803
|
title: a,
|
|
9811
9804
|
currentView: y,
|
|
9812
9805
|
setCurrentView: ge,
|
|
9813
9806
|
availableViews: _,
|
|
9814
9807
|
formRef: ee,
|
|
9815
9808
|
searchTreeRef: Z,
|
|
9816
|
-
onNewClicked:
|
|
9809
|
+
onNewClicked: We,
|
|
9817
9810
|
currentId: b,
|
|
9818
9811
|
setCurrentId: Be,
|
|
9819
9812
|
setCurrentItemIndex: R,
|
|
@@ -9841,7 +9834,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9841
9834
|
})]
|
|
9842
9835
|
}) : null;
|
|
9843
9836
|
}
|
|
9844
|
-
const Lo =
|
|
9837
|
+
const Lo = wt(Md);
|
|
9845
9838
|
async function Ed({
|
|
9846
9839
|
actionId: e,
|
|
9847
9840
|
rootContext: t = {},
|
|
@@ -9850,7 +9843,7 @@ async function Ed({
|
|
|
9850
9843
|
const i = "ir.actions.act_window", o = `${i},${e}`, s = await H.getHandler().getActionData({
|
|
9851
9844
|
action: o,
|
|
9852
9845
|
context: t
|
|
9853
|
-
}), a =
|
|
9846
|
+
}), a = vt({
|
|
9854
9847
|
context: s.context,
|
|
9855
9848
|
values: r,
|
|
9856
9849
|
fields: {}
|
|
@@ -10004,17 +9997,17 @@ function jd(e) {
|
|
|
10004
9997
|
domain: s = [],
|
|
10005
9998
|
visible: a = !0,
|
|
10006
9999
|
parentContext: l = {}
|
|
10007
|
-
} = e, [u, c] = T(!1), [f, d] = T(!1), [m, v] = T(), [p, h] = T(), [g, y] = T(), [O, _] = T(1), [w, V] = T(0), D =
|
|
10000
|
+
} = e, [u, c] = T(!1), [f, d] = T(!1), [m, v] = T(), [p, h] = T(), [g, y] = T(), [O, _] = T(1), [w, V] = T(0), D = ue(Bd), E = ue([]), [b, C] = T(0), [S, x] = T([]), [$, R] = T(void 0), [F, A] = T(), [M, I] = T(), [N, k] = T(), [j, q] = T(!1), W = ue([]), z = (J) => {
|
|
10008
10001
|
q(!0), _(J), V((J - 1) * D.current);
|
|
10009
10002
|
}, U = async () => {
|
|
10010
|
-
const J = W.current.length > 0 ? W.current : s,
|
|
10003
|
+
const J = W.current.length > 0 ? W.current : s, fe = hn(E.current, J), {
|
|
10011
10004
|
colors: be
|
|
10012
|
-
} =
|
|
10013
|
-
totalItems:
|
|
10005
|
+
} = Ot(p), {
|
|
10006
|
+
totalItems: Ee,
|
|
10014
10007
|
results: _e,
|
|
10015
10008
|
attrsEvaluated: Be
|
|
10016
10009
|
} = await H.getHandler().searchForTree({
|
|
10017
|
-
params:
|
|
10010
|
+
params: fe,
|
|
10018
10011
|
limit: D.current,
|
|
10019
10012
|
offset: w,
|
|
10020
10013
|
model: m,
|
|
@@ -10025,7 +10018,7 @@ function jd(e) {
|
|
|
10025
10018
|
}
|
|
10026
10019
|
});
|
|
10027
10020
|
R(Qt(Be));
|
|
10028
|
-
const ge =
|
|
10021
|
+
const ge = It({
|
|
10029
10022
|
resultsToSort: _e,
|
|
10030
10023
|
sorter: F,
|
|
10031
10024
|
fields: {
|
|
@@ -10034,7 +10027,7 @@ function jd(e) {
|
|
|
10034
10027
|
}
|
|
10035
10028
|
});
|
|
10036
10029
|
q(!1), x(ge);
|
|
10037
|
-
const se = await
|
|
10030
|
+
const se = await Ee;
|
|
10038
10031
|
C(se);
|
|
10039
10032
|
}, L = async () => {
|
|
10040
10033
|
try {
|
|
@@ -10043,15 +10036,15 @@ function jd(e) {
|
|
|
10043
10036
|
I(JSON.stringify(J));
|
|
10044
10037
|
}
|
|
10045
10038
|
};
|
|
10046
|
-
|
|
10039
|
+
pe(() => {
|
|
10047
10040
|
!f || a && L();
|
|
10048
10041
|
}, [O, w, f, a]);
|
|
10049
10042
|
const B = async (J) => {
|
|
10050
10043
|
d(!1), c(!0), k(void 0);
|
|
10051
10044
|
try {
|
|
10052
10045
|
J === "action" ? await ee() : await Z(), d(!0);
|
|
10053
|
-
} catch (
|
|
10054
|
-
k(
|
|
10046
|
+
} catch (fe) {
|
|
10047
|
+
k(fe);
|
|
10055
10048
|
} finally {
|
|
10056
10049
|
c(!1);
|
|
10057
10050
|
}
|
|
@@ -10069,23 +10062,23 @@ function jd(e) {
|
|
|
10069
10062
|
context: l
|
|
10070
10063
|
});
|
|
10071
10064
|
y(J);
|
|
10072
|
-
const
|
|
10065
|
+
const fe = await H.getHandler().getView({
|
|
10073
10066
|
model: r,
|
|
10074
10067
|
type: "tree",
|
|
10075
10068
|
id: i,
|
|
10076
10069
|
context: l
|
|
10077
10070
|
});
|
|
10078
|
-
h(
|
|
10071
|
+
h(fe);
|
|
10079
10072
|
};
|
|
10080
|
-
|
|
10073
|
+
pe(() => {
|
|
10081
10074
|
t ? B("action") : r && B("model");
|
|
10082
10075
|
}, [t, r]);
|
|
10083
10076
|
const ie = (J) => {
|
|
10084
10077
|
const {
|
|
10085
|
-
id:
|
|
10078
|
+
id: fe
|
|
10086
10079
|
} = J;
|
|
10087
10080
|
o({
|
|
10088
|
-
id:
|
|
10081
|
+
id: fe,
|
|
10089
10082
|
model: m,
|
|
10090
10083
|
treeView: p
|
|
10091
10084
|
});
|
|
@@ -10112,7 +10105,7 @@ function jd(e) {
|
|
|
10112
10105
|
sorter: F,
|
|
10113
10106
|
onChangeSort: (J) => {
|
|
10114
10107
|
A == null || A(J);
|
|
10115
|
-
const
|
|
10108
|
+
const fe = It({
|
|
10116
10109
|
resultsToSort: S,
|
|
10117
10110
|
sorter: J,
|
|
10118
10111
|
fields: {
|
|
@@ -10120,7 +10113,7 @@ function jd(e) {
|
|
|
10120
10113
|
...g.fields
|
|
10121
10114
|
}
|
|
10122
10115
|
});
|
|
10123
|
-
x(
|
|
10116
|
+
x(fe);
|
|
10124
10117
|
},
|
|
10125
10118
|
context: l
|
|
10126
10119
|
})]
|
|
@@ -10130,7 +10123,7 @@ function jd(e) {
|
|
|
10130
10123
|
message: N,
|
|
10131
10124
|
type: "error",
|
|
10132
10125
|
banner: !0
|
|
10133
|
-
}) : u ? /* @__PURE__ */ n(
|
|
10126
|
+
}) : u ? /* @__PURE__ */ n(Le, {
|
|
10134
10127
|
style: {
|
|
10135
10128
|
padding: "2rem"
|
|
10136
10129
|
}
|
|
@@ -10140,7 +10133,7 @@ const Kd = (e) => {
|
|
|
10140
10133
|
const {
|
|
10141
10134
|
model: t
|
|
10142
10135
|
} = e, [r, i] = T();
|
|
10143
|
-
|
|
10136
|
+
pe(() => {
|
|
10144
10137
|
o();
|
|
10145
10138
|
}, [t]);
|
|
10146
10139
|
async function o() {
|
|
@@ -10174,10 +10167,10 @@ function Yd(e, t) {
|
|
|
10174
10167
|
setIsLoading: m,
|
|
10175
10168
|
openAction: v,
|
|
10176
10169
|
moveItemsEnabled: p
|
|
10177
|
-
} = Y(Xn), h =
|
|
10178
|
-
|
|
10170
|
+
} = Y(Xn), h = ue(), g = ue();
|
|
10171
|
+
pe(() => {
|
|
10179
10172
|
y();
|
|
10180
|
-
}, [r, o, i]),
|
|
10173
|
+
}, [r, o, i]), bt(t, () => ({
|
|
10181
10174
|
refresh: () => {
|
|
10182
10175
|
y();
|
|
10183
10176
|
},
|
|
@@ -10367,14 +10360,14 @@ function Yd(e, t) {
|
|
|
10367
10360
|
});
|
|
10368
10361
|
if (ie) {
|
|
10369
10362
|
const [Q, J] = ie, {
|
|
10370
|
-
actionId:
|
|
10363
|
+
actionId: fe,
|
|
10371
10364
|
actionType: be,
|
|
10372
|
-
title:
|
|
10365
|
+
title: Ee,
|
|
10373
10366
|
model: _e
|
|
10374
10367
|
} = S, Be = {
|
|
10375
|
-
action_id:
|
|
10368
|
+
action_id: fe,
|
|
10376
10369
|
action_type: be,
|
|
10377
|
-
name:
|
|
10370
|
+
name: Ee,
|
|
10378
10371
|
res_id: Z.id,
|
|
10379
10372
|
res_model: _e,
|
|
10380
10373
|
view_id: Q,
|
|
@@ -10413,13 +10406,13 @@ function Yd(e, t) {
|
|
|
10413
10406
|
const [Z, ie] = ee, {
|
|
10414
10407
|
actionId: Q,
|
|
10415
10408
|
actionType: J,
|
|
10416
|
-
title:
|
|
10409
|
+
title: fe,
|
|
10417
10410
|
model: be
|
|
10418
10411
|
} = S;
|
|
10419
10412
|
B = {
|
|
10420
10413
|
action_id: Q,
|
|
10421
10414
|
action_type: J,
|
|
10422
|
-
name:
|
|
10415
|
+
name: fe,
|
|
10423
10416
|
res_id: !1,
|
|
10424
10417
|
res_model: be,
|
|
10425
10418
|
view_id: Z,
|
|
@@ -10437,7 +10430,7 @@ function Yd(e, t) {
|
|
|
10437
10430
|
})
|
|
10438
10431
|
});
|
|
10439
10432
|
}
|
|
10440
|
-
const Wd =
|
|
10433
|
+
const Wd = wt(Yd), Ud = (e) => {
|
|
10441
10434
|
const {
|
|
10442
10435
|
ooui: t
|
|
10443
10436
|
} = e;
|
|
@@ -10464,7 +10457,7 @@ const Wd = bt(Yd), Ud = (e) => {
|
|
|
10464
10457
|
} = r, y = Y(Ne), {
|
|
10465
10458
|
getContext: O
|
|
10466
10459
|
} = y || {};
|
|
10467
|
-
|
|
10460
|
+
Ct(() => {
|
|
10468
10461
|
w();
|
|
10469
10462
|
}, [o]);
|
|
10470
10463
|
const _ = (b) => {
|
|
@@ -10478,7 +10471,7 @@ const Wd = bt(Yd), Ud = (e) => {
|
|
|
10478
10471
|
if (r.domain) {
|
|
10479
10472
|
const C = await H.getHandler().evalDomain({
|
|
10480
10473
|
domain: r.domain,
|
|
10481
|
-
values:
|
|
10474
|
+
values: kt({
|
|
10482
10475
|
fields: y == null ? void 0 : y.getFields(),
|
|
10483
10476
|
values: y.getPlainValues()
|
|
10484
10477
|
}),
|
|
@@ -10537,7 +10530,7 @@ const Wd = bt(Yd), Ud = (e) => {
|
|
|
10537
10530
|
});
|
|
10538
10531
|
}), _(C);
|
|
10539
10532
|
};
|
|
10540
|
-
return f && a.length === 0 ? /* @__PURE__ */ n(
|
|
10533
|
+
return f && a.length === 0 ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(ne, {
|
|
10541
10534
|
children: /* @__PURE__ */ P("div", {
|
|
10542
10535
|
className: "flex flex-row",
|
|
10543
10536
|
children: [/* @__PURE__ */ n(Nt.Group, {
|
|
@@ -10736,8 +10729,8 @@ function su(e, t) {
|
|
|
10736
10729
|
key: "welcome",
|
|
10737
10730
|
closable: !0,
|
|
10738
10731
|
content: /* @__PURE__ */ n(iu, {})
|
|
10739
|
-
}]), f =
|
|
10740
|
-
|
|
10732
|
+
}]), f = ue(/* @__PURE__ */ new Map()), d = ue();
|
|
10733
|
+
bt(t, () => ({
|
|
10741
10734
|
retrieveAndOpenAction: p,
|
|
10742
10735
|
openShortcut: y
|
|
10743
10736
|
}));
|
|
@@ -10767,10 +10760,10 @@ function su(e, t) {
|
|
|
10767
10760
|
context: o
|
|
10768
10761
|
});
|
|
10769
10762
|
if (S.type === "ir.actions.wizard") {
|
|
10770
|
-
|
|
10763
|
+
Ue("Action type not supported");
|
|
10771
10764
|
return;
|
|
10772
10765
|
}
|
|
10773
|
-
const [x, $] = w.split(","), R = parseInt($), F =
|
|
10766
|
+
const [x, $] = w.split(","), R = parseInt($), F = vt({
|
|
10774
10767
|
context: S.context,
|
|
10775
10768
|
values: i,
|
|
10776
10769
|
fields: {}
|
|
@@ -10877,7 +10870,7 @@ function su(e, t) {
|
|
|
10877
10870
|
} = w, [M, I] = $[0], N = {
|
|
10878
10871
|
id: M,
|
|
10879
10872
|
type: I
|
|
10880
|
-
}, k =
|
|
10873
|
+
}, k = vt({
|
|
10881
10874
|
context: S,
|
|
10882
10875
|
values: {
|
|
10883
10876
|
...D,
|
|
@@ -10886,7 +10879,7 @@ function su(e, t) {
|
|
|
10886
10879
|
fields: V
|
|
10887
10880
|
}), j = x ? await H.getHandler().evalDomain({
|
|
10888
10881
|
domain: x,
|
|
10889
|
-
values:
|
|
10882
|
+
values: kt({
|
|
10890
10883
|
fields: V,
|
|
10891
10884
|
values: {
|
|
10892
10885
|
...D,
|
|
@@ -10924,7 +10917,7 @@ function su(e, t) {
|
|
|
10924
10917
|
} = w, C = `${D},${V}`, S = await H.getHandler().getActionData({
|
|
10925
10918
|
action: C,
|
|
10926
10919
|
context: o
|
|
10927
|
-
}), x =
|
|
10920
|
+
}), x = vt({
|
|
10928
10921
|
context: S.context,
|
|
10929
10922
|
values: i,
|
|
10930
10923
|
fields: {}
|
|
@@ -11111,7 +11104,7 @@ function su(e, t) {
|
|
|
11111
11104
|
})
|
|
11112
11105
|
});
|
|
11113
11106
|
}
|
|
11114
|
-
const Lu =
|
|
11107
|
+
const Lu = wt(su), {
|
|
11115
11108
|
useToken: au
|
|
11116
11109
|
} = Pe;
|
|
11117
11110
|
function lu(e) {
|
|
@@ -11185,7 +11178,7 @@ function Nu() {
|
|
|
11185
11178
|
onRemoveTab: i,
|
|
11186
11179
|
onChangeTab: o
|
|
11187
11180
|
} = e || {};
|
|
11188
|
-
return /* @__PURE__ */ n(
|
|
11181
|
+
return /* @__PURE__ */ n(ne, {
|
|
11189
11182
|
children: r.map((s) => /* @__PURE__ */ n(lu, {
|
|
11190
11183
|
tabKey: s.key,
|
|
11191
11184
|
label: s.title,
|
|
@@ -11215,7 +11208,7 @@ function Pu() {
|
|
|
11215
11208
|
} = e || {}, r = (t == null ? void 0 : t.map((i) => /* @__PURE__ */ n(du, {
|
|
11216
11209
|
tab: i
|
|
11217
11210
|
}, i.key))) || null;
|
|
11218
|
-
return /* @__PURE__ */ n(
|
|
11211
|
+
return /* @__PURE__ */ n(ne, {
|
|
11219
11212
|
children: r
|
|
11220
11213
|
});
|
|
11221
11214
|
}
|
|
@@ -11239,9 +11232,9 @@ const {
|
|
|
11239
11232
|
currentId: D,
|
|
11240
11233
|
openDefaultActionForModel: E
|
|
11241
11234
|
} = y || {};
|
|
11242
|
-
|
|
11235
|
+
pe(() => {
|
|
11243
11236
|
b();
|
|
11244
|
-
}, []),
|
|
11237
|
+
}, []), pe(() => {
|
|
11245
11238
|
x();
|
|
11246
11239
|
}, [_, w, V, D]);
|
|
11247
11240
|
async function b() {
|
|
@@ -11250,7 +11243,7 @@ const {
|
|
|
11250
11243
|
const M = await t();
|
|
11251
11244
|
f(M);
|
|
11252
11245
|
} catch (M) {
|
|
11253
|
-
|
|
11246
|
+
Ue(M);
|
|
11254
11247
|
} finally {
|
|
11255
11248
|
m(!1);
|
|
11256
11249
|
}
|
|
@@ -11321,11 +11314,11 @@ const {
|
|
|
11321
11314
|
})
|
|
11322
11315
|
})
|
|
11323
11316
|
})]
|
|
11324
|
-
}), /* @__PURE__ */ n(He.Divider, {}), d ? /* @__PURE__ */ n(
|
|
11317
|
+
}), /* @__PURE__ */ n(He.Divider, {}), d ? /* @__PURE__ */ n(Le, {
|
|
11325
11318
|
style: {
|
|
11326
11319
|
padding: "1rem"
|
|
11327
11320
|
}
|
|
11328
|
-
}) : c.length > 0 ? /* @__PURE__ */ n(
|
|
11321
|
+
}) : c.length > 0 ? /* @__PURE__ */ n(ne, {
|
|
11329
11322
|
children: c.map((M) => /* @__PURE__ */ n(He.Item, {
|
|
11330
11323
|
children: /* @__PURE__ */ n(F, {
|
|
11331
11324
|
title: M.name,
|
|
@@ -11383,7 +11376,7 @@ const {
|
|
|
11383
11376
|
}
|
|
11384
11377
|
await b(), a(!s);
|
|
11385
11378
|
}
|
|
11386
|
-
return /* @__PURE__ */ P(
|
|
11379
|
+
return /* @__PURE__ */ P(ne, {
|
|
11387
11380
|
children: [/* @__PURE__ */ n(Ie, {
|
|
11388
11381
|
type: s ? "primary" : "default",
|
|
11389
11382
|
icon: s ? /* @__PURE__ */ n(Br, {
|
|
@@ -11407,7 +11400,7 @@ const {
|
|
|
11407
11400
|
borderTopLeftRadius: 0,
|
|
11408
11401
|
borderBottomLeftRadius: 0
|
|
11409
11402
|
},
|
|
11410
|
-
icon: /* @__PURE__ */ n(
|
|
11403
|
+
icon: /* @__PURE__ */ n(At, {
|
|
11411
11404
|
style: {
|
|
11412
11405
|
fontSize: "0.5em"
|
|
11413
11406
|
}
|