@gisce/react-ooui 1.1.33-rc.0 → 1.1.34-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/actionbar/FormActionBar.d.ts.map +1 -1
- package/dist/context/ActionViewContext.d.ts +1 -1
- package/dist/context/ActionViewContext.d.ts.map +1 -1
- package/dist/react-ooui.es.js +21 -17
- 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/package.json +1 -1
- package/src/actionbar/FormActionBar.tsx +39 -5
- package/src/context/ActionViewContext.tsx +3 -3
|
@@ -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,sBAganD;AAMD,eAAe,aAAa,CAAC"}
|
|
@@ -9,7 +9,7 @@ export declare type ActionViewContextType = {
|
|
|
9
9
|
setFormIsSaving?: (value: boolean) => void;
|
|
10
10
|
formHasChanges?: boolean;
|
|
11
11
|
setFormHasChanges?: (value: boolean) => void;
|
|
12
|
-
onFormSave?: () => void
|
|
12
|
+
onFormSave?: () => Promise<void>;
|
|
13
13
|
formRef?: any;
|
|
14
14
|
searchTreeRef?: any;
|
|
15
15
|
onNewClicked: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionViewContext.d.ts","sourceRoot":"","sources":["ActionViewContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;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Z == null ? void 0 : Z.view_id) === r.view_id && o.length > 1 && P(o.filter((oe) => oe.view_id !== r.view_id)[0]);
|
|
13242
13242
|
}, [r]);
|
|
13243
|
-
const te = () => {
|
|
13243
|
+
const te = async () => {
|
|
13244
13244
|
var oe;
|
|
13245
|
-
(oe = s.current) == null
|
|
13245
|
+
await ((oe = s.current) == null ? void 0 : oe.submitForm());
|
|
13246
13246
|
};
|
|
13247
13247
|
return /* @__PURE__ */ jsx(ActionViewContext.Provider, {
|
|
13248
13248
|
value: {
|
|
@@ -23373,16 +23373,16 @@ function FormActionBar({
|
|
|
23373
23373
|
disabled: U,
|
|
23374
23374
|
tooltip: S("actions"),
|
|
23375
23375
|
items: e == null ? void 0 : e.action,
|
|
23376
|
-
onItemClick: (k) => {
|
|
23377
|
-
!k || B(k);
|
|
23376
|
+
onItemClick: async (k) => {
|
|
23377
|
+
!k || !await (a == null ? void 0 : a()) || B(k);
|
|
23378
23378
|
}
|
|
23379
23379
|
}), /* @__PURE__ */ jsx(DropdownButton, {
|
|
23380
23380
|
icon: /* @__PURE__ */ jsx(PrinterOutlined, {}),
|
|
23381
23381
|
disabled: U,
|
|
23382
23382
|
tooltip: S("reports"),
|
|
23383
23383
|
items: e == null ? void 0 : e.print,
|
|
23384
|
-
onItemClick: (k) => {
|
|
23385
|
-
!k || B({
|
|
23384
|
+
onItemClick: async (k) => {
|
|
23385
|
+
!k || !await (a == null ? void 0 : a()) || B({
|
|
23386
23386
|
...k,
|
|
23387
23387
|
datas: {
|
|
23388
23388
|
...k.datas || {},
|
|
@@ -23396,7 +23396,7 @@ function FormActionBar({
|
|
|
23396
23396
|
tooltip: S("related"),
|
|
23397
23397
|
items: e == null ? void 0 : e.relate,
|
|
23398
23398
|
onItemClick: async (k) => {
|
|
23399
|
-
!k || D({
|
|
23399
|
+
!k || !await (a == null ? void 0 : a()) || D({
|
|
23400
23400
|
relateData: k,
|
|
23401
23401
|
values: _.current.getValues(),
|
|
23402
23402
|
fields: _.current.getFields(),
|
|
@@ -23407,30 +23407,34 @@ function FormActionBar({
|
|
|
23407
23407
|
}), /* @__PURE__ */ jsx(AttachmentsButton, {
|
|
23408
23408
|
disabled: U,
|
|
23409
23409
|
attachments: x,
|
|
23410
|
-
onAddNewAttachment: () => {
|
|
23411
|
-
|
|
23410
|
+
onAddNewAttachment: async () => {
|
|
23411
|
+
if (!await (a == null ? void 0 : a()))
|
|
23412
|
+
return;
|
|
23413
|
+
const $ = u, L = p;
|
|
23412
23414
|
j({
|
|
23413
23415
|
model: "ir.attachment",
|
|
23414
23416
|
values: {
|
|
23415
|
-
selection_associated_object: `${
|
|
23417
|
+
selection_associated_object: `${L},${$}`
|
|
23416
23418
|
},
|
|
23417
23419
|
forced_values: {
|
|
23418
|
-
res_model:
|
|
23419
|
-
res_id:
|
|
23420
|
+
res_model: L,
|
|
23421
|
+
res_id: $
|
|
23420
23422
|
},
|
|
23421
23423
|
initialViewType: "form"
|
|
23422
23424
|
});
|
|
23423
23425
|
},
|
|
23424
|
-
onListAllAttachments: () => {
|
|
23425
|
-
|
|
23426
|
+
onListAllAttachments: async () => {
|
|
23427
|
+
if (!await (a == null ? void 0 : a()))
|
|
23428
|
+
return;
|
|
23429
|
+
const $ = u;
|
|
23426
23430
|
j({
|
|
23427
23431
|
model: "ir.attachment",
|
|
23428
|
-
domain: [["res_model", "=", `${p}`], ["res_id", "=", `${
|
|
23432
|
+
domain: [["res_model", "=", `${p}`], ["res_id", "=", `${$}`]],
|
|
23429
23433
|
initialViewType: "tree"
|
|
23430
23434
|
});
|
|
23431
23435
|
},
|
|
23432
|
-
onViewAttachmentDetails: (k) => {
|
|
23433
|
-
j({
|
|
23436
|
+
onViewAttachmentDetails: async (k) => {
|
|
23437
|
+
!await (a == null ? void 0 : a()) || j({
|
|
23434
23438
|
model: "ir.attachment",
|
|
23435
23439
|
res_id: k.id,
|
|
23436
23440
|
initialViewType: "form"
|