@gisce/react-ooui 1.2.0-rc.41 → 1.2.0-rc.42
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormActionBar.d.ts","sourceRoot":"","sources":["FormActionBar.tsx"],"names":[],"mappings":";AA0CA,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"FormActionBar.d.ts","sourceRoot":"","sources":["FormActionBar.tsx"],"names":[],"mappings":";AA0CA,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,sBAgbnD;AAmBD,eAAe,aAAa,CAAC"}
|
package/dist/react-ooui.es.js
CHANGED
|
@@ -26508,9 +26508,8 @@ function FormActionBar({
|
|
|
26508
26508
|
tooltip: M("actions"),
|
|
26509
26509
|
items: e == null ? void 0 : e.action,
|
|
26510
26510
|
onItemClick: async (z) => {
|
|
26511
|
-
!z || !(await
|
|
26512
|
-
onFormSave: s
|
|
26513
|
-
currentId: c
|
|
26511
|
+
!z || !(await saveDocument({
|
|
26512
|
+
onFormSave: s
|
|
26514
26513
|
})).succeed || me(z);
|
|
26515
26514
|
}
|
|
26516
26515
|
}), /* @__PURE__ */ jsx(DropdownButton, {
|
|
@@ -26521,9 +26520,8 @@ function FormActionBar({
|
|
|
26521
26520
|
onItemClick: async (z) => {
|
|
26522
26521
|
if (!z)
|
|
26523
26522
|
return;
|
|
26524
|
-
const te = await
|
|
26525
|
-
onFormSave: s
|
|
26526
|
-
currentId: c
|
|
26523
|
+
const te = await saveDocument({
|
|
26524
|
+
onFormSave: s
|
|
26527
26525
|
});
|
|
26528
26526
|
!te.succeed || me({
|
|
26529
26527
|
...z,
|
|
@@ -26539,9 +26537,8 @@ function FormActionBar({
|
|
|
26539
26537
|
tooltip: M("related"),
|
|
26540
26538
|
items: e == null ? void 0 : e.relate,
|
|
26541
26539
|
onItemClick: async (z) => {
|
|
26542
|
-
!z || !(await
|
|
26543
|
-
onFormSave: s
|
|
26544
|
-
currentId: c
|
|
26540
|
+
!z || !(await saveDocument({
|
|
26541
|
+
onFormSave: s
|
|
26545
26542
|
})).succeed || J({
|
|
26546
26543
|
relateData: z,
|
|
26547
26544
|
values: T.current.getValues(),
|
|
@@ -26554,9 +26551,8 @@ function FormActionBar({
|
|
|
26554
26551
|
disabled: ce,
|
|
26555
26552
|
attachments: w,
|
|
26556
26553
|
onAddNewAttachment: async () => {
|
|
26557
|
-
const z = await
|
|
26558
|
-
onFormSave: s
|
|
26559
|
-
currentId: c
|
|
26554
|
+
const z = await saveDocument({
|
|
26555
|
+
onFormSave: s
|
|
26560
26556
|
});
|
|
26561
26557
|
if (!z.succeed)
|
|
26562
26558
|
return;
|
|
@@ -26574,9 +26570,8 @@ function FormActionBar({
|
|
|
26574
26570
|
});
|
|
26575
26571
|
},
|
|
26576
26572
|
onListAllAttachments: async () => {
|
|
26577
|
-
const z = await
|
|
26578
|
-
onFormSave: s
|
|
26579
|
-
currentId: c
|
|
26573
|
+
const z = await saveDocument({
|
|
26574
|
+
onFormSave: s
|
|
26580
26575
|
});
|
|
26581
26576
|
if (!z.succeed)
|
|
26582
26577
|
return;
|
|
@@ -26588,9 +26583,8 @@ function FormActionBar({
|
|
|
26588
26583
|
});
|
|
26589
26584
|
},
|
|
26590
26585
|
onViewAttachmentDetails: async (z) => {
|
|
26591
|
-
!(await
|
|
26592
|
-
onFormSave: s
|
|
26593
|
-
currentId: c
|
|
26586
|
+
!(await saveDocument({
|
|
26587
|
+
onFormSave: s
|
|
26594
26588
|
})).succeed || U({
|
|
26595
26589
|
model: "ir.attachment",
|
|
26596
26590
|
res_id: z.id,
|
|
@@ -26605,19 +26599,13 @@ function separator$2() {
|
|
|
26605
26599
|
className: "inline-block w-2"
|
|
26606
26600
|
});
|
|
26607
26601
|
}
|
|
26608
|
-
async function
|
|
26609
|
-
onFormSave: e
|
|
26610
|
-
currentId: r
|
|
26602
|
+
async function saveDocument({
|
|
26603
|
+
onFormSave: e
|
|
26611
26604
|
}) {
|
|
26612
|
-
|
|
26613
|
-
|
|
26614
|
-
succeed: !0,
|
|
26615
|
-
currentId: r
|
|
26616
|
-
};
|
|
26617
|
-
const a = await (e == null ? void 0 : e());
|
|
26618
|
-
return a != null && a.succeed ? {
|
|
26605
|
+
const r = await (e == null ? void 0 : e());
|
|
26606
|
+
return r != null && r.succeed ? {
|
|
26619
26607
|
succeed: !0,
|
|
26620
|
-
currentId:
|
|
26608
|
+
currentId: r.id
|
|
26621
26609
|
} : {
|
|
26622
26610
|
succeed: !1,
|
|
26623
26611
|
currentId: void 0
|