@gisce/react-ooui 2.74.0-alpha.3 → 2.74.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/DatePicker.helpers.d.ts +1 -1
- package/dist/common/DatePicker.helpers.d.ts.map +1 -1
- package/dist/common/useDatePickerHandlers.d.ts.map +1 -1
- package/dist/common/useTimePickerHandlers.d.ts.map +1 -1
- package/dist/react-ooui.es.js +83 -63
- package/dist/react-ooui.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ export type DateTimePatterns = {
|
|
|
23
23
|
export declare const createFormatRegex: (format: string) => RegExp;
|
|
24
24
|
export declare const createDateTimePatterns: () => DateTimePatterns;
|
|
25
25
|
type UpdateDateTimeParams = {
|
|
26
|
-
currentValue: string;
|
|
26
|
+
currentValue: string | undefined;
|
|
27
27
|
now: Dayjs;
|
|
28
28
|
mode: DateMode;
|
|
29
29
|
showTime: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.helpers.d.ts","sourceRoot":"","sources":["../../src/common/DatePicker.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAWnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,WAAY,MAAM,KAAG,MAclD,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO,gBAOxC,CAAC;AAEH,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"DatePicker.helpers.d.ts","sourceRoot":"","sources":["../../src/common/DatePicker.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAWnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,WAAY,MAAM,KAAG,MAclD,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO,gBAOxC,CAAC;AAEH,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,oBAAoB,SA2D1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,iBACd,MAAM,YACV,OAAO,KAChB,OAaF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDatePickerHandlers.d.ts","sourceRoot":"","sources":["../../src/common/useDatePickerHandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAGT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,2BAA2B,GAAG;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,qBAAqB,yCAK/B,2BAA2B;uBAEtB,mBAAmB,CAAC,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useDatePickerHandlers.d.ts","sourceRoot":"","sources":["../../src/common/useDatePickerHandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAGT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,2BAA2B,GAAG;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,qBAAqB,yCAK/B,2BAA2B;uBAEtB,mBAAmB,CAAC,gBAAgB,CAAC;oBAqCrC,gBAAgB,CAAC,gBAAgB,CAAC;CAkBzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimePickerHandlers.d.ts","sourceRoot":"","sources":["../../src/common/useTimePickerHandlers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAI9B,KAAK,2BAA2B,GAAG;IACjC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,4FAA4F;IAC5F,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,gDAI/B,2BAA2B;uBAEtB,mBAAmB,CAAC,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useTimePickerHandlers.d.ts","sourceRoot":"","sources":["../../src/common/useTimePickerHandlers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAI9B,KAAK,2BAA2B,GAAG;IACjC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,4FAA4F;IAC5F,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,gDAI/B,2BAA2B;uBAEtB,mBAAmB,CAAC,gBAAgB,CAAC;oBAwCrC,gBAAgB,CAAC,gBAAgB,CAAC;CAkBzC,CAAC"}
|
package/dist/react-ooui.es.js
CHANGED
|
@@ -367,7 +367,7 @@ const { confirm: fd } = xt, zt = ({
|
|
|
367
367
|
STOCK_CLEAR: "CloseSquare",
|
|
368
368
|
STOCK_UNINDENT: "AlignLeft",
|
|
369
369
|
STOCK_PREFERENCES: "Setting"
|
|
370
|
-
},
|
|
370
|
+
}, St = (e, t) => (e.indexOf("gtk-") !== -1 && (e = `STOCK_${e.replace("gtk-", "").replace(/\-/g, "_").toUpperCase()}`), hs.hasOwnProperty(e) ? gs(hs[e], t) : gs(e, t));
|
|
371
371
|
function md(e) {
|
|
372
372
|
return `${e.split("-").map(
|
|
373
373
|
(t) => t.replace(
|
|
@@ -442,7 +442,7 @@ const No = (e) => {
|
|
|
442
442
|
if (m)
|
|
443
443
|
return /* @__PURE__ */ s($t, {});
|
|
444
444
|
if (l) {
|
|
445
|
-
const b =
|
|
445
|
+
const b = St(l);
|
|
446
446
|
return b && /* @__PURE__ */ s(b, {});
|
|
447
447
|
}
|
|
448
448
|
}
|
|
@@ -475,7 +475,7 @@ const No = (e) => {
|
|
|
475
475
|
if (y)
|
|
476
476
|
return /* @__PURE__ */ s($t, {});
|
|
477
477
|
if (d) {
|
|
478
|
-
const x =
|
|
478
|
+
const x = St(d);
|
|
479
479
|
return x && /* @__PURE__ */ s(x, {});
|
|
480
480
|
}
|
|
481
481
|
}
|
|
@@ -556,7 +556,7 @@ const No = (e) => {
|
|
|
556
556
|
if (y)
|
|
557
557
|
return /* @__PURE__ */ s($t, {});
|
|
558
558
|
if (u) {
|
|
559
|
-
const C =
|
|
559
|
+
const C = St(u);
|
|
560
560
|
return C && /* @__PURE__ */ s(C, {});
|
|
561
561
|
}
|
|
562
562
|
}
|
|
@@ -627,7 +627,7 @@ const ji = (e) => {
|
|
|
627
627
|
message: t,
|
|
628
628
|
title: r
|
|
629
629
|
};
|
|
630
|
-
}, { error: yd, warning: vd } = xt,
|
|
630
|
+
}, { error: yd, warning: vd } = xt, wt = (e) => {
|
|
631
631
|
const { message: t, type: n, title: r } = ji(e);
|
|
632
632
|
(n === "error" ? yd : vd)({
|
|
633
633
|
title: r,
|
|
@@ -646,7 +646,7 @@ const ji = (e) => {
|
|
|
646
646
|
const w = await _();
|
|
647
647
|
await C(w);
|
|
648
648
|
} catch (w) {
|
|
649
|
-
|
|
649
|
+
wt(w);
|
|
650
650
|
}
|
|
651
651
|
m(!1);
|
|
652
652
|
}
|
|
@@ -707,7 +707,7 @@ const ji = (e) => {
|
|
|
707
707
|
fields: {}
|
|
708
708
|
});
|
|
709
709
|
} catch (w) {
|
|
710
|
-
|
|
710
|
+
wt(w);
|
|
711
711
|
}
|
|
712
712
|
p(!1), i();
|
|
713
713
|
}
|
|
@@ -1019,7 +1019,7 @@ function $r(e, t) {
|
|
|
1019
1019
|
const $o = (e) => {
|
|
1020
1020
|
const { value: t, style: n = {} } = e;
|
|
1021
1021
|
if (t) {
|
|
1022
|
-
const r =
|
|
1022
|
+
const r = St(t);
|
|
1023
1023
|
return r ? /* @__PURE__ */ s(r, {}) : /* @__PURE__ */ s(
|
|
1024
1024
|
"img",
|
|
1025
1025
|
{
|
|
@@ -1030,7 +1030,7 @@ const $o = (e) => {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
}, Md = (e) => {
|
|
1032
1032
|
const { ooui: t } = e, { required: n, id: r } = t;
|
|
1033
|
-
return
|
|
1033
|
+
return St(r) ? /* @__PURE__ */ s($o, { value: r }) : /* @__PURE__ */ s($e, { required: n, ...e, children: /* @__PURE__ */ s($d, { ooui: t }) });
|
|
1034
1034
|
}, $d = (e) => {
|
|
1035
1035
|
const { ooui: t, value: n, onChange: r } = e, { readOnly: o } = t, a = q(null), { t: i } = ge(), l = (u) => {
|
|
1036
1036
|
r == null || r(u);
|
|
@@ -1588,7 +1588,7 @@ const pn = ({
|
|
|
1588
1588
|
if (i)
|
|
1589
1589
|
return /* @__PURE__ */ s(et, {});
|
|
1590
1590
|
const k = (F) => {
|
|
1591
|
-
const P =
|
|
1591
|
+
const P = St(F);
|
|
1592
1592
|
return P && /* @__PURE__ */ s(P, {});
|
|
1593
1593
|
}, S = x.map((F) => {
|
|
1594
1594
|
var E, H, V, $;
|
|
@@ -2266,7 +2266,7 @@ function pu({
|
|
|
2266
2266
|
`bold ${Math.floor(c * 1.03)}px sans-serif`
|
|
2267
2267
|
);
|
|
2268
2268
|
i && (m = m * 2), m >= t * 0.85 && (c = t * 0.85 / m * c);
|
|
2269
|
-
const h = i &&
|
|
2269
|
+
const h = i && St(i, { style: { fontSize: c * 0.7 } });
|
|
2270
2270
|
return /* @__PURE__ */ s(
|
|
2271
2271
|
"div",
|
|
2272
2272
|
{
|
|
@@ -2314,7 +2314,7 @@ function hu({
|
|
|
2314
2314
|
`bold ${Math.floor(f * 1.03)}px sans-serif`
|
|
2315
2315
|
);
|
|
2316
2316
|
l && (p = p * 1.5), (p >= n * 0.85 || f * 2 < d) && (f = n * 0.85 / p * f);
|
|
2317
|
-
const y = l &&
|
|
2317
|
+
const y = l && St(l, { style: { fontSize: f } });
|
|
2318
2318
|
return /* @__PURE__ */ s(
|
|
2319
2319
|
"div",
|
|
2320
2320
|
{
|
|
@@ -3147,7 +3147,7 @@ function yt(e) {
|
|
|
3147
3147
|
const da = (e) => /* @__PURE__ */ s(yt, { ...e, type: "primary", danger: !0 });
|
|
3148
3148
|
function ua(e) {
|
|
3149
3149
|
const { disabled: t = !1 } = e, { formHasChanges: n, onNewClicked: r } = ae(
|
|
3150
|
-
|
|
3150
|
+
Ct
|
|
3151
3151
|
), { t: o } = ge(), a = () => {
|
|
3152
3152
|
if (n) {
|
|
3153
3153
|
Vn({
|
|
@@ -3344,7 +3344,7 @@ const Nn = It.createContext(null), As = async (e) => {
|
|
|
3344
3344
|
type: V
|
|
3345
3345
|
} = w;
|
|
3346
3346
|
if (V !== "ir.actions.report.xml") {
|
|
3347
|
-
|
|
3347
|
+
wt(`${V} action not supported`);
|
|
3348
3348
|
return;
|
|
3349
3349
|
}
|
|
3350
3350
|
const { ids: $ } = E || {}, L = $ || [], D = typeof F == "string" ? Zt({
|
|
@@ -3364,7 +3364,7 @@ const Nn = It.createContext(null), As = async (e) => {
|
|
|
3364
3364
|
v(W);
|
|
3365
3365
|
}, 1e3);
|
|
3366
3366
|
} catch (W) {
|
|
3367
|
-
a.current = !1, clearInterval(o.current),
|
|
3367
|
+
a.current = !1, clearInterval(o.current), wt(W), l(!1);
|
|
3368
3368
|
}
|
|
3369
3369
|
}
|
|
3370
3370
|
async function v(T) {
|
|
@@ -3378,7 +3378,7 @@ const Nn = It.createContext(null), As = async (e) => {
|
|
|
3378
3378
|
$r(w.result, A.mime);
|
|
3379
3379
|
}
|
|
3380
3380
|
} catch (A) {
|
|
3381
|
-
a.current = !1, clearInterval(o.current), l(!1),
|
|
3381
|
+
a.current = !1, clearInterval(o.current), l(!1), wt(A.exception || A);
|
|
3382
3382
|
}
|
|
3383
3383
|
}
|
|
3384
3384
|
async function b({
|
|
@@ -3404,7 +3404,7 @@ const Nn = It.createContext(null), As = async (e) => {
|
|
|
3404
3404
|
"_blank"
|
|
3405
3405
|
);
|
|
3406
3406
|
else
|
|
3407
|
-
return
|
|
3407
|
+
return wt(`${F} action not supported`), {};
|
|
3408
3408
|
}
|
|
3409
3409
|
async function _({
|
|
3410
3410
|
actionData: T,
|
|
@@ -3813,7 +3813,7 @@ function Zu({
|
|
|
3813
3813
|
treeType: F,
|
|
3814
3814
|
setSearchParams: P,
|
|
3815
3815
|
setSearchValues: E
|
|
3816
|
-
} = ae(
|
|
3816
|
+
} = ae(Ct), H = Jt(
|
|
3817
3817
|
Lt.FEATURE_ADVANCED_EXPORT
|
|
3818
3818
|
), { t: V } = ge(), [$, L] = I(!1), D = q(!0), W = O(() => {
|
|
3819
3819
|
var z;
|
|
@@ -3841,7 +3841,7 @@ function Zu({
|
|
|
3841
3841
|
context: { ...e }
|
|
3842
3842
|
}) && ((z = h == null ? void 0 : h.current) == null || z.refreshResults());
|
|
3843
3843
|
} catch (Y) {
|
|
3844
|
-
|
|
3844
|
+
wt(Y);
|
|
3845
3845
|
} finally {
|
|
3846
3846
|
u == null || u(!1);
|
|
3847
3847
|
}
|
|
@@ -3860,7 +3860,7 @@ function Zu({
|
|
|
3860
3860
|
context: { ...e }
|
|
3861
3861
|
}), p == null || p(void 0), y == null || y(void 0), (z = h == null ? void 0 : h.current) == null || z.refreshResults();
|
|
3862
3862
|
} catch (Y) {
|
|
3863
|
-
|
|
3863
|
+
wt(Y);
|
|
3864
3864
|
} finally {
|
|
3865
3865
|
c == null || c(!1);
|
|
3866
3866
|
}
|
|
@@ -4129,7 +4129,7 @@ const { useToken: tf } = Qe, { Title: nf, Text: fr } = nn, Br = ({
|
|
|
4129
4129
|
totalItems: c,
|
|
4130
4130
|
selectedRowItems: d,
|
|
4131
4131
|
treeType: f
|
|
4132
|
-
} = ae(
|
|
4132
|
+
} = ae(Ct), { t: u } = ge(), { token: m } = tf(), h = Q(() => {
|
|
4133
4133
|
if (!n)
|
|
4134
4134
|
return null;
|
|
4135
4135
|
if ((o == null ? void 0 : o.type) === "form" && a) {
|
|
@@ -4703,7 +4703,7 @@ const gf = (e) => /* @__PURE__ */ s($e, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4703
4703
|
]
|
|
4704
4704
|
}
|
|
4705
4705
|
);
|
|
4706
|
-
},
|
|
4706
|
+
}, bt = {
|
|
4707
4707
|
date: {
|
|
4708
4708
|
placeholder: "__/__/____",
|
|
4709
4709
|
dateDisplayFormat: "DD/MM/YYYY",
|
|
@@ -4725,28 +4725,32 @@ const gf = (e) => /* @__PURE__ */ s($e, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4725
4725
|
withSeconds: yn("DD/MM/YYYY HH:mm:ss")
|
|
4726
4726
|
}), vf = (e) => {
|
|
4727
4727
|
const { currentValue: t, now: n, mode: r, showTime: o, onChange: a } = e, i = Ca();
|
|
4728
|
+
if (!t || t.trim() === "") {
|
|
4729
|
+
a(n.format(bt[r].dateInternalFormat));
|
|
4730
|
+
return;
|
|
4731
|
+
}
|
|
4728
4732
|
if (i.day.test(t)) {
|
|
4729
4733
|
const l = n.date(parseInt(t));
|
|
4730
|
-
a(l.format(
|
|
4734
|
+
a(l.format(bt[r].dateInternalFormat));
|
|
4731
4735
|
}
|
|
4732
4736
|
if (i.dayMonth.test(t)) {
|
|
4733
4737
|
const [l, c] = t.split("/").map((f) => parseInt(f)), d = n.date(l).month(c - 1);
|
|
4734
|
-
a(d.format(
|
|
4738
|
+
a(d.format(bt[r].dateInternalFormat));
|
|
4735
4739
|
}
|
|
4736
4740
|
if (i.fullDate.test(t)) {
|
|
4737
4741
|
const [l, c, d] = t.split("/").map((u) => parseInt(u)), f = n.date(l).month(c - 1).year(d);
|
|
4738
|
-
o || a(f.format(
|
|
4742
|
+
o || a(f.format(bt.date.dateInternalFormat)), a(f.format(bt.time.dateInternalFormat));
|
|
4739
4743
|
}
|
|
4740
4744
|
if (o) {
|
|
4741
4745
|
const [l, c] = t.split(" "), [d, f, u] = l.split("/").map((h) => parseInt(h));
|
|
4742
4746
|
let m = n.date(d).month(f - 1).year(u);
|
|
4743
4747
|
if (i.withHours.test(t)) {
|
|
4744
4748
|
const [h] = c.split(":").map((p) => parseInt(p));
|
|
4745
|
-
m = m.hour(h), a(m.format(
|
|
4749
|
+
m = m.hour(h), a(m.format(bt.time.dateInternalFormat));
|
|
4746
4750
|
}
|
|
4747
4751
|
if (i.withMinutes.test(t)) {
|
|
4748
4752
|
const [h, p] = c.split(":").map((y) => parseInt(y));
|
|
4749
|
-
m = m.hour(h).minute(p), a(m.format(
|
|
4753
|
+
m = m.hour(h).minute(p), a(m.format(bt.time.dateInternalFormat));
|
|
4750
4754
|
}
|
|
4751
4755
|
}
|
|
4752
4756
|
}, bf = (e, t) => {
|
|
@@ -4785,8 +4789,8 @@ const gf = (e) => /* @__PURE__ */ s($e, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4785
4789
|
return /* @__PURE__ */ s(oe, {});
|
|
4786
4790
|
const t = tt(
|
|
4787
4791
|
e,
|
|
4788
|
-
|
|
4789
|
-
).format(
|
|
4792
|
+
bt.date.dateInternalFormat
|
|
4793
|
+
).format(bt.date.dateDisplayFormat);
|
|
4790
4794
|
return /* @__PURE__ */ s(oe, { children: t });
|
|
4791
4795
|
}, [e]), If = ({
|
|
4792
4796
|
value: e,
|
|
@@ -4796,8 +4800,8 @@ const gf = (e) => /* @__PURE__ */ s($e, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
4796
4800
|
return /* @__PURE__ */ s(oe, {});
|
|
4797
4801
|
const t = tt(
|
|
4798
4802
|
e,
|
|
4799
|
-
|
|
4800
|
-
).format(
|
|
4803
|
+
bt.time.dateInternalFormat
|
|
4804
|
+
).format(bt.time.dateDisplayFormat);
|
|
4801
4805
|
return /* @__PURE__ */ s(oe, { children: t });
|
|
4802
4806
|
}, [e]), _s = ({
|
|
4803
4807
|
value: e
|
|
@@ -5215,6 +5219,14 @@ const gf = (e) => /* @__PURE__ */ s($e, { ...e, children: /* @__PURE__ */ s(wa,
|
|
|
5215
5219
|
const d = tt(`2000-01-01 ${c}`);
|
|
5216
5220
|
t == null || t(d, c);
|
|
5217
5221
|
}
|
|
5222
|
+
} else if (a.key === "Escape") {
|
|
5223
|
+
a.preventDefault();
|
|
5224
|
+
const i = a.currentTarget;
|
|
5225
|
+
i.blur();
|
|
5226
|
+
const l = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', c = Array.from(
|
|
5227
|
+
document.querySelectorAll(l)
|
|
5228
|
+
), d = c.indexOf(i);
|
|
5229
|
+
d > -1 && d < c.length - 1 && c[d + 1].focus();
|
|
5218
5230
|
}
|
|
5219
5231
|
},
|
|
5220
5232
|
[t, n]
|
|
@@ -7792,7 +7804,7 @@ const sl = _t(xh), si = (e, t = "14px -apple-system") => {
|
|
|
7792
7804
|
readonly: R,
|
|
7793
7805
|
onSelectAllRecords: T
|
|
7794
7806
|
} = e, w = q(null), [A, k] = I([]), S = q(!1), [F, P] = I(), { t: E } = ge(), H = q(r), V = ae(
|
|
7795
|
-
|
|
7807
|
+
Ct
|
|
7796
7808
|
), { title: $ = void 0, setTitle: L = void 0 } = (C ? V : {}) || {}, D = Jt(
|
|
7797
7809
|
Lt.FEATURE_MANY2ONE_SORT
|
|
7798
7810
|
), W = Q(() => {
|
|
@@ -8159,7 +8171,7 @@ function Ah(e, t) {
|
|
|
8159
8171
|
} = e, [h, p] = I(!1), [y, g] = I(!1), v = q(!1), b = q(null), [_, C] = I(), [x, R] = I(), [T, w] = I(), [A, k] = I(), [S, F] = I(200), P = q(), { height: E } = Nr(), H = ae(
|
|
8160
8172
|
Nn
|
|
8161
8173
|
), { processAction: V } = H || {}, $ = ae(
|
|
8162
|
-
|
|
8174
|
+
Ct
|
|
8163
8175
|
), {
|
|
8164
8176
|
setResults: L = void 0,
|
|
8165
8177
|
setCurrentItemIndex: D = void 0,
|
|
@@ -8296,7 +8308,7 @@ function Ah(e, t) {
|
|
|
8296
8308
|
try {
|
|
8297
8309
|
await he(We);
|
|
8298
8310
|
} catch (Pt) {
|
|
8299
|
-
|
|
8311
|
+
wt(Pt);
|
|
8300
8312
|
}
|
|
8301
8313
|
return;
|
|
8302
8314
|
}
|
|
@@ -9157,7 +9169,7 @@ const kh = _t(Ph), er = "legacy", Vh = (e) => {
|
|
|
9157
9169
|
setPreviousView: x,
|
|
9158
9170
|
setTreeType: R,
|
|
9159
9171
|
setSelectedRowItems: T
|
|
9160
|
-
} = ae(
|
|
9172
|
+
} = ae(Ct);
|
|
9161
9173
|
le(() => {
|
|
9162
9174
|
R == null || R(g);
|
|
9163
9175
|
}, [g]);
|
|
@@ -9242,7 +9254,7 @@ const kh = _t(Ph), er = "legacy", Vh = (e) => {
|
|
|
9242
9254
|
}
|
|
9243
9255
|
)
|
|
9244
9256
|
] }) : null;
|
|
9245
|
-
},
|
|
9257
|
+
}, Ct = Vl(
|
|
9246
9258
|
null
|
|
9247
9259
|
), Nh = (e) => {
|
|
9248
9260
|
const {
|
|
@@ -9311,7 +9323,7 @@ const kh = _t(Ph), er = "legacy", Vh = (e) => {
|
|
|
9311
9323
|
return await ((st = i.current) == null ? void 0 : st.submitForm());
|
|
9312
9324
|
};
|
|
9313
9325
|
return /* @__PURE__ */ s(
|
|
9314
|
-
|
|
9326
|
+
Ct.Provider,
|
|
9315
9327
|
{
|
|
9316
9328
|
value: {
|
|
9317
9329
|
title: ve,
|
|
@@ -9382,8 +9394,8 @@ const kh = _t(Ph), er = "legacy", Vh = (e) => {
|
|
|
9382
9394
|
children: t
|
|
9383
9395
|
}
|
|
9384
9396
|
);
|
|
9385
|
-
}, Mh = () => !!ae(
|
|
9386
|
-
const e = ae(
|
|
9397
|
+
}, Mh = () => !!ae(Ct), Mn = () => {
|
|
9398
|
+
const e = ae(Ct);
|
|
9387
9399
|
return e || {
|
|
9388
9400
|
title: "",
|
|
9389
9401
|
currentView: {},
|
|
@@ -9491,7 +9503,7 @@ const kh = _t(Ph), er = "legacy", Vh = (e) => {
|
|
|
9491
9503
|
fixedHeight: c,
|
|
9492
9504
|
viewData: d
|
|
9493
9505
|
} = e, [f, u] = I(!1), [m, h] = I(), p = ae(
|
|
9494
|
-
|
|
9506
|
+
Ct
|
|
9495
9507
|
), { setGraphIsLoading: y = void 0 } = p || {}, [g] = ze(M.getHandler().getView);
|
|
9496
9508
|
Dt(t, () => ({
|
|
9497
9509
|
refresh: () => {
|
|
@@ -9584,7 +9596,7 @@ const kh = _t(Ph), er = "legacy", Vh = (e) => {
|
|
|
9584
9596
|
};
|
|
9585
9597
|
}, Hh = (e, t) => {
|
|
9586
9598
|
const { view_id: n, model: r, context: o, domain: a, manualIds: i, fixedHeight: l } = e, c = ae(
|
|
9587
|
-
|
|
9599
|
+
Ct
|
|
9588
9600
|
), { setGraphIsLoading: d = void 0 } = c || {}, { error: f, loading: u, graphData: m, fetchData: h } = Lh({
|
|
9589
9601
|
view_id: n,
|
|
9590
9602
|
model: r,
|
|
@@ -9758,7 +9770,7 @@ const kh = _t(Ph), er = "legacy", Vh = (e) => {
|
|
|
9758
9770
|
style: { color: t.colorPrimaryBg }
|
|
9759
9771
|
}
|
|
9760
9772
|
) })
|
|
9761
|
-
] }), u =
|
|
9773
|
+
] }), u = St(a);
|
|
9762
9774
|
let m = r;
|
|
9763
9775
|
if (n.selectionValues.size)
|
|
9764
9776
|
m = n.selectionValues.get(r);
|
|
@@ -10223,7 +10235,7 @@ function ug(e, t) {
|
|
|
10223
10235
|
parentWidth: T,
|
|
10224
10236
|
onMustRefreshParent: w
|
|
10225
10237
|
} = e, { t: A } = ge(), [k, S] = I(!1), [F, P] = I(), [E, H] = I(), [V] = Et.useForm(), [$, L] = I(), [D, W] = I(), G = ae(fl), [j, ne] = I(), [X, we] = I(!1), B = q(), U = q({}), me = q({}), ee = q(!1), se = q(!1), Z = q(!1), z = (T !== void 0 ? T : j) < dg, Y = ae(Je), { activeId: be, getPlainValues: Oe } = Y || {}, je = q(!1), xe = ae(
|
|
10226
|
-
|
|
10238
|
+
Ct
|
|
10227
10239
|
), {
|
|
10228
10240
|
setFormIsSaving: Ce = void 0,
|
|
10229
10241
|
setFormHasChanges: fe = void 0,
|
|
@@ -10573,7 +10585,7 @@ function ug(e, t) {
|
|
|
10573
10585
|
await Wn(pe);
|
|
10574
10586
|
}
|
|
10575
10587
|
} catch (J) {
|
|
10576
|
-
|
|
10588
|
+
wt(J);
|
|
10577
10589
|
}
|
|
10578
10590
|
}, Wn = async (K) => {
|
|
10579
10591
|
const J = E == null ? void 0 : E.onChangeFields[K];
|
|
@@ -10762,7 +10774,7 @@ function ug(e, t) {
|
|
|
10762
10774
|
const De = Z.current ? he() : {}, ct = { ...pe, ...De };
|
|
10763
10775
|
K === "object" ? await Se({ action: J, context: ct }) : K === "workflow" ? await Me({ action: J }) : K === "action" && await Ze({ action: J, context: ct }), ie && rt(!1);
|
|
10764
10776
|
} catch (De) {
|
|
10765
|
-
ie && rt(!1),
|
|
10777
|
+
ie && rt(!1), wt(De);
|
|
10766
10778
|
}
|
|
10767
10779
|
}
|
|
10768
10780
|
const dr = () => !E && !F ? /* @__PURE__ */ s(et, {}) : !n && !p || !_ ? null : /* @__PURE__ */ s(oe, { children: /* @__PURE__ */ s(
|
|
@@ -13009,7 +13021,7 @@ const Og = ({
|
|
|
13009
13021
|
) });
|
|
13010
13022
|
};
|
|
13011
13023
|
function Il(e) {
|
|
13012
|
-
const { ooui: t, showLabel: n = !0, responsiveBehaviour: r } = e, o =
|
|
13024
|
+
const { ooui: t, showLabel: n = !0, responsiveBehaviour: r } = e, o = St(t.icon || ""), { t: a } = ge();
|
|
13013
13025
|
return /* @__PURE__ */ s(
|
|
13014
13026
|
"div",
|
|
13015
13027
|
{
|
|
@@ -13060,7 +13072,7 @@ function Gg(e) {
|
|
|
13060
13072
|
const { ooui: t, responsiveBehaviour: n } = e, r = t.pages, { token: o } = Qe.useToken();
|
|
13061
13073
|
function a(i) {
|
|
13062
13074
|
if (i) {
|
|
13063
|
-
const l =
|
|
13075
|
+
const l = St(i);
|
|
13064
13076
|
return l && /* @__PURE__ */ s(l, {});
|
|
13065
13077
|
}
|
|
13066
13078
|
}
|
|
@@ -13206,7 +13218,7 @@ const { useToken: Kg } = Qe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13206
13218
|
) })
|
|
13207
13219
|
] });
|
|
13208
13220
|
}, Jg = (e) => {
|
|
13209
|
-
const { ooui: t } = e, { label: n, icon: r } = t, o =
|
|
13221
|
+
const { ooui: t } = e, { label: n, icon: r } = t, o = St(r || "");
|
|
13210
13222
|
return /* @__PURE__ */ s(Ir, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ N(it, { children: [
|
|
13211
13223
|
o ? /* @__PURE__ */ s(o, {}) : null,
|
|
13212
13224
|
n
|
|
@@ -13504,6 +13516,14 @@ const { useToken: Kg } = Qe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13504
13516
|
showTime: t,
|
|
13505
13517
|
onChange: (d) => n == null ? void 0 : n(d)
|
|
13506
13518
|
});
|
|
13519
|
+
} else if (i.key === "Escape") {
|
|
13520
|
+
i.preventDefault();
|
|
13521
|
+
const l = i.currentTarget;
|
|
13522
|
+
l.blur();
|
|
13523
|
+
const c = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', d = Array.from(
|
|
13524
|
+
document.querySelectorAll(c)
|
|
13525
|
+
), f = d.indexOf(l);
|
|
13526
|
+
f > -1 && f < d.length - 1 && d[f + 1].focus();
|
|
13507
13527
|
}
|
|
13508
13528
|
},
|
|
13509
13529
|
[n, e, t]
|
|
@@ -13530,7 +13550,7 @@ const { useToken: Kg } = Qe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13530
13550
|
}, Al = nt(
|
|
13531
13551
|
(e) => {
|
|
13532
13552
|
const { value: t, onChange: n, ooui: r, showTime: o } = e, { id: a, readOnly: i, required: l } = r, c = Ia(), d = ly(l, !!i), f = o ? "time" : "date", u = Q(
|
|
13533
|
-
() => t ? tt(t,
|
|
13553
|
+
() => t ? tt(t, bt[f].dateInternalFormat) : void 0,
|
|
13534
13554
|
[t, f]
|
|
13535
13555
|
), m = O(
|
|
13536
13556
|
(g) => {
|
|
@@ -13539,7 +13559,7 @@ const { useToken: Kg } = Qe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13539
13559
|
return;
|
|
13540
13560
|
}
|
|
13541
13561
|
n == null || n(
|
|
13542
|
-
g.format(
|
|
13562
|
+
g.format(bt[f].dateInternalFormat)
|
|
13543
13563
|
);
|
|
13544
13564
|
},
|
|
13545
13565
|
[n, f]
|
|
@@ -13551,8 +13571,8 @@ const { useToken: Kg } = Qe, { TextArea: Co } = pt, qg = (e) => {
|
|
|
13551
13571
|
}), y = Q(
|
|
13552
13572
|
() => ({
|
|
13553
13573
|
style: { width: "100%", ...d },
|
|
13554
|
-
placeholder:
|
|
13555
|
-
format:
|
|
13574
|
+
placeholder: bt[f].placeholder,
|
|
13575
|
+
format: bt[f].dateDisplayFormat
|
|
13556
13576
|
}),
|
|
13557
13577
|
[f, d]
|
|
13558
13578
|
);
|
|
@@ -13833,7 +13853,7 @@ function wy(e) {
|
|
|
13833
13853
|
onAddNewAttachment: r,
|
|
13834
13854
|
onListAllAttachments: o,
|
|
13835
13855
|
onViewAttachmentDetails: a
|
|
13836
|
-
} = e, { formRef: i } = ae(
|
|
13856
|
+
} = e, { formRef: i } = ae(Ct), [l, c] = I(!1), [d, f] = I([]), [u, m] = I(!1), { t: h } = ge(), p = O(async () => {
|
|
13837
13857
|
if (!(!t || t.length === 0)) {
|
|
13838
13858
|
c(!0);
|
|
13839
13859
|
try {
|
|
@@ -13852,7 +13872,7 @@ function wy(e) {
|
|
|
13852
13872
|
}))
|
|
13853
13873
|
);
|
|
13854
13874
|
} catch (v) {
|
|
13855
|
-
|
|
13875
|
+
wt(v);
|
|
13856
13876
|
}
|
|
13857
13877
|
c(!1);
|
|
13858
13878
|
}
|
|
@@ -13871,7 +13891,7 @@ function wy(e) {
|
|
|
13871
13891
|
context: i.current.getContext()
|
|
13872
13892
|
}))[0];
|
|
13873
13893
|
} catch (_) {
|
|
13874
|
-
|
|
13894
|
+
wt(_);
|
|
13875
13895
|
}
|
|
13876
13896
|
if (m(!1), !!b)
|
|
13877
13897
|
if (b.datas) {
|
|
@@ -14464,7 +14484,7 @@ function _y({ refreshGraph: e }) {
|
|
|
14464
14484
|
graphIsLoading: c,
|
|
14465
14485
|
previousView: d,
|
|
14466
14486
|
setPreviousView: f
|
|
14467
|
-
} = ae(
|
|
14487
|
+
} = ae(Ct);
|
|
14468
14488
|
return /* @__PURE__ */ N(it, { wrap: !0, children: [
|
|
14469
14489
|
/* @__PURE__ */ s(
|
|
14470
14490
|
fa,
|
|
@@ -14523,7 +14543,7 @@ const Ry = (e) => {
|
|
|
14523
14543
|
treeView: l,
|
|
14524
14544
|
graphView: c
|
|
14525
14545
|
} = e, d = q(), f = ae(
|
|
14526
|
-
|
|
14546
|
+
Ct
|
|
14527
14547
|
), {
|
|
14528
14548
|
setResults: u = void 0,
|
|
14529
14549
|
setCurrentItemIndex: m = void 0,
|
|
@@ -14937,7 +14957,7 @@ function My(e, t) {
|
|
|
14937
14957
|
(Ae) => Ae.type === "tree"
|
|
14938
14958
|
) : d ? Ne = ce.find((Ae) => d.id ? Ae.type === d.type && Ae.view_id === d.id : Ae.type === d.type) : Ne = ce.find(
|
|
14939
14959
|
(Ae) => Ae.type === "form"
|
|
14940
|
-
), Ne || (
|
|
14960
|
+
), Ne || (wt(
|
|
14941
14961
|
`Error determining the first view to show for model ${r}.
|
|
14942
14962
|
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
|
|
14943
14963
|
), console.error(
|
|
@@ -15804,7 +15824,7 @@ const Yy = _t(Wy), Gy = (e) => {
|
|
|
15804
15824
|
borderTop: "16px solid transparent",
|
|
15805
15825
|
borderBottom: "16px solid transparent"
|
|
15806
15826
|
}), m = (h) => {
|
|
15807
|
-
const p =
|
|
15827
|
+
const p = St(h);
|
|
15808
15828
|
return p && /* @__PURE__ */ s(p, {});
|
|
15809
15829
|
};
|
|
15810
15830
|
return /* @__PURE__ */ s("ul", { style: c, children: (e.value || []).map((h, p) => /* @__PURE__ */ N("li", { style: d(h.active), children: [
|
|
@@ -15876,7 +15896,7 @@ const dv = (e) => {
|
|
|
15876
15896
|
/* @__PURE__ */ s(av, { children: /* @__PURE__ */ s(cv, { text: t.text }) })
|
|
15877
15897
|
] }, t.id);
|
|
15878
15898
|
}, ui = (e) => {
|
|
15879
|
-
const t =
|
|
15899
|
+
const t = St(e);
|
|
15880
15900
|
return t && /* @__PURE__ */ s(t, {});
|
|
15881
15901
|
}, uv = (e) => {
|
|
15882
15902
|
const { value: t, ooui: n } = e, r = (t || []).map((o) => {
|
|
@@ -15925,7 +15945,7 @@ const dv = (e) => {
|
|
|
15925
15945
|
}
|
|
15926
15946
|
function c(f) {
|
|
15927
15947
|
if (f) {
|
|
15928
|
-
const u =
|
|
15948
|
+
const u = St(f);
|
|
15929
15949
|
return u && /* @__PURE__ */ s(u, {});
|
|
15930
15950
|
}
|
|
15931
15951
|
}
|
|
@@ -16094,7 +16114,7 @@ function Tv(e, t) {
|
|
|
16094
16114
|
context: l
|
|
16095
16115
|
});
|
|
16096
16116
|
if (P.type === "ir.actions.wizard") {
|
|
16097
|
-
|
|
16117
|
+
wt("Action type not supported");
|
|
16098
16118
|
return;
|
|
16099
16119
|
}
|
|
16100
16120
|
const [E, H] = T.split(","), V = parseInt(H), $ = P.context, L = Zt({
|
|
@@ -16719,7 +16739,7 @@ export {
|
|
|
16719
16739
|
cr as Tree,
|
|
16720
16740
|
Iy as Url,
|
|
16721
16741
|
kb as dayjs,
|
|
16722
|
-
|
|
16742
|
+
St as iconMapper,
|
|
16723
16743
|
zt as showConfirmDialog
|
|
16724
16744
|
};
|
|
16725
16745
|
//# sourceMappingURL=react-ooui.es.js.map
|