@gisce/react-ooui 2.72.4 → 2.72.5
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
|
@@ -2,8 +2,8 @@ var Rl = Object.defineProperty;
|
|
|
2
2
|
var Ol = (e, t, n) => t in e ? Rl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var as = (e, t, n) => (Ol(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsx as s, jsxs as V, Fragment as se } from "react/jsx-runtime";
|
|
5
|
-
import Tt, { useContext as ie, useState as I, useEffect as oe, useRef as
|
|
6
|
-
import { Tooltip as
|
|
5
|
+
import Tt, { useContext as ie, useState as I, useEffect as oe, useRef as q, memo as et, useCallback as D, useMemo as X, forwardRef as Ft, useImperativeHandle as Pt, Fragment as En, createContext as El, createElement as Dl } from "react";
|
|
6
|
+
import { Tooltip as Yt, theme as Je, Typography as nn, Form as Et, Row as Ge, Col as Re, Modal as Ct, Button as Ye, Dropdown as Pl, Menu as ls, Spin as Ze, Divider as xr, Space as st, Input as mt, Select as mn, Checkbox as Wn, Alert as yt, Timeline as pi, message as Hn, Popover as kl, App as Vl, Progress as Nl, Avatar as hi, Tag as Io, DatePicker as Fo, ColorPicker as gi, TimePicker as Ll, InputNumber as Tr, Layout as yi, Badge as Jn, Pagination as Ml, Empty as vi, Statistic as $l, Card as Ao, Tabs as bi, Radio as cs, Switch as jl, Steps as ds, Carousel as Bl } from "antd";
|
|
7
7
|
import { Label as Dn, Field as ao, Tree as wi, Reference as Hl, Selection as _o, Many2one as Si, Boolean as Ul, parseContext as Zt, graphProcessor as Ci, graphFieldUtils as Wl, parseContextFields as Yl, parseDomainFields as Gl, Integer as lo, SearchFieldTypes as Xt, SearchFilter as xi, parseGraph as Ti, Container as ql, Form as Ii, transformDomainForChildWidget as Ro, Button as Kl } from "@gisce/ooui";
|
|
8
8
|
import * as us from "@ant-design/icons";
|
|
9
9
|
import Fi, { QuestionCircleOutlined as Ai, ExclamationCircleOutlined as rn, LoadingOutlined as Nt, DownOutlined as Ir, WarningOutlined as _i, CloseOutlined as Pn, CheckOutlined as Qn, TranslationOutlined as Ri, FolderOpenOutlined as Oo, DownloadOutlined as Eo, ClearOutlined as Fr, FormOutlined as Yn, TableOutlined as Do, AreaChartOutlined as zl, CalendarOutlined as Jl, FileAddOutlined as Ar, CloseCircleFilled as Ql, CopyOutlined as Xn, FilterOutlined as Oi, DeleteOutlined as Po, InfoCircleOutlined as _r, ReloadOutlined as Rr, ThunderboltOutlined as Or, PrinterOutlined as Er, ExportOutlined as Ei, EnterOutlined as Dr, SearchOutlined as Pr, UpOutlined as Xl, PlusSquareOutlined as Zl, MinusSquareOutlined as ec, StarFilled as tc, StarOutlined as nc, LeftOutlined as Di, RightOutlined as Pi, ApiOutlined as rc, AlignLeftOutlined as oc, EyeOutlined as sc, LinkOutlined as fs, SaveOutlined as ic, EditOutlined as ki, PlusOutlined as ac, BorderOuterOutlined as lc, SettingOutlined as cc } from "@ant-design/icons";
|
|
@@ -18,7 +18,7 @@ import pc from "dayjs/plugin/duration";
|
|
|
18
18
|
import hc from "dayjs/plugin/relativeTime";
|
|
19
19
|
import gc from "dayjs/plugin/weekday";
|
|
20
20
|
import yc from "dayjs/plugin/localeData";
|
|
21
|
-
import { useLocale as he, FormigaConfigProvider as vc, mergeStrings as bc, Dropdown as Vi, DropdownButton as
|
|
21
|
+
import { useLocale as he, FormigaConfigProvider as vc, mergeStrings as bc, Dropdown as Vi, DropdownButton as Ut, Many2OneSuffix as wc, Many2OneSuffixModal as ms, SkeletonPill as Sc, PaginationHeader as Cc, FieldSet as xc, ExportModal as Tc, HTMLPreview as Ic, FavouriteButton as Fc } from "@gisce/react-formiga-components";
|
|
22
22
|
import * as ps from "@tabler/icons-react";
|
|
23
23
|
import { IconExternalLink as Ac, IconShare2 as _c } from "@tabler/icons-react";
|
|
24
24
|
import Rc from "antd/lib/input/TextArea";
|
|
@@ -194,7 +194,7 @@ const { Text: od, Title: sd } = nn, { useToken: id } = Je, ad = {
|
|
|
194
194
|
{
|
|
195
195
|
className: `flex flex-row items-center pb-1 pt-1 ${ad[f]}`,
|
|
196
196
|
children: [
|
|
197
|
-
a && /* @__PURE__ */ s(
|
|
197
|
+
a && /* @__PURE__ */ s(Yt, { title: a, children: /* @__PURE__ */ s(
|
|
198
198
|
Ai,
|
|
199
199
|
{
|
|
200
200
|
className: "pr-1 text-xs",
|
|
@@ -259,7 +259,7 @@ function Ve({
|
|
|
259
259
|
f()
|
|
260
260
|
] }))();
|
|
261
261
|
}
|
|
262
|
-
const { confirm: ld } = Ct,
|
|
262
|
+
const { confirm: ld } = Ct, Gt = ({
|
|
263
263
|
onOk: e,
|
|
264
264
|
confirmMessage: t,
|
|
265
265
|
okText: n,
|
|
@@ -427,7 +427,7 @@ const No = (e) => {
|
|
|
427
427
|
}
|
|
428
428
|
function y() {
|
|
429
429
|
if (i) {
|
|
430
|
-
|
|
430
|
+
Gt({
|
|
431
431
|
confirmMessage: i,
|
|
432
432
|
t: f,
|
|
433
433
|
onOk: () => {
|
|
@@ -484,7 +484,7 @@ const No = (e) => {
|
|
|
484
484
|
}
|
|
485
485
|
function x() {
|
|
486
486
|
if (c) {
|
|
487
|
-
|
|
487
|
+
Gt({
|
|
488
488
|
confirmMessage: c,
|
|
489
489
|
t: v,
|
|
490
490
|
onOk: () => {
|
|
@@ -541,7 +541,7 @@ const No = (e) => {
|
|
|
541
541
|
}
|
|
542
542
|
function w() {
|
|
543
543
|
if (p) {
|
|
544
|
-
|
|
544
|
+
Gt({
|
|
545
545
|
confirmMessage: p,
|
|
546
546
|
t,
|
|
547
547
|
onOk: () => {
|
|
@@ -636,7 +636,7 @@ const Hi = (e) => {
|
|
|
636
636
|
content: t
|
|
637
637
|
});
|
|
638
638
|
}, Ui = (e) => {
|
|
639
|
-
const { visible: t, onCloseModal: n, model: r, id: o, field: a, onSubmitSucceed: i } = e, { modalWidth: l } = Vr(), { t: c } = he(), [d, p] = I([]), [u, m] = I(!1), [h, f] = I(!1), [g, y] = I({}), v =
|
|
639
|
+
const { visible: t, onCloseModal: n, model: r, id: o, field: a, onSubmitSucceed: i } = e, { modalWidth: l } = Vr(), { t: c } = he(), [d, p] = I([]), [u, m] = I(!1), [h, f] = I(!1), [g, y] = I({}), v = q();
|
|
640
640
|
oe(() => {
|
|
641
641
|
t ? w() : y({});
|
|
642
642
|
}, [t]);
|
|
@@ -712,7 +712,7 @@ const Hi = (e) => {
|
|
|
712
712
|
f(!1), i();
|
|
713
713
|
}
|
|
714
714
|
function C() {
|
|
715
|
-
return u ? /* @__PURE__ */ s(
|
|
715
|
+
return u ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ V(se, { children: [
|
|
716
716
|
S(),
|
|
717
717
|
/* @__PURE__ */ s(xr, {}),
|
|
718
718
|
/* @__PURE__ */ s(Ge, { justify: "end", children: /* @__PURE__ */ V(st, { children: [
|
|
@@ -757,7 +757,7 @@ const Hi = (e) => {
|
|
|
757
757
|
};
|
|
758
758
|
function dt(e) {
|
|
759
759
|
const { tooltip: t, ...n } = e;
|
|
760
|
-
return /* @__PURE__ */ s(
|
|
760
|
+
return /* @__PURE__ */ s(Yt, { title: t, children: /* @__PURE__ */ s(Ye, { ...n }) });
|
|
761
761
|
}
|
|
762
762
|
const { info: hd } = Ct, dn = (e) => {
|
|
763
763
|
hd({
|
|
@@ -808,10 +808,10 @@ const Wi = (e) => {
|
|
|
808
808
|
isSearchField: n,
|
|
809
809
|
onChange: r
|
|
810
810
|
}) => {
|
|
811
|
-
const o = ie(Ke), { elementHasLostFocus: a } = o || {}, { readOnly: i, isPassword: l, translatable: c, required: d } = t, p =
|
|
811
|
+
const o = ie(Ke), { elementHasLostFocus: a } = o || {}, { readOnly: i, isPassword: l, translatable: c, required: d } = t, p = X(() => e && (t.selectionValues.size ? t.selectionValues.get(e) : Array.isArray(e) ? e[1] : e), [t.selectionValues, e]), u = X(
|
|
812
812
|
() => d && !i,
|
|
813
813
|
[d, i]
|
|
814
|
-
), m =
|
|
814
|
+
), m = X(
|
|
815
815
|
() => Array.isArray(e) || !!t.selectionValues.size,
|
|
816
816
|
[e, t.selectionValues]
|
|
817
817
|
), h = D(
|
|
@@ -863,7 +863,7 @@ const Gi = et(
|
|
|
863
863
|
fetchValues: l,
|
|
864
864
|
formHasChanges: c,
|
|
865
865
|
elementHasLostFocus: d
|
|
866
|
-
} = o || {}, [p, u] = I(!1), { t: m } = he(), { required: h, readOnly: f } = e, g =
|
|
866
|
+
} = o || {}, [p, u] = I(!1), { t: m } = he(), { required: h, readOnly: f } = e, g = X(
|
|
867
867
|
() => h && !f,
|
|
868
868
|
[h, f]
|
|
869
869
|
), y = D(
|
|
@@ -1032,7 +1032,7 @@ const Mo = (e) => {
|
|
|
1032
1032
|
const { ooui: t } = e, { required: n, id: r } = t;
|
|
1033
1033
|
return wt(r) ? /* @__PURE__ */ s(Mo, { value: r }) : /* @__PURE__ */ s(Ve, { required: n, ...e, children: /* @__PURE__ */ s(kd, { ooui: t }) });
|
|
1034
1034
|
}, kd = (e) => {
|
|
1035
|
-
const { ooui: t, value: n, onChange: r } = e, { readOnly: o } = t, a =
|
|
1035
|
+
const { ooui: t, value: n, onChange: r } = e, { readOnly: o } = t, a = q(null), { t: i } = he(), l = (u) => {
|
|
1036
1036
|
r == null || r(u);
|
|
1037
1037
|
};
|
|
1038
1038
|
async function c() {
|
|
@@ -1049,7 +1049,7 @@ const Mo = (e) => {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
return /* @__PURE__ */ V(se, { children: [
|
|
1051
1051
|
/* @__PURE__ */ V(Ge, { gutter: 8, wrap: !1, justify: "center", children: [
|
|
1052
|
-
|
|
1052
|
+
X(
|
|
1053
1053
|
() => /* @__PURE__ */ s(Mo, { value: n }),
|
|
1054
1054
|
[n, t]
|
|
1055
1055
|
),
|
|
@@ -1118,7 +1118,7 @@ const Mo = (e) => {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
);
|
|
1121
|
-
},
|
|
1121
|
+
}, Wt = (e) => {
|
|
1122
1122
|
const t = e.arch, n = e.fields, r = new wi(n);
|
|
1123
1123
|
return r.parse(t), r;
|
|
1124
1124
|
};
|
|
@@ -1238,7 +1238,7 @@ const $o = async (e) => {
|
|
|
1238
1238
|
};
|
|
1239
1239
|
let u = [], m;
|
|
1240
1240
|
if (i === "tree" && (o != null && o.arch)) {
|
|
1241
|
-
const y = (g =
|
|
1241
|
+
const y = (g = Wt(o)) == null ? void 0 : g.colors, v = await L.getHandler().readEvalUiObjects({
|
|
1242
1242
|
model: n,
|
|
1243
1243
|
ids: d,
|
|
1244
1244
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1541,7 +1541,7 @@ const hn = ({
|
|
|
1541
1541
|
i(!1);
|
|
1542
1542
|
}
|
|
1543
1543
|
};
|
|
1544
|
-
return a ? /* @__PURE__ */ s(
|
|
1544
|
+
return a ? /* @__PURE__ */ s(Ze, {}) : l ? /* @__PURE__ */ s(yt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ s(Ve, { type: "array", ...e, children: /* @__PURE__ */ s(nu, { ooui: t, views: d }) });
|
|
1545
1545
|
}, nu = (e) => {
|
|
1546
1546
|
const { value: t, views: n, ooui: r, onChange: o } = e, { items: a = [] } = t || {}, [i, l] = I(!1), [c, d] = I(), [p, u] = I(!1), [m, h] = I(), {
|
|
1547
1547
|
relation: f,
|
|
@@ -1586,7 +1586,7 @@ const hn = ({
|
|
|
1586
1586
|
if (c)
|
|
1587
1587
|
return /* @__PURE__ */ s(yt, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
1588
1588
|
if (i)
|
|
1589
|
-
return /* @__PURE__ */ s(
|
|
1589
|
+
return /* @__PURE__ */ s(Ze, {});
|
|
1590
1590
|
const R = (_) => {
|
|
1591
1591
|
const k = wt(_);
|
|
1592
1592
|
return k && /* @__PURE__ */ s(k, {});
|
|
@@ -1988,7 +1988,7 @@ const hn = ({
|
|
|
1988
1988
|
"useConfigContext must be used within a ConfigContextProvider"
|
|
1989
1989
|
);
|
|
1990
1990
|
return e;
|
|
1991
|
-
},
|
|
1991
|
+
}, qt = (e) => {
|
|
1992
1992
|
const { erpFeatures: t } = kn();
|
|
1993
1993
|
return !!t[e];
|
|
1994
1994
|
}, lu = et(
|
|
@@ -2003,7 +2003,7 @@ const hn = ({
|
|
|
2003
2003
|
treeMaxLimit: l = ta,
|
|
2004
2004
|
children: c
|
|
2005
2005
|
}) => {
|
|
2006
|
-
const d =
|
|
2006
|
+
const d = X(
|
|
2007
2007
|
() => ({
|
|
2008
2008
|
erpFeatures: e,
|
|
2009
2009
|
globalValues: r,
|
|
@@ -2083,7 +2083,7 @@ async function ra({
|
|
|
2083
2083
|
};
|
|
2084
2084
|
}
|
|
2085
2085
|
const cu = (e) => {
|
|
2086
|
-
const [t, n] = I(), [r, o] = I(!0), [a, i] = I(), [l, c] = I(), d = ie(Ke), { getContext: p, getPlainValues: u, activeId: m } = d || {}, { globalValues: h, rootContext: f } = kn(), g =
|
|
2086
|
+
const [t, n] = I(), [r, o] = I(!0), [a, i] = I(), [l, c] = I(), d = ie(Ke), { getContext: p, getPlainValues: u, activeId: m } = d || {}, { globalValues: h, rootContext: f } = kn(), g = X(() => ({ ...p == null ? void 0 : p(), ...f }), [p, f]);
|
|
2087
2087
|
return { actionData: a, treeShortcut: l, loading: r, error: t, fetchData: async () => {
|
|
2088
2088
|
n(void 0), o(!0);
|
|
2089
2089
|
try {
|
|
@@ -2140,7 +2140,7 @@ const cu = (e) => {
|
|
|
2140
2140
|
justifyContent: "center",
|
|
2141
2141
|
alignItems: "center"
|
|
2142
2142
|
},
|
|
2143
|
-
children: /* @__PURE__ */ s(
|
|
2143
|
+
children: /* @__PURE__ */ s(Ze, {})
|
|
2144
2144
|
}
|
|
2145
2145
|
), oa = ({
|
|
2146
2146
|
error: e,
|
|
@@ -2164,7 +2164,7 @@ const cu = (e) => {
|
|
|
2164
2164
|
}
|
|
2165
2165
|
);
|
|
2166
2166
|
}, qe = (e) => {
|
|
2167
|
-
const t =
|
|
2167
|
+
const t = q(/* @__PURE__ */ new Map());
|
|
2168
2168
|
oe(() => () => {
|
|
2169
2169
|
n();
|
|
2170
2170
|
}, []);
|
|
@@ -2385,18 +2385,18 @@ const { getValueForOperator: xs } = Ci, fu = (e) => {
|
|
|
2385
2385
|
if (Y)
|
|
2386
2386
|
return await j({ domain: P });
|
|
2387
2387
|
if (d && p) {
|
|
2388
|
-
const
|
|
2388
|
+
const G = u || await T({
|
|
2389
2389
|
params: P,
|
|
2390
2390
|
model: t,
|
|
2391
2391
|
context: r
|
|
2392
2392
|
}), U = await _({
|
|
2393
2393
|
model: t,
|
|
2394
|
-
ids:
|
|
2394
|
+
ids: G,
|
|
2395
2395
|
fieldsToRetrieve: [d],
|
|
2396
2396
|
context: r
|
|
2397
2397
|
});
|
|
2398
2398
|
return xs({
|
|
2399
|
-
values: U.map((
|
|
2399
|
+
values: U.map((z) => z[d]),
|
|
2400
2400
|
operator: p
|
|
2401
2401
|
});
|
|
2402
2402
|
} else
|
|
@@ -2412,14 +2412,14 @@ const { getValueForOperator: xs } = Ci, fu = (e) => {
|
|
|
2412
2412
|
params: P,
|
|
2413
2413
|
model: t,
|
|
2414
2414
|
context: r
|
|
2415
|
-
}),
|
|
2415
|
+
}), G = await _({
|
|
2416
2416
|
model: t,
|
|
2417
2417
|
ids: Y,
|
|
2418
2418
|
fieldsToRetrieve: [d],
|
|
2419
2419
|
context: r
|
|
2420
2420
|
});
|
|
2421
2421
|
return xs({
|
|
2422
|
-
values:
|
|
2422
|
+
values: G.map((U) => U[d]),
|
|
2423
2423
|
operator: p
|
|
2424
2424
|
});
|
|
2425
2425
|
} else
|
|
@@ -2433,8 +2433,8 @@ const { getValueForOperator: xs } = Ci, fu = (e) => {
|
|
|
2433
2433
|
f(!0), R(void 0);
|
|
2434
2434
|
let P, Y;
|
|
2435
2435
|
try {
|
|
2436
|
-
const
|
|
2437
|
-
if (y(
|
|
2436
|
+
const G = await N({ domain: n, isTotal: !1 });
|
|
2437
|
+
if (y(G), a) {
|
|
2438
2438
|
const U = await E({
|
|
2439
2439
|
domain: a,
|
|
2440
2440
|
values: {},
|
|
@@ -2445,10 +2445,10 @@ const { getValueForOperator: xs } = Ci, fu = (e) => {
|
|
|
2445
2445
|
isTotal: !0
|
|
2446
2446
|
}), x(P);
|
|
2447
2447
|
}
|
|
2448
|
-
if (P ? (Y = Math.round(
|
|
2448
|
+
if (P ? (Y = Math.round(G / P * 100 * 100) / 100, w(Y)) : w(0), o) {
|
|
2449
2449
|
const U = await B({
|
|
2450
2450
|
condition: o,
|
|
2451
|
-
values: { value:
|
|
2451
|
+
values: { value: G, percent: Y },
|
|
2452
2452
|
context: r
|
|
2453
2453
|
});
|
|
2454
2454
|
O(U);
|
|
@@ -2457,15 +2457,15 @@ const { getValueForOperator: xs } = Ci, fu = (e) => {
|
|
|
2457
2457
|
if (l.indexOf(":") !== -1) {
|
|
2458
2458
|
const U = await B({
|
|
2459
2459
|
condition: l,
|
|
2460
|
-
values: { value:
|
|
2460
|
+
values: { value: G, percent: Y },
|
|
2461
2461
|
context: r
|
|
2462
2462
|
});
|
|
2463
2463
|
b(U);
|
|
2464
2464
|
} else
|
|
2465
2465
|
b(l);
|
|
2466
2466
|
R(void 0);
|
|
2467
|
-
} catch (
|
|
2468
|
-
R(JSON.stringify(
|
|
2467
|
+
} catch (G) {
|
|
2468
|
+
R(JSON.stringify(G));
|
|
2469
2469
|
}
|
|
2470
2470
|
f(!1);
|
|
2471
2471
|
}
|
|
@@ -2784,13 +2784,13 @@ const Su = {
|
|
|
2784
2784
|
yAxisOpts: a,
|
|
2785
2785
|
fixedHeight: i
|
|
2786
2786
|
}) => {
|
|
2787
|
-
const { t: l } = he(), c =
|
|
2787
|
+
const { t: l } = he(), c = X(() => {
|
|
2788
2788
|
if (!(e !== "pie" || t.reduce(
|
|
2789
2789
|
(y, v) => v.operator === "+" ? y + v.value : 0,
|
|
2790
2790
|
0
|
|
2791
2791
|
) === 0))
|
|
2792
2792
|
return t.reduce((y, v) => y + v.value, 0);
|
|
2793
|
-
}, [t, e]), d =
|
|
2793
|
+
}, [t, e]), d = X(() => {
|
|
2794
2794
|
if (e === "pie")
|
|
2795
2795
|
return Cu(t);
|
|
2796
2796
|
}, [t, e]), p = D(
|
|
@@ -2801,7 +2801,7 @@ const Su = {
|
|
|
2801
2801
|
return `${`${((y == null ? void 0 : y.percent) || 0).toFixed(0)}%`}`;
|
|
2802
2802
|
},
|
|
2803
2803
|
[d]
|
|
2804
|
-
), u =
|
|
2804
|
+
), u = X(() => {
|
|
2805
2805
|
if (d !== void 0)
|
|
2806
2806
|
return {
|
|
2807
2807
|
formatter: (g, y) => p(y.id)
|
|
@@ -2809,7 +2809,7 @@ const Su = {
|
|
|
2809
2809
|
}, [p, d]), m = D(
|
|
2810
2810
|
({ percent: g, x: y }) => g < 0.07 ? "" : p(y),
|
|
2811
2811
|
[p]
|
|
2812
|
-
), h = Fu[e], f =
|
|
2812
|
+
), h = Fu[e], f = X(() => Au({
|
|
2813
2813
|
type: e,
|
|
2814
2814
|
data: t,
|
|
2815
2815
|
isGroup: n,
|
|
@@ -3036,7 +3036,7 @@ function jo(e) {
|
|
|
3036
3036
|
disabled: o = !1,
|
|
3037
3037
|
formHasChanges: a = !1,
|
|
3038
3038
|
previousView: i
|
|
3039
|
-
} = e, { t: l } = he(), c =
|
|
3039
|
+
} = e, { t: l } = he(), c = X(() => [
|
|
3040
3040
|
{
|
|
3041
3041
|
label: l("viewAs"),
|
|
3042
3042
|
items: n.map((u, m) => {
|
|
@@ -3216,7 +3216,7 @@ async function Bo(e, t, n) {
|
|
|
3216
3216
|
);
|
|
3217
3217
|
}
|
|
3218
3218
|
function $u(e) {
|
|
3219
|
-
const { onSearch: t, disabled: n = !1, searchText: r } = e, { t: o } = he(), [a] = Et.useForm(), [i, l] = I(!1), c =
|
|
3219
|
+
const { onSearch: t, disabled: n = !1, searchText: r } = e, { t: o } = he(), [a] = Et.useForm(), [i, l] = I(!1), c = q(!1), d = q(r);
|
|
3220
3220
|
function p(h) {
|
|
3221
3221
|
const f = h.search;
|
|
3222
3222
|
d.current = f, t(f);
|
|
@@ -3248,7 +3248,7 @@ function $u(e) {
|
|
|
3248
3248
|
disabled: n,
|
|
3249
3249
|
onChange: m,
|
|
3250
3250
|
style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
3251
|
-
suffix: (i || r && r.length > 0) && /* @__PURE__ */ s(
|
|
3251
|
+
suffix: (i || r && r.length > 0) && /* @__PURE__ */ s(Yt, { title: o("clear"), children: /* @__PURE__ */ s(
|
|
3252
3252
|
Ql,
|
|
3253
3253
|
{
|
|
3254
3254
|
style: { color: "rgba(0,0,0,.45)" },
|
|
@@ -3282,7 +3282,7 @@ const gb = Object.values(Lt), At = Tt.createContext(null), ju = (e) => {
|
|
|
3282
3282
|
onChangeTab: l,
|
|
3283
3283
|
onRemoveTab: c,
|
|
3284
3284
|
tabs: d
|
|
3285
|
-
} = e, [p, u] = I(), [m, h] = I(), f =
|
|
3285
|
+
} = e, [p, u] = I(), [m, h] = I(), f = X(() => d.find((v) => v.key === i), [d, i]), { title: g } = kn(), y = X(() => !((d == null ? void 0 : d.length) > 0), [d]);
|
|
3286
3286
|
return oe(() => {
|
|
3287
3287
|
y && (document.title = g, window.history.replaceState({}, "", "/"));
|
|
3288
3288
|
}, [y, g]), /* @__PURE__ */ s(
|
|
@@ -3315,9 +3315,9 @@ const Nn = Tt.createContext(null), _s = async (e) => {
|
|
|
3315
3315
|
for (let n = 0; n < e.length; n++)
|
|
3316
3316
|
await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
|
|
3317
3317
|
}, Bu = (e, t) => {
|
|
3318
|
-
const { children: n, globalValues: r = {} } = e, o =
|
|
3318
|
+
const { children: n, globalValues: r = {} } = e, o = q(), a = q(), [i, l] = I(!1), c = ie(
|
|
3319
3319
|
At
|
|
3320
|
-
), { openAction: d } = c || {}, p =
|
|
3320
|
+
), { openAction: d } = c || {}, p = q([]), { t: u } = he();
|
|
3321
3321
|
Pt(t, () => ({
|
|
3322
3322
|
openActionModal: x,
|
|
3323
3323
|
processAction: w
|
|
@@ -3521,7 +3521,7 @@ const Nn = Tt.createContext(null), _s = async (e) => {
|
|
|
3521
3521
|
closable: !1,
|
|
3522
3522
|
centered: !0,
|
|
3523
3523
|
maskClosable: !1,
|
|
3524
|
-
children: /* @__PURE__ */ s(
|
|
3524
|
+
children: /* @__PURE__ */ s(Ze, {})
|
|
3525
3525
|
}
|
|
3526
3526
|
),
|
|
3527
3527
|
/* @__PURE__ */ s(
|
|
@@ -3692,7 +3692,7 @@ const Wu = "action", Yu = ["active_id", "active_ids", "id"], Gu = ["target", "co
|
|
|
3692
3692
|
Object.entries(e).filter(([t]) => Yu.includes(t))
|
|
3693
3693
|
);
|
|
3694
3694
|
function $r({ res_id: e, searchParams: t }) {
|
|
3695
|
-
const n =
|
|
3695
|
+
const n = q(null), { currentView: r, limit: o, currentPage: a, order: i } = sr(), l = {
|
|
3696
3696
|
id: r.view_id,
|
|
3697
3697
|
type: r.type
|
|
3698
3698
|
}, { token: c } = Je.useToken(), { t: d } = he(), [p, u] = I(!1), { currentTab: m } = Ho(), h = D(
|
|
@@ -3803,9 +3803,9 @@ function zu({
|
|
|
3803
3803
|
totalItems: R,
|
|
3804
3804
|
isActive: T,
|
|
3805
3805
|
treeType: _
|
|
3806
|
-
} = ie(St), k =
|
|
3806
|
+
} = ie(St), k = qt(
|
|
3807
3807
|
Lt.FEATURE_ADVANCED_EXPORT
|
|
3808
|
-
), { t: E } = he(), [B, N] = I(!1), j =
|
|
3808
|
+
), { t: E } = he(), [B, N] = I(!1), j = q(!0), M = D(() => {
|
|
3809
3809
|
var $;
|
|
3810
3810
|
($ = h == null ? void 0 : h.current) == null || $.refreshResults();
|
|
3811
3811
|
}, [h]), { actionButtonProps: P, printButtonProps: Y } = pa({
|
|
@@ -3814,24 +3814,24 @@ function zu({
|
|
|
3814
3814
|
parentContext: e,
|
|
3815
3815
|
selectedRowItems: l,
|
|
3816
3816
|
onRefreshParentValues: M
|
|
3817
|
-
}),
|
|
3817
|
+
}), G = ma({
|
|
3818
3818
|
selectedRowItems: l,
|
|
3819
3819
|
onRefreshParentValues: M
|
|
3820
|
-
}), U =
|
|
3820
|
+
}), U = X(
|
|
3821
3821
|
() => x !== void 0 && x.trim().length > 0,
|
|
3822
3822
|
[x]
|
|
3823
|
-
),
|
|
3823
|
+
), z = X(() => en(r || [], y || []), [r, y]), ge = D(async () => {
|
|
3824
3824
|
var $;
|
|
3825
3825
|
try {
|
|
3826
3826
|
u == null || u(!0);
|
|
3827
|
-
const
|
|
3827
|
+
const J = l[0].id;
|
|
3828
3828
|
await L.getHandler().duplicate({
|
|
3829
|
-
id:
|
|
3829
|
+
id: J,
|
|
3830
3830
|
model: m,
|
|
3831
3831
|
context: { ...e }
|
|
3832
3832
|
}) && (($ = h == null ? void 0 : h.current) == null || $.refreshResults());
|
|
3833
|
-
} catch (
|
|
3834
|
-
bt(
|
|
3833
|
+
} catch (J) {
|
|
3834
|
+
bt(J);
|
|
3835
3835
|
} finally {
|
|
3836
3836
|
u == null || u(!1);
|
|
3837
3837
|
}
|
|
@@ -3846,11 +3846,11 @@ function zu({
|
|
|
3846
3846
|
try {
|
|
3847
3847
|
c == null || c(!0), await L.getHandler().deleteObjects({
|
|
3848
3848
|
model: m,
|
|
3849
|
-
ids: l.map((
|
|
3849
|
+
ids: l.map((J) => J.id),
|
|
3850
3850
|
context: { ...e }
|
|
3851
3851
|
}), f == null || f(void 0), g == null || g(void 0), ($ = h == null ? void 0 : h.current) == null || $.refreshResults();
|
|
3852
|
-
} catch (
|
|
3853
|
-
bt(
|
|
3852
|
+
} catch (J) {
|
|
3853
|
+
bt(J);
|
|
3854
3854
|
} finally {
|
|
3855
3855
|
c == null || c(!1);
|
|
3856
3856
|
}
|
|
@@ -3875,8 +3875,8 @@ function zu({
|
|
|
3875
3875
|
return;
|
|
3876
3876
|
}
|
|
3877
3877
|
x !== void 0 && (F == null || F(void 0), _ !== "infinite" && setTimeout(() => {
|
|
3878
|
-
var
|
|
3879
|
-
(
|
|
3878
|
+
var J;
|
|
3879
|
+
(J = h == null ? void 0 : h.current) == null || J.refreshResults();
|
|
3880
3880
|
}, 50));
|
|
3881
3881
|
}
|
|
3882
3882
|
},
|
|
@@ -3884,8 +3884,8 @@ function zu({
|
|
|
3884
3884
|
), me = D(
|
|
3885
3885
|
($) => {
|
|
3886
3886
|
if ($.id === "print_screen") {
|
|
3887
|
-
let
|
|
3888
|
-
|
|
3887
|
+
let J = (l == null ? void 0 : l.map((Z) => Z.id)) || [];
|
|
3888
|
+
J.length === 0 && (J = (b == null ? void 0 : b.map((Z) => Z.id)) || []), G(
|
|
3889
3889
|
{
|
|
3890
3890
|
id: -1,
|
|
3891
3891
|
model: m,
|
|
@@ -3893,7 +3893,7 @@ function zu({
|
|
|
3893
3893
|
type: "ir.actions.report.xml",
|
|
3894
3894
|
datas: {
|
|
3895
3895
|
model: m,
|
|
3896
|
-
ids:
|
|
3896
|
+
ids: J
|
|
3897
3897
|
}
|
|
3898
3898
|
},
|
|
3899
3899
|
e
|
|
@@ -3902,7 +3902,7 @@ function zu({
|
|
|
3902
3902
|
}
|
|
3903
3903
|
N(!0);
|
|
3904
3904
|
},
|
|
3905
|
-
[m, e, b,
|
|
3905
|
+
[m, e, b, G, l]
|
|
3906
3906
|
);
|
|
3907
3907
|
oe(() => {
|
|
3908
3908
|
if (_ === "infinite" && x === void 0) {
|
|
@@ -3931,13 +3931,13 @@ function zu({
|
|
|
3931
3931
|
[v, T, w]
|
|
3932
3932
|
);
|
|
3933
3933
|
const ee = D(() => {
|
|
3934
|
-
|
|
3934
|
+
Gt({
|
|
3935
3935
|
confirmMessage: E("confirmDuplicate"),
|
|
3936
3936
|
t: E,
|
|
3937
3937
|
onOk: ge
|
|
3938
3938
|
});
|
|
3939
3939
|
}, [ge, E]), ue = D(() => {
|
|
3940
|
-
|
|
3940
|
+
Gt({
|
|
3941
3941
|
confirmMessage: E("confirmRemove"),
|
|
3942
3942
|
t: E,
|
|
3943
3943
|
onOk: ae
|
|
@@ -3945,7 +3945,7 @@ function zu({
|
|
|
3945
3945
|
}, [ae, E]);
|
|
3946
3946
|
return /* @__PURE__ */ V(st, { wrap: !0, children: [
|
|
3947
3947
|
S && /* @__PURE__ */ V(se, { children: [
|
|
3948
|
-
/* @__PURE__ */ s(
|
|
3948
|
+
/* @__PURE__ */ s(Ze, {}),
|
|
3949
3949
|
/* @__PURE__ */ s(at, {}),
|
|
3950
3950
|
/* @__PURE__ */ s(at, {})
|
|
3951
3951
|
] }),
|
|
@@ -4030,12 +4030,12 @@ function zu({
|
|
|
4030
4030
|
)
|
|
4031
4031
|
] }),
|
|
4032
4032
|
/* @__PURE__ */ s(at, {}),
|
|
4033
|
-
/* @__PURE__ */ s(
|
|
4034
|
-
/* @__PURE__ */ s(
|
|
4033
|
+
/* @__PURE__ */ s(Ut, { icon: /* @__PURE__ */ s(Or, {}), ...P }),
|
|
4034
|
+
/* @__PURE__ */ s(Ut, { icon: /* @__PURE__ */ s(Er, {}), ...Y }),
|
|
4035
4035
|
k && /* @__PURE__ */ V(se, { children: [
|
|
4036
4036
|
/* @__PURE__ */ s(at, {}),
|
|
4037
4037
|
/* @__PURE__ */ s(
|
|
4038
|
-
|
|
4038
|
+
Ut,
|
|
4039
4039
|
{
|
|
4040
4040
|
placement: "bottomRight",
|
|
4041
4041
|
icon: /* @__PURE__ */ s(ya, {}),
|
|
@@ -4064,7 +4064,7 @@ function zu({
|
|
|
4064
4064
|
visible: B,
|
|
4065
4065
|
onClose: () => N(!1),
|
|
4066
4066
|
model: m,
|
|
4067
|
-
domain:
|
|
4067
|
+
domain: z,
|
|
4068
4068
|
limit: A,
|
|
4069
4069
|
totalRegisters: R || 0,
|
|
4070
4070
|
selectedRegistersToExport: l,
|
|
@@ -4118,7 +4118,7 @@ const { useToken: Qu } = Je, { Title: Xu, Text: cr } = nn, jr = ({
|
|
|
4118
4118
|
totalItems: c,
|
|
4119
4119
|
selectedRowItems: d,
|
|
4120
4120
|
treeType: p
|
|
4121
|
-
} = ie(St), { t: u } = he(), { token: m } = Qu(), h =
|
|
4121
|
+
} = ie(St), { t: u } = he(), { token: m } = Qu(), h = X(() => {
|
|
4122
4122
|
if (!n)
|
|
4123
4123
|
return null;
|
|
4124
4124
|
if ((o == null ? void 0 : o.type) === "form" && a) {
|
|
@@ -4240,7 +4240,7 @@ const { useToken: Qu } = Je, { Title: Xu, Text: cr } = nn, jr = ({
|
|
|
4240
4240
|
context: r,
|
|
4241
4241
|
enabled: o = !0
|
|
4242
4242
|
}) => {
|
|
4243
|
-
const [a, i] = I(!0), [l, c] = I(), [d, p] = I(), u =
|
|
4243
|
+
const [a, i] = I(!0), [l, c] = I(), [d, p] = I(), u = q(!1), [m, h] = qe(
|
|
4244
4244
|
L.getHandler().getView
|
|
4245
4245
|
);
|
|
4246
4246
|
jt(() => (o && f(), () => {
|
|
@@ -4546,7 +4546,7 @@ const tf = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(ba,
|
|
|
4546
4546
|
let r = n;
|
|
4547
4547
|
t.selectionValues.size ? r = t.selectionValues.get(n) : Array.isArray(n) && (r = n[1]);
|
|
4548
4548
|
const o = r.toString().split(" ").filter((i) => i.length > 1).slice(0, 3).map((i) => i[0].toUpperCase()).join(""), a = Zn(r);
|
|
4549
|
-
return /* @__PURE__ */ s(
|
|
4549
|
+
return /* @__PURE__ */ s(Yt, { title: r, children: /* @__PURE__ */ s(hi, { alt: r, style: { backgroundColor: a }, children: o }) });
|
|
4550
4550
|
};
|
|
4551
4551
|
function uf(e) {
|
|
4552
4552
|
return e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1);
|
|
@@ -4599,7 +4599,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4599
4599
|
}, Go = () => {
|
|
4600
4600
|
const { locale: e } = he();
|
|
4601
4601
|
return mf[e];
|
|
4602
|
-
}, { useToken: pf } = Je,
|
|
4602
|
+
}, { useToken: pf } = Je, Ht = {
|
|
4603
4603
|
date: {
|
|
4604
4604
|
placeholder: "__/__/____",
|
|
4605
4605
|
dateDisplayFormat: "DD/MM/YYYY",
|
|
@@ -4621,18 +4621,18 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4621
4621
|
m(g);
|
|
4622
4622
|
return;
|
|
4623
4623
|
}
|
|
4624
|
-
m(g.format(
|
|
4625
|
-
}, f = t ? nt(t,
|
|
4624
|
+
m(g.format(Ht[u].dateInternalFormat));
|
|
4625
|
+
}, f = t ? nt(t, Ht[u].dateInternalFormat) : void 0;
|
|
4626
4626
|
return /* @__PURE__ */ s(
|
|
4627
4627
|
Fo,
|
|
4628
4628
|
{
|
|
4629
4629
|
style: { width: "100%", ...p },
|
|
4630
|
-
placeholder: o ?
|
|
4630
|
+
placeholder: o ? Ht.time.placeholder : Ht.date.placeholder,
|
|
4631
4631
|
disabled: i,
|
|
4632
4632
|
id: a,
|
|
4633
4633
|
picker: "date",
|
|
4634
4634
|
showTime: o,
|
|
4635
|
-
format:
|
|
4635
|
+
format: Ht[u].dateDisplayFormat,
|
|
4636
4636
|
value: f,
|
|
4637
4637
|
onChange: h,
|
|
4638
4638
|
showNow: !1,
|
|
@@ -4666,7 +4666,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4666
4666
|
}) => {
|
|
4667
4667
|
const { token: o } = Je.useToken(), [a, i] = I(
|
|
4668
4668
|
e ? e.split(";").map((y) => y.trim()).filter((y) => y) : []
|
|
4669
|
-
), [l, c] = I(""), d =
|
|
4669
|
+
), [l, c] = I(""), d = q(null), p = ie(Ke), { elementHasLostFocus: u } = p || {};
|
|
4670
4670
|
Dt(() => {
|
|
4671
4671
|
if (e) {
|
|
4672
4672
|
const y = e.split(";").map((v) => v.trim()).filter(Boolean);
|
|
@@ -4743,7 +4743,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4743
4743
|
);
|
|
4744
4744
|
}, yf = ({
|
|
4745
4745
|
value: e
|
|
4746
|
-
}) =>
|
|
4746
|
+
}) => X(
|
|
4747
4747
|
() => /* @__PURE__ */ s(
|
|
4748
4748
|
"div",
|
|
4749
4749
|
{
|
|
@@ -4759,7 +4759,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4759
4759
|
[e]
|
|
4760
4760
|
), vf = ({
|
|
4761
4761
|
value: e
|
|
4762
|
-
}) =>
|
|
4762
|
+
}) => X(() => /* @__PURE__ */ s(Ca, { emails: e }), [e]), bf = ({ value: e }) => X(() => /* @__PURE__ */ s(lf, { m2oField: e }), [e]), wf = ({ value: e }) => X(
|
|
4763
4763
|
() => /* @__PURE__ */ s(
|
|
4764
4764
|
Gn,
|
|
4765
4765
|
{
|
|
@@ -4767,36 +4767,36 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4767
4767
|
}
|
|
4768
4768
|
),
|
|
4769
4769
|
[e]
|
|
4770
|
-
), Sf = ({ value: e }) =>
|
|
4770
|
+
), Sf = ({ value: e }) => X(() => {
|
|
4771
4771
|
if (!e || e && e.length === 0)
|
|
4772
4772
|
return /* @__PURE__ */ s(se, {});
|
|
4773
4773
|
const t = nt(
|
|
4774
4774
|
e,
|
|
4775
|
-
|
|
4776
|
-
).format(
|
|
4775
|
+
Ht.date.dateInternalFormat
|
|
4776
|
+
).format(Ht.date.dateDisplayFormat);
|
|
4777
4777
|
return /* @__PURE__ */ s(se, { children: t });
|
|
4778
4778
|
}, [e]), Cf = ({
|
|
4779
4779
|
value: e,
|
|
4780
4780
|
ooui: t
|
|
4781
|
-
}) =>
|
|
4781
|
+
}) => X(() => e ? t.fieldType === "many2one" ? /* @__PURE__ */ s(se, { children: e[1] }) : /* @__PURE__ */ s(se, { children: e }) : /* @__PURE__ */ s(se, {}), [e, t.fieldType]), xf = ({ value: e }) => X(() => {
|
|
4782
4782
|
if (!e || e && e.length === 0)
|
|
4783
4783
|
return /* @__PURE__ */ s(se, {});
|
|
4784
4784
|
const t = nt(
|
|
4785
4785
|
e,
|
|
4786
|
-
|
|
4787
|
-
).format(
|
|
4786
|
+
Ht.time.dateInternalFormat
|
|
4787
|
+
).format(Ht.time.dateDisplayFormat);
|
|
4788
4788
|
return /* @__PURE__ */ s(se, { children: t });
|
|
4789
4789
|
}, [e]), Rs = ({
|
|
4790
4790
|
value: e
|
|
4791
|
-
}) =>
|
|
4791
|
+
}) => X(() => {
|
|
4792
4792
|
const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
|
|
4793
4793
|
return /* @__PURE__ */ s(se, { children: `( ${t} )` });
|
|
4794
4794
|
}, [e]), Tf = ({
|
|
4795
4795
|
value: e
|
|
4796
|
-
}) =>
|
|
4796
|
+
}) => X(() => /* @__PURE__ */ s(ba, { value: e }), [e]), If = ({ value: e }) => X(() => /* @__PURE__ */ s(se, { children: va(e) }), [e]), Os = ({ value: e }) => X(
|
|
4797
4797
|
() => /* @__PURE__ */ s("div", { style: { textAlign: "right" }, children: e }),
|
|
4798
4798
|
[e]
|
|
4799
|
-
), Ff = ({ value: e }) =>
|
|
4799
|
+
), Ff = ({ value: e }) => X(
|
|
4800
4800
|
() => /* @__PURE__ */ s(Mo, { value: e, style: { maxHeight: "30px" } }),
|
|
4801
4801
|
[e]
|
|
4802
4802
|
), Af = ({
|
|
@@ -4804,7 +4804,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4804
4804
|
key: t,
|
|
4805
4805
|
ooui: n,
|
|
4806
4806
|
context: r
|
|
4807
|
-
}) =>
|
|
4807
|
+
}) => X(
|
|
4808
4808
|
() => /* @__PURE__ */ s(gi, { value: e, disabled: !0, showText: !0 }),
|
|
4809
4809
|
[n, e]
|
|
4810
4810
|
), _f = ({
|
|
@@ -4812,12 +4812,12 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4812
4812
|
key: t,
|
|
4813
4813
|
ooui: n,
|
|
4814
4814
|
context: r
|
|
4815
|
-
}) =>
|
|
4815
|
+
}) => X(() => /* @__PURE__ */ s(wa, { ooui: n, value: e }), [n, e]), Rf = ({
|
|
4816
4816
|
value: e,
|
|
4817
4817
|
key: t,
|
|
4818
4818
|
ooui: n,
|
|
4819
4819
|
context: r
|
|
4820
|
-
}) =>
|
|
4820
|
+
}) => X(() => {
|
|
4821
4821
|
let o = e;
|
|
4822
4822
|
return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ s(se, { children: n.selectionValues.get(o) });
|
|
4823
4823
|
}, [n, e]), Of = ({
|
|
@@ -4825,7 +4825,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4825
4825
|
key: t,
|
|
4826
4826
|
ooui: n,
|
|
4827
4827
|
context: r
|
|
4828
|
-
}) =>
|
|
4828
|
+
}) => X(
|
|
4829
4829
|
() => /* @__PURE__ */ s(
|
|
4830
4830
|
cf,
|
|
4831
4831
|
{
|
|
@@ -4840,7 +4840,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4840
4840
|
key: t,
|
|
4841
4841
|
ooui: n,
|
|
4842
4842
|
context: r
|
|
4843
|
-
}) =>
|
|
4843
|
+
}) => X(() => /* @__PURE__ */ s(df, { ooui: n, value: e }), [n, e]), Df = ({
|
|
4844
4844
|
value: e,
|
|
4845
4845
|
key: t,
|
|
4846
4846
|
ooui: n,
|
|
@@ -4867,14 +4867,14 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4867
4867
|
oe(() => {
|
|
4868
4868
|
e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && p();
|
|
4869
4869
|
}, [e == null ? void 0 : e.items]);
|
|
4870
|
-
const u =
|
|
4870
|
+
const u = X(
|
|
4871
4871
|
() => o.map((m) => {
|
|
4872
4872
|
const { id: h, name: f } = m, g = Zn(f);
|
|
4873
4873
|
return /* @__PURE__ */ s(Yo, { color: g, children: f }, `${h}`);
|
|
4874
4874
|
}),
|
|
4875
4875
|
[o]
|
|
4876
4876
|
);
|
|
4877
|
-
return
|
|
4877
|
+
return X(() => i ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ s(
|
|
4878
4878
|
"div",
|
|
4879
4879
|
{
|
|
4880
4880
|
style: {
|
|
@@ -4920,7 +4920,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4920
4920
|
}
|
|
4921
4921
|
};
|
|
4922
4922
|
return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
|
4923
|
-
}, [e, ...n]),
|
|
4923
|
+
}, [e, ...n]), X(() => r, [r]) - t;
|
|
4924
4924
|
}, Pf = (e) => {
|
|
4925
4925
|
const t = It(async () => {
|
|
4926
4926
|
if (!e)
|
|
@@ -4969,7 +4969,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4969
4969
|
);
|
|
4970
4970
|
return { getColumnState: a, updateColumnState: i };
|
|
4971
4971
|
}, Vf = (e) => {
|
|
4972
|
-
const t =
|
|
4972
|
+
const t = qt(
|
|
4973
4973
|
Lt.FEATURE_USERVIEWPREFS
|
|
4974
4974
|
), {
|
|
4975
4975
|
getColumnState: n,
|
|
@@ -5006,7 +5006,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
5006
5006
|
key: e,
|
|
5007
5007
|
treeViewFetching: t = !1
|
|
5008
5008
|
}) => {
|
|
5009
|
-
const [n, r] = I(!0), o =
|
|
5009
|
+
const [n, r] = I(!0), o = q(void 0), a = q(!1), {
|
|
5010
5010
|
getColumnState: i,
|
|
5011
5011
|
updateColumnState: l
|
|
5012
5012
|
} = Vf(e), c = D(async () => {
|
|
@@ -5155,7 +5155,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
5155
5155
|
numberOfSelectsToHide: n = 2,
|
|
5156
5156
|
...r
|
|
5157
5157
|
}) => {
|
|
5158
|
-
const o =
|
|
5158
|
+
const o = q(), a = q(0);
|
|
5159
5159
|
return /* @__PURE__ */ s(
|
|
5160
5160
|
Ll,
|
|
5161
5161
|
{
|
|
@@ -5237,7 +5237,7 @@ const ff = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
5237
5237
|
}
|
|
5238
5238
|
)
|
|
5239
5239
|
] }), { defaultAlgorithm: $f, defaultSeed: jf } = Je, Bf = $f(jf), Jo = et((e) => {
|
|
5240
|
-
const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: a } = t, i = ie(Ke), { elementHasLostFocus: l } = i || {}, c =
|
|
5240
|
+
const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: a } = t, i = ie(Ke), { elementHasLostFocus: l } = i || {}, c = X(() => a && !o, [a, o]), d = X(
|
|
5241
5241
|
() => c ? Hf : Tr,
|
|
5242
5242
|
[c]
|
|
5243
5243
|
), p = D((m) => m ? /* @__PURE__ */ s(Nr, { content: m }) : null, []), u = D((m) => `${m}`.replace(/[^0-9.-]+/g, ""), []);
|
|
@@ -5263,7 +5263,7 @@ const Hf = pt(Tr)`
|
|
|
5263
5263
|
background-color: ${Bf.colorPrimaryBg};
|
|
5264
5264
|
}
|
|
5265
5265
|
`, { useToken: Uf } = Je, { defaultAlgorithm: Wf, defaultSeed: Yf } = Je, Gf = Wf(Yf), Kn = et((e) => {
|
|
5266
|
-
const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: a } = t, { token: i } = Uf(), l = a && !o ? { backgroundColor: i.colorPrimaryBg } : void 0, c = ie(Ke), { elementHasLostFocus: d } = c || {}, p =
|
|
5266
|
+
const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: a } = t, { token: i } = Uf(), l = a && !o ? { backgroundColor: i.colorPrimaryBg } : void 0, c = ie(Ke), { elementHasLostFocus: d } = c || {}, p = X(() => a && !o, [a, o]), u = X(
|
|
5267
5267
|
() => p ? qf : Tr,
|
|
5268
5268
|
[p]
|
|
5269
5269
|
), m = D((g) => g ? /* @__PURE__ */ s(Nr, { content: g }) : null, []), h = D((g) => g === void 0 ? "" : typeof g == "string" && !isNaN(parseFloat(g)) ? `${Math.trunc(parseFloat(g))}`.replace(/[^0-9\-]+/g, "") : typeof g == "number" ? `${Math.trunc(g)}`.replace(/[^0-9\-]+/g, "") : "", []), f = D(
|
|
@@ -5422,7 +5422,7 @@ const { useToken: nm } = Je, { Title: rm } = nn, { Header: om, Content: sm, Foot
|
|
|
5422
5422
|
title: r,
|
|
5423
5423
|
footer: o
|
|
5424
5424
|
}) => {
|
|
5425
|
-
const [a, i] = I(e), l =
|
|
5425
|
+
const [a, i] = I(e), l = q(null), { token: c } = nm(), d = D(
|
|
5426
5426
|
(h) => {
|
|
5427
5427
|
h.preventDefault(), h.stopPropagation(), t();
|
|
5428
5428
|
},
|
|
@@ -6342,7 +6342,7 @@ const ts = /* @__PURE__ */ Bi(oh), sh = Ft(
|
|
|
6342
6342
|
}
|
|
6343
6343
|
), Qa = (e) => {
|
|
6344
6344
|
var F;
|
|
6345
|
-
const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: a, searchValues: i } = e, l =
|
|
6345
|
+
const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: a, searchValues: i } = e, l = q(), { t: c } = he(), [d, p] = I(), u = q(null), [m, h] = I();
|
|
6346
6346
|
oe(() => {
|
|
6347
6347
|
n && (h(void 0), setTimeout(() => {
|
|
6348
6348
|
const x = document.querySelector(
|
|
@@ -6519,7 +6519,7 @@ function Wr(e) {
|
|
|
6519
6519
|
searchError: u,
|
|
6520
6520
|
searchValues: m,
|
|
6521
6521
|
showLimitOptions: h = !0
|
|
6522
|
-
} = e, [f, g] = I(), [y, v] = I(), [w, F] = I(!1), x =
|
|
6522
|
+
} = e, [f, g] = I(), [y, v] = I(), [w, F] = I(!1), x = q(), { token: S } = ch(), [O] = Et.useForm();
|
|
6523
6523
|
oe(() => {
|
|
6524
6524
|
O.setFieldsValue(m);
|
|
6525
6525
|
}, [m]);
|
|
@@ -6703,7 +6703,7 @@ const ns = () => {
|
|
|
6703
6703
|
function Za({
|
|
6704
6704
|
tableRef: e
|
|
6705
6705
|
} = {}) {
|
|
6706
|
-
const t =
|
|
6706
|
+
const t = q({}), n = q(), r = D(() => {
|
|
6707
6707
|
t.current = {}, n.current = {};
|
|
6708
6708
|
}, []);
|
|
6709
6709
|
return {
|
|
@@ -6750,11 +6750,11 @@ const Yr = ({
|
|
|
6750
6750
|
updateAttributes: l,
|
|
6751
6751
|
treeView: c,
|
|
6752
6752
|
results: d
|
|
6753
|
-
} = e, p =
|
|
6753
|
+
} = e, p = X(() => c != null && c.field_parent ? { ...c == null ? void 0 : c.fields, [c == null ? void 0 : c.field_parent]: {} } : c == null ? void 0 : c.fields, [c]), u = (c == null ? void 0 : c.fields_in_conditions) !== void 0, m = q(null), [h, f] = I(!0), [g, y] = qe(
|
|
6754
6754
|
L.getHandler().readObjects
|
|
6755
6755
|
), [v, w] = qe(
|
|
6756
6756
|
L.getHandler().parseConditions
|
|
6757
|
-
), F = ns(), x =
|
|
6757
|
+
), F = ns(), x = q({}), S = D(
|
|
6758
6758
|
(T, _) => _ ? o == null ? void 0 : o.some(
|
|
6759
6759
|
(k) => JSON.stringify(T[k]) !== JSON.stringify(_[k])
|
|
6760
6760
|
) : !0,
|
|
@@ -6790,7 +6790,7 @@ const Yr = ({
|
|
|
6790
6790
|
const j = Yr({
|
|
6791
6791
|
treeOoui: i
|
|
6792
6792
|
}), M = N.map((P) => ({ ...d == null ? void 0 : d.find(
|
|
6793
|
-
(
|
|
6793
|
+
(G) => G.id === P.id
|
|
6794
6794
|
), ...P }));
|
|
6795
6795
|
try {
|
|
6796
6796
|
const P = await v({
|
|
@@ -6860,9 +6860,9 @@ const Yr = ({
|
|
|
6860
6860
|
updateAttributes: l,
|
|
6861
6861
|
results: c = []
|
|
6862
6862
|
}) => {
|
|
6863
|
-
const [d, p] = I(!1), u =
|
|
6863
|
+
const [d, p] = I(!1), u = q([]), m = t == null ? void 0 : t.fields, h = (t == null ? void 0 : t.fields_in_conditions) !== void 0, [f, g] = I(
|
|
6864
6864
|
/* @__PURE__ */ new Set()
|
|
6865
|
-
), y =
|
|
6865
|
+
), y = q(/* @__PURE__ */ new Set()), v = q([]), w = q(null), [F, x] = I(!0), [S, O] = qe(
|
|
6866
6866
|
async (M) => L.getHandler().processSearchResults({
|
|
6867
6867
|
searchIds: M.searchIds,
|
|
6868
6868
|
model: e,
|
|
@@ -6888,10 +6888,10 @@ const Yr = ({
|
|
|
6888
6888
|
p(M.length > 0), u.current = M;
|
|
6889
6889
|
}, [m]);
|
|
6890
6890
|
const R = D(() => {
|
|
6891
|
-
var Y,
|
|
6891
|
+
var Y, G;
|
|
6892
6892
|
if (!t)
|
|
6893
6893
|
return !1;
|
|
6894
|
-
const M = ((Y = t.fields_in_conditions) == null ? void 0 : Y.colors) || [], P = ((
|
|
6894
|
+
const M = ((Y = t.fields_in_conditions) == null ? void 0 : Y.colors) || [], P = ((G = t.fields_in_conditions) == null ? void 0 : G.status) || [];
|
|
6895
6895
|
return M.some((U) => u.current.includes(U)) || P.some((U) => u.current.includes(U));
|
|
6896
6896
|
}, [t]), T = D(async () => {
|
|
6897
6897
|
if (!d || f.size === 0 || !o || !u.current.length || !i)
|
|
@@ -6905,13 +6905,13 @@ const Yr = ({
|
|
|
6905
6905
|
const { results: P } = await S({
|
|
6906
6906
|
searchIds: M,
|
|
6907
6907
|
fieldsToRetrieve: u.current
|
|
6908
|
-
}), Y = pn(i, P),
|
|
6908
|
+
}), Y = pn(i, P), G = [...v.current];
|
|
6909
6909
|
Y.forEach((U) => {
|
|
6910
|
-
const
|
|
6910
|
+
const z = G.findIndex(
|
|
6911
6911
|
(ge) => ge.id === U.id
|
|
6912
6912
|
);
|
|
6913
|
-
|
|
6914
|
-
}), v.current =
|
|
6913
|
+
z >= 0 ? G[z] = U : G.push(U);
|
|
6914
|
+
}), v.current = G;
|
|
6915
6915
|
} catch (P) {
|
|
6916
6916
|
P.name !== "AbortError" && console.error("Error updating function fields:", P);
|
|
6917
6917
|
}
|
|
@@ -6929,7 +6929,7 @@ const Yr = ({
|
|
|
6929
6929
|
(M) => {
|
|
6930
6930
|
!M || M.length === 0 || (g((P) => {
|
|
6931
6931
|
const Y = new Set(P);
|
|
6932
|
-
return M.forEach((
|
|
6932
|
+
return M.forEach((G) => Y.add(G)), Y;
|
|
6933
6933
|
}), d && o && i && setTimeout(() => {
|
|
6934
6934
|
T();
|
|
6935
6935
|
}, 100));
|
|
@@ -6937,9 +6937,9 @@ const Yr = ({
|
|
|
6937
6937
|
[d, o, i, T]
|
|
6938
6938
|
), k = D(
|
|
6939
6939
|
async (M) => {
|
|
6940
|
-
var
|
|
6940
|
+
var G;
|
|
6941
6941
|
if (a == null || a(M), M.length === 0 || !u.current.some(
|
|
6942
|
-
(U) => M.some((
|
|
6942
|
+
(U) => M.some((z) => z[U] !== void 0)
|
|
6943
6943
|
) || !R() || !i || !l)
|
|
6944
6944
|
return;
|
|
6945
6945
|
const P = M.map((U) => ({ ...c == null ? void 0 : c.find((ge) => ge.id === U.id), ...U })), Y = Yr({
|
|
@@ -6951,7 +6951,7 @@ const Yr = ({
|
|
|
6951
6951
|
values: P,
|
|
6952
6952
|
context: r
|
|
6953
6953
|
});
|
|
6954
|
-
l(U, i), (
|
|
6954
|
+
l(U, i), (G = n == null ? void 0 : n.current) == null || G.refreshRowStyles();
|
|
6955
6955
|
} catch (U) {
|
|
6956
6956
|
U.name !== "AbortError" && console.error("Error parsing conditions:", U);
|
|
6957
6957
|
}
|
|
@@ -6967,19 +6967,19 @@ const Yr = ({
|
|
|
6967
6967
|
n
|
|
6968
6968
|
]
|
|
6969
6969
|
), E = D(() => {
|
|
6970
|
-
var Y,
|
|
6970
|
+
var Y, G;
|
|
6971
6971
|
const M = ((Y = n == null ? void 0 : n.current) == null ? void 0 : Y.getVisibleRows()) || [];
|
|
6972
6972
|
if (M.length === 0 || v.current.length === 0)
|
|
6973
6973
|
return;
|
|
6974
6974
|
const P = v.current.filter((U) => {
|
|
6975
|
-
const
|
|
6975
|
+
const z = M.find(
|
|
6976
6976
|
(ae) => (ae == null ? void 0 : ae.id) === (U == null ? void 0 : U.id)
|
|
6977
6977
|
);
|
|
6978
|
-
return
|
|
6979
|
-
(ae) => U[ae] !==
|
|
6978
|
+
return z ? u.current.some(
|
|
6979
|
+
(ae) => U[ae] !== z[ae]
|
|
6980
6980
|
) : !1;
|
|
6981
6981
|
}).filter(Boolean);
|
|
6982
|
-
P.length > 0 && (P.forEach((U) => y.current.delete(U.id)), k(P), (
|
|
6982
|
+
P.length > 0 && (P.forEach((U) => y.current.delete(U.id)), k(P), (G = n == null ? void 0 : n.current) == null || G.updateRows(P));
|
|
6983
6983
|
}, [n, k]), B = D((M, P) => u.current.includes(P) ? !v.current.find((Y) => Y.id === (M == null ? void 0 : M.id)) : !1, []);
|
|
6984
6984
|
Dt(() => (d && F && (E(), w.current = setInterval(
|
|
6985
6985
|
E,
|
|
@@ -7047,7 +7047,7 @@ const Yr = ({
|
|
|
7047
7047
|
style: { paddingRight: 10 },
|
|
7048
7048
|
className: "text-right",
|
|
7049
7049
|
children: [
|
|
7050
|
-
e === void 0 && /* @__PURE__ */ s(
|
|
7050
|
+
e === void 0 && /* @__PURE__ */ s(Ze, {}),
|
|
7051
7051
|
e != null && `${r("totalRegisters")} ${e}`
|
|
7052
7052
|
]
|
|
7053
7053
|
}
|
|
@@ -7105,7 +7105,7 @@ function gh(e, t) {
|
|
|
7105
7105
|
onChangeSelectedRowKeys: p,
|
|
7106
7106
|
nameSearch: u,
|
|
7107
7107
|
filterType: m = "side"
|
|
7108
|
-
} = e, h =
|
|
7108
|
+
} = e, h = q(null), f = q([]), g = q(!1), y = Uo(), [v, w] = I(!0), [F, x] = I(), [S, O] = I(!1), { t: C } = he(), b = q(null), A = xa({
|
|
7109
7109
|
elementRef: b,
|
|
7110
7110
|
offset: ph
|
|
7111
7111
|
}), { treeView: R, formView: T, loading: _ } = Wo({
|
|
@@ -7122,9 +7122,9 @@ function gh(e, t) {
|
|
|
7122
7122
|
treeFirstVisibleRow: M,
|
|
7123
7123
|
selectedRowItems: P,
|
|
7124
7124
|
setSearchParams: Y,
|
|
7125
|
-
searchValues:
|
|
7125
|
+
searchValues: G,
|
|
7126
7126
|
searchParams: U,
|
|
7127
|
-
setSearchValues:
|
|
7127
|
+
setSearchValues: z,
|
|
7128
7128
|
searchTreeNameSearch: ge,
|
|
7129
7129
|
setSearchTreeNameSearch: ae,
|
|
7130
7130
|
setResults: H,
|
|
@@ -7133,19 +7133,19 @@ function gh(e, t) {
|
|
|
7133
7133
|
setTotalItems: ee,
|
|
7134
7134
|
isActive: ue,
|
|
7135
7135
|
order: $,
|
|
7136
|
-
setOrder:
|
|
7137
|
-
} = Xa({ useLocalState: !c }), Z = u || ge, pe =
|
|
7136
|
+
setOrder: J
|
|
7137
|
+
} = Xa({ useLocalState: !c }), Z = u || ge, pe = q(Z), Te = qt(
|
|
7138
7138
|
Lt.FEATURE_MANY2ONE_SORT
|
|
7139
7139
|
);
|
|
7140
7140
|
oe(() => {
|
|
7141
7141
|
rt();
|
|
7142
7142
|
}, []), oe(() => {
|
|
7143
7143
|
var fe;
|
|
7144
|
-
(Z !== void 0 && pe.current === void 0 || typeof Z == "string" && typeof pe.current == "string" && Z !== pe.current) && (Y == null || Y([]),
|
|
7144
|
+
(Z !== void 0 && pe.current === void 0 || typeof Z == "string" && typeof pe.current == "string" && Z !== pe.current) && (Y == null || Y([]), z == null || z({}), (fe = h.current) == null || fe.unselectAll(), zt()), pe.current = Z;
|
|
7145
7145
|
}, [Z]);
|
|
7146
|
-
const ye =
|
|
7146
|
+
const ye = X(() => {
|
|
7147
7147
|
if (R)
|
|
7148
|
-
return
|
|
7148
|
+
return Wt(R);
|
|
7149
7149
|
}, [R]), {
|
|
7150
7150
|
colorsForResults: Ue,
|
|
7151
7151
|
statusForResults: ze,
|
|
@@ -7177,7 +7177,7 @@ function gh(e, t) {
|
|
|
7177
7177
|
treeOoui: ye,
|
|
7178
7178
|
updateAttributes: Ce,
|
|
7179
7179
|
results: W
|
|
7180
|
-
}),
|
|
7180
|
+
}), re = Fn(() => {
|
|
7181
7181
|
if (ye)
|
|
7182
7182
|
return Mr(
|
|
7183
7183
|
ye,
|
|
@@ -7187,9 +7187,9 @@ function gh(e, t) {
|
|
|
7187
7187
|
d,
|
|
7188
7188
|
Te
|
|
7189
7189
|
);
|
|
7190
|
-
}, [ye, d, Te]), He =
|
|
7191
|
-
if (
|
|
7192
|
-
return
|
|
7190
|
+
}, [ye, d, Te]), He = X(() => {
|
|
7191
|
+
if (re)
|
|
7192
|
+
return re.map((fe) => ({
|
|
7193
7193
|
...fe,
|
|
7194
7194
|
render: (_e, ot) => /* @__PURE__ */ s(
|
|
7195
7195
|
rs,
|
|
@@ -7201,7 +7201,7 @@ function gh(e, t) {
|
|
|
7201
7201
|
}
|
|
7202
7202
|
)
|
|
7203
7203
|
}));
|
|
7204
|
-
}, [
|
|
7204
|
+
}, [re, Ie]), je = X(() => {
|
|
7205
7205
|
if (!_)
|
|
7206
7206
|
return Ta({
|
|
7207
7207
|
treeViewId: R == null ? void 0 : R.view_id,
|
|
@@ -7211,13 +7211,13 @@ function gh(e, t) {
|
|
|
7211
7211
|
loading: ke,
|
|
7212
7212
|
getColumnState: we,
|
|
7213
7213
|
updateColumnState: Ae
|
|
7214
|
-
} = qo({ key: je }),
|
|
7214
|
+
} = qo({ key: je }), ne = X(
|
|
7215
7215
|
() => en(U || [], i),
|
|
7216
7216
|
[i, U]
|
|
7217
|
-
),
|
|
7218
|
-
const _e = `${JSON.stringify(Z ? i :
|
|
7219
|
-
return _e !==
|
|
7220
|
-
}, [i,
|
|
7217
|
+
), Qe = D(() => {
|
|
7218
|
+
const _e = `${JSON.stringify(Z ? i : ne)}-${Z}`;
|
|
7219
|
+
return _e !== Kt.current ? (Kt.current = _e, !0) : !1;
|
|
7220
|
+
}, [i, ne, Z]), rt = D(async () => {
|
|
7221
7221
|
if (Z) {
|
|
7222
7222
|
w(!1);
|
|
7223
7223
|
return;
|
|
@@ -7225,7 +7225,7 @@ function gh(e, t) {
|
|
|
7225
7225
|
x(void 0), ee(0), w(!0);
|
|
7226
7226
|
try {
|
|
7227
7227
|
const fe = await L.getHandler().searchCount({
|
|
7228
|
-
params: Z ? i :
|
|
7228
|
+
params: Z ? i : ne,
|
|
7229
7229
|
model: n,
|
|
7230
7230
|
context: d,
|
|
7231
7231
|
name_search: Z
|
|
@@ -7238,7 +7238,7 @@ function gh(e, t) {
|
|
|
7238
7238
|
}
|
|
7239
7239
|
}, [
|
|
7240
7240
|
i,
|
|
7241
|
-
|
|
7241
|
+
ne,
|
|
7242
7242
|
n,
|
|
7243
7243
|
Z,
|
|
7244
7244
|
d,
|
|
@@ -7263,13 +7263,13 @@ function gh(e, t) {
|
|
|
7263
7263
|
sort: le.sort || void 0,
|
|
7264
7264
|
sortIndex: le.sortIndex || void 0,
|
|
7265
7265
|
colId: le.colId
|
|
7266
|
-
})),
|
|
7267
|
-
state:
|
|
7266
|
+
})), K = xt && (xt == null ? void 0 : xt.length) > 0 ? xt : void 0, Q = pr({
|
|
7267
|
+
state: K
|
|
7268
7268
|
});
|
|
7269
|
-
|
|
7269
|
+
J == null || J(K), it = hr(Q);
|
|
7270
7270
|
}
|
|
7271
7271
|
g.current = !0;
|
|
7272
|
-
const Ot = Z ? i :
|
|
7272
|
+
const Ot = Z ? i : ne, ir = (R == null ? void 0 : R.fields_in_conditions) !== void 0, Bn = Yr({
|
|
7273
7273
|
treeOoui: ye,
|
|
7274
7274
|
hasFunctionFieldsToParseConditions: ir && xe()
|
|
7275
7275
|
}), { results: Qt, attrsEvaluated: Gr } = await L.getHandler().searchForTree({
|
|
@@ -7293,7 +7293,7 @@ function gh(e, t) {
|
|
|
7293
7293
|
name_search: Z,
|
|
7294
7294
|
context: d,
|
|
7295
7295
|
order: it
|
|
7296
|
-
}),
|
|
7296
|
+
}), Qe() || Rt.current !== it)
|
|
7297
7297
|
H == null || H(Qt);
|
|
7298
7298
|
else {
|
|
7299
7299
|
const xt = [...W || [], ...Qt];
|
|
@@ -7308,13 +7308,13 @@ function gh(e, t) {
|
|
|
7308
7308
|
W,
|
|
7309
7309
|
$,
|
|
7310
7310
|
i,
|
|
7311
|
-
|
|
7311
|
+
ne,
|
|
7312
7312
|
n,
|
|
7313
|
-
|
|
7313
|
+
Qe,
|
|
7314
7314
|
Z,
|
|
7315
7315
|
d,
|
|
7316
7316
|
H,
|
|
7317
|
-
|
|
7317
|
+
J,
|
|
7318
7318
|
me,
|
|
7319
7319
|
ee,
|
|
7320
7320
|
ye,
|
|
@@ -7358,7 +7358,7 @@ function gh(e, t) {
|
|
|
7358
7358
|
var _e, ot, it, Ot;
|
|
7359
7359
|
if (Ue.current[(ot = (_e = fe.node) == null ? void 0 : _e.data) == null ? void 0 : ot.id])
|
|
7360
7360
|
return { color: Ue.current[(Ot = (it = fe.node) == null ? void 0 : it.data) == null ? void 0 : Ot.id] };
|
|
7361
|
-
}, []), ve =
|
|
7361
|
+
}, []), ve = X(() => (P == null ? void 0 : P.map((fe) => fe.id)) || [], [P]), [Ee, Be, ut] = Ko({
|
|
7362
7362
|
ooui: ye,
|
|
7363
7363
|
model: n,
|
|
7364
7364
|
showEmptyValues: !0,
|
|
@@ -7378,7 +7378,7 @@ function gh(e, t) {
|
|
|
7378
7378
|
return;
|
|
7379
7379
|
const ot = await L.getHandler().searchAllIds(
|
|
7380
7380
|
{
|
|
7381
|
-
params: Z ? i :
|
|
7381
|
+
params: Z ? i : ne,
|
|
7382
7382
|
model: n,
|
|
7383
7383
|
context: d,
|
|
7384
7384
|
totalItems: F
|
|
@@ -7386,7 +7386,7 @@ function gh(e, t) {
|
|
|
7386
7386
|
);
|
|
7387
7387
|
tt(ot.map((it) => ({ id: it })));
|
|
7388
7388
|
};
|
|
7389
|
-
fe ? F && F > hh ?
|
|
7389
|
+
fe ? F && F > hh ? Gt({
|
|
7390
7390
|
confirmMessage: C("confirmSelectAllRegisters").replace(
|
|
7391
7391
|
"{totalRecords}",
|
|
7392
7392
|
F.toString()
|
|
@@ -7397,7 +7397,7 @@ function gh(e, t) {
|
|
|
7397
7397
|
}, [
|
|
7398
7398
|
tt,
|
|
7399
7399
|
i,
|
|
7400
|
-
|
|
7400
|
+
ne,
|
|
7401
7401
|
n,
|
|
7402
7402
|
Z,
|
|
7403
7403
|
d,
|
|
@@ -7405,19 +7405,19 @@ function gh(e, t) {
|
|
|
7405
7405
|
N,
|
|
7406
7406
|
C,
|
|
7407
7407
|
F
|
|
7408
|
-
]), ht = D(() => M, [M]), Fe =
|
|
7408
|
+
]), ht = D(() => M, [M]), Fe = X(() => ut ? /* @__PURE__ */ s(zo, { aggregates: Be, isLoading: Ee }) : null, [Be, Ee, ut]), ft = D((fe) => /* @__PURE__ */ s(Jn, { color: fe, style: { marginLeft: 7 } }), []), Mt = D(
|
|
7409
7409
|
(fe) => {
|
|
7410
7410
|
var _e;
|
|
7411
7411
|
return (_e = ze.current) == null ? void 0 : _e[fe.id];
|
|
7412
7412
|
},
|
|
7413
7413
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7414
7414
|
[]
|
|
7415
|
-
), on =
|
|
7415
|
+
), on = X(
|
|
7416
7416
|
() => ({
|
|
7417
7417
|
resetTableViewLabel: C("resetTableView")
|
|
7418
7418
|
}),
|
|
7419
7419
|
[C]
|
|
7420
|
-
), gn =
|
|
7420
|
+
), gn = X(() => !re || !ye ? null : /* @__PURE__ */ s(
|
|
7421
7421
|
Li,
|
|
7422
7422
|
{
|
|
7423
7423
|
readonly: !1,
|
|
@@ -7446,7 +7446,7 @@ function gh(e, t) {
|
|
|
7446
7446
|
$,
|
|
7447
7447
|
A,
|
|
7448
7448
|
te,
|
|
7449
|
-
|
|
7449
|
+
re,
|
|
7450
7450
|
He,
|
|
7451
7451
|
ht,
|
|
7452
7452
|
Fe,
|
|
@@ -7463,7 +7463,7 @@ function gh(e, t) {
|
|
|
7463
7463
|
F,
|
|
7464
7464
|
ye,
|
|
7465
7465
|
Ae
|
|
7466
|
-
]), _t =
|
|
7466
|
+
]), _t = q(U), Bt = q(E), Kt = q(), Rt = q();
|
|
7467
7467
|
Dt(() => {
|
|
7468
7468
|
const fe = !ts(
|
|
7469
7469
|
U,
|
|
@@ -7473,7 +7473,7 @@ function gh(e, t) {
|
|
|
7473
7473
|
}, [U, E]);
|
|
7474
7474
|
const zt = D(async () => {
|
|
7475
7475
|
var fe;
|
|
7476
|
-
tt([]), ce(), Pe(),
|
|
7476
|
+
tt([]), ce(), Pe(), Kt.current = void 0, O(!1), await rt(), (fe = h == null ? void 0 : h.current) == null || fe.refresh(), Ne();
|
|
7477
7477
|
}, [
|
|
7478
7478
|
tt,
|
|
7479
7479
|
ce,
|
|
@@ -7485,14 +7485,14 @@ function gh(e, t) {
|
|
|
7485
7485
|
refreshResults: zt,
|
|
7486
7486
|
getFields: () => R == null ? void 0 : R.fields
|
|
7487
7487
|
}));
|
|
7488
|
-
const yn =
|
|
7488
|
+
const yn = X(
|
|
7489
7489
|
() => ({
|
|
7490
7490
|
overflow: "hidden",
|
|
7491
7491
|
height: `${A}px`,
|
|
7492
7492
|
...l ? {} : { display: "none" }
|
|
7493
7493
|
}),
|
|
7494
7494
|
[A, l]
|
|
7495
|
-
), sn =
|
|
7495
|
+
), sn = X(
|
|
7496
7496
|
() => ({
|
|
7497
7497
|
fields: { ...T == null ? void 0 : T.fields, ...R == null ? void 0 : R.fields },
|
|
7498
7498
|
searchFields: Rn([
|
|
@@ -7503,7 +7503,7 @@ function gh(e, t) {
|
|
|
7503
7503
|
limit: 0,
|
|
7504
7504
|
offset: 0,
|
|
7505
7505
|
isSearching: !1,
|
|
7506
|
-
searchValues:
|
|
7506
|
+
searchValues: G,
|
|
7507
7507
|
searchVisible: !0
|
|
7508
7508
|
}),
|
|
7509
7509
|
[
|
|
@@ -7511,28 +7511,28 @@ function gh(e, t) {
|
|
|
7511
7511
|
T == null ? void 0 : T.search_fields,
|
|
7512
7512
|
R == null ? void 0 : R.fields,
|
|
7513
7513
|
R == null ? void 0 : R.search_fields,
|
|
7514
|
-
|
|
7514
|
+
G
|
|
7515
7515
|
]
|
|
7516
7516
|
), Jt = D(() => {
|
|
7517
7517
|
var fe;
|
|
7518
|
-
tt([]), (fe = h.current) == null || fe.unselectAll(), ae == null || ae(void 0), Y == null || Y([]),
|
|
7518
|
+
tt([]), (fe = h.current) == null || fe.unselectAll(), ae == null || ae(void 0), Y == null || Y([]), z == null || z(void 0);
|
|
7519
7519
|
}, [
|
|
7520
7520
|
tt,
|
|
7521
7521
|
ae,
|
|
7522
7522
|
Y,
|
|
7523
|
-
|
|
7523
|
+
z
|
|
7524
7524
|
]), an = D(
|
|
7525
7525
|
({ params: fe, searchValues: _e }) => {
|
|
7526
7526
|
var ot;
|
|
7527
|
-
tt([]), (ot = h.current) == null || ot.unselectAll(), ae == null || ae(void 0), Y == null || Y(fe),
|
|
7527
|
+
tt([]), (ot = h.current) == null || ot.unselectAll(), ae == null || ae(void 0), Y == null || Y(fe), z == null || z(_e);
|
|
7528
7528
|
},
|
|
7529
7529
|
[
|
|
7530
7530
|
tt,
|
|
7531
7531
|
ae,
|
|
7532
7532
|
Y,
|
|
7533
|
-
|
|
7533
|
+
z
|
|
7534
7534
|
]
|
|
7535
|
-
), Vt =
|
|
7535
|
+
), Vt = X(
|
|
7536
7536
|
() => ({
|
|
7537
7537
|
isOpen: E,
|
|
7538
7538
|
fields: { ...T == null ? void 0 : T.fields, ...R == null ? void 0 : R.fields },
|
|
@@ -7540,7 +7540,7 @@ function gh(e, t) {
|
|
|
7540
7540
|
T == null ? void 0 : T.search_fields,
|
|
7541
7541
|
R == null ? void 0 : R.search_fields
|
|
7542
7542
|
]),
|
|
7543
|
-
searchValues:
|
|
7543
|
+
searchValues: G
|
|
7544
7544
|
}),
|
|
7545
7545
|
[
|
|
7546
7546
|
E,
|
|
@@ -7548,7 +7548,7 @@ function gh(e, t) {
|
|
|
7548
7548
|
T == null ? void 0 : T.search_fields,
|
|
7549
7549
|
R == null ? void 0 : R.fields,
|
|
7550
7550
|
R == null ? void 0 : R.search_fields,
|
|
7551
|
-
|
|
7551
|
+
G
|
|
7552
7552
|
]
|
|
7553
7553
|
), Se = D(
|
|
7554
7554
|
() => B == null ? void 0 : B(!1),
|
|
@@ -7556,16 +7556,16 @@ function gh(e, t) {
|
|
|
7556
7556
|
), Me = D(
|
|
7557
7557
|
({ params: fe, values: _e }) => {
|
|
7558
7558
|
var ot;
|
|
7559
|
-
tt([]), (ot = h.current) == null || ot.unselectAll(), ae == null || ae(void 0), Y == null || Y(fe),
|
|
7559
|
+
tt([]), (ot = h.current) == null || ot.unselectAll(), ae == null || ae(void 0), Y == null || Y(fe), z == null || z(_e), B == null || B(!1);
|
|
7560
7560
|
},
|
|
7561
7561
|
[
|
|
7562
7562
|
tt,
|
|
7563
7563
|
ae,
|
|
7564
7564
|
Y,
|
|
7565
|
-
|
|
7565
|
+
z,
|
|
7566
7566
|
B
|
|
7567
7567
|
]
|
|
7568
|
-
),
|
|
7568
|
+
), Xe = Z && S && F !== void 0 && F !== null && F === vt;
|
|
7569
7569
|
return /* @__PURE__ */ V(En, { children: [
|
|
7570
7570
|
m === "top" && /* @__PURE__ */ s(
|
|
7571
7571
|
Wr,
|
|
@@ -7588,7 +7588,7 @@ function gh(e, t) {
|
|
|
7588
7588
|
{
|
|
7589
7589
|
selectedRowKeys: ve,
|
|
7590
7590
|
totalRows: F,
|
|
7591
|
-
customMiddleComponent:
|
|
7591
|
+
customMiddleComponent: Xe && /* @__PURE__ */ s(
|
|
7592
7592
|
nl,
|
|
7593
7593
|
{
|
|
7594
7594
|
onFilterSearchClick: () => B == null ? void 0 : B(!0)
|
|
@@ -7596,7 +7596,7 @@ function gh(e, t) {
|
|
|
7596
7596
|
)
|
|
7597
7597
|
}
|
|
7598
7598
|
),
|
|
7599
|
-
/* @__PURE__ */ s("div", { ref: b, style: yn, children: _ || ke || v ? /* @__PURE__ */ s(
|
|
7599
|
+
/* @__PURE__ */ s("div", { ref: b, style: yn, children: _ || ke || v ? /* @__PURE__ */ s(Ze, {}) : gn })
|
|
7600
7600
|
] });
|
|
7601
7601
|
}
|
|
7602
7602
|
const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
@@ -7650,7 +7650,7 @@ const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
|
7650
7650
|
"{numberOfSelectedRows}",
|
|
7651
7651
|
e.toString()
|
|
7652
7652
|
) + " ",
|
|
7653
|
-
a ? /* @__PURE__ */ s(
|
|
7653
|
+
a ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ s(Mi, { onClick: d, style: { fontWeight: 600 }, children: c.selectAllRecords.replace(
|
|
7654
7654
|
"{totalRecords}",
|
|
7655
7655
|
t.toString()
|
|
7656
7656
|
) })
|
|
@@ -7685,11 +7685,11 @@ const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
|
7685
7685
|
context: S,
|
|
7686
7686
|
readonly: O,
|
|
7687
7687
|
onSelectAllRecords: C
|
|
7688
|
-
} = e, b =
|
|
7688
|
+
} = e, b = q(null), [A, R] = I([]), T = q(!1), [_, k] = I(), { t: E } = he(), B = q(r), N = ie(
|
|
7689
7689
|
St
|
|
7690
|
-
), { title: j = void 0, setTitle: M = void 0 } = (x ? N : {}) || {}, P =
|
|
7690
|
+
), { title: j = void 0, setTitle: M = void 0 } = (x ? N : {}) || {}, P = qt(
|
|
7691
7691
|
Lt.FEATURE_MANY2ONE_SORT
|
|
7692
|
-
), Y =
|
|
7692
|
+
), Y = X(() => {
|
|
7693
7693
|
if (_)
|
|
7694
7694
|
return Mr(
|
|
7695
7695
|
_,
|
|
@@ -7706,7 +7706,7 @@ const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
|
7706
7706
|
(ee = b.current) == null || ee.unselectAll();
|
|
7707
7707
|
}
|
|
7708
7708
|
})), oe(() => {
|
|
7709
|
-
const ee =
|
|
7709
|
+
const ee = Wt(a);
|
|
7710
7710
|
k(ee), ee.string && j !== ee.string && (M == null || M(ee.string));
|
|
7711
7711
|
}, [a, j]), oe(() => {
|
|
7712
7712
|
if (!_)
|
|
@@ -7717,13 +7717,13 @@ const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
|
7717
7717
|
}, [i]), oe(() => {
|
|
7718
7718
|
B.current = r;
|
|
7719
7719
|
}, [r]);
|
|
7720
|
-
const
|
|
7720
|
+
const G = (n - 1) * B.current + 1, U = G - 1 + A.length, z = o === void 0 ? null : o === 0 ? E("no_results") : E("summary").replace("{from}", G == null ? void 0 : G.toString()).replace("{to}", U == null ? void 0 : U.toString()).replace("{total}", o == null ? void 0 : o.toString()), ge = X(() => {
|
|
7721
7721
|
if (!p || a.isExpandable)
|
|
7722
7722
|
return null;
|
|
7723
7723
|
const ee = A == null ? void 0 : A.filter(
|
|
7724
7724
|
(ue) => u && u.includes(ue.id)
|
|
7725
7725
|
).length;
|
|
7726
|
-
return c ? null : o === void 0 ? /* @__PURE__ */ s(
|
|
7726
|
+
return c ? null : o === void 0 ? /* @__PURE__ */ s(Ze, { className: "pb-4" }) : /* @__PURE__ */ V(Ge, { align: "bottom", className: "pb-4", children: [
|
|
7727
7727
|
/* @__PURE__ */ s(Re, { span: C ? 8 : 12, children: /* @__PURE__ */ s(
|
|
7728
7728
|
Ml,
|
|
7729
7729
|
{
|
|
@@ -7744,7 +7744,7 @@ const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
|
7744
7744
|
onSelectAllRecords: C
|
|
7745
7745
|
}
|
|
7746
7746
|
) }),
|
|
7747
|
-
/* @__PURE__ */ s(Re, { span: C ? 8 : 12, className: "text-right", children:
|
|
7747
|
+
/* @__PURE__ */ s(Re, { span: C ? 8 : 12, className: "text-right", children: z })
|
|
7748
7748
|
] });
|
|
7749
7749
|
}, [
|
|
7750
7750
|
A,
|
|
@@ -7754,25 +7754,25 @@ const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
|
7754
7754
|
n,
|
|
7755
7755
|
u,
|
|
7756
7756
|
p,
|
|
7757
|
-
|
|
7757
|
+
z,
|
|
7758
7758
|
o,
|
|
7759
7759
|
a.isExpandable
|
|
7760
|
-
]), ae =
|
|
7760
|
+
]), ae = X(() => {
|
|
7761
7761
|
if (!_)
|
|
7762
7762
|
return null;
|
|
7763
|
-
const ee = _.columns.filter((
|
|
7763
|
+
const ee = _.columns.filter((J) => J.sum !== void 0).map((J) => ({ label: J.sum, field: J.id }));
|
|
7764
7764
|
if (!ee || ee.length === 0)
|
|
7765
7765
|
return null;
|
|
7766
|
-
const ue = [], $ = (u == null ? void 0 : u.length) > 0 ? A.filter((
|
|
7767
|
-
return ee.forEach((
|
|
7768
|
-
const Z = $.reduce((pe, Te) => Te[
|
|
7769
|
-
ue.push(`${
|
|
7766
|
+
const ue = [], $ = (u == null ? void 0 : u.length) > 0 ? A.filter((J) => u.includes(J.id)) : A;
|
|
7767
|
+
return ee.forEach((J) => {
|
|
7768
|
+
const Z = $.reduce((pe, Te) => Te[J.field] && !isNaN(Te[J.field]) ? pe + Te[J.field] : pe, 0);
|
|
7769
|
+
ue.push(`${J.label}: ${Math.round(Z * 100) / 100}`);
|
|
7770
7770
|
}), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: ue.join(", ") });
|
|
7771
|
-
}, [A, u, _]), H =
|
|
7771
|
+
}, [A, u, _]), H = X(() => {
|
|
7772
7772
|
if (_ !== null && Y && Y.length > 0)
|
|
7773
7773
|
return yh(Y, A, 600);
|
|
7774
|
-
}, [Y, A, _]), W =
|
|
7775
|
-
return _ === null || !H || ((me = H == null ? void 0 : H.columns) == null ? void 0 : me.length) === 0 ? /* @__PURE__ */ s(
|
|
7774
|
+
}, [Y, A, _]), W = X(() => h && (_ != null && _.columns.some((ee) => ee.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
|
|
7775
|
+
return _ === null || !H || ((me = H == null ? void 0 : H.columns) == null ? void 0 : me.length) === 0 ? /* @__PURE__ */ s(Ze, { style: { padding: "2rem" } }) : /* @__PURE__ */ V(fr, { children: [
|
|
7776
7776
|
ge,
|
|
7777
7777
|
/* @__PURE__ */ s(
|
|
7778
7778
|
$c,
|
|
@@ -7782,7 +7782,7 @@ const rl = Ft(gh), ii = (e, t = "14px -apple-system") => {
|
|
|
7782
7782
|
columns: H.columns,
|
|
7783
7783
|
dataSource: A,
|
|
7784
7784
|
loading: c,
|
|
7785
|
-
loadingComponent: /* @__PURE__ */ s(
|
|
7785
|
+
loadingComponent: /* @__PURE__ */ s(Ze, {}),
|
|
7786
7786
|
onRowStyle: (ee) => {
|
|
7787
7787
|
if (f[ee.id])
|
|
7788
7788
|
return { color: f[ee.id] };
|
|
@@ -7837,12 +7837,12 @@ const sl = (e) => {
|
|
|
7837
7837
|
searchParams: O = [],
|
|
7838
7838
|
setSearchValues: C,
|
|
7839
7839
|
clearSelection: b
|
|
7840
|
-
} = e, [A, R] = I(!1), [T, _] = I(!1), [k, E] = I(), [B, N] = I(1), [j, M] = I(0), [P, Y] = I(), [
|
|
7840
|
+
} = e, [A, R] = I(!1), [T, _] = I(!1), [k, E] = I(), [B, N] = I(1), [j, M] = I(0), [P, Y] = I(), [G, U] = I([]), [z, ge] = I(void 0), [ae, H] = I(void 0), W = q(x || vt), me = q([]), ee = D(
|
|
7841
7841
|
(ce) => {
|
|
7842
7842
|
y == null || y([...ce]), U([...ce]);
|
|
7843
7843
|
},
|
|
7844
7844
|
[y]
|
|
7845
|
-
), ue = D(() => v ||
|
|
7845
|
+
), ue = D(() => v || G, [v, G]), $ = D(async () => {
|
|
7846
7846
|
const ce = await L.getHandler().nameSearch({
|
|
7847
7847
|
model: t,
|
|
7848
7848
|
payload: l,
|
|
@@ -7851,7 +7851,7 @@ const sl = (e) => {
|
|
|
7851
7851
|
context: d
|
|
7852
7852
|
});
|
|
7853
7853
|
if (Y(ce.length), p == null || p(ce.length), ce.length > 0) {
|
|
7854
|
-
const Pe = ce.map((ke) => ke == null ? void 0 : ke[0]), { colors: Ie, status: Ne } =
|
|
7854
|
+
const Pe = ce.map((ke) => ke == null ? void 0 : ke[0]), { colors: Ie, status: Ne } = Wt(u), Le = {};
|
|
7855
7855
|
Ie && (Le.colors = Ie), Ne && (Le.status = Ne);
|
|
7856
7856
|
const xe = await L.getHandler().readEvalUiObjects({
|
|
7857
7857
|
model: t,
|
|
@@ -7860,10 +7860,10 @@ const sl = (e) => {
|
|
|
7860
7860
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
7861
7861
|
context: d,
|
|
7862
7862
|
attrs: Le
|
|
7863
|
-
}),
|
|
7864
|
-
me.current = [...
|
|
7865
|
-
const He =
|
|
7866
|
-
resultsToSort:
|
|
7863
|
+
}), re = xe[0];
|
|
7864
|
+
me.current = [...re], ge(_n(xe[1])), H(mr(xe[1]));
|
|
7865
|
+
const He = re.map((ke) => ke.id), je = h !== void 0 ? xn({
|
|
7866
|
+
resultsToSort: re,
|
|
7867
7867
|
sorter: h,
|
|
7868
7868
|
fields: { ...u.fields, ...m.fields }
|
|
7869
7869
|
}) : [...me.current];
|
|
@@ -7883,10 +7883,10 @@ const sl = (e) => {
|
|
|
7883
7883
|
h,
|
|
7884
7884
|
g,
|
|
7885
7885
|
p
|
|
7886
|
-
]),
|
|
7886
|
+
]), J = D(
|
|
7887
7887
|
async (ce) => {
|
|
7888
|
-
const { params: Pe, newOffset: Ie } = ce || {}, Ne = en(Pe || O, w), { colors: Le, status: xe } =
|
|
7889
|
-
Le && (
|
|
7888
|
+
const { params: Pe, newOffset: Ie } = ce || {}, Ne = en(Pe || O, w), { colors: Le, status: xe } = Wt(u), re = {};
|
|
7889
|
+
Le && (re.colors = Le), xe && (re.status = xe);
|
|
7890
7890
|
const { totalItems: He, results: je, attrsEvaluated: ke } = await L.getHandler().searchForTree({
|
|
7891
7891
|
params: Ne,
|
|
7892
7892
|
limit: W.current,
|
|
@@ -7894,7 +7894,7 @@ const sl = (e) => {
|
|
|
7894
7894
|
model: t,
|
|
7895
7895
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
7896
7896
|
context: d,
|
|
7897
|
-
attrs:
|
|
7897
|
+
attrs: re
|
|
7898
7898
|
});
|
|
7899
7899
|
ge(_n(ke)), H(mr(ke)), me.current = [...je];
|
|
7900
7900
|
const we = h !== void 0 ? xn({
|
|
@@ -7903,10 +7903,10 @@ const sl = (e) => {
|
|
|
7903
7903
|
fields: { ...u.fields, ...m.fields }
|
|
7904
7904
|
}) : [...me.current];
|
|
7905
7905
|
if (ee(we), v && we.length > 0) {
|
|
7906
|
-
const
|
|
7907
|
-
(
|
|
7906
|
+
const ne = we.findIndex(
|
|
7907
|
+
(Qe) => F === Qe.id
|
|
7908
7908
|
);
|
|
7909
|
-
|
|
7909
|
+
ne === -1 ? g == null || g(0) : g == null || g(ne);
|
|
7910
7910
|
} else
|
|
7911
7911
|
g == null || g(void 0);
|
|
7912
7912
|
R(!1);
|
|
@@ -7931,7 +7931,7 @@ const sl = (e) => {
|
|
|
7931
7931
|
), Z = D(
|
|
7932
7932
|
async (ce) => {
|
|
7933
7933
|
try {
|
|
7934
|
-
R(!0), i == null || i(!0), l && !c.current ? await $() : await
|
|
7934
|
+
R(!0), i == null || i(!0), l && !c.current ? await $() : await J(ce), b == null || b();
|
|
7935
7935
|
} catch (Pe) {
|
|
7936
7936
|
E(typeof Pe == "string" ? Pe : Pe.message), R(!1);
|
|
7937
7937
|
} finally {
|
|
@@ -7943,7 +7943,7 @@ const sl = (e) => {
|
|
|
7943
7943
|
l,
|
|
7944
7944
|
$,
|
|
7945
7945
|
c,
|
|
7946
|
-
|
|
7946
|
+
J,
|
|
7947
7947
|
r,
|
|
7948
7948
|
i
|
|
7949
7949
|
]
|
|
@@ -8007,7 +8007,7 @@ const sl = (e) => {
|
|
|
8007
8007
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
8008
8008
|
context: d
|
|
8009
8009
|
});
|
|
8010
|
-
return ee([...ue(), ...Ie]), pn(
|
|
8010
|
+
return ee([...ue(), ...Ie]), pn(Wt(u), Ie);
|
|
8011
8011
|
},
|
|
8012
8012
|
[u, t, d, ue, ee]
|
|
8013
8013
|
), Ce = D(async () => await L.getHandler().searchAllIds({
|
|
@@ -8030,7 +8030,7 @@ const sl = (e) => {
|
|
|
8030
8030
|
requestPageChange: ye,
|
|
8031
8031
|
changeSort: pe,
|
|
8032
8032
|
fetchChildrenForRecord: ze,
|
|
8033
|
-
colorsForResults:
|
|
8033
|
+
colorsForResults: z,
|
|
8034
8034
|
statusForResults: ae,
|
|
8035
8035
|
totalItems: P,
|
|
8036
8036
|
getAllIds: Ce
|
|
@@ -8050,7 +8050,7 @@ function wh(e, t) {
|
|
|
8050
8050
|
rootTree: p = !1,
|
|
8051
8051
|
parentContext: u = {},
|
|
8052
8052
|
onChangeSelectedRowKeys: m
|
|
8053
|
-
} = e, [h, f] = I(!1), [g, y] = I(!1), v =
|
|
8053
|
+
} = e, [h, f] = I(!1), [g, y] = I(!1), v = q(!1), w = q(null), [F, x] = I(), [S, O] = I(), [C, b] = I(), [A, R] = I(), [T, _] = I(200), k = q(), { height: E } = Vr(), B = ie(
|
|
8054
8054
|
Nn
|
|
8055
8055
|
), { processAction: N } = B || {}, j = ie(
|
|
8056
8056
|
St
|
|
@@ -8058,9 +8058,9 @@ function wh(e, t) {
|
|
|
8058
8058
|
setResults: M = void 0,
|
|
8059
8059
|
setCurrentItemIndex: P = void 0,
|
|
8060
8060
|
currentId: Y = void 0,
|
|
8061
|
-
results:
|
|
8061
|
+
results: G = void 0,
|
|
8062
8062
|
selectedRowItems: U = void 0,
|
|
8063
|
-
setSelectedRowItems:
|
|
8063
|
+
setSelectedRowItems: z = void 0,
|
|
8064
8064
|
searchParams: ge = [],
|
|
8065
8065
|
setSearchParams: ae = void 0,
|
|
8066
8066
|
searchVisible: H = !0,
|
|
@@ -8069,16 +8069,16 @@ function wh(e, t) {
|
|
|
8069
8069
|
setSorter: ee = void 0,
|
|
8070
8070
|
setTotalItems: ue = void 0,
|
|
8071
8071
|
setSearchTreeNameSearch: $ = void 0,
|
|
8072
|
-
setTreeIsLoading:
|
|
8072
|
+
setTreeIsLoading: J = void 0,
|
|
8073
8073
|
searchValues: Z = {},
|
|
8074
8074
|
setSearchValues: pe = void 0,
|
|
8075
8075
|
limit: Te = vt,
|
|
8076
8076
|
setLimit: ye = void 0
|
|
8077
8077
|
} = (p ? j : {}) || {}, Ue = D(
|
|
8078
8078
|
(Fe) => {
|
|
8079
|
-
|
|
8079
|
+
z == null || z(Fe.map((ft) => ({ id: ft }))), m == null || m(Fe);
|
|
8080
8080
|
},
|
|
8081
|
-
[m,
|
|
8081
|
+
[m, z]
|
|
8082
8082
|
), {
|
|
8083
8083
|
submit: ze,
|
|
8084
8084
|
clear: Ce,
|
|
@@ -8088,14 +8088,14 @@ function wh(e, t) {
|
|
|
8088
8088
|
searchError: Ne,
|
|
8089
8089
|
page: Le,
|
|
8090
8090
|
limit: xe,
|
|
8091
|
-
offset:
|
|
8091
|
+
offset: re,
|
|
8092
8092
|
getResults: He,
|
|
8093
8093
|
requestPageChange: je,
|
|
8094
8094
|
changeSort: ke,
|
|
8095
8095
|
fetchChildrenForRecord: we,
|
|
8096
8096
|
colorsForResults: Ae,
|
|
8097
|
-
statusForResults:
|
|
8098
|
-
totalItems:
|
|
8097
|
+
statusForResults: ne,
|
|
8098
|
+
totalItems: Qe,
|
|
8099
8099
|
getAllIds: rt
|
|
8100
8100
|
} = sl({
|
|
8101
8101
|
model: F,
|
|
@@ -8105,7 +8105,7 @@ function wh(e, t) {
|
|
|
8105
8105
|
setSearchValues: pe,
|
|
8106
8106
|
searchParams: ge,
|
|
8107
8107
|
setSearchVisible: W,
|
|
8108
|
-
setTreeIsLoading:
|
|
8108
|
+
setTreeIsLoading: J,
|
|
8109
8109
|
nameSearch: i,
|
|
8110
8110
|
searchNameGetDoneRef: v,
|
|
8111
8111
|
context: u,
|
|
@@ -8115,7 +8115,7 @@ function wh(e, t) {
|
|
|
8115
8115
|
setSorter: ee,
|
|
8116
8116
|
setCurrentItemIndex: P,
|
|
8117
8117
|
setResultsActionView: M,
|
|
8118
|
-
resultsActionView:
|
|
8118
|
+
resultsActionView: G,
|
|
8119
8119
|
domain: c,
|
|
8120
8120
|
currentId: Y,
|
|
8121
8121
|
setActionViewTotalItems: ue,
|
|
@@ -8130,13 +8130,13 @@ function wh(e, t) {
|
|
|
8130
8130
|
getFields: () => S == null ? void 0 : S.fields
|
|
8131
8131
|
})), oe(() => {
|
|
8132
8132
|
g && d && S && (v.current = !1, ce());
|
|
8133
|
-
}, [Le,
|
|
8133
|
+
}, [Le, re, g, d, i, S]);
|
|
8134
8134
|
const We = async () => {
|
|
8135
|
-
y(!1), f(!0), R(void 0),
|
|
8135
|
+
y(!1), f(!0), R(void 0), J == null || J(!0);
|
|
8136
8136
|
try {
|
|
8137
8137
|
await tt(), y(!0);
|
|
8138
8138
|
} catch (Fe) {
|
|
8139
|
-
R(Fe),
|
|
8139
|
+
R(Fe), J == null || J(!1);
|
|
8140
8140
|
} finally {
|
|
8141
8141
|
f(!1);
|
|
8142
8142
|
}
|
|
@@ -8204,8 +8204,8 @@ function wh(e, t) {
|
|
|
8204
8204
|
[F, C, a, de, S]
|
|
8205
8205
|
), ve = D(async () => {
|
|
8206
8206
|
const Fe = await rt();
|
|
8207
|
-
|
|
8208
|
-
}, [rt, m,
|
|
8207
|
+
z == null || z(Fe.map((ft) => ({ id: ft }))), m == null || m(Fe);
|
|
8208
|
+
}, [rt, m, z]), Ee = X(() => S != null && S.isExpandable ? E - 160 : E - (T + 240), [E, T, S == null ? void 0 : S.isExpandable]), Be = X(
|
|
8209
8209
|
() => U == null ? void 0 : U.map((Fe) => Fe.id),
|
|
8210
8210
|
[U]
|
|
8211
8211
|
), ut = D(() => !S || !C ? null : /* @__PURE__ */ V(se, { children: [
|
|
@@ -8219,7 +8219,7 @@ function wh(e, t) {
|
|
|
8219
8219
|
]),
|
|
8220
8220
|
onClear: Ce,
|
|
8221
8221
|
limit: Te,
|
|
8222
|
-
offset:
|
|
8222
|
+
offset: re,
|
|
8223
8223
|
isSearching: Ie,
|
|
8224
8224
|
onSubmit: ze,
|
|
8225
8225
|
onLimitChange: te,
|
|
@@ -8234,7 +8234,7 @@ function wh(e, t) {
|
|
|
8234
8234
|
{
|
|
8235
8235
|
ref: w,
|
|
8236
8236
|
context: u,
|
|
8237
|
-
total:
|
|
8237
|
+
total: Qe,
|
|
8238
8238
|
limit: xe,
|
|
8239
8239
|
page: Le,
|
|
8240
8240
|
treeView: S,
|
|
@@ -8244,7 +8244,7 @@ function wh(e, t) {
|
|
|
8244
8244
|
onRowClicked: Oe,
|
|
8245
8245
|
scrollY: l || Ee,
|
|
8246
8246
|
colorsForResults: Ae,
|
|
8247
|
-
statusForResults:
|
|
8247
|
+
statusForResults: ne,
|
|
8248
8248
|
selectedRowKeys: Be,
|
|
8249
8249
|
onRowSelectionChange: Ue,
|
|
8250
8250
|
sorter: me,
|
|
@@ -8266,7 +8266,7 @@ function wh(e, t) {
|
|
|
8266
8266
|
He,
|
|
8267
8267
|
Te,
|
|
8268
8268
|
xe,
|
|
8269
|
-
|
|
8269
|
+
re,
|
|
8270
8270
|
Oe,
|
|
8271
8271
|
te,
|
|
8272
8272
|
Le,
|
|
@@ -8280,14 +8280,14 @@ function wh(e, t) {
|
|
|
8280
8280
|
ve,
|
|
8281
8281
|
Be,
|
|
8282
8282
|
me,
|
|
8283
|
-
|
|
8283
|
+
ne,
|
|
8284
8284
|
ze,
|
|
8285
8285
|
Pe,
|
|
8286
|
-
|
|
8286
|
+
Qe,
|
|
8287
8287
|
l,
|
|
8288
8288
|
S
|
|
8289
8289
|
]), kt = A || Ne;
|
|
8290
|
-
return kt ? /* @__PURE__ */ s(yt, { className: "mt-10", message: kt, type: "error", banner: !0 }) : /* @__PURE__ */ s("div", { style: d ? {} : { display: "none" }, children: h ? /* @__PURE__ */ s(
|
|
8290
|
+
return kt ? /* @__PURE__ */ s(yt, { className: "mt-10", message: kt, type: "error", banner: !0 }) : /* @__PURE__ */ s("div", { style: d ? {} : { display: "none" }, children: h ? /* @__PURE__ */ s(Ze, {}) : ut() });
|
|
8291
8291
|
}
|
|
8292
8292
|
const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
8293
8293
|
const {
|
|
@@ -8328,8 +8328,8 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8328
8328
|
order: M,
|
|
8329
8329
|
setOrder: P,
|
|
8330
8330
|
limit: Y,
|
|
8331
|
-
setLimit:
|
|
8332
|
-
} = Xa({ useLocalState: !a }), U = Y || vt, [
|
|
8331
|
+
setLimit: G
|
|
8332
|
+
} = Xa({ useLocalState: !a }), U = Y || vt, [z, ge] = I(!0), [ae, H] = I(), [W, me] = I([]), [ee, ue] = I(!1), $ = i || A, J = q($), Z = q(C), pe = q(h), Te = q(), ye = q([]), Ue = q(!1), ze = X(() => Ta({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), {
|
|
8333
8333
|
fetchColumnState: Ce,
|
|
8334
8334
|
loading: ce,
|
|
8335
8335
|
getColumnState: Pe,
|
|
@@ -8339,16 +8339,16 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8339
8339
|
treeViewFetching: t
|
|
8340
8340
|
}), Ne = D((Se) => {
|
|
8341
8341
|
ye.current = ye.current.map((Me) => {
|
|
8342
|
-
const
|
|
8343
|
-
return { ...Me, ...
|
|
8344
|
-
}), me((Me) => Me.map((
|
|
8345
|
-
const fe = Se.find((_e) => _e.id ===
|
|
8346
|
-
return { ...
|
|
8342
|
+
const Xe = Se.find((fe) => fe.id === Me.id);
|
|
8343
|
+
return { ...Me, ...Xe };
|
|
8344
|
+
}), me((Me) => Me.map((Xe) => {
|
|
8345
|
+
const fe = Se.find((_e) => _e.id === Xe.id);
|
|
8346
|
+
return { ...Xe, ...fe };
|
|
8347
8347
|
}));
|
|
8348
8348
|
}, []), {
|
|
8349
8349
|
colorsForResults: Le,
|
|
8350
8350
|
statusForResults: xe,
|
|
8351
|
-
updateAttributes:
|
|
8351
|
+
updateAttributes: re,
|
|
8352
8352
|
clearAttributes: He
|
|
8353
8353
|
} = Za({
|
|
8354
8354
|
tableRef: l
|
|
@@ -8365,9 +8365,9 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8365
8365
|
isActive: B,
|
|
8366
8366
|
onResultsUpdated: Ne,
|
|
8367
8367
|
treeOoui: n,
|
|
8368
|
-
updateAttributes:
|
|
8368
|
+
updateAttributes: re,
|
|
8369
8369
|
results: _
|
|
8370
|
-
}), { clear:
|
|
8370
|
+
}), { clear: ne } = el({
|
|
8371
8371
|
model: o,
|
|
8372
8372
|
tableRef: l,
|
|
8373
8373
|
autorefreshableFields: n == null ? void 0 : n.autorefreshableFields,
|
|
@@ -8375,18 +8375,18 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8375
8375
|
context: d,
|
|
8376
8376
|
isActive: B,
|
|
8377
8377
|
treeOoui: n,
|
|
8378
|
-
updateAttributes:
|
|
8378
|
+
updateAttributes: re,
|
|
8379
8379
|
results: _
|
|
8380
|
-
}),
|
|
8380
|
+
}), Qe = Uo(), [rt, We] = qe(
|
|
8381
8381
|
L.getHandler().searchCount
|
|
8382
8382
|
), [tt, te] = qe(
|
|
8383
8383
|
L.getHandler().searchForTree
|
|
8384
8384
|
), [de, Oe] = qe(
|
|
8385
8385
|
L.getHandler().searchAllIds
|
|
8386
|
-
), ve =
|
|
8386
|
+
), ve = X(
|
|
8387
8387
|
() => en(C || [], c),
|
|
8388
8388
|
[c, C]
|
|
8389
|
-
), Ee =
|
|
8389
|
+
), Ee = X(() => (x == null ? void 0 : x.map((Se) => Se.id)) || [], [x]), Be = D(() => {
|
|
8390
8390
|
const Me = `${JSON.stringify($ ? c : ve)}-${$}`;
|
|
8391
8391
|
return Me !== Te.current ? (Te.current = Me, !0) : !1;
|
|
8392
8392
|
}, [c, ve, $]), ut = D(async () => {
|
|
@@ -8400,7 +8400,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8400
8400
|
});
|
|
8401
8401
|
H(Se), E(Se);
|
|
8402
8402
|
} catch (Se) {
|
|
8403
|
-
|
|
8403
|
+
Qe(Se);
|
|
8404
8404
|
} finally {
|
|
8405
8405
|
ge(!1);
|
|
8406
8406
|
}
|
|
@@ -8412,10 +8412,10 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8412
8412
|
ve,
|
|
8413
8413
|
o,
|
|
8414
8414
|
d,
|
|
8415
|
-
|
|
8415
|
+
Qe
|
|
8416
8416
|
]), kt = D(() => v, [v]), ht = D(() => w, [w]), Fe = D((Se) => {
|
|
8417
|
-
var Me,
|
|
8418
|
-
return Le.current[(
|
|
8417
|
+
var Me, Xe, fe, _e;
|
|
8418
|
+
return Le.current[(Xe = (Me = Se.node) == null ? void 0 : Me.data) == null ? void 0 : Xe.id] ? { color: Le.current[(_e = (fe = Se.node) == null ? void 0 : fe.data) == null ? void 0 : _e.id] } : {};
|
|
8419
8419
|
}, []), ft = D(
|
|
8420
8420
|
(Se) => {
|
|
8421
8421
|
var Me;
|
|
@@ -8434,8 +8434,8 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8434
8434
|
b
|
|
8435
8435
|
]), on = D(
|
|
8436
8436
|
({ params: Se, searchValues: Me }) => {
|
|
8437
|
-
var
|
|
8438
|
-
g([]), (
|
|
8437
|
+
var Xe;
|
|
8438
|
+
g([]), (Xe = l.current) == null || Xe.unselectAll(), R == null || R(void 0), S == null || S(Se), b == null || b(Me);
|
|
8439
8439
|
},
|
|
8440
8440
|
[
|
|
8441
8441
|
g,
|
|
@@ -8449,8 +8449,8 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8449
8449
|
[f]
|
|
8450
8450
|
), _t = D(
|
|
8451
8451
|
({ params: Se, values: Me }) => {
|
|
8452
|
-
var
|
|
8453
|
-
g([]), (
|
|
8452
|
+
var Xe;
|
|
8453
|
+
g([]), (Xe = l.current) == null || Xe.unselectAll(), R == null || R(void 0), S == null || S(Se), b == null || b(Me), f == null || f(!1);
|
|
8454
8454
|
},
|
|
8455
8455
|
[
|
|
8456
8456
|
g,
|
|
@@ -8479,21 +8479,19 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8479
8479
|
M
|
|
8480
8480
|
]), oe(() => {
|
|
8481
8481
|
var Se;
|
|
8482
|
-
if ($ !==
|
|
8483
|
-
if ($ !== void 0 &&
|
|
8484
|
-
S == null || S([]), b == null || b({}), (Se = l.current) == null || Se.unselectAll(),
|
|
8485
|
-
Ht();
|
|
8486
|
-
}, 50);
|
|
8482
|
+
if ($ !== J.current) {
|
|
8483
|
+
if ($ !== void 0 && J.current === void 0 || typeof $ == "string" && typeof J.current == "string" && $ !== J.current) {
|
|
8484
|
+
S == null || S([]), b == null || b({}), (Se = l.current) == null || Se.unselectAll(), J.current = $;
|
|
8487
8485
|
return;
|
|
8488
8486
|
}
|
|
8489
|
-
$ === void 0 &&
|
|
8487
|
+
$ === void 0 && J.current !== void 0 && ge(!0), J.current = $;
|
|
8490
8488
|
}
|
|
8491
8489
|
}, [$]), Dt(() => {
|
|
8492
8490
|
const Se = !ts(
|
|
8493
8491
|
C,
|
|
8494
8492
|
Z.current
|
|
8495
8493
|
), Me = pe.current && !h;
|
|
8496
|
-
Se && (Me || p === "top") &&
|
|
8494
|
+
Se && (Me || p === "top") && Kt(), Z.current = C, pe.current = h;
|
|
8497
8495
|
}, [C, h]);
|
|
8498
8496
|
const Bt = D(async () => {
|
|
8499
8497
|
if (!n || t)
|
|
@@ -8510,9 +8508,9 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8510
8508
|
});
|
|
8511
8509
|
Se = hr(Ot);
|
|
8512
8510
|
}
|
|
8513
|
-
const Me = $ ? c : ve,
|
|
8511
|
+
const Me = $ ? c : ve, Xe = (r == null ? void 0 : r.fields_in_conditions) !== void 0, fe = Yr({
|
|
8514
8512
|
treeOoui: n,
|
|
8515
|
-
hasFunctionFieldsToParseConditions:
|
|
8513
|
+
hasFunctionFieldsToParseConditions: Xe && Ae()
|
|
8516
8514
|
}), { results: _e, attrsEvaluated: ot } = await tt({
|
|
8517
8515
|
params: Me,
|
|
8518
8516
|
limit: U,
|
|
@@ -8523,7 +8521,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8523
8521
|
attrs: fe,
|
|
8524
8522
|
order: Se,
|
|
8525
8523
|
name_search: $,
|
|
8526
|
-
skipFunctionFields:
|
|
8524
|
+
skipFunctionFields: Xe,
|
|
8527
8525
|
onIdsRetrieved: (Ot) => {
|
|
8528
8526
|
we(Ot);
|
|
8529
8527
|
}
|
|
@@ -8538,7 +8536,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8538
8536
|
return;
|
|
8539
8537
|
}
|
|
8540
8538
|
const it = pn(n, _e);
|
|
8541
|
-
|
|
8539
|
+
re(ot, n), m(!1), ye.current = [...it], me([...it]);
|
|
8542
8540
|
} catch (Se) {
|
|
8543
8541
|
throw console.error(Se), Se;
|
|
8544
8542
|
} finally {
|
|
@@ -8562,15 +8560,15 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8562
8560
|
k,
|
|
8563
8561
|
T,
|
|
8564
8562
|
Be,
|
|
8565
|
-
|
|
8563
|
+
re,
|
|
8566
8564
|
we,
|
|
8567
8565
|
E,
|
|
8568
8566
|
ut
|
|
8569
|
-
]),
|
|
8570
|
-
He(),
|
|
8567
|
+
]), Kt = D(async () => {
|
|
8568
|
+
He(), ne(), ge(!0), y(0), Ce(), g([]), Te.current = void 0, $ || ke(), await Bt();
|
|
8571
8569
|
}, [
|
|
8572
8570
|
He,
|
|
8573
|
-
|
|
8571
|
+
ne,
|
|
8574
8572
|
y,
|
|
8575
8573
|
Ce,
|
|
8576
8574
|
g,
|
|
@@ -8579,11 +8577,11 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8579
8577
|
ke
|
|
8580
8578
|
]), Rt = D(
|
|
8581
8579
|
(Se, Me) => {
|
|
8582
|
-
y(0), F(void 0), g([]), j(Se), Me &&
|
|
8580
|
+
y(0), F(void 0), g([]), j(Se), Me && G(Me);
|
|
8583
8581
|
},
|
|
8584
8582
|
[
|
|
8585
8583
|
j,
|
|
8586
|
-
|
|
8584
|
+
G,
|
|
8587
8585
|
g,
|
|
8588
8586
|
F,
|
|
8589
8587
|
y
|
|
@@ -8596,9 +8594,9 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8596
8594
|
}), [de, C, c, o, d, ae]), yn = D(async () => {
|
|
8597
8595
|
const Se = await zt();
|
|
8598
8596
|
g == null || g(Se.map((Me) => ({ id: Me })));
|
|
8599
|
-
}, [zt, g]), sn =
|
|
8597
|
+
}, [zt, g]), sn = X(() => Ee.length === 0 ? "unchecked" : Ee.length === U && U > 0 || Ee.length === ae ? "checked" : "indeterminate", [Ee, U, ae]), Jt = D(() => {
|
|
8600
8598
|
var Se, Me;
|
|
8601
|
-
sn === "unchecked" ? ((Se = l.current) == null || Se.selectAll(), g(W.map((
|
|
8599
|
+
sn === "unchecked" ? ((Se = l.current) == null || Se.selectAll(), g(W.map((Xe) => ({ id: Xe.id })))) : (g([]), (Me = l.current) == null || Me.unselectAll());
|
|
8602
8600
|
}, [l, g, W, sn]), an = D(
|
|
8603
8601
|
(Se) => {
|
|
8604
8602
|
P(Se), y(0), F(void 0), j(1);
|
|
@@ -8611,12 +8609,12 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8611
8609
|
]
|
|
8612
8610
|
), Vt = D(
|
|
8613
8611
|
({ id: Se, selected: Me }) => {
|
|
8614
|
-
g((
|
|
8612
|
+
g((Xe) => {
|
|
8615
8613
|
if (Me) {
|
|
8616
8614
|
const fe = W.find((_e) => _e.id === Se);
|
|
8617
|
-
return fe && !
|
|
8615
|
+
return fe && !Xe.some((_e) => _e.id === Se) ? [...Xe, fe] : Xe;
|
|
8618
8616
|
}
|
|
8619
|
-
return
|
|
8617
|
+
return Xe.filter((fe) => fe.id !== Se);
|
|
8620
8618
|
});
|
|
8621
8619
|
},
|
|
8622
8620
|
[W, g]
|
|
@@ -8626,7 +8624,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8626
8624
|
searchVisible: h,
|
|
8627
8625
|
searchValues: O,
|
|
8628
8626
|
selectedRowKeys: Ee,
|
|
8629
|
-
refresh:
|
|
8627
|
+
refresh: Kt,
|
|
8630
8628
|
onRowStatus: ft,
|
|
8631
8629
|
onGetFirstVisibleRowIndex: kt,
|
|
8632
8630
|
setTreeFirstVisibleRow: y,
|
|
@@ -8635,7 +8633,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8635
8633
|
onSearchFilterSubmit: on,
|
|
8636
8634
|
onSideSearchFilterClose: gn,
|
|
8637
8635
|
onSideSearchFilterSubmit: _t,
|
|
8638
|
-
totalRowsLoading:
|
|
8636
|
+
totalRowsLoading: z,
|
|
8639
8637
|
totalRows: ae,
|
|
8640
8638
|
onRowStyle: Fe,
|
|
8641
8639
|
results: W,
|
|
@@ -8660,7 +8658,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8660
8658
|
nameSearch: $
|
|
8661
8659
|
};
|
|
8662
8660
|
}, xh = (e, t) => {
|
|
8663
|
-
const { t: n } = he(), r =
|
|
8661
|
+
const { t: n } = he(), r = qt(
|
|
8664
8662
|
Lt.FEATURE_MANY2ONE_SORT
|
|
8665
8663
|
), o = Fn(() => {
|
|
8666
8664
|
if (e)
|
|
@@ -8670,7 +8668,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8670
8668
|
t,
|
|
8671
8669
|
r
|
|
8672
8670
|
);
|
|
8673
|
-
}, [e, t, r]), a =
|
|
8671
|
+
}, [e, t, r]), a = X(
|
|
8674
8672
|
() => ({
|
|
8675
8673
|
resetTableViewLabel: n("resetTableView")
|
|
8676
8674
|
}),
|
|
@@ -8691,7 +8689,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8691
8689
|
onSideSearchFilterClose: l,
|
|
8692
8690
|
onSideSearchFilterSubmit: c
|
|
8693
8691
|
}) => {
|
|
8694
|
-
const d =
|
|
8692
|
+
const d = X(
|
|
8695
8693
|
() => ({
|
|
8696
8694
|
fields: { ...t == null ? void 0 : t.fields, ...n == null ? void 0 : n.fields },
|
|
8697
8695
|
searchFields: Rn([
|
|
@@ -8712,7 +8710,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8712
8710
|
n == null ? void 0 : n.search_fields,
|
|
8713
8711
|
o
|
|
8714
8712
|
]
|
|
8715
|
-
), p =
|
|
8713
|
+
), p = X(
|
|
8716
8714
|
() => ({
|
|
8717
8715
|
isOpen: r,
|
|
8718
8716
|
fields: { ...t == null ? void 0 : t.fields, ...n == null ? void 0 : n.fields },
|
|
@@ -8774,7 +8772,7 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8774
8772
|
tableRef: C,
|
|
8775
8773
|
isFieldLoading: b
|
|
8776
8774
|
}) => {
|
|
8777
|
-
const A =
|
|
8775
|
+
const A = X(() => e.map((R) => ({
|
|
8778
8776
|
...R,
|
|
8779
8777
|
render: (T, _) => /* @__PURE__ */ s(
|
|
8780
8778
|
rs,
|
|
@@ -8819,10 +8817,10 @@ const il = Ft(wh), Sh = vt, Ch = (e) => {
|
|
|
8819
8817
|
);
|
|
8820
8818
|
al.displayName = "PaginatedTableComponent";
|
|
8821
8819
|
const ai = (e) => {
|
|
8822
|
-
const t =
|
|
8820
|
+
const t = q(e);
|
|
8823
8821
|
return oe(() => {
|
|
8824
8822
|
t.current = e;
|
|
8825
|
-
}, [e]),
|
|
8823
|
+
}, [e]), q((...n) => {
|
|
8826
8824
|
var r;
|
|
8827
8825
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
8828
8826
|
}).current;
|
|
@@ -8839,7 +8837,7 @@ function Fh(e, t) {
|
|
|
8839
8837
|
parentContext: d = {},
|
|
8840
8838
|
nameSearch: p,
|
|
8841
8839
|
filterType: u = "side"
|
|
8842
|
-
} = e, m =
|
|
8840
|
+
} = e, m = q(null), h = q(null), f = ai(a), { treeMaxLimit: g } = kn(), y = xa({
|
|
8843
8841
|
elementRef: h,
|
|
8844
8842
|
offset: Ih
|
|
8845
8843
|
}), { treeView: v, formView: w, loading: F } = Wo({
|
|
@@ -8847,10 +8845,10 @@ function Fh(e, t) {
|
|
|
8847
8845
|
formViewProps: r,
|
|
8848
8846
|
treeViewProps: o,
|
|
8849
8847
|
context: d
|
|
8850
|
-
}), x =
|
|
8848
|
+
}), x = X(() => {
|
|
8851
8849
|
if (v)
|
|
8852
|
-
return
|
|
8853
|
-
}, [v]), { columns: S, strings: O } = xh(x, d), C =
|
|
8850
|
+
return Wt(v);
|
|
8851
|
+
}, [v]), { columns: S, strings: O } = xh(x, d), C = X(() => S || [], [S]), {
|
|
8854
8852
|
searchVisible: b,
|
|
8855
8853
|
searchValues: A,
|
|
8856
8854
|
selectedRowKeys: R,
|
|
@@ -8864,9 +8862,9 @@ function Fh(e, t) {
|
|
|
8864
8862
|
onSideSearchFilterClose: M,
|
|
8865
8863
|
onSideSearchFilterSubmit: P,
|
|
8866
8864
|
totalRowsLoading: Y,
|
|
8867
|
-
totalRows:
|
|
8865
|
+
totalRows: G,
|
|
8868
8866
|
onRowStyle: U,
|
|
8869
|
-
results:
|
|
8867
|
+
results: z,
|
|
8870
8868
|
onRequestPageChange: ge,
|
|
8871
8869
|
treeIsLoading: ae,
|
|
8872
8870
|
selectAllRecords: H,
|
|
@@ -8875,7 +8873,7 @@ function Fh(e, t) {
|
|
|
8875
8873
|
getColumnStateInProgress: ee,
|
|
8876
8874
|
getColumnState: ue,
|
|
8877
8875
|
updateColumnState: $,
|
|
8878
|
-
currentPage:
|
|
8876
|
+
currentPage: J,
|
|
8879
8877
|
limit: Z,
|
|
8880
8878
|
order: pe,
|
|
8881
8879
|
setTreeFirstVisibleColumn: Te,
|
|
@@ -8909,17 +8907,17 @@ function Fh(e, t) {
|
|
|
8909
8907
|
refreshResults: T,
|
|
8910
8908
|
getFields: () => v == null ? void 0 : v.fields
|
|
8911
8909
|
}));
|
|
8912
|
-
const
|
|
8913
|
-
(
|
|
8910
|
+
const re = X(() => xe ? /* @__PURE__ */ s(zo, { aggregates: Le, isLoading: Ne }) : null, [Le, Ne, xe]), He = D(
|
|
8911
|
+
(Qe) => /* @__PURE__ */ s(Jn, { color: Qe, style: { marginLeft: 7 } }),
|
|
8914
8912
|
[]
|
|
8915
|
-
), je =
|
|
8913
|
+
), je = X(
|
|
8916
8914
|
() => ({
|
|
8917
8915
|
overflow: "hidden",
|
|
8918
8916
|
height: `${y}px`,
|
|
8919
8917
|
...l ? {} : { display: "none" }
|
|
8920
8918
|
}),
|
|
8921
8919
|
[y, l]
|
|
8922
|
-
), ke = Pe !== void 0 && ce, we = ke &&
|
|
8920
|
+
), ke = Pe !== void 0 && ce, we = ke && G !== void 0 && G !== null && G === vt, Ae = X(() => typeof G != "number" || isNaN(G) || G < 0 ? (z == null ? void 0 : z.length) || 0 : G || 0, [G, z]), ne = X(() => (z == null ? void 0 : z.length) > 0 && (typeof G != "number" || isNaN(G) || G < 0) ? z == null ? void 0 : z.length : p ? vt : Z || Sh, [z == null ? void 0 : z.length, G, p, Z]);
|
|
8923
8921
|
return /* @__PURE__ */ V(En, { children: [
|
|
8924
8922
|
/* @__PURE__ */ s(
|
|
8925
8923
|
Th,
|
|
@@ -8938,10 +8936,10 @@ function Fh(e, t) {
|
|
|
8938
8936
|
/* @__PURE__ */ s(
|
|
8939
8937
|
Cc,
|
|
8940
8938
|
{
|
|
8941
|
-
total:
|
|
8939
|
+
total: Ae,
|
|
8942
8940
|
totalRowsLoading: Y,
|
|
8943
|
-
page: p ? 1 :
|
|
8944
|
-
pageSize:
|
|
8941
|
+
page: p ? 1 : J || 1,
|
|
8942
|
+
pageSize: ne,
|
|
8945
8943
|
maxPageSize: g,
|
|
8946
8944
|
currentPageSelectedCount: R.length,
|
|
8947
8945
|
onRequestPageChange: ge,
|
|
@@ -8956,7 +8954,7 @@ function Fh(e, t) {
|
|
|
8956
8954
|
)
|
|
8957
8955
|
}
|
|
8958
8956
|
),
|
|
8959
|
-
/* @__PURE__ */ s("div", { ref: h, style: je, children: F ? /* @__PURE__ */ s(
|
|
8957
|
+
/* @__PURE__ */ s("div", { ref: h, style: je, children: F ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ s(
|
|
8960
8958
|
al,
|
|
8961
8959
|
{
|
|
8962
8960
|
columns: C,
|
|
@@ -8964,7 +8962,7 @@ function Fh(e, t) {
|
|
|
8964
8962
|
strings: O,
|
|
8965
8963
|
isLoading: ae || ee,
|
|
8966
8964
|
availableHeight: y,
|
|
8967
|
-
results:
|
|
8965
|
+
results: z,
|
|
8968
8966
|
handleRowDoubleClick: f,
|
|
8969
8967
|
onRowHasBeenSelected: B,
|
|
8970
8968
|
updateColumnState: $,
|
|
@@ -8973,7 +8971,7 @@ function Fh(e, t) {
|
|
|
8973
8971
|
onGetFirstVisibleRowIndex: k,
|
|
8974
8972
|
onGetFirstVisibleColumn: ye,
|
|
8975
8973
|
setTreeFirstVisibleColumn: Te,
|
|
8976
|
-
footerComp:
|
|
8974
|
+
footerComp: re,
|
|
8977
8975
|
statusComp: He,
|
|
8978
8976
|
onRowStatus: _,
|
|
8979
8977
|
onRowStyle: U,
|
|
@@ -9003,7 +9001,7 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9003
9001
|
setCurrentView: u,
|
|
9004
9002
|
availableViews: m,
|
|
9005
9003
|
searchTreeNameSearch: h
|
|
9006
|
-
} = e, f =
|
|
9004
|
+
} = e, f = q(t), g = X(() => {
|
|
9007
9005
|
if (!(i != null && i.arch) || i.isExpandable)
|
|
9008
9006
|
return "legacy";
|
|
9009
9007
|
const S = Xi(i.arch, "infinite");
|
|
@@ -9120,18 +9118,18 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9120
9118
|
initialSearchParams: T,
|
|
9121
9119
|
initialCurrentPage: _,
|
|
9122
9120
|
initialOrder: k
|
|
9123
|
-
} = e, [E, B] = I(!1), [N, j] = I(!1), [M, P] = I(!1), [Y,
|
|
9121
|
+
} = e, [E, B] = I(!1), [N, j] = I(!1), [M, P] = I(!1), [Y, G] = I(!0), [U, z] = I(!0), [ge, ae] = I([]), [H, W] = I(!1), [me, ee] = I(
|
|
9124
9122
|
T || []
|
|
9125
|
-
), [ue, $] = I(!1), [
|
|
9123
|
+
), [ue, $] = I(!1), [J, Z] = I(!0), [pe, Te] = I(), [ye, Ue] = I(
|
|
9126
9124
|
Nu(
|
|
9127
9125
|
T || [],
|
|
9128
9126
|
n.fields
|
|
9129
9127
|
)
|
|
9130
|
-
), [ze, Ce] = I(0), [ce, Pe] = I(void 0), [Ie, Ne] = I(), [Le, xe] = I(Cr), [
|
|
9128
|
+
), [ze, Ce] = I(0), [ce, Pe] = I(void 0), [Ie, Ne] = I(), [Le, xe] = I(Cr), [re, He] = I(
|
|
9131
9129
|
k
|
|
9132
9130
|
), [je, ke] = I(
|
|
9133
9131
|
A !== void 0 ? A : vt
|
|
9134
|
-
), [we, Ae] = I(r), [
|
|
9132
|
+
), [we, Ae] = I(r), [ne, Qe] = I(
|
|
9135
9133
|
_ || 1
|
|
9136
9134
|
);
|
|
9137
9135
|
oe(() => {
|
|
@@ -9181,9 +9179,9 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9181
9179
|
removingItem: M,
|
|
9182
9180
|
setRemovingItem: P,
|
|
9183
9181
|
formIsLoading: Y,
|
|
9184
|
-
setFormIsLoading:
|
|
9182
|
+
setFormIsLoading: G,
|
|
9185
9183
|
treeIsLoading: U,
|
|
9186
|
-
setTreeIsLoading:
|
|
9184
|
+
setTreeIsLoading: z,
|
|
9187
9185
|
attachments: ge,
|
|
9188
9186
|
setAttachments: ae,
|
|
9189
9187
|
selectedRowItems: S,
|
|
@@ -9201,7 +9199,7 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9201
9199
|
searchTreeNameSearch: O,
|
|
9202
9200
|
setSearchTreeNameSearch: C,
|
|
9203
9201
|
setGraphIsLoading: Z,
|
|
9204
|
-
graphIsLoading:
|
|
9202
|
+
graphIsLoading: J,
|
|
9205
9203
|
previousView: pe,
|
|
9206
9204
|
setPreviousView: Te,
|
|
9207
9205
|
goToResourceId: b,
|
|
@@ -9219,10 +9217,10 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9219
9217
|
setSearchQuery: Ne,
|
|
9220
9218
|
treeType: Le,
|
|
9221
9219
|
setTreeType: xe,
|
|
9222
|
-
order:
|
|
9220
|
+
order: re,
|
|
9223
9221
|
setOrder: He,
|
|
9224
|
-
currentPage:
|
|
9225
|
-
setCurrentPage:
|
|
9222
|
+
currentPage: ne,
|
|
9223
|
+
setCurrentPage: Qe
|
|
9226
9224
|
},
|
|
9227
9225
|
children: t
|
|
9228
9226
|
}
|
|
@@ -9533,7 +9531,7 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9533
9531
|
overflow: "hidden"
|
|
9534
9532
|
},
|
|
9535
9533
|
children: i ? /* @__PURE__ */ V(se, { children: [
|
|
9536
|
-
/* @__PURE__ */ s(
|
|
9534
|
+
/* @__PURE__ */ s(Yt, { title: i, children: /* @__PURE__ */ s(_r, { className: "pr-1 text-xs" }) }),
|
|
9537
9535
|
/* @__PURE__ */ s(li, { ellipsis: !0, children: t })
|
|
9538
9536
|
] }) : /* @__PURE__ */ s(
|
|
9539
9537
|
li,
|
|
@@ -9596,7 +9594,7 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9596
9594
|
n.label,
|
|
9597
9595
|
" "
|
|
9598
9596
|
] }),
|
|
9599
|
-
n.tooltip && /* @__PURE__ */ s(
|
|
9597
|
+
n.tooltip && /* @__PURE__ */ s(Yt, { title: n.tooltip, children: /* @__PURE__ */ s(
|
|
9600
9598
|
Ai,
|
|
9601
9599
|
{
|
|
9602
9600
|
className: "pr-1 text-xs",
|
|
@@ -9642,7 +9640,7 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9642
9640
|
);
|
|
9643
9641
|
return n.card ? /* @__PURE__ */ s(Ao, { children: f }) : f;
|
|
9644
9642
|
}, Mh = (e) => {
|
|
9645
|
-
const { ooui: t } = e, { actionId: n, height: r } = t, { activeId: o } = ed(), { actionData: a, treeShortcut: i, loading: l, error: c, fetchData: d } = cu(n), p =
|
|
9643
|
+
const { ooui: t } = e, { actionId: n, height: r } = t, { activeId: o } = ed(), { actionData: a, treeShortcut: i, loading: l, error: c, fetchData: d } = cu(n), p = qt(
|
|
9646
9644
|
Lt.FEATURE_READFORVIEW
|
|
9647
9645
|
), u = ie(
|
|
9648
9646
|
At
|
|
@@ -9991,7 +9989,7 @@ const Ah = Ft(Fh), Cr = "legacy", _h = (e) => {
|
|
|
9991
9989
|
fieldDefs: a,
|
|
9992
9990
|
onAutorefreshableFieldsChange: i,
|
|
9993
9991
|
isActive: l
|
|
9994
|
-
} = e, c =
|
|
9992
|
+
} = e, c = q(null), [d, p] = I(!0), [u, m] = qe(
|
|
9995
9993
|
L.getHandler().readObjects
|
|
9996
9994
|
), h = ns();
|
|
9997
9995
|
oe(() => {
|
|
@@ -10064,7 +10062,7 @@ function og(e, t) {
|
|
|
10064
10062
|
forcedValues: O = {},
|
|
10065
10063
|
parentWidth: C,
|
|
10066
10064
|
onMustRefreshParent: b
|
|
10067
|
-
} = e, { t: A } = he(), [R, T] = I(!1), [_, k] = I(), [E, B] = I(), [N] = Et.useForm(), [j, M] = I(), [P, Y] = I(),
|
|
10065
|
+
} = e, { t: A } = he(), [R, T] = I(!1), [_, k] = I(), [E, B] = I(), [N] = Et.useForm(), [j, M] = I(), [P, Y] = I(), G = ie(dl), [U, z] = I(), [ge, ae] = I(!1), H = q(), W = q({}), me = q({}), ee = q(!1), ue = q(!1), $ = q(!1), Z = (C !== void 0 ? C : U) < rg, pe = ie(Ke), { activeId: Te, getPlainValues: ye } = pe || {}, Ue = q(!1), ze = ie(
|
|
10068
10066
|
St
|
|
10069
10067
|
), {
|
|
10070
10068
|
setFormIsSaving: Ce = void 0,
|
|
@@ -10074,7 +10072,7 @@ function og(e, t) {
|
|
|
10074
10072
|
setAttachments: Ne = void 0,
|
|
10075
10073
|
title: Le = void 0,
|
|
10076
10074
|
setTitle: xe = void 0,
|
|
10077
|
-
isActive:
|
|
10075
|
+
isActive: re = void 0
|
|
10078
10076
|
} = (x ? ze : {}) || {}, He = ie(
|
|
10079
10077
|
Nn
|
|
10080
10078
|
), { processAction: je, globalValues: ke } = He || {};
|
|
@@ -10102,68 +10100,68 @@ function og(e, t) {
|
|
|
10102
10100
|
elementHasLostFocus: !0
|
|
10103
10101
|
}), ae(!1));
|
|
10104
10102
|
}, [ge]);
|
|
10105
|
-
const we = (
|
|
10106
|
-
ce == null || ce(!1), Ce == null || Ce(!1), a == null || a(
|
|
10107
|
-
}, Ae = (
|
|
10108
|
-
Ce == null || Ce(!1), d == null || d(
|
|
10109
|
-
},
|
|
10110
|
-
Ue.current && (b == null || b()), Ce == null || Ce(!1), o == null || o({ id:
|
|
10103
|
+
const we = (K, Q, le, be) => {
|
|
10104
|
+
ce == null || ce(!1), Ce == null || Ce(!1), a == null || a(K, Q, le, be), Pe == null || Pe(K), Ue.current && (b == null || b());
|
|
10105
|
+
}, Ae = (K) => {
|
|
10106
|
+
Ce == null || Ce(!1), d == null || d(K);
|
|
10107
|
+
}, ne = D(() => r || H.current, [r]), [Qe, rt] = I(() => H.current), We = D(() => {
|
|
10108
|
+
Ue.current && (b == null || b()), Ce == null || Ce(!1), o == null || o({ id: ne(), values: de() });
|
|
10111
10109
|
}, [
|
|
10112
|
-
|
|
10110
|
+
ne,
|
|
10113
10111
|
de,
|
|
10114
10112
|
b,
|
|
10115
10113
|
o,
|
|
10116
10114
|
Ce
|
|
10117
10115
|
]);
|
|
10118
10116
|
oe(() => {
|
|
10119
|
-
H.current !==
|
|
10117
|
+
H.current !== Qe && rt(H.current);
|
|
10120
10118
|
}, [H.current]);
|
|
10121
|
-
const tt =
|
|
10119
|
+
const tt = X(() => r || Qe, [r, Qe]);
|
|
10122
10120
|
function te() {
|
|
10123
10121
|
return P;
|
|
10124
10122
|
}
|
|
10125
10123
|
function de() {
|
|
10126
|
-
const
|
|
10124
|
+
const K = {
|
|
10127
10125
|
...Fe(P),
|
|
10128
10126
|
...ut()
|
|
10129
10127
|
};
|
|
10130
|
-
for (const
|
|
10131
|
-
|
|
10132
|
-
return
|
|
10128
|
+
for (const Q in K)
|
|
10129
|
+
K[Q] === void 0 && delete K[Q];
|
|
10130
|
+
return K;
|
|
10133
10131
|
}
|
|
10134
10132
|
function Oe() {
|
|
10135
|
-
const
|
|
10136
|
-
return Object.keys(
|
|
10137
|
-
const De =
|
|
10138
|
-
|
|
10133
|
+
const K = de(), Q = te(), le = {};
|
|
10134
|
+
return Object.keys(K).forEach((be) => {
|
|
10135
|
+
const De = K[be];
|
|
10136
|
+
Q[be] && Q[be].type === "many2one" && De && Array.isArray(De) && De.length === 2 ? le[be] = De[0] : Q[be] && (Q[be].type === "one2many" || Q[be].type === "many2many") && De && De.items ? le[be] = De.items.filter((lt) => lt.operation !== "pendingRemove").map((lt) => lt.id) : le[be] = De;
|
|
10139
10137
|
}), le;
|
|
10140
10138
|
}
|
|
10141
10139
|
function ve() {
|
|
10142
|
-
const
|
|
10140
|
+
const K = {
|
|
10143
10141
|
...Fe(P)
|
|
10144
10142
|
};
|
|
10145
|
-
for (const
|
|
10146
|
-
|
|
10147
|
-
return
|
|
10143
|
+
for (const Q in K)
|
|
10144
|
+
K[Q] === void 0 && delete K[Q];
|
|
10145
|
+
return K;
|
|
10148
10146
|
}
|
|
10149
10147
|
function Ee() {
|
|
10150
10148
|
return { ...v, ...E == null ? void 0 : E.context };
|
|
10151
10149
|
}
|
|
10152
10150
|
function Be() {
|
|
10153
|
-
return
|
|
10151
|
+
return ne() ? { active_id: ne(), active_ids: [ne()] } : {};
|
|
10154
10152
|
}
|
|
10155
10153
|
const ut = D(() => ({
|
|
10156
|
-
id:
|
|
10157
|
-
active_id:
|
|
10158
|
-
active_ids: [
|
|
10154
|
+
id: ne(),
|
|
10155
|
+
active_id: ne(),
|
|
10156
|
+
active_ids: [ne()],
|
|
10159
10157
|
parent_id: Te,
|
|
10160
10158
|
...ke
|
|
10161
|
-
}), [
|
|
10162
|
-
const
|
|
10159
|
+
}), [ne, Te, ke]), kt = async (K) => {
|
|
10160
|
+
const Q = ne() ? E == null ? void 0 : E.context : {};
|
|
10163
10161
|
return await L.getHandler().defaultGet({
|
|
10164
10162
|
model: n,
|
|
10165
|
-
fields:
|
|
10166
|
-
context: { ...v, ...
|
|
10163
|
+
fields: K,
|
|
10164
|
+
context: { ...v, ...Q },
|
|
10167
10165
|
extraValues: S
|
|
10168
10166
|
});
|
|
10169
10167
|
}, ht = () => Object.keys(
|
|
@@ -10173,21 +10171,21 @@ function og(e, t) {
|
|
|
10173
10171
|
fields: P
|
|
10174
10172
|
})
|
|
10175
10173
|
).length !== 0, Fe = D(
|
|
10176
|
-
(
|
|
10177
|
-
const
|
|
10178
|
-
return wn(
|
|
10174
|
+
(K) => {
|
|
10175
|
+
const Q = N.getFieldsValue(!0);
|
|
10176
|
+
return wn(Q, K);
|
|
10179
10177
|
},
|
|
10180
10178
|
[N]
|
|
10181
|
-
), ft = (
|
|
10179
|
+
), ft = (K, Q) => {
|
|
10182
10180
|
Rt({
|
|
10183
10181
|
values: {
|
|
10184
10182
|
...wn(N.getFieldsValue(!0), P),
|
|
10185
|
-
[
|
|
10183
|
+
[K]: Q
|
|
10186
10184
|
},
|
|
10187
10185
|
fields: P,
|
|
10188
10186
|
reset: !1
|
|
10189
10187
|
});
|
|
10190
|
-
}, Mt = (
|
|
10188
|
+
}, Mt = (K) => N.getFieldsValue(!0)[K];
|
|
10191
10189
|
async function on() {
|
|
10192
10190
|
try {
|
|
10193
10191
|
return await N.validateFields(), !1;
|
|
@@ -10197,43 +10195,43 @@ function og(e, t) {
|
|
|
10197
10195
|
}
|
|
10198
10196
|
const gn = async () => {
|
|
10199
10197
|
k(void 0), Ie == null || Ie(!0);
|
|
10200
|
-
let
|
|
10198
|
+
let K;
|
|
10201
10199
|
try {
|
|
10202
|
-
f ?
|
|
10203
|
-
const { fields:
|
|
10204
|
-
Y(
|
|
10205
|
-
fields:
|
|
10200
|
+
f ? K = { arch: f.arch, fields: f.fields } : K = await Kt();
|
|
10201
|
+
const { fields: Q, arch: le } = K;
|
|
10202
|
+
Y(Q), M(le), await _t({
|
|
10203
|
+
fields: Q,
|
|
10206
10204
|
arch: le
|
|
10207
10205
|
});
|
|
10208
|
-
} catch (
|
|
10209
|
-
k(
|
|
10206
|
+
} catch (Q) {
|
|
10207
|
+
k(Q != null && Q.message ? Q.message + Q.stack : Q), Ie == null || Ie(!1);
|
|
10210
10208
|
}
|
|
10211
|
-
}, _t = async (
|
|
10212
|
-
let
|
|
10213
|
-
Ie == null || Ie(!0), k(void 0),
|
|
10209
|
+
}, _t = async (K) => {
|
|
10210
|
+
let Q, le, be, De;
|
|
10211
|
+
Ie == null || Ie(!0), k(void 0), K != null && K.fields ? (le = K.fields, be = K.arch) : (le = P, be = j), h && (K == null ? void 0 : K.forceRefresh) !== !0 ? Q = h : { values: Q, defaultGetCalled: De } = await zt({
|
|
10214
10212
|
fields: le,
|
|
10215
10213
|
arch: be
|
|
10216
|
-
}), w && (
|
|
10217
|
-
values:
|
|
10214
|
+
}), w && (Q = { ...Jd(w), ...Q }), W.current = wn(Q, le), Rt({
|
|
10215
|
+
values: Q,
|
|
10218
10216
|
fields: le,
|
|
10219
10217
|
reset: !0,
|
|
10220
10218
|
isDefaultGet: De
|
|
10221
|
-
}), Vt({ fields: le, arch: be, values:
|
|
10222
|
-
}, Bt = async () => new Promise(async (
|
|
10219
|
+
}), Vt({ fields: le, arch: be, values: Q }), Ie == null || Ie(!1), ce == null || ce(!1), De && ae(!0);
|
|
10220
|
+
}, Bt = async () => new Promise(async (K) => {
|
|
10223
10221
|
ht() ? Vn({
|
|
10224
10222
|
t: A,
|
|
10225
10223
|
onOk: () => {
|
|
10226
|
-
We == null || We(),
|
|
10224
|
+
We == null || We(), K(!0);
|
|
10227
10225
|
},
|
|
10228
10226
|
onCancel: () => {
|
|
10229
|
-
|
|
10227
|
+
K(!1);
|
|
10230
10228
|
}
|
|
10231
|
-
}) : (We == null || We(),
|
|
10232
|
-
}),
|
|
10229
|
+
}) : (We == null || We(), K(!0));
|
|
10230
|
+
}), Kt = async () => {
|
|
10233
10231
|
if (l) {
|
|
10234
|
-
const
|
|
10232
|
+
const K = await L.getHandler().getActionStringForModel(n);
|
|
10235
10233
|
return (await L.getHandler().getViewsForAction({
|
|
10236
|
-
action:
|
|
10234
|
+
action: K,
|
|
10237
10235
|
context: v
|
|
10238
10236
|
})).views.get("form");
|
|
10239
10237
|
}
|
|
@@ -10244,12 +10242,12 @@ function og(e, t) {
|
|
|
10244
10242
|
});
|
|
10245
10243
|
}, Rt = D(
|
|
10246
10244
|
({
|
|
10247
|
-
values:
|
|
10248
|
-
fields:
|
|
10245
|
+
values: K,
|
|
10246
|
+
fields: Q,
|
|
10249
10247
|
reset: le,
|
|
10250
10248
|
isDefaultGet: be = !1
|
|
10251
10249
|
}) => {
|
|
10252
|
-
const lt = { ...le ? {} : N.getFieldsValue(!0), ...
|
|
10250
|
+
const lt = { ...le ? {} : N.getFieldsValue(!0), ...K }, qr = wn(lt, Q), _l = Object.keys(Q).map((Kr) => ({
|
|
10253
10251
|
name: Kr,
|
|
10254
10252
|
touched: !1,
|
|
10255
10253
|
value: qr[Kr] !== void 0 ? qr[Kr] : void 0
|
|
@@ -10258,27 +10256,27 @@ function og(e, t) {
|
|
|
10258
10256
|
},
|
|
10259
10257
|
[N]
|
|
10260
10258
|
), zt = async ({
|
|
10261
|
-
fields:
|
|
10262
|
-
arch:
|
|
10259
|
+
fields: K,
|
|
10260
|
+
arch: Q
|
|
10263
10261
|
}) => {
|
|
10264
10262
|
let le = {}, be = !1;
|
|
10265
|
-
if (
|
|
10263
|
+
if (ne()) {
|
|
10266
10264
|
const De = E || an({
|
|
10267
|
-
arch:
|
|
10268
|
-
fields:
|
|
10265
|
+
arch: Q,
|
|
10266
|
+
fields: K,
|
|
10269
10267
|
values: {}
|
|
10270
10268
|
});
|
|
10271
10269
|
if (le = (await L.getHandler().readObjects({
|
|
10272
10270
|
model: n,
|
|
10273
|
-
ids: [
|
|
10274
|
-
fields: eg(
|
|
10271
|
+
ids: [ne()],
|
|
10272
|
+
fields: eg(K, De == null ? void 0 : De.contextForFields),
|
|
10275
10273
|
context: v
|
|
10276
10274
|
}))[0], y)
|
|
10277
10275
|
return { values: le, defaultGetCalled: be };
|
|
10278
10276
|
const lt = await L.getHandler().search({
|
|
10279
10277
|
params: [
|
|
10280
10278
|
["res_model", "=", n],
|
|
10281
|
-
["res_id", "=",
|
|
10279
|
+
["res_id", "=", ne()]
|
|
10282
10280
|
],
|
|
10283
10281
|
fieldsToRetrieve: ["id", "name"],
|
|
10284
10282
|
context: Ee(),
|
|
@@ -10286,11 +10284,11 @@ function og(e, t) {
|
|
|
10286
10284
|
});
|
|
10287
10285
|
Ne == null || Ne(lt);
|
|
10288
10286
|
} else
|
|
10289
|
-
Ne == null || Ne([]), le = await kt(
|
|
10287
|
+
Ne == null || Ne([]), le = await kt(K), be = !0;
|
|
10290
10288
|
return { values: le, defaultGetCalled: be };
|
|
10291
|
-
}, yn = async (
|
|
10292
|
-
const { callOnSubmitSucceed:
|
|
10293
|
-
if (
|
|
10289
|
+
}, yn = async (K) => {
|
|
10290
|
+
const { callOnSubmitSucceed: Q = !0 } = K || {};
|
|
10291
|
+
if (ne()) {
|
|
10294
10292
|
const le = zr({
|
|
10295
10293
|
source: W.current,
|
|
10296
10294
|
target: Fe(P),
|
|
@@ -10298,7 +10296,7 @@ function og(e, t) {
|
|
|
10298
10296
|
});
|
|
10299
10297
|
await L.getHandler().update({
|
|
10300
10298
|
model: n,
|
|
10301
|
-
id:
|
|
10299
|
+
id: ne(),
|
|
10302
10300
|
values: { ...le, ...O },
|
|
10303
10301
|
fields: P,
|
|
10304
10302
|
context: {
|
|
@@ -10318,83 +10316,83 @@ function og(e, t) {
|
|
|
10318
10316
|
});
|
|
10319
10317
|
H.current = be, W.current = le;
|
|
10320
10318
|
}
|
|
10321
|
-
g && await g([
|
|
10322
|
-
}, sn = async (
|
|
10323
|
-
const { callOnSubmitSucceed:
|
|
10324
|
-
!y &&
|
|
10325
|
-
}, Jt = async (
|
|
10326
|
-
let
|
|
10327
|
-
const { callOnSubmitSucceed: le = !0 } =
|
|
10328
|
-
if (ue.current = !0, k(void 0), $.current && !ht() &&
|
|
10319
|
+
g && await g([ne()]), !y && Q && (we == null || we(ne(), de(), ve()));
|
|
10320
|
+
}, sn = async (K) => {
|
|
10321
|
+
const { callOnSubmitSucceed: Q = !0 } = K || {};
|
|
10322
|
+
!y && Q && (we == null || we(ne(), de(), ve()));
|
|
10323
|
+
}, Jt = async (K) => {
|
|
10324
|
+
let Q = !1;
|
|
10325
|
+
const { callOnSubmitSucceed: le = !0 } = K || {};
|
|
10326
|
+
if (ue.current = !0, k(void 0), $.current && !ht() && ne() && le) {
|
|
10329
10327
|
ue.current = !1, ce == null || ce(!1), we == null || we(
|
|
10330
|
-
|
|
10328
|
+
ne(),
|
|
10331
10329
|
de(),
|
|
10332
10330
|
ve(),
|
|
10333
10331
|
$.current
|
|
10334
10332
|
), $.current = !1;
|
|
10335
|
-
const be =
|
|
10333
|
+
const be = ne();
|
|
10336
10334
|
return u && (H.current = void 0, Rt({ values: {}, fields: P, reset: !0 })), { succeed: !0, id: be };
|
|
10337
10335
|
}
|
|
10338
|
-
if (!ht() &&
|
|
10339
|
-
return ue.current = !1, ce == null || ce(!1), We == null || We(), { succeed: !0, id:
|
|
10336
|
+
if (!ht() && ne() && le)
|
|
10337
|
+
return ue.current = !1, ce == null || ce(!1), We == null || We(), { succeed: !0, id: ne() };
|
|
10340
10338
|
if (await on())
|
|
10341
|
-
return ue.current = !1, ci(A), { succeed: !1, id:
|
|
10339
|
+
return ue.current = !1, ci(A), { succeed: !1, id: ne() };
|
|
10342
10340
|
T(!0), Ce == null || Ce(!0);
|
|
10343
10341
|
try {
|
|
10344
|
-
m === "api" ? await yn(
|
|
10342
|
+
m === "api" ? await yn(K) : await sn(K), u && (H.current = void 0, Rt({ values: {}, fields: P, reset: !0 })), await _t({ forceRefresh: !0 }), Q = !0, Hn.success(A("savedRegisters"));
|
|
10345
10343
|
} catch (be) {
|
|
10346
10344
|
ue.current = !1, T(!1), Ce == null || Ce(!1), Ae == null || Ae(be), Hn.error(A("errorWhileSavingForm")), k(be != null && be.message ? be.message : be);
|
|
10347
10345
|
} finally {
|
|
10348
10346
|
ue.current = !1, Ce == null || Ce(!1), T(!1);
|
|
10349
10347
|
}
|
|
10350
|
-
return { succeed:
|
|
10348
|
+
return { succeed: Q, id: ne() };
|
|
10351
10349
|
}, an = D(
|
|
10352
10350
|
({
|
|
10353
|
-
fields:
|
|
10354
|
-
arch:
|
|
10351
|
+
fields: K,
|
|
10352
|
+
arch: Q,
|
|
10355
10353
|
values: le,
|
|
10356
10354
|
operationInProgress: be = !1
|
|
10357
10355
|
}) => {
|
|
10358
|
-
const De = new Ii(
|
|
10359
|
-
return De.parse(
|
|
10356
|
+
const De = new Ii(K);
|
|
10357
|
+
return De.parse(Q, {
|
|
10360
10358
|
readOnly: p || be,
|
|
10361
10359
|
values: $d(
|
|
10362
10360
|
{
|
|
10363
10361
|
...le,
|
|
10364
10362
|
...ut()
|
|
10365
10363
|
},
|
|
10366
|
-
|
|
10364
|
+
K
|
|
10367
10365
|
)
|
|
10368
10366
|
}), De;
|
|
10369
10367
|
},
|
|
10370
10368
|
[ut, p]
|
|
10371
10369
|
), Vt = D(
|
|
10372
10370
|
({
|
|
10373
|
-
fields:
|
|
10374
|
-
arch:
|
|
10371
|
+
fields: K,
|
|
10372
|
+
arch: Q,
|
|
10375
10373
|
values: le,
|
|
10376
10374
|
operationInProgress: be = !1
|
|
10377
10375
|
}) => {
|
|
10378
10376
|
var lt;
|
|
10379
10377
|
const De = an({
|
|
10380
|
-
arch:
|
|
10381
|
-
fields:
|
|
10378
|
+
arch: Q,
|
|
10379
|
+
fields: K,
|
|
10382
10380
|
values: le,
|
|
10383
10381
|
operationInProgress: be
|
|
10384
10382
|
});
|
|
10385
|
-
B(De), De.string && De.string !== Le && (xe == null || xe(De.string)),
|
|
10383
|
+
B(De), De.string && De.string !== Le && (xe == null || xe(De.string)), G && De.string && ((lt = G.setTitle) == null || lt.call(G, De.string));
|
|
10386
10384
|
},
|
|
10387
|
-
[
|
|
10385
|
+
[G, an, xe, Le]
|
|
10388
10386
|
), Se = async ({
|
|
10389
|
-
elementHasLostFocus:
|
|
10387
|
+
elementHasLostFocus: K = !1
|
|
10390
10388
|
}) => {
|
|
10391
10389
|
if (ue.current)
|
|
10392
10390
|
return;
|
|
10393
|
-
const
|
|
10391
|
+
const Q = zr({
|
|
10394
10392
|
source: me.current,
|
|
10395
10393
|
target: Fe(P),
|
|
10396
10394
|
fields: P
|
|
10397
|
-
}), le = Object.keys(
|
|
10395
|
+
}), le = Object.keys(Q);
|
|
10398
10396
|
if (le.length !== 0 && !(Kd({
|
|
10399
10397
|
changedFields: le,
|
|
10400
10398
|
formOoui: E,
|
|
@@ -10409,22 +10407,22 @@ function og(e, t) {
|
|
|
10409
10407
|
"integer",
|
|
10410
10408
|
"many2one"
|
|
10411
10409
|
]
|
|
10412
|
-
}) &&
|
|
10410
|
+
}) && K !== !0)) {
|
|
10413
10411
|
const be = wn(N.getFieldsValue(!0), P);
|
|
10414
|
-
me.current = be, c == null || c(be), ce == null || ce(!0),
|
|
10412
|
+
me.current = be, c == null || c(be), ce == null || ce(!0), Xe(le);
|
|
10415
10413
|
}
|
|
10416
|
-
}, Me = Oc(Se, 100),
|
|
10414
|
+
}, Me = Oc(Se, 100), Xe = async (K) => {
|
|
10417
10415
|
try {
|
|
10418
|
-
for (let
|
|
10419
|
-
const le =
|
|
10416
|
+
for (let Q = 0; Q < K.length; Q += 1) {
|
|
10417
|
+
const le = K[Q];
|
|
10420
10418
|
await fe(le);
|
|
10421
10419
|
}
|
|
10422
|
-
} catch (
|
|
10423
|
-
bt(
|
|
10420
|
+
} catch (Q) {
|
|
10421
|
+
bt(Q);
|
|
10424
10422
|
}
|
|
10425
|
-
}, fe = async (
|
|
10426
|
-
const
|
|
10427
|
-
if (!
|
|
10423
|
+
}, fe = async (K) => {
|
|
10424
|
+
const Q = E == null ? void 0 : E.onChangeFields[K];
|
|
10425
|
+
if (!Q) {
|
|
10428
10426
|
Vt({
|
|
10429
10427
|
fields: P,
|
|
10430
10428
|
arch: j,
|
|
@@ -10441,11 +10439,11 @@ function og(e, t) {
|
|
|
10441
10439
|
}
|
|
10442
10440
|
},
|
|
10443
10441
|
parentValues: ye == null ? void 0 : ye(),
|
|
10444
|
-
onChangeFieldActionArgs:
|
|
10442
|
+
onChangeFieldActionArgs: Q.args
|
|
10445
10443
|
}), be = await L.getHandler().executeOnChange({
|
|
10446
10444
|
model: n,
|
|
10447
|
-
action:
|
|
10448
|
-
ids:
|
|
10445
|
+
action: Q.method,
|
|
10446
|
+
ids: ne() ? [ne()] : [],
|
|
10449
10447
|
payload: le,
|
|
10450
10448
|
fields: P
|
|
10451
10449
|
});
|
|
@@ -10486,23 +10484,23 @@ function og(e, t) {
|
|
|
10486
10484
|
}
|
|
10487
10485
|
};
|
|
10488
10486
|
async function _e({
|
|
10489
|
-
action:
|
|
10490
|
-
context:
|
|
10487
|
+
action: K,
|
|
10488
|
+
context: Q
|
|
10491
10489
|
}) {
|
|
10492
10490
|
const le = await L.getHandler().execute({
|
|
10493
10491
|
model: n,
|
|
10494
|
-
action:
|
|
10495
|
-
payload: [
|
|
10492
|
+
action: K,
|
|
10493
|
+
payload: [ne()],
|
|
10496
10494
|
context: {
|
|
10497
10495
|
...E == null ? void 0 : E.context,
|
|
10498
10496
|
...v,
|
|
10499
|
-
...
|
|
10497
|
+
...Q
|
|
10500
10498
|
}
|
|
10501
10499
|
});
|
|
10502
10500
|
if (typeof le == "object" && le !== null && Object.keys(le).length === 0 && y)
|
|
10503
|
-
we == null || we(
|
|
10501
|
+
we == null || we(ne(), de(), ve());
|
|
10504
10502
|
else if (le.type && le.type === "ir.actions.act_window_close")
|
|
10505
|
-
we == null || we(
|
|
10503
|
+
we == null || we(ne(), de(), ve());
|
|
10506
10504
|
else if (le.type) {
|
|
10507
10505
|
let be = {};
|
|
10508
10506
|
le.context && (be = Zt({
|
|
@@ -10511,70 +10509,70 @@ function og(e, t) {
|
|
|
10511
10509
|
values: de()
|
|
10512
10510
|
})), await Ot({
|
|
10513
10511
|
actionData: le,
|
|
10514
|
-
context: { ...
|
|
10512
|
+
context: { ...Q, ...be }
|
|
10515
10513
|
});
|
|
10516
10514
|
} else
|
|
10517
10515
|
await _t({ forceRefresh: !0 });
|
|
10518
10516
|
}
|
|
10519
|
-
async function ot({ action:
|
|
10520
|
-
const
|
|
10517
|
+
async function ot({ action: K }) {
|
|
10518
|
+
const Q = await L.getHandler().executeWorkflow({
|
|
10521
10519
|
model: n,
|
|
10522
|
-
action:
|
|
10523
|
-
payload:
|
|
10520
|
+
action: K,
|
|
10521
|
+
payload: ne()
|
|
10524
10522
|
});
|
|
10525
|
-
|
|
10523
|
+
Q.type && Q.type === "ir.actions.act_window_close" ? we == null || we(ne(), de(), ve()) : await _t({ forceRefresh: !0 });
|
|
10526
10524
|
}
|
|
10527
10525
|
async function it({
|
|
10528
|
-
action:
|
|
10529
|
-
context:
|
|
10526
|
+
action: K,
|
|
10527
|
+
context: Q
|
|
10530
10528
|
}) {
|
|
10531
10529
|
const le = (await L.getHandler().readObjects({
|
|
10532
10530
|
model: "ir.actions.actions",
|
|
10533
|
-
ids: [parseInt(
|
|
10531
|
+
ids: [parseInt(K)],
|
|
10534
10532
|
context: v
|
|
10535
10533
|
}))[0];
|
|
10536
|
-
await Ot({ actionData: le, context:
|
|
10534
|
+
await Ot({ actionData: le, context: Q });
|
|
10537
10535
|
}
|
|
10538
10536
|
async function Ot({
|
|
10539
|
-
actionData:
|
|
10540
|
-
context:
|
|
10537
|
+
actionData: K,
|
|
10538
|
+
context: Q
|
|
10541
10539
|
}) {
|
|
10542
10540
|
const { closeParent: le } = await (je == null ? void 0 : je({
|
|
10543
|
-
actionData:
|
|
10541
|
+
actionData: K,
|
|
10544
10542
|
fields: P,
|
|
10545
10543
|
values: de(),
|
|
10546
10544
|
context: {
|
|
10547
10545
|
...v,
|
|
10548
10546
|
...E == null ? void 0 : E.context,
|
|
10549
|
-
...
|
|
10547
|
+
...Q
|
|
10550
10548
|
},
|
|
10551
10549
|
onRefreshParentValues: async () => {
|
|
10552
10550
|
Ue.current = !0, await _t({ forceRefresh: !0 });
|
|
10553
10551
|
}
|
|
10554
10552
|
})) || {};
|
|
10555
|
-
!x && le && (we == null || we(
|
|
10553
|
+
!x && le && (we == null || we(ne(), de(), ve()));
|
|
10556
10554
|
}
|
|
10557
10555
|
function ir() {
|
|
10558
10556
|
Se({ elementHasLostFocus: !0 });
|
|
10559
10557
|
}
|
|
10560
|
-
function Bn(
|
|
10558
|
+
function Bn(K) {
|
|
10561
10559
|
Vt({
|
|
10562
10560
|
fields: P,
|
|
10563
10561
|
arch: j,
|
|
10564
10562
|
values: Fe(P),
|
|
10565
|
-
operationInProgress:
|
|
10563
|
+
operationInProgress: K
|
|
10566
10564
|
});
|
|
10567
10565
|
}
|
|
10568
10566
|
const Qt = D(
|
|
10569
|
-
(
|
|
10567
|
+
(K) => {
|
|
10570
10568
|
if (!j)
|
|
10571
10569
|
return;
|
|
10572
|
-
const
|
|
10570
|
+
const Q = { ...Fe(P), ...K };
|
|
10573
10571
|
W.current = {
|
|
10574
10572
|
...W.current,
|
|
10575
|
-
...
|
|
10576
|
-
}, Vt({ fields: P, arch: j, values:
|
|
10577
|
-
values:
|
|
10573
|
+
...K
|
|
10574
|
+
}, Vt({ fields: P, arch: j, values: Q }), Rt({
|
|
10575
|
+
values: Q,
|
|
10578
10576
|
fields: P,
|
|
10579
10577
|
reset: !1
|
|
10580
10578
|
});
|
|
@@ -10588,14 +10586,14 @@ function og(e, t) {
|
|
|
10588
10586
|
autorefreshableFields: E == null ? void 0 : E.autorefreshableFields,
|
|
10589
10587
|
fieldDefs: P,
|
|
10590
10588
|
onAutorefreshableFieldsChange: Qt,
|
|
10591
|
-
isActive:
|
|
10589
|
+
isActive: re
|
|
10592
10590
|
});
|
|
10593
10591
|
async function Gr({
|
|
10594
|
-
type:
|
|
10595
|
-
action:
|
|
10592
|
+
type: K,
|
|
10593
|
+
action: Q,
|
|
10596
10594
|
context: le
|
|
10597
10595
|
}) {
|
|
10598
|
-
if (
|
|
10596
|
+
if (K === "cancel") {
|
|
10599
10597
|
We == null || We();
|
|
10600
10598
|
return;
|
|
10601
10599
|
}
|
|
@@ -10605,14 +10603,14 @@ function og(e, t) {
|
|
|
10605
10603
|
}
|
|
10606
10604
|
let be = !1;
|
|
10607
10605
|
try {
|
|
10608
|
-
!p && (ht() ||
|
|
10606
|
+
!p && (ht() || ne() === void 0) && (be = !0, Bn(!0), m === "2many" ? (await yn({ callOnSubmitSucceed: !1 }), $.current = !0) : await Jt({ callOnSubmitSucceed: !1 }));
|
|
10609
10607
|
const De = $.current ? Be() : {}, lt = { ...le, ...De };
|
|
10610
|
-
|
|
10608
|
+
K === "object" ? await _e({ action: Q, context: lt }) : K === "workflow" ? await ot({ action: Q }) : K === "action" && await it({ action: Q, context: lt }), be && Bn(!1);
|
|
10611
10609
|
} catch (De) {
|
|
10612
10610
|
be && Bn(!1), bt(De);
|
|
10613
10611
|
}
|
|
10614
10612
|
}
|
|
10615
|
-
const ar = () => !E && !_ ? /* @__PURE__ */ s(
|
|
10613
|
+
const ar = () => !E && !_ ? /* @__PURE__ */ s(Ze, {}) : !n && !f || !F ? null : /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
|
|
10616
10614
|
Zc,
|
|
10617
10615
|
{
|
|
10618
10616
|
getValues: de,
|
|
@@ -10681,11 +10679,11 @@ function og(e, t) {
|
|
|
10681
10679
|
ko,
|
|
10682
10680
|
{
|
|
10683
10681
|
bounds: !0,
|
|
10684
|
-
onResize: (
|
|
10685
|
-
var
|
|
10686
|
-
|
|
10682
|
+
onResize: (K) => {
|
|
10683
|
+
var Q;
|
|
10684
|
+
z((Q = K.bounds) == null ? void 0 : Q.width);
|
|
10687
10685
|
},
|
|
10688
|
-
children: ({ measureRef:
|
|
10686
|
+
children: ({ measureRef: K }) => /* @__PURE__ */ V("div", { className: "pb-2", ref: K, children: [
|
|
10689
10687
|
_ && /* @__PURE__ */ s(oa, { className: "mt-5 mb-10", error: _ }),
|
|
10690
10688
|
ar(),
|
|
10691
10689
|
i && xt()
|
|
@@ -10791,7 +10789,7 @@ const Mn = Ft(og), $n = (e) => {
|
|
|
10791
10789
|
treeViewProps: void 0,
|
|
10792
10790
|
context: i,
|
|
10793
10791
|
enabled: e
|
|
10794
|
-
}), F =
|
|
10792
|
+
}), F = X(() => y != null && y.arch ? Xi(y.arch, "infinite") === "1" : !1, [y == null ? void 0 : y.arch]), x = D(
|
|
10795
10793
|
async (_) => {
|
|
10796
10794
|
m(!0);
|
|
10797
10795
|
try {
|
|
@@ -10816,7 +10814,7 @@ const Mn = Ft(og), $n = (e) => {
|
|
|
10816
10814
|
return;
|
|
10817
10815
|
}
|
|
10818
10816
|
x(d);
|
|
10819
|
-
}, [d, S, x]), b =
|
|
10817
|
+
}, [d, S, x]), b = X(
|
|
10820
10818
|
() => F ? rl : il,
|
|
10821
10819
|
[F]
|
|
10822
10820
|
), A = D(() => {
|
|
@@ -10913,7 +10911,7 @@ const Mn = Ft(og), $n = (e) => {
|
|
|
10913
10911
|
context: l,
|
|
10914
10912
|
id: c,
|
|
10915
10913
|
domain: d
|
|
10916
|
-
} = r, p = o && !i ? { backgroundColor: ul.colorPrimaryBg } : void 0, [u, m] = I(!1), [h, f] = I(!1), [g, y] = I(!1), [v, w] = I(), F =
|
|
10914
|
+
} = r, p = o && !i ? { backgroundColor: ul.colorPrimaryBg } : void 0, [u, m] = I(!1), [h, f] = I(!1), [g, y] = I(!1), [v, w] = I(), F = q(!1), [x, S] = I(""), O = q(), C = ie(Ke), { domain: b, getValues: A, getFields: R, getContext: T, elementHasLostFocus: _ } = C || {}, k = q([]), [E, B] = I([]), N = t && t[0] || void 0, j = t && t[1] || "";
|
|
10917
10915
|
oe(() => {
|
|
10918
10916
|
!Array.isArray(t) && t && U(t);
|
|
10919
10917
|
}, [t]), oe(() => {
|
|
@@ -10932,14 +10930,14 @@ const Mn = Ft(og), $n = (e) => {
|
|
|
10932
10930
|
y(!0);
|
|
10933
10931
|
try {
|
|
10934
10932
|
if (k.current && k.current.length > 0)
|
|
10935
|
-
|
|
10933
|
+
G(O.current);
|
|
10936
10934
|
else {
|
|
10937
10935
|
const H = await L.getHandler().nameSearch({
|
|
10938
10936
|
model: a,
|
|
10939
10937
|
payload: O.current,
|
|
10940
10938
|
context: { ...T == null ? void 0 : T(), ...l }
|
|
10941
10939
|
});
|
|
10942
|
-
H.length === 1 ? (O.current = void 0, M(H[0])) :
|
|
10940
|
+
H.length === 1 ? (O.current = void 0, M(H[0])) : G(O.current);
|
|
10943
10941
|
}
|
|
10944
10942
|
} catch (H) {
|
|
10945
10943
|
tn(H);
|
|
@@ -10947,8 +10945,8 @@ const Mn = Ft(og), $n = (e) => {
|
|
|
10947
10945
|
y(!1);
|
|
10948
10946
|
}
|
|
10949
10947
|
}
|
|
10950
|
-
},
|
|
10951
|
-
if (await
|
|
10948
|
+
}, G = async (H) => {
|
|
10949
|
+
if (await z(), k.current && k.current.length > 0) {
|
|
10952
10950
|
const W = await L.getHandler().searchAllIds({
|
|
10953
10951
|
params: k.current,
|
|
10954
10952
|
model: a,
|
|
@@ -10975,7 +10973,7 @@ const Mn = Ft(og), $n = (e) => {
|
|
|
10975
10973
|
y(!1);
|
|
10976
10974
|
}
|
|
10977
10975
|
};
|
|
10978
|
-
async function
|
|
10976
|
+
async function z() {
|
|
10979
10977
|
d && (k.current = await L.getHandler().evalDomain({
|
|
10980
10978
|
domain: d,
|
|
10981
10979
|
values: hn({
|
|
@@ -11037,7 +11035,7 @@ const Mn = Ft(og), $n = (e) => {
|
|
|
11037
11035
|
icon: g ? /* @__PURE__ */ s(Nt, {}) : /* @__PURE__ */ s(Pr, {}),
|
|
11038
11036
|
disabled: i || g,
|
|
11039
11037
|
onClick: () => {
|
|
11040
|
-
F.current = !0,
|
|
11038
|
+
F.current = !0, G(j);
|
|
11041
11039
|
},
|
|
11042
11040
|
style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
11043
11041
|
tabIndex: -1
|
|
@@ -11406,7 +11404,7 @@ function mg(e) {
|
|
|
11406
11404
|
tooltip: C("duplicate"),
|
|
11407
11405
|
disabled: n || b || i === "tree" && f.length !== 1 || i === "form" && (S === void 0 || S < 0),
|
|
11408
11406
|
loading: b,
|
|
11409
|
-
onClick: () =>
|
|
11407
|
+
onClick: () => Gt({
|
|
11410
11408
|
confirmMessage: C("confirmDuplicate"),
|
|
11411
11409
|
t: C,
|
|
11412
11410
|
onOk: async () => A()
|
|
@@ -11438,7 +11436,7 @@ function mg(e) {
|
|
|
11438
11436
|
((N = v.action) == null ? void 0 : N.length) > 0 && /* @__PURE__ */ V(se, { children: [
|
|
11439
11437
|
/* @__PURE__ */ s($t, {}),
|
|
11440
11438
|
/* @__PURE__ */ s(
|
|
11441
|
-
|
|
11439
|
+
Ut,
|
|
11442
11440
|
{
|
|
11443
11441
|
icon: /* @__PURE__ */ s(Or, {}),
|
|
11444
11442
|
...i === "form" ? R : k
|
|
@@ -11448,7 +11446,7 @@ function mg(e) {
|
|
|
11448
11446
|
((j = v.print) == null ? void 0 : j.length) > 0 && /* @__PURE__ */ V(se, { children: [
|
|
11449
11447
|
/* @__PURE__ */ s($t, {}),
|
|
11450
11448
|
/* @__PURE__ */ s(
|
|
11451
|
-
|
|
11449
|
+
Ut,
|
|
11452
11450
|
{
|
|
11453
11451
|
icon: /* @__PURE__ */ s(Er, {}),
|
|
11454
11452
|
...i === "form" ? T : E
|
|
@@ -11458,7 +11456,7 @@ function mg(e) {
|
|
|
11458
11456
|
i === "form" && ((M = v.relate) == null ? void 0 : M.length) > 0 && /* @__PURE__ */ V(se, { children: [
|
|
11459
11457
|
/* @__PURE__ */ s($t, {}),
|
|
11460
11458
|
/* @__PURE__ */ s(
|
|
11461
|
-
|
|
11459
|
+
Ut,
|
|
11462
11460
|
{
|
|
11463
11461
|
icon: /* @__PURE__ */ s(Dr, {}),
|
|
11464
11462
|
..._
|
|
@@ -11583,17 +11581,17 @@ const gg = (e) => {
|
|
|
11583
11581
|
getContext: f,
|
|
11584
11582
|
domain: g,
|
|
11585
11583
|
fetchValues: y
|
|
11586
|
-
} = p || {}, { t: v } = he(), [w, F] = I(!1), [x, S] = I(!1), [O, C] = I(), [b, A] = I(!1), [R, T] = I(!1), [_, k] = I(), [E, B] = I([]), [N, j] = I(!1), M =
|
|
11584
|
+
} = p || {}, { t: v } = he(), [w, F] = I(!1), [x, S] = I(!1), [O, C] = I(), [b, A] = I(!1), [R, T] = I(!1), [_, k] = I(), [E, B] = I([]), [N, j] = I(!1), M = q([]), [P, Y] = I(), G = q(), [U, z] = I(void 0), ge = q(), {
|
|
11587
11585
|
readOnly: ae,
|
|
11588
11586
|
relation: H,
|
|
11589
11587
|
context: W,
|
|
11590
11588
|
domain: me
|
|
11591
11589
|
} = r, ee = r.type === "many2many", { id: ue } = r, $ = a.filter(
|
|
11592
11590
|
(te) => (te.values || te.treeValues) && te.operation !== "pendingRemove"
|
|
11593
|
-
),
|
|
11591
|
+
), J = q();
|
|
11594
11592
|
oe(() => {
|
|
11595
|
-
if (
|
|
11596
|
-
|
|
11593
|
+
if (J.current !== i) {
|
|
11594
|
+
J.current = i, Z();
|
|
11597
11595
|
return;
|
|
11598
11596
|
}
|
|
11599
11597
|
Z();
|
|
@@ -11629,7 +11627,7 @@ const gg = (e) => {
|
|
|
11629
11627
|
context: { ...f == null ? void 0 : f(), ...W },
|
|
11630
11628
|
currentView: te || i
|
|
11631
11629
|
});
|
|
11632
|
-
return
|
|
11630
|
+
return G.current || (G.current = Ee.map((ut) => ut.id)), (i || te) === "tree" && Be && z(Be), pe(Ee), Ee;
|
|
11633
11631
|
} catch (Ee) {
|
|
11634
11632
|
C(Ee);
|
|
11635
11633
|
} finally {
|
|
@@ -11696,7 +11694,7 @@ const gg = (e) => {
|
|
|
11696
11694
|
hl({
|
|
11697
11695
|
t: v,
|
|
11698
11696
|
onOk: async () => {
|
|
11699
|
-
i === "form" ?
|
|
11697
|
+
i === "form" ? re() : He();
|
|
11700
11698
|
}
|
|
11701
11699
|
});
|
|
11702
11700
|
return;
|
|
@@ -11704,7 +11702,7 @@ const gg = (e) => {
|
|
|
11704
11702
|
pl({
|
|
11705
11703
|
t: v,
|
|
11706
11704
|
onOk: async () => {
|
|
11707
|
-
i === "form" ?
|
|
11705
|
+
i === "form" ? re() : He();
|
|
11708
11706
|
}
|
|
11709
11707
|
});
|
|
11710
11708
|
}, Le = async () => {
|
|
@@ -11717,7 +11715,7 @@ const gg = (e) => {
|
|
|
11717
11715
|
i === "form" ? Ie(() => {
|
|
11718
11716
|
T(!0);
|
|
11719
11717
|
}) : T(!0);
|
|
11720
|
-
},
|
|
11718
|
+
}, re = async () => {
|
|
11721
11719
|
S(!0), F(!1), C(void 0);
|
|
11722
11720
|
try {
|
|
11723
11721
|
if ($[c].id > 0) {
|
|
@@ -11817,10 +11815,10 @@ const gg = (e) => {
|
|
|
11817
11815
|
return de.parse(o.get(i).arch), de.string;
|
|
11818
11816
|
}
|
|
11819
11817
|
}
|
|
11820
|
-
const
|
|
11818
|
+
const ne = () => {
|
|
11821
11819
|
var de, Oe, ve, Ee;
|
|
11822
11820
|
if (i === "form")
|
|
11823
|
-
return $.length === 0 ? v("noCurrentEntries") : i !==
|
|
11821
|
+
return $.length === 0 ? v("noCurrentEntries") : i !== J.current && a.some((Be) => !Be.values) ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ s(
|
|
11824
11822
|
Mn,
|
|
11825
11823
|
{
|
|
11826
11824
|
ref: ge,
|
|
@@ -11889,8 +11887,8 @@ const gg = (e) => {
|
|
|
11889
11887
|
};
|
|
11890
11888
|
if (O)
|
|
11891
11889
|
return /* @__PURE__ */ s(yt, { className: "mt-10", message: O, type: "error", banner: !0 });
|
|
11892
|
-
const
|
|
11893
|
-
return x ? /* @__PURE__ */ s(
|
|
11890
|
+
const Qe = N;
|
|
11891
|
+
return x ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ V(se, { children: [
|
|
11894
11892
|
/* @__PURE__ */ s(
|
|
11895
11893
|
Sl,
|
|
11896
11894
|
{
|
|
@@ -11920,7 +11918,7 @@ const gg = (e) => {
|
|
|
11920
11918
|
}
|
|
11921
11919
|
}
|
|
11922
11920
|
),
|
|
11923
|
-
|
|
11921
|
+
ne(),
|
|
11924
11922
|
/* @__PURE__ */ s(
|
|
11925
11923
|
$n,
|
|
11926
11924
|
{
|
|
@@ -11947,7 +11945,7 @@ const gg = (e) => {
|
|
|
11947
11945
|
A(!1);
|
|
11948
11946
|
},
|
|
11949
11947
|
readOnly: ae,
|
|
11950
|
-
mustClearAfterSave:
|
|
11948
|
+
mustClearAfterSave: Qe,
|
|
11951
11949
|
onMustRefreshParent: () => {
|
|
11952
11950
|
y == null || y({ forceRefresh: !0 });
|
|
11953
11951
|
}
|
|
@@ -11973,7 +11971,7 @@ const gg = (e) => {
|
|
|
11973
11971
|
fieldName: e,
|
|
11974
11972
|
widgetDomain: t
|
|
11975
11973
|
}) => {
|
|
11976
|
-
const n =
|
|
11974
|
+
const n = q([]), {
|
|
11977
11975
|
getFields: r,
|
|
11978
11976
|
getValues: o,
|
|
11979
11977
|
getContext: a,
|
|
@@ -12006,13 +12004,13 @@ const gg = (e) => {
|
|
|
12006
12004
|
allRowsIds: r,
|
|
12007
12005
|
gridRef: o
|
|
12008
12006
|
}) => {
|
|
12009
|
-
const [a, i] = I([]), l =
|
|
12007
|
+
const [a, i] = I([]), l = q(0), c = D(() => {
|
|
12010
12008
|
var f, g;
|
|
12011
12009
|
let h = !1;
|
|
12012
12010
|
a.length === 0 ? h = !0 : h = !1, h ? (i(r), (f = o.current) == null || f.setSelectedRows(r)) : (i([]), (g = o.current) == null || g.setSelectedRows([]));
|
|
12013
12011
|
}, [r, o, a.length]), d = D((h) => {
|
|
12014
12012
|
l.current = h;
|
|
12015
|
-
}, []), p = D(() => l.current, []), u =
|
|
12013
|
+
}, []), p = D(() => l.current, []), u = X(() => Wt(e), [e]);
|
|
12016
12014
|
return {
|
|
12017
12015
|
onTreeFetchRows: It(
|
|
12018
12016
|
async ({
|
|
@@ -12403,7 +12401,7 @@ const xg = ({
|
|
|
12403
12401
|
selectedRowKeys: g = [],
|
|
12404
12402
|
showPointerCursorInRows: y = !0
|
|
12405
12403
|
}) => {
|
|
12406
|
-
const v =
|
|
12404
|
+
const v = q(), w = c || v, F = q({}), x = q(), S = q(), O = q(e), { t: C } = he(), b = qt(
|
|
12407
12405
|
Lt.FEATURE_MANY2ONE_SORT
|
|
12408
12406
|
);
|
|
12409
12407
|
jt(() => {
|
|
@@ -12429,13 +12427,13 @@ const xg = ({
|
|
|
12429
12427
|
}) => {
|
|
12430
12428
|
const P = pr({
|
|
12431
12429
|
state: M
|
|
12432
|
-
}), { results: Y, colors:
|
|
12430
|
+
}), { results: Y, colors: G, status: U } = await i({
|
|
12433
12431
|
allItems: O.current,
|
|
12434
12432
|
startRow: N,
|
|
12435
12433
|
endRow: j,
|
|
12436
12434
|
sortFields: P
|
|
12437
12435
|
});
|
|
12438
|
-
return F.current = { ...F.current, ...
|
|
12436
|
+
return F.current = { ...F.current, ...G }, !x.current && U && (x.current = {}), U && (x.current = { ...x.current, ...U }), Y;
|
|
12439
12437
|
},
|
|
12440
12438
|
[i]
|
|
12441
12439
|
), _ = D((N) => {
|
|
@@ -12448,7 +12446,7 @@ const xg = ({
|
|
|
12448
12446
|
model: d
|
|
12449
12447
|
})
|
|
12450
12448
|
});
|
|
12451
|
-
return k ? /* @__PURE__ */ s(
|
|
12449
|
+
return k ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ s(
|
|
12452
12450
|
Li,
|
|
12453
12451
|
{
|
|
12454
12452
|
ref: w,
|
|
@@ -12494,7 +12492,7 @@ const xg = ({
|
|
|
12494
12492
|
});
|
|
12495
12493
|
}, Rg = ["form", "tree", "graph"], Og = (e) => {
|
|
12496
12494
|
var Ie, Ne, Le;
|
|
12497
|
-
const t =
|
|
12495
|
+
const t = q(null), { value: n, onChange: r, ooui: o, views: a } = e, { items: i = [] } = n || {}, l = wg({ one2manyItems: i }), { currentView: c, setCurrentView: d, itemIndex: p, setItemIndex: u } = ie(
|
|
12498
12496
|
jn
|
|
12499
12497
|
), {
|
|
12500
12498
|
readOnly: m,
|
|
@@ -12506,7 +12504,7 @@ const xg = ({
|
|
|
12506
12504
|
activeId: w,
|
|
12507
12505
|
getContext: F,
|
|
12508
12506
|
fetchValues: x
|
|
12509
|
-
} = v || {}, S =
|
|
12507
|
+
} = v || {}, S = q(), O = a.size > 1, C = ((Ie = a.get("form")) == null ? void 0 : Ie.fields) !== void 0, b = X(() => ({ ...F == null ? void 0 : F(), ...f }), [F, f]), A = yg({
|
|
12510
12508
|
widgetDomain: g,
|
|
12511
12509
|
fieldName: y
|
|
12512
12510
|
}), {
|
|
@@ -12528,22 +12526,22 @@ const xg = ({
|
|
|
12528
12526
|
model: h,
|
|
12529
12527
|
items: l,
|
|
12530
12528
|
selectedRowKeys: _
|
|
12531
|
-
}), M =
|
|
12529
|
+
}), M = X(() => {
|
|
12532
12530
|
const { title: xe } = a.get(c) || {};
|
|
12533
12531
|
return xe || o.label;
|
|
12534
12532
|
}, [c, o.label, a]), P = o.type === "many2many", Y = D(
|
|
12535
12533
|
(xe) => {
|
|
12536
|
-
var
|
|
12534
|
+
var re, He;
|
|
12537
12535
|
r == null || r({
|
|
12538
|
-
fields: ((
|
|
12536
|
+
fields: ((re = a.get("form")) == null ? void 0 : re.fields) || ((He = a.get("tree")) == null ? void 0 : He.fields),
|
|
12539
12537
|
items: xe
|
|
12540
12538
|
});
|
|
12541
12539
|
},
|
|
12542
12540
|
[r, a]
|
|
12543
12541
|
), {
|
|
12544
|
-
formHasChanges:
|
|
12542
|
+
formHasChanges: G,
|
|
12545
12543
|
onFormChanges: U,
|
|
12546
|
-
showFormChangesDialogIfNeeded:
|
|
12544
|
+
showFormChangesDialogIfNeeded: z,
|
|
12547
12545
|
setFormHasChanges: ge
|
|
12548
12546
|
} = bg({
|
|
12549
12547
|
items: l,
|
|
@@ -12563,7 +12561,7 @@ const xg = ({
|
|
|
12563
12561
|
} = xg({
|
|
12564
12562
|
activeId: w,
|
|
12565
12563
|
inv_field: o.inv_field,
|
|
12566
|
-
showFormChangesDialogIfNeeded:
|
|
12564
|
+
showFormChangesDialogIfNeeded: z,
|
|
12567
12565
|
currentView: c,
|
|
12568
12566
|
triggerChange: Y,
|
|
12569
12567
|
items: l,
|
|
@@ -12573,12 +12571,12 @@ const xg = ({
|
|
|
12573
12571
|
relation: h,
|
|
12574
12572
|
formView: a.get("form")
|
|
12575
12573
|
}), {
|
|
12576
|
-
showSearchModal:
|
|
12574
|
+
showSearchModal: J,
|
|
12577
12575
|
onSelectSearchValues: Z,
|
|
12578
12576
|
onCloseSearchModal: pe,
|
|
12579
12577
|
searchItem: Te
|
|
12580
12578
|
} = Tg({
|
|
12581
|
-
showFormChangesDialogIfNeeded:
|
|
12579
|
+
showFormChangesDialogIfNeeded: z,
|
|
12582
12580
|
currentView: c,
|
|
12583
12581
|
triggerChange: Y,
|
|
12584
12582
|
items: l,
|
|
@@ -12593,24 +12591,24 @@ const xg = ({
|
|
|
12593
12591
|
selectedRowKeys: _,
|
|
12594
12592
|
setSelectedRowKeys: k
|
|
12595
12593
|
}), Ue = () => {
|
|
12596
|
-
const xe = Array.from(a.keys()),
|
|
12597
|
-
c === "form" ?
|
|
12598
|
-
d(
|
|
12599
|
-
}) : d(
|
|
12594
|
+
const xe = Array.from(a.keys()), re = xe[(xe.indexOf(c) + 1) % xe.length];
|
|
12595
|
+
c === "form" ? z(() => {
|
|
12596
|
+
d(re);
|
|
12597
|
+
}) : d(re);
|
|
12600
12598
|
}, ze = It(
|
|
12601
12599
|
(xe) => {
|
|
12602
|
-
var
|
|
12603
|
-
(
|
|
12600
|
+
var re;
|
|
12601
|
+
(re = a.get("form")) != null && re.fields && $(xe);
|
|
12604
12602
|
},
|
|
12605
12603
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12606
12604
|
[l]
|
|
12607
12605
|
), Ce = D(() => {
|
|
12608
|
-
p > 0 && (c === "form" ?
|
|
12606
|
+
p > 0 && (c === "form" ? z(() => {
|
|
12609
12607
|
u(p - 1);
|
|
12610
12608
|
}) : u(p - 1));
|
|
12611
|
-
}, [c, p, u,
|
|
12609
|
+
}, [c, p, u, z]), ce = D(() => {
|
|
12612
12610
|
const xe = l.length;
|
|
12613
|
-
p < xe - 1 && (c === "form" ?
|
|
12611
|
+
p < xe - 1 && (c === "form" ? z(() => {
|
|
12614
12612
|
u(p + 1);
|
|
12615
12613
|
}) : u(p + 1));
|
|
12616
12614
|
}, [
|
|
@@ -12618,8 +12616,8 @@ const xg = ({
|
|
|
12618
12616
|
p,
|
|
12619
12617
|
l.length,
|
|
12620
12618
|
u,
|
|
12621
|
-
|
|
12622
|
-
]), Pe =
|
|
12619
|
+
z
|
|
12620
|
+
]), Pe = X(() => {
|
|
12623
12621
|
var xe;
|
|
12624
12622
|
return ((xe = a.get("form")) == null ? void 0 : xe.fields) !== void 0;
|
|
12625
12623
|
}, [a]);
|
|
@@ -12633,7 +12631,7 @@ const xg = ({
|
|
|
12633
12631
|
model: h,
|
|
12634
12632
|
readOnly: m || !1,
|
|
12635
12633
|
isMany2Many: P,
|
|
12636
|
-
formHasChanges:
|
|
12634
|
+
formHasChanges: G,
|
|
12637
12635
|
totalItems: l.length,
|
|
12638
12636
|
currentItemIndex: p,
|
|
12639
12637
|
onDelete: ye,
|
|
@@ -12717,7 +12715,7 @@ const xg = ({
|
|
|
12717
12715
|
domain: A,
|
|
12718
12716
|
model: h,
|
|
12719
12717
|
context: b,
|
|
12720
|
-
visible:
|
|
12718
|
+
visible: J,
|
|
12721
12719
|
onSelectValues: Z,
|
|
12722
12720
|
onCloseModal: pe
|
|
12723
12721
|
}
|
|
@@ -12746,7 +12744,7 @@ const xg = ({
|
|
|
12746
12744
|
jt(() => {
|
|
12747
12745
|
x();
|
|
12748
12746
|
}, [t]);
|
|
12749
|
-
const w =
|
|
12747
|
+
const w = qt(
|
|
12750
12748
|
Lt.FEATURE_GET_TOOLBAR
|
|
12751
12749
|
), F = async (C) => {
|
|
12752
12750
|
if (o && o[C]) {
|
|
@@ -12785,7 +12783,7 @@ const xg = ({
|
|
|
12785
12783
|
d(!1);
|
|
12786
12784
|
}
|
|
12787
12785
|
};
|
|
12788
|
-
return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ s(
|
|
12786
|
+
return n && n.length > 0 ? l = n[0] : l = "tree", c ? /* @__PURE__ */ s(Ze, {}) : p ? /* @__PURE__ */ s(yt, { className: "mt-10", message: p, type: "error", banner: !0 }) : /* @__PURE__ */ s(cg, { initialView: l, children: /* @__PURE__ */ s(
|
|
12789
12787
|
Ve,
|
|
12790
12788
|
{
|
|
12791
12789
|
required: a,
|
|
@@ -12819,7 +12817,7 @@ const xg = ({
|
|
|
12819
12817
|
const { ooui: t } = e, { required: n } = t;
|
|
12820
12818
|
return /* @__PURE__ */ s(Ve, { required: n, type: "number", ...e, children: /* @__PURE__ */ s(Ng, { ooui: t }) });
|
|
12821
12819
|
}, Ng = (e) => {
|
|
12822
|
-
const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: a, required: i } = t, { token: l } = kg(), c = i && !a ? { backgroundColor: l.colorPrimaryBg } : void 0, d =
|
|
12820
|
+
const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: a, required: i } = t, { token: l } = kg(), c = i && !a ? { backgroundColor: l.colorPrimaryBg } : void 0, d = q(), [p, u] = I(), m = ie(Ke), { elementHasLostFocus: h } = m || {};
|
|
12823
12821
|
oe(() => {
|
|
12824
12822
|
u(va(n));
|
|
12825
12823
|
}, [n]);
|
|
@@ -12847,7 +12845,7 @@ const xg = ({
|
|
|
12847
12845
|
);
|
|
12848
12846
|
}, wo = (e) => {
|
|
12849
12847
|
const { ooui: t, responsiveBehaviour: n = !1, tip: r } = e;
|
|
12850
|
-
return /* @__PURE__ */ s(
|
|
12848
|
+
return /* @__PURE__ */ s(Ze, { tip: r ?? t.label, size: "large", spinning: t.loading, children: /* @__PURE__ */ s(
|
|
12851
12849
|
os,
|
|
12852
12850
|
{
|
|
12853
12851
|
container: t.container,
|
|
@@ -13066,7 +13064,7 @@ const { useToken: jg } = Je, { TextArea: So } = mt, Bg = (e) => {
|
|
|
13066
13064
|
limit: o,
|
|
13067
13065
|
onClose: a
|
|
13068
13066
|
}) => {
|
|
13069
|
-
const i =
|
|
13067
|
+
const i = q({}), l = q(/* @__PURE__ */ new Map()), { t: c } = he(), d = D(
|
|
13070
13068
|
async (y) => {
|
|
13071
13069
|
if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
|
|
13072
13070
|
dn(c("selectAtLeastOneField"));
|
|
@@ -13405,7 +13403,7 @@ const { useToken: jg } = Je, { TextArea: So } = mt, Bg = (e) => {
|
|
|
13405
13403
|
const { ooui: t } = e, { required: n } = t;
|
|
13406
13404
|
return /* @__PURE__ */ s(Ve, { required: n, ...e, children: /* @__PURE__ */ s(ay, { ooui: t }) });
|
|
13407
13405
|
}, ay = (e) => {
|
|
13408
|
-
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = sy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d =
|
|
13406
|
+
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = sy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = q(null), { setFieldValue: p, getFieldValue: u } = ie(Ke) || {}, { t: m } = he(), h = n ? Dd(n) : "", f = (F) => {
|
|
13409
13407
|
r == null || r(F);
|
|
13410
13408
|
};
|
|
13411
13409
|
async function g() {
|
|
@@ -13488,7 +13486,7 @@ const { useToken: jg } = Je, { TextArea: So } = mt, Bg = (e) => {
|
|
|
13488
13486
|
onOpenAttachmentLink: a,
|
|
13489
13487
|
onOpenAttachmentDetail: i,
|
|
13490
13488
|
onListAllAttachments: l
|
|
13491
|
-
} = e, { t: c } = he(), d =
|
|
13489
|
+
} = e, { t: c } = he(), d = q(null), p = /* @__PURE__ */ V(Ye, { children: [
|
|
13492
13490
|
/* @__PURE__ */ s(fs, {}),
|
|
13493
13491
|
`(${t})`,
|
|
13494
13492
|
/* @__PURE__ */ s(Ir, { style: { fontSize: 12 } })
|
|
@@ -13502,7 +13500,7 @@ const { useToken: jg } = Je, { TextArea: So } = mt, Bg = (e) => {
|
|
|
13502
13500
|
items: n.map((u) => {
|
|
13503
13501
|
const m = u.link ? fs : Eo, h = /* @__PURE__ */ V(Ge, { wrap: !1, align: "middle", gutter: 8, children: [
|
|
13504
13502
|
/* @__PURE__ */ s(Re, { style: { textAlign: "center" }, children: (u.datas_fname || u.link) && /* @__PURE__ */ s(
|
|
13505
|
-
|
|
13503
|
+
Yt,
|
|
13506
13504
|
{
|
|
13507
13505
|
title: u.link ? c("openAttachmentLink") : c("download"),
|
|
13508
13506
|
children: /* @__PURE__ */ s(
|
|
@@ -13517,7 +13515,7 @@ const { useToken: jg } = Je, { TextArea: So } = mt, Bg = (e) => {
|
|
|
13517
13515
|
)
|
|
13518
13516
|
}
|
|
13519
13517
|
) }),
|
|
13520
|
-
/* @__PURE__ */ s(Re, { style: { textAlign: "center" }, children: /* @__PURE__ */ s(
|
|
13518
|
+
/* @__PURE__ */ s(Re, { style: { textAlign: "center" }, children: /* @__PURE__ */ s(Yt, { title: c("openAttachment"), children: /* @__PURE__ */ s(
|
|
13521
13519
|
Yn,
|
|
13522
13520
|
{
|
|
13523
13521
|
style: { cursor: "pointer" },
|
|
@@ -13663,7 +13661,7 @@ function cy(e) {
|
|
|
13663
13661
|
closable: !1,
|
|
13664
13662
|
centered: !0,
|
|
13665
13663
|
maskClosable: !1,
|
|
13666
|
-
children: /* @__PURE__ */ s(
|
|
13664
|
+
children: /* @__PURE__ */ s(Ze, {})
|
|
13667
13665
|
}
|
|
13668
13666
|
)
|
|
13669
13667
|
] });
|
|
@@ -13780,7 +13778,7 @@ function uy({ toolbar: e }) {
|
|
|
13780
13778
|
setPreviousView: T,
|
|
13781
13779
|
goToResourceId: _,
|
|
13782
13780
|
isActive: k
|
|
13783
|
-
} = sr(), { openDefaultActionForModel: E } = t || {}, B =
|
|
13781
|
+
} = sr(), { openDefaultActionForModel: E } = t || {}, B = X(
|
|
13784
13782
|
() => p || w || O || F,
|
|
13785
13783
|
[p, w, O, F]
|
|
13786
13784
|
), N = D(
|
|
@@ -13795,7 +13793,7 @@ function uy({ toolbar: e }) {
|
|
|
13795
13793
|
mustDisableButtons: B,
|
|
13796
13794
|
formRef: b,
|
|
13797
13795
|
onRefreshParentValues: j
|
|
13798
|
-
}),
|
|
13796
|
+
}), G = D(async () => {
|
|
13799
13797
|
try {
|
|
13800
13798
|
v == null || v(!0), await L.getHandler().deleteObjects({
|
|
13801
13799
|
model: y,
|
|
@@ -13837,7 +13835,7 @@ function uy({ toolbar: e }) {
|
|
|
13837
13835
|
} finally {
|
|
13838
13836
|
x == null || x(!1);
|
|
13839
13837
|
}
|
|
13840
|
-
}, [u, y, b, _, x]),
|
|
13838
|
+
}, [u, y, b, _, x]), z = D(
|
|
13841
13839
|
(W) => {
|
|
13842
13840
|
T == null || T(i), A == null || A(!1), l == null || l(W);
|
|
13843
13841
|
},
|
|
@@ -13905,7 +13903,7 @@ function uy({ toolbar: e }) {
|
|
|
13905
13903
|
]
|
|
13906
13904
|
), i ? /* @__PURE__ */ V(st, { wrap: !0, children: [
|
|
13907
13905
|
O && /* @__PURE__ */ V(se, { children: [
|
|
13908
|
-
/* @__PURE__ */ s(
|
|
13906
|
+
/* @__PURE__ */ s(Ze, {}),
|
|
13909
13907
|
/* @__PURE__ */ s(at, {}),
|
|
13910
13908
|
/* @__PURE__ */ s(at, {})
|
|
13911
13909
|
] }),
|
|
@@ -13927,7 +13925,7 @@ function uy({ toolbar: e }) {
|
|
|
13927
13925
|
tooltip: n("duplicate"),
|
|
13928
13926
|
disabled: d || B || u === void 0,
|
|
13929
13927
|
loading: F,
|
|
13930
|
-
onClick: () =>
|
|
13928
|
+
onClick: () => Gt({
|
|
13931
13929
|
confirmMessage: n("confirmDuplicate"),
|
|
13932
13930
|
t: n,
|
|
13933
13931
|
onOk: U
|
|
@@ -13941,10 +13939,10 @@ function uy({ toolbar: e }) {
|
|
|
13941
13939
|
tooltip: n("delete"),
|
|
13942
13940
|
disabled: B || u === void 0,
|
|
13943
13941
|
loading: w,
|
|
13944
|
-
onClick: () =>
|
|
13942
|
+
onClick: () => Gt({
|
|
13945
13943
|
confirmMessage: n("confirmRemoveItem"),
|
|
13946
13944
|
t: n,
|
|
13947
|
-
onOk:
|
|
13945
|
+
onOk: G
|
|
13948
13946
|
})
|
|
13949
13947
|
}
|
|
13950
13948
|
),
|
|
@@ -13974,7 +13972,7 @@ function uy({ toolbar: e }) {
|
|
|
13974
13972
|
currentView: i,
|
|
13975
13973
|
previousView: R,
|
|
13976
13974
|
availableViews: a,
|
|
13977
|
-
onChangeView:
|
|
13975
|
+
onChangeView: z,
|
|
13978
13976
|
disabled: B,
|
|
13979
13977
|
formHasChanges: d
|
|
13980
13978
|
}
|
|
@@ -13990,9 +13988,9 @@ function uy({ toolbar: e }) {
|
|
|
13990
13988
|
}
|
|
13991
13989
|
),
|
|
13992
13990
|
/* @__PURE__ */ s(at, {}),
|
|
13993
|
-
/* @__PURE__ */ s(
|
|
13994
|
-
/* @__PURE__ */ s(
|
|
13995
|
-
/* @__PURE__ */ s(
|
|
13991
|
+
/* @__PURE__ */ s(Ut, { icon: /* @__PURE__ */ s(Or, {}), ...M }),
|
|
13992
|
+
/* @__PURE__ */ s(Ut, { icon: /* @__PURE__ */ s(Er, {}), ...P }),
|
|
13993
|
+
/* @__PURE__ */ s(Ut, { icon: /* @__PURE__ */ s(Dr, {}), ...Y }),
|
|
13996
13994
|
/* @__PURE__ */ s(
|
|
13997
13995
|
cy,
|
|
13998
13996
|
{
|
|
@@ -14122,7 +14120,7 @@ const ui = (e, t) => ({
|
|
|
14122
14120
|
}
|
|
14123
14121
|
) });
|
|
14124
14122
|
}, gy = (e) => {
|
|
14125
|
-
const { visible: t, onIdSubmitted: n, onCancel: r, isSearching: o } = e, { t: a } = he(), i =
|
|
14123
|
+
const { visible: t, onIdSubmitted: n, onCancel: r, isSearching: o } = e, { t: a } = he(), i = q(null), l = q(!1);
|
|
14126
14124
|
function c(d) {
|
|
14127
14125
|
const p = d.id.split(",").map((u) => parseInt(u.trim()));
|
|
14128
14126
|
n(p, l.current), l.current = !1;
|
|
@@ -14273,7 +14271,7 @@ const vy = (e) => {
|
|
|
14273
14271
|
formView: i,
|
|
14274
14272
|
treeView: l,
|
|
14275
14273
|
graphView: c
|
|
14276
|
-
} = e, d =
|
|
14274
|
+
} = e, d = q(), p = ie(
|
|
14277
14275
|
St
|
|
14278
14276
|
), {
|
|
14279
14277
|
setResults: u = void 0,
|
|
@@ -14324,7 +14322,7 @@ const vy = (e) => {
|
|
|
14324
14322
|
setActionViewTotalItems: S,
|
|
14325
14323
|
limit: b,
|
|
14326
14324
|
setLimit: A
|
|
14327
|
-
}),
|
|
14325
|
+
}), G = X(
|
|
14328
14326
|
() => Rn([
|
|
14329
14327
|
i == null ? void 0 : i.search_fields,
|
|
14330
14328
|
l == null ? void 0 : l.search_fields,
|
|
@@ -14353,7 +14351,7 @@ const vy = (e) => {
|
|
|
14353
14351
|
...i == null ? void 0 : i.fields,
|
|
14354
14352
|
...c == null ? void 0 : c.fields
|
|
14355
14353
|
},
|
|
14356
|
-
searchFields:
|
|
14354
|
+
searchFields: G,
|
|
14357
14355
|
limit: b,
|
|
14358
14356
|
onClear: N,
|
|
14359
14357
|
offset: P,
|
|
@@ -14367,7 +14365,7 @@ const vy = (e) => {
|
|
|
14367
14365
|
showLimitOptions: !1
|
|
14368
14366
|
}
|
|
14369
14367
|
),
|
|
14370
|
-
Y ? /* @__PURE__ */ s(
|
|
14368
|
+
Y ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ s(
|
|
14371
14369
|
Ln,
|
|
14372
14370
|
{
|
|
14373
14371
|
ref: d,
|
|
@@ -14484,7 +14482,7 @@ function Sy() {
|
|
|
14484
14482
|
] });
|
|
14485
14483
|
}
|
|
14486
14484
|
const Cy = (e) => {
|
|
14487
|
-
const { dashboardData: t, visible: n } = e, r =
|
|
14485
|
+
const { dashboardData: t, visible: n } = e, r = q(), o = ie(
|
|
14488
14486
|
At
|
|
14489
14487
|
), { openShortcut: a } = o || {};
|
|
14490
14488
|
return !t || !n ? null : /* @__PURE__ */ V(
|
|
@@ -14579,7 +14577,7 @@ function Fy(e, t) {
|
|
|
14579
14577
|
order: F
|
|
14580
14578
|
} = e, [x, S] = I(), [O, C] = I([]), [b, A] = I(!0), R = m || void 0, [T, _] = I(
|
|
14581
14579
|
R
|
|
14582
|
-
), [k, E] = I([]), [B, N] = I(), [j, M] = I([]), [P, Y] = I(), [
|
|
14580
|
+
), [k, E] = I([]), [B, N] = I(), [j, M] = I([]), [P, Y] = I(), [G, U] = I(0), [z, ge] = I(!1), [ae, H] = I(!1), [W, me] = I(), { t: ee } = he(), ue = q(), $ = q(), J = ie(
|
|
14583
14581
|
At
|
|
14584
14582
|
), {
|
|
14585
14583
|
setCurrentView: Z,
|
|
@@ -14588,7 +14586,7 @@ function Fy(e, t) {
|
|
|
14588
14586
|
activeKey: ye,
|
|
14589
14587
|
openAction: Ue,
|
|
14590
14588
|
onRemoveTab: ze
|
|
14591
|
-
} =
|
|
14589
|
+
} = J || {};
|
|
14592
14590
|
ln(
|
|
14593
14591
|
"ctrl+g,command+g",
|
|
14594
14592
|
() => {
|
|
@@ -14597,12 +14595,12 @@ function Fy(e, t) {
|
|
|
14597
14595
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
14598
14596
|
[ye, Te, x, B, j]
|
|
14599
14597
|
);
|
|
14600
|
-
function Ce(
|
|
14601
|
-
_(
|
|
14598
|
+
function Ce(re) {
|
|
14599
|
+
_(re), pe == null || pe(re);
|
|
14602
14600
|
}
|
|
14603
14601
|
const ce = D(
|
|
14604
|
-
(
|
|
14605
|
-
S(
|
|
14602
|
+
(re) => {
|
|
14603
|
+
S(re), Z == null || Z(re);
|
|
14606
14604
|
},
|
|
14607
14605
|
[Z]
|
|
14608
14606
|
);
|
|
@@ -14611,14 +14609,14 @@ function Fy(e, t) {
|
|
|
14611
14609
|
}));
|
|
14612
14610
|
const Pe = D(async () => {
|
|
14613
14611
|
A(!0);
|
|
14614
|
-
const
|
|
14612
|
+
const re = [], He = [];
|
|
14615
14613
|
for (const we of a) {
|
|
14616
|
-
const [Ae,
|
|
14617
|
-
|
|
14614
|
+
const [Ae, ne] = we;
|
|
14615
|
+
ne !== "dashboard" ? He.push({
|
|
14618
14616
|
viewTuple: we,
|
|
14619
14617
|
promise: L.getHandler().getView({
|
|
14620
14618
|
model: r,
|
|
14621
|
-
type:
|
|
14619
|
+
type: ne,
|
|
14622
14620
|
id: Ae,
|
|
14623
14621
|
context: o
|
|
14624
14622
|
})
|
|
@@ -14630,23 +14628,23 @@ function Fy(e, t) {
|
|
|
14630
14628
|
for (const we of je) {
|
|
14631
14629
|
if (!we)
|
|
14632
14630
|
continue;
|
|
14633
|
-
const [, Ae] = we.viewTuple,
|
|
14631
|
+
const [, Ae] = we.viewTuple, ne = we.info;
|
|
14634
14632
|
switch (Ae) {
|
|
14635
14633
|
case "dashboard": {
|
|
14636
|
-
const
|
|
14634
|
+
const Qe = a.find((We) => {
|
|
14637
14635
|
const [, tt] = We;
|
|
14638
14636
|
return tt === "form";
|
|
14639
14637
|
});
|
|
14640
14638
|
let rt;
|
|
14641
|
-
|
|
14639
|
+
Qe && (rt = {
|
|
14642
14640
|
action_id: h,
|
|
14643
14641
|
action_type: f,
|
|
14644
14642
|
name: i,
|
|
14645
14643
|
res_id: o.active_id,
|
|
14646
14644
|
res_model: r,
|
|
14647
|
-
view_id:
|
|
14648
|
-
view_type:
|
|
14649
|
-
}),
|
|
14645
|
+
view_id: Qe[0],
|
|
14646
|
+
view_type: Qe[1]
|
|
14647
|
+
}), re.push({
|
|
14650
14648
|
type: "dashboard",
|
|
14651
14649
|
id: o.active_id,
|
|
14652
14650
|
model: r,
|
|
@@ -14657,16 +14655,16 @@ function Fy(e, t) {
|
|
|
14657
14655
|
break;
|
|
14658
14656
|
}
|
|
14659
14657
|
case "form": {
|
|
14660
|
-
|
|
14661
|
-
...
|
|
14658
|
+
re.push({
|
|
14659
|
+
...ne,
|
|
14662
14660
|
type: Ae,
|
|
14663
14661
|
extra: { action_id: h, action_type: f }
|
|
14664
14662
|
});
|
|
14665
14663
|
break;
|
|
14666
14664
|
}
|
|
14667
14665
|
case "tree": {
|
|
14668
|
-
|
|
14669
|
-
...
|
|
14666
|
+
re.push({
|
|
14667
|
+
...ne,
|
|
14670
14668
|
isExpandable: g,
|
|
14671
14669
|
type: Ae,
|
|
14672
14670
|
extra: { action_id: h, action_type: f }
|
|
@@ -14674,8 +14672,8 @@ function Fy(e, t) {
|
|
|
14674
14672
|
break;
|
|
14675
14673
|
}
|
|
14676
14674
|
case "graph": {
|
|
14677
|
-
|
|
14678
|
-
...
|
|
14675
|
+
re.push({
|
|
14676
|
+
...ne,
|
|
14679
14677
|
type: Ae,
|
|
14680
14678
|
extra: { action_id: h, action_type: f }
|
|
14681
14679
|
});
|
|
@@ -14684,9 +14682,9 @@ function Fy(e, t) {
|
|
|
14684
14682
|
}
|
|
14685
14683
|
}
|
|
14686
14684
|
let ke;
|
|
14687
|
-
!d &&
|
|
14685
|
+
!d && re.find((we) => we.type === "tree") ? ke = re.find(
|
|
14688
14686
|
(Ae) => Ae.type === "tree"
|
|
14689
|
-
) : d ? ke =
|
|
14687
|
+
) : d ? ke = re.find((Ae) => d.id ? Ae.type === d.type && Ae.view_id === d.id : Ae.type === d.type) : ke = re.find(
|
|
14690
14688
|
(Ae) => Ae.type === "form"
|
|
14691
14689
|
), ke || (bt(
|
|
14692
14690
|
`Error determining the first view to show for model ${r}.
|
|
@@ -14697,12 +14695,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
14697
14695
|
model: r,
|
|
14698
14696
|
views: a,
|
|
14699
14697
|
initialView: d,
|
|
14700
|
-
availableViews:
|
|
14698
|
+
availableViews: re,
|
|
14701
14699
|
currentViewToAssign: ke,
|
|
14702
14700
|
action_id: h,
|
|
14703
14701
|
action_type: f
|
|
14704
14702
|
})
|
|
14705
|
-
), ze == null || ze(c)), ce(ke), C(
|
|
14703
|
+
), ze == null || ze(c)), ce(ke), C(re), A(!1);
|
|
14706
14704
|
}, [
|
|
14707
14705
|
d,
|
|
14708
14706
|
ce,
|
|
@@ -14717,13 +14715,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
14717
14715
|
c
|
|
14718
14716
|
]);
|
|
14719
14717
|
l({ tabKey: c, canWeClose: Ie }), Dt(() => {
|
|
14720
|
-
const
|
|
14721
|
-
ce(He ||
|
|
14718
|
+
const re = O.find((je) => je.type === "tree"), He = O.find((je) => d.id ? je.type === d.type && je.view_id === d.id : je.type === d.type);
|
|
14719
|
+
ce(He || re), m ? pe == null || pe(R) : (Ce(void 0), N(void 0)), Pe();
|
|
14722
14720
|
}, [r, a, m]), Dt(() => {
|
|
14723
14721
|
if (ye === c) {
|
|
14724
14722
|
pe == null || pe(T);
|
|
14725
|
-
const
|
|
14726
|
-
Z == null || Z({ ...x, extra:
|
|
14723
|
+
const re = { action_id: h, action_type: f };
|
|
14724
|
+
Z == null || Z({ ...x, extra: re });
|
|
14727
14725
|
}
|
|
14728
14726
|
}, [Te, ye]);
|
|
14729
14727
|
async function Ie() {
|
|
@@ -14732,39 +14730,39 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
14732
14730
|
async function Ne() {
|
|
14733
14731
|
ye === c && (x.type === "form" && !await ue.current.cancelUnsavedChanges() || ge(!0));
|
|
14734
14732
|
}
|
|
14735
|
-
async function Le(
|
|
14733
|
+
async function Le(re, He) {
|
|
14736
14734
|
var we;
|
|
14737
14735
|
H(!0);
|
|
14738
14736
|
let je, ke;
|
|
14739
|
-
if (
|
|
14737
|
+
if (re.length === 1) {
|
|
14740
14738
|
je = "form", ke = [];
|
|
14741
|
-
const Ae =
|
|
14742
|
-
let
|
|
14743
|
-
if (
|
|
14739
|
+
const Ae = re[0], ne = j.findIndex((rt) => rt.id === Ae);
|
|
14740
|
+
let Qe;
|
|
14741
|
+
if (ne === -1) {
|
|
14744
14742
|
try {
|
|
14745
|
-
|
|
14743
|
+
Qe = (we = await L.getHandler().readObjects({
|
|
14746
14744
|
model: r,
|
|
14747
14745
|
ids: [Ae],
|
|
14748
14746
|
context: o
|
|
14749
14747
|
})) == null ? void 0 : we[0];
|
|
14750
14748
|
} catch {
|
|
14751
14749
|
}
|
|
14752
|
-
if (!
|
|
14750
|
+
if (!Qe) {
|
|
14753
14751
|
H(!1), ge(!1), dn(ee("idNotFound"));
|
|
14754
14752
|
return;
|
|
14755
14753
|
}
|
|
14756
14754
|
} else
|
|
14757
|
-
|
|
14755
|
+
Qe = j[ne];
|
|
14758
14756
|
} else
|
|
14759
|
-
je = "tree", ke = [["id", "in",
|
|
14757
|
+
je = "tree", ke = [["id", "in", re]];
|
|
14760
14758
|
if (H(!1), ge(!1), He && je === "form") {
|
|
14761
|
-
Ce(
|
|
14759
|
+
Ce(re[0]);
|
|
14762
14760
|
const Ae = O.find(
|
|
14763
|
-
(
|
|
14761
|
+
(ne) => ne.type === "form"
|
|
14764
14762
|
);
|
|
14765
14763
|
ce(Ae);
|
|
14766
14764
|
} else {
|
|
14767
|
-
const Ae = a.find((
|
|
14765
|
+
const Ae = a.find((ne) => ne[1] === je);
|
|
14768
14766
|
Ue({
|
|
14769
14767
|
domain: ke,
|
|
14770
14768
|
context: o,
|
|
@@ -14775,7 +14773,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
14775
14773
|
initialView: { id: Ae == null ? void 0 : Ae[0], type: je },
|
|
14776
14774
|
action_id: h,
|
|
14777
14775
|
action_type: f,
|
|
14778
|
-
res_id:
|
|
14776
|
+
res_id: re[0]
|
|
14779
14777
|
});
|
|
14780
14778
|
}
|
|
14781
14779
|
}
|
|
@@ -14784,13 +14782,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
14784
14782
|
ue.current.clearAndReload();
|
|
14785
14783
|
else {
|
|
14786
14784
|
Ce(void 0);
|
|
14787
|
-
const
|
|
14785
|
+
const re = O.find(
|
|
14788
14786
|
(He) => He.type === "form"
|
|
14789
14787
|
);
|
|
14790
|
-
ce(
|
|
14788
|
+
ce(re);
|
|
14791
14789
|
}
|
|
14792
14790
|
}
|
|
14793
|
-
return b ? /* @__PURE__ */ s(
|
|
14791
|
+
return b ? /* @__PURE__ */ s(Ze, {}) : x ? /* @__PURE__ */ V(
|
|
14794
14792
|
Rh,
|
|
14795
14793
|
{
|
|
14796
14794
|
title: i,
|
|
@@ -14809,7 +14807,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
14809
14807
|
currentModel: r,
|
|
14810
14808
|
sorter: P,
|
|
14811
14809
|
setSorter: Y,
|
|
14812
|
-
totalItems:
|
|
14810
|
+
totalItems: G,
|
|
14813
14811
|
setTotalItems: U,
|
|
14814
14812
|
selectedRowItems: k,
|
|
14815
14813
|
setSelectedRowItems: E,
|
|
@@ -14847,7 +14845,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
14847
14845
|
/* @__PURE__ */ s(
|
|
14848
14846
|
gy,
|
|
14849
14847
|
{
|
|
14850
|
-
visible:
|
|
14848
|
+
visible: z,
|
|
14851
14849
|
onIdSubmitted: Le,
|
|
14852
14850
|
isSearching: ae,
|
|
14853
14851
|
onCancel: () => {
|
|
@@ -14986,11 +14984,11 @@ function Oy(e) {
|
|
|
14986
14984
|
domain: a = [],
|
|
14987
14985
|
visible: i = !0,
|
|
14988
14986
|
parentContext: l = {}
|
|
14989
|
-
} = e, [c, d] = I(!1), [p, u] = I(!1), [m, h] = I(), [f, g] = I(), [y, v] = I(), [w, F] = I(1), [x, S] = I(0), O =
|
|
14990
|
-
|
|
14987
|
+
} = e, [c, d] = I(!1), [p, u] = I(!1), [m, h] = I(), [f, g] = I(), [y, v] = I(), [w, F] = I(1), [x, S] = I(0), O = q(vt), C = q([]), [b, A] = I(0), [R, T] = I([]), [_, k] = I(void 0), [E, B] = I(), [N, j] = I(), [M, P] = I(), [Y, G] = I(!1), U = q([]), z = ($) => {
|
|
14988
|
+
G(!0), F($), S(($ - 1) * O.current);
|
|
14991
14989
|
}, ge = async () => {
|
|
14992
|
-
const $ = U.current.length > 0 ? U.current : a,
|
|
14993
|
-
params:
|
|
14990
|
+
const $ = U.current.length > 0 ? U.current : a, J = en(C.current, $), { colors: Z } = Wt(f), { totalItems: pe, results: Te, attrsEvaluated: ye } = await L.getHandler().searchForTree({
|
|
14991
|
+
params: J,
|
|
14994
14992
|
limit: O.current,
|
|
14995
14993
|
offset: x,
|
|
14996
14994
|
model: m,
|
|
@@ -15004,12 +15002,12 @@ function Oy(e) {
|
|
|
15004
15002
|
sorter: E,
|
|
15005
15003
|
fields: { ...f.fields, ...y.fields }
|
|
15006
15004
|
});
|
|
15007
|
-
|
|
15005
|
+
G(!1), T(Ue);
|
|
15008
15006
|
const ze = await pe();
|
|
15009
15007
|
A(ze);
|
|
15010
15008
|
}, ae = async () => {
|
|
15011
15009
|
try {
|
|
15012
|
-
|
|
15010
|
+
G(!0), await ge();
|
|
15013
15011
|
} catch ($) {
|
|
15014
15012
|
j(JSON.stringify($));
|
|
15015
15013
|
}
|
|
@@ -15021,8 +15019,8 @@ function Oy(e) {
|
|
|
15021
15019
|
u(!1), d(!0), P(void 0);
|
|
15022
15020
|
try {
|
|
15023
15021
|
$ === "action" ? await W() : await me(), u(!0);
|
|
15024
|
-
} catch (
|
|
15025
|
-
P(
|
|
15022
|
+
} catch (J) {
|
|
15023
|
+
P(J);
|
|
15026
15024
|
} finally {
|
|
15027
15025
|
d(!1);
|
|
15028
15026
|
}
|
|
@@ -15040,21 +15038,21 @@ function Oy(e) {
|
|
|
15040
15038
|
context: l
|
|
15041
15039
|
});
|
|
15042
15040
|
v($);
|
|
15043
|
-
const
|
|
15041
|
+
const J = await L.getHandler().getView({
|
|
15044
15042
|
model: n,
|
|
15045
15043
|
type: "tree",
|
|
15046
15044
|
id: r,
|
|
15047
15045
|
context: l
|
|
15048
15046
|
});
|
|
15049
|
-
g(
|
|
15047
|
+
g(J);
|
|
15050
15048
|
};
|
|
15051
15049
|
oe(() => {
|
|
15052
15050
|
t ? H("action") : n && H("model");
|
|
15053
15051
|
}, [t, n]);
|
|
15054
15052
|
const ee = ($) => {
|
|
15055
|
-
const { id:
|
|
15053
|
+
const { id: J } = $;
|
|
15056
15054
|
o({
|
|
15057
|
-
id:
|
|
15055
|
+
id: J,
|
|
15058
15056
|
model: m,
|
|
15059
15057
|
treeView: f
|
|
15060
15058
|
});
|
|
@@ -15069,25 +15067,25 @@ function Oy(e) {
|
|
|
15069
15067
|
page: w,
|
|
15070
15068
|
treeView: f,
|
|
15071
15069
|
results: R,
|
|
15072
|
-
onRequestPageChange:
|
|
15070
|
+
onRequestPageChange: z,
|
|
15073
15071
|
loading: Y,
|
|
15074
15072
|
onRowClicked: ee,
|
|
15075
15073
|
colorsForResults: _,
|
|
15076
15074
|
sorter: E,
|
|
15077
15075
|
onChangeSort: ($) => {
|
|
15078
15076
|
B == null || B($);
|
|
15079
|
-
const
|
|
15077
|
+
const J = xn({
|
|
15080
15078
|
resultsToSort: R,
|
|
15081
15079
|
sorter: $,
|
|
15082
15080
|
fields: { ...f.fields, ...y.fields }
|
|
15083
15081
|
});
|
|
15084
|
-
T(
|
|
15082
|
+
T(J);
|
|
15085
15083
|
},
|
|
15086
15084
|
context: l
|
|
15087
15085
|
}
|
|
15088
15086
|
)
|
|
15089
15087
|
] });
|
|
15090
|
-
return M ? /* @__PURE__ */ s(yt, { className: "mt-10", message: M, type: "error", banner: !0 }) : c ? /* @__PURE__ */ s(
|
|
15088
|
+
return M ? /* @__PURE__ */ s(yt, { className: "mt-10", message: M, type: "error", banner: !0 }) : c ? /* @__PURE__ */ s(Ze, { style: { padding: "2rem" } }) : ue();
|
|
15091
15089
|
}
|
|
15092
15090
|
const Ey = et(Oy), Dy = (e) => {
|
|
15093
15091
|
const { model: t } = e, [n, r] = I();
|
|
@@ -15109,9 +15107,9 @@ function Py(e, t) {
|
|
|
15109
15107
|
setIsLoading: m,
|
|
15110
15108
|
openAction: h,
|
|
15111
15109
|
moveItemsEnabled: f
|
|
15112
|
-
} = ie(is), g =
|
|
15110
|
+
} = ie(is), g = q(), y = q(), [v] = qe(L.getHandler().getView), [w] = qe(
|
|
15113
15111
|
L.getHandler().readObjects
|
|
15114
|
-
), [F] = qe(L.getHandler().update), x =
|
|
15112
|
+
), [F] = qe(L.getHandler().update), x = qt(
|
|
15115
15113
|
Lt.FEATURE_READFORVIEW
|
|
15116
15114
|
);
|
|
15117
15115
|
oe(() => {
|
|
@@ -15241,9 +15239,9 @@ function Py(e, t) {
|
|
|
15241
15239
|
actionId: M,
|
|
15242
15240
|
actionType: P,
|
|
15243
15241
|
key: Y,
|
|
15244
|
-
title:
|
|
15242
|
+
title: G,
|
|
15245
15243
|
description: U,
|
|
15246
|
-
views:
|
|
15244
|
+
views: z,
|
|
15247
15245
|
model: ge,
|
|
15248
15246
|
context: ae,
|
|
15249
15247
|
domain: H,
|
|
@@ -15262,7 +15260,7 @@ function Py(e, t) {
|
|
|
15262
15260
|
ue = /* @__PURE__ */ s(
|
|
15263
15261
|
pe,
|
|
15264
15262
|
{
|
|
15265
|
-
view_id:
|
|
15263
|
+
view_id: z.filter(
|
|
15266
15264
|
(Te) => Te[1] === "graph"
|
|
15267
15265
|
)[0][0],
|
|
15268
15266
|
model: ge,
|
|
@@ -15280,11 +15278,11 @@ function Py(e, t) {
|
|
|
15280
15278
|
{
|
|
15281
15279
|
model: ge,
|
|
15282
15280
|
domain: H,
|
|
15283
|
-
view_id:
|
|
15281
|
+
view_id: z.filter(
|
|
15284
15282
|
(Z) => Z[1] === "tree"
|
|
15285
15283
|
)[0][0],
|
|
15286
15284
|
onRowClicked: (Z) => {
|
|
15287
|
-
const pe =
|
|
15285
|
+
const pe = z.find((Te) => {
|
|
15288
15286
|
const [, ye] = Te;
|
|
15289
15287
|
return ye === "form";
|
|
15290
15288
|
});
|
|
@@ -15317,8 +15315,8 @@ function Py(e, t) {
|
|
|
15317
15315
|
action_id: M,
|
|
15318
15316
|
action_type: P,
|
|
15319
15317
|
tabKey: Y,
|
|
15320
|
-
title:
|
|
15321
|
-
views:
|
|
15318
|
+
title: G,
|
|
15319
|
+
views: z,
|
|
15322
15320
|
model: ge,
|
|
15323
15321
|
context: ae,
|
|
15324
15322
|
domain: H,
|
|
@@ -15331,12 +15329,12 @@ function Py(e, t) {
|
|
|
15331
15329
|
);
|
|
15332
15330
|
}
|
|
15333
15331
|
let $;
|
|
15334
|
-
const
|
|
15332
|
+
const J = z.find((Z) => {
|
|
15335
15333
|
const [, pe] = Z;
|
|
15336
15334
|
return pe === "tree";
|
|
15337
15335
|
});
|
|
15338
|
-
if (
|
|
15339
|
-
const [Z, pe] =
|
|
15336
|
+
if (J) {
|
|
15337
|
+
const [Z, pe] = J, {
|
|
15340
15338
|
actionId: Te,
|
|
15341
15339
|
actionType: ye,
|
|
15342
15340
|
title: Ue,
|
|
@@ -15357,7 +15355,7 @@ function Py(e, t) {
|
|
|
15357
15355
|
cl,
|
|
15358
15356
|
{
|
|
15359
15357
|
id: j,
|
|
15360
|
-
title:
|
|
15358
|
+
title: G,
|
|
15361
15359
|
parms: ee,
|
|
15362
15360
|
action: $,
|
|
15363
15361
|
openAction: h,
|
|
@@ -15429,7 +15427,7 @@ const ky = Ft(Py), Vy = (e) => {
|
|
|
15429
15427
|
A.push({ id: T, operation: "pendingLink" });
|
|
15430
15428
|
}), F(A);
|
|
15431
15429
|
};
|
|
15432
|
-
return p && i.length === 0 ? /* @__PURE__ */ s(
|
|
15430
|
+
return p && i.length === 0 ? /* @__PURE__ */ s(Ze, {}) : /* @__PURE__ */ s(se, { children: /* @__PURE__ */ V("div", { className: "flex flex-row", children: [
|
|
15433
15431
|
/* @__PURE__ */ s(
|
|
15434
15432
|
Wn.Group,
|
|
15435
15433
|
{
|
|
@@ -15570,7 +15568,7 @@ const ky = Ft(Py), Vy = (e) => {
|
|
|
15570
15568
|
c && u.onDidBlurEditorWidget(() => c());
|
|
15571
15569
|
},
|
|
15572
15570
|
[c]
|
|
15573
|
-
), p =
|
|
15571
|
+
), p = X(() => {
|
|
15574
15572
|
if (o === "json" && typeof n == "object")
|
|
15575
15573
|
try {
|
|
15576
15574
|
return JSON.stringify(n, null, " ");
|
|
@@ -15737,7 +15735,7 @@ function mv(e, t) {
|
|
|
15737
15735
|
content: /* @__PURE__ */ s(fv, {}),
|
|
15738
15736
|
action: null
|
|
15739
15737
|
}
|
|
15740
|
-
]), u =
|
|
15738
|
+
]), u = q(/* @__PURE__ */ new Map()), m = q();
|
|
15741
15739
|
Pt(t, () => ({
|
|
15742
15740
|
retrieveAndOpenAction: v,
|
|
15743
15741
|
openShortcut: x,
|
|
@@ -15859,33 +15857,33 @@ function mv(e, t) {
|
|
|
15859
15857
|
return console.error(ue), [];
|
|
15860
15858
|
}
|
|
15861
15859
|
})(), {
|
|
15862
|
-
res_model:
|
|
15860
|
+
res_model: G,
|
|
15863
15861
|
views: U,
|
|
15864
|
-
name:
|
|
15862
|
+
name: z,
|
|
15865
15863
|
target: ge,
|
|
15866
15864
|
view_type: ae,
|
|
15867
15865
|
limit: H
|
|
15868
15866
|
} = k, W = ae === "tree", me = [];
|
|
15869
15867
|
for (const ue of U) {
|
|
15870
|
-
const [$,
|
|
15868
|
+
const [$, J] = ue;
|
|
15871
15869
|
if ($)
|
|
15872
15870
|
me.push(ue);
|
|
15873
|
-
else if (
|
|
15871
|
+
else if (J === "dashboard")
|
|
15874
15872
|
me.push([void 0, "dashboard"]);
|
|
15875
15873
|
else {
|
|
15876
15874
|
const { view_id: Z } = await L.getHandler().getView({
|
|
15877
|
-
model:
|
|
15878
|
-
type:
|
|
15875
|
+
model: G,
|
|
15876
|
+
type: J,
|
|
15879
15877
|
id: $,
|
|
15880
15878
|
context: { ...l, ...M }
|
|
15881
15879
|
});
|
|
15882
|
-
me.push([Z,
|
|
15880
|
+
me.push([Z, J]);
|
|
15883
15881
|
}
|
|
15884
15882
|
}
|
|
15885
15883
|
let ee;
|
|
15886
15884
|
if (R) {
|
|
15887
15885
|
const [ue, $] = me.find(
|
|
15888
|
-
([
|
|
15886
|
+
([J, Z]) => Z === R
|
|
15889
15887
|
);
|
|
15890
15888
|
ee = { id: ue, type: $ };
|
|
15891
15889
|
} else {
|
|
@@ -15895,9 +15893,9 @@ function mv(e, t) {
|
|
|
15895
15893
|
O({
|
|
15896
15894
|
domain: [...Y, ..._],
|
|
15897
15895
|
context: { ...l, ...M },
|
|
15898
|
-
model:
|
|
15896
|
+
model: G,
|
|
15899
15897
|
views: me,
|
|
15900
|
-
title:
|
|
15898
|
+
title: z,
|
|
15901
15899
|
target: ge,
|
|
15902
15900
|
initialView: ee,
|
|
15903
15901
|
action_type: E,
|
|
@@ -15946,7 +15944,7 @@ function mv(e, t) {
|
|
|
15946
15944
|
target: N,
|
|
15947
15945
|
string: j,
|
|
15948
15946
|
limit: M
|
|
15949
|
-
} = C, [P, Y] = B[0],
|
|
15947
|
+
} = C, [P, Y] = B[0], G = { id: P, type: Y }, U = k, z = Zt({
|
|
15950
15948
|
context: U,
|
|
15951
15949
|
values: { ...A, ...i }
|
|
15952
15950
|
}), ge = E, ae = E ? await L.getHandler().evalDomain({
|
|
@@ -15956,16 +15954,16 @@ function mv(e, t) {
|
|
|
15956
15954
|
values: { ...A, ...i }
|
|
15957
15955
|
}),
|
|
15958
15956
|
fields: b,
|
|
15959
|
-
context: { ...l, ...
|
|
15957
|
+
context: { ...l, ...z }
|
|
15960
15958
|
}) : [];
|
|
15961
15959
|
O({
|
|
15962
15960
|
model: _,
|
|
15963
15961
|
target: N,
|
|
15964
15962
|
views: B,
|
|
15965
|
-
context: { ...l, ...
|
|
15963
|
+
context: { ...l, ...z },
|
|
15966
15964
|
domain: ae,
|
|
15967
15965
|
title: j,
|
|
15968
|
-
initialView:
|
|
15966
|
+
initialView: G,
|
|
15969
15967
|
action_id: R,
|
|
15970
15968
|
action_type: T,
|
|
15971
15969
|
limit: M,
|
|
@@ -16002,22 +16000,22 @@ function mv(e, t) {
|
|
|
16002
16000
|
context: { ...l, ...M }
|
|
16003
16001
|
}));
|
|
16004
16002
|
const {
|
|
16005
|
-
res_model:
|
|
16003
|
+
res_model: G,
|
|
16006
16004
|
views: U,
|
|
16007
|
-
name:
|
|
16005
|
+
name: z,
|
|
16008
16006
|
target: ge,
|
|
16009
16007
|
view_type: ae,
|
|
16010
16008
|
limit: H
|
|
16011
16009
|
} = N, W = ae === "tree", me = [];
|
|
16012
|
-
for (const
|
|
16013
|
-
const [Z, pe] =
|
|
16010
|
+
for (const J of U) {
|
|
16011
|
+
const [Z, pe] = J;
|
|
16014
16012
|
if (Z)
|
|
16015
|
-
me.push(
|
|
16013
|
+
me.push(J);
|
|
16016
16014
|
else if (pe === "dashboard")
|
|
16017
16015
|
me.push([void 0, "dashboard"]);
|
|
16018
16016
|
else {
|
|
16019
16017
|
const { view_id: Te } = await L.getHandler().getView({
|
|
16020
|
-
model:
|
|
16018
|
+
model: G,
|
|
16021
16019
|
type: pe,
|
|
16022
16020
|
id: Z,
|
|
16023
16021
|
context: { ...l, ...M }
|
|
@@ -16027,17 +16025,17 @@ function mv(e, t) {
|
|
|
16027
16025
|
}
|
|
16028
16026
|
let ee, ue;
|
|
16029
16027
|
if (T == null) {
|
|
16030
|
-
const
|
|
16031
|
-
ee = void 0, ue =
|
|
16028
|
+
const J = me.find((Z) => Z[0] === void 0);
|
|
16029
|
+
ee = void 0, ue = J[1];
|
|
16032
16030
|
} else
|
|
16033
|
-
[ee, ue] = me.find((
|
|
16031
|
+
[ee, ue] = me.find((J) => J[0] === void 0 ? !1 : J[0] === T);
|
|
16034
16032
|
const $ = { id: ee, type: ue };
|
|
16035
16033
|
O({
|
|
16036
16034
|
domain: P,
|
|
16037
16035
|
context: { ...l, ...M },
|
|
16038
|
-
model:
|
|
16036
|
+
model: G,
|
|
16039
16037
|
views: me,
|
|
16040
|
-
title:
|
|
16038
|
+
title: z,
|
|
16041
16039
|
target: ge,
|
|
16042
16040
|
initialView: $,
|
|
16043
16041
|
action_id: b,
|
|
@@ -16085,9 +16083,9 @@ function mv(e, t) {
|
|
|
16085
16083
|
values: M,
|
|
16086
16084
|
forced_values: P,
|
|
16087
16085
|
treeExpandable: Y = !1,
|
|
16088
|
-
limit:
|
|
16086
|
+
limit: G,
|
|
16089
16087
|
searchParams: U,
|
|
16090
|
-
currentPage:
|
|
16088
|
+
currentPage: z,
|
|
16091
16089
|
order: ge
|
|
16092
16090
|
} = C, ae = Vo();
|
|
16093
16091
|
if (k !== "current" && k !== void 0) {
|
|
@@ -16130,9 +16128,9 @@ function mv(e, t) {
|
|
|
16130
16128
|
formDefaultValues: M,
|
|
16131
16129
|
formForcedValues: P,
|
|
16132
16130
|
treeExpandable: Y,
|
|
16133
|
-
limit:
|
|
16131
|
+
limit: G,
|
|
16134
16132
|
initialSearchParams: U,
|
|
16135
|
-
currentPage:
|
|
16133
|
+
currentPage: z,
|
|
16136
16134
|
order: ge
|
|
16137
16135
|
}
|
|
16138
16136
|
),
|
|
@@ -16278,7 +16276,7 @@ const { useToken: vv } = Je, wb = (e) => {
|
|
|
16278
16276
|
onAddFavourite: r,
|
|
16279
16277
|
onRemoveFavourite: o,
|
|
16280
16278
|
onDropdownClosed: a
|
|
16281
|
-
} = e, [i, l] = I(!1), [c, d] = I(), { t: p } = he(), { token: u } = vv(), m =
|
|
16279
|
+
} = e, [i, l] = I(!1), [c, d] = I(), { t: p } = he(), { token: u } = vv(), m = q(null), h = ie(
|
|
16282
16280
|
At
|
|
16283
16281
|
), {
|
|
16284
16282
|
openShortcut: f,
|
|
@@ -16287,7 +16285,7 @@ const { useToken: vv } = Je, wb = (e) => {
|
|
|
16287
16285
|
currentView: v,
|
|
16288
16286
|
currentId: w,
|
|
16289
16287
|
openDefaultActionForModel: F
|
|
16290
|
-
} = h || {}, x =
|
|
16288
|
+
} = h || {}, x = X(() => {
|
|
16291
16289
|
if (!v || !v.view_id || !v.extra)
|
|
16292
16290
|
return;
|
|
16293
16291
|
const { action_id: T, action_type: _ } = v.extra || {};
|
|
@@ -16303,7 +16301,7 @@ const { useToken: vv } = Je, wb = (e) => {
|
|
|
16303
16301
|
view_id: k,
|
|
16304
16302
|
res_id: E
|
|
16305
16303
|
};
|
|
16306
|
-
}, [w, v]), S =
|
|
16304
|
+
}, [w, v]), S = X(() => {
|
|
16307
16305
|
if (x)
|
|
16308
16306
|
return JSON.stringify(x);
|
|
16309
16307
|
}, [x]);
|
|
@@ -16382,7 +16380,7 @@ const { useToken: vv } = Je, wb = (e) => {
|
|
|
16382
16380
|
placement: "bottomRight",
|
|
16383
16381
|
header: /* @__PURE__ */ V("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
16384
16382
|
/* @__PURE__ */ s("div", { style: { paddingLeft: 15, color: "#ccc" }, children: p == null ? void 0 : p("favorites").toUpperCase() }),
|
|
16385
|
-
/* @__PURE__ */ s("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ s(
|
|
16383
|
+
/* @__PURE__ */ s("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ s(Yt, { title: p == null ? void 0 : p("edit_favorites"), children: /* @__PURE__ */ s(
|
|
16386
16384
|
ki,
|
|
16387
16385
|
{
|
|
16388
16386
|
style: { color: u.colorPrimary, cursor: "pointer" },
|
|
@@ -16463,6 +16461,6 @@ export {
|
|
|
16463
16461
|
py as Url,
|
|
16464
16462
|
xb as dayjs,
|
|
16465
16463
|
wt as iconMapper,
|
|
16466
|
-
|
|
16464
|
+
Gt as showConfirmDialog
|
|
16467
16465
|
};
|
|
16468
16466
|
//# sourceMappingURL=react-ooui.es.js.map
|