@gisce/react-ooui 1.2.0-rc.78 → 1.2.0-rc.79

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":"AttachmentsButtonWrapper.d.ts","sourceRoot":"","sources":["AttachmentsButtonWrapper.tsx"],"names":[],"mappings":";AAYA,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,6BAA6B,GAAG;IAC1C,WAAW,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;IACtC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,oBAAoB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACvD,sBAAsB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAC5B,6BAA6B,gBA8BrC,CAAC"}
1
+ {"version":3,"file":"AttachmentsButtonWrapper.d.ts","sourceRoot":"","sources":["AttachmentsButtonWrapper.tsx"],"names":[],"mappings":";AAgBA,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,6BAA6B,GAAG;IAC1C,WAAW,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;IACtC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,oBAAoB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACvD,sBAAsB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAC5B,6BAA6B,gBA8BrC,CAAC"}
@@ -15027,7 +15027,7 @@ async function getViewsAndInitialView({
15027
15027
  type: t.split(",")[0]
15028
15028
  };
15029
15029
  else {
15030
- const u = t.split(",")[0], [l] = e.find(([c, d]) => d === u);
15030
+ const u = t.split(",")[0], [l] = o.find(([c, d]) => d === u);
15031
15031
  s = {
15032
15032
  id: l,
15033
15033
  type: u
@@ -25298,8 +25298,9 @@ const AttachmentsButtonWrapper = (e) => {
25298
25298
  numberOfAttachments: t,
25299
25299
  disabled: r
25300
25300
  } = e, {
25301
- t: n
25302
- } = useContext(LocaleContext), [a, o] = useState$1(!1), s = /* @__PURE__ */ jsxs(Button$1, {
25301
+ t: n,
25302
+ lang: a
25303
+ } = useContext(LocaleContext), [o, s] = useState$1(!1), u = /* @__PURE__ */ jsxs(Button$1, {
25303
25304
  disabled: r,
25304
25305
  children: [/* @__PURE__ */ jsx(LinkOutlined, {}), `(${t})`, /* @__PURE__ */ jsx(DownOutlined, {
25305
25306
  style: {
@@ -25307,27 +25308,25 @@ const AttachmentsButtonWrapper = (e) => {
25307
25308
  }
25308
25309
  })]
25309
25310
  });
25310
- return r ? s : /* @__PURE__ */ jsx(Popover, {
25311
- onVisibleChange: (u) => o(u),
25312
- visible: a,
25311
+ return r ? u : /* @__PURE__ */ jsx(Popover, {
25312
+ onVisibleChange: (l) => s(l),
25313
+ visible: o,
25313
25314
  placement: "bottom",
25314
- content: Content$1(e, o),
25315
+ content: Content$1(e, s, a),
25315
25316
  title: n("attachments"),
25316
25317
  arrowContent: null,
25317
- children: s
25318
+ children: u
25318
25319
  });
25319
- }, Content$1 = (e, t) => {
25320
+ }, Content$1 = (e, t, r) => {
25320
25321
  const {
25321
- attachments: r = [],
25322
- loading: n,
25323
- onAddNewAttachment: a,
25324
- onopenAttachmentLink: o,
25325
- onOpenAttachmentDetail: s,
25326
- onListAllAttachments: u
25327
- } = e, {
25328
- t: l
25329
- } = useContext(LocaleContext);
25330
- return n ? /* @__PURE__ */ jsx(Spin, {
25322
+ attachments: n = [],
25323
+ loading: a,
25324
+ onAddNewAttachment: o,
25325
+ onopenAttachmentLink: s,
25326
+ onOpenAttachmentDetail: u,
25327
+ onListAllAttachments: l
25328
+ } = e;
25329
+ return a ? /* @__PURE__ */ jsx(Spin, {
25331
25330
  style: {
25332
25331
  padding: 20
25333
25332
  }
@@ -25339,22 +25338,22 @@ const AttachmentsButtonWrapper = (e) => {
25339
25338
  },
25340
25339
  href: "#",
25341
25340
  onClick: () => {
25342
- t(!1), u();
25341
+ t(!1), l();
25343
25342
  },
25344
- children: [/* @__PURE__ */ jsx(TableOutlined, {}), " ", l("listAllAttachments")]
25343
+ children: [/* @__PURE__ */ jsx(TableOutlined, {}), " ", tForLang("listAllAttachments", r)]
25345
25344
  }), /* @__PURE__ */ jsxs("a", {
25346
25345
  style: {
25347
25346
  display: "block"
25348
25347
  },
25349
25348
  href: "#",
25350
25349
  onClick: () => {
25351
- t(!1), a();
25350
+ t(!1), o();
25352
25351
  },
25353
- children: [/* @__PURE__ */ jsx(FileAddOutlined, {}), " ", l("addNewAttachment")]
25354
- }), r.length > 0 && /* @__PURE__ */ jsxs(Fragment, {
25352
+ children: [/* @__PURE__ */ jsx(FileAddOutlined, {}), " ", tForLang("addNewAttachment", r)]
25353
+ }), n.length > 0 && /* @__PURE__ */ jsxs(Fragment, {
25355
25354
  children: [/* @__PURE__ */ jsx("li", {
25356
- className: " ant-dropdown-menu-item-divider"
25357
- }), r.map((c) => {
25355
+ className: "ant-dropdown-menu-item-divider"
25356
+ }), n.map((c) => {
25358
25357
  const d = c.link ? LinkOutlined : DownloadOutlined;
25359
25358
  return /* @__PURE__ */ jsxs(Row, {
25360
25359
  style: {
@@ -25372,13 +25371,13 @@ const AttachmentsButtonWrapper = (e) => {
25372
25371
  textAlign: "center"
25373
25372
  },
25374
25373
  children: (c.datas_fname || c.link) && /* @__PURE__ */ jsx(Tooltip$2, {
25375
- title: c.link ? l("openAttachmentLink") : l("download"),
25374
+ title: c.link ? tForLang("openAttachmentLink", r) : tForLang("download", r),
25376
25375
  children: /* @__PURE__ */ jsx(d, {
25377
25376
  style: {
25378
25377
  cursor: "pointer"
25379
25378
  },
25380
25379
  onClick: () => {
25381
- t(!1), o(c);
25380
+ t(!1), s(c);
25382
25381
  }
25383
25382
  })
25384
25383
  })
@@ -25388,13 +25387,13 @@ const AttachmentsButtonWrapper = (e) => {
25388
25387
  textAlign: "center"
25389
25388
  },
25390
25389
  children: /* @__PURE__ */ jsx(Tooltip$2, {
25391
- title: l("openAttachment"),
25390
+ title: tForLang("openAttachment", r),
25392
25391
  children: /* @__PURE__ */ jsx(FormOutlined, {
25393
25392
  style: {
25394
25393
  cursor: "pointer"
25395
25394
  },
25396
25395
  onClick: () => {
25397
- t(!1), s(c);
25396
+ t(!1), u(c);
25398
25397
  }
25399
25398
  })
25400
25399
  })