@gisce/react-ooui 1.2.0-rc.5 → 1.2.0-rc.7
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
|
@@ -13236,8 +13236,8 @@ function require_stream_readable() {
|
|
|
13236
13236
|
Ne.pipesCount += 1, d("pipe count=%d opts=%j", Ne.pipesCount, M);
|
|
13237
13237
|
var tt = (!M || M.end !== !1) && L !== process.stdout && L !== process.stderr, je = tt ? yt : Ut;
|
|
13238
13238
|
Ne.endEmitted ? process.nextTick(je) : Te.once("end", je), L.on("unpipe", Ge);
|
|
13239
|
-
function Ge(
|
|
13240
|
-
d("onunpipe"),
|
|
13239
|
+
function Ge(Kt, Gt) {
|
|
13240
|
+
d("onunpipe"), Kt === Te && Gt && Gt.hasUnpiped === !1 && (Gt.hasUnpiped = !0, $t());
|
|
13241
13241
|
}
|
|
13242
13242
|
function yt() {
|
|
13243
13243
|
d("onend"), L.end();
|
|
@@ -13249,13 +13249,13 @@ function require_stream_readable() {
|
|
|
13249
13249
|
d("cleanup"), L.removeListener("close", Dt), L.removeListener("finish", zt), L.removeListener("drain", Tt), L.removeListener("error", Ct), L.removeListener("unpipe", Ge), Te.removeListener("end", yt), Te.removeListener("end", Ut), Te.removeListener("data", Vt), Ot = !0, Ne.awaitDrain && (!L._writableState || L._writableState.needDrain) && Tt();
|
|
13250
13250
|
}
|
|
13251
13251
|
Te.on("data", Vt);
|
|
13252
|
-
function Vt(
|
|
13252
|
+
function Vt(Kt) {
|
|
13253
13253
|
d("ondata");
|
|
13254
|
-
var Gt = L.write(
|
|
13254
|
+
var Gt = L.write(Kt);
|
|
13255
13255
|
d("dest.write", Gt), Gt === !1 && ((Ne.pipesCount === 1 && Ne.pipes === L || Ne.pipesCount > 1 && Fe(Ne.pipes, L) !== -1) && !Ot && (d("false write response, pause", Ne.awaitDrain), Ne.awaitDrain++), Te.pause());
|
|
13256
13256
|
}
|
|
13257
|
-
function Ct(
|
|
13258
|
-
d("onerror",
|
|
13257
|
+
function Ct(Kt) {
|
|
13258
|
+
d("onerror", Kt), Ut(), L.removeListener("error", Ct), r(L, "error") === 0 && _(L, Kt);
|
|
13259
13259
|
}
|
|
13260
13260
|
N(L, "error", Ct);
|
|
13261
13261
|
function Dt() {
|
|
@@ -16517,7 +16517,7 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
16517
16517
|
}) : [...de.current];
|
|
16518
16518
|
if (j(Dt), y && Dt.length > 0) {
|
|
16519
16519
|
const Ut = Dt.findIndex(
|
|
16520
|
-
(
|
|
16520
|
+
(Kt) => O === Kt.id
|
|
16521
16521
|
);
|
|
16522
16522
|
Ut === -1 ? C == null || C(0) : C == null || C(Ut);
|
|
16523
16523
|
} else
|
|
@@ -17089,7 +17089,7 @@ function Form(e, r) {
|
|
|
17089
17089
|
submitForm: vn,
|
|
17090
17090
|
getFields: zt,
|
|
17091
17091
|
getValues: Ut,
|
|
17092
|
-
getPlainValues:
|
|
17092
|
+
getPlainValues: Kt,
|
|
17093
17093
|
getContext: fn,
|
|
17094
17094
|
fetchValues: pn,
|
|
17095
17095
|
cancelUnsavedChanges: un,
|
|
@@ -17131,12 +17131,12 @@ function Form(e, r) {
|
|
|
17131
17131
|
gt[Qe] === void 0 && delete gt[Qe];
|
|
17132
17132
|
return gt;
|
|
17133
17133
|
}
|
|
17134
|
-
function
|
|
17134
|
+
function Kt() {
|
|
17135
17135
|
const gt = Ut(), Qe = zt();
|
|
17136
17136
|
let Mt = {};
|
|
17137
17137
|
return Object.keys(gt).forEach((Lt) => {
|
|
17138
|
-
const
|
|
17139
|
-
Qe[Lt] && Qe[Lt].type === "many2one" &&
|
|
17138
|
+
const Qt = gt[Lt];
|
|
17139
|
+
Qe[Lt] && Qe[Lt].type === "many2one" && Qt && Array.isArray(Qt) && Qt.length === 2 ? Mt[Lt] = Qt[0] : Qe[Lt] && (Qe[Lt].type === "one2many" || Qe[Lt].type === "many2many") && Qt && Qt.items ? Mt[Lt] = Qt.items.filter((gn) => gn.operation !== "pendingRemove").map((gn) => gn.id) : Mt[Lt] = Qt;
|
|
17140
17140
|
}), Mt;
|
|
17141
17141
|
}
|
|
17142
17142
|
function Gt() {
|
|
@@ -17217,10 +17217,10 @@ function Form(e, r) {
|
|
|
17217
17217
|
W(Qe != null && Qe.message ? Qe.message + Qe.stack : Qe), je == null || je(!1);
|
|
17218
17218
|
}
|
|
17219
17219
|
}, pn = async (gt) => {
|
|
17220
|
-
let Qe, Mt, Lt,
|
|
17220
|
+
let Qe, Mt, Lt, Qt;
|
|
17221
17221
|
je == null || je(!0), W(void 0), gt ? (Mt = gt.fields, Lt = gt.arch) : (Mt = ee, Lt = Q), m ? Qe = m : {
|
|
17222
17222
|
values: Qe,
|
|
17223
|
-
defaultGetCalled:
|
|
17223
|
+
defaultGetCalled: Qt
|
|
17224
17224
|
} = await wn({
|
|
17225
17225
|
fields: Mt,
|
|
17226
17226
|
arch: Lt
|
|
@@ -17231,12 +17231,12 @@ function Form(e, r) {
|
|
|
17231
17231
|
values: Qe,
|
|
17232
17232
|
fields: Mt,
|
|
17233
17233
|
reset: !0,
|
|
17234
|
-
isDefaultGet:
|
|
17234
|
+
isDefaultGet: Qt
|
|
17235
17235
|
}), yn({
|
|
17236
17236
|
fields: Mt,
|
|
17237
17237
|
arch: Lt,
|
|
17238
17238
|
values: Qe
|
|
17239
|
-
}), je == null || je(!1), Ne == null || Ne(!1),
|
|
17239
|
+
}), je == null || je(!1), Ne == null || Ne(!1), Qt && xe(!0);
|
|
17240
17240
|
};
|
|
17241
17241
|
function tn(gt, Qe) {
|
|
17242
17242
|
de.current[gt] = Qe, Ne == null || Ne(Ft());
|
|
@@ -17294,13 +17294,13 @@ function Form(e, r) {
|
|
|
17294
17294
|
fields: gt,
|
|
17295
17295
|
context: y
|
|
17296
17296
|
}))[0];
|
|
17297
|
-
const
|
|
17297
|
+
const Qt = await ConnectionProvider.getHandler().search({
|
|
17298
17298
|
params: [["res_model", "=", o], ["res_id", "=", Dt()]],
|
|
17299
17299
|
fields: ["id", "name"],
|
|
17300
17300
|
context: fn(),
|
|
17301
17301
|
model: "ir.attachment"
|
|
17302
17302
|
});
|
|
17303
|
-
Ge == null || Ge(
|
|
17303
|
+
Ge == null || Ge(Qt);
|
|
17304
17304
|
} else
|
|
17305
17305
|
Ge == null || Ge([]), Mt = await _t(gt), Lt = !0;
|
|
17306
17306
|
return {
|
|
@@ -17378,7 +17378,7 @@ function Form(e, r) {
|
|
|
17378
17378
|
arch: Qe,
|
|
17379
17379
|
values: Mt
|
|
17380
17380
|
}) => {
|
|
17381
|
-
var
|
|
17381
|
+
var Qt;
|
|
17382
17382
|
const Lt = new Form$4(gt);
|
|
17383
17383
|
Lt.parse(Qe, {
|
|
17384
17384
|
readOnly: p,
|
|
@@ -17386,7 +17386,7 @@ function Form(e, r) {
|
|
|
17386
17386
|
...Mt,
|
|
17387
17387
|
...nn()
|
|
17388
17388
|
}
|
|
17389
|
-
}), z(Lt), ue && Lt.string && ((
|
|
17389
|
+
}), z(Lt), ue && Lt.string && ((Qt = ue.setTitle) == null || Qt.call(ue, Lt.string));
|
|
17390
17390
|
}, Cn = async ({
|
|
17391
17391
|
elementHasLostFocus: gt = !1
|
|
17392
17392
|
}) => {
|
|
@@ -17445,39 +17445,39 @@ function Form(e, r) {
|
|
|
17445
17445
|
fields: ee
|
|
17446
17446
|
});
|
|
17447
17447
|
if (Lt.value) {
|
|
17448
|
-
const
|
|
17448
|
+
const Qt = {
|
|
17449
17449
|
...Wt(ee),
|
|
17450
17450
|
...Lt.value
|
|
17451
17451
|
};
|
|
17452
17452
|
yn({
|
|
17453
17453
|
fields: ee,
|
|
17454
17454
|
arch: Q,
|
|
17455
|
-
values:
|
|
17455
|
+
values: Qt
|
|
17456
17456
|
}), In({
|
|
17457
|
-
values:
|
|
17457
|
+
values: Qt,
|
|
17458
17458
|
fields: ee,
|
|
17459
17459
|
reset: !1
|
|
17460
17460
|
});
|
|
17461
17461
|
}
|
|
17462
17462
|
if (Lt.warning && Lt.warning.title && Lt.warning.message && !U.current) {
|
|
17463
17463
|
const {
|
|
17464
|
-
title:
|
|
17464
|
+
title: Qt,
|
|
17465
17465
|
message: gn
|
|
17466
17466
|
} = Lt.warning;
|
|
17467
|
-
U.current = !0, showDialog$4(
|
|
17467
|
+
U.current = !0, showDialog$4(Qt, gn, () => {
|
|
17468
17468
|
U.current = !1;
|
|
17469
17469
|
});
|
|
17470
17470
|
}
|
|
17471
17471
|
if (Lt.domain && Object.keys(Lt.domain).length > 0) {
|
|
17472
|
-
const
|
|
17472
|
+
const Qt = mergeFieldsDomain({
|
|
17473
17473
|
fieldsDomain: Lt.domain,
|
|
17474
17474
|
fields: ee
|
|
17475
17475
|
});
|
|
17476
17476
|
yn({
|
|
17477
|
-
fields:
|
|
17477
|
+
fields: Qt,
|
|
17478
17478
|
arch: Q,
|
|
17479
|
-
values: Wt(
|
|
17480
|
-
}), X(
|
|
17479
|
+
values: Wt(Qt)
|
|
17480
|
+
}), X(Qt);
|
|
17481
17481
|
}
|
|
17482
17482
|
};
|
|
17483
17483
|
async function Fn({
|
|
@@ -17596,7 +17596,7 @@ function Form(e, r) {
|
|
|
17596
17596
|
const Dn = () => !J && !A ? /* @__PURE__ */ jsx(Spin, {}) : !o && !I || !O ? null : /* @__PURE__ */ jsx(Fragment, {
|
|
17597
17597
|
children: /* @__PURE__ */ jsx(FormProvider$1, {
|
|
17598
17598
|
getValues: Ut,
|
|
17599
|
-
getPlainValues:
|
|
17599
|
+
getPlainValues: Kt,
|
|
17600
17600
|
getFields: zt,
|
|
17601
17601
|
domain: v,
|
|
17602
17602
|
activeId: a,
|
|
@@ -18688,7 +18688,7 @@ function SearchTree(e, r) {
|
|
|
18688
18688
|
getResults: Dt,
|
|
18689
18689
|
requestPageChange: zt,
|
|
18690
18690
|
changeSort: Ut,
|
|
18691
|
-
fetchChildrenForRecord:
|
|
18691
|
+
fetchChildrenForRecord: Kt,
|
|
18692
18692
|
colorsForResults: Gt,
|
|
18693
18693
|
totalItems: fn
|
|
18694
18694
|
} = useSearch({
|
|
@@ -18833,7 +18833,7 @@ function SearchTree(e, r) {
|
|
|
18833
18833
|
},
|
|
18834
18834
|
sorter: U,
|
|
18835
18835
|
onChangeSort: Ut,
|
|
18836
|
-
onFetchChildrenForRecord: w.isExpandable ?
|
|
18836
|
+
onFetchChildrenForRecord: w.isExpandable ? Kt : void 0,
|
|
18837
18837
|
childField: w.field_parent
|
|
18838
18838
|
})]
|
|
18839
18839
|
}), pn = E || $t;
|
|
@@ -21891,7 +21891,7 @@ function requireBase() {
|
|
|
21891
21891
|
}, {
|
|
21892
21892
|
key: "renderContent",
|
|
21893
21893
|
value: function() {
|
|
21894
|
-
var de = this, j = this.state, U = j.ellipsisContent, oe = j.isEllipsis, Re = j.expanded, Fe = this.props, L = Fe.component, M = Fe.children, Te = Fe.className, Ne = Fe.type, tt = Fe.disabled, je = Fe.style, Ge = Y(Fe, ["component", "children", "className", "type", "disabled", "style"]), yt = this.context.direction, Tt = this.getEllipsis(), Ot = Tt.rows, $t = Tt.suffix, Vt = Tt.tooltip, Ct = this.getPrefixCls(), Dt = (0, C.default)(Ge, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, s.default)(w.configConsumerProps))), zt = this.canUseCSSEllipsis(), Ut = Ot === 1 && zt,
|
|
21894
|
+
var de = this, j = this.state, U = j.ellipsisContent, oe = j.isEllipsis, Re = j.expanded, Fe = this.props, L = Fe.component, M = Fe.children, Te = Fe.className, Ne = Fe.type, tt = Fe.disabled, je = Fe.style, Ge = Y(Fe, ["component", "children", "className", "type", "disabled", "style"]), yt = this.context.direction, Tt = this.getEllipsis(), Ot = Tt.rows, $t = Tt.suffix, Vt = Tt.tooltip, Ct = this.getPrefixCls(), Dt = (0, C.default)(Ge, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, s.default)(w.configConsumerProps))), zt = this.canUseCSSEllipsis(), Ut = Ot === 1 && zt, Kt = Ot && Ot > 1 && zt, Gt = M;
|
|
21895
21895
|
if (Ot && oe && !Re && !zt) {
|
|
21896
21896
|
var fn = Ge.title, nn = fn || "";
|
|
21897
21897
|
!fn && (typeof M == "string" || typeof M == "number") && (nn = String(M)), nn = nn == null ? void 0 : nn.slice(String(U || "").length), Gt = /* @__PURE__ */ h.createElement(h.Fragment, null, U, /* @__PURE__ */ h.createElement("span", {
|
|
@@ -21910,9 +21910,9 @@ function requireBase() {
|
|
|
21910
21910
|
onResize: de.resizeOnNextFrame,
|
|
21911
21911
|
disabled: !Ot
|
|
21912
21912
|
}, /* @__PURE__ */ h.createElement(W.default, (0, c.default)({
|
|
21913
|
-
className: (0, g.default)((Ft = {}, (0, a.default)(Ft, "".concat(Ct, "-").concat(Ne), Ne), (0, a.default)(Ft, "".concat(Ct, "-disabled"), tt), (0, a.default)(Ft, "".concat(Ct, "-ellipsis"), Ot), (0, a.default)(Ft, "".concat(Ct, "-ellipsis-single-line"), Ut), (0, a.default)(Ft, "".concat(Ct, "-ellipsis-multiple-line"),
|
|
21913
|
+
className: (0, g.default)((Ft = {}, (0, a.default)(Ft, "".concat(Ct, "-").concat(Ne), Ne), (0, a.default)(Ft, "".concat(Ct, "-disabled"), tt), (0, a.default)(Ft, "".concat(Ct, "-ellipsis"), Ot), (0, a.default)(Ft, "".concat(Ct, "-ellipsis-single-line"), Ut), (0, a.default)(Ft, "".concat(Ct, "-ellipsis-multiple-line"), Kt), Ft), Te),
|
|
21914
21914
|
style: (0, c.default)((0, c.default)({}, je), {
|
|
21915
|
-
WebkitLineClamp:
|
|
21915
|
+
WebkitLineClamp: Kt ? Ot : void 0
|
|
21916
21916
|
}),
|
|
21917
21917
|
component: L,
|
|
21918
21918
|
ref: de.contentRef,
|
|
@@ -22962,7 +22962,7 @@ const One2manyInput = (e) => {
|
|
|
22962
22962
|
F(!1);
|
|
22963
22963
|
}
|
|
22964
22964
|
};
|
|
22965
|
-
function
|
|
22965
|
+
function Kt() {
|
|
22966
22966
|
const _t = ViewObjects[c];
|
|
22967
22967
|
if (c === "graph")
|
|
22968
22968
|
return parseGraph(s.get("graph").arch).string;
|
|
@@ -23052,7 +23052,7 @@ const One2manyInput = (e) => {
|
|
|
23052
23052
|
return _ ? /* @__PURE__ */ jsx(Spin, {}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
23053
23053
|
children: [/* @__PURE__ */ jsx(One2manyTopBar, {
|
|
23054
23054
|
mode: c,
|
|
23055
|
-
title:
|
|
23055
|
+
title: Kt(),
|
|
23056
23056
|
readOnly: xe,
|
|
23057
23057
|
isMany2Many: U,
|
|
23058
23058
|
formHasChanges: O,
|
|
@@ -29026,20 +29026,20 @@ function ActionView(e, r) {
|
|
|
29026
29026
|
F(!0);
|
|
29027
29027
|
const Ct = [];
|
|
29028
29028
|
for (const zt of l) {
|
|
29029
|
-
const [Ut,
|
|
29029
|
+
const [Ut, Kt] = zt;
|
|
29030
29030
|
let Gt;
|
|
29031
29031
|
try {
|
|
29032
|
-
|
|
29032
|
+
Kt !== "dashboard" && (Gt = await ConnectionProvider.getHandler().getView({
|
|
29033
29033
|
model: a,
|
|
29034
|
-
type:
|
|
29034
|
+
type: Kt,
|
|
29035
29035
|
id: Ut,
|
|
29036
29036
|
context: s
|
|
29037
29037
|
}));
|
|
29038
29038
|
} catch (fn) {
|
|
29039
|
-
console.error(`${a} - ${
|
|
29039
|
+
console.error(`${a} - ${Kt}\xA0- ${JSON.stringify(fn, null, 2)}`);
|
|
29040
29040
|
continue;
|
|
29041
29041
|
}
|
|
29042
|
-
switch (
|
|
29042
|
+
switch (Kt) {
|
|
29043
29043
|
case "dashboard": {
|
|
29044
29044
|
const fn = l.find((_t) => {
|
|
29045
29045
|
const [, Ft] = _t;
|
|
@@ -29065,20 +29065,23 @@ function ActionView(e, r) {
|
|
|
29065
29065
|
}
|
|
29066
29066
|
case "form": {
|
|
29067
29067
|
Ct.push({
|
|
29068
|
-
...Gt
|
|
29068
|
+
...Gt,
|
|
29069
|
+
type: Kt
|
|
29069
29070
|
});
|
|
29070
29071
|
break;
|
|
29071
29072
|
}
|
|
29072
29073
|
case "tree": {
|
|
29073
29074
|
Ct.push({
|
|
29074
29075
|
...Gt,
|
|
29075
|
-
isExpandable: C
|
|
29076
|
+
isExpandable: C,
|
|
29077
|
+
type: Kt
|
|
29076
29078
|
});
|
|
29077
29079
|
break;
|
|
29078
29080
|
}
|
|
29079
29081
|
case "graph": {
|
|
29080
29082
|
Ct.push({
|
|
29081
|
-
...Gt
|
|
29083
|
+
...Gt,
|
|
29084
|
+
type: Kt
|
|
29082
29085
|
});
|
|
29083
29086
|
break;
|
|
29084
29087
|
}
|
|
@@ -29104,17 +29107,17 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
29104
29107
|
Te === d && (y.type === "form" && !await U.current.cancelUnsavedChanges() || Ce(!0));
|
|
29105
29108
|
}
|
|
29106
29109
|
async function Ot(Ct) {
|
|
29107
|
-
var
|
|
29110
|
+
var Kt;
|
|
29108
29111
|
xe(!0);
|
|
29109
29112
|
const Dt = Y.findIndex((Gt) => Gt.id === Ct);
|
|
29110
29113
|
let zt;
|
|
29111
29114
|
if (Dt === -1) {
|
|
29112
29115
|
try {
|
|
29113
|
-
zt = (
|
|
29116
|
+
zt = (Kt = await ConnectionProvider.getHandler().readObjects({
|
|
29114
29117
|
model: a,
|
|
29115
29118
|
ids: [Ct],
|
|
29116
29119
|
context: s
|
|
29117
|
-
})) == null ? void 0 :
|
|
29120
|
+
})) == null ? void 0 : Kt[0];
|
|
29118
29121
|
} catch {
|
|
29119
29122
|
}
|
|
29120
29123
|
if (!zt) {
|