@gisce/react-ooui 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -98,7 +98,7 @@ function be({
|
|
|
98
98
|
);
|
|
99
99
|
if (!o)
|
|
100
100
|
return h();
|
|
101
|
-
const
|
|
101
|
+
const g = /* @__PURE__ */ r(
|
|
102
102
|
mn,
|
|
103
103
|
{
|
|
104
104
|
ooui: new Et({
|
|
@@ -111,10 +111,10 @@ function be({
|
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
return n === "horizontal" ? (() => /* @__PURE__ */ k(Oe, { align: "middle", className: "pb-1 pt-1", children: [
|
|
114
|
-
/* @__PURE__ */ r(ue, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children:
|
|
114
|
+
/* @__PURE__ */ r(ue, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-end", children: g }) }),
|
|
115
115
|
/* @__PURE__ */ r(ue, { flex: "auto", children: h() })
|
|
116
116
|
] }))() : (() => /* @__PURE__ */ k(Q, { children: [
|
|
117
|
-
|
|
117
|
+
g,
|
|
118
118
|
h()
|
|
119
119
|
] }))();
|
|
120
120
|
}
|
|
@@ -148,7 +148,7 @@ const { confirm: ps } = Je, Gt = ({
|
|
|
148
148
|
fetchValues: m,
|
|
149
149
|
formHasChanges: p,
|
|
150
150
|
elementHasLostFocus: h,
|
|
151
|
-
getFields:
|
|
151
|
+
getFields: g
|
|
152
152
|
} = e;
|
|
153
153
|
return /* @__PURE__ */ r(
|
|
154
154
|
Be.Provider,
|
|
@@ -157,7 +157,7 @@ const { confirm: ps } = Je, Gt = ({
|
|
|
157
157
|
domain: f,
|
|
158
158
|
getValues: d,
|
|
159
159
|
getPlainValues: u,
|
|
160
|
-
getFields:
|
|
160
|
+
getFields: g,
|
|
161
161
|
activeId: n,
|
|
162
162
|
activeModel: i,
|
|
163
163
|
setFieldValue: o,
|
|
@@ -307,21 +307,21 @@ const no = (e) => {
|
|
|
307
307
|
context: d,
|
|
308
308
|
readOnly: u
|
|
309
309
|
} = t, f = ne(Be), { executeButtonAction: c } = f || {}, [m, p] = b(!1), { t: h } = we();
|
|
310
|
-
async function
|
|
310
|
+
async function g() {
|
|
311
311
|
p(!0), await c({ type: s, action: n, context: d }), p(!1);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function y() {
|
|
314
314
|
if (a) {
|
|
315
315
|
Gt({
|
|
316
316
|
confirmMessage: a,
|
|
317
317
|
t: h,
|
|
318
318
|
onOk: () => {
|
|
319
|
-
|
|
319
|
+
g();
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
g();
|
|
325
325
|
}
|
|
326
326
|
function w() {
|
|
327
327
|
if (m)
|
|
@@ -336,7 +336,7 @@ const no = (e) => {
|
|
|
336
336
|
{
|
|
337
337
|
block: !0,
|
|
338
338
|
disabled: !o || u || m,
|
|
339
|
-
onClick:
|
|
339
|
+
onClick: y,
|
|
340
340
|
icon: w(),
|
|
341
341
|
type: t.primary ? "primary" : "default",
|
|
342
342
|
danger: t.danger,
|
|
@@ -355,9 +355,9 @@ const no = (e) => {
|
|
|
355
355
|
primary: f,
|
|
356
356
|
context: c,
|
|
357
357
|
readOnly: m
|
|
358
|
-
} = n || {}, p = ne(Be), { executeButtonAction: h } = p || {}, [
|
|
358
|
+
} = n || {}, p = ne(Be), { executeButtonAction: h } = p || {}, [g, y] = b(!1), { t: w } = we();
|
|
359
359
|
function C() {
|
|
360
|
-
if (
|
|
360
|
+
if (g)
|
|
361
361
|
return /* @__PURE__ */ r(st, {});
|
|
362
362
|
if (u) {
|
|
363
363
|
const R = dt(u);
|
|
@@ -365,7 +365,7 @@ const no = (e) => {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
async function x() {
|
|
368
|
-
l && o && (
|
|
368
|
+
l && o && (y(!0), await h({ type: l, action: o, context: c }), y(!1));
|
|
369
369
|
}
|
|
370
370
|
function S() {
|
|
371
371
|
if (d) {
|
|
@@ -420,9 +420,9 @@ const no = (e) => {
|
|
|
420
420
|
context: m,
|
|
421
421
|
readOnly: p,
|
|
422
422
|
danger: h
|
|
423
|
-
} = s, [
|
|
423
|
+
} = s, [g, y] = b(!1);
|
|
424
424
|
async function w() {
|
|
425
|
-
|
|
425
|
+
y(!0), await i({ type: u, action: a, context: m }), y(!1);
|
|
426
426
|
}
|
|
427
427
|
function C() {
|
|
428
428
|
if (f) {
|
|
@@ -438,7 +438,7 @@ const no = (e) => {
|
|
|
438
438
|
w();
|
|
439
439
|
}
|
|
440
440
|
function x() {
|
|
441
|
-
if (
|
|
441
|
+
if (g)
|
|
442
442
|
return /* @__PURE__ */ r(st, {});
|
|
443
443
|
if (c) {
|
|
444
444
|
const S = dt(c);
|
|
@@ -521,9 +521,9 @@ const ro = (e) => {
|
|
|
521
521
|
content: t
|
|
522
522
|
});
|
|
523
523
|
}, oo = (e) => {
|
|
524
|
-
const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = we(), [u, f] = b([]), [c, m] = b(!1), [p, h] = b(!1), [
|
|
524
|
+
const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = we(), [u, f] = b([]), [c, m] = b(!1), [p, h] = b(!1), [g, y] = b({}), w = ae();
|
|
525
525
|
pe(() => {
|
|
526
|
-
t ? C() :
|
|
526
|
+
t ? C() : y({});
|
|
527
527
|
}, [t]);
|
|
528
528
|
async function C() {
|
|
529
529
|
m(!0);
|
|
@@ -557,7 +557,7 @@ const ro = (e) => {
|
|
|
557
557
|
}))[0];
|
|
558
558
|
T[_.code] = v[s] || "";
|
|
559
559
|
}
|
|
560
|
-
w.current = T,
|
|
560
|
+
w.current = T, y(T);
|
|
561
561
|
}
|
|
562
562
|
function R() {
|
|
563
563
|
return u.map((F, T) => /* @__PURE__ */ k(Oe, { style: { paddingBottom: 20 }, children: [
|
|
@@ -566,10 +566,10 @@ const ro = (e) => {
|
|
|
566
566
|
Pi,
|
|
567
567
|
{
|
|
568
568
|
rows: 4,
|
|
569
|
-
value:
|
|
569
|
+
value: g[F.code] || "",
|
|
570
570
|
onChange: (_) => {
|
|
571
|
-
|
|
572
|
-
...
|
|
571
|
+
y({
|
|
572
|
+
...g,
|
|
573
573
|
[F.code]: _.target.value
|
|
574
574
|
});
|
|
575
575
|
},
|
|
@@ -581,11 +581,11 @@ const ro = (e) => {
|
|
|
581
581
|
async function V() {
|
|
582
582
|
h(!0);
|
|
583
583
|
try {
|
|
584
|
-
for (const F of Object.keys(
|
|
585
|
-
|
|
584
|
+
for (const F of Object.keys(g))
|
|
585
|
+
g[F] !== w.current[F] && await E.getHandler().update({
|
|
586
586
|
model: i,
|
|
587
587
|
id: o,
|
|
588
|
-
values: { [s]:
|
|
588
|
+
values: { [s]: g[F] },
|
|
589
589
|
context: {
|
|
590
590
|
lang: F
|
|
591
591
|
},
|
|
@@ -984,7 +984,7 @@ function js(e) {
|
|
|
984
984
|
return !1;
|
|
985
985
|
}
|
|
986
986
|
const Zn = async (e) => {
|
|
987
|
-
var
|
|
987
|
+
var g;
|
|
988
988
|
const {
|
|
989
989
|
items: t,
|
|
990
990
|
model: n,
|
|
@@ -993,21 +993,21 @@ const Zn = async (e) => {
|
|
|
993
993
|
context: s,
|
|
994
994
|
currentView: a = {}
|
|
995
995
|
} = e, l = ["original", "pendingLink"], d = t.filter(
|
|
996
|
-
(
|
|
997
|
-
), u = t.filter((
|
|
996
|
+
(y) => !l.includes(y.operation)
|
|
997
|
+
), u = t.filter((y) => l.includes(y.operation)).map((y) => y.id), f = {
|
|
998
998
|
form: i.fields,
|
|
999
999
|
tree: o.fields
|
|
1000
1000
|
};
|
|
1001
1001
|
let c = [], m;
|
|
1002
1002
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1003
|
-
const
|
|
1003
|
+
const y = (g = At(o)) == null ? void 0 : g.colors, w = await E.getHandler().readEvalUiObjects({
|
|
1004
1004
|
model: n,
|
|
1005
1005
|
ids: u,
|
|
1006
1006
|
arch: o == null ? void 0 : o.arch,
|
|
1007
1007
|
fields: o.fields,
|
|
1008
1008
|
context: s,
|
|
1009
|
-
attrs:
|
|
1010
|
-
colors:
|
|
1009
|
+
attrs: y && {
|
|
1010
|
+
colors: y
|
|
1011
1011
|
}
|
|
1012
1012
|
});
|
|
1013
1013
|
c = w[0], m = nn(w[1]);
|
|
@@ -1018,18 +1018,18 @@ const Zn = async (e) => {
|
|
|
1018
1018
|
fields: f[a],
|
|
1019
1019
|
context: s
|
|
1020
1020
|
});
|
|
1021
|
-
const p = c.map((
|
|
1021
|
+
const p = c.map((y) => {
|
|
1022
1022
|
const w = {};
|
|
1023
|
-
return Object.keys(
|
|
1024
|
-
(f[a].hasOwnProperty(C) || C === "id") && (w[C] =
|
|
1023
|
+
return Object.keys(y).forEach((C) => {
|
|
1024
|
+
(f[a].hasOwnProperty(C) || C === "id") && (w[C] = y[C]);
|
|
1025
1025
|
}), w;
|
|
1026
1026
|
});
|
|
1027
1027
|
return [
|
|
1028
|
-
t.map((
|
|
1028
|
+
t.map((y) => {
|
|
1029
1029
|
const w = p.find(
|
|
1030
|
-
(x) => x.id ===
|
|
1030
|
+
(x) => x.id === y.id
|
|
1031
1031
|
), C = {
|
|
1032
|
-
...
|
|
1032
|
+
...y
|
|
1033
1033
|
};
|
|
1034
1034
|
return a === "form" ? C.values = w : a === "tree" && (C.treeValues = w), C;
|
|
1035
1035
|
}).concat(d),
|
|
@@ -1069,24 +1069,24 @@ const Zn = async (e) => {
|
|
|
1069
1069
|
Ft(() => {
|
|
1070
1070
|
h();
|
|
1071
1071
|
}, [t]);
|
|
1072
|
-
const p = async (
|
|
1072
|
+
const p = async (g) => o && o[g] ? o[g] : await E.getHandler().getView({
|
|
1073
1073
|
model: n,
|
|
1074
|
-
type:
|
|
1074
|
+
type: g,
|
|
1075
1075
|
context: { ...m == null ? void 0 : m(), ...i }
|
|
1076
1076
|
}), h = async () => {
|
|
1077
1077
|
a(!0), d(void 0);
|
|
1078
1078
|
try {
|
|
1079
|
-
const
|
|
1080
|
-
u.set("form",
|
|
1081
|
-
} catch (
|
|
1082
|
-
d(
|
|
1079
|
+
const g = await p("form"), y = await p("tree");
|
|
1080
|
+
u.set("form", g), u.set("tree", y), f(u);
|
|
1081
|
+
} catch (g) {
|
|
1082
|
+
d(g);
|
|
1083
1083
|
} finally {
|
|
1084
1084
|
a(!1);
|
|
1085
1085
|
}
|
|
1086
1086
|
};
|
|
1087
1087
|
return s ? /* @__PURE__ */ r($e, {}) : l ? /* @__PURE__ */ r(Qe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(qs, { ooui: t, views: u }) });
|
|
1088
1088
|
}, qs = (e) => {
|
|
1089
|
-
const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = b(!1), [d, u] = b(), [f, c] = b(!1), [m, p] = b(), { relation: h, context:
|
|
1089
|
+
const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = b(!1), [d, u] = b(), [f, c] = b(!1), [m, p] = b(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: C } = i, x = s.filter((F) => F.values), S = ne(Be), { getContext: R } = S || {};
|
|
1090
1090
|
Ft(() => {
|
|
1091
1091
|
D();
|
|
1092
1092
|
}, [s]);
|
|
@@ -1108,7 +1108,7 @@ const Zn = async (e) => {
|
|
|
1108
1108
|
},
|
|
1109
1109
|
model: h,
|
|
1110
1110
|
items: s,
|
|
1111
|
-
context: { ...R == null ? void 0 : R(), ...
|
|
1111
|
+
context: { ...R == null ? void 0 : R(), ...g },
|
|
1112
1112
|
currentView: "form"
|
|
1113
1113
|
});
|
|
1114
1114
|
V(F);
|
|
@@ -1165,11 +1165,11 @@ const Zn = async (e) => {
|
|
|
1165
1165
|
onSubmitSucceed: () => {
|
|
1166
1166
|
c(!1);
|
|
1167
1167
|
},
|
|
1168
|
-
parentContext: { ...R == null ? void 0 : R(), ...
|
|
1168
|
+
parentContext: { ...R == null ? void 0 : R(), ...g },
|
|
1169
1169
|
onCancel: () => {
|
|
1170
1170
|
c(!1);
|
|
1171
1171
|
},
|
|
1172
|
-
readOnly:
|
|
1172
|
+
readOnly: y,
|
|
1173
1173
|
postSaveAction: D
|
|
1174
1174
|
}
|
|
1175
1175
|
)
|
|
@@ -1354,7 +1354,7 @@ const Nt = ({
|
|
|
1354
1354
|
const { ooui: t } = e;
|
|
1355
1355
|
return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(sa, { ooui: t }) });
|
|
1356
1356
|
}, sa = (e) => {
|
|
1357
|
-
const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field:
|
|
1357
|
+
const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: g } = n, y = ne(Be), { getContext: w } = y || {};
|
|
1358
1358
|
Ft(() => {
|
|
1359
1359
|
x();
|
|
1360
1360
|
}, [o]);
|
|
@@ -1371,21 +1371,21 @@ const Nt = ({
|
|
|
1371
1371
|
const T = await E.getHandler().evalDomain({
|
|
1372
1372
|
domain: n.domain,
|
|
1373
1373
|
values: Nt({
|
|
1374
|
-
fields:
|
|
1375
|
-
values:
|
|
1374
|
+
fields: y == null ? void 0 : y.getFields(),
|
|
1375
|
+
values: y.getPlainValues()
|
|
1376
1376
|
}),
|
|
1377
|
-
fields:
|
|
1378
|
-
context:
|
|
1377
|
+
fields: y == null ? void 0 : y.getFields(),
|
|
1378
|
+
context: y.getContext()
|
|
1379
1379
|
});
|
|
1380
1380
|
V = [...V, ...T];
|
|
1381
1381
|
}
|
|
1382
1382
|
const F = (await E.getHandler().search({
|
|
1383
1383
|
model: m,
|
|
1384
1384
|
params: V,
|
|
1385
|
-
fieldsToRetrieve: [
|
|
1385
|
+
fieldsToRetrieve: [g],
|
|
1386
1386
|
context: { ...w == null ? void 0 : w(), ...p }
|
|
1387
1387
|
})).map((T) => {
|
|
1388
|
-
const _ = T[
|
|
1388
|
+
const _ = T[g];
|
|
1389
1389
|
let v = _;
|
|
1390
1390
|
return Array.isArray(_) && (v = _[1]), { label: v, value: T.id };
|
|
1391
1391
|
});
|
|
@@ -1569,28 +1569,28 @@ const Nt = ({
|
|
|
1569
1569
|
s < o && (o = s);
|
|
1570
1570
|
let a = !1, l = [];
|
|
1571
1571
|
const d = i.map((c, m) => {
|
|
1572
|
-
const p = c.filter((
|
|
1572
|
+
const p = c.filter((y) => !y.invisible), h = ua({
|
|
1573
1573
|
row: p,
|
|
1574
1574
|
numberOfColumns: o
|
|
1575
1575
|
});
|
|
1576
|
-
let
|
|
1577
|
-
return (m === 0 || !(c.length === 1 && c.some((
|
|
1576
|
+
let g = h;
|
|
1577
|
+
return (m === 0 || !(c.length === 1 && c.some((y) => y.type === "group"))) && (g = da({
|
|
1578
1578
|
row: h,
|
|
1579
1579
|
numberOfColumns: o,
|
|
1580
1580
|
mustFillWithEmpties: n
|
|
1581
|
-
}), l = l.concat(
|
|
1581
|
+
}), l = l.concat(g)), g.map((y) => (y instanceof Et && y.fieldForLabel && (a = !0), /* @__PURE__ */ r(
|
|
1582
1582
|
"div",
|
|
1583
1583
|
{
|
|
1584
1584
|
style: {
|
|
1585
|
-
...ca({ item:
|
|
1585
|
+
...ca({ item: y, responsiveBehaviour: n }),
|
|
1586
1586
|
minWidth: 0
|
|
1587
1587
|
},
|
|
1588
1588
|
children: la({
|
|
1589
|
-
ooui:
|
|
1589
|
+
ooui: y,
|
|
1590
1590
|
responsiveBehaviour: n
|
|
1591
1591
|
})
|
|
1592
1592
|
},
|
|
1593
|
-
|
|
1593
|
+
y.key
|
|
1594
1594
|
)));
|
|
1595
1595
|
}), u = i.length === 1 ? fa(l, o) : ma(o, a);
|
|
1596
1596
|
return /* @__PURE__ */ r("div", { style: {
|
|
@@ -1659,8 +1659,8 @@ const Nt = ({
|
|
|
1659
1659
|
results: m,
|
|
1660
1660
|
currentItemIndex: p,
|
|
1661
1661
|
setCurrentItemIndex: h,
|
|
1662
|
-
currentModel:
|
|
1663
|
-
sorter:
|
|
1662
|
+
currentModel: g,
|
|
1663
|
+
sorter: y,
|
|
1664
1664
|
setSorter: w,
|
|
1665
1665
|
totalItems: C,
|
|
1666
1666
|
setTotalItems: x,
|
|
@@ -1716,7 +1716,7 @@ const Nt = ({
|
|
|
1716
1716
|
setCurrentItemIndex: h,
|
|
1717
1717
|
results: m,
|
|
1718
1718
|
setResults: c,
|
|
1719
|
-
currentModel:
|
|
1719
|
+
currentModel: g,
|
|
1720
1720
|
removingItem: L,
|
|
1721
1721
|
setRemovingItem: G,
|
|
1722
1722
|
formIsLoading: B,
|
|
@@ -1733,7 +1733,7 @@ const Nt = ({
|
|
|
1733
1733
|
searchParams: I,
|
|
1734
1734
|
searchVisible: K,
|
|
1735
1735
|
setSearchVisible: le,
|
|
1736
|
-
sorter:
|
|
1736
|
+
sorter: y,
|
|
1737
1737
|
setSorter: w,
|
|
1738
1738
|
totalItems: C,
|
|
1739
1739
|
setTotalItems: x,
|
|
@@ -1796,12 +1796,12 @@ const Nt = ({
|
|
|
1796
1796
|
wt(t, () => ({
|
|
1797
1797
|
openActionModal: S
|
|
1798
1798
|
}));
|
|
1799
|
-
const [m, p] = b(!1), [h,
|
|
1799
|
+
const [m, p] = b(!1), [h, g] = b(
|
|
1800
1800
|
{
|
|
1801
1801
|
context: {}
|
|
1802
1802
|
}
|
|
1803
1803
|
);
|
|
1804
|
-
async function
|
|
1804
|
+
async function y(D) {
|
|
1805
1805
|
const { reportData: F, fields: T, values: _, context: v = {} } = D, {
|
|
1806
1806
|
context: O,
|
|
1807
1807
|
model: A,
|
|
@@ -1856,7 +1856,7 @@ const Nt = ({
|
|
|
1856
1856
|
}) {
|
|
1857
1857
|
const { type: O } = D;
|
|
1858
1858
|
if (f.current.push(v), O === "ir.actions.report.xml")
|
|
1859
|
-
return await
|
|
1859
|
+
return await y({
|
|
1860
1860
|
reportData: D,
|
|
1861
1861
|
fields: F,
|
|
1862
1862
|
values: T,
|
|
@@ -1942,7 +1942,7 @@ const Nt = ({
|
|
|
1942
1942
|
context: _,
|
|
1943
1943
|
actionData: v
|
|
1944
1944
|
}) {
|
|
1945
|
-
m ? R({ domain: D, model: F, formView: T, context: _, actionData: v }) : (
|
|
1945
|
+
m ? R({ domain: D, model: F, formView: T, context: _, actionData: v }) : (g({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0));
|
|
1946
1946
|
}
|
|
1947
1947
|
async function R({
|
|
1948
1948
|
domain: D,
|
|
@@ -1951,16 +1951,16 @@ const Nt = ({
|
|
|
1951
1951
|
context: _,
|
|
1952
1952
|
actionData: v
|
|
1953
1953
|
}) {
|
|
1954
|
-
|
|
1954
|
+
g({
|
|
1955
1955
|
domain: void 0,
|
|
1956
1956
|
model: void 0,
|
|
1957
1957
|
context: {},
|
|
1958
1958
|
formView: void 0,
|
|
1959
1959
|
actionData: void 0
|
|
1960
|
-
}), p(!1), await new Promise((O) => setTimeout(O, 300)),
|
|
1960
|
+
}), p(!1), await new Promise((O) => setTimeout(O, 300)), g({ domain: D, model: F, context: _, formView: T, actionData: v }), p(!0);
|
|
1961
1961
|
}
|
|
1962
1962
|
async function V() {
|
|
1963
|
-
Sr(f.current), f.current = [], p(!1),
|
|
1963
|
+
Sr(f.current), f.current = [], p(!1), g({
|
|
1964
1964
|
domain: void 0,
|
|
1965
1965
|
model: void 0,
|
|
1966
1966
|
context: {},
|
|
@@ -1999,7 +1999,7 @@ const Nt = ({
|
|
|
1999
1999
|
visible: m,
|
|
2000
2000
|
onSubmitSucceed: V,
|
|
2001
2001
|
onCancel: () => {
|
|
2002
|
-
Sr(f.current), f.current = [], p(!1),
|
|
2002
|
+
Sr(f.current), f.current = [], p(!1), g({
|
|
2003
2003
|
domain: void 0,
|
|
2004
2004
|
model: void 0,
|
|
2005
2005
|
context: {},
|
|
@@ -2103,8 +2103,8 @@ function Oa(e, t) {
|
|
|
2103
2103
|
submitMode: m = "api",
|
|
2104
2104
|
values: p,
|
|
2105
2105
|
formView: h,
|
|
2106
|
-
postSaveAction:
|
|
2107
|
-
insideButtonModal:
|
|
2106
|
+
postSaveAction: g,
|
|
2107
|
+
insideButtonModal: y = !1,
|
|
2108
2108
|
parentContext: w = {},
|
|
2109
2109
|
actionDomain: C,
|
|
2110
2110
|
visible: x = !0,
|
|
@@ -2308,7 +2308,7 @@ function Oa(e, t) {
|
|
|
2308
2308
|
ids: [ie()],
|
|
2309
2309
|
fields: P,
|
|
2310
2310
|
context: w
|
|
2311
|
-
}))[0],
|
|
2311
|
+
}))[0], y)
|
|
2312
2312
|
return { values: J, defaultGetCalled: X };
|
|
2313
2313
|
const Ce = await E.getHandler().search({
|
|
2314
2314
|
params: [
|
|
@@ -2353,10 +2353,10 @@ function Oa(e, t) {
|
|
|
2353
2353
|
});
|
|
2354
2354
|
M.current = X, K.current = J;
|
|
2355
2355
|
}
|
|
2356
|
-
|
|
2356
|
+
g && await g([ie()]), !y && H && (de == null || de(ie(), Ae(), te()));
|
|
2357
2357
|
}, Lo = async (P) => {
|
|
2358
2358
|
const { callOnSubmitSucceed: H = !0 } = P || {};
|
|
2359
|
-
!
|
|
2359
|
+
!y && H && (de == null || de(ie(), Ae(), te()));
|
|
2360
2360
|
}, Zt = async (P) => {
|
|
2361
2361
|
let H = !1;
|
|
2362
2362
|
const { callOnSubmitSucceed: J = !0 } = P || {};
|
|
@@ -2515,7 +2515,7 @@ function Oa(e, t) {
|
|
|
2515
2515
|
...H
|
|
2516
2516
|
}
|
|
2517
2517
|
});
|
|
2518
|
-
if (typeof J == "object" && J !== null && Object.keys(J).length === 0 &&
|
|
2518
|
+
if (typeof J == "object" && J !== null && Object.keys(J).length === 0 && y)
|
|
2519
2519
|
de == null || de(ie(), Ae(), te());
|
|
2520
2520
|
else if (J.type && J.type === "ir.actions.act_window_close")
|
|
2521
2521
|
de == null || de(ie(), Ae(), te());
|
|
@@ -2693,7 +2693,7 @@ const zt = yt(Oa), Jt = (e) => {
|
|
|
2693
2693
|
isMenuAction: a = !1,
|
|
2694
2694
|
actionData: l,
|
|
2695
2695
|
...d
|
|
2696
|
-
} = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = b(i), [p, h] = b(!1), [
|
|
2696
|
+
} = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = b(i), [p, h] = b(!1), [g, y] = b(), { action_id: w, res_id: C, action_type: x, view_id: S } = l || {};
|
|
2697
2697
|
pe(() => {
|
|
2698
2698
|
a && R();
|
|
2699
2699
|
}, [l, a]);
|
|
@@ -2704,12 +2704,12 @@ const zt = yt(Oa), Jt = (e) => {
|
|
|
2704
2704
|
view_id: S,
|
|
2705
2705
|
res_id: C || !1
|
|
2706
2706
|
});
|
|
2707
|
-
h(T !== !1), T !== !1 &&
|
|
2707
|
+
h(T !== !1), T !== !1 && y(T);
|
|
2708
2708
|
}
|
|
2709
2709
|
async function V() {
|
|
2710
|
-
if (p &&
|
|
2710
|
+
if (p && g)
|
|
2711
2711
|
await E.getHandler().removeFavourite({
|
|
2712
|
-
shortcut_id:
|
|
2712
|
+
shortcut_id: g
|
|
2713
2713
|
});
|
|
2714
2714
|
else {
|
|
2715
2715
|
const { action_id: T, res_id: _, action_type: v, view_id: O } = l;
|
|
@@ -2936,7 +2936,7 @@ const { defaultAlgorithm: Ea, defaultSeed: Ma } = He, Na = Ea(Ma), { Option: Pa
|
|
|
2936
2936
|
}), u = a && !s ? Ba : Tt;
|
|
2937
2937
|
function f(c) {
|
|
2938
2938
|
const m = c.map((p) => {
|
|
2939
|
-
const h = l.find(([
|
|
2939
|
+
const h = l.find(([g, y]) => p === y);
|
|
2940
2940
|
return h && h[0];
|
|
2941
2941
|
});
|
|
2942
2942
|
if (m.length === 0) {
|
|
@@ -3124,18 +3124,18 @@ function go(e) {
|
|
|
3124
3124
|
searchError: c,
|
|
3125
3125
|
searchValues: m,
|
|
3126
3126
|
showLimitOptions: p = !0
|
|
3127
|
-
} = e, [h,
|
|
3127
|
+
} = e, [h, g] = b(), [y, w] = b(), [C, x] = b(!1), S = ae(), { token: R } = Qa(), [V] = ct.useForm();
|
|
3128
3128
|
pe(() => {
|
|
3129
3129
|
V.setFieldsValue(m);
|
|
3130
3130
|
}, [m]);
|
|
3131
3131
|
const D = () => {
|
|
3132
|
-
if (!
|
|
3132
|
+
if (!y)
|
|
3133
3133
|
return;
|
|
3134
|
-
const _ = C ?
|
|
3134
|
+
const _ = C ? y : h, v = _ == null ? void 0 : _.rows;
|
|
3135
3135
|
return v == null ? void 0 : v.map((O, A) => /* @__PURE__ */ r(Oe, { children: O.map((L, G) => /* @__PURE__ */ r(ue, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r(Ha, { field: L }) }, G)) }, A));
|
|
3136
3136
|
};
|
|
3137
3137
|
Ft(() => {
|
|
3138
|
-
x(!1), S.current = new ui(n, t), S.current.parse(),
|
|
3138
|
+
x(!1), S.current = new ui(n, t), S.current.parse(), g(S.current._simpleSearchContainer), w(S.current._advancedSearchContainer);
|
|
3139
3139
|
}, [t, n]);
|
|
3140
3140
|
const F = D(), T = (_) => {
|
|
3141
3141
|
var L;
|
|
@@ -3415,11 +3415,11 @@ const rl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(wo,
|
|
|
3415
3415
|
Pt
|
|
3416
3416
|
), { processAction: c } = f || {}, [m, p] = tt(
|
|
3417
3417
|
E.getHandler().getView
|
|
3418
|
-
), [h,
|
|
3418
|
+
), [h, g] = tt(
|
|
3419
3419
|
E.getHandler().readObjects
|
|
3420
|
-
),
|
|
3421
|
-
p(),
|
|
3422
|
-
}, [p,
|
|
3420
|
+
), y = fe(() => {
|
|
3421
|
+
p(), g();
|
|
3422
|
+
}, [p, g]), w = fe(async () => {
|
|
3423
3423
|
var V;
|
|
3424
3424
|
const x = await m({
|
|
3425
3425
|
model: n,
|
|
@@ -3481,7 +3481,7 @@ const rl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(wo,
|
|
|
3481
3481
|
onRetrieveData: w,
|
|
3482
3482
|
onItemClick: C,
|
|
3483
3483
|
onOpenChange: (x) => {
|
|
3484
|
-
x ||
|
|
3484
|
+
x || y();
|
|
3485
3485
|
}
|
|
3486
3486
|
}
|
|
3487
3487
|
);
|
|
@@ -3693,8 +3693,8 @@ const cl = (e) => {
|
|
|
3693
3693
|
});
|
|
3694
3694
|
s(
|
|
3695
3695
|
m.map((p) => {
|
|
3696
|
-
const { id: h, name:
|
|
3697
|
-
return { id: h, name:
|
|
3696
|
+
const { id: h, name: g } = p;
|
|
3697
|
+
return { id: h, name: g };
|
|
3698
3698
|
})
|
|
3699
3699
|
);
|
|
3700
3700
|
} catch (m) {
|
|
@@ -3708,8 +3708,8 @@ const cl = (e) => {
|
|
|
3708
3708
|
}, [e == null ? void 0 : e.items]);
|
|
3709
3709
|
const c = De(
|
|
3710
3710
|
() => o.map((m) => {
|
|
3711
|
-
const { id: p, name: h } = m,
|
|
3712
|
-
return /* @__PURE__ */ r(er, { color:
|
|
3711
|
+
const { id: p, name: h } = m, g = Kt(h);
|
|
3712
|
+
return /* @__PURE__ */ r(er, { color: g, children: h }, `${p}`);
|
|
3713
3713
|
}),
|
|
3714
3714
|
[o]
|
|
3715
3715
|
);
|
|
@@ -3759,8 +3759,8 @@ const cl = (e) => {
|
|
|
3759
3759
|
onRowSelectionChange: m,
|
|
3760
3760
|
scrollY: p,
|
|
3761
3761
|
colorsForResults: h = {},
|
|
3762
|
-
statusForResults:
|
|
3763
|
-
onChangeSort:
|
|
3762
|
+
statusForResults: g = {},
|
|
3763
|
+
onChangeSort: y,
|
|
3764
3764
|
sorter: w,
|
|
3765
3765
|
onFetchChildrenForRecord: C,
|
|
3766
3766
|
childField: x,
|
|
@@ -3867,13 +3867,13 @@ const cl = (e) => {
|
|
|
3867
3867
|
if (h[z.id])
|
|
3868
3868
|
return { color: h[z.id] };
|
|
3869
3869
|
},
|
|
3870
|
-
onRowStatus: js(
|
|
3871
|
-
if (
|
|
3872
|
-
return /* @__PURE__ */ r(ii, { color:
|
|
3870
|
+
onRowStatus: js(g) ? (z) => {
|
|
3871
|
+
if (g[z.id])
|
|
3872
|
+
return /* @__PURE__ */ r(ii, { color: g[z.id] });
|
|
3873
3873
|
} : void 0,
|
|
3874
3874
|
onRowDoubleClick: u,
|
|
3875
3875
|
onRowSelectionChange: m,
|
|
3876
|
-
onChangeSort:
|
|
3876
|
+
onChangeSort: y,
|
|
3877
3877
|
sorter: w,
|
|
3878
3878
|
readonly: V,
|
|
3879
3879
|
expandableOpts: C ? {
|
|
@@ -3907,8 +3907,8 @@ const Co = (e) => {
|
|
|
3907
3907
|
formView: m,
|
|
3908
3908
|
sorter: p,
|
|
3909
3909
|
setSorter: h,
|
|
3910
|
-
setCurrentItemIndex:
|
|
3911
|
-
setResultsActionView:
|
|
3910
|
+
setCurrentItemIndex: g,
|
|
3911
|
+
setResultsActionView: y,
|
|
3912
3912
|
resultsActionView: w,
|
|
3913
3913
|
domain: C,
|
|
3914
3914
|
currentId: x,
|
|
@@ -3919,9 +3919,9 @@ const Co = (e) => {
|
|
|
3919
3919
|
clearSelection: F
|
|
3920
3920
|
} = e, [T, _] = b(!1), [v, O] = b(!1), [A, L] = b(), [G, B] = b(1), [q, N] = b(0), [Z, ee] = b(), [oe, U] = b([]), [$, I] = b(void 0), [M, K] = b(void 0), le = ae(S || St), z = ae([]), re = fe(
|
|
3921
3921
|
(se) => {
|
|
3922
|
-
|
|
3922
|
+
y == null || y([...se]), U([...se]);
|
|
3923
3923
|
},
|
|
3924
|
-
[
|
|
3924
|
+
[y]
|
|
3925
3925
|
), ve = fe(() => w || oe, [w, oe]), W = fe(async () => {
|
|
3926
3926
|
const se = await E.getHandler().nameSearch({
|
|
3927
3927
|
model: t,
|
|
@@ -3947,9 +3947,9 @@ const Co = (e) => {
|
|
|
3947
3947
|
sorter: p,
|
|
3948
3948
|
fields: { ...c.fields, ...m.fields }
|
|
3949
3949
|
}) : [...z.current];
|
|
3950
|
-
re(he), de.length > 0 ?
|
|
3950
|
+
re(he), de.length > 0 ? g == null || g(0) : g == null || g(void 0);
|
|
3951
3951
|
} else
|
|
3952
|
-
re([]),
|
|
3952
|
+
re([]), g == null || g(void 0);
|
|
3953
3953
|
_(!1), d.current = !0;
|
|
3954
3954
|
}, [
|
|
3955
3955
|
re,
|
|
@@ -3961,7 +3961,7 @@ const Co = (e) => {
|
|
|
3961
3961
|
c,
|
|
3962
3962
|
m,
|
|
3963
3963
|
p,
|
|
3964
|
-
|
|
3964
|
+
g,
|
|
3965
3965
|
f
|
|
3966
3966
|
]), ce = fe(
|
|
3967
3967
|
async (se) => {
|
|
@@ -3986,15 +3986,15 @@ const Co = (e) => {
|
|
|
3986
3986
|
const Ae = ie.findIndex(
|
|
3987
3987
|
(Y) => x === Y.id
|
|
3988
3988
|
);
|
|
3989
|
-
Ae === -1 ?
|
|
3989
|
+
Ae === -1 ? g == null || g(0) : g == null || g(Ae);
|
|
3990
3990
|
} else
|
|
3991
|
-
|
|
3991
|
+
g == null || g(void 0);
|
|
3992
3992
|
_(!1);
|
|
3993
3993
|
const je = await de;
|
|
3994
3994
|
ee(je), f == null || f(je);
|
|
3995
3995
|
},
|
|
3996
3996
|
[
|
|
3997
|
-
|
|
3997
|
+
g,
|
|
3998
3998
|
w,
|
|
3999
3999
|
re,
|
|
4000
4000
|
x,
|
|
@@ -4130,7 +4130,7 @@ function Rl(e, t) {
|
|
|
4130
4130
|
rootTree: f = !1,
|
|
4131
4131
|
parentContext: c = {},
|
|
4132
4132
|
onChangeSelectedRowKeys: m
|
|
4133
|
-
} = e, [p, h] = b(!1), [
|
|
4133
|
+
} = e, [p, h] = b(!1), [g, y] = b(!1), w = ae(!1), C = ae(null), [x, S] = b(), [R, V] = b(), [D, F] = b(), [T, _] = b(), [v, O] = b(200), A = ae(), { height: L } = hn(), G = ne(
|
|
4134
4134
|
Pt
|
|
4135
4135
|
), { processAction: B } = G || {}, q = ne(
|
|
4136
4136
|
rt
|
|
@@ -4210,12 +4210,12 @@ function Rl(e, t) {
|
|
|
4210
4210
|
getFields: () => R == null ? void 0 : R.fields,
|
|
4211
4211
|
getDomain: () => d
|
|
4212
4212
|
})), pe(() => {
|
|
4213
|
-
|
|
4214
|
-
}, [j, Ve,
|
|
4213
|
+
g && u && R && (w.current = !1, se());
|
|
4214
|
+
}, [j, Ve, g, u, a, R]);
|
|
4215
4215
|
const Re = async () => {
|
|
4216
|
-
|
|
4216
|
+
y(!1), h(!0), _(void 0), ce == null || ce(!0);
|
|
4217
4217
|
try {
|
|
4218
|
-
await xe(),
|
|
4218
|
+
await xe(), y(!0);
|
|
4219
4219
|
} catch (Pe) {
|
|
4220
4220
|
_(Pe), ce == null || ce(!1);
|
|
4221
4221
|
} finally {
|
|
@@ -4379,15 +4379,15 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4379
4379
|
nameSearch: s,
|
|
4380
4380
|
domain: a,
|
|
4381
4381
|
context: l = {}
|
|
4382
|
-
} = e, [d, u] = b(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = we(), [p, h] = b([]),
|
|
4382
|
+
} = e, [d, u] = b(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = we(), [p, h] = b([]), g = async () => {
|
|
4383
4383
|
await new Promise((x) => setTimeout(x, 5)), n();
|
|
4384
|
-
},
|
|
4384
|
+
}, y = async (x) => {
|
|
4385
4385
|
const { id: S } = x;
|
|
4386
4386
|
i([S]);
|
|
4387
4387
|
};
|
|
4388
4388
|
function w() {
|
|
4389
4389
|
if (p.length === 0) {
|
|
4390
|
-
|
|
4390
|
+
g();
|
|
4391
4391
|
return;
|
|
4392
4392
|
}
|
|
4393
4393
|
i(p);
|
|
@@ -4398,7 +4398,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4398
4398
|
{
|
|
4399
4399
|
model: o,
|
|
4400
4400
|
nameSearch: s,
|
|
4401
|
-
onRowClicked:
|
|
4401
|
+
onRowClicked: y,
|
|
4402
4402
|
treeScrollY: c * 0.3,
|
|
4403
4403
|
domain: a,
|
|
4404
4404
|
parentContext: l,
|
|
@@ -4428,7 +4428,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4428
4428
|
children: m("ok")
|
|
4429
4429
|
}
|
|
4430
4430
|
),
|
|
4431
|
-
/* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ut, {}), onClick:
|
|
4431
|
+
/* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ut, {}), onClick: g, children: m("cancel") })
|
|
4432
4432
|
] }) })
|
|
4433
4433
|
] });
|
|
4434
4434
|
return /* @__PURE__ */ k(Q, { children: [
|
|
@@ -4440,7 +4440,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4440
4440
|
width: f,
|
|
4441
4441
|
open: t && !d,
|
|
4442
4442
|
closable: !0,
|
|
4443
|
-
onCancel:
|
|
4443
|
+
onCancel: g,
|
|
4444
4444
|
footer: null,
|
|
4445
4445
|
destroyOnClose: !0,
|
|
4446
4446
|
maskClosable: !1,
|
|
@@ -4454,10 +4454,10 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4454
4454
|
visible: d,
|
|
4455
4455
|
parentContext: l,
|
|
4456
4456
|
onSubmitSucceed: (x) => {
|
|
4457
|
-
u(!1),
|
|
4457
|
+
u(!1), g(), i([x]);
|
|
4458
4458
|
},
|
|
4459
4459
|
onCancel: () => {
|
|
4460
|
-
u(!1),
|
|
4460
|
+
u(!1), g();
|
|
4461
4461
|
}
|
|
4462
4462
|
}
|
|
4463
4463
|
)
|
|
@@ -4487,7 +4487,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4487
4487
|
context: l,
|
|
4488
4488
|
id: d,
|
|
4489
4489
|
domain: u
|
|
4490
|
-
} = i, f = o && !a ? { backgroundColor: To.colorPrimaryBg } : void 0, [c, m] = b(!1), [p, h] = b(!1), [
|
|
4490
|
+
} = i, f = o && !a ? { backgroundColor: To.colorPrimaryBg } : void 0, [c, m] = b(!1), [p, h] = b(!1), [g, y] = b(!1), [w, C] = b(), x = ae(!1), [S, R] = b(""), V = ae(), D = ne(Be), { domain: F, getValues: T, getFields: _, getContext: v, elementHasLostFocus: O } = D || {}, A = ae([]), [L, G] = b([]), B = t && t[0] || void 0, q = t && t[1] || "";
|
|
4491
4491
|
pe(() => {
|
|
4492
4492
|
!Array.isArray(t) && t && U(t);
|
|
4493
4493
|
}, [t]), pe(() => {
|
|
@@ -4498,12 +4498,12 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4498
4498
|
}, Z = (K) => {
|
|
4499
4499
|
V.current = K.target.value, N([void 0, ""]);
|
|
4500
4500
|
}, ee = async () => {
|
|
4501
|
-
if (!
|
|
4501
|
+
if (!g && S !== q) {
|
|
4502
4502
|
if (await new Promise((K) => setTimeout(K, 100)), x.current) {
|
|
4503
4503
|
N([void 0, ""]);
|
|
4504
4504
|
return;
|
|
4505
4505
|
}
|
|
4506
|
-
|
|
4506
|
+
y(!0);
|
|
4507
4507
|
try {
|
|
4508
4508
|
if (A.current && A.current.length > 0)
|
|
4509
4509
|
oe(V.current);
|
|
@@ -4518,7 +4518,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4518
4518
|
} catch (K) {
|
|
4519
4519
|
on(K);
|
|
4520
4520
|
} finally {
|
|
4521
|
-
|
|
4521
|
+
y(!1);
|
|
4522
4522
|
}
|
|
4523
4523
|
}
|
|
4524
4524
|
}, oe = async (K) => {
|
|
@@ -4534,7 +4534,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4534
4534
|
}
|
|
4535
4535
|
C(K), m(!0);
|
|
4536
4536
|
}, U = async (K) => {
|
|
4537
|
-
|
|
4537
|
+
y(!0);
|
|
4538
4538
|
try {
|
|
4539
4539
|
const le = await E.getHandler().execute({
|
|
4540
4540
|
action: "name_get",
|
|
@@ -4546,7 +4546,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4546
4546
|
} catch (le) {
|
|
4547
4547
|
on(le);
|
|
4548
4548
|
} finally {
|
|
4549
|
-
|
|
4549
|
+
y(!1);
|
|
4550
4550
|
}
|
|
4551
4551
|
};
|
|
4552
4552
|
async function $() {
|
|
@@ -4608,8 +4608,8 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4608
4608
|
/* @__PURE__ */ r(ue, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ r(
|
|
4609
4609
|
ke,
|
|
4610
4610
|
{
|
|
4611
|
-
icon:
|
|
4612
|
-
disabled: a ||
|
|
4611
|
+
icon: g ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(Wn, {}),
|
|
4612
|
+
disabled: a || g,
|
|
4613
4613
|
onClick: () => {
|
|
4614
4614
|
x.current = !0, oe(q);
|
|
4615
4615
|
},
|
|
@@ -4689,7 +4689,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4689
4689
|
field: u,
|
|
4690
4690
|
operator: f,
|
|
4691
4691
|
manualIds: c
|
|
4692
|
-
} = e, [m, p] = b(!1), [h,
|
|
4692
|
+
} = e, [m, p] = b(!1), [h, g] = b(), [y, w] = b(), [C, x] = b(), [S, R] = b(0), [V, D] = b(0), [F, T] = b(), [_, v] = b(), [O, A] = b(), [L] = tt(
|
|
4693
4693
|
E.getHandler().searchAllIds
|
|
4694
4694
|
), [G] = tt(
|
|
4695
4695
|
E.getHandler().readObjects
|
|
@@ -4759,7 +4759,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4759
4759
|
let U, $;
|
|
4760
4760
|
try {
|
|
4761
4761
|
const I = await Z({ domain: n, isTotal: !1 });
|
|
4762
|
-
if (
|
|
4762
|
+
if (g(I), s) {
|
|
4763
4763
|
const M = await q({
|
|
4764
4764
|
domain: s,
|
|
4765
4765
|
values: {},
|
|
@@ -4807,7 +4807,7 @@ const xo = yt(Rl), So = (e) => {
|
|
|
4807
4807
|
{
|
|
4808
4808
|
value: h,
|
|
4809
4809
|
total: C,
|
|
4810
|
-
percent:
|
|
4810
|
+
percent: y,
|
|
4811
4811
|
measureRef: U,
|
|
4812
4812
|
height: S,
|
|
4813
4813
|
width: V,
|
|
@@ -4904,7 +4904,7 @@ function Ml({
|
|
|
4904
4904
|
`bold ${Math.floor(f * 1.03)}px sans-serif`
|
|
4905
4905
|
);
|
|
4906
4906
|
l && (h = h * 1.5), (h >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / h * f);
|
|
4907
|
-
const
|
|
4907
|
+
const g = l && dt(l, { style: { fontSize: f } });
|
|
4908
4908
|
return /* @__PURE__ */ r(
|
|
4909
4909
|
"div",
|
|
4910
4910
|
{
|
|
@@ -4920,9 +4920,9 @@ function Ml({
|
|
|
4920
4920
|
padding: "0.2rem"
|
|
4921
4921
|
},
|
|
4922
4922
|
children: /* @__PURE__ */ k(Oe, { align: "middle", children: [
|
|
4923
|
-
|
|
4923
|
+
g && /* @__PURE__ */ r(ue, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ r(g, {}) }),
|
|
4924
4924
|
/* @__PURE__ */ k(ue, { children: [
|
|
4925
|
-
/* @__PURE__ */ r(Vn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children:
|
|
4925
|
+
/* @__PURE__ */ r(Vn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: g ? ` ${i}%` : `${i}%` }),
|
|
4926
4926
|
/* @__PURE__ */ r(
|
|
4927
4927
|
Vn,
|
|
4928
4928
|
{
|
|
@@ -5081,7 +5081,7 @@ const { processGraphData: Bl } = jr, { getFieldsToRetrieve: Hl } = hi, Kl = (e)
|
|
|
5081
5081
|
limit: s,
|
|
5082
5082
|
uninformedString: a,
|
|
5083
5083
|
manualIds: l
|
|
5084
|
-
} = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), [h,
|
|
5084
|
+
} = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), [h, g] = b(), [y, w] = b("line"), [C] = tt(
|
|
5085
5085
|
E.getHandler().getFields
|
|
5086
5086
|
), [x] = tt(
|
|
5087
5087
|
E.getHandler().readObjects
|
|
@@ -5115,12 +5115,12 @@ const { processGraphData: Bl } = jr, { getFieldsToRetrieve: Hl } = hi, Kl = (e)
|
|
|
5115
5115
|
return c("No values or fields returned"), u(!1), {
|
|
5116
5116
|
loading: d,
|
|
5117
5117
|
error: f,
|
|
5118
|
-
type:
|
|
5118
|
+
type: y,
|
|
5119
5119
|
values: m,
|
|
5120
5120
|
evaluatedEntries: h,
|
|
5121
5121
|
fetchData: R
|
|
5122
5122
|
};
|
|
5123
|
-
|
|
5123
|
+
g(F);
|
|
5124
5124
|
const _ = Bl({
|
|
5125
5125
|
ooui: V,
|
|
5126
5126
|
values: F,
|
|
@@ -5148,14 +5148,14 @@ const { processGraphData: Bl } = jr, { getFieldsToRetrieve: Hl } = hi, Kl = (e)
|
|
|
5148
5148
|
m,
|
|
5149
5149
|
x,
|
|
5150
5150
|
S,
|
|
5151
|
-
|
|
5151
|
+
y,
|
|
5152
5152
|
a,
|
|
5153
5153
|
o
|
|
5154
5154
|
]);
|
|
5155
5155
|
return {
|
|
5156
5156
|
loading: d,
|
|
5157
5157
|
error: f,
|
|
5158
|
-
type:
|
|
5158
|
+
type: y,
|
|
5159
5159
|
values: m,
|
|
5160
5160
|
evaluatedEntries: h,
|
|
5161
5161
|
fetchData: R
|
|
@@ -5196,7 +5196,7 @@ async function Wl({
|
|
|
5196
5196
|
fieldsToRetrieve: e,
|
|
5197
5197
|
context: i
|
|
5198
5198
|
});
|
|
5199
|
-
return o && (p = [...p].sort((h,
|
|
5199
|
+
return o && (p = [...p].sort((h, g) => h[o] - g[o])), {
|
|
5200
5200
|
values: p,
|
|
5201
5201
|
fields: c
|
|
5202
5202
|
};
|
|
@@ -5236,7 +5236,7 @@ const Ul = {
|
|
|
5236
5236
|
return /* @__PURE__ */ r(Qe, { message: "No data to display", type: "info" });
|
|
5237
5237
|
if (d)
|
|
5238
5238
|
return /* @__PURE__ */ r(Qe, { message: d, type: "error", banner: !0 });
|
|
5239
|
-
const { data: h, isGroup:
|
|
5239
|
+
const { data: h, isGroup: g, isStack: y } = f, w = Ul[c];
|
|
5240
5240
|
return w ? /* @__PURE__ */ k("div", { style: { padding: "1rem" }, children: [
|
|
5241
5241
|
/* @__PURE__ */ r("p", { style: { textAlign: "right" }, children: `${l("totalRegisters")} ${(C = m == null ? void 0 : m.length) == null ? void 0 : C.toLocaleString(
|
|
5242
5242
|
"es-ES",
|
|
@@ -5250,8 +5250,8 @@ const Ul = {
|
|
|
5250
5250
|
...Gl({
|
|
5251
5251
|
type: c,
|
|
5252
5252
|
data: h,
|
|
5253
|
-
isGroup:
|
|
5254
|
-
isStack:
|
|
5253
|
+
isGroup: g,
|
|
5254
|
+
isStack: y
|
|
5255
5255
|
})
|
|
5256
5256
|
}
|
|
5257
5257
|
)
|
|
@@ -5265,7 +5265,7 @@ function Gl(e) {
|
|
|
5265
5265
|
const ql = (e, t) => {
|
|
5266
5266
|
const { view_id: n, model: i, context: o, domain: s, limit: a, manualIds: l } = e, [d, u] = b(!1), [f, c] = b(), [m, p] = b(), h = ne(
|
|
5267
5267
|
rt
|
|
5268
|
-
), { setGraphIsLoading:
|
|
5268
|
+
), { setGraphIsLoading: g = void 0 } = h || {}, [y] = tt(E.getHandler().getView);
|
|
5269
5269
|
wt(t, () => ({
|
|
5270
5270
|
refresh: () => {
|
|
5271
5271
|
w();
|
|
@@ -5274,9 +5274,9 @@ const ql = (e, t) => {
|
|
|
5274
5274
|
w();
|
|
5275
5275
|
}, [n]);
|
|
5276
5276
|
async function w() {
|
|
5277
|
-
u(!0),
|
|
5277
|
+
u(!0), g == null || g(!0);
|
|
5278
5278
|
try {
|
|
5279
|
-
const C = await
|
|
5279
|
+
const C = await y({
|
|
5280
5280
|
model: i,
|
|
5281
5281
|
id: n,
|
|
5282
5282
|
type: "graph",
|
|
@@ -5284,9 +5284,9 @@ const ql = (e, t) => {
|
|
|
5284
5284
|
});
|
|
5285
5285
|
p(C.arch);
|
|
5286
5286
|
const x = Bn(C.arch);
|
|
5287
|
-
c(x), u(!1),
|
|
5287
|
+
c(x), u(!1), g == null || g(!1);
|
|
5288
5288
|
} catch (C) {
|
|
5289
|
-
return console.error(C), u(!1),
|
|
5289
|
+
return console.error(C), u(!1), g == null || g(!1), /* @__PURE__ */ r(Q, { children: JSON.stringify(C) });
|
|
5290
5290
|
}
|
|
5291
5291
|
}
|
|
5292
5292
|
if (d)
|
|
@@ -5388,8 +5388,8 @@ const ql = (e, t) => {
|
|
|
5388
5388
|
onSearchItem: m,
|
|
5389
5389
|
selectedRowKeys: p,
|
|
5390
5390
|
showCreateButton: h,
|
|
5391
|
-
showToggleButton:
|
|
5392
|
-
} = e, { token:
|
|
5391
|
+
showToggleButton: g
|
|
5392
|
+
} = e, { token: y } = Zl();
|
|
5393
5393
|
function w() {
|
|
5394
5394
|
return /* @__PURE__ */ r("div", { className: "inline-block w-3" });
|
|
5395
5395
|
}
|
|
@@ -5399,8 +5399,8 @@ const ql = (e, t) => {
|
|
|
5399
5399
|
{
|
|
5400
5400
|
className: "flex flex-grow h-8 text-white",
|
|
5401
5401
|
style: {
|
|
5402
|
-
borderRadius:
|
|
5403
|
-
backgroundColor:
|
|
5402
|
+
borderRadius: y.borderRadius,
|
|
5403
|
+
backgroundColor: y.colorPrimaryActive
|
|
5404
5404
|
},
|
|
5405
5405
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ r("span", { className: "pl-2 font-bold", children: t }) })
|
|
5406
5406
|
}
|
|
@@ -5474,7 +5474,7 @@ const ql = (e, t) => {
|
|
|
5474
5474
|
s !== "graph" && x(),
|
|
5475
5475
|
s === "form" && R(),
|
|
5476
5476
|
w(),
|
|
5477
|
-
|
|
5477
|
+
g && /* @__PURE__ */ r(
|
|
5478
5478
|
ze,
|
|
5479
5479
|
{
|
|
5480
5480
|
tooltip: "Toggle view mode",
|
|
@@ -5500,7 +5500,7 @@ const rc = (e) => {
|
|
|
5500
5500
|
var Ae;
|
|
5501
5501
|
const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = ne(
|
|
5502
5502
|
Ro
|
|
5503
|
-
), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain:
|
|
5503
|
+
), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = we(), [w, C] = b(!1), [x, S] = b(!1), [R, V] = b(), [D, F] = b(!1), [T, _] = b(!1), [v, O] = b(), [A, L] = b([]), [G, B] = b(!1), q = ae([]), [N, Z] = b(), ee = ae(), [oe, U] = b(void 0), {
|
|
5504
5504
|
readOnly: $,
|
|
5505
5505
|
relation: I,
|
|
5506
5506
|
context: M,
|
|
@@ -5520,7 +5520,7 @@ const rc = (e) => {
|
|
|
5520
5520
|
}, [s, a]);
|
|
5521
5521
|
pe(() => {
|
|
5522
5522
|
Me();
|
|
5523
|
-
}, [
|
|
5523
|
+
}, [g]);
|
|
5524
5524
|
const ce = (Y) => {
|
|
5525
5525
|
var te, Re;
|
|
5526
5526
|
n == null || n({
|
|
@@ -5562,9 +5562,9 @@ const rc = (e) => {
|
|
|
5562
5562
|
}),
|
|
5563
5563
|
fields: m(),
|
|
5564
5564
|
context: h()
|
|
5565
|
-
})),
|
|
5565
|
+
})), g && g.length > 0 && (q.current = q.current.concat(
|
|
5566
5566
|
Kr({
|
|
5567
|
-
domain:
|
|
5567
|
+
domain: g,
|
|
5568
5568
|
widgetFieldName: z
|
|
5569
5569
|
})
|
|
5570
5570
|
));
|
|
@@ -5603,7 +5603,7 @@ const rc = (e) => {
|
|
|
5603
5603
|
ce(xe);
|
|
5604
5604
|
}, se = (Y) => {
|
|
5605
5605
|
w ? qt({
|
|
5606
|
-
t:
|
|
5606
|
+
t: y,
|
|
5607
5607
|
onOk: () => {
|
|
5608
5608
|
Le(), Y(), C(!1);
|
|
5609
5609
|
}
|
|
@@ -5611,7 +5611,7 @@ const rc = (e) => {
|
|
|
5611
5611
|
}, _e = () => {
|
|
5612
5612
|
if (le) {
|
|
5613
5613
|
Ql({
|
|
5614
|
-
t:
|
|
5614
|
+
t: y,
|
|
5615
5615
|
onOk: () => {
|
|
5616
5616
|
a === "form" ? j() : ge();
|
|
5617
5617
|
}
|
|
@@ -5619,7 +5619,7 @@ const rc = (e) => {
|
|
|
5619
5619
|
return;
|
|
5620
5620
|
}
|
|
5621
5621
|
Jl({
|
|
5622
|
-
t:
|
|
5622
|
+
t: y,
|
|
5623
5623
|
onOk: () => {
|
|
5624
5624
|
a === "form" ? j() : ge();
|
|
5625
5625
|
}
|
|
@@ -5737,7 +5737,7 @@ const rc = (e) => {
|
|
|
5737
5737
|
const ie = () => {
|
|
5738
5738
|
var te, Re, xe, Se;
|
|
5739
5739
|
if (a === "form")
|
|
5740
|
-
return re.length === 0 ?
|
|
5740
|
+
return re.length === 0 ? y("noCurrentEntries") : a !== ve.current && s.some((Ie) => !Ie.values) ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ r(
|
|
5741
5741
|
zt,
|
|
5742
5742
|
{
|
|
5743
5743
|
formView: o.get("form"),
|
|
@@ -5866,25 +5866,25 @@ const rc = (e) => {
|
|
|
5866
5866
|
}, oc = (e) => {
|
|
5867
5867
|
const { ooui: t } = e, { mode: n, relation: i, views: o, required: s, context: a } = t;
|
|
5868
5868
|
let l;
|
|
5869
|
-
const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = ne(Be), { getContext:
|
|
5869
|
+
const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = ne(Be), { getContext: g } = h || {};
|
|
5870
5870
|
Ft(() => {
|
|
5871
5871
|
w();
|
|
5872
5872
|
}, [t]);
|
|
5873
|
-
const
|
|
5873
|
+
const y = async (x) => o && o[x] ? o[x] : await E.getHandler().getView({
|
|
5874
5874
|
model: i,
|
|
5875
5875
|
type: x,
|
|
5876
|
-
context: { ...
|
|
5876
|
+
context: { ...g == null ? void 0 : g(), ...a }
|
|
5877
5877
|
}), w = async () => {
|
|
5878
5878
|
u(!0), c(void 0);
|
|
5879
5879
|
try {
|
|
5880
5880
|
if (n && n.length > 0) {
|
|
5881
5881
|
for (const x of n) {
|
|
5882
|
-
const S = await
|
|
5882
|
+
const S = await y(x);
|
|
5883
5883
|
m.set(x, S);
|
|
5884
5884
|
}
|
|
5885
5885
|
p(m);
|
|
5886
5886
|
} else {
|
|
5887
|
-
const x = await
|
|
5887
|
+
const x = await y("form"), S = await y("tree");
|
|
5888
5888
|
m.set("form", x), m.set("tree", S), p(m);
|
|
5889
5889
|
}
|
|
5890
5890
|
} catch (x) {
|
|
@@ -5923,10 +5923,10 @@ const rc = (e) => {
|
|
|
5923
5923
|
const h = (w) => {
|
|
5924
5924
|
i == null || i(w);
|
|
5925
5925
|
};
|
|
5926
|
-
function
|
|
5926
|
+
function g(w) {
|
|
5927
5927
|
u.current = w.target.value, c(w.target.value);
|
|
5928
5928
|
}
|
|
5929
|
-
async function
|
|
5929
|
+
async function y() {
|
|
5930
5930
|
h(nl(f)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
|
|
5931
5931
|
}
|
|
5932
5932
|
return /* @__PURE__ */ r(
|
|
@@ -5938,8 +5938,8 @@ const rc = (e) => {
|
|
|
5938
5938
|
style: d,
|
|
5939
5939
|
id: o,
|
|
5940
5940
|
placeholder: "00:00",
|
|
5941
|
-
onChange:
|
|
5942
|
-
onBlur:
|
|
5941
|
+
onChange: g,
|
|
5942
|
+
onBlur: y
|
|
5943
5943
|
}
|
|
5944
5944
|
);
|
|
5945
5945
|
};
|
|
@@ -6114,25 +6114,25 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6114
6114
|
onClose: s
|
|
6115
6115
|
}) => {
|
|
6116
6116
|
const a = ae({}), l = ae(/* @__PURE__ */ new Map()), { t: d } = we(), u = fe(
|
|
6117
|
-
async (
|
|
6118
|
-
if (
|
|
6117
|
+
async (y) => {
|
|
6118
|
+
if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
|
|
6119
6119
|
ht(d("selectAtLeastOneField"));
|
|
6120
6120
|
return;
|
|
6121
6121
|
}
|
|
6122
6122
|
let w = i;
|
|
6123
|
-
|
|
6123
|
+
y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
|
|
6124
6124
|
["id", "in", n == null ? void 0 : n.map((S) => S.id)]
|
|
6125
6125
|
]);
|
|
6126
6126
|
const { datas: C } = await E.getHandler().exportData({
|
|
6127
6127
|
model: e,
|
|
6128
6128
|
fields: bc({
|
|
6129
|
-
keys:
|
|
6129
|
+
keys: y.selectedKeys,
|
|
6130
6130
|
fields: a.current
|
|
6131
6131
|
}),
|
|
6132
6132
|
domain: w,
|
|
6133
|
-
limit:
|
|
6133
|
+
limit: y.registersAmount === "all" ? 0 : o,
|
|
6134
6134
|
context: t,
|
|
6135
|
-
format:
|
|
6135
|
+
format: y.exportType
|
|
6136
6136
|
});
|
|
6137
6137
|
s(), await new Promise((S) => setTimeout(S, 200));
|
|
6138
6138
|
const x = await kt(C);
|
|
@@ -6140,15 +6140,15 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6140
6140
|
},
|
|
6141
6141
|
[i, n, e, o, t, s, d]
|
|
6142
6142
|
), f = fe(async () => {
|
|
6143
|
-
const
|
|
6143
|
+
const y = await E.getHandler().getFields({
|
|
6144
6144
|
model: e,
|
|
6145
6145
|
context: t,
|
|
6146
6146
|
fields: []
|
|
6147
6147
|
});
|
|
6148
|
-
return a.current["/"] =
|
|
6148
|
+
return a.current["/"] = y, Vr({ fields: y });
|
|
6149
6149
|
}, [e, t, a]), c = fe(
|
|
6150
|
-
async (
|
|
6151
|
-
const C = Nn(
|
|
6150
|
+
async (y) => {
|
|
6151
|
+
const C = Nn(y, a.current)[Mn(y)], x = C.relation, S = await E.getHandler().getFields({
|
|
6152
6152
|
model: x,
|
|
6153
6153
|
context: t,
|
|
6154
6154
|
fields: []
|
|
@@ -6158,20 +6158,20 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6158
6158
|
parentTitle: C.string,
|
|
6159
6159
|
title: V.string
|
|
6160
6160
|
});
|
|
6161
|
-
return a.current[
|
|
6161
|
+
return a.current[y] = S, Vr({
|
|
6162
6162
|
fields: S,
|
|
6163
|
-
parentKey:
|
|
6163
|
+
parentKey: y
|
|
6164
6164
|
});
|
|
6165
6165
|
},
|
|
6166
6166
|
[t]
|
|
6167
6167
|
), m = fe(async () => {
|
|
6168
|
-
const
|
|
6169
|
-
predefinedExports:
|
|
6168
|
+
const y = await yc({ model: e, context: t }), w = await vc({
|
|
6169
|
+
predefinedExports: y,
|
|
6170
6170
|
fields: a.current,
|
|
6171
6171
|
onGetFieldChilds: c
|
|
6172
6172
|
});
|
|
6173
6173
|
return {
|
|
6174
|
-
predefinedExports:
|
|
6174
|
+
predefinedExports: y.map((x) => ({
|
|
6175
6175
|
...x,
|
|
6176
6176
|
fields: x.fields.map((S) => {
|
|
6177
6177
|
const R = Mn(S.key), D = Nn(S.key, a.current)[R];
|
|
@@ -6186,39 +6186,39 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6186
6186
|
keysWithChilds: w
|
|
6187
6187
|
};
|
|
6188
6188
|
}, [t, e, c]), p = fe(
|
|
6189
|
-
async (
|
|
6189
|
+
async (y) => {
|
|
6190
6190
|
await E.getHandler().deleteObjects({
|
|
6191
6191
|
model: "ir.exports",
|
|
6192
|
-
ids: [
|
|
6192
|
+
ids: [y.id],
|
|
6193
6193
|
context: t
|
|
6194
6194
|
});
|
|
6195
6195
|
},
|
|
6196
6196
|
[t]
|
|
6197
6197
|
), h = fe(
|
|
6198
|
-
async (
|
|
6199
|
-
if (l.current.has(
|
|
6200
|
-
return l.current.get(
|
|
6198
|
+
async (y) => {
|
|
6199
|
+
if (l.current.has(y))
|
|
6200
|
+
return l.current.get(y);
|
|
6201
6201
|
const w = E.getHandler().getFields({
|
|
6202
|
-
model:
|
|
6202
|
+
model: y,
|
|
6203
6203
|
context: t,
|
|
6204
6204
|
fields: []
|
|
6205
6205
|
});
|
|
6206
|
-
l.current.set(
|
|
6206
|
+
l.current.set(y, w);
|
|
6207
6207
|
},
|
|
6208
6208
|
[l, t]
|
|
6209
|
-
),
|
|
6210
|
-
async (
|
|
6209
|
+
), g = fe(
|
|
6210
|
+
async (y) => {
|
|
6211
6211
|
const w = await h("ir.exports"), C = await h("ir.exports.line"), x = await E.getHandler().create({
|
|
6212
6212
|
model: "ir.exports",
|
|
6213
6213
|
values: {
|
|
6214
|
-
name:
|
|
6214
|
+
name: y.name,
|
|
6215
6215
|
resource: e
|
|
6216
6216
|
},
|
|
6217
6217
|
fields: w,
|
|
6218
6218
|
context: t
|
|
6219
6219
|
});
|
|
6220
6220
|
return await Promise.all(
|
|
6221
|
-
|
|
6221
|
+
y.fields.map(async (S) => await E.getHandler().create({
|
|
6222
6222
|
model: "ir.exports.line",
|
|
6223
6223
|
values: {
|
|
6224
6224
|
name: S.key,
|
|
@@ -6227,7 +6227,7 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6227
6227
|
fields: C,
|
|
6228
6228
|
context: t
|
|
6229
6229
|
}))
|
|
6230
|
-
), { ...
|
|
6230
|
+
), { ...y, id: x };
|
|
6231
6231
|
},
|
|
6232
6232
|
[t, h, e]
|
|
6233
6233
|
);
|
|
@@ -6236,7 +6236,7 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6236
6236
|
onGetFieldChilds: c,
|
|
6237
6237
|
onExport: u,
|
|
6238
6238
|
onGetPredefinedExports: m,
|
|
6239
|
-
onSavePredefinedExport:
|
|
6239
|
+
onSavePredefinedExport: g,
|
|
6240
6240
|
onRemovePredefinedExport: p
|
|
6241
6241
|
};
|
|
6242
6242
|
}, Vr = ({
|
|
@@ -6357,7 +6357,7 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6357
6357
|
onGetFields: m,
|
|
6358
6358
|
onGetPredefinedExports: p,
|
|
6359
6359
|
onSavePredefinedExport: h,
|
|
6360
|
-
onRemovePredefinedExport:
|
|
6360
|
+
onRemovePredefinedExport: g
|
|
6361
6361
|
} = hc({
|
|
6362
6362
|
model: i,
|
|
6363
6363
|
context: o,
|
|
@@ -6379,7 +6379,7 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6379
6379
|
visibleRegisters: u,
|
|
6380
6380
|
onGetPredefinedExports: p,
|
|
6381
6381
|
onSavePredefinedExport: h,
|
|
6382
|
-
onRemovePredefinedExport:
|
|
6382
|
+
onRemovePredefinedExport: g
|
|
6383
6383
|
}
|
|
6384
6384
|
);
|
|
6385
6385
|
}, Sc = (e) => {
|
|
@@ -6404,14 +6404,14 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6404
6404
|
const { ooui: t } = e, { required: n } = t;
|
|
6405
6405
|
return /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(_c, { ooui: t }) });
|
|
6406
6406
|
}, _c = (e) => {
|
|
6407
|
-
const { value: t, onChange: n, ooui: i } = e, { required: o, selectionValues: s, readOnly: a } = i,
|
|
6407
|
+
const { value: t, onChange: n, ooui: i } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = i, d = t == null ? void 0 : t.split(","), [u, f] = b([]), [c, m] = b();
|
|
6408
6408
|
return pe(() => {
|
|
6409
6409
|
if (!t) {
|
|
6410
|
-
|
|
6410
|
+
m(void 0), f([]);
|
|
6411
6411
|
return;
|
|
6412
6412
|
}
|
|
6413
|
-
const
|
|
6414
|
-
|
|
6413
|
+
const p = t && d && d[0], h = t && d && d[1] && parseInt(d[1]);
|
|
6414
|
+
f([h, void 0]), m(p);
|
|
6415
6415
|
}, [t]), /* @__PURE__ */ k(Oe, { gutter: 8, wrap: !1, children: [
|
|
6416
6416
|
/* @__PURE__ */ r(ue, { flex: "1", children: /* @__PURE__ */ r(
|
|
6417
6417
|
ao,
|
|
@@ -6422,14 +6422,14 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6422
6422
|
readonly: a,
|
|
6423
6423
|
required: o
|
|
6424
6424
|
}),
|
|
6425
|
-
onChange: (
|
|
6426
|
-
|
|
6427
|
-
let
|
|
6428
|
-
|
|
6429
|
-
const
|
|
6430
|
-
|
|
6425
|
+
onChange: (p) => {
|
|
6426
|
+
m(p);
|
|
6427
|
+
let h = u[0] || 0;
|
|
6428
|
+
p !== c && (f([]), h = 0);
|
|
6429
|
+
const g = `${p},${h}`;
|
|
6430
|
+
g !== t && (n == null || n(g));
|
|
6431
6431
|
},
|
|
6432
|
-
value:
|
|
6432
|
+
value: c
|
|
6433
6433
|
}
|
|
6434
6434
|
) }),
|
|
6435
6435
|
/* @__PURE__ */ r(ue, { flex: "3", children: /* @__PURE__ */ r(
|
|
@@ -6437,15 +6437,16 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6437
6437
|
{
|
|
6438
6438
|
ooui: new Br({
|
|
6439
6439
|
name: "object_value",
|
|
6440
|
-
relation:
|
|
6440
|
+
relation: c,
|
|
6441
6441
|
readonly: a,
|
|
6442
|
-
required: o
|
|
6442
|
+
required: o,
|
|
6443
|
+
domain: l
|
|
6443
6444
|
}),
|
|
6444
|
-
value:
|
|
6445
|
-
onChange: (
|
|
6446
|
-
|
|
6447
|
-
const
|
|
6448
|
-
|
|
6445
|
+
value: u,
|
|
6446
|
+
onChange: (p) => {
|
|
6447
|
+
f(p);
|
|
6448
|
+
const h = `${c},${p[0] || 0}`;
|
|
6449
|
+
h !== t && (n == null || n(h));
|
|
6449
6450
|
}
|
|
6450
6451
|
}
|
|
6451
6452
|
) })
|
|
@@ -6457,11 +6458,11 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6457
6458
|
const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Ic(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ae(null), { setFieldValue: f, getFieldValue: c } = ne(Be) || {}, { t: m } = we(), p = n ? Ns(n) : "", h = (x) => {
|
|
6458
6459
|
i == null || i(x);
|
|
6459
6460
|
};
|
|
6460
|
-
async function
|
|
6461
|
+
async function g() {
|
|
6461
6462
|
const x = await kt(n), S = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), V = c(a), D = c("name");
|
|
6462
6463
|
R.href = S, R.download = V || D, R.click();
|
|
6463
6464
|
}
|
|
6464
|
-
async function
|
|
6465
|
+
async function y() {
|
|
6465
6466
|
const x = await kt(n);
|
|
6466
6467
|
pn(n, x.mime);
|
|
6467
6468
|
}
|
|
@@ -6507,13 +6508,13 @@ const { useToken: dc } = He, { TextArea: kn } = it, uc = (e) => {
|
|
|
6507
6508
|
children: "Select"
|
|
6508
6509
|
}
|
|
6509
6510
|
),
|
|
6510
|
-
/* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(xi, {}), disabled: !n, onClick:
|
|
6511
|
+
/* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(xi, {}), disabled: !n, onClick: y, children: m("open") }),
|
|
6511
6512
|
/* @__PURE__ */ r(
|
|
6512
6513
|
ze,
|
|
6513
6514
|
{
|
|
6514
6515
|
tooltip: m("download"),
|
|
6515
6516
|
disabled: !n,
|
|
6516
|
-
onClick:
|
|
6517
|
+
onClick: g,
|
|
6517
6518
|
icon: /* @__PURE__ */ r(Kn, {})
|
|
6518
6519
|
}
|
|
6519
6520
|
),
|
|
@@ -6835,7 +6836,7 @@ function Mc(e) {
|
|
|
6835
6836
|
}
|
|
6836
6837
|
d(!1);
|
|
6837
6838
|
}
|
|
6838
|
-
}, [t, a]),
|
|
6839
|
+
}, [t, a]), g = fe(
|
|
6839
6840
|
async (w) => {
|
|
6840
6841
|
if (w.link) {
|
|
6841
6842
|
window.open(w.link);
|
|
@@ -6860,7 +6861,7 @@ function Mc(e) {
|
|
|
6860
6861
|
s(C);
|
|
6861
6862
|
},
|
|
6862
6863
|
[a, s]
|
|
6863
|
-
),
|
|
6864
|
+
), y = fe(
|
|
6864
6865
|
async (w) => {
|
|
6865
6866
|
s(w);
|
|
6866
6867
|
},
|
|
@@ -6878,8 +6879,8 @@ function Mc(e) {
|
|
|
6878
6879
|
loading: l,
|
|
6879
6880
|
onAddNewAttachment: i,
|
|
6880
6881
|
onListAllAttachments: o,
|
|
6881
|
-
onOpenAttachmentLink:
|
|
6882
|
-
onOpenAttachmentDetail:
|
|
6882
|
+
onOpenAttachmentLink: g,
|
|
6883
|
+
onOpenAttachmentDetail: y
|
|
6883
6884
|
}
|
|
6884
6885
|
),
|
|
6885
6886
|
/* @__PURE__ */ r(
|
|
@@ -6912,8 +6913,8 @@ function Nc({ toolbar: e }) {
|
|
|
6912
6913
|
currentModel: m,
|
|
6913
6914
|
setRemovingItem: p,
|
|
6914
6915
|
removingItem: h,
|
|
6915
|
-
duplicatingItem:
|
|
6916
|
-
setDuplicatingItem:
|
|
6916
|
+
duplicatingItem: g,
|
|
6917
|
+
setDuplicatingItem: y,
|
|
6917
6918
|
setResults: w,
|
|
6918
6919
|
formIsLoading: C,
|
|
6919
6920
|
attachments: x,
|
|
@@ -6985,7 +6986,7 @@ function Nc({ toolbar: e }) {
|
|
|
6985
6986
|
}
|
|
6986
6987
|
async function oe() {
|
|
6987
6988
|
try {
|
|
6988
|
-
|
|
6989
|
+
y == null || y(!0);
|
|
6989
6990
|
const I = await E.getHandler().duplicate({
|
|
6990
6991
|
id: l,
|
|
6991
6992
|
model: m,
|
|
@@ -6995,10 +6996,10 @@ function Nc({ toolbar: e }) {
|
|
|
6995
6996
|
} catch (I) {
|
|
6996
6997
|
on(JSON.stringify(I));
|
|
6997
6998
|
} finally {
|
|
6998
|
-
|
|
6999
|
+
y == null || y(!1);
|
|
6999
7000
|
}
|
|
7000
7001
|
}
|
|
7001
|
-
const U = a || h || C ||
|
|
7002
|
+
const U = a || h || C || g;
|
|
7002
7003
|
function $(I) {
|
|
7003
7004
|
v == null || v({
|
|
7004
7005
|
actionData: I,
|
|
@@ -7019,7 +7020,7 @@ function Nc({ toolbar: e }) {
|
|
|
7019
7020
|
/* @__PURE__ */ r(
|
|
7020
7021
|
Vo,
|
|
7021
7022
|
{
|
|
7022
|
-
disabled: a || C || h ||
|
|
7023
|
+
disabled: a || C || h || g
|
|
7023
7024
|
}
|
|
7024
7025
|
),
|
|
7025
7026
|
/* @__PURE__ */ r(
|
|
@@ -7037,8 +7038,8 @@ function Nc({ toolbar: e }) {
|
|
|
7037
7038
|
{
|
|
7038
7039
|
icon: /* @__PURE__ */ r(zn, {}),
|
|
7039
7040
|
tooltip: T("duplicate"),
|
|
7040
|
-
disabled: s || a || l === void 0 ||
|
|
7041
|
-
loading:
|
|
7041
|
+
disabled: s || a || l === void 0 || g || C,
|
|
7042
|
+
loading: g,
|
|
7042
7043
|
onClick: oe
|
|
7043
7044
|
}
|
|
7044
7045
|
),
|
|
@@ -7047,7 +7048,7 @@ function Nc({ toolbar: e }) {
|
|
|
7047
7048
|
{
|
|
7048
7049
|
icon: /* @__PURE__ */ r(Gn, {}),
|
|
7049
7050
|
tooltip: T("delete"),
|
|
7050
|
-
disabled: a || l === void 0 || h ||
|
|
7051
|
+
disabled: a || l === void 0 || h || g || C,
|
|
7051
7052
|
loading: h,
|
|
7052
7053
|
onClick: Z
|
|
7053
7054
|
}
|
|
@@ -7058,7 +7059,7 @@ function Nc({ toolbar: e }) {
|
|
|
7058
7059
|
{
|
|
7059
7060
|
icon: /* @__PURE__ */ r(Xr, {}),
|
|
7060
7061
|
tooltip: T("showLogs"),
|
|
7061
|
-
disabled: a || l === void 0 || h ||
|
|
7062
|
+
disabled: a || l === void 0 || h || g || C,
|
|
7062
7063
|
loading: !1,
|
|
7063
7064
|
onClick: () => {
|
|
7064
7065
|
Ao(m, l, T);
|
|
@@ -7070,7 +7071,7 @@ function Nc({ toolbar: e }) {
|
|
|
7070
7071
|
{
|
|
7071
7072
|
icon: /* @__PURE__ */ r(fn, {}),
|
|
7072
7073
|
tooltip: T("refresh"),
|
|
7073
|
-
disabled: a || l === void 0 || h ||
|
|
7074
|
+
disabled: a || l === void 0 || h || g || C,
|
|
7074
7075
|
loading: !1,
|
|
7075
7076
|
onClick: () => {
|
|
7076
7077
|
G(() => {
|
|
@@ -7252,9 +7253,9 @@ function Dr(e, t) {
|
|
|
7252
7253
|
};
|
|
7253
7254
|
}
|
|
7254
7255
|
const { useToken: Pc } = He, Do = (e) => {
|
|
7255
|
-
const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Pc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ne(Be), { elementHasLostFocus: m } = c || {}, [p, h] = b(!1), [
|
|
7256
|
+
const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Pc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ne(Be), { elementHasLostFocus: m } = c || {}, [p, h] = b(!1), [g, y] = b(!1);
|
|
7256
7257
|
pe(() => {
|
|
7257
|
-
l && !p &&
|
|
7258
|
+
l && !p && y(!1), !n && !l && (h(!0), y(!0));
|
|
7258
7259
|
}, [p, l]);
|
|
7259
7260
|
const w = (C) => {
|
|
7260
7261
|
i == null || i(C.target.value);
|
|
@@ -7265,7 +7266,7 @@ const { useToken: Pc } = He, Do = (e) => {
|
|
|
7265
7266
|
{
|
|
7266
7267
|
icon: /* @__PURE__ */ r(Yt, {}),
|
|
7267
7268
|
onClick: () => {
|
|
7268
|
-
o(n) && (h(!1),
|
|
7269
|
+
o(n) && (h(!1), y(!1));
|
|
7269
7270
|
},
|
|
7270
7271
|
style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
7271
7272
|
tabIndex: -1
|
|
@@ -7275,13 +7276,13 @@ const { useToken: Pc } = He, Do = (e) => {
|
|
|
7275
7276
|
{
|
|
7276
7277
|
icon: /* @__PURE__ */ r(Qr, {}),
|
|
7277
7278
|
onClick: () => {
|
|
7278
|
-
h(!0),
|
|
7279
|
+
h(!0), y(!0);
|
|
7279
7280
|
},
|
|
7280
7281
|
style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
7281
7282
|
tabIndex: -1
|
|
7282
7283
|
}
|
|
7283
7284
|
) }),
|
|
7284
|
-
/* @__PURE__ */ r(ue, { flex: "auto", children:
|
|
7285
|
+
/* @__PURE__ */ r(ue, { flex: "auto", children: g ? /* @__PURE__ */ r(
|
|
7285
7286
|
it,
|
|
7286
7287
|
{
|
|
7287
7288
|
style: {
|
|
@@ -7293,7 +7294,7 @@ const { useToken: Pc } = He, Do = (e) => {
|
|
|
7293
7294
|
onChange: w,
|
|
7294
7295
|
value: n,
|
|
7295
7296
|
onBlur: () => {
|
|
7296
|
-
o(n) && (h(!1),
|
|
7297
|
+
o(n) && (h(!1), y(!1), m == null || m());
|
|
7297
7298
|
}
|
|
7298
7299
|
}
|
|
7299
7300
|
) : /* @__PURE__ */ r(
|
|
@@ -7587,8 +7588,8 @@ const Uc = (e) => {
|
|
|
7587
7588
|
currentId: m = void 0,
|
|
7588
7589
|
results: p = void 0,
|
|
7589
7590
|
setSelectedRowItems: h = void 0,
|
|
7590
|
-
setSearchParams:
|
|
7591
|
-
searchVisible:
|
|
7591
|
+
setSearchParams: g = void 0,
|
|
7592
|
+
searchVisible: y = !0,
|
|
7592
7593
|
setSearchVisible: w = void 0,
|
|
7593
7594
|
sorter: C = void 0,
|
|
7594
7595
|
setSorter: x = void 0,
|
|
@@ -7614,7 +7615,7 @@ const Uc = (e) => {
|
|
|
7614
7615
|
setSelectedRowItems: h,
|
|
7615
7616
|
searchParams: T,
|
|
7616
7617
|
setSearchValues: v,
|
|
7617
|
-
setSearchParams:
|
|
7618
|
+
setSearchParams: g,
|
|
7618
7619
|
setSearchVisible: w,
|
|
7619
7620
|
setTreeIsLoading: V,
|
|
7620
7621
|
context: o,
|
|
@@ -7653,10 +7654,10 @@ const Uc = (e) => {
|
|
|
7653
7654
|
offset: N,
|
|
7654
7655
|
isSearching: B,
|
|
7655
7656
|
onSubmit: (ee) => {
|
|
7656
|
-
L(!1),
|
|
7657
|
+
L(!1), g == null || g(ee.params), w == null || w(!1);
|
|
7657
7658
|
},
|
|
7658
7659
|
searchError: q,
|
|
7659
|
-
searchVisible:
|
|
7660
|
+
searchVisible: y,
|
|
7660
7661
|
searchValues: _,
|
|
7661
7662
|
showLimitOptions: !1
|
|
7662
7663
|
}
|
|
@@ -7704,7 +7705,7 @@ const Uc = (e) => {
|
|
|
7704
7705
|
id: o,
|
|
7705
7706
|
parentContext: l,
|
|
7706
7707
|
onSubmitSucceed: (p, h) => {
|
|
7707
|
-
f.findIndex((
|
|
7708
|
+
f.findIndex((y) => y.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
|
|
7708
7709
|
}
|
|
7709
7710
|
}
|
|
7710
7711
|
)
|
|
@@ -8092,8 +8093,8 @@ function td(e) {
|
|
|
8092
8093
|
setCurrentItemIndex: m,
|
|
8093
8094
|
searchParams: p,
|
|
8094
8095
|
searchVisible: h,
|
|
8095
|
-
setSearchVisible:
|
|
8096
|
-
setSearchTreeNameSearch:
|
|
8096
|
+
setSearchVisible: g,
|
|
8097
|
+
setSearchTreeNameSearch: y,
|
|
8097
8098
|
searchTreeNameSearch: w,
|
|
8098
8099
|
treeIsLoading: C,
|
|
8099
8100
|
setPreviousView: x,
|
|
@@ -8177,7 +8178,7 @@ function td(e) {
|
|
|
8177
8178
|
disabled: l || a || C,
|
|
8178
8179
|
searchText: w,
|
|
8179
8180
|
onSearch: ($) => {
|
|
8180
|
-
$ && $.trim().length > 0 ?
|
|
8181
|
+
$ && $.trim().length > 0 ? y == null || y($) : y == null || y(void 0);
|
|
8181
8182
|
}
|
|
8182
8183
|
}
|
|
8183
8184
|
),
|
|
@@ -8193,7 +8194,7 @@ function td(e) {
|
|
|
8193
8194
|
tooltip: O("advanced_search"),
|
|
8194
8195
|
type: h ? "primary" : "default",
|
|
8195
8196
|
onClick: () => {
|
|
8196
|
-
|
|
8197
|
+
g == null || g(!h);
|
|
8197
8198
|
},
|
|
8198
8199
|
disabled: l || a || C,
|
|
8199
8200
|
badgeNumber: p == null ? void 0 : p.length
|
|
@@ -8403,7 +8404,7 @@ const nd = (e) => {
|
|
|
8403
8404
|
setCurrentView: c,
|
|
8404
8405
|
availableViews: m,
|
|
8405
8406
|
searchTreeNameSearch: p
|
|
8406
|
-
} = e, { currentView: h, setPreviousView:
|
|
8407
|
+
} = e, { currentView: h, setPreviousView: g } = ne(
|
|
8407
8408
|
rt
|
|
8408
8409
|
);
|
|
8409
8410
|
return t ? /* @__PURE__ */ k(Q, { children: [
|
|
@@ -8426,11 +8427,11 @@ const nd = (e) => {
|
|
|
8426
8427
|
formView: s,
|
|
8427
8428
|
treeView: a,
|
|
8428
8429
|
domain: l,
|
|
8429
|
-
onRowClicked: (
|
|
8430
|
-
const { id: w } =
|
|
8430
|
+
onRowClicked: (y) => {
|
|
8431
|
+
const { id: w } = y;
|
|
8431
8432
|
f(w);
|
|
8432
8433
|
const C = u.findIndex((S) => S.id === w);
|
|
8433
|
-
|
|
8434
|
+
g == null || g(h), d(C);
|
|
8434
8435
|
const x = m.find(
|
|
8435
8436
|
(S) => S.type === "form"
|
|
8436
8437
|
);
|
|
@@ -8564,8 +8565,8 @@ function ld(e, t) {
|
|
|
8564
8565
|
res_id: m = !1,
|
|
8565
8566
|
action_id: p,
|
|
8566
8567
|
action_type: h,
|
|
8567
|
-
treeExpandable:
|
|
8568
|
-
limit:
|
|
8568
|
+
treeExpandable: g = !1,
|
|
8569
|
+
limit: y
|
|
8569
8570
|
} = e, [w, C] = b(), [x, S] = b([]), [R, V] = b(!0), D = m || void 0, [F, T] = b(
|
|
8570
8571
|
D
|
|
8571
8572
|
), [_, v] = b([]), [O, A] = b(), [L, G] = b([]), [B, q] = b(), [N, Z] = b(0), [ee, oe] = b(!1), [U, $] = b(!1), [I, M] = b(), { t: K } = we(), le = ae(), z = ae(), re = ne(
|
|
@@ -8652,7 +8653,7 @@ function ld(e, t) {
|
|
|
8652
8653
|
case "tree": {
|
|
8653
8654
|
j.push({
|
|
8654
8655
|
...ie,
|
|
8655
|
-
isExpandable:
|
|
8656
|
+
isExpandable: g,
|
|
8656
8657
|
type: ye
|
|
8657
8658
|
});
|
|
8658
8659
|
break;
|
|
@@ -8759,7 +8760,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8759
8760
|
nd,
|
|
8760
8761
|
{
|
|
8761
8762
|
visible: w.type === j.type && w.view_id === j.view_id,
|
|
8762
|
-
limit:
|
|
8763
|
+
limit: y,
|
|
8763
8764
|
model: i,
|
|
8764
8765
|
context: o,
|
|
8765
8766
|
domain: n,
|
|
@@ -8838,7 +8839,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8838
8839
|
setSearchTreeNameSearch: M,
|
|
8839
8840
|
searchTreeNameSearch: I,
|
|
8840
8841
|
goToResourceId: _e,
|
|
8841
|
-
limit:
|
|
8842
|
+
limit: y,
|
|
8842
8843
|
children: [
|
|
8843
8844
|
We(),
|
|
8844
8845
|
/* @__PURE__ */ r(
|
|
@@ -8894,7 +8895,7 @@ async function cd({
|
|
|
8894
8895
|
h.push([R, S]);
|
|
8895
8896
|
}
|
|
8896
8897
|
}
|
|
8897
|
-
const [
|
|
8898
|
+
const [g, y] = h[0], w = { id: g, type: y };
|
|
8898
8899
|
return {
|
|
8899
8900
|
title: f,
|
|
8900
8901
|
actionId: e,
|
|
@@ -9004,7 +9005,7 @@ function pd(e) {
|
|
|
9004
9005
|
domain: s = [],
|
|
9005
9006
|
visible: a = !0,
|
|
9006
9007
|
parentContext: l = {}
|
|
9007
|
-
} = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h,
|
|
9008
|
+
} = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [C, x] = b(1), [S, R] = b(0), V = ae(St), D = ae([]), [F, T] = b(0), [_, v] = b([]), [O, A] = b(void 0), [L, G] = b(), [B, q] = b(), [N, Z] = b(), [ee, oe] = b(!1), U = ae([]), $ = (W) => {
|
|
9008
9009
|
oe(!0), x(W), R((W - 1) * V.current);
|
|
9009
9010
|
}, I = async () => {
|
|
9010
9011
|
const W = U.current.length > 0 ? U.current : s, ce = jt(D.current, W), { colors: Te } = At(h), { totalItems: Ee, results: Me, attrsEvaluated: Ne } = await E.getHandler().searchForTree({
|
|
@@ -9020,7 +9021,7 @@ function pd(e) {
|
|
|
9020
9021
|
const me = Dt({
|
|
9021
9022
|
resultsToSort: Me,
|
|
9022
9023
|
sorter: L,
|
|
9023
|
-
fields: { ...h.fields, ...
|
|
9024
|
+
fields: { ...h.fields, ...y.fields }
|
|
9024
9025
|
});
|
|
9025
9026
|
oe(!1), v(me);
|
|
9026
9027
|
const Fe = await Ee;
|
|
@@ -9049,7 +9050,7 @@ function pd(e) {
|
|
|
9049
9050
|
action: t,
|
|
9050
9051
|
context: l
|
|
9051
9052
|
});
|
|
9052
|
-
U.current = W.domain, w(W.views.get("form")),
|
|
9053
|
+
U.current = W.domain, w(W.views.get("form")), g(W.views.get("tree")), p(W.model), V.current = W.limit;
|
|
9053
9054
|
}, z = async () => {
|
|
9054
9055
|
p(n);
|
|
9055
9056
|
const W = await E.getHandler().getView({
|
|
@@ -9064,7 +9065,7 @@ function pd(e) {
|
|
|
9064
9065
|
id: i,
|
|
9065
9066
|
context: l
|
|
9066
9067
|
});
|
|
9067
|
-
|
|
9068
|
+
g(ce);
|
|
9068
9069
|
};
|
|
9069
9070
|
pe(() => {
|
|
9070
9071
|
t ? K("action") : n && K("model");
|
|
@@ -9076,7 +9077,7 @@ function pd(e) {
|
|
|
9076
9077
|
model: m,
|
|
9077
9078
|
treeView: h
|
|
9078
9079
|
});
|
|
9079
|
-
}, ve = () => !h || !
|
|
9080
|
+
}, ve = () => !h || !y ? null : /* @__PURE__ */ k("div", { style: { overflowY: "scroll" }, children: [
|
|
9080
9081
|
B && /* @__PURE__ */ r(Qe, { className: "mt-10", message: B, type: "error", banner: !0 }),
|
|
9081
9082
|
/* @__PURE__ */ r(
|
|
9082
9083
|
Xt,
|
|
@@ -9097,7 +9098,7 @@ function pd(e) {
|
|
|
9097
9098
|
const ce = Dt({
|
|
9098
9099
|
resultsToSort: _,
|
|
9099
9100
|
sorter: W,
|
|
9100
|
-
fields: { ...h.fields, ...
|
|
9101
|
+
fields: { ...h.fields, ...y.fields }
|
|
9101
9102
|
});
|
|
9102
9103
|
v(ce);
|
|
9103
9104
|
},
|
|
@@ -9127,7 +9128,7 @@ function yd(e, t) {
|
|
|
9127
9128
|
setIsLoading: m,
|
|
9128
9129
|
openAction: p,
|
|
9129
9130
|
moveItemsEnabled: h
|
|
9130
|
-
} = ne(or),
|
|
9131
|
+
} = ne(or), g = ae(), y = ae(), [w] = tt(E.getHandler().getView), [C] = tt(
|
|
9131
9132
|
E.getHandler().readObjects
|
|
9132
9133
|
), [x] = tt(E.getHandler().update);
|
|
9133
9134
|
pe(() => {
|
|
@@ -9142,7 +9143,7 @@ function yd(e, t) {
|
|
|
9142
9143
|
u(!0), m(!0), c(void 0);
|
|
9143
9144
|
try {
|
|
9144
9145
|
const v = await R(), O = await D(v), A = v.fields[Rn].relation, L = O[Rn].items;
|
|
9145
|
-
|
|
9146
|
+
y.current = v.fields;
|
|
9146
9147
|
const G = await V({
|
|
9147
9148
|
items: L,
|
|
9148
9149
|
model: A,
|
|
@@ -9165,17 +9166,17 @@ function yd(e, t) {
|
|
|
9165
9166
|
model: O,
|
|
9166
9167
|
context: A
|
|
9167
9168
|
}) {
|
|
9168
|
-
|
|
9169
|
+
g.current = (await w({
|
|
9169
9170
|
model: O,
|
|
9170
9171
|
type: "form",
|
|
9171
9172
|
context: A
|
|
9172
9173
|
})).fields;
|
|
9173
9174
|
const [L] = await Zn({
|
|
9174
9175
|
treeView: {
|
|
9175
|
-
fields:
|
|
9176
|
+
fields: g.current
|
|
9176
9177
|
},
|
|
9177
9178
|
formView: {
|
|
9178
|
-
fields:
|
|
9179
|
+
fields: g.current
|
|
9179
9180
|
},
|
|
9180
9181
|
model: O,
|
|
9181
9182
|
items: v,
|
|
@@ -9238,14 +9239,14 @@ function yd(e, t) {
|
|
|
9238
9239
|
}
|
|
9239
9240
|
};
|
|
9240
9241
|
}), G = {
|
|
9241
|
-
fields:
|
|
9242
|
+
fields: g.current,
|
|
9242
9243
|
items: L
|
|
9243
9244
|
};
|
|
9244
9245
|
await x({
|
|
9245
9246
|
model: n,
|
|
9246
9247
|
id: o,
|
|
9247
9248
|
values: { [Rn]: G },
|
|
9248
|
-
fields:
|
|
9249
|
+
fields: y.current,
|
|
9249
9250
|
context: i
|
|
9250
9251
|
});
|
|
9251
9252
|
}
|
|
@@ -9382,7 +9383,7 @@ const wd = yt(yd), vd = (e) => {
|
|
|
9382
9383
|
const { ooui: t } = e;
|
|
9383
9384
|
return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(bd, { ooui: t }) });
|
|
9384
9385
|
}, bd = (e) => {
|
|
9385
|
-
const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field:
|
|
9386
|
+
const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = n, w = ne(Be), { getContext: C } = w || {};
|
|
9386
9387
|
Ft(() => {
|
|
9387
9388
|
S();
|
|
9388
9389
|
}, [o]);
|
|
@@ -9410,10 +9411,10 @@ const wd = yt(yd), vd = (e) => {
|
|
|
9410
9411
|
const _ = (await E.getHandler().search({
|
|
9411
9412
|
model: m,
|
|
9412
9413
|
params: F,
|
|
9413
|
-
fieldsToRetrieve: [
|
|
9414
|
+
fieldsToRetrieve: [g],
|
|
9414
9415
|
context: { ...C == null ? void 0 : C(), ...p }
|
|
9415
9416
|
})).map((v) => {
|
|
9416
|
-
const O = v[
|
|
9417
|
+
const O = v[g];
|
|
9417
9418
|
let A = O;
|
|
9418
9419
|
return Array.isArray(O) && (A = O[1]), { label: A, value: v.id };
|
|
9419
9420
|
});
|
|
@@ -9447,7 +9448,7 @@ const wd = yt(yd), vd = (e) => {
|
|
|
9447
9448
|
disabled: h,
|
|
9448
9449
|
onChange: D,
|
|
9449
9450
|
style: { width: "100%" },
|
|
9450
|
-
children: /* @__PURE__ */ r(Oe, { children: a.map((F) => /* @__PURE__ */ r(ue, { span: Math.floor(24 /
|
|
9451
|
+
children: /* @__PURE__ */ r(Oe, { children: a.map((F) => /* @__PURE__ */ r(ue, { span: Math.floor(24 / y), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
|
|
9451
9452
|
}
|
|
9452
9453
|
),
|
|
9453
9454
|
!h && /* @__PURE__ */ k(Ue, { children: [
|
|
@@ -9673,7 +9674,7 @@ function Hd(e, t) {
|
|
|
9673
9674
|
limit: oe
|
|
9674
9675
|
});
|
|
9675
9676
|
}
|
|
9676
|
-
function
|
|
9677
|
+
function g({
|
|
9677
9678
|
title: S,
|
|
9678
9679
|
content: R,
|
|
9679
9680
|
key: V,
|
|
@@ -9691,7 +9692,7 @@ function Hd(e, t) {
|
|
|
9691
9692
|
}
|
|
9692
9693
|
]), o(V);
|
|
9693
9694
|
}
|
|
9694
|
-
async function
|
|
9695
|
+
async function y({
|
|
9695
9696
|
relateData: S,
|
|
9696
9697
|
fields: R,
|
|
9697
9698
|
values: V,
|
|
@@ -9852,7 +9853,7 @@ function Hd(e, t) {
|
|
|
9852
9853
|
});
|
|
9853
9854
|
} else {
|
|
9854
9855
|
const Z = _ && Array.isArray(_.id) ? { ..._, id: _.id[0] } : _;
|
|
9855
|
-
|
|
9856
|
+
g({
|
|
9856
9857
|
title: F,
|
|
9857
9858
|
action: {
|
|
9858
9859
|
id: v,
|
|
@@ -9887,7 +9888,7 @@ function Hd(e, t) {
|
|
|
9887
9888
|
{
|
|
9888
9889
|
openShortcut: w,
|
|
9889
9890
|
openAction: x,
|
|
9890
|
-
openRelate:
|
|
9891
|
+
openRelate: y,
|
|
9891
9892
|
openDefaultActionForModel: C,
|
|
9892
9893
|
tabs: d,
|
|
9893
9894
|
activeKey: i,
|
|
@@ -10023,8 +10024,8 @@ const { useToken: Yd } = He, Pu = (e) => {
|
|
|
10023
10024
|
ut
|
|
10024
10025
|
), {
|
|
10025
10026
|
openShortcut: h,
|
|
10026
|
-
tabs:
|
|
10027
|
-
activeKey:
|
|
10027
|
+
tabs: g,
|
|
10028
|
+
activeKey: y,
|
|
10028
10029
|
currentView: w,
|
|
10029
10030
|
currentId: C,
|
|
10030
10031
|
openDefaultActionForModel: x
|
|
@@ -10088,7 +10089,7 @@ const { useToken: Yd } = He, Pu = (e) => {
|
|
|
10088
10089
|
else {
|
|
10089
10090
|
if (!w)
|
|
10090
10091
|
return;
|
|
10091
|
-
const v =
|
|
10092
|
+
const v = g.find((B) => B.key === y), { id: O, type: A } = (v == null ? void 0 : v.action) || {}, L = w.view_id;
|
|
10092
10093
|
let G = !1;
|
|
10093
10094
|
if (!O || !A) {
|
|
10094
10095
|
l(!1);
|
|
@@ -10103,7 +10104,7 @@ const { useToken: Yd } = He, Pu = (e) => {
|
|
|
10103
10104
|
}
|
|
10104
10105
|
await T(), l(!a);
|
|
10105
10106
|
}, [
|
|
10106
|
-
|
|
10107
|
+
y,
|
|
10107
10108
|
C,
|
|
10108
10109
|
d,
|
|
10109
10110
|
w,
|
|
@@ -10111,7 +10112,7 @@ const { useToken: Yd } = He, Pu = (e) => {
|
|
|
10111
10112
|
a,
|
|
10112
10113
|
i,
|
|
10113
10114
|
o,
|
|
10114
|
-
|
|
10115
|
+
g
|
|
10115
10116
|
]);
|
|
10116
10117
|
return /* @__PURE__ */ r(
|
|
10117
10118
|
Ni,
|