@gisce/react-ooui 2.30.0-alpha.8 → 2.30.0
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,11 +2,11 @@ var Ta = Object.defineProperty;
|
|
|
2
2
|
var Ia = (e, t, n) => t in e ? Ta(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var wo = (e, t, n) => (Ia(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsx as i, jsxs as D, Fragment as se } from "react/jsx-runtime";
|
|
5
|
-
import dt, { useContext as re, useState as S, useEffect as ue, useRef as X, memo as $r, useMemo as ye, useCallback as B, createContext as Oa, forwardRef as
|
|
5
|
+
import dt, { useContext as re, useState as S, useEffect as ue, useRef as X, memo as $r, useMemo as ye, useCallback as B, createContext as Oa, forwardRef as ht, useImperativeHandle as gt, createElement as Aa, Fragment as Jt } from "react";
|
|
6
6
|
import { Tooltip as At, theme as Ge, Typography as Rt, Form as ut, Row as Ne, Col as be, Modal as at, Button as je, Dropdown as Fa, Menu as bo, Spin as We, Divider as Ln, Space as Xe, Input as ct, Select as Mt, Checkbox as pn, Alert as nt, Timeline as yr, Statistic as Ra, Card as Nr, Tag as xi, message as or, DatePicker as Mr, TimePicker as _a, InputNumber as Ci, Progress as Va, Avatar as Ti, Pagination as Da, Badge as Lr, App as Ea, Tabs as Ii, Layout as Oi, Radio as So, Switch as Pa, Steps as xo } from "antd";
|
|
7
7
|
import { Label as tn, Field as vr, Tree as Ai, Reference as ka, Selection as jr, Many2one as Fi, Boolean as $a, parseContext as Et, graphProcessor as Ri, graphFieldUtils as Na, parseGraph as _i, Container as Ma, Form as Vi, Integer as wr, SearchFieldTypes as It, SearchFilter as Di, parseContextFields as La, parseDomainFields as ja, transformDomainForChildWidget as Br } from "@gisce/ooui";
|
|
8
8
|
import * as Co from "@ant-design/icons";
|
|
9
|
-
import Ei, { QuestionCircleOutlined as Pi, ExclamationCircleOutlined as _t, LoadingOutlined as
|
|
9
|
+
import Ei, { QuestionCircleOutlined as Pi, ExclamationCircleOutlined as _t, LoadingOutlined as yt, DownOutlined as jn, WarningOutlined as ki, CloseOutlined as nn, CheckOutlined as Bn, TranslationOutlined as $i, FolderOpenOutlined as Hr, DownloadOutlined as Ur, ClearOutlined as Hn, ExportOutlined as Ba, StarFilled as Ha, StarOutlined as Ua, UpOutlined as Wa, SearchOutlined as Un, ThunderboltOutlined as Wr, PrinterOutlined as Gr, EnterOutlined as Kr, PlusSquareOutlined as Ga, MinusSquareOutlined as Ka, FileAddOutlined as Wn, AlignLeftOutlined as qa, ApiOutlined as Ya, DeleteOutlined as qr, LeftOutlined as Ni, RightOutlined as Mi, EyeOutlined as za, FormOutlined as hn, TableOutlined as Yr, AreaChartOutlined as Ja, CalendarOutlined as Xa, LinkOutlined as To, SaveOutlined as Qa, CopyOutlined as zr, InfoCircleOutlined as Li, ReloadOutlined as Gn, EditOutlined as ji, PlusOutlined as Za, FilterOutlined as Bi, CloseCircleFilled as el, BorderOuterOutlined as tl, SettingOutlined as nl } from "@ant-design/icons";
|
|
10
10
|
import { Interweave as gn } from "interweave";
|
|
11
11
|
import { useLocale as he, FormigaConfigProvider as rl, mergeStrings as ol, Many2OneSuffix as il, Many2OneSuffixModal as Io, FieldSet as sl, ExportModal as al, Dropdown as Hi, DropdownButton as qt, HTMLPreview as ll, FavouriteButton as cl } from "@gisce/react-formiga-components";
|
|
12
12
|
import * as Oo from "@tabler/icons-react";
|
|
@@ -16,7 +16,7 @@ import Jr from "react-measure";
|
|
|
16
16
|
import ul from "lodash/debounce";
|
|
17
17
|
import { nanoid as Xr } from "nanoid";
|
|
18
18
|
import br from "antd/lib/typography/Title";
|
|
19
|
-
import
|
|
19
|
+
import vt from "use-deep-compare-effect";
|
|
20
20
|
import { Line as fl, Column as ml, Pie as pl } from "@ant-design/plots";
|
|
21
21
|
import st from "dayjs";
|
|
22
22
|
import { default as ly } from "dayjs";
|
|
@@ -63,8 +63,8 @@ const He = dt.createContext(null), Hl = (e) => {
|
|
|
63
63
|
getPlainValues: u,
|
|
64
64
|
domain: f,
|
|
65
65
|
submitForm: d,
|
|
66
|
-
fetchValues:
|
|
67
|
-
formHasChanges:
|
|
66
|
+
fetchValues: h,
|
|
67
|
+
formHasChanges: p,
|
|
68
68
|
elementHasLostFocus: m,
|
|
69
69
|
getFields: y,
|
|
70
70
|
formView: v
|
|
@@ -84,8 +84,8 @@ const He = dt.createContext(null), Hl = (e) => {
|
|
|
84
84
|
executeButtonAction: a,
|
|
85
85
|
getContext: l,
|
|
86
86
|
submitForm: d,
|
|
87
|
-
fetchValues:
|
|
88
|
-
formHasChanges:
|
|
87
|
+
fetchValues: h,
|
|
88
|
+
formHasChanges: p,
|
|
89
89
|
elementHasLostFocus: m,
|
|
90
90
|
formView: v
|
|
91
91
|
},
|
|
@@ -100,11 +100,11 @@ const He = dt.createContext(null), Hl = (e) => {
|
|
|
100
100
|
const { ooui: t, align: n, responsiveBehaviour: r } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: c } = t, u = re(He);
|
|
101
101
|
let d = a !== null && o.length > 1 ? o + " :" : o;
|
|
102
102
|
!t.fieldForLabel && t._id && (d = u.getFieldValue(t._id));
|
|
103
|
-
const
|
|
103
|
+
const p = n || (a ? r ? "left" : "right" : "left"), { token: m } = Gl(), y = l === void 0 ? Ul : Wl;
|
|
104
104
|
return /* @__PURE__ */ D(
|
|
105
105
|
"div",
|
|
106
106
|
{
|
|
107
|
-
className: `flex flex-row items-center pb-1 pt-1 ${Kl[
|
|
107
|
+
className: `flex flex-row items-center pb-1 pt-1 ${Kl[p]}`,
|
|
108
108
|
children: [
|
|
109
109
|
s && /* @__PURE__ */ i(At, { title: s, children: /* @__PURE__ */ i(
|
|
110
110
|
Pi,
|
|
@@ -131,10 +131,10 @@ function Re({
|
|
|
131
131
|
type: l,
|
|
132
132
|
validator: c
|
|
133
133
|
}) {
|
|
134
|
-
const { id: u, label: f, tooltip: d } = e, { t:
|
|
134
|
+
const { id: u, label: f, tooltip: d } = e, { t: h } = he(), p = a ? [
|
|
135
135
|
{
|
|
136
136
|
required: !0,
|
|
137
|
-
message:
|
|
137
|
+
message: h("fillRequiredField"),
|
|
138
138
|
type: l,
|
|
139
139
|
validator: c
|
|
140
140
|
}
|
|
@@ -144,7 +144,7 @@ function Re({
|
|
|
144
144
|
className: "mb-0",
|
|
145
145
|
name: u,
|
|
146
146
|
valuePropName: r,
|
|
147
|
-
rules:
|
|
147
|
+
rules: p,
|
|
148
148
|
help: e.tooltipInline ? e.tooltip : null,
|
|
149
149
|
children: t
|
|
150
150
|
}
|
|
@@ -279,7 +279,7 @@ const { confirm: ql } = at, Ft = ({
|
|
|
279
279
|
STOCK_CLEAR: "CloseSquare",
|
|
280
280
|
STOCK_UNINDENT: "AlignLeft",
|
|
281
281
|
STOCK_PREFERENCES: "Setting"
|
|
282
|
-
},
|
|
282
|
+
}, mt = (e, t) => (e.indexOf("gtk-") !== -1 && (e = `STOCK_${e.replace("gtk-", "").replace(/\-/g, "_").toUpperCase()}`), Fo.hasOwnProperty(e) ? Ro(Fo[e], t) : Ro(e, t));
|
|
283
283
|
function Yl(e) {
|
|
284
284
|
return `${e.split("-").map(
|
|
285
285
|
(t) => t.replace(
|
|
@@ -321,9 +321,9 @@ const Qr = (e) => {
|
|
|
321
321
|
icon: l,
|
|
322
322
|
context: c,
|
|
323
323
|
readOnly: u
|
|
324
|
-
} = t, f = re(He), { executeButtonAction: d } = f || {}, [
|
|
324
|
+
} = t, f = re(He), { executeButtonAction: d } = f || {}, [h, p] = S(!1), { t: m } = he();
|
|
325
325
|
async function y() {
|
|
326
|
-
|
|
326
|
+
p(!0), await d({ type: s, action: n, context: c }), p(!1);
|
|
327
327
|
}
|
|
328
328
|
function v() {
|
|
329
329
|
if (a) {
|
|
@@ -339,10 +339,10 @@ const Qr = (e) => {
|
|
|
339
339
|
y();
|
|
340
340
|
}
|
|
341
341
|
function g() {
|
|
342
|
-
if (
|
|
343
|
-
return /* @__PURE__ */ i(
|
|
342
|
+
if (h)
|
|
343
|
+
return /* @__PURE__ */ i(yt, {});
|
|
344
344
|
if (l) {
|
|
345
|
-
const b =
|
|
345
|
+
const b = mt(l);
|
|
346
346
|
return b && /* @__PURE__ */ i(b, {});
|
|
347
347
|
}
|
|
348
348
|
}
|
|
@@ -350,7 +350,7 @@ const Qr = (e) => {
|
|
|
350
350
|
je,
|
|
351
351
|
{
|
|
352
352
|
block: !0,
|
|
353
|
-
disabled: !o || u ||
|
|
353
|
+
disabled: !o || u || h,
|
|
354
354
|
onClick: v,
|
|
355
355
|
icon: g(),
|
|
356
356
|
type: t.primary ? "primary" : "default",
|
|
@@ -369,13 +369,13 @@ const Qr = (e) => {
|
|
|
369
369
|
icon: u,
|
|
370
370
|
primary: f,
|
|
371
371
|
context: d,
|
|
372
|
-
readOnly:
|
|
373
|
-
} = n || {},
|
|
372
|
+
readOnly: h
|
|
373
|
+
} = n || {}, p = re(He), { executeButtonAction: m } = p || {}, [y, v] = S(!1), { t: g } = he();
|
|
374
374
|
function b() {
|
|
375
375
|
if (y)
|
|
376
|
-
return /* @__PURE__ */ i(
|
|
376
|
+
return /* @__PURE__ */ i(yt, {});
|
|
377
377
|
if (u) {
|
|
378
|
-
const w =
|
|
378
|
+
const w = mt(u);
|
|
379
379
|
return w && /* @__PURE__ */ i(w, {});
|
|
380
380
|
}
|
|
381
381
|
}
|
|
@@ -401,7 +401,7 @@ const Qr = (e) => {
|
|
|
401
401
|
return /* @__PURE__ */ i(Re, { ooui: new vr({ defaultButton: n }), children: /* @__PURE__ */ D(
|
|
402
402
|
Fa.Button,
|
|
403
403
|
{
|
|
404
|
-
disabled: !a ||
|
|
404
|
+
disabled: !a || h,
|
|
405
405
|
onClick: I,
|
|
406
406
|
icon: /* @__PURE__ */ i(jn, {}),
|
|
407
407
|
type: f ? "primary" : void 0,
|
|
@@ -432,12 +432,12 @@ const Qr = (e) => {
|
|
|
432
432
|
buttonType: u,
|
|
433
433
|
confirmMessage: f,
|
|
434
434
|
icon: d,
|
|
435
|
-
context:
|
|
436
|
-
readOnly:
|
|
435
|
+
context: h,
|
|
436
|
+
readOnly: p,
|
|
437
437
|
danger: m
|
|
438
438
|
} = s, [y, v] = S(!1);
|
|
439
439
|
async function g() {
|
|
440
|
-
v(!0), await r({ type: u, action: a, context:
|
|
440
|
+
v(!0), await r({ type: u, action: a, context: h }), v(!1);
|
|
441
441
|
}
|
|
442
442
|
function b() {
|
|
443
443
|
if (f) {
|
|
@@ -454,16 +454,16 @@ const Qr = (e) => {
|
|
|
454
454
|
}
|
|
455
455
|
function x() {
|
|
456
456
|
if (y)
|
|
457
|
-
return /* @__PURE__ */ i(
|
|
457
|
+
return /* @__PURE__ */ i(yt, {});
|
|
458
458
|
if (d) {
|
|
459
|
-
const I =
|
|
459
|
+
const I = mt(d);
|
|
460
460
|
return I && /* @__PURE__ */ i(I, {});
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
return /* @__PURE__ */ i(
|
|
464
464
|
bo.Item,
|
|
465
465
|
{
|
|
466
|
-
disabled: !c ||
|
|
466
|
+
disabled: !c || p,
|
|
467
467
|
onClick: b,
|
|
468
468
|
icon: x(),
|
|
469
469
|
danger: m,
|
|
@@ -536,19 +536,19 @@ const Gi = (e) => {
|
|
|
536
536
|
content: t
|
|
537
537
|
});
|
|
538
538
|
}, Ki = (e) => {
|
|
539
|
-
const { visible: t, onCloseModal: n, model: r, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = qn(), { t: c } = he(), [u, f] = S([]), [d,
|
|
539
|
+
const { visible: t, onCloseModal: n, model: r, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = qn(), { t: c } = he(), [u, f] = S([]), [d, h] = S(!1), [p, m] = S(!1), [y, v] = S({}), g = X();
|
|
540
540
|
ue(() => {
|
|
541
541
|
t ? b() : v({});
|
|
542
542
|
}, [t]);
|
|
543
543
|
async function b() {
|
|
544
|
-
|
|
544
|
+
h(!0);
|
|
545
545
|
try {
|
|
546
546
|
const C = await x();
|
|
547
547
|
await I(C);
|
|
548
548
|
} catch (C) {
|
|
549
549
|
it(C);
|
|
550
550
|
}
|
|
551
|
-
|
|
551
|
+
h(!1);
|
|
552
552
|
}
|
|
553
553
|
async function x() {
|
|
554
554
|
const O = (await P.getHandler().search({
|
|
@@ -588,7 +588,7 @@ const Gi = (e) => {
|
|
|
588
588
|
[C.code]: V.target.value
|
|
589
589
|
});
|
|
590
590
|
},
|
|
591
|
-
disabled:
|
|
591
|
+
disabled: p
|
|
592
592
|
}
|
|
593
593
|
) })
|
|
594
594
|
] }, O));
|
|
@@ -621,15 +621,15 @@ const Gi = (e) => {
|
|
|
621
621
|
{
|
|
622
622
|
icon: /* @__PURE__ */ i(nn, {}),
|
|
623
623
|
onClick: n,
|
|
624
|
-
disabled:
|
|
624
|
+
disabled: p,
|
|
625
625
|
children: c("cancel")
|
|
626
626
|
}
|
|
627
627
|
),
|
|
628
628
|
/* @__PURE__ */ i(
|
|
629
629
|
je,
|
|
630
630
|
{
|
|
631
|
-
icon:
|
|
632
|
-
disabled:
|
|
631
|
+
icon: p ? /* @__PURE__ */ i(yt, {}) : /* @__PURE__ */ i(Bn, {}),
|
|
632
|
+
disabled: p,
|
|
633
633
|
onClick: A,
|
|
634
634
|
style: { marginLeft: 15 },
|
|
635
635
|
type: "primary",
|
|
@@ -683,15 +683,15 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
683
683
|
isSearchField: r,
|
|
684
684
|
onChange: o
|
|
685
685
|
}) => {
|
|
686
|
-
const s = Array.isArray(e) || !!t.selectionValues.size, a = re(He), { elementHasLostFocus: l } = a || {}, { id: c, readOnly: u, isPassword: f, translatable: d } = t,
|
|
686
|
+
const s = Array.isArray(e) || !!t.selectionValues.size, a = re(He), { elementHasLostFocus: l } = a || {}, { id: c, readOnly: u, isPassword: f, translatable: d } = t, h = t.size !== void 0 && t.showCount;
|
|
687
687
|
t.selectionValues.size ? e = t.selectionValues.get(e) : Array.isArray(e) && (e = e[1]);
|
|
688
|
-
let
|
|
688
|
+
let p = /* @__PURE__ */ i(
|
|
689
689
|
ct,
|
|
690
690
|
{
|
|
691
691
|
value: e,
|
|
692
692
|
disabled: u || d && !r,
|
|
693
693
|
id: c,
|
|
694
|
-
showCount:
|
|
694
|
+
showCount: h,
|
|
695
695
|
style: n,
|
|
696
696
|
maxLength: t.size,
|
|
697
697
|
onBlur: l,
|
|
@@ -700,7 +700,7 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
);
|
|
703
|
-
return f && (
|
|
703
|
+
return f && (p = /* @__PURE__ */ i(
|
|
704
704
|
ct.Password,
|
|
705
705
|
{
|
|
706
706
|
value: e,
|
|
@@ -711,7 +711,7 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
711
711
|
o == null || o(m.target.value);
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
)), s && (
|
|
714
|
+
)), s && (p = /* @__PURE__ */ i(ct, { value: e, id: c, disabled: !0 })), p;
|
|
715
715
|
}, rc = ({
|
|
716
716
|
value: e,
|
|
717
717
|
field: t,
|
|
@@ -724,14 +724,14 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
724
724
|
fetchValues: l,
|
|
725
725
|
formHasChanges: c,
|
|
726
726
|
elementHasLostFocus: u
|
|
727
|
-
} = o || {}, [f, d] = S(!1), { t:
|
|
727
|
+
} = o || {}, [f, d] = S(!1), { t: h } = he();
|
|
728
728
|
return s ? /* @__PURE__ */ D(se, { children: [
|
|
729
729
|
/* @__PURE__ */ i(
|
|
730
730
|
"div",
|
|
731
731
|
{
|
|
732
732
|
onClick: () => {
|
|
733
733
|
if (c != null && c()) {
|
|
734
|
-
Tt(
|
|
734
|
+
Tt(h("saveBeforeTranslate"));
|
|
735
735
|
return;
|
|
736
736
|
}
|
|
737
737
|
f || d(!0);
|
|
@@ -742,8 +742,8 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
742
742
|
value: e,
|
|
743
743
|
disabled: !0,
|
|
744
744
|
id: t,
|
|
745
|
-
onChange: (
|
|
746
|
-
r == null || r(
|
|
745
|
+
onChange: (p) => {
|
|
746
|
+
r == null || r(p.target.value);
|
|
747
747
|
},
|
|
748
748
|
onBlur: u,
|
|
749
749
|
style: { cursor: "pointer", pointerEvents: "none", ...n }
|
|
@@ -773,8 +773,8 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
773
773
|
value: e,
|
|
774
774
|
id: t,
|
|
775
775
|
style: n,
|
|
776
|
-
onChange: (
|
|
777
|
-
r == null || r(
|
|
776
|
+
onChange: (p) => {
|
|
777
|
+
r == null || r(p.target.value);
|
|
778
778
|
},
|
|
779
779
|
onBlur: u
|
|
780
780
|
}
|
|
@@ -782,12 +782,12 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
782
782
|
/* @__PURE__ */ i(be, { flex: "none", children: /* @__PURE__ */ i(
|
|
783
783
|
tt,
|
|
784
784
|
{
|
|
785
|
-
tooltip:
|
|
785
|
+
tooltip: h("translate"),
|
|
786
786
|
icon: /* @__PURE__ */ i($i, {}),
|
|
787
787
|
onClick: async () => {
|
|
788
|
-
c != null && c() ? Tt(
|
|
788
|
+
c != null && c() ? Tt(h("saveBeforeTranslate")) : Tt(h("enterTextBeforeTranslate"));
|
|
789
789
|
},
|
|
790
|
-
children:
|
|
790
|
+
children: h("translate")
|
|
791
791
|
}
|
|
792
792
|
) })
|
|
793
793
|
] }) });
|
|
@@ -796,8 +796,8 @@ const { info: ec } = at, Tt = (e) => {
|
|
|
796
796
|
return /* @__PURE__ */ i(Re, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(zi, { ...e }) });
|
|
797
797
|
}, zi = (e) => {
|
|
798
798
|
const { ooui: t, onChange: n, value: r } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), c = l && l.length && l.map((f) => {
|
|
799
|
-
const [d,
|
|
800
|
-
return /* @__PURE__ */ i(ac, { value: d, children:
|
|
799
|
+
const [d, h] = f;
|
|
800
|
+
return /* @__PURE__ */ i(ac, { value: d, children: h }, d);
|
|
801
801
|
});
|
|
802
802
|
return /* @__PURE__ */ i(
|
|
803
803
|
a && !s ? lc : Mt,
|
|
@@ -856,20 +856,20 @@ function Yn(e, t) {
|
|
|
856
856
|
window.open(a);
|
|
857
857
|
}
|
|
858
858
|
const hc = (e) => {
|
|
859
|
-
const { ooui: t } = e, { required: n, id: r } = t, o =
|
|
859
|
+
const { ooui: t } = e, { required: n, id: r } = t, o = mt(r);
|
|
860
860
|
return o ? /* @__PURE__ */ i(o, {}) : /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(gc, { ooui: t }) });
|
|
861
861
|
}, gc = (e) => {
|
|
862
862
|
const { ooui: t, value: n, onChange: r } = e, { readOnly: o } = t, s = X(null), { t: a } = he(), l = (d) => {
|
|
863
863
|
r == null || r(d);
|
|
864
864
|
};
|
|
865
865
|
async function c() {
|
|
866
|
-
const d = await Xt(n),
|
|
867
|
-
|
|
866
|
+
const d = await Xt(n), h = `data:${d == null ? void 0 : d.mime};base64,${n}`, p = document.createElement("a");
|
|
867
|
+
p.href = h, p.download = `image.${d == null ? void 0 : d.ext}`, p.click();
|
|
868
868
|
}
|
|
869
869
|
async function u(d) {
|
|
870
870
|
d.stopPropagation(), d.preventDefault();
|
|
871
|
-
const
|
|
872
|
-
l(
|
|
871
|
+
const h = d.target.files[0], p = await Ji(h);
|
|
872
|
+
l(p);
|
|
873
873
|
}
|
|
874
874
|
function f() {
|
|
875
875
|
l(void 0);
|
|
@@ -972,9 +972,9 @@ const Zr = (e, t, n) => e.columns.map((o) => {
|
|
|
972
972
|
title: o.label,
|
|
973
973
|
render: c,
|
|
974
974
|
sorter: (u, f) => {
|
|
975
|
-
var
|
|
976
|
-
let d = u[a] || "",
|
|
977
|
-
return s === "many2one" && (d = ((
|
|
975
|
+
var p, m;
|
|
976
|
+
let d = u[a] || "", h = f[a] || "";
|
|
977
|
+
return s === "many2one" && (d = ((p = u[a]) == null ? void 0 : p.value) || "", h = ((m = f[a]) == null ? void 0 : m.value) || ""), d < h ? -1 : d > h ? 1 : 0;
|
|
978
978
|
},
|
|
979
979
|
isSortable: s !== "one2many" && s !== "many2one" && !o.isFunction
|
|
980
980
|
};
|
|
@@ -1015,9 +1015,9 @@ function Yt({
|
|
|
1015
1015
|
if (!t)
|
|
1016
1016
|
return e;
|
|
1017
1017
|
const { id: r, desc: o } = t, s = o === !1 ? "ascend" : "descend", a = n[r].type, l = (c, u) => {
|
|
1018
|
-
var
|
|
1018
|
+
var h, p;
|
|
1019
1019
|
let f = c[r] || "", d = u[r] || "";
|
|
1020
|
-
return a === "many2one" && (f = ((
|
|
1020
|
+
return a === "many2one" && (f = ((h = c[r]) == null ? void 0 : h[1]) || "", d = ((p = u[r]) == null ? void 0 : p[1]) || ""), f === d ? 0 : s === "ascend" ? f > d ? 1 : -1 : f < d ? 1 : -1;
|
|
1021
1021
|
};
|
|
1022
1022
|
return e.sort(l);
|
|
1023
1023
|
}
|
|
@@ -1053,7 +1053,7 @@ const eo = async (e) => {
|
|
|
1053
1053
|
form: r.fields,
|
|
1054
1054
|
tree: o.fields
|
|
1055
1055
|
};
|
|
1056
|
-
let d = [],
|
|
1056
|
+
let d = [], h;
|
|
1057
1057
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1058
1058
|
const v = (y = Ot(o)) == null ? void 0 : y.colors, g = await P.getHandler().readEvalUiObjects({
|
|
1059
1059
|
model: n,
|
|
@@ -1065,7 +1065,7 @@ const eo = async (e) => {
|
|
|
1065
1065
|
colors: v
|
|
1066
1066
|
}
|
|
1067
1067
|
});
|
|
1068
|
-
d = g[0],
|
|
1068
|
+
d = g[0], h = Qt(g[1]);
|
|
1069
1069
|
} else
|
|
1070
1070
|
d = await P.getHandler().readObjects({
|
|
1071
1071
|
model: n,
|
|
@@ -1073,7 +1073,7 @@ const eo = async (e) => {
|
|
|
1073
1073
|
fields: f[a],
|
|
1074
1074
|
context: s
|
|
1075
1075
|
});
|
|
1076
|
-
const
|
|
1076
|
+
const p = d.map((v) => {
|
|
1077
1077
|
const g = {};
|
|
1078
1078
|
return Object.keys(v).forEach((b) => {
|
|
1079
1079
|
(f[a].hasOwnProperty(b) || b === "id") && (g[b] = v[b]);
|
|
@@ -1081,14 +1081,14 @@ const eo = async (e) => {
|
|
|
1081
1081
|
});
|
|
1082
1082
|
return [
|
|
1083
1083
|
t.map((v) => {
|
|
1084
|
-
const g =
|
|
1084
|
+
const g = p.find(
|
|
1085
1085
|
(x) => x.id === v.id
|
|
1086
1086
|
), b = {
|
|
1087
1087
|
...v
|
|
1088
1088
|
};
|
|
1089
1089
|
return a === "form" ? b.values = g : a === "tree" && (b.treeValues = g), b;
|
|
1090
1090
|
}).concat(c),
|
|
1091
|
-
|
|
1091
|
+
h
|
|
1092
1092
|
];
|
|
1093
1093
|
}, Qi = (e) => {
|
|
1094
1094
|
const t = e.filter((n) => n.id && n.id < 0).map((n) => n.id);
|
|
@@ -1137,18 +1137,18 @@ function Do({
|
|
|
1137
1137
|
}), n;
|
|
1138
1138
|
}
|
|
1139
1139
|
const Oc = (e) => {
|
|
1140
|
-
const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = S(!0), [l, c] = S(), [u, f] = S(/* @__PURE__ */ new Map()), d = re(He), { getContext:
|
|
1141
|
-
|
|
1140
|
+
const { ooui: t } = e, { relation: n, context: r, views: o } = t, [s, a] = S(!0), [l, c] = S(), [u, f] = S(/* @__PURE__ */ new Map()), d = re(He), { getContext: h } = d || {};
|
|
1141
|
+
vt(() => {
|
|
1142
1142
|
m();
|
|
1143
1143
|
}, [t]);
|
|
1144
|
-
const
|
|
1144
|
+
const p = async (y) => o && o[y] ? o[y] : await P.getHandler().getView({
|
|
1145
1145
|
model: n,
|
|
1146
1146
|
type: y,
|
|
1147
|
-
context: { ...
|
|
1147
|
+
context: { ...h == null ? void 0 : h(), ...r }
|
|
1148
1148
|
}), m = async () => {
|
|
1149
1149
|
a(!0), c(void 0);
|
|
1150
1150
|
try {
|
|
1151
|
-
const y = await
|
|
1151
|
+
const y = await p("form"), v = await p("tree");
|
|
1152
1152
|
u.set("form", y), u.set("tree", v), f(u);
|
|
1153
1153
|
} catch (y) {
|
|
1154
1154
|
c(y);
|
|
@@ -1158,8 +1158,8 @@ const Oc = (e) => {
|
|
|
1158
1158
|
};
|
|
1159
1159
|
return s ? /* @__PURE__ */ i(We, {}) : l ? /* @__PURE__ */ i(nt, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(Ac, { ooui: t, views: u }) });
|
|
1160
1160
|
}, Ac = (e) => {
|
|
1161
|
-
const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = S(!1), [c, u] = S(), [f, d] = S(!1), [
|
|
1162
|
-
|
|
1161
|
+
const { value: t, views: n, ooui: r, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = S(!1), [c, u] = S(), [f, d] = S(!1), [h, p] = S(), { relation: m, context: y, readOnly: v, summaryField: g, titleField: b } = r, x = s.filter((C) => C.values), I = re(He), { getContext: w } = I || {};
|
|
1162
|
+
vt(() => {
|
|
1163
1163
|
T();
|
|
1164
1164
|
}, [s]);
|
|
1165
1165
|
const A = (C) => {
|
|
@@ -1198,7 +1198,7 @@ const Oc = (e) => {
|
|
|
1198
1198
|
{
|
|
1199
1199
|
style: { display: "inline-block", cursor: "pointer" },
|
|
1200
1200
|
onClick: () => {
|
|
1201
|
-
|
|
1201
|
+
p(
|
|
1202
1202
|
x.find((_) => C.id === _.id)
|
|
1203
1203
|
), d(!0);
|
|
1204
1204
|
},
|
|
@@ -1215,9 +1215,9 @@ const Oc = (e) => {
|
|
|
1215
1215
|
{
|
|
1216
1216
|
formView: n.get("form"),
|
|
1217
1217
|
model: m,
|
|
1218
|
-
id:
|
|
1219
|
-
values:
|
|
1220
|
-
defaultValues:
|
|
1218
|
+
id: h == null ? void 0 : h.id,
|
|
1219
|
+
values: h == null ? void 0 : h.values,
|
|
1220
|
+
defaultValues: h == null ? void 0 : h.defaultValues,
|
|
1221
1221
|
visible: f,
|
|
1222
1222
|
onSubmitSucceed: () => {
|
|
1223
1223
|
d(!1);
|
|
@@ -1598,8 +1598,8 @@ async function es({
|
|
|
1598
1598
|
views: u,
|
|
1599
1599
|
name: f,
|
|
1600
1600
|
limit: d,
|
|
1601
|
-
view_type:
|
|
1602
|
-
} = s,
|
|
1601
|
+
view_type: h
|
|
1602
|
+
} = s, p = h === "tree", m = [];
|
|
1603
1603
|
for (const b of u) {
|
|
1604
1604
|
const [x, I] = b;
|
|
1605
1605
|
if (x)
|
|
@@ -1626,11 +1626,11 @@ async function es({
|
|
|
1626
1626
|
domain: l,
|
|
1627
1627
|
initialView: g,
|
|
1628
1628
|
limit: d,
|
|
1629
|
-
treeExpandable:
|
|
1629
|
+
treeExpandable: p
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
1632
|
const Pc = (e) => {
|
|
1633
|
-
const [t, n] = S(), [r, o] = S(!0), [s, a] = S(), [l, c] = S(), u = re(He), { getContext: f, getPlainValues: d, activeId:
|
|
1633
|
+
const [t, n] = S(), [r, o] = S(!0), [s, a] = S(), [l, c] = S(), u = re(He), { getContext: f, getPlainValues: d, activeId: h } = u || {}, { globalValues: p, rootContext: m } = to(), y = ye(() => ({ ...f == null ? void 0 : f(), ...m }), [f, m]);
|
|
1634
1634
|
return { actionData: s, treeShortcut: l, loading: r, error: t, fetchData: async () => {
|
|
1635
1635
|
n(void 0), o(!0);
|
|
1636
1636
|
try {
|
|
@@ -1638,7 +1638,7 @@ const Pc = (e) => {
|
|
|
1638
1638
|
actionId: e,
|
|
1639
1639
|
rootContext: y,
|
|
1640
1640
|
globalValues: {
|
|
1641
|
-
...
|
|
1641
|
+
...p,
|
|
1642
1642
|
...d()
|
|
1643
1643
|
}
|
|
1644
1644
|
}), { views: b } = g, x = b.find((I) => {
|
|
@@ -1663,8 +1663,8 @@ const Pc = (e) => {
|
|
|
1663
1663
|
view_type: w,
|
|
1664
1664
|
overrideUnsettedLimit: !0,
|
|
1665
1665
|
values: {
|
|
1666
|
-
active_id:
|
|
1667
|
-
active_ids: [
|
|
1666
|
+
active_id: h,
|
|
1667
|
+
active_ids: [h]
|
|
1668
1668
|
}
|
|
1669
1669
|
});
|
|
1670
1670
|
}
|
|
@@ -1738,17 +1738,17 @@ const Pc = (e) => {
|
|
|
1738
1738
|
Jr,
|
|
1739
1739
|
{
|
|
1740
1740
|
bounds: !0,
|
|
1741
|
-
onResize: (
|
|
1742
|
-
var
|
|
1743
|
-
n((
|
|
1741
|
+
onResize: (h) => {
|
|
1742
|
+
var p, m;
|
|
1743
|
+
n((p = h.bounds) == null ? void 0 : p.height), o((m = h.bounds) == null ? void 0 : m.width);
|
|
1744
1744
|
},
|
|
1745
|
-
children: ({ measureRef:
|
|
1745
|
+
children: ({ measureRef: h }) => d ? /* @__PURE__ */ i(
|
|
1746
1746
|
$c,
|
|
1747
1747
|
{
|
|
1748
1748
|
value: s,
|
|
1749
1749
|
total: a,
|
|
1750
1750
|
percent: l,
|
|
1751
|
-
measureRef:
|
|
1751
|
+
measureRef: h,
|
|
1752
1752
|
height: t,
|
|
1753
1753
|
width: r,
|
|
1754
1754
|
color: c,
|
|
@@ -1760,7 +1760,7 @@ const Pc = (e) => {
|
|
|
1760
1760
|
{
|
|
1761
1761
|
value: s,
|
|
1762
1762
|
total: a,
|
|
1763
|
-
measureRef:
|
|
1763
|
+
measureRef: h,
|
|
1764
1764
|
height: t,
|
|
1765
1765
|
width: r,
|
|
1766
1766
|
color: c,
|
|
@@ -1793,12 +1793,12 @@ function kc({
|
|
|
1793
1793
|
});
|
|
1794
1794
|
let d = r ? `${u}/${f}` : `${u}`;
|
|
1795
1795
|
l && (d += " " + l);
|
|
1796
|
-
let
|
|
1796
|
+
let h = rs(
|
|
1797
1797
|
d,
|
|
1798
1798
|
`bold ${Math.floor(c * 1.03)}px sans-serif`
|
|
1799
1799
|
);
|
|
1800
|
-
a && (
|
|
1801
|
-
const
|
|
1800
|
+
a && (h = h * 2), h >= t * 0.85 && (c = t * 0.85 / h * c);
|
|
1801
|
+
const p = a && mt(a, { style: { fontSize: c * 0.7 } });
|
|
1802
1802
|
return /* @__PURE__ */ i(
|
|
1803
1803
|
"div",
|
|
1804
1804
|
{
|
|
@@ -1812,8 +1812,8 @@ function kc({
|
|
|
1812
1812
|
overflow: "hidden"
|
|
1813
1813
|
},
|
|
1814
1814
|
children: /* @__PURE__ */ D(br, { style: { fontSize: c, margin: 0, color: s }, children: [
|
|
1815
|
-
|
|
1816
|
-
|
|
1815
|
+
p && /* @__PURE__ */ i(p, { style: { fontSize: c * 0.7 } }),
|
|
1816
|
+
p ? ` ${d}` : d
|
|
1817
1817
|
] })
|
|
1818
1818
|
}
|
|
1819
1819
|
);
|
|
@@ -1834,19 +1834,19 @@ function $c({
|
|
|
1834
1834
|
const d = s == null ? void 0 : s.toLocaleString("es-ES", {
|
|
1835
1835
|
useGrouping: !0
|
|
1836
1836
|
});
|
|
1837
|
-
let
|
|
1837
|
+
let h = o ? `${d}/${o == null ? void 0 : o.toLocaleString("es-ES", {
|
|
1838
1838
|
useGrouping: !0
|
|
1839
1839
|
})}` : `${d}`;
|
|
1840
|
-
c && (
|
|
1841
|
-
const
|
|
1840
|
+
c && (h += " " + c);
|
|
1841
|
+
const p = `${r == null ? void 0 : r.toLocaleString("es-ES", {
|
|
1842
1842
|
useGrouping: !0
|
|
1843
1843
|
})}%`;
|
|
1844
1844
|
let m = rs(
|
|
1845
|
-
|
|
1845
|
+
p,
|
|
1846
1846
|
`bold ${Math.floor(f * 1.03)}px sans-serif`
|
|
1847
1847
|
);
|
|
1848
1848
|
l && (m = m * 1.5), (m >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / m * f);
|
|
1849
|
-
const y = l &&
|
|
1849
|
+
const y = l && mt(l, { style: { fontSize: f } });
|
|
1850
1850
|
return /* @__PURE__ */ i(
|
|
1851
1851
|
"div",
|
|
1852
1852
|
{
|
|
@@ -1874,7 +1874,7 @@ function $c({
|
|
|
1874
1874
|
color: a,
|
|
1875
1875
|
textAlign: "center"
|
|
1876
1876
|
},
|
|
1877
|
-
children:
|
|
1877
|
+
children: h
|
|
1878
1878
|
}
|
|
1879
1879
|
)
|
|
1880
1880
|
] })
|
|
@@ -1895,7 +1895,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
1895
1895
|
field: u,
|
|
1896
1896
|
operator: f,
|
|
1897
1897
|
manualIds: d
|
|
1898
|
-
} = e, [
|
|
1898
|
+
} = e, [h, p] = S(!1), [m, y] = S(), [v, g] = S(0), [b, x] = S(), [I, w] = S(), [A, T] = S(), [C, O] = S(), [V] = Je(
|
|
1899
1899
|
P.getHandler().searchAllIds
|
|
1900
1900
|
), [F] = Je(
|
|
1901
1901
|
P.getHandler().readObjects
|
|
@@ -1961,7 +1961,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
1963
|
async function j() {
|
|
1964
|
-
|
|
1964
|
+
p(!0), O(void 0);
|
|
1965
1965
|
let M, k;
|
|
1966
1966
|
try {
|
|
1967
1967
|
const Q = await G({ domain: n, isTotal: !1 });
|
|
@@ -1998,9 +1998,9 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
1998
1998
|
} catch (Q) {
|
|
1999
1999
|
O(JSON.stringify(Q));
|
|
2000
2000
|
}
|
|
2001
|
-
|
|
2001
|
+
p(!1);
|
|
2002
2002
|
}
|
|
2003
|
-
return
|
|
2003
|
+
return h ? /* @__PURE__ */ i(bn, {}) : C ? /* @__PURE__ */ i(nt, { className: "mt-10", message: C, type: "error", banner: !0 }) : /* @__PURE__ */ i(
|
|
2004
2004
|
ns,
|
|
2005
2005
|
{
|
|
2006
2006
|
value: m,
|
|
@@ -2021,7 +2021,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2021
2021
|
limit: s,
|
|
2022
2022
|
uninformedString: a,
|
|
2023
2023
|
manualIds: l
|
|
2024
|
-
} = e, [c, u] = S(!1), [f, d] = S(), [
|
|
2024
|
+
} = e, [c, u] = S(!1), [f, d] = S(), [h, p] = S(), [m, y] = S(), [v, g] = S("line"), [b] = Je(
|
|
2025
2025
|
P.getHandler().getFields
|
|
2026
2026
|
), [x] = Je(
|
|
2027
2027
|
P.getHandler().readObjects
|
|
@@ -2054,7 +2054,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2054
2054
|
loading: c,
|
|
2055
2055
|
error: f,
|
|
2056
2056
|
type: v,
|
|
2057
|
-
values:
|
|
2057
|
+
values: h,
|
|
2058
2058
|
evaluatedEntries: m,
|
|
2059
2059
|
fetchData: w
|
|
2060
2060
|
};
|
|
@@ -2067,7 +2067,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2067
2067
|
uninformedString: a
|
|
2068
2068
|
}
|
|
2069
2069
|
});
|
|
2070
|
-
d(void 0),
|
|
2070
|
+
d(void 0), p(O);
|
|
2071
2071
|
} catch (O) {
|
|
2072
2072
|
d("Error processing graph data: " + O), u(!1);
|
|
2073
2073
|
return;
|
|
@@ -2084,7 +2084,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2084
2084
|
l,
|
|
2085
2085
|
t,
|
|
2086
2086
|
n,
|
|
2087
|
-
|
|
2087
|
+
h,
|
|
2088
2088
|
x,
|
|
2089
2089
|
I,
|
|
2090
2090
|
v,
|
|
@@ -2094,7 +2094,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2094
2094
|
loading: c,
|
|
2095
2095
|
error: f,
|
|
2096
2096
|
type: v,
|
|
2097
|
-
values:
|
|
2097
|
+
values: h,
|
|
2098
2098
|
evaluatedEntries: m,
|
|
2099
2099
|
fetchData: w
|
|
2100
2100
|
};
|
|
@@ -2128,14 +2128,14 @@ async function Hc({
|
|
|
2128
2128
|
getFields: c
|
|
2129
2129
|
});
|
|
2130
2130
|
if (a) {
|
|
2131
|
-
let
|
|
2131
|
+
let p = await u({
|
|
2132
2132
|
model: t,
|
|
2133
2133
|
ids: a,
|
|
2134
2134
|
fieldsToRetrieve: e,
|
|
2135
2135
|
context: r
|
|
2136
2136
|
});
|
|
2137
|
-
return o && (
|
|
2138
|
-
values:
|
|
2137
|
+
return o && (p = [...p].sort((m, y) => m[o] - y[o])), {
|
|
2138
|
+
values: p,
|
|
2139
2139
|
fields: d
|
|
2140
2140
|
};
|
|
2141
2141
|
}
|
|
@@ -2344,11 +2344,11 @@ const Kc = {
|
|
|
2344
2344
|
return {
|
|
2345
2345
|
formatter: (m, y) => f(y.id)
|
|
2346
2346
|
};
|
|
2347
|
-
}, [f, u]),
|
|
2347
|
+
}, [f, u]), h = B(
|
|
2348
2348
|
({ percent: m, x: y }) => m < 0.07 ? "" : f(y),
|
|
2349
2349
|
[f]
|
|
2350
|
-
),
|
|
2351
|
-
return
|
|
2350
|
+
), p = Yc[e];
|
|
2351
|
+
return p ? /* @__PURE__ */ D(
|
|
2352
2352
|
"div",
|
|
2353
2353
|
{
|
|
2354
2354
|
style: {
|
|
@@ -2367,7 +2367,7 @@ const Kc = {
|
|
|
2367
2367
|
useGrouping: !0
|
|
2368
2368
|
})}` }) }),
|
|
2369
2369
|
/* @__PURE__ */ i("div", { style: { width: "100%", height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ i(
|
|
2370
|
-
|
|
2370
|
+
p,
|
|
2371
2371
|
{
|
|
2372
2372
|
...zc({
|
|
2373
2373
|
type: e,
|
|
@@ -2376,7 +2376,7 @@ const Kc = {
|
|
|
2376
2376
|
numItems: o,
|
|
2377
2377
|
isStack: r,
|
|
2378
2378
|
pieItemValueFormatter: d,
|
|
2379
|
-
pieLabelFormatter:
|
|
2379
|
+
pieLabelFormatter: h,
|
|
2380
2380
|
yAxisOpts: s,
|
|
2381
2381
|
fixedHeight: a
|
|
2382
2382
|
})
|
|
@@ -2416,7 +2416,7 @@ const Jc = ({
|
|
|
2416
2416
|
manualIds: s,
|
|
2417
2417
|
fixedHeight: a
|
|
2418
2418
|
}) => {
|
|
2419
|
-
const { t: l } = he(), { error: c, loading: u, values: f, type: d, evaluatedEntries:
|
|
2419
|
+
const { t: l } = he(), { error: c, loading: u, values: f, type: d, evaluatedEntries: h, fetchData: p } = jc({
|
|
2420
2420
|
model: t,
|
|
2421
2421
|
ooui: e,
|
|
2422
2422
|
limit: o,
|
|
@@ -2425,8 +2425,8 @@ const Jc = ({
|
|
|
2425
2425
|
uninformedString: l("uninformed"),
|
|
2426
2426
|
manualIds: s
|
|
2427
2427
|
});
|
|
2428
|
-
if (
|
|
2429
|
-
|
|
2428
|
+
if (vt(() => {
|
|
2429
|
+
p();
|
|
2430
2430
|
}, [e, t, o, r, n]), u || !f)
|
|
2431
2431
|
return /* @__PURE__ */ i(bn, {});
|
|
2432
2432
|
const { data: m, isGroup: y, isStack: v, yAxisOpts: g } = f;
|
|
@@ -2437,7 +2437,7 @@ const Jc = ({
|
|
|
2437
2437
|
data: m,
|
|
2438
2438
|
isGroup: y,
|
|
2439
2439
|
isStack: v,
|
|
2440
|
-
numItems:
|
|
2440
|
+
numItems: h.length,
|
|
2441
2441
|
yAxisOpts: g,
|
|
2442
2442
|
fixedHeight: a
|
|
2443
2443
|
}
|
|
@@ -2457,8 +2457,8 @@ const Jc = ({
|
|
|
2457
2457
|
currentId: u,
|
|
2458
2458
|
setCurrentId: f,
|
|
2459
2459
|
setResults: d,
|
|
2460
|
-
results:
|
|
2461
|
-
currentItemIndex:
|
|
2460
|
+
results: h,
|
|
2461
|
+
currentItemIndex: p,
|
|
2462
2462
|
setCurrentItemIndex: m,
|
|
2463
2463
|
currentModel: y,
|
|
2464
2464
|
sorter: v,
|
|
@@ -2476,8 +2476,8 @@ const Jc = ({
|
|
|
2476
2476
|
O !== void 0 ? O : $t
|
|
2477
2477
|
), [_e, J] = S(r);
|
|
2478
2478
|
ue(() => {
|
|
2479
|
-
|
|
2480
|
-
}, [
|
|
2479
|
+
h && h.length > 0 && !p && (m == null || m(0), f == null || f(h[0].id));
|
|
2480
|
+
}, [h]), ue(() => {
|
|
2481
2481
|
we(O !== void 0 ? O : $t);
|
|
2482
2482
|
}, [O]), ue(() => {
|
|
2483
2483
|
s.length === 1 ? me(s[0]) : s.length > 1 && me(
|
|
@@ -2514,9 +2514,9 @@ const Jc = ({
|
|
|
2514
2514
|
onNewClicked: c,
|
|
2515
2515
|
currentId: u,
|
|
2516
2516
|
setCurrentId: f,
|
|
2517
|
-
currentItemIndex:
|
|
2517
|
+
currentItemIndex: p,
|
|
2518
2518
|
setCurrentItemIndex: m,
|
|
2519
|
-
results:
|
|
2519
|
+
results: h,
|
|
2520
2520
|
setResults: d,
|
|
2521
2521
|
currentModel: y,
|
|
2522
2522
|
removingItem: G,
|
|
@@ -2574,10 +2574,10 @@ const Jc = ({
|
|
|
2574
2574
|
);
|
|
2575
2575
|
return t;
|
|
2576
2576
|
}, Qc = (e, t) => {
|
|
2577
|
-
const { view_id: n, model: r, context: o, domain: s, limit: a, manualIds: l, fixedHeight: c } = e, [u, f] = S(!1), [d,
|
|
2577
|
+
const { view_id: n, model: r, context: o, domain: s, limit: a, manualIds: l, fixedHeight: c } = e, [u, f] = S(!1), [d, h] = S(), p = re(
|
|
2578
2578
|
lt
|
|
2579
|
-
), { setGraphIsLoading: m = void 0 } =
|
|
2580
|
-
|
|
2579
|
+
), { setGraphIsLoading: m = void 0 } = p || {}, [y] = Je(P.getHandler().getView);
|
|
2580
|
+
gt(t, () => ({
|
|
2581
2581
|
refresh: () => {
|
|
2582
2582
|
v();
|
|
2583
2583
|
}
|
|
@@ -2593,7 +2593,7 @@ const Jc = ({
|
|
|
2593
2593
|
type: "graph",
|
|
2594
2594
|
context: o
|
|
2595
2595
|
}), b = _i(g.arch);
|
|
2596
|
-
|
|
2596
|
+
h(b), f(!1), m == null || m(!1);
|
|
2597
2597
|
} catch (g) {
|
|
2598
2598
|
return console.error(g), f(!1), m == null || m(!1), /* @__PURE__ */ i(se, { children: JSON.stringify(g) });
|
|
2599
2599
|
}
|
|
@@ -2641,15 +2641,15 @@ const Jc = ({
|
|
|
2641
2641
|
default:
|
|
2642
2642
|
return /* @__PURE__ */ i(se, { children: `Graph ${d.type} not implemented` });
|
|
2643
2643
|
}
|
|
2644
|
-
}, on =
|
|
2644
|
+
}, on = ht(Qc);
|
|
2645
2645
|
var sn = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e.FEATURE_USERVIEWPREFS = "user_view_prefs", e))(sn || {});
|
|
2646
2646
|
const ty = Object.values(sn), Zc = (e) => {
|
|
2647
|
-
const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: s } = e, [a, l] = S(!1), [c, u] = S(), [f, d] = S(), [
|
|
2647
|
+
const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: s } = e, [a, l] = S(!1), [c, u] = S(), [f, d] = S(), [h] = Je(
|
|
2648
2648
|
P.getHandler().readForView
|
|
2649
|
-
),
|
|
2649
|
+
), p = B(async () => {
|
|
2650
2650
|
l(!0), u(void 0), s && n.push(["id", "in", s]);
|
|
2651
2651
|
try {
|
|
2652
|
-
const m = await
|
|
2652
|
+
const m = await h({
|
|
2653
2653
|
model: t,
|
|
2654
2654
|
domain: n,
|
|
2655
2655
|
context: r,
|
|
@@ -2660,17 +2660,17 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2660
2660
|
u("Error reading graph data from server: " + m);
|
|
2661
2661
|
}
|
|
2662
2662
|
l(!1);
|
|
2663
|
-
}, [r, n, s, t,
|
|
2663
|
+
}, [r, n, s, t, h, o]);
|
|
2664
2664
|
return {
|
|
2665
2665
|
loading: a,
|
|
2666
2666
|
error: c,
|
|
2667
|
-
fetchData:
|
|
2667
|
+
fetchData: p,
|
|
2668
2668
|
graphData: f
|
|
2669
2669
|
};
|
|
2670
2670
|
}, ed = (e, t) => {
|
|
2671
2671
|
const { view_id: n, model: r, context: o, domain: s, manualIds: a, fixedHeight: l } = e, c = re(
|
|
2672
2672
|
lt
|
|
2673
|
-
), { setGraphIsLoading: u = void 0 } = c || {}, { error: f, loading: d, graphData:
|
|
2673
|
+
), { setGraphIsLoading: u = void 0 } = c || {}, { error: f, loading: d, graphData: h, fetchData: p } = Zc({
|
|
2674
2674
|
view_id: n,
|
|
2675
2675
|
model: r,
|
|
2676
2676
|
domain: s,
|
|
@@ -2679,20 +2679,20 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2679
2679
|
});
|
|
2680
2680
|
if (ue(() => {
|
|
2681
2681
|
u == null || u(d);
|
|
2682
|
-
}, [d]),
|
|
2682
|
+
}, [d]), gt(t, () => ({
|
|
2683
2683
|
refresh: () => {
|
|
2684
|
-
|
|
2684
|
+
p();
|
|
2685
2685
|
}
|
|
2686
2686
|
})), ue(() => {
|
|
2687
|
-
|
|
2688
|
-
}, [n]), d || !
|
|
2687
|
+
p();
|
|
2688
|
+
}, [n]), d || !h)
|
|
2689
2689
|
return /* @__PURE__ */ i(bn, {});
|
|
2690
2690
|
if (f)
|
|
2691
2691
|
return /* @__PURE__ */ i(nt, { className: "mt-10", message: f, type: "error", banner: !0 });
|
|
2692
|
-
switch (
|
|
2692
|
+
switch (h.type) {
|
|
2693
2693
|
case "indicatorField":
|
|
2694
2694
|
case "indicator": {
|
|
2695
|
-
const { value: m, total: y, percent: v, icon: g, color: b, suffix: x } =
|
|
2695
|
+
const { value: m, total: y, percent: v, icon: g, color: b, suffix: x } = h;
|
|
2696
2696
|
return /* @__PURE__ */ i(
|
|
2697
2697
|
ns,
|
|
2698
2698
|
{
|
|
@@ -2709,7 +2709,7 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2709
2709
|
case "line":
|
|
2710
2710
|
case "bar":
|
|
2711
2711
|
case "pie": {
|
|
2712
|
-
const m =
|
|
2712
|
+
const m = h;
|
|
2713
2713
|
return /* @__PURE__ */ i(
|
|
2714
2714
|
ss,
|
|
2715
2715
|
{
|
|
@@ -2724,9 +2724,9 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2724
2724
|
);
|
|
2725
2725
|
}
|
|
2726
2726
|
default:
|
|
2727
|
-
return /* @__PURE__ */ i(se, { children: `Graph ${
|
|
2727
|
+
return /* @__PURE__ */ i(se, { children: `Graph ${h.type} not implemented` });
|
|
2728
2728
|
}
|
|
2729
|
-
}, as =
|
|
2729
|
+
}, as = ht(ed), wt = dt.createContext(null), td = (e) => {
|
|
2730
2730
|
const {
|
|
2731
2731
|
children: t,
|
|
2732
2732
|
openAction: n,
|
|
@@ -2737,7 +2737,7 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2737
2737
|
onChangeTab: l,
|
|
2738
2738
|
onRemoveTab: c,
|
|
2739
2739
|
tabs: u
|
|
2740
|
-
} = e, [f, d] = S(), [
|
|
2740
|
+
} = e, [f, d] = S(), [h, p] = S();
|
|
2741
2741
|
return /* @__PURE__ */ i(
|
|
2742
2742
|
wt.Provider,
|
|
2743
2743
|
{
|
|
@@ -2750,9 +2750,9 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2750
2750
|
onChangeTab: l,
|
|
2751
2751
|
onRemoveTab: c,
|
|
2752
2752
|
tabs: u,
|
|
2753
|
-
currentId:
|
|
2753
|
+
currentId: h,
|
|
2754
2754
|
currentView: f,
|
|
2755
|
-
setCurrentId:
|
|
2755
|
+
setCurrentId: p,
|
|
2756
2756
|
setCurrentView: d
|
|
2757
2757
|
},
|
|
2758
2758
|
children: t
|
|
@@ -2831,7 +2831,7 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2831
2831
|
style: { color: t.colorPrimaryBg }
|
|
2832
2832
|
}
|
|
2833
2833
|
) })
|
|
2834
|
-
] }), s =
|
|
2834
|
+
] }), s = mt(n.icon);
|
|
2835
2835
|
let a = r;
|
|
2836
2836
|
n.selectionValues.size ? a = n.selectionValues.get(r) : Array.isArray(r) && (a = r[1]);
|
|
2837
2837
|
const l = /* @__PURE__ */ i(
|
|
@@ -2854,7 +2854,7 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2854
2854
|
t && l();
|
|
2855
2855
|
}, [t]), a)
|
|
2856
2856
|
return /* @__PURE__ */ i(ts, { error: a });
|
|
2857
|
-
const { id: d, model:
|
|
2857
|
+
const { id: d, model: h, limit: p, domain: m, context: y, initialView: v } = r || {}, g = c ? as : on;
|
|
2858
2858
|
return /* @__PURE__ */ D(
|
|
2859
2859
|
ls,
|
|
2860
2860
|
{
|
|
@@ -2869,10 +2869,10 @@ const ty = Object.values(sn), Zc = (e) => {
|
|
|
2869
2869
|
g,
|
|
2870
2870
|
{
|
|
2871
2871
|
view_id: v.id,
|
|
2872
|
-
model:
|
|
2872
|
+
model: h,
|
|
2873
2873
|
context: y,
|
|
2874
2874
|
domain: m,
|
|
2875
|
-
limit:
|
|
2875
|
+
limit: p,
|
|
2876
2876
|
fixedHeight: !0
|
|
2877
2877
|
}
|
|
2878
2878
|
)
|
|
@@ -3030,8 +3030,8 @@ const Lt = ({
|
|
|
3030
3030
|
const { ooui: t } = e;
|
|
3031
3031
|
return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(gd, { ooui: t }) });
|
|
3032
3032
|
}, gd = (e) => {
|
|
3033
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation:
|
|
3034
|
-
|
|
3033
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: h, context: p, readOnly: m, field: y } = n, v = re(He), { getContext: g } = v || {};
|
|
3034
|
+
vt(() => {
|
|
3035
3035
|
x();
|
|
3036
3036
|
}, [o]);
|
|
3037
3037
|
const b = (A) => {
|
|
@@ -3056,10 +3056,10 @@ const Lt = ({
|
|
|
3056
3056
|
A = [...A, ...O];
|
|
3057
3057
|
}
|
|
3058
3058
|
const C = (await P.getHandler().search({
|
|
3059
|
-
model:
|
|
3059
|
+
model: h,
|
|
3060
3060
|
params: A,
|
|
3061
3061
|
fieldsToRetrieve: [y],
|
|
3062
|
-
context: { ...g == null ? void 0 : g(), ...
|
|
3062
|
+
context: { ...g == null ? void 0 : g(), ...p }
|
|
3063
3063
|
})).map((O) => {
|
|
3064
3064
|
const V = O[y];
|
|
3065
3065
|
let F = V;
|
|
@@ -3250,13 +3250,13 @@ const Lt = ({
|
|
|
3250
3250
|
const s = Td(r);
|
|
3251
3251
|
s < o && (o = s);
|
|
3252
3252
|
let a = !1, l = [];
|
|
3253
|
-
const c = r.map((d,
|
|
3254
|
-
const
|
|
3255
|
-
row:
|
|
3253
|
+
const c = r.map((d, h) => {
|
|
3254
|
+
const p = d.filter((v) => !v.invisible), m = Sd({
|
|
3255
|
+
row: p,
|
|
3256
3256
|
numberOfColumns: o
|
|
3257
3257
|
});
|
|
3258
3258
|
let y = m;
|
|
3259
|
-
return (
|
|
3259
|
+
return (h === 0 || !(d.length === 1 && d.some((v) => v.type === "group"))) && (y = bd({
|
|
3260
3260
|
row: m,
|
|
3261
3261
|
numberOfColumns: o,
|
|
3262
3262
|
mustFillWithEmpties: n
|
|
@@ -3331,10 +3331,10 @@ const Lt = ({
|
|
|
3331
3331
|
const { children: n, globalValues: r = {} } = e, o = X(), s = X(), [a, l] = S(!1), c = re(
|
|
3332
3332
|
wt
|
|
3333
3333
|
), { openAction: u } = c || {}, f = X([]), { t: d } = he();
|
|
3334
|
-
|
|
3334
|
+
gt(t, () => ({
|
|
3335
3335
|
openActionModal: I
|
|
3336
3336
|
}));
|
|
3337
|
-
const [
|
|
3337
|
+
const [h, p] = S(!1), [m, y] = S(
|
|
3338
3338
|
{
|
|
3339
3339
|
context: {}
|
|
3340
3340
|
}
|
|
@@ -3480,7 +3480,7 @@ const Lt = ({
|
|
|
3480
3480
|
context: V,
|
|
3481
3481
|
actionData: F
|
|
3482
3482
|
}) {
|
|
3483
|
-
|
|
3483
|
+
h ? w({ domain: T, model: C, formView: O, context: V, actionData: F }) : (y({ domain: T, model: C, context: V, formView: O, actionData: F }), p(!0));
|
|
3484
3484
|
}
|
|
3485
3485
|
async function w({
|
|
3486
3486
|
domain: T,
|
|
@@ -3495,10 +3495,10 @@ const Lt = ({
|
|
|
3495
3495
|
context: {},
|
|
3496
3496
|
formView: void 0,
|
|
3497
3497
|
actionData: void 0
|
|
3498
|
-
}),
|
|
3498
|
+
}), p(!1), await new Promise((_) => setTimeout(_, 300)), y({ domain: T, model: C, context: V, formView: O, actionData: F }), p(!0);
|
|
3499
3499
|
}
|
|
3500
3500
|
async function A() {
|
|
3501
|
-
Lo(f.current), f.current = [],
|
|
3501
|
+
Lo(f.current), f.current = [], p(!1), y({
|
|
3502
3502
|
domain: void 0,
|
|
3503
3503
|
model: void 0,
|
|
3504
3504
|
context: {},
|
|
@@ -3535,10 +3535,10 @@ const Lt = ({
|
|
|
3535
3535
|
parentContext: m.context,
|
|
3536
3536
|
model: m.model,
|
|
3537
3537
|
formView: m.formView,
|
|
3538
|
-
visible:
|
|
3538
|
+
visible: h,
|
|
3539
3539
|
onSubmitSucceed: A,
|
|
3540
3540
|
onCancel: () => {
|
|
3541
|
-
Lo(f.current), f.current = [],
|
|
3541
|
+
Lo(f.current), f.current = [], p(!1), y({
|
|
3542
3542
|
domain: void 0,
|
|
3543
3543
|
model: void 0,
|
|
3544
3544
|
context: {},
|
|
@@ -3605,7 +3605,7 @@ async function Vd({
|
|
|
3605
3605
|
}
|
|
3606
3606
|
return { views: s, initialView: a };
|
|
3607
3607
|
}
|
|
3608
|
-
const Dd =
|
|
3608
|
+
const Dd = ht(_d), Ed = (e, t) => {
|
|
3609
3609
|
const n = {};
|
|
3610
3610
|
return Object.keys(e).forEach((r) => {
|
|
3611
3611
|
n[r] = e[r], t != null && t[r] && (n[r].context = t[r]);
|
|
@@ -3623,8 +3623,8 @@ function kd(e, t) {
|
|
|
3623
3623
|
onSubmitError: u,
|
|
3624
3624
|
readOnly: f = !1,
|
|
3625
3625
|
mustClearAfterSave: d = !1,
|
|
3626
|
-
submitMode:
|
|
3627
|
-
values:
|
|
3626
|
+
submitMode: h = "api",
|
|
3627
|
+
values: p,
|
|
3628
3628
|
formView: m,
|
|
3629
3629
|
postSaveAction: y,
|
|
3630
3630
|
insideButtonModal: v = !1,
|
|
@@ -3649,7 +3649,7 @@ function kd(e, t) {
|
|
|
3649
3649
|
} = (I ? Ke : {}) || {}, Se = re(
|
|
3650
3650
|
ln
|
|
3651
3651
|
), { processAction: Ue, globalValues: Me } = Se || {};
|
|
3652
|
-
|
|
3652
|
+
gt(t, () => ({
|
|
3653
3653
|
submitForm: In,
|
|
3654
3654
|
getFields: rt,
|
|
3655
3655
|
getValues: q,
|
|
@@ -3668,7 +3668,7 @@ function kd(e, t) {
|
|
|
3668
3668
|
}
|
|
3669
3669
|
(r === void 0 && k || r !== void 0 && k && r < 0) && (L.current = void 0, G(void 0)), Be();
|
|
3670
3670
|
}
|
|
3671
|
-
}, [r, n,
|
|
3671
|
+
}, [r, n, p, m, x]), ue(() => {
|
|
3672
3672
|
oe && (er({
|
|
3673
3673
|
elementHasLostFocus: !0
|
|
3674
3674
|
}), Z(!1));
|
|
@@ -3743,7 +3743,7 @@ function kd(e, t) {
|
|
|
3743
3743
|
const K = W.getFieldsValue(!0);
|
|
3744
3744
|
return Wt(K, U);
|
|
3745
3745
|
}, ot = (U, K) => {
|
|
3746
|
-
|
|
3746
|
+
pt({
|
|
3747
3747
|
values: {
|
|
3748
3748
|
...Wt(W.getFieldsValue(!0), k),
|
|
3749
3749
|
[U]: K
|
|
@@ -3774,10 +3774,10 @@ function kd(e, t) {
|
|
|
3774
3774
|
}
|
|
3775
3775
|
}, ze = async (U) => {
|
|
3776
3776
|
let K, ie, le, Te;
|
|
3777
|
-
we == null || we(!0), $(void 0), U != null && U.fields ? (ie = U.fields, le = U.arch) : (ie = k, le = j),
|
|
3777
|
+
we == null || we(!0), $(void 0), U != null && U.fields ? (ie = U.fields, le = U.arch) : (ie = k, le = j), p && (U == null ? void 0 : U.forceRefresh) !== !0 ? K = p : { values: K, defaultGetCalled: Te } = await da({
|
|
3778
3778
|
fields: ie,
|
|
3779
3779
|
arch: le
|
|
3780
|
-
}), b && (K = { ...ud(b), ...K }), N.current = Wt(K, ie),
|
|
3780
|
+
}), b && (K = { ...ud(b), ...K }), N.current = Wt(K, ie), pt({
|
|
3781
3781
|
values: K,
|
|
3782
3782
|
fields: ie,
|
|
3783
3783
|
reset: !0,
|
|
@@ -3806,7 +3806,7 @@ function kd(e, t) {
|
|
|
3806
3806
|
type: "form",
|
|
3807
3807
|
context: g
|
|
3808
3808
|
});
|
|
3809
|
-
},
|
|
3809
|
+
}, pt = ({
|
|
3810
3810
|
values: U,
|
|
3811
3811
|
fields: K,
|
|
3812
3812
|
reset: ie,
|
|
@@ -3897,7 +3897,7 @@ function kd(e, t) {
|
|
|
3897
3897
|
z.current
|
|
3898
3898
|
), z.current = !1;
|
|
3899
3899
|
const le = pe();
|
|
3900
|
-
return d && (L.current = void 0,
|
|
3900
|
+
return d && (L.current = void 0, pt({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: le };
|
|
3901
3901
|
}
|
|
3902
3902
|
if (!Ye() && pe() && ie)
|
|
3903
3903
|
return Y.current = !1, de == null || de(!1), Oe == null || Oe(), { succeed: !0, id: pe() };
|
|
@@ -3905,7 +3905,7 @@ function kd(e, t) {
|
|
|
3905
3905
|
return Y.current = !1, Mo(O), { succeed: !1, id: pe() };
|
|
3906
3906
|
F(!0), Fe == null || Fe(!0);
|
|
3907
3907
|
try {
|
|
3908
|
-
|
|
3908
|
+
h === "api" ? await go(U) : await ua(U), d && (L.current = void 0, pt({ values: {}, fields: k, reset: !0 })), await ze({ forceRefresh: !0 }), K = !0, or.success(O("savedRegisters"));
|
|
3909
3909
|
} catch (le) {
|
|
3910
3910
|
Y.current = !1, F(!1), Fe == null || Fe(!1), qe == null || qe(le), or.error(O("errorWhileSavingForm")), $(le != null && le.message ? le.message : le);
|
|
3911
3911
|
} finally {
|
|
@@ -4019,7 +4019,7 @@ function kd(e, t) {
|
|
|
4019
4019
|
fields: k,
|
|
4020
4020
|
arch: j,
|
|
4021
4021
|
values: Qe
|
|
4022
|
-
}),
|
|
4022
|
+
}), pt({
|
|
4023
4023
|
values: Qe,
|
|
4024
4024
|
fields: k,
|
|
4025
4025
|
reset: !1
|
|
@@ -4138,7 +4138,7 @@ function kd(e, t) {
|
|
|
4138
4138
|
}
|
|
4139
4139
|
let le = !1;
|
|
4140
4140
|
try {
|
|
4141
|
-
!f && (Ye() || pe() === void 0) && (le = !0, tr(!0),
|
|
4141
|
+
!f && (Ye() || pe() === void 0) && (le = !0, tr(!0), h === "2many" ? (await go({ callOnSubmitSucceed: !1 }), z.current = !0) : await In({ callOnSubmitSucceed: !1 }));
|
|
4142
4142
|
const Te = z.current ? De() : {}, Qe = { ...ie, ...Te };
|
|
4143
4143
|
U === "object" ? await ha({ action: K, context: Qe }) : U === "workflow" ? await ga({ action: K }) : U === "action" && await ya({ action: K, context: Qe }), le && tr(!1);
|
|
4144
4144
|
} catch (Te) {
|
|
@@ -4226,7 +4226,7 @@ function kd(e, t) {
|
|
|
4226
4226
|
}
|
|
4227
4227
|
) : null;
|
|
4228
4228
|
}
|
|
4229
|
-
const cn =
|
|
4229
|
+
const cn = ht(kd), dn = (e) => {
|
|
4230
4230
|
const {
|
|
4231
4231
|
visible: t,
|
|
4232
4232
|
id: n,
|
|
@@ -4236,7 +4236,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4236
4236
|
isMenuAction: a = !1,
|
|
4237
4237
|
actionData: l,
|
|
4238
4238
|
...c
|
|
4239
|
-
} = e, { model: u } = c, { modalWidth: f } = qn(), [d,
|
|
4239
|
+
} = e, { model: u } = c, { modalWidth: f } = qn(), [d, h] = S(r), [p, m] = S(!1), [y, v] = S(), { action_id: g, res_id: b, action_type: x, view_id: I } = l || {};
|
|
4240
4240
|
ue(() => {
|
|
4241
4241
|
a && w();
|
|
4242
4242
|
}, [l, a]);
|
|
@@ -4250,7 +4250,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4250
4250
|
m(O !== !1), O !== !1 && v(O);
|
|
4251
4251
|
}
|
|
4252
4252
|
async function A() {
|
|
4253
|
-
if (
|
|
4253
|
+
if (p && y)
|
|
4254
4254
|
await P.getHandler().removeFavourite({
|
|
4255
4255
|
shortcut_id: y
|
|
4256
4256
|
});
|
|
@@ -4263,15 +4263,15 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4263
4263
|
res_id: V || !1
|
|
4264
4264
|
});
|
|
4265
4265
|
}
|
|
4266
|
-
m(!
|
|
4266
|
+
m(!p);
|
|
4267
4267
|
}
|
|
4268
4268
|
function T() {
|
|
4269
4269
|
return /* @__PURE__ */ D(Ne, { align: "middle", children: [
|
|
4270
4270
|
/* @__PURE__ */ i(be, { children: /* @__PURE__ */ i(
|
|
4271
4271
|
je,
|
|
4272
4272
|
{
|
|
4273
|
-
type:
|
|
4274
|
-
icon:
|
|
4273
|
+
type: p ? "primary" : "default",
|
|
4274
|
+
icon: p ? /* @__PURE__ */ i(Ha, { style: { color: "white" } }) : /* @__PURE__ */ i(Ua, {}),
|
|
4275
4275
|
style: { width: 30 },
|
|
4276
4276
|
onClick: A
|
|
4277
4277
|
}
|
|
@@ -4280,7 +4280,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4280
4280
|
] });
|
|
4281
4281
|
}
|
|
4282
4282
|
const C = f * 0.95;
|
|
4283
|
-
return /* @__PURE__ */ i(Rd, { setTitle:
|
|
4283
|
+
return /* @__PURE__ */ i(Rd, { setTitle: h, children: /* @__PURE__ */ i(
|
|
4284
4284
|
at,
|
|
4285
4285
|
{
|
|
4286
4286
|
title: a ? T() : d,
|
|
@@ -4493,22 +4493,22 @@ const { defaultAlgorithm: Ud, defaultSeed: Wd } = Ge, Gd = Ud(Wd), { Option: Kd
|
|
|
4493
4493
|
return /* @__PURE__ */ i(Re, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Yd, { ...e }) });
|
|
4494
4494
|
}, Yd = (e) => {
|
|
4495
4495
|
const { ooui: t, onChange: n, value: r } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), c = l && l.length && l.filter((d) => {
|
|
4496
|
-
const [
|
|
4497
|
-
return r ? !r.includes(
|
|
4496
|
+
const [h] = d;
|
|
4497
|
+
return r ? !r.includes(h) : !0;
|
|
4498
4498
|
}).map((d) => {
|
|
4499
|
-
const [
|
|
4500
|
-
return /* @__PURE__ */ i(Kd, { value:
|
|
4499
|
+
const [h, p] = d;
|
|
4500
|
+
return /* @__PURE__ */ i(Kd, { value: p, children: p }, h);
|
|
4501
4501
|
}), u = a && !s ? zd : Mt;
|
|
4502
4502
|
function f(d) {
|
|
4503
|
-
const
|
|
4504
|
-
const m = l.find(([y, v]) =>
|
|
4503
|
+
const h = d.map((p) => {
|
|
4504
|
+
const m = l.find(([y, v]) => p === v);
|
|
4505
4505
|
return m && m[0];
|
|
4506
4506
|
});
|
|
4507
|
-
if (
|
|
4507
|
+
if (h.length === 0) {
|
|
4508
4508
|
n == null || n(void 0);
|
|
4509
4509
|
return;
|
|
4510
4510
|
}
|
|
4511
|
-
n == null || n(
|
|
4511
|
+
n == null || n(h);
|
|
4512
4512
|
}
|
|
4513
4513
|
return /* @__PURE__ */ i(
|
|
4514
4514
|
u,
|
|
@@ -4695,19 +4695,19 @@ function ms(e) {
|
|
|
4695
4695
|
searchVisible: u,
|
|
4696
4696
|
setSearchFilterHeight: f,
|
|
4697
4697
|
searchError: d,
|
|
4698
|
-
searchValues:
|
|
4699
|
-
showLimitOptions:
|
|
4698
|
+
searchValues: h,
|
|
4699
|
+
showLimitOptions: p = !0
|
|
4700
4700
|
} = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1), I = X(), { token: w } = iu(), [A] = ut.useForm();
|
|
4701
4701
|
ue(() => {
|
|
4702
|
-
A.setFieldsValue(
|
|
4703
|
-
}, [
|
|
4702
|
+
A.setFieldsValue(h);
|
|
4703
|
+
}, [h]);
|
|
4704
4704
|
const T = () => {
|
|
4705
4705
|
if (!v)
|
|
4706
4706
|
return;
|
|
4707
4707
|
const V = b ? v : m, F = V == null ? void 0 : V.rows;
|
|
4708
4708
|
return F == null ? void 0 : F.map((_, $) => /* @__PURE__ */ i(Ne, { children: _.map((R, G) => /* @__PURE__ */ i(be, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(fs, { field: R }) }, G)) }, $));
|
|
4709
4709
|
};
|
|
4710
|
-
|
|
4710
|
+
vt(() => {
|
|
4711
4711
|
x(!1), I.current = new Di(n, t), I.current.parse(), y(I.current._simpleSearchContainer), g(I.current._advancedSearchContainer);
|
|
4712
4712
|
}, [t, n]);
|
|
4713
4713
|
const C = T(), O = (V) => {
|
|
@@ -4739,7 +4739,7 @@ function ms(e) {
|
|
|
4739
4739
|
initialValues: { offset: a, limit: l },
|
|
4740
4740
|
children: [
|
|
4741
4741
|
C,
|
|
4742
|
-
b &&
|
|
4742
|
+
b && p && /* @__PURE__ */ i(Xd, { onLimitChange: c }),
|
|
4743
4743
|
/* @__PURE__ */ i(
|
|
4744
4744
|
Jd,
|
|
4745
4745
|
{
|
|
@@ -4814,8 +4814,8 @@ const Bo = (e, t = "14px -apple-system") => {
|
|
|
4814
4814
|
};
|
|
4815
4815
|
if (n === 0 || e < n && o <= n || t === e)
|
|
4816
4816
|
return null;
|
|
4817
|
-
const u = async (
|
|
4818
|
-
|
|
4817
|
+
const u = async (h) => {
|
|
4818
|
+
h.preventDefault(), h.stopPropagation(), a(!0), await r(), a(!1);
|
|
4819
4819
|
}, f = /* @__PURE__ */ D("span", { children: [
|
|
4820
4820
|
c.recordsSelected.replace(
|
|
4821
4821
|
"{numberOfSelectedRows}",
|
|
@@ -4887,10 +4887,10 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4887
4887
|
const [r, o] = S(!1), [s, a] = S(!1), { t: l } = he(), [c, u] = S(), f = B(async () => {
|
|
4888
4888
|
const {
|
|
4889
4889
|
actionItems: d = [],
|
|
4890
|
-
relateItems:
|
|
4891
|
-
printItems:
|
|
4890
|
+
relateItems: h = [],
|
|
4891
|
+
printItems: p = []
|
|
4892
4892
|
} = await e() || {};
|
|
4893
|
-
return u({ actionItems: d, relateItems:
|
|
4893
|
+
return u({ actionItems: d, relateItems: h, printItems: p }), [
|
|
4894
4894
|
{
|
|
4895
4895
|
sticky: !0,
|
|
4896
4896
|
items: [
|
|
@@ -4903,7 +4903,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4903
4903
|
{
|
|
4904
4904
|
id: "print",
|
|
4905
4905
|
name: l("report"),
|
|
4906
|
-
disabled: !
|
|
4906
|
+
disabled: !p || p.length === 0,
|
|
4907
4907
|
icon: /* @__PURE__ */ i(Gr, {})
|
|
4908
4908
|
},
|
|
4909
4909
|
{
|
|
@@ -4915,7 +4915,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4915
4915
|
{
|
|
4916
4916
|
label: l("related"),
|
|
4917
4917
|
icon: /* @__PURE__ */ i(Kr, {}),
|
|
4918
|
-
items:
|
|
4918
|
+
items: h
|
|
4919
4919
|
}
|
|
4920
4920
|
];
|
|
4921
4921
|
}, [l, e]);
|
|
@@ -4960,15 +4960,15 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4960
4960
|
wt
|
|
4961
4961
|
), { openRelate: u } = c || {}, f = re(
|
|
4962
4962
|
ln
|
|
4963
|
-
), { processAction: d } = f || {}, [
|
|
4963
|
+
), { processAction: d } = f || {}, [h, p] = Je(
|
|
4964
4964
|
P.getHandler().getView
|
|
4965
4965
|
), [m, y] = Je(
|
|
4966
4966
|
P.getHandler().readObjects
|
|
4967
4967
|
), v = B(() => {
|
|
4968
|
-
|
|
4969
|
-
}, [
|
|
4968
|
+
p(), y();
|
|
4969
|
+
}, [p, y]), g = B(async () => {
|
|
4970
4970
|
var A;
|
|
4971
|
-
const x = await
|
|
4971
|
+
const x = await h({
|
|
4972
4972
|
model: n,
|
|
4973
4973
|
type: "form",
|
|
4974
4974
|
context: r
|
|
@@ -4987,7 +4987,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4987
4987
|
relateItems: x.toolbar.relate,
|
|
4988
4988
|
printItems: x.toolbar.print
|
|
4989
4989
|
};
|
|
4990
|
-
}, [r,
|
|
4990
|
+
}, [r, h, t, n, m]);
|
|
4991
4991
|
if (!t)
|
|
4992
4992
|
return null;
|
|
4993
4993
|
function b({ item: x, type: I }) {
|
|
@@ -5054,23 +5054,23 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5054
5054
|
if (!t || t && o)
|
|
5055
5055
|
return;
|
|
5056
5056
|
l(!0);
|
|
5057
|
-
const
|
|
5057
|
+
const p = await P.getHandler().execute({
|
|
5058
5058
|
action: "name_get",
|
|
5059
5059
|
payload: [f],
|
|
5060
5060
|
model: c,
|
|
5061
5061
|
context: n
|
|
5062
5062
|
});
|
|
5063
|
-
s(
|
|
5063
|
+
s(p[0][1]), l(!1);
|
|
5064
5064
|
}, [t, o]);
|
|
5065
5065
|
if (ue(() => {
|
|
5066
5066
|
d();
|
|
5067
5067
|
}, [t]), !t && !a)
|
|
5068
5068
|
return /* @__PURE__ */ i(se, {});
|
|
5069
5069
|
if (a)
|
|
5070
|
-
return /* @__PURE__ */ i(
|
|
5071
|
-
const
|
|
5070
|
+
return /* @__PURE__ */ i(yt, {});
|
|
5071
|
+
const h = r.get(c);
|
|
5072
5072
|
return /* @__PURE__ */ D(Xe, { children: [
|
|
5073
|
-
/* @__PURE__ */ i(se, { children: `${
|
|
5073
|
+
/* @__PURE__ */ i(se, { children: `${h}:` }),
|
|
5074
5074
|
/* @__PURE__ */ i(se, { children: o }),
|
|
5075
5075
|
/* @__PURE__ */ i(so, { id: f, model: c })
|
|
5076
5076
|
] });
|
|
@@ -5097,14 +5097,14 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5097
5097
|
const { ooui: t, showTime: n = !1 } = e, { required: r } = t;
|
|
5098
5098
|
return /* @__PURE__ */ i(Re, { required: r, ...e, children: /* @__PURE__ */ i(vu, { ooui: t, showTime: n }) });
|
|
5099
5099
|
}, vu = (e) => {
|
|
5100
|
-
const { value: t, onChange: n, ooui: r, showTime: o } = e, { id: s, readOnly: a, required: l } = r, { token: c } = yu(), u = io(), f = l && !a ? { backgroundColor: c.colorPrimaryBg } : void 0, d = o ? "time" : "date",
|
|
5100
|
+
const { value: t, onChange: n, ooui: r, showTime: o } = e, { id: s, readOnly: a, required: l } = r, { token: c } = yu(), u = io(), f = l && !a ? { backgroundColor: c.colorPrimaryBg } : void 0, d = o ? "time" : "date", h = (y) => {
|
|
5101
5101
|
n == null || n(y);
|
|
5102
|
-
},
|
|
5102
|
+
}, p = (y) => {
|
|
5103
5103
|
if (y == null) {
|
|
5104
|
-
|
|
5104
|
+
h(y);
|
|
5105
5105
|
return;
|
|
5106
5106
|
}
|
|
5107
|
-
|
|
5107
|
+
h(y.format(Ct[d].dateInternalFormat));
|
|
5108
5108
|
}, m = t ? st(t, Ct[d].dateInternalFormat) : void 0;
|
|
5109
5109
|
return /* @__PURE__ */ i(
|
|
5110
5110
|
Mr,
|
|
@@ -5117,7 +5117,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5117
5117
|
showTime: o,
|
|
5118
5118
|
format: Ct[d].dateDisplayFormat,
|
|
5119
5119
|
value: m,
|
|
5120
|
-
onChange:
|
|
5120
|
+
onChange: p,
|
|
5121
5121
|
showNow: !1,
|
|
5122
5122
|
showToday: !1,
|
|
5123
5123
|
changeOnBlur: !0,
|
|
@@ -5225,17 +5225,17 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5225
5225
|
const [o, s] = S([]), [a, l] = S(!1), { relation: c, field: u } = n, f = B(async () => {
|
|
5226
5226
|
try {
|
|
5227
5227
|
l(!0);
|
|
5228
|
-
const
|
|
5228
|
+
const h = await P.getHandler().search({
|
|
5229
5229
|
model: c,
|
|
5230
|
-
params: [["id", "in", e.items.map((
|
|
5230
|
+
params: [["id", "in", e.items.map((p) => p.id)]],
|
|
5231
5231
|
fields: [u],
|
|
5232
5232
|
context: r
|
|
5233
5233
|
});
|
|
5234
5234
|
s(
|
|
5235
|
-
|
|
5235
|
+
h.map((p) => ({ id: p.id, name: p[u] }))
|
|
5236
5236
|
);
|
|
5237
|
-
} catch (
|
|
5238
|
-
console.error("Error loading data",
|
|
5237
|
+
} catch (h) {
|
|
5238
|
+
console.error("Error loading data", h);
|
|
5239
5239
|
} finally {
|
|
5240
5240
|
l(!1);
|
|
5241
5241
|
}
|
|
@@ -5244,9 +5244,9 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5244
5244
|
e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
|
|
5245
5245
|
}, [e == null ? void 0 : e.items]);
|
|
5246
5246
|
const d = ye(
|
|
5247
|
-
() => o.map((
|
|
5248
|
-
const { id:
|
|
5249
|
-
return /* @__PURE__ */ i(oo, { color: y, children: m }, `${
|
|
5247
|
+
() => o.map((h) => {
|
|
5248
|
+
const { id: p, name: m } = h, y = vn(m);
|
|
5249
|
+
return /* @__PURE__ */ i(oo, { color: y, children: m }, `${p}`);
|
|
5250
5250
|
}),
|
|
5251
5251
|
[o]
|
|
5252
5252
|
);
|
|
@@ -5279,7 +5279,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5279
5279
|
datetime: Cu,
|
|
5280
5280
|
avatar: _u,
|
|
5281
5281
|
tags: Vu
|
|
5282
|
-
}, ys =
|
|
5282
|
+
}, ys = ht(
|
|
5283
5283
|
(e, t) => {
|
|
5284
5284
|
var N;
|
|
5285
5285
|
const {
|
|
@@ -5293,8 +5293,8 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5293
5293
|
onRowClicked: u,
|
|
5294
5294
|
showPagination: f = !0,
|
|
5295
5295
|
selectedRowKeys: d = [],
|
|
5296
|
-
onRowSelectionChange:
|
|
5297
|
-
scrollY:
|
|
5296
|
+
onRowSelectionChange: h,
|
|
5297
|
+
scrollY: p,
|
|
5298
5298
|
colorsForResults: m = {},
|
|
5299
5299
|
statusForResults: y = {},
|
|
5300
5300
|
onChangeSort: v,
|
|
@@ -5317,7 +5317,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5317
5317
|
w
|
|
5318
5318
|
);
|
|
5319
5319
|
}, [w, _]);
|
|
5320
|
-
|
|
5320
|
+
gt(t, () => ({
|
|
5321
5321
|
unselectAll: () => {
|
|
5322
5322
|
var E;
|
|
5323
5323
|
(E = C.current) == null || E.unselectAll();
|
|
@@ -5388,7 +5388,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5388
5388
|
}, [O, d, _]), Z = ye(() => {
|
|
5389
5389
|
if (_ !== null && k && k.length > 0)
|
|
5390
5390
|
return su(k, O, 600);
|
|
5391
|
-
}, [k, O, _]), L = ye(() =>
|
|
5391
|
+
}, [k, O, _]), L = ye(() => p && (_ != null && _.columns.some((E) => E.sum !== void 0)) ? p - 30 : p, [p, _ == null ? void 0 : _.columns]);
|
|
5392
5392
|
return _ === null || !Z || ((N = Z == null ? void 0 : Z.columns) == null ? void 0 : N.length) === 0 ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(Vn, { children: [
|
|
5393
5393
|
H,
|
|
5394
5394
|
/* @__PURE__ */ i(
|
|
@@ -5409,14 +5409,14 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5409
5409
|
return /* @__PURE__ */ i(Lr, { color: y[E.id] });
|
|
5410
5410
|
} : void 0,
|
|
5411
5411
|
onRowDoubleClick: u,
|
|
5412
|
-
onRowSelectionChange:
|
|
5412
|
+
onRowSelectionChange: h,
|
|
5413
5413
|
onChangeSort: v,
|
|
5414
5414
|
sorter: g,
|
|
5415
5415
|
readonly: A,
|
|
5416
5416
|
expandableOpts: b ? {
|
|
5417
5417
|
expandIcon: Ga,
|
|
5418
5418
|
collapseIcon: Ka,
|
|
5419
|
-
loadingIcon:
|
|
5419
|
+
loadingIcon: yt,
|
|
5420
5420
|
onFetchChildrenForRecord: b,
|
|
5421
5421
|
childField: x
|
|
5422
5422
|
} : void 0
|
|
@@ -5441,8 +5441,8 @@ const vs = (e) => {
|
|
|
5441
5441
|
context: u,
|
|
5442
5442
|
setActionViewTotalItems: f,
|
|
5443
5443
|
treeView: d,
|
|
5444
|
-
formView:
|
|
5445
|
-
sorter:
|
|
5444
|
+
formView: h,
|
|
5445
|
+
sorter: p,
|
|
5446
5446
|
setSorter: m,
|
|
5447
5447
|
setCurrentItemIndex: y,
|
|
5448
5448
|
setResultsActionView: v,
|
|
@@ -5479,10 +5479,10 @@ const vs = (e) => {
|
|
|
5479
5479
|
attrs: J
|
|
5480
5480
|
}), Se = Ce[0];
|
|
5481
5481
|
E.current = [...Se], oe(Qt(Ce[1])), L(Dn(Ce[1]));
|
|
5482
|
-
const Ue = Se.map((ne) => ne.id), Me =
|
|
5482
|
+
const Ue = Se.map((ne) => ne.id), Me = p !== void 0 ? Yt({
|
|
5483
5483
|
resultsToSort: Se,
|
|
5484
|
-
sorter:
|
|
5485
|
-
fields: { ...d.fields, ...
|
|
5484
|
+
sorter: p,
|
|
5485
|
+
fields: { ...d.fields, ...h.fields }
|
|
5486
5486
|
}) : [...E.current];
|
|
5487
5487
|
ae(Me), Ue.length > 0 ? y == null || y(0) : y == null || y(void 0);
|
|
5488
5488
|
} else
|
|
@@ -5496,8 +5496,8 @@ const vs = (e) => {
|
|
|
5496
5496
|
u,
|
|
5497
5497
|
b,
|
|
5498
5498
|
d,
|
|
5499
|
-
p,
|
|
5500
5499
|
h,
|
|
5500
|
+
p,
|
|
5501
5501
|
y,
|
|
5502
5502
|
f
|
|
5503
5503
|
]), me = B(
|
|
@@ -5514,10 +5514,10 @@ const vs = (e) => {
|
|
|
5514
5514
|
attrs: Se
|
|
5515
5515
|
});
|
|
5516
5516
|
oe(Qt(ne)), L(Dn(ne)), E.current = [...Me];
|
|
5517
|
-
const Oe =
|
|
5517
|
+
const Oe = p !== void 0 ? Yt({
|
|
5518
5518
|
resultsToSort: Me,
|
|
5519
|
-
sorter:
|
|
5520
|
-
fields: { ...d.fields, ...
|
|
5519
|
+
sorter: p,
|
|
5520
|
+
fields: { ...d.fields, ...h.fields }
|
|
5521
5521
|
}) : [...E.current];
|
|
5522
5522
|
if (ae(Oe), g && Oe.length > 0) {
|
|
5523
5523
|
const pe = Oe.findIndex(
|
|
@@ -5539,8 +5539,8 @@ const vs = (e) => {
|
|
|
5539
5539
|
u,
|
|
5540
5540
|
b,
|
|
5541
5541
|
d,
|
|
5542
|
-
p,
|
|
5543
5542
|
h,
|
|
5543
|
+
p,
|
|
5544
5544
|
f,
|
|
5545
5545
|
j,
|
|
5546
5546
|
A
|
|
@@ -5566,22 +5566,22 @@ const vs = (e) => {
|
|
|
5566
5566
|
]
|
|
5567
5567
|
), ke = B(
|
|
5568
5568
|
(de) => {
|
|
5569
|
-
if (JSON.stringify(de) === JSON.stringify(
|
|
5569
|
+
if (JSON.stringify(de) === JSON.stringify(p))
|
|
5570
5570
|
return;
|
|
5571
5571
|
m == null || m(de);
|
|
5572
5572
|
const fe = de !== void 0 ? Yt({
|
|
5573
5573
|
resultsToSort: Y(),
|
|
5574
5574
|
sorter: de,
|
|
5575
|
-
fields: { ...d.fields, ...
|
|
5575
|
+
fields: { ...d.fields, ...h.fields }
|
|
5576
5576
|
}) : [...E.current];
|
|
5577
5577
|
ae(fe);
|
|
5578
5578
|
},
|
|
5579
5579
|
[
|
|
5580
|
-
|
|
5580
|
+
p,
|
|
5581
5581
|
m,
|
|
5582
5582
|
Y,
|
|
5583
5583
|
d == null ? void 0 : d.fields,
|
|
5584
|
-
|
|
5584
|
+
h == null ? void 0 : h.fields,
|
|
5585
5585
|
ae
|
|
5586
5586
|
]
|
|
5587
5587
|
), Le = B(
|
|
@@ -5666,8 +5666,8 @@ function Du(e, t) {
|
|
|
5666
5666
|
visible: u = !0,
|
|
5667
5667
|
rootTree: f = !1,
|
|
5668
5668
|
parentContext: d = {},
|
|
5669
|
-
onChangeSelectedRowKeys:
|
|
5670
|
-
} = e, [
|
|
5669
|
+
onChangeSelectedRowKeys: h
|
|
5670
|
+
} = e, [p, m] = S(!1), [y, v] = S(!1), g = X(!1), b = X(null), [x, I] = S(), [w, A] = S(), [T, C] = S(), [O, V] = S(), [F, _] = S(200), $ = X(), { height: R } = qn(), G = re(
|
|
5671
5671
|
ln
|
|
5672
5672
|
), { processAction: W } = G || {}, j = re(
|
|
5673
5673
|
lt
|
|
@@ -5693,9 +5693,9 @@ function Du(e, t) {
|
|
|
5693
5693
|
setLimit: Ie = void 0
|
|
5694
5694
|
} = (f ? j : {}) || {}, $e = B(
|
|
5695
5695
|
(Be) => {
|
|
5696
|
-
H == null || H(Be.map((ze) => ({ id: ze }))),
|
|
5696
|
+
H == null || H(Be.map((ze) => ({ id: ze }))), h == null || h(Be);
|
|
5697
5697
|
},
|
|
5698
|
-
[
|
|
5698
|
+
[h, H]
|
|
5699
5699
|
), {
|
|
5700
5700
|
submit: Ke,
|
|
5701
5701
|
clear: Fe,
|
|
@@ -5740,7 +5740,7 @@ function Du(e, t) {
|
|
|
5740
5740
|
setLimit: Ie,
|
|
5741
5741
|
clearSelection: (St = b.current) == null ? void 0 : St.unselectAll
|
|
5742
5742
|
});
|
|
5743
|
-
|
|
5743
|
+
gt(t, () => ({
|
|
5744
5744
|
refreshResults: () => {
|
|
5745
5745
|
g.current = !1, de();
|
|
5746
5746
|
},
|
|
@@ -5822,8 +5822,8 @@ function Du(e, t) {
|
|
|
5822
5822
|
[x, T, s, De, w]
|
|
5823
5823
|
), Ee = B(async () => {
|
|
5824
5824
|
const Be = await q();
|
|
5825
|
-
H == null || H(Be.map((ze) => ({ id: ze }))),
|
|
5826
|
-
}, [q,
|
|
5825
|
+
H == null || H(Be.map((ze) => ({ id: ze }))), h == null || h(Be);
|
|
5826
|
+
}, [q, h, H]), Ye = ye(() => w != null && w.isExpandable ? R - 160 : R - (F + 240), [R, F, w == null ? void 0 : w.isExpandable]), Pe = ye(
|
|
5827
5827
|
() => ce == null ? void 0 : ce.map((Be) => Be.id),
|
|
5828
5828
|
[ce]
|
|
5829
5829
|
), ot = B(() => !w || !T ? null : /* @__PURE__ */ D(se, { children: [
|
|
@@ -5905,9 +5905,9 @@ function Du(e, t) {
|
|
|
5905
5905
|
l,
|
|
5906
5906
|
w
|
|
5907
5907
|
]), bt = O || _e;
|
|
5908
|
-
return bt ? /* @__PURE__ */ i(nt, { className: "mt-10", message: bt, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children:
|
|
5908
|
+
return bt ? /* @__PURE__ */ i(nt, { className: "mt-10", message: bt, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ i(We, {}) : ot() });
|
|
5909
5909
|
}
|
|
5910
|
-
const ws =
|
|
5910
|
+
const ws = ht(Du), { error: Eu } = at, Nt = (e) => {
|
|
5911
5911
|
Eu({
|
|
5912
5912
|
title: "Error",
|
|
5913
5913
|
icon: /* @__PURE__ */ i(_t, {}),
|
|
@@ -5940,7 +5940,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5940
5940
|
nameSearch: s,
|
|
5941
5941
|
domain: a,
|
|
5942
5942
|
context: l = {}
|
|
5943
|
-
} = e, [c, u] = S(!1), { modalWidth: f, modalHeight: d } = qn(), { t:
|
|
5943
|
+
} = e, [c, u] = S(!1), { modalWidth: f, modalHeight: d } = qn(), { t: h } = he(), [p, m] = S([]), [y, v] = S(!1), g = B(
|
|
5944
5944
|
async (A) => {
|
|
5945
5945
|
v(!0);
|
|
5946
5946
|
try {
|
|
@@ -5958,11 +5958,11 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5958
5958
|
g([T]);
|
|
5959
5959
|
};
|
|
5960
5960
|
function I() {
|
|
5961
|
-
if (
|
|
5961
|
+
if (p.length === 0) {
|
|
5962
5962
|
b();
|
|
5963
5963
|
return;
|
|
5964
5964
|
}
|
|
5965
|
-
g(
|
|
5965
|
+
g(p);
|
|
5966
5966
|
}
|
|
5967
5967
|
const w = () => /* @__PURE__ */ D(se, { children: [
|
|
5968
5968
|
/* @__PURE__ */ i(
|
|
@@ -5987,29 +5987,29 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5987
5987
|
onClick: () => {
|
|
5988
5988
|
u(!0);
|
|
5989
5989
|
},
|
|
5990
|
-
children:
|
|
5990
|
+
children: h("new")
|
|
5991
5991
|
}
|
|
5992
5992
|
),
|
|
5993
5993
|
/* @__PURE__ */ i(
|
|
5994
5994
|
je,
|
|
5995
5995
|
{
|
|
5996
5996
|
disabled: y,
|
|
5997
|
-
icon: y ? /* @__PURE__ */ i(
|
|
5997
|
+
icon: y ? /* @__PURE__ */ i(yt, {}) : /* @__PURE__ */ i(Bn, {}),
|
|
5998
5998
|
onClick: () => {
|
|
5999
5999
|
I();
|
|
6000
6000
|
},
|
|
6001
6001
|
type: "primary",
|
|
6002
|
-
children:
|
|
6002
|
+
children: h("ok")
|
|
6003
6003
|
}
|
|
6004
6004
|
),
|
|
6005
|
-
/* @__PURE__ */ i(je, { icon: /* @__PURE__ */ i(nn, {}), onClick: b, children:
|
|
6005
|
+
/* @__PURE__ */ i(je, { icon: /* @__PURE__ */ i(nn, {}), onClick: b, children: h("cancel") })
|
|
6006
6006
|
] }) })
|
|
6007
6007
|
] });
|
|
6008
6008
|
return /* @__PURE__ */ D(se, { children: [
|
|
6009
6009
|
/* @__PURE__ */ i(
|
|
6010
6010
|
at,
|
|
6011
6011
|
{
|
|
6012
|
-
title:
|
|
6012
|
+
title: h("search"),
|
|
6013
6013
|
centered: !0,
|
|
6014
6014
|
width: f,
|
|
6015
6015
|
open: t && !c,
|
|
@@ -6054,7 +6054,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6054
6054
|
context: l,
|
|
6055
6055
|
id: c,
|
|
6056
6056
|
domain: u
|
|
6057
|
-
} = r, f = o && !a ? { backgroundColor: Ss.colorPrimaryBg } : void 0, [d,
|
|
6057
|
+
} = r, f = o && !a ? { backgroundColor: Ss.colorPrimaryBg } : void 0, [d, h] = S(!1), [p, m] = S(!1), [y, v] = S(!1), [g, b] = S(), x = X(!1), [I, w] = S(""), A = X(), T = re(He), { domain: C, getValues: O, getFields: V, getContext: F, elementHasLostFocus: _ } = T || {}, $ = X([]), [R, G] = S([]), W = t && t[0] || void 0, j = t && t[1] || "";
|
|
6058
6058
|
ue(() => {
|
|
6059
6059
|
!Array.isArray(t) && t && ce(t);
|
|
6060
6060
|
}, [t]), ue(() => {
|
|
@@ -6096,10 +6096,10 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6096
6096
|
context: { ...F == null ? void 0 : F(), ...l },
|
|
6097
6097
|
totalItems: 2
|
|
6098
6098
|
});
|
|
6099
|
-
N.length === 1 ? ce(N[0]) : (b(L),
|
|
6099
|
+
N.length === 1 ? ce(N[0]) : (b(L), h(!0));
|
|
6100
6100
|
return;
|
|
6101
6101
|
}
|
|
6102
|
-
b(L),
|
|
6102
|
+
b(L), h(!0);
|
|
6103
6103
|
}, ce = async (L) => {
|
|
6104
6104
|
v(!0);
|
|
6105
6105
|
try {
|
|
@@ -6175,7 +6175,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6175
6175
|
/* @__PURE__ */ i(be, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ i(
|
|
6176
6176
|
je,
|
|
6177
6177
|
{
|
|
6178
|
-
icon: y ? /* @__PURE__ */ i(
|
|
6178
|
+
icon: y ? /* @__PURE__ */ i(yt, {}) : /* @__PURE__ */ i(Un, {}),
|
|
6179
6179
|
disabled: a || y,
|
|
6180
6180
|
onClick: () => {
|
|
6181
6181
|
x.current = !0, te(j);
|
|
@@ -6193,10 +6193,10 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6193
6193
|
visible: d,
|
|
6194
6194
|
nameSearch: W ? void 0 : g,
|
|
6195
6195
|
onSelectValues: async (L) => {
|
|
6196
|
-
|
|
6196
|
+
h(!1), ce(L[0]), x.current = !1, A.current = void 0;
|
|
6197
6197
|
},
|
|
6198
6198
|
onCloseModal: () => {
|
|
6199
|
-
|
|
6199
|
+
h(!1), x.current = !1;
|
|
6200
6200
|
}
|
|
6201
6201
|
}
|
|
6202
6202
|
),
|
|
@@ -6206,7 +6206,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6206
6206
|
model: s,
|
|
6207
6207
|
parentContext: { ...F == null ? void 0 : F(), ...l },
|
|
6208
6208
|
id: t && t[0],
|
|
6209
|
-
visible:
|
|
6209
|
+
visible: p,
|
|
6210
6210
|
onSubmitSucceed: (L) => {
|
|
6211
6211
|
m(!1), ce(L);
|
|
6212
6212
|
},
|
|
@@ -6257,11 +6257,11 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6257
6257
|
try {
|
|
6258
6258
|
await n();
|
|
6259
6259
|
} finally {
|
|
6260
|
-
c(!1),
|
|
6260
|
+
c(!1), p();
|
|
6261
6261
|
}
|
|
6262
|
-
}, p = () => {
|
|
6263
|
-
h();
|
|
6264
6262
|
}, h = () => {
|
|
6263
|
+
p();
|
|
6264
|
+
}, p = () => {
|
|
6265
6265
|
f(!1);
|
|
6266
6266
|
const y = document.querySelector("#confirm-modal-container");
|
|
6267
6267
|
y && (Ui(y).unmount(), y.remove());
|
|
@@ -6277,7 +6277,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6277
6277
|
open: u,
|
|
6278
6278
|
centered: a || !1,
|
|
6279
6279
|
onOk: d,
|
|
6280
|
-
onCancel:
|
|
6280
|
+
onCancel: h,
|
|
6281
6281
|
confirmLoading: l,
|
|
6282
6282
|
okText: o,
|
|
6283
6283
|
cancelText: s,
|
|
@@ -6346,8 +6346,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6346
6346
|
onPreviousItem: u,
|
|
6347
6347
|
onNextItem: f,
|
|
6348
6348
|
isMany2Many: d,
|
|
6349
|
-
onSearchItem:
|
|
6350
|
-
selectedRowKeys:
|
|
6349
|
+
onSearchItem: h,
|
|
6350
|
+
selectedRowKeys: p,
|
|
6351
6351
|
showCreateButton: m,
|
|
6352
6352
|
showToggleButton: y
|
|
6353
6353
|
} = e, { token: v } = ju();
|
|
@@ -6374,7 +6374,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6374
6374
|
tooltip: d ? "Unlink" : "Delete",
|
|
6375
6375
|
icon: d ? /* @__PURE__ */ i(Ya, {}) : /* @__PURE__ */ i(qr, {}),
|
|
6376
6376
|
onClick: a,
|
|
6377
|
-
disabled: l === 0 || n || s !== "form" &&
|
|
6377
|
+
disabled: l === 0 || n || s !== "form" && p.length === 0
|
|
6378
6378
|
}
|
|
6379
6379
|
);
|
|
6380
6380
|
}
|
|
@@ -6430,7 +6430,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6430
6430
|
tooltip: "Search existing item",
|
|
6431
6431
|
icon: /* @__PURE__ */ i(Un, {}),
|
|
6432
6432
|
disabled: n,
|
|
6433
|
-
onClick:
|
|
6433
|
+
onClick: h
|
|
6434
6434
|
}
|
|
6435
6435
|
)
|
|
6436
6436
|
] }),
|
|
@@ -6466,8 +6466,8 @@ const Uu = (e) => {
|
|
|
6466
6466
|
un
|
|
6467
6467
|
), f = re(He), {
|
|
6468
6468
|
activeId: d,
|
|
6469
|
-
getFields:
|
|
6470
|
-
getValues:
|
|
6469
|
+
getFields: h,
|
|
6470
|
+
getValues: p,
|
|
6471
6471
|
getContext: m,
|
|
6472
6472
|
domain: y,
|
|
6473
6473
|
fetchValues: v
|
|
@@ -6528,10 +6528,10 @@ const Uu = (e) => {
|
|
|
6528
6528
|
N && (M.current = await P.getHandler().evalDomain({
|
|
6529
6529
|
domain: N,
|
|
6530
6530
|
values: Lt({
|
|
6531
|
-
fields:
|
|
6532
|
-
values:
|
|
6531
|
+
fields: h(),
|
|
6532
|
+
values: p()
|
|
6533
6533
|
}),
|
|
6534
|
-
fields:
|
|
6534
|
+
fields: h(),
|
|
6535
6535
|
context: m()
|
|
6536
6536
|
})), y && y.length > 0 && (M.current = M.current.concat(
|
|
6537
6537
|
Br({
|
|
@@ -6876,20 +6876,20 @@ const Uu = (e) => {
|
|
|
6876
6876
|
}) => {
|
|
6877
6877
|
const [s, a] = S([]), l = X(0), c = B(() => {
|
|
6878
6878
|
var m, y;
|
|
6879
|
-
let
|
|
6880
|
-
s.length === 0 ?
|
|
6881
|
-
}, [r, o, s.length]), u = B((
|
|
6882
|
-
l.current =
|
|
6879
|
+
let p = !1;
|
|
6880
|
+
s.length === 0 ? p = !0 : p = !1, p ? (a(r), (m = o.current) == null || m.setSelectedRows(r)) : (a([]), (y = o.current) == null || y.setSelectedRows([]));
|
|
6881
|
+
}, [r, o, s.length]), u = B((p) => {
|
|
6882
|
+
l.current = p;
|
|
6883
6883
|
}, []), f = B(() => l.current, []), d = ye(() => Ot(e), [e]);
|
|
6884
6884
|
return {
|
|
6885
6885
|
onTreeFetchRows: ft(
|
|
6886
6886
|
async ({
|
|
6887
|
-
idsToFetch:
|
|
6887
|
+
idsToFetch: p,
|
|
6888
6888
|
sortFields: m
|
|
6889
6889
|
}) => {
|
|
6890
6890
|
const y = {};
|
|
6891
6891
|
d.colors && (y.colors = d.colors), d.status && (y.status = d.status);
|
|
6892
|
-
let v =
|
|
6892
|
+
let v = p;
|
|
6893
6893
|
if (m) {
|
|
6894
6894
|
const w = Object.keys(m).map((A) => {
|
|
6895
6895
|
const T = m[A];
|
|
@@ -6897,7 +6897,7 @@ const Uu = (e) => {
|
|
|
6897
6897
|
}).join(", ");
|
|
6898
6898
|
v = await P.getHandler().searchAllIds({
|
|
6899
6899
|
model: t,
|
|
6900
|
-
params: [["id", "in",
|
|
6900
|
+
params: [["id", "in", p]],
|
|
6901
6901
|
context: n,
|
|
6902
6902
|
order: w
|
|
6903
6903
|
});
|
|
@@ -6960,7 +6960,7 @@ const Uu = (e) => {
|
|
|
6960
6960
|
l(!0), s(m);
|
|
6961
6961
|
},
|
|
6962
6962
|
[l, s]
|
|
6963
|
-
),
|
|
6963
|
+
), h = B(async () => {
|
|
6964
6964
|
const { id: m } = e[c];
|
|
6965
6965
|
if (!m)
|
|
6966
6966
|
return;
|
|
@@ -6973,11 +6973,11 @@ const Uu = (e) => {
|
|
|
6973
6973
|
a ? an({
|
|
6974
6974
|
t: u,
|
|
6975
6975
|
onOk: () => {
|
|
6976
|
-
|
|
6976
|
+
h(), m(), l(!1);
|
|
6977
6977
|
}
|
|
6978
6978
|
}) : m();
|
|
6979
6979
|
},
|
|
6980
|
-
[a,
|
|
6980
|
+
[a, h, l, u]
|
|
6981
6981
|
),
|
|
6982
6982
|
formHasChanges: a,
|
|
6983
6983
|
setFormHasChanges: l,
|
|
@@ -7006,14 +7006,14 @@ const Uu = (e) => {
|
|
|
7006
7006
|
id: (u = t[a]) == null ? void 0 : u.id,
|
|
7007
7007
|
submitMode: "values",
|
|
7008
7008
|
onFieldsChange: (f) => {
|
|
7009
|
-
var
|
|
7010
|
-
const d = (
|
|
7009
|
+
var p;
|
|
7010
|
+
const d = (p = t[a]) == null ? void 0 : p.id, h = t.map((m) => m.id === d ? {
|
|
7011
7011
|
...m,
|
|
7012
7012
|
operation: m.operation === "original" ? "pendingUpdate" : m.operation,
|
|
7013
7013
|
values: { ...f, id: d },
|
|
7014
7014
|
treeValues: { ...f, id: d }
|
|
7015
7015
|
} : m);
|
|
7016
|
-
s(Ic(
|
|
7016
|
+
s(Ic(h));
|
|
7017
7017
|
},
|
|
7018
7018
|
readOnly: o
|
|
7019
7019
|
}
|
|
@@ -7066,20 +7066,20 @@ const Uu = (e) => {
|
|
|
7066
7066
|
Cr(m);
|
|
7067
7067
|
}
|
|
7068
7068
|
u(0);
|
|
7069
|
-
}, [n, c, r, u, t]),
|
|
7069
|
+
}, [n, c, r, u, t]), h = B(async () => l === "form" ? await d() : await f(), [l, d, f]);
|
|
7070
7070
|
return { showRemoveConfirm: B(() => {
|
|
7071
7071
|
if (e) {
|
|
7072
7072
|
Is({
|
|
7073
7073
|
t: a,
|
|
7074
|
-
onOk:
|
|
7074
|
+
onOk: h
|
|
7075
7075
|
});
|
|
7076
7076
|
return;
|
|
7077
7077
|
}
|
|
7078
7078
|
Ts({
|
|
7079
7079
|
t: a,
|
|
7080
|
-
onOk:
|
|
7080
|
+
onOk: h
|
|
7081
7081
|
});
|
|
7082
|
-
}, [e,
|
|
7082
|
+
}, [e, h, a]) };
|
|
7083
7083
|
};
|
|
7084
7084
|
function Ju({
|
|
7085
7085
|
selectedRowKeys: e,
|
|
@@ -7103,13 +7103,13 @@ const Xu = ({
|
|
|
7103
7103
|
formView: u,
|
|
7104
7104
|
context: f
|
|
7105
7105
|
}) => {
|
|
7106
|
-
const [d,
|
|
7106
|
+
const [d, h] = S(!1), [p, m] = S(), [y, v] = S(!1), g = B(async () => {
|
|
7107
7107
|
let w;
|
|
7108
7108
|
t && n && (w = { [t]: n }), e === "form" ? r(() => {
|
|
7109
|
-
v(!0), m({ defaultValues: w }),
|
|
7110
|
-
}) : (v(!0), m({ defaultValues: w }),
|
|
7109
|
+
v(!0), m({ defaultValues: w }), h(!0);
|
|
7110
|
+
}) : (v(!0), m({ defaultValues: w }), h(!0));
|
|
7111
7111
|
}, [n, e, t, r]), b = B(() => {
|
|
7112
|
-
|
|
7112
|
+
h(!1), v(!1);
|
|
7113
7113
|
}, []), x = ft(
|
|
7114
7114
|
(w, A, T, C = !1) => {
|
|
7115
7115
|
let O;
|
|
@@ -7136,7 +7136,7 @@ const Xu = ({
|
|
|
7136
7136
|
treeValues: { ...T, id: V }
|
|
7137
7137
|
});
|
|
7138
7138
|
}
|
|
7139
|
-
s(O), y ||
|
|
7139
|
+
s(O), y || h(!1);
|
|
7140
7140
|
},
|
|
7141
7141
|
[y, o, s]
|
|
7142
7142
|
), I = ft(
|
|
@@ -7149,13 +7149,13 @@ const Xu = ({
|
|
|
7149
7149
|
ids: [w.id],
|
|
7150
7150
|
fields: u.fields,
|
|
7151
7151
|
context: f
|
|
7152
|
-
})), m(T.find((O) => O.id === A)), v(!1),
|
|
7152
|
+
})), m(T.find((O) => O.id === A)), v(!1), h(!0);
|
|
7153
7153
|
},
|
|
7154
7154
|
[f, u.fields, o, c, a, l]
|
|
7155
7155
|
);
|
|
7156
7156
|
return {
|
|
7157
7157
|
showFormModal: d,
|
|
7158
|
-
modalItem:
|
|
7158
|
+
modalItem: p,
|
|
7159
7159
|
continuousEntryMode: y,
|
|
7160
7160
|
createItem: g,
|
|
7161
7161
|
onCancelFormModal: b,
|
|
@@ -7178,8 +7178,8 @@ const Xu = ({
|
|
|
7178
7178
|
}, f = B(() => {
|
|
7179
7179
|
c(!1);
|
|
7180
7180
|
}, []), d = ft(
|
|
7181
|
-
async (
|
|
7182
|
-
const m = [...n], y =
|
|
7181
|
+
async (p) => {
|
|
7182
|
+
const m = [...n], y = p.filter((v) => !n.find((g) => g.id === v));
|
|
7183
7183
|
try {
|
|
7184
7184
|
(await P.getHandler().readObjects({
|
|
7185
7185
|
model: a,
|
|
@@ -7208,9 +7208,9 @@ const Xu = ({
|
|
|
7208
7208
|
}
|
|
7209
7209
|
},
|
|
7210
7210
|
[o, n, a, r, s]
|
|
7211
|
-
),
|
|
7212
|
-
async (
|
|
7213
|
-
await d(
|
|
7211
|
+
), h = B(
|
|
7212
|
+
async (p) => {
|
|
7213
|
+
await d(p), c(!1);
|
|
7214
7214
|
},
|
|
7215
7215
|
[d]
|
|
7216
7216
|
);
|
|
@@ -7218,7 +7218,7 @@ const Xu = ({
|
|
|
7218
7218
|
searchItem: u,
|
|
7219
7219
|
showSearchModal: l,
|
|
7220
7220
|
onCloseSearchModal: f,
|
|
7221
|
-
onSelectSearchValues:
|
|
7221
|
+
onSelectSearchValues: h
|
|
7222
7222
|
};
|
|
7223
7223
|
}, As = ({
|
|
7224
7224
|
aggregates: e,
|
|
@@ -7236,7 +7236,7 @@ const Xu = ({
|
|
|
7236
7236
|
paddingLeft: 2
|
|
7237
7237
|
},
|
|
7238
7238
|
children: [
|
|
7239
|
-
t && /* @__PURE__ */ i(
|
|
7239
|
+
t && /* @__PURE__ */ i(yt, {}),
|
|
7240
7240
|
!t && n && n.join(", ")
|
|
7241
7241
|
]
|
|
7242
7242
|
}
|
|
@@ -7308,8 +7308,8 @@ const Xu = ({
|
|
|
7308
7308
|
}, [e]), l = ft(
|
|
7309
7309
|
async (c) => {
|
|
7310
7310
|
const u = c.map((f) => {
|
|
7311
|
-
const { sort: d, ...
|
|
7312
|
-
return
|
|
7311
|
+
const { sort: d, ...h } = f;
|
|
7312
|
+
return h;
|
|
7313
7313
|
});
|
|
7314
7314
|
if (!t)
|
|
7315
7315
|
return r(u);
|
|
@@ -7355,13 +7355,13 @@ const Xu = ({
|
|
|
7355
7355
|
relation: u,
|
|
7356
7356
|
onChangeFirstVisibleRowIndex: f,
|
|
7357
7357
|
onGetFirstVisibleRowIndex: d,
|
|
7358
|
-
onSelectionCheckboxClicked:
|
|
7359
|
-
dataForHash:
|
|
7358
|
+
onSelectionCheckboxClicked: h,
|
|
7359
|
+
dataForHash: p,
|
|
7360
7360
|
aggregates: m,
|
|
7361
7361
|
selectedRowKeys: y = []
|
|
7362
7362
|
}) => {
|
|
7363
7363
|
const v = X(), g = c || v, b = X({}), x = X(), I = X(), w = X(e), { t: A } = he();
|
|
7364
|
-
|
|
7364
|
+
vt(() => {
|
|
7365
7365
|
var R, G;
|
|
7366
7366
|
if (w.current = e, I.current === void 0) {
|
|
7367
7367
|
I.current = e;
|
|
@@ -7411,7 +7411,7 @@ const Xu = ({
|
|
|
7411
7411
|
return { color: b.current[(M = (j = R.node) == null ? void 0 : j.data) == null ? void 0 : M.id] };
|
|
7412
7412
|
}, []), { loading: F, getColumnState: _, updateColumnState: $ } = Fs(
|
|
7413
7413
|
nf({
|
|
7414
|
-
...
|
|
7414
|
+
...p,
|
|
7415
7415
|
model: u
|
|
7416
7416
|
})
|
|
7417
7417
|
);
|
|
@@ -7431,7 +7431,7 @@ const Xu = ({
|
|
|
7431
7431
|
onChangeFirstVisibleRowIndex: f,
|
|
7432
7432
|
onGetFirstVisibleRowIndex: d,
|
|
7433
7433
|
selectedRowKeys: y,
|
|
7434
|
-
onSelectionCheckboxClicked:
|
|
7434
|
+
onSelectionCheckboxClicked: h,
|
|
7435
7435
|
totalRows: T,
|
|
7436
7436
|
footer: m && /* @__PURE__ */ i(As, { aggregates: m, isLoading: !1 }),
|
|
7437
7437
|
hasStatusColumn: o.status !== null,
|
|
@@ -7455,17 +7455,17 @@ const Xu = ({
|
|
|
7455
7455
|
P.getHandler().readAggregates
|
|
7456
7456
|
), f = yn(() => {
|
|
7457
7457
|
if (e)
|
|
7458
|
-
return e.columns.filter((
|
|
7458
|
+
return e.columns.filter((p) => Object.keys(p).some((m) => {
|
|
7459
7459
|
var y;
|
|
7460
|
-
return
|
|
7461
|
-
})).map((
|
|
7462
|
-
const m = Object.keys(
|
|
7460
|
+
return p[m] !== void 0 && ((y = p[m]) == null ? void 0 : y.length) > 0 && Wo.includes(m.slice(1));
|
|
7461
|
+
})).map((p) => {
|
|
7462
|
+
const m = Object.keys(p).filter((y) => Wo.includes(y.slice(1))).map((y) => y.slice(1));
|
|
7463
7463
|
return {
|
|
7464
|
-
[
|
|
7464
|
+
[p.id]: m
|
|
7465
7465
|
};
|
|
7466
|
-
}).flat().reduce((
|
|
7466
|
+
}).flat().reduce((p, m) => {
|
|
7467
7467
|
const y = Object.keys(m)[0];
|
|
7468
|
-
return
|
|
7468
|
+
return p[y] = m[y], p;
|
|
7469
7469
|
}, {});
|
|
7470
7470
|
}, [e == null ? void 0 : e.columns]), d = ft(async () => {
|
|
7471
7471
|
if (e)
|
|
@@ -7491,13 +7491,13 @@ const Xu = ({
|
|
|
7491
7491
|
s(void 0);
|
|
7492
7492
|
return;
|
|
7493
7493
|
}
|
|
7494
|
-
const
|
|
7494
|
+
const p = await c({
|
|
7495
7495
|
model: t,
|
|
7496
7496
|
domain: n,
|
|
7497
7497
|
aggregateFields: f
|
|
7498
7498
|
});
|
|
7499
7499
|
let m;
|
|
7500
|
-
Object.entries(
|
|
7500
|
+
Object.entries(p).forEach((y) => {
|
|
7501
7501
|
const v = y[0], g = y[1];
|
|
7502
7502
|
m || (m = {}), m[v] = Object.keys(g).map((b) => {
|
|
7503
7503
|
const x = e.columns.find((I) => I.id === v);
|
|
@@ -7508,8 +7508,8 @@ const Xu = ({
|
|
|
7508
7508
|
};
|
|
7509
7509
|
});
|
|
7510
7510
|
}), s(m);
|
|
7511
|
-
} catch (
|
|
7512
|
-
s(void 0), console.error(
|
|
7511
|
+
} catch (p) {
|
|
7512
|
+
s(void 0), console.error(p);
|
|
7513
7513
|
} finally {
|
|
7514
7514
|
l(!1);
|
|
7515
7515
|
}
|
|
@@ -7520,8 +7520,8 @@ const Xu = ({
|
|
|
7520
7520
|
u();
|
|
7521
7521
|
};
|
|
7522
7522
|
}, [f, n]);
|
|
7523
|
-
const
|
|
7524
|
-
return [a, o,
|
|
7523
|
+
const h = f !== void 0 && Object.keys(f).length > 0;
|
|
7524
|
+
return [a, o, h];
|
|
7525
7525
|
}, sf = ({
|
|
7526
7526
|
ooui: e,
|
|
7527
7527
|
items: t,
|
|
@@ -7540,8 +7540,8 @@ const Xu = ({
|
|
|
7540
7540
|
const t = X(null), { value: n, onChange: r, ooui: o, views: s } = e, { items: a = [] } = n || {}, l = qu({ one2manyItems: a }), { currentView: c, setCurrentView: u, itemIndex: f, setItemIndex: d } = re(
|
|
7541
7541
|
un
|
|
7542
7542
|
), {
|
|
7543
|
-
readOnly:
|
|
7544
|
-
relation:
|
|
7543
|
+
readOnly: h,
|
|
7544
|
+
relation: p,
|
|
7545
7545
|
context: m,
|
|
7546
7546
|
domain: y,
|
|
7547
7547
|
id: v
|
|
@@ -7562,13 +7562,13 @@ const Xu = ({
|
|
|
7562
7562
|
onSelectionCheckboxClicked: G
|
|
7563
7563
|
} = Gu({
|
|
7564
7564
|
treeView: s.get("tree"),
|
|
7565
|
-
relation:
|
|
7565
|
+
relation: p,
|
|
7566
7566
|
context: T,
|
|
7567
7567
|
allRowsIds: l.filter((fe) => fe.id !== void 0).map((fe) => fe.id),
|
|
7568
7568
|
gridRef: t
|
|
7569
7569
|
}), [, W] = sf({
|
|
7570
7570
|
ooui: O,
|
|
7571
|
-
model:
|
|
7571
|
+
model: p,
|
|
7572
7572
|
items: l,
|
|
7573
7573
|
selectedRowKeys: F
|
|
7574
7574
|
}), j = ye(() => {
|
|
@@ -7592,7 +7592,7 @@ const Xu = ({
|
|
|
7592
7592
|
items: l,
|
|
7593
7593
|
formView: s.get("form"),
|
|
7594
7594
|
treeView: s.get("tree"),
|
|
7595
|
-
relation:
|
|
7595
|
+
relation: p,
|
|
7596
7596
|
context: T,
|
|
7597
7597
|
triggerChange: k
|
|
7598
7598
|
}), {
|
|
@@ -7613,7 +7613,7 @@ const Xu = ({
|
|
|
7613
7613
|
setCurrentView: u,
|
|
7614
7614
|
setItemIndex: d,
|
|
7615
7615
|
context: T,
|
|
7616
|
-
relation:
|
|
7616
|
+
relation: p,
|
|
7617
7617
|
formView: s.get("form")
|
|
7618
7618
|
}), {
|
|
7619
7619
|
showSearchModal: z,
|
|
@@ -7627,7 +7627,7 @@ const Xu = ({
|
|
|
7627
7627
|
items: l,
|
|
7628
7628
|
views: s,
|
|
7629
7629
|
context: T,
|
|
7630
|
-
relation:
|
|
7630
|
+
relation: p
|
|
7631
7631
|
}), { showRemoveConfirm: Le } = zu({
|
|
7632
7632
|
isMany2many: M,
|
|
7633
7633
|
items: l,
|
|
@@ -7669,7 +7669,7 @@ const Xu = ({
|
|
|
7669
7669
|
{
|
|
7670
7670
|
mode: c,
|
|
7671
7671
|
title: j,
|
|
7672
|
-
readOnly:
|
|
7672
|
+
readOnly: h || !1,
|
|
7673
7673
|
isMany2Many: M,
|
|
7674
7674
|
formHasChanges: Q,
|
|
7675
7675
|
totalItems: l.length,
|
|
@@ -7691,13 +7691,13 @@ const Xu = ({
|
|
|
7691
7691
|
gridRef: t,
|
|
7692
7692
|
height: o.height,
|
|
7693
7693
|
items: l,
|
|
7694
|
-
readOnly:
|
|
7694
|
+
readOnly: h || !1,
|
|
7695
7695
|
onFetchRecords: V,
|
|
7696
7696
|
ooui: O,
|
|
7697
7697
|
context: T,
|
|
7698
7698
|
onRowDoubleClick: $e,
|
|
7699
7699
|
onRowSelectionChange: _,
|
|
7700
|
-
relation:
|
|
7700
|
+
relation: p,
|
|
7701
7701
|
onChangeFirstVisibleRowIndex: $,
|
|
7702
7702
|
onGetFirstVisibleRowIndex: R,
|
|
7703
7703
|
selectedRowKeys: F,
|
|
@@ -7716,8 +7716,8 @@ const Xu = ({
|
|
|
7716
7716
|
items: l,
|
|
7717
7717
|
formView: s.get("form"),
|
|
7718
7718
|
context: T,
|
|
7719
|
-
relation:
|
|
7720
|
-
readOnly:
|
|
7719
|
+
relation: p,
|
|
7720
|
+
readOnly: h || !1,
|
|
7721
7721
|
onChange: te
|
|
7722
7722
|
}
|
|
7723
7723
|
),
|
|
@@ -7725,7 +7725,7 @@ const Xu = ({
|
|
|
7725
7725
|
dn,
|
|
7726
7726
|
{
|
|
7727
7727
|
formView: s.get("form"),
|
|
7728
|
-
model:
|
|
7728
|
+
model: p,
|
|
7729
7729
|
id: Z == null ? void 0 : Z.id,
|
|
7730
7730
|
submitMode: "2many",
|
|
7731
7731
|
values: Z == null ? void 0 : Z.values,
|
|
@@ -7734,7 +7734,7 @@ const Xu = ({
|
|
|
7734
7734
|
onSubmitSucceed: E,
|
|
7735
7735
|
parentContext: T,
|
|
7736
7736
|
onCancel: N,
|
|
7737
|
-
readOnly:
|
|
7737
|
+
readOnly: h,
|
|
7738
7738
|
mustClearAfterSave: L,
|
|
7739
7739
|
onMustRefreshParent: () => {
|
|
7740
7740
|
I == null || I({ forceRefresh: !0 });
|
|
@@ -7745,7 +7745,7 @@ const Xu = ({
|
|
|
7745
7745
|
lo,
|
|
7746
7746
|
{
|
|
7747
7747
|
domain: C,
|
|
7748
|
-
model:
|
|
7748
|
+
model: p,
|
|
7749
7749
|
context: T,
|
|
7750
7750
|
visible: z,
|
|
7751
7751
|
onSelectValues: me,
|
|
@@ -7756,7 +7756,7 @@ const Xu = ({
|
|
|
7756
7756
|
on,
|
|
7757
7757
|
{
|
|
7758
7758
|
view_id: s.get("graph").view_id,
|
|
7759
|
-
model:
|
|
7759
|
+
model: p,
|
|
7760
7760
|
domain: [[`${o.inv_field}`, "=", b]],
|
|
7761
7761
|
context: T,
|
|
7762
7762
|
limit: 0
|
|
@@ -7771,8 +7771,8 @@ const Xu = ({
|
|
|
7771
7771
|
var w;
|
|
7772
7772
|
const { ooui: t } = e, { mode: n, relation: r, views: o, required: s, context: a } = t;
|
|
7773
7773
|
let l;
|
|
7774
|
-
const [c, u] = S(!0), [f, d] = S(), [
|
|
7775
|
-
|
|
7774
|
+
const [c, u] = S(!0), [f, d] = S(), [h, p] = S(/* @__PURE__ */ new Map()), m = re(He), { getContext: y, formView: v } = m || {}, { view_id: g } = v || {};
|
|
7775
|
+
vt(() => {
|
|
7776
7776
|
x();
|
|
7777
7777
|
}, [t]);
|
|
7778
7778
|
const b = async (A) => o && o[A] ? o[A] : await P.getHandler().getView({
|
|
@@ -7785,12 +7785,12 @@ const Xu = ({
|
|
|
7785
7785
|
if (n && n.length > 0) {
|
|
7786
7786
|
for (const A of n) {
|
|
7787
7787
|
const T = await b(A);
|
|
7788
|
-
|
|
7788
|
+
h.set(A, T);
|
|
7789
7789
|
}
|
|
7790
|
-
h
|
|
7790
|
+
p(h);
|
|
7791
7791
|
} else {
|
|
7792
7792
|
const A = await b("form"), T = await b("tree");
|
|
7793
|
-
|
|
7793
|
+
h.set("form", A), h.set("tree", T), p(h);
|
|
7794
7794
|
}
|
|
7795
7795
|
} catch (A) {
|
|
7796
7796
|
d(JSON.stringify(A));
|
|
@@ -7818,9 +7818,9 @@ const Xu = ({
|
|
|
7818
7818
|
uf,
|
|
7819
7819
|
{
|
|
7820
7820
|
ooui: t,
|
|
7821
|
-
views:
|
|
7821
|
+
views: h,
|
|
7822
7822
|
parentViewId: g,
|
|
7823
|
-
treeViewId: (w =
|
|
7823
|
+
treeViewId: (w = h.get("tree")) == null ? void 0 : w.view_id
|
|
7824
7824
|
}
|
|
7825
7825
|
)
|
|
7826
7826
|
}
|
|
@@ -7832,7 +7832,7 @@ const Xu = ({
|
|
|
7832
7832
|
const { ooui: t } = e, { required: n } = t;
|
|
7833
7833
|
return /* @__PURE__ */ i(Re, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(pf, { ooui: t }) });
|
|
7834
7834
|
}, pf = (e) => {
|
|
7835
|
-
const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = ff(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = X(), [f, d] = S(),
|
|
7835
|
+
const { ooui: t, value: n, onChange: r } = e, { id: o, readOnly: s, required: a } = t, { token: l } = ff(), c = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = X(), [f, d] = S(), h = re(He), { elementHasLostFocus: p } = h || {};
|
|
7836
7836
|
ue(() => {
|
|
7837
7837
|
d(ps(n));
|
|
7838
7838
|
}, [n]);
|
|
@@ -7843,7 +7843,7 @@ const Xu = ({
|
|
|
7843
7843
|
u.current = g.target.value, d(g.target.value);
|
|
7844
7844
|
}
|
|
7845
7845
|
async function v() {
|
|
7846
|
-
m(cu(f)), await new Promise((g) => setTimeout(g, 300)),
|
|
7846
|
+
m(cu(f)), await new Promise((g) => setTimeout(g, 300)), p == null || p();
|
|
7847
7847
|
}
|
|
7848
7848
|
return /* @__PURE__ */ i(
|
|
7849
7849
|
ct,
|
|
@@ -7860,7 +7860,7 @@ const Xu = ({
|
|
|
7860
7860
|
);
|
|
7861
7861
|
};
|
|
7862
7862
|
function _s(e) {
|
|
7863
|
-
const { ooui: t, showLabel: n = !0, responsiveBehaviour: r } = e, o =
|
|
7863
|
+
const { ooui: t, showLabel: n = !0, responsiveBehaviour: r } = e, o = mt(t.icon || "");
|
|
7864
7864
|
return /* @__PURE__ */ i(se, { children: (t.label || o) && n ? /* @__PURE__ */ i(sl, { label: t.label, icon: o, children: /* @__PURE__ */ i(
|
|
7865
7865
|
Sr,
|
|
7866
7866
|
{
|
|
@@ -7880,7 +7880,7 @@ function gf(e) {
|
|
|
7880
7880
|
const { ooui: t, responsiveBehaviour: n } = e, r = t.pages;
|
|
7881
7881
|
function o(s) {
|
|
7882
7882
|
if (s) {
|
|
7883
|
-
const a =
|
|
7883
|
+
const a = mt(s);
|
|
7884
7884
|
return a && /* @__PURE__ */ i(a, {});
|
|
7885
7885
|
}
|
|
7886
7886
|
}
|
|
@@ -7940,17 +7940,17 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
7940
7940
|
fetchValues: c,
|
|
7941
7941
|
formHasChanges: u,
|
|
7942
7942
|
elementHasLostFocus: f
|
|
7943
|
-
} = s || {}, [d,
|
|
7943
|
+
} = s || {}, [d, h] = S(!1), { t: p } = he();
|
|
7944
7944
|
return a ? /* @__PURE__ */ D(se, { children: [
|
|
7945
7945
|
/* @__PURE__ */ i(
|
|
7946
7946
|
"div",
|
|
7947
7947
|
{
|
|
7948
7948
|
onClick: () => {
|
|
7949
7949
|
if (u != null && u()) {
|
|
7950
|
-
Tt(
|
|
7950
|
+
Tt(p("saveBeforeTranslate"));
|
|
7951
7951
|
return;
|
|
7952
7952
|
}
|
|
7953
|
-
d ||
|
|
7953
|
+
d || h(!0);
|
|
7954
7954
|
},
|
|
7955
7955
|
children: /* @__PURE__ */ i(
|
|
7956
7956
|
Tr,
|
|
@@ -7981,10 +7981,10 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
7981
7981
|
field: t,
|
|
7982
7982
|
visible: d,
|
|
7983
7983
|
onCloseModal: () => {
|
|
7984
|
-
|
|
7984
|
+
h(!1);
|
|
7985
7985
|
},
|
|
7986
7986
|
onSubmitSucceed: () => {
|
|
7987
|
-
|
|
7987
|
+
h(!1), c == null || c();
|
|
7988
7988
|
}
|
|
7989
7989
|
}
|
|
7990
7990
|
)
|
|
@@ -8008,17 +8008,17 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8008
8008
|
/* @__PURE__ */ i(Ne, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ i(
|
|
8009
8009
|
tt,
|
|
8010
8010
|
{
|
|
8011
|
-
tooltip:
|
|
8011
|
+
tooltip: p("translate"),
|
|
8012
8012
|
icon: /* @__PURE__ */ i($i, {}),
|
|
8013
8013
|
onClick: async () => {
|
|
8014
|
-
u != null && u() ? Tt(
|
|
8014
|
+
u != null && u() ? Tt(p("saveBeforeTranslate")) : Tt(p("enterTextBeforeTranslate"));
|
|
8015
8015
|
},
|
|
8016
|
-
children:
|
|
8016
|
+
children: p("translate")
|
|
8017
8017
|
}
|
|
8018
8018
|
) })
|
|
8019
8019
|
] });
|
|
8020
8020
|
}, bf = (e) => {
|
|
8021
|
-
const { ooui: t } = e, { label: n, icon: r } = t, o =
|
|
8021
|
+
const { ooui: t } = e, { label: n, icon: r } = t, o = mt(r || "");
|
|
8022
8022
|
return /* @__PURE__ */ i(Ln, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ D(Xe, { children: [
|
|
8023
8023
|
o ? /* @__PURE__ */ i(o, {}) : null,
|
|
8024
8024
|
n
|
|
@@ -8082,7 +8082,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8082
8082
|
});
|
|
8083
8083
|
},
|
|
8084
8084
|
[t]
|
|
8085
|
-
),
|
|
8085
|
+
), h = B(async () => {
|
|
8086
8086
|
const v = await Tf({ model: e, context: t }), g = await Of({
|
|
8087
8087
|
predefinedExports: v,
|
|
8088
8088
|
fields: a.current,
|
|
@@ -8103,7 +8103,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8103
8103
|
})),
|
|
8104
8104
|
keysWithChilds: g
|
|
8105
8105
|
};
|
|
8106
|
-
}, [t, e, d]),
|
|
8106
|
+
}, [t, e, d]), p = B(
|
|
8107
8107
|
async (v) => {
|
|
8108
8108
|
await P.getHandler().deleteObjects({
|
|
8109
8109
|
model: "ir.exports",
|
|
@@ -8153,9 +8153,9 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8153
8153
|
onGetFields: f,
|
|
8154
8154
|
onGetFieldChilds: d,
|
|
8155
8155
|
onExport: u,
|
|
8156
|
-
onGetPredefinedExports:
|
|
8156
|
+
onGetPredefinedExports: h,
|
|
8157
8157
|
onSavePredefinedExport: y,
|
|
8158
|
-
onRemovePredefinedExport:
|
|
8158
|
+
onRemovePredefinedExport: p
|
|
8159
8159
|
};
|
|
8160
8160
|
}, Go = ({
|
|
8161
8161
|
fields: e,
|
|
@@ -8269,8 +8269,8 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8269
8269
|
} = e, {
|
|
8270
8270
|
onExport: f,
|
|
8271
8271
|
onGetFieldChilds: d,
|
|
8272
|
-
onGetFields:
|
|
8273
|
-
onGetPredefinedExports:
|
|
8272
|
+
onGetFields: h,
|
|
8273
|
+
onGetPredefinedExports: p,
|
|
8274
8274
|
onSavePredefinedExport: m,
|
|
8275
8275
|
onRemovePredefinedExport: y
|
|
8276
8276
|
} = Sf({
|
|
@@ -8290,9 +8290,9 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8290
8290
|
selectedRegistersToExport: s && s.length && s.length > 0 ? s.length : void 0,
|
|
8291
8291
|
totalRegisters: a,
|
|
8292
8292
|
onGetFieldChilds: d,
|
|
8293
|
-
onGetFields:
|
|
8293
|
+
onGetFields: h,
|
|
8294
8294
|
visibleRegisters: u,
|
|
8295
|
-
onGetPredefinedExports:
|
|
8295
|
+
onGetPredefinedExports: p,
|
|
8296
8296
|
onSavePredefinedExport: m,
|
|
8297
8297
|
onRemovePredefinedExport: y
|
|
8298
8298
|
}
|
|
@@ -8319,14 +8319,14 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8319
8319
|
const { ooui: t } = e, { required: n } = t;
|
|
8320
8320
|
return /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(kf, { ooui: t }) });
|
|
8321
8321
|
}, kf = (e) => {
|
|
8322
|
-
const { value: t, onChange: n, ooui: r } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = r, c = t == null ? void 0 : t.split(","), [u, f] = S([]), [d,
|
|
8322
|
+
const { value: t, onChange: n, ooui: r } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = r, c = t == null ? void 0 : t.split(","), [u, f] = S([]), [d, h] = S();
|
|
8323
8323
|
return ue(() => {
|
|
8324
8324
|
if (!t) {
|
|
8325
|
-
|
|
8325
|
+
h(void 0), f([]);
|
|
8326
8326
|
return;
|
|
8327
8327
|
}
|
|
8328
|
-
const
|
|
8329
|
-
f([m, void 0]), p
|
|
8328
|
+
const p = t && c && c[0], m = t && c && c[1] && parseInt(c[1]);
|
|
8329
|
+
f([m, void 0]), h(p);
|
|
8330
8330
|
}, [t]), /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, children: [
|
|
8331
8331
|
/* @__PURE__ */ i(be, { flex: "1", children: /* @__PURE__ */ i(
|
|
8332
8332
|
zi,
|
|
@@ -8337,11 +8337,11 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8337
8337
|
readonly: a,
|
|
8338
8338
|
required: o
|
|
8339
8339
|
}),
|
|
8340
|
-
onChange: (
|
|
8341
|
-
p
|
|
8340
|
+
onChange: (p) => {
|
|
8341
|
+
h(p);
|
|
8342
8342
|
let m = u[0] || 0;
|
|
8343
|
-
|
|
8344
|
-
const y = `${
|
|
8343
|
+
p !== d && (f([]), m = 0);
|
|
8344
|
+
const y = `${p},${m}`;
|
|
8345
8345
|
y !== t && (n == null || n(y));
|
|
8346
8346
|
},
|
|
8347
8347
|
value: d
|
|
@@ -8358,9 +8358,9 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8358
8358
|
domain: l
|
|
8359
8359
|
}),
|
|
8360
8360
|
value: u,
|
|
8361
|
-
onChange: (
|
|
8362
|
-
f(
|
|
8363
|
-
const m = `${d},${
|
|
8361
|
+
onChange: (p) => {
|
|
8362
|
+
f(p);
|
|
8363
|
+
const m = `${d},${p[0] || 0}`;
|
|
8364
8364
|
m !== t && (n == null || n(m));
|
|
8365
8365
|
}
|
|
8366
8366
|
}
|
|
@@ -8370,7 +8370,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8370
8370
|
const { ooui: t } = e, { required: n } = t;
|
|
8371
8371
|
return /* @__PURE__ */ i(Re, { required: n, ...e, children: /* @__PURE__ */ i(Mf, { ooui: t }) });
|
|
8372
8372
|
}, Mf = (e) => {
|
|
8373
|
-
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = $f(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = X(null), { setFieldValue: f, getFieldValue: d } = re(He) || {}, { t:
|
|
8373
|
+
const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = $f(), c = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = X(null), { setFieldValue: f, getFieldValue: d } = re(He) || {}, { t: h } = he(), p = n ? pc(n) : "", m = (x) => {
|
|
8374
8374
|
r == null || r(x);
|
|
8375
8375
|
};
|
|
8376
8376
|
async function y() {
|
|
@@ -8407,7 +8407,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8407
8407
|
type: "text",
|
|
8408
8408
|
disabled: !0,
|
|
8409
8409
|
style: c,
|
|
8410
|
-
value:
|
|
8410
|
+
value: p
|
|
8411
8411
|
}
|
|
8412
8412
|
)
|
|
8413
8413
|
] }),
|
|
@@ -8423,11 +8423,11 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8423
8423
|
children: "Select"
|
|
8424
8424
|
}
|
|
8425
8425
|
),
|
|
8426
|
-
/* @__PURE__ */ i(je, { icon: /* @__PURE__ */ i(za, {}), disabled: !n, onClick: v, children:
|
|
8426
|
+
/* @__PURE__ */ i(je, { icon: /* @__PURE__ */ i(za, {}), disabled: !n, onClick: v, children: h("open") }),
|
|
8427
8427
|
/* @__PURE__ */ i(
|
|
8428
8428
|
tt,
|
|
8429
8429
|
{
|
|
8430
|
-
tooltip:
|
|
8430
|
+
tooltip: h("download"),
|
|
8431
8431
|
disabled: !n,
|
|
8432
8432
|
onClick: y,
|
|
8433
8433
|
icon: /* @__PURE__ */ i(Ur, {})
|
|
@@ -8436,7 +8436,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8436
8436
|
/* @__PURE__ */ i(
|
|
8437
8437
|
tt,
|
|
8438
8438
|
{
|
|
8439
|
-
tooltip:
|
|
8439
|
+
tooltip: h("clear"),
|
|
8440
8440
|
disabled: o || !n,
|
|
8441
8441
|
onClick: b,
|
|
8442
8442
|
icon: /* @__PURE__ */ i(Hn, {})
|
|
@@ -8464,11 +8464,11 @@ function co(e) {
|
|
|
8464
8464
|
} = e, { t: l } = he(), c = ye(() => [
|
|
8465
8465
|
{
|
|
8466
8466
|
label: l("viewAs"),
|
|
8467
|
-
items: n.map((d,
|
|
8468
|
-
const
|
|
8467
|
+
items: n.map((d, h) => {
|
|
8468
|
+
const p = d.type.charAt(0).toUpperCase() + d.type.slice(1);
|
|
8469
8469
|
return {
|
|
8470
|
-
id: d.view_id ||
|
|
8471
|
-
name: d.title ||
|
|
8470
|
+
id: d.view_id || h,
|
|
8471
|
+
name: d.title || p,
|
|
8472
8472
|
icon: Ko(d),
|
|
8473
8473
|
selected: t.view_id === d.view_id
|
|
8474
8474
|
};
|
|
@@ -8489,10 +8489,10 @@ function co(e) {
|
|
|
8489
8489
|
}
|
|
8490
8490
|
function f(d) {
|
|
8491
8491
|
u(() => {
|
|
8492
|
-
const
|
|
8493
|
-
(
|
|
8492
|
+
const h = n.find(
|
|
8493
|
+
(p) => p.view_id === parseInt(d.id)
|
|
8494
8494
|
);
|
|
8495
|
-
r(
|
|
8495
|
+
r(h);
|
|
8496
8496
|
});
|
|
8497
8497
|
}
|
|
8498
8498
|
return /* @__PURE__ */ D("div", { style: { display: "flex" }, children: [
|
|
@@ -8553,7 +8553,7 @@ function et(e) {
|
|
|
8553
8553
|
onClick: t,
|
|
8554
8554
|
disabled: n,
|
|
8555
8555
|
children: [
|
|
8556
|
-
r ? /* @__PURE__ */ i(
|
|
8556
|
+
r ? /* @__PURE__ */ i(yt, {}) : s,
|
|
8557
8557
|
a
|
|
8558
8558
|
]
|
|
8559
8559
|
}
|
|
@@ -8628,13 +8628,13 @@ const Lf = (e) => {
|
|
|
8628
8628
|
onRetrieveData: async () => [
|
|
8629
8629
|
{
|
|
8630
8630
|
items: n.map((d) => {
|
|
8631
|
-
const
|
|
8631
|
+
const h = d.link ? To : Ur, p = /* @__PURE__ */ D(Ne, { wrap: !1, align: "middle", gutter: 8, children: [
|
|
8632
8632
|
/* @__PURE__ */ i(be, { style: { textAlign: "center" }, children: (d.datas_fname || d.link) && /* @__PURE__ */ i(
|
|
8633
8633
|
At,
|
|
8634
8634
|
{
|
|
8635
8635
|
title: d.link ? c("openAttachmentLink") : c("download"),
|
|
8636
8636
|
children: /* @__PURE__ */ i(
|
|
8637
|
-
|
|
8637
|
+
h,
|
|
8638
8638
|
{
|
|
8639
8639
|
style: { cursor: "pointer" },
|
|
8640
8640
|
onClick: () => {
|
|
@@ -8660,7 +8660,7 @@ const Lf = (e) => {
|
|
|
8660
8660
|
id: d.id,
|
|
8661
8661
|
name: d.name,
|
|
8662
8662
|
disableClick: !0,
|
|
8663
|
-
right:
|
|
8663
|
+
right: p
|
|
8664
8664
|
};
|
|
8665
8665
|
})
|
|
8666
8666
|
}
|
|
@@ -8712,7 +8712,7 @@ function jf(e) {
|
|
|
8712
8712
|
onAddNewAttachment: r,
|
|
8713
8713
|
onListAllAttachments: o,
|
|
8714
8714
|
onViewAttachmentDetails: s
|
|
8715
|
-
} = e, { formRef: a } = re(lt), [l, c] = S(!1), [u, f] = S([]), [d,
|
|
8715
|
+
} = e, { formRef: a } = re(lt), [l, c] = S(!1), [u, f] = S([]), [d, h] = S(!1), { t: p } = he(), m = B(async () => {
|
|
8716
8716
|
if (!(!t || t.length === 0)) {
|
|
8717
8717
|
c(!0);
|
|
8718
8718
|
try {
|
|
@@ -8741,7 +8741,7 @@ function jf(e) {
|
|
|
8741
8741
|
window.open(g.link);
|
|
8742
8742
|
return;
|
|
8743
8743
|
}
|
|
8744
|
-
|
|
8744
|
+
h(!0);
|
|
8745
8745
|
let b;
|
|
8746
8746
|
try {
|
|
8747
8747
|
b = (await P.getHandler().readObjects({
|
|
@@ -8752,7 +8752,7 @@ function jf(e) {
|
|
|
8752
8752
|
} catch (x) {
|
|
8753
8753
|
it(x);
|
|
8754
8754
|
}
|
|
8755
|
-
if (
|
|
8755
|
+
if (h(!1), !!b)
|
|
8756
8756
|
if (b.datas) {
|
|
8757
8757
|
const x = await Xt(b.datas);
|
|
8758
8758
|
Yn(b.datas, x.mime);
|
|
@@ -8785,7 +8785,7 @@ function jf(e) {
|
|
|
8785
8785
|
/* @__PURE__ */ i(
|
|
8786
8786
|
at,
|
|
8787
8787
|
{
|
|
8788
|
-
title:
|
|
8788
|
+
title: p("downloadingAttachment"),
|
|
8789
8789
|
open: d,
|
|
8790
8790
|
footer: null,
|
|
8791
8791
|
closable: !1,
|
|
@@ -8836,7 +8836,7 @@ const Bf = () => {
|
|
|
8836
8836
|
o == null || o(v), r == null || r(g);
|
|
8837
8837
|
},
|
|
8838
8838
|
[o, r]
|
|
8839
|
-
),
|
|
8839
|
+
), h = B(
|
|
8840
8840
|
async (v) => {
|
|
8841
8841
|
var w, A;
|
|
8842
8842
|
if (!s)
|
|
@@ -8861,7 +8861,7 @@ const Bf = () => {
|
|
|
8861
8861
|
}
|
|
8862
8862
|
},
|
|
8863
8863
|
[s, n, t, f, d]
|
|
8864
|
-
),
|
|
8864
|
+
), p = B(
|
|
8865
8865
|
(v) => {
|
|
8866
8866
|
if (!s || s.length === 0)
|
|
8867
8867
|
return;
|
|
@@ -8870,10 +8870,10 @@ const Bf = () => {
|
|
|
8870
8870
|
},
|
|
8871
8871
|
[s, n, d]
|
|
8872
8872
|
), m = B(() => {
|
|
8873
|
-
e ?
|
|
8874
|
-
}, [e,
|
|
8875
|
-
e ?
|
|
8876
|
-
}, [e,
|
|
8873
|
+
e ? h("next") : p("next");
|
|
8874
|
+
}, [e, h, p]), y = B(() => {
|
|
8875
|
+
e ? h("previous") : p("previous");
|
|
8876
|
+
}, [e, h, p]);
|
|
8877
8877
|
return {
|
|
8878
8878
|
onNextClick: m,
|
|
8879
8879
|
onPreviousClick: y
|
|
@@ -8891,8 +8891,8 @@ function Hf({ toolbar: e }) {
|
|
|
8891
8891
|
onFormSave: u,
|
|
8892
8892
|
formHasChanges: f,
|
|
8893
8893
|
formIsSaving: d,
|
|
8894
|
-
currentId:
|
|
8895
|
-
results:
|
|
8894
|
+
currentId: h,
|
|
8895
|
+
results: p,
|
|
8896
8896
|
setCurrentItemIndex: m,
|
|
8897
8897
|
currentItemIndex: y,
|
|
8898
8898
|
setCurrentId: v,
|
|
@@ -8919,11 +8919,11 @@ function Hf({ toolbar: e }) {
|
|
|
8919
8919
|
try {
|
|
8920
8920
|
b == null || b(!0), await P.getHandler().deleteObjects({
|
|
8921
8921
|
model: g,
|
|
8922
|
-
ids: [
|
|
8922
|
+
ids: [h],
|
|
8923
8923
|
context: O.current.getContext()
|
|
8924
8924
|
});
|
|
8925
|
-
const H =
|
|
8926
|
-
(Z) => Z.id !==
|
|
8925
|
+
const H = p == null ? void 0 : p.filter(
|
|
8926
|
+
(Z) => Z.id !== h
|
|
8927
8927
|
);
|
|
8928
8928
|
A == null || A(H);
|
|
8929
8929
|
const oe = Math.max(0, (y || 0) - 1);
|
|
@@ -8934,11 +8934,11 @@ function Hf({ toolbar: e }) {
|
|
|
8934
8934
|
b == null || b(!1);
|
|
8935
8935
|
}
|
|
8936
8936
|
}, [
|
|
8937
|
-
|
|
8937
|
+
h,
|
|
8938
8938
|
y,
|
|
8939
8939
|
g,
|
|
8940
8940
|
O,
|
|
8941
|
-
|
|
8941
|
+
p,
|
|
8942
8942
|
v,
|
|
8943
8943
|
m,
|
|
8944
8944
|
b,
|
|
@@ -8947,7 +8947,7 @@ function Hf({ toolbar: e }) {
|
|
|
8947
8947
|
try {
|
|
8948
8948
|
w == null || w(!0);
|
|
8949
8949
|
const H = await P.getHandler().duplicate({
|
|
8950
|
-
id:
|
|
8950
|
+
id: h,
|
|
8951
8951
|
model: g,
|
|
8952
8952
|
context: O.current.getContext()
|
|
8953
8953
|
});
|
|
@@ -8957,7 +8957,7 @@ function Hf({ toolbar: e }) {
|
|
|
8957
8957
|
} finally {
|
|
8958
8958
|
w == null || w(!1);
|
|
8959
8959
|
}
|
|
8960
|
-
}, [
|
|
8960
|
+
}, [h, g, O, $, w]), ce = B(
|
|
8961
8961
|
(H) => {
|
|
8962
8962
|
G == null || G({
|
|
8963
8963
|
actionData: H,
|
|
@@ -9013,7 +9013,7 @@ function Hf({ toolbar: e }) {
|
|
|
9013
9013
|
{
|
|
9014
9014
|
icon: /* @__PURE__ */ i(zr, {}),
|
|
9015
9015
|
tooltip: r("duplicate"),
|
|
9016
|
-
disabled: f || M ||
|
|
9016
|
+
disabled: f || M || h === void 0,
|
|
9017
9017
|
loading: I,
|
|
9018
9018
|
onClick: () => Ft({
|
|
9019
9019
|
confirmMessage: r("confirmDuplicate"),
|
|
@@ -9027,7 +9027,7 @@ function Hf({ toolbar: e }) {
|
|
|
9027
9027
|
{
|
|
9028
9028
|
icon: /* @__PURE__ */ i(qr, {}),
|
|
9029
9029
|
tooltip: r("delete"),
|
|
9030
|
-
disabled: M ||
|
|
9030
|
+
disabled: M || h === void 0,
|
|
9031
9031
|
loading: x,
|
|
9032
9032
|
onClick: () => Ft({
|
|
9033
9033
|
confirmMessage: r("confirmRemoveItem"),
|
|
@@ -9042,8 +9042,8 @@ function Hf({ toolbar: e }) {
|
|
|
9042
9042
|
{
|
|
9043
9043
|
icon: /* @__PURE__ */ i(Li, {}),
|
|
9044
9044
|
tooltip: r("showLogs"),
|
|
9045
|
-
disabled: M ||
|
|
9046
|
-
onClick: () => Es(g,
|
|
9045
|
+
disabled: M || h === void 0,
|
|
9046
|
+
onClick: () => Es(g, h, r)
|
|
9047
9047
|
}
|
|
9048
9048
|
),
|
|
9049
9049
|
/* @__PURE__ */ i(
|
|
@@ -9051,7 +9051,7 @@ function Hf({ toolbar: e }) {
|
|
|
9051
9051
|
{
|
|
9052
9052
|
icon: /* @__PURE__ */ i(Gn, {}),
|
|
9053
9053
|
tooltip: r("refresh"),
|
|
9054
|
-
disabled: M ||
|
|
9054
|
+
disabled: M || h === void 0,
|
|
9055
9055
|
onClick: () => k(() => O.current.fetchValues())
|
|
9056
9056
|
}
|
|
9057
9057
|
),
|
|
@@ -9198,15 +9198,15 @@ const jt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), Bt
|
|
|
9198
9198
|
values: { selection_associated_object: `${e},${t}` },
|
|
9199
9199
|
forced_values: { res_model: e, res_id: t }
|
|
9200
9200
|
}), { useToken: Uf } = Ge, Ps = (e) => {
|
|
9201
|
-
const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = Uf(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = re(He), { elementHasLostFocus:
|
|
9201
|
+
const { ooui: t, value: n, onChange: r, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: c } = t, { token: u } = Uf(), f = c && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, d = re(He), { elementHasLostFocus: h } = d || {}, [p, m] = S(!1), [y, v] = S(!1);
|
|
9202
9202
|
ue(() => {
|
|
9203
|
-
l && !
|
|
9204
|
-
}, [
|
|
9203
|
+
l && !p && v(!1), !n && !l && (m(!0), v(!0));
|
|
9204
|
+
}, [p, l]);
|
|
9205
9205
|
const g = (b) => {
|
|
9206
9206
|
r == null || r(b.target.value);
|
|
9207
9207
|
};
|
|
9208
9208
|
return /* @__PURE__ */ D(Ne, { gutter: 8, wrap: !1, align: "middle", children: [
|
|
9209
|
-
l ? null : /* @__PURE__ */ i(be, { flex: "none", children:
|
|
9209
|
+
l ? null : /* @__PURE__ */ i(be, { flex: "none", children: p ? /* @__PURE__ */ i(
|
|
9210
9210
|
je,
|
|
9211
9211
|
{
|
|
9212
9212
|
icon: /* @__PURE__ */ i(Bn, {}),
|
|
@@ -9239,7 +9239,7 @@ const jt = () => /* @__PURE__ */ i("div", { className: "inline-block w-2" }), Bt
|
|
|
9239
9239
|
onChange: g,
|
|
9240
9240
|
value: n,
|
|
9241
9241
|
onBlur: () => {
|
|
9242
|
-
o(n) && (m(!1), v(!1),
|
|
9242
|
+
o(n) && (m(!1), v(!1), h == null || h());
|
|
9243
9243
|
}
|
|
9244
9244
|
}
|
|
9245
9245
|
) : /* @__PURE__ */ i(
|
|
@@ -9454,7 +9454,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9454
9454
|
totalItems: c,
|
|
9455
9455
|
selectedRowItems: u,
|
|
9456
9456
|
isInfiniteTree: f
|
|
9457
|
-
} = re(lt), { t: d } = he(), { token:
|
|
9457
|
+
} = re(lt), { t: d } = he(), { token: h } = zf(), p = ye(() => {
|
|
9458
9458
|
if (!n)
|
|
9459
9459
|
return null;
|
|
9460
9460
|
if ((o == null ? void 0 : o.type) === "form" && s) {
|
|
@@ -9529,15 +9529,15 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9529
9529
|
className: "shadow-md",
|
|
9530
9530
|
style: {
|
|
9531
9531
|
padding: "1em",
|
|
9532
|
-
borderRadius:
|
|
9533
|
-
backgroundColor:
|
|
9532
|
+
borderRadius: h.borderRadius,
|
|
9533
|
+
backgroundColor: h.colorPrimaryBg,
|
|
9534
9534
|
minHeight: "82px"
|
|
9535
9535
|
},
|
|
9536
9536
|
align: "middle",
|
|
9537
9537
|
children: [
|
|
9538
9538
|
/* @__PURE__ */ D(be, { flex: 2, children: [
|
|
9539
9539
|
/* @__PURE__ */ i(Jf, { level: 3, style: { marginBottom: 0 }, children: e || r }),
|
|
9540
|
-
|
|
9540
|
+
p
|
|
9541
9541
|
] }),
|
|
9542
9542
|
/* @__PURE__ */ i(be, { flex: 3, children: /* @__PURE__ */ i(Ne, { justify: "end", children: t }) })
|
|
9543
9543
|
]
|
|
@@ -9551,8 +9551,8 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9551
9551
|
), {
|
|
9552
9552
|
setResults: f = void 0,
|
|
9553
9553
|
setCurrentItemIndex: d = void 0,
|
|
9554
|
-
currentId:
|
|
9555
|
-
results:
|
|
9554
|
+
currentId: h = void 0,
|
|
9555
|
+
results: p = void 0,
|
|
9556
9556
|
setSelectedRowItems: m = void 0,
|
|
9557
9557
|
setSearchParams: y = void 0,
|
|
9558
9558
|
searchVisible: v = !0,
|
|
@@ -9591,9 +9591,9 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9591
9591
|
setSorter: x,
|
|
9592
9592
|
setCurrentItemIndex: d,
|
|
9593
9593
|
setResultsActionView: f,
|
|
9594
|
-
resultsActionView:
|
|
9594
|
+
resultsActionView: p,
|
|
9595
9595
|
domain: s,
|
|
9596
|
-
currentId:
|
|
9596
|
+
currentId: h,
|
|
9597
9597
|
setActionViewTotalItems: I,
|
|
9598
9598
|
limit: T,
|
|
9599
9599
|
setLimit: C
|
|
@@ -9637,7 +9637,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9637
9637
|
context: o,
|
|
9638
9638
|
domain: Zt(O || [], s),
|
|
9639
9639
|
limit: $ ? T : void 0,
|
|
9640
|
-
manualIds: $ ?
|
|
9640
|
+
manualIds: $ ? p == null ? void 0 : p.map((Q) => Q.id) : void 0
|
|
9641
9641
|
}
|
|
9642
9642
|
)
|
|
9643
9643
|
] });
|
|
@@ -9654,7 +9654,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9654
9654
|
forcedValues: u,
|
|
9655
9655
|
results: f,
|
|
9656
9656
|
setResults: d,
|
|
9657
|
-
setCurrentItemIndex:
|
|
9657
|
+
setCurrentItemIndex: h
|
|
9658
9658
|
} = e;
|
|
9659
9659
|
return t ? /* @__PURE__ */ D(se, { children: [
|
|
9660
9660
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(Hf, { toolbar: a == null ? void 0 : a.toolbar }) }),
|
|
@@ -9670,8 +9670,8 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9670
9670
|
actionDomain: s,
|
|
9671
9671
|
id: o,
|
|
9672
9672
|
parentContext: l,
|
|
9673
|
-
onSubmitSucceed: (
|
|
9674
|
-
f.findIndex((v) => v.id ===
|
|
9673
|
+
onSubmitSucceed: (p, m) => {
|
|
9674
|
+
f.findIndex((v) => v.id === p) === -1 && (f.push(m), d(f), h(f.length - 1));
|
|
9675
9675
|
}
|
|
9676
9676
|
}
|
|
9677
9677
|
)
|
|
@@ -9732,8 +9732,8 @@ function em(e) {
|
|
|
9732
9732
|
currentModel: u,
|
|
9733
9733
|
searchTreeRef: f,
|
|
9734
9734
|
setCurrentId: d,
|
|
9735
|
-
setCurrentItemIndex:
|
|
9736
|
-
searchParams:
|
|
9735
|
+
setCurrentItemIndex: h,
|
|
9736
|
+
searchParams: p,
|
|
9737
9737
|
searchVisible: m,
|
|
9738
9738
|
setSearchVisible: y,
|
|
9739
9739
|
setSearchTreeNameSearch: v,
|
|
@@ -9801,7 +9801,7 @@ function em(e) {
|
|
|
9801
9801
|
model: u,
|
|
9802
9802
|
ids: o.map((E) => E.id),
|
|
9803
9803
|
context: { ...V }
|
|
9804
|
-
}), d == null || d(void 0),
|
|
9804
|
+
}), d == null || d(void 0), h == null || h(void 0), (N = f == null ? void 0 : f.current) == null || N.refreshResults();
|
|
9805
9805
|
} catch (E) {
|
|
9806
9806
|
it(E);
|
|
9807
9807
|
} finally {
|
|
@@ -9876,7 +9876,7 @@ function em(e) {
|
|
|
9876
9876
|
y == null || y(!m);
|
|
9877
9877
|
},
|
|
9878
9878
|
disabled: l || a || b,
|
|
9879
|
-
badgeNumber:
|
|
9879
|
+
badgeNumber: p == null ? void 0 : p.length
|
|
9880
9880
|
}
|
|
9881
9881
|
),
|
|
9882
9882
|
Vt(),
|
|
@@ -10053,7 +10053,7 @@ function em(e) {
|
|
|
10053
10053
|
model: u,
|
|
10054
10054
|
domain: Zt(
|
|
10055
10055
|
((L = f == null ? void 0 : f.current) == null ? void 0 : L.getDomain()) || [],
|
|
10056
|
-
|
|
10056
|
+
p || []
|
|
10057
10057
|
),
|
|
10058
10058
|
limit: A,
|
|
10059
10059
|
totalRegisters: T || 0,
|
|
@@ -10077,22 +10077,22 @@ const tm = ({
|
|
|
10077
10077
|
const [o, s] = S(!0), [a, l] = S(), [c, u] = S(), [f, d] = Je(
|
|
10078
10078
|
P.getHandler().getView
|
|
10079
10079
|
);
|
|
10080
|
-
|
|
10080
|
+
vt(() => (h(), () => {
|
|
10081
10081
|
d();
|
|
10082
10082
|
}), [r, t, e, n]);
|
|
10083
|
-
const
|
|
10083
|
+
const h = B(async () => {
|
|
10084
10084
|
s(!0);
|
|
10085
10085
|
try {
|
|
10086
|
-
const
|
|
10087
|
-
t ||
|
|
10086
|
+
const p = [];
|
|
10087
|
+
t || p.push(
|
|
10088
10088
|
f({ model: e, type: "form", context: r })
|
|
10089
|
-
), n ||
|
|
10089
|
+
), n || p.push(
|
|
10090
10090
|
f({ model: e, type: "tree", context: r })
|
|
10091
10091
|
);
|
|
10092
|
-
const m = await Promise.all(
|
|
10092
|
+
const m = await Promise.all(p), y = 0, v = t ? 0 : 1;
|
|
10093
10093
|
u(t || m[y]), l(n || m[v]);
|
|
10094
|
-
} catch (
|
|
10095
|
-
console.error("Error fetching view data:",
|
|
10094
|
+
} catch (p) {
|
|
10095
|
+
console.error("Error fetching view data:", p), Nt(p);
|
|
10096
10096
|
} finally {
|
|
10097
10097
|
s(!1);
|
|
10098
10098
|
}
|
|
@@ -10169,13 +10169,13 @@ const tm = ({
|
|
|
10169
10169
|
footer: o
|
|
10170
10170
|
}) => {
|
|
10171
10171
|
const [s, a] = S(e), l = X(null), { token: c } = sm(), u = B(
|
|
10172
|
-
(
|
|
10173
|
-
|
|
10172
|
+
(p) => {
|
|
10173
|
+
p.preventDefault(), p.stopPropagation(), t();
|
|
10174
10174
|
},
|
|
10175
10175
|
[t]
|
|
10176
10176
|
), f = B(
|
|
10177
|
-
(
|
|
10178
|
-
|
|
10177
|
+
(p) => {
|
|
10178
|
+
p.key === "Escape" && t();
|
|
10179
10179
|
},
|
|
10180
10180
|
[t]
|
|
10181
10181
|
);
|
|
@@ -10187,7 +10187,7 @@ const tm = ({
|
|
|
10187
10187
|
};
|
|
10188
10188
|
if (!s)
|
|
10189
10189
|
return null;
|
|
10190
|
-
const
|
|
10190
|
+
const h = {
|
|
10191
10191
|
height: "64px",
|
|
10192
10192
|
// Fixed height for header and footer
|
|
10193
10193
|
display: "flex",
|
|
@@ -10239,7 +10239,7 @@ const tm = ({
|
|
|
10239
10239
|
flexDirection: "column"
|
|
10240
10240
|
},
|
|
10241
10241
|
children: [
|
|
10242
|
-
/* @__PURE__ */ D(lm, { style:
|
|
10242
|
+
/* @__PURE__ */ D(lm, { style: h, children: [
|
|
10243
10243
|
/* @__PURE__ */ i(am, { level: 3, style: { margin: 0, flex: 1 }, children: r }),
|
|
10244
10244
|
/* @__PURE__ */ i(
|
|
10245
10245
|
je,
|
|
@@ -10265,7 +10265,7 @@ const tm = ({
|
|
|
10265
10265
|
dm,
|
|
10266
10266
|
{
|
|
10267
10267
|
style: {
|
|
10268
|
-
...
|
|
10268
|
+
...h,
|
|
10269
10269
|
borderTop: "1px solid #f0f0f0",
|
|
10270
10270
|
borderBottom: "none",
|
|
10271
10271
|
height: "72px"
|
|
@@ -10286,16 +10286,16 @@ var fm = "Expected a function", zo = 0 / 0, mm = "[object Symbol]", pm = /^\s+|\
|
|
|
10286
10286
|
return Sm.Date.now();
|
|
10287
10287
|
};
|
|
10288
10288
|
function Om(e, t, n) {
|
|
10289
|
-
var r, o, s, a, l, c, u = 0, f = !1, d = !1,
|
|
10289
|
+
var r, o, s, a, l, c, u = 0, f = !1, d = !1, h = !0;
|
|
10290
10290
|
if (typeof e != "function")
|
|
10291
10291
|
throw new TypeError(fm);
|
|
10292
|
-
t = Jo(t) || 0, Fr(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? Tm(Jo(n.maxWait) || 0, t) : s,
|
|
10293
|
-
function
|
|
10292
|
+
t = Jo(t) || 0, Fr(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? Tm(Jo(n.maxWait) || 0, t) : s, h = "trailing" in n ? !!n.trailing : h);
|
|
10293
|
+
function p(A) {
|
|
10294
10294
|
var T = r, C = o;
|
|
10295
10295
|
return r = o = void 0, u = A, a = e.apply(C, T), a;
|
|
10296
10296
|
}
|
|
10297
10297
|
function m(A) {
|
|
10298
|
-
return u = A, l = setTimeout(g, t), f ?
|
|
10298
|
+
return u = A, l = setTimeout(g, t), f ? p(A) : a;
|
|
10299
10299
|
}
|
|
10300
10300
|
function y(A) {
|
|
10301
10301
|
var T = A - c, C = A - u, O = t - T;
|
|
@@ -10312,7 +10312,7 @@ function Om(e, t, n) {
|
|
|
10312
10312
|
l = setTimeout(g, y(A));
|
|
10313
10313
|
}
|
|
10314
10314
|
function b(A) {
|
|
10315
|
-
return l = void 0,
|
|
10315
|
+
return l = void 0, h && r ? p(A) : (r = o = void 0, a);
|
|
10316
10316
|
}
|
|
10317
10317
|
function x() {
|
|
10318
10318
|
l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
|
|
@@ -10326,7 +10326,7 @@ function Om(e, t, n) {
|
|
|
10326
10326
|
if (l === void 0)
|
|
10327
10327
|
return m(c);
|
|
10328
10328
|
if (d)
|
|
10329
|
-
return l = setTimeout(g, t),
|
|
10329
|
+
return l = setTimeout(g, t), p(c);
|
|
10330
10330
|
}
|
|
10331
10331
|
return l === void 0 && (l = setTimeout(g, t)), a;
|
|
10332
10332
|
}
|
|
@@ -10378,9 +10378,9 @@ function Vm() {
|
|
|
10378
10378
|
"isPrototypeOf",
|
|
10379
10379
|
"propertyIsEnumerable",
|
|
10380
10380
|
"constructor"
|
|
10381
|
-
], c = function(
|
|
10382
|
-
var
|
|
10383
|
-
return
|
|
10381
|
+
], c = function(h) {
|
|
10382
|
+
var p = h.constructor;
|
|
10383
|
+
return p && p.prototype === h;
|
|
10384
10384
|
}, u = {
|
|
10385
10385
|
$applicationCache: !0,
|
|
10386
10386
|
$console: !0,
|
|
@@ -10408,11 +10408,11 @@ function Vm() {
|
|
|
10408
10408
|
}, f = function() {
|
|
10409
10409
|
if (typeof window > "u")
|
|
10410
10410
|
return !1;
|
|
10411
|
-
for (var
|
|
10411
|
+
for (var h in window)
|
|
10412
10412
|
try {
|
|
10413
|
-
if (!u["$" +
|
|
10413
|
+
if (!u["$" + h] && t.call(window, h) && window[h] !== null && typeof window[h] == "object")
|
|
10414
10414
|
try {
|
|
10415
|
-
c(window[
|
|
10415
|
+
c(window[h]);
|
|
10416
10416
|
} catch {
|
|
10417
10417
|
return !0;
|
|
10418
10418
|
}
|
|
@@ -10420,32 +10420,32 @@ function Vm() {
|
|
|
10420
10420
|
return !0;
|
|
10421
10421
|
}
|
|
10422
10422
|
return !1;
|
|
10423
|
-
}(), d = function(
|
|
10423
|
+
}(), d = function(h) {
|
|
10424
10424
|
if (typeof window > "u" || !f)
|
|
10425
|
-
return c(
|
|
10425
|
+
return c(h);
|
|
10426
10426
|
try {
|
|
10427
|
-
return c(
|
|
10427
|
+
return c(h);
|
|
10428
10428
|
} catch {
|
|
10429
10429
|
return !1;
|
|
10430
10430
|
}
|
|
10431
10431
|
};
|
|
10432
|
-
e = function(
|
|
10433
|
-
var m =
|
|
10432
|
+
e = function(p) {
|
|
10433
|
+
var m = p !== null && typeof p == "object", y = n.call(p) === "[object Function]", v = r(p), g = m && n.call(p) === "[object String]", b = [];
|
|
10434
10434
|
if (!m && !y && !v)
|
|
10435
10435
|
throw new TypeError("Object.keys called on a non-object");
|
|
10436
10436
|
var x = a && y;
|
|
10437
|
-
if (g &&
|
|
10438
|
-
for (var I = 0; I <
|
|
10437
|
+
if (g && p.length > 0 && !t.call(p, 0))
|
|
10438
|
+
for (var I = 0; I < p.length; ++I)
|
|
10439
10439
|
b.push(String(I));
|
|
10440
|
-
if (v &&
|
|
10441
|
-
for (var w = 0; w <
|
|
10440
|
+
if (v && p.length > 0)
|
|
10441
|
+
for (var w = 0; w < p.length; ++w)
|
|
10442
10442
|
b.push(String(w));
|
|
10443
10443
|
else
|
|
10444
|
-
for (var A in
|
|
10445
|
-
!(x && A === "prototype") && t.call(
|
|
10444
|
+
for (var A in p)
|
|
10445
|
+
!(x && A === "prototype") && t.call(p, A) && b.push(String(A));
|
|
10446
10446
|
if (s)
|
|
10447
|
-
for (var T = d(
|
|
10448
|
-
!(T && l[C] === "constructor") && t.call(
|
|
10447
|
+
for (var T = d(p), C = 0; C < l.length; ++C)
|
|
10448
|
+
!(T && l[C] === "constructor") && t.call(p, l[C]) && b.push(l[C]);
|
|
10449
10449
|
return b;
|
|
10450
10450
|
};
|
|
10451
10451
|
}
|
|
@@ -10727,22 +10727,22 @@ var zm = function e(t) {
|
|
|
10727
10727
|
var r = tp(t), o = r.length > 0 ? r[0] : "", s = np("%" + o + "%", n), a = s.name, l = s.value, c = !1, u = s.alias;
|
|
10728
10728
|
u && (o = u[0], Xm(r, Jm([0, 1], u)));
|
|
10729
10729
|
for (var f = 1, d = !0; f < r.length; f += 1) {
|
|
10730
|
-
var
|
|
10731
|
-
if ((
|
|
10730
|
+
var h = r[f], p = Mn(h, 0, 1), m = Mn(h, -1);
|
|
10731
|
+
if ((p === '"' || p === "'" || p === "`" || m === '"' || m === "'" || m === "`") && p !== m)
|
|
10732
10732
|
throw new en("property names with quotes must have matching quotes");
|
|
10733
|
-
if ((
|
|
10733
|
+
if ((h === "constructor" || !d) && (c = !0), o += "." + h, a = "%" + o + "%", Nn(kt, a))
|
|
10734
10734
|
l = kt[a];
|
|
10735
10735
|
else if (l != null) {
|
|
10736
|
-
if (!(
|
|
10736
|
+
if (!(h in l)) {
|
|
10737
10737
|
if (!n)
|
|
10738
10738
|
throw new zt("base intrinsic for " + t + " exists, but the property is not available.");
|
|
10739
10739
|
return;
|
|
10740
10740
|
}
|
|
10741
10741
|
if (Pt && f + 1 >= r.length) {
|
|
10742
|
-
var y = Pt(l,
|
|
10743
|
-
d = !!y, d && "get" in y && !("originalValue" in y.get) ? l = y.get : l = l[
|
|
10742
|
+
var y = Pt(l, h);
|
|
10743
|
+
d = !!y, d && "get" in y && !("originalValue" in y.get) ? l = y.get : l = l[h];
|
|
10744
10744
|
} else
|
|
10745
|
-
d = Nn(l,
|
|
10745
|
+
d = Nn(l, h), l = l[h];
|
|
10746
10746
|
d && !c && (kt[a] = l);
|
|
10747
10747
|
}
|
|
10748
10748
|
}
|
|
@@ -10757,16 +10757,16 @@ var zm = function e(t) {
|
|
|
10757
10757
|
l = null;
|
|
10758
10758
|
}
|
|
10759
10759
|
e.exports = function(d) {
|
|
10760
|
-
var
|
|
10760
|
+
var h = s(t, o, arguments);
|
|
10761
10761
|
if (a && l) {
|
|
10762
|
-
var
|
|
10763
|
-
|
|
10764
|
-
|
|
10762
|
+
var p = a(h, "length");
|
|
10763
|
+
p.configurable && l(
|
|
10764
|
+
h,
|
|
10765
10765
|
"length",
|
|
10766
10766
|
{ value: 1 + c(0, d.length - (arguments.length - 1)) }
|
|
10767
10767
|
);
|
|
10768
10768
|
}
|
|
10769
|
-
return
|
|
10769
|
+
return h;
|
|
10770
10770
|
};
|
|
10771
10771
|
var u = function() {
|
|
10772
10772
|
return s(t, r, arguments);
|
|
@@ -11026,12 +11026,12 @@ function ah(e, t, n) {
|
|
|
11026
11026
|
return !0;
|
|
11027
11027
|
}
|
|
11028
11028
|
var lh = aa;
|
|
11029
|
-
const la = /* @__PURE__ */ $s(lh), ch =
|
|
11029
|
+
const la = /* @__PURE__ */ $s(lh), ch = ht(
|
|
11030
11030
|
(e, t) => {
|
|
11031
11031
|
const { onSubmit: n, searchValues: r, searchFields: o, onChange: s } = e, [a] = ut.useForm();
|
|
11032
11032
|
ue(() => {
|
|
11033
11033
|
a.setFieldsValue(r);
|
|
11034
|
-
}, [r]),
|
|
11034
|
+
}, [r]), gt(t, () => ({
|
|
11035
11035
|
submit: a.submit,
|
|
11036
11036
|
resetFields: a.resetFields,
|
|
11037
11037
|
setFieldsValue: a.setFieldsValue
|
|
@@ -11039,9 +11039,9 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
|
|
|
11039
11039
|
const c = (() => {
|
|
11040
11040
|
if (!o)
|
|
11041
11041
|
return;
|
|
11042
|
-
const
|
|
11043
|
-
return
|
|
11044
|
-
const b =
|
|
11042
|
+
const h = o == null ? void 0 : o.rows, p = kr(a.getFieldsValue());
|
|
11043
|
+
return h == null ? void 0 : h.map((m, y) => m.map((v, g) => {
|
|
11044
|
+
const b = p[v.id] !== void 0;
|
|
11045
11045
|
return /* @__PURE__ */ i(
|
|
11046
11046
|
"div",
|
|
11047
11047
|
{
|
|
@@ -11058,8 +11058,8 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
|
|
|
11058
11058
|
);
|
|
11059
11059
|
}));
|
|
11060
11060
|
})(), u = B(() => {
|
|
11061
|
-
const
|
|
11062
|
-
s == null || s(
|
|
11061
|
+
const h = a.getFieldsValue();
|
|
11062
|
+
s == null || s(h);
|
|
11063
11063
|
}, [a, s]), f = _m(u, 100);
|
|
11064
11064
|
return /* @__PURE__ */ D(Jt, { children: [
|
|
11065
11065
|
/* @__PURE__ */ i(
|
|
@@ -11068,8 +11068,8 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
|
|
|
11068
11068
|
form: a,
|
|
11069
11069
|
onFinish: n,
|
|
11070
11070
|
onFieldsChange: f,
|
|
11071
|
-
onKeyPress: (
|
|
11072
|
-
|
|
11071
|
+
onKeyPress: (h) => {
|
|
11072
|
+
h.key === "Enter" && a.submit();
|
|
11073
11073
|
},
|
|
11074
11074
|
className: "pt-3 pb-3",
|
|
11075
11075
|
children: c
|
|
@@ -11080,10 +11080,10 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
|
|
|
11080
11080
|
}
|
|
11081
11081
|
), dh = (e) => {
|
|
11082
11082
|
var x;
|
|
11083
|
-
const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: s, searchValues: a } = e, l = X(), { t: c } = he(), [u, f] = S(), d = X(null), [
|
|
11083
|
+
const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: s, searchValues: a } = e, l = X(), { t: c } = he(), [u, f] = S(), d = X(null), [h, p] = S();
|
|
11084
11084
|
ue(() => {
|
|
11085
|
-
n &&
|
|
11086
|
-
}, [n]),
|
|
11085
|
+
n && p(void 0);
|
|
11086
|
+
}, [n]), vt(() => {
|
|
11087
11087
|
l.current = new Di(o, s, 1), l.current.parse(), f(l.current._advancedSearchContainer);
|
|
11088
11088
|
}, [s, o, n]);
|
|
11089
11089
|
const m = B(
|
|
@@ -11104,20 +11104,20 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
|
|
|
11104
11104
|
var T;
|
|
11105
11105
|
const w = kr(I);
|
|
11106
11106
|
if (la(w, a)) {
|
|
11107
|
-
|
|
11107
|
+
p([]);
|
|
11108
11108
|
return;
|
|
11109
11109
|
}
|
|
11110
11110
|
const A = Rn(
|
|
11111
11111
|
I,
|
|
11112
11112
|
(T = l.current) == null ? void 0 : T._advancedSearchContainer
|
|
11113
11113
|
);
|
|
11114
|
-
|
|
11114
|
+
p(A);
|
|
11115
11115
|
},
|
|
11116
11116
|
[a]
|
|
11117
11117
|
), g = B(() => {
|
|
11118
11118
|
var I, w;
|
|
11119
|
-
(I = d.current) == null || I.resetFields(), (w = d == null ? void 0 : d.current) == null || w.setFieldsValue({}),
|
|
11120
|
-
}, []), b = n ?
|
|
11119
|
+
(I = d.current) == null || I.resetFields(), (w = d == null ? void 0 : d.current) == null || w.setFieldsValue({}), p([]);
|
|
11120
|
+
}, []), b = n ? h || Rn(a, (x = l.current) == null ? void 0 : x._advancedSearchContainer) : [];
|
|
11121
11121
|
return /* @__PURE__ */ i(
|
|
11122
11122
|
um,
|
|
11123
11123
|
{
|
|
@@ -11202,7 +11202,7 @@ function ph(e, t) {
|
|
|
11202
11202
|
parentContext: u = {},
|
|
11203
11203
|
onChangeSelectedRowKeys: f,
|
|
11204
11204
|
nameSearch: d
|
|
11205
|
-
} = e,
|
|
11205
|
+
} = e, h = X({}), p = X(), m = X(null), y = X([]), v = bs(), [g, b] = S(!0), [x, I] = S(), { t: w } = he(), A = X(null), T = nm({
|
|
11206
11206
|
elementRef: A,
|
|
11207
11207
|
offset: fh
|
|
11208
11208
|
}), { treeView: C, formView: O, loading: V } = tm({
|
|
@@ -11303,7 +11303,7 @@ function ph(e, t) {
|
|
|
11303
11303
|
attrs: Pe,
|
|
11304
11304
|
order: bt,
|
|
11305
11305
|
name_search: E
|
|
11306
|
-
}), ze = St.map((
|
|
11306
|
+
}), ze = St.map((pt) => ({ id: pt.id }));
|
|
11307
11307
|
if (L == null || L({
|
|
11308
11308
|
model: n,
|
|
11309
11309
|
params: ot,
|
|
@@ -11313,20 +11313,20 @@ function ph(e, t) {
|
|
|
11313
11313
|
}), $e() || xe.current !== bt)
|
|
11314
11314
|
oe == null || oe(ze);
|
|
11315
11315
|
else {
|
|
11316
|
-
const
|
|
11317
|
-
oe == null || oe(
|
|
11316
|
+
const pt = [...Z || [], ...ze];
|
|
11317
|
+
oe == null || oe(pt);
|
|
11318
11318
|
}
|
|
11319
11319
|
if (xe.current = bt, St.length === 0)
|
|
11320
11320
|
return y.current = [], I(0), N(0), [];
|
|
11321
11321
|
const xt = zn(Y, St), Zn = Qt(Be);
|
|
11322
|
-
if (
|
|
11323
|
-
...
|
|
11322
|
+
if (h.current = {
|
|
11323
|
+
...h.current,
|
|
11324
11324
|
...Zn
|
|
11325
|
-
}, !
|
|
11326
|
-
const
|
|
11327
|
-
|
|
11328
|
-
...
|
|
11329
|
-
...
|
|
11325
|
+
}, !p.current && Y.status && (p.current = {}), Y.status) {
|
|
11326
|
+
const pt = Dn(Be);
|
|
11327
|
+
p.current = {
|
|
11328
|
+
...p.current,
|
|
11329
|
+
...pt
|
|
11330
11330
|
};
|
|
11331
11331
|
}
|
|
11332
11332
|
return y.current = [...xt], xt;
|
|
@@ -11371,8 +11371,8 @@ function ph(e, t) {
|
|
|
11371
11371
|
[Fe, N, F, v]
|
|
11372
11372
|
), we = B((ee) => {
|
|
11373
11373
|
var Ee, Ye, Pe, ot;
|
|
11374
|
-
if (
|
|
11375
|
-
return { color:
|
|
11374
|
+
if (h.current[(Ye = (Ee = ee.node) == null ? void 0 : Ee.data) == null ? void 0 : Ye.id])
|
|
11375
|
+
return { color: h.current[(ot = (Pe = ee.node) == null ? void 0 : Pe.data) == null ? void 0 : ot.id] };
|
|
11376
11376
|
}, []), _e = ye(() => (j == null ? void 0 : j.map((ee) => ee.id)) || [], [j]), [J, Ce, Se] = Rs({
|
|
11377
11377
|
ooui: Y,
|
|
11378
11378
|
model: n,
|
|
@@ -11422,7 +11422,7 @@ function ph(e, t) {
|
|
|
11422
11422
|
]), Me = B(() => W, [W]), ne = ye(() => Se ? /* @__PURE__ */ i(As, { aggregates: Ce, isLoading: J }) : null, [Ce, J, Se]), Oe = B((ee) => /* @__PURE__ */ i(Lr, { color: ee, style: { marginLeft: 7 } }), []), qe = B(
|
|
11423
11423
|
(ee) => {
|
|
11424
11424
|
var Ee;
|
|
11425
|
-
return (Ee =
|
|
11425
|
+
return (Ee = p.current) == null ? void 0 : Ee[ee.id];
|
|
11426
11426
|
},
|
|
11427
11427
|
[]
|
|
11428
11428
|
), pe = ye(
|
|
@@ -11474,7 +11474,7 @@ function ph(e, t) {
|
|
|
11474
11474
|
Y,
|
|
11475
11475
|
Le
|
|
11476
11476
|
]), q = X(Q), ge = X(_), Ae = X(), xe = X();
|
|
11477
|
-
|
|
11477
|
+
vt(() => {
|
|
11478
11478
|
const ee = !la(
|
|
11479
11479
|
Q,
|
|
11480
11480
|
q.current
|
|
@@ -11485,7 +11485,7 @@ function ph(e, t) {
|
|
|
11485
11485
|
var ee;
|
|
11486
11486
|
R == null || R([]), Ae.current = void 0, await Ke(), (ee = m == null ? void 0 : m.current) == null || ee.refresh();
|
|
11487
11487
|
}, [R, Ke]);
|
|
11488
|
-
return
|
|
11488
|
+
return gt(t, () => ({
|
|
11489
11489
|
refreshResults: De,
|
|
11490
11490
|
getFields: () => C == null ? void 0 : C.fields,
|
|
11491
11491
|
getDomain: () => a
|
|
@@ -11531,7 +11531,7 @@ function ph(e, t) {
|
|
|
11531
11531
|
)
|
|
11532
11532
|
] });
|
|
11533
11533
|
}
|
|
11534
|
-
const hh =
|
|
11534
|
+
const hh = ht(ph), gh = (e) => {
|
|
11535
11535
|
const {
|
|
11536
11536
|
visible: t,
|
|
11537
11537
|
searchTreeRef: n,
|
|
@@ -11544,8 +11544,8 @@ const hh = pt(ph), gh = (e) => {
|
|
|
11544
11544
|
results: u,
|
|
11545
11545
|
setCurrentId: f,
|
|
11546
11546
|
setCurrentView: d,
|
|
11547
|
-
availableViews:
|
|
11548
|
-
searchTreeNameSearch:
|
|
11547
|
+
availableViews: h,
|
|
11548
|
+
searchTreeNameSearch: p
|
|
11549
11549
|
} = e, m = ye(() => !(a != null && a.arch) || a.isExpandable ? !1 : xc(a.arch, "infinite") === "1", [a]);
|
|
11550
11550
|
ue(() => {
|
|
11551
11551
|
g == null || g(m);
|
|
@@ -11558,13 +11558,13 @@ const hh = pt(ph), gh = (e) => {
|
|
|
11558
11558
|
f(I);
|
|
11559
11559
|
const w = u.findIndex((T) => T.id === I);
|
|
11560
11560
|
v == null || v(y), c(w);
|
|
11561
|
-
const A =
|
|
11561
|
+
const A = h.find(
|
|
11562
11562
|
(T) => T.type === "form"
|
|
11563
11563
|
);
|
|
11564
11564
|
d(A);
|
|
11565
11565
|
},
|
|
11566
11566
|
[
|
|
11567
|
-
|
|
11567
|
+
h,
|
|
11568
11568
|
y,
|
|
11569
11569
|
u,
|
|
11570
11570
|
f,
|
|
@@ -11602,7 +11602,7 @@ const hh = pt(ph), gh = (e) => {
|
|
|
11602
11602
|
rootTree: !0,
|
|
11603
11603
|
model: r,
|
|
11604
11604
|
parentContext: o,
|
|
11605
|
-
nameSearch:
|
|
11605
|
+
nameSearch: p,
|
|
11606
11606
|
formView: s,
|
|
11607
11607
|
treeView: a,
|
|
11608
11608
|
domain: l,
|
|
@@ -11732,12 +11732,12 @@ function xh(e, t) {
|
|
|
11732
11732
|
initialView: u,
|
|
11733
11733
|
formDefaultValues: f,
|
|
11734
11734
|
formForcedValues: d = {},
|
|
11735
|
-
res_id:
|
|
11736
|
-
action_id:
|
|
11735
|
+
res_id: h = !1,
|
|
11736
|
+
action_id: p,
|
|
11737
11737
|
action_type: m,
|
|
11738
11738
|
treeExpandable: y = !1,
|
|
11739
11739
|
limit: v
|
|
11740
|
-
} = e, [g, b] = S(), [x, I] = S([]), [w, A] = S(!0), T =
|
|
11740
|
+
} = e, [g, b] = S(), [x, I] = S([]), [w, A] = S(!0), T = h || void 0, [C, O] = S(
|
|
11741
11741
|
T
|
|
11742
11742
|
), [V, F] = S([]), [_, $] = S(), [R, G] = S([]), [W, j] = S(), [M, k] = S(0), [Q, te] = S(!1), [ce, H] = S(!1), [oe, Z] = S(), { t: L } = he(), N = X(), E = X(), ae = re(
|
|
11743
11743
|
wt
|
|
@@ -11762,10 +11762,10 @@ function xh(e, t) {
|
|
|
11762
11762
|
}
|
|
11763
11763
|
function $e(J) {
|
|
11764
11764
|
b(J);
|
|
11765
|
-
const Ce = { action_id:
|
|
11765
|
+
const Ce = { action_id: p, action_type: m };
|
|
11766
11766
|
Y == null || Y({ ...J, extra: Ce });
|
|
11767
11767
|
}
|
|
11768
|
-
|
|
11768
|
+
gt(t, () => ({
|
|
11769
11769
|
canWeClose: Fe
|
|
11770
11770
|
}));
|
|
11771
11771
|
const Ke = async () => {
|
|
@@ -11798,7 +11798,7 @@ function xh(e, t) {
|
|
|
11798
11798
|
});
|
|
11799
11799
|
let pe;
|
|
11800
11800
|
qe && (pe = {
|
|
11801
|
-
action_id:
|
|
11801
|
+
action_id: p,
|
|
11802
11802
|
action_type: m,
|
|
11803
11803
|
name: a,
|
|
11804
11804
|
res_id: o.active_id,
|
|
@@ -11850,11 +11850,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11850
11850
|
};
|
|
11851
11851
|
l({ tabKey: c, canWeClose: Fe }), ue(() => {
|
|
11852
11852
|
const J = x.find((Se) => Se.type === "tree"), Ce = x.find((Se) => u.id ? Se.type === u.type && Se.view_id === u.id : Se.type === u.type);
|
|
11853
|
-
$e(Ce || J),
|
|
11854
|
-
}, [r, s,
|
|
11853
|
+
$e(Ce || J), h ? z == null || z(T) : (Ie(void 0), $(void 0)), Ke();
|
|
11854
|
+
}, [r, s, h]), ue(() => {
|
|
11855
11855
|
if (ve === c) {
|
|
11856
11856
|
z == null || z(C);
|
|
11857
|
-
const J = { action_id:
|
|
11857
|
+
const J = { action_id: p, action_type: m };
|
|
11858
11858
|
Y == null || Y({ ...g, extra: J });
|
|
11859
11859
|
}
|
|
11860
11860
|
}, [me, ve]);
|
|
@@ -11905,7 +11905,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11905
11905
|
title: a,
|
|
11906
11906
|
target: "current",
|
|
11907
11907
|
initialView: { id: ne == null ? void 0 : ne[0], type: Se },
|
|
11908
|
-
action_id:
|
|
11908
|
+
action_id: p,
|
|
11909
11909
|
action_type: m,
|
|
11910
11910
|
res_id: J[0]
|
|
11911
11911
|
});
|
|
@@ -12036,7 +12036,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
12036
12036
|
}
|
|
12037
12037
|
) : null;
|
|
12038
12038
|
}
|
|
12039
|
-
const ca =
|
|
12039
|
+
const ca = ht(xh);
|
|
12040
12040
|
const Ch = Ll(jl), Th = (e) => {
|
|
12041
12041
|
const { children: t = [], onPositionItemsChanged: n } = e, r = dt.Children.map(
|
|
12042
12042
|
t,
|
|
@@ -12076,14 +12076,14 @@ function Ih(e) {
|
|
|
12076
12076
|
domain: s = [],
|
|
12077
12077
|
visible: a = !0,
|
|
12078
12078
|
parentContext: l = {}
|
|
12079
|
-
} = e, [c, u] = S(!1), [f, d] = S(!1), [
|
|
12079
|
+
} = e, [c, u] = S(!1), [f, d] = S(!1), [h, p] = S(), [m, y] = S(), [v, g] = S(), [b, x] = S(1), [I, w] = S(0), A = X($t), T = X([]), [C, O] = S(0), [V, F] = S([]), [_, $] = S(void 0), [R, G] = S(), [W, j] = S(), [M, k] = S(), [Q, te] = S(!1), ce = X([]), H = (z) => {
|
|
12080
12080
|
te(!0), x(z), w((z - 1) * A.current);
|
|
12081
12081
|
}, oe = async () => {
|
|
12082
12082
|
const z = ce.current.length > 0 ? ce.current : s, me = Zt(T.current, z), { colors: ve } = Ot(m), { totalItems: ke, results: Le, attrsEvaluated: Ie } = await P.getHandler().searchForTree({
|
|
12083
12083
|
params: me,
|
|
12084
12084
|
limit: A.current,
|
|
12085
12085
|
offset: I,
|
|
12086
|
-
model:
|
|
12086
|
+
model: h,
|
|
12087
12087
|
fields: m.fields,
|
|
12088
12088
|
context: l,
|
|
12089
12089
|
attrs: ve && { colors: ve }
|
|
@@ -12121,9 +12121,9 @@ function Ih(e) {
|
|
|
12121
12121
|
action: t,
|
|
12122
12122
|
context: l
|
|
12123
12123
|
});
|
|
12124
|
-
ce.current = z.domain, g(z.views.get("form")), y(z.views.get("tree")),
|
|
12124
|
+
ce.current = z.domain, g(z.views.get("form")), y(z.views.get("tree")), p(z.model), A.current = z.limit;
|
|
12125
12125
|
}, E = async () => {
|
|
12126
|
-
|
|
12126
|
+
p(n);
|
|
12127
12127
|
const z = await P.getHandler().getView({
|
|
12128
12128
|
model: n,
|
|
12129
12129
|
type: "form",
|
|
@@ -12145,7 +12145,7 @@ function Ih(e) {
|
|
|
12145
12145
|
const { id: me } = z;
|
|
12146
12146
|
o({
|
|
12147
12147
|
id: me,
|
|
12148
|
-
model:
|
|
12148
|
+
model: h,
|
|
12149
12149
|
treeView: m
|
|
12150
12150
|
});
|
|
12151
12151
|
}, Y = () => !m || !v ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
|
|
@@ -12196,8 +12196,8 @@ const Oh = $r(Ih), Ah = (e) => {
|
|
|
12196
12196
|
}, gr = "line_ids";
|
|
12197
12197
|
function Fh(e, t) {
|
|
12198
12198
|
const { model: n, context: r = {}, id: o, configAction: s } = e, [a, l] = S([]), [c, u] = S(!1), [f, d] = S(), {
|
|
12199
|
-
setIsLoading:
|
|
12200
|
-
openAction:
|
|
12199
|
+
setIsLoading: h,
|
|
12200
|
+
openAction: p,
|
|
12201
12201
|
moveItemsEnabled: m
|
|
12202
12202
|
} = re(ho), y = X(), v = X(), [g] = Je(P.getHandler().getView), [b] = Je(
|
|
12203
12203
|
P.getHandler().readObjects
|
|
@@ -12206,14 +12206,14 @@ function Fh(e, t) {
|
|
|
12206
12206
|
);
|
|
12207
12207
|
ue(() => {
|
|
12208
12208
|
w();
|
|
12209
|
-
}, [n, o, r]),
|
|
12209
|
+
}, [n, o, r]), gt(t, () => ({
|
|
12210
12210
|
refresh: () => {
|
|
12211
12211
|
w();
|
|
12212
12212
|
},
|
|
12213
12213
|
configDashboard: F
|
|
12214
12214
|
}));
|
|
12215
12215
|
async function w() {
|
|
12216
|
-
u(!0),
|
|
12216
|
+
u(!0), h(!0), d(void 0);
|
|
12217
12217
|
try {
|
|
12218
12218
|
const _ = await A(), $ = await C(_), R = _.fields[gr].relation, G = $[gr].items;
|
|
12219
12219
|
v.current = _.fields;
|
|
@@ -12222,7 +12222,7 @@ function Fh(e, t) {
|
|
|
12222
12222
|
model: R,
|
|
12223
12223
|
context: r
|
|
12224
12224
|
}), j = await O(W);
|
|
12225
|
-
d(void 0), l(j), u(!1),
|
|
12225
|
+
d(void 0), l(j), u(!1), h(!1);
|
|
12226
12226
|
} catch (_) {
|
|
12227
12227
|
d(JSON.stringify(_));
|
|
12228
12228
|
}
|
|
@@ -12324,9 +12324,9 @@ function Fh(e, t) {
|
|
|
12324
12324
|
});
|
|
12325
12325
|
}
|
|
12326
12326
|
async function F() {
|
|
12327
|
-
|
|
12327
|
+
p(s);
|
|
12328
12328
|
}
|
|
12329
|
-
return c ? /* @__PURE__ */ i(
|
|
12329
|
+
return c ? /* @__PURE__ */ i(yt, {}) : f ? /* @__PURE__ */ i(nt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Th, { onPositionItemsChanged: V, children: a.map((_, $) => {
|
|
12330
12330
|
const { actionData: R, values: G } = _, { position: W, id: j } = G, {
|
|
12331
12331
|
actionId: M,
|
|
12332
12332
|
actionType: k,
|
|
@@ -12392,7 +12392,7 @@ function Fh(e, t) {
|
|
|
12392
12392
|
view_id: ke,
|
|
12393
12393
|
view_type: Le
|
|
12394
12394
|
};
|
|
12395
|
-
|
|
12395
|
+
p(de);
|
|
12396
12396
|
}
|
|
12397
12397
|
}
|
|
12398
12398
|
},
|
|
@@ -12449,19 +12449,19 @@ function Fh(e, t) {
|
|
|
12449
12449
|
title: te,
|
|
12450
12450
|
parms: E,
|
|
12451
12451
|
action: Y,
|
|
12452
|
-
openAction:
|
|
12452
|
+
openAction: p,
|
|
12453
12453
|
children: ae
|
|
12454
12454
|
},
|
|
12455
12455
|
`griditem-${j}`
|
|
12456
12456
|
);
|
|
12457
12457
|
}) });
|
|
12458
12458
|
}
|
|
12459
|
-
const Rh =
|
|
12459
|
+
const Rh = ht(Fh), _h = (e) => {
|
|
12460
12460
|
const { ooui: t } = e;
|
|
12461
12461
|
return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(Vh, { ooui: t }) });
|
|
12462
12462
|
}, Vh = (e) => {
|
|
12463
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((C) => C.operation !== "pendingRemove").map((C) => C.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation:
|
|
12464
|
-
|
|
12463
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((C) => C.operation !== "pendingRemove").map((C) => C.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: h, context: p, readOnly: m, field: y, columns: v } = n, g = re(He), { getContext: b } = g || {};
|
|
12464
|
+
vt(() => {
|
|
12465
12465
|
I();
|
|
12466
12466
|
}, [o]);
|
|
12467
12467
|
const x = (C) => {
|
|
@@ -12486,10 +12486,10 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12486
12486
|
}
|
|
12487
12487
|
try {
|
|
12488
12488
|
const V = (await P.getHandler().search({
|
|
12489
|
-
model:
|
|
12489
|
+
model: h,
|
|
12490
12490
|
params: C,
|
|
12491
12491
|
fieldsToRetrieve: [y],
|
|
12492
|
-
context: { ...b == null ? void 0 : b(), ...
|
|
12492
|
+
context: { ...b == null ? void 0 : b(), ...p }
|
|
12493
12493
|
})).map((F) => {
|
|
12494
12494
|
const _ = F[y];
|
|
12495
12495
|
let $ = _;
|
|
@@ -12637,12 +12637,19 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12637
12637
|
borderLeft: `16px solid ${p ? t : r}`,
|
|
12638
12638
|
borderTop: "16px solid transparent",
|
|
12639
12639
|
borderBottom: "16px solid transparent"
|
|
12640
|
-
})
|
|
12641
|
-
|
|
12642
|
-
|
|
12640
|
+
}), h = (p) => {
|
|
12641
|
+
const m = mt(p);
|
|
12642
|
+
return m && /* @__PURE__ */ i(m, {});
|
|
12643
|
+
};
|
|
12644
|
+
return /* @__PURE__ */ i("ul", { style: c, children: (e.value || []).map((p, m) => /* @__PURE__ */ D("li", { style: u(p.active), children: [
|
|
12645
|
+
/* @__PURE__ */ D(Xe, { children: [
|
|
12646
|
+
p.icon && h(p.icon),
|
|
12647
|
+
" ",
|
|
12648
|
+
p.title
|
|
12649
|
+
] }),
|
|
12643
12650
|
/* @__PURE__ */ i("div", { style: f }),
|
|
12644
12651
|
/* @__PURE__ */ i("div", { style: d(p.active) })
|
|
12645
|
-
] },
|
|
12652
|
+
] }, m)) });
|
|
12646
12653
|
}, Bh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(jh, {}) }), Hh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Uh, { ...e }) }), Uh = (e) => {
|
|
12647
12654
|
const { ooui: t, value: n, onChange: r } = e, { lang: o, height: s, readOnly: a } = t, l = re(He), { elementHasLostFocus: c } = l || {}, u = B(
|
|
12648
12655
|
(d) => {
|
|
@@ -12734,7 +12741,7 @@ const Yh = (e) => {
|
|
|
12734
12741
|
const { ooui: t } = e, { title: n, text: r, alertType: o, icon: s } = t;
|
|
12735
12742
|
function a(c) {
|
|
12736
12743
|
if (c) {
|
|
12737
|
-
const u =
|
|
12744
|
+
const u = mt(c);
|
|
12738
12745
|
return u && /* @__PURE__ */ i(u, {});
|
|
12739
12746
|
}
|
|
12740
12747
|
}
|
|
@@ -12764,18 +12771,18 @@ function ng(e, t) {
|
|
|
12764
12771
|
content: /* @__PURE__ */ i(tg, {})
|
|
12765
12772
|
}
|
|
12766
12773
|
]), f = X(/* @__PURE__ */ new Map()), d = X();
|
|
12767
|
-
|
|
12774
|
+
gt(t, () => ({
|
|
12768
12775
|
retrieveAndOpenAction: m,
|
|
12769
12776
|
openShortcut: g
|
|
12770
12777
|
}));
|
|
12771
|
-
function
|
|
12778
|
+
function h(I) {
|
|
12772
12779
|
if (I === r) {
|
|
12773
12780
|
const w = c.findIndex((A) => A.key === I);
|
|
12774
12781
|
c[w - 1] && o(c[w - 1].key), c[w + 1] && o(c[w + 1].key);
|
|
12775
12782
|
}
|
|
12776
12783
|
u(c.filter((w) => w.key !== I)), f.current.delete(I);
|
|
12777
12784
|
}
|
|
12778
|
-
function
|
|
12785
|
+
function p({
|
|
12779
12786
|
tabKey: I,
|
|
12780
12787
|
canWeClose: w
|
|
12781
12788
|
}) {
|
|
@@ -13057,7 +13064,7 @@ function ng(e, t) {
|
|
|
13057
13064
|
model: A,
|
|
13058
13065
|
context: { ...l, ...w },
|
|
13059
13066
|
domain: I,
|
|
13060
|
-
setCanWeClose:
|
|
13067
|
+
setCanWeClose: p,
|
|
13061
13068
|
initialView: k,
|
|
13062
13069
|
res_id: $,
|
|
13063
13070
|
formDefaultValues: R,
|
|
@@ -13081,7 +13088,7 @@ function ng(e, t) {
|
|
|
13081
13088
|
activeKey: r,
|
|
13082
13089
|
onRemoveTab: async (I) => {
|
|
13083
13090
|
const w = f.current.get(I);
|
|
13084
|
-
(await (w == null ? void 0 : w()) || r === "welcome") &&
|
|
13091
|
+
(await (w == null ? void 0 : w()) || r === "welcome") && h(I);
|
|
13085
13092
|
},
|
|
13086
13093
|
onChangeTab: (I) => {
|
|
13087
13094
|
o(I);
|
|
@@ -13097,7 +13104,7 @@ function ng(e, t) {
|
|
|
13097
13104
|
}
|
|
13098
13105
|
);
|
|
13099
13106
|
}
|
|
13100
|
-
const ny =
|
|
13107
|
+
const ny = ht(ng), { useToken: rg } = Ge;
|
|
13101
13108
|
function og(e) {
|
|
13102
13109
|
const { label: t, onClose: n, tabKey: r, isActive: o, onSelected: s } = e, { token: a } = rg(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
|
|
13103
13110
|
return /* @__PURE__ */ D(
|
|
@@ -13207,7 +13214,7 @@ const { useToken: ag } = Ge, iy = (e) => {
|
|
|
13207
13214
|
onAddFavourite: r,
|
|
13208
13215
|
onRemoveFavourite: o,
|
|
13209
13216
|
onDropdownClosed: s
|
|
13210
|
-
} = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = ag(),
|
|
13217
|
+
} = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = ag(), h = X(null), p = re(
|
|
13211
13218
|
wt
|
|
13212
13219
|
), {
|
|
13213
13220
|
openShortcut: m,
|
|
@@ -13216,7 +13223,7 @@ const { useToken: ag } = Ge, iy = (e) => {
|
|
|
13216
13223
|
currentView: g,
|
|
13217
13224
|
currentId: b,
|
|
13218
13225
|
openDefaultActionForModel: x
|
|
13219
|
-
} =
|
|
13226
|
+
} = p || {}, I = ye(() => {
|
|
13220
13227
|
if (!g || !g.view_id || !g.extra)
|
|
13221
13228
|
return;
|
|
13222
13229
|
const { action_id: F, action_type: _ } = g.extra || {};
|
|
@@ -13251,7 +13258,7 @@ const { useToken: ag } = Ge, iy = (e) => {
|
|
|
13251
13258
|
}, [I, n]);
|
|
13252
13259
|
async function C() {
|
|
13253
13260
|
var F;
|
|
13254
|
-
(F =
|
|
13261
|
+
(F = h == null ? void 0 : h.current) == null || F.close(), x == null || x({ model: "ir.ui.view_sc" });
|
|
13255
13262
|
}
|
|
13256
13263
|
const O = B(async () => {
|
|
13257
13264
|
const F = await t();
|
|
@@ -13304,7 +13311,7 @@ const { useToken: ag } = Ge, iy = (e) => {
|
|
|
13304
13311
|
return /* @__PURE__ */ i(
|
|
13305
13312
|
cl,
|
|
13306
13313
|
{
|
|
13307
|
-
ref:
|
|
13314
|
+
ref: h,
|
|
13308
13315
|
isFavourite: a,
|
|
13309
13316
|
onToggleFavourite: V,
|
|
13310
13317
|
onItemClick: A,
|
|
@@ -13388,7 +13395,7 @@ export {
|
|
|
13388
13395
|
Sn as Tree,
|
|
13389
13396
|
Wf as Url,
|
|
13390
13397
|
ly as dayjs,
|
|
13391
|
-
|
|
13398
|
+
mt as iconMapper,
|
|
13392
13399
|
Ft as showConfirmDialog
|
|
13393
13400
|
};
|
|
13394
13401
|
//# sourceMappingURL=react-ooui.es.js.map
|