@gisce/react-ooui 2.3.3 → 2.3.4
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
|
@@ -2,16 +2,16 @@ var zo = Object.defineProperty;
|
|
|
2
2
|
var Jo = (e, t, n) => t in e ? zo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var ar = (e, t, n) => (Jo(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsxs as k, jsx as r, Fragment as X } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Label as
|
|
5
|
+
import nt, { useContext as ne, useState as b, useEffect as pe, useRef as le, createContext as Xo, forwardRef as yt, useImperativeHandle as wt, useCallback as fe, Fragment as Ar, useMemo as De, memo as Dr } from "react";
|
|
6
|
+
import { Tooltip as gt, theme as He, Typography as Wt, Form as ct, Row as _e, Col as de, Modal as ze, Button as ke, Dropdown as Qo, Menu as lr, Spin as Le, Divider as cn, Space as Ue, Input as it, Select as Tt, Checkbox as Bt, Alert as Xe, Timeline as _n, Statistic as Zo, Card as Pn, Tag as kr, message as xn, DatePicker as Ln, TimePicker as ei, InputNumber as Er, Progress as ti, Avatar as Nr, Pagination as ni, Badge as ri, Tabs as Mr, Popover as oi, Radio as cr, Switch as ii, Steps as dr, Layout as si } from "antd";
|
|
7
|
+
import { Label as Et, Field as On, Tree as Pr, Reference as ai, Selection as $n, Many2one as Lr, Boolean as li, Container as ci, parseContext as xt, Form as $r, Integer as In, SearchFieldTypes as pt, SearchFilter as di, parseContextFields as ui, parseDomainFields as fi, transformDomainForChildWidget as Br, graphProcessor as Hr, parseGraph as Bn, graphFieldUtils as mi } from "@gisce/ooui";
|
|
8
8
|
import * as ur from "@ant-design/icons";
|
|
9
|
-
import Kr, { QuestionCircleOutlined as jr, ExclamationCircleOutlined as
|
|
9
|
+
import Kr, { QuestionCircleOutlined as jr, ExclamationCircleOutlined as vt, LoadingOutlined as st, DownOutlined as dn, WarningOutlined as Wr, CloseOutlined as Ut, CheckOutlined as Yt, TranslationOutlined as Ur, FolderOpenOutlined as Hn, DownloadOutlined as Kn, ClearOutlined as jn, StarFilled as hi, StarOutlined as pi, UpOutlined as gi, SearchOutlined as Wn, ThunderboltOutlined as Un, PrinterOutlined as Yn, EnterOutlined as Yr, PlusSquareOutlined as yi, MinusSquareOutlined as wi, FileAddOutlined as un, AlignLeftOutlined as vi, ApiOutlined as bi, DeleteOutlined as Gn, LeftOutlined as Gr, RightOutlined as qr, EyeOutlined as Ci, FormOutlined as Ht, TableOutlined as qn, AreaChartOutlined as xi, CalendarOutlined as Si, LinkOutlined as zr, SaveOutlined as Ti, CopyOutlined as zn, InfoCircleOutlined as Jr, ReloadOutlined as fn, EditOutlined as Xr, FilterOutlined as Qr, CloseCircleFilled as Fi, BorderOuterOutlined as Ri, SettingOutlined as _i, ExportOutlined as Oi } from "@ant-design/icons";
|
|
10
10
|
import { Interweave as Jn } from "interweave";
|
|
11
|
-
import { useLocale as
|
|
11
|
+
import { useLocale as ge, Many2OneSuffix as Ii, Many2OneSuffixModal as fr, FieldSet as Vi, ExportModal as Ai, Dropdown as Di, DropdownButton as Vt, FormigaConfigProvider as ki, mergeStrings as Ei, FavouriteButton as Ni } from "@gisce/react-formiga-components";
|
|
12
12
|
import * as mr from "@tabler/icons-react";
|
|
13
13
|
import Mi from "antd/lib/input/TextArea";
|
|
14
|
-
import
|
|
14
|
+
import Nt from "styled-components";
|
|
15
15
|
import Xn from "react-measure";
|
|
16
16
|
import Pi from "lodash/debounce";
|
|
17
17
|
import Vn from "antd/lib/typography/Title";
|
|
@@ -26,7 +26,7 @@ import Ui from "dayjs/plugin/duration";
|
|
|
26
26
|
import Yi from "dayjs/plugin/relativeTime";
|
|
27
27
|
import Gi from "dayjs/plugin/weekday";
|
|
28
28
|
import qi from "dayjs/plugin/localeData";
|
|
29
|
-
import
|
|
29
|
+
import Ft from "use-deep-compare-effect";
|
|
30
30
|
import { Table as zi } from "@gisce/react-formiga-table";
|
|
31
31
|
import Ji from "antd/es/typography/Link";
|
|
32
32
|
import { fileTypeFromBuffer as Xi } from "file-type-buffer-browser";
|
|
@@ -42,7 +42,7 @@ import ss from "@monaco-editor/react";
|
|
|
42
42
|
import as from "md5";
|
|
43
43
|
import { WidthProvider as ls, Responsive as cs } from "react-grid-layout";
|
|
44
44
|
import "react-grid-layout/css/styles.css";
|
|
45
|
-
const { Text: ds, Title: us } =
|
|
45
|
+
const { Text: ds, Title: us } = Wt, { useToken: fs } = He, ms = {
|
|
46
46
|
left: "justify-start",
|
|
47
47
|
center: "justify-center",
|
|
48
48
|
right: "justify-end"
|
|
@@ -53,7 +53,7 @@ const { Text: ds, Title: us } = Ut, { useToken: fs } = He, ms = {
|
|
|
53
53
|
{
|
|
54
54
|
className: `flex flex-row items-center pb-1 pt-1 ${ms[m]}`,
|
|
55
55
|
children: [
|
|
56
|
-
s && /* @__PURE__ */ r(
|
|
56
|
+
s && /* @__PURE__ */ r(gt, { title: s, children: /* @__PURE__ */ r(
|
|
57
57
|
jr,
|
|
58
58
|
{
|
|
59
59
|
className: "pr-1 text-xs",
|
|
@@ -67,7 +67,7 @@ const { Text: ds, Title: us } = Ut, { useToken: fs } = He, ms = {
|
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
};
|
|
70
|
-
function
|
|
70
|
+
function Ce({
|
|
71
71
|
ooui: e,
|
|
72
72
|
children: t,
|
|
73
73
|
layout: n = "horizontal",
|
|
@@ -78,7 +78,7 @@ function xe({
|
|
|
78
78
|
type: l,
|
|
79
79
|
validator: d
|
|
80
80
|
}) {
|
|
81
|
-
const { id: u, label: f, tooltip: c } = e, { t: m } =
|
|
81
|
+
const { id: u, label: f, tooltip: c } = e, { t: m } = ge(), p = a ? [
|
|
82
82
|
{
|
|
83
83
|
required: !0,
|
|
84
84
|
message: m("fillRequiredField"),
|
|
@@ -86,7 +86,7 @@ function xe({
|
|
|
86
86
|
validator: d
|
|
87
87
|
}
|
|
88
88
|
] : void 0, h = () => /* @__PURE__ */ r(
|
|
89
|
-
|
|
89
|
+
ct.Item,
|
|
90
90
|
{
|
|
91
91
|
className: "mb-0",
|
|
92
92
|
name: u,
|
|
@@ -101,7 +101,7 @@ function xe({
|
|
|
101
101
|
const g = /* @__PURE__ */ r(
|
|
102
102
|
mn,
|
|
103
103
|
{
|
|
104
|
-
ooui: new
|
|
104
|
+
ooui: new Et({
|
|
105
105
|
name: u + "_label",
|
|
106
106
|
string: f,
|
|
107
107
|
help: e.tooltipInline ? !1 : c,
|
|
@@ -118,21 +118,21 @@ function xe({
|
|
|
118
118
|
h()
|
|
119
119
|
] }))();
|
|
120
120
|
}
|
|
121
|
-
const { confirm: hs } = ze,
|
|
121
|
+
const { confirm: hs } = ze, Gt = ({
|
|
122
122
|
onOk: e,
|
|
123
123
|
confirmMessage: t,
|
|
124
124
|
t: n
|
|
125
125
|
}) => {
|
|
126
126
|
hs({
|
|
127
127
|
title: n("confirmation"),
|
|
128
|
-
icon: /* @__PURE__ */ r(
|
|
128
|
+
icon: /* @__PURE__ */ r(vt, {}),
|
|
129
129
|
centered: !0,
|
|
130
130
|
content: t,
|
|
131
131
|
okText: n("ok"),
|
|
132
132
|
cancelText: n("cancel"),
|
|
133
133
|
onOk: e
|
|
134
134
|
});
|
|
135
|
-
}, Be =
|
|
135
|
+
}, Be = nt.createContext(null), ps = (e) => {
|
|
136
136
|
const {
|
|
137
137
|
children: t,
|
|
138
138
|
activeId: n,
|
|
@@ -264,7 +264,7 @@ const { confirm: hs } = ze, qt = ({
|
|
|
264
264
|
STOCK_CLEAR: "CloseSquare",
|
|
265
265
|
STOCK_UNINDENT: "AlignLeft",
|
|
266
266
|
STOCK_PREFERENCES: "Setting"
|
|
267
|
-
},
|
|
267
|
+
}, dt = (e, t) => (e.indexOf("gtk-") !== -1 && (e = `STOCK_${e.replace("gtk-", "").replace(/\-/g, "_").toUpperCase()}`), hr.hasOwnProperty(e) ? pr(hr[e], t) : pr(e, t));
|
|
268
268
|
function gs(e) {
|
|
269
269
|
return `${e.split("-").map(
|
|
270
270
|
(t) => t.replace(
|
|
@@ -278,19 +278,19 @@ function pr(e, t) {
|
|
|
278
278
|
n.indexOf("-") !== -1 && (n = gs(n));
|
|
279
279
|
const i = `${n}Outlined`;
|
|
280
280
|
if (ur[i])
|
|
281
|
-
return () =>
|
|
281
|
+
return () => nt.createElement(ur[i], {
|
|
282
282
|
...t
|
|
283
283
|
});
|
|
284
284
|
const o = `Icon${n}`;
|
|
285
285
|
if (mr[o]) {
|
|
286
286
|
const s = () => {
|
|
287
287
|
var l;
|
|
288
|
-
return
|
|
288
|
+
return nt.createElement(mr[o], {
|
|
289
289
|
fill: "transparent",
|
|
290
290
|
size: ((l = t == null ? void 0 : t.style) == null ? void 0 : l.fontSize) || 17
|
|
291
291
|
});
|
|
292
292
|
};
|
|
293
|
-
return () =>
|
|
293
|
+
return () => nt.createElement(Kr, {
|
|
294
294
|
component: s,
|
|
295
295
|
...t
|
|
296
296
|
});
|
|
@@ -306,13 +306,13 @@ const eo = (e) => {
|
|
|
306
306
|
icon: l,
|
|
307
307
|
context: d,
|
|
308
308
|
readOnly: u
|
|
309
|
-
} = t, f =
|
|
309
|
+
} = t, f = ne(Be), { executeButtonAction: c } = f || {}, [m, p] = b(!1), { t: h } = ge();
|
|
310
310
|
async function g() {
|
|
311
311
|
p(!0), await c({ type: s, action: n, context: d }), p(!1);
|
|
312
312
|
}
|
|
313
313
|
function y() {
|
|
314
314
|
if (a) {
|
|
315
|
-
|
|
315
|
+
Gt({
|
|
316
316
|
confirmMessage: a,
|
|
317
317
|
t: h,
|
|
318
318
|
onOk: () => {
|
|
@@ -327,12 +327,12 @@ const eo = (e) => {
|
|
|
327
327
|
if (m)
|
|
328
328
|
return /* @__PURE__ */ r(st, {});
|
|
329
329
|
if (l) {
|
|
330
|
-
const x =
|
|
330
|
+
const x = dt(l);
|
|
331
331
|
return x && /* @__PURE__ */ r(x, {});
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
return /* @__PURE__ */ r(
|
|
335
|
-
|
|
334
|
+
return /* @__PURE__ */ r(Ce, { ooui: t, children: /* @__PURE__ */ r(
|
|
335
|
+
ke,
|
|
336
336
|
{
|
|
337
337
|
block: !0,
|
|
338
338
|
disabled: !o || u || m,
|
|
@@ -355,12 +355,12 @@ const eo = (e) => {
|
|
|
355
355
|
primary: f,
|
|
356
356
|
context: c,
|
|
357
357
|
readOnly: m
|
|
358
|
-
} = n || {}, p =
|
|
358
|
+
} = n || {}, p = ne(Be), { executeButtonAction: h } = p || {}, [g, y] = b(!1), { t: w } = ge();
|
|
359
359
|
function x() {
|
|
360
360
|
if (g)
|
|
361
361
|
return /* @__PURE__ */ r(st, {});
|
|
362
362
|
if (u) {
|
|
363
|
-
const R =
|
|
363
|
+
const R = dt(u);
|
|
364
364
|
return R && /* @__PURE__ */ r(R, {});
|
|
365
365
|
}
|
|
366
366
|
}
|
|
@@ -369,7 +369,7 @@ const eo = (e) => {
|
|
|
369
369
|
}
|
|
370
370
|
function C() {
|
|
371
371
|
if (d) {
|
|
372
|
-
|
|
372
|
+
Gt({
|
|
373
373
|
confirmMessage: d,
|
|
374
374
|
t: w,
|
|
375
375
|
onOk: () => {
|
|
@@ -383,7 +383,7 @@ const eo = (e) => {
|
|
|
383
383
|
if (t.buttons.length === 0)
|
|
384
384
|
return null;
|
|
385
385
|
if (t.buttons.length > 1)
|
|
386
|
-
return /* @__PURE__ */ r(
|
|
386
|
+
return /* @__PURE__ */ r(Ce, { ooui: new On({ ooui: t }), children: /* @__PURE__ */ k(
|
|
387
387
|
Qo.Button,
|
|
388
388
|
{
|
|
389
389
|
disabled: !a || m,
|
|
@@ -406,7 +406,7 @@ const eo = (e) => {
|
|
|
406
406
|
if (n)
|
|
407
407
|
return /* @__PURE__ */ r(eo, { ooui: n });
|
|
408
408
|
}, ws = (e) => {
|
|
409
|
-
const { t } =
|
|
409
|
+
const { t } = ge(), { ooui: n, executeButtonAction: i } = e;
|
|
410
410
|
if (!n)
|
|
411
411
|
return null;
|
|
412
412
|
const o = n.map((s) => {
|
|
@@ -426,7 +426,7 @@ const eo = (e) => {
|
|
|
426
426
|
}
|
|
427
427
|
function x() {
|
|
428
428
|
if (f) {
|
|
429
|
-
|
|
429
|
+
Gt({
|
|
430
430
|
confirmMessage: f,
|
|
431
431
|
t,
|
|
432
432
|
onOk: () => {
|
|
@@ -441,7 +441,7 @@ const eo = (e) => {
|
|
|
441
441
|
if (g)
|
|
442
442
|
return /* @__PURE__ */ r(st, {});
|
|
443
443
|
if (c) {
|
|
444
|
-
const C =
|
|
444
|
+
const C = dt(c);
|
|
445
445
|
return C && /* @__PURE__ */ r(C, {});
|
|
446
446
|
}
|
|
447
447
|
}
|
|
@@ -470,7 +470,7 @@ function hn() {
|
|
|
470
470
|
const [e, t] = b(
|
|
471
471
|
gr()
|
|
472
472
|
);
|
|
473
|
-
return
|
|
473
|
+
return pe(() => {
|
|
474
474
|
function n() {
|
|
475
475
|
t(gr());
|
|
476
476
|
}
|
|
@@ -482,18 +482,18 @@ function hn() {
|
|
|
482
482
|
height: e.height
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const It = class It {
|
|
486
486
|
static init(t) {
|
|
487
|
-
|
|
487
|
+
It.handler = t;
|
|
488
488
|
}
|
|
489
489
|
static getHandler() {
|
|
490
|
-
if (!
|
|
490
|
+
if (!It.handler)
|
|
491
491
|
throw "Must call init() first with a valid ConnectionProvider instance";
|
|
492
|
-
return
|
|
492
|
+
return It.handler;
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
|
-
ar(
|
|
496
|
-
let E =
|
|
495
|
+
ar(It, "handler");
|
|
496
|
+
let E = It;
|
|
497
497
|
const to = (e) => {
|
|
498
498
|
let t, n, i;
|
|
499
499
|
if (typeof e == "string" && e.indexOf(" -- ") !== -1 && e.indexOf(`
|
|
@@ -516,13 +516,13 @@ const to = (e) => {
|
|
|
516
516
|
const { message: t, type: n, title: i } = to(e);
|
|
517
517
|
(n === "error" ? bs : Cs)({
|
|
518
518
|
title: i,
|
|
519
|
-
icon: n === "error" ? /* @__PURE__ */ r(
|
|
519
|
+
icon: n === "error" ? /* @__PURE__ */ r(vt, {}) : /* @__PURE__ */ r(Wr, {}),
|
|
520
520
|
centered: !0,
|
|
521
521
|
content: t
|
|
522
522
|
});
|
|
523
523
|
}, no = (e) => {
|
|
524
|
-
const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } =
|
|
525
|
-
|
|
524
|
+
const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = ge(), [u, f] = b([]), [c, m] = b(!1), [p, h] = b(!1), [g, y] = b({}), w = le();
|
|
525
|
+
pe(() => {
|
|
526
526
|
t ? x() : y({});
|
|
527
527
|
}, [t]);
|
|
528
528
|
async function x() {
|
|
@@ -602,18 +602,18 @@ const to = (e) => {
|
|
|
602
602
|
/* @__PURE__ */ r(cn, {}),
|
|
603
603
|
/* @__PURE__ */ r(_e, { justify: "end", children: /* @__PURE__ */ k(Ue, { children: [
|
|
604
604
|
/* @__PURE__ */ r(
|
|
605
|
-
|
|
605
|
+
ke,
|
|
606
606
|
{
|
|
607
|
-
icon: /* @__PURE__ */ r(
|
|
607
|
+
icon: /* @__PURE__ */ r(Ut, {}),
|
|
608
608
|
onClick: n,
|
|
609
609
|
disabled: p,
|
|
610
610
|
children: d("cancel")
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
613
|
/* @__PURE__ */ r(
|
|
614
|
-
|
|
614
|
+
ke,
|
|
615
615
|
{
|
|
616
|
-
icon: p ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(
|
|
616
|
+
icon: p ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(Yt, {}),
|
|
617
617
|
disabled: p,
|
|
618
618
|
onClick: V,
|
|
619
619
|
style: { marginLeft: 15 },
|
|
@@ -642,16 +642,16 @@ const to = (e) => {
|
|
|
642
642
|
};
|
|
643
643
|
function qe(e) {
|
|
644
644
|
const { tooltip: t, ...n } = e;
|
|
645
|
-
return /* @__PURE__ */ r(
|
|
645
|
+
return /* @__PURE__ */ r(gt, { title: t, children: /* @__PURE__ */ r(ke, { ...n }) });
|
|
646
646
|
}
|
|
647
|
-
const { info: xs } = ze,
|
|
647
|
+
const { info: xs } = ze, ht = (e) => {
|
|
648
648
|
xs({
|
|
649
649
|
title: "",
|
|
650
650
|
centered: !0,
|
|
651
651
|
content: e
|
|
652
652
|
});
|
|
653
653
|
}, { useToken: Ss } = He, ro = (e) => {
|
|
654
|
-
const { ooui: t, isSearchField: n = !1 } = e, { id: i, readOnly: o, isPassword: s, required: a, translatable: l } = t, { token: d } = Ss(), u = a && !o ? { backgroundColor: d.colorPrimaryBg } : void 0, f =
|
|
654
|
+
const { ooui: t, isSearchField: n = !1 } = e, { id: i, readOnly: o, isPassword: s, required: a, translatable: l } = t, { token: d } = Ss(), u = a && !o ? { backgroundColor: d.colorPrimaryBg } : void 0, f = ne(Be), { elementHasLostFocus: c } = f || {};
|
|
655
655
|
let m = /* @__PURE__ */ r(
|
|
656
656
|
it,
|
|
657
657
|
{
|
|
@@ -669,27 +669,27 @@ const { info: xs } = ze, ft = (e) => {
|
|
|
669
669
|
id: i,
|
|
670
670
|
onBlur: c
|
|
671
671
|
}
|
|
672
|
-
)), l && !o && !n && (m = /* @__PURE__ */ r(Ts, { field: i, requiredStyle: u })), /* @__PURE__ */ r(
|
|
672
|
+
)), l && !o && !n && (m = /* @__PURE__ */ r(Ts, { field: i, requiredStyle: u })), /* @__PURE__ */ r(Ce, { required: a, ...e, children: m });
|
|
673
673
|
}, Ts = ({
|
|
674
674
|
value: e,
|
|
675
675
|
field: t,
|
|
676
676
|
requiredStyle: n,
|
|
677
677
|
onChange: i
|
|
678
678
|
}) => {
|
|
679
|
-
const o =
|
|
679
|
+
const o = ne(Be), {
|
|
680
680
|
activeId: s,
|
|
681
681
|
activeModel: a,
|
|
682
682
|
fetchValues: l,
|
|
683
683
|
formHasChanges: d,
|
|
684
684
|
elementHasLostFocus: u
|
|
685
|
-
} = o || {}, [f, c] = b(!1), { t: m } =
|
|
685
|
+
} = o || {}, [f, c] = b(!1), { t: m } = ge();
|
|
686
686
|
return s ? /* @__PURE__ */ k(X, { children: [
|
|
687
687
|
/* @__PURE__ */ r(
|
|
688
688
|
"div",
|
|
689
689
|
{
|
|
690
690
|
onClick: () => {
|
|
691
691
|
if (d != null && d()) {
|
|
692
|
-
|
|
692
|
+
ht(m("saveBeforeTranslate"));
|
|
693
693
|
return;
|
|
694
694
|
}
|
|
695
695
|
f || c(!0);
|
|
@@ -743,22 +743,22 @@ const { info: xs } = ze, ft = (e) => {
|
|
|
743
743
|
tooltip: m("translate"),
|
|
744
744
|
icon: /* @__PURE__ */ r(Ur, {}),
|
|
745
745
|
onClick: async () => {
|
|
746
|
-
d != null && d() ?
|
|
746
|
+
d != null && d() ? ht(m("saveBeforeTranslate")) : ht(m("enterTextBeforeTranslate"));
|
|
747
747
|
},
|
|
748
748
|
children: m("translate")
|
|
749
749
|
}
|
|
750
750
|
) })
|
|
751
751
|
] }) });
|
|
752
|
-
}, { defaultAlgorithm: Fs, defaultSeed: Rs } = He, _s = Fs(Rs), { Option: Os } =
|
|
752
|
+
}, { defaultAlgorithm: Fs, defaultSeed: Rs } = He, _s = Fs(Rs), { Option: Os } = Tt, oo = (e) => {
|
|
753
753
|
const { ooui: t } = e, { required: n } = t;
|
|
754
|
-
return /* @__PURE__ */ r(
|
|
754
|
+
return /* @__PURE__ */ r(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(io, { ...e }) });
|
|
755
755
|
}, io = (e) => {
|
|
756
756
|
const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), d = l && l.length && l.map((f) => {
|
|
757
757
|
const [c, m] = f;
|
|
758
758
|
return /* @__PURE__ */ r(Os, { value: c, children: m }, c);
|
|
759
759
|
});
|
|
760
760
|
return /* @__PURE__ */ r(
|
|
761
|
-
a && !s ? Is :
|
|
761
|
+
a && !s ? Is : Tt,
|
|
762
762
|
{
|
|
763
763
|
disabled: s,
|
|
764
764
|
onChange: n,
|
|
@@ -769,17 +769,17 @@ const { info: xs } = ze, ft = (e) => {
|
|
|
769
769
|
children: d
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
|
-
}, Is =
|
|
772
|
+
}, Is = Nt(Tt)`
|
|
773
773
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
774
774
|
background-color: ${_s.colorPrimaryBg};
|
|
775
775
|
}
|
|
776
776
|
`, { defaultAlgorithm: Vs, defaultSeed: As } = He, yr = Vs(As), Ds = (e) => {
|
|
777
777
|
const { ooui: t } = e, { id: n, readOnly: i, required: o } = t;
|
|
778
|
-
return /* @__PURE__ */ r(
|
|
778
|
+
return /* @__PURE__ */ r(Ce, { ...e, valuePropName: "checked", children: /* @__PURE__ */ r(ks, { id: n, readOnly: i, required: o }) });
|
|
779
779
|
}, ks = (e) => {
|
|
780
780
|
const { required: t, readOnly: n, ...i } = e;
|
|
781
|
-
return /* @__PURE__ */ r("div", { className: "flex flex-row", children: /* @__PURE__ */ r(t && !n ? Es :
|
|
782
|
-
}, Es =
|
|
781
|
+
return /* @__PURE__ */ r("div", { className: "flex flex-row", children: /* @__PURE__ */ r(t && !n ? Es : Bt, { disabled: n, ...i }) });
|
|
782
|
+
}, Es = Nt(Bt)`
|
|
783
783
|
.ant-checkbox-inner {
|
|
784
784
|
background-color: ${yr.colorPrimaryBg};
|
|
785
785
|
}
|
|
@@ -792,7 +792,7 @@ function Ns(e) {
|
|
|
792
792
|
const n = Buffer.from(e, "base64").length / 1e3;
|
|
793
793
|
return `${Math.round((n + Number.EPSILON) * 100) / 100} KB`;
|
|
794
794
|
}
|
|
795
|
-
async function
|
|
795
|
+
async function kt(e) {
|
|
796
796
|
const t = await Xi(
|
|
797
797
|
Buffer.from(e, "base64")
|
|
798
798
|
);
|
|
@@ -813,14 +813,14 @@ function pn(e, t) {
|
|
|
813
813
|
window.open(a);
|
|
814
814
|
}
|
|
815
815
|
const Ms = (e) => {
|
|
816
|
-
const { ooui: t } = e, { required: n, id: i } = t, o =
|
|
817
|
-
return o ? /* @__PURE__ */ r(o, {}) : /* @__PURE__ */ r(
|
|
816
|
+
const { ooui: t } = e, { required: n, id: i } = t, o = dt(i);
|
|
817
|
+
return o ? /* @__PURE__ */ r(o, {}) : /* @__PURE__ */ r(Ce, { required: n, ...e, children: /* @__PURE__ */ r(Ps, { ooui: t }) });
|
|
818
818
|
}, Ps = (e) => {
|
|
819
|
-
const { ooui: t, value: n, onChange: i } = e, { readOnly: o } = t, s =
|
|
819
|
+
const { ooui: t, value: n, onChange: i } = e, { readOnly: o } = t, s = le(null), { t: a } = ge(), l = (c) => {
|
|
820
820
|
i == null || i(c);
|
|
821
821
|
};
|
|
822
822
|
async function d() {
|
|
823
|
-
const c = await
|
|
823
|
+
const c = await kt(n), m = `data:${c == null ? void 0 : c.mime};base64,${n}`, p = document.createElement("a");
|
|
824
824
|
p.href = m, p.download = `image.${c == null ? void 0 : c.ext}`, p.click();
|
|
825
825
|
}
|
|
826
826
|
async function u(c) {
|
|
@@ -886,7 +886,7 @@ const Ms = (e) => {
|
|
|
886
886
|
] });
|
|
887
887
|
}, Ls = (e) => {
|
|
888
888
|
const { ooui: t } = e, { required: n } = t;
|
|
889
|
-
return /* @__PURE__ */ r(
|
|
889
|
+
return /* @__PURE__ */ r(Ce, { required: n, ...e, children: /* @__PURE__ */ r($s, {}) });
|
|
890
890
|
}, $s = (e) => {
|
|
891
891
|
const { value: t, onChange: n } = e;
|
|
892
892
|
if (!t)
|
|
@@ -905,7 +905,7 @@ const Ms = (e) => {
|
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
);
|
|
908
|
-
},
|
|
908
|
+
}, At = (e) => {
|
|
909
909
|
const t = e.arch, n = e.fields, i = new Pr(n);
|
|
910
910
|
return i.parse(t), i;
|
|
911
911
|
};
|
|
@@ -963,7 +963,7 @@ function lo(e, t) {
|
|
|
963
963
|
n[i.id] = i[t];
|
|
964
964
|
}), n;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Dt({
|
|
967
967
|
resultsToSort: e,
|
|
968
968
|
sorter: t,
|
|
969
969
|
fields: n
|
|
@@ -1000,7 +1000,7 @@ const Zn = async (e) => {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
let f = [], c;
|
|
1002
1002
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1003
|
-
const g = (h =
|
|
1003
|
+
const g = (h = At(o)) == null ? void 0 : h.colors, y = await E.getHandler().readEvalUiObjects({
|
|
1004
1004
|
model: n,
|
|
1005
1005
|
ids: d,
|
|
1006
1006
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1047,8 +1047,8 @@ const Zn = async (e) => {
|
|
|
1047
1047
|
) : n[i] = e[i];
|
|
1048
1048
|
}), n;
|
|
1049
1049
|
}, Us = (e) => {
|
|
1050
|
-
const { ooui: t } = e, { relation: n, context: i, views: o } = t, [s, a] = b(!0), [l, d] = b(), [u, f] = b(/* @__PURE__ */ new Map()), c =
|
|
1051
|
-
|
|
1050
|
+
const { ooui: t } = e, { relation: n, context: i, views: o } = t, [s, a] = b(!0), [l, d] = b(), [u, f] = b(/* @__PURE__ */ new Map()), c = ne(Be), { getContext: m } = c || {};
|
|
1051
|
+
Ft(() => {
|
|
1052
1052
|
h();
|
|
1053
1053
|
}, [t]);
|
|
1054
1054
|
const p = async (g) => o && o[g] ? o[g] : await E.getHandler().getView({
|
|
@@ -1066,10 +1066,10 @@ const Zn = async (e) => {
|
|
|
1066
1066
|
a(!1);
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
|
-
return s ? /* @__PURE__ */ r(Le, {}) : l ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ r(
|
|
1069
|
+
return s ? /* @__PURE__ */ r(Le, {}) : l ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(Ys, { ooui: t, views: u }) });
|
|
1070
1070
|
}, Ys = (e) => {
|
|
1071
|
-
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: x } = i, S = s.filter((F) => F.values), C =
|
|
1072
|
-
|
|
1071
|
+
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: x } = i, S = s.filter((F) => F.values), C = ne(Be), { getContext: R } = C || {};
|
|
1072
|
+
Ft(() => {
|
|
1073
1073
|
D();
|
|
1074
1074
|
}, [s]);
|
|
1075
1075
|
const V = (F) => {
|
|
@@ -1136,7 +1136,7 @@ const Zn = async (e) => {
|
|
|
1136
1136
|
] }, T) }, T);
|
|
1137
1137
|
}) }),
|
|
1138
1138
|
/* @__PURE__ */ r(
|
|
1139
|
-
|
|
1139
|
+
Jt,
|
|
1140
1140
|
{
|
|
1141
1141
|
formView: n.get("form"),
|
|
1142
1142
|
model: h,
|
|
@@ -1158,21 +1158,21 @@ const Zn = async (e) => {
|
|
|
1158
1158
|
] });
|
|
1159
1159
|
}, { useToken: Gs } = He, qs = (e) => {
|
|
1160
1160
|
const { ooui: t } = e;
|
|
1161
|
-
return /* @__PURE__ */ r(
|
|
1161
|
+
return /* @__PURE__ */ r(Ce, { ooui: t, children: /* @__PURE__ */ r(zs, { ooui: t }) });
|
|
1162
1162
|
}, zs = (e) => {
|
|
1163
1163
|
const { token: t } = Gs(), { ooui: n, value: i } = e, o = /* @__PURE__ */ k(X, { children: [
|
|
1164
1164
|
/* @__PURE__ */ k("span", { children: [
|
|
1165
1165
|
n.label,
|
|
1166
1166
|
" "
|
|
1167
1167
|
] }),
|
|
1168
|
-
n.tooltip && /* @__PURE__ */ r(
|
|
1168
|
+
n.tooltip && /* @__PURE__ */ r(gt, { title: n.tooltip, children: /* @__PURE__ */ r(
|
|
1169
1169
|
jr,
|
|
1170
1170
|
{
|
|
1171
1171
|
className: "pr-1 text-xs",
|
|
1172
1172
|
style: { color: t.colorPrimaryBg }
|
|
1173
1173
|
}
|
|
1174
1174
|
) })
|
|
1175
|
-
] }), s =
|
|
1175
|
+
] }), s = dt(n.icon);
|
|
1176
1176
|
let a = i;
|
|
1177
1177
|
n.selectionValues.size ? a = n.selectionValues.get(i) : Array.isArray(i) && (a = i[1]);
|
|
1178
1178
|
const l = /* @__PURE__ */ r(
|
|
@@ -1199,7 +1199,7 @@ const Zn = async (e) => {
|
|
|
1199
1199
|
} else
|
|
1200
1200
|
n[i] = e[i];
|
|
1201
1201
|
}), n;
|
|
1202
|
-
},
|
|
1202
|
+
}, Ot = (e, t) => Js(e, t), Sn = ({
|
|
1203
1203
|
source: e,
|
|
1204
1204
|
target: t,
|
|
1205
1205
|
fields: n
|
|
@@ -1294,7 +1294,7 @@ const Zn = async (e) => {
|
|
|
1294
1294
|
function vr(e, t, n) {
|
|
1295
1295
|
return n.indexOf(e) === t;
|
|
1296
1296
|
}
|
|
1297
|
-
const
|
|
1297
|
+
const Mt = ({
|
|
1298
1298
|
values: e,
|
|
1299
1299
|
fields: t
|
|
1300
1300
|
}) => {
|
|
@@ -1303,7 +1303,7 @@ const Et = ({
|
|
|
1303
1303
|
const o = e[i];
|
|
1304
1304
|
t[i] && t[i].type === "many2one" && o && Array.isArray(o) && o.length === 2 ? n[i] = o[0] : n[i] = o;
|
|
1305
1305
|
}), n;
|
|
1306
|
-
},
|
|
1306
|
+
}, Kt = (e) => {
|
|
1307
1307
|
let t = 0;
|
|
1308
1308
|
e = e.toString().padEnd(10, "0");
|
|
1309
1309
|
for (let i = 0; i < e.length; i++)
|
|
@@ -1317,12 +1317,12 @@ const Et = ({
|
|
|
1317
1317
|
}, ta = (e, t) => e.replace(
|
|
1318
1318
|
/\{([^}]+)\}/g,
|
|
1319
1319
|
(n, i) => t[i] !== void 0 ? t[i] : n
|
|
1320
|
-
), na = (e) => /* @__PURE__ */ r(
|
|
1320
|
+
), na = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(uo, { ...e }) }), uo = (e) => {
|
|
1321
1321
|
const { ooui: t, value: n } = e;
|
|
1322
1322
|
let i = n, o = n;
|
|
1323
1323
|
if (t.selectionValues.size ? i = t.selectionValues.get(n) : Array.isArray(n) && (o = n[0], i = n[1]), !n)
|
|
1324
1324
|
return null;
|
|
1325
|
-
const s = t.colors === "auto" ?
|
|
1325
|
+
const s = t.colors === "auto" ? Kt(o) : t.colors[o] || Kt(o);
|
|
1326
1326
|
return /* @__PURE__ */ r(er, { color: s, children: i });
|
|
1327
1327
|
}, er = (e) => {
|
|
1328
1328
|
let { color: t } = e, n = {};
|
|
@@ -1334,10 +1334,10 @@ const Et = ({
|
|
|
1334
1334
|
}, t = `${t}20`), /* @__PURE__ */ r(kr, { ...e, style: n, color: t, children: e.children });
|
|
1335
1335
|
}, ra = (e) => {
|
|
1336
1336
|
const { ooui: t } = e;
|
|
1337
|
-
return /* @__PURE__ */ r(
|
|
1337
|
+
return /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(oa, { ooui: t }) });
|
|
1338
1338
|
}, oa = (e) => {
|
|
1339
|
-
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 =
|
|
1340
|
-
|
|
1339
|
+
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 || {};
|
|
1340
|
+
Ft(() => {
|
|
1341
1341
|
S();
|
|
1342
1342
|
}, [o]);
|
|
1343
1343
|
const x = (V) => {
|
|
@@ -1352,7 +1352,7 @@ const Et = ({
|
|
|
1352
1352
|
if (h && (V = [["id", "in", s]]), n.domain) {
|
|
1353
1353
|
const T = await E.getHandler().evalDomain({
|
|
1354
1354
|
domain: n.domain,
|
|
1355
|
-
values:
|
|
1355
|
+
values: Mt({
|
|
1356
1356
|
fields: y == null ? void 0 : y.getFields(),
|
|
1357
1357
|
values: y.getPlainValues()
|
|
1358
1358
|
}),
|
|
@@ -1389,7 +1389,7 @@ const Et = ({
|
|
|
1389
1389
|
}, R = (V) => {
|
|
1390
1390
|
const { label: D, closable: F, onClose: T } = V, O = (_) => {
|
|
1391
1391
|
_.preventDefault(), _.stopPropagation();
|
|
1392
|
-
}, v =
|
|
1392
|
+
}, v = Kt(D);
|
|
1393
1393
|
return /* @__PURE__ */ r(
|
|
1394
1394
|
er,
|
|
1395
1395
|
{
|
|
@@ -1403,7 +1403,7 @@ const Et = ({
|
|
|
1403
1403
|
);
|
|
1404
1404
|
};
|
|
1405
1405
|
return d ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: d, type: "error", banner: !0 }) : /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r("div", { className: "flex flex-row", children: /* @__PURE__ */ r(
|
|
1406
|
-
|
|
1406
|
+
Tt,
|
|
1407
1407
|
{
|
|
1408
1408
|
mode: "multiple",
|
|
1409
1409
|
value: a.length ? s : [],
|
|
@@ -1418,9 +1418,9 @@ const Et = ({
|
|
|
1418
1418
|
}, ia = (e) => {
|
|
1419
1419
|
switch (e) {
|
|
1420
1420
|
case "form":
|
|
1421
|
-
return
|
|
1421
|
+
return zt;
|
|
1422
1422
|
case "tree":
|
|
1423
|
-
return
|
|
1423
|
+
return Xt;
|
|
1424
1424
|
case "notebook":
|
|
1425
1425
|
return ac;
|
|
1426
1426
|
case "group":
|
|
@@ -1500,7 +1500,7 @@ const Et = ({
|
|
|
1500
1500
|
}
|
|
1501
1501
|
}, sa = (e) => {
|
|
1502
1502
|
const { ooui: t } = e, { type: n } = t, i = ia(n);
|
|
1503
|
-
return i ?
|
|
1503
|
+
return i ? nt.createElement(i, e) : null;
|
|
1504
1504
|
}, aa = ({
|
|
1505
1505
|
item: e,
|
|
1506
1506
|
responsiveBehaviour: t
|
|
@@ -1522,14 +1522,14 @@ const Et = ({
|
|
|
1522
1522
|
if (i.push(a), s(l)) {
|
|
1523
1523
|
const d = n - o;
|
|
1524
1524
|
for (let u = 0; u < d; u += 1)
|
|
1525
|
-
i.push(new
|
|
1525
|
+
i.push(new Et({ string: "" }));
|
|
1526
1526
|
}
|
|
1527
1527
|
}), i;
|
|
1528
1528
|
}, ca = ({
|
|
1529
1529
|
row: e,
|
|
1530
1530
|
numberOfColumns: t
|
|
1531
1531
|
}) => e.map((n) => (n._mustExpand && (n.colspan = t), n)), da = (e, t) => {
|
|
1532
|
-
const n = e.map((i) => i instanceof
|
|
1532
|
+
const n = e.map((i) => i instanceof Et && i.fieldForLabel || i instanceof ci ? "auto" : "1fr");
|
|
1533
1533
|
if (n.length < t) {
|
|
1534
1534
|
const i = t - n.length;
|
|
1535
1535
|
for (let o = 0; o < i; o++)
|
|
@@ -1558,7 +1558,7 @@ const Et = ({
|
|
|
1558
1558
|
row: h,
|
|
1559
1559
|
numberOfColumns: o,
|
|
1560
1560
|
mustFillWithEmpties: n
|
|
1561
|
-
}), l = l.concat(g)), g.map((y) => (y instanceof
|
|
1561
|
+
}), l = l.concat(g)), g.map((y) => (y instanceof Et && y.fieldForLabel && (a = !0), /* @__PURE__ */ r(
|
|
1562
1562
|
"div",
|
|
1563
1563
|
{
|
|
1564
1564
|
style: {
|
|
@@ -1580,14 +1580,14 @@ const Et = ({
|
|
|
1580
1580
|
minHeight: 0,
|
|
1581
1581
|
minWidth: 0
|
|
1582
1582
|
}, children: d });
|
|
1583
|
-
}, { confirm: ma } = ze,
|
|
1583
|
+
}, { confirm: ma } = ze, qt = ({
|
|
1584
1584
|
onOk: e,
|
|
1585
1585
|
onCancel: t,
|
|
1586
1586
|
t: n
|
|
1587
1587
|
}) => {
|
|
1588
1588
|
ma({
|
|
1589
1589
|
title: n("unsavedChanges"),
|
|
1590
|
-
icon: /* @__PURE__ */ r(
|
|
1590
|
+
icon: /* @__PURE__ */ r(vt, {}),
|
|
1591
1591
|
centered: !0,
|
|
1592
1592
|
content: n("confirmCloseWithoutSave"),
|
|
1593
1593
|
okText: n("closeWithoutSaving"),
|
|
@@ -1598,7 +1598,7 @@ const Et = ({
|
|
|
1598
1598
|
}, { error: ha } = ze, br = (e) => {
|
|
1599
1599
|
ha({
|
|
1600
1600
|
title: e("formHasErrors"),
|
|
1601
|
-
icon: /* @__PURE__ */ r(
|
|
1601
|
+
icon: /* @__PURE__ */ r(vt, {}),
|
|
1602
1602
|
centered: !0,
|
|
1603
1603
|
content: e("fillRequiredFields")
|
|
1604
1604
|
});
|
|
@@ -1610,7 +1610,7 @@ const Et = ({
|
|
|
1610
1610
|
content: t,
|
|
1611
1611
|
onOk: n
|
|
1612
1612
|
});
|
|
1613
|
-
}, fo =
|
|
1613
|
+
}, fo = nt.createContext(null), ya = (e) => {
|
|
1614
1614
|
const { children: t, setTitle: n } = e;
|
|
1615
1615
|
return /* @__PURE__ */ r(
|
|
1616
1616
|
fo.Provider,
|
|
@@ -1621,7 +1621,7 @@ const Et = ({
|
|
|
1621
1621
|
children: t
|
|
1622
1622
|
}
|
|
1623
1623
|
);
|
|
1624
|
-
},
|
|
1624
|
+
}, St = 80, rt = Xo(
|
|
1625
1625
|
null
|
|
1626
1626
|
), wa = (e) => {
|
|
1627
1627
|
const {
|
|
@@ -1650,20 +1650,20 @@ const Et = ({
|
|
|
1650
1650
|
setSearchTreeNameSearch: D,
|
|
1651
1651
|
goToResourceId: F,
|
|
1652
1652
|
limit: T
|
|
1653
|
-
} = e, [O, v] = b(!1), [_, A] = b(!1), [L, G] = b(!1), [B, q] = b(!0), [P, Z] = b(!0), [ee, oe] = b([]), [U, $] = b(!1), [I, N] = b([]), [K,
|
|
1654
|
-
T !== void 0 ? T :
|
|
1655
|
-
), [
|
|
1656
|
-
|
|
1653
|
+
} = e, [O, v] = b(!1), [_, A] = b(!1), [L, G] = b(!1), [B, q] = b(!0), [P, Z] = b(!0), [ee, oe] = b([]), [U, $] = b(!1), [I, N] = b([]), [K, ae] = b(!1), [z, re] = b(!0), [ve, W] = b(), [ce, Te] = b({}), [Ee, Ne] = b(
|
|
1654
|
+
T !== void 0 ? T : St
|
|
1655
|
+
), [Me, me] = b(i);
|
|
1656
|
+
pe(() => {
|
|
1657
1657
|
m && m.length > 0 && !p && (h == null || h(0), f == null || f(m[0].id));
|
|
1658
|
-
}, [m]),
|
|
1659
|
-
|
|
1660
|
-
}, [T]),
|
|
1658
|
+
}, [m]), pe(() => {
|
|
1659
|
+
Ne(T !== void 0 ? T : St);
|
|
1660
|
+
}, [T]), pe(() => {
|
|
1661
1661
|
s.length === 1 ? W(s[0]) : s.length > 1 && W(
|
|
1662
1662
|
s.filter(
|
|
1663
1663
|
($e) => $e.view_id !== n.view_id
|
|
1664
1664
|
)[0]
|
|
1665
1665
|
);
|
|
1666
|
-
}, [s]),
|
|
1666
|
+
}, [s]), pe(() => {
|
|
1667
1667
|
(ve == null ? void 0 : ve.view_id) === n.view_id && s.length > 1 && W(
|
|
1668
1668
|
s.filter(
|
|
1669
1669
|
($e) => $e.view_id !== n.view_id
|
|
@@ -1675,10 +1675,10 @@ const Et = ({
|
|
|
1675
1675
|
return await (($e = a.current) == null ? void 0 : $e.submitForm());
|
|
1676
1676
|
};
|
|
1677
1677
|
return /* @__PURE__ */ r(
|
|
1678
|
-
|
|
1678
|
+
rt.Provider,
|
|
1679
1679
|
{
|
|
1680
1680
|
value: {
|
|
1681
|
-
title:
|
|
1681
|
+
title: Me,
|
|
1682
1682
|
currentView: n,
|
|
1683
1683
|
setCurrentView: o,
|
|
1684
1684
|
availableViews: s,
|
|
@@ -1712,28 +1712,28 @@ const Et = ({
|
|
|
1712
1712
|
setSearchParams: N,
|
|
1713
1713
|
searchParams: I,
|
|
1714
1714
|
searchVisible: K,
|
|
1715
|
-
setSearchVisible:
|
|
1715
|
+
setSearchVisible: ae,
|
|
1716
1716
|
sorter: y,
|
|
1717
1717
|
setSorter: w,
|
|
1718
1718
|
totalItems: x,
|
|
1719
1719
|
setTotalItems: S,
|
|
1720
1720
|
searchTreeNameSearch: V,
|
|
1721
1721
|
setSearchTreeNameSearch: D,
|
|
1722
|
-
setGraphIsLoading:
|
|
1722
|
+
setGraphIsLoading: re,
|
|
1723
1723
|
graphIsLoading: z,
|
|
1724
1724
|
previousView: ve,
|
|
1725
1725
|
setPreviousView: W,
|
|
1726
1726
|
goToResourceId: F,
|
|
1727
1727
|
searchValues: ce,
|
|
1728
1728
|
setSearchValues: Te,
|
|
1729
|
-
limit:
|
|
1730
|
-
setLimit:
|
|
1729
|
+
limit: Ee,
|
|
1730
|
+
setLimit: Ne,
|
|
1731
1731
|
setTitle: me
|
|
1732
1732
|
},
|
|
1733
1733
|
children: t
|
|
1734
1734
|
}
|
|
1735
1735
|
);
|
|
1736
|
-
},
|
|
1736
|
+
}, ut = nt.createContext(null), va = (e) => {
|
|
1737
1737
|
const {
|
|
1738
1738
|
children: t,
|
|
1739
1739
|
openAction: n,
|
|
@@ -1746,7 +1746,7 @@ const Et = ({
|
|
|
1746
1746
|
tabs: u
|
|
1747
1747
|
} = e, [f, c] = b(), [m, p] = b();
|
|
1748
1748
|
return /* @__PURE__ */ r(
|
|
1749
|
-
|
|
1749
|
+
ut.Provider,
|
|
1750
1750
|
{
|
|
1751
1751
|
value: {
|
|
1752
1752
|
openAction: n,
|
|
@@ -1765,15 +1765,15 @@ const Et = ({
|
|
|
1765
1765
|
children: t
|
|
1766
1766
|
}
|
|
1767
1767
|
);
|
|
1768
|
-
},
|
|
1768
|
+
}, Pt = nt.createContext(null), Cr = async (e) => {
|
|
1769
1769
|
var t;
|
|
1770
1770
|
for (let n = 0; n < e.length; n++)
|
|
1771
1771
|
await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
|
|
1772
1772
|
}, ba = (e, t) => {
|
|
1773
|
-
const { children: n, globalValues: i = {} } = e, o =
|
|
1774
|
-
|
|
1775
|
-
), { openAction: u } = d || {}, f =
|
|
1776
|
-
|
|
1773
|
+
const { children: n, globalValues: i = {} } = e, o = le(), s = le(), [a, l] = b(!1), d = ne(
|
|
1774
|
+
ut
|
|
1775
|
+
), { openAction: u } = d || {}, f = le([]), { t: c } = ge();
|
|
1776
|
+
wt(t, () => ({
|
|
1777
1777
|
openActionModal: C
|
|
1778
1778
|
}));
|
|
1779
1779
|
const [m, p] = b(!1), [h, g] = b(
|
|
@@ -1793,7 +1793,7 @@ const Et = ({
|
|
|
1793
1793
|
Je(`${B} action not supported`);
|
|
1794
1794
|
return;
|
|
1795
1795
|
}
|
|
1796
|
-
const { ids: q } = L || {}, P = q || [], Z = typeof _ == "string" ?
|
|
1796
|
+
const { ids: q } = L || {}, P = q || [], Z = typeof _ == "string" ? xt({
|
|
1797
1797
|
context: _,
|
|
1798
1798
|
fields: T,
|
|
1799
1799
|
values: O
|
|
@@ -1820,7 +1820,7 @@ const Et = ({
|
|
|
1820
1820
|
id: D
|
|
1821
1821
|
}), F.state && s.current === !0) {
|
|
1822
1822
|
s.current = !1, clearInterval(o.current), l(!1);
|
|
1823
|
-
const T = await
|
|
1823
|
+
const T = await kt(F.result);
|
|
1824
1824
|
pn(F.result, T.mime);
|
|
1825
1825
|
}
|
|
1826
1826
|
} catch (T) {
|
|
@@ -1865,7 +1865,7 @@ const Et = ({
|
|
|
1865
1865
|
ids: [parseInt(D.id)],
|
|
1866
1866
|
context: O
|
|
1867
1867
|
}))[0]);
|
|
1868
|
-
const _ = typeof (v == null ? void 0 : v.context) == "string" ?
|
|
1868
|
+
const _ = typeof (v == null ? void 0 : v.context) == "string" ? xt({
|
|
1869
1869
|
context: v.context,
|
|
1870
1870
|
fields: F,
|
|
1871
1871
|
values: { ...T, ...i }
|
|
@@ -1876,7 +1876,7 @@ const Et = ({
|
|
|
1876
1876
|
let L = [];
|
|
1877
1877
|
if (v.domain && (L = await E.getHandler().evalDomain({
|
|
1878
1878
|
domain: v.domain,
|
|
1879
|
-
values:
|
|
1879
|
+
values: Mt({
|
|
1880
1880
|
fields: F,
|
|
1881
1881
|
values: { ...T, ...i }
|
|
1882
1882
|
}),
|
|
@@ -1949,7 +1949,7 @@ const Et = ({
|
|
|
1949
1949
|
});
|
|
1950
1950
|
}
|
|
1951
1951
|
return /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(
|
|
1952
|
-
|
|
1952
|
+
Pt.Provider,
|
|
1953
1953
|
{
|
|
1954
1954
|
value: {
|
|
1955
1955
|
processAction: x,
|
|
@@ -1970,7 +1970,7 @@ const Et = ({
|
|
|
1970
1970
|
}
|
|
1971
1971
|
),
|
|
1972
1972
|
/* @__PURE__ */ r(
|
|
1973
|
-
|
|
1973
|
+
Jt,
|
|
1974
1974
|
{
|
|
1975
1975
|
buttonModal: !0,
|
|
1976
1976
|
parentContext: h.context,
|
|
@@ -2046,7 +2046,7 @@ async function Ca({
|
|
|
2046
2046
|
}
|
|
2047
2047
|
return { views: s, initialView: a };
|
|
2048
2048
|
}
|
|
2049
|
-
const xa =
|
|
2049
|
+
const xa = yt(ba), Sa = ({
|
|
2050
2050
|
error: e,
|
|
2051
2051
|
className: t
|
|
2052
2052
|
}) => {
|
|
@@ -2092,8 +2092,8 @@ function Fa(e, t) {
|
|
|
2092
2092
|
defaultValues: R,
|
|
2093
2093
|
forcedValues: V = {},
|
|
2094
2094
|
parentWidth: D
|
|
2095
|
-
} = e, { t: F } =
|
|
2096
|
-
|
|
2095
|
+
} = e, { t: F } = ge(), [T, O] = b(!1), [v, _] = b(), [A, L] = b(), [G] = ct.useForm(), [B, q] = b(), [P, Z] = b(), ee = ne(fo), [oe, U] = b(), [$, I] = b(!1), N = le(), K = le({}), ae = le({}), z = le(!1), re = le(!1), ve = le(!1), ce = (D !== void 0 ? D : oe) < Ta, Te = ne(Be), { activeId: Ee, getPlainValues: Ne } = Te || {}, Me = ne(
|
|
2096
|
+
rt
|
|
2097
2097
|
), {
|
|
2098
2098
|
setFormIsSaving: me = void 0,
|
|
2099
2099
|
setFormHasChanges: Fe = void 0,
|
|
@@ -2102,36 +2102,36 @@ function Fa(e, t) {
|
|
|
2102
2102
|
setAttachments: Oe = void 0,
|
|
2103
2103
|
title: We = void 0,
|
|
2104
2104
|
setTitle: Ke = void 0
|
|
2105
|
-
} = (C ?
|
|
2106
|
-
|
|
2107
|
-
), { processAction:
|
|
2108
|
-
|
|
2105
|
+
} = (C ? Me : {}) || {}, j = ne(
|
|
2106
|
+
Pt
|
|
2107
|
+
), { processAction: ye, globalValues: Ve } = j || {};
|
|
2108
|
+
wt(t, () => ({
|
|
2109
2109
|
submitForm: Zt,
|
|
2110
2110
|
getFields: je,
|
|
2111
2111
|
getValues: Ae,
|
|
2112
2112
|
getPlainValues: Y,
|
|
2113
2113
|
getContext: Re,
|
|
2114
|
-
fetchValues:
|
|
2115
|
-
cancelUnsavedChanges:
|
|
2114
|
+
fetchValues: lt,
|
|
2115
|
+
cancelUnsavedChanges: Pe,
|
|
2116
2116
|
clearAndReload: () => {
|
|
2117
|
-
N.current = void 0, L(void 0),
|
|
2117
|
+
N.current = void 0, L(void 0), Lt();
|
|
2118
2118
|
}
|
|
2119
|
-
})),
|
|
2119
|
+
})), pe(() => {
|
|
2120
2120
|
if (_(void 0), !(!n && !h)) {
|
|
2121
2121
|
if (!S) {
|
|
2122
2122
|
N.current = void 0, L(void 0);
|
|
2123
2123
|
return;
|
|
2124
2124
|
}
|
|
2125
|
-
(i === void 0 && P || i !== void 0 && P && i < 0) && (N.current = void 0, L(void 0)),
|
|
2125
|
+
(i === void 0 && P || i !== void 0 && P && i < 0) && (N.current = void 0, L(void 0)), Lt();
|
|
2126
2126
|
}
|
|
2127
|
-
}, [i, n, p, h, S]),
|
|
2127
|
+
}, [i, n, p, h, S]), pe(() => {
|
|
2128
2128
|
$ && (wn({
|
|
2129
2129
|
elementHasLostFocus: !0
|
|
2130
2130
|
}), I(!1));
|
|
2131
2131
|
}, [$]);
|
|
2132
2132
|
const ue = (M, H, J, Q) => {
|
|
2133
2133
|
Fe == null || Fe(!1), me == null || me(!1), s == null || s(M, H, J, Q), $e == null || $e(M);
|
|
2134
|
-
},
|
|
2134
|
+
}, he = () => {
|
|
2135
2135
|
me == null || me(!1), o == null || o();
|
|
2136
2136
|
}, we = (M) => {
|
|
2137
2137
|
me == null || me(!1), u == null || u(M);
|
|
@@ -2155,10 +2155,10 @@ function Fa(e, t) {
|
|
|
2155
2155
|
const M = Ae(), H = je(), J = {};
|
|
2156
2156
|
return Object.keys(M).forEach((Q) => {
|
|
2157
2157
|
const be = M[Q];
|
|
2158
|
-
H[Q] && H[Q].type === "many2one" && be && Array.isArray(be) && be.length === 2 ? J[Q] = be[0] : H[Q] && (H[Q].type === "one2many" || H[Q].type === "many2many") && be && be.items ? J[Q] = be.items.filter((
|
|
2158
|
+
H[Q] && H[Q].type === "many2one" && be && Array.isArray(be) && be.length === 2 ? J[Q] = be[0] : H[Q] && (H[Q].type === "one2many" || H[Q].type === "many2many") && be && be.items ? J[Q] = be.items.filter((tt) => tt.operation !== "pendingRemove").map((tt) => tt.id) : J[Q] = be;
|
|
2159
2159
|
}), J;
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2161
|
+
function te() {
|
|
2162
2162
|
const M = {
|
|
2163
2163
|
...Ye(P)
|
|
2164
2164
|
};
|
|
@@ -2169,7 +2169,7 @@ function Fa(e, t) {
|
|
|
2169
2169
|
function Re() {
|
|
2170
2170
|
return { ...w, ...A == null ? void 0 : A.context };
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function xe() {
|
|
2173
2173
|
return ie() ? { active_id: ie(), active_ids: [ie()] } : {};
|
|
2174
2174
|
}
|
|
2175
2175
|
function Se() {
|
|
@@ -2177,8 +2177,8 @@ function Fa(e, t) {
|
|
|
2177
2177
|
id: ie(),
|
|
2178
2178
|
active_id: ie(),
|
|
2179
2179
|
active_ids: [ie()],
|
|
2180
|
-
parent_id:
|
|
2181
|
-
...
|
|
2180
|
+
parent_id: Ee,
|
|
2181
|
+
...Ve
|
|
2182
2182
|
};
|
|
2183
2183
|
}
|
|
2184
2184
|
const Ie = async (M) => {
|
|
@@ -2197,59 +2197,59 @@ function Fa(e, t) {
|
|
|
2197
2197
|
})
|
|
2198
2198
|
).length !== 0, Ye = (M) => {
|
|
2199
2199
|
const H = G.getFieldsValue(!0);
|
|
2200
|
-
return
|
|
2201
|
-
},
|
|
2202
|
-
|
|
2200
|
+
return Ot(H, M);
|
|
2201
|
+
}, bt = (M, H) => {
|
|
2202
|
+
ft({
|
|
2203
2203
|
values: {
|
|
2204
|
-
...
|
|
2204
|
+
...Ot(G.getFieldsValue(!0), P),
|
|
2205
2205
|
[M]: H
|
|
2206
2206
|
},
|
|
2207
2207
|
fields: P,
|
|
2208
2208
|
reset: !1
|
|
2209
2209
|
});
|
|
2210
|
-
},
|
|
2211
|
-
async function
|
|
2210
|
+
}, at = (M) => G.getFieldsValue(!0)[M];
|
|
2211
|
+
async function Qt() {
|
|
2212
2212
|
try {
|
|
2213
2213
|
return await G.validateFields(), !1;
|
|
2214
2214
|
} catch {
|
|
2215
2215
|
return xn.error(F("fillRequiredFields")), !0;
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
const
|
|
2218
|
+
const Lt = async () => {
|
|
2219
2219
|
_(void 0), se == null || se(!0);
|
|
2220
2220
|
let M;
|
|
2221
2221
|
try {
|
|
2222
|
-
h ? M = { arch: h.arch, fields: h.fields } : M = await
|
|
2222
|
+
h ? M = { arch: h.arch, fields: h.fields } : M = await ot();
|
|
2223
2223
|
const { fields: H, arch: J } = M;
|
|
2224
|
-
Z(H), q(J), await
|
|
2224
|
+
Z(H), q(J), await lt({
|
|
2225
2225
|
fields: H,
|
|
2226
2226
|
arch: J
|
|
2227
2227
|
});
|
|
2228
2228
|
} catch (H) {
|
|
2229
2229
|
_(H != null && H.message ? H.message + H.stack : H), se == null || se(!1);
|
|
2230
2230
|
}
|
|
2231
|
-
},
|
|
2231
|
+
}, lt = async (M) => {
|
|
2232
2232
|
let H, J, Q, be;
|
|
2233
2233
|
se == null || se(!0), _(void 0), M != null && M.fields ? (J = M.fields, Q = M.arch) : (J = P, Q = B), p && (M == null ? void 0 : M.forceRefresh) !== !0 ? H = p : { values: H, defaultGetCalled: be } = await No({
|
|
2234
2234
|
fields: J,
|
|
2235
2235
|
arch: Q
|
|
2236
|
-
}), x && (H = { ...Zs(x), ...H }), K.current =
|
|
2236
|
+
}), x && (H = { ...Zs(x), ...H }), K.current = Ot(H, J), ft({
|
|
2237
2237
|
values: H,
|
|
2238
2238
|
fields: J,
|
|
2239
2239
|
reset: !0,
|
|
2240
2240
|
isDefaultGet: be
|
|
2241
|
-
}),
|
|
2242
|
-
},
|
|
2243
|
-
Ze() ?
|
|
2241
|
+
}), $t({ fields: J, arch: Q, values: H }), se == null || se(!1), Fe == null || Fe(!1), be && I(!0);
|
|
2242
|
+
}, Pe = async () => new Promise(async (M) => {
|
|
2243
|
+
Ze() ? qt({
|
|
2244
2244
|
t: F,
|
|
2245
2245
|
onOk: () => {
|
|
2246
|
-
|
|
2246
|
+
he == null || he(), M(!0);
|
|
2247
2247
|
},
|
|
2248
2248
|
onCancel: () => {
|
|
2249
2249
|
M(!1);
|
|
2250
2250
|
}
|
|
2251
|
-
}) : (
|
|
2252
|
-
}),
|
|
2251
|
+
}) : (he == null || he(), M(!0));
|
|
2252
|
+
}), ot = async () => {
|
|
2253
2253
|
if (l) {
|
|
2254
2254
|
const M = await E.getHandler().getActionStringForModel(n);
|
|
2255
2255
|
return (await E.getHandler().getViewsForAction({
|
|
@@ -2262,13 +2262,13 @@ function Fa(e, t) {
|
|
|
2262
2262
|
type: "form",
|
|
2263
2263
|
context: w
|
|
2264
2264
|
});
|
|
2265
|
-
},
|
|
2265
|
+
}, ft = ({
|
|
2266
2266
|
values: M,
|
|
2267
2267
|
fields: H,
|
|
2268
2268
|
reset: J,
|
|
2269
2269
|
isDefaultGet: Q = !1
|
|
2270
2270
|
}) => {
|
|
2271
|
-
const
|
|
2271
|
+
const tt = { ...J ? {} : G.getFieldsValue(!0), ...M }, bn = Ot(tt, H), Go = Object.keys(H).map((Cn) => {
|
|
2272
2272
|
const qo = bn[Cn] !== void 0 ? bn[Cn] : void 0;
|
|
2273
2273
|
return {
|
|
2274
2274
|
name: Cn,
|
|
@@ -2276,7 +2276,7 @@ function Fa(e, t) {
|
|
|
2276
2276
|
value: qo
|
|
2277
2277
|
};
|
|
2278
2278
|
});
|
|
2279
|
-
Q || (
|
|
2279
|
+
Q || (ae.current = bn), G.setFields(Go);
|
|
2280
2280
|
}, No = async ({
|
|
2281
2281
|
fields: M,
|
|
2282
2282
|
arch: H
|
|
@@ -2333,43 +2333,43 @@ function Fa(e, t) {
|
|
|
2333
2333
|
});
|
|
2334
2334
|
N.current = Q, K.current = J;
|
|
2335
2335
|
}
|
|
2336
|
-
g && await g([ie()]), !y && H && (ue == null || ue(ie(), Ae(),
|
|
2336
|
+
g && await g([ie()]), !y && H && (ue == null || ue(ie(), Ae(), te()));
|
|
2337
2337
|
}, Mo = async (M) => {
|
|
2338
2338
|
const { callOnSubmitSucceed: H = !0 } = M || {};
|
|
2339
|
-
!y && H && (ue == null || ue(ie(), Ae(),
|
|
2339
|
+
!y && H && (ue == null || ue(ie(), Ae(), te()));
|
|
2340
2340
|
}, Zt = async (M) => {
|
|
2341
2341
|
let H = !1;
|
|
2342
2342
|
const { callOnSubmitSucceed: J = !0 } = M || {};
|
|
2343
|
-
if (
|
|
2344
|
-
|
|
2343
|
+
if (re.current = !0, _(void 0), ve.current && !Ze() && ie() && J) {
|
|
2344
|
+
re.current = !1, Fe == null || Fe(!1), ue == null || ue(
|
|
2345
2345
|
ie(),
|
|
2346
2346
|
Ae(),
|
|
2347
|
-
|
|
2347
|
+
te(),
|
|
2348
2348
|
ve.current
|
|
2349
2349
|
), ve.current = !1;
|
|
2350
2350
|
const Q = ie();
|
|
2351
|
-
return c && (N.current = void 0,
|
|
2351
|
+
return c && (N.current = void 0, ft({ values: {}, fields: P, reset: !0 })), { succeed: !0, id: Q };
|
|
2352
2352
|
}
|
|
2353
2353
|
if (!Ze() && ie() && J)
|
|
2354
|
-
return
|
|
2355
|
-
if (await
|
|
2356
|
-
return
|
|
2354
|
+
return re.current = !1, Fe == null || Fe(!1), he == null || he(), { succeed: !0, id: ie() };
|
|
2355
|
+
if (await Qt())
|
|
2356
|
+
return re.current = !1, br(F), { succeed: !1, id: ie() };
|
|
2357
2357
|
O(!0), me == null || me(!0);
|
|
2358
2358
|
try {
|
|
2359
|
-
m === "api" ? await ir(M) : await Mo(M), c && (N.current = void 0,
|
|
2359
|
+
m === "api" ? await ir(M) : await Mo(M), c && (N.current = void 0, ft({ values: {}, fields: P, reset: !0 })), await lt({ forceRefresh: !0 }), H = !0, xn.success(F("savedRegisters"));
|
|
2360
2360
|
} catch (Q) {
|
|
2361
|
-
|
|
2361
|
+
re.current = !1, O(!1), me == null || me(!1), we == null || we(Q), xn.error(F("errorWhileSavingForm")), _(Q != null && Q.message ? Q.message : Q);
|
|
2362
2362
|
} finally {
|
|
2363
|
-
|
|
2363
|
+
re.current = !1, me == null || me(!1), O(!1);
|
|
2364
2364
|
}
|
|
2365
2365
|
return { succeed: H, id: ie() };
|
|
2366
|
-
},
|
|
2366
|
+
}, $t = ({
|
|
2367
2367
|
fields: M,
|
|
2368
2368
|
arch: H,
|
|
2369
2369
|
values: J,
|
|
2370
2370
|
operationInProgress: Q = !1
|
|
2371
2371
|
}) => {
|
|
2372
|
-
var
|
|
2372
|
+
var tt;
|
|
2373
2373
|
const be = new $r(M);
|
|
2374
2374
|
be.parse(H, {
|
|
2375
2375
|
readOnly: f || Q,
|
|
@@ -2380,14 +2380,14 @@ function Fa(e, t) {
|
|
|
2380
2380
|
},
|
|
2381
2381
|
M
|
|
2382
2382
|
)
|
|
2383
|
-
}), L(be), be.string && be.string !== We && (Ke == null || Ke(be.string)), ee && be.string && ((
|
|
2383
|
+
}), L(be), be.string && be.string !== We && (Ke == null || Ke(be.string)), ee && be.string && ((tt = ee.setTitle) == null || tt.call(ee, be.string));
|
|
2384
2384
|
}, wn = async ({
|
|
2385
2385
|
elementHasLostFocus: M = !1
|
|
2386
2386
|
}) => {
|
|
2387
|
-
if (
|
|
2387
|
+
if (re.current)
|
|
2388
2388
|
return;
|
|
2389
2389
|
const H = Sn({
|
|
2390
|
-
source:
|
|
2390
|
+
source: ae.current,
|
|
2391
2391
|
target: Ye(P),
|
|
2392
2392
|
fields: P
|
|
2393
2393
|
}), J = Object.keys(H);
|
|
@@ -2406,8 +2406,8 @@ function Fa(e, t) {
|
|
|
2406
2406
|
"many2one"
|
|
2407
2407
|
]
|
|
2408
2408
|
}) && M !== !0)) {
|
|
2409
|
-
const Q =
|
|
2410
|
-
|
|
2409
|
+
const Q = Ot(G.getFieldsValue(!0), P);
|
|
2410
|
+
ae.current = Q, d == null || d(Q), Fe == null || Fe(!0), Lo(J);
|
|
2411
2411
|
}
|
|
2412
2412
|
}, Po = Pi(wn, 100), Lo = async (M) => {
|
|
2413
2413
|
try {
|
|
@@ -2421,7 +2421,7 @@ function Fa(e, t) {
|
|
|
2421
2421
|
}, $o = async (M) => {
|
|
2422
2422
|
const H = A == null ? void 0 : A.onChangeFields[M];
|
|
2423
2423
|
if (!H) {
|
|
2424
|
-
|
|
2424
|
+
$t({
|
|
2425
2425
|
fields: P,
|
|
2426
2426
|
arch: B,
|
|
2427
2427
|
values: Ye(P)
|
|
@@ -2436,7 +2436,7 @@ function Fa(e, t) {
|
|
|
2436
2436
|
...A == null ? void 0 : A.context
|
|
2437
2437
|
}
|
|
2438
2438
|
},
|
|
2439
|
-
parentValues:
|
|
2439
|
+
parentValues: Ne == null ? void 0 : Ne(),
|
|
2440
2440
|
onChangeFieldActionArgs: H.args
|
|
2441
2441
|
}), Q = await E.getHandler().executeOnChange({
|
|
2442
2442
|
model: n,
|
|
@@ -2450,15 +2450,15 @@ function Fa(e, t) {
|
|
|
2450
2450
|
...Ye(P),
|
|
2451
2451
|
...Q.value
|
|
2452
2452
|
};
|
|
2453
|
-
|
|
2453
|
+
$t({ fields: P, arch: B, values: be }), ft({
|
|
2454
2454
|
values: be,
|
|
2455
2455
|
fields: P,
|
|
2456
2456
|
reset: !1
|
|
2457
2457
|
});
|
|
2458
2458
|
}
|
|
2459
2459
|
if (Q.warning && Q.warning.title && Q.warning.message && !z.current) {
|
|
2460
|
-
const { title: be, message:
|
|
2461
|
-
z.current = !0, ga(be,
|
|
2460
|
+
const { title: be, message: tt } = Q.warning;
|
|
2461
|
+
z.current = !0, ga(be, tt, () => {
|
|
2462
2462
|
z.current = !1;
|
|
2463
2463
|
});
|
|
2464
2464
|
}
|
|
@@ -2467,7 +2467,7 @@ function Fa(e, t) {
|
|
|
2467
2467
|
fieldsDomain: Q.domain,
|
|
2468
2468
|
fields: P
|
|
2469
2469
|
});
|
|
2470
|
-
|
|
2470
|
+
$t({
|
|
2471
2471
|
fields: be,
|
|
2472
2472
|
arch: B,
|
|
2473
2473
|
values: Ye(be)
|
|
@@ -2489,12 +2489,12 @@ function Fa(e, t) {
|
|
|
2489
2489
|
}
|
|
2490
2490
|
});
|
|
2491
2491
|
if (typeof J == "object" && J !== null && Object.keys(J).length === 0 && y)
|
|
2492
|
-
ue == null || ue(ie(), Ae(),
|
|
2492
|
+
ue == null || ue(ie(), Ae(), te());
|
|
2493
2493
|
else if (J.type && J.type === "ir.actions.act_window_close")
|
|
2494
|
-
ue == null || ue(ie(), Ae(),
|
|
2494
|
+
ue == null || ue(ie(), Ae(), te());
|
|
2495
2495
|
else if (J.type) {
|
|
2496
2496
|
let Q = {};
|
|
2497
|
-
J.context && (Q =
|
|
2497
|
+
J.context && (Q = xt({
|
|
2498
2498
|
context: J.context,
|
|
2499
2499
|
fields: P,
|
|
2500
2500
|
values: Ae()
|
|
@@ -2503,7 +2503,7 @@ function Fa(e, t) {
|
|
|
2503
2503
|
context: { ...H, ...Q }
|
|
2504
2504
|
});
|
|
2505
2505
|
} else
|
|
2506
|
-
await
|
|
2506
|
+
await lt({ forceRefresh: !0 });
|
|
2507
2507
|
}
|
|
2508
2508
|
async function Ho({ action: M }) {
|
|
2509
2509
|
const H = await E.getHandler().executeWorkflow({
|
|
@@ -2511,7 +2511,7 @@ function Fa(e, t) {
|
|
|
2511
2511
|
action: M,
|
|
2512
2512
|
payload: ie()
|
|
2513
2513
|
});
|
|
2514
|
-
H.type && H.type === "ir.actions.act_window_close" ? ue == null || ue(ie(), Ae(),
|
|
2514
|
+
H.type && H.type === "ir.actions.act_window_close" ? ue == null || ue(ie(), Ae(), te()) : await lt({ forceRefresh: !0 });
|
|
2515
2515
|
}
|
|
2516
2516
|
async function Ko({
|
|
2517
2517
|
action: M,
|
|
@@ -2528,7 +2528,7 @@ function Fa(e, t) {
|
|
|
2528
2528
|
actionData: M,
|
|
2529
2529
|
context: H
|
|
2530
2530
|
}) {
|
|
2531
|
-
const { closeParent: J } = await (
|
|
2531
|
+
const { closeParent: J } = await (ye == null ? void 0 : ye({
|
|
2532
2532
|
actionData: M,
|
|
2533
2533
|
fields: P,
|
|
2534
2534
|
values: Ae(),
|
|
@@ -2538,16 +2538,16 @@ function Fa(e, t) {
|
|
|
2538
2538
|
...H
|
|
2539
2539
|
},
|
|
2540
2540
|
onRefreshParentValues: () => {
|
|
2541
|
-
|
|
2541
|
+
lt({ forceRefresh: !0 });
|
|
2542
2542
|
}
|
|
2543
2543
|
})) || {};
|
|
2544
|
-
!C && J && (ue == null || ue(ie(), Ae(),
|
|
2544
|
+
!C && J && (ue == null || ue(ie(), Ae(), te()));
|
|
2545
2545
|
}
|
|
2546
2546
|
function jo() {
|
|
2547
2547
|
wn({ elementHasLostFocus: !0 });
|
|
2548
2548
|
}
|
|
2549
2549
|
function vn(M) {
|
|
2550
|
-
|
|
2550
|
+
$t({
|
|
2551
2551
|
fields: P,
|
|
2552
2552
|
arch: B,
|
|
2553
2553
|
values: Ye(P),
|
|
@@ -2560,18 +2560,18 @@ function Fa(e, t) {
|
|
|
2560
2560
|
context: J
|
|
2561
2561
|
}) {
|
|
2562
2562
|
if (M === "cancel") {
|
|
2563
|
-
|
|
2563
|
+
he == null || he();
|
|
2564
2564
|
return;
|
|
2565
2565
|
}
|
|
2566
|
-
if (await
|
|
2566
|
+
if (await Qt()) {
|
|
2567
2567
|
br(F);
|
|
2568
2568
|
return;
|
|
2569
2569
|
}
|
|
2570
2570
|
let Q = !1;
|
|
2571
2571
|
try {
|
|
2572
2572
|
!f && (Ze() || ie() === void 0) && (Q = !0, vn(!0), m === "2many" ? (await ir({ callOnSubmitSucceed: !1 }), ve.current = !0) : await Zt({ callOnSubmitSucceed: !1 }));
|
|
2573
|
-
const be = ve.current ?
|
|
2574
|
-
M === "object" ? await Bo({ action: H, context:
|
|
2573
|
+
const be = ve.current ? xe() : {}, tt = { ...J, ...be };
|
|
2574
|
+
M === "object" ? await Bo({ action: H, context: tt }) : M === "workflow" ? await Ho({ action: H }) : M === "action" && await Ko({ action: H, context: tt }), Q && vn(!1);
|
|
2575
2575
|
} catch (be) {
|
|
2576
2576
|
Q && vn(!1), Je(be);
|
|
2577
2577
|
}
|
|
@@ -2585,16 +2585,16 @@ function Fa(e, t) {
|
|
|
2585
2585
|
domain: x,
|
|
2586
2586
|
activeId: i,
|
|
2587
2587
|
activeModel: n,
|
|
2588
|
-
setFieldValue:
|
|
2589
|
-
getFieldValue:
|
|
2588
|
+
setFieldValue: bt,
|
|
2589
|
+
getFieldValue: at,
|
|
2590
2590
|
executeButtonAction: Wo,
|
|
2591
2591
|
getContext: Re,
|
|
2592
2592
|
submitForm: Zt,
|
|
2593
|
-
fetchValues:
|
|
2593
|
+
fetchValues: lt,
|
|
2594
2594
|
formHasChanges: Ze,
|
|
2595
2595
|
elementHasLostFocus: jo,
|
|
2596
2596
|
children: /* @__PURE__ */ r(
|
|
2597
|
-
|
|
2597
|
+
ct,
|
|
2598
2598
|
{
|
|
2599
2599
|
form: G,
|
|
2600
2600
|
onFieldsChange: () => {
|
|
@@ -2615,22 +2615,22 @@ function Fa(e, t) {
|
|
|
2615
2615
|
/* @__PURE__ */ r(cn, {}),
|
|
2616
2616
|
/* @__PURE__ */ r(_e, { justify: "end", children: /* @__PURE__ */ k(Ue, { children: [
|
|
2617
2617
|
/* @__PURE__ */ r(
|
|
2618
|
-
|
|
2618
|
+
ke,
|
|
2619
2619
|
{
|
|
2620
|
-
icon: /* @__PURE__ */ r(
|
|
2620
|
+
icon: /* @__PURE__ */ r(Ut, {}),
|
|
2621
2621
|
disabled: T,
|
|
2622
2622
|
onClick: async () => {
|
|
2623
|
-
await
|
|
2623
|
+
await Pe();
|
|
2624
2624
|
},
|
|
2625
2625
|
children: "Cancel"
|
|
2626
2626
|
}
|
|
2627
2627
|
),
|
|
2628
2628
|
/* @__PURE__ */ r(
|
|
2629
|
-
|
|
2629
|
+
ke,
|
|
2630
2630
|
{
|
|
2631
2631
|
disabled: T || f,
|
|
2632
2632
|
loading: T,
|
|
2633
|
-
icon: /* @__PURE__ */ r(
|
|
2633
|
+
icon: /* @__PURE__ */ r(Yt, {}),
|
|
2634
2634
|
onClick: async () => {
|
|
2635
2635
|
await Zt();
|
|
2636
2636
|
},
|
|
@@ -2656,7 +2656,7 @@ function Fa(e, t) {
|
|
|
2656
2656
|
}
|
|
2657
2657
|
) : null;
|
|
2658
2658
|
}
|
|
2659
|
-
const
|
|
2659
|
+
const zt = yt(Fa), Jt = (e) => {
|
|
2660
2660
|
const {
|
|
2661
2661
|
visible: t,
|
|
2662
2662
|
id: n,
|
|
@@ -2667,7 +2667,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2667
2667
|
actionData: l,
|
|
2668
2668
|
...d
|
|
2669
2669
|
} = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = b(i), [p, h] = b(!1), [g, y] = b(), { action_id: w, res_id: x, action_type: S, view_id: C } = l || {};
|
|
2670
|
-
|
|
2670
|
+
pe(() => {
|
|
2671
2671
|
a && R();
|
|
2672
2672
|
}, [l, a]);
|
|
2673
2673
|
async function R() {
|
|
@@ -2698,7 +2698,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2698
2698
|
function D() {
|
|
2699
2699
|
return /* @__PURE__ */ k(_e, { align: "middle", children: [
|
|
2700
2700
|
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(
|
|
2701
|
-
|
|
2701
|
+
ke,
|
|
2702
2702
|
{
|
|
2703
2703
|
type: p ? "primary" : "default",
|
|
2704
2704
|
icon: p ? /* @__PURE__ */ r(hi, { style: { color: "white" } }) : /* @__PURE__ */ r(pi, {}),
|
|
@@ -2722,7 +2722,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2722
2722
|
onCancel: s,
|
|
2723
2723
|
maskClosable: !1,
|
|
2724
2724
|
children: /* @__PURE__ */ r(
|
|
2725
|
-
|
|
2725
|
+
zt,
|
|
2726
2726
|
{
|
|
2727
2727
|
id: n,
|
|
2728
2728
|
showFooter: !0,
|
|
@@ -2735,7 +2735,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2735
2735
|
)
|
|
2736
2736
|
}
|
|
2737
2737
|
) });
|
|
2738
|
-
}, Ra = (e) => /* @__PURE__ */ r(
|
|
2738
|
+
}, Ra = (e) => /* @__PURE__ */ r(Ce, { ...e, layout: "vertical", children: /* @__PURE__ */ r(
|
|
2739
2739
|
Ln.RangePicker,
|
|
2740
2740
|
{
|
|
2741
2741
|
allowEmpty: [!0, !0],
|
|
@@ -2747,7 +2747,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2747
2747
|
numberOfSelectsToHide: n = 2,
|
|
2748
2748
|
...i
|
|
2749
2749
|
}) => {
|
|
2750
|
-
const o =
|
|
2750
|
+
const o = le(), s = le(0);
|
|
2751
2751
|
return /* @__PURE__ */ r(
|
|
2752
2752
|
ei,
|
|
2753
2753
|
{
|
|
@@ -2778,7 +2778,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2778
2778
|
n && /* @__PURE__ */ r(
|
|
2779
2779
|
mn,
|
|
2780
2780
|
{
|
|
2781
|
-
ooui: new
|
|
2781
|
+
ooui: new Et({
|
|
2782
2782
|
name: o + "_label",
|
|
2783
2783
|
string: i,
|
|
2784
2784
|
help: t.tooltip,
|
|
@@ -2788,7 +2788,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2788
2788
|
}
|
|
2789
2789
|
),
|
|
2790
2790
|
/* @__PURE__ */ k(_e, { align: "bottom", className: "p-0", children: [
|
|
2791
|
-
/* @__PURE__ */ r(de, { className: "mr-2", children: /* @__PURE__ */ r(
|
|
2791
|
+
/* @__PURE__ */ r(de, { className: "mr-2", children: /* @__PURE__ */ r(Ce, { ...e, ooui: s[0], showLabel: !1, children: /* @__PURE__ */ r(
|
|
2792
2792
|
Ln.RangePicker,
|
|
2793
2793
|
{
|
|
2794
2794
|
className: "w-60",
|
|
@@ -2796,7 +2796,7 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2796
2796
|
format: "DD/MM/YYYY"
|
|
2797
2797
|
}
|
|
2798
2798
|
) }) }),
|
|
2799
|
-
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(
|
|
2799
|
+
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Ce, { ...e, ooui: s[1], showLabel: !1, children: /* @__PURE__ */ r(Oa, {}) }) })
|
|
2800
2800
|
] })
|
|
2801
2801
|
] });
|
|
2802
2802
|
}, Oa = ({
|
|
@@ -2828,8 +2828,8 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2828
2828
|
}
|
|
2829
2829
|
)
|
|
2830
2830
|
] }), { useToken: Ia } = He, mo = (e) => {
|
|
2831
|
-
const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: o, required: s } = t, { token: a } = Ia(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d =
|
|
2832
|
-
return /* @__PURE__ */ r(
|
|
2831
|
+
const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: o, required: s } = t, { token: a } = Ia(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ne(Be), { elementHasLostFocus: u } = d || {};
|
|
2832
|
+
return /* @__PURE__ */ r(Ce, { required: s, type: "number", ...e, children: /* @__PURE__ */ r(
|
|
2833
2833
|
Er,
|
|
2834
2834
|
{
|
|
2835
2835
|
disabled: o,
|
|
@@ -2844,8 +2844,8 @@ const Jt = pt(Fa), Xt = (e) => {
|
|
|
2844
2844
|
}
|
|
2845
2845
|
) });
|
|
2846
2846
|
}, { useToken: Va } = He, rn = (e) => {
|
|
2847
|
-
const { ooui: t, onChange: n } = e, { id: i, readOnly: o, required: s } = t, { token: a } = Va(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d =
|
|
2848
|
-
return /* @__PURE__ */ r(
|
|
2847
|
+
const { ooui: t, onChange: n } = e, { id: i, readOnly: o, required: s } = t, { token: a } = Va(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ne(Be), { elementHasLostFocus: u } = d || {};
|
|
2848
|
+
return /* @__PURE__ */ r(Ce, { required: s, type: "number", ...e, children: /* @__PURE__ */ r(
|
|
2849
2849
|
Er,
|
|
2850
2850
|
{
|
|
2851
2851
|
id: i,
|
|
@@ -2880,7 +2880,7 @@ function Aa(e) {
|
|
|
2880
2880
|
n && /* @__PURE__ */ r(
|
|
2881
2881
|
mn,
|
|
2882
2882
|
{
|
|
2883
|
-
ooui: new
|
|
2883
|
+
ooui: new Et({
|
|
2884
2884
|
name: i + "_label",
|
|
2885
2885
|
string: o,
|
|
2886
2886
|
help: s,
|
|
@@ -2896,9 +2896,9 @@ function Aa(e) {
|
|
|
2896
2896
|
] })
|
|
2897
2897
|
] });
|
|
2898
2898
|
}
|
|
2899
|
-
const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na } =
|
|
2899
|
+
const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na } = Tt, Ma = (e) => {
|
|
2900
2900
|
const { ooui: t } = e, { required: n } = t;
|
|
2901
|
-
return /* @__PURE__ */ r(
|
|
2901
|
+
return /* @__PURE__ */ r(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(Pa, { ...e }) });
|
|
2902
2902
|
}, Pa = (e) => {
|
|
2903
2903
|
const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), d = l && l.length && l.filter((c) => {
|
|
2904
2904
|
const [m] = c;
|
|
@@ -2906,7 +2906,7 @@ const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na
|
|
|
2906
2906
|
}).map((c) => {
|
|
2907
2907
|
const [m, p] = c;
|
|
2908
2908
|
return /* @__PURE__ */ r(Na, { value: p, children: p }, m);
|
|
2909
|
-
}), u = a && !s ? La :
|
|
2909
|
+
}), u = a && !s ? La : Tt;
|
|
2910
2910
|
function f(c) {
|
|
2911
2911
|
const m = c.map((p) => {
|
|
2912
2912
|
const h = l.find(([g, y]) => p === y);
|
|
@@ -2929,7 +2929,7 @@ const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na
|
|
|
2929
2929
|
children: d
|
|
2930
2930
|
}
|
|
2931
2931
|
);
|
|
2932
|
-
}, La =
|
|
2932
|
+
}, La = Nt(Tt)`
|
|
2933
2933
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
2934
2934
|
background-color: ${Ea.colorPrimaryBg};
|
|
2935
2935
|
}
|
|
@@ -2937,9 +2937,9 @@ const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na
|
|
|
2937
2937
|
function $a(e) {
|
|
2938
2938
|
const { field: t } = e;
|
|
2939
2939
|
t.readOnly = !1, t.required = !1;
|
|
2940
|
-
const { t: n } =
|
|
2940
|
+
const { t: n } = ge();
|
|
2941
2941
|
switch (t.type) {
|
|
2942
|
-
case
|
|
2942
|
+
case pt.boolean: {
|
|
2943
2943
|
const o = new $n({
|
|
2944
2944
|
name: t._id,
|
|
2945
2945
|
string: t.label,
|
|
@@ -2950,32 +2950,32 @@ function $a(e) {
|
|
|
2950
2950
|
});
|
|
2951
2951
|
return /* @__PURE__ */ r(oo, { layout: "vertical", ooui: o, showLabel: !0 });
|
|
2952
2952
|
}
|
|
2953
|
-
case
|
|
2954
|
-
case
|
|
2955
|
-
case
|
|
2956
|
-
case
|
|
2953
|
+
case pt.float:
|
|
2954
|
+
case pt.progressbar:
|
|
2955
|
+
case pt.float_time:
|
|
2956
|
+
case pt.integer:
|
|
2957
2957
|
return /* @__PURE__ */ r(Aa, { ooui: t, showLabel: !0 });
|
|
2958
|
-
case
|
|
2958
|
+
case pt.date:
|
|
2959
2959
|
return /* @__PURE__ */ r(Ra, { ooui: t, layout: "vertical", showLabel: !0 });
|
|
2960
|
-
case
|
|
2960
|
+
case pt.datetime:
|
|
2961
2961
|
return /* @__PURE__ */ r(_a, { ooui: t, layout: "vertical", showLabel: !0 });
|
|
2962
|
-
case
|
|
2962
|
+
case pt.selection:
|
|
2963
2963
|
return /* @__PURE__ */ r(Ma, { layout: "vertical", ooui: t, showLabel: !0 });
|
|
2964
2964
|
default:
|
|
2965
2965
|
return /* @__PURE__ */ r(ro, { ooui: t, layout: "vertical", showLabel: !0, isSearchField: !0 });
|
|
2966
2966
|
}
|
|
2967
2967
|
}
|
|
2968
2968
|
function Ba(e) {
|
|
2969
|
-
const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: i, isSearching: o } = e, { t: s } =
|
|
2969
|
+
const { onAdvancedFilterToggle: t, advancedFilter: n, onClear: i, isSearching: o } = e, { t: s } = ge();
|
|
2970
2970
|
return /* @__PURE__ */ k(_e, { children: [
|
|
2971
2971
|
/* @__PURE__ */ r(de, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ k("a", { className: "text-xs", onClick: t, children: [
|
|
2972
2972
|
n ? /* @__PURE__ */ r(gi, { className: "pr-1" }) : /* @__PURE__ */ r(dn, { className: "pr-1" }),
|
|
2973
2973
|
s(n ? "simple_search" : "advanced_search")
|
|
2974
2974
|
] }) }),
|
|
2975
2975
|
/* @__PURE__ */ k(de, { span: 12, className: "text-right pb-2", children: [
|
|
2976
|
-
/* @__PURE__ */ r(
|
|
2976
|
+
/* @__PURE__ */ r(ke, { className: "mr-5", icon: /* @__PURE__ */ r(jn, {}), onClick: i, children: s("clear") }),
|
|
2977
2977
|
/* @__PURE__ */ r(
|
|
2978
|
-
|
|
2978
|
+
ke,
|
|
2979
2979
|
{
|
|
2980
2980
|
icon: /* @__PURE__ */ r(Wn, {}),
|
|
2981
2981
|
loading: o,
|
|
@@ -2989,7 +2989,7 @@ function Ba(e) {
|
|
|
2989
2989
|
] });
|
|
2990
2990
|
}
|
|
2991
2991
|
function Ha(e) {
|
|
2992
|
-
const { onLimitChange: t } = e, { t: n } =
|
|
2992
|
+
const { onLimitChange: t } = e, { t: n } = ge(), i = new In({ name: "limit" }), o = new In({ name: "offset" });
|
|
2993
2993
|
return /* @__PURE__ */ k("div", { className: "pl-2 pt-2", children: [
|
|
2994
2994
|
/* @__PURE__ */ r(_e, { children: n("parameters") }, "count_params"),
|
|
2995
2995
|
/* @__PURE__ */ k(Ue, { align: "center", children: [
|
|
@@ -3076,7 +3076,7 @@ const xr = (e) => typeof e == "string" && e === "true" || e === "false" ? e ===
|
|
|
3076
3076
|
return e.forEach((n) => {
|
|
3077
3077
|
Array.isArray(n) && n[0] ? t[n[0]] = !0 : t[n] = !0;
|
|
3078
3078
|
}), Object.keys(t);
|
|
3079
|
-
},
|
|
3079
|
+
}, jt = (e, t) => {
|
|
3080
3080
|
const n = [...e], i = za(e);
|
|
3081
3081
|
return t.forEach((o) => {
|
|
3082
3082
|
Array.isArray(o) && o[0] ? i.includes(o[0]) || n.push(o) : i.includes(o) || n.push(o);
|
|
@@ -3097,8 +3097,8 @@ function ho(e) {
|
|
|
3097
3097
|
searchError: c,
|
|
3098
3098
|
searchValues: m,
|
|
3099
3099
|
showLimitOptions: p = !0
|
|
3100
|
-
} = e, [h, g] = b(), [y, w] = b(), [x, S] = b(!1), C =
|
|
3101
|
-
|
|
3100
|
+
} = e, [h, g] = b(), [y, w] = b(), [x, S] = b(!1), C = le(), { token: R } = Ja(), [V] = ct.useForm();
|
|
3101
|
+
pe(() => {
|
|
3102
3102
|
V.setFieldsValue(m);
|
|
3103
3103
|
}, [m]);
|
|
3104
3104
|
const D = () => {
|
|
@@ -3107,7 +3107,7 @@ function ho(e) {
|
|
|
3107
3107
|
const O = x ? y : h, v = O == null ? void 0 : O.rows;
|
|
3108
3108
|
return v == null ? void 0 : v.map((_, A) => /* @__PURE__ */ r(_e, { children: _.map((L, G) => /* @__PURE__ */ r(de, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r($a, { field: L }) }, G)) }, A));
|
|
3109
3109
|
};
|
|
3110
|
-
|
|
3110
|
+
Ft(() => {
|
|
3111
3111
|
S(!1), C.current = new di(n, t), C.current.parse(), g(C.current._simpleSearchContainer), w(C.current._advancedSearchContainer);
|
|
3112
3112
|
}, [t, n]);
|
|
3113
3113
|
const F = D(), T = (O) => {
|
|
@@ -3130,7 +3130,7 @@ function ho(e) {
|
|
|
3130
3130
|
},
|
|
3131
3131
|
children: ({ measureRef: O }) => /* @__PURE__ */ r("div", { ref: O, children: /* @__PURE__ */ k("div", { style: { display: u ? "block" : "none" }, children: [
|
|
3132
3132
|
/* @__PURE__ */ k(
|
|
3133
|
-
|
|
3133
|
+
ct,
|
|
3134
3134
|
{
|
|
3135
3135
|
className: "p-3 shadow-md",
|
|
3136
3136
|
style: { borderRadius: R.borderRadius },
|
|
@@ -3196,7 +3196,7 @@ const Sr = (e, t = "14px -apple-system") => {
|
|
|
3196
3196
|
source: t,
|
|
3197
3197
|
tableWidth: o
|
|
3198
3198
|
};
|
|
3199
|
-
}, Qa =
|
|
3199
|
+
}, Qa = Nt.div`
|
|
3200
3200
|
display: flex;
|
|
3201
3201
|
align-items: center;
|
|
3202
3202
|
justify-content: center;
|
|
@@ -3207,7 +3207,7 @@ const Sr = (e, t = "14px -apple-system") => {
|
|
|
3207
3207
|
onSelectAllRecords: i,
|
|
3208
3208
|
numberOfRealSelectedRows: o
|
|
3209
3209
|
}) => {
|
|
3210
|
-
const [s, a] = b(!1), { t: l } =
|
|
3210
|
+
const [s, a] = b(!1), { t: l } = ge(), d = {
|
|
3211
3211
|
recordsSelected: l("recordsSelected"),
|
|
3212
3212
|
selectAllRecords: l("selectAllRecords"),
|
|
3213
3213
|
allRecordsSelected: l("allRecordsSelected")
|
|
@@ -3261,7 +3261,7 @@ function po(e) {
|
|
|
3261
3261
|
});
|
|
3262
3262
|
return t = `${o}:${s}`, e < 0 && (t = "-" + t), t;
|
|
3263
3263
|
}
|
|
3264
|
-
const tl = (e) => /* @__PURE__ */ r(
|
|
3264
|
+
const tl = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(go, {}) }), go = ({ value: e }) => {
|
|
3265
3265
|
const t = `${(e || 0).toLocaleString("en-US", {
|
|
3266
3266
|
minimumIntegerDigits: 1,
|
|
3267
3267
|
maximumFractionDigits: 4,
|
|
@@ -3271,7 +3271,7 @@ const tl = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(go,
|
|
|
3271
3271
|
/* @__PURE__ */ r(nl, { percent: e }),
|
|
3272
3272
|
/* @__PURE__ */ r("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: t })
|
|
3273
3273
|
] });
|
|
3274
|
-
}, nl =
|
|
3274
|
+
}, nl = Nt(ti)`
|
|
3275
3275
|
.ant-progress-outer {
|
|
3276
3276
|
margin-right: 0px;
|
|
3277
3277
|
padding-right: 0px;
|
|
@@ -3284,7 +3284,7 @@ const tl = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(go,
|
|
|
3284
3284
|
onItemClick: t,
|
|
3285
3285
|
onOpenChange: n
|
|
3286
3286
|
}) => {
|
|
3287
|
-
const [i, o] = b(!1), [s, a] = b(!1), { t: l } =
|
|
3287
|
+
const [i, o] = b(!1), [s, a] = b(!1), { t: l } = ge(), [d, u] = b(), f = fe(async () => {
|
|
3288
3288
|
const {
|
|
3289
3289
|
actionItems: c = [],
|
|
3290
3290
|
relateItems: m = [],
|
|
@@ -3356,8 +3356,8 @@ const tl = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(go,
|
|
|
3356
3356
|
)
|
|
3357
3357
|
] });
|
|
3358
3358
|
}, et = (e) => {
|
|
3359
|
-
const t =
|
|
3360
|
-
|
|
3359
|
+
const t = le(/* @__PURE__ */ new Map());
|
|
3360
|
+
pe(() => () => {
|
|
3361
3361
|
i();
|
|
3362
3362
|
}, []);
|
|
3363
3363
|
const n = fe(
|
|
@@ -3382,10 +3382,10 @@ const tl = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(go,
|
|
|
3382
3382
|
}, []);
|
|
3383
3383
|
return [n, i];
|
|
3384
3384
|
}, tr = (e) => {
|
|
3385
|
-
const { id: t, model: n, context: i = {} } = e, [o, s] = b(), [a, l] = b(), d =
|
|
3386
|
-
|
|
3387
|
-
), { openRelate: u } = d || {}, f =
|
|
3388
|
-
|
|
3385
|
+
const { id: t, model: n, context: i = {} } = e, [o, s] = b(), [a, l] = b(), d = ne(
|
|
3386
|
+
ut
|
|
3387
|
+
), { openRelate: u } = d || {}, f = ne(
|
|
3388
|
+
Pt
|
|
3389
3389
|
), { processAction: c } = f || {}, [m, p] = et(
|
|
3390
3390
|
E.getHandler().getView
|
|
3391
3391
|
), [h, g] = et(
|
|
@@ -3407,7 +3407,7 @@ const tl = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(go,
|
|
|
3407
3407
|
ids: [t],
|
|
3408
3408
|
fieldsToRetrieve: C,
|
|
3409
3409
|
context: i
|
|
3410
|
-
})) == null ? void 0 : V[0] }), R = { ...
|
|
3410
|
+
})) == null ? void 0 : V[0] }), R = { ...Ot(R, C), active_id: t }, l(R), !(!S || !S.toolbar))
|
|
3411
3411
|
return {
|
|
3412
3412
|
actionItems: S.toolbar.action,
|
|
3413
3413
|
relateItems: S.toolbar.relate,
|
|
@@ -3488,7 +3488,7 @@ const tl = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(go,
|
|
|
3488
3488
|
});
|
|
3489
3489
|
s(p[0][1]), l(!1);
|
|
3490
3490
|
}, [t, o]);
|
|
3491
|
-
if (
|
|
3491
|
+
if (pe(() => {
|
|
3492
3492
|
c();
|
|
3493
3493
|
}, [t]), !t && !a)
|
|
3494
3494
|
return /* @__PURE__ */ r(X, {});
|
|
@@ -3515,9 +3515,9 @@ const al = (e) => {
|
|
|
3515
3515
|
return null;
|
|
3516
3516
|
let i = n;
|
|
3517
3517
|
t.selectionValues.size ? i = t.selectionValues.get(n) : Array.isArray(n) && (i = n[1]);
|
|
3518
|
-
const o = i.toString().split(" ").filter((a) => a.length > 1).slice(0, 3).map((a) => a[0].toUpperCase()).join(""), s =
|
|
3519
|
-
return /* @__PURE__ */ r(
|
|
3520
|
-
}, { useToken: ll } = He,
|
|
3518
|
+
const o = i.toString().split(" ").filter((a) => a.length > 1).slice(0, 3).map((a) => a[0].toUpperCase()).join(""), s = Kt(i);
|
|
3519
|
+
return /* @__PURE__ */ r(gt, { title: i, children: /* @__PURE__ */ r(Nr, { alt: i, style: { backgroundColor: s }, children: o }) });
|
|
3520
|
+
}, { useToken: ll } = He, mt = {
|
|
3521
3521
|
date: {
|
|
3522
3522
|
placeholder: "__/__/____",
|
|
3523
3523
|
dateDisplayFormat: "DD/MM/YYYY",
|
|
@@ -3530,7 +3530,7 @@ const al = (e) => {
|
|
|
3530
3530
|
}
|
|
3531
3531
|
}, yo = (e) => {
|
|
3532
3532
|
const { ooui: t, showTime: n = !1 } = e, { required: i } = t;
|
|
3533
|
-
return /* @__PURE__ */ r(
|
|
3533
|
+
return /* @__PURE__ */ r(Ce, { required: i, ...e, children: /* @__PURE__ */ r(cl, { ooui: t, showTime: n }) });
|
|
3534
3534
|
}, cl = (e) => {
|
|
3535
3535
|
const { value: t, onChange: n, ooui: i, showTime: o } = e, { id: s, readOnly: a, required: l } = i, { token: d } = ll(), u = l && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, f = o ? "time" : "date", c = (h) => {
|
|
3536
3536
|
n == null || n(h);
|
|
@@ -3539,18 +3539,18 @@ const al = (e) => {
|
|
|
3539
3539
|
c(void 0);
|
|
3540
3540
|
return;
|
|
3541
3541
|
}
|
|
3542
|
-
c(h.format(
|
|
3543
|
-
}, p = t ? Qe(t,
|
|
3542
|
+
c(h.format(mt[f].dateInternalFormat));
|
|
3543
|
+
}, p = t ? Qe(t, mt[f].dateInternalFormat) : void 0;
|
|
3544
3544
|
return /* @__PURE__ */ r(
|
|
3545
3545
|
Ln,
|
|
3546
3546
|
{
|
|
3547
3547
|
style: { width: "100%", ...u },
|
|
3548
|
-
placeholder: o ?
|
|
3548
|
+
placeholder: o ? mt.time.placeholder : mt.date.placeholder,
|
|
3549
3549
|
disabled: a,
|
|
3550
3550
|
id: s,
|
|
3551
3551
|
picker: "date",
|
|
3552
3552
|
showTime: o,
|
|
3553
|
-
format:
|
|
3553
|
+
format: mt[f].dateDisplayFormat,
|
|
3554
3554
|
value: p,
|
|
3555
3555
|
onChange: m,
|
|
3556
3556
|
showNow: !1,
|
|
@@ -3569,7 +3569,7 @@ const al = (e) => {
|
|
|
3569
3569
|
justifyContent: "center",
|
|
3570
3570
|
alignContent: "center"
|
|
3571
3571
|
},
|
|
3572
|
-
children: /* @__PURE__ */ r(
|
|
3572
|
+
children: /* @__PURE__ */ r(Bt, { checked: e, disabled: !0 })
|
|
3573
3573
|
}
|
|
3574
3574
|
),
|
|
3575
3575
|
[e]
|
|
@@ -3586,16 +3586,16 @@ const al = (e) => {
|
|
|
3586
3586
|
return /* @__PURE__ */ r(X, {});
|
|
3587
3587
|
const t = Qe(
|
|
3588
3588
|
e,
|
|
3589
|
-
|
|
3590
|
-
).format(
|
|
3589
|
+
mt.date.dateInternalFormat
|
|
3590
|
+
).format(mt.date.dateDisplayFormat);
|
|
3591
3591
|
return /* @__PURE__ */ r(X, { children: t });
|
|
3592
3592
|
}, [e]), hl = ({ value: e }) => De(() => {
|
|
3593
3593
|
if (!e || e && e.length === 0)
|
|
3594
3594
|
return /* @__PURE__ */ r(X, {});
|
|
3595
3595
|
const t = Qe(
|
|
3596
3596
|
e,
|
|
3597
|
-
|
|
3598
|
-
).format(
|
|
3597
|
+
mt.time.dateInternalFormat
|
|
3598
|
+
).format(mt.time.dateDisplayFormat);
|
|
3599
3599
|
return /* @__PURE__ */ r(X, { children: t });
|
|
3600
3600
|
}, [e]), Tr = ({
|
|
3601
3601
|
value: e
|
|
@@ -3676,12 +3676,12 @@ const al = (e) => {
|
|
|
3676
3676
|
l(!1);
|
|
3677
3677
|
}
|
|
3678
3678
|
}, [i, u, d, e.items]);
|
|
3679
|
-
|
|
3679
|
+
pe(() => {
|
|
3680
3680
|
e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
|
|
3681
3681
|
}, [e == null ? void 0 : e.items]);
|
|
3682
3682
|
const c = De(
|
|
3683
3683
|
() => o.map((m) => {
|
|
3684
|
-
const { id: p, name: h } = m, g =
|
|
3684
|
+
const { id: p, name: h } = m, g = Kt(h);
|
|
3685
3685
|
return /* @__PURE__ */ r(er, { color: g, children: h }, `${p}`);
|
|
3686
3686
|
}),
|
|
3687
3687
|
[o]
|
|
@@ -3715,9 +3715,9 @@ const al = (e) => {
|
|
|
3715
3715
|
datetime: hl,
|
|
3716
3716
|
avatar: Cl,
|
|
3717
3717
|
tags: xl
|
|
3718
|
-
}, wo =
|
|
3718
|
+
}, wo = yt(
|
|
3719
3719
|
(e, t) => {
|
|
3720
|
-
var
|
|
3720
|
+
var ae;
|
|
3721
3721
|
const {
|
|
3722
3722
|
page: n = 1,
|
|
3723
3723
|
limit: i,
|
|
@@ -3741,8 +3741,8 @@ const al = (e) => {
|
|
|
3741
3741
|
context: R,
|
|
3742
3742
|
readonly: V,
|
|
3743
3743
|
onSelectAllRecords: D
|
|
3744
|
-
} = e, F =
|
|
3745
|
-
|
|
3744
|
+
} = e, F = le(null), [T, O] = b([]), v = le(!1), [_, A] = b(), { t: L } = ge(), G = le(i), B = ne(
|
|
3745
|
+
rt
|
|
3746
3746
|
), { title: q = void 0, setTitle: P = void 0 } = (C ? B : {}) || {}, Z = De(() => {
|
|
3747
3747
|
if (_)
|
|
3748
3748
|
return Hs(
|
|
@@ -3753,28 +3753,28 @@ const al = (e) => {
|
|
|
3753
3753
|
R
|
|
3754
3754
|
);
|
|
3755
3755
|
}, [R, _]);
|
|
3756
|
-
|
|
3756
|
+
wt(t, () => ({
|
|
3757
3757
|
unselectAll: () => {
|
|
3758
3758
|
var z;
|
|
3759
3759
|
(z = F.current) == null || z.unselectAll();
|
|
3760
3760
|
}
|
|
3761
|
-
})),
|
|
3762
|
-
const z =
|
|
3761
|
+
})), pe(() => {
|
|
3762
|
+
const z = At(s);
|
|
3763
3763
|
A(z), z.string && q !== z.string && (P == null || P(z.string));
|
|
3764
|
-
}, [s, q]),
|
|
3764
|
+
}, [s, q]), pe(() => {
|
|
3765
3765
|
if (!_)
|
|
3766
3766
|
return;
|
|
3767
3767
|
v.current = !1;
|
|
3768
3768
|
const z = ao(_, a);
|
|
3769
3769
|
O(z);
|
|
3770
|
-
}, [a]),
|
|
3770
|
+
}, [a]), pe(() => {
|
|
3771
3771
|
G.current = i;
|
|
3772
3772
|
}, [i]);
|
|
3773
3773
|
const ee = (n - 1) * G.current + 1, oe = ee - 1 + T.length, U = o === void 0 ? null : o === 0 ? L("no_results") : L("summary").replace("{from}", ee == null ? void 0 : ee.toString()).replace("{to}", oe == null ? void 0 : oe.toString()).replace("{total}", o == null ? void 0 : o.toString()), $ = De(() => {
|
|
3774
3774
|
if (!f || s.isExpandable)
|
|
3775
3775
|
return null;
|
|
3776
3776
|
const z = T == null ? void 0 : T.filter(
|
|
3777
|
-
(
|
|
3777
|
+
(re) => c && c.includes(re.id)
|
|
3778
3778
|
).length;
|
|
3779
3779
|
return d ? null : o === void 0 ? /* @__PURE__ */ r(Le, { className: "pb-4" }) : /* @__PURE__ */ k(_e, { align: "bottom", className: "pb-4", children: [
|
|
3780
3780
|
/* @__PURE__ */ r(de, { span: D ? 8 : 12, children: /* @__PURE__ */ r(
|
|
@@ -3816,16 +3816,16 @@ const al = (e) => {
|
|
|
3816
3816
|
const z = _.columns.filter((W) => W.sum !== void 0).map((W) => ({ label: W.sum, field: W.id }));
|
|
3817
3817
|
if (!z || z.length === 0)
|
|
3818
3818
|
return null;
|
|
3819
|
-
const
|
|
3819
|
+
const re = [], ve = (c == null ? void 0 : c.length) > 0 ? T.filter((W) => c.includes(W.id)) : T;
|
|
3820
3820
|
return z.forEach((W) => {
|
|
3821
|
-
const ce = ve.reduce((Te,
|
|
3822
|
-
|
|
3823
|
-
}), /* @__PURE__ */ r("div", { className: "p-1 pb-0 pl-2 mt-2 ", children:
|
|
3821
|
+
const ce = ve.reduce((Te, Ee) => Ee[W.field] && !isNaN(Ee[W.field]) ? Te + Ee[W.field] : Te, 0);
|
|
3822
|
+
re.push(`${W.label}: ${Math.round(ce * 100) / 100}`);
|
|
3823
|
+
}), /* @__PURE__ */ r("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: re.join(", ") });
|
|
3824
3824
|
}, [T, c, _]), N = De(() => {
|
|
3825
3825
|
if (_ !== null && Z && Z.length > 0)
|
|
3826
3826
|
return Xa(Z, T, 600);
|
|
3827
3827
|
}, [Z, T, _]), K = De(() => p && (_ != null && _.columns.some((z) => z.sum !== void 0)) ? p - 30 : p, [p, _ == null ? void 0 : _.columns]);
|
|
3828
|
-
return _ === null || !N || ((
|
|
3828
|
+
return _ === null || !N || ((ae = N == null ? void 0 : N.columns) == null ? void 0 : ae.length) === 0 ? /* @__PURE__ */ r(Le, { style: { padding: "2rem" } }) : /* @__PURE__ */ k(Zr, { children: [
|
|
3829
3829
|
$,
|
|
3830
3830
|
/* @__PURE__ */ r(
|
|
3831
3831
|
zi,
|
|
@@ -3861,8 +3861,8 @@ const al = (e) => {
|
|
|
3861
3861
|
I
|
|
3862
3862
|
] });
|
|
3863
3863
|
}
|
|
3864
|
-
),
|
|
3865
|
-
|
|
3864
|
+
), Xt = Dr(wo);
|
|
3865
|
+
Xt.displayName = "Tree";
|
|
3866
3866
|
wo.displayName = "UnmemoizedTree";
|
|
3867
3867
|
const vo = (e) => {
|
|
3868
3868
|
const {
|
|
@@ -3890,7 +3890,7 @@ const vo = (e) => {
|
|
|
3890
3890
|
searchParams: V = [],
|
|
3891
3891
|
setSearchValues: D,
|
|
3892
3892
|
clearSelection: F
|
|
3893
|
-
} = e, [T, O] = b(!1), [v, _] = b(!1), [A, L] = b(), [G, B] = b(1), [q, P] = b(0), [Z, ee] = b(), [oe, U] = b([]), [$, I] = b(void 0), [N, K] = b(void 0),
|
|
3893
|
+
} = e, [T, O] = b(!1), [v, _] = b(!1), [A, L] = b(), [G, B] = b(1), [q, P] = b(0), [Z, ee] = b(), [oe, U] = b([]), [$, I] = b(void 0), [N, K] = b(void 0), ae = le(C || St), z = le([]), re = fe(
|
|
3894
3894
|
(se) => {
|
|
3895
3895
|
y == null || y([...se]), U([...se]);
|
|
3896
3896
|
},
|
|
@@ -3899,33 +3899,33 @@ const vo = (e) => {
|
|
|
3899
3899
|
const se = await E.getHandler().nameSearch({
|
|
3900
3900
|
model: t,
|
|
3901
3901
|
payload: l,
|
|
3902
|
-
limit:
|
|
3902
|
+
limit: ae.current,
|
|
3903
3903
|
attrs: x,
|
|
3904
3904
|
context: u
|
|
3905
3905
|
});
|
|
3906
3906
|
if (ee(se.length), f == null || f(se.length), se.length > 0) {
|
|
3907
|
-
const Oe = se.map((we) => we == null ? void 0 : we[0]), { colors: We, status: Ke } =
|
|
3907
|
+
const Oe = se.map((we) => we == null ? void 0 : we[0]), { colors: We, status: Ke } = At(c), j = {};
|
|
3908
3908
|
We && (j.colors = We), Ke && (j.status = Ke);
|
|
3909
|
-
const
|
|
3909
|
+
const ye = await E.getHandler().readEvalUiObjects({
|
|
3910
3910
|
model: t,
|
|
3911
3911
|
ids: Oe,
|
|
3912
3912
|
arch: c == null ? void 0 : c.arch,
|
|
3913
3913
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
3914
3914
|
context: u,
|
|
3915
3915
|
attrs: j
|
|
3916
|
-
}),
|
|
3917
|
-
z.current = [...
|
|
3918
|
-
const ue =
|
|
3919
|
-
resultsToSort:
|
|
3916
|
+
}), Ve = ye[0];
|
|
3917
|
+
z.current = [...Ve], I(nn(ye[1])), K(wr(ye[1]));
|
|
3918
|
+
const ue = Ve.map((we) => we.id), he = p !== void 0 ? Dt({
|
|
3919
|
+
resultsToSort: Ve,
|
|
3920
3920
|
sorter: p,
|
|
3921
3921
|
fields: { ...c.fields, ...m.fields }
|
|
3922
3922
|
}) : [...z.current];
|
|
3923
|
-
|
|
3923
|
+
re(he), ue.length > 0 ? g == null || g(0) : g == null || g(void 0);
|
|
3924
3924
|
} else
|
|
3925
|
-
|
|
3925
|
+
re([]), g == null || g(void 0);
|
|
3926
3926
|
O(!1), d.current = !0;
|
|
3927
3927
|
}, [
|
|
3928
|
-
|
|
3928
|
+
re,
|
|
3929
3929
|
d,
|
|
3930
3930
|
l,
|
|
3931
3931
|
t,
|
|
@@ -3938,24 +3938,24 @@ const vo = (e) => {
|
|
|
3938
3938
|
f
|
|
3939
3939
|
]), ce = fe(
|
|
3940
3940
|
async (se) => {
|
|
3941
|
-
const { params: Oe, newOffset: We } = se || {}, Ke =
|
|
3942
|
-
j && (
|
|
3943
|
-
const { totalItems: ue, results:
|
|
3941
|
+
const { params: Oe, newOffset: We } = se || {}, Ke = jt(Oe || V, x), { colors: j, status: ye } = At(c), Ve = {};
|
|
3942
|
+
j && (Ve.colors = j), ye && (Ve.status = ye);
|
|
3943
|
+
const { totalItems: ue, results: he, attrsEvaluated: we } = await E.getHandler().searchForTree({
|
|
3944
3944
|
params: Ke,
|
|
3945
|
-
limit:
|
|
3945
|
+
limit: ae.current,
|
|
3946
3946
|
offset: We || q,
|
|
3947
3947
|
model: t,
|
|
3948
3948
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
3949
3949
|
context: u,
|
|
3950
|
-
attrs:
|
|
3950
|
+
attrs: Ve
|
|
3951
3951
|
});
|
|
3952
|
-
I(nn(we)), K(wr(we)), z.current = [...
|
|
3953
|
-
const ie = p !== void 0 ?
|
|
3954
|
-
resultsToSort:
|
|
3952
|
+
I(nn(we)), K(wr(we)), z.current = [...he];
|
|
3953
|
+
const ie = p !== void 0 ? Dt({
|
|
3954
|
+
resultsToSort: he,
|
|
3955
3955
|
sorter: p,
|
|
3956
3956
|
fields: { ...c.fields, ...m.fields }
|
|
3957
3957
|
}) : [...z.current];
|
|
3958
|
-
if (
|
|
3958
|
+
if (re(ie), w && ie.length > 0) {
|
|
3959
3959
|
const Ae = ie.findIndex(
|
|
3960
3960
|
(Y) => S === Y.id
|
|
3961
3961
|
);
|
|
@@ -3969,7 +3969,7 @@ const vo = (e) => {
|
|
|
3969
3969
|
[
|
|
3970
3970
|
g,
|
|
3971
3971
|
w,
|
|
3972
|
-
|
|
3972
|
+
re,
|
|
3973
3973
|
S,
|
|
3974
3974
|
t,
|
|
3975
3975
|
u,
|
|
@@ -4000,17 +4000,17 @@ const vo = (e) => {
|
|
|
4000
4000
|
i,
|
|
4001
4001
|
a
|
|
4002
4002
|
]
|
|
4003
|
-
),
|
|
4003
|
+
), Ee = fe(
|
|
4004
4004
|
(se) => {
|
|
4005
4005
|
if (JSON.stringify(se) === JSON.stringify(p))
|
|
4006
4006
|
return;
|
|
4007
4007
|
h == null || h(se);
|
|
4008
|
-
const Oe = se !== void 0 ?
|
|
4008
|
+
const Oe = se !== void 0 ? Dt({
|
|
4009
4009
|
resultsToSort: ve(),
|
|
4010
4010
|
sorter: se,
|
|
4011
4011
|
fields: { ...c.fields, ...m.fields }
|
|
4012
4012
|
}) : [...z.current];
|
|
4013
|
-
|
|
4013
|
+
re(Oe);
|
|
4014
4014
|
},
|
|
4015
4015
|
[
|
|
4016
4016
|
p,
|
|
@@ -4018,12 +4018,12 @@ const vo = (e) => {
|
|
|
4018
4018
|
ve,
|
|
4019
4019
|
c == null ? void 0 : c.fields,
|
|
4020
4020
|
m == null ? void 0 : m.fields,
|
|
4021
|
-
|
|
4021
|
+
re
|
|
4022
4022
|
]
|
|
4023
|
-
),
|
|
4023
|
+
), Ne = fe(
|
|
4024
4024
|
(se) => {
|
|
4025
4025
|
const { params: Oe, searchValues: We, limit: Ke, offset: j } = se;
|
|
4026
|
-
T || (n == null || n(void 0), i == null || i([]), D == null || D(We), o == null || o(Oe), s == null || s(!1), _(!0), L(void 0), B(1), Ke && (
|
|
4026
|
+
T || (n == null || n(void 0), i == null || i([]), D == null || D(We), o == null || o(Oe), s == null || s(!1), _(!0), L(void 0), B(1), Ke && (ae.current = Ke, R == null || R(Ke)), j && P(j), Te({
|
|
4027
4027
|
params: Oe,
|
|
4028
4028
|
newOffset: j
|
|
4029
4029
|
}));
|
|
@@ -4038,13 +4038,13 @@ const vo = (e) => {
|
|
|
4038
4038
|
Te,
|
|
4039
4039
|
R
|
|
4040
4040
|
]
|
|
4041
|
-
),
|
|
4041
|
+
), Me = fe(
|
|
4042
4042
|
(se) => {
|
|
4043
4043
|
O(!0), B(se), P((se - 1) * C);
|
|
4044
4044
|
},
|
|
4045
4045
|
[O, C, P, B]
|
|
4046
4046
|
), me = fe(() => {
|
|
4047
|
-
T || (n == null || n(void 0), o == null || o([]), D == null || D({}), L(void 0), P(0), B(1), R == null || R(C ||
|
|
4047
|
+
T || (n == null || n(void 0), o == null || o([]), D == null || D({}), L(void 0), P(0), B(1), R == null || R(C || St));
|
|
4048
4048
|
}, [
|
|
4049
4049
|
T,
|
|
4050
4050
|
n,
|
|
@@ -4060,17 +4060,17 @@ const vo = (e) => {
|
|
|
4060
4060
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
4061
4061
|
context: u
|
|
4062
4062
|
});
|
|
4063
|
-
return
|
|
4063
|
+
return re([...ve(), ...We]), ao(At(c), We);
|
|
4064
4064
|
},
|
|
4065
|
-
[c, t, u, ve,
|
|
4065
|
+
[c, t, u, ve, re]
|
|
4066
4066
|
), $e = fe(async () => await E.getHandler().searchAllIds({
|
|
4067
|
-
params:
|
|
4067
|
+
params: jt(V, x),
|
|
4068
4068
|
model: t,
|
|
4069
4069
|
context: u,
|
|
4070
4070
|
totalItems: Z
|
|
4071
4071
|
}), [t, u, Z, V, x]);
|
|
4072
4072
|
return {
|
|
4073
|
-
submit:
|
|
4073
|
+
submit: Ne,
|
|
4074
4074
|
clear: me,
|
|
4075
4075
|
fetchResults: Te,
|
|
4076
4076
|
tableRefreshing: T,
|
|
@@ -4078,10 +4078,10 @@ const vo = (e) => {
|
|
|
4078
4078
|
searchError: A,
|
|
4079
4079
|
page: G,
|
|
4080
4080
|
offset: q,
|
|
4081
|
-
limit:
|
|
4081
|
+
limit: ae.current,
|
|
4082
4082
|
getResults: ve,
|
|
4083
|
-
requestPageChange:
|
|
4084
|
-
changeSort:
|
|
4083
|
+
requestPageChange: Me,
|
|
4084
|
+
changeSort: Ee,
|
|
4085
4085
|
fetchChildrenForRecord: Fe,
|
|
4086
4086
|
colorsForResults: $,
|
|
4087
4087
|
statusForResults: N,
|
|
@@ -4090,7 +4090,7 @@ const vo = (e) => {
|
|
|
4090
4090
|
};
|
|
4091
4091
|
};
|
|
4092
4092
|
function Tl(e, t) {
|
|
4093
|
-
var
|
|
4093
|
+
var lt;
|
|
4094
4094
|
const {
|
|
4095
4095
|
model: n,
|
|
4096
4096
|
formView: i,
|
|
@@ -4103,10 +4103,10 @@ function Tl(e, t) {
|
|
|
4103
4103
|
rootTree: f = !1,
|
|
4104
4104
|
parentContext: c = {},
|
|
4105
4105
|
onChangeSelectedRowKeys: m
|
|
4106
|
-
} = e, [p, h] = b(!1), [g, y] = b(!1), w =
|
|
4107
|
-
|
|
4108
|
-
), { processAction: B } = G || {}, q =
|
|
4109
|
-
|
|
4106
|
+
} = e, [p, h] = b(!1), [g, y] = b(!1), w = le(!1), x = le(null), [S, C] = b(), [R, V] = b(), [D, F] = b(), [T, O] = b(), [v, _] = b(200), A = le(), { height: L } = hn(), G = ne(
|
|
4107
|
+
Pt
|
|
4108
|
+
), { processAction: B } = G || {}, q = ne(
|
|
4109
|
+
rt
|
|
4110
4110
|
), {
|
|
4111
4111
|
setResults: P = void 0,
|
|
4112
4112
|
setCurrentItemIndex: Z = void 0,
|
|
@@ -4117,19 +4117,19 @@ function Tl(e, t) {
|
|
|
4117
4117
|
searchParams: I = [],
|
|
4118
4118
|
setSearchParams: N = void 0,
|
|
4119
4119
|
searchVisible: K = !0,
|
|
4120
|
-
setSearchVisible:
|
|
4120
|
+
setSearchVisible: ae = void 0,
|
|
4121
4121
|
sorter: z = void 0,
|
|
4122
|
-
setSorter:
|
|
4122
|
+
setSorter: re = void 0,
|
|
4123
4123
|
setTotalItems: ve = void 0,
|
|
4124
4124
|
setSearchTreeNameSearch: W = void 0,
|
|
4125
4125
|
setTreeIsLoading: ce = void 0,
|
|
4126
4126
|
searchValues: Te = {},
|
|
4127
|
-
setSearchValues:
|
|
4128
|
-
limit:
|
|
4129
|
-
setLimit:
|
|
4127
|
+
setSearchValues: Ee = void 0,
|
|
4128
|
+
limit: Ne = St,
|
|
4129
|
+
setLimit: Me = void 0
|
|
4130
4130
|
} = (f ? q : {}) || {}, me = fe(
|
|
4131
|
-
(
|
|
4132
|
-
$ == null || $(
|
|
4131
|
+
(Pe) => {
|
|
4132
|
+
$ == null || $(Pe.map((ot) => ({ id: ot }))), m == null || m(Pe);
|
|
4133
4133
|
},
|
|
4134
4134
|
[m, $]
|
|
4135
4135
|
), {
|
|
@@ -4140,23 +4140,24 @@ function Tl(e, t) {
|
|
|
4140
4140
|
searchFilterLoading: We,
|
|
4141
4141
|
searchError: Ke,
|
|
4142
4142
|
page: j,
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4143
|
+
limit: ye,
|
|
4144
|
+
offset: Ve,
|
|
4145
|
+
getResults: ue,
|
|
4146
|
+
requestPageChange: he,
|
|
4147
|
+
changeSort: we,
|
|
4148
|
+
fetchChildrenForRecord: ie,
|
|
4149
|
+
colorsForResults: je,
|
|
4150
|
+
statusForResults: Ae,
|
|
4151
|
+
totalItems: Y,
|
|
4152
|
+
getAllIds: te
|
|
4152
4153
|
} = vo({
|
|
4153
4154
|
model: S,
|
|
4154
4155
|
setSearchTreeNameSearch: W,
|
|
4155
4156
|
setSelectedRowItems: me,
|
|
4156
4157
|
setSearchParams: N,
|
|
4157
|
-
setSearchValues:
|
|
4158
|
+
setSearchValues: Ee,
|
|
4158
4159
|
searchParams: I,
|
|
4159
|
-
setSearchVisible:
|
|
4160
|
+
setSearchVisible: ae,
|
|
4160
4161
|
setTreeIsLoading: ce,
|
|
4161
4162
|
nameSearch: a,
|
|
4162
4163
|
searchNameGetDoneRef: w,
|
|
@@ -4164,104 +4165,104 @@ function Tl(e, t) {
|
|
|
4164
4165
|
formView: D,
|
|
4165
4166
|
treeView: R,
|
|
4166
4167
|
sorter: z,
|
|
4167
|
-
setSorter:
|
|
4168
|
+
setSorter: re,
|
|
4168
4169
|
setCurrentItemIndex: Z,
|
|
4169
4170
|
setResultsActionView: P,
|
|
4170
4171
|
resultsActionView: oe,
|
|
4171
4172
|
domain: d,
|
|
4172
4173
|
currentId: ee,
|
|
4173
4174
|
setActionViewTotalItems: ve,
|
|
4174
|
-
limit:
|
|
4175
|
-
setLimit:
|
|
4176
|
-
clearSelection: (
|
|
4175
|
+
limit: Ne,
|
|
4176
|
+
setLimit: Me,
|
|
4177
|
+
clearSelection: (lt = x.current) == null ? void 0 : lt.unselectAll
|
|
4177
4178
|
});
|
|
4178
|
-
|
|
4179
|
+
wt(t, () => ({
|
|
4179
4180
|
refreshResults: () => {
|
|
4180
4181
|
w.current = !1, se();
|
|
4181
4182
|
},
|
|
4182
4183
|
getFields: () => R == null ? void 0 : R.fields,
|
|
4183
4184
|
getDomain: () => d
|
|
4184
|
-
})),
|
|
4185
|
+
})), pe(() => {
|
|
4185
4186
|
g && u && R && (w.current = !1, se());
|
|
4186
|
-
}, [j,
|
|
4187
|
-
const
|
|
4187
|
+
}, [j, Ve, g, u, a, R]);
|
|
4188
|
+
const Re = async () => {
|
|
4188
4189
|
y(!1), h(!0), O(void 0), ce == null || ce(!0);
|
|
4189
4190
|
try {
|
|
4190
|
-
await
|
|
4191
|
-
} catch (
|
|
4192
|
-
O(
|
|
4191
|
+
await xe(), y(!0);
|
|
4192
|
+
} catch (Pe) {
|
|
4193
|
+
O(Pe), ce == null || ce(!1);
|
|
4193
4194
|
} finally {
|
|
4194
4195
|
h(!1);
|
|
4195
4196
|
}
|
|
4196
|
-
},
|
|
4197
|
+
}, xe = async () => {
|
|
4197
4198
|
C(n);
|
|
4198
|
-
let
|
|
4199
|
-
i || (
|
|
4199
|
+
let Pe = i;
|
|
4200
|
+
i || (Pe = await E.getHandler().getView({
|
|
4200
4201
|
model: n,
|
|
4201
4202
|
type: "form",
|
|
4202
4203
|
context: c
|
|
4203
4204
|
}));
|
|
4204
|
-
let
|
|
4205
|
-
o || (
|
|
4205
|
+
let ot = o;
|
|
4206
|
+
o || (ot = await E.getHandler().getView({
|
|
4206
4207
|
model: n,
|
|
4207
4208
|
type: "tree",
|
|
4208
4209
|
context: c
|
|
4209
|
-
})), F(
|
|
4210
|
+
})), F(Pe), V(ot);
|
|
4210
4211
|
};
|
|
4211
|
-
|
|
4212
|
-
|
|
4212
|
+
pe(() => {
|
|
4213
|
+
Re();
|
|
4213
4214
|
}, [n]);
|
|
4214
|
-
const
|
|
4215
|
-
(
|
|
4216
|
-
|
|
4215
|
+
const Se = fe(
|
|
4216
|
+
(Pe) => {
|
|
4217
|
+
Me == null || Me(Pe);
|
|
4217
4218
|
},
|
|
4218
|
-
[
|
|
4219
|
-
),
|
|
4220
|
-
async (
|
|
4221
|
-
const { id:
|
|
4219
|
+
[Me]
|
|
4220
|
+
), Ie = fe(
|
|
4221
|
+
async (Pe) => {
|
|
4222
|
+
const { id: ot } = Pe;
|
|
4222
4223
|
A.current || (A.current = await E.getHandler().treeButOpen({
|
|
4223
4224
|
id: R.view_id,
|
|
4224
4225
|
model: S,
|
|
4225
4226
|
context: c
|
|
4226
4227
|
}));
|
|
4227
|
-
const
|
|
4228
|
+
const ft = A.current[0][2];
|
|
4228
4229
|
await (B == null ? void 0 : B({
|
|
4229
|
-
actionData:
|
|
4230
|
+
actionData: ft,
|
|
4230
4231
|
fields: R.fields,
|
|
4231
4232
|
values: {
|
|
4232
|
-
active_id:
|
|
4233
|
-
...
|
|
4233
|
+
active_id: ot,
|
|
4234
|
+
...Pe
|
|
4234
4235
|
},
|
|
4235
4236
|
context: c
|
|
4236
4237
|
}));
|
|
4237
4238
|
},
|
|
4238
4239
|
[S, c, B, R]
|
|
4239
|
-
),
|
|
4240
|
-
async (
|
|
4241
|
-
const { id:
|
|
4240
|
+
), Ze = fe(
|
|
4241
|
+
async (Pe) => {
|
|
4242
|
+
const { id: ot } = Pe;
|
|
4242
4243
|
if (R != null && R.isExpandable) {
|
|
4243
4244
|
try {
|
|
4244
|
-
await
|
|
4245
|
-
} catch (
|
|
4246
|
-
Je(
|
|
4245
|
+
await Ie(Pe);
|
|
4246
|
+
} catch (ft) {
|
|
4247
|
+
Je(ft);
|
|
4247
4248
|
}
|
|
4248
4249
|
return;
|
|
4249
4250
|
}
|
|
4250
4251
|
s({
|
|
4251
|
-
id:
|
|
4252
|
+
id: ot,
|
|
4252
4253
|
model: S,
|
|
4253
4254
|
formView: D,
|
|
4254
4255
|
treeView: R
|
|
4255
4256
|
});
|
|
4256
4257
|
},
|
|
4257
|
-
[S, D, s,
|
|
4258
|
-
),
|
|
4259
|
-
const
|
|
4260
|
-
$ == null || $(
|
|
4261
|
-
}, [
|
|
4262
|
-
() => U == null ? void 0 : U.map((
|
|
4258
|
+
[S, D, s, Ie, R]
|
|
4259
|
+
), Ye = fe(async () => {
|
|
4260
|
+
const Pe = await te();
|
|
4261
|
+
$ == null || $(Pe.map((ot) => ({ id: ot }))), m == null || m(Pe);
|
|
4262
|
+
}, [te, m, $]), bt = De(() => R != null && R.isExpandable ? L - 160 : L - (v + 240), [L, v, R == null ? void 0 : R.isExpandable]), at = De(
|
|
4263
|
+
() => U == null ? void 0 : U.map((Pe) => Pe.id),
|
|
4263
4264
|
[U]
|
|
4264
|
-
),
|
|
4265
|
+
), Qt = fe(() => !R || !D ? null : /* @__PURE__ */ k(X, { children: [
|
|
4265
4266
|
/* @__PURE__ */ r(
|
|
4266
4267
|
ho,
|
|
4267
4268
|
{
|
|
@@ -4271,11 +4272,11 @@ function Tl(e, t) {
|
|
|
4271
4272
|
R.search_fields
|
|
4272
4273
|
]),
|
|
4273
4274
|
onClear: $e,
|
|
4274
|
-
limit:
|
|
4275
|
-
offset:
|
|
4275
|
+
limit: Ne,
|
|
4276
|
+
offset: Ve,
|
|
4276
4277
|
isSearching: We,
|
|
4277
4278
|
onSubmit: Fe,
|
|
4278
|
-
onLimitChange:
|
|
4279
|
+
onLimitChange: Se,
|
|
4279
4280
|
setSearchFilterHeight: _,
|
|
4280
4281
|
searchError: Ke,
|
|
4281
4282
|
searchVisible: K,
|
|
@@ -4283,65 +4284,66 @@ function Tl(e, t) {
|
|
|
4283
4284
|
}
|
|
4284
4285
|
),
|
|
4285
4286
|
/* @__PURE__ */ r(
|
|
4286
|
-
|
|
4287
|
+
Xt,
|
|
4287
4288
|
{
|
|
4288
4289
|
ref: x,
|
|
4289
4290
|
context: c,
|
|
4290
|
-
total:
|
|
4291
|
-
limit:
|
|
4291
|
+
total: Y,
|
|
4292
|
+
limit: ye,
|
|
4292
4293
|
page: j,
|
|
4293
4294
|
treeView: R,
|
|
4294
|
-
results:
|
|
4295
|
-
onRequestPageChange:
|
|
4295
|
+
results: ue(),
|
|
4296
|
+
onRequestPageChange: he,
|
|
4296
4297
|
loading: Oe,
|
|
4297
|
-
onRowClicked:
|
|
4298
|
-
scrollY: l ||
|
|
4299
|
-
colorsForResults:
|
|
4300
|
-
statusForResults:
|
|
4301
|
-
selectedRowKeys:
|
|
4298
|
+
onRowClicked: Ze,
|
|
4299
|
+
scrollY: l || bt,
|
|
4300
|
+
colorsForResults: je,
|
|
4301
|
+
statusForResults: Ae,
|
|
4302
|
+
selectedRowKeys: at,
|
|
4302
4303
|
onRowSelectionChange: me,
|
|
4303
4304
|
sorter: z,
|
|
4304
|
-
onChangeSort:
|
|
4305
|
-
onFetchChildrenForRecord: R.isExpandable ?
|
|
4305
|
+
onChangeSort: we,
|
|
4306
|
+
onFetchChildrenForRecord: R.isExpandable ? ie : void 0,
|
|
4306
4307
|
childField: R.field_parent,
|
|
4307
4308
|
rootTree: f,
|
|
4308
|
-
onSelectAllRecords:
|
|
4309
|
+
onSelectAllRecords: Ye
|
|
4309
4310
|
}
|
|
4310
4311
|
)
|
|
4311
4312
|
] }), [
|
|
4312
|
-
|
|
4313
|
+
bt,
|
|
4313
4314
|
me,
|
|
4314
|
-
|
|
4315
|
+
we,
|
|
4315
4316
|
$e,
|
|
4317
|
+
je,
|
|
4316
4318
|
ie,
|
|
4317
|
-
we,
|
|
4318
4319
|
D,
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4320
|
+
ue,
|
|
4321
|
+
Ne,
|
|
4322
|
+
ye,
|
|
4323
|
+
Ve,
|
|
4324
|
+
Ze,
|
|
4325
|
+
Se,
|
|
4324
4326
|
j,
|
|
4325
4327
|
c,
|
|
4326
|
-
|
|
4328
|
+
he,
|
|
4327
4329
|
f,
|
|
4328
4330
|
Ke,
|
|
4329
4331
|
We,
|
|
4330
4332
|
Te,
|
|
4331
4333
|
K,
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
+
Ye,
|
|
4335
|
+
at,
|
|
4334
4336
|
z,
|
|
4335
|
-
|
|
4337
|
+
Ae,
|
|
4336
4338
|
Fe,
|
|
4337
4339
|
Oe,
|
|
4338
|
-
|
|
4340
|
+
Y,
|
|
4339
4341
|
l,
|
|
4340
4342
|
R
|
|
4341
|
-
]),
|
|
4342
|
-
return
|
|
4343
|
+
]), Lt = T || Ke;
|
|
4344
|
+
return Lt ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: Lt, type: "error", banner: !0 }) : /* @__PURE__ */ r("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ r(Le, {}) : Qt() });
|
|
4343
4345
|
}
|
|
4344
|
-
const bo =
|
|
4346
|
+
const bo = yt(Tl), Co = (e) => {
|
|
4345
4347
|
const {
|
|
4346
4348
|
visible: t,
|
|
4347
4349
|
onCloseModal: n,
|
|
@@ -4350,7 +4352,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4350
4352
|
nameSearch: s,
|
|
4351
4353
|
domain: a,
|
|
4352
4354
|
context: l = {}
|
|
4353
|
-
} = e, [d, u] = b(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } =
|
|
4355
|
+
} = e, [d, u] = b(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = ge(), [p, h] = b([]), g = async () => {
|
|
4354
4356
|
await new Promise((S) => setTimeout(S, 5)), n();
|
|
4355
4357
|
}, y = async (S) => {
|
|
4356
4358
|
const { id: C } = S;
|
|
@@ -4379,7 +4381,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4379
4381
|
/* @__PURE__ */ r(cn, {}),
|
|
4380
4382
|
/* @__PURE__ */ r(_e, { justify: "end", children: /* @__PURE__ */ k(Ue, { children: [
|
|
4381
4383
|
/* @__PURE__ */ r(
|
|
4382
|
-
|
|
4384
|
+
ke,
|
|
4383
4385
|
{
|
|
4384
4386
|
icon: /* @__PURE__ */ r(un, {}),
|
|
4385
4387
|
onClick: () => {
|
|
@@ -4389,9 +4391,9 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4389
4391
|
}
|
|
4390
4392
|
),
|
|
4391
4393
|
/* @__PURE__ */ r(
|
|
4392
|
-
|
|
4394
|
+
ke,
|
|
4393
4395
|
{
|
|
4394
|
-
icon: /* @__PURE__ */ r(
|
|
4396
|
+
icon: /* @__PURE__ */ r(Yt, {}),
|
|
4395
4397
|
onClick: () => {
|
|
4396
4398
|
w();
|
|
4397
4399
|
},
|
|
@@ -4399,7 +4401,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4399
4401
|
children: m("ok")
|
|
4400
4402
|
}
|
|
4401
4403
|
),
|
|
4402
|
-
/* @__PURE__ */ r(
|
|
4404
|
+
/* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ut, {}), onClick: g, children: m("cancel") })
|
|
4403
4405
|
] }) })
|
|
4404
4406
|
] });
|
|
4405
4407
|
return /* @__PURE__ */ k(X, { children: [
|
|
@@ -4419,7 +4421,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4419
4421
|
}
|
|
4420
4422
|
),
|
|
4421
4423
|
/* @__PURE__ */ r(
|
|
4422
|
-
|
|
4424
|
+
Jt,
|
|
4423
4425
|
{
|
|
4424
4426
|
model: o,
|
|
4425
4427
|
visible: d,
|
|
@@ -4436,13 +4438,13 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4436
4438
|
}, { error: Fl } = ze, on = (e) => {
|
|
4437
4439
|
Fl({
|
|
4438
4440
|
title: "Error",
|
|
4439
|
-
icon: /* @__PURE__ */ r(
|
|
4441
|
+
icon: /* @__PURE__ */ r(vt, {}),
|
|
4440
4442
|
centered: !0,
|
|
4441
4443
|
content: e
|
|
4442
4444
|
});
|
|
4443
4445
|
}, { defaultAlgorithm: Rl, defaultSeed: _l } = He, xo = Rl(_l), Ol = (e) => {
|
|
4444
4446
|
const { ooui: t } = e, { required: n } = t;
|
|
4445
|
-
return /* @__PURE__ */ r(
|
|
4447
|
+
return /* @__PURE__ */ r(Ce, { required: n, type: "array", validator: async (o, s) => {
|
|
4446
4448
|
if (!s)
|
|
4447
4449
|
throw new Error();
|
|
4448
4450
|
if (!Array.isArray(s))
|
|
@@ -4458,10 +4460,10 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4458
4460
|
context: l,
|
|
4459
4461
|
id: d,
|
|
4460
4462
|
domain: u
|
|
4461
|
-
} = i, f = o && !a ? { backgroundColor: xo.colorPrimaryBg } : void 0, [c, m] = b(!1), [p, h] = b(!1), [g, y] = b(!1), [w, x] = b(), S =
|
|
4462
|
-
|
|
4463
|
+
} = i, f = o && !a ? { backgroundColor: xo.colorPrimaryBg } : void 0, [c, m] = b(!1), [p, h] = b(!1), [g, y] = b(!1), [w, x] = b(), S = le(!1), [C, R] = b(""), V = le(), D = ne(Be), { domain: F, getValues: T, getFields: O, getContext: v, elementHasLostFocus: _ } = D || {}, A = le([]), [L, G] = b([]), B = t && t[0] || void 0, q = t && t[1] || "";
|
|
4464
|
+
pe(() => {
|
|
4463
4465
|
!Array.isArray(t) && t && U(t);
|
|
4464
|
-
}, [t]),
|
|
4466
|
+
}, [t]), pe(() => {
|
|
4465
4467
|
B && q.length === 0 ? U(B) : B && q.length > 0 ? R(q) : !B && !q && R(V.current || "");
|
|
4466
4468
|
}, [t]);
|
|
4467
4469
|
const P = (K) => {
|
|
@@ -4494,28 +4496,28 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4494
4496
|
}
|
|
4495
4497
|
}, oe = async (K) => {
|
|
4496
4498
|
if (await $(), A.current && A.current.length > 0) {
|
|
4497
|
-
const
|
|
4499
|
+
const ae = await E.getHandler().searchAllIds({
|
|
4498
4500
|
params: A.current,
|
|
4499
4501
|
model: s,
|
|
4500
4502
|
context: { ...v == null ? void 0 : v(), ...l },
|
|
4501
4503
|
totalItems: 2
|
|
4502
4504
|
});
|
|
4503
|
-
|
|
4505
|
+
ae.length === 1 ? U(ae[0]) : (x(K), m(!0));
|
|
4504
4506
|
return;
|
|
4505
4507
|
}
|
|
4506
4508
|
x(K), m(!0);
|
|
4507
4509
|
}, U = async (K) => {
|
|
4508
4510
|
y(!0);
|
|
4509
4511
|
try {
|
|
4510
|
-
const
|
|
4512
|
+
const ae = await E.getHandler().execute({
|
|
4511
4513
|
action: "name_get",
|
|
4512
4514
|
payload: [K],
|
|
4513
4515
|
model: s,
|
|
4514
4516
|
context: { ...v == null ? void 0 : v(), ...l }
|
|
4515
4517
|
});
|
|
4516
|
-
P([K,
|
|
4517
|
-
} catch (
|
|
4518
|
-
on(
|
|
4518
|
+
P([K, ae[0][1]]);
|
|
4519
|
+
} catch (ae) {
|
|
4520
|
+
on(ae);
|
|
4519
4521
|
} finally {
|
|
4520
4522
|
y(!1);
|
|
4521
4523
|
}
|
|
@@ -4523,7 +4525,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4523
4525
|
async function $() {
|
|
4524
4526
|
u && (A.current = await E.getHandler().evalDomain({
|
|
4525
4527
|
domain: u,
|
|
4526
|
-
values:
|
|
4528
|
+
values: Mt({
|
|
4527
4529
|
fields: O(),
|
|
4528
4530
|
values: T()
|
|
4529
4531
|
}),
|
|
@@ -4565,7 +4567,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4565
4567
|
}
|
|
4566
4568
|
) }),
|
|
4567
4569
|
/* @__PURE__ */ r(de, { flex: "none", style: { paddingRight: 0, paddingLeft: 0 }, children: /* @__PURE__ */ r(
|
|
4568
|
-
|
|
4570
|
+
ke,
|
|
4569
4571
|
{
|
|
4570
4572
|
icon: /* @__PURE__ */ r(Hn, {}),
|
|
4571
4573
|
disabled: B === void 0 || q === "" || C === void 0,
|
|
@@ -4577,7 +4579,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4577
4579
|
}
|
|
4578
4580
|
) }),
|
|
4579
4581
|
/* @__PURE__ */ r(de, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ r(
|
|
4580
|
-
|
|
4582
|
+
ke,
|
|
4581
4583
|
{
|
|
4582
4584
|
icon: g ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(Wn, {}),
|
|
4583
4585
|
disabled: a || g,
|
|
@@ -4605,7 +4607,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4605
4607
|
}
|
|
4606
4608
|
),
|
|
4607
4609
|
/* @__PURE__ */ r(
|
|
4608
|
-
|
|
4610
|
+
Jt,
|
|
4609
4611
|
{
|
|
4610
4612
|
model: s,
|
|
4611
4613
|
parentContext: { ...v == null ? void 0 : v(), ...l },
|
|
@@ -4622,11 +4624,11 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4622
4624
|
}
|
|
4623
4625
|
)
|
|
4624
4626
|
] });
|
|
4625
|
-
}, Il =
|
|
4627
|
+
}, Il = Nt(it)`
|
|
4626
4628
|
.ant-input {
|
|
4627
4629
|
background-color: ${xo.colorPrimaryBg};
|
|
4628
4630
|
}
|
|
4629
|
-
`, To =
|
|
4631
|
+
`, To = nt.createContext(
|
|
4630
4632
|
null
|
|
4631
4633
|
), Vl = ({
|
|
4632
4634
|
children: e,
|
|
@@ -4671,7 +4673,7 @@ const bo = pt(Tl), Co = (e) => {
|
|
|
4671
4673
|
), [P] = et(
|
|
4672
4674
|
E.getHandler().parseCondition
|
|
4673
4675
|
);
|
|
4674
|
-
|
|
4676
|
+
pe(() => {
|
|
4675
4677
|
oe();
|
|
4676
4678
|
}, [t, o]);
|
|
4677
4679
|
async function Z({
|
|
@@ -4827,7 +4829,7 @@ function Dl({
|
|
|
4827
4829
|
`bold ${Math.floor(d * 1.03)}px sans-serif`
|
|
4828
4830
|
);
|
|
4829
4831
|
a && (c = c * 2), c >= t * 0.85 && (d = t * 0.85 / c * d);
|
|
4830
|
-
const m = a &&
|
|
4832
|
+
const m = a && dt(a, { style: { fontSize: d * 0.7 } });
|
|
4831
4833
|
return /* @__PURE__ */ r(
|
|
4832
4834
|
"div",
|
|
4833
4835
|
{
|
|
@@ -4875,7 +4877,7 @@ function kl({
|
|
|
4875
4877
|
`bold ${Math.floor(f * 1.03)}px sans-serif`
|
|
4876
4878
|
);
|
|
4877
4879
|
l && (h = h * 1.5), (h >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / h * f);
|
|
4878
|
-
const g = l &&
|
|
4880
|
+
const g = l && dt(l, { style: { fontSize: f } });
|
|
4879
4881
|
return /* @__PURE__ */ r(
|
|
4880
4882
|
"div",
|
|
4881
4883
|
{
|
|
@@ -5190,7 +5192,7 @@ const jl = {
|
|
|
5190
5192
|
pie: Bi
|
|
5191
5193
|
}, Wl = (e) => {
|
|
5192
5194
|
var x;
|
|
5193
|
-
const { model: t, domain: n, context: i, xml: o, limit: s, manualIds: a } = e, { t: l } =
|
|
5195
|
+
const { model: t, domain: n, context: i, xml: o, limit: s, manualIds: a } = e, { t: l } = ge(), { error: d, loading: u, values: f, type: c, evaluatedEntries: m, fetchData: p } = Bl({
|
|
5194
5196
|
model: t,
|
|
5195
5197
|
xml: o,
|
|
5196
5198
|
limit: s,
|
|
@@ -5199,7 +5201,7 @@ const jl = {
|
|
|
5199
5201
|
uninformedString: l("uninformed"),
|
|
5200
5202
|
manualIds: a
|
|
5201
5203
|
});
|
|
5202
|
-
if (
|
|
5204
|
+
if (Ft(() => {
|
|
5203
5205
|
p();
|
|
5204
5206
|
}, [o, t, s, i, n]), u)
|
|
5205
5207
|
return /* @__PURE__ */ r(Le, {});
|
|
@@ -5234,14 +5236,14 @@ function Ul(e) {
|
|
|
5234
5236
|
return s || (s = { ..._r.default }), s.data = n, t === "pie" ? (s.colorField = "x", s.angleField = "value") : (s.xField = "x", s.yField = "value", s.seriesField = "type", s.isGroup = i, o && (s.isStack = !0, s.groupField = "stacked")), s;
|
|
5235
5237
|
}
|
|
5236
5238
|
const Yl = (e, t) => {
|
|
5237
|
-
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 =
|
|
5238
|
-
|
|
5239
|
+
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(
|
|
5240
|
+
rt
|
|
5239
5241
|
), { setGraphIsLoading: g = void 0 } = h || {}, [y] = et(E.getHandler().getView);
|
|
5240
|
-
|
|
5242
|
+
wt(t, () => ({
|
|
5241
5243
|
refresh: () => {
|
|
5242
5244
|
w();
|
|
5243
5245
|
}
|
|
5244
|
-
})),
|
|
5246
|
+
})), pe(() => {
|
|
5245
5247
|
w();
|
|
5246
5248
|
}, [n]);
|
|
5247
5249
|
async function w() {
|
|
@@ -5317,13 +5319,13 @@ const Yl = (e, t) => {
|
|
|
5317
5319
|
default:
|
|
5318
5320
|
return /* @__PURE__ */ r(X, { children: `Graph ${f.type} not implemented` });
|
|
5319
5321
|
}
|
|
5320
|
-
}, gn =
|
|
5322
|
+
}, gn = yt(Yl), { confirm: Gl } = ze, ql = ({
|
|
5321
5323
|
onOk: e,
|
|
5322
5324
|
t
|
|
5323
5325
|
}) => {
|
|
5324
5326
|
Gl({
|
|
5325
5327
|
title: t("removeItems"),
|
|
5326
|
-
icon: /* @__PURE__ */ r(
|
|
5328
|
+
icon: /* @__PURE__ */ r(vt, {}),
|
|
5327
5329
|
centered: !0,
|
|
5328
5330
|
content: t("confirmRemove"),
|
|
5329
5331
|
okText: t("yesConfirmRemove"),
|
|
@@ -5336,7 +5338,7 @@ const Yl = (e, t) => {
|
|
|
5336
5338
|
}) => {
|
|
5337
5339
|
zl({
|
|
5338
5340
|
title: t("unlinkItems"),
|
|
5339
|
-
icon: /* @__PURE__ */ r(
|
|
5341
|
+
icon: /* @__PURE__ */ r(vt, {}),
|
|
5340
5342
|
centered: !0,
|
|
5341
5343
|
content: t("confirmUnlink"),
|
|
5342
5344
|
okText: t("yesConfirmUnlink"),
|
|
@@ -5469,17 +5471,17 @@ function ec(e) {
|
|
|
5469
5471
|
}
|
|
5470
5472
|
const tc = (e) => {
|
|
5471
5473
|
var Ae;
|
|
5472
|
-
const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } =
|
|
5474
|
+
const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = ne(
|
|
5473
5475
|
To
|
|
5474
|
-
), f =
|
|
5476
|
+
), f = ne(Be), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = ge(), [w, x] = b(!1), [S, C] = b(!1), [R, V] = b(), [D, F] = b(!1), [T, O] = b(!1), [v, _] = b(), [A, L] = b([]), [G, B] = b(!1), q = le([]), [P, Z] = b(), ee = le(), [oe, U] = b(void 0), {
|
|
5475
5477
|
readOnly: $,
|
|
5476
5478
|
relation: I,
|
|
5477
5479
|
context: N,
|
|
5478
5480
|
domain: K
|
|
5479
|
-
} = i,
|
|
5481
|
+
} = i, ae = i.type === "many2many", { id: z } = i, re = s.filter(
|
|
5480
5482
|
(Y) => (Y.values || Y.treeValues) && Y.operation !== "pendingRemove"
|
|
5481
|
-
), ve =
|
|
5482
|
-
|
|
5483
|
+
), ve = le();
|
|
5484
|
+
pe(() => {
|
|
5483
5485
|
if (ve.current !== a) {
|
|
5484
5486
|
ve.current = a, W();
|
|
5485
5487
|
return;
|
|
@@ -5489,28 +5491,28 @@ const tc = (e) => {
|
|
|
5489
5491
|
const W = fe(() => {
|
|
5490
5492
|
(a === "form" && s.some((Y) => !Y.values) || a === "tree" && s.some((Y) => !Y.treeValues)) && Te();
|
|
5491
5493
|
}, [s, a]);
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
+
pe(() => {
|
|
5495
|
+
Ne();
|
|
5494
5496
|
}, [g]);
|
|
5495
5497
|
const ce = (Y) => {
|
|
5496
|
-
var
|
|
5498
|
+
var te, Re;
|
|
5497
5499
|
n == null || n({
|
|
5498
|
-
fields: ((
|
|
5500
|
+
fields: ((te = o.get("form")) == null ? void 0 : te.fields) || ((Re = o.get("tree")) == null ? void 0 : Re.fields),
|
|
5499
5501
|
items: ec(Y)
|
|
5500
5502
|
});
|
|
5501
5503
|
}, Te = async () => {
|
|
5502
|
-
await
|
|
5503
|
-
},
|
|
5504
|
-
var
|
|
5504
|
+
await Ee(), d > re.length - 1 && d !== 0 && u(0);
|
|
5505
|
+
}, Ee = async (Y) => {
|
|
5506
|
+
var te, Re, xe;
|
|
5505
5507
|
C(!0), x(!1), V(void 0);
|
|
5506
5508
|
try {
|
|
5507
5509
|
const [Se, Ie] = await Zn({
|
|
5508
5510
|
treeView: {
|
|
5509
|
-
arch: (
|
|
5511
|
+
arch: (te = o.get("tree")) == null ? void 0 : te.arch,
|
|
5510
5512
|
fields: (Re = o.get("tree")) == null ? void 0 : Re.fields
|
|
5511
5513
|
},
|
|
5512
5514
|
formView: {
|
|
5513
|
-
fields: ((
|
|
5515
|
+
fields: ((xe = o.get("form")) == null ? void 0 : xe.fields) || {}
|
|
5514
5516
|
},
|
|
5515
5517
|
model: I,
|
|
5516
5518
|
items: s,
|
|
@@ -5524,10 +5526,10 @@ const tc = (e) => {
|
|
|
5524
5526
|
C(!1);
|
|
5525
5527
|
}
|
|
5526
5528
|
};
|
|
5527
|
-
async function
|
|
5529
|
+
async function Ne() {
|
|
5528
5530
|
K && (q.current = await E.getHandler().evalDomain({
|
|
5529
5531
|
domain: K,
|
|
5530
|
-
values:
|
|
5532
|
+
values: Mt({
|
|
5531
5533
|
fields: m(),
|
|
5532
5534
|
values: p()
|
|
5533
5535
|
}),
|
|
@@ -5540,22 +5542,22 @@ const tc = (e) => {
|
|
|
5540
5542
|
})
|
|
5541
5543
|
));
|
|
5542
5544
|
}
|
|
5543
|
-
const
|
|
5544
|
-
const Y = Array.from(o.keys()),
|
|
5545
|
+
const Me = () => {
|
|
5546
|
+
const Y = Array.from(o.keys()), te = Y[(Y.indexOf(a) + 1) % Y.length];
|
|
5545
5547
|
a === "form" ? se(() => {
|
|
5546
|
-
l(
|
|
5547
|
-
}) : l(
|
|
5548
|
+
l(te);
|
|
5549
|
+
}) : l(te);
|
|
5548
5550
|
}, me = () => {
|
|
5549
5551
|
d > 0 && (a === "form" ? se(() => {
|
|
5550
5552
|
u(d - 1);
|
|
5551
5553
|
}) : u(d - 1));
|
|
5552
5554
|
}, Fe = () => {
|
|
5553
|
-
const Y =
|
|
5555
|
+
const Y = re.length;
|
|
5554
5556
|
d < Y - 1 && (a === "form" ? se(() => {
|
|
5555
5557
|
u(d + 1);
|
|
5556
5558
|
}) : u(d + 1));
|
|
5557
5559
|
}, $e = async () => {
|
|
5558
|
-
const Y =
|
|
5560
|
+
const Y = re[d].id, te = (await E.getHandler().readObjects({
|
|
5559
5561
|
model: I,
|
|
5560
5562
|
ids: [Y],
|
|
5561
5563
|
fields: o.get("form").fields,
|
|
@@ -5565,26 +5567,26 @@ const tc = (e) => {
|
|
|
5565
5567
|
ids: [Y],
|
|
5566
5568
|
fields: o.get("tree").fields,
|
|
5567
5569
|
context: { ...h == null ? void 0 : h(), ...N }
|
|
5568
|
-
}))[0],
|
|
5570
|
+
}))[0], xe = s.map((Se) => Se.id === Y ? {
|
|
5569
5571
|
...Se,
|
|
5570
5572
|
operation: "original",
|
|
5571
|
-
values:
|
|
5573
|
+
values: te,
|
|
5572
5574
|
treeValues: Re
|
|
5573
5575
|
} : Se);
|
|
5574
|
-
ce(
|
|
5576
|
+
ce(xe);
|
|
5575
5577
|
}, se = (Y) => {
|
|
5576
|
-
w ?
|
|
5578
|
+
w ? qt({
|
|
5577
5579
|
t: y,
|
|
5578
5580
|
onOk: () => {
|
|
5579
5581
|
$e(), Y(), x(!1);
|
|
5580
5582
|
}
|
|
5581
5583
|
}) : Y();
|
|
5582
5584
|
}, Oe = () => {
|
|
5583
|
-
if (
|
|
5585
|
+
if (ae) {
|
|
5584
5586
|
Jl({
|
|
5585
5587
|
t: y,
|
|
5586
5588
|
onOk: () => {
|
|
5587
|
-
a === "form" ? j() :
|
|
5589
|
+
a === "form" ? j() : ye();
|
|
5588
5590
|
}
|
|
5589
5591
|
});
|
|
5590
5592
|
return;
|
|
@@ -5592,15 +5594,15 @@ const tc = (e) => {
|
|
|
5592
5594
|
ql({
|
|
5593
5595
|
t: y,
|
|
5594
5596
|
onOk: () => {
|
|
5595
|
-
a === "form" ? j() :
|
|
5597
|
+
a === "form" ? j() : ye();
|
|
5596
5598
|
}
|
|
5597
5599
|
});
|
|
5598
5600
|
}, We = async () => {
|
|
5599
5601
|
const { inv_field: Y } = i;
|
|
5600
|
-
let
|
|
5601
|
-
Y && c && (
|
|
5602
|
-
B(!0), _({ defaultValues:
|
|
5603
|
-
}) : (B(!0), _({ defaultValues:
|
|
5602
|
+
let te;
|
|
5603
|
+
Y && c && (te = { [Y]: c }), a === "form" ? se(() => {
|
|
5604
|
+
B(!0), _({ defaultValues: te }), F(!0);
|
|
5605
|
+
}) : (B(!0), _({ defaultValues: te }), F(!0));
|
|
5604
5606
|
}, Ke = async () => {
|
|
5605
5607
|
a === "form" ? se(() => {
|
|
5606
5608
|
O(!0);
|
|
@@ -5608,36 +5610,36 @@ const tc = (e) => {
|
|
|
5608
5610
|
}, j = async () => {
|
|
5609
5611
|
C(!0), x(!1), V(void 0);
|
|
5610
5612
|
try {
|
|
5611
|
-
if (
|
|
5612
|
-
const Y = s.map((
|
|
5613
|
-
...
|
|
5613
|
+
if (re[d].id > 0) {
|
|
5614
|
+
const Y = s.map((te) => te.id === re[d].id ? {
|
|
5615
|
+
...te,
|
|
5614
5616
|
operation: "pendingRemove"
|
|
5615
|
-
} :
|
|
5617
|
+
} : te);
|
|
5616
5618
|
ce(Y);
|
|
5617
5619
|
} else
|
|
5618
5620
|
ce(
|
|
5619
|
-
s.filter((Y) => Y.id !==
|
|
5621
|
+
s.filter((Y) => Y.id !== re[d].id)
|
|
5620
5622
|
);
|
|
5621
5623
|
} catch (Y) {
|
|
5622
5624
|
V(Y);
|
|
5623
5625
|
}
|
|
5624
5626
|
u(0), C(!1);
|
|
5625
|
-
},
|
|
5626
|
-
const Y =
|
|
5627
|
+
}, ye = async () => {
|
|
5628
|
+
const Y = re.filter((te) => A.includes(te.id));
|
|
5627
5629
|
C(!0), x(!1), V(void 0);
|
|
5628
5630
|
try {
|
|
5629
|
-
const
|
|
5630
|
-
...
|
|
5631
|
+
const te = Y.map((xe) => xe.id), Re = s.filter((xe) => !(te.includes(xe.id) && xe.id < 0)).map((xe) => te.includes(xe.id) ? {
|
|
5632
|
+
...xe,
|
|
5631
5633
|
operation: "pendingRemove"
|
|
5632
|
-
} :
|
|
5634
|
+
} : xe);
|
|
5633
5635
|
ce(Re);
|
|
5634
|
-
} catch (
|
|
5635
|
-
V(
|
|
5636
|
+
} catch (te) {
|
|
5637
|
+
V(te);
|
|
5636
5638
|
}
|
|
5637
5639
|
u(0), C(!1);
|
|
5638
|
-
},
|
|
5640
|
+
}, Ve = (Y, te, Re, xe = !1) => {
|
|
5639
5641
|
let Se;
|
|
5640
|
-
if (
|
|
5642
|
+
if (xe)
|
|
5641
5643
|
Se = s.concat({
|
|
5642
5644
|
id: Y,
|
|
5643
5645
|
operation: "pendingLink",
|
|
@@ -5662,36 +5664,36 @@ const tc = (e) => {
|
|
|
5662
5664
|
}
|
|
5663
5665
|
ce(Se), G || F(!1);
|
|
5664
5666
|
}, ue = async (Y) => {
|
|
5665
|
-
const { id:
|
|
5667
|
+
const { id: te } = Y;
|
|
5666
5668
|
let Re = s;
|
|
5667
|
-
const
|
|
5668
|
-
(
|
|
5669
|
-
},
|
|
5669
|
+
const xe = s.find((Se) => Se.id === te);
|
|
5670
|
+
(xe == null ? void 0 : xe.values) === void 0 && (Re = await Ee("form")), _(Re.find((Se) => Se.id === te)), B(!1), F(!0);
|
|
5671
|
+
}, he = async (Y) => {
|
|
5670
5672
|
C(!0);
|
|
5671
|
-
const
|
|
5673
|
+
const te = s, Re = Y.filter((xe) => !s.find((Se) => Se.id === xe));
|
|
5672
5674
|
try {
|
|
5673
|
-
for (const
|
|
5675
|
+
for (const xe of Re) {
|
|
5674
5676
|
const Se = (await E.getHandler().readObjects({
|
|
5675
5677
|
model: I,
|
|
5676
|
-
ids: [
|
|
5678
|
+
ids: [xe],
|
|
5677
5679
|
fields: o.get("form").fields,
|
|
5678
5680
|
context: { ...h == null ? void 0 : h(), ...N }
|
|
5679
5681
|
}))[0], Ie = (await E.getHandler().readObjects({
|
|
5680
5682
|
model: I,
|
|
5681
|
-
ids: [
|
|
5683
|
+
ids: [xe],
|
|
5682
5684
|
fields: o.get("tree").fields,
|
|
5683
5685
|
context: { ...h == null ? void 0 : h(), ...N }
|
|
5684
5686
|
}))[0];
|
|
5685
|
-
|
|
5686
|
-
id:
|
|
5687
|
+
te.push({
|
|
5688
|
+
id: xe,
|
|
5687
5689
|
operation: "pendingLink",
|
|
5688
5690
|
values: Se,
|
|
5689
5691
|
treeValues: Ie
|
|
5690
5692
|
});
|
|
5691
5693
|
}
|
|
5692
|
-
ce(
|
|
5693
|
-
} catch (
|
|
5694
|
-
V(
|
|
5694
|
+
ce(te);
|
|
5695
|
+
} catch (xe) {
|
|
5696
|
+
V(xe);
|
|
5695
5697
|
} finally {
|
|
5696
5698
|
C(!1);
|
|
5697
5699
|
}
|
|
@@ -5701,49 +5703,49 @@ const tc = (e) => {
|
|
|
5701
5703
|
if (a === "graph")
|
|
5702
5704
|
return Bn(o.get("graph").arch).string;
|
|
5703
5705
|
{
|
|
5704
|
-
const
|
|
5705
|
-
return
|
|
5706
|
+
const te = new Y(o.get(a).fields);
|
|
5707
|
+
return te.parse(o.get(a).arch), te.string;
|
|
5706
5708
|
}
|
|
5707
5709
|
}
|
|
5708
5710
|
const ie = () => {
|
|
5709
|
-
var
|
|
5711
|
+
var te, Re, xe, Se;
|
|
5710
5712
|
if (a === "form")
|
|
5711
|
-
return
|
|
5712
|
-
|
|
5713
|
+
return re.length === 0 ? y("noCurrentEntries") : a !== ve.current && s.some((Ie) => !Ie.values) ? /* @__PURE__ */ r(Le, {}) : /* @__PURE__ */ r(
|
|
5714
|
+
zt,
|
|
5713
5715
|
{
|
|
5714
5716
|
formView: o.get("form"),
|
|
5715
|
-
values: (
|
|
5717
|
+
values: (te = re[d]) == null ? void 0 : te.values,
|
|
5716
5718
|
parentContext: { ...h == null ? void 0 : h(), ...N },
|
|
5717
5719
|
model: I,
|
|
5718
|
-
id: (Re =
|
|
5720
|
+
id: (Re = re[d]) == null ? void 0 : Re.id,
|
|
5719
5721
|
submitMode: "values",
|
|
5720
5722
|
onFieldsChange: (Ie) => {
|
|
5721
|
-
var
|
|
5722
|
-
const Ze = (
|
|
5723
|
-
...
|
|
5724
|
-
operation:
|
|
5723
|
+
var bt;
|
|
5724
|
+
const Ze = (bt = re[d]) == null ? void 0 : bt.id, Ye = s.map((at) => at.id === Ze ? {
|
|
5725
|
+
...at,
|
|
5726
|
+
operation: at.operation === "original" ? "pendingUpdate" : at.operation,
|
|
5725
5727
|
values: { ...Ie, id: Ze },
|
|
5726
5728
|
treeValues: { ...Ie, id: Ze }
|
|
5727
|
-
} :
|
|
5729
|
+
} : at);
|
|
5728
5730
|
ce(Ye), x(!0);
|
|
5729
5731
|
},
|
|
5730
5732
|
readOnly: $
|
|
5731
5733
|
}
|
|
5732
5734
|
);
|
|
5733
5735
|
let Y = [];
|
|
5734
|
-
if (
|
|
5735
|
-
resultsToSort:
|
|
5736
|
+
if (re.some((Ie) => Ie.treeValues) && (Y = P ? Dt({
|
|
5737
|
+
resultsToSort: re.map((Ie) => Ie.treeValues),
|
|
5736
5738
|
sorter: P,
|
|
5737
5739
|
fields: {
|
|
5738
5740
|
...o.get("tree").fields,
|
|
5739
|
-
...((
|
|
5741
|
+
...((xe = o.get("form")) == null ? void 0 : xe.fields) || {}
|
|
5740
5742
|
}
|
|
5741
|
-
}) :
|
|
5743
|
+
}) : re.map((Ie) => Ie.treeValues)), a === "tree")
|
|
5742
5744
|
return /* @__PURE__ */ r(
|
|
5743
|
-
|
|
5745
|
+
Xt,
|
|
5744
5746
|
{
|
|
5745
|
-
total:
|
|
5746
|
-
limit:
|
|
5747
|
+
total: re.length,
|
|
5748
|
+
limit: re.length,
|
|
5747
5749
|
treeView: o.get("tree"),
|
|
5748
5750
|
results: Y,
|
|
5749
5751
|
loading: S,
|
|
@@ -5783,13 +5785,13 @@ const tc = (e) => {
|
|
|
5783
5785
|
mode: a,
|
|
5784
5786
|
title: we(),
|
|
5785
5787
|
readOnly: $ || !1,
|
|
5786
|
-
isMany2Many:
|
|
5788
|
+
isMany2Many: ae,
|
|
5787
5789
|
formHasChanges: w,
|
|
5788
|
-
totalItems:
|
|
5790
|
+
totalItems: re.length,
|
|
5789
5791
|
currentItemIndex: d,
|
|
5790
5792
|
onDelete: Oe,
|
|
5791
5793
|
onCreateItem: We,
|
|
5792
|
-
onToggleViewMode:
|
|
5794
|
+
onToggleViewMode: Me,
|
|
5793
5795
|
onPreviousItem: me,
|
|
5794
5796
|
onNextItem: Fe,
|
|
5795
5797
|
onSearchItem: Ke,
|
|
@@ -5800,7 +5802,7 @@ const tc = (e) => {
|
|
|
5800
5802
|
),
|
|
5801
5803
|
ie(),
|
|
5802
5804
|
/* @__PURE__ */ r(
|
|
5803
|
-
|
|
5805
|
+
Jt,
|
|
5804
5806
|
{
|
|
5805
5807
|
formView: o.get("form"),
|
|
5806
5808
|
model: I,
|
|
@@ -5809,7 +5811,7 @@ const tc = (e) => {
|
|
|
5809
5811
|
values: v == null ? void 0 : v.values,
|
|
5810
5812
|
defaultValues: v == null ? void 0 : v.defaultValues,
|
|
5811
5813
|
visible: D,
|
|
5812
|
-
onSubmitSucceed:
|
|
5814
|
+
onSubmitSucceed: Ve,
|
|
5813
5815
|
parentContext: { ...h == null ? void 0 : h(), ...N },
|
|
5814
5816
|
onCancel: () => {
|
|
5815
5817
|
B(!1), F(!1);
|
|
@@ -5826,7 +5828,7 @@ const tc = (e) => {
|
|
|
5826
5828
|
context: { ...h == null ? void 0 : h(), ...N },
|
|
5827
5829
|
visible: T,
|
|
5828
5830
|
onSelectValues: async (Y) => {
|
|
5829
|
-
O(!1),
|
|
5831
|
+
O(!1), he(Y);
|
|
5830
5832
|
},
|
|
5831
5833
|
onCloseModal: () => {
|
|
5832
5834
|
O(!1);
|
|
@@ -5837,8 +5839,8 @@ const tc = (e) => {
|
|
|
5837
5839
|
}, nc = (e) => {
|
|
5838
5840
|
const { ooui: t } = e, { mode: n, relation: i, views: o, required: s, context: a } = t;
|
|
5839
5841
|
let l;
|
|
5840
|
-
const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h =
|
|
5841
|
-
|
|
5842
|
+
const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = ne(Be), { getContext: g } = h || {};
|
|
5843
|
+
Ft(() => {
|
|
5842
5844
|
w();
|
|
5843
5845
|
}, [t]);
|
|
5844
5846
|
const y = async (S) => o && o[S] ? o[S] : await E.getHandler().getView({
|
|
@@ -5865,7 +5867,7 @@ const tc = (e) => {
|
|
|
5865
5867
|
}
|
|
5866
5868
|
};
|
|
5867
5869
|
return n && n.length > 0 ? l = n[0] : l = "tree", d ? /* @__PURE__ */ r(Le, {}) : f ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(Vl, { initialView: l, children: /* @__PURE__ */ r(
|
|
5868
|
-
|
|
5870
|
+
Ce,
|
|
5869
5871
|
{
|
|
5870
5872
|
required: s,
|
|
5871
5873
|
type: "array",
|
|
@@ -5885,10 +5887,10 @@ const tc = (e) => {
|
|
|
5885
5887
|
) });
|
|
5886
5888
|
}, { useToken: rc } = He, oc = (e) => {
|
|
5887
5889
|
const { ooui: t } = e, { required: n } = t;
|
|
5888
|
-
return /* @__PURE__ */ r(
|
|
5890
|
+
return /* @__PURE__ */ r(Ce, { required: n, type: "number", ...e, children: /* @__PURE__ */ r(ic, { ooui: t }) });
|
|
5889
5891
|
}, ic = (e) => {
|
|
5890
|
-
const { ooui: t, value: n, onChange: i } = e, { id: o, readOnly: s, required: a } = t, { token: l } = rc(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u =
|
|
5891
|
-
|
|
5892
|
+
const { ooui: t, value: n, onChange: i } = e, { id: o, readOnly: s, required: a } = t, { token: l } = rc(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = le(), [f, c] = b(), m = ne(Be), { elementHasLostFocus: p } = m || {};
|
|
5893
|
+
pe(() => {
|
|
5892
5894
|
c(po(n));
|
|
5893
5895
|
}, [n]);
|
|
5894
5896
|
const h = (w) => {
|
|
@@ -5915,7 +5917,7 @@ const tc = (e) => {
|
|
|
5915
5917
|
);
|
|
5916
5918
|
};
|
|
5917
5919
|
function Ro(e) {
|
|
5918
|
-
const { ooui: t, showLabel: n = !0, responsiveBehaviour: i } = e, o =
|
|
5920
|
+
const { ooui: t, showLabel: n = !0, responsiveBehaviour: i } = e, o = dt(t.icon || "");
|
|
5919
5921
|
return /* @__PURE__ */ r(X, { children: (t.label || o) && n ? /* @__PURE__ */ r(Vi, { label: t.label, icon: o, children: /* @__PURE__ */ r(
|
|
5920
5922
|
An,
|
|
5921
5923
|
{
|
|
@@ -5935,7 +5937,7 @@ function ac(e) {
|
|
|
5935
5937
|
const { ooui: t, responsiveBehaviour: n } = e, i = t.pages;
|
|
5936
5938
|
function o(s) {
|
|
5937
5939
|
if (s) {
|
|
5938
|
-
const a =
|
|
5940
|
+
const a = dt(s);
|
|
5939
5941
|
return a && /* @__PURE__ */ r(a, {});
|
|
5940
5942
|
}
|
|
5941
5943
|
}
|
|
@@ -5960,8 +5962,8 @@ function ac(e) {
|
|
|
5960
5962
|
)) });
|
|
5961
5963
|
}
|
|
5962
5964
|
const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
5963
|
-
const { ooui: t } = e, { id: n, readOnly: i, required: o, height: s, translatable: a } = t, { token: l } = lc(), d = o && !i ? { backgroundColor: l.colorPrimaryBg } : void 0, u =
|
|
5964
|
-
return /* @__PURE__ */ r(
|
|
5965
|
+
const { ooui: t } = e, { id: n, readOnly: i, required: o, height: s, translatable: a } = t, { token: l } = lc(), d = o && !i ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ne(Be), { elementHasLostFocus: f } = u || {};
|
|
5966
|
+
return /* @__PURE__ */ r(Ce, { required: o, ...e, children: a ? /* @__PURE__ */ r(
|
|
5965
5967
|
dc,
|
|
5966
5968
|
{
|
|
5967
5969
|
field: n,
|
|
@@ -5987,20 +5989,20 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
5987
5989
|
onChange: i,
|
|
5988
5990
|
height: o
|
|
5989
5991
|
}) => {
|
|
5990
|
-
const s =
|
|
5992
|
+
const s = ne(Be), {
|
|
5991
5993
|
activeId: a,
|
|
5992
5994
|
activeModel: l,
|
|
5993
5995
|
fetchValues: d,
|
|
5994
5996
|
formHasChanges: u,
|
|
5995
5997
|
elementHasLostFocus: f
|
|
5996
|
-
} = s || {}, [c, m] = b(!1), { t: p } =
|
|
5998
|
+
} = s || {}, [c, m] = b(!1), { t: p } = ge();
|
|
5997
5999
|
return a ? /* @__PURE__ */ k(X, { children: [
|
|
5998
6000
|
/* @__PURE__ */ r(
|
|
5999
6001
|
"div",
|
|
6000
6002
|
{
|
|
6001
6003
|
onClick: () => {
|
|
6002
6004
|
if (u != null && u()) {
|
|
6003
|
-
|
|
6005
|
+
ht(p("saveBeforeTranslate"));
|
|
6004
6006
|
return;
|
|
6005
6007
|
}
|
|
6006
6008
|
c || m(!0);
|
|
@@ -6064,14 +6066,14 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6064
6066
|
tooltip: p("translate"),
|
|
6065
6067
|
icon: /* @__PURE__ */ r(Ur, {}),
|
|
6066
6068
|
onClick: async () => {
|
|
6067
|
-
u != null && u() ?
|
|
6069
|
+
u != null && u() ? ht(p("saveBeforeTranslate")) : ht(p("enterTextBeforeTranslate"));
|
|
6068
6070
|
},
|
|
6069
6071
|
children: p("translate")
|
|
6070
6072
|
}
|
|
6071
6073
|
) })
|
|
6072
6074
|
] });
|
|
6073
6075
|
}, uc = (e) => {
|
|
6074
|
-
const { ooui: t } = e, { label: n, icon: i } = t, o =
|
|
6076
|
+
const { ooui: t } = e, { label: n, icon: i } = t, o = dt(i || "");
|
|
6075
6077
|
return /* @__PURE__ */ r(cn, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ k(Ue, { children: [
|
|
6076
6078
|
o ? /* @__PURE__ */ r(o, {}) : null,
|
|
6077
6079
|
n
|
|
@@ -6084,10 +6086,10 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6084
6086
|
limit: o,
|
|
6085
6087
|
onClose: s
|
|
6086
6088
|
}) => {
|
|
6087
|
-
const a =
|
|
6089
|
+
const a = le({}), l = le(/* @__PURE__ */ new Map()), { t: d } = ge(), u = fe(
|
|
6088
6090
|
async (y) => {
|
|
6089
6091
|
if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
|
|
6090
|
-
|
|
6092
|
+
ht(d("selectAtLeastOneField"));
|
|
6091
6093
|
return;
|
|
6092
6094
|
}
|
|
6093
6095
|
let w = i;
|
|
@@ -6106,7 +6108,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6106
6108
|
format: y.exportType
|
|
6107
6109
|
});
|
|
6108
6110
|
s(), await new Promise((C) => setTimeout(C, 200));
|
|
6109
|
-
const S = await
|
|
6111
|
+
const S = await kt(x);
|
|
6110
6112
|
pn(x, S.mime);
|
|
6111
6113
|
},
|
|
6112
6114
|
[i, n, e, o, t, s, d]
|
|
@@ -6361,7 +6363,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6361
6363
|
return /* @__PURE__ */ r(yo, { ooui: t, showTime: !0 });
|
|
6362
6364
|
}, Sc = (e) => {
|
|
6363
6365
|
const { ooui: t } = e;
|
|
6364
|
-
return /* @__PURE__ */ r(
|
|
6366
|
+
return /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(Tc, { ooui: t }) });
|
|
6365
6367
|
}, Tc = (e) => /* @__PURE__ */ r(
|
|
6366
6368
|
Dn,
|
|
6367
6369
|
{
|
|
@@ -6373,10 +6375,10 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6373
6375
|
}
|
|
6374
6376
|
), Fc = (e) => {
|
|
6375
6377
|
const { ooui: t } = e, { required: n } = t;
|
|
6376
|
-
return /* @__PURE__ */ r(
|
|
6378
|
+
return /* @__PURE__ */ r(Ce, { required: n, ...e, children: /* @__PURE__ */ r(Rc, { ooui: t }) });
|
|
6377
6379
|
}, Rc = (e) => {
|
|
6378
6380
|
const { value: t, onChange: n, ooui: i } = e, { required: o, selectionValues: s, readOnly: a } = i, l = t == null ? void 0 : t.split(","), [d, u] = b([]), [f, c] = b();
|
|
6379
|
-
return
|
|
6381
|
+
return pe(() => {
|
|
6380
6382
|
if (!t) {
|
|
6381
6383
|
c(void 0), u([]);
|
|
6382
6384
|
return;
|
|
@@ -6423,17 +6425,17 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6423
6425
|
] });
|
|
6424
6426
|
}, { useToken: _c } = He, Oc = (e) => {
|
|
6425
6427
|
const { ooui: t } = e, { required: n } = t;
|
|
6426
|
-
return /* @__PURE__ */ r(
|
|
6428
|
+
return /* @__PURE__ */ r(Ce, { required: n, ...e, children: /* @__PURE__ */ r(Ic, { ooui: t }) });
|
|
6427
6429
|
}, Ic = (e) => {
|
|
6428
|
-
const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = _c(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u =
|
|
6430
|
+
const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = _c(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = le(null), { setFieldValue: f, getFieldValue: c } = ne(Be) || {}, { t: m } = ge(), p = n ? Ns(n) : "", h = (S) => {
|
|
6429
6431
|
i == null || i(S);
|
|
6430
6432
|
};
|
|
6431
6433
|
async function g() {
|
|
6432
|
-
const S = await
|
|
6434
|
+
const S = await kt(n), C = `data:${S == null ? void 0 : S.mime};base64,${n}`, R = document.createElement("a"), V = c(a), D = c("name");
|
|
6433
6435
|
R.href = C, R.download = V || D, R.click();
|
|
6434
6436
|
}
|
|
6435
6437
|
async function y() {
|
|
6436
|
-
const S = await
|
|
6438
|
+
const S = await kt(n);
|
|
6437
6439
|
pn(n, S.mime);
|
|
6438
6440
|
}
|
|
6439
6441
|
async function w(S) {
|
|
@@ -6468,7 +6470,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6468
6470
|
] }),
|
|
6469
6471
|
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ k(Ue, { children: [
|
|
6470
6472
|
/* @__PURE__ */ r(
|
|
6471
|
-
|
|
6473
|
+
ke,
|
|
6472
6474
|
{
|
|
6473
6475
|
icon: /* @__PURE__ */ r(Hn, {}),
|
|
6474
6476
|
disabled: o,
|
|
@@ -6478,7 +6480,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6478
6480
|
children: "Select"
|
|
6479
6481
|
}
|
|
6480
6482
|
),
|
|
6481
|
-
/* @__PURE__ */ r(
|
|
6483
|
+
/* @__PURE__ */ r(ke, { icon: /* @__PURE__ */ r(Ci, {}), disabled: !n, onClick: y, children: m("open") }),
|
|
6482
6484
|
/* @__PURE__ */ r(
|
|
6483
6485
|
qe,
|
|
6484
6486
|
{
|
|
@@ -6501,12 +6503,12 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6501
6503
|
] });
|
|
6502
6504
|
}, Fn = {
|
|
6503
6505
|
tree: /* @__PURE__ */ r(qn, {}),
|
|
6504
|
-
form: /* @__PURE__ */ r(
|
|
6506
|
+
form: /* @__PURE__ */ r(Ht, {}),
|
|
6505
6507
|
graph: /* @__PURE__ */ r(xi, {}),
|
|
6506
6508
|
calendar: /* @__PURE__ */ r(Si, {})
|
|
6507
6509
|
};
|
|
6508
6510
|
function Ir(e) {
|
|
6509
|
-
return e ? (Fn == null ? void 0 : Fn[e.type]) || /* @__PURE__ */ r(
|
|
6511
|
+
return e ? (Fn == null ? void 0 : Fn[e.type]) || /* @__PURE__ */ r(Ht, {}) : /* @__PURE__ */ r(Ht, {});
|
|
6510
6512
|
}
|
|
6511
6513
|
function nr(e) {
|
|
6512
6514
|
const {
|
|
@@ -6516,7 +6518,7 @@ function nr(e) {
|
|
|
6516
6518
|
disabled: o = !1,
|
|
6517
6519
|
formHasChanges: s = !1,
|
|
6518
6520
|
previousView: a
|
|
6519
|
-
} = e, { t: l } =
|
|
6521
|
+
} = e, { t: l } = ge(), d = De(() => [
|
|
6520
6522
|
{
|
|
6521
6523
|
label: l("viewAs"),
|
|
6522
6524
|
items: n.map((c, m) => {
|
|
@@ -6532,7 +6534,7 @@ function nr(e) {
|
|
|
6532
6534
|
], [n, t.view_id, l]);
|
|
6533
6535
|
function u(c) {
|
|
6534
6536
|
if (s) {
|
|
6535
|
-
|
|
6537
|
+
qt({
|
|
6536
6538
|
t: l,
|
|
6537
6539
|
onOk: () => {
|
|
6538
6540
|
c();
|
|
@@ -6575,7 +6577,7 @@ function nr(e) {
|
|
|
6575
6577
|
placement: "bottomRight",
|
|
6576
6578
|
disabled: o || n.length === 1,
|
|
6577
6579
|
children: /* @__PURE__ */ r(
|
|
6578
|
-
|
|
6580
|
+
ke,
|
|
6579
6581
|
{
|
|
6580
6582
|
style: {
|
|
6581
6583
|
width: 25,
|
|
@@ -6615,11 +6617,11 @@ function Ge(e) {
|
|
|
6615
6617
|
);
|
|
6616
6618
|
}
|
|
6617
6619
|
function Oo(e) {
|
|
6618
|
-
const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: i } =
|
|
6619
|
-
|
|
6620
|
-
), { t: o } =
|
|
6620
|
+
const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: i } = ne(
|
|
6621
|
+
rt
|
|
6622
|
+
), { t: o } = ge(), s = () => {
|
|
6621
6623
|
if (n) {
|
|
6622
|
-
|
|
6624
|
+
qt({
|
|
6623
6625
|
t: o,
|
|
6624
6626
|
onOk: () => {
|
|
6625
6627
|
i();
|
|
@@ -6646,7 +6648,7 @@ const { confirm: Vc } = ze, Ac = ({
|
|
|
6646
6648
|
}) => {
|
|
6647
6649
|
Vc({
|
|
6648
6650
|
title: n("unsavedChanges"),
|
|
6649
|
-
icon: /* @__PURE__ */ r(
|
|
6651
|
+
icon: /* @__PURE__ */ r(vt, {}),
|
|
6650
6652
|
centered: !0,
|
|
6651
6653
|
content: n("confirmRefreshWithoutSave"),
|
|
6652
6654
|
okText: n("discardAndRefresh"),
|
|
@@ -6660,7 +6662,7 @@ async function Io(e, t, n) {
|
|
|
6660
6662
|
model: e,
|
|
6661
6663
|
ids: [t]
|
|
6662
6664
|
}))[0], { create_date: o, create_uid: s, id: a, write_date: l, write_uid: d } = i;
|
|
6663
|
-
|
|
6665
|
+
ht(
|
|
6664
6666
|
/* @__PURE__ */ k("div", { children: [
|
|
6665
6667
|
"ID: " + a,
|
|
6666
6668
|
" ",
|
|
@@ -6679,7 +6681,7 @@ async function Io(e, t, n) {
|
|
|
6679
6681
|
);
|
|
6680
6682
|
}
|
|
6681
6683
|
const Dc = (e) => {
|
|
6682
|
-
const { numberOfAttachments: t, disabled: n } = e, { t: i } =
|
|
6684
|
+
const { numberOfAttachments: t, disabled: n } = e, { t: i } = ge(), [o, s] = b(!1), a = /* @__PURE__ */ k(ke, { disabled: n, children: [
|
|
6683
6685
|
/* @__PURE__ */ r(zr, {}),
|
|
6684
6686
|
`(${t})`,
|
|
6685
6687
|
/* @__PURE__ */ r(dn, { style: { fontSize: 12 } })
|
|
@@ -6697,7 +6699,7 @@ const Dc = (e) => {
|
|
|
6697
6699
|
}
|
|
6698
6700
|
);
|
|
6699
6701
|
}, kc = (e, t) => {
|
|
6700
|
-
const { t: n } =
|
|
6702
|
+
const { t: n } = ge(), {
|
|
6701
6703
|
attachments: i = [],
|
|
6702
6704
|
loading: o,
|
|
6703
6705
|
onAddNewAttachment: s,
|
|
@@ -6749,7 +6751,7 @@ const Dc = (e) => {
|
|
|
6749
6751
|
children: [
|
|
6750
6752
|
/* @__PURE__ */ r(de, { flex: "auto", children: u.name }),
|
|
6751
6753
|
/* @__PURE__ */ r(de, { flex: "25px", style: { textAlign: "center" }, children: (u.datas_fname || u.link) && /* @__PURE__ */ r(
|
|
6752
|
-
|
|
6754
|
+
gt,
|
|
6753
6755
|
{
|
|
6754
6756
|
title: u.link ? n("openAttachmentLink") : n("download"),
|
|
6755
6757
|
children: /* @__PURE__ */ r(
|
|
@@ -6763,8 +6765,8 @@ const Dc = (e) => {
|
|
|
6763
6765
|
)
|
|
6764
6766
|
}
|
|
6765
6767
|
) }),
|
|
6766
|
-
/* @__PURE__ */ r(de, { flex: "25px", style: { textAlign: "center" }, children: /* @__PURE__ */ r(
|
|
6767
|
-
|
|
6768
|
+
/* @__PURE__ */ r(de, { flex: "25px", style: { textAlign: "center" }, children: /* @__PURE__ */ r(gt, { title: n("openAttachment"), children: /* @__PURE__ */ r(
|
|
6769
|
+
Ht,
|
|
6768
6770
|
{
|
|
6769
6771
|
style: { cursor: "pointer" },
|
|
6770
6772
|
onClick: () => {
|
|
@@ -6787,7 +6789,7 @@ function Ec(e) {
|
|
|
6787
6789
|
onAddNewAttachment: i,
|
|
6788
6790
|
onListAllAttachments: o,
|
|
6789
6791
|
onViewAttachmentDetails: s
|
|
6790
|
-
} = e, { formRef: a } =
|
|
6792
|
+
} = e, { formRef: a } = ne(rt), [l, d] = b(!1), [u, f] = b([]), [c, m] = b(!1), { t: p } = ge(), h = fe(async () => {
|
|
6791
6793
|
if (!(!t || t.length === 0)) {
|
|
6792
6794
|
d(!0);
|
|
6793
6795
|
try {
|
|
@@ -6829,7 +6831,7 @@ function Ec(e) {
|
|
|
6829
6831
|
}
|
|
6830
6832
|
if (m(!1), !!x)
|
|
6831
6833
|
if (x.datas) {
|
|
6832
|
-
const S = await
|
|
6834
|
+
const S = await kt(x.datas);
|
|
6833
6835
|
pn(x.datas, S.mime);
|
|
6834
6836
|
} else
|
|
6835
6837
|
s(x);
|
|
@@ -6841,7 +6843,7 @@ function Ec(e) {
|
|
|
6841
6843
|
},
|
|
6842
6844
|
[s]
|
|
6843
6845
|
);
|
|
6844
|
-
return
|
|
6846
|
+
return pe(() => {
|
|
6845
6847
|
h();
|
|
6846
6848
|
}, [h]), /* @__PURE__ */ k(X, { children: [
|
|
6847
6849
|
/* @__PURE__ */ r(
|
|
@@ -6897,10 +6899,10 @@ function Nc({ toolbar: e }) {
|
|
|
6897
6899
|
previousView: V,
|
|
6898
6900
|
setPreviousView: D,
|
|
6899
6901
|
goToResourceId: F
|
|
6900
|
-
} =
|
|
6901
|
-
|
|
6902
|
-
), { processAction: v } = O || {}, _ =
|
|
6903
|
-
|
|
6902
|
+
} = ne(rt), { t: T } = ge(), O = ne(
|
|
6903
|
+
Pt
|
|
6904
|
+
), { processAction: v } = O || {}, _ = ne(
|
|
6905
|
+
ut
|
|
6904
6906
|
), { openRelate: A, openDefaultActionForModel: L } = _ || {};
|
|
6905
6907
|
function G(I) {
|
|
6906
6908
|
if (s) {
|
|
@@ -6916,7 +6918,7 @@ function Nc({ toolbar: e }) {
|
|
|
6916
6918
|
}
|
|
6917
6919
|
function B(I) {
|
|
6918
6920
|
if (s) {
|
|
6919
|
-
|
|
6921
|
+
qt({
|
|
6920
6922
|
t: T,
|
|
6921
6923
|
onOk: () => {
|
|
6922
6924
|
I();
|
|
@@ -6933,7 +6935,7 @@ function Nc({ toolbar: e }) {
|
|
|
6933
6935
|
d && f > 0 ? (u == null || u(f - 1), c == null || c(d[f - 1].id)) : d && f === 0 && (u == null || u(d.length - 1), c == null || c(d[d.length - 1].id));
|
|
6934
6936
|
}
|
|
6935
6937
|
function Z() {
|
|
6936
|
-
|
|
6938
|
+
Gt({
|
|
6937
6939
|
confirmMessage: T("confirmRemoveItem"),
|
|
6938
6940
|
t: T,
|
|
6939
6941
|
onOk: () => {
|
|
@@ -6988,8 +6990,8 @@ function Nc({ toolbar: e }) {
|
|
|
6988
6990
|
return n ? /* @__PURE__ */ k(Ue, { wrap: !0, children: [
|
|
6989
6991
|
x && /* @__PURE__ */ k(X, { children: [
|
|
6990
6992
|
/* @__PURE__ */ r(Le, {}),
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
+
Rt(),
|
|
6994
|
+
Rt()
|
|
6993
6995
|
] }),
|
|
6994
6996
|
/* @__PURE__ */ r(
|
|
6995
6997
|
Oo,
|
|
@@ -7027,7 +7029,7 @@ function Nc({ toolbar: e }) {
|
|
|
7027
7029
|
onClick: Z
|
|
7028
7030
|
}
|
|
7029
7031
|
),
|
|
7030
|
-
|
|
7032
|
+
Rt(),
|
|
7031
7033
|
/* @__PURE__ */ r(
|
|
7032
7034
|
Ge,
|
|
7033
7035
|
{
|
|
@@ -7054,7 +7056,7 @@ function Nc({ toolbar: e }) {
|
|
|
7054
7056
|
}
|
|
7055
7057
|
}
|
|
7056
7058
|
),
|
|
7057
|
-
|
|
7059
|
+
Rt(),
|
|
7058
7060
|
/* @__PURE__ */ r(
|
|
7059
7061
|
nr,
|
|
7060
7062
|
{
|
|
@@ -7068,7 +7070,7 @@ function Nc({ toolbar: e }) {
|
|
|
7068
7070
|
formHasChanges: s
|
|
7069
7071
|
}
|
|
7070
7072
|
),
|
|
7071
|
-
|
|
7073
|
+
Rt(),
|
|
7072
7074
|
/* @__PURE__ */ k(Ue, { children: [
|
|
7073
7075
|
/* @__PURE__ */ r(
|
|
7074
7076
|
Ge,
|
|
@@ -7095,9 +7097,9 @@ function Nc({ toolbar: e }) {
|
|
|
7095
7097
|
}
|
|
7096
7098
|
)
|
|
7097
7099
|
] }),
|
|
7098
|
-
|
|
7100
|
+
Rt(),
|
|
7099
7101
|
/* @__PURE__ */ r(
|
|
7100
|
-
|
|
7102
|
+
Vt,
|
|
7101
7103
|
{
|
|
7102
7104
|
icon: /* @__PURE__ */ r(Un, {}),
|
|
7103
7105
|
placement: "bottomRight",
|
|
@@ -7106,14 +7108,14 @@ function Nc({ toolbar: e }) {
|
|
|
7106
7108
|
{ label: T("actions"), items: e == null ? void 0 : e.action }
|
|
7107
7109
|
],
|
|
7108
7110
|
onItemClick: async (I) => {
|
|
7109
|
-
!I || !(await
|
|
7111
|
+
!I || !(await _t({
|
|
7110
7112
|
onFormSave: o
|
|
7111
7113
|
})).succeed || $(I);
|
|
7112
7114
|
}
|
|
7113
7115
|
}
|
|
7114
7116
|
),
|
|
7115
7117
|
/* @__PURE__ */ r(
|
|
7116
|
-
|
|
7118
|
+
Vt,
|
|
7117
7119
|
{
|
|
7118
7120
|
icon: /* @__PURE__ */ r(Yn, {}),
|
|
7119
7121
|
disabled: U,
|
|
@@ -7124,7 +7126,7 @@ function Nc({ toolbar: e }) {
|
|
|
7124
7126
|
onItemClick: async (I) => {
|
|
7125
7127
|
if (!I)
|
|
7126
7128
|
return;
|
|
7127
|
-
const N = await
|
|
7129
|
+
const N = await _t({
|
|
7128
7130
|
onFormSave: o
|
|
7129
7131
|
});
|
|
7130
7132
|
N.succeed && $({
|
|
@@ -7138,7 +7140,7 @@ function Nc({ toolbar: e }) {
|
|
|
7138
7140
|
}
|
|
7139
7141
|
),
|
|
7140
7142
|
/* @__PURE__ */ r(
|
|
7141
|
-
|
|
7143
|
+
Vt,
|
|
7142
7144
|
{
|
|
7143
7145
|
icon: /* @__PURE__ */ r(Yr, {}),
|
|
7144
7146
|
disabled: U,
|
|
@@ -7147,7 +7149,7 @@ function Nc({ toolbar: e }) {
|
|
|
7147
7149
|
{ label: T("related"), items: e == null ? void 0 : e.relate }
|
|
7148
7150
|
],
|
|
7149
7151
|
onItemClick: async (I) => {
|
|
7150
|
-
!I || !(await
|
|
7152
|
+
!I || !(await _t({
|
|
7151
7153
|
onFormSave: o
|
|
7152
7154
|
})).succeed || A({
|
|
7153
7155
|
relateData: I,
|
|
@@ -7165,7 +7167,7 @@ function Nc({ toolbar: e }) {
|
|
|
7165
7167
|
disabled: U,
|
|
7166
7168
|
attachments: S,
|
|
7167
7169
|
onAddNewAttachment: async () => {
|
|
7168
|
-
const I = await
|
|
7170
|
+
const I = await _t({
|
|
7169
7171
|
onFormSave: o
|
|
7170
7172
|
});
|
|
7171
7173
|
if (!I.succeed)
|
|
@@ -7177,7 +7179,7 @@ function Nc({ toolbar: e }) {
|
|
|
7177
7179
|
});
|
|
7178
7180
|
},
|
|
7179
7181
|
onListAllAttachments: async () => {
|
|
7180
|
-
const I = await
|
|
7182
|
+
const I = await _t({
|
|
7181
7183
|
onFormSave: o
|
|
7182
7184
|
});
|
|
7183
7185
|
if (!I.succeed)
|
|
@@ -7189,7 +7191,7 @@ function Nc({ toolbar: e }) {
|
|
|
7189
7191
|
});
|
|
7190
7192
|
},
|
|
7191
7193
|
onViewAttachmentDetails: async (I) => {
|
|
7192
|
-
(await
|
|
7194
|
+
(await _t({
|
|
7193
7195
|
onFormSave: o
|
|
7194
7196
|
})).succeed && L({
|
|
7195
7197
|
model: "ir.attachment",
|
|
@@ -7201,10 +7203,10 @@ function Nc({ toolbar: e }) {
|
|
|
7201
7203
|
)
|
|
7202
7204
|
] }) : null;
|
|
7203
7205
|
}
|
|
7204
|
-
function
|
|
7206
|
+
function Rt() {
|
|
7205
7207
|
return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
|
|
7206
7208
|
}
|
|
7207
|
-
async function
|
|
7209
|
+
async function _t({
|
|
7208
7210
|
onFormSave: e
|
|
7209
7211
|
}) {
|
|
7210
7212
|
const t = await (e == null ? void 0 : e());
|
|
@@ -7227,8 +7229,8 @@ function Vr(e, t) {
|
|
|
7227
7229
|
};
|
|
7228
7230
|
}
|
|
7229
7231
|
const { useToken: Mc } = He, Vo = (e) => {
|
|
7230
|
-
const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Mc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c =
|
|
7231
|
-
|
|
7232
|
+
const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = Mc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ne(Be), { elementHasLostFocus: m } = c || {}, [p, h] = b(!1), [g, y] = b(!1);
|
|
7233
|
+
pe(() => {
|
|
7232
7234
|
l && !p && y(!1), !n && !l && (h(!0), y(!0));
|
|
7233
7235
|
}, [p, l]);
|
|
7234
7236
|
const w = (x) => {
|
|
@@ -7236,9 +7238,9 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7236
7238
|
};
|
|
7237
7239
|
return /* @__PURE__ */ k(_e, { gutter: 8, wrap: !1, align: "middle", children: [
|
|
7238
7240
|
l ? null : /* @__PURE__ */ r(de, { flex: "none", children: p ? /* @__PURE__ */ r(
|
|
7239
|
-
|
|
7241
|
+
ke,
|
|
7240
7242
|
{
|
|
7241
|
-
icon: /* @__PURE__ */ r(
|
|
7243
|
+
icon: /* @__PURE__ */ r(Yt, {}),
|
|
7242
7244
|
onClick: () => {
|
|
7243
7245
|
o(n) && (h(!1), y(!1));
|
|
7244
7246
|
},
|
|
@@ -7246,7 +7248,7 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7246
7248
|
tabIndex: -1
|
|
7247
7249
|
}
|
|
7248
7250
|
) : /* @__PURE__ */ r(
|
|
7249
|
-
|
|
7251
|
+
ke,
|
|
7250
7252
|
{
|
|
7251
7253
|
icon: /* @__PURE__ */ r(Xr, {}),
|
|
7252
7254
|
onClick: () => {
|
|
@@ -7284,7 +7286,7 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7284
7286
|
] });
|
|
7285
7287
|
}, Pc = (e) => {
|
|
7286
7288
|
const { ooui: t } = e, { required: n } = t;
|
|
7287
|
-
return /* @__PURE__ */ r(
|
|
7289
|
+
return /* @__PURE__ */ r(Ce, { required: n, ...e, children: /* @__PURE__ */ r(
|
|
7288
7290
|
Vo,
|
|
7289
7291
|
{
|
|
7290
7292
|
ooui: t,
|
|
@@ -7293,7 +7295,7 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7293
7295
|
) });
|
|
7294
7296
|
}, Lc = (e) => {
|
|
7295
7297
|
const { ooui: t } = e, { required: n } = t;
|
|
7296
|
-
return /* @__PURE__ */ r(
|
|
7298
|
+
return /* @__PURE__ */ r(Ce, { required: n, ...e, children: /* @__PURE__ */ r(
|
|
7297
7299
|
Vo,
|
|
7298
7300
|
{
|
|
7299
7301
|
ooui: t,
|
|
@@ -7302,7 +7304,7 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7302
7304
|
}
|
|
7303
7305
|
) });
|
|
7304
7306
|
}, $c = (e) => {
|
|
7305
|
-
const { visible: t, onIdSubmitted: n, onCancel: i, isSearching: o } = e, { t: s } =
|
|
7307
|
+
const { visible: t, onIdSubmitted: n, onCancel: i, isSearching: o } = e, { t: s } = ge(), a = le();
|
|
7306
7308
|
function l(d) {
|
|
7307
7309
|
const u = d.id.split(",").map((f) => parseInt(f.trim()));
|
|
7308
7310
|
n(u);
|
|
@@ -7321,9 +7323,9 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7321
7323
|
var u;
|
|
7322
7324
|
return d && ((u = a.current) == null ? void 0 : u.focus());
|
|
7323
7325
|
},
|
|
7324
|
-
children: /* @__PURE__ */ k(
|
|
7326
|
+
children: /* @__PURE__ */ k(ct, { layout: "vertical", onFinish: l, autoComplete: "off", children: [
|
|
7325
7327
|
/* @__PURE__ */ r(
|
|
7326
|
-
|
|
7328
|
+
ct.Item,
|
|
7327
7329
|
{
|
|
7328
7330
|
name: "id",
|
|
7329
7331
|
label: s("searchId"),
|
|
@@ -7338,9 +7340,9 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7338
7340
|
),
|
|
7339
7341
|
/* @__PURE__ */ r(_e, { align: "middle", justify: "end", children: /* @__PURE__ */ r(de, { children: /* @__PURE__ */ k(Ue, { children: [
|
|
7340
7342
|
/* @__PURE__ */ r(
|
|
7341
|
-
|
|
7343
|
+
ke,
|
|
7342
7344
|
{
|
|
7343
|
-
icon: /* @__PURE__ */ r(
|
|
7345
|
+
icon: /* @__PURE__ */ r(Ut, {}),
|
|
7344
7346
|
htmlType: "button",
|
|
7345
7347
|
onClick: i,
|
|
7346
7348
|
disabled: o,
|
|
@@ -7348,11 +7350,11 @@ const { useToken: Mc } = He, Vo = (e) => {
|
|
|
7348
7350
|
}
|
|
7349
7351
|
),
|
|
7350
7352
|
/* @__PURE__ */ r(
|
|
7351
|
-
|
|
7353
|
+
ke,
|
|
7352
7354
|
{
|
|
7353
7355
|
loading: o,
|
|
7354
7356
|
style: { marginLeft: 15 },
|
|
7355
|
-
icon: /* @__PURE__ */ r(
|
|
7357
|
+
icon: /* @__PURE__ */ r(Yt, {}),
|
|
7356
7358
|
htmlType: "submit",
|
|
7357
7359
|
type: "primary",
|
|
7358
7360
|
disabled: o,
|
|
@@ -7393,7 +7395,7 @@ function Ao(e) {
|
|
|
7393
7395
|
] });
|
|
7394
7396
|
}
|
|
7395
7397
|
function Hc({ refreshGraph: e }) {
|
|
7396
|
-
const { t } =
|
|
7398
|
+
const { t } = ge(), {
|
|
7397
7399
|
availableViews: n,
|
|
7398
7400
|
currentView: i,
|
|
7399
7401
|
setCurrentView: o,
|
|
@@ -7403,7 +7405,7 @@ function Hc({ refreshGraph: e }) {
|
|
|
7403
7405
|
graphIsLoading: d,
|
|
7404
7406
|
previousView: u,
|
|
7405
7407
|
setPreviousView: f
|
|
7406
|
-
} =
|
|
7408
|
+
} = ne(rt);
|
|
7407
7409
|
return /* @__PURE__ */ k(Ue, { wrap: !0, children: [
|
|
7408
7410
|
/* @__PURE__ */ r(
|
|
7409
7411
|
Ao,
|
|
@@ -7449,7 +7451,7 @@ function Hc({ refreshGraph: e }) {
|
|
|
7449
7451
|
)
|
|
7450
7452
|
] });
|
|
7451
7453
|
}
|
|
7452
|
-
const { useToken: Kc } = He, { Title: jc, Text: tn } =
|
|
7454
|
+
const { useToken: Kc } = He, { Title: jc, Text: tn } = Wt;
|
|
7453
7455
|
function yn(e) {
|
|
7454
7456
|
const { title: t, children: n } = e, {
|
|
7455
7457
|
title: i,
|
|
@@ -7459,7 +7461,7 @@ function yn(e) {
|
|
|
7459
7461
|
results: l,
|
|
7460
7462
|
totalItems: d,
|
|
7461
7463
|
selectedRowItems: u
|
|
7462
|
-
} =
|
|
7464
|
+
} = ne(rt), { t: f } = ge(), { token: c } = Kc();
|
|
7463
7465
|
function m() {
|
|
7464
7466
|
if ((o == null ? void 0 : o.type) === "form")
|
|
7465
7467
|
return s ? d === 0 ? /* @__PURE__ */ k(X, { children: [
|
|
@@ -7554,8 +7556,8 @@ function yn(e) {
|
|
|
7554
7556
|
);
|
|
7555
7557
|
}
|
|
7556
7558
|
const Wc = (e) => {
|
|
7557
|
-
const { viewData: t, visible: n, model: i, context: o, domain: s, formView: a, treeView: l } = e, d =
|
|
7558
|
-
|
|
7559
|
+
const { viewData: t, visible: n, model: i, context: o, domain: s, formView: a, treeView: l } = e, d = le(), u = ne(
|
|
7560
|
+
rt
|
|
7559
7561
|
), {
|
|
7560
7562
|
setResults: f = void 0,
|
|
7561
7563
|
setCurrentItemIndex: c = void 0,
|
|
@@ -7577,10 +7579,10 @@ const Wc = (e) => {
|
|
|
7577
7579
|
setSearchValues: v,
|
|
7578
7580
|
currentView: _
|
|
7579
7581
|
} = u || {}, [A, L] = b(!0);
|
|
7580
|
-
|
|
7582
|
+
pe(() => {
|
|
7581
7583
|
var ee;
|
|
7582
7584
|
(ee = d.current) == null || ee.refresh();
|
|
7583
|
-
}, [T]),
|
|
7585
|
+
}, [T]), pe(() => {
|
|
7584
7586
|
t.view_id !== _.view_id && L(!0);
|
|
7585
7587
|
}, [_]);
|
|
7586
7588
|
const { clear: G, searchFilterLoading: B, searchError: q, offset: P, tableRefreshing: Z } = vo({
|
|
@@ -7643,7 +7645,7 @@ const Wc = (e) => {
|
|
|
7643
7645
|
view_id: t.view_id,
|
|
7644
7646
|
model: i,
|
|
7645
7647
|
context: o,
|
|
7646
|
-
domain:
|
|
7648
|
+
domain: jt(T || [], s),
|
|
7647
7649
|
limit: A ? D : void 0,
|
|
7648
7650
|
manualIds: A ? p == null ? void 0 : p.map((ee) => ee.id) : void 0
|
|
7649
7651
|
}
|
|
@@ -7667,7 +7669,7 @@ const Wc = (e) => {
|
|
|
7667
7669
|
return t ? /* @__PURE__ */ k(X, { children: [
|
|
7668
7670
|
/* @__PURE__ */ r(yn, { children: /* @__PURE__ */ r(Nc, { toolbar: a == null ? void 0 : a.toolbar }) }),
|
|
7669
7671
|
/* @__PURE__ */ r(
|
|
7670
|
-
|
|
7672
|
+
zt,
|
|
7671
7673
|
{
|
|
7672
7674
|
rootForm: !0,
|
|
7673
7675
|
ref: n,
|
|
@@ -7686,18 +7688,18 @@ const Wc = (e) => {
|
|
|
7686
7688
|
] }) : null;
|
|
7687
7689
|
};
|
|
7688
7690
|
function Yc(e) {
|
|
7689
|
-
const { onSearch: t, disabled: n = !1, searchText: i } = e, { t: o } =
|
|
7691
|
+
const { onSearch: t, disabled: n = !1, searchText: i } = e, { t: o } = ge(), [s] = ct.useForm(), [a, l] = b(!1);
|
|
7690
7692
|
function d(f) {
|
|
7691
7693
|
t(f.search);
|
|
7692
7694
|
}
|
|
7693
|
-
|
|
7695
|
+
pe(() => {
|
|
7694
7696
|
s.setFieldsValue({ search: i });
|
|
7695
7697
|
}, [i]);
|
|
7696
7698
|
function u() {
|
|
7697
7699
|
l(!1), s.setFieldsValue({ search: void 0 }), t(void 0);
|
|
7698
7700
|
}
|
|
7699
|
-
return /* @__PURE__ */ r(
|
|
7700
|
-
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(
|
|
7701
|
+
return /* @__PURE__ */ r(ct, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ k(_e, { align: "middle", justify: "end", children: [
|
|
7702
|
+
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(ct.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ r(
|
|
7701
7703
|
it,
|
|
7702
7704
|
{
|
|
7703
7705
|
autoFocus: !0,
|
|
@@ -7706,7 +7708,7 @@ function Yc(e) {
|
|
|
7706
7708
|
l(f.target.value.length > 0);
|
|
7707
7709
|
},
|
|
7708
7710
|
style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
7709
|
-
suffix: (a || i && i.length > 0) && /* @__PURE__ */ r(
|
|
7711
|
+
suffix: (a || i && i.length > 0) && /* @__PURE__ */ r(gt, { title: o("clear"), children: /* @__PURE__ */ r(
|
|
7710
7712
|
Fi,
|
|
7711
7713
|
{
|
|
7712
7714
|
style: { color: "rgba(0,0,0,.45)" },
|
|
@@ -7716,7 +7718,7 @@ function Yc(e) {
|
|
|
7716
7718
|
}
|
|
7717
7719
|
) }) }),
|
|
7718
7720
|
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(
|
|
7719
|
-
|
|
7721
|
+
ke,
|
|
7720
7722
|
{
|
|
7721
7723
|
htmlType: "submit",
|
|
7722
7724
|
disabled: n,
|
|
@@ -8008,8 +8010,8 @@ const Gc = {
|
|
|
8008
8010
|
globalValues: {},
|
|
8009
8011
|
rootContext: {},
|
|
8010
8012
|
devMode: !1
|
|
8011
|
-
}, Do =
|
|
8012
|
-
const e =
|
|
8013
|
+
}, Do = nt.createContext(Xc), ko = () => {
|
|
8014
|
+
const e = ne(Do);
|
|
8013
8015
|
if (!e)
|
|
8014
8016
|
throw new Error(
|
|
8015
8017
|
"useConfigContext must be used within a ConfigContextProvider"
|
|
@@ -8076,13 +8078,13 @@ function ed(e) {
|
|
|
8076
8078
|
results: R,
|
|
8077
8079
|
limit: V,
|
|
8078
8080
|
totalItems: D
|
|
8079
|
-
} =
|
|
8081
|
+
} = ne(rt), { parentContext: F = {}, treeExpandable: T, toolbar: O } = e, v = Qc(
|
|
8080
8082
|
rr.FEATURE_ADVANCED_EXPORT
|
|
8081
|
-
), { t: _ } =
|
|
8082
|
-
|
|
8083
|
+
), { t: _ } = ge(), A = ne(
|
|
8084
|
+
Pt
|
|
8083
8085
|
), { processAction: L } = A || {}, [G, B] = b(!1), q = w !== void 0 && w.trim().length > 0;
|
|
8084
8086
|
function P() {
|
|
8085
|
-
|
|
8087
|
+
Gt({
|
|
8086
8088
|
confirmMessage: _("confirmRemove"),
|
|
8087
8089
|
t: _,
|
|
8088
8090
|
onOk: () => {
|
|
@@ -8142,8 +8144,8 @@ function ed(e) {
|
|
|
8142
8144
|
return /* @__PURE__ */ k(Ue, { wrap: !0, children: [
|
|
8143
8145
|
x && /* @__PURE__ */ k(X, { children: [
|
|
8144
8146
|
/* @__PURE__ */ r(Le, {}),
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
+
Ct(),
|
|
8148
|
+
Ct()
|
|
8147
8149
|
] }),
|
|
8148
8150
|
T ? null : /* @__PURE__ */ k(X, { children: [
|
|
8149
8151
|
/* @__PURE__ */ r(
|
|
@@ -8174,7 +8176,7 @@ function ed(e) {
|
|
|
8174
8176
|
badgeNumber: p == null ? void 0 : p.length
|
|
8175
8177
|
}
|
|
8176
8178
|
),
|
|
8177
|
-
|
|
8179
|
+
Ct(),
|
|
8178
8180
|
/* @__PURE__ */ r(Oo, { disabled: x }),
|
|
8179
8181
|
/* @__PURE__ */ r(
|
|
8180
8182
|
Ge,
|
|
@@ -8196,7 +8198,7 @@ function ed(e) {
|
|
|
8196
8198
|
onClick: P
|
|
8197
8199
|
}
|
|
8198
8200
|
),
|
|
8199
|
-
|
|
8201
|
+
Ct()
|
|
8200
8202
|
] }),
|
|
8201
8203
|
/* @__PURE__ */ r(
|
|
8202
8204
|
Ge,
|
|
@@ -8224,7 +8226,7 @@ function ed(e) {
|
|
|
8224
8226
|
}
|
|
8225
8227
|
),
|
|
8226
8228
|
!T && /* @__PURE__ */ k(X, { children: [
|
|
8227
|
-
|
|
8229
|
+
Ct(),
|
|
8228
8230
|
/* @__PURE__ */ r(
|
|
8229
8231
|
nr,
|
|
8230
8232
|
{
|
|
@@ -8238,9 +8240,9 @@ function ed(e) {
|
|
|
8238
8240
|
}
|
|
8239
8241
|
)
|
|
8240
8242
|
] }),
|
|
8241
|
-
|
|
8243
|
+
Ct(),
|
|
8242
8244
|
/* @__PURE__ */ r(
|
|
8243
|
-
|
|
8245
|
+
Vt,
|
|
8244
8246
|
{
|
|
8245
8247
|
icon: /* @__PURE__ */ r(Un, {}),
|
|
8246
8248
|
placement: "bottomRight",
|
|
@@ -8254,7 +8256,7 @@ function ed(e) {
|
|
|
8254
8256
|
}
|
|
8255
8257
|
),
|
|
8256
8258
|
/* @__PURE__ */ r(
|
|
8257
|
-
|
|
8259
|
+
Vt,
|
|
8258
8260
|
{
|
|
8259
8261
|
icon: /* @__PURE__ */ r(Yn, {}),
|
|
8260
8262
|
placement: "bottomRight",
|
|
@@ -8274,9 +8276,9 @@ function ed(e) {
|
|
|
8274
8276
|
}
|
|
8275
8277
|
),
|
|
8276
8278
|
v && /* @__PURE__ */ k(X, { children: [
|
|
8277
|
-
|
|
8279
|
+
Ct(),
|
|
8278
8280
|
/* @__PURE__ */ r(
|
|
8279
|
-
|
|
8281
|
+
Vt,
|
|
8280
8282
|
{
|
|
8281
8283
|
placement: "bottomRight",
|
|
8282
8284
|
icon: /* @__PURE__ */ r(
|
|
@@ -8346,7 +8348,7 @@ function ed(e) {
|
|
|
8346
8348
|
visible: G,
|
|
8347
8349
|
onClose: () => B(!1),
|
|
8348
8350
|
model: u,
|
|
8349
|
-
domain:
|
|
8351
|
+
domain: jt(
|
|
8350
8352
|
((U = f == null ? void 0 : f.current) == null ? void 0 : U.getDomain()) || [],
|
|
8351
8353
|
p || []
|
|
8352
8354
|
),
|
|
@@ -8360,7 +8362,7 @@ function ed(e) {
|
|
|
8360
8362
|
] })
|
|
8361
8363
|
] });
|
|
8362
8364
|
}
|
|
8363
|
-
function
|
|
8365
|
+
function Ct() {
|
|
8364
8366
|
return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
|
|
8365
8367
|
}
|
|
8366
8368
|
const td = (e) => {
|
|
@@ -8378,8 +8380,8 @@ const td = (e) => {
|
|
|
8378
8380
|
setCurrentView: c,
|
|
8379
8381
|
availableViews: m,
|
|
8380
8382
|
searchTreeNameSearch: p
|
|
8381
|
-
} = e, { currentView: h, setPreviousView: g } =
|
|
8382
|
-
|
|
8383
|
+
} = e, { currentView: h, setPreviousView: g } = ne(
|
|
8384
|
+
rt
|
|
8383
8385
|
);
|
|
8384
8386
|
return t ? /* @__PURE__ */ k(X, { children: [
|
|
8385
8387
|
/* @__PURE__ */ r(yn, { children: /* @__PURE__ */ r(
|
|
@@ -8414,7 +8416,7 @@ const td = (e) => {
|
|
|
8414
8416
|
}
|
|
8415
8417
|
)
|
|
8416
8418
|
] }) : null;
|
|
8417
|
-
}, or =
|
|
8419
|
+
}, or = nt.createContext(null), nd = (e) => {
|
|
8418
8420
|
const [t, n] = b(!1), [i, o] = b(!1), { children: s, dashboardRef: a, openAction: l } = e;
|
|
8419
8421
|
return /* @__PURE__ */ r(
|
|
8420
8422
|
or.Provider,
|
|
@@ -8432,7 +8434,7 @@ const td = (e) => {
|
|
|
8432
8434
|
);
|
|
8433
8435
|
};
|
|
8434
8436
|
function rd() {
|
|
8435
|
-
const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: i } =
|
|
8437
|
+
const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: i } = ne(or), { t: o } = ge();
|
|
8436
8438
|
return /* @__PURE__ */ k(Ue, { wrap: !0, children: [
|
|
8437
8439
|
/* @__PURE__ */ r(
|
|
8438
8440
|
Ge,
|
|
@@ -8483,8 +8485,8 @@ function od() {
|
|
|
8483
8485
|
return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
|
|
8484
8486
|
}
|
|
8485
8487
|
const id = (e) => {
|
|
8486
|
-
const { dashboardData: t, visible: n } = e, i =
|
|
8487
|
-
|
|
8488
|
+
const { dashboardData: t, visible: n } = e, i = le(), o = ne(
|
|
8489
|
+
ut
|
|
8488
8490
|
), { openShortcut: s } = o || {};
|
|
8489
8491
|
return !t || !n ? null : /* @__PURE__ */ k(
|
|
8490
8492
|
nd,
|
|
@@ -8543,16 +8545,16 @@ function ad(e, t) {
|
|
|
8543
8545
|
limit: y
|
|
8544
8546
|
} = e, [w, x] = b(), [S, C] = b([]), [R, V] = b(!0), D = m || void 0, [F, T] = b(
|
|
8545
8547
|
D
|
|
8546
|
-
), [O, v] = b([]), [_, A] = b(), [L, G] = b([]), [B, q] = b(), [P, Z] = b(0), [ee, oe] = b(!1), [U, $] = b(!1), [I, N] = b(), { t: K } =
|
|
8547
|
-
|
|
8548
|
+
), [O, v] = b([]), [_, A] = b(), [L, G] = b([]), [B, q] = b(), [P, Z] = b(0), [ee, oe] = b(!1), [U, $] = b(!1), [I, N] = b(), { t: K } = ge(), ae = le(), z = le(), re = ne(
|
|
8549
|
+
ut
|
|
8548
8550
|
), {
|
|
8549
8551
|
setCurrentView: ve,
|
|
8550
8552
|
setCurrentId: W,
|
|
8551
8553
|
tabs: ce,
|
|
8552
8554
|
activeKey: Te,
|
|
8553
|
-
openAction:
|
|
8554
|
-
onRemoveTab:
|
|
8555
|
-
} =
|
|
8555
|
+
openAction: Ee,
|
|
8556
|
+
onRemoveTab: Ne
|
|
8557
|
+
} = re || {};
|
|
8556
8558
|
rs(
|
|
8557
8559
|
"ctrl+g,command+g",
|
|
8558
8560
|
(j) => {
|
|
@@ -8560,44 +8562,44 @@ function ad(e, t) {
|
|
|
8560
8562
|
},
|
|
8561
8563
|
[Te, ce, w, _, L]
|
|
8562
8564
|
);
|
|
8563
|
-
function
|
|
8565
|
+
function Me(j) {
|
|
8564
8566
|
T(j), W == null || W(j);
|
|
8565
8567
|
}
|
|
8566
8568
|
function me(j) {
|
|
8567
8569
|
x(j);
|
|
8568
|
-
const
|
|
8569
|
-
ve == null || ve({ ...j, extra:
|
|
8570
|
+
const ye = { action_id: p, action_type: h };
|
|
8571
|
+
ve == null || ve({ ...j, extra: ye });
|
|
8570
8572
|
}
|
|
8571
|
-
|
|
8573
|
+
wt(t, () => ({
|
|
8572
8574
|
canWeClose: $e
|
|
8573
8575
|
}));
|
|
8574
8576
|
const Fe = async () => {
|
|
8575
8577
|
V(!0);
|
|
8576
|
-
const j = [],
|
|
8577
|
-
for (const
|
|
8578
|
-
const [we, ie] =
|
|
8579
|
-
ie !== "dashboard" ?
|
|
8580
|
-
viewTuple:
|
|
8578
|
+
const j = [], ye = [];
|
|
8579
|
+
for (const he of s) {
|
|
8580
|
+
const [we, ie] = he;
|
|
8581
|
+
ie !== "dashboard" ? ye.push({
|
|
8582
|
+
viewTuple: he,
|
|
8581
8583
|
promise: E.getHandler().getView({
|
|
8582
8584
|
model: i,
|
|
8583
8585
|
type: ie,
|
|
8584
8586
|
id: we,
|
|
8585
8587
|
context: o
|
|
8586
8588
|
})
|
|
8587
|
-
}) :
|
|
8588
|
-
viewTuple:
|
|
8589
|
+
}) : ye.push({
|
|
8590
|
+
viewTuple: he
|
|
8589
8591
|
});
|
|
8590
8592
|
}
|
|
8591
|
-
const
|
|
8592
|
-
for (const
|
|
8593
|
-
if (!
|
|
8593
|
+
const Ve = await sd(ye);
|
|
8594
|
+
for (const he of Ve) {
|
|
8595
|
+
if (!he)
|
|
8594
8596
|
continue;
|
|
8595
|
-
const [, we] =
|
|
8597
|
+
const [, we] = he.viewTuple, ie = he.info;
|
|
8596
8598
|
switch (we) {
|
|
8597
8599
|
case "dashboard": {
|
|
8598
8600
|
const je = s.find((Y) => {
|
|
8599
|
-
const [,
|
|
8600
|
-
return
|
|
8601
|
+
const [, te] = Y;
|
|
8602
|
+
return te === "form";
|
|
8601
8603
|
});
|
|
8602
8604
|
let Ae;
|
|
8603
8605
|
je && (Ae = {
|
|
@@ -8642,19 +8644,19 @@ function ad(e, t) {
|
|
|
8642
8644
|
}
|
|
8643
8645
|
}
|
|
8644
8646
|
let ue;
|
|
8645
|
-
!u && j.find((
|
|
8647
|
+
!u && j.find((he) => he.type === "tree") ? ue = j.find(
|
|
8646
8648
|
(we) => we.type === "tree"
|
|
8647
8649
|
) : u ? ue = j.find((we) => u.id ? we.type === u.type && we.view_id === u.id : we.type === u.type) : ue = j.find(
|
|
8648
8650
|
(we) => we.type === "form"
|
|
8649
8651
|
), ue || (Je(
|
|
8650
8652
|
`Error determining the first view to show for model ${i}.
|
|
8651
8653
|
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
8652
|
-
),
|
|
8654
|
+
), Ne == null || Ne(d)), me(ue), C(j), V(!1);
|
|
8653
8655
|
};
|
|
8654
|
-
l({ tabKey: d, canWeClose: $e }),
|
|
8655
|
-
const j = S.find((
|
|
8656
|
-
me(
|
|
8657
|
-
}, [i, s, m]),
|
|
8656
|
+
l({ tabKey: d, canWeClose: $e }), pe(() => {
|
|
8657
|
+
const j = S.find((Ve) => Ve.type === "tree"), ye = S.find((Ve) => u.id ? Ve.type === u.type && Ve.view_id === u.id : Ve.type === u.type);
|
|
8658
|
+
me(ye || j), m ? W == null || W(D) : (Me(void 0), A(void 0)), Fe();
|
|
8659
|
+
}, [i, s, m]), pe(() => {
|
|
8658
8660
|
if (Te === d) {
|
|
8659
8661
|
W == null || W(F);
|
|
8660
8662
|
const j = { action_id: p, action_type: h };
|
|
@@ -8662,46 +8664,46 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8662
8664
|
}
|
|
8663
8665
|
}, [ce, Te]);
|
|
8664
8666
|
async function $e() {
|
|
8665
|
-
return w && w.type === "form" ? await
|
|
8667
|
+
return w && w.type === "form" ? await ae.current.cancelUnsavedChanges() : !0;
|
|
8666
8668
|
}
|
|
8667
8669
|
async function se() {
|
|
8668
|
-
Te === d && (w.type === "form" && !await
|
|
8670
|
+
Te === d && (w.type === "form" && !await ae.current.cancelUnsavedChanges() || oe(!0));
|
|
8669
8671
|
}
|
|
8670
8672
|
async function Oe(j) {
|
|
8671
|
-
var
|
|
8673
|
+
var he;
|
|
8672
8674
|
$(!0);
|
|
8673
|
-
let
|
|
8675
|
+
let ye, Ve;
|
|
8674
8676
|
if (j.length === 1) {
|
|
8675
|
-
|
|
8677
|
+
ye = "form", Ve = [];
|
|
8676
8678
|
const we = j[0], ie = L.findIndex((Ae) => Ae.id === we);
|
|
8677
8679
|
let je;
|
|
8678
8680
|
if (ie === -1) {
|
|
8679
8681
|
try {
|
|
8680
|
-
je = (
|
|
8682
|
+
je = (he = await E.getHandler().readObjects({
|
|
8681
8683
|
model: i,
|
|
8682
8684
|
ids: [we],
|
|
8683
8685
|
context: o
|
|
8684
|
-
})) == null ? void 0 :
|
|
8686
|
+
})) == null ? void 0 : he[0];
|
|
8685
8687
|
} catch {
|
|
8686
8688
|
}
|
|
8687
8689
|
if (!je) {
|
|
8688
|
-
$(!1), oe(!1),
|
|
8690
|
+
$(!1), oe(!1), ht(K("idNotFound"));
|
|
8689
8691
|
return;
|
|
8690
8692
|
}
|
|
8691
8693
|
} else
|
|
8692
8694
|
je = L[ie];
|
|
8693
8695
|
} else
|
|
8694
|
-
|
|
8696
|
+
ye = "tree", Ve = [["id", "in", j]];
|
|
8695
8697
|
$(!1), oe(!1);
|
|
8696
|
-
const ue = s.find((we) => we[1] ===
|
|
8697
|
-
|
|
8698
|
-
domain:
|
|
8698
|
+
const ue = s.find((we) => we[1] === ye);
|
|
8699
|
+
Ee({
|
|
8700
|
+
domain: Ve,
|
|
8699
8701
|
context: o,
|
|
8700
8702
|
model: i,
|
|
8701
8703
|
views: s,
|
|
8702
8704
|
title: a,
|
|
8703
8705
|
target: "current",
|
|
8704
|
-
initialView: { id: ue == null ? void 0 : ue[0], type:
|
|
8706
|
+
initialView: { id: ue == null ? void 0 : ue[0], type: ye },
|
|
8705
8707
|
action_id: p,
|
|
8706
8708
|
action_type: h,
|
|
8707
8709
|
res_id: j[0]
|
|
@@ -8714,7 +8716,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8714
8716
|
return /* @__PURE__ */ r(
|
|
8715
8717
|
Uc,
|
|
8716
8718
|
{
|
|
8717
|
-
formRef:
|
|
8719
|
+
formRef: ae,
|
|
8718
8720
|
currentId: F,
|
|
8719
8721
|
visible: w.type === j.type && w.view_id === j.view_id,
|
|
8720
8722
|
formView: j,
|
|
@@ -8738,14 +8740,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8738
8740
|
model: i,
|
|
8739
8741
|
context: o,
|
|
8740
8742
|
domain: n,
|
|
8741
|
-
formView: S.find((
|
|
8743
|
+
formView: S.find((ye) => ye.type === "form"),
|
|
8742
8744
|
treeView: j,
|
|
8743
8745
|
searchTreeRef: z,
|
|
8744
8746
|
searchTreeNameSearch: I,
|
|
8745
8747
|
availableViews: S,
|
|
8746
8748
|
results: L,
|
|
8747
8749
|
setCurrentItemIndex: A,
|
|
8748
|
-
setCurrentId:
|
|
8750
|
+
setCurrentId: Me,
|
|
8749
8751
|
setCurrentView: me
|
|
8750
8752
|
},
|
|
8751
8753
|
`${j.type}-${j.view_id}`
|
|
@@ -8759,8 +8761,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8759
8761
|
model: i,
|
|
8760
8762
|
context: o,
|
|
8761
8763
|
domain: n,
|
|
8762
|
-
treeView: S.find((
|
|
8763
|
-
formView: S.find((
|
|
8764
|
+
treeView: S.find((ye) => ye.type === "tree"),
|
|
8765
|
+
formView: S.find((ye) => ye.type === "form")
|
|
8764
8766
|
},
|
|
8765
8767
|
`${j.type}-${j.view_id}`
|
|
8766
8768
|
);
|
|
@@ -8778,11 +8780,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8778
8780
|
}
|
|
8779
8781
|
function Ke() {
|
|
8780
8782
|
if (F === void 0 && w.type === "form")
|
|
8781
|
-
|
|
8783
|
+
ae.current.clearAndReload();
|
|
8782
8784
|
else {
|
|
8783
|
-
|
|
8785
|
+
Me(void 0);
|
|
8784
8786
|
const j = S.find(
|
|
8785
|
-
(
|
|
8787
|
+
(ye) => ye.type === "form"
|
|
8786
8788
|
);
|
|
8787
8789
|
me(j);
|
|
8788
8790
|
}
|
|
@@ -8794,11 +8796,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8794
8796
|
currentView: w,
|
|
8795
8797
|
setCurrentView: me,
|
|
8796
8798
|
availableViews: S,
|
|
8797
|
-
formRef:
|
|
8799
|
+
formRef: ae,
|
|
8798
8800
|
searchTreeRef: z,
|
|
8799
8801
|
onNewClicked: Ke,
|
|
8800
8802
|
currentId: F,
|
|
8801
|
-
setCurrentId:
|
|
8803
|
+
setCurrentId: Me,
|
|
8802
8804
|
setCurrentItemIndex: A,
|
|
8803
8805
|
currentItemIndex: _,
|
|
8804
8806
|
results: L,
|
|
@@ -8831,7 +8833,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
8831
8833
|
}
|
|
8832
8834
|
) : null;
|
|
8833
8835
|
}
|
|
8834
|
-
const Eo =
|
|
8836
|
+
const Eo = yt(ad);
|
|
8835
8837
|
async function ld({
|
|
8836
8838
|
actionId: e,
|
|
8837
8839
|
rootContext: t = {},
|
|
@@ -8840,7 +8842,7 @@ async function ld({
|
|
|
8840
8842
|
const i = "ir.actions.act_window", o = `${i},${e}`, s = await E.getHandler().getActionData({
|
|
8841
8843
|
action: o,
|
|
8842
8844
|
context: t
|
|
8843
|
-
}), a =
|
|
8845
|
+
}), a = xt({
|
|
8844
8846
|
context: s.context,
|
|
8845
8847
|
values: n,
|
|
8846
8848
|
fields: {}
|
|
@@ -8885,7 +8887,7 @@ async function ld({
|
|
|
8885
8887
|
};
|
|
8886
8888
|
}
|
|
8887
8889
|
const cd = ls(cs), dd = (e) => {
|
|
8888
|
-
const { children: t = [], onPositionItemsChanged: n } = e, i =
|
|
8890
|
+
const { children: t = [], onPositionItemsChanged: n } = e, i = nt.Children.map(
|
|
8889
8891
|
t,
|
|
8890
8892
|
(o) => {
|
|
8891
8893
|
const { parms: s, id: a } = o.props;
|
|
@@ -8913,7 +8915,7 @@ const cd = ls(cs), dd = (e) => {
|
|
|
8913
8915
|
children: i
|
|
8914
8916
|
}
|
|
8915
8917
|
);
|
|
8916
|
-
}, { useToken: ud } = He, { Text: fd } =
|
|
8918
|
+
}, { useToken: ud } = He, { Text: fd } = Wt, md = (e) => {
|
|
8917
8919
|
const { title: t, children: n, action: i, openAction: o } = e, { token: s } = ud();
|
|
8918
8920
|
return /* @__PURE__ */ k(
|
|
8919
8921
|
"div",
|
|
@@ -8979,10 +8981,10 @@ function hd(e) {
|
|
|
8979
8981
|
domain: s = [],
|
|
8980
8982
|
visible: a = !0,
|
|
8981
8983
|
parentContext: l = {}
|
|
8982
|
-
} = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [x, S] = b(1), [C, R] = b(0), V =
|
|
8984
|
+
} = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [x, S] = b(1), [C, R] = b(0), V = le(St), D = le([]), [F, T] = b(0), [O, v] = b([]), [_, A] = b(void 0), [L, G] = b(), [B, q] = b(), [P, Z] = b(), [ee, oe] = b(!1), U = le([]), $ = (W) => {
|
|
8983
8985
|
oe(!0), S(W), R((W - 1) * V.current);
|
|
8984
8986
|
}, I = async () => {
|
|
8985
|
-
const W = U.current.length > 0 ? U.current : s, ce =
|
|
8987
|
+
const W = U.current.length > 0 ? U.current : s, ce = jt(D.current, W), { colors: Te } = At(h), { totalItems: Ee, results: Ne, attrsEvaluated: Me } = await E.getHandler().searchForTree({
|
|
8986
8988
|
params: ce,
|
|
8987
8989
|
limit: V.current,
|
|
8988
8990
|
offset: C,
|
|
@@ -8991,14 +8993,14 @@ function hd(e) {
|
|
|
8991
8993
|
context: l,
|
|
8992
8994
|
attrs: Te && { colors: Te }
|
|
8993
8995
|
});
|
|
8994
|
-
A(nn(
|
|
8995
|
-
const me =
|
|
8996
|
-
resultsToSort:
|
|
8996
|
+
A(nn(Me));
|
|
8997
|
+
const me = Dt({
|
|
8998
|
+
resultsToSort: Ne,
|
|
8997
8999
|
sorter: L,
|
|
8998
9000
|
fields: { ...h.fields, ...y.fields }
|
|
8999
9001
|
});
|
|
9000
9002
|
oe(!1), v(me);
|
|
9001
|
-
const Fe = await
|
|
9003
|
+
const Fe = await Ee;
|
|
9002
9004
|
T(Fe);
|
|
9003
9005
|
}, N = async () => {
|
|
9004
9006
|
try {
|
|
@@ -9007,19 +9009,19 @@ function hd(e) {
|
|
|
9007
9009
|
q(JSON.stringify(W));
|
|
9008
9010
|
}
|
|
9009
9011
|
};
|
|
9010
|
-
|
|
9012
|
+
pe(() => {
|
|
9011
9013
|
f && a && N();
|
|
9012
9014
|
}, [x, C, f, a]);
|
|
9013
9015
|
const K = async (W) => {
|
|
9014
9016
|
c(!1), u(!0), Z(void 0);
|
|
9015
9017
|
try {
|
|
9016
|
-
W === "action" ? await
|
|
9018
|
+
W === "action" ? await ae() : await z(), c(!0);
|
|
9017
9019
|
} catch (ce) {
|
|
9018
9020
|
Z(ce);
|
|
9019
9021
|
} finally {
|
|
9020
9022
|
u(!1);
|
|
9021
9023
|
}
|
|
9022
|
-
},
|
|
9024
|
+
}, ae = async () => {
|
|
9023
9025
|
const W = await E.getHandler().getViewsForAction({
|
|
9024
9026
|
action: t,
|
|
9025
9027
|
context: l
|
|
@@ -9041,10 +9043,10 @@ function hd(e) {
|
|
|
9041
9043
|
});
|
|
9042
9044
|
g(ce);
|
|
9043
9045
|
};
|
|
9044
|
-
|
|
9046
|
+
pe(() => {
|
|
9045
9047
|
t ? K("action") : n && K("model");
|
|
9046
9048
|
}, [t, n]);
|
|
9047
|
-
const
|
|
9049
|
+
const re = (W) => {
|
|
9048
9050
|
const { id: ce } = W;
|
|
9049
9051
|
o({
|
|
9050
9052
|
id: ce,
|
|
@@ -9054,7 +9056,7 @@ function hd(e) {
|
|
|
9054
9056
|
}, ve = () => !h || !y ? null : /* @__PURE__ */ k("div", { style: { overflowY: "scroll" }, children: [
|
|
9055
9057
|
B && /* @__PURE__ */ r(Xe, { className: "mt-10", message: B, type: "error", banner: !0 }),
|
|
9056
9058
|
/* @__PURE__ */ r(
|
|
9057
|
-
|
|
9059
|
+
Xt,
|
|
9058
9060
|
{
|
|
9059
9061
|
showPagination: !1,
|
|
9060
9062
|
total: F,
|
|
@@ -9064,12 +9066,12 @@ function hd(e) {
|
|
|
9064
9066
|
results: O,
|
|
9065
9067
|
onRequestPageChange: $,
|
|
9066
9068
|
loading: ee,
|
|
9067
|
-
onRowClicked:
|
|
9069
|
+
onRowClicked: re,
|
|
9068
9070
|
colorsForResults: _,
|
|
9069
9071
|
sorter: L,
|
|
9070
9072
|
onChangeSort: (W) => {
|
|
9071
9073
|
G == null || G(W);
|
|
9072
|
-
const ce =
|
|
9074
|
+
const ce = Dt({
|
|
9073
9075
|
resultsToSort: O,
|
|
9074
9076
|
sorter: W,
|
|
9075
9077
|
fields: { ...h.fields, ...y.fields }
|
|
@@ -9084,7 +9086,7 @@ function hd(e) {
|
|
|
9084
9086
|
}
|
|
9085
9087
|
const pd = (e) => {
|
|
9086
9088
|
const { model: t } = e, [n, i] = b();
|
|
9087
|
-
|
|
9089
|
+
pe(() => {
|
|
9088
9090
|
o();
|
|
9089
9091
|
}, [t]);
|
|
9090
9092
|
async function o() {
|
|
@@ -9095,19 +9097,19 @@ const pd = (e) => {
|
|
|
9095
9097
|
});
|
|
9096
9098
|
s.length > 0 && i(s[0].id);
|
|
9097
9099
|
}
|
|
9098
|
-
return /* @__PURE__ */ r("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ r(
|
|
9100
|
+
return /* @__PURE__ */ r("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ r(zt, { ...e, model: t, id: n, readOnly: !0 }) });
|
|
9099
9101
|
}, Rn = "line_ids";
|
|
9100
9102
|
function gd(e, t) {
|
|
9101
9103
|
const { model: n, context: i = {}, id: o, configAction: s } = e, [a, l] = b([]), [d, u] = b(!1), [f, c] = b(), {
|
|
9102
9104
|
setIsLoading: m,
|
|
9103
9105
|
openAction: p,
|
|
9104
9106
|
moveItemsEnabled: h
|
|
9105
|
-
} =
|
|
9107
|
+
} = ne(or), g = le(), y = le(), [w] = et(E.getHandler().getView), [x] = et(
|
|
9106
9108
|
E.getHandler().readObjects
|
|
9107
9109
|
), [S] = et(E.getHandler().update);
|
|
9108
|
-
|
|
9110
|
+
pe(() => {
|
|
9109
9111
|
C();
|
|
9110
|
-
}, [n, o, i]),
|
|
9112
|
+
}, [n, o, i]), wt(t, () => ({
|
|
9111
9113
|
refresh: () => {
|
|
9112
9114
|
C();
|
|
9113
9115
|
},
|
|
@@ -9240,11 +9242,11 @@ function gd(e, t) {
|
|
|
9240
9242
|
initialView: N,
|
|
9241
9243
|
limit: K
|
|
9242
9244
|
} = A;
|
|
9243
|
-
let
|
|
9245
|
+
let ae = {};
|
|
9244
9246
|
try {
|
|
9245
|
-
|
|
9247
|
+
ae = JSON.parse(G.replace(/'/g, '"'));
|
|
9246
9248
|
} catch {
|
|
9247
|
-
|
|
9249
|
+
ae = { x: _ * 2, y: 0, w: 2, h: 3 };
|
|
9248
9250
|
}
|
|
9249
9251
|
let z = null;
|
|
9250
9252
|
if ((N == null ? void 0 : N.type) === "graph")
|
|
@@ -9273,23 +9275,23 @@ function gd(e, t) {
|
|
|
9273
9275
|
)[0][0],
|
|
9274
9276
|
onRowClicked: (W) => {
|
|
9275
9277
|
const ce = oe.find((Te) => {
|
|
9276
|
-
const [,
|
|
9277
|
-
return
|
|
9278
|
+
const [, Ee] = Te;
|
|
9279
|
+
return Ee === "form";
|
|
9278
9280
|
});
|
|
9279
9281
|
if (ce) {
|
|
9280
|
-
const [Te,
|
|
9281
|
-
actionId:
|
|
9282
|
-
actionType:
|
|
9282
|
+
const [Te, Ee] = ce, {
|
|
9283
|
+
actionId: Ne,
|
|
9284
|
+
actionType: Me,
|
|
9283
9285
|
title: me,
|
|
9284
9286
|
model: Fe
|
|
9285
9287
|
} = A, $e = {
|
|
9286
|
-
action_id:
|
|
9287
|
-
action_type:
|
|
9288
|
+
action_id: Ne,
|
|
9289
|
+
action_type: Me,
|
|
9288
9290
|
name: me,
|
|
9289
9291
|
res_id: W.id,
|
|
9290
9292
|
res_model: Fe,
|
|
9291
9293
|
view_id: Te,
|
|
9292
|
-
view_type:
|
|
9294
|
+
view_type: Ee
|
|
9293
9295
|
};
|
|
9294
9296
|
p($e);
|
|
9295
9297
|
}
|
|
@@ -9316,7 +9318,7 @@ function gd(e, t) {
|
|
|
9316
9318
|
}
|
|
9317
9319
|
);
|
|
9318
9320
|
}
|
|
9319
|
-
let
|
|
9321
|
+
let re;
|
|
9320
9322
|
const ve = oe.find((W) => {
|
|
9321
9323
|
const [, ce] = W;
|
|
9322
9324
|
return ce === "tree";
|
|
@@ -9324,16 +9326,16 @@ function gd(e, t) {
|
|
|
9324
9326
|
if (ve) {
|
|
9325
9327
|
const [W, ce] = ve, {
|
|
9326
9328
|
actionId: Te,
|
|
9327
|
-
actionType:
|
|
9328
|
-
title:
|
|
9329
|
-
model:
|
|
9329
|
+
actionType: Ee,
|
|
9330
|
+
title: Ne,
|
|
9331
|
+
model: Me
|
|
9330
9332
|
} = A;
|
|
9331
|
-
|
|
9333
|
+
re = {
|
|
9332
9334
|
action_id: Te,
|
|
9333
|
-
action_type:
|
|
9334
|
-
name:
|
|
9335
|
+
action_type: Ee,
|
|
9336
|
+
name: Ne,
|
|
9335
9337
|
res_id: !1,
|
|
9336
|
-
res_model:
|
|
9338
|
+
res_model: Me,
|
|
9337
9339
|
view_id: W,
|
|
9338
9340
|
view_type: ce,
|
|
9339
9341
|
overrideUnsettedLimit: !0
|
|
@@ -9344,8 +9346,8 @@ function gd(e, t) {
|
|
|
9344
9346
|
{
|
|
9345
9347
|
id: B,
|
|
9346
9348
|
title: ee,
|
|
9347
|
-
parms:
|
|
9348
|
-
action:
|
|
9349
|
+
parms: ae,
|
|
9350
|
+
action: re,
|
|
9349
9351
|
openAction: p,
|
|
9350
9352
|
children: z
|
|
9351
9353
|
},
|
|
@@ -9353,12 +9355,12 @@ function gd(e, t) {
|
|
|
9353
9355
|
);
|
|
9354
9356
|
}) });
|
|
9355
9357
|
}
|
|
9356
|
-
const yd =
|
|
9358
|
+
const yd = yt(gd), wd = (e) => {
|
|
9357
9359
|
const { ooui: t } = e;
|
|
9358
|
-
return /* @__PURE__ */ r(
|
|
9360
|
+
return /* @__PURE__ */ r(Ce, { type: "array", ...e, children: /* @__PURE__ */ r(vd, { ooui: t }) });
|
|
9359
9361
|
}, vd = (e) => {
|
|
9360
|
-
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 =
|
|
9361
|
-
|
|
9362
|
+
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: x } = w || {};
|
|
9363
|
+
Ft(() => {
|
|
9362
9364
|
C();
|
|
9363
9365
|
}, [o]);
|
|
9364
9366
|
const S = (F) => {
|
|
@@ -9372,7 +9374,7 @@ const yd = pt(gd), wd = (e) => {
|
|
|
9372
9374
|
if (n.domain) {
|
|
9373
9375
|
const T = await E.getHandler().evalDomain({
|
|
9374
9376
|
domain: n.domain,
|
|
9375
|
-
values:
|
|
9377
|
+
values: Mt({
|
|
9376
9378
|
fields: w == null ? void 0 : w.getFields(),
|
|
9377
9379
|
values: w.getPlainValues()
|
|
9378
9380
|
}),
|
|
@@ -9416,28 +9418,28 @@ const yd = pt(gd), wd = (e) => {
|
|
|
9416
9418
|
};
|
|
9417
9419
|
return f && a.length === 0 ? /* @__PURE__ */ r(Le, {}) : /* @__PURE__ */ r(X, { children: /* @__PURE__ */ k("div", { className: "flex flex-row", children: [
|
|
9418
9420
|
/* @__PURE__ */ r(
|
|
9419
|
-
|
|
9421
|
+
Bt.Group,
|
|
9420
9422
|
{
|
|
9421
9423
|
value: a.length ? s : [],
|
|
9422
9424
|
disabled: h,
|
|
9423
9425
|
onChange: D,
|
|
9424
9426
|
style: { width: "100%" },
|
|
9425
|
-
children: /* @__PURE__ */ r(_e, { children: a.map((F) => /* @__PURE__ */ r(de, { span: Math.floor(24 / y), children: /* @__PURE__ */ r(
|
|
9427
|
+
children: /* @__PURE__ */ r(_e, { children: a.map((F) => /* @__PURE__ */ r(de, { span: Math.floor(24 / y), children: /* @__PURE__ */ r(Bt, { value: F.value, children: F.label }) })) })
|
|
9426
9428
|
}
|
|
9427
9429
|
),
|
|
9428
9430
|
!h && /* @__PURE__ */ k(Ue, { children: [
|
|
9429
9431
|
/* @__PURE__ */ r(
|
|
9430
|
-
|
|
9432
|
+
ke,
|
|
9431
9433
|
{
|
|
9432
9434
|
onClick: R,
|
|
9433
9435
|
disabled: s.length == a.length,
|
|
9434
9436
|
children: "Check all"
|
|
9435
9437
|
}
|
|
9436
9438
|
),
|
|
9437
|
-
/* @__PURE__ */ r(
|
|
9439
|
+
/* @__PURE__ */ r(ke, { onClick: V, disabled: s.length === 0, children: "Uncheck all" })
|
|
9438
9440
|
] })
|
|
9439
9441
|
] }) });
|
|
9440
|
-
}, bd = (e) => /* @__PURE__ */ r(
|
|
9442
|
+
}, bd = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(Cd, { ...e }) }), Cd = (e) => {
|
|
9441
9443
|
const { value: t, ooui: n } = e;
|
|
9442
9444
|
return /* @__PURE__ */ r(
|
|
9443
9445
|
"div",
|
|
@@ -9458,7 +9460,7 @@ const yd = pt(gd), wd = (e) => {
|
|
|
9458
9460
|
);
|
|
9459
9461
|
}, xd = (e) => {
|
|
9460
9462
|
const { ooui: t } = e, { required: n } = t;
|
|
9461
|
-
return /* @__PURE__ */ r(
|
|
9463
|
+
return /* @__PURE__ */ r(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(Sd, { ...e }) });
|
|
9462
9464
|
}, Sd = (e) => {
|
|
9463
9465
|
const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, direction: a } = t, l = Array.from(o.entries()), d = l && l.length && l.map((u) => {
|
|
9464
9466
|
const [f, c] = u;
|
|
@@ -9467,15 +9469,15 @@ const yd = pt(gd), wd = (e) => {
|
|
|
9467
9469
|
return /* @__PURE__ */ r(cr.Group, { disabled: s, onChange: n, value: i, children: /* @__PURE__ */ r(Ue, { direction: a, children: d }) });
|
|
9468
9470
|
}, Td = (e) => {
|
|
9469
9471
|
const { ooui: t } = e, { id: n, readOnly: i, required: o } = t;
|
|
9470
|
-
return /* @__PURE__ */ r(
|
|
9472
|
+
return /* @__PURE__ */ r(Ce, { ...e, valuePropName: "checked", children: /* @__PURE__ */ r(Fd, { id: n, readOnly: i, required: o }) });
|
|
9471
9473
|
}, Fd = (e) => {
|
|
9472
9474
|
const { required: t, readOnly: n, ...i } = e;
|
|
9473
9475
|
return /* @__PURE__ */ r("div", { className: "flex flex-row", children: /* @__PURE__ */ r(ii, { disabled: n, ...i }) });
|
|
9474
9476
|
}, Rd = (e) => {
|
|
9475
9477
|
const { ooui: t } = e, { required: n } = t;
|
|
9476
|
-
return /* @__PURE__ */ r(
|
|
9478
|
+
return /* @__PURE__ */ r(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(_d, { ...e }) });
|
|
9477
9479
|
}, _d = (e) => {
|
|
9478
|
-
const { ooui: t, value: n } = e, { selectionValues: i, errorField: o } = t, s =
|
|
9480
|
+
const { ooui: t, value: n } = e, { selectionValues: i, errorField: o } = t, s = ne(Be), a = Array.from(i.entries()), l = a.map((f) => f[0]).indexOf(n);
|
|
9479
9481
|
let d = "process", u = "";
|
|
9480
9482
|
return o && (u = s.getFieldValue(o), u && (d = "error")), /* @__PURE__ */ r(dr, { current: l, status: d, children: a.map((f, c) => /* @__PURE__ */ r(
|
|
9481
9483
|
dr.Step,
|
|
@@ -9485,8 +9487,8 @@ const yd = pt(gd), wd = (e) => {
|
|
|
9485
9487
|
}
|
|
9486
9488
|
)) });
|
|
9487
9489
|
}, Od = (e) => {
|
|
9488
|
-
const { ooui: t } = e, { lang: n, height: i } = t, o =
|
|
9489
|
-
return /* @__PURE__ */ r(
|
|
9490
|
+
const { ooui: t } = e, { lang: n, height: i } = t, o = ne(Be), { elementHasLostFocus: s } = o || {};
|
|
9491
|
+
return /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(
|
|
9490
9492
|
ss,
|
|
9491
9493
|
{
|
|
9492
9494
|
defaultLanguage: n || "",
|
|
@@ -9496,7 +9498,7 @@ const yd = pt(gd), wd = (e) => {
|
|
|
9496
9498
|
}
|
|
9497
9499
|
}
|
|
9498
9500
|
) });
|
|
9499
|
-
}, { Meta: Id } = Pn, { Text: Vd } =
|
|
9501
|
+
}, { Meta: Id } = Pn, { Text: Vd } = Wt, Ad = ({ email: e, size: t = 40, theme: n = "" }) => {
|
|
9500
9502
|
const i = `https://www.gravatar.com/avatar/${as(
|
|
9501
9503
|
e
|
|
9502
9504
|
)}?s=${t}&d=${n}`;
|
|
@@ -9511,7 +9513,7 @@ function Dd({ text: e }) {
|
|
|
9511
9513
|
] }, i)) });
|
|
9512
9514
|
}
|
|
9513
9515
|
const kd = (e) => {
|
|
9514
|
-
const { data: t, style: n } = e, { t: i } =
|
|
9516
|
+
const { data: t, style: n } = e, { t: i } = ge();
|
|
9515
9517
|
return /* @__PURE__ */ k(Pn, { style: { ...n, textAlign: "start" }, children: [
|
|
9516
9518
|
/* @__PURE__ */ r(
|
|
9517
9519
|
Id,
|
|
@@ -9542,21 +9544,21 @@ const kd = (e) => {
|
|
|
9542
9544
|
};
|
|
9543
9545
|
});
|
|
9544
9546
|
return /* @__PURE__ */ r(_n, { mode: "alternate", items: n });
|
|
9545
|
-
}, Nd = (e) => /* @__PURE__ */ r(
|
|
9547
|
+
}, Nd = (e) => /* @__PURE__ */ r(Ce, { ...e, children: /* @__PURE__ */ r(Ed, {}) }), { Content: Md } = si, { Title: Pd } = Wt;
|
|
9546
9548
|
function Ld() {
|
|
9547
|
-
const { t: e } =
|
|
9549
|
+
const { t: e } = ge();
|
|
9548
9550
|
return /* @__PURE__ */ r(Md, { className: "m-5 select-none", children: /* @__PURE__ */ r(Pd, { level: 5, children: e("welcome") }) });
|
|
9549
9551
|
}
|
|
9550
9552
|
function $d(e, t) {
|
|
9551
|
-
const { children: n } = e, [i, o] = b("welcome"), { t: s } =
|
|
9553
|
+
const { children: n } = e, [i, o] = b("welcome"), { t: s } = ge(), { globalValues: a, rootContext: l } = ko(), [d, u] = b([
|
|
9552
9554
|
{
|
|
9553
9555
|
title: s("welcome"),
|
|
9554
9556
|
key: "welcome",
|
|
9555
9557
|
closable: !0,
|
|
9556
9558
|
content: /* @__PURE__ */ r(Ld, {})
|
|
9557
9559
|
}
|
|
9558
|
-
]), f =
|
|
9559
|
-
|
|
9560
|
+
]), f = le(/* @__PURE__ */ new Map()), c = le();
|
|
9561
|
+
wt(t, () => ({
|
|
9560
9562
|
retrieveAndOpenAction: h,
|
|
9561
9563
|
openShortcut: w
|
|
9562
9564
|
}));
|
|
@@ -9589,7 +9591,7 @@ function $d(e, t) {
|
|
|
9589
9591
|
Je("Action type not supported");
|
|
9590
9592
|
return;
|
|
9591
9593
|
}
|
|
9592
|
-
const [v, _] = C.split(","), A = parseInt(_), L =
|
|
9594
|
+
const [v, _] = C.split(","), A = parseInt(_), L = xt({
|
|
9593
9595
|
context: O.context,
|
|
9594
9596
|
values: a,
|
|
9595
9597
|
fields: {}
|
|
@@ -9606,25 +9608,25 @@ function $d(e, t) {
|
|
|
9606
9608
|
limit: oe
|
|
9607
9609
|
} = O, U = ee === "tree", $ = [];
|
|
9608
9610
|
for (const N of q) {
|
|
9609
|
-
const [K,
|
|
9611
|
+
const [K, ae] = N;
|
|
9610
9612
|
if (K)
|
|
9611
9613
|
$.push(N);
|
|
9612
|
-
else if (
|
|
9614
|
+
else if (ae === "dashboard")
|
|
9613
9615
|
$.push([void 0, "dashboard"]);
|
|
9614
9616
|
else {
|
|
9615
9617
|
const { view_id: z } = await E.getHandler().getView({
|
|
9616
9618
|
model: B,
|
|
9617
|
-
type:
|
|
9619
|
+
type: ae,
|
|
9618
9620
|
id: K,
|
|
9619
9621
|
context: { ...l, ...L }
|
|
9620
9622
|
});
|
|
9621
|
-
$.push([z,
|
|
9623
|
+
$.push([z, ae]);
|
|
9622
9624
|
}
|
|
9623
9625
|
}
|
|
9624
9626
|
let I;
|
|
9625
9627
|
if (D) {
|
|
9626
9628
|
const [N, K] = $.find(
|
|
9627
|
-
([
|
|
9629
|
+
([ae, z]) => z === D
|
|
9628
9630
|
);
|
|
9629
9631
|
I = { id: N, type: K };
|
|
9630
9632
|
} else {
|
|
@@ -9681,13 +9683,13 @@ function $d(e, t) {
|
|
|
9681
9683
|
target: A,
|
|
9682
9684
|
string: L,
|
|
9683
9685
|
limit: G
|
|
9684
|
-
} = C, [B, q] = _[0], P = { id: B, type: q }, Z =
|
|
9686
|
+
} = C, [B, q] = _[0], P = { id: B, type: q }, Z = xt({
|
|
9685
9687
|
context: O,
|
|
9686
9688
|
values: { ...V, ...a },
|
|
9687
9689
|
fields: R
|
|
9688
9690
|
}), ee = v ? await E.getHandler().evalDomain({
|
|
9689
9691
|
domain: v,
|
|
9690
|
-
values:
|
|
9692
|
+
values: Mt({
|
|
9691
9693
|
fields: R,
|
|
9692
9694
|
values: { ...V, ...a }
|
|
9693
9695
|
}),
|
|
@@ -9717,7 +9719,7 @@ function $d(e, t) {
|
|
|
9717
9719
|
} = C, O = `${V},${R}`, v = await E.getHandler().getActionData({
|
|
9718
9720
|
action: O,
|
|
9719
9721
|
context: l
|
|
9720
|
-
}), _ =
|
|
9722
|
+
}), _ = xt({
|
|
9721
9723
|
context: v.context,
|
|
9722
9724
|
values: a,
|
|
9723
9725
|
fields: {}
|
|
@@ -9734,19 +9736,19 @@ function $d(e, t) {
|
|
|
9734
9736
|
limit: Z
|
|
9735
9737
|
} = v, ee = P === "tree", oe = [];
|
|
9736
9738
|
for (const N of G) {
|
|
9737
|
-
const [K,
|
|
9739
|
+
const [K, ae] = N;
|
|
9738
9740
|
if (K)
|
|
9739
9741
|
oe.push(N);
|
|
9740
|
-
else if (
|
|
9742
|
+
else if (ae === "dashboard")
|
|
9741
9743
|
oe.push([void 0, "dashboard"]);
|
|
9742
9744
|
else {
|
|
9743
9745
|
const { view_id: z } = await E.getHandler().getView({
|
|
9744
9746
|
model: L,
|
|
9745
|
-
type:
|
|
9747
|
+
type: ae,
|
|
9746
9748
|
id: K,
|
|
9747
9749
|
context: { ...l, ..._ }
|
|
9748
9750
|
});
|
|
9749
|
-
oe.push([z,
|
|
9751
|
+
oe.push([z, ae]);
|
|
9750
9752
|
}
|
|
9751
9753
|
}
|
|
9752
9754
|
let U, $;
|
|
@@ -9768,7 +9770,7 @@ function $d(e, t) {
|
|
|
9768
9770
|
action_type: V,
|
|
9769
9771
|
res_id: D,
|
|
9770
9772
|
treeExpandable: ee,
|
|
9771
|
-
limit: T && (Z === 0 || Z === !1) ?
|
|
9773
|
+
limit: T && (Z === 0 || Z === !1) ? St : Z
|
|
9772
9774
|
});
|
|
9773
9775
|
}
|
|
9774
9776
|
async function x({
|
|
@@ -9884,7 +9886,7 @@ function $d(e, t) {
|
|
|
9884
9886
|
}
|
|
9885
9887
|
);
|
|
9886
9888
|
}
|
|
9887
|
-
const Du =
|
|
9889
|
+
const Du = yt($d), { useToken: Bd } = He;
|
|
9888
9890
|
function Hd(e) {
|
|
9889
9891
|
const { label: t, onClose: n, tabKey: i, isActive: o, onSelected: s } = e, { token: a } = Bd(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
|
|
9890
9892
|
return /* @__PURE__ */ k(
|
|
@@ -9940,7 +9942,7 @@ function Hd(e) {
|
|
|
9940
9942
|
alignItems: "center"
|
|
9941
9943
|
},
|
|
9942
9944
|
children: /* @__PURE__ */ r(
|
|
9943
|
-
|
|
9945
|
+
Ut,
|
|
9944
9946
|
{
|
|
9945
9947
|
style: {
|
|
9946
9948
|
color: a.colorPrimaryActive
|
|
@@ -9957,8 +9959,8 @@ function Hd(e) {
|
|
|
9957
9959
|
);
|
|
9958
9960
|
}
|
|
9959
9961
|
function ku() {
|
|
9960
|
-
const e =
|
|
9961
|
-
|
|
9962
|
+
const e = ne(
|
|
9963
|
+
ut
|
|
9962
9964
|
), { activeKey: t, tabs: n, onRemoveTab: i, onChangeTab: o } = e || {};
|
|
9963
9965
|
return /* @__PURE__ */ r(X, { children: n.map((s) => /* @__PURE__ */ r(
|
|
9964
9966
|
Hd,
|
|
@@ -9973,17 +9975,17 @@ function ku() {
|
|
|
9973
9975
|
)) });
|
|
9974
9976
|
}
|
|
9975
9977
|
function Kd(e) {
|
|
9976
|
-
const { tab: t } = e, n =
|
|
9977
|
-
|
|
9978
|
+
const { tab: t } = e, n = ne(
|
|
9979
|
+
ut
|
|
9978
9980
|
), { activeKey: i } = n || {}, o = {
|
|
9979
9981
|
display: "none"
|
|
9980
9982
|
};
|
|
9981
9983
|
return /* @__PURE__ */ r("div", { style: t.key !== i ? o : void 0, children: t.content });
|
|
9982
9984
|
}
|
|
9983
|
-
const jd =
|
|
9985
|
+
const jd = nt.memo(Kd, () => !0);
|
|
9984
9986
|
function Eu() {
|
|
9985
|
-
const e =
|
|
9986
|
-
|
|
9987
|
+
const e = ne(
|
|
9988
|
+
ut
|
|
9987
9989
|
), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((i) => /* @__PURE__ */ r(jd, { tab: i }, i.key))) || null;
|
|
9988
9990
|
return /* @__PURE__ */ r(X, { children: n });
|
|
9989
9991
|
}
|
|
@@ -9994,8 +9996,8 @@ const { useToken: Wd } = He, Nu = (e) => {
|
|
|
9994
9996
|
onAddFavourite: i,
|
|
9995
9997
|
onRemoveFavourite: o,
|
|
9996
9998
|
onDropdownClosed: s
|
|
9997
|
-
} = e, [a, l] = b(!1), [d, u] = b(), { t: f } =
|
|
9998
|
-
|
|
9999
|
+
} = e, [a, l] = b(!1), [d, u] = b(), { t: f } = ge(), { token: c } = Wd(), m = le(null), p = ne(
|
|
10000
|
+
ut
|
|
9999
10001
|
), {
|
|
10000
10002
|
openShortcut: h,
|
|
10001
10003
|
tabs: g,
|
|
@@ -10023,7 +10025,7 @@ const { useToken: Wd } = He, Nu = (e) => {
|
|
|
10023
10025
|
if (C)
|
|
10024
10026
|
return JSON.stringify(C);
|
|
10025
10027
|
}, [C]);
|
|
10026
|
-
|
|
10028
|
+
pe(() => {
|
|
10027
10029
|
D();
|
|
10028
10030
|
}, [R]);
|
|
10029
10031
|
function V(v) {
|
|
@@ -10053,7 +10055,7 @@ const { useToken: Wd } = He, Nu = (e) => {
|
|
|
10053
10055
|
...A,
|
|
10054
10056
|
id: A.id,
|
|
10055
10057
|
name: A.name,
|
|
10056
|
-
icon: A.view_type === "tree" ? /* @__PURE__ */ r(qn, {}) : /* @__PURE__ */ r(
|
|
10058
|
+
icon: A.view_type === "tree" ? /* @__PURE__ */ r(qn, {}) : /* @__PURE__ */ r(Ht, {})
|
|
10057
10059
|
}))
|
|
10058
10060
|
}
|
|
10059
10061
|
];
|
|
@@ -10098,7 +10100,7 @@ const { useToken: Wd } = He, Nu = (e) => {
|
|
|
10098
10100
|
placement: "bottomRight",
|
|
10099
10101
|
header: /* @__PURE__ */ k("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
10100
10102
|
/* @__PURE__ */ r("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
|
|
10101
|
-
/* @__PURE__ */ r("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ r(
|
|
10103
|
+
/* @__PURE__ */ r("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ r(gt, { title: f == null ? void 0 : f("edit_favorites"), children: /* @__PURE__ */ r(
|
|
10102
10104
|
Xr,
|
|
10103
10105
|
{
|
|
10104
10106
|
style: { color: c.colorPrimary, cursor: "pointer" },
|
|
@@ -10140,8 +10142,8 @@ export {
|
|
|
10140
10142
|
Nu as FavouriteButton,
|
|
10141
10143
|
mo as Float,
|
|
10142
10144
|
oc as FloatTime,
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
+
zt as Form,
|
|
10146
|
+
Jt as FormModal,
|
|
10145
10147
|
Al as GraphIndicator,
|
|
10146
10148
|
Ro as Group,
|
|
10147
10149
|
Ms as Image,
|
|
@@ -10169,9 +10171,9 @@ export {
|
|
|
10169
10171
|
ra as Tags,
|
|
10170
10172
|
cc as Text,
|
|
10171
10173
|
Sc as Time,
|
|
10172
|
-
|
|
10174
|
+
Xt as Tree,
|
|
10173
10175
|
Pc as Url,
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
+
dt as iconMapper,
|
|
10177
|
+
Gt as showConfirmDialog
|
|
10176
10178
|
};
|
|
10177
10179
|
//# sourceMappingURL=react-ooui.es.js.map
|