@gisce/react-ooui 2.29.0 → 2.30.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var Ta = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var wo = (e, t, n) => (
|
|
2
|
+
var Ia = (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) => (Ia(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 ye, useCallback as B, createContext 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 Oa, 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 Ii, Layout as Oi, 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 It, SearchFilter as Di, parseContextFields as La, parseDomainFields as ja, transformDomainForChildWidget as Br } from "@gisce/ooui";
|
|
8
8
|
import * as Co from "@ant-design/icons";
|
|
9
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 Io, FieldSet as sl, ExportModal as al, Dropdown as Hi, DropdownButton as qt, HTMLPreview as ll, FavouriteButton as cl } from "@gisce/react-formiga-components";
|
|
12
|
+
import * as Oo 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";
|
|
@@ -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 Il } from "file-type-buffer-browser";
|
|
35
|
+
import { isPresetStatusColor as Ol, 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 (Oo[o]) {
|
|
301
301
|
const s = () => {
|
|
302
302
|
var l;
|
|
303
|
-
return dt.createElement(
|
|
303
|
+
return dt.createElement(Oo[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 I() {
|
|
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: I,
|
|
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 I = vt(d);
|
|
460
|
+
return I && /* @__PURE__ */ i(I, {});
|
|
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 I(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 I(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 O() {
|
|
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: O,
|
|
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 Il(
|
|
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
|
+
}, Ot = (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 = Ot(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 Ic(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 Oc = (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 Ic = (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), I = oe(He), { getContext: w } = I || {};
|
|
1162
1162
|
yt(() => {
|
|
1163
1163
|
C();
|
|
1164
1164
|
}, [s]);
|
|
1165
|
-
const
|
|
1165
|
+
const O = (T) => {
|
|
1166
1166
|
o == null || o({
|
|
1167
1167
|
items: T
|
|
1168
1168
|
});
|
|
@@ -1183,7 +1183,7 @@ const Ic = (e) => {
|
|
|
1183
1183
|
context: { ...w == null ? void 0 : w(), ...y },
|
|
1184
1184
|
currentView: "form"
|
|
1185
1185
|
});
|
|
1186
|
-
|
|
1186
|
+
O(T);
|
|
1187
1187
|
} catch (T) {
|
|
1188
1188
|
u(T);
|
|
1189
1189
|
} finally {
|
|
@@ -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, I] = 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: I,
|
|
1611
1611
|
id: x,
|
|
1612
1612
|
context: { ...t, ...a }
|
|
1613
1613
|
});
|
|
1614
|
-
m.push([w,
|
|
1614
|
+
m.push([w, I]);
|
|
1615
1615
|
}
|
|
1616
1616
|
}
|
|
1617
1617
|
const [y, v] = m[0], g = { id: y, type: v };
|
|
@@ -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((I) => {
|
|
1645
|
+
const [, w] = I;
|
|
1646
1646
|
return w === "tree";
|
|
1647
1647
|
});
|
|
1648
1648
|
if (x) {
|
|
1649
|
-
const [
|
|
1650
|
-
actionId:
|
|
1649
|
+
const [I, w] = x, {
|
|
1650
|
+
actionId: O,
|
|
1651
1651
|
actionType: C,
|
|
1652
1652
|
title: T,
|
|
1653
1653
|
model: A
|
|
1654
1654
|
} = g;
|
|
1655
1655
|
c({
|
|
1656
|
-
action_id:
|
|
1656
|
+
action_id: O,
|
|
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: I,
|
|
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(0), [b, x] = S(), [
|
|
1897
|
+
} = e, [p, h] = S(!1), [m, y] = S(), [v, g] = S(0), [b, x] = S(), [I, w] = S(), [O, 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: I,
|
|
2009
|
+
icon: O,
|
|
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
|
+
), [I] = Je(P.getHandler().search), w = B(async () => {
|
|
2028
2028
|
u(!0), d(void 0), g(n.type || "line");
|
|
2029
|
-
const
|
|
2029
|
+
const O = 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: O,
|
|
2039
2039
|
manualIds: l,
|
|
2040
2040
|
methods: {
|
|
2041
2041
|
getFields: b,
|
|
2042
2042
|
readObjects: x,
|
|
2043
|
-
search:
|
|
2043
|
+
search: I
|
|
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
|
+
I,
|
|
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
|
+
}, On = (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: On
|
|
2189
2189
|
}
|
|
2190
2190
|
},
|
|
2191
2191
|
yAxis: {
|
|
2192
2192
|
label: {
|
|
2193
|
-
formatter:
|
|
2193
|
+
formatter: On
|
|
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: On
|
|
2234
2234
|
}
|
|
2235
2235
|
},
|
|
2236
2236
|
yAxis: {
|
|
2237
2237
|
label: {
|
|
2238
|
-
formatter:
|
|
2238
|
+
formatter: On
|
|
2239
2239
|
}
|
|
2240
2240
|
},
|
|
2241
2241
|
label: {
|
|
@@ -2441,7 +2441,7 @@ const Jc = ({
|
|
|
2441
2441
|
fixedHeight: a
|
|
2442
2442
|
}
|
|
2443
2443
|
);
|
|
2444
|
-
}, $t = 80, lt =
|
|
2444
|
+
}, $t = 80, lt = Oa(
|
|
2445
2445
|
null
|
|
2446
2446
|
), Xc = (e) => {
|
|
2447
2447
|
const {
|
|
@@ -2464,14 +2464,14 @@ const Jc = ({
|
|
|
2464
2464
|
setSorter: g,
|
|
2465
2465
|
totalItems: b,
|
|
2466
2466
|
setTotalItems: x,
|
|
2467
|
-
setSelectedRowItems:
|
|
2467
|
+
setSelectedRowItems: I,
|
|
2468
2468
|
selectedRowItems: w,
|
|
2469
|
-
searchTreeNameSearch:
|
|
2469
|
+
searchTreeNameSearch: O,
|
|
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(), [ve, $e] = S({}), [Le,
|
|
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, Ie] = 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(() => {
|
|
@@ -2527,7 +2527,7 @@ const Jc = ({
|
|
|
2527
2527
|
attachments: te,
|
|
2528
2528
|
setAttachments: ie,
|
|
2529
2529
|
selectedRowItems: w,
|
|
2530
|
-
setSelectedRowItems:
|
|
2530
|
+
setSelectedRowItems: I,
|
|
2531
2531
|
duplicatingItem: H,
|
|
2532
2532
|
setDuplicatingItem: ne,
|
|
2533
2533
|
setSearchParams: V,
|
|
@@ -2538,7 +2538,7 @@ const Jc = ({
|
|
|
2538
2538
|
setSorter: g,
|
|
2539
2539
|
totalItems: b,
|
|
2540
2540
|
setTotalItems: x,
|
|
2541
|
-
searchTreeNameSearch:
|
|
2541
|
+
searchTreeNameSearch: O,
|
|
2542
2542
|
setSearchTreeNameSearch: C,
|
|
2543
2543
|
setGraphIsLoading: z,
|
|
2544
2544
|
graphIsLoading: fe,
|
|
@@ -2551,7 +2551,7 @@ const Jc = ({
|
|
|
2551
2551
|
setLimit: we,
|
|
2552
2552
|
setTitle: J,
|
|
2553
2553
|
isActive: D,
|
|
2554
|
-
setTreeFirstVisibleRow:
|
|
2554
|
+
setTreeFirstVisibleRow: Ie,
|
|
2555
2555
|
treeFirstVisibleRow: Le,
|
|
2556
2556
|
searchQuery: Ee,
|
|
2557
2557
|
setSearchQuery: Ke,
|
|
@@ -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 !Ol(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((O) => O.operation !== "pendingRemove").map((O) => O.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 = (O) => {
|
|
3037
3037
|
r == null || r({
|
|
3038
|
-
items:
|
|
3038
|
+
items: O
|
|
3039
3039
|
});
|
|
3040
3040
|
};
|
|
3041
3041
|
async function x() {
|
|
3042
3042
|
d(!0);
|
|
3043
|
-
let
|
|
3043
|
+
let O = [];
|
|
3044
3044
|
try {
|
|
3045
|
-
if (m && (
|
|
3045
|
+
if (m && (O = [["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
|
+
O = [...O, ...A];
|
|
3056
3056
|
}
|
|
3057
3057
|
const T = (await P.getHandler().search({
|
|
3058
3058
|
model: p,
|
|
3059
|
-
params:
|
|
3059
|
+
params: O,
|
|
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 I = (O) => {
|
|
3075
|
+
const C = o.map((A) => O.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
|
+
O.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 = (O) => {
|
|
3083
|
+
const { label: C, closable: T, onClose: A } = O, 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: I,
|
|
3108
3108
|
loading: f,
|
|
3109
|
-
filterOption: (
|
|
3109
|
+
filterOption: (O, C) => C.label.toLowerCase().includes(O.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 Oc;
|
|
3172
3172
|
case "indicator":
|
|
3173
3173
|
return id;
|
|
3174
3174
|
case "tags":
|
|
@@ -3281,12 +3281,12 @@ const Lt = ({
|
|
|
3281
3281
|
minHeight: 0,
|
|
3282
3282
|
minWidth: 0
|
|
3283
3283
|
}, children: c });
|
|
3284
|
-
}, { confirm:
|
|
3284
|
+
}, { confirm: Id } = at, an = ({
|
|
3285
3285
|
onOk: e,
|
|
3286
3286
|
onCancel: t,
|
|
3287
3287
|
t: n
|
|
3288
3288
|
}) => {
|
|
3289
|
-
|
|
3289
|
+
Id({
|
|
3290
3290
|
title: n("unsavedChanges"),
|
|
3291
3291
|
icon: /* @__PURE__ */ i(_t, {}),
|
|
3292
3292
|
centered: !0,
|
|
@@ -3296,8 +3296,8 @@ const Lt = ({
|
|
|
3296
3296
|
onCancel: t,
|
|
3297
3297
|
cancelText: n("cancel")
|
|
3298
3298
|
});
|
|
3299
|
-
}, { error:
|
|
3300
|
-
|
|
3299
|
+
}, { error: Od } = at, Mo = (e) => {
|
|
3300
|
+
Od({
|
|
3301
3301
|
title: e("formHasErrors"),
|
|
3302
3302
|
icon: /* @__PURE__ */ i(_t, {}),
|
|
3303
3303
|
centered: !0,
|
|
@@ -3331,7 +3331,7 @@ const Lt = ({
|
|
|
3331
3331
|
wt
|
|
3332
3332
|
), { openAction: u } = c || {}, f = Q([]), { t: d } = he();
|
|
3333
3333
|
ht(t, () => ({
|
|
3334
|
-
openActionModal:
|
|
3334
|
+
openActionModal: I
|
|
3335
3335
|
}));
|
|
3336
3336
|
const [p, h] = S(!1), [m, y] = S(
|
|
3337
3337
|
{
|
|
@@ -3446,7 +3446,7 @@ const Lt = ({
|
|
|
3446
3446
|
id: ((G = F == null ? void 0 : F.view_id) == null ? void 0 : G[0]) || void 0,
|
|
3447
3447
|
context: $
|
|
3448
3448
|
});
|
|
3449
|
-
return
|
|
3449
|
+
return I({
|
|
3450
3450
|
domain: R,
|
|
3451
3451
|
model: F.res_model,
|
|
3452
3452
|
formView: W,
|
|
@@ -3472,7 +3472,7 @@ const Lt = ({
|
|
|
3472
3472
|
}), { closeParent: !0 };
|
|
3473
3473
|
}
|
|
3474
3474
|
}
|
|
3475
|
-
function
|
|
3475
|
+
function I({
|
|
3476
3476
|
domain: C,
|
|
3477
3477
|
model: T,
|
|
3478
3478
|
formView: A,
|
|
@@ -3496,7 +3496,7 @@ const Lt = ({
|
|
|
3496
3496
|
actionData: void 0
|
|
3497
3497
|
}), h(!1), await new Promise((_) => setTimeout(_, 300)), y({ domain: C, model: T, context: D, formView: A, actionData: F }), h(!0);
|
|
3498
3498
|
}
|
|
3499
|
-
async function
|
|
3499
|
+
async function O() {
|
|
3500
3500
|
Lo(f.current), f.current = [], h(!1), y({
|
|
3501
3501
|
domain: void 0,
|
|
3502
3502
|
model: void 0,
|
|
@@ -3535,7 +3535,7 @@ const Lt = ({
|
|
|
3535
3535
|
model: m.model,
|
|
3536
3536
|
formView: m.formView,
|
|
3537
3537
|
visible: p,
|
|
3538
|
-
onSubmitSucceed:
|
|
3538
|
+
onSubmitSucceed: O,
|
|
3539
3539
|
onCancel: () => {
|
|
3540
3540
|
Lo(f.current), f.current = [], h(!1), y({
|
|
3541
3541
|
domain: void 0,
|
|
@@ -3630,12 +3630,12 @@ function kd(e, t) {
|
|
|
3630
3630
|
parentContext: g = {},
|
|
3631
3631
|
actionDomain: b,
|
|
3632
3632
|
visible: x = !0,
|
|
3633
|
-
rootForm:
|
|
3633
|
+
rootForm: I = !1,
|
|
3634
3634
|
defaultValues: w,
|
|
3635
|
-
forcedValues:
|
|
3635
|
+
forcedValues: O = {},
|
|
3636
3636
|
parentWidth: C,
|
|
3637
3637
|
onMustRefreshParent: T
|
|
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:
|
|
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: Ie } = $e || {}, Ee = Q(!1), Ke = oe(
|
|
3639
3639
|
lt
|
|
3640
3640
|
), {
|
|
3641
3641
|
setFormIsSaving: Fe = void 0,
|
|
@@ -3645,11 +3645,11 @@ function kd(e, t) {
|
|
|
3645
3645
|
setAttachments: _e = void 0,
|
|
3646
3646
|
title: J = void 0,
|
|
3647
3647
|
setTitle: Ce = void 0
|
|
3648
|
-
} = (
|
|
3648
|
+
} = (I ? Ke : {}) || {}, Se = oe(
|
|
3649
3649
|
ln
|
|
3650
3650
|
), { processAction: Ue, globalValues: Me } = Se || {};
|
|
3651
3651
|
ht(t, () => ({
|
|
3652
|
-
submitForm:
|
|
3652
|
+
submitForm: In,
|
|
3653
3653
|
getFields: rt,
|
|
3654
3654
|
getValues: q,
|
|
3655
3655
|
getPlainValues: ge,
|
|
@@ -3674,7 +3674,7 @@ function kd(e, t) {
|
|
|
3674
3674
|
}, [ne]);
|
|
3675
3675
|
const re = (U, K, se, le) => {
|
|
3676
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());
|
|
3677
|
-
},
|
|
3677
|
+
}, Oe = () => {
|
|
3678
3678
|
Ee.current && (T == null || T()), Fe == null || Fe(!1), o == null || o();
|
|
3679
3679
|
}, qe = (U) => {
|
|
3680
3680
|
Fe == null || Fe(!1), u == null || u(U);
|
|
@@ -3786,12 +3786,12 @@ function kd(e, t) {
|
|
|
3786
3786
|
Ye() ? an({
|
|
3787
3787
|
t: A,
|
|
3788
3788
|
onOk: () => {
|
|
3789
|
-
|
|
3789
|
+
Oe == null || Oe(), U(!0);
|
|
3790
3790
|
},
|
|
3791
3791
|
onCancel: () => {
|
|
3792
3792
|
U(!1);
|
|
3793
3793
|
}
|
|
3794
|
-
}) : (
|
|
3794
|
+
}) : (Oe == null || Oe(), U(!0));
|
|
3795
3795
|
}), Zn = async () => {
|
|
3796
3796
|
if (l) {
|
|
3797
3797
|
const U = await P.getHandler().getActionStringForModel(n);
|
|
@@ -3862,7 +3862,7 @@ function kd(e, t) {
|
|
|
3862
3862
|
await P.getHandler().update({
|
|
3863
3863
|
model: n,
|
|
3864
3864
|
id: pe(),
|
|
3865
|
-
values: { ...se, ...
|
|
3865
|
+
values: { ...se, ...O },
|
|
3866
3866
|
fields: k,
|
|
3867
3867
|
context: {
|
|
3868
3868
|
...g,
|
|
@@ -3872,7 +3872,7 @@ function kd(e, t) {
|
|
|
3872
3872
|
} else {
|
|
3873
3873
|
const se = ke(k), le = await P.getHandler().create({
|
|
3874
3874
|
model: n,
|
|
3875
|
-
values: { ...se, ...
|
|
3875
|
+
values: { ...se, ...O },
|
|
3876
3876
|
fields: k,
|
|
3877
3877
|
context: {
|
|
3878
3878
|
...g,
|
|
@@ -3885,7 +3885,7 @@ function kd(e, t) {
|
|
|
3885
3885
|
}, ua = async (U) => {
|
|
3886
3886
|
const { callOnSubmitSucceed: K = !0 } = U || {};
|
|
3887
3887
|
!v && K && (re == null || re(pe(), q(), Ae()));
|
|
3888
|
-
},
|
|
3888
|
+
}, In = async (U) => {
|
|
3889
3889
|
let K = !1;
|
|
3890
3890
|
const { callOnSubmitSucceed: se = !0 } = U || {};
|
|
3891
3891
|
if (z.current = !0, $(void 0), Y.current && !Ye() && pe() && se) {
|
|
@@ -3899,7 +3899,7 @@ function kd(e, t) {
|
|
|
3899
3899
|
return d && (V.current = void 0, mt({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: le };
|
|
3900
3900
|
}
|
|
3901
3901
|
if (!Ye() && pe() && se)
|
|
3902
|
-
return z.current = !1, ce == null || ce(!1),
|
|
3902
|
+
return z.current = !1, ce == null || ce(!1), Oe == null || Oe(), { succeed: !0, id: pe() };
|
|
3903
3903
|
if (await St())
|
|
3904
3904
|
return z.current = !1, Mo(A), { succeed: !1, id: pe() };
|
|
3905
3905
|
F(!0), Fe == null || Fe(!0);
|
|
@@ -3997,7 +3997,7 @@ function kd(e, t) {
|
|
|
3997
3997
|
...R == null ? void 0 : R.context
|
|
3998
3998
|
}
|
|
3999
3999
|
},
|
|
4000
|
-
parentValues:
|
|
4000
|
+
parentValues: Ie == null ? void 0 : Ie(),
|
|
4001
4001
|
onChangeFieldActionArgs: K.args
|
|
4002
4002
|
}), le = await P.getHandler().executeOnChange({
|
|
4003
4003
|
model: n,
|
|
@@ -4109,7 +4109,7 @@ function kd(e, t) {
|
|
|
4109
4109
|
Ee.current = !0, await ze({ forceRefresh: !0 });
|
|
4110
4110
|
}
|
|
4111
4111
|
})) || {};
|
|
4112
|
-
!
|
|
4112
|
+
!I && se && (re == null || re(pe(), q(), Ae()));
|
|
4113
4113
|
}
|
|
4114
4114
|
function va() {
|
|
4115
4115
|
er({ elementHasLostFocus: !0 });
|
|
@@ -4128,7 +4128,7 @@ function kd(e, t) {
|
|
|
4128
4128
|
context: se
|
|
4129
4129
|
}) {
|
|
4130
4130
|
if (U === "cancel") {
|
|
4131
|
-
|
|
4131
|
+
Oe == null || Oe();
|
|
4132
4132
|
return;
|
|
4133
4133
|
}
|
|
4134
4134
|
if (await St()) {
|
|
@@ -4137,7 +4137,7 @@ function kd(e, t) {
|
|
|
4137
4137
|
}
|
|
4138
4138
|
let le = !1;
|
|
4139
4139
|
try {
|
|
4140
|
-
!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 In({ callOnSubmitSucceed: !1 }));
|
|
4141
4141
|
const Te = Y.current ? De() : {}, Qe = { ...se, ...Te };
|
|
4142
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);
|
|
4143
4143
|
} catch (Te) {
|
|
@@ -4157,7 +4157,7 @@ function kd(e, t) {
|
|
|
4157
4157
|
getFieldValue: bt,
|
|
4158
4158
|
executeButtonAction: wa,
|
|
4159
4159
|
getContext: xe,
|
|
4160
|
-
submitForm:
|
|
4160
|
+
submitForm: In,
|
|
4161
4161
|
fetchValues: ze,
|
|
4162
4162
|
formHasChanges: Ye,
|
|
4163
4163
|
elementHasLostFocus: va,
|
|
@@ -4201,7 +4201,7 @@ function kd(e, t) {
|
|
|
4201
4201
|
loading: D,
|
|
4202
4202
|
icon: /* @__PURE__ */ i(Bn, {}),
|
|
4203
4203
|
onClick: async () => {
|
|
4204
|
-
await
|
|
4204
|
+
await In();
|
|
4205
4205
|
},
|
|
4206
4206
|
type: "primary",
|
|
4207
4207
|
children: "OK"
|
|
@@ -4235,7 +4235,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4235
4235
|
isMenuAction: a = !1,
|
|
4236
4236
|
actionData: l,
|
|
4237
4237
|
...c
|
|
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:
|
|
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: I } = l || {};
|
|
4239
4239
|
de(() => {
|
|
4240
4240
|
a && w();
|
|
4241
4241
|
}, [l, a]);
|
|
@@ -4243,12 +4243,12 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4243
4243
|
const A = await P.getHandler().isShortcutFavorite({
|
|
4244
4244
|
action_id: g,
|
|
4245
4245
|
action_type: x,
|
|
4246
|
-
view_id:
|
|
4246
|
+
view_id: I,
|
|
4247
4247
|
res_id: b || !1
|
|
4248
4248
|
});
|
|
4249
4249
|
m(A !== !1), A !== !1 && v(A);
|
|
4250
4250
|
}
|
|
4251
|
-
async function
|
|
4251
|
+
async function O() {
|
|
4252
4252
|
if (h && y)
|
|
4253
4253
|
await P.getHandler().removeFavourite({
|
|
4254
4254
|
shortcut_id: y
|
|
@@ -4272,7 +4272,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4272
4272
|
type: h ? "primary" : "default",
|
|
4273
4273
|
icon: h ? /* @__PURE__ */ i(Ha, { style: { color: "white" } }) : /* @__PURE__ */ i(Ua, {}),
|
|
4274
4274
|
style: { width: 30 },
|
|
4275
|
-
onClick:
|
|
4275
|
+
onClick: O
|
|
4276
4276
|
}
|
|
4277
4277
|
) }),
|
|
4278
4278
|
/* @__PURE__ */ i(be, { style: { paddingLeft: 10 }, children: d })
|
|
@@ -4300,7 +4300,7 @@ const cn = pt(kd), dn = (e) => {
|
|
|
4300
4300
|
parentWidth: T,
|
|
4301
4301
|
...c
|
|
4302
4302
|
},
|
|
4303
|
-
`${u}-${n}-${g}-${b}-${x}-${
|
|
4303
|
+
`${u}-${n}-${g}-${b}-${x}-${I}-${r}`
|
|
4304
4304
|
)
|
|
4305
4305
|
}
|
|
4306
4306
|
) });
|
|
@@ -4530,7 +4530,7 @@ function fs(e) {
|
|
|
4530
4530
|
t.readOnly = !1, t.required = !1;
|
|
4531
4531
|
const { t: n } = he();
|
|
4532
4532
|
switch (t.type) {
|
|
4533
|
-
case
|
|
4533
|
+
case It.boolean: {
|
|
4534
4534
|
const o = new jr({
|
|
4535
4535
|
name: t._id,
|
|
4536
4536
|
string: t.label,
|
|
@@ -4541,16 +4541,16 @@ function fs(e) {
|
|
|
4541
4541
|
});
|
|
4542
4542
|
return /* @__PURE__ */ i(Yi, { layout: "vertical", ooui: o, showLabel: !0 });
|
|
4543
4543
|
}
|
|
4544
|
-
case
|
|
4545
|
-
case
|
|
4546
|
-
case
|
|
4547
|
-
case
|
|
4544
|
+
case It.float:
|
|
4545
|
+
case It.progressbar:
|
|
4546
|
+
case It.float_time:
|
|
4547
|
+
case It.integer:
|
|
4548
4548
|
return /* @__PURE__ */ i(Hd, { ooui: t, showLabel: !0 });
|
|
4549
|
-
case
|
|
4549
|
+
case It.date:
|
|
4550
4550
|
return /* @__PURE__ */ i(Nd, { ooui: t, layout: "vertical", showLabel: !0 });
|
|
4551
|
-
case
|
|
4551
|
+
case It.datetime:
|
|
4552
4552
|
return /* @__PURE__ */ i(Md, { ooui: t, layout: "vertical", showLabel: !0 });
|
|
4553
|
-
case
|
|
4553
|
+
case It.selection:
|
|
4554
4554
|
return /* @__PURE__ */ i(qd, { layout: "vertical", ooui: t, showLabel: !0 });
|
|
4555
4555
|
default:
|
|
4556
4556
|
return /* @__PURE__ */ i(
|
|
@@ -4696,9 +4696,9 @@ function ms(e) {
|
|
|
4696
4696
|
searchError: d,
|
|
4697
4697
|
searchValues: p,
|
|
4698
4698
|
showLimitOptions: h = !0
|
|
4699
|
-
} = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1),
|
|
4699
|
+
} = e, [m, y] = S(), [v, g] = S(), [b, x] = S(!1), I = Q(), { token: w } = iu(), [O] = ut.useForm();
|
|
4700
4700
|
de(() => {
|
|
4701
|
-
|
|
4701
|
+
O.setFieldsValue(p);
|
|
4702
4702
|
}, [p]);
|
|
4703
4703
|
const C = () => {
|
|
4704
4704
|
if (!v)
|
|
@@ -4707,7 +4707,7 @@ function ms(e) {
|
|
|
4707
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)) }, $));
|
|
4708
4708
|
};
|
|
4709
4709
|
yt(() => {
|
|
4710
|
-
x(!1),
|
|
4710
|
+
x(!1), I.current = new Di(n, t), I.current.parse(), y(I.current._simpleSearchContainer), g(I.current._advancedSearchContainer);
|
|
4711
4711
|
}, [t, n]);
|
|
4712
4712
|
const T = C(), A = (D) => {
|
|
4713
4713
|
var R;
|
|
@@ -4715,7 +4715,7 @@ function ms(e) {
|
|
|
4715
4715
|
delete D.offset, delete D.limit;
|
|
4716
4716
|
const $ = Rn(
|
|
4717
4717
|
D,
|
|
4718
|
-
(R =
|
|
4718
|
+
(R = I.current) == null ? void 0 : R._advancedSearchContainer
|
|
4719
4719
|
);
|
|
4720
4720
|
o({ params: $, offset: _, limit: F, searchValues: D });
|
|
4721
4721
|
};
|
|
@@ -4733,7 +4733,7 @@ function ms(e) {
|
|
|
4733
4733
|
{
|
|
4734
4734
|
className: "p-3 shadow-md",
|
|
4735
4735
|
style: { borderRadius: w.borderRadius },
|
|
4736
|
-
form:
|
|
4736
|
+
form: O,
|
|
4737
4737
|
onFinish: A,
|
|
4738
4738
|
initialValues: { offset: a, limit: l },
|
|
4739
4739
|
children: [
|
|
@@ -4747,7 +4747,7 @@ function ms(e) {
|
|
|
4747
4747
|
x(!b);
|
|
4748
4748
|
},
|
|
4749
4749
|
onClear: () => {
|
|
4750
|
-
|
|
4750
|
+
O.resetFields(), r();
|
|
4751
4751
|
},
|
|
4752
4752
|
isSearching: s
|
|
4753
4753
|
}
|
|
@@ -4932,7 +4932,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4932
4932
|
}
|
|
4933
4933
|
),
|
|
4934
4934
|
/* @__PURE__ */ i(
|
|
4935
|
-
|
|
4935
|
+
Io,
|
|
4936
4936
|
{
|
|
4937
4937
|
visible: r,
|
|
4938
4938
|
items: c == null ? void 0 : c.actionItems,
|
|
@@ -4943,7 +4943,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4943
4943
|
}
|
|
4944
4944
|
),
|
|
4945
4945
|
/* @__PURE__ */ i(
|
|
4946
|
-
|
|
4946
|
+
Io,
|
|
4947
4947
|
{
|
|
4948
4948
|
visible: s,
|
|
4949
4949
|
items: c == null ? void 0 : c.printItems,
|
|
@@ -4966,21 +4966,21 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4966
4966
|
), v = B(() => {
|
|
4967
4967
|
h(), y();
|
|
4968
4968
|
}, [h, y]), g = B(async () => {
|
|
4969
|
-
var
|
|
4969
|
+
var O;
|
|
4970
4970
|
const x = await p({
|
|
4971
4971
|
model: n,
|
|
4972
4972
|
type: "form",
|
|
4973
4973
|
context: r
|
|
4974
4974
|
});
|
|
4975
4975
|
s(x);
|
|
4976
|
-
const
|
|
4976
|
+
const I = mu(x);
|
|
4977
4977
|
let w = {};
|
|
4978
|
-
if (
|
|
4978
|
+
if (I.length > 0 && (w = { ...(O = await m({
|
|
4979
4979
|
model: n,
|
|
4980
4980
|
ids: [t],
|
|
4981
|
-
fieldsToRetrieve:
|
|
4981
|
+
fieldsToRetrieve: I,
|
|
4982
4982
|
context: r
|
|
4983
|
-
})) == null ? void 0 :
|
|
4983
|
+
})) == null ? void 0 : O[0] }), w = { ...Wt(w, I), active_id: t }, l(w), !(!x || !x.toolbar))
|
|
4984
4984
|
return {
|
|
4985
4985
|
actionItems: x.toolbar.action,
|
|
4986
4986
|
relateItems: x.toolbar.relate,
|
|
@@ -4989,12 +4989,12 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
4989
4989
|
}, [r, p, t, n, m]);
|
|
4990
4990
|
if (!t)
|
|
4991
4991
|
return null;
|
|
4992
|
-
function b({ item: x, type:
|
|
4992
|
+
function b({ item: x, type: I }) {
|
|
4993
4993
|
const w = {
|
|
4994
4994
|
values: a,
|
|
4995
4995
|
fields: o.fields
|
|
4996
4996
|
};
|
|
4997
|
-
switch (
|
|
4997
|
+
switch (I) {
|
|
4998
4998
|
case "action":
|
|
4999
4999
|
d == null || d({
|
|
5000
5000
|
actionData: x,
|
|
@@ -5170,10 +5170,10 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5170
5170
|
return /* @__PURE__ */ i(ae, { children: `( ${t} )` });
|
|
5171
5171
|
}, [e]), Tu = ({
|
|
5172
5172
|
value: e
|
|
5173
|
-
}) => ye(() => /* @__PURE__ */ i(hs, { value: e }), [e]),
|
|
5173
|
+
}) => ye(() => /* @__PURE__ */ i(hs, { value: e }), [e]), Iu = ({ value: e }) => ye(() => /* @__PURE__ */ i(ae, { children: ps(e) }), [e]), Uo = ({ value: e }) => ye(
|
|
5174
5174
|
() => /* @__PURE__ */ i("div", { style: { textAlign: "right" }, children: e }),
|
|
5175
5175
|
[e]
|
|
5176
|
-
),
|
|
5176
|
+
), Ou = ({ value: e }) => ye(
|
|
5177
5177
|
() => /* @__PURE__ */ i(
|
|
5178
5178
|
"img",
|
|
5179
5179
|
{
|
|
@@ -5267,8 +5267,8 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5267
5267
|
one2many: Ho,
|
|
5268
5268
|
many2many: Ho,
|
|
5269
5269
|
progressbar: Tu,
|
|
5270
|
-
float_time:
|
|
5271
|
-
image:
|
|
5270
|
+
float_time: Iu,
|
|
5271
|
+
image: Ou,
|
|
5272
5272
|
integer: Uo,
|
|
5273
5273
|
float: Uo,
|
|
5274
5274
|
reference: Ru,
|
|
@@ -5300,13 +5300,13 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5300
5300
|
sorter: g,
|
|
5301
5301
|
onFetchChildrenForRecord: b,
|
|
5302
5302
|
childField: x,
|
|
5303
|
-
rootTree:
|
|
5303
|
+
rootTree: I = !1,
|
|
5304
5304
|
context: w,
|
|
5305
|
-
readonly:
|
|
5305
|
+
readonly: O,
|
|
5306
5306
|
onSelectAllRecords: C
|
|
5307
5307
|
} = e, T = Q(null), [A, D] = S([]), F = Q(!1), [_, $] = S(), { t: R } = he(), G = Q(r), W = oe(
|
|
5308
5308
|
lt
|
|
5309
|
-
), { title: L = void 0, setTitle: N = void 0 } = (
|
|
5309
|
+
), { title: L = void 0, setTitle: N = void 0 } = (I ? W : {}) || {}, k = ye(() => {
|
|
5310
5310
|
if (_)
|
|
5311
5311
|
return Zr(
|
|
5312
5312
|
_,
|
|
@@ -5322,7 +5322,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5322
5322
|
(j = T.current) == null || j.unselectAll();
|
|
5323
5323
|
}
|
|
5324
5324
|
})), de(() => {
|
|
5325
|
-
const j =
|
|
5325
|
+
const j = Ot(s);
|
|
5326
5326
|
$(j), j.string && L !== j.string && (N == null || N(j.string));
|
|
5327
5327
|
}, [s, L]), de(() => {
|
|
5328
5328
|
if (!_)
|
|
@@ -5411,7 +5411,7 @@ const du = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(hs,
|
|
|
5411
5411
|
onRowSelectionChange: p,
|
|
5412
5412
|
onChangeSort: v,
|
|
5413
5413
|
sorter: g,
|
|
5414
|
-
readonly:
|
|
5414
|
+
readonly: O,
|
|
5415
5415
|
expandableOpts: b ? {
|
|
5416
5416
|
expandIcon: Ga,
|
|
5417
5417
|
collapseIcon: Ka,
|
|
@@ -5448,12 +5448,12 @@ const vs = (e) => {
|
|
|
5448
5448
|
resultsActionView: g,
|
|
5449
5449
|
domain: b,
|
|
5450
5450
|
currentId: x,
|
|
5451
|
-
limit:
|
|
5451
|
+
limit: I,
|
|
5452
5452
|
setLimit: w,
|
|
5453
|
-
searchParams:
|
|
5453
|
+
searchParams: O = [],
|
|
5454
5454
|
setSearchValues: C,
|
|
5455
5455
|
clearSelection: T
|
|
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(
|
|
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(I || $t), j = Q([]), fe = B(
|
|
5457
5457
|
(ce) => {
|
|
5458
5458
|
v == null || v([...ce]), ie([...ce]);
|
|
5459
5459
|
},
|
|
@@ -5467,7 +5467,7 @@ const vs = (e) => {
|
|
|
5467
5467
|
context: u
|
|
5468
5468
|
});
|
|
5469
5469
|
if (X(ce.length), f == null || f(ce.length), ce.length > 0) {
|
|
5470
|
-
const ue = ce.map((re) => re == null ? void 0 : re[0]), { colors: we, status: _e } =
|
|
5470
|
+
const ue = ce.map((re) => re == null ? void 0 : re[0]), { colors: we, status: _e } = Ot(d), J = {};
|
|
5471
5471
|
we && (J.colors = we), _e && (J.status = _e);
|
|
5472
5472
|
const Ce = await P.getHandler().readEvalUiObjects({
|
|
5473
5473
|
model: t,
|
|
@@ -5501,7 +5501,7 @@ const vs = (e) => {
|
|
|
5501
5501
|
f
|
|
5502
5502
|
]), me = B(
|
|
5503
5503
|
async (ce) => {
|
|
5504
|
-
const { params: ue, newOffset: we } = ce || {}, _e = Zt(ue ||
|
|
5504
|
+
const { params: ue, newOffset: we } = ce || {}, _e = Zt(ue || O, b), { colors: J, status: Ce } = Ot(d), Se = {};
|
|
5505
5505
|
J && (Se.colors = J), Ce && (Se.status = Ce);
|
|
5506
5506
|
const { totalItems: Ue, results: Me, attrsEvaluated: re } = await P.getHandler().searchForTree({
|
|
5507
5507
|
params: _e,
|
|
@@ -5513,13 +5513,13 @@ const vs = (e) => {
|
|
|
5513
5513
|
attrs: Se
|
|
5514
5514
|
});
|
|
5515
5515
|
ne(Qt(re)), V(Dn(re)), j.current = [...Me];
|
|
5516
|
-
const
|
|
5516
|
+
const Oe = h !== void 0 ? Yt({
|
|
5517
5517
|
resultsToSort: Me,
|
|
5518
5518
|
sorter: h,
|
|
5519
5519
|
fields: { ...d.fields, ...p.fields }
|
|
5520
5520
|
}) : [...j.current];
|
|
5521
|
-
if (fe(
|
|
5522
|
-
const pe =
|
|
5521
|
+
if (fe(Oe), g && Oe.length > 0) {
|
|
5522
|
+
const pe = Oe.findIndex(
|
|
5523
5523
|
(rt) => x === rt.id
|
|
5524
5524
|
);
|
|
5525
5525
|
pe === -1 ? y == null || y(0) : y == null || y(pe);
|
|
@@ -5542,7 +5542,7 @@ const vs = (e) => {
|
|
|
5542
5542
|
h,
|
|
5543
5543
|
f,
|
|
5544
5544
|
L,
|
|
5545
|
-
|
|
5545
|
+
O
|
|
5546
5546
|
]
|
|
5547
5547
|
), ve = B(
|
|
5548
5548
|
async (ce) => {
|
|
@@ -5601,20 +5601,20 @@ const vs = (e) => {
|
|
|
5601
5601
|
ve,
|
|
5602
5602
|
w
|
|
5603
5603
|
]
|
|
5604
|
-
),
|
|
5604
|
+
), Ie = B(
|
|
5605
5605
|
(ce) => {
|
|
5606
|
-
D(!0), W(ce), N((ce - 1) *
|
|
5606
|
+
D(!0), W(ce), N((ce - 1) * I);
|
|
5607
5607
|
},
|
|
5608
|
-
[D,
|
|
5608
|
+
[D, I, N, W]
|
|
5609
5609
|
), Ee = B(() => {
|
|
5610
|
-
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(I || $t));
|
|
5611
5611
|
}, [
|
|
5612
5612
|
A,
|
|
5613
5613
|
n,
|
|
5614
5614
|
o,
|
|
5615
5615
|
C,
|
|
5616
5616
|
w,
|
|
5617
|
-
|
|
5617
|
+
I
|
|
5618
5618
|
]), Ke = B(
|
|
5619
5619
|
async (ce) => {
|
|
5620
5620
|
const ue = ce[(d == null ? void 0 : d.field_parent) || "child_id"], we = await P.getHandler().readObjects({
|
|
@@ -5623,15 +5623,15 @@ const vs = (e) => {
|
|
|
5623
5623
|
fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
|
|
5624
5624
|
context: u
|
|
5625
5625
|
});
|
|
5626
|
-
return fe([...z(), ...we]), zn(
|
|
5626
|
+
return fe([...z(), ...we]), zn(Ot(d), we);
|
|
5627
5627
|
},
|
|
5628
5628
|
[d, t, u, z, fe]
|
|
5629
5629
|
), Fe = B(async () => await P.getHandler().searchAllIds({
|
|
5630
|
-
params: Zt(
|
|
5630
|
+
params: Zt(O, b),
|
|
5631
5631
|
model: t,
|
|
5632
5632
|
context: u,
|
|
5633
5633
|
totalItems: k
|
|
5634
|
-
}), [t, u, k,
|
|
5634
|
+
}), [t, u, k, O, b]);
|
|
5635
5635
|
return {
|
|
5636
5636
|
submit: Le,
|
|
5637
5637
|
clear: Ee,
|
|
@@ -5643,7 +5643,7 @@ const vs = (e) => {
|
|
|
5643
5643
|
offset: L,
|
|
5644
5644
|
limit: M.current,
|
|
5645
5645
|
getResults: z,
|
|
5646
|
-
requestPageChange:
|
|
5646
|
+
requestPageChange: Ie,
|
|
5647
5647
|
changeSort: $e,
|
|
5648
5648
|
fetchChildrenForRecord: Ke,
|
|
5649
5649
|
colorsForResults: H,
|
|
@@ -5666,7 +5666,7 @@ function Du(e, t) {
|
|
|
5666
5666
|
rootTree: f = !1,
|
|
5667
5667
|
parentContext: d = {},
|
|
5668
5668
|
onChangeSelectedRowKeys: p
|
|
5669
|
-
} = 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, I] = S(), [w, O] = S(), [C, T] = S(), [A, D] = S(), [F, _] = S(200), $ = Q(), { height: R } = qn(), G = oe(
|
|
5670
5670
|
ln
|
|
5671
5671
|
), { processAction: W } = G || {}, L = oe(
|
|
5672
5672
|
lt
|
|
@@ -5689,7 +5689,7 @@ function Du(e, t) {
|
|
|
5689
5689
|
searchValues: ve = {},
|
|
5690
5690
|
setSearchValues: $e = void 0,
|
|
5691
5691
|
limit: Le = $t,
|
|
5692
|
-
setLimit:
|
|
5692
|
+
setLimit: Ie = void 0
|
|
5693
5693
|
} = (f ? L : {}) || {}, Ee = B(
|
|
5694
5694
|
(Be) => {
|
|
5695
5695
|
H == null || H(Be.map((ze) => ({ id: ze }))), p == null || p(Be);
|
|
@@ -5708,7 +5708,7 @@ function Du(e, t) {
|
|
|
5708
5708
|
getResults: Ue,
|
|
5709
5709
|
requestPageChange: Me,
|
|
5710
5710
|
changeSort: re,
|
|
5711
|
-
fetchChildrenForRecord:
|
|
5711
|
+
fetchChildrenForRecord: Oe,
|
|
5712
5712
|
colorsForResults: qe,
|
|
5713
5713
|
statusForResults: pe,
|
|
5714
5714
|
totalItems: rt,
|
|
@@ -5736,7 +5736,7 @@ function Du(e, t) {
|
|
|
5736
5736
|
currentId: X,
|
|
5737
5737
|
setActionViewTotalItems: z,
|
|
5738
5738
|
limit: Le,
|
|
5739
|
-
setLimit:
|
|
5739
|
+
setLimit: Ie,
|
|
5740
5740
|
clearSelection: (St = b.current) == null ? void 0 : St.unselectAll
|
|
5741
5741
|
});
|
|
5742
5742
|
ht(t, () => ({
|
|
@@ -5758,7 +5758,7 @@ function Du(e, t) {
|
|
|
5758
5758
|
m(!1);
|
|
5759
5759
|
}
|
|
5760
5760
|
}, Ae = async () => {
|
|
5761
|
-
|
|
5761
|
+
I(n);
|
|
5762
5762
|
let Be = r;
|
|
5763
5763
|
r || (Be = await P.getHandler().getView({
|
|
5764
5764
|
model: n,
|
|
@@ -5770,16 +5770,16 @@ function Du(e, t) {
|
|
|
5770
5770
|
model: n,
|
|
5771
5771
|
type: "tree",
|
|
5772
5772
|
context: d
|
|
5773
|
-
})), T(Be),
|
|
5773
|
+
})), T(Be), O(ze);
|
|
5774
5774
|
};
|
|
5775
5775
|
de(() => {
|
|
5776
5776
|
ge();
|
|
5777
5777
|
}, [n]);
|
|
5778
5778
|
const xe = B(
|
|
5779
5779
|
(Be) => {
|
|
5780
|
-
|
|
5780
|
+
Ie == null || Ie(Be);
|
|
5781
5781
|
},
|
|
5782
|
-
[
|
|
5782
|
+
[Ie]
|
|
5783
5783
|
), De = B(
|
|
5784
5784
|
async (Be) => {
|
|
5785
5785
|
const { id: ze } = Be;
|
|
@@ -5866,7 +5866,7 @@ function Du(e, t) {
|
|
|
5866
5866
|
onRowSelectionChange: Ee,
|
|
5867
5867
|
sorter: j,
|
|
5868
5868
|
onChangeSort: re,
|
|
5869
|
-
onFetchChildrenForRecord: w.isExpandable ?
|
|
5869
|
+
onFetchChildrenForRecord: w.isExpandable ? Oe : void 0,
|
|
5870
5870
|
childField: w.field_parent,
|
|
5871
5871
|
rootTree: f,
|
|
5872
5872
|
onSelectAllRecords: Pe
|
|
@@ -5878,7 +5878,7 @@ function Du(e, t) {
|
|
|
5878
5878
|
re,
|
|
5879
5879
|
Fe,
|
|
5880
5880
|
qe,
|
|
5881
|
-
|
|
5881
|
+
Oe,
|
|
5882
5882
|
C,
|
|
5883
5883
|
Ue,
|
|
5884
5884
|
Le,
|
|
@@ -5940,10 +5940,10 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5940
5940
|
domain: a,
|
|
5941
5941
|
context: l = {}
|
|
5942
5942
|
} = e, [c, u] = S(!1), { modalWidth: f, modalHeight: d } = qn(), { t: p } = he(), [h, m] = S([]), [y, v] = S(!1), g = B(
|
|
5943
|
-
async (
|
|
5943
|
+
async (O) => {
|
|
5944
5944
|
v(!0);
|
|
5945
5945
|
try {
|
|
5946
|
-
await r(
|
|
5946
|
+
await r(O);
|
|
5947
5947
|
} catch (C) {
|
|
5948
5948
|
Nt(C);
|
|
5949
5949
|
}
|
|
@@ -5951,12 +5951,12 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5951
5951
|
},
|
|
5952
5952
|
[r]
|
|
5953
5953
|
), b = async () => {
|
|
5954
|
-
await new Promise((
|
|
5955
|
-
}, x = async (
|
|
5956
|
-
const { id: C } =
|
|
5954
|
+
await new Promise((O) => setTimeout(O, 5)), n();
|
|
5955
|
+
}, x = async (O) => {
|
|
5956
|
+
const { id: C } = O;
|
|
5957
5957
|
g([C]);
|
|
5958
5958
|
};
|
|
5959
|
-
function
|
|
5959
|
+
function I() {
|
|
5960
5960
|
if (h.length === 0) {
|
|
5961
5961
|
b();
|
|
5962
5962
|
return;
|
|
@@ -5995,7 +5995,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
5995
5995
|
disabled: y,
|
|
5996
5996
|
icon: y ? /* @__PURE__ */ i(gt, {}) : /* @__PURE__ */ i(Bn, {}),
|
|
5997
5997
|
onClick: () => {
|
|
5998
|
-
|
|
5998
|
+
I();
|
|
5999
5999
|
},
|
|
6000
6000
|
type: "primary",
|
|
6001
6001
|
children: p("ok")
|
|
@@ -6026,8 +6026,8 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6026
6026
|
model: o,
|
|
6027
6027
|
visible: c,
|
|
6028
6028
|
parentContext: l,
|
|
6029
|
-
onSubmitSucceed: (
|
|
6030
|
-
u(!1), b(), g([
|
|
6029
|
+
onSubmitSucceed: (O) => {
|
|
6030
|
+
u(!1), b(), g([O]);
|
|
6031
6031
|
},
|
|
6032
6032
|
onCancel: () => {
|
|
6033
6033
|
u(!1), b();
|
|
@@ -6053,18 +6053,18 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6053
6053
|
context: l,
|
|
6054
6054
|
id: c,
|
|
6055
6055
|
domain: u
|
|
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), [
|
|
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), [I, w] = S(""), O = 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] || "";
|
|
6057
6057
|
de(() => {
|
|
6058
6058
|
!Array.isArray(t) && t && ie(t);
|
|
6059
6059
|
}, [t]), de(() => {
|
|
6060
|
-
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(O.current || "");
|
|
6061
6061
|
}, [t]);
|
|
6062
6062
|
const N = (V) => {
|
|
6063
6063
|
n == null || n(V), _ == null || _();
|
|
6064
6064
|
}, k = (V) => {
|
|
6065
|
-
|
|
6065
|
+
O.current = V.target.value, N([void 0, ""]);
|
|
6066
6066
|
}, X = async () => {
|
|
6067
|
-
if (!y &&
|
|
6067
|
+
if (!y && I !== L) {
|
|
6068
6068
|
if (await new Promise((V) => setTimeout(V, 100)), x.current) {
|
|
6069
6069
|
N([void 0, ""]);
|
|
6070
6070
|
return;
|
|
@@ -6072,14 +6072,14 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6072
6072
|
v(!0);
|
|
6073
6073
|
try {
|
|
6074
6074
|
if ($.current && $.current.length > 0)
|
|
6075
|
-
te(
|
|
6075
|
+
te(O.current);
|
|
6076
6076
|
else {
|
|
6077
6077
|
const V = await P.getHandler().nameSearch({
|
|
6078
6078
|
model: s,
|
|
6079
|
-
payload:
|
|
6079
|
+
payload: O.current,
|
|
6080
6080
|
context: { ...F == null ? void 0 : F(), ...l }
|
|
6081
6081
|
});
|
|
6082
|
-
V.length === 1 ? (
|
|
6082
|
+
V.length === 1 ? (O.current = void 0, N(V[0])) : te(O.current);
|
|
6083
6083
|
}
|
|
6084
6084
|
} catch (V) {
|
|
6085
6085
|
Nt(V);
|
|
@@ -6139,7 +6139,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6139
6139
|
o && !a ? Nu : ct,
|
|
6140
6140
|
{
|
|
6141
6141
|
type: "text",
|
|
6142
|
-
value:
|
|
6142
|
+
value: I,
|
|
6143
6143
|
disabled: a,
|
|
6144
6144
|
onChange: k,
|
|
6145
6145
|
style: {
|
|
@@ -6163,7 +6163,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6163
6163
|
je,
|
|
6164
6164
|
{
|
|
6165
6165
|
icon: /* @__PURE__ */ i(Hr, {}),
|
|
6166
|
-
disabled: W === void 0 || L === "" ||
|
|
6166
|
+
disabled: W === void 0 || L === "" || I === void 0,
|
|
6167
6167
|
onClick: () => {
|
|
6168
6168
|
m(!0);
|
|
6169
6169
|
},
|
|
@@ -6192,7 +6192,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6192
6192
|
visible: d,
|
|
6193
6193
|
nameSearch: W ? void 0 : g,
|
|
6194
6194
|
onSelectValues: async (V) => {
|
|
6195
|
-
p(!1), ie(V[0]), x.current = !1,
|
|
6195
|
+
p(!1), ie(V[0]), x.current = !1, O.current = void 0;
|
|
6196
6196
|
},
|
|
6197
6197
|
onCloseModal: () => {
|
|
6198
6198
|
p(!1), x.current = !1;
|
|
@@ -6319,7 +6319,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6319
6319
|
cancelText: e("cancel"),
|
|
6320
6320
|
onOk: t
|
|
6321
6321
|
});
|
|
6322
|
-
},
|
|
6322
|
+
}, Is = ({
|
|
6323
6323
|
t: e,
|
|
6324
6324
|
onOk: t
|
|
6325
6325
|
}) => {
|
|
@@ -6332,7 +6332,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6332
6332
|
onOk: t,
|
|
6333
6333
|
cancelText: e("cancel")
|
|
6334
6334
|
});
|
|
6335
|
-
}, { useToken: ju } = Ge,
|
|
6335
|
+
}, { useToken: ju } = Ge, Os = (e) => {
|
|
6336
6336
|
const {
|
|
6337
6337
|
title: t,
|
|
6338
6338
|
readOnly: n,
|
|
@@ -6377,11 +6377,11 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6377
6377
|
}
|
|
6378
6378
|
);
|
|
6379
6379
|
}
|
|
6380
|
-
function
|
|
6381
|
-
let
|
|
6382
|
-
return l === 0 ?
|
|
6380
|
+
function I() {
|
|
6381
|
+
let O = "_";
|
|
6382
|
+
return l === 0 ? O = "_" : O = (c + 1).toString(), /* @__PURE__ */ E("span", { className: "pl-1 pr-1", children: [
|
|
6383
6383
|
"(",
|
|
6384
|
-
|
|
6384
|
+
O,
|
|
6385
6385
|
"/",
|
|
6386
6386
|
l,
|
|
6387
6387
|
")"
|
|
@@ -6398,7 +6398,7 @@ const ws = pt(Du), { error: Eu } = at, Nt = (e) => {
|
|
|
6398
6398
|
onClick: u
|
|
6399
6399
|
}
|
|
6400
6400
|
),
|
|
6401
|
-
|
|
6401
|
+
I(),
|
|
6402
6402
|
/* @__PURE__ */ i(
|
|
6403
6403
|
tt,
|
|
6404
6404
|
{
|
|
@@ -6470,7 +6470,7 @@ const Uu = (e) => {
|
|
|
6470
6470
|
getContext: m,
|
|
6471
6471
|
domain: y,
|
|
6472
6472
|
fetchValues: v
|
|
6473
|
-
} = f || {}, { t: g } = he(), [b, x] = S(!1), [
|
|
6473
|
+
} = f || {}, { t: g } = he(), [b, x] = S(!1), [I, w] = S(!1), [O, 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), {
|
|
6474
6474
|
readOnly: ne,
|
|
6475
6475
|
relation: ee,
|
|
6476
6476
|
context: V,
|
|
@@ -6489,7 +6489,7 @@ const Uu = (e) => {
|
|
|
6489
6489
|
(a === "form" && s.some((q) => !q.values) || a === "tree" && s.some((q) => !q.treeValues)) && $e();
|
|
6490
6490
|
}, [s, a]);
|
|
6491
6491
|
de(() => {
|
|
6492
|
-
|
|
6492
|
+
Ie();
|
|
6493
6493
|
}, [y]);
|
|
6494
6494
|
const ve = (q) => {
|
|
6495
6495
|
var ge, Ae;
|
|
@@ -6523,7 +6523,7 @@ const Uu = (e) => {
|
|
|
6523
6523
|
w(!1);
|
|
6524
6524
|
}
|
|
6525
6525
|
};
|
|
6526
|
-
async function
|
|
6526
|
+
async function Ie() {
|
|
6527
6527
|
M && (N.current = await P.getHandler().evalDomain({
|
|
6528
6528
|
domain: M,
|
|
6529
6529
|
values: Lt({
|
|
@@ -6580,7 +6580,7 @@ const Uu = (e) => {
|
|
|
6580
6580
|
}) : q();
|
|
6581
6581
|
}, we = () => {
|
|
6582
6582
|
if (j) {
|
|
6583
|
-
|
|
6583
|
+
Is({
|
|
6584
6584
|
t: g,
|
|
6585
6585
|
onOk: async () => {
|
|
6586
6586
|
a === "form" ? Ce() : Se();
|
|
@@ -6695,7 +6695,7 @@ const Uu = (e) => {
|
|
|
6695
6695
|
w(!1);
|
|
6696
6696
|
}
|
|
6697
6697
|
};
|
|
6698
|
-
function
|
|
6698
|
+
function Oe() {
|
|
6699
6699
|
const q = Bu[a];
|
|
6700
6700
|
if (a === "graph")
|
|
6701
6701
|
return _i(o.get("graph").arch).string;
|
|
@@ -6745,7 +6745,7 @@ const Uu = (e) => {
|
|
|
6745
6745
|
limit: z.length,
|
|
6746
6746
|
treeView: o.get("tree"),
|
|
6747
6747
|
results: q,
|
|
6748
|
-
loading:
|
|
6748
|
+
loading: I,
|
|
6749
6749
|
onRowClicked: ((De = o.get("form")) == null ? void 0 : De.fields) !== void 0 ? Me : void 0,
|
|
6750
6750
|
showPagination: !1,
|
|
6751
6751
|
selectedRowKeys: R,
|
|
@@ -6772,15 +6772,15 @@ const Uu = (e) => {
|
|
|
6772
6772
|
);
|
|
6773
6773
|
}
|
|
6774
6774
|
};
|
|
6775
|
-
if (
|
|
6776
|
-
return /* @__PURE__ */ i(nt, { className: "mt-10", message:
|
|
6775
|
+
if (O)
|
|
6776
|
+
return /* @__PURE__ */ i(nt, { className: "mt-10", message: O, type: "error", banner: !0 });
|
|
6777
6777
|
const pe = W;
|
|
6778
|
-
return
|
|
6778
|
+
return I ? /* @__PURE__ */ i(We, {}) : /* @__PURE__ */ E(ae, { children: [
|
|
6779
6779
|
/* @__PURE__ */ i(
|
|
6780
|
-
|
|
6780
|
+
Os,
|
|
6781
6781
|
{
|
|
6782
6782
|
mode: a,
|
|
6783
|
-
title:
|
|
6783
|
+
title: Oe(),
|
|
6784
6784
|
readOnly: ne || !1,
|
|
6785
6785
|
isMany2Many: j,
|
|
6786
6786
|
formHasChanges: b,
|
|
@@ -6879,7 +6879,7 @@ const Uu = (e) => {
|
|
|
6879
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([]));
|
|
6880
6880
|
}, [r, o, s.length]), u = B((h) => {
|
|
6881
6881
|
l.current = h;
|
|
6882
|
-
}, []), f = B(() => l.current, []), d = ye(() =>
|
|
6882
|
+
}, []), f = B(() => l.current, []), d = ye(() => Ot(e), [e]);
|
|
6883
6883
|
return {
|
|
6884
6884
|
onTreeFetchRows: ft(
|
|
6885
6885
|
async ({
|
|
@@ -6890,9 +6890,9 @@ const Uu = (e) => {
|
|
|
6890
6890
|
d.colors && (y.colors = d.colors), d.status && (y.status = d.status);
|
|
6891
6891
|
let v = h;
|
|
6892
6892
|
if (m) {
|
|
6893
|
-
const w = Object.keys(m).map((
|
|
6894
|
-
const C = m[
|
|
6895
|
-
return `${
|
|
6893
|
+
const w = Object.keys(m).map((O) => {
|
|
6894
|
+
const C = m[O];
|
|
6895
|
+
return `${O} ${C}`;
|
|
6896
6896
|
}).join(", ");
|
|
6897
6897
|
v = await P.getHandler().searchAllIds({
|
|
6898
6898
|
model: t,
|
|
@@ -6908,8 +6908,8 @@ const Uu = (e) => {
|
|
|
6908
6908
|
fields: e.fields,
|
|
6909
6909
|
context: n,
|
|
6910
6910
|
attrs: y
|
|
6911
|
-
}), b = g[0], x = Qt(g[1]),
|
|
6912
|
-
return { results: b, colors: x, status:
|
|
6911
|
+
}), b = g[0], x = Qt(g[1]), I = Dn(g[1]);
|
|
6912
|
+
return { results: b, colors: x, status: I };
|
|
6913
6913
|
},
|
|
6914
6914
|
[n, t, d.colors, e]
|
|
6915
6915
|
),
|
|
@@ -7012,7 +7012,7 @@ const Uu = (e) => {
|
|
|
7012
7012
|
values: { ...f, id: d },
|
|
7013
7013
|
treeValues: { ...f, id: d }
|
|
7014
7014
|
} : m);
|
|
7015
|
-
s(
|
|
7015
|
+
s(Ic(p));
|
|
7016
7016
|
},
|
|
7017
7017
|
readOnly: o
|
|
7018
7018
|
}
|
|
@@ -7068,7 +7068,7 @@ const Uu = (e) => {
|
|
|
7068
7068
|
}, [n, c, r, u, t]), p = B(async () => l === "form" ? await d() : await f(), [l, d, f]);
|
|
7069
7069
|
return { showRemoveConfirm: B(() => {
|
|
7070
7070
|
if (e) {
|
|
7071
|
-
|
|
7071
|
+
Is({
|
|
7072
7072
|
t: a,
|
|
7073
7073
|
onOk: p
|
|
7074
7074
|
});
|
|
@@ -7110,7 +7110,7 @@ const Xu = ({
|
|
|
7110
7110
|
}, [n, e, t, r]), b = B(() => {
|
|
7111
7111
|
p(!1), v(!1);
|
|
7112
7112
|
}, []), x = ft(
|
|
7113
|
-
(w,
|
|
7113
|
+
(w, O, C, T = !1) => {
|
|
7114
7114
|
let A;
|
|
7115
7115
|
if (T)
|
|
7116
7116
|
A = o.concat({
|
|
@@ -7138,17 +7138,17 @@ const Xu = ({
|
|
|
7138
7138
|
s(A), y || p(!1);
|
|
7139
7139
|
},
|
|
7140
7140
|
[y, o, s]
|
|
7141
|
-
),
|
|
7141
|
+
), I = ft(
|
|
7142
7142
|
async (w) => {
|
|
7143
|
-
const { id:
|
|
7143
|
+
const { id: O } = w;
|
|
7144
7144
|
let C = o;
|
|
7145
|
-
const T = o.find((A) => A.id ===
|
|
7145
|
+
const T = o.find((A) => A.id === O);
|
|
7146
7146
|
(T == null ? void 0 : T.values) === void 0 && (C = await P.getHandler().readObjects({
|
|
7147
7147
|
model: c,
|
|
7148
7148
|
ids: [w.id],
|
|
7149
7149
|
fields: u.fields,
|
|
7150
7150
|
context: f
|
|
7151
|
-
})), m(C.find((A) => A.id ===
|
|
7151
|
+
})), m(C.find((A) => A.id === O)), v(!1), p(!0);
|
|
7152
7152
|
},
|
|
7153
7153
|
[f, u.fields, o, c, a, l]
|
|
7154
7154
|
);
|
|
@@ -7159,7 +7159,7 @@ const Xu = ({
|
|
|
7159
7159
|
createItem: g,
|
|
7160
7160
|
onCancelFormModal: b,
|
|
7161
7161
|
onFormModalSubmitSucceed: x,
|
|
7162
|
-
openItemInFormModal:
|
|
7162
|
+
openItemInFormModal: I
|
|
7163
7163
|
};
|
|
7164
7164
|
}, Qu = ({
|
|
7165
7165
|
currentView: e,
|
|
@@ -7322,23 +7322,25 @@ const Xu = ({
|
|
|
7322
7322
|
);
|
|
7323
7323
|
return { getColumnState: a, updateColumnState: l };
|
|
7324
7324
|
}, Fs = (e) => {
|
|
7325
|
-
const [t, n] = S(!0), r = Q(void 0), { getColumnState:
|
|
7325
|
+
const [t, n] = S(!0), r = Q(void 0), o = Q(!1), { getColumnState: s, updateColumnState: a } = tf(e);
|
|
7326
7326
|
return de(() => {
|
|
7327
7327
|
if (!e) {
|
|
7328
7328
|
n(!1);
|
|
7329
7329
|
return;
|
|
7330
7330
|
}
|
|
7331
7331
|
(async () => {
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7332
|
+
if (!o.current) {
|
|
7333
|
+
o.current = !0, n(!0);
|
|
7334
|
+
try {
|
|
7335
|
+
r.current = await s();
|
|
7336
|
+
} catch (u) {
|
|
7337
|
+
console.error(u);
|
|
7338
|
+
} finally {
|
|
7339
|
+
n(!1), o.current = !1;
|
|
7340
|
+
}
|
|
7339
7341
|
}
|
|
7340
7342
|
})();
|
|
7341
|
-
}, [
|
|
7343
|
+
}, [s, e]), { getColumnState: B(() => r.current, []), loading: t, updateColumnState: a };
|
|
7342
7344
|
}, nf = (e) => `columnState-${e.parentViewId}-${e.treeViewId}-${e.one2ManyFieldName}-${e.model}`, rf = 400, of = ({
|
|
7343
7345
|
items: e,
|
|
7344
7346
|
height: t,
|
|
@@ -7357,14 +7359,14 @@ const Xu = ({
|
|
|
7357
7359
|
aggregates: m,
|
|
7358
7360
|
selectedRowKeys: y = []
|
|
7359
7361
|
}) => {
|
|
7360
|
-
const v = Q(), g = c || v, b = Q({}), x = Q(),
|
|
7362
|
+
const v = Q(), g = c || v, b = Q({}), x = Q(), I = Q(), w = Q(e), { t: O } = he();
|
|
7361
7363
|
yt(() => {
|
|
7362
7364
|
var R, G;
|
|
7363
|
-
if (w.current = e,
|
|
7364
|
-
|
|
7365
|
+
if (w.current = e, I.current === void 0) {
|
|
7366
|
+
I.current = e;
|
|
7365
7367
|
return;
|
|
7366
7368
|
}
|
|
7367
|
-
|
|
7369
|
+
I.current = e, (R = g == null ? void 0 : g.current) == null || R.refresh(), (G = g == null ? void 0 : g.current) == null || G.unselectAll();
|
|
7368
7370
|
}, [e]);
|
|
7369
7371
|
const C = yn(() => e.length, [e]), T = yn(() => Zr(
|
|
7370
7372
|
o,
|
|
@@ -7438,7 +7440,7 @@ const Xu = ({
|
|
|
7438
7440
|
return (G = x.current) == null ? void 0 : G[R.id];
|
|
7439
7441
|
},
|
|
7440
7442
|
strings: {
|
|
7441
|
-
resetTableViewLabel:
|
|
7443
|
+
resetTableViewLabel: O("resetTableView")
|
|
7442
7444
|
}
|
|
7443
7445
|
}
|
|
7444
7446
|
);
|
|
@@ -7473,7 +7475,7 @@ const Xu = ({
|
|
|
7473
7475
|
([v, g]) => {
|
|
7474
7476
|
y[v] = g.map((b) => {
|
|
7475
7477
|
const x = e.columns.find(
|
|
7476
|
-
(
|
|
7478
|
+
(I) => I.id === v
|
|
7477
7479
|
);
|
|
7478
7480
|
return {
|
|
7479
7481
|
operation: b,
|
|
@@ -7497,7 +7499,7 @@ const Xu = ({
|
|
|
7497
7499
|
Object.entries(h).forEach((y) => {
|
|
7498
7500
|
const v = y[0], g = y[1];
|
|
7499
7501
|
m || (m = {}), m[v] = Object.keys(g).map((b) => {
|
|
7500
|
-
const x = e.columns.find((
|
|
7502
|
+
const x = e.columns.find((I) => I.id === v);
|
|
7501
7503
|
return {
|
|
7502
7504
|
operation: b,
|
|
7503
7505
|
label: x[b],
|
|
@@ -7545,8 +7547,8 @@ const Xu = ({
|
|
|
7545
7547
|
} = o, g = oe(He), {
|
|
7546
7548
|
activeId: b,
|
|
7547
7549
|
getContext: x,
|
|
7548
|
-
fetchValues:
|
|
7549
|
-
} = g || {}, w = s.size > 1,
|
|
7550
|
+
fetchValues: I
|
|
7551
|
+
} = g || {}, w = s.size > 1, O = ((ce = s.get("form")) == null ? void 0 : ce.fields) !== void 0, C = ye(() => ({ ...x == null ? void 0 : x(), ...m }), [x, m]), T = Wu({
|
|
7550
7552
|
widgetDomain: y,
|
|
7551
7553
|
fieldName: v
|
|
7552
7554
|
}), {
|
|
@@ -7632,7 +7634,7 @@ const Xu = ({
|
|
|
7632
7634
|
setFormHasChanges: H,
|
|
7633
7635
|
selectedRowKeys: F,
|
|
7634
7636
|
setSelectedRowKeys: _
|
|
7635
|
-
}),
|
|
7637
|
+
}), Ie = () => {
|
|
7636
7638
|
const ue = Array.from(s.keys()), we = ue[(ue.indexOf(c) + 1) % ue.length];
|
|
7637
7639
|
c === "form" ? ie(() => {
|
|
7638
7640
|
u(we);
|
|
@@ -7662,7 +7664,7 @@ const Xu = ({
|
|
|
7662
7664
|
]);
|
|
7663
7665
|
return /* @__PURE__ */ E(ae, { children: [
|
|
7664
7666
|
/* @__PURE__ */ i(
|
|
7665
|
-
|
|
7667
|
+
Os,
|
|
7666
7668
|
{
|
|
7667
7669
|
mode: c,
|
|
7668
7670
|
title: L,
|
|
@@ -7673,12 +7675,12 @@ const Xu = ({
|
|
|
7673
7675
|
currentItemIndex: f,
|
|
7674
7676
|
onDelete: Le,
|
|
7675
7677
|
onCreateItem: fe,
|
|
7676
|
-
onToggleViewMode:
|
|
7678
|
+
onToggleViewMode: Ie,
|
|
7677
7679
|
onPreviousItem: Ke,
|
|
7678
7680
|
onNextItem: Fe,
|
|
7679
7681
|
onSearchItem: $e,
|
|
7680
7682
|
selectedRowKeys: F,
|
|
7681
|
-
showCreateButton:
|
|
7683
|
+
showCreateButton: O,
|
|
7682
7684
|
showToggleButton: w
|
|
7683
7685
|
}
|
|
7684
7686
|
),
|
|
@@ -7734,7 +7736,7 @@ const Xu = ({
|
|
|
7734
7736
|
readOnly: p,
|
|
7735
7737
|
mustClearAfterSave: V,
|
|
7736
7738
|
onMustRefreshParent: () => {
|
|
7737
|
-
|
|
7739
|
+
I == null || I({ forceRefresh: !0 });
|
|
7738
7740
|
}
|
|
7739
7741
|
}
|
|
7740
7742
|
),
|
|
@@ -7772,25 +7774,25 @@ const Xu = ({
|
|
|
7772
7774
|
yt(() => {
|
|
7773
7775
|
x();
|
|
7774
7776
|
}, [t]);
|
|
7775
|
-
const b = async (
|
|
7777
|
+
const b = async (O) => o && o[O] ? o[O] : await P.getHandler().getView({
|
|
7776
7778
|
model: r,
|
|
7777
|
-
type:
|
|
7779
|
+
type: O,
|
|
7778
7780
|
context: { ...y == null ? void 0 : y(), ...a }
|
|
7779
7781
|
}), x = async () => {
|
|
7780
7782
|
u(!0), d(void 0);
|
|
7781
7783
|
try {
|
|
7782
7784
|
if (n && n.length > 0) {
|
|
7783
|
-
for (const
|
|
7784
|
-
const C = await b(
|
|
7785
|
-
p.set(
|
|
7785
|
+
for (const O of n) {
|
|
7786
|
+
const C = await b(O);
|
|
7787
|
+
p.set(O, C);
|
|
7786
7788
|
}
|
|
7787
7789
|
h(p);
|
|
7788
7790
|
} else {
|
|
7789
|
-
const
|
|
7790
|
-
p.set("form",
|
|
7791
|
+
const O = await b("form"), C = await b("tree");
|
|
7792
|
+
p.set("form", O), p.set("tree", C), h(p);
|
|
7791
7793
|
}
|
|
7792
|
-
} catch (
|
|
7793
|
-
d(JSON.stringify(
|
|
7794
|
+
} catch (O) {
|
|
7795
|
+
d(JSON.stringify(O));
|
|
7794
7796
|
} finally {
|
|
7795
7797
|
u(!1);
|
|
7796
7798
|
}
|
|
@@ -7800,7 +7802,7 @@ const Xu = ({
|
|
|
7800
7802
|
{
|
|
7801
7803
|
required: s,
|
|
7802
7804
|
type: "array",
|
|
7803
|
-
validator: async (
|
|
7805
|
+
validator: async (O, C) => {
|
|
7804
7806
|
if (!C)
|
|
7805
7807
|
throw new Error();
|
|
7806
7808
|
if (!C.items)
|
|
@@ -7872,7 +7874,7 @@ function _s(e) {
|
|
|
7872
7874
|
}
|
|
7873
7875
|
) });
|
|
7874
7876
|
}
|
|
7875
|
-
const { TabPane: hf } =
|
|
7877
|
+
const { TabPane: hf } = Ii;
|
|
7876
7878
|
function gf(e) {
|
|
7877
7879
|
const { ooui: t, responsiveBehaviour: n } = e, r = t.pages;
|
|
7878
7880
|
function o(s) {
|
|
@@ -7881,7 +7883,7 @@ function gf(e) {
|
|
|
7881
7883
|
return a && /* @__PURE__ */ i(a, {});
|
|
7882
7884
|
}
|
|
7883
7885
|
}
|
|
7884
|
-
return /* @__PURE__ */ i(
|
|
7886
|
+
return /* @__PURE__ */ i(Ii, { defaultActiveKey: "1", tabPosition: t.tabPosition, children: r.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ i(
|
|
7885
7887
|
hf,
|
|
7886
7888
|
{
|
|
7887
7889
|
tab: /* @__PURE__ */ E(ae, { children: [
|
|
@@ -8036,7 +8038,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8036
8038
|
}
|
|
8037
8039
|
let g = r;
|
|
8038
8040
|
v.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (g = [
|
|
8039
|
-
["id", "in", n == null ? void 0 : n.map((
|
|
8041
|
+
["id", "in", n == null ? void 0 : n.map((I) => I.id)]
|
|
8040
8042
|
]);
|
|
8041
8043
|
const { datas: b } = await P.getHandler().exportData({
|
|
8042
8044
|
model: e,
|
|
@@ -8049,7 +8051,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8049
8051
|
context: t,
|
|
8050
8052
|
format: v.exportType
|
|
8051
8053
|
});
|
|
8052
|
-
s(), await new Promise((
|
|
8054
|
+
s(), await new Promise((I) => setTimeout(I, 200));
|
|
8053
8055
|
const x = await Xt(b);
|
|
8054
8056
|
Yn(b, x.mime);
|
|
8055
8057
|
},
|
|
@@ -8063,24 +8065,24 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8063
8065
|
return a.current["/"] = v, Go({ fields: v });
|
|
8064
8066
|
}, [e, t, a]), d = B(
|
|
8065
8067
|
async (v) => {
|
|
8066
|
-
const b = Ar(v, a.current)[
|
|
8068
|
+
const b = Ar(v, a.current)[Or(v)], x = b.relation, I = await P.getHandler().getFields({
|
|
8067
8069
|
model: x,
|
|
8068
8070
|
context: t,
|
|
8069
8071
|
fields: []
|
|
8070
8072
|
});
|
|
8071
|
-
for (const [w,
|
|
8072
|
-
|
|
8073
|
+
for (const [w, O] of Object.entries(I))
|
|
8074
|
+
I[w].string = Cf({
|
|
8073
8075
|
parentTitle: b.string,
|
|
8074
|
-
title:
|
|
8076
|
+
title: O.string
|
|
8075
8077
|
});
|
|
8076
|
-
return a.current[v] =
|
|
8077
|
-
fields:
|
|
8078
|
+
return a.current[v] = I, Go({
|
|
8079
|
+
fields: I,
|
|
8078
8080
|
parentKey: v
|
|
8079
8081
|
});
|
|
8080
8082
|
},
|
|
8081
8083
|
[t]
|
|
8082
8084
|
), p = B(async () => {
|
|
8083
|
-
const v = await Tf({ model: e, context: t }), g = await
|
|
8085
|
+
const v = await Tf({ model: e, context: t }), g = await Of({
|
|
8084
8086
|
predefinedExports: v,
|
|
8085
8087
|
fields: a.current,
|
|
8086
8088
|
onGetFieldChilds: d
|
|
@@ -8088,13 +8090,13 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8088
8090
|
return {
|
|
8089
8091
|
predefinedExports: v.map((x) => ({
|
|
8090
8092
|
...x,
|
|
8091
|
-
fields: x.fields.map((
|
|
8092
|
-
const w =
|
|
8093
|
+
fields: x.fields.map((I) => {
|
|
8094
|
+
const w = Or(I.key), C = Ar(I.key, a.current)[w];
|
|
8093
8095
|
return C ? {
|
|
8094
|
-
key:
|
|
8096
|
+
key: I.key,
|
|
8095
8097
|
title: C.string
|
|
8096
8098
|
} : {
|
|
8097
|
-
key:
|
|
8099
|
+
key: I.key
|
|
8098
8100
|
};
|
|
8099
8101
|
})
|
|
8100
8102
|
})),
|
|
@@ -8133,10 +8135,10 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8133
8135
|
context: t
|
|
8134
8136
|
});
|
|
8135
8137
|
return await Promise.all(
|
|
8136
|
-
v.fields.map(async (
|
|
8138
|
+
v.fields.map(async (I) => await P.getHandler().create({
|
|
8137
8139
|
model: "ir.exports.line",
|
|
8138
8140
|
values: {
|
|
8139
|
-
name:
|
|
8141
|
+
name: I.key,
|
|
8140
8142
|
export_id: x
|
|
8141
8143
|
},
|
|
8142
8144
|
fields: b,
|
|
@@ -8173,12 +8175,12 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8173
8175
|
}, Vs = (e) => e.type === "many2one" || e.type === "one2many" || e.type === "many2many", xf = ({
|
|
8174
8176
|
parentKey: e,
|
|
8175
8177
|
key: t
|
|
8176
|
-
}) => `${e ? e + "/" : ""}${t}`,
|
|
8178
|
+
}) => `${e ? e + "/" : ""}${t}`, Ir = (e) => e.indexOf("/") === -1 ? e : e.split("/").slice(0, -1).join("/"), Or = (e) => {
|
|
8177
8179
|
if (e.indexOf("/") === -1)
|
|
8178
8180
|
return e;
|
|
8179
8181
|
const t = e.split("/");
|
|
8180
8182
|
return t[t.length - 1];
|
|
8181
|
-
}, Ar = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[
|
|
8183
|
+
}, Ar = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[Ir(e)], Cf = ({
|
|
8182
8184
|
title: e,
|
|
8183
8185
|
parentTitle: t
|
|
8184
8186
|
}) => `${t ? t + " → " : ""}${e}`, Tf = async ({
|
|
@@ -8201,24 +8203,24 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8201
8203
|
key: o.find((c) => c.id === a).name
|
|
8202
8204
|
}))
|
|
8203
8205
|
}));
|
|
8204
|
-
},
|
|
8206
|
+
}, If = ({
|
|
8205
8207
|
fields: e,
|
|
8206
8208
|
keys: t
|
|
8207
8209
|
}) => Ff([
|
|
8208
8210
|
...new Set(
|
|
8209
8211
|
t.filter((n) => {
|
|
8210
8212
|
var r, o;
|
|
8211
|
-
return n.indexOf("/") === -1 ? !((r = e["/"]) != null && r[n]) : !((o = e == null ? void 0 : e[
|
|
8212
|
-
}).map((n) =>
|
|
8213
|
+
return n.indexOf("/") === -1 ? !((r = e["/"]) != null && r[n]) : !((o = e == null ? void 0 : e[Ir(n)]) != null && o[n]);
|
|
8214
|
+
}).map((n) => Ir(n))
|
|
8213
8215
|
)
|
|
8214
|
-
]),
|
|
8216
|
+
]), Of = async ({
|
|
8215
8217
|
predefinedExports: e,
|
|
8216
8218
|
fields: t,
|
|
8217
8219
|
onGetFieldChilds: n
|
|
8218
8220
|
}) => {
|
|
8219
8221
|
const r = e.flatMap(
|
|
8220
8222
|
(a) => a.fields.map((l) => l.key)
|
|
8221
|
-
), o =
|
|
8223
|
+
), o = If({
|
|
8222
8224
|
fields: t,
|
|
8223
8225
|
keys: r
|
|
8224
8226
|
}), s = [];
|
|
@@ -8236,7 +8238,7 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8236
8238
|
keys: e,
|
|
8237
8239
|
fields: t
|
|
8238
8240
|
}) => e.map((n) => {
|
|
8239
|
-
const r =
|
|
8241
|
+
const r = Or(n), s = Ar(n, t)[r], a = Vs(s), l = s.is_function === !0;
|
|
8240
8242
|
return a && !l ? `${n}/id` : n;
|
|
8241
8243
|
}), Ff = (e) => {
|
|
8242
8244
|
const t = /* @__PURE__ */ new Map(), n = [];
|
|
@@ -8371,8 +8373,8 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8371
8373
|
r == null || r(x);
|
|
8372
8374
|
};
|
|
8373
8375
|
async function y() {
|
|
8374
|
-
const x = await Xt(n),
|
|
8375
|
-
w.href =
|
|
8376
|
+
const x = await Xt(n), I = `data:${x == null ? void 0 : x.mime};base64,${n}`, w = document.createElement("a"), O = d(a), C = d("name");
|
|
8377
|
+
w.href = I, w.download = O || C, w.click();
|
|
8376
8378
|
}
|
|
8377
8379
|
async function v() {
|
|
8378
8380
|
const x = await Xt(n);
|
|
@@ -8380,8 +8382,8 @@ const { useToken: yf } = Ge, { TextArea: Tr } = ct, vf = (e) => {
|
|
|
8380
8382
|
}
|
|
8381
8383
|
async function g(x) {
|
|
8382
8384
|
x.stopPropagation(), x.preventDefault();
|
|
8383
|
-
const
|
|
8384
|
-
m(w), a && f(a,
|
|
8385
|
+
const I = x.target.files[0], w = await Ji(I);
|
|
8386
|
+
m(w), a && f(a, I.name);
|
|
8385
8387
|
}
|
|
8386
8388
|
function b() {
|
|
8387
8389
|
f(a, void 0), m(void 0);
|
|
@@ -8812,14 +8814,14 @@ const Bf = () => {
|
|
|
8812
8814
|
async (v) => {
|
|
8813
8815
|
var g;
|
|
8814
8816
|
try {
|
|
8815
|
-
const { params: b, model: x, name_search:
|
|
8817
|
+
const { params: b, model: x, name_search: I, context: w, order: O } = a, { results: C } = await l({
|
|
8816
8818
|
params: b,
|
|
8817
8819
|
model: x,
|
|
8818
8820
|
context: w,
|
|
8819
8821
|
limit: 1,
|
|
8820
8822
|
offset: v,
|
|
8821
|
-
order:
|
|
8822
|
-
name_search:
|
|
8823
|
+
order: O,
|
|
8824
|
+
name_search: I,
|
|
8823
8825
|
skipRead: !0
|
|
8824
8826
|
});
|
|
8825
8827
|
return (g = C[0]) == null ? void 0 : g.id;
|
|
@@ -8838,18 +8840,18 @@ const Bf = () => {
|
|
|
8838
8840
|
var w;
|
|
8839
8841
|
if (!s)
|
|
8840
8842
|
return;
|
|
8841
|
-
const g = v === "next", b = g ? n + 1 : n - 1, x = g ? b < t : b >= 0,
|
|
8843
|
+
const g = v === "next", b = g ? n + 1 : n - 1, x = g ? b < t : b >= 0, I = g ? b === t : b === -1;
|
|
8842
8844
|
if (x) {
|
|
8843
|
-
const
|
|
8844
|
-
if (
|
|
8845
|
-
d(b,
|
|
8845
|
+
const O = (w = s[b]) == null ? void 0 : w.id;
|
|
8846
|
+
if (O)
|
|
8847
|
+
d(b, O);
|
|
8846
8848
|
else {
|
|
8847
8849
|
const C = await f(b);
|
|
8848
8850
|
C && d(b, C);
|
|
8849
8851
|
}
|
|
8850
|
-
} else if (
|
|
8851
|
-
const
|
|
8852
|
-
C && d(
|
|
8852
|
+
} else if (I) {
|
|
8853
|
+
const O = g ? 0 : t - 1, C = await f(O);
|
|
8854
|
+
C && d(O, C);
|
|
8853
8855
|
}
|
|
8854
8856
|
},
|
|
8855
8857
|
[s, n, t, f, d]
|
|
@@ -8857,8 +8859,8 @@ const Bf = () => {
|
|
|
8857
8859
|
(v) => {
|
|
8858
8860
|
if (!s || s.length === 0)
|
|
8859
8861
|
return;
|
|
8860
|
-
const g = v === "next", b = g ? n + 1 : n - 1,
|
|
8861
|
-
d(
|
|
8862
|
+
const g = v === "next", b = g ? n + 1 : n - 1, I = (g ? b === s.length : b === -1) ? g ? 0 : s.length - 1 : b;
|
|
8863
|
+
d(I, s[I].id);
|
|
8862
8864
|
},
|
|
8863
8865
|
[s, n, d]
|
|
8864
8866
|
), m = B(() => {
|
|
@@ -8891,9 +8893,9 @@ function Hf({ toolbar: e }) {
|
|
|
8891
8893
|
currentModel: g,
|
|
8892
8894
|
setRemovingItem: b,
|
|
8893
8895
|
removingItem: x,
|
|
8894
|
-
duplicatingItem:
|
|
8896
|
+
duplicatingItem: I,
|
|
8895
8897
|
setDuplicatingItem: w,
|
|
8896
|
-
setResults:
|
|
8898
|
+
setResults: O,
|
|
8897
8899
|
formIsLoading: C,
|
|
8898
8900
|
attachments: T,
|
|
8899
8901
|
formRef: A,
|
|
@@ -8902,7 +8904,7 @@ function Hf({ toolbar: e }) {
|
|
|
8902
8904
|
setPreviousView: _,
|
|
8903
8905
|
goToResourceId: $,
|
|
8904
8906
|
isActive: R
|
|
8905
|
-
} = no(!0), { processAction: G } = t || {}, { openRelate: W, openDefaultActionForModel: L } = n || {}, N = d || x || C ||
|
|
8907
|
+
} = no(!0), { processAction: G } = t || {}, { openRelate: W, openDefaultActionForModel: L } = n || {}, N = d || x || C || I, k = B(
|
|
8906
8908
|
(H) => {
|
|
8907
8909
|
f ? an({ t: r, onOk: H }) : H();
|
|
8908
8910
|
},
|
|
@@ -8917,7 +8919,7 @@ function Hf({ toolbar: e }) {
|
|
|
8917
8919
|
const H = h == null ? void 0 : h.filter(
|
|
8918
8920
|
(ee) => ee.id !== p
|
|
8919
8921
|
);
|
|
8920
|
-
|
|
8922
|
+
O == null || O(H);
|
|
8921
8923
|
const ne = Math.max(0, (y || 0) - 1);
|
|
8922
8924
|
H != null && H[ne] ? (v == null || v(H[ne].id), m == null || m(ne)) : (v == null || v(void 0), m == null || m(void 0));
|
|
8923
8925
|
} catch (H) {
|
|
@@ -8934,7 +8936,7 @@ function Hf({ toolbar: e }) {
|
|
|
8934
8936
|
v,
|
|
8935
8937
|
m,
|
|
8936
8938
|
b,
|
|
8937
|
-
|
|
8939
|
+
O
|
|
8938
8940
|
]), te = B(async () => {
|
|
8939
8941
|
try {
|
|
8940
8942
|
w == null || w(!0);
|
|
@@ -9006,7 +9008,7 @@ function Hf({ toolbar: e }) {
|
|
|
9006
9008
|
icon: /* @__PURE__ */ i(zr, {}),
|
|
9007
9009
|
tooltip: r("duplicate"),
|
|
9008
9010
|
disabled: f || N || p === void 0,
|
|
9009
|
-
loading:
|
|
9011
|
+
loading: I,
|
|
9010
9012
|
onClick: () => Ft({
|
|
9011
9013
|
confirmMessage: r("confirmDuplicate"),
|
|
9012
9014
|
t: r,
|
|
@@ -9551,9 +9553,9 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9551
9553
|
setSearchVisible: g = void 0,
|
|
9552
9554
|
sorter: b = void 0,
|
|
9553
9555
|
setSorter: x = void 0,
|
|
9554
|
-
setTotalItems:
|
|
9556
|
+
setTotalItems: I = void 0,
|
|
9555
9557
|
setSearchTreeNameSearch: w = void 0,
|
|
9556
|
-
setTreeIsLoading:
|
|
9558
|
+
setTreeIsLoading: O = void 0,
|
|
9557
9559
|
limit: C,
|
|
9558
9560
|
setLimit: T,
|
|
9559
9561
|
searchParams: A,
|
|
@@ -9575,7 +9577,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9575
9577
|
setSearchValues: F,
|
|
9576
9578
|
setSearchParams: y,
|
|
9577
9579
|
setSearchVisible: g,
|
|
9578
|
-
setTreeIsLoading:
|
|
9580
|
+
setTreeIsLoading: O,
|
|
9579
9581
|
context: o,
|
|
9580
9582
|
formView: a,
|
|
9581
9583
|
treeView: l,
|
|
@@ -9586,7 +9588,7 @@ const { useToken: zf } = Ge, { Title: Jf, Text: An } = Rt, Xn = ({
|
|
|
9586
9588
|
resultsActionView: h,
|
|
9587
9589
|
domain: s,
|
|
9588
9590
|
currentId: p,
|
|
9589
|
-
setActionViewTotalItems:
|
|
9591
|
+
setActionViewTotalItems: I,
|
|
9590
9592
|
limit: C,
|
|
9591
9593
|
setLimit: T
|
|
9592
9594
|
});
|
|
@@ -9732,9 +9734,9 @@ function em(e) {
|
|
|
9732
9734
|
searchTreeNameSearch: g,
|
|
9733
9735
|
treeIsLoading: b,
|
|
9734
9736
|
setPreviousView: x,
|
|
9735
|
-
previousView:
|
|
9737
|
+
previousView: I,
|
|
9736
9738
|
results: w,
|
|
9737
|
-
limit:
|
|
9739
|
+
limit: O,
|
|
9738
9740
|
totalItems: C,
|
|
9739
9741
|
isActive: T,
|
|
9740
9742
|
isInfiniteTree: A
|
|
@@ -9746,10 +9748,10 @@ function em(e) {
|
|
|
9746
9748
|
Dt(
|
|
9747
9749
|
"ctrl+l,command+l",
|
|
9748
9750
|
() => {
|
|
9749
|
-
T &&
|
|
9751
|
+
T && I && (x == null || x(n), r == null || r(I));
|
|
9750
9752
|
},
|
|
9751
9753
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
9752
|
-
[
|
|
9754
|
+
[I, n, T]
|
|
9753
9755
|
), Dt(
|
|
9754
9756
|
"ctrl+f,command+f",
|
|
9755
9757
|
() => {
|
|
@@ -9924,7 +9926,7 @@ function em(e) {
|
|
|
9924
9926
|
onChangeView: (V) => {
|
|
9925
9927
|
x == null || x(n), r == null || r(V);
|
|
9926
9928
|
},
|
|
9927
|
-
previousView:
|
|
9929
|
+
previousView: I,
|
|
9928
9930
|
disabled: b
|
|
9929
9931
|
}
|
|
9930
9932
|
)
|
|
@@ -10041,7 +10043,7 @@ function em(e) {
|
|
|
10041
10043
|
((ee = f == null ? void 0 : f.current) == null ? void 0 : ee.getDomain()) || [],
|
|
10042
10044
|
h || []
|
|
10043
10045
|
),
|
|
10044
|
-
limit:
|
|
10046
|
+
limit: O,
|
|
10045
10047
|
totalRegisters: C || 0,
|
|
10046
10048
|
selectedRegistersToExport: o,
|
|
10047
10049
|
visibleRegisters: (w == null ? void 0 : w.length) || 0,
|
|
@@ -10147,7 +10149,7 @@ const tm = ({
|
|
|
10147
10149
|
}
|
|
10148
10150
|
)
|
|
10149
10151
|
] });
|
|
10150
|
-
}, { useToken: sm } = Ge, { Title: am } = Rt, { Header: lm, Content: cm, Footer: dm } =
|
|
10152
|
+
}, { useToken: sm } = Ge, { Title: am } = Rt, { Header: lm, Content: cm, Footer: dm } = Oi, um = ({
|
|
10151
10153
|
isOpen: e,
|
|
10152
10154
|
onClose: t,
|
|
10153
10155
|
children: n,
|
|
@@ -10268,47 +10270,47 @@ var Fn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
10268
10270
|
function $s(e) {
|
|
10269
10271
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10270
10272
|
}
|
|
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,
|
|
10273
|
+
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, Im = Math.min, lr = function() {
|
|
10272
10274
|
return Sm.Date.now();
|
|
10273
10275
|
};
|
|
10274
|
-
function
|
|
10276
|
+
function Om(e, t, n) {
|
|
10275
10277
|
var r, o, s, a, l, c, u = 0, f = !1, d = !1, p = !0;
|
|
10276
10278
|
if (typeof e != "function")
|
|
10277
10279
|
throw new TypeError(fm);
|
|
10278
10280
|
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);
|
|
10279
|
-
function h(
|
|
10281
|
+
function h(O) {
|
|
10280
10282
|
var C = r, T = o;
|
|
10281
|
-
return r = o = void 0, u =
|
|
10283
|
+
return r = o = void 0, u = O, a = e.apply(T, C), a;
|
|
10282
10284
|
}
|
|
10283
|
-
function m(
|
|
10284
|
-
return u =
|
|
10285
|
+
function m(O) {
|
|
10286
|
+
return u = O, l = setTimeout(g, t), f ? h(O) : a;
|
|
10285
10287
|
}
|
|
10286
|
-
function y(
|
|
10287
|
-
var C =
|
|
10288
|
-
return d ?
|
|
10288
|
+
function y(O) {
|
|
10289
|
+
var C = O - c, T = O - u, A = t - C;
|
|
10290
|
+
return d ? Im(A, s - T) : A;
|
|
10289
10291
|
}
|
|
10290
|
-
function v(
|
|
10291
|
-
var C =
|
|
10292
|
+
function v(O) {
|
|
10293
|
+
var C = O - c, T = O - u;
|
|
10292
10294
|
return c === void 0 || C >= t || C < 0 || d && T >= s;
|
|
10293
10295
|
}
|
|
10294
10296
|
function g() {
|
|
10295
|
-
var
|
|
10296
|
-
if (v(
|
|
10297
|
-
return b(
|
|
10298
|
-
l = setTimeout(g, y(
|
|
10297
|
+
var O = lr();
|
|
10298
|
+
if (v(O))
|
|
10299
|
+
return b(O);
|
|
10300
|
+
l = setTimeout(g, y(O));
|
|
10299
10301
|
}
|
|
10300
|
-
function b(
|
|
10301
|
-
return l = void 0, p && r ? h(
|
|
10302
|
+
function b(O) {
|
|
10303
|
+
return l = void 0, p && r ? h(O) : (r = o = void 0, a);
|
|
10302
10304
|
}
|
|
10303
10305
|
function x() {
|
|
10304
10306
|
l !== void 0 && clearTimeout(l), u = 0, r = c = o = l = void 0;
|
|
10305
10307
|
}
|
|
10306
|
-
function
|
|
10308
|
+
function I() {
|
|
10307
10309
|
return l === void 0 ? a : b(lr());
|
|
10308
10310
|
}
|
|
10309
10311
|
function w() {
|
|
10310
|
-
var
|
|
10311
|
-
if (r = arguments, o = this, c =
|
|
10312
|
+
var O = lr(), C = v(O);
|
|
10313
|
+
if (r = arguments, o = this, c = O, C) {
|
|
10312
10314
|
if (l === void 0)
|
|
10313
10315
|
return m(c);
|
|
10314
10316
|
if (d)
|
|
@@ -10316,7 +10318,7 @@ function Im(e, t, n) {
|
|
|
10316
10318
|
}
|
|
10317
10319
|
return l === void 0 && (l = setTimeout(g, t)), a;
|
|
10318
10320
|
}
|
|
10319
|
-
return w.cancel = x, w.flush =
|
|
10321
|
+
return w.cancel = x, w.flush = I, w;
|
|
10320
10322
|
}
|
|
10321
10323
|
function Fr(e) {
|
|
10322
10324
|
var t = typeof e;
|
|
@@ -10343,7 +10345,7 @@ function Jo(e) {
|
|
|
10343
10345
|
var n = gm.test(e);
|
|
10344
10346
|
return n || ym.test(e) ? vm(e.slice(2), n ? 2 : 8) : hm.test(e) ? zo : +e;
|
|
10345
10347
|
}
|
|
10346
|
-
var Rm =
|
|
10348
|
+
var Rm = Om;
|
|
10347
10349
|
const _m = /* @__PURE__ */ $s(Rm);
|
|
10348
10350
|
var Xo = Object.prototype.toString, Ns = function(t) {
|
|
10349
10351
|
var n = Xo.call(t), r = n === "[object Arguments]";
|
|
@@ -10421,14 +10423,14 @@ function Vm() {
|
|
|
10421
10423
|
throw new TypeError("Object.keys called on a non-object");
|
|
10422
10424
|
var x = a && y;
|
|
10423
10425
|
if (g && h.length > 0 && !t.call(h, 0))
|
|
10424
|
-
for (var
|
|
10425
|
-
b.push(String(
|
|
10426
|
+
for (var I = 0; I < h.length; ++I)
|
|
10427
|
+
b.push(String(I));
|
|
10426
10428
|
if (v && h.length > 0)
|
|
10427
10429
|
for (var w = 0; w < h.length; ++w)
|
|
10428
10430
|
b.push(String(w));
|
|
10429
10431
|
else
|
|
10430
|
-
for (var
|
|
10431
|
-
!(x &&
|
|
10432
|
+
for (var O in h)
|
|
10433
|
+
!(x && O === "prototype") && t.call(h, O) && b.push(String(O));
|
|
10432
10434
|
if (s)
|
|
10433
10435
|
for (var C = d(h), T = 0; T < l.length; ++T)
|
|
10434
10436
|
!(C && l[T] === "constructor") && t.call(h, l[T]) && b.push(l[T]);
|
|
@@ -10858,13 +10860,13 @@ var Tn = zs, di = function(e) {
|
|
|
10858
10860
|
return Object.is !== t;
|
|
10859
10861
|
}
|
|
10860
10862
|
}), t;
|
|
10861
|
-
}, xp = Tn, Cp = fo, Tp = Js, Qs = Xs,
|
|
10863
|
+
}, xp = Tn, Cp = fo, Tp = Js, Qs = Xs, Ip = Sp, Zs = Cp(Qs(), Object);
|
|
10862
10864
|
xp(Zs, {
|
|
10863
10865
|
getPolyfill: Qs,
|
|
10864
10866
|
implementation: Tp,
|
|
10865
|
-
shim:
|
|
10867
|
+
shim: Ip
|
|
10866
10868
|
});
|
|
10867
|
-
var
|
|
10869
|
+
var Op = Zs, Dr = Gs, ea = uo(), ta, na, Er, Pr;
|
|
10868
10870
|
if (ea) {
|
|
10869
10871
|
ta = Dr("Object.prototype.hasOwnProperty"), na = Dr("RegExp.prototype.exec"), Er = {};
|
|
10870
10872
|
var hr = function() {
|
|
@@ -10961,7 +10963,7 @@ var eh = sa, th = Date.prototype.getDay, nh = function(t) {
|
|
|
10961
10963
|
}
|
|
10962
10964
|
}, rh = Object.prototype.toString, oh = "[object Date]", ih = uo(), sh = function(t) {
|
|
10963
10965
|
return typeof t != "object" || t === null ? !1 : ih ? nh(t) : rh.call(t) === oh;
|
|
10964
|
-
}, mi = Ms, pi = ap, hi =
|
|
10966
|
+
}, mi = Ms, pi = ap, hi = Op, gi = _p, yi = eh, vi = sh, wi = Date.prototype.getTime;
|
|
10965
10967
|
function aa(e, t, n) {
|
|
10966
10968
|
var r = n || {};
|
|
10967
10969
|
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);
|
|
@@ -11073,36 +11075,36 @@ const la = /* @__PURE__ */ $s(lh), ch = pt(
|
|
|
11073
11075
|
l.current = new Di(o, s, 1), l.current.parse(), f(l.current._advancedSearchContainer);
|
|
11074
11076
|
}, [s, o, n]);
|
|
11075
11077
|
const m = B(
|
|
11076
|
-
(
|
|
11077
|
-
var
|
|
11078
|
+
(I) => {
|
|
11079
|
+
var O;
|
|
11078
11080
|
const w = Rn(
|
|
11079
|
-
|
|
11080
|
-
(
|
|
11081
|
+
I,
|
|
11082
|
+
(O = l.current) == null ? void 0 : O._advancedSearchContainer
|
|
11081
11083
|
);
|
|
11082
|
-
t({ params: w, values: kr(
|
|
11084
|
+
t({ params: w, values: kr(I) });
|
|
11083
11085
|
},
|
|
11084
11086
|
[t]
|
|
11085
11087
|
), y = B(() => {
|
|
11086
|
-
var
|
|
11087
|
-
(
|
|
11088
|
+
var I;
|
|
11089
|
+
(I = d.current) == null || I.submit();
|
|
11088
11090
|
}, []), v = B(
|
|
11089
|
-
(
|
|
11091
|
+
(I) => {
|
|
11090
11092
|
var C;
|
|
11091
|
-
const w = kr(
|
|
11093
|
+
const w = kr(I);
|
|
11092
11094
|
if (la(w, a)) {
|
|
11093
11095
|
h([]);
|
|
11094
11096
|
return;
|
|
11095
11097
|
}
|
|
11096
|
-
const
|
|
11097
|
-
|
|
11098
|
+
const O = Rn(
|
|
11099
|
+
I,
|
|
11098
11100
|
(C = l.current) == null ? void 0 : C._advancedSearchContainer
|
|
11099
11101
|
);
|
|
11100
|
-
h(
|
|
11102
|
+
h(O);
|
|
11101
11103
|
},
|
|
11102
11104
|
[a]
|
|
11103
11105
|
), g = B(() => {
|
|
11104
|
-
var
|
|
11105
|
-
(
|
|
11106
|
+
var I, w;
|
|
11107
|
+
(I = d.current) == null || I.resetFields(), (w = d == null ? void 0 : d.current) == null || w.setFieldsValue({}), h([]);
|
|
11106
11108
|
}, []), b = n ? p || Rn(a, (x = l.current) == null ? void 0 : x._advancedSearchContainer) : [];
|
|
11107
11109
|
return /* @__PURE__ */ i(
|
|
11108
11110
|
um,
|
|
@@ -11188,8 +11190,8 @@ function ph(e, t) {
|
|
|
11188
11190
|
parentContext: u = {},
|
|
11189
11191
|
onChangeSelectedRowKeys: f,
|
|
11190
11192
|
nameSearch: d
|
|
11191
|
-
} = e, p = Q({}), h = Q(), m = Q(null), y = Q([]), v = bs(), [g, b] = S(!0), [x,
|
|
11192
|
-
elementRef:
|
|
11193
|
+
} = e, p = Q({}), h = Q(), m = Q(null), y = Q([]), v = bs(), [g, b] = S(!0), [x, I] = S(), { t: w } = he(), O = Q(null), C = nm({
|
|
11194
|
+
elementRef: O,
|
|
11193
11195
|
offset: fh
|
|
11194
11196
|
}), { treeView: T, formView: A, loading: D } = tm({
|
|
11195
11197
|
model: n,
|
|
@@ -11223,7 +11225,7 @@ function ph(e, t) {
|
|
|
11223
11225
|
}, [j]);
|
|
11224
11226
|
const z = ye(() => {
|
|
11225
11227
|
if (T)
|
|
11226
|
-
return
|
|
11228
|
+
return Ot(T);
|
|
11227
11229
|
}, [T]), Y = yn(() => {
|
|
11228
11230
|
if (z)
|
|
11229
11231
|
return Zr(
|
|
@@ -11240,23 +11242,23 @@ function ph(e, t) {
|
|
|
11240
11242
|
loading: ve,
|
|
11241
11243
|
getColumnState: $e,
|
|
11242
11244
|
updateColumnState: Le
|
|
11243
|
-
} = Fs(me),
|
|
11245
|
+
} = Fs(me), Ie = ye(
|
|
11244
11246
|
() => Zt(X || [], a),
|
|
11245
11247
|
[a, X]
|
|
11246
11248
|
), Ee = B(() => {
|
|
11247
|
-
const Pe = `${JSON.stringify(j ? a :
|
|
11249
|
+
const Pe = `${JSON.stringify(j ? a : Ie)}-${j}`;
|
|
11248
11250
|
return Pe !== Ae.current ? (Ae.current = Pe, !0) : !1;
|
|
11249
|
-
}, [a,
|
|
11251
|
+
}, [a, Ie, j]), Ke = B(async () => {
|
|
11250
11252
|
if (Ee()) {
|
|
11251
|
-
|
|
11253
|
+
I(void 0), M(0), b(!0);
|
|
11252
11254
|
try {
|
|
11253
11255
|
const Z = await P.getHandler().searchCount({
|
|
11254
|
-
params: j ? a :
|
|
11256
|
+
params: j ? a : Ie,
|
|
11255
11257
|
model: n,
|
|
11256
11258
|
context: u,
|
|
11257
11259
|
name_search: j
|
|
11258
11260
|
});
|
|
11259
|
-
|
|
11261
|
+
I(Z), M(Z);
|
|
11260
11262
|
} catch (Z) {
|
|
11261
11263
|
v(Z);
|
|
11262
11264
|
} finally {
|
|
@@ -11265,7 +11267,7 @@ function ph(e, t) {
|
|
|
11265
11267
|
}
|
|
11266
11268
|
}, [
|
|
11267
11269
|
a,
|
|
11268
|
-
|
|
11270
|
+
Ie,
|
|
11269
11271
|
n,
|
|
11270
11272
|
Ee,
|
|
11271
11273
|
j,
|
|
@@ -11282,7 +11284,7 @@ function ph(e, t) {
|
|
|
11282
11284
|
return [];
|
|
11283
11285
|
const ke = {};
|
|
11284
11286
|
z.colors && (ke.colors = z.colors), z.status && (ke.status = z.status);
|
|
11285
|
-
const ot = j ? a :
|
|
11287
|
+
const ot = j ? a : Ie, bt = Sc(Ye), { results: St, attrsEvaluated: Be } = await P.getHandler().searchForTree({
|
|
11286
11288
|
params: ot,
|
|
11287
11289
|
limit: Pe - Z,
|
|
11288
11290
|
offset: Z,
|
|
@@ -11306,7 +11308,7 @@ function ph(e, t) {
|
|
|
11306
11308
|
ne == null || ne(mt);
|
|
11307
11309
|
}
|
|
11308
11310
|
if (xe.current = bt, St.length === 0)
|
|
11309
|
-
return y.current = [],
|
|
11311
|
+
return y.current = [], I(0), M(0), [];
|
|
11310
11312
|
const xt = zn(z, St), Zn = Qt(Be);
|
|
11311
11313
|
if (p.current = {
|
|
11312
11314
|
...p.current,
|
|
@@ -11323,7 +11325,7 @@ function ph(e, t) {
|
|
|
11323
11325
|
[
|
|
11324
11326
|
ee,
|
|
11325
11327
|
a,
|
|
11326
|
-
|
|
11328
|
+
Ie,
|
|
11327
11329
|
n,
|
|
11328
11330
|
Ee,
|
|
11329
11331
|
j,
|
|
@@ -11352,7 +11354,7 @@ function ph(e, t) {
|
|
|
11352
11354
|
sortFields: Ye
|
|
11353
11355
|
});
|
|
11354
11356
|
} catch (ke) {
|
|
11355
|
-
throw console.error(ke),
|
|
11357
|
+
throw console.error(ke), I(null), M(0), v(ke), ke;
|
|
11356
11358
|
} finally {
|
|
11357
11359
|
F == null || F(!1);
|
|
11358
11360
|
}
|
|
@@ -11382,7 +11384,7 @@ function ph(e, t) {
|
|
|
11382
11384
|
return;
|
|
11383
11385
|
const Ye = await P.getHandler().searchAllIds(
|
|
11384
11386
|
{
|
|
11385
|
-
params: j ? a :
|
|
11387
|
+
params: j ? a : Ie,
|
|
11386
11388
|
model: n,
|
|
11387
11389
|
context: u,
|
|
11388
11390
|
totalItems: x
|
|
@@ -11400,7 +11402,7 @@ function ph(e, t) {
|
|
|
11400
11402
|
}) : Pe() : R == null || R([]);
|
|
11401
11403
|
}, [
|
|
11402
11404
|
a,
|
|
11403
|
-
|
|
11405
|
+
Ie,
|
|
11404
11406
|
n,
|
|
11405
11407
|
j,
|
|
11406
11408
|
u,
|
|
@@ -11408,7 +11410,7 @@ function ph(e, t) {
|
|
|
11408
11410
|
R,
|
|
11409
11411
|
w,
|
|
11410
11412
|
x
|
|
11411
|
-
]), Me = B(() => W, [W]), re = ye(() => Se ? /* @__PURE__ */ i(As, { aggregates: Ce, isLoading: J }) : null, [Ce, J, Se]),
|
|
11413
|
+
]), Me = B(() => W, [W]), re = ye(() => Se ? /* @__PURE__ */ i(As, { aggregates: Ce, isLoading: J }) : null, [Ce, J, Se]), Oe = B((Z) => /* @__PURE__ */ i(Lr, { color: Z, style: { marginLeft: 7 } }), []), qe = B(
|
|
11412
11414
|
(Z) => {
|
|
11413
11415
|
var Pe;
|
|
11414
11416
|
return (Pe = h.current) == null ? void 0 : Pe[Z.id];
|
|
@@ -11439,7 +11441,7 @@ function ph(e, t) {
|
|
|
11439
11441
|
totalRows: x || 99999,
|
|
11440
11442
|
footer: re,
|
|
11441
11443
|
hasStatusColumn: z.status !== null,
|
|
11442
|
-
statusComponent:
|
|
11444
|
+
statusComponent: Oe,
|
|
11443
11445
|
onRowStatus: qe,
|
|
11444
11446
|
strings: pe
|
|
11445
11447
|
}
|
|
@@ -11457,7 +11459,7 @@ function ph(e, t) {
|
|
|
11457
11459
|
Ue,
|
|
11458
11460
|
_e,
|
|
11459
11461
|
G,
|
|
11460
|
-
|
|
11462
|
+
Oe,
|
|
11461
11463
|
pe,
|
|
11462
11464
|
x,
|
|
11463
11465
|
z,
|
|
@@ -11490,7 +11492,7 @@ function ph(e, t) {
|
|
|
11490
11492
|
/* @__PURE__ */ i(
|
|
11491
11493
|
"div",
|
|
11492
11494
|
{
|
|
11493
|
-
ref:
|
|
11495
|
+
ref: O,
|
|
11494
11496
|
style: {
|
|
11495
11497
|
overflow: "hidden",
|
|
11496
11498
|
height: `${C}px`,
|
|
@@ -11535,7 +11537,7 @@ const hh = pt(ph), gh = (e) => {
|
|
|
11535
11537
|
setCurrentView: d,
|
|
11536
11538
|
availableViews: p,
|
|
11537
11539
|
searchTreeNameSearch: h
|
|
11538
|
-
} = e, m = ye(() => a != null && a.arch
|
|
11540
|
+
} = e, m = ye(() => !(a != null && a.arch) || a.isExpandable ? !1 : xc(a.arch, "infinite") === "1", [a]);
|
|
11539
11541
|
de(() => {
|
|
11540
11542
|
g == null || g(m);
|
|
11541
11543
|
}, [m]);
|
|
@@ -11543,14 +11545,14 @@ const hh = pt(ph), gh = (e) => {
|
|
|
11543
11545
|
lt
|
|
11544
11546
|
), b = B(
|
|
11545
11547
|
(x) => {
|
|
11546
|
-
const { id:
|
|
11547
|
-
f(
|
|
11548
|
-
const w = u.findIndex((C) => C.id ===
|
|
11548
|
+
const { id: I } = x;
|
|
11549
|
+
f(I);
|
|
11550
|
+
const w = u.findIndex((C) => C.id === I);
|
|
11549
11551
|
v == null || v(y), c(w);
|
|
11550
|
-
const
|
|
11552
|
+
const O = p.find(
|
|
11551
11553
|
(C) => C.type === "form"
|
|
11552
11554
|
);
|
|
11553
|
-
d(
|
|
11555
|
+
d(O);
|
|
11554
11556
|
},
|
|
11555
11557
|
[
|
|
11556
11558
|
p,
|
|
@@ -11726,7 +11728,7 @@ function xh(e, t) {
|
|
|
11726
11728
|
action_type: m,
|
|
11727
11729
|
treeExpandable: y = !1,
|
|
11728
11730
|
limit: v
|
|
11729
|
-
} = e, [g, b] = S(), [x,
|
|
11731
|
+
} = e, [g, b] = S(), [x, I] = S([]), [w, O] = S(!0), C = p || void 0, [T, A] = S(
|
|
11730
11732
|
C
|
|
11731
11733
|
), [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(
|
|
11732
11734
|
wt
|
|
@@ -11746,7 +11748,7 @@ function xh(e, t) {
|
|
|
11746
11748
|
{ enableOnFormTags: !0, preventDefault: !0 },
|
|
11747
11749
|
[ve, me, g, _, R]
|
|
11748
11750
|
);
|
|
11749
|
-
function
|
|
11751
|
+
function Ie(J) {
|
|
11750
11752
|
A(J), Y == null || Y(J);
|
|
11751
11753
|
}
|
|
11752
11754
|
function Ee(J) {
|
|
@@ -11758,15 +11760,15 @@ function xh(e, t) {
|
|
|
11758
11760
|
canWeClose: Fe
|
|
11759
11761
|
}));
|
|
11760
11762
|
const Ke = async () => {
|
|
11761
|
-
|
|
11763
|
+
O(!0);
|
|
11762
11764
|
const J = [], Ce = [];
|
|
11763
11765
|
for (const Me of s) {
|
|
11764
|
-
const [re,
|
|
11765
|
-
|
|
11766
|
+
const [re, Oe] = Me;
|
|
11767
|
+
Oe !== "dashboard" ? Ce.push({
|
|
11766
11768
|
viewTuple: Me,
|
|
11767
11769
|
promise: P.getHandler().getView({
|
|
11768
11770
|
model: r,
|
|
11769
|
-
type:
|
|
11771
|
+
type: Oe,
|
|
11770
11772
|
id: re,
|
|
11771
11773
|
context: o
|
|
11772
11774
|
})
|
|
@@ -11778,7 +11780,7 @@ function xh(e, t) {
|
|
|
11778
11780
|
for (const Me of Se) {
|
|
11779
11781
|
if (!Me)
|
|
11780
11782
|
continue;
|
|
11781
|
-
const [, re] = Me.viewTuple,
|
|
11783
|
+
const [, re] = Me.viewTuple, Oe = Me.info;
|
|
11782
11784
|
switch (re) {
|
|
11783
11785
|
case "dashboard": {
|
|
11784
11786
|
const qe = s.find((rt) => {
|
|
@@ -11805,14 +11807,14 @@ function xh(e, t) {
|
|
|
11805
11807
|
}
|
|
11806
11808
|
case "form": {
|
|
11807
11809
|
J.push({
|
|
11808
|
-
...
|
|
11810
|
+
...Oe,
|
|
11809
11811
|
type: re
|
|
11810
11812
|
});
|
|
11811
11813
|
break;
|
|
11812
11814
|
}
|
|
11813
11815
|
case "tree": {
|
|
11814
11816
|
J.push({
|
|
11815
|
-
...
|
|
11817
|
+
...Oe,
|
|
11816
11818
|
isExpandable: y,
|
|
11817
11819
|
type: re
|
|
11818
11820
|
});
|
|
@@ -11820,7 +11822,7 @@ function xh(e, t) {
|
|
|
11820
11822
|
}
|
|
11821
11823
|
case "graph": {
|
|
11822
11824
|
J.push({
|
|
11823
|
-
...
|
|
11825
|
+
...Oe,
|
|
11824
11826
|
type: re
|
|
11825
11827
|
});
|
|
11826
11828
|
break;
|
|
@@ -11835,11 +11837,11 @@ function xh(e, t) {
|
|
|
11835
11837
|
), Ue || (it(
|
|
11836
11838
|
`Error determining the first view to show for model ${r}.
|
|
11837
11839
|
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
11838
|
-
), Le == null || Le(c)), Ee(Ue),
|
|
11840
|
+
), Le == null || Le(c)), Ee(Ue), I(J), O(!1);
|
|
11839
11841
|
};
|
|
11840
11842
|
l({ tabKey: c, canWeClose: Fe }), de(() => {
|
|
11841
11843
|
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);
|
|
11842
|
-
Ee(Ce || J), p ? Y == null || Y(C) : (
|
|
11844
|
+
Ee(Ce || J), p ? Y == null || Y(C) : (Ie(void 0), $(void 0)), Ke();
|
|
11843
11845
|
}, [r, s, p]), de(() => {
|
|
11844
11846
|
if (ve === c) {
|
|
11845
11847
|
Y == null || Y(T);
|
|
@@ -11859,9 +11861,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11859
11861
|
let Se, Ue;
|
|
11860
11862
|
if (J.length === 1) {
|
|
11861
11863
|
Se = "form", Ue = [];
|
|
11862
|
-
const re = J[0],
|
|
11864
|
+
const re = J[0], Oe = R.findIndex((pe) => pe.id === re);
|
|
11863
11865
|
let qe;
|
|
11864
|
-
if (
|
|
11866
|
+
if (Oe === -1) {
|
|
11865
11867
|
try {
|
|
11866
11868
|
qe = (Me = await P.getHandler().readObjects({
|
|
11867
11869
|
model: r,
|
|
@@ -11875,17 +11877,17 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11875
11877
|
return;
|
|
11876
11878
|
}
|
|
11877
11879
|
} else
|
|
11878
|
-
qe = R[
|
|
11880
|
+
qe = R[Oe];
|
|
11879
11881
|
} else
|
|
11880
11882
|
Se = "tree", Ue = [["id", "in", J]];
|
|
11881
11883
|
if (H(!1), te(!1), Ce && Se === "form") {
|
|
11882
|
-
|
|
11884
|
+
Ie(J[0]);
|
|
11883
11885
|
const re = x.find(
|
|
11884
|
-
(
|
|
11886
|
+
(Oe) => Oe.type === "form"
|
|
11885
11887
|
);
|
|
11886
11888
|
Ee(re);
|
|
11887
11889
|
} else {
|
|
11888
|
-
const re = s.find((
|
|
11890
|
+
const re = s.find((Oe) => Oe[1] === Se);
|
|
11889
11891
|
$e({
|
|
11890
11892
|
domain: Ue,
|
|
11891
11893
|
context: o,
|
|
@@ -11938,7 +11940,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11938
11940
|
availableViews: x,
|
|
11939
11941
|
results: R,
|
|
11940
11942
|
setCurrentItemIndex: $,
|
|
11941
|
-
setCurrentId:
|
|
11943
|
+
setCurrentId: Ie,
|
|
11942
11944
|
setCurrentView: Ee
|
|
11943
11945
|
},
|
|
11944
11946
|
`${J.type}-${J.view_id}`
|
|
@@ -11973,7 +11975,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11973
11975
|
if (T === void 0 && g.type === "form")
|
|
11974
11976
|
M.current.clearAndReload();
|
|
11975
11977
|
else {
|
|
11976
|
-
|
|
11978
|
+
Ie(void 0);
|
|
11977
11979
|
const J = x.find(
|
|
11978
11980
|
(Ce) => Ce.type === "form"
|
|
11979
11981
|
);
|
|
@@ -11991,7 +11993,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
11991
11993
|
searchTreeRef: j,
|
|
11992
11994
|
onNewClicked: _e,
|
|
11993
11995
|
currentId: T,
|
|
11994
|
-
setCurrentId:
|
|
11996
|
+
setCurrentId: Ie,
|
|
11995
11997
|
setCurrentItemIndex: $,
|
|
11996
11998
|
currentItemIndex: _,
|
|
11997
11999
|
results: R,
|
|
@@ -12056,7 +12058,7 @@ const Ch = Ll(jl), Th = (e) => {
|
|
|
12056
12058
|
}
|
|
12057
12059
|
);
|
|
12058
12060
|
};
|
|
12059
|
-
function
|
|
12061
|
+
function Ih(e) {
|
|
12060
12062
|
const {
|
|
12061
12063
|
action: t,
|
|
12062
12064
|
model: n,
|
|
@@ -12065,19 +12067,19 @@ function Oh(e) {
|
|
|
12065
12067
|
domain: s = [],
|
|
12066
12068
|
visible: a = !0,
|
|
12067
12069
|
parentContext: l = {}
|
|
12068
|
-
} = e, [c, u] = S(!1), [f, d] = S(!1), [p, h] = S(), [m, y] = S(), [v, g] = S(), [b, x] = S(1), [
|
|
12069
|
-
te(!0), x(Y), w((Y - 1) *
|
|
12070
|
+
} = e, [c, u] = S(!1), [f, d] = S(!1), [p, h] = S(), [m, y] = S(), [v, g] = S(), [b, x] = S(1), [I, w] = S(0), O = 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) => {
|
|
12071
|
+
te(!0), x(Y), w((Y - 1) * O.current);
|
|
12070
12072
|
}, ne = async () => {
|
|
12071
|
-
const Y = ie.current.length > 0 ? ie.current : s, me = Zt(C.current, Y), { colors: ve } =
|
|
12073
|
+
const Y = ie.current.length > 0 ? ie.current : s, me = Zt(C.current, Y), { colors: ve } = Ot(m), { totalItems: $e, results: Le, attrsEvaluated: Ie } = await P.getHandler().searchForTree({
|
|
12072
12074
|
params: me,
|
|
12073
|
-
limit:
|
|
12074
|
-
offset:
|
|
12075
|
+
limit: O.current,
|
|
12076
|
+
offset: I,
|
|
12075
12077
|
model: p,
|
|
12076
12078
|
fields: m.fields,
|
|
12077
12079
|
context: l,
|
|
12078
12080
|
attrs: ve && { colors: ve }
|
|
12079
12081
|
});
|
|
12080
|
-
$(Qt(
|
|
12082
|
+
$(Qt(Ie));
|
|
12081
12083
|
const Ee = Yt({
|
|
12082
12084
|
resultsToSort: Le,
|
|
12083
12085
|
sorter: R,
|
|
@@ -12095,7 +12097,7 @@ function Oh(e) {
|
|
|
12095
12097
|
};
|
|
12096
12098
|
de(() => {
|
|
12097
12099
|
f && a && ee();
|
|
12098
|
-
}, [b,
|
|
12100
|
+
}, [b, I, f, a]);
|
|
12099
12101
|
const V = async (Y) => {
|
|
12100
12102
|
d(!1), u(!0), k(void 0);
|
|
12101
12103
|
try {
|
|
@@ -12110,7 +12112,7 @@ function Oh(e) {
|
|
|
12110
12112
|
action: t,
|
|
12111
12113
|
context: l
|
|
12112
12114
|
});
|
|
12113
|
-
ie.current = Y.domain, g(Y.views.get("form")), y(Y.views.get("tree")), h(Y.model),
|
|
12115
|
+
ie.current = Y.domain, g(Y.views.get("form")), y(Y.views.get("tree")), h(Y.model), O.current = Y.limit;
|
|
12114
12116
|
}, j = async () => {
|
|
12115
12117
|
h(n);
|
|
12116
12118
|
const Y = await P.getHandler().getView({
|
|
@@ -12144,7 +12146,7 @@ function Oh(e) {
|
|
|
12144
12146
|
{
|
|
12145
12147
|
showPagination: !1,
|
|
12146
12148
|
total: T,
|
|
12147
|
-
limit:
|
|
12149
|
+
limit: O.current,
|
|
12148
12150
|
page: b,
|
|
12149
12151
|
treeView: m,
|
|
12150
12152
|
results: D,
|
|
@@ -12168,7 +12170,7 @@ function Oh(e) {
|
|
|
12168
12170
|
] });
|
|
12169
12171
|
return N ? /* @__PURE__ */ i(nt, { className: "mt-10", message: N, type: "error", banner: !0 }) : c ? /* @__PURE__ */ i(We, { style: { padding: "2rem" } }) : z();
|
|
12170
12172
|
}
|
|
12171
|
-
const
|
|
12173
|
+
const Oh = $r(Ih), Ah = (e) => {
|
|
12172
12174
|
const { model: t } = e, [n, r] = S();
|
|
12173
12175
|
de(() => {
|
|
12174
12176
|
o();
|
|
@@ -12190,7 +12192,7 @@ function Fh(e, t) {
|
|
|
12190
12192
|
moveItemsEnabled: m
|
|
12191
12193
|
} = oe(ho), y = Q(), v = Q(), [g] = Je(P.getHandler().getView), [b] = Je(
|
|
12192
12194
|
P.getHandler().readObjects
|
|
12193
|
-
), [x] = Je(P.getHandler().update),
|
|
12195
|
+
), [x] = Je(P.getHandler().update), I = Jn(
|
|
12194
12196
|
sn.FEATURE_READFORVIEW
|
|
12195
12197
|
);
|
|
12196
12198
|
de(() => {
|
|
@@ -12204,7 +12206,7 @@ function Fh(e, t) {
|
|
|
12204
12206
|
async function w() {
|
|
12205
12207
|
u(!0), p(!0), d(void 0);
|
|
12206
12208
|
try {
|
|
12207
|
-
const _ = await
|
|
12209
|
+
const _ = await O(), $ = await T(_), R = _.fields[gr].relation, G = $[gr].items;
|
|
12208
12210
|
v.current = _.fields;
|
|
12209
12211
|
const W = await C({
|
|
12210
12212
|
items: G,
|
|
@@ -12216,7 +12218,7 @@ function Fh(e, t) {
|
|
|
12216
12218
|
d(JSON.stringify(_));
|
|
12217
12219
|
}
|
|
12218
12220
|
}
|
|
12219
|
-
async function
|
|
12221
|
+
async function O() {
|
|
12220
12222
|
return await g({
|
|
12221
12223
|
model: n,
|
|
12222
12224
|
type: "form",
|
|
@@ -12336,7 +12338,7 @@ function Fh(e, t) {
|
|
|
12336
12338
|
}
|
|
12337
12339
|
let fe = null;
|
|
12338
12340
|
if ((V == null ? void 0 : V.type) === "graph") {
|
|
12339
|
-
const ve = G.server_action === !0 &&
|
|
12341
|
+
const ve = G.server_action === !0 && I ? as : on;
|
|
12340
12342
|
fe = /* @__PURE__ */ i(
|
|
12341
12343
|
ve,
|
|
12342
12344
|
{
|
|
@@ -12354,7 +12356,7 @@ function Fh(e, t) {
|
|
|
12354
12356
|
fe = /* @__PURE__ */ i(Ah, { model: H, actionDomain: ee }, L);
|
|
12355
12357
|
else if ((V == null ? void 0 : V.type) === "tree")
|
|
12356
12358
|
fe = /* @__PURE__ */ i(
|
|
12357
|
-
|
|
12359
|
+
Oh,
|
|
12358
12360
|
{
|
|
12359
12361
|
model: H,
|
|
12360
12362
|
domain: ee,
|
|
@@ -12368,12 +12370,12 @@ function Fh(e, t) {
|
|
|
12368
12370
|
});
|
|
12369
12371
|
if (ve) {
|
|
12370
12372
|
const [$e, Le] = ve, {
|
|
12371
|
-
actionId:
|
|
12373
|
+
actionId: Ie,
|
|
12372
12374
|
actionType: Ee,
|
|
12373
12375
|
title: Ke,
|
|
12374
12376
|
model: Fe
|
|
12375
12377
|
} = R, ce = {
|
|
12376
|
-
action_id:
|
|
12378
|
+
action_id: Ie,
|
|
12377
12379
|
action_type: Ee,
|
|
12378
12380
|
name: Ke,
|
|
12379
12381
|
res_id: me.id,
|
|
@@ -12417,13 +12419,13 @@ function Fh(e, t) {
|
|
|
12417
12419
|
const [me, ve] = Y, {
|
|
12418
12420
|
actionId: $e,
|
|
12419
12421
|
actionType: Le,
|
|
12420
|
-
title:
|
|
12422
|
+
title: Ie,
|
|
12421
12423
|
model: Ee
|
|
12422
12424
|
} = R;
|
|
12423
12425
|
z = {
|
|
12424
12426
|
action_id: $e,
|
|
12425
12427
|
action_type: Le,
|
|
12426
|
-
name:
|
|
12428
|
+
name: Ie,
|
|
12427
12429
|
res_id: !1,
|
|
12428
12430
|
res_model: Ee,
|
|
12429
12431
|
view_id: me,
|
|
@@ -12451,14 +12453,14 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12451
12453
|
}, Vh = (e) => {
|
|
12452
12454
|
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 || {};
|
|
12453
12455
|
yt(() => {
|
|
12454
|
-
|
|
12456
|
+
I();
|
|
12455
12457
|
}, [o]);
|
|
12456
12458
|
const x = (T) => {
|
|
12457
12459
|
r == null || r({
|
|
12458
12460
|
items: T
|
|
12459
12461
|
});
|
|
12460
12462
|
};
|
|
12461
|
-
async function
|
|
12463
|
+
async function I() {
|
|
12462
12464
|
d(!0);
|
|
12463
12465
|
let T = [];
|
|
12464
12466
|
if (n.domain) {
|
|
@@ -12495,7 +12497,7 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12495
12497
|
}
|
|
12496
12498
|
const w = () => {
|
|
12497
12499
|
C(a.map((T) => T.value));
|
|
12498
|
-
},
|
|
12500
|
+
}, O = () => {
|
|
12499
12501
|
C([]);
|
|
12500
12502
|
}, C = (T) => {
|
|
12501
12503
|
const A = o.map((F) => T.includes(F.id) ? F.operation == "pendingRemove" ? {
|
|
@@ -12526,7 +12528,7 @@ const Rh = pt(Fh), _h = (e) => {
|
|
|
12526
12528
|
children: "Check all"
|
|
12527
12529
|
}
|
|
12528
12530
|
),
|
|
12529
|
-
/* @__PURE__ */ i(je, { onClick:
|
|
12531
|
+
/* @__PURE__ */ i(je, { onClick: O, disabled: s.length === 0, children: "Uncheck all" })
|
|
12530
12532
|
] })
|
|
12531
12533
|
] }) });
|
|
12532
12534
|
}, Dh = (e) => /* @__PURE__ */ i(Re, { ...e, children: /* @__PURE__ */ i(Eh, { ...e }) }), Eh = (e) => {
|
|
@@ -12739,7 +12741,7 @@ const Yh = (e) => {
|
|
|
12739
12741
|
icon: a(s)
|
|
12740
12742
|
}
|
|
12741
12743
|
);
|
|
12742
|
-
}, { Content: Zh } =
|
|
12744
|
+
}, { Content: Zh } = Oi, { Title: eg } = Rt;
|
|
12743
12745
|
function tg() {
|
|
12744
12746
|
const { t: e } = he();
|
|
12745
12747
|
return /* @__PURE__ */ i(Zh, { className: "m-5 select-none", children: /* @__PURE__ */ i(eg, { level: 5, children: e("welcome") }) });
|
|
@@ -12757,36 +12759,36 @@ function ng(e, t) {
|
|
|
12757
12759
|
retrieveAndOpenAction: m,
|
|
12758
12760
|
openShortcut: g
|
|
12759
12761
|
}));
|
|
12760
|
-
function p(
|
|
12761
|
-
if (
|
|
12762
|
-
const w = c.findIndex((
|
|
12762
|
+
function p(I) {
|
|
12763
|
+
if (I === r) {
|
|
12764
|
+
const w = c.findIndex((O) => O.key === I);
|
|
12763
12765
|
c[w - 1] && o(c[w - 1].key), c[w + 1] && o(c[w + 1].key);
|
|
12764
12766
|
}
|
|
12765
|
-
u(c.filter((w) => w.key !==
|
|
12767
|
+
u(c.filter((w) => w.key !== I)), f.current.delete(I);
|
|
12766
12768
|
}
|
|
12767
12769
|
function h({
|
|
12768
|
-
tabKey:
|
|
12770
|
+
tabKey: I,
|
|
12769
12771
|
canWeClose: w
|
|
12770
12772
|
}) {
|
|
12771
|
-
f.current.set(
|
|
12773
|
+
f.current.set(I, w);
|
|
12772
12774
|
}
|
|
12773
12775
|
async function m({
|
|
12774
|
-
action:
|
|
12776
|
+
action: I,
|
|
12775
12777
|
values: w,
|
|
12776
|
-
forced_values:
|
|
12778
|
+
forced_values: O,
|
|
12777
12779
|
initialViewType: C,
|
|
12778
12780
|
res_id: T,
|
|
12779
12781
|
domain: A = []
|
|
12780
12782
|
}) {
|
|
12781
12783
|
const D = await P.getHandler().getActionData({
|
|
12782
|
-
action:
|
|
12784
|
+
action: I,
|
|
12783
12785
|
context: l
|
|
12784
12786
|
});
|
|
12785
12787
|
if (D.type === "ir.actions.wizard") {
|
|
12786
12788
|
it("Action type not supported");
|
|
12787
12789
|
return;
|
|
12788
12790
|
}
|
|
12789
|
-
const [F, _] =
|
|
12791
|
+
const [F, _] = I.split(","), $ = parseInt(_), R = Et({
|
|
12790
12792
|
context: D.context,
|
|
12791
12793
|
values: a,
|
|
12792
12794
|
fields: {}
|
|
@@ -12839,34 +12841,34 @@ function ng(e, t) {
|
|
|
12839
12841
|
action_type: F,
|
|
12840
12842
|
action_id: $,
|
|
12841
12843
|
values: w,
|
|
12842
|
-
forced_values:
|
|
12844
|
+
forced_values: O,
|
|
12843
12845
|
res_id: T,
|
|
12844
12846
|
treeExpandable: ie,
|
|
12845
12847
|
limit: te
|
|
12846
12848
|
});
|
|
12847
12849
|
}
|
|
12848
12850
|
function y({
|
|
12849
|
-
title:
|
|
12851
|
+
title: I,
|
|
12850
12852
|
content: w,
|
|
12851
|
-
key:
|
|
12853
|
+
key: O,
|
|
12852
12854
|
action: C
|
|
12853
12855
|
}) {
|
|
12854
12856
|
let T = [...c];
|
|
12855
12857
|
c.length === 1 && c[0].key === "welcome" && (T = [...c.filter((A) => A.key !== "welcome")]), u([
|
|
12856
12858
|
...T,
|
|
12857
12859
|
{
|
|
12858
|
-
title:
|
|
12859
|
-
key:
|
|
12860
|
+
title: I,
|
|
12861
|
+
key: O,
|
|
12860
12862
|
closable: !0,
|
|
12861
12863
|
content: w,
|
|
12862
12864
|
action: C
|
|
12863
12865
|
}
|
|
12864
|
-
]), o(
|
|
12866
|
+
]), o(O);
|
|
12865
12867
|
}
|
|
12866
12868
|
async function v({
|
|
12867
|
-
relateData:
|
|
12869
|
+
relateData: I,
|
|
12868
12870
|
fields: w,
|
|
12869
|
-
values:
|
|
12871
|
+
values: O,
|
|
12870
12872
|
action_id: C,
|
|
12871
12873
|
action_type: T
|
|
12872
12874
|
}) {
|
|
@@ -12878,15 +12880,15 @@ function ng(e, t) {
|
|
|
12878
12880
|
target: $,
|
|
12879
12881
|
string: R,
|
|
12880
12882
|
limit: G
|
|
12881
|
-
} =
|
|
12883
|
+
} = I, [W, L] = _[0], N = { id: W, type: L }, k = Et({
|
|
12882
12884
|
context: D,
|
|
12883
|
-
values: { ...
|
|
12885
|
+
values: { ...O, ...a },
|
|
12884
12886
|
fields: w
|
|
12885
12887
|
}), X = F ? await P.getHandler().evalDomain({
|
|
12886
12888
|
domain: F,
|
|
12887
12889
|
values: Lt({
|
|
12888
12890
|
fields: w,
|
|
12889
|
-
values: { ...
|
|
12891
|
+
values: { ...O, ...a }
|
|
12890
12892
|
}),
|
|
12891
12893
|
fields: w,
|
|
12892
12894
|
context: { ...l, ...k }
|
|
@@ -12904,15 +12906,15 @@ function ng(e, t) {
|
|
|
12904
12906
|
limit: G
|
|
12905
12907
|
});
|
|
12906
12908
|
}
|
|
12907
|
-
async function g(
|
|
12909
|
+
async function g(I) {
|
|
12908
12910
|
const {
|
|
12909
12911
|
action_id: w,
|
|
12910
|
-
action_type:
|
|
12912
|
+
action_type: O,
|
|
12911
12913
|
res_id: C,
|
|
12912
12914
|
view_id: T,
|
|
12913
12915
|
overrideUnsettedLimit: A = !1,
|
|
12914
12916
|
values: D = {}
|
|
12915
|
-
} =
|
|
12917
|
+
} = I, F = `${O},${w}`, _ = await P.getHandler().getActionData({
|
|
12916
12918
|
action: F,
|
|
12917
12919
|
context: l
|
|
12918
12920
|
}), $ = Et({
|
|
@@ -12963,34 +12965,34 @@ function ng(e, t) {
|
|
|
12963
12965
|
target: N,
|
|
12964
12966
|
initialView: ee,
|
|
12965
12967
|
action_id: w,
|
|
12966
|
-
action_type:
|
|
12968
|
+
action_type: O,
|
|
12967
12969
|
res_id: C,
|
|
12968
12970
|
treeExpandable: te,
|
|
12969
12971
|
limit: A && (X === 0 || X === !1) ? $t : X
|
|
12970
12972
|
});
|
|
12971
12973
|
}
|
|
12972
12974
|
async function b({
|
|
12973
|
-
model:
|
|
12975
|
+
model: I,
|
|
12974
12976
|
values: w,
|
|
12975
|
-
forced_values:
|
|
12977
|
+
forced_values: O,
|
|
12976
12978
|
initialViewType: C,
|
|
12977
12979
|
res_id: T,
|
|
12978
12980
|
domain: A
|
|
12979
12981
|
}) {
|
|
12980
|
-
const D = await P.getHandler().getActionStringForModel(
|
|
12982
|
+
const D = await P.getHandler().getActionStringForModel(I);
|
|
12981
12983
|
await m({
|
|
12982
12984
|
action: D,
|
|
12983
12985
|
values: w,
|
|
12984
|
-
forced_values:
|
|
12986
|
+
forced_values: O,
|
|
12985
12987
|
initialViewType: C,
|
|
12986
12988
|
res_id: T,
|
|
12987
12989
|
domain: A
|
|
12988
12990
|
});
|
|
12989
12991
|
}
|
|
12990
12992
|
async function x({
|
|
12991
|
-
domain:
|
|
12993
|
+
domain: I,
|
|
12992
12994
|
context: w,
|
|
12993
|
-
model:
|
|
12995
|
+
model: O,
|
|
12994
12996
|
views: C,
|
|
12995
12997
|
title: T,
|
|
12996
12998
|
target: A,
|
|
@@ -13006,14 +13008,14 @@ function ng(e, t) {
|
|
|
13006
13008
|
const N = Xr();
|
|
13007
13009
|
if (A !== "current") {
|
|
13008
13010
|
const k = await P.getHandler().getView({
|
|
13009
|
-
model:
|
|
13011
|
+
model: O,
|
|
13010
13012
|
type: "form",
|
|
13011
13013
|
id: D.type === "form" ? D.id : void 0,
|
|
13012
13014
|
context: { ...l, ...w }
|
|
13013
13015
|
});
|
|
13014
13016
|
d.current.openActionModal({
|
|
13015
|
-
domain:
|
|
13016
|
-
model:
|
|
13017
|
+
domain: I,
|
|
13018
|
+
model: O,
|
|
13017
13019
|
formView: k,
|
|
13018
13020
|
context: { ...l, ...w },
|
|
13019
13021
|
actionData: {
|
|
@@ -13039,9 +13041,9 @@ function ng(e, t) {
|
|
|
13039
13041
|
tabKey: N,
|
|
13040
13042
|
title: T,
|
|
13041
13043
|
views: C,
|
|
13042
|
-
model:
|
|
13044
|
+
model: O,
|
|
13043
13045
|
context: { ...l, ...w },
|
|
13044
|
-
domain:
|
|
13046
|
+
domain: I,
|
|
13045
13047
|
setCanWeClose: h,
|
|
13046
13048
|
initialView: k,
|
|
13047
13049
|
res_id: $,
|
|
@@ -13064,12 +13066,12 @@ function ng(e, t) {
|
|
|
13064
13066
|
openDefaultActionForModel: b,
|
|
13065
13067
|
tabs: c,
|
|
13066
13068
|
activeKey: r,
|
|
13067
|
-
onRemoveTab: async (
|
|
13068
|
-
const w = f.current.get(
|
|
13069
|
-
(await (w == null ? void 0 : w()) || r === "welcome") && p(
|
|
13069
|
+
onRemoveTab: async (I) => {
|
|
13070
|
+
const w = f.current.get(I);
|
|
13071
|
+
(await (w == null ? void 0 : w()) || r === "welcome") && p(I);
|
|
13070
13072
|
},
|
|
13071
|
-
onChangeTab: (
|
|
13072
|
-
o(
|
|
13073
|
+
onChangeTab: (I) => {
|
|
13074
|
+
o(I);
|
|
13073
13075
|
},
|
|
13074
13076
|
children: /* @__PURE__ */ i(
|
|
13075
13077
|
Dd,
|
|
@@ -13201,7 +13203,7 @@ const { useToken: ag } = Ge, iy = (e) => {
|
|
|
13201
13203
|
currentView: g,
|
|
13202
13204
|
currentId: b,
|
|
13203
13205
|
openDefaultActionForModel: x
|
|
13204
|
-
} = h || {},
|
|
13206
|
+
} = h || {}, I = ye(() => {
|
|
13205
13207
|
if (!g || !g.view_id || !g.extra)
|
|
13206
13208
|
return;
|
|
13207
13209
|
const { action_id: F, action_type: _ } = g.extra || {};
|
|
@@ -13218,22 +13220,22 @@ const { useToken: ag } = Ge, iy = (e) => {
|
|
|
13218
13220
|
res_id: R
|
|
13219
13221
|
};
|
|
13220
13222
|
}, [b, g]), w = ye(() => {
|
|
13221
|
-
if (
|
|
13222
|
-
return JSON.stringify(
|
|
13223
|
-
}, [
|
|
13223
|
+
if (I)
|
|
13224
|
+
return JSON.stringify(I);
|
|
13225
|
+
}, [I]);
|
|
13224
13226
|
de(() => {
|
|
13225
13227
|
C();
|
|
13226
13228
|
}, [w]);
|
|
13227
|
-
function
|
|
13229
|
+
function O(F) {
|
|
13228
13230
|
const _ = F;
|
|
13229
13231
|
(_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && m(_);
|
|
13230
13232
|
}
|
|
13231
13233
|
const C = B(async () => {
|
|
13232
|
-
if (!
|
|
13234
|
+
if (!I)
|
|
13233
13235
|
return;
|
|
13234
|
-
const F = await n(
|
|
13236
|
+
const F = await n(I);
|
|
13235
13237
|
F !== !1 && u(F), l(F !== !1);
|
|
13236
|
-
}, [
|
|
13238
|
+
}, [I, n]);
|
|
13237
13239
|
async function T() {
|
|
13238
13240
|
var F;
|
|
13239
13241
|
(F = p == null ? void 0 : p.current) == null || F.close(), x == null || x({ model: "ir.ui.view_sc" });
|
|
@@ -13292,7 +13294,7 @@ const { useToken: ag } = Ge, iy = (e) => {
|
|
|
13292
13294
|
ref: p,
|
|
13293
13295
|
isFavourite: a,
|
|
13294
13296
|
onToggleFavourite: D,
|
|
13295
|
-
onItemClick:
|
|
13297
|
+
onItemClick: O,
|
|
13296
13298
|
placement: "bottomRight",
|
|
13297
13299
|
header: /* @__PURE__ */ E("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
|
|
13298
13300
|
/* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
|