@gisce/react-ooui 2.2.0-rc.7 → 2.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentsButton.d.ts","sourceRoot":"","sources":["../../src/actionbar/AttachmentsButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,UAAU,EAEX,MAAM,4BAA4B,CAAC;AAIpC,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,uBAAuB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CAC3D,CAAC;AAEF,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAmHvD;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"AttachmentsButton.d.ts","sourceRoot":"","sources":["../../src/actionbar/AttachmentsButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,UAAU,EAEX,MAAM,4BAA4B,CAAC;AAIpC,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,uBAAuB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CAC3D,CAAC;AAEF,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAgHvD;AAED,eAAe,iBAAiB,CAAC"}
@@ -6774,28 +6774,26 @@ function Dc(e) {
6774
6774
  onListAllAttachments: o,
6775
6775
  onViewAttachmentDetails: s
6776
6776
  } = e, { formRef: a } = ne(ot), [l, d] = w(!1), [u, f] = w([]), [c, m] = w(!1), { t: p } = pe(), h = be(async () => {
6777
- if (!(!t || t.length === 0)) {
6778
- d(!0);
6779
- try {
6780
- const v = await N.getHandler().readObjects({
6781
- model: "ir.attachment",
6782
- ids: t.map((T) => T.id),
6783
- fieldsToRetrieve: ["name", "datas_fname", "link"],
6784
- context: a.current.getContext()
6785
- });
6786
- f(
6787
- v.map((T) => ({
6788
- id: T.id,
6789
- name: T.name,
6790
- datas_fname: T.datas_fname,
6791
- link: T.link
6792
- }))
6793
- );
6794
- } catch (v) {
6795
- ze(v);
6796
- }
6797
- d(!1);
6777
+ d(!0);
6778
+ try {
6779
+ const v = await N.getHandler().readObjects({
6780
+ model: "ir.attachment",
6781
+ ids: t.map((T) => T.id),
6782
+ fieldsToRetrieve: ["name", "datas_fname", "link"],
6783
+ context: a.current.getContext()
6784
+ });
6785
+ f(
6786
+ v.map((T) => ({
6787
+ id: T.id,
6788
+ name: T.name,
6789
+ datas_fname: T.datas_fname,
6790
+ link: T.link
6791
+ }))
6792
+ );
6793
+ } catch (v) {
6794
+ ze(v);
6798
6795
  }
6796
+ d(!1);
6799
6797
  }, [t, a]), g = be(
6800
6798
  async (v) => {
6801
6799
  if (v.link) {