@gisce/react-ooui 2.29.0-rc.1 → 2.29.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/common/Field.d.ts.map +1 -1
- package/dist/react-ooui.es.js +622 -608
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/widgets/WidgetFactory.d.ts.map +1 -1
- package/dist/widgets/custom/CodeEditor.d.ts +7 -2
- package/dist/widgets/custom/CodeEditor.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var Ta = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var wo = (e, t, n) => (
|
|
2
|
+
var Oa = (e, t, n) => t in e ? Ta(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var wo = (e, t, n) => (Oa(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsx as i, jsxs as E, Fragment as ae } from "react/jsx-runtime";
|
|
5
|
-
import dt, { useContext as oe, useState as S, useEffect as de, useRef as Q, memo as $r, useMemo as
|
|
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
|
|
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
|
|
5
|
+
import dt, { useContext as oe, useState as S, useEffect as de, useRef as Q, memo as $r, useMemo as ye, useCallback as B, createContext as Ia, forwardRef as pt, useImperativeHandle as ht, createElement as Aa, Fragment as Jt } from "react";
|
|
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 Oi, Layout as Ii, Radio as So, Switch as Pa, Steps as xo } from "antd";
|
|
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 Ot, 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
9
|
import Ei, { QuestionCircleOutlined as Pi, ExclamationCircleOutlined as _t, LoadingOutlined as gt, 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
|
-
import { useLocale as he, FormigaConfigProvider as rl, mergeStrings as ol, Many2OneSuffix as il, Many2OneSuffixModal as
|
|
12
|
-
import * as
|
|
11
|
+
import { useLocale as he, FormigaConfigProvider as rl, mergeStrings as ol, Many2OneSuffix as il, Many2OneSuffixModal as Oo, FieldSet as sl, ExportModal as al, Dropdown as Hi, DropdownButton as qt, HTMLPreview as ll, FavouriteButton as cl } from "@gisce/react-formiga-components";
|
|
12
|
+
import * as Io from "@tabler/icons-react";
|
|
13
13
|
import dl from "antd/lib/input/TextArea";
|
|
14
14
|
import rn from "styled-components";
|
|
15
15
|
import Jr from "react-measure";
|
|
@@ -19,7 +19,7 @@ import br from "antd/lib/typography/Title";
|
|
|
19
19
|
import yt 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
|
-
import { default as
|
|
22
|
+
import { default as ly } from "dayjs";
|
|
23
23
|
import hl from "dayjs/plugin/advancedFormat";
|
|
24
24
|
import gl from "dayjs/plugin/customParseFormat";
|
|
25
25
|
import yl from "dayjs/plugin/isoWeek";
|
|
@@ -31,8 +31,8 @@ import xl from "dayjs/plugin/localeData";
|
|
|
31
31
|
import { createRoot as Ui } from "react-dom/client";
|
|
32
32
|
import { useDeepCompareCallback as ft, useDeepCompareMemo as yn, useDeepCompareEffect as Cl } from "use-deep-compare";
|
|
33
33
|
import { Table as Tl, InfiniteTable as Wi } from "@gisce/react-formiga-table";
|
|
34
|
-
import { fileTypeFromBuffer as
|
|
35
|
-
import { isPresetStatusColor as
|
|
34
|
+
import { fileTypeFromBuffer as Ol } from "file-type-buffer-browser";
|
|
35
|
+
import { isPresetStatusColor as Il, isPresetColor as Al } from "antd/lib/_util/colors";
|
|
36
36
|
import Fl from "antd/es/date-picker/locale/en_US";
|
|
37
37
|
import Rl from "antd/es/date-picker/locale/es_ES";
|
|
38
38
|
import _l from "antd/es/date-picker/locale/ca_ES";
|
|
@@ -297,10 +297,10 @@ function Ro(e, t) {
|
|
|
297
297
|
...t
|
|
298
298
|
});
|
|
299
299
|
const o = `Icon${n}`;
|
|
300
|
-
if (
|
|
300
|
+
if (Io[o]) {
|
|
301
301
|
const s = () => {
|
|
302
302
|
var l;
|
|
303
|
-
return dt.createElement(
|
|
303
|
+
return dt.createElement(Io[o], {
|
|
304
304
|
fill: "transparent",
|
|
305
305
|
size: ((l = t == null ? void 0 : t.style) == null ? void 0 : l.fontSize) || 17
|
|
306
306
|
});
|
|
@@ -382,7 +382,7 @@ const Qr = (e) => {
|
|
|
382
382
|
async function x() {
|
|
383
383
|
l && o && (v(!0), await m({ type: l, action: o, context: d }), v(!1));
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function O() {
|
|
386
386
|
if (c) {
|
|
387
387
|
Ft({
|
|
388
388
|
confirmMessage: c,
|
|
@@ -402,7 +402,7 @@ const Qr = (e) => {
|
|
|
402
402
|
Fa.Button,
|
|
403
403
|
{
|
|
404
404
|
disabled: !a || p,
|
|
405
|
-
onClick:
|
|
405
|
+
onClick: O,
|
|
406
406
|
icon: /* @__PURE__ */ i(jn, {}),
|
|
407
407
|
type: f ? "primary" : void 0,
|
|
408
408
|
overlay: /* @__PURE__ */ i(
|
|
@@ -456,8 +456,8 @@ const Qr = (e) => {
|
|
|
456
456
|
if (y)
|
|
457
457
|
return /* @__PURE__ */ i(gt, {});
|
|
458
458
|
if (d) {
|
|
459
|
-
const
|
|
460
|
-
return
|
|
459
|
+
const O = vt(d);
|
|
460
|
+
return O && /* @__PURE__ */ i(O, {});
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
return /* @__PURE__ */ i(
|
|
@@ -544,7 +544,7 @@ const Gi = (e) => {
|
|
|
544
544
|
p(!0);
|
|
545
545
|
try {
|
|
546
546
|
const T = await x();
|
|
547
|
-
await
|
|
547
|
+
await O(T);
|
|
548
548
|
} catch (T) {
|
|
549
549
|
it(T);
|
|
550
550
|
}
|
|
@@ -561,7 +561,7 @@ const Gi = (e) => {
|
|
|
561
561
|
}));
|
|
562
562
|
return f == null || f(A), A;
|
|
563
563
|
}
|
|
564
|
-
async function
|
|
564
|
+
async function O(T) {
|
|
565
565
|
const A = {};
|
|
566
566
|
for (const D of T) {
|
|
567
567
|
const F = (await P.getHandler().readObjects({
|
|
@@ -593,7 +593,7 @@ const Gi = (e) => {
|
|
|
593
593
|
) })
|
|
594
594
|
] }, A));
|
|
595
595
|
}
|
|
596
|
-
async function
|
|
596
|
+
async function I() {
|
|
597
597
|
m(!0);
|
|
598
598
|
try {
|
|
599
599
|
for (const T of Object.keys(y))
|
|
@@ -630,7 +630,7 @@ const Gi = (e) => {
|
|
|
630
630
|
{
|
|
631
631
|
icon: h ? /* @__PURE__ */ i(gt, {}) : /* @__PURE__ */ i(Bn, {}),
|
|
632
632
|
disabled: h,
|
|
633
|
-
onClick:
|
|
633
|
+
onClick: I,
|
|
634
634
|
style: { marginLeft: 15 },
|
|
635
635
|
type: "primary",
|
|
636
636
|
children: c("ok")
|
|
@@ -836,7 +836,7 @@ function pc(e) {
|
|
|
836
836
|
return `${Math.round((n + Number.EPSILON) * 100) / 100} KB`;
|
|
837
837
|
}
|
|
838
838
|
async function Xt(e) {
|
|
839
|
-
const t = await
|
|
839
|
+
const t = await Ol(
|
|
840
840
|
Buffer.from(e, "base64")
|
|
841
841
|
);
|
|
842
842
|
return t || {
|
|
@@ -948,7 +948,7 @@ const hc = (e) => {
|
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
950
|
);
|
|
951
|
-
},
|
|
951
|
+
}, It = (e) => {
|
|
952
952
|
const t = e.arch, n = e.fields, r = new Ai(n);
|
|
953
953
|
return r.parse(t), r;
|
|
954
954
|
};
|
|
@@ -1055,7 +1055,7 @@ const eo = async (e) => {
|
|
|
1055
1055
|
};
|
|
1056
1056
|
let d = [], p;
|
|
1057
1057
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1058
|
-
const v = (y =
|
|
1058
|
+
const v = (y = It(o)) == null ? void 0 : y.colors, g = await P.getHandler().readEvalUiObjects({
|
|
1059
1059
|
model: n,
|
|
1060
1060
|
ids: u,
|
|
1061
1061
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1120,7 +1120,7 @@ const eo = async (e) => {
|
|
|
1120
1120
|
n[r] = e[r];
|
|
1121
1121
|
}), n;
|
|
1122
1122
|
};
|
|
1123
|
-
function
|
|
1123
|
+
function Oc(e) {
|
|
1124
1124
|
const t = e.map((r) => r.id);
|
|
1125
1125
|
return e.filter((r, o) => {
|
|
1126
1126
|
const { id: s } = r;
|
|
@@ -1136,7 +1136,7 @@ function Do({
|
|
|
1136
1136
|
e[r] && (n[r] = e[r]);
|
|
1137
1137
|
}), n;
|
|
1138
1138
|
}
|
|
1139
|
-
const
|
|
1139
|
+
const Ic = (e) => {
|
|
1140
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 = oe(He), { getContext: p } = d || {};
|
|
1141
1141
|
yt(() => {
|
|
1142
1142
|
m();
|
|
@@ -1158,11 +1158,11 @@ 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), [p, h] = S(), { relation: m, context: y, readOnly: v, summaryField: g, titleField: b } = r, x = s.filter((T) => T.values),
|
|
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), [p, h] = S(), { relation: m, context: y, readOnly: v, summaryField: g, titleField: b } = r, x = s.filter((T) => T.values), O = oe(He), { getContext: w } = O || {};
|
|
1162
1162
|
yt(() => {
|
|
1163
1163
|
C();
|
|
1164
1164
|
}, [s]);
|
|
1165
|
-
const
|
|
1165
|
+
const I = (T) => {
|
|
1166
1166
|
o == null || o({
|
|
1167
1167
|
items: T
|
|
1168
1168
|
});
|
|
@@ -1183,7 +1183,7 @@ const Oc = (e) => {
|
|
|
1183
1183
|
context: { ...w == null ? void 0 : w(), ...y },
|
|
1184
1184
|
currentView: "form"
|
|
1185
1185
|
});
|
|
1186
|
-
|
|
1186
|
+
I(T);
|
|
1187
1187
|
} catch (T) {
|
|
1188
1188
|
u(T);
|
|
1189
1189
|
} finally {
|
|
@@ -1557,7 +1557,7 @@ const Oc = (e) => {
|
|
|
1557
1557
|
devMode: s,
|
|
1558
1558
|
children: a
|
|
1559
1559
|
}) => {
|
|
1560
|
-
const l =
|
|
1560
|
+
const l = ye(
|
|
1561
1561
|
() => ({
|
|
1562
1562
|
erpFeatures: e,
|
|
1563
1563
|
globalValues: r,
|
|
@@ -1601,17 +1601,17 @@ async function es({
|
|
|
1601
1601
|
view_type: p
|
|
1602
1602
|
} = s, h = p === "tree", m = [];
|
|
1603
1603
|
for (const b of u) {
|
|
1604
|
-
const [x,
|
|
1604
|
+
const [x, O] = b;
|
|
1605
1605
|
if (x)
|
|
1606
1606
|
m.push(b);
|
|
1607
1607
|
else {
|
|
1608
1608
|
const { view_id: w } = await P.getHandler().getView({
|
|
1609
1609
|
model: c,
|
|
1610
|
-
type:
|
|
1610
|
+
type: O,
|
|
1611
1611
|
id: x,
|
|
1612
1612
|
context: { ...t, ...a }
|
|
1613
1613
|
});
|
|
1614
|
-
m.push([w,
|
|
1614
|
+
m.push([w, O]);
|
|
1615
1615
|
}
|
|
1616
1616
|
}
|
|
1617
1617
|
const [y, v] = m[0], g = { id: y, type: v };
|
|
@@ -1630,7 +1630,7 @@ async function es({
|
|
|
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 = oe(He), { getContext: f, getValues: d, activeId: p } = u || {}, { globalValues: h, rootContext: m } = to(), y =
|
|
1633
|
+
const [t, n] = S(), [r, o] = S(!0), [s, a] = S(), [l, c] = S(), u = oe(He), { getContext: f, getValues: d, activeId: p } = u || {}, { globalValues: h, 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 {
|
|
@@ -1641,24 +1641,24 @@ const Pc = (e) => {
|
|
|
1641
1641
|
...h,
|
|
1642
1642
|
...d()
|
|
1643
1643
|
}
|
|
1644
|
-
}), { views: b } = g, x = b.find((
|
|
1645
|
-
const [, w] =
|
|
1644
|
+
}), { views: b } = g, x = b.find((O) => {
|
|
1645
|
+
const [, w] = O;
|
|
1646
1646
|
return w === "tree";
|
|
1647
1647
|
});
|
|
1648
1648
|
if (x) {
|
|
1649
|
-
const [
|
|
1650
|
-
actionId:
|
|
1649
|
+
const [O, w] = x, {
|
|
1650
|
+
actionId: I,
|
|
1651
1651
|
actionType: C,
|
|
1652
1652
|
title: T,
|
|
1653
1653
|
model: A
|
|
1654
1654
|
} = g;
|
|
1655
1655
|
c({
|
|
1656
|
-
action_id:
|
|
1656
|
+
action_id: I,
|
|
1657
1657
|
action_type: C,
|
|
1658
1658
|
name: T,
|
|
1659
1659
|
res_id: !1,
|
|
1660
1660
|
res_model: A,
|
|
1661
|
-
view_id:
|
|
1661
|
+
view_id: O,
|
|
1662
1662
|
view_type: w,
|
|
1663
1663
|
overrideUnsettedLimit: !0,
|
|
1664
1664
|
values: {
|
|
@@ -1894,7 +1894,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
1894
1894
|
field: u,
|
|
1895
1895
|
operator: f,
|
|
1896
1896
|
manualIds: d
|
|
1897
|
-
} = e, [p, h] = S(!1), [m, y] = S(), [v, g] = S(), [b, x] = S(), [
|
|
1897
|
+
} = e, [p, h] = S(!1), [m, y] = S(), [v, g] = S(0), [b, x] = S(), [O, w] = S(), [I, C] = S(), [T, A] = S(), [D] = Je(
|
|
1898
1898
|
P.getHandler().searchAllIds
|
|
1899
1899
|
), [F] = Je(
|
|
1900
1900
|
P.getHandler().readObjects
|
|
@@ -2005,8 +2005,8 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2005
2005
|
value: m,
|
|
2006
2006
|
totalValue: b,
|
|
2007
2007
|
percent: v,
|
|
2008
|
-
color:
|
|
2009
|
-
icon:
|
|
2008
|
+
color: O,
|
|
2009
|
+
icon: I,
|
|
2010
2010
|
suffix: c,
|
|
2011
2011
|
showPercent: a
|
|
2012
2012
|
}
|
|
@@ -2024,9 +2024,9 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2024
2024
|
P.getHandler().getFields
|
|
2025
2025
|
), [x] = Je(
|
|
2026
2026
|
P.getHandler().readObjects
|
|
2027
|
-
), [
|
|
2027
|
+
), [O] = Je(P.getHandler().search), w = B(async () => {
|
|
2028
2028
|
u(!0), d(void 0), g(n.type || "line");
|
|
2029
|
-
const
|
|
2029
|
+
const I = Lc({ ooui: n });
|
|
2030
2030
|
let C, T;
|
|
2031
2031
|
try {
|
|
2032
2032
|
({ values: C, fields: T } = await Hc({
|
|
@@ -2035,12 +2035,12 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2035
2035
|
context: o,
|
|
2036
2036
|
limit: s,
|
|
2037
2037
|
order: n.timerange ? n.x.name : null,
|
|
2038
|
-
fields:
|
|
2038
|
+
fields: I,
|
|
2039
2039
|
manualIds: l,
|
|
2040
2040
|
methods: {
|
|
2041
2041
|
getFields: b,
|
|
2042
2042
|
readObjects: x,
|
|
2043
|
-
search:
|
|
2043
|
+
search: O
|
|
2044
2044
|
}
|
|
2045
2045
|
}));
|
|
2046
2046
|
} catch (A) {
|
|
@@ -2085,7 +2085,7 @@ const { getValueForOperator: Eo } = Ri, Nc = (e) => {
|
|
|
2085
2085
|
n,
|
|
2086
2086
|
p,
|
|
2087
2087
|
x,
|
|
2088
|
-
|
|
2088
|
+
O,
|
|
2089
2089
|
v,
|
|
2090
2090
|
a
|
|
2091
2091
|
]);
|
|
@@ -2163,7 +2163,7 @@ const ir = (e) => (t) => {
|
|
|
2163
2163
|
useGrouping: !0
|
|
2164
2164
|
});
|
|
2165
2165
|
return { name: e === "pie" ? t.x : t.type, value: n };
|
|
2166
|
-
},
|
|
2166
|
+
}, In = (e) => {
|
|
2167
2167
|
if (typeof e == "string" && Uc(e))
|
|
2168
2168
|
return parseFloat(e).toLocaleString("es-ES", {
|
|
2169
2169
|
useGrouping: !0
|
|
@@ -2185,12 +2185,12 @@ const ir = (e) => (t) => {
|
|
|
2185
2185
|
xAxis: {
|
|
2186
2186
|
tickCount: 5,
|
|
2187
2187
|
label: {
|
|
2188
|
-
formatter:
|
|
2188
|
+
formatter: In
|
|
2189
2189
|
}
|
|
2190
2190
|
},
|
|
2191
2191
|
yAxis: {
|
|
2192
2192
|
label: {
|
|
2193
|
-
formatter:
|
|
2193
|
+
formatter: In
|
|
2194
2194
|
}
|
|
2195
2195
|
},
|
|
2196
2196
|
legend: {
|
|
@@ -2230,12 +2230,12 @@ const ir = (e) => (t) => {
|
|
|
2230
2230
|
},
|
|
2231
2231
|
xAxis: {
|
|
2232
2232
|
label: {
|
|
2233
|
-
formatter:
|
|
2233
|
+
formatter: In
|
|
2234
2234
|
}
|
|
2235
2235
|
},
|
|
2236
2236
|
yAxis: {
|
|
2237
2237
|
label: {
|
|
2238
|
-
formatter:
|
|
2238
|
+
formatter: In
|
|
2239
2239
|
}
|
|
2240
2240
|
},
|
|
2241
2241
|
label: {
|
|
@@ -2321,13 +2321,13 @@ const Kc = {
|
|
|
2321
2321
|
yAxisOpts: s,
|
|
2322
2322
|
fixedHeight: a = !1
|
|
2323
2323
|
}) => {
|
|
2324
|
-
const { t: l } = he(), c =
|
|
2324
|
+
const { t: l } = he(), c = ye(() => {
|
|
2325
2325
|
if (!(e !== "pie" || t.reduce(
|
|
2326
2326
|
(y, v) => v.operator === "+" ? y + v.value : 0,
|
|
2327
2327
|
0
|
|
2328
2328
|
) === 0))
|
|
2329
2329
|
return t.reduce((y, v) => y + v.value, 0);
|
|
2330
|
-
}, [t, e]), u =
|
|
2330
|
+
}, [t, e]), u = ye(() => {
|
|
2331
2331
|
if (e === "pie")
|
|
2332
2332
|
return qc(t);
|
|
2333
2333
|
}, [t, e]), f = B(
|
|
@@ -2338,7 +2338,7 @@ const Kc = {
|
|
|
2338
2338
|
return `${`${((y == null ? void 0 : y.percent) || 0).toFixed(0)}%`}`;
|
|
2339
2339
|
},
|
|
2340
2340
|
[u]
|
|
2341
|
-
), d =
|
|
2341
|
+
), d = ye(() => {
|
|
2342
2342
|
if (u !== void 0)
|
|
2343
2343
|
return {
|
|
2344
2344
|
formatter: (m, y) => f(y.id)
|
|
@@ -2441,7 +2441,7 @@ const Jc = ({
|
|
|
2441
2441
|
fixedHeight: a
|
|
2442
2442
|
}
|
|
2443
2443
|
);
|
|
2444
|
-
}, $t = 80, lt =
|
|
2444
|
+
}, $t = 80, lt = Ia(
|
|
2445
2445
|
null
|
|
2446
2446
|
), Xc = (e) => {
|
|
2447
2447
|
const {
|
|
@@ -2464,20 +2464,20 @@ const Jc = ({
|
|
|
2464
2464
|
setSorter: g,
|
|
2465
2465
|
totalItems: b,
|
|
2466
2466
|
setTotalItems: x,
|
|
2467
|
-
setSelectedRowItems:
|
|
2467
|
+
setSelectedRowItems: O,
|
|
2468
2468
|
selectedRowItems: w,
|
|
2469
|
-
searchTreeNameSearch:
|
|
2469
|
+
searchTreeNameSearch: I,
|
|
2470
2470
|
setSearchTreeNameSearch: C,
|
|
2471
2471
|
goToResourceId: T,
|
|
2472
2472
|
limit: A,
|
|
2473
2473
|
isActive: D
|
|
2474
|
-
} = e, [F, _] = S(!1), [$, R] = S(!1), [G, W] = S(!1), [L, N] = S(!0), [k, X] = S(!0), [te, ie] = S([]), [H, ne] = S(!1), [ee, V] = S([]), [M, j] = S(!1), [fe, z] = S(!0), [Y, me] = S(), [
|
|
2474
|
+
} = e, [F, _] = S(!1), [$, R] = S(!1), [G, W] = S(!1), [L, N] = S(!0), [k, X] = S(!0), [te, ie] = S([]), [H, ne] = S(!1), [ee, V] = S([]), [M, j] = S(!1), [fe, z] = S(!0), [Y, me] = S(), [ve, $e] = S({}), [Le, Oe] = S(0), [Ee, Ke] = S(), [Fe, ce] = S(!1), [ue, we] = S(
|
|
2475
2475
|
A !== void 0 ? A : $t
|
|
2476
2476
|
), [_e, J] = S(r);
|
|
2477
2477
|
de(() => {
|
|
2478
2478
|
p && p.length > 0 && !h && (m == null || m(0), f == null || f(p[0].id));
|
|
2479
2479
|
}, [p]), de(() => {
|
|
2480
|
-
|
|
2480
|
+
we(A !== void 0 ? A : $t);
|
|
2481
2481
|
}, [A]), de(() => {
|
|
2482
2482
|
s.length === 1 ? me(s[0]) : s.length > 1 && me(
|
|
2483
2483
|
s.filter(
|
|
@@ -2527,7 +2527,7 @@ const Jc = ({
|
|
|
2527
2527
|
attachments: te,
|
|
2528
2528
|
setAttachments: ie,
|
|
2529
2529
|
selectedRowItems: w,
|
|
2530
|
-
setSelectedRowItems:
|
|
2530
|
+
setSelectedRowItems: O,
|
|
2531
2531
|
duplicatingItem: H,
|
|
2532
2532
|
setDuplicatingItem: ne,
|
|
2533
2533
|
setSearchParams: V,
|
|
@@ -2538,20 +2538,20 @@ const Jc = ({
|
|
|
2538
2538
|
setSorter: g,
|
|
2539
2539
|
totalItems: b,
|
|
2540
2540
|
setTotalItems: x,
|
|
2541
|
-
searchTreeNameSearch:
|
|
2541
|
+
searchTreeNameSearch: I,
|
|
2542
2542
|
setSearchTreeNameSearch: C,
|
|
2543
2543
|
setGraphIsLoading: z,
|
|
2544
2544
|
graphIsLoading: fe,
|
|
2545
2545
|
previousView: Y,
|
|
2546
2546
|
setPreviousView: me,
|
|
2547
2547
|
goToResourceId: T,
|
|
2548
|
-
searchValues:
|
|
2548
|
+
searchValues: ve,
|
|
2549
2549
|
setSearchValues: $e,
|
|
2550
2550
|
limit: ue,
|
|
2551
|
-
setLimit:
|
|
2551
|
+
setLimit: we,
|
|
2552
2552
|
setTitle: J,
|
|
2553
2553
|
isActive: D,
|
|
2554
|
-
setTreeFirstVisibleRow:
|
|
2554
|
+
setTreeFirstVisibleRow: Oe,
|
|
2555
2555
|
treeFirstVisibleRow: Le,
|
|
2556
2556
|
searchQuery: Ee,
|
|
2557
2557
|
setSearchQuery: Ke,
|
|
@@ -2642,7 +2642,7 @@ const Jc = ({
|
|
|
2642
2642
|
}
|
|
2643
2643
|
}, on = pt(Qc);
|
|
2644
2644
|
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 || {});
|
|
2645
|
-
const
|
|
2645
|
+
const ty = Object.values(sn), Zc = (e) => {
|
|
2646
2646
|
const { model: t, domain: n = [], context: r = {}, view_id: o, manualIds: s } = e, [a, l] = S(!1), [c, u] = S(), [f, d] = S(), [p] = Je(
|
|
2647
2647
|
P.getHandler().readForView
|
|
2648
2648
|
), h = B(async () => {
|
|
@@ -3019,7 +3019,7 @@ const Lt = ({
|
|
|
3019
3019
|
return /* @__PURE__ */ i(oo, { color: s, children: r });
|
|
3020
3020
|
}, oo = (e) => {
|
|
3021
3021
|
let { color: t } = e, n = {};
|
|
3022
|
-
return !
|
|
3022
|
+
return !Il(e.color) && !Al(e.color) && (n = {
|
|
3023
3023
|
color: t,
|
|
3024
3024
|
borderColor: t,
|
|
3025
3025
|
borderStyle: "solid",
|
|
@@ -3029,20 +3029,20 @@ const Lt = ({
|
|
|
3029
3029
|
const { ooui: t } = e;
|
|
3030
3030
|
return /* @__PURE__ */ i(Re, { type: "array", ...e, children: /* @__PURE__ */ i(gd, { ooui: t }) });
|
|
3031
3031
|
}, gd = (e) => {
|
|
3032
|
-
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((
|
|
3032
|
+
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((I) => I.operation !== "pendingRemove").map((I) => I.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: y } = n, v = oe(He), { getContext: g } = v || {};
|
|
3033
3033
|
yt(() => {
|
|
3034
3034
|
x();
|
|
3035
3035
|
}, [o]);
|
|
3036
|
-
const b = (
|
|
3036
|
+
const b = (I) => {
|
|
3037
3037
|
r == null || r({
|
|
3038
|
-
items:
|
|
3038
|
+
items: I
|
|
3039
3039
|
});
|
|
3040
3040
|
};
|
|
3041
3041
|
async function x() {
|
|
3042
3042
|
d(!0);
|
|
3043
|
-
let
|
|
3043
|
+
let I = [];
|
|
3044
3044
|
try {
|
|
3045
|
-
if (m && (
|
|
3045
|
+
if (m && (I = [["id", "in", s]]), n.domain) {
|
|
3046
3046
|
const A = await P.getHandler().evalDomain({
|
|
3047
3047
|
domain: n.domain,
|
|
3048
3048
|
values: Lt({
|
|
@@ -3052,11 +3052,11 @@ const Lt = ({
|
|
|
3052
3052
|
fields: v == null ? void 0 : v.getFields(),
|
|
3053
3053
|
context: v.getContext()
|
|
3054
3054
|
});
|
|
3055
|
-
|
|
3055
|
+
I = [...I, ...A];
|
|
3056
3056
|
}
|
|
3057
3057
|
const T = (await P.getHandler().search({
|
|
3058
3058
|
model: p,
|
|
3059
|
-
params:
|
|
3059
|
+
params: I,
|
|
3060
3060
|
fieldsToRetrieve: [y],
|
|
3061
3061
|
context: { ...g == null ? void 0 : g(), ...h }
|
|
3062
3062
|
})).map((A) => {
|
|
@@ -3071,16 +3071,16 @@ const Lt = ({
|
|
|
3071
3071
|
d(!1);
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
|
-
const
|
|
3075
|
-
const C = o.map((A) =>
|
|
3074
|
+
const O = (I) => {
|
|
3075
|
+
const C = o.map((A) => I.includes(A.id) ? A.operation === "pendingRemove" ? {
|
|
3076
3076
|
...A,
|
|
3077
3077
|
operation: "pendingLink"
|
|
3078
3078
|
} : A : { id: A.id, operation: "pendingRemove" }), T = C.map((A) => A.id);
|
|
3079
|
-
|
|
3079
|
+
I.filter((A) => !T.includes(A)).forEach((A) => {
|
|
3080
3080
|
C.push({ id: A, operation: "pendingLink" });
|
|
3081
3081
|
}), b(C);
|
|
3082
|
-
}, w = (
|
|
3083
|
-
const { label: C, closable: T, onClose: A } =
|
|
3082
|
+
}, w = (I) => {
|
|
3083
|
+
const { label: C, closable: T, onClose: A } = I, D = (_) => {
|
|
3084
3084
|
_.preventDefault(), _.stopPropagation();
|
|
3085
3085
|
}, F = vn(C);
|
|
3086
3086
|
return /* @__PURE__ */ i(
|
|
@@ -3104,9 +3104,9 @@ const Lt = ({
|
|
|
3104
3104
|
bordered: !m,
|
|
3105
3105
|
disabled: m,
|
|
3106
3106
|
options: a,
|
|
3107
|
-
onChange:
|
|
3107
|
+
onChange: O,
|
|
3108
3108
|
loading: f,
|
|
3109
|
-
filterOption: (
|
|
3109
|
+
filterOption: (I, C) => C.label.toLowerCase().includes(I.toString())
|
|
3110
3110
|
}
|
|
3111
3111
|
) }) });
|
|
3112
3112
|
}, yd = (e) => {
|
|
@@ -3168,7 +3168,7 @@ const Lt = ({
|
|
|
3168
3168
|
case "fiber_grid":
|
|
3169
3169
|
return yc;
|
|
3170
3170
|
case "timeline":
|
|
3171
|
-
return
|
|
3171
|
+
return Ic;
|
|
3172
3172
|
case "indicator":
|
|
3173
3173
|
return id;
|
|
3174
3174
|
case "tags":
|
|
@@ -3188,13 +3188,14 @@ const Lt = ({
|
|
|
3188
3188
|
case "arrow_steps":
|
|
3189
3189
|
return Bh;
|
|
3190
3190
|
case "codeeditor":
|
|
3191
|
+
case "json":
|
|
3191
3192
|
return Hh;
|
|
3192
3193
|
case "comments_timeline":
|
|
3193
|
-
return zh;
|
|
3194
|
-
case "html_preview":
|
|
3195
3194
|
return Jh;
|
|
3196
|
-
case "
|
|
3195
|
+
case "html_preview":
|
|
3197
3196
|
return Xh;
|
|
3197
|
+
case "alert":
|
|
3198
|
+
return Qh;
|
|
3198
3199
|
default:
|
|
3199
3200
|
return;
|
|
3200
3201
|
}
|
|
@@ -3280,12 +3281,12 @@ const Lt = ({
|
|
|
3280
3281
|
minHeight: 0,
|
|
3281
3282
|
minWidth: 0
|
|
3282
3283
|
}, children: c });
|
|
3283
|
-
}, { confirm:
|
|
3284
|
+
}, { confirm: Od } = at, an = ({
|
|
3284
3285
|
onOk: e,
|
|
3285
3286
|
onCancel: t,
|
|
3286
3287
|
t: n
|
|
3287
3288
|
}) => {
|
|
3288
|
-
|
|
3289
|
+
Od({
|
|
3289
3290
|
title: n("unsavedChanges"),
|
|
3290
3291
|
icon: /* @__PURE__ */ i(_t, {}),
|
|
3291
3292
|
centered: !0,
|
|
@@ -3295,8 +3296,8 @@ const Lt = ({
|
|
|
3295
3296
|
onCancel: t,
|
|
3296
3297
|
cancelText: n("cancel")
|
|
3297
3298
|
});
|
|
3298
|
-
}, { error:
|
|
3299
|
-
|
|
3299
|
+
}, { error: Id } = at, Mo = (e) => {
|
|
3300
|
+
Id({
|
|
3300
3301
|
title: e("formHasErrors"),
|
|
3301
3302
|
icon: /* @__PURE__ */ i(_t, {}),
|
|
3302
3303
|
centered: !0,
|
|
@@ -3330,7 +3331,7 @@ const Lt = ({
|
|
|
3330
3331
|
wt
|
|
3331
3332
|
), { openAction: u } = c || {}, f = Q([]), { t: d } = he();
|
|
3332
3333
|
ht(t, () => ({
|
|
3333
|
-
openActionModal:
|
|
3334
|
+
openActionModal: O
|
|
3334
3335
|
}));
|
|
3335
3336
|
const [p, h] = S(!1), [m, y] = S(
|
|
3336
3337
|
{
|
|
@@ -3445,7 +3446,7 @@ const Lt = ({
|
|
|
3445
3446
|
id: ((G = F == null ? void 0 : F.view_id) == null ? void 0 : G[0]) || void 0,
|
|
3446
3447
|
context: $
|
|
3447
3448
|
});
|
|
3448
|
-
return
|
|
3449
|
+
return O({
|
|
3449
3450
|
domain: R,
|
|
3450
3451
|
model: F.res_model,
|
|
3451
3452
|
formView: W,
|
|
@@ -3471,7 +3472,7 @@ const Lt = ({
|
|
|
3471
3472
|
}), { closeParent: !0 };
|
|
3472
3473
|
}
|
|
3473
3474
|
}
|
|
3474
|
-
function
|
|
3475
|
+
function O({
|
|
3475
3476
|
domain: C,
|
|
3476
3477
|
model: T,
|
|
3477
3478
|
formView: A,
|
|
@@ -3495,7 +3496,7 @@ const Lt = ({
|
|
|
3495
3496
|
actionData: void 0
|
|
3496
3497
|
}), h(!1), await new Promise((_) => setTimeout(_, 300)), y({ domain: C, model: T, context: D, formView: A, actionData: F }), h(!0);
|
|
3497
3498
|
}
|
|
3498
|
-
async function
|
|
3499
|
+
async function I() {
|
|
3499
3500
|
Lo(f.current), f.current = [], h(!1), y({
|
|
3500
3501
|
domain: void 0,
|
|
3501
3502
|
model: void 0,
|
|
@@ -3534,7 +3535,7 @@ const Lt = ({
|
|
|
3534
3535
|
model: m.model,
|
|
3535
3536
|
formView: m.formView,
|
|
3536
3537
|
visible: p,
|
|
3537
|
-
onSubmitSucceed:
|
|
3538
|
+
onSubmitSucceed: I,
|
|
3538
3539
|
onCancel: () => {
|
|
3539
3540
|
Lo(f.current), f.current = [], h(!1), y({
|
|
3540
3541
|
domain: void 0,
|
|
@@ -3629,26 +3630,26 @@ function kd(e, t) {
|
|
|
3629
3630
|
parentContext: g = {},
|
|
3630
3631
|
actionDomain: b,
|
|
3631
3632
|
visible: x = !0,
|
|
3632
|
-
rootForm:
|
|
3633
|
+
rootForm: O = !1,
|
|
3633
3634
|
defaultValues: w,
|
|
3634
|
-
forcedValues:
|
|
3635
|
+
forcedValues: I = {},
|
|
3635
3636
|
parentWidth: C,
|
|
3636
3637
|
onMustRefreshParent: T
|
|
3637
|
-
} = e, { t: A } = he(), [D, F] = S(!1), [_, $] = S(), [R, G] = S(), [W] = ut.useForm(), [L, N] = S(), [k, X] = S(), te = oe(ds), [ie, H] = S(), [ne, ee] = S(!1), V = Q(), M = Q({}), j = Q({}), fe = Q(!1), z = Q(!1), Y = Q(!1),
|
|
3638
|
+
} = e, { t: A } = he(), [D, F] = S(!1), [_, $] = S(), [R, G] = S(), [W] = ut.useForm(), [L, N] = S(), [k, X] = S(), te = oe(ds), [ie, H] = S(), [ne, ee] = S(!1), V = Q(), M = Q({}), j = Q({}), fe = Q(!1), z = Q(!1), Y = Q(!1), ve = (C !== void 0 ? C : ie) < Pd, $e = oe(He), { activeId: Le, getPlainValues: Oe } = $e || {}, Ee = Q(!1), Ke = oe(
|
|
3638
3639
|
lt
|
|
3639
3640
|
), {
|
|
3640
3641
|
setFormIsSaving: Fe = void 0,
|
|
3641
3642
|
setFormHasChanges: ce = void 0,
|
|
3642
3643
|
setCurrentId: ue = void 0,
|
|
3643
|
-
setFormIsLoading:
|
|
3644
|
+
setFormIsLoading: we = void 0,
|
|
3644
3645
|
setAttachments: _e = void 0,
|
|
3645
3646
|
title: J = void 0,
|
|
3646
3647
|
setTitle: Ce = void 0
|
|
3647
|
-
} = (
|
|
3648
|
+
} = (O ? Ke : {}) || {}, Se = oe(
|
|
3648
3649
|
ln
|
|
3649
3650
|
), { processAction: Ue, globalValues: Me } = Se || {};
|
|
3650
3651
|
ht(t, () => ({
|
|
3651
|
-
submitForm:
|
|
3652
|
+
submitForm: On,
|
|
3652
3653
|
getFields: rt,
|
|
3653
3654
|
getValues: q,
|
|
3654
3655
|
getPlainValues: ge,
|
|
@@ -3673,7 +3674,7 @@ function kd(e, t) {
|
|
|
3673
3674
|
}, [ne]);
|
|
3674
3675
|
const re = (U, K, se, le) => {
|
|
3675
3676
|
ce == null || ce(!1), Fe == null || Fe(!1), s == null || s(U, K, se, le), ue == null || ue(U), Ee.current && (T == null || T());
|
|
3676
|
-
},
|
|
3677
|
+
}, Ie = () => {
|
|
3677
3678
|
Ee.current && (T == null || T()), Fe == null || Fe(!1), o == null || o();
|
|
3678
3679
|
}, qe = (U) => {
|
|
3679
3680
|
Fe == null || Fe(!1), u == null || u(U);
|
|
@@ -3758,7 +3759,7 @@ function kd(e, t) {
|
|
|
3758
3759
|
}
|
|
3759
3760
|
}
|
|
3760
3761
|
const Be = async () => {
|
|
3761
|
-
$(void 0),
|
|
3762
|
+
$(void 0), we == null || we(!0);
|
|
3762
3763
|
let U;
|
|
3763
3764
|
try {
|
|
3764
3765
|
m ? U = { arch: m.arch, fields: m.fields } : U = await Zn();
|
|
@@ -3768,11 +3769,11 @@ function kd(e, t) {
|
|
|
3768
3769
|
arch: se
|
|
3769
3770
|
});
|
|
3770
3771
|
} catch (K) {
|
|
3771
|
-
$(K != null && K.message ? K.message + K.stack : K),
|
|
3772
|
+
$(K != null && K.message ? K.message + K.stack : K), we == null || we(!1);
|
|
3772
3773
|
}
|
|
3773
3774
|
}, ze = async (U) => {
|
|
3774
3775
|
let K, se, le, Te;
|
|
3775
|
-
|
|
3776
|
+
we == null || we(!0), $(void 0), U != null && U.fields ? (se = U.fields, le = U.arch) : (se = k, le = L), h && (U == null ? void 0 : U.forceRefresh) !== !0 ? K = h : { values: K, defaultGetCalled: Te } = await da({
|
|
3776
3777
|
fields: se,
|
|
3777
3778
|
arch: le
|
|
3778
3779
|
}), b && (K = { ...ud(b), ...K }), M.current = Wt(K, se), mt({
|
|
@@ -3780,17 +3781,17 @@ function kd(e, t) {
|
|
|
3780
3781
|
fields: se,
|
|
3781
3782
|
reset: !0,
|
|
3782
3783
|
isDefaultGet: Te
|
|
3783
|
-
}), fn({ fields: se, arch: le, values: K }),
|
|
3784
|
+
}), fn({ fields: se, arch: le, values: K }), we == null || we(!1), ce == null || ce(!1), Te && ee(!0);
|
|
3784
3785
|
}, xt = async () => new Promise(async (U) => {
|
|
3785
3786
|
Ye() ? an({
|
|
3786
3787
|
t: A,
|
|
3787
3788
|
onOk: () => {
|
|
3788
|
-
|
|
3789
|
+
Ie == null || Ie(), U(!0);
|
|
3789
3790
|
},
|
|
3790
3791
|
onCancel: () => {
|
|
3791
3792
|
U(!1);
|
|
3792
3793
|
}
|
|
3793
|
-
}) : (
|
|
3794
|
+
}) : (Ie == null || Ie(), U(!0));
|
|
3794
3795
|
}), Zn = async () => {
|
|
3795
3796
|
if (l) {
|
|
3796
3797
|
const U = await P.getHandler().getActionStringForModel(n);
|
|
@@ -3861,7 +3862,7 @@ function kd(e, t) {
|
|
|
3861
3862
|
await P.getHandler().update({
|
|
3862
3863
|
model: n,
|
|
3863
3864
|
id: pe(),
|
|
3864
|
-
values: { ...se, ...
|
|
3865
|
+
values: { ...se, ...I },
|
|
3865
3866
|
fields: k,
|
|
3866
3867
|
context: {
|
|
3867
3868
|
...g,
|
|
@@ -3871,7 +3872,7 @@ function kd(e, t) {
|
|
|
3871
3872
|
} else {
|
|
3872
3873
|
const se = ke(k), le = await P.getHandler().create({
|
|
3873
3874
|
model: n,
|
|
3874
|
-
values: { ...se, ...
|
|
3875
|
+
values: { ...se, ...I },
|
|
3875
3876
|
fields: k,
|
|
3876
3877
|
context: {
|
|
3877
3878
|
...g,
|
|
@@ -3884,7 +3885,7 @@ function kd(e, t) {
|
|
|
3884
3885
|
}, ua = async (U) => {
|
|
3885
3886
|
const { callOnSubmitSucceed: K = !0 } = U || {};
|
|
3886
3887
|
!v && K && (re == null || re(pe(), q(), Ae()));
|
|
3887
|
-
},
|
|
3888
|
+
}, On = async (U) => {
|
|
3888
3889
|
let K = !1;
|
|
3889
3890
|
const { callOnSubmitSucceed: se = !0 } = U || {};
|
|
3890
3891
|
if (z.current = !0, $(void 0), Y.current && !Ye() && pe() && se) {
|
|
@@ -3898,7 +3899,7 @@ function kd(e, t) {
|
|
|
3898
3899
|
return d && (V.current = void 0, mt({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: le };
|
|
3899
3900
|
}
|
|
3900
3901
|
if (!Ye() && pe() && se)
|
|
3901
|
-
return z.current = !1, ce == null || ce(!1),
|
|
3902
|
+
return z.current = !1, ce == null || ce(!1), Ie == null || Ie(), { succeed: !0, id: pe() };
|
|
3902
3903
|
if (await St())
|
|
3903
3904
|
return z.current = !1, Mo(A), { succeed: !1, id: pe() };
|
|
3904
3905
|
F(!0), Fe == null || Fe(!0);
|
|
@@ -3996,7 +3997,7 @@ function kd(e, t) {
|
|
|
3996
3997
|
...R == null ? void 0 : R.context
|
|
3997
3998
|
}
|
|
3998
3999
|
},
|
|
3999
|
-
parentValues:
|
|
4000
|
+
parentValues: Oe == null ? void 0 : Oe(),
|
|
4000
4001
|
onChangeFieldActionArgs: K.args
|
|
4001
4002
|
}), le = await P.getHandler().executeOnChange({
|
|
4002
4003
|
model: n,
|
|
@@ -4108,7 +4109,7 @@ function kd(e, t) {
|
|
|
4108
4109
|
Ee.current = !0, await ze({ forceRefresh: !0 });
|
|
4109
4110
|
}
|
|
4110
4111
|
})) || {};
|
|
4111
|
-
!
|
|
4112
|
+
!O && se && (re == null || re(pe(), q(), Ae()));
|
|
4112
4113
|
}
|
|
4113
4114
|
function va() {
|
|
4114
4115
|
er({ elementHasLostFocus: !0 });
|
|
@@ -4127,7 +4128,7 @@ function kd(e, t) {
|
|
|
4127
4128
|
context: se
|
|
4128
4129
|
}) {
|
|
4129
4130
|
if (U === "cancel") {
|
|
4130
|
-
|
|
4131
|
+
Ie == null || Ie();
|
|
4131
4132
|
return;
|
|
4132
4133
|
}
|
|
4133
4134
|
if (await St()) {
|
|
@@ -4136,7 +4137,7 @@ function kd(e, t) {
|
|
|
4136
4137
|
}
|
|
4137
4138
|
let le = !1;
|
|
4138
4139
|
try {
|
|
4139
|
-
!f && (Ye() || pe() === void 0) && (le = !0, tr(!0), p === "2many" ? (await go({ callOnSubmitSucceed: !1 }), Y.current = !0) : await
|
|
4140
|
+
!f && (Ye() || pe() === void 0) && (le = !0, tr(!0), p === "2many" ? (await go({ callOnSubmitSucceed: !1 }), Y.current = !0) : await On({ callOnSubmitSucceed: !1 }));
|
|
4140
4141
|
const Te = Y.current ? De() : {}, Qe = { ...se, ...Te };
|
|
4141
4142
|
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);
|
|
4142
4143
|
} catch (Te) {
|
|
@@ -4156,7 +4157,7 @@ function kd(e, t) {
|
|
|
4156
4157
|
getFieldValue: bt,
|
|
4157
4158
|
executeButtonAction: wa,
|
|
4158
4159
|
getContext: xe,
|
|
4159
|
-
submitForm:
|
|
4160
|
+
submitForm: On,
|
|
4160
4161
|
fetchValues: ze,
|
|
4161
4162
|
formHasChanges: Ye,
|
|
4162
4163
|
elementHasLostFocus: va,
|
|
@@ -4173,7 +4174,7 @@ function kd(e, t) {
|
|
|
4173
4174
|
Sr,
|
|
4174
4175
|
{
|
|
4175
4176
|
container: R.container,
|
|
4176
|
-
responsiveBehaviour:
|
|
4177
|
+
responsiveBehaviour: ve
|
|
4177
4178
|
}
|
|
4178
4179
|
)
|
|
4179
4180
|
}
|
|
@@ -4200,7 +4201,7 @@ function kd(e, t) {
|
|
|
4200
4201
|
loading: D,
|
|
4201
4202
|
icon: /* @__PURE__ */ i(Bn, {}),
|
|
4202
4203
|
onClick: async () => {
|
|
4203
|
-
await
|
|
4204
|
+
await On();
|
|
4204
4205
|
},
|
|
4205
4206
|
type: "primary",
|
|
4206
4207
|
children: "OK"
|
|
@@ -4234,7 +4235,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4234
4235
|
isMenuAction: a = !1,
|
|
4235
4236
|
actionData: l,
|
|
4236
4237
|
...c
|
|
4237
|
-
} = e, { model: u } = c, { modalWidth: f } = qn(), [d, p] = S(r), [h, m] = S(!1), [y, v] = S(), { action_id: g, res_id: b, action_type: x, view_id:
|
|
4238
|
+
} = e, { model: u } = c, { modalWidth: f } = qn(), [d, p] = S(r), [h, m] = S(!1), [y, v] = S(), { action_id: g, res_id: b, action_type: x, view_id: O } = l || {};
|
|
4238
4239
|
de(() => {
|
|
4239
4240
|
a && w();
|
|
4240
4241
|
}, [l, a]);
|
|
@@ -4242,12 +4243,12 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4242
4243
|
const A = await P.getHandler().isShortcutFavorite({
|
|
4243
4244
|
action_id: g,
|
|
4244
4245
|
action_type: x,
|
|
4245
|
-
view_id:
|
|
4246
|
+
view_id: O,
|
|
4246
4247
|
res_id: b || !1
|
|
4247
4248
|
});
|
|
4248
4249
|
m(A !== !1), A !== !1 && v(A);
|
|
4249
4250
|
}
|
|
4250
|
-
async function
|
|
4251
|
+
async function I() {
|
|
4251
4252
|
if (h && y)
|
|
4252
4253
|
await P.getHandler().removeFavourite({
|
|
4253
4254
|
shortcut_id: y
|
|
@@ -4271,7 +4272,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4271
4272
|
type: h ? "primary" : "default",
|
|
4272
4273
|
icon: h ? /* @__PURE__ */ i(Ha, { style: { color: "white" } }) : /* @__PURE__ */ i(Ua, {}),
|
|
4273
4274
|
style: { width: 30 },
|
|
4274
|
-
onClick:
|
|
4275
|
+
onClick: I
|
|
4275
4276
|
}
|
|
4276
4277
|
) }),
|
|
4277
4278
|
/* @__PURE__ */ i(be, { style: { paddingLeft: 10 }, children: d })
|
|
@@ -4299,7 +4300,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4299
4300
|
parentWidth: T,
|
|
4300
4301
|
...c
|
|
4301
4302
|
},
|
|
4302
|
-
`${u}-${n}-${g}-${b}-${x}-${
|
|
4303
|
+
`${u}-${n}-${g}-${b}-${x}-${O}-${r}`
|
|
4303
4304
|
)
|
|
4304
4305
|
}
|
|
4305
4306
|
) });
|
|
@@ -4529,7 +4530,7 @@ function fs(e) {
|
|
|
4529
4530
|
t.readOnly = !1, t.required = !1;
|
|
4530
4531
|
const { t: n } = he();
|
|
4531
4532
|
switch (t.type) {
|
|
4532
|
-
case
|
|
4533
|
+
case Ot.boolean: {
|
|
4533
4534
|
const o = new jr({
|
|
4534
4535
|
name: t._id,
|
|
4535
4536
|
string: t.label,
|
|
@@ -4540,16 +4541,16 @@ function fs(e) {
|
|
|
4540
4541
|
});
|
|
4541
4542
|
return /* @__PURE__ */ i(Yi, { layout: "vertical", ooui: o, showLabel: !0 });
|
|
4542
4543
|
}
|
|
4543
|
-
case
|
|
4544
|
-
case
|
|
4545
|
-
case
|
|
4546
|
-
case
|
|
4544
|
+
case Ot.float:
|
|
4545
|
+
case Ot.progressbar:
|
|
4546
|
+
case Ot.float_time:
|
|
4547
|
+
case Ot.integer:
|
|
4547
4548
|
return /* @__PURE__ */ i(Hd, { ooui: t, showLabel: !0 });
|
|
4548
|
-
case
|
|
4549
|
+
case Ot.date:
|
|
4549
4550
|
return /* @__PURE__ */ i(Nd, { ooui: t, layout: "vertical", showLabel: !0 });
|
|
4550
|
-
case
|
|
4551
|
+
case Ot.datetime:
|
|
4551
4552
|
return /* @__PURE__ */ i(Md, { ooui: t, layout: "vertical", showLabel: !0 });
|
|
4552
|
-
case
|
|
4553
|
+
case Ot.selection:
|
|
4553
4554
|
return /* @__PURE__ */ i(qd, { layout: "vertical", ooui: t, showLabel: !0 });
|
|
4554
4555
|
default:
|
|
4555
4556
|
return /* @__PURE__ */ i(
|
|
@@ -4695,9 +4696,9 @@ function ms(e) {
|
|
|
4695
4696
|
searchError: d,
|
|
4696
4697
|
searchValues: p,
|
|
4697
4698
|
showLimitOptions: h = !0
|
|
4698
|
-
} = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1),
|
|
4699
|
+
} = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1), O = Q(), { token: w } = iu(), [I] = ut.useForm();
|
|
4699
4700
|
de(() => {
|
|
4700
|
-
|
|
4701
|
+
I.setFieldsValue(p);
|
|
4701
4702
|
}, [p]);
|
|
4702
4703
|
const C = () => {
|
|
4703
4704
|
if (!v)
|
|
@@ -4706,7 +4707,7 @@ function ms(e) {
|
|
|
4706
4707
|
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)) }, $));
|
|
4707
4708
|
};
|
|
4708
4709
|
yt(() => {
|
|
4709
|
-
x(!1),
|
|
4710
|
+
x(!1), O.current = new Di(n, t), O.current.parse(), y(O.current._simpleSearchContainer), g(O.current._advancedSearchContainer);
|
|
4710
4711
|
}, [t, n]);
|
|
4711
4712
|
const T = C(), A = (D) => {
|
|
4712
4713
|
var R;
|
|
@@ -4714,7 +4715,7 @@ function ms(e) {
|
|
|
4714
4715
|
delete D.offset, delete D.limit;
|
|
4715
4716
|
const $ = Rn(
|
|
4716
4717
|
D,
|
|
4717
|
-
(R =
|
|
4718
|
+
(R = O.current) == null ? void 0 : R._advancedSearchContainer
|
|
4718
4719
|
);
|
|
4719
4720
|
o({ params: $, offset: _, limit: F, searchValues: D });
|
|
4720
4721
|
};
|
|
@@ -4732,7 +4733,7 @@ function ms(e) {
|
|
|
4732
4733
|
{
|
|
4733
4734
|
className: "p-3 shadow-md",
|
|
4734
4735
|
style: { borderRadius: w.borderRadius },
|
|
4735
|
-
form:
|
|
4736
|
+
form: I,
|
|
4736
4737
|
onFinish: A,
|
|
4737
4738
|
initialValues: { offset: a, limit: l },
|
|
4738
4739
|
children: [
|
|
@@ -4746,7 +4747,7 @@ function ms(e) {
|
|
|
4746
4747
|
x(!b);
|
|
4747
4748
|
},
|
|
4748
4749
|
onClear: () => {
|
|
4749
|
-
|
|
4750
|
+
I.resetFields(), r();
|
|
4750
4751
|
},
|
|
4751
4752
|
isSearching: s
|
|
4752
4753
|
}
|
|
@@ -4931,7 +4932,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4931
4932
|
}
|
|
4932
4933
|
),
|
|
4933
4934
|
/* @__PURE__ */ i(
|
|
4934
|
-
|
|
4935
|
+
Oo,
|
|
4935
4936
|
{
|
|
4936
4937
|
visible: r,
|
|
4937
4938
|
items: c == null ? void 0 : c.actionItems,
|
|
@@ -4942,7 +4943,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4942
4943
|
}
|
|
4943
4944
|
),
|
|
4944
4945
|
/* @__PURE__ */ i(
|
|
4945
|
-
|
|
4946
|
+
Oo,
|
|
4946
4947
|
{
|
|
4947
4948
|
visible: s,
|
|
4948
4949
|
items: c == null ? void 0 : c.printItems,
|
|
@@ -4965,21 +4966,21 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4965
4966
|
), v = B(() => {
|
|
4966
4967
|
h(), y();
|
|
4967
4968
|
}, [h, y]), g = B(async () => {
|
|
4968
|
-
var
|
|
4969
|
+
var I;
|
|
4969
4970
|
const x = await p({
|
|
4970
4971
|
model: n,
|
|
4971
4972
|
type: "form",
|
|
4972
4973
|
context: r
|
|
4973
4974
|
});
|
|
4974
4975
|
s(x);
|
|
4975
|
-
const
|
|
4976
|
+
const O = mu(x);
|
|
4976
4977
|
let w = {};
|
|
4977
|
-
if (
|
|
4978
|
+
if (O.length > 0 && (w = { ...(I = await m({
|
|
4978
4979
|
model: n,
|
|
4979
4980
|
ids: [t],
|
|
4980
|
-
fieldsToRetrieve:
|
|
4981
|
+
fieldsToRetrieve: O,
|
|
4981
4982
|
context: r
|
|
4982
|
-
})) == null ? void 0 :
|
|
4983
|
+
})) == null ? void 0 : I[0] }), w = { ...Wt(w, O), active_id: t }, l(w), !(!x || !x.toolbar))
|
|
4983
4984
|
return {
|
|
4984
4985
|
actionItems: x.toolbar.action,
|
|
4985
4986
|
relateItems: x.toolbar.relate,
|
|
@@ -4988,12 +4989,12 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4988
4989
|
}, [r, p, t, n, m]);
|
|
4989
4990
|
if (!t)
|
|
4990
4991
|
return null;
|
|
4991
|
-
function b({ item: x, type:
|
|
4992
|
+
function b({ item: x, type: O }) {
|
|
4992
4993
|
const w = {
|
|
4993
4994
|
values: a,
|
|
4994
4995
|
fields: o.fields
|
|
4995
4996
|
};
|
|
4996
|
-
switch (
|
|
4997
|
+
switch (O) {
|
|
4997
4998
|
case "action":
|
|
4998
4999
|
d == null || d({
|
|
4999
5000
|
actionData: x,
|
|
@@ -5124,7 +5125,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5124
5125
|
);
|
|
5125
5126
|
}, wu = ({
|
|
5126
5127
|
value: e
|
|
5127
|
-
}) =>
|
|
5128
|
+
}) => ye(
|
|
5128
5129
|
() => /* @__PURE__ */ i(
|
|
5129
5130
|
"div",
|
|
5130
5131
|
{
|
|
@@ -5138,7 +5139,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5138
5139
|
}
|
|
5139
5140
|
),
|
|
5140
5141
|
[e]
|
|
5141
|
-
), bu = ({ value: e }) =>
|
|
5142
|
+
), bu = ({ value: e }) => ye(() => /* @__PURE__ */ i(pu, { m2oField: e }), [e]), Su = ({ value: e }) => ye(
|
|
5142
5143
|
() => /* @__PURE__ */ i(
|
|
5143
5144
|
gn,
|
|
5144
5145
|
{
|
|
@@ -5146,7 +5147,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5146
5147
|
}
|
|
5147
5148
|
),
|
|
5148
5149
|
[e]
|
|
5149
|
-
), xu = ({ value: e }) =>
|
|
5150
|
+
), xu = ({ value: e }) => ye(() => {
|
|
5150
5151
|
if (!e || e && e.length === 0)
|
|
5151
5152
|
return /* @__PURE__ */ i(ae, {});
|
|
5152
5153
|
const t = st(
|
|
@@ -5154,7 +5155,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5154
5155
|
Ct.date.dateInternalFormat
|
|
5155
5156
|
).format(Ct.date.dateDisplayFormat);
|
|
5156
5157
|
return /* @__PURE__ */ i(ae, { children: t });
|
|
5157
|
-
}, [e]), Cu = ({ value: e }) =>
|
|
5158
|
+
}, [e]), Cu = ({ value: e }) => ye(() => {
|
|
5158
5159
|
if (!e || e && e.length === 0)
|
|
5159
5160
|
return /* @__PURE__ */ i(ae, {});
|
|
5160
5161
|
const t = st(
|
|
@@ -5164,15 +5165,15 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5164
5165
|
return /* @__PURE__ */ i(ae, { children: t });
|
|
5165
5166
|
}, [e]), Ho = ({
|
|
5166
5167
|
value: e
|
|
5167
|
-
}) =>
|
|
5168
|
+
}) => ye(() => {
|
|
5168
5169
|
const t = Array.isArray(e == null ? void 0 : e.items) ? e == null ? void 0 : e.items.length : 0;
|
|
5169
5170
|
return /* @__PURE__ */ i(ae, { children: `( ${t} )` });
|
|
5170
5171
|
}, [e]), Tu = ({
|
|
5171
5172
|
value: e
|
|
5172
|
-
}) =>
|
|
5173
|
+
}) => ye(() => /* @__PURE__ */ i(hs, { value: e }), [e]), Ou = ({ value: e }) => ye(() => /* @__PURE__ */ i(ae, { children: ps(e) }), [e]), Uo = ({ value: e }) => ye(
|
|
5173
5174
|
() => /* @__PURE__ */ i("div", { style: { textAlign: "right" }, children: e }),
|
|
5174
5175
|
[e]
|
|
5175
|
-
),
|
|
5176
|
+
), Iu = ({ value: e }) => ye(
|
|
5176
5177
|
() => /* @__PURE__ */ i(
|
|
5177
5178
|
"img",
|
|
5178
5179
|
{
|
|
@@ -5186,12 +5187,12 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5186
5187
|
key: t,
|
|
5187
5188
|
ooui: n,
|
|
5188
5189
|
context: r
|
|
5189
|
-
}) =>
|
|
5190
|
+
}) => ye(() => /* @__PURE__ */ i(cs, { ooui: n, value: e }), [n, e]), Fu = ({
|
|
5190
5191
|
value: e,
|
|
5191
5192
|
key: t,
|
|
5192
5193
|
ooui: n,
|
|
5193
5194
|
context: r
|
|
5194
|
-
}) =>
|
|
5195
|
+
}) => ye(() => {
|
|
5195
5196
|
let o = e;
|
|
5196
5197
|
return Array.isArray(e) && e.length === 2 && (o = e[0]), /* @__PURE__ */ i(ae, { children: n.selectionValues.get(o) });
|
|
5197
5198
|
}, [n, e]), Ru = ({
|
|
@@ -5199,7 +5200,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5199
5200
|
key: t,
|
|
5200
5201
|
ooui: n,
|
|
5201
5202
|
context: r
|
|
5202
|
-
}) =>
|
|
5203
|
+
}) => ye(
|
|
5203
5204
|
() => /* @__PURE__ */ i(
|
|
5204
5205
|
hu,
|
|
5205
5206
|
{
|
|
@@ -5214,7 +5215,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5214
5215
|
key: t,
|
|
5215
5216
|
ooui: n,
|
|
5216
5217
|
context: r
|
|
5217
|
-
}) =>
|
|
5218
|
+
}) => ye(() => /* @__PURE__ */ i(gu, { ooui: n, value: e }), [n, e]), Vu = ({
|
|
5218
5219
|
value: e,
|
|
5219
5220
|
key: t,
|
|
5220
5221
|
ooui: n,
|
|
@@ -5241,14 +5242,14 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5241
5242
|
de(() => {
|
|
5242
5243
|
e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
|
|
5243
5244
|
}, [e == null ? void 0 : e.items]);
|
|
5244
|
-
const d =
|
|
5245
|
+
const d = ye(
|
|
5245
5246
|
() => o.map((p) => {
|
|
5246
5247
|
const { id: h, name: m } = p, y = vn(m);
|
|
5247
5248
|
return /* @__PURE__ */ i(oo, { color: y, children: m }, `${h}`);
|
|
5248
5249
|
}),
|
|
5249
5250
|
[o]
|
|
5250
5251
|
);
|
|
5251
|
-
return
|
|
5252
|
+
return ye(() => a ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ i(
|
|
5252
5253
|
"div",
|
|
5253
5254
|
{
|
|
5254
5255
|
style: {
|
|
@@ -5266,8 +5267,8 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5266
5267
|
one2many: Ho,
|
|
5267
5268
|
many2many: Ho,
|
|
5268
5269
|
progressbar: Tu,
|
|
5269
|
-
float_time:
|
|
5270
|
-
image:
|
|
5270
|
+
float_time: Ou,
|
|
5271
|
+
image: Iu,
|
|
5271
5272
|
integer: Uo,
|
|
5272
5273
|
float: Uo,
|
|
5273
5274
|
reference: Ru,
|
|
@@ -5299,13 +5300,13 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5299
5300
|
sorter: g,
|
|
5300
5301
|
onFetchChildrenForRecord: b,
|
|
5301
5302
|
childField: x,
|
|
5302
|
-
rootTree:
|
|
5303
|
+
rootTree: O = !1,
|
|
5303
5304
|
context: w,
|
|
5304
|
-
readonly:
|
|
5305
|
+
readonly: I,
|
|
5305
5306
|
onSelectAllRecords: C
|
|
5306
5307
|
} = e, T = Q(null), [A, D] = S([]), F = Q(!1), [_, $] = S(), { t: R } = he(), G = Q(r), W = oe(
|
|
5307
5308
|
lt
|
|
5308
|
-
), { title: L = void 0, setTitle: N = void 0 } = (
|
|
5309
|
+
), { title: L = void 0, setTitle: N = void 0 } = (O ? W : {}) || {}, k = ye(() => {
|
|
5309
5310
|
if (_)
|
|
5310
5311
|
return Zr(
|
|
5311
5312
|
_,
|
|
@@ -5321,7 +5322,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5321
5322
|
(j = T.current) == null || j.unselectAll();
|
|
5322
5323
|
}
|
|
5323
5324
|
})), de(() => {
|
|
5324
|
-
const j =
|
|
5325
|
+
const j = It(s);
|
|
5325
5326
|
$(j), j.string && L !== j.string && (N == null || N(j.string));
|
|
5326
5327
|
}, [s, L]), de(() => {
|
|
5327
5328
|
if (!_)
|
|
@@ -5332,7 +5333,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5332
5333
|
}, [a]), de(() => {
|
|
5333
5334
|
G.current = r;
|
|
5334
5335
|
}, [r]);
|
|
5335
|
-
const X = (n - 1) * G.current + 1, te = X - 1 + A.length, ie = o === void 0 ? null : o === 0 ? R("no_results") : R("summary").replace("{from}", X == null ? void 0 : X.toString()).replace("{to}", te == null ? void 0 : te.toString()).replace("{total}", o == null ? void 0 : o.toString()), H =
|
|
5336
|
+
const X = (n - 1) * G.current + 1, te = X - 1 + A.length, ie = o === void 0 ? null : o === 0 ? R("no_results") : R("summary").replace("{from}", X == null ? void 0 : X.toString()).replace("{to}", te == null ? void 0 : te.toString()).replace("{total}", o == null ? void 0 : o.toString()), H = ye(() => {
|
|
5336
5337
|
if (!f || s.isExpandable)
|
|
5337
5338
|
return null;
|
|
5338
5339
|
const j = A == null ? void 0 : A.filter(
|
|
@@ -5372,7 +5373,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5372
5373
|
ie,
|
|
5373
5374
|
o,
|
|
5374
5375
|
s.isExpandable
|
|
5375
|
-
]), ne =
|
|
5376
|
+
]), ne = ye(() => {
|
|
5376
5377
|
if (!_)
|
|
5377
5378
|
return null;
|
|
5378
5379
|
const j = _.columns.filter((Y) => Y.sum !== void 0).map((Y) => ({ label: Y.sum, field: Y.id }));
|
|
@@ -5380,13 +5381,13 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5380
5381
|
return null;
|
|
5381
5382
|
const fe = [], z = (d == null ? void 0 : d.length) > 0 ? A.filter((Y) => d.includes(Y.id)) : A;
|
|
5382
5383
|
return j.forEach((Y) => {
|
|
5383
|
-
const me = z.reduce((
|
|
5384
|
+
const me = z.reduce((ve, $e) => $e[Y.field] && !isNaN($e[Y.field]) ? ve + $e[Y.field] : ve, 0);
|
|
5384
5385
|
fe.push(`${Y.label}: ${Math.round(me * 100) / 100}`);
|
|
5385
5386
|
}), /* @__PURE__ */ i("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: fe.join(", ") });
|
|
5386
|
-
}, [A, d, _]), ee =
|
|
5387
|
+
}, [A, d, _]), ee = ye(() => {
|
|
5387
5388
|
if (_ !== null && k && k.length > 0)
|
|
5388
5389
|
return su(k, A, 600);
|
|
5389
|
-
}, [k, A, _]), V =
|
|
5390
|
+
}, [k, A, _]), V = ye(() => h && (_ != null && _.columns.some((j) => j.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
|
|
5390
5391
|
return _ === null || !ee || ((M = ee == null ? void 0 : ee.columns) == null ? void 0 : M.length) === 0 ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : /* @__PURE__ */ E(Vn, { children: [
|
|
5391
5392
|
H,
|
|
5392
5393
|
/* @__PURE__ */ i(
|
|
@@ -5410,7 +5411,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5410
5411
|
onRowSelectionChange: p,
|
|
5411
5412
|
onChangeSort: v,
|
|
5412
5413
|
sorter: g,
|
|
5413
|
-
readonly:
|
|
5414
|
+
readonly: I,
|
|
5414
5415
|
expandableOpts: b ? {
|
|
5415
5416
|
expandIcon: Ga,
|
|
5416
5417
|
collapseIcon: Ka,
|
|
@@ -5447,12 +5448,12 @@ const vs = (e) => {
|
|
|
5447
5448
|
resultsActionView: g,
|
|
5448
5449
|
domain: b,
|
|
5449
5450
|
currentId: x,
|
|
5450
|
-
limit:
|
|
5451
|
+
limit: O,
|
|
5451
5452
|
setLimit: w,
|
|
5452
|
-
searchParams:
|
|
5453
|
+
searchParams: I = [],
|
|
5453
5454
|
setSearchValues: C,
|
|
5454
5455
|
clearSelection: T
|
|
5455
|
-
} = e, [A, D] = S(!1), [F, _] = S(!1), [$, R] = S(), [G, W] = S(1), [L, N] = S(0), [k, X] = S(), [te, ie] = S([]), [H, ne] = S(void 0), [ee, V] = S(void 0), M = Q(
|
|
5456
|
+
} = e, [A, D] = S(!1), [F, _] = S(!1), [$, R] = S(), [G, W] = S(1), [L, N] = S(0), [k, X] = S(), [te, ie] = S([]), [H, ne] = S(void 0), [ee, V] = S(void 0), M = Q(O || $t), j = Q([]), fe = B(
|
|
5456
5457
|
(ce) => {
|
|
5457
5458
|
v == null || v([...ce]), ie([...ce]);
|
|
5458
5459
|
},
|
|
@@ -5466,8 +5467,8 @@ const vs = (e) => {
|
|
|
5466
5467
|
context: u
|
|
5467
5468
|
});
|
|
5468
5469
|
if (X(ce.length), f == null || f(ce.length), ce.length > 0) {
|
|
5469
|
-
const ue = ce.map((re) => re == null ? void 0 : re[0]), { colors:
|
|
5470
|
-
|
|
5470
|
+
const ue = ce.map((re) => re == null ? void 0 : re[0]), { colors: we, status: _e } = It(d), J = {};
|
|
5471
|
+
we && (J.colors = we), _e && (J.status = _e);
|
|
5471
5472
|
const Ce = await P.getHandler().readEvalUiObjects({
|
|
5472
5473
|
model: t,
|
|
5473
5474
|
ids: ue,
|
|
@@ -5500,25 +5501,25 @@ const vs = (e) => {
|
|
|
5500
5501
|
f
|
|
5501
5502
|
]), me = B(
|
|
5502
5503
|
async (ce) => {
|
|
5503
|
-
const { params: ue, newOffset:
|
|
5504
|
+
const { params: ue, newOffset: we } = ce || {}, _e = Zt(ue || I, b), { colors: J, status: Ce } = It(d), Se = {};
|
|
5504
5505
|
J && (Se.colors = J), Ce && (Se.status = Ce);
|
|
5505
5506
|
const { totalItems: Ue, results: Me, attrsEvaluated: re } = await P.getHandler().searchForTree({
|
|
5506
5507
|
params: _e,
|
|
5507
5508
|
limit: M.current,
|
|
5508
|
-
offset:
|
|
5509
|
+
offset: we || L,
|
|
5509
5510
|
model: t,
|
|
5510
5511
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
5511
5512
|
context: u,
|
|
5512
5513
|
attrs: Se
|
|
5513
5514
|
});
|
|
5514
5515
|
ne(Qt(re)), V(Dn(re)), j.current = [...Me];
|
|
5515
|
-
const
|
|
5516
|
+
const Ie = h !== void 0 ? Yt({
|
|
5516
5517
|
resultsToSort: Me,
|
|
5517
5518
|
sorter: h,
|
|
5518
5519
|
fields: { ...d.fields, ...p.fields }
|
|
5519
5520
|
}) : [...j.current];
|
|
5520
|
-
if (fe(
|
|
5521
|
-
const pe =
|
|
5521
|
+
if (fe(Ie), g && Ie.length > 0) {
|
|
5522
|
+
const pe = Ie.findIndex(
|
|
5522
5523
|
(rt) => x === rt.id
|
|
5523
5524
|
);
|
|
5524
5525
|
pe === -1 ? y == null || y(0) : y == null || y(pe);
|
|
@@ -5541,9 +5542,9 @@ const vs = (e) => {
|
|
|
5541
5542
|
h,
|
|
5542
5543
|
f,
|
|
5543
5544
|
L,
|
|
5544
|
-
|
|
5545
|
+
I
|
|
5545
5546
|
]
|
|
5546
|
-
),
|
|
5547
|
+
), ve = B(
|
|
5547
5548
|
async (ce) => {
|
|
5548
5549
|
try {
|
|
5549
5550
|
D(!0), a == null || a(!0), l && !c.current ? await Y() : await me(ce), T == null || T();
|
|
@@ -5584,8 +5585,8 @@ const vs = (e) => {
|
|
|
5584
5585
|
]
|
|
5585
5586
|
), Le = B(
|
|
5586
5587
|
(ce) => {
|
|
5587
|
-
const { params: ue, searchValues:
|
|
5588
|
-
A || (n == null || n(void 0), r == null || r([]), C == null || C(
|
|
5588
|
+
const { params: ue, searchValues: we, limit: _e, offset: J } = ce;
|
|
5589
|
+
A || (n == null || n(void 0), r == null || r([]), C == null || C(we), o == null || o(ue), s == null || s(!1), _(!0), R(void 0), W(1), _e && (M.current = _e, w == null || w(_e)), J && N(J), ve({
|
|
5589
5590
|
params: ue,
|
|
5590
5591
|
newOffset: J
|
|
5591
5592
|
}));
|
|
@@ -5597,44 +5598,44 @@ const vs = (e) => {
|
|
|
5597
5598
|
C,
|
|
5598
5599
|
o,
|
|
5599
5600
|
s,
|
|
5600
|
-
|
|
5601
|
+
ve,
|
|
5601
5602
|
w
|
|
5602
5603
|
]
|
|
5603
|
-
),
|
|
5604
|
+
), Oe = B(
|
|
5604
5605
|
(ce) => {
|
|
5605
|
-
D(!0), W(ce), N((ce - 1) *
|
|
5606
|
+
D(!0), W(ce), N((ce - 1) * O);
|
|
5606
5607
|
},
|
|
5607
|
-
[D,
|
|
5608
|
+
[D, O, N, W]
|
|
5608
5609
|
), Ee = B(() => {
|
|
5609
|
-
A || (n == null || n(void 0), o == null || o([]), C == null || C({}), R(void 0), N(0), W(1), w == null || w(
|
|
5610
|
+
A || (n == null || n(void 0), o == null || o([]), C == null || C({}), R(void 0), N(0), W(1), w == null || w(O || $t));
|
|
5610
5611
|
}, [
|
|
5611
5612
|
A,
|
|
5612
5613
|
n,
|
|
5613
5614
|
o,
|
|
5614
5615
|
C,
|
|
5615
5616
|
w,
|
|
5616
|
-
|
|
5617
|
+
O
|
|
5617
5618
|
]), Ke = B(
|
|
5618
5619
|
async (ce) => {
|
|
5619
|
-
const ue = ce[(d == null ? void 0 : d.field_parent) || "child_id"],
|
|
5620
|
+
const ue = ce[(d == null ? void 0 : d.field_parent) || "child_id"], we = await P.getHandler().readObjects({
|
|
5620
5621
|
model: t,
|
|
5621
5622
|
ids: ue,
|
|
5622
5623
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
5623
5624
|
context: u
|
|
5624
5625
|
});
|
|
5625
|
-
return fe([...z(), ...
|
|
5626
|
+
return fe([...z(), ...we]), zn(It(d), we);
|
|
5626
5627
|
},
|
|
5627
5628
|
[d, t, u, z, fe]
|
|
5628
5629
|
), Fe = B(async () => await P.getHandler().searchAllIds({
|
|
5629
|
-
params: Zt(
|
|
5630
|
+
params: Zt(I, b),
|
|
5630
5631
|
model: t,
|
|
5631
5632
|
context: u,
|
|
5632
5633
|
totalItems: k
|
|
5633
|
-
}), [t, u, k,
|
|
5634
|
+
}), [t, u, k, I, b]);
|
|
5634
5635
|
return {
|
|
5635
5636
|
submit: Le,
|
|
5636
5637
|
clear: Ee,
|
|
5637
|
-
fetchResults:
|
|
5638
|
+
fetchResults: ve,
|
|
5638
5639
|
tableRefreshing: A,
|
|
5639
5640
|
searchFilterLoading: F,
|
|
5640
5641
|
searchError: $,
|
|
@@ -5642,7 +5643,7 @@ const vs = (e) => {
|
|
|
5642
5643
|
offset: L,
|
|
5643
5644
|
limit: M.current,
|
|
5644
5645
|
getResults: z,
|
|
5645
|
-
requestPageChange:
|
|
5646
|
+
requestPageChange: Oe,
|
|
5646
5647
|
changeSort: $e,
|
|
5647
5648
|
fetchChildrenForRecord: Ke,
|
|
5648
5649
|
colorsForResults: H,
|
|
@@ -5665,7 +5666,7 @@ function Du(e, t) {
|
|
|
5665
5666
|
rootTree: f = !1,
|
|
5666
5667
|
parentContext: d = {},
|
|
5667
5668
|
onChangeSelectedRowKeys: p
|
|
5668
|
-
} = e, [h, m] = S(!1), [y, v] = S(!1), g = Q(!1), b = Q(null), [x,
|
|
5669
|
+
} = e, [h, m] = S(!1), [y, v] = S(!1), g = Q(!1), b = Q(null), [x, O] = S(), [w, I] = S(), [C, T] = S(), [A, D] = S(), [F, _] = S(200), $ = Q(), { height: R } = qn(), G = oe(
|
|
5669
5670
|
ln
|
|
5670
5671
|
), { processAction: W } = G || {}, L = oe(
|
|
5671
5672
|
lt
|
|
@@ -5685,10 +5686,10 @@ function Du(e, t) {
|
|
|
5685
5686
|
setTotalItems: z = void 0,
|
|
5686
5687
|
setSearchTreeNameSearch: Y = void 0,
|
|
5687
5688
|
setTreeIsLoading: me = void 0,
|
|
5688
|
-
searchValues:
|
|
5689
|
+
searchValues: ve = {},
|
|
5689
5690
|
setSearchValues: $e = void 0,
|
|
5690
5691
|
limit: Le = $t,
|
|
5691
|
-
setLimit:
|
|
5692
|
+
setLimit: Oe = void 0
|
|
5692
5693
|
} = (f ? L : {}) || {}, Ee = B(
|
|
5693
5694
|
(Be) => {
|
|
5694
5695
|
H == null || H(Be.map((ze) => ({ id: ze }))), p == null || p(Be);
|
|
@@ -5699,7 +5700,7 @@ function Du(e, t) {
|
|
|
5699
5700
|
clear: Fe,
|
|
5700
5701
|
fetchResults: ce,
|
|
5701
5702
|
tableRefreshing: ue,
|
|
5702
|
-
searchFilterLoading:
|
|
5703
|
+
searchFilterLoading: we,
|
|
5703
5704
|
searchError: _e,
|
|
5704
5705
|
page: J,
|
|
5705
5706
|
limit: Ce,
|
|
@@ -5707,7 +5708,7 @@ function Du(e, t) {
|
|
|
5707
5708
|
getResults: Ue,
|
|
5708
5709
|
requestPageChange: Me,
|
|
5709
5710
|
changeSort: re,
|
|
5710
|
-
fetchChildrenForRecord:
|
|
5711
|
+
fetchChildrenForRecord: Ie,
|
|
5711
5712
|
colorsForResults: qe,
|
|
5712
5713
|
statusForResults: pe,
|
|
5713
5714
|
totalItems: rt,
|
|
@@ -5735,7 +5736,7 @@ function Du(e, t) {
|
|
|
5735
5736
|
currentId: X,
|
|
5736
5737
|
setActionViewTotalItems: z,
|
|
5737
5738
|
limit: Le,
|
|
5738
|
-
setLimit:
|
|
5739
|
+
setLimit: Oe,
|
|
5739
5740
|
clearSelection: (St = b.current) == null ? void 0 : St.unselectAll
|
|
5740
5741
|
});
|
|
5741
5742
|
ht(t, () => ({
|
|
@@ -5757,7 +5758,7 @@ function Du(e, t) {
|
|
|
5757
5758
|
m(!1);
|
|
5758
5759
|
}
|
|
5759
5760
|
}, Ae = async () => {
|
|
5760
|
-
|
|
5761
|
+
O(n);
|
|
5761
5762
|
let Be = r;
|
|
5762
5763
|
r || (Be = await P.getHandler().getView({
|
|
5763
5764
|
model: n,
|
|
@@ -5769,16 +5770,16 @@ function Du(e, t) {
|
|
|
5769
5770
|
model: n,
|
|
5770
5771
|
type: "tree",
|
|
5771
5772
|
context: d
|
|
5772
|
-
})), T(Be),
|
|
5773
|
+
})), T(Be), I(ze);
|
|
5773
5774
|
};
|
|
5774
5775
|
de(() => {
|
|
5775
5776
|
ge();
|
|
5776
5777
|
}, [n]);
|
|
5777
5778
|
const xe = B(
|
|
5778
5779
|
(Be) => {
|
|
5779
|
-
|
|
5780
|
+
Oe == null || Oe(Be);
|
|
5780
5781
|
},
|
|
5781
|
-
[
|
|
5782
|
+
[Oe]
|
|
5782
5783
|
), De = B(
|
|
5783
5784
|
async (Be) => {
|
|
5784
5785
|
const { id: ze } = Be;
|
|
@@ -5821,7 +5822,7 @@ function Du(e, t) {
|
|
|
5821
5822
|
), Pe = B(async () => {
|
|
5822
5823
|
const Be = await q();
|
|
5823
5824
|
H == null || H(Be.map((ze) => ({ id: ze }))), p == null || p(Be);
|
|
5824
|
-
}, [q, p, H]), Ye =
|
|
5825
|
+
}, [q, p, H]), Ye = ye(() => w != null && w.isExpandable ? R - 160 : R - (F + 240), [R, F, w == null ? void 0 : w.isExpandable]), ke = ye(
|
|
5825
5826
|
() => ie == null ? void 0 : ie.map((Be) => Be.id),
|
|
5826
5827
|
[ie]
|
|
5827
5828
|
), ot = B(() => !w || !C ? null : /* @__PURE__ */ E(ae, { children: [
|
|
@@ -5836,13 +5837,13 @@ function Du(e, t) {
|
|
|
5836
5837
|
onClear: Fe,
|
|
5837
5838
|
limit: Le,
|
|
5838
5839
|
offset: Se,
|
|
5839
|
-
isSearching:
|
|
5840
|
+
isSearching: we,
|
|
5840
5841
|
onSubmit: Ke,
|
|
5841
5842
|
onLimitChange: xe,
|
|
5842
5843
|
setSearchFilterHeight: _,
|
|
5843
5844
|
searchError: _e,
|
|
5844
5845
|
searchVisible: V,
|
|
5845
|
-
searchValues:
|
|
5846
|
+
searchValues: ve
|
|
5846
5847
|
}
|
|
5847
5848
|
),
|
|
5848
5849
|
/* @__PURE__ */ i(
|
|
@@ -5865,7 +5866,7 @@ function Du(e, t) {
|
|
|
5865
5866
|
onRowSelectionChange: Ee,
|
|
5866
5867
|
sorter: j,
|
|
5867
5868
|
onChangeSort: re,
|
|
5868
|
-
onFetchChildrenForRecord: w.isExpandable ?
|
|
5869
|
+
onFetchChildrenForRecord: w.isExpandable ? Ie : void 0,
|
|
5869
5870
|
childField: w.field_parent,
|
|
5870
5871
|
rootTree: f,
|
|
5871
5872
|
onSelectAllRecords: Pe
|
|
@@ -5877,7 +5878,7 @@ function Du(e, t) {
|
|
|
5877
5878
|
re,
|
|
5878
5879
|
Fe,
|
|
5879
5880
|
qe,
|
|
5880
|
-
|
|
5881
|
+
Ie,
|
|
5881
5882
|
C,
|
|
5882
5883
|
Ue,
|
|
5883
5884
|
Le,
|
|
@@ -5890,8 +5891,8 @@ function Du(e, t) {
|
|
|
5890
5891
|
Me,
|
|
5891
5892
|
f,
|
|
5892
5893
|
_e,
|
|
5894
|
+
we,
|
|
5893
5895
|
ve,
|
|
5894
|
-
ye,
|
|
5895
5896
|
V,
|
|
5896
5897
|
Pe,
|
|
5897
5898
|
ke,
|
|
@@ -5939,10 +5940,10 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5939
5940
|
domain: a,
|
|
5940
5941
|
context: l = {}
|
|
5941
5942
|
} = e, [c, u] = S(!1), { modalWidth: f, modalHeight: d } = qn(), { t: p } = he(), [h, m] = S([]), [y, v] = S(!1), g = B(
|
|
5942
|
-
async (
|
|
5943
|
+
async (I) => {
|
|
5943
5944
|
v(!0);
|
|
5944
5945
|
try {
|
|
5945
|
-
await r(
|
|
5946
|
+
await r(I);
|
|
5946
5947
|
} catch (C) {
|
|
5947
5948
|
Nt(C);
|
|
5948
5949
|
}
|
|
@@ -5950,12 +5951,12 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5950
5951
|
},
|
|
5951
5952
|
[r]
|
|
5952
5953
|
), b = async () => {
|
|
5953
|
-
await new Promise((
|
|
5954
|
-
}, x = async (
|
|
5955
|
-
const { id: C } =
|
|
5954
|
+
await new Promise((I) => setTimeout(I, 5)), n();
|
|
5955
|
+
}, x = async (I) => {
|
|
5956
|
+
const { id: C } = I;
|
|
5956
5957
|
g([C]);
|
|
5957
5958
|
};
|
|
5958
|
-
function
|
|
5959
|
+
function O() {
|
|
5959
5960
|
if (h.length === 0) {
|
|
5960
5961
|
b();
|
|
5961
5962
|
return;
|
|
@@ -5994,7 +5995,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5994
5995
|
disabled: y,
|
|
5995
5996
|
icon: y ? /* @__PURE__ */ i(gt, {}) : /* @__PURE__ */ i(Bn, {}),
|
|
5996
5997
|
onClick: () => {
|
|
5997
|
-
|
|
5998
|
+
O();
|
|
5998
5999
|
},
|
|
5999
6000
|
type: "primary",
|
|
6000
6001
|
children: p("ok")
|
|
@@ -6025,8 +6026,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6025
6026
|
model: o,
|
|
6026
6027
|
visible: c,
|
|
6027
6028
|
parentContext: l,
|
|
6028
|
-
onSubmitSucceed: (
|
|
6029
|
-
u(!1), b(), g([
|
|
6029
|
+
onSubmitSucceed: (I) => {
|
|
6030
|
+
u(!1), b(), g([I]);
|
|
6030
6031
|
},
|
|
6031
6032
|
onCancel: () => {
|
|
6032
6033
|
u(!1), b();
|
|
@@ -6052,18 +6053,18 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6052
6053
|
context: l,
|
|
6053
6054
|
id: c,
|
|
6054
6055
|
domain: u
|
|
6055
|
-
} = r, f = o && !a ? { backgroundColor: Ss.colorPrimaryBg } : void 0, [d, p] = S(!1), [h, m] = S(!1), [y, v] = S(!1), [g, b] = S(), x = Q(!1), [
|
|
6056
|
+
} = r, f = o && !a ? { backgroundColor: Ss.colorPrimaryBg } : void 0, [d, p] = S(!1), [h, m] = S(!1), [y, v] = S(!1), [g, b] = S(), x = Q(!1), [O, w] = S(""), I = Q(), C = oe(He), { domain: T, getValues: A, getFields: D, getContext: F, elementHasLostFocus: _ } = C || {}, $ = Q([]), [R, G] = S([]), W = t && t[0] || void 0, L = t && t[1] || "";
|
|
6056
6057
|
de(() => {
|
|
6057
6058
|
!Array.isArray(t) && t && ie(t);
|
|
6058
6059
|
}, [t]), de(() => {
|
|
6059
|
-
W && L.length === 0 ? ie(W) : W && L.length > 0 ? w(L) : !W && !L && w(
|
|
6060
|
+
W && L.length === 0 ? ie(W) : W && L.length > 0 ? w(L) : !W && !L && w(I.current || "");
|
|
6060
6061
|
}, [t]);
|
|
6061
6062
|
const N = (V) => {
|
|
6062
6063
|
n == null || n(V), _ == null || _();
|
|
6063
6064
|
}, k = (V) => {
|
|
6064
|
-
|
|
6065
|
+
I.current = V.target.value, N([void 0, ""]);
|
|
6065
6066
|
}, X = async () => {
|
|
6066
|
-
if (!y &&
|
|
6067
|
+
if (!y && O !== L) {
|
|
6067
6068
|
if (await new Promise((V) => setTimeout(V, 100)), x.current) {
|
|
6068
6069
|
N([void 0, ""]);
|
|
6069
6070
|
return;
|
|
@@ -6071,14 +6072,14 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6071
6072
|
v(!0);
|
|
6072
6073
|
try {
|
|
6073
6074
|
if ($.current && $.current.length > 0)
|
|
6074
|
-
te(
|
|
6075
|
+
te(I.current);
|
|
6075
6076
|
else {
|
|
6076
6077
|
const V = await P.getHandler().nameSearch({
|
|
6077
6078
|
model: s,
|
|
6078
|
-
payload:
|
|
6079
|
+
payload: I.current,
|
|
6079
6080
|
context: { ...F == null ? void 0 : F(), ...l }
|
|
6080
6081
|
});
|
|
6081
|
-
V.length === 1 ? (
|
|
6082
|
+
V.length === 1 ? (I.current = void 0, N(V[0])) : te(I.current);
|
|
6082
6083
|
}
|
|
6083
6084
|
} catch (V) {
|
|
6084
6085
|
Nt(V);
|
|
@@ -6138,7 +6139,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6138
6139
|
o && !a ? Nu : ct,
|
|
6139
6140
|
{
|
|
6140
6141
|
type: "text",
|
|
6141
|
-
value:
|
|
6142
|
+
value: O,
|
|
6142
6143
|
disabled: a,
|
|
6143
6144
|
onChange: k,
|
|
6144
6145
|
style: {
|
|
@@ -6162,7 +6163,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6162
6163
|
je,
|
|
6163
6164
|
{
|
|
6164
6165
|
icon: /* @__PURE__ */ i(Hr, {}),
|
|
6165
|
-
disabled: W === void 0 || L === "" ||
|
|
6166
|
+
disabled: W === void 0 || L === "" || O === void 0,
|
|
6166
6167
|
onClick: () => {
|
|
6167
6168
|
m(!0);
|
|
6168
6169
|
},
|
|
@@ -6191,7 +6192,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6191
6192
|
visible: d,
|
|
6192
6193
|
nameSearch: W ? void 0 : g,
|
|
6193
6194
|
onSelectValues: async (V) => {
|
|
6194
|
-
p(!1), ie(V[0]), x.current = !1,
|
|
6195
|
+
p(!1), ie(V[0]), x.current = !1, I.current = void 0;
|
|
6195
6196
|
},
|
|
6196
6197
|
onCloseModal: () => {
|
|
6197
6198
|
p(!1), x.current = !1;
|
|
@@ -6318,7 +6319,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6318
6319
|
cancelText: e("cancel"),
|
|
6319
6320
|
onOk: t
|
|
6320
6321
|
});
|
|
6321
|
-
},
|
|
6322
|
+
}, Os = ({
|
|
6322
6323
|
t: e,
|
|
6323
6324
|
onOk: t
|
|
6324
6325
|
}) => {
|
|
@@ -6331,7 +6332,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6331
6332
|
onOk: t,
|
|
6332
6333
|
cancelText: e("cancel")
|
|
6333
6334
|
});
|
|
6334
|
-
}, { useToken: ju } = Ge,
|
|
6335
|
+
}, { useToken: ju } = Ge, Is = (e) => {
|
|
6335
6336
|
const {
|
|
6336
6337
|
title: t,
|
|
6337
6338
|
readOnly: n,
|
|
@@ -6376,11 +6377,11 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6376
6377
|
}
|
|
6377
6378
|
);
|
|
6378
6379
|
}
|
|
6379
|
-
function
|
|
6380
|
-
let
|
|
6381
|
-
return l === 0 ?
|
|
6380
|
+
function O() {
|
|
6381
|
+
let I = "_";
|
|
6382
|
+
return l === 0 ? I = "_" : I = (c + 1).toString(), /* @__PURE__ */ E("span", { className: "pl-1 pr-1", children: [
|
|
6382
6383
|
"(",
|
|
6383
|
-
|
|
6384
|
+
I,
|
|
6384
6385
|
"/",
|
|
6385
6386
|
l,
|
|
6386
6387
|
")"
|
|
@@ -6397,7 +6398,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6397
6398
|
onClick: u
|
|
6398
6399
|
}
|
|
6399
6400
|
),
|
|
6400
|
-
|
|
6401
|
+
O(),
|
|
6401
6402
|
/* @__PURE__ */ i(
|
|
6402
6403
|
tt,
|
|
6403
6404
|
{
|
|
@@ -6469,7 +6470,7 @@ const Uu = (e) => {
|
|
|
6469
6470
|
getContext: m,
|
|
6470
6471
|
domain: y,
|
|
6471
6472
|
fetchValues: v
|
|
6472
|
-
} = f || {}, { t: g } = he(), [b, x] = S(!1), [
|
|
6473
|
+
} = f || {}, { t: g } = he(), [b, x] = S(!1), [O, w] = S(!1), [I, C] = S(), [T, A] = S(!1), [D, F] = S(!1), [_, $] = S(), [R, G] = S([]), [W, L] = S(!1), N = Q([]), [k, X] = S(), te = Q(), [ie, H] = S(void 0), {
|
|
6473
6474
|
readOnly: ne,
|
|
6474
6475
|
relation: ee,
|
|
6475
6476
|
context: V,
|
|
@@ -6488,9 +6489,9 @@ const Uu = (e) => {
|
|
|
6488
6489
|
(a === "form" && s.some((q) => !q.values) || a === "tree" && s.some((q) => !q.treeValues)) && $e();
|
|
6489
6490
|
}, [s, a]);
|
|
6490
6491
|
de(() => {
|
|
6491
|
-
|
|
6492
|
+
Oe();
|
|
6492
6493
|
}, [y]);
|
|
6493
|
-
const
|
|
6494
|
+
const ve = (q) => {
|
|
6494
6495
|
var ge, Ae;
|
|
6495
6496
|
n == null || n({
|
|
6496
6497
|
fields: ((ge = o.get("form")) == null ? void 0 : ge.fields) || ((Ae = o.get("tree")) == null ? void 0 : Ae.fields),
|
|
@@ -6515,14 +6516,14 @@ const Uu = (e) => {
|
|
|
6515
6516
|
context: { ...m == null ? void 0 : m(), ...V },
|
|
6516
6517
|
currentView: q || a
|
|
6517
6518
|
});
|
|
6518
|
-
return te.current || (te.current = De.map((Pe) => Pe.id)), (a || q) === "tree" && Z && H(Z),
|
|
6519
|
+
return te.current || (te.current = De.map((Pe) => Pe.id)), (a || q) === "tree" && Z && H(Z), ve(De), De;
|
|
6519
6520
|
} catch (De) {
|
|
6520
6521
|
C(De);
|
|
6521
6522
|
} finally {
|
|
6522
6523
|
w(!1);
|
|
6523
6524
|
}
|
|
6524
6525
|
};
|
|
6525
|
-
async function
|
|
6526
|
+
async function Oe() {
|
|
6526
6527
|
M && (N.current = await P.getHandler().evalDomain({
|
|
6527
6528
|
domain: M,
|
|
6528
6529
|
values: Lt({
|
|
@@ -6569,7 +6570,7 @@ const Uu = (e) => {
|
|
|
6569
6570
|
values: ge,
|
|
6570
6571
|
treeValues: Ae
|
|
6571
6572
|
} : De);
|
|
6572
|
-
|
|
6573
|
+
ve(xe);
|
|
6573
6574
|
}, ue = (q) => {
|
|
6574
6575
|
b ? an({
|
|
6575
6576
|
t: g,
|
|
@@ -6577,9 +6578,9 @@ const Uu = (e) => {
|
|
|
6577
6578
|
ce(), q(), x(!1);
|
|
6578
6579
|
}
|
|
6579
6580
|
}) : q();
|
|
6580
|
-
},
|
|
6581
|
+
}, we = () => {
|
|
6581
6582
|
if (j) {
|
|
6582
|
-
|
|
6583
|
+
Os({
|
|
6583
6584
|
t: g,
|
|
6584
6585
|
onOk: async () => {
|
|
6585
6586
|
a === "form" ? Ce() : Se();
|
|
@@ -6611,9 +6612,9 @@ const Uu = (e) => {
|
|
|
6611
6612
|
...ge,
|
|
6612
6613
|
operation: "pendingRemove"
|
|
6613
6614
|
} : ge);
|
|
6614
|
-
|
|
6615
|
+
ve(q);
|
|
6615
6616
|
} else
|
|
6616
|
-
|
|
6617
|
+
ve(
|
|
6617
6618
|
s.filter((q) => q.id !== z[c].id)
|
|
6618
6619
|
);
|
|
6619
6620
|
} catch (q) {
|
|
@@ -6628,7 +6629,7 @@ const Uu = (e) => {
|
|
|
6628
6629
|
...xe,
|
|
6629
6630
|
operation: "pendingRemove"
|
|
6630
6631
|
} : xe);
|
|
6631
|
-
|
|
6632
|
+
ve(Ae);
|
|
6632
6633
|
} catch (ge) {
|
|
6633
6634
|
C(ge);
|
|
6634
6635
|
}
|
|
@@ -6658,7 +6659,7 @@ const Uu = (e) => {
|
|
|
6658
6659
|
treeValues: { ...Ae, id: Z }
|
|
6659
6660
|
});
|
|
6660
6661
|
}
|
|
6661
|
-
|
|
6662
|
+
ve(De), W || A(!1);
|
|
6662
6663
|
}, Me = async (q) => {
|
|
6663
6664
|
const { id: ge } = q;
|
|
6664
6665
|
let Ae = s;
|
|
@@ -6687,14 +6688,14 @@ const Uu = (e) => {
|
|
|
6687
6688
|
treeValues: Z
|
|
6688
6689
|
});
|
|
6689
6690
|
}
|
|
6690
|
-
|
|
6691
|
+
ve(ge);
|
|
6691
6692
|
} catch (xe) {
|
|
6692
6693
|
C(xe);
|
|
6693
6694
|
} finally {
|
|
6694
6695
|
w(!1);
|
|
6695
6696
|
}
|
|
6696
6697
|
};
|
|
6697
|
-
function
|
|
6698
|
+
function Ie() {
|
|
6698
6699
|
const q = Bu[a];
|
|
6699
6700
|
if (a === "graph")
|
|
6700
6701
|
return _i(o.get("graph").arch).string;
|
|
@@ -6723,7 +6724,7 @@ const Uu = (e) => {
|
|
|
6723
6724
|
values: { ...Z, id: Pe },
|
|
6724
6725
|
treeValues: { ...Z, id: Pe }
|
|
6725
6726
|
} : ot);
|
|
6726
|
-
|
|
6727
|
+
ve(Ye), x(!0);
|
|
6727
6728
|
},
|
|
6728
6729
|
readOnly: ne
|
|
6729
6730
|
}
|
|
@@ -6744,7 +6745,7 @@ const Uu = (e) => {
|
|
|
6744
6745
|
limit: z.length,
|
|
6745
6746
|
treeView: o.get("tree"),
|
|
6746
6747
|
results: q,
|
|
6747
|
-
loading:
|
|
6748
|
+
loading: O,
|
|
6748
6749
|
onRowClicked: ((De = o.get("form")) == null ? void 0 : De.fields) !== void 0 ? Me : void 0,
|
|
6749
6750
|
showPagination: !1,
|
|
6750
6751
|
selectedRowKeys: R,
|
|
@@ -6771,21 +6772,21 @@ const Uu = (e) => {
|
|
|
6771
6772
|
);
|
|
6772
6773
|
}
|
|
6773
6774
|
};
|
|
6774
|
-
if (
|
|
6775
|
-
return /* @__PURE__ */ i(nt, { className: "mt-10", message:
|
|
6775
|
+
if (I)
|
|
6776
|
+
return /* @__PURE__ */ i(nt, { className: "mt-10", message: I, type: "error", banner: !0 });
|
|
6776
6777
|
const pe = W;
|
|
6777
|
-
return
|
|
6778
|
+
return O ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ E(ae, { children: [
|
|
6778
6779
|
/* @__PURE__ */ i(
|
|
6779
|
-
|
|
6780
|
+
Is,
|
|
6780
6781
|
{
|
|
6781
6782
|
mode: a,
|
|
6782
|
-
title:
|
|
6783
|
+
title: Ie(),
|
|
6783
6784
|
readOnly: ne || !1,
|
|
6784
6785
|
isMany2Many: j,
|
|
6785
6786
|
formHasChanges: b,
|
|
6786
6787
|
totalItems: z.length,
|
|
6787
6788
|
currentItemIndex: c,
|
|
6788
|
-
onDelete:
|
|
6789
|
+
onDelete: we,
|
|
6789
6790
|
onCreateItem: _e,
|
|
6790
6791
|
onToggleViewMode: Ee,
|
|
6791
6792
|
onPreviousItem: Ke,
|
|
@@ -6878,7 +6879,7 @@ const Uu = (e) => {
|
|
|
6878
6879
|
s.length === 0 ? h = !0 : h = !1, h ? (a(r), (m = o.current) == null || m.setSelectedRows(r)) : (a([]), (y = o.current) == null || y.setSelectedRows([]));
|
|
6879
6880
|
}, [r, o, s.length]), u = B((h) => {
|
|
6880
6881
|
l.current = h;
|
|
6881
|
-
}, []), f = B(() => l.current, []), d =
|
|
6882
|
+
}, []), f = B(() => l.current, []), d = ye(() => It(e), [e]);
|
|
6882
6883
|
return {
|
|
6883
6884
|
onTreeFetchRows: ft(
|
|
6884
6885
|
async ({
|
|
@@ -6889,9 +6890,9 @@ const Uu = (e) => {
|
|
|
6889
6890
|
d.colors && (y.colors = d.colors), d.status && (y.status = d.status);
|
|
6890
6891
|
let v = h;
|
|
6891
6892
|
if (m) {
|
|
6892
|
-
const w = Object.keys(m).map((
|
|
6893
|
-
const C = m[
|
|
6894
|
-
return `${
|
|
6893
|
+
const w = Object.keys(m).map((I) => {
|
|
6894
|
+
const C = m[I];
|
|
6895
|
+
return `${I} ${C}`;
|
|
6895
6896
|
}).join(", ");
|
|
6896
6897
|
v = await P.getHandler().searchAllIds({
|
|
6897
6898
|
model: t,
|
|
@@ -6907,8 +6908,8 @@ const Uu = (e) => {
|
|
|
6907
6908
|
fields: e.fields,
|
|
6908
6909
|
context: n,
|
|
6909
6910
|
attrs: y
|
|
6910
|
-
}), b = g[0], x = Qt(g[1]),
|
|
6911
|
-
return { results: b, colors: x, status:
|
|
6911
|
+
}), b = g[0], x = Qt(g[1]), O = Dn(g[1]);
|
|
6912
|
+
return { results: b, colors: x, status: O };
|
|
6912
6913
|
},
|
|
6913
6914
|
[n, t, d.colors, e]
|
|
6914
6915
|
),
|
|
@@ -7011,7 +7012,7 @@ const Uu = (e) => {
|
|
|
7011
7012
|
values: { ...f, id: d },
|
|
7012
7013
|
treeValues: { ...f, id: d }
|
|
7013
7014
|
} : m);
|
|
7014
|
-
s(
|
|
7015
|
+
s(Oc(p));
|
|
7015
7016
|
},
|
|
7016
7017
|
readOnly: o
|
|
7017
7018
|
}
|
|
@@ -7067,7 +7068,7 @@ const Uu = (e) => {
|
|
|
7067
7068
|
}, [n, c, r, u, t]), p = B(async () => l === "form" ? await d() : await f(), [l, d, f]);
|
|
7068
7069
|
return { showRemoveConfirm: B(() => {
|
|
7069
7070
|
if (e) {
|
|
7070
|
-
|
|
7071
|
+
Os({
|
|
7071
7072
|
t: a,
|
|
7072
7073
|
onOk: p
|
|
7073
7074
|
});
|
|
@@ -7109,7 +7110,7 @@ const Xu = ({
|
|
|
7109
7110
|
}, [n, e, t, r]), b = B(() => {
|
|
7110
7111
|
p(!1), v(!1);
|
|
7111
7112
|
}, []), x = ft(
|
|
7112
|
-
(w,
|
|
7113
|
+
(w, I, C, T = !1) => {
|
|
7113
7114
|
let A;
|
|
7114
7115
|
if (T)
|
|
7115
7116
|
A = o.concat({
|
|
@@ -7137,17 +7138,17 @@ const Xu = ({
|
|
|
7137
7138
|
s(A), y || p(!1);
|
|
7138
7139
|
},
|
|
7139
7140
|
[y, o, s]
|
|
7140
|
-
),
|
|
7141
|
+
), O = ft(
|
|
7141
7142
|
async (w) => {
|
|
7142
|
-
const { id:
|
|
7143
|
+
const { id: I } = w;
|
|
7143
7144
|
let C = o;
|
|
7144
|
-
const T = o.find((A) => A.id ===
|
|
7145
|
+
const T = o.find((A) => A.id === I);
|
|
7145
7146
|
(T == null ? void 0 : T.values) === void 0 && (C = await P.getHandler().readObjects({
|
|
7146
7147
|
model: c,
|
|
7147
7148
|
ids: [w.id],
|
|
7148
7149
|
fields: u.fields,
|
|
7149
7150
|
context: f
|
|
7150
|
-
})), m(C.find((A) => A.id ===
|
|
7151
|
+
})), m(C.find((A) => A.id === I)), v(!1), p(!0);
|
|
7151
7152
|
},
|
|
7152
7153
|
[f, u.fields, o, c, a, l]
|
|
7153
7154
|
);
|
|
@@ -7158,7 +7159,7 @@ const Xu = ({
|
|
|
7158
7159
|
createItem: g,
|
|
7159
7160
|
onCancelFormModal: b,
|
|
7160
7161
|
onFormModalSubmitSucceed: x,
|
|
7161
|
-
openItemInFormModal:
|
|
7162
|
+
openItemInFormModal: O
|
|
7162
7163
|
};
|
|
7163
7164
|
}, Qu = ({
|
|
7164
7165
|
currentView: e,
|
|
@@ -7356,14 +7357,14 @@ const Xu = ({
|
|
|
7356
7357
|
aggregates: m,
|
|
7357
7358
|
selectedRowKeys: y = []
|
|
7358
7359
|
}) => {
|
|
7359
|
-
const v = Q(), g = c || v, b = Q({}), x = Q(),
|
|
7360
|
+
const v = Q(), g = c || v, b = Q({}), x = Q(), O = Q(), w = Q(e), { t: I } = he();
|
|
7360
7361
|
yt(() => {
|
|
7361
7362
|
var R, G;
|
|
7362
|
-
if (w.current = e,
|
|
7363
|
-
|
|
7363
|
+
if (w.current = e, O.current === void 0) {
|
|
7364
|
+
O.current = e;
|
|
7364
7365
|
return;
|
|
7365
7366
|
}
|
|
7366
|
-
|
|
7367
|
+
O.current = e, (R = g == null ? void 0 : g.current) == null || R.refresh(), (G = g == null ? void 0 : g.current) == null || G.unselectAll();
|
|
7367
7368
|
}, [e]);
|
|
7368
7369
|
const C = yn(() => e.length, [e]), T = yn(() => Zr(
|
|
7369
7370
|
o,
|
|
@@ -7437,7 +7438,7 @@ const Xu = ({
|
|
|
7437
7438
|
return (G = x.current) == null ? void 0 : G[R.id];
|
|
7438
7439
|
},
|
|
7439
7440
|
strings: {
|
|
7440
|
-
resetTableViewLabel:
|
|
7441
|
+
resetTableViewLabel: I("resetTableView")
|
|
7441
7442
|
}
|
|
7442
7443
|
}
|
|
7443
7444
|
);
|
|
@@ -7472,7 +7473,7 @@ const Xu = ({
|
|
|
7472
7473
|
([v, g]) => {
|
|
7473
7474
|
y[v] = g.map((b) => {
|
|
7474
7475
|
const x = e.columns.find(
|
|
7475
|
-
(
|
|
7476
|
+
(O) => O.id === v
|
|
7476
7477
|
);
|
|
7477
7478
|
return {
|
|
7478
7479
|
operation: b,
|
|
@@ -7496,7 +7497,7 @@ const Xu = ({
|
|
|
7496
7497
|
Object.entries(h).forEach((y) => {
|
|
7497
7498
|
const v = y[0], g = y[1];
|
|
7498
7499
|
m || (m = {}), m[v] = Object.keys(g).map((b) => {
|
|
7499
|
-
const x = e.columns.find((
|
|
7500
|
+
const x = e.columns.find((O) => O.id === v);
|
|
7500
7501
|
return {
|
|
7501
7502
|
operation: b,
|
|
7502
7503
|
label: x[b],
|
|
@@ -7544,8 +7545,8 @@ const Xu = ({
|
|
|
7544
7545
|
} = o, g = oe(He), {
|
|
7545
7546
|
activeId: b,
|
|
7546
7547
|
getContext: x,
|
|
7547
|
-
fetchValues:
|
|
7548
|
-
} = g || {}, w = s.size > 1,
|
|
7548
|
+
fetchValues: O
|
|
7549
|
+
} = g || {}, w = s.size > 1, I = ((ce = s.get("form")) == null ? void 0 : ce.fields) !== void 0, C = ye(() => ({ ...x == null ? void 0 : x(), ...m }), [x, m]), T = Wu({
|
|
7549
7550
|
widgetDomain: y,
|
|
7550
7551
|
fieldName: v
|
|
7551
7552
|
}), {
|
|
@@ -7567,14 +7568,14 @@ const Xu = ({
|
|
|
7567
7568
|
model: h,
|
|
7568
7569
|
items: l,
|
|
7569
7570
|
selectedRowKeys: F
|
|
7570
|
-
}), L =
|
|
7571
|
+
}), L = ye(() => {
|
|
7571
7572
|
const { title: ue } = s.get(c) || {};
|
|
7572
7573
|
return ue || o.label;
|
|
7573
7574
|
}, [c, o.label, s]), N = o.type === "many2many", k = B(
|
|
7574
7575
|
(ue) => {
|
|
7575
|
-
var
|
|
7576
|
+
var we, _e;
|
|
7576
7577
|
r == null || r({
|
|
7577
|
-
fields: ((
|
|
7578
|
+
fields: ((we = s.get("form")) == null ? void 0 : we.fields) || ((_e = s.get("tree")) == null ? void 0 : _e.fields),
|
|
7578
7579
|
items: ue
|
|
7579
7580
|
});
|
|
7580
7581
|
},
|
|
@@ -7614,7 +7615,7 @@ const Xu = ({
|
|
|
7614
7615
|
}), {
|
|
7615
7616
|
showSearchModal: Y,
|
|
7616
7617
|
onSelectSearchValues: me,
|
|
7617
|
-
onCloseSearchModal:
|
|
7618
|
+
onCloseSearchModal: ve,
|
|
7618
7619
|
searchItem: $e
|
|
7619
7620
|
} = Qu({
|
|
7620
7621
|
showFormChangesDialogIfNeeded: ie,
|
|
@@ -7631,15 +7632,15 @@ const Xu = ({
|
|
|
7631
7632
|
setFormHasChanges: H,
|
|
7632
7633
|
selectedRowKeys: F,
|
|
7633
7634
|
setSelectedRowKeys: _
|
|
7634
|
-
}),
|
|
7635
|
-
const ue = Array.from(s.keys()),
|
|
7635
|
+
}), Oe = () => {
|
|
7636
|
+
const ue = Array.from(s.keys()), we = ue[(ue.indexOf(c) + 1) % ue.length];
|
|
7636
7637
|
c === "form" ? ie(() => {
|
|
7637
|
-
u(
|
|
7638
|
-
}) : u(
|
|
7638
|
+
u(we);
|
|
7639
|
+
}) : u(we);
|
|
7639
7640
|
}, Ee = ft(
|
|
7640
7641
|
(ue) => {
|
|
7641
|
-
var
|
|
7642
|
-
(
|
|
7642
|
+
var we;
|
|
7643
|
+
(we = s.get("form")) != null && we.fields && z(ue);
|
|
7643
7644
|
},
|
|
7644
7645
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7645
7646
|
[l]
|
|
@@ -7661,7 +7662,7 @@ const Xu = ({
|
|
|
7661
7662
|
]);
|
|
7662
7663
|
return /* @__PURE__ */ E(ae, { children: [
|
|
7663
7664
|
/* @__PURE__ */ i(
|
|
7664
|
-
|
|
7665
|
+
Is,
|
|
7665
7666
|
{
|
|
7666
7667
|
mode: c,
|
|
7667
7668
|
title: L,
|
|
@@ -7672,12 +7673,12 @@ const Xu = ({
|
|
|
7672
7673
|
currentItemIndex: f,
|
|
7673
7674
|
onDelete: Le,
|
|
7674
7675
|
onCreateItem: fe,
|
|
7675
|
-
onToggleViewMode:
|
|
7676
|
+
onToggleViewMode: Oe,
|
|
7676
7677
|
onPreviousItem: Ke,
|
|
7677
7678
|
onNextItem: Fe,
|
|
7678
7679
|
onSearchItem: $e,
|
|
7679
7680
|
selectedRowKeys: F,
|
|
7680
|
-
showCreateButton:
|
|
7681
|
+
showCreateButton: I,
|
|
7681
7682
|
showToggleButton: w
|
|
7682
7683
|
}
|
|
7683
7684
|
),
|
|
@@ -7733,7 +7734,7 @@ const Xu = ({
|
|
|
7733
7734
|
readOnly: p,
|
|
7734
7735
|
mustClearAfterSave: V,
|
|
7735
7736
|
onMustRefreshParent: () => {
|
|
7736
|
-
|
|
7737
|
+
O == null || O({ forceRefresh: !0 });
|
|
7737
7738
|
}
|
|
7738
7739
|
}
|
|
7739
7740
|
),
|
|
@@ -7745,7 +7746,7 @@ const Xu = ({
|
|
|
7745
7746
|
context: C,
|
|
7746
7747
|
visible: Y,
|
|
7747
7748
|
onSelectValues: me,
|
|
7748
|
-
onCloseModal:
|
|
7749
|
+
onCloseModal: ve
|
|
7749
7750
|
}
|
|
7750
7751
|
),
|
|
7751
7752
|
c === "graph" && /* @__PURE__ */ i(
|
|
@@ -7771,25 +7772,25 @@ const Xu = ({
|
|
|
7771
7772
|
yt(() => {
|
|
7772
7773
|
x();
|
|
7773
7774
|
}, [t]);
|
|
7774
|
-
const b = async (
|
|
7775
|
+
const b = async (I) => o && o[I] ? o[I] : await P.getHandler().getView({
|
|
7775
7776
|
model: r,
|
|
7776
|
-
type:
|
|
7777
|
+
type: I,
|
|
7777
7778
|
context: { ...y == null ? void 0 : y(), ...a }
|
|
7778
7779
|
}), x = async () => {
|
|
7779
7780
|
u(!0), d(void 0);
|
|
7780
7781
|
try {
|
|
7781
7782
|
if (n && n.length > 0) {
|
|
7782
|
-
for (const
|
|
7783
|
-
const C = await b(
|
|
7784
|
-
p.set(
|
|
7783
|
+
for (const I of n) {
|
|
7784
|
+
const C = await b(I);
|
|
7785
|
+
p.set(I, C);
|
|
7785
7786
|
}
|
|
7786
7787
|
h(p);
|
|
7787
7788
|
} else {
|
|
7788
|
-
const
|
|
7789
|
-
p.set("form",
|
|
7789
|
+
const I = await b("form"), C = await b("tree");
|
|
7790
|
+
p.set("form", I), p.set("tree", C), h(p);
|
|
7790
7791
|
}
|
|
7791
|
-
} catch (
|
|
7792
|
-
d(JSON.stringify(
|
|
7792
|
+
} catch (I) {
|
|
7793
|
+
d(JSON.stringify(I));
|
|
7793
7794
|
} finally {
|
|
7794
7795
|
u(!1);
|
|
7795
7796
|
}
|
|
@@ -7799,7 +7800,7 @@ const Xu = ({
|
|
|
7799
7800
|
{
|
|
7800
7801
|
required: s,
|
|
7801
7802
|
type: "array",
|
|
7802
|
-
validator: async (
|
|
7803
|
+
validator: async (I, C) => {
|
|
7803
7804
|
if (!C)
|
|
7804
7805
|
throw new Error();
|
|
7805
7806
|
if (!C.items)
|
|
@@ -7871,7 +7872,7 @@ function _s(e) {
|
|
|
7871
7872
|
}
|
|
7872
7873
|
) });
|
|
7873
7874
|
}
|
|
7874
|
-
const { TabPane: hf } =
|
|
7875
|
+
const { TabPane: hf } = Oi;
|
|
7875
7876
|
function gf(e) {
|
|
7876
7877
|
const { ooui: t, responsiveBehaviour: n } = e, r = t.pages;
|
|
7877
7878
|
function o(s) {
|
|
@@ -7880,7 +7881,7 @@ function gf(e) {
|
|
|
7880
7881
|
return a && /* @__PURE__ */ i(a, {});
|
|
7881
7882
|
}
|
|
7882
7883
|
}
|
|
7883
|
-
return /* @__PURE__ */ i(
|
|
7884
|
+
return /* @__PURE__ */ i(Oi, { defaultActiveKey: "1", tabPosition: t.tabPosition, children: r.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ i(
|
|
7884
7885
|
hf,
|
|
7885
7886
|
{
|
|
7886
7887
|
tab: /* @__PURE__ */ E(ae, { children: [
|
|
@@ -8035,7 +8036,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8035
8036
|
}
|
|
8036
8037
|
let g = r;
|
|
8037
8038
|
v.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (g = [
|
|
8038
|
-
["id", "in", n == null ? void 0 : n.map((
|
|
8039
|
+
["id", "in", n == null ? void 0 : n.map((O) => O.id)]
|
|
8039
8040
|
]);
|
|
8040
8041
|
const { datas: b } = await P.getHandler().exportData({
|
|
8041
8042
|
model: e,
|
|
@@ -8048,7 +8049,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8048
8049
|
context: t,
|
|
8049
8050
|
format: v.exportType
|
|
8050
8051
|
});
|
|
8051
|
-
s(), await new Promise((
|
|
8052
|
+
s(), await new Promise((O) => setTimeout(O, 200));
|
|
8052
8053
|
const x = await Xt(b);
|
|
8053
8054
|
Yn(b, x.mime);
|
|
8054
8055
|
},
|
|
@@ -8062,24 +8063,24 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8062
8063
|
return a.current["/"] = v, Go({ fields: v });
|
|
8063
8064
|
}, [e, t, a]), d = B(
|
|
8064
8065
|
async (v) => {
|
|
8065
|
-
const b = Ar(v, a.current)[
|
|
8066
|
+
const b = Ar(v, a.current)[Ir(v)], x = b.relation, O = await P.getHandler().getFields({
|
|
8066
8067
|
model: x,
|
|
8067
8068
|
context: t,
|
|
8068
8069
|
fields: []
|
|
8069
8070
|
});
|
|
8070
|
-
for (const [w,
|
|
8071
|
-
|
|
8071
|
+
for (const [w, I] of Object.entries(O))
|
|
8072
|
+
O[w].string = Cf({
|
|
8072
8073
|
parentTitle: b.string,
|
|
8073
|
-
title:
|
|
8074
|
+
title: I.string
|
|
8074
8075
|
});
|
|
8075
|
-
return a.current[v] =
|
|
8076
|
-
fields:
|
|
8076
|
+
return a.current[v] = O, Go({
|
|
8077
|
+
fields: O,
|
|
8077
8078
|
parentKey: v
|
|
8078
8079
|
});
|
|
8079
8080
|
},
|
|
8080
8081
|
[t]
|
|
8081
8082
|
), p = B(async () => {
|
|
8082
|
-
const v = await Tf({ model: e, context: t }), g = await
|
|
8083
|
+
const v = await Tf({ model: e, context: t }), g = await If({
|
|
8083
8084
|
predefinedExports: v,
|
|
8084
8085
|
fields: a.current,
|
|
8085
8086
|
onGetFieldChilds: d
|
|
@@ -8087,13 +8088,13 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8087
8088
|
return {
|
|
8088
8089
|
predefinedExports: v.map((x) => ({
|
|
8089
8090
|
...x,
|
|
8090
|
-
fields: x.fields.map((
|
|
8091
|
-
const w =
|
|
8091
|
+
fields: x.fields.map((O) => {
|
|
8092
|
+
const w = Ir(O.key), C = Ar(O.key, a.current)[w];
|
|
8092
8093
|
return C ? {
|
|
8093
|
-
key:
|
|
8094
|
+
key: O.key,
|
|
8094
8095
|
title: C.string
|
|
8095
8096
|
} : {
|
|
8096
|
-
key:
|
|
8097
|
+
key: O.key
|
|
8097
8098
|
};
|
|
8098
8099
|
})
|
|
8099
8100
|
})),
|
|
@@ -8132,10 +8133,10 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8132
8133
|
context: t
|
|
8133
8134
|
});
|
|
8134
8135
|
return await Promise.all(
|
|
8135
|
-
v.fields.map(async (
|
|
8136
|
+
v.fields.map(async (O) => await P.getHandler().create({
|
|
8136
8137
|
model: "ir.exports.line",
|
|
8137
8138
|
values: {
|
|
8138
|
-
name:
|
|
8139
|
+
name: O.key,
|
|
8139
8140
|
export_id: x
|
|
8140
8141
|
},
|
|
8141
8142
|
fields: b,
|
|
@@ -8172,12 +8173,12 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8172
8173
|
}, Vs = (e) => e.type === "many2one" || e.type === "one2many" || e.type === "many2many", xf = ({
|
|
8173
8174
|
parentKey: e,
|
|
8174
8175
|
key: t
|
|
8175
|
-
}) => `${e ? e + "/" : ""}${t}`,
|
|
8176
|
+
}) => `${e ? e + "/" : ""}${t}`, Or = (e) => e.indexOf("/") === -1 ? e : e.split("/").slice(0, -1).join("/"), Ir = (e) => {
|
|
8176
8177
|
if (e.indexOf("/") === -1)
|
|
8177
8178
|
return e;
|
|
8178
8179
|
const t = e.split("/");
|
|
8179
8180
|
return t[t.length - 1];
|
|
8180
|
-
}, Ar = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[
|
|
8181
|
+
}, Ar = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[Or(e)], Cf = ({
|
|
8181
8182
|
title: e,
|
|
8182
8183
|
parentTitle: t
|
|
8183
8184
|
}) => `${t ? t + " → " : ""}${e}`, Tf = async ({
|
|
@@ -8200,24 +8201,24 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8200
8201
|
key: o.find((c) => c.id === a).name
|
|
8201
8202
|
}))
|
|
8202
8203
|
}));
|
|
8203
|
-
},
|
|
8204
|
+
}, Of = ({
|
|
8204
8205
|
fields: e,
|
|
8205
8206
|
keys: t
|
|
8206
8207
|
}) => Ff([
|
|
8207
8208
|
...new Set(
|
|
8208
8209
|
t.filter((n) => {
|
|
8209
8210
|
var r, o;
|
|
8210
|
-
return n.indexOf("/") === -1 ? !((r = e["/"]) != null && r[n]) : !((o = e == null ? void 0 : e[
|
|
8211
|
-
}).map((n) =>
|
|
8211
|
+
return n.indexOf("/") === -1 ? !((r = e["/"]) != null && r[n]) : !((o = e == null ? void 0 : e[Or(n)]) != null && o[n]);
|
|
8212
|
+
}).map((n) => Or(n))
|
|
8212
8213
|
)
|
|
8213
|
-
]),
|
|
8214
|
+
]), If = async ({
|
|
8214
8215
|
predefinedExports: e,
|
|
8215
8216
|
fields: t,
|
|
8216
8217
|
onGetFieldChilds: n
|
|
8217
8218
|
}) => {
|
|
8218
8219
|
const r = e.flatMap(
|
|
8219
8220
|
(a) => a.fields.map((l) => l.key)
|
|
8220
|
-
), o =
|
|
8221
|
+
), o = Of({
|
|
8221
8222
|
fields: t,
|
|
8222
8223
|
keys: r
|
|
8223
8224
|
}), s = [];
|
|
@@ -8235,7 +8236,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8235
8236
|
keys: e,
|
|
8236
8237
|
fields: t
|
|
8237
8238
|
}) => e.map((n) => {
|
|
8238
|
-
const r =
|
|
8239
|
+
const r = Ir(n), s = Ar(n, t)[r], a = Vs(s), l = s.is_function === !0;
|
|
8239
8240
|
return a && !l ? `${n}/id` : n;
|
|
8240
8241
|
}), Ff = (e) => {
|
|
8241
8242
|
const t = /* @__PURE__ */ new Map(), n = [];
|
|
@@ -8370,8 +8371,8 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8370
8371
|
r == null || r(x);
|
|
8371
8372
|
};
|
|
8372
8373
|
async function y() {
|
|
8373
|
-
const x = await Xt(n),
|
|
8374
|
-
w.href =
|
|
8374
|
+
const x = await Xt(n), O = `data:${x == null ? void 0 : x.mime};base64,${n}`, w = document.createElement("a"), I = d(a), C = d("name");
|
|
8375
|
+
w.href = O, w.download = I || C, w.click();
|
|
8375
8376
|
}
|
|
8376
8377
|
async function v() {
|
|
8377
8378
|
const x = await Xt(n);
|
|
@@ -8379,8 +8380,8 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8379
8380
|
}
|
|
8380
8381
|
async function g(x) {
|
|
8381
8382
|
x.stopPropagation(), x.preventDefault();
|
|
8382
|
-
const
|
|
8383
|
-
m(w), a && f(a,
|
|
8383
|
+
const O = x.target.files[0], w = await Ji(O);
|
|
8384
|
+
m(w), a && f(a, O.name);
|
|
8384
8385
|
}
|
|
8385
8386
|
function b() {
|
|
8386
8387
|
f(a, void 0), m(void 0);
|
|
@@ -8457,7 +8458,7 @@ function co(e) {
|
|
|
8457
8458
|
disabled: o = !1,
|
|
8458
8459
|
formHasChanges: s = !1,
|
|
8459
8460
|
previousView: a
|
|
8460
|
-
} = e, { t: l } = he(), c =
|
|
8461
|
+
} = e, { t: l } = he(), c = ye(() => [
|
|
8461
8462
|
{
|
|
8462
8463
|
label: l("viewAs"),
|
|
8463
8464
|
items: n.map((d, p) => {
|
|
@@ -8811,14 +8812,14 @@ const Bf = () => {
|
|
|
8811
8812
|
async (v) => {
|
|
8812
8813
|
var g;
|
|
8813
8814
|
try {
|
|
8814
|
-
const { params: b, model: x, name_search:
|
|
8815
|
+
const { params: b, model: x, name_search: O, context: w, order: I } = a, { results: C } = await l({
|
|
8815
8816
|
params: b,
|
|
8816
8817
|
model: x,
|
|
8817
8818
|
context: w,
|
|
8818
8819
|
limit: 1,
|
|
8819
8820
|
offset: v,
|
|
8820
|
-
order:
|
|
8821
|
-
name_search:
|
|
8821
|
+
order: I,
|
|
8822
|
+
name_search: O,
|
|
8822
8823
|
skipRead: !0
|
|
8823
8824
|
});
|
|
8824
8825
|
return (g = C[0]) == null ? void 0 : g.id;
|
|
@@ -8837,18 +8838,18 @@ const Bf = () => {
|
|
|
8837
8838
|
var w;
|
|
8838
8839
|
if (!s)
|
|
8839
8840
|
return;
|
|
8840
|
-
const g = v === "next", b = g ? n + 1 : n - 1, x = g ? b < t : b >= 0,
|
|
8841
|
+
const g = v === "next", b = g ? n + 1 : n - 1, x = g ? b < t : b >= 0, O = g ? b === t : b === -1;
|
|
8841
8842
|
if (x) {
|
|
8842
|
-
const
|
|
8843
|
-
if (
|
|
8844
|
-
d(b,
|
|
8843
|
+
const I = (w = s[b]) == null ? void 0 : w.id;
|
|
8844
|
+
if (I)
|
|
8845
|
+
d(b, I);
|
|
8845
8846
|
else {
|
|
8846
8847
|
const C = await f(b);
|
|
8847
8848
|
C && d(b, C);
|
|
8848
8849
|
}
|
|
8849
|
-
} else if (
|
|
8850
|
-
const
|
|
8851
|
-
C && d(
|
|
8850
|
+
} else if (O) {
|
|
8851
|
+
const I = g ? 0 : t - 1, C = await f(I);
|
|
8852
|
+
C && d(I, C);
|
|
8852
8853
|
}
|
|
8853
8854
|
},
|
|
8854
8855
|
[s, n, t, f, d]
|
|
@@ -8856,8 +8857,8 @@ const Bf = () => {
|
|
|
8856
8857
|
(v) => {
|
|
8857
8858
|
if (!s || s.length === 0)
|
|
8858
8859
|
return;
|
|
8859
|
-
const g = v === "next", b = g ? n + 1 : n - 1,
|
|
8860
|
-
d(
|
|
8860
|
+
const g = v === "next", b = g ? n + 1 : n - 1, O = (g ? b === s.length : b === -1) ? g ? 0 : s.length - 1 : b;
|
|
8861
|
+
d(O, s[O].id);
|
|
8861
8862
|
},
|
|
8862
8863
|
[s, n, d]
|
|
8863
8864
|
), m = B(() => {
|
|
@@ -8890,9 +8891,9 @@ function Hf({ toolbar: e }) {
|
|
|
8890
8891
|
currentModel: g,
|
|
8891
8892
|
setRemovingItem: b,
|
|
8892
8893
|
removingItem: x,
|
|
8893
|
-
duplicatingItem:
|
|
8894
|
+
duplicatingItem: O,
|
|
8894
8895
|
setDuplicatingItem: w,
|
|
8895
|
-
setResults:
|
|
8896
|
+
setResults: I,
|
|
8896
8897
|
formIsLoading: C,
|
|
8897
8898
|
attachments: T,
|
|
8898
8899
|
formRef: A,
|
|
@@ -8901,7 +8902,7 @@ function Hf({ toolbar: e }) {
|
|
|
8901
8902
|
setPreviousView: _,
|
|
8902
8903
|
goToResourceId: $,
|
|
8903
8904
|
isActive: R
|
|
8904
|
-
} = no(!0), { processAction: G } = t || {}, { openRelate: W, openDefaultActionForModel: L } = n || {}, N = d || x || C ||
|
|
8905
|
+
} = no(!0), { processAction: G } = t || {}, { openRelate: W, openDefaultActionForModel: L } = n || {}, N = d || x || C || O, k = B(
|
|
8905
8906
|
(H) => {
|
|
8906
8907
|
f ? an({ t: r, onOk: H }) : H();
|
|
8907
8908
|
},
|
|
@@ -8916,7 +8917,7 @@ function Hf({ toolbar: e }) {
|
|
|
8916
8917
|
const H = h == null ? void 0 : h.filter(
|
|
8917
8918
|
(ee) => ee.id !== p
|
|
8918
8919
|
);
|
|
8919
|
-
|
|
8920
|
+
I == null || I(H);
|
|
8920
8921
|
const ne = Math.max(0, (y || 0) - 1);
|
|
8921
8922
|
H != null && H[ne] ? (v == null || v(H[ne].id), m == null || m(ne)) : (v == null || v(void 0), m == null || m(void 0));
|
|
8922
8923
|
} catch (H) {
|
|
@@ -8933,7 +8934,7 @@ function Hf({ toolbar: e }) {
|
|
|
8933
8934
|
v,
|
|
8934
8935
|
m,
|
|
8935
8936
|
b,
|
|
8936
|
-
|
|
8937
|
+
I
|
|
8937
8938
|
]), te = B(async () => {
|
|
8938
8939
|
try {
|
|
8939
8940
|
w == null || w(!0);
|
|
@@ -9005,7 +9006,7 @@ function Hf({ toolbar: e }) {
|
|
|
9005
9006
|
icon: /* @__PURE__ */ i(zr, {}),
|
|
9006
9007
|
tooltip: r("duplicate"),
|
|
9007
9008
|
disabled: f || N || p === void 0,
|
|
9008
|
-
loading:
|
|
9009
|
+
loading: O,
|
|
9009
9010
|
onClick: () => Ft({
|
|
9010
9011
|
confirmMessage: r("confirmDuplicate"),
|
|
9011
9012
|
t: r,
|
|
@@ -9445,7 +9446,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9445
9446
|
totalItems: c,
|
|
9446
9447
|
selectedRowItems: u,
|
|
9447
9448
|
isInfiniteTree: f
|
|
9448
|
-
} = oe(lt), { t: d } = he(), { token: p } = zf(), h =
|
|
9449
|
+
} = oe(lt), { t: d } = he(), { token: p } = zf(), h = ye(() => {
|
|
9449
9450
|
if (!n)
|
|
9450
9451
|
return null;
|
|
9451
9452
|
if ((o == null ? void 0 : o.type) === "form" && s) {
|
|
@@ -9550,9 +9551,9 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9550
9551
|
setSearchVisible: g = void 0,
|
|
9551
9552
|
sorter: b = void 0,
|
|
9552
9553
|
setSorter: x = void 0,
|
|
9553
|
-
setTotalItems:
|
|
9554
|
+
setTotalItems: O = void 0,
|
|
9554
9555
|
setSearchTreeNameSearch: w = void 0,
|
|
9555
|
-
setTreeIsLoading:
|
|
9556
|
+
setTreeIsLoading: I = void 0,
|
|
9556
9557
|
limit: C,
|
|
9557
9558
|
setLimit: T,
|
|
9558
9559
|
searchParams: A,
|
|
@@ -9574,7 +9575,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9574
9575
|
setSearchValues: F,
|
|
9575
9576
|
setSearchParams: y,
|
|
9576
9577
|
setSearchVisible: g,
|
|
9577
|
-
setTreeIsLoading:
|
|
9578
|
+
setTreeIsLoading: I,
|
|
9578
9579
|
context: o,
|
|
9579
9580
|
formView: a,
|
|
9580
9581
|
treeView: l,
|
|
@@ -9585,7 +9586,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9585
9586
|
resultsActionView: h,
|
|
9586
9587
|
domain: s,
|
|
9587
9588
|
currentId: p,
|
|
9588
|
-
setActionViewTotalItems:
|
|
9589
|
+
setActionViewTotalItems: O,
|
|
9589
9590
|
limit: C,
|
|
9590
9591
|
setLimit: T
|
|
9591
9592
|
});
|
|
@@ -9731,9 +9732,9 @@ function em(e) {
|
|
|
9731
9732
|
searchTreeNameSearch: g,
|
|
9732
9733
|
treeIsLoading: b,
|
|
9733
9734
|
setPreviousView: x,
|
|
9734
|
-
previousView:
|
|
9735
|
+
previousView: O,
|
|
9735
9736
|
results: w,
|
|
9736
|
-
limit:
|
|
9737
|
+
limit: I,
|
|
9737
9738
|
totalItems: C,
|
|
9738
9739
|
isActive: T,
|
|
9739
9740
|
isInfiniteTree: A
|
|
@@ -9745,10 +9746,10 @@ function em(e) {
|
|
|
9745
9746
|
Dt(
|
|
9746
9747
|
"ctrl+l,command+l",
|
|
9747
9748
|
() => {
|
|
9748
|
-
T &&
|
|
9749
|
+
T && O && (x == null || x(n), r == null || r(O));
|
|
9749
9750
|
},
|
|
9750
9751
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
9751
|
-
[
|
|
9752
|
+
[O, n, T]
|
|
9752
9753
|
), Dt(
|
|
9753
9754
|
"ctrl+f,command+f",
|
|
9754
9755
|
() => {
|
|
@@ -9923,7 +9924,7 @@ function em(e) {
|
|
|
9923
9924
|
onChangeView: (V) => {
|
|
9924
9925
|
x == null || x(n), r == null || r(V);
|
|
9925
9926
|
},
|
|
9926
|
-
previousView:
|
|
9927
|
+
previousView: O,
|
|
9927
9928
|
disabled: b
|
|
9928
9929
|
}
|
|
9929
9930
|
)
|
|
@@ -10040,7 +10041,7 @@ function em(e) {
|
|
|
10040
10041
|
((ee = f == null ? void 0 : f.current) == null ? void 0 : ee.getDomain()) || [],
|
|
10041
10042
|
h || []
|
|
10042
10043
|
),
|
|
10043
|
-
limit:
|
|
10044
|
+
limit: I,
|
|
10044
10045
|
totalRegisters: C || 0,
|
|
10045
10046
|
selectedRegistersToExport: o,
|
|
10046
10047
|
visibleRegisters: (w == null ? void 0 : w.length) || 0,
|
|
@@ -10097,7 +10098,7 @@ const tm = ({
|
|
|
10097
10098
|
}
|
|
10098
10099
|
};
|
|
10099
10100
|
return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
|
|
10100
|
-
}, [e, ...n]),
|
|
10101
|
+
}, [e, ...n]), ye(() => r, [r]) - t;
|
|
10101
10102
|
}, rm = (e) => e.model ? `columnState-${e.treeViewId ?? "tree"}-${e.model}` : void 0, { Text: Yo } = Rt, om = ({
|
|
10102
10103
|
totalRows: e,
|
|
10103
10104
|
selectedRowKeys: t,
|
|
@@ -10146,7 +10147,7 @@ const tm = ({
|
|
|
10146
10147
|
}
|
|
10147
10148
|
)
|
|
10148
10149
|
] });
|
|
10149
|
-
}, { useToken: sm } = Ge, { Title: am } = Rt, { Header: lm, Content: cm, Footer: dm } =
|
|
10150
|
+
}, { useToken: sm } = Ge, { Title: am } = Rt, { Header: lm, Content: cm, Footer: dm } = Ii, um = ({
|
|
10150
10151
|
isOpen: e,
|
|
10151
10152
|
onClose: t,
|
|
10152
10153
|
children: n,
|
|
@@ -10267,47 +10268,47 @@ var Fn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
10267
10268
|
function $s(e) {
|
|
10268
10269
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10269
10270
|
}
|
|
10270
|
-
var fm = "Expected a function", zo = 0 / 0, mm = "[object Symbol]", pm = /^\s+|\s+$/g, hm = /^[-+]0x[0-9a-f]+$/i, gm = /^0b[01]+$/i, ym = /^0o[0-7]+$/i, vm = parseInt, wm = typeof Fn == "object" && Fn && Fn.Object === Object && Fn, bm = typeof self == "object" && self && self.Object === Object && self, Sm = wm || bm || Function("return this")(), xm = Object.prototype, Cm = xm.toString, Tm = Math.max,
|
|
10271
|
+
var fm = "Expected a function", zo = 0 / 0, mm = "[object Symbol]", pm = /^\s+|\s+$/g, hm = /^[-+]0x[0-9a-f]+$/i, gm = /^0b[01]+$/i, ym = /^0o[0-7]+$/i, vm = parseInt, wm = typeof Fn == "object" && Fn && Fn.Object === Object && Fn, bm = typeof self == "object" && self && self.Object === Object && self, Sm = wm || bm || Function("return this")(), xm = Object.prototype, Cm = xm.toString, Tm = Math.max, Om = Math.min, lr = function() {
|
|
10271
10272
|
return Sm.Date.now();
|
|
10272
10273
|
};
|
|
10273
|
-
function
|
|
10274
|
+
function Im(e, t, n) {
|
|
10274
10275
|
var r, o, s, a, l, c, u = 0, f = !1, d = !1, p = !0;
|
|
10275
10276
|
if (typeof e != "function")
|
|
10276
10277
|
throw new TypeError(fm);
|
|
10277
10278
|
t = Jo(t) || 0, Fr(n) && (f = !!n.leading, d = "maxWait" in n, s = d ? Tm(Jo(n.maxWait) || 0, t) : s, p = "trailing" in n ? !!n.trailing : p);
|
|
10278
|
-
function h(
|
|
10279
|
+
function h(I) {
|
|
10279
10280
|
var C = r, T = o;
|
|
10280
|
-
return r = o = void 0, u =
|
|
10281
|
+
return r = o = void 0, u = I, a = e.apply(T, C), a;
|
|
10281
10282
|
}
|
|
10282
|
-
function m(
|
|
10283
|
-
return u =
|
|
10283
|
+
function m(I) {
|
|
10284
|
+
return u = I, l = setTimeout(g, t), f ? h(I) : a;
|
|
10284
10285
|
}
|
|
10285
|
-
function y(
|
|
10286
|
-
var C =
|
|
10287
|
-
return d ?
|
|
10286
|
+
function y(I) {
|
|
10287
|
+
var C = I - c, T = I - u, A = t - C;
|
|
10288
|
+
return d ? Om(A, s - T) : A;
|
|
10288
10289
|
}
|
|
10289
|
-
function v(
|
|
10290
|
-
var C =
|
|
10290
|
+
function v(I) {
|
|
10291
|
+
var C = I - c, T = I - u;
|
|
10291
10292
|
return c === void 0 || C >= t || C < 0 || d && T >= s;
|
|
10292
10293
|
}
|
|
10293
10294
|
function g() {
|
|
10294
|
-
var
|
|
10295
|
-
if (v(
|
|
10296
|
-
return b(
|
|
10297
|
-
l = setTimeout(g, y(
|
|
10295
|
+
var I = lr();
|
|
10296
|
+
if (v(I))
|
|
10297
|
+
return b(I);
|
|
10298
|
+
l = setTimeout(g, y(I));
|
|
10298
10299
|
}
|
|
10299
|
-
function b(
|
|
10300
|
-
return l = void 0, p && r ? h(
|
|
10300
|
+
function b(I) {
|
|
10301
|
+
return l = void 0, p && r ? h(I) : (r = o = void 0, a);
|
|
10301
10302
|
}
|
|
10302
10303
|
function x() {
|
|
10303
10304
|
l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
|
|
10304
10305
|
}
|
|
10305
|
-
function
|
|
10306
|
+
function O() {
|
|
10306
10307
|
return l === void 0 ? a : b(lr());
|
|
10307
10308
|
}
|
|
10308
10309
|
function w() {
|
|
10309
|
-
var
|
|
10310
|
-
if (r = arguments, o = this, c =
|
|
10310
|
+
var I = lr(), C = v(I);
|
|
10311
|
+
if (r = arguments, o = this, c = I, C) {
|
|
10311
10312
|
if (l === void 0)
|
|
10312
10313
|
return m(c);
|
|
10313
10314
|
if (d)
|
|
@@ -10315,7 +10316,7 @@ function Om(e, t, n) {
|
|
|
10315
10316
|
}
|
|
10316
10317
|
return l === void 0 && (l = setTimeout(g, t)), a;
|
|
10317
10318
|
}
|
|
10318
|
-
return w.cancel = x, w.flush =
|
|
10319
|
+
return w.cancel = x, w.flush = O, w;
|
|
10319
10320
|
}
|
|
10320
10321
|
function Fr(e) {
|
|
10321
10322
|
var t = typeof e;
|
|
@@ -10342,7 +10343,7 @@ function Jo(e) {
|
|
|
10342
10343
|
var n = gm.test(e);
|
|
10343
10344
|
return n || ym.test(e) ? vm(e.slice(2), n ? 2 : 8) : hm.test(e) ? zo : +e;
|
|
10344
10345
|
}
|
|
10345
|
-
var Rm =
|
|
10346
|
+
var Rm = Im;
|
|
10346
10347
|
const _m = /* @__PURE__ */ $s(Rm);
|
|
10347
10348
|
var Xo = Object.prototype.toString, Ns = function(t) {
|
|
10348
10349
|
var n = Xo.call(t), r = n === "[object Arguments]";
|
|
@@ -10420,14 +10421,14 @@ function Vm() {
|
|
|
10420
10421
|
throw new TypeError("Object.keys called on a non-object");
|
|
10421
10422
|
var x = a && y;
|
|
10422
10423
|
if (g && h.length > 0 && !t.call(h, 0))
|
|
10423
|
-
for (var
|
|
10424
|
-
b.push(String(
|
|
10424
|
+
for (var O = 0; O < h.length; ++O)
|
|
10425
|
+
b.push(String(O));
|
|
10425
10426
|
if (v && h.length > 0)
|
|
10426
10427
|
for (var w = 0; w < h.length; ++w)
|
|
10427
10428
|
b.push(String(w));
|
|
10428
10429
|
else
|
|
10429
|
-
for (var
|
|
10430
|
-
!(x &&
|
|
10430
|
+
for (var I in h)
|
|
10431
|
+
!(x && I === "prototype") && t.call(h, I) && b.push(String(I));
|
|
10431
10432
|
if (s)
|
|
10432
10433
|
for (var C = d(h), T = 0; T < l.length; ++T)
|
|
10433
10434
|
!(C && l[T] === "constructor") && t.call(h, l[T]) && b.push(l[T]);
|
|
@@ -10857,13 +10858,13 @@ var Tn = zs, di = function(e) {
|
|
|
10857
10858
|
return Object.is !== t;
|
|
10858
10859
|
}
|
|
10859
10860
|
}), t;
|
|
10860
|
-
}, xp = Tn, Cp = fo, Tp = Js, Qs = Xs,
|
|
10861
|
+
}, xp = Tn, Cp = fo, Tp = Js, Qs = Xs, Op = Sp, Zs = Cp(Qs(), Object);
|
|
10861
10862
|
xp(Zs, {
|
|
10862
10863
|
getPolyfill: Qs,
|
|
10863
10864
|
implementation: Tp,
|
|
10864
|
-
shim:
|
|
10865
|
+
shim: Op
|
|
10865
10866
|
});
|
|
10866
|
-
var
|
|
10867
|
+
var Ip = Zs, Dr = Gs, ea = uo(), ta, na, Er, Pr;
|
|
10867
10868
|
if (ea) {
|
|
10868
10869
|
ta = Dr("Object.prototype.hasOwnProperty"), na = Dr("RegExp.prototype.exec"), Er = {};
|
|
10869
10870
|
var hr = function() {
|
|
@@ -10960,7 +10961,7 @@ var eh = sa, th = Date.prototype.getDay, nh = function(t) {
|
|
|
10960
10961
|
}
|
|
10961
10962
|
}, rh = Object.prototype.toString, oh = "[object Date]", ih = uo(), sh = function(t) {
|
|
10962
10963
|
return typeof t != "object" || t === null ? !1 : ih ? nh(t) : rh.call(t) === oh;
|
|
10963
|
-
}, mi = Ms, pi = ap, hi =
|
|
10964
|
+
}, mi = Ms, pi = ap, hi = Ip, gi = _p, yi = eh, vi = sh, wi = Date.prototype.getTime;
|
|
10964
10965
|
function aa(e, t, n) {
|
|
10965
10966
|
var r = n || {};
|
|
10966
10967
|
return (r.strict ? hi(e, t) : e === t) ? !0 : !e || !t || typeof e != "object" && typeof t != "object" ? r.strict ? hi(e, t) : e == t : ah(e, t, r);
|
|
@@ -11072,36 +11073,36 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
|
|
|
11072
11073
|
l.current = new Di(o, s, 1), l.current.parse(), f(l.current._advancedSearchContainer);
|
|
11073
11074
|
}, [s, o, n]);
|
|
11074
11075
|
const m = B(
|
|
11075
|
-
(
|
|
11076
|
-
var
|
|
11076
|
+
(O) => {
|
|
11077
|
+
var I;
|
|
11077
11078
|
const w = Rn(
|
|
11078
|
-
|
|
11079
|
-
(
|
|
11079
|
+
O,
|
|
11080
|
+
(I = l.current) == null ? void 0 : I._advancedSearchContainer
|
|
11080
11081
|
);
|
|
11081
|
-
t({ params: w, values: kr(
|
|
11082
|
+
t({ params: w, values: kr(O) });
|
|
11082
11083
|
},
|
|
11083
11084
|
[t]
|
|
11084
11085
|
), y = B(() => {
|
|
11085
|
-
var
|
|
11086
|
-
(
|
|
11086
|
+
var O;
|
|
11087
|
+
(O = d.current) == null || O.submit();
|
|
11087
11088
|
}, []), v = B(
|
|
11088
|
-
(
|
|
11089
|
+
(O) => {
|
|
11089
11090
|
var C;
|
|
11090
|
-
const w = kr(
|
|
11091
|
+
const w = kr(O);
|
|
11091
11092
|
if (la(w, a)) {
|
|
11092
11093
|
h([]);
|
|
11093
11094
|
return;
|
|
11094
11095
|
}
|
|
11095
|
-
const
|
|
11096
|
-
|
|
11096
|
+
const I = Rn(
|
|
11097
|
+
O,
|
|
11097
11098
|
(C = l.current) == null ? void 0 : C._advancedSearchContainer
|
|
11098
11099
|
);
|
|
11099
|
-
h(
|
|
11100
|
+
h(I);
|
|
11100
11101
|
},
|
|
11101
11102
|
[a]
|
|
11102
11103
|
), g = B(() => {
|
|
11103
|
-
var
|
|
11104
|
-
(
|
|
11104
|
+
var O, w;
|
|
11105
|
+
(O = d.current) == null || O.resetFields(), (w = d == null ? void 0 : d.current) == null || w.setFieldsValue({}), h([]);
|
|
11105
11106
|
}, []), b = n ? p || Rn(a, (x = l.current) == null ? void 0 : x._advancedSearchContainer) : [];
|
|
11106
11107
|
return /* @__PURE__ */ i(
|
|
11107
11108
|
um,
|
|
@@ -11187,8 +11188,8 @@ function ph(e, t) {
|
|
|
11187
11188
|
parentContext: u = {},
|
|
11188
11189
|
onChangeSelectedRowKeys: f,
|
|
11189
11190
|
nameSearch: d
|
|
11190
|
-
} = e, p = Q({}), h = Q(), m = Q(null), y = Q([]), v = bs(), [g, b] = S(!0), [x,
|
|
11191
|
-
elementRef:
|
|
11191
|
+
} = e, p = Q({}), h = Q(), m = Q(null), y = Q([]), v = bs(), [g, b] = S(!0), [x, O] = S(), { t: w } = he(), I = Q(null), C = nm({
|
|
11192
|
+
elementRef: I,
|
|
11192
11193
|
offset: fh
|
|
11193
11194
|
}), { treeView: T, formView: A, loading: D } = tm({
|
|
11194
11195
|
model: n,
|
|
@@ -11220,9 +11221,9 @@ function ph(e, t) {
|
|
|
11220
11221
|
var Z;
|
|
11221
11222
|
(j !== void 0 && fe.current === void 0 || typeof j == "string" && typeof fe.current == "string" && j !== fe.current) && (N == null || N([]), te == null || te({}), (Z = m.current) == null || Z.unselectAll(), De()), fe.current = j;
|
|
11222
11223
|
}, [j]);
|
|
11223
|
-
const z =
|
|
11224
|
+
const z = ye(() => {
|
|
11224
11225
|
if (T)
|
|
11225
|
-
return
|
|
11226
|
+
return It(T);
|
|
11226
11227
|
}, [T]), Y = yn(() => {
|
|
11227
11228
|
if (z)
|
|
11228
11229
|
return Zr(
|
|
@@ -11232,30 +11233,30 @@ function ph(e, t) {
|
|
|
11232
11233
|
},
|
|
11233
11234
|
u
|
|
11234
11235
|
);
|
|
11235
|
-
}, [z, u]), me =
|
|
11236
|
+
}, [z, u]), me = ye(() => rm({
|
|
11236
11237
|
treeViewId: T == null ? void 0 : T.view_id,
|
|
11237
11238
|
model: n
|
|
11238
11239
|
}), [n, T == null ? void 0 : T.view_id]), {
|
|
11239
|
-
loading:
|
|
11240
|
+
loading: ve,
|
|
11240
11241
|
getColumnState: $e,
|
|
11241
11242
|
updateColumnState: Le
|
|
11242
|
-
} = Fs(me),
|
|
11243
|
+
} = Fs(me), Oe = ye(
|
|
11243
11244
|
() => Zt(X || [], a),
|
|
11244
11245
|
[a, X]
|
|
11245
11246
|
), Ee = B(() => {
|
|
11246
|
-
const Pe = `${JSON.stringify(j ? a :
|
|
11247
|
+
const Pe = `${JSON.stringify(j ? a : Oe)}-${j}`;
|
|
11247
11248
|
return Pe !== Ae.current ? (Ae.current = Pe, !0) : !1;
|
|
11248
|
-
}, [a,
|
|
11249
|
+
}, [a, Oe, j]), Ke = B(async () => {
|
|
11249
11250
|
if (Ee()) {
|
|
11250
|
-
|
|
11251
|
+
O(void 0), M(0), b(!0);
|
|
11251
11252
|
try {
|
|
11252
11253
|
const Z = await P.getHandler().searchCount({
|
|
11253
|
-
params: j ? a :
|
|
11254
|
+
params: j ? a : Oe,
|
|
11254
11255
|
model: n,
|
|
11255
11256
|
context: u,
|
|
11256
11257
|
name_search: j
|
|
11257
11258
|
});
|
|
11258
|
-
|
|
11259
|
+
O(Z), M(Z);
|
|
11259
11260
|
} catch (Z) {
|
|
11260
11261
|
v(Z);
|
|
11261
11262
|
} finally {
|
|
@@ -11264,7 +11265,7 @@ function ph(e, t) {
|
|
|
11264
11265
|
}
|
|
11265
11266
|
}, [
|
|
11266
11267
|
a,
|
|
11267
|
-
|
|
11268
|
+
Oe,
|
|
11268
11269
|
n,
|
|
11269
11270
|
Ee,
|
|
11270
11271
|
j,
|
|
@@ -11281,7 +11282,7 @@ function ph(e, t) {
|
|
|
11281
11282
|
return [];
|
|
11282
11283
|
const ke = {};
|
|
11283
11284
|
z.colors && (ke.colors = z.colors), z.status && (ke.status = z.status);
|
|
11284
|
-
const ot = j ? a :
|
|
11285
|
+
const ot = j ? a : Oe, bt = Sc(Ye), { results: St, attrsEvaluated: Be } = await P.getHandler().searchForTree({
|
|
11285
11286
|
params: ot,
|
|
11286
11287
|
limit: Pe - Z,
|
|
11287
11288
|
offset: Z,
|
|
@@ -11305,7 +11306,7 @@ function ph(e, t) {
|
|
|
11305
11306
|
ne == null || ne(mt);
|
|
11306
11307
|
}
|
|
11307
11308
|
if (xe.current = bt, St.length === 0)
|
|
11308
|
-
return y.current = [],
|
|
11309
|
+
return y.current = [], O(0), M(0), [];
|
|
11309
11310
|
const xt = zn(z, St), Zn = Qt(Be);
|
|
11310
11311
|
if (p.current = {
|
|
11311
11312
|
...p.current,
|
|
@@ -11322,7 +11323,7 @@ function ph(e, t) {
|
|
|
11322
11323
|
[
|
|
11323
11324
|
ee,
|
|
11324
11325
|
a,
|
|
11325
|
-
|
|
11326
|
+
Oe,
|
|
11326
11327
|
n,
|
|
11327
11328
|
Ee,
|
|
11328
11329
|
j,
|
|
@@ -11351,17 +11352,17 @@ function ph(e, t) {
|
|
|
11351
11352
|
sortFields: Ye
|
|
11352
11353
|
});
|
|
11353
11354
|
} catch (ke) {
|
|
11354
|
-
throw console.error(ke),
|
|
11355
|
+
throw console.error(ke), O(null), M(0), v(ke), ke;
|
|
11355
11356
|
} finally {
|
|
11356
11357
|
F == null || F(!1);
|
|
11357
11358
|
}
|
|
11358
11359
|
},
|
|
11359
11360
|
[Fe, M, F, v]
|
|
11360
|
-
),
|
|
11361
|
+
), we = B((Z) => {
|
|
11361
11362
|
var Pe, Ye, ke, ot;
|
|
11362
11363
|
if (p.current[(Ye = (Pe = Z.node) == null ? void 0 : Pe.data) == null ? void 0 : Ye.id])
|
|
11363
11364
|
return { color: p.current[(ot = (ke = Z.node) == null ? void 0 : ke.data) == null ? void 0 : ot.id] };
|
|
11364
|
-
}, []), _e =
|
|
11365
|
+
}, []), _e = ye(() => (L == null ? void 0 : L.map((Z) => Z.id)) || [], [L]), [J, Ce, Se] = Rs({
|
|
11365
11366
|
ooui: z,
|
|
11366
11367
|
model: n,
|
|
11367
11368
|
showEmptyValues: !0,
|
|
@@ -11381,7 +11382,7 @@ function ph(e, t) {
|
|
|
11381
11382
|
return;
|
|
11382
11383
|
const Ye = await P.getHandler().searchAllIds(
|
|
11383
11384
|
{
|
|
11384
|
-
params: j ? a :
|
|
11385
|
+
params: j ? a : Oe,
|
|
11385
11386
|
model: n,
|
|
11386
11387
|
context: u,
|
|
11387
11388
|
totalItems: x
|
|
@@ -11399,7 +11400,7 @@ function ph(e, t) {
|
|
|
11399
11400
|
}) : Pe() : R == null || R([]);
|
|
11400
11401
|
}, [
|
|
11401
11402
|
a,
|
|
11402
|
-
|
|
11403
|
+
Oe,
|
|
11403
11404
|
n,
|
|
11404
11405
|
j,
|
|
11405
11406
|
u,
|
|
@@ -11407,18 +11408,18 @@ function ph(e, t) {
|
|
|
11407
11408
|
R,
|
|
11408
11409
|
w,
|
|
11409
11410
|
x
|
|
11410
|
-
]), Me = B(() => W, [W]), re =
|
|
11411
|
+
]), Me = B(() => W, [W]), re = ye(() => Se ? /* @__PURE__ */ i(As, { aggregates: Ce, isLoading: J }) : null, [Ce, J, Se]), Ie = B((Z) => /* @__PURE__ */ i(Lr, { color: Z, style: { marginLeft: 7 } }), []), qe = B(
|
|
11411
11412
|
(Z) => {
|
|
11412
11413
|
var Pe;
|
|
11413
11414
|
return (Pe = h.current) == null ? void 0 : Pe[Z.id];
|
|
11414
11415
|
},
|
|
11415
11416
|
[]
|
|
11416
|
-
), pe =
|
|
11417
|
+
), pe = ye(
|
|
11417
11418
|
() => ({
|
|
11418
11419
|
resetTableViewLabel: w("resetTableView")
|
|
11419
11420
|
}),
|
|
11420
11421
|
[w]
|
|
11421
|
-
), rt =
|
|
11422
|
+
), rt = ye(() => !Y || !z ? null : /* @__PURE__ */ i(
|
|
11422
11423
|
Wi,
|
|
11423
11424
|
{
|
|
11424
11425
|
readonly: !1,
|
|
@@ -11427,7 +11428,7 @@ function ph(e, t) {
|
|
|
11427
11428
|
columns: Y,
|
|
11428
11429
|
onRequestData: ue,
|
|
11429
11430
|
onRowDoubleClick: s,
|
|
11430
|
-
onRowStyle:
|
|
11431
|
+
onRowStyle: we,
|
|
11431
11432
|
onRowSelectionChange: ce,
|
|
11432
11433
|
onColumnChanged: Le,
|
|
11433
11434
|
onGetColumnsState: $e,
|
|
@@ -11438,7 +11439,7 @@ function ph(e, t) {
|
|
|
11438
11439
|
totalRows: x || 99999,
|
|
11439
11440
|
footer: re,
|
|
11440
11441
|
hasStatusColumn: z.status !== null,
|
|
11441
|
-
statusComponent:
|
|
11442
|
+
statusComponent: Ie,
|
|
11442
11443
|
onRowStatus: qe,
|
|
11443
11444
|
strings: pe
|
|
11444
11445
|
}
|
|
@@ -11452,11 +11453,11 @@ function ph(e, t) {
|
|
|
11452
11453
|
ue,
|
|
11453
11454
|
s,
|
|
11454
11455
|
qe,
|
|
11455
|
-
|
|
11456
|
+
we,
|
|
11456
11457
|
Ue,
|
|
11457
11458
|
_e,
|
|
11458
11459
|
G,
|
|
11459
|
-
|
|
11460
|
+
Ie,
|
|
11460
11461
|
pe,
|
|
11461
11462
|
x,
|
|
11462
11463
|
z,
|
|
@@ -11489,13 +11490,13 @@ function ph(e, t) {
|
|
|
11489
11490
|
/* @__PURE__ */ i(
|
|
11490
11491
|
"div",
|
|
11491
11492
|
{
|
|
11492
|
-
ref:
|
|
11493
|
+
ref: I,
|
|
11493
11494
|
style: {
|
|
11494
11495
|
overflow: "hidden",
|
|
11495
11496
|
height: `${C}px`,
|
|
11496
11497
|
...l ? {} : { display: "none" }
|
|
11497
11498
|
},
|
|
11498
|
-
children: D ||
|
|
11499
|
+
children: D || ve || g ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ E(Jt, { children: [
|
|
11499
11500
|
rt,
|
|
11500
11501
|
/* @__PURE__ */ i(
|
|
11501
11502
|
dh,
|
|
@@ -11534,7 +11535,7 @@ const hh = pt(ph), gh = (e) => {
|
|
|
11534
11535
|
setCurrentView: d,
|
|
11535
11536
|
availableViews: p,
|
|
11536
11537
|
searchTreeNameSearch: h
|
|
11537
|
-
} = e, m =
|
|
11538
|
+
} = e, m = ye(() => a != null && a.arch ? xc(a == null ? void 0 : a.arch, "infinite") === "1" : !1, [a]);
|
|
11538
11539
|
de(() => {
|
|
11539
11540
|
g == null || g(m);
|
|
11540
11541
|
}, [m]);
|
|
@@ -11542,14 +11543,14 @@ const hh = pt(ph), gh = (e) => {
|
|
|
11542
11543
|
lt
|
|
11543
11544
|
), b = B(
|
|
11544
11545
|
(x) => {
|
|
11545
|
-
const { id:
|
|
11546
|
-
f(
|
|
11547
|
-
const w = u.findIndex((C) => C.id ===
|
|
11546
|
+
const { id: O } = x;
|
|
11547
|
+
f(O);
|
|
11548
|
+
const w = u.findIndex((C) => C.id === O);
|
|
11548
11549
|
v == null || v(y), c(w);
|
|
11549
|
-
const
|
|
11550
|
+
const I = p.find(
|
|
11550
11551
|
(C) => C.type === "form"
|
|
11551
11552
|
);
|
|
11552
|
-
d(
|
|
11553
|
+
d(I);
|
|
11553
11554
|
},
|
|
11554
11555
|
[
|
|
11555
11556
|
p,
|
|
@@ -11725,7 +11726,7 @@ function xh(e, t) {
|
|
|
11725
11726
|
action_type: m,
|
|
11726
11727
|
treeExpandable: y = !1,
|
|
11727
11728
|
limit: v
|
|
11728
|
-
} = e, [g, b] = S(), [x,
|
|
11729
|
+
} = e, [g, b] = S(), [x, O] = S([]), [w, I] = S(!0), C = p || void 0, [T, A] = S(
|
|
11729
11730
|
C
|
|
11730
11731
|
), [D, F] = S([]), [_, $] = S(), [R, G] = S([]), [W, L] = S(), [N, k] = S(0), [X, te] = S(!1), [ie, H] = S(!1), [ne, ee] = S(), { t: V } = he(), M = Q(), j = Q(), fe = oe(
|
|
11731
11732
|
wt
|
|
@@ -11733,7 +11734,7 @@ function xh(e, t) {
|
|
|
11733
11734
|
setCurrentView: z,
|
|
11734
11735
|
setCurrentId: Y,
|
|
11735
11736
|
tabs: me,
|
|
11736
|
-
activeKey:
|
|
11737
|
+
activeKey: ve,
|
|
11737
11738
|
openAction: $e,
|
|
11738
11739
|
onRemoveTab: Le
|
|
11739
11740
|
} = fe || {};
|
|
@@ -11743,9 +11744,9 @@ function xh(e, t) {
|
|
|
11743
11744
|
ce();
|
|
11744
11745
|
},
|
|
11745
11746
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11746
|
-
[
|
|
11747
|
+
[ve, me, g, _, R]
|
|
11747
11748
|
);
|
|
11748
|
-
function
|
|
11749
|
+
function Oe(J) {
|
|
11749
11750
|
A(J), Y == null || Y(J);
|
|
11750
11751
|
}
|
|
11751
11752
|
function Ee(J) {
|
|
@@ -11757,15 +11758,15 @@ function xh(e, t) {
|
|
|
11757
11758
|
canWeClose: Fe
|
|
11758
11759
|
}));
|
|
11759
11760
|
const Ke = async () => {
|
|
11760
|
-
|
|
11761
|
+
I(!0);
|
|
11761
11762
|
const J = [], Ce = [];
|
|
11762
11763
|
for (const Me of s) {
|
|
11763
|
-
const [re,
|
|
11764
|
-
|
|
11764
|
+
const [re, Ie] = Me;
|
|
11765
|
+
Ie !== "dashboard" ? Ce.push({
|
|
11765
11766
|
viewTuple: Me,
|
|
11766
11767
|
promise: P.getHandler().getView({
|
|
11767
11768
|
model: r,
|
|
11768
|
-
type:
|
|
11769
|
+
type: Ie,
|
|
11769
11770
|
id: re,
|
|
11770
11771
|
context: o
|
|
11771
11772
|
})
|
|
@@ -11777,7 +11778,7 @@ function xh(e, t) {
|
|
|
11777
11778
|
for (const Me of Se) {
|
|
11778
11779
|
if (!Me)
|
|
11779
11780
|
continue;
|
|
11780
|
-
const [, re] = Me.viewTuple,
|
|
11781
|
+
const [, re] = Me.viewTuple, Ie = Me.info;
|
|
11781
11782
|
switch (re) {
|
|
11782
11783
|
case "dashboard": {
|
|
11783
11784
|
const qe = s.find((rt) => {
|
|
@@ -11804,14 +11805,14 @@ function xh(e, t) {
|
|
|
11804
11805
|
}
|
|
11805
11806
|
case "form": {
|
|
11806
11807
|
J.push({
|
|
11807
|
-
...
|
|
11808
|
+
...Ie,
|
|
11808
11809
|
type: re
|
|
11809
11810
|
});
|
|
11810
11811
|
break;
|
|
11811
11812
|
}
|
|
11812
11813
|
case "tree": {
|
|
11813
11814
|
J.push({
|
|
11814
|
-
...
|
|
11815
|
+
...Ie,
|
|
11815
11816
|
isExpandable: y,
|
|
11816
11817
|
type: re
|
|
11817
11818
|
});
|
|
@@ -11819,7 +11820,7 @@ function xh(e, t) {
|
|
|
11819
11820
|
}
|
|
11820
11821
|
case "graph": {
|
|
11821
11822
|
J.push({
|
|
11822
|
-
...
|
|
11823
|
+
...Ie,
|
|
11823
11824
|
type: re
|
|
11824
11825
|
});
|
|
11825
11826
|
break;
|
|
@@ -11834,23 +11835,23 @@ function xh(e, t) {
|
|
|
11834
11835
|
), Ue || (it(
|
|
11835
11836
|
`Error determining the first view to show for model ${r}.
|
|
11836
11837
|
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
11837
|
-
), Le == null || Le(c)), Ee(Ue),
|
|
11838
|
+
), Le == null || Le(c)), Ee(Ue), O(J), I(!1);
|
|
11838
11839
|
};
|
|
11839
11840
|
l({ tabKey: c, canWeClose: Fe }), de(() => {
|
|
11840
11841
|
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);
|
|
11841
|
-
Ee(Ce || J), p ? Y == null || Y(C) : (
|
|
11842
|
+
Ee(Ce || J), p ? Y == null || Y(C) : (Oe(void 0), $(void 0)), Ke();
|
|
11842
11843
|
}, [r, s, p]), de(() => {
|
|
11843
|
-
if (
|
|
11844
|
+
if (ve === c) {
|
|
11844
11845
|
Y == null || Y(T);
|
|
11845
11846
|
const J = { action_id: h, action_type: m };
|
|
11846
11847
|
z == null || z({ ...g, extra: J });
|
|
11847
11848
|
}
|
|
11848
|
-
}, [me,
|
|
11849
|
+
}, [me, ve]);
|
|
11849
11850
|
async function Fe() {
|
|
11850
11851
|
return g && g.type === "form" ? await M.current.cancelUnsavedChanges() : !0;
|
|
11851
11852
|
}
|
|
11852
11853
|
async function ce() {
|
|
11853
|
-
|
|
11854
|
+
ve === c && (g.type === "form" && !await M.current.cancelUnsavedChanges() || te(!0));
|
|
11854
11855
|
}
|
|
11855
11856
|
async function ue(J, Ce) {
|
|
11856
11857
|
var Me;
|
|
@@ -11858,9 +11859,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11858
11859
|
let Se, Ue;
|
|
11859
11860
|
if (J.length === 1) {
|
|
11860
11861
|
Se = "form", Ue = [];
|
|
11861
|
-
const re = J[0],
|
|
11862
|
+
const re = J[0], Ie = R.findIndex((pe) => pe.id === re);
|
|
11862
11863
|
let qe;
|
|
11863
|
-
if (
|
|
11864
|
+
if (Ie === -1) {
|
|
11864
11865
|
try {
|
|
11865
11866
|
qe = (Me = await P.getHandler().readObjects({
|
|
11866
11867
|
model: r,
|
|
@@ -11874,17 +11875,17 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11874
11875
|
return;
|
|
11875
11876
|
}
|
|
11876
11877
|
} else
|
|
11877
|
-
qe = R[
|
|
11878
|
+
qe = R[Ie];
|
|
11878
11879
|
} else
|
|
11879
11880
|
Se = "tree", Ue = [["id", "in", J]];
|
|
11880
11881
|
if (H(!1), te(!1), Ce && Se === "form") {
|
|
11881
|
-
|
|
11882
|
+
Oe(J[0]);
|
|
11882
11883
|
const re = x.find(
|
|
11883
|
-
(
|
|
11884
|
+
(Ie) => Ie.type === "form"
|
|
11884
11885
|
);
|
|
11885
11886
|
Ee(re);
|
|
11886
11887
|
} else {
|
|
11887
|
-
const re = s.find((
|
|
11888
|
+
const re = s.find((Ie) => Ie[1] === Se);
|
|
11888
11889
|
$e({
|
|
11889
11890
|
domain: Ue,
|
|
11890
11891
|
context: o,
|
|
@@ -11899,7 +11900,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11899
11900
|
});
|
|
11900
11901
|
}
|
|
11901
11902
|
}
|
|
11902
|
-
function
|
|
11903
|
+
function we() {
|
|
11903
11904
|
return x.map((J) => {
|
|
11904
11905
|
switch (J.type) {
|
|
11905
11906
|
case "form":
|
|
@@ -11937,7 +11938,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11937
11938
|
availableViews: x,
|
|
11938
11939
|
results: R,
|
|
11939
11940
|
setCurrentItemIndex: $,
|
|
11940
|
-
setCurrentId:
|
|
11941
|
+
setCurrentId: Oe,
|
|
11941
11942
|
setCurrentView: Ee
|
|
11942
11943
|
},
|
|
11943
11944
|
`${J.type}-${J.view_id}`
|
|
@@ -11972,7 +11973,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11972
11973
|
if (T === void 0 && g.type === "form")
|
|
11973
11974
|
M.current.clearAndReload();
|
|
11974
11975
|
else {
|
|
11975
|
-
|
|
11976
|
+
Oe(void 0);
|
|
11976
11977
|
const J = x.find(
|
|
11977
11978
|
(Ce) => Ce.type === "form"
|
|
11978
11979
|
);
|
|
@@ -11990,7 +11991,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11990
11991
|
searchTreeRef: j,
|
|
11991
11992
|
onNewClicked: _e,
|
|
11992
11993
|
currentId: T,
|
|
11993
|
-
setCurrentId:
|
|
11994
|
+
setCurrentId: Oe,
|
|
11994
11995
|
setCurrentItemIndex: $,
|
|
11995
11996
|
currentItemIndex: _,
|
|
11996
11997
|
results: R,
|
|
@@ -12006,9 +12007,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
12006
12007
|
searchTreeNameSearch: ne,
|
|
12007
12008
|
goToResourceId: ue,
|
|
12008
12009
|
limit: v,
|
|
12009
|
-
isActive: c ===
|
|
12010
|
+
isActive: c === ve,
|
|
12010
12011
|
children: [
|
|
12011
|
-
|
|
12012
|
+
we(),
|
|
12012
12013
|
/* @__PURE__ */ i(
|
|
12013
12014
|
Kf,
|
|
12014
12015
|
{
|
|
@@ -12055,7 +12056,7 @@ const Ch = Ll(jl), Th = (e) => {
|
|
|
12055
12056
|
}
|
|
12056
12057
|
);
|
|
12057
12058
|
};
|
|
12058
|
-
function
|
|
12059
|
+
function Oh(e) {
|
|
12059
12060
|
const {
|
|
12060
12061
|
action: t,
|
|
12061
12062
|
model: n,
|
|
@@ -12064,19 +12065,19 @@ function Ih(e) {
|
|
|
12064
12065
|
domain: s = [],
|
|
12065
12066
|
visible: a = !0,
|
|
12066
12067
|
parentContext: l = {}
|
|
12067
|
-
} = e, [c, u] = S(!1), [f, d] = S(!1), [p, h] = S(), [m, y] = S(), [v, g] = S(), [b, x] = S(1), [
|
|
12068
|
-
te(!0), x(Y), w((Y - 1) *
|
|
12068
|
+
} = e, [c, u] = S(!1), [f, d] = S(!1), [p, h] = S(), [m, y] = S(), [v, g] = S(), [b, x] = S(1), [O, w] = S(0), I = Q($t), C = Q([]), [T, A] = S(0), [D, F] = S([]), [_, $] = S(void 0), [R, G] = S(), [W, L] = S(), [N, k] = S(), [X, te] = S(!1), ie = Q([]), H = (Y) => {
|
|
12069
|
+
te(!0), x(Y), w((Y - 1) * I.current);
|
|
12069
12070
|
}, ne = async () => {
|
|
12070
|
-
const Y = ie.current.length > 0 ? ie.current : s, me = Zt(C.current, Y), { colors:
|
|
12071
|
+
const Y = ie.current.length > 0 ? ie.current : s, me = Zt(C.current, Y), { colors: ve } = It(m), { totalItems: $e, results: Le, attrsEvaluated: Oe } = await P.getHandler().searchForTree({
|
|
12071
12072
|
params: me,
|
|
12072
|
-
limit:
|
|
12073
|
-
offset:
|
|
12073
|
+
limit: I.current,
|
|
12074
|
+
offset: O,
|
|
12074
12075
|
model: p,
|
|
12075
12076
|
fields: m.fields,
|
|
12076
12077
|
context: l,
|
|
12077
|
-
attrs:
|
|
12078
|
+
attrs: ve && { colors: ve }
|
|
12078
12079
|
});
|
|
12079
|
-
$(Qt(
|
|
12080
|
+
$(Qt(Oe));
|
|
12080
12081
|
const Ee = Yt({
|
|
12081
12082
|
resultsToSort: Le,
|
|
12082
12083
|
sorter: R,
|
|
@@ -12094,7 +12095,7 @@ function Ih(e) {
|
|
|
12094
12095
|
};
|
|
12095
12096
|
de(() => {
|
|
12096
12097
|
f && a && ee();
|
|
12097
|
-
}, [b,
|
|
12098
|
+
}, [b, O, f, a]);
|
|
12098
12099
|
const V = async (Y) => {
|
|
12099
12100
|
d(!1), u(!0), k(void 0);
|
|
12100
12101
|
try {
|
|
@@ -12109,7 +12110,7 @@ function Ih(e) {
|
|
|
12109
12110
|
action: t,
|
|
12110
12111
|
context: l
|
|
12111
12112
|
});
|
|
12112
|
-
ie.current = Y.domain, g(Y.views.get("form")), y(Y.views.get("tree")), h(Y.model),
|
|
12113
|
+
ie.current = Y.domain, g(Y.views.get("form")), y(Y.views.get("tree")), h(Y.model), I.current = Y.limit;
|
|
12113
12114
|
}, j = async () => {
|
|
12114
12115
|
h(n);
|
|
12115
12116
|
const Y = await P.getHandler().getView({
|
|
@@ -12143,7 +12144,7 @@ function Ih(e) {
|
|
|
12143
12144
|
{
|
|
12144
12145
|
showPagination: !1,
|
|
12145
12146
|
total: T,
|
|
12146
|
-
limit:
|
|
12147
|
+
limit: I.current,
|
|
12147
12148
|
page: b,
|
|
12148
12149
|
treeView: m,
|
|
12149
12150
|
results: D,
|
|
@@ -12167,7 +12168,7 @@ function Ih(e) {
|
|
|
12167
12168
|
] });
|
|
12168
12169
|
return N ? /* @__PURE__ */ i(nt, { className: "mt-10", message: N, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : z();
|
|
12169
12170
|
}
|
|
12170
|
-
const
|
|
12171
|
+
const Ih = $r(Oh), Ah = (e) => {
|
|
12171
12172
|
const { model: t } = e, [n, r] = S();
|
|
12172
12173
|
de(() => {
|
|
12173
12174
|
o();
|
|
@@ -12189,7 +12190,7 @@ function Fh(e, t) {
|
|
|
12189
12190
|
moveItemsEnabled: m
|
|
12190
12191
|
} = oe(ho), y = Q(), v = Q(), [g] = Je(P.getHandler().getView), [b] = Je(
|
|
12191
12192
|
P.getHandler().readObjects
|
|
12192
|
-
), [x] = Je(P.getHandler().update),
|
|
12193
|
+
), [x] = Je(P.getHandler().update), O = Jn(
|
|
12193
12194
|
sn.FEATURE_READFORVIEW
|
|
12194
12195
|
);
|
|
12195
12196
|
de(() => {
|
|
@@ -12203,7 +12204,7 @@ function Fh(e, t) {
|
|
|
12203
12204
|
async function w() {
|
|
12204
12205
|
u(!0), p(!0), d(void 0);
|
|
12205
12206
|
try {
|
|
12206
|
-
const _ = await
|
|
12207
|
+
const _ = await I(), $ = await T(_), R = _.fields[gr].relation, G = $[gr].items;
|
|
12207
12208
|
v.current = _.fields;
|
|
12208
12209
|
const W = await C({
|
|
12209
12210
|
items: G,
|
|
@@ -12215,7 +12216,7 @@ function Fh(e, t) {
|
|
|
12215
12216
|
d(JSON.stringify(_));
|
|
12216
12217
|
}
|
|
12217
12218
|
}
|
|
12218
|
-
async function
|
|
12219
|
+
async function I() {
|
|
12219
12220
|
return await g({
|
|
12220
12221
|
model: n,
|
|
12221
12222
|
type: "form",
|
|
@@ -12335,9 +12336,9 @@ function Fh(e, t) {
|
|
|
12335
12336
|
}
|
|
12336
12337
|
let fe = null;
|
|
12337
12338
|
if ((V == null ? void 0 : V.type) === "graph") {
|
|
12338
|
-
const
|
|
12339
|
+
const ve = G.server_action === !0 && O ? as : on;
|
|
12339
12340
|
fe = /* @__PURE__ */ i(
|
|
12340
|
-
|
|
12341
|
+
ve,
|
|
12341
12342
|
{
|
|
12342
12343
|
view_id: ie.filter(
|
|
12343
12344
|
($e) => $e[1] === "graph"
|
|
@@ -12353,7 +12354,7 @@ function Fh(e, t) {
|
|
|
12353
12354
|
fe = /* @__PURE__ */ i(Ah, { model: H, actionDomain: ee }, L);
|
|
12354
12355
|
else if ((V == null ? void 0 : V.type) === "tree")
|
|
12355
12356
|
fe = /* @__PURE__ */ i(
|
|
12356
|
-
|
|
12357
|
+
Ih,
|
|
12357
12358
|
{
|
|
12358
12359
|
model: H,
|
|
12359
12360
|
domain: ee,
|
|
@@ -12361,18 +12362,18 @@ function Fh(e, t) {
|
|
|
12361
12362
|
(me) => me[1] === "tree"
|
|
12362
12363
|
)[0][0],
|
|
12363
12364
|
onRowClicked: (me) => {
|
|
12364
|
-
const
|
|
12365
|
+
const ve = ie.find(($e) => {
|
|
12365
12366
|
const [, Le] = $e;
|
|
12366
12367
|
return Le === "form";
|
|
12367
12368
|
});
|
|
12368
|
-
if (
|
|
12369
|
-
const [$e, Le] =
|
|
12370
|
-
actionId:
|
|
12369
|
+
if (ve) {
|
|
12370
|
+
const [$e, Le] = ve, {
|
|
12371
|
+
actionId: Oe,
|
|
12371
12372
|
actionType: Ee,
|
|
12372
12373
|
title: Ke,
|
|
12373
12374
|
model: Fe
|
|
12374
12375
|
} = R, ce = {
|
|
12375
|
-
action_id:
|
|
12376
|
+
action_id: Oe,
|
|
12376
12377
|
action_type: Ee,
|
|
12377
12378
|
name: Ke,
|
|
12378
12379
|
res_id: me.id,
|
|
@@ -12409,24 +12410,24 @@ function Fh(e, t) {
|
|
|
12409
12410
|
}
|
|
12410
12411
|
let z;
|
|
12411
12412
|
const Y = ie.find((me) => {
|
|
12412
|
-
const [,
|
|
12413
|
-
return
|
|
12413
|
+
const [, ve] = me;
|
|
12414
|
+
return ve === "tree";
|
|
12414
12415
|
});
|
|
12415
12416
|
if (Y) {
|
|
12416
|
-
const [me,
|
|
12417
|
+
const [me, ve] = Y, {
|
|
12417
12418
|
actionId: $e,
|
|
12418
12419
|
actionType: Le,
|
|
12419
|
-
title:
|
|
12420
|
+
title: Oe,
|
|
12420
12421
|
model: Ee
|
|
12421
12422
|
} = R;
|
|
12422
12423
|
z = {
|
|
12423
12424
|
action_id: $e,
|
|
12424
12425
|
action_type: Le,
|
|
12425
|
-
name:
|
|
12426
|
+
name: Oe,
|
|
12426
12427
|
res_id: !1,
|
|
12427
12428
|
res_model: Ee,
|
|
12428
12429
|
view_id: me,
|
|
12429
|
-
view_type:
|
|
12430
|
+
view_type: ve,
|
|
12430
12431
|
overrideUnsettedLimit: !0
|
|
12431
12432
|
};
|
|
12432
12433
|
}
|
|
@@ -12450,14 +12451,14 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12450
12451
|
}, Vh = (e) => {
|
|
12451
12452
|
const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, s = o.filter((T) => T.operation !== "pendingRemove").map((T) => T.id), [a, l] = S([]), [c, u] = S(), [f, d] = S(!1), { relation: p, context: h, readOnly: m, field: y, columns: v } = n, g = oe(He), { getContext: b } = g || {};
|
|
12452
12453
|
yt(() => {
|
|
12453
|
-
|
|
12454
|
+
O();
|
|
12454
12455
|
}, [o]);
|
|
12455
12456
|
const x = (T) => {
|
|
12456
12457
|
r == null || r({
|
|
12457
12458
|
items: T
|
|
12458
12459
|
});
|
|
12459
12460
|
};
|
|
12460
|
-
async function
|
|
12461
|
+
async function O() {
|
|
12461
12462
|
d(!0);
|
|
12462
12463
|
let T = [];
|
|
12463
12464
|
if (n.domain) {
|
|
@@ -12494,7 +12495,7 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12494
12495
|
}
|
|
12495
12496
|
const w = () => {
|
|
12496
12497
|
C(a.map((T) => T.value));
|
|
12497
|
-
},
|
|
12498
|
+
}, I = () => {
|
|
12498
12499
|
C([]);
|
|
12499
12500
|
}, C = (T) => {
|
|
12500
12501
|
const A = o.map((F) => T.includes(F.id) ? F.operation == "pendingRemove" ? {
|
|
@@ -12525,7 +12526,7 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12525
12526
|
children: "Check all"
|
|
12526
12527
|
}
|
|
12527
12528
|
),
|
|
12528
|
-
/* @__PURE__ */ i(je, { onClick:
|
|
12529
|
+
/* @__PURE__ */ i(je, { onClick: I, disabled: s.length === 0, children: "Uncheck all" })
|
|
12529
12530
|
] })
|
|
12530
12531
|
] }) });
|
|
12531
12532
|
}, Dh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Eh, { ...e }) }), Eh = (e) => {
|
|
@@ -12631,28 +12632,41 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12631
12632
|
/* @__PURE__ */ i("div", { style: f }),
|
|
12632
12633
|
/* @__PURE__ */ i("div", { style: d(p.active) })
|
|
12633
12634
|
] }, h)) });
|
|
12634
|
-
}, Bh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(jh, {}) }), Hh = (e) => {
|
|
12635
|
-
const { ooui: t } = e, { lang:
|
|
12636
|
-
|
|
12635
|
+
}, Bh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(jh, {}) }), Hh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Uh, { ...e }) }), Uh = (e) => {
|
|
12636
|
+
const { ooui: t, value: n, onChange: r } = e, { lang: o, height: s, readOnly: a } = t, l = oe(He), { elementHasLostFocus: c } = l || {}, u = B(
|
|
12637
|
+
(d) => {
|
|
12638
|
+
c && d.onDidBlurEditorWidget(() => c());
|
|
12639
|
+
},
|
|
12640
|
+
[c]
|
|
12641
|
+
), f = ye(() => {
|
|
12642
|
+
if (o === "json" && typeof n == "object")
|
|
12643
|
+
try {
|
|
12644
|
+
return JSON.stringify(n, null, " ");
|
|
12645
|
+
} catch (d) {
|
|
12646
|
+
return console.error("Error stringifying JSON:", d), "";
|
|
12647
|
+
}
|
|
12648
|
+
return n;
|
|
12649
|
+
}, [o, n]);
|
|
12650
|
+
return /* @__PURE__ */ i(
|
|
12637
12651
|
Nl,
|
|
12638
12652
|
{
|
|
12653
|
+
value: f,
|
|
12639
12654
|
options: {
|
|
12640
|
-
readOnly:
|
|
12655
|
+
readOnly: a
|
|
12641
12656
|
},
|
|
12642
|
-
defaultLanguage:
|
|
12643
|
-
height:
|
|
12644
|
-
onMount:
|
|
12645
|
-
|
|
12646
|
-
}
|
|
12657
|
+
defaultLanguage: o || "",
|
|
12658
|
+
height: s || 300,
|
|
12659
|
+
onMount: u,
|
|
12660
|
+
onChange: r
|
|
12647
12661
|
}
|
|
12648
|
-
)
|
|
12649
|
-
}, { Meta:
|
|
12662
|
+
);
|
|
12663
|
+
}, { Meta: Wh } = Nr, { Text: Gh } = Rt, Kh = ({ email: e, size: t = 40, theme: n = "" }) => {
|
|
12650
12664
|
const r = `https://www.gravatar.com/avatar/${Ml(
|
|
12651
12665
|
e
|
|
12652
12666
|
)}?s=${t}&d=${n}`;
|
|
12653
12667
|
return /* @__PURE__ */ i(Ti, { src: r, size: t });
|
|
12654
12668
|
};
|
|
12655
|
-
function
|
|
12669
|
+
function qh({ text: e }) {
|
|
12656
12670
|
const t = e.split(`
|
|
12657
12671
|
`);
|
|
12658
12672
|
return /* @__PURE__ */ i("div", { children: t.map((n, r) => /* @__PURE__ */ E(Jt, { children: [
|
|
@@ -12660,13 +12674,13 @@ function Kh({ text: e }) {
|
|
|
12660
12674
|
r !== t.length - 1 && /* @__PURE__ */ i("br", {})
|
|
12661
12675
|
] }, r)) });
|
|
12662
12676
|
}
|
|
12663
|
-
const
|
|
12677
|
+
const Yh = (e) => {
|
|
12664
12678
|
const { data: t, style: n } = e, { t: r } = he();
|
|
12665
12679
|
return /* @__PURE__ */ E(Nr, { style: { ...n, textAlign: "start" }, children: [
|
|
12666
12680
|
/* @__PURE__ */ i(
|
|
12667
|
-
|
|
12681
|
+
Wh,
|
|
12668
12682
|
{
|
|
12669
|
-
avatar: /* @__PURE__ */ i(
|
|
12683
|
+
avatar: /* @__PURE__ */ i(Kh, { email: t.email, theme: "mp" }),
|
|
12670
12684
|
title: t.author,
|
|
12671
12685
|
description: /* @__PURE__ */ E(Xe, { direction: "horizontal", children: [
|
|
12672
12686
|
/* @__PURE__ */ i("span", { title: t.date, children: st(t.date).fromNow() }),
|
|
@@ -12675,9 +12689,9 @@ const qh = (e) => {
|
|
|
12675
12689
|
style: { marginBottom: "5px" }
|
|
12676
12690
|
}
|
|
12677
12691
|
),
|
|
12678
|
-
/* @__PURE__ */ i(
|
|
12692
|
+
/* @__PURE__ */ i(Gh, { children: /* @__PURE__ */ i(qh, { text: t.text }) })
|
|
12679
12693
|
] }, t.id);
|
|
12680
|
-
},
|
|
12694
|
+
}, zh = (e) => {
|
|
12681
12695
|
const { value: t, ooui: n } = e, r = (t || []).map((o) => {
|
|
12682
12696
|
if (o.type === "action")
|
|
12683
12697
|
return {
|
|
@@ -12688,7 +12702,7 @@ const qh = (e) => {
|
|
|
12688
12702
|
color: "gray",
|
|
12689
12703
|
position: o.event.isSender ? "left" : "right",
|
|
12690
12704
|
label: o.event.date,
|
|
12691
|
-
children: /* @__PURE__ */ i(
|
|
12705
|
+
children: /* @__PURE__ */ i(Yh, { data: o.event })
|
|
12692
12706
|
};
|
|
12693
12707
|
});
|
|
12694
12708
|
return /* @__PURE__ */ i(
|
|
@@ -12705,7 +12719,7 @@ const qh = (e) => {
|
|
|
12705
12719
|
}
|
|
12706
12720
|
}
|
|
12707
12721
|
);
|
|
12708
|
-
},
|
|
12722
|
+
}, Jh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(zh, { ooui: e.ooui }) }), Xh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(ll, {}) }), Qh = (e) => {
|
|
12709
12723
|
const { ooui: t } = e, { title: n, text: r, alertType: o, icon: s } = t;
|
|
12710
12724
|
function a(c) {
|
|
12711
12725
|
if (c) {
|
|
@@ -12725,54 +12739,54 @@ const qh = (e) => {
|
|
|
12725
12739
|
icon: a(s)
|
|
12726
12740
|
}
|
|
12727
12741
|
);
|
|
12728
|
-
}, { Content:
|
|
12729
|
-
function
|
|
12742
|
+
}, { Content: Zh } = Ii, { Title: eg } = Rt;
|
|
12743
|
+
function tg() {
|
|
12730
12744
|
const { t: e } = he();
|
|
12731
|
-
return /* @__PURE__ */ i(
|
|
12745
|
+
return /* @__PURE__ */ i(Zh, { className: "m-5 select-none", children: /* @__PURE__ */ i(eg, { level: 5, children: e("welcome") }) });
|
|
12732
12746
|
}
|
|
12733
|
-
function
|
|
12747
|
+
function ng(e, t) {
|
|
12734
12748
|
const { children: n } = e, [r, o] = S("welcome"), { t: s } = he(), { globalValues: a, rootContext: l } = to(), [c, u] = S([
|
|
12735
12749
|
{
|
|
12736
12750
|
title: s("welcome"),
|
|
12737
12751
|
key: "welcome",
|
|
12738
12752
|
closable: !0,
|
|
12739
|
-
content: /* @__PURE__ */ i(
|
|
12753
|
+
content: /* @__PURE__ */ i(tg, {})
|
|
12740
12754
|
}
|
|
12741
12755
|
]), f = Q(/* @__PURE__ */ new Map()), d = Q();
|
|
12742
12756
|
ht(t, () => ({
|
|
12743
12757
|
retrieveAndOpenAction: m,
|
|
12744
12758
|
openShortcut: g
|
|
12745
12759
|
}));
|
|
12746
|
-
function p(
|
|
12747
|
-
if (
|
|
12748
|
-
const w = c.findIndex((
|
|
12760
|
+
function p(O) {
|
|
12761
|
+
if (O === r) {
|
|
12762
|
+
const w = c.findIndex((I) => I.key === O);
|
|
12749
12763
|
c[w - 1] && o(c[w - 1].key), c[w + 1] && o(c[w + 1].key);
|
|
12750
12764
|
}
|
|
12751
|
-
u(c.filter((w) => w.key !==
|
|
12765
|
+
u(c.filter((w) => w.key !== O)), f.current.delete(O);
|
|
12752
12766
|
}
|
|
12753
12767
|
function h({
|
|
12754
|
-
tabKey:
|
|
12768
|
+
tabKey: O,
|
|
12755
12769
|
canWeClose: w
|
|
12756
12770
|
}) {
|
|
12757
|
-
f.current.set(
|
|
12771
|
+
f.current.set(O, w);
|
|
12758
12772
|
}
|
|
12759
12773
|
async function m({
|
|
12760
|
-
action:
|
|
12774
|
+
action: O,
|
|
12761
12775
|
values: w,
|
|
12762
|
-
forced_values:
|
|
12776
|
+
forced_values: I,
|
|
12763
12777
|
initialViewType: C,
|
|
12764
12778
|
res_id: T,
|
|
12765
12779
|
domain: A = []
|
|
12766
12780
|
}) {
|
|
12767
12781
|
const D = await P.getHandler().getActionData({
|
|
12768
|
-
action:
|
|
12782
|
+
action: O,
|
|
12769
12783
|
context: l
|
|
12770
12784
|
});
|
|
12771
12785
|
if (D.type === "ir.actions.wizard") {
|
|
12772
12786
|
it("Action type not supported");
|
|
12773
12787
|
return;
|
|
12774
12788
|
}
|
|
12775
|
-
const [F, _] =
|
|
12789
|
+
const [F, _] = O.split(","), $ = parseInt(_), R = Et({
|
|
12776
12790
|
context: D.context,
|
|
12777
12791
|
values: a,
|
|
12778
12792
|
fields: {}
|
|
@@ -12825,34 +12839,34 @@ function tg(e, t) {
|
|
|
12825
12839
|
action_type: F,
|
|
12826
12840
|
action_id: $,
|
|
12827
12841
|
values: w,
|
|
12828
|
-
forced_values:
|
|
12842
|
+
forced_values: I,
|
|
12829
12843
|
res_id: T,
|
|
12830
12844
|
treeExpandable: ie,
|
|
12831
12845
|
limit: te
|
|
12832
12846
|
});
|
|
12833
12847
|
}
|
|
12834
12848
|
function y({
|
|
12835
|
-
title:
|
|
12849
|
+
title: O,
|
|
12836
12850
|
content: w,
|
|
12837
|
-
key:
|
|
12851
|
+
key: I,
|
|
12838
12852
|
action: C
|
|
12839
12853
|
}) {
|
|
12840
12854
|
let T = [...c];
|
|
12841
12855
|
c.length === 1 && c[0].key === "welcome" && (T = [...c.filter((A) => A.key !== "welcome")]), u([
|
|
12842
12856
|
...T,
|
|
12843
12857
|
{
|
|
12844
|
-
title:
|
|
12845
|
-
key:
|
|
12858
|
+
title: O,
|
|
12859
|
+
key: I,
|
|
12846
12860
|
closable: !0,
|
|
12847
12861
|
content: w,
|
|
12848
12862
|
action: C
|
|
12849
12863
|
}
|
|
12850
|
-
]), o(
|
|
12864
|
+
]), o(I);
|
|
12851
12865
|
}
|
|
12852
12866
|
async function v({
|
|
12853
|
-
relateData:
|
|
12867
|
+
relateData: O,
|
|
12854
12868
|
fields: w,
|
|
12855
|
-
values:
|
|
12869
|
+
values: I,
|
|
12856
12870
|
action_id: C,
|
|
12857
12871
|
action_type: T
|
|
12858
12872
|
}) {
|
|
@@ -12864,15 +12878,15 @@ function tg(e, t) {
|
|
|
12864
12878
|
target: $,
|
|
12865
12879
|
string: R,
|
|
12866
12880
|
limit: G
|
|
12867
|
-
} =
|
|
12881
|
+
} = O, [W, L] = _[0], N = { id: W, type: L }, k = Et({
|
|
12868
12882
|
context: D,
|
|
12869
|
-
values: { ...
|
|
12883
|
+
values: { ...I, ...a },
|
|
12870
12884
|
fields: w
|
|
12871
12885
|
}), X = F ? await P.getHandler().evalDomain({
|
|
12872
12886
|
domain: F,
|
|
12873
12887
|
values: Lt({
|
|
12874
12888
|
fields: w,
|
|
12875
|
-
values: { ...
|
|
12889
|
+
values: { ...I, ...a }
|
|
12876
12890
|
}),
|
|
12877
12891
|
fields: w,
|
|
12878
12892
|
context: { ...l, ...k }
|
|
@@ -12890,15 +12904,15 @@ function tg(e, t) {
|
|
|
12890
12904
|
limit: G
|
|
12891
12905
|
});
|
|
12892
12906
|
}
|
|
12893
|
-
async function g(
|
|
12907
|
+
async function g(O) {
|
|
12894
12908
|
const {
|
|
12895
12909
|
action_id: w,
|
|
12896
|
-
action_type:
|
|
12910
|
+
action_type: I,
|
|
12897
12911
|
res_id: C,
|
|
12898
12912
|
view_id: T,
|
|
12899
12913
|
overrideUnsettedLimit: A = !1,
|
|
12900
12914
|
values: D = {}
|
|
12901
|
-
} =
|
|
12915
|
+
} = O, F = `${I},${w}`, _ = await P.getHandler().getActionData({
|
|
12902
12916
|
action: F,
|
|
12903
12917
|
context: l
|
|
12904
12918
|
}), $ = Et({
|
|
@@ -12949,34 +12963,34 @@ function tg(e, t) {
|
|
|
12949
12963
|
target: N,
|
|
12950
12964
|
initialView: ee,
|
|
12951
12965
|
action_id: w,
|
|
12952
|
-
action_type:
|
|
12966
|
+
action_type: I,
|
|
12953
12967
|
res_id: C,
|
|
12954
12968
|
treeExpandable: te,
|
|
12955
12969
|
limit: A && (X === 0 || X === !1) ? $t : X
|
|
12956
12970
|
});
|
|
12957
12971
|
}
|
|
12958
12972
|
async function b({
|
|
12959
|
-
model:
|
|
12973
|
+
model: O,
|
|
12960
12974
|
values: w,
|
|
12961
|
-
forced_values:
|
|
12975
|
+
forced_values: I,
|
|
12962
12976
|
initialViewType: C,
|
|
12963
12977
|
res_id: T,
|
|
12964
12978
|
domain: A
|
|
12965
12979
|
}) {
|
|
12966
|
-
const D = await P.getHandler().getActionStringForModel(
|
|
12980
|
+
const D = await P.getHandler().getActionStringForModel(O);
|
|
12967
12981
|
await m({
|
|
12968
12982
|
action: D,
|
|
12969
12983
|
values: w,
|
|
12970
|
-
forced_values:
|
|
12984
|
+
forced_values: I,
|
|
12971
12985
|
initialViewType: C,
|
|
12972
12986
|
res_id: T,
|
|
12973
12987
|
domain: A
|
|
12974
12988
|
});
|
|
12975
12989
|
}
|
|
12976
12990
|
async function x({
|
|
12977
|
-
domain:
|
|
12991
|
+
domain: O,
|
|
12978
12992
|
context: w,
|
|
12979
|
-
model:
|
|
12993
|
+
model: I,
|
|
12980
12994
|
views: C,
|
|
12981
12995
|
title: T,
|
|
12982
12996
|
target: A,
|
|
@@ -12992,14 +13006,14 @@ function tg(e, t) {
|
|
|
12992
13006
|
const N = Xr();
|
|
12993
13007
|
if (A !== "current") {
|
|
12994
13008
|
const k = await P.getHandler().getView({
|
|
12995
|
-
model:
|
|
13009
|
+
model: I,
|
|
12996
13010
|
type: "form",
|
|
12997
13011
|
id: D.type === "form" ? D.id : void 0,
|
|
12998
13012
|
context: { ...l, ...w }
|
|
12999
13013
|
});
|
|
13000
13014
|
d.current.openActionModal({
|
|
13001
|
-
domain:
|
|
13002
|
-
model:
|
|
13015
|
+
domain: O,
|
|
13016
|
+
model: I,
|
|
13003
13017
|
formView: k,
|
|
13004
13018
|
context: { ...l, ...w },
|
|
13005
13019
|
actionData: {
|
|
@@ -13025,9 +13039,9 @@ function tg(e, t) {
|
|
|
13025
13039
|
tabKey: N,
|
|
13026
13040
|
title: T,
|
|
13027
13041
|
views: C,
|
|
13028
|
-
model:
|
|
13042
|
+
model: I,
|
|
13029
13043
|
context: { ...l, ...w },
|
|
13030
|
-
domain:
|
|
13044
|
+
domain: O,
|
|
13031
13045
|
setCanWeClose: h,
|
|
13032
13046
|
initialView: k,
|
|
13033
13047
|
res_id: $,
|
|
@@ -13050,12 +13064,12 @@ function tg(e, t) {
|
|
|
13050
13064
|
openDefaultActionForModel: b,
|
|
13051
13065
|
tabs: c,
|
|
13052
13066
|
activeKey: r,
|
|
13053
|
-
onRemoveTab: async (
|
|
13054
|
-
const w = f.current.get(
|
|
13055
|
-
(await (w == null ? void 0 : w()) || r === "welcome") && p(
|
|
13067
|
+
onRemoveTab: async (O) => {
|
|
13068
|
+
const w = f.current.get(O);
|
|
13069
|
+
(await (w == null ? void 0 : w()) || r === "welcome") && p(O);
|
|
13056
13070
|
},
|
|
13057
|
-
onChangeTab: (
|
|
13058
|
-
o(
|
|
13071
|
+
onChangeTab: (O) => {
|
|
13072
|
+
o(O);
|
|
13059
13073
|
},
|
|
13060
13074
|
children: /* @__PURE__ */ i(
|
|
13061
13075
|
Dd,
|
|
@@ -13068,9 +13082,9 @@ function tg(e, t) {
|
|
|
13068
13082
|
}
|
|
13069
13083
|
);
|
|
13070
13084
|
}
|
|
13071
|
-
const
|
|
13072
|
-
function
|
|
13073
|
-
const { label: t, onClose: n, tabKey: r, isActive: o, onSelected: s } = e, { token: a } =
|
|
13085
|
+
const ny = pt(ng), { useToken: rg } = Ge;
|
|
13086
|
+
function og(e) {
|
|
13087
|
+
const { label: t, onClose: n, tabKey: r, isActive: o, onSelected: s } = e, { token: a } = rg(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
|
|
13074
13088
|
return /* @__PURE__ */ E(
|
|
13075
13089
|
"div",
|
|
13076
13090
|
{
|
|
@@ -13140,12 +13154,12 @@ function rg(e) {
|
|
|
13140
13154
|
}
|
|
13141
13155
|
);
|
|
13142
13156
|
}
|
|
13143
|
-
function
|
|
13157
|
+
function ry() {
|
|
13144
13158
|
const e = oe(
|
|
13145
13159
|
wt
|
|
13146
13160
|
), { activeKey: t, tabs: n, onRemoveTab: r, onChangeTab: o } = e || {};
|
|
13147
13161
|
return /* @__PURE__ */ i(ae, { children: n.map((s) => /* @__PURE__ */ i(
|
|
13148
|
-
|
|
13162
|
+
og,
|
|
13149
13163
|
{
|
|
13150
13164
|
tabKey: s.key,
|
|
13151
13165
|
label: s.title,
|
|
@@ -13156,7 +13170,7 @@ function ny() {
|
|
|
13156
13170
|
s.key
|
|
13157
13171
|
)) });
|
|
13158
13172
|
}
|
|
13159
|
-
function
|
|
13173
|
+
function ig(e) {
|
|
13160
13174
|
const { tab: t } = e, n = oe(
|
|
13161
13175
|
wt
|
|
13162
13176
|
), { activeKey: r } = n || {}, o = {
|
|
@@ -13164,21 +13178,21 @@ function og(e) {
|
|
|
13164
13178
|
};
|
|
13165
13179
|
return /* @__PURE__ */ i("div", { style: t.key !== r ? o : void 0, children: t.content });
|
|
13166
13180
|
}
|
|
13167
|
-
const
|
|
13168
|
-
function
|
|
13181
|
+
const sg = dt.memo(ig, () => !0);
|
|
13182
|
+
function oy() {
|
|
13169
13183
|
const e = oe(
|
|
13170
13184
|
wt
|
|
13171
|
-
), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((r) => /* @__PURE__ */ i(
|
|
13185
|
+
), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((r) => /* @__PURE__ */ i(sg, { tab: r }, r.key))) || null;
|
|
13172
13186
|
return /* @__PURE__ */ i(ae, { children: n });
|
|
13173
13187
|
}
|
|
13174
|
-
const { useToken:
|
|
13188
|
+
const { useToken: ag } = Ge, iy = (e) => {
|
|
13175
13189
|
const {
|
|
13176
13190
|
onRetrieveShortcuts: t,
|
|
13177
13191
|
onCheckIsFavourite: n,
|
|
13178
13192
|
onAddFavourite: r,
|
|
13179
13193
|
onRemoveFavourite: o,
|
|
13180
13194
|
onDropdownClosed: s
|
|
13181
|
-
} = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } =
|
|
13195
|
+
} = e, [a, l] = S(!1), [c, u] = S(), { t: f } = he(), { token: d } = ag(), p = Q(null), h = oe(
|
|
13182
13196
|
wt
|
|
13183
13197
|
), {
|
|
13184
13198
|
openShortcut: m,
|
|
@@ -13187,7 +13201,7 @@ const { useToken: sg } = Ge, oy = (e) => {
|
|
|
13187
13201
|
currentView: g,
|
|
13188
13202
|
currentId: b,
|
|
13189
13203
|
openDefaultActionForModel: x
|
|
13190
|
-
} = h || {},
|
|
13204
|
+
} = h || {}, O = ye(() => {
|
|
13191
13205
|
if (!g || !g.view_id || !g.extra)
|
|
13192
13206
|
return;
|
|
13193
13207
|
const { action_id: F, action_type: _ } = g.extra || {};
|
|
@@ -13203,23 +13217,23 @@ const { useToken: sg } = Ge, oy = (e) => {
|
|
|
13203
13217
|
view_id: $,
|
|
13204
13218
|
res_id: R
|
|
13205
13219
|
};
|
|
13206
|
-
}, [b, g]), w =
|
|
13207
|
-
if (
|
|
13208
|
-
return JSON.stringify(
|
|
13209
|
-
}, [
|
|
13220
|
+
}, [b, g]), w = ye(() => {
|
|
13221
|
+
if (O)
|
|
13222
|
+
return JSON.stringify(O);
|
|
13223
|
+
}, [O]);
|
|
13210
13224
|
de(() => {
|
|
13211
13225
|
C();
|
|
13212
13226
|
}, [w]);
|
|
13213
|
-
function
|
|
13227
|
+
function I(F) {
|
|
13214
13228
|
const _ = F;
|
|
13215
13229
|
(_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && m(_);
|
|
13216
13230
|
}
|
|
13217
13231
|
const C = B(async () => {
|
|
13218
|
-
if (!
|
|
13232
|
+
if (!O)
|
|
13219
13233
|
return;
|
|
13220
|
-
const F = await n(
|
|
13234
|
+
const F = await n(O);
|
|
13221
13235
|
F !== !1 && u(F), l(F !== !1);
|
|
13222
|
-
}, [
|
|
13236
|
+
}, [O, n]);
|
|
13223
13237
|
async function T() {
|
|
13224
13238
|
var F;
|
|
13225
13239
|
(F = p == null ? void 0 : p.current) == null || F.close(), x == null || x({ model: "ir.ui.view_sc" });
|
|
@@ -13278,7 +13292,7 @@ const { useToken: sg } = Ge, oy = (e) => {
|
|
|
13278
13292
|
ref: p,
|
|
13279
13293
|
isFavourite: a,
|
|
13280
13294
|
onToggleFavourite: D,
|
|
13281
|
-
onItemClick:
|
|
13295
|
+
onItemClick: I,
|
|
13282
13296
|
placement: "bottomRight",
|
|
13283
13297
|
header: /* @__PURE__ */ E("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
13284
13298
|
/* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
|
|
@@ -13300,7 +13314,7 @@ const { useToken: sg } = Ge, oy = (e) => {
|
|
|
13300
13314
|
export {
|
|
13301
13315
|
Hf as ActionBar,
|
|
13302
13316
|
ca as ActionView,
|
|
13303
|
-
|
|
13317
|
+
Qh as Alert,
|
|
13304
13318
|
Bh as ArrowStepsField,
|
|
13305
13319
|
Nf as Binary,
|
|
13306
13320
|
uc as Boolean,
|
|
@@ -13308,21 +13322,21 @@ export {
|
|
|
13308
13322
|
zl as ButtonGroup,
|
|
13309
13323
|
qi as Char,
|
|
13310
13324
|
Hh as CodeEditor,
|
|
13311
|
-
|
|
13325
|
+
Jh as CommentsTimelineField,
|
|
13312
13326
|
Zi as ConfigContext,
|
|
13313
13327
|
Ec as ConfigContextProvider,
|
|
13314
13328
|
P as ConnectionProvider,
|
|
13315
13329
|
Dd as ContentRootProvider,
|
|
13316
|
-
|
|
13330
|
+
oy as CurrentTabContent,
|
|
13317
13331
|
Rh as Dashboard,
|
|
13318
13332
|
Th as DashboardGrid,
|
|
13319
13333
|
_f as Date,
|
|
13320
13334
|
Vf as DateTime,
|
|
13321
13335
|
Gf as Email,
|
|
13322
|
-
|
|
13336
|
+
ty as ErpAllFeatureKeys,
|
|
13323
13337
|
sn as ErpFeatureKeys,
|
|
13324
13338
|
Rf as ExportModal,
|
|
13325
|
-
|
|
13339
|
+
iy as FavouriteButton,
|
|
13326
13340
|
us as Float,
|
|
13327
13341
|
mf as FloatTime,
|
|
13328
13342
|
cn as Form,
|
|
@@ -13330,7 +13344,7 @@ export {
|
|
|
13330
13344
|
ls as GraphCard,
|
|
13331
13345
|
Nc as GraphIndicator,
|
|
13332
13346
|
_s as Group,
|
|
13333
|
-
|
|
13347
|
+
Xh as HTMLPreview,
|
|
13334
13348
|
hc as Image,
|
|
13335
13349
|
$n as Integer,
|
|
13336
13350
|
Kn as Label,
|
|
@@ -13342,7 +13356,7 @@ export {
|
|
|
13342
13356
|
du as ProgressBar,
|
|
13343
13357
|
Ph as Radio,
|
|
13344
13358
|
Pf as Reference,
|
|
13345
|
-
|
|
13359
|
+
ny as RootView,
|
|
13346
13360
|
ms as SearchFilter,
|
|
13347
13361
|
lo as SearchModal,
|
|
13348
13362
|
ws as SearchTree,
|
|
@@ -13350,15 +13364,15 @@ export {
|
|
|
13350
13364
|
bf as Separator,
|
|
13351
13365
|
Mh as Steps,
|
|
13352
13366
|
$h as Switch,
|
|
13353
|
-
|
|
13354
|
-
|
|
13367
|
+
og as Tab,
|
|
13368
|
+
ry as TabSelector,
|
|
13355
13369
|
pd as Tag,
|
|
13356
13370
|
hd as Tags,
|
|
13357
13371
|
vf as Text,
|
|
13358
13372
|
Df as Time,
|
|
13359
13373
|
Sn as Tree,
|
|
13360
13374
|
Wf as Url,
|
|
13361
|
-
|
|
13375
|
+
ly as dayjs,
|
|
13362
13376
|
vt as iconMapper,
|
|
13363
13377
|
Ft as showConfirmDialog
|
|
13364
13378
|
};
|