@gisce/react-ooui 2.99.0-alpha.2 → 2.99.0-alpha.3
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
|
@@ -76,7 +76,7 @@ const nt = zt.createContext(null), pu = (t) => {
|
|
|
76
76
|
getFieldMessageType: x,
|
|
77
77
|
clearFieldMessage: P,
|
|
78
78
|
clearAllFieldMessages: T,
|
|
79
|
-
refreshCounter:
|
|
79
|
+
refreshCounter: k
|
|
80
80
|
} = t;
|
|
81
81
|
return /* @__PURE__ */ s(
|
|
82
82
|
nt.Provider,
|
|
@@ -104,7 +104,7 @@ const nt = zt.createContext(null), pu = (t) => {
|
|
|
104
104
|
getFieldMessageType: x,
|
|
105
105
|
clearFieldMessage: P,
|
|
106
106
|
clearAllFieldMessages: T,
|
|
107
|
-
refreshCounter:
|
|
107
|
+
refreshCounter: k
|
|
108
108
|
},
|
|
109
109
|
children: e
|
|
110
110
|
}
|
|
@@ -189,8 +189,8 @@ var Ea = { exports: {} };
|
|
|
189
189
|
var P = x.match(r);
|
|
190
190
|
if (!P)
|
|
191
191
|
return null;
|
|
192
|
-
var T = ("" + P[0]).match(o) || ["-", 0, 0],
|
|
193
|
-
return F === 0 ? 0 :
|
|
192
|
+
var T = ("" + P[0]).match(o) || ["-", 0, 0], k = T[0], F = 60 * +T[1] + +T[2];
|
|
193
|
+
return F === 0 ? 0 : k === "+" ? F : -F;
|
|
194
194
|
}(h), h === null))
|
|
195
195
|
return this;
|
|
196
196
|
var b = Math.abs(h) <= 16 ? 60 * h : h, C = this;
|
|
@@ -335,7 +335,7 @@ function Ye({
|
|
|
335
335
|
type: c,
|
|
336
336
|
validator: l
|
|
337
337
|
}) {
|
|
338
|
-
var
|
|
338
|
+
var D;
|
|
339
339
|
const { id: d, label: f, tooltip: u } = t, { t: p } = Te(), m = $t.useFormInstance(), g = a ? [
|
|
340
340
|
{
|
|
341
341
|
required: !0,
|
|
@@ -343,7 +343,7 @@ function Ye({
|
|
|
343
343
|
type: c,
|
|
344
344
|
validator: l
|
|
345
345
|
}
|
|
346
|
-
] : void 0, { getFieldMessage: h, getFieldMessageType: v } = fs(), y = h(d), b = v(d), C = y || (t.tooltipInline ? t.tooltip : null), w = ((
|
|
346
|
+
] : void 0, { getFieldMessage: h, getFieldMessageType: v } = fs(), y = h(d), b = v(d), C = y || (t.tooltipInline ? t.tooltip : null), w = ((D = m.getFieldError(d)) == null ? void 0 : D.length) > 0 || !!y && b === "error", x = !!y && b === "warning", P = () => /* @__PURE__ */ s(
|
|
347
347
|
$t.Item,
|
|
348
348
|
{
|
|
349
349
|
className: "mb-0",
|
|
@@ -729,47 +729,47 @@ const _a = (t) => {
|
|
|
729
729
|
p(!1);
|
|
730
730
|
}
|
|
731
731
|
async function w() {
|
|
732
|
-
const
|
|
732
|
+
const D = (await H.getHandler().search({
|
|
733
733
|
params: [["translatable", "=", "1"]],
|
|
734
734
|
fieldsToRetrieve: ["code", "name"],
|
|
735
735
|
model: "res.lang"
|
|
736
|
-
})).map((
|
|
737
|
-
code:
|
|
738
|
-
name:
|
|
736
|
+
})).map((M) => ({
|
|
737
|
+
code: M.code,
|
|
738
|
+
name: M.name
|
|
739
739
|
}));
|
|
740
|
-
return f == null || f(
|
|
740
|
+
return f == null || f(D), D;
|
|
741
741
|
}
|
|
742
742
|
async function x(F) {
|
|
743
|
-
const
|
|
744
|
-
for (const
|
|
743
|
+
const D = {};
|
|
744
|
+
for (const M of F) {
|
|
745
745
|
const E = (await H.getHandler().readObjects({
|
|
746
746
|
model: r,
|
|
747
747
|
ids: [o],
|
|
748
748
|
fieldsToRetrieve: [i],
|
|
749
|
-
context: { lang:
|
|
749
|
+
context: { lang: M.code }
|
|
750
750
|
}))[0];
|
|
751
|
-
|
|
751
|
+
D[M.code] = E[i] || "";
|
|
752
752
|
}
|
|
753
|
-
y.current =
|
|
753
|
+
y.current = D, v(D);
|
|
754
754
|
}
|
|
755
755
|
function P() {
|
|
756
|
-
return d.map((F,
|
|
756
|
+
return d.map((F, D) => /* @__PURE__ */ L(Xe, { style: { paddingBottom: 20 }, children: [
|
|
757
757
|
/* @__PURE__ */ s(ke, { flex: "8rem", style: { paddingRight: 10 }, children: F.name }),
|
|
758
758
|
/* @__PURE__ */ s(ke, { flex: "auto", children: /* @__PURE__ */ s(
|
|
759
759
|
Pd,
|
|
760
760
|
{
|
|
761
761
|
rows: 4,
|
|
762
762
|
value: h[F.code] || "",
|
|
763
|
-
onChange: (
|
|
763
|
+
onChange: (M) => {
|
|
764
764
|
v({
|
|
765
765
|
...h,
|
|
766
|
-
[F.code]:
|
|
766
|
+
[F.code]: M.target.value
|
|
767
767
|
});
|
|
768
768
|
},
|
|
769
769
|
disabled: m
|
|
770
770
|
}
|
|
771
771
|
) })
|
|
772
|
-
] },
|
|
772
|
+
] }, D));
|
|
773
773
|
}
|
|
774
774
|
async function T() {
|
|
775
775
|
g(!0);
|
|
@@ -789,7 +789,7 @@ const _a = (t) => {
|
|
|
789
789
|
}
|
|
790
790
|
g(!1), a();
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function k() {
|
|
793
793
|
return u ? /* @__PURE__ */ s(st, {}) : /* @__PURE__ */ L(we, { children: [
|
|
794
794
|
P(),
|
|
795
795
|
/* @__PURE__ */ s(jr, {}),
|
|
@@ -829,7 +829,7 @@ const _a = (t) => {
|
|
|
829
829
|
footer: null,
|
|
830
830
|
destroyOnClose: !0,
|
|
831
831
|
maskClosable: !1,
|
|
832
|
-
children:
|
|
832
|
+
children: k()
|
|
833
833
|
}
|
|
834
834
|
);
|
|
835
835
|
};
|
|
@@ -1407,9 +1407,9 @@ function Ba(t) {
|
|
|
1407
1407
|
if (e != null && e.arch) {
|
|
1408
1408
|
const o = Ha(e.arch, "infinite");
|
|
1409
1409
|
if (o) {
|
|
1410
|
-
if (o === "1")
|
|
1410
|
+
if (o === "1" || o === "true")
|
|
1411
1411
|
return "infinite";
|
|
1412
|
-
if (o === "0")
|
|
1412
|
+
if (o === "0" || o === "false")
|
|
1413
1413
|
return "paginated";
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
@@ -1768,7 +1768,7 @@ const Sn = ({
|
|
|
1768
1768
|
je(() => {
|
|
1769
1769
|
F();
|
|
1770
1770
|
}, [i]);
|
|
1771
|
-
const
|
|
1771
|
+
const k = (E) => {
|
|
1772
1772
|
o == null || o({
|
|
1773
1773
|
items: E
|
|
1774
1774
|
});
|
|
@@ -1789,7 +1789,7 @@ const Sn = ({
|
|
|
1789
1789
|
context: { ...T == null ? void 0 : T(), ...h },
|
|
1790
1790
|
currentView: "form"
|
|
1791
1791
|
});
|
|
1792
|
-
|
|
1792
|
+
k(E);
|
|
1793
1793
|
} catch (E) {
|
|
1794
1794
|
d(E);
|
|
1795
1795
|
} finally {
|
|
@@ -1800,10 +1800,10 @@ const Sn = ({
|
|
|
1800
1800
|
return console.error(l), /* @__PURE__ */ s(Ot, { className: "mt-10", message: l, type: "error", banner: !0 });
|
|
1801
1801
|
if (a)
|
|
1802
1802
|
return /* @__PURE__ */ s(st, {});
|
|
1803
|
-
const
|
|
1803
|
+
const D = (E) => {
|
|
1804
1804
|
const A = Vt(E);
|
|
1805
1805
|
return A && /* @__PURE__ */ s(A, {});
|
|
1806
|
-
},
|
|
1806
|
+
}, M = x.map((E) => {
|
|
1807
1807
|
var I, O, _, $;
|
|
1808
1808
|
const A = {
|
|
1809
1809
|
children: /* @__PURE__ */ s(
|
|
@@ -1819,10 +1819,10 @@ const Sn = ({
|
|
|
1819
1819
|
}
|
|
1820
1820
|
)
|
|
1821
1821
|
};
|
|
1822
|
-
return (_ = E.values) != null && _[C] && (A.dot =
|
|
1822
|
+
return (_ = E.values) != null && _[C] && (A.dot = D(E.values[C])), ($ = E.values) != null && $[w] && (A.color = !Aa(E.values[w]) && !Ia(E.values[w]) && !E.values[w].toString().startsWith("#") ? gr(E.values[w]) : E.values[w]), A;
|
|
1823
1823
|
});
|
|
1824
1824
|
return /* @__PURE__ */ L(we, { children: [
|
|
1825
|
-
/* @__PURE__ */ s(ra, { style: { padding: "1rem" }, items:
|
|
1825
|
+
/* @__PURE__ */ s(ra, { style: { padding: "1rem" }, items: M }),
|
|
1826
1826
|
/* @__PURE__ */ s(
|
|
1827
1827
|
In,
|
|
1828
1828
|
{
|
|
@@ -2350,52 +2350,52 @@ async function Xa({
|
|
|
2350
2350
|
};
|
|
2351
2351
|
}
|
|
2352
2352
|
const vf = (t) => {
|
|
2353
|
-
const
|
|
2354
|
-
return { actionData:
|
|
2355
|
-
|
|
2353
|
+
const e = K(!1), [n, r] = S(), [o, i] = S(!1), [a, c] = S(), [l, d] = S(), f = ge(nt), { getContext: u, getPlainValues: p, activeId: m } = f || {}, { globalValues: g, rootContext: h } = Jt(), v = ee(() => ({ ...u == null ? void 0 : u(), ...h }), [u, h]);
|
|
2354
|
+
return { actionData: a, treeShortcut: l, loading: o, error: n, fetchData: async () => {
|
|
2355
|
+
r(void 0), e.current || i(!0);
|
|
2356
2356
|
try {
|
|
2357
|
-
const
|
|
2357
|
+
const b = await Xa({
|
|
2358
2358
|
actionId: t,
|
|
2359
|
-
rootContext:
|
|
2359
|
+
rootContext: v,
|
|
2360
2360
|
globalValues: {
|
|
2361
|
-
...
|
|
2362
|
-
...
|
|
2361
|
+
...g,
|
|
2362
|
+
...p()
|
|
2363
2363
|
}
|
|
2364
2364
|
});
|
|
2365
|
-
if (!
|
|
2366
|
-
throw
|
|
2367
|
-
const { views:
|
|
2368
|
-
const [,
|
|
2369
|
-
return
|
|
2365
|
+
if (!v.active_id)
|
|
2366
|
+
throw c(b), new Error("active_id_not_found");
|
|
2367
|
+
const { views: C } = b, w = C.find((x) => {
|
|
2368
|
+
const [, P] = x;
|
|
2369
|
+
return P === "tree";
|
|
2370
2370
|
});
|
|
2371
|
-
if (
|
|
2372
|
-
const [
|
|
2373
|
-
actionId:
|
|
2374
|
-
actionType:
|
|
2375
|
-
title:
|
|
2376
|
-
model:
|
|
2377
|
-
} =
|
|
2378
|
-
|
|
2379
|
-
domain:
|
|
2380
|
-
action_id:
|
|
2381
|
-
action_type:
|
|
2382
|
-
name:
|
|
2371
|
+
if (w) {
|
|
2372
|
+
const [x, P] = w, {
|
|
2373
|
+
actionId: T,
|
|
2374
|
+
actionType: k,
|
|
2375
|
+
title: F,
|
|
2376
|
+
model: D
|
|
2377
|
+
} = b;
|
|
2378
|
+
d({
|
|
2379
|
+
domain: b.domain,
|
|
2380
|
+
action_id: T,
|
|
2381
|
+
action_type: k,
|
|
2382
|
+
name: F,
|
|
2383
2383
|
res_id: !1,
|
|
2384
|
-
res_model:
|
|
2385
|
-
view_id:
|
|
2386
|
-
view_type:
|
|
2384
|
+
res_model: D,
|
|
2385
|
+
view_id: x,
|
|
2386
|
+
view_type: P,
|
|
2387
2387
|
overrideUnsettedLimit: !0,
|
|
2388
2388
|
values: {
|
|
2389
|
-
active_id:
|
|
2390
|
-
active_ids: [
|
|
2389
|
+
active_id: m,
|
|
2390
|
+
active_ids: [m]
|
|
2391
2391
|
}
|
|
2392
2392
|
});
|
|
2393
2393
|
}
|
|
2394
|
-
|
|
2395
|
-
} catch (
|
|
2396
|
-
|
|
2394
|
+
c(b);
|
|
2395
|
+
} catch (b) {
|
|
2396
|
+
r(b);
|
|
2397
2397
|
}
|
|
2398
|
-
|
|
2398
|
+
e.current || (i(!1), e.current = !0);
|
|
2399
2399
|
} };
|
|
2400
2400
|
}, yr = () => /* @__PURE__ */ s(
|
|
2401
2401
|
"div",
|
|
@@ -2636,7 +2636,7 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2636
2636
|
operator: f,
|
|
2637
2637
|
manualIds: u,
|
|
2638
2638
|
fixedHeight: p
|
|
2639
|
-
} = t, [m, g] = S(!1), [h, v] = S(), [y, b] = S(0), [C, w] = S(), [x, P] = S(), [T,
|
|
2639
|
+
} = t, [m, g] = S(!1), [h, v] = S(), [y, b] = S(0), [C, w] = S(), [x, P] = S(), [T, k] = S(), [F, D] = S(), [M] = Me(
|
|
2640
2640
|
H.getHandler().searchAllIds
|
|
2641
2641
|
), [E] = Me(
|
|
2642
2642
|
H.getHandler().readObjects
|
|
@@ -2657,7 +2657,7 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2657
2657
|
if (N)
|
|
2658
2658
|
return await $({ domain: V });
|
|
2659
2659
|
if (d && f) {
|
|
2660
|
-
const B = u || await
|
|
2660
|
+
const B = u || await M({
|
|
2661
2661
|
params: V,
|
|
2662
2662
|
model: e,
|
|
2663
2663
|
context: r
|
|
@@ -2680,7 +2680,7 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2680
2680
|
}
|
|
2681
2681
|
async function $({ domain: V }) {
|
|
2682
2682
|
if (d && f) {
|
|
2683
|
-
const N = await
|
|
2683
|
+
const N = await M({
|
|
2684
2684
|
params: V,
|
|
2685
2685
|
model: e,
|
|
2686
2686
|
context: r
|
|
@@ -2702,7 +2702,7 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2702
2702
|
});
|
|
2703
2703
|
}
|
|
2704
2704
|
async function G() {
|
|
2705
|
-
g(!0),
|
|
2705
|
+
g(!0), D(void 0);
|
|
2706
2706
|
let V, N;
|
|
2707
2707
|
try {
|
|
2708
2708
|
const B = await _({ domain: n, isTotal: !1 });
|
|
@@ -2732,12 +2732,12 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2732
2732
|
values: { value: B, percent: N },
|
|
2733
2733
|
context: r
|
|
2734
2734
|
});
|
|
2735
|
-
|
|
2735
|
+
k(q);
|
|
2736
2736
|
} else
|
|
2737
|
-
|
|
2738
|
-
|
|
2737
|
+
k(c);
|
|
2738
|
+
D(void 0);
|
|
2739
2739
|
} catch (B) {
|
|
2740
|
-
|
|
2740
|
+
D(JSON.stringify(B));
|
|
2741
2741
|
}
|
|
2742
2742
|
g(!1);
|
|
2743
2743
|
}
|
|
@@ -2770,9 +2770,9 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2770
2770
|
), [w] = Me(H.getHandler().search), x = R(async () => {
|
|
2771
2771
|
d(!0), u(void 0), y(n.type || "line");
|
|
2772
2772
|
const P = Tf({ ooui: n });
|
|
2773
|
-
let T,
|
|
2773
|
+
let T, k;
|
|
2774
2774
|
try {
|
|
2775
|
-
({ values: T, fields:
|
|
2775
|
+
({ values: T, fields: k } = await Af({
|
|
2776
2776
|
model: e,
|
|
2777
2777
|
domain: r,
|
|
2778
2778
|
context: o,
|
|
@@ -2791,7 +2791,7 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2791
2791
|
return;
|
|
2792
2792
|
}
|
|
2793
2793
|
try {
|
|
2794
|
-
if (!T || !
|
|
2794
|
+
if (!T || !k)
|
|
2795
2795
|
return u("No values or fields returned"), d(!1), {
|
|
2796
2796
|
loading: l,
|
|
2797
2797
|
error: f,
|
|
@@ -2804,7 +2804,7 @@ const { getValueForOperator: ri } = ua, xf = (t) => {
|
|
|
2804
2804
|
const F = Cf({
|
|
2805
2805
|
ooui: n,
|
|
2806
2806
|
values: T,
|
|
2807
|
-
fields:
|
|
2807
|
+
fields: k,
|
|
2808
2808
|
options: {
|
|
2809
2809
|
uninformedString: a
|
|
2810
2810
|
}
|
|
@@ -3666,7 +3666,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3666
3666
|
Tt.FEATURE_LOGGABLE_ACTIONS
|
|
3667
3667
|
), [T] = Me(
|
|
3668
3668
|
H.getHandler().logAction
|
|
3669
|
-
),
|
|
3669
|
+
), k = R(async () => [
|
|
3670
3670
|
{
|
|
3671
3671
|
items: (await (c == null ? void 0 : c()) || []).map(
|
|
3672
3672
|
(G) => {
|
|
@@ -3694,7 +3694,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3694
3694
|
}
|
|
3695
3695
|
)
|
|
3696
3696
|
}
|
|
3697
|
-
], [c, w, f.colorPrimary]), F = ee(() => !C || C.length === 0 ? (b == null ? void 0 : b.fields) || {} : C.reduce((_, $) => ({ ..._, ...$.fields || {} }), {}), [C, b]),
|
|
3697
|
+
], [c, w, f.colorPrimary]), F = ee(() => !C || C.length === 0 ? (b == null ? void 0 : b.fields) || {} : C.reduce((_, $) => ({ ..._, ...$.fields || {} }), {}), [C, b]), D = R(
|
|
3698
3698
|
async (_) => {
|
|
3699
3699
|
var $;
|
|
3700
3700
|
if (P != null && P.isEnabled && ((($ = P == null ? void 0 : P.params) == null ? void 0 : $.types) || []).includes("ir.search"))
|
|
@@ -3709,7 +3709,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3709
3709
|
}
|
|
3710
3710
|
},
|
|
3711
3711
|
[i, T, P]
|
|
3712
|
-
),
|
|
3712
|
+
), M = R(
|
|
3713
3713
|
(_) => {
|
|
3714
3714
|
const $ = _.originalData || _;
|
|
3715
3715
|
if ($ != null && $.domain) {
|
|
@@ -3720,14 +3720,14 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3720
3720
|
);
|
|
3721
3721
|
y == null || y(G), a && setTimeout(() => {
|
|
3722
3722
|
a();
|
|
3723
|
-
}, 100),
|
|
3723
|
+
}, 100), D($.id);
|
|
3724
3724
|
}
|
|
3725
3725
|
},
|
|
3726
3726
|
[
|
|
3727
3727
|
v,
|
|
3728
3728
|
y,
|
|
3729
3729
|
a,
|
|
3730
|
-
|
|
3730
|
+
D,
|
|
3731
3731
|
F,
|
|
3732
3732
|
x
|
|
3733
3733
|
]
|
|
@@ -3757,7 +3757,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3757
3757
|
onToggle: n,
|
|
3758
3758
|
activeIcon: /* @__PURE__ */ s(Nn, {}),
|
|
3759
3759
|
inactiveIcon: /* @__PURE__ */ s(Nn, {}),
|
|
3760
|
-
onItemClick:
|
|
3760
|
+
onItemClick: M,
|
|
3761
3761
|
placement: "bottomRight",
|
|
3762
3762
|
disabled: o,
|
|
3763
3763
|
header: /* @__PURE__ */ L("div", { style: { width: 300, padding: 5 }, children: [
|
|
@@ -3809,7 +3809,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3809
3809
|
) }) })
|
|
3810
3810
|
] })
|
|
3811
3811
|
] }),
|
|
3812
|
-
onRetrieveData:
|
|
3812
|
+
onRetrieveData: k
|
|
3813
3813
|
}
|
|
3814
3814
|
) })
|
|
3815
3815
|
}
|
|
@@ -3829,7 +3829,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3829
3829
|
fe(() => () => {
|
|
3830
3830
|
h();
|
|
3831
3831
|
}, []), Gt(e, () => ({
|
|
3832
|
-
openActionModal:
|
|
3832
|
+
openActionModal: k,
|
|
3833
3833
|
processAction: P
|
|
3834
3834
|
}));
|
|
3835
3835
|
const [v, y] = S(!1), [b, C] = S(
|
|
@@ -3837,9 +3837,9 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3837
3837
|
context: {}
|
|
3838
3838
|
}
|
|
3839
3839
|
);
|
|
3840
|
-
async function w(
|
|
3840
|
+
async function w(M) {
|
|
3841
3841
|
var J;
|
|
3842
|
-
const { reportData: E, fields: A, values: I, context: O = {} } =
|
|
3842
|
+
const { reportData: E, fields: A, values: I, context: O = {} } = M, {
|
|
3843
3843
|
context: _,
|
|
3844
3844
|
model: $,
|
|
3845
3845
|
datas: G = {},
|
|
@@ -3885,11 +3885,11 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3885
3885
|
i.current = !1, clearInterval(o.current), p(X), c(!1);
|
|
3886
3886
|
}
|
|
3887
3887
|
}
|
|
3888
|
-
async function x(
|
|
3888
|
+
async function x(M) {
|
|
3889
3889
|
let E;
|
|
3890
3890
|
try {
|
|
3891
3891
|
if (E = await H.getHandler().getReport({
|
|
3892
|
-
id:
|
|
3892
|
+
id: M
|
|
3893
3893
|
}), E.state && i.current === !0) {
|
|
3894
3894
|
i.current = !1, clearInterval(o.current), c(!1);
|
|
3895
3895
|
const A = await jn(E.result);
|
|
@@ -3900,25 +3900,25 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3900
3900
|
}
|
|
3901
3901
|
}
|
|
3902
3902
|
async function P({
|
|
3903
|
-
actionData:
|
|
3903
|
+
actionData: M,
|
|
3904
3904
|
fields: E,
|
|
3905
3905
|
values: A,
|
|
3906
3906
|
context: I,
|
|
3907
3907
|
onRefreshParentValues: O
|
|
3908
3908
|
}) {
|
|
3909
|
-
const { type: _ } =
|
|
3909
|
+
const { type: _ } = M;
|
|
3910
3910
|
if (O && f.current.push(O), _ === "ir.actions.report.xml")
|
|
3911
3911
|
return await w({
|
|
3912
|
-
reportData:
|
|
3912
|
+
reportData: M,
|
|
3913
3913
|
fields: E,
|
|
3914
3914
|
values: A,
|
|
3915
3915
|
context: I
|
|
3916
3916
|
});
|
|
3917
3917
|
if (_ === "ir.actions.act_window")
|
|
3918
|
-
return await T({ actionData:
|
|
3918
|
+
return await T({ actionData: M, fields: E, values: A, context: I });
|
|
3919
3919
|
if (_ === "ir.actions.act_url")
|
|
3920
3920
|
window.open(
|
|
3921
|
-
lf(
|
|
3921
|
+
lf(M.url, { ...A, context: I }),
|
|
3922
3922
|
"_blank"
|
|
3923
3923
|
);
|
|
3924
3924
|
else
|
|
@@ -3929,16 +3929,16 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3929
3929
|
}), {};
|
|
3930
3930
|
}
|
|
3931
3931
|
async function T({
|
|
3932
|
-
actionData:
|
|
3932
|
+
actionData: M,
|
|
3933
3933
|
fields: E = {},
|
|
3934
3934
|
values: A = {},
|
|
3935
3935
|
context: I = {}
|
|
3936
3936
|
}) {
|
|
3937
3937
|
var B;
|
|
3938
|
-
let O =
|
|
3939
|
-
|
|
3938
|
+
let O = M;
|
|
3939
|
+
M.res_model || (O = (await H.getHandler().readObjects({
|
|
3940
3940
|
model: "ir.actions.act_window",
|
|
3941
|
-
ids: [parseInt(
|
|
3941
|
+
ids: [parseInt(M.id)],
|
|
3942
3942
|
context: I
|
|
3943
3943
|
}))[0]);
|
|
3944
3944
|
const _ = O.context, $ = typeof (O == null ? void 0 : O.context) == "string" ? pn({
|
|
@@ -3966,7 +3966,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
3966
3966
|
id: ((B = O == null ? void 0 : O.view_id) == null ? void 0 : B[0]) || void 0,
|
|
3967
3967
|
context: G
|
|
3968
3968
|
});
|
|
3969
|
-
return
|
|
3969
|
+
return k({
|
|
3970
3970
|
domain: V,
|
|
3971
3971
|
model: O.res_model,
|
|
3972
3972
|
formView: q,
|
|
@@ -4000,8 +4000,8 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
4000
4000
|
}), { closeParent: !0 };
|
|
4001
4001
|
}
|
|
4002
4002
|
}
|
|
4003
|
-
function
|
|
4004
|
-
domain:
|
|
4003
|
+
function k({
|
|
4004
|
+
domain: M,
|
|
4005
4005
|
model: E,
|
|
4006
4006
|
formView: A,
|
|
4007
4007
|
context: I,
|
|
@@ -4019,10 +4019,10 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
4019
4019
|
} catch (V) {
|
|
4020
4020
|
console.error(V);
|
|
4021
4021
|
}
|
|
4022
|
-
v ? F({ domain:
|
|
4022
|
+
v ? F({ domain: M, model: E, formView: A, context: I, actionData: O }) : (C({ domain: M, model: E, context: I, formView: A, actionData: O }), y(!0));
|
|
4023
4023
|
}
|
|
4024
4024
|
async function F({
|
|
4025
|
-
domain:
|
|
4025
|
+
domain: M,
|
|
4026
4026
|
model: E,
|
|
4027
4027
|
formView: A,
|
|
4028
4028
|
context: I,
|
|
@@ -4034,9 +4034,9 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
4034
4034
|
context: {},
|
|
4035
4035
|
formView: void 0,
|
|
4036
4036
|
actionData: void 0
|
|
4037
|
-
}), y(!1), await new Promise((_) => setTimeout(_, 300)), C({ domain:
|
|
4037
|
+
}), y(!1), await new Promise((_) => setTimeout(_, 300)), C({ domain: M, model: E, context: I, formView: A, actionData: O }), y(!0);
|
|
4038
4038
|
}
|
|
4039
|
-
async function
|
|
4039
|
+
async function D() {
|
|
4040
4040
|
ci(f.current), f.current = [], y(!1), C({
|
|
4041
4041
|
domain: void 0,
|
|
4042
4042
|
model: void 0,
|
|
@@ -4075,7 +4075,7 @@ const { useToken: Kf } = rt, Jf = (t) => {
|
|
|
4075
4075
|
model: b.model,
|
|
4076
4076
|
formView: b.formView,
|
|
4077
4077
|
visible: v,
|
|
4078
|
-
onSubmitSucceed:
|
|
4078
|
+
onSubmitSucceed: D,
|
|
4079
4079
|
onCancel: () => {
|
|
4080
4080
|
ci(f.current), f.current = [], y(!1), C({
|
|
4081
4081
|
domain: void 0,
|
|
@@ -4388,10 +4388,10 @@ function ap({
|
|
|
4388
4388
|
setSearchTreeNameSearch: x,
|
|
4389
4389
|
searchTreeNameSearch: P,
|
|
4390
4390
|
treeIsLoading: T,
|
|
4391
|
-
setPreviousView:
|
|
4391
|
+
setPreviousView: k,
|
|
4392
4392
|
previousView: F,
|
|
4393
|
-
results:
|
|
4394
|
-
limit:
|
|
4393
|
+
results: D,
|
|
4394
|
+
limit: M,
|
|
4395
4395
|
totalItems: E,
|
|
4396
4396
|
isActive: A,
|
|
4397
4397
|
treeType: I,
|
|
@@ -4466,9 +4466,9 @@ function ap({
|
|
|
4466
4466
|
U
|
|
4467
4467
|
]), ie = R(
|
|
4468
4468
|
(oe) => {
|
|
4469
|
-
|
|
4469
|
+
k == null || k(c), l == null || l(oe);
|
|
4470
4470
|
},
|
|
4471
|
-
[c,
|
|
4471
|
+
[c, k, l]
|
|
4472
4472
|
), Y = R(
|
|
4473
4473
|
(oe) => {
|
|
4474
4474
|
oe !== P && (oe && oe.trim().length > 0 && !P && (O == null || O([]), _ == null || _({})), x == null || x(oe), P !== void 0 && setTimeout(() => {
|
|
@@ -4487,7 +4487,7 @@ function ap({
|
|
|
4487
4487
|
(oe) => {
|
|
4488
4488
|
if (oe.id === "print_screen") {
|
|
4489
4489
|
let ue = (d == null ? void 0 : d.map((he) => he.id)) || [];
|
|
4490
|
-
ue.length === 0 && (ue = (
|
|
4490
|
+
ue.length === 0 && (ue = (D == null ? void 0 : D.map((he) => he.id)) || []), W(
|
|
4491
4491
|
{
|
|
4492
4492
|
id: -1,
|
|
4493
4493
|
model: g,
|
|
@@ -4504,7 +4504,7 @@ function ap({
|
|
|
4504
4504
|
}
|
|
4505
4505
|
q(!0);
|
|
4506
4506
|
},
|
|
4507
|
-
[g, t,
|
|
4507
|
+
[g, t, D, W, d]
|
|
4508
4508
|
);
|
|
4509
4509
|
fe(() => {
|
|
4510
4510
|
if (I === "infinite" && P === void 0) {
|
|
@@ -4520,10 +4520,10 @@ function ap({
|
|
|
4520
4520
|
}, [I, P, h]), yn(
|
|
4521
4521
|
"ctrl+l,command+l",
|
|
4522
4522
|
() => {
|
|
4523
|
-
A && F && (
|
|
4523
|
+
A && F && (k == null || k(c), l == null || l(F));
|
|
4524
4524
|
},
|
|
4525
4525
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
4526
|
-
[F, c, A,
|
|
4526
|
+
[F, c, A, k, l]
|
|
4527
4527
|
), yn(
|
|
4528
4528
|
"ctrl+f,command+f",
|
|
4529
4529
|
() => {
|
|
@@ -4679,10 +4679,10 @@ function ap({
|
|
|
4679
4679
|
onClose: () => q(!1),
|
|
4680
4680
|
model: g,
|
|
4681
4681
|
domain: pe,
|
|
4682
|
-
limit:
|
|
4682
|
+
limit: M,
|
|
4683
4683
|
totalRegisters: E || 0,
|
|
4684
4684
|
selectedRegistersToExport: d,
|
|
4685
|
-
visibleRegisters: (
|
|
4685
|
+
visibleRegisters: (D == null ? void 0 : D.length) || 0,
|
|
4686
4686
|
context: t
|
|
4687
4687
|
}
|
|
4688
4688
|
)
|
|
@@ -5162,8 +5162,8 @@ const hp = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(yl,
|
|
|
5162
5162
|
b,
|
|
5163
5163
|
w
|
|
5164
5164
|
]), T = R(async () => {
|
|
5165
|
-
var
|
|
5166
|
-
let F,
|
|
5165
|
+
var M;
|
|
5166
|
+
let F, D;
|
|
5167
5167
|
try {
|
|
5168
5168
|
if (x) {
|
|
5169
5169
|
const [I, O] = await Promise.all([
|
|
@@ -5178,26 +5178,26 @@ const hp = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(yl,
|
|
|
5178
5178
|
context: r
|
|
5179
5179
|
})
|
|
5180
5180
|
]);
|
|
5181
|
-
|
|
5181
|
+
D = O, F = I.fields, i({ ...I, toolbar: D });
|
|
5182
5182
|
} else {
|
|
5183
5183
|
const I = await m({
|
|
5184
5184
|
model: n,
|
|
5185
5185
|
type: "form",
|
|
5186
5186
|
context: r
|
|
5187
5187
|
});
|
|
5188
|
-
i(I), F = I.fields,
|
|
5188
|
+
i(I), F = I.fields, D = I.toolbar;
|
|
5189
5189
|
}
|
|
5190
|
-
const E = wp({ fields: F, toolbar:
|
|
5190
|
+
const E = wp({ fields: F, toolbar: D });
|
|
5191
5191
|
let A = {};
|
|
5192
|
-
return E.length > 0 && (A = { ...(
|
|
5192
|
+
return E.length > 0 && (A = { ...(M = await C({
|
|
5193
5193
|
model: n,
|
|
5194
5194
|
ids: [e],
|
|
5195
5195
|
fieldsToRetrieve: E,
|
|
5196
5196
|
context: r
|
|
5197
|
-
})) == null ? void 0 :
|
|
5198
|
-
actionItems:
|
|
5199
|
-
relateItems:
|
|
5200
|
-
printItems:
|
|
5197
|
+
})) == null ? void 0 : M[0] }), A = { ...kn(A, F), active_id: e }, c(A), D ? {
|
|
5198
|
+
actionItems: D.action,
|
|
5199
|
+
relateItems: D.relate,
|
|
5200
|
+
printItems: D.print
|
|
5201
5201
|
} : void 0;
|
|
5202
5202
|
} catch (E) {
|
|
5203
5203
|
console.error("Error in Many2oneSuffix fetchData:", E);
|
|
@@ -5206,12 +5206,12 @@ const hp = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(yl,
|
|
|
5206
5206
|
}, [r, m, h, e, n, C, x]);
|
|
5207
5207
|
if (!e)
|
|
5208
5208
|
return null;
|
|
5209
|
-
function
|
|
5210
|
-
const
|
|
5209
|
+
function k({ item: F, type: D }) {
|
|
5210
|
+
const M = {
|
|
5211
5211
|
values: a,
|
|
5212
5212
|
fields: o.fields
|
|
5213
5213
|
};
|
|
5214
|
-
switch (
|
|
5214
|
+
switch (D) {
|
|
5215
5215
|
case "open":
|
|
5216
5216
|
f({
|
|
5217
5217
|
domain: [["id", "=", e]],
|
|
@@ -5230,7 +5230,7 @@ const hp = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(yl,
|
|
|
5230
5230
|
p == null || p({
|
|
5231
5231
|
actionData: F,
|
|
5232
5232
|
context: { active_id: e, active_ids: [e] },
|
|
5233
|
-
...
|
|
5233
|
+
...M
|
|
5234
5234
|
});
|
|
5235
5235
|
break;
|
|
5236
5236
|
case "print":
|
|
@@ -5239,7 +5239,7 @@ const hp = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(yl,
|
|
|
5239
5239
|
...F,
|
|
5240
5240
|
datas: { ...F.datas, ids: [e] }
|
|
5241
5241
|
},
|
|
5242
|
-
...
|
|
5242
|
+
...M
|
|
5243
5243
|
});
|
|
5244
5244
|
break;
|
|
5245
5245
|
case "relate":
|
|
@@ -5247,7 +5247,7 @@ const hp = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(yl,
|
|
|
5247
5247
|
relateData: F,
|
|
5248
5248
|
action_id: F.id,
|
|
5249
5249
|
action_type: F.type,
|
|
5250
|
-
...
|
|
5250
|
+
...M
|
|
5251
5251
|
});
|
|
5252
5252
|
break;
|
|
5253
5253
|
}
|
|
@@ -5256,7 +5256,7 @@ const hp = (t) => /* @__PURE__ */ s(Ye, { ...t, children: /* @__PURE__ */ s(yl,
|
|
|
5256
5256
|
bp,
|
|
5257
5257
|
{
|
|
5258
5258
|
onRetrieveData: T,
|
|
5259
|
-
onItemClick:
|
|
5259
|
+
onItemClick: k,
|
|
5260
5260
|
onOpenChange: (F) => {
|
|
5261
5261
|
F || P();
|
|
5262
5262
|
}
|
|
@@ -5741,9 +5741,9 @@ const cr = ({
|
|
|
5741
5741
|
}
|
|
5742
5742
|
}, v = R(
|
|
5743
5743
|
(w) => {
|
|
5744
|
-
var x, P, T,
|
|
5744
|
+
var x, P, T, k;
|
|
5745
5745
|
if (a.current[(P = (x = w.node) == null ? void 0 : x.data) == null ? void 0 : P.id])
|
|
5746
|
-
return { color: a.current[(
|
|
5746
|
+
return { color: a.current[(k = (T = w.node) == null ? void 0 : T.data) == null ? void 0 : k.id] };
|
|
5747
5747
|
},
|
|
5748
5748
|
[a]
|
|
5749
5749
|
), y = R(
|
|
@@ -6557,8 +6557,8 @@ function xm() {
|
|
|
6557
6557
|
for (var P in m)
|
|
6558
6558
|
!(C && P === "prototype") && e.call(m, P) && b.push(String(P));
|
|
6559
6559
|
if (i)
|
|
6560
|
-
for (var T = u(m),
|
|
6561
|
-
!(T && c[
|
|
6560
|
+
for (var T = u(m), k = 0; k < c.length; ++k)
|
|
6561
|
+
!(T && c[k] === "constructor") && e.call(m, c[k]) && b.push(c[k]);
|
|
6562
6562
|
return b;
|
|
6563
6563
|
};
|
|
6564
6564
|
}
|
|
@@ -7280,7 +7280,7 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7280
7280
|
setSavedSearches: u
|
|
7281
7281
|
} = Yt(), [p, m] = S(
|
|
7282
7282
|
(o == null ? void 0 : o.name) || ""
|
|
7283
|
-
), [g, h] = S(!1), [v, y] = S(!1), [b, C] = S(!1), [w, x] = S(!1), [P, T] = S(""), [
|
|
7283
|
+
), [g, h] = S(!1), [v, y] = S(!1), [b, C] = S(!1), [w, x] = S(!1), [P, T] = S(""), [k] = Me(
|
|
7284
7284
|
H.getHandler().update
|
|
7285
7285
|
), [F] = Me(
|
|
7286
7286
|
H.getHandler().create
|
|
@@ -7312,12 +7312,12 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7312
7312
|
c,
|
|
7313
7313
|
o
|
|
7314
7314
|
]);
|
|
7315
|
-
const
|
|
7315
|
+
const D = lt(async () => {
|
|
7316
7316
|
if (!(!c || !t || !(n != null && n.length)))
|
|
7317
7317
|
try {
|
|
7318
7318
|
if (o) {
|
|
7319
7319
|
const U = p || "Unnamed Search";
|
|
7320
|
-
await
|
|
7320
|
+
await k({
|
|
7321
7321
|
model: "ir.search",
|
|
7322
7322
|
id: o.id,
|
|
7323
7323
|
values: {
|
|
@@ -7374,13 +7374,13 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7374
7374
|
o,
|
|
7375
7375
|
p,
|
|
7376
7376
|
e,
|
|
7377
|
-
|
|
7377
|
+
k,
|
|
7378
7378
|
F,
|
|
7379
7379
|
d,
|
|
7380
7380
|
f,
|
|
7381
7381
|
u,
|
|
7382
7382
|
i
|
|
7383
|
-
]),
|
|
7383
|
+
]), M = R(() => {
|
|
7384
7384
|
c && (x(!0), T(p || ""), C(!0));
|
|
7385
7385
|
}, [c, p]), E = lt(async () => {
|
|
7386
7386
|
if (!c || !t || !(n != null && n.length))
|
|
@@ -7409,7 +7409,7 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7409
7409
|
i == null || i(X), m(U), y(!1), d == null || d(X), a && (n != null && n.length) && a();
|
|
7410
7410
|
}
|
|
7411
7411
|
} else {
|
|
7412
|
-
await
|
|
7412
|
+
await k({
|
|
7413
7413
|
model: "ir.search",
|
|
7414
7414
|
id: o.id,
|
|
7415
7415
|
values: {
|
|
@@ -7445,7 +7445,7 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7445
7445
|
o,
|
|
7446
7446
|
e,
|
|
7447
7447
|
F,
|
|
7448
|
-
|
|
7448
|
+
k,
|
|
7449
7449
|
d,
|
|
7450
7450
|
f,
|
|
7451
7451
|
u,
|
|
@@ -7465,7 +7465,7 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7465
7465
|
}
|
|
7466
7466
|
if (o && U !== o.name)
|
|
7467
7467
|
try {
|
|
7468
|
-
await
|
|
7468
|
+
await k({
|
|
7469
7469
|
model: "ir.search",
|
|
7470
7470
|
id: o.id,
|
|
7471
7471
|
values: {
|
|
@@ -7493,7 +7493,7 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7493
7493
|
}, [
|
|
7494
7494
|
o,
|
|
7495
7495
|
p,
|
|
7496
|
-
|
|
7496
|
+
k,
|
|
7497
7497
|
e,
|
|
7498
7498
|
d,
|
|
7499
7499
|
f,
|
|
@@ -7576,8 +7576,8 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7576
7576
|
setSavedSearchName: m,
|
|
7577
7577
|
setShowSaveModal: C,
|
|
7578
7578
|
setModalInputValue: T,
|
|
7579
|
-
handleSave:
|
|
7580
|
-
handleSaveAsNew:
|
|
7579
|
+
handleSave: D,
|
|
7580
|
+
handleSaveAsNew: M,
|
|
7581
7581
|
handleModalSave: E,
|
|
7582
7582
|
handleClear: z,
|
|
7583
7583
|
renderSavedSearchTitle: G,
|
|
@@ -7594,9 +7594,9 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7594
7594
|
const x = Ln(r || {});
|
|
7595
7595
|
d(x);
|
|
7596
7596
|
const T = Object.keys(x).filter(
|
|
7597
|
-
(
|
|
7597
|
+
(k) => x[k] !== void 0
|
|
7598
7598
|
).map(
|
|
7599
|
-
(
|
|
7599
|
+
(k) => k.replace(/#.*$/, "")
|
|
7600
7600
|
);
|
|
7601
7601
|
y(T);
|
|
7602
7602
|
}, [r]), je(() => {
|
|
@@ -7625,11 +7625,11 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7625
7625
|
}) => {
|
|
7626
7626
|
if (!o)
|
|
7627
7627
|
return;
|
|
7628
|
-
const
|
|
7628
|
+
const k = o == null ? void 0 : o.rows, F = k == null ? void 0 : k.flatMap((E) => E), D = Object.keys(l).reduce((E, A) => {
|
|
7629
7629
|
const I = A.replace(/#.*$/, "");
|
|
7630
7630
|
return E[I] === void 0 && (E[I] = l[A] !== void 0), E;
|
|
7631
|
-
}, {}),
|
|
7632
|
-
return F.filter((E) => P ?
|
|
7631
|
+
}, {}), M = P ? F.reduce((E, A) => (E[A.id] = D[A.id], E), {}) : D;
|
|
7632
|
+
return F.filter((E) => P ? M[E.id] === !0 : !0).sort((E, A) => {
|
|
7633
7633
|
const I = E, O = A;
|
|
7634
7634
|
if (P) {
|
|
7635
7635
|
const _ = v.indexOf(I.id), $ = v.indexOf(O.id);
|
|
@@ -7639,7 +7639,7 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7639
7639
|
Hr(O.label)
|
|
7640
7640
|
);
|
|
7641
7641
|
}).map((E) => {
|
|
7642
|
-
const A = E, I =
|
|
7642
|
+
const A = E, I = M[A.id] === !0, O = P ? !1 : x && !Vg(x, A), _ = T ? `${A.id}-top` : `${A.id}-bottom`;
|
|
7643
7643
|
return /* @__PURE__ */ s(
|
|
7644
7644
|
"div",
|
|
7645
7645
|
{
|
|
@@ -7686,26 +7686,26 @@ const Zn = /* @__PURE__ */ Ra(kg), { Text: Pg } = cn, $g = ({
|
|
|
7686
7686
|
}, C = lt(() => {
|
|
7687
7687
|
const x = c.getFieldsValue(), P = Ln(x), T = l;
|
|
7688
7688
|
d(P), Zn(P, T) || i == null || i(x);
|
|
7689
|
-
const
|
|
7690
|
-
(
|
|
7689
|
+
const k = Object.keys(T).filter(
|
|
7690
|
+
(M) => T[M] !== void 0
|
|
7691
7691
|
), F = Object.keys(P).filter(
|
|
7692
|
-
(
|
|
7692
|
+
(M) => P[M] !== void 0
|
|
7693
7693
|
);
|
|
7694
|
-
if (F.length >
|
|
7695
|
-
const
|
|
7696
|
-
if (
|
|
7697
|
-
const E =
|
|
7694
|
+
if (F.length > k.length) {
|
|
7695
|
+
const M = F.find((E) => !k.includes(E));
|
|
7696
|
+
if (M) {
|
|
7697
|
+
const E = M.replace(/#.*$/, "");
|
|
7698
7698
|
y((A) => A.includes(E) ? A : [...A, E]), h.current && setTimeout(() => {
|
|
7699
7699
|
h.current && (h.current.scrollTop = h.current.scrollHeight);
|
|
7700
7700
|
}, 150);
|
|
7701
7701
|
}
|
|
7702
7702
|
}
|
|
7703
|
-
const
|
|
7704
|
-
|
|
7705
|
-
const E =
|
|
7703
|
+
const D = k.filter((M) => !F.includes(M));
|
|
7704
|
+
D.length > 0 && y((M) => {
|
|
7705
|
+
const E = D.map(
|
|
7706
7706
|
(A) => A.replace(/#.*$/, "")
|
|
7707
7707
|
);
|
|
7708
|
-
return
|
|
7708
|
+
return M.filter((A) => !E.includes(A));
|
|
7709
7709
|
});
|
|
7710
7710
|
}, [c, i, l]), w = R(
|
|
7711
7711
|
(x) => {
|
|
@@ -7850,14 +7850,14 @@ const tc = (t) => {
|
|
|
7850
7850
|
j.add(de);
|
|
7851
7851
|
}
|
|
7852
7852
|
}), j.size;
|
|
7853
|
-
}, [b]), [T,
|
|
7853
|
+
}, [b]), [T, k] = S(null);
|
|
7854
7854
|
je(() => {
|
|
7855
|
-
n &&
|
|
7855
|
+
n && k(g || null);
|
|
7856
7856
|
}, [n, g]);
|
|
7857
7857
|
const {
|
|
7858
7858
|
savedSearchName: F,
|
|
7859
|
-
hasChanges:
|
|
7860
|
-
showSaveModal:
|
|
7859
|
+
hasChanges: D,
|
|
7860
|
+
showSaveModal: M,
|
|
7861
7861
|
isModalSaveAsNew: E,
|
|
7862
7862
|
modalInputValue: A,
|
|
7863
7863
|
setShowSaveModal: I,
|
|
@@ -7877,7 +7877,7 @@ const tc = (t) => {
|
|
|
7877
7877
|
searchParams: v,
|
|
7878
7878
|
hasActiveFilters: !!P,
|
|
7879
7879
|
internalSavedSearch: T,
|
|
7880
|
-
setInternalSavedSearch:
|
|
7880
|
+
setInternalSavedSearch: k,
|
|
7881
7881
|
onSave: R(() => {
|
|
7882
7882
|
var re;
|
|
7883
7883
|
const j = nr(
|
|
@@ -8015,7 +8015,7 @@ const tc = (t) => {
|
|
|
8015
8015
|
z,
|
|
8016
8016
|
q,
|
|
8017
8017
|
U,
|
|
8018
|
-
|
|
8018
|
+
D,
|
|
8019
8019
|
u,
|
|
8020
8020
|
_,
|
|
8021
8021
|
$
|
|
@@ -8054,7 +8054,7 @@ const tc = (t) => {
|
|
|
8054
8054
|
Et,
|
|
8055
8055
|
{
|
|
8056
8056
|
title: u(E ? "saveAsNewSearchFilter" : "saveSearchFilter"),
|
|
8057
|
-
open:
|
|
8057
|
+
open: M,
|
|
8058
8058
|
onOk: G,
|
|
8059
8059
|
okButtonProps: {
|
|
8060
8060
|
disabled: !((pe = A || F) != null && pe.trim())
|
|
@@ -8089,7 +8089,7 @@ const tc = (t) => {
|
|
|
8089
8089
|
placeholder: u("searchFilterNamePlaceholder"),
|
|
8090
8090
|
ref: R(
|
|
8091
8091
|
(j) => {
|
|
8092
|
-
j != null && j.input &&
|
|
8092
|
+
j != null && j.input && M && setTimeout(() => {
|
|
8093
8093
|
var Y;
|
|
8094
8094
|
const re = j.input;
|
|
8095
8095
|
re.focus();
|
|
@@ -8097,7 +8097,7 @@ const tc = (t) => {
|
|
|
8097
8097
|
re.setSelectionRange(ie, ie);
|
|
8098
8098
|
}, 0);
|
|
8099
8099
|
},
|
|
8100
|
-
[
|
|
8100
|
+
[M]
|
|
8101
8101
|
)
|
|
8102
8102
|
}
|
|
8103
8103
|
) }) })
|
|
@@ -8228,42 +8228,42 @@ function lo(t) {
|
|
|
8228
8228
|
const T = () => {
|
|
8229
8229
|
if (!v)
|
|
8230
8230
|
return;
|
|
8231
|
-
const
|
|
8231
|
+
const M = b ? v : g, E = M == null ? void 0 : M.rows;
|
|
8232
8232
|
return E == null ? void 0 : E.map((A, I) => /* @__PURE__ */ s(Xe, { children: A.map((O, _) => /* @__PURE__ */ s(ke, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Tl, { field: O }) }, _)) }, I));
|
|
8233
8233
|
};
|
|
8234
8234
|
je(() => {
|
|
8235
8235
|
C(!1), w.current = new fa(n, e), w.current.parse(), h(w.current._simpleSearchContainer), y(w.current._advancedSearchContainer);
|
|
8236
8236
|
}, [e, n]);
|
|
8237
|
-
const
|
|
8237
|
+
const k = T(), F = (M) => {
|
|
8238
8238
|
var O;
|
|
8239
|
-
const { limit: E, offset: A } =
|
|
8240
|
-
delete
|
|
8239
|
+
const { limit: E, offset: A } = M;
|
|
8240
|
+
delete M.offset, delete M.limit;
|
|
8241
8241
|
const I = nr(
|
|
8242
|
-
|
|
8242
|
+
M,
|
|
8243
8243
|
(O = w.current) == null ? void 0 : O._advancedSearchContainer
|
|
8244
8244
|
);
|
|
8245
|
-
o({ params: I, offset: A, limit: E, searchValues:
|
|
8246
|
-
},
|
|
8245
|
+
o({ params: I, offset: A, limit: E, searchValues: M });
|
|
8246
|
+
}, D = R(() => {
|
|
8247
8247
|
if (!g || !v)
|
|
8248
8248
|
return !1;
|
|
8249
|
-
const
|
|
8249
|
+
const M = g.rows.reduce(
|
|
8250
8250
|
(A, I) => A + I.length,
|
|
8251
8251
|
0
|
|
8252
8252
|
), E = v.rows.reduce(
|
|
8253
8253
|
(A, I) => A + I.length,
|
|
8254
8254
|
0
|
|
8255
8255
|
);
|
|
8256
|
-
return
|
|
8256
|
+
return M === E;
|
|
8257
8257
|
}, [g, v]);
|
|
8258
8258
|
return /* @__PURE__ */ s(
|
|
8259
8259
|
cs,
|
|
8260
8260
|
{
|
|
8261
8261
|
bounds: !0,
|
|
8262
|
-
onResize: (
|
|
8262
|
+
onResize: (M) => {
|
|
8263
8263
|
var E;
|
|
8264
|
-
f == null || f((E =
|
|
8264
|
+
f == null || f((E = M.bounds) == null ? void 0 : E.height);
|
|
8265
8265
|
},
|
|
8266
|
-
children: ({ measureRef:
|
|
8266
|
+
children: ({ measureRef: M }) => /* @__PURE__ */ s("div", { ref: M, children: /* @__PURE__ */ L("div", { style: { display: d ? "block" : "none" }, children: [
|
|
8267
8267
|
/* @__PURE__ */ L(
|
|
8268
8268
|
$t,
|
|
8269
8269
|
{
|
|
@@ -8273,12 +8273,12 @@ function lo(t) {
|
|
|
8273
8273
|
onFinish: F,
|
|
8274
8274
|
initialValues: { offset: a, limit: c },
|
|
8275
8275
|
children: [
|
|
8276
|
-
|
|
8276
|
+
k,
|
|
8277
8277
|
b && m && /* @__PURE__ */ s(Hg, { onLimitChange: l }),
|
|
8278
8278
|
/* @__PURE__ */ s(
|
|
8279
8279
|
Lg,
|
|
8280
8280
|
{
|
|
8281
|
-
hideAdvancedFilter: (
|
|
8281
|
+
hideAdvancedFilter: (D() || (v == null ? void 0 : v._rows.length) === 0) && !m,
|
|
8282
8282
|
advancedFilter: b,
|
|
8283
8283
|
onAdvancedFilterToggle: () => {
|
|
8284
8284
|
C(!b);
|
|
@@ -8309,7 +8309,7 @@ function lo(t) {
|
|
|
8309
8309
|
function nc({
|
|
8310
8310
|
useLocalState: t = !1
|
|
8311
8311
|
}) {
|
|
8312
|
-
const e = fy() && !t, n = Yt(), [r, o] = S(!1), [i, a] = S(!1), [c, l] = S([]), [d, f] = S(0), [u, p] = S(void 0), [m, g] = S([]), [h, v] = S({}), [y, b] = S(), [C, w] = S([]), [x, P] = S(), [T,
|
|
8312
|
+
const e = fy() && !t, n = Yt(), [r, o] = S(!1), [i, a] = S(!1), [c, l] = S([]), [d, f] = S(0), [u, p] = S(void 0), [m, g] = S([]), [h, v] = S({}), [y, b] = S(), [C, w] = S([]), [x, P] = S(), [T, k] = S(0), [F, D] = S(), [M, E] = S(1), [A, I] = S(xn), [O, _] = S(At);
|
|
8313
8313
|
return e ? {
|
|
8314
8314
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
8315
8315
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -8379,11 +8379,11 @@ function nc({
|
|
|
8379
8379
|
searchQuery: x,
|
|
8380
8380
|
setSearchQuery: P,
|
|
8381
8381
|
totalItems: T,
|
|
8382
|
-
setTotalItems:
|
|
8382
|
+
setTotalItems: k,
|
|
8383
8383
|
isActive: void 0,
|
|
8384
8384
|
order: F,
|
|
8385
|
-
setOrder:
|
|
8386
|
-
currentPage:
|
|
8385
|
+
setOrder: D,
|
|
8386
|
+
currentPage: M,
|
|
8387
8387
|
setCurrentPage: E,
|
|
8388
8388
|
treeType: A,
|
|
8389
8389
|
setTreeType: I,
|
|
@@ -8423,12 +8423,12 @@ const Ms = () => {
|
|
|
8423
8423
|
context: r,
|
|
8424
8424
|
fields: m
|
|
8425
8425
|
})
|
|
8426
|
-
), [
|
|
8426
|
+
), [k, F] = Me(
|
|
8427
8427
|
H.getHandler().parseConditions
|
|
8428
|
-
),
|
|
8428
|
+
), D = Ms();
|
|
8429
8429
|
fe(() => {
|
|
8430
|
-
o === !1 && $(), (o === void 0 || o === !0) && !
|
|
8431
|
-
}, [o,
|
|
8430
|
+
o === !1 && $(), (o === void 0 || o === !0) && !D && $(), (o === void 0 || o === !0) && D && G();
|
|
8431
|
+
}, [o, D]), fe(() => () => {
|
|
8432
8432
|
T(), F(), C.current && (clearInterval(C.current), C.current = null), y.current.clear(), b.current = [], p.current = [];
|
|
8433
8433
|
}, []), fe(() => (o || (T(), F(), y.current.clear()), () => {
|
|
8434
8434
|
T(), F();
|
|
@@ -8440,7 +8440,7 @@ const Ms = () => {
|
|
|
8440
8440
|
const N = Object.entries(m).filter(([B, q]) => q.is_function === !0).map(([B]) => B);
|
|
8441
8441
|
u(N.length > 0), p.current = N;
|
|
8442
8442
|
}, [m]);
|
|
8443
|
-
const
|
|
8443
|
+
const M = R(() => {
|
|
8444
8444
|
var q, z;
|
|
8445
8445
|
if (!e)
|
|
8446
8446
|
return !1;
|
|
@@ -8503,13 +8503,13 @@ const Ms = () => {
|
|
|
8503
8503
|
var z;
|
|
8504
8504
|
if (i == null || i(N), N.length === 0 || !p.current.some(
|
|
8505
8505
|
(U) => N.some((J) => J[U] !== void 0)
|
|
8506
|
-
) || !
|
|
8506
|
+
) || !M() || !a || !c)
|
|
8507
8507
|
return;
|
|
8508
8508
|
const B = N.map((U) => ({ ...l == null ? void 0 : l.find((X) => X.id === U.id), ...U })), q = cr({
|
|
8509
8509
|
treeOoui: a
|
|
8510
8510
|
});
|
|
8511
8511
|
try {
|
|
8512
|
-
const U = await
|
|
8512
|
+
const U = await k({
|
|
8513
8513
|
conditions: q,
|
|
8514
8514
|
values: B,
|
|
8515
8515
|
context: r
|
|
@@ -8521,11 +8521,11 @@ const Ms = () => {
|
|
|
8521
8521
|
},
|
|
8522
8522
|
[
|
|
8523
8523
|
i,
|
|
8524
|
-
|
|
8524
|
+
M,
|
|
8525
8525
|
a,
|
|
8526
8526
|
c,
|
|
8527
8527
|
l,
|
|
8528
|
-
|
|
8528
|
+
k,
|
|
8529
8529
|
r,
|
|
8530
8530
|
n
|
|
8531
8531
|
]
|
|
@@ -8584,7 +8584,7 @@ const Ms = () => {
|
|
|
8584
8584
|
hasFunctionFields: f,
|
|
8585
8585
|
pause: $,
|
|
8586
8586
|
resume: G,
|
|
8587
|
-
onHasFunctionFieldsToParseConditions:
|
|
8587
|
+
onHasFunctionFieldsToParseConditions: M,
|
|
8588
8588
|
syncExternalRecordUpdates: V
|
|
8589
8589
|
};
|
|
8590
8590
|
}, Wg = 3 * 1e3, qg = (t) => {
|
|
@@ -8610,7 +8610,7 @@ const Ms = () => {
|
|
|
8610
8610
|
[o]
|
|
8611
8611
|
);
|
|
8612
8612
|
fe(() => {
|
|
8613
|
-
i === !1 && F(), (i === void 0 || i === !0) && !w && F(), (i === void 0 || i === !0) && w &&
|
|
8613
|
+
i === !1 && F(), (i === void 0 || i === !0) && !w && F(), (i === void 0 || i === !0) && w && D();
|
|
8614
8614
|
}, [i, w]);
|
|
8615
8615
|
const T = R(() => {
|
|
8616
8616
|
var I, O;
|
|
@@ -8618,7 +8618,7 @@ const Ms = () => {
|
|
|
8618
8618
|
return !1;
|
|
8619
8619
|
const E = ((I = l.fields_in_conditions) == null ? void 0 : I.colors) || [], A = ((O = l.fields_in_conditions) == null ? void 0 : O.status) || [];
|
|
8620
8620
|
return E.some((_) => o == null ? void 0 : o.includes(_)) || A.some((_) => o == null ? void 0 : o.includes(_));
|
|
8621
|
-
}, [l, o]),
|
|
8621
|
+
}, [l, o]), k = R(async () => {
|
|
8622
8622
|
var A, I;
|
|
8623
8623
|
if (!(o != null && o.length) || !g)
|
|
8624
8624
|
return;
|
|
@@ -8681,7 +8681,7 @@ const Ms = () => {
|
|
|
8681
8681
|
]);
|
|
8682
8682
|
fe(() => () => {
|
|
8683
8683
|
y(), C();
|
|
8684
|
-
}, []), je(() => ((o == null ? void 0 : o.length) && g && (
|
|
8684
|
+
}, []), je(() => ((o == null ? void 0 : o.length) && g && (k(), m.current = setInterval(k, Wg)), () => {
|
|
8685
8685
|
m.current && (clearInterval(m.current), m.current = null);
|
|
8686
8686
|
}), [
|
|
8687
8687
|
o,
|
|
@@ -8693,16 +8693,16 @@ const Ms = () => {
|
|
|
8693
8693
|
]);
|
|
8694
8694
|
const F = R(() => {
|
|
8695
8695
|
h(!1), m.current && (clearInterval(m.current), m.current = null), y(), C();
|
|
8696
|
-
}, [y, C]),
|
|
8696
|
+
}, [y, C]), D = R(() => {
|
|
8697
8697
|
h(!0);
|
|
8698
8698
|
}, []);
|
|
8699
8699
|
fe(() => () => {
|
|
8700
8700
|
x.current = {};
|
|
8701
8701
|
}, []);
|
|
8702
|
-
const
|
|
8702
|
+
const M = R(() => {
|
|
8703
8703
|
x.current = {};
|
|
8704
8704
|
}, []);
|
|
8705
|
-
return { pause: F, resume:
|
|
8705
|
+
return { pause: F, resume: D, clear: M };
|
|
8706
8706
|
}, ks = ({
|
|
8707
8707
|
model: t,
|
|
8708
8708
|
treeView: e,
|
|
@@ -8873,10 +8873,10 @@ function Jg(t, e) {
|
|
|
8873
8873
|
filterType: p = "side",
|
|
8874
8874
|
onChangeTreeType: m,
|
|
8875
8875
|
hideHeaders: g = !1
|
|
8876
|
-
} = t, h = K(null), v = K([]), y = K(!1), { showErrorNotification: b } = wt(), { setCurrentSavedSearch: C } = Yt(), [w, x] = S(), [P, T] = S(!1),
|
|
8877
|
-
elementRef:
|
|
8876
|
+
} = t, h = K(null), v = K([]), y = K(!1), { showErrorNotification: b } = wt(), { setCurrentSavedSearch: C } = Yt(), [w, x] = S(), [P, T] = S(!1), k = K(null), F = pl({
|
|
8877
|
+
elementRef: k,
|
|
8878
8878
|
offset: zg
|
|
8879
|
-
}), [
|
|
8879
|
+
}), [D, M] = Me(
|
|
8880
8880
|
H.getHandler().searchCount
|
|
8881
8881
|
), [E, A] = Me(
|
|
8882
8882
|
H.getHandler().searchForTree
|
|
@@ -8884,7 +8884,7 @@ function Jg(t, e) {
|
|
|
8884
8884
|
H.getHandler().searchAllIds
|
|
8885
8885
|
);
|
|
8886
8886
|
fe(() => () => {
|
|
8887
|
-
|
|
8887
|
+
M(), A(), O();
|
|
8888
8888
|
}, []);
|
|
8889
8889
|
const { treeView: _, formView: $, loading: G } = ws({
|
|
8890
8890
|
model: n,
|
|
@@ -8983,7 +8983,7 @@ function Jg(t, e) {
|
|
|
8983
8983
|
if (!oe && !Ae.current) {
|
|
8984
8984
|
Ae.current = !0, x(void 0), Y(0);
|
|
8985
8985
|
try {
|
|
8986
|
-
const Be = await
|
|
8986
|
+
const Be = await D({
|
|
8987
8987
|
params: oe ? a : ot,
|
|
8988
8988
|
model: n,
|
|
8989
8989
|
context: d,
|
|
@@ -9002,7 +9002,7 @@ function Jg(t, e) {
|
|
|
9002
9002
|
n,
|
|
9003
9003
|
oe,
|
|
9004
9004
|
d,
|
|
9005
|
-
|
|
9005
|
+
D,
|
|
9006
9006
|
Y,
|
|
9007
9007
|
b
|
|
9008
9008
|
]), yt = lt(
|
|
@@ -9338,7 +9338,7 @@ function Jg(t, e) {
|
|
|
9338
9338
|
)
|
|
9339
9339
|
}
|
|
9340
9340
|
),
|
|
9341
|
-
/* @__PURE__ */ s("div", { ref:
|
|
9341
|
+
/* @__PURE__ */ s("div", { ref: k, style: tr, children: G || Ne ? /* @__PURE__ */ s(st, {}) : dn })
|
|
9342
9342
|
] });
|
|
9343
9343
|
}
|
|
9344
9344
|
const Ps = Ht(Jg), Yi = (t, e = "14px -apple-system") => {
|
|
@@ -9427,7 +9427,7 @@ const Ps = Ht(Jg), Yi = (t, e = "14px -apple-system") => {
|
|
|
9427
9427
|
context: x,
|
|
9428
9428
|
readonly: P,
|
|
9429
9429
|
onSelectAllRecords: T
|
|
9430
|
-
} = t,
|
|
9430
|
+
} = t, k = K(null), [F, D] = S([]), M = K(!1), [E, A] = S(), { t: I } = Te(), O = K(r), _ = ge(
|
|
9431
9431
|
Dt
|
|
9432
9432
|
), { title: $ = void 0, setTitle: G = void 0 } = (w ? _ : {}) || {}, V = qt(
|
|
9433
9433
|
Tt.FEATURE_MANY2ONE_SORT
|
|
@@ -9445,7 +9445,7 @@ const Ps = Ht(Jg), Yi = (t, e = "14px -apple-system") => {
|
|
|
9445
9445
|
Gt(e, () => ({
|
|
9446
9446
|
unselectAll: () => {
|
|
9447
9447
|
var W;
|
|
9448
|
-
(W =
|
|
9448
|
+
(W = k.current) == null || W.unselectAll();
|
|
9449
9449
|
}
|
|
9450
9450
|
})), fe(() => {
|
|
9451
9451
|
const W = en(i);
|
|
@@ -9453,9 +9453,9 @@ const Ps = Ht(Jg), Yi = (t, e = "14px -apple-system") => {
|
|
|
9453
9453
|
}, [i, $]), je(() => {
|
|
9454
9454
|
if (!E)
|
|
9455
9455
|
return;
|
|
9456
|
-
|
|
9456
|
+
M.current = !1, (async () => {
|
|
9457
9457
|
const te = await tn(E, a, x);
|
|
9458
|
-
|
|
9458
|
+
D(te);
|
|
9459
9459
|
})();
|
|
9460
9460
|
}, [a, E, x]), fe(() => {
|
|
9461
9461
|
O.current = r;
|
|
@@ -9520,7 +9520,7 @@ const Ps = Ht(Jg), Yi = (t, e = "14px -apple-system") => {
|
|
|
9520
9520
|
/* @__PURE__ */ s(
|
|
9521
9521
|
jd,
|
|
9522
9522
|
{
|
|
9523
|
-
ref:
|
|
9523
|
+
ref: k,
|
|
9524
9524
|
height: Q,
|
|
9525
9525
|
columns: X.columns,
|
|
9526
9526
|
dataSource: F,
|
|
@@ -9579,8 +9579,8 @@ const sc = (t) => {
|
|
|
9579
9579
|
setLimit: x,
|
|
9580
9580
|
searchParams: P = [],
|
|
9581
9581
|
setSearchValues: T,
|
|
9582
|
-
clearSelection:
|
|
9583
|
-
} = t, [F,
|
|
9582
|
+
clearSelection: k
|
|
9583
|
+
} = t, [F, D] = S(!1), [M, E] = S(!1), [A, I] = S(), [O, _] = S(1), [$, G] = S(0), [V, N] = S(), [B, q] = S([]), [z, U] = S(void 0), [J, X] = S(void 0), Q = K(w || At), le = K([]), W = R(
|
|
9584
9584
|
(ue) => {
|
|
9585
9585
|
v == null || v([...ue]), q([...ue]);
|
|
9586
9586
|
},
|
|
@@ -9613,7 +9613,7 @@ const sc = (t) => {
|
|
|
9613
9613
|
W(Oe), ze.length > 0 ? h == null || h(0) : h == null || h(void 0);
|
|
9614
9614
|
} else
|
|
9615
9615
|
W([]), h == null || h(void 0);
|
|
9616
|
-
|
|
9616
|
+
D(!1), l.current = !0;
|
|
9617
9617
|
}, [
|
|
9618
9618
|
W,
|
|
9619
9619
|
l,
|
|
@@ -9652,7 +9652,7 @@ const sc = (t) => {
|
|
|
9652
9652
|
$e === -1 ? h == null || h(0) : h == null || h($e);
|
|
9653
9653
|
} else
|
|
9654
9654
|
h == null || h(void 0);
|
|
9655
|
-
|
|
9655
|
+
D(!1);
|
|
9656
9656
|
const Qe = await ze();
|
|
9657
9657
|
N(Qe), f == null || f(Qe);
|
|
9658
9658
|
},
|
|
@@ -9674,15 +9674,15 @@ const sc = (t) => {
|
|
|
9674
9674
|
), re = R(
|
|
9675
9675
|
async (ue) => {
|
|
9676
9676
|
try {
|
|
9677
|
-
|
|
9677
|
+
D(!0), a == null || a(!0), c && !l.current ? await pe() : await j(ue), k == null || k();
|
|
9678
9678
|
} catch (he) {
|
|
9679
|
-
I(typeof he == "string" ? he : he.message),
|
|
9679
|
+
I(typeof he == "string" ? he : he.message), D(!1);
|
|
9680
9680
|
} finally {
|
|
9681
9681
|
r == null || r([]), E(!1), a == null || a(!1);
|
|
9682
9682
|
}
|
|
9683
9683
|
},
|
|
9684
9684
|
[
|
|
9685
|
-
|
|
9685
|
+
k,
|
|
9686
9686
|
c,
|
|
9687
9687
|
pe,
|
|
9688
9688
|
l,
|
|
@@ -9730,9 +9730,9 @@ const sc = (t) => {
|
|
|
9730
9730
|
]
|
|
9731
9731
|
), de = R(
|
|
9732
9732
|
(ue) => {
|
|
9733
|
-
|
|
9733
|
+
D(!0), _(ue), G((ue - 1) * w);
|
|
9734
9734
|
},
|
|
9735
|
-
[
|
|
9735
|
+
[D, w, G, _]
|
|
9736
9736
|
), me = R(() => {
|
|
9737
9737
|
F || (n == null || n(void 0), o == null || o([]), T == null || T({}), I(void 0), G(0), _(1), x == null || x(w || At));
|
|
9738
9738
|
}, [
|
|
@@ -9764,7 +9764,7 @@ const sc = (t) => {
|
|
|
9764
9764
|
clear: me,
|
|
9765
9765
|
fetchResults: re,
|
|
9766
9766
|
tableRefreshing: F,
|
|
9767
|
-
searchFilterLoading:
|
|
9767
|
+
searchFilterLoading: M,
|
|
9768
9768
|
searchError: A,
|
|
9769
9769
|
page: O,
|
|
9770
9770
|
offset: $,
|
|
@@ -9793,7 +9793,7 @@ function ey(t, e) {
|
|
|
9793
9793
|
rootTree: f = !1,
|
|
9794
9794
|
parentContext: u = {},
|
|
9795
9795
|
onChangeSelectedRowKeys: p
|
|
9796
|
-
} = t, [m, g] = S(!1), [h, v] = S(!1), y = K(!1), b = K(null), [C, w] = S(), [x, P] = S(), [T,
|
|
9796
|
+
} = t, [m, g] = S(!1), [h, v] = S(!1), y = K(!1), b = K(null), [C, w] = S(), [x, P] = S(), [T, k] = S(), [F, D] = S(), [M, E] = S(200), A = K(), { height: I } = Zr(), O = ge(
|
|
9797
9797
|
Fn
|
|
9798
9798
|
), { processAction: _ } = O || {}, $ = ge(
|
|
9799
9799
|
Dt
|
|
@@ -9875,7 +9875,7 @@ function ey(t, e) {
|
|
|
9875
9875
|
h && d && x && (y.current = !1, he());
|
|
9876
9876
|
}, [ye, ze, h, d, a, x]);
|
|
9877
9877
|
const Fe = async () => {
|
|
9878
|
-
v(!1), g(!0),
|
|
9878
|
+
v(!1), g(!0), D(void 0), j == null || j(!0);
|
|
9879
9879
|
try {
|
|
9880
9880
|
await Ve(), v(!0);
|
|
9881
9881
|
} catch (Le) {
|
|
@@ -9896,7 +9896,7 @@ function ey(t, e) {
|
|
|
9896
9896
|
model: n,
|
|
9897
9897
|
type: "tree",
|
|
9898
9898
|
context: u
|
|
9899
|
-
})),
|
|
9899
|
+
})), k(Le), P(yt);
|
|
9900
9900
|
};
|
|
9901
9901
|
fe(() => {
|
|
9902
9902
|
Fe();
|
|
@@ -9955,7 +9955,7 @@ function ey(t, e) {
|
|
|
9955
9955
|
), Ce = R(async () => {
|
|
9956
9956
|
const Le = await Ne();
|
|
9957
9957
|
z == null || z(Le.map((yt) => ({ id: yt }))), p == null || p(Le);
|
|
9958
|
-
}, [Ne, p, z]), ce = ee(() => x != null && x.isExpandable ? I - 160 : I - (
|
|
9958
|
+
}, [Ne, p, z]), ce = ee(() => x != null && x.isExpandable ? I - 160 : I - (M + 240), [I, M, x == null ? void 0 : x.isExpandable]), _e = ee(
|
|
9959
9959
|
() => q == null ? void 0 : q.map((Le) => Le.id),
|
|
9960
9960
|
[q]
|
|
9961
9961
|
), et = R(() => !x || !T ? null : /* @__PURE__ */ L(we, { children: [
|
|
@@ -10065,10 +10065,10 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10065
10065
|
setTreeFirstVisibleRow: x,
|
|
10066
10066
|
treeFirstVisibleRow: P,
|
|
10067
10067
|
treeFirstVisibleColumn: T,
|
|
10068
|
-
setTreeFirstVisibleColumn:
|
|
10068
|
+
setTreeFirstVisibleColumn: k,
|
|
10069
10069
|
selectedRowItems: F,
|
|
10070
|
-
setSearchParams:
|
|
10071
|
-
searchValues:
|
|
10070
|
+
setSearchParams: D,
|
|
10071
|
+
searchValues: M,
|
|
10072
10072
|
searchParams: E,
|
|
10073
10073
|
setSearchValues: A,
|
|
10074
10074
|
searchTreeNameSearch: I,
|
|
@@ -10158,23 +10158,23 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10158
10158
|
[]
|
|
10159
10159
|
), nn = R(() => {
|
|
10160
10160
|
var Se;
|
|
10161
|
-
w([]), (Se = c.current) == null || Se.unselectAll(), O == null || O(void 0),
|
|
10161
|
+
w([]), (Se = c.current) == null || Se.unselectAll(), O == null || O(void 0), D == null || D([]), A == null || A(void 0);
|
|
10162
10162
|
}, [
|
|
10163
10163
|
w,
|
|
10164
10164
|
c,
|
|
10165
10165
|
O,
|
|
10166
|
-
|
|
10166
|
+
D,
|
|
10167
10167
|
A
|
|
10168
10168
|
]), Rt = R(
|
|
10169
10169
|
({ params: Se, searchValues: Ue }) => {
|
|
10170
10170
|
var tt;
|
|
10171
|
-
w([]), (tt = c.current) == null || tt.unselectAll(), O == null || O(void 0),
|
|
10171
|
+
w([]), (tt = c.current) == null || tt.unselectAll(), O == null || O(void 0), D == null || D(Se), A == null || A(Ue);
|
|
10172
10172
|
},
|
|
10173
10173
|
[
|
|
10174
10174
|
w,
|
|
10175
10175
|
c,
|
|
10176
10176
|
O,
|
|
10177
|
-
|
|
10177
|
+
D,
|
|
10178
10178
|
A
|
|
10179
10179
|
]
|
|
10180
10180
|
), Rn = R(
|
|
@@ -10268,13 +10268,13 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10268
10268
|
]), vt = R(
|
|
10269
10269
|
({ params: Se, values: Ue, closeSidebar: tt = !0 }) => {
|
|
10270
10270
|
var it;
|
|
10271
|
-
w([]), (it = c.current) == null || it.unselectAll(), O == null || O(void 0),
|
|
10271
|
+
w([]), (it = c.current) == null || it.unselectAll(), O == null || O(void 0), D == null || D(Se), A == null || A(Ue), C == null || C(!tt), tt || ft(), (!Se || Se.length === 0) && (le == null || le(null));
|
|
10272
10272
|
},
|
|
10273
10273
|
[
|
|
10274
10274
|
w,
|
|
10275
10275
|
c,
|
|
10276
10276
|
O,
|
|
10277
|
-
|
|
10277
|
+
D,
|
|
10278
10278
|
A,
|
|
10279
10279
|
C,
|
|
10280
10280
|
le,
|
|
@@ -10302,7 +10302,7 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10302
10302
|
var Se;
|
|
10303
10303
|
if (se !== oe.current) {
|
|
10304
10304
|
if (se !== void 0 && oe.current === void 0 || typeof se == "string" && typeof oe.current == "string" && se !== oe.current) {
|
|
10305
|
-
|
|
10305
|
+
D == null || D([]), A == null || A({}), (Se = c.current) == null || Se.unselectAll(), oe.current = se;
|
|
10306
10306
|
return;
|
|
10307
10307
|
}
|
|
10308
10308
|
se === void 0 && oe.current !== void 0 && pe(!0), oe.current = se;
|
|
@@ -10320,14 +10320,14 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10320
10320
|
u == null || u("infinite");
|
|
10321
10321
|
return;
|
|
10322
10322
|
}
|
|
10323
|
-
x(0),
|
|
10323
|
+
x(0), k(void 0), w([]), q(Se), Ue && X(Ue);
|
|
10324
10324
|
},
|
|
10325
10325
|
[
|
|
10326
10326
|
u,
|
|
10327
10327
|
q,
|
|
10328
10328
|
X,
|
|
10329
10329
|
w,
|
|
10330
|
-
|
|
10330
|
+
k,
|
|
10331
10331
|
x
|
|
10332
10332
|
]
|
|
10333
10333
|
), hn = R(async () => await ve({
|
|
@@ -10343,12 +10343,12 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10343
10343
|
dn === "unchecked" ? ((Se = c.current) == null || Se.selectAll(), w(ie.map((tt) => ({ id: tt.id })))) : (w([]), (Ue = c.current) == null || Ue.unselectAll());
|
|
10344
10344
|
}, [c, w, ie, dn]), Ut = R(
|
|
10345
10345
|
(Se) => {
|
|
10346
|
-
U(Se), x(0),
|
|
10346
|
+
U(Se), x(0), k(void 0), q(1);
|
|
10347
10347
|
},
|
|
10348
10348
|
[
|
|
10349
10349
|
U,
|
|
10350
10350
|
q,
|
|
10351
|
-
|
|
10351
|
+
k,
|
|
10352
10352
|
x
|
|
10353
10353
|
]
|
|
10354
10354
|
), rn = R(
|
|
@@ -10407,7 +10407,7 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10407
10407
|
return {
|
|
10408
10408
|
isActive: N,
|
|
10409
10409
|
searchVisible: b,
|
|
10410
|
-
searchValues:
|
|
10410
|
+
searchValues: M,
|
|
10411
10411
|
selectedRowKeys: ce,
|
|
10412
10412
|
refresh: ft,
|
|
10413
10413
|
onRowStatus: yt,
|
|
@@ -10431,7 +10431,7 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10431
10431
|
limit: W,
|
|
10432
10432
|
order: z,
|
|
10433
10433
|
setOrder: U,
|
|
10434
|
-
setTreeFirstVisibleColumn:
|
|
10434
|
+
setTreeFirstVisibleColumn: k,
|
|
10435
10435
|
onGetFirstVisibleColumn: Nt,
|
|
10436
10436
|
onSortChange: Ut,
|
|
10437
10437
|
isFieldLoading: Ke,
|
|
@@ -10538,9 +10538,9 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10538
10538
|
actionViewSortState: x,
|
|
10539
10539
|
onSortChange: P,
|
|
10540
10540
|
tableRef: T,
|
|
10541
|
-
onChangeTreeType:
|
|
10541
|
+
onChangeTreeType: k,
|
|
10542
10542
|
onFetchChildrenForRecord: F,
|
|
10543
|
-
childField:
|
|
10543
|
+
childField: D
|
|
10544
10544
|
}) => !t || !e ? null : /* @__PURE__ */ s(
|
|
10545
10545
|
Ud,
|
|
10546
10546
|
{
|
|
@@ -10568,13 +10568,13 @@ const ic = Ht(ey), ty = At, ny = (t) => {
|
|
|
10568
10568
|
onForceReload: w,
|
|
10569
10569
|
initialSortState: x,
|
|
10570
10570
|
onSortChange: P,
|
|
10571
|
-
onChangeTableType:
|
|
10571
|
+
onChangeTableType: k,
|
|
10572
10572
|
expandableOpts: F ? {
|
|
10573
10573
|
expandIcon: va,
|
|
10574
10574
|
collapseIcon: ba,
|
|
10575
10575
|
loadingIcon: Kt,
|
|
10576
10576
|
onFetchChildrenForRecord: F,
|
|
10577
|
-
childField:
|
|
10577
|
+
childField: D
|
|
10578
10578
|
} : void 0
|
|
10579
10579
|
}
|
|
10580
10580
|
)
|
|
@@ -10661,10 +10661,10 @@ function ly(t, e) {
|
|
|
10661
10661
|
return en(b);
|
|
10662
10662
|
}, [b]), {
|
|
10663
10663
|
columns: T,
|
|
10664
|
-
strings:
|
|
10664
|
+
strings: k,
|
|
10665
10665
|
getColumnState: F,
|
|
10666
|
-
updateColumnState:
|
|
10667
|
-
isColumnStateLoading:
|
|
10666
|
+
updateColumnState: D,
|
|
10667
|
+
isColumnStateLoading: M,
|
|
10668
10668
|
updateAttributes: E,
|
|
10669
10669
|
clearAttributes: A,
|
|
10670
10670
|
colorsForResults: I,
|
|
@@ -10815,13 +10815,13 @@ function ly(t, e) {
|
|
|
10815
10815
|
{
|
|
10816
10816
|
columns: Ke,
|
|
10817
10817
|
treeOoui: P,
|
|
10818
|
-
strings:
|
|
10819
|
-
isLoading: ie ||
|
|
10818
|
+
strings: k,
|
|
10819
|
+
isLoading: ie || M,
|
|
10820
10820
|
availableHeight: x,
|
|
10821
10821
|
results: j,
|
|
10822
10822
|
handleRowDoubleClick: Qe,
|
|
10823
10823
|
onRowHasBeenSelected: U,
|
|
10824
|
-
updateColumnState:
|
|
10824
|
+
updateColumnState: D,
|
|
10825
10825
|
getColumnState: F,
|
|
10826
10826
|
setTreeFirstVisibleRow: z,
|
|
10827
10827
|
onGetFirstVisibleRowIndex: q,
|
|
@@ -10873,10 +10873,10 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
10873
10873
|
currentView: x,
|
|
10874
10874
|
setPreviousView: P,
|
|
10875
10875
|
setTreeType: T,
|
|
10876
|
-
setSelectedRowItems:
|
|
10876
|
+
setSelectedRowItems: k,
|
|
10877
10877
|
currentSavedSearch: F,
|
|
10878
|
-
setCurrentSavedSearch:
|
|
10879
|
-
setSavedSearches:
|
|
10878
|
+
setCurrentSavedSearch: D,
|
|
10879
|
+
setSavedSearches: M,
|
|
10880
10880
|
savedSearches: E,
|
|
10881
10881
|
setSearchVisible: A,
|
|
10882
10882
|
setSearchParams: I,
|
|
@@ -10891,7 +10891,7 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
10891
10891
|
H.getHandler().readEvalUiObjects
|
|
10892
10892
|
), z = R(async () => {
|
|
10893
10893
|
if (!N || !r)
|
|
10894
|
-
return
|
|
10894
|
+
return M == null || M([]), D == null || D(null), [];
|
|
10895
10895
|
try {
|
|
10896
10896
|
const te = await B({
|
|
10897
10897
|
params: [
|
|
@@ -10903,16 +10903,16 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
10903
10903
|
context: o
|
|
10904
10904
|
});
|
|
10905
10905
|
if (te.length === 0)
|
|
10906
|
-
return
|
|
10906
|
+
return M == null || M([]), D == null || D(null), [];
|
|
10907
10907
|
const [pe] = await q({
|
|
10908
10908
|
model: "ir.search",
|
|
10909
10909
|
ids: te,
|
|
10910
10910
|
fieldsToRetrieve: ["id", "model", "domain", "name", "last_run"],
|
|
10911
10911
|
context: o
|
|
10912
10912
|
});
|
|
10913
|
-
return
|
|
10913
|
+
return M == null || M(pe), pe || [];
|
|
10914
10914
|
} catch (te) {
|
|
10915
|
-
return console.error("Error fetching saved searches:", te),
|
|
10915
|
+
return console.error("Error fetching saved searches:", te), M == null || M([]), D == null || D(null), [];
|
|
10916
10916
|
}
|
|
10917
10917
|
}, [
|
|
10918
10918
|
N,
|
|
@@ -10921,8 +10921,8 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
10921
10921
|
C,
|
|
10922
10922
|
B,
|
|
10923
10923
|
q,
|
|
10924
|
-
|
|
10925
|
-
|
|
10924
|
+
M,
|
|
10925
|
+
D
|
|
10926
10926
|
]);
|
|
10927
10927
|
fe(() => {
|
|
10928
10928
|
T == null || T(v);
|
|
@@ -10937,14 +10937,14 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
10937
10937
|
const te = E.find(
|
|
10938
10938
|
(pe) => Zn(pe.domain, _)
|
|
10939
10939
|
);
|
|
10940
|
-
te && (
|
|
10940
|
+
te && (D == null || D(te));
|
|
10941
10941
|
}
|
|
10942
10942
|
}, [
|
|
10943
10943
|
N,
|
|
10944
10944
|
E,
|
|
10945
10945
|
_,
|
|
10946
10946
|
F,
|
|
10947
|
-
|
|
10947
|
+
D
|
|
10948
10948
|
]);
|
|
10949
10949
|
const J = R(
|
|
10950
10950
|
(te) => {
|
|
@@ -10968,7 +10968,7 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
10968
10968
|
]
|
|
10969
10969
|
);
|
|
10970
10970
|
fe(() => {
|
|
10971
|
-
h.current && !e && v === "infinite" && (
|
|
10971
|
+
h.current && !e && v === "infinite" && (k == null || k([])), h.current = e;
|
|
10972
10972
|
}, [e, v]);
|
|
10973
10973
|
const X = R(
|
|
10974
10974
|
(te) => {
|
|
@@ -10976,11 +10976,11 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
10976
10976
|
},
|
|
10977
10977
|
[g, w]
|
|
10978
10978
|
), Q = R(() => {
|
|
10979
|
-
|
|
10979
|
+
D == null || D(null), I == null || I([]), O == null || O({}), setTimeout(() => {
|
|
10980
10980
|
var te;
|
|
10981
10981
|
(te = n == null ? void 0 : n.current) == null || te.refreshResults();
|
|
10982
10982
|
}, 100);
|
|
10983
|
-
}, [
|
|
10983
|
+
}, [D, I, O, n]), le = R(() => {
|
|
10984
10984
|
A == null || A(!0);
|
|
10985
10985
|
}, [A]), W = ee(() => F != null && F.name ? /* @__PURE__ */ L(
|
|
10986
10986
|
"div",
|
|
@@ -11148,19 +11148,19 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
11148
11148
|
selectedRowItems: x,
|
|
11149
11149
|
searchTreeNameSearch: P,
|
|
11150
11150
|
setSearchTreeNameSearch: T,
|
|
11151
|
-
goToResourceId:
|
|
11151
|
+
goToResourceId: k,
|
|
11152
11152
|
limit: F,
|
|
11153
|
-
isActive:
|
|
11154
|
-
initialSearchParams:
|
|
11153
|
+
isActive: D,
|
|
11154
|
+
initialSearchParams: M,
|
|
11155
11155
|
initialCurrentPage: E,
|
|
11156
11156
|
initialOrder: A,
|
|
11157
11157
|
permissions: I,
|
|
11158
11158
|
permissionsLoading: O,
|
|
11159
11159
|
permissionsError: _
|
|
11160
11160
|
} = t, [$, G] = S(!1), [V, N] = S(!1), [B, q] = S(!1), [z, U] = S(!0), [J, X] = S(!0), [Q, le] = S([]), [W, te] = S(!1), [pe, j] = S(
|
|
11161
|
-
|
|
11161
|
+
M || []
|
|
11162
11162
|
), [re, ie] = S(!1), [Y, de] = S(!0), [me, se] = S(), oe = ee(() => !i || i.length === 0 ? (n == null ? void 0 : n.fields) || {} : i.reduce((_e, et) => ({ ..._e, ...et.fields || {} }), {}), [i, n]), [ue, he] = S(
|
|
11163
|
-
ol(
|
|
11163
|
+
ol(M || [], oe)
|
|
11164
11164
|
), [Re, De] = S(0), [Ae, ye] = S(void 0), [Pe, ze] = S(), [Oe, Ke] = S(xn), [Ie, Qe] = S(
|
|
11165
11165
|
A
|
|
11166
11166
|
), [$e, Je] = S(
|
|
@@ -11238,13 +11238,13 @@ const ac = Ht(ly), { useToken: cy } = rt, xn = "legacy", dy = (t) => {
|
|
|
11238
11238
|
graphIsLoading: Y,
|
|
11239
11239
|
previousView: me,
|
|
11240
11240
|
setPreviousView: se,
|
|
11241
|
-
goToResourceId:
|
|
11241
|
+
goToResourceId: k,
|
|
11242
11242
|
searchValues: ue,
|
|
11243
11243
|
setSearchValues: he,
|
|
11244
11244
|
limit: $e,
|
|
11245
11245
|
setLimit: Je,
|
|
11246
11246
|
setTitle: Ne,
|
|
11247
|
-
isActive:
|
|
11247
|
+
isActive: D,
|
|
11248
11248
|
setTreeFirstVisibleRow: De,
|
|
11249
11249
|
treeFirstVisibleRow: Re,
|
|
11250
11250
|
treeFirstVisibleColumn: Ae,
|
|
@@ -11640,10 +11640,10 @@ function yy(t) {
|
|
|
11640
11640
|
visible: a = !0,
|
|
11641
11641
|
parentContext: c = {},
|
|
11642
11642
|
treeExpandable: l
|
|
11643
|
-
} = t, [d, f] = S(!1), [u, p] = S(!1), [m, g] = S(), [h, v] = S(), [y, b] = S(), [C, w] = S(1), [x, P] = S(0), T = K(At),
|
|
11643
|
+
} = t, [d, f] = S(!1), [u, p] = S(!1), [m, g] = S(), [h, v] = S(), [y, b] = S(), [C, w] = S(1), [x, P] = S(0), T = K(At), k = K([]), [F, D] = S(0), [M, E] = S([]), [A, I] = S(void 0), [O, _] = S(), [$, G] = S(), [V, N] = S(), [B, q] = S(!1), [z, U] = S(xn), J = K([]), { treeMaxLimit: X } = Jt(), Q = (de) => {
|
|
11644
11644
|
q(!0), w(de), P((de - 1) * T.current);
|
|
11645
11645
|
}, le = async () => {
|
|
11646
|
-
const de = J.current.length > 0 ? J.current : i, me = an(
|
|
11646
|
+
const de = J.current.length > 0 ? J.current : i, me = an(k.current, de), { colors: se } = en(h), { totalItems: oe, results: ue, attrsEvaluated: he } = await H.getHandler().searchForTree({
|
|
11647
11647
|
params: me,
|
|
11648
11648
|
limit: T.current,
|
|
11649
11649
|
offset: x,
|
|
@@ -11660,7 +11660,7 @@ function yy(t) {
|
|
|
11660
11660
|
});
|
|
11661
11661
|
q(!1), E(Re);
|
|
11662
11662
|
const De = await oe();
|
|
11663
|
-
|
|
11663
|
+
D(De);
|
|
11664
11664
|
}, W = async () => {
|
|
11665
11665
|
try {
|
|
11666
11666
|
q(!0), await le();
|
|
@@ -11763,7 +11763,7 @@ function yy(t) {
|
|
|
11763
11763
|
limit: T.current,
|
|
11764
11764
|
page: C,
|
|
11765
11765
|
treeView: h,
|
|
11766
|
-
results:
|
|
11766
|
+
results: M,
|
|
11767
11767
|
onRequestPageChange: Q,
|
|
11768
11768
|
loading: B,
|
|
11769
11769
|
onRowClicked: ie,
|
|
@@ -11772,7 +11772,7 @@ function yy(t) {
|
|
|
11772
11772
|
onChangeSort: (de) => {
|
|
11773
11773
|
_ == null || _(de);
|
|
11774
11774
|
const me = Vn({
|
|
11775
|
-
resultsToSort:
|
|
11775
|
+
resultsToSort: M,
|
|
11776
11776
|
sorter: de,
|
|
11777
11777
|
fields: { ...h.fields, ...y.fields }
|
|
11778
11778
|
});
|
|
@@ -11961,7 +11961,7 @@ const dc = at(yy), { useToken: vy } = rt, by = (t) => {
|
|
|
11961
11961
|
const { ooui: e } = t;
|
|
11962
11962
|
return /* @__PURE__ */ s(Ye, { type: "array", ...t, children: /* @__PURE__ */ s(Fy, { ooui: e }) });
|
|
11963
11963
|
}, Fy = (t) => {
|
|
11964
|
-
const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((
|
|
11964
|
+
const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((D) => D.operation !== "pendingRemove").map((D) => D.id), [a, c] = S([]), [l, d] = S(), [f, u] = S(!1), { relation: p, context: m, readOnly: g, field: h } = n, v = ge(nt), { getContext: y } = v || {}, [b, C] = Me(
|
|
11965
11965
|
H.getHandler().evalDomain
|
|
11966
11966
|
), [w, x] = Me(
|
|
11967
11967
|
H.getHandler().search
|
|
@@ -11971,16 +11971,16 @@ const dc = at(yy), { useToken: vy } = rt, by = (t) => {
|
|
|
11971
11971
|
}, []), je(() => {
|
|
11972
11972
|
T();
|
|
11973
11973
|
}, [o]);
|
|
11974
|
-
const P = (
|
|
11974
|
+
const P = (D) => {
|
|
11975
11975
|
r == null || r({
|
|
11976
|
-
items:
|
|
11976
|
+
items: D
|
|
11977
11977
|
});
|
|
11978
11978
|
};
|
|
11979
11979
|
async function T() {
|
|
11980
11980
|
u(!0);
|
|
11981
|
-
let
|
|
11981
|
+
let D = [];
|
|
11982
11982
|
try {
|
|
11983
|
-
if (g && (
|
|
11983
|
+
if (g && (D = [["id", "in", i]]), n.domain) {
|
|
11984
11984
|
const A = await b({
|
|
11985
11985
|
domain: n.domain,
|
|
11986
11986
|
values: Sn({
|
|
@@ -11990,11 +11990,11 @@ const dc = at(yy), { useToken: vy } = rt, by = (t) => {
|
|
|
11990
11990
|
fields: v == null ? void 0 : v.getFields(),
|
|
11991
11991
|
context: v.getContext()
|
|
11992
11992
|
});
|
|
11993
|
-
|
|
11993
|
+
D = [...D, ...A];
|
|
11994
11994
|
}
|
|
11995
11995
|
const E = (await w({
|
|
11996
11996
|
model: p,
|
|
11997
|
-
params:
|
|
11997
|
+
params: D,
|
|
11998
11998
|
fieldsToRetrieve: [h],
|
|
11999
11999
|
context: { ...y == null ? void 0 : y(), ...m }
|
|
12000
12000
|
})).map((A) => {
|
|
@@ -12003,24 +12003,24 @@ const dc = at(yy), { useToken: vy } = rt, by = (t) => {
|
|
|
12003
12003
|
return Array.isArray(I) && (O = I[1]), { label: O, value: A.id };
|
|
12004
12004
|
});
|
|
12005
12005
|
c(E);
|
|
12006
|
-
} catch (
|
|
12007
|
-
d(
|
|
12006
|
+
} catch (M) {
|
|
12007
|
+
d(M);
|
|
12008
12008
|
} finally {
|
|
12009
12009
|
u(!1);
|
|
12010
12010
|
}
|
|
12011
12011
|
}
|
|
12012
|
-
const
|
|
12013
|
-
const
|
|
12012
|
+
const k = (D) => {
|
|
12013
|
+
const M = o.map((A) => D.includes(A.id) ? A.operation === "pendingRemove" ? {
|
|
12014
12014
|
...A,
|
|
12015
12015
|
operation: "pendingLink"
|
|
12016
|
-
} : A : { id: A.id, operation: "pendingRemove" }), E =
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
}), P(
|
|
12020
|
-
}, F = (
|
|
12021
|
-
const { label:
|
|
12016
|
+
} : A : { id: A.id, operation: "pendingRemove" }), E = M.map((A) => A.id);
|
|
12017
|
+
D.filter((A) => !E.includes(A)).forEach((A) => {
|
|
12018
|
+
M.push({ id: A, operation: "pendingLink" });
|
|
12019
|
+
}), P(M);
|
|
12020
|
+
}, F = (D) => {
|
|
12021
|
+
const { label: M, closable: E, onClose: A } = D, I = ($) => {
|
|
12022
12022
|
$.preventDefault(), $.stopPropagation();
|
|
12023
|
-
}, O = gr(
|
|
12023
|
+
}, O = gr(M), _ = O && za(O);
|
|
12024
12024
|
return /* @__PURE__ */ s(
|
|
12025
12025
|
xs,
|
|
12026
12026
|
{
|
|
@@ -12029,7 +12029,7 @@ const dc = at(yy), { useToken: vy } = rt, by = (t) => {
|
|
|
12029
12029
|
closable: E,
|
|
12030
12030
|
onClose: A,
|
|
12031
12031
|
closeIcon: /* @__PURE__ */ s("span", { style: { color: _ && _.text }, children: "X" }),
|
|
12032
|
-
children:
|
|
12032
|
+
children: M
|
|
12033
12033
|
}
|
|
12034
12034
|
);
|
|
12035
12035
|
};
|
|
@@ -12042,9 +12042,9 @@ const dc = at(yy), { useToken: vy } = rt, by = (t) => {
|
|
|
12042
12042
|
bordered: !g,
|
|
12043
12043
|
disabled: g,
|
|
12044
12044
|
options: a,
|
|
12045
|
-
onChange:
|
|
12045
|
+
onChange: k,
|
|
12046
12046
|
loading: f,
|
|
12047
|
-
filterOption: (
|
|
12047
|
+
filterOption: (D, M) => M.label.toLowerCase().includes(D.toString().toLowerCase())
|
|
12048
12048
|
}
|
|
12049
12049
|
) }) });
|
|
12050
12050
|
}, Ay = (t) => {
|
|
@@ -12362,8 +12362,8 @@ function Hy(t, e) {
|
|
|
12362
12362
|
defaultValues: x,
|
|
12363
12363
|
forcedValues: P = {},
|
|
12364
12364
|
parentWidth: T,
|
|
12365
|
-
onMustRefreshParent:
|
|
12366
|
-
} = t, { t: F } = Te(), [
|
|
12365
|
+
onMustRefreshParent: k
|
|
12366
|
+
} = t, { t: F } = Te(), [D, M] = S(!1), [E, A] = S(), [I, O] = S(), [_] = $t.useForm(), [$, G] = S(), [V, N] = S(), B = ge(uc), [q, z] = S(), [U, J] = S(!1), [X, Q] = S(0), le = K(), W = K({}), te = K({}), pe = K(!1), j = K(!1), re = K(!1), Y = (T !== void 0 ? T : q) < Ly, de = ge(nt), { activeId: me, getPlainValues: se } = de || {}, oe = K(!1), ue = ge(
|
|
12367
12367
|
Dt
|
|
12368
12368
|
), {
|
|
12369
12369
|
setFormIsSaving: he = void 0,
|
|
@@ -12425,7 +12425,7 @@ function Hy(t, e) {
|
|
|
12425
12425
|
}
|
|
12426
12426
|
}, [E]);
|
|
12427
12427
|
const be = (ne, ae, xe, Ee) => {
|
|
12428
|
-
Re == null || Re(!1), he == null || he(!1), i == null || i(ne, ae, xe, Ee), De == null || De(ne), oe.current && (
|
|
12428
|
+
Re == null || Re(!1), he == null || he(!1), i == null || i(ne, ae, xe, Ee), De == null || De(ne), oe.current && (k == null || k());
|
|
12429
12429
|
}, Ce = (ne) => {
|
|
12430
12430
|
he == null || he(!1), d == null || d(ne);
|
|
12431
12431
|
}, ce = R(() => r || le.current, [r]), _e = r || le.current;
|
|
@@ -12499,11 +12499,11 @@ function Hy(t, e) {
|
|
|
12499
12499
|
ne[ae] === void 0 && delete ne[ae];
|
|
12500
12500
|
return ne;
|
|
12501
12501
|
}, [ft, Rt, V]), St = R(() => {
|
|
12502
|
-
oe.current && (
|
|
12502
|
+
oe.current && (k == null || k()), he == null || he(!1), o == null || o({ id: ce(), values: vt() });
|
|
12503
12503
|
}, [
|
|
12504
12504
|
ce,
|
|
12505
12505
|
vt,
|
|
12506
|
-
|
|
12506
|
+
k,
|
|
12507
12507
|
o,
|
|
12508
12508
|
he
|
|
12509
12509
|
]), hn = (ne, ae) => {
|
|
@@ -12672,7 +12672,7 @@ function Hy(t, e) {
|
|
|
12672
12672
|
title: F("formHasErrors"),
|
|
12673
12673
|
body: F("fillRequiredFields")
|
|
12674
12674
|
}), { succeed: !1, id: ce() };
|
|
12675
|
-
|
|
12675
|
+
M(!0), he == null || he(!0);
|
|
12676
12676
|
try {
|
|
12677
12677
|
p === "api" ? await tt(ne) : await it(ne), u && (le.current = void 0, Se({ values: {}, fields: V, reset: !0 })), await Ut({ forceRefresh: !0 }), ae = !0, $e({
|
|
12678
12678
|
type: "success",
|
|
@@ -12680,9 +12680,9 @@ function Hy(t, e) {
|
|
|
12680
12680
|
duration: 3
|
|
12681
12681
|
});
|
|
12682
12682
|
} catch (Ee) {
|
|
12683
|
-
j.current = !1,
|
|
12683
|
+
j.current = !1, M(!1), he == null || he(!1), Ce == null || Ce(Ee), A(Ee);
|
|
12684
12684
|
} finally {
|
|
12685
|
-
j.current = !1, he == null || he(!1),
|
|
12685
|
+
j.current = !1, he == null || he(!1), M(!1);
|
|
12686
12686
|
}
|
|
12687
12687
|
return { succeed: ae, id: ce() };
|
|
12688
12688
|
}, Mt = R(
|
|
@@ -13017,7 +13017,7 @@ function Hy(t, e) {
|
|
|
13017
13017
|
Ge,
|
|
13018
13018
|
{
|
|
13019
13019
|
icon: /* @__PURE__ */ s(Tn, {}),
|
|
13020
|
-
disabled:
|
|
13020
|
+
disabled: D,
|
|
13021
13021
|
onClick: async () => {
|
|
13022
13022
|
await rn();
|
|
13023
13023
|
},
|
|
@@ -13027,8 +13027,8 @@ function Hy(t, e) {
|
|
|
13027
13027
|
/* @__PURE__ */ s(
|
|
13028
13028
|
Ge,
|
|
13029
13029
|
{
|
|
13030
|
-
disabled:
|
|
13031
|
-
loading:
|
|
13030
|
+
disabled: D || f,
|
|
13031
|
+
loading: D,
|
|
13032
13032
|
icon: /* @__PURE__ */ s(Jn, {}),
|
|
13033
13033
|
onClick: async () => {
|
|
13034
13034
|
await gt();
|
|
@@ -13083,12 +13083,12 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13083
13083
|
shortcut_id: h
|
|
13084
13084
|
});
|
|
13085
13085
|
else {
|
|
13086
|
-
const { action_id: F, res_id:
|
|
13086
|
+
const { action_id: F, res_id: D, action_type: M, view_id: E } = c;
|
|
13087
13087
|
await H.getHandler().addFavourite({
|
|
13088
13088
|
action_id: F,
|
|
13089
|
-
action_type:
|
|
13089
|
+
action_type: M,
|
|
13090
13090
|
view_id: E,
|
|
13091
|
-
res_id:
|
|
13091
|
+
res_id: D || !1
|
|
13092
13092
|
});
|
|
13093
13093
|
}
|
|
13094
13094
|
g(!m);
|
|
@@ -13107,7 +13107,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13107
13107
|
/* @__PURE__ */ s(ke, { style: { paddingLeft: 10 }, children: u })
|
|
13108
13108
|
] });
|
|
13109
13109
|
}
|
|
13110
|
-
const
|
|
13110
|
+
const k = f * 0.95;
|
|
13111
13111
|
return /* @__PURE__ */ s(ky, { setTitle: p, children: /* @__PURE__ */ s(
|
|
13112
13112
|
Et,
|
|
13113
13113
|
{
|
|
@@ -13126,7 +13126,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13126
13126
|
showFooter: !0,
|
|
13127
13127
|
insideButtonModal: o,
|
|
13128
13128
|
onCancel: i,
|
|
13129
|
-
parentWidth:
|
|
13129
|
+
parentWidth: k,
|
|
13130
13130
|
...l
|
|
13131
13131
|
},
|
|
13132
13132
|
`${d}-${n}-${y}-${b}-${C}-${w}-${r}`
|
|
@@ -13167,7 +13167,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13167
13167
|
[n, y]
|
|
13168
13168
|
), T = R(() => {
|
|
13169
13169
|
e();
|
|
13170
|
-
}, [e]),
|
|
13170
|
+
}, [e]), k = R(
|
|
13171
13171
|
({ id: I }) => {
|
|
13172
13172
|
P([I]);
|
|
13173
13173
|
},
|
|
@@ -13178,10 +13178,10 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13178
13178
|
return;
|
|
13179
13179
|
}
|
|
13180
13180
|
P(f);
|
|
13181
|
-
}, [f, T, P]),
|
|
13181
|
+
}, [f, T, P]), D = ee(
|
|
13182
13182
|
() => x ? Ps : ic,
|
|
13183
13183
|
[x]
|
|
13184
|
-
),
|
|
13184
|
+
), M = R(() => {
|
|
13185
13185
|
d(!0);
|
|
13186
13186
|
}, []), E = R(() => {
|
|
13187
13187
|
d(!1), T();
|
|
@@ -13206,13 +13206,13 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13206
13206
|
maskClosable: !1,
|
|
13207
13207
|
children: [
|
|
13208
13208
|
!w && /* @__PURE__ */ s(
|
|
13209
|
-
|
|
13209
|
+
D,
|
|
13210
13210
|
{
|
|
13211
13211
|
formView: C,
|
|
13212
13212
|
treeView: b,
|
|
13213
13213
|
model: r,
|
|
13214
13214
|
nameSearch: o,
|
|
13215
|
-
onRowClicked:
|
|
13215
|
+
onRowClicked: k,
|
|
13216
13216
|
treeScrollY: h * 0.3,
|
|
13217
13217
|
domain: i,
|
|
13218
13218
|
parentContext: a,
|
|
@@ -13227,7 +13227,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13227
13227
|
{
|
|
13228
13228
|
disabled: p || !c,
|
|
13229
13229
|
icon: /* @__PURE__ */ s(qr, {}),
|
|
13230
|
-
onClick:
|
|
13230
|
+
onClick: M,
|
|
13231
13231
|
children: v("new")
|
|
13232
13232
|
}
|
|
13233
13233
|
),
|
|
@@ -13332,10 +13332,10 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13332
13332
|
id: l,
|
|
13333
13333
|
domain: d
|
|
13334
13334
|
} = r, f = o && !a ? { backgroundColor: fc.colorPrimaryBg } : void 0, [u, p] = S(!1), [m, g] = S(!1), [h, v] = S(!1), [y, b] = S(), C = K(!1), [w, x] = S(""), P = K(), T = ge(nt), {
|
|
13335
|
-
domain:
|
|
13335
|
+
domain: k,
|
|
13336
13336
|
getFields: F,
|
|
13337
|
-
getContext:
|
|
13338
|
-
elementHasLostFocus:
|
|
13337
|
+
getContext: D,
|
|
13338
|
+
elementHasLostFocus: M,
|
|
13339
13339
|
getAllHierarchyValues: E
|
|
13340
13340
|
} = T || {}, A = K([]), [I, O] = S([]), { showErrorNotification: _ } = wt(), { permissions: $ } = Br({
|
|
13341
13341
|
model: i,
|
|
@@ -13348,7 +13348,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13348
13348
|
B && q.length === 0 ? Q(B) : B && q.length > 0 ? x(q) : !B && !q && x(P.current || "");
|
|
13349
13349
|
}, [e]);
|
|
13350
13350
|
const z = (Y) => {
|
|
13351
|
-
n == null || n(Y),
|
|
13351
|
+
n == null || n(Y), M == null || M();
|
|
13352
13352
|
}, U = (Y) => {
|
|
13353
13353
|
P.current = Y.target.value, z([void 0, ""]);
|
|
13354
13354
|
}, J = async () => {
|
|
@@ -13365,7 +13365,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13365
13365
|
const Y = await H.getHandler().nameSearch({
|
|
13366
13366
|
model: i,
|
|
13367
13367
|
payload: P.current,
|
|
13368
|
-
context: { ...
|
|
13368
|
+
context: { ...D == null ? void 0 : D(), ...c }
|
|
13369
13369
|
});
|
|
13370
13370
|
Y.length === 1 ? (P.current = void 0, z(Y[0])) : X(P.current);
|
|
13371
13371
|
}
|
|
@@ -13380,7 +13380,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13380
13380
|
const de = await H.getHandler().searchAllIds({
|
|
13381
13381
|
params: A.current,
|
|
13382
13382
|
model: i,
|
|
13383
|
-
context: { ...
|
|
13383
|
+
context: { ...D == null ? void 0 : D(), ...c },
|
|
13384
13384
|
totalItems: 2
|
|
13385
13385
|
});
|
|
13386
13386
|
de.length === 1 ? Q(de[0]) : (b(Y), p(!0));
|
|
@@ -13394,7 +13394,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13394
13394
|
action: "name_get",
|
|
13395
13395
|
payload: [Y],
|
|
13396
13396
|
model: i,
|
|
13397
|
-
context: { ...
|
|
13397
|
+
context: { ...D == null ? void 0 : D(), ...c }
|
|
13398
13398
|
});
|
|
13399
13399
|
z([Y, de[0][1]]);
|
|
13400
13400
|
} catch (de) {
|
|
@@ -13411,10 +13411,10 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13411
13411
|
values: E()
|
|
13412
13412
|
}),
|
|
13413
13413
|
fields: F(),
|
|
13414
|
-
context:
|
|
13415
|
-
})),
|
|
13414
|
+
context: D()
|
|
13415
|
+
})), k && k.length > 0 && (A.current = A.current.concat(
|
|
13416
13416
|
rs({
|
|
13417
|
-
domain:
|
|
13417
|
+
domain: k,
|
|
13418
13418
|
widgetFieldName: l
|
|
13419
13419
|
})
|
|
13420
13420
|
)), O(A.current);
|
|
@@ -13452,7 +13452,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13452
13452
|
{
|
|
13453
13453
|
id: B,
|
|
13454
13454
|
model: i,
|
|
13455
|
-
context: { ...
|
|
13455
|
+
context: { ...D == null ? void 0 : D(), ...c }
|
|
13456
13456
|
}
|
|
13457
13457
|
)
|
|
13458
13458
|
}
|
|
@@ -13486,7 +13486,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13486
13486
|
{
|
|
13487
13487
|
model: i,
|
|
13488
13488
|
domain: I,
|
|
13489
|
-
context: { ...
|
|
13489
|
+
context: { ...D == null ? void 0 : D(), ...c },
|
|
13490
13490
|
visible: u,
|
|
13491
13491
|
nameSearch: B ? void 0 : y,
|
|
13492
13492
|
canCreate: G,
|
|
@@ -13502,7 +13502,7 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13502
13502
|
In,
|
|
13503
13503
|
{
|
|
13504
13504
|
model: i,
|
|
13505
|
-
parentContext: { ...
|
|
13505
|
+
parentContext: { ...D == null ? void 0 : D(), ...c },
|
|
13506
13506
|
id: e && e[0],
|
|
13507
13507
|
visible: m,
|
|
13508
13508
|
onSubmitSucceed: (Y) => {
|
|
@@ -13628,12 +13628,12 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13628
13628
|
return await ((T = e.current) == null ? void 0 : T.submitForm());
|
|
13629
13629
|
}, [e]), y = R(
|
|
13630
13630
|
(T) => {
|
|
13631
|
-
var
|
|
13631
|
+
var k, F, D;
|
|
13632
13632
|
l == null || l({
|
|
13633
13633
|
actionData: T,
|
|
13634
|
-
values: (
|
|
13634
|
+
values: (k = e.current) == null ? void 0 : k.getValues(),
|
|
13635
13635
|
fields: (F = e.current) == null ? void 0 : F.getFields(),
|
|
13636
|
-
context: (
|
|
13636
|
+
context: (D = e.current) == null ? void 0 : D.getContext(),
|
|
13637
13637
|
onRefreshParentValues: n
|
|
13638
13638
|
});
|
|
13639
13639
|
},
|
|
@@ -13665,12 +13665,12 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13665
13665
|
disabled: t || p || !e.current,
|
|
13666
13666
|
placement: "bottomRight",
|
|
13667
13667
|
onRetrieveData: async () => {
|
|
13668
|
-
var
|
|
13668
|
+
var k;
|
|
13669
13669
|
const T = await b();
|
|
13670
13670
|
return p ? [C()] : [
|
|
13671
13671
|
{
|
|
13672
13672
|
label: i("actions"),
|
|
13673
|
-
items: ((
|
|
13673
|
+
items: ((k = T || h) == null ? void 0 : k.action) || []
|
|
13674
13674
|
}
|
|
13675
13675
|
];
|
|
13676
13676
|
},
|
|
@@ -13681,23 +13681,23 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13681
13681
|
disabled: t || p || !e.current,
|
|
13682
13682
|
placement: "bottomRight",
|
|
13683
13683
|
onRetrieveData: async () => {
|
|
13684
|
-
var
|
|
13684
|
+
var k;
|
|
13685
13685
|
const T = await b();
|
|
13686
13686
|
return p ? [C()] : [
|
|
13687
13687
|
{
|
|
13688
13688
|
label: i("reports"),
|
|
13689
|
-
items: ((
|
|
13689
|
+
items: ((k = T || h) == null ? void 0 : k.print) || []
|
|
13690
13690
|
}
|
|
13691
13691
|
];
|
|
13692
13692
|
},
|
|
13693
13693
|
onItemClick: async (T) => {
|
|
13694
13694
|
if (T) {
|
|
13695
|
-
const
|
|
13696
|
-
|
|
13695
|
+
const k = await Bn({ onFormSave: v });
|
|
13696
|
+
k.succeed && y({
|
|
13697
13697
|
...T,
|
|
13698
13698
|
datas: {
|
|
13699
13699
|
...T.datas || {},
|
|
13700
|
-
ids: [
|
|
13700
|
+
ids: [k.currentId]
|
|
13701
13701
|
}
|
|
13702
13702
|
});
|
|
13703
13703
|
}
|
|
@@ -13706,20 +13706,20 @@ const er = Ht(Hy), In = (t) => {
|
|
|
13706
13706
|
disabled: t || p || !e.current,
|
|
13707
13707
|
placement: "bottomRight",
|
|
13708
13708
|
onRetrieveData: async () => {
|
|
13709
|
-
var
|
|
13709
|
+
var k;
|
|
13710
13710
|
const T = await b();
|
|
13711
13711
|
return p ? [C()] : [
|
|
13712
13712
|
{
|
|
13713
13713
|
label: i("related"),
|
|
13714
|
-
items: ((
|
|
13714
|
+
items: ((k = T || h) == null ? void 0 : k.relate) || []
|
|
13715
13715
|
}
|
|
13716
13716
|
];
|
|
13717
13717
|
},
|
|
13718
13718
|
onItemClick: async (T) => {
|
|
13719
|
-
var
|
|
13719
|
+
var k, F;
|
|
13720
13720
|
T && (await Bn({ onFormSave: v })).succeed && d({
|
|
13721
13721
|
relateData: T,
|
|
13722
|
-
values: (
|
|
13722
|
+
values: (k = e.current) == null ? void 0 : k.getValues(),
|
|
13723
13723
|
fields: (F = e.current) == null ? void 0 : F.getFields(),
|
|
13724
13724
|
action_id: T.id,
|
|
13725
13725
|
action_type: T.type
|
|
@@ -13794,15 +13794,15 @@ function Ky(t) {
|
|
|
13794
13794
|
formRef: C,
|
|
13795
13795
|
onRefreshParentValues: w,
|
|
13796
13796
|
currentId: x
|
|
13797
|
-
} = t, { token: P } = zy(), { t: T } = Te(), { activeModel:
|
|
13797
|
+
} = t, { token: P } = zy(), { t: T } = Te(), { activeModel: k } = fs(), { permissions: F } = Br({
|
|
13798
13798
|
model: o,
|
|
13799
13799
|
permissions: ["create", "write", "unlink"],
|
|
13800
13800
|
enabled: !0
|
|
13801
|
-
}), { permissions:
|
|
13802
|
-
model:
|
|
13801
|
+
}), { permissions: D } = Br({
|
|
13802
|
+
model: k,
|
|
13803
13803
|
permissions: ["write"],
|
|
13804
|
-
enabled: !!
|
|
13805
|
-
}),
|
|
13804
|
+
enabled: !!k
|
|
13805
|
+
}), M = (F == null ? void 0 : F.create) ?? !1, E = (F == null ? void 0 : F.write) ?? !1, A = (F == null ? void 0 : F.unlink) ?? !1, I = (D == null ? void 0 : D.write) ?? !1, { duplicatingItem: O, duplicate: _ } = Yy({
|
|
13806
13806
|
currentId: a === "form" ? x : parseInt(g[0]),
|
|
13807
13807
|
currentModel: o,
|
|
13808
13808
|
onItemDuplicated: () => {
|
|
@@ -13825,7 +13825,7 @@ function Ky(t) {
|
|
|
13825
13825
|
parentContext: b,
|
|
13826
13826
|
selectedRowItems: g.map((te) => ({ id: te })),
|
|
13827
13827
|
onRefreshParentValues: w
|
|
13828
|
-
}), q = n || !
|
|
13828
|
+
}), q = n || !M || !I, z = n || !E, U = l === 0 || n || a !== "form" && g.length === 0 || (p ? !E : !A || !I), J = n || O || a === "tree" && g.length !== 1 || a === "form" && (x === void 0 || x < 0) || !M || !I;
|
|
13829
13829
|
return /* @__PURE__ */ L("div", { className: "flex mb-2 pt-3", children: [
|
|
13830
13830
|
/* @__PURE__ */ s(vc, { title: e, token: P }),
|
|
13831
13831
|
/* @__PURE__ */ L("div", { className: "flex-none h-8 pl-2", children: [
|
|
@@ -14062,7 +14062,7 @@ const Qy = (t) => {
|
|
|
14062
14062
|
domain: g,
|
|
14063
14063
|
fetchValues: h,
|
|
14064
14064
|
getAllHierarchyValues: v
|
|
14065
|
-
} = f || {}, { t: y } = Te(), [b, C] = S(!1), [w, x] = S(!1), [P, T] = S(), [
|
|
14065
|
+
} = f || {}, { t: y } = Te(), [b, C] = S(!1), [w, x] = S(!1), [P, T] = S(), [k, F] = S(!1), [D, M] = S(!1), [E, A] = S(), [I, O] = S([]), [_, $] = S(!1), [G, V] = S([]), [N, B] = S(), q = K(), [z, U] = S(void 0), J = K(), {
|
|
14066
14066
|
readOnly: X,
|
|
14067
14067
|
relation: Q,
|
|
14068
14068
|
context: le,
|
|
@@ -14204,8 +14204,8 @@ const Qy = (t) => {
|
|
|
14204
14204
|
}) : ($(!0), A({ defaultValues: ve }), F(!0));
|
|
14205
14205
|
}, Pe = async () => {
|
|
14206
14206
|
a === "form" ? De(() => {
|
|
14207
|
-
|
|
14208
|
-
}) :
|
|
14207
|
+
M(!0);
|
|
14208
|
+
}) : M(!0);
|
|
14209
14209
|
}, ze = async () => {
|
|
14210
14210
|
x(!0), C(!1), T(void 0);
|
|
14211
14211
|
try {
|
|
@@ -14419,7 +14419,7 @@ const Qy = (t) => {
|
|
|
14419
14419
|
submitMode: "2many",
|
|
14420
14420
|
values: E == null ? void 0 : E.values,
|
|
14421
14421
|
defaultValues: E == null ? void 0 : E.defaultValues,
|
|
14422
|
-
visible:
|
|
14422
|
+
visible: k,
|
|
14423
14423
|
onSubmitSucceed: Ke,
|
|
14424
14424
|
parentContext: { ...m == null ? void 0 : m(), ...le },
|
|
14425
14425
|
onCancel: (Z) => {
|
|
@@ -14448,12 +14448,12 @@ const Qy = (t) => {
|
|
|
14448
14448
|
domain: G,
|
|
14449
14449
|
model: Q,
|
|
14450
14450
|
context: { ...m == null ? void 0 : m(), ...le },
|
|
14451
|
-
visible:
|
|
14451
|
+
visible: D,
|
|
14452
14452
|
onSelectValues: async (Z) => {
|
|
14453
|
-
|
|
14453
|
+
M(!1), Qe(Z);
|
|
14454
14454
|
},
|
|
14455
14455
|
onCloseModal: () => {
|
|
14456
|
-
|
|
14456
|
+
M(!1);
|
|
14457
14457
|
}
|
|
14458
14458
|
}
|
|
14459
14459
|
)
|
|
@@ -14532,7 +14532,7 @@ const Qy = (t) => {
|
|
|
14532
14532
|
) : b, x = Ga(u), {
|
|
14533
14533
|
items: P,
|
|
14534
14534
|
colors: T,
|
|
14535
|
-
status:
|
|
14535
|
+
status: k
|
|
14536
14536
|
} = await Ya({
|
|
14537
14537
|
relation: e,
|
|
14538
14538
|
ids: w,
|
|
@@ -14541,12 +14541,12 @@ const Qy = (t) => {
|
|
|
14541
14541
|
attrs: x,
|
|
14542
14542
|
treeOoui: u,
|
|
14543
14543
|
skipFunctionFields: !0
|
|
14544
|
-
}),
|
|
14544
|
+
}), D = w.length < h - g && C.length > 0 ? [...w, ...C.map((E) => E.id)] : w;
|
|
14545
14545
|
return { results: Wa({
|
|
14546
|
-
finalResultIds:
|
|
14546
|
+
finalResultIds: D,
|
|
14547
14547
|
fetchedItems: P,
|
|
14548
14548
|
otherItems: C
|
|
14549
|
-
}), colors: T, status:
|
|
14549
|
+
}), colors: T, status: k };
|
|
14550
14550
|
},
|
|
14551
14551
|
[n, e, u, t]
|
|
14552
14552
|
),
|
|
@@ -14781,9 +14781,9 @@ const Ac = ({
|
|
|
14781
14781
|
},
|
|
14782
14782
|
[o, i]
|
|
14783
14783
|
), C = lt(
|
|
14784
|
-
(x, P, T,
|
|
14784
|
+
(x, P, T, k = !1) => {
|
|
14785
14785
|
let F;
|
|
14786
|
-
if (
|
|
14786
|
+
if (k)
|
|
14787
14787
|
F = o.concat({
|
|
14788
14788
|
id: x,
|
|
14789
14789
|
operation: "pendingLink",
|
|
@@ -14791,19 +14791,19 @@ const Ac = ({
|
|
|
14791
14791
|
treeValues: { ...T, id: x }
|
|
14792
14792
|
});
|
|
14793
14793
|
else if (x)
|
|
14794
|
-
F = o.map((
|
|
14794
|
+
F = o.map((D) => D.id === x ? {
|
|
14795
14795
|
id: x,
|
|
14796
14796
|
operation: x > 0 ? "pendingUpdate" : "pendingCreate",
|
|
14797
14797
|
values: { ...T, id: x },
|
|
14798
14798
|
treeValues: { ...T, id: x }
|
|
14799
|
-
} :
|
|
14799
|
+
} : D);
|
|
14800
14800
|
else {
|
|
14801
|
-
const
|
|
14801
|
+
const D = ja(o);
|
|
14802
14802
|
F = o.concat({
|
|
14803
|
-
id:
|
|
14803
|
+
id: D,
|
|
14804
14804
|
operation: "pendingCreate",
|
|
14805
|
-
values: { ...T, id:
|
|
14806
|
-
treeValues: { ...T, id:
|
|
14805
|
+
values: { ...T, id: D },
|
|
14806
|
+
treeValues: { ...T, id: D }
|
|
14807
14807
|
});
|
|
14808
14808
|
}
|
|
14809
14809
|
i(F), h || p(!1);
|
|
@@ -14815,8 +14815,8 @@ const Ac = ({
|
|
|
14815
14815
|
return;
|
|
14816
14816
|
const { id: P } = x;
|
|
14817
14817
|
let T = o;
|
|
14818
|
-
const
|
|
14819
|
-
(
|
|
14818
|
+
const k = o.find((F) => F.id === P);
|
|
14819
|
+
(k == null ? void 0 : k.values) === void 0 && (T = await H.getHandler().readObjects({
|
|
14820
14820
|
model: l,
|
|
14821
14821
|
ids: [x.id],
|
|
14822
14822
|
fields: d.fields,
|
|
@@ -14913,7 +14913,7 @@ const Ac = ({
|
|
|
14913
14913
|
treeType: y,
|
|
14914
14914
|
onChangeTreeType: b
|
|
14915
14915
|
}) => {
|
|
14916
|
-
const C = K(null), w = d || C, x = K(), P = K(t), [T,
|
|
14916
|
+
const C = K(null), w = d || C, x = K(), P = K(t), [T, k] = S(0), [F, D] = S(), [M, E] = S(0), A = K([]), [I, O] = S([]), [_, $] = S(!1), G = Lt(() => t.length, [t]), {
|
|
14917
14917
|
columns: V,
|
|
14918
14918
|
strings: N,
|
|
14919
14919
|
colorsForResults: B,
|
|
@@ -15052,8 +15052,8 @@ const Ac = ({
|
|
|
15052
15052
|
), he = R(() => {
|
|
15053
15053
|
var Fe;
|
|
15054
15054
|
te(), y === "paginated" ? E((Ve) => Ve + 1) : (Fe = w == null ? void 0 : w.current) == null || Fe.refresh();
|
|
15055
|
-
}, [te, y, w]), Re = Wt(
|
|
15056
|
-
|
|
15055
|
+
}, [te, y, w]), Re = Wt(k), De = Wt(
|
|
15056
|
+
D
|
|
15057
15057
|
), Ae = Wt(Q), ye = Wt(X), Pe = Wt(J), ze = Wt(z), Oe = R(
|
|
15058
15058
|
(Fe) => {
|
|
15059
15059
|
Fe.selected ? l([...h, Fe.id]) : l(
|
|
@@ -15062,7 +15062,7 @@ const Ac = ({
|
|
|
15062
15062
|
},
|
|
15063
15063
|
[h, l]
|
|
15064
15064
|
), Ke = ee(() => h.length === 0 ? "unchecked" : h.length === j.length ? "checked" : "indeterminate", [h, j.length]), Ie = Wt((Fe) => {
|
|
15065
|
-
A.current = Fe,
|
|
15065
|
+
A.current = Fe, k(0), D(void 0), y === "paginated" && t.length > 0 && me().then(O);
|
|
15066
15066
|
}), Qe = Wt(me);
|
|
15067
15067
|
je(() => {
|
|
15068
15068
|
y === "paginated" && t.length > 0 && Qe().then(O);
|
|
@@ -15123,7 +15123,7 @@ const Ac = ({
|
|
|
15123
15123
|
onFetchChildrenForRecord: We,
|
|
15124
15124
|
childField: i == null ? void 0 : i.field_parent
|
|
15125
15125
|
},
|
|
15126
|
-
|
|
15126
|
+
M
|
|
15127
15127
|
) : /* @__PURE__ */ s(
|
|
15128
15128
|
us,
|
|
15129
15129
|
{
|
|
@@ -15164,7 +15164,7 @@ const Ac = ({
|
|
|
15164
15164
|
activeId: w,
|
|
15165
15165
|
getContext: x,
|
|
15166
15166
|
fetchValues: P
|
|
15167
|
-
} = C || {}, T = K(),
|
|
15167
|
+
} = C || {}, T = K(), k = i.size > 1, F = ((ye = i.get("form")) == null ? void 0 : ye.fields) !== void 0, D = ee(() => ({ ...x == null ? void 0 : x(), ...v }), [x, v]), M = Cc({
|
|
15168
15168
|
widgetDomain: y,
|
|
15169
15169
|
fieldName: b
|
|
15170
15170
|
}), {
|
|
@@ -15178,7 +15178,7 @@ const Ac = ({
|
|
|
15178
15178
|
} = Zy({
|
|
15179
15179
|
treeView: i.get("tree"),
|
|
15180
15180
|
relation: h,
|
|
15181
|
-
context:
|
|
15181
|
+
context: D,
|
|
15182
15182
|
allRowsIds: l.filter((Oe) => Oe.id !== void 0).map((Oe) => Oe.id),
|
|
15183
15183
|
gridRef: e
|
|
15184
15184
|
}), V = ee(() => {
|
|
@@ -15203,7 +15203,7 @@ const Ac = ({
|
|
|
15203
15203
|
formView: i.get("form"),
|
|
15204
15204
|
treeView: i.get("tree"),
|
|
15205
15205
|
relation: h,
|
|
15206
|
-
context:
|
|
15206
|
+
context: D,
|
|
15207
15207
|
triggerChange: B
|
|
15208
15208
|
}), {
|
|
15209
15209
|
showFormModal: X,
|
|
@@ -15222,7 +15222,7 @@ const Ac = ({
|
|
|
15222
15222
|
items: l,
|
|
15223
15223
|
setCurrentView: f,
|
|
15224
15224
|
setItemIndex: p,
|
|
15225
|
-
context:
|
|
15225
|
+
context: D,
|
|
15226
15226
|
relation: h,
|
|
15227
15227
|
formView: i.get("form")
|
|
15228
15228
|
}), {
|
|
@@ -15236,7 +15236,7 @@ const Ac = ({
|
|
|
15236
15236
|
triggerChange: B,
|
|
15237
15237
|
items: l,
|
|
15238
15238
|
views: i,
|
|
15239
|
-
context:
|
|
15239
|
+
context: D,
|
|
15240
15240
|
relation: h
|
|
15241
15241
|
}), { showRemoveConfirm: me } = Fc({
|
|
15242
15242
|
isMany2many: N,
|
|
@@ -15304,9 +15304,9 @@ const Ac = ({
|
|
|
15304
15304
|
onSearchItem: de,
|
|
15305
15305
|
selectedRowKeys: I,
|
|
15306
15306
|
showCreateButton: F,
|
|
15307
|
-
showToggleButton:
|
|
15307
|
+
showToggleButton: k,
|
|
15308
15308
|
toolbar: (ze = i.get(d)) == null ? void 0 : ze.toolbar,
|
|
15309
|
-
context: { ...x == null ? void 0 : x(), ...
|
|
15309
|
+
context: { ...x == null ? void 0 : x(), ...D },
|
|
15310
15310
|
formRef: T,
|
|
15311
15311
|
onRefreshParentValues: () => {
|
|
15312
15312
|
var Oe;
|
|
@@ -15324,7 +15324,7 @@ const Ac = ({
|
|
|
15324
15324
|
onFetchRecords: A,
|
|
15325
15325
|
ooui: E,
|
|
15326
15326
|
treeView: i.get("tree"),
|
|
15327
|
-
context:
|
|
15327
|
+
context: D,
|
|
15328
15328
|
onRowDoubleClick: oe,
|
|
15329
15329
|
showPointerCursorInRows: Re,
|
|
15330
15330
|
onRowSelectionChange: O,
|
|
@@ -15348,7 +15348,7 @@ const Ac = ({
|
|
|
15348
15348
|
ref: T,
|
|
15349
15349
|
items: l,
|
|
15350
15350
|
formView: i.get("form"),
|
|
15351
|
-
context:
|
|
15351
|
+
context: D,
|
|
15352
15352
|
relation: h,
|
|
15353
15353
|
readOnly: g || !1,
|
|
15354
15354
|
onChange: z
|
|
@@ -15365,7 +15365,7 @@ const Ac = ({
|
|
|
15365
15365
|
defaultValues: Q == null ? void 0 : Q.defaultValues,
|
|
15366
15366
|
visible: X,
|
|
15367
15367
|
onSubmitSucceed: te,
|
|
15368
|
-
parentContext:
|
|
15368
|
+
parentContext: D,
|
|
15369
15369
|
onCancel: W,
|
|
15370
15370
|
readOnly: g,
|
|
15371
15371
|
mustClearAfterSave: le,
|
|
@@ -15378,9 +15378,9 @@ const Ac = ({
|
|
|
15378
15378
|
/* @__PURE__ */ s(
|
|
15379
15379
|
uo,
|
|
15380
15380
|
{
|
|
15381
|
-
domain:
|
|
15381
|
+
domain: M,
|
|
15382
15382
|
model: h,
|
|
15383
|
-
context:
|
|
15383
|
+
context: D,
|
|
15384
15384
|
visible: re,
|
|
15385
15385
|
onSelectValues: ie,
|
|
15386
15386
|
onCloseModal: Y
|
|
@@ -15393,7 +15393,7 @@ const Ac = ({
|
|
|
15393
15393
|
view_id: i.get("graph").view_id,
|
|
15394
15394
|
model: h,
|
|
15395
15395
|
domain: [[`${o.inv_field}`, "=", w]],
|
|
15396
|
-
context:
|
|
15396
|
+
context: D,
|
|
15397
15397
|
limit: 0
|
|
15398
15398
|
}
|
|
15399
15399
|
),
|
|
@@ -15436,7 +15436,7 @@ const Ac = ({
|
|
|
15436
15436
|
) : b, x = Ga(u), {
|
|
15437
15437
|
items: P,
|
|
15438
15438
|
colors: T,
|
|
15439
|
-
status:
|
|
15439
|
+
status: k
|
|
15440
15440
|
} = await Ya({
|
|
15441
15441
|
relation: e,
|
|
15442
15442
|
ids: w,
|
|
@@ -15444,12 +15444,12 @@ const Ac = ({
|
|
|
15444
15444
|
context: n,
|
|
15445
15445
|
attrs: x,
|
|
15446
15446
|
treeOoui: u
|
|
15447
|
-
}),
|
|
15447
|
+
}), D = w.length < h - g && C.length > 0 ? [...w, ...C.map((E) => E.id)] : w;
|
|
15448
15448
|
return { results: Wa({
|
|
15449
|
-
finalResultIds:
|
|
15449
|
+
finalResultIds: D,
|
|
15450
15450
|
fetchedItems: P,
|
|
15451
15451
|
otherItems: C
|
|
15452
|
-
}), colors: T, status:
|
|
15452
|
+
}), colors: T, status: k };
|
|
15453
15453
|
},
|
|
15454
15454
|
[n, e, u, t]
|
|
15455
15455
|
),
|
|
@@ -15479,7 +15479,7 @@ const Ac = ({
|
|
|
15479
15479
|
selectedRowKeys: h = [],
|
|
15480
15480
|
showPointerCursorInRows: v = !0
|
|
15481
15481
|
}) => {
|
|
15482
|
-
const y = K(), b = l || y, C = K({}), w = K(), x = K(), P = K(t), { t: T } = Te(),
|
|
15482
|
+
const y = K(), b = l || y, C = K({}), w = K(), x = K(), P = K(t), { t: T } = Te(), k = qt(
|
|
15483
15483
|
Tt.FEATURE_MANY2ONE_SORT
|
|
15484
15484
|
);
|
|
15485
15485
|
je(() => {
|
|
@@ -15490,14 +15490,14 @@ const Ac = ({
|
|
|
15490
15490
|
}
|
|
15491
15491
|
x.current = t, (_ = b == null ? void 0 : b.current) == null || _.refresh(), ($ = b == null ? void 0 : b.current) == null || $.unselectAll();
|
|
15492
15492
|
}, [t]);
|
|
15493
|
-
const F = Lt(() => t.length, [t]),
|
|
15493
|
+
const F = Lt(() => t.length, [t]), D = Lt(() => gs(
|
|
15494
15494
|
o,
|
|
15495
15495
|
{
|
|
15496
15496
|
...Cs
|
|
15497
15497
|
},
|
|
15498
15498
|
i,
|
|
15499
|
-
|
|
15500
|
-
), [i, o,
|
|
15499
|
+
k
|
|
15500
|
+
), [i, o, k]), M = R(
|
|
15501
15501
|
async ({
|
|
15502
15502
|
startRow: _,
|
|
15503
15503
|
endRow: $,
|
|
@@ -15529,8 +15529,8 @@ const Ac = ({
|
|
|
15529
15529
|
{
|
|
15530
15530
|
ref: b,
|
|
15531
15531
|
height: e || sv,
|
|
15532
|
-
columns:
|
|
15533
|
-
onRequestData:
|
|
15532
|
+
columns: D,
|
|
15533
|
+
onRequestData: M,
|
|
15534
15534
|
onRowDoubleClick: n,
|
|
15535
15535
|
showPointerCursorInRows: v,
|
|
15536
15536
|
readonly: r,
|
|
@@ -15582,12 +15582,12 @@ const Ac = ({
|
|
|
15582
15582
|
activeId: b,
|
|
15583
15583
|
getContext: C,
|
|
15584
15584
|
fetchValues: w
|
|
15585
|
-
} = y || {}, x = K(), P = i.size > 1, T = ((Re = i.get("form")) == null ? void 0 : Re.fields) !== void 0,
|
|
15585
|
+
} = y || {}, x = K(), P = i.size > 1, T = ((Re = i.get("form")) == null ? void 0 : Re.fields) !== void 0, k = ee(() => ({ ...C == null ? void 0 : C(), ...g }), [C, g]), F = Cc({
|
|
15586
15586
|
widgetDomain: h,
|
|
15587
15587
|
fieldName: v
|
|
15588
15588
|
}), {
|
|
15589
|
-
treeOoui:
|
|
15590
|
-
onTreeFetchRows:
|
|
15589
|
+
treeOoui: D,
|
|
15590
|
+
onTreeFetchRows: M,
|
|
15591
15591
|
selectedRowKeys: E,
|
|
15592
15592
|
setSelectedRowKeys: A,
|
|
15593
15593
|
onChangeFirstVisibleRowIndex: I,
|
|
@@ -15596,11 +15596,11 @@ const Ac = ({
|
|
|
15596
15596
|
} = ov({
|
|
15597
15597
|
treeView: i.get("tree"),
|
|
15598
15598
|
relation: m,
|
|
15599
|
-
context:
|
|
15599
|
+
context: k,
|
|
15600
15600
|
allRowsIds: c.filter((ye) => ye.id !== void 0).map((ye) => ye.id),
|
|
15601
15601
|
gridRef: e
|
|
15602
15602
|
}), [, $] = av({
|
|
15603
|
-
ooui:
|
|
15603
|
+
ooui: D,
|
|
15604
15604
|
model: m,
|
|
15605
15605
|
items: c,
|
|
15606
15606
|
selectedRowKeys: E
|
|
@@ -15626,7 +15626,7 @@ const Ac = ({
|
|
|
15626
15626
|
formView: i.get("form"),
|
|
15627
15627
|
treeView: i.get("tree"),
|
|
15628
15628
|
relation: m,
|
|
15629
|
-
context:
|
|
15629
|
+
context: k,
|
|
15630
15630
|
triggerChange: N
|
|
15631
15631
|
}), {
|
|
15632
15632
|
showFormModal: J,
|
|
@@ -15645,7 +15645,7 @@ const Ac = ({
|
|
|
15645
15645
|
items: c,
|
|
15646
15646
|
setCurrentView: d,
|
|
15647
15647
|
setItemIndex: u,
|
|
15648
|
-
context:
|
|
15648
|
+
context: k,
|
|
15649
15649
|
relation: m,
|
|
15650
15650
|
formView: i.get("form")
|
|
15651
15651
|
}), {
|
|
@@ -15659,7 +15659,7 @@ const Ac = ({
|
|
|
15659
15659
|
triggerChange: N,
|
|
15660
15660
|
items: c,
|
|
15661
15661
|
views: i,
|
|
15662
|
-
context:
|
|
15662
|
+
context: k,
|
|
15663
15663
|
relation: m
|
|
15664
15664
|
}), { showRemoveConfirm: de } = Fc({
|
|
15665
15665
|
isMany2many: V,
|
|
@@ -15722,7 +15722,7 @@ const Ac = ({
|
|
|
15722
15722
|
showCreateButton: T,
|
|
15723
15723
|
showToggleButton: P,
|
|
15724
15724
|
toolbar: (Ae = i.get(l)) == null ? void 0 : Ae.toolbar,
|
|
15725
|
-
context: { ...C == null ? void 0 : C(), ...
|
|
15725
|
+
context: { ...C == null ? void 0 : C(), ...k },
|
|
15726
15726
|
formRef: x,
|
|
15727
15727
|
onRefreshParentValues: () => {
|
|
15728
15728
|
var ye;
|
|
@@ -15737,9 +15737,9 @@ const Ac = ({
|
|
|
15737
15737
|
height: o.height,
|
|
15738
15738
|
items: c,
|
|
15739
15739
|
readOnly: p || !1,
|
|
15740
|
-
onFetchRecords:
|
|
15741
|
-
ooui:
|
|
15742
|
-
context:
|
|
15740
|
+
onFetchRecords: M,
|
|
15741
|
+
ooui: D,
|
|
15742
|
+
context: k,
|
|
15743
15743
|
onRowDoubleClick: se,
|
|
15744
15744
|
showPointerCursorInRows: he,
|
|
15745
15745
|
onRowSelectionChange: A,
|
|
@@ -15762,7 +15762,7 @@ const Ac = ({
|
|
|
15762
15762
|
ref: x,
|
|
15763
15763
|
items: c,
|
|
15764
15764
|
formView: i.get("form"),
|
|
15765
|
-
context:
|
|
15765
|
+
context: k,
|
|
15766
15766
|
relation: m,
|
|
15767
15767
|
readOnly: p || !1,
|
|
15768
15768
|
onChange: q
|
|
@@ -15779,7 +15779,7 @@ const Ac = ({
|
|
|
15779
15779
|
defaultValues: X == null ? void 0 : X.defaultValues,
|
|
15780
15780
|
visible: J,
|
|
15781
15781
|
onSubmitSucceed: W,
|
|
15782
|
-
parentContext:
|
|
15782
|
+
parentContext: k,
|
|
15783
15783
|
onCancel: le,
|
|
15784
15784
|
readOnly: p,
|
|
15785
15785
|
mustClearAfterSave: Q,
|
|
@@ -15794,7 +15794,7 @@ const Ac = ({
|
|
|
15794
15794
|
{
|
|
15795
15795
|
domain: F,
|
|
15796
15796
|
model: m,
|
|
15797
|
-
context:
|
|
15797
|
+
context: k,
|
|
15798
15798
|
visible: j,
|
|
15799
15799
|
onSelectValues: re,
|
|
15800
15800
|
onCloseModal: ie
|
|
@@ -15807,7 +15807,7 @@ const Ac = ({
|
|
|
15807
15807
|
view_id: i.get("graph").view_id,
|
|
15808
15808
|
model: m,
|
|
15809
15809
|
domain: [[`${o.inv_field}`, "=", b]],
|
|
15810
|
-
context:
|
|
15810
|
+
context: k,
|
|
15811
15811
|
limit: 0
|
|
15812
15812
|
}
|
|
15813
15813
|
),
|
|
@@ -15826,57 +15826,57 @@ const Ac = ({
|
|
|
15826
15826
|
}, [e]);
|
|
15827
15827
|
const C = qt(
|
|
15828
15828
|
Tt.FEATURE_GET_TOOLBAR
|
|
15829
|
-
), w = async (
|
|
15830
|
-
if (o && o[
|
|
15831
|
-
const F = o[
|
|
15832
|
-
if (C && !F.toolbar && (
|
|
15833
|
-
const
|
|
15829
|
+
), w = async (k) => {
|
|
15830
|
+
if (o && o[k]) {
|
|
15831
|
+
const F = o[k];
|
|
15832
|
+
if (C && !F.toolbar && (k === "form" || k === "tree")) {
|
|
15833
|
+
const D = await H.getHandler().getToolbar({
|
|
15834
15834
|
model: r,
|
|
15835
|
-
type:
|
|
15835
|
+
type: k,
|
|
15836
15836
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
15837
15837
|
});
|
|
15838
|
-
return { ...F, toolbar:
|
|
15838
|
+
return { ...F, toolbar: D };
|
|
15839
15839
|
}
|
|
15840
15840
|
return F;
|
|
15841
15841
|
}
|
|
15842
|
-
if (C && (
|
|
15843
|
-
const [F,
|
|
15842
|
+
if (C && (k === "form" || k === "tree")) {
|
|
15843
|
+
const [F, D] = await Promise.all([
|
|
15844
15844
|
H.getHandler().getView({
|
|
15845
15845
|
model: r,
|
|
15846
|
-
type:
|
|
15846
|
+
type: k,
|
|
15847
15847
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
15848
15848
|
}),
|
|
15849
15849
|
H.getHandler().getToolbar({
|
|
15850
15850
|
model: r,
|
|
15851
|
-
type:
|
|
15851
|
+
type: k,
|
|
15852
15852
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
15853
15853
|
})
|
|
15854
15854
|
]);
|
|
15855
|
-
return { ...F, toolbar:
|
|
15855
|
+
return { ...F, toolbar: D };
|
|
15856
15856
|
}
|
|
15857
15857
|
return await H.getHandler().getView({
|
|
15858
15858
|
model: r,
|
|
15859
|
-
type:
|
|
15859
|
+
type: k,
|
|
15860
15860
|
context: { ...h == null ? void 0 : h(), ...a }
|
|
15861
15861
|
});
|
|
15862
15862
|
}, x = async () => {
|
|
15863
15863
|
d(!0), u(void 0);
|
|
15864
15864
|
try {
|
|
15865
15865
|
if (n && n.length > 0) {
|
|
15866
|
-
const
|
|
15867
|
-
const
|
|
15868
|
-
p.set(F,
|
|
15866
|
+
const k = n.map(async (F) => {
|
|
15867
|
+
const D = await w(F);
|
|
15868
|
+
p.set(F, D);
|
|
15869
15869
|
});
|
|
15870
|
-
await Promise.all(
|
|
15870
|
+
await Promise.all(k), m(p);
|
|
15871
15871
|
} else {
|
|
15872
|
-
const [
|
|
15872
|
+
const [k, F] = await Promise.all([
|
|
15873
15873
|
w("form"),
|
|
15874
15874
|
w("tree")
|
|
15875
15875
|
]);
|
|
15876
|
-
p.set("form",
|
|
15876
|
+
p.set("form", k), p.set("tree", F), m(p);
|
|
15877
15877
|
}
|
|
15878
|
-
} catch (
|
|
15879
|
-
u(JSON.stringify(
|
|
15878
|
+
} catch (k) {
|
|
15879
|
+
u(JSON.stringify(k));
|
|
15880
15880
|
} finally {
|
|
15881
15881
|
d(!1);
|
|
15882
15882
|
}
|
|
@@ -15886,7 +15886,7 @@ const Ac = ({
|
|
|
15886
15886
|
{
|
|
15887
15887
|
required: i,
|
|
15888
15888
|
type: "array",
|
|
15889
|
-
validator: async (
|
|
15889
|
+
validator: async (k, F) => {
|
|
15890
15890
|
if (!F)
|
|
15891
15891
|
throw new Error();
|
|
15892
15892
|
if (!F.items)
|
|
@@ -16866,13 +16866,13 @@ const Uv = () => {
|
|
|
16866
16866
|
if (T)
|
|
16867
16867
|
u(b, T);
|
|
16868
16868
|
else {
|
|
16869
|
-
const
|
|
16870
|
-
|
|
16869
|
+
const k = await f(b);
|
|
16870
|
+
k && u(b, k);
|
|
16871
16871
|
}
|
|
16872
16872
|
} else if (w) {
|
|
16873
|
-
const T = y ? 0 : e - 1,
|
|
16874
|
-
if (
|
|
16875
|
-
u(T,
|
|
16873
|
+
const T = y ? 0 : e - 1, k = (P = i[T]) == null ? void 0 : P.id;
|
|
16874
|
+
if (k)
|
|
16875
|
+
u(T, k);
|
|
16876
16876
|
else {
|
|
16877
16877
|
const F = await f(T);
|
|
16878
16878
|
F && u(T, F);
|
|
@@ -16920,10 +16920,10 @@ function Wv({ toolbar: t }) {
|
|
|
16920
16920
|
setDuplicatingItem: x,
|
|
16921
16921
|
setResults: P,
|
|
16922
16922
|
formIsLoading: T,
|
|
16923
|
-
attachments:
|
|
16923
|
+
attachments: k,
|
|
16924
16924
|
formRef: F,
|
|
16925
|
-
setFormHasChanges:
|
|
16926
|
-
previousView:
|
|
16925
|
+
setFormHasChanges: D,
|
|
16926
|
+
previousView: M,
|
|
16927
16927
|
setPreviousView: E,
|
|
16928
16928
|
goToResourceId: A,
|
|
16929
16929
|
isActive: I,
|
|
@@ -16996,9 +16996,9 @@ function Wv({ toolbar: t }) {
|
|
|
16996
16996
|
i
|
|
16997
16997
|
]), J = R(
|
|
16998
16998
|
(W) => {
|
|
16999
|
-
E == null || E(c),
|
|
16999
|
+
E == null || E(c), D == null || D(!1), l == null || l(W);
|
|
17000
17000
|
},
|
|
17001
|
-
[c, E,
|
|
17001
|
+
[c, E, D, l]
|
|
17002
17002
|
), X = R(async () => {
|
|
17003
17003
|
const W = await Bn({ onFormSave: d });
|
|
17004
17004
|
W.succeed && (_ == null || _({
|
|
@@ -17049,12 +17049,12 @@ function Wv({ toolbar: t }) {
|
|
|
17049
17049
|
), yn(
|
|
17050
17050
|
"ctrl+l,command+l",
|
|
17051
17051
|
async () => {
|
|
17052
|
-
!I || !
|
|
17052
|
+
!I || !M || !await F.current.cancelUnsavedChanges() || (E == null || E(c), l == null || l(M));
|
|
17053
17053
|
},
|
|
17054
17054
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
17055
17055
|
[
|
|
17056
17056
|
I,
|
|
17057
|
-
|
|
17057
|
+
M,
|
|
17058
17058
|
c,
|
|
17059
17059
|
E,
|
|
17060
17060
|
l,
|
|
@@ -17129,7 +17129,7 @@ function Wv({ toolbar: t }) {
|
|
|
17129
17129
|
vs,
|
|
17130
17130
|
{
|
|
17131
17131
|
currentView: c,
|
|
17132
|
-
previousView:
|
|
17132
|
+
previousView: M,
|
|
17133
17133
|
availableViews: a,
|
|
17134
17134
|
onChangeView: J,
|
|
17135
17135
|
disabled: $,
|
|
@@ -17154,7 +17154,7 @@ function Wv({ toolbar: t }) {
|
|
|
17154
17154
|
jv,
|
|
17155
17155
|
{
|
|
17156
17156
|
disabled: $,
|
|
17157
|
-
attachments:
|
|
17157
|
+
attachments: k,
|
|
17158
17158
|
onAddNewAttachment: X,
|
|
17159
17159
|
onListAllAttachments: Q,
|
|
17160
17160
|
onViewAttachmentDetails: le
|
|
@@ -17447,10 +17447,10 @@ const Xv = (t) => {
|
|
|
17447
17447
|
setSorter: x = void 0,
|
|
17448
17448
|
setTotalItems: P = void 0,
|
|
17449
17449
|
setSearchTreeNameSearch: T = void 0,
|
|
17450
|
-
setTreeIsLoading:
|
|
17450
|
+
setTreeIsLoading: k = void 0,
|
|
17451
17451
|
limit: F,
|
|
17452
|
-
setLimit:
|
|
17453
|
-
searchParams:
|
|
17452
|
+
setLimit: D,
|
|
17453
|
+
searchParams: M,
|
|
17454
17454
|
searchValues: E,
|
|
17455
17455
|
setSearchValues: A,
|
|
17456
17456
|
currentView: I,
|
|
@@ -17461,8 +17461,8 @@ const Xv = (t) => {
|
|
|
17461
17461
|
n && N(!0);
|
|
17462
17462
|
}, [n]);
|
|
17463
17463
|
const z = Lt(
|
|
17464
|
-
() => an(
|
|
17465
|
-
[i,
|
|
17464
|
+
() => an(M || [], i),
|
|
17465
|
+
[i, M]
|
|
17466
17466
|
), U = lt(async () => {
|
|
17467
17467
|
if (!n)
|
|
17468
17468
|
return;
|
|
@@ -17511,11 +17511,11 @@ const Xv = (t) => {
|
|
|
17511
17511
|
model: r,
|
|
17512
17512
|
setSearchTreeNameSearch: T,
|
|
17513
17513
|
setSelectedRowItems: v,
|
|
17514
|
-
searchParams:
|
|
17514
|
+
searchParams: M,
|
|
17515
17515
|
setSearchValues: A,
|
|
17516
17516
|
setSearchParams: y,
|
|
17517
17517
|
setSearchVisible: C,
|
|
17518
|
-
setTreeIsLoading:
|
|
17518
|
+
setTreeIsLoading: k,
|
|
17519
17519
|
context: o,
|
|
17520
17520
|
formView: a,
|
|
17521
17521
|
treeView: c,
|
|
@@ -17527,7 +17527,7 @@ const Xv = (t) => {
|
|
|
17527
17527
|
currentId: g,
|
|
17528
17528
|
setActionViewTotalItems: P,
|
|
17529
17529
|
limit: F,
|
|
17530
|
-
setLimit:
|
|
17530
|
+
setLimit: D
|
|
17531
17531
|
}), j = ee(
|
|
17532
17532
|
() => qn([
|
|
17533
17533
|
a == null ? void 0 : a.search_fields,
|
|
@@ -17582,7 +17582,7 @@ const Xv = (t) => {
|
|
|
17582
17582
|
viewData: e,
|
|
17583
17583
|
model: r,
|
|
17584
17584
|
context: o,
|
|
17585
|
-
domain: an(
|
|
17585
|
+
domain: an(M || [], i),
|
|
17586
17586
|
limit: $ ? F : void 0,
|
|
17587
17587
|
fixedHeight: Df,
|
|
17588
17588
|
manualIds: B
|
|
@@ -17785,8 +17785,8 @@ function sb(t, e) {
|
|
|
17785
17785
|
initialSearchParams: y = [],
|
|
17786
17786
|
currentPage: b,
|
|
17787
17787
|
order: C
|
|
17788
|
-
} = t, [w, x] = S(), [P, T] = S([]), [
|
|
17789
|
-
|
|
17788
|
+
} = t, [w, x] = S(), [P, T] = S([]), [k, F] = S(!0), D = p || void 0, [M, E] = S(
|
|
17789
|
+
D
|
|
17790
17790
|
), [A, I] = S([]), [O, _] = S(), [$, G] = S([]), [V, N] = S(), [B, q] = S(), [z, U] = S(!1), [J, X] = S(!1), [Q, le] = S(), { t: W } = Te(), { showErrorNotification: te } = wt(), {
|
|
17791
17791
|
permissions: pe,
|
|
17792
17792
|
loading: j,
|
|
@@ -17937,10 +17937,10 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
17937
17937
|
]);
|
|
17938
17938
|
c({ tabKey: l, canWeClose: Pe }), je(() => {
|
|
17939
17939
|
const Ie = P.find(($e) => $e.type === "tree"), Qe = P.find(($e) => d.id ? $e.type === d.type && $e.view_id === d.id : $e.type === d.type);
|
|
17940
|
-
Ae(Qe || Ie), p ? se == null || se(
|
|
17940
|
+
Ae(Qe || Ie), p ? se == null || se(D) : (De(void 0), _(void 0)), ye();
|
|
17941
17941
|
}, [r, i, p]), je(() => {
|
|
17942
17942
|
if (ue === l) {
|
|
17943
|
-
se == null || se(
|
|
17943
|
+
se == null || se(M);
|
|
17944
17944
|
const Ie = { action_id: m, action_type: g };
|
|
17945
17945
|
me == null || me({ ...w, extra: Ie });
|
|
17946
17946
|
}
|
|
@@ -18008,7 +18008,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
18008
18008
|
}
|
|
18009
18009
|
}
|
|
18010
18010
|
function Ke() {
|
|
18011
|
-
if (
|
|
18011
|
+
if (M === void 0 && w.type === "form")
|
|
18012
18012
|
ie.current.clearAndReload();
|
|
18013
18013
|
else {
|
|
18014
18014
|
De(void 0);
|
|
@@ -18018,7 +18018,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
18018
18018
|
Ae(Ie);
|
|
18019
18019
|
}
|
|
18020
18020
|
}
|
|
18021
|
-
return
|
|
18021
|
+
return k || j ? /* @__PURE__ */ s(st, {}) : w ? /* @__PURE__ */ L(
|
|
18022
18022
|
uy,
|
|
18023
18023
|
{
|
|
18024
18024
|
title: a,
|
|
@@ -18028,7 +18028,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
18028
18028
|
formRef: ie,
|
|
18029
18029
|
searchTreeRef: Y,
|
|
18030
18030
|
onNewClicked: Ke,
|
|
18031
|
-
currentId:
|
|
18031
|
+
currentId: M,
|
|
18032
18032
|
setCurrentId: De,
|
|
18033
18033
|
setCurrentItemIndex: _,
|
|
18034
18034
|
currentItemIndex: O,
|
|
@@ -18058,7 +18058,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
18058
18058
|
{
|
|
18059
18059
|
availableViews: P,
|
|
18060
18060
|
formRef: ie,
|
|
18061
|
-
currentId:
|
|
18061
|
+
currentId: M,
|
|
18062
18062
|
currentView: w,
|
|
18063
18063
|
model: r,
|
|
18064
18064
|
context: o,
|
|
@@ -18224,12 +18224,12 @@ function cb(t, e) {
|
|
|
18224
18224
|
refresh: () => {
|
|
18225
18225
|
x();
|
|
18226
18226
|
},
|
|
18227
|
-
configDashboard:
|
|
18227
|
+
configDashboard: M
|
|
18228
18228
|
}));
|
|
18229
18229
|
async function x() {
|
|
18230
18230
|
d(!0), p(!0), u(void 0);
|
|
18231
18231
|
try {
|
|
18232
|
-
const E = await P(), A = await
|
|
18232
|
+
const E = await P(), A = await k(E), I = E.fields[Po].relation, O = A[Po].items;
|
|
18233
18233
|
v.current = E.fields;
|
|
18234
18234
|
const _ = await T({
|
|
18235
18235
|
items: O,
|
|
@@ -18272,7 +18272,7 @@ function cb(t, e) {
|
|
|
18272
18272
|
});
|
|
18273
18273
|
return O;
|
|
18274
18274
|
}
|
|
18275
|
-
async function
|
|
18275
|
+
async function k(E) {
|
|
18276
18276
|
return (await b({
|
|
18277
18277
|
model: n,
|
|
18278
18278
|
ids: [o],
|
|
@@ -18294,7 +18294,7 @@ function cb(t, e) {
|
|
|
18294
18294
|
}
|
|
18295
18295
|
return await Promise.all(A);
|
|
18296
18296
|
}
|
|
18297
|
-
async function
|
|
18297
|
+
async function D(E) {
|
|
18298
18298
|
if (!g)
|
|
18299
18299
|
return;
|
|
18300
18300
|
const A = E.filter(($) => {
|
|
@@ -18337,10 +18337,10 @@ function cb(t, e) {
|
|
|
18337
18337
|
context: r
|
|
18338
18338
|
});
|
|
18339
18339
|
}
|
|
18340
|
-
async function
|
|
18340
|
+
async function M() {
|
|
18341
18341
|
m(i);
|
|
18342
18342
|
}
|
|
18343
|
-
return l ? /* @__PURE__ */ s(Kt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Ot, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(lb, { onPositionItemsChanged:
|
|
18343
|
+
return l ? /* @__PURE__ */ s(Kt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Ot, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(lb, { onPositionItemsChanged: D, children: a.map((E, A) => {
|
|
18344
18344
|
const { actionData: I, values: O } = E, { position: _, id: $ } = O, {
|
|
18345
18345
|
actionId: G,
|
|
18346
18346
|
actionType: V,
|
|
@@ -18477,18 +18477,18 @@ const db = Ht(cb), ub = (t) => {
|
|
|
18477
18477
|
const { ooui: e } = t;
|
|
18478
18478
|
return /* @__PURE__ */ s(Ye, { type: "array", ...t, children: /* @__PURE__ */ s(fb, { ooui: e }) });
|
|
18479
18479
|
}, fb = (t) => {
|
|
18480
|
-
const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((
|
|
18480
|
+
const { value: e, ooui: n, onChange: r } = t, { items: o = [] } = e || {}, i = o.filter((k) => k.operation !== "pendingRemove").map((k) => k.id), [a, c] = S([]), [l, d] = S(), [f, u] = S(!1), { relation: p, context: m, readOnly: g, field: h, columns: v } = n, y = ge(nt), { getContext: b } = y || {};
|
|
18481
18481
|
je(() => {
|
|
18482
18482
|
w();
|
|
18483
18483
|
}, [o]);
|
|
18484
|
-
const C = (
|
|
18484
|
+
const C = (k) => {
|
|
18485
18485
|
r == null || r({
|
|
18486
|
-
items:
|
|
18486
|
+
items: k
|
|
18487
18487
|
});
|
|
18488
18488
|
};
|
|
18489
18489
|
async function w() {
|
|
18490
18490
|
u(!0);
|
|
18491
|
-
let
|
|
18491
|
+
let k = [];
|
|
18492
18492
|
if (n.domain) {
|
|
18493
18493
|
const F = await H.getHandler().evalDomain({
|
|
18494
18494
|
domain: n.domain,
|
|
@@ -18499,20 +18499,20 @@ const db = Ht(cb), ub = (t) => {
|
|
|
18499
18499
|
fields: y == null ? void 0 : y.getFields(),
|
|
18500
18500
|
context: y.getContext()
|
|
18501
18501
|
});
|
|
18502
|
-
|
|
18502
|
+
k = [...k, ...F];
|
|
18503
18503
|
}
|
|
18504
18504
|
try {
|
|
18505
|
-
const
|
|
18505
|
+
const D = (await H.getHandler().search({
|
|
18506
18506
|
model: p,
|
|
18507
|
-
params:
|
|
18507
|
+
params: k,
|
|
18508
18508
|
fieldsToRetrieve: [h],
|
|
18509
18509
|
context: { ...b == null ? void 0 : b(), ...m }
|
|
18510
|
-
})).map((
|
|
18511
|
-
const E =
|
|
18510
|
+
})).map((M) => {
|
|
18511
|
+
const E = M[h];
|
|
18512
18512
|
let A = E;
|
|
18513
|
-
return Array.isArray(E) && (A = E[1]), { label: A, value:
|
|
18513
|
+
return Array.isArray(E) && (A = E[1]), { label: A, value: M.id };
|
|
18514
18514
|
});
|
|
18515
|
-
c(
|
|
18515
|
+
c(D);
|
|
18516
18516
|
} catch (F) {
|
|
18517
18517
|
d(F);
|
|
18518
18518
|
} finally {
|
|
@@ -18522,16 +18522,16 @@ const db = Ht(cb), ub = (t) => {
|
|
|
18522
18522
|
return console.error(l), /* @__PURE__ */ s(Ot, { className: "mt-10", message: l, type: "error", banner: !0 });
|
|
18523
18523
|
}
|
|
18524
18524
|
const x = () => {
|
|
18525
|
-
T(a.map((
|
|
18525
|
+
T(a.map((k) => k.value));
|
|
18526
18526
|
}, P = () => {
|
|
18527
18527
|
T([]);
|
|
18528
|
-
}, T = (
|
|
18529
|
-
const F = o.map((
|
|
18530
|
-
...
|
|
18528
|
+
}, T = (k) => {
|
|
18529
|
+
const F = o.map((M) => k.includes(M.id) ? M.operation === "pendingRemove" ? {
|
|
18530
|
+
...M,
|
|
18531
18531
|
operation: "original"
|
|
18532
|
-
} :
|
|
18533
|
-
|
|
18534
|
-
F.push({ id:
|
|
18532
|
+
} : M : { id: M.id, operation: "pendingRemove" }), D = F.map((M) => M.id);
|
|
18533
|
+
k.filter((M) => !D.includes(M)).forEach((M) => {
|
|
18534
|
+
F.push({ id: M, operation: "pendingLink" });
|
|
18535
18535
|
}), C(F);
|
|
18536
18536
|
};
|
|
18537
18537
|
return f && a.length === 0 ? /* @__PURE__ */ s(st, {}) : /* @__PURE__ */ s(we, { children: /* @__PURE__ */ L("div", { className: "flex flex-row", children: [
|
|
@@ -18542,7 +18542,7 @@ const db = Ht(cb), ub = (t) => {
|
|
|
18542
18542
|
disabled: g,
|
|
18543
18543
|
onChange: T,
|
|
18544
18544
|
style: { width: "100%" },
|
|
18545
|
-
children: /* @__PURE__ */ s(Xe, { children: a.map((
|
|
18545
|
+
children: /* @__PURE__ */ s(Xe, { children: a.map((k) => /* @__PURE__ */ s(ke, { span: Math.floor(24 / v), children: /* @__PURE__ */ s(sr, { value: k.value, children: k.label }) }, k.value)) })
|
|
18546
18546
|
}
|
|
18547
18547
|
),
|
|
18548
18548
|
!g && /* @__PURE__ */ L(ct, { children: [
|
|
@@ -18921,7 +18921,7 @@ function Ub(t, e) {
|
|
|
18921
18921
|
return console.error(q), [];
|
|
18922
18922
|
}
|
|
18923
18923
|
})();
|
|
18924
|
-
|
|
18924
|
+
M({
|
|
18925
18925
|
...A,
|
|
18926
18926
|
limit: _,
|
|
18927
18927
|
context: { ...l, ...N },
|
|
@@ -18944,7 +18944,7 @@ function Ub(t, e) {
|
|
|
18944
18944
|
type: "form",
|
|
18945
18945
|
context: l
|
|
18946
18946
|
});
|
|
18947
|
-
return await
|
|
18947
|
+
return await M({
|
|
18948
18948
|
action_id: -1,
|
|
18949
18949
|
action_type: "ir.actions.act_window",
|
|
18950
18950
|
model: A,
|
|
@@ -19025,7 +19025,7 @@ function Ub(t, e) {
|
|
|
19025
19025
|
const [me, se] = Y[0];
|
|
19026
19026
|
de = { id: me, type: se };
|
|
19027
19027
|
}
|
|
19028
|
-
|
|
19028
|
+
M({
|
|
19029
19029
|
domain: [...Q, ...G],
|
|
19030
19030
|
context: { ...l, ...J },
|
|
19031
19031
|
model: le,
|
|
@@ -19064,7 +19064,7 @@ function Ub(t, e) {
|
|
|
19064
19064
|
}
|
|
19065
19065
|
]), o(O);
|
|
19066
19066
|
}
|
|
19067
|
-
async function
|
|
19067
|
+
async function k({
|
|
19068
19068
|
relateData: A,
|
|
19069
19069
|
fields: I,
|
|
19070
19070
|
values: O,
|
|
@@ -19091,7 +19091,7 @@ function Ub(t, e) {
|
|
|
19091
19091
|
fields: I,
|
|
19092
19092
|
context: { ...l, ...W }
|
|
19093
19093
|
}) : [];
|
|
19094
|
-
|
|
19094
|
+
M({
|
|
19095
19095
|
model: G,
|
|
19096
19096
|
target: q,
|
|
19097
19097
|
views: B,
|
|
@@ -19165,7 +19165,7 @@ function Ub(t, e) {
|
|
|
19165
19165
|
} else
|
|
19166
19166
|
[Y, de] = ie.find((se) => se[0] === void 0 ? !1 : se[0] === $);
|
|
19167
19167
|
const me = { id: Y, type: de };
|
|
19168
|
-
|
|
19168
|
+
M({
|
|
19169
19169
|
domain: J,
|
|
19170
19170
|
context: { ...l, ...U },
|
|
19171
19171
|
model: Q,
|
|
@@ -19185,7 +19185,7 @@ function Ub(t, e) {
|
|
|
19185
19185
|
}
|
|
19186
19186
|
});
|
|
19187
19187
|
}
|
|
19188
|
-
async function
|
|
19188
|
+
async function D({
|
|
19189
19189
|
model: A,
|
|
19190
19190
|
values: I,
|
|
19191
19191
|
forced_values: O,
|
|
@@ -19205,7 +19205,7 @@ function Ub(t, e) {
|
|
|
19205
19205
|
context: V
|
|
19206
19206
|
});
|
|
19207
19207
|
}
|
|
19208
|
-
async function
|
|
19208
|
+
async function M(A) {
|
|
19209
19209
|
var j;
|
|
19210
19210
|
const {
|
|
19211
19211
|
domain: I,
|
|
@@ -19306,7 +19306,7 @@ function Ub(t, e) {
|
|
|
19306
19306
|
$.push([q, B]);
|
|
19307
19307
|
}
|
|
19308
19308
|
const [G, V] = $[0];
|
|
19309
|
-
return await
|
|
19309
|
+
return await M({
|
|
19310
19310
|
action_id: -1,
|
|
19311
19311
|
action_type: "ir.actions.act_window",
|
|
19312
19312
|
model: A,
|
|
@@ -19325,9 +19325,9 @@ function Ub(t, e) {
|
|
|
19325
19325
|
zf,
|
|
19326
19326
|
{
|
|
19327
19327
|
openShortcut: F,
|
|
19328
|
-
openAction:
|
|
19329
|
-
openRelate:
|
|
19330
|
-
openDefaultActionForModel:
|
|
19328
|
+
openAction: M,
|
|
19329
|
+
openRelate: k,
|
|
19330
|
+
openDefaultActionForModel: D,
|
|
19331
19331
|
tabs: p,
|
|
19332
19332
|
activeKey: r,
|
|
19333
19333
|
onRemoveTab: async (A) => {
|
|
@@ -19377,14 +19377,14 @@ function qb(t) {
|
|
|
19377
19377
|
f(!0), p(e);
|
|
19378
19378
|
}, [e]), T = R(() => {
|
|
19379
19379
|
a && u.trim() !== e.trim() && a(r, u.trim()), f(!1);
|
|
19380
|
-
}, [a, u, e, r]),
|
|
19380
|
+
}, [a, u, e, r]), k = R(() => {
|
|
19381
19381
|
p(e), f(!1);
|
|
19382
19382
|
}, [e]), F = R(
|
|
19383
|
-
(
|
|
19384
|
-
|
|
19383
|
+
(M) => {
|
|
19384
|
+
M.key === "Enter" ? T() : M.key === "Escape" && k();
|
|
19385
19385
|
},
|
|
19386
|
-
[T,
|
|
19387
|
-
),
|
|
19386
|
+
[T, k]
|
|
19387
|
+
), D = R(() => {
|
|
19388
19388
|
T();
|
|
19389
19389
|
}, [T]);
|
|
19390
19390
|
return /* @__PURE__ */ L(
|
|
@@ -19434,8 +19434,8 @@ function qb(t) {
|
|
|
19434
19434
|
!w && !d && !o && i(r);
|
|
19435
19435
|
}, [w, d, o, i, r]),
|
|
19436
19436
|
onMouseDown: R(
|
|
19437
|
-
(
|
|
19438
|
-
|
|
19437
|
+
(M) => {
|
|
19438
|
+
M.button === 1 && (M.preventDefault(), n(r));
|
|
19439
19439
|
},
|
|
19440
19440
|
[n, r]
|
|
19441
19441
|
),
|
|
@@ -19466,9 +19466,9 @@ function qb(t) {
|
|
|
19466
19466
|
{
|
|
19467
19467
|
ref: m,
|
|
19468
19468
|
value: u,
|
|
19469
|
-
onChange: (
|
|
19469
|
+
onChange: (M) => p(M.target.value),
|
|
19470
19470
|
onKeyDown: F,
|
|
19471
|
-
onBlur:
|
|
19471
|
+
onBlur: D,
|
|
19472
19472
|
style: {
|
|
19473
19473
|
width: Math.max(u.length * 8, 50),
|
|
19474
19474
|
height: 24,
|
|
@@ -19477,8 +19477,8 @@ function qb(t) {
|
|
|
19477
19477
|
border: `1px solid ${c.colorPrimaryActive}`,
|
|
19478
19478
|
borderRadius: c.borderRadius
|
|
19479
19479
|
},
|
|
19480
|
-
onClick: (
|
|
19481
|
-
onMouseDown: (
|
|
19480
|
+
onClick: (M) => M.stopPropagation(),
|
|
19481
|
+
onMouseDown: (M) => M.stopPropagation()
|
|
19482
19482
|
}
|
|
19483
19483
|
) : e || ""
|
|
19484
19484
|
}
|
|
@@ -19500,8 +19500,8 @@ function qb(t) {
|
|
|
19500
19500
|
color: c.colorPrimaryActive
|
|
19501
19501
|
},
|
|
19502
19502
|
onClick: R(
|
|
19503
|
-
(
|
|
19504
|
-
|
|
19503
|
+
(M) => {
|
|
19504
|
+
M.stopPropagation(), n(r);
|
|
19505
19505
|
},
|
|
19506
19506
|
[n, r]
|
|
19507
19507
|
)
|
|
@@ -19653,15 +19653,15 @@ const { useToken: zb } = rt, Jw = (t) => {
|
|
|
19653
19653
|
} = m || {}, w = ee(() => {
|
|
19654
19654
|
if (!y || !y.view_id || !y.extra)
|
|
19655
19655
|
return;
|
|
19656
|
-
const { action_id:
|
|
19657
|
-
if (!
|
|
19656
|
+
const { action_id: M, action_type: E } = y.extra || {};
|
|
19657
|
+
if (!M || !E) {
|
|
19658
19658
|
c(!1);
|
|
19659
19659
|
return;
|
|
19660
19660
|
}
|
|
19661
19661
|
const A = y.view_id;
|
|
19662
19662
|
let I = !1;
|
|
19663
19663
|
return y.type === "form" && (I = b || !1), {
|
|
19664
|
-
action_id:
|
|
19664
|
+
action_id: M,
|
|
19665
19665
|
action_type: E,
|
|
19666
19666
|
view_id: A,
|
|
19667
19667
|
res_id: I
|
|
@@ -19673,30 +19673,30 @@ const { useToken: zb } = rt, Jw = (t) => {
|
|
|
19673
19673
|
fe(() => {
|
|
19674
19674
|
T();
|
|
19675
19675
|
}, [x]);
|
|
19676
|
-
function P(
|
|
19677
|
-
const E =
|
|
19676
|
+
function P(M) {
|
|
19677
|
+
const E = M;
|
|
19678
19678
|
(E == null ? void 0 : E.action_type) !== "ir.actions.wizard" && g(E);
|
|
19679
19679
|
}
|
|
19680
19680
|
const T = R(async () => {
|
|
19681
19681
|
if (!w)
|
|
19682
19682
|
return;
|
|
19683
|
-
const
|
|
19684
|
-
|
|
19683
|
+
const M = await n(w);
|
|
19684
|
+
M !== !1 && d(M), c(M !== !1);
|
|
19685
19685
|
}, [w, n]);
|
|
19686
|
-
async function
|
|
19687
|
-
var
|
|
19688
|
-
(
|
|
19686
|
+
async function k() {
|
|
19687
|
+
var M;
|
|
19688
|
+
(M = p == null ? void 0 : p.current) == null || M.close(), C == null || C({ model: "ir.ui.view_sc" });
|
|
19689
19689
|
}
|
|
19690
19690
|
const F = R(async () => {
|
|
19691
|
-
const
|
|
19692
|
-
return
|
|
19691
|
+
const M = await e();
|
|
19692
|
+
return M.length === 0 ? [
|
|
19693
19693
|
{
|
|
19694
19694
|
label: f == null ? void 0 : f("no_favorites"),
|
|
19695
19695
|
items: []
|
|
19696
19696
|
}
|
|
19697
19697
|
] : [
|
|
19698
19698
|
{
|
|
19699
|
-
items:
|
|
19699
|
+
items: M.map((A) => ({
|
|
19700
19700
|
...A,
|
|
19701
19701
|
id: A.id,
|
|
19702
19702
|
name: A.name,
|
|
@@ -19704,13 +19704,13 @@ const { useToken: zb } = rt, Jw = (t) => {
|
|
|
19704
19704
|
}))
|
|
19705
19705
|
}
|
|
19706
19706
|
];
|
|
19707
|
-
}, [e, f]),
|
|
19707
|
+
}, [e, f]), D = R(async () => {
|
|
19708
19708
|
if (a && l)
|
|
19709
19709
|
await o(l);
|
|
19710
19710
|
else {
|
|
19711
19711
|
if (!y)
|
|
19712
19712
|
return;
|
|
19713
|
-
const
|
|
19713
|
+
const M = h.find((_) => _.key === v), { action_id: E, action_type: A } = (M == null ? void 0 : M.action) || {}, I = y.view_id;
|
|
19714
19714
|
let O = !1;
|
|
19715
19715
|
if (!E || !A) {
|
|
19716
19716
|
c(!1);
|
|
@@ -19740,7 +19740,7 @@ const { useToken: zb } = rt, Jw = (t) => {
|
|
|
19740
19740
|
{
|
|
19741
19741
|
ref: p,
|
|
19742
19742
|
isFavourite: a,
|
|
19743
|
-
onToggleFavourite:
|
|
19743
|
+
onToggleFavourite: D,
|
|
19744
19744
|
onItemClick: P,
|
|
19745
19745
|
placement: "bottomRight",
|
|
19746
19746
|
header: /* @__PURE__ */ L("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
@@ -19749,12 +19749,12 @@ const { useToken: zb } = rt, Jw = (t) => {
|
|
|
19749
19749
|
as,
|
|
19750
19750
|
{
|
|
19751
19751
|
style: { color: u.colorPrimary, cursor: "pointer" },
|
|
19752
|
-
onClick:
|
|
19752
|
+
onClick: k
|
|
19753
19753
|
}
|
|
19754
19754
|
) }) })
|
|
19755
19755
|
] }),
|
|
19756
|
-
onOpenChange: (
|
|
19757
|
-
|
|
19756
|
+
onOpenChange: (M) => {
|
|
19757
|
+
M || i == null || i();
|
|
19758
19758
|
},
|
|
19759
19759
|
onRetrieveData: F
|
|
19760
19760
|
}
|