@gisce/react-ooui 1.4.0-rc.0 → 1.4.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Je, { useContext as Y, useState as T, useEffect as
|
|
2
|
-
import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as
|
|
1
|
+
import Je, { useContext as Y, useState as T, useEffect as pe, useRef as ue, useCallback as Le, forwardRef as bt, useImperativeHandle as xt } from "react";
|
|
2
|
+
import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as Ge, Button as Ie, Dropdown as Bt, Menu as He, Spin as Me, Divider as ln, Space as Ye, Input as nt, Select as Ct, Checkbox as Nt, Alert as Ze, Timeline as tr, Statistic as ei, Card as ti, Tag as Dr, message as xn, DatePicker as Mn, TimePicker as Vr, InputNumber as En, Progress as ni, Avatar as ri, Badge as oi, Pagination as ii, Tabs as Ar, Popover as si, Radio as nr, Switch as ai, Steps as rr, Layout as li } from "antd";
|
|
3
3
|
import { Label as At, Field as In, Tree as Rr, Reference as ci, Selection as $n, Many2one as kr, Boolean as di, Container as ui, parseContext as wt, Form as Mr, Integer as _n, SearchFieldTypes as ft, SearchFilter as fi, transformDomainForChildWidget as Er, graphProcessor as $r, parseGraph as Ln, graphFieldUtils as mi } from "@gisce/ooui";
|
|
4
4
|
import * as or from "@ant-design/icons";
|
|
5
5
|
import Lr, { QuestionCircleOutlined as Nr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as Rt, WarningOutlined as Pr, CloseOutlined as jt, CheckOutlined as kt, TranslationOutlined as Hr, FolderOpenOutlined as Nn, DownloadOutlined as Pn, ClearOutlined as Hn, StarFilled as Br, StarOutlined as jr, UpOutlined as hi, SearchOutlined as Bn, RightCircleOutlined as pi, ThunderboltOutlined as jn, PrinterOutlined as Kn, EnterOutlined as Kr, PlusSquareOutlined as gi, MinusSquareOutlined as yi, FileAddOutlined as cn, AlignLeftOutlined as vi, ApiOutlined as wi, DeleteOutlined as Yn, LeftOutlined as Yr, RightOutlined as Wr, EyeOutlined as bi, FormOutlined as Pt, TableOutlined as Wn, AreaChartOutlined as xi, CalendarOutlined as Ci, LinkOutlined as Ur, SaveOutlined as Si, CopyOutlined as Un, InfoCircleOutlined as Gr, ReloadOutlined as dn, EditOutlined as qr, FilterOutlined as zr, CloseCircleFilled as Ti, BorderOuterOutlined as Fi, SettingOutlined as Oi, ExportOutlined as Ii } from "@ant-design/icons";
|
|
6
6
|
import { Interweave as Gn } from "interweave";
|
|
7
|
-
import { jsxs as P, jsx as n, Fragment as
|
|
7
|
+
import { jsxs as P, jsx as n, Fragment as ne } from "react/jsx-runtime";
|
|
8
8
|
import * as ir from "@tabler/icons-react";
|
|
9
9
|
import _i from "antd/lib/input/TextArea";
|
|
10
10
|
import Kt from "styled-components";
|
|
@@ -404,13 +404,13 @@ function ve({
|
|
|
404
404
|
flex: "auto",
|
|
405
405
|
children: p()
|
|
406
406
|
})]
|
|
407
|
-
}))() : (() => /* @__PURE__ */ P(
|
|
407
|
+
}))() : (() => /* @__PURE__ */ P(ne, {
|
|
408
408
|
children: [h, p()]
|
|
409
409
|
}))();
|
|
410
410
|
}
|
|
411
411
|
const {
|
|
412
412
|
confirm: es
|
|
413
|
-
} =
|
|
413
|
+
} = Ge, Yt = ({
|
|
414
414
|
onOk: e,
|
|
415
415
|
confirmMessage: t,
|
|
416
416
|
lang: r
|
|
@@ -789,7 +789,7 @@ function fn() {
|
|
|
789
789
|
const [e, t] = T(
|
|
790
790
|
lr()
|
|
791
791
|
);
|
|
792
|
-
return
|
|
792
|
+
return pe(() => {
|
|
793
793
|
function r() {
|
|
794
794
|
t(lr());
|
|
795
795
|
}
|
|
@@ -832,7 +832,7 @@ const Xr = (e) => {
|
|
|
832
832
|
}, {
|
|
833
833
|
error: ss,
|
|
834
834
|
warning: as
|
|
835
|
-
} =
|
|
835
|
+
} = Ge, Ue = (e) => {
|
|
836
836
|
const {
|
|
837
837
|
message: t,
|
|
838
838
|
type: r,
|
|
@@ -856,8 +856,8 @@ const Xr = (e) => {
|
|
|
856
856
|
modalWidth: l
|
|
857
857
|
} = fn(), {
|
|
858
858
|
t: u
|
|
859
|
-
} = Y(we), [c, f] = T([]), [d, m] = T(!1), [v, p] = T(!1), [h, g] = T({}), y =
|
|
860
|
-
|
|
859
|
+
} = Y(we), [c, f] = T([]), [d, m] = T(!1), [v, p] = T(!1), [h, g] = T({}), y = ue();
|
|
860
|
+
pe(() => {
|
|
861
861
|
t ? O() : g({});
|
|
862
862
|
}, [t]);
|
|
863
863
|
async function O() {
|
|
@@ -866,7 +866,7 @@ const Xr = (e) => {
|
|
|
866
866
|
const b = await _();
|
|
867
867
|
await w(b);
|
|
868
868
|
} catch (b) {
|
|
869
|
-
|
|
869
|
+
Ue(b);
|
|
870
870
|
}
|
|
871
871
|
m(!1);
|
|
872
872
|
}
|
|
@@ -939,12 +939,12 @@ const Xr = (e) => {
|
|
|
939
939
|
fields: {}
|
|
940
940
|
});
|
|
941
941
|
} catch (b) {
|
|
942
|
-
|
|
942
|
+
Ue(b);
|
|
943
943
|
}
|
|
944
944
|
p(!1), a();
|
|
945
945
|
}
|
|
946
946
|
function E() {
|
|
947
|
-
return d ? /* @__PURE__ */ n(
|
|
947
|
+
return d ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
|
|
948
948
|
children: [V(), /* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(Ce, {
|
|
949
949
|
justify: "end",
|
|
950
950
|
children: /* @__PURE__ */ P(Ye, {
|
|
@@ -967,7 +967,7 @@ const Xr = (e) => {
|
|
|
967
967
|
})]
|
|
968
968
|
});
|
|
969
969
|
}
|
|
970
|
-
return /* @__PURE__ */ n(
|
|
970
|
+
return /* @__PURE__ */ n(Ge, {
|
|
971
971
|
title: u("translate"),
|
|
972
972
|
centered: !0,
|
|
973
973
|
width: l,
|
|
@@ -994,7 +994,7 @@ function ze(e) {
|
|
|
994
994
|
}
|
|
995
995
|
const {
|
|
996
996
|
info: ls
|
|
997
|
-
} =
|
|
997
|
+
} = Ge, ct = (e) => {
|
|
998
998
|
ls({
|
|
999
999
|
title: "",
|
|
1000
1000
|
centered: !0,
|
|
@@ -1053,7 +1053,7 @@ const {
|
|
|
1053
1053
|
} = o || {}, [f, d] = T(!1), {
|
|
1054
1054
|
t: m
|
|
1055
1055
|
} = Y(we);
|
|
1056
|
-
return s ? /* @__PURE__ */ P(
|
|
1056
|
+
return s ? /* @__PURE__ */ P(ne, {
|
|
1057
1057
|
children: [/* @__PURE__ */ n("div", {
|
|
1058
1058
|
onClick: () => {
|
|
1059
1059
|
if (u != null && u()) {
|
|
@@ -1088,7 +1088,7 @@ const {
|
|
|
1088
1088
|
d(!1), l == null || l();
|
|
1089
1089
|
}
|
|
1090
1090
|
})]
|
|
1091
|
-
}) : /* @__PURE__ */ n(
|
|
1091
|
+
}) : /* @__PURE__ */ n(ne, {
|
|
1092
1092
|
children: /* @__PURE__ */ P(Ce, {
|
|
1093
1093
|
gutter: 8,
|
|
1094
1094
|
wrap: !1,
|
|
@@ -1359,7 +1359,7 @@ const xa = (e) => {
|
|
|
1359
1359
|
onChange: i
|
|
1360
1360
|
} = e, {
|
|
1361
1361
|
readOnly: o
|
|
1362
|
-
} = t, s =
|
|
1362
|
+
} = t, s = ue(null), {
|
|
1363
1363
|
t: a
|
|
1364
1364
|
} = Y(we), l = (d) => {
|
|
1365
1365
|
i == null || i(d);
|
|
@@ -1376,7 +1376,7 @@ const xa = (e) => {
|
|
|
1376
1376
|
function f() {
|
|
1377
1377
|
l(void 0);
|
|
1378
1378
|
}
|
|
1379
|
-
return /* @__PURE__ */ P(
|
|
1379
|
+
return /* @__PURE__ */ P(ne, {
|
|
1380
1380
|
children: [/* @__PURE__ */ P(Ce, {
|
|
1381
1381
|
gutter: 8,
|
|
1382
1382
|
wrap: !1,
|
|
@@ -1606,7 +1606,7 @@ const zn = async (e) => {
|
|
|
1606
1606
|
a(!1);
|
|
1607
1607
|
}
|
|
1608
1608
|
};
|
|
1609
|
-
return s ? /* @__PURE__ */ n(
|
|
1609
|
+
return s ? /* @__PURE__ */ n(Me, {}) : l ? /* @__PURE__ */ n(Ze, {
|
|
1610
1610
|
className: "mt-10",
|
|
1611
1611
|
message: l,
|
|
1612
1612
|
type: "error",
|
|
@@ -1675,7 +1675,7 @@ const zn = async (e) => {
|
|
|
1675
1675
|
message: u,
|
|
1676
1676
|
type: "error",
|
|
1677
1677
|
banner: !0
|
|
1678
|
-
}) : a ? /* @__PURE__ */ n(
|
|
1678
|
+
}) : a ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
|
|
1679
1679
|
children: [/* @__PURE__ */ n(tr, {
|
|
1680
1680
|
style: {
|
|
1681
1681
|
padding: "1rem"
|
|
@@ -1747,7 +1747,7 @@ const zn = async (e) => {
|
|
|
1747
1747
|
} = Va(), {
|
|
1748
1748
|
ooui: r,
|
|
1749
1749
|
value: i
|
|
1750
|
-
} = e, o = /* @__PURE__ */ P(
|
|
1750
|
+
} = e, o = /* @__PURE__ */ P(ne, {
|
|
1751
1751
|
children: [/* @__PURE__ */ P("span", {
|
|
1752
1752
|
children: [r.label, " "]
|
|
1753
1753
|
}), r.tooltip && /* @__PURE__ */ n(ht, {
|
|
@@ -2037,7 +2037,7 @@ const Mt = ({
|
|
|
2037
2037
|
message: u,
|
|
2038
2038
|
type: "error",
|
|
2039
2039
|
banner: !0
|
|
2040
|
-
}) : /* @__PURE__ */ n(
|
|
2040
|
+
}) : /* @__PURE__ */ n(ne, {
|
|
2041
2041
|
children: /* @__PURE__ */ n("div", {
|
|
2042
2042
|
className: "flex flex-row",
|
|
2043
2043
|
children: /* @__PURE__ */ n(Ct, {
|
|
@@ -2230,7 +2230,7 @@ const Mt = ({
|
|
|
2230
2230
|
});
|
|
2231
2231
|
}, {
|
|
2232
2232
|
confirm: za
|
|
2233
|
-
} =
|
|
2233
|
+
} = Ge, Wt = ({
|
|
2234
2234
|
onOk: e,
|
|
2235
2235
|
onCancel: t,
|
|
2236
2236
|
lang: r
|
|
@@ -2247,7 +2247,7 @@ const Mt = ({
|
|
|
2247
2247
|
});
|
|
2248
2248
|
}, {
|
|
2249
2249
|
error: Ja
|
|
2250
|
-
} =
|
|
2250
|
+
} = Ge, vr = (e) => {
|
|
2251
2251
|
Ja({
|
|
2252
2252
|
title: Oe("formHasErrors", e),
|
|
2253
2253
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
@@ -2256,7 +2256,7 @@ const Mt = ({
|
|
|
2256
2256
|
});
|
|
2257
2257
|
}, {
|
|
2258
2258
|
warning: Za
|
|
2259
|
-
} =
|
|
2259
|
+
} = Ge, Xa = (e, t, r) => {
|
|
2260
2260
|
Za({
|
|
2261
2261
|
title: e,
|
|
2262
2262
|
icon: /* @__PURE__ */ n(Pr, {}),
|
|
@@ -2371,7 +2371,7 @@ const Mt = ({
|
|
|
2371
2371
|
setLimit: V,
|
|
2372
2372
|
searchParams: D = [],
|
|
2373
2373
|
setSearchValues: E
|
|
2374
|
-
} = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B =
|
|
2374
|
+
} = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B = ue(w || Ht), ee = ue([]), Z = Le((se) => {
|
|
2375
2375
|
g == null || g([...se]), q([...se]);
|
|
2376
2376
|
}, []), ie = Le(() => y || j, [y, j]), Q = Le(async () => {
|
|
2377
2377
|
const se = await H.getHandler().nameSearch({
|
|
@@ -2382,26 +2382,23 @@ const Mt = ({
|
|
|
2382
2382
|
context: c
|
|
2383
2383
|
});
|
|
2384
2384
|
if (k(se.length), f == null || f(se.length), se.length > 0) {
|
|
2385
|
-
const Se = se.map((
|
|
2386
|
-
|
|
2387
|
-
const
|
|
2385
|
+
const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ve } = It(d), je = {};
|
|
2386
|
+
De && (je.colors = De), Ve && (je.status = Ve);
|
|
2387
|
+
const We = await H.getHandler().readEvalUiObjects({
|
|
2388
2388
|
model: t,
|
|
2389
2389
|
ids: Se,
|
|
2390
2390
|
arch: d == null ? void 0 : d.arch,
|
|
2391
2391
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
2392
2392
|
context: c,
|
|
2393
|
-
attrs:
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
ee.current = [...Ge], z(Qt(je[1])), L(gr(je[1]));
|
|
2399
|
-
const ne = Ge.map((Ae) => Ae.id), Te = v !== void 0 ? _t({
|
|
2400
|
-
resultsToSort: Ge,
|
|
2393
|
+
attrs: je
|
|
2394
|
+
}), te = We[0];
|
|
2395
|
+
ee.current = [...te], z(Qt(We[1])), L(gr(We[1]));
|
|
2396
|
+
const Fe = te.map((ce) => ce.id), Ee = v !== void 0 ? _t({
|
|
2397
|
+
resultsToSort: te,
|
|
2401
2398
|
sorter: v,
|
|
2402
2399
|
fields: { ...d.fields, ...m.fields }
|
|
2403
2400
|
}) : [...ee.current];
|
|
2404
|
-
Z(
|
|
2401
|
+
Z(Ee), Fe.length > 0 ? h == null || h(0) : h == null || h(void 0);
|
|
2405
2402
|
} else
|
|
2406
2403
|
Z([]), h == null || h(void 0);
|
|
2407
2404
|
C(!1), u.current = !0;
|
|
@@ -2419,31 +2416,33 @@ const Mt = ({
|
|
|
2419
2416
|
f
|
|
2420
2417
|
]), J = Le(
|
|
2421
2418
|
async (se) => {
|
|
2422
|
-
const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status:
|
|
2419
|
+
const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status: We } = It(d), te = {};
|
|
2420
|
+
je && (te.colors = je), We && (te.status = We);
|
|
2421
|
+
const { totalItems: Fe, results: Ee, attrsEvaluated: ce } = await H.getHandler().searchForTree({
|
|
2423
2422
|
params: Ve,
|
|
2424
2423
|
limit: B.current,
|
|
2425
2424
|
offset: De || M,
|
|
2426
2425
|
model: t,
|
|
2427
2426
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
2428
2427
|
context: c,
|
|
2429
|
-
attrs:
|
|
2428
|
+
attrs: te
|
|
2430
2429
|
});
|
|
2431
|
-
z(Qt(
|
|
2432
|
-
const
|
|
2433
|
-
resultsToSort:
|
|
2430
|
+
z(Qt(ce)), L(gr(ce)), ee.current = [...Ee];
|
|
2431
|
+
const me = v !== void 0 ? _t({
|
|
2432
|
+
resultsToSort: Ee,
|
|
2434
2433
|
sorter: v,
|
|
2435
2434
|
fields: { ...d.fields, ...m.fields }
|
|
2436
2435
|
}) : [...ee.current];
|
|
2437
|
-
if (Z(
|
|
2438
|
-
const
|
|
2439
|
-
(
|
|
2436
|
+
if (Z(me), y && me.length > 0) {
|
|
2437
|
+
const de = me.findIndex(
|
|
2438
|
+
(Xe) => _ === Xe.id
|
|
2440
2439
|
);
|
|
2441
|
-
|
|
2440
|
+
de === -1 ? h == null || h(0) : h == null || h(de);
|
|
2442
2441
|
} else
|
|
2443
2442
|
h == null || h(void 0);
|
|
2444
2443
|
C(!1);
|
|
2445
|
-
const
|
|
2446
|
-
k(
|
|
2444
|
+
const Te = await Fe;
|
|
2445
|
+
k(Te), f == null || f(Te);
|
|
2447
2446
|
},
|
|
2448
2447
|
[
|
|
2449
2448
|
h,
|
|
@@ -2461,7 +2460,7 @@ const Mt = ({
|
|
|
2461
2460
|
M,
|
|
2462
2461
|
D
|
|
2463
2462
|
]
|
|
2464
|
-
),
|
|
2463
|
+
), fe = Le(
|
|
2465
2464
|
async (se) => {
|
|
2466
2465
|
try {
|
|
2467
2466
|
C(!0), a == null || a(!0), l && !u.current ? await Q() : await J(se);
|
|
@@ -2508,7 +2507,7 @@ const Mt = ({
|
|
|
2508
2507
|
), $e = Le(
|
|
2509
2508
|
(se) => {
|
|
2510
2509
|
const { params: Se, searchValues: De, limit: Ve, offset: je } = se;
|
|
2511
|
-
b || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), x(!0), R(void 0), A(1), Ve && (B.current = Ve, V == null || V(Ve)), je && I(je),
|
|
2510
|
+
b || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), x(!0), R(void 0), A(1), Ve && (B.current = Ve, V == null || V(Ve)), je && I(je), fe({
|
|
2512
2511
|
params: Se,
|
|
2513
2512
|
newOffset: je
|
|
2514
2513
|
}));
|
|
@@ -2524,7 +2523,7 @@ const Mt = ({
|
|
|
2524
2523
|
A,
|
|
2525
2524
|
V,
|
|
2526
2525
|
I,
|
|
2527
|
-
|
|
2526
|
+
fe
|
|
2528
2527
|
]
|
|
2529
2528
|
), _e = Le(
|
|
2530
2529
|
(se) => {
|
|
@@ -2557,7 +2556,7 @@ const Mt = ({
|
|
|
2557
2556
|
return {
|
|
2558
2557
|
submit: $e,
|
|
2559
2558
|
clear: Be,
|
|
2560
|
-
fetchResults:
|
|
2559
|
+
fetchResults: fe,
|
|
2561
2560
|
tableRefreshing: b,
|
|
2562
2561
|
searchFilterLoading: S,
|
|
2563
2562
|
searchError: $,
|
|
@@ -2572,7 +2571,7 @@ const Mt = ({
|
|
|
2572
2571
|
statusForResults: U,
|
|
2573
2572
|
totalItems: N
|
|
2574
2573
|
};
|
|
2575
|
-
},
|
|
2574
|
+
}, Qe = Je.createContext(null), ll = (e) => {
|
|
2576
2575
|
const {
|
|
2577
2576
|
children: t,
|
|
2578
2577
|
currentView: r,
|
|
@@ -2599,21 +2598,21 @@ const Mt = ({
|
|
|
2599
2598
|
setSearchTreeNameSearch: E,
|
|
2600
2599
|
goToResourceId: b,
|
|
2601
2600
|
limit: C
|
|
2602
|
-
} = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [
|
|
2603
|
-
|
|
2601
|
+
} = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [fe, be] = T({}), [$e, _e] = T(C !== void 0 ? C : Ht), [Be, ge] = T(i);
|
|
2602
|
+
pe(() => {
|
|
2604
2603
|
m && m.length > 0 && !v && (p == null || p(0), f == null || f(m[0].id));
|
|
2605
|
-
}, [m]),
|
|
2604
|
+
}, [m]), pe(() => {
|
|
2606
2605
|
_e(C !== void 0 ? C : Ht);
|
|
2607
|
-
}, [C]),
|
|
2606
|
+
}, [C]), pe(() => {
|
|
2608
2607
|
s.length === 1 ? J(s[0]) : s.length > 1 && J(s.filter((Se) => Se.view_id !== r.view_id)[0]);
|
|
2609
|
-
}, [s]),
|
|
2608
|
+
}, [s]), pe(() => {
|
|
2610
2609
|
(Q == null ? void 0 : Q.view_id) === r.view_id && s.length > 1 && J(s.filter((Se) => Se.view_id !== r.view_id)[0]);
|
|
2611
2610
|
}, [r]);
|
|
2612
2611
|
const se = async () => {
|
|
2613
2612
|
var Se;
|
|
2614
2613
|
return await ((Se = a.current) == null ? void 0 : Se.submitForm());
|
|
2615
2614
|
};
|
|
2616
|
-
return /* @__PURE__ */ n(
|
|
2615
|
+
return /* @__PURE__ */ n(Qe.Provider, {
|
|
2617
2616
|
value: {
|
|
2618
2617
|
title: Be,
|
|
2619
2618
|
currentView: r,
|
|
@@ -2661,7 +2660,7 @@ const Mt = ({
|
|
|
2661
2660
|
previousView: Q,
|
|
2662
2661
|
setPreviousView: J,
|
|
2663
2662
|
goToResourceId: b,
|
|
2664
|
-
searchValues:
|
|
2663
|
+
searchValues: fe,
|
|
2665
2664
|
setSearchValues: be,
|
|
2666
2665
|
limit: $e,
|
|
2667
2666
|
setLimit: _e,
|
|
@@ -2706,9 +2705,9 @@ const Mt = ({
|
|
|
2706
2705
|
const {
|
|
2707
2706
|
children: r,
|
|
2708
2707
|
globalValues: i = {}
|
|
2709
|
-
} = e, o =
|
|
2708
|
+
} = e, o = ue(), s = ue(), [a, l] = T(!1), u = Y(st), {
|
|
2710
2709
|
openAction: c
|
|
2711
|
-
} = u || {}, f =
|
|
2710
|
+
} = u || {}, f = ue([]), {
|
|
2712
2711
|
t: d
|
|
2713
2712
|
} = Y(we);
|
|
2714
2713
|
xt(t, () => ({
|
|
@@ -2731,7 +2730,7 @@ const Mt = ({
|
|
|
2731
2730
|
type: M
|
|
2732
2731
|
} = b;
|
|
2733
2732
|
if (M !== "ir.actions.report.xml") {
|
|
2734
|
-
|
|
2733
|
+
Ue(`${M} action not supported`);
|
|
2735
2734
|
return;
|
|
2736
2735
|
}
|
|
2737
2736
|
const {
|
|
@@ -2758,7 +2757,7 @@ const Mt = ({
|
|
|
2758
2757
|
y(j);
|
|
2759
2758
|
}, 1e3);
|
|
2760
2759
|
} catch (j) {
|
|
2761
|
-
s.current = !1, clearInterval(o.current),
|
|
2760
|
+
s.current = !1, clearInterval(o.current), Ue(j), l(!1);
|
|
2762
2761
|
}
|
|
2763
2762
|
}
|
|
2764
2763
|
async function y(E) {
|
|
@@ -2772,7 +2771,7 @@ const Mt = ({
|
|
|
2772
2771
|
mn(b.result, C.mime);
|
|
2773
2772
|
}
|
|
2774
2773
|
} catch (C) {
|
|
2775
|
-
s.current = !1, clearInterval(o.current), l(!1),
|
|
2774
|
+
s.current = !1, clearInterval(o.current), l(!1), Ue(C.exception || C);
|
|
2776
2775
|
}
|
|
2777
2776
|
}
|
|
2778
2777
|
async function O({
|
|
@@ -2795,7 +2794,7 @@ const Mt = ({
|
|
|
2795
2794
|
fields: b,
|
|
2796
2795
|
values: C,
|
|
2797
2796
|
context: S
|
|
2798
|
-
}) : (
|
|
2797
|
+
}) : (Ue(`${$} action not supported`), {});
|
|
2799
2798
|
}
|
|
2800
2799
|
async function _({
|
|
2801
2800
|
actionData: E,
|
|
@@ -2922,21 +2921,21 @@ const Mt = ({
|
|
|
2922
2921
|
actionData: void 0
|
|
2923
2922
|
});
|
|
2924
2923
|
}
|
|
2925
|
-
return /* @__PURE__ */ n(
|
|
2924
|
+
return /* @__PURE__ */ n(ne, {
|
|
2926
2925
|
children: /* @__PURE__ */ n(Et.Provider, {
|
|
2927
2926
|
value: {
|
|
2928
2927
|
processAction: O,
|
|
2929
2928
|
globalValues: i
|
|
2930
2929
|
},
|
|
2931
|
-
children: /* @__PURE__ */ P(
|
|
2932
|
-
children: [r, /* @__PURE__ */ n(
|
|
2930
|
+
children: /* @__PURE__ */ P(ne, {
|
|
2931
|
+
children: [r, /* @__PURE__ */ n(Ge, {
|
|
2933
2932
|
title: d("generatingReport"),
|
|
2934
2933
|
open: a,
|
|
2935
2934
|
footer: null,
|
|
2936
2935
|
closable: !1,
|
|
2937
2936
|
centered: !0,
|
|
2938
2937
|
maskClosable: !1,
|
|
2939
|
-
children: /* @__PURE__ */ n(
|
|
2938
|
+
children: /* @__PURE__ */ n(Me, {})
|
|
2940
2939
|
}), /* @__PURE__ */ n(Gt, {
|
|
2941
2940
|
buttonModal: !0,
|
|
2942
2941
|
parentContext: p.context,
|
|
@@ -3067,24 +3066,24 @@ function pl(e, t) {
|
|
|
3067
3066
|
} = e, {
|
|
3068
3067
|
t: b,
|
|
3069
3068
|
lang: C
|
|
3070
|
-
} = Y(we), [S, x] = T(!1), [$, R] = T(), [F, A] = T(), [M] = ot.useForm(), [I, N] = T(), [k, j] = T(), q = Y(mo), [W, z] = T(), [U, L] = T(!1), B =
|
|
3069
|
+
} = Y(we), [S, x] = T(!1), [$, R] = T(), [F, A] = T(), [M] = ot.useForm(), [I, N] = T(), [k, j] = T(), q = Y(mo), [W, z] = T(), [U, L] = T(!1), B = ue(), ee = ue({}), Z = ue({}), ie = ue(!1), Q = ue(!1), fe = (E !== void 0 ? E : W) < hl, be = Y(Ne), {
|
|
3071
3070
|
activeId: $e,
|
|
3072
3071
|
getPlainValues: _e
|
|
3073
|
-
} = be || {}, Be = Y(
|
|
3072
|
+
} = be || {}, Be = Y(Qe), {
|
|
3074
3073
|
setFormIsSaving: ge = void 0,
|
|
3075
3074
|
setFormHasChanges: se = void 0,
|
|
3076
3075
|
setCurrentId: Se = void 0,
|
|
3077
3076
|
setFormIsLoading: De = void 0,
|
|
3078
3077
|
setAttachments: Ve = void 0,
|
|
3079
3078
|
title: je = void 0,
|
|
3080
|
-
setTitle:
|
|
3081
|
-
} = (w ? Be : {}) || {},
|
|
3082
|
-
processAction:
|
|
3083
|
-
globalValues:
|
|
3084
|
-
} =
|
|
3079
|
+
setTitle: We = void 0
|
|
3080
|
+
} = (w ? Be : {}) || {}, te = Y(Et), {
|
|
3081
|
+
processAction: Fe,
|
|
3082
|
+
globalValues: Ee
|
|
3083
|
+
} = te || {};
|
|
3085
3084
|
xt(t, () => ({
|
|
3086
3085
|
submitForm: zt,
|
|
3087
|
-
getFields:
|
|
3086
|
+
getFields: Xe,
|
|
3088
3087
|
getValues: Ke,
|
|
3089
3088
|
getPlainValues: at,
|
|
3090
3089
|
getContext: ae,
|
|
@@ -3093,7 +3092,7 @@ function pl(e, t) {
|
|
|
3093
3092
|
clearAndReload: () => {
|
|
3094
3093
|
B.current = void 0, A(void 0), ut();
|
|
3095
3094
|
}
|
|
3096
|
-
})),
|
|
3095
|
+
})), pe(() => {
|
|
3097
3096
|
if (R(void 0), !(!r && !p)) {
|
|
3098
3097
|
if (!_) {
|
|
3099
3098
|
B.current = void 0, A(void 0);
|
|
@@ -3101,39 +3100,39 @@ function pl(e, t) {
|
|
|
3101
3100
|
}
|
|
3102
3101
|
(i === void 0 && k || i !== void 0 && k && i < 0) && (B.current = void 0, A(void 0)), ut();
|
|
3103
3102
|
}
|
|
3104
|
-
}, [i, r, v, p, _]),
|
|
3103
|
+
}, [i, r, v, p, _]), pe(() => {
|
|
3105
3104
|
U && (vn({
|
|
3106
3105
|
elementHasLostFocus: !0
|
|
3107
3106
|
}), L(!1));
|
|
3108
3107
|
}, [U]);
|
|
3109
|
-
const
|
|
3108
|
+
const ce = (K, G, re) => {
|
|
3110
3109
|
se == null || se(!1), ge == null || ge(!1), s == null || s(K, G, re), Se == null || Se(K);
|
|
3111
|
-
},
|
|
3110
|
+
}, me = () => {
|
|
3112
3111
|
ge == null || ge(!1), o == null || o();
|
|
3113
|
-
},
|
|
3112
|
+
}, Te = (K) => {
|
|
3114
3113
|
ge == null || ge(!1), c == null || c(K);
|
|
3115
3114
|
};
|
|
3116
|
-
function
|
|
3115
|
+
function de() {
|
|
3117
3116
|
return i || B.current;
|
|
3118
3117
|
}
|
|
3119
|
-
function
|
|
3118
|
+
function Xe() {
|
|
3120
3119
|
return k;
|
|
3121
3120
|
}
|
|
3122
3121
|
function Ke() {
|
|
3123
3122
|
const K = {
|
|
3124
3123
|
...xe(k),
|
|
3125
|
-
...
|
|
3124
|
+
...Ae()
|
|
3126
3125
|
};
|
|
3127
3126
|
for (const G in K)
|
|
3128
3127
|
K[G] === void 0 && delete K[G];
|
|
3129
3128
|
return K;
|
|
3130
3129
|
}
|
|
3131
3130
|
function at() {
|
|
3132
|
-
const K = Ke(), G =
|
|
3131
|
+
const K = Ke(), G = Xe();
|
|
3133
3132
|
let re = {};
|
|
3134
3133
|
return Object.keys(K).forEach((oe) => {
|
|
3135
|
-
const
|
|
3136
|
-
G[oe] && G[oe].type === "many2one" &&
|
|
3134
|
+
const Re = K[oe];
|
|
3135
|
+
G[oe] && G[oe].type === "many2one" && Re && Array.isArray(Re) && Re.length === 2 ? re[oe] = Re[0] : G[oe] && (G[oe].type === "one2many" || G[oe].type === "many2many") && Re && Re.items ? re[oe] = Re.items.filter((yt) => yt.operation !== "pendingRemove").map((yt) => yt.id) : re[oe] = Re;
|
|
3137
3136
|
}), re;
|
|
3138
3137
|
}
|
|
3139
3138
|
function X() {
|
|
@@ -3150,17 +3149,17 @@ function pl(e, t) {
|
|
|
3150
3149
|
...F == null ? void 0 : F.context
|
|
3151
3150
|
};
|
|
3152
3151
|
}
|
|
3153
|
-
function
|
|
3152
|
+
function Ae() {
|
|
3154
3153
|
return {
|
|
3155
|
-
id:
|
|
3156
|
-
active_id:
|
|
3157
|
-
active_ids: [
|
|
3154
|
+
id: de(),
|
|
3155
|
+
active_id: de(),
|
|
3156
|
+
active_ids: [de()],
|
|
3158
3157
|
parent_id: $e,
|
|
3159
|
-
...
|
|
3158
|
+
...Ee
|
|
3160
3159
|
};
|
|
3161
3160
|
}
|
|
3162
|
-
const
|
|
3163
|
-
const G =
|
|
3161
|
+
const he = async (K) => {
|
|
3162
|
+
const G = de() ? F == null ? void 0 : F.context : {};
|
|
3164
3163
|
return await H.getHandler().defaultGet({
|
|
3165
3164
|
model: r,
|
|
3166
3165
|
fields: K,
|
|
@@ -3177,7 +3176,7 @@ function pl(e, t) {
|
|
|
3177
3176
|
})).length !== 0, xe = (K) => {
|
|
3178
3177
|
const G = M.getFieldsValue(!0);
|
|
3179
3178
|
return Ot(G, K);
|
|
3180
|
-
},
|
|
3179
|
+
}, ke = (K, G) => {
|
|
3181
3180
|
qt({
|
|
3182
3181
|
values: {
|
|
3183
3182
|
...Ot(M.getFieldsValue(!0), k),
|
|
@@ -3186,7 +3185,7 @@ function pl(e, t) {
|
|
|
3186
3185
|
fields: k,
|
|
3187
3186
|
reset: !1
|
|
3188
3187
|
});
|
|
3189
|
-
},
|
|
3188
|
+
}, et = (K) => M.getFieldsValue(!0)[K];
|
|
3190
3189
|
async function tt() {
|
|
3191
3190
|
try {
|
|
3192
3191
|
return await M.validateFields(), !1;
|
|
@@ -3214,10 +3213,10 @@ function pl(e, t) {
|
|
|
3214
3213
|
R(G != null && G.message ? G.message + G.stack : G), De == null || De(!1);
|
|
3215
3214
|
}
|
|
3216
3215
|
}, gt = async (K) => {
|
|
3217
|
-
let G, re, oe,
|
|
3216
|
+
let G, re, oe, Re;
|
|
3218
3217
|
De == null || De(!0), R(void 0), K != null && K.fields ? (re = K.fields, oe = K.arch) : (re = k, oe = I), v && (K == null ? void 0 : K.forceRefresh) !== !0 ? G = v : {
|
|
3219
3218
|
values: G,
|
|
3220
|
-
defaultGetCalled:
|
|
3219
|
+
defaultGetCalled: Re
|
|
3221
3220
|
} = await Po({
|
|
3222
3221
|
fields: re,
|
|
3223
3222
|
arch: oe
|
|
@@ -3228,22 +3227,22 @@ function pl(e, t) {
|
|
|
3228
3227
|
values: G,
|
|
3229
3228
|
fields: re,
|
|
3230
3229
|
reset: !0,
|
|
3231
|
-
isDefaultGet:
|
|
3230
|
+
isDefaultGet: Re
|
|
3232
3231
|
}), Jt({
|
|
3233
3232
|
fields: re,
|
|
3234
3233
|
arch: oe,
|
|
3235
3234
|
values: G
|
|
3236
|
-
}), De == null || De(!1), se == null || se(!1),
|
|
3235
|
+
}), De == null || De(!1), se == null || se(!1), Re && L(!0);
|
|
3237
3236
|
}, Qn = async () => new Promise(async (K) => {
|
|
3238
3237
|
ye() ? Wt({
|
|
3239
3238
|
lang: C,
|
|
3240
3239
|
onOk: () => {
|
|
3241
|
-
|
|
3240
|
+
me == null || me(), K(!0);
|
|
3242
3241
|
},
|
|
3243
3242
|
onCancel: () => {
|
|
3244
3243
|
K(!1);
|
|
3245
3244
|
}
|
|
3246
|
-
}) : (
|
|
3245
|
+
}) : (me == null || me(), K(!0));
|
|
3247
3246
|
}), No = async () => {
|
|
3248
3247
|
if (l) {
|
|
3249
3248
|
const K = await H.getHandler().getActionStringForModel(r);
|
|
@@ -3280,22 +3279,22 @@ function pl(e, t) {
|
|
|
3280
3279
|
arch: G
|
|
3281
3280
|
}) => {
|
|
3282
3281
|
let re = {}, oe = !1;
|
|
3283
|
-
if (
|
|
3282
|
+
if (de()) {
|
|
3284
3283
|
re = (await H.getHandler().readObjects({
|
|
3285
3284
|
model: r,
|
|
3286
|
-
ids: [
|
|
3285
|
+
ids: [de()],
|
|
3287
3286
|
fields: K,
|
|
3288
3287
|
context: y
|
|
3289
3288
|
}))[0];
|
|
3290
|
-
const
|
|
3291
|
-
params: [["res_model", "=", r], ["res_id", "=",
|
|
3289
|
+
const Re = await H.getHandler().search({
|
|
3290
|
+
params: [["res_model", "=", r], ["res_id", "=", de()]],
|
|
3292
3291
|
fields: ["id", "name"],
|
|
3293
3292
|
context: ae(),
|
|
3294
3293
|
model: "ir.attachment"
|
|
3295
3294
|
});
|
|
3296
|
-
Ve == null || Ve(
|
|
3295
|
+
Ve == null || Ve(Re);
|
|
3297
3296
|
} else
|
|
3298
|
-
Ve == null || Ve([]), re = await
|
|
3297
|
+
Ve == null || Ve([]), re = await he(K), oe = !0;
|
|
3299
3298
|
return {
|
|
3300
3299
|
values: re,
|
|
3301
3300
|
defaultGetCalled: oe
|
|
@@ -3304,7 +3303,7 @@ function pl(e, t) {
|
|
|
3304
3303
|
const {
|
|
3305
3304
|
callOnSubmitSucceed: G = !0
|
|
3306
3305
|
} = K || {};
|
|
3307
|
-
if (
|
|
3306
|
+
if (de()) {
|
|
3308
3307
|
const re = Sn({
|
|
3309
3308
|
source: ee.current,
|
|
3310
3309
|
target: xe(k),
|
|
@@ -3312,7 +3311,7 @@ function pl(e, t) {
|
|
|
3312
3311
|
});
|
|
3313
3312
|
await H.getHandler().update({
|
|
3314
3313
|
model: r,
|
|
3315
|
-
id:
|
|
3314
|
+
id: de(),
|
|
3316
3315
|
values: {
|
|
3317
3316
|
...re,
|
|
3318
3317
|
...D
|
|
@@ -3338,26 +3337,26 @@ function pl(e, t) {
|
|
|
3338
3337
|
});
|
|
3339
3338
|
B.current = oe, ee.current = re;
|
|
3340
3339
|
}
|
|
3341
|
-
h && await h([
|
|
3340
|
+
h && await h([de()]), !g && G && (ce == null || ce(de(), Ke(), X()));
|
|
3342
3341
|
}, Bo = async (K) => {
|
|
3343
3342
|
const {
|
|
3344
3343
|
callOnSubmitSucceed: G = !0
|
|
3345
3344
|
} = K || {};
|
|
3346
|
-
!g && G && (
|
|
3345
|
+
!g && G && (ce == null || ce(de(), Ke(), X()));
|
|
3347
3346
|
}, zt = async (K) => {
|
|
3348
3347
|
let G = !1;
|
|
3349
3348
|
const {
|
|
3350
3349
|
callOnSubmitSucceed: re = !0
|
|
3351
3350
|
} = K || {};
|
|
3352
|
-
if (Q.current = !0, R(void 0), !ye() &&
|
|
3353
|
-
return Q.current = !1, se == null || se(!1),
|
|
3351
|
+
if (Q.current = !0, R(void 0), !ye() && de() && re)
|
|
3352
|
+
return Q.current = !1, se == null || se(!1), me == null || me(), {
|
|
3354
3353
|
succeed: !0,
|
|
3355
|
-
id:
|
|
3354
|
+
id: de()
|
|
3356
3355
|
};
|
|
3357
3356
|
if (await tt())
|
|
3358
3357
|
return Q.current = !1, vr(C), {
|
|
3359
3358
|
succeed: !1,
|
|
3360
|
-
id:
|
|
3359
|
+
id: de()
|
|
3361
3360
|
};
|
|
3362
3361
|
x(!0), ge == null || ge(!0);
|
|
3363
3362
|
try {
|
|
@@ -3369,28 +3368,28 @@ function pl(e, t) {
|
|
|
3369
3368
|
forceRefresh: !0
|
|
3370
3369
|
}), G = !0, xn.success(b("savedRegisters"));
|
|
3371
3370
|
} catch (oe) {
|
|
3372
|
-
Q.current = !1, x(!1), ge == null || ge(!1),
|
|
3371
|
+
Q.current = !1, x(!1), ge == null || ge(!1), Te == null || Te(oe), xn.error(b("errorWhileSavingForm")), R(oe != null && oe.message ? oe.message : oe);
|
|
3373
3372
|
} finally {
|
|
3374
3373
|
Q.current = !1, ge == null || ge(!1), x(!1);
|
|
3375
3374
|
}
|
|
3376
3375
|
return {
|
|
3377
3376
|
succeed: G,
|
|
3378
|
-
id:
|
|
3377
|
+
id: de()
|
|
3379
3378
|
};
|
|
3380
3379
|
}, Jt = ({
|
|
3381
3380
|
fields: K,
|
|
3382
3381
|
arch: G,
|
|
3383
3382
|
values: re
|
|
3384
3383
|
}) => {
|
|
3385
|
-
var
|
|
3384
|
+
var Re;
|
|
3386
3385
|
const oe = new Mr(K);
|
|
3387
3386
|
oe.parse(G, {
|
|
3388
3387
|
readOnly: f,
|
|
3389
3388
|
values: Ia({
|
|
3390
3389
|
...re,
|
|
3391
|
-
...
|
|
3390
|
+
...Ae()
|
|
3392
3391
|
}, K)
|
|
3393
|
-
}), A(oe), oe.string && oe.string !== je && (
|
|
3392
|
+
}), A(oe), oe.string && oe.string !== je && (We == null || We(oe.string)), q && oe.string && ((Re = q.setTitle) == null || Re.call(q, oe.string));
|
|
3394
3393
|
}, vn = async ({
|
|
3395
3394
|
elementHasLostFocus: K = !1
|
|
3396
3395
|
}) => {
|
|
@@ -3420,7 +3419,7 @@ function pl(e, t) {
|
|
|
3420
3419
|
await Yo(re);
|
|
3421
3420
|
}
|
|
3422
3421
|
} catch (G) {
|
|
3423
|
-
|
|
3422
|
+
Ue(G);
|
|
3424
3423
|
}
|
|
3425
3424
|
}, Yo = async (K) => {
|
|
3426
3425
|
const G = F == null ? void 0 : F.onChangeFields[K];
|
|
@@ -3445,44 +3444,44 @@ function pl(e, t) {
|
|
|
3445
3444
|
}), oe = await H.getHandler().executeOnChange({
|
|
3446
3445
|
model: r,
|
|
3447
3446
|
action: G.method,
|
|
3448
|
-
ids:
|
|
3447
|
+
ids: de() ? [de()] : [],
|
|
3449
3448
|
payload: re,
|
|
3450
3449
|
fields: k
|
|
3451
3450
|
});
|
|
3452
3451
|
if (oe.value) {
|
|
3453
|
-
const
|
|
3452
|
+
const Re = {
|
|
3454
3453
|
...xe(k),
|
|
3455
3454
|
...oe.value
|
|
3456
3455
|
};
|
|
3457
3456
|
Jt({
|
|
3458
3457
|
fields: k,
|
|
3459
3458
|
arch: I,
|
|
3460
|
-
values:
|
|
3459
|
+
values: Re
|
|
3461
3460
|
}), qt({
|
|
3462
|
-
values:
|
|
3461
|
+
values: Re,
|
|
3463
3462
|
fields: k,
|
|
3464
3463
|
reset: !1
|
|
3465
3464
|
});
|
|
3466
3465
|
}
|
|
3467
3466
|
if (oe.warning && oe.warning.title && oe.warning.message && !ie.current) {
|
|
3468
3467
|
const {
|
|
3469
|
-
title:
|
|
3468
|
+
title: Re,
|
|
3470
3469
|
message: yt
|
|
3471
3470
|
} = oe.warning;
|
|
3472
|
-
ie.current = !0, Xa(
|
|
3471
|
+
ie.current = !0, Xa(Re, yt, () => {
|
|
3473
3472
|
ie.current = !1;
|
|
3474
3473
|
});
|
|
3475
3474
|
}
|
|
3476
3475
|
if (oe.domain && Object.keys(oe.domain).length > 0) {
|
|
3477
|
-
const
|
|
3476
|
+
const Re = Ea({
|
|
3478
3477
|
fieldsDomain: oe.domain,
|
|
3479
3478
|
fields: k
|
|
3480
3479
|
});
|
|
3481
3480
|
Jt({
|
|
3482
|
-
fields:
|
|
3481
|
+
fields: Re,
|
|
3483
3482
|
arch: I,
|
|
3484
|
-
values: xe(
|
|
3485
|
-
}), j(
|
|
3483
|
+
values: xe(Re)
|
|
3484
|
+
}), j(Re);
|
|
3486
3485
|
}
|
|
3487
3486
|
};
|
|
3488
3487
|
async function Wo({
|
|
@@ -3492,7 +3491,7 @@ function pl(e, t) {
|
|
|
3492
3491
|
const re = await H.getHandler().execute({
|
|
3493
3492
|
model: r,
|
|
3494
3493
|
action: K,
|
|
3495
|
-
payload: [
|
|
3494
|
+
payload: [de()],
|
|
3496
3495
|
context: {
|
|
3497
3496
|
...G,
|
|
3498
3497
|
...F == null ? void 0 : F.context,
|
|
@@ -3500,9 +3499,9 @@ function pl(e, t) {
|
|
|
3500
3499
|
}
|
|
3501
3500
|
});
|
|
3502
3501
|
if (typeof re == "object" && re !== null && Object.keys(re).length === 0 && g)
|
|
3503
|
-
|
|
3502
|
+
ce == null || ce(de(), Ke(), X());
|
|
3504
3503
|
else if (re.type && re.type === "ir.actions.act_window_close")
|
|
3505
|
-
|
|
3504
|
+
ce == null || ce(de(), Ke(), X());
|
|
3506
3505
|
else if (re.type) {
|
|
3507
3506
|
let oe = {};
|
|
3508
3507
|
re.context && (oe = wt({
|
|
@@ -3527,9 +3526,9 @@ function pl(e, t) {
|
|
|
3527
3526
|
const G = await H.getHandler().executeWorkflow({
|
|
3528
3527
|
model: r,
|
|
3529
3528
|
action: K,
|
|
3530
|
-
payload:
|
|
3529
|
+
payload: de()
|
|
3531
3530
|
});
|
|
3532
|
-
G.type && G.type === "ir.actions.act_window_close" ?
|
|
3531
|
+
G.type && G.type === "ir.actions.act_window_close" ? ce == null || ce(de(), Ke(), X()) : await gt({
|
|
3533
3532
|
forceRefresh: !0
|
|
3534
3533
|
});
|
|
3535
3534
|
}
|
|
@@ -3553,7 +3552,7 @@ function pl(e, t) {
|
|
|
3553
3552
|
}) {
|
|
3554
3553
|
const {
|
|
3555
3554
|
closeParent: re
|
|
3556
|
-
} = await (
|
|
3555
|
+
} = await (Fe == null ? void 0 : Fe({
|
|
3557
3556
|
actionData: K,
|
|
3558
3557
|
fields: k,
|
|
3559
3558
|
values: Ke(),
|
|
@@ -3568,7 +3567,7 @@ function pl(e, t) {
|
|
|
3568
3567
|
});
|
|
3569
3568
|
}
|
|
3570
3569
|
})) || {};
|
|
3571
|
-
!w && re && (
|
|
3570
|
+
!w && re && (ce == null || ce(de(), Ke(), X()));
|
|
3572
3571
|
}
|
|
3573
3572
|
function qo() {
|
|
3574
3573
|
vn({
|
|
@@ -3581,7 +3580,7 @@ function pl(e, t) {
|
|
|
3581
3580
|
context: re
|
|
3582
3581
|
}) {
|
|
3583
3582
|
if (K === "cancel") {
|
|
3584
|
-
|
|
3583
|
+
me == null || me();
|
|
3585
3584
|
return;
|
|
3586
3585
|
}
|
|
3587
3586
|
if (await tt()) {
|
|
@@ -3589,7 +3588,7 @@ function pl(e, t) {
|
|
|
3589
3588
|
return;
|
|
3590
3589
|
}
|
|
3591
3590
|
try {
|
|
3592
|
-
(ye() ||
|
|
3591
|
+
(ye() || de() === void 0) && await zt({
|
|
3593
3592
|
callOnSubmitSucceed: !1
|
|
3594
3593
|
}), K === "object" ? await Wo({
|
|
3595
3594
|
action: G,
|
|
@@ -3601,19 +3600,19 @@ function pl(e, t) {
|
|
|
3601
3600
|
context: re
|
|
3602
3601
|
});
|
|
3603
3602
|
} catch (oe) {
|
|
3604
|
-
|
|
3603
|
+
Ue(oe);
|
|
3605
3604
|
}
|
|
3606
3605
|
}
|
|
3607
|
-
const Jo = () => !F && !$ ? /* @__PURE__ */ n(
|
|
3606
|
+
const Jo = () => !F && !$ ? /* @__PURE__ */ n(Me, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(ne, {
|
|
3608
3607
|
children: /* @__PURE__ */ n(ts, {
|
|
3609
3608
|
getValues: Ke,
|
|
3610
3609
|
getPlainValues: at,
|
|
3611
|
-
getFields:
|
|
3610
|
+
getFields: Xe,
|
|
3612
3611
|
domain: O,
|
|
3613
3612
|
activeId: i,
|
|
3614
3613
|
activeModel: r,
|
|
3615
|
-
setFieldValue:
|
|
3616
|
-
getFieldValue:
|
|
3614
|
+
setFieldValue: ke,
|
|
3615
|
+
getFieldValue: et,
|
|
3617
3616
|
executeButtonAction: zo,
|
|
3618
3617
|
getContext: ae,
|
|
3619
3618
|
submitForm: zt,
|
|
@@ -3630,11 +3629,11 @@ function pl(e, t) {
|
|
|
3630
3629
|
component: !1,
|
|
3631
3630
|
children: F && /* @__PURE__ */ n(Vn, {
|
|
3632
3631
|
container: F.container,
|
|
3633
|
-
responsiveBehaviour:
|
|
3632
|
+
responsiveBehaviour: fe
|
|
3634
3633
|
})
|
|
3635
3634
|
})
|
|
3636
3635
|
})
|
|
3637
|
-
}), Zo = () => /* @__PURE__ */ P(
|
|
3636
|
+
}), Zo = () => /* @__PURE__ */ P(ne, {
|
|
3638
3637
|
children: [/* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(Ce, {
|
|
3639
3638
|
justify: "end",
|
|
3640
3639
|
children: /* @__PURE__ */ P(Ye, {
|
|
@@ -3689,7 +3688,7 @@ const Ut = bt(pl), Gt = (e) => {
|
|
|
3689
3688
|
} = e, {
|
|
3690
3689
|
modalWidth: c
|
|
3691
3690
|
} = fn(), [f, d] = T(i), [m, v] = T(!1), [p, h] = T();
|
|
3692
|
-
|
|
3691
|
+
pe(() => {
|
|
3693
3692
|
a && g();
|
|
3694
3693
|
}, [l, a]);
|
|
3695
3694
|
async function g() {
|
|
@@ -3754,7 +3753,7 @@ const Ut = bt(pl), Gt = (e) => {
|
|
|
3754
3753
|
const _ = c * 0.95;
|
|
3755
3754
|
return /* @__PURE__ */ n(Qa, {
|
|
3756
3755
|
setTitle: d,
|
|
3757
|
-
children: /* @__PURE__ */ n(
|
|
3756
|
+
children: /* @__PURE__ */ n(Ge, {
|
|
3758
3757
|
title: a ? O() : f,
|
|
3759
3758
|
centered: !0,
|
|
3760
3759
|
width: c,
|
|
@@ -3794,7 +3793,7 @@ const Ut = bt(pl), Gt = (e) => {
|
|
|
3794
3793
|
name: o + "#time",
|
|
3795
3794
|
label: ""
|
|
3796
3795
|
})];
|
|
3797
|
-
return /* @__PURE__ */ P(
|
|
3796
|
+
return /* @__PURE__ */ P(ne, {
|
|
3798
3797
|
children: [r && /* @__PURE__ */ n(un, {
|
|
3799
3798
|
ooui: new At({
|
|
3800
3799
|
name: o + "_label",
|
|
@@ -3919,7 +3918,7 @@ function bl(e) {
|
|
|
3919
3918
|
},
|
|
3920
3919
|
layout: "vertical"
|
|
3921
3920
|
});
|
|
3922
|
-
return /* @__PURE__ */ P(
|
|
3921
|
+
return /* @__PURE__ */ P(ne, {
|
|
3923
3922
|
children: [r && /* @__PURE__ */ n(un, {
|
|
3924
3923
|
ooui: new At({
|
|
3925
3924
|
name: i + "_label",
|
|
@@ -4154,10 +4153,10 @@ function go(e) {
|
|
|
4154
4153
|
searchValues: m,
|
|
4155
4154
|
showLimitOptions: v = !0,
|
|
4156
4155
|
formXml: p
|
|
4157
|
-
} = e, [h, g] = T(), [y, O] = T(), [_, w] = T(!1), V =
|
|
4156
|
+
} = e, [h, g] = T(), [y, O] = T(), [_, w] = T(!1), V = ue(), {
|
|
4158
4157
|
token: D
|
|
4159
4158
|
} = Al(), [E] = ot.useForm();
|
|
4160
|
-
|
|
4159
|
+
pe(() => {
|
|
4161
4160
|
E.setFieldsValue(m);
|
|
4162
4161
|
}, [m]);
|
|
4163
4162
|
const b = () => {
|
|
@@ -4343,7 +4342,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4343
4342
|
} = e, {
|
|
4344
4343
|
t: s
|
|
4345
4344
|
} = Y(we);
|
|
4346
|
-
return /* @__PURE__ */ n(
|
|
4345
|
+
return /* @__PURE__ */ n(Ge, {
|
|
4347
4346
|
title: s("selectAction"),
|
|
4348
4347
|
centered: !0,
|
|
4349
4348
|
open: t,
|
|
@@ -4401,7 +4400,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4401
4400
|
active_id: t
|
|
4402
4401
|
}), c(!1);
|
|
4403
4402
|
} catch (S) {
|
|
4404
|
-
c(!1),
|
|
4403
|
+
c(!1), Ue(S);
|
|
4405
4404
|
return;
|
|
4406
4405
|
}
|
|
4407
4406
|
}
|
|
@@ -4413,7 +4412,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4413
4412
|
style: {
|
|
4414
4413
|
padding: 15
|
|
4415
4414
|
},
|
|
4416
|
-
children: /* @__PURE__ */ n(
|
|
4415
|
+
children: /* @__PURE__ */ n(Me, {})
|
|
4417
4416
|
})
|
|
4418
4417
|
});
|
|
4419
4418
|
if (!f || !f.toolbar)
|
|
@@ -4432,7 +4431,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4432
4431
|
icon: /* @__PURE__ */ n(Kn, {}),
|
|
4433
4432
|
children: p("report")
|
|
4434
4433
|
}, "print"), /* @__PURE__ */ n(He.Divider, {}), /* @__PURE__ */ n(He.ItemGroup, {
|
|
4435
|
-
title: /* @__PURE__ */ P(
|
|
4434
|
+
title: /* @__PURE__ */ P(ne, {
|
|
4436
4435
|
children: [/* @__PURE__ */ n(Kr, {}), " ", /* @__PURE__ */ P("span", {
|
|
4437
4436
|
children: [" ", p("related")]
|
|
4438
4437
|
})]
|
|
@@ -4483,7 +4482,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4483
4482
|
fields: f.fields
|
|
4484
4483
|
});
|
|
4485
4484
|
}
|
|
4486
|
-
return /* @__PURE__ */ P(
|
|
4485
|
+
return /* @__PURE__ */ P(ne, {
|
|
4487
4486
|
children: [/* @__PURE__ */ n(Bt, {
|
|
4488
4487
|
overlay: w(),
|
|
4489
4488
|
trigger: ["click"],
|
|
@@ -4512,13 +4511,13 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4512
4511
|
m2oField: t
|
|
4513
4512
|
} = e;
|
|
4514
4513
|
return t ? /* @__PURE__ */ P(Ye, {
|
|
4515
|
-
children: [/* @__PURE__ */ n(
|
|
4514
|
+
children: [/* @__PURE__ */ n(ne, {
|
|
4516
4515
|
children: t.value
|
|
4517
4516
|
}), /* @__PURE__ */ n(Jn, {
|
|
4518
4517
|
id: t.id,
|
|
4519
4518
|
model: t.model
|
|
4520
4519
|
})]
|
|
4521
|
-
}) : /* @__PURE__ */ n(
|
|
4520
|
+
}) : /* @__PURE__ */ n(ne, {});
|
|
4522
4521
|
}, Ll = (e) => {
|
|
4523
4522
|
const {
|
|
4524
4523
|
value: t,
|
|
@@ -4536,17 +4535,17 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4536
4535
|
});
|
|
4537
4536
|
s(v[0][1]), l(!1);
|
|
4538
4537
|
}, [t, o]);
|
|
4539
|
-
if (
|
|
4538
|
+
if (pe(() => {
|
|
4540
4539
|
d();
|
|
4541
4540
|
}, [t]), !t && !a)
|
|
4542
|
-
return /* @__PURE__ */ n(
|
|
4541
|
+
return /* @__PURE__ */ n(ne, {});
|
|
4543
4542
|
if (a)
|
|
4544
4543
|
return /* @__PURE__ */ n(rt, {});
|
|
4545
4544
|
const m = i.get(u);
|
|
4546
4545
|
return /* @__PURE__ */ P(Ye, {
|
|
4547
|
-
children: [/* @__PURE__ */ n(
|
|
4546
|
+
children: [/* @__PURE__ */ n(ne, {
|
|
4548
4547
|
children: `${m}:`
|
|
4549
|
-
}), /* @__PURE__ */ n(
|
|
4548
|
+
}), /* @__PURE__ */ n(ne, {
|
|
4550
4549
|
children: o
|
|
4551
4550
|
}), /* @__PURE__ */ n(Jn, {
|
|
4552
4551
|
id: f,
|
|
@@ -4714,13 +4713,13 @@ var wo = { exports: {} };
|
|
|
4714
4713
|
var M = this, I = this.$locale();
|
|
4715
4714
|
if (!this.isValid())
|
|
4716
4715
|
return I.invalidDate || h;
|
|
4717
|
-
var N = A || "YYYY-MM-DDTHH:mm:ssZ", k = S.z(this), j = this.$H, q = this.$m, W = this.$M, z = I.weekdays, U = I.months, L = function(ie, Q, J,
|
|
4718
|
-
return ie && (ie[Q] || ie(M, N)) || J[Q].slice(0,
|
|
4716
|
+
var N = A || "YYYY-MM-DDTHH:mm:ssZ", k = S.z(this), j = this.$H, q = this.$m, W = this.$M, z = I.weekdays, U = I.months, L = function(ie, Q, J, fe) {
|
|
4717
|
+
return ie && (ie[Q] || ie(M, N)) || J[Q].slice(0, fe);
|
|
4719
4718
|
}, B = function(ie) {
|
|
4720
4719
|
return S.s(j % 12 || 12, ie, "0");
|
|
4721
4720
|
}, ee = I.meridiem || function(ie, Q, J) {
|
|
4722
|
-
var
|
|
4723
|
-
return J ?
|
|
4721
|
+
var fe = ie < 12 ? "AM" : "PM";
|
|
4722
|
+
return J ? fe.toLowerCase() : fe;
|
|
4724
4723
|
}, Z = { YY: String(this.$y).slice(-2), YYYY: S.s(this.$y, 4, "0"), M: W + 1, MM: S.s(W + 1, 2, "0"), MMM: L(I.monthsShort, W, U, 3), MMMM: L(U, W), D: this.$D, DD: S.s(this.$D, 2, "0"), d: String(this.$W), dd: L(I.weekdaysMin, this.$W, z, 2), ddd: L(I.weekdaysShort, this.$W, z, 3), dddd: z[this.$W], H: String(j), HH: S.s(j, 2, "0"), h: B(1), hh: B(2), a: ee(j, q, !0), A: ee(j, q, !1), m: String(q), mm: S.s(q, 2, "0"), s: String(this.$s), ss: S.s(this.$s, 2, "0"), SSS: S.s(this.$ms, 3, "0"), Z: k };
|
|
4725
4724
|
return N.replace(y, function(ie, Q) {
|
|
4726
4725
|
return Q || Z[ie] || k.replace(":", "");
|
|
@@ -4980,26 +4979,26 @@ const lt = {
|
|
|
4980
4979
|
content: e == null ? void 0 : e.replace(/(?:\r\n|\r|\n)/g, "<br>")
|
|
4981
4980
|
}), Gl = (e) => {
|
|
4982
4981
|
if (!e || e && e.length === 0)
|
|
4983
|
-
return /* @__PURE__ */ n(
|
|
4982
|
+
return /* @__PURE__ */ n(ne, {});
|
|
4984
4983
|
const t = dt(e, lt.date.dateInternalFormat).format(lt.date.dateDisplayFormat);
|
|
4985
|
-
return /* @__PURE__ */ n(
|
|
4984
|
+
return /* @__PURE__ */ n(ne, {
|
|
4986
4985
|
children: t
|
|
4987
4986
|
});
|
|
4988
4987
|
}, ql = (e) => {
|
|
4989
4988
|
if (!e || e && e.length === 0)
|
|
4990
|
-
return /* @__PURE__ */ n(
|
|
4989
|
+
return /* @__PURE__ */ n(ne, {});
|
|
4991
4990
|
const t = dt(e, lt.time.dateInternalFormat).format(lt.time.dateDisplayFormat);
|
|
4992
|
-
return /* @__PURE__ */ n(
|
|
4991
|
+
return /* @__PURE__ */ n(ne, {
|
|
4993
4992
|
children: t
|
|
4994
4993
|
});
|
|
4995
4994
|
}, Sr = (e) => {
|
|
4996
4995
|
const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
|
|
4997
|
-
return /* @__PURE__ */ n(
|
|
4996
|
+
return /* @__PURE__ */ n(ne, {
|
|
4998
4997
|
children: `( ${t} )`
|
|
4999
4998
|
});
|
|
5000
4999
|
}, zl = (e) => /* @__PURE__ */ n(vo, {
|
|
5001
5000
|
value: e
|
|
5002
|
-
}), Jl = (e) => /* @__PURE__ */ n(
|
|
5001
|
+
}), Jl = (e) => /* @__PURE__ */ n(ne, {
|
|
5003
5002
|
children: yo(e)
|
|
5004
5003
|
}), Tr = (e) => /* @__PURE__ */ n("div", {
|
|
5005
5004
|
style: {
|
|
@@ -5015,9 +5014,9 @@ const lt = {
|
|
|
5015
5014
|
}), Xl = (e, t, r, i) => /* @__PURE__ */ n(bo, {
|
|
5016
5015
|
ooui: r,
|
|
5017
5016
|
value: e
|
|
5018
|
-
}), Ql = (e, t, r, i) => /* @__PURE__ */ n(
|
|
5017
|
+
}), Ql = (e, t, r, i) => /* @__PURE__ */ n(ne, {
|
|
5019
5018
|
children: r.selectionValues.get(e)
|
|
5020
|
-
}), ec = (e, t, r, i) => /* @__PURE__ */ n(
|
|
5019
|
+
}), ec = (e, t, r, i) => /* @__PURE__ */ n(ne, {
|
|
5021
5020
|
children: /* @__PURE__ */ n(Ll, {
|
|
5022
5021
|
value: e,
|
|
5023
5022
|
selectionValues: r.selectionValues,
|
|
@@ -5049,13 +5048,13 @@ function pn(e) {
|
|
|
5049
5048
|
rootTree: O = !1,
|
|
5050
5049
|
context: _,
|
|
5051
5050
|
readonly: w
|
|
5052
|
-
} = e, [V, D] = T([]), [E, b] = T([]), C =
|
|
5051
|
+
} = e, [V, D] = T([]), [E, b] = T([]), C = ue(!1), S = ue(null), {
|
|
5053
5052
|
t: x
|
|
5054
|
-
} = Y(we), $ =
|
|
5053
|
+
} = Y(we), $ = ue(r), R = Y(Qe), {
|
|
5055
5054
|
title: F = void 0,
|
|
5056
5055
|
setTitle: A = void 0
|
|
5057
5056
|
} = (O ? R : {}) || {};
|
|
5058
|
-
|
|
5057
|
+
pe(() => {
|
|
5059
5058
|
S.current = It(o);
|
|
5060
5059
|
const z = Fa(S.current, {
|
|
5061
5060
|
boolean: Yl,
|
|
@@ -5076,12 +5075,12 @@ function pn(e) {
|
|
|
5076
5075
|
avatar: tc
|
|
5077
5076
|
}, _);
|
|
5078
5077
|
b(z), S.current.string && F !== S.current.string && (A == null || A(S.current.string));
|
|
5079
|
-
}, [o]),
|
|
5078
|
+
}, [o]), pe(() => {
|
|
5080
5079
|
C.current = !1;
|
|
5081
5080
|
const z = lo(S.current, s);
|
|
5082
5081
|
D(z), $.current = r;
|
|
5083
5082
|
}, [s]);
|
|
5084
|
-
const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(
|
|
5083
|
+
const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Me, {
|
|
5085
5084
|
className: "pb-4"
|
|
5086
5085
|
}) : /* @__PURE__ */ P(Ce, {
|
|
5087
5086
|
align: "bottom",
|
|
@@ -5124,19 +5123,19 @@ function pn(e) {
|
|
|
5124
5123
|
const U = S.current;
|
|
5125
5124
|
d && U.columns.some((L) => L.sum !== void 0) && (W = d - 30);
|
|
5126
5125
|
}
|
|
5127
|
-
return S.current === null ? /* @__PURE__ */ n(
|
|
5126
|
+
return S.current === null ? /* @__PURE__ */ n(Me, {
|
|
5128
5127
|
style: {
|
|
5129
5128
|
padding: "2rem"
|
|
5130
5129
|
}
|
|
5131
5130
|
}) : /* @__PURE__ */ P("div", {
|
|
5132
|
-
children: [k(), l && /* @__PURE__ */ n(
|
|
5131
|
+
children: [k(), l && /* @__PURE__ */ n(Me, {
|
|
5133
5132
|
className: "pb-4"
|
|
5134
5133
|
}), /* @__PURE__ */ n(Ri, {
|
|
5135
5134
|
height: W,
|
|
5136
5135
|
columns: q.columns,
|
|
5137
5136
|
dataSource: V,
|
|
5138
5137
|
loading: !1,
|
|
5139
|
-
loadingComponent: /* @__PURE__ */ n(
|
|
5138
|
+
loadingComponent: /* @__PURE__ */ n(Me, {}),
|
|
5140
5139
|
onRowStyle: (z) => {
|
|
5141
5140
|
if (m[z.id])
|
|
5142
5141
|
return {
|
|
@@ -5177,11 +5176,11 @@ function nc(e, t) {
|
|
|
5177
5176
|
rootTree: f = !1,
|
|
5178
5177
|
parentContext: d = {},
|
|
5179
5178
|
onChangeSelectedRowKeys: m
|
|
5180
|
-
} = e, [v, p] = T(!1), [h, g] = T(!1), y =
|
|
5179
|
+
} = e, [v, p] = T(!1), [h, g] = T(!1), y = ue(!1), [O, _] = T(), [w, V] = T(), [D, E] = T(), [b, C] = T(), [S, x] = T(200), $ = ue(), {
|
|
5181
5180
|
height: R
|
|
5182
5181
|
} = fn(), F = Y(Et), {
|
|
5183
5182
|
processAction: A
|
|
5184
|
-
} = F || {}, M = Y(
|
|
5183
|
+
} = F || {}, M = Y(Qe), {
|
|
5185
5184
|
setResults: I = void 0,
|
|
5186
5185
|
setCurrentItemIndex: N = void 0,
|
|
5187
5186
|
currentId: k = void 0,
|
|
@@ -5197,7 +5196,7 @@ function nc(e, t) {
|
|
|
5197
5196
|
setTotalItems: ie = void 0,
|
|
5198
5197
|
setSearchTreeNameSearch: Q = void 0,
|
|
5199
5198
|
setTreeIsLoading: J = void 0,
|
|
5200
|
-
searchValues:
|
|
5199
|
+
searchValues: fe = {},
|
|
5201
5200
|
setSearchValues: be = void 0,
|
|
5202
5201
|
limit: $e = Ht,
|
|
5203
5202
|
setLimit: _e = void 0
|
|
@@ -5209,14 +5208,14 @@ function nc(e, t) {
|
|
|
5209
5208
|
searchFilterLoading: De,
|
|
5210
5209
|
searchError: Ve,
|
|
5211
5210
|
page: je,
|
|
5212
|
-
offset:
|
|
5213
|
-
getResults:
|
|
5214
|
-
requestPageChange:
|
|
5215
|
-
changeSort:
|
|
5216
|
-
fetchChildrenForRecord:
|
|
5217
|
-
colorsForResults:
|
|
5218
|
-
statusForResults:
|
|
5219
|
-
totalItems:
|
|
5211
|
+
offset: We,
|
|
5212
|
+
getResults: te,
|
|
5213
|
+
requestPageChange: Fe,
|
|
5214
|
+
changeSort: Ee,
|
|
5215
|
+
fetchChildrenForRecord: ce,
|
|
5216
|
+
colorsForResults: me,
|
|
5217
|
+
statusForResults: Te,
|
|
5218
|
+
totalItems: de
|
|
5220
5219
|
} = ho({
|
|
5221
5220
|
model: O,
|
|
5222
5221
|
setSearchTreeNameSearch: Q,
|
|
@@ -5248,42 +5247,42 @@ function nc(e, t) {
|
|
|
5248
5247
|
},
|
|
5249
5248
|
getFields: () => w == null ? void 0 : w.fields,
|
|
5250
5249
|
getDomain: () => u
|
|
5251
|
-
})),
|
|
5250
|
+
})), pe(() => {
|
|
5252
5251
|
!h || c && (y.current = !1, se());
|
|
5253
|
-
}, [je,
|
|
5254
|
-
const
|
|
5252
|
+
}, [je, We, h, c, a]);
|
|
5253
|
+
const Xe = async () => {
|
|
5255
5254
|
g(!1), p(!0), C(void 0), J == null || J(!0);
|
|
5256
5255
|
try {
|
|
5257
5256
|
await Ke(), g(!0);
|
|
5258
|
-
} catch (
|
|
5259
|
-
C(
|
|
5257
|
+
} catch (ke) {
|
|
5258
|
+
C(ke), J == null || J(!1);
|
|
5260
5259
|
} finally {
|
|
5261
5260
|
p(!1);
|
|
5262
5261
|
}
|
|
5263
5262
|
}, Ke = async () => {
|
|
5264
5263
|
_(r);
|
|
5265
|
-
let
|
|
5266
|
-
i || (
|
|
5264
|
+
let ke = i;
|
|
5265
|
+
i || (ke = await H.getHandler().getView({
|
|
5267
5266
|
model: r,
|
|
5268
5267
|
type: "form",
|
|
5269
5268
|
context: d
|
|
5270
5269
|
}));
|
|
5271
|
-
let
|
|
5272
|
-
o || (
|
|
5270
|
+
let et = o;
|
|
5271
|
+
o || (et = await H.getHandler().getView({
|
|
5273
5272
|
model: r,
|
|
5274
5273
|
type: "tree",
|
|
5275
5274
|
context: d
|
|
5276
|
-
})), E(
|
|
5275
|
+
})), E(ke), V(et);
|
|
5277
5276
|
};
|
|
5278
|
-
|
|
5279
|
-
|
|
5277
|
+
pe(() => {
|
|
5278
|
+
Xe();
|
|
5280
5279
|
}, [r]);
|
|
5281
|
-
const at = (
|
|
5282
|
-
_e == null || _e(
|
|
5283
|
-
}, X = async (
|
|
5280
|
+
const at = (ke) => {
|
|
5281
|
+
_e == null || _e(ke);
|
|
5282
|
+
}, X = async (ke) => {
|
|
5284
5283
|
const {
|
|
5285
|
-
id:
|
|
5286
|
-
} =
|
|
5284
|
+
id: et
|
|
5285
|
+
} = ke;
|
|
5287
5286
|
$.current || ($.current = await H.getHandler().treeButOpen({
|
|
5288
5287
|
id: w.view_id,
|
|
5289
5288
|
model: O,
|
|
@@ -5294,38 +5293,38 @@ function nc(e, t) {
|
|
|
5294
5293
|
actionData: tt,
|
|
5295
5294
|
fields: w.fields,
|
|
5296
5295
|
values: {
|
|
5297
|
-
active_id:
|
|
5298
|
-
...
|
|
5296
|
+
active_id: et,
|
|
5297
|
+
...ke
|
|
5299
5298
|
},
|
|
5300
5299
|
context: d
|
|
5301
5300
|
}));
|
|
5302
|
-
}, ae = async (
|
|
5301
|
+
}, ae = async (ke) => {
|
|
5303
5302
|
const {
|
|
5304
|
-
id:
|
|
5305
|
-
} =
|
|
5303
|
+
id: et
|
|
5304
|
+
} = ke;
|
|
5306
5305
|
if (w != null && w.isExpandable) {
|
|
5307
5306
|
try {
|
|
5308
|
-
await X(
|
|
5307
|
+
await X(ke);
|
|
5309
5308
|
} catch (tt) {
|
|
5310
|
-
|
|
5309
|
+
Ue(tt);
|
|
5311
5310
|
}
|
|
5312
5311
|
return;
|
|
5313
5312
|
}
|
|
5314
5313
|
s({
|
|
5315
|
-
id:
|
|
5314
|
+
id: et,
|
|
5316
5315
|
model: O,
|
|
5317
5316
|
formView: D,
|
|
5318
5317
|
treeView: w
|
|
5319
5318
|
});
|
|
5320
5319
|
};
|
|
5321
|
-
function
|
|
5322
|
-
const
|
|
5323
|
-
W == null || W(
|
|
5320
|
+
function Ae(ke) {
|
|
5321
|
+
const et = te().filter((tt) => ke.includes(tt.id));
|
|
5322
|
+
W == null || W(et), m == null || m(ke);
|
|
5324
5323
|
}
|
|
5325
|
-
function
|
|
5324
|
+
function he() {
|
|
5326
5325
|
return w != null && w.isExpandable ? R - 160 : R - (S + 210);
|
|
5327
5326
|
}
|
|
5328
|
-
const ye = () => !w || !D ? null : /* @__PURE__ */ P(
|
|
5327
|
+
const ye = () => !w || !D ? null : /* @__PURE__ */ P(ne, {
|
|
5329
5328
|
children: [/* @__PURE__ */ n(go, {
|
|
5330
5329
|
fields: {
|
|
5331
5330
|
...w.fields,
|
|
@@ -5335,34 +5334,34 @@ function nc(e, t) {
|
|
|
5335
5334
|
formXml: D.arch,
|
|
5336
5335
|
onClear: ge,
|
|
5337
5336
|
limit: $e,
|
|
5338
|
-
offset:
|
|
5337
|
+
offset: We,
|
|
5339
5338
|
isSearching: De,
|
|
5340
5339
|
onSubmit: Be,
|
|
5341
5340
|
onLimitChange: at,
|
|
5342
5341
|
setSearchFilterHeight: x,
|
|
5343
5342
|
searchError: Ve,
|
|
5344
5343
|
searchVisible: L,
|
|
5345
|
-
searchValues:
|
|
5344
|
+
searchValues: fe
|
|
5346
5345
|
}), /* @__PURE__ */ n(pn, {
|
|
5347
5346
|
context: d,
|
|
5348
|
-
total:
|
|
5347
|
+
total: de,
|
|
5349
5348
|
limit: $e,
|
|
5350
5349
|
page: je,
|
|
5351
5350
|
treeView: w,
|
|
5352
|
-
results:
|
|
5353
|
-
onRequestPageChange:
|
|
5351
|
+
results: te(),
|
|
5352
|
+
onRequestPageChange: Fe,
|
|
5354
5353
|
loading: Se,
|
|
5355
5354
|
onRowClicked: ae,
|
|
5356
|
-
scrollY: l ||
|
|
5357
|
-
colorsForResults:
|
|
5358
|
-
statusForResults:
|
|
5355
|
+
scrollY: l || he(),
|
|
5356
|
+
colorsForResults: me,
|
|
5357
|
+
statusForResults: Te,
|
|
5359
5358
|
rowSelection: {
|
|
5360
|
-
selectedRowKeys: q == null ? void 0 : q.map((
|
|
5361
|
-
onChange:
|
|
5359
|
+
selectedRowKeys: q == null ? void 0 : q.map((ke) => ke.id),
|
|
5360
|
+
onChange: Ae
|
|
5362
5361
|
},
|
|
5363
5362
|
sorter: ee,
|
|
5364
|
-
onChangeSort:
|
|
5365
|
-
onFetchChildrenForRecord: w.isExpandable ?
|
|
5363
|
+
onChangeSort: Ee,
|
|
5364
|
+
onFetchChildrenForRecord: w.isExpandable ? ce : void 0,
|
|
5366
5365
|
childField: w.field_parent,
|
|
5367
5366
|
rootTree: f
|
|
5368
5367
|
})]
|
|
@@ -5376,7 +5375,7 @@ function nc(e, t) {
|
|
|
5376
5375
|
style: c ? {} : {
|
|
5377
5376
|
display: "none"
|
|
5378
5377
|
},
|
|
5379
|
-
children: v ? /* @__PURE__ */ n(
|
|
5378
|
+
children: v ? /* @__PURE__ */ n(Me, {}) : ye()
|
|
5380
5379
|
});
|
|
5381
5380
|
}
|
|
5382
5381
|
const To = bt(nc), Fo = (e) => {
|
|
@@ -5408,7 +5407,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5408
5407
|
}
|
|
5409
5408
|
i(v);
|
|
5410
5409
|
}
|
|
5411
|
-
const O = () => /* @__PURE__ */ P(
|
|
5410
|
+
const O = () => /* @__PURE__ */ P(ne, {
|
|
5412
5411
|
children: [/* @__PURE__ */ n(To, {
|
|
5413
5412
|
model: o,
|
|
5414
5413
|
nameSearch: s,
|
|
@@ -5443,8 +5442,8 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5443
5442
|
})
|
|
5444
5443
|
})]
|
|
5445
5444
|
});
|
|
5446
|
-
return /* @__PURE__ */ P(
|
|
5447
|
-
children: [/* @__PURE__ */ n(
|
|
5445
|
+
return /* @__PURE__ */ P(ne, {
|
|
5446
|
+
children: [/* @__PURE__ */ n(Ge, {
|
|
5448
5447
|
title: m("search"),
|
|
5449
5448
|
centered: !0,
|
|
5450
5449
|
width: f,
|
|
@@ -5469,7 +5468,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5469
5468
|
});
|
|
5470
5469
|
}, {
|
|
5471
5470
|
error: rc
|
|
5472
|
-
} =
|
|
5471
|
+
} = Ge, nn = (e) => {
|
|
5473
5472
|
rc({
|
|
5474
5473
|
title: "Error",
|
|
5475
5474
|
icon: /* @__PURE__ */ n(pt, {}),
|
|
@@ -5515,16 +5514,16 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5515
5514
|
domain: c
|
|
5516
5515
|
} = i, f = o && !a ? {
|
|
5517
5516
|
backgroundColor: Oo.colorPrimaryBg
|
|
5518
|
-
} : void 0, [d, m] = T(!1), [v, p] = T(!1), [h, g] = T(!1), [y, O] = T(), _ =
|
|
5517
|
+
} : void 0, [d, m] = T(!1), [v, p] = T(!1), [h, g] = T(!1), [y, O] = T(), _ = ue(!1), [w, V] = T(""), D = ue(), E = Y(Ne), {
|
|
5519
5518
|
domain: b,
|
|
5520
5519
|
getValues: C,
|
|
5521
5520
|
getFields: S,
|
|
5522
5521
|
getContext: x,
|
|
5523
5522
|
elementHasLostFocus: $
|
|
5524
|
-
} = E || {}, R =
|
|
5525
|
-
|
|
5523
|
+
} = E || {}, R = ue([]), [F, A] = T([]), M = t && t[0] || void 0, I = t && t[1] || "";
|
|
5524
|
+
pe(() => {
|
|
5526
5525
|
!Array.isArray(t) && t && W(t);
|
|
5527
|
-
}, [t]),
|
|
5526
|
+
}, [t]), pe(() => {
|
|
5528
5527
|
M && I.length === 0 ? W(M) : M && I.length > 0 ? V(I) : !M && !I && V(D.current || "");
|
|
5529
5528
|
}, [t]);
|
|
5530
5529
|
const N = (B) => {
|
|
@@ -5734,7 +5733,7 @@ const To = bt(nc), Fo = (e) => {
|
|
|
5734
5733
|
operator: f,
|
|
5735
5734
|
manualIds: d
|
|
5736
5735
|
} = e, [m, v] = T(!1), [p, h] = T(), [g, y] = T(), [O, _] = T(), [w, V] = T(0), [D, E] = T(0), [b, C] = T(), [S, x] = T(), [$, R] = T();
|
|
5737
|
-
|
|
5736
|
+
pe(() => {
|
|
5738
5737
|
M();
|
|
5739
5738
|
}, [t, o]);
|
|
5740
5739
|
async function F({
|
|
@@ -6286,7 +6285,7 @@ const xc = {
|
|
|
6286
6285
|
banner: !0
|
|
6287
6286
|
});
|
|
6288
6287
|
if (c)
|
|
6289
|
-
return /* @__PURE__ */ n(
|
|
6288
|
+
return /* @__PURE__ */ n(Me, {});
|
|
6290
6289
|
if (!f)
|
|
6291
6290
|
return /* @__PURE__ */ n(Ze, {
|
|
6292
6291
|
message: "No data to display",
|
|
@@ -6316,7 +6315,7 @@ const xc = {
|
|
|
6316
6315
|
isStack: h
|
|
6317
6316
|
})
|
|
6318
6317
|
})]
|
|
6319
|
-
}) : /* @__PURE__ */ n(
|
|
6318
|
+
}) : /* @__PURE__ */ n(ne, {
|
|
6320
6319
|
children: `Unknown graph type: ${d}`
|
|
6321
6320
|
});
|
|
6322
6321
|
};
|
|
@@ -6338,14 +6337,14 @@ const Tc = (e, t) => {
|
|
|
6338
6337
|
domain: s,
|
|
6339
6338
|
limit: a,
|
|
6340
6339
|
manualIds: l
|
|
6341
|
-
} = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), p = Y(
|
|
6340
|
+
} = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), p = Y(Qe), {
|
|
6342
6341
|
setGraphIsLoading: h = void 0
|
|
6343
6342
|
} = p || {};
|
|
6344
6343
|
xt(t, () => ({
|
|
6345
6344
|
refresh: () => {
|
|
6346
6345
|
g();
|
|
6347
6346
|
}
|
|
6348
|
-
})),
|
|
6347
|
+
})), pe(() => {
|
|
6349
6348
|
g();
|
|
6350
6349
|
}, [r]);
|
|
6351
6350
|
async function g() {
|
|
@@ -6361,7 +6360,7 @@ const Tc = (e, t) => {
|
|
|
6361
6360
|
const O = Ln(y.arch);
|
|
6362
6361
|
d(O);
|
|
6363
6362
|
} catch (y) {
|
|
6364
|
-
return console.error(y), /* @__PURE__ */ n(
|
|
6363
|
+
return console.error(y), /* @__PURE__ */ n(ne, {
|
|
6365
6364
|
children: JSON.stringify(y)
|
|
6366
6365
|
});
|
|
6367
6366
|
}
|
|
@@ -6417,13 +6416,13 @@ const Tc = (e, t) => {
|
|
|
6417
6416
|
manualIds: l
|
|
6418
6417
|
});
|
|
6419
6418
|
default:
|
|
6420
|
-
return /* @__PURE__ */ n(
|
|
6419
|
+
return /* @__PURE__ */ n(ne, {
|
|
6421
6420
|
children: `Graph ${f.type} not implemented`
|
|
6422
6421
|
});
|
|
6423
6422
|
}
|
|
6424
6423
|
}, gn = bt(Tc), {
|
|
6425
6424
|
confirm: Fc
|
|
6426
|
-
} =
|
|
6425
|
+
} = Ge, Oc = ({
|
|
6427
6426
|
onOk: e,
|
|
6428
6427
|
lang: t
|
|
6429
6428
|
}) => {
|
|
@@ -6438,7 +6437,7 @@ const Tc = (e, t) => {
|
|
|
6438
6437
|
});
|
|
6439
6438
|
}, {
|
|
6440
6439
|
confirm: Ic
|
|
6441
|
-
} =
|
|
6440
|
+
} = Ge, _c = ({
|
|
6442
6441
|
onOk: e,
|
|
6443
6442
|
lang: t
|
|
6444
6443
|
}) => {
|
|
@@ -6510,7 +6509,7 @@ const Tc = (e, t) => {
|
|
|
6510
6509
|
});
|
|
6511
6510
|
}
|
|
6512
6511
|
function V() {
|
|
6513
|
-
return /* @__PURE__ */ P(
|
|
6512
|
+
return /* @__PURE__ */ P(ne, {
|
|
6514
6513
|
children: [y(), /* @__PURE__ */ n(ze, {
|
|
6515
6514
|
tooltip: "Previous item",
|
|
6516
6515
|
icon: /* @__PURE__ */ n(Yr, {}),
|
|
@@ -6580,46 +6579,46 @@ const kc = (e) => {
|
|
|
6580
6579
|
} = f || {}, {
|
|
6581
6580
|
lang: g,
|
|
6582
6581
|
t: y
|
|
6583
|
-
} = Y(we), [O, _] = T(!1), [w, V] = T(!1), [D, E] = T(), [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T([]), [M, I] = T(!1), N =
|
|
6582
|
+
} = Y(we), [O, _] = T(!1), [w, V] = T(!1), [D, E] = T(), [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T([]), [M, I] = T(!1), N = ue([]), [k, j] = T(), q = ue(), [W, z] = T(void 0), {
|
|
6584
6583
|
readOnly: U,
|
|
6585
6584
|
relation: L,
|
|
6586
6585
|
context: B,
|
|
6587
6586
|
domain: ee
|
|
6588
6587
|
} = i, Z = i.type === "many2many", {
|
|
6589
6588
|
id: ie
|
|
6590
|
-
} = i, Q = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), J =
|
|
6591
|
-
|
|
6589
|
+
} = i, Q = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), J = ue();
|
|
6590
|
+
pe(() => {
|
|
6592
6591
|
if (J.current !== a) {
|
|
6593
|
-
J.current = a,
|
|
6592
|
+
J.current = a, fe();
|
|
6594
6593
|
return;
|
|
6595
6594
|
}
|
|
6596
|
-
|
|
6595
|
+
fe();
|
|
6597
6596
|
}, [s, a]);
|
|
6598
|
-
const
|
|
6597
|
+
const fe = Le(() => {
|
|
6599
6598
|
(a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && $e();
|
|
6600
6599
|
}, [s, a]);
|
|
6601
|
-
|
|
6600
|
+
pe(() => {
|
|
6602
6601
|
Be();
|
|
6603
6602
|
}, [h]);
|
|
6604
6603
|
const be = (X) => {
|
|
6605
|
-
var ae,
|
|
6604
|
+
var ae, Ae;
|
|
6606
6605
|
r == null || r({
|
|
6607
|
-
fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((
|
|
6606
|
+
fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((Ae = o.get("tree")) == null ? void 0 : Ae.fields),
|
|
6608
6607
|
items: Rc(X)
|
|
6609
6608
|
});
|
|
6610
6609
|
}, $e = async () => {
|
|
6611
6610
|
await _e(), u > Q.length - 1 && u !== 0 && c(0);
|
|
6612
6611
|
}, _e = async (X) => {
|
|
6613
|
-
var ae,
|
|
6612
|
+
var ae, Ae, he;
|
|
6614
6613
|
V(!0), _(!1), E(void 0);
|
|
6615
6614
|
try {
|
|
6616
6615
|
const [ye, xe] = await zn({
|
|
6617
6616
|
treeView: {
|
|
6618
6617
|
arch: (ae = o.get("tree")) == null ? void 0 : ae.arch,
|
|
6619
|
-
fields: (
|
|
6618
|
+
fields: (Ae = o.get("tree")) == null ? void 0 : Ae.fields
|
|
6620
6619
|
},
|
|
6621
6620
|
formView: {
|
|
6622
|
-
fields: ((
|
|
6621
|
+
fields: ((he = o.get("form")) == null ? void 0 : he.fields) || {}
|
|
6623
6622
|
},
|
|
6624
6623
|
model: L,
|
|
6625
6624
|
items: s,
|
|
@@ -6629,7 +6628,7 @@ const kc = (e) => {
|
|
|
6629
6628
|
},
|
|
6630
6629
|
currentView: X || a
|
|
6631
6630
|
});
|
|
6632
|
-
return q.current || (q.current = ye.map((
|
|
6631
|
+
return q.current || (q.current = ye.map((ke) => ke.id)), (a || X) === "tree" && xe && z(xe), be(ye), ye;
|
|
6633
6632
|
} catch (ye) {
|
|
6634
6633
|
E(ye);
|
|
6635
6634
|
} finally {
|
|
@@ -6673,7 +6672,7 @@ const kc = (e) => {
|
|
|
6673
6672
|
...p == null ? void 0 : p(),
|
|
6674
6673
|
...B
|
|
6675
6674
|
}
|
|
6676
|
-
}))[0],
|
|
6675
|
+
}))[0], Ae = (await H.getHandler().readObjects({
|
|
6677
6676
|
model: L,
|
|
6678
6677
|
ids: [X],
|
|
6679
6678
|
fields: o.get("tree").fields,
|
|
@@ -6681,13 +6680,13 @@ const kc = (e) => {
|
|
|
6681
6680
|
...p == null ? void 0 : p(),
|
|
6682
6681
|
...B
|
|
6683
6682
|
}
|
|
6684
|
-
}))[0],
|
|
6683
|
+
}))[0], he = s.map((ye) => ye.id === X ? {
|
|
6685
6684
|
...ye,
|
|
6686
6685
|
operation: "original",
|
|
6687
6686
|
values: ae,
|
|
6688
|
-
treeValues:
|
|
6687
|
+
treeValues: Ae
|
|
6689
6688
|
} : ye);
|
|
6690
|
-
be(
|
|
6689
|
+
be(he);
|
|
6691
6690
|
}, Ve = (X) => {
|
|
6692
6691
|
O ? Wt({
|
|
6693
6692
|
lang: g,
|
|
@@ -6700,7 +6699,7 @@ const kc = (e) => {
|
|
|
6700
6699
|
_c({
|
|
6701
6700
|
lang: g,
|
|
6702
6701
|
onOk: () => {
|
|
6703
|
-
a === "form" ?
|
|
6702
|
+
a === "form" ? Fe() : Ee();
|
|
6704
6703
|
}
|
|
6705
6704
|
});
|
|
6706
6705
|
return;
|
|
@@ -6708,10 +6707,10 @@ const kc = (e) => {
|
|
|
6708
6707
|
Oc({
|
|
6709
6708
|
lang: g,
|
|
6710
6709
|
onOk: () => {
|
|
6711
|
-
a === "form" ?
|
|
6710
|
+
a === "form" ? Fe() : Ee();
|
|
6712
6711
|
}
|
|
6713
6712
|
});
|
|
6714
|
-
},
|
|
6713
|
+
}, We = async () => {
|
|
6715
6714
|
const {
|
|
6716
6715
|
inv_field: X
|
|
6717
6716
|
} = i;
|
|
@@ -6725,11 +6724,11 @@ const kc = (e) => {
|
|
|
6725
6724
|
}) : (I(!0), R({
|
|
6726
6725
|
defaultValues: ae
|
|
6727
6726
|
}), C(!0));
|
|
6728
|
-
},
|
|
6727
|
+
}, te = async () => {
|
|
6729
6728
|
a === "form" ? Ve(() => {
|
|
6730
6729
|
x(!0);
|
|
6731
6730
|
}) : x(!0);
|
|
6732
|
-
},
|
|
6731
|
+
}, Fe = async () => {
|
|
6733
6732
|
V(!0), _(!1), E(void 0);
|
|
6734
6733
|
try {
|
|
6735
6734
|
if (Q[u].id > 0) {
|
|
@@ -6744,66 +6743,66 @@ const kc = (e) => {
|
|
|
6744
6743
|
E(X);
|
|
6745
6744
|
}
|
|
6746
6745
|
c(0), V(!1);
|
|
6747
|
-
},
|
|
6746
|
+
}, Ee = async () => {
|
|
6748
6747
|
const X = Q.filter((ae) => F.includes(ae.id));
|
|
6749
6748
|
V(!0), _(!1), E(void 0);
|
|
6750
6749
|
try {
|
|
6751
|
-
const ae = X.map((
|
|
6752
|
-
...
|
|
6750
|
+
const ae = X.map((he) => he.id), Ae = s.filter((he) => !(ae.includes(he.id) && he.id < 0)).map((he) => ae.includes(he.id) ? {
|
|
6751
|
+
...he,
|
|
6753
6752
|
operation: "pendingRemove"
|
|
6754
|
-
} :
|
|
6755
|
-
be(
|
|
6753
|
+
} : he);
|
|
6754
|
+
be(Ae);
|
|
6756
6755
|
} catch (ae) {
|
|
6757
6756
|
E(ae);
|
|
6758
6757
|
}
|
|
6759
6758
|
c(0), V(!1);
|
|
6760
|
-
},
|
|
6761
|
-
let
|
|
6759
|
+
}, ce = (X, ae, Ae) => {
|
|
6760
|
+
let he;
|
|
6762
6761
|
if (X)
|
|
6763
|
-
|
|
6762
|
+
he = s.map((ye) => ye.id === X ? {
|
|
6764
6763
|
id: X,
|
|
6765
6764
|
operation: X > 0 ? "pendingUpdate" : "pendingCreate",
|
|
6766
6765
|
values: {
|
|
6767
|
-
...
|
|
6766
|
+
...Ae,
|
|
6768
6767
|
id: X
|
|
6769
6768
|
},
|
|
6770
6769
|
treeValues: {
|
|
6771
|
-
...
|
|
6770
|
+
...Ae,
|
|
6772
6771
|
id: X
|
|
6773
6772
|
}
|
|
6774
6773
|
} : ye);
|
|
6775
6774
|
else {
|
|
6776
6775
|
const ye = Oa(s);
|
|
6777
|
-
|
|
6776
|
+
he = s.concat({
|
|
6778
6777
|
id: ye,
|
|
6779
6778
|
operation: "pendingCreate",
|
|
6780
6779
|
values: {
|
|
6781
|
-
...
|
|
6780
|
+
...Ae,
|
|
6782
6781
|
id: ye
|
|
6783
6782
|
},
|
|
6784
6783
|
treeValues: {
|
|
6785
|
-
...
|
|
6784
|
+
...Ae,
|
|
6786
6785
|
id: ye
|
|
6787
6786
|
}
|
|
6788
6787
|
});
|
|
6789
6788
|
}
|
|
6790
|
-
be(
|
|
6791
|
-
},
|
|
6789
|
+
be(he), M || C(!1);
|
|
6790
|
+
}, me = async (X) => {
|
|
6792
6791
|
const {
|
|
6793
6792
|
id: ae
|
|
6794
6793
|
} = X;
|
|
6795
|
-
let
|
|
6796
|
-
const
|
|
6797
|
-
(
|
|
6798
|
-
},
|
|
6794
|
+
let Ae = s;
|
|
6795
|
+
const he = s.find((ye) => ye.id === ae);
|
|
6796
|
+
(he == null ? void 0 : he.values) === void 0 && (Ae = await _e("form")), R(Ae.find((ye) => ye.id === ae)), I(!1), C(!0);
|
|
6797
|
+
}, Te = async (X) => {
|
|
6799
6798
|
V(!0);
|
|
6800
6799
|
let ae = s;
|
|
6801
|
-
const
|
|
6800
|
+
const Ae = X.filter((he) => !s.find((ye) => ye.id === he));
|
|
6802
6801
|
try {
|
|
6803
|
-
for (const
|
|
6802
|
+
for (const he of Ae) {
|
|
6804
6803
|
const ye = (await H.getHandler().readObjects({
|
|
6805
6804
|
model: L,
|
|
6806
|
-
ids: [
|
|
6805
|
+
ids: [he],
|
|
6807
6806
|
fields: o.get("form").fields,
|
|
6808
6807
|
context: {
|
|
6809
6808
|
...p == null ? void 0 : p(),
|
|
@@ -6811,7 +6810,7 @@ const kc = (e) => {
|
|
|
6811
6810
|
}
|
|
6812
6811
|
}))[0], xe = (await H.getHandler().readObjects({
|
|
6813
6812
|
model: L,
|
|
6814
|
-
ids: [
|
|
6813
|
+
ids: [he],
|
|
6815
6814
|
fields: o.get("tree").fields,
|
|
6816
6815
|
context: {
|
|
6817
6816
|
...p == null ? void 0 : p(),
|
|
@@ -6819,20 +6818,20 @@ const kc = (e) => {
|
|
|
6819
6818
|
}
|
|
6820
6819
|
}))[0];
|
|
6821
6820
|
ae.push({
|
|
6822
|
-
id:
|
|
6821
|
+
id: he,
|
|
6823
6822
|
operation: "pendingLink",
|
|
6824
6823
|
values: ye,
|
|
6825
6824
|
treeValues: xe
|
|
6826
6825
|
});
|
|
6827
6826
|
}
|
|
6828
6827
|
be(ae);
|
|
6829
|
-
} catch (
|
|
6830
|
-
E(
|
|
6828
|
+
} catch (he) {
|
|
6829
|
+
E(he);
|
|
6831
6830
|
} finally {
|
|
6832
6831
|
V(!1);
|
|
6833
6832
|
}
|
|
6834
6833
|
};
|
|
6835
|
-
function
|
|
6834
|
+
function de() {
|
|
6836
6835
|
const X = Ac[a];
|
|
6837
6836
|
if (a === "graph")
|
|
6838
6837
|
return Ln(o.get("graph").arch).string;
|
|
@@ -6841,10 +6840,10 @@ const kc = (e) => {
|
|
|
6841
6840
|
return ae.parse(o.get(a).arch), ae.string;
|
|
6842
6841
|
}
|
|
6843
6842
|
}
|
|
6844
|
-
const
|
|
6845
|
-
var ae,
|
|
6843
|
+
const Xe = () => {
|
|
6844
|
+
var ae, Ae, he, ye;
|
|
6846
6845
|
if (a === "form")
|
|
6847
|
-
return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(
|
|
6846
|
+
return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(Ut, {
|
|
6848
6847
|
formView: o.get("form"),
|
|
6849
6848
|
values: (ae = Q[u]) == null ? void 0 : ae.values,
|
|
6850
6849
|
parentContext: {
|
|
@@ -6852,23 +6851,23 @@ const kc = (e) => {
|
|
|
6852
6851
|
...B
|
|
6853
6852
|
},
|
|
6854
6853
|
model: L,
|
|
6855
|
-
id: (
|
|
6854
|
+
id: (Ae = Q[u]) == null ? void 0 : Ae.id,
|
|
6856
6855
|
submitMode: "values",
|
|
6857
6856
|
onFieldsChange: (xe) => {
|
|
6858
6857
|
var tt;
|
|
6859
|
-
const
|
|
6858
|
+
const ke = (tt = Q[u]) == null ? void 0 : tt.id, et = s.map((ut) => ut.id === ke ? {
|
|
6860
6859
|
...ut,
|
|
6861
6860
|
operation: ut.operation === "original" ? "pendingUpdate" : ut.operation,
|
|
6862
6861
|
values: {
|
|
6863
6862
|
...xe,
|
|
6864
|
-
id:
|
|
6863
|
+
id: ke
|
|
6865
6864
|
},
|
|
6866
6865
|
treeValues: {
|
|
6867
6866
|
...xe,
|
|
6868
|
-
id:
|
|
6867
|
+
id: ke
|
|
6869
6868
|
}
|
|
6870
6869
|
} : ut);
|
|
6871
|
-
be(
|
|
6870
|
+
be(et), _(!0);
|
|
6872
6871
|
},
|
|
6873
6872
|
readOnly: U
|
|
6874
6873
|
});
|
|
@@ -6878,7 +6877,7 @@ const kc = (e) => {
|
|
|
6878
6877
|
sorter: k,
|
|
6879
6878
|
fields: {
|
|
6880
6879
|
...o.get("tree").fields,
|
|
6881
|
-
...((
|
|
6880
|
+
...((he = o.get("form")) == null ? void 0 : he.fields) || {}
|
|
6882
6881
|
}
|
|
6883
6882
|
}) : Q.map((xe) => xe.treeValues)), a === "tree")
|
|
6884
6883
|
return /* @__PURE__ */ n(pn, {
|
|
@@ -6887,7 +6886,7 @@ const kc = (e) => {
|
|
|
6887
6886
|
treeView: o.get("tree"),
|
|
6888
6887
|
results: X,
|
|
6889
6888
|
loading: w,
|
|
6890
|
-
onRowClicked: ((ye = o.get("form")) == null ? void 0 : ye.fields) !== void 0 ?
|
|
6889
|
+
onRowClicked: ((ye = o.get("form")) == null ? void 0 : ye.fields) !== void 0 ? me : void 0,
|
|
6891
6890
|
showPagination: !1,
|
|
6892
6891
|
rowSelection: {
|
|
6893
6892
|
selectedRowKeys: F,
|
|
@@ -6924,25 +6923,25 @@ const kc = (e) => {
|
|
|
6924
6923
|
banner: !0
|
|
6925
6924
|
});
|
|
6926
6925
|
const Ke = M;
|
|
6927
|
-
return w ? /* @__PURE__ */ n(
|
|
6926
|
+
return w ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
|
|
6928
6927
|
children: [/* @__PURE__ */ n(Vc, {
|
|
6929
6928
|
mode: a,
|
|
6930
|
-
title:
|
|
6929
|
+
title: de(),
|
|
6931
6930
|
readOnly: U,
|
|
6932
6931
|
isMany2Many: Z,
|
|
6933
6932
|
formHasChanges: O,
|
|
6934
6933
|
totalItems: Q.length,
|
|
6935
6934
|
currentItemIndex: u,
|
|
6936
6935
|
onDelete: je,
|
|
6937
|
-
onCreateItem:
|
|
6936
|
+
onCreateItem: We,
|
|
6938
6937
|
onToggleViewMode: ge,
|
|
6939
6938
|
onPreviousItem: se,
|
|
6940
6939
|
onNextItem: Se,
|
|
6941
|
-
onSearchItem:
|
|
6940
|
+
onSearchItem: te,
|
|
6942
6941
|
selectedRowKeys: F,
|
|
6943
6942
|
showCreateButton: ((at = o.get("form")) == null ? void 0 : at.fields) !== void 0,
|
|
6944
6943
|
showToggleButton: o.size > 1
|
|
6945
|
-
}),
|
|
6944
|
+
}), Xe(), /* @__PURE__ */ n(Gt, {
|
|
6946
6945
|
formView: o.get("form"),
|
|
6947
6946
|
model: L,
|
|
6948
6947
|
id: $ == null ? void 0 : $.id,
|
|
@@ -6950,7 +6949,7 @@ const kc = (e) => {
|
|
|
6950
6949
|
values: $ == null ? void 0 : $.values,
|
|
6951
6950
|
defaultValues: $ == null ? void 0 : $.defaultValues,
|
|
6952
6951
|
visible: b,
|
|
6953
|
-
onSubmitSucceed:
|
|
6952
|
+
onSubmitSucceed: ce,
|
|
6954
6953
|
parentContext: {
|
|
6955
6954
|
...p == null ? void 0 : p(),
|
|
6956
6955
|
...B
|
|
@@ -6969,7 +6968,7 @@ const kc = (e) => {
|
|
|
6969
6968
|
},
|
|
6970
6969
|
visible: S,
|
|
6971
6970
|
onSelectValues: async (X) => {
|
|
6972
|
-
x(!1),
|
|
6971
|
+
x(!1), Te(X);
|
|
6973
6972
|
},
|
|
6974
6973
|
onCloseModal: () => {
|
|
6975
6974
|
x(!1);
|
|
@@ -7019,7 +7018,7 @@ const kc = (e) => {
|
|
|
7019
7018
|
c(!1);
|
|
7020
7019
|
}
|
|
7021
7020
|
};
|
|
7022
|
-
return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(
|
|
7021
|
+
return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(Me, {}) : f ? /* @__PURE__ */ n(Ze, {
|
|
7023
7022
|
className: "mt-10",
|
|
7024
7023
|
message: f,
|
|
7025
7024
|
type: "error",
|
|
@@ -7075,10 +7074,10 @@ const kc = (e) => {
|
|
|
7075
7074
|
token: l
|
|
7076
7075
|
} = Ec(), u = a && !s ? {
|
|
7077
7076
|
backgroundColor: l.colorPrimaryBg
|
|
7078
|
-
} : void 0, c =
|
|
7077
|
+
} : void 0, c = ue(), [f, d] = T(), m = Y(Ne), {
|
|
7079
7078
|
elementHasLostFocus: v
|
|
7080
7079
|
} = m || {};
|
|
7081
|
-
|
|
7080
|
+
pe(() => {
|
|
7082
7081
|
d(yo(r));
|
|
7083
7082
|
}, [r]);
|
|
7084
7083
|
const p = (y) => {
|
|
@@ -7107,7 +7106,7 @@ function Vo(e) {
|
|
|
7107
7106
|
showLabel: r = !0,
|
|
7108
7107
|
responsiveBehaviour: i
|
|
7109
7108
|
} = e, o = it(t.icon || "");
|
|
7110
|
-
return /* @__PURE__ */ n(
|
|
7109
|
+
return /* @__PURE__ */ n(ne, {
|
|
7111
7110
|
children: (t.label || o) && r ? /* @__PURE__ */ n($i, {
|
|
7112
7111
|
label: t.label,
|
|
7113
7112
|
icon: o,
|
|
@@ -7139,7 +7138,7 @@ function Pc(e) {
|
|
|
7139
7138
|
defaultActiveKey: "1",
|
|
7140
7139
|
tabPosition: t.tabPosition,
|
|
7141
7140
|
children: i.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ n(Nc, {
|
|
7142
|
-
tab: /* @__PURE__ */ P(
|
|
7141
|
+
tab: /* @__PURE__ */ P(ne, {
|
|
7143
7142
|
children: [o(s.icon), " ", s.label]
|
|
7144
7143
|
}),
|
|
7145
7144
|
children: /* @__PURE__ */ n(Vo, {
|
|
@@ -7203,7 +7202,7 @@ const {
|
|
|
7203
7202
|
} = s || {}, [d, m] = T(!1), {
|
|
7204
7203
|
t: v
|
|
7205
7204
|
} = Y(we);
|
|
7206
|
-
return a ? /* @__PURE__ */ P(
|
|
7205
|
+
return a ? /* @__PURE__ */ P(ne, {
|
|
7207
7206
|
children: [/* @__PURE__ */ n("div", {
|
|
7208
7207
|
onClick: () => {
|
|
7209
7208
|
if (c != null && c()) {
|
|
@@ -7240,7 +7239,7 @@ const {
|
|
|
7240
7239
|
m(!1), u == null || u();
|
|
7241
7240
|
}
|
|
7242
7241
|
})]
|
|
7243
|
-
}) : /* @__PURE__ */ P(
|
|
7242
|
+
}) : /* @__PURE__ */ P(ne, {
|
|
7244
7243
|
children: [/* @__PURE__ */ n(Ce, {
|
|
7245
7244
|
gutter: 8,
|
|
7246
7245
|
wrap: !1,
|
|
@@ -7295,7 +7294,7 @@ const {
|
|
|
7295
7294
|
limit: s,
|
|
7296
7295
|
onClose: a
|
|
7297
7296
|
}) => {
|
|
7298
|
-
const l =
|
|
7297
|
+
const l = ue({}), u = ue(/* @__PURE__ */ new Map()), c = Le(
|
|
7299
7298
|
async (g) => {
|
|
7300
7299
|
if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
|
|
7301
7300
|
ct(Oe("selectAtLeastOneField", r));
|
|
@@ -7685,8 +7684,8 @@ var Ro = { exports: {} };
|
|
|
7685
7684
|
return new Date((I === "X" ? 1e3 : 1) * M);
|
|
7686
7685
|
var k = p(I)(M), j = k.year, q = k.month, W = k.day, z = k.hours, U = k.minutes, L = k.seconds, B = k.milliseconds, ee = k.zone, Z = new Date(), ie = W || (j || q ? 1 : Z.getDate()), Q = j || Z.getFullYear(), J = 0;
|
|
7687
7686
|
j && !q || (J = q > 0 ? q - 1 : Z.getMonth());
|
|
7688
|
-
var
|
|
7689
|
-
return ee ? new Date(Date.UTC(Q, J, ie,
|
|
7687
|
+
var fe = z || 0, be = U || 0, $e = L || 0, _e = B || 0;
|
|
7688
|
+
return ee ? new Date(Date.UTC(Q, J, ie, fe, be, $e, _e + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Q, J, ie, fe, be, $e, _e)) : new Date(Q, J, ie, fe, be, $e, _e);
|
|
7690
7689
|
} catch {
|
|
7691
7690
|
return new Date("");
|
|
7692
7691
|
}
|
|
@@ -7747,7 +7746,7 @@ const nd = (e) => {
|
|
|
7747
7746
|
selectionValues: s,
|
|
7748
7747
|
readOnly: a
|
|
7749
7748
|
} = i, l = t == null ? void 0 : t.split(","), [u, c] = T([]), [f, d] = T();
|
|
7750
|
-
return
|
|
7749
|
+
return pe(() => {
|
|
7751
7750
|
if (!t) {
|
|
7752
7751
|
d(void 0), c([]);
|
|
7753
7752
|
return;
|
|
@@ -7821,7 +7820,7 @@ const nd = (e) => {
|
|
|
7821
7820
|
token: l
|
|
7822
7821
|
} = sd(), u = s && !o ? {
|
|
7823
7822
|
backgroundColor: l.colorPrimaryBg
|
|
7824
|
-
} : void 0, c =
|
|
7823
|
+
} : void 0, c = ue(null), {
|
|
7825
7824
|
setFieldValue: f,
|
|
7826
7825
|
getFieldValue: d
|
|
7827
7826
|
} = Y(Ne) || {}, {
|
|
@@ -8060,7 +8059,7 @@ function ko(e) {
|
|
|
8060
8059
|
} = e, {
|
|
8061
8060
|
formHasChanges: r,
|
|
8062
8061
|
onNewClicked: i
|
|
8063
|
-
} = Y(
|
|
8062
|
+
} = Y(Qe), {
|
|
8064
8063
|
t: o,
|
|
8065
8064
|
lang: s
|
|
8066
8065
|
} = Y(we), a = () => {
|
|
@@ -8084,7 +8083,7 @@ function ko(e) {
|
|
|
8084
8083
|
}
|
|
8085
8084
|
const {
|
|
8086
8085
|
confirm: cd
|
|
8087
|
-
} =
|
|
8086
|
+
} = Ge, dd = ({
|
|
8088
8087
|
onOk: e,
|
|
8089
8088
|
onCancel: t,
|
|
8090
8089
|
lang: r
|
|
@@ -8148,11 +8147,11 @@ const ud = (e) => {
|
|
|
8148
8147
|
onOpenAttachmentDetail: l,
|
|
8149
8148
|
onListAllAttachments: u
|
|
8150
8149
|
} = e;
|
|
8151
|
-
return o ? /* @__PURE__ */ n(
|
|
8150
|
+
return o ? /* @__PURE__ */ n(Me, {
|
|
8152
8151
|
style: {
|
|
8153
8152
|
padding: 20
|
|
8154
8153
|
}
|
|
8155
|
-
}) : /* @__PURE__ */ P(
|
|
8154
|
+
}) : /* @__PURE__ */ P(ne, {
|
|
8156
8155
|
children: [/* @__PURE__ */ P("a", {
|
|
8157
8156
|
style: {
|
|
8158
8157
|
display: "block",
|
|
@@ -8172,7 +8171,7 @@ const ud = (e) => {
|
|
|
8172
8171
|
t(!1), s();
|
|
8173
8172
|
},
|
|
8174
8173
|
children: [/* @__PURE__ */ n(cn, {}), " ", Oe("addNewAttachment", r)]
|
|
8175
|
-
}), i.length > 0 && /* @__PURE__ */ P(
|
|
8174
|
+
}), i.length > 0 && /* @__PURE__ */ P(ne, {
|
|
8176
8175
|
children: [/* @__PURE__ */ n("li", {
|
|
8177
8176
|
className: "ant-dropdown-menu-item-divider"
|
|
8178
8177
|
}), i.map((c) => {
|
|
@@ -8234,7 +8233,7 @@ function md(e) {
|
|
|
8234
8233
|
onViewAttachmentDetails: s
|
|
8235
8234
|
} = e, {
|
|
8236
8235
|
formRef: a
|
|
8237
|
-
} = Y(
|
|
8236
|
+
} = Y(Qe), [l, u] = T(!1), [c, f] = T([]), [d, m] = T(!1), {
|
|
8238
8237
|
t: v
|
|
8239
8238
|
} = Y(we), p = Le(async () => {
|
|
8240
8239
|
u(!0);
|
|
@@ -8252,7 +8251,7 @@ function md(e) {
|
|
|
8252
8251
|
link: O.link
|
|
8253
8252
|
})));
|
|
8254
8253
|
} catch (y) {
|
|
8255
|
-
|
|
8254
|
+
Ue(y);
|
|
8256
8255
|
}
|
|
8257
8256
|
u(!1);
|
|
8258
8257
|
}, t), h = Le(async (y) => {
|
|
@@ -8269,7 +8268,7 @@ function md(e) {
|
|
|
8269
8268
|
context: a.current.getContext()
|
|
8270
8269
|
}))[0];
|
|
8271
8270
|
} catch (_) {
|
|
8272
|
-
|
|
8271
|
+
Ue(_);
|
|
8273
8272
|
}
|
|
8274
8273
|
if (m(!1), !!O)
|
|
8275
8274
|
if (O.datas) {
|
|
@@ -8280,9 +8279,9 @@ function md(e) {
|
|
|
8280
8279
|
}, []), g = Le(async (y) => {
|
|
8281
8280
|
s(y);
|
|
8282
8281
|
}, []);
|
|
8283
|
-
return
|
|
8282
|
+
return pe(() => {
|
|
8284
8283
|
p();
|
|
8285
|
-
}, [p]), /* @__PURE__ */ P(
|
|
8284
|
+
}, [p]), /* @__PURE__ */ P(ne, {
|
|
8286
8285
|
children: [/* @__PURE__ */ n(ud, {
|
|
8287
8286
|
numberOfAttachments: t.length,
|
|
8288
8287
|
attachments: c,
|
|
@@ -8292,14 +8291,14 @@ function md(e) {
|
|
|
8292
8291
|
onListAllAttachments: o,
|
|
8293
8292
|
onopenAttachmentLink: h,
|
|
8294
8293
|
onOpenAttachmentDetail: g
|
|
8295
|
-
}), /* @__PURE__ */ n(
|
|
8294
|
+
}), /* @__PURE__ */ n(Ge, {
|
|
8296
8295
|
title: v("downloadingAttachment"),
|
|
8297
8296
|
open: d,
|
|
8298
8297
|
footer: null,
|
|
8299
8298
|
closable: !1,
|
|
8300
8299
|
centered: !0,
|
|
8301
8300
|
maskClosable: !1,
|
|
8302
|
-
children: /* @__PURE__ */ n(
|
|
8301
|
+
children: /* @__PURE__ */ n(Me, {})
|
|
8303
8302
|
})]
|
|
8304
8303
|
});
|
|
8305
8304
|
}
|
|
@@ -8331,7 +8330,7 @@ function hd({
|
|
|
8331
8330
|
previousView: D,
|
|
8332
8331
|
setPreviousView: E,
|
|
8333
8332
|
goToResourceId: b
|
|
8334
|
-
} = Y(
|
|
8333
|
+
} = Y(Qe), {
|
|
8335
8334
|
t: C,
|
|
8336
8335
|
lang: S
|
|
8337
8336
|
} = Y(we), x = Y(Et), {
|
|
@@ -8424,8 +8423,8 @@ function hd({
|
|
|
8424
8423
|
}
|
|
8425
8424
|
return r ? /* @__PURE__ */ P(Ye, {
|
|
8426
8425
|
wrap: !0,
|
|
8427
|
-
children: [O && /* @__PURE__ */ P(
|
|
8428
|
-
children: [/* @__PURE__ */ n(
|
|
8426
|
+
children: [O && /* @__PURE__ */ P(ne, {
|
|
8427
|
+
children: [/* @__PURE__ */ n(Me, {}), Tt(), Tt()]
|
|
8429
8428
|
}), /* @__PURE__ */ n(ko, {
|
|
8430
8429
|
disabled: a || O || p || h
|
|
8431
8430
|
}), /* @__PURE__ */ n(qe, {
|
|
@@ -8620,7 +8619,7 @@ const {
|
|
|
8620
8619
|
} : void 0, d = Y(Ne), {
|
|
8621
8620
|
elementHasLostFocus: m
|
|
8622
8621
|
} = d || {}, [v, p] = T(!1), [h, g] = T(!1);
|
|
8623
|
-
|
|
8622
|
+
pe(() => {
|
|
8624
8623
|
l && !v && g(!1), !r && !l && (p(!0), g(!0));
|
|
8625
8624
|
}, [v, l]);
|
|
8626
8625
|
const y = (O) => {
|
|
@@ -8719,7 +8718,7 @@ const {
|
|
|
8719
8718
|
function a(l) {
|
|
8720
8719
|
r(l.id);
|
|
8721
8720
|
}
|
|
8722
|
-
return /* @__PURE__ */ n(
|
|
8721
|
+
return /* @__PURE__ */ n(Ge, {
|
|
8723
8722
|
title: s("goToResourceId"),
|
|
8724
8723
|
centered: !0,
|
|
8725
8724
|
open: t,
|
|
@@ -8829,7 +8828,7 @@ function bd({
|
|
|
8829
8828
|
graphIsLoading: u,
|
|
8830
8829
|
previousView: c,
|
|
8831
8830
|
setPreviousView: f
|
|
8832
|
-
} = Y(
|
|
8831
|
+
} = Y(Qe);
|
|
8833
8832
|
return /* @__PURE__ */ P(Ye, {
|
|
8834
8833
|
wrap: !0,
|
|
8835
8834
|
children: [/* @__PURE__ */ n($o, {
|
|
@@ -8882,14 +8881,14 @@ function yn(e) {
|
|
|
8882
8881
|
results: l,
|
|
8883
8882
|
totalItems: u,
|
|
8884
8883
|
selectedRowItems: c
|
|
8885
|
-
} = Y(
|
|
8884
|
+
} = Y(Qe), {
|
|
8886
8885
|
t: f
|
|
8887
8886
|
} = Y(we), {
|
|
8888
8887
|
token: d
|
|
8889
8888
|
} = xd();
|
|
8890
8889
|
function m() {
|
|
8891
8890
|
if ((o == null ? void 0 : o.type) === "form")
|
|
8892
|
-
return s ? u === 0 ? /* @__PURE__ */ P(
|
|
8891
|
+
return s ? u === 0 ? /* @__PURE__ */ P(ne, {
|
|
8893
8892
|
children: [f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8894
8893
|
copyable: {
|
|
8895
8894
|
icon: /* @__PURE__ */ n(Un, {
|
|
@@ -8900,7 +8899,7 @@ function yn(e) {
|
|
|
8900
8899
|
},
|
|
8901
8900
|
children: s
|
|
8902
8901
|
}), ")"]
|
|
8903
|
-
}) : /* @__PURE__ */ P(
|
|
8902
|
+
}) : /* @__PURE__ */ P(ne, {
|
|
8904
8903
|
children: [f("register"), " ", a === void 0 ? 1 : a + 1, " /", " ", l.length, " ", f("of"), " ", u, " - ", f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8905
8904
|
copyable: !0,
|
|
8906
8905
|
children: s
|
|
@@ -8908,14 +8907,14 @@ function yn(e) {
|
|
|
8908
8907
|
}) : "";
|
|
8909
8908
|
if ((o == null ? void 0 : o.type) === "tree" && c) {
|
|
8910
8909
|
if (c.length === 1)
|
|
8911
|
-
return /* @__PURE__ */ P(
|
|
8910
|
+
return /* @__PURE__ */ P(ne, {
|
|
8912
8911
|
children: ["1 ", f("selectedRegisters"), " - (id:", " ", /* @__PURE__ */ n(Xt, {
|
|
8913
8912
|
copyable: !0,
|
|
8914
8913
|
children: c[0].id
|
|
8915
8914
|
}), ")"]
|
|
8916
8915
|
});
|
|
8917
8916
|
if (c.length > 1)
|
|
8918
|
-
return /* @__PURE__ */ P(
|
|
8917
|
+
return /* @__PURE__ */ P(ne, {
|
|
8919
8918
|
children: [c.length, " ", f("selectedRegisters"), /* @__PURE__ */ n(Xt, {
|
|
8920
8919
|
copyable: {
|
|
8921
8920
|
text: c.map((v) => v.id).join(", ")
|
|
@@ -8969,7 +8968,7 @@ const Sd = (e) => {
|
|
|
8969
8968
|
domain: s,
|
|
8970
8969
|
formView: a,
|
|
8971
8970
|
treeView: l
|
|
8972
|
-
} = e, u =
|
|
8971
|
+
} = e, u = ue(), c = Y(Qe), {
|
|
8973
8972
|
setResults: f = void 0,
|
|
8974
8973
|
setCurrentItemIndex: d = void 0,
|
|
8975
8974
|
currentId: m = void 0,
|
|
@@ -8990,10 +8989,10 @@ const Sd = (e) => {
|
|
|
8990
8989
|
setSearchValues: x,
|
|
8991
8990
|
currentView: $
|
|
8992
8991
|
} = c || {}, [R, F] = T(!0);
|
|
8993
|
-
|
|
8992
|
+
pe(() => {
|
|
8994
8993
|
var j;
|
|
8995
8994
|
(j = u.current) == null || j.refresh();
|
|
8996
|
-
}, [C]),
|
|
8995
|
+
}, [C]), pe(() => {
|
|
8997
8996
|
t.view_id !== $.view_id && F(!0);
|
|
8998
8997
|
}, [$]);
|
|
8999
8998
|
const {
|
|
@@ -9025,7 +9024,7 @@ const Sd = (e) => {
|
|
|
9025
9024
|
limit: E,
|
|
9026
9025
|
setLimit: b
|
|
9027
9026
|
});
|
|
9028
|
-
return !r || !t ? null : /* @__PURE__ */ P(
|
|
9027
|
+
return !r || !t ? null : /* @__PURE__ */ P(ne, {
|
|
9029
9028
|
children: [/* @__PURE__ */ n(yn, {
|
|
9030
9029
|
title: t.name,
|
|
9031
9030
|
children: /* @__PURE__ */ n(bd, {
|
|
@@ -9051,7 +9050,7 @@ const Sd = (e) => {
|
|
|
9051
9050
|
searchVisible: g,
|
|
9052
9051
|
searchValues: S,
|
|
9053
9052
|
showLimitOptions: !1
|
|
9054
|
-
}), k ? /* @__PURE__ */ n(
|
|
9053
|
+
}), k ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(gn, {
|
|
9055
9054
|
ref: u,
|
|
9056
9055
|
view_id: t.view_id,
|
|
9057
9056
|
model: i,
|
|
@@ -9076,7 +9075,7 @@ const Sd = (e) => {
|
|
|
9076
9075
|
setResults: d,
|
|
9077
9076
|
setCurrentItemIndex: m
|
|
9078
9077
|
} = e;
|
|
9079
|
-
return t ? /* @__PURE__ */ P(
|
|
9078
|
+
return t ? /* @__PURE__ */ P(ne, {
|
|
9080
9079
|
children: [/* @__PURE__ */ n(yn, {
|
|
9081
9080
|
children: /* @__PURE__ */ n(hd, {
|
|
9082
9081
|
toolbar: a == null ? void 0 : a.toolbar
|
|
@@ -9108,7 +9107,7 @@ function Fd(e) {
|
|
|
9108
9107
|
function u(f) {
|
|
9109
9108
|
t(f.search);
|
|
9110
9109
|
}
|
|
9111
|
-
|
|
9110
|
+
pe(() => {
|
|
9112
9111
|
s.setFieldsValue({
|
|
9113
9112
|
search: i
|
|
9114
9113
|
});
|
|
@@ -9193,7 +9192,7 @@ function Id(e) {
|
|
|
9193
9192
|
results: V,
|
|
9194
9193
|
limit: D,
|
|
9195
9194
|
totalItems: E
|
|
9196
|
-
} = Y(
|
|
9195
|
+
} = Y(Qe), {
|
|
9197
9196
|
parentContext: b = {},
|
|
9198
9197
|
treeExpandable: C,
|
|
9199
9198
|
toolbar: S
|
|
@@ -9222,7 +9221,7 @@ function Id(e) {
|
|
|
9222
9221
|
ids: o.map((L) => L.id)
|
|
9223
9222
|
}), d == null || d(void 0), m == null || m(void 0), (U = f == null ? void 0 : f.current) == null || U.refreshResults();
|
|
9224
9223
|
} catch (L) {
|
|
9225
|
-
|
|
9224
|
+
Ue(L);
|
|
9226
9225
|
} finally {
|
|
9227
9226
|
s == null || s(!1);
|
|
9228
9227
|
}
|
|
@@ -9240,7 +9239,7 @@ function Id(e) {
|
|
|
9240
9239
|
}
|
|
9241
9240
|
}) && ((U = f == null ? void 0 : f.current) == null || U.refreshResults());
|
|
9242
9241
|
} catch (L) {
|
|
9243
|
-
|
|
9242
|
+
Ue(L);
|
|
9244
9243
|
} finally {
|
|
9245
9244
|
u == null || u(!1);
|
|
9246
9245
|
}
|
|
@@ -9266,9 +9265,9 @@ function Id(e) {
|
|
|
9266
9265
|
}
|
|
9267
9266
|
return /* @__PURE__ */ P(Ye, {
|
|
9268
9267
|
wrap: !0,
|
|
9269
|
-
children: [O && /* @__PURE__ */ P(
|
|
9270
|
-
children: [/* @__PURE__ */ n(
|
|
9271
|
-
}), C ? null : /* @__PURE__ */ P(
|
|
9268
|
+
children: [O && /* @__PURE__ */ P(ne, {
|
|
9269
|
+
children: [/* @__PURE__ */ n(Me, {}), vt(), vt()]
|
|
9270
|
+
}), C ? null : /* @__PURE__ */ P(ne, {
|
|
9272
9271
|
children: [/* @__PURE__ */ n(Fd, {
|
|
9273
9272
|
disabled: l || a || O,
|
|
9274
9273
|
searchText: y,
|
|
@@ -9320,7 +9319,7 @@ function Id(e) {
|
|
|
9320
9319
|
var U;
|
|
9321
9320
|
(U = f == null ? void 0 : f.current) == null || U.refreshResults();
|
|
9322
9321
|
}
|
|
9323
|
-
}), !C && /* @__PURE__ */ P(
|
|
9322
|
+
}), !C && /* @__PURE__ */ P(ne, {
|
|
9324
9323
|
children: [vt(), /* @__PURE__ */ n(Zn, {
|
|
9325
9324
|
currentView: r,
|
|
9326
9325
|
availableViews: t,
|
|
@@ -9352,7 +9351,7 @@ function Id(e) {
|
|
|
9352
9351
|
}
|
|
9353
9352
|
});
|
|
9354
9353
|
}
|
|
9355
|
-
}), x && /* @__PURE__ */ P(
|
|
9354
|
+
}), x && /* @__PURE__ */ P(ne, {
|
|
9356
9355
|
children: [vt(), /* @__PURE__ */ n(Dt, {
|
|
9357
9356
|
icon: /* @__PURE__ */ n(Lr, {
|
|
9358
9357
|
component: () => /* @__PURE__ */ P("svg", {
|
|
@@ -9446,8 +9445,8 @@ const _d = (e) => {
|
|
|
9446
9445
|
} = e, {
|
|
9447
9446
|
currentView: p,
|
|
9448
9447
|
setPreviousView: h
|
|
9449
|
-
} = Y(
|
|
9450
|
-
return t ? /* @__PURE__ */ P(
|
|
9448
|
+
} = Y(Qe);
|
|
9449
|
+
return t ? /* @__PURE__ */ P(ne, {
|
|
9451
9450
|
children: [/* @__PURE__ */ n(yn, {
|
|
9452
9451
|
children: /* @__PURE__ */ n(Id, {
|
|
9453
9452
|
toolbar: a == null ? void 0 : a.toolbar,
|
|
@@ -9544,7 +9543,7 @@ function Ad() {
|
|
|
9544
9543
|
const Rd = (e) => {
|
|
9545
9544
|
const {
|
|
9546
9545
|
dashboardData: t
|
|
9547
|
-
} = e, r =
|
|
9546
|
+
} = e, r = ue(), i = Y(st), {
|
|
9548
9547
|
openShortcut: o
|
|
9549
9548
|
} = i || {};
|
|
9550
9549
|
return t ? /* @__PURE__ */ P(Dd, {
|
|
@@ -9597,65 +9596,65 @@ function Md(e, t) {
|
|
|
9597
9596
|
limit: g
|
|
9598
9597
|
} = e, [y, O] = T(), [_, w] = T([]), [V, D] = T(!0), E = m || void 0, [b, C] = T(E), [S, x] = T([]), [$, R] = T(), [F, A] = T([]), [M, I] = T(), [N, k] = T(0), [j, q] = T(!1), [W, z] = T(!1), [U, L] = T(), {
|
|
9599
9598
|
t: B
|
|
9600
|
-
} = Y(we), ee =
|
|
9599
|
+
} = Y(we), ee = ue(), Z = ue(), ie = Y(st), {
|
|
9601
9600
|
setCurrentView: Q,
|
|
9602
9601
|
setCurrentId: J,
|
|
9603
|
-
tabs:
|
|
9602
|
+
tabs: fe,
|
|
9604
9603
|
activeKey: be,
|
|
9605
9604
|
openAction: $e,
|
|
9606
9605
|
onRemoveTab: _e
|
|
9607
9606
|
} = ie || {};
|
|
9608
|
-
Hi("ctrl+g,command+g", (
|
|
9609
|
-
|
|
9610
|
-
}, [be,
|
|
9611
|
-
function Be(
|
|
9612
|
-
C(
|
|
9607
|
+
Hi("ctrl+g,command+g", (te) => {
|
|
9608
|
+
te.preventDefault(), De();
|
|
9609
|
+
}, [be, fe, y, $, F]);
|
|
9610
|
+
function Be(te) {
|
|
9611
|
+
C(te), J == null || J(te);
|
|
9613
9612
|
}
|
|
9614
|
-
function ge(
|
|
9615
|
-
O(
|
|
9613
|
+
function ge(te) {
|
|
9614
|
+
O(te), Q == null || Q(te);
|
|
9616
9615
|
}
|
|
9617
9616
|
xt(t, () => ({
|
|
9618
9617
|
canWeClose: Se
|
|
9619
9618
|
}));
|
|
9620
9619
|
const se = async () => {
|
|
9621
9620
|
D(!0);
|
|
9622
|
-
const
|
|
9623
|
-
for (const
|
|
9624
|
-
const [
|
|
9625
|
-
|
|
9626
|
-
viewTuple:
|
|
9621
|
+
const te = [], Fe = [];
|
|
9622
|
+
for (const me of s) {
|
|
9623
|
+
const [Te, de] = me;
|
|
9624
|
+
de !== "dashboard" ? Fe.push({
|
|
9625
|
+
viewTuple: me,
|
|
9627
9626
|
promise: H.getHandler().getView({
|
|
9628
9627
|
model: i,
|
|
9629
|
-
type:
|
|
9630
|
-
id:
|
|
9628
|
+
type: de,
|
|
9629
|
+
id: Te,
|
|
9631
9630
|
context: o
|
|
9632
9631
|
})
|
|
9633
|
-
}) :
|
|
9634
|
-
viewTuple:
|
|
9632
|
+
}) : Fe.push({
|
|
9633
|
+
viewTuple: me
|
|
9635
9634
|
});
|
|
9636
9635
|
}
|
|
9637
|
-
const
|
|
9638
|
-
for (const
|
|
9639
|
-
if (!
|
|
9636
|
+
const Ee = await kd(Fe);
|
|
9637
|
+
for (const me of Ee) {
|
|
9638
|
+
if (!me)
|
|
9640
9639
|
continue;
|
|
9641
|
-
const [,
|
|
9642
|
-
let
|
|
9643
|
-
switch (
|
|
9640
|
+
const [, Te] = me.viewTuple;
|
|
9641
|
+
let de = me.info;
|
|
9642
|
+
switch (Te) {
|
|
9644
9643
|
case "dashboard": {
|
|
9645
|
-
const
|
|
9644
|
+
const Xe = s.find((at) => {
|
|
9646
9645
|
const [, X] = at;
|
|
9647
9646
|
return X === "form";
|
|
9648
9647
|
});
|
|
9649
9648
|
let Ke;
|
|
9650
|
-
|
|
9649
|
+
Xe && (Ke = {
|
|
9651
9650
|
action_id: v,
|
|
9652
9651
|
action_type: p,
|
|
9653
9652
|
name: a,
|
|
9654
9653
|
res_id: o.active_id,
|
|
9655
9654
|
res_model: i,
|
|
9656
|
-
view_id:
|
|
9657
|
-
view_type:
|
|
9658
|
-
}),
|
|
9655
|
+
view_id: Xe[0],
|
|
9656
|
+
view_type: Xe[1]
|
|
9657
|
+
}), te.push({
|
|
9659
9658
|
type: "dashboard",
|
|
9660
9659
|
id: o.active_id,
|
|
9661
9660
|
model: i,
|
|
@@ -9665,70 +9664,70 @@ function Md(e, t) {
|
|
|
9665
9664
|
break;
|
|
9666
9665
|
}
|
|
9667
9666
|
case "form": {
|
|
9668
|
-
|
|
9669
|
-
...
|
|
9670
|
-
type:
|
|
9667
|
+
te.push({
|
|
9668
|
+
...de,
|
|
9669
|
+
type: Te
|
|
9671
9670
|
});
|
|
9672
9671
|
break;
|
|
9673
9672
|
}
|
|
9674
9673
|
case "tree": {
|
|
9675
|
-
|
|
9676
|
-
...
|
|
9674
|
+
te.push({
|
|
9675
|
+
...de,
|
|
9677
9676
|
isExpandable: h,
|
|
9678
|
-
type:
|
|
9677
|
+
type: Te
|
|
9679
9678
|
});
|
|
9680
9679
|
break;
|
|
9681
9680
|
}
|
|
9682
9681
|
case "graph": {
|
|
9683
|
-
|
|
9684
|
-
...
|
|
9685
|
-
type:
|
|
9682
|
+
te.push({
|
|
9683
|
+
...de,
|
|
9684
|
+
type: Te
|
|
9686
9685
|
});
|
|
9687
9686
|
break;
|
|
9688
9687
|
}
|
|
9689
9688
|
}
|
|
9690
9689
|
}
|
|
9691
|
-
let
|
|
9692
|
-
!c &&
|
|
9693
|
-
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), _e == null || _e(u)), ge(
|
|
9690
|
+
let ce;
|
|
9691
|
+
!c && te.find((me) => me.type === "tree") ? ce = te.find((Te) => Te.type === "tree") : c ? ce = te.find((Te) => c.id ? Te.type === c.type && Te.view_id === c.id : Te.type === c.type) : ce = te.find((Te) => Te.type === "form"), ce || (Ue(`Error determining the first view to show for model ${i}.
|
|
9692
|
+
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), _e == null || _e(u)), ge(ce), w(te), D(!1);
|
|
9694
9693
|
};
|
|
9695
9694
|
l({
|
|
9696
9695
|
tabKey: u,
|
|
9697
9696
|
canWeClose: Se
|
|
9698
|
-
}),
|
|
9699
|
-
const
|
|
9700
|
-
ge(
|
|
9701
|
-
}, [i, s, m]),
|
|
9697
|
+
}), pe(() => {
|
|
9698
|
+
const te = _.find((Ee) => Ee.type === "tree"), Fe = _.find((Ee) => c.id ? Ee.type === c.type && Ee.view_id === c.id : Ee.type === c.type);
|
|
9699
|
+
ge(Fe || te), m ? J == null || J(E) : (Be(void 0), R(void 0)), se();
|
|
9700
|
+
}, [i, s, m]), pe(() => {
|
|
9702
9701
|
be === u && (J == null || J(b), Q == null || Q(y));
|
|
9703
|
-
}, [
|
|
9702
|
+
}, [fe, be]);
|
|
9704
9703
|
async function Se() {
|
|
9705
9704
|
return y && y.type === "form" ? await ee.current.cancelUnsavedChanges() : !0;
|
|
9706
9705
|
}
|
|
9707
9706
|
async function De() {
|
|
9708
9707
|
be === u && (y.type === "form" && !await ee.current.cancelUnsavedChanges() || q(!0));
|
|
9709
9708
|
}
|
|
9710
|
-
async function Ve(
|
|
9711
|
-
var
|
|
9709
|
+
async function Ve(te) {
|
|
9710
|
+
var me;
|
|
9712
9711
|
z(!0);
|
|
9713
|
-
const
|
|
9714
|
-
let
|
|
9715
|
-
if (
|
|
9712
|
+
const Fe = F.findIndex((Te) => Te.id === te);
|
|
9713
|
+
let Ee;
|
|
9714
|
+
if (Fe === -1) {
|
|
9716
9715
|
try {
|
|
9717
|
-
|
|
9716
|
+
Ee = (me = await H.getHandler().readObjects({
|
|
9718
9717
|
model: i,
|
|
9719
|
-
ids: [
|
|
9718
|
+
ids: [te],
|
|
9720
9719
|
context: o
|
|
9721
|
-
})) == null ? void 0 :
|
|
9720
|
+
})) == null ? void 0 : me[0];
|
|
9722
9721
|
} catch {
|
|
9723
9722
|
}
|
|
9724
|
-
if (!
|
|
9723
|
+
if (!Ee) {
|
|
9725
9724
|
z(!1), q(!1), ct(B("idNotFound"));
|
|
9726
9725
|
return;
|
|
9727
9726
|
}
|
|
9728
9727
|
} else
|
|
9729
|
-
|
|
9728
|
+
Ee = F[Fe];
|
|
9730
9729
|
z(!1), q(!1);
|
|
9731
|
-
const
|
|
9730
|
+
const ce = s.find((Te) => Te[1] === "form");
|
|
9732
9731
|
$e({
|
|
9733
9732
|
domain: [],
|
|
9734
9733
|
context: o,
|
|
@@ -9737,23 +9736,23 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9737
9736
|
title: a,
|
|
9738
9737
|
target: "current",
|
|
9739
9738
|
initialView: {
|
|
9740
|
-
id:
|
|
9739
|
+
id: ce == null ? void 0 : ce[0],
|
|
9741
9740
|
type: "form"
|
|
9742
9741
|
},
|
|
9743
9742
|
action_id: v,
|
|
9744
9743
|
action_type: p,
|
|
9745
|
-
res_id:
|
|
9744
|
+
res_id: te
|
|
9746
9745
|
});
|
|
9747
9746
|
}
|
|
9748
9747
|
function je() {
|
|
9749
|
-
return _.map((
|
|
9750
|
-
switch (
|
|
9748
|
+
return _.map((te) => {
|
|
9749
|
+
switch (te.type) {
|
|
9751
9750
|
case "form":
|
|
9752
9751
|
return /* @__PURE__ */ n(Td, {
|
|
9753
9752
|
formRef: ee,
|
|
9754
9753
|
currentId: b,
|
|
9755
|
-
visible: y.type ===
|
|
9756
|
-
formView:
|
|
9754
|
+
visible: y.type === te.type && y.view_id === te.view_id,
|
|
9755
|
+
formView: te,
|
|
9757
9756
|
model: i,
|
|
9758
9757
|
context: o,
|
|
9759
9758
|
domain: r,
|
|
@@ -9762,16 +9761,16 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9762
9761
|
results: F,
|
|
9763
9762
|
setResults: A,
|
|
9764
9763
|
setCurrentItemIndex: R
|
|
9765
|
-
}, `${
|
|
9764
|
+
}, `${te.type}-${te.view_id}`);
|
|
9766
9765
|
case "tree":
|
|
9767
9766
|
return /* @__PURE__ */ n(_d, {
|
|
9768
|
-
visible: y.type ===
|
|
9767
|
+
visible: y.type === te.type && y.view_id === te.view_id,
|
|
9769
9768
|
limit: g,
|
|
9770
9769
|
model: i,
|
|
9771
9770
|
context: o,
|
|
9772
9771
|
domain: r,
|
|
9773
|
-
formView: _.find((
|
|
9774
|
-
treeView:
|
|
9772
|
+
formView: _.find((Fe) => Fe.type === "form"),
|
|
9773
|
+
treeView: te,
|
|
9775
9774
|
searchTreeRef: Z,
|
|
9776
9775
|
searchTreeNameSearch: U,
|
|
9777
9776
|
availableViews: _,
|
|
@@ -9779,41 +9778,41 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9779
9778
|
setCurrentItemIndex: R,
|
|
9780
9779
|
setCurrentId: Be,
|
|
9781
9780
|
setCurrentView: ge
|
|
9782
|
-
}, `${
|
|
9781
|
+
}, `${te.type}-${te.view_id}`);
|
|
9783
9782
|
case "graph":
|
|
9784
9783
|
return /* @__PURE__ */ n(Sd, {
|
|
9785
|
-
visible: y.type ===
|
|
9786
|
-
viewData:
|
|
9784
|
+
visible: y.type === te.type && y.view_id === te.view_id,
|
|
9785
|
+
viewData: te,
|
|
9787
9786
|
model: i,
|
|
9788
9787
|
context: o,
|
|
9789
9788
|
domain: r,
|
|
9790
|
-
treeView: _.find((
|
|
9791
|
-
formView: _.find((
|
|
9792
|
-
}, `${
|
|
9789
|
+
treeView: _.find((Fe) => Fe.type === "tree"),
|
|
9790
|
+
formView: _.find((Fe) => Fe.type === "form")
|
|
9791
|
+
}, `${te.type}-${te.view_id}`);
|
|
9793
9792
|
case "dashboard":
|
|
9794
9793
|
return /* @__PURE__ */ n(Rd, {
|
|
9795
|
-
dashboardData:
|
|
9796
|
-
}, `${
|
|
9794
|
+
dashboardData: te
|
|
9795
|
+
}, `${te.type}-${te.view_id}`);
|
|
9797
9796
|
}
|
|
9798
9797
|
});
|
|
9799
9798
|
}
|
|
9800
|
-
function
|
|
9799
|
+
function We() {
|
|
9801
9800
|
if (b === void 0 && y.type === "form")
|
|
9802
9801
|
ee.current.clearAndReload();
|
|
9803
9802
|
else {
|
|
9804
9803
|
Be(void 0);
|
|
9805
|
-
const
|
|
9806
|
-
ge(
|
|
9804
|
+
const te = _.find((Fe) => Fe.type === "form");
|
|
9805
|
+
ge(te);
|
|
9807
9806
|
}
|
|
9808
9807
|
}
|
|
9809
|
-
return V ? /* @__PURE__ */ n(
|
|
9808
|
+
return V ? /* @__PURE__ */ n(Me, {}) : y ? /* @__PURE__ */ P(ll, {
|
|
9810
9809
|
title: a,
|
|
9811
9810
|
currentView: y,
|
|
9812
9811
|
setCurrentView: ge,
|
|
9813
9812
|
availableViews: _,
|
|
9814
9813
|
formRef: ee,
|
|
9815
9814
|
searchTreeRef: Z,
|
|
9816
|
-
onNewClicked:
|
|
9815
|
+
onNewClicked: We,
|
|
9817
9816
|
currentId: b,
|
|
9818
9817
|
setCurrentId: Be,
|
|
9819
9818
|
setCurrentItemIndex: R,
|
|
@@ -10004,17 +10003,17 @@ function jd(e) {
|
|
|
10004
10003
|
domain: s = [],
|
|
10005
10004
|
visible: a = !0,
|
|
10006
10005
|
parentContext: l = {}
|
|
10007
|
-
} = e, [u, c] = T(!1), [f, d] = T(!1), [m, v] = T(), [p, h] = T(), [g, y] = T(), [O, _] = T(1), [w, V] = T(0), D =
|
|
10006
|
+
} = e, [u, c] = T(!1), [f, d] = T(!1), [m, v] = T(), [p, h] = T(), [g, y] = T(), [O, _] = T(1), [w, V] = T(0), D = ue(Bd), E = ue([]), [b, C] = T(0), [S, x] = T([]), [$, R] = T(void 0), [F, A] = T(), [M, I] = T(), [N, k] = T(), [j, q] = T(!1), W = ue([]), z = (J) => {
|
|
10008
10007
|
q(!0), _(J), V((J - 1) * D.current);
|
|
10009
10008
|
}, U = async () => {
|
|
10010
|
-
const J = W.current.length > 0 ? W.current : s,
|
|
10009
|
+
const J = W.current.length > 0 ? W.current : s, fe = hn(E.current, J), {
|
|
10011
10010
|
colors: be
|
|
10012
10011
|
} = It(p), {
|
|
10013
10012
|
totalItems: $e,
|
|
10014
10013
|
results: _e,
|
|
10015
10014
|
attrsEvaluated: Be
|
|
10016
10015
|
} = await H.getHandler().searchForTree({
|
|
10017
|
-
params:
|
|
10016
|
+
params: fe,
|
|
10018
10017
|
limit: D.current,
|
|
10019
10018
|
offset: w,
|
|
10020
10019
|
model: m,
|
|
@@ -10043,15 +10042,15 @@ function jd(e) {
|
|
|
10043
10042
|
I(JSON.stringify(J));
|
|
10044
10043
|
}
|
|
10045
10044
|
};
|
|
10046
|
-
|
|
10045
|
+
pe(() => {
|
|
10047
10046
|
!f || a && L();
|
|
10048
10047
|
}, [O, w, f, a]);
|
|
10049
10048
|
const B = async (J) => {
|
|
10050
10049
|
d(!1), c(!0), k(void 0);
|
|
10051
10050
|
try {
|
|
10052
10051
|
J === "action" ? await ee() : await Z(), d(!0);
|
|
10053
|
-
} catch (
|
|
10054
|
-
k(
|
|
10052
|
+
} catch (fe) {
|
|
10053
|
+
k(fe);
|
|
10055
10054
|
} finally {
|
|
10056
10055
|
c(!1);
|
|
10057
10056
|
}
|
|
@@ -10069,23 +10068,23 @@ function jd(e) {
|
|
|
10069
10068
|
context: l
|
|
10070
10069
|
});
|
|
10071
10070
|
y(J);
|
|
10072
|
-
const
|
|
10071
|
+
const fe = await H.getHandler().getView({
|
|
10073
10072
|
model: r,
|
|
10074
10073
|
type: "tree",
|
|
10075
10074
|
id: i,
|
|
10076
10075
|
context: l
|
|
10077
10076
|
});
|
|
10078
|
-
h(
|
|
10077
|
+
h(fe);
|
|
10079
10078
|
};
|
|
10080
|
-
|
|
10079
|
+
pe(() => {
|
|
10081
10080
|
t ? B("action") : r && B("model");
|
|
10082
10081
|
}, [t, r]);
|
|
10083
10082
|
const ie = (J) => {
|
|
10084
10083
|
const {
|
|
10085
|
-
id:
|
|
10084
|
+
id: fe
|
|
10086
10085
|
} = J;
|
|
10087
10086
|
o({
|
|
10088
|
-
id:
|
|
10087
|
+
id: fe,
|
|
10089
10088
|
model: m,
|
|
10090
10089
|
treeView: p
|
|
10091
10090
|
});
|
|
@@ -10112,7 +10111,7 @@ function jd(e) {
|
|
|
10112
10111
|
sorter: F,
|
|
10113
10112
|
onChangeSort: (J) => {
|
|
10114
10113
|
A == null || A(J);
|
|
10115
|
-
const
|
|
10114
|
+
const fe = _t({
|
|
10116
10115
|
resultsToSort: S,
|
|
10117
10116
|
sorter: J,
|
|
10118
10117
|
fields: {
|
|
@@ -10120,7 +10119,7 @@ function jd(e) {
|
|
|
10120
10119
|
...g.fields
|
|
10121
10120
|
}
|
|
10122
10121
|
});
|
|
10123
|
-
x(
|
|
10122
|
+
x(fe);
|
|
10124
10123
|
},
|
|
10125
10124
|
context: l
|
|
10126
10125
|
})]
|
|
@@ -10130,7 +10129,7 @@ function jd(e) {
|
|
|
10130
10129
|
message: N,
|
|
10131
10130
|
type: "error",
|
|
10132
10131
|
banner: !0
|
|
10133
|
-
}) : u ? /* @__PURE__ */ n(
|
|
10132
|
+
}) : u ? /* @__PURE__ */ n(Me, {
|
|
10134
10133
|
style: {
|
|
10135
10134
|
padding: "2rem"
|
|
10136
10135
|
}
|
|
@@ -10140,7 +10139,7 @@ const Kd = (e) => {
|
|
|
10140
10139
|
const {
|
|
10141
10140
|
model: t
|
|
10142
10141
|
} = e, [r, i] = T();
|
|
10143
|
-
|
|
10142
|
+
pe(() => {
|
|
10144
10143
|
o();
|
|
10145
10144
|
}, [t]);
|
|
10146
10145
|
async function o() {
|
|
@@ -10174,8 +10173,8 @@ function Yd(e, t) {
|
|
|
10174
10173
|
setIsLoading: m,
|
|
10175
10174
|
openAction: v,
|
|
10176
10175
|
moveItemsEnabled: p
|
|
10177
|
-
} = Y(Xn), h =
|
|
10178
|
-
|
|
10176
|
+
} = Y(Xn), h = ue(), g = ue();
|
|
10177
|
+
pe(() => {
|
|
10179
10178
|
y();
|
|
10180
10179
|
}, [r, o, i]), xt(t, () => ({
|
|
10181
10180
|
refresh: () => {
|
|
@@ -10367,12 +10366,12 @@ function Yd(e, t) {
|
|
|
10367
10366
|
});
|
|
10368
10367
|
if (ie) {
|
|
10369
10368
|
const [Q, J] = ie, {
|
|
10370
|
-
actionId:
|
|
10369
|
+
actionId: fe,
|
|
10371
10370
|
actionType: be,
|
|
10372
10371
|
title: $e,
|
|
10373
10372
|
model: _e
|
|
10374
10373
|
} = S, Be = {
|
|
10375
|
-
action_id:
|
|
10374
|
+
action_id: fe,
|
|
10376
10375
|
action_type: be,
|
|
10377
10376
|
name: $e,
|
|
10378
10377
|
res_id: Z.id,
|
|
@@ -10413,13 +10412,13 @@ function Yd(e, t) {
|
|
|
10413
10412
|
const [Z, ie] = ee, {
|
|
10414
10413
|
actionId: Q,
|
|
10415
10414
|
actionType: J,
|
|
10416
|
-
title:
|
|
10415
|
+
title: fe,
|
|
10417
10416
|
model: be
|
|
10418
10417
|
} = S;
|
|
10419
10418
|
B = {
|
|
10420
10419
|
action_id: Q,
|
|
10421
10420
|
action_type: J,
|
|
10422
|
-
name:
|
|
10421
|
+
name: fe,
|
|
10423
10422
|
res_id: !1,
|
|
10424
10423
|
res_model: be,
|
|
10425
10424
|
view_id: Z,
|
|
@@ -10537,7 +10536,7 @@ const Wd = bt(Yd), Ud = (e) => {
|
|
|
10537
10536
|
});
|
|
10538
10537
|
}), _(C);
|
|
10539
10538
|
};
|
|
10540
|
-
return f && a.length === 0 ? /* @__PURE__ */ n(
|
|
10539
|
+
return f && a.length === 0 ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(ne, {
|
|
10541
10540
|
children: /* @__PURE__ */ P("div", {
|
|
10542
10541
|
className: "flex flex-row",
|
|
10543
10542
|
children: [/* @__PURE__ */ n(Nt.Group, {
|
|
@@ -10736,7 +10735,7 @@ function su(e, t) {
|
|
|
10736
10735
|
key: "welcome",
|
|
10737
10736
|
closable: !0,
|
|
10738
10737
|
content: /* @__PURE__ */ n(iu, {})
|
|
10739
|
-
}]), f =
|
|
10738
|
+
}]), f = ue(/* @__PURE__ */ new Map()), d = ue();
|
|
10740
10739
|
xt(t, () => ({
|
|
10741
10740
|
retrieveAndOpenAction: p,
|
|
10742
10741
|
openShortcut: y
|
|
@@ -10767,7 +10766,7 @@ function su(e, t) {
|
|
|
10767
10766
|
context: o
|
|
10768
10767
|
});
|
|
10769
10768
|
if (S.type === "ir.actions.wizard") {
|
|
10770
|
-
|
|
10769
|
+
Ue("Action type not supported");
|
|
10771
10770
|
return;
|
|
10772
10771
|
}
|
|
10773
10772
|
const [x, $] = w.split(","), R = parseInt($), F = wt({
|
|
@@ -11185,7 +11184,7 @@ function Nu() {
|
|
|
11185
11184
|
onRemoveTab: i,
|
|
11186
11185
|
onChangeTab: o
|
|
11187
11186
|
} = e || {};
|
|
11188
|
-
return /* @__PURE__ */ n(
|
|
11187
|
+
return /* @__PURE__ */ n(ne, {
|
|
11189
11188
|
children: r.map((s) => /* @__PURE__ */ n(lu, {
|
|
11190
11189
|
tabKey: s.key,
|
|
11191
11190
|
label: s.title,
|
|
@@ -11215,7 +11214,7 @@ function Pu() {
|
|
|
11215
11214
|
} = e || {}, r = (t == null ? void 0 : t.map((i) => /* @__PURE__ */ n(du, {
|
|
11216
11215
|
tab: i
|
|
11217
11216
|
}, i.key))) || null;
|
|
11218
|
-
return /* @__PURE__ */ n(
|
|
11217
|
+
return /* @__PURE__ */ n(ne, {
|
|
11219
11218
|
children: r
|
|
11220
11219
|
});
|
|
11221
11220
|
}
|
|
@@ -11239,9 +11238,9 @@ const {
|
|
|
11239
11238
|
currentId: D,
|
|
11240
11239
|
openDefaultActionForModel: E
|
|
11241
11240
|
} = y || {};
|
|
11242
|
-
|
|
11241
|
+
pe(() => {
|
|
11243
11242
|
b();
|
|
11244
|
-
}, []),
|
|
11243
|
+
}, []), pe(() => {
|
|
11245
11244
|
x();
|
|
11246
11245
|
}, [_, w, V, D]);
|
|
11247
11246
|
async function b() {
|
|
@@ -11250,7 +11249,7 @@ const {
|
|
|
11250
11249
|
const M = await t();
|
|
11251
11250
|
f(M);
|
|
11252
11251
|
} catch (M) {
|
|
11253
|
-
|
|
11252
|
+
Ue(M);
|
|
11254
11253
|
} finally {
|
|
11255
11254
|
m(!1);
|
|
11256
11255
|
}
|
|
@@ -11321,11 +11320,11 @@ const {
|
|
|
11321
11320
|
})
|
|
11322
11321
|
})
|
|
11323
11322
|
})]
|
|
11324
|
-
}), /* @__PURE__ */ n(He.Divider, {}), d ? /* @__PURE__ */ n(
|
|
11323
|
+
}), /* @__PURE__ */ n(He.Divider, {}), d ? /* @__PURE__ */ n(Me, {
|
|
11325
11324
|
style: {
|
|
11326
11325
|
padding: "1rem"
|
|
11327
11326
|
}
|
|
11328
|
-
}) : c.length > 0 ? /* @__PURE__ */ n(
|
|
11327
|
+
}) : c.length > 0 ? /* @__PURE__ */ n(ne, {
|
|
11329
11328
|
children: c.map((M) => /* @__PURE__ */ n(He.Item, {
|
|
11330
11329
|
children: /* @__PURE__ */ n(F, {
|
|
11331
11330
|
title: M.name,
|
|
@@ -11383,7 +11382,7 @@ const {
|
|
|
11383
11382
|
}
|
|
11384
11383
|
await b(), a(!s);
|
|
11385
11384
|
}
|
|
11386
|
-
return /* @__PURE__ */ P(
|
|
11385
|
+
return /* @__PURE__ */ P(ne, {
|
|
11387
11386
|
children: [/* @__PURE__ */ n(Ie, {
|
|
11388
11387
|
type: s ? "primary" : "default",
|
|
11389
11388
|
icon: s ? /* @__PURE__ */ n(Br, {
|