@gisce/react-ooui 2.89.0-alpha.1 → 2.89.0-alpha.2
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/hooks/usePermissions.d.ts.map +1 -1
- package/dist/react-ooui.es.js +376 -376
- package/dist/react-ooui.es.js.map +1 -1
- package/package.json +1 -1
package/dist/react-ooui.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var ac = Object.defineProperty;
|
|
|
2
2
|
var lc = (e, t, n) => t in e ? ac(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Ts = (e, t, n) => (lc(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsx as s, jsxs as N, Fragment as me } from "react/jsx-runtime";
|
|
5
|
-
import en, { useContext as de, useState as T, useEffect as le, useRef as K, memo as st, useCallback as
|
|
5
|
+
import en, { useContext as de, useState as T, useEffect as le, useRef as K, memo as st, useCallback as E, useMemo as te, forwardRef as Mt, useImperativeHandle as Lt, Fragment as Nn, createContext as cc, createElement as dc } from "react";
|
|
6
6
|
import { Tooltip as zt, theme as et, Typography as an, Form as $t, Row as We, Col as Ae, Modal as Rt, Button as Ue, Dropdown as uc, Menu as As, Space as lt, Spin as nt, Divider as Pr, Input as xt, Select as gn, Checkbox as Jn, Alert as It, Timeline as ki, message as Is, Popover as fc, DatePicker as pc, TimePicker as mc, InputNumber as kr, Layout as $i, Progress as hc, Avatar as Mi, Tag as Ho, ColorPicker as Ni, Badge as or, Pagination as gc, Empty as Vi, Statistic as yc, Card as jo, Tabs as Li, Radio as Rs, Switch as vc, Steps as _s, Carousel as bc } from "antd";
|
|
7
7
|
import { Label as Vn, Field as Fo, Tree as Hi, Reference as wc, Selection as Bo, Many2one as ji, Boolean as xc, parseContext as on, graphProcessor as Bi, graphFieldUtils as Sc, Integer as To, SearchFieldTypes as rn, SearchFilter as Ui, parseContextFields as Cc, parseDomainFields as Fc, parseGraph as Wi, Container as Tc, Form as Gi, transformDomainForChildWidget as Uo, Button as Ac } from "@gisce/ooui";
|
|
8
8
|
import Ic, { QuestionCircleOutlined as Yi, ExclamationCircleOutlined as $r, LoadingOutlined as Ht, DownOutlined as Mr, CloseOutlined as Ln, CheckOutlined as sr, TranslationOutlined as qi, FolderOpenOutlined as Wo, DownloadOutlined as Go, ClearOutlined as ir, FormOutlined as Kn, TableOutlined as Yo, AreaChartOutlined as Rc, CalendarOutlined as _c, FileAddOutlined as Nr, CloseCircleFilled as Ec, CopyOutlined as ar, FilterOutlined as zi, DeleteOutlined as qo, InfoCircleOutlined as Vr, ReloadOutlined as Lr, ThunderboltOutlined as Hr, PrinterOutlined as jr, SearchOutlined as lr, UpOutlined as Oc, ExportOutlined as Ji, EnterOutlined as Br, PlusSquareOutlined as Ki, MinusSquareOutlined as Qi, StarFilled as Dc, StarOutlined as Pc, LeftOutlined as Xi, RightOutlined as Zi, ApiOutlined as kc, AlignLeftOutlined as $c, EyeOutlined as Mc, LinkOutlined as Es, SaveOutlined as Nc, EditOutlined as ea, PlusOutlined as Vc, BorderOuterOutlined as Lc, SettingOutlined as Hc } from "@ant-design/icons";
|
|
@@ -183,8 +183,8 @@ var ca = { exports: {} };
|
|
|
183
183
|
var R = S.match(r);
|
|
184
184
|
if (!R)
|
|
185
185
|
return null;
|
|
186
|
-
var A = ("" + R[0]).match(o) || ["-", 0, 0],
|
|
187
|
-
return w === 0 ? 0 :
|
|
186
|
+
var A = ("" + R[0]).match(o) || ["-", 0, 0], _ = A[0], w = 60 * +A[1] + +A[2];
|
|
187
|
+
return w === 0 ? 0 : _ === "+" ? w : -w;
|
|
188
188
|
}(g), g === null))
|
|
189
189
|
return this;
|
|
190
190
|
var b = Math.abs(g) <= 16 ? 60 * g : g, F = this;
|
|
@@ -768,7 +768,7 @@ const da = (e) => {
|
|
|
768
768
|
}
|
|
769
769
|
h(!1), a();
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function _() {
|
|
772
772
|
return u ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ N(me, { children: [
|
|
773
773
|
R(),
|
|
774
774
|
/* @__PURE__ */ s(Pr, {}),
|
|
@@ -808,7 +808,7 @@ const da = (e) => {
|
|
|
808
808
|
footer: null,
|
|
809
809
|
destroyOnClose: !0,
|
|
810
810
|
maskClosable: !1,
|
|
811
|
-
children:
|
|
811
|
+
children: _()
|
|
812
812
|
}
|
|
813
813
|
);
|
|
814
814
|
};
|
|
@@ -837,7 +837,7 @@ const { defaultAlgorithm: qd, defaultSeed: zd } = et, Xo = qd(zd), Qn = st(
|
|
|
837
837
|
disabled: i,
|
|
838
838
|
...a
|
|
839
839
|
}) => {
|
|
840
|
-
const l =
|
|
840
|
+
const l = E((c) => c ? /* @__PURE__ */ s(Yr, { content: c }) : null, []);
|
|
841
841
|
return /* @__PURE__ */ s(
|
|
842
842
|
e,
|
|
843
843
|
{
|
|
@@ -871,7 +871,7 @@ const fa = (e) => {
|
|
|
871
871
|
), f = te(
|
|
872
872
|
() => Array.isArray(e) || !!t.selectionValues.size,
|
|
873
873
|
[e, t.selectionValues]
|
|
874
|
-
), m =
|
|
874
|
+
), m = E(
|
|
875
875
|
(g) => {
|
|
876
876
|
r == null || r(g.target.value);
|
|
877
877
|
},
|
|
@@ -923,20 +923,20 @@ const ma = st(
|
|
|
923
923
|
} = o || {}, [p, u] = T(!1), { t: f } = ye(), { required: m, readOnly: h } = e, g = te(
|
|
924
924
|
() => m && !h,
|
|
925
925
|
[m, h]
|
|
926
|
-
), y =
|
|
926
|
+
), y = E(
|
|
927
927
|
(S) => {
|
|
928
928
|
r == null || r(S.target.value);
|
|
929
929
|
},
|
|
930
930
|
[r]
|
|
931
|
-
), v =
|
|
931
|
+
), v = E(() => {
|
|
932
932
|
if (c != null && c()) {
|
|
933
933
|
fn(f("saveBeforeTranslate"));
|
|
934
934
|
return;
|
|
935
935
|
}
|
|
936
936
|
u(!0);
|
|
937
|
-
}, [c, f]), b =
|
|
937
|
+
}, [c, f]), b = E(() => {
|
|
938
938
|
u(!1);
|
|
939
|
-
}, []), F =
|
|
939
|
+
}, []), F = E(() => {
|
|
940
940
|
u(!1), l == null || l({
|
|
941
941
|
forceRefresh: !0
|
|
942
942
|
});
|
|
@@ -1612,7 +1612,7 @@ const yn = ({
|
|
|
1612
1612
|
Ke(() => {
|
|
1613
1613
|
w();
|
|
1614
1614
|
}, [i]);
|
|
1615
|
-
const
|
|
1615
|
+
const _ = (x) => {
|
|
1616
1616
|
o == null || o({
|
|
1617
1617
|
items: x
|
|
1618
1618
|
});
|
|
@@ -1633,7 +1633,7 @@ const yn = ({
|
|
|
1633
1633
|
context: { ...A == null ? void 0 : A(), ...g },
|
|
1634
1634
|
currentView: "form"
|
|
1635
1635
|
});
|
|
1636
|
-
|
|
1636
|
+
_(x);
|
|
1637
1637
|
} catch (x) {
|
|
1638
1638
|
d(x);
|
|
1639
1639
|
} finally {
|
|
@@ -2192,14 +2192,14 @@ const Hu = (e) => {
|
|
|
2192
2192
|
const [C, S] = F, {
|
|
2193
2193
|
actionId: R,
|
|
2194
2194
|
actionType: A,
|
|
2195
|
-
title:
|
|
2195
|
+
title: _,
|
|
2196
2196
|
model: w
|
|
2197
2197
|
} = v;
|
|
2198
2198
|
c({
|
|
2199
2199
|
domain: v.domain,
|
|
2200
2200
|
action_id: R,
|
|
2201
2201
|
action_type: A,
|
|
2202
|
-
name:
|
|
2202
|
+
name: _,
|
|
2203
2203
|
res_id: !1,
|
|
2204
2204
|
res_model: w,
|
|
2205
2205
|
view_id: C,
|
|
@@ -2260,11 +2260,11 @@ const Hu = (e) => {
|
|
|
2260
2260
|
le(() => () => {
|
|
2261
2261
|
n();
|
|
2262
2262
|
}, []);
|
|
2263
|
-
const n =
|
|
2263
|
+
const n = E((o) => {
|
|
2264
2264
|
var i;
|
|
2265
2265
|
o ? (t.current.delete(o), process.env.NODE_ENV !== "development" && ((i = t.current.get(o)) == null || i.abort())) : (process.env.NODE_ENV !== "development" && t.current.forEach((a) => a.abort()), t.current.clear());
|
|
2266
2266
|
}, []);
|
|
2267
|
-
return [
|
|
2267
|
+
return [E(
|
|
2268
2268
|
async (o, i) => {
|
|
2269
2269
|
const a = i || Jo();
|
|
2270
2270
|
t.current.has(a) && n(a);
|
|
@@ -2456,7 +2456,7 @@ const { getValueForOperator: Vs } = Bi, Wu = (e) => {
|
|
|
2456
2456
|
operator: p,
|
|
2457
2457
|
manualIds: u,
|
|
2458
2458
|
fixedHeight: f
|
|
2459
|
-
} = e, [m, h] = T(!1), [g, y] = T(), [v, b] = T(0), [F, C] = T(), [S, R] = T(), [A,
|
|
2459
|
+
} = e, [m, h] = T(!1), [g, y] = T(), [v, b] = T(0), [F, C] = T(), [S, R] = T(), [A, _] = T(), [w, O] = T(), [I] = Be(
|
|
2460
2460
|
V.getHandler().searchAllIds
|
|
2461
2461
|
), [x] = Be(
|
|
2462
2462
|
V.getHandler().readObjects
|
|
@@ -2552,9 +2552,9 @@ const { getValueForOperator: Vs } = Bi, Wu = (e) => {
|
|
|
2552
2552
|
values: { value: B, percent: H },
|
|
2553
2553
|
context: r
|
|
2554
2554
|
});
|
|
2555
|
-
|
|
2555
|
+
_(j);
|
|
2556
2556
|
} else
|
|
2557
|
-
|
|
2557
|
+
_(l);
|
|
2558
2558
|
O(void 0);
|
|
2559
2559
|
} catch (B) {
|
|
2560
2560
|
O(JSON.stringify(B));
|
|
@@ -2587,12 +2587,12 @@ const { getValueForOperator: Vs } = Bi, Wu = (e) => {
|
|
|
2587
2587
|
V.getHandler().getFields
|
|
2588
2588
|
), [F] = Be(
|
|
2589
2589
|
V.getHandler().readObjects
|
|
2590
|
-
), [C] = Be(V.getHandler().search), S =
|
|
2590
|
+
), [C] = Be(V.getHandler().search), S = E(async () => {
|
|
2591
2591
|
d(!0), u(void 0), v(n.type || "line");
|
|
2592
2592
|
const R = Yu({ ooui: n });
|
|
2593
|
-
let A,
|
|
2593
|
+
let A, _;
|
|
2594
2594
|
try {
|
|
2595
|
-
({ values: A, fields:
|
|
2595
|
+
({ values: A, fields: _ } = await Ju({
|
|
2596
2596
|
model: t,
|
|
2597
2597
|
domain: r,
|
|
2598
2598
|
context: o,
|
|
@@ -2611,7 +2611,7 @@ const { getValueForOperator: Vs } = Bi, Wu = (e) => {
|
|
|
2611
2611
|
return;
|
|
2612
2612
|
}
|
|
2613
2613
|
try {
|
|
2614
|
-
if (!A || !
|
|
2614
|
+
if (!A || !_)
|
|
2615
2615
|
return u("No values or fields returned"), d(!1), {
|
|
2616
2616
|
loading: c,
|
|
2617
2617
|
error: p,
|
|
@@ -2624,7 +2624,7 @@ const { getValueForOperator: Vs } = Bi, Wu = (e) => {
|
|
|
2624
2624
|
const w = Gu({
|
|
2625
2625
|
ooui: n,
|
|
2626
2626
|
values: A,
|
|
2627
|
-
fields:
|
|
2627
|
+
fields: _,
|
|
2628
2628
|
options: {
|
|
2629
2629
|
uninformedString: a
|
|
2630
2630
|
}
|
|
@@ -2948,7 +2948,7 @@ const Zu = {
|
|
|
2948
2948
|
}, [t, e]), d = te(() => {
|
|
2949
2949
|
if (e === "pie")
|
|
2950
2950
|
return ef(t);
|
|
2951
|
-
}, [t, e]), p =
|
|
2951
|
+
}, [t, e]), p = E(
|
|
2952
2952
|
(g) => {
|
|
2953
2953
|
if (!d)
|
|
2954
2954
|
return;
|
|
@@ -2961,7 +2961,7 @@ const Zu = {
|
|
|
2961
2961
|
return {
|
|
2962
2962
|
formatter: (g, y) => p(y.id)
|
|
2963
2963
|
};
|
|
2964
|
-
}, [p, d]), f =
|
|
2964
|
+
}, [p, d]), f = E(
|
|
2965
2965
|
({ percent: g, x: y }) => g < 0.07 ? "" : p(y),
|
|
2966
2966
|
[p]
|
|
2967
2967
|
), m = sf[e], h = te(() => af({
|
|
@@ -3472,8 +3472,8 @@ const vn = en.createContext(null), Ws = async (e) => {
|
|
|
3472
3472
|
context: {}
|
|
3473
3473
|
}
|
|
3474
3474
|
);
|
|
3475
|
-
async function v(
|
|
3476
|
-
const { reportData: w, fields: O, values: I, context: x = {} } =
|
|
3475
|
+
async function v(_) {
|
|
3476
|
+
const { reportData: w, fields: O, values: I, context: x = {} } = _, {
|
|
3477
3477
|
context: P,
|
|
3478
3478
|
model: D,
|
|
3479
3479
|
datas: k = {},
|
|
@@ -3508,11 +3508,11 @@ const vn = en.createContext(null), Ws = async (e) => {
|
|
|
3508
3508
|
i.current = !1, clearInterval(o.current), f(B), l(!1);
|
|
3509
3509
|
}
|
|
3510
3510
|
}
|
|
3511
|
-
async function b(
|
|
3511
|
+
async function b(_) {
|
|
3512
3512
|
let w;
|
|
3513
3513
|
try {
|
|
3514
3514
|
if (w = await V.getHandler().getReport({
|
|
3515
|
-
id:
|
|
3515
|
+
id: _
|
|
3516
3516
|
}), w.state && i.current === !0) {
|
|
3517
3517
|
i.current = !1, clearInterval(o.current), l(!1);
|
|
3518
3518
|
const O = await Pn(w.result);
|
|
@@ -3523,25 +3523,25 @@ const vn = en.createContext(null), Ws = async (e) => {
|
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
3525
|
async function F({
|
|
3526
|
-
actionData:
|
|
3526
|
+
actionData: _,
|
|
3527
3527
|
fields: w,
|
|
3528
3528
|
values: O,
|
|
3529
3529
|
context: I,
|
|
3530
3530
|
onRefreshParentValues: x
|
|
3531
3531
|
}) {
|
|
3532
|
-
const { type: P } =
|
|
3532
|
+
const { type: P } = _;
|
|
3533
3533
|
if (x && p.current.push(x), P === "ir.actions.report.xml")
|
|
3534
3534
|
return await v({
|
|
3535
|
-
reportData:
|
|
3535
|
+
reportData: _,
|
|
3536
3536
|
fields: w,
|
|
3537
3537
|
values: O,
|
|
3538
3538
|
context: I
|
|
3539
3539
|
});
|
|
3540
3540
|
if (P === "ir.actions.act_window")
|
|
3541
|
-
return await C({ actionData:
|
|
3541
|
+
return await C({ actionData: _, fields: w, values: O, context: I });
|
|
3542
3542
|
if (P === "ir.actions.act_url")
|
|
3543
3543
|
window.open(
|
|
3544
|
-
_u(
|
|
3544
|
+
_u(_.url, { ...O, context: I }),
|
|
3545
3545
|
"_blank"
|
|
3546
3546
|
);
|
|
3547
3547
|
else
|
|
@@ -3552,16 +3552,16 @@ const vn = en.createContext(null), Ws = async (e) => {
|
|
|
3552
3552
|
}), {};
|
|
3553
3553
|
}
|
|
3554
3554
|
async function C({
|
|
3555
|
-
actionData:
|
|
3555
|
+
actionData: _,
|
|
3556
3556
|
fields: w = {},
|
|
3557
3557
|
values: O = {},
|
|
3558
3558
|
context: I = {}
|
|
3559
3559
|
}) {
|
|
3560
3560
|
var U;
|
|
3561
|
-
let x =
|
|
3562
|
-
|
|
3561
|
+
let x = _;
|
|
3562
|
+
_.res_model || (x = (await V.getHandler().readObjects({
|
|
3563
3563
|
model: "ir.actions.act_window",
|
|
3564
|
-
ids: [parseInt(
|
|
3564
|
+
ids: [parseInt(_.id)],
|
|
3565
3565
|
context: I
|
|
3566
3566
|
}))[0]);
|
|
3567
3567
|
const P = x.context, D = typeof (x == null ? void 0 : x.context) == "string" ? on({
|
|
@@ -3623,16 +3623,16 @@ const vn = en.createContext(null), Ws = async (e) => {
|
|
|
3623
3623
|
}
|
|
3624
3624
|
}
|
|
3625
3625
|
function S({
|
|
3626
|
-
domain:
|
|
3626
|
+
domain: _,
|
|
3627
3627
|
model: w,
|
|
3628
3628
|
formView: O,
|
|
3629
3629
|
context: I,
|
|
3630
3630
|
actionData: x
|
|
3631
3631
|
}) {
|
|
3632
|
-
m ? R({ domain:
|
|
3632
|
+
m ? R({ domain: _, model: w, formView: O, context: I, actionData: x }) : (y({ domain: _, model: w, context: I, formView: O, actionData: x }), h(!0));
|
|
3633
3633
|
}
|
|
3634
3634
|
async function R({
|
|
3635
|
-
domain:
|
|
3635
|
+
domain: _,
|
|
3636
3636
|
model: w,
|
|
3637
3637
|
formView: O,
|
|
3638
3638
|
context: I,
|
|
@@ -3644,7 +3644,7 @@ const vn = en.createContext(null), Ws = async (e) => {
|
|
|
3644
3644
|
context: {},
|
|
3645
3645
|
formView: void 0,
|
|
3646
3646
|
actionData: void 0
|
|
3647
|
-
}), h(!1), await new Promise((P) => setTimeout(P, 300)), y({ domain:
|
|
3647
|
+
}), h(!1), await new Promise((P) => setTimeout(P, 300)), y({ domain: _, model: w, context: I, formView: O, actionData: x }), h(!0);
|
|
3648
3648
|
}
|
|
3649
3649
|
async function A() {
|
|
3650
3650
|
Ws(p.current), p.current = [], h(!1), y({
|
|
@@ -3761,7 +3761,7 @@ const Sf = Mt(wf), ka = ({
|
|
|
3761
3761
|
const n = de(
|
|
3762
3762
|
vn
|
|
3763
3763
|
), { processAction: r } = n || {};
|
|
3764
|
-
return
|
|
3764
|
+
return E(
|
|
3765
3765
|
(o, i = {}) => {
|
|
3766
3766
|
r == null || r({
|
|
3767
3767
|
actionData: o,
|
|
@@ -3848,7 +3848,7 @@ function zr({ res_id: e, searchParams: t }) {
|
|
|
3848
3848
|
const n = K(null), { currentView: r, limit: o, currentPage: i, order: a } = wn(), l = {
|
|
3849
3849
|
id: r.view_id,
|
|
3850
3850
|
type: r.type
|
|
3851
|
-
}, { token: c } = et.useToken(), { t: d } = ye(), [p, u] = T(!1), { currentTab: f } = os(), m =
|
|
3851
|
+
}, { token: c } = et.useToken(), { t: d } = ye(), [p, u] = T(!1), { currentTab: f } = os(), m = E(
|
|
3852
3852
|
(C) => {
|
|
3853
3853
|
try {
|
|
3854
3854
|
const S = document.createElement("textarea");
|
|
@@ -3951,7 +3951,7 @@ function Ef({
|
|
|
3951
3951
|
treeIsLoading: S,
|
|
3952
3952
|
setPreviousView: R,
|
|
3953
3953
|
previousView: A,
|
|
3954
|
-
results:
|
|
3954
|
+
results: _,
|
|
3955
3955
|
limit: w,
|
|
3956
3956
|
totalItems: O,
|
|
3957
3957
|
isActive: I,
|
|
@@ -3961,7 +3961,7 @@ function Ef({
|
|
|
3961
3961
|
permissions: k
|
|
3962
3962
|
} = de(Et), L = tn(
|
|
3963
3963
|
jt.FEATURE_ADVANCED_EXPORT
|
|
3964
|
-
), { t: $ } = ye(), [U, M] = T(!1), H = K(!0), { showErrorNotification: B } = yt(), j =
|
|
3964
|
+
), { t: $ } = ye(), [U, M] = T(!1), H = K(!0), { showErrorNotification: B } = yt(), j = E(() => {
|
|
3965
3965
|
var Y;
|
|
3966
3966
|
(Y = m == null ? void 0 : m.current) == null || Y.refreshResults();
|
|
3967
3967
|
}, [m]), { actionButtonProps: X, printButtonProps: W } = $a({
|
|
@@ -3976,7 +3976,7 @@ function Ef({
|
|
|
3976
3976
|
}), Z = te(
|
|
3977
3977
|
() => C !== void 0 && C.trim().length > 0,
|
|
3978
3978
|
[C]
|
|
3979
|
-
), Q = te(() => Zt(r || [], y || []), [r, y]), oe =
|
|
3979
|
+
), Q = te(() => Zt(r || [], y || []), [r, y]), oe = E(async () => {
|
|
3980
3980
|
var Y;
|
|
3981
3981
|
try {
|
|
3982
3982
|
u == null || u(!0);
|
|
@@ -3998,7 +3998,7 @@ function Ef({
|
|
|
3998
3998
|
l,
|
|
3999
3999
|
u,
|
|
4000
4000
|
B
|
|
4001
|
-
]), G =
|
|
4001
|
+
]), G = E(async () => {
|
|
4002
4002
|
var Y;
|
|
4003
4003
|
try {
|
|
4004
4004
|
c == null || c(!0), await V.getHandler().deleteObjects({
|
|
@@ -4020,12 +4020,12 @@ function Ef({
|
|
|
4020
4020
|
g,
|
|
4021
4021
|
c,
|
|
4022
4022
|
B
|
|
4023
|
-
]), se =
|
|
4023
|
+
]), se = E(
|
|
4024
4024
|
(Y) => {
|
|
4025
4025
|
R == null || R(i), a == null || a(Y);
|
|
4026
4026
|
},
|
|
4027
4027
|
[i, R, a]
|
|
4028
|
-
), ie =
|
|
4028
|
+
), ie = E(
|
|
4029
4029
|
(Y) => {
|
|
4030
4030
|
Y !== C && (Y && Y.trim().length > 0 && !C && (P == null || P([]), D == null || D({})), F == null || F(Y), C !== void 0 && setTimeout(() => {
|
|
4031
4031
|
var ae;
|
|
@@ -4039,11 +4039,11 @@ function Ef({
|
|
|
4039
4039
|
D,
|
|
4040
4040
|
m
|
|
4041
4041
|
]
|
|
4042
|
-
), z =
|
|
4042
|
+
), z = E(
|
|
4043
4043
|
(Y) => {
|
|
4044
4044
|
if (Y.id === "print_screen") {
|
|
4045
4045
|
let ae = (l == null ? void 0 : l.map((be) => be.id)) || [];
|
|
4046
|
-
ae.length === 0 && (ae = (
|
|
4046
|
+
ae.length === 0 && (ae = (_ == null ? void 0 : _.map((be) => be.id)) || []), ce(
|
|
4047
4047
|
{
|
|
4048
4048
|
id: -1,
|
|
4049
4049
|
model: f,
|
|
@@ -4060,7 +4060,7 @@ function Ef({
|
|
|
4060
4060
|
}
|
|
4061
4061
|
M(!0);
|
|
4062
4062
|
},
|
|
4063
|
-
[f, e,
|
|
4063
|
+
[f, e, _, ce, l]
|
|
4064
4064
|
);
|
|
4065
4065
|
le(() => {
|
|
4066
4066
|
if (x === "infinite" && C === void 0) {
|
|
@@ -4088,13 +4088,13 @@ function Ef({
|
|
|
4088
4088
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
4089
4089
|
[v, I, b]
|
|
4090
4090
|
);
|
|
4091
|
-
const ne =
|
|
4091
|
+
const ne = E(() => {
|
|
4092
4092
|
Xt({
|
|
4093
4093
|
confirmMessage: $("confirmDuplicate"),
|
|
4094
4094
|
t: $,
|
|
4095
4095
|
onOk: oe
|
|
4096
4096
|
});
|
|
4097
|
-
}, [oe, $]), ue =
|
|
4097
|
+
}, [oe, $]), ue = E(() => {
|
|
4098
4098
|
Xt({
|
|
4099
4099
|
confirmMessage: $("confirmRemove"),
|
|
4100
4100
|
t: $,
|
|
@@ -4226,7 +4226,7 @@ function Ef({
|
|
|
4226
4226
|
limit: w,
|
|
4227
4227
|
totalRegisters: O || 0,
|
|
4228
4228
|
selectedRegistersToExport: l,
|
|
4229
|
-
visibleRegisters: (
|
|
4229
|
+
visibleRegisters: (_ == null ? void 0 : _.length) || 0,
|
|
4230
4230
|
context: e
|
|
4231
4231
|
}
|
|
4232
4232
|
)
|
|
@@ -4380,7 +4380,7 @@ const { useToken: Df } = et, { Title: Pf, Text: yr } = an, Jr = ({
|
|
|
4380
4380
|
Ke(() => (o && g(), () => {
|
|
4381
4381
|
m();
|
|
4382
4382
|
}), [r, t, e, n, o]);
|
|
4383
|
-
const g =
|
|
4383
|
+
const g = E(async () => {
|
|
4384
4384
|
if (!u.current) {
|
|
4385
4385
|
u.current = !0, a(!0);
|
|
4386
4386
|
try {
|
|
@@ -4510,7 +4510,7 @@ const { useToken: Df } = et, { Title: Pf, Text: yr } = an, Jr = ({
|
|
|
4510
4510
|
const [n, r] = T(!0), o = K(void 0), i = K(!1), {
|
|
4511
4511
|
getColumnState: a,
|
|
4512
4512
|
updateColumnState: l
|
|
4513
|
-
} = Mf(e), c =
|
|
4513
|
+
} = Mf(e), c = E(async () => {
|
|
4514
4514
|
if (!(i.current || t)) {
|
|
4515
4515
|
i.current = !0, r(!0);
|
|
4516
4516
|
try {
|
|
@@ -4530,7 +4530,7 @@ const { useToken: Df } = et, { Title: Pf, Text: yr } = an, Jr = ({
|
|
|
4530
4530
|
}
|
|
4531
4531
|
c();
|
|
4532
4532
|
}, [e, t]);
|
|
4533
|
-
const d =
|
|
4533
|
+
const d = E(() => o.current, []), p = E(
|
|
4534
4534
|
(u) => {
|
|
4535
4535
|
const f = u.map((m) => {
|
|
4536
4536
|
const { sort: h, ...g } = m;
|
|
@@ -4680,7 +4680,7 @@ const { useToken: Df } = et, { Title: Pf, Text: yr } = an, Jr = ({
|
|
|
4680
4680
|
onChange: t,
|
|
4681
4681
|
autocompleteWithZeros: n = !1
|
|
4682
4682
|
}) => {
|
|
4683
|
-
const r =
|
|
4683
|
+
const r = E(
|
|
4684
4684
|
(i) => {
|
|
4685
4685
|
if (i.key === "Enter") {
|
|
4686
4686
|
const l = i.target.value;
|
|
@@ -4707,7 +4707,7 @@ const { useToken: Df } = et, { Title: Pf, Text: yr } = an, Jr = ({
|
|
|
4707
4707
|
}
|
|
4708
4708
|
},
|
|
4709
4709
|
[t, n]
|
|
4710
|
-
), o =
|
|
4710
|
+
), o = E(
|
|
4711
4711
|
(i) => {
|
|
4712
4712
|
const a = e !== void 0;
|
|
4713
4713
|
(!i.target.value || i.target.value === "") && a && (t == null || t(null));
|
|
@@ -4725,13 +4725,13 @@ const { useToken: Df } = et, { Title: Pf, Text: yr } = an, Jr = ({
|
|
|
4725
4725
|
defaultOpenValue: r,
|
|
4726
4726
|
...o
|
|
4727
4727
|
}) => {
|
|
4728
|
-
const i = K(null), a = K(0), l =
|
|
4728
|
+
const i = K(null), a = K(0), l = E(
|
|
4729
4729
|
(u) => {
|
|
4730
4730
|
var f;
|
|
4731
4731
|
t == null || t(u), a.current += 1, a.current === n && ((f = i.current) == null || f.blur(), a.current = 0);
|
|
4732
4732
|
},
|
|
4733
4733
|
[t, n]
|
|
4734
|
-
), c =
|
|
4734
|
+
), c = E(
|
|
4735
4735
|
(u, f) => {
|
|
4736
4736
|
t == null || t(u, f);
|
|
4737
4737
|
},
|
|
@@ -4826,7 +4826,7 @@ const { useToken: Df } = et, { Title: Pf, Text: yr } = an, Jr = ({
|
|
|
4826
4826
|
const { ooui: t } = e, { id: n, decimalDigits: r, readOnly: o, required: i } = t, a = de(Qe), { elementHasLostFocus: l } = a || {}, c = te(() => i && !o, [i, o]), d = te(
|
|
4827
4827
|
() => c ? Yf : kr,
|
|
4828
4828
|
[c]
|
|
4829
|
-
), p =
|
|
4829
|
+
), p = E((f) => f ? /* @__PURE__ */ s(Yr, { content: f }) : null, []), u = E((f) => `${f}`.replace(/[^0-9.-]+/g, ""), []);
|
|
4830
4830
|
return /* @__PURE__ */ s(Ve, { required: c, type: "number", ...e, children: /* @__PURE__ */ s(
|
|
4831
4831
|
d,
|
|
4832
4832
|
{
|
|
@@ -4852,7 +4852,7 @@ const Yf = Ft(kr)`
|
|
|
4852
4852
|
const { ooui: t, onChange: n } = e, { id: r, readOnly: o, required: i } = t, { token: a } = qf(), l = i && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, c = de(Qe), { elementHasLostFocus: d } = c || {}, p = te(() => i && !o, [i, o]), u = te(
|
|
4853
4853
|
() => p ? Qf : kr,
|
|
4854
4854
|
[p]
|
|
4855
|
-
), f =
|
|
4855
|
+
), f = E((g) => g ? /* @__PURE__ */ s(Yr, { content: g }) : null, []), m = E((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, "") : "", []), h = E(
|
|
4856
4856
|
(g) => {
|
|
4857
4857
|
const y = g;
|
|
4858
4858
|
n == null || n(y);
|
|
@@ -5007,12 +5007,12 @@ const { useToken: ip } = et, { Title: ap } = an, { Header: lp, Content: cp, Foot
|
|
|
5007
5007
|
title: r,
|
|
5008
5008
|
footer: o
|
|
5009
5009
|
}) => {
|
|
5010
|
-
const [i, a] = T(e), l = K(null), { token: c } = ip(), d =
|
|
5010
|
+
const [i, a] = T(e), l = K(null), { token: c } = ip(), d = E(
|
|
5011
5011
|
(m) => {
|
|
5012
5012
|
m.preventDefault(), m.stopPropagation(), t();
|
|
5013
5013
|
},
|
|
5014
5014
|
[t]
|
|
5015
|
-
), p =
|
|
5015
|
+
), p = E(
|
|
5016
5016
|
(m) => {
|
|
5017
5017
|
m.key === "Escape" && t();
|
|
5018
5018
|
},
|
|
@@ -5214,8 +5214,8 @@ function fp() {
|
|
|
5214
5214
|
for (var R in m)
|
|
5215
5215
|
!(F && R === "prototype") && t.call(m, R) && b.push(String(R));
|
|
5216
5216
|
if (i)
|
|
5217
|
-
for (var A = u(m),
|
|
5218
|
-
!(A && l[
|
|
5217
|
+
for (var A = u(m), _ = 0; _ < l.length; ++_)
|
|
5218
|
+
!(A && l[_] === "constructor") && t.call(m, l[_]) && b.push(l[_]);
|
|
5219
5219
|
return b;
|
|
5220
5220
|
};
|
|
5221
5221
|
}
|
|
@@ -5942,12 +5942,12 @@ const gs = /* @__PURE__ */ la(Th), bl = Mt(
|
|
|
5942
5942
|
return S[A] === void 0 && (S[A] = c[R] !== void 0), S;
|
|
5943
5943
|
}, {});
|
|
5944
5944
|
return F.filter((S) => v ? C[S.id] === !0 : !0).sort((S, R) => {
|
|
5945
|
-
const A = S,
|
|
5945
|
+
const A = S, _ = R;
|
|
5946
5946
|
return Or(A.label).localeCompare(
|
|
5947
|
-
Or(
|
|
5947
|
+
Or(_.label)
|
|
5948
5948
|
);
|
|
5949
5949
|
}).map((S, R) => {
|
|
5950
|
-
const A = S,
|
|
5950
|
+
const A = S, _ = C[A.id] === !0, w = v ? !1 : y && !Ih(y, A) || _;
|
|
5951
5951
|
return /* @__PURE__ */ s(
|
|
5952
5952
|
"div",
|
|
5953
5953
|
{
|
|
@@ -5955,8 +5955,8 @@ const gs = /* @__PURE__ */ la(Th), bl = Mt(
|
|
|
5955
5955
|
display: w ? "none" : "block",
|
|
5956
5956
|
paddingTop: 5,
|
|
5957
5957
|
paddingBottom: 15,
|
|
5958
|
-
backgroundColor:
|
|
5959
|
-
fontWeight:
|
|
5958
|
+
backgroundColor: _ ? "#f0f0f0" : void 0,
|
|
5959
|
+
fontWeight: _ ? "bold" : void 0
|
|
5960
5960
|
},
|
|
5961
5961
|
children: /* @__PURE__ */ s("div", { style: { paddingLeft: 18, paddingRight: 18 }, children: /* @__PURE__ */ N(
|
|
5962
5962
|
"div",
|
|
@@ -5968,7 +5968,7 @@ const gs = /* @__PURE__ */ la(Th), bl = Mt(
|
|
|
5968
5968
|
},
|
|
5969
5969
|
children: [
|
|
5970
5970
|
/* @__PURE__ */ s("div", { style: { flex: 1 }, children: /* @__PURE__ */ s(Ba, { field: A }, `sf-${R}`) }),
|
|
5971
|
-
|
|
5971
|
+
_ && /* @__PURE__ */ s(
|
|
5972
5972
|
Ue,
|
|
5973
5973
|
{
|
|
5974
5974
|
icon: /* @__PURE__ */ s(ir, {}),
|
|
@@ -5989,10 +5989,10 @@ const gs = /* @__PURE__ */ la(Th), bl = Mt(
|
|
|
5989
5989
|
R
|
|
5990
5990
|
);
|
|
5991
5991
|
});
|
|
5992
|
-
}, h =
|
|
5992
|
+
}, h = E(() => {
|
|
5993
5993
|
const y = l.getFieldsValue(), v = Zn(y);
|
|
5994
5994
|
d(v), i == null || i(y);
|
|
5995
|
-
}, [l, i]), g =
|
|
5995
|
+
}, [l, i]), g = E(
|
|
5996
5996
|
(y) => {
|
|
5997
5997
|
y.key === "Enter" && l.submit();
|
|
5998
5998
|
},
|
|
@@ -6073,7 +6073,7 @@ const wl = (e) => {
|
|
|
6073
6073
|
}, [n]), Ke(() => {
|
|
6074
6074
|
l.current = new Ui(o, i, 1), l.current.parse(), p(l.current._advancedSearchContainer);
|
|
6075
6075
|
}, [i, o, n]);
|
|
6076
|
-
const h =
|
|
6076
|
+
const h = E(
|
|
6077
6077
|
(C) => {
|
|
6078
6078
|
var R;
|
|
6079
6079
|
const S = vr(
|
|
@@ -6083,10 +6083,10 @@ const wl = (e) => {
|
|
|
6083
6083
|
t({ params: S, values: Zn(C) });
|
|
6084
6084
|
},
|
|
6085
6085
|
[t]
|
|
6086
|
-
), g =
|
|
6086
|
+
), g = E(() => {
|
|
6087
6087
|
var C;
|
|
6088
6088
|
(C = u.current) == null || C.submit();
|
|
6089
|
-
}, []), y =
|
|
6089
|
+
}, []), y = E(
|
|
6090
6090
|
(C) => {
|
|
6091
6091
|
var A;
|
|
6092
6092
|
const S = Zn(C);
|
|
@@ -6101,9 +6101,9 @@ const wl = (e) => {
|
|
|
6101
6101
|
m(R);
|
|
6102
6102
|
},
|
|
6103
6103
|
[a]
|
|
6104
|
-
), v =
|
|
6104
|
+
), v = E(
|
|
6105
6105
|
(C, S = {}) => {
|
|
6106
|
-
var R, A,
|
|
6106
|
+
var R, A, _;
|
|
6107
6107
|
if (C) {
|
|
6108
6108
|
const w = { ...S };
|
|
6109
6109
|
Object.entries(S).forEach(([I]) => {
|
|
@@ -6115,7 +6115,7 @@ const wl = (e) => {
|
|
|
6115
6115
|
m(O);
|
|
6116
6116
|
return;
|
|
6117
6117
|
}
|
|
6118
|
-
(A = u.current) == null || A.resetFields(), (
|
|
6118
|
+
(A = u.current) == null || A.resetFields(), (_ = u.current) == null || _.setFieldsValue({}), m([]);
|
|
6119
6119
|
},
|
|
6120
6120
|
[f]
|
|
6121
6121
|
), b = n ? f || vr(a, (F = l.current) == null ? void 0 : F._advancedSearchContainer) : [];
|
|
@@ -6274,7 +6274,7 @@ function Xr(e) {
|
|
|
6274
6274
|
Ke(() => {
|
|
6275
6275
|
F(!1), C.current = new Ui(n, t), C.current.parse(), g(C.current._simpleSearchContainer), v(C.current._advancedSearchContainer);
|
|
6276
6276
|
}, [t, n]);
|
|
6277
|
-
const
|
|
6277
|
+
const _ = A(), w = (I) => {
|
|
6278
6278
|
var k;
|
|
6279
6279
|
const { limit: x, offset: P } = I;
|
|
6280
6280
|
delete I.offset, delete I.limit;
|
|
@@ -6283,7 +6283,7 @@ function Xr(e) {
|
|
|
6283
6283
|
(k = C.current) == null ? void 0 : k._advancedSearchContainer
|
|
6284
6284
|
);
|
|
6285
6285
|
o({ params: D, offset: P, limit: x, searchValues: I });
|
|
6286
|
-
}, O =
|
|
6286
|
+
}, O = E(() => {
|
|
6287
6287
|
if (!h || !y)
|
|
6288
6288
|
return !1;
|
|
6289
6289
|
const I = h.rows.reduce(
|
|
@@ -6313,7 +6313,7 @@ function Xr(e) {
|
|
|
6313
6313
|
onFinish: w,
|
|
6314
6314
|
initialValues: { offset: a, limit: l },
|
|
6315
6315
|
children: [
|
|
6316
|
-
|
|
6316
|
+
_,
|
|
6317
6317
|
b && m && /* @__PURE__ */ s(_h, { onLimitChange: c }),
|
|
6318
6318
|
/* @__PURE__ */ s(
|
|
6319
6319
|
Rh,
|
|
@@ -6349,7 +6349,7 @@ function Xr(e) {
|
|
|
6349
6349
|
function xl({
|
|
6350
6350
|
useLocalState: e = !1
|
|
6351
6351
|
}) {
|
|
6352
|
-
const t = Rg() && !e, n = wn(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, p] = T(0), [u, f] = T(void 0), [m, h] = T([]), [g, y] = T({}), [v, b] = T(), [F, C] = T([]), [S, R] = T(), [A,
|
|
6352
|
+
const t = Rg() && !e, n = wn(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, p] = T(0), [u, f] = T(void 0), [m, h] = T([]), [g, y] = T({}), [v, b] = T(), [F, C] = T([]), [S, R] = T(), [A, _] = T(0), [w, O] = T(), [I, x] = T(1), [P, D] = T(hn), [k, L] = T(Ct);
|
|
6353
6353
|
return t ? {
|
|
6354
6354
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
6355
6355
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -6419,7 +6419,7 @@ function xl({
|
|
|
6419
6419
|
searchQuery: S,
|
|
6420
6420
|
setSearchQuery: R,
|
|
6421
6421
|
totalItems: A,
|
|
6422
|
-
setTotalItems:
|
|
6422
|
+
setTotalItems: _,
|
|
6423
6423
|
isActive: void 0,
|
|
6424
6424
|
order: w,
|
|
6425
6425
|
setOrder: O,
|
|
@@ -6445,7 +6445,7 @@ const ys = () => {
|
|
|
6445
6445
|
function Sl({
|
|
6446
6446
|
tableRef: e
|
|
6447
6447
|
} = {}) {
|
|
6448
|
-
const t = K({}), n = K(), r =
|
|
6448
|
+
const t = K({}), n = K(), r = E(() => {
|
|
6449
6449
|
t.current = {}, n.current = {};
|
|
6450
6450
|
}, []);
|
|
6451
6451
|
return {
|
|
@@ -6497,7 +6497,7 @@ const rr = ({
|
|
|
6497
6497
|
V.getHandler().readObjects
|
|
6498
6498
|
), [b, F] = Be(
|
|
6499
6499
|
V.getHandler().parseConditions
|
|
6500
|
-
), C = ys(), S = K({}), R =
|
|
6500
|
+
), C = ys(), S = K({}), R = E(
|
|
6501
6501
|
(x, P) => P ? o == null ? void 0 : o.some(
|
|
6502
6502
|
(D) => JSON.stringify(x[D]) !== JSON.stringify(P[D])
|
|
6503
6503
|
) : !0,
|
|
@@ -6506,13 +6506,13 @@ const rr = ({
|
|
|
6506
6506
|
le(() => {
|
|
6507
6507
|
i === !1 && w(), (i === void 0 || i === !0) && !C && w(), (i === void 0 || i === !0) && C && O();
|
|
6508
6508
|
}, [i, C]);
|
|
6509
|
-
const A =
|
|
6509
|
+
const A = E(() => {
|
|
6510
6510
|
var D, k;
|
|
6511
6511
|
if (!c)
|
|
6512
6512
|
return !1;
|
|
6513
6513
|
const x = ((D = c.fields_in_conditions) == null ? void 0 : D.colors) || [], P = ((k = c.fields_in_conditions) == null ? void 0 : k.status) || [];
|
|
6514
6514
|
return x.some((L) => o == null ? void 0 : o.includes(L)) || P.some((L) => o == null ? void 0 : o.includes(L));
|
|
6515
|
-
}, [c, o]),
|
|
6515
|
+
}, [c, o]), _ = E(async () => {
|
|
6516
6516
|
var P, D;
|
|
6517
6517
|
if (!(o != null && o.length) || !h)
|
|
6518
6518
|
return;
|
|
@@ -6571,7 +6571,7 @@ const rr = ({
|
|
|
6571
6571
|
]);
|
|
6572
6572
|
le(() => () => {
|
|
6573
6573
|
v(), F();
|
|
6574
|
-
}, []), Ke(() => ((o == null ? void 0 : o.length) && h && (
|
|
6574
|
+
}, []), Ke(() => ((o == null ? void 0 : o.length) && h && (_(), m.current = setInterval(_, Oh)), () => {
|
|
6575
6575
|
m.current && (clearInterval(m.current), m.current = null);
|
|
6576
6576
|
}), [
|
|
6577
6577
|
o,
|
|
@@ -6581,15 +6581,15 @@ const rr = ({
|
|
|
6581
6581
|
r,
|
|
6582
6582
|
h
|
|
6583
6583
|
]);
|
|
6584
|
-
const w =
|
|
6584
|
+
const w = E(() => {
|
|
6585
6585
|
g(!1), m.current && (clearInterval(m.current), m.current = null), v(), F();
|
|
6586
|
-
}, [v, F]), O =
|
|
6586
|
+
}, [v, F]), O = E(() => {
|
|
6587
6587
|
g(!0);
|
|
6588
6588
|
}, []);
|
|
6589
6589
|
le(() => () => {
|
|
6590
6590
|
S.current = {};
|
|
6591
6591
|
}, []);
|
|
6592
|
-
const I =
|
|
6592
|
+
const I = E(() => {
|
|
6593
6593
|
S.current = {};
|
|
6594
6594
|
}, []);
|
|
6595
6595
|
return { pause: w, resume: O, clear: I };
|
|
@@ -6615,7 +6615,7 @@ const rr = ({
|
|
|
6615
6615
|
context: r,
|
|
6616
6616
|
fields: m
|
|
6617
6617
|
})
|
|
6618
|
-
), [
|
|
6618
|
+
), [_, w] = Be(
|
|
6619
6619
|
V.getHandler().parseConditions
|
|
6620
6620
|
), O = ys();
|
|
6621
6621
|
le(() => {
|
|
@@ -6632,13 +6632,13 @@ const rr = ({
|
|
|
6632
6632
|
const H = Object.entries(m).filter(([B, j]) => j.is_function === !0).map(([B]) => B);
|
|
6633
6633
|
u(H.length > 0), f.current = H;
|
|
6634
6634
|
}, [m]);
|
|
6635
|
-
const I =
|
|
6635
|
+
const I = E(() => {
|
|
6636
6636
|
var j, X;
|
|
6637
6637
|
if (!t)
|
|
6638
6638
|
return !1;
|
|
6639
6639
|
const H = ((j = t.fields_in_conditions) == null ? void 0 : j.colors) || [], B = ((X = t.fields_in_conditions) == null ? void 0 : X.status) || [];
|
|
6640
6640
|
return H.some((W) => f.current.includes(W)) || B.some((W) => f.current.includes(W));
|
|
6641
|
-
}, [t]), x =
|
|
6641
|
+
}, [t]), x = E(async () => {
|
|
6642
6642
|
if (!p || g.size === 0 || !o || !f.current.length || !a)
|
|
6643
6643
|
return;
|
|
6644
6644
|
const H = Array.from(g).filter(
|
|
@@ -6670,7 +6670,7 @@ const rr = ({
|
|
|
6670
6670
|
Ke(() => {
|
|
6671
6671
|
g.size !== 0 && x();
|
|
6672
6672
|
}, [g, x]);
|
|
6673
|
-
const P =
|
|
6673
|
+
const P = E(
|
|
6674
6674
|
(H) => {
|
|
6675
6675
|
!H || H.length === 0 || (y((B) => {
|
|
6676
6676
|
const j = new Set(B);
|
|
@@ -6680,7 +6680,7 @@ const rr = ({
|
|
|
6680
6680
|
}, 100));
|
|
6681
6681
|
},
|
|
6682
6682
|
[p, o, a, x]
|
|
6683
|
-
), D =
|
|
6683
|
+
), D = E(
|
|
6684
6684
|
async (H) => {
|
|
6685
6685
|
var X;
|
|
6686
6686
|
if (i == null || i(H), H.length === 0 || !f.current.some(
|
|
@@ -6691,7 +6691,7 @@ const rr = ({
|
|
|
6691
6691
|
treeOoui: a
|
|
6692
6692
|
});
|
|
6693
6693
|
try {
|
|
6694
|
-
const W = await
|
|
6694
|
+
const W = await _({
|
|
6695
6695
|
conditions: j,
|
|
6696
6696
|
values: B,
|
|
6697
6697
|
context: r
|
|
@@ -6707,11 +6707,11 @@ const rr = ({
|
|
|
6707
6707
|
a,
|
|
6708
6708
|
l,
|
|
6709
6709
|
c,
|
|
6710
|
-
|
|
6710
|
+
_,
|
|
6711
6711
|
r,
|
|
6712
6712
|
n
|
|
6713
6713
|
]
|
|
6714
|
-
), k =
|
|
6714
|
+
), k = E(() => {
|
|
6715
6715
|
var j, X;
|
|
6716
6716
|
const H = ((j = n == null ? void 0 : n.current) == null ? void 0 : j.getVisibleRows()) || [];
|
|
6717
6717
|
if (H.length === 0 || b.current.length === 0)
|
|
@@ -6725,18 +6725,18 @@ const rr = ({
|
|
|
6725
6725
|
) : !1;
|
|
6726
6726
|
}).filter(Boolean);
|
|
6727
6727
|
B.length > 0 && (B.forEach((W) => v.current.delete(W.id)), D(B), (X = n == null ? void 0 : n.current) == null || X.updateRows(B));
|
|
6728
|
-
}, [n, D]), L =
|
|
6728
|
+
}, [n, D]), L = E((H, B) => f.current.includes(B) ? !b.current.find((j) => j.id === (H == null ? void 0 : H.id)) : !1, []);
|
|
6729
6729
|
Ke(() => (p && C && (k(), F.current = setInterval(
|
|
6730
6730
|
k,
|
|
6731
6731
|
Dh
|
|
6732
6732
|
)), () => {
|
|
6733
6733
|
F.current && (clearInterval(F.current), F.current = null);
|
|
6734
6734
|
}), [p, C, k, c]);
|
|
6735
|
-
const $ =
|
|
6735
|
+
const $ = E(() => {
|
|
6736
6736
|
S(!1), F.current && (clearInterval(F.current), F.current = null), A(), w();
|
|
6737
|
-
}, [A, w]), U =
|
|
6737
|
+
}, [A, w]), U = E(() => {
|
|
6738
6738
|
h && S(!0);
|
|
6739
|
-
}, [h]), M =
|
|
6739
|
+
}, [h]), M = E((H) => {
|
|
6740
6740
|
if (!H || H.length === 0)
|
|
6741
6741
|
return;
|
|
6742
6742
|
const B = [...b.current];
|
|
@@ -6920,7 +6920,7 @@ const Mh = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(Il,
|
|
|
6920
6920
|
onItemClick: t,
|
|
6921
6921
|
onOpenChange: n
|
|
6922
6922
|
}) => {
|
|
6923
|
-
const [r, o] = T(!1), [i, a] = T(!1), { t: l } = ye(), [c, d] = T(), p =
|
|
6923
|
+
const [r, o] = T(!1), [i, a] = T(!1), { t: l } = ye(), [c, d] = T(), p = E(async () => {
|
|
6924
6924
|
const {
|
|
6925
6925
|
actionItems: u = [],
|
|
6926
6926
|
relateItems: f = [],
|
|
@@ -7005,9 +7005,9 @@ const Mh = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(Il,
|
|
|
7005
7005
|
V.getHandler().getView
|
|
7006
7006
|
), [g, y] = Be(
|
|
7007
7007
|
V.getHandler().readObjects
|
|
7008
|
-
), v =
|
|
7008
|
+
), v = E(() => {
|
|
7009
7009
|
h(), y();
|
|
7010
|
-
}, [h, y]), b =
|
|
7010
|
+
}, [h, y]), b = E(async () => {
|
|
7011
7011
|
var A;
|
|
7012
7012
|
const C = await m({
|
|
7013
7013
|
model: n,
|
|
@@ -7112,7 +7112,7 @@ const dw = Object.values(mn), Bh = (e) => {
|
|
|
7112
7112
|
o && /* @__PURE__ */ s(Zr, { id: t.id, model: t.model })
|
|
7113
7113
|
] }) : /* @__PURE__ */ s(me, {});
|
|
7114
7114
|
}, Uh = (e) => {
|
|
7115
|
-
const { value: t, context: n, selectionValues: r } = e, [o, i] = T(), [a, l] = T(!1), [c, d] = t ? t.split(",") : [], p = parseInt(d), u =
|
|
7115
|
+
const { value: t, context: n, selectionValues: r } = e, [o, i] = T(), [a, l] = T(!1), [c, d] = t ? t.split(",") : [], p = parseInt(d), u = E(async () => {
|
|
7116
7116
|
if (!t || t && o && a)
|
|
7117
7117
|
return;
|
|
7118
7118
|
l(!0);
|
|
@@ -7159,7 +7159,7 @@ const Yh = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(Rl,
|
|
|
7159
7159
|
), { getFieldValue: o } = de(Qe) || {}, { ooui: i, value: a } = e, [l, c] = T("default");
|
|
7160
7160
|
let d = a, p = cr, u = a;
|
|
7161
7161
|
i.selectionValues.size ? d = i.selectionValues.get(a) : Array.isArray(a) ? (u = a[0], d = a[1]) : i.fieldType === "boolean" && (d = a ? Gh(i.label) : `${t("not")} ${i.label.toLowerCase()}`, p = Ru);
|
|
7162
|
-
const f =
|
|
7162
|
+
const f = E(async () => {
|
|
7163
7163
|
var h, g;
|
|
7164
7164
|
if (i.colorField)
|
|
7165
7165
|
if (i.fieldType === "many2one" && ((h = i.raw_props) != null && h.relation)) {
|
|
@@ -7239,7 +7239,7 @@ const Yh = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(Rl,
|
|
|
7239
7239
|
} else
|
|
7240
7240
|
a([]);
|
|
7241
7241
|
}, [e]);
|
|
7242
|
-
const f =
|
|
7242
|
+
const f = E(
|
|
7243
7243
|
(y) => {
|
|
7244
7244
|
t && t(y.join(";"));
|
|
7245
7245
|
},
|
|
@@ -7472,7 +7472,7 @@ const Yh = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(Rl,
|
|
|
7472
7472
|
ooui: n,
|
|
7473
7473
|
context: r
|
|
7474
7474
|
}) => {
|
|
7475
|
-
const [o, i] = T([]), [a, l] = T(!1), { relation: c, field: d } = n, p =
|
|
7475
|
+
const [o, i] = T([]), [a, l] = T(!1), { relation: c, field: d } = n, p = E(async () => {
|
|
7476
7476
|
try {
|
|
7477
7477
|
l(!0);
|
|
7478
7478
|
const f = await V.getHandler().search({
|
|
@@ -7571,7 +7571,7 @@ function pg(e, t) {
|
|
|
7571
7571
|
nameSearch: u,
|
|
7572
7572
|
filterType: f = "side",
|
|
7573
7573
|
onChangeTreeType: m
|
|
7574
|
-
} = e, h = K(null), g = K([]), y = K(!1), { showErrorNotification: v } = yt(), [b, F] = T(), [C, S] = T(!1), { t: R } = ye(), A = K(null),
|
|
7574
|
+
} = e, h = K(null), g = K([]), y = K(!1), { showErrorNotification: v } = yt(), [b, F] = T(), [C, S] = T(!1), { t: R } = ye(), A = K(null), _ = La({
|
|
7575
7575
|
elementRef: A,
|
|
7576
7576
|
offset: ug
|
|
7577
7577
|
}), { treeView: w, formView: O, loading: I } = ss({
|
|
@@ -7668,10 +7668,10 @@ function pg(e, t) {
|
|
|
7668
7668
|
} = is({ key: Ye }), ke = te(
|
|
7669
7669
|
() => Zt(B || [], a),
|
|
7670
7670
|
[a, B]
|
|
7671
|
-
), ot =
|
|
7671
|
+
), ot = E(() => {
|
|
7672
7672
|
const He = `${JSON.stringify(z ? a : ke)}-${z}`;
|
|
7673
7673
|
return He !== Y.current ? (Y.current = He, !0) : !1;
|
|
7674
|
-
}, [a, ke, z]), q =
|
|
7674
|
+
}, [a, ke, z]), q = E(async () => {
|
|
7675
7675
|
if (!z && !be.current) {
|
|
7676
7676
|
be.current = !0, F(void 0), oe(0);
|
|
7677
7677
|
try {
|
|
@@ -7776,17 +7776,17 @@ function pg(e, t) {
|
|
|
7776
7776
|
S,
|
|
7777
7777
|
De
|
|
7778
7778
|
]
|
|
7779
|
-
), re =
|
|
7779
|
+
), re = E(
|
|
7780
7780
|
(ve) => {
|
|
7781
7781
|
k == null || k(ve), p == null || p(ve.map((He) => He.id));
|
|
7782
7782
|
},
|
|
7783
7783
|
[p, k]
|
|
7784
|
-
), Ee =
|
|
7784
|
+
), Ee = E(
|
|
7785
7785
|
(ve) => {
|
|
7786
7786
|
k == null || k(ve.map((He) => ({ id: He }))), p == null || p(ve);
|
|
7787
7787
|
},
|
|
7788
7788
|
[p, k]
|
|
7789
|
-
), $e =
|
|
7789
|
+
), $e = E(
|
|
7790
7790
|
async ({
|
|
7791
7791
|
startRow: ve,
|
|
7792
7792
|
endRow: He,
|
|
@@ -7812,7 +7812,7 @@ function pg(e, t) {
|
|
|
7812
7812
|
q,
|
|
7813
7813
|
z
|
|
7814
7814
|
]
|
|
7815
|
-
), Le =
|
|
7815
|
+
), Le = E((ve) => {
|
|
7816
7816
|
var He, Ze, fe, Re;
|
|
7817
7817
|
if (Fe.current[(Ze = (He = ve.node) == null ? void 0 : He.data) == null ? void 0 : Ze.id])
|
|
7818
7818
|
return { color: Fe.current[(Re = (fe = ve.node) == null ? void 0 : fe.data) == null ? void 0 : Re.id] };
|
|
@@ -7824,7 +7824,7 @@ function pg(e, t) {
|
|
|
7824
7824
|
// eslint-disable-next-line @typescript-eslint/require-array-sort-compare
|
|
7825
7825
|
[["id", "in", ut.sort()]]
|
|
7826
7826
|
) : void 0
|
|
7827
|
-
}), ct =
|
|
7827
|
+
}), ct = E(async () => {
|
|
7828
7828
|
let ve = !1;
|
|
7829
7829
|
(U == null ? void 0 : U.length) === 0 ? ve = !0 : ve = !1;
|
|
7830
7830
|
const He = async () => {
|
|
@@ -7863,7 +7863,7 @@ function pg(e, t) {
|
|
|
7863
7863
|
k,
|
|
7864
7864
|
R,
|
|
7865
7865
|
b
|
|
7866
|
-
]), Bt =
|
|
7866
|
+
]), Bt = E(() => $, [$]), Ut = te(() => Me ? /* @__PURE__ */ s(ls, { aggregates: pt, isLoading: St }) : null, [pt, St, Me]), ft = E((ve) => /* @__PURE__ */ s(or, { color: ve, style: { marginLeft: 7 } }), []), mt = E(
|
|
7867
7867
|
(ve) => {
|
|
7868
7868
|
var He;
|
|
7869
7869
|
return (He = pe.current) == null ? void 0 : He[ve.id];
|
|
@@ -7879,7 +7879,7 @@ function pg(e, t) {
|
|
|
7879
7879
|
{
|
|
7880
7880
|
readonly: !1,
|
|
7881
7881
|
ref: h,
|
|
7882
|
-
height:
|
|
7882
|
+
height: _,
|
|
7883
7883
|
columns: Ge,
|
|
7884
7884
|
onRequestData: $e,
|
|
7885
7885
|
onRowDoubleClick: i,
|
|
@@ -7905,7 +7905,7 @@ function pg(e, t) {
|
|
|
7905
7905
|
}, [
|
|
7906
7906
|
qe,
|
|
7907
7907
|
he,
|
|
7908
|
-
|
|
7908
|
+
_,
|
|
7909
7909
|
Ge,
|
|
7910
7910
|
$e,
|
|
7911
7911
|
i,
|
|
@@ -7932,7 +7932,7 @@ function pg(e, t) {
|
|
|
7932
7932
|
), He = Sn.current && !P;
|
|
7933
7933
|
ve && (He || f === "top") && ln(), xn.current = B, Sn.current = P;
|
|
7934
7934
|
}, [B, P]);
|
|
7935
|
-
const ln =
|
|
7935
|
+
const ln = E(async () => {
|
|
7936
7936
|
var ve;
|
|
7937
7937
|
re([]), Te(), tt(), Y.current = void 0, S(!1), (ve = h == null ? void 0 : h.current) == null || ve.refresh(), Pe();
|
|
7938
7938
|
}, [
|
|
@@ -7948,10 +7948,10 @@ function pg(e, t) {
|
|
|
7948
7948
|
const Cn = te(
|
|
7949
7949
|
() => ({
|
|
7950
7950
|
overflow: "hidden",
|
|
7951
|
-
height: `${
|
|
7951
|
+
height: `${_}px`,
|
|
7952
7952
|
...l ? {} : { display: "none" }
|
|
7953
7953
|
}),
|
|
7954
|
-
[
|
|
7954
|
+
[_, l]
|
|
7955
7955
|
), Dt = te(
|
|
7956
7956
|
() => ({
|
|
7957
7957
|
fields: { ...O == null ? void 0 : O.fields, ...w == null ? void 0 : w.fields },
|
|
@@ -7973,7 +7973,7 @@ function pg(e, t) {
|
|
|
7973
7973
|
w == null ? void 0 : w.search_fields,
|
|
7974
7974
|
H
|
|
7975
7975
|
]
|
|
7976
|
-
), cn =
|
|
7976
|
+
), cn = E(() => {
|
|
7977
7977
|
var ve;
|
|
7978
7978
|
re([]), (ve = h.current) == null || ve.unselectAll(), W == null || W(void 0), M == null || M([]), j == null || j(void 0);
|
|
7979
7979
|
}, [
|
|
@@ -7981,7 +7981,7 @@ function pg(e, t) {
|
|
|
7981
7981
|
W,
|
|
7982
7982
|
M,
|
|
7983
7983
|
j
|
|
7984
|
-
]), Wn =
|
|
7984
|
+
]), Wn = E(
|
|
7985
7985
|
({ params: ve, searchValues: He }) => {
|
|
7986
7986
|
var Ze;
|
|
7987
7987
|
re([]), (Ze = h.current) == null || Ze.unselectAll(), W == null || W(void 0), M == null || M(ve), j == null || j(He);
|
|
@@ -8010,10 +8010,10 @@ function pg(e, t) {
|
|
|
8010
8010
|
w == null ? void 0 : w.search_fields,
|
|
8011
8011
|
H
|
|
8012
8012
|
]
|
|
8013
|
-
), Gn =
|
|
8013
|
+
), Gn = E(
|
|
8014
8014
|
() => D == null ? void 0 : D(!1),
|
|
8015
8015
|
[D]
|
|
8016
|
-
), nn =
|
|
8016
|
+
), nn = E(
|
|
8017
8017
|
({ params: ve, values: He }) => {
|
|
8018
8018
|
var Ze;
|
|
8019
8019
|
re([]), (Ze = h.current) == null || Ze.unselectAll(), W == null || W(void 0), M == null || M(ve), j == null || j(He), D == null || D(!1);
|
|
@@ -8145,7 +8145,7 @@ const Dl = Mt(pg), Ri = (e, t = "14px -apple-system") => {
|
|
|
8145
8145
|
context: S,
|
|
8146
8146
|
readonly: R,
|
|
8147
8147
|
onSelectAllRecords: A
|
|
8148
|
-
} = e,
|
|
8148
|
+
} = e, _ = K(null), [w, O] = T([]), I = K(!1), [x, P] = T(), { t: D } = ye(), k = K(r), L = de(
|
|
8149
8149
|
Et
|
|
8150
8150
|
), { title: $ = void 0, setTitle: U = void 0 } = (C ? L : {}) || {}, M = tn(
|
|
8151
8151
|
jt.FEATURE_MANY2ONE_SORT
|
|
@@ -8163,7 +8163,7 @@ const Dl = Mt(pg), Ri = (e, t = "14px -apple-system") => {
|
|
|
8163
8163
|
Lt(t, () => ({
|
|
8164
8164
|
unselectAll: () => {
|
|
8165
8165
|
var G;
|
|
8166
|
-
(G =
|
|
8166
|
+
(G = _.current) == null || G.unselectAll();
|
|
8167
8167
|
}
|
|
8168
8168
|
})), le(() => {
|
|
8169
8169
|
const G = Qt(i);
|
|
@@ -8237,7 +8237,7 @@ const Dl = Mt(pg), Ri = (e, t = "14px -apple-system") => {
|
|
|
8237
8237
|
/* @__PURE__ */ s(
|
|
8238
8238
|
gd,
|
|
8239
8239
|
{
|
|
8240
|
-
ref:
|
|
8240
|
+
ref: _,
|
|
8241
8241
|
height: Q,
|
|
8242
8242
|
columns: Z.columns,
|
|
8243
8243
|
dataSource: w,
|
|
@@ -8296,13 +8296,13 @@ const kl = (e) => {
|
|
|
8296
8296
|
setLimit: S,
|
|
8297
8297
|
searchParams: R = [],
|
|
8298
8298
|
setSearchValues: A,
|
|
8299
|
-
clearSelection:
|
|
8300
|
-
} = e, [w, O] = T(!1), [I, x] = T(!1), [P, D] = T(), [k, L] = T(1), [$, U] = T(0), [M, H] = T(), [B, j] = T([]), [X, W] = T(void 0), [ce, Z] = T(void 0), Q = K(C || Ct), oe = K([]), G =
|
|
8299
|
+
clearSelection: _
|
|
8300
|
+
} = e, [w, O] = T(!1), [I, x] = T(!1), [P, D] = T(), [k, L] = T(1), [$, U] = T(0), [M, H] = T(), [B, j] = T([]), [X, W] = T(void 0), [ce, Z] = T(void 0), Q = K(C || Ct), oe = K([]), G = E(
|
|
8301
8301
|
(pe) => {
|
|
8302
8302
|
y == null || y([...pe]), j([...pe]);
|
|
8303
8303
|
},
|
|
8304
8304
|
[y]
|
|
8305
|
-
), se =
|
|
8305
|
+
), se = E(() => v || B, [v, B]), ie = E(async () => {
|
|
8306
8306
|
const pe = await V.getHandler().nameSearch({
|
|
8307
8307
|
model: t,
|
|
8308
8308
|
payload: l,
|
|
@@ -8343,7 +8343,7 @@ const kl = (e) => {
|
|
|
8343
8343
|
m,
|
|
8344
8344
|
g,
|
|
8345
8345
|
p
|
|
8346
|
-
]), z =
|
|
8346
|
+
]), z = E(
|
|
8347
8347
|
async (pe) => {
|
|
8348
8348
|
const { params: De, newOffset: Te } = pe || {}, _e = Zt(De || R, b), { colors: Pe, status: Ce } = Qt(u), je = {};
|
|
8349
8349
|
Pe && (je.colors = Pe), Ce && (je.status = Ce);
|
|
@@ -8388,10 +8388,10 @@ const kl = (e) => {
|
|
|
8388
8388
|
$,
|
|
8389
8389
|
R
|
|
8390
8390
|
]
|
|
8391
|
-
), ne =
|
|
8391
|
+
), ne = E(
|
|
8392
8392
|
async (pe) => {
|
|
8393
8393
|
try {
|
|
8394
|
-
O(!0), a == null || a(!0), l && !c.current ? await ie() : await z(pe),
|
|
8394
|
+
O(!0), a == null || a(!0), l && !c.current ? await ie() : await z(pe), _ == null || _();
|
|
8395
8395
|
} catch (De) {
|
|
8396
8396
|
D(typeof De == "string" ? De : De.message), O(!1);
|
|
8397
8397
|
} finally {
|
|
@@ -8399,7 +8399,7 @@ const kl = (e) => {
|
|
|
8399
8399
|
}
|
|
8400
8400
|
},
|
|
8401
8401
|
[
|
|
8402
|
-
|
|
8402
|
+
_,
|
|
8403
8403
|
l,
|
|
8404
8404
|
ie,
|
|
8405
8405
|
c,
|
|
@@ -8407,7 +8407,7 @@ const kl = (e) => {
|
|
|
8407
8407
|
r,
|
|
8408
8408
|
a
|
|
8409
8409
|
]
|
|
8410
|
-
), ue =
|
|
8410
|
+
), ue = E(
|
|
8411
8411
|
(pe) => {
|
|
8412
8412
|
if (JSON.stringify(pe) === JSON.stringify(m))
|
|
8413
8413
|
return;
|
|
@@ -8427,7 +8427,7 @@ const kl = (e) => {
|
|
|
8427
8427
|
f == null ? void 0 : f.fields,
|
|
8428
8428
|
G
|
|
8429
8429
|
]
|
|
8430
|
-
), Y =
|
|
8430
|
+
), Y = E(
|
|
8431
8431
|
(pe) => {
|
|
8432
8432
|
const { params: De, searchValues: Te, limit: _e, offset: Pe } = pe;
|
|
8433
8433
|
w || (n == null || n(void 0), r == null || r([]), A == null || A(Te), o == null || o(De), i == null || i(!1), x(!0), D(void 0), L(1), _e && (Q.current = _e, S == null || S(_e)), Pe && U(Pe), ne({
|
|
@@ -8445,12 +8445,12 @@ const kl = (e) => {
|
|
|
8445
8445
|
ne,
|
|
8446
8446
|
S
|
|
8447
8447
|
]
|
|
8448
|
-
), ae =
|
|
8448
|
+
), ae = E(
|
|
8449
8449
|
(pe) => {
|
|
8450
8450
|
O(!0), L(pe), U((pe - 1) * C);
|
|
8451
8451
|
},
|
|
8452
8452
|
[O, C, U, L]
|
|
8453
|
-
), be =
|
|
8453
|
+
), be = E(() => {
|
|
8454
8454
|
w || (n == null || n(void 0), o == null || o([]), A == null || A({}), D(void 0), U(0), L(1), S == null || S(C || Ct));
|
|
8455
8455
|
}, [
|
|
8456
8456
|
w,
|
|
@@ -8459,7 +8459,7 @@ const kl = (e) => {
|
|
|
8459
8459
|
A,
|
|
8460
8460
|
S,
|
|
8461
8461
|
C
|
|
8462
|
-
]), he =
|
|
8462
|
+
]), he = E(
|
|
8463
8463
|
async (pe) => {
|
|
8464
8464
|
const De = pe[(u == null ? void 0 : u.field_parent) || "child_id"], Te = await V.getHandler().readObjects({
|
|
8465
8465
|
model: t,
|
|
@@ -8470,7 +8470,7 @@ const kl = (e) => {
|
|
|
8470
8470
|
return G([...se(), ...Te]), sn(Qt(u), Te);
|
|
8471
8471
|
},
|
|
8472
8472
|
[u, t, d, se, G]
|
|
8473
|
-
), Fe =
|
|
8473
|
+
), Fe = E(async () => await V.getHandler().searchAllIds({
|
|
8474
8474
|
params: Zt(R, b),
|
|
8475
8475
|
model: t,
|
|
8476
8476
|
context: d,
|
|
@@ -8510,7 +8510,7 @@ function yg(e, t) {
|
|
|
8510
8510
|
rootTree: p = !1,
|
|
8511
8511
|
parentContext: u = {},
|
|
8512
8512
|
onChangeSelectedRowKeys: f
|
|
8513
|
-
} = e, [m, h] = T(!1), [g, y] = T(!1), v = K(!1), b = K(null), [F, C] = T(), [S, R] = T(), [A,
|
|
8513
|
+
} = e, [m, h] = T(!1), [g, y] = T(!1), v = K(!1), b = K(null), [F, C] = T(), [S, R] = T(), [A, _] = T(), [w, O] = T(), [I, x] = T(200), P = K(), { height: D } = Gr(), k = de(
|
|
8514
8514
|
vn
|
|
8515
8515
|
), { processAction: L } = k || {}, $ = de(
|
|
8516
8516
|
Et
|
|
@@ -8534,7 +8534,7 @@ function yg(e, t) {
|
|
|
8534
8534
|
setSearchValues: ue = void 0,
|
|
8535
8535
|
limit: Y = Ct,
|
|
8536
8536
|
setLimit: ae = void 0
|
|
8537
|
-
} = (p ? $ : {}) || {}, { showErrorNotification: be } = yt(), he =
|
|
8537
|
+
} = (p ? $ : {}) || {}, { showErrorNotification: be } = yt(), he = E(
|
|
8538
8538
|
(Me) => {
|
|
8539
8539
|
X == null || X(Me.map((ct) => ({ id: ct }))), f == null || f(Me);
|
|
8540
8540
|
},
|
|
@@ -8613,17 +8613,17 @@ function yg(e, t) {
|
|
|
8613
8613
|
model: n,
|
|
8614
8614
|
type: "tree",
|
|
8615
8615
|
context: u
|
|
8616
|
-
})),
|
|
8616
|
+
})), _(Me), R(ct);
|
|
8617
8617
|
};
|
|
8618
8618
|
le(() => {
|
|
8619
8619
|
ke();
|
|
8620
8620
|
}, [n]);
|
|
8621
|
-
const q =
|
|
8621
|
+
const q = E(
|
|
8622
8622
|
(Me) => {
|
|
8623
8623
|
ae == null || ae(Me);
|
|
8624
8624
|
},
|
|
8625
8625
|
[ae]
|
|
8626
|
-
), we =
|
|
8626
|
+
), we = E(
|
|
8627
8627
|
async (Me) => {
|
|
8628
8628
|
const { id: ct } = Me;
|
|
8629
8629
|
P.current || (P.current = await V.getHandler().treeButOpen({
|
|
@@ -8643,7 +8643,7 @@ function yg(e, t) {
|
|
|
8643
8643
|
}));
|
|
8644
8644
|
},
|
|
8645
8645
|
[F, u, L, S]
|
|
8646
|
-
), re =
|
|
8646
|
+
), re = E(
|
|
8647
8647
|
async (Me) => {
|
|
8648
8648
|
const { id: ct } = Me;
|
|
8649
8649
|
if (S != null && S.isExpandable) {
|
|
@@ -8662,13 +8662,13 @@ function yg(e, t) {
|
|
|
8662
8662
|
});
|
|
8663
8663
|
},
|
|
8664
8664
|
[F, A, i, we, S]
|
|
8665
|
-
), Ee =
|
|
8665
|
+
), Ee = E(async () => {
|
|
8666
8666
|
const Me = await Ie();
|
|
8667
8667
|
X == null || X(Me.map((ct) => ({ id: ct }))), f == null || f(Me);
|
|
8668
8668
|
}, [Ie, f, X]), $e = te(() => S != null && S.isExpandable ? D - 160 : D - (I + 240), [D, I, S == null ? void 0 : S.isExpandable]), Le = te(
|
|
8669
8669
|
() => j == null ? void 0 : j.map((Me) => Me.id),
|
|
8670
8670
|
[j]
|
|
8671
|
-
), ut =
|
|
8671
|
+
), ut = E(() => !S || !A ? null : /* @__PURE__ */ N(me, { children: [
|
|
8672
8672
|
/* @__PURE__ */ s(
|
|
8673
8673
|
Xr,
|
|
8674
8674
|
{
|
|
@@ -8775,7 +8775,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8775
8775
|
selectedRowItems: S,
|
|
8776
8776
|
setSearchParams: R,
|
|
8777
8777
|
searchValues: A,
|
|
8778
|
-
searchParams:
|
|
8778
|
+
searchParams: _,
|
|
8779
8779
|
setSearchValues: w,
|
|
8780
8780
|
searchTreeNameSearch: O,
|
|
8781
8781
|
setSearchTreeNameSearch: I,
|
|
@@ -8790,7 +8790,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8790
8790
|
setOrder: H,
|
|
8791
8791
|
limit: B,
|
|
8792
8792
|
setLimit: j
|
|
8793
|
-
} = xl({ useLocalState: !i }), { treeMaxLimit: X } = Jt(), W = Math.min(B, X), [ce, Z] = T(!0), [Q, oe] = T(), [G, se] = T([]), [ie, z] = T(!1), ne = a || O, ue = K(ne), Y = K(
|
|
8793
|
+
} = xl({ useLocalState: !i }), { treeMaxLimit: X } = Jt(), W = Math.min(B, X), [ce, Z] = T(!0), [Q, oe] = T(), [G, se] = T([]), [ie, z] = T(!1), ne = a || O, ue = K(ne), Y = K(_), ae = K(h), be = K(), he = K([]), Fe = K(!1), pe = (r == null ? void 0 : r.fields_in_conditions) !== void 0, De = te(() => Ha({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), [Te, _e] = Be(
|
|
8794
8794
|
V.getHandler().parseConditions
|
|
8795
8795
|
), {
|
|
8796
8796
|
fetchColumnState: Pe,
|
|
@@ -8800,7 +8800,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8800
8800
|
} = is({
|
|
8801
8801
|
key: De,
|
|
8802
8802
|
treeViewFetching: t
|
|
8803
|
-
}), tt =
|
|
8803
|
+
}), tt = E((fe) => {
|
|
8804
8804
|
he.current = he.current.map((Re) => {
|
|
8805
8805
|
const Je = fe.find((it) => it.id === Re.id);
|
|
8806
8806
|
return { ...Re, ...Je };
|
|
@@ -8849,12 +8849,12 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8849
8849
|
), [ut, St] = Be(
|
|
8850
8850
|
V.getHandler().searchAllIds
|
|
8851
8851
|
), pt = te(
|
|
8852
|
-
() => Zt(
|
|
8853
|
-
[c,
|
|
8854
|
-
), Me = te(() => (S == null ? void 0 : S.map((fe) => fe.id)) || [], [S]), ct =
|
|
8852
|
+
() => Zt(_ || [], c),
|
|
8853
|
+
[c, _]
|
|
8854
|
+
), Me = te(() => (S == null ? void 0 : S.map((fe) => fe.id)) || [], [S]), ct = E(() => {
|
|
8855
8855
|
const Re = `${JSON.stringify(ne ? c : pt)}-${ne}`;
|
|
8856
8856
|
return Re !== be.current ? (be.current = Re, !0) : !1;
|
|
8857
|
-
}, [c, pt, ne]), Bt =
|
|
8857
|
+
}, [c, pt, ne]), Bt = E(async () => {
|
|
8858
8858
|
oe(void 0), k(0), Z(!0);
|
|
8859
8859
|
try {
|
|
8860
8860
|
const fe = await re({
|
|
@@ -8878,17 +8878,17 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8878
8878
|
o,
|
|
8879
8879
|
d,
|
|
8880
8880
|
we
|
|
8881
|
-
]), Ut =
|
|
8881
|
+
]), Ut = E(() => b, [b]), ft = E(() => F, [F]), mt = E((fe) => {
|
|
8882
8882
|
var Re, Je, it, dt;
|
|
8883
8883
|
return qe.current[(Je = (Re = fe.node) == null ? void 0 : Re.data) == null ? void 0 : Je.id] ? { color: qe.current[(dt = (it = fe.node) == null ? void 0 : it.data) == null ? void 0 : dt.id] } : {};
|
|
8884
|
-
}, []), Tt =
|
|
8884
|
+
}, []), Tt = E(
|
|
8885
8885
|
(fe) => {
|
|
8886
8886
|
var Re;
|
|
8887
8887
|
return (Re = xe.current) == null ? void 0 : Re[fe.id];
|
|
8888
8888
|
},
|
|
8889
8889
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8890
8890
|
[]
|
|
8891
|
-
), xn =
|
|
8891
|
+
), xn = E(() => {
|
|
8892
8892
|
var fe;
|
|
8893
8893
|
y([]), (fe = l.current) == null || fe.unselectAll(), I == null || I(void 0), R == null || R([]), w == null || w(void 0);
|
|
8894
8894
|
}, [
|
|
@@ -8897,7 +8897,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8897
8897
|
I,
|
|
8898
8898
|
R,
|
|
8899
8899
|
w
|
|
8900
|
-
]), Sn =
|
|
8900
|
+
]), Sn = E(
|
|
8901
8901
|
({ params: fe, searchValues: Re }) => {
|
|
8902
8902
|
var Je;
|
|
8903
8903
|
y([]), (Je = l.current) == null || Je.unselectAll(), I == null || I(void 0), R == null || R(fe), w == null || w(Re);
|
|
@@ -8909,10 +8909,10 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8909
8909
|
R,
|
|
8910
8910
|
w
|
|
8911
8911
|
]
|
|
8912
|
-
), ln =
|
|
8912
|
+
), ln = E(
|
|
8913
8913
|
() => g == null ? void 0 : g(!1),
|
|
8914
8914
|
[g]
|
|
8915
|
-
), Cn =
|
|
8915
|
+
), Cn = E(
|
|
8916
8916
|
({ params: fe, values: Re }) => {
|
|
8917
8917
|
var Je;
|
|
8918
8918
|
y([]), (Je = l.current) == null || Je.unselectAll(), I == null || I(void 0), R == null || R(fe), w == null || w(Re), g == null || g(!1);
|
|
@@ -8954,12 +8954,12 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
8954
8954
|
}
|
|
8955
8955
|
}, [ne]), Ke(() => {
|
|
8956
8956
|
const fe = !gs(
|
|
8957
|
-
|
|
8957
|
+
_,
|
|
8958
8958
|
Y.current
|
|
8959
8959
|
), Re = ae.current && !h;
|
|
8960
|
-
fe && (Re || p === "top") && cn(), Y.current =
|
|
8961
|
-
}, [
|
|
8962
|
-
const Dt =
|
|
8960
|
+
fe && (Re || p === "top") && cn(), Y.current = _, ae.current = h;
|
|
8961
|
+
}, [_, h]);
|
|
8962
|
+
const Dt = E(async () => {
|
|
8963
8963
|
if (!n || t)
|
|
8964
8964
|
return [];
|
|
8965
8965
|
if (Fe.current)
|
|
@@ -9033,7 +9033,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
9033
9033
|
Bt,
|
|
9034
9034
|
Ie,
|
|
9035
9035
|
k
|
|
9036
|
-
]), cn =
|
|
9036
|
+
]), cn = E(async () => {
|
|
9037
9037
|
Ye(), q(), Z(!0), v(0), Pe(), y([]), be.current = void 0, ne || ze(), await Dt();
|
|
9038
9038
|
}, [
|
|
9039
9039
|
Ye,
|
|
@@ -9044,7 +9044,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
9044
9044
|
ne,
|
|
9045
9045
|
Dt,
|
|
9046
9046
|
ze
|
|
9047
|
-
]), Wn =
|
|
9047
|
+
]), Wn = E(
|
|
9048
9048
|
(fe, Re) => {
|
|
9049
9049
|
if (Re === -1) {
|
|
9050
9050
|
u == null || u("infinite");
|
|
@@ -9060,18 +9060,18 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
9060
9060
|
C,
|
|
9061
9061
|
v
|
|
9062
9062
|
]
|
|
9063
|
-
), Vt =
|
|
9064
|
-
params: Zt(
|
|
9063
|
+
), Vt = E(async () => await ut({
|
|
9064
|
+
params: Zt(_, c),
|
|
9065
9065
|
model: o,
|
|
9066
9066
|
context: d,
|
|
9067
9067
|
totalItems: Q
|
|
9068
|
-
}), [ut,
|
|
9068
|
+
}), [ut, _, c, o, d, Q]), Gn = E(async () => {
|
|
9069
9069
|
const fe = await Vt();
|
|
9070
9070
|
y == null || y(fe.map((Re) => ({ id: Re })));
|
|
9071
|
-
}, [Vt, y]), nn = te(() => Me.length === 0 ? "unchecked" : Me.length === W && W > 0 || Me.length === Q ? "checked" : "indeterminate", [Me, W, Q]), Yn =
|
|
9071
|
+
}, [Vt, y]), nn = te(() => Me.length === 0 ? "unchecked" : Me.length === W && W > 0 || Me.length === Q ? "checked" : "indeterminate", [Me, W, Q]), Yn = E(() => {
|
|
9072
9072
|
var fe, Re;
|
|
9073
9073
|
nn === "unchecked" ? ((fe = l.current) == null || fe.selectAll(), y(G.map((Je) => ({ id: Je.id })))) : (y([]), (Re = l.current) == null || Re.unselectAll());
|
|
9074
|
-
}, [l, y, G, nn]), ve =
|
|
9074
|
+
}, [l, y, G, nn]), ve = E(
|
|
9075
9075
|
(fe) => {
|
|
9076
9076
|
H(fe), v(0), C(void 0), U(1);
|
|
9077
9077
|
},
|
|
@@ -9081,7 +9081,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
9081
9081
|
C,
|
|
9082
9082
|
v
|
|
9083
9083
|
]
|
|
9084
|
-
), He =
|
|
9084
|
+
), He = E(
|
|
9085
9085
|
({ id: fe, selected: Re }) => {
|
|
9086
9086
|
y((Je) => {
|
|
9087
9087
|
if (Re) {
|
|
@@ -9092,7 +9092,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
9092
9092
|
});
|
|
9093
9093
|
},
|
|
9094
9094
|
[G, y]
|
|
9095
|
-
), Ze =
|
|
9095
|
+
), Ze = E(
|
|
9096
9096
|
async (fe) => {
|
|
9097
9097
|
var vt;
|
|
9098
9098
|
const Re = fe[(r == null ? void 0 : r.field_parent) || "child_id"];
|
|
@@ -9265,7 +9265,7 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
9265
9265
|
actionViewSortState: S,
|
|
9266
9266
|
onSortChange: R,
|
|
9267
9267
|
tableRef: A,
|
|
9268
|
-
isFieldLoading:
|
|
9268
|
+
isFieldLoading: _,
|
|
9269
9269
|
onChangeTreeType: w,
|
|
9270
9270
|
onFetchChildrenForRecord: O,
|
|
9271
9271
|
childField: I
|
|
@@ -9278,10 +9278,10 @@ const $l = Mt(yg), vg = Ct, bg = (e) => {
|
|
|
9278
9278
|
value: D,
|
|
9279
9279
|
record: k,
|
|
9280
9280
|
column: P,
|
|
9281
|
-
isFieldLoading:
|
|
9281
|
+
isFieldLoading: _
|
|
9282
9282
|
}
|
|
9283
9283
|
)
|
|
9284
|
-
})), [e,
|
|
9284
|
+
})), [e, _]);
|
|
9285
9285
|
return !e || !t ? null : /* @__PURE__ */ s(
|
|
9286
9286
|
yd,
|
|
9287
9287
|
{
|
|
@@ -9342,7 +9342,7 @@ const So = (e) => {
|
|
|
9342
9342
|
), { showErrorNotification: c } = yt();
|
|
9343
9343
|
return le(() => () => {
|
|
9344
9344
|
l();
|
|
9345
|
-
}, []), { handleExpandableRowDoubleClick:
|
|
9345
|
+
}, []), { handleExpandableRowDoubleClick: E(
|
|
9346
9346
|
async (p) => {
|
|
9347
9347
|
const { id: u } = p;
|
|
9348
9348
|
if (!r.current)
|
|
@@ -9400,7 +9400,7 @@ function Fg(e, t) {
|
|
|
9400
9400
|
}), S = te(() => {
|
|
9401
9401
|
if (v)
|
|
9402
9402
|
return Qt(v);
|
|
9403
|
-
}, [v]), { columns: R, strings: A } = Ol(S, d),
|
|
9403
|
+
}, [v]), { columns: R, strings: A } = Ol(S, d), _ = te(() => R || [], [R]), {
|
|
9404
9404
|
searchVisible: w,
|
|
9405
9405
|
searchValues: O,
|
|
9406
9406
|
selectedRowKeys: I,
|
|
@@ -9467,7 +9467,7 @@ function Fg(e, t) {
|
|
|
9467
9467
|
refreshResults: x,
|
|
9468
9468
|
getFields: () => v == null ? void 0 : v.fields
|
|
9469
9469
|
}));
|
|
9470
|
-
const xe = te(() => qe ? /* @__PURE__ */ s(ls, { aggregates: tt, isLoading: rt }) : null, [tt, rt, qe]), Ge =
|
|
9470
|
+
const xe = te(() => qe ? /* @__PURE__ */ s(ls, { aggregates: tt, isLoading: rt }) : null, [tt, rt, qe]), Ge = E(
|
|
9471
9471
|
(q) => /* @__PURE__ */ s(or, { color: q, style: { marginLeft: 7 } }),
|
|
9472
9472
|
[]
|
|
9473
9473
|
), Ye = te(
|
|
@@ -9518,7 +9518,7 @@ function Fg(e, t) {
|
|
|
9518
9518
|
/* @__PURE__ */ s("div", { ref: h, style: Ye, children: F ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ s(
|
|
9519
9519
|
Ml,
|
|
9520
9520
|
{
|
|
9521
|
-
columns:
|
|
9521
|
+
columns: _,
|
|
9522
9522
|
treeOoui: S,
|
|
9523
9523
|
strings: A,
|
|
9524
9524
|
isLoading: Z || se,
|
|
@@ -9608,7 +9608,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
9608
9608
|
le(() => {
|
|
9609
9609
|
R == null || R(y);
|
|
9610
9610
|
}, [y]);
|
|
9611
|
-
const
|
|
9611
|
+
const _ = E(
|
|
9612
9612
|
(O) => {
|
|
9613
9613
|
const { id: I } = O;
|
|
9614
9614
|
p(I);
|
|
@@ -9632,7 +9632,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
9632
9632
|
le(() => {
|
|
9633
9633
|
g.current && !t && y === "infinite" && (A == null || A([])), g.current = t;
|
|
9634
9634
|
}, [t, y]);
|
|
9635
|
-
const w =
|
|
9635
|
+
const w = E((O) => {
|
|
9636
9636
|
v(O), O === "paginated" && (F == null || F(h || Ct)), O === "infinite" && (F == null || F(0));
|
|
9637
9637
|
}, []);
|
|
9638
9638
|
return t ? /* @__PURE__ */ N(Nn, { children: [
|
|
@@ -9655,7 +9655,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
9655
9655
|
formView: i,
|
|
9656
9656
|
treeView: a,
|
|
9657
9657
|
domain: l,
|
|
9658
|
-
onRowClicked:
|
|
9658
|
+
onRowClicked: _,
|
|
9659
9659
|
onChangeTreeType: w
|
|
9660
9660
|
}
|
|
9661
9661
|
),
|
|
@@ -9670,7 +9670,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
9670
9670
|
formView: i,
|
|
9671
9671
|
treeView: a,
|
|
9672
9672
|
domain: l,
|
|
9673
|
-
onRowClicked:
|
|
9673
|
+
onRowClicked: _,
|
|
9674
9674
|
onChangeTreeType: w
|
|
9675
9675
|
}
|
|
9676
9676
|
),
|
|
@@ -9685,7 +9685,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
9685
9685
|
formView: i,
|
|
9686
9686
|
treeView: a,
|
|
9687
9687
|
domain: l,
|
|
9688
|
-
onRowClicked:
|
|
9688
|
+
onRowClicked: _
|
|
9689
9689
|
}
|
|
9690
9690
|
)
|
|
9691
9691
|
] }) : null;
|
|
@@ -9716,7 +9716,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
9716
9716
|
selectedRowItems: S,
|
|
9717
9717
|
searchTreeNameSearch: R,
|
|
9718
9718
|
setSearchTreeNameSearch: A,
|
|
9719
|
-
goToResourceId:
|
|
9719
|
+
goToResourceId: _,
|
|
9720
9720
|
limit: w,
|
|
9721
9721
|
isActive: O,
|
|
9722
9722
|
initialSearchParams: I,
|
|
@@ -9809,7 +9809,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
9809
9809
|
graphIsLoading: Y,
|
|
9810
9810
|
previousView: be,
|
|
9811
9811
|
setPreviousView: he,
|
|
9812
|
-
goToResourceId:
|
|
9812
|
+
goToResourceId: _,
|
|
9813
9813
|
searchValues: Fe,
|
|
9814
9814
|
setSearchValues: pe,
|
|
9815
9815
|
limit: Ge,
|
|
@@ -10017,7 +10017,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
10017
10017
|
}, jn = Mt(_g), Eg = (e) => {
|
|
10018
10018
|
const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: i } = e, [a, l] = T(!1), [c, d] = T(), [p, u] = T(), [f] = Be(
|
|
10019
10019
|
V.getHandler().readForView
|
|
10020
|
-
), m =
|
|
10020
|
+
), m = E(async () => {
|
|
10021
10021
|
l(!0), d(void 0), i && n.push(["id", "in", i]);
|
|
10022
10022
|
try {
|
|
10023
10023
|
const h = await f({
|
|
@@ -10336,7 +10336,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
10336
10336
|
});
|
|
10337
10337
|
R = [...R, ...w];
|
|
10338
10338
|
}
|
|
10339
|
-
const
|
|
10339
|
+
const _ = (await V.getHandler().search({
|
|
10340
10340
|
model: f,
|
|
10341
10341
|
params: R,
|
|
10342
10342
|
fieldsToRetrieve: [g],
|
|
@@ -10346,7 +10346,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
10346
10346
|
let I = O;
|
|
10347
10347
|
return Array.isArray(O) && (I = O[1]), { label: I, value: w.id };
|
|
10348
10348
|
});
|
|
10349
|
-
l(
|
|
10349
|
+
l(_);
|
|
10350
10350
|
} catch (A) {
|
|
10351
10351
|
d(A);
|
|
10352
10352
|
} finally {
|
|
@@ -10357,12 +10357,12 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
10357
10357
|
const A = o.map((w) => R.includes(w.id) ? w.operation === "pendingRemove" ? {
|
|
10358
10358
|
...w,
|
|
10359
10359
|
operation: "pendingLink"
|
|
10360
|
-
} : w : { id: w.id, operation: "pendingRemove" }),
|
|
10361
|
-
R.filter((w) => !
|
|
10360
|
+
} : w : { id: w.id, operation: "pendingRemove" }), _ = A.map((w) => w.id);
|
|
10361
|
+
R.filter((w) => !_.includes(w)).forEach((w) => {
|
|
10362
10362
|
A.push({ id: w, operation: "pendingLink" });
|
|
10363
10363
|
}), b(A);
|
|
10364
10364
|
}, S = (R) => {
|
|
10365
|
-
const { label: A, closable:
|
|
10365
|
+
const { label: A, closable: _, onClose: w } = R, O = (P) => {
|
|
10366
10366
|
P.preventDefault(), P.stopPropagation();
|
|
10367
10367
|
}, I = cr(A), x = I && Sa(I);
|
|
10368
10368
|
return /* @__PURE__ */ s(
|
|
@@ -10370,7 +10370,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
10370
10370
|
{
|
|
10371
10371
|
color: I,
|
|
10372
10372
|
onMouseDown: O,
|
|
10373
|
-
closable:
|
|
10373
|
+
closable: _,
|
|
10374
10374
|
onClose: w,
|
|
10375
10375
|
closeIcon: /* @__PURE__ */ s("span", { style: { color: x && x.text }, children: "X" }),
|
|
10376
10376
|
children: A
|
|
@@ -10600,7 +10600,7 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
10600
10600
|
le(() => {
|
|
10601
10601
|
l === !1 && g(), (l === void 0 || l === !0) && !m && g(), (l === void 0 || l === !0) && m && y();
|
|
10602
10602
|
}, [l, m]);
|
|
10603
|
-
const h =
|
|
10603
|
+
const h = E(async () => {
|
|
10604
10604
|
if (!(!n || !(o != null && o.length) || !d))
|
|
10605
10605
|
try {
|
|
10606
10606
|
const [v] = await u({
|
|
@@ -10635,38 +10635,38 @@ const Tg = Mt(Fg), hn = "legacy", Ag = (e) => {
|
|
|
10635
10635
|
r,
|
|
10636
10636
|
d
|
|
10637
10637
|
]);
|
|
10638
|
-
const g =
|
|
10638
|
+
const g = E(() => {
|
|
10639
10639
|
p(!1), c.current && (clearInterval(c.current), c.current = null), f();
|
|
10640
|
-
}, [f]), y =
|
|
10640
|
+
}, [f]), y = E(() => {
|
|
10641
10641
|
p(!0);
|
|
10642
10642
|
}, []);
|
|
10643
10643
|
return { pause: g, resume: y };
|
|
10644
10644
|
}, Xg = () => {
|
|
10645
|
-
const [e, t] = T({}), n =
|
|
10645
|
+
const [e, t] = T({}), n = E(
|
|
10646
10646
|
(c, d, p = "error") => {
|
|
10647
10647
|
t((u) => ({ ...u, [c]: { message: d, type: p } }));
|
|
10648
10648
|
},
|
|
10649
10649
|
[]
|
|
10650
|
-
), r =
|
|
10650
|
+
), r = E(
|
|
10651
10651
|
(c) => {
|
|
10652
10652
|
var d;
|
|
10653
10653
|
return (d = e[c]) == null ? void 0 : d.message;
|
|
10654
10654
|
},
|
|
10655
10655
|
[e]
|
|
10656
|
-
), o =
|
|
10656
|
+
), o = E(
|
|
10657
10657
|
(c) => {
|
|
10658
10658
|
var d;
|
|
10659
10659
|
return (d = e[c]) == null ? void 0 : d.type;
|
|
10660
10660
|
},
|
|
10661
10661
|
[e]
|
|
10662
|
-
), i =
|
|
10662
|
+
), i = E((c) => {
|
|
10663
10663
|
t((d) => {
|
|
10664
10664
|
const p = { ...d };
|
|
10665
10665
|
return delete p[c], p;
|
|
10666
10666
|
});
|
|
10667
|
-
}, []), a =
|
|
10667
|
+
}, []), a = E(() => {
|
|
10668
10668
|
t({});
|
|
10669
|
-
}, []), l =
|
|
10669
|
+
}, []), l = E((c) => {
|
|
10670
10670
|
const d = {};
|
|
10671
10671
|
c.forEach(({ field: p, message: u, type: f }) => {
|
|
10672
10672
|
d[p] = { message: u, type: f };
|
|
@@ -10706,7 +10706,7 @@ function ey(e, t) {
|
|
|
10706
10706
|
defaultValues: S,
|
|
10707
10707
|
forcedValues: R = {},
|
|
10708
10708
|
parentWidth: A,
|
|
10709
|
-
onMustRefreshParent:
|
|
10709
|
+
onMustRefreshParent: _
|
|
10710
10710
|
} = e, { t: w } = ye(), [O, I] = T(!1), [x, P] = T(), [D, k] = T(), [L] = $t.useForm(), [$, U] = T(), [M, H] = T(), B = de(Vl), [j, X] = T(), [W, ce] = T(!1), Z = K(), Q = K({}), oe = K({}), G = K(!1), se = K(!1), ie = K(!1), ne = (A !== void 0 ? A : j) < Zg, ue = de(Qe), { activeId: Y, getPlainValues: ae } = ue || {}, be = K(!1), he = de(
|
|
10711
10711
|
Et
|
|
10712
10712
|
), {
|
|
@@ -10769,10 +10769,10 @@ function ey(e, t) {
|
|
|
10769
10769
|
}
|
|
10770
10770
|
}, [x]);
|
|
10771
10771
|
const q = (J, ee, ge, Se) => {
|
|
10772
|
-
pe == null || pe(!1), Fe == null || Fe(!1), i == null || i(J, ee, ge, Se), De == null || De(J), be.current && (
|
|
10772
|
+
pe == null || pe(!1), Fe == null || Fe(!1), i == null || i(J, ee, ge, Se), De == null || De(J), be.current && (_ == null || _());
|
|
10773
10773
|
}, we = (J) => {
|
|
10774
10774
|
Fe == null || Fe(!1), d == null || d(J);
|
|
10775
|
-
}, re =
|
|
10775
|
+
}, re = E(() => r || Z.current, [r]), Ee = r || Z.current;
|
|
10776
10776
|
function $e() {
|
|
10777
10777
|
return M;
|
|
10778
10778
|
}
|
|
@@ -10808,7 +10808,7 @@ function ey(e, t) {
|
|
|
10808
10808
|
function Me() {
|
|
10809
10809
|
return re() ? { active_id: re(), active_ids: [re()] } : {};
|
|
10810
10810
|
}
|
|
10811
|
-
const ct =
|
|
10811
|
+
const ct = E(() => ({
|
|
10812
10812
|
id: re(),
|
|
10813
10813
|
active_id: re(),
|
|
10814
10814
|
active_ids: [re()],
|
|
@@ -10828,13 +10828,13 @@ function ey(e, t) {
|
|
|
10828
10828
|
target: ft(M),
|
|
10829
10829
|
fields: M
|
|
10830
10830
|
})
|
|
10831
|
-
).length !== 0, ft =
|
|
10831
|
+
).length !== 0, ft = E(
|
|
10832
10832
|
(J) => {
|
|
10833
10833
|
const ee = L.getFieldsValue(!0);
|
|
10834
10834
|
return An(ee, J);
|
|
10835
10835
|
},
|
|
10836
10836
|
[L]
|
|
10837
|
-
), mt =
|
|
10837
|
+
), mt = E(() => {
|
|
10838
10838
|
const J = {
|
|
10839
10839
|
...ft(M),
|
|
10840
10840
|
...ct()
|
|
@@ -10842,12 +10842,12 @@ function ey(e, t) {
|
|
|
10842
10842
|
for (const ee in J)
|
|
10843
10843
|
J[ee] === void 0 && delete J[ee];
|
|
10844
10844
|
return J;
|
|
10845
|
-
}, [ft, ct, M]), Tt =
|
|
10846
|
-
be.current && (
|
|
10845
|
+
}, [ft, ct, M]), Tt = E(() => {
|
|
10846
|
+
be.current && (_ == null || _()), Fe == null || Fe(!1), o == null || o({ id: re(), values: mt() });
|
|
10847
10847
|
}, [
|
|
10848
10848
|
re,
|
|
10849
10849
|
mt,
|
|
10850
|
-
|
|
10850
|
+
_,
|
|
10851
10851
|
o,
|
|
10852
10852
|
Fe
|
|
10853
10853
|
]), xn = (J, ee) => {
|
|
@@ -10914,7 +10914,7 @@ function ey(e, t) {
|
|
|
10914
10914
|
type: "form",
|
|
10915
10915
|
context: v
|
|
10916
10916
|
});
|
|
10917
|
-
}, Vt =
|
|
10917
|
+
}, Vt = E(
|
|
10918
10918
|
({
|
|
10919
10919
|
values: J,
|
|
10920
10920
|
fields: ee,
|
|
@@ -11028,7 +11028,7 @@ function ey(e, t) {
|
|
|
11028
11028
|
se.current = !1, Fe == null || Fe(!1), I(!1);
|
|
11029
11029
|
}
|
|
11030
11030
|
return { succeed: ee, id: re() };
|
|
11031
|
-
}, He =
|
|
11031
|
+
}, He = E(
|
|
11032
11032
|
({
|
|
11033
11033
|
fields: J,
|
|
11034
11034
|
arch: ee,
|
|
@@ -11048,7 +11048,7 @@ function ey(e, t) {
|
|
|
11048
11048
|
}), Oe;
|
|
11049
11049
|
},
|
|
11050
11050
|
[ct, p]
|
|
11051
|
-
), Ze =
|
|
11051
|
+
), Ze = E(
|
|
11052
11052
|
({
|
|
11053
11053
|
fields: J,
|
|
11054
11054
|
arch: ee,
|
|
@@ -11258,7 +11258,7 @@ function ey(e, t) {
|
|
|
11258
11258
|
operationInProgress: J
|
|
11259
11259
|
});
|
|
11260
11260
|
}
|
|
11261
|
-
const kt =
|
|
11261
|
+
const kt = E(
|
|
11262
11262
|
(J) => {
|
|
11263
11263
|
if (!$)
|
|
11264
11264
|
return;
|
|
@@ -11449,7 +11449,7 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11449
11449
|
/* @__PURE__ */ s(Ae, { style: { paddingLeft: 10 }, children: u })
|
|
11450
11450
|
] });
|
|
11451
11451
|
}
|
|
11452
|
-
const
|
|
11452
|
+
const _ = p * 0.95;
|
|
11453
11453
|
return /* @__PURE__ */ s(zg, { setTitle: f, children: /* @__PURE__ */ s(
|
|
11454
11454
|
Rt,
|
|
11455
11455
|
{
|
|
@@ -11468,7 +11468,7 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11468
11468
|
showFooter: !0,
|
|
11469
11469
|
insideButtonModal: o,
|
|
11470
11470
|
onCancel: i,
|
|
11471
|
-
parentWidth:
|
|
11471
|
+
parentWidth: _,
|
|
11472
11472
|
...c
|
|
11473
11473
|
},
|
|
11474
11474
|
`${d}-${n}-${v}-${b}-${F}-${C}-${r}`
|
|
@@ -11495,7 +11495,7 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11495
11495
|
treeViewProps: void 0,
|
|
11496
11496
|
context: a,
|
|
11497
11497
|
enabled: e
|
|
11498
|
-
}), S = te(() => b != null && b.arch ? wa(b.arch, "infinite") === "1" : !1, [b == null ? void 0 : b.arch]), R =
|
|
11498
|
+
}), S = te(() => b != null && b.arch ? wa(b.arch, "infinite") === "1" : !1, [b == null ? void 0 : b.arch]), R = E(
|
|
11499
11499
|
async (D) => {
|
|
11500
11500
|
m(!0);
|
|
11501
11501
|
try {
|
|
@@ -11507,14 +11507,14 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11507
11507
|
}
|
|
11508
11508
|
},
|
|
11509
11509
|
[n, v]
|
|
11510
|
-
), A =
|
|
11510
|
+
), A = E(() => {
|
|
11511
11511
|
t();
|
|
11512
|
-
}, [t]),
|
|
11512
|
+
}, [t]), _ = E(
|
|
11513
11513
|
({ id: D }) => {
|
|
11514
11514
|
R([D]);
|
|
11515
11515
|
},
|
|
11516
11516
|
[R]
|
|
11517
|
-
), w =
|
|
11517
|
+
), w = E(() => {
|
|
11518
11518
|
if (p.length === 0) {
|
|
11519
11519
|
A();
|
|
11520
11520
|
return;
|
|
@@ -11523,11 +11523,11 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11523
11523
|
}, [p, A, R]), O = te(
|
|
11524
11524
|
() => S ? Dl : $l,
|
|
11525
11525
|
[S]
|
|
11526
|
-
), I =
|
|
11526
|
+
), I = E(() => {
|
|
11527
11527
|
d(!0);
|
|
11528
|
-
}, []), x =
|
|
11528
|
+
}, []), x = E(() => {
|
|
11529
11529
|
d(!1), A();
|
|
11530
|
-
}, [A]), P =
|
|
11530
|
+
}, [A]), P = E(
|
|
11531
11531
|
(D) => {
|
|
11532
11532
|
d(!1), A(), D && R([D]);
|
|
11533
11533
|
},
|
|
@@ -11554,7 +11554,7 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11554
11554
|
treeView: b,
|
|
11555
11555
|
model: r,
|
|
11556
11556
|
nameSearch: o,
|
|
11557
|
-
onRowClicked:
|
|
11557
|
+
onRowClicked: _,
|
|
11558
11558
|
treeScrollY: g * 0.3,
|
|
11559
11559
|
domain: i,
|
|
11560
11560
|
parentContext: a,
|
|
@@ -11605,7 +11605,7 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11605
11605
|
);
|
|
11606
11606
|
return le(() => () => {
|
|
11607
11607
|
t();
|
|
11608
|
-
}, []), { checkPermissions:
|
|
11608
|
+
}, []), { checkPermissions: E(
|
|
11609
11609
|
async (r, o) => {
|
|
11610
11610
|
try {
|
|
11611
11611
|
const i = o.map(async (c) => {
|
|
@@ -11629,23 +11629,23 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11629
11629
|
permissions: t,
|
|
11630
11630
|
enabled: n = !0
|
|
11631
11631
|
}) => {
|
|
11632
|
-
const [r, o] = T(null), [i, a] = T(!0), [l, c] = T(null), { checkPermissions:
|
|
11633
|
-
|
|
11634
|
-
|
|
11632
|
+
const [r, o] = T(null), [i, a] = T(!0), [l, c] = T(null), d = K(!1), { checkPermissions: p, cancelRequest: u } = ty();
|
|
11633
|
+
return Ke(() => !n || !e || !t.length ? void 0 : ((async () => {
|
|
11634
|
+
if (!d.current) {
|
|
11635
|
+
d.current = !0, a(!0), c(null);
|
|
11635
11636
|
try {
|
|
11636
|
-
const
|
|
11637
|
-
o(
|
|
11638
|
-
} catch (
|
|
11639
|
-
const
|
|
11640
|
-
c(
|
|
11637
|
+
const h = await p(e, t);
|
|
11638
|
+
o(h);
|
|
11639
|
+
} catch (h) {
|
|
11640
|
+
const g = h instanceof Error ? h : new Error("Unknown error occurred");
|
|
11641
|
+
c(g), o(null);
|
|
11641
11642
|
} finally {
|
|
11642
|
-
a(!1);
|
|
11643
|
+
a(!1), d.current = !1;
|
|
11643
11644
|
}
|
|
11644
11645
|
}
|
|
11645
|
-
},
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
}), []), te(
|
|
11646
|
+
})(), () => {
|
|
11647
|
+
u();
|
|
11648
|
+
}), [e, t, n]), te(
|
|
11649
11649
|
() => ({
|
|
11650
11650
|
permissions: r,
|
|
11651
11651
|
loading: i,
|
|
@@ -11672,7 +11672,7 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11672
11672
|
id: c,
|
|
11673
11673
|
domain: d
|
|
11674
11674
|
} = r, p = o && !a ? { backgroundColor: Ll.colorPrimaryBg } : void 0, [u, f] = T(!1), [m, h] = T(!1), [g, y] = T(!1), [v, b] = T(), F = K(!1), [C, S] = T(""), R = K(), A = de(Qe), {
|
|
11675
|
-
domain:
|
|
11675
|
+
domain: _,
|
|
11676
11676
|
getFields: w,
|
|
11677
11677
|
getContext: O,
|
|
11678
11678
|
elementHasLostFocus: I,
|
|
@@ -11752,9 +11752,9 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11752
11752
|
}),
|
|
11753
11753
|
fields: w(),
|
|
11754
11754
|
context: O()
|
|
11755
|
-
})),
|
|
11755
|
+
})), _ && _.length > 0 && (P.current = P.current.concat(
|
|
11756
11756
|
Uo({
|
|
11757
|
-
domain:
|
|
11757
|
+
domain: _,
|
|
11758
11758
|
widgetFieldName: c
|
|
11759
11759
|
})
|
|
11760
11760
|
)), k(P.current);
|
|
@@ -11960,10 +11960,10 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
11960
11960
|
vn
|
|
11961
11961
|
), a = de(
|
|
11962
11962
|
Nt
|
|
11963
|
-
), { processAction: l } = i || {}, { openRelate: c } = a || {}, d =
|
|
11963
|
+
), { processAction: l } = i || {}, { openRelate: c } = a || {}, d = E(async () => {
|
|
11964
11964
|
var h;
|
|
11965
11965
|
return await ((h = n.current) == null ? void 0 : h.submitForm());
|
|
11966
|
-
}, [n]), p =
|
|
11966
|
+
}, [n]), p = E(
|
|
11967
11967
|
(h) => {
|
|
11968
11968
|
var g, y, v;
|
|
11969
11969
|
l == null || l({
|
|
@@ -12035,7 +12035,7 @@ const Bn = Mt(ey), Un = (e) => {
|
|
|
12035
12035
|
onItemDuplicated: n,
|
|
12036
12036
|
context: r
|
|
12037
12037
|
}) => {
|
|
12038
|
-
const [o, i] = T(!1), { showErrorNotification: a } = yt(), l =
|
|
12038
|
+
const [o, i] = T(!1), { showErrorNotification: a } = yt(), l = E(async () => {
|
|
12039
12039
|
try {
|
|
12040
12040
|
if (!e)
|
|
12041
12041
|
return;
|
|
@@ -12087,14 +12087,14 @@ function cy(e) {
|
|
|
12087
12087
|
formRef: F,
|
|
12088
12088
|
onRefreshParentValues: C,
|
|
12089
12089
|
currentId: S
|
|
12090
|
-
} = e, { token: R } = ly(), { t: A } = ye(), { activeModel:
|
|
12090
|
+
} = e, { token: R } = ly(), { t: A } = ye(), { activeModel: _ } = Ko(), { permissions: w } = Dr({
|
|
12091
12091
|
model: o,
|
|
12092
12092
|
permissions: ["create", "write", "unlink"],
|
|
12093
12093
|
enabled: !0
|
|
12094
12094
|
}), { permissions: O } = Dr({
|
|
12095
|
-
model:
|
|
12095
|
+
model: _,
|
|
12096
12096
|
permissions: ["write"],
|
|
12097
|
-
enabled: !!
|
|
12097
|
+
enabled: !!_
|
|
12098
12098
|
}), I = (w == null ? void 0 : w.create) ?? !1, x = (w == null ? void 0 : w.write) ?? !1, P = (w == null ? void 0 : w.unlink) ?? !1, D = (O == null ? void 0 : O.write) ?? !1, { duplicatingItem: k, duplicate: L } = ay({
|
|
12099
12099
|
currentId: a === "form" ? S : parseInt(h[0]),
|
|
12100
12100
|
currentModel: o,
|
|
@@ -12353,7 +12353,7 @@ const fy = (e) => {
|
|
|
12353
12353
|
domain: h,
|
|
12354
12354
|
fetchValues: g,
|
|
12355
12355
|
getAllHierarchyValues: y
|
|
12356
|
-
} = p || {}, { t: v } = ye(), [b, F] = T(!1), [C, S] = T(!1), [R, A] = T(), [
|
|
12356
|
+
} = p || {}, { t: v } = ye(), [b, F] = T(!1), [C, S] = T(!1), [R, A] = T(), [_, w] = T(!1), [O, I] = T(!1), [x, P] = T(), [D, k] = T([]), [L, $] = T(!1), [U, M] = T([]), [H, B] = T(), j = K(), [X, W] = T(void 0), ce = K(), {
|
|
12357
12357
|
readOnly: Z,
|
|
12358
12358
|
relation: Q,
|
|
12359
12359
|
context: oe,
|
|
@@ -12368,7 +12368,7 @@ const fy = (e) => {
|
|
|
12368
12368
|
}
|
|
12369
12369
|
ue();
|
|
12370
12370
|
}, [i, a]);
|
|
12371
|
-
const ue =
|
|
12371
|
+
const ue = E(() => {
|
|
12372
12372
|
(a === "form" && i.some((q) => !q.values) || a === "tree" && i.some((q) => !q.treeValues)) && ae();
|
|
12373
12373
|
}, [i, a]);
|
|
12374
12374
|
Ke(() => {
|
|
@@ -12707,7 +12707,7 @@ const fy = (e) => {
|
|
|
12707
12707
|
submitMode: "2many",
|
|
12708
12708
|
values: x == null ? void 0 : x.values,
|
|
12709
12709
|
defaultValues: x == null ? void 0 : x.defaultValues,
|
|
12710
|
-
visible:
|
|
12710
|
+
visible: _,
|
|
12711
12711
|
onSubmitSucceed: qe,
|
|
12712
12712
|
parentContext: { ...m == null ? void 0 : m(), ...oe },
|
|
12713
12713
|
onCancel: (q) => {
|
|
@@ -12789,13 +12789,13 @@ const fy = (e) => {
|
|
|
12789
12789
|
allRowsIds: r,
|
|
12790
12790
|
gridRef: o
|
|
12791
12791
|
}) => {
|
|
12792
|
-
const [i, a] = T([]), l = K(0), c =
|
|
12792
|
+
const [i, a] = T([]), l = K(0), c = E(() => {
|
|
12793
12793
|
var h, g;
|
|
12794
12794
|
let m = !1;
|
|
12795
12795
|
i.length === 0 ? m = !0 : m = !1, m ? (a(r), (h = o.current) == null || h.setSelectedRows(r)) : (a([]), (g = o.current) == null || g.setSelectedRows([]));
|
|
12796
|
-
}, [r, o, i.length]), d =
|
|
12796
|
+
}, [r, o, i.length]), d = E((m) => {
|
|
12797
12797
|
l.current = m;
|
|
12798
|
-
}, []), p =
|
|
12798
|
+
}, []), p = E(() => l.current, []), u = te(() => Qt(e), [e]);
|
|
12799
12799
|
return {
|
|
12800
12800
|
onTreeFetchRows: _t(
|
|
12801
12801
|
async ({
|
|
@@ -12816,7 +12816,7 @@ const fy = (e) => {
|
|
|
12816
12816
|
) : b, S = xu(u), {
|
|
12817
12817
|
items: R,
|
|
12818
12818
|
colors: A,
|
|
12819
|
-
status:
|
|
12819
|
+
status: _
|
|
12820
12820
|
} = await Su({
|
|
12821
12821
|
relation: t,
|
|
12822
12822
|
ids: C,
|
|
@@ -12829,7 +12829,7 @@ const fy = (e) => {
|
|
|
12829
12829
|
finalResultIds: O,
|
|
12830
12830
|
fetchedItems: R,
|
|
12831
12831
|
otherItems: F
|
|
12832
|
-
}), colors: A, status:
|
|
12832
|
+
}), colors: A, status: _ };
|
|
12833
12833
|
},
|
|
12834
12834
|
[n, t, u, e]
|
|
12835
12835
|
),
|
|
@@ -12853,7 +12853,7 @@ const fy = (e) => {
|
|
|
12853
12853
|
const h = e[c];
|
|
12854
12854
|
(!h || (h == null ? void 0 : h.operation) === "original") && l(!1);
|
|
12855
12855
|
}, [c, e]);
|
|
12856
|
-
const p =
|
|
12856
|
+
const p = E(
|
|
12857
12857
|
async ({ id: h }) => {
|
|
12858
12858
|
if (!o)
|
|
12859
12859
|
return;
|
|
@@ -12876,12 +12876,12 @@ const fy = (e) => {
|
|
|
12876
12876
|
} : b);
|
|
12877
12877
|
},
|
|
12878
12878
|
[n, o, e, t, r.fields]
|
|
12879
|
-
), u =
|
|
12879
|
+
), u = E(
|
|
12880
12880
|
(h) => {
|
|
12881
12881
|
l(!0), i(h);
|
|
12882
12882
|
},
|
|
12883
12883
|
[l, i]
|
|
12884
|
-
), f =
|
|
12884
|
+
), f = E(async () => {
|
|
12885
12885
|
if (!o)
|
|
12886
12886
|
return;
|
|
12887
12887
|
const { id: h } = e[c];
|
|
@@ -12897,7 +12897,7 @@ const fy = (e) => {
|
|
|
12897
12897
|
i
|
|
12898
12898
|
]);
|
|
12899
12899
|
return {
|
|
12900
|
-
showFormChangesDialogIfNeeded:
|
|
12900
|
+
showFormChangesDialogIfNeeded: E(
|
|
12901
12901
|
(h) => {
|
|
12902
12902
|
a ? Hn({
|
|
12903
12903
|
t: d,
|
|
@@ -12962,7 +12962,7 @@ const yy = ({
|
|
|
12962
12962
|
}) => {
|
|
12963
12963
|
const { t: a } = ye(), { currentView: l, itemIndex: c, setItemIndex: d } = de(
|
|
12964
12964
|
bn
|
|
12965
|
-
), { showErrorNotification: p } = yt(), u =
|
|
12965
|
+
), { showErrorNotification: p } = yt(), u = E(async () => {
|
|
12966
12966
|
const g = vy({
|
|
12967
12967
|
selectedRowKeys: o,
|
|
12968
12968
|
items: n
|
|
@@ -12986,7 +12986,7 @@ const yy = ({
|
|
|
12986
12986
|
i,
|
|
12987
12987
|
t,
|
|
12988
12988
|
p
|
|
12989
|
-
]), f =
|
|
12989
|
+
]), f = E(async () => {
|
|
12990
12990
|
r(!1);
|
|
12991
12991
|
try {
|
|
12992
12992
|
if (n[c].id > 0) {
|
|
@@ -13008,8 +13008,8 @@ const yy = ({
|
|
|
13008
13008
|
d,
|
|
13009
13009
|
t,
|
|
13010
13010
|
p
|
|
13011
|
-
]), m =
|
|
13012
|
-
return { showRemoveConfirm:
|
|
13011
|
+
]), m = E(async () => l === "form" ? await f() : await u(), [l, f, u]);
|
|
13012
|
+
return { showRemoveConfirm: E(() => {
|
|
13013
13013
|
if (e) {
|
|
13014
13014
|
Ul({
|
|
13015
13015
|
t: a,
|
|
@@ -13045,12 +13045,12 @@ const by = ({
|
|
|
13045
13045
|
formView: d,
|
|
13046
13046
|
context: p
|
|
13047
13047
|
}) => {
|
|
13048
|
-
const [u, f] = T(!1), [m, h] = T(), [g, y] = T(!1), v =
|
|
13048
|
+
const [u, f] = T(!1), [m, h] = T(), [g, y] = T(!1), v = E(async () => {
|
|
13049
13049
|
let S;
|
|
13050
13050
|
t && n && (S = { [t]: n }), e === "form" ? r(() => {
|
|
13051
13051
|
y(!0), h({ defaultValues: S }), f(!0);
|
|
13052
13052
|
}) : (y(!0), h({ defaultValues: S }), f(!0));
|
|
13053
|
-
}, [n, e, t, r]), b =
|
|
13053
|
+
}, [n, e, t, r]), b = E(
|
|
13054
13054
|
(S) => {
|
|
13055
13055
|
if (y(!1), S != null && S.id && (S != null && S.values)) {
|
|
13056
13056
|
const R = o.map((A) => A.id === S.id ? {
|
|
@@ -13064,9 +13064,9 @@ const by = ({
|
|
|
13064
13064
|
},
|
|
13065
13065
|
[o, i]
|
|
13066
13066
|
), F = _t(
|
|
13067
|
-
(S, R, A,
|
|
13067
|
+
(S, R, A, _ = !1) => {
|
|
13068
13068
|
let w;
|
|
13069
|
-
if (
|
|
13069
|
+
if (_)
|
|
13070
13070
|
w = o.concat({
|
|
13071
13071
|
id: S,
|
|
13072
13072
|
operation: "pendingLink",
|
|
@@ -13098,8 +13098,8 @@ const by = ({
|
|
|
13098
13098
|
return;
|
|
13099
13099
|
const { id: R } = S;
|
|
13100
13100
|
let A = o;
|
|
13101
|
-
const
|
|
13102
|
-
(
|
|
13101
|
+
const _ = o.find((w) => w.id === R);
|
|
13102
|
+
(_ == null ? void 0 : _.values) === void 0 && (A = await V.getHandler().readObjects({
|
|
13103
13103
|
model: c,
|
|
13104
13104
|
ids: [S.id],
|
|
13105
13105
|
fields: d.fields,
|
|
@@ -13130,7 +13130,7 @@ const by = ({
|
|
|
13130
13130
|
e === "form" ? t(() => {
|
|
13131
13131
|
c(!0);
|
|
13132
13132
|
}) : c(!0);
|
|
13133
|
-
}, u =
|
|
13133
|
+
}, u = E(() => {
|
|
13134
13134
|
c(!1);
|
|
13135
13135
|
}, []), f = _t(
|
|
13136
13136
|
async (h) => {
|
|
@@ -13163,7 +13163,7 @@ const by = ({
|
|
|
13163
13163
|
}
|
|
13164
13164
|
},
|
|
13165
13165
|
[o, n, a, r, i, d]
|
|
13166
|
-
), m =
|
|
13166
|
+
), m = E(
|
|
13167
13167
|
async (h) => {
|
|
13168
13168
|
await f(h), c(!1);
|
|
13169
13169
|
},
|
|
@@ -13194,7 +13194,7 @@ const by = ({
|
|
|
13194
13194
|
selectedRowKeys: g = [],
|
|
13195
13195
|
showPointerCursorInRows: y = !0
|
|
13196
13196
|
}) => {
|
|
13197
|
-
const v = K(), b = c || v, F = K({}), C = K(), S = K(), R = K(e), { t: A } = ye(),
|
|
13197
|
+
const v = K(), b = c || v, F = K({}), C = K(), S = K(), R = K(e), { t: A } = ye(), _ = tn(
|
|
13198
13198
|
jt.FEATURE_MANY2ONE_SORT
|
|
13199
13199
|
);
|
|
13200
13200
|
Ke(() => {
|
|
@@ -13211,8 +13211,8 @@ const by = ({
|
|
|
13211
13211
|
...ws
|
|
13212
13212
|
},
|
|
13213
13213
|
i,
|
|
13214
|
-
|
|
13215
|
-
), [i, o,
|
|
13214
|
+
_
|
|
13215
|
+
), [i, o, _]), I = E(
|
|
13216
13216
|
async ({
|
|
13217
13217
|
startRow: L,
|
|
13218
13218
|
endRow: $,
|
|
@@ -13229,7 +13229,7 @@ const by = ({
|
|
|
13229
13229
|
return F.current = { ...F.current, ...B }, !C.current && j && (C.current = {}), j && (C.current = { ...C.current, ...j }), H;
|
|
13230
13230
|
},
|
|
13231
13231
|
[a]
|
|
13232
|
-
), x =
|
|
13232
|
+
), x = E((L) => {
|
|
13233
13233
|
var $, U, M, H;
|
|
13234
13234
|
if (F.current[(U = ($ = L.node) == null ? void 0 : $.data) == null ? void 0 : U.id])
|
|
13235
13235
|
return { color: F.current[(H = (M = L.node) == null ? void 0 : M.data) == null ? void 0 : H.id] };
|
|
@@ -13297,7 +13297,7 @@ const by = ({
|
|
|
13297
13297
|
activeId: b,
|
|
13298
13298
|
getContext: F,
|
|
13299
13299
|
fetchValues: C
|
|
13300
|
-
} = v || {}, S = K(), R = i.size > 1, A = ((Te = i.get("form")) == null ? void 0 : Te.fields) !== void 0,
|
|
13300
|
+
} = v || {}, S = K(), R = i.size > 1, A = ((Te = i.get("form")) == null ? void 0 : Te.fields) !== void 0, _ = te(() => ({ ...F == null ? void 0 : F(), ...h }), [F, h]), w = py({
|
|
13301
13301
|
widgetDomain: g,
|
|
13302
13302
|
fieldName: y
|
|
13303
13303
|
}), {
|
|
@@ -13311,7 +13311,7 @@ const by = ({
|
|
|
13311
13311
|
} = my({
|
|
13312
13312
|
treeView: i.get("tree"),
|
|
13313
13313
|
relation: m,
|
|
13314
|
-
context:
|
|
13314
|
+
context: _,
|
|
13315
13315
|
allRowsIds: l.filter((Ce) => Ce.id !== void 0).map((Ce) => Ce.id),
|
|
13316
13316
|
gridRef: t
|
|
13317
13317
|
}), [, $] = Fy({
|
|
@@ -13322,7 +13322,7 @@ const by = ({
|
|
|
13322
13322
|
}), U = te(() => {
|
|
13323
13323
|
const { title: Ce } = i.get(c) || {};
|
|
13324
13324
|
return Ce || o.label;
|
|
13325
|
-
}, [c, o.label, i]), M = o.type === "many2many", H =
|
|
13325
|
+
}, [c, o.label, i]), M = o.type === "many2many", H = E(
|
|
13326
13326
|
(Ce) => {
|
|
13327
13327
|
var je, rt;
|
|
13328
13328
|
r == null || r({
|
|
@@ -13341,7 +13341,7 @@ const by = ({
|
|
|
13341
13341
|
formView: i.get("form"),
|
|
13342
13342
|
treeView: i.get("tree"),
|
|
13343
13343
|
relation: m,
|
|
13344
|
-
context:
|
|
13344
|
+
context: _,
|
|
13345
13345
|
triggerChange: H
|
|
13346
13346
|
}), {
|
|
13347
13347
|
showFormModal: ce,
|
|
@@ -13360,7 +13360,7 @@ const by = ({
|
|
|
13360
13360
|
items: l,
|
|
13361
13361
|
setCurrentView: d,
|
|
13362
13362
|
setItemIndex: u,
|
|
13363
|
-
context:
|
|
13363
|
+
context: _,
|
|
13364
13364
|
relation: m,
|
|
13365
13365
|
formView: i.get("form")
|
|
13366
13366
|
}), {
|
|
@@ -13374,7 +13374,7 @@ const by = ({
|
|
|
13374
13374
|
triggerChange: H,
|
|
13375
13375
|
items: l,
|
|
13376
13376
|
views: i,
|
|
13377
|
-
context:
|
|
13377
|
+
context: _,
|
|
13378
13378
|
relation: m
|
|
13379
13379
|
}), { showRemoveConfirm: ae } = yy({
|
|
13380
13380
|
isMany2many: M,
|
|
@@ -13395,11 +13395,11 @@ const by = ({
|
|
|
13395
13395
|
},
|
|
13396
13396
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13397
13397
|
[l]
|
|
13398
|
-
), Fe =
|
|
13398
|
+
), Fe = E(() => {
|
|
13399
13399
|
p > 0 && (c === "form" ? X(() => {
|
|
13400
13400
|
u(p - 1);
|
|
13401
13401
|
}) : u(p - 1));
|
|
13402
|
-
}, [c, p, u, X]), pe =
|
|
13402
|
+
}, [c, p, u, X]), pe = E(() => {
|
|
13403
13403
|
const Ce = l.length;
|
|
13404
13404
|
p < Ce - 1 && (c === "form" ? X(() => {
|
|
13405
13405
|
u(p + 1);
|
|
@@ -13437,7 +13437,7 @@ const by = ({
|
|
|
13437
13437
|
showCreateButton: A,
|
|
13438
13438
|
showToggleButton: R,
|
|
13439
13439
|
toolbar: (Pe = i.get(c)) == null ? void 0 : Pe.toolbar,
|
|
13440
|
-
context: { ...F == null ? void 0 : F(), ...
|
|
13440
|
+
context: { ...F == null ? void 0 : F(), ..._ },
|
|
13441
13441
|
formRef: S,
|
|
13442
13442
|
onRefreshParentValues: () => {
|
|
13443
13443
|
var Ce;
|
|
@@ -13454,7 +13454,7 @@ const by = ({
|
|
|
13454
13454
|
readOnly: f || !1,
|
|
13455
13455
|
onFetchRecords: I,
|
|
13456
13456
|
ooui: O,
|
|
13457
|
-
context:
|
|
13457
|
+
context: _,
|
|
13458
13458
|
onRowDoubleClick: he,
|
|
13459
13459
|
showPointerCursorInRows: De,
|
|
13460
13460
|
onRowSelectionChange: P,
|
|
@@ -13477,7 +13477,7 @@ const by = ({
|
|
|
13477
13477
|
ref: S,
|
|
13478
13478
|
items: l,
|
|
13479
13479
|
formView: i.get("form"),
|
|
13480
|
-
context:
|
|
13480
|
+
context: _,
|
|
13481
13481
|
relation: m,
|
|
13482
13482
|
readOnly: f || !1,
|
|
13483
13483
|
onChange: j
|
|
@@ -13494,7 +13494,7 @@ const by = ({
|
|
|
13494
13494
|
defaultValues: Z == null ? void 0 : Z.defaultValues,
|
|
13495
13495
|
visible: ce,
|
|
13496
13496
|
onSubmitSucceed: G,
|
|
13497
|
-
parentContext:
|
|
13497
|
+
parentContext: _,
|
|
13498
13498
|
onCancel: oe,
|
|
13499
13499
|
readOnly: f,
|
|
13500
13500
|
mustClearAfterSave: Q,
|
|
@@ -13509,7 +13509,7 @@ const by = ({
|
|
|
13509
13509
|
{
|
|
13510
13510
|
domain: w,
|
|
13511
13511
|
model: m,
|
|
13512
|
-
context:
|
|
13512
|
+
context: _,
|
|
13513
13513
|
visible: z,
|
|
13514
13514
|
onSelectValues: ne,
|
|
13515
13515
|
onCloseModal: ue
|
|
@@ -13522,7 +13522,7 @@ const by = ({
|
|
|
13522
13522
|
view_id: i.get("graph").view_id,
|
|
13523
13523
|
model: m,
|
|
13524
13524
|
domain: [[`${o.inv_field}`, "=", b]],
|
|
13525
|
-
context:
|
|
13525
|
+
context: _,
|
|
13526
13526
|
limit: 0
|
|
13527
13527
|
}
|
|
13528
13528
|
),
|
|
@@ -13543,16 +13543,16 @@ const by = ({
|
|
|
13543
13543
|
jt.FEATURE_GET_TOOLBAR
|
|
13544
13544
|
), F = async (A) => {
|
|
13545
13545
|
if (o && o[A]) {
|
|
13546
|
-
const
|
|
13547
|
-
if (b && !
|
|
13546
|
+
const _ = o[A];
|
|
13547
|
+
if (b && !_.toolbar && (A === "form" || A === "tree")) {
|
|
13548
13548
|
const w = await V.getHandler().getToolbar({
|
|
13549
13549
|
model: r,
|
|
13550
13550
|
type: A,
|
|
13551
13551
|
context: { ...g == null ? void 0 : g(), ...a }
|
|
13552
13552
|
});
|
|
13553
|
-
return { ...
|
|
13553
|
+
return { ..._, toolbar: w };
|
|
13554
13554
|
}
|
|
13555
|
-
return
|
|
13555
|
+
return _;
|
|
13556
13556
|
}
|
|
13557
13557
|
return await V.getHandler().getView({
|
|
13558
13558
|
model: r,
|
|
@@ -13564,13 +13564,13 @@ const by = ({
|
|
|
13564
13564
|
try {
|
|
13565
13565
|
if (n && n.length > 0) {
|
|
13566
13566
|
for (const A of n) {
|
|
13567
|
-
const
|
|
13568
|
-
f.set(A,
|
|
13567
|
+
const _ = await F(A);
|
|
13568
|
+
f.set(A, _);
|
|
13569
13569
|
}
|
|
13570
13570
|
m(f);
|
|
13571
13571
|
} else {
|
|
13572
|
-
const A = await F("form"),
|
|
13573
|
-
f.set("form", A), f.set("tree",
|
|
13572
|
+
const A = await F("form"), _ = await F("tree");
|
|
13573
|
+
f.set("form", A), f.set("tree", _), m(f);
|
|
13574
13574
|
}
|
|
13575
13575
|
} catch (A) {
|
|
13576
13576
|
u(JSON.stringify(A));
|
|
@@ -13583,14 +13583,14 @@ const by = ({
|
|
|
13583
13583
|
{
|
|
13584
13584
|
required: i,
|
|
13585
13585
|
type: "array",
|
|
13586
|
-
validator: async (A,
|
|
13587
|
-
if (!
|
|
13586
|
+
validator: async (A, _) => {
|
|
13587
|
+
if (!_)
|
|
13588
13588
|
throw new Error();
|
|
13589
|
-
if (!
|
|
13589
|
+
if (!_.items)
|
|
13590
13590
|
throw new Error();
|
|
13591
|
-
if (!Array.isArray(
|
|
13591
|
+
if (!Array.isArray(_.items))
|
|
13592
13592
|
throw new Error();
|
|
13593
|
-
if (
|
|
13593
|
+
if (_.items.length === 0)
|
|
13594
13594
|
throw new Error();
|
|
13595
13595
|
},
|
|
13596
13596
|
...e,
|
|
@@ -13879,7 +13879,7 @@ const { useToken: My } = et, { TextArea: Mo } = xt, Ny = (e) => {
|
|
|
13879
13879
|
limit: o,
|
|
13880
13880
|
onClose: i
|
|
13881
13881
|
}) => {
|
|
13882
|
-
const a = K({}), l = K(/* @__PURE__ */ new Map()), { t: c } = ye(), d =
|
|
13882
|
+
const a = K({}), l = K(/* @__PURE__ */ new Map()), { t: c } = ye(), d = E(
|
|
13883
13883
|
async (y) => {
|
|
13884
13884
|
if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
|
|
13885
13885
|
fn(c("selectAtLeastOneField"));
|
|
@@ -13905,14 +13905,14 @@ const { useToken: My } = et, { TextArea: Mo } = xt, Ny = (e) => {
|
|
|
13905
13905
|
qr(b, F.mime);
|
|
13906
13906
|
},
|
|
13907
13907
|
[r, n, e, o, t, i, c]
|
|
13908
|
-
), p =
|
|
13908
|
+
), p = E(async () => {
|
|
13909
13909
|
const y = await V.getHandler().getFields({
|
|
13910
13910
|
model: e,
|
|
13911
13911
|
context: t,
|
|
13912
13912
|
fields: []
|
|
13913
13913
|
});
|
|
13914
13914
|
return a.current["/"] = y, Ei({ fields: y });
|
|
13915
|
-
}, [e, t, a]), u =
|
|
13915
|
+
}, [e, t, a]), u = E(
|
|
13916
13916
|
async (y) => {
|
|
13917
13917
|
const b = Lo(y, a.current)[Vo(y)], F = b.relation, C = await V.getHandler().getFields({
|
|
13918
13918
|
model: F,
|
|
@@ -13930,7 +13930,7 @@ const { useToken: My } = et, { TextArea: Mo } = xt, Ny = (e) => {
|
|
|
13930
13930
|
});
|
|
13931
13931
|
},
|
|
13932
13932
|
[t]
|
|
13933
|
-
), f =
|
|
13933
|
+
), f = E(async () => {
|
|
13934
13934
|
const y = await Uy({ model: e, context: t }), v = await Gy({
|
|
13935
13935
|
predefinedExports: y,
|
|
13936
13936
|
fields: a.current,
|
|
@@ -13956,7 +13956,7 @@ const { useToken: My } = et, { TextArea: Mo } = xt, Ny = (e) => {
|
|
|
13956
13956
|
})),
|
|
13957
13957
|
keysWithChilds: v
|
|
13958
13958
|
};
|
|
13959
|
-
}, [t, e, u]), m =
|
|
13959
|
+
}, [t, e, u]), m = E(
|
|
13960
13960
|
async (y) => {
|
|
13961
13961
|
await V.getHandler().deleteObjects({
|
|
13962
13962
|
model: "ir.exports",
|
|
@@ -13965,7 +13965,7 @@ const { useToken: My } = et, { TextArea: Mo } = xt, Ny = (e) => {
|
|
|
13965
13965
|
});
|
|
13966
13966
|
},
|
|
13967
13967
|
[t]
|
|
13968
|
-
), h =
|
|
13968
|
+
), h = E(
|
|
13969
13969
|
async (y) => {
|
|
13970
13970
|
if (l.current.has(y))
|
|
13971
13971
|
return l.current.get(y);
|
|
@@ -13977,7 +13977,7 @@ const { useToken: My } = et, { TextArea: Mo } = xt, Ny = (e) => {
|
|
|
13977
13977
|
l.current.set(y, v);
|
|
13978
13978
|
},
|
|
13979
13979
|
[l, t]
|
|
13980
|
-
), g =
|
|
13980
|
+
), g = E(
|
|
13981
13981
|
async (y) => {
|
|
13982
13982
|
const v = await h("ir.exports"), b = await h("ir.exports.line"), F = await V.getHandler().create({
|
|
13983
13983
|
model: "ir.exports",
|
|
@@ -14418,7 +14418,7 @@ function iv(e) {
|
|
|
14418
14418
|
onAddNewAttachment: r,
|
|
14419
14419
|
onListAllAttachments: o,
|
|
14420
14420
|
onViewAttachmentDetails: i
|
|
14421
|
-
} = e, { formRef: a } = de(Et), [l, c] = T(!1), [d, p] = T([]), [u, f] = T(!1), { t: m } = ye(), { showErrorNotification: h } = yt(), g =
|
|
14421
|
+
} = e, { formRef: a } = de(Et), [l, c] = T(!1), [d, p] = T([]), [u, f] = T(!1), { t: m } = ye(), { showErrorNotification: h } = yt(), g = E(async () => {
|
|
14422
14422
|
if (!(!t || t.length === 0)) {
|
|
14423
14423
|
c(!0);
|
|
14424
14424
|
try {
|
|
@@ -14441,7 +14441,7 @@ function iv(e) {
|
|
|
14441
14441
|
}
|
|
14442
14442
|
c(!1);
|
|
14443
14443
|
}
|
|
14444
|
-
}, [t, a, h]), y =
|
|
14444
|
+
}, [t, a, h]), y = E(
|
|
14445
14445
|
async (b) => {
|
|
14446
14446
|
if (b.link) {
|
|
14447
14447
|
window.open(b.link);
|
|
@@ -14466,7 +14466,7 @@ function iv(e) {
|
|
|
14466
14466
|
i(F);
|
|
14467
14467
|
},
|
|
14468
14468
|
[a, i, h]
|
|
14469
|
-
), v =
|
|
14469
|
+
), v = E(
|
|
14470
14470
|
async (b) => {
|
|
14471
14471
|
i(b);
|
|
14472
14472
|
},
|
|
@@ -14517,7 +14517,7 @@ const av = () => {
|
|
|
14517
14517
|
le(() => () => {
|
|
14518
14518
|
c();
|
|
14519
14519
|
}, []);
|
|
14520
|
-
const { showErrorNotification: d } = yt(), p =
|
|
14520
|
+
const { showErrorNotification: d } = yt(), p = E(
|
|
14521
14521
|
async (y) => {
|
|
14522
14522
|
var v;
|
|
14523
14523
|
try {
|
|
@@ -14537,12 +14537,12 @@ const av = () => {
|
|
|
14537
14537
|
}
|
|
14538
14538
|
},
|
|
14539
14539
|
[l, a, d]
|
|
14540
|
-
), u =
|
|
14540
|
+
), u = E(
|
|
14541
14541
|
(y, v) => {
|
|
14542
14542
|
o == null || o(y), r == null || r(v);
|
|
14543
14543
|
},
|
|
14544
14544
|
[o, r]
|
|
14545
|
-
), f =
|
|
14545
|
+
), f = E(
|
|
14546
14546
|
async (y) => {
|
|
14547
14547
|
var S, R;
|
|
14548
14548
|
if (!i)
|
|
@@ -14553,13 +14553,13 @@ const av = () => {
|
|
|
14553
14553
|
if (A)
|
|
14554
14554
|
u(b, A);
|
|
14555
14555
|
else {
|
|
14556
|
-
const
|
|
14557
|
-
|
|
14556
|
+
const _ = await p(b);
|
|
14557
|
+
_ && u(b, _);
|
|
14558
14558
|
}
|
|
14559
14559
|
} else if (C) {
|
|
14560
|
-
const A = v ? 0 : t - 1,
|
|
14561
|
-
if (
|
|
14562
|
-
u(A,
|
|
14560
|
+
const A = v ? 0 : t - 1, _ = (R = i[A]) == null ? void 0 : R.id;
|
|
14561
|
+
if (_)
|
|
14562
|
+
u(A, _);
|
|
14563
14563
|
else {
|
|
14564
14564
|
const w = await p(A);
|
|
14565
14565
|
w && u(A, w);
|
|
@@ -14567,7 +14567,7 @@ const av = () => {
|
|
|
14567
14567
|
}
|
|
14568
14568
|
},
|
|
14569
14569
|
[i, n, t, p, u]
|
|
14570
|
-
), m =
|
|
14570
|
+
), m = E(
|
|
14571
14571
|
(y) => {
|
|
14572
14572
|
if (!i || i.length === 0)
|
|
14573
14573
|
return;
|
|
@@ -14575,9 +14575,9 @@ const av = () => {
|
|
|
14575
14575
|
u(C, i[C].id);
|
|
14576
14576
|
},
|
|
14577
14577
|
[i, n, u]
|
|
14578
|
-
), h =
|
|
14578
|
+
), h = E(() => {
|
|
14579
14579
|
e === "infinite" ? f("next") : m("next");
|
|
14580
|
-
}, [e, f, m]), g =
|
|
14580
|
+
}, [e, f, m]), g = E(() => {
|
|
14581
14581
|
e === "infinite" ? f("previous") : m("previous");
|
|
14582
14582
|
}, [e, f, m]);
|
|
14583
14583
|
return {
|
|
@@ -14607,7 +14607,7 @@ function lv({ toolbar: e }) {
|
|
|
14607
14607
|
setDuplicatingItem: S,
|
|
14608
14608
|
setResults: R,
|
|
14609
14609
|
formIsLoading: A,
|
|
14610
|
-
attachments:
|
|
14610
|
+
attachments: _,
|
|
14611
14611
|
formRef: w,
|
|
14612
14612
|
setFormHasChanges: O,
|
|
14613
14613
|
previousView: I,
|
|
@@ -14618,19 +14618,19 @@ function lv({ toolbar: e }) {
|
|
|
14618
14618
|
} = wn(), { openDefaultActionForModel: L } = t || {}, $ = te(
|
|
14619
14619
|
() => u || F || A || C,
|
|
14620
14620
|
[u, F, A, C]
|
|
14621
|
-
), U =
|
|
14621
|
+
), U = E(
|
|
14622
14622
|
(G) => {
|
|
14623
14623
|
p ? Hn({ t: n, onOk: G }) : G();
|
|
14624
14624
|
},
|
|
14625
14625
|
[p, n]
|
|
14626
|
-
), M =
|
|
14626
|
+
), M = E(() => {
|
|
14627
14627
|
U(() => w.current.fetchValues());
|
|
14628
14628
|
}, [U, w]), { actionButtonProps: H, printButtonProps: B, relateButtonProps: j } = Wl({
|
|
14629
14629
|
toolbar: e,
|
|
14630
14630
|
mustDisableButtons: $,
|
|
14631
14631
|
formRef: w,
|
|
14632
14632
|
onRefreshParentValues: M
|
|
14633
|
-
}), X =
|
|
14633
|
+
}), X = E(async () => {
|
|
14634
14634
|
try {
|
|
14635
14635
|
b == null || b(!0), await V.getHandler().deleteObjects({
|
|
14636
14636
|
model: v,
|
|
@@ -14659,7 +14659,7 @@ function lv({ toolbar: e }) {
|
|
|
14659
14659
|
b,
|
|
14660
14660
|
R,
|
|
14661
14661
|
i
|
|
14662
|
-
]), W =
|
|
14662
|
+
]), W = E(async () => {
|
|
14663
14663
|
try {
|
|
14664
14664
|
S == null || S(!0);
|
|
14665
14665
|
const G = await V.getHandler().duplicate({
|
|
@@ -14680,12 +14680,12 @@ function lv({ toolbar: e }) {
|
|
|
14680
14680
|
P,
|
|
14681
14681
|
S,
|
|
14682
14682
|
i
|
|
14683
|
-
]), ce =
|
|
14683
|
+
]), ce = E(
|
|
14684
14684
|
(G) => {
|
|
14685
14685
|
x == null || x(l), O == null || O(!1), c == null || c(G);
|
|
14686
14686
|
},
|
|
14687
14687
|
[l, x, O, c]
|
|
14688
|
-
), Z =
|
|
14688
|
+
), Z = E(async () => {
|
|
14689
14689
|
const G = await On({ onFormSave: d });
|
|
14690
14690
|
G.succeed && (L == null || L({
|
|
14691
14691
|
...Oi(
|
|
@@ -14694,7 +14694,7 @@ function lv({ toolbar: e }) {
|
|
|
14694
14694
|
),
|
|
14695
14695
|
initialViewType: "form"
|
|
14696
14696
|
}));
|
|
14697
|
-
}, [v, d, L]), Q =
|
|
14697
|
+
}, [v, d, L]), Q = E(async () => {
|
|
14698
14698
|
const G = await On({ onFormSave: d });
|
|
14699
14699
|
G.succeed && (L == null || L({
|
|
14700
14700
|
...Oi(
|
|
@@ -14703,7 +14703,7 @@ function lv({ toolbar: e }) {
|
|
|
14703
14703
|
),
|
|
14704
14704
|
initialViewType: "tree"
|
|
14705
14705
|
}));
|
|
14706
|
-
}, [v, d, L]), oe =
|
|
14706
|
+
}, [v, d, L]), oe = E(
|
|
14707
14707
|
async (G) => {
|
|
14708
14708
|
(await On({ onFormSave: d })).succeed && (L == null || L({
|
|
14709
14709
|
model: "ir.attachment",
|
|
@@ -14840,7 +14840,7 @@ function lv({ toolbar: e }) {
|
|
|
14840
14840
|
iv,
|
|
14841
14841
|
{
|
|
14842
14842
|
disabled: $,
|
|
14843
|
-
attachments:
|
|
14843
|
+
attachments: _,
|
|
14844
14844
|
onAddNewAttachment: Z,
|
|
14845
14845
|
onListAllAttachments: Q,
|
|
14846
14846
|
onViewAttachmentDetails: oe
|
|
@@ -15133,7 +15133,7 @@ const hv = (e) => {
|
|
|
15133
15133
|
setSorter: S = void 0,
|
|
15134
15134
|
setTotalItems: R = void 0,
|
|
15135
15135
|
setSearchTreeNameSearch: A = void 0,
|
|
15136
|
-
setTreeIsLoading:
|
|
15136
|
+
setTreeIsLoading: _ = void 0,
|
|
15137
15137
|
limit: w,
|
|
15138
15138
|
setLimit: O,
|
|
15139
15139
|
searchParams: I,
|
|
@@ -15201,7 +15201,7 @@ const hv = (e) => {
|
|
|
15201
15201
|
setSearchValues: P,
|
|
15202
15202
|
setSearchParams: v,
|
|
15203
15203
|
setSearchVisible: F,
|
|
15204
|
-
setTreeIsLoading:
|
|
15204
|
+
setTreeIsLoading: _,
|
|
15205
15205
|
context: o,
|
|
15206
15206
|
formView: a,
|
|
15207
15207
|
treeView: l,
|
|
@@ -15471,7 +15471,7 @@ function Cv(e, t) {
|
|
|
15471
15471
|
initialSearchParams: v = [],
|
|
15472
15472
|
currentPage: b,
|
|
15473
15473
|
order: F
|
|
15474
|
-
} = e, [C, S] = T(), [R, A] = T([]), [
|
|
15474
|
+
} = e, [C, S] = T(), [R, A] = T([]), [_, w] = T(!0), O = f || void 0, [I, x] = T(
|
|
15475
15475
|
O
|
|
15476
15476
|
), [P, D] = T([]), [k, L] = T(), [$, U] = T([]), [M, H] = T(), [B, j] = T(), [X, W] = T(!1), [ce, Z] = T(!1), [Q, oe] = T(), { t: G } = ye(), { showErrorNotification: se } = yt(), {
|
|
15477
15477
|
permissions: ie,
|
|
@@ -15502,7 +15502,7 @@ function Cv(e, t) {
|
|
|
15502
15502
|
function _e(xe) {
|
|
15503
15503
|
x(xe), he == null || he(xe);
|
|
15504
15504
|
}
|
|
15505
|
-
const Pe =
|
|
15505
|
+
const Pe = E(
|
|
15506
15506
|
(xe) => {
|
|
15507
15507
|
S(xe), be == null || be(xe);
|
|
15508
15508
|
},
|
|
@@ -15511,7 +15511,7 @@ function Cv(e, t) {
|
|
|
15511
15511
|
Lt(t, () => ({
|
|
15512
15512
|
canWeClose: je
|
|
15513
15513
|
}));
|
|
15514
|
-
const Ce =
|
|
15514
|
+
const Ce = E(async () => {
|
|
15515
15515
|
w(!0);
|
|
15516
15516
|
const xe = [], Ge = [];
|
|
15517
15517
|
for (const ze of i) {
|
|
@@ -15701,7 +15701,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
15701
15701
|
Pe(xe);
|
|
15702
15702
|
}
|
|
15703
15703
|
}
|
|
15704
|
-
return
|
|
15704
|
+
return _ || z ? /* @__PURE__ */ s(nt, {}) : C ? /* @__PURE__ */ N(
|
|
15705
15705
|
Ig,
|
|
15706
15706
|
{
|
|
15707
15707
|
title: a,
|
|
@@ -15900,7 +15900,7 @@ function Iv(e) {
|
|
|
15900
15900
|
domain: i = [],
|
|
15901
15901
|
visible: a = !0,
|
|
15902
15902
|
parentContext: l = {}
|
|
15903
|
-
} = e, [c, d] = T(!1), [p, u] = T(!1), [f, m] = T(), [h, g] = T(), [y, v] = T(), [b, F] = T(1), [C, S] = T(0), R = K(Ct), A = K([]), [
|
|
15903
|
+
} = e, [c, d] = T(!1), [p, u] = T(!1), [f, m] = T(), [h, g] = T(), [y, v] = T(), [b, F] = T(1), [C, S] = T(0), R = K(Ct), A = K([]), [_, w] = T(0), [O, I] = T([]), [x, P] = T(void 0), [D, k] = T(), [L, $] = T(), [U, M] = T(), [H, B] = T(!1), j = K([]), X = (ie) => {
|
|
15904
15904
|
B(!0), F(ie), S((ie - 1) * R.current);
|
|
15905
15905
|
}, W = async () => {
|
|
15906
15906
|
const ie = j.current.length > 0 ? j.current : i, z = Zt(A.current, ie), { colors: ne } = Qt(h), { totalItems: ue, results: Y, attrsEvaluated: ae } = await V.getHandler().searchForTree({
|
|
@@ -15978,7 +15978,7 @@ function Iv(e) {
|
|
|
15978
15978
|
hr,
|
|
15979
15979
|
{
|
|
15980
15980
|
showPagination: !1,
|
|
15981
|
-
total:
|
|
15981
|
+
total: _,
|
|
15982
15982
|
limit: R.current,
|
|
15983
15983
|
page: b,
|
|
15984
15984
|
treeView: h,
|
|
@@ -16039,7 +16039,7 @@ function Ev(e, t) {
|
|
|
16039
16039
|
async function S() {
|
|
16040
16040
|
d(!0), f(!0), u(void 0);
|
|
16041
16041
|
try {
|
|
16042
|
-
const x = await R(), P = await
|
|
16042
|
+
const x = await R(), P = await _(x), D = x.fields[Co].relation, k = P[Co].items;
|
|
16043
16043
|
y.current = x.fields;
|
|
16044
16044
|
const L = await A({
|
|
16045
16045
|
items: k,
|
|
@@ -16082,7 +16082,7 @@ function Ev(e, t) {
|
|
|
16082
16082
|
});
|
|
16083
16083
|
return k;
|
|
16084
16084
|
}
|
|
16085
|
-
async function
|
|
16085
|
+
async function _(x) {
|
|
16086
16086
|
return (await b({
|
|
16087
16087
|
model: n,
|
|
16088
16088
|
ids: [o],
|
|
@@ -16286,18 +16286,18 @@ const Ov = Mt(Ev), Dv = (e) => {
|
|
|
16286
16286
|
const { ooui: t } = e;
|
|
16287
16287
|
return /* @__PURE__ */ s(Ve, { type: "array", ...e, children: /* @__PURE__ */ s(Pv, { ooui: t }) });
|
|
16288
16288
|
}, Pv = (e) => {
|
|
16289
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, i = o.filter((
|
|
16289
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, i = o.filter((_) => _.operation !== "pendingRemove").map((_) => _.id), [a, l] = T([]), [c, d] = T(), [p, u] = T(!1), { relation: f, context: m, readOnly: h, field: g, columns: y } = n, v = de(Qe), { getContext: b } = v || {};
|
|
16290
16290
|
Ke(() => {
|
|
16291
16291
|
C();
|
|
16292
16292
|
}, [o]);
|
|
16293
|
-
const F = (
|
|
16293
|
+
const F = (_) => {
|
|
16294
16294
|
r == null || r({
|
|
16295
|
-
items:
|
|
16295
|
+
items: _
|
|
16296
16296
|
});
|
|
16297
16297
|
};
|
|
16298
16298
|
async function C() {
|
|
16299
16299
|
u(!0);
|
|
16300
|
-
let
|
|
16300
|
+
let _ = [];
|
|
16301
16301
|
if (n.domain) {
|
|
16302
16302
|
const w = await V.getHandler().evalDomain({
|
|
16303
16303
|
domain: n.domain,
|
|
@@ -16308,12 +16308,12 @@ const Ov = Mt(Ev), Dv = (e) => {
|
|
|
16308
16308
|
fields: v == null ? void 0 : v.getFields(),
|
|
16309
16309
|
context: v.getContext()
|
|
16310
16310
|
});
|
|
16311
|
-
|
|
16311
|
+
_ = [..._, ...w];
|
|
16312
16312
|
}
|
|
16313
16313
|
try {
|
|
16314
16314
|
const O = (await V.getHandler().search({
|
|
16315
16315
|
model: f,
|
|
16316
|
-
params:
|
|
16316
|
+
params: _,
|
|
16317
16317
|
fieldsToRetrieve: [g],
|
|
16318
16318
|
context: { ...b == null ? void 0 : b(), ...m }
|
|
16319
16319
|
})).map((I) => {
|
|
@@ -16331,15 +16331,15 @@ const Ov = Mt(Ev), Dv = (e) => {
|
|
|
16331
16331
|
return /* @__PURE__ */ s(It, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
16332
16332
|
}
|
|
16333
16333
|
const S = () => {
|
|
16334
|
-
A(a.map((
|
|
16334
|
+
A(a.map((_) => _.value));
|
|
16335
16335
|
}, R = () => {
|
|
16336
16336
|
A([]);
|
|
16337
|
-
}, A = (
|
|
16338
|
-
const w = o.map((I) =>
|
|
16337
|
+
}, A = (_) => {
|
|
16338
|
+
const w = o.map((I) => _.includes(I.id) ? I.operation == "pendingRemove" ? {
|
|
16339
16339
|
...I,
|
|
16340
16340
|
operation: "original"
|
|
16341
16341
|
} : I : { id: I.id, operation: "pendingRemove" }), O = w.map((I) => I.id);
|
|
16342
|
-
|
|
16342
|
+
_.filter((I) => !O.includes(I)).map((I) => {
|
|
16343
16343
|
w.push({ id: I, operation: "pendingLink" });
|
|
16344
16344
|
}), F(w);
|
|
16345
16345
|
};
|
|
@@ -16351,7 +16351,7 @@ const Ov = Mt(Ev), Dv = (e) => {
|
|
|
16351
16351
|
disabled: h,
|
|
16352
16352
|
onChange: A,
|
|
16353
16353
|
style: { width: "100%" },
|
|
16354
|
-
children: /* @__PURE__ */ s(We, { children: a.map((
|
|
16354
|
+
children: /* @__PURE__ */ s(We, { children: a.map((_) => /* @__PURE__ */ s(Ae, { span: Math.floor(24 / y), children: /* @__PURE__ */ s(Jn, { value: _.value, children: _.label }) })) })
|
|
16355
16355
|
}
|
|
16356
16356
|
),
|
|
16357
16357
|
!h && /* @__PURE__ */ N(lt, { children: [
|
|
@@ -16479,7 +16479,7 @@ const Ov = Mt(Ev), Dv = (e) => {
|
|
|
16479
16479
|
/* @__PURE__ */ s("div", { style: u(m.active) })
|
|
16480
16480
|
] }, h)) });
|
|
16481
16481
|
}, Uv = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(Bv, {}) }), Wv = (e) => /* @__PURE__ */ s(Ve, { ...e, children: /* @__PURE__ */ s(Gv, { ...e }) }), Gv = (e) => {
|
|
16482
|
-
const { ooui: t, value: n, onChange: r } = e, { lang: o, height: i, readOnly: a } = t, l = de(Qe), { elementHasLostFocus: c } = l || {}, d =
|
|
16482
|
+
const { ooui: t, value: n, onChange: r } = e, { lang: o, height: i, readOnly: a } = t, l = de(Qe), { elementHasLostFocus: c } = l || {}, d = E(
|
|
16483
16483
|
(u) => {
|
|
16484
16484
|
c && u.onDidBlurEditorWidget(() => c());
|
|
16485
16485
|
},
|
|
@@ -16979,7 +16979,7 @@ function db(e, t) {
|
|
|
16979
16979
|
}
|
|
16980
16980
|
});
|
|
16981
16981
|
}
|
|
16982
|
-
async function
|
|
16982
|
+
async function _({
|
|
16983
16983
|
model: I,
|
|
16984
16984
|
values: x,
|
|
16985
16985
|
forced_values: P,
|
|
@@ -17119,7 +17119,7 @@ function db(e, t) {
|
|
|
17119
17119
|
openShortcut: A,
|
|
17120
17120
|
openAction: w,
|
|
17121
17121
|
openRelate: R,
|
|
17122
|
-
openDefaultActionForModel:
|
|
17122
|
+
openDefaultActionForModel: _,
|
|
17123
17123
|
tabs: f,
|
|
17124
17124
|
activeKey: r,
|
|
17125
17125
|
onRemoveTab: async (I) => {
|
|
@@ -17291,17 +17291,17 @@ const { useToken: hb } = et, mw = (e) => {
|
|
|
17291
17291
|
const x = I;
|
|
17292
17292
|
(x == null ? void 0 : x.action_type) !== "ir.actions.wizard" && h(x);
|
|
17293
17293
|
}
|
|
17294
|
-
const A =
|
|
17294
|
+
const A = E(async () => {
|
|
17295
17295
|
if (!C)
|
|
17296
17296
|
return;
|
|
17297
17297
|
const I = await n(C);
|
|
17298
17298
|
I !== !1 && d(I), l(I !== !1);
|
|
17299
17299
|
}, [C, n]);
|
|
17300
|
-
async function
|
|
17300
|
+
async function _() {
|
|
17301
17301
|
var I;
|
|
17302
17302
|
(I = f == null ? void 0 : f.current) == null || I.close(), F == null || F({ model: "ir.ui.view_sc" });
|
|
17303
17303
|
}
|
|
17304
|
-
const w =
|
|
17304
|
+
const w = E(async () => {
|
|
17305
17305
|
const I = await t();
|
|
17306
17306
|
return I.length === 0 ? [
|
|
17307
17307
|
{
|
|
@@ -17318,7 +17318,7 @@ const { useToken: hb } = et, mw = (e) => {
|
|
|
17318
17318
|
}))
|
|
17319
17319
|
}
|
|
17320
17320
|
];
|
|
17321
|
-
}, [t, p]), O =
|
|
17321
|
+
}, [t, p]), O = E(async () => {
|
|
17322
17322
|
if (a && c)
|
|
17323
17323
|
await o(c);
|
|
17324
17324
|
else {
|
|
@@ -17363,7 +17363,7 @@ const { useToken: hb } = et, mw = (e) => {
|
|
|
17363
17363
|
ea,
|
|
17364
17364
|
{
|
|
17365
17365
|
style: { color: u.colorPrimary, cursor: "pointer" },
|
|
17366
|
-
onClick:
|
|
17366
|
+
onClick: _
|
|
17367
17367
|
}
|
|
17368
17368
|
) }) })
|
|
17369
17369
|
] }),
|