@gisce/react-ooui 1.2.5 → 1.2.6-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/useSearch.d.ts.map +1 -1
- package/dist/react-ooui.es.js +72 -70
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +2 -2
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/views/SearchTree.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useSearch.ts +1 -0
- package/src/widgets/views/SearchTree.tsx +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["useSearch.ts"],"names":[],"mappings":"AAQA,OAAO,EAAsB,QAAQ,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE5D,aAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,GAAG,CAAC;IAC3B,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,uBAAuB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC9C,iBAAiB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,SAAS,SAAU,aAAa;;
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["useSearch.ts"],"names":[],"mappings":"AAQA,OAAO,EAAsB,QAAQ,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE5D,aAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,GAAG,CAAC;IAC3B,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,uBAAuB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC9C,iBAAiB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,SAAS,SAAU,aAAa;;gBAmQ/B,GAAG;eACJ,MAAM;gBACL,MAAM;sBACA,GAAG;;;;gBA7DK,GAAG;;;;;;;;;;8BAqGpB,MAAM;4BA7DD,GAAG;qCA0FA,GAAG;;;CAoCrB,CAAC"}
|
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import qe, { useContext as K, useState as x, useEffect as pe, useRef as me, useCallback as
|
|
2
|
-
import { Tooltip as ft, theme as Me, Typography as on, Form as it, Row as Ce, Col as ae, Modal as Ye, Button as Ie, Dropdown as Bt, Menu as $e, Spin as
|
|
1
|
+
import qe, { useContext as K, useState as x, useEffect as pe, useRef as me, useCallback as Re, forwardRef as yt, useImperativeHandle as vt } from "react";
|
|
2
|
+
import { Tooltip as ft, theme as Me, Typography as on, Form as it, Row as Ce, Col as ae, Modal as Ye, Button as Ie, Dropdown as Bt, Menu as $e, Spin as Ae, Divider as sn, Space as je, Input as Qe, Select as wt, Checkbox as Nt, Alert as ze, Timeline as er, Statistic as Go, Card as Uo, Tag as kn, message as wn, DatePicker as Rn, TimePicker as qo, InputNumber as En, Progress as zo, Avatar as Jo, Pagination as Zo, Tabs as _r, Popover as Xo, Radio as tr, Switch as Qo, Steps as nr, Layout as ei } from "antd";
|
|
3
3
|
import { Label as Dt, Field as Fn, Tree as Ir, Reference as ti, Selection as Mn, Many2one as Dr, Boolean as ni, Container as ri, parseContext as gt, Form as Vr, Integer as On, SearchFieldTypes as ut, SearchFilter as oi, transformDomainForChildWidget as Ar, graphProcessor as kr, parseGraph as $n, graphFieldUtils as ii } from "@gisce/ooui";
|
|
4
4
|
import * as rr from "@ant-design/icons";
|
|
5
5
|
import Rr, { QuestionCircleOutlined as Er, ExclamationCircleOutlined as mt, LoadingOutlined as et, DownOutlined as Vt, WarningOutlined as Mr, CloseOutlined as Ht, CheckOutlined as At, TranslationOutlined as $r, FolderOpenOutlined as Nn, DownloadOutlined as Ln, ClearOutlined as Pn, StarFilled as Nr, StarOutlined as Lr, UpOutlined as si, SearchOutlined as Bn, RightCircleOutlined as ai, ThunderboltOutlined as Hn, PrinterOutlined as jn, EnterOutlined as Pr, PlusSquareOutlined as li, MinusSquareOutlined as ci, FileAddOutlined as an, AlignLeftOutlined as di, ApiOutlined as ui, DeleteOutlined as Kn, LeftOutlined as Br, RightOutlined as Hr, EyeOutlined as fi, FormOutlined as Lt, TableOutlined as Wn, AreaChartOutlined as mi, CalendarOutlined as hi, LinkOutlined as jr, SaveOutlined as pi, CopyOutlined as Yn, InfoCircleOutlined as Kr, ReloadOutlined as ln, EditOutlined as Wr, FilterOutlined as Yr, CloseCircleFilled as gi, BorderOuterOutlined as yi, SettingOutlined as vi, ExportOutlined as wi } from "@ant-design/icons";
|
|
@@ -943,7 +943,7 @@ const qr = (e) => {
|
|
|
943
943
|
h(!1), a();
|
|
944
944
|
}
|
|
945
945
|
function $() {
|
|
946
|
-
return c ? /* @__PURE__ */ n(
|
|
946
|
+
return c ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ P(X, {
|
|
947
947
|
children: [D(), /* @__PURE__ */ n(sn, {}), /* @__PURE__ */ n(Ce, {
|
|
948
948
|
justify: "end",
|
|
949
949
|
children: /* @__PURE__ */ P(je, {
|
|
@@ -1598,7 +1598,7 @@ const qn = async (e) => {
|
|
|
1598
1598
|
a(!1);
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
|
-
return s ? /* @__PURE__ */ n(
|
|
1601
|
+
return s ? /* @__PURE__ */ n(Ae, {}) : l ? /* @__PURE__ */ n(ze, {
|
|
1602
1602
|
className: "mt-10",
|
|
1603
1603
|
message: l,
|
|
1604
1604
|
type: "error",
|
|
@@ -1667,7 +1667,7 @@ const qn = async (e) => {
|
|
|
1667
1667
|
message: d,
|
|
1668
1668
|
type: "error",
|
|
1669
1669
|
banner: !0
|
|
1670
|
-
}) : a ? /* @__PURE__ */ n(
|
|
1670
|
+
}) : a ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ P(X, {
|
|
1671
1671
|
children: [/* @__PURE__ */ n(er, {
|
|
1672
1672
|
style: {
|
|
1673
1673
|
padding: "1rem"
|
|
@@ -2334,9 +2334,9 @@ const kt = ({
|
|
|
2334
2334
|
setLimit: D,
|
|
2335
2335
|
searchParams: _ = [],
|
|
2336
2336
|
setSearchValues: $
|
|
2337
|
-
} = e, [w, C] = x(!1), [F, S] = x(!1), [L, T] = x(), [R, A] = x(1), [M, I] = x(0), [k, B] = x(), [j, U] = x([]), [W, z] = x(void 0), q = me(b || Pt), E = me([]), N =
|
|
2337
|
+
} = e, [w, C] = x(!1), [F, S] = x(!1), [L, T] = x(), [R, A] = x(1), [M, I] = x(0), [k, B] = x(), [j, U] = x([]), [W, z] = x(void 0), q = me(b || Pt), E = me([]), N = Re((oe) => {
|
|
2338
2338
|
v == null || v([...oe]), U([...oe]);
|
|
2339
|
-
}, []), ee =
|
|
2339
|
+
}, []), ee = Re(() => y || j, [y, j]), le = Re(async () => {
|
|
2340
2340
|
const oe = await H.getHandler().nameSearch({
|
|
2341
2341
|
model: t,
|
|
2342
2342
|
payload: l,
|
|
@@ -2377,7 +2377,7 @@ const kt = ({
|
|
|
2377
2377
|
p,
|
|
2378
2378
|
g,
|
|
2379
2379
|
f
|
|
2380
|
-
]), ce =
|
|
2380
|
+
]), ce = Re(
|
|
2381
2381
|
async (oe) => {
|
|
2382
2382
|
const { params: Te, newOffset: ye } = oe || {}, Fe = fn(Te || _, V), { colors: Be } = Ft(c), { totalItems: Ne, results: Je, attrsEvaluated: He } = await H.getHandler().searchForTree({
|
|
2383
2383
|
params: Fe,
|
|
@@ -2421,7 +2421,7 @@ const kt = ({
|
|
|
2421
2421
|
M,
|
|
2422
2422
|
_
|
|
2423
2423
|
]
|
|
2424
|
-
), ne =
|
|
2424
|
+
), ne = Re(
|
|
2425
2425
|
async (oe) => {
|
|
2426
2426
|
try {
|
|
2427
2427
|
C(!0), a == null || a(!0), l && !d.current ? await le() : await ce(oe);
|
|
@@ -2452,8 +2452,10 @@ const kt = ({
|
|
|
2452
2452
|
p,
|
|
2453
2453
|
c
|
|
2454
2454
|
]
|
|
2455
|
-
), J =
|
|
2455
|
+
), J = Re(
|
|
2456
2456
|
(oe) => {
|
|
2457
|
+
if (JSON.stringify(oe) === JSON.stringify(p))
|
|
2458
|
+
return;
|
|
2457
2459
|
h == null || h(oe);
|
|
2458
2460
|
const Te = oe !== void 0 ? Ot({
|
|
2459
2461
|
resultsToSort: ee(),
|
|
@@ -2463,7 +2465,7 @@ const kt = ({
|
|
|
2463
2465
|
N(Te);
|
|
2464
2466
|
},
|
|
2465
2467
|
[h, ee, c, m, N]
|
|
2466
|
-
), we =
|
|
2468
|
+
), we = Re(
|
|
2467
2469
|
(oe) => {
|
|
2468
2470
|
const { params: Te, searchValues: ye, limit: Fe, offset: Be } = oe;
|
|
2469
2471
|
w || (r == null || r(void 0), i == null || i([]), $ == null || $(ye), o == null || o(Te), s == null || s(!1), S(!0), T(void 0), A(1), Fe && (q.current = Fe, D == null || D(Fe)), Be && I(Be), ne({
|
|
@@ -2484,12 +2486,12 @@ const kt = ({
|
|
|
2484
2486
|
I,
|
|
2485
2487
|
ne
|
|
2486
2488
|
]
|
|
2487
|
-
), Se =
|
|
2489
|
+
), Se = Re(
|
|
2488
2490
|
(oe) => {
|
|
2489
2491
|
C(!0), A(oe), I((oe - 1) * b);
|
|
2490
2492
|
},
|
|
2491
2493
|
[C, b, I, A]
|
|
2492
|
-
), Pe =
|
|
2494
|
+
), Pe = Re(() => {
|
|
2493
2495
|
w || (r == null || r(void 0), o == null || o([]), $ == null || $({}), T(void 0), I(0), A(1), D == null || D(b || Pt));
|
|
2494
2496
|
}, [
|
|
2495
2497
|
w,
|
|
@@ -2500,7 +2502,7 @@ const kt = ({
|
|
|
2500
2502
|
A,
|
|
2501
2503
|
D,
|
|
2502
2504
|
b
|
|
2503
|
-
]), fe =
|
|
2505
|
+
]), fe = Re(
|
|
2504
2506
|
async (oe) => {
|
|
2505
2507
|
const Te = oe[(c == null ? void 0 : c.field_parent) || "child_id"], ye = await H.getHandler().readObjects({
|
|
2506
2508
|
model: t,
|
|
@@ -2893,7 +2895,7 @@ const kt = ({
|
|
|
2893
2895
|
closable: !1,
|
|
2894
2896
|
centered: !0,
|
|
2895
2897
|
maskClosable: !1,
|
|
2896
|
-
children: /* @__PURE__ */ n(
|
|
2898
|
+
children: /* @__PURE__ */ n(Ae, {})
|
|
2897
2899
|
}), /* @__PURE__ */ n(Gt, {
|
|
2898
2900
|
buttonModal: !0,
|
|
2899
2901
|
parentContext: h.context,
|
|
@@ -3041,7 +3043,7 @@ function il(e, t) {
|
|
|
3041
3043
|
vt(t, () => ({
|
|
3042
3044
|
submitForm: qt,
|
|
3043
3045
|
getFields: De,
|
|
3044
|
-
getValues:
|
|
3046
|
+
getValues: ke,
|
|
3045
3047
|
getPlainValues: tt,
|
|
3046
3048
|
getContext: nt,
|
|
3047
3049
|
fetchValues: ot,
|
|
@@ -3075,7 +3077,7 @@ function il(e, t) {
|
|
|
3075
3077
|
function De() {
|
|
3076
3078
|
return k;
|
|
3077
3079
|
}
|
|
3078
|
-
function
|
|
3080
|
+
function ke() {
|
|
3079
3081
|
const G = {
|
|
3080
3082
|
...ie(k),
|
|
3081
3083
|
...Z()
|
|
@@ -3085,7 +3087,7 @@ function il(e, t) {
|
|
|
3085
3087
|
return G;
|
|
3086
3088
|
}
|
|
3087
3089
|
function tt() {
|
|
3088
|
-
const G =
|
|
3090
|
+
const G = ke(), Y = De();
|
|
3089
3091
|
let te = {};
|
|
3090
3092
|
return Object.keys(G).forEach((re) => {
|
|
3091
3093
|
const Ve = G[re];
|
|
@@ -3294,12 +3296,12 @@ function il(e, t) {
|
|
|
3294
3296
|
});
|
|
3295
3297
|
E.current = re, N.current = te;
|
|
3296
3298
|
}
|
|
3297
|
-
g && await g([se()]), !v && Y && (de == null || de(se(),
|
|
3299
|
+
g && await g([se()]), !v && Y && (de == null || de(se(), ke(), Ze()));
|
|
3298
3300
|
}, Ro = async (G) => {
|
|
3299
3301
|
const {
|
|
3300
3302
|
callOnSubmitSucceed: Y = !0
|
|
3301
3303
|
} = G || {};
|
|
3302
|
-
!v && Y && (de == null || de(se(),
|
|
3304
|
+
!v && Y && (de == null || de(se(), ke(), Ze()));
|
|
3303
3305
|
}, qt = async (G) => {
|
|
3304
3306
|
let Y = !1;
|
|
3305
3307
|
const {
|
|
@@ -3454,15 +3456,15 @@ function il(e, t) {
|
|
|
3454
3456
|
}
|
|
3455
3457
|
});
|
|
3456
3458
|
if (typeof te == "object" && te !== null && Object.keys(te).length === 0 && v)
|
|
3457
|
-
de == null || de(se(),
|
|
3459
|
+
de == null || de(se(), ke(), Ze());
|
|
3458
3460
|
else if (te.type && te.type === "ir.actions.act_window_close")
|
|
3459
|
-
de == null || de(se(),
|
|
3461
|
+
de == null || de(se(), ke(), Ze());
|
|
3460
3462
|
else if (te.type) {
|
|
3461
3463
|
let re = {};
|
|
3462
3464
|
te.context && (re = gt({
|
|
3463
3465
|
context: te.context,
|
|
3464
3466
|
fields: k,
|
|
3465
|
-
values:
|
|
3467
|
+
values: ke()
|
|
3466
3468
|
})), await Qn({
|
|
3467
3469
|
actionData: te,
|
|
3468
3470
|
context: {
|
|
@@ -3481,7 +3483,7 @@ function il(e, t) {
|
|
|
3481
3483
|
action: G,
|
|
3482
3484
|
payload: se()
|
|
3483
3485
|
});
|
|
3484
|
-
Y.type && Y.type === "ir.actions.act_window_close" ? de == null || de(se(),
|
|
3486
|
+
Y.type && Y.type === "ir.actions.act_window_close" ? de == null || de(se(), ke(), Ze()) : await ot();
|
|
3485
3487
|
}
|
|
3486
3488
|
async function Po({
|
|
3487
3489
|
action: G,
|
|
@@ -3506,7 +3508,7 @@ function il(e, t) {
|
|
|
3506
3508
|
} = await (He == null ? void 0 : He({
|
|
3507
3509
|
actionData: G,
|
|
3508
3510
|
fields: k,
|
|
3509
|
-
values:
|
|
3511
|
+
values: ke(),
|
|
3510
3512
|
context: {
|
|
3511
3513
|
...y,
|
|
3512
3514
|
...T == null ? void 0 : T.context,
|
|
@@ -3516,7 +3518,7 @@ function il(e, t) {
|
|
|
3516
3518
|
ot();
|
|
3517
3519
|
}
|
|
3518
3520
|
})) || {};
|
|
3519
|
-
!b && te && (de == null || de(se(),
|
|
3521
|
+
!b && te && (de == null || de(se(), ke(), Ze()));
|
|
3520
3522
|
}
|
|
3521
3523
|
function Bo() {
|
|
3522
3524
|
gn({
|
|
@@ -3552,9 +3554,9 @@ function il(e, t) {
|
|
|
3552
3554
|
We(re);
|
|
3553
3555
|
}
|
|
3554
3556
|
}
|
|
3555
|
-
const jo = () => !T && !S ? /* @__PURE__ */ n(
|
|
3557
|
+
const jo = () => !T && !S ? /* @__PURE__ */ n(Ae, {}) : !r && !h || !O ? null : /* @__PURE__ */ n(X, {
|
|
3556
3558
|
children: /* @__PURE__ */ n(Gi, {
|
|
3557
|
-
getValues:
|
|
3559
|
+
getValues: ke,
|
|
3558
3560
|
getPlainValues: tt,
|
|
3559
3561
|
getFields: De,
|
|
3560
3562
|
domain: V,
|
|
@@ -4359,7 +4361,7 @@ const Tl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4359
4361
|
style: {
|
|
4360
4362
|
padding: 15
|
|
4361
4363
|
},
|
|
4362
|
-
children: /* @__PURE__ */ n(
|
|
4364
|
+
children: /* @__PURE__ */ n(Ae, {})
|
|
4363
4365
|
})
|
|
4364
4366
|
});
|
|
4365
4367
|
if (!f || !f.toolbar)
|
|
@@ -4470,7 +4472,7 @@ const Tl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4470
4472
|
value: t,
|
|
4471
4473
|
context: r,
|
|
4472
4474
|
selectionValues: i
|
|
4473
|
-
} = e, [o, s] = x(), [a, l] = x(!1), [d, u] = t ? t.split(",") : [], f = parseInt(u), c =
|
|
4475
|
+
} = e, [o, s] = x(), [a, l] = x(!1), [d, u] = t ? t.split(",") : [], f = parseInt(u), c = Re(async () => {
|
|
4474
4476
|
if (!t || t && o)
|
|
4475
4477
|
return;
|
|
4476
4478
|
l(!0);
|
|
@@ -5006,7 +5008,7 @@ function mn(e) {
|
|
|
5006
5008
|
const U = oo(w.current, s);
|
|
5007
5009
|
b(U), F.current = r;
|
|
5008
5010
|
}, [s]);
|
|
5009
|
-
const R = (t - 1) * F.current + 1, A = R - 1 + O.length, M = i === void 0 ? null : i === 0 ? C("no_results") : C("summary").replace("{from}", R == null ? void 0 : R.toString()).replace("{to}", A == null ? void 0 : A.toString()).replace("{total}", i == null ? void 0 : i.toString()), I = () => !u || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(
|
|
5011
|
+
const R = (t - 1) * F.current + 1, A = R - 1 + O.length, M = i === void 0 ? null : i === 0 ? C("no_results") : C("summary").replace("{from}", R == null ? void 0 : R.toString()).replace("{to}", A == null ? void 0 : A.toString()).replace("{total}", i == null ? void 0 : i.toString()), I = () => !u || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Ae, {
|
|
5010
5012
|
className: "pb-4"
|
|
5011
5013
|
}) : /* @__PURE__ */ P(Ce, {
|
|
5012
5014
|
align: "bottom",
|
|
@@ -5049,7 +5051,7 @@ function mn(e) {
|
|
|
5049
5051
|
const W = w.current;
|
|
5050
5052
|
c && W.columns.some((z) => z.sum !== void 0) && (j = c - 30);
|
|
5051
5053
|
}
|
|
5052
|
-
return w.current === null ? /* @__PURE__ */ n(
|
|
5054
|
+
return w.current === null ? /* @__PURE__ */ n(Ae, {
|
|
5053
5055
|
style: {
|
|
5054
5056
|
padding: "2rem"
|
|
5055
5057
|
}
|
|
@@ -5059,7 +5061,7 @@ function mn(e) {
|
|
|
5059
5061
|
columns: B.columns,
|
|
5060
5062
|
dataSource: O,
|
|
5061
5063
|
loading: l,
|
|
5062
|
-
loadingComponent: /* @__PURE__ */ n(
|
|
5064
|
+
loadingComponent: /* @__PURE__ */ n(Ae, {}),
|
|
5063
5065
|
onRowStyle: (U) => {
|
|
5064
5066
|
if (m[U.id])
|
|
5065
5067
|
return {
|
|
@@ -5166,7 +5168,7 @@ function Yl(e, t) {
|
|
|
5166
5168
|
})), pe(() => {
|
|
5167
5169
|
!g || u && (y.current = !1, ye());
|
|
5168
5170
|
}, [Je, He, g, u, a]);
|
|
5169
|
-
const
|
|
5171
|
+
const ke = async () => {
|
|
5170
5172
|
v(!1), h(!0), C(void 0), J == null || J(!0);
|
|
5171
5173
|
try {
|
|
5172
5174
|
await tt(), v(!0);
|
|
@@ -5191,7 +5193,7 @@ function Yl(e, t) {
|
|
|
5191
5193
|
})), $(he), D(Ke);
|
|
5192
5194
|
};
|
|
5193
5195
|
pe(() => {
|
|
5194
|
-
|
|
5196
|
+
ke();
|
|
5195
5197
|
}, [r]);
|
|
5196
5198
|
const Ze = (he) => {
|
|
5197
5199
|
fe == null || fe(he);
|
|
@@ -5258,7 +5260,7 @@ function Yl(e, t) {
|
|
|
5258
5260
|
searchError: Ne,
|
|
5259
5261
|
searchVisible: E,
|
|
5260
5262
|
searchValues: we
|
|
5261
|
-
}), /* @__PURE__ */ n(mn, {
|
|
5263
|
+
}), Fe && /* @__PURE__ */ n(Ae, {}), /* @__PURE__ */ n(mn, {
|
|
5262
5264
|
context: c,
|
|
5263
5265
|
total: De,
|
|
5264
5266
|
limit: Pe,
|
|
@@ -5266,7 +5268,7 @@ function Yl(e, t) {
|
|
|
5266
5268
|
treeView: b,
|
|
5267
5269
|
results: Q(),
|
|
5268
5270
|
onRequestPageChange: de,
|
|
5269
|
-
loading:
|
|
5271
|
+
loading: !1,
|
|
5270
5272
|
onRowClicked: Z,
|
|
5271
5273
|
scrollY: l || Oe(),
|
|
5272
5274
|
colorsForResults: se,
|
|
@@ -5290,7 +5292,7 @@ function Yl(e, t) {
|
|
|
5290
5292
|
style: u ? {} : {
|
|
5291
5293
|
display: "none"
|
|
5292
5294
|
},
|
|
5293
|
-
children: p ? /* @__PURE__ */ n(
|
|
5295
|
+
children: p ? /* @__PURE__ */ n(Ae, {}) : ie()
|
|
5294
5296
|
});
|
|
5295
5297
|
}
|
|
5296
5298
|
const yo = yt(Yl), vo = (e) => {
|
|
@@ -6200,7 +6202,7 @@ const dc = {
|
|
|
6200
6202
|
banner: !0
|
|
6201
6203
|
});
|
|
6202
6204
|
if (u)
|
|
6203
|
-
return /* @__PURE__ */ n(
|
|
6205
|
+
return /* @__PURE__ */ n(Ae, {});
|
|
6204
6206
|
if (!f)
|
|
6205
6207
|
return /* @__PURE__ */ n(ze, {
|
|
6206
6208
|
message: "No data to display",
|
|
@@ -6509,7 +6511,7 @@ const Cc = (e) => {
|
|
|
6509
6511
|
}
|
|
6510
6512
|
we();
|
|
6511
6513
|
}, [s, a]);
|
|
6512
|
-
const we =
|
|
6514
|
+
const we = Re(() => {
|
|
6513
6515
|
(a === "form" && s.some((Z) => !Z.values) || a === "tree" && s.some((Z) => !Z.treeValues)) && Pe();
|
|
6514
6516
|
}, [s, a]);
|
|
6515
6517
|
pe(() => {
|
|
@@ -6746,7 +6748,7 @@ const Cc = (e) => {
|
|
|
6746
6748
|
D(!1);
|
|
6747
6749
|
}
|
|
6748
6750
|
};
|
|
6749
|
-
function
|
|
6751
|
+
function ke() {
|
|
6750
6752
|
const Z = bc[a];
|
|
6751
6753
|
if (a === "graph")
|
|
6752
6754
|
return $n(o.get("graph").arch).string;
|
|
@@ -6758,7 +6760,7 @@ const Cc = (e) => {
|
|
|
6758
6760
|
const tt = () => {
|
|
6759
6761
|
var ue, Oe, ie, xe;
|
|
6760
6762
|
if (a === "form")
|
|
6761
|
-
return ne.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((he) => !he.values) ? /* @__PURE__ */ n(
|
|
6763
|
+
return ne.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((he) => !he.values) ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(Yt, {
|
|
6762
6764
|
formView: o.get("form"),
|
|
6763
6765
|
values: (ue = ne[d]) == null ? void 0 : ue.values,
|
|
6764
6766
|
parentContext: {
|
|
@@ -6837,10 +6839,10 @@ const Cc = (e) => {
|
|
|
6837
6839
|
banner: !0
|
|
6838
6840
|
});
|
|
6839
6841
|
const Ze = M;
|
|
6840
|
-
return b ? /* @__PURE__ */ n(
|
|
6842
|
+
return b ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ P(X, {
|
|
6841
6843
|
children: [/* @__PURE__ */ n(wc, {
|
|
6842
6844
|
mode: a,
|
|
6843
|
-
title:
|
|
6845
|
+
title: ke(),
|
|
6844
6846
|
readOnly: q,
|
|
6845
6847
|
isMany2Many: le,
|
|
6846
6848
|
formHasChanges: V,
|
|
@@ -6932,7 +6934,7 @@ const Cc = (e) => {
|
|
|
6932
6934
|
u(!1);
|
|
6933
6935
|
}
|
|
6934
6936
|
};
|
|
6935
|
-
return r && r.length > 0 ? l = r[0] : l = "tree", d ? /* @__PURE__ */ n(
|
|
6937
|
+
return r && r.length > 0 ? l = r[0] : l = "tree", d ? /* @__PURE__ */ n(Ae, {}) : f ? /* @__PURE__ */ n(ze, {
|
|
6936
6938
|
className: "mt-10",
|
|
6937
6939
|
message: f,
|
|
6938
6940
|
type: "error",
|
|
@@ -7207,7 +7209,7 @@ const {
|
|
|
7207
7209
|
limit: s,
|
|
7208
7210
|
onClose: a
|
|
7209
7211
|
}) => {
|
|
7210
|
-
const l = me({}), d = me(/* @__PURE__ */ new Map()), u =
|
|
7212
|
+
const l = me({}), d = me(/* @__PURE__ */ new Map()), u = Re(
|
|
7211
7213
|
async (v) => {
|
|
7212
7214
|
if (v.selectedKeys === void 0 || v.selectedKeys.length === 0) {
|
|
7213
7215
|
ct(_e("selectAtLeastOneField", r));
|
|
@@ -7233,14 +7235,14 @@ const {
|
|
|
7233
7235
|
un(V, O.mime);
|
|
7234
7236
|
},
|
|
7235
7237
|
[r, e, o, s, t, a]
|
|
7236
|
-
), f =
|
|
7238
|
+
), f = Re(async () => {
|
|
7237
7239
|
const v = await H.getHandler().getFields({
|
|
7238
7240
|
model: e,
|
|
7239
7241
|
context: t,
|
|
7240
7242
|
fields: []
|
|
7241
7243
|
});
|
|
7242
7244
|
return l.current["/"] = v, Fr({ fields: v });
|
|
7243
|
-
}, [e, t, l]), c =
|
|
7245
|
+
}, [e, t, l]), c = Re(
|
|
7244
7246
|
async (v) => {
|
|
7245
7247
|
const V = An(v, l.current)[Vn(v)], O = V.relation, b = await H.getHandler().getFields({
|
|
7246
7248
|
model: O,
|
|
@@ -7258,7 +7260,7 @@ const {
|
|
|
7258
7260
|
});
|
|
7259
7261
|
},
|
|
7260
7262
|
[l.current, e, t]
|
|
7261
|
-
), m =
|
|
7263
|
+
), m = Re(async () => {
|
|
7262
7264
|
const v = await $c({ model: e, context: t }), y = await Lc({
|
|
7263
7265
|
predefinedExports: v,
|
|
7264
7266
|
fields: l.current,
|
|
@@ -7277,7 +7279,7 @@ const {
|
|
|
7277
7279
|
})),
|
|
7278
7280
|
keysWithChilds: y
|
|
7279
7281
|
};
|
|
7280
|
-
}, [l.current]), p =
|
|
7282
|
+
}, [l.current]), p = Re(
|
|
7281
7283
|
async (v) => {
|
|
7282
7284
|
const y = await g("ir.exports"), V = await g("ir.exports.line"), O = await H.getHandler().create({
|
|
7283
7285
|
model: "ir.exports",
|
|
@@ -7301,7 +7303,7 @@ const {
|
|
|
7301
7303
|
), { ...v, id: O };
|
|
7302
7304
|
},
|
|
7303
7305
|
[]
|
|
7304
|
-
), h =
|
|
7306
|
+
), h = Re(
|
|
7305
7307
|
async (v) => {
|
|
7306
7308
|
await H.getHandler().delete({
|
|
7307
7309
|
model: "ir.exports",
|
|
@@ -7309,7 +7311,7 @@ const {
|
|
|
7309
7311
|
});
|
|
7310
7312
|
},
|
|
7311
7313
|
[]
|
|
7312
|
-
), g =
|
|
7314
|
+
), g = Re(
|
|
7313
7315
|
async (v) => {
|
|
7314
7316
|
if (d.current.has(v))
|
|
7315
7317
|
return d.current.get(v);
|
|
@@ -7912,7 +7914,7 @@ const Zc = (e) => {
|
|
|
7912
7914
|
onOpenAttachmentDetail: l,
|
|
7913
7915
|
onListAllAttachments: d
|
|
7914
7916
|
} = e;
|
|
7915
|
-
return o ? /* @__PURE__ */ n(
|
|
7917
|
+
return o ? /* @__PURE__ */ n(Ae, {
|
|
7916
7918
|
style: {
|
|
7917
7919
|
padding: 20
|
|
7918
7920
|
}
|
|
@@ -8000,7 +8002,7 @@ function Qc(e) {
|
|
|
8000
8002
|
formRef: a
|
|
8001
8003
|
} = K(Xe), [l, d] = x(!1), [u, f] = x([]), [c, m] = x(!1), {
|
|
8002
8004
|
t: p
|
|
8003
|
-
} = K(ge), h =
|
|
8005
|
+
} = K(ge), h = Re(async () => {
|
|
8004
8006
|
d(!0);
|
|
8005
8007
|
try {
|
|
8006
8008
|
const y = await H.getHandler().readObjects({
|
|
@@ -8019,7 +8021,7 @@ function Qc(e) {
|
|
|
8019
8021
|
We(y);
|
|
8020
8022
|
}
|
|
8021
8023
|
d(!1);
|
|
8022
|
-
}, t), g =
|
|
8024
|
+
}, t), g = Re(async (y) => {
|
|
8023
8025
|
if (y.link) {
|
|
8024
8026
|
window.open(y.link);
|
|
8025
8027
|
return;
|
|
@@ -8041,7 +8043,7 @@ function Qc(e) {
|
|
|
8041
8043
|
un(V.datas, O.mime);
|
|
8042
8044
|
} else
|
|
8043
8045
|
s(V);
|
|
8044
|
-
}, []), v =
|
|
8046
|
+
}, []), v = Re(async (y) => {
|
|
8045
8047
|
s(y);
|
|
8046
8048
|
}, []);
|
|
8047
8049
|
return pe(() => {
|
|
@@ -8063,7 +8065,7 @@ function Qc(e) {
|
|
|
8063
8065
|
closable: !1,
|
|
8064
8066
|
centered: !0,
|
|
8065
8067
|
maskClosable: !1,
|
|
8066
|
-
children: /* @__PURE__ */ n(
|
|
8068
|
+
children: /* @__PURE__ */ n(Ae, {})
|
|
8067
8069
|
})]
|
|
8068
8070
|
});
|
|
8069
8071
|
}
|
|
@@ -8189,7 +8191,7 @@ function ed({
|
|
|
8189
8191
|
return r ? /* @__PURE__ */ P(je, {
|
|
8190
8192
|
wrap: !0,
|
|
8191
8193
|
children: [V && /* @__PURE__ */ P(X, {
|
|
8192
|
-
children: [/* @__PURE__ */ n(
|
|
8194
|
+
children: [/* @__PURE__ */ n(Ae, {}), Ct(), Ct()]
|
|
8193
8195
|
}), /* @__PURE__ */ n(Fo, {
|
|
8194
8196
|
disabled: a || V || h || g
|
|
8195
8197
|
}), /* @__PURE__ */ n(Ge, {
|
|
@@ -8815,7 +8817,7 @@ const cd = (e) => {
|
|
|
8815
8817
|
searchVisible: v,
|
|
8816
8818
|
searchValues: F,
|
|
8817
8819
|
showLimitOptions: !1
|
|
8818
|
-
}), B ? /* @__PURE__ */ n(
|
|
8820
|
+
}), B ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(hn, {
|
|
8819
8821
|
ref: d,
|
|
8820
8822
|
view_id: t.view_id,
|
|
8821
8823
|
model: i,
|
|
@@ -9383,12 +9385,12 @@ function bd(e, t) {
|
|
|
9383
9385
|
_(!0);
|
|
9384
9386
|
const Q = [], de = [];
|
|
9385
9387
|
for (const se of s) {
|
|
9386
|
-
const [De,
|
|
9387
|
-
|
|
9388
|
+
const [De, ke] = se;
|
|
9389
|
+
ke !== "dashboard" ? de.push({
|
|
9388
9390
|
viewTuple: se,
|
|
9389
9391
|
promise: H.getHandler().getView({
|
|
9390
9392
|
model: i,
|
|
9391
|
-
type:
|
|
9393
|
+
type: ke,
|
|
9392
9394
|
id: De,
|
|
9393
9395
|
context: o
|
|
9394
9396
|
})
|
|
@@ -9401,7 +9403,7 @@ function bd(e, t) {
|
|
|
9401
9403
|
if (!se)
|
|
9402
9404
|
continue;
|
|
9403
9405
|
const [, De] = se.viewTuple;
|
|
9404
|
-
let
|
|
9406
|
+
let ke = se.info;
|
|
9405
9407
|
switch (De) {
|
|
9406
9408
|
case "dashboard": {
|
|
9407
9409
|
const tt = s.find((nt) => {
|
|
@@ -9428,14 +9430,14 @@ function bd(e, t) {
|
|
|
9428
9430
|
}
|
|
9429
9431
|
case "form": {
|
|
9430
9432
|
Q.push({
|
|
9431
|
-
...
|
|
9433
|
+
...ke,
|
|
9432
9434
|
type: De
|
|
9433
9435
|
});
|
|
9434
9436
|
break;
|
|
9435
9437
|
}
|
|
9436
9438
|
case "tree": {
|
|
9437
9439
|
Q.push({
|
|
9438
|
-
...
|
|
9440
|
+
...ke,
|
|
9439
9441
|
isExpandable: g,
|
|
9440
9442
|
type: De
|
|
9441
9443
|
});
|
|
@@ -9443,7 +9445,7 @@ function bd(e, t) {
|
|
|
9443
9445
|
}
|
|
9444
9446
|
case "graph": {
|
|
9445
9447
|
Q.push({
|
|
9446
|
-
...
|
|
9448
|
+
...ke,
|
|
9447
9449
|
type: De
|
|
9448
9450
|
});
|
|
9449
9451
|
break;
|
|
@@ -9568,7 +9570,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9568
9570
|
Te(Q);
|
|
9569
9571
|
}
|
|
9570
9572
|
}
|
|
9571
|
-
return D ? /* @__PURE__ */ n(
|
|
9573
|
+
return D ? /* @__PURE__ */ n(Ae, {}) : y ? /* @__PURE__ */ P(Xa, {
|
|
9572
9574
|
title: a,
|
|
9573
9575
|
currentView: y,
|
|
9574
9576
|
setCurrentView: Te,
|
|
@@ -9892,7 +9894,7 @@ function Id(e) {
|
|
|
9892
9894
|
message: k,
|
|
9893
9895
|
type: "error",
|
|
9894
9896
|
banner: !0
|
|
9895
|
-
}) : d ? /* @__PURE__ */ n(
|
|
9897
|
+
}) : d ? /* @__PURE__ */ n(Ae, {
|
|
9896
9898
|
style: {
|
|
9897
9899
|
padding: "2rem"
|
|
9898
9900
|
}
|
|
@@ -10316,7 +10318,7 @@ const Ad = yt(Vd), kd = (e) => /* @__PURE__ */ n(ve, {
|
|
|
10316
10318
|
});
|
|
10317
10319
|
}), O(C);
|
|
10318
10320
|
};
|
|
10319
|
-
return f && a.length === 0 ? /* @__PURE__ */ n(
|
|
10321
|
+
return f && a.length === 0 ? /* @__PURE__ */ n(Ae, {}) : /* @__PURE__ */ n(X, {
|
|
10320
10322
|
children: /* @__PURE__ */ P("div", {
|
|
10321
10323
|
className: "flex flex-row",
|
|
10322
10324
|
children: [/* @__PURE__ */ n(Nt.Group, {
|
|
@@ -11100,7 +11102,7 @@ const {
|
|
|
11100
11102
|
})
|
|
11101
11103
|
})
|
|
11102
11104
|
})]
|
|
11103
|
-
}), /* @__PURE__ */ n($e.Divider, {}), c ? /* @__PURE__ */ n(
|
|
11105
|
+
}), /* @__PURE__ */ n($e.Divider, {}), c ? /* @__PURE__ */ n(Ae, {
|
|
11104
11106
|
style: {
|
|
11105
11107
|
padding: "1rem"
|
|
11106
11108
|
}
|