@gisce/react-ooui 2.3.2-rc.1 → 2.3.2-rc.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 +79 -79
- package/dist/react-ooui.es.js.map +1 -1
- package/package.json +1 -1
package/dist/react-ooui.es.js
CHANGED
|
@@ -3,12 +3,12 @@ var Jo = (e, t, n) => t in e ? zo(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var ar = (e, t, n) => (Jo(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsxs as k, jsx as r, Fragment as X } from "react/jsx-runtime";
|
|
5
5
|
import rt, { useContext as te, useState as b, useEffect as ge, useRef as ae, createContext as Xo, forwardRef as pt, useImperativeHandle as gt, useCallback as fe, Fragment as Ar, useMemo as De, memo as Dr } from "react";
|
|
6
|
-
import { Tooltip as ht, theme as He, Typography as Ut, Form as at, Row as _e, Col as de, Modal as ze, Button as Ne, Dropdown as Qo, Menu as lr, Spin as Le, Divider as cn, Space as Ue, Input as it, Select as
|
|
6
|
+
import { Tooltip as ht, theme as He, Typography as Ut, Form as at, Row as _e, Col as de, Modal as ze, Button as Ne, Dropdown as Qo, Menu as lr, Spin as Le, Divider as cn, Space as Ue, Input as it, Select as xt, Checkbox as Ht, Alert as Xe, Timeline as _n, Statistic as Zo, Card as Pn, Tag as kr, message as xn, DatePicker as Ln, TimePicker as ei, InputNumber as Er, Progress as ti, Avatar as Nr, Pagination as ni, Badge as ri, Tabs as Mr, Popover as oi, Radio as cr, Switch as ii, Steps as dr, Layout as si } from "antd";
|
|
7
7
|
import { Label as Dt, Field as On, Tree as Pr, Reference as ai, Selection as $n, Many2one as Lr, Boolean as li, Container as ci, parseContext as bt, Form as $r, Integer as In, SearchFieldTypes as mt, SearchFilter as di, parseContextFields as ui, parseDomainFields as fi, transformDomainForChildWidget as Br, graphProcessor as Hr, parseGraph as Bn, graphFieldUtils as mi } from "@gisce/ooui";
|
|
8
8
|
import * as ur from "@ant-design/icons";
|
|
9
9
|
import Kr, { QuestionCircleOutlined as jr, ExclamationCircleOutlined as yt, LoadingOutlined as st, DownOutlined as dn, WarningOutlined as Wr, CloseOutlined as Yt, CheckOutlined as Gt, TranslationOutlined as Ur, FolderOpenOutlined as Hn, DownloadOutlined as Kn, ClearOutlined as jn, StarFilled as hi, StarOutlined as pi, UpOutlined as gi, SearchOutlined as Wn, ThunderboltOutlined as Un, PrinterOutlined as Yn, EnterOutlined as Yr, PlusSquareOutlined as yi, MinusSquareOutlined as wi, FileAddOutlined as un, AlignLeftOutlined as vi, ApiOutlined as bi, DeleteOutlined as Gn, LeftOutlined as Gr, RightOutlined as qr, EyeOutlined as Ci, FormOutlined as Kt, TableOutlined as qn, AreaChartOutlined as xi, CalendarOutlined as Si, LinkOutlined as zr, SaveOutlined as Ti, CopyOutlined as zn, InfoCircleOutlined as Jr, ReloadOutlined as fn, EditOutlined as Xr, FilterOutlined as Qr, CloseCircleFilled as Fi, BorderOuterOutlined as Ri, SettingOutlined as _i, ExportOutlined as Oi } from "@ant-design/icons";
|
|
10
10
|
import { Interweave as Jn } from "interweave";
|
|
11
|
-
import { useLocale as ye, Many2OneSuffix as Ii, Many2OneSuffixModal as fr, FieldSet as Vi, ExportModal as Ai, Dropdown as Di, DropdownButton as
|
|
11
|
+
import { useLocale as ye, Many2OneSuffix as Ii, Many2OneSuffixModal as fr, FieldSet as Vi, ExportModal as Ai, Dropdown as Di, DropdownButton as Ot, FormigaConfigProvider as ki, mergeStrings as Ei, FavouriteButton as Ni } from "@gisce/react-formiga-components";
|
|
12
12
|
import * as mr from "@tabler/icons-react";
|
|
13
13
|
import Mi from "antd/lib/input/TextArea";
|
|
14
14
|
import kt from "styled-components";
|
|
@@ -26,7 +26,7 @@ import Ui from "dayjs/plugin/duration";
|
|
|
26
26
|
import Yi from "dayjs/plugin/relativeTime";
|
|
27
27
|
import Gi from "dayjs/plugin/weekday";
|
|
28
28
|
import qi from "dayjs/plugin/localeData";
|
|
29
|
-
import
|
|
29
|
+
import St from "use-deep-compare-effect";
|
|
30
30
|
import { Table as zi } from "@gisce/react-formiga-table";
|
|
31
31
|
import Ji from "antd/es/typography/Link";
|
|
32
32
|
import { fileTypeFromBuffer as Xi } from "file-type-buffer-browser";
|
|
@@ -482,18 +482,18 @@ function hn() {
|
|
|
482
482
|
height: e.height
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const _t = class _t {
|
|
486
486
|
static init(t) {
|
|
487
|
-
|
|
487
|
+
_t.handler = t;
|
|
488
488
|
}
|
|
489
489
|
static getHandler() {
|
|
490
|
-
if (!
|
|
490
|
+
if (!_t.handler)
|
|
491
491
|
throw "Must call init() first with a valid ConnectionProvider instance";
|
|
492
|
-
return
|
|
492
|
+
return _t.handler;
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
|
-
ar(
|
|
496
|
-
let E =
|
|
495
|
+
ar(_t, "handler");
|
|
496
|
+
let E = _t;
|
|
497
497
|
const to = (e) => {
|
|
498
498
|
let t, n, i;
|
|
499
499
|
if (typeof e == "string" && e.indexOf(" -- ") !== -1 && e.indexOf(`
|
|
@@ -749,7 +749,7 @@ const { info: xs } = ze, ft = (e) => {
|
|
|
749
749
|
}
|
|
750
750
|
) })
|
|
751
751
|
] }) });
|
|
752
|
-
}, { defaultAlgorithm: Fs, defaultSeed: Rs } = He, _s = Fs(Rs), { Option: Os } =
|
|
752
|
+
}, { defaultAlgorithm: Fs, defaultSeed: Rs } = He, _s = Fs(Rs), { Option: Os } = xt, oo = (e) => {
|
|
753
753
|
const { ooui: t } = e, { required: n } = t;
|
|
754
754
|
return /* @__PURE__ */ r(xe, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(io, { ...e }) });
|
|
755
755
|
}, io = (e) => {
|
|
@@ -758,7 +758,7 @@ const { info: xs } = ze, ft = (e) => {
|
|
|
758
758
|
return /* @__PURE__ */ r(Os, { value: c, children: m }, c);
|
|
759
759
|
});
|
|
760
760
|
return /* @__PURE__ */ r(
|
|
761
|
-
a && !s ? Is :
|
|
761
|
+
a && !s ? Is : xt,
|
|
762
762
|
{
|
|
763
763
|
disabled: s,
|
|
764
764
|
onChange: n,
|
|
@@ -769,7 +769,7 @@ const { info: xs } = ze, ft = (e) => {
|
|
|
769
769
|
children: d
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
|
-
}, Is = kt(
|
|
772
|
+
}, Is = kt(xt)`
|
|
773
773
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
774
774
|
background-color: ${_s.colorPrimaryBg};
|
|
775
775
|
}
|
|
@@ -792,7 +792,7 @@ function Ns(e) {
|
|
|
792
792
|
const n = Buffer.from(e, "base64").length / 1e3;
|
|
793
793
|
return `${Math.round((n + Number.EPSILON) * 100) / 100} KB`;
|
|
794
794
|
}
|
|
795
|
-
async function
|
|
795
|
+
async function At(e) {
|
|
796
796
|
const t = await Xi(
|
|
797
797
|
Buffer.from(e, "base64")
|
|
798
798
|
);
|
|
@@ -820,7 +820,7 @@ const Ms = (e) => {
|
|
|
820
820
|
i == null || i(c);
|
|
821
821
|
};
|
|
822
822
|
async function d() {
|
|
823
|
-
const c = await
|
|
823
|
+
const c = await At(n), m = `data:${c == null ? void 0 : c.mime};base64,${n}`, p = document.createElement("a");
|
|
824
824
|
p.href = m, p.download = `image.${c == null ? void 0 : c.ext}`, p.click();
|
|
825
825
|
}
|
|
826
826
|
async function u(c) {
|
|
@@ -905,7 +905,7 @@ const Ms = (e) => {
|
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
);
|
|
908
|
-
},
|
|
908
|
+
}, It = (e) => {
|
|
909
909
|
const t = e.arch, n = e.fields, i = new Pr(n);
|
|
910
910
|
return i.parse(t), i;
|
|
911
911
|
};
|
|
@@ -963,7 +963,7 @@ function lo(e, t) {
|
|
|
963
963
|
n[i.id] = i[t];
|
|
964
964
|
}), n;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Vt({
|
|
967
967
|
resultsToSort: e,
|
|
968
968
|
sorter: t,
|
|
969
969
|
fields: n
|
|
@@ -1000,7 +1000,7 @@ const Zn = async (e) => {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
let f = [], c;
|
|
1002
1002
|
if (a === "tree" && (o != null && o.arch)) {
|
|
1003
|
-
const g = (h =
|
|
1003
|
+
const g = (h = It(o)) == null ? void 0 : h.colors, y = await E.getHandler().readEvalUiObjects({
|
|
1004
1004
|
model: n,
|
|
1005
1005
|
ids: d,
|
|
1006
1006
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1048,7 +1048,7 @@ const Zn = async (e) => {
|
|
|
1048
1048
|
}), n;
|
|
1049
1049
|
}, Us = (e) => {
|
|
1050
1050
|
const { ooui: t } = e, { relation: n, context: i, views: o } = t, [s, a] = b(!0), [l, d] = b(), [u, f] = b(/* @__PURE__ */ new Map()), c = te(Be), { getContext: m } = c || {};
|
|
1051
|
-
|
|
1051
|
+
St(() => {
|
|
1052
1052
|
h();
|
|
1053
1053
|
}, [t]);
|
|
1054
1054
|
const p = async (g) => o && o[g] ? o[g] : await E.getHandler().getView({
|
|
@@ -1069,7 +1069,7 @@ const Zn = async (e) => {
|
|
|
1069
1069
|
return s ? /* @__PURE__ */ r(Le, {}) : l ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ r(xe, { type: "array", ...e, children: /* @__PURE__ */ r(Ys, { ooui: t, views: u }) });
|
|
1070
1070
|
}, Ys = (e) => {
|
|
1071
1071
|
const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = b(!1), [d, u] = b(), [f, c] = b(!1), [m, p] = b(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: x } = i, S = s.filter((F) => F.values), C = te(Be), { getContext: R } = C || {};
|
|
1072
|
-
|
|
1072
|
+
St(() => {
|
|
1073
1073
|
D();
|
|
1074
1074
|
}, [s]);
|
|
1075
1075
|
const V = (F) => {
|
|
@@ -1199,7 +1199,7 @@ const Zn = async (e) => {
|
|
|
1199
1199
|
} else
|
|
1200
1200
|
n[i] = e[i];
|
|
1201
1201
|
}), n;
|
|
1202
|
-
},
|
|
1202
|
+
}, Rt = (e, t) => Js(e, t), Sn = ({
|
|
1203
1203
|
source: e,
|
|
1204
1204
|
target: t,
|
|
1205
1205
|
fields: n
|
|
@@ -1337,7 +1337,7 @@ const Et = ({
|
|
|
1337
1337
|
return /* @__PURE__ */ r(xe, { type: "array", ...e, children: /* @__PURE__ */ r(oa, { ooui: t }) });
|
|
1338
1338
|
}, oa = (e) => {
|
|
1339
1339
|
const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: g } = n, y = te(Be), { getContext: w } = y || {};
|
|
1340
|
-
|
|
1340
|
+
St(() => {
|
|
1341
1341
|
S();
|
|
1342
1342
|
}, [o]);
|
|
1343
1343
|
const x = (V) => {
|
|
@@ -1403,7 +1403,7 @@ const Et = ({
|
|
|
1403
1403
|
);
|
|
1404
1404
|
};
|
|
1405
1405
|
return d ? /* @__PURE__ */ r(Xe, { className: "mt-10", message: d, type: "error", banner: !0 }) : /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r("div", { className: "flex flex-row", children: /* @__PURE__ */ r(
|
|
1406
|
-
|
|
1406
|
+
xt,
|
|
1407
1407
|
{
|
|
1408
1408
|
mode: "multiple",
|
|
1409
1409
|
value: a.length ? s : [],
|
|
@@ -1621,7 +1621,7 @@ const Et = ({
|
|
|
1621
1621
|
children: t
|
|
1622
1622
|
}
|
|
1623
1623
|
);
|
|
1624
|
-
},
|
|
1624
|
+
}, Ct = 80, ot = Xo(
|
|
1625
1625
|
null
|
|
1626
1626
|
), wa = (e) => {
|
|
1627
1627
|
const {
|
|
@@ -1651,12 +1651,12 @@ const Et = ({
|
|
|
1651
1651
|
goToResourceId: F,
|
|
1652
1652
|
limit: T
|
|
1653
1653
|
} = e, [O, v] = b(!1), [_, A] = b(!1), [L, G] = b(!1), [B, q] = b(!0), [P, Z] = b(!0), [ee, oe] = b([]), [U, $] = b(!1), [I, N] = b([]), [K, le] = b(!1), [z, ne] = b(!0), [ve, W] = b(), [ce, Te] = b({}), [Me, Ee] = b(
|
|
1654
|
-
T !== void 0 ? T :
|
|
1654
|
+
T !== void 0 ? T : Ct
|
|
1655
1655
|
), [Pe, me] = b(i);
|
|
1656
1656
|
ge(() => {
|
|
1657
1657
|
m && m.length > 0 && !p && (h == null || h(0), f == null || f(m[0].id));
|
|
1658
1658
|
}, [m]), ge(() => {
|
|
1659
|
-
Ee(T !== void 0 ? T :
|
|
1659
|
+
Ee(T !== void 0 ? T : Ct);
|
|
1660
1660
|
}, [T]), ge(() => {
|
|
1661
1661
|
s.length === 1 ? W(s[0]) : s.length > 1 && W(
|
|
1662
1662
|
s.filter(
|
|
@@ -1820,7 +1820,7 @@ const Et = ({
|
|
|
1820
1820
|
id: D
|
|
1821
1821
|
}), F.state && s.current === !0) {
|
|
1822
1822
|
s.current = !1, clearInterval(o.current), l(!1);
|
|
1823
|
-
const T = await
|
|
1823
|
+
const T = await At(F.result);
|
|
1824
1824
|
pn(F.result, T.mime);
|
|
1825
1825
|
}
|
|
1826
1826
|
} catch (T) {
|
|
@@ -2197,11 +2197,11 @@ function Fa(e, t) {
|
|
|
2197
2197
|
})
|
|
2198
2198
|
).length !== 0, Ye = (M) => {
|
|
2199
2199
|
const H = G.getFieldsValue(!0);
|
|
2200
|
-
return
|
|
2200
|
+
return Rt(H, M);
|
|
2201
2201
|
}, wt = (M, H) => {
|
|
2202
2202
|
$t({
|
|
2203
2203
|
values: {
|
|
2204
|
-
...
|
|
2204
|
+
...Rt(G.getFieldsValue(!0), P),
|
|
2205
2205
|
[M]: H
|
|
2206
2206
|
},
|
|
2207
2207
|
fields: P,
|
|
@@ -2233,7 +2233,7 @@ function Fa(e, t) {
|
|
|
2233
2233
|
se == null || se(!0), _(void 0), M != null && M.fields ? (J = M.fields, Q = M.arch) : (J = P, Q = B), p && (M == null ? void 0 : M.forceRefresh) !== !0 ? H = p : { values: H, defaultGetCalled: be } = await No({
|
|
2234
2234
|
fields: J,
|
|
2235
2235
|
arch: Q
|
|
2236
|
-
}), x && (H = { ...Zs(x), ...H }), K.current =
|
|
2236
|
+
}), x && (H = { ...Zs(x), ...H }), K.current = Rt(H, J), $t({
|
|
2237
2237
|
values: H,
|
|
2238
2238
|
fields: J,
|
|
2239
2239
|
reset: !0,
|
|
@@ -2268,7 +2268,7 @@ function Fa(e, t) {
|
|
|
2268
2268
|
reset: J,
|
|
2269
2269
|
isDefaultGet: Q = !1
|
|
2270
2270
|
}) => {
|
|
2271
|
-
const nt = { ...J ? {} : G.getFieldsValue(!0), ...M }, bn =
|
|
2271
|
+
const nt = { ...J ? {} : G.getFieldsValue(!0), ...M }, bn = Rt(nt, H), Go = Object.keys(H).map((Cn) => {
|
|
2272
2272
|
const qo = bn[Cn] !== void 0 ? bn[Cn] : void 0;
|
|
2273
2273
|
return {
|
|
2274
2274
|
name: Cn,
|
|
@@ -2406,7 +2406,7 @@ function Fa(e, t) {
|
|
|
2406
2406
|
"many2one"
|
|
2407
2407
|
]
|
|
2408
2408
|
}) && M !== !0)) {
|
|
2409
|
-
const Q =
|
|
2409
|
+
const Q = Rt(G.getFieldsValue(!0), P);
|
|
2410
2410
|
le.current = Q, d == null || d(Q), Fe == null || Fe(!0), Lo(J);
|
|
2411
2411
|
}
|
|
2412
2412
|
}, Po = Pi(wn, 100), Lo = async (M) => {
|
|
@@ -2896,7 +2896,7 @@ function Aa(e) {
|
|
|
2896
2896
|
] })
|
|
2897
2897
|
] });
|
|
2898
2898
|
}
|
|
2899
|
-
const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na } =
|
|
2899
|
+
const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na } = xt, Ma = (e) => {
|
|
2900
2900
|
const { ooui: t } = e, { required: n } = t;
|
|
2901
2901
|
return /* @__PURE__ */ r(xe, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(Pa, { ...e }) });
|
|
2902
2902
|
}, Pa = (e) => {
|
|
@@ -2906,7 +2906,7 @@ const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na
|
|
|
2906
2906
|
}).map((c) => {
|
|
2907
2907
|
const [m, p] = c;
|
|
2908
2908
|
return /* @__PURE__ */ r(Na, { value: p, children: p }, m);
|
|
2909
|
-
}), u = a && !s ? La :
|
|
2909
|
+
}), u = a && !s ? La : xt;
|
|
2910
2910
|
function f(c) {
|
|
2911
2911
|
const m = c.map((p) => {
|
|
2912
2912
|
const h = l.find(([g, y]) => p === y);
|
|
@@ -2929,7 +2929,7 @@ const { defaultAlgorithm: Da, defaultSeed: ka } = He, Ea = Da(ka), { Option: Na
|
|
|
2929
2929
|
children: d
|
|
2930
2930
|
}
|
|
2931
2931
|
);
|
|
2932
|
-
}, La = kt(
|
|
2932
|
+
}, La = kt(xt)`
|
|
2933
2933
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
2934
2934
|
background-color: ${Ea.colorPrimaryBg};
|
|
2935
2935
|
}
|
|
@@ -3107,7 +3107,7 @@ function ho(e) {
|
|
|
3107
3107
|
const O = x ? y : h, v = O == null ? void 0 : O.rows;
|
|
3108
3108
|
return v == null ? void 0 : v.map((_, A) => /* @__PURE__ */ r(_e, { children: _.map((L, G) => /* @__PURE__ */ r(de, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ r($a, { field: L }) }, G)) }, A));
|
|
3109
3109
|
};
|
|
3110
|
-
|
|
3110
|
+
St(() => {
|
|
3111
3111
|
S(!1), C.current = new di(n, t), C.current.parse(), g(C.current._simpleSearchContainer), w(C.current._advancedSearchContainer);
|
|
3112
3112
|
}, [t, n]);
|
|
3113
3113
|
const F = D(), T = (O) => {
|
|
@@ -3407,7 +3407,7 @@ const tl = (e) => /* @__PURE__ */ r(xe, { ...e, children: /* @__PURE__ */ r(go,
|
|
|
3407
3407
|
ids: [t],
|
|
3408
3408
|
fieldsToRetrieve: C,
|
|
3409
3409
|
context: i
|
|
3410
|
-
})) == null ? void 0 : V[0] }), R = { ...
|
|
3410
|
+
})) == null ? void 0 : V[0] }), R = { ...Rt(R, C), active_id: t }, l(R), !(!S || !S.toolbar))
|
|
3411
3411
|
return {
|
|
3412
3412
|
actionItems: S.toolbar.action,
|
|
3413
3413
|
relateItems: S.toolbar.relate,
|
|
@@ -3759,7 +3759,7 @@ const al = (e) => {
|
|
|
3759
3759
|
(z = F.current) == null || z.unselectAll();
|
|
3760
3760
|
}
|
|
3761
3761
|
})), ge(() => {
|
|
3762
|
-
const z =
|
|
3762
|
+
const z = It(s);
|
|
3763
3763
|
A(z), z.string && q !== z.string && (P == null || P(z.string));
|
|
3764
3764
|
}, [s, q]), ge(() => {
|
|
3765
3765
|
if (!_)
|
|
@@ -3890,7 +3890,7 @@ const vo = (e) => {
|
|
|
3890
3890
|
searchParams: V = [],
|
|
3891
3891
|
setSearchValues: D,
|
|
3892
3892
|
clearSelection: F
|
|
3893
|
-
} = e, [T, O] = b(!1), [v, _] = b(!1), [A, L] = b(), [G, B] = b(1), [q, P] = b(0), [Z, ee] = b(), [oe, U] = b([]), [$, I] = b(void 0), [N, K] = b(void 0), le = ae(C), z = ae([]), ne = fe(
|
|
3893
|
+
} = e, [T, O] = b(!1), [v, _] = b(!1), [A, L] = b(), [G, B] = b(1), [q, P] = b(0), [Z, ee] = b(), [oe, U] = b([]), [$, I] = b(void 0), [N, K] = b(void 0), le = ae(C || Ct), z = ae([]), ne = fe(
|
|
3894
3894
|
(se) => {
|
|
3895
3895
|
y == null || y([...se]), U([...se]);
|
|
3896
3896
|
},
|
|
@@ -3904,7 +3904,7 @@ const vo = (e) => {
|
|
|
3904
3904
|
context: u
|
|
3905
3905
|
});
|
|
3906
3906
|
if (ee(se.length), f == null || f(se.length), se.length > 0) {
|
|
3907
|
-
const Oe = se.map((we) => we == null ? void 0 : we[0]), { colors: We, status: Ke } =
|
|
3907
|
+
const Oe = se.map((we) => we == null ? void 0 : we[0]), { colors: We, status: Ke } = It(c), j = {};
|
|
3908
3908
|
We && (j.colors = We), Ke && (j.status = Ke);
|
|
3909
3909
|
const he = await E.getHandler().readEvalUiObjects({
|
|
3910
3910
|
model: t,
|
|
@@ -3915,7 +3915,7 @@ const vo = (e) => {
|
|
|
3915
3915
|
attrs: j
|
|
3916
3916
|
}), ke = he[0];
|
|
3917
3917
|
z.current = [...ke], I(nn(he[1])), K(wr(he[1]));
|
|
3918
|
-
const ue = ke.map((we) => we.id), pe = p !== void 0 ?
|
|
3918
|
+
const ue = ke.map((we) => we.id), pe = p !== void 0 ? Vt({
|
|
3919
3919
|
resultsToSort: ke,
|
|
3920
3920
|
sorter: p,
|
|
3921
3921
|
fields: { ...c.fields, ...m.fields }
|
|
@@ -3938,7 +3938,7 @@ const vo = (e) => {
|
|
|
3938
3938
|
f
|
|
3939
3939
|
]), ce = fe(
|
|
3940
3940
|
async (se) => {
|
|
3941
|
-
const { params: Oe, newOffset: We } = se || {}, Ke = Wt(Oe || V, x), { colors: j, status: he } =
|
|
3941
|
+
const { params: Oe, newOffset: We } = se || {}, Ke = Wt(Oe || V, x), { colors: j, status: he } = It(c), ke = {};
|
|
3942
3942
|
j && (ke.colors = j), he && (ke.status = he);
|
|
3943
3943
|
const { totalItems: ue, results: pe, attrsEvaluated: we } = await E.getHandler().searchForTree({
|
|
3944
3944
|
params: Ke,
|
|
@@ -3950,7 +3950,7 @@ const vo = (e) => {
|
|
|
3950
3950
|
attrs: ke
|
|
3951
3951
|
});
|
|
3952
3952
|
I(nn(we)), K(wr(we)), z.current = [...pe];
|
|
3953
|
-
const ie = p !== void 0 ?
|
|
3953
|
+
const ie = p !== void 0 ? Vt({
|
|
3954
3954
|
resultsToSort: pe,
|
|
3955
3955
|
sorter: p,
|
|
3956
3956
|
fields: { ...c.fields, ...m.fields }
|
|
@@ -4005,7 +4005,7 @@ const vo = (e) => {
|
|
|
4005
4005
|
if (JSON.stringify(se) === JSON.stringify(p))
|
|
4006
4006
|
return;
|
|
4007
4007
|
h == null || h(se);
|
|
4008
|
-
const Oe = se !== void 0 ?
|
|
4008
|
+
const Oe = se !== void 0 ? Vt({
|
|
4009
4009
|
resultsToSort: ve(),
|
|
4010
4010
|
sorter: se,
|
|
4011
4011
|
fields: { ...c.fields, ...m.fields }
|
|
@@ -4044,7 +4044,7 @@ const vo = (e) => {
|
|
|
4044
4044
|
},
|
|
4045
4045
|
[O, C, P, B]
|
|
4046
4046
|
), me = fe(() => {
|
|
4047
|
-
T || (n == null || n(void 0), o == null || o([]), D == null || D({}), L(void 0), P(0), B(1), R == null || R(C ||
|
|
4047
|
+
T || (n == null || n(void 0), o == null || o([]), D == null || D({}), L(void 0), P(0), B(1), R == null || R(C || Ct));
|
|
4048
4048
|
}, [
|
|
4049
4049
|
T,
|
|
4050
4050
|
n,
|
|
@@ -4060,7 +4060,7 @@ const vo = (e) => {
|
|
|
4060
4060
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
4061
4061
|
context: u
|
|
4062
4062
|
});
|
|
4063
|
-
return ne([...ve(), ...We]), ao(
|
|
4063
|
+
return ne([...ve(), ...We]), ao(It(c), We);
|
|
4064
4064
|
},
|
|
4065
4065
|
[c, t, u, ve, ne]
|
|
4066
4066
|
), $e = fe(async () => await E.getHandler().searchAllIds({
|
|
@@ -4125,7 +4125,7 @@ function Tl(e, t) {
|
|
|
4125
4125
|
setTreeIsLoading: ce = void 0,
|
|
4126
4126
|
searchValues: Te = {},
|
|
4127
4127
|
setSearchValues: Me = void 0,
|
|
4128
|
-
limit: Ee =
|
|
4128
|
+
limit: Ee = Ct,
|
|
4129
4129
|
setLimit: Pe = void 0
|
|
4130
4130
|
} = (f ? q : {}) || {}, me = fe(
|
|
4131
4131
|
(Ve) => {
|
|
@@ -5199,7 +5199,7 @@ const jl = {
|
|
|
5199
5199
|
uninformedString: l("uninformed"),
|
|
5200
5200
|
manualIds: a
|
|
5201
5201
|
});
|
|
5202
|
-
if (
|
|
5202
|
+
if (St(() => {
|
|
5203
5203
|
p();
|
|
5204
5204
|
}, [o, t, s, i, n]), u)
|
|
5205
5205
|
return /* @__PURE__ */ r(Le, {});
|
|
@@ -5731,7 +5731,7 @@ const tc = (e) => {
|
|
|
5731
5731
|
}
|
|
5732
5732
|
);
|
|
5733
5733
|
let Y = [];
|
|
5734
|
-
if (ne.some((Ie) => Ie.treeValues) && (Y = P ?
|
|
5734
|
+
if (ne.some((Ie) => Ie.treeValues) && (Y = P ? Vt({
|
|
5735
5735
|
resultsToSort: ne.map((Ie) => Ie.treeValues),
|
|
5736
5736
|
sorter: P,
|
|
5737
5737
|
fields: {
|
|
@@ -5838,7 +5838,7 @@ const tc = (e) => {
|
|
|
5838
5838
|
const { ooui: t } = e, { mode: n, relation: i, views: o, required: s, context: a } = t;
|
|
5839
5839
|
let l;
|
|
5840
5840
|
const [d, u] = b(!0), [f, c] = b(), [m, p] = b(/* @__PURE__ */ new Map()), h = te(Be), { getContext: g } = h || {};
|
|
5841
|
-
|
|
5841
|
+
St(() => {
|
|
5842
5842
|
w();
|
|
5843
5843
|
}, [t]);
|
|
5844
5844
|
const y = async (S) => o && o[S] ? o[S] : await E.getHandler().getView({
|
|
@@ -6106,7 +6106,7 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6106
6106
|
format: y.exportType
|
|
6107
6107
|
});
|
|
6108
6108
|
s(), await new Promise((C) => setTimeout(C, 200));
|
|
6109
|
-
const S = await
|
|
6109
|
+
const S = await At(x);
|
|
6110
6110
|
pn(x, S.mime);
|
|
6111
6111
|
},
|
|
6112
6112
|
[i, n, e, o, t, s, d]
|
|
@@ -6429,11 +6429,11 @@ const { useToken: lc } = He, { TextArea: kn } = it, cc = (e) => {
|
|
|
6429
6429
|
i == null || i(S);
|
|
6430
6430
|
};
|
|
6431
6431
|
async function g() {
|
|
6432
|
-
const S = await
|
|
6432
|
+
const S = await At(n), C = `data:${S == null ? void 0 : S.mime};base64,${n}`, R = document.createElement("a"), V = c(a), D = c("name");
|
|
6433
6433
|
R.href = C, R.download = V || D, R.click();
|
|
6434
6434
|
}
|
|
6435
6435
|
async function y() {
|
|
6436
|
-
const S = await
|
|
6436
|
+
const S = await At(n);
|
|
6437
6437
|
pn(n, S.mime);
|
|
6438
6438
|
}
|
|
6439
6439
|
async function w(S) {
|
|
@@ -6829,7 +6829,7 @@ function Ec(e) {
|
|
|
6829
6829
|
}
|
|
6830
6830
|
if (m(!1), !!x)
|
|
6831
6831
|
if (x.datas) {
|
|
6832
|
-
const S = await
|
|
6832
|
+
const S = await At(x.datas);
|
|
6833
6833
|
pn(x.datas, S.mime);
|
|
6834
6834
|
} else
|
|
6835
6835
|
s(x);
|
|
@@ -6988,8 +6988,8 @@ function Nc({ toolbar: e }) {
|
|
|
6988
6988
|
return n ? /* @__PURE__ */ k(Ue, { wrap: !0, children: [
|
|
6989
6989
|
x && /* @__PURE__ */ k(X, { children: [
|
|
6990
6990
|
/* @__PURE__ */ r(Le, {}),
|
|
6991
|
-
|
|
6992
|
-
|
|
6991
|
+
Tt(),
|
|
6992
|
+
Tt()
|
|
6993
6993
|
] }),
|
|
6994
6994
|
/* @__PURE__ */ r(
|
|
6995
6995
|
Oo,
|
|
@@ -7027,7 +7027,7 @@ function Nc({ toolbar: e }) {
|
|
|
7027
7027
|
onClick: Z
|
|
7028
7028
|
}
|
|
7029
7029
|
),
|
|
7030
|
-
|
|
7030
|
+
Tt(),
|
|
7031
7031
|
/* @__PURE__ */ r(
|
|
7032
7032
|
Ge,
|
|
7033
7033
|
{
|
|
@@ -7054,7 +7054,7 @@ function Nc({ toolbar: e }) {
|
|
|
7054
7054
|
}
|
|
7055
7055
|
}
|
|
7056
7056
|
),
|
|
7057
|
-
|
|
7057
|
+
Tt(),
|
|
7058
7058
|
/* @__PURE__ */ r(
|
|
7059
7059
|
nr,
|
|
7060
7060
|
{
|
|
@@ -7068,7 +7068,7 @@ function Nc({ toolbar: e }) {
|
|
|
7068
7068
|
formHasChanges: s
|
|
7069
7069
|
}
|
|
7070
7070
|
),
|
|
7071
|
-
|
|
7071
|
+
Tt(),
|
|
7072
7072
|
/* @__PURE__ */ k(Ue, { children: [
|
|
7073
7073
|
/* @__PURE__ */ r(
|
|
7074
7074
|
Ge,
|
|
@@ -7095,9 +7095,9 @@ function Nc({ toolbar: e }) {
|
|
|
7095
7095
|
}
|
|
7096
7096
|
)
|
|
7097
7097
|
] }),
|
|
7098
|
-
|
|
7098
|
+
Tt(),
|
|
7099
7099
|
/* @__PURE__ */ r(
|
|
7100
|
-
|
|
7100
|
+
Ot,
|
|
7101
7101
|
{
|
|
7102
7102
|
icon: /* @__PURE__ */ r(Un, {}),
|
|
7103
7103
|
placement: "bottomRight",
|
|
@@ -7106,14 +7106,14 @@ function Nc({ toolbar: e }) {
|
|
|
7106
7106
|
{ label: T("actions"), items: e == null ? void 0 : e.action }
|
|
7107
7107
|
],
|
|
7108
7108
|
onItemClick: async (I) => {
|
|
7109
|
-
!I || !(await
|
|
7109
|
+
!I || !(await Ft({
|
|
7110
7110
|
onFormSave: o
|
|
7111
7111
|
})).succeed || $(I);
|
|
7112
7112
|
}
|
|
7113
7113
|
}
|
|
7114
7114
|
),
|
|
7115
7115
|
/* @__PURE__ */ r(
|
|
7116
|
-
|
|
7116
|
+
Ot,
|
|
7117
7117
|
{
|
|
7118
7118
|
icon: /* @__PURE__ */ r(Yn, {}),
|
|
7119
7119
|
disabled: U,
|
|
@@ -7124,7 +7124,7 @@ function Nc({ toolbar: e }) {
|
|
|
7124
7124
|
onItemClick: async (I) => {
|
|
7125
7125
|
if (!I)
|
|
7126
7126
|
return;
|
|
7127
|
-
const N = await
|
|
7127
|
+
const N = await Ft({
|
|
7128
7128
|
onFormSave: o
|
|
7129
7129
|
});
|
|
7130
7130
|
N.succeed && $({
|
|
@@ -7138,7 +7138,7 @@ function Nc({ toolbar: e }) {
|
|
|
7138
7138
|
}
|
|
7139
7139
|
),
|
|
7140
7140
|
/* @__PURE__ */ r(
|
|
7141
|
-
|
|
7141
|
+
Ot,
|
|
7142
7142
|
{
|
|
7143
7143
|
icon: /* @__PURE__ */ r(Yr, {}),
|
|
7144
7144
|
disabled: U,
|
|
@@ -7147,7 +7147,7 @@ function Nc({ toolbar: e }) {
|
|
|
7147
7147
|
{ label: T("related"), items: e == null ? void 0 : e.relate }
|
|
7148
7148
|
],
|
|
7149
7149
|
onItemClick: async (I) => {
|
|
7150
|
-
!I || !(await
|
|
7150
|
+
!I || !(await Ft({
|
|
7151
7151
|
onFormSave: o
|
|
7152
7152
|
})).succeed || A({
|
|
7153
7153
|
relateData: I,
|
|
@@ -7165,7 +7165,7 @@ function Nc({ toolbar: e }) {
|
|
|
7165
7165
|
disabled: U,
|
|
7166
7166
|
attachments: S,
|
|
7167
7167
|
onAddNewAttachment: async () => {
|
|
7168
|
-
const I = await
|
|
7168
|
+
const I = await Ft({
|
|
7169
7169
|
onFormSave: o
|
|
7170
7170
|
});
|
|
7171
7171
|
if (!I.succeed)
|
|
@@ -7177,7 +7177,7 @@ function Nc({ toolbar: e }) {
|
|
|
7177
7177
|
});
|
|
7178
7178
|
},
|
|
7179
7179
|
onListAllAttachments: async () => {
|
|
7180
|
-
const I = await
|
|
7180
|
+
const I = await Ft({
|
|
7181
7181
|
onFormSave: o
|
|
7182
7182
|
});
|
|
7183
7183
|
if (!I.succeed)
|
|
@@ -7189,7 +7189,7 @@ function Nc({ toolbar: e }) {
|
|
|
7189
7189
|
});
|
|
7190
7190
|
},
|
|
7191
7191
|
onViewAttachmentDetails: async (I) => {
|
|
7192
|
-
(await
|
|
7192
|
+
(await Ft({
|
|
7193
7193
|
onFormSave: o
|
|
7194
7194
|
})).succeed && L({
|
|
7195
7195
|
model: "ir.attachment",
|
|
@@ -7201,10 +7201,10 @@ function Nc({ toolbar: e }) {
|
|
|
7201
7201
|
)
|
|
7202
7202
|
] }) : null;
|
|
7203
7203
|
}
|
|
7204
|
-
function
|
|
7204
|
+
function Tt() {
|
|
7205
7205
|
return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
|
|
7206
7206
|
}
|
|
7207
|
-
async function
|
|
7207
|
+
async function Ft({
|
|
7208
7208
|
onFormSave: e
|
|
7209
7209
|
}) {
|
|
7210
7210
|
const t = await (e == null ? void 0 : e());
|
|
@@ -8240,7 +8240,7 @@ function ed(e) {
|
|
|
8240
8240
|
] }),
|
|
8241
8241
|
vt(),
|
|
8242
8242
|
/* @__PURE__ */ r(
|
|
8243
|
-
|
|
8243
|
+
Ot,
|
|
8244
8244
|
{
|
|
8245
8245
|
icon: /* @__PURE__ */ r(Un, {}),
|
|
8246
8246
|
placement: "bottomRight",
|
|
@@ -8254,7 +8254,7 @@ function ed(e) {
|
|
|
8254
8254
|
}
|
|
8255
8255
|
),
|
|
8256
8256
|
/* @__PURE__ */ r(
|
|
8257
|
-
|
|
8257
|
+
Ot,
|
|
8258
8258
|
{
|
|
8259
8259
|
icon: /* @__PURE__ */ r(Yn, {}),
|
|
8260
8260
|
placement: "bottomRight",
|
|
@@ -8276,7 +8276,7 @@ function ed(e) {
|
|
|
8276
8276
|
v && /* @__PURE__ */ k(X, { children: [
|
|
8277
8277
|
vt(),
|
|
8278
8278
|
/* @__PURE__ */ r(
|
|
8279
|
-
|
|
8279
|
+
Ot,
|
|
8280
8280
|
{
|
|
8281
8281
|
placement: "bottomRight",
|
|
8282
8282
|
icon: /* @__PURE__ */ r(
|
|
@@ -8979,10 +8979,10 @@ function hd(e) {
|
|
|
8979
8979
|
domain: s = [],
|
|
8980
8980
|
visible: a = !0,
|
|
8981
8981
|
parentContext: l = {}
|
|
8982
|
-
} = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [x, S] = b(1), [C, R] = b(0), V = ae(
|
|
8982
|
+
} = e, [d, u] = b(!1), [f, c] = b(!1), [m, p] = b(), [h, g] = b(), [y, w] = b(), [x, S] = b(1), [C, R] = b(0), V = ae(Ct), D = ae([]), [F, T] = b(0), [O, v] = b([]), [_, A] = b(void 0), [L, G] = b(), [B, q] = b(), [P, Z] = b(), [ee, oe] = b(!1), U = ae([]), $ = (W) => {
|
|
8983
8983
|
oe(!0), S(W), R((W - 1) * V.current);
|
|
8984
8984
|
}, I = async () => {
|
|
8985
|
-
const W = U.current.length > 0 ? U.current : s, ce = Wt(D.current, W), { colors: Te } =
|
|
8985
|
+
const W = U.current.length > 0 ? U.current : s, ce = Wt(D.current, W), { colors: Te } = It(h), { totalItems: Me, results: Ee, attrsEvaluated: Pe } = await E.getHandler().searchForTree({
|
|
8986
8986
|
params: ce,
|
|
8987
8987
|
limit: V.current,
|
|
8988
8988
|
offset: C,
|
|
@@ -8992,7 +8992,7 @@ function hd(e) {
|
|
|
8992
8992
|
attrs: Te && { colors: Te }
|
|
8993
8993
|
});
|
|
8994
8994
|
A(nn(Pe));
|
|
8995
|
-
const me =
|
|
8995
|
+
const me = Vt({
|
|
8996
8996
|
resultsToSort: Ee,
|
|
8997
8997
|
sorter: L,
|
|
8998
8998
|
fields: { ...h.fields, ...y.fields }
|
|
@@ -9069,7 +9069,7 @@ function hd(e) {
|
|
|
9069
9069
|
sorter: L,
|
|
9070
9070
|
onChangeSort: (W) => {
|
|
9071
9071
|
G == null || G(W);
|
|
9072
|
-
const ce =
|
|
9072
|
+
const ce = Vt({
|
|
9073
9073
|
resultsToSort: O,
|
|
9074
9074
|
sorter: W,
|
|
9075
9075
|
fields: { ...h.fields, ...y.fields }
|
|
@@ -9358,7 +9358,7 @@ const yd = pt(gd), wd = (e) => {
|
|
|
9358
9358
|
return /* @__PURE__ */ r(xe, { type: "array", ...e, children: /* @__PURE__ */ r(vd, { ooui: t }) });
|
|
9359
9359
|
}, vd = (e) => {
|
|
9360
9360
|
const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = b([]), [d, u] = b(), [f, c] = b(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = n, w = te(Be), { getContext: x } = w || {};
|
|
9361
|
-
|
|
9361
|
+
St(() => {
|
|
9362
9362
|
C();
|
|
9363
9363
|
}, [o]);
|
|
9364
9364
|
const S = (F) => {
|
|
@@ -9768,7 +9768,7 @@ function $d(e, t) {
|
|
|
9768
9768
|
action_type: V,
|
|
9769
9769
|
res_id: D,
|
|
9770
9770
|
treeExpandable: ee,
|
|
9771
|
-
limit: T && (Z === 0 || Z === !1) ?
|
|
9771
|
+
limit: T && (Z === 0 || Z === !1) ? Ct : Z
|
|
9772
9772
|
});
|
|
9773
9773
|
}
|
|
9774
9774
|
async function x({
|