@gisce/react-ooui 2.115.0-alpha.1 → 2.115.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/react-ooui.es.js
CHANGED
|
@@ -325,7 +325,7 @@ const { Text: rf, Title: of } = en, { useToken: sf } = ot, af = {
|
|
|
325
325
|
}
|
|
326
326
|
);
|
|
327
327
|
};
|
|
328
|
-
function
|
|
328
|
+
function Ke({
|
|
329
329
|
ooui: e,
|
|
330
330
|
children: t,
|
|
331
331
|
layout: n = "horizontal",
|
|
@@ -426,7 +426,7 @@ const { confirm: lf } = $t, rn = ({
|
|
|
426
426
|
function b() {
|
|
427
427
|
return m ? /* @__PURE__ */ i(Wt, {}) : /* @__PURE__ */ i(Sr, { icon: d });
|
|
428
428
|
}
|
|
429
|
-
return /* @__PURE__ */ i(
|
|
429
|
+
return /* @__PURE__ */ i(Ke, { ooui: t, children: /* @__PURE__ */ i(
|
|
430
430
|
qe,
|
|
431
431
|
{
|
|
432
432
|
block: !0,
|
|
@@ -483,7 +483,7 @@ const { confirm: lf } = $t, rn = ({
|
|
|
483
483
|
if (t.buttons.length === 0)
|
|
484
484
|
return null;
|
|
485
485
|
if (t.buttons.length > 1)
|
|
486
|
-
return /* @__PURE__ */ i(
|
|
486
|
+
return /* @__PURE__ */ i(Ke, { ooui: new ts({ defaultButton: n }), children: /* @__PURE__ */ B(
|
|
487
487
|
Ta.Button,
|
|
488
488
|
{
|
|
489
489
|
disabled: !a || m,
|
|
@@ -879,7 +879,7 @@ Tr.displayName = "BaseInput";
|
|
|
879
879
|
const ul = (e) => {
|
|
880
880
|
const { ooui: t, isSearchField: n = !1 } = e, { id: r, readOnly: o, required: s, translatable: a } = t;
|
|
881
881
|
let d = /* @__PURE__ */ i(fl, { ooui: t, isSearchField: n });
|
|
882
|
-
return a && !o && !n && (d = /* @__PURE__ */ i(ml, { ooui: t, field: r })), /* @__PURE__ */ i(
|
|
882
|
+
return a && !o && !n && (d = /* @__PURE__ */ i(ml, { ooui: t, field: r })), /* @__PURE__ */ i(Ke, { required: s, ...e, children: d });
|
|
883
883
|
}, fl = rt(
|
|
884
884
|
({
|
|
885
885
|
value: e,
|
|
@@ -1033,7 +1033,7 @@ const yf = xt(ht)`
|
|
|
1033
1033
|
}
|
|
1034
1034
|
`, { defaultAlgorithm: wf, defaultSeed: Cf } = ot, xf = wf(Cf), { Option: Sf } = Nn, hl = (e) => {
|
|
1035
1035
|
const { ooui: t } = e, { required: n } = t;
|
|
1036
|
-
return /* @__PURE__ */ i(
|
|
1036
|
+
return /* @__PURE__ */ i(Ke, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(gl, { ...e }) });
|
|
1037
1037
|
}, gl = (e) => {
|
|
1038
1038
|
const { ooui: t, onChange: n, value: r } = e, { selectionValues: o, readOnly: s, required: a } = t, d = Array.from(o.entries()), c = d && d.length && d.map((f) => {
|
|
1039
1039
|
const [u, m] = f;
|
|
@@ -1058,7 +1058,7 @@ const yf = xt(ht)`
|
|
|
1058
1058
|
}
|
|
1059
1059
|
`, { defaultAlgorithm: Af, defaultSeed: Ff } = ot, bi = Af(Ff), If = (e) => {
|
|
1060
1060
|
const { ooui: t } = e, { id: n, readOnly: r, required: o } = t;
|
|
1061
|
-
return /* @__PURE__ */ i(
|
|
1061
|
+
return /* @__PURE__ */ i(Ke, { ...e, valuePropName: "checked", children: /* @__PURE__ */ i(Rf, { id: n, readOnly: r, required: o }) });
|
|
1062
1062
|
}, Rf = (e) => {
|
|
1063
1063
|
const { required: t, readOnly: n, ...r } = e;
|
|
1064
1064
|
return /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(t && !n ? _f : Cr, { disabled: n, ...r }) });
|
|
@@ -1112,7 +1112,7 @@ const ks = (e) => {
|
|
|
1112
1112
|
return s ? /* @__PURE__ */ i(s, {}) : null;
|
|
1113
1113
|
}, Of = (e) => {
|
|
1114
1114
|
const { ooui: t } = e, { required: n, name: r, size: o, color: s } = t;
|
|
1115
|
-
return _t(r) ? /* @__PURE__ */ i(ks, { name: r, size: o, color: s }) : /* @__PURE__ */ i(
|
|
1115
|
+
return _t(r) ? /* @__PURE__ */ i(ks, { name: r, size: o, color: s }) : /* @__PURE__ */ i(Ke, { required: n, ...e, children: /* @__PURE__ */ i(Df, { ooui: t }) });
|
|
1116
1116
|
}, Df = (e) => {
|
|
1117
1117
|
const { ooui: t, value: n } = e, { size: r, color: o } = t;
|
|
1118
1118
|
return n && _t(n) ? /* @__PURE__ */ i(ks, { name: n, size: r, color: o }) : (n && console.warn(`Icon not found: ${n}`), null);
|
|
@@ -1129,7 +1129,7 @@ const ks = (e) => {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
}, kf = (e) => {
|
|
1131
1131
|
const { ooui: t } = e, { required: n, id: r, width: o, height: s } = t;
|
|
1132
|
-
return _t(r) ? /* @__PURE__ */ i(Ms, { value: r, width: o, height: s }) : /* @__PURE__ */ i(
|
|
1132
|
+
return _t(r) ? /* @__PURE__ */ i(Ms, { value: r, width: o, height: s }) : /* @__PURE__ */ i(Ke, { required: n, ...e, children: /* @__PURE__ */ i(Mf, { ooui: t }) });
|
|
1133
1133
|
}, Mf = (e) => {
|
|
1134
1134
|
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, width: s, height: a } = t, d = Q(null), { t: c } = xe(), l = (p) => {
|
|
1135
1135
|
r == null || r(p);
|
|
@@ -1198,7 +1198,7 @@ const ks = (e) => {
|
|
|
1198
1198
|
] });
|
|
1199
1199
|
}, $f = (e) => {
|
|
1200
1200
|
const { ooui: t } = e, { required: n } = t;
|
|
1201
|
-
return /* @__PURE__ */ i(
|
|
1201
|
+
return /* @__PURE__ */ i(Ke, { required: n, ...e, children: /* @__PURE__ */ i(Nf, {}) });
|
|
1202
1202
|
}, Nf = (e) => {
|
|
1203
1203
|
const { value: t, onChange: n } = e;
|
|
1204
1204
|
if (!t)
|
|
@@ -1803,7 +1803,7 @@ const Vn = ({
|
|
|
1803
1803
|
a(!1);
|
|
1804
1804
|
}
|
|
1805
1805
|
};
|
|
1806
|
-
return s ? /* @__PURE__ */ i(it, {}) : d ? (console.error(d), /* @__PURE__ */ i(kt, { className: "mt-10", message: d, type: "error", banner: !0 })) : /* @__PURE__ */ i(
|
|
1806
|
+
return s ? /* @__PURE__ */ i(it, {}) : d ? (console.error(d), /* @__PURE__ */ i(kt, { className: "mt-10", message: d, type: "error", banner: !0 })) : /* @__PURE__ */ i(Ke, { type: "array", ...e, children: /* @__PURE__ */ i(Jf, { ooui: t, views: l }) });
|
|
1807
1807
|
}, Jf = (e) => {
|
|
1808
1808
|
const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, d] = R(!1), [c, l] = R(), [f, u] = R(!1), [m, p] = R(), {
|
|
1809
1809
|
relation: g,
|
|
@@ -2534,7 +2534,7 @@ const am = (e) => {
|
|
|
2534
2534
|
banner: !0
|
|
2535
2535
|
}
|
|
2536
2536
|
);
|
|
2537
|
-
},
|
|
2537
|
+
}, Ae = (e) => {
|
|
2538
2538
|
const t = Q(/* @__PURE__ */ new Map());
|
|
2539
2539
|
he(() => () => {
|
|
2540
2540
|
n();
|
|
@@ -2760,15 +2760,15 @@ const { getValueForOperator: Si } = $a, dm = (e) => {
|
|
|
2760
2760
|
manualIds: m,
|
|
2761
2761
|
fixedHeight: p,
|
|
2762
2762
|
showTotal: g
|
|
2763
|
-
} = e, [h, y] = R(!1), [b, v] = R(), [C, S] = R(0), [w, _] = R(), [x, A] = R(), [D, O] = R(), [M, E] = R(), [I] =
|
|
2763
|
+
} = e, [h, y] = R(!1), [b, v] = R(), [C, S] = R(0), [w, _] = R(), [x, A] = R(), [D, O] = R(), [M, E] = R(), [I] = Ae(
|
|
2764
2764
|
W.getHandler().searchAllIds
|
|
2765
|
-
), [k] =
|
|
2765
|
+
), [k] = Ae(
|
|
2766
2766
|
W.getHandler().readObjects
|
|
2767
|
-
), [T] =
|
|
2767
|
+
), [T] = Ae(
|
|
2768
2768
|
W.getHandler().searchCount
|
|
2769
|
-
), [$] =
|
|
2769
|
+
), [$] = Ae(
|
|
2770
2770
|
W.getHandler().evalDomain
|
|
2771
|
-
), [P] =
|
|
2771
|
+
), [P] = Ae(
|
|
2772
2772
|
W.getHandler().parseCondition
|
|
2773
2773
|
);
|
|
2774
2774
|
he(() => {
|
|
@@ -2888,11 +2888,11 @@ const { getValueForOperator: Si } = $a, dm = (e) => {
|
|
|
2888
2888
|
limit: s,
|
|
2889
2889
|
uninformedString: a,
|
|
2890
2890
|
manualIds: d
|
|
2891
|
-
} = e, [c, l] = R(!1), [f, u] = R(), [m, p] = R(), [g, h] = R(), [y, b] = R("line"), [v] =
|
|
2891
|
+
} = e, [c, l] = R(!1), [f, u] = R(), [m, p] = R(), [g, h] = R(), [y, b] = R("line"), [v] = Ae(
|
|
2892
2892
|
W.getHandler().getFields
|
|
2893
|
-
), [C] =
|
|
2893
|
+
), [C] = Ae(
|
|
2894
2894
|
W.getHandler().readObjects
|
|
2895
|
-
), [S] =
|
|
2895
|
+
), [S] = Ae(W.getHandler().search), w = F(async () => {
|
|
2896
2896
|
l(!0), u(void 0), b(n.type || "line");
|
|
2897
2897
|
const _ = fm({ ooui: n });
|
|
2898
2898
|
let x, A;
|
|
@@ -3816,7 +3816,7 @@ const { useToken: Lm } = ot, Vm = (e) => {
|
|
|
3816
3816
|
setCurrentSavedSearch: w
|
|
3817
3817
|
} = g || {}, _ = So(
|
|
3818
3818
|
Mt.FEATURE_LOGGABLE_ACTIONS
|
|
3819
|
-
), [x] =
|
|
3819
|
+
), [x] = Ae(
|
|
3820
3820
|
W.getHandler().logAction
|
|
3821
3821
|
), A = F(async () => [
|
|
3822
3822
|
{
|
|
@@ -3975,7 +3975,7 @@ const { useToken: Lm } = ot, Vm = (e) => {
|
|
|
3975
3975
|
qt
|
|
3976
3976
|
), { openAction: l } = c || {}, f = Q([]), { t: u } = xe(), { showErrorNotification: m } = St(), p = So(
|
|
3977
3977
|
Mt.FEATURE_LOGGABLE_ACTIONS
|
|
3978
|
-
), [g, h] =
|
|
3978
|
+
), [g, h] = Ae(
|
|
3979
3979
|
W.getHandler().logAction
|
|
3980
3980
|
);
|
|
3981
3981
|
he(() => () => {
|
|
@@ -4007,12 +4007,12 @@ const { useToken: Lm } = ot, Vm = (e) => {
|
|
|
4007
4007
|
id: z
|
|
4008
4008
|
} = E;
|
|
4009
4009
|
if (!P && $) {
|
|
4010
|
-
const
|
|
4011
|
-
|
|
4010
|
+
const ie = is($);
|
|
4011
|
+
ie && ie.length > 0 && (L.fields = ie);
|
|
4012
4012
|
}
|
|
4013
4013
|
if (!P && $) {
|
|
4014
|
-
const
|
|
4015
|
-
|
|
4014
|
+
const ie = is($);
|
|
4015
|
+
ie && ie.length > 0 && (L.fields = ie);
|
|
4016
4016
|
}
|
|
4017
4017
|
if (H !== as) {
|
|
4018
4018
|
m({
|
|
@@ -4038,7 +4038,7 @@ const { useToken: Lm } = ot, Vm = (e) => {
|
|
|
4038
4038
|
} catch (pe) {
|
|
4039
4039
|
console.error(pe);
|
|
4040
4040
|
}
|
|
4041
|
-
const
|
|
4041
|
+
const ie = await W.getHandler().createReport({
|
|
4042
4042
|
model: U,
|
|
4043
4043
|
name: N,
|
|
4044
4044
|
datas: L,
|
|
@@ -4046,10 +4046,10 @@ const { useToken: Lm } = ot, Vm = (e) => {
|
|
|
4046
4046
|
context: { ...T, ...ne }
|
|
4047
4047
|
});
|
|
4048
4048
|
d(!0), s.current = !0, o.current = setInterval(() => {
|
|
4049
|
-
w(
|
|
4049
|
+
w(ie);
|
|
4050
4050
|
}, 1e3);
|
|
4051
|
-
} catch (
|
|
4052
|
-
s.current = !1, clearInterval(o.current), m(
|
|
4051
|
+
} catch (ie) {
|
|
4052
|
+
s.current = !1, clearInterval(o.current), m(ie), d(!1);
|
|
4053
4053
|
}
|
|
4054
4054
|
}
|
|
4055
4055
|
async function w(M) {
|
|
@@ -4360,7 +4360,7 @@ const jm = Lt(Hm), ql = ({
|
|
|
4360
4360
|
onRefreshParentValues: r,
|
|
4361
4361
|
treeView: a,
|
|
4362
4362
|
view_id: s
|
|
4363
|
-
}), [f, u] = R(null), [m, p] = R(!1), [g] =
|
|
4363
|
+
}), [f, u] = R(null), [m, p] = R(!1), [g] = Ae(
|
|
4364
4364
|
W.getHandler().getToolbar
|
|
4365
4365
|
), h = d || f, y = F(async () => {
|
|
4366
4366
|
if (d || f != null && f.action || f != null && f.print)
|
|
@@ -4587,7 +4587,7 @@ function Jm({
|
|
|
4587
4587
|
(X = h == null ? void 0 : h.current) == null || X.refreshResults();
|
|
4588
4588
|
}, [h]), ne = F(() => {
|
|
4589
4589
|
S == null || S(!C);
|
|
4590
|
-
}, [C, S]), { actionButtonProps: re, printButtonProps:
|
|
4590
|
+
}, [C, S]), { actionButtonProps: re, printButtonProps: ie } = Yl({
|
|
4591
4591
|
toolbar: n,
|
|
4592
4592
|
model: g,
|
|
4593
4593
|
view_id: d == null ? void 0 : d.view_id,
|
|
@@ -4838,7 +4838,7 @@ function Jm({
|
|
|
4838
4838
|
] }),
|
|
4839
4839
|
/* @__PURE__ */ i(Rt, {}),
|
|
4840
4840
|
/* @__PURE__ */ i(hn, { icon: /* @__PURE__ */ i(go, {}), ...re }),
|
|
4841
|
-
/* @__PURE__ */ i(hn, { icon: /* @__PURE__ */ i(yo, {}), ...
|
|
4841
|
+
/* @__PURE__ */ i(hn, { icon: /* @__PURE__ */ i(yo, {}), ...ie }),
|
|
4842
4842
|
V && /* @__PURE__ */ B(Ce, { children: [
|
|
4843
4843
|
/* @__PURE__ */ i(Rt, {}),
|
|
4844
4844
|
/* @__PURE__ */ i(
|
|
@@ -5029,7 +5029,7 @@ const { useToken: Xm } = ot, { Title: Qm, Text: zr } = en, Vr = ({
|
|
|
5029
5029
|
context: r,
|
|
5030
5030
|
enabled: o = !0
|
|
5031
5031
|
}) => {
|
|
5032
|
-
const [s, a] = R(!0), [d, c] = R(), [l, f] = R(), u = Q(!1), [m, p] =
|
|
5032
|
+
const [s, a] = R(!0), [d, c] = R(), [l, f] = R(), u = Q(!1), [m, p] = Ae(
|
|
5033
5033
|
W.getHandler().getView
|
|
5034
5034
|
), { showErrorNotification: g } = St();
|
|
5035
5035
|
Ue(() => (o && h(), () => {
|
|
@@ -5106,9 +5106,9 @@ const { useToken: Xm } = ot, { Title: Qm, Text: zr } = en, Vr = ({
|
|
|
5106
5106
|
he(() => () => {
|
|
5107
5107
|
n(), o();
|
|
5108
5108
|
}, []);
|
|
5109
|
-
const [t, n] =
|
|
5109
|
+
const [t, n] = Ae(
|
|
5110
5110
|
W.getHandler().readUserViewPrefs
|
|
5111
|
-
), [r, o] =
|
|
5111
|
+
), [r, o] = Ae(
|
|
5112
5112
|
W.getHandler().saveUserViewPrefs
|
|
5113
5113
|
), s = dt(async () => {
|
|
5114
5114
|
if (!e)
|
|
@@ -5239,7 +5239,7 @@ function Zl(e) {
|
|
|
5239
5239
|
});
|
|
5240
5240
|
return t = `${o}:${s}`, e < 0 && (t = "-" + t), t;
|
|
5241
5241
|
}
|
|
5242
|
-
const rp = (e) => /* @__PURE__ */ i(
|
|
5242
|
+
const rp = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(ec, {}) }), ec = ({ value: e }) => {
|
|
5243
5243
|
const t = Q(0);
|
|
5244
5244
|
e !== void 0 && (t.current = e);
|
|
5245
5245
|
const n = e !== void 0 ? e : t.current, r = `${n.toLocaleString("en-US", {
|
|
@@ -5355,11 +5355,11 @@ const rp = (e) => /* @__PURE__ */ i(ze, { ...e, children: /* @__PURE__ */ i(ec,
|
|
|
5355
5355
|
qt
|
|
5356
5356
|
), { openRelate: l, openAction: f } = c || {}, u = ve(
|
|
5357
5357
|
yn
|
|
5358
|
-
), { processAction: m } = u || {}, [p, g] =
|
|
5358
|
+
), { processAction: m } = u || {}, [p, g] = Ae(
|
|
5359
5359
|
W.getHandler().getView
|
|
5360
|
-
), [h, y] =
|
|
5360
|
+
), [h, y] = Ae(
|
|
5361
5361
|
W.getHandler().getToolbar
|
|
5362
|
-
), [b, v] =
|
|
5362
|
+
), [b, v] = Ae(
|
|
5363
5363
|
W.getHandler().readObjects
|
|
5364
5364
|
), C = Qt(
|
|
5365
5365
|
Mt.FEATURE_GET_TOOLBAR
|
|
@@ -5515,9 +5515,9 @@ const dC = Object.values(gn), cp = (e) => {
|
|
|
5515
5515
|
function fp(e) {
|
|
5516
5516
|
return e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1);
|
|
5517
5517
|
}
|
|
5518
|
-
const mp = (e) => /* @__PURE__ */ i(
|
|
5518
|
+
const mp = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(tc, { ...e }) }), tc = (e) => {
|
|
5519
5519
|
var p;
|
|
5520
|
-
const { t } = xe(), [n, r] =
|
|
5520
|
+
const { t } = xe(), [n, r] = Ae(
|
|
5521
5521
|
W.getHandler().readObjects
|
|
5522
5522
|
), { getFieldValue: o } = ve(st) || {}, { ooui: s, value: a } = e, [d, c] = R("default");
|
|
5523
5523
|
let l = a, f = Nr, u = a;
|
|
@@ -6009,7 +6009,7 @@ const Ir = ({
|
|
|
6009
6009
|
domain: n,
|
|
6010
6010
|
showEmptyValues: r
|
|
6011
6011
|
}) => {
|
|
6012
|
-
const [o, s] = R(), [a, d] = R(!1), [c, l] =
|
|
6012
|
+
const [o, s] = R(), [a, d] = R(!1), [c, l] = Ae(
|
|
6013
6013
|
W.getHandler().readAggregates
|
|
6014
6014
|
), f = Ct(() => {
|
|
6015
6015
|
if (e)
|
|
@@ -6164,7 +6164,7 @@ const Ir = ({
|
|
|
6164
6164
|
};
|
|
6165
6165
|
}, sc = (e) => {
|
|
6166
6166
|
const { className: t = "w-full", layout: n = "vertical" } = e, r = mu();
|
|
6167
|
-
return /* @__PURE__ */ i(
|
|
6167
|
+
return /* @__PURE__ */ i(Ke, { ...e, layout: n, children: /* @__PURE__ */ i(
|
|
6168
6168
|
Rd.RangePicker,
|
|
6169
6169
|
{
|
|
6170
6170
|
allowEmpty: [!0, !0],
|
|
@@ -6306,7 +6306,7 @@ const Ir = ({
|
|
|
6306
6306
|
),
|
|
6307
6307
|
/* @__PURE__ */ B("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
6308
6308
|
/* @__PURE__ */ i(nt, { className: "w-full", children: /* @__PURE__ */ i(je, { span: 24, children: /* @__PURE__ */ i(sc, { ...e, ooui: s[0], showLabel: !1 }) }) }),
|
|
6309
|
-
/* @__PURE__ */ i(nt, { className: "w-full", children: /* @__PURE__ */ i(je, { span: 24, children: /* @__PURE__ */ i(
|
|
6309
|
+
/* @__PURE__ */ i(nt, { className: "w-full", children: /* @__PURE__ */ i(je, { span: 24, children: /* @__PURE__ */ i(Ke, { ...e, ooui: s[1], showLabel: !1, children: /* @__PURE__ */ i(Vp, {}) }) }) })
|
|
6310
6310
|
] })
|
|
6311
6311
|
] });
|
|
6312
6312
|
}, Vp = ({
|
|
@@ -6350,7 +6350,7 @@ const Ir = ({
|
|
|
6350
6350
|
() => c ? Up : uo,
|
|
6351
6351
|
[c]
|
|
6352
6352
|
), f = F((m) => m ? /* @__PURE__ */ i(xo, { content: m }) : null, []), u = F((m) => `${m}`.replace(/[^0-9.-]+/g, ""), []);
|
|
6353
|
-
return /* @__PURE__ */ i(
|
|
6353
|
+
return /* @__PURE__ */ i(Ke, { required: c, type: "number", ...e, children: /* @__PURE__ */ i(
|
|
6354
6354
|
l,
|
|
6355
6355
|
{
|
|
6356
6356
|
addonBefore: f(t.prefix),
|
|
@@ -6382,7 +6382,7 @@ const Up = xt(uo)`
|
|
|
6382
6382
|
},
|
|
6383
6383
|
[n]
|
|
6384
6384
|
);
|
|
6385
|
-
return /* @__PURE__ */ i(
|
|
6385
|
+
return /* @__PURE__ */ i(Ke, { required: f, type: "number", ...e, children: /* @__PURE__ */ i(
|
|
6386
6386
|
u,
|
|
6387
6387
|
{
|
|
6388
6388
|
addonBefore: m(t.prefix),
|
|
@@ -6449,7 +6449,7 @@ function Kp(e) {
|
|
|
6449
6449
|
}
|
|
6450
6450
|
const { defaultAlgorithm: Jp, defaultSeed: Xp } = ot, Qp = Jp(Xp), { Option: Zp } = Nn, eh = (e) => {
|
|
6451
6451
|
const { ooui: t } = e, { required: n } = t;
|
|
6452
|
-
return /* @__PURE__ */ i(
|
|
6452
|
+
return /* @__PURE__ */ i(Ke, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(th, { ...e }) });
|
|
6453
6453
|
}, th = (e) => {
|
|
6454
6454
|
const { ooui: t, onChange: n, value: r } = e, { selectionValues: o, readOnly: s, required: a } = t, d = Array.from(o.entries()), c = d && d.length && d.filter((u) => {
|
|
6455
6455
|
const [m] = u;
|
|
@@ -7486,9 +7486,9 @@ const ur = /* @__PURE__ */ al(xy), { Text: Sy } = en, Ty = ({
|
|
|
7486
7486
|
setSavedSearches: u
|
|
7487
7487
|
} = Vt(), [m, p] = R(
|
|
7488
7488
|
(o == null ? void 0 : o.name) || ""
|
|
7489
|
-
), [g, h] = R(!1), [y, b] = R(!1), [v, C] = R(!1), [S, w] = R(!1), [_, x] = R(""), [A] =
|
|
7489
|
+
), [g, h] = R(!1), [y, b] = R(!1), [v, C] = R(!1), [S, w] = R(!1), [_, x] = R(""), [A] = Ae(
|
|
7490
7490
|
W.getHandler().update
|
|
7491
|
-
), [D] =
|
|
7491
|
+
), [D] = Ae(
|
|
7492
7492
|
W.getHandler().create
|
|
7493
7493
|
);
|
|
7494
7494
|
Ue(() => {
|
|
@@ -8138,7 +8138,7 @@ const Qs = (e) => {
|
|
|
8138
8138
|
), re = F(() => {
|
|
8139
8139
|
var ee;
|
|
8140
8140
|
(ee = p.current) == null || ee.submit();
|
|
8141
|
-
}, []),
|
|
8141
|
+
}, []), ie = dt(
|
|
8142
8142
|
(ee) => {
|
|
8143
8143
|
var G;
|
|
8144
8144
|
const le = Zn(ee);
|
|
@@ -8249,7 +8249,7 @@ const Qs = (e) => {
|
|
|
8249
8249
|
searchFields: m.current,
|
|
8250
8250
|
onSubmit: ne,
|
|
8251
8251
|
searchValues: v,
|
|
8252
|
-
onChange:
|
|
8252
|
+
onChange: ie,
|
|
8253
8253
|
onClear: pe
|
|
8254
8254
|
},
|
|
8255
8255
|
`${(x == null ? void 0 : x.id) || "no-saved-search"}-${Object.keys(v).length}`
|
|
@@ -8624,7 +8624,7 @@ const fr = () => {
|
|
|
8624
8624
|
}) => {
|
|
8625
8625
|
const [u, m] = R(!1), p = Q([]), g = t == null ? void 0 : t.fields, h = (t == null ? void 0 : t.fields_in_conditions) !== void 0, [y, b] = R(
|
|
8626
8626
|
/* @__PURE__ */ new Set()
|
|
8627
|
-
), v = Q(/* @__PURE__ */ new Set()), C = Q([]), S = Q(null), [w, _] = R(!0), [x, A] =
|
|
8627
|
+
), v = Q(/* @__PURE__ */ new Set()), C = Q([]), S = Q(null), [w, _] = R(!0), [x, A] = Ae(
|
|
8628
8628
|
async (N) => W.getHandler().processSearchResults({
|
|
8629
8629
|
searchIds: N.searchIds,
|
|
8630
8630
|
model: e,
|
|
@@ -8632,7 +8632,7 @@ const fr = () => {
|
|
|
8632
8632
|
context: r,
|
|
8633
8633
|
fields: g
|
|
8634
8634
|
})
|
|
8635
|
-
), [D, O] =
|
|
8635
|
+
), [D, O] = Ae(
|
|
8636
8636
|
W.getHandler().parseConditions
|
|
8637
8637
|
), M = fr();
|
|
8638
8638
|
he(() => {
|
|
@@ -8746,10 +8746,10 @@ const fr = () => {
|
|
|
8746
8746
|
return;
|
|
8747
8747
|
const H = C.current.filter((q) => {
|
|
8748
8748
|
const ne = N.find(
|
|
8749
|
-
(
|
|
8749
|
+
(ie) => (ie == null ? void 0 : ie.id) === (q == null ? void 0 : q.id)
|
|
8750
8750
|
);
|
|
8751
8751
|
return ne ? p.current.some(
|
|
8752
|
-
(
|
|
8752
|
+
(ie) => q[ie] !== ne[ie]
|
|
8753
8753
|
) : !1;
|
|
8754
8754
|
}).filter(Boolean);
|
|
8755
8755
|
H.length > 0 && (T(H), (j = n == null ? void 0 : n.current) == null || j.updateRows(H));
|
|
@@ -8812,9 +8812,9 @@ const fr = () => {
|
|
|
8812
8812
|
treeView: c,
|
|
8813
8813
|
results: l,
|
|
8814
8814
|
onRecordsUpdated: f
|
|
8815
|
-
} = e, u = te(() => c != null && c.field_parent ? { ...c == null ? void 0 : c.fields, [c == null ? void 0 : c.field_parent]: {} } : c == null ? void 0 : c.fields, [c]), m = (c == null ? void 0 : c.fields_in_conditions) !== void 0, p = Q(null), [g, h] = R(!0), [y, b] =
|
|
8815
|
+
} = e, u = te(() => c != null && c.field_parent ? { ...c == null ? void 0 : c.fields, [c == null ? void 0 : c.field_parent]: {} } : c == null ? void 0 : c.fields, [c]), m = (c == null ? void 0 : c.fields_in_conditions) !== void 0, p = Q(null), [g, h] = R(!0), [y, b] = Ae(
|
|
8816
8816
|
W.getHandler().readObjects
|
|
8817
|
-
), [v, C] =
|
|
8817
|
+
), [v, C] = Ae(
|
|
8818
8818
|
W.getHandler().parseConditions
|
|
8819
8819
|
), S = fr(), w = Q({}), _ = F(
|
|
8820
8820
|
(E, I) => I ? o == null ? void 0 : o.some(
|
|
@@ -9105,11 +9105,11 @@ function Py(e, t) {
|
|
|
9105
9105
|
} = e, v = Q(null), C = Q([]), S = Q(!1), { showErrorNotification: w } = St(), { setCurrentSavedSearch: _ } = Vt(), [x, A] = R(), [D, O] = R(!1), M = Q(), E = Q(null), I = Hs({
|
|
9106
9106
|
elementRef: E,
|
|
9107
9107
|
offset: $y
|
|
9108
|
-
}), k = y !== void 0 ? y : I, [T, $] =
|
|
9108
|
+
}), k = y !== void 0 ? y : I, [T, $] = Ae(
|
|
9109
9109
|
W.getHandler().searchCount
|
|
9110
|
-
), [P, V] =
|
|
9110
|
+
), [P, V] = Ae(
|
|
9111
9111
|
W.getHandler().searchForTree
|
|
9112
|
-
), [U, L] =
|
|
9112
|
+
), [U, L] = Ae(
|
|
9113
9113
|
W.getHandler().searchAllIds
|
|
9114
9114
|
);
|
|
9115
9115
|
he(() => () => {
|
|
@@ -9125,7 +9125,7 @@ function Py(e, t) {
|
|
|
9125
9125
|
searchVisible: q,
|
|
9126
9126
|
setSearchVisible: ne,
|
|
9127
9127
|
setSelectedRowItems: re,
|
|
9128
|
-
setTreeFirstVisibleRow:
|
|
9128
|
+
setTreeFirstVisibleRow: ie,
|
|
9129
9129
|
treeFirstVisibleRow: pe,
|
|
9130
9130
|
selectedRowItems: Y,
|
|
9131
9131
|
setSearchParams: ce,
|
|
@@ -9139,19 +9139,19 @@ function Py(e, t) {
|
|
|
9139
9139
|
setSearchQuery: X,
|
|
9140
9140
|
setTotalItems: K,
|
|
9141
9141
|
isActive: fe,
|
|
9142
|
-
order:
|
|
9143
|
-
setOrder:
|
|
9144
|
-
} = Zs({ useLocalState: !c }), ae = u || G, me = Q(ae),
|
|
9142
|
+
order: Se,
|
|
9143
|
+
setOrder: Te
|
|
9144
|
+
} = Zs({ useLocalState: !c }), ae = u || G, me = Q(ae), ke = Q(!1), Me = Q(), tt = Q(), we = Q(!1), Ye = Q(ae), Ee = Q(!1);
|
|
9145
9145
|
he(() => {
|
|
9146
|
-
M.current !== void 0 && M.current !== x && (
|
|
9147
|
-
var
|
|
9148
|
-
(
|
|
9149
|
-
}, 0)), M.current = x,
|
|
9146
|
+
M.current !== void 0 && M.current !== x && (ie == null || ie(0), setTimeout(() => {
|
|
9147
|
+
var ze;
|
|
9148
|
+
(ze = v.current) == null || ze.scrollToTop();
|
|
9149
|
+
}, 0)), M.current = x, Ye.current = ae;
|
|
9150
9150
|
}, [x]), he(() => {
|
|
9151
9151
|
var Et, pt, tn, Wn;
|
|
9152
|
-
const
|
|
9153
|
-
|
|
9154
|
-
|
|
9152
|
+
const ze = ae && ae.trim().length > 0, ct = me.current && typeof me.current == "string" && me.current.trim().length > 0;
|
|
9153
|
+
ze && !ct || ze && ct && ae !== me.current ? (ke.current = !0, ce == null || ce([]), de == null || de({}), Ft([]), (Et = v.current) == null || Et.unselectAll(), ie == null || ie(0), (pt = v.current) == null || pt.scrollToTop()) : !ze && ct && (ke.current = !1, Ft([]), (tn = v.current) == null || tn.unselectAll(), ie == null || ie(0), (Wn = v.current) == null || Wn.scrollToTop(), setTimeout(() => {
|
|
9154
|
+
Ee.current = !0, vt();
|
|
9155
9155
|
}, 0)), me.current = ae;
|
|
9156
9156
|
}, [ae]);
|
|
9157
9157
|
const Be = te(() => {
|
|
@@ -9162,10 +9162,10 @@ function Py(e, t) {
|
|
|
9162
9162
|
strings: Ne,
|
|
9163
9163
|
colorsForResults: Pe,
|
|
9164
9164
|
statusForResults: be,
|
|
9165
|
-
onRowStyle:
|
|
9166
|
-
statusComponent:
|
|
9165
|
+
onRowStyle: $e,
|
|
9166
|
+
statusComponent: se,
|
|
9167
9167
|
onRowStatus: ye,
|
|
9168
|
-
getColumnState:
|
|
9168
|
+
getColumnState: _e,
|
|
9169
9169
|
updateColumnState: Ie,
|
|
9170
9170
|
isColumnStateLoading: Le,
|
|
9171
9171
|
updateAttributes: Ve,
|
|
@@ -9195,13 +9195,13 @@ function Py(e, t) {
|
|
|
9195
9195
|
updateAttributes: Ve,
|
|
9196
9196
|
results: oe,
|
|
9197
9197
|
autoRefresh: b
|
|
9198
|
-
}), Kt = te(() => (Y == null ? void 0 : Y.map((
|
|
9198
|
+
}), Kt = te(() => (Y == null ? void 0 : Y.map((ze) => ze.id)) || [], [Y]), Tn = te(() => {
|
|
9199
9199
|
if (!We)
|
|
9200
9200
|
return;
|
|
9201
|
-
const
|
|
9201
|
+
const ze = ae !== void 0;
|
|
9202
9202
|
return We.map((ct) => ({
|
|
9203
9203
|
...ct,
|
|
9204
|
-
isSortable:
|
|
9204
|
+
isSortable: ze ? !1 : ct.isSortable,
|
|
9205
9205
|
render: (Et, pt) => /* @__PURE__ */ i(
|
|
9206
9206
|
_o,
|
|
9207
9207
|
{
|
|
@@ -9217,20 +9217,20 @@ function Py(e, t) {
|
|
|
9217
9217
|
[a, le]
|
|
9218
9218
|
), sn = F(() => {
|
|
9219
9219
|
const ct = `${JSON.stringify(ae ? a : At)}-${ae}`;
|
|
9220
|
-
return ct !==
|
|
9220
|
+
return ct !== Me.current ? (Me.current = ct, !0) : !1;
|
|
9221
9221
|
}, [a, At, ae]), fn = F(async () => {
|
|
9222
9222
|
if (!ae && !we.current) {
|
|
9223
9223
|
we.current = !0;
|
|
9224
9224
|
try {
|
|
9225
|
-
const
|
|
9225
|
+
const ze = await T({
|
|
9226
9226
|
params: ae ? a : At,
|
|
9227
9227
|
model: n,
|
|
9228
9228
|
context: l,
|
|
9229
9229
|
name_search: ae
|
|
9230
9230
|
});
|
|
9231
|
-
A(
|
|
9232
|
-
} catch (
|
|
9233
|
-
w(
|
|
9231
|
+
A(ze), K(ze);
|
|
9232
|
+
} catch (ze) {
|
|
9233
|
+
w(ze), A((ct) => ct ?? 0), K((ct) => ct ?? 0);
|
|
9234
9234
|
} finally {
|
|
9235
9235
|
we.current = !1;
|
|
9236
9236
|
}
|
|
@@ -9246,16 +9246,16 @@ function Py(e, t) {
|
|
|
9246
9246
|
w
|
|
9247
9247
|
]), an = dt(
|
|
9248
9248
|
async ({
|
|
9249
|
-
startRow:
|
|
9249
|
+
startRow: ze,
|
|
9250
9250
|
endRow: ct,
|
|
9251
9251
|
state: Et
|
|
9252
9252
|
}) => {
|
|
9253
9253
|
if (!Be)
|
|
9254
9254
|
return [];
|
|
9255
9255
|
let pt;
|
|
9256
|
-
if (!S.current &&
|
|
9256
|
+
if (!S.current && Se) {
|
|
9257
9257
|
const bt = sr({
|
|
9258
|
-
state:
|
|
9258
|
+
state: Se
|
|
9259
9259
|
});
|
|
9260
9260
|
pt = Ar(bt);
|
|
9261
9261
|
} else {
|
|
@@ -9266,7 +9266,7 @@ function Py(e, t) {
|
|
|
9266
9266
|
})), qr = bt && (bt == null ? void 0 : bt.length) > 0 ? bt : void 0, Oo = sr({
|
|
9267
9267
|
state: qr
|
|
9268
9268
|
});
|
|
9269
|
-
|
|
9269
|
+
Te == null || Te(qr), pt = Ar(Oo);
|
|
9270
9270
|
}
|
|
9271
9271
|
S.current = !0;
|
|
9272
9272
|
const tn = ae ? a : At, Wn = Ir({
|
|
@@ -9274,8 +9274,8 @@ function Py(e, t) {
|
|
|
9274
9274
|
hasFunctionFieldsToParseConditions: zt && Tt()
|
|
9275
9275
|
}), { results: cn, attrsEvaluated: qn } = await P({
|
|
9276
9276
|
params: tn,
|
|
9277
|
-
limit: ct -
|
|
9278
|
-
offset:
|
|
9277
|
+
limit: ct - ze,
|
|
9278
|
+
offset: ze,
|
|
9279
9279
|
model: n,
|
|
9280
9280
|
fields: N != null && N.field_parent ? { ...N == null ? void 0 : N.fields, [N == null ? void 0 : N.field_parent]: {} } : N == null ? void 0 : N.fields,
|
|
9281
9281
|
context: l,
|
|
@@ -9300,7 +9300,7 @@ function Py(e, t) {
|
|
|
9300
9300
|
J == null || J(bt);
|
|
9301
9301
|
}
|
|
9302
9302
|
if (tt.current = pt, ae ? (A(cn.length), K(cn.length), O(!0)) : O(!1), cn.length === 0)
|
|
9303
|
-
return C.current = [],
|
|
9303
|
+
return C.current = [], ze === 0 && (A(0), K(0)), [];
|
|
9304
9304
|
const Yn = await Yt(
|
|
9305
9305
|
Be,
|
|
9306
9306
|
cn,
|
|
@@ -9312,7 +9312,7 @@ function Py(e, t) {
|
|
|
9312
9312
|
},
|
|
9313
9313
|
[
|
|
9314
9314
|
oe,
|
|
9315
|
-
|
|
9315
|
+
Se,
|
|
9316
9316
|
Re,
|
|
9317
9317
|
a,
|
|
9318
9318
|
At,
|
|
@@ -9323,7 +9323,7 @@ function Py(e, t) {
|
|
|
9323
9323
|
l,
|
|
9324
9324
|
P,
|
|
9325
9325
|
J,
|
|
9326
|
-
|
|
9326
|
+
Te,
|
|
9327
9327
|
O,
|
|
9328
9328
|
X,
|
|
9329
9329
|
K,
|
|
@@ -9358,14 +9358,14 @@ function Py(e, t) {
|
|
|
9358
9358
|
onSelectAll: pr
|
|
9359
9359
|
}), yt = F(
|
|
9360
9360
|
async ({
|
|
9361
|
-
startRow:
|
|
9361
|
+
startRow: ze,
|
|
9362
9362
|
endRow: ct,
|
|
9363
9363
|
state: Et
|
|
9364
9364
|
}) => {
|
|
9365
9365
|
try {
|
|
9366
|
-
j == null || j(!0),
|
|
9366
|
+
j == null || j(!0), ze === 0 && !ae && fn();
|
|
9367
9367
|
const pt = await an({
|
|
9368
|
-
startRow:
|
|
9368
|
+
startRow: ze,
|
|
9369
9369
|
endRow: ct,
|
|
9370
9370
|
state: Et
|
|
9371
9371
|
});
|
|
@@ -9394,7 +9394,7 @@ function Py(e, t) {
|
|
|
9394
9394
|
tableRef: v,
|
|
9395
9395
|
autoRefresh: b
|
|
9396
9396
|
});
|
|
9397
|
-
const
|
|
9397
|
+
const De = ke.current ? Pt : void 0, Ge = Ct(() => !Tn || !Be ? null : /* @__PURE__ */ i(
|
|
9398
9398
|
Es,
|
|
9399
9399
|
{
|
|
9400
9400
|
readonly: !1,
|
|
@@ -9403,22 +9403,22 @@ function Py(e, t) {
|
|
|
9403
9403
|
columns: Tn,
|
|
9404
9404
|
onRequestData: yt,
|
|
9405
9405
|
onRowDoubleClick: s,
|
|
9406
|
-
onRowStyle:
|
|
9406
|
+
onRowStyle: $e,
|
|
9407
9407
|
onRowSelectionChange: h ? void 0 : gt,
|
|
9408
9408
|
onColumnChanged: Ie,
|
|
9409
|
-
onGetColumnsState:
|
|
9410
|
-
onChangeFirstVisibleRowIndex:
|
|
9409
|
+
onGetColumnsState: _e,
|
|
9410
|
+
onChangeFirstVisibleRowIndex: ie,
|
|
9411
9411
|
onGetFirstVisibleRowIndex: Un,
|
|
9412
9412
|
selectedRowKeys: h ? void 0 : Kt,
|
|
9413
9413
|
onSelectionCheckboxClicked: h ? void 0 : mt,
|
|
9414
9414
|
totalRows: x ?? void 0,
|
|
9415
9415
|
footer: Bn,
|
|
9416
9416
|
hasStatusColumn: Be.status !== null,
|
|
9417
|
-
statusComponent:
|
|
9417
|
+
statusComponent: se,
|
|
9418
9418
|
onRowStatus: ye,
|
|
9419
9419
|
strings: Ne,
|
|
9420
|
-
initialSortState:
|
|
9421
|
-
cacheBlockSize:
|
|
9420
|
+
initialSortState: Se,
|
|
9421
|
+
cacheBlockSize: De,
|
|
9422
9422
|
onChangeTableType: p,
|
|
9423
9423
|
autoRefresh: b
|
|
9424
9424
|
}
|
|
@@ -9428,35 +9428,35 @@ function Py(e, t) {
|
|
|
9428
9428
|
k,
|
|
9429
9429
|
yt,
|
|
9430
9430
|
s,
|
|
9431
|
-
|
|
9431
|
+
$e,
|
|
9432
9432
|
h,
|
|
9433
9433
|
gt,
|
|
9434
9434
|
Ie,
|
|
9435
|
-
|
|
9436
|
-
|
|
9435
|
+
_e,
|
|
9436
|
+
ie,
|
|
9437
9437
|
Un,
|
|
9438
9438
|
Kt,
|
|
9439
9439
|
mt,
|
|
9440
9440
|
x,
|
|
9441
9441
|
Bn,
|
|
9442
|
-
|
|
9442
|
+
se,
|
|
9443
9443
|
ye,
|
|
9444
9444
|
Ne,
|
|
9445
|
-
|
|
9446
|
-
|
|
9445
|
+
Se,
|
|
9446
|
+
De,
|
|
9447
9447
|
p,
|
|
9448
9448
|
b
|
|
9449
9449
|
]), Ze = Q(le), lt = Q(q);
|
|
9450
9450
|
Ue(() => {
|
|
9451
|
-
const
|
|
9451
|
+
const ze = !ur(
|
|
9452
9452
|
le,
|
|
9453
9453
|
Ze.current
|
|
9454
9454
|
), ct = lt.current && !q;
|
|
9455
|
-
|
|
9455
|
+
ze && (ct || m === "top") && (Ee.current = !0, vt()), Ze.current = le, lt.current = q;
|
|
9456
9456
|
}, [le, q]);
|
|
9457
9457
|
const vt = F(async () => {
|
|
9458
|
-
var
|
|
9459
|
-
Ft([]), Je(), Qe(),
|
|
9458
|
+
var ze;
|
|
9459
|
+
Ft([]), Je(), Qe(), Me.current = void 0, O(!1), (ze = v == null ? void 0 : v.current) == null || ze.refresh(), Xe();
|
|
9460
9460
|
}, [
|
|
9461
9461
|
Ft,
|
|
9462
9462
|
Je,
|
|
@@ -9496,17 +9496,17 @@ function Py(e, t) {
|
|
|
9496
9496
|
ee
|
|
9497
9497
|
]
|
|
9498
9498
|
), An = F(() => {
|
|
9499
|
-
var
|
|
9500
|
-
Ft([]), (
|
|
9499
|
+
var ze;
|
|
9500
|
+
Ft([]), (ze = v.current) == null || ze.unselectAll(), Z == null || Z(void 0), ce == null || ce([]), de == null || de(void 0);
|
|
9501
9501
|
}, [
|
|
9502
9502
|
Ft,
|
|
9503
9503
|
Z,
|
|
9504
9504
|
ce,
|
|
9505
9505
|
de
|
|
9506
9506
|
]), Jt = F(
|
|
9507
|
-
({ params:
|
|
9507
|
+
({ params: ze, searchValues: ct }) => {
|
|
9508
9508
|
var Et;
|
|
9509
|
-
Ft([]), (Et = v.current) == null || Et.unselectAll(), Z == null || Z(void 0), ce == null || ce(
|
|
9509
|
+
Ft([]), (Et = v.current) == null || Et.unselectAll(), Z == null || Z(void 0), ce == null || ce(ze), de == null || de(ct);
|
|
9510
9510
|
},
|
|
9511
9511
|
[
|
|
9512
9512
|
Ft,
|
|
@@ -9542,9 +9542,9 @@ function Py(e, t) {
|
|
|
9542
9542
|
() => ne == null ? void 0 : ne(!1),
|
|
9543
9543
|
[ne]
|
|
9544
9544
|
), pn = F(
|
|
9545
|
-
({ params:
|
|
9545
|
+
({ params: ze, values: ct, closeSidebar: Et = !0 }) => {
|
|
9546
9546
|
var pt;
|
|
9547
|
-
Ft([]), (pt = v.current) == null || pt.unselectAll(), Z == null || Z(void 0), ce == null || ce(
|
|
9547
|
+
Ft([]), (pt = v.current) == null || pt.unselectAll(), Z == null || Z(void 0), ce == null || ce(ze), de == null || de(ct), ne == null || ne(!Et), Et || vt(), (!ze || ze.length === 0) && (_ == null || _(null));
|
|
9548
9548
|
},
|
|
9549
9549
|
[
|
|
9550
9550
|
Ft,
|
|
@@ -9586,7 +9586,7 @@ function Py(e, t) {
|
|
|
9586
9586
|
)
|
|
9587
9587
|
}
|
|
9588
9588
|
),
|
|
9589
|
-
/* @__PURE__ */ i("div", { ref: E, style: It, children: z || Le ? /* @__PURE__ */ i(it, {}) :
|
|
9589
|
+
/* @__PURE__ */ i("div", { ref: E, style: It, children: z || Le ? /* @__PURE__ */ i(it, {}) : Ge })
|
|
9590
9590
|
] });
|
|
9591
9591
|
}
|
|
9592
9592
|
const ni = Lt(Py), ma = (e, t = "14px -apple-system") => {
|
|
@@ -9824,14 +9824,14 @@ const Hc = Lt(
|
|
|
9824
9824
|
}, [D, u, I]), re = te(() => {
|
|
9825
9825
|
if (I !== null && N && N.length > 0)
|
|
9826
9826
|
return Ly(N, D, 600);
|
|
9827
|
-
}, [N, D, I]),
|
|
9827
|
+
}, [N, D, I]), ie = te(() => p && (I != null && I.columns.some((Y) => Y.sum !== void 0)) ? p - 30 : p, [p, I == null ? void 0 : I.columns]);
|
|
9828
9828
|
return I === null || !re || ((pe = re == null ? void 0 : re.columns) == null ? void 0 : pe.length) === 0 ? /* @__PURE__ */ i(it, { style: { padding: "2rem" } }) : /* @__PURE__ */ B(nr, { children: [
|
|
9829
9829
|
q,
|
|
9830
9830
|
/* @__PURE__ */ i(
|
|
9831
9831
|
Iu,
|
|
9832
9832
|
{
|
|
9833
9833
|
ref: A,
|
|
9834
|
-
height:
|
|
9834
|
+
height: ie,
|
|
9835
9835
|
columns: re.columns,
|
|
9836
9836
|
dataSource: D,
|
|
9837
9837
|
loading: c,
|
|
@@ -9890,7 +9890,7 @@ const Bc = (e) => {
|
|
|
9890
9890
|
searchParams: _ = [],
|
|
9891
9891
|
setSearchValues: x,
|
|
9892
9892
|
clearSelection: A
|
|
9893
|
-
} = e, [D, O] = R(!1), [M, E] = R(!1), [I, k] = R(), [T, $] = R(1), [P, V] = R(0), [U, L] = R(), [N, H] = R([]), [z, j] = R(void 0), [q, ne] = R(void 0), re = Q(S || Pt),
|
|
9893
|
+
} = e, [D, O] = R(!1), [M, E] = R(!1), [I, k] = R(), [T, $] = R(1), [P, V] = R(0), [U, L] = R(), [N, H] = R([]), [z, j] = R(void 0), [q, ne] = R(void 0), re = Q(S || Pt), ie = Q([]), pe = F(
|
|
9894
9894
|
(K) => {
|
|
9895
9895
|
y == null || y([...K]), H([...K]);
|
|
9896
9896
|
},
|
|
@@ -9904,8 +9904,8 @@ const Bc = (e) => {
|
|
|
9904
9904
|
context: l
|
|
9905
9905
|
});
|
|
9906
9906
|
if (L(K.length), f == null || f(K.length), K.length > 0) {
|
|
9907
|
-
const fe = K.map((we) => we == null ? void 0 : we[0]), { colors:
|
|
9908
|
-
|
|
9907
|
+
const fe = K.map((we) => we == null ? void 0 : we[0]), { colors: Se, status: Te } = nn(u), ae = {};
|
|
9908
|
+
Se && (ae.colors = Se), Te && (ae.status = Te);
|
|
9909
9909
|
const me = await W.getHandler().readEvalUiObjects({
|
|
9910
9910
|
model: t,
|
|
9911
9911
|
ids: fe,
|
|
@@ -9913,14 +9913,14 @@ const Bc = (e) => {
|
|
|
9913
9913
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
9914
9914
|
context: l,
|
|
9915
9915
|
attrs: ae
|
|
9916
|
-
}),
|
|
9917
|
-
|
|
9918
|
-
const
|
|
9919
|
-
resultsToSort:
|
|
9916
|
+
}), ke = me[0];
|
|
9917
|
+
ie.current = [...ke], j(or(me[1])), ne(Zr(me[1]));
|
|
9918
|
+
const Me = ke.map((we) => we.id), tt = p !== void 0 ? Qn({
|
|
9919
|
+
resultsToSort: ke,
|
|
9920
9920
|
sorter: p,
|
|
9921
9921
|
fields: { ...u.fields, ...m.fields }
|
|
9922
|
-
}) : [...
|
|
9923
|
-
pe(tt),
|
|
9922
|
+
}) : [...ie.current];
|
|
9923
|
+
pe(tt), Me.length > 0 ? h == null || h(0) : h == null || h(void 0);
|
|
9924
9924
|
} else
|
|
9925
9925
|
pe([]), h == null || h(void 0);
|
|
9926
9926
|
O(!1), c.current = !0;
|
|
@@ -9938,33 +9938,33 @@ const Bc = (e) => {
|
|
|
9938
9938
|
f
|
|
9939
9939
|
]), ee = F(
|
|
9940
9940
|
async (K) => {
|
|
9941
|
-
const { params: fe, newOffset:
|
|
9942
|
-
ae && (
|
|
9943
|
-
const { totalItems:
|
|
9944
|
-
params:
|
|
9941
|
+
const { params: fe, newOffset: Se } = K || {}, Te = on(fe || _, v), { colors: ae, status: me } = nn(u), ke = {};
|
|
9942
|
+
ae && (ke.colors = ae), me && (ke.status = me);
|
|
9943
|
+
const { totalItems: Me, results: tt, attrsEvaluated: we } = await W.getHandler().searchForTree({
|
|
9944
|
+
params: Te,
|
|
9945
9945
|
limit: re.current,
|
|
9946
|
-
offset:
|
|
9946
|
+
offset: Se || P,
|
|
9947
9947
|
model: t,
|
|
9948
9948
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
9949
9949
|
context: l,
|
|
9950
|
-
attrs:
|
|
9950
|
+
attrs: ke
|
|
9951
9951
|
});
|
|
9952
|
-
j(or(we)), ne(Zr(we)),
|
|
9953
|
-
const
|
|
9952
|
+
j(or(we)), ne(Zr(we)), ie.current = [...tt];
|
|
9953
|
+
const Ye = p !== void 0 ? Qn({
|
|
9954
9954
|
resultsToSort: tt,
|
|
9955
9955
|
sorter: p,
|
|
9956
9956
|
fields: { ...u.fields, ...m.fields }
|
|
9957
|
-
}) : [...
|
|
9958
|
-
if (pe(
|
|
9959
|
-
const Be =
|
|
9957
|
+
}) : [...ie.current];
|
|
9958
|
+
if (pe(Ye), b && Ye.length > 0) {
|
|
9959
|
+
const Be = Ye.findIndex(
|
|
9960
9960
|
(We) => C === We.id
|
|
9961
9961
|
);
|
|
9962
9962
|
Be === -1 ? h == null || h(0) : h == null || h(Be);
|
|
9963
9963
|
} else
|
|
9964
9964
|
h == null || h(void 0);
|
|
9965
9965
|
O(!1);
|
|
9966
|
-
const
|
|
9967
|
-
L(
|
|
9966
|
+
const Ee = await Me();
|
|
9967
|
+
L(Ee), f == null || f(Ee);
|
|
9968
9968
|
},
|
|
9969
9969
|
[
|
|
9970
9970
|
h,
|
|
@@ -10009,7 +10009,7 @@ const Bc = (e) => {
|
|
|
10009
10009
|
resultsToSort: Y,
|
|
10010
10010
|
sorter: K,
|
|
10011
10011
|
fields: { ...u.fields, ...m.fields }
|
|
10012
|
-
}) : [...
|
|
10012
|
+
}) : [...ie.current];
|
|
10013
10013
|
pe(fe);
|
|
10014
10014
|
},
|
|
10015
10015
|
[
|
|
@@ -10022,8 +10022,8 @@ const Bc = (e) => {
|
|
|
10022
10022
|
]
|
|
10023
10023
|
), G = F(
|
|
10024
10024
|
(K) => {
|
|
10025
|
-
const { params: fe, searchValues:
|
|
10026
|
-
D || (n == null || n(void 0), r == null || r([]), x == null || x(
|
|
10025
|
+
const { params: fe, searchValues: Se, limit: Te, offset: ae } = K;
|
|
10026
|
+
D || (n == null || n(void 0), r == null || r([]), x == null || x(Se), o == null || o(fe), s == null || s(!1), E(!0), k(void 0), $(1), Te && (re.current = Te, w == null || w(Te)), ae && V(ae), le({
|
|
10027
10027
|
params: fe,
|
|
10028
10028
|
newOffset: ae
|
|
10029
10029
|
}));
|
|
@@ -10054,13 +10054,13 @@ const Bc = (e) => {
|
|
|
10054
10054
|
S
|
|
10055
10055
|
]), oe = F(
|
|
10056
10056
|
async (K) => {
|
|
10057
|
-
const fe = K[(u == null ? void 0 : u.field_parent) || "child_id"],
|
|
10057
|
+
const fe = K[(u == null ? void 0 : u.field_parent) || "child_id"], Se = await W.getHandler().readObjects({
|
|
10058
10058
|
model: t,
|
|
10059
10059
|
ids: fe,
|
|
10060
10060
|
fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
|
|
10061
10061
|
context: l
|
|
10062
10062
|
});
|
|
10063
|
-
return pe([...Y, ...
|
|
10063
|
+
return pe([...Y, ...Se]), await Yt(nn(u), Se, l);
|
|
10064
10064
|
},
|
|
10065
10065
|
[u, t, l, Y, pe]
|
|
10066
10066
|
), X = F(async () => await W.getHandler().searchAllIds({
|
|
@@ -10119,7 +10119,7 @@ function By(e, t) {
|
|
|
10119
10119
|
setSearchParams: q = void 0,
|
|
10120
10120
|
searchVisible: ne = !0,
|
|
10121
10121
|
setSearchVisible: re = void 0,
|
|
10122
|
-
sorter:
|
|
10122
|
+
sorter: ie = void 0,
|
|
10123
10123
|
setSorter: pe = void 0,
|
|
10124
10124
|
setTotalItems: Y = void 0,
|
|
10125
10125
|
setSearchNameSearch: ce = void 0,
|
|
@@ -10137,16 +10137,16 @@ function By(e, t) {
|
|
|
10137
10137
|
submit: X,
|
|
10138
10138
|
clear: K,
|
|
10139
10139
|
fetchResults: fe,
|
|
10140
|
-
tableRefreshing:
|
|
10141
|
-
searchFilterLoading:
|
|
10140
|
+
tableRefreshing: Se,
|
|
10141
|
+
searchFilterLoading: Te,
|
|
10142
10142
|
searchError: ae,
|
|
10143
10143
|
page: me,
|
|
10144
|
-
limit:
|
|
10145
|
-
offset:
|
|
10144
|
+
limit: ke,
|
|
10145
|
+
offset: Me,
|
|
10146
10146
|
results: tt,
|
|
10147
10147
|
requestPageChange: we,
|
|
10148
|
-
changeSort:
|
|
10149
|
-
fetchChildrenForRecord:
|
|
10148
|
+
changeSort: Ye,
|
|
10149
|
+
fetchChildrenForRecord: Ee,
|
|
10150
10150
|
colorsForResults: Be,
|
|
10151
10151
|
statusForResults: We,
|
|
10152
10152
|
totalItems: Ne,
|
|
@@ -10165,7 +10165,7 @@ function By(e, t) {
|
|
|
10165
10165
|
context: u,
|
|
10166
10166
|
formView: x,
|
|
10167
10167
|
treeView: w,
|
|
10168
|
-
sorter:
|
|
10168
|
+
sorter: ie,
|
|
10169
10169
|
setSorter: pe,
|
|
10170
10170
|
setCurrentItemIndex: U,
|
|
10171
10171
|
setResultsActionView: V,
|
|
@@ -10184,17 +10184,17 @@ function By(e, t) {
|
|
|
10184
10184
|
getFields: () => w == null ? void 0 : w.fields
|
|
10185
10185
|
})), he(() => {
|
|
10186
10186
|
h && l && w && (b.current = !1, fe());
|
|
10187
|
-
}, [me,
|
|
10187
|
+
}, [me, Me, h, l, a, w]);
|
|
10188
10188
|
const be = async () => {
|
|
10189
10189
|
y(!1), g(!0), O(void 0), ee == null || ee(!0);
|
|
10190
10190
|
try {
|
|
10191
|
-
await
|
|
10191
|
+
await $e(), y(!0);
|
|
10192
10192
|
} catch (Qe) {
|
|
10193
10193
|
J(Qe), ee == null || ee(!1);
|
|
10194
10194
|
} finally {
|
|
10195
10195
|
g(!1);
|
|
10196
10196
|
}
|
|
10197
|
-
},
|
|
10197
|
+
}, $e = async () => {
|
|
10198
10198
|
S(n);
|
|
10199
10199
|
let Qe = r;
|
|
10200
10200
|
r || (Qe = await W.getHandler().getView({
|
|
@@ -10212,7 +10212,7 @@ function By(e, t) {
|
|
|
10212
10212
|
he(() => {
|
|
10213
10213
|
be();
|
|
10214
10214
|
}, [n]);
|
|
10215
|
-
const
|
|
10215
|
+
const se = F(
|
|
10216
10216
|
(Qe) => {
|
|
10217
10217
|
Z == null || Z(Qe);
|
|
10218
10218
|
},
|
|
@@ -10239,7 +10239,7 @@ function By(e, t) {
|
|
|
10239
10239
|
}));
|
|
10240
10240
|
},
|
|
10241
10241
|
[C, u, $, w]
|
|
10242
|
-
),
|
|
10242
|
+
), _e = F(
|
|
10243
10243
|
async (Qe) => {
|
|
10244
10244
|
const { id: Re } = Qe;
|
|
10245
10245
|
if (w != null && w.isExpandable) {
|
|
@@ -10282,10 +10282,10 @@ function By(e, t) {
|
|
|
10282
10282
|
]),
|
|
10283
10283
|
onClear: K,
|
|
10284
10284
|
limit: G,
|
|
10285
|
-
offset:
|
|
10286
|
-
isSearching:
|
|
10285
|
+
offset: Me,
|
|
10286
|
+
isSearching: Te,
|
|
10287
10287
|
onSubmit: X,
|
|
10288
|
-
onLimitChange:
|
|
10288
|
+
onLimitChange: se,
|
|
10289
10289
|
setSearchFilterHeight: E,
|
|
10290
10290
|
searchError: ae,
|
|
10291
10291
|
searchVisible: ne,
|
|
@@ -10298,21 +10298,21 @@ function By(e, t) {
|
|
|
10298
10298
|
ref: v,
|
|
10299
10299
|
context: u,
|
|
10300
10300
|
total: Ne,
|
|
10301
|
-
limit:
|
|
10301
|
+
limit: ke,
|
|
10302
10302
|
page: me,
|
|
10303
10303
|
treeView: w,
|
|
10304
10304
|
results: tt,
|
|
10305
10305
|
onRequestPageChange: we,
|
|
10306
|
-
loading:
|
|
10307
|
-
onRowClicked:
|
|
10306
|
+
loading: Se,
|
|
10307
|
+
onRowClicked: _e,
|
|
10308
10308
|
scrollY: d || Le,
|
|
10309
10309
|
colorsForResults: Be,
|
|
10310
10310
|
statusForResults: We,
|
|
10311
10311
|
selectedRowKeys: Ve,
|
|
10312
10312
|
onRowSelectionChange: oe,
|
|
10313
|
-
sorter:
|
|
10314
|
-
onChangeSort:
|
|
10315
|
-
onFetchChildrenForRecord: w.isExpandable ?
|
|
10313
|
+
sorter: ie,
|
|
10314
|
+
onChangeSort: Ye,
|
|
10315
|
+
onFetchChildrenForRecord: w.isExpandable ? Ee : void 0,
|
|
10316
10316
|
childField: w.field_parent,
|
|
10317
10317
|
rootTree: f,
|
|
10318
10318
|
onSelectAllRecords: Ie
|
|
@@ -10321,31 +10321,31 @@ function By(e, t) {
|
|
|
10321
10321
|
] }), [
|
|
10322
10322
|
Le,
|
|
10323
10323
|
oe,
|
|
10324
|
-
|
|
10324
|
+
Ye,
|
|
10325
10325
|
K,
|
|
10326
10326
|
Be,
|
|
10327
|
-
|
|
10327
|
+
Ee,
|
|
10328
10328
|
x,
|
|
10329
10329
|
tt,
|
|
10330
10330
|
G,
|
|
10331
|
-
De,
|
|
10332
10331
|
ke,
|
|
10333
|
-
|
|
10334
|
-
|
|
10332
|
+
Me,
|
|
10333
|
+
_e,
|
|
10334
|
+
se,
|
|
10335
10335
|
me,
|
|
10336
10336
|
u,
|
|
10337
10337
|
we,
|
|
10338
10338
|
f,
|
|
10339
10339
|
ae,
|
|
10340
|
-
|
|
10340
|
+
Te,
|
|
10341
10341
|
le,
|
|
10342
10342
|
ne,
|
|
10343
10343
|
Ie,
|
|
10344
10344
|
Ve,
|
|
10345
|
-
|
|
10345
|
+
ie,
|
|
10346
10346
|
We,
|
|
10347
10347
|
X,
|
|
10348
|
-
|
|
10348
|
+
Se,
|
|
10349
10349
|
Ne,
|
|
10350
10350
|
d,
|
|
10351
10351
|
w
|
|
@@ -10398,20 +10398,20 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10398
10398
|
order: q,
|
|
10399
10399
|
setOrder: ne,
|
|
10400
10400
|
limit: re,
|
|
10401
|
-
setLimit:
|
|
10402
|
-
} = Zs({ useLocalState: !s }), { treeMaxLimit: pe } = Gt(), { setCurrentSavedSearch: Y } = Vt(), ce = y ? 0 : Math.min(re, pe), [ee, le] = R(!0), [de, G] = R(), [Z, J] = R([]), [oe, X] = R(!1), K = a || $, fe = Q(K),
|
|
10401
|
+
setLimit: ie
|
|
10402
|
+
} = Zs({ useLocalState: !s }), { treeMaxLimit: pe } = Gt(), { setCurrentSavedSearch: Y } = Vt(), ce = y ? 0 : Math.min(re, pe), [ee, le] = R(!0), [de, G] = R(), [Z, J] = R([]), [oe, X] = R(!1), K = a || $, fe = Q(K), Se = Q(k), Te = Q(S), ae = Q(), me = Q([]), ke = Q(!1), [Me, tt] = Ae(
|
|
10403
10403
|
W.getHandler().parseConditions
|
|
10404
|
-
), we = F((
|
|
10405
|
-
me.current = me.current.map((
|
|
10406
|
-
const Ze =
|
|
10407
|
-
return { ...
|
|
10408
|
-
}), J((
|
|
10409
|
-
const lt =
|
|
10404
|
+
), we = F((De) => {
|
|
10405
|
+
me.current = me.current.map((Ge) => {
|
|
10406
|
+
const Ze = De.find((lt) => lt.id === Ge.id);
|
|
10407
|
+
return { ...Ge, ...Ze };
|
|
10408
|
+
}), J((Ge) => Ge.map((Ze) => {
|
|
10409
|
+
const lt = De.find((vt) => vt.id === Ze.id);
|
|
10410
10410
|
return { ...Ze, ...lt };
|
|
10411
10411
|
}));
|
|
10412
10412
|
}, []), {
|
|
10413
|
-
isFieldLoading:
|
|
10414
|
-
refreshFunctionFields:
|
|
10413
|
+
isFieldLoading: Ye,
|
|
10414
|
+
refreshFunctionFields: Ee,
|
|
10415
10415
|
clearAutorefreshableFields: Be,
|
|
10416
10416
|
addRecordsToCheckFunctionFields: We,
|
|
10417
10417
|
onHasFunctionFieldsToParseConditions: Ne,
|
|
@@ -10427,55 +10427,55 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10427
10427
|
updateAttributes: m,
|
|
10428
10428
|
results: U,
|
|
10429
10429
|
autoRefresh: b
|
|
10430
|
-
}), { showErrorNotification: be } = St(), [
|
|
10430
|
+
}), { showErrorNotification: be } = St(), [$e, se] = Ae(
|
|
10431
10431
|
W.getHandler().searchCount
|
|
10432
|
-
), [ye,
|
|
10432
|
+
), [ye, _e] = Ae(
|
|
10433
10433
|
W.getHandler().searchForTree
|
|
10434
|
-
), [Ie, Le] =
|
|
10434
|
+
), [Ie, Le] = Ae(
|
|
10435
10435
|
W.getHandler().searchAllIds
|
|
10436
10436
|
), Ve = te(
|
|
10437
10437
|
() => on(k || [], c),
|
|
10438
10438
|
[c, k]
|
|
10439
|
-
), Je = te(() => (M == null ? void 0 : M.map((
|
|
10440
|
-
const
|
|
10441
|
-
return
|
|
10439
|
+
), Je = te(() => (M == null ? void 0 : M.map((De) => De.id)) || [], [M]), ft = F(() => {
|
|
10440
|
+
const Ge = `${JSON.stringify(K ? c : Ve)}-${K}`;
|
|
10441
|
+
return Ge !== ae.current ? (ae.current = Ge, !0) : !1;
|
|
10442
10442
|
}, [c, Ve, K]), Xe = F(async () => {
|
|
10443
10443
|
G(void 0), N(0), le(!0);
|
|
10444
10444
|
try {
|
|
10445
|
-
const
|
|
10445
|
+
const De = await $e({
|
|
10446
10446
|
params: K ? c : Ve,
|
|
10447
10447
|
model: o,
|
|
10448
10448
|
context: l,
|
|
10449
10449
|
name_search: K
|
|
10450
10450
|
});
|
|
10451
|
-
G(
|
|
10452
|
-
} catch (
|
|
10453
|
-
be(
|
|
10451
|
+
G(De), N(De);
|
|
10452
|
+
} catch (De) {
|
|
10453
|
+
be(De);
|
|
10454
10454
|
} finally {
|
|
10455
10455
|
le(!1);
|
|
10456
10456
|
}
|
|
10457
10457
|
}, [
|
|
10458
10458
|
N,
|
|
10459
|
-
|
|
10459
|
+
$e,
|
|
10460
10460
|
K,
|
|
10461
10461
|
c,
|
|
10462
10462
|
Ve,
|
|
10463
10463
|
o,
|
|
10464
10464
|
l,
|
|
10465
10465
|
be
|
|
10466
|
-
]), Qe = F(() => A, [A]), Re = F(() => D, [D]), Tt = F((
|
|
10467
|
-
var
|
|
10468
|
-
return (lt = g == null ? void 0 : g.current) != null && lt[(Ze = (
|
|
10466
|
+
]), Qe = F(() => A, [A]), Re = F(() => D, [D]), Tt = F((De) => {
|
|
10467
|
+
var Ge, Ze, lt, vt, It;
|
|
10468
|
+
return (lt = g == null ? void 0 : g.current) != null && lt[(Ze = (Ge = De.node) == null ? void 0 : Ge.data) == null ? void 0 : Ze.id] ? { color: g.current[(It = (vt = De.node) == null ? void 0 : vt.data) == null ? void 0 : It.id] } : {};
|
|
10469
10469
|
}, []), zt = F(
|
|
10470
|
-
(
|
|
10471
|
-
var
|
|
10472
|
-
return (
|
|
10470
|
+
(De) => {
|
|
10471
|
+
var Ge;
|
|
10472
|
+
return (Ge = h == null ? void 0 : h.current) == null ? void 0 : Ge[De.id];
|
|
10473
10473
|
},
|
|
10474
10474
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10475
10475
|
[]
|
|
10476
10476
|
), Kt = F(() => {
|
|
10477
|
-
var
|
|
10478
|
-
_([]), (
|
|
10477
|
+
var De;
|
|
10478
|
+
_([]), (De = d.current) == null || De.unselectAll(), P == null || P(void 0), E == null || E([]), T == null || T(void 0);
|
|
10479
10479
|
}, [
|
|
10480
10480
|
_,
|
|
10481
10481
|
d,
|
|
@@ -10483,9 +10483,9 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10483
10483
|
E,
|
|
10484
10484
|
T
|
|
10485
10485
|
]), Tn = F(
|
|
10486
|
-
({ params:
|
|
10486
|
+
({ params: De, searchValues: Ge }) => {
|
|
10487
10487
|
var Ze;
|
|
10488
|
-
_([]), (Ze = d.current) == null || Ze.unselectAll(), P == null || P(void 0), E == null || E(
|
|
10488
|
+
_([]), (Ze = d.current) == null || Ze.unselectAll(), P == null || P(void 0), E == null || E(De), T == null || T(Ge);
|
|
10489
10489
|
},
|
|
10490
10490
|
[
|
|
10491
10491
|
_,
|
|
@@ -10500,32 +10500,32 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10500
10500
|
), sn = F(async () => {
|
|
10501
10501
|
if (!n || t)
|
|
10502
10502
|
return [];
|
|
10503
|
-
if (
|
|
10503
|
+
if (ke.current)
|
|
10504
10504
|
return [];
|
|
10505
|
-
|
|
10505
|
+
ke.current = !0;
|
|
10506
10506
|
try {
|
|
10507
10507
|
C(!0);
|
|
10508
|
-
let
|
|
10508
|
+
let De;
|
|
10509
10509
|
if (q != null && q.length) {
|
|
10510
10510
|
const mn = sr({
|
|
10511
10511
|
state: q
|
|
10512
10512
|
});
|
|
10513
|
-
|
|
10513
|
+
De = Ar(mn);
|
|
10514
10514
|
}
|
|
10515
|
-
const
|
|
10515
|
+
const Ge = K ? c : Ve, Ze = Ir({
|
|
10516
10516
|
treeOoui: n,
|
|
10517
10517
|
hasFunctionFieldsToParseConditions: Pe && Ne()
|
|
10518
10518
|
});
|
|
10519
10519
|
!K && ft() && Xe();
|
|
10520
10520
|
const { results: lt, attrsEvaluated: vt } = await ye({
|
|
10521
|
-
params:
|
|
10521
|
+
params: Ge,
|
|
10522
10522
|
limit: ce,
|
|
10523
10523
|
offset: y ? 0 : ((z || 1) - 1) * ce,
|
|
10524
10524
|
model: o,
|
|
10525
10525
|
fields: r.field_parent ? { ...r.fields, [r.field_parent]: {} } : r.fields,
|
|
10526
10526
|
context: l,
|
|
10527
10527
|
attrs: Ze,
|
|
10528
|
-
order:
|
|
10528
|
+
order: De,
|
|
10529
10529
|
name_search: K,
|
|
10530
10530
|
skipFunctionFields: Pe,
|
|
10531
10531
|
onIdsRetrieved: (mn) => {
|
|
@@ -10534,7 +10534,7 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10534
10534
|
});
|
|
10535
10535
|
if (L == null || L({
|
|
10536
10536
|
model: o,
|
|
10537
|
-
params:
|
|
10537
|
+
params: Ge,
|
|
10538
10538
|
name_search: K,
|
|
10539
10539
|
context: l
|
|
10540
10540
|
}), V == null || V(lt), K ? (G(lt.length), N(lt.length), X(!0), le(!1)) : X(!1), lt.length === 0) {
|
|
@@ -10543,10 +10543,10 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10543
10543
|
}
|
|
10544
10544
|
const It = await Yt(n, lt, l);
|
|
10545
10545
|
m == null || m(vt, n), C(!1), me.current = [...It], J([...It]);
|
|
10546
|
-
} catch (
|
|
10547
|
-
throw C(!1), be(
|
|
10546
|
+
} catch (De) {
|
|
10547
|
+
throw C(!1), be(De), console.error(De), De;
|
|
10548
10548
|
} finally {
|
|
10549
|
-
|
|
10549
|
+
ke.current = !1;
|
|
10550
10550
|
}
|
|
10551
10551
|
}, [
|
|
10552
10552
|
n,
|
|
@@ -10574,7 +10574,7 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10574
10574
|
N,
|
|
10575
10575
|
be
|
|
10576
10576
|
]), fn = F(async () => {
|
|
10577
|
-
p == null || p(), Be(), le(!0), x(0), _([]), ae.current = void 0, K ||
|
|
10577
|
+
p == null || p(), Be(), le(!0), x(0), _([]), ae.current = void 0, K || Ee(), await sn();
|
|
10578
10578
|
}, [
|
|
10579
10579
|
p,
|
|
10580
10580
|
Be,
|
|
@@ -10582,11 +10582,11 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10582
10582
|
_,
|
|
10583
10583
|
K,
|
|
10584
10584
|
sn,
|
|
10585
|
-
|
|
10585
|
+
Ee
|
|
10586
10586
|
]), an = F(
|
|
10587
|
-
({ params:
|
|
10587
|
+
({ params: De, values: Ge, closeSidebar: Ze = !0 }) => {
|
|
10588
10588
|
var lt;
|
|
10589
|
-
_([]), (lt = d.current) == null || lt.unselectAll(), P == null || P(void 0), E == null || E(
|
|
10589
|
+
_([]), (lt = d.current) == null || lt.unselectAll(), P == null || P(void 0), E == null || E(De), T == null || T(Ge), w == null || w(!Ze), Ze || fn(), (!De || De.length === 0) && (Y == null || Y(null));
|
|
10590
10590
|
},
|
|
10591
10591
|
[
|
|
10592
10592
|
_,
|
|
@@ -10602,7 +10602,7 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10602
10602
|
he(() => {
|
|
10603
10603
|
if (!t)
|
|
10604
10604
|
return () => {
|
|
10605
|
-
|
|
10605
|
+
se(), _e(), Le();
|
|
10606
10606
|
};
|
|
10607
10607
|
}, [t]), he(() => () => {
|
|
10608
10608
|
tt();
|
|
@@ -10617,33 +10617,33 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10617
10617
|
c,
|
|
10618
10618
|
q
|
|
10619
10619
|
]), he(() => {
|
|
10620
|
-
var
|
|
10620
|
+
var De;
|
|
10621
10621
|
if (K !== fe.current) {
|
|
10622
10622
|
if (K !== void 0 && fe.current === void 0 || typeof K == "string" && typeof fe.current == "string" && K !== fe.current) {
|
|
10623
|
-
E == null || E([]), T == null || T({}), (
|
|
10623
|
+
E == null || E([]), T == null || T({}), (De = d.current) == null || De.unselectAll(), fe.current = K;
|
|
10624
10624
|
return;
|
|
10625
10625
|
}
|
|
10626
10626
|
K === void 0 && fe.current !== void 0 && le(!0), fe.current = K;
|
|
10627
10627
|
}
|
|
10628
10628
|
}, [K]), Ue(() => {
|
|
10629
|
-
const
|
|
10629
|
+
const De = !ur(
|
|
10630
10630
|
k,
|
|
10631
|
-
|
|
10632
|
-
),
|
|
10633
|
-
|
|
10631
|
+
Se.current
|
|
10632
|
+
), Ge = Te.current && !S;
|
|
10633
|
+
De && (Ge || f === "top") && fn(), Se.current = k, Te.current = S;
|
|
10634
10634
|
}, [k, S]);
|
|
10635
10635
|
const pr = F(
|
|
10636
|
-
(
|
|
10637
|
-
if (
|
|
10636
|
+
(De, Ge) => {
|
|
10637
|
+
if (Ge === -1) {
|
|
10638
10638
|
u == null || u("infinite");
|
|
10639
10639
|
return;
|
|
10640
10640
|
}
|
|
10641
|
-
x(0), O(void 0), _([]), j(
|
|
10641
|
+
x(0), O(void 0), _([]), j(De), Ge && ie(Ge);
|
|
10642
10642
|
},
|
|
10643
10643
|
[
|
|
10644
10644
|
u,
|
|
10645
10645
|
j,
|
|
10646
|
-
|
|
10646
|
+
ie,
|
|
10647
10647
|
_,
|
|
10648
10648
|
O,
|
|
10649
10649
|
x
|
|
@@ -10654,14 +10654,14 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10654
10654
|
context: l,
|
|
10655
10655
|
totalItems: de
|
|
10656
10656
|
}), [Ie, k, c, o, l, de]), gt = F(async () => {
|
|
10657
|
-
const
|
|
10658
|
-
_ == null || _(
|
|
10657
|
+
const De = await Ft();
|
|
10658
|
+
_ == null || _(De.map((Ge) => ({ id: Ge })));
|
|
10659
10659
|
}, [Ft, _]), mt = te(() => Je.length === 0 ? "unchecked" : Je.length === ce && ce > 0 || Je.length === de ? "checked" : "indeterminate", [Je, ce, de]), yt = F(() => {
|
|
10660
|
-
var
|
|
10661
|
-
mt === "unchecked" ? ((
|
|
10660
|
+
var De, Ge;
|
|
10661
|
+
mt === "unchecked" ? ((De = d.current) == null || De.selectAll(), _(Z.map((Ze) => ({ id: Ze.id })))) : (_([]), (Ge = d.current) == null || Ge.unselectAll());
|
|
10662
10662
|
}, [d, _, Z, mt]), Bn = F(
|
|
10663
|
-
(
|
|
10664
|
-
ne(
|
|
10663
|
+
(De) => {
|
|
10664
|
+
ne(De), x(0), O(void 0), j(1);
|
|
10665
10665
|
},
|
|
10666
10666
|
[
|
|
10667
10667
|
ne,
|
|
@@ -10670,13 +10670,13 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10670
10670
|
x
|
|
10671
10671
|
]
|
|
10672
10672
|
), jn = F(
|
|
10673
|
-
({ id:
|
|
10673
|
+
({ id: De, selected: Ge }) => {
|
|
10674
10674
|
_((Ze) => {
|
|
10675
|
-
if (
|
|
10676
|
-
const lt = Z.find((vt) => vt.id ===
|
|
10677
|
-
return lt && !Ze.some((vt) => vt.id ===
|
|
10675
|
+
if (Ge) {
|
|
10676
|
+
const lt = Z.find((vt) => vt.id === De);
|
|
10677
|
+
return lt && !Ze.some((vt) => vt.id === De) ? [...Ze, lt] : Ze;
|
|
10678
10678
|
}
|
|
10679
|
-
return Ze.filter((lt) => lt.id !==
|
|
10679
|
+
return Ze.filter((lt) => lt.id !== De);
|
|
10680
10680
|
});
|
|
10681
10681
|
},
|
|
10682
10682
|
[Z, _]
|
|
@@ -10686,9 +10686,9 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10686
10686
|
autoRefresh: b
|
|
10687
10687
|
});
|
|
10688
10688
|
const Un = F(
|
|
10689
|
-
async (
|
|
10689
|
+
async (De) => {
|
|
10690
10690
|
var An;
|
|
10691
|
-
const
|
|
10691
|
+
const Ge = De[(r == null ? void 0 : r.field_parent) || "child_id"];
|
|
10692
10692
|
let Ze = r.field_parent ? { ...r.fields, [r.field_parent]: {} } : r.fields;
|
|
10693
10693
|
Pe && (Ze = Object.entries(Ze).reduce(
|
|
10694
10694
|
(Jt, [vn, ln]) => (ln != null && ln.is_function || (Jt[vn] = ln), Jt),
|
|
@@ -10696,14 +10696,14 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10696
10696
|
));
|
|
10697
10697
|
const lt = await W.getHandler().readObjects({
|
|
10698
10698
|
model: o,
|
|
10699
|
-
ids:
|
|
10699
|
+
ids: Ge,
|
|
10700
10700
|
fields: Ze,
|
|
10701
10701
|
context: l
|
|
10702
10702
|
}), vt = await Yt(n, lt, l), It = [...Z, ...vt], mn = Ir({
|
|
10703
10703
|
treeOoui: n
|
|
10704
10704
|
});
|
|
10705
10705
|
try {
|
|
10706
|
-
const Jt = await
|
|
10706
|
+
const Jt = await Me({
|
|
10707
10707
|
conditions: mn,
|
|
10708
10708
|
values: It,
|
|
10709
10709
|
context: l
|
|
@@ -10722,7 +10722,7 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10722
10722
|
n,
|
|
10723
10723
|
Z,
|
|
10724
10724
|
We,
|
|
10725
|
-
|
|
10725
|
+
Me,
|
|
10726
10726
|
m,
|
|
10727
10727
|
d
|
|
10728
10728
|
]
|
|
@@ -10757,7 +10757,7 @@ const jc = Lt(By), jy = Pt, Uy = (e) => {
|
|
|
10757
10757
|
setTreeFirstVisibleColumn: O,
|
|
10758
10758
|
onGetFirstVisibleColumn: Re,
|
|
10759
10759
|
onSortChange: Bn,
|
|
10760
|
-
isFieldLoading:
|
|
10760
|
+
isFieldLoading: Ye,
|
|
10761
10761
|
setSearchVisible: w,
|
|
10762
10762
|
nameSearchFetchCompleted: oe,
|
|
10763
10763
|
nameSearch: K,
|
|
@@ -10920,7 +10920,7 @@ const qy = rt(ri), Xt = (e) => {
|
|
|
10920
10920
|
}) => {
|
|
10921
10921
|
const r = Q(), o = ve(
|
|
10922
10922
|
yn
|
|
10923
|
-
), { processAction: s } = o || {}, [a, d] =
|
|
10923
|
+
), { processAction: s } = o || {}, [a, d] = Ae(
|
|
10924
10924
|
W.getHandler().treeButOpen
|
|
10925
10925
|
), { showErrorNotification: c } = St();
|
|
10926
10926
|
return he(() => () => {
|
|
@@ -11014,7 +11014,7 @@ function Ky(e, t) {
|
|
|
11014
11014
|
refresh: q,
|
|
11015
11015
|
onRowStatus: ne,
|
|
11016
11016
|
onGetFirstVisibleRowIndex: re,
|
|
11017
|
-
setTreeFirstVisibleRow:
|
|
11017
|
+
setTreeFirstVisibleRow: ie,
|
|
11018
11018
|
onRowHasBeenSelected: pe,
|
|
11019
11019
|
onSearchFilterClear: Y,
|
|
11020
11020
|
onSearchFilterSubmit: ce,
|
|
@@ -11028,16 +11028,16 @@ function Ky(e, t) {
|
|
|
11028
11028
|
treeIsLoading: X,
|
|
11029
11029
|
selectAllRecords: K,
|
|
11030
11030
|
onHeaderCheckboxClick: fe,
|
|
11031
|
-
headerCheckboxState:
|
|
11032
|
-
currentPage:
|
|
11031
|
+
headerCheckboxState: Se,
|
|
11032
|
+
currentPage: Te,
|
|
11033
11033
|
limit: ae,
|
|
11034
11034
|
order: me,
|
|
11035
|
-
setTreeFirstVisibleColumn:
|
|
11036
|
-
onGetFirstVisibleColumn:
|
|
11035
|
+
setTreeFirstVisibleColumn: ke,
|
|
11036
|
+
onGetFirstVisibleColumn: Me,
|
|
11037
11037
|
onSortChange: tt,
|
|
11038
11038
|
isFieldLoading: we,
|
|
11039
|
-
setSearchVisible:
|
|
11040
|
-
nameSearchFetchCompleted:
|
|
11039
|
+
setSearchVisible: Ye,
|
|
11040
|
+
nameSearchFetchCompleted: Ee,
|
|
11041
11041
|
nameSearch: Be,
|
|
11042
11042
|
fetchChildrenForRecord: We
|
|
11043
11043
|
} = Uy({
|
|
@@ -11079,7 +11079,7 @@ function Ky(e, t) {
|
|
|
11079
11079
|
parentContext: l
|
|
11080
11080
|
}), be = Xt((Re) => {
|
|
11081
11081
|
N ? Pe(Re) : C(Re);
|
|
11082
|
-
}),
|
|
11082
|
+
}), $e = Xt(q), [se, ye, _e] = Ws({
|
|
11083
11083
|
ooui: O,
|
|
11084
11084
|
model: n,
|
|
11085
11085
|
showEmptyValues: !0,
|
|
@@ -11092,7 +11092,7 @@ function Ky(e, t) {
|
|
|
11092
11092
|
refreshResults: q,
|
|
11093
11093
|
getFields: () => w == null ? void 0 : w.fields
|
|
11094
11094
|
}));
|
|
11095
|
-
const Ie = te(() =>
|
|
11095
|
+
const Ie = te(() => _e ? /* @__PURE__ */ i(Us, { aggregates: ye, isLoading: se }) : null, [ye, se, _e]), Le = F(
|
|
11096
11096
|
(Re) => /* @__PURE__ */ i(Pn, { color: Re, style: { marginLeft: 7 } }),
|
|
11097
11097
|
[]
|
|
11098
11098
|
), Ve = te(
|
|
@@ -11102,7 +11102,7 @@ function Ky(e, t) {
|
|
|
11102
11102
|
...d ? {} : { display: "none" }
|
|
11103
11103
|
}),
|
|
11104
11104
|
[D, d]
|
|
11105
|
-
), Je = Be !== void 0 &&
|
|
11105
|
+
), Je = Be !== void 0 && Ee, ft = Je && G !== void 0 && G !== null && G === Pt, Xe = te(() => typeof G != "number" || isNaN(G) || G < 0 ? (J == null ? void 0 : J.length) || 0 : G || 0, [G, J]), Qe = te(() => (J == null ? void 0 : J.length) > 0 && (typeof G != "number" || isNaN(G) || G < 0) ? J == null ? void 0 : J.length : f ? Pt : ae || jy, [J == null ? void 0 : J.length, G, f, ae]);
|
|
11106
11106
|
return /* @__PURE__ */ B($n, { children: [
|
|
11107
11107
|
!N && !p && /* @__PURE__ */ i(
|
|
11108
11108
|
Wy,
|
|
@@ -11125,7 +11125,7 @@ function Ky(e, t) {
|
|
|
11125
11125
|
{
|
|
11126
11126
|
total: Xe,
|
|
11127
11127
|
totalRowsLoading: de,
|
|
11128
|
-
page: f ? 1 :
|
|
11128
|
+
page: f ? 1 : Te || 1,
|
|
11129
11129
|
pageSize: Qe,
|
|
11130
11130
|
maxPageSize: S,
|
|
11131
11131
|
currentPageSelectedCount: j.length,
|
|
@@ -11137,7 +11137,7 @@ function Ky(e, t) {
|
|
|
11137
11137
|
customMiddleComponent: ft && /* @__PURE__ */ i(
|
|
11138
11138
|
ti,
|
|
11139
11139
|
{
|
|
11140
|
-
onFilterSearchClick: () =>
|
|
11140
|
+
onFilterSearchClick: () => Ye(!0)
|
|
11141
11141
|
}
|
|
11142
11142
|
)
|
|
11143
11143
|
}
|
|
@@ -11155,18 +11155,18 @@ function Ky(e, t) {
|
|
|
11155
11155
|
onRowHasBeenSelected: g ? void 0 : pe,
|
|
11156
11156
|
updateColumnState: k,
|
|
11157
11157
|
getColumnState: I,
|
|
11158
|
-
setTreeFirstVisibleRow:
|
|
11158
|
+
setTreeFirstVisibleRow: ie,
|
|
11159
11159
|
onGetFirstVisibleRowIndex: re,
|
|
11160
|
-
onGetFirstVisibleColumn:
|
|
11161
|
-
setTreeFirstVisibleColumn:
|
|
11160
|
+
onGetFirstVisibleColumn: Me,
|
|
11161
|
+
setTreeFirstVisibleColumn: ke,
|
|
11162
11162
|
footerComp: Ie,
|
|
11163
11163
|
statusComp: Le,
|
|
11164
11164
|
onRowStatus: ne,
|
|
11165
11165
|
onRowStyle: Z,
|
|
11166
|
-
headerCheckboxState: g ? "unchecked" :
|
|
11166
|
+
headerCheckboxState: g ? "unchecked" : Se,
|
|
11167
11167
|
onHeaderCheckboxClick: g ? () => {
|
|
11168
11168
|
} : fe,
|
|
11169
|
-
refresh:
|
|
11169
|
+
refresh: $e,
|
|
11170
11170
|
actionViewSortState: me,
|
|
11171
11171
|
onSortChange: tt,
|
|
11172
11172
|
tableRef: b,
|
|
@@ -11195,9 +11195,9 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
11195
11195
|
savedSearches: p,
|
|
11196
11196
|
searchParams: g,
|
|
11197
11197
|
isActive: h
|
|
11198
|
-
} = Vt(), [y] =
|
|
11198
|
+
} = Vt(), [y] = Ae(
|
|
11199
11199
|
W.getHandler().searchAllIds
|
|
11200
|
-
), [b] =
|
|
11200
|
+
), [b] = Ae(
|
|
11201
11201
|
W.getHandler().readEvalUiObjects
|
|
11202
11202
|
), v = F(async () => {
|
|
11203
11203
|
if (!l || !e) {
|
|
@@ -11521,19 +11521,19 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
11521
11521
|
permissions: k,
|
|
11522
11522
|
permissionsLoading: T,
|
|
11523
11523
|
permissionsError: $
|
|
11524
|
-
} = e, [P, V] = R(!1), [U, L] = R(!1), [N, H] = R(!1), [z, j] = R(!0), [q, ne] = R(!0), [re,
|
|
11524
|
+
} = e, [P, V] = R(!1), [U, L] = R(!1), [N, H] = R(!1), [z, j] = R(!0), [q, ne] = R(!0), [re, ie] = R([]), [pe, Y] = R(!1), [ce, ee] = R(
|
|
11525
11525
|
M || []
|
|
11526
11526
|
), [le, de] = R(!1), [G, Z] = R(!0), [J, oe] = R(), X = F(() => {
|
|
11527
11527
|
oe(n), c();
|
|
11528
|
-
}, [n, c, oe]), K = te(() => !s || s.length === 0 ? (n == null ? void 0 : n.fields) || {} : s.reduce((Je, ft) => ({ ...Je, ...ft.fields || {} }), {}), [s, n]), [fe,
|
|
11528
|
+
}, [n, c, oe]), K = te(() => !s || s.length === 0 ? (n == null ? void 0 : n.fields) || {} : s.reduce((Je, ft) => ({ ...Je, ...ft.fields || {} }), {}), [s, n]), [fe, Se] = R(
|
|
11529
11529
|
Bl(M || [], K)
|
|
11530
|
-
), [
|
|
11530
|
+
), [Te, ae] = R(0), [me, ke] = R(void 0), [Me, tt] = R(), [we, Ye] = R(Mn), [Ee, Be] = R(
|
|
11531
11531
|
I
|
|
11532
11532
|
), [We, Ne] = R(
|
|
11533
11533
|
D !== void 0 ? D : Pt
|
|
11534
|
-
), [Pe, be] = R(r), [
|
|
11534
|
+
), [Pe, be] = R(r), [$e, se] = R(
|
|
11535
11535
|
E || 1
|
|
11536
|
-
), [ye,
|
|
11536
|
+
), [ye, _e] = R(null), [Ie, Le] = R([]);
|
|
11537
11537
|
he(() => {
|
|
11538
11538
|
m && m.length > 0 && !p && (g == null || g(0), f == null || f(m[0].id));
|
|
11539
11539
|
}, [m]), he(() => {
|
|
@@ -11585,7 +11585,7 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
11585
11585
|
viewIsLoading: q,
|
|
11586
11586
|
setViewIsLoading: ne,
|
|
11587
11587
|
attachments: re,
|
|
11588
|
-
setAttachments:
|
|
11588
|
+
setAttachments: ie,
|
|
11589
11589
|
selectedRowItems: w,
|
|
11590
11590
|
setSelectedRowItems: S,
|
|
11591
11591
|
duplicatingItem: pe,
|
|
@@ -11606,25 +11606,25 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
11606
11606
|
setPreviousView: oe,
|
|
11607
11607
|
goToResourceId: A,
|
|
11608
11608
|
searchValues: fe,
|
|
11609
|
-
setSearchValues:
|
|
11609
|
+
setSearchValues: Se,
|
|
11610
11610
|
limit: We,
|
|
11611
11611
|
setLimit: Ne,
|
|
11612
11612
|
setTitle: be,
|
|
11613
11613
|
isActive: O,
|
|
11614
11614
|
setTreeFirstVisibleRow: ae,
|
|
11615
|
-
treeFirstVisibleRow:
|
|
11615
|
+
treeFirstVisibleRow: Te,
|
|
11616
11616
|
treeFirstVisibleColumn: me,
|
|
11617
|
-
setTreeFirstVisibleColumn:
|
|
11618
|
-
searchQuery:
|
|
11617
|
+
setTreeFirstVisibleColumn: ke,
|
|
11618
|
+
searchQuery: Me,
|
|
11619
11619
|
setSearchQuery: tt,
|
|
11620
11620
|
treeType: we,
|
|
11621
|
-
setTreeType:
|
|
11622
|
-
order:
|
|
11621
|
+
setTreeType: Ye,
|
|
11622
|
+
order: Ee,
|
|
11623
11623
|
setOrder: Be,
|
|
11624
|
-
currentPage:
|
|
11625
|
-
setCurrentPage:
|
|
11624
|
+
currentPage: $e,
|
|
11625
|
+
setCurrentPage: se,
|
|
11626
11626
|
currentSavedSearch: ye,
|
|
11627
|
-
setCurrentSavedSearch:
|
|
11627
|
+
setCurrentSavedSearch: _e,
|
|
11628
11628
|
savedSearches: Ie,
|
|
11629
11629
|
setSavedSearches: Le,
|
|
11630
11630
|
permissions: k,
|
|
@@ -11753,7 +11753,7 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
11753
11753
|
viewData: l
|
|
11754
11754
|
} = e, [f, u] = R(!1), [m, p] = R(), g = ve(
|
|
11755
11755
|
Bt
|
|
11756
|
-
), { setGraphIsLoading: h = void 0 } = g || {}, [y] =
|
|
11756
|
+
), { setGraphIsLoading: h = void 0 } = g || {}, [y] = Ae(W.getHandler().getView);
|
|
11757
11757
|
Ut(t, () => ({
|
|
11758
11758
|
refresh: () => {
|
|
11759
11759
|
b();
|
|
@@ -11822,7 +11822,7 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
11822
11822
|
return /* @__PURE__ */ i(Ce, { children: `Graph ${m.type} not implemented` });
|
|
11823
11823
|
}
|
|
11824
11824
|
}, Hn = Lt(ev), tv = (e) => {
|
|
11825
|
-
const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: s } = e, [a, d] = R(!1), [c, l] = R(), [f, u] = R(), [m] =
|
|
11825
|
+
const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: s } = e, [a, d] = R(!1), [c, l] = R(), [f, u] = R(), [m] = Ae(
|
|
11826
11826
|
W.getHandler().readForView
|
|
11827
11827
|
), p = F(async () => {
|
|
11828
11828
|
d(!0), l(void 0), s && n.push(["id", "in", s]);
|
|
@@ -11995,9 +11995,9 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
11995
11995
|
}
|
|
11996
11996
|
);
|
|
11997
11997
|
}, ov = (e) => {
|
|
11998
|
-
const [t, n] =
|
|
11998
|
+
const [t, n] = Ae(
|
|
11999
11999
|
W.getHandler().execute
|
|
12000
|
-
), [r, o] =
|
|
12000
|
+
), [r, o] = Ae(
|
|
12001
12001
|
W.getHandler().search
|
|
12002
12002
|
);
|
|
12003
12003
|
he(() => () => {
|
|
@@ -12084,7 +12084,7 @@ const Uc = Lt(Ky), { useToken: Jy } = ot, Wc = ({
|
|
|
12084
12084
|
cancelRequest: d
|
|
12085
12085
|
};
|
|
12086
12086
|
}, Yc = (e) => {
|
|
12087
|
-
const { model: t, view_id: n, fixedHeight: r, autoRefresh: o, actionDomain: s } = e, [a, d] = R(), c = Q(null), l = Q(null), { isActive: f } = Vt(), u = fr(), m = Ct(() => _l(s || []), [s]), [p, g] =
|
|
12087
|
+
const { model: t, view_id: n, fixedHeight: r, autoRefresh: o, actionDomain: s } = e, [a, d] = R(), c = Q(null), l = Q(null), { isActive: f } = Vt(), u = fr(), m = Ct(() => _l(s || []), [s]), [p, g] = Ae(
|
|
12088
12088
|
W.getHandler().search
|
|
12089
12089
|
);
|
|
12090
12090
|
he(() => () => {
|
|
@@ -12140,10 +12140,10 @@ function sv(e) {
|
|
|
12140
12140
|
treeExpandable: c,
|
|
12141
12141
|
fixedHeight: l,
|
|
12142
12142
|
autoRefresh: f
|
|
12143
|
-
} = e, [u, m] = R(!1), [p, g] = R(!1), [h, y] = R(), [b, v] = R(), [C, S] = R(), [w, _] = R(1), [x, A] = R(0), D = Q(Pt), O = Q([]), [M, E] = R(0), [I, k] = R([]), [T, $] = R(void 0), [P, V] = R(), [U, L] = R(), [N, H] = R(), [z, j] = R(!1), [q, ne] = R(Mn), re = Q([]), { treeMaxLimit:
|
|
12143
|
+
} = e, [u, m] = R(!1), [p, g] = R(!1), [h, y] = R(), [b, v] = R(), [C, S] = R(), [w, _] = R(1), [x, A] = R(0), D = Q(Pt), O = Q([]), [M, E] = R(0), [I, k] = R([]), [T, $] = R(void 0), [P, V] = R(), [U, L] = R(), [N, H] = R(), [z, j] = R(!1), [q, ne] = R(Mn), re = Q([]), { treeMaxLimit: ie } = Gt(), pe = (oe) => {
|
|
12144
12144
|
j(!0), _(oe), A((oe - 1) * D.current);
|
|
12145
12145
|
}, Y = async () => {
|
|
12146
|
-
const oe = re.current.length > 0 ? re.current : s, X = on(O.current, oe), { colors: K } = nn(b), { totalItems: fe, results:
|
|
12146
|
+
const oe = re.current.length > 0 ? re.current : s, X = on(O.current, oe), { colors: K } = nn(b), { totalItems: fe, results: Se, attrsEvaluated: Te } = await W.getHandler().searchForTree({
|
|
12147
12147
|
params: X,
|
|
12148
12148
|
limit: D.current,
|
|
12149
12149
|
offset: x,
|
|
@@ -12152,9 +12152,9 @@ function sv(e) {
|
|
|
12152
12152
|
context: d,
|
|
12153
12153
|
attrs: K && { colors: K }
|
|
12154
12154
|
});
|
|
12155
|
-
$(or(
|
|
12155
|
+
$(or(Te));
|
|
12156
12156
|
const ae = Qn({
|
|
12157
|
-
resultsToSort:
|
|
12157
|
+
resultsToSort: Se,
|
|
12158
12158
|
sorter: P,
|
|
12159
12159
|
fields: { ...b.fields, ...C.fields }
|
|
12160
12160
|
});
|
|
@@ -12210,10 +12210,10 @@ function sv(e) {
|
|
|
12210
12210
|
const oe = xl({
|
|
12211
12211
|
treeView: b,
|
|
12212
12212
|
limit: D.current,
|
|
12213
|
-
treeMaxLimit:
|
|
12213
|
+
treeMaxLimit: ie
|
|
12214
12214
|
});
|
|
12215
12215
|
ne(oe);
|
|
12216
|
-
}, [b,
|
|
12216
|
+
}, [b, ie]), he(() => {
|
|
12217
12217
|
t ? ee("action") : n && ee("model");
|
|
12218
12218
|
}, [t, n]);
|
|
12219
12219
|
const G = F((oe) => {
|
|
@@ -12292,10 +12292,10 @@ function sv(e) {
|
|
|
12292
12292
|
}
|
|
12293
12293
|
const Gc = rt(sv), { useToken: iv } = ot, av = 3 * 1e3, lv = (e) => {
|
|
12294
12294
|
const { ooui: t } = e, { refreshCounter: n } = $r(), r = t.actionId !== void 0, o = t.actionField !== void 0;
|
|
12295
|
-
return /* @__PURE__ */ i(
|
|
12295
|
+
return /* @__PURE__ */ i(Ke, { ooui: t, children: r || o ? /* @__PURE__ */ i(nr, { children: /* @__PURE__ */ i(dv, { ooui: t }, n) }) : /* @__PURE__ */ i(cv, { ooui: t }, n) });
|
|
12296
12296
|
}, cv = (e) => {
|
|
12297
12297
|
var x;
|
|
12298
|
-
const { token: t } = iv(), { ooui: n, value: r } = e, { locale: o } = xe(), { getContext: s } = $r(), [a, d] = R(n.icon), [c, l] = R(n.color), [f, u] = R(null), [m, p] = R(!1), [g, h] =
|
|
12298
|
+
const { token: t } = iv(), { ooui: n, value: r } = e, { locale: o } = xe(), { getContext: s } = $r(), [a, d] = R(n.icon), [c, l] = R(n.color), [f, u] = R(null), [m, p] = R(!1), [g, h] = Ae(
|
|
12299
12299
|
W.getHandler().parseCondition
|
|
12300
12300
|
), { fetchReferenceValues: y } = ov({
|
|
12301
12301
|
context: s == null ? void 0 : s()
|
|
@@ -12526,11 +12526,11 @@ const Gc = rt(sv), { useToken: iv } = ot, av = 3 * 1e3, lv = (e) => {
|
|
|
12526
12526
|
}
|
|
12527
12527
|
`, mv = (e) => {
|
|
12528
12528
|
const { ooui: t } = e;
|
|
12529
|
-
return /* @__PURE__ */ i(
|
|
12529
|
+
return /* @__PURE__ */ i(Ke, { type: "array", ...e, children: /* @__PURE__ */ i(pv, { ooui: t }) });
|
|
12530
12530
|
}, pv = (e) => {
|
|
12531
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [a, d] = R([]), [c, l] = R(), [f, u] = R(!1), { relation: m, context: p, readOnly: g, field: h } = n, y = ve(st), { getContext: b } = y || {}, [v, C] =
|
|
12531
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((O) => O.operation !== "pendingRemove").map((O) => O.id), [a, d] = R([]), [c, l] = R(), [f, u] = R(!1), { relation: m, context: p, readOnly: g, field: h } = n, y = ve(st), { getContext: b } = y || {}, [v, C] = Ae(
|
|
12532
12532
|
W.getHandler().evalDomain
|
|
12533
|
-
), [S, w] =
|
|
12533
|
+
), [S, w] = Ae(
|
|
12534
12534
|
W.getHandler().search
|
|
12535
12535
|
);
|
|
12536
12536
|
he(() => () => {
|
|
@@ -12616,7 +12616,7 @@ const Gc = rt(sv), { useToken: iv } = ot, av = 3 * 1e3, lv = (e) => {
|
|
|
12616
12616
|
) }) });
|
|
12617
12617
|
}, hv = (e) => {
|
|
12618
12618
|
const { ooui: t } = e;
|
|
12619
|
-
return /* @__PURE__ */ i(nr, { children: /* @__PURE__ */ i(
|
|
12619
|
+
return /* @__PURE__ */ i(nr, { children: /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(gv, { ...e, ooui: t }) }) });
|
|
12620
12620
|
}, gv = (e) => {
|
|
12621
12621
|
var u, m, p;
|
|
12622
12622
|
const { value: t, ooui: n } = e, r = ve(
|
|
@@ -12691,9 +12691,9 @@ const Gc = rt(sv), { useToken: iv } = ot, av = 3 * 1e3, lv = (e) => {
|
|
|
12691
12691
|
formContext: n,
|
|
12692
12692
|
disabled: r
|
|
12693
12693
|
}) => {
|
|
12694
|
-
const [o, s] = R(!1), [a, d] =
|
|
12694
|
+
const [o, s] = R(!1), [a, d] = Ae(
|
|
12695
12695
|
W.getHandler().getActionData
|
|
12696
|
-
), [c, l] =
|
|
12696
|
+
), [c, l] = Ae(
|
|
12697
12697
|
W.getHandler().execute
|
|
12698
12698
|
);
|
|
12699
12699
|
he(() => () => {
|
|
@@ -12760,7 +12760,7 @@ const Gc = rt(sv), { useToken: iv } = ot, av = 3 * 1e3, lv = (e) => {
|
|
|
12760
12760
|
children: e.name
|
|
12761
12761
|
}
|
|
12762
12762
|
);
|
|
12763
|
-
}, vv = 200, bv = (e) => /* @__PURE__ */ i(
|
|
12763
|
+
}, vv = 200, bv = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(wv, { ooui: e.ooui, value: e.value }) }), wv = (e) => {
|
|
12764
12764
|
const { value: t, ooui: n } = e;
|
|
12765
12765
|
if (!t)
|
|
12766
12766
|
return null;
|
|
@@ -13017,7 +13017,7 @@ const xv = (e) => {
|
|
|
13017
13017
|
fieldDefs: s,
|
|
13018
13018
|
onAutorefreshableFieldsChange: a,
|
|
13019
13019
|
isActive: d
|
|
13020
|
-
} = e, c = Q(null), [l, f] = R(!0), [u, m] =
|
|
13020
|
+
} = e, c = Q(null), [l, f] = R(!0), [u, m] = Ae(
|
|
13021
13021
|
W.getHandler().readObjects
|
|
13022
13022
|
), p = fr();
|
|
13023
13023
|
he(() => {
|
|
@@ -13131,28 +13131,28 @@ function Nv(e, t) {
|
|
|
13131
13131
|
forcedValues: x = {},
|
|
13132
13132
|
parentWidth: A,
|
|
13133
13133
|
onMustRefreshParent: D
|
|
13134
|
-
} = e, { t: O } = xe(), [M, E] = R(!1), [I, k] = R(), [T, $] = R(), [P] = Nt.useForm(), [V, U] = R(), [L, N] = R(), H = ve(zc), [z, j] = R(), [q, ne] = R(!1), [re,
|
|
13134
|
+
} = e, { t: O } = xe(), [M, E] = R(!1), [I, k] = R(), [T, $] = R(), [P] = Nt.useForm(), [V, U] = R(), [L, N] = R(), H = ve(zc), [z, j] = R(), [q, ne] = R(!1), [re, ie] = R(0), pe = Q(), Y = Q({}), ce = Q(null), ee = Q({}), le = Q({}), de = Q(!1), G = Q(!1), Z = Q(!1), oe = (A !== void 0 ? A : z) < $v, X = ve(st), { activeId: K, getPlainValues: fe } = X || {}, Se = Q(!1), Te = ve(
|
|
13135
13135
|
Bt
|
|
13136
13136
|
), {
|
|
13137
13137
|
setFormIsSaving: ae = void 0,
|
|
13138
13138
|
setFormHasChanges: me = void 0,
|
|
13139
|
-
setCurrentId:
|
|
13140
|
-
setFormIsLoading:
|
|
13139
|
+
setCurrentId: ke = void 0,
|
|
13140
|
+
setFormIsLoading: Me = void 0,
|
|
13141
13141
|
setAttachments: tt = void 0,
|
|
13142
13142
|
title: we = void 0,
|
|
13143
|
-
setTitle:
|
|
13144
|
-
isActive:
|
|
13145
|
-
} = (w ?
|
|
13143
|
+
setTitle: Ye = void 0,
|
|
13144
|
+
isActive: Ee = void 0
|
|
13145
|
+
} = (w ? Te : {}) || {}, Be = ve(
|
|
13146
13146
|
yn
|
|
13147
13147
|
), { processAction: We, globalValues: Ne } = Be || {}, Pe = ve(
|
|
13148
13148
|
qt
|
|
13149
|
-
), { openAction: be } = Pe || {}, { onActionTriggered:
|
|
13149
|
+
), { openAction: be } = Pe || {}, { onActionTriggered: $e } = Gt(), { showErrorNotification: se } = St({
|
|
13150
13150
|
onButtonAction: (ue) => {
|
|
13151
13151
|
cn({ actionData: ue });
|
|
13152
13152
|
}
|
|
13153
13153
|
}), {
|
|
13154
13154
|
fieldMessages: ye,
|
|
13155
|
-
setFieldMessage:
|
|
13155
|
+
setFieldMessage: _e,
|
|
13156
13156
|
getFieldMessage: Ie,
|
|
13157
13157
|
getFieldMessageType: Le,
|
|
13158
13158
|
clearFieldMessage: Ve,
|
|
@@ -13168,7 +13168,7 @@ function Nv(e, t) {
|
|
|
13168
13168
|
fetchValues: Ze,
|
|
13169
13169
|
cancelUnsavedChanges: lt,
|
|
13170
13170
|
clearAndReload: () => {
|
|
13171
|
-
pe.current = void 0, $(void 0),
|
|
13171
|
+
pe.current = void 0, $(void 0), Ge();
|
|
13172
13172
|
}
|
|
13173
13173
|
})), he(() => {
|
|
13174
13174
|
if (k(void 0), Je(), !(!n && !h)) {
|
|
@@ -13176,7 +13176,7 @@ function Nv(e, t) {
|
|
|
13176
13176
|
pe.current = void 0, $(void 0);
|
|
13177
13177
|
return;
|
|
13178
13178
|
}
|
|
13179
|
-
(r === void 0 && L || r !== void 0 && L && r < 0) && (pe.current = void 0, $(void 0)),
|
|
13179
|
+
(r === void 0 && L || r !== void 0 && L && r < 0) && (pe.current = void 0, $(void 0)), Ge();
|
|
13180
13180
|
}
|
|
13181
13181
|
}, [r, n, g, h, S]), he(() => {
|
|
13182
13182
|
q && (hr({
|
|
@@ -13191,11 +13191,11 @@ function Nv(e, t) {
|
|
|
13191
13191
|
...Fe,
|
|
13192
13192
|
type: ge.type || "error"
|
|
13193
13193
|
}))) || []
|
|
13194
|
-
),
|
|
13194
|
+
), se(I);
|
|
13195
13195
|
}
|
|
13196
13196
|
}, [I]);
|
|
13197
|
-
const Xe = (ue, ge, Fe,
|
|
13198
|
-
me == null || me(!1), ae == null || ae(!1), a == null || a(ue, ge, Fe,
|
|
13197
|
+
const Xe = (ue, ge, Fe, Oe) => {
|
|
13198
|
+
me == null || me(!1), ae == null || ae(!1), a == null || a(ue, ge, Fe, Oe), ke == null || ke(ue), Se.current && (D == null || D());
|
|
13199
13199
|
}, Qe = (ue) => {
|
|
13200
13200
|
ae == null || ae(!1), f == null || f(ue);
|
|
13201
13201
|
}, Re = F(() => r || pe.current, [r]), Tt = r || pe.current;
|
|
@@ -13204,9 +13204,9 @@ function Nv(e, t) {
|
|
|
13204
13204
|
}
|
|
13205
13205
|
function Kt() {
|
|
13206
13206
|
const ue = mt(), ge = zt(), Fe = {};
|
|
13207
|
-
return Object.keys(ue).forEach((
|
|
13208
|
-
const He = ue[
|
|
13209
|
-
ge[
|
|
13207
|
+
return Object.keys(ue).forEach((Oe) => {
|
|
13208
|
+
const He = ue[Oe];
|
|
13209
|
+
ge[Oe] && ge[Oe].type === "many2one" && He && Array.isArray(He) && He.length === 2 ? Fe[Oe] = He[0] : ge[Oe] && (ge[Oe].type === "one2many" || ge[Oe].type === "many2many") && He && He.items ? Fe[Oe] = He.items.filter((wt) => wt.operation !== "pendingRemove").map((wt) => wt.id) : Fe[Oe] = He;
|
|
13210
13210
|
}), {
|
|
13211
13211
|
...an(),
|
|
13212
13212
|
...Fe
|
|
@@ -13269,7 +13269,7 @@ function Nv(e, t) {
|
|
|
13269
13269
|
ue[ge] === void 0 && delete ue[ge];
|
|
13270
13270
|
return ue;
|
|
13271
13271
|
}, [gt, an, L]), yt = F(() => {
|
|
13272
|
-
|
|
13272
|
+
Se.current && (D == null || D()), ae == null || ae(!1), s == null || s({ id: Re(), values: mt() });
|
|
13273
13273
|
}, [
|
|
13274
13274
|
Re,
|
|
13275
13275
|
mt,
|
|
@@ -13314,15 +13314,15 @@ function Nv(e, t) {
|
|
|
13314
13314
|
reset: !1
|
|
13315
13315
|
});
|
|
13316
13316
|
}, Un = (ue) => P.getFieldsValue(!0)[ue];
|
|
13317
|
-
async function
|
|
13317
|
+
async function De() {
|
|
13318
13318
|
try {
|
|
13319
13319
|
return await P.validateFields(), !1;
|
|
13320
13320
|
} catch {
|
|
13321
13321
|
return !0;
|
|
13322
13322
|
}
|
|
13323
13323
|
}
|
|
13324
|
-
const
|
|
13325
|
-
k(void 0), Je(),
|
|
13324
|
+
const Ge = async () => {
|
|
13325
|
+
k(void 0), Je(), Me == null || Me(!0);
|
|
13326
13326
|
let ue;
|
|
13327
13327
|
try {
|
|
13328
13328
|
h ? ue = { arch: h.arch, fields: h.fields } : ue = await vt();
|
|
@@ -13332,20 +13332,20 @@ function Nv(e, t) {
|
|
|
13332
13332
|
arch: Fe
|
|
13333
13333
|
});
|
|
13334
13334
|
} catch (ge) {
|
|
13335
|
-
k(ge),
|
|
13335
|
+
k(ge), Me == null || Me(!1);
|
|
13336
13336
|
}
|
|
13337
13337
|
}, Ze = async (ue) => {
|
|
13338
|
-
|
|
13339
|
-
let ge, Fe,
|
|
13340
|
-
|
|
13338
|
+
ie((wt) => wt + 1);
|
|
13339
|
+
let ge, Fe, Oe, He;
|
|
13340
|
+
Me == null || Me(!0), k(void 0), Je(), ue != null && ue.fields ? (Fe = ue.fields, Oe = ue.arch) : (Fe = L, Oe = V), g && (ue == null ? void 0 : ue.forceRefresh) !== !0 ? ge = g : { values: ge, defaultGetCalled: He } = await mn({
|
|
13341
13341
|
fields: Fe,
|
|
13342
|
-
arch:
|
|
13342
|
+
arch: Oe
|
|
13343
13343
|
}), C && (ge = { ..._l(C), ...ge }), Y.current = Fn(ge, Fe), ce.current === null && (ce.current = Fn(ge, Fe)), It({
|
|
13344
13344
|
values: ge,
|
|
13345
13345
|
fields: Fe,
|
|
13346
13346
|
reset: !0,
|
|
13347
13347
|
isDefaultGet: He
|
|
13348
|
-
}), pn({ fields: Fe, arch:
|
|
13348
|
+
}), pn({ fields: Fe, arch: Oe, values: ge }), Me == null || Me(!1), me == null || me(!1), He && ne(!0);
|
|
13349
13349
|
}, lt = async () => new Promise(async (ue) => {
|
|
13350
13350
|
Ft() ? dr({
|
|
13351
13351
|
t: O,
|
|
@@ -13375,21 +13375,21 @@ function Nv(e, t) {
|
|
|
13375
13375
|
values: ue,
|
|
13376
13376
|
fields: ge,
|
|
13377
13377
|
reset: Fe,
|
|
13378
|
-
isDefaultGet:
|
|
13378
|
+
isDefaultGet: Oe = !1
|
|
13379
13379
|
}) => {
|
|
13380
13380
|
const wt = { ...Fe ? {} : P.getFieldsValue(!0), ...ue }, Do = Fn(wt, ge), xd = Object.keys(ge).map((ko) => ({
|
|
13381
13381
|
name: ko,
|
|
13382
13382
|
touched: !1,
|
|
13383
13383
|
value: Do[ko] !== void 0 ? Do[ko] : void 0
|
|
13384
13384
|
}));
|
|
13385
|
-
|
|
13385
|
+
Oe || (ee.current = Do), P.setFields(xd);
|
|
13386
13386
|
},
|
|
13387
13387
|
[P]
|
|
13388
13388
|
), mn = async ({
|
|
13389
13389
|
fields: ue,
|
|
13390
13390
|
arch: ge
|
|
13391
13391
|
}) => {
|
|
13392
|
-
let Fe = {},
|
|
13392
|
+
let Fe = {}, Oe = !1;
|
|
13393
13393
|
if (Re()) {
|
|
13394
13394
|
const He = T || ln({
|
|
13395
13395
|
arch: ge,
|
|
@@ -13402,7 +13402,7 @@ function Nv(e, t) {
|
|
|
13402
13402
|
fields: Ov(ue, He == null ? void 0 : He.contextForFields),
|
|
13403
13403
|
context: v
|
|
13404
13404
|
}))[0], b)
|
|
13405
|
-
return { values: Fe, defaultGetCalled:
|
|
13405
|
+
return { values: Fe, defaultGetCalled: Oe };
|
|
13406
13406
|
const wt = await W.getHandler().search({
|
|
13407
13407
|
params: [
|
|
13408
13408
|
["res_model", "=", n],
|
|
@@ -13416,9 +13416,9 @@ function Nv(e, t) {
|
|
|
13416
13416
|
} else {
|
|
13417
13417
|
tt == null || tt([]);
|
|
13418
13418
|
const He = await pr(ue);
|
|
13419
|
-
le.current = He, Fe = He, Fe.id && (pe.current = Fe.id),
|
|
13419
|
+
le.current = He, Fe = He, Fe.id && (pe.current = Fe.id), Oe = !0;
|
|
13420
13420
|
}
|
|
13421
|
-
return { values: Fe, defaultGetCalled:
|
|
13421
|
+
return { values: Fe, defaultGetCalled: Oe };
|
|
13422
13422
|
}, An = async (ue) => {
|
|
13423
13423
|
const { callOnSubmitSucceed: ge = !0 } = ue || {};
|
|
13424
13424
|
if (Re()) {
|
|
@@ -13438,7 +13438,7 @@ function Nv(e, t) {
|
|
|
13438
13438
|
}
|
|
13439
13439
|
}), Y.current = gt(L);
|
|
13440
13440
|
} else {
|
|
13441
|
-
const Fe = gt(L),
|
|
13441
|
+
const Fe = gt(L), Oe = await W.getHandler().create({
|
|
13442
13442
|
model: n,
|
|
13443
13443
|
values: { ...Fe, ...x },
|
|
13444
13444
|
fields: L,
|
|
@@ -13447,7 +13447,7 @@ function Nv(e, t) {
|
|
|
13447
13447
|
...T == null ? void 0 : T.context
|
|
13448
13448
|
}
|
|
13449
13449
|
});
|
|
13450
|
-
pe.current =
|
|
13450
|
+
pe.current = Oe, Y.current = Fe;
|
|
13451
13451
|
}
|
|
13452
13452
|
y && await y([Re()]), !b && ge && (Xe == null || Xe(Re(), mt(), At()));
|
|
13453
13453
|
}, Jt = async (ue) => {
|
|
@@ -13463,23 +13463,23 @@ function Nv(e, t) {
|
|
|
13463
13463
|
At(),
|
|
13464
13464
|
Z.current
|
|
13465
13465
|
), Z.current = !1;
|
|
13466
|
-
const
|
|
13466
|
+
const Oe = Re();
|
|
13467
13467
|
return m && (pe.current = void 0, It({
|
|
13468
13468
|
values: le.current,
|
|
13469
13469
|
fields: L,
|
|
13470
13470
|
reset: !0
|
|
13471
|
-
})), { succeed: !0, id:
|
|
13471
|
+
})), { succeed: !0, id: Oe };
|
|
13472
13472
|
}
|
|
13473
13473
|
if (!Ft() && Re() && Fe) {
|
|
13474
|
-
const
|
|
13474
|
+
const Oe = gt(L), He = Yr({
|
|
13475
13475
|
source: ce.current || Y.current,
|
|
13476
|
-
target:
|
|
13476
|
+
target: Oe,
|
|
13477
13477
|
fields: L
|
|
13478
13478
|
});
|
|
13479
13479
|
return Object.keys(He).length > 0 ? (G.current = !1, me == null || me(!1), Xe == null || Xe(Re(), mt(), At()), { succeed: !0, id: Re() }) : (G.current = !1, me == null || me(!1), yt == null || yt(), { succeed: !0, id: Re() });
|
|
13480
13480
|
}
|
|
13481
|
-
if (await
|
|
13482
|
-
return G.current = !1,
|
|
13481
|
+
if (await De())
|
|
13482
|
+
return G.current = !1, se({
|
|
13483
13483
|
type: "error",
|
|
13484
13484
|
title: O("formHasErrors"),
|
|
13485
13485
|
body: O("fillRequiredFields")
|
|
@@ -13490,13 +13490,13 @@ function Nv(e, t) {
|
|
|
13490
13490
|
values: le.current,
|
|
13491
13491
|
fields: L,
|
|
13492
13492
|
reset: !0
|
|
13493
|
-
})), p !== "2many" && await Ze({ forceRefresh: !0 }), ge = !0, p !== "2many" &&
|
|
13493
|
+
})), p !== "2many" && await Ze({ forceRefresh: !0 }), ge = !0, p !== "2many" && se({
|
|
13494
13494
|
type: "success",
|
|
13495
13495
|
title: O("savedRegisters"),
|
|
13496
13496
|
duration: 3
|
|
13497
13497
|
});
|
|
13498
|
-
} catch (
|
|
13499
|
-
G.current = !1, E(!1), ae == null || ae(!1), Qe == null || Qe(
|
|
13498
|
+
} catch (Oe) {
|
|
13499
|
+
G.current = !1, E(!1), ae == null || ae(!1), Qe == null || Qe(Oe), k(Oe);
|
|
13500
13500
|
} finally {
|
|
13501
13501
|
G.current = !1, ae == null || ae(!1), E(!1);
|
|
13502
13502
|
}
|
|
@@ -13506,11 +13506,11 @@ function Nv(e, t) {
|
|
|
13506
13506
|
fields: ue,
|
|
13507
13507
|
arch: ge,
|
|
13508
13508
|
values: Fe,
|
|
13509
|
-
operationInProgress:
|
|
13509
|
+
operationInProgress: Oe = !1
|
|
13510
13510
|
}) => {
|
|
13511
13511
|
const He = new La(ue);
|
|
13512
13512
|
return He.parse(ge, {
|
|
13513
|
-
readOnly: u ||
|
|
13513
|
+
readOnly: u || Oe,
|
|
13514
13514
|
values: Vf(
|
|
13515
13515
|
{
|
|
13516
13516
|
...Fe,
|
|
@@ -13526,18 +13526,18 @@ function Nv(e, t) {
|
|
|
13526
13526
|
fields: ue,
|
|
13527
13527
|
arch: ge,
|
|
13528
13528
|
values: Fe,
|
|
13529
|
-
operationInProgress:
|
|
13529
|
+
operationInProgress: Oe = !1
|
|
13530
13530
|
}) => {
|
|
13531
13531
|
var wt;
|
|
13532
13532
|
const He = ln({
|
|
13533
13533
|
arch: ge,
|
|
13534
13534
|
fields: ue,
|
|
13535
13535
|
values: Fe,
|
|
13536
|
-
operationInProgress:
|
|
13536
|
+
operationInProgress: Oe
|
|
13537
13537
|
});
|
|
13538
|
-
$(He), He.string && He.string !== we && (
|
|
13538
|
+
$(He), He.string && He.string !== we && (Ye == null || Ye(He.string)), H && He.string && ((wt = H.setTitle) == null || wt.call(H, He.string));
|
|
13539
13539
|
},
|
|
13540
|
-
[H, ln,
|
|
13540
|
+
[H, ln, Ye, we]
|
|
13541
13541
|
), hr = async ({
|
|
13542
13542
|
elementHasLostFocus: ue = !1
|
|
13543
13543
|
}) => {
|
|
@@ -13563,19 +13563,19 @@ function Nv(e, t) {
|
|
|
13563
13563
|
"many2one"
|
|
13564
13564
|
]
|
|
13565
13565
|
}) && ue !== !0)) {
|
|
13566
|
-
const
|
|
13567
|
-
ee.current =
|
|
13566
|
+
const Oe = Fn(P.getFieldsValue(!0), L);
|
|
13567
|
+
ee.current = Oe, l == null || l(Oe), me == null || me(!0), Object.keys(Oe).forEach((He) => {
|
|
13568
13568
|
Ve(He);
|
|
13569
13569
|
}), ct(Fe);
|
|
13570
13570
|
}
|
|
13571
|
-
},
|
|
13571
|
+
}, ze = Cu(hr, 100), ct = async (ue) => {
|
|
13572
13572
|
try {
|
|
13573
13573
|
for (let ge = 0; ge < ue.length; ge += 1) {
|
|
13574
13574
|
const Fe = ue[ge];
|
|
13575
13575
|
await Et(Fe);
|
|
13576
13576
|
}
|
|
13577
13577
|
} catch (ge) {
|
|
13578
|
-
|
|
13578
|
+
se(ge);
|
|
13579
13579
|
}
|
|
13580
13580
|
}, Et = async (ue) => {
|
|
13581
13581
|
const ge = T == null ? void 0 : T.onChangeFields[ue];
|
|
@@ -13597,17 +13597,17 @@ function Nv(e, t) {
|
|
|
13597
13597
|
},
|
|
13598
13598
|
parentValues: fe == null ? void 0 : fe(),
|
|
13599
13599
|
onChangeFieldActionArgs: ge.args
|
|
13600
|
-
}),
|
|
13600
|
+
}), Oe = await W.getHandler().executeOnChange({
|
|
13601
13601
|
model: n,
|
|
13602
13602
|
action: ge.method,
|
|
13603
13603
|
ids: Re() ? [Re()] : [],
|
|
13604
13604
|
payload: Fe,
|
|
13605
13605
|
fields: L
|
|
13606
13606
|
});
|
|
13607
|
-
if (
|
|
13607
|
+
if (Oe.value) {
|
|
13608
13608
|
const He = {
|
|
13609
13609
|
...gt(L),
|
|
13610
|
-
...
|
|
13610
|
+
...Oe.value
|
|
13611
13611
|
}, wt = Hf({
|
|
13612
13612
|
values: He,
|
|
13613
13613
|
fields: L
|
|
@@ -13622,15 +13622,15 @@ function Nv(e, t) {
|
|
|
13622
13622
|
reset: !1
|
|
13623
13623
|
});
|
|
13624
13624
|
}
|
|
13625
|
-
if (
|
|
13626
|
-
const { title: He, message: wt } =
|
|
13625
|
+
if (Oe.warning && Oe.warning.title && Oe.warning.message && !de.current) {
|
|
13626
|
+
const { title: He, message: wt } = Oe.warning;
|
|
13627
13627
|
ft([
|
|
13628
13628
|
{
|
|
13629
13629
|
field: ue,
|
|
13630
13630
|
message: wt,
|
|
13631
13631
|
type: "warning"
|
|
13632
13632
|
}
|
|
13633
|
-
]), (
|
|
13633
|
+
]), (Oe.warning.popup === !0 || Oe.warning.popup === void 0) && (de.current = !0, se({
|
|
13634
13634
|
type: "warning",
|
|
13635
13635
|
title: He,
|
|
13636
13636
|
body: wt,
|
|
@@ -13639,9 +13639,9 @@ function Nv(e, t) {
|
|
|
13639
13639
|
}
|
|
13640
13640
|
}));
|
|
13641
13641
|
}
|
|
13642
|
-
if (
|
|
13642
|
+
if (Oe.domain && Object.keys(Oe.domain).length > 0) {
|
|
13643
13643
|
const He = Wf({
|
|
13644
|
-
fieldsDomain:
|
|
13644
|
+
fieldsDomain: Oe.domain,
|
|
13645
13645
|
fields: L
|
|
13646
13646
|
});
|
|
13647
13647
|
pn({
|
|
@@ -13670,16 +13670,16 @@ function Nv(e, t) {
|
|
|
13670
13670
|
else if (Fe.type && Fe.type === rm)
|
|
13671
13671
|
Xe == null || Xe(Re(), mt(), At());
|
|
13672
13672
|
else if (Fe.type && Fe.type === im)
|
|
13673
|
-
|
|
13673
|
+
$e == null || $e(Fe);
|
|
13674
13674
|
else if (Fe.type) {
|
|
13675
|
-
let
|
|
13676
|
-
Fe.context && (
|
|
13675
|
+
let Oe = {};
|
|
13676
|
+
Fe.context && (Oe = Cn({
|
|
13677
13677
|
context: Fe.context,
|
|
13678
13678
|
fields: L,
|
|
13679
13679
|
values: mt()
|
|
13680
13680
|
})), await cn({
|
|
13681
13681
|
actionData: Fe,
|
|
13682
|
-
context: { ...ge, ...
|
|
13682
|
+
context: { ...ge, ...Oe }
|
|
13683
13683
|
});
|
|
13684
13684
|
} else
|
|
13685
13685
|
await Ze({ forceRefresh: !0 });
|
|
@@ -13717,7 +13717,7 @@ function Nv(e, t) {
|
|
|
13717
13717
|
...ge
|
|
13718
13718
|
},
|
|
13719
13719
|
onRefreshParentValues: async () => {
|
|
13720
|
-
|
|
13720
|
+
Se.current = !0, await Ze({ forceRefresh: !0 });
|
|
13721
13721
|
}
|
|
13722
13722
|
})) || {};
|
|
13723
13723
|
!w && Fe && (Xe == null || Xe(Re(), mt(), At()));
|
|
@@ -13756,7 +13756,7 @@ function Nv(e, t) {
|
|
|
13756
13756
|
autorefreshableFields: T == null ? void 0 : T.autorefreshableFields,
|
|
13757
13757
|
fieldDefs: L,
|
|
13758
13758
|
onAutorefreshableFieldsChange: bt,
|
|
13759
|
-
isActive:
|
|
13759
|
+
isActive: Ee
|
|
13760
13760
|
});
|
|
13761
13761
|
async function qr({
|
|
13762
13762
|
type: ue,
|
|
@@ -13767,21 +13767,21 @@ function Nv(e, t) {
|
|
|
13767
13767
|
yt == null || yt();
|
|
13768
13768
|
return;
|
|
13769
13769
|
}
|
|
13770
|
-
if (await
|
|
13771
|
-
|
|
13770
|
+
if (await De()) {
|
|
13771
|
+
se({
|
|
13772
13772
|
type: "error",
|
|
13773
13773
|
title: O("formHasErrors"),
|
|
13774
13774
|
body: O("fillRequiredFields")
|
|
13775
13775
|
});
|
|
13776
13776
|
return;
|
|
13777
13777
|
}
|
|
13778
|
-
let
|
|
13778
|
+
let Oe = !1;
|
|
13779
13779
|
try {
|
|
13780
|
-
!u && (Ft() || Re() === void 0) && (
|
|
13780
|
+
!u && (Ft() || Re() === void 0) && (Oe = !0, Yn(!0), p === "2many" ? (await An({ callOnSubmitSucceed: !1 }), Z.current = !0) : await vn({ callOnSubmitSucceed: !1 }));
|
|
13781
13781
|
const He = Z.current ? fn() : {}, wt = { ...Fe, ...He };
|
|
13782
|
-
ue === "object" ? await pt({ action: ge, context: wt }) : ue === "workflow" ? await tn({ action: ge }) : ue === "action" && await Wn({ action: ge, context: wt }),
|
|
13782
|
+
ue === "object" ? await pt({ action: ge, context: wt }) : ue === "workflow" ? await tn({ action: ge }) : ue === "action" && await Wn({ action: ge, context: wt }), Oe && Yn(!1);
|
|
13783
13783
|
} catch (He) {
|
|
13784
|
-
|
|
13784
|
+
Oe && Yn(!1), se(He);
|
|
13785
13785
|
}
|
|
13786
13786
|
}
|
|
13787
13787
|
const Oo = () => !T && !I ? /* @__PURE__ */ i(it, {}) : !n && !h || !S ? null : /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ i(
|
|
@@ -13804,7 +13804,7 @@ function Nv(e, t) {
|
|
|
13804
13804
|
elementHasLostFocus: qn,
|
|
13805
13805
|
formView: h,
|
|
13806
13806
|
fieldMessages: ye,
|
|
13807
|
-
setFieldMessage:
|
|
13807
|
+
setFieldMessage: _e,
|
|
13808
13808
|
getFieldMessage: Ie,
|
|
13809
13809
|
getFieldMessageType: Le,
|
|
13810
13810
|
clearFieldMessage: Ve,
|
|
@@ -13815,7 +13815,7 @@ function Nv(e, t) {
|
|
|
13815
13815
|
{
|
|
13816
13816
|
form: P,
|
|
13817
13817
|
onFieldsChange: () => {
|
|
13818
|
-
|
|
13818
|
+
ze({ elementHasLostFocus: !1 });
|
|
13819
13819
|
},
|
|
13820
13820
|
component: !1,
|
|
13821
13821
|
children: T && /* @__PURE__ */ i(
|
|
@@ -13946,13 +13946,13 @@ const mr = Lt(Nv), Kc = (e) => {
|
|
|
13946
13946
|
defaultName: r = "",
|
|
13947
13947
|
onFavouriteAdded: o,
|
|
13948
13948
|
onFavouriteRemoved: s
|
|
13949
|
-
} = e, { t: a } = xe(), [d, c] = R(!1), [l] =
|
|
13949
|
+
} = e, { t: a } = xe(), [d, c] = R(!1), [l] = Ae(
|
|
13950
13950
|
W.getHandler().removeFavourite
|
|
13951
|
-
), [f] =
|
|
13951
|
+
), [f] = Ae(
|
|
13952
13952
|
W.getHandler().addFavourite
|
|
13953
|
-
), [u] =
|
|
13953
|
+
), [u] = Ae(
|
|
13954
13954
|
W.getHandler().isShortcutFavorite
|
|
13955
|
-
), [m] =
|
|
13955
|
+
), [m] = Ae(
|
|
13956
13956
|
W.getHandler().update
|
|
13957
13957
|
), p = F(() => {
|
|
13958
13958
|
t && n !== void 0 ? rn({
|
|
@@ -14242,7 +14242,7 @@ const mr = Lt(Nv), Kc = (e) => {
|
|
|
14242
14242
|
)
|
|
14243
14243
|
] });
|
|
14244
14244
|
}, Lv = () => {
|
|
14245
|
-
const [e, t] =
|
|
14245
|
+
const [e, t] = Ae(
|
|
14246
14246
|
W.getHandler().checkPermission
|
|
14247
14247
|
);
|
|
14248
14248
|
return he(() => () => {
|
|
@@ -14299,7 +14299,7 @@ const mr = Lt(Nv), Kc = (e) => {
|
|
|
14299
14299
|
);
|
|
14300
14300
|
}, { defaultAlgorithm: Vv, defaultSeed: Hv } = ot, Jc = Vv(Hv), Bv = (e) => {
|
|
14301
14301
|
const { ooui: t } = e, { required: n } = t;
|
|
14302
|
-
return /* @__PURE__ */ i(
|
|
14302
|
+
return /* @__PURE__ */ i(Ke, { required: n, type: "array", validator: async (o, s) => {
|
|
14303
14303
|
if (!s)
|
|
14304
14304
|
throw new Error();
|
|
14305
14305
|
if (!Array.isArray(s))
|
|
@@ -14360,7 +14360,7 @@ const mr = Lt(Nv), Kc = (e) => {
|
|
|
14360
14360
|
}
|
|
14361
14361
|
}
|
|
14362
14362
|
}, ne = async (G) => {
|
|
14363
|
-
if (await
|
|
14363
|
+
if (await ie(), I.current && I.current.length > 0) {
|
|
14364
14364
|
const Z = await W.getHandler().searchAllIds({
|
|
14365
14365
|
params: I.current,
|
|
14366
14366
|
model: s,
|
|
@@ -14387,7 +14387,7 @@ const mr = Lt(Nv), Kc = (e) => {
|
|
|
14387
14387
|
y(!1);
|
|
14388
14388
|
}
|
|
14389
14389
|
};
|
|
14390
|
-
async function
|
|
14390
|
+
async function ie() {
|
|
14391
14391
|
l && (I.current = await W.getHandler().evalDomain({
|
|
14392
14392
|
domain: l,
|
|
14393
14393
|
values: Vn({
|
|
@@ -14605,7 +14605,7 @@ const mr = Lt(Nv), Kc = (e) => {
|
|
|
14605
14605
|
yn
|
|
14606
14606
|
), d = ve(
|
|
14607
14607
|
qt
|
|
14608
|
-
), { processAction: c } = a || {}, { openRelate: l } = d || {}, [f, u] = R(null), [m, p] = R(!1), [g] =
|
|
14608
|
+
), { processAction: c } = a || {}, { openRelate: l } = d || {}, [f, u] = R(null), [m, p] = R(!1), [g] = Ae(
|
|
14609
14609
|
W.getHandler().getToolbar
|
|
14610
14610
|
), h = o || f, y = F(async () => {
|
|
14611
14611
|
var x;
|
|
@@ -14755,7 +14755,7 @@ const mr = Lt(Nv), Kc = (e) => {
|
|
|
14755
14755
|
};
|
|
14756
14756
|
}, { useToken: qv } = ot;
|
|
14757
14757
|
function Yv(e) {
|
|
14758
|
-
var re,
|
|
14758
|
+
var re, ie, pe, Y;
|
|
14759
14759
|
const {
|
|
14760
14760
|
title: t,
|
|
14761
14761
|
readOnly: n,
|
|
@@ -14901,7 +14901,7 @@ function Yv(e) {
|
|
|
14901
14901
|
)
|
|
14902
14902
|
] }),
|
|
14903
14903
|
b && /* @__PURE__ */ B(Ce, { children: [
|
|
14904
|
-
((
|
|
14904
|
+
((ie = b.action) == null ? void 0 : ie.length) > 0 && /* @__PURE__ */ B(Ce, { children: [
|
|
14905
14905
|
/* @__PURE__ */ i(dn, {}),
|
|
14906
14906
|
/* @__PURE__ */ i(
|
|
14907
14907
|
hn,
|
|
@@ -15039,7 +15039,7 @@ function zv(e) {
|
|
|
15039
15039
|
});
|
|
15040
15040
|
}
|
|
15041
15041
|
const Kv = (e) => {
|
|
15042
|
-
var Pe, be,
|
|
15042
|
+
var Pe, be, $e;
|
|
15043
15043
|
const { value: t, onChange: n, ooui: r, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: d, itemIndex: c, setItemIndex: l } = ve(
|
|
15044
15044
|
xn
|
|
15045
15045
|
), f = ve(st), {
|
|
@@ -15052,10 +15052,10 @@ const Kv = (e) => {
|
|
|
15052
15052
|
} = f || {}, { t: b } = xe(), [v, C] = R(!1), [S, w] = R(!1), [_, x] = R(), [A, D] = R(!1), [O, M] = R(!1), [E, I] = R(), [k, T] = R([]), [$, P] = R(!1), [V, U] = R([]), [L, N] = R(), H = Q(), [z, j] = R(void 0), q = Q(), {
|
|
15053
15053
|
readOnly: ne,
|
|
15054
15054
|
relation: re,
|
|
15055
|
-
context:
|
|
15055
|
+
context: ie,
|
|
15056
15056
|
domain: pe
|
|
15057
15057
|
} = r, Y = r.type === "many2many", { id: ce } = r, ee = s.filter(
|
|
15058
|
-
(
|
|
15058
|
+
(se) => (se.values || se.treeValues) && se.operation !== "pendingRemove"
|
|
15059
15059
|
), le = Q();
|
|
15060
15060
|
he(() => {
|
|
15061
15061
|
if (le.current !== a) {
|
|
@@ -15065,37 +15065,37 @@ const Kv = (e) => {
|
|
|
15065
15065
|
de();
|
|
15066
15066
|
}, [s, a]);
|
|
15067
15067
|
const de = F(() => {
|
|
15068
|
-
(a === "form" && s.some((
|
|
15068
|
+
(a === "form" && s.some((se) => !se.values) || a === "tree" && s.some((se) => !se.treeValues)) && Z();
|
|
15069
15069
|
}, [s, a]);
|
|
15070
15070
|
Ue(() => {
|
|
15071
15071
|
oe();
|
|
15072
15072
|
}, [g]);
|
|
15073
|
-
const G = (
|
|
15074
|
-
var ye,
|
|
15073
|
+
const G = (se) => {
|
|
15074
|
+
var ye, _e;
|
|
15075
15075
|
n == null || n({
|
|
15076
|
-
fields: ((ye = o.get("form")) == null ? void 0 : ye.fields) || ((
|
|
15077
|
-
items: zv(
|
|
15076
|
+
fields: ((ye = o.get("form")) == null ? void 0 : ye.fields) || ((_e = o.get("tree")) == null ? void 0 : _e.fields),
|
|
15077
|
+
items: zv(se)
|
|
15078
15078
|
});
|
|
15079
15079
|
}, Z = async () => {
|
|
15080
15080
|
await J(), c > ee.length - 1 && c !== 0 && l(0);
|
|
15081
|
-
}, J = async (
|
|
15082
|
-
var ye,
|
|
15081
|
+
}, J = async (se) => {
|
|
15082
|
+
var ye, _e, Ie;
|
|
15083
15083
|
w(!0), C(!1), x(void 0);
|
|
15084
15084
|
try {
|
|
15085
15085
|
const [Le, Ve] = await Ns({
|
|
15086
15086
|
treeView: {
|
|
15087
15087
|
arch: (ye = o.get("tree")) == null ? void 0 : ye.arch,
|
|
15088
|
-
fields: (
|
|
15088
|
+
fields: (_e = o.get("tree")) == null ? void 0 : _e.fields
|
|
15089
15089
|
},
|
|
15090
15090
|
formView: {
|
|
15091
15091
|
fields: ((Ie = o.get("form")) == null ? void 0 : Ie.fields) || {}
|
|
15092
15092
|
},
|
|
15093
15093
|
model: re,
|
|
15094
15094
|
items: s,
|
|
15095
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15096
|
-
currentView:
|
|
15095
|
+
context: { ...p == null ? void 0 : p(), ...ie },
|
|
15096
|
+
currentView: se || a
|
|
15097
15097
|
});
|
|
15098
|
-
return H.current || (H.current = Le.map((Je) => Je.id)), (a ||
|
|
15098
|
+
return H.current || (H.current = Le.map((Je) => Je.id)), (a || se) === "tree" && Ve && j(Ve), G(Le), Le;
|
|
15099
15099
|
} catch (Le) {
|
|
15100
15100
|
x(Le);
|
|
15101
15101
|
} finally {
|
|
@@ -15106,8 +15106,8 @@ const Kv = (e) => {
|
|
|
15106
15106
|
oe();
|
|
15107
15107
|
}, [y()]);
|
|
15108
15108
|
const oe = F(async () => {
|
|
15109
|
-
let
|
|
15110
|
-
pe && (
|
|
15109
|
+
let se = [];
|
|
15110
|
+
pe && (se = await W.getHandler().evalDomain({
|
|
15111
15111
|
domain: pe,
|
|
15112
15112
|
values: Vn({
|
|
15113
15113
|
fields: m(),
|
|
@@ -15115,12 +15115,12 @@ const Kv = (e) => {
|
|
|
15115
15115
|
}),
|
|
15116
15116
|
fields: m(),
|
|
15117
15117
|
context: p()
|
|
15118
|
-
})), g && g.length > 0 && (
|
|
15118
|
+
})), g && g.length > 0 && (se = se.concat(
|
|
15119
15119
|
Cs({
|
|
15120
15120
|
domain: g,
|
|
15121
15121
|
widgetFieldName: ce
|
|
15122
15122
|
})
|
|
15123
|
-
)),
|
|
15123
|
+
)), se.length > 0 && U(se);
|
|
15124
15124
|
}, [
|
|
15125
15125
|
pe,
|
|
15126
15126
|
g,
|
|
@@ -15129,50 +15129,50 @@ const Kv = (e) => {
|
|
|
15129
15129
|
p,
|
|
15130
15130
|
ce
|
|
15131
15131
|
]), X = () => {
|
|
15132
|
-
const
|
|
15133
|
-
a === "form" ?
|
|
15132
|
+
const se = Array.from(o.keys()), ye = se[(se.indexOf(a) + 1) % se.length];
|
|
15133
|
+
a === "form" ? Te(() => {
|
|
15134
15134
|
d(ye);
|
|
15135
15135
|
}) : d(ye);
|
|
15136
15136
|
}, K = () => {
|
|
15137
|
-
c > 0 && (a === "form" ?
|
|
15137
|
+
c > 0 && (a === "form" ? Te(() => {
|
|
15138
15138
|
l(c - 1);
|
|
15139
15139
|
}) : l(c - 1));
|
|
15140
15140
|
}, fe = () => {
|
|
15141
|
-
const
|
|
15142
|
-
c <
|
|
15141
|
+
const se = ee.length;
|
|
15142
|
+
c < se - 1 && (a === "form" ? Te(() => {
|
|
15143
15143
|
l(c + 1);
|
|
15144
15144
|
}) : l(c + 1));
|
|
15145
|
-
},
|
|
15146
|
-
const
|
|
15145
|
+
}, Se = async () => {
|
|
15146
|
+
const se = ee[c].id, ye = (await W.getHandler().readObjects({
|
|
15147
15147
|
model: re,
|
|
15148
|
-
ids: [
|
|
15148
|
+
ids: [se],
|
|
15149
15149
|
fields: o.get("form").fields,
|
|
15150
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15151
|
-
}))[0],
|
|
15150
|
+
context: { ...p == null ? void 0 : p(), ...ie }
|
|
15151
|
+
}))[0], _e = (await W.getHandler().readObjects({
|
|
15152
15152
|
model: re,
|
|
15153
|
-
ids: [
|
|
15153
|
+
ids: [se],
|
|
15154
15154
|
fields: o.get("tree").fields,
|
|
15155
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15156
|
-
}))[0], Ie = s.map((Le) => Le.id ===
|
|
15155
|
+
context: { ...p == null ? void 0 : p(), ...ie }
|
|
15156
|
+
}))[0], Ie = s.map((Le) => Le.id === se ? {
|
|
15157
15157
|
...Le,
|
|
15158
15158
|
operation: "original",
|
|
15159
15159
|
values: ye,
|
|
15160
|
-
treeValues:
|
|
15160
|
+
treeValues: _e
|
|
15161
15161
|
} : Le);
|
|
15162
15162
|
G(Ie);
|
|
15163
|
-
},
|
|
15163
|
+
}, Te = (se) => {
|
|
15164
15164
|
v ? dr({
|
|
15165
15165
|
t: b,
|
|
15166
15166
|
onOk: () => {
|
|
15167
|
-
|
|
15167
|
+
Se(), se(), C(!1);
|
|
15168
15168
|
}
|
|
15169
|
-
}) :
|
|
15169
|
+
}) : se();
|
|
15170
15170
|
}, ae = () => {
|
|
15171
15171
|
if (Y) {
|
|
15172
15172
|
ed({
|
|
15173
15173
|
t: b,
|
|
15174
15174
|
onOk: async () => {
|
|
15175
|
-
a === "form" ?
|
|
15175
|
+
a === "form" ? Me() : tt();
|
|
15176
15176
|
}
|
|
15177
15177
|
});
|
|
15178
15178
|
return;
|
|
@@ -15180,95 +15180,95 @@ const Kv = (e) => {
|
|
|
15180
15180
|
Zc({
|
|
15181
15181
|
t: b,
|
|
15182
15182
|
onOk: async () => {
|
|
15183
|
-
a === "form" ?
|
|
15183
|
+
a === "form" ? Me() : tt();
|
|
15184
15184
|
}
|
|
15185
15185
|
});
|
|
15186
15186
|
}, me = async () => {
|
|
15187
|
-
const { inv_field:
|
|
15187
|
+
const { inv_field: se } = r;
|
|
15188
15188
|
let ye;
|
|
15189
|
-
|
|
15189
|
+
se && u && (ye = { [se]: u }), a === "form" ? Te(() => {
|
|
15190
15190
|
P(!0), I({ defaultValues: ye }), D(!0);
|
|
15191
15191
|
}) : (P(!0), I({ defaultValues: ye }), D(!0));
|
|
15192
|
-
},
|
|
15193
|
-
a === "form" ?
|
|
15192
|
+
}, ke = async () => {
|
|
15193
|
+
a === "form" ? Te(() => {
|
|
15194
15194
|
M(!0);
|
|
15195
15195
|
}) : M(!0);
|
|
15196
|
-
},
|
|
15196
|
+
}, Me = async () => {
|
|
15197
15197
|
w(!0), C(!1), x(void 0);
|
|
15198
15198
|
try {
|
|
15199
15199
|
if (ee[c].id > 0) {
|
|
15200
|
-
const
|
|
15200
|
+
const se = s.map((ye) => ye.id === ee[c].id ? {
|
|
15201
15201
|
...ye,
|
|
15202
15202
|
operation: "pendingRemove"
|
|
15203
15203
|
} : ye);
|
|
15204
|
-
G(
|
|
15204
|
+
G(se);
|
|
15205
15205
|
} else
|
|
15206
15206
|
G(
|
|
15207
|
-
s.filter((
|
|
15207
|
+
s.filter((se) => se.id !== ee[c].id)
|
|
15208
15208
|
);
|
|
15209
|
-
} catch (
|
|
15210
|
-
x(
|
|
15209
|
+
} catch (se) {
|
|
15210
|
+
x(se);
|
|
15211
15211
|
}
|
|
15212
15212
|
l(0), w(!1);
|
|
15213
15213
|
}, tt = async () => {
|
|
15214
|
-
const
|
|
15214
|
+
const se = ee.filter((ye) => k.includes(ye.id));
|
|
15215
15215
|
w(!0), C(!1), x(void 0);
|
|
15216
15216
|
try {
|
|
15217
|
-
const ye =
|
|
15217
|
+
const ye = se.map((Ie) => Ie.id), _e = s.filter((Ie) => !(ye.includes(Ie.id) && Ie.id < 0)).map((Ie) => ye.includes(Ie.id) ? {
|
|
15218
15218
|
...Ie,
|
|
15219
15219
|
operation: "pendingRemove"
|
|
15220
15220
|
} : Ie);
|
|
15221
|
-
G(
|
|
15221
|
+
G(_e);
|
|
15222
15222
|
} catch (ye) {
|
|
15223
15223
|
x(ye);
|
|
15224
15224
|
}
|
|
15225
15225
|
l(0), w(!1);
|
|
15226
|
-
}, we = (
|
|
15226
|
+
}, we = (se, ye, _e, Ie = !1) => {
|
|
15227
15227
|
let Le;
|
|
15228
15228
|
if (Ie)
|
|
15229
15229
|
Le = s.concat({
|
|
15230
|
-
id:
|
|
15230
|
+
id: se,
|
|
15231
15231
|
operation: "pendingLink",
|
|
15232
|
-
values: {
|
|
15233
|
-
treeValues: {
|
|
15232
|
+
values: { ..._e, id: se },
|
|
15233
|
+
treeValues: { ..._e, id: se }
|
|
15234
15234
|
});
|
|
15235
|
-
else if (
|
|
15236
|
-
Le = s.map((Ve) => Ve.id ===
|
|
15237
|
-
id:
|
|
15238
|
-
operation:
|
|
15239
|
-
values: {
|
|
15240
|
-
treeValues: {
|
|
15235
|
+
else if (se)
|
|
15236
|
+
Le = s.map((Ve) => Ve.id === se ? {
|
|
15237
|
+
id: se,
|
|
15238
|
+
operation: se > 0 ? "pendingUpdate" : "pendingCreate",
|
|
15239
|
+
values: { ..._e, id: se },
|
|
15240
|
+
treeValues: { ..._e, id: se }
|
|
15241
15241
|
} : Ve);
|
|
15242
15242
|
else {
|
|
15243
15243
|
const Ve = Sl(s);
|
|
15244
15244
|
Le = s.concat({
|
|
15245
15245
|
id: Ve,
|
|
15246
15246
|
operation: "pendingCreate",
|
|
15247
|
-
values: {
|
|
15248
|
-
treeValues: {
|
|
15247
|
+
values: { ..._e, id: Ve },
|
|
15248
|
+
treeValues: { ..._e, id: Ve }
|
|
15249
15249
|
});
|
|
15250
15250
|
}
|
|
15251
15251
|
G(Le), $ || D(!1);
|
|
15252
|
-
},
|
|
15253
|
-
const { id: ye } =
|
|
15254
|
-
let
|
|
15252
|
+
}, Ye = async (se) => {
|
|
15253
|
+
const { id: ye } = se;
|
|
15254
|
+
let _e = s;
|
|
15255
15255
|
const Ie = s.find((Le) => Le.id === ye);
|
|
15256
|
-
(Ie == null ? void 0 : Ie.values) === void 0 && (
|
|
15257
|
-
},
|
|
15256
|
+
(Ie == null ? void 0 : Ie.values) === void 0 && (_e = await J("form")), I(_e.find((Le) => Le.id === ye)), P(!1), D(!0);
|
|
15257
|
+
}, Ee = async (se) => {
|
|
15258
15258
|
w(!0);
|
|
15259
|
-
const ye = s,
|
|
15259
|
+
const ye = s, _e = se.filter((Ie) => !s.find((Le) => Le.id === Ie));
|
|
15260
15260
|
try {
|
|
15261
|
-
for (const Ie of
|
|
15261
|
+
for (const Ie of _e) {
|
|
15262
15262
|
const Le = (await W.getHandler().readObjects({
|
|
15263
15263
|
model: re,
|
|
15264
15264
|
ids: [Ie],
|
|
15265
15265
|
fields: o.get("form").fields,
|
|
15266
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15266
|
+
context: { ...p == null ? void 0 : p(), ...ie }
|
|
15267
15267
|
}))[0], Ve = (await W.getHandler().readObjects({
|
|
15268
15268
|
model: re,
|
|
15269
15269
|
ids: [Ie],
|
|
15270
15270
|
fields: o.get("tree").fields,
|
|
15271
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15271
|
+
context: { ...p == null ? void 0 : p(), ...ie }
|
|
15272
15272
|
}))[0];
|
|
15273
15273
|
ye.push({
|
|
15274
15274
|
id: Ie,
|
|
@@ -15285,16 +15285,16 @@ const Kv = (e) => {
|
|
|
15285
15285
|
}
|
|
15286
15286
|
};
|
|
15287
15287
|
function Be() {
|
|
15288
|
-
const
|
|
15288
|
+
const se = Gv[a];
|
|
15289
15289
|
if (a === "graph")
|
|
15290
15290
|
return Pa(o.get("graph").arch).string;
|
|
15291
15291
|
{
|
|
15292
|
-
const ye = new
|
|
15292
|
+
const ye = new se(o.get(a).fields);
|
|
15293
15293
|
return ye.parse(o.get(a).arch), ye.string;
|
|
15294
15294
|
}
|
|
15295
15295
|
}
|
|
15296
15296
|
const We = () => {
|
|
15297
|
-
var ye,
|
|
15297
|
+
var ye, _e, Ie, Le;
|
|
15298
15298
|
if (a === "form")
|
|
15299
15299
|
return ee.length === 0 ? b("noCurrentEntries") : a !== le.current && s.some((Ve) => !Ve.values) ? /* @__PURE__ */ i(it, {}) : /* @__PURE__ */ i(
|
|
15300
15300
|
mr,
|
|
@@ -15302,9 +15302,9 @@ const Kv = (e) => {
|
|
|
15302
15302
|
ref: q,
|
|
15303
15303
|
formView: o.get("form"),
|
|
15304
15304
|
values: (ye = ee[c]) == null ? void 0 : ye.values,
|
|
15305
|
-
parentContext: { ...p == null ? void 0 : p(), ...
|
|
15305
|
+
parentContext: { ...p == null ? void 0 : p(), ...ie },
|
|
15306
15306
|
model: re,
|
|
15307
|
-
id: (
|
|
15307
|
+
id: (_e = ee[c]) == null ? void 0 : _e.id,
|
|
15308
15308
|
submitMode: "values",
|
|
15309
15309
|
onFieldsChange: (Ve) => {
|
|
15310
15310
|
var Xe;
|
|
@@ -15319,8 +15319,8 @@ const Kv = (e) => {
|
|
|
15319
15319
|
readOnly: ne
|
|
15320
15320
|
}
|
|
15321
15321
|
);
|
|
15322
|
-
let
|
|
15323
|
-
if (ee.some((Ve) => Ve.treeValues) && (
|
|
15322
|
+
let se = [];
|
|
15323
|
+
if (ee.some((Ve) => Ve.treeValues) && (se = L ? Qn({
|
|
15324
15324
|
resultsToSort: ee.map((Ve) => Ve.treeValues),
|
|
15325
15325
|
sorter: L,
|
|
15326
15326
|
fields: {
|
|
@@ -15334,15 +15334,15 @@ const Kv = (e) => {
|
|
|
15334
15334
|
total: ee.length,
|
|
15335
15335
|
limit: ee.length,
|
|
15336
15336
|
treeView: o.get("tree"),
|
|
15337
|
-
results:
|
|
15337
|
+
results: se,
|
|
15338
15338
|
loading: S,
|
|
15339
|
-
onRowClicked: ((Le = o.get("form")) == null ? void 0 : Le.fields) !== void 0 ?
|
|
15339
|
+
onRowClicked: ((Le = o.get("form")) == null ? void 0 : Le.fields) !== void 0 ? Ye : void 0,
|
|
15340
15340
|
showPagination: !1,
|
|
15341
15341
|
selectedRowKeys: k,
|
|
15342
15342
|
onRowSelectionChange: T,
|
|
15343
15343
|
sorter: L,
|
|
15344
15344
|
onChangeSort: N,
|
|
15345
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15345
|
+
context: { ...p == null ? void 0 : p(), ...ie },
|
|
15346
15346
|
colorsForResults: z,
|
|
15347
15347
|
readonly: ne,
|
|
15348
15348
|
scrollY: r == null ? void 0 : r.height
|
|
@@ -15357,7 +15357,7 @@ const Kv = (e) => {
|
|
|
15357
15357
|
view_id: o.get("graph").view_id,
|
|
15358
15358
|
model: r.relation,
|
|
15359
15359
|
domain: Ve,
|
|
15360
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15360
|
+
context: { ...p == null ? void 0 : p(), ...ie },
|
|
15361
15361
|
limit: 0
|
|
15362
15362
|
}
|
|
15363
15363
|
);
|
|
@@ -15384,13 +15384,13 @@ const Kv = (e) => {
|
|
|
15384
15384
|
onToggleViewMode: X,
|
|
15385
15385
|
onPreviousItem: K,
|
|
15386
15386
|
onNextItem: fe,
|
|
15387
|
-
onSearchItem:
|
|
15387
|
+
onSearchItem: ke,
|
|
15388
15388
|
selectedRowKeys: k,
|
|
15389
15389
|
showCreateButton: ((be = o.get("form")) == null ? void 0 : be.fields) !== void 0,
|
|
15390
15390
|
showToggleButton: o.size > 1,
|
|
15391
|
-
toolbar: (
|
|
15391
|
+
toolbar: ($e = o.get(a)) == null ? void 0 : $e.toolbar,
|
|
15392
15392
|
treeView: o.get("tree"),
|
|
15393
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15393
|
+
context: { ...p == null ? void 0 : p(), ...ie },
|
|
15394
15394
|
formRef: q,
|
|
15395
15395
|
onRefreshParentValues: () => {
|
|
15396
15396
|
h == null || h({ forceRefresh: !0 });
|
|
@@ -15409,15 +15409,15 @@ const Kv = (e) => {
|
|
|
15409
15409
|
defaultValues: E == null ? void 0 : E.defaultValues,
|
|
15410
15410
|
visible: A,
|
|
15411
15411
|
onSubmitSucceed: we,
|
|
15412
|
-
parentContext: { ...p == null ? void 0 : p(), ...
|
|
15413
|
-
onCancel: (
|
|
15414
|
-
if (P(!1),
|
|
15412
|
+
parentContext: { ...p == null ? void 0 : p(), ...ie },
|
|
15413
|
+
onCancel: (se) => {
|
|
15414
|
+
if (P(!1), se != null && se.id && (se != null && se.values)) {
|
|
15415
15415
|
const ye = s.map(
|
|
15416
|
-
(
|
|
15417
|
-
|
|
15418
|
-
values: {
|
|
15419
|
-
treeValues: {
|
|
15420
|
-
} :
|
|
15416
|
+
(_e) => _e.id === se.id ? {
|
|
15417
|
+
..._e,
|
|
15418
|
+
values: { ..._e.values, ...se.values },
|
|
15419
|
+
treeValues: { ..._e.treeValues, ...se.values }
|
|
15420
|
+
} : _e
|
|
15421
15421
|
);
|
|
15422
15422
|
G(ye);
|
|
15423
15423
|
}
|
|
@@ -15435,10 +15435,10 @@ const Kv = (e) => {
|
|
|
15435
15435
|
{
|
|
15436
15436
|
domain: V,
|
|
15437
15437
|
model: re,
|
|
15438
|
-
context: { ...p == null ? void 0 : p(), ...
|
|
15438
|
+
context: { ...p == null ? void 0 : p(), ...ie },
|
|
15439
15439
|
visible: O,
|
|
15440
|
-
onSelectValues: async (
|
|
15441
|
-
M(!1),
|
|
15440
|
+
onSelectValues: async (se) => {
|
|
15441
|
+
M(!1), Ee(se);
|
|
15442
15442
|
},
|
|
15443
15443
|
onCloseModal: () => {
|
|
15444
15444
|
M(!1);
|
|
@@ -15921,7 +15921,7 @@ const dd = ({
|
|
|
15921
15921
|
onRowStatus: q,
|
|
15922
15922
|
getColumnState: ne,
|
|
15923
15923
|
updateColumnState: re,
|
|
15924
|
-
isColumnStateLoading:
|
|
15924
|
+
isColumnStateLoading: ie,
|
|
15925
15925
|
updateAttributes: pe,
|
|
15926
15926
|
clearAttributes: Y
|
|
15927
15927
|
} = js({
|
|
@@ -15954,10 +15954,10 @@ const dd = ({
|
|
|
15954
15954
|
results: ee
|
|
15955
15955
|
}), G = te(() => U ? U.map((be) => ({
|
|
15956
15956
|
...be,
|
|
15957
|
-
render: (
|
|
15957
|
+
render: (se, ye) => /* @__PURE__ */ i(
|
|
15958
15958
|
_o,
|
|
15959
15959
|
{
|
|
15960
|
-
value:
|
|
15960
|
+
value: se,
|
|
15961
15961
|
record: ye,
|
|
15962
15962
|
column: be,
|
|
15963
15963
|
isFieldLoading: le
|
|
@@ -15966,25 +15966,25 @@ const dd = ({
|
|
|
15966
15966
|
})) : [], [U, le]), Z = F(
|
|
15967
15967
|
async ({
|
|
15968
15968
|
startRow: be,
|
|
15969
|
-
endRow:
|
|
15970
|
-
state:
|
|
15969
|
+
endRow: $e,
|
|
15970
|
+
state: se
|
|
15971
15971
|
}) => {
|
|
15972
|
-
const ye = sr({ state:
|
|
15972
|
+
const ye = sr({ state: se }), { results: _e, colors: Ie, status: Le } = await d({
|
|
15973
15973
|
allItems: _.current,
|
|
15974
15974
|
startRow: be,
|
|
15975
|
-
endRow:
|
|
15975
|
+
endRow: $e,
|
|
15976
15976
|
sortFields: ye
|
|
15977
15977
|
});
|
|
15978
15978
|
if (Ie && (N.current = { ...N.current, ...Ie }), Le && (H.current || (H.current = {}), H.current = { ...H.current, ...Le }), Ie || Le) {
|
|
15979
|
-
const Je =
|
|
15979
|
+
const Je = _e.map((ft) => ({
|
|
15980
15980
|
id: ft.id,
|
|
15981
15981
|
colors: Ie == null ? void 0 : Ie[ft.id],
|
|
15982
15982
|
status: Le == null ? void 0 : Le[ft.id]
|
|
15983
15983
|
}));
|
|
15984
15984
|
pe(Je, o);
|
|
15985
15985
|
}
|
|
15986
|
-
const Ve =
|
|
15987
|
-
return Ve.length > 0 && de(Ve),
|
|
15986
|
+
const Ve = _e.map((Je) => Je.id).filter(Boolean);
|
|
15987
|
+
return Ve.length > 0 && de(Ve), _e;
|
|
15988
15988
|
},
|
|
15989
15989
|
[
|
|
15990
15990
|
N,
|
|
@@ -16001,22 +16001,22 @@ const dd = ({
|
|
|
16001
16001
|
try {
|
|
16002
16002
|
const be = sr({
|
|
16003
16003
|
state: I.current
|
|
16004
|
-
}), { results:
|
|
16004
|
+
}), { results: $e, colors: se, status: ye } = await d({
|
|
16005
16005
|
allItems: e,
|
|
16006
16006
|
startRow: 0,
|
|
16007
16007
|
endRow: e.length,
|
|
16008
16008
|
sortFields: be
|
|
16009
16009
|
});
|
|
16010
|
-
if (
|
|
16011
|
-
const Ie =
|
|
16010
|
+
if (se && (N.current = { ...N.current, ...se }), ye && (H.current || (H.current = {}), H.current = { ...H.current, ...ye }), se || ye) {
|
|
16011
|
+
const Ie = $e.map((Le) => ({
|
|
16012
16012
|
id: Le.id,
|
|
16013
|
-
colors:
|
|
16013
|
+
colors: se == null ? void 0 : se[Le.id],
|
|
16014
16014
|
status: ye == null ? void 0 : ye[Le.id]
|
|
16015
16015
|
}));
|
|
16016
16016
|
pe(Ie, o);
|
|
16017
16017
|
}
|
|
16018
|
-
const
|
|
16019
|
-
return
|
|
16018
|
+
const _e = $e.map((Ie) => Ie.id).filter(Boolean);
|
|
16019
|
+
return _e.length > 0 && de(_e), $e;
|
|
16020
16020
|
} finally {
|
|
16021
16021
|
P(!1);
|
|
16022
16022
|
}
|
|
@@ -16031,7 +16031,7 @@ const dd = ({
|
|
|
16031
16031
|
pe
|
|
16032
16032
|
]);
|
|
16033
16033
|
Ue(() => {
|
|
16034
|
-
var
|
|
16034
|
+
var $e;
|
|
16035
16035
|
if (_.current = e, w.current === void 0) {
|
|
16036
16036
|
w.current = e;
|
|
16037
16037
|
return;
|
|
@@ -16042,13 +16042,13 @@ const dd = ({
|
|
|
16042
16042
|
const ye = be.filter((Le) => Le.treeValues).map((Le) => Le.treeValues);
|
|
16043
16043
|
if (ye.length === 0)
|
|
16044
16044
|
return;
|
|
16045
|
-
const
|
|
16045
|
+
const _e = await Yt(
|
|
16046
16046
|
o,
|
|
16047
16047
|
ye,
|
|
16048
16048
|
a
|
|
16049
16049
|
);
|
|
16050
|
-
(Ie = S == null ? void 0 : S.current) == null || Ie.updateRows(
|
|
16051
|
-
})(), (
|
|
16050
|
+
(Ie = S == null ? void 0 : S.current) == null || Ie.updateRows(_e);
|
|
16051
|
+
})(), ($e = S == null ? void 0 : S.current) == null || $e.unselectAll();
|
|
16052
16052
|
}, [e, b, Y, S, o, a]);
|
|
16053
16053
|
const oe = F(() => {
|
|
16054
16054
|
if (m) {
|
|
@@ -16061,39 +16061,39 @@ const dd = ({
|
|
|
16061
16061
|
[p]
|
|
16062
16062
|
), fe = F(() => {
|
|
16063
16063
|
var be;
|
|
16064
|
-
Y(), b === "paginated" ? E((
|
|
16065
|
-
}, [Y, b, S]),
|
|
16064
|
+
Y(), b === "paginated" ? E(($e) => $e + 1) : (be = S == null ? void 0 : S.current) == null || be.refresh();
|
|
16065
|
+
}, [Y, b, S]), Se = Xt(A), Te = Xt(
|
|
16066
16066
|
O
|
|
16067
|
-
), ae = Xt(re), me = Xt(ne),
|
|
16067
|
+
), ae = Xt(re), me = Xt(ne), ke = Xt(q), Me = Xt(z), tt = F(
|
|
16068
16068
|
(be) => {
|
|
16069
16069
|
be.selected ? c([...h, be.id]) : c(
|
|
16070
|
-
h.filter((
|
|
16070
|
+
h.filter(($e) => $e !== be.id)
|
|
16071
16071
|
);
|
|
16072
16072
|
},
|
|
16073
16073
|
[h, c]
|
|
16074
|
-
), we = te(() => h.length === 0 ? "unchecked" : h.length === ee.length ? "checked" : "indeterminate", [h, ee.length]),
|
|
16074
|
+
), we = te(() => h.length === 0 ? "unchecked" : h.length === ee.length ? "checked" : "indeterminate", [h, ee.length]), Ye = Xt((be) => {
|
|
16075
16075
|
I.current = be, A(0), O(void 0), b === "paginated" && e.length > 0 && J().then(T);
|
|
16076
|
-
}),
|
|
16076
|
+
}), Ee = Xt(J);
|
|
16077
16077
|
Ue(() => {
|
|
16078
|
-
b === "paginated" && (e.length > 0 ?
|
|
16078
|
+
b === "paginated" && (e.length > 0 ? Ee().then(T) : T([]));
|
|
16079
16079
|
}, [b, e]);
|
|
16080
16080
|
const Be = te(() => b === "paginated" ? k : [], [b, k]), We = F(
|
|
16081
16081
|
async (be) => {
|
|
16082
16082
|
if (!(s != null && s.field_parent))
|
|
16083
16083
|
return [];
|
|
16084
|
-
const
|
|
16085
|
-
if (
|
|
16084
|
+
const $e = be[s.field_parent];
|
|
16085
|
+
if (!$e || $e.length === 0)
|
|
16086
16086
|
return [];
|
|
16087
16087
|
try {
|
|
16088
|
-
const
|
|
16088
|
+
const se = s.field_parent ? { ...s.fields, [s.field_parent]: {} } : s.fields, ye = await W.getHandler().readObjects({
|
|
16089
16089
|
model: f,
|
|
16090
|
-
ids:
|
|
16091
|
-
fields:
|
|
16090
|
+
ids: $e,
|
|
16091
|
+
fields: se,
|
|
16092
16092
|
context: a
|
|
16093
16093
|
});
|
|
16094
16094
|
return await Yt(o, ye, a);
|
|
16095
|
-
} catch (
|
|
16096
|
-
return console.error("Error fetching children:",
|
|
16095
|
+
} catch (se) {
|
|
16096
|
+
return console.error("Error fetching children:", se), [];
|
|
16097
16097
|
}
|
|
16098
16098
|
},
|
|
16099
16099
|
[s, o, f, a]
|
|
@@ -16103,11 +16103,11 @@ const dd = ({
|
|
|
16103
16103
|
},
|
|
16104
16104
|
[n]
|
|
16105
16105
|
);
|
|
16106
|
-
return
|
|
16106
|
+
return ie ? /* @__PURE__ */ i(it, {}) : b === "paginated" ? /* @__PURE__ */ i(
|
|
16107
16107
|
qy,
|
|
16108
16108
|
{
|
|
16109
16109
|
tableRef: S,
|
|
16110
|
-
onRowStyle:
|
|
16110
|
+
onRowStyle: Me,
|
|
16111
16111
|
availableHeight: t || ya,
|
|
16112
16112
|
columns: G,
|
|
16113
16113
|
treeOoui: o,
|
|
@@ -16118,17 +16118,17 @@ const dd = ({
|
|
|
16118
16118
|
onRowHasBeenSelected: tt,
|
|
16119
16119
|
updateColumnState: ae,
|
|
16120
16120
|
getColumnState: me,
|
|
16121
|
-
setTreeFirstVisibleRow:
|
|
16121
|
+
setTreeFirstVisibleRow: Se,
|
|
16122
16122
|
onGetFirstVisibleRowIndex: oe,
|
|
16123
16123
|
onGetFirstVisibleColumn: X,
|
|
16124
|
-
setTreeFirstVisibleColumn:
|
|
16124
|
+
setTreeFirstVisibleColumn: Te,
|
|
16125
16125
|
footerComp: ce,
|
|
16126
16126
|
statusComp: j,
|
|
16127
|
-
onRowStatus:
|
|
16127
|
+
onRowStatus: ke,
|
|
16128
16128
|
headerCheckboxState: we,
|
|
16129
16129
|
onHeaderCheckboxClick: K,
|
|
16130
16130
|
refresh: fe,
|
|
16131
|
-
onSortChange:
|
|
16131
|
+
onSortChange: Ye,
|
|
16132
16132
|
onChangeTreeType: v,
|
|
16133
16133
|
onFetchChildrenForRecord: Ne,
|
|
16134
16134
|
childField: s == null ? void 0 : s.field_parent
|
|
@@ -16163,7 +16163,7 @@ const dd = ({
|
|
|
16163
16163
|
}
|
|
16164
16164
|
);
|
|
16165
16165
|
}, eb = ["form", "tree", "graph"], tb = (e) => {
|
|
16166
|
-
var
|
|
16166
|
+
var ke, Me, tt;
|
|
16167
16167
|
const t = Q(null), { value: n, onChange: r, ooui: o, views: s, treeType: a, onUserSelectTreeType: d } = e, { items: c = [] } = n || {}, l = ld({ one2manyItems: c }), { currentView: f, setCurrentView: u, itemIndex: m, setItemIndex: p, setTreeType: g } = ve(xn), {
|
|
16168
16168
|
readOnly: h,
|
|
16169
16169
|
relation: y,
|
|
@@ -16174,7 +16174,7 @@ const dd = ({
|
|
|
16174
16174
|
activeId: w,
|
|
16175
16175
|
getContext: _,
|
|
16176
16176
|
fetchValues: x
|
|
16177
|
-
} = S || {}, A = Q(), D = s.size > 1, O = ((
|
|
16177
|
+
} = S || {}, A = Q(), D = s.size > 1, O = ((ke = s.get("form")) == null ? void 0 : ke.fields) !== void 0, M = te(() => ({ ..._ == null ? void 0 : _(), ...b }), [_, b]), E = id({
|
|
16178
16178
|
widgetDomain: v,
|
|
16179
16179
|
fieldName: C
|
|
16180
16180
|
}), {
|
|
@@ -16196,9 +16196,9 @@ const dd = ({
|
|
|
16196
16196
|
return we || o.label;
|
|
16197
16197
|
}, [f, o.label, s]), N = o.type === "many2many", H = F(
|
|
16198
16198
|
(we) => {
|
|
16199
|
-
var
|
|
16199
|
+
var Ye, Ee;
|
|
16200
16200
|
r == null || r({
|
|
16201
|
-
fields: ((
|
|
16201
|
+
fields: ((Ye = s.get("form")) == null ? void 0 : Ye.fields) || ((Ee = s.get("tree")) == null ? void 0 : Ee.fields),
|
|
16202
16202
|
items: we
|
|
16203
16203
|
});
|
|
16204
16204
|
},
|
|
@@ -16217,7 +16217,7 @@ const dd = ({
|
|
|
16217
16217
|
triggerChange: H
|
|
16218
16218
|
}), {
|
|
16219
16219
|
showFormModal: re,
|
|
16220
|
-
modalItem:
|
|
16220
|
+
modalItem: ie,
|
|
16221
16221
|
continuousEntryMode: pe,
|
|
16222
16222
|
onCancelFormModal: Y,
|
|
16223
16223
|
onFormModalSubmitSucceed: ce,
|
|
@@ -16256,14 +16256,14 @@ const dd = ({
|
|
|
16256
16256
|
selectedRowKeys: T,
|
|
16257
16257
|
setSelectedRowKeys: $
|
|
16258
16258
|
}), X = () => {
|
|
16259
|
-
const we = Array.from(s.keys()),
|
|
16259
|
+
const we = Array.from(s.keys()), Ye = we[(we.indexOf(f) + 1) % we.length];
|
|
16260
16260
|
f === "form" ? q(() => {
|
|
16261
|
-
u(
|
|
16262
|
-
}) : u(
|
|
16261
|
+
u(Ye);
|
|
16262
|
+
}) : u(Ye);
|
|
16263
16263
|
}, K = dt(
|
|
16264
16264
|
(we) => {
|
|
16265
|
-
var
|
|
16266
|
-
(
|
|
16265
|
+
var Ye;
|
|
16266
|
+
(Ye = s.get("form")) != null && Ye.fields && le(we);
|
|
16267
16267
|
},
|
|
16268
16268
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16269
16269
|
[l]
|
|
@@ -16271,7 +16271,7 @@ const dd = ({
|
|
|
16271
16271
|
m > 0 && (f === "form" ? q(() => {
|
|
16272
16272
|
p(m - 1);
|
|
16273
16273
|
}) : p(m - 1));
|
|
16274
|
-
}, [f, m, p, q]),
|
|
16274
|
+
}, [f, m, p, q]), Se = F(() => {
|
|
16275
16275
|
const we = l.length;
|
|
16276
16276
|
m < we - 1 && (f === "form" ? q(() => {
|
|
16277
16277
|
p(m + 1);
|
|
@@ -16282,7 +16282,7 @@ const dd = ({
|
|
|
16282
16282
|
l.length,
|
|
16283
16283
|
p,
|
|
16284
16284
|
q
|
|
16285
|
-
]),
|
|
16285
|
+
]), Te = te(() => {
|
|
16286
16286
|
var we;
|
|
16287
16287
|
return ((we = s.get("form")) == null ? void 0 : we.fields) !== void 0;
|
|
16288
16288
|
}, [s]), ae = F(
|
|
@@ -16299,7 +16299,7 @@ const dd = ({
|
|
|
16299
16299
|
{
|
|
16300
16300
|
mode: f,
|
|
16301
16301
|
title: L,
|
|
16302
|
-
currentId: (
|
|
16302
|
+
currentId: (Me = l[m]) == null ? void 0 : Me.id,
|
|
16303
16303
|
model: y,
|
|
16304
16304
|
readOnly: h || !1,
|
|
16305
16305
|
isMany2Many: N,
|
|
@@ -16310,7 +16310,7 @@ const dd = ({
|
|
|
16310
16310
|
onCreateItem: ee,
|
|
16311
16311
|
onToggleViewMode: X,
|
|
16312
16312
|
onPreviousItem: fe,
|
|
16313
|
-
onNextItem:
|
|
16313
|
+
onNextItem: Se,
|
|
16314
16314
|
onSearchItem: J,
|
|
16315
16315
|
selectedRowKeys: T,
|
|
16316
16316
|
showCreateButton: O,
|
|
@@ -16337,7 +16337,7 @@ const dd = ({
|
|
|
16337
16337
|
treeView: s.get("tree"),
|
|
16338
16338
|
context: M,
|
|
16339
16339
|
onRowDoubleClick: K,
|
|
16340
|
-
showPointerCursorInRows:
|
|
16340
|
+
showPointerCursorInRows: Te,
|
|
16341
16341
|
onRowSelectionChange: $,
|
|
16342
16342
|
relation: y,
|
|
16343
16343
|
onChangeFirstVisibleRowIndex: P,
|
|
@@ -16370,10 +16370,10 @@ const dd = ({
|
|
|
16370
16370
|
{
|
|
16371
16371
|
formView: s.get("form"),
|
|
16372
16372
|
model: y,
|
|
16373
|
-
id:
|
|
16373
|
+
id: ie == null ? void 0 : ie.id,
|
|
16374
16374
|
submitMode: "2many",
|
|
16375
|
-
values:
|
|
16376
|
-
defaultValues:
|
|
16375
|
+
values: ie == null ? void 0 : ie.values,
|
|
16376
|
+
defaultValues: ie == null ? void 0 : ie.defaultValues,
|
|
16377
16377
|
visible: re,
|
|
16378
16378
|
onSubmitSucceed: ce,
|
|
16379
16379
|
parentContext: M,
|
|
@@ -16600,7 +16600,7 @@ const dd = ({
|
|
|
16600
16600
|
domain: s
|
|
16601
16601
|
});
|
|
16602
16602
|
}, ab = ["form", "tree", "graph"], lb = (e) => {
|
|
16603
|
-
var
|
|
16603
|
+
var Se, Te, ae;
|
|
16604
16604
|
const t = Q(null), { value: n, onChange: r, ooui: o, views: s } = e, { items: a = [] } = n || {}, d = ld({ one2manyItems: a }), { currentView: c, setCurrentView: l, itemIndex: f, setItemIndex: u } = ve(
|
|
16605
16605
|
xn
|
|
16606
16606
|
), {
|
|
@@ -16613,7 +16613,7 @@ const dd = ({
|
|
|
16613
16613
|
activeId: v,
|
|
16614
16614
|
getContext: C,
|
|
16615
16615
|
fetchValues: S
|
|
16616
|
-
} = b || {}, w = Q(), _ = s.size > 1, x = ((
|
|
16616
|
+
} = b || {}, w = Q(), _ = s.size > 1, x = ((Se = s.get("form")) == null ? void 0 : Se.fields) !== void 0, A = te(() => ({ ...C == null ? void 0 : C(), ...g }), [C, g]), D = id({
|
|
16617
16617
|
widgetDomain: h,
|
|
16618
16618
|
fieldName: y
|
|
16619
16619
|
}), {
|
|
@@ -16640,9 +16640,9 @@ const dd = ({
|
|
|
16640
16640
|
return me || o.label;
|
|
16641
16641
|
}, [c, o.label, s]), U = o.type === "many2many", L = F(
|
|
16642
16642
|
(me) => {
|
|
16643
|
-
var
|
|
16643
|
+
var ke, Me;
|
|
16644
16644
|
r == null || r({
|
|
16645
|
-
fields: ((
|
|
16645
|
+
fields: ((ke = s.get("form")) == null ? void 0 : ke.fields) || ((Me = s.get("tree")) == null ? void 0 : Me.fields),
|
|
16646
16646
|
items: me
|
|
16647
16647
|
});
|
|
16648
16648
|
},
|
|
@@ -16663,7 +16663,7 @@ const dd = ({
|
|
|
16663
16663
|
showFormModal: q,
|
|
16664
16664
|
modalItem: ne,
|
|
16665
16665
|
continuousEntryMode: re,
|
|
16666
|
-
onCancelFormModal:
|
|
16666
|
+
onCancelFormModal: ie,
|
|
16667
16667
|
onFormModalSubmitSucceed: pe,
|
|
16668
16668
|
createItem: Y,
|
|
16669
16669
|
openItemInFormModal: ce
|
|
@@ -16700,14 +16700,14 @@ const dd = ({
|
|
|
16700
16700
|
selectedRowKeys: E,
|
|
16701
16701
|
setSelectedRowKeys: I
|
|
16702
16702
|
}), J = () => {
|
|
16703
|
-
const me = Array.from(s.keys()),
|
|
16703
|
+
const me = Array.from(s.keys()), ke = me[(me.indexOf(c) + 1) % me.length];
|
|
16704
16704
|
c === "form" ? z(() => {
|
|
16705
|
-
l(
|
|
16706
|
-
}) : l(
|
|
16705
|
+
l(ke);
|
|
16706
|
+
}) : l(ke);
|
|
16707
16707
|
}, oe = dt(
|
|
16708
16708
|
(me) => {
|
|
16709
|
-
var
|
|
16710
|
-
(
|
|
16709
|
+
var ke;
|
|
16710
|
+
(ke = s.get("form")) != null && ke.fields && ce(me);
|
|
16711
16711
|
},
|
|
16712
16712
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16713
16713
|
[d]
|
|
@@ -16736,7 +16736,7 @@ const dd = ({
|
|
|
16736
16736
|
{
|
|
16737
16737
|
mode: c,
|
|
16738
16738
|
title: V,
|
|
16739
|
-
currentId: (
|
|
16739
|
+
currentId: (Te = d[f]) == null ? void 0 : Te.id,
|
|
16740
16740
|
model: p,
|
|
16741
16741
|
readOnly: m || !1,
|
|
16742
16742
|
isMany2Many: U,
|
|
@@ -16812,7 +16812,7 @@ const dd = ({
|
|
|
16812
16812
|
visible: q,
|
|
16813
16813
|
onSubmitSucceed: pe,
|
|
16814
16814
|
parentContext: A,
|
|
16815
|
-
onCancel:
|
|
16815
|
+
onCancel: ie,
|
|
16816
16816
|
readOnly: m,
|
|
16817
16817
|
mustClearAfterSave: re,
|
|
16818
16818
|
onMustRefreshParent: () => {
|
|
@@ -16852,9 +16852,9 @@ const dd = ({
|
|
|
16852
16852
|
var I;
|
|
16853
16853
|
const { ooui: t } = e, { mode: n, relation: r, views: o, required: s, context: a } = t;
|
|
16854
16854
|
let d;
|
|
16855
|
-
const [c, l] = R(!0), [f, u] = R(), [m, p] = R(/* @__PURE__ */ new Map()), g = ve(st), { getContext: h, formView: y, refreshCounter: b } = g || {}, { view_id: v } = y || {}, [C, S] =
|
|
16855
|
+
const [c, l] = R(!0), [f, u] = R(), [m, p] = R(/* @__PURE__ */ new Map()), g = ve(st), { getContext: h, formView: y, refreshCounter: b } = g || {}, { view_id: v } = y || {}, [C, S] = Ae(
|
|
16856
16856
|
W.getHandler().getView
|
|
16857
|
-
), [w, _] =
|
|
16857
|
+
), [w, _] = Ae(
|
|
16858
16858
|
W.getHandler().getToolbar
|
|
16859
16859
|
);
|
|
16860
16860
|
Ue(() => {
|
|
@@ -16921,7 +16921,7 @@ const dd = ({
|
|
|
16921
16921
|
}
|
|
16922
16922
|
};
|
|
16923
16923
|
return n && n.length > 0 ? d = n[0] : d = "tree", c ? /* @__PURE__ */ i(it, {}) : f ? (console.error(f), /* @__PURE__ */ i(kt, { className: "mt-10", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ i(hp, { initialView: d, children: /* @__PURE__ */ i(
|
|
16924
|
-
|
|
16924
|
+
Ke,
|
|
16925
16925
|
{
|
|
16926
16926
|
required: s,
|
|
16927
16927
|
type: "array",
|
|
@@ -16986,7 +16986,7 @@ const dd = ({
|
|
|
16986
16986
|
return /* @__PURE__ */ i(Kv, { ...e });
|
|
16987
16987
|
}, { useToken: ub } = ot, fb = (e) => {
|
|
16988
16988
|
const { ooui: t } = e, { required: n } = t;
|
|
16989
|
-
return /* @__PURE__ */ i(
|
|
16989
|
+
return /* @__PURE__ */ i(Ke, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(mb, { ooui: t }) });
|
|
16990
16990
|
}, mb = (e) => {
|
|
16991
16991
|
const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: d } = ub(), c = a && !s ? { backgroundColor: d.colorPrimaryBg } : void 0, l = Q(), [f, u] = R(), m = ve(st), { elementHasLostFocus: p } = m || {};
|
|
16992
16992
|
he(() => {
|
|
@@ -17111,7 +17111,7 @@ function gb(e) {
|
|
|
17111
17111
|
}
|
|
17112
17112
|
const { useToken: yb } = ot, { TextArea: hs } = ht, vb = (e) => {
|
|
17113
17113
|
const { ooui: t } = e, { id: n, readOnly: r, required: o, height: s, translatable: a } = t, { token: d } = yb(), c = o && !r ? { backgroundColor: d.colorPrimaryBg } : void 0, l = ve(st), { elementHasLostFocus: f } = l || {};
|
|
17114
|
-
return /* @__PURE__ */ i(
|
|
17114
|
+
return /* @__PURE__ */ i(Ke, { required: o, ...e, children: a ? /* @__PURE__ */ i(
|
|
17115
17115
|
bb,
|
|
17116
17116
|
{
|
|
17117
17117
|
field: n,
|
|
@@ -17509,7 +17509,7 @@ const { useToken: yb } = ot, { TextArea: hs } = ht, vb = (e) => {
|
|
|
17509
17509
|
);
|
|
17510
17510
|
}, Eb = (e) => {
|
|
17511
17511
|
const { ooui: t, showTime: n = !1 } = e, { required: r, readOnly: o = !1, timezone: s } = t;
|
|
17512
|
-
return /* @__PURE__ */ i(
|
|
17512
|
+
return /* @__PURE__ */ i(Ke, { required: r, ...e, children: /* @__PURE__ */ i(
|
|
17513
17513
|
yu,
|
|
17514
17514
|
{
|
|
17515
17515
|
id: t._id,
|
|
@@ -17527,7 +17527,7 @@ const { useToken: yb } = ot, { TextArea: hs } = ht, vb = (e) => {
|
|
|
17527
17527
|
return /* @__PURE__ */ i(hd, { ooui: t, showTime: !0 });
|
|
17528
17528
|
}, kb = (e) => {
|
|
17529
17529
|
const { ooui: t } = e;
|
|
17530
|
-
return /* @__PURE__ */ i(
|
|
17530
|
+
return /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(Mb, { ooui: t }) });
|
|
17531
17531
|
}, Mb = (e) => {
|
|
17532
17532
|
const { readOnly: t } = e.ooui;
|
|
17533
17533
|
return /* @__PURE__ */ i(
|
|
@@ -17543,7 +17543,7 @@ const { useToken: yb } = ot, { TextArea: hs } = ht, vb = (e) => {
|
|
|
17543
17543
|
);
|
|
17544
17544
|
}, $b = (e) => {
|
|
17545
17545
|
const { ooui: t } = e, { required: n } = t;
|
|
17546
|
-
return /* @__PURE__ */ i(
|
|
17546
|
+
return /* @__PURE__ */ i(Ke, { required: n, ...e, children: /* @__PURE__ */ i(Nb, { ooui: t }) });
|
|
17547
17547
|
}, Nb = (e) => {
|
|
17548
17548
|
const { value: t, onChange: n, ooui: r } = e, { required: o, selectionValues: s, readOnly: a, domain: d } = r, c = t == null ? void 0 : t.split(","), [l, f] = R([]), [u, m] = R();
|
|
17549
17549
|
return he(() => {
|
|
@@ -17594,7 +17594,7 @@ const { useToken: yb } = ot, { TextArea: hs } = ht, vb = (e) => {
|
|
|
17594
17594
|
] });
|
|
17595
17595
|
}, { useToken: Pb } = ot, Lb = (e) => {
|
|
17596
17596
|
const { ooui: t } = e, { required: n } = t;
|
|
17597
|
-
return /* @__PURE__ */ i(
|
|
17597
|
+
return /* @__PURE__ */ i(Ke, { required: n, ...e, children: /* @__PURE__ */ i(Vb, { ooui: t }) });
|
|
17598
17598
|
}, Vb = (e) => {
|
|
17599
17599
|
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: d } = Pb(), c = s && !o ? { backgroundColor: d.colorPrimaryBg } : void 0, l = Q(null), { setFieldValue: f, getFieldValue: u } = ve(st) || {}, { t: m } = xe(), p = n ? Ef(n) : "", g = (C) => {
|
|
17600
17600
|
r == null || r(C);
|
|
@@ -17864,7 +17864,7 @@ const jb = () => {
|
|
|
17864
17864
|
setCurrentItemIndex: o,
|
|
17865
17865
|
results: s,
|
|
17866
17866
|
searchQuery: a
|
|
17867
|
-
} = Vt(), [d, c] =
|
|
17867
|
+
} = Vt(), [d, c] = Ae(
|
|
17868
17868
|
W.getHandler().searchForTree
|
|
17869
17869
|
);
|
|
17870
17870
|
he(() => () => {
|
|
@@ -18049,7 +18049,7 @@ function Ub({ toolbar: e }) {
|
|
|
18049
18049
|
),
|
|
18050
18050
|
initialViewType: "form"
|
|
18051
18051
|
}));
|
|
18052
|
-
}, [v, f, P]),
|
|
18052
|
+
}, [v, f, P]), ie = F(async () => {
|
|
18053
18053
|
const Y = await tr({ onFormSave: f });
|
|
18054
18054
|
Y.succeed && (P == null || P({
|
|
18055
18055
|
...wa(
|
|
@@ -18197,7 +18197,7 @@ function Ub({ toolbar: e }) {
|
|
|
18197
18197
|
disabled: V,
|
|
18198
18198
|
attachments: D,
|
|
18199
18199
|
onAddNewAttachment: re,
|
|
18200
|
-
onListAllAttachments:
|
|
18200
|
+
onListAllAttachments: ie,
|
|
18201
18201
|
onViewAttachmentDetails: pe
|
|
18202
18202
|
}
|
|
18203
18203
|
),
|
|
@@ -18302,7 +18302,7 @@ const wa = (e, t) => ({
|
|
|
18302
18302
|
] });
|
|
18303
18303
|
}, Yb = (e) => {
|
|
18304
18304
|
const { ooui: t } = e, { required: n } = t;
|
|
18305
|
-
return /* @__PURE__ */ i(
|
|
18305
|
+
return /* @__PURE__ */ i(Ke, { required: n, ...e, children: /* @__PURE__ */ i(
|
|
18306
18306
|
yd,
|
|
18307
18307
|
{
|
|
18308
18308
|
ooui: t,
|
|
@@ -18311,7 +18311,7 @@ const wa = (e, t) => ({
|
|
|
18311
18311
|
) });
|
|
18312
18312
|
}, Gb = (e) => {
|
|
18313
18313
|
const { ooui: t } = e, { required: n } = t;
|
|
18314
|
-
return /* @__PURE__ */ i(
|
|
18314
|
+
return /* @__PURE__ */ i(Ke, { required: n, ...e, children: t.multi ? /* @__PURE__ */ i(pp, { readonly: t.readOnly, maxLength: t.size }) : /* @__PURE__ */ i(
|
|
18315
18315
|
yd,
|
|
18316
18316
|
{
|
|
18317
18317
|
ooui: t,
|
|
@@ -18548,7 +18548,7 @@ const Jb = (e) => {
|
|
|
18548
18548
|
he(() => {
|
|
18549
18549
|
ne && V(!0);
|
|
18550
18550
|
}, [ne]);
|
|
18551
|
-
const { clear: re, searchFilterLoading:
|
|
18551
|
+
const { clear: re, searchFilterLoading: ie, searchError: pe, offset: Y, tableRefreshing: ce } = Bc({
|
|
18552
18552
|
model: r,
|
|
18553
18553
|
setSearchTreeNameSearch: x,
|
|
18554
18554
|
setSelectedRowItems: y,
|
|
@@ -18605,7 +18605,7 @@ const Jb = (e) => {
|
|
|
18605
18605
|
limit: D,
|
|
18606
18606
|
onClear: re,
|
|
18607
18607
|
offset: Y,
|
|
18608
|
-
isSearching:
|
|
18608
|
+
isSearching: ie,
|
|
18609
18609
|
onSubmit: (de) => {
|
|
18610
18610
|
V(!1), b == null || b(de.params), C == null || C(!1);
|
|
18611
18611
|
},
|
|
@@ -18856,7 +18856,7 @@ const Ca = ({ value: e }) => te(
|
|
|
18856
18856
|
isDropTarget: m = !1,
|
|
18857
18857
|
activeId: p = null,
|
|
18858
18858
|
dropPosition: g = null
|
|
18859
|
-
} = e, { token: h } = sw(), [y, b] = R(null), { showErrorNotification: v } = St(), [C, S] =
|
|
18859
|
+
} = e, { token: h } = sw(), [y, b] = R(null), { showErrorNotification: v } = St(), [C, S] = Ae(
|
|
18860
18860
|
W.getHandler().execute
|
|
18861
18861
|
);
|
|
18862
18862
|
he(() => () => {
|
|
@@ -19042,11 +19042,11 @@ const Ca = ({ value: e }) => te(
|
|
|
19042
19042
|
fieldsToRetrieve: d = [],
|
|
19043
19043
|
enabled: c = !0,
|
|
19044
19044
|
kanbanDef: l
|
|
19045
|
-
} = e, [f, u] = R([]), [m, p] = R({}), [g, h] = R(!1), [y, b] = R(!1), [v, C] = R(!1), [S, w] = R(null), [_, x] = R(0), [A, D] = R(!0), [O, M] = R(0), [E, I] = R({}), [k, T] = R({}), $ = 30, [P, V] =
|
|
19045
|
+
} = e, [f, u] = R([]), [m, p] = R({}), [g, h] = R(!1), [y, b] = R(!1), [v, C] = R(!1), [S, w] = R(null), [_, x] = R(0), [A, D] = R(!0), [O, M] = R(0), [E, I] = R({}), [k, T] = R({}), $ = 30, [P, V] = Ae(
|
|
19046
19046
|
W.getHandler().searchForTree
|
|
19047
|
-
), [U, L] =
|
|
19047
|
+
), [U, L] = Ae(
|
|
19048
19048
|
W.getHandler().readAggregates
|
|
19049
|
-
), [N, H] =
|
|
19049
|
+
), [N, H] = Ae(
|
|
19050
19050
|
W.getHandler().searchCount
|
|
19051
19051
|
);
|
|
19052
19052
|
he(() => () => {
|
|
@@ -19058,16 +19058,16 @@ const Ca = ({ value: e }) => te(
|
|
|
19058
19058
|
const re = l.aggregations;
|
|
19059
19059
|
if (Object.keys(re).length === 0)
|
|
19060
19060
|
return;
|
|
19061
|
-
const
|
|
19061
|
+
const ie = {};
|
|
19062
19062
|
return Object.keys(re).forEach((pe) => {
|
|
19063
|
-
|
|
19064
|
-
}),
|
|
19063
|
+
ie[pe] = ["sum"];
|
|
19064
|
+
}), ie;
|
|
19065
19065
|
}, [l == null ? void 0 : l.aggregations]), j = dt(
|
|
19066
19066
|
async (re = !1) => {
|
|
19067
19067
|
if (!c || !t || !(l != null && l.column_field))
|
|
19068
19068
|
return;
|
|
19069
|
-
const
|
|
19070
|
-
re ? b(!0) : (h(!0),
|
|
19069
|
+
const ie = f.length === 0 && !re;
|
|
19070
|
+
re ? b(!0) : (h(!0), ie && (x(0), D(!0))), w(null);
|
|
19071
19071
|
try {
|
|
19072
19072
|
const pe = a ? n : on(n, s);
|
|
19073
19073
|
let Y = o;
|
|
@@ -19120,11 +19120,11 @@ const Ca = ({ value: e }) => te(
|
|
|
19120
19120
|
aggregateFields: z,
|
|
19121
19121
|
context: r
|
|
19122
19122
|
}), fe = {};
|
|
19123
|
-
Object.entries(K).forEach(([
|
|
19124
|
-
const ae = (l == null ? void 0 : l.aggregations[
|
|
19125
|
-
fe[
|
|
19123
|
+
Object.entries(K).forEach(([Se, Te]) => {
|
|
19124
|
+
const ae = (l == null ? void 0 : l.aggregations[Se]) || Se;
|
|
19125
|
+
fe[Se] = {
|
|
19126
19126
|
label: ae,
|
|
19127
|
-
amount:
|
|
19127
|
+
amount: Te.sum || 0
|
|
19128
19128
|
};
|
|
19129
19129
|
}), p(fe);
|
|
19130
19130
|
} catch (X) {
|
|
@@ -19265,7 +19265,7 @@ const Ca = ({ value: e }) => te(
|
|
|
19265
19265
|
}), N = te(() => D.map((Y) => Y.id), [D]), H = f !== void 0 && O > f, z = te(() => M && Object.keys(M).length > 0 ? Object.values(M).map((Y) => `${Y.label}: ${Y.amount}`).join(", ") : null, [M]), j = te(() => m ? D.reduce((Y, ce) => (Y[ce.id] = () => m(ce), Y), {}) : {}, [D, m]), q = te(() => D.some((Y) => I == null ? void 0 : I[Y.id]), [D, I]), ne = Q(null), re = te(() => {
|
|
19266
19266
|
const le = l.buttons.length > 0 ? 40 : 0, G = l.card_fields.length * 24;
|
|
19267
19267
|
return 24 + 8 + G + le;
|
|
19268
|
-
}, [l.card_fields.length, l.buttons.length]),
|
|
19268
|
+
}, [l.card_fields.length, l.buttons.length]), ie = zu({
|
|
19269
19269
|
count: D.length,
|
|
19270
19270
|
getScrollElement: () => ne.current,
|
|
19271
19271
|
estimateSize: F(() => re, [re]),
|
|
@@ -19278,7 +19278,7 @@ const Ca = ({ value: e }) => te(
|
|
|
19278
19278
|
),
|
|
19279
19279
|
overscan: 5,
|
|
19280
19280
|
gap: 8
|
|
19281
|
-
}), pe =
|
|
19281
|
+
}), pe = ie.getVirtualItems();
|
|
19282
19282
|
return he(() => {
|
|
19283
19283
|
const [Y] = [...pe].reverse();
|
|
19284
19284
|
Y && Y.index >= D.length - 5 && P && !T && U();
|
|
@@ -19404,7 +19404,7 @@ const Ca = ({ value: e }) => te(
|
|
|
19404
19404
|
"div",
|
|
19405
19405
|
{
|
|
19406
19406
|
style: {
|
|
19407
|
-
height: `${
|
|
19407
|
+
height: `${ie.getTotalSize()}px`,
|
|
19408
19408
|
width: "100%",
|
|
19409
19409
|
position: "relative"
|
|
19410
19410
|
},
|
|
@@ -19414,7 +19414,7 @@ const Ca = ({ value: e }) => te(
|
|
|
19414
19414
|
"div",
|
|
19415
19415
|
{
|
|
19416
19416
|
"data-index": Y.index,
|
|
19417
|
-
ref:
|
|
19417
|
+
ref: ie.measureElement,
|
|
19418
19418
|
style: {
|
|
19419
19419
|
position: "absolute",
|
|
19420
19420
|
top: 0,
|
|
@@ -19596,9 +19596,9 @@ const Ca = ({ value: e }) => te(
|
|
|
19596
19596
|
onDragSuccess: g
|
|
19597
19597
|
} = e, { t: h } = xe(), { showErrorNotification: y } = St(), [b, v] = R(null), [C, S] = R(null), [w, _] = R(null), [x, A] = R(
|
|
19598
19598
|
null
|
|
19599
|
-
), D = Q({}), O = Q({}), M = Q({}), E = Q({}), I = Q({}), k = Q({}), [T, $] =
|
|
19599
|
+
), D = Q({}), O = Q({}), M = Q({}), E = Q({}), I = Q({}), k = Q({}), [T, $] = Ae(
|
|
19600
19600
|
W.getHandler().rawExecute
|
|
19601
|
-
), [P, V] =
|
|
19601
|
+
), [P, V] = Ae(
|
|
19602
19602
|
W.getHandler().rawExecute
|
|
19603
19603
|
);
|
|
19604
19604
|
he(() => () => {
|
|
@@ -19626,30 +19626,30 @@ const Ca = ({ value: e }) => te(
|
|
|
19626
19626
|
[n, l, h]
|
|
19627
19627
|
), H = F(
|
|
19628
19628
|
(Z) => {
|
|
19629
|
-
var
|
|
19629
|
+
var Se;
|
|
19630
19630
|
const { over: J, active: oe } = Z;
|
|
19631
19631
|
if (!J) {
|
|
19632
19632
|
S(null), _(null), A(null);
|
|
19633
19633
|
return;
|
|
19634
19634
|
}
|
|
19635
19635
|
if (typeof J.id == "string") {
|
|
19636
|
-
const
|
|
19637
|
-
if (
|
|
19638
|
-
const ae = D.current[
|
|
19639
|
-
S(
|
|
19636
|
+
const Te = n.find((ae) => ae.id === J.id);
|
|
19637
|
+
if (Te) {
|
|
19638
|
+
const ae = D.current[Te.id];
|
|
19639
|
+
S(Te.id), ae ? (_(ae.recordId), A(ae.position)) : (_(null), A(null));
|
|
19640
19640
|
}
|
|
19641
19641
|
return;
|
|
19642
19642
|
}
|
|
19643
|
-
const X = J.id, K = (
|
|
19643
|
+
const X = J.id, K = (Se = J.data.current) == null ? void 0 : Se.columnId;
|
|
19644
19644
|
if (K) {
|
|
19645
19645
|
if (S(K), X !== oe.id) {
|
|
19646
19646
|
_(X);
|
|
19647
|
-
const
|
|
19648
|
-
if (
|
|
19649
|
-
const ae =
|
|
19650
|
-
A(
|
|
19647
|
+
const Te = J.rect;
|
|
19648
|
+
if (Te) {
|
|
19649
|
+
const ae = Te.top + Te.height / 2, Me = (Z.activatorEvent && "clientY" in Z.activatorEvent ? Z.activatorEvent.clientY : 0) + Z.delta.y < ae ? "above" : "below";
|
|
19650
|
+
A(Me), D.current[K] = {
|
|
19651
19651
|
recordId: X,
|
|
19652
|
-
position:
|
|
19652
|
+
position: Me
|
|
19653
19653
|
};
|
|
19654
19654
|
}
|
|
19655
19655
|
} else
|
|
@@ -19658,13 +19658,13 @@ const Ca = ({ value: e }) => te(
|
|
|
19658
19658
|
}
|
|
19659
19659
|
const fe = E.current[X];
|
|
19660
19660
|
if (fe) {
|
|
19661
|
-
const
|
|
19661
|
+
const Te = fe[l.column_field], ae = N(Te);
|
|
19662
19662
|
if (ae) {
|
|
19663
19663
|
if (S(ae.id), X !== oe.id) {
|
|
19664
19664
|
_(X);
|
|
19665
19665
|
const me = J.rect;
|
|
19666
19666
|
if (me) {
|
|
19667
|
-
const
|
|
19667
|
+
const ke = me.top + me.height / 2, we = (Z.activatorEvent && "clientY" in Z.activatorEvent ? Z.activatorEvent.clientY : 0) + Z.delta.y < ke ? "above" : "below";
|
|
19668
19668
|
A(we), D.current[ae.id] = {
|
|
19669
19669
|
recordId: X,
|
|
19670
19670
|
position: we
|
|
@@ -19683,15 +19683,15 @@ const Ca = ({ value: e }) => te(
|
|
|
19683
19683
|
}, []), j = F(
|
|
19684
19684
|
(Z, J, oe, X) => {
|
|
19685
19685
|
const fe = (k.current[Z] || []).filter(
|
|
19686
|
-
(
|
|
19687
|
-
),
|
|
19688
|
-
if (
|
|
19686
|
+
(Te) => Te !== X
|
|
19687
|
+
), Se = fe.indexOf(J);
|
|
19688
|
+
if (Se === -1)
|
|
19689
19689
|
return { prevId: null, nextId: null };
|
|
19690
19690
|
if (oe === "above")
|
|
19691
|
-
return { prevId:
|
|
19691
|
+
return { prevId: Se > 0 ? fe[Se - 1] : null, nextId: J };
|
|
19692
19692
|
{
|
|
19693
|
-
const
|
|
19694
|
-
return { prevId:
|
|
19693
|
+
const Te = J, ae = Se < fe.length - 1 ? fe[Se + 1] : null;
|
|
19694
|
+
return { prevId: Te, nextId: ae };
|
|
19695
19695
|
}
|
|
19696
19696
|
},
|
|
19697
19697
|
[]
|
|
@@ -19714,14 +19714,14 @@ const Ca = ({ value: e }) => te(
|
|
|
19714
19714
|
X && X.refresh();
|
|
19715
19715
|
},
|
|
19716
19716
|
[]
|
|
19717
|
-
),
|
|
19717
|
+
), ie = F(async () => {
|
|
19718
19718
|
ne();
|
|
19719
19719
|
}, [ne]), { runAction: pe } = vd({
|
|
19720
19720
|
context: s,
|
|
19721
|
-
onRefreshParentValues:
|
|
19721
|
+
onRefreshParentValues: ie
|
|
19722
19722
|
}), Y = F(
|
|
19723
19723
|
async (Z) => {
|
|
19724
|
-
var
|
|
19724
|
+
var Ee, Be, We;
|
|
19725
19725
|
const { active: J, over: oe } = Z, X = w, K = x, fe = () => {
|
|
19726
19726
|
v(null), S(null), _(null), A(null);
|
|
19727
19727
|
};
|
|
@@ -19729,8 +19729,8 @@ const Ca = ({ value: e }) => te(
|
|
|
19729
19729
|
fe();
|
|
19730
19730
|
return;
|
|
19731
19731
|
}
|
|
19732
|
-
const
|
|
19733
|
-
if (!
|
|
19732
|
+
const Se = J.id, Te = E.current[Se];
|
|
19733
|
+
if (!Te) {
|
|
19734
19734
|
fe();
|
|
19735
19735
|
return;
|
|
19736
19736
|
}
|
|
@@ -19738,85 +19738,104 @@ const Ca = ({ value: e }) => te(
|
|
|
19738
19738
|
if (typeof oe.id == "string")
|
|
19739
19739
|
ae = n.find((Ne) => Ne.id === oe.id);
|
|
19740
19740
|
else {
|
|
19741
|
-
const Ne = (
|
|
19741
|
+
const Ne = (Ee = oe.data.current) == null ? void 0 : Ee.columnId;
|
|
19742
19742
|
Ne && (ae = n.find((Pe) => Pe.id === Ne));
|
|
19743
19743
|
}
|
|
19744
19744
|
if (!ae) {
|
|
19745
19745
|
fe();
|
|
19746
19746
|
return;
|
|
19747
19747
|
}
|
|
19748
|
-
const me =
|
|
19749
|
-
if (!
|
|
19748
|
+
const me = Te[l.column_field], ke = (Be = l.fields) == null ? void 0 : Be[l.column_field], Me = ke ? Rn(me, ke, h) : null;
|
|
19749
|
+
if (!Me) {
|
|
19750
19750
|
fe();
|
|
19751
19751
|
return;
|
|
19752
19752
|
}
|
|
19753
|
-
const tt =
|
|
19754
|
-
let we = X,
|
|
19753
|
+
const tt = Me.id === ae.id;
|
|
19754
|
+
let we = X, Ye = K;
|
|
19755
19755
|
if (!we && ae) {
|
|
19756
19756
|
const Ne = D.current[ae.id];
|
|
19757
|
-
Ne && (we = Ne.recordId,
|
|
19757
|
+
Ne && (we = Ne.recordId, Ye = Ne.position);
|
|
19758
19758
|
}
|
|
19759
19759
|
fe();
|
|
19760
19760
|
try {
|
|
19761
|
-
if (we && Ke) {
|
|
19762
|
-
const { prevId: ie, nextId: ye } = j(
|
|
19763
|
-
ae.id,
|
|
19764
|
-
we,
|
|
19765
|
-
Ke,
|
|
19766
|
-
Ae
|
|
19767
|
-
);
|
|
19768
|
-
await P({
|
|
19769
|
-
model: r,
|
|
19770
|
-
action: "reorder_element",
|
|
19771
|
-
payload: [
|
|
19772
|
-
Ae,
|
|
19773
|
-
ie,
|
|
19774
|
-
ye,
|
|
19775
|
-
l.sort || null,
|
|
19776
|
-
s
|
|
19777
|
-
]
|
|
19778
|
-
});
|
|
19779
|
-
}
|
|
19780
19761
|
if (tt) {
|
|
19781
|
-
|
|
19782
|
-
|
|
19762
|
+
if (we && Ye) {
|
|
19763
|
+
const { prevId: ye, nextId: _e } = j(
|
|
19764
|
+
ae.id,
|
|
19765
|
+
we,
|
|
19766
|
+
Ye,
|
|
19767
|
+
Se
|
|
19768
|
+
);
|
|
19769
|
+
(ye !== null || _e !== null) && await P({
|
|
19770
|
+
model: r,
|
|
19771
|
+
action: "reorder_element",
|
|
19772
|
+
payload: [
|
|
19773
|
+
Se,
|
|
19774
|
+
ye,
|
|
19775
|
+
_e,
|
|
19776
|
+
l.sort || null,
|
|
19777
|
+
s
|
|
19778
|
+
]
|
|
19779
|
+
});
|
|
19780
|
+
}
|
|
19781
|
+
const se = I.current[ae.id];
|
|
19782
|
+
se && se.refresh();
|
|
19783
19783
|
return;
|
|
19784
19784
|
}
|
|
19785
19785
|
const Ne = Rn(
|
|
19786
19786
|
me,
|
|
19787
|
-
|
|
19787
|
+
ke,
|
|
19788
19788
|
h
|
|
19789
19789
|
), Pe = Rn(
|
|
19790
19790
|
ae.originalValue,
|
|
19791
|
-
|
|
19791
|
+
ke,
|
|
19792
19792
|
h
|
|
19793
19793
|
), be = ((We = l.on_change_column) == null ? void 0 : We.method) || "on_change_column";
|
|
19794
19794
|
if (!(Ne != null && Ne.id) || !(Pe != null && Pe.id) || parseInt(Ne == null ? void 0 : Ne.id) === parseInt(Pe == null ? void 0 : Pe.id))
|
|
19795
19795
|
return;
|
|
19796
|
-
const
|
|
19796
|
+
const $e = await T({
|
|
19797
19797
|
model: r,
|
|
19798
19798
|
action: be,
|
|
19799
19799
|
payload: [
|
|
19800
|
-
[
|
|
19800
|
+
[Se],
|
|
19801
19801
|
l.column_field,
|
|
19802
19802
|
Ne != null && Ne.id ? parseInt(Ne == null ? void 0 : Ne.id) : null,
|
|
19803
19803
|
Pe != null && Pe.id ? parseInt(Pe == null ? void 0 : Pe.id) : null,
|
|
19804
19804
|
{
|
|
19805
19805
|
...s,
|
|
19806
|
-
active_id:
|
|
19807
|
-
active_ids: [
|
|
19806
|
+
active_id: Se,
|
|
19807
|
+
active_ids: [Se]
|
|
19808
19808
|
}
|
|
19809
19809
|
]
|
|
19810
19810
|
});
|
|
19811
|
-
if (
|
|
19811
|
+
if ($e && typeof $e == "object" && $e.type) {
|
|
19812
19812
|
await pe({
|
|
19813
|
-
actionData:
|
|
19813
|
+
actionData: $e
|
|
19814
19814
|
});
|
|
19815
19815
|
return;
|
|
19816
19816
|
}
|
|
19817
|
-
|
|
19817
|
+
if (we && Ye) {
|
|
19818
|
+
const { prevId: se, nextId: ye } = j(
|
|
19819
|
+
ae.id,
|
|
19820
|
+
we,
|
|
19821
|
+
Ye,
|
|
19822
|
+
Se
|
|
19823
|
+
);
|
|
19824
|
+
(se !== null || ye !== null) && await P({
|
|
19825
|
+
model: r,
|
|
19826
|
+
action: "reorder_element",
|
|
19827
|
+
payload: [
|
|
19828
|
+
Se,
|
|
19829
|
+
se,
|
|
19830
|
+
ye,
|
|
19831
|
+
l.sort || null,
|
|
19832
|
+
s
|
|
19833
|
+
]
|
|
19834
|
+
});
|
|
19835
|
+
}
|
|
19836
|
+
re(Me.id, ae.id);
|
|
19818
19837
|
} catch (Ne) {
|
|
19819
|
-
g && g(ae.id,
|
|
19838
|
+
g && g(ae.id, Me.id), y(Ne);
|
|
19820
19839
|
}
|
|
19821
19840
|
},
|
|
19822
19841
|
[
|
|
@@ -19960,11 +19979,11 @@ const Ca = ({ value: e }) => te(
|
|
|
19960
19979
|
searchParams: a = [],
|
|
19961
19980
|
enabled: d = !0,
|
|
19962
19981
|
columnDomain: c = null
|
|
19963
|
-
} = e, { t: l } = xe(), [f, u] = R([]), [m, p] = R(!1), [g, h] = R(null), [y, b] =
|
|
19982
|
+
} = e, { t: l } = xe(), [f, u] = R([]), [m, p] = R(!1), [g, h] = R(null), [y, b] = Ae(
|
|
19964
19983
|
W.getHandler().search
|
|
19965
|
-
), [v, C] =
|
|
19984
|
+
), [v, C] = Ae(
|
|
19966
19985
|
W.getHandler().getFields
|
|
19967
|
-
), [S, w] =
|
|
19986
|
+
), [S, w] = Ae(
|
|
19968
19987
|
W.getHandler().evalDomain
|
|
19969
19988
|
), _ = F(() => {
|
|
19970
19989
|
if (!s)
|
|
@@ -20301,27 +20320,27 @@ const Ca = ({ value: e }) => te(
|
|
|
20301
20320
|
D(J), x(void 0), w(!0);
|
|
20302
20321
|
}, []), H = F(
|
|
20303
20322
|
(J, oe, X) => {
|
|
20304
|
-
var K, fe,
|
|
20323
|
+
var K, fe, Se;
|
|
20305
20324
|
if (!(!J || !oe || !X)) {
|
|
20306
20325
|
if (V) {
|
|
20307
|
-
const
|
|
20308
|
-
if (ae !== void 0 &&
|
|
20326
|
+
const Te = X[V], ae = oe[V];
|
|
20327
|
+
if (ae !== void 0 && Te !== ae) {
|
|
20309
20328
|
const me = U(
|
|
20310
|
-
|
|
20329
|
+
Te,
|
|
20311
20330
|
V
|
|
20312
|
-
),
|
|
20331
|
+
), ke = U(
|
|
20313
20332
|
ae,
|
|
20314
20333
|
V
|
|
20315
20334
|
);
|
|
20316
|
-
if (me &&
|
|
20317
|
-
const
|
|
20318
|
-
(K = E.current) == null || K.refreshColumns(
|
|
20335
|
+
if (me && ke) {
|
|
20336
|
+
const Me = me === ke ? [me] : [me, ke];
|
|
20337
|
+
(K = E.current) == null || K.refreshColumns(Me);
|
|
20319
20338
|
} else
|
|
20320
20339
|
(fe = E.current) == null || fe.refreshResults();
|
|
20321
20340
|
return;
|
|
20322
20341
|
}
|
|
20323
20342
|
}
|
|
20324
|
-
(
|
|
20343
|
+
(Se = E.current) == null || Se.refreshResults();
|
|
20325
20344
|
}
|
|
20326
20345
|
},
|
|
20327
20346
|
[V, U, E]
|
|
@@ -20351,7 +20370,7 @@ const Ca = ({ value: e }) => te(
|
|
|
20351
20370
|
]
|
|
20352
20371
|
), q = F((J) => {
|
|
20353
20372
|
M(J);
|
|
20354
|
-
}, []), { fetchSavedSearches: ne, handleClearSavedSearch: re, subtitle:
|
|
20373
|
+
}, []), { fetchSavedSearches: ne, handleClearSavedSearch: re, subtitle: ie } = Wc({
|
|
20355
20374
|
model: r,
|
|
20356
20375
|
context: o,
|
|
20357
20376
|
viewRef: E,
|
|
@@ -20417,7 +20436,7 @@ const Ca = ({ value: e }) => te(
|
|
|
20417
20436
|
onClear: ce
|
|
20418
20437
|
}
|
|
20419
20438
|
),
|
|
20420
|
-
/* @__PURE__ */ i("div", { ref: k, children: /* @__PURE__ */ i(Vr, { showSummary: !1, subtitle:
|
|
20439
|
+
/* @__PURE__ */ i("div", { ref: k, children: /* @__PURE__ */ i(Vr, { showSummary: !1, subtitle: ie, children: /* @__PURE__ */ i(
|
|
20421
20440
|
Kl,
|
|
20422
20441
|
{
|
|
20423
20442
|
domain: s,
|
|
@@ -20542,7 +20561,7 @@ function Sw(e, t) {
|
|
|
20542
20561
|
order: S
|
|
20543
20562
|
} = e, [w, _] = R(), [x, A] = R([]), [D, O] = R(!0), M = p || void 0, [E, I] = R(
|
|
20544
20563
|
M
|
|
20545
|
-
), [k, T] = R([]), [$, P] = R(), [V, U] = R([]), [L, N] = R(), [H, z] = R(), [j, q] = R(!1), [ne, re] = R(!1), [
|
|
20564
|
+
), [k, T] = R([]), [$, P] = R(), [V, U] = R([]), [L, N] = R(), [H, z] = R(), [j, q] = R(!1), [ne, re] = R(!1), [ie, pe] = R(), { t: Y } = xe(), { showErrorNotification: ce } = St(), {
|
|
20546
20565
|
permissions: ee,
|
|
20547
20566
|
loading: le,
|
|
20548
20567
|
error: de
|
|
@@ -20557,8 +20576,8 @@ function Sw(e, t) {
|
|
|
20557
20576
|
setCurrentId: X,
|
|
20558
20577
|
tabs: K,
|
|
20559
20578
|
activeKey: fe,
|
|
20560
|
-
openAction:
|
|
20561
|
-
onRemoveTab:
|
|
20579
|
+
openAction: Se,
|
|
20580
|
+
onRemoveTab: Te
|
|
20562
20581
|
} = J || {};
|
|
20563
20582
|
In(
|
|
20564
20583
|
"ctrl+g,command+g",
|
|
@@ -20568,28 +20587,28 @@ function Sw(e, t) {
|
|
|
20568
20587
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
20569
20588
|
[fe, K, w, $, V]
|
|
20570
20589
|
);
|
|
20571
|
-
function ae(
|
|
20572
|
-
I(
|
|
20590
|
+
function ae(Ee) {
|
|
20591
|
+
I(Ee), X == null || X(Ee);
|
|
20573
20592
|
}
|
|
20574
20593
|
const me = F(
|
|
20575
|
-
(
|
|
20576
|
-
_(
|
|
20594
|
+
(Ee) => {
|
|
20595
|
+
_(Ee), oe == null || oe(Ee);
|
|
20577
20596
|
},
|
|
20578
20597
|
[oe]
|
|
20579
20598
|
);
|
|
20580
20599
|
Ut(t, () => ({
|
|
20581
|
-
canWeClose:
|
|
20600
|
+
canWeClose: Me
|
|
20582
20601
|
}));
|
|
20583
|
-
const
|
|
20602
|
+
const ke = F(async () => {
|
|
20584
20603
|
O(!0);
|
|
20585
|
-
const
|
|
20604
|
+
const Ee = [], Be = [];
|
|
20586
20605
|
for (const Pe of s) {
|
|
20587
|
-
const [be,
|
|
20588
|
-
|
|
20606
|
+
const [be, $e] = Pe;
|
|
20607
|
+
$e !== "dashboard" ? Be.push({
|
|
20589
20608
|
viewTuple: Pe,
|
|
20590
20609
|
promise: W.getHandler().getView({
|
|
20591
20610
|
model: r,
|
|
20592
|
-
type:
|
|
20611
|
+
type: $e,
|
|
20593
20612
|
id: be,
|
|
20594
20613
|
context: o
|
|
20595
20614
|
})
|
|
@@ -20601,23 +20620,23 @@ function Sw(e, t) {
|
|
|
20601
20620
|
for (const Pe of We) {
|
|
20602
20621
|
if (!Pe)
|
|
20603
20622
|
continue;
|
|
20604
|
-
const [, be] = Pe.viewTuple,
|
|
20623
|
+
const [, be] = Pe.viewTuple, $e = Pe.info;
|
|
20605
20624
|
switch (be) {
|
|
20606
20625
|
case "dashboard": {
|
|
20607
|
-
const
|
|
20608
|
-
const [, Ie] =
|
|
20626
|
+
const se = s.find((_e) => {
|
|
20627
|
+
const [, Ie] = _e;
|
|
20609
20628
|
return Ie === "form";
|
|
20610
20629
|
});
|
|
20611
20630
|
let ye;
|
|
20612
|
-
|
|
20631
|
+
se && (ye = {
|
|
20613
20632
|
action_id: g,
|
|
20614
20633
|
action_type: h,
|
|
20615
20634
|
name: a,
|
|
20616
20635
|
res_id: o.active_id,
|
|
20617
20636
|
res_model: r,
|
|
20618
|
-
view_id:
|
|
20619
|
-
view_type:
|
|
20620
|
-
}),
|
|
20637
|
+
view_id: se[0],
|
|
20638
|
+
view_type: se[1]
|
|
20639
|
+
}), Ee.push({
|
|
20621
20640
|
type: "dashboard",
|
|
20622
20641
|
id: o.active_id,
|
|
20623
20642
|
model: r,
|
|
@@ -20628,16 +20647,16 @@ function Sw(e, t) {
|
|
|
20628
20647
|
break;
|
|
20629
20648
|
}
|
|
20630
20649
|
case "form": {
|
|
20631
|
-
|
|
20632
|
-
|
|
20650
|
+
Ee.push({
|
|
20651
|
+
...$e,
|
|
20633
20652
|
type: be,
|
|
20634
20653
|
extra: { action_id: g, action_type: h }
|
|
20635
20654
|
});
|
|
20636
20655
|
break;
|
|
20637
20656
|
}
|
|
20638
20657
|
case "tree": {
|
|
20639
|
-
|
|
20640
|
-
|
|
20658
|
+
Ee.push({
|
|
20659
|
+
...$e,
|
|
20641
20660
|
isExpandable: y,
|
|
20642
20661
|
type: be,
|
|
20643
20662
|
extra: { action_id: g, action_type: h }
|
|
@@ -20645,16 +20664,16 @@ function Sw(e, t) {
|
|
|
20645
20664
|
break;
|
|
20646
20665
|
}
|
|
20647
20666
|
case "graph": {
|
|
20648
|
-
|
|
20649
|
-
|
|
20667
|
+
Ee.push({
|
|
20668
|
+
...$e,
|
|
20650
20669
|
type: be,
|
|
20651
20670
|
extra: { action_id: g, action_type: h }
|
|
20652
20671
|
});
|
|
20653
20672
|
break;
|
|
20654
20673
|
}
|
|
20655
20674
|
case "kanban": {
|
|
20656
|
-
|
|
20657
|
-
|
|
20675
|
+
Ee.push({
|
|
20676
|
+
...$e,
|
|
20658
20677
|
type: be,
|
|
20659
20678
|
extra: { action_id: g, action_type: h }
|
|
20660
20679
|
});
|
|
@@ -20663,9 +20682,9 @@ function Sw(e, t) {
|
|
|
20663
20682
|
}
|
|
20664
20683
|
}
|
|
20665
20684
|
let Ne;
|
|
20666
|
-
!l &&
|
|
20685
|
+
!l && Ee.find((Pe) => Pe.type === "tree") ? Ne = Ee.find(
|
|
20667
20686
|
(be) => be.type === "tree"
|
|
20668
|
-
) : l ? Ne =
|
|
20687
|
+
) : l ? Ne = Ee.find((be) => l.id ? be.type === l.type && be.view_id === l.id : be.type === l.type) : Ne = Ee.find(
|
|
20669
20688
|
(be) => be.type === "form"
|
|
20670
20689
|
), Ne || (ce({
|
|
20671
20690
|
type: "error",
|
|
@@ -20678,12 +20697,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20678
20697
|
model: r,
|
|
20679
20698
|
views: s,
|
|
20680
20699
|
initialView: l,
|
|
20681
|
-
availableViews:
|
|
20700
|
+
availableViews: Ee,
|
|
20682
20701
|
currentViewToAssign: Ne,
|
|
20683
20702
|
action_id: g,
|
|
20684
20703
|
action_type: h
|
|
20685
20704
|
})
|
|
20686
|
-
),
|
|
20705
|
+
), Te == null || Te(c)), me(Ne), A(Ee), O(!1);
|
|
20687
20706
|
}, [
|
|
20688
20707
|
l,
|
|
20689
20708
|
me,
|
|
@@ -20694,18 +20713,18 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20694
20713
|
h,
|
|
20695
20714
|
a,
|
|
20696
20715
|
y,
|
|
20697
|
-
|
|
20716
|
+
Te,
|
|
20698
20717
|
c,
|
|
20699
20718
|
ce
|
|
20700
20719
|
]);
|
|
20701
|
-
d({ tabKey: c, canWeClose:
|
|
20702
|
-
const
|
|
20703
|
-
me(Be ||
|
|
20720
|
+
d({ tabKey: c, canWeClose: Me }), Ue(() => {
|
|
20721
|
+
const Ee = x.find((We) => We.type === "tree"), Be = x.find((We) => l.id ? We.type === l.type && We.view_id === l.id : We.type === l.type);
|
|
20722
|
+
me(Be || Ee), p ? X == null || X(M) : (ae(void 0), P(void 0)), ke();
|
|
20704
20723
|
}, [r, s, p]), Ue(() => {
|
|
20705
20724
|
if (fe === c) {
|
|
20706
20725
|
X == null || X(E);
|
|
20707
|
-
const
|
|
20708
|
-
oe == null || oe({ ...w, extra:
|
|
20726
|
+
const Ee = { action_id: g, action_type: h };
|
|
20727
|
+
oe == null || oe({ ...w, extra: Ee });
|
|
20709
20728
|
}
|
|
20710
20729
|
}, [K, fe]), he(() => {
|
|
20711
20730
|
de && ce({
|
|
@@ -20714,23 +20733,23 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20714
20733
|
message: `Error loading permissions for model ${r}: ${de.message}`
|
|
20715
20734
|
});
|
|
20716
20735
|
}, [de, r, ce]);
|
|
20717
|
-
async function
|
|
20736
|
+
async function Me() {
|
|
20718
20737
|
return w && w.type === "form" ? await G.current.cancelUnsavedChanges() : !0;
|
|
20719
20738
|
}
|
|
20720
20739
|
async function tt() {
|
|
20721
20740
|
fe === c && (w.type === "form" && !await G.current.cancelUnsavedChanges() || q(!0));
|
|
20722
20741
|
}
|
|
20723
|
-
async function we(
|
|
20742
|
+
async function we(Ee, Be) {
|
|
20724
20743
|
var Pe;
|
|
20725
20744
|
re(!0);
|
|
20726
20745
|
let We, Ne;
|
|
20727
|
-
if (
|
|
20746
|
+
if (Ee.length === 1) {
|
|
20728
20747
|
We = "form", Ne = [];
|
|
20729
|
-
const be =
|
|
20730
|
-
let
|
|
20731
|
-
if (
|
|
20748
|
+
const be = Ee[0], $e = V.findIndex((ye) => ye.id === be);
|
|
20749
|
+
let se;
|
|
20750
|
+
if ($e === -1) {
|
|
20732
20751
|
try {
|
|
20733
|
-
|
|
20752
|
+
se = (Pe = await W.getHandler().search({
|
|
20734
20753
|
model: r,
|
|
20735
20754
|
params: [["id", "in", [be]]],
|
|
20736
20755
|
skipRead: !0,
|
|
@@ -20740,23 +20759,23 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20740
20759
|
})) == null ? void 0 : Pe[0];
|
|
20741
20760
|
} catch {
|
|
20742
20761
|
}
|
|
20743
|
-
if (!
|
|
20762
|
+
if (!se) {
|
|
20744
20763
|
re(!1), q(!1), _n(Y("idNotFound"));
|
|
20745
20764
|
return;
|
|
20746
20765
|
}
|
|
20747
20766
|
} else
|
|
20748
|
-
|
|
20767
|
+
se = V[$e];
|
|
20749
20768
|
} else
|
|
20750
|
-
We = "tree", Ne = [["id", "in",
|
|
20769
|
+
We = "tree", Ne = [["id", "in", Ee]];
|
|
20751
20770
|
if (re(!1), q(!1), Be && We === "form") {
|
|
20752
|
-
ae(
|
|
20771
|
+
ae(Ee[0]);
|
|
20753
20772
|
const be = x.find(
|
|
20754
|
-
(
|
|
20773
|
+
($e) => $e.type === "form"
|
|
20755
20774
|
);
|
|
20756
20775
|
me(be);
|
|
20757
20776
|
} else {
|
|
20758
|
-
const be = s.find((
|
|
20759
|
-
|
|
20777
|
+
const be = s.find(($e) => $e[1] === We);
|
|
20778
|
+
Se({
|
|
20760
20779
|
domain: Ne,
|
|
20761
20780
|
context: o,
|
|
20762
20781
|
model: r,
|
|
@@ -20766,19 +20785,19 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20766
20785
|
initialView: { id: be == null ? void 0 : be[0], type: We },
|
|
20767
20786
|
action_id: g,
|
|
20768
20787
|
action_type: h,
|
|
20769
|
-
res_id:
|
|
20788
|
+
res_id: Ee[0]
|
|
20770
20789
|
});
|
|
20771
20790
|
}
|
|
20772
20791
|
}
|
|
20773
|
-
function
|
|
20792
|
+
function Ye() {
|
|
20774
20793
|
if (E === void 0 && w.type === "form")
|
|
20775
20794
|
G.current.clearAndReload();
|
|
20776
20795
|
else {
|
|
20777
20796
|
ae(void 0);
|
|
20778
|
-
const
|
|
20797
|
+
const Ee = x.find(
|
|
20779
20798
|
(Be) => Be.type === "form"
|
|
20780
20799
|
);
|
|
20781
|
-
me(
|
|
20800
|
+
me(Ee);
|
|
20782
20801
|
}
|
|
20783
20802
|
}
|
|
20784
20803
|
return D || le ? /* @__PURE__ */ i(it, {}) : w ? /* @__PURE__ */ B(
|
|
@@ -20790,7 +20809,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20790
20809
|
availableViews: x,
|
|
20791
20810
|
formRef: G,
|
|
20792
20811
|
viewRef: Z,
|
|
20793
|
-
onNewClicked:
|
|
20812
|
+
onNewClicked: Ye,
|
|
20794
20813
|
currentId: E,
|
|
20795
20814
|
setCurrentId: ae,
|
|
20796
20815
|
setCurrentItemIndex: P,
|
|
@@ -20805,7 +20824,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20805
20824
|
selectedRowItems: k,
|
|
20806
20825
|
setSelectedRowItems: T,
|
|
20807
20826
|
setSearchNameSearch: pe,
|
|
20808
|
-
searchNameSearch:
|
|
20827
|
+
searchNameSearch: ie,
|
|
20809
20828
|
goToResourceId: we,
|
|
20810
20829
|
limit: b,
|
|
20811
20830
|
isActive: c === fe,
|
|
@@ -20834,7 +20853,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
20834
20853
|
formReadOnly: m,
|
|
20835
20854
|
limit: b,
|
|
20836
20855
|
viewRef: Z,
|
|
20837
|
-
searchNameSearch:
|
|
20856
|
+
searchNameSearch: ie,
|
|
20838
20857
|
setCurrentView: me,
|
|
20839
20858
|
setCurrentId: ae
|
|
20840
20859
|
}
|
|
@@ -20993,9 +21012,9 @@ function Iw(e, t) {
|
|
|
20993
21012
|
setIsLoading: m,
|
|
20994
21013
|
openAction: p,
|
|
20995
21014
|
moveItemsEnabled: g
|
|
20996
|
-
} = ve(li), h = Q(), y = Q(), [b] =
|
|
21015
|
+
} = ve(li), h = Q(), y = Q(), [b] = Ae(W.getHandler().getView), [v] = Ae(
|
|
20997
21016
|
W.getHandler().readObjects
|
|
20998
|
-
), [C] =
|
|
21017
|
+
), [C] = Ae(W.getHandler().update), S = Qt(
|
|
20999
21018
|
Mt.FEATURE_READFORVIEW
|
|
21000
21019
|
);
|
|
21001
21020
|
he(() => {
|
|
@@ -21132,7 +21151,7 @@ function Iw(e, t) {
|
|
|
21132
21151
|
context: q,
|
|
21133
21152
|
domain: ne,
|
|
21134
21153
|
initialView: re,
|
|
21135
|
-
limit:
|
|
21154
|
+
limit: ie
|
|
21136
21155
|
} = k;
|
|
21137
21156
|
let pe = {};
|
|
21138
21157
|
try {
|
|
@@ -21152,7 +21171,7 @@ function Iw(e, t) {
|
|
|
21152
21171
|
model: j,
|
|
21153
21172
|
context: q,
|
|
21154
21173
|
domain: ne,
|
|
21155
|
-
limit:
|
|
21174
|
+
limit: ie
|
|
21156
21175
|
},
|
|
21157
21176
|
P
|
|
21158
21177
|
);
|
|
@@ -21220,7 +21239,7 @@ function Iw(e, t) {
|
|
|
21220
21239
|
setCanWeClose: () => {
|
|
21221
21240
|
},
|
|
21222
21241
|
initialView: le,
|
|
21223
|
-
limit:
|
|
21242
|
+
limit: ie
|
|
21224
21243
|
},
|
|
21225
21244
|
P
|
|
21226
21245
|
);
|
|
@@ -21265,7 +21284,7 @@ function Iw(e, t) {
|
|
|
21265
21284
|
}
|
|
21266
21285
|
const Rw = Lt(Iw), _w = (e) => {
|
|
21267
21286
|
const { ooui: t } = e;
|
|
21268
|
-
return /* @__PURE__ */ i(
|
|
21287
|
+
return /* @__PURE__ */ i(Ke, { type: "array", ...e, children: /* @__PURE__ */ i(Ew, { ooui: t }) });
|
|
21269
21288
|
}, Ew = (e) => {
|
|
21270
21289
|
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [a, d] = R([]), [c, l] = R(), [f, u] = R(!1), { relation: m, context: p, readOnly: g, field: h, columns: y } = n, b = ve(st), { getContext: v } = b || {};
|
|
21271
21290
|
Ue(() => {
|
|
@@ -21347,7 +21366,7 @@ const Rw = Lt(Iw), _w = (e) => {
|
|
|
21347
21366
|
/* @__PURE__ */ i(qe, { onClick: _, disabled: s.length === 0, children: "Uncheck all" })
|
|
21348
21367
|
] })
|
|
21349
21368
|
] }) });
|
|
21350
|
-
}, Ow = (e) => /* @__PURE__ */ i(
|
|
21369
|
+
}, Ow = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(Cd, {}) }), Cd = Lt(
|
|
21351
21370
|
(e, t) => {
|
|
21352
21371
|
const { value: n = "", onChange: r, ...o } = e, { ooui: s } = o, [a, d] = R(n), c = Q(!1);
|
|
21353
21372
|
he(() => {
|
|
@@ -21439,7 +21458,7 @@ const Rw = Lt(Iw), _w = (e) => {
|
|
|
21439
21458
|
Cd.displayName = "MarkdownInput";
|
|
21440
21459
|
const Dw = (e) => {
|
|
21441
21460
|
const { ooui: t } = e, { required: n } = t;
|
|
21442
|
-
return /* @__PURE__ */ i(
|
|
21461
|
+
return /* @__PURE__ */ i(Ke, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(kw, { ...e }) });
|
|
21443
21462
|
}, kw = (e) => {
|
|
21444
21463
|
const { ooui: t, onChange: n, value: r } = e, { selectionValues: o, readOnly: s, direction: a } = t, d = Array.from(o.entries()), c = d && d.length && d.map((l) => {
|
|
21445
21464
|
const [f, u] = l;
|
|
@@ -21448,13 +21467,13 @@ const Dw = (e) => {
|
|
|
21448
21467
|
return /* @__PURE__ */ i(ui.Group, { disabled: s, onChange: n, value: r, children: /* @__PURE__ */ i(at, { direction: a, children: c }) });
|
|
21449
21468
|
}, Mw = (e) => {
|
|
21450
21469
|
const { ooui: t } = e, { id: n, readOnly: r, required: o } = t;
|
|
21451
|
-
return /* @__PURE__ */ i(
|
|
21470
|
+
return /* @__PURE__ */ i(Ke, { ...e, valuePropName: "checked", children: /* @__PURE__ */ i($w, { id: n, readOnly: r, required: o }) });
|
|
21452
21471
|
}, $w = (e) => {
|
|
21453
21472
|
const { required: t, readOnly: n, ...r } = e;
|
|
21454
21473
|
return /* @__PURE__ */ i("div", { className: "flex flex-row", children: /* @__PURE__ */ i(kd, { disabled: n, ...r }) });
|
|
21455
21474
|
}, Nw = (e) => {
|
|
21456
21475
|
const { ooui: t } = e, { required: n } = t;
|
|
21457
|
-
return /* @__PURE__ */ i(
|
|
21476
|
+
return /* @__PURE__ */ i(Ke, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Pw, { ...e }) });
|
|
21458
21477
|
}, Pw = (e) => {
|
|
21459
21478
|
const { ooui: t, value: n } = e, { selectionValues: r, errorField: o, lastStep: s } = t, a = ve(st);
|
|
21460
21479
|
let d = [], c;
|
|
@@ -21531,7 +21550,7 @@ const Dw = (e) => {
|
|
|
21531
21550
|
/* @__PURE__ */ i("div", { style: f }),
|
|
21532
21551
|
/* @__PURE__ */ i("div", { style: u(p.active) })
|
|
21533
21552
|
] }, g)) });
|
|
21534
|
-
}, Vw = (e) => /* @__PURE__ */ i(
|
|
21553
|
+
}, Vw = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(Lw, {}) }), Hw = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(Bw, { ...e }) }), Bw = (e) => {
|
|
21535
21554
|
const { ooui: t, value: n, onChange: r } = e, { lang: o, height: s, readOnly: a } = t, d = ve(st), { elementHasLostFocus: c } = d || {}, l = F(
|
|
21536
21555
|
(u) => {
|
|
21537
21556
|
c && u.onDidBlurEditorWidget(() => c());
|
|
@@ -21623,7 +21642,7 @@ const Yw = (e) => {
|
|
|
21623
21642
|
}
|
|
21624
21643
|
}
|
|
21625
21644
|
);
|
|
21626
|
-
}, zw = (e) => /* @__PURE__ */ i(
|
|
21645
|
+
}, zw = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(Gw, { ooui: e.ooui }) }), Kw = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(vu, {}) }), Jw = (e) => {
|
|
21627
21646
|
const { ooui: t } = e, n = ve(st);
|
|
21628
21647
|
let { title: r, text: o, alertType: s, icon: a, buttons: d } = t;
|
|
21629
21648
|
if (t.fieldType && t.id) {
|
|
@@ -21676,7 +21695,7 @@ const Yw = (e) => {
|
|
|
21676
21695
|
.slick-dots-bottom {
|
|
21677
21696
|
bottom: -15px;
|
|
21678
21697
|
}
|
|
21679
|
-
`, t0 = (e) => /* @__PURE__ */ i(
|
|
21698
|
+
`, t0 = (e) => /* @__PURE__ */ i(Ke, { ...e, children: /* @__PURE__ */ i(n0, { ...e }) }), n0 = (e) => {
|
|
21680
21699
|
const { ooui: t, value: n, onChange: r } = e;
|
|
21681
21700
|
return /* @__PURE__ */ i(
|
|
21682
21701
|
_a,
|
|
@@ -21698,7 +21717,7 @@ function s0() {
|
|
|
21698
21717
|
function i0(e, t) {
|
|
21699
21718
|
const { children: n } = e, [r, o] = R("welcome"), { t: s } = xe(), { showErrorNotification: a } = St(), { globalValues: d, rootContext: c } = Gt(), l = So(
|
|
21700
21719
|
Mt.FEATURE_LOGGABLE_ACTIONS
|
|
21701
|
-
), [f, u] =
|
|
21720
|
+
), [f, u] = Ae(
|
|
21702
21721
|
W.getHandler().logAction
|
|
21703
21722
|
);
|
|
21704
21723
|
he(() => () => {
|
|
@@ -21854,7 +21873,7 @@ function i0(e, t) {
|
|
|
21854
21873
|
return console.error(J), [];
|
|
21855
21874
|
}
|
|
21856
21875
|
})(), {
|
|
21857
|
-
res_model:
|
|
21876
|
+
res_model: ie,
|
|
21858
21877
|
views: pe,
|
|
21859
21878
|
name: Y,
|
|
21860
21879
|
target: ce,
|
|
@@ -21869,7 +21888,7 @@ function i0(e, t) {
|
|
|
21869
21888
|
G.push([void 0, "dashboard"]);
|
|
21870
21889
|
else {
|
|
21871
21890
|
const { view_id: K } = await W.getHandler().getView({
|
|
21872
|
-
model:
|
|
21891
|
+
model: ie,
|
|
21873
21892
|
type: X,
|
|
21874
21893
|
id: oe,
|
|
21875
21894
|
context: { ...c, ...q }
|
|
@@ -21890,7 +21909,7 @@ function i0(e, t) {
|
|
|
21890
21909
|
M({
|
|
21891
21910
|
domain: [...re, ...V],
|
|
21892
21911
|
context: { ...c, ...q },
|
|
21893
|
-
model:
|
|
21912
|
+
model: ie,
|
|
21894
21913
|
views: G,
|
|
21895
21914
|
title: Y,
|
|
21896
21915
|
target: ce,
|
|
@@ -21941,8 +21960,8 @@ function i0(e, t) {
|
|
|
21941
21960
|
target: H,
|
|
21942
21961
|
string: z,
|
|
21943
21962
|
limit: j
|
|
21944
|
-
} = I, [q, ne] = N[0], re = { id: q, type: ne },
|
|
21945
|
-
context:
|
|
21963
|
+
} = I, [q, ne] = N[0], re = { id: q, type: ne }, ie = U, pe = Cn({
|
|
21964
|
+
context: ie,
|
|
21946
21965
|
values: { ...T, ...d }
|
|
21947
21966
|
}), Y = L, ce = L ? await W.getHandler().evalDomain({
|
|
21948
21967
|
domain: L,
|
|
@@ -21965,7 +21984,7 @@ function i0(e, t) {
|
|
|
21965
21984
|
action_type: P,
|
|
21966
21985
|
limit: j,
|
|
21967
21986
|
actionRawData: {
|
|
21968
|
-
context:
|
|
21987
|
+
context: ie,
|
|
21969
21988
|
domain: Y,
|
|
21970
21989
|
fields: k,
|
|
21971
21990
|
values: T
|
|
@@ -21998,7 +22017,7 @@ function i0(e, t) {
|
|
|
21998
22017
|
context: { ...c, ...q }
|
|
21999
22018
|
}));
|
|
22000
22019
|
const {
|
|
22001
|
-
res_model:
|
|
22020
|
+
res_model: ie,
|
|
22002
22021
|
views: pe,
|
|
22003
22022
|
name: Y,
|
|
22004
22023
|
target: ce,
|
|
@@ -22012,13 +22031,13 @@ function i0(e, t) {
|
|
|
22012
22031
|
else if (fe === "dashboard")
|
|
22013
22032
|
G.push([void 0, "dashboard"]);
|
|
22014
22033
|
else {
|
|
22015
|
-
const { view_id:
|
|
22016
|
-
model:
|
|
22034
|
+
const { view_id: Se } = await W.getHandler().getView({
|
|
22035
|
+
model: ie,
|
|
22017
22036
|
type: fe,
|
|
22018
22037
|
id: K,
|
|
22019
22038
|
context: { ...c, ...q }
|
|
22020
22039
|
});
|
|
22021
|
-
G.push([
|
|
22040
|
+
G.push([Se, fe]);
|
|
22022
22041
|
}
|
|
22023
22042
|
}
|
|
22024
22043
|
let Z, J;
|
|
@@ -22031,7 +22050,7 @@ function i0(e, t) {
|
|
|
22031
22050
|
M({
|
|
22032
22051
|
domain: ne,
|
|
22033
22052
|
context: { ...c, ...q },
|
|
22034
|
-
model:
|
|
22053
|
+
model: ie,
|
|
22035
22054
|
views: G,
|
|
22036
22055
|
title: N || Y,
|
|
22037
22056
|
target: ce,
|
|
@@ -22085,7 +22104,7 @@ function i0(e, t) {
|
|
|
22085
22104
|
forced_values: q,
|
|
22086
22105
|
readOnly: ne,
|
|
22087
22106
|
treeExpandable: re = !1,
|
|
22088
|
-
limit:
|
|
22107
|
+
limit: ie,
|
|
22089
22108
|
searchParams: pe,
|
|
22090
22109
|
currentPage: Y,
|
|
22091
22110
|
order: ce
|
|
@@ -22141,7 +22160,7 @@ function i0(e, t) {
|
|
|
22141
22160
|
formForcedValues: q,
|
|
22142
22161
|
formReadOnly: ne,
|
|
22143
22162
|
treeExpandable: re,
|
|
22144
|
-
limit:
|
|
22163
|
+
limit: ie,
|
|
22145
22164
|
initialSearchParams: pe,
|
|
22146
22165
|
currentPage: Y,
|
|
22147
22166
|
order: ce
|