@gisce/react-ooui 2.75.0-alpha.4 → 2.75.0-alpha.6
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
|
@@ -479,7 +479,7 @@ const No = (e) => {
|
|
|
479
479
|
return C && /* @__PURE__ */ s(C, {});
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
async function
|
|
482
|
+
async function A() {
|
|
483
483
|
l && o && (g(!0), await p({ type: l, action: o, context: u }), g(!1));
|
|
484
484
|
}
|
|
485
485
|
function x() {
|
|
@@ -488,12 +488,12 @@ const No = (e) => {
|
|
|
488
488
|
confirmMessage: c,
|
|
489
489
|
t: v,
|
|
490
490
|
onOk: () => {
|
|
491
|
-
|
|
491
|
+
A();
|
|
492
492
|
}
|
|
493
493
|
});
|
|
494
494
|
return;
|
|
495
495
|
}
|
|
496
|
-
|
|
496
|
+
A();
|
|
497
497
|
}
|
|
498
498
|
if (t.buttons.length === 0)
|
|
499
499
|
return null;
|
|
@@ -552,7 +552,7 @@ const No = (e) => {
|
|
|
552
552
|
}
|
|
553
553
|
v();
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function A() {
|
|
556
556
|
if (y)
|
|
557
557
|
return /* @__PURE__ */ s(Nt, {});
|
|
558
558
|
if (u) {
|
|
@@ -565,7 +565,7 @@ const No = (e) => {
|
|
|
565
565
|
{
|
|
566
566
|
disabled: !c || h,
|
|
567
567
|
onClick: b,
|
|
568
|
-
icon:
|
|
568
|
+
icon: A(),
|
|
569
569
|
danger: p,
|
|
570
570
|
children: l
|
|
571
571
|
},
|
|
@@ -643,14 +643,14 @@ const ji = (e) => {
|
|
|
643
643
|
async function b() {
|
|
644
644
|
m(!0);
|
|
645
645
|
try {
|
|
646
|
-
const w = await
|
|
646
|
+
const w = await A();
|
|
647
647
|
await x(w);
|
|
648
648
|
} catch (w) {
|
|
649
649
|
bt(w);
|
|
650
650
|
}
|
|
651
651
|
m(!1);
|
|
652
652
|
}
|
|
653
|
-
async function
|
|
653
|
+
async function A() {
|
|
654
654
|
const S = (await $.getHandler().search({
|
|
655
655
|
params: [["translatable", "=", "1"]],
|
|
656
656
|
fieldsToRetrieve: ["code", "name"],
|
|
@@ -693,7 +693,7 @@ const ji = (e) => {
|
|
|
693
693
|
) })
|
|
694
694
|
] }, S));
|
|
695
695
|
}
|
|
696
|
-
async function
|
|
696
|
+
async function _() {
|
|
697
697
|
p(!0);
|
|
698
698
|
try {
|
|
699
699
|
for (const w of Object.keys(y))
|
|
@@ -730,7 +730,7 @@ const ji = (e) => {
|
|
|
730
730
|
{
|
|
731
731
|
icon: h ? /* @__PURE__ */ s(Nt, {}) : /* @__PURE__ */ s(nr, {}),
|
|
732
732
|
disabled: h,
|
|
733
|
-
onClick:
|
|
733
|
+
onClick: _,
|
|
734
734
|
style: { marginLeft: 15 },
|
|
735
735
|
type: "primary",
|
|
736
736
|
children: c("ok")
|
|
@@ -879,7 +879,7 @@ const Gi = nt(
|
|
|
879
879
|
u(!0);
|
|
880
880
|
}, [c, m]), b = O(() => {
|
|
881
881
|
u(!1);
|
|
882
|
-
}, []),
|
|
882
|
+
}, []), A = O(() => {
|
|
883
883
|
u(!1), l == null || l({
|
|
884
884
|
forceRefresh: !0
|
|
885
885
|
});
|
|
@@ -905,7 +905,7 @@ const Gi = nt(
|
|
|
905
905
|
field: n,
|
|
906
906
|
visible: f,
|
|
907
907
|
onCloseModal: b,
|
|
908
|
-
onSubmitSucceed:
|
|
908
|
+
onSubmitSucceed: A
|
|
909
909
|
}
|
|
910
910
|
)
|
|
911
911
|
] }) : /* @__PURE__ */ V(Ke, { gutter: 8, wrap: !1, children: [
|
|
@@ -1265,7 +1265,7 @@ const Lo = async (e) => {
|
|
|
1265
1265
|
return [
|
|
1266
1266
|
t.map((g) => {
|
|
1267
1267
|
const v = h.find(
|
|
1268
|
-
(
|
|
1268
|
+
(A) => A.id === g.id
|
|
1269
1269
|
), b = {
|
|
1270
1270
|
...g
|
|
1271
1271
|
};
|
|
@@ -1549,21 +1549,21 @@ const pn = ({
|
|
|
1549
1549
|
readOnly: g,
|
|
1550
1550
|
summaryField: v,
|
|
1551
1551
|
titleField: b,
|
|
1552
|
-
iconField:
|
|
1552
|
+
iconField: A,
|
|
1553
1553
|
colorField: x
|
|
1554
|
-
} = r, C = a.filter((
|
|
1554
|
+
} = r, C = a.filter((R) => R.values), _ = ae(Je), { getContext: T } = _ || {};
|
|
1555
1555
|
Ht(() => {
|
|
1556
1556
|
S();
|
|
1557
1557
|
}, [a]);
|
|
1558
|
-
const w = (
|
|
1558
|
+
const w = (R) => {
|
|
1559
1559
|
o == null || o({
|
|
1560
|
-
items:
|
|
1560
|
+
items: R
|
|
1561
1561
|
});
|
|
1562
1562
|
};
|
|
1563
1563
|
async function S() {
|
|
1564
1564
|
l(!0), d(void 0);
|
|
1565
1565
|
try {
|
|
1566
|
-
const [
|
|
1566
|
+
const [R] = await Lo({
|
|
1567
1567
|
treeView: {
|
|
1568
1568
|
fields: n.get("tree").fields,
|
|
1569
1569
|
arch: n.get("tree").arch
|
|
@@ -1576,9 +1576,9 @@ const pn = ({
|
|
|
1576
1576
|
context: { ...T == null ? void 0 : T(), ...y },
|
|
1577
1577
|
currentView: "form"
|
|
1578
1578
|
});
|
|
1579
|
-
w(
|
|
1580
|
-
} catch (
|
|
1581
|
-
d(
|
|
1579
|
+
w(R);
|
|
1580
|
+
} catch (R) {
|
|
1581
|
+
d(R);
|
|
1582
1582
|
} finally {
|
|
1583
1583
|
l(!1);
|
|
1584
1584
|
}
|
|
@@ -1587,26 +1587,26 @@ const pn = ({
|
|
|
1587
1587
|
return /* @__PURE__ */ s(vt, { className: "mt-10", message: c, type: "error", banner: !0 });
|
|
1588
1588
|
if (i)
|
|
1589
1589
|
return /* @__PURE__ */ s(tt, {});
|
|
1590
|
-
const D = (
|
|
1591
|
-
const k = wt(
|
|
1590
|
+
const D = (R) => {
|
|
1591
|
+
const k = wt(R);
|
|
1592
1592
|
return k && /* @__PURE__ */ s(k, {});
|
|
1593
|
-
}, I = C.map((
|
|
1593
|
+
}, I = C.map((R) => {
|
|
1594
1594
|
var E, H, N, B;
|
|
1595
1595
|
const k = {
|
|
1596
1596
|
children: /* @__PURE__ */ s(
|
|
1597
1597
|
ou,
|
|
1598
1598
|
{
|
|
1599
|
-
title: (E =
|
|
1600
|
-
summary: (H =
|
|
1599
|
+
title: (E = R.values) == null ? void 0 : E[b],
|
|
1600
|
+
summary: (H = R.values) == null ? void 0 : H[v],
|
|
1601
1601
|
onClick: () => {
|
|
1602
1602
|
h(
|
|
1603
|
-
C.find((M) =>
|
|
1603
|
+
C.find((M) => R.id === M.id)
|
|
1604
1604
|
), u(!0);
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
)
|
|
1608
1608
|
};
|
|
1609
|
-
return (N =
|
|
1609
|
+
return (N = R.values) != null && N[A] && (k.dot = D(R.values[A])), (B = R.values) != null && B[x] && (k.color = !Li(R.values[x]) && !Hi(R.values[x]) && !R.values[x].toString().startsWith("#") ? or(R.values[x]) : R.values[x]), k;
|
|
1610
1610
|
});
|
|
1611
1611
|
return /* @__PURE__ */ V(se, { children: [
|
|
1612
1612
|
/* @__PURE__ */ s(mi, { style: { padding: "1rem" }, items: I }),
|
|
@@ -2053,20 +2053,20 @@ async function ra({
|
|
|
2053
2053
|
context: l
|
|
2054
2054
|
}) : [], g = [];
|
|
2055
2055
|
for (const x of d) {
|
|
2056
|
-
const [C,
|
|
2056
|
+
const [C, _] = x;
|
|
2057
2057
|
if (C)
|
|
2058
2058
|
g.push(x);
|
|
2059
2059
|
else {
|
|
2060
2060
|
const { view_id: T } = await $.getHandler().getView({
|
|
2061
2061
|
model: c,
|
|
2062
|
-
type:
|
|
2062
|
+
type: _,
|
|
2063
2063
|
id: C,
|
|
2064
2064
|
context: { ...t, ...i }
|
|
2065
2065
|
});
|
|
2066
|
-
g.push([T,
|
|
2066
|
+
g.push([T, _]);
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
|
-
const [v, b] = g[0],
|
|
2069
|
+
const [v, b] = g[0], A = { id: v, type: b };
|
|
2070
2070
|
return {
|
|
2071
2071
|
title: f,
|
|
2072
2072
|
description: h,
|
|
@@ -2077,7 +2077,7 @@ async function ra({
|
|
|
2077
2077
|
model: c,
|
|
2078
2078
|
context: { ...t, ...i },
|
|
2079
2079
|
domain: y,
|
|
2080
|
-
initialView:
|
|
2080
|
+
initialView: A,
|
|
2081
2081
|
limit: u,
|
|
2082
2082
|
treeExpandable: p
|
|
2083
2083
|
};
|
|
@@ -2097,20 +2097,20 @@ const mu = (e) => {
|
|
|
2097
2097
|
});
|
|
2098
2098
|
if (!y.active_id)
|
|
2099
2099
|
throw i(v), new Error("active_id_not_found");
|
|
2100
|
-
const { views: b } = v,
|
|
2100
|
+
const { views: b } = v, A = b.find((x) => {
|
|
2101
2101
|
const [, C] = x;
|
|
2102
2102
|
return C === "tree";
|
|
2103
2103
|
});
|
|
2104
|
-
if (
|
|
2105
|
-
const [x, C] =
|
|
2106
|
-
actionId:
|
|
2104
|
+
if (A) {
|
|
2105
|
+
const [x, C] = A, {
|
|
2106
|
+
actionId: _,
|
|
2107
2107
|
actionType: T,
|
|
2108
2108
|
title: w,
|
|
2109
2109
|
model: S
|
|
2110
2110
|
} = v;
|
|
2111
2111
|
c({
|
|
2112
2112
|
domain: v.domain,
|
|
2113
|
-
action_id:
|
|
2113
|
+
action_id: _,
|
|
2114
2114
|
action_type: T,
|
|
2115
2115
|
name: w,
|
|
2116
2116
|
res_id: !1,
|
|
@@ -2364,9 +2364,9 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2364
2364
|
operator: f,
|
|
2365
2365
|
manualIds: u,
|
|
2366
2366
|
fixedHeight: m
|
|
2367
|
-
} = e, [h, p] = F(!1), [y, g] = F(), [v, b] = F(0), [
|
|
2367
|
+
} = e, [h, p] = F(!1), [y, g] = F(), [v, b] = F(0), [A, x] = F(), [C, _] = F(), [T, w] = F(), [S, D] = F(), [I] = ze(
|
|
2368
2368
|
$.getHandler().searchAllIds
|
|
2369
|
-
), [
|
|
2369
|
+
), [R] = ze(
|
|
2370
2370
|
$.getHandler().readObjects
|
|
2371
2371
|
), [k] = ze(
|
|
2372
2372
|
$.getHandler().searchCount
|
|
@@ -2389,7 +2389,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2389
2389
|
params: P,
|
|
2390
2390
|
model: t,
|
|
2391
2391
|
context: r
|
|
2392
|
-
}), L = await
|
|
2392
|
+
}), L = await R({
|
|
2393
2393
|
model: t,
|
|
2394
2394
|
ids: K,
|
|
2395
2395
|
fieldsToRetrieve: [d],
|
|
@@ -2412,7 +2412,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2412
2412
|
params: P,
|
|
2413
2413
|
model: t,
|
|
2414
2414
|
context: r
|
|
2415
|
-
}), K = await
|
|
2415
|
+
}), K = await R({
|
|
2416
2416
|
model: t,
|
|
2417
2417
|
ids: Y,
|
|
2418
2418
|
fieldsToRetrieve: [d],
|
|
@@ -2451,7 +2451,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2451
2451
|
values: { value: K, percent: Y },
|
|
2452
2452
|
context: r
|
|
2453
2453
|
});
|
|
2454
|
-
|
|
2454
|
+
_(L);
|
|
2455
2455
|
}
|
|
2456
2456
|
if (l)
|
|
2457
2457
|
if (l.indexOf(":") !== -1) {
|
|
@@ -2473,7 +2473,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2473
2473
|
sa,
|
|
2474
2474
|
{
|
|
2475
2475
|
value: y,
|
|
2476
|
-
totalValue:
|
|
2476
|
+
totalValue: A,
|
|
2477
2477
|
percent: v,
|
|
2478
2478
|
color: C,
|
|
2479
2479
|
icon: T,
|
|
@@ -2493,11 +2493,11 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2493
2493
|
manualIds: l
|
|
2494
2494
|
} = e, [c, d] = F(!1), [f, u] = F(), [m, h] = F(), [p, y] = F(), [g, v] = F("line"), [b] = ze(
|
|
2495
2495
|
$.getHandler().getFields
|
|
2496
|
-
), [
|
|
2496
|
+
), [A] = ze(
|
|
2497
2497
|
$.getHandler().readObjects
|
|
2498
2498
|
), [x] = ze($.getHandler().search), C = O(async () => {
|
|
2499
2499
|
d(!0), u(void 0), v(n.type || "line");
|
|
2500
|
-
const
|
|
2500
|
+
const _ = vu({ ooui: n });
|
|
2501
2501
|
let T, w;
|
|
2502
2502
|
try {
|
|
2503
2503
|
({ values: T, fields: w } = await Su({
|
|
@@ -2506,11 +2506,11 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2506
2506
|
context: o,
|
|
2507
2507
|
limit: a,
|
|
2508
2508
|
order: n.timerange ? n.x.name : null,
|
|
2509
|
-
fields:
|
|
2509
|
+
fields: _,
|
|
2510
2510
|
manualIds: l,
|
|
2511
2511
|
methods: {
|
|
2512
2512
|
getFields: b,
|
|
2513
|
-
readObjects:
|
|
2513
|
+
readObjects: A,
|
|
2514
2514
|
search: x
|
|
2515
2515
|
}
|
|
2516
2516
|
}));
|
|
@@ -2555,7 +2555,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
|
|
|
2555
2555
|
t,
|
|
2556
2556
|
n,
|
|
2557
2557
|
m,
|
|
2558
|
-
|
|
2558
|
+
A,
|
|
2559
2559
|
x,
|
|
2560
2560
|
g,
|
|
2561
2561
|
i
|
|
@@ -2805,7 +2805,7 @@ const Iu = {
|
|
|
2805
2805
|
(y) => {
|
|
2806
2806
|
if (!d)
|
|
2807
2807
|
return;
|
|
2808
|
-
const g = d.find((
|
|
2808
|
+
const g = d.find((A) => A.x === y);
|
|
2809
2809
|
return `${`${(g == null ? void 0 : g.percent) || 0}`}%`;
|
|
2810
2810
|
},
|
|
2811
2811
|
[d]
|
|
@@ -3337,7 +3337,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
|
|
|
3337
3337
|
);
|
|
3338
3338
|
async function g(T) {
|
|
3339
3339
|
const { reportData: w, fields: S, values: D, context: I = {} } = T, {
|
|
3340
|
-
context:
|
|
3340
|
+
context: R,
|
|
3341
3341
|
model: k,
|
|
3342
3342
|
datas: E = {},
|
|
3343
3343
|
report_name: H,
|
|
@@ -3347,11 +3347,11 @@ const Vn = Tt.createContext(null), As = async (e) => {
|
|
|
3347
3347
|
bt(`${N} action not supported`);
|
|
3348
3348
|
return;
|
|
3349
3349
|
}
|
|
3350
|
-
const { ids: B } = E || {}, M = B || [], P = typeof
|
|
3351
|
-
context:
|
|
3350
|
+
const { ids: B } = E || {}, M = B || [], P = typeof R == "string" ? Xt({
|
|
3351
|
+
context: R,
|
|
3352
3352
|
fields: S,
|
|
3353
3353
|
values: D
|
|
3354
|
-
}) :
|
|
3354
|
+
}) : R;
|
|
3355
3355
|
try {
|
|
3356
3356
|
const Y = await $.getHandler().createReport({
|
|
3357
3357
|
model: k,
|
|
@@ -3388,25 +3388,25 @@ const Vn = Tt.createContext(null), As = async (e) => {
|
|
|
3388
3388
|
context: D,
|
|
3389
3389
|
onRefreshParentValues: I
|
|
3390
3390
|
}) {
|
|
3391
|
-
const { type:
|
|
3392
|
-
if (I && f.current.push(I),
|
|
3391
|
+
const { type: R } = T;
|
|
3392
|
+
if (I && f.current.push(I), R === "ir.actions.report.xml")
|
|
3393
3393
|
return await g({
|
|
3394
3394
|
reportData: T,
|
|
3395
3395
|
fields: w,
|
|
3396
3396
|
values: S,
|
|
3397
3397
|
context: D
|
|
3398
3398
|
});
|
|
3399
|
-
if (
|
|
3400
|
-
return await
|
|
3401
|
-
if (
|
|
3399
|
+
if (R === "ir.actions.act_window")
|
|
3400
|
+
return await A({ actionData: T, fields: w, values: S, context: D });
|
|
3401
|
+
if (R === "ir.actions.act_url")
|
|
3402
3402
|
window.open(
|
|
3403
3403
|
ru(T.url, { ...S, context: D }),
|
|
3404
3404
|
"_blank"
|
|
3405
3405
|
);
|
|
3406
3406
|
else
|
|
3407
|
-
return bt(`${
|
|
3407
|
+
return bt(`${R} action not supported`), {};
|
|
3408
3408
|
}
|
|
3409
|
-
async function
|
|
3409
|
+
async function A({
|
|
3410
3410
|
actionData: T,
|
|
3411
3411
|
fields: w = {},
|
|
3412
3412
|
values: S = {},
|
|
@@ -3419,7 +3419,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
|
|
|
3419
3419
|
ids: [parseInt(T.id)],
|
|
3420
3420
|
context: D
|
|
3421
3421
|
}))[0]);
|
|
3422
|
-
const
|
|
3422
|
+
const R = I == null ? void 0 : I.context, k = typeof (I == null ? void 0 : I.context) == "string" ? Xt({
|
|
3423
3423
|
context: I.context,
|
|
3424
3424
|
fields: w,
|
|
3425
3425
|
values: { ...S, ...r }
|
|
@@ -3468,7 +3468,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
|
|
|
3468
3468
|
action_id: I.id,
|
|
3469
3469
|
action_type: I.type,
|
|
3470
3470
|
actionRawData: {
|
|
3471
|
-
context:
|
|
3471
|
+
context: R,
|
|
3472
3472
|
domain: N,
|
|
3473
3473
|
fields: w,
|
|
3474
3474
|
values: S
|
|
@@ -3499,9 +3499,9 @@ const Vn = Tt.createContext(null), As = async (e) => {
|
|
|
3499
3499
|
context: {},
|
|
3500
3500
|
formView: void 0,
|
|
3501
3501
|
actionData: void 0
|
|
3502
|
-
}), h(!1), await new Promise((
|
|
3502
|
+
}), h(!1), await new Promise((R) => setTimeout(R, 300)), y({ domain: T, model: w, context: D, formView: S, actionData: I }), h(!0);
|
|
3503
3503
|
}
|
|
3504
|
-
async function
|
|
3504
|
+
async function _() {
|
|
3505
3505
|
As(f.current), f.current = [], h(!1), y({
|
|
3506
3506
|
domain: void 0,
|
|
3507
3507
|
model: void 0,
|
|
@@ -3540,7 +3540,7 @@ const Vn = Tt.createContext(null), As = async (e) => {
|
|
|
3540
3540
|
model: p.model,
|
|
3541
3541
|
formView: p.formView,
|
|
3542
3542
|
visible: m,
|
|
3543
|
-
onSubmitSucceed:
|
|
3543
|
+
onSubmitSucceed: _,
|
|
3544
3544
|
onCancel: () => {
|
|
3545
3545
|
As(f.current), f.current = [], h(!1), y({
|
|
3546
3546
|
domain: void 0,
|
|
@@ -3708,8 +3708,8 @@ function Lr({ res_id: e, searchParams: t }) {
|
|
|
3708
3708
|
try {
|
|
3709
3709
|
const C = document.createElement("textarea");
|
|
3710
3710
|
C.value = x, document.body.appendChild(C), C.select(), C.setSelectionRange(0, 99999);
|
|
3711
|
-
const
|
|
3712
|
-
if (document.body.removeChild(C),
|
|
3711
|
+
const _ = document.execCommand("copy");
|
|
3712
|
+
if (document.body.removeChild(C), _)
|
|
3713
3713
|
u(!0), Yn.success(d("urlCopiedToClipboard")), setTimeout(() => u(!1), 2e3);
|
|
3714
3714
|
else
|
|
3715
3715
|
throw new Error("Copy command was unsuccessful.");
|
|
@@ -3732,7 +3732,7 @@ function Lr({ res_id: e, searchParams: t }) {
|
|
|
3732
3732
|
}, g = ha(y), { type: v } = l || {};
|
|
3733
3733
|
let b = !p;
|
|
3734
3734
|
v === "form" && (b = !p || !e);
|
|
3735
|
-
const
|
|
3735
|
+
const A = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ V(at.Compact, { style: { width: "100%" }, children: [
|
|
3736
3736
|
/* @__PURE__ */ s(
|
|
3737
3737
|
pt,
|
|
3738
3738
|
{
|
|
@@ -3769,7 +3769,7 @@ function Lr({ res_id: e, searchParams: t }) {
|
|
|
3769
3769
|
}
|
|
3770
3770
|
)
|
|
3771
3771
|
] }) });
|
|
3772
|
-
return /* @__PURE__ */ s("div", { style: { maxHeight: 28 }, children: /* @__PURE__ */ s($l, { content:
|
|
3772
|
+
return /* @__PURE__ */ s("div", { style: { maxHeight: 28 }, children: /* @__PURE__ */ s($l, { content: A, trigger: "click", placement: "bottom", children: /* @__PURE__ */ s("div", { ref: n, children: /* @__PURE__ */ s(
|
|
3773
3773
|
yt,
|
|
3774
3774
|
{
|
|
3775
3775
|
style: { height: 28 },
|
|
@@ -3801,16 +3801,16 @@ function Zu({
|
|
|
3801
3801
|
searchParams: g,
|
|
3802
3802
|
searchVisible: v,
|
|
3803
3803
|
setSearchVisible: b,
|
|
3804
|
-
setSearchTreeNameSearch:
|
|
3804
|
+
setSearchTreeNameSearch: A,
|
|
3805
3805
|
searchTreeNameSearch: x,
|
|
3806
3806
|
treeIsLoading: C,
|
|
3807
|
-
setPreviousView:
|
|
3807
|
+
setPreviousView: _,
|
|
3808
3808
|
previousView: T,
|
|
3809
3809
|
results: w,
|
|
3810
3810
|
limit: S,
|
|
3811
3811
|
totalItems: D,
|
|
3812
3812
|
isActive: I,
|
|
3813
|
-
treeType:
|
|
3813
|
+
treeType: R,
|
|
3814
3814
|
setSearchParams: k,
|
|
3815
3815
|
setSearchValues: E
|
|
3816
3816
|
} = ae(St), H = Kt(
|
|
@@ -3874,20 +3874,20 @@ function Zu({
|
|
|
3874
3874
|
c
|
|
3875
3875
|
]), ce = O(
|
|
3876
3876
|
(z) => {
|
|
3877
|
-
|
|
3877
|
+
_ == null || _(a), i == null || i(z);
|
|
3878
3878
|
},
|
|
3879
|
-
[a,
|
|
3879
|
+
[a, _, i]
|
|
3880
3880
|
), ne = O(
|
|
3881
3881
|
(z) => {
|
|
3882
|
-
z !== x && (z && z.trim().length > 0 && (k == null || k([]), E == null || E({})),
|
|
3882
|
+
z !== x && (z && z.trim().length > 0 && (k == null || k([]), E == null || E({})), A == null || A(z), x !== void 0 && R !== "infinite" && setTimeout(() => {
|
|
3883
3883
|
var ee;
|
|
3884
3884
|
(ee = h == null ? void 0 : h.current) == null || ee.refreshResults();
|
|
3885
3885
|
}, 50));
|
|
3886
3886
|
},
|
|
3887
3887
|
[
|
|
3888
3888
|
x,
|
|
3889
|
+
A,
|
|
3889
3890
|
R,
|
|
3890
|
-
_,
|
|
3891
3891
|
k,
|
|
3892
3892
|
E,
|
|
3893
3893
|
h
|
|
@@ -3916,7 +3916,7 @@ function Zu({
|
|
|
3916
3916
|
[m, e, w, ie, l]
|
|
3917
3917
|
);
|
|
3918
3918
|
le(() => {
|
|
3919
|
-
if (
|
|
3919
|
+
if (R === "infinite" && x === void 0) {
|
|
3920
3920
|
if (P.current) {
|
|
3921
3921
|
P.current = !1;
|
|
3922
3922
|
return;
|
|
@@ -3926,13 +3926,13 @@ function Zu({
|
|
|
3926
3926
|
(z = h == null ? void 0 : h.current) == null || z.refreshResults();
|
|
3927
3927
|
}, 0);
|
|
3928
3928
|
}
|
|
3929
|
-
}, [
|
|
3929
|
+
}, [R, x, h]), an(
|
|
3930
3930
|
"ctrl+l,command+l",
|
|
3931
3931
|
() => {
|
|
3932
|
-
I && T && (
|
|
3932
|
+
I && T && (_ == null || _(a), i == null || i(T));
|
|
3933
3933
|
},
|
|
3934
3934
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
3935
|
-
[T, a, I,
|
|
3935
|
+
[T, a, I, _, i]
|
|
3936
3936
|
), an(
|
|
3937
3937
|
"ctrl+f,command+f",
|
|
3938
3938
|
() => {
|
|
@@ -4437,13 +4437,13 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
|
|
|
4437
4437
|
});
|
|
4438
4438
|
a(x);
|
|
4439
4439
|
const C = uf(x);
|
|
4440
|
-
let
|
|
4441
|
-
if (C.length > 0 && (
|
|
4440
|
+
let _ = {};
|
|
4441
|
+
if (C.length > 0 && (_ = { ...(T = await y({
|
|
4442
4442
|
model: n,
|
|
4443
4443
|
ids: [t],
|
|
4444
4444
|
fieldsToRetrieve: C,
|
|
4445
4445
|
context: r
|
|
4446
|
-
})) == null ? void 0 : T[0] }),
|
|
4446
|
+
})) == null ? void 0 : T[0] }), _ = { ...bn(_, C), active_id: t }, l(_), !(!x || !x.toolbar))
|
|
4447
4447
|
return {
|
|
4448
4448
|
actionItems: x.toolbar.action,
|
|
4449
4449
|
relateItems: x.toolbar.relate,
|
|
@@ -4452,8 +4452,8 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
|
|
|
4452
4452
|
}, [r, h, t, n, y]);
|
|
4453
4453
|
if (!t)
|
|
4454
4454
|
return null;
|
|
4455
|
-
function
|
|
4456
|
-
const
|
|
4455
|
+
function A({ item: x, type: C }) {
|
|
4456
|
+
const _ = {
|
|
4457
4457
|
values: i,
|
|
4458
4458
|
fields: o.fields
|
|
4459
4459
|
};
|
|
@@ -4476,7 +4476,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
|
|
|
4476
4476
|
m == null || m({
|
|
4477
4477
|
actionData: x,
|
|
4478
4478
|
context: { active_id: t, active_ids: [t] },
|
|
4479
|
-
...
|
|
4479
|
+
..._
|
|
4480
4480
|
});
|
|
4481
4481
|
break;
|
|
4482
4482
|
case "print":
|
|
@@ -4485,7 +4485,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
|
|
|
4485
4485
|
...x,
|
|
4486
4486
|
datas: { ...x.datas, ids: [t] }
|
|
4487
4487
|
},
|
|
4488
|
-
...
|
|
4488
|
+
..._
|
|
4489
4489
|
});
|
|
4490
4490
|
break;
|
|
4491
4491
|
case "relate":
|
|
@@ -4493,7 +4493,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
|
|
|
4493
4493
|
relateData: x,
|
|
4494
4494
|
action_id: x.id,
|
|
4495
4495
|
action_type: x.type,
|
|
4496
|
-
...
|
|
4496
|
+
..._
|
|
4497
4497
|
});
|
|
4498
4498
|
break;
|
|
4499
4499
|
}
|
|
@@ -4502,7 +4502,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
|
|
|
4502
4502
|
df,
|
|
4503
4503
|
{
|
|
4504
4504
|
onRetrieveData: b,
|
|
4505
|
-
onItemClick:
|
|
4505
|
+
onItemClick: A,
|
|
4506
4506
|
onOpenChange: (x) => {
|
|
4507
4507
|
x || v();
|
|
4508
4508
|
}
|
|
@@ -4609,12 +4609,12 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4609
4609
|
}) => {
|
|
4610
4610
|
if (!e)
|
|
4611
4611
|
return null;
|
|
4612
|
-
const n = typeof e == "string" ? e.split(";").map((r) => r.trim()) : e;
|
|
4612
|
+
const n = typeof e == "string" ? e.replace(/,/g, ";").split(";").map((r) => r.trim()) : e;
|
|
4613
4613
|
return /* @__PURE__ */ s(se, { children: n.map((r, o) => /* @__PURE__ */ s(
|
|
4614
4614
|
Fo,
|
|
4615
4615
|
{
|
|
4616
4616
|
closable: !!t,
|
|
4617
|
-
color: Yc.isEmail(r) ? void 0 : "error",
|
|
4617
|
+
color: Yc.isEmail(r, { allow_display_name: !0 }) ? void 0 : "error",
|
|
4618
4618
|
onClose: () => t && t(r),
|
|
4619
4619
|
children: r
|
|
4620
4620
|
},
|
|
@@ -4627,11 +4627,11 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4627
4627
|
readonly: r = !1
|
|
4628
4628
|
}) => {
|
|
4629
4629
|
const { token: o } = Xe.useToken(), [a, i] = F(
|
|
4630
|
-
e ? e.split(";").map((g) => g.trim()).filter((g) => g) : []
|
|
4630
|
+
e ? e.replace(/,/g, ";").split(";").map((g) => g.trim()).filter((g) => g) : []
|
|
4631
4631
|
), [l, c] = F(""), d = W(null), f = ae(Je), { elementHasLostFocus: u } = f || {};
|
|
4632
4632
|
It(() => {
|
|
4633
4633
|
if (e) {
|
|
4634
|
-
const g = e.split(";").map((v) => v.trim()).filter(Boolean);
|
|
4634
|
+
const g = e.replace(/,/g, ";").split(";").map((v) => v.trim()).filter(Boolean);
|
|
4635
4635
|
i(g);
|
|
4636
4636
|
} else
|
|
4637
4637
|
i([]);
|
|
@@ -4642,11 +4642,18 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4642
4642
|
},
|
|
4643
4643
|
[t]
|
|
4644
4644
|
), h = (g) => {
|
|
4645
|
-
const
|
|
4646
|
-
|
|
4645
|
+
const v = g.target.value, b = />\s+$/.test(v);
|
|
4646
|
+
let A;
|
|
4647
|
+
b ? A = [v.trimEnd(), ""] : A = /["<>]/.test(v) ? v.split(/[,;]+/) : v.split(/[ ,;]+/);
|
|
4648
|
+
const x = A.slice(0, -1).map((C) => C.trim()).filter((C) => C && !a.includes(C));
|
|
4649
|
+
if (x.length > 0) {
|
|
4650
|
+
const C = [...a, ...x].join(";");
|
|
4651
|
+
(!n || C.length + A[A.length - 1].length <= n) && (i([...a, ...x]), m([...a, ...x]), c(A[A.length - 1]));
|
|
4652
|
+
} else
|
|
4653
|
+
c(v);
|
|
4647
4654
|
}, p = () => {
|
|
4648
4655
|
if (l) {
|
|
4649
|
-
const g = l.split(";").map((b) => b.trim()).filter((b) => b && !a.includes(b)), v = [...a, ...g].join(";");
|
|
4656
|
+
const g = l.replace(/,/g, ";").split(";").map((b) => b.trim()).filter((b) => b && !a.includes(b)), v = [...a, ...g].join(";");
|
|
4650
4657
|
(!n || v.length <= n) && (i([...a, ...g]), m([...a, ...g])), c("");
|
|
4651
4658
|
}
|
|
4652
4659
|
u && u();
|
|
@@ -5087,12 +5094,12 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
5087
5094
|
Object.entries({ ...f }).forEach(
|
|
5088
5095
|
([g, v]) => {
|
|
5089
5096
|
y[g] = v.map((b) => {
|
|
5090
|
-
const
|
|
5097
|
+
const A = e.columns.find(
|
|
5091
5098
|
(x) => x.id === g
|
|
5092
5099
|
);
|
|
5093
5100
|
return {
|
|
5094
5101
|
operation: b,
|
|
5095
|
-
label: (
|
|
5102
|
+
label: (A == null ? void 0 : A[`_${b}`]) || "",
|
|
5096
5103
|
amount: "-"
|
|
5097
5104
|
};
|
|
5098
5105
|
});
|
|
@@ -5112,10 +5119,10 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
5112
5119
|
Object.entries(h).forEach((y) => {
|
|
5113
5120
|
const g = y[0], v = y[1];
|
|
5114
5121
|
p || (p = {}), p[g] = Object.keys(v).map((b) => {
|
|
5115
|
-
const
|
|
5122
|
+
const A = e.columns.find((x) => x.id === g);
|
|
5116
5123
|
return {
|
|
5117
5124
|
operation: b,
|
|
5118
|
-
label:
|
|
5125
|
+
label: A[b],
|
|
5119
5126
|
amount: v[b]
|
|
5120
5127
|
};
|
|
5121
5128
|
});
|
|
@@ -5661,39 +5668,39 @@ function Rm(e, t, n) {
|
|
|
5661
5668
|
if (typeof e != "function")
|
|
5662
5669
|
throw new TypeError(hm);
|
|
5663
5670
|
t = Ds(t) || 0, po(n) && (f = !!n.leading, u = "maxWait" in n, a = u ? Am(Ds(n.maxWait) || 0, t) : a, m = "trailing" in n ? !!n.trailing : m);
|
|
5664
|
-
function h(
|
|
5671
|
+
function h(_) {
|
|
5665
5672
|
var T = r, w = o;
|
|
5666
|
-
return r = o = void 0, d =
|
|
5673
|
+
return r = o = void 0, d = _, i = e.apply(w, T), i;
|
|
5667
5674
|
}
|
|
5668
|
-
function p(
|
|
5669
|
-
return d =
|
|
5675
|
+
function p(_) {
|
|
5676
|
+
return d = _, l = setTimeout(v, t), f ? h(_) : i;
|
|
5670
5677
|
}
|
|
5671
|
-
function y(
|
|
5672
|
-
var T =
|
|
5678
|
+
function y(_) {
|
|
5679
|
+
var T = _ - c, w = _ - d, S = t - T;
|
|
5673
5680
|
return u ? _m(S, a - w) : S;
|
|
5674
5681
|
}
|
|
5675
|
-
function g(
|
|
5676
|
-
var T =
|
|
5682
|
+
function g(_) {
|
|
5683
|
+
var T = _ - c, w = _ - d;
|
|
5677
5684
|
return c === void 0 || T >= t || T < 0 || u && w >= a;
|
|
5678
5685
|
}
|
|
5679
5686
|
function v() {
|
|
5680
|
-
var
|
|
5681
|
-
if (g(
|
|
5682
|
-
return b(
|
|
5683
|
-
l = setTimeout(v, y(
|
|
5687
|
+
var _ = Zr();
|
|
5688
|
+
if (g(_))
|
|
5689
|
+
return b(_);
|
|
5690
|
+
l = setTimeout(v, y(_));
|
|
5684
5691
|
}
|
|
5685
|
-
function b(
|
|
5686
|
-
return l = void 0, m && r ? h(
|
|
5692
|
+
function b(_) {
|
|
5693
|
+
return l = void 0, m && r ? h(_) : (r = o = void 0, i);
|
|
5687
5694
|
}
|
|
5688
|
-
function
|
|
5695
|
+
function A() {
|
|
5689
5696
|
l !== void 0 && clearTimeout(l), d = 0, r = c = o = l = void 0;
|
|
5690
5697
|
}
|
|
5691
5698
|
function x() {
|
|
5692
5699
|
return l === void 0 ? i : b(Zr());
|
|
5693
5700
|
}
|
|
5694
5701
|
function C() {
|
|
5695
|
-
var
|
|
5696
|
-
if (r = arguments, o = this, c =
|
|
5702
|
+
var _ = Zr(), T = g(_);
|
|
5703
|
+
if (r = arguments, o = this, c = _, T) {
|
|
5697
5704
|
if (l === void 0)
|
|
5698
5705
|
return p(c);
|
|
5699
5706
|
if (u)
|
|
@@ -5701,7 +5708,7 @@ function Rm(e, t, n) {
|
|
|
5701
5708
|
}
|
|
5702
5709
|
return l === void 0 && (l = setTimeout(v, t)), i;
|
|
5703
5710
|
}
|
|
5704
|
-
return C.cancel =
|
|
5711
|
+
return C.cancel = A, C.flush = x, C;
|
|
5705
5712
|
}
|
|
5706
5713
|
function po(e) {
|
|
5707
5714
|
var t = typeof e;
|
|
@@ -5804,7 +5811,7 @@ function km() {
|
|
|
5804
5811
|
var p = h !== null && typeof h == "object", y = n.call(h) === "[object Function]", g = r(h), v = p && n.call(h) === "[object String]", b = [];
|
|
5805
5812
|
if (!p && !y && !g)
|
|
5806
5813
|
throw new TypeError("Object.keys called on a non-object");
|
|
5807
|
-
var
|
|
5814
|
+
var A = i && y;
|
|
5808
5815
|
if (v && h.length > 0 && !t.call(h, 0))
|
|
5809
5816
|
for (var x = 0; x < h.length; ++x)
|
|
5810
5817
|
b.push(String(x));
|
|
@@ -5812,8 +5819,8 @@ function km() {
|
|
|
5812
5819
|
for (var C = 0; C < h.length; ++C)
|
|
5813
5820
|
b.push(String(C));
|
|
5814
5821
|
else
|
|
5815
|
-
for (var
|
|
5816
|
-
!(
|
|
5822
|
+
for (var _ in h)
|
|
5823
|
+
!(A && _ === "prototype") && t.call(h, _) && b.push(String(_));
|
|
5817
5824
|
if (a)
|
|
5818
5825
|
for (var T = u(h), w = 0; w < l.length; ++w)
|
|
5819
5826
|
!(T && l[w] === "constructor") && t.call(h, l[w]) && b.push(l[w]);
|
|
@@ -6450,7 +6457,7 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
|
|
|
6450
6457
|
] });
|
|
6451
6458
|
}
|
|
6452
6459
|
), Za = (e) => {
|
|
6453
|
-
var
|
|
6460
|
+
var A;
|
|
6454
6461
|
const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: a, searchValues: i } = e, l = W(), { t: c } = ge(), [d, f] = F(), u = W(null), [m, h] = F();
|
|
6455
6462
|
le(() => {
|
|
6456
6463
|
n && (h(void 0), setTimeout(() => {
|
|
@@ -6464,10 +6471,10 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
|
|
|
6464
6471
|
}, [a, o, n]);
|
|
6465
6472
|
const p = O(
|
|
6466
6473
|
(x) => {
|
|
6467
|
-
var
|
|
6474
|
+
var _;
|
|
6468
6475
|
const C = fr(
|
|
6469
6476
|
x,
|
|
6470
|
-
(
|
|
6477
|
+
(_ = l.current) == null ? void 0 : _._advancedSearchContainer
|
|
6471
6478
|
);
|
|
6472
6479
|
t({ params: C, values: Sr(x) });
|
|
6473
6480
|
},
|
|
@@ -6483,17 +6490,17 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
|
|
|
6483
6490
|
h([]);
|
|
6484
6491
|
return;
|
|
6485
6492
|
}
|
|
6486
|
-
const
|
|
6493
|
+
const _ = fr(
|
|
6487
6494
|
x,
|
|
6488
6495
|
(T = l.current) == null ? void 0 : T._advancedSearchContainer
|
|
6489
6496
|
);
|
|
6490
|
-
h(
|
|
6497
|
+
h(_);
|
|
6491
6498
|
},
|
|
6492
6499
|
[i]
|
|
6493
6500
|
), v = O(() => {
|
|
6494
6501
|
var x, C;
|
|
6495
6502
|
(x = u.current) == null || x.resetFields(), (C = u == null ? void 0 : u.current) == null || C.setFieldsValue({}), h([]);
|
|
6496
|
-
}, []), b = n ? m || fr(i, (
|
|
6503
|
+
}, []), b = n ? m || fr(i, (A = l.current) == null ? void 0 : A._advancedSearchContainer) : [];
|
|
6497
6504
|
return /* @__PURE__ */ s(
|
|
6498
6505
|
pm,
|
|
6499
6506
|
{
|
|
@@ -6628,47 +6635,47 @@ function Wr(e) {
|
|
|
6628
6635
|
searchError: u,
|
|
6629
6636
|
searchValues: m,
|
|
6630
6637
|
showLimitOptions: h = !0
|
|
6631
|
-
} = e, [p, y] = F(), [g, v] = F(), [b,
|
|
6638
|
+
} = e, [p, y] = F(), [g, v] = F(), [b, A] = F(!1), x = W(), { token: C } = gh(), [_] = Et.useForm();
|
|
6632
6639
|
le(() => {
|
|
6633
|
-
|
|
6640
|
+
_.setFieldsValue(m);
|
|
6634
6641
|
}, [m]);
|
|
6635
6642
|
const T = () => {
|
|
6636
6643
|
if (!g)
|
|
6637
6644
|
return;
|
|
6638
|
-
const I = b ? g : p,
|
|
6639
|
-
return
|
|
6645
|
+
const I = b ? g : p, R = I == null ? void 0 : I.rows;
|
|
6646
|
+
return R == null ? void 0 : R.map((k, E) => /* @__PURE__ */ s(Ke, { children: k.map((H, N) => /* @__PURE__ */ s(Fe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Aa, { field: H }) }, N)) }, E));
|
|
6640
6647
|
};
|
|
6641
6648
|
Ht(() => {
|
|
6642
|
-
|
|
6649
|
+
A(!1), x.current = new xi(n, t), x.current.parse(), y(x.current._simpleSearchContainer), v(x.current._advancedSearchContainer);
|
|
6643
6650
|
}, [t, n]);
|
|
6644
6651
|
const w = T(), S = (I) => {
|
|
6645
6652
|
var H;
|
|
6646
|
-
const { limit:
|
|
6653
|
+
const { limit: R, offset: k } = I;
|
|
6647
6654
|
delete I.offset, delete I.limit;
|
|
6648
6655
|
const E = fr(
|
|
6649
6656
|
I,
|
|
6650
6657
|
(H = x.current) == null ? void 0 : H._advancedSearchContainer
|
|
6651
6658
|
);
|
|
6652
|
-
o({ params: E, offset: k, limit:
|
|
6659
|
+
o({ params: E, offset: k, limit: R, searchValues: I });
|
|
6653
6660
|
}, D = O(() => {
|
|
6654
6661
|
if (!p || !g)
|
|
6655
6662
|
return !1;
|
|
6656
6663
|
const I = p.rows.reduce(
|
|
6657
6664
|
(k, E) => k + E.length,
|
|
6658
6665
|
0
|
|
6659
|
-
),
|
|
6666
|
+
), R = g.rows.reduce(
|
|
6660
6667
|
(k, E) => k + E.length,
|
|
6661
6668
|
0
|
|
6662
6669
|
);
|
|
6663
|
-
return I ===
|
|
6670
|
+
return I === R;
|
|
6664
6671
|
}, [p, g]);
|
|
6665
6672
|
return /* @__PURE__ */ s(
|
|
6666
6673
|
ko,
|
|
6667
6674
|
{
|
|
6668
6675
|
bounds: !0,
|
|
6669
6676
|
onResize: (I) => {
|
|
6670
|
-
var
|
|
6671
|
-
f == null || f((
|
|
6677
|
+
var R;
|
|
6678
|
+
f == null || f((R = I.bounds) == null ? void 0 : R.height);
|
|
6672
6679
|
},
|
|
6673
6680
|
children: ({ measureRef: I }) => /* @__PURE__ */ s("div", { ref: I, children: /* @__PURE__ */ V("div", { style: { display: d ? "block" : "none" }, children: [
|
|
6674
6681
|
/* @__PURE__ */ V(
|
|
@@ -6676,7 +6683,7 @@ function Wr(e) {
|
|
|
6676
6683
|
{
|
|
6677
6684
|
className: "p-3 shadow-md",
|
|
6678
6685
|
style: { borderRadius: C.borderRadius },
|
|
6679
|
-
form:
|
|
6686
|
+
form: _,
|
|
6680
6687
|
onFinish: S,
|
|
6681
6688
|
initialValues: { offset: i, limit: l },
|
|
6682
6689
|
children: [
|
|
@@ -6688,10 +6695,10 @@ function Wr(e) {
|
|
|
6688
6695
|
hideAdvancedFilter: (D() || (g == null ? void 0 : g._rows.length) === 0) && !h,
|
|
6689
6696
|
advancedFilter: b,
|
|
6690
6697
|
onAdvancedFilterToggle: () => {
|
|
6691
|
-
|
|
6698
|
+
A(!b);
|
|
6692
6699
|
},
|
|
6693
6700
|
onClear: () => {
|
|
6694
|
-
|
|
6701
|
+
_.resetFields(), r();
|
|
6695
6702
|
},
|
|
6696
6703
|
isSearching: a
|
|
6697
6704
|
}
|
|
@@ -6716,7 +6723,7 @@ function Wr(e) {
|
|
|
6716
6723
|
function el({
|
|
6717
6724
|
useLocalState: e = !1
|
|
6718
6725
|
}) {
|
|
6719
|
-
const t = Mh() && !e, n = Nn(), [r, o] = F(!1), [a, i] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, m] = F(void 0), [h, p] = F([]), [y, g] = F({}), [v, b] = F(), [
|
|
6726
|
+
const t = Mh() && !e, n = Nn(), [r, o] = F(!1), [a, i] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, m] = F(void 0), [h, p] = F([]), [y, g] = F({}), [v, b] = F(), [A, x] = F([]), [C, _] = F(), [T, w] = F(0), [S, D] = F(), [I, R] = F(1), [k, E] = F(er), [H, N] = F(ht);
|
|
6720
6727
|
return t ? {
|
|
6721
6728
|
treeIsLoading: n.treeIsLoading ?? !1,
|
|
6722
6729
|
setTreeIsLoading: n.setTreeIsLoading ?? (() => {
|
|
@@ -6781,17 +6788,17 @@ function el({
|
|
|
6781
6788
|
setSearchValues: g,
|
|
6782
6789
|
searchTreeNameSearch: v,
|
|
6783
6790
|
setSearchTreeNameSearch: b,
|
|
6784
|
-
results:
|
|
6791
|
+
results: A,
|
|
6785
6792
|
setResults: x,
|
|
6786
6793
|
searchQuery: C,
|
|
6787
|
-
setSearchQuery:
|
|
6794
|
+
setSearchQuery: _,
|
|
6788
6795
|
totalItems: T,
|
|
6789
6796
|
setTotalItems: w,
|
|
6790
6797
|
isActive: void 0,
|
|
6791
6798
|
order: S,
|
|
6792
6799
|
setOrder: D,
|
|
6793
6800
|
currentPage: I,
|
|
6794
|
-
setCurrentPage:
|
|
6801
|
+
setCurrentPage: R,
|
|
6795
6802
|
treeType: k,
|
|
6796
6803
|
setTreeType: E,
|
|
6797
6804
|
limit: H,
|
|
@@ -6863,26 +6870,26 @@ const Yr = ({
|
|
|
6863
6870
|
$.getHandler().readObjects
|
|
6864
6871
|
), [v, b] = ze(
|
|
6865
6872
|
$.getHandler().parseConditions
|
|
6866
|
-
),
|
|
6867
|
-
(I,
|
|
6868
|
-
(k) => JSON.stringify(I[k]) !== JSON.stringify(
|
|
6873
|
+
), A = ts(), x = W({}), C = O(
|
|
6874
|
+
(I, R) => R ? o == null ? void 0 : o.some(
|
|
6875
|
+
(k) => JSON.stringify(I[k]) !== JSON.stringify(R[k])
|
|
6869
6876
|
) : !0,
|
|
6870
6877
|
[o]
|
|
6871
6878
|
);
|
|
6872
6879
|
le(() => {
|
|
6873
|
-
a === !1 && w(), (a === void 0 || a === !0) && !
|
|
6874
|
-
}, [a,
|
|
6875
|
-
const
|
|
6880
|
+
a === !1 && w(), (a === void 0 || a === !0) && !A && w(), (a === void 0 || a === !0) && A && S();
|
|
6881
|
+
}, [a, A]);
|
|
6882
|
+
const _ = O(() => {
|
|
6876
6883
|
var k, E;
|
|
6877
6884
|
if (!c)
|
|
6878
6885
|
return !1;
|
|
6879
|
-
const I = ((k = c.fields_in_conditions) == null ? void 0 : k.colors) || [],
|
|
6880
|
-
return I.some((H) => o == null ? void 0 : o.includes(H)) ||
|
|
6886
|
+
const I = ((k = c.fields_in_conditions) == null ? void 0 : k.colors) || [], R = ((E = c.fields_in_conditions) == null ? void 0 : E.status) || [];
|
|
6887
|
+
return I.some((H) => o == null ? void 0 : o.includes(H)) || R.some((H) => o == null ? void 0 : o.includes(H));
|
|
6881
6888
|
}, [c, o]), T = O(async () => {
|
|
6882
|
-
var
|
|
6889
|
+
var R, k;
|
|
6883
6890
|
if (!(o != null && o.length) || !h)
|
|
6884
6891
|
return;
|
|
6885
|
-
const I = (
|
|
6892
|
+
const I = (R = t.current) == null ? void 0 : R.getVisibleRowIds().filter((E) => E != null);
|
|
6886
6893
|
if (!(!I || I.length === 0) && i)
|
|
6887
6894
|
try {
|
|
6888
6895
|
const E = await y({
|
|
@@ -6895,7 +6902,7 @@ const Yr = ({
|
|
|
6895
6902
|
const M = x.current[B.id];
|
|
6896
6903
|
return C(B, M);
|
|
6897
6904
|
});
|
|
6898
|
-
if (u && l && i &&
|
|
6905
|
+
if (u && l && i && _() && N.length > 0) {
|
|
6899
6906
|
const B = Yr({
|
|
6900
6907
|
treeOoui: i
|
|
6901
6908
|
}), M = N.map((P) => ({ ...d == null ? void 0 : d.find(
|
|
@@ -6929,7 +6936,7 @@ const Yr = ({
|
|
|
6929
6936
|
r,
|
|
6930
6937
|
u,
|
|
6931
6938
|
l,
|
|
6932
|
-
|
|
6939
|
+
_,
|
|
6933
6940
|
C,
|
|
6934
6941
|
d,
|
|
6935
6942
|
v
|
|
@@ -6971,7 +6978,7 @@ const Yr = ({
|
|
|
6971
6978
|
}) => {
|
|
6972
6979
|
const [d, f] = F(!1), u = W([]), m = t == null ? void 0 : t.fields, h = (t == null ? void 0 : t.fields_in_conditions) !== void 0, [p, y] = F(
|
|
6973
6980
|
/* @__PURE__ */ new Set()
|
|
6974
|
-
), g = W(/* @__PURE__ */ new Set()), v = W([]), b = W(null), [
|
|
6981
|
+
), g = W(/* @__PURE__ */ new Set()), v = W([]), b = W(null), [A, x] = F(!0), [C, _] = ze(
|
|
6975
6982
|
async (M) => $.getHandler().processSearchResults({
|
|
6976
6983
|
searchIds: M.searchIds,
|
|
6977
6984
|
model: e,
|
|
@@ -6985,10 +6992,10 @@ const Yr = ({
|
|
|
6985
6992
|
le(() => {
|
|
6986
6993
|
o === !1 && N(), (o === void 0 || o === !0) && !S && N(), (o === void 0 || o === !0) && S && B();
|
|
6987
6994
|
}, [o, S]), le(() => () => {
|
|
6988
|
-
|
|
6989
|
-
}, []), le(() => (o || (
|
|
6990
|
-
|
|
6991
|
-
}), [o,
|
|
6995
|
+
_(), w();
|
|
6996
|
+
}, []), le(() => (o || (_(), w()), () => {
|
|
6997
|
+
_(), w();
|
|
6998
|
+
}), [o, _, w]), le(() => {
|
|
6992
6999
|
if (!m) {
|
|
6993
7000
|
f(!1), u.current = [];
|
|
6994
7001
|
return;
|
|
@@ -7034,7 +7041,7 @@ const Yr = ({
|
|
|
7034
7041
|
It(() => {
|
|
7035
7042
|
p.size !== 0 && I();
|
|
7036
7043
|
}, [p, I]);
|
|
7037
|
-
const
|
|
7044
|
+
const R = O(
|
|
7038
7045
|
(M) => {
|
|
7039
7046
|
!M || M.length === 0 || (y((P) => {
|
|
7040
7047
|
const Y = new Set(P);
|
|
@@ -7090,22 +7097,22 @@ const Yr = ({
|
|
|
7090
7097
|
}).filter(Boolean);
|
|
7091
7098
|
P.length > 0 && (P.forEach((L) => g.current.delete(L.id)), k(P), (K = n == null ? void 0 : n.current) == null || K.updateRows(P));
|
|
7092
7099
|
}, [n, k]), H = O((M, P) => u.current.includes(P) ? !v.current.find((Y) => Y.id === (M == null ? void 0 : M.id)) : !1, []);
|
|
7093
|
-
It(() => (d &&
|
|
7100
|
+
It(() => (d && A && (E(), b.current = setInterval(
|
|
7094
7101
|
E,
|
|
7095
7102
|
vh
|
|
7096
7103
|
)), () => {
|
|
7097
7104
|
b.current && (clearInterval(b.current), b.current = null);
|
|
7098
|
-
}), [d,
|
|
7105
|
+
}), [d, A, E, c]);
|
|
7099
7106
|
const N = O(() => {
|
|
7100
|
-
x(!1), b.current && (clearInterval(b.current), b.current = null),
|
|
7101
|
-
}, [
|
|
7107
|
+
x(!1), b.current && (clearInterval(b.current), b.current = null), _(), w();
|
|
7108
|
+
}, [_, w]), B = O(() => {
|
|
7102
7109
|
h && x(!0);
|
|
7103
7110
|
}, [h]);
|
|
7104
7111
|
return {
|
|
7105
7112
|
refresh: () => {
|
|
7106
7113
|
y(/* @__PURE__ */ new Set()), v.current = [], g.current.clear();
|
|
7107
7114
|
},
|
|
7108
|
-
addRecordsToCheckFunctionFields:
|
|
7115
|
+
addRecordsToCheckFunctionFields: R,
|
|
7109
7116
|
isFieldLoading: H,
|
|
7110
7117
|
hasFunctionFields: d,
|
|
7111
7118
|
pause: N,
|
|
@@ -7215,7 +7222,7 @@ function xh(e, t) {
|
|
|
7215
7222
|
nameSearch: u,
|
|
7216
7223
|
filterType: m = "side",
|
|
7217
7224
|
onChangeTreeType: h
|
|
7218
|
-
} = e, p = W(null), y = W([]), g = W(!1), v = Uo(), [b,
|
|
7225
|
+
} = e, p = W(null), y = W([]), g = W(!1), v = Uo(), [b, A] = F(), [x, C] = F(!1), { t: _ } = ge(), T = W(null), w = xa({
|
|
7219
7226
|
elementRef: T,
|
|
7220
7227
|
offset: Sh
|
|
7221
7228
|
}), { treeView: S, formView: D, loading: I } = Wo({
|
|
@@ -7224,7 +7231,7 @@ function xh(e, t) {
|
|
|
7224
7231
|
treeViewProps: o,
|
|
7225
7232
|
context: d
|
|
7226
7233
|
}), {
|
|
7227
|
-
setTreeIsLoading:
|
|
7234
|
+
setTreeIsLoading: R,
|
|
7228
7235
|
searchVisible: k,
|
|
7229
7236
|
setSearchVisible: E,
|
|
7230
7237
|
setSelectedRowItems: H,
|
|
@@ -7327,7 +7334,7 @@ function xh(e, t) {
|
|
|
7327
7334
|
return _e !== Re.current ? (Re.current = _e, !0) : !1;
|
|
7328
7335
|
}, [i, Ze, q]), te = O(async () => {
|
|
7329
7336
|
if (!q && !We.current) {
|
|
7330
|
-
We.current = !0,
|
|
7337
|
+
We.current = !0, A(void 0), ce(0);
|
|
7331
7338
|
try {
|
|
7332
7339
|
const re = await $.getHandler().searchCount({
|
|
7333
7340
|
params: q ? i : Ze,
|
|
@@ -7335,7 +7342,7 @@ function xh(e, t) {
|
|
|
7335
7342
|
context: d,
|
|
7336
7343
|
name_search: q
|
|
7337
7344
|
});
|
|
7338
|
-
|
|
7345
|
+
A(re), ce(re);
|
|
7339
7346
|
} catch (re) {
|
|
7340
7347
|
v(re);
|
|
7341
7348
|
} finally {
|
|
@@ -7405,8 +7412,8 @@ function xh(e, t) {
|
|
|
7405
7412
|
const oe = [...j || [], ...Jt];
|
|
7406
7413
|
ye == null || ye(oe);
|
|
7407
7414
|
}
|
|
7408
|
-
if (Ue.current = it, q ? (
|
|
7409
|
-
return y.current = [],
|
|
7415
|
+
if (Ue.current = it, q ? (A(Jt.length), ce(Jt.length), C(!0)) : C(!1), Jt.length === 0)
|
|
7416
|
+
return y.current = [], A(0), ce(0), [];
|
|
7410
7417
|
const J = mn(pe, Jt);
|
|
7411
7418
|
return Te(G, pe), y.current = [...J], J;
|
|
7412
7419
|
},
|
|
@@ -7447,21 +7454,21 @@ function xh(e, t) {
|
|
|
7447
7454
|
state: je
|
|
7448
7455
|
}) => {
|
|
7449
7456
|
try {
|
|
7450
|
-
|
|
7457
|
+
R == null || R(!0), re === 0 && !q && te();
|
|
7451
7458
|
const it = await Se({
|
|
7452
7459
|
startRow: re,
|
|
7453
7460
|
endRow: _e,
|
|
7454
7461
|
state: je
|
|
7455
7462
|
});
|
|
7456
|
-
return
|
|
7463
|
+
return R == null || R(!1), it;
|
|
7457
7464
|
} catch (it) {
|
|
7458
|
-
throw console.error(it),
|
|
7465
|
+
throw console.error(it), A(null), ce(0), R == null || R(!1), v(it), it;
|
|
7459
7466
|
}
|
|
7460
7467
|
},
|
|
7461
7468
|
[
|
|
7462
7469
|
Se,
|
|
7463
7470
|
ce,
|
|
7464
|
-
|
|
7471
|
+
R,
|
|
7465
7472
|
v,
|
|
7466
7473
|
te,
|
|
7467
7474
|
q
|
|
@@ -7499,11 +7506,11 @@ function xh(e, t) {
|
|
|
7499
7506
|
Ce(je.map((it) => ({ id: it })));
|
|
7500
7507
|
};
|
|
7501
7508
|
re ? b && b > Ch ? Gt({
|
|
7502
|
-
confirmMessage:
|
|
7509
|
+
confirmMessage: _("confirmSelectAllRegisters").replace(
|
|
7503
7510
|
"{totalRecords}",
|
|
7504
7511
|
b.toString()
|
|
7505
7512
|
),
|
|
7506
|
-
t:
|
|
7513
|
+
t: _,
|
|
7507
7514
|
onOk: _e
|
|
7508
7515
|
}) : _e() : H([]);
|
|
7509
7516
|
}, [
|
|
@@ -7515,7 +7522,7 @@ function xh(e, t) {
|
|
|
7515
7522
|
d,
|
|
7516
7523
|
M == null ? void 0 : M.length,
|
|
7517
7524
|
H,
|
|
7518
|
-
|
|
7525
|
+
_,
|
|
7519
7526
|
b
|
|
7520
7527
|
]), Pt = O(() => B, [B]), Rt = Q(() => Ge ? /* @__PURE__ */ s(qo, { aggregates: xt, isLoading: st }) : null, [xt, st, Ge]), on = O((re) => /* @__PURE__ */ s(tr, { color: re, style: { marginLeft: 7 } }), []), hn = O(
|
|
7521
7528
|
(re) => {
|
|
@@ -7526,9 +7533,9 @@ function xh(e, t) {
|
|
|
7526
7533
|
[]
|
|
7527
7534
|
), Ot = Q(
|
|
7528
7535
|
() => ({
|
|
7529
|
-
resetTableViewLabel:
|
|
7536
|
+
resetTableViewLabel: _("resetTableView")
|
|
7530
7537
|
}),
|
|
7531
|
-
[
|
|
7538
|
+
[_]
|
|
7532
7539
|
), Bn = Q(() => {
|
|
7533
7540
|
if (!Oe || !pe)
|
|
7534
7541
|
return null;
|
|
@@ -7799,26 +7806,26 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
|
|
|
7799
7806
|
onChangeSort: g,
|
|
7800
7807
|
sorter: v,
|
|
7801
7808
|
onFetchChildrenForRecord: b,
|
|
7802
|
-
childField:
|
|
7809
|
+
childField: A,
|
|
7803
7810
|
rootTree: x = !1,
|
|
7804
7811
|
context: C,
|
|
7805
|
-
readonly:
|
|
7812
|
+
readonly: _,
|
|
7806
7813
|
onSelectAllRecords: T
|
|
7807
|
-
} = e, w = W(null), [S, D] = F([]), I = W(!1), [
|
|
7814
|
+
} = e, w = W(null), [S, D] = F([]), I = W(!1), [R, k] = F(), { t: E } = ge(), H = W(r), N = ae(
|
|
7808
7815
|
St
|
|
7809
7816
|
), { title: B = void 0, setTitle: M = void 0 } = (x ? N : {}) || {}, P = Kt(
|
|
7810
7817
|
Mt.FEATURE_MANY2ONE_SORT
|
|
7811
7818
|
), Y = Q(() => {
|
|
7812
|
-
if (
|
|
7819
|
+
if (R)
|
|
7813
7820
|
return $r(
|
|
7814
|
-
|
|
7821
|
+
R,
|
|
7815
7822
|
{
|
|
7816
7823
|
...jr
|
|
7817
7824
|
},
|
|
7818
7825
|
C,
|
|
7819
7826
|
P
|
|
7820
7827
|
);
|
|
7821
|
-
}, [
|
|
7828
|
+
}, [R, C, P]);
|
|
7822
7829
|
Dt(t, () => ({
|
|
7823
7830
|
unselectAll: () => {
|
|
7824
7831
|
var ne;
|
|
@@ -7828,10 +7835,10 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
|
|
|
7828
7835
|
const ne = Yt(a);
|
|
7829
7836
|
k(ne), ne.string && B !== ne.string && (M == null || M(ne.string));
|
|
7830
7837
|
}, [a, B]), le(() => {
|
|
7831
|
-
if (!
|
|
7838
|
+
if (!R)
|
|
7832
7839
|
return;
|
|
7833
7840
|
I.current = !1;
|
|
7834
|
-
const ne = mn(
|
|
7841
|
+
const ne = mn(R, i);
|
|
7835
7842
|
D(ne);
|
|
7836
7843
|
}, [i]), le(() => {
|
|
7837
7844
|
H.current = r;
|
|
@@ -7877,9 +7884,9 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
|
|
|
7877
7884
|
o,
|
|
7878
7885
|
a.isExpandable
|
|
7879
7886
|
]), ye = Q(() => {
|
|
7880
|
-
if (!
|
|
7887
|
+
if (!R)
|
|
7881
7888
|
return null;
|
|
7882
|
-
const ne =
|
|
7889
|
+
const ne = R.columns.filter((q) => q.sum !== void 0).map((q) => ({ label: q.sum, field: q.id }));
|
|
7883
7890
|
if (!ne || ne.length === 0)
|
|
7884
7891
|
return null;
|
|
7885
7892
|
const de = [], Z = (u == null ? void 0 : u.length) > 0 ? S.filter((q) => u.includes(q.id)) : S;
|
|
@@ -7887,11 +7894,11 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
|
|
|
7887
7894
|
const z = Z.reduce((ee, xe) => xe[q.field] && !isNaN(xe[q.field]) ? ee + xe[q.field] : ee, 0);
|
|
7888
7895
|
de.push(`${q.label}: ${Math.round(z * 100) / 100}`);
|
|
7889
7896
|
}), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: de.join(", ") });
|
|
7890
|
-
}, [S, u,
|
|
7891
|
-
if (
|
|
7897
|
+
}, [S, u, R]), j = Q(() => {
|
|
7898
|
+
if (R !== null && Y && Y.length > 0)
|
|
7892
7899
|
return Th(Y, S, 600);
|
|
7893
|
-
}, [Y, S,
|
|
7894
|
-
return
|
|
7900
|
+
}, [Y, S, R]), U = Q(() => h && (R != null && R.columns.some((ne) => ne.sum !== void 0)) ? h - 30 : h, [h, R == null ? void 0 : R.columns]);
|
|
7901
|
+
return R === null || !j || ((ce = j == null ? void 0 : j.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ s(tt, { style: { padding: "2rem" } }) : /* @__PURE__ */ V(pr, { children: [
|
|
7895
7902
|
X,
|
|
7896
7903
|
/* @__PURE__ */ s(
|
|
7897
7904
|
Uc,
|
|
@@ -7914,13 +7921,13 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
|
|
|
7914
7921
|
onRowSelectionChange: m,
|
|
7915
7922
|
onChangeSort: g,
|
|
7916
7923
|
sorter: v,
|
|
7917
|
-
readonly:
|
|
7924
|
+
readonly: _,
|
|
7918
7925
|
expandableOpts: b ? {
|
|
7919
7926
|
expandIcon: rc,
|
|
7920
7927
|
collapseIcon: oc,
|
|
7921
7928
|
loadingIcon: Nt,
|
|
7922
7929
|
onFetchChildrenForRecord: b,
|
|
7923
|
-
childField:
|
|
7930
|
+
childField: A
|
|
7924
7931
|
} : void 0
|
|
7925
7932
|
}
|
|
7926
7933
|
),
|
|
@@ -7950,13 +7957,13 @@ const al = (e) => {
|
|
|
7950
7957
|
setResultsActionView: g,
|
|
7951
7958
|
resultsActionView: v,
|
|
7952
7959
|
domain: b,
|
|
7953
|
-
currentId:
|
|
7960
|
+
currentId: A,
|
|
7954
7961
|
limit: x,
|
|
7955
7962
|
setLimit: C,
|
|
7956
|
-
searchParams:
|
|
7963
|
+
searchParams: _ = [],
|
|
7957
7964
|
setSearchValues: T,
|
|
7958
7965
|
clearSelection: w
|
|
7959
|
-
} = e, [S, D] = F(!1), [I,
|
|
7966
|
+
} = e, [S, D] = F(!1), [I, R] = F(!1), [k, E] = F(), [H, N] = F(1), [B, M] = F(0), [P, Y] = F(), [K, L] = F([]), [ie, X] = F(void 0), [ye, j] = F(void 0), U = W(x || ht), ce = W([]), ne = O(
|
|
7960
7967
|
(fe) => {
|
|
7961
7968
|
g == null || g([...fe]), L([...fe]);
|
|
7962
7969
|
},
|
|
@@ -8004,7 +8011,7 @@ const al = (e) => {
|
|
|
8004
8011
|
f
|
|
8005
8012
|
]), q = O(
|
|
8006
8013
|
async (fe) => {
|
|
8007
|
-
const { params: Ve, newOffset: Te } = fe || {}, He = Zt(Ve ||
|
|
8014
|
+
const { params: Ve, newOffset: Te } = fe || {}, He = Zt(Ve || _, b), { colors: Be, status: be } = Yt(u), ue = {};
|
|
8008
8015
|
Be && (ue.colors = Be), be && (ue.status = be);
|
|
8009
8016
|
const { totalItems: Ye, results: Pe, attrsEvaluated: Oe } = await $.getHandler().searchForTree({
|
|
8010
8017
|
params: He,
|
|
@@ -8023,7 +8030,7 @@ const al = (e) => {
|
|
|
8023
8030
|
}) : [...ce.current];
|
|
8024
8031
|
if (ne(ve), v && ve.length > 0) {
|
|
8025
8032
|
const me = ve.findIndex(
|
|
8026
|
-
(et) =>
|
|
8033
|
+
(et) => A === et.id
|
|
8027
8034
|
);
|
|
8028
8035
|
me === -1 ? y == null || y(0) : y == null || y(me);
|
|
8029
8036
|
} else
|
|
@@ -8036,7 +8043,7 @@ const al = (e) => {
|
|
|
8036
8043
|
y,
|
|
8037
8044
|
v,
|
|
8038
8045
|
ne,
|
|
8039
|
-
|
|
8046
|
+
A,
|
|
8040
8047
|
t,
|
|
8041
8048
|
d,
|
|
8042
8049
|
b,
|
|
@@ -8045,7 +8052,7 @@ const al = (e) => {
|
|
|
8045
8052
|
h,
|
|
8046
8053
|
f,
|
|
8047
8054
|
B,
|
|
8048
|
-
|
|
8055
|
+
_
|
|
8049
8056
|
]
|
|
8050
8057
|
), z = O(
|
|
8051
8058
|
async (fe) => {
|
|
@@ -8054,7 +8061,7 @@ const al = (e) => {
|
|
|
8054
8061
|
} catch (Ve) {
|
|
8055
8062
|
E(typeof Ve == "string" ? Ve : Ve.message), D(!1);
|
|
8056
8063
|
} finally {
|
|
8057
|
-
r == null || r([]),
|
|
8064
|
+
r == null || r([]), R(!1), i == null || i(!1);
|
|
8058
8065
|
}
|
|
8059
8066
|
},
|
|
8060
8067
|
[
|
|
@@ -8089,7 +8096,7 @@ const al = (e) => {
|
|
|
8089
8096
|
), xe = O(
|
|
8090
8097
|
(fe) => {
|
|
8091
8098
|
const { params: Ve, searchValues: Te, limit: He, offset: Be } = fe;
|
|
8092
|
-
S || (n == null || n(void 0), r == null || r([]), T == null || T(Te), o == null || o(Ve), a == null || a(!1),
|
|
8099
|
+
S || (n == null || n(void 0), r == null || r([]), T == null || T(Te), o == null || o(Ve), a == null || a(!1), R(!0), E(void 0), N(1), He && (U.current = He, C == null || C(He)), Be && M(Be), z({
|
|
8093
8100
|
params: Ve,
|
|
8094
8101
|
newOffset: Be
|
|
8095
8102
|
}));
|
|
@@ -8130,11 +8137,11 @@ const al = (e) => {
|
|
|
8130
8137
|
},
|
|
8131
8138
|
[u, t, d, de, ne]
|
|
8132
8139
|
), pe = O(async () => await $.getHandler().searchAllIds({
|
|
8133
|
-
params: Zt(
|
|
8140
|
+
params: Zt(_, b),
|
|
8134
8141
|
model: t,
|
|
8135
8142
|
context: d,
|
|
8136
8143
|
totalItems: P
|
|
8137
|
-
}), [t, d, P,
|
|
8144
|
+
}), [t, d, P, _, b]);
|
|
8138
8145
|
return {
|
|
8139
8146
|
submit: xe,
|
|
8140
8147
|
clear: Ue,
|
|
@@ -8169,7 +8176,7 @@ function Ah(e, t) {
|
|
|
8169
8176
|
rootTree: f = !1,
|
|
8170
8177
|
parentContext: u = {},
|
|
8171
8178
|
onChangeSelectedRowKeys: m
|
|
8172
|
-
} = e, [h, p] = F(!1), [y, g] = F(!1), v = W(!1), b = W(null), [
|
|
8179
|
+
} = e, [h, p] = F(!1), [y, g] = F(!1), v = W(!1), b = W(null), [A, x] = F(), [C, _] = F(), [T, w] = F(), [S, D] = F(), [I, R] = F(200), k = W(), { height: E } = Vr(), H = ae(
|
|
8173
8180
|
Vn
|
|
8174
8181
|
), { processAction: N } = H || {}, B = ae(
|
|
8175
8182
|
St
|
|
@@ -8217,7 +8224,7 @@ function Ah(e, t) {
|
|
|
8217
8224
|
totalItems: et,
|
|
8218
8225
|
getAllIds: rt
|
|
8219
8226
|
} = al({
|
|
8220
|
-
model:
|
|
8227
|
+
model: A,
|
|
8221
8228
|
setSearchTreeNameSearch: Z,
|
|
8222
8229
|
setSelectedRowItems: Ue,
|
|
8223
8230
|
setSearchParams: ye,
|
|
@@ -8272,7 +8279,7 @@ function Ah(e, t) {
|
|
|
8272
8279
|
model: n,
|
|
8273
8280
|
type: "tree",
|
|
8274
8281
|
context: u
|
|
8275
|
-
})), w(Ge),
|
|
8282
|
+
})), w(Ge), _(ut);
|
|
8276
8283
|
};
|
|
8277
8284
|
le(() => {
|
|
8278
8285
|
Ze();
|
|
@@ -8287,7 +8294,7 @@ function Ah(e, t) {
|
|
|
8287
8294
|
const { id: ut } = Ge;
|
|
8288
8295
|
k.current || (k.current = await $.getHandler().treeButOpen({
|
|
8289
8296
|
id: C.view_id,
|
|
8290
|
-
model:
|
|
8297
|
+
model: A,
|
|
8291
8298
|
context: u
|
|
8292
8299
|
}));
|
|
8293
8300
|
const Pt = k.current[0][2];
|
|
@@ -8301,7 +8308,7 @@ function Ah(e, t) {
|
|
|
8301
8308
|
context: u
|
|
8302
8309
|
}));
|
|
8303
8310
|
},
|
|
8304
|
-
[
|
|
8311
|
+
[A, u, N, C]
|
|
8305
8312
|
), Ce = O(
|
|
8306
8313
|
async (Ge) => {
|
|
8307
8314
|
const { id: ut } = Ge;
|
|
@@ -8315,12 +8322,12 @@ function Ah(e, t) {
|
|
|
8315
8322
|
}
|
|
8316
8323
|
a({
|
|
8317
8324
|
id: ut,
|
|
8318
|
-
model:
|
|
8325
|
+
model: A,
|
|
8319
8326
|
formView: T,
|
|
8320
8327
|
treeView: C
|
|
8321
8328
|
});
|
|
8322
8329
|
},
|
|
8323
|
-
[
|
|
8330
|
+
[A, T, a, Se, C]
|
|
8324
8331
|
), Ee = O(async () => {
|
|
8325
8332
|
const Ge = await rt();
|
|
8326
8333
|
ie == null || ie(Ge.map((ut) => ({ id: ut }))), m == null || m(Ge);
|
|
@@ -8342,7 +8349,7 @@ function Ah(e, t) {
|
|
|
8342
8349
|
isSearching: Te,
|
|
8343
8350
|
onSubmit: We,
|
|
8344
8351
|
onLimitChange: te,
|
|
8345
|
-
setSearchFilterHeight:
|
|
8352
|
+
setSearchFilterHeight: R,
|
|
8346
8353
|
searchError: He,
|
|
8347
8354
|
searchVisible: j,
|
|
8348
8355
|
searchValues: z
|
|
@@ -8429,16 +8436,16 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8429
8436
|
setSelectedRowItems: g,
|
|
8430
8437
|
setTreeFirstVisibleRow: v,
|
|
8431
8438
|
treeFirstVisibleRow: b,
|
|
8432
|
-
treeFirstVisibleColumn:
|
|
8439
|
+
treeFirstVisibleColumn: A,
|
|
8433
8440
|
setTreeFirstVisibleColumn: x,
|
|
8434
8441
|
selectedRowItems: C,
|
|
8435
|
-
setSearchParams:
|
|
8442
|
+
setSearchParams: _,
|
|
8436
8443
|
searchValues: T,
|
|
8437
8444
|
searchParams: w,
|
|
8438
8445
|
setSearchValues: S,
|
|
8439
8446
|
searchTreeNameSearch: D,
|
|
8440
8447
|
setSearchTreeNameSearch: I,
|
|
8441
|
-
setResults:
|
|
8448
|
+
setResults: R,
|
|
8442
8449
|
results: k,
|
|
8443
8450
|
setSearchQuery: E,
|
|
8444
8451
|
setTotalItems: H,
|
|
@@ -8533,7 +8540,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8533
8540
|
o,
|
|
8534
8541
|
d,
|
|
8535
8542
|
Ze
|
|
8536
|
-
]), Ge = O(() => b, [b]), ut = O(() =>
|
|
8543
|
+
]), Ge = O(() => b, [b]), ut = O(() => A, [A]), Pt = O((Ie) => {
|
|
8537
8544
|
var Ne, re, _e, je;
|
|
8538
8545
|
return ue.current[(re = (Ne = Ie.node) == null ? void 0 : Ne.data) == null ? void 0 : re.id] ? { color: ue.current[(je = (_e = Ie.node) == null ? void 0 : _e.data) == null ? void 0 : je.id] } : {};
|
|
8539
8546
|
}, []), Rt = O(
|
|
@@ -8545,23 +8552,23 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8545
8552
|
[]
|
|
8546
8553
|
), on = O(() => {
|
|
8547
8554
|
var Ie;
|
|
8548
|
-
g([]), (Ie = l.current) == null || Ie.unselectAll(), I == null || I(void 0),
|
|
8555
|
+
g([]), (Ie = l.current) == null || Ie.unselectAll(), I == null || I(void 0), _ == null || _([]), S == null || S(void 0);
|
|
8549
8556
|
}, [
|
|
8550
8557
|
g,
|
|
8551
8558
|
l,
|
|
8552
8559
|
I,
|
|
8553
|
-
|
|
8560
|
+
_,
|
|
8554
8561
|
S
|
|
8555
8562
|
]), hn = O(
|
|
8556
8563
|
({ params: Ie, searchValues: Ne }) => {
|
|
8557
8564
|
var re;
|
|
8558
|
-
g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0),
|
|
8565
|
+
g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0), _ == null || _(Ie), S == null || S(Ne);
|
|
8559
8566
|
},
|
|
8560
8567
|
[
|
|
8561
8568
|
g,
|
|
8562
8569
|
l,
|
|
8563
8570
|
I,
|
|
8564
|
-
|
|
8571
|
+
_,
|
|
8565
8572
|
S
|
|
8566
8573
|
]
|
|
8567
8574
|
), Ot = O(
|
|
@@ -8570,13 +8577,13 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8570
8577
|
), Bn = O(
|
|
8571
8578
|
({ params: Ie, values: Ne }) => {
|
|
8572
8579
|
var re;
|
|
8573
|
-
g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0),
|
|
8580
|
+
g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0), _ == null || _(Ie), S == null || S(Ne), y == null || y(!1);
|
|
8574
8581
|
},
|
|
8575
8582
|
[
|
|
8576
8583
|
g,
|
|
8577
8584
|
l,
|
|
8578
8585
|
I,
|
|
8579
|
-
|
|
8586
|
+
_,
|
|
8580
8587
|
S,
|
|
8581
8588
|
y
|
|
8582
8589
|
]
|
|
@@ -8600,7 +8607,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8600
8607
|
var Ie;
|
|
8601
8608
|
if (z !== ee.current) {
|
|
8602
8609
|
if (z !== void 0 && ee.current === void 0 || typeof z == "string" && typeof ee.current == "string" && z !== ee.current) {
|
|
8603
|
-
|
|
8610
|
+
_ == null || _([]), S == null || S({}), (Ie = l.current) == null || Ie.unselectAll(), ee.current = z;
|
|
8604
8611
|
return;
|
|
8605
8612
|
}
|
|
8606
8613
|
z === void 0 && ee.current !== void 0 && j(!0), ee.current = z;
|
|
@@ -8652,7 +8659,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8652
8659
|
params: Ne,
|
|
8653
8660
|
name_search: z,
|
|
8654
8661
|
context: d
|
|
8655
|
-
}),
|
|
8662
|
+
}), R == null || R(je), z ? (ce(je.length), H(je.length), q(!0), j(!1)) : q(!1), je.length === 0) {
|
|
8656
8663
|
We.current = [], ce(0), H(0), de([]), h(!1);
|
|
8657
8664
|
return;
|
|
8658
8665
|
}
|
|
@@ -8679,7 +8686,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8679
8686
|
d,
|
|
8680
8687
|
et,
|
|
8681
8688
|
E,
|
|
8682
|
-
|
|
8689
|
+
R,
|
|
8683
8690
|
st,
|
|
8684
8691
|
Pe,
|
|
8685
8692
|
me,
|
|
@@ -8891,20 +8898,20 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8891
8898
|
onRowStatus: g,
|
|
8892
8899
|
onRowStyle: v,
|
|
8893
8900
|
headerCheckboxState: b,
|
|
8894
|
-
onHeaderCheckboxClick:
|
|
8901
|
+
onHeaderCheckboxClick: A,
|
|
8895
8902
|
refresh: x,
|
|
8896
8903
|
actionViewSortState: C,
|
|
8897
|
-
onSortChange:
|
|
8904
|
+
onSortChange: _,
|
|
8898
8905
|
tableRef: T,
|
|
8899
8906
|
isFieldLoading: w,
|
|
8900
8907
|
onChangeTreeType: S
|
|
8901
8908
|
}) => {
|
|
8902
8909
|
const D = Q(() => e.map((I) => ({
|
|
8903
8910
|
...I,
|
|
8904
|
-
render: (
|
|
8911
|
+
render: (R, k) => /* @__PURE__ */ s(
|
|
8905
8912
|
ns,
|
|
8906
8913
|
{
|
|
8907
|
-
value:
|
|
8914
|
+
value: R,
|
|
8908
8915
|
record: k,
|
|
8909
8916
|
column: I,
|
|
8910
8917
|
isFieldLoading: w
|
|
@@ -8934,10 +8941,10 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
|
|
|
8934
8941
|
onRowStatus: g,
|
|
8935
8942
|
onRowStyle: v,
|
|
8936
8943
|
headerCheckboxState: b,
|
|
8937
|
-
onHeaderCheckboxClick:
|
|
8944
|
+
onHeaderCheckboxClick: A,
|
|
8938
8945
|
onForceReload: x,
|
|
8939
8946
|
initialSortState: C,
|
|
8940
|
-
onSortChange:
|
|
8947
|
+
onSortChange: _,
|
|
8941
8948
|
onChangeTableType: S
|
|
8942
8949
|
}
|
|
8943
8950
|
);
|
|
@@ -8969,7 +8976,7 @@ function Ph(e, t) {
|
|
|
8969
8976
|
} = e, h = W(null), p = W(null), y = ii(a), { treeMaxLimit: g } = rn(), v = xa({
|
|
8970
8977
|
elementRef: p,
|
|
8971
8978
|
offset: Dh
|
|
8972
|
-
}), { treeView: b, formView:
|
|
8979
|
+
}), { treeView: b, formView: A, loading: x } = Wo({
|
|
8973
8980
|
model: n,
|
|
8974
8981
|
formViewProps: r,
|
|
8975
8982
|
treeViewProps: o,
|
|
@@ -8977,11 +8984,11 @@ function Ph(e, t) {
|
|
|
8977
8984
|
}), C = Q(() => {
|
|
8978
8985
|
if (b)
|
|
8979
8986
|
return Yt(b);
|
|
8980
|
-
}, [b]), { columns:
|
|
8987
|
+
}, [b]), { columns: _, strings: T } = Oh(C, d), w = Q(() => _ || [], [_]), {
|
|
8981
8988
|
searchVisible: S,
|
|
8982
8989
|
searchValues: D,
|
|
8983
8990
|
selectedRowKeys: I,
|
|
8984
|
-
refresh:
|
|
8991
|
+
refresh: R,
|
|
8985
8992
|
onRowStatus: k,
|
|
8986
8993
|
onGetFirstVisibleRowIndex: E,
|
|
8987
8994
|
setTreeFirstVisibleRow: H,
|
|
@@ -9024,7 +9031,7 @@ function Ph(e, t) {
|
|
|
9024
9031
|
filterType: u,
|
|
9025
9032
|
context: d,
|
|
9026
9033
|
onChangeTreeType: m
|
|
9027
|
-
}), He = ii(
|
|
9034
|
+
}), He = ii(R), [Be, be, ue] = Ko({
|
|
9028
9035
|
ooui: C,
|
|
9029
9036
|
model: n,
|
|
9030
9037
|
showEmptyValues: !0,
|
|
@@ -9034,7 +9041,7 @@ function Ph(e, t) {
|
|
|
9034
9041
|
) : void 0
|
|
9035
9042
|
});
|
|
9036
9043
|
Dt(t, () => ({
|
|
9037
|
-
refreshResults:
|
|
9044
|
+
refreshResults: R,
|
|
9038
9045
|
getFields: () => b == null ? void 0 : b.fields
|
|
9039
9046
|
}));
|
|
9040
9047
|
const Ye = Q(() => ue ? /* @__PURE__ */ s(qo, { aggregates: be, isLoading: Be }) : null, [be, Be, ue]), Pe = O(
|
|
@@ -9053,7 +9060,7 @@ function Ph(e, t) {
|
|
|
9053
9060
|
Eh,
|
|
9054
9061
|
{
|
|
9055
9062
|
filterType: u,
|
|
9056
|
-
formView:
|
|
9063
|
+
formView: A,
|
|
9057
9064
|
treeView: b,
|
|
9058
9065
|
searchVisible: S,
|
|
9059
9066
|
searchValues: D,
|
|
@@ -9134,7 +9141,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9134
9141
|
availableViews: m,
|
|
9135
9142
|
searchTreeNameSearch: h,
|
|
9136
9143
|
limit: p
|
|
9137
|
-
} = e, y = W(t), [g, v] = F(er), { treeMaxLimit: b } = rn(), { setLimit:
|
|
9144
|
+
} = e, y = W(t), [g, v] = F(er), { treeMaxLimit: b } = rn(), { setLimit: A } = Nn();
|
|
9138
9145
|
It(() => {
|
|
9139
9146
|
if (p === 0) {
|
|
9140
9147
|
v("infinite");
|
|
@@ -9170,18 +9177,18 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9170
9177
|
const {
|
|
9171
9178
|
currentView: x,
|
|
9172
9179
|
setPreviousView: C,
|
|
9173
|
-
setTreeType:
|
|
9180
|
+
setTreeType: _,
|
|
9174
9181
|
setSelectedRowItems: T
|
|
9175
9182
|
} = ae(St);
|
|
9176
9183
|
le(() => {
|
|
9177
|
-
|
|
9184
|
+
_ == null || _(g);
|
|
9178
9185
|
}, [g]);
|
|
9179
9186
|
const w = O(
|
|
9180
9187
|
(D) => {
|
|
9181
9188
|
const { id: I } = D;
|
|
9182
9189
|
f(I);
|
|
9183
|
-
const
|
|
9184
|
-
C == null || C(x), c(
|
|
9190
|
+
const R = d.findIndex((E) => E.id === I);
|
|
9191
|
+
C == null || C(x), c(R);
|
|
9185
9192
|
const k = m.find(
|
|
9186
9193
|
(E) => E.type === "form"
|
|
9187
9194
|
);
|
|
@@ -9201,7 +9208,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9201
9208
|
y.current && !t && g === "infinite" && (T == null || T([])), y.current = t;
|
|
9202
9209
|
}, [t, g]);
|
|
9203
9210
|
const S = O((D) => {
|
|
9204
|
-
v(D), D === "paginated" && (
|
|
9211
|
+
v(D), D === "paginated" && (A == null || A(p || ht)), D === "infinite" && (A == null || A(0));
|
|
9205
9212
|
}, []);
|
|
9206
9213
|
return t ? /* @__PURE__ */ V(On, { children: [
|
|
9207
9214
|
/* @__PURE__ */ s(Hr, { showSummary: g !== "infinite", children: /* @__PURE__ */ s(
|
|
@@ -9279,16 +9286,16 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9279
9286
|
sorter: g,
|
|
9280
9287
|
setSorter: v,
|
|
9281
9288
|
totalItems: b,
|
|
9282
|
-
setTotalItems:
|
|
9289
|
+
setTotalItems: A,
|
|
9283
9290
|
setSelectedRowItems: x,
|
|
9284
9291
|
selectedRowItems: C,
|
|
9285
|
-
searchTreeNameSearch:
|
|
9292
|
+
searchTreeNameSearch: _,
|
|
9286
9293
|
setSearchTreeNameSearch: T,
|
|
9287
9294
|
goToResourceId: w,
|
|
9288
9295
|
limit: S,
|
|
9289
9296
|
isActive: D,
|
|
9290
9297
|
initialSearchParams: I,
|
|
9291
|
-
initialCurrentPage:
|
|
9298
|
+
initialCurrentPage: R,
|
|
9292
9299
|
initialOrder: k
|
|
9293
9300
|
} = e, [E, H] = F(!1), [N, B] = F(!1), [M, P] = F(!1), [Y, K] = F(!0), [L, ie] = F(!0), [X, ye] = F([]), [j, U] = F(!1), [ce, ne] = F(
|
|
9294
9301
|
I || []
|
|
@@ -9302,7 +9309,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9302
9309
|
), [Pe, Oe] = F(
|
|
9303
9310
|
S !== void 0 ? S : ht
|
|
9304
9311
|
), [ve, Ae] = F(r), [me, et] = F(
|
|
9305
|
-
|
|
9312
|
+
R || 1
|
|
9306
9313
|
);
|
|
9307
9314
|
le(() => {
|
|
9308
9315
|
m && m.length > 0 && !h && (p == null || p(0), f == null || f(m[0].id));
|
|
@@ -9367,8 +9374,8 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9367
9374
|
sorter: g,
|
|
9368
9375
|
setSorter: v,
|
|
9369
9376
|
totalItems: b,
|
|
9370
|
-
setTotalItems:
|
|
9371
|
-
searchTreeNameSearch:
|
|
9377
|
+
setTotalItems: A,
|
|
9378
|
+
searchTreeNameSearch: _,
|
|
9372
9379
|
setSearchTreeNameSearch: T,
|
|
9373
9380
|
setGraphIsLoading: z,
|
|
9374
9381
|
graphIsLoading: q,
|
|
@@ -9523,8 +9530,8 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9523
9530
|
id: n,
|
|
9524
9531
|
type: "graph",
|
|
9525
9532
|
context: o
|
|
9526
|
-
}),
|
|
9527
|
-
h(
|
|
9533
|
+
}), A = Ti(b.arch);
|
|
9534
|
+
h(A), u(!1), y == null || y(!1);
|
|
9528
9535
|
} catch (b) {
|
|
9529
9536
|
return console.error(b), u(!1), y == null || y(!1), /* @__PURE__ */ s(se, { children: JSON.stringify(b) });
|
|
9530
9537
|
}
|
|
@@ -9534,7 +9541,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9534
9541
|
switch (m.type) {
|
|
9535
9542
|
case "indicatorField":
|
|
9536
9543
|
case "indicator": {
|
|
9537
|
-
const b = m,
|
|
9544
|
+
const b = m, A = b.type === "indicatorField" ? {
|
|
9538
9545
|
field: b.field,
|
|
9539
9546
|
operator: b.operator
|
|
9540
9547
|
} : {};
|
|
@@ -9551,7 +9558,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9551
9558
|
suffix: b.suffix,
|
|
9552
9559
|
manualIds: l,
|
|
9553
9560
|
fixedHeight: c,
|
|
9554
|
-
...
|
|
9561
|
+
...A
|
|
9555
9562
|
}
|
|
9556
9563
|
);
|
|
9557
9564
|
}
|
|
@@ -9622,7 +9629,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9622
9629
|
switch (m.type) {
|
|
9623
9630
|
case "indicatorField":
|
|
9624
9631
|
case "indicator": {
|
|
9625
|
-
const { value: p, total: y, percent: g, icon: v, color: b, suffix:
|
|
9632
|
+
const { value: p, total: y, percent: g, icon: v, color: b, suffix: A } = m;
|
|
9626
9633
|
return /* @__PURE__ */ s(
|
|
9627
9634
|
sa,
|
|
9628
9635
|
{
|
|
@@ -9631,7 +9638,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9631
9638
|
percent: g,
|
|
9632
9639
|
color: b,
|
|
9633
9640
|
icon: v,
|
|
9634
|
-
suffix:
|
|
9641
|
+
suffix: A,
|
|
9635
9642
|
showPercent: aa(g),
|
|
9636
9643
|
fixedHeight: l
|
|
9637
9644
|
}
|
|
@@ -9821,8 +9828,8 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9821
9828
|
t && d();
|
|
9822
9829
|
}, [t, o]), c && c.message !== "active_id_not_found")
|
|
9823
9830
|
return /* @__PURE__ */ s(oa, { error: c });
|
|
9824
|
-
const { id: h, model: p, limit: y, domain: g, context: v, initialView: b, description:
|
|
9825
|
-
/* @__PURE__ */ s(Vt, { title:
|
|
9831
|
+
const { id: h, model: p, limit: y, domain: g, context: v, initialView: b, description: A } = a || {}, x = f ? dl : Mn, C = A ? /* @__PURE__ */ V(se, { children: [
|
|
9832
|
+
/* @__PURE__ */ s(Vt, { title: A, children: /* @__PURE__ */ s(Pn, { className: "pr-1 text-xs" }) }),
|
|
9826
9833
|
/* @__PURE__ */ s("span", { children: (a == null ? void 0 : a.title) || "" })
|
|
9827
9834
|
] }) : /* @__PURE__ */ s("span", { children: (a == null ? void 0 : a.title) || "" });
|
|
9828
9835
|
return /* @__PURE__ */ V(
|
|
@@ -9833,7 +9840,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9833
9840
|
title: C,
|
|
9834
9841
|
action: i,
|
|
9835
9842
|
openAction: m,
|
|
9836
|
-
tooltip:
|
|
9843
|
+
tooltip: A,
|
|
9837
9844
|
card: t.card,
|
|
9838
9845
|
children: [
|
|
9839
9846
|
l && /* @__PURE__ */ s(sr, {}),
|
|
@@ -9866,20 +9873,20 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9866
9873
|
const { ooui: t } = e;
|
|
9867
9874
|
return /* @__PURE__ */ s(Me, { type: "array", ...e, children: /* @__PURE__ */ s(qh, { ooui: t }) });
|
|
9868
9875
|
}, qh = (e) => {
|
|
9869
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((
|
|
9876
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((_) => _.operation !== "pendingRemove").map((_) => _.id), [i, l] = F([]), [c, d] = F(), [f, u] = F(!1), { relation: m, context: h, readOnly: p, field: y } = n, g = ae(Je), { getContext: v } = g || {};
|
|
9870
9877
|
Ht(() => {
|
|
9871
|
-
|
|
9878
|
+
A();
|
|
9872
9879
|
}, [o]);
|
|
9873
|
-
const b = (
|
|
9880
|
+
const b = (_) => {
|
|
9874
9881
|
r == null || r({
|
|
9875
|
-
items:
|
|
9882
|
+
items: _
|
|
9876
9883
|
});
|
|
9877
9884
|
};
|
|
9878
|
-
async function
|
|
9885
|
+
async function A() {
|
|
9879
9886
|
u(!0);
|
|
9880
|
-
let
|
|
9887
|
+
let _ = [];
|
|
9881
9888
|
try {
|
|
9882
|
-
if (p && (
|
|
9889
|
+
if (p && (_ = [["id", "in", a]]), n.domain) {
|
|
9883
9890
|
const S = await $.getHandler().evalDomain({
|
|
9884
9891
|
domain: n.domain,
|
|
9885
9892
|
values: pn({
|
|
@@ -9889,11 +9896,11 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9889
9896
|
fields: g == null ? void 0 : g.getFields(),
|
|
9890
9897
|
context: g.getContext()
|
|
9891
9898
|
});
|
|
9892
|
-
|
|
9899
|
+
_ = [..._, ...S];
|
|
9893
9900
|
}
|
|
9894
9901
|
const w = (await $.getHandler().search({
|
|
9895
9902
|
model: m,
|
|
9896
|
-
params:
|
|
9903
|
+
params: _,
|
|
9897
9904
|
fieldsToRetrieve: [y],
|
|
9898
9905
|
context: { ...v == null ? void 0 : v(), ...h }
|
|
9899
9906
|
})).map((S) => {
|
|
@@ -9908,18 +9915,18 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9908
9915
|
u(!1);
|
|
9909
9916
|
}
|
|
9910
9917
|
}
|
|
9911
|
-
const x = (
|
|
9912
|
-
const T = o.map((S) =>
|
|
9918
|
+
const x = (_) => {
|
|
9919
|
+
const T = o.map((S) => _.includes(S.id) ? S.operation === "pendingRemove" ? {
|
|
9913
9920
|
...S,
|
|
9914
9921
|
operation: "pendingLink"
|
|
9915
9922
|
} : S : { id: S.id, operation: "pendingRemove" }), w = T.map((S) => S.id);
|
|
9916
|
-
|
|
9923
|
+
_.filter((S) => !w.includes(S)).forEach((S) => {
|
|
9917
9924
|
T.push({ id: S, operation: "pendingLink" });
|
|
9918
9925
|
}), b(T);
|
|
9919
|
-
}, C = (
|
|
9920
|
-
const { label: T, closable: w, onClose: S } =
|
|
9926
|
+
}, C = (_) => {
|
|
9927
|
+
const { label: T, closable: w, onClose: S } = _, D = (k) => {
|
|
9921
9928
|
k.preventDefault(), k.stopPropagation();
|
|
9922
|
-
}, I = or(T),
|
|
9929
|
+
}, I = or(T), R = I && ea(I);
|
|
9923
9930
|
return /* @__PURE__ */ s(
|
|
9924
9931
|
Yo,
|
|
9925
9932
|
{
|
|
@@ -9927,7 +9934,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9927
9934
|
onMouseDown: D,
|
|
9928
9935
|
closable: w,
|
|
9929
9936
|
onClose: S,
|
|
9930
|
-
closeIcon: /* @__PURE__ */ s("span", { style: { color:
|
|
9937
|
+
closeIcon: /* @__PURE__ */ s("span", { style: { color: R && R.text }, children: "X" }),
|
|
9931
9938
|
children: T
|
|
9932
9939
|
}
|
|
9933
9940
|
);
|
|
@@ -9943,7 +9950,7 @@ const kh = At(Ph), er = "legacy", Vh = (e) => {
|
|
|
9943
9950
|
options: i,
|
|
9944
9951
|
onChange: x,
|
|
9945
9952
|
loading: f,
|
|
9946
|
-
filterOption: (
|
|
9953
|
+
filterOption: (_, T) => T.label.toLowerCase().includes(_.toString().toLowerCase())
|
|
9947
9954
|
}
|
|
9948
9955
|
) }) });
|
|
9949
9956
|
}, zh = (e) => {
|
|
@@ -10231,13 +10238,13 @@ function ug(e, t) {
|
|
|
10231
10238
|
insideButtonModal: g = !1,
|
|
10232
10239
|
parentContext: v = {},
|
|
10233
10240
|
actionDomain: b,
|
|
10234
|
-
visible:
|
|
10241
|
+
visible: A = !0,
|
|
10235
10242
|
rootForm: x = !1,
|
|
10236
10243
|
defaultValues: C,
|
|
10237
|
-
forcedValues:
|
|
10244
|
+
forcedValues: _ = {},
|
|
10238
10245
|
parentWidth: T,
|
|
10239
10246
|
onMustRefreshParent: w
|
|
10240
|
-
} = e, { t: S } = ge(), [D, I] = F(!1), [
|
|
10247
|
+
} = e, { t: S } = ge(), [D, I] = F(!1), [R, k] = F(), [E, H] = F(), [N] = Et.useForm(), [B, M] = F(), [P, Y] = F(), K = ae(fl), [L, ie] = F(), [X, ye] = F(!1), j = W(), U = W({}), ce = W({}), ne = W(!1), de = W(!1), Z = W(!1), z = (T !== void 0 ? T : L) < dg, ee = ae(Je), { activeId: xe, getPlainValues: Re } = ee || {}, Ue = W(!1), We = ae(
|
|
10241
10248
|
St
|
|
10242
10249
|
), {
|
|
10243
10250
|
setFormIsSaving: pe = void 0,
|
|
@@ -10264,13 +10271,13 @@ function ug(e, t) {
|
|
|
10264
10271
|
}
|
|
10265
10272
|
})), le(() => {
|
|
10266
10273
|
if (k(void 0), !(!n && !p)) {
|
|
10267
|
-
if (!
|
|
10274
|
+
if (!A) {
|
|
10268
10275
|
j.current = void 0, H(void 0);
|
|
10269
10276
|
return;
|
|
10270
10277
|
}
|
|
10271
10278
|
(r === void 0 && P || r !== void 0 && P && r < 0) && (j.current = void 0, H(void 0)), Pt();
|
|
10272
10279
|
}
|
|
10273
|
-
}, [r, n, h, p,
|
|
10280
|
+
}, [r, n, h, p, A]), le(() => {
|
|
10274
10281
|
X && (Ut({
|
|
10275
10282
|
elementHasLostFocus: !0
|
|
10276
10283
|
}), ye(!1));
|
|
@@ -10467,7 +10474,7 @@ function ug(e, t) {
|
|
|
10467
10474
|
await $.getHandler().update({
|
|
10468
10475
|
model: n,
|
|
10469
10476
|
id: me(),
|
|
10470
|
-
values: { ...oe, ...
|
|
10477
|
+
values: { ...oe, ..._ },
|
|
10471
10478
|
fields: P,
|
|
10472
10479
|
context: {
|
|
10473
10480
|
...v,
|
|
@@ -10477,7 +10484,7 @@ function ug(e, t) {
|
|
|
10477
10484
|
} else {
|
|
10478
10485
|
const oe = we(P), he = await $.getHandler().create({
|
|
10479
10486
|
model: n,
|
|
10480
|
-
values: { ...oe, ...
|
|
10487
|
+
values: { ...oe, ..._ },
|
|
10481
10488
|
fields: P,
|
|
10482
10489
|
context: {
|
|
10483
10490
|
...v,
|
|
@@ -10780,7 +10787,7 @@ function ug(e, t) {
|
|
|
10780
10787
|
he && it(!1), bt(De);
|
|
10781
10788
|
}
|
|
10782
10789
|
}
|
|
10783
|
-
const Gr = () => !E && !
|
|
10790
|
+
const Gr = () => !E && !R ? /* @__PURE__ */ s(tt, {}) : !n && !p || !A ? null : /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
|
|
10784
10791
|
rd,
|
|
10785
10792
|
{
|
|
10786
10793
|
getValues: $e,
|
|
@@ -10845,7 +10852,7 @@ function ug(e, t) {
|
|
|
10845
10852
|
)
|
|
10846
10853
|
] }) })
|
|
10847
10854
|
] });
|
|
10848
|
-
return
|
|
10855
|
+
return A ? /* @__PURE__ */ s(
|
|
10849
10856
|
ko,
|
|
10850
10857
|
{
|
|
10851
10858
|
bounds: !0,
|
|
@@ -10854,7 +10861,7 @@ function ug(e, t) {
|
|
|
10854
10861
|
ie((J = G.bounds) == null ? void 0 : J.width);
|
|
10855
10862
|
},
|
|
10856
10863
|
children: ({ measureRef: G }) => /* @__PURE__ */ V("div", { className: "pb-2", ref: G, children: [
|
|
10857
|
-
|
|
10864
|
+
R && /* @__PURE__ */ s(oa, { className: "mt-5 mb-10", error: R }),
|
|
10858
10865
|
Gr(),
|
|
10859
10866
|
i && Jt()
|
|
10860
10867
|
] })
|
|
@@ -10871,30 +10878,30 @@ const $n = At(ug), Ln = (e) => {
|
|
|
10871
10878
|
isMenuAction: i = !1,
|
|
10872
10879
|
actionData: l,
|
|
10873
10880
|
...c
|
|
10874
|
-
} = e, { model: d } = c, { modalWidth: f } = Vr(), [u, m] = F(r), [h, p] = F(!1), [y, g] = F(), { action_id: v, res_id: b, action_type:
|
|
10881
|
+
} = e, { model: d } = c, { modalWidth: f } = Vr(), [u, m] = F(r), [h, p] = F(!1), [y, g] = F(), { action_id: v, res_id: b, action_type: A, view_id: x } = l || {};
|
|
10875
10882
|
le(() => {
|
|
10876
10883
|
i && C();
|
|
10877
10884
|
}, [l, i]);
|
|
10878
10885
|
async function C() {
|
|
10879
10886
|
const S = await $.getHandler().isShortcutFavorite({
|
|
10880
10887
|
action_id: v,
|
|
10881
|
-
action_type:
|
|
10888
|
+
action_type: A,
|
|
10882
10889
|
view_id: x,
|
|
10883
10890
|
res_id: b || !1
|
|
10884
10891
|
});
|
|
10885
10892
|
p(S !== !1), S !== !1 && g(S);
|
|
10886
10893
|
}
|
|
10887
|
-
async function
|
|
10894
|
+
async function _() {
|
|
10888
10895
|
if (h && y)
|
|
10889
10896
|
await $.getHandler().removeFavourite({
|
|
10890
10897
|
shortcut_id: y
|
|
10891
10898
|
});
|
|
10892
10899
|
else {
|
|
10893
|
-
const { action_id: S, res_id: D, action_type: I, view_id:
|
|
10900
|
+
const { action_id: S, res_id: D, action_type: I, view_id: R } = l;
|
|
10894
10901
|
await $.getHandler().addFavourite({
|
|
10895
10902
|
action_id: S,
|
|
10896
10903
|
action_type: I,
|
|
10897
|
-
view_id:
|
|
10904
|
+
view_id: R,
|
|
10898
10905
|
res_id: D || !1
|
|
10899
10906
|
});
|
|
10900
10907
|
}
|
|
@@ -10908,7 +10915,7 @@ const $n = At(ug), Ln = (e) => {
|
|
|
10908
10915
|
type: h ? "primary" : "default",
|
|
10909
10916
|
icon: h ? /* @__PURE__ */ s(sc, { style: { color: "white" } }) : /* @__PURE__ */ s(ic, {}),
|
|
10910
10917
|
style: { width: 30 },
|
|
10911
|
-
onClick:
|
|
10918
|
+
onClick: _
|
|
10912
10919
|
}
|
|
10913
10920
|
) }),
|
|
10914
10921
|
/* @__PURE__ */ s(Fe, { style: { paddingLeft: 10 }, children: u })
|
|
@@ -10936,7 +10943,7 @@ const $n = At(ug), Ln = (e) => {
|
|
|
10936
10943
|
parentWidth: w,
|
|
10937
10944
|
...c
|
|
10938
10945
|
},
|
|
10939
|
-
`${d}-${n}-${v}-${b}-${
|
|
10946
|
+
`${d}-${n}-${v}-${b}-${A}-${x}-${r}`
|
|
10940
10947
|
)
|
|
10941
10948
|
}
|
|
10942
10949
|
) });
|
|
@@ -10959,11 +10966,11 @@ const $n = At(ug), Ln = (e) => {
|
|
|
10959
10966
|
treeViewProps: void 0,
|
|
10960
10967
|
context: i,
|
|
10961
10968
|
enabled: e
|
|
10962
|
-
}),
|
|
10963
|
-
async (
|
|
10969
|
+
}), A = Q(() => g != null && g.arch ? Xi(g.arch, "infinite") === "1" : !1, [g == null ? void 0 : g.arch]), x = O(
|
|
10970
|
+
async (R) => {
|
|
10964
10971
|
m(!0);
|
|
10965
10972
|
try {
|
|
10966
|
-
await n(
|
|
10973
|
+
await n(R);
|
|
10967
10974
|
} catch (k) {
|
|
10968
10975
|
en(k);
|
|
10969
10976
|
} finally {
|
|
@@ -10973,9 +10980,9 @@ const $n = At(ug), Ln = (e) => {
|
|
|
10973
10980
|
[n]
|
|
10974
10981
|
), C = O(() => {
|
|
10975
10982
|
t();
|
|
10976
|
-
}, [t]),
|
|
10977
|
-
({ id:
|
|
10978
|
-
x([
|
|
10983
|
+
}, [t]), _ = O(
|
|
10984
|
+
({ id: R }) => {
|
|
10985
|
+
x([R]);
|
|
10979
10986
|
},
|
|
10980
10987
|
[x]
|
|
10981
10988
|
), T = O(() => {
|
|
@@ -10985,15 +10992,15 @@ const $n = At(ug), Ln = (e) => {
|
|
|
10985
10992
|
}
|
|
10986
10993
|
x(d);
|
|
10987
10994
|
}, [d, C, x]), w = Q(
|
|
10988
|
-
() =>
|
|
10989
|
-
[
|
|
10995
|
+
() => A ? sl : ll,
|
|
10996
|
+
[A]
|
|
10990
10997
|
), S = O(() => {
|
|
10991
10998
|
c(!0);
|
|
10992
10999
|
}, []), D = O(() => {
|
|
10993
11000
|
c(!1), C();
|
|
10994
11001
|
}, [C]), I = O(
|
|
10995
|
-
(
|
|
10996
|
-
c(!1), C(),
|
|
11002
|
+
(R) => {
|
|
11003
|
+
c(!1), C(), R && x([R]);
|
|
10997
11004
|
},
|
|
10998
11005
|
[C, x]
|
|
10999
11006
|
);
|
|
@@ -11018,7 +11025,7 @@ const $n = At(ug), Ln = (e) => {
|
|
|
11018
11025
|
treeView: g,
|
|
11019
11026
|
model: r,
|
|
11020
11027
|
nameSearch: o,
|
|
11021
|
-
onRowClicked:
|
|
11028
|
+
onRowClicked: _,
|
|
11022
11029
|
treeScrollY: p * 0.3,
|
|
11023
11030
|
domain: a,
|
|
11024
11031
|
parentContext: i,
|
|
@@ -11081,33 +11088,33 @@ const $n = At(ug), Ln = (e) => {
|
|
|
11081
11088
|
context: l,
|
|
11082
11089
|
id: c,
|
|
11083
11090
|
domain: d
|
|
11084
|
-
} = r, f = o && !i ? { backgroundColor: ml.colorPrimaryBg } : void 0, [u, m] = F(!1), [h, p] = F(!1), [y, g] = F(!1), [v, b] = F(),
|
|
11091
|
+
} = r, f = o && !i ? { backgroundColor: ml.colorPrimaryBg } : void 0, [u, m] = F(!1), [h, p] = F(!1), [y, g] = F(!1), [v, b] = F(), A = W(!1), [x, C] = F(""), _ = W(), T = ae(Je), { domain: w, getValues: S, getFields: D, getContext: I, elementHasLostFocus: R } = T || {}, k = W([]), [E, H] = F([]), N = t && t[0] || void 0, B = t && t[1] || "";
|
|
11085
11092
|
le(() => {
|
|
11086
11093
|
!Array.isArray(t) && t && L(t);
|
|
11087
11094
|
}, [t]), le(() => {
|
|
11088
|
-
N && B.length === 0 ? L(N) : N && B.length > 0 ? C(B) : !N && !B && C(
|
|
11095
|
+
N && B.length === 0 ? L(N) : N && B.length > 0 ? C(B) : !N && !B && C(_.current || "");
|
|
11089
11096
|
}, [t]);
|
|
11090
11097
|
const M = (j) => {
|
|
11091
|
-
n == null || n(j),
|
|
11098
|
+
n == null || n(j), R == null || R();
|
|
11092
11099
|
}, P = (j) => {
|
|
11093
|
-
|
|
11100
|
+
_.current = j.target.value, M([void 0, ""]);
|
|
11094
11101
|
}, Y = async () => {
|
|
11095
11102
|
if (!y && x !== B) {
|
|
11096
|
-
if (await new Promise((j) => setTimeout(j, 100)),
|
|
11103
|
+
if (await new Promise((j) => setTimeout(j, 100)), A.current) {
|
|
11097
11104
|
M([void 0, ""]);
|
|
11098
11105
|
return;
|
|
11099
11106
|
}
|
|
11100
11107
|
g(!0);
|
|
11101
11108
|
try {
|
|
11102
11109
|
if (k.current && k.current.length > 0)
|
|
11103
|
-
K(
|
|
11110
|
+
K(_.current);
|
|
11104
11111
|
else {
|
|
11105
11112
|
const j = await $.getHandler().nameSearch({
|
|
11106
11113
|
model: a,
|
|
11107
|
-
payload:
|
|
11114
|
+
payload: _.current,
|
|
11108
11115
|
context: { ...I == null ? void 0 : I(), ...l }
|
|
11109
11116
|
});
|
|
11110
|
-
j.length === 1 ? (
|
|
11117
|
+
j.length === 1 ? (_.current = void 0, M(j[0])) : K(_.current);
|
|
11111
11118
|
}
|
|
11112
11119
|
} catch (j) {
|
|
11113
11120
|
en(j);
|
|
@@ -11205,7 +11212,7 @@ const $n = At(ug), Ln = (e) => {
|
|
|
11205
11212
|
icon: y ? /* @__PURE__ */ s(Nt, {}) : /* @__PURE__ */ s(Pr, {}),
|
|
11206
11213
|
disabled: i || y,
|
|
11207
11214
|
onClick: () => {
|
|
11208
|
-
|
|
11215
|
+
A.current = !0, K(B);
|
|
11209
11216
|
},
|
|
11210
11217
|
style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
11211
11218
|
tabIndex: -1
|
|
@@ -11220,10 +11227,10 @@ const $n = At(ug), Ln = (e) => {
|
|
|
11220
11227
|
visible: u,
|
|
11221
11228
|
nameSearch: N ? void 0 : v,
|
|
11222
11229
|
onSelectValues: async (j) => {
|
|
11223
|
-
m(!1), L(j[0]),
|
|
11230
|
+
m(!1), L(j[0]), A.current = !1, _.current = void 0;
|
|
11224
11231
|
},
|
|
11225
11232
|
onCloseModal: () => {
|
|
11226
|
-
m(!1),
|
|
11233
|
+
m(!1), A.current = !1;
|
|
11227
11234
|
}
|
|
11228
11235
|
}
|
|
11229
11236
|
),
|
|
@@ -11488,20 +11495,20 @@ function wg(e) {
|
|
|
11488
11495
|
showToggleButton: g,
|
|
11489
11496
|
toolbar: v,
|
|
11490
11497
|
context: b,
|
|
11491
|
-
formRef:
|
|
11498
|
+
formRef: A,
|
|
11492
11499
|
onRefreshParentValues: x,
|
|
11493
11500
|
currentId: C
|
|
11494
|
-
} = e, { token:
|
|
11501
|
+
} = e, { token: _ } = bg(), { t: T } = ge(), { duplicatingItem: w, duplicate: S } = vg({
|
|
11495
11502
|
currentId: i === "form" ? C : parseInt(p[0]),
|
|
11496
11503
|
currentModel: o,
|
|
11497
11504
|
onItemDuplicated: () => {
|
|
11498
11505
|
x == null || x();
|
|
11499
11506
|
},
|
|
11500
|
-
context: i === "tree" ? b : (H =
|
|
11501
|
-
}), { actionButtonProps: D, printButtonProps: I, relateButtonProps:
|
|
11507
|
+
context: i === "tree" ? b : (H = A == null ? void 0 : A.current) == null ? void 0 : H.getContext()
|
|
11508
|
+
}), { actionButtonProps: D, printButtonProps: I, relateButtonProps: R } = vl({
|
|
11502
11509
|
toolbar: v,
|
|
11503
11510
|
mustDisableButtons: n,
|
|
11504
|
-
formRef:
|
|
11511
|
+
formRef: A,
|
|
11505
11512
|
onRefreshParentValues: x
|
|
11506
11513
|
}), {
|
|
11507
11514
|
actionButtonProps: k,
|
|
@@ -11514,7 +11521,7 @@ function wg(e) {
|
|
|
11514
11521
|
onRefreshParentValues: x
|
|
11515
11522
|
});
|
|
11516
11523
|
return /* @__PURE__ */ V("div", { className: "flex mb-2 pt-3", children: [
|
|
11517
|
-
/* @__PURE__ */ s(bl, { title: t, token:
|
|
11524
|
+
/* @__PURE__ */ s(bl, { title: t, token: _ }),
|
|
11518
11525
|
/* @__PURE__ */ V("div", { className: "flex-none h-8 pl-2", children: [
|
|
11519
11526
|
i !== "graph" && y && /* @__PURE__ */ s(
|
|
11520
11527
|
mt,
|
|
@@ -11629,7 +11636,7 @@ function wg(e) {
|
|
|
11629
11636
|
Wt,
|
|
11630
11637
|
{
|
|
11631
11638
|
icon: /* @__PURE__ */ s(Dr, {}),
|
|
11632
|
-
...
|
|
11639
|
+
...R
|
|
11633
11640
|
}
|
|
11634
11641
|
)
|
|
11635
11642
|
] })
|
|
@@ -11751,7 +11758,7 @@ const xg = (e) => {
|
|
|
11751
11758
|
getContext: p,
|
|
11752
11759
|
domain: y,
|
|
11753
11760
|
fetchValues: g
|
|
11754
|
-
} = f || {}, { t: v } = ge(), [b,
|
|
11761
|
+
} = f || {}, { t: v } = ge(), [b, A] = F(!1), [x, C] = F(!1), [_, T] = F(), [w, S] = F(!1), [D, I] = F(!1), [R, k] = F(), [E, H] = F([]), [N, B] = F(!1), M = W([]), [P, Y] = F(), K = W(), [L, ie] = F(void 0), X = W(), {
|
|
11755
11762
|
readOnly: ye,
|
|
11756
11763
|
relation: j,
|
|
11757
11764
|
context: U,
|
|
@@ -11782,7 +11789,7 @@ const xg = (e) => {
|
|
|
11782
11789
|
await Re(), c > Z.length - 1 && c !== 0 && d(0);
|
|
11783
11790
|
}, Re = async (te) => {
|
|
11784
11791
|
var Se, Ce, Ee;
|
|
11785
|
-
C(!0),
|
|
11792
|
+
C(!0), A(!1), T(void 0);
|
|
11786
11793
|
try {
|
|
11787
11794
|
const [ke, we] = await Lo({
|
|
11788
11795
|
treeView: {
|
|
@@ -11856,7 +11863,7 @@ const xg = (e) => {
|
|
|
11856
11863
|
b ? kn({
|
|
11857
11864
|
t: v,
|
|
11858
11865
|
onOk: () => {
|
|
11859
|
-
Ve(), te(),
|
|
11866
|
+
Ve(), te(), A(!1);
|
|
11860
11867
|
}
|
|
11861
11868
|
}) : te();
|
|
11862
11869
|
}, He = () => {
|
|
@@ -11886,7 +11893,7 @@ const xg = (e) => {
|
|
|
11886
11893
|
I(!0);
|
|
11887
11894
|
}) : I(!0);
|
|
11888
11895
|
}, ue = async () => {
|
|
11889
|
-
C(!0),
|
|
11896
|
+
C(!0), A(!1), T(void 0);
|
|
11890
11897
|
try {
|
|
11891
11898
|
if (Z[c].id > 0) {
|
|
11892
11899
|
const te = a.map((Se) => Se.id === Z[c].id ? {
|
|
@@ -11904,7 +11911,7 @@ const xg = (e) => {
|
|
|
11904
11911
|
d(0), C(!1);
|
|
11905
11912
|
}, Ye = async () => {
|
|
11906
11913
|
const te = Z.filter((Se) => E.includes(Se.id));
|
|
11907
|
-
C(!0),
|
|
11914
|
+
C(!0), A(!1), T(void 0);
|
|
11908
11915
|
try {
|
|
11909
11916
|
const Se = te.map((Ee) => Ee.id), Ce = a.filter((Ee) => !(Se.includes(Ee.id) && Ee.id < 0)).map((Ee) => Se.includes(Ee.id) ? {
|
|
11910
11917
|
...Ee,
|
|
@@ -12006,7 +12013,7 @@ const xg = (e) => {
|
|
|
12006
12013
|
values: { ...we, id: $e },
|
|
12007
12014
|
treeValues: { ...we, id: $e }
|
|
12008
12015
|
} : Ge);
|
|
12009
|
-
ee(st),
|
|
12016
|
+
ee(st), A(!0);
|
|
12010
12017
|
},
|
|
12011
12018
|
readOnly: ye
|
|
12012
12019
|
}
|
|
@@ -12055,8 +12062,8 @@ const xg = (e) => {
|
|
|
12055
12062
|
);
|
|
12056
12063
|
}
|
|
12057
12064
|
};
|
|
12058
|
-
if (
|
|
12059
|
-
return /* @__PURE__ */ s(vt, { className: "mt-10", message:
|
|
12065
|
+
if (_)
|
|
12066
|
+
return /* @__PURE__ */ s(vt, { className: "mt-10", message: _, type: "error", banner: !0 });
|
|
12060
12067
|
const et = N;
|
|
12061
12068
|
return x ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ V(se, { children: [
|
|
12062
12069
|
/* @__PURE__ */ s(
|
|
@@ -12094,10 +12101,10 @@ const xg = (e) => {
|
|
|
12094
12101
|
{
|
|
12095
12102
|
formView: o.get("form"),
|
|
12096
12103
|
model: j,
|
|
12097
|
-
id:
|
|
12104
|
+
id: R == null ? void 0 : R.id,
|
|
12098
12105
|
submitMode: "2many",
|
|
12099
|
-
values:
|
|
12100
|
-
defaultValues:
|
|
12106
|
+
values: R == null ? void 0 : R.values,
|
|
12107
|
+
defaultValues: R == null ? void 0 : R.defaultValues,
|
|
12101
12108
|
visible: w,
|
|
12102
12109
|
onSubmitSucceed: Pe,
|
|
12103
12110
|
parentContext: { ...p == null ? void 0 : p(), ...U },
|
|
@@ -12189,17 +12196,17 @@ const xg = (e) => {
|
|
|
12189
12196
|
endRow: y,
|
|
12190
12197
|
sortFields: g
|
|
12191
12198
|
}) => {
|
|
12192
|
-
const v = yr(g), { realItemsIds: b, otherItems:
|
|
12199
|
+
const v = yr(g), { realItemsIds: b, otherItems: A } = Gd({
|
|
12193
12200
|
allItems: h,
|
|
12194
12201
|
...v ? {} : { range: { startRow: p, endRow: y } }
|
|
12195
12202
|
});
|
|
12196
|
-
if (b.length === 0 &&
|
|
12203
|
+
if (b.length === 0 && A.length === 0)
|
|
12197
12204
|
return { results: [], colors: {}, status: {} };
|
|
12198
12205
|
const x = v ? (await qd(b, t, n, v)).slice(
|
|
12199
12206
|
p,
|
|
12200
12207
|
y
|
|
12201
12208
|
) : b, C = zd(u), {
|
|
12202
|
-
items:
|
|
12209
|
+
items: _,
|
|
12203
12210
|
colors: T,
|
|
12204
12211
|
status: w
|
|
12205
12212
|
} = await Jd({
|
|
@@ -12209,11 +12216,11 @@ const xg = (e) => {
|
|
|
12209
12216
|
context: n,
|
|
12210
12217
|
attrs: C,
|
|
12211
12218
|
treeOoui: u
|
|
12212
|
-
}), D = x.length < y - p &&
|
|
12219
|
+
}), D = x.length < y - p && A.length > 0 ? [...x, ...A.map((R) => R.id)] : x;
|
|
12213
12220
|
return { results: Kd({
|
|
12214
12221
|
finalResultIds: D,
|
|
12215
|
-
fetchedItems:
|
|
12216
|
-
otherItems:
|
|
12222
|
+
fetchedItems: _,
|
|
12223
|
+
otherItems: A
|
|
12217
12224
|
}), colors: T, status: w };
|
|
12218
12225
|
},
|
|
12219
12226
|
[n, t, u, e]
|
|
@@ -12430,18 +12437,18 @@ const Og = ({
|
|
|
12430
12437
|
}, [n, e, t, r]), b = O(
|
|
12431
12438
|
(C) => {
|
|
12432
12439
|
if (g(!1), C != null && C.id && (C != null && C.values)) {
|
|
12433
|
-
const
|
|
12440
|
+
const _ = o.map((T) => T.id === C.id ? {
|
|
12434
12441
|
...T,
|
|
12435
12442
|
values: { ...T.values, ...C.values },
|
|
12436
12443
|
treeValues: { ...T.treeValues, ...C.values }
|
|
12437
12444
|
} : T);
|
|
12438
|
-
a(
|
|
12445
|
+
a(_);
|
|
12439
12446
|
}
|
|
12440
12447
|
m(!1);
|
|
12441
12448
|
},
|
|
12442
12449
|
[o, a]
|
|
12443
|
-
),
|
|
12444
|
-
(C,
|
|
12450
|
+
), A = Ft(
|
|
12451
|
+
(C, _, T, w = !1) => {
|
|
12445
12452
|
let S;
|
|
12446
12453
|
if (w)
|
|
12447
12454
|
S = o.concat({
|
|
@@ -12473,15 +12480,15 @@ const Og = ({
|
|
|
12473
12480
|
async (C) => {
|
|
12474
12481
|
if (!d)
|
|
12475
12482
|
return;
|
|
12476
|
-
const { id:
|
|
12483
|
+
const { id: _ } = C;
|
|
12477
12484
|
let T = o;
|
|
12478
|
-
const w = o.find((S) => S.id ===
|
|
12485
|
+
const w = o.find((S) => S.id === _);
|
|
12479
12486
|
(w == null ? void 0 : w.values) === void 0 && (T = await $.getHandler().readObjects({
|
|
12480
12487
|
model: c,
|
|
12481
12488
|
ids: [C.id],
|
|
12482
12489
|
fields: d.fields,
|
|
12483
12490
|
context: f
|
|
12484
|
-
})), p(T.find((S) => S.id ===
|
|
12491
|
+
})), p(T.find((S) => S.id === _)), g(!1), m(!0);
|
|
12485
12492
|
},
|
|
12486
12493
|
[f, d, o, c, i, l]
|
|
12487
12494
|
);
|
|
@@ -12491,7 +12498,7 @@ const Og = ({
|
|
|
12491
12498
|
continuousEntryMode: y,
|
|
12492
12499
|
createItem: v,
|
|
12493
12500
|
onCancelFormModal: b,
|
|
12494
|
-
onFormModalSubmitSucceed:
|
|
12501
|
+
onFormModalSubmitSucceed: A,
|
|
12495
12502
|
openItemInFormModal: x
|
|
12496
12503
|
};
|
|
12497
12504
|
}, Eg = ({
|
|
@@ -12571,12 +12578,12 @@ const Og = ({
|
|
|
12571
12578
|
selectedRowKeys: y = [],
|
|
12572
12579
|
showPointerCursorInRows: g = !0
|
|
12573
12580
|
}) => {
|
|
12574
|
-
const v = W(), b = c || v,
|
|
12581
|
+
const v = W(), b = c || v, A = W({}), x = W(), C = W(), _ = W(e), { t: T } = ge(), w = Kt(
|
|
12575
12582
|
Mt.FEATURE_MANY2ONE_SORT
|
|
12576
12583
|
);
|
|
12577
12584
|
Ht(() => {
|
|
12578
12585
|
var N, B;
|
|
12579
|
-
if (
|
|
12586
|
+
if (_.current = e, C.current === void 0) {
|
|
12580
12587
|
C.current = e;
|
|
12581
12588
|
return;
|
|
12582
12589
|
}
|
|
@@ -12598,18 +12605,18 @@ const Og = ({
|
|
|
12598
12605
|
const P = gr({
|
|
12599
12606
|
state: M
|
|
12600
12607
|
}), { results: Y, colors: K, status: L } = await i({
|
|
12601
|
-
allItems:
|
|
12608
|
+
allItems: _.current,
|
|
12602
12609
|
startRow: N,
|
|
12603
12610
|
endRow: B,
|
|
12604
12611
|
sortFields: P
|
|
12605
12612
|
});
|
|
12606
|
-
return
|
|
12613
|
+
return A.current = { ...A.current, ...K }, !x.current && L && (x.current = {}), L && (x.current = { ...x.current, ...L }), Y;
|
|
12607
12614
|
},
|
|
12608
12615
|
[i]
|
|
12609
|
-
),
|
|
12616
|
+
), R = O((N) => {
|
|
12610
12617
|
var B, M, P, Y;
|
|
12611
|
-
if (
|
|
12612
|
-
return { color:
|
|
12618
|
+
if (A.current[(M = (B = N.node) == null ? void 0 : B.data) == null ? void 0 : M.id])
|
|
12619
|
+
return { color: A.current[(Y = (P = N.node) == null ? void 0 : P.data) == null ? void 0 : Y.id] };
|
|
12613
12620
|
}, []), { loading: k, getColumnState: E, updateColumnState: H } = Go({
|
|
12614
12621
|
key: Dg({
|
|
12615
12622
|
...h,
|
|
@@ -12626,7 +12633,7 @@ const Og = ({
|
|
|
12626
12633
|
onRowDoubleClick: n,
|
|
12627
12634
|
showPointerCursorInRows: g,
|
|
12628
12635
|
readonly: r,
|
|
12629
|
-
onRowStyle:
|
|
12636
|
+
onRowStyle: R,
|
|
12630
12637
|
onRowSelectionChange: l,
|
|
12631
12638
|
onColumnChanged: H,
|
|
12632
12639
|
onGetColumnsState: E,
|
|
@@ -12672,15 +12679,15 @@ const Og = ({
|
|
|
12672
12679
|
id: g
|
|
12673
12680
|
} = o, v = ae(Je), {
|
|
12674
12681
|
activeId: b,
|
|
12675
|
-
getContext:
|
|
12682
|
+
getContext: A,
|
|
12676
12683
|
fetchValues: x
|
|
12677
|
-
} = v || {}, C = W(),
|
|
12684
|
+
} = v || {}, C = W(), _ = a.size > 1, T = ((Te = a.get("form")) == null ? void 0 : Te.fields) !== void 0, w = Q(() => ({ ...A == null ? void 0 : A(), ...p }), [A, p]), S = Tg({
|
|
12678
12685
|
widgetDomain: y,
|
|
12679
12686
|
fieldName: g
|
|
12680
12687
|
}), {
|
|
12681
12688
|
treeOoui: D,
|
|
12682
12689
|
onTreeFetchRows: I,
|
|
12683
|
-
selectedRowKeys:
|
|
12690
|
+
selectedRowKeys: R,
|
|
12684
12691
|
setSelectedRowKeys: k,
|
|
12685
12692
|
onChangeFirstVisibleRowIndex: E,
|
|
12686
12693
|
onGetFirstVisibileRowIndex: H,
|
|
@@ -12695,7 +12702,7 @@ const Og = ({
|
|
|
12695
12702
|
ooui: D,
|
|
12696
12703
|
model: h,
|
|
12697
12704
|
items: l,
|
|
12698
|
-
selectedRowKeys:
|
|
12705
|
+
selectedRowKeys: R
|
|
12699
12706
|
}), M = Q(() => {
|
|
12700
12707
|
const { title: be } = a.get(c) || {};
|
|
12701
12708
|
return be || o.label;
|
|
@@ -12758,7 +12765,7 @@ const Og = ({
|
|
|
12758
12765
|
items: l,
|
|
12759
12766
|
triggerChange: Y,
|
|
12760
12767
|
setFormHasChanges: X,
|
|
12761
|
-
selectedRowKeys:
|
|
12768
|
+
selectedRowKeys: R,
|
|
12762
12769
|
setSelectedRowKeys: k
|
|
12763
12770
|
}), Ue = () => {
|
|
12764
12771
|
const be = Array.from(a.keys()), ue = be[(be.indexOf(c) + 1) % be.length];
|
|
@@ -12810,11 +12817,11 @@ const Og = ({
|
|
|
12810
12817
|
onPreviousItem: pe,
|
|
12811
12818
|
onNextItem: fe,
|
|
12812
12819
|
onSearchItem: xe,
|
|
12813
|
-
selectedRowKeys:
|
|
12820
|
+
selectedRowKeys: R,
|
|
12814
12821
|
showCreateButton: T,
|
|
12815
|
-
showToggleButton:
|
|
12822
|
+
showToggleButton: _,
|
|
12816
12823
|
toolbar: (Be = a.get(c)) == null ? void 0 : Be.toolbar,
|
|
12817
|
-
context: { ...
|
|
12824
|
+
context: { ...A == null ? void 0 : A(), ...w },
|
|
12818
12825
|
formRef: C,
|
|
12819
12826
|
onRefreshParentValues: () => {
|
|
12820
12827
|
var be;
|
|
@@ -12838,7 +12845,7 @@ const Og = ({
|
|
|
12838
12845
|
relation: h,
|
|
12839
12846
|
onChangeFirstVisibleRowIndex: E,
|
|
12840
12847
|
onGetFirstVisibleRowIndex: H,
|
|
12841
|
-
selectedRowKeys:
|
|
12848
|
+
selectedRowKeys: R,
|
|
12842
12849
|
onSelectionCheckboxClicked: N,
|
|
12843
12850
|
dataForHash: {
|
|
12844
12851
|
parentViewId: e.parentViewId,
|
|
@@ -12909,7 +12916,7 @@ const Og = ({
|
|
|
12909
12916
|
] })
|
|
12910
12917
|
] });
|
|
12911
12918
|
}, $g = 30, Lg = (e) => {
|
|
12912
|
-
var
|
|
12919
|
+
var _;
|
|
12913
12920
|
const { ooui: t } = e, { mode: n, relation: r, views: o, required: a, context: i } = t;
|
|
12914
12921
|
let l;
|
|
12915
12922
|
const [c, d] = F(!0), [f, u] = F(), [m, h] = F(/* @__PURE__ */ new Map()), p = ae(Je), { getContext: y, formView: g } = p || {}, { view_id: v } = g || {};
|
|
@@ -12918,7 +12925,7 @@ const Og = ({
|
|
|
12918
12925
|
}, [t]);
|
|
12919
12926
|
const b = Kt(
|
|
12920
12927
|
Mt.FEATURE_GET_TOOLBAR
|
|
12921
|
-
),
|
|
12928
|
+
), A = async (T) => {
|
|
12922
12929
|
if (o && o[T]) {
|
|
12923
12930
|
const w = o[T];
|
|
12924
12931
|
if (b && !w.toolbar && (T === "form" || T === "tree")) {
|
|
@@ -12941,12 +12948,12 @@ const Og = ({
|
|
|
12941
12948
|
try {
|
|
12942
12949
|
if (n && n.length > 0) {
|
|
12943
12950
|
for (const T of n) {
|
|
12944
|
-
const w = await
|
|
12951
|
+
const w = await A(T);
|
|
12945
12952
|
m.set(T, w);
|
|
12946
12953
|
}
|
|
12947
12954
|
h(m);
|
|
12948
12955
|
} else {
|
|
12949
|
-
const T = await
|
|
12956
|
+
const T = await A("form"), w = await A("tree");
|
|
12950
12957
|
m.set("form", T), m.set("tree", w), h(m);
|
|
12951
12958
|
}
|
|
12952
12959
|
} catch (T) {
|
|
@@ -12977,7 +12984,7 @@ const Og = ({
|
|
|
12977
12984
|
ooui: t,
|
|
12978
12985
|
views: m,
|
|
12979
12986
|
parentViewId: v,
|
|
12980
|
-
treeViewId: (
|
|
12987
|
+
treeViewId: (_ = m.get("tree")) == null ? void 0 : _.view_id
|
|
12981
12988
|
}
|
|
12982
12989
|
)
|
|
12983
12990
|
}
|
|
@@ -13258,8 +13265,8 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13258
13265
|
format: g.exportType
|
|
13259
13266
|
});
|
|
13260
13267
|
a(), await new Promise((x) => setTimeout(x, 200));
|
|
13261
|
-
const
|
|
13262
|
-
Mr(b,
|
|
13268
|
+
const A = await Fn(b);
|
|
13269
|
+
Mr(b, A.mime);
|
|
13263
13270
|
},
|
|
13264
13271
|
[r, n, e, o, t, a, c]
|
|
13265
13272
|
), f = O(async () => {
|
|
@@ -13271,15 +13278,15 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13271
13278
|
return i.current["/"] = g, ci({ fields: g });
|
|
13272
13279
|
}, [e, t, i]), u = O(
|
|
13273
13280
|
async (g) => {
|
|
13274
|
-
const b = Io(g, i.current)[To(g)],
|
|
13275
|
-
model:
|
|
13281
|
+
const b = Io(g, i.current)[To(g)], A = b.relation, x = await $.getHandler().getFields({
|
|
13282
|
+
model: A,
|
|
13276
13283
|
context: t,
|
|
13277
13284
|
fields: []
|
|
13278
13285
|
});
|
|
13279
|
-
for (const [C,
|
|
13286
|
+
for (const [C, _] of Object.entries(x))
|
|
13280
13287
|
x[C].string = Zg({
|
|
13281
13288
|
parentTitle: b.string,
|
|
13282
|
-
title:
|
|
13289
|
+
title: _.string
|
|
13283
13290
|
});
|
|
13284
13291
|
return i.current[g] = x, ci({
|
|
13285
13292
|
fields: x,
|
|
@@ -13294,15 +13301,15 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13294
13301
|
onGetFieldChilds: u
|
|
13295
13302
|
});
|
|
13296
13303
|
return {
|
|
13297
|
-
predefinedExports: g.map((
|
|
13298
|
-
...
|
|
13299
|
-
fields:
|
|
13300
|
-
const C = To(x.key),
|
|
13301
|
-
if (!
|
|
13304
|
+
predefinedExports: g.map((A) => ({
|
|
13305
|
+
...A,
|
|
13306
|
+
fields: A.fields.map((x) => {
|
|
13307
|
+
const C = To(x.key), _ = Io(x.key, i.current);
|
|
13308
|
+
if (!_)
|
|
13302
13309
|
return {
|
|
13303
13310
|
key: x.key
|
|
13304
13311
|
};
|
|
13305
|
-
const T =
|
|
13312
|
+
const T = _[C];
|
|
13306
13313
|
return T ? {
|
|
13307
13314
|
key: x.key,
|
|
13308
13315
|
title: T.string
|
|
@@ -13336,7 +13343,7 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13336
13343
|
[l, t]
|
|
13337
13344
|
), y = O(
|
|
13338
13345
|
async (g) => {
|
|
13339
|
-
const v = await p("ir.exports"), b = await p("ir.exports.line"),
|
|
13346
|
+
const v = await p("ir.exports"), b = await p("ir.exports.line"), A = await $.getHandler().create({
|
|
13340
13347
|
model: "ir.exports",
|
|
13341
13348
|
values: {
|
|
13342
13349
|
name: g.name,
|
|
@@ -13350,12 +13357,12 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13350
13357
|
model: "ir.exports.line",
|
|
13351
13358
|
values: {
|
|
13352
13359
|
name: x.key,
|
|
13353
|
-
export_id:
|
|
13360
|
+
export_id: A
|
|
13354
13361
|
},
|
|
13355
13362
|
fields: b,
|
|
13356
13363
|
context: t
|
|
13357
13364
|
}))
|
|
13358
|
-
), { ...g, id:
|
|
13365
|
+
), { ...g, id: A };
|
|
13359
13366
|
},
|
|
13360
13367
|
[t, p, e]
|
|
13361
13368
|
);
|
|
@@ -13701,20 +13708,20 @@ const _l = nt(cy), dy = (e) => {
|
|
|
13701
13708
|
const { ooui: t } = e, { required: n } = t;
|
|
13702
13709
|
return /* @__PURE__ */ s(Me, { required: n, ...e, children: /* @__PURE__ */ s(vy, { ooui: t }) });
|
|
13703
13710
|
}, vy = (e) => {
|
|
13704
|
-
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = gy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = W(null), { setFieldValue: f, getFieldValue: u } = ae(Je) || {}, { t: m } = ge(), h = n ? Nd(n) : "", p = (
|
|
13705
|
-
r == null || r(
|
|
13711
|
+
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = gy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = W(null), { setFieldValue: f, getFieldValue: u } = ae(Je) || {}, { t: m } = ge(), h = n ? Nd(n) : "", p = (A) => {
|
|
13712
|
+
r == null || r(A);
|
|
13706
13713
|
};
|
|
13707
13714
|
async function y() {
|
|
13708
|
-
const
|
|
13709
|
-
C.href = x, C.download =
|
|
13715
|
+
const A = await Fn(n), x = `data:${A == null ? void 0 : A.mime};base64,${n}`, C = document.createElement("a"), _ = u(i), T = u("name");
|
|
13716
|
+
C.href = x, C.download = _ || T, C.click();
|
|
13710
13717
|
}
|
|
13711
13718
|
async function g() {
|
|
13712
|
-
const
|
|
13713
|
-
Mr(n,
|
|
13719
|
+
const A = await Fn(n);
|
|
13720
|
+
Mr(n, A.mime);
|
|
13714
13721
|
}
|
|
13715
|
-
async function v(
|
|
13716
|
-
|
|
13717
|
-
const x =
|
|
13722
|
+
async function v(A) {
|
|
13723
|
+
A.stopPropagation(), A.preventDefault();
|
|
13724
|
+
const x = A.target.files[0], C = await Ji(x);
|
|
13718
13725
|
p(C), i && f(i, x.name);
|
|
13719
13726
|
}
|
|
13720
13727
|
function b() {
|
|
@@ -13917,13 +13924,13 @@ function wy(e) {
|
|
|
13917
13924
|
ids: [v.id],
|
|
13918
13925
|
context: i.current.getContext()
|
|
13919
13926
|
}))[0];
|
|
13920
|
-
} catch (
|
|
13921
|
-
bt(
|
|
13927
|
+
} catch (A) {
|
|
13928
|
+
bt(A);
|
|
13922
13929
|
}
|
|
13923
13930
|
if (m(!1), !!b)
|
|
13924
13931
|
if (b.datas) {
|
|
13925
|
-
const
|
|
13926
|
-
Mr(b.datas,
|
|
13932
|
+
const A = await Fn(b.datas);
|
|
13933
|
+
Mr(b.datas, A.mime);
|
|
13927
13934
|
} else
|
|
13928
13935
|
a(b);
|
|
13929
13936
|
},
|
|
@@ -13983,13 +13990,13 @@ const Sy = () => {
|
|
|
13983
13990
|
async (g) => {
|
|
13984
13991
|
var v;
|
|
13985
13992
|
try {
|
|
13986
|
-
const { params: b, model:
|
|
13993
|
+
const { params: b, model: A, name_search: x, context: C, order: _ } = i, { results: T } = await l({
|
|
13987
13994
|
params: b,
|
|
13988
|
-
model:
|
|
13995
|
+
model: A,
|
|
13989
13996
|
context: C,
|
|
13990
13997
|
limit: 1,
|
|
13991
13998
|
offset: g,
|
|
13992
|
-
order:
|
|
13999
|
+
order: _,
|
|
13993
14000
|
name_search: x,
|
|
13994
14001
|
skipRead: !0
|
|
13995
14002
|
});
|
|
@@ -14006,11 +14013,11 @@ const Sy = () => {
|
|
|
14006
14013
|
[o, r]
|
|
14007
14014
|
), m = O(
|
|
14008
14015
|
async (g) => {
|
|
14009
|
-
var C,
|
|
14016
|
+
var C, _;
|
|
14010
14017
|
if (!a)
|
|
14011
14018
|
return;
|
|
14012
|
-
const v = g === "next", b = v ? n + 1 : n - 1,
|
|
14013
|
-
if (
|
|
14019
|
+
const v = g === "next", b = v ? n + 1 : n - 1, A = v ? b < t : b >= 0, x = v ? b === t : b === -1;
|
|
14020
|
+
if (A) {
|
|
14014
14021
|
const T = (C = a[b]) == null ? void 0 : C.id;
|
|
14015
14022
|
if (T)
|
|
14016
14023
|
u(b, T);
|
|
@@ -14019,7 +14026,7 @@ const Sy = () => {
|
|
|
14019
14026
|
w && u(b, w);
|
|
14020
14027
|
}
|
|
14021
14028
|
} else if (x) {
|
|
14022
|
-
const T = v ? 0 : t - 1, w = (
|
|
14029
|
+
const T = v ? 0 : t - 1, w = (_ = a[T]) == null ? void 0 : _.id;
|
|
14023
14030
|
if (w)
|
|
14024
14031
|
u(T, w);
|
|
14025
14032
|
else {
|
|
@@ -14065,20 +14072,20 @@ function Cy({ toolbar: e }) {
|
|
|
14065
14072
|
currentModel: g,
|
|
14066
14073
|
setRemovingItem: v,
|
|
14067
14074
|
removingItem: b,
|
|
14068
|
-
duplicatingItem:
|
|
14075
|
+
duplicatingItem: A,
|
|
14069
14076
|
setDuplicatingItem: x,
|
|
14070
14077
|
setResults: C,
|
|
14071
|
-
formIsLoading:
|
|
14078
|
+
formIsLoading: _,
|
|
14072
14079
|
attachments: T,
|
|
14073
14080
|
formRef: w,
|
|
14074
14081
|
setFormHasChanges: S,
|
|
14075
14082
|
previousView: D,
|
|
14076
14083
|
setPreviousView: I,
|
|
14077
|
-
goToResourceId:
|
|
14084
|
+
goToResourceId: R,
|
|
14078
14085
|
isActive: k
|
|
14079
14086
|
} = Nn(), { openDefaultActionForModel: E } = t || {}, H = Q(
|
|
14080
|
-
() => f || b ||
|
|
14081
|
-
[f, b,
|
|
14087
|
+
() => f || b || _ || A,
|
|
14088
|
+
[f, b, _, A]
|
|
14082
14089
|
), N = O(
|
|
14083
14090
|
(U) => {
|
|
14084
14091
|
d ? kn({ t: n, onOk: U }) : U();
|
|
@@ -14127,13 +14134,13 @@ function Cy({ toolbar: e }) {
|
|
|
14127
14134
|
model: g,
|
|
14128
14135
|
context: w.current.getContext()
|
|
14129
14136
|
});
|
|
14130
|
-
U && await (
|
|
14137
|
+
U && await (R == null ? void 0 : R([U]));
|
|
14131
14138
|
} catch (U) {
|
|
14132
14139
|
en(JSON.stringify(U));
|
|
14133
14140
|
} finally {
|
|
14134
14141
|
x == null || x(!1);
|
|
14135
14142
|
}
|
|
14136
|
-
}, [u, g, w,
|
|
14143
|
+
}, [u, g, w, R, x]), ie = O(
|
|
14137
14144
|
(U) => {
|
|
14138
14145
|
I == null || I(i), S == null || S(!1), l == null || l(U);
|
|
14139
14146
|
},
|
|
@@ -14200,7 +14207,7 @@ function Cy({ toolbar: e }) {
|
|
|
14200
14207
|
w
|
|
14201
14208
|
]
|
|
14202
14209
|
), i ? /* @__PURE__ */ V(at, { wrap: !0, children: [
|
|
14203
|
-
|
|
14210
|
+
_ && /* @__PURE__ */ V(se, { children: [
|
|
14204
14211
|
/* @__PURE__ */ s(tt, {}),
|
|
14205
14212
|
/* @__PURE__ */ s(ct, {}),
|
|
14206
14213
|
/* @__PURE__ */ s(ct, {})
|
|
@@ -14222,7 +14229,7 @@ function Cy({ toolbar: e }) {
|
|
|
14222
14229
|
icon: /* @__PURE__ */ s(rr, {}),
|
|
14223
14230
|
tooltip: n("duplicate"),
|
|
14224
14231
|
disabled: d || H || u === void 0,
|
|
14225
|
-
loading:
|
|
14232
|
+
loading: A,
|
|
14226
14233
|
onClick: () => Gt({
|
|
14227
14234
|
confirmMessage: n("confirmDuplicate"),
|
|
14228
14235
|
t: n,
|
|
@@ -14414,7 +14421,7 @@ const di = (e, t) => ({
|
|
|
14414
14421
|
{
|
|
14415
14422
|
ooui: t,
|
|
14416
14423
|
linkPrefix: "mailto:",
|
|
14417
|
-
valueValidator: (r) => r ? qc(r) : !1
|
|
14424
|
+
valueValidator: (r) => r ? qc(r, { allow_display_name: !0 }) : !1
|
|
14418
14425
|
}
|
|
14419
14426
|
) });
|
|
14420
14427
|
}, Ay = (e) => {
|
|
@@ -14580,16 +14587,16 @@ const Ry = (e) => {
|
|
|
14580
14587
|
setSearchParams: g = void 0,
|
|
14581
14588
|
searchVisible: v = !0,
|
|
14582
14589
|
setSearchVisible: b = void 0,
|
|
14583
|
-
sorter:
|
|
14590
|
+
sorter: A = void 0,
|
|
14584
14591
|
setSorter: x = void 0,
|
|
14585
14592
|
setTotalItems: C = void 0,
|
|
14586
|
-
setSearchTreeNameSearch:
|
|
14593
|
+
setSearchTreeNameSearch: _ = void 0,
|
|
14587
14594
|
setTreeIsLoading: T = void 0,
|
|
14588
14595
|
limit: w,
|
|
14589
14596
|
setLimit: S,
|
|
14590
14597
|
searchParams: D,
|
|
14591
14598
|
searchValues: I,
|
|
14592
|
-
setSearchValues:
|
|
14599
|
+
setSearchValues: R,
|
|
14593
14600
|
currentView: k
|
|
14594
14601
|
} = f || {}, [E, H] = F(!0);
|
|
14595
14602
|
le(() => {
|
|
@@ -14600,17 +14607,17 @@ const Ry = (e) => {
|
|
|
14600
14607
|
}, [k]);
|
|
14601
14608
|
const { clear: N, searchFilterLoading: B, searchError: M, offset: P, tableRefreshing: Y } = al({
|
|
14602
14609
|
model: r,
|
|
14603
|
-
setSearchTreeNameSearch:
|
|
14610
|
+
setSearchTreeNameSearch: _,
|
|
14604
14611
|
setSelectedRowItems: y,
|
|
14605
14612
|
searchParams: D,
|
|
14606
|
-
setSearchValues:
|
|
14613
|
+
setSearchValues: R,
|
|
14607
14614
|
setSearchParams: g,
|
|
14608
14615
|
setSearchVisible: b,
|
|
14609
14616
|
setTreeIsLoading: T,
|
|
14610
14617
|
context: o,
|
|
14611
14618
|
formView: i,
|
|
14612
14619
|
treeView: l,
|
|
14613
|
-
sorter:
|
|
14620
|
+
sorter: A,
|
|
14614
14621
|
setSorter: x,
|
|
14615
14622
|
setCurrentItemIndex: m,
|
|
14616
14623
|
setResultsActionView: u,
|
|
@@ -14872,8 +14879,8 @@ function My(e, t) {
|
|
|
14872
14879
|
limit: g,
|
|
14873
14880
|
initialSearchParams: v = [],
|
|
14874
14881
|
currentPage: b,
|
|
14875
|
-
order:
|
|
14876
|
-
} = e, [x, C] = F(), [
|
|
14882
|
+
order: A
|
|
14883
|
+
} = e, [x, C] = F(), [_, T] = F([]), [w, S] = F(!0), D = m || void 0, [I, R] = F(
|
|
14877
14884
|
D
|
|
14878
14885
|
), [k, E] = F([]), [H, N] = F(), [B, M] = F([]), [P, Y] = F(), [K, L] = F(0), [ie, X] = F(!1), [ye, j] = F(!1), [U, ce] = F(), { t: ne } = ge(), de = W(), Z = W(), q = ae(
|
|
14879
14886
|
_t
|
|
@@ -14894,7 +14901,7 @@ function My(e, t) {
|
|
|
14894
14901
|
[Re, xe, x, H, B]
|
|
14895
14902
|
);
|
|
14896
14903
|
function pe(ue) {
|
|
14897
|
-
|
|
14904
|
+
R(ue), ee == null || ee(ue);
|
|
14898
14905
|
}
|
|
14899
14906
|
const fe = O(
|
|
14900
14907
|
(ue) => {
|
|
@@ -15013,7 +15020,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
15013
15020
|
c
|
|
15014
15021
|
]);
|
|
15015
15022
|
l({ tabKey: c, canWeClose: Te }), It(() => {
|
|
15016
|
-
const ue =
|
|
15023
|
+
const ue = _.find((Pe) => Pe.type === "tree"), Ye = _.find((Pe) => d.id ? Pe.type === d.type && Pe.view_id === d.id : Pe.type === d.type);
|
|
15017
15024
|
fe(Ye || ue), m ? ee == null || ee(D) : (pe(void 0), N(void 0)), Ve();
|
|
15018
15025
|
}, [r, a, m]), It(() => {
|
|
15019
15026
|
if (Re === c) {
|
|
@@ -15055,7 +15062,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
15055
15062
|
Pe = "tree", Oe = [["id", "in", ue]];
|
|
15056
15063
|
if (j(!1), X(!1), Ye && Pe === "form") {
|
|
15057
15064
|
pe(ue[0]);
|
|
15058
|
-
const Ae =
|
|
15065
|
+
const Ae = _.find(
|
|
15059
15066
|
(me) => me.type === "form"
|
|
15060
15067
|
);
|
|
15061
15068
|
fe(Ae);
|
|
@@ -15080,7 +15087,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
15080
15087
|
de.current.clearAndReload();
|
|
15081
15088
|
else {
|
|
15082
15089
|
pe(void 0);
|
|
15083
|
-
const ue =
|
|
15090
|
+
const ue = _.find(
|
|
15084
15091
|
(Ye) => Ye.type === "form"
|
|
15085
15092
|
);
|
|
15086
15093
|
fe(ue);
|
|
@@ -15092,7 +15099,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
15092
15099
|
title: i,
|
|
15093
15100
|
currentView: x,
|
|
15094
15101
|
setCurrentView: fe,
|
|
15095
|
-
availableViews:
|
|
15102
|
+
availableViews: _,
|
|
15096
15103
|
formRef: de,
|
|
15097
15104
|
searchTreeRef: Z,
|
|
15098
15105
|
onNewClicked: be,
|
|
@@ -15116,12 +15123,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
15116
15123
|
isActive: c === Re,
|
|
15117
15124
|
initialSearchParams: v,
|
|
15118
15125
|
initialCurrentPage: b,
|
|
15119
|
-
initialOrder:
|
|
15126
|
+
initialOrder: A,
|
|
15120
15127
|
children: [
|
|
15121
15128
|
/* @__PURE__ */ s(
|
|
15122
15129
|
$y,
|
|
15123
15130
|
{
|
|
15124
|
-
availableViews:
|
|
15131
|
+
availableViews: _,
|
|
15125
15132
|
formRef: de,
|
|
15126
15133
|
currentId: I,
|
|
15127
15134
|
currentView: x,
|
|
@@ -15282,12 +15289,12 @@ function By(e) {
|
|
|
15282
15289
|
domain: a = [],
|
|
15283
15290
|
visible: i = !0,
|
|
15284
15291
|
parentContext: l = {}
|
|
15285
|
-
} = e, [c, d] = F(!1), [f, u] = F(!1), [m, h] = F(), [p, y] = F(), [g, v] = F(), [b,
|
|
15286
|
-
K(!0),
|
|
15292
|
+
} = e, [c, d] = F(!1), [f, u] = F(!1), [m, h] = F(), [p, y] = F(), [g, v] = F(), [b, A] = F(1), [x, C] = F(0), _ = W(ht), T = W([]), [w, S] = F(0), [D, I] = F([]), [R, k] = F(void 0), [E, H] = F(), [N, B] = F(), [M, P] = F(), [Y, K] = F(!1), L = W([]), ie = (Z) => {
|
|
15293
|
+
K(!0), A(Z), C((Z - 1) * _.current);
|
|
15287
15294
|
}, X = async () => {
|
|
15288
15295
|
const Z = L.current.length > 0 ? L.current : a, q = Zt(T.current, Z), { colors: z } = Yt(p), { totalItems: ee, results: xe, attrsEvaluated: Re } = await $.getHandler().searchForTree({
|
|
15289
15296
|
params: q,
|
|
15290
|
-
limit:
|
|
15297
|
+
limit: _.current,
|
|
15291
15298
|
offset: x,
|
|
15292
15299
|
model: m,
|
|
15293
15300
|
fields: p.fields,
|
|
@@ -15327,7 +15334,7 @@ function By(e) {
|
|
|
15327
15334
|
action: t,
|
|
15328
15335
|
context: l
|
|
15329
15336
|
});
|
|
15330
|
-
L.current = Z.domain, v(Z.views.get("form")), y(Z.views.get("tree")), h(Z.model),
|
|
15337
|
+
L.current = Z.domain, v(Z.views.get("form")), y(Z.views.get("tree")), h(Z.model), _.current = Z.limit;
|
|
15331
15338
|
}, ce = async () => {
|
|
15332
15339
|
h(n);
|
|
15333
15340
|
const Z = await $.getHandler().getView({
|
|
@@ -15361,14 +15368,14 @@ function By(e) {
|
|
|
15361
15368
|
{
|
|
15362
15369
|
showPagination: !1,
|
|
15363
15370
|
total: w,
|
|
15364
|
-
limit:
|
|
15371
|
+
limit: _.current,
|
|
15365
15372
|
page: b,
|
|
15366
15373
|
treeView: p,
|
|
15367
15374
|
results: D,
|
|
15368
15375
|
onRequestPageChange: ie,
|
|
15369
15376
|
loading: Y,
|
|
15370
15377
|
onRowClicked: ne,
|
|
15371
|
-
colorsForResults:
|
|
15378
|
+
colorsForResults: R,
|
|
15372
15379
|
sorter: E,
|
|
15373
15380
|
onChangeSort: (Z) => {
|
|
15374
15381
|
H == null || H(Z);
|
|
@@ -15407,7 +15414,7 @@ function Wy(e, t) {
|
|
|
15407
15414
|
moveItemsEnabled: p
|
|
15408
15415
|
} = ae(ss), y = W(), g = W(), [v] = ze($.getHandler().getView), [b] = ze(
|
|
15409
15416
|
$.getHandler().readObjects
|
|
15410
|
-
), [
|
|
15417
|
+
), [A] = ze($.getHandler().update), x = Kt(
|
|
15411
15418
|
Mt.FEATURE_READFORVIEW
|
|
15412
15419
|
);
|
|
15413
15420
|
le(() => {
|
|
@@ -15421,19 +15428,19 @@ function Wy(e, t) {
|
|
|
15421
15428
|
async function C() {
|
|
15422
15429
|
d(!0), m(!0), u(void 0);
|
|
15423
15430
|
try {
|
|
15424
|
-
const
|
|
15425
|
-
g.current =
|
|
15431
|
+
const R = await _(), k = await w(R), E = R.fields[ao].relation, H = k[ao].items;
|
|
15432
|
+
g.current = R.fields;
|
|
15426
15433
|
const N = await T({
|
|
15427
15434
|
items: H,
|
|
15428
15435
|
model: E,
|
|
15429
15436
|
context: r
|
|
15430
15437
|
}), B = await S(N);
|
|
15431
15438
|
u(void 0), l(B), d(!1), m(!1);
|
|
15432
|
-
} catch (
|
|
15433
|
-
u(JSON.stringify(
|
|
15439
|
+
} catch (R) {
|
|
15440
|
+
u(JSON.stringify(R));
|
|
15434
15441
|
}
|
|
15435
15442
|
}
|
|
15436
|
-
async function
|
|
15443
|
+
async function _() {
|
|
15437
15444
|
return await v({
|
|
15438
15445
|
model: n,
|
|
15439
15446
|
type: "form",
|
|
@@ -15441,7 +15448,7 @@ function Wy(e, t) {
|
|
|
15441
15448
|
});
|
|
15442
15449
|
}
|
|
15443
15450
|
async function T({
|
|
15444
|
-
items:
|
|
15451
|
+
items: R,
|
|
15445
15452
|
model: k,
|
|
15446
15453
|
context: E
|
|
15447
15454
|
}) {
|
|
@@ -15458,23 +15465,23 @@ function Wy(e, t) {
|
|
|
15458
15465
|
fields: y.current
|
|
15459
15466
|
},
|
|
15460
15467
|
model: k,
|
|
15461
|
-
items:
|
|
15468
|
+
items: R,
|
|
15462
15469
|
context: E,
|
|
15463
15470
|
currentView: "form"
|
|
15464
15471
|
});
|
|
15465
15472
|
return H;
|
|
15466
15473
|
}
|
|
15467
|
-
async function w(
|
|
15474
|
+
async function w(R) {
|
|
15468
15475
|
return (await b({
|
|
15469
15476
|
model: n,
|
|
15470
15477
|
ids: [o],
|
|
15471
|
-
fields:
|
|
15478
|
+
fields: R.fields,
|
|
15472
15479
|
context: r
|
|
15473
15480
|
}))[0];
|
|
15474
15481
|
}
|
|
15475
|
-
async function S(
|
|
15482
|
+
async function S(R) {
|
|
15476
15483
|
const k = [];
|
|
15477
|
-
for (const H of
|
|
15484
|
+
for (const H of R) {
|
|
15478
15485
|
const { values: N } = H;
|
|
15479
15486
|
if (N.action_id && N.action_id.length > 0) {
|
|
15480
15487
|
const B = parseInt(N.action_id[0], 10), M = ra({
|
|
@@ -15486,10 +15493,10 @@ function Wy(e, t) {
|
|
|
15486
15493
|
}
|
|
15487
15494
|
return await Promise.all(k);
|
|
15488
15495
|
}
|
|
15489
|
-
async function D(
|
|
15496
|
+
async function D(R) {
|
|
15490
15497
|
if (!p)
|
|
15491
15498
|
return;
|
|
15492
|
-
const k =
|
|
15499
|
+
const k = R.filter((B) => {
|
|
15493
15500
|
const M = i.find(
|
|
15494
15501
|
(Y) => Y.id === B.id
|
|
15495
15502
|
);
|
|
@@ -15521,7 +15528,7 @@ function Wy(e, t) {
|
|
|
15521
15528
|
fields: y.current,
|
|
15522
15529
|
items: H
|
|
15523
15530
|
};
|
|
15524
|
-
await
|
|
15531
|
+
await A({
|
|
15525
15532
|
model: n,
|
|
15526
15533
|
id: o,
|
|
15527
15534
|
values: { [ao]: N },
|
|
@@ -15532,8 +15539,8 @@ function Wy(e, t) {
|
|
|
15532
15539
|
async function I() {
|
|
15533
15540
|
h(a);
|
|
15534
15541
|
}
|
|
15535
|
-
return c ? /* @__PURE__ */ s(Nt, {}) : f ? /* @__PURE__ */ s(vt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ s(Hy, { onPositionItemsChanged: D, children: i.map((
|
|
15536
|
-
const { actionData: E, values: H } =
|
|
15542
|
+
return c ? /* @__PURE__ */ s(Nt, {}) : f ? /* @__PURE__ */ s(vt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ s(Hy, { onPositionItemsChanged: D, children: i.map((R, k) => {
|
|
15543
|
+
const { actionData: E, values: H } = R, { position: N, id: B } = H, {
|
|
15537
15544
|
actionId: M,
|
|
15538
15545
|
actionType: P,
|
|
15539
15546
|
key: Y,
|
|
@@ -15675,7 +15682,7 @@ const Yy = At(Wy), Gy = (e) => {
|
|
|
15675
15682
|
Ht(() => {
|
|
15676
15683
|
x();
|
|
15677
15684
|
}, [o]);
|
|
15678
|
-
const
|
|
15685
|
+
const A = (w) => {
|
|
15679
15686
|
r == null || r({
|
|
15680
15687
|
items: w
|
|
15681
15688
|
});
|
|
@@ -15702,9 +15709,9 @@ const Yy = At(Wy), Gy = (e) => {
|
|
|
15702
15709
|
fieldsToRetrieve: [y],
|
|
15703
15710
|
context: { ...b == null ? void 0 : b(), ...h }
|
|
15704
15711
|
})).map((I) => {
|
|
15705
|
-
const
|
|
15706
|
-
let k =
|
|
15707
|
-
return Array.isArray(
|
|
15712
|
+
const R = I[y];
|
|
15713
|
+
let k = R;
|
|
15714
|
+
return Array.isArray(R) && (k = R[1]), { label: k, value: I.id };
|
|
15708
15715
|
});
|
|
15709
15716
|
l(D);
|
|
15710
15717
|
} catch (S) {
|
|
@@ -15717,7 +15724,7 @@ const Yy = At(Wy), Gy = (e) => {
|
|
|
15717
15724
|
}
|
|
15718
15725
|
const C = () => {
|
|
15719
15726
|
T(i.map((w) => w.value));
|
|
15720
|
-
},
|
|
15727
|
+
}, _ = () => {
|
|
15721
15728
|
T([]);
|
|
15722
15729
|
}, T = (w) => {
|
|
15723
15730
|
const S = o.map((I) => w.includes(I.id) ? I.operation == "pendingRemove" ? {
|
|
@@ -15726,7 +15733,7 @@ const Yy = At(Wy), Gy = (e) => {
|
|
|
15726
15733
|
} : I : { id: I.id, operation: "pendingRemove" }), D = S.map((I) => I.id);
|
|
15727
15734
|
w.filter((I) => !D.includes(I)).map((I) => {
|
|
15728
15735
|
S.push({ id: I, operation: "pendingLink" });
|
|
15729
|
-
}),
|
|
15736
|
+
}), A(S);
|
|
15730
15737
|
};
|
|
15731
15738
|
return f && i.length === 0 ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(se, { children: /* @__PURE__ */ V("div", { className: "flex flex-row", children: [
|
|
15732
15739
|
/* @__PURE__ */ s(
|
|
@@ -15748,7 +15755,7 @@ const Yy = At(Wy), Gy = (e) => {
|
|
|
15748
15755
|
children: "Check all"
|
|
15749
15756
|
}
|
|
15750
15757
|
),
|
|
15751
|
-
/* @__PURE__ */ s(qe, { onClick:
|
|
15758
|
+
/* @__PURE__ */ s(qe, { onClick: _, disabled: a.length === 0, children: "Uncheck all" })
|
|
15752
15759
|
] })
|
|
15753
15760
|
] }) });
|
|
15754
15761
|
}, qy = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(zy, { ...e }) }), zy = (e) => {
|
|
@@ -16062,29 +16069,29 @@ function Tv(e, t) {
|
|
|
16062
16069
|
model: T.model,
|
|
16063
16070
|
context: l
|
|
16064
16071
|
});
|
|
16065
|
-
let
|
|
16072
|
+
let R = ga(
|
|
16066
16073
|
w == null ? void 0 : w.values
|
|
16067
16074
|
);
|
|
16068
|
-
const k = S ||
|
|
16075
|
+
const k = S || R.active_id || R.id;
|
|
16069
16076
|
if (k) {
|
|
16070
16077
|
const N = await $.getHandler().readObjects({
|
|
16071
16078
|
model: T.model,
|
|
16072
16079
|
context: l,
|
|
16073
16080
|
ids: [k]
|
|
16074
16081
|
});
|
|
16075
|
-
|
|
16082
|
+
R = { ...R, ...N[0] };
|
|
16076
16083
|
}
|
|
16077
16084
|
let E;
|
|
16078
16085
|
w != null && w.context && typeof w.context == "object" && w.context !== null ? E = w : w && w.context ? E = w && Xt({
|
|
16079
16086
|
context: w.context,
|
|
16080
16087
|
fields: I,
|
|
16081
|
-
values: { ...i, ...
|
|
16088
|
+
values: { ...i, ...R || {} }
|
|
16082
16089
|
}) : E = {};
|
|
16083
16090
|
const H = await (async () => {
|
|
16084
16091
|
try {
|
|
16085
16092
|
return w != null && w.domain && Array.isArray(w.domain) && w.domain.length > 0 ? w.domain : w && w.domain && !Array.isArray(w.domain) ? await $.getHandler().evalDomain({
|
|
16086
16093
|
domain: w.domain,
|
|
16087
|
-
values: { ...
|
|
16094
|
+
values: { ...R || {}, ...i },
|
|
16088
16095
|
context: { ...l, ...E },
|
|
16089
16096
|
fields: I
|
|
16090
16097
|
}) : [];
|
|
@@ -16092,14 +16099,14 @@ function Tv(e, t) {
|
|
|
16092
16099
|
return console.error(N), [];
|
|
16093
16100
|
}
|
|
16094
16101
|
})();
|
|
16095
|
-
|
|
16102
|
+
_({
|
|
16096
16103
|
...T,
|
|
16097
16104
|
limit: D,
|
|
16098
16105
|
context: { ...l, ...E },
|
|
16099
16106
|
domain: H,
|
|
16100
16107
|
actionRawData: {
|
|
16101
16108
|
...w,
|
|
16102
|
-
values:
|
|
16109
|
+
values: R,
|
|
16103
16110
|
fields: I
|
|
16104
16111
|
}
|
|
16105
16112
|
});
|
|
@@ -16115,7 +16122,7 @@ function Tv(e, t) {
|
|
|
16115
16122
|
type: "form",
|
|
16116
16123
|
context: l
|
|
16117
16124
|
});
|
|
16118
|
-
return await
|
|
16125
|
+
return await _({
|
|
16119
16126
|
action_id: -1,
|
|
16120
16127
|
action_type: "ir.actions.act_window",
|
|
16121
16128
|
model: T,
|
|
@@ -16134,7 +16141,7 @@ function Tv(e, t) {
|
|
|
16134
16141
|
forced_values: S,
|
|
16135
16142
|
initialViewType: D,
|
|
16136
16143
|
res_id: I,
|
|
16137
|
-
domain:
|
|
16144
|
+
domain: R = []
|
|
16138
16145
|
}) {
|
|
16139
16146
|
const k = await $.getHandler().getActionData({
|
|
16140
16147
|
action: T,
|
|
@@ -16191,8 +16198,8 @@ function Tv(e, t) {
|
|
|
16191
16198
|
const [de, Z] = ce[0];
|
|
16192
16199
|
ne = { id: de, type: Z };
|
|
16193
16200
|
}
|
|
16194
|
-
|
|
16195
|
-
domain: [...Y, ...
|
|
16201
|
+
_({
|
|
16202
|
+
domain: [...Y, ...R],
|
|
16196
16203
|
context: { ...l, ...M },
|
|
16197
16204
|
model: K,
|
|
16198
16205
|
views: ce,
|
|
@@ -16219,7 +16226,7 @@ function Tv(e, t) {
|
|
|
16219
16226
|
action: D
|
|
16220
16227
|
}) {
|
|
16221
16228
|
let I = [...d];
|
|
16222
|
-
d.length === 1 && d[0].key === "welcome" && (I = [...d.filter((
|
|
16229
|
+
d.length === 1 && d[0].key === "welcome" && (I = [...d.filter((R) => R.key !== "welcome")]), f([
|
|
16223
16230
|
...I,
|
|
16224
16231
|
{
|
|
16225
16232
|
title: T,
|
|
@@ -16230,7 +16237,7 @@ function Tv(e, t) {
|
|
|
16230
16237
|
}
|
|
16231
16238
|
]), o(S);
|
|
16232
16239
|
}
|
|
16233
|
-
async function
|
|
16240
|
+
async function A({
|
|
16234
16241
|
relateData: T,
|
|
16235
16242
|
fields: w,
|
|
16236
16243
|
values: S,
|
|
@@ -16238,7 +16245,7 @@ function Tv(e, t) {
|
|
|
16238
16245
|
action_type: I
|
|
16239
16246
|
}) {
|
|
16240
16247
|
const {
|
|
16241
|
-
res_model:
|
|
16248
|
+
res_model: R,
|
|
16242
16249
|
context: k,
|
|
16243
16250
|
domain: E,
|
|
16244
16251
|
views: H,
|
|
@@ -16257,8 +16264,8 @@ function Tv(e, t) {
|
|
|
16257
16264
|
fields: w,
|
|
16258
16265
|
context: { ...l, ...ie }
|
|
16259
16266
|
}) : [];
|
|
16260
|
-
|
|
16261
|
-
model:
|
|
16267
|
+
_({
|
|
16268
|
+
model: R,
|
|
16262
16269
|
target: N,
|
|
16263
16270
|
views: H,
|
|
16264
16271
|
context: { ...l, ...ie },
|
|
@@ -16282,7 +16289,7 @@ function Tv(e, t) {
|
|
|
16282
16289
|
action_type: S,
|
|
16283
16290
|
res_id: D,
|
|
16284
16291
|
view_id: I,
|
|
16285
|
-
overrideUnsettedLimit:
|
|
16292
|
+
overrideUnsettedLimit: R = !1,
|
|
16286
16293
|
values: k = {},
|
|
16287
16294
|
domain: E
|
|
16288
16295
|
} = T, H = `${S},${w}`, N = await $.getHandler().getActionData({
|
|
@@ -16331,7 +16338,7 @@ function Tv(e, t) {
|
|
|
16331
16338
|
} else
|
|
16332
16339
|
[ne, de] = ce.find((q) => q[0] === void 0 ? !1 : q[0] === I);
|
|
16333
16340
|
const Z = { id: ne, type: de };
|
|
16334
|
-
|
|
16341
|
+
_({
|
|
16335
16342
|
domain: P,
|
|
16336
16343
|
context: { ...l, ...M },
|
|
16337
16344
|
model: K,
|
|
@@ -16343,7 +16350,7 @@ function Tv(e, t) {
|
|
|
16343
16350
|
action_type: S,
|
|
16344
16351
|
res_id: D,
|
|
16345
16352
|
treeExpandable: U,
|
|
16346
|
-
limit:
|
|
16353
|
+
limit: R && (j === 0 || j === !1) ? ht : j,
|
|
16347
16354
|
actionRawData: {
|
|
16348
16355
|
context: B,
|
|
16349
16356
|
domain: Y,
|
|
@@ -16357,7 +16364,7 @@ function Tv(e, t) {
|
|
|
16357
16364
|
forced_values: S,
|
|
16358
16365
|
initialViewType: D,
|
|
16359
16366
|
res_id: I,
|
|
16360
|
-
domain:
|
|
16367
|
+
domain: R
|
|
16361
16368
|
}) {
|
|
16362
16369
|
const k = await $.getHandler().getActionStringForModel(T);
|
|
16363
16370
|
await v({
|
|
@@ -16366,16 +16373,16 @@ function Tv(e, t) {
|
|
|
16366
16373
|
forced_values: S,
|
|
16367
16374
|
initialViewType: D,
|
|
16368
16375
|
res_id: I,
|
|
16369
|
-
domain:
|
|
16376
|
+
domain: R
|
|
16370
16377
|
});
|
|
16371
16378
|
}
|
|
16372
|
-
async function
|
|
16379
|
+
async function _(T) {
|
|
16373
16380
|
const {
|
|
16374
16381
|
domain: w,
|
|
16375
16382
|
context: S,
|
|
16376
16383
|
model: D,
|
|
16377
16384
|
views: I,
|
|
16378
|
-
title:
|
|
16385
|
+
title: R,
|
|
16379
16386
|
target: k,
|
|
16380
16387
|
initialView: E,
|
|
16381
16388
|
action_id: H,
|
|
@@ -16411,14 +16418,14 @@ function Tv(e, t) {
|
|
|
16411
16418
|
} else {
|
|
16412
16419
|
const j = E && Array.isArray(E.id) ? { ...E, id: E.id[0] } : E;
|
|
16413
16420
|
b({
|
|
16414
|
-
title:
|
|
16421
|
+
title: R,
|
|
16415
16422
|
content: /* @__PURE__ */ s(
|
|
16416
16423
|
El,
|
|
16417
16424
|
{
|
|
16418
16425
|
action_id: H,
|
|
16419
16426
|
action_type: N,
|
|
16420
16427
|
tabKey: ye,
|
|
16421
|
-
title:
|
|
16428
|
+
title: R,
|
|
16422
16429
|
views: I,
|
|
16423
16430
|
model: D,
|
|
16424
16431
|
context: { ...S, ...l },
|
|
@@ -16444,8 +16451,8 @@ function Tv(e, t) {
|
|
|
16444
16451
|
Wu,
|
|
16445
16452
|
{
|
|
16446
16453
|
openShortcut: x,
|
|
16447
|
-
openAction:
|
|
16448
|
-
openRelate:
|
|
16454
|
+
openAction: _,
|
|
16455
|
+
openRelate: A,
|
|
16449
16456
|
openDefaultActionForModel: C,
|
|
16450
16457
|
tabs: d,
|
|
16451
16458
|
activeKey: r,
|
|
@@ -16590,12 +16597,12 @@ const { useToken: Rv } = Xe, Eb = (e) => {
|
|
|
16590
16597
|
activeKey: g,
|
|
16591
16598
|
currentView: v,
|
|
16592
16599
|
currentId: b,
|
|
16593
|
-
openDefaultActionForModel:
|
|
16600
|
+
openDefaultActionForModel: A
|
|
16594
16601
|
} = h || {}, x = Q(() => {
|
|
16595
16602
|
if (!v || !v.view_id || !v.extra)
|
|
16596
16603
|
return;
|
|
16597
|
-
const { action_id: I, action_type:
|
|
16598
|
-
if (!I || !
|
|
16604
|
+
const { action_id: I, action_type: R } = v.extra || {};
|
|
16605
|
+
if (!I || !R) {
|
|
16599
16606
|
l(!1);
|
|
16600
16607
|
return;
|
|
16601
16608
|
}
|
|
@@ -16603,7 +16610,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
|
|
|
16603
16610
|
let E = !1;
|
|
16604
16611
|
return v.type === "form" && (E = b || !1), {
|
|
16605
16612
|
action_id: I,
|
|
16606
|
-
action_type:
|
|
16613
|
+
action_type: R,
|
|
16607
16614
|
view_id: k,
|
|
16608
16615
|
res_id: E
|
|
16609
16616
|
};
|
|
@@ -16614,9 +16621,9 @@ const { useToken: Rv } = Xe, Eb = (e) => {
|
|
|
16614
16621
|
le(() => {
|
|
16615
16622
|
T();
|
|
16616
16623
|
}, [C]);
|
|
16617
|
-
function
|
|
16618
|
-
const
|
|
16619
|
-
(
|
|
16624
|
+
function _(I) {
|
|
16625
|
+
const R = I;
|
|
16626
|
+
(R == null ? void 0 : R.action_type) !== "ir.actions.wizard" && p(R);
|
|
16620
16627
|
}
|
|
16621
16628
|
const T = O(async () => {
|
|
16622
16629
|
if (!x)
|
|
@@ -16626,7 +16633,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
|
|
|
16626
16633
|
}, [x, n]);
|
|
16627
16634
|
async function w() {
|
|
16628
16635
|
var I;
|
|
16629
|
-
(I = m == null ? void 0 : m.current) == null || I.close(),
|
|
16636
|
+
(I = m == null ? void 0 : m.current) == null || I.close(), A == null || A({ model: "ir.ui.view_sc" });
|
|
16630
16637
|
}
|
|
16631
16638
|
const S = O(async () => {
|
|
16632
16639
|
const I = await t();
|
|
@@ -16651,14 +16658,14 @@ const { useToken: Rv } = Xe, Eb = (e) => {
|
|
|
16651
16658
|
else {
|
|
16652
16659
|
if (!v)
|
|
16653
16660
|
return;
|
|
16654
|
-
const I = y.find((N) => N.key === g), { action_id:
|
|
16661
|
+
const I = y.find((N) => N.key === g), { action_id: R, action_type: k } = (I == null ? void 0 : I.action) || {}, E = v.view_id;
|
|
16655
16662
|
let H = !1;
|
|
16656
|
-
if (!
|
|
16663
|
+
if (!R || !k) {
|
|
16657
16664
|
l(!1);
|
|
16658
16665
|
return;
|
|
16659
16666
|
}
|
|
16660
16667
|
v.type === "form" && (H = b || !1), await r({
|
|
16661
|
-
action_id:
|
|
16668
|
+
action_id: R,
|
|
16662
16669
|
action_type: k,
|
|
16663
16670
|
view_id: E,
|
|
16664
16671
|
res_id: H
|
|
@@ -16682,7 +16689,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
|
|
|
16682
16689
|
ref: m,
|
|
16683
16690
|
isFavourite: i,
|
|
16684
16691
|
onToggleFavourite: D,
|
|
16685
|
-
onItemClick:
|
|
16692
|
+
onItemClick: _,
|
|
16686
16693
|
placement: "bottomRight",
|
|
16687
16694
|
header: /* @__PURE__ */ V("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
16688
16695
|
/* @__PURE__ */ s("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
|