@gisce/react-ooui 2.0.0-rc.4 → 2.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/dynamicColumnsHelper.d.ts +9 -1
- package/dist/helpers/dynamicColumnsHelper.d.ts.map +1 -1
- package/dist/react-ooui.es.js +864 -863
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +7 -7
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/types/index.d.ts +30 -29
- package/dist/types/index.d.ts.map +1 -1
- package/dist/widgets/views/Tree.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/helpers/dynamicColumnsHelper.ts +1 -1
- package/src/types/index.ts +92 -41
- package/src/widgets/views/Tree.tsx +3 -1
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Xe, { useContext as
|
|
1
|
+
import Xe, { useContext as W, useState as _, useEffect as pe, useRef as me, useCallback as Le, forwardRef as bt, useImperativeHandle as xt } from "react";
|
|
2
2
|
import { Tooltip as mt, theme as He, Typography as an, Form as it, Row as xe, Col as ce, Modal as qe, Button as Ie, Dropdown as jt, Menu as Be, Spin as Me, Divider as ln, Space as Ye, Input as tt, Select as Ct, Checkbox as Pt, Alert as Qe, Timeline as ir, Statistic as ri, Card as oi, Tag as ii, message as xn, DatePicker as En, TimePicker as Mr, InputNumber as $n, Progress as si, Avatar as ai, Badge as li, Pagination as ci, Tabs as Er, Popover as di, Radio as sr, Switch as ui, Steps as ar, Layout as fi } from "antd";
|
|
3
3
|
import { Label as At, Field as In, Tree as $r, Reference as mi, Selection as Ln, Many2one as Lr, Boolean as hi, Container as pi, parseContext as wt, Form as Nr, Integer as Dn, SearchFieldTypes as ut, SearchFilter as gi, parseContextFields as Cn, parseDomainFields as lr, transformDomainForChildWidget as Pr, graphProcessor as Hr, parseGraph as Nn, graphFieldUtils as yi } from "@gisce/ooui";
|
|
4
4
|
import * as cr from "@ant-design/icons";
|
|
5
5
|
import Br, { QuestionCircleOutlined as jr, ExclamationCircleOutlined as ht, LoadingOutlined as nt, DownOutlined as Rt, WarningOutlined as Kr, CloseOutlined as Kt, CheckOutlined as kt, TranslationOutlined as Yr, FolderOpenOutlined as Pn, DownloadOutlined as Hn, ClearOutlined as Bn, StarFilled as Wr, StarOutlined as Ur, UpOutlined as vi, SearchOutlined as jn, RightCircleOutlined as wi, ThunderboltOutlined as Kn, PrinterOutlined as Yn, EnterOutlined as Gr, PlusSquareOutlined as bi, MinusSquareOutlined as xi, FileAddOutlined as cn, AlignLeftOutlined as Ci, ApiOutlined as Si, DeleteOutlined as Wn, LeftOutlined as qr, RightOutlined as zr, EyeOutlined as Ti, FormOutlined as Ht, TableOutlined as Un, AreaChartOutlined as Fi, CalendarOutlined as Oi, LinkOutlined as Jr, SaveOutlined as _i, CopyOutlined as Gn, InfoCircleOutlined as Zr, ReloadOutlined as dn, EditOutlined as Xr, FilterOutlined as Qr, CloseCircleFilled as Ii, BorderOuterOutlined as Di, SettingOutlined as Vi, ExportOutlined as Ai } from "@ant-design/icons";
|
|
6
6
|
import { Interweave as qn } from "interweave";
|
|
7
|
-
import { jsxs as P, jsx as n, Fragment as
|
|
7
|
+
import { jsxs as P, jsx as n, Fragment as te } from "react/jsx-runtime";
|
|
8
8
|
import * as dr from "@tabler/icons-react";
|
|
9
9
|
import Ri from "antd/lib/input/TextArea";
|
|
10
10
|
import Yt from "styled-components";
|
|
@@ -367,7 +367,7 @@ function ye({
|
|
|
367
367
|
tooltip: c
|
|
368
368
|
} = e, {
|
|
369
369
|
t: m
|
|
370
|
-
} =
|
|
370
|
+
} = W(ve), y = a ? [{
|
|
371
371
|
required: !0,
|
|
372
372
|
message: m("fillRequiredField"),
|
|
373
373
|
type: l,
|
|
@@ -404,7 +404,7 @@ function ye({
|
|
|
404
404
|
flex: "auto",
|
|
405
405
|
children: p()
|
|
406
406
|
})]
|
|
407
|
-
}))() : (() => /* @__PURE__ */ P(
|
|
407
|
+
}))() : (() => /* @__PURE__ */ P(te, {
|
|
408
408
|
children: [h, p()]
|
|
409
409
|
}))();
|
|
410
410
|
}
|
|
@@ -595,11 +595,11 @@ const to = (e) => {
|
|
|
595
595
|
icon: l,
|
|
596
596
|
context: u,
|
|
597
597
|
readOnly: d
|
|
598
|
-
} = t, f =
|
|
598
|
+
} = t, f = W(Ne), {
|
|
599
599
|
executeButtonAction: c
|
|
600
600
|
} = f || {}, [m, y] = _(!1), {
|
|
601
601
|
lang: p
|
|
602
|
-
} =
|
|
602
|
+
} = W(ve);
|
|
603
603
|
async function h() {
|
|
604
604
|
y(!0), await c({
|
|
605
605
|
type: s,
|
|
@@ -661,11 +661,11 @@ const to = (e) => {
|
|
|
661
661
|
danger: c,
|
|
662
662
|
context: m,
|
|
663
663
|
readOnly: y
|
|
664
|
-
} = r || {}, p =
|
|
664
|
+
} = r || {}, p = W(Ne), {
|
|
665
665
|
executeButtonAction: h
|
|
666
666
|
} = p || {}, [g, v] = _(!1), {
|
|
667
667
|
lang: F
|
|
668
|
-
} =
|
|
668
|
+
} = W(ve);
|
|
669
669
|
function V() {
|
|
670
670
|
if (g)
|
|
671
671
|
return /* @__PURE__ */ n(nt, {});
|
|
@@ -856,7 +856,7 @@ const no = (e) => {
|
|
|
856
856
|
modalWidth: l
|
|
857
857
|
} = fn(), {
|
|
858
858
|
t: u
|
|
859
|
-
} =
|
|
859
|
+
} = W(ve), [d, f] = _([]), [c, m] = _(!1), [y, p] = _(!1), [h, g] = _({}), v = me();
|
|
860
860
|
pe(() => {
|
|
861
861
|
t ? F() : g({});
|
|
862
862
|
}, [t]);
|
|
@@ -944,7 +944,7 @@ const no = (e) => {
|
|
|
944
944
|
p(!1), a();
|
|
945
945
|
}
|
|
946
946
|
function E() {
|
|
947
|
-
return c ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(
|
|
947
|
+
return c ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(te, {
|
|
948
948
|
children: [A(), /* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(xe, {
|
|
949
949
|
justify: "end",
|
|
950
950
|
children: /* @__PURE__ */ P(Ye, {
|
|
@@ -1016,7 +1016,7 @@ const {
|
|
|
1016
1016
|
token: u
|
|
1017
1017
|
} = hs(), d = a && !o ? {
|
|
1018
1018
|
backgroundColor: u.colorPrimaryBg
|
|
1019
|
-
} : void 0, f =
|
|
1019
|
+
} : void 0, f = W(Ne), {
|
|
1020
1020
|
elementHasLostFocus: c
|
|
1021
1021
|
} = f || {};
|
|
1022
1022
|
let m = /* @__PURE__ */ n(tt, {
|
|
@@ -1044,7 +1044,7 @@ const {
|
|
|
1044
1044
|
requiredStyle: r,
|
|
1045
1045
|
onChange: i
|
|
1046
1046
|
}) => {
|
|
1047
|
-
const o =
|
|
1047
|
+
const o = W(Ne), {
|
|
1048
1048
|
activeId: s,
|
|
1049
1049
|
activeModel: a,
|
|
1050
1050
|
fetchValues: l,
|
|
@@ -1052,8 +1052,8 @@ const {
|
|
|
1052
1052
|
elementHasLostFocus: d
|
|
1053
1053
|
} = o || {}, [f, c] = _(!1), {
|
|
1054
1054
|
t: m
|
|
1055
|
-
} =
|
|
1056
|
-
return s ? /* @__PURE__ */ P(
|
|
1055
|
+
} = W(ve);
|
|
1056
|
+
return s ? /* @__PURE__ */ P(te, {
|
|
1057
1057
|
children: [/* @__PURE__ */ n("div", {
|
|
1058
1058
|
onClick: () => {
|
|
1059
1059
|
if (u != null && u()) {
|
|
@@ -1088,7 +1088,7 @@ const {
|
|
|
1088
1088
|
c(!1), l == null || l();
|
|
1089
1089
|
}
|
|
1090
1090
|
})]
|
|
1091
|
-
}) : /* @__PURE__ */ n(
|
|
1091
|
+
}) : /* @__PURE__ */ n(te, {
|
|
1092
1092
|
children: /* @__PURE__ */ P(xe, {
|
|
1093
1093
|
gutter: 8,
|
|
1094
1094
|
wrap: !1,
|
|
@@ -1359,9 +1359,9 @@ const Oa = (e) => {
|
|
|
1359
1359
|
onChange: i
|
|
1360
1360
|
} = e, {
|
|
1361
1361
|
readOnly: o
|
|
1362
|
-
} = t, s =
|
|
1362
|
+
} = t, s = me(null), {
|
|
1363
1363
|
t: a
|
|
1364
|
-
} =
|
|
1364
|
+
} = W(ve), l = (c) => {
|
|
1365
1365
|
i == null || i(c);
|
|
1366
1366
|
};
|
|
1367
1367
|
async function u() {
|
|
@@ -1376,7 +1376,7 @@ const Oa = (e) => {
|
|
|
1376
1376
|
function f() {
|
|
1377
1377
|
l(void 0);
|
|
1378
1378
|
}
|
|
1379
|
-
return /* @__PURE__ */ P(
|
|
1379
|
+
return /* @__PURE__ */ P(te, {
|
|
1380
1380
|
children: [/* @__PURE__ */ P(xe, {
|
|
1381
1381
|
gutter: 8,
|
|
1382
1382
|
wrap: !1,
|
|
@@ -1588,7 +1588,7 @@ const Jn = async (e) => {
|
|
|
1588
1588
|
relation: r,
|
|
1589
1589
|
context: i,
|
|
1590
1590
|
views: o
|
|
1591
|
-
} = t, [s, a] = _(!0), [l, u] = _(), [d, f] = _(/* @__PURE__ */ new Map()), c =
|
|
1591
|
+
} = t, [s, a] = _(!0), [l, u] = _(), [d, f] = _(/* @__PURE__ */ new Map()), c = W(Ne), {
|
|
1592
1592
|
getContext: m
|
|
1593
1593
|
} = c || {};
|
|
1594
1594
|
St(() => {
|
|
@@ -1639,7 +1639,7 @@ const Jn = async (e) => {
|
|
|
1639
1639
|
readOnly: g,
|
|
1640
1640
|
summaryField: v,
|
|
1641
1641
|
titleField: F
|
|
1642
|
-
} = i, V = s.filter((x) => x.values), b =
|
|
1642
|
+
} = i, V = s.filter((x) => x.values), b = W(Ne), {
|
|
1643
1643
|
getContext: A
|
|
1644
1644
|
} = b || {};
|
|
1645
1645
|
St(() => {
|
|
@@ -1681,7 +1681,7 @@ const Jn = async (e) => {
|
|
|
1681
1681
|
message: u,
|
|
1682
1682
|
type: "error",
|
|
1683
1683
|
banner: !0
|
|
1684
|
-
}) : a ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(
|
|
1684
|
+
}) : a ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(te, {
|
|
1685
1685
|
children: [/* @__PURE__ */ n(ir, {
|
|
1686
1686
|
style: {
|
|
1687
1687
|
padding: "1rem"
|
|
@@ -1753,7 +1753,7 @@ const Jn = async (e) => {
|
|
|
1753
1753
|
} = $a(), {
|
|
1754
1754
|
ooui: r,
|
|
1755
1755
|
value: i
|
|
1756
|
-
} = e, o = /* @__PURE__ */ P(
|
|
1756
|
+
} = e, o = /* @__PURE__ */ P(te, {
|
|
1757
1757
|
children: [/* @__PURE__ */ P("span", {
|
|
1758
1758
|
children: [r.label, " "]
|
|
1759
1759
|
}), r.tooltip && /* @__PURE__ */ n(mt, {
|
|
@@ -1962,7 +1962,7 @@ const Mt = ({
|
|
|
1962
1962
|
context: y,
|
|
1963
1963
|
readOnly: p,
|
|
1964
1964
|
field: h
|
|
1965
|
-
} = r, g =
|
|
1965
|
+
} = r, g = W(Ne), {
|
|
1966
1966
|
getContext: v
|
|
1967
1967
|
} = g || {};
|
|
1968
1968
|
St(() => {
|
|
@@ -2053,7 +2053,7 @@ const Mt = ({
|
|
|
2053
2053
|
message: u,
|
|
2054
2054
|
type: "error",
|
|
2055
2055
|
banner: !0
|
|
2056
|
-
}) : /* @__PURE__ */ n(
|
|
2056
|
+
}) : /* @__PURE__ */ n(te, {
|
|
2057
2057
|
children: /* @__PURE__ */ n("div", {
|
|
2058
2058
|
className: "flex flex-row",
|
|
2059
2059
|
children: /* @__PURE__ */ n(Ct, {
|
|
@@ -2387,18 +2387,18 @@ const Mt = ({
|
|
|
2387
2387
|
setLimit: A,
|
|
2388
2388
|
searchParams: D = [],
|
|
2389
2389
|
setSearchValues: E
|
|
2390
|
-
} = e, [x, C] = _(!1), [w, T] = _(!1), [$, M] = _(), [S, R] = _(1), [k, I] = _(0), [N, O] = _(), [j,
|
|
2391
|
-
g == null || g([...
|
|
2392
|
-
}, []),
|
|
2393
|
-
const
|
|
2390
|
+
} = e, [x, C] = _(!1), [w, T] = _(!1), [$, M] = _(), [S, R] = _(1), [k, I] = _(0), [N, O] = _(), [j, U] = _([]), [G, J] = _(void 0), [K, L] = _(void 0), B = me(b || Bt), ee = me([]), re = Le((se) => {
|
|
2391
|
+
g == null || g([...se]), U([...se]);
|
|
2392
|
+
}, []), oe = Le(() => v || j, [v, j]), Z = Le(async () => {
|
|
2393
|
+
const se = await H.getHandler().nameSearch({
|
|
2394
2394
|
model: t,
|
|
2395
2395
|
payload: l,
|
|
2396
2396
|
limit: B.current,
|
|
2397
2397
|
attrs: F,
|
|
2398
2398
|
context: d
|
|
2399
2399
|
});
|
|
2400
|
-
if (O(
|
|
2401
|
-
const de =
|
|
2400
|
+
if (O(se.length), f == null || f(se.length), se.length > 0) {
|
|
2401
|
+
const de = se.map((ke) => ke == null ? void 0 : ke[0]), { colors: je, status: we } = _t(c), Re = {};
|
|
2402
2402
|
je && (Re.colors = je), we && (Re.status = we);
|
|
2403
2403
|
const Ze = await H.getHandler().readEvalUiObjects({
|
|
2404
2404
|
model: t,
|
|
@@ -2407,19 +2407,19 @@ const Mt = ({
|
|
|
2407
2407
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
2408
2408
|
context: d,
|
|
2409
2409
|
attrs: Re
|
|
2410
|
-
}),
|
|
2411
|
-
|
|
2412
|
-
const De =
|
|
2413
|
-
resultsToSort:
|
|
2410
|
+
}), Q = Ze[0];
|
|
2411
|
+
ee.current = [...Q], J(Qt(Ze[1])), L(xr(Ze[1]));
|
|
2412
|
+
const De = Q.map((ke) => ke.id), Ae = y !== void 0 ? It({
|
|
2413
|
+
resultsToSort: Q,
|
|
2414
2414
|
sorter: y,
|
|
2415
2415
|
fields: { ...c.fields, ...m.fields }
|
|
2416
|
-
}) : [...
|
|
2417
|
-
|
|
2416
|
+
}) : [...ee.current];
|
|
2417
|
+
re(Ae), De.length > 0 ? h == null || h(0) : h == null || h(void 0);
|
|
2418
2418
|
} else
|
|
2419
|
-
|
|
2419
|
+
re([]), h == null || h(void 0);
|
|
2420
2420
|
C(!1), u.current = !0;
|
|
2421
2421
|
}, [
|
|
2422
|
-
|
|
2422
|
+
re,
|
|
2423
2423
|
u,
|
|
2424
2424
|
l,
|
|
2425
2425
|
t,
|
|
@@ -2431,9 +2431,9 @@ const Mt = ({
|
|
|
2431
2431
|
h,
|
|
2432
2432
|
f
|
|
2433
2433
|
]), z = Le(
|
|
2434
|
-
async (
|
|
2435
|
-
const { params: de, newOffset: je } =
|
|
2436
|
-
Re && (
|
|
2434
|
+
async (se) => {
|
|
2435
|
+
const { params: de, newOffset: je } = se || {}, we = hn(de || D, F), { colors: Re, status: Ze } = _t(c), Q = {};
|
|
2436
|
+
Re && (Q.colors = Re), Ze && (Q.status = Ze);
|
|
2437
2437
|
const { totalItems: De, results: Ae, attrsEvaluated: ke } = await H.getHandler().searchForTree({
|
|
2438
2438
|
params: we,
|
|
2439
2439
|
limit: B.current,
|
|
@@ -2441,29 +2441,29 @@ const Mt = ({
|
|
|
2441
2441
|
model: t,
|
|
2442
2442
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
2443
2443
|
context: d,
|
|
2444
|
-
attrs:
|
|
2444
|
+
attrs: Q
|
|
2445
2445
|
});
|
|
2446
|
-
J(Qt(ke)), L(xr(ke)),
|
|
2446
|
+
J(Qt(ke)), L(xr(ke)), ee.current = [...Ae];
|
|
2447
2447
|
const le = y !== void 0 ? It({
|
|
2448
2448
|
resultsToSort: Ae,
|
|
2449
2449
|
sorter: y,
|
|
2450
2450
|
fields: { ...c.fields, ...m.fields }
|
|
2451
|
-
}) : [...
|
|
2452
|
-
if (
|
|
2451
|
+
}) : [...ee.current];
|
|
2452
|
+
if (re(le), v && le.length > 0) {
|
|
2453
2453
|
const Ue = le.findIndex(
|
|
2454
|
-
(
|
|
2454
|
+
(fe) => V === fe.id
|
|
2455
2455
|
);
|
|
2456
2456
|
Ue === -1 ? h == null || h(0) : h == null || h(Ue);
|
|
2457
2457
|
} else
|
|
2458
2458
|
h == null || h(void 0);
|
|
2459
2459
|
C(!1);
|
|
2460
|
-
const
|
|
2461
|
-
O(
|
|
2460
|
+
const he = await De;
|
|
2461
|
+
O(he), f == null || f(he);
|
|
2462
2462
|
},
|
|
2463
2463
|
[
|
|
2464
2464
|
h,
|
|
2465
2465
|
v,
|
|
2466
|
-
|
|
2466
|
+
re,
|
|
2467
2467
|
V,
|
|
2468
2468
|
t,
|
|
2469
2469
|
d,
|
|
@@ -2476,10 +2476,10 @@ const Mt = ({
|
|
|
2476
2476
|
k,
|
|
2477
2477
|
D
|
|
2478
2478
|
]
|
|
2479
|
-
),
|
|
2480
|
-
async (
|
|
2479
|
+
), ue = Le(
|
|
2480
|
+
async (se) => {
|
|
2481
2481
|
try {
|
|
2482
|
-
C(!0), a == null || a(!0), l && !u.current ? await
|
|
2482
|
+
C(!0), a == null || a(!0), l && !u.current ? await Z() : await z(se);
|
|
2483
2483
|
} catch (de) {
|
|
2484
2484
|
M(de.message);
|
|
2485
2485
|
} finally {
|
|
@@ -2499,7 +2499,7 @@ const Mt = ({
|
|
|
2499
2499
|
u,
|
|
2500
2500
|
f,
|
|
2501
2501
|
h,
|
|
2502
|
-
|
|
2502
|
+
re,
|
|
2503
2503
|
M,
|
|
2504
2504
|
T,
|
|
2505
2505
|
C,
|
|
@@ -2508,22 +2508,22 @@ const Mt = ({
|
|
|
2508
2508
|
c
|
|
2509
2509
|
]
|
|
2510
2510
|
), be = Le(
|
|
2511
|
-
(
|
|
2512
|
-
if (JSON.stringify(
|
|
2511
|
+
(se) => {
|
|
2512
|
+
if (JSON.stringify(se) === JSON.stringify(y))
|
|
2513
2513
|
return;
|
|
2514
|
-
p == null || p(
|
|
2515
|
-
const de =
|
|
2516
|
-
resultsToSort:
|
|
2517
|
-
sorter:
|
|
2514
|
+
p == null || p(se);
|
|
2515
|
+
const de = se !== void 0 ? It({
|
|
2516
|
+
resultsToSort: oe(),
|
|
2517
|
+
sorter: se,
|
|
2518
2518
|
fields: { ...c.fields, ...m.fields }
|
|
2519
|
-
}) : [...
|
|
2520
|
-
|
|
2519
|
+
}) : [...ee.current];
|
|
2520
|
+
re(de);
|
|
2521
2521
|
},
|
|
2522
|
-
[p,
|
|
2522
|
+
[p, oe, c, m, re]
|
|
2523
2523
|
), Ee = Le(
|
|
2524
|
-
(
|
|
2525
|
-
const { params: de, searchValues: je, limit: we, offset: Re } =
|
|
2526
|
-
x || (r == null || r(void 0), i == null || i([]), E == null || E(je), o == null || o(de), s == null || s(!1), T(!0), M(void 0), R(1), we && (B.current = we, A == null || A(we)), Re && I(Re),
|
|
2524
|
+
(se) => {
|
|
2525
|
+
const { params: de, searchValues: je, limit: we, offset: Re } = se;
|
|
2526
|
+
x || (r == null || r(void 0), i == null || i([]), E == null || E(je), o == null || o(de), s == null || s(!1), T(!0), M(void 0), R(1), we && (B.current = we, A == null || A(we)), Re && I(Re), ue({
|
|
2527
2527
|
params: de,
|
|
2528
2528
|
newOffset: Re
|
|
2529
2529
|
}));
|
|
@@ -2539,11 +2539,11 @@ const Mt = ({
|
|
|
2539
2539
|
R,
|
|
2540
2540
|
A,
|
|
2541
2541
|
I,
|
|
2542
|
-
|
|
2542
|
+
ue
|
|
2543
2543
|
]
|
|
2544
2544
|
), Ve = Le(
|
|
2545
|
-
(
|
|
2546
|
-
C(!0), R(
|
|
2545
|
+
(se) => {
|
|
2546
|
+
C(!0), R(se), I((se - 1) * b);
|
|
2547
2547
|
},
|
|
2548
2548
|
[C, b, I, R]
|
|
2549
2549
|
), Pe = Le(() => {
|
|
@@ -2558,33 +2558,33 @@ const Mt = ({
|
|
|
2558
2558
|
A,
|
|
2559
2559
|
b
|
|
2560
2560
|
]), We = Le(
|
|
2561
|
-
async (
|
|
2562
|
-
const de =
|
|
2561
|
+
async (se) => {
|
|
2562
|
+
const de = se[(c == null ? void 0 : c.field_parent) || "child_id"], je = await H.getHandler().readObjects({
|
|
2563
2563
|
model: t,
|
|
2564
2564
|
ids: de,
|
|
2565
2565
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
2566
2566
|
context: d
|
|
2567
2567
|
});
|
|
2568
|
-
return
|
|
2568
|
+
return re([...oe(), ...je]), mo(_t(c), je);
|
|
2569
2569
|
},
|
|
2570
|
-
[c, t, d,
|
|
2570
|
+
[c, t, d, oe, re]
|
|
2571
2571
|
);
|
|
2572
2572
|
return {
|
|
2573
2573
|
submit: Ee,
|
|
2574
2574
|
clear: Pe,
|
|
2575
|
-
fetchResults:
|
|
2575
|
+
fetchResults: ue,
|
|
2576
2576
|
tableRefreshing: x,
|
|
2577
2577
|
searchFilterLoading: w,
|
|
2578
2578
|
searchError: $,
|
|
2579
2579
|
page: S,
|
|
2580
2580
|
offset: k,
|
|
2581
2581
|
limit: b,
|
|
2582
|
-
getResults:
|
|
2582
|
+
getResults: oe,
|
|
2583
2583
|
requestPageChange: Ve,
|
|
2584
2584
|
changeSort: be,
|
|
2585
2585
|
fetchChildrenForRecord: We,
|
|
2586
|
-
colorsForResults:
|
|
2587
|
-
statusForResults:
|
|
2586
|
+
colorsForResults: G,
|
|
2587
|
+
statusForResults: K,
|
|
2588
2588
|
totalItems: N
|
|
2589
2589
|
};
|
|
2590
2590
|
}, et = Xe.createContext(null), pl = (e) => {
|
|
@@ -2614,7 +2614,7 @@ const Mt = ({
|
|
|
2614
2614
|
setSearchTreeNameSearch: E,
|
|
2615
2615
|
goToResourceId: x,
|
|
2616
2616
|
limit: C
|
|
2617
|
-
} = e, [w, T] = _(!1), [$, M] = _(!1), [S, R] = _(!1), [k, I] = _(!0), [N, O] = _(!0), [j,
|
|
2617
|
+
} = e, [w, T] = _(!1), [$, M] = _(!1), [S, R] = _(!1), [k, I] = _(!0), [N, O] = _(!0), [j, U] = _([]), [G, J] = _(!1), [K, L] = _([]), [B, ee] = _(!1), [re, oe] = _(!0), [Z, z] = _(), [ue, be] = _({}), [Ee, Ve] = _(C !== void 0 ? C : Bt), [Pe, We] = _(i);
|
|
2618
2618
|
pe(() => {
|
|
2619
2619
|
m && m.length > 0 && !y && (p == null || p(0), f == null || f(m[0].id));
|
|
2620
2620
|
}, [m]), pe(() => {
|
|
@@ -2622,9 +2622,9 @@ const Mt = ({
|
|
|
2622
2622
|
}, [C]), pe(() => {
|
|
2623
2623
|
s.length === 1 ? z(s[0]) : s.length > 1 && z(s.filter((de) => de.view_id !== r.view_id)[0]);
|
|
2624
2624
|
}, [s]), pe(() => {
|
|
2625
|
-
(
|
|
2625
|
+
(Z == null ? void 0 : Z.view_id) === r.view_id && s.length > 1 && z(s.filter((de) => de.view_id !== r.view_id)[0]);
|
|
2626
2626
|
}, [r]);
|
|
2627
|
-
const
|
|
2627
|
+
const se = async () => {
|
|
2628
2628
|
var de;
|
|
2629
2629
|
return await ((de = a.current) == null ? void 0 : de.submitForm());
|
|
2630
2630
|
};
|
|
@@ -2640,7 +2640,7 @@ const Mt = ({
|
|
|
2640
2640
|
setFormHasChanges: M,
|
|
2641
2641
|
formRef: a,
|
|
2642
2642
|
searchTreeRef: l,
|
|
2643
|
-
onFormSave:
|
|
2643
|
+
onFormSave: se,
|
|
2644
2644
|
onNewClicked: u,
|
|
2645
2645
|
currentId: d,
|
|
2646
2646
|
setCurrentId: f,
|
|
@@ -2656,27 +2656,27 @@ const Mt = ({
|
|
|
2656
2656
|
treeIsLoading: N,
|
|
2657
2657
|
setTreeIsLoading: O,
|
|
2658
2658
|
attachments: j,
|
|
2659
|
-
setAttachments:
|
|
2659
|
+
setAttachments: U,
|
|
2660
2660
|
selectedRowItems: A,
|
|
2661
2661
|
setSelectedRowItems: b,
|
|
2662
|
-
duplicatingItem:
|
|
2662
|
+
duplicatingItem: G,
|
|
2663
2663
|
setDuplicatingItem: J,
|
|
2664
2664
|
setSearchParams: L,
|
|
2665
|
-
searchParams:
|
|
2665
|
+
searchParams: K,
|
|
2666
2666
|
searchVisible: B,
|
|
2667
|
-
setSearchVisible:
|
|
2667
|
+
setSearchVisible: ee,
|
|
2668
2668
|
sorter: g,
|
|
2669
2669
|
setSorter: v,
|
|
2670
2670
|
totalItems: F,
|
|
2671
2671
|
setTotalItems: V,
|
|
2672
2672
|
searchTreeNameSearch: D,
|
|
2673
2673
|
setSearchTreeNameSearch: E,
|
|
2674
|
-
setGraphIsLoading:
|
|
2675
|
-
graphIsLoading:
|
|
2676
|
-
previousView:
|
|
2674
|
+
setGraphIsLoading: oe,
|
|
2675
|
+
graphIsLoading: re,
|
|
2676
|
+
previousView: Z,
|
|
2677
2677
|
setPreviousView: z,
|
|
2678
2678
|
goToResourceId: x,
|
|
2679
|
-
searchValues:
|
|
2679
|
+
searchValues: ue,
|
|
2680
2680
|
setSearchValues: be,
|
|
2681
2681
|
limit: Ee,
|
|
2682
2682
|
setLimit: Ve,
|
|
@@ -2721,11 +2721,11 @@ const Mt = ({
|
|
|
2721
2721
|
const {
|
|
2722
2722
|
children: r,
|
|
2723
2723
|
globalValues: i = {}
|
|
2724
|
-
} = e, o =
|
|
2724
|
+
} = e, o = me(), s = me(), [a, l] = _(!1), u = W(at), {
|
|
2725
2725
|
openAction: d
|
|
2726
|
-
} = u || {}, f =
|
|
2726
|
+
} = u || {}, f = me([]), {
|
|
2727
2727
|
t: c
|
|
2728
|
-
} =
|
|
2728
|
+
} = W(ve);
|
|
2729
2729
|
xt(t, () => ({
|
|
2730
2730
|
openActionModal: b
|
|
2731
2731
|
}));
|
|
@@ -2947,13 +2947,13 @@ const Mt = ({
|
|
|
2947
2947
|
actionData: void 0
|
|
2948
2948
|
});
|
|
2949
2949
|
}
|
|
2950
|
-
return /* @__PURE__ */ n(
|
|
2950
|
+
return /* @__PURE__ */ n(te, {
|
|
2951
2951
|
children: /* @__PURE__ */ n(Et.Provider, {
|
|
2952
2952
|
value: {
|
|
2953
2953
|
processAction: F,
|
|
2954
2954
|
globalValues: i
|
|
2955
2955
|
},
|
|
2956
|
-
children: /* @__PURE__ */ P(
|
|
2956
|
+
children: /* @__PURE__ */ P(te, {
|
|
2957
2957
|
children: [r, /* @__PURE__ */ n(qe, {
|
|
2958
2958
|
title: c("generatingReport"),
|
|
2959
2959
|
open: a,
|
|
@@ -3092,18 +3092,18 @@ function Cl(e, t) {
|
|
|
3092
3092
|
} = e, {
|
|
3093
3093
|
t: x,
|
|
3094
3094
|
lang: C
|
|
3095
|
-
} =
|
|
3095
|
+
} = W(ve), [w, T] = _(!1), [$, M] = _(), [S, R] = _(), [k] = it.useForm(), [I, N] = _(), [O, j] = _(), U = W(vo), [G, J] = _(), [K, L] = _(!1), B = me(), ee = me({}), re = me({}), oe = me(!1), Z = me(!1), z = me(!1), be = (E !== void 0 ? E : G) < xl, Ee = W(Ne), {
|
|
3096
3096
|
activeId: Ve,
|
|
3097
3097
|
getPlainValues: Pe
|
|
3098
|
-
} = Ee || {}, We =
|
|
3099
|
-
setFormIsSaving:
|
|
3098
|
+
} = Ee || {}, We = W(et), {
|
|
3099
|
+
setFormIsSaving: se = void 0,
|
|
3100
3100
|
setFormHasChanges: de = void 0,
|
|
3101
3101
|
setCurrentId: je = void 0,
|
|
3102
3102
|
setFormIsLoading: we = void 0,
|
|
3103
3103
|
setAttachments: Re = void 0,
|
|
3104
3104
|
title: Ze = void 0,
|
|
3105
|
-
setTitle:
|
|
3106
|
-
} = (b ? We : {}) || {}, De =
|
|
3105
|
+
setTitle: Q = void 0
|
|
3106
|
+
} = (b ? We : {}) || {}, De = W(Et), {
|
|
3107
3107
|
processAction: Ae,
|
|
3108
3108
|
globalValues: ke
|
|
3109
3109
|
} = De || {};
|
|
@@ -3111,7 +3111,7 @@ function Cl(e, t) {
|
|
|
3111
3111
|
submitForm: zt,
|
|
3112
3112
|
getFields: rt,
|
|
3113
3113
|
getValues: Ke,
|
|
3114
|
-
getPlainValues:
|
|
3114
|
+
getPlainValues: X,
|
|
3115
3115
|
getContext: Ce,
|
|
3116
3116
|
fetchValues: gt,
|
|
3117
3117
|
cancelUnsavedChanges: nr,
|
|
@@ -3127,47 +3127,47 @@ function Cl(e, t) {
|
|
|
3127
3127
|
(i === void 0 && O || i !== void 0 && O && i < 0) && (B.current = void 0, R(void 0)), tr();
|
|
3128
3128
|
}
|
|
3129
3129
|
}, [i, r, y, p, V]), pe(() => {
|
|
3130
|
-
|
|
3130
|
+
K && (vn({
|
|
3131
3131
|
elementHasLostFocus: !0
|
|
3132
3132
|
}), L(!1));
|
|
3133
|
-
}, [
|
|
3134
|
-
const le = (
|
|
3135
|
-
de == null || de(!1),
|
|
3136
|
-
},
|
|
3137
|
-
|
|
3138
|
-
}, Ue = (
|
|
3139
|
-
|
|
3133
|
+
}, [K]);
|
|
3134
|
+
const le = (Y, q, ie, ne) => {
|
|
3135
|
+
de == null || de(!1), se == null || se(!1), s == null || s(Y, q, ie, ne), je == null || je(Y);
|
|
3136
|
+
}, he = () => {
|
|
3137
|
+
se == null || se(!1), o == null || o();
|
|
3138
|
+
}, Ue = (Y) => {
|
|
3139
|
+
se == null || se(!1), d == null || d(Y);
|
|
3140
3140
|
};
|
|
3141
|
-
function
|
|
3141
|
+
function fe() {
|
|
3142
3142
|
return i || B.current;
|
|
3143
3143
|
}
|
|
3144
3144
|
function rt() {
|
|
3145
3145
|
return O;
|
|
3146
3146
|
}
|
|
3147
3147
|
function Ke() {
|
|
3148
|
-
const
|
|
3148
|
+
const Y = {
|
|
3149
3149
|
...$e(O),
|
|
3150
3150
|
...Se()
|
|
3151
3151
|
};
|
|
3152
|
-
for (const
|
|
3153
|
-
|
|
3154
|
-
return
|
|
3155
|
-
}
|
|
3156
|
-
function
|
|
3157
|
-
const
|
|
3158
|
-
let
|
|
3159
|
-
return Object.keys(
|
|
3160
|
-
const Te =
|
|
3161
|
-
|
|
3162
|
-
}),
|
|
3163
|
-
}
|
|
3164
|
-
function
|
|
3165
|
-
const
|
|
3152
|
+
for (const q in Y)
|
|
3153
|
+
Y[q] === void 0 && delete Y[q];
|
|
3154
|
+
return Y;
|
|
3155
|
+
}
|
|
3156
|
+
function X() {
|
|
3157
|
+
const Y = Ke(), q = rt();
|
|
3158
|
+
let ie = {};
|
|
3159
|
+
return Object.keys(Y).forEach((ne) => {
|
|
3160
|
+
const Te = Y[ne];
|
|
3161
|
+
q[ne] && q[ne].type === "many2one" && Te && Array.isArray(Te) && Te.length === 2 ? ie[ne] = Te[0] : q[ne] && (q[ne].type === "one2many" || q[ne].type === "many2many") && Te && Te.items ? ie[ne] = Te.items.filter((yt) => yt.operation !== "pendingRemove").map((yt) => yt.id) : ie[ne] = Te;
|
|
3162
|
+
}), ie;
|
|
3163
|
+
}
|
|
3164
|
+
function ae() {
|
|
3165
|
+
const Y = {
|
|
3166
3166
|
...$e(O)
|
|
3167
3167
|
};
|
|
3168
|
-
for (const
|
|
3169
|
-
|
|
3170
|
-
return
|
|
3168
|
+
for (const q in Y)
|
|
3169
|
+
Y[q] === void 0 && delete Y[q];
|
|
3170
|
+
return Y;
|
|
3171
3171
|
}
|
|
3172
3172
|
function Ce() {
|
|
3173
3173
|
return {
|
|
@@ -3176,48 +3176,48 @@ function Cl(e, t) {
|
|
|
3176
3176
|
};
|
|
3177
3177
|
}
|
|
3178
3178
|
function ge() {
|
|
3179
|
-
return
|
|
3180
|
-
active_id:
|
|
3181
|
-
active_ids: [
|
|
3179
|
+
return fe() ? {
|
|
3180
|
+
active_id: fe(),
|
|
3181
|
+
active_ids: [fe()]
|
|
3182
3182
|
} : {};
|
|
3183
3183
|
}
|
|
3184
3184
|
function Se() {
|
|
3185
3185
|
return {
|
|
3186
|
-
id:
|
|
3187
|
-
active_id:
|
|
3188
|
-
active_ids: [
|
|
3186
|
+
id: fe(),
|
|
3187
|
+
active_id: fe(),
|
|
3188
|
+
active_ids: [fe()],
|
|
3189
3189
|
parent_id: Ve,
|
|
3190
3190
|
...ke
|
|
3191
3191
|
};
|
|
3192
3192
|
}
|
|
3193
|
-
const Fe = async (
|
|
3194
|
-
const
|
|
3193
|
+
const Fe = async (Y) => {
|
|
3194
|
+
const q = fe() ? S == null ? void 0 : S.context : {};
|
|
3195
3195
|
return await H.getHandler().defaultGet({
|
|
3196
3196
|
model: r,
|
|
3197
|
-
fields:
|
|
3197
|
+
fields: Y,
|
|
3198
3198
|
context: {
|
|
3199
3199
|
...v,
|
|
3200
|
-
...
|
|
3200
|
+
...q
|
|
3201
3201
|
},
|
|
3202
3202
|
extraValues: A
|
|
3203
3203
|
});
|
|
3204
3204
|
}, Oe = () => Object.keys(Tn({
|
|
3205
|
-
source:
|
|
3205
|
+
source: ee.current,
|
|
3206
3206
|
target: $e(O),
|
|
3207
3207
|
fields: O
|
|
3208
|
-
})).length !== 0, $e = (
|
|
3209
|
-
const
|
|
3210
|
-
return Ot(
|
|
3211
|
-
}, ot = (
|
|
3208
|
+
})).length !== 0, $e = (Y) => {
|
|
3209
|
+
const q = k.getFieldsValue(!0);
|
|
3210
|
+
return Ot(q, Y);
|
|
3211
|
+
}, ot = (Y, q) => {
|
|
3212
3212
|
$t({
|
|
3213
3213
|
values: {
|
|
3214
3214
|
...Ot(k.getFieldsValue(!0), O),
|
|
3215
|
-
[
|
|
3215
|
+
[Y]: q
|
|
3216
3216
|
},
|
|
3217
3217
|
fields: O,
|
|
3218
3218
|
reset: !1
|
|
3219
3219
|
});
|
|
3220
|
-
}, pt = (
|
|
3220
|
+
}, pt = (Y) => k.getFieldsValue(!0)[Y];
|
|
3221
3221
|
async function er() {
|
|
3222
3222
|
try {
|
|
3223
3223
|
return await k.validateFields(), !1;
|
|
@@ -3227,59 +3227,59 @@ function Cl(e, t) {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
const tr = async () => {
|
|
3229
3229
|
M(void 0), we == null || we(!0);
|
|
3230
|
-
let
|
|
3230
|
+
let Y;
|
|
3231
3231
|
try {
|
|
3232
|
-
p ?
|
|
3232
|
+
p ? Y = {
|
|
3233
3233
|
arch: p.arch,
|
|
3234
3234
|
fields: p.fields
|
|
3235
|
-
} :
|
|
3235
|
+
} : Y = await jo();
|
|
3236
3236
|
const {
|
|
3237
|
-
fields:
|
|
3238
|
-
arch:
|
|
3239
|
-
} =
|
|
3240
|
-
j(
|
|
3241
|
-
fields:
|
|
3242
|
-
arch:
|
|
3237
|
+
fields: q,
|
|
3238
|
+
arch: ie
|
|
3239
|
+
} = Y;
|
|
3240
|
+
j(q), N(ie), await gt({
|
|
3241
|
+
fields: q,
|
|
3242
|
+
arch: ie
|
|
3243
3243
|
});
|
|
3244
|
-
} catch (
|
|
3245
|
-
M(
|
|
3244
|
+
} catch (q) {
|
|
3245
|
+
M(q != null && q.message ? q.message + q.stack : q), we == null || we(!1);
|
|
3246
3246
|
}
|
|
3247
|
-
}, gt = async (
|
|
3248
|
-
let
|
|
3249
|
-
we == null || we(!0), M(void 0),
|
|
3250
|
-
values:
|
|
3247
|
+
}, gt = async (Y) => {
|
|
3248
|
+
let q, ie, ne, Te;
|
|
3249
|
+
we == null || we(!0), M(void 0), Y != null && Y.fields ? (ie = Y.fields, ne = Y.arch) : (ie = O, ne = I), y && (Y == null ? void 0 : Y.forceRefresh) !== !0 ? q = y : {
|
|
3250
|
+
values: q,
|
|
3251
3251
|
defaultGetCalled: Te
|
|
3252
3252
|
} = await Ko({
|
|
3253
|
-
fields:
|
|
3254
|
-
arch:
|
|
3255
|
-
}), F && (
|
|
3253
|
+
fields: ie,
|
|
3254
|
+
arch: ne
|
|
3255
|
+
}), F && (q = {
|
|
3256
3256
|
...ja(F),
|
|
3257
|
-
...
|
|
3258
|
-
}),
|
|
3259
|
-
values:
|
|
3260
|
-
fields:
|
|
3257
|
+
...q
|
|
3258
|
+
}), ee.current = Ot(q, ie), $t({
|
|
3259
|
+
values: q,
|
|
3260
|
+
fields: ie,
|
|
3261
3261
|
reset: !0,
|
|
3262
3262
|
isDefaultGet: Te
|
|
3263
3263
|
}), Jt({
|
|
3264
|
-
fields:
|
|
3265
|
-
arch:
|
|
3266
|
-
values:
|
|
3264
|
+
fields: ie,
|
|
3265
|
+
arch: ne,
|
|
3266
|
+
values: q
|
|
3267
3267
|
}), we == null || we(!1), de == null || de(!1), Te && L(!0);
|
|
3268
|
-
}, nr = async () => new Promise(async (
|
|
3268
|
+
}, nr = async () => new Promise(async (Y) => {
|
|
3269
3269
|
Oe() ? Ut({
|
|
3270
3270
|
lang: C,
|
|
3271
3271
|
onOk: () => {
|
|
3272
|
-
|
|
3272
|
+
he == null || he(), Y(!0);
|
|
3273
3273
|
},
|
|
3274
3274
|
onCancel: () => {
|
|
3275
|
-
|
|
3275
|
+
Y(!1);
|
|
3276
3276
|
}
|
|
3277
|
-
}) : (
|
|
3277
|
+
}) : (he == null || he(), Y(!0));
|
|
3278
3278
|
}), jo = async () => {
|
|
3279
3279
|
if (l) {
|
|
3280
|
-
const
|
|
3280
|
+
const Y = await H.getHandler().getActionStringForModel(r);
|
|
3281
3281
|
return (await H.getHandler().getViewsForAction({
|
|
3282
|
-
action:
|
|
3282
|
+
action: Y,
|
|
3283
3283
|
context: v
|
|
3284
3284
|
})).views.get("form");
|
|
3285
3285
|
}
|
|
@@ -3289,15 +3289,15 @@ function Cl(e, t) {
|
|
|
3289
3289
|
context: v
|
|
3290
3290
|
});
|
|
3291
3291
|
}, $t = ({
|
|
3292
|
-
values:
|
|
3293
|
-
fields:
|
|
3294
|
-
reset:
|
|
3295
|
-
isDefaultGet:
|
|
3292
|
+
values: Y,
|
|
3293
|
+
fields: q,
|
|
3294
|
+
reset: ie,
|
|
3295
|
+
isDefaultGet: ne = !1
|
|
3296
3296
|
}) => {
|
|
3297
3297
|
const yt = {
|
|
3298
|
-
...
|
|
3299
|
-
...
|
|
3300
|
-
}, wn = Ot(yt,
|
|
3298
|
+
...ie ? {} : k.getFieldsValue(!0),
|
|
3299
|
+
...Y
|
|
3300
|
+
}, wn = Ot(yt, q), ti = Object.keys(q).map((bn) => {
|
|
3301
3301
|
const ni = wn[bn] !== void 0 ? wn[bn] : void 0;
|
|
3302
3302
|
return {
|
|
3303
3303
|
name: bn,
|
|
@@ -3305,47 +3305,47 @@ function Cl(e, t) {
|
|
|
3305
3305
|
value: ni
|
|
3306
3306
|
};
|
|
3307
3307
|
});
|
|
3308
|
-
|
|
3308
|
+
ne || (re.current = wn), k.setFields(ti);
|
|
3309
3309
|
}, Ko = async ({
|
|
3310
|
-
fields:
|
|
3311
|
-
arch:
|
|
3310
|
+
fields: Y,
|
|
3311
|
+
arch: q
|
|
3312
3312
|
}) => {
|
|
3313
|
-
let
|
|
3314
|
-
if (
|
|
3315
|
-
|
|
3313
|
+
let ie = {}, ne = !1;
|
|
3314
|
+
if (fe()) {
|
|
3315
|
+
ie = (await H.getHandler().readObjects({
|
|
3316
3316
|
model: r,
|
|
3317
|
-
ids: [
|
|
3318
|
-
fields:
|
|
3317
|
+
ids: [fe()],
|
|
3318
|
+
fields: Y,
|
|
3319
3319
|
context: v
|
|
3320
3320
|
}))[0];
|
|
3321
3321
|
const Te = await H.getHandler().search({
|
|
3322
|
-
params: [["res_model", "=", r], ["res_id", "=",
|
|
3322
|
+
params: [["res_model", "=", r], ["res_id", "=", fe()]],
|
|
3323
3323
|
fields: ["id", "name"],
|
|
3324
3324
|
context: Ce(),
|
|
3325
3325
|
model: "ir.attachment"
|
|
3326
3326
|
});
|
|
3327
3327
|
Re == null || Re(Te);
|
|
3328
3328
|
} else
|
|
3329
|
-
Re == null || Re([]),
|
|
3329
|
+
Re == null || Re([]), ie = await Fe(Y), ne = !0;
|
|
3330
3330
|
return {
|
|
3331
|
-
values:
|
|
3332
|
-
defaultGetCalled:
|
|
3331
|
+
values: ie,
|
|
3332
|
+
defaultGetCalled: ne
|
|
3333
3333
|
};
|
|
3334
|
-
}, rr = async (
|
|
3334
|
+
}, rr = async (Y) => {
|
|
3335
3335
|
const {
|
|
3336
|
-
callOnSubmitSucceed:
|
|
3337
|
-
} =
|
|
3338
|
-
if (
|
|
3339
|
-
const
|
|
3340
|
-
source:
|
|
3336
|
+
callOnSubmitSucceed: q = !0
|
|
3337
|
+
} = Y || {};
|
|
3338
|
+
if (fe()) {
|
|
3339
|
+
const ie = Tn({
|
|
3340
|
+
source: ee.current,
|
|
3341
3341
|
target: $e(O),
|
|
3342
3342
|
fields: O
|
|
3343
3343
|
});
|
|
3344
3344
|
await H.getHandler().update({
|
|
3345
3345
|
model: r,
|
|
3346
|
-
id:
|
|
3346
|
+
id: fe(),
|
|
3347
3347
|
values: {
|
|
3348
|
-
...
|
|
3348
|
+
...ie,
|
|
3349
3349
|
...D
|
|
3350
3350
|
},
|
|
3351
3351
|
fields: O,
|
|
@@ -3353,12 +3353,12 @@ function Cl(e, t) {
|
|
|
3353
3353
|
...v,
|
|
3354
3354
|
...S == null ? void 0 : S.context
|
|
3355
3355
|
}
|
|
3356
|
-
}),
|
|
3356
|
+
}), ee.current = $e(O);
|
|
3357
3357
|
} else {
|
|
3358
|
-
const
|
|
3358
|
+
const ie = $e(O), ne = await H.getHandler().create({
|
|
3359
3359
|
model: r,
|
|
3360
3360
|
values: {
|
|
3361
|
-
...
|
|
3361
|
+
...ie,
|
|
3362
3362
|
...D
|
|
3363
3363
|
},
|
|
3364
3364
|
fields: O,
|
|
@@ -3367,107 +3367,107 @@ function Cl(e, t) {
|
|
|
3367
3367
|
...S == null ? void 0 : S.context
|
|
3368
3368
|
}
|
|
3369
3369
|
});
|
|
3370
|
-
B.current =
|
|
3370
|
+
B.current = ne, ee.current = ie;
|
|
3371
3371
|
}
|
|
3372
|
-
h && await h([
|
|
3373
|
-
}, Yo = async (
|
|
3372
|
+
h && await h([fe()]), !g && q && (le == null || le(fe(), Ke(), ae()));
|
|
3373
|
+
}, Yo = async (Y) => {
|
|
3374
3374
|
const {
|
|
3375
|
-
callOnSubmitSucceed:
|
|
3376
|
-
} =
|
|
3377
|
-
!g &&
|
|
3378
|
-
}, zt = async (
|
|
3379
|
-
let
|
|
3375
|
+
callOnSubmitSucceed: q = !0
|
|
3376
|
+
} = Y || {};
|
|
3377
|
+
!g && q && (le == null || le(fe(), Ke(), ae()));
|
|
3378
|
+
}, zt = async (Y) => {
|
|
3379
|
+
let q = !1;
|
|
3380
3380
|
const {
|
|
3381
|
-
callOnSubmitSucceed:
|
|
3382
|
-
} =
|
|
3383
|
-
if (
|
|
3384
|
-
|
|
3385
|
-
const
|
|
3381
|
+
callOnSubmitSucceed: ie = !0
|
|
3382
|
+
} = Y || {};
|
|
3383
|
+
if (Z.current = !0, M(void 0), z.current && !Oe() && fe() && ie) {
|
|
3384
|
+
Z.current = !1, de == null || de(!1), le == null || le(fe(), Ke(), ae(), z.current), z.current = !1;
|
|
3385
|
+
const ne = fe();
|
|
3386
3386
|
return c && (B.current = void 0, $t({
|
|
3387
3387
|
values: {},
|
|
3388
3388
|
fields: O,
|
|
3389
3389
|
reset: !0
|
|
3390
3390
|
})), {
|
|
3391
3391
|
succeed: !0,
|
|
3392
|
-
id:
|
|
3392
|
+
id: ne
|
|
3393
3393
|
};
|
|
3394
3394
|
}
|
|
3395
|
-
if (!Oe() &&
|
|
3396
|
-
return
|
|
3395
|
+
if (!Oe() && fe() && ie)
|
|
3396
|
+
return Z.current = !1, de == null || de(!1), he == null || he(), {
|
|
3397
3397
|
succeed: !0,
|
|
3398
|
-
id:
|
|
3398
|
+
id: fe()
|
|
3399
3399
|
};
|
|
3400
3400
|
if (await er())
|
|
3401
|
-
return
|
|
3401
|
+
return Z.current = !1, Sr(C), {
|
|
3402
3402
|
succeed: !1,
|
|
3403
|
-
id:
|
|
3403
|
+
id: fe()
|
|
3404
3404
|
};
|
|
3405
|
-
T(!0),
|
|
3405
|
+
T(!0), se == null || se(!0);
|
|
3406
3406
|
try {
|
|
3407
|
-
m === "api" ? await rr(
|
|
3407
|
+
m === "api" ? await rr(Y) : await Yo(Y), c && (B.current = void 0, $t({
|
|
3408
3408
|
values: {},
|
|
3409
3409
|
fields: O,
|
|
3410
3410
|
reset: !0
|
|
3411
3411
|
})), await gt({
|
|
3412
3412
|
forceRefresh: !0
|
|
3413
|
-
}),
|
|
3414
|
-
} catch (
|
|
3415
|
-
|
|
3413
|
+
}), q = !0, xn.success(x("savedRegisters"));
|
|
3414
|
+
} catch (ne) {
|
|
3415
|
+
Z.current = !1, T(!1), se == null || se(!1), Ue == null || Ue(ne), xn.error(x("errorWhileSavingForm")), M(ne != null && ne.message ? ne.message : ne);
|
|
3416
3416
|
} finally {
|
|
3417
|
-
|
|
3417
|
+
Z.current = !1, se == null || se(!1), T(!1);
|
|
3418
3418
|
}
|
|
3419
3419
|
return {
|
|
3420
|
-
succeed:
|
|
3421
|
-
id:
|
|
3420
|
+
succeed: q,
|
|
3421
|
+
id: fe()
|
|
3422
3422
|
};
|
|
3423
3423
|
}, Jt = ({
|
|
3424
|
-
fields:
|
|
3425
|
-
arch:
|
|
3426
|
-
values:
|
|
3424
|
+
fields: Y,
|
|
3425
|
+
arch: q,
|
|
3426
|
+
values: ie
|
|
3427
3427
|
}) => {
|
|
3428
3428
|
var Te;
|
|
3429
|
-
const
|
|
3430
|
-
|
|
3429
|
+
const ne = new Nr(Y);
|
|
3430
|
+
ne.parse(q, {
|
|
3431
3431
|
readOnly: f,
|
|
3432
3432
|
values: ka({
|
|
3433
|
-
...
|
|
3433
|
+
...ie,
|
|
3434
3434
|
...Se()
|
|
3435
|
-
},
|
|
3436
|
-
}), R(
|
|
3435
|
+
}, Y)
|
|
3436
|
+
}), R(ne), ne.string && ne.string !== Ze && (Q == null || Q(ne.string)), U && ne.string && ((Te = U.setTitle) == null || Te.call(U, ne.string));
|
|
3437
3437
|
}, vn = async ({
|
|
3438
|
-
elementHasLostFocus:
|
|
3438
|
+
elementHasLostFocus: Y = !1
|
|
3439
3439
|
}) => {
|
|
3440
|
-
if (
|
|
3440
|
+
if (Z.current)
|
|
3441
3441
|
return;
|
|
3442
|
-
const
|
|
3443
|
-
source:
|
|
3442
|
+
const q = Tn({
|
|
3443
|
+
source: re.current,
|
|
3444
3444
|
target: $e(O),
|
|
3445
3445
|
fields: O
|
|
3446
|
-
}),
|
|
3447
|
-
if (
|
|
3446
|
+
}), ie = Object.keys(q);
|
|
3447
|
+
if (ie.length !== 0) {
|
|
3448
3448
|
if (Ha({
|
|
3449
|
-
changedFields:
|
|
3449
|
+
changedFields: ie,
|
|
3450
3450
|
formOoui: S,
|
|
3451
3451
|
types: ["text", "codeeditor", "email", "url", "char", "float", "float_time", "integer", "many2one"]
|
|
3452
|
-
}) &&
|
|
3452
|
+
}) && Y !== !0)
|
|
3453
3453
|
return;
|
|
3454
3454
|
{
|
|
3455
|
-
const
|
|
3456
|
-
|
|
3455
|
+
const ne = Ot(k.getFieldsValue(!0), O);
|
|
3456
|
+
re.current = ne, u == null || u(ne), de == null || de(!0), Uo(ie);
|
|
3457
3457
|
}
|
|
3458
3458
|
}
|
|
3459
|
-
}, Wo = Ta(vn, 100), Uo = async (
|
|
3459
|
+
}, Wo = Ta(vn, 100), Uo = async (Y) => {
|
|
3460
3460
|
try {
|
|
3461
|
-
for (let
|
|
3462
|
-
const
|
|
3463
|
-
await Go(
|
|
3461
|
+
for (let q = 0; q < Y.length; q += 1) {
|
|
3462
|
+
const ie = Y[q];
|
|
3463
|
+
await Go(ie);
|
|
3464
3464
|
}
|
|
3465
|
-
} catch (
|
|
3466
|
-
Ge(
|
|
3465
|
+
} catch (q) {
|
|
3466
|
+
Ge(q);
|
|
3467
3467
|
}
|
|
3468
|
-
}, Go = async (
|
|
3469
|
-
const
|
|
3470
|
-
if (!
|
|
3468
|
+
}, Go = async (Y) => {
|
|
3469
|
+
const q = S == null ? void 0 : S.onChangeFields[Y];
|
|
3470
|
+
if (!q) {
|
|
3471
3471
|
Jt({
|
|
3472
3472
|
fields: O,
|
|
3473
3473
|
arch: I,
|
|
@@ -3475,7 +3475,7 @@ function Cl(e, t) {
|
|
|
3475
3475
|
});
|
|
3476
3476
|
return;
|
|
3477
3477
|
}
|
|
3478
|
-
const
|
|
3478
|
+
const ie = Ka({
|
|
3479
3479
|
values: {
|
|
3480
3480
|
...$e(O),
|
|
3481
3481
|
context: {
|
|
@@ -3484,18 +3484,18 @@ function Cl(e, t) {
|
|
|
3484
3484
|
}
|
|
3485
3485
|
},
|
|
3486
3486
|
parentValues: Pe == null ? void 0 : Pe(),
|
|
3487
|
-
onChangeFieldActionArgs:
|
|
3488
|
-
}),
|
|
3487
|
+
onChangeFieldActionArgs: q.args
|
|
3488
|
+
}), ne = await H.getHandler().executeOnChange({
|
|
3489
3489
|
model: r,
|
|
3490
|
-
action:
|
|
3491
|
-
ids:
|
|
3492
|
-
payload:
|
|
3490
|
+
action: q.method,
|
|
3491
|
+
ids: fe() ? [fe()] : [],
|
|
3492
|
+
payload: ie,
|
|
3493
3493
|
fields: O
|
|
3494
3494
|
});
|
|
3495
|
-
if (
|
|
3495
|
+
if (ne.value) {
|
|
3496
3496
|
const Te = {
|
|
3497
3497
|
...$e(O),
|
|
3498
|
-
...
|
|
3498
|
+
...ne.value
|
|
3499
3499
|
};
|
|
3500
3500
|
Jt({
|
|
3501
3501
|
fields: O,
|
|
@@ -3507,18 +3507,18 @@ function Cl(e, t) {
|
|
|
3507
3507
|
reset: !1
|
|
3508
3508
|
});
|
|
3509
3509
|
}
|
|
3510
|
-
if (
|
|
3510
|
+
if (ne.warning && ne.warning.title && ne.warning.message && !oe.current) {
|
|
3511
3511
|
const {
|
|
3512
3512
|
title: Te,
|
|
3513
3513
|
message: yt
|
|
3514
|
-
} =
|
|
3515
|
-
|
|
3516
|
-
|
|
3514
|
+
} = ne.warning;
|
|
3515
|
+
oe.current = !0, il(Te, yt, () => {
|
|
3516
|
+
oe.current = !1;
|
|
3517
3517
|
});
|
|
3518
3518
|
}
|
|
3519
|
-
if (
|
|
3519
|
+
if (ne.domain && Object.keys(ne.domain).length > 0) {
|
|
3520
3520
|
const Te = Ba({
|
|
3521
|
-
fieldsDomain:
|
|
3521
|
+
fieldsDomain: ne.domain,
|
|
3522
3522
|
fields: O
|
|
3523
3523
|
});
|
|
3524
3524
|
Jt({
|
|
@@ -3529,34 +3529,34 @@ function Cl(e, t) {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
};
|
|
3531
3531
|
async function qo({
|
|
3532
|
-
action:
|
|
3533
|
-
context:
|
|
3532
|
+
action: Y,
|
|
3533
|
+
context: q
|
|
3534
3534
|
}) {
|
|
3535
|
-
const
|
|
3535
|
+
const ie = await H.getHandler().execute({
|
|
3536
3536
|
model: r,
|
|
3537
|
-
action:
|
|
3538
|
-
payload: [
|
|
3537
|
+
action: Y,
|
|
3538
|
+
payload: [fe()],
|
|
3539
3539
|
context: {
|
|
3540
3540
|
...S == null ? void 0 : S.context,
|
|
3541
3541
|
...v,
|
|
3542
|
-
...
|
|
3542
|
+
...q
|
|
3543
3543
|
}
|
|
3544
3544
|
});
|
|
3545
|
-
if (typeof
|
|
3546
|
-
le == null || le(
|
|
3547
|
-
else if (
|
|
3548
|
-
le == null || le(
|
|
3549
|
-
else if (
|
|
3550
|
-
let
|
|
3551
|
-
|
|
3552
|
-
context:
|
|
3545
|
+
if (typeof ie == "object" && ie !== null && Object.keys(ie).length === 0 && g)
|
|
3546
|
+
le == null || le(fe(), Ke(), ae());
|
|
3547
|
+
else if (ie.type && ie.type === "ir.actions.act_window_close")
|
|
3548
|
+
le == null || le(fe(), Ke(), ae());
|
|
3549
|
+
else if (ie.type) {
|
|
3550
|
+
let ne = {};
|
|
3551
|
+
ie.context && (ne = wt({
|
|
3552
|
+
context: ie.context,
|
|
3553
3553
|
fields: O,
|
|
3554
3554
|
values: Ke()
|
|
3555
3555
|
})), await or({
|
|
3556
|
-
actionData:
|
|
3556
|
+
actionData: ie,
|
|
3557
3557
|
context: {
|
|
3558
|
-
...
|
|
3559
|
-
...
|
|
3558
|
+
...q,
|
|
3559
|
+
...ne
|
|
3560
3560
|
}
|
|
3561
3561
|
});
|
|
3562
3562
|
} else
|
|
@@ -3565,45 +3565,45 @@ function Cl(e, t) {
|
|
|
3565
3565
|
});
|
|
3566
3566
|
}
|
|
3567
3567
|
async function zo({
|
|
3568
|
-
action:
|
|
3568
|
+
action: Y
|
|
3569
3569
|
}) {
|
|
3570
|
-
const
|
|
3570
|
+
const q = await H.getHandler().executeWorkflow({
|
|
3571
3571
|
model: r,
|
|
3572
|
-
action:
|
|
3573
|
-
payload:
|
|
3572
|
+
action: Y,
|
|
3573
|
+
payload: fe()
|
|
3574
3574
|
});
|
|
3575
|
-
|
|
3575
|
+
q.type && q.type === "ir.actions.act_window_close" ? le == null || le(fe(), Ke(), ae()) : await gt({
|
|
3576
3576
|
forceRefresh: !0
|
|
3577
3577
|
});
|
|
3578
3578
|
}
|
|
3579
3579
|
async function Jo({
|
|
3580
|
-
action:
|
|
3581
|
-
context:
|
|
3580
|
+
action: Y,
|
|
3581
|
+
context: q
|
|
3582
3582
|
}) {
|
|
3583
|
-
const
|
|
3583
|
+
const ie = (await H.getHandler().readObjects({
|
|
3584
3584
|
model: "ir.actions.actions",
|
|
3585
|
-
ids: [parseInt(
|
|
3585
|
+
ids: [parseInt(Y)],
|
|
3586
3586
|
context: v
|
|
3587
3587
|
}))[0];
|
|
3588
3588
|
await or({
|
|
3589
|
-
actionData:
|
|
3590
|
-
context:
|
|
3589
|
+
actionData: ie,
|
|
3590
|
+
context: q
|
|
3591
3591
|
});
|
|
3592
3592
|
}
|
|
3593
3593
|
async function or({
|
|
3594
|
-
actionData:
|
|
3595
|
-
context:
|
|
3594
|
+
actionData: Y,
|
|
3595
|
+
context: q
|
|
3596
3596
|
}) {
|
|
3597
3597
|
const {
|
|
3598
|
-
closeParent:
|
|
3598
|
+
closeParent: ie
|
|
3599
3599
|
} = await (Ae == null ? void 0 : Ae({
|
|
3600
|
-
actionData:
|
|
3600
|
+
actionData: Y,
|
|
3601
3601
|
fields: O,
|
|
3602
3602
|
values: Ke(),
|
|
3603
3603
|
context: {
|
|
3604
3604
|
...v,
|
|
3605
3605
|
...S == null ? void 0 : S.context,
|
|
3606
|
-
...
|
|
3606
|
+
...q
|
|
3607
3607
|
},
|
|
3608
3608
|
onRefreshParentValues: () => {
|
|
3609
3609
|
gt({
|
|
@@ -3611,7 +3611,7 @@ function Cl(e, t) {
|
|
|
3611
3611
|
});
|
|
3612
3612
|
}
|
|
3613
3613
|
})) || {};
|
|
3614
|
-
!b &&
|
|
3614
|
+
!b && ie && (le == null || le(fe(), Ke(), ae()));
|
|
3615
3615
|
}
|
|
3616
3616
|
function Zo() {
|
|
3617
3617
|
vn({
|
|
@@ -3619,12 +3619,12 @@ function Cl(e, t) {
|
|
|
3619
3619
|
});
|
|
3620
3620
|
}
|
|
3621
3621
|
async function Xo({
|
|
3622
|
-
type:
|
|
3623
|
-
action:
|
|
3624
|
-
context:
|
|
3622
|
+
type: Y,
|
|
3623
|
+
action: q,
|
|
3624
|
+
context: ie
|
|
3625
3625
|
}) {
|
|
3626
|
-
if (
|
|
3627
|
-
|
|
3626
|
+
if (Y === "cancel") {
|
|
3627
|
+
he == null || he();
|
|
3628
3628
|
return;
|
|
3629
3629
|
}
|
|
3630
3630
|
if (await er()) {
|
|
@@ -3632,32 +3632,32 @@ function Cl(e, t) {
|
|
|
3632
3632
|
return;
|
|
3633
3633
|
}
|
|
3634
3634
|
try {
|
|
3635
|
-
(Oe() ||
|
|
3635
|
+
(Oe() || fe() === void 0) && (m === "2many" ? (await rr({
|
|
3636
3636
|
callOnSubmitSucceed: !1
|
|
3637
3637
|
}), z.current = !0) : await zt({
|
|
3638
3638
|
callOnSubmitSucceed: !1
|
|
3639
3639
|
}));
|
|
3640
|
-
const
|
|
3641
|
-
...
|
|
3642
|
-
...
|
|
3640
|
+
const ne = z.current ? ge() : {}, Te = {
|
|
3641
|
+
...ie,
|
|
3642
|
+
...ne
|
|
3643
3643
|
};
|
|
3644
|
-
|
|
3645
|
-
action:
|
|
3644
|
+
Y === "object" ? await qo({
|
|
3645
|
+
action: q,
|
|
3646
3646
|
context: Te
|
|
3647
|
-
}) :
|
|
3648
|
-
action:
|
|
3649
|
-
}) :
|
|
3650
|
-
action:
|
|
3647
|
+
}) : Y === "workflow" ? await zo({
|
|
3648
|
+
action: q
|
|
3649
|
+
}) : Y === "action" && await Jo({
|
|
3650
|
+
action: q,
|
|
3651
3651
|
context: Te
|
|
3652
3652
|
});
|
|
3653
|
-
} catch (
|
|
3654
|
-
Ge(
|
|
3653
|
+
} catch (ne) {
|
|
3654
|
+
Ge(ne);
|
|
3655
3655
|
}
|
|
3656
3656
|
}
|
|
3657
|
-
const Qo = () => !S && !$ ? /* @__PURE__ */ n(Me, {}) : !r && !p || !V ? null : /* @__PURE__ */ n(
|
|
3657
|
+
const Qo = () => !S && !$ ? /* @__PURE__ */ n(Me, {}) : !r && !p || !V ? null : /* @__PURE__ */ n(te, {
|
|
3658
3658
|
children: /* @__PURE__ */ n(ss, {
|
|
3659
3659
|
getValues: Ke,
|
|
3660
|
-
getPlainValues:
|
|
3660
|
+
getPlainValues: X,
|
|
3661
3661
|
getFields: rt,
|
|
3662
3662
|
domain: F,
|
|
3663
3663
|
activeId: i,
|
|
@@ -3684,7 +3684,7 @@ function Cl(e, t) {
|
|
|
3684
3684
|
})
|
|
3685
3685
|
})
|
|
3686
3686
|
})
|
|
3687
|
-
}), ei = () => /* @__PURE__ */ P(
|
|
3687
|
+
}), ei = () => /* @__PURE__ */ P(te, {
|
|
3688
3688
|
children: [/* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(xe, {
|
|
3689
3689
|
justify: "end",
|
|
3690
3690
|
children: /* @__PURE__ */ P(Ye, {
|
|
@@ -3710,15 +3710,15 @@ function Cl(e, t) {
|
|
|
3710
3710
|
});
|
|
3711
3711
|
return V ? /* @__PURE__ */ n(zn, {
|
|
3712
3712
|
bounds: !0,
|
|
3713
|
-
onResize: (
|
|
3714
|
-
var
|
|
3715
|
-
J((
|
|
3713
|
+
onResize: (Y) => {
|
|
3714
|
+
var q;
|
|
3715
|
+
J((q = Y.bounds) == null ? void 0 : q.width);
|
|
3716
3716
|
},
|
|
3717
3717
|
children: ({
|
|
3718
|
-
measureRef:
|
|
3718
|
+
measureRef: Y
|
|
3719
3719
|
}) => /* @__PURE__ */ P("div", {
|
|
3720
3720
|
className: "pb-2",
|
|
3721
|
-
ref:
|
|
3721
|
+
ref: Y,
|
|
3722
3722
|
children: [$ && /* @__PURE__ */ n(bl, {
|
|
3723
3723
|
className: "mt-5 mb-10",
|
|
3724
3724
|
error: $
|
|
@@ -3844,7 +3844,7 @@ const Gt = bt(Cl), qt = (e) => {
|
|
|
3844
3844
|
name: o + "#time",
|
|
3845
3845
|
label: ""
|
|
3846
3846
|
})];
|
|
3847
|
-
return /* @__PURE__ */ P(
|
|
3847
|
+
return /* @__PURE__ */ P(te, {
|
|
3848
3848
|
children: [r && /* @__PURE__ */ n(un, {
|
|
3849
3849
|
ooui: new At({
|
|
3850
3850
|
name: o + "_label",
|
|
@@ -3896,7 +3896,7 @@ const Gt = bt(Cl), qt = (e) => {
|
|
|
3896
3896
|
token: a
|
|
3897
3897
|
} = Fl(), l = s && !o ? {
|
|
3898
3898
|
backgroundColor: a.colorPrimaryBg
|
|
3899
|
-
} : void 0, u =
|
|
3899
|
+
} : void 0, u = W(Ne), {
|
|
3900
3900
|
elementHasLostFocus: d
|
|
3901
3901
|
} = u || {};
|
|
3902
3902
|
return /* @__PURE__ */ n(ye, {
|
|
@@ -3929,7 +3929,7 @@ const Gt = bt(Cl), qt = (e) => {
|
|
|
3929
3929
|
token: a
|
|
3930
3930
|
} = Ol(), l = s && !o ? {
|
|
3931
3931
|
backgroundColor: a.colorPrimaryBg
|
|
3932
|
-
} : void 0, u =
|
|
3932
|
+
} : void 0, u = W(Ne), {
|
|
3933
3933
|
elementHasLostFocus: d
|
|
3934
3934
|
} = u || {};
|
|
3935
3935
|
return /* @__PURE__ */ n(ye, {
|
|
@@ -3969,7 +3969,7 @@ function _l(e) {
|
|
|
3969
3969
|
},
|
|
3970
3970
|
layout: "vertical"
|
|
3971
3971
|
});
|
|
3972
|
-
return /* @__PURE__ */ P(
|
|
3972
|
+
return /* @__PURE__ */ P(te, {
|
|
3973
3973
|
children: [r && /* @__PURE__ */ n(un, {
|
|
3974
3974
|
ooui: new At({
|
|
3975
3975
|
name: i + "_label",
|
|
@@ -4065,7 +4065,7 @@ function El(e) {
|
|
|
4065
4065
|
t.readOnly = !1, t.required = !1;
|
|
4066
4066
|
const {
|
|
4067
4067
|
t: r
|
|
4068
|
-
} =
|
|
4068
|
+
} = W(ve);
|
|
4069
4069
|
switch (t.type) {
|
|
4070
4070
|
case ut.boolean: {
|
|
4071
4071
|
const o = new Ln({
|
|
@@ -4122,7 +4122,7 @@ function $l(e) {
|
|
|
4122
4122
|
isSearching: o
|
|
4123
4123
|
} = e, {
|
|
4124
4124
|
t: s
|
|
4125
|
-
} =
|
|
4125
|
+
} = W(ve);
|
|
4126
4126
|
return /* @__PURE__ */ P(xe, {
|
|
4127
4127
|
children: [/* @__PURE__ */ n(ce, {
|
|
4128
4128
|
span: 12,
|
|
@@ -4160,7 +4160,7 @@ function Ll(e) {
|
|
|
4160
4160
|
onLimitChange: t
|
|
4161
4161
|
} = e, {
|
|
4162
4162
|
t: r
|
|
4163
|
-
} =
|
|
4163
|
+
} = W(ve), i = new Dn({
|
|
4164
4164
|
name: "limit"
|
|
4165
4165
|
}), o = new Dn({
|
|
4166
4166
|
name: "offset"
|
|
@@ -4203,7 +4203,7 @@ function xo(e) {
|
|
|
4203
4203
|
searchError: c,
|
|
4204
4204
|
searchValues: m,
|
|
4205
4205
|
showLimitOptions: y = !0
|
|
4206
|
-
} = e, [p, h] = _(), [g, v] = _(), [F, V] = _(!1), b =
|
|
4206
|
+
} = e, [p, h] = _(), [g, v] = _(), [F, V] = _(!1), b = me(), {
|
|
4207
4207
|
token: A
|
|
4208
4208
|
} = Nl(), [D] = it.useForm();
|
|
4209
4209
|
pe(() => {
|
|
@@ -4298,7 +4298,7 @@ const Or = (e, t = "14px -apple-system") => {
|
|
|
4298
4298
|
return Math.round((o.width + 80) * 1.5);
|
|
4299
4299
|
}, Pl = (e, t, r = 500) => {
|
|
4300
4300
|
if (e.length === 0)
|
|
4301
|
-
return e;
|
|
4301
|
+
return { columns: e };
|
|
4302
4302
|
const i = e.map(
|
|
4303
4303
|
(s) => Object.assign(s, {
|
|
4304
4304
|
width: Or(s.title)
|
|
@@ -4391,7 +4391,7 @@ const Bl = (e) => /* @__PURE__ */ n(ye, {
|
|
|
4391
4391
|
onItemClicked: o
|
|
4392
4392
|
} = e, {
|
|
4393
4393
|
t: s
|
|
4394
|
-
} =
|
|
4394
|
+
} = W(ve);
|
|
4395
4395
|
return /* @__PURE__ */ n(qe, {
|
|
4396
4396
|
title: s("selectAction"),
|
|
4397
4397
|
centered: !0,
|
|
@@ -4420,9 +4420,9 @@ const Bl = (e) => /* @__PURE__ */ n(ye, {
|
|
|
4420
4420
|
context: i = {}
|
|
4421
4421
|
} = e, [o, s] = _(!1), [a, l] = _(!1), [u, d] = _(!1), [f, c] = _(), [m, y] = _(), {
|
|
4422
4422
|
t: p
|
|
4423
|
-
} =
|
|
4423
|
+
} = W(ve), h = W(at), {
|
|
4424
4424
|
openRelate: g
|
|
4425
|
-
} = h || {}, v =
|
|
4425
|
+
} = h || {}, v = W(Et), {
|
|
4426
4426
|
processAction: F
|
|
4427
4427
|
} = v || {};
|
|
4428
4428
|
if (!t)
|
|
@@ -4484,7 +4484,7 @@ const Bl = (e) => /* @__PURE__ */ n(ye, {
|
|
|
4484
4484
|
icon: /* @__PURE__ */ n(Yn, {}),
|
|
4485
4485
|
children: p("report")
|
|
4486
4486
|
}, "print"), /* @__PURE__ */ n(Be.Divider, {}), /* @__PURE__ */ n(Be.ItemGroup, {
|
|
4487
|
-
title: /* @__PURE__ */ P(
|
|
4487
|
+
title: /* @__PURE__ */ P(te, {
|
|
4488
4488
|
children: [/* @__PURE__ */ n(Gr, {}), " ", /* @__PURE__ */ P("span", {
|
|
4489
4489
|
children: [" ", p("related")]
|
|
4490
4490
|
})]
|
|
@@ -4535,7 +4535,7 @@ const Bl = (e) => /* @__PURE__ */ n(ye, {
|
|
|
4535
4535
|
fields: f.fields
|
|
4536
4536
|
});
|
|
4537
4537
|
}
|
|
4538
|
-
return /* @__PURE__ */ P(
|
|
4538
|
+
return /* @__PURE__ */ P(te, {
|
|
4539
4539
|
children: [/* @__PURE__ */ n(jt, {
|
|
4540
4540
|
overlay: b(),
|
|
4541
4541
|
trigger: ["click"],
|
|
@@ -4564,13 +4564,13 @@ const Bl = (e) => /* @__PURE__ */ n(ye, {
|
|
|
4564
4564
|
m2oField: t
|
|
4565
4565
|
} = e;
|
|
4566
4566
|
return t ? /* @__PURE__ */ P(Ye, {
|
|
4567
|
-
children: [/* @__PURE__ */ n(
|
|
4567
|
+
children: [/* @__PURE__ */ n(te, {
|
|
4568
4568
|
children: t.value
|
|
4569
4569
|
}), /* @__PURE__ */ n(Zn, {
|
|
4570
4570
|
id: t.id,
|
|
4571
4571
|
model: t.model
|
|
4572
4572
|
})]
|
|
4573
|
-
}) : /* @__PURE__ */ n(
|
|
4573
|
+
}) : /* @__PURE__ */ n(te, {});
|
|
4574
4574
|
}, Yl = (e) => {
|
|
4575
4575
|
const {
|
|
4576
4576
|
value: t,
|
|
@@ -4591,14 +4591,14 @@ const Bl = (e) => /* @__PURE__ */ n(ye, {
|
|
|
4591
4591
|
if (pe(() => {
|
|
4592
4592
|
c();
|
|
4593
4593
|
}, [t]), !t && !a)
|
|
4594
|
-
return /* @__PURE__ */ n(
|
|
4594
|
+
return /* @__PURE__ */ n(te, {});
|
|
4595
4595
|
if (a)
|
|
4596
4596
|
return /* @__PURE__ */ n(nt, {});
|
|
4597
4597
|
const m = i.get(u);
|
|
4598
4598
|
return /* @__PURE__ */ P(Ye, {
|
|
4599
|
-
children: [/* @__PURE__ */ n(
|
|
4599
|
+
children: [/* @__PURE__ */ n(te, {
|
|
4600
4600
|
children: `${m}:`
|
|
4601
|
-
}), /* @__PURE__ */ n(
|
|
4601
|
+
}), /* @__PURE__ */ n(te, {
|
|
4602
4602
|
children: o
|
|
4603
4603
|
}), /* @__PURE__ */ n(Zn, {
|
|
4604
4604
|
id: f,
|
|
@@ -4676,8 +4676,8 @@ var To = { exports: {} };
|
|
|
4676
4676
|
if (typeof I == "string" && !/Z$/i.test(I)) {
|
|
4677
4677
|
var O = I.match(g);
|
|
4678
4678
|
if (O) {
|
|
4679
|
-
var j = O[2] - 1 || 0,
|
|
4680
|
-
return N ? new Date(Date.UTC(O[1], j, O[3] || 1, O[4] || 0, O[5] || 0, O[6] || 0,
|
|
4679
|
+
var j = O[2] - 1 || 0, U = (O[7] || "0").substring(0, 3);
|
|
4680
|
+
return N ? new Date(Date.UTC(O[1], j, O[3] || 1, O[4] || 0, O[5] || 0, O[6] || 0, U)) : new Date(O[1], j, O[3] || 1, O[4] || 0, O[5] || 0, O[6] || 0, U);
|
|
4681
4681
|
}
|
|
4682
4682
|
}
|
|
4683
4683
|
return new Date(I);
|
|
@@ -4703,41 +4703,41 @@ var To = { exports: {} };
|
|
|
4703
4703
|
}, S.valueOf = function() {
|
|
4704
4704
|
return this.$d.getTime();
|
|
4705
4705
|
}, S.startOf = function(R, k) {
|
|
4706
|
-
var I = this, N = !!w.u(k) || k, O = w.p(R), j = function(
|
|
4707
|
-
var
|
|
4708
|
-
return N ?
|
|
4709
|
-
},
|
|
4710
|
-
return w.w(I.toDate()[
|
|
4711
|
-
},
|
|
4706
|
+
var I = this, N = !!w.u(k) || k, O = w.p(R), j = function(re, oe) {
|
|
4707
|
+
var Z = w.w(I.$u ? Date.UTC(I.$y, oe, re) : new Date(I.$y, oe, re), I);
|
|
4708
|
+
return N ? Z : Z.endOf(d);
|
|
4709
|
+
}, U = function(re, oe) {
|
|
4710
|
+
return w.w(I.toDate()[re].apply(I.toDate("s"), (N ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(oe)), I);
|
|
4711
|
+
}, G = this.$W, J = this.$M, K = this.$D, L = "set" + (this.$u ? "UTC" : "");
|
|
4712
4712
|
switch (O) {
|
|
4713
4713
|
case y:
|
|
4714
4714
|
return N ? j(1, 0) : j(31, 11);
|
|
4715
4715
|
case c:
|
|
4716
4716
|
return N ? j(1, J) : j(0, J + 1);
|
|
4717
4717
|
case f:
|
|
4718
|
-
var B = this.$locale().weekStart || 0,
|
|
4719
|
-
return j(N ?
|
|
4718
|
+
var B = this.$locale().weekStart || 0, ee = (G < B ? G + 7 : G) - B;
|
|
4719
|
+
return j(N ? K - ee : K + (6 - ee), J);
|
|
4720
4720
|
case d:
|
|
4721
4721
|
case p:
|
|
4722
|
-
return
|
|
4722
|
+
return U(L + "Hours", 0);
|
|
4723
4723
|
case u:
|
|
4724
|
-
return
|
|
4724
|
+
return U(L + "Minutes", 1);
|
|
4725
4725
|
case l:
|
|
4726
|
-
return
|
|
4726
|
+
return U(L + "Seconds", 2);
|
|
4727
4727
|
case a:
|
|
4728
|
-
return
|
|
4728
|
+
return U(L + "Milliseconds", 3);
|
|
4729
4729
|
default:
|
|
4730
4730
|
return this.clone();
|
|
4731
4731
|
}
|
|
4732
4732
|
}, S.endOf = function(R) {
|
|
4733
4733
|
return this.startOf(R, !1);
|
|
4734
4734
|
}, S.$set = function(R, k) {
|
|
4735
|
-
var I, N = w.p(R), O = "set" + (this.$u ? "UTC" : ""), j = (I = {}, I[d] = O + "Date", I[p] = O + "Date", I[c] = O + "Month", I[y] = O + "FullYear", I[u] = O + "Hours", I[l] = O + "Minutes", I[a] = O + "Seconds", I[s] = O + "Milliseconds", I)[N],
|
|
4735
|
+
var I, N = w.p(R), O = "set" + (this.$u ? "UTC" : ""), j = (I = {}, I[d] = O + "Date", I[p] = O + "Date", I[c] = O + "Month", I[y] = O + "FullYear", I[u] = O + "Hours", I[l] = O + "Minutes", I[a] = O + "Seconds", I[s] = O + "Milliseconds", I)[N], U = N === d ? this.$D + (k - this.$W) : k;
|
|
4736
4736
|
if (N === c || N === y) {
|
|
4737
|
-
var
|
|
4738
|
-
|
|
4737
|
+
var G = this.clone().set(p, 1);
|
|
4738
|
+
G.$d[j](U), G.init(), this.$d = G.set(p, Math.min(this.$D, G.daysInMonth())).$d;
|
|
4739
4739
|
} else
|
|
4740
|
-
j && this.$d[j](
|
|
4740
|
+
j && this.$d[j](U);
|
|
4741
4741
|
return this.init(), this;
|
|
4742
4742
|
}, S.set = function(R, k) {
|
|
4743
4743
|
return this.clone().$set(R, k);
|
|
@@ -4747,8 +4747,8 @@ var To = { exports: {} };
|
|
|
4747
4747
|
var I, N = this;
|
|
4748
4748
|
R = Number(R);
|
|
4749
4749
|
var O = w.p(k), j = function(J) {
|
|
4750
|
-
var
|
|
4751
|
-
return w.w(
|
|
4750
|
+
var K = C(N);
|
|
4751
|
+
return w.w(K.date(K.date() + Math.round(J * R)), N);
|
|
4752
4752
|
};
|
|
4753
4753
|
if (O === c)
|
|
4754
4754
|
return this.set(c, this.$M + R);
|
|
@@ -4758,30 +4758,30 @@ var To = { exports: {} };
|
|
|
4758
4758
|
return j(1);
|
|
4759
4759
|
if (O === f)
|
|
4760
4760
|
return j(7);
|
|
4761
|
-
var
|
|
4762
|
-
return w.w(
|
|
4761
|
+
var U = (I = {}, I[l] = i, I[u] = o, I[a] = r, I)[O] || 1, G = this.$d.getTime() + R * U;
|
|
4762
|
+
return w.w(G, this);
|
|
4763
4763
|
}, S.subtract = function(R, k) {
|
|
4764
4764
|
return this.add(-1 * R, k);
|
|
4765
4765
|
}, S.format = function(R) {
|
|
4766
4766
|
var k = this, I = this.$locale();
|
|
4767
4767
|
if (!this.isValid())
|
|
4768
4768
|
return I.invalidDate || h;
|
|
4769
|
-
var N = R || "YYYY-MM-DDTHH:mm:ssZ", O = w.z(this), j = this.$H,
|
|
4770
|
-
return
|
|
4771
|
-
}, B = function(
|
|
4772
|
-
return w.s(j % 12 || 12,
|
|
4773
|
-
},
|
|
4774
|
-
var
|
|
4775
|
-
return z ?
|
|
4776
|
-
},
|
|
4777
|
-
return N.replace(v, function(
|
|
4778
|
-
return
|
|
4769
|
+
var N = R || "YYYY-MM-DDTHH:mm:ssZ", O = w.z(this), j = this.$H, U = this.$m, G = this.$M, J = I.weekdays, K = I.months, L = function(oe, Z, z, ue) {
|
|
4770
|
+
return oe && (oe[Z] || oe(k, N)) || z[Z].slice(0, ue);
|
|
4771
|
+
}, B = function(oe) {
|
|
4772
|
+
return w.s(j % 12 || 12, oe, "0");
|
|
4773
|
+
}, ee = I.meridiem || function(oe, Z, z) {
|
|
4774
|
+
var ue = oe < 12 ? "AM" : "PM";
|
|
4775
|
+
return z ? ue.toLowerCase() : ue;
|
|
4776
|
+
}, re = { YY: String(this.$y).slice(-2), YYYY: w.s(this.$y, 4, "0"), M: G + 1, MM: w.s(G + 1, 2, "0"), MMM: L(I.monthsShort, G, K, 3), MMMM: L(K, G), D: this.$D, DD: w.s(this.$D, 2, "0"), d: String(this.$W), dd: L(I.weekdaysMin, this.$W, J, 2), ddd: L(I.weekdaysShort, this.$W, J, 3), dddd: J[this.$W], H: String(j), HH: w.s(j, 2, "0"), h: B(1), hh: B(2), a: ee(j, U, !0), A: ee(j, U, !1), m: String(U), mm: w.s(U, 2, "0"), s: String(this.$s), ss: w.s(this.$s, 2, "0"), SSS: w.s(this.$ms, 3, "0"), Z: O };
|
|
4777
|
+
return N.replace(v, function(oe, Z) {
|
|
4778
|
+
return Z || re[oe] || O.replace(":", "");
|
|
4779
4779
|
});
|
|
4780
4780
|
}, S.utcOffset = function() {
|
|
4781
4781
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
4782
4782
|
}, S.diff = function(R, k, I) {
|
|
4783
|
-
var N, O = w.p(k), j = C(R),
|
|
4784
|
-
return J = (N = {}, N[y] = J / 12, N[c] = J, N[m] = J / 3, N[f] = (
|
|
4783
|
+
var N, O = w.p(k), j = C(R), U = (j.utcOffset() - this.utcOffset()) * i, G = this - j, J = w.m(this, j);
|
|
4784
|
+
return J = (N = {}, N[y] = J / 12, N[c] = J, N[m] = J / 3, N[f] = (G - U) / 6048e5, N[d] = (G - U) / 864e5, N[u] = G / o, N[l] = G / i, N[a] = G / r, N)[O] || G, I ? J : w.a(J);
|
|
4785
4785
|
}, S.daysInMonth = function() {
|
|
4786
4786
|
return this.endOf(c).$D;
|
|
4787
4787
|
}, S.$locale = function() {
|
|
@@ -5011,26 +5011,26 @@ const lt = {
|
|
|
5011
5011
|
content: e == null ? void 0 : e.toString().replace(/(?:\r\n|\r|\n)/g, "<br>")
|
|
5012
5012
|
}), Ql = (e) => {
|
|
5013
5013
|
if (!e || e && e.length === 0)
|
|
5014
|
-
return /* @__PURE__ */ n(
|
|
5014
|
+
return /* @__PURE__ */ n(te, {});
|
|
5015
5015
|
const t = dt(e, lt.date.dateInternalFormat).format(lt.date.dateDisplayFormat);
|
|
5016
|
-
return /* @__PURE__ */ n(
|
|
5016
|
+
return /* @__PURE__ */ n(te, {
|
|
5017
5017
|
children: t
|
|
5018
5018
|
});
|
|
5019
5019
|
}, ec = (e) => {
|
|
5020
5020
|
if (!e || e && e.length === 0)
|
|
5021
|
-
return /* @__PURE__ */ n(
|
|
5021
|
+
return /* @__PURE__ */ n(te, {});
|
|
5022
5022
|
const t = dt(e, lt.time.dateInternalFormat).format(lt.time.dateDisplayFormat);
|
|
5023
|
-
return /* @__PURE__ */ n(
|
|
5023
|
+
return /* @__PURE__ */ n(te, {
|
|
5024
5024
|
children: t
|
|
5025
5025
|
});
|
|
5026
5026
|
}, Ir = (e) => {
|
|
5027
5027
|
const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
|
|
5028
|
-
return /* @__PURE__ */ n(
|
|
5028
|
+
return /* @__PURE__ */ n(te, {
|
|
5029
5029
|
children: `( ${t} )`
|
|
5030
5030
|
});
|
|
5031
5031
|
}, tc = (e) => /* @__PURE__ */ n(So, {
|
|
5032
5032
|
value: e
|
|
5033
|
-
}), nc = (e) => /* @__PURE__ */ n(
|
|
5033
|
+
}), nc = (e) => /* @__PURE__ */ n(te, {
|
|
5034
5034
|
children: Co(e)
|
|
5035
5035
|
}), Dr = (e) => /* @__PURE__ */ n("div", {
|
|
5036
5036
|
style: {
|
|
@@ -5046,9 +5046,9 @@ const lt = {
|
|
|
5046
5046
|
}), oc = (e, t, r, i) => /* @__PURE__ */ n(go, {
|
|
5047
5047
|
ooui: r,
|
|
5048
5048
|
value: e
|
|
5049
|
-
}), ic = (e, t, r, i) => /* @__PURE__ */ n(
|
|
5049
|
+
}), ic = (e, t, r, i) => /* @__PURE__ */ n(te, {
|
|
5050
5050
|
children: r.selectionValues.get(e)
|
|
5051
|
-
}), sc = (e, t, r, i) => /* @__PURE__ */ n(
|
|
5051
|
+
}), sc = (e, t, r, i) => /* @__PURE__ */ n(te, {
|
|
5052
5052
|
children: /* @__PURE__ */ n(Yl, {
|
|
5053
5053
|
value: e,
|
|
5054
5054
|
selectionValues: r.selectionValues,
|
|
@@ -5059,6 +5059,7 @@ const lt = {
|
|
|
5059
5059
|
value: e
|
|
5060
5060
|
});
|
|
5061
5061
|
function pn(e) {
|
|
5062
|
+
var J;
|
|
5062
5063
|
const {
|
|
5063
5064
|
page: t = 1,
|
|
5064
5065
|
limit: r,
|
|
@@ -5080,15 +5081,15 @@ function pn(e) {
|
|
|
5080
5081
|
rootTree: F = !1,
|
|
5081
5082
|
context: V,
|
|
5082
5083
|
readonly: b
|
|
5083
|
-
} = e, [A, D] = _([]), [E, x] = _([]), C =
|
|
5084
|
+
} = e, [A, D] = _([]), [E, x] = _([]), C = me(!1), w = me(null), {
|
|
5084
5085
|
t: T
|
|
5085
|
-
} =
|
|
5086
|
+
} = W(ve), $ = me(r), M = W(et), {
|
|
5086
5087
|
title: S = void 0,
|
|
5087
5088
|
setTitle: R = void 0
|
|
5088
5089
|
} = (F ? M : {}) || {};
|
|
5089
5090
|
pe(() => {
|
|
5090
5091
|
w.current = _t(o);
|
|
5091
|
-
const
|
|
5092
|
+
const K = Va(w.current, {
|
|
5092
5093
|
boolean: Jl,
|
|
5093
5094
|
many2one: Zl,
|
|
5094
5095
|
text: Xl,
|
|
@@ -5106,11 +5107,11 @@ function pn(e) {
|
|
|
5106
5107
|
datetime: ec,
|
|
5107
5108
|
avatar: ac
|
|
5108
5109
|
}, V);
|
|
5109
|
-
x(
|
|
5110
|
+
x(K), w.current.string && S !== w.current.string && (R == null || R(w.current.string));
|
|
5110
5111
|
}, [o]), pe(() => {
|
|
5111
5112
|
C.current = !1;
|
|
5112
|
-
const
|
|
5113
|
-
D(
|
|
5113
|
+
const K = mo(w.current, s);
|
|
5114
|
+
D(K), $.current = r;
|
|
5114
5115
|
}, [s]);
|
|
5115
5116
|
const k = (t - 1) * $.current + 1, I = k - 1 + A.length, N = i === void 0 ? null : i === 0 ? T("no_results") : T("summary").replace("{from}", k == null ? void 0 : k.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), O = () => !d || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Me, {
|
|
5116
5117
|
className: "pb-4"
|
|
@@ -5133,49 +5134,49 @@ function pn(e) {
|
|
|
5133
5134
|
})]
|
|
5134
5135
|
});
|
|
5135
5136
|
function j() {
|
|
5136
|
-
var
|
|
5137
|
-
const
|
|
5138
|
-
label:
|
|
5139
|
-
field:
|
|
5137
|
+
var re;
|
|
5138
|
+
const L = w.current.columns.filter((oe) => oe.sum !== void 0).map((oe) => ({
|
|
5139
|
+
label: oe.sum,
|
|
5140
|
+
field: oe.id
|
|
5140
5141
|
}));
|
|
5141
|
-
if (!
|
|
5142
|
+
if (!L || L.length === 0)
|
|
5142
5143
|
return null;
|
|
5143
|
-
let
|
|
5144
|
-
return
|
|
5145
|
-
const
|
|
5146
|
-
|
|
5144
|
+
let B = [], ee = ((re = f == null ? void 0 : f.selectedRowKeys) == null ? void 0 : re.length) > 0 ? A.filter((oe) => f == null ? void 0 : f.selectedRowKeys.includes(oe.id)) : A;
|
|
5145
|
+
return L.forEach((oe) => {
|
|
5146
|
+
const Z = ee.reduce((z, ue) => ue[oe.field] && !isNaN(ue[oe.field]) ? z + ue[oe.field] : z, 0);
|
|
5147
|
+
B.push(`${oe.label}: ${Math.round(Z * 100) / 100}`);
|
|
5147
5148
|
}), /* @__PURE__ */ n("div", {
|
|
5148
5149
|
className: "p-1 pb-0 pl-2 mt-2 ",
|
|
5149
|
-
children:
|
|
5150
|
+
children: B.join(", ")
|
|
5150
5151
|
});
|
|
5151
5152
|
}
|
|
5152
|
-
let
|
|
5153
|
+
let U, G = c;
|
|
5153
5154
|
if (w.current !== null) {
|
|
5154
|
-
|
|
5155
|
-
const
|
|
5156
|
-
c &&
|
|
5155
|
+
U = Pl(E, A, 600);
|
|
5156
|
+
const L = w.current;
|
|
5157
|
+
c && L.columns.some((B) => B.sum !== void 0) && (G = c - 30);
|
|
5157
5158
|
}
|
|
5158
|
-
return w.current === null ? /* @__PURE__ */ n(Me, {
|
|
5159
|
+
return w.current === null || !U || ((J = U.columns) == null ? void 0 : J.length) === 0 ? /* @__PURE__ */ n(Me, {
|
|
5159
5160
|
style: {
|
|
5160
5161
|
padding: "2rem"
|
|
5161
5162
|
}
|
|
5162
5163
|
}) : /* @__PURE__ */ P("div", {
|
|
5163
5164
|
children: [O(), /* @__PURE__ */ n($i, {
|
|
5164
|
-
height:
|
|
5165
|
-
columns:
|
|
5165
|
+
height: G,
|
|
5166
|
+
columns: U.columns,
|
|
5166
5167
|
dataSource: A,
|
|
5167
5168
|
loading: l,
|
|
5168
5169
|
loadingComponent: /* @__PURE__ */ n(Me, {}),
|
|
5169
|
-
onRowStyle: (
|
|
5170
|
-
if (m[
|
|
5170
|
+
onRowStyle: (K) => {
|
|
5171
|
+
if (m[K.id])
|
|
5171
5172
|
return {
|
|
5172
|
-
color: m[
|
|
5173
|
+
color: m[K.id]
|
|
5173
5174
|
};
|
|
5174
5175
|
},
|
|
5175
|
-
onRowStatus: Aa(y) ? (
|
|
5176
|
-
if (y[
|
|
5176
|
+
onRowStatus: Aa(y) ? (K) => {
|
|
5177
|
+
if (y[K.id])
|
|
5177
5178
|
return /* @__PURE__ */ n(li, {
|
|
5178
|
-
color: y[
|
|
5179
|
+
color: y[K.id]
|
|
5179
5180
|
});
|
|
5180
5181
|
} : void 0,
|
|
5181
5182
|
onRowDoubleClick: u,
|
|
@@ -5207,51 +5208,51 @@ function lc(e, t) {
|
|
|
5207
5208
|
rootTree: f = !1,
|
|
5208
5209
|
parentContext: c = {},
|
|
5209
5210
|
onChangeSelectedRowKeys: m
|
|
5210
|
-
} = e, [y, p] = _(!1), [h, g] = _(!1), v =
|
|
5211
|
+
} = e, [y, p] = _(!1), [h, g] = _(!1), v = me(!1), [F, V] = _(), [b, A] = _(), [D, E] = _(), [x, C] = _(), [w, T] = _(200), $ = me(), {
|
|
5211
5212
|
height: M
|
|
5212
|
-
} = fn(), S =
|
|
5213
|
+
} = fn(), S = W(Et), {
|
|
5213
5214
|
processAction: R
|
|
5214
|
-
} = S || {}, k =
|
|
5215
|
+
} = S || {}, k = W(et), {
|
|
5215
5216
|
setResults: I = void 0,
|
|
5216
5217
|
setCurrentItemIndex: N = void 0,
|
|
5217
5218
|
currentId: O = void 0,
|
|
5218
5219
|
results: j = void 0,
|
|
5219
|
-
selectedRowItems:
|
|
5220
|
-
setSelectedRowItems:
|
|
5220
|
+
selectedRowItems: U = void 0,
|
|
5221
|
+
setSelectedRowItems: G = void 0,
|
|
5221
5222
|
searchParams: J = [],
|
|
5222
|
-
setSearchParams:
|
|
5223
|
+
setSearchParams: K = void 0,
|
|
5223
5224
|
searchVisible: L = !0,
|
|
5224
5225
|
setSearchVisible: B = void 0,
|
|
5225
|
-
sorter:
|
|
5226
|
-
setSorter:
|
|
5227
|
-
setTotalItems:
|
|
5228
|
-
setSearchTreeNameSearch:
|
|
5226
|
+
sorter: ee = void 0,
|
|
5227
|
+
setSorter: re = void 0,
|
|
5228
|
+
setTotalItems: oe = void 0,
|
|
5229
|
+
setSearchTreeNameSearch: Z = void 0,
|
|
5229
5230
|
setTreeIsLoading: z = void 0,
|
|
5230
|
-
searchValues:
|
|
5231
|
+
searchValues: ue = {},
|
|
5231
5232
|
setSearchValues: be = void 0,
|
|
5232
5233
|
limit: Ee = Bt,
|
|
5233
5234
|
setLimit: Ve = void 0
|
|
5234
5235
|
} = (f ? k : {}) || {}, {
|
|
5235
5236
|
submit: Pe,
|
|
5236
5237
|
clear: We,
|
|
5237
|
-
fetchResults:
|
|
5238
|
+
fetchResults: se,
|
|
5238
5239
|
tableRefreshing: de,
|
|
5239
5240
|
searchFilterLoading: je,
|
|
5240
5241
|
searchError: we,
|
|
5241
5242
|
page: Re,
|
|
5242
5243
|
offset: Ze,
|
|
5243
|
-
getResults:
|
|
5244
|
+
getResults: Q,
|
|
5244
5245
|
requestPageChange: De,
|
|
5245
5246
|
changeSort: Ae,
|
|
5246
5247
|
fetchChildrenForRecord: ke,
|
|
5247
5248
|
colorsForResults: le,
|
|
5248
|
-
statusForResults:
|
|
5249
|
+
statusForResults: he,
|
|
5249
5250
|
totalItems: Ue
|
|
5250
5251
|
} = wo({
|
|
5251
5252
|
model: F,
|
|
5252
|
-
setSearchTreeNameSearch:
|
|
5253
|
+
setSearchTreeNameSearch: Z,
|
|
5253
5254
|
setSelectedRowItems: Ce,
|
|
5254
|
-
setSearchParams:
|
|
5255
|
+
setSearchParams: K,
|
|
5255
5256
|
setSearchValues: be,
|
|
5256
5257
|
searchParams: J,
|
|
5257
5258
|
setSearchVisible: B,
|
|
@@ -5261,27 +5262,27 @@ function lc(e, t) {
|
|
|
5261
5262
|
context: c,
|
|
5262
5263
|
formView: D,
|
|
5263
5264
|
treeView: b,
|
|
5264
|
-
sorter:
|
|
5265
|
-
setSorter:
|
|
5265
|
+
sorter: ee,
|
|
5266
|
+
setSorter: re,
|
|
5266
5267
|
setCurrentItemIndex: N,
|
|
5267
5268
|
setResultsActionView: I,
|
|
5268
5269
|
resultsActionView: j,
|
|
5269
5270
|
domain: u,
|
|
5270
5271
|
currentId: O,
|
|
5271
|
-
setActionViewTotalItems:
|
|
5272
|
+
setActionViewTotalItems: oe,
|
|
5272
5273
|
limit: Ee,
|
|
5273
5274
|
setLimit: Ve
|
|
5274
5275
|
});
|
|
5275
5276
|
xt(t, () => ({
|
|
5276
5277
|
refreshResults: () => {
|
|
5277
|
-
v.current = !1,
|
|
5278
|
+
v.current = !1, se();
|
|
5278
5279
|
},
|
|
5279
5280
|
getFields: () => b == null ? void 0 : b.fields,
|
|
5280
5281
|
getDomain: () => u
|
|
5281
5282
|
})), pe(() => {
|
|
5282
|
-
!h || d && (v.current = !1,
|
|
5283
|
+
!h || d && (v.current = !1, se());
|
|
5283
5284
|
}, [Re, Ze, h, d, a]);
|
|
5284
|
-
const
|
|
5285
|
+
const fe = async () => {
|
|
5285
5286
|
g(!1), p(!0), C(void 0), z == null || z(!0);
|
|
5286
5287
|
try {
|
|
5287
5288
|
await rt(), g(!0);
|
|
@@ -5306,11 +5307,11 @@ function lc(e, t) {
|
|
|
5306
5307
|
})), E(Oe), A($e);
|
|
5307
5308
|
};
|
|
5308
5309
|
pe(() => {
|
|
5309
|
-
|
|
5310
|
+
fe();
|
|
5310
5311
|
}, [r]);
|
|
5311
5312
|
const Ke = (Oe) => {
|
|
5312
5313
|
Ve == null || Ve(Oe);
|
|
5313
|
-
},
|
|
5314
|
+
}, X = async (Oe) => {
|
|
5314
5315
|
const {
|
|
5315
5316
|
id: $e
|
|
5316
5317
|
} = Oe;
|
|
@@ -5329,13 +5330,13 @@ function lc(e, t) {
|
|
|
5329
5330
|
},
|
|
5330
5331
|
context: c
|
|
5331
5332
|
}));
|
|
5332
|
-
},
|
|
5333
|
+
}, ae = async (Oe) => {
|
|
5333
5334
|
const {
|
|
5334
5335
|
id: $e
|
|
5335
5336
|
} = Oe;
|
|
5336
5337
|
if (b != null && b.isExpandable) {
|
|
5337
5338
|
try {
|
|
5338
|
-
await
|
|
5339
|
+
await X(Oe);
|
|
5339
5340
|
} catch (ot) {
|
|
5340
5341
|
Ge(ot);
|
|
5341
5342
|
}
|
|
@@ -5349,13 +5350,13 @@ function lc(e, t) {
|
|
|
5349
5350
|
});
|
|
5350
5351
|
};
|
|
5351
5352
|
function Ce(Oe) {
|
|
5352
|
-
const $e =
|
|
5353
|
-
|
|
5353
|
+
const $e = Q().filter((ot) => Oe.includes(ot.id));
|
|
5354
|
+
G == null || G($e), m == null || m(Oe);
|
|
5354
5355
|
}
|
|
5355
5356
|
function ge() {
|
|
5356
5357
|
return b != null && b.isExpandable ? M - 160 : M - (w + 210);
|
|
5357
5358
|
}
|
|
5358
|
-
const Se = () => !b || !D ? null : /* @__PURE__ */ P(
|
|
5359
|
+
const Se = () => !b || !D ? null : /* @__PURE__ */ P(te, {
|
|
5359
5360
|
children: [/* @__PURE__ */ n(xo, {
|
|
5360
5361
|
fields: {
|
|
5361
5362
|
...D.fields,
|
|
@@ -5371,25 +5372,25 @@ function lc(e, t) {
|
|
|
5371
5372
|
setSearchFilterHeight: T,
|
|
5372
5373
|
searchError: we,
|
|
5373
5374
|
searchVisible: L,
|
|
5374
|
-
searchValues:
|
|
5375
|
+
searchValues: ue
|
|
5375
5376
|
}), /* @__PURE__ */ n(pn, {
|
|
5376
5377
|
context: c,
|
|
5377
5378
|
total: Ue,
|
|
5378
5379
|
limit: Ee,
|
|
5379
5380
|
page: Re,
|
|
5380
5381
|
treeView: b,
|
|
5381
|
-
results:
|
|
5382
|
+
results: Q(),
|
|
5382
5383
|
onRequestPageChange: De,
|
|
5383
5384
|
loading: de,
|
|
5384
|
-
onRowClicked:
|
|
5385
|
+
onRowClicked: ae,
|
|
5385
5386
|
scrollY: l || ge(),
|
|
5386
5387
|
colorsForResults: le,
|
|
5387
|
-
statusForResults:
|
|
5388
|
+
statusForResults: he,
|
|
5388
5389
|
rowSelection: {
|
|
5389
|
-
selectedRowKeys:
|
|
5390
|
+
selectedRowKeys: U == null ? void 0 : U.map((Oe) => Oe.id),
|
|
5390
5391
|
onChange: Ce
|
|
5391
5392
|
},
|
|
5392
|
-
sorter:
|
|
5393
|
+
sorter: ee,
|
|
5393
5394
|
onChangeSort: Ae,
|
|
5394
5395
|
onFetchChildrenForRecord: b.isExpandable ? ke : void 0,
|
|
5395
5396
|
childField: b.field_parent,
|
|
@@ -5422,7 +5423,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5422
5423
|
modalHeight: c
|
|
5423
5424
|
} = fn(), {
|
|
5424
5425
|
t: m
|
|
5425
|
-
} =
|
|
5426
|
+
} = W(ve), [y, p] = _([]), h = async () => {
|
|
5426
5427
|
await new Promise((V) => setTimeout(V, 5)), r();
|
|
5427
5428
|
}, g = async (V) => {
|
|
5428
5429
|
const {
|
|
@@ -5437,7 +5438,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5437
5438
|
}
|
|
5438
5439
|
i(y);
|
|
5439
5440
|
}
|
|
5440
|
-
const F = () => /* @__PURE__ */ P(
|
|
5441
|
+
const F = () => /* @__PURE__ */ P(te, {
|
|
5441
5442
|
children: [/* @__PURE__ */ n(Io, {
|
|
5442
5443
|
model: o,
|
|
5443
5444
|
nameSearch: s,
|
|
@@ -5472,7 +5473,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5472
5473
|
})
|
|
5473
5474
|
})]
|
|
5474
5475
|
});
|
|
5475
|
-
return /* @__PURE__ */ P(
|
|
5476
|
+
return /* @__PURE__ */ P(te, {
|
|
5476
5477
|
children: [/* @__PURE__ */ n(qe, {
|
|
5477
5478
|
title: m("search"),
|
|
5478
5479
|
centered: !0,
|
|
@@ -5544,17 +5545,17 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5544
5545
|
domain: d
|
|
5545
5546
|
} = i, f = o && !a ? {
|
|
5546
5547
|
backgroundColor: Vo.colorPrimaryBg
|
|
5547
|
-
} : void 0, [c, m] = _(!1), [y, p] = _(!1), [h, g] = _(!1), [v, F] = _(), V =
|
|
5548
|
+
} : void 0, [c, m] = _(!1), [y, p] = _(!1), [h, g] = _(!1), [v, F] = _(), V = me(!1), [b, A] = _(""), D = me(), E = W(Ne), {
|
|
5548
5549
|
domain: x,
|
|
5549
5550
|
getValues: C,
|
|
5550
5551
|
getFields: w,
|
|
5551
5552
|
getContext: T,
|
|
5552
5553
|
elementHasLostFocus: $
|
|
5553
|
-
} = E || {}, M =
|
|
5554
|
+
} = E || {}, M = me([]), [S, R] = _([]), k = t && t[0] || void 0, I = t && t[1] || "";
|
|
5554
5555
|
pe(() => {
|
|
5555
|
-
!Array.isArray(t) && t &&
|
|
5556
|
+
!Array.isArray(t) && t && G(t);
|
|
5556
5557
|
}, [t]), pe(() => {
|
|
5557
|
-
k && I.length === 0 ?
|
|
5558
|
+
k && I.length === 0 ? G(k) : k && I.length > 0 ? A(I) : !k && !I && A(D.current || "");
|
|
5558
5559
|
}, [t]);
|
|
5559
5560
|
const N = (B) => {
|
|
5560
5561
|
r == null || r(B), $ == null || $();
|
|
@@ -5569,7 +5570,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5569
5570
|
g(!0);
|
|
5570
5571
|
try {
|
|
5571
5572
|
if (M.current && M.current.length > 0)
|
|
5572
|
-
|
|
5573
|
+
U(D.current);
|
|
5573
5574
|
else {
|
|
5574
5575
|
const B = await H.getHandler().nameSearch({
|
|
5575
5576
|
model: s,
|
|
@@ -5579,7 +5580,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5579
5580
|
...l
|
|
5580
5581
|
}
|
|
5581
5582
|
});
|
|
5582
|
-
B.length === 1 ? (D.current = void 0, N(B[0])) :
|
|
5583
|
+
B.length === 1 ? (D.current = void 0, N(B[0])) : U(D.current);
|
|
5583
5584
|
}
|
|
5584
5585
|
} catch (B) {
|
|
5585
5586
|
nn(B);
|
|
@@ -5587,9 +5588,9 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5587
5588
|
g(!1);
|
|
5588
5589
|
}
|
|
5589
5590
|
}
|
|
5590
|
-
},
|
|
5591
|
+
}, U = async (B) => {
|
|
5591
5592
|
if (await J(), M.current && M.current.length > 0) {
|
|
5592
|
-
const
|
|
5593
|
+
const ee = await H.getHandler().searchAllIds({
|
|
5593
5594
|
params: M.current,
|
|
5594
5595
|
model: s,
|
|
5595
5596
|
context: {
|
|
@@ -5598,14 +5599,14 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5598
5599
|
},
|
|
5599
5600
|
totalItems: 2
|
|
5600
5601
|
});
|
|
5601
|
-
|
|
5602
|
+
ee.length === 1 ? G(ee[0]) : (F(B), m(!0));
|
|
5602
5603
|
return;
|
|
5603
5604
|
}
|
|
5604
5605
|
F(B), m(!0);
|
|
5605
|
-
},
|
|
5606
|
+
}, G = async (B) => {
|
|
5606
5607
|
g(!0);
|
|
5607
5608
|
try {
|
|
5608
|
-
const
|
|
5609
|
+
const ee = await H.getHandler().execute({
|
|
5609
5610
|
action: "name_get",
|
|
5610
5611
|
payload: [B],
|
|
5611
5612
|
model: s,
|
|
@@ -5614,9 +5615,9 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5614
5615
|
...l
|
|
5615
5616
|
}
|
|
5616
5617
|
});
|
|
5617
|
-
N([B,
|
|
5618
|
-
} catch (
|
|
5619
|
-
nn(
|
|
5618
|
+
N([B, ee[0][1]]);
|
|
5619
|
+
} catch (ee) {
|
|
5620
|
+
nn(ee);
|
|
5620
5621
|
} finally {
|
|
5621
5622
|
g(!1);
|
|
5622
5623
|
}
|
|
@@ -5635,7 +5636,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5635
5636
|
widgetFieldName: u
|
|
5636
5637
|
}))), R(M.current);
|
|
5637
5638
|
}
|
|
5638
|
-
async function
|
|
5639
|
+
async function K(B) {
|
|
5639
5640
|
B.keyCode === 13 ? (B.preventDefault(), B.stopPropagation(), await j()) : B.code === "Backspace" && k !== void 0 && (B.preventDefault(), B.stopPropagation(), N([void 0, ""]));
|
|
5640
5641
|
}
|
|
5641
5642
|
return /* @__PURE__ */ P(xe, {
|
|
@@ -5650,7 +5651,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5650
5651
|
onChange: O,
|
|
5651
5652
|
style: f,
|
|
5652
5653
|
onBlur: j,
|
|
5653
|
-
onKeyDown:
|
|
5654
|
+
onKeyDown: K,
|
|
5654
5655
|
suffix: /* @__PURE__ */ n(Zn, {
|
|
5655
5656
|
id: k,
|
|
5656
5657
|
model: s,
|
|
@@ -5686,7 +5687,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5686
5687
|
icon: h ? /* @__PURE__ */ n(nt, {}) : /* @__PURE__ */ n(jn, {}),
|
|
5687
5688
|
disabled: a || h,
|
|
5688
5689
|
onClick: () => {
|
|
5689
|
-
V.current = !0,
|
|
5690
|
+
V.current = !0, U(I);
|
|
5690
5691
|
},
|
|
5691
5692
|
style: {
|
|
5692
5693
|
borderTopLeftRadius: 0,
|
|
@@ -5704,7 +5705,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5704
5705
|
visible: c,
|
|
5705
5706
|
nameSearch: k ? void 0 : v,
|
|
5706
5707
|
onSelectValues: (B) => {
|
|
5707
|
-
m(!1),
|
|
5708
|
+
m(!1), G(B[0]), V.current = !1, D.current = void 0;
|
|
5708
5709
|
},
|
|
5709
5710
|
onCloseModal: () => {
|
|
5710
5711
|
m(!1), V.current = !1;
|
|
@@ -5718,7 +5719,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5718
5719
|
id: t && t[0],
|
|
5719
5720
|
visible: y,
|
|
5720
5721
|
onSubmitSucceed: (B) => {
|
|
5721
|
-
p(!1),
|
|
5722
|
+
p(!1), G(B);
|
|
5722
5723
|
},
|
|
5723
5724
|
onCancel: () => {
|
|
5724
5725
|
p(!1);
|
|
@@ -5786,7 +5787,7 @@ const Io = bt(lc), Do = (e) => {
|
|
|
5786
5787
|
context: i
|
|
5787
5788
|
});
|
|
5788
5789
|
return Vr({
|
|
5789
|
-
values: j.map((
|
|
5790
|
+
values: j.map((U) => U[d]),
|
|
5790
5791
|
operator: f
|
|
5791
5792
|
});
|
|
5792
5793
|
} else
|
|
@@ -6293,7 +6294,7 @@ const _c = {
|
|
|
6293
6294
|
manualIds: a
|
|
6294
6295
|
} = e, {
|
|
6295
6296
|
t: l
|
|
6296
|
-
} =
|
|
6297
|
+
} = W(ve), {
|
|
6297
6298
|
error: u,
|
|
6298
6299
|
loading: d,
|
|
6299
6300
|
values: f,
|
|
@@ -6345,7 +6346,7 @@ const _c = {
|
|
|
6345
6346
|
isStack: h
|
|
6346
6347
|
})
|
|
6347
6348
|
})]
|
|
6348
|
-
}) : /* @__PURE__ */ n(
|
|
6349
|
+
}) : /* @__PURE__ */ n(te, {
|
|
6349
6350
|
children: `Unknown graph type: ${c}`
|
|
6350
6351
|
});
|
|
6351
6352
|
};
|
|
@@ -6367,7 +6368,7 @@ const Vc = (e, t) => {
|
|
|
6367
6368
|
domain: s,
|
|
6368
6369
|
limit: a,
|
|
6369
6370
|
manualIds: l
|
|
6370
|
-
} = e, [u, d] = _(!1), [f, c] = _(), [m, y] = _(), p =
|
|
6371
|
+
} = e, [u, d] = _(!1), [f, c] = _(), [m, y] = _(), p = W(et), {
|
|
6371
6372
|
setGraphIsLoading: h = void 0
|
|
6372
6373
|
} = p || {};
|
|
6373
6374
|
xt(t, () => ({
|
|
@@ -6390,7 +6391,7 @@ const Vc = (e, t) => {
|
|
|
6390
6391
|
const F = Nn(v.arch);
|
|
6391
6392
|
c(F);
|
|
6392
6393
|
} catch (v) {
|
|
6393
|
-
return console.error(v), /* @__PURE__ */ n(
|
|
6394
|
+
return console.error(v), /* @__PURE__ */ n(te, {
|
|
6394
6395
|
children: JSON.stringify(v)
|
|
6395
6396
|
});
|
|
6396
6397
|
}
|
|
@@ -6446,7 +6447,7 @@ const Vc = (e, t) => {
|
|
|
6446
6447
|
manualIds: l
|
|
6447
6448
|
});
|
|
6448
6449
|
default:
|
|
6449
|
-
return /* @__PURE__ */ n(
|
|
6450
|
+
return /* @__PURE__ */ n(te, {
|
|
6450
6451
|
children: `Graph ${f.type} not implemented`
|
|
6451
6452
|
});
|
|
6452
6453
|
}
|
|
@@ -6539,7 +6540,7 @@ const Vc = (e, t) => {
|
|
|
6539
6540
|
});
|
|
6540
6541
|
}
|
|
6541
6542
|
function A() {
|
|
6542
|
-
return /* @__PURE__ */ P(
|
|
6543
|
+
return /* @__PURE__ */ P(te, {
|
|
6543
6544
|
children: [v(), /* @__PURE__ */ n(Je, {
|
|
6544
6545
|
tooltip: "Previous item",
|
|
6545
6546
|
icon: /* @__PURE__ */ n(qr, {}),
|
|
@@ -6600,7 +6601,7 @@ const Pc = (e) => {
|
|
|
6600
6601
|
setCurrentView: l,
|
|
6601
6602
|
itemIndex: u,
|
|
6602
6603
|
setItemIndex: d
|
|
6603
|
-
} =
|
|
6604
|
+
} = W(Ro), f = W(Ne), {
|
|
6604
6605
|
activeId: c,
|
|
6605
6606
|
getFields: m,
|
|
6606
6607
|
getValues: y,
|
|
@@ -6609,42 +6610,42 @@ const Pc = (e) => {
|
|
|
6609
6610
|
} = f || {}, {
|
|
6610
6611
|
lang: g,
|
|
6611
6612
|
t: v
|
|
6612
|
-
} =
|
|
6613
|
-
readOnly:
|
|
6613
|
+
} = W(ve), [F, V] = _(!1), [b, A] = _(!1), [D, E] = _(), [x, C] = _(!1), [w, T] = _(!1), [$, M] = _(), [S, R] = _([]), [k, I] = _(!1), N = me([]), [O, j] = _(), U = me(), [G, J] = _(void 0), {
|
|
6614
|
+
readOnly: K,
|
|
6614
6615
|
relation: L,
|
|
6615
6616
|
context: B,
|
|
6616
|
-
domain:
|
|
6617
|
-
} = i,
|
|
6618
|
-
id:
|
|
6619
|
-
} = i,
|
|
6617
|
+
domain: ee
|
|
6618
|
+
} = i, re = i.type === "many2many", {
|
|
6619
|
+
id: oe
|
|
6620
|
+
} = i, Z = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), z = me();
|
|
6620
6621
|
pe(() => {
|
|
6621
6622
|
if (z.current !== a) {
|
|
6622
|
-
z.current = a,
|
|
6623
|
+
z.current = a, ue();
|
|
6623
6624
|
return;
|
|
6624
6625
|
}
|
|
6625
|
-
|
|
6626
|
+
ue();
|
|
6626
6627
|
}, [s, a]);
|
|
6627
|
-
const
|
|
6628
|
-
(a === "form" && s.some((
|
|
6628
|
+
const ue = Le(() => {
|
|
6629
|
+
(a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && Ee();
|
|
6629
6630
|
}, [s, a]);
|
|
6630
6631
|
pe(() => {
|
|
6631
6632
|
Pe();
|
|
6632
6633
|
}, [h]);
|
|
6633
|
-
const be = (
|
|
6634
|
-
var
|
|
6634
|
+
const be = (X) => {
|
|
6635
|
+
var ae, Ce;
|
|
6635
6636
|
r == null || r({
|
|
6636
|
-
fields: ((
|
|
6637
|
-
items: Nc(
|
|
6637
|
+
fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((Ce = o.get("tree")) == null ? void 0 : Ce.fields),
|
|
6638
|
+
items: Nc(X)
|
|
6638
6639
|
});
|
|
6639
6640
|
}, Ee = async () => {
|
|
6640
|
-
await Ve(), u >
|
|
6641
|
-
}, Ve = async (
|
|
6642
|
-
var
|
|
6641
|
+
await Ve(), u > Z.length - 1 && u !== 0 && d(0);
|
|
6642
|
+
}, Ve = async (X) => {
|
|
6643
|
+
var ae, Ce, ge;
|
|
6643
6644
|
A(!0), V(!1), E(void 0);
|
|
6644
6645
|
try {
|
|
6645
6646
|
const [Se, Fe] = await Jn({
|
|
6646
6647
|
treeView: {
|
|
6647
|
-
arch: (
|
|
6648
|
+
arch: (ae = o.get("tree")) == null ? void 0 : ae.arch,
|
|
6648
6649
|
fields: (Ce = o.get("tree")) == null ? void 0 : Ce.fields
|
|
6649
6650
|
},
|
|
6650
6651
|
formView: {
|
|
@@ -6656,9 +6657,9 @@ const Pc = (e) => {
|
|
|
6656
6657
|
...p == null ? void 0 : p(),
|
|
6657
6658
|
...B
|
|
6658
6659
|
},
|
|
6659
|
-
currentView:
|
|
6660
|
+
currentView: X || a
|
|
6660
6661
|
});
|
|
6661
|
-
return
|
|
6662
|
+
return U.current || (U.current = Se.map((Oe) => Oe.id)), (a || X) === "tree" && Fe && J(Fe), be(Se), Se;
|
|
6662
6663
|
} catch (Se) {
|
|
6663
6664
|
E(Se);
|
|
6664
6665
|
} finally {
|
|
@@ -6666,8 +6667,8 @@ const Pc = (e) => {
|
|
|
6666
6667
|
}
|
|
6667
6668
|
};
|
|
6668
6669
|
async function Pe() {
|
|
6669
|
-
|
|
6670
|
-
domain:
|
|
6670
|
+
ee && (N.current = await H.getHandler().evalDomain({
|
|
6671
|
+
domain: ee,
|
|
6671
6672
|
values: Mt({
|
|
6672
6673
|
fields: m(),
|
|
6673
6674
|
values: y()
|
|
@@ -6676,27 +6677,27 @@ const Pc = (e) => {
|
|
|
6676
6677
|
context: p()
|
|
6677
6678
|
})), h && h.length > 0 && (N.current = N.current.concat(Pr({
|
|
6678
6679
|
domain: h,
|
|
6679
|
-
widgetFieldName:
|
|
6680
|
+
widgetFieldName: oe
|
|
6680
6681
|
})));
|
|
6681
6682
|
}
|
|
6682
6683
|
const We = () => {
|
|
6683
|
-
const
|
|
6684
|
+
const X = Array.from(o.keys()), ae = X[(X.indexOf(a) + 1) % X.length];
|
|
6684
6685
|
a === "form" ? we(() => {
|
|
6685
|
-
l(
|
|
6686
|
-
}) : l(
|
|
6687
|
-
},
|
|
6686
|
+
l(ae);
|
|
6687
|
+
}) : l(ae);
|
|
6688
|
+
}, se = () => {
|
|
6688
6689
|
u > 0 && (a === "form" ? we(() => {
|
|
6689
6690
|
d(u - 1);
|
|
6690
6691
|
}) : d(u - 1));
|
|
6691
6692
|
}, de = () => {
|
|
6692
|
-
const
|
|
6693
|
-
u <
|
|
6693
|
+
const X = Z.length;
|
|
6694
|
+
u < X - 1 && (a === "form" ? we(() => {
|
|
6694
6695
|
d(u + 1);
|
|
6695
6696
|
}) : d(u + 1));
|
|
6696
6697
|
}, je = async () => {
|
|
6697
|
-
const
|
|
6698
|
+
const X = Z[u].id, ae = (await H.getHandler().readObjects({
|
|
6698
6699
|
model: L,
|
|
6699
|
-
ids: [
|
|
6700
|
+
ids: [X],
|
|
6700
6701
|
fields: o.get("form").fields,
|
|
6701
6702
|
context: {
|
|
6702
6703
|
...p == null ? void 0 : p(),
|
|
@@ -6704,28 +6705,28 @@ const Pc = (e) => {
|
|
|
6704
6705
|
}
|
|
6705
6706
|
}))[0], Ce = (await H.getHandler().readObjects({
|
|
6706
6707
|
model: L,
|
|
6707
|
-
ids: [
|
|
6708
|
+
ids: [X],
|
|
6708
6709
|
fields: o.get("tree").fields,
|
|
6709
6710
|
context: {
|
|
6710
6711
|
...p == null ? void 0 : p(),
|
|
6711
6712
|
...B
|
|
6712
6713
|
}
|
|
6713
|
-
}))[0], ge = s.map((Se) => Se.id ===
|
|
6714
|
+
}))[0], ge = s.map((Se) => Se.id === X ? {
|
|
6714
6715
|
...Se,
|
|
6715
6716
|
operation: "original",
|
|
6716
|
-
values:
|
|
6717
|
+
values: ae,
|
|
6717
6718
|
treeValues: Ce
|
|
6718
6719
|
} : Se);
|
|
6719
6720
|
be(ge);
|
|
6720
|
-
}, we = (
|
|
6721
|
+
}, we = (X) => {
|
|
6721
6722
|
F ? Ut({
|
|
6722
6723
|
lang: g,
|
|
6723
6724
|
onOk: () => {
|
|
6724
|
-
je(),
|
|
6725
|
+
je(), X(), V(!1);
|
|
6725
6726
|
}
|
|
6726
|
-
}) :
|
|
6727
|
+
}) : X();
|
|
6727
6728
|
}, Re = () => {
|
|
6728
|
-
if (
|
|
6729
|
+
if (re) {
|
|
6729
6730
|
Mc({
|
|
6730
6731
|
lang: g,
|
|
6731
6732
|
onOk: () => {
|
|
@@ -6742,76 +6743,76 @@ const Pc = (e) => {
|
|
|
6742
6743
|
});
|
|
6743
6744
|
}, Ze = async () => {
|
|
6744
6745
|
const {
|
|
6745
|
-
inv_field:
|
|
6746
|
+
inv_field: X
|
|
6746
6747
|
} = i;
|
|
6747
|
-
let
|
|
6748
|
-
|
|
6749
|
-
[
|
|
6748
|
+
let ae;
|
|
6749
|
+
X && c && (ae = {
|
|
6750
|
+
[X]: c
|
|
6750
6751
|
}), a === "form" ? we(() => {
|
|
6751
6752
|
I(!0), M({
|
|
6752
|
-
defaultValues:
|
|
6753
|
+
defaultValues: ae
|
|
6753
6754
|
}), C(!0);
|
|
6754
6755
|
}) : (I(!0), M({
|
|
6755
|
-
defaultValues:
|
|
6756
|
+
defaultValues: ae
|
|
6756
6757
|
}), C(!0));
|
|
6757
|
-
},
|
|
6758
|
+
}, Q = async () => {
|
|
6758
6759
|
a === "form" ? we(() => {
|
|
6759
6760
|
T(!0);
|
|
6760
6761
|
}) : T(!0);
|
|
6761
6762
|
}, De = async () => {
|
|
6762
6763
|
A(!0), V(!1), E(void 0);
|
|
6763
6764
|
try {
|
|
6764
|
-
if (
|
|
6765
|
-
const
|
|
6766
|
-
...
|
|
6765
|
+
if (Z[u].id > 0) {
|
|
6766
|
+
const X = s.map((ae) => ae.id === Z[u].id ? {
|
|
6767
|
+
...ae,
|
|
6767
6768
|
operation: "pendingRemove"
|
|
6768
|
-
} :
|
|
6769
|
-
be(
|
|
6769
|
+
} : ae);
|
|
6770
|
+
be(X);
|
|
6770
6771
|
} else
|
|
6771
|
-
be(s.filter((
|
|
6772
|
-
} catch (
|
|
6773
|
-
E(
|
|
6772
|
+
be(s.filter((X) => X.id !== Z[u].id));
|
|
6773
|
+
} catch (X) {
|
|
6774
|
+
E(X);
|
|
6774
6775
|
}
|
|
6775
6776
|
d(0), A(!1);
|
|
6776
6777
|
}, Ae = async () => {
|
|
6777
|
-
const
|
|
6778
|
+
const X = Z.filter((ae) => S.includes(ae.id));
|
|
6778
6779
|
A(!0), V(!1), E(void 0);
|
|
6779
6780
|
try {
|
|
6780
|
-
const
|
|
6781
|
+
const ae = X.map((ge) => ge.id), Ce = s.filter((ge) => !(ae.includes(ge.id) && ge.id < 0)).map((ge) => ae.includes(ge.id) ? {
|
|
6781
6782
|
...ge,
|
|
6782
6783
|
operation: "pendingRemove"
|
|
6783
6784
|
} : ge);
|
|
6784
6785
|
be(Ce);
|
|
6785
|
-
} catch (
|
|
6786
|
-
E(
|
|
6786
|
+
} catch (ae) {
|
|
6787
|
+
E(ae);
|
|
6787
6788
|
}
|
|
6788
6789
|
d(0), A(!1);
|
|
6789
|
-
}, ke = (
|
|
6790
|
+
}, ke = (X, ae, Ce, ge = !1) => {
|
|
6790
6791
|
let Se;
|
|
6791
6792
|
if (ge)
|
|
6792
6793
|
Se = s.concat({
|
|
6793
|
-
id:
|
|
6794
|
+
id: X,
|
|
6794
6795
|
operation: "pendingLink",
|
|
6795
6796
|
values: {
|
|
6796
6797
|
...Ce,
|
|
6797
|
-
id:
|
|
6798
|
+
id: X
|
|
6798
6799
|
},
|
|
6799
6800
|
treeValues: {
|
|
6800
6801
|
...Ce,
|
|
6801
|
-
id:
|
|
6802
|
+
id: X
|
|
6802
6803
|
}
|
|
6803
6804
|
});
|
|
6804
|
-
else if (
|
|
6805
|
-
Se = s.map((Fe) => Fe.id ===
|
|
6806
|
-
id:
|
|
6807
|
-
operation:
|
|
6805
|
+
else if (X)
|
|
6806
|
+
Se = s.map((Fe) => Fe.id === X ? {
|
|
6807
|
+
id: X,
|
|
6808
|
+
operation: X > 0 ? "pendingUpdate" : "pendingCreate",
|
|
6808
6809
|
values: {
|
|
6809
6810
|
...Ce,
|
|
6810
|
-
id:
|
|
6811
|
+
id: X
|
|
6811
6812
|
},
|
|
6812
6813
|
treeValues: {
|
|
6813
6814
|
...Ce,
|
|
6814
|
-
id:
|
|
6815
|
+
id: X
|
|
6815
6816
|
}
|
|
6816
6817
|
} : Fe);
|
|
6817
6818
|
else {
|
|
@@ -6830,17 +6831,17 @@ const Pc = (e) => {
|
|
|
6830
6831
|
});
|
|
6831
6832
|
}
|
|
6832
6833
|
be(Se), k || C(!1);
|
|
6833
|
-
}, le = async (
|
|
6834
|
+
}, le = async (X) => {
|
|
6834
6835
|
const {
|
|
6835
|
-
id:
|
|
6836
|
-
} =
|
|
6836
|
+
id: ae
|
|
6837
|
+
} = X;
|
|
6837
6838
|
let Ce = s;
|
|
6838
|
-
const ge = s.find((Se) => Se.id ===
|
|
6839
|
-
(ge == null ? void 0 : ge.values) === void 0 && (Ce = await Ve("form")), M(Ce.find((Se) => Se.id ===
|
|
6840
|
-
},
|
|
6839
|
+
const ge = s.find((Se) => Se.id === ae);
|
|
6840
|
+
(ge == null ? void 0 : ge.values) === void 0 && (Ce = await Ve("form")), M(Ce.find((Se) => Se.id === ae)), I(!1), C(!0);
|
|
6841
|
+
}, he = async (X) => {
|
|
6841
6842
|
A(!0);
|
|
6842
|
-
let
|
|
6843
|
-
const Ce =
|
|
6843
|
+
let ae = s;
|
|
6844
|
+
const Ce = X.filter((ge) => !s.find((Se) => Se.id === ge));
|
|
6844
6845
|
try {
|
|
6845
6846
|
for (const ge of Ce) {
|
|
6846
6847
|
const Se = (await H.getHandler().readObjects({
|
|
@@ -6860,14 +6861,14 @@ const Pc = (e) => {
|
|
|
6860
6861
|
...B
|
|
6861
6862
|
}
|
|
6862
6863
|
}))[0];
|
|
6863
|
-
|
|
6864
|
+
ae.push({
|
|
6864
6865
|
id: ge,
|
|
6865
6866
|
operation: "pendingLink",
|
|
6866
6867
|
values: Se,
|
|
6867
6868
|
treeValues: Fe
|
|
6868
6869
|
});
|
|
6869
6870
|
}
|
|
6870
|
-
be(
|
|
6871
|
+
be(ae);
|
|
6871
6872
|
} catch (ge) {
|
|
6872
6873
|
E(ge);
|
|
6873
6874
|
} finally {
|
|
@@ -6875,30 +6876,30 @@ const Pc = (e) => {
|
|
|
6875
6876
|
}
|
|
6876
6877
|
};
|
|
6877
6878
|
function Ue() {
|
|
6878
|
-
const
|
|
6879
|
+
const X = Lc[a];
|
|
6879
6880
|
if (a === "graph")
|
|
6880
6881
|
return Nn(o.get("graph").arch).string;
|
|
6881
6882
|
{
|
|
6882
|
-
const
|
|
6883
|
-
return
|
|
6883
|
+
const ae = new X(o.get(a).fields);
|
|
6884
|
+
return ae.parse(o.get(a).arch), ae.string;
|
|
6884
6885
|
}
|
|
6885
6886
|
}
|
|
6886
|
-
const
|
|
6887
|
-
var
|
|
6887
|
+
const fe = () => {
|
|
6888
|
+
var ae, Ce, ge, Se;
|
|
6888
6889
|
if (a === "form")
|
|
6889
|
-
return
|
|
6890
|
+
return Z.length === 0 ? v("noCurrentEntries") : a !== z.current && s.some((Fe) => !Fe.values) ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(Gt, {
|
|
6890
6891
|
formView: o.get("form"),
|
|
6891
|
-
values: (
|
|
6892
|
+
values: (ae = Z[u]) == null ? void 0 : ae.values,
|
|
6892
6893
|
parentContext: {
|
|
6893
6894
|
...p == null ? void 0 : p(),
|
|
6894
6895
|
...B
|
|
6895
6896
|
},
|
|
6896
6897
|
model: L,
|
|
6897
|
-
id: (Ce =
|
|
6898
|
+
id: (Ce = Z[u]) == null ? void 0 : Ce.id,
|
|
6898
6899
|
submitMode: "values",
|
|
6899
6900
|
onFieldsChange: (Fe) => {
|
|
6900
6901
|
var ot;
|
|
6901
|
-
const Oe = (ot =
|
|
6902
|
+
const Oe = (ot = Z[u]) == null ? void 0 : ot.id, $e = s.map((pt) => pt.id === Oe ? {
|
|
6902
6903
|
...pt,
|
|
6903
6904
|
operation: pt.operation === "original" ? "pendingUpdate" : pt.operation,
|
|
6904
6905
|
values: {
|
|
@@ -6912,22 +6913,22 @@ const Pc = (e) => {
|
|
|
6912
6913
|
} : pt);
|
|
6913
6914
|
be($e), V(!0);
|
|
6914
6915
|
},
|
|
6915
|
-
readOnly:
|
|
6916
|
+
readOnly: K
|
|
6916
6917
|
});
|
|
6917
|
-
let
|
|
6918
|
-
if (
|
|
6919
|
-
resultsToSort:
|
|
6918
|
+
let X = [];
|
|
6919
|
+
if (Z.some((Fe) => Fe.treeValues) && (X = O ? It({
|
|
6920
|
+
resultsToSort: Z.map((Fe) => Fe.treeValues),
|
|
6920
6921
|
sorter: O,
|
|
6921
6922
|
fields: {
|
|
6922
6923
|
...o.get("tree").fields,
|
|
6923
6924
|
...((ge = o.get("form")) == null ? void 0 : ge.fields) || {}
|
|
6924
6925
|
}
|
|
6925
|
-
}) :
|
|
6926
|
+
}) : Z.map((Fe) => Fe.treeValues)), a === "tree")
|
|
6926
6927
|
return /* @__PURE__ */ n(pn, {
|
|
6927
|
-
total:
|
|
6928
|
-
limit:
|
|
6928
|
+
total: Z.length,
|
|
6929
|
+
limit: Z.length,
|
|
6929
6930
|
treeView: o.get("tree"),
|
|
6930
|
-
results:
|
|
6931
|
+
results: X,
|
|
6931
6932
|
loading: b,
|
|
6932
6933
|
onRowClicked: ((Se = o.get("form")) == null ? void 0 : Se.fields) !== void 0 ? le : void 0,
|
|
6933
6934
|
showPagination: !1,
|
|
@@ -6941,8 +6942,8 @@ const Pc = (e) => {
|
|
|
6941
6942
|
...p == null ? void 0 : p(),
|
|
6942
6943
|
...B
|
|
6943
6944
|
},
|
|
6944
|
-
colorsForResults:
|
|
6945
|
-
readonly:
|
|
6945
|
+
colorsForResults: G,
|
|
6946
|
+
readonly: K
|
|
6946
6947
|
});
|
|
6947
6948
|
if (a === "graph") {
|
|
6948
6949
|
const Fe = [[`${i.inv_field}`, "=", c]];
|
|
@@ -6966,25 +6967,25 @@ const Pc = (e) => {
|
|
|
6966
6967
|
banner: !0
|
|
6967
6968
|
});
|
|
6968
6969
|
const rt = k;
|
|
6969
|
-
return b ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(
|
|
6970
|
+
return b ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(te, {
|
|
6970
6971
|
children: [/* @__PURE__ */ n($c, {
|
|
6971
6972
|
mode: a,
|
|
6972
6973
|
title: Ue(),
|
|
6973
|
-
readOnly:
|
|
6974
|
-
isMany2Many:
|
|
6974
|
+
readOnly: K,
|
|
6975
|
+
isMany2Many: re,
|
|
6975
6976
|
formHasChanges: F,
|
|
6976
|
-
totalItems:
|
|
6977
|
+
totalItems: Z.length,
|
|
6977
6978
|
currentItemIndex: u,
|
|
6978
6979
|
onDelete: Re,
|
|
6979
6980
|
onCreateItem: Ze,
|
|
6980
6981
|
onToggleViewMode: We,
|
|
6981
|
-
onPreviousItem:
|
|
6982
|
+
onPreviousItem: se,
|
|
6982
6983
|
onNextItem: de,
|
|
6983
|
-
onSearchItem:
|
|
6984
|
+
onSearchItem: Q,
|
|
6984
6985
|
selectedRowKeys: S,
|
|
6985
6986
|
showCreateButton: ((Ke = o.get("form")) == null ? void 0 : Ke.fields) !== void 0,
|
|
6986
6987
|
showToggleButton: o.size > 1
|
|
6987
|
-
}),
|
|
6988
|
+
}), fe(), /* @__PURE__ */ n(qt, {
|
|
6988
6989
|
formView: o.get("form"),
|
|
6989
6990
|
model: L,
|
|
6990
6991
|
id: $ == null ? void 0 : $.id,
|
|
@@ -7000,7 +7001,7 @@ const Pc = (e) => {
|
|
|
7000
7001
|
onCancel: () => {
|
|
7001
7002
|
I(!1), C(!1);
|
|
7002
7003
|
},
|
|
7003
|
-
readOnly:
|
|
7004
|
+
readOnly: K,
|
|
7004
7005
|
mustClearAfterSave: rt
|
|
7005
7006
|
}), /* @__PURE__ */ n(Do, {
|
|
7006
7007
|
domain: N.current,
|
|
@@ -7010,8 +7011,8 @@ const Pc = (e) => {
|
|
|
7010
7011
|
...B
|
|
7011
7012
|
},
|
|
7012
7013
|
visible: w,
|
|
7013
|
-
onSelectValues: async (
|
|
7014
|
-
T(!1),
|
|
7014
|
+
onSelectValues: async (X) => {
|
|
7015
|
+
T(!1), he(X);
|
|
7015
7016
|
},
|
|
7016
7017
|
onCloseModal: () => {
|
|
7017
7018
|
T(!1);
|
|
@@ -7029,7 +7030,7 @@ const Pc = (e) => {
|
|
|
7029
7030
|
context: a
|
|
7030
7031
|
} = t;
|
|
7031
7032
|
let l;
|
|
7032
|
-
const [u, d] = _(!0), [f, c] = _(), [m, y] = _(/* @__PURE__ */ new Map()), p =
|
|
7033
|
+
const [u, d] = _(!0), [f, c] = _(), [m, y] = _(/* @__PURE__ */ new Map()), p = W(Ne), {
|
|
7033
7034
|
getContext: h
|
|
7034
7035
|
} = p || {};
|
|
7035
7036
|
St(() => {
|
|
@@ -7117,7 +7118,7 @@ const Pc = (e) => {
|
|
|
7117
7118
|
token: l
|
|
7118
7119
|
} = Bc(), u = a && !s ? {
|
|
7119
7120
|
backgroundColor: l.colorPrimaryBg
|
|
7120
|
-
} : void 0, d =
|
|
7121
|
+
} : void 0, d = me(), [f, c] = _(), m = W(Ne), {
|
|
7121
7122
|
elementHasLostFocus: y
|
|
7122
7123
|
} = m || {};
|
|
7123
7124
|
pe(() => {
|
|
@@ -7149,7 +7150,7 @@ function Mo(e) {
|
|
|
7149
7150
|
showLabel: r = !0,
|
|
7150
7151
|
responsiveBehaviour: i
|
|
7151
7152
|
} = e, o = st(t.icon || "");
|
|
7152
|
-
return /* @__PURE__ */ n(
|
|
7153
|
+
return /* @__PURE__ */ n(te, {
|
|
7153
7154
|
children: (t.label || o) && r ? /* @__PURE__ */ n(Bi, {
|
|
7154
7155
|
label: t.label,
|
|
7155
7156
|
icon: o,
|
|
@@ -7181,7 +7182,7 @@ function Wc(e) {
|
|
|
7181
7182
|
defaultActiveKey: "1",
|
|
7182
7183
|
tabPosition: t.tabPosition,
|
|
7183
7184
|
children: i.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ n(Yc, {
|
|
7184
|
-
tab: /* @__PURE__ */ P(
|
|
7185
|
+
tab: /* @__PURE__ */ P(te, {
|
|
7185
7186
|
children: [o(s.icon), " ", s.label]
|
|
7186
7187
|
}),
|
|
7187
7188
|
children: /* @__PURE__ */ n(Mo, {
|
|
@@ -7209,7 +7210,7 @@ const {
|
|
|
7209
7210
|
token: l
|
|
7210
7211
|
} = Uc(), u = o && !i ? {
|
|
7211
7212
|
backgroundColor: l.colorPrimaryBg
|
|
7212
|
-
} : void 0, d =
|
|
7213
|
+
} : void 0, d = W(Ne), {
|
|
7213
7214
|
elementHasLostFocus: f
|
|
7214
7215
|
} = d || {};
|
|
7215
7216
|
return /* @__PURE__ */ n(ye, {
|
|
@@ -7236,7 +7237,7 @@ const {
|
|
|
7236
7237
|
onChange: i,
|
|
7237
7238
|
height: o
|
|
7238
7239
|
}) => {
|
|
7239
|
-
const s =
|
|
7240
|
+
const s = W(Ne), {
|
|
7240
7241
|
activeId: a,
|
|
7241
7242
|
activeModel: l,
|
|
7242
7243
|
fetchValues: u,
|
|
@@ -7244,8 +7245,8 @@ const {
|
|
|
7244
7245
|
elementHasLostFocus: f
|
|
7245
7246
|
} = s || {}, [c, m] = _(!1), {
|
|
7246
7247
|
t: y
|
|
7247
|
-
} =
|
|
7248
|
-
return a ? /* @__PURE__ */ P(
|
|
7248
|
+
} = W(ve);
|
|
7249
|
+
return a ? /* @__PURE__ */ P(te, {
|
|
7249
7250
|
children: [/* @__PURE__ */ n("div", {
|
|
7250
7251
|
onClick: () => {
|
|
7251
7252
|
if (d != null && d()) {
|
|
@@ -7282,7 +7283,7 @@ const {
|
|
|
7282
7283
|
m(!1), u == null || u();
|
|
7283
7284
|
}
|
|
7284
7285
|
})]
|
|
7285
|
-
}) : /* @__PURE__ */ P(
|
|
7286
|
+
}) : /* @__PURE__ */ P(te, {
|
|
7286
7287
|
children: [/* @__PURE__ */ n(xe, {
|
|
7287
7288
|
gutter: 8,
|
|
7288
7289
|
wrap: !1,
|
|
@@ -7337,7 +7338,7 @@ const {
|
|
|
7337
7338
|
limit: s,
|
|
7338
7339
|
onClose: a
|
|
7339
7340
|
}) => {
|
|
7340
|
-
const l =
|
|
7341
|
+
const l = me({}), u = me(/* @__PURE__ */ new Map()), d = Le(
|
|
7341
7342
|
async (g) => {
|
|
7342
7343
|
if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
|
|
7343
7344
|
ct(_e("selectAtLeastOneField", r));
|
|
@@ -7725,10 +7726,10 @@ var $o = { exports: {} };
|
|
|
7725
7726
|
try {
|
|
7726
7727
|
if (["x", "X"].indexOf(I) > -1)
|
|
7727
7728
|
return new Date((I === "X" ? 1e3 : 1) * k);
|
|
7728
|
-
var O = p(I)(k), j = O.year,
|
|
7729
|
-
j && !
|
|
7730
|
-
var
|
|
7731
|
-
return
|
|
7729
|
+
var O = p(I)(k), j = O.year, U = O.month, G = O.day, J = O.hours, K = O.minutes, L = O.seconds, B = O.milliseconds, ee = O.zone, re = new Date(), oe = G || (j || U ? 1 : re.getDate()), Z = j || re.getFullYear(), z = 0;
|
|
7730
|
+
j && !U || (z = U > 0 ? U - 1 : re.getMonth());
|
|
7731
|
+
var ue = J || 0, be = K || 0, Ee = L || 0, Ve = B || 0;
|
|
7732
|
+
return ee ? new Date(Date.UTC(Z, z, oe, ue, be, Ee, Ve + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Z, z, oe, ue, be, Ee, Ve)) : new Date(Z, z, oe, ue, be, Ee, Ve);
|
|
7732
7733
|
} catch {
|
|
7733
7734
|
return new Date("");
|
|
7734
7735
|
}
|
|
@@ -7863,12 +7864,12 @@ const ld = (e) => {
|
|
|
7863
7864
|
token: l
|
|
7864
7865
|
} = fd(), u = s && !o ? {
|
|
7865
7866
|
backgroundColor: l.colorPrimaryBg
|
|
7866
|
-
} : void 0, d =
|
|
7867
|
+
} : void 0, d = me(null), {
|
|
7867
7868
|
setFieldValue: f,
|
|
7868
7869
|
getFieldValue: c
|
|
7869
|
-
} =
|
|
7870
|
+
} = W(Ne) || {}, {
|
|
7870
7871
|
t: m
|
|
7871
|
-
} =
|
|
7872
|
+
} = W(ve), y = r ? Fa(r) : "", p = (V) => {
|
|
7872
7873
|
i == null || i(V);
|
|
7873
7874
|
};
|
|
7874
7875
|
async function h() {
|
|
@@ -7955,7 +7956,7 @@ function Xn(e) {
|
|
|
7955
7956
|
} = e, {
|
|
7956
7957
|
t: l,
|
|
7957
7958
|
lang: u
|
|
7958
|
-
} =
|
|
7959
|
+
} = W(ve);
|
|
7959
7960
|
function d() {
|
|
7960
7961
|
const m = r.map((y, p) => /* @__PURE__ */ n(Be.Item, {
|
|
7961
7962
|
children: /* @__PURE__ */ P(xe, {
|
|
@@ -8102,10 +8103,10 @@ function Lo(e) {
|
|
|
8102
8103
|
} = e, {
|
|
8103
8104
|
formHasChanges: r,
|
|
8104
8105
|
onNewClicked: i
|
|
8105
|
-
} =
|
|
8106
|
+
} = W(et), {
|
|
8106
8107
|
t: o,
|
|
8107
8108
|
lang: s
|
|
8108
|
-
} =
|
|
8109
|
+
} = W(ve), a = () => {
|
|
8109
8110
|
if (r) {
|
|
8110
8111
|
Ut({
|
|
8111
8112
|
lang: s,
|
|
@@ -8164,7 +8165,7 @@ const yd = (e) => {
|
|
|
8164
8165
|
} = e, {
|
|
8165
8166
|
t: i,
|
|
8166
8167
|
lang: o
|
|
8167
|
-
} =
|
|
8168
|
+
} = W(ve), [s, a] = _(!1), l = /* @__PURE__ */ P(Ie, {
|
|
8168
8169
|
disabled: r,
|
|
8169
8170
|
children: [/* @__PURE__ */ n(Jr, {}), `(${t})`, /* @__PURE__ */ n(Rt, {
|
|
8170
8171
|
style: {
|
|
@@ -8194,7 +8195,7 @@ const yd = (e) => {
|
|
|
8194
8195
|
style: {
|
|
8195
8196
|
padding: 20
|
|
8196
8197
|
}
|
|
8197
|
-
}) : /* @__PURE__ */ P(
|
|
8198
|
+
}) : /* @__PURE__ */ P(te, {
|
|
8198
8199
|
children: [/* @__PURE__ */ P("a", {
|
|
8199
8200
|
style: {
|
|
8200
8201
|
display: "block",
|
|
@@ -8214,7 +8215,7 @@ const yd = (e) => {
|
|
|
8214
8215
|
t(!1), s();
|
|
8215
8216
|
},
|
|
8216
8217
|
children: [/* @__PURE__ */ n(cn, {}), " ", _e("addNewAttachment", r)]
|
|
8217
|
-
}), i.length > 0 && /* @__PURE__ */ P(
|
|
8218
|
+
}), i.length > 0 && /* @__PURE__ */ P(te, {
|
|
8218
8219
|
children: [/* @__PURE__ */ n("li", {
|
|
8219
8220
|
className: "ant-dropdown-menu-item-divider"
|
|
8220
8221
|
}), i.map((d) => {
|
|
@@ -8276,9 +8277,9 @@ function wd(e) {
|
|
|
8276
8277
|
onViewAttachmentDetails: s
|
|
8277
8278
|
} = e, {
|
|
8278
8279
|
formRef: a
|
|
8279
|
-
} =
|
|
8280
|
+
} = W(et), [l, u] = _(!1), [d, f] = _([]), [c, m] = _(!1), {
|
|
8280
8281
|
t: y
|
|
8281
|
-
} =
|
|
8282
|
+
} = W(ve), p = Le(async () => {
|
|
8282
8283
|
u(!0);
|
|
8283
8284
|
try {
|
|
8284
8285
|
const v = await H.getHandler().readObjects({
|
|
@@ -8324,7 +8325,7 @@ function wd(e) {
|
|
|
8324
8325
|
}, []);
|
|
8325
8326
|
return pe(() => {
|
|
8326
8327
|
p();
|
|
8327
|
-
}, [p]), /* @__PURE__ */ P(
|
|
8328
|
+
}, [p]), /* @__PURE__ */ P(te, {
|
|
8328
8329
|
children: [/* @__PURE__ */ n(yd, {
|
|
8329
8330
|
numberOfAttachments: t.length,
|
|
8330
8331
|
attachments: d,
|
|
@@ -8373,12 +8374,12 @@ function bd({
|
|
|
8373
8374
|
previousView: D,
|
|
8374
8375
|
setPreviousView: E,
|
|
8375
8376
|
goToResourceId: x
|
|
8376
|
-
} =
|
|
8377
|
+
} = W(et), {
|
|
8377
8378
|
t: C,
|
|
8378
8379
|
lang: w
|
|
8379
|
-
} =
|
|
8380
|
+
} = W(ve), T = W(Et), {
|
|
8380
8381
|
processAction: $
|
|
8381
|
-
} = T || {}, M =
|
|
8382
|
+
} = T || {}, M = W(at), {
|
|
8382
8383
|
openRelate: S,
|
|
8383
8384
|
openDefaultActionForModel: R
|
|
8384
8385
|
} = M || {};
|
|
@@ -8417,17 +8418,17 @@ function bd({
|
|
|
8417
8418
|
confirmMessage: C("confirmRemoveItem"),
|
|
8418
8419
|
lang: w,
|
|
8419
8420
|
onOk: () => {
|
|
8420
|
-
|
|
8421
|
+
U();
|
|
8421
8422
|
}
|
|
8422
8423
|
});
|
|
8423
8424
|
}
|
|
8424
|
-
async function
|
|
8425
|
+
async function U() {
|
|
8425
8426
|
try {
|
|
8426
8427
|
y == null || y(!0), await H.getHandler().deleteObjects({
|
|
8427
8428
|
model: m,
|
|
8428
8429
|
ids: [l]
|
|
8429
8430
|
});
|
|
8430
|
-
const L = u == null ? void 0 : u.filter((
|
|
8431
|
+
const L = u == null ? void 0 : u.filter((ee) => ee.id !== l);
|
|
8431
8432
|
v == null || v(L);
|
|
8432
8433
|
let B = 0;
|
|
8433
8434
|
f > 0 && f <= u.length - 1 && (B = f - 1), L != null && L[B] ? (c == null || c(L == null ? void 0 : L[B].id), d == null || d(B)) : (c == null || c(void 0), d == null || d(void 0));
|
|
@@ -8437,7 +8438,7 @@ function bd({
|
|
|
8437
8438
|
y == null || y(!1);
|
|
8438
8439
|
}
|
|
8439
8440
|
}
|
|
8440
|
-
async function
|
|
8441
|
+
async function G() {
|
|
8441
8442
|
try {
|
|
8442
8443
|
g == null || g(!0);
|
|
8443
8444
|
const L = await H.getHandler().duplicate({
|
|
@@ -8453,7 +8454,7 @@ function bd({
|
|
|
8453
8454
|
}
|
|
8454
8455
|
}
|
|
8455
8456
|
const J = a || p || F || h;
|
|
8456
|
-
function
|
|
8457
|
+
function K(L) {
|
|
8457
8458
|
$ == null || $({
|
|
8458
8459
|
actionData: L,
|
|
8459
8460
|
values: b.current.getValues(),
|
|
@@ -8466,7 +8467,7 @@ function bd({
|
|
|
8466
8467
|
}
|
|
8467
8468
|
return r ? /* @__PURE__ */ P(Ye, {
|
|
8468
8469
|
wrap: !0,
|
|
8469
|
-
children: [F && /* @__PURE__ */ P(
|
|
8470
|
+
children: [F && /* @__PURE__ */ P(te, {
|
|
8470
8471
|
children: [/* @__PURE__ */ n(Me, {}), Tt(), Tt()]
|
|
8471
8472
|
}), /* @__PURE__ */ n(Lo, {
|
|
8472
8473
|
disabled: a || F || p || h
|
|
@@ -8481,7 +8482,7 @@ function bd({
|
|
|
8481
8482
|
tooltip: C("duplicate"),
|
|
8482
8483
|
disabled: s || a || l === void 0 || h || F,
|
|
8483
8484
|
loading: h,
|
|
8484
|
-
onClick:
|
|
8485
|
+
onClick: G
|
|
8485
8486
|
}), /* @__PURE__ */ n(ze, {
|
|
8486
8487
|
icon: /* @__PURE__ */ n(Wn, {}),
|
|
8487
8488
|
tooltip: C("delete"),
|
|
@@ -8541,7 +8542,7 @@ function bd({
|
|
|
8541
8542
|
onItemClick: async (L) => {
|
|
8542
8543
|
!L || !(await Ft({
|
|
8543
8544
|
onFormSave: o
|
|
8544
|
-
})).succeed ||
|
|
8545
|
+
})).succeed || K(L);
|
|
8545
8546
|
}
|
|
8546
8547
|
}), /* @__PURE__ */ n(Dt, {
|
|
8547
8548
|
icon: /* @__PURE__ */ n(Yn, {}),
|
|
@@ -8554,7 +8555,7 @@ function bd({
|
|
|
8554
8555
|
const B = await Ft({
|
|
8555
8556
|
onFormSave: o
|
|
8556
8557
|
});
|
|
8557
|
-
!B.succeed ||
|
|
8558
|
+
!B.succeed || K({
|
|
8558
8559
|
...L,
|
|
8559
8560
|
datas: {
|
|
8560
8561
|
...L.datas || {},
|
|
@@ -8587,14 +8588,14 @@ function bd({
|
|
|
8587
8588
|
});
|
|
8588
8589
|
if (!L.succeed)
|
|
8589
8590
|
return;
|
|
8590
|
-
const B = L.currentId,
|
|
8591
|
+
const B = L.currentId, ee = m;
|
|
8591
8592
|
R({
|
|
8592
8593
|
model: "ir.attachment",
|
|
8593
8594
|
values: {
|
|
8594
|
-
selection_associated_object: `${
|
|
8595
|
+
selection_associated_object: `${ee},${B}`
|
|
8595
8596
|
},
|
|
8596
8597
|
forced_values: {
|
|
8597
|
-
res_model:
|
|
8598
|
+
res_model: ee,
|
|
8598
8599
|
res_id: B
|
|
8599
8600
|
},
|
|
8600
8601
|
initialViewType: "form"
|
|
@@ -8659,7 +8660,7 @@ const {
|
|
|
8659
8660
|
token: d
|
|
8660
8661
|
} = xd(), f = u && !l ? {
|
|
8661
8662
|
backgroundColor: d.colorPrimaryBg
|
|
8662
|
-
} : void 0, c =
|
|
8663
|
+
} : void 0, c = W(Ne), {
|
|
8663
8664
|
elementHasLostFocus: m
|
|
8664
8665
|
} = c || {}, [y, p] = _(!1), [h, g] = _(!1);
|
|
8665
8666
|
pe(() => {
|
|
@@ -8757,7 +8758,7 @@ const {
|
|
|
8757
8758
|
isSearching: o
|
|
8758
8759
|
} = e, {
|
|
8759
8760
|
t: s
|
|
8760
|
-
} =
|
|
8761
|
+
} = W(ve), a = me();
|
|
8761
8762
|
function l(u) {
|
|
8762
8763
|
r(u.id);
|
|
8763
8764
|
}
|
|
@@ -8866,7 +8867,7 @@ function Od({
|
|
|
8866
8867
|
}) {
|
|
8867
8868
|
const {
|
|
8868
8869
|
t
|
|
8869
|
-
} =
|
|
8870
|
+
} = W(ve), {
|
|
8870
8871
|
availableViews: r,
|
|
8871
8872
|
currentView: i,
|
|
8872
8873
|
setCurrentView: o,
|
|
@@ -8876,7 +8877,7 @@ function Od({
|
|
|
8876
8877
|
graphIsLoading: u,
|
|
8877
8878
|
previousView: d,
|
|
8878
8879
|
setPreviousView: f
|
|
8879
|
-
} =
|
|
8880
|
+
} = W(et);
|
|
8880
8881
|
return /* @__PURE__ */ P(Ye, {
|
|
8881
8882
|
wrap: !0,
|
|
8882
8883
|
children: [/* @__PURE__ */ n(Ho, {
|
|
@@ -8929,14 +8930,14 @@ function yn(e) {
|
|
|
8929
8930
|
results: l,
|
|
8930
8931
|
totalItems: u,
|
|
8931
8932
|
selectedRowItems: d
|
|
8932
|
-
} =
|
|
8933
|
+
} = W(et), {
|
|
8933
8934
|
t: f
|
|
8934
|
-
} =
|
|
8935
|
+
} = W(ve), {
|
|
8935
8936
|
token: c
|
|
8936
8937
|
} = _d();
|
|
8937
8938
|
function m() {
|
|
8938
8939
|
if ((o == null ? void 0 : o.type) === "form")
|
|
8939
|
-
return s ? u === 0 ? /* @__PURE__ */ P(
|
|
8940
|
+
return s ? u === 0 ? /* @__PURE__ */ P(te, {
|
|
8940
8941
|
children: [f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8941
8942
|
copyable: {
|
|
8942
8943
|
icon: /* @__PURE__ */ n(Gn, {
|
|
@@ -8947,7 +8948,7 @@ function yn(e) {
|
|
|
8947
8948
|
},
|
|
8948
8949
|
children: s
|
|
8949
8950
|
}), ")"]
|
|
8950
|
-
}) : /* @__PURE__ */ P(
|
|
8951
|
+
}) : /* @__PURE__ */ P(te, {
|
|
8951
8952
|
children: [f("register"), " ", a === void 0 ? 1 : a + 1, " /", " ", l.length, " ", f("of"), " ", u, " - ", f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8952
8953
|
copyable: !0,
|
|
8953
8954
|
children: s
|
|
@@ -8955,14 +8956,14 @@ function yn(e) {
|
|
|
8955
8956
|
}) : "";
|
|
8956
8957
|
if ((o == null ? void 0 : o.type) === "tree" && d) {
|
|
8957
8958
|
if (d.length === 1)
|
|
8958
|
-
return /* @__PURE__ */ P(
|
|
8959
|
+
return /* @__PURE__ */ P(te, {
|
|
8959
8960
|
children: ["1 ", f("selectedRegisters"), " - (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8960
8961
|
copyable: !0,
|
|
8961
8962
|
children: d[0].id
|
|
8962
8963
|
}), ")"]
|
|
8963
8964
|
});
|
|
8964
8965
|
if (d.length > 1)
|
|
8965
|
-
return /* @__PURE__ */ P(
|
|
8966
|
+
return /* @__PURE__ */ P(te, {
|
|
8966
8967
|
children: [d.length, " ", f("selectedRegisters"), /* @__PURE__ */ n(Xt, {
|
|
8967
8968
|
copyable: {
|
|
8968
8969
|
text: d.map((y) => y.id).join(", ")
|
|
@@ -9016,7 +9017,7 @@ const Dd = (e) => {
|
|
|
9016
9017
|
domain: s,
|
|
9017
9018
|
formView: a,
|
|
9018
9019
|
treeView: l
|
|
9019
|
-
} = e, u =
|
|
9020
|
+
} = e, u = me(), d = W(et), {
|
|
9020
9021
|
setResults: f = void 0,
|
|
9021
9022
|
setCurrentItemIndex: c = void 0,
|
|
9022
9023
|
currentId: m = void 0,
|
|
@@ -9072,7 +9073,7 @@ const Dd = (e) => {
|
|
|
9072
9073
|
limit: E,
|
|
9073
9074
|
setLimit: x
|
|
9074
9075
|
});
|
|
9075
|
-
return !r || !t ? null : /* @__PURE__ */ P(
|
|
9076
|
+
return !r || !t ? null : /* @__PURE__ */ P(te, {
|
|
9076
9077
|
children: [/* @__PURE__ */ n(yn, {
|
|
9077
9078
|
title: t.name,
|
|
9078
9079
|
children: /* @__PURE__ */ n(Od, {
|
|
@@ -9122,7 +9123,7 @@ const Dd = (e) => {
|
|
|
9122
9123
|
setResults: c,
|
|
9123
9124
|
setCurrentItemIndex: m
|
|
9124
9125
|
} = e;
|
|
9125
|
-
return t ? /* @__PURE__ */ P(
|
|
9126
|
+
return t ? /* @__PURE__ */ P(te, {
|
|
9126
9127
|
children: [/* @__PURE__ */ n(yn, {
|
|
9127
9128
|
children: /* @__PURE__ */ n(bd, {
|
|
9128
9129
|
toolbar: a == null ? void 0 : a.toolbar
|
|
@@ -9150,7 +9151,7 @@ function Ad(e) {
|
|
|
9150
9151
|
searchText: i
|
|
9151
9152
|
} = e, {
|
|
9152
9153
|
t: o
|
|
9153
|
-
} =
|
|
9154
|
+
} = W(ve), [s] = it.useForm(), [a, l] = _(!1);
|
|
9154
9155
|
function u(f) {
|
|
9155
9156
|
t(f.search);
|
|
9156
9157
|
}
|
|
@@ -9239,16 +9240,16 @@ function kd(e) {
|
|
|
9239
9240
|
results: A,
|
|
9240
9241
|
limit: D,
|
|
9241
9242
|
totalItems: E
|
|
9242
|
-
} =
|
|
9243
|
+
} = W(et), {
|
|
9243
9244
|
parentContext: x = {},
|
|
9244
9245
|
treeExpandable: C,
|
|
9245
9246
|
toolbar: w
|
|
9246
9247
|
} = e, {
|
|
9247
9248
|
previewFeatures: T
|
|
9248
|
-
} =
|
|
9249
|
+
} = W(Rd), {
|
|
9249
9250
|
t: $,
|
|
9250
9251
|
lang: M
|
|
9251
|
-
} =
|
|
9252
|
+
} = W(ve), S = W(Et), {
|
|
9252
9253
|
processAction: R
|
|
9253
9254
|
} = S || {}, [k, I] = _(!1), N = v !== void 0 && v.trim().length > 0;
|
|
9254
9255
|
function O() {
|
|
@@ -9261,20 +9262,20 @@ function kd(e) {
|
|
|
9261
9262
|
});
|
|
9262
9263
|
}
|
|
9263
9264
|
async function j() {
|
|
9264
|
-
var
|
|
9265
|
+
var K;
|
|
9265
9266
|
try {
|
|
9266
9267
|
s == null || s(!0), await H.getHandler().deleteObjects({
|
|
9267
9268
|
model: d,
|
|
9268
9269
|
ids: o.map((L) => L.id)
|
|
9269
|
-
}), c == null || c(void 0), m == null || m(void 0), (
|
|
9270
|
+
}), c == null || c(void 0), m == null || m(void 0), (K = f == null ? void 0 : f.current) == null || K.refreshResults();
|
|
9270
9271
|
} catch (L) {
|
|
9271
9272
|
Ge(L);
|
|
9272
9273
|
} finally {
|
|
9273
9274
|
s == null || s(!1);
|
|
9274
9275
|
}
|
|
9275
9276
|
}
|
|
9276
|
-
async function
|
|
9277
|
-
var
|
|
9277
|
+
async function U() {
|
|
9278
|
+
var K;
|
|
9278
9279
|
try {
|
|
9279
9280
|
u == null || u(!0);
|
|
9280
9281
|
const L = o[0].id;
|
|
@@ -9284,16 +9285,16 @@ function kd(e) {
|
|
|
9284
9285
|
context: {
|
|
9285
9286
|
...x
|
|
9286
9287
|
}
|
|
9287
|
-
}) && ((
|
|
9288
|
+
}) && ((K = f == null ? void 0 : f.current) == null || K.refreshResults());
|
|
9288
9289
|
} catch (L) {
|
|
9289
9290
|
Ge(L);
|
|
9290
9291
|
} finally {
|
|
9291
9292
|
u == null || u(!1);
|
|
9292
9293
|
}
|
|
9293
9294
|
}
|
|
9294
|
-
function
|
|
9295
|
+
function G(K) {
|
|
9295
9296
|
R == null || R({
|
|
9296
|
-
actionData:
|
|
9297
|
+
actionData: K,
|
|
9297
9298
|
values: {
|
|
9298
9299
|
active_id: o == null ? void 0 : o.map((L) => L.id)[0],
|
|
9299
9300
|
active_ids: o == null ? void 0 : o.map((L) => L.id)
|
|
@@ -9312,14 +9313,14 @@ function kd(e) {
|
|
|
9312
9313
|
}
|
|
9313
9314
|
return /* @__PURE__ */ P(Ye, {
|
|
9314
9315
|
wrap: !0,
|
|
9315
|
-
children: [F && /* @__PURE__ */ P(
|
|
9316
|
+
children: [F && /* @__PURE__ */ P(te, {
|
|
9316
9317
|
children: [/* @__PURE__ */ n(Me, {}), vt(), vt()]
|
|
9317
|
-
}), C ? null : /* @__PURE__ */ P(
|
|
9318
|
+
}), C ? null : /* @__PURE__ */ P(te, {
|
|
9318
9319
|
children: [/* @__PURE__ */ n(Ad, {
|
|
9319
9320
|
disabled: l || a || F,
|
|
9320
9321
|
searchText: v,
|
|
9321
|
-
onSearch: (
|
|
9322
|
-
|
|
9322
|
+
onSearch: (K) => {
|
|
9323
|
+
K && K.trim().length > 0 ? g == null || g(K) : g == null || g(void 0);
|
|
9323
9324
|
}
|
|
9324
9325
|
}), !C && /* @__PURE__ */ n(Ho, {
|
|
9325
9326
|
icon: /* @__PURE__ */ n(Qr, {
|
|
@@ -9341,7 +9342,7 @@ function kd(e) {
|
|
|
9341
9342
|
tooltip: $("duplicate"),
|
|
9342
9343
|
disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || F,
|
|
9343
9344
|
loading: l,
|
|
9344
|
-
onClick:
|
|
9345
|
+
onClick: U
|
|
9345
9346
|
}), /* @__PURE__ */ n(ze, {
|
|
9346
9347
|
icon: /* @__PURE__ */ n(Wn, {}),
|
|
9347
9348
|
tooltip: $("delete"),
|
|
@@ -9363,15 +9364,15 @@ function kd(e) {
|
|
|
9363
9364
|
disabled: l || a || F,
|
|
9364
9365
|
loading: !1,
|
|
9365
9366
|
onClick: () => {
|
|
9366
|
-
var
|
|
9367
|
-
(
|
|
9367
|
+
var K;
|
|
9368
|
+
(K = f == null ? void 0 : f.current) == null || K.refreshResults();
|
|
9368
9369
|
}
|
|
9369
|
-
}), !C && /* @__PURE__ */ P(
|
|
9370
|
+
}), !C && /* @__PURE__ */ P(te, {
|
|
9370
9371
|
children: [vt(), /* @__PURE__ */ n(Xn, {
|
|
9371
9372
|
currentView: r,
|
|
9372
9373
|
availableViews: t,
|
|
9373
|
-
onChangeView: (
|
|
9374
|
-
V == null || V(r), i == null || i(
|
|
9374
|
+
onChangeView: (K) => {
|
|
9375
|
+
V == null || V(r), i == null || i(K);
|
|
9375
9376
|
},
|
|
9376
9377
|
previousView: b,
|
|
9377
9378
|
disabled: F
|
|
@@ -9381,24 +9382,24 @@ function kd(e) {
|
|
|
9381
9382
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || F,
|
|
9382
9383
|
tooltip: $("actions"),
|
|
9383
9384
|
items: w == null ? void 0 : w.action,
|
|
9384
|
-
onItemClick: (
|
|
9385
|
-
!
|
|
9385
|
+
onItemClick: (K) => {
|
|
9386
|
+
!K || G(K);
|
|
9386
9387
|
}
|
|
9387
9388
|
}), /* @__PURE__ */ n(Dt, {
|
|
9388
9389
|
icon: /* @__PURE__ */ n(Yn, {}),
|
|
9389
9390
|
disabled: !(o && (o == null ? void 0 : o.length) > 0) || F,
|
|
9390
9391
|
tooltip: $("reports"),
|
|
9391
9392
|
items: w == null ? void 0 : w.print,
|
|
9392
|
-
onItemClick: (
|
|
9393
|
-
!
|
|
9394
|
-
...
|
|
9393
|
+
onItemClick: (K) => {
|
|
9394
|
+
!K || G({
|
|
9395
|
+
...K,
|
|
9395
9396
|
datas: {
|
|
9396
|
-
...
|
|
9397
|
+
...K.datas || {},
|
|
9397
9398
|
ids: o.map((L) => L.id)
|
|
9398
9399
|
}
|
|
9399
9400
|
});
|
|
9400
9401
|
}
|
|
9401
|
-
}), T && /* @__PURE__ */ P(
|
|
9402
|
+
}), T && /* @__PURE__ */ P(te, {
|
|
9402
9403
|
children: [vt(), /* @__PURE__ */ n(Dt, {
|
|
9403
9404
|
icon: /* @__PURE__ */ n(Br, {
|
|
9404
9405
|
component: () => /* @__PURE__ */ P("svg", {
|
|
@@ -9436,10 +9437,10 @@ function kd(e) {
|
|
|
9436
9437
|
id: "export",
|
|
9437
9438
|
name: $("advancedExport")
|
|
9438
9439
|
}],
|
|
9439
|
-
onItemClick: (
|
|
9440
|
-
if (
|
|
9440
|
+
onItemClick: (K) => {
|
|
9441
|
+
if (K.id === "print_screen") {
|
|
9441
9442
|
let L = (o == null ? void 0 : o.map((B) => B.id)) || [];
|
|
9442
|
-
L.length === 0 && (L = (A == null ? void 0 : A.map((B) => B.id)) || []),
|
|
9443
|
+
L.length === 0 && (L = (A == null ? void 0 : A.map((B) => B.id)) || []), G({
|
|
9443
9444
|
id: -1,
|
|
9444
9445
|
model: d,
|
|
9445
9446
|
report_name: "printscreen.list",
|
|
@@ -9492,8 +9493,8 @@ const Md = (e) => {
|
|
|
9492
9493
|
} = e, {
|
|
9493
9494
|
currentView: p,
|
|
9494
9495
|
setPreviousView: h
|
|
9495
|
-
} =
|
|
9496
|
-
return t ? /* @__PURE__ */ P(
|
|
9496
|
+
} = W(et);
|
|
9497
|
+
return t ? /* @__PURE__ */ P(te, {
|
|
9497
9498
|
children: [/* @__PURE__ */ n(yn, {
|
|
9498
9499
|
children: /* @__PURE__ */ n(kd, {
|
|
9499
9500
|
toolbar: a == null ? void 0 : a.toolbar,
|
|
@@ -9545,9 +9546,9 @@ function $d() {
|
|
|
9545
9546
|
dashboardRef: t,
|
|
9546
9547
|
moveItemsEnabled: r,
|
|
9547
9548
|
setMoveItemsEnabled: i
|
|
9548
|
-
} =
|
|
9549
|
+
} = W(Qn), {
|
|
9549
9550
|
t: o
|
|
9550
|
-
} =
|
|
9551
|
+
} = W(ve);
|
|
9551
9552
|
return /* @__PURE__ */ P(Ye, {
|
|
9552
9553
|
wrap: !0,
|
|
9553
9554
|
children: [/* @__PURE__ */ n(ze, {
|
|
@@ -9590,7 +9591,7 @@ function Ld() {
|
|
|
9590
9591
|
const Nd = (e) => {
|
|
9591
9592
|
const {
|
|
9592
9593
|
dashboardData: t
|
|
9593
|
-
} = e, r =
|
|
9594
|
+
} = e, r = me(), i = W(at), {
|
|
9594
9595
|
openShortcut: o
|
|
9595
9596
|
} = i || {};
|
|
9596
9597
|
return t ? /* @__PURE__ */ P(Ed, {
|
|
@@ -9641,39 +9642,39 @@ function Hd(e, t) {
|
|
|
9641
9642
|
action_type: p,
|
|
9642
9643
|
treeExpandable: h = !1,
|
|
9643
9644
|
limit: g
|
|
9644
|
-
} = e, [v, F] = _(), [V, b] = _([]), [A, D] = _(!0), E = m || void 0, [x, C] = _(E), [w, T] = _([]), [$, M] = _(), [S, R] = _([]), [k, I] = _(), [N, O] = _(0), [j,
|
|
9645
|
+
} = e, [v, F] = _(), [V, b] = _([]), [A, D] = _(!0), E = m || void 0, [x, C] = _(E), [w, T] = _([]), [$, M] = _(), [S, R] = _([]), [k, I] = _(), [N, O] = _(0), [j, U] = _(!1), [G, J] = _(!1), [K, L] = _(), {
|
|
9645
9646
|
t: B
|
|
9646
|
-
} =
|
|
9647
|
-
setCurrentView:
|
|
9647
|
+
} = W(ve) || {}, ee = me(), re = me(), oe = W(at), {
|
|
9648
|
+
setCurrentView: Z,
|
|
9648
9649
|
setCurrentId: z,
|
|
9649
|
-
tabs:
|
|
9650
|
+
tabs: ue,
|
|
9650
9651
|
activeKey: be,
|
|
9651
9652
|
openAction: Ee,
|
|
9652
9653
|
onRemoveTab: Ve
|
|
9653
|
-
} =
|
|
9654
|
-
Wi("ctrl+g,command+g", (
|
|
9655
|
-
|
|
9656
|
-
}, [be,
|
|
9657
|
-
function Pe(
|
|
9658
|
-
C(
|
|
9654
|
+
} = oe || {};
|
|
9655
|
+
Wi("ctrl+g,command+g", (Q) => {
|
|
9656
|
+
Q.preventDefault(), je();
|
|
9657
|
+
}, [be, ue, v, $, S]);
|
|
9658
|
+
function Pe(Q) {
|
|
9659
|
+
C(Q), z == null || z(Q);
|
|
9659
9660
|
}
|
|
9660
|
-
function We(
|
|
9661
|
-
F(
|
|
9661
|
+
function We(Q) {
|
|
9662
|
+
F(Q), Z == null || Z(Q);
|
|
9662
9663
|
}
|
|
9663
9664
|
xt(t, () => ({
|
|
9664
9665
|
canWeClose: de
|
|
9665
9666
|
}));
|
|
9666
|
-
const
|
|
9667
|
+
const se = async () => {
|
|
9667
9668
|
D(!0);
|
|
9668
|
-
const
|
|
9669
|
+
const Q = [], De = [];
|
|
9669
9670
|
for (const le of s) {
|
|
9670
|
-
const [
|
|
9671
|
+
const [he, Ue] = le;
|
|
9671
9672
|
Ue !== "dashboard" ? De.push({
|
|
9672
9673
|
viewTuple: le,
|
|
9673
9674
|
promise: H.getHandler().getView({
|
|
9674
9675
|
model: i,
|
|
9675
9676
|
type: Ue,
|
|
9676
|
-
id:
|
|
9677
|
+
id: he,
|
|
9677
9678
|
context: o
|
|
9678
9679
|
})
|
|
9679
9680
|
}) : De.push({
|
|
@@ -9684,24 +9685,24 @@ function Hd(e, t) {
|
|
|
9684
9685
|
for (const le of Ae) {
|
|
9685
9686
|
if (!le)
|
|
9686
9687
|
continue;
|
|
9687
|
-
const [,
|
|
9688
|
+
const [, he] = le.viewTuple;
|
|
9688
9689
|
let Ue = le.info;
|
|
9689
|
-
switch (
|
|
9690
|
+
switch (he) {
|
|
9690
9691
|
case "dashboard": {
|
|
9691
|
-
const
|
|
9692
|
-
const [,
|
|
9693
|
-
return
|
|
9692
|
+
const fe = s.find((Ke) => {
|
|
9693
|
+
const [, X] = Ke;
|
|
9694
|
+
return X === "form";
|
|
9694
9695
|
});
|
|
9695
9696
|
let rt;
|
|
9696
|
-
|
|
9697
|
+
fe && (rt = {
|
|
9697
9698
|
action_id: y,
|
|
9698
9699
|
action_type: p,
|
|
9699
9700
|
name: a,
|
|
9700
9701
|
res_id: o.active_id,
|
|
9701
9702
|
res_model: i,
|
|
9702
|
-
view_id:
|
|
9703
|
-
view_type:
|
|
9704
|
-
}),
|
|
9703
|
+
view_id: fe[0],
|
|
9704
|
+
view_type: fe[1]
|
|
9705
|
+
}), Q.push({
|
|
9705
9706
|
type: "dashboard",
|
|
9706
9707
|
id: o.active_id,
|
|
9707
9708
|
model: i,
|
|
@@ -9711,70 +9712,70 @@ function Hd(e, t) {
|
|
|
9711
9712
|
break;
|
|
9712
9713
|
}
|
|
9713
9714
|
case "form": {
|
|
9714
|
-
|
|
9715
|
+
Q.push({
|
|
9715
9716
|
...Ue,
|
|
9716
|
-
type:
|
|
9717
|
+
type: he
|
|
9717
9718
|
});
|
|
9718
9719
|
break;
|
|
9719
9720
|
}
|
|
9720
9721
|
case "tree": {
|
|
9721
|
-
|
|
9722
|
+
Q.push({
|
|
9722
9723
|
...Ue,
|
|
9723
9724
|
isExpandable: h,
|
|
9724
|
-
type:
|
|
9725
|
+
type: he
|
|
9725
9726
|
});
|
|
9726
9727
|
break;
|
|
9727
9728
|
}
|
|
9728
9729
|
case "graph": {
|
|
9729
|
-
|
|
9730
|
+
Q.push({
|
|
9730
9731
|
...Ue,
|
|
9731
|
-
type:
|
|
9732
|
+
type: he
|
|
9732
9733
|
});
|
|
9733
9734
|
break;
|
|
9734
9735
|
}
|
|
9735
9736
|
}
|
|
9736
9737
|
}
|
|
9737
9738
|
let ke;
|
|
9738
|
-
!d &&
|
|
9739
|
-
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), Ve == null || Ve(u)), We(ke), b(
|
|
9739
|
+
!d && Q.find((le) => le.type === "tree") ? ke = Q.find((he) => he.type === "tree") : d ? ke = Q.find((he) => d.id ? he.type === d.type && he.view_id === d.id : he.type === d.type) : ke = Q.find((he) => he.type === "form"), ke || (Ge(`Error determining the first view to show for model ${i}.
|
|
9740
|
+
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), Ve == null || Ve(u)), We(ke), b(Q), D(!1);
|
|
9740
9741
|
};
|
|
9741
9742
|
l({
|
|
9742
9743
|
tabKey: u,
|
|
9743
9744
|
canWeClose: de
|
|
9744
9745
|
}), pe(() => {
|
|
9745
|
-
const
|
|
9746
|
-
We(De ||
|
|
9746
|
+
const Q = V.find((Ae) => Ae.type === "tree"), De = V.find((Ae) => d.id ? Ae.type === d.type && Ae.view_id === d.id : Ae.type === d.type);
|
|
9747
|
+
We(De || Q), m ? z == null || z(E) : (Pe(void 0), M(void 0)), se();
|
|
9747
9748
|
}, [i, s, m]), pe(() => {
|
|
9748
|
-
be === u && (z == null || z(x),
|
|
9749
|
-
}, [
|
|
9749
|
+
be === u && (z == null || z(x), Z == null || Z(v));
|
|
9750
|
+
}, [ue, be]);
|
|
9750
9751
|
async function de() {
|
|
9751
|
-
return v && v.type === "form" ? await
|
|
9752
|
+
return v && v.type === "form" ? await ee.current.cancelUnsavedChanges() : !0;
|
|
9752
9753
|
}
|
|
9753
9754
|
async function je() {
|
|
9754
|
-
be === u && (v.type === "form" && !await
|
|
9755
|
+
be === u && (v.type === "form" && !await ee.current.cancelUnsavedChanges() || U(!0));
|
|
9755
9756
|
}
|
|
9756
|
-
async function we(
|
|
9757
|
+
async function we(Q) {
|
|
9757
9758
|
var le;
|
|
9758
9759
|
J(!0);
|
|
9759
|
-
const De = S.findIndex((
|
|
9760
|
+
const De = S.findIndex((he) => he.id === Q);
|
|
9760
9761
|
let Ae;
|
|
9761
9762
|
if (De === -1) {
|
|
9762
9763
|
try {
|
|
9763
9764
|
Ae = (le = await H.getHandler().readObjects({
|
|
9764
9765
|
model: i,
|
|
9765
|
-
ids: [
|
|
9766
|
+
ids: [Q],
|
|
9766
9767
|
context: o
|
|
9767
9768
|
})) == null ? void 0 : le[0];
|
|
9768
9769
|
} catch {
|
|
9769
9770
|
}
|
|
9770
9771
|
if (!Ae) {
|
|
9771
|
-
J(!1),
|
|
9772
|
+
J(!1), U(!1), ct(B("idNotFound"));
|
|
9772
9773
|
return;
|
|
9773
9774
|
}
|
|
9774
9775
|
} else
|
|
9775
9776
|
Ae = S[De];
|
|
9776
|
-
J(!1),
|
|
9777
|
-
const ke = s.find((
|
|
9777
|
+
J(!1), U(!1);
|
|
9778
|
+
const ke = s.find((he) => he[1] === "form");
|
|
9778
9779
|
Ee({
|
|
9779
9780
|
domain: [],
|
|
9780
9781
|
context: o,
|
|
@@ -9788,18 +9789,18 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9788
9789
|
},
|
|
9789
9790
|
action_id: y,
|
|
9790
9791
|
action_type: p,
|
|
9791
|
-
res_id:
|
|
9792
|
+
res_id: Q
|
|
9792
9793
|
});
|
|
9793
9794
|
}
|
|
9794
9795
|
function Re() {
|
|
9795
|
-
return V.map((
|
|
9796
|
-
switch (
|
|
9796
|
+
return V.map((Q) => {
|
|
9797
|
+
switch (Q.type) {
|
|
9797
9798
|
case "form":
|
|
9798
9799
|
return /* @__PURE__ */ n(Vd, {
|
|
9799
|
-
formRef:
|
|
9800
|
+
formRef: ee,
|
|
9800
9801
|
currentId: x,
|
|
9801
|
-
visible: v.type ===
|
|
9802
|
-
formView:
|
|
9802
|
+
visible: v.type === Q.type && v.view_id === Q.view_id,
|
|
9803
|
+
formView: Q,
|
|
9803
9804
|
model: i,
|
|
9804
9805
|
context: o,
|
|
9805
9806
|
domain: r,
|
|
@@ -9808,48 +9809,48 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9808
9809
|
results: S,
|
|
9809
9810
|
setResults: R,
|
|
9810
9811
|
setCurrentItemIndex: M
|
|
9811
|
-
}, `${
|
|
9812
|
+
}, `${Q.type}-${Q.view_id}`);
|
|
9812
9813
|
case "tree":
|
|
9813
9814
|
return /* @__PURE__ */ n(Md, {
|
|
9814
|
-
visible: v.type ===
|
|
9815
|
+
visible: v.type === Q.type && v.view_id === Q.view_id,
|
|
9815
9816
|
limit: g,
|
|
9816
9817
|
model: i,
|
|
9817
9818
|
context: o,
|
|
9818
9819
|
domain: r,
|
|
9819
9820
|
formView: V.find((De) => De.type === "form"),
|
|
9820
|
-
treeView:
|
|
9821
|
-
searchTreeRef:
|
|
9822
|
-
searchTreeNameSearch:
|
|
9821
|
+
treeView: Q,
|
|
9822
|
+
searchTreeRef: re,
|
|
9823
|
+
searchTreeNameSearch: K,
|
|
9823
9824
|
availableViews: V,
|
|
9824
9825
|
results: S,
|
|
9825
9826
|
setCurrentItemIndex: M,
|
|
9826
9827
|
setCurrentId: Pe,
|
|
9827
9828
|
setCurrentView: We
|
|
9828
|
-
}, `${
|
|
9829
|
+
}, `${Q.type}-${Q.view_id}`);
|
|
9829
9830
|
case "graph":
|
|
9830
9831
|
return /* @__PURE__ */ n(Dd, {
|
|
9831
|
-
visible: v.type ===
|
|
9832
|
-
viewData:
|
|
9832
|
+
visible: v.type === Q.type && v.view_id === Q.view_id,
|
|
9833
|
+
viewData: Q,
|
|
9833
9834
|
model: i,
|
|
9834
9835
|
context: o,
|
|
9835
9836
|
domain: r,
|
|
9836
9837
|
treeView: V.find((De) => De.type === "tree"),
|
|
9837
9838
|
formView: V.find((De) => De.type === "form")
|
|
9838
|
-
}, `${
|
|
9839
|
+
}, `${Q.type}-${Q.view_id}`);
|
|
9839
9840
|
case "dashboard":
|
|
9840
9841
|
return /* @__PURE__ */ n(Nd, {
|
|
9841
|
-
dashboardData:
|
|
9842
|
-
}, `${
|
|
9842
|
+
dashboardData: Q
|
|
9843
|
+
}, `${Q.type}-${Q.view_id}`);
|
|
9843
9844
|
}
|
|
9844
9845
|
});
|
|
9845
9846
|
}
|
|
9846
9847
|
function Ze() {
|
|
9847
9848
|
if (x === void 0 && v.type === "form")
|
|
9848
|
-
|
|
9849
|
+
ee.current.clearAndReload();
|
|
9849
9850
|
else {
|
|
9850
9851
|
Pe(void 0);
|
|
9851
|
-
const
|
|
9852
|
-
We(
|
|
9852
|
+
const Q = V.find((De) => De.type === "form");
|
|
9853
|
+
We(Q);
|
|
9853
9854
|
}
|
|
9854
9855
|
}
|
|
9855
9856
|
return A ? /* @__PURE__ */ n(Me, {}) : v ? /* @__PURE__ */ P(pl, {
|
|
@@ -9857,8 +9858,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9857
9858
|
currentView: v,
|
|
9858
9859
|
setCurrentView: We,
|
|
9859
9860
|
availableViews: V,
|
|
9860
|
-
formRef:
|
|
9861
|
-
searchTreeRef:
|
|
9861
|
+
formRef: ee,
|
|
9862
|
+
searchTreeRef: re,
|
|
9862
9863
|
onNewClicked: Ze,
|
|
9863
9864
|
currentId: x,
|
|
9864
9865
|
setCurrentId: Pe,
|
|
@@ -9874,15 +9875,15 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9874
9875
|
selectedRowItems: w,
|
|
9875
9876
|
setSelectedRowItems: T,
|
|
9876
9877
|
setSearchTreeNameSearch: L,
|
|
9877
|
-
searchTreeNameSearch:
|
|
9878
|
+
searchTreeNameSearch: K,
|
|
9878
9879
|
goToResourceId: we,
|
|
9879
9880
|
limit: g,
|
|
9880
9881
|
children: [Re(), /* @__PURE__ */ n(Td, {
|
|
9881
9882
|
visible: j,
|
|
9882
9883
|
onIdSubmitted: we,
|
|
9883
|
-
isSearching:
|
|
9884
|
+
isSearching: G,
|
|
9884
9885
|
onCancel: () => {
|
|
9885
|
-
|
|
9886
|
+
U(!1);
|
|
9886
9887
|
}
|
|
9887
9888
|
})]
|
|
9888
9889
|
}) : null;
|
|
@@ -10050,17 +10051,17 @@ function qd(e) {
|
|
|
10050
10051
|
domain: s = [],
|
|
10051
10052
|
visible: a = !0,
|
|
10052
10053
|
parentContext: l = {}
|
|
10053
|
-
} = e, [u, d] = _(!1), [f, c] = _(!1), [m, y] = _(), [p, h] = _(), [g, v] = _(), [F, V] = _(1), [b, A] = _(0), D =
|
|
10054
|
-
|
|
10055
|
-
},
|
|
10056
|
-
const z =
|
|
10054
|
+
} = e, [u, d] = _(!1), [f, c] = _(!1), [m, y] = _(), [p, h] = _(), [g, v] = _(), [F, V] = _(1), [b, A] = _(0), D = me(Gd), E = me([]), [x, C] = _(0), [w, T] = _([]), [$, M] = _(void 0), [S, R] = _(), [k, I] = _(), [N, O] = _(), [j, U] = _(!1), G = me([]), J = (z) => {
|
|
10055
|
+
U(!0), V(z), A((z - 1) * D.current);
|
|
10056
|
+
}, K = async () => {
|
|
10057
|
+
const z = G.current.length > 0 ? G.current : s, ue = hn(E.current, z), {
|
|
10057
10058
|
colors: be
|
|
10058
10059
|
} = _t(p), {
|
|
10059
10060
|
totalItems: Ee,
|
|
10060
10061
|
results: Ve,
|
|
10061
10062
|
attrsEvaluated: Pe
|
|
10062
10063
|
} = await H.getHandler().searchForTree({
|
|
10063
|
-
params:
|
|
10064
|
+
params: ue,
|
|
10064
10065
|
limit: D.current,
|
|
10065
10066
|
offset: b,
|
|
10066
10067
|
model: m,
|
|
@@ -10079,12 +10080,12 @@ function qd(e) {
|
|
|
10079
10080
|
...g.fields
|
|
10080
10081
|
}
|
|
10081
10082
|
});
|
|
10082
|
-
|
|
10083
|
-
const
|
|
10084
|
-
C(
|
|
10083
|
+
U(!1), T(We);
|
|
10084
|
+
const se = await Ee;
|
|
10085
|
+
C(se);
|
|
10085
10086
|
}, L = async () => {
|
|
10086
10087
|
try {
|
|
10087
|
-
|
|
10088
|
+
U(!0), await K();
|
|
10088
10089
|
} catch (z) {
|
|
10089
10090
|
I(JSON.stringify(z));
|
|
10090
10091
|
}
|
|
@@ -10095,19 +10096,19 @@ function qd(e) {
|
|
|
10095
10096
|
const B = async (z) => {
|
|
10096
10097
|
c(!1), d(!0), O(void 0);
|
|
10097
10098
|
try {
|
|
10098
|
-
z === "action" ? await
|
|
10099
|
-
} catch (
|
|
10100
|
-
O(
|
|
10099
|
+
z === "action" ? await ee() : await re(), c(!0);
|
|
10100
|
+
} catch (ue) {
|
|
10101
|
+
O(ue);
|
|
10101
10102
|
} finally {
|
|
10102
10103
|
d(!1);
|
|
10103
10104
|
}
|
|
10104
|
-
},
|
|
10105
|
+
}, ee = async () => {
|
|
10105
10106
|
const z = await H.getHandler().getViewsForAction({
|
|
10106
10107
|
action: t,
|
|
10107
10108
|
context: l
|
|
10108
10109
|
});
|
|
10109
|
-
|
|
10110
|
-
},
|
|
10110
|
+
G.current = z.domain, v(z.views.get("form")), h(z.views.get("tree")), y(z.model), D.current = z.limit;
|
|
10111
|
+
}, re = async () => {
|
|
10111
10112
|
y(r);
|
|
10112
10113
|
const z = await H.getHandler().getView({
|
|
10113
10114
|
model: r,
|
|
@@ -10115,27 +10116,27 @@ function qd(e) {
|
|
|
10115
10116
|
context: l
|
|
10116
10117
|
});
|
|
10117
10118
|
v(z);
|
|
10118
|
-
const
|
|
10119
|
+
const ue = await H.getHandler().getView({
|
|
10119
10120
|
model: r,
|
|
10120
10121
|
type: "tree",
|
|
10121
10122
|
id: i,
|
|
10122
10123
|
context: l
|
|
10123
10124
|
});
|
|
10124
|
-
h(
|
|
10125
|
+
h(ue);
|
|
10125
10126
|
};
|
|
10126
10127
|
pe(() => {
|
|
10127
10128
|
t ? B("action") : r && B("model");
|
|
10128
10129
|
}, [t, r]);
|
|
10129
|
-
const
|
|
10130
|
+
const oe = (z) => {
|
|
10130
10131
|
const {
|
|
10131
|
-
id:
|
|
10132
|
+
id: ue
|
|
10132
10133
|
} = z;
|
|
10133
10134
|
o({
|
|
10134
|
-
id:
|
|
10135
|
+
id: ue,
|
|
10135
10136
|
model: m,
|
|
10136
10137
|
treeView: p
|
|
10137
10138
|
});
|
|
10138
|
-
},
|
|
10139
|
+
}, Z = () => !p || !g ? null : /* @__PURE__ */ P("div", {
|
|
10139
10140
|
style: {
|
|
10140
10141
|
overflowY: "scroll"
|
|
10141
10142
|
},
|
|
@@ -10153,12 +10154,12 @@ function qd(e) {
|
|
|
10153
10154
|
results: w,
|
|
10154
10155
|
onRequestPageChange: J,
|
|
10155
10156
|
loading: j,
|
|
10156
|
-
onRowClicked:
|
|
10157
|
+
onRowClicked: oe,
|
|
10157
10158
|
colorsForResults: $,
|
|
10158
10159
|
sorter: S,
|
|
10159
10160
|
onChangeSort: (z) => {
|
|
10160
10161
|
R == null || R(z);
|
|
10161
|
-
const
|
|
10162
|
+
const ue = It({
|
|
10162
10163
|
resultsToSort: w,
|
|
10163
10164
|
sorter: z,
|
|
10164
10165
|
fields: {
|
|
@@ -10166,7 +10167,7 @@ function qd(e) {
|
|
|
10166
10167
|
...g.fields
|
|
10167
10168
|
}
|
|
10168
10169
|
});
|
|
10169
|
-
T(
|
|
10170
|
+
T(ue);
|
|
10170
10171
|
},
|
|
10171
10172
|
context: l
|
|
10172
10173
|
})]
|
|
@@ -10180,7 +10181,7 @@ function qd(e) {
|
|
|
10180
10181
|
style: {
|
|
10181
10182
|
padding: "2rem"
|
|
10182
10183
|
}
|
|
10183
|
-
}) :
|
|
10184
|
+
}) : Z();
|
|
10184
10185
|
}
|
|
10185
10186
|
const zd = (e) => {
|
|
10186
10187
|
const {
|
|
@@ -10220,7 +10221,7 @@ function Jd(e, t) {
|
|
|
10220
10221
|
setIsLoading: m,
|
|
10221
10222
|
openAction: y,
|
|
10222
10223
|
moveItemsEnabled: p
|
|
10223
|
-
} =
|
|
10224
|
+
} = W(Qn), h = me(), g = me();
|
|
10224
10225
|
pe(() => {
|
|
10225
10226
|
v();
|
|
10226
10227
|
}, [r, o, i]), xt(t, () => ({
|
|
@@ -10372,15 +10373,15 @@ function Jd(e, t) {
|
|
|
10372
10373
|
views: N,
|
|
10373
10374
|
model: O,
|
|
10374
10375
|
context: j,
|
|
10375
|
-
domain:
|
|
10376
|
-
initialView:
|
|
10376
|
+
domain: U,
|
|
10377
|
+
initialView: G,
|
|
10377
10378
|
limit: J
|
|
10378
10379
|
} = w;
|
|
10379
|
-
let
|
|
10380
|
+
let K = {};
|
|
10380
10381
|
try {
|
|
10381
|
-
|
|
10382
|
+
K = JSON.parse($.replace(/'/g, '"'));
|
|
10382
10383
|
} catch {
|
|
10383
|
-
|
|
10384
|
+
K = {
|
|
10384
10385
|
x: C * 2,
|
|
10385
10386
|
y: 0,
|
|
10386
10387
|
w: 2,
|
|
@@ -10388,53 +10389,53 @@ function Jd(e, t) {
|
|
|
10388
10389
|
};
|
|
10389
10390
|
}
|
|
10390
10391
|
let L = null;
|
|
10391
|
-
if ((
|
|
10392
|
+
if ((G == null ? void 0 : G.type) === "graph")
|
|
10392
10393
|
L = /* @__PURE__ */ n(gn, {
|
|
10393
|
-
view_id: N.filter((
|
|
10394
|
+
view_id: N.filter((re) => re[1] === "graph")[0][0],
|
|
10394
10395
|
model: O,
|
|
10395
10396
|
context: j,
|
|
10396
|
-
domain:
|
|
10397
|
+
domain: U,
|
|
10397
10398
|
limit: J
|
|
10398
10399
|
});
|
|
10399
|
-
else if ((
|
|
10400
|
+
else if ((G == null ? void 0 : G.type) === "form")
|
|
10400
10401
|
L = /* @__PURE__ */ n(zd, {
|
|
10401
10402
|
model: O,
|
|
10402
|
-
actionDomain:
|
|
10403
|
+
actionDomain: U
|
|
10403
10404
|
});
|
|
10404
|
-
else if ((
|
|
10405
|
+
else if ((G == null ? void 0 : G.type) === "tree")
|
|
10405
10406
|
L = /* @__PURE__ */ n(qd, {
|
|
10406
10407
|
model: O,
|
|
10407
|
-
domain:
|
|
10408
|
-
view_id: N.filter((
|
|
10409
|
-
onRowClicked: (
|
|
10410
|
-
const
|
|
10411
|
-
const [, z] =
|
|
10408
|
+
domain: U,
|
|
10409
|
+
view_id: N.filter((re) => re[1] === "tree")[0][0],
|
|
10410
|
+
onRowClicked: (re) => {
|
|
10411
|
+
const oe = N.find((Z) => {
|
|
10412
|
+
const [, z] = Z;
|
|
10412
10413
|
return z === "form";
|
|
10413
10414
|
});
|
|
10414
|
-
if (
|
|
10415
|
-
const [
|
|
10416
|
-
actionId:
|
|
10415
|
+
if (oe) {
|
|
10416
|
+
const [Z, z] = oe, {
|
|
10417
|
+
actionId: ue,
|
|
10417
10418
|
actionType: be,
|
|
10418
10419
|
title: Ee,
|
|
10419
10420
|
model: Ve
|
|
10420
10421
|
} = w, Pe = {
|
|
10421
|
-
action_id:
|
|
10422
|
+
action_id: ue,
|
|
10422
10423
|
action_type: be,
|
|
10423
10424
|
name: Ee,
|
|
10424
|
-
res_id:
|
|
10425
|
+
res_id: re.id,
|
|
10425
10426
|
res_model: Ve,
|
|
10426
|
-
view_id:
|
|
10427
|
+
view_id: Z,
|
|
10427
10428
|
view_type: z
|
|
10428
10429
|
};
|
|
10429
10430
|
y(Pe);
|
|
10430
10431
|
}
|
|
10431
10432
|
}
|
|
10432
10433
|
});
|
|
10433
|
-
else if (
|
|
10434
|
-
const
|
|
10435
|
-
...
|
|
10436
|
-
id:
|
|
10437
|
-
} :
|
|
10434
|
+
else if (G !== void 0) {
|
|
10435
|
+
const re = G && Array.isArray(G.id) ? {
|
|
10436
|
+
...G,
|
|
10437
|
+
id: G.id[0]
|
|
10438
|
+
} : G;
|
|
10438
10439
|
L = /* @__PURE__ */ n(Bo, {
|
|
10439
10440
|
action_id: S,
|
|
10440
10441
|
action_type: R,
|
|
@@ -10443,39 +10444,39 @@ function Jd(e, t) {
|
|
|
10443
10444
|
views: N,
|
|
10444
10445
|
model: O,
|
|
10445
10446
|
context: j,
|
|
10446
|
-
domain:
|
|
10447
|
+
domain: U,
|
|
10447
10448
|
setCanWeClose: () => {
|
|
10448
10449
|
},
|
|
10449
|
-
initialView:
|
|
10450
|
+
initialView: re,
|
|
10450
10451
|
limit: J
|
|
10451
10452
|
});
|
|
10452
10453
|
}
|
|
10453
10454
|
let B;
|
|
10454
|
-
const
|
|
10455
|
-
const [,
|
|
10456
|
-
return
|
|
10455
|
+
const ee = N.find((re) => {
|
|
10456
|
+
const [, oe] = re;
|
|
10457
|
+
return oe === "tree";
|
|
10457
10458
|
});
|
|
10458
|
-
if (
|
|
10459
|
-
const [
|
|
10460
|
-
actionId:
|
|
10459
|
+
if (ee) {
|
|
10460
|
+
const [re, oe] = ee, {
|
|
10461
|
+
actionId: Z,
|
|
10461
10462
|
actionType: z,
|
|
10462
|
-
title:
|
|
10463
|
+
title: ue,
|
|
10463
10464
|
model: be
|
|
10464
10465
|
} = w;
|
|
10465
10466
|
B = {
|
|
10466
|
-
action_id:
|
|
10467
|
+
action_id: Z,
|
|
10467
10468
|
action_type: z,
|
|
10468
|
-
name:
|
|
10469
|
+
name: ue,
|
|
10469
10470
|
res_id: !1,
|
|
10470
10471
|
res_model: be,
|
|
10471
|
-
view_id:
|
|
10472
|
-
view_type:
|
|
10472
|
+
view_id: re,
|
|
10473
|
+
view_type: oe
|
|
10473
10474
|
};
|
|
10474
10475
|
}
|
|
10475
10476
|
return /* @__PURE__ */ n(Ud, {
|
|
10476
10477
|
id: M,
|
|
10477
10478
|
title: I,
|
|
10478
|
-
parms:
|
|
10479
|
+
parms: K,
|
|
10479
10480
|
action: B,
|
|
10480
10481
|
openAction: y,
|
|
10481
10482
|
children: L
|
|
@@ -10507,7 +10508,7 @@ const Zd = bt(Jd), Xd = (e) => {
|
|
|
10507
10508
|
readOnly: p,
|
|
10508
10509
|
field: h,
|
|
10509
10510
|
columns: g
|
|
10510
|
-
} = r, v =
|
|
10511
|
+
} = r, v = W(Ne), {
|
|
10511
10512
|
getContext: F
|
|
10512
10513
|
} = v || {};
|
|
10513
10514
|
St(() => {
|
|
@@ -10583,7 +10584,7 @@ const Zd = bt(Jd), Xd = (e) => {
|
|
|
10583
10584
|
});
|
|
10584
10585
|
}), V(C);
|
|
10585
10586
|
};
|
|
10586
|
-
return f && a.length === 0 ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(
|
|
10587
|
+
return f && a.length === 0 ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(te, {
|
|
10587
10588
|
children: /* @__PURE__ */ P("div", {
|
|
10588
10589
|
className: "flex flex-row",
|
|
10589
10590
|
children: [/* @__PURE__ */ n(Pt.Group, {
|
|
@@ -10725,7 +10726,7 @@ const Zd = bt(Jd), Xd = (e) => {
|
|
|
10725
10726
|
} = e, {
|
|
10726
10727
|
selectionValues: i,
|
|
10727
10728
|
errorField: o
|
|
10728
|
-
} = t, s =
|
|
10729
|
+
} = t, s = W(Ne), a = Array.from(i.entries()), l = a.map((f) => f[0]).indexOf(r);
|
|
10729
10730
|
let u = "process", d = "";
|
|
10730
10731
|
return o && (d = s.getFieldValue(o), d && (u = "error")), /* @__PURE__ */ n(ar, {
|
|
10731
10732
|
current: l,
|
|
@@ -10741,7 +10742,7 @@ const Zd = bt(Jd), Xd = (e) => {
|
|
|
10741
10742
|
} = e, {
|
|
10742
10743
|
lang: r,
|
|
10743
10744
|
height: i
|
|
10744
|
-
} = t, o =
|
|
10745
|
+
} = t, o = W(Ne), {
|
|
10745
10746
|
elementHasLostFocus: s
|
|
10746
10747
|
} = o || {};
|
|
10747
10748
|
return /* @__PURE__ */ n(ye, {
|
|
@@ -10762,7 +10763,7 @@ const Zd = bt(Jd), Xd = (e) => {
|
|
|
10762
10763
|
function uu() {
|
|
10763
10764
|
const {
|
|
10764
10765
|
t: e
|
|
10765
|
-
} =
|
|
10766
|
+
} = W(ve);
|
|
10766
10767
|
return /* @__PURE__ */ n(cu, {
|
|
10767
10768
|
className: "m-5 select-none",
|
|
10768
10769
|
children: /* @__PURE__ */ n(du, {
|
|
@@ -10782,7 +10783,7 @@ function fu(e, t) {
|
|
|
10782
10783
|
key: "welcome",
|
|
10783
10784
|
closable: !0,
|
|
10784
10785
|
content: /* @__PURE__ */ n(uu, {})
|
|
10785
|
-
}]), f =
|
|
10786
|
+
}]), f = me(/* @__PURE__ */ new Map()), c = me();
|
|
10786
10787
|
xt(t, () => ({
|
|
10787
10788
|
retrieveAndOpenAction: p,
|
|
10788
10789
|
openShortcut: v
|
|
@@ -10833,39 +10834,39 @@ function fu(e, t) {
|
|
|
10833
10834
|
name: N,
|
|
10834
10835
|
target: O,
|
|
10835
10836
|
view_type: j,
|
|
10836
|
-
limit:
|
|
10837
|
-
} = w,
|
|
10837
|
+
limit: U
|
|
10838
|
+
} = w, G = j === "tree", J = [];
|
|
10838
10839
|
for (const L of I) {
|
|
10839
|
-
const [B,
|
|
10840
|
+
const [B, ee] = L;
|
|
10840
10841
|
if (B)
|
|
10841
10842
|
J.push(L);
|
|
10842
|
-
else if (
|
|
10843
|
+
else if (ee === "dashboard")
|
|
10843
10844
|
J.push([void 0, "dashboard"]);
|
|
10844
10845
|
else {
|
|
10845
10846
|
const {
|
|
10846
|
-
view_id:
|
|
10847
|
+
view_id: re
|
|
10847
10848
|
} = await H.getHandler().getView({
|
|
10848
10849
|
model: k,
|
|
10849
|
-
type:
|
|
10850
|
+
type: ee,
|
|
10850
10851
|
id: B,
|
|
10851
10852
|
context: {
|
|
10852
10853
|
...o,
|
|
10853
10854
|
...S
|
|
10854
10855
|
}
|
|
10855
10856
|
});
|
|
10856
|
-
J.push([
|
|
10857
|
+
J.push([re, ee]);
|
|
10857
10858
|
}
|
|
10858
10859
|
}
|
|
10859
|
-
let
|
|
10860
|
+
let K;
|
|
10860
10861
|
if (E) {
|
|
10861
|
-
const [L, B] = J.find(([
|
|
10862
|
-
|
|
10862
|
+
const [L, B] = J.find(([ee, re]) => re === E);
|
|
10863
|
+
K = {
|
|
10863
10864
|
id: L,
|
|
10864
10865
|
type: B
|
|
10865
10866
|
};
|
|
10866
10867
|
} else {
|
|
10867
10868
|
const [L, B] = J[0];
|
|
10868
|
-
|
|
10869
|
+
K = {
|
|
10869
10870
|
id: L,
|
|
10870
10871
|
type: B
|
|
10871
10872
|
};
|
|
@@ -10880,14 +10881,14 @@ function fu(e, t) {
|
|
|
10880
10881
|
views: J,
|
|
10881
10882
|
title: N,
|
|
10882
10883
|
target: O,
|
|
10883
|
-
initialView:
|
|
10884
|
+
initialView: K,
|
|
10884
10885
|
action_type: T,
|
|
10885
10886
|
action_id: M,
|
|
10886
10887
|
values: A,
|
|
10887
10888
|
forced_values: D,
|
|
10888
10889
|
res_id: x,
|
|
10889
|
-
treeExpandable:
|
|
10890
|
-
limit:
|
|
10890
|
+
treeExpandable: G,
|
|
10891
|
+
limit: U
|
|
10891
10892
|
});
|
|
10892
10893
|
}
|
|
10893
10894
|
function h({
|
|
@@ -10989,15 +10990,15 @@ function fu(e, t) {
|
|
|
10989
10990
|
view_type: I,
|
|
10990
10991
|
limit: N
|
|
10991
10992
|
} = w, O = I === "tree", j = [];
|
|
10992
|
-
for (const
|
|
10993
|
-
const [L, B] =
|
|
10993
|
+
for (const K of S) {
|
|
10994
|
+
const [L, B] = K;
|
|
10994
10995
|
if (L)
|
|
10995
|
-
j.push(
|
|
10996
|
+
j.push(K);
|
|
10996
10997
|
else if (B === "dashboard")
|
|
10997
10998
|
j.push([void 0, "dashboard"]);
|
|
10998
10999
|
else {
|
|
10999
11000
|
const {
|
|
11000
|
-
view_id:
|
|
11001
|
+
view_id: ee
|
|
11001
11002
|
} = await H.getHandler().getView({
|
|
11002
11003
|
model: M,
|
|
11003
11004
|
type: B,
|
|
@@ -11007,18 +11008,18 @@ function fu(e, t) {
|
|
|
11007
11008
|
...T
|
|
11008
11009
|
}
|
|
11009
11010
|
});
|
|
11010
|
-
j.push([
|
|
11011
|
+
j.push([ee, B]);
|
|
11011
11012
|
}
|
|
11012
11013
|
}
|
|
11013
|
-
let
|
|
11014
|
+
let U, G;
|
|
11014
11015
|
if (x == null) {
|
|
11015
|
-
const
|
|
11016
|
-
|
|
11016
|
+
const K = j.find((L) => L[0] === void 0);
|
|
11017
|
+
U = void 0, G = K[1];
|
|
11017
11018
|
} else
|
|
11018
|
-
[
|
|
11019
|
+
[U, G] = j.find((K) => K[0] === void 0 ? !1 : K[0] === x);
|
|
11019
11020
|
const J = {
|
|
11020
|
-
id:
|
|
11021
|
-
type:
|
|
11021
|
+
id: U,
|
|
11022
|
+
type: G
|
|
11022
11023
|
};
|
|
11023
11024
|
V({
|
|
11024
11025
|
domain: $,
|
|
@@ -11225,13 +11226,13 @@ function hu(e) {
|
|
|
11225
11226
|
});
|
|
11226
11227
|
}
|
|
11227
11228
|
function Yu() {
|
|
11228
|
-
const e =
|
|
11229
|
+
const e = W(at), {
|
|
11229
11230
|
activeKey: t,
|
|
11230
11231
|
tabs: r,
|
|
11231
11232
|
onRemoveTab: i,
|
|
11232
11233
|
onChangeTab: o
|
|
11233
11234
|
} = e || {};
|
|
11234
|
-
return /* @__PURE__ */ n(
|
|
11235
|
+
return /* @__PURE__ */ n(te, {
|
|
11235
11236
|
children: r.map((s) => /* @__PURE__ */ n(hu, {
|
|
11236
11237
|
tabKey: s.key,
|
|
11237
11238
|
label: s.title,
|
|
@@ -11244,7 +11245,7 @@ function Yu() {
|
|
|
11244
11245
|
function pu(e) {
|
|
11245
11246
|
const {
|
|
11246
11247
|
tab: t
|
|
11247
|
-
} = e, r =
|
|
11248
|
+
} = e, r = W(at), {
|
|
11248
11249
|
activeKey: i
|
|
11249
11250
|
} = r || {}, o = {
|
|
11250
11251
|
display: "none"
|
|
@@ -11256,12 +11257,12 @@ function pu(e) {
|
|
|
11256
11257
|
}
|
|
11257
11258
|
const gu = Xe.memo(pu, () => !0);
|
|
11258
11259
|
function Wu() {
|
|
11259
|
-
const e =
|
|
11260
|
+
const e = W(at), {
|
|
11260
11261
|
tabs: t
|
|
11261
11262
|
} = e || {}, r = (t == null ? void 0 : t.map((i) => /* @__PURE__ */ n(gu, {
|
|
11262
11263
|
tab: i
|
|
11263
11264
|
}, i.key))) || null;
|
|
11264
|
-
return /* @__PURE__ */ n(
|
|
11265
|
+
return /* @__PURE__ */ n(te, {
|
|
11265
11266
|
children: r
|
|
11266
11267
|
});
|
|
11267
11268
|
}
|
|
@@ -11275,9 +11276,9 @@ const {
|
|
|
11275
11276
|
onRemoveFavourite: o
|
|
11276
11277
|
} = e, [s, a] = _(!1), [l, u] = _(!1), [d, f] = _([]), [c, m] = _(!0), [y, p] = _(), {
|
|
11277
11278
|
t: h
|
|
11278
|
-
} =
|
|
11279
|
+
} = W(ve) || {}, {
|
|
11279
11280
|
token: g
|
|
11280
|
-
} = yu(), v =
|
|
11281
|
+
} = yu(), v = W(at), {
|
|
11281
11282
|
openShortcut: F,
|
|
11282
11283
|
tabs: V,
|
|
11283
11284
|
activeKey: b,
|
|
@@ -11313,7 +11314,7 @@ const {
|
|
|
11313
11314
|
async function T() {
|
|
11314
11315
|
if (!A)
|
|
11315
11316
|
return;
|
|
11316
|
-
const k = V.find((
|
|
11317
|
+
const k = V.find((G) => G.key === b), {
|
|
11317
11318
|
id: I,
|
|
11318
11319
|
type: N
|
|
11319
11320
|
} = (k == null ? void 0 : k.action) || {};
|
|
@@ -11324,13 +11325,13 @@ const {
|
|
|
11324
11325
|
const O = A.view_id;
|
|
11325
11326
|
let j = !1;
|
|
11326
11327
|
A.type === "form" && (j = D || !1);
|
|
11327
|
-
const
|
|
11328
|
+
const U = await r({
|
|
11328
11329
|
action_id: I,
|
|
11329
11330
|
action_type: N,
|
|
11330
11331
|
view_id: O,
|
|
11331
11332
|
res_id: j
|
|
11332
11333
|
});
|
|
11333
|
-
|
|
11334
|
+
U !== !1 && p(U), a(U !== !1);
|
|
11334
11335
|
}
|
|
11335
11336
|
async function $() {
|
|
11336
11337
|
u(!1), E == null || E({
|
|
@@ -11371,7 +11372,7 @@ const {
|
|
|
11371
11372
|
style: {
|
|
11372
11373
|
padding: "1rem"
|
|
11373
11374
|
}
|
|
11374
|
-
}) : d.length > 0 ? /* @__PURE__ */ n(
|
|
11375
|
+
}) : d.length > 0 ? /* @__PURE__ */ n(te, {
|
|
11375
11376
|
children: d.map((k) => /* @__PURE__ */ n(Be.Item, {
|
|
11376
11377
|
children: /* @__PURE__ */ n(S, {
|
|
11377
11378
|
title: k.name,
|
|
@@ -11411,7 +11412,7 @@ const {
|
|
|
11411
11412
|
else {
|
|
11412
11413
|
if (!A)
|
|
11413
11414
|
return;
|
|
11414
|
-
const k = V.find((
|
|
11415
|
+
const k = V.find((U) => U.key === b), {
|
|
11415
11416
|
id: I,
|
|
11416
11417
|
type: N
|
|
11417
11418
|
} = (k == null ? void 0 : k.action) || {}, O = A.view_id;
|
|
@@ -11429,7 +11430,7 @@ const {
|
|
|
11429
11430
|
}
|
|
11430
11431
|
await x(), a(!s);
|
|
11431
11432
|
}
|
|
11432
|
-
return /* @__PURE__ */ P(
|
|
11433
|
+
return /* @__PURE__ */ P(te, {
|
|
11433
11434
|
children: [/* @__PURE__ */ n(Ie, {
|
|
11434
11435
|
type: s ? "primary" : "default",
|
|
11435
11436
|
icon: s ? /* @__PURE__ */ n(Wr, {
|