@gisce/react-ooui 1.1.63-rc.1 → 1.1.64-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.
@@ -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"}
@@ -13678,7 +13678,7 @@ async function getViewsAndInitialView({
13678
13678
  type: t.split(",")[0]
13679
13679
  };
13680
13680
  else {
13681
- const u = t.split(",")[0], [l] = e.find(([c, d]) => d === u);
13681
+ const u = t.split(",")[0], [l] = o.find(([c, d]) => d === u);
13682
13682
  s = {
13683
13683
  id: l,
13684
13684
  type: u
@@ -23242,8 +23242,9 @@ const AttachmentsButtonWrapper = (e) => {
23242
23242
  numberOfAttachments: t,
23243
23243
  disabled: r
23244
23244
  } = e, {
23245
- t: n
23246
- } = useContext(LocaleContext), [a, o] = useState(!1), s = /* @__PURE__ */ jsxs(Button$1, {
23245
+ t: n,
23246
+ lang: a
23247
+ } = useContext(LocaleContext), [o, s] = useState(!1), u = /* @__PURE__ */ jsxs(Button$1, {
23247
23248
  disabled: r,
23248
23249
  children: [/* @__PURE__ */ jsx(LinkOutlined, {}), `(${t})`, /* @__PURE__ */ jsx(DownOutlined, {
23249
23250
  style: {
@@ -23251,27 +23252,25 @@ const AttachmentsButtonWrapper = (e) => {
23251
23252
  }
23252
23253
  })]
23253
23254
  });
23254
- return r ? s : /* @__PURE__ */ jsx(Popover, {
23255
- onVisibleChange: (u) => o(u),
23256
- visible: a,
23255
+ return r ? u : /* @__PURE__ */ jsx(Popover, {
23256
+ onVisibleChange: (l) => s(l),
23257
+ visible: o,
23257
23258
  placement: "bottom",
23258
- content: Content$1(e, o),
23259
+ content: Content$1(e, s, a),
23259
23260
  title: n("attachments"),
23260
23261
  arrowContent: null,
23261
- children: s
23262
+ children: u
23262
23263
  });
23263
- }, Content$1 = (e, t) => {
23264
+ }, Content$1 = (e, t, r) => {
23264
23265
  const {
23265
- attachments: r = [],
23266
- loading: n,
23267
- onAddNewAttachment: a,
23268
- onopenAttachmentLink: o,
23269
- onOpenAttachmentDetail: s,
23270
- onListAllAttachments: u
23271
- } = e, {
23272
- t: l
23273
- } = useContext(LocaleContext);
23274
- return n ? /* @__PURE__ */ jsx(Spin, {
23266
+ attachments: n = [],
23267
+ loading: a,
23268
+ onAddNewAttachment: o,
23269
+ onopenAttachmentLink: s,
23270
+ onOpenAttachmentDetail: u,
23271
+ onListAllAttachments: l
23272
+ } = e;
23273
+ return a ? /* @__PURE__ */ jsx(Spin, {
23275
23274
  style: {
23276
23275
  padding: 20
23277
23276
  }
@@ -23283,22 +23282,22 @@ const AttachmentsButtonWrapper = (e) => {
23283
23282
  },
23284
23283
  href: "#",
23285
23284
  onClick: () => {
23286
- t(!1), u();
23285
+ t(!1), l();
23287
23286
  },
23288
- children: [/* @__PURE__ */ jsx(TableOutlined, {}), " ", l("listAllAttachments")]
23287
+ children: [/* @__PURE__ */ jsx(TableOutlined, {}), " ", tForLang("listAllAttachments", r)]
23289
23288
  }), /* @__PURE__ */ jsxs("a", {
23290
23289
  style: {
23291
23290
  display: "block"
23292
23291
  },
23293
23292
  href: "#",
23294
23293
  onClick: () => {
23295
- t(!1), a();
23294
+ t(!1), o();
23296
23295
  },
23297
- children: [/* @__PURE__ */ jsx(FileAddOutlined, {}), " ", l("addNewAttachment")]
23298
- }), r.length > 0 && /* @__PURE__ */ jsxs(Fragment, {
23296
+ children: [/* @__PURE__ */ jsx(FileAddOutlined, {}), " ", tForLang("addNewAttachment", r)]
23297
+ }), n.length > 0 && /* @__PURE__ */ jsxs(Fragment, {
23299
23298
  children: [/* @__PURE__ */ jsx("li", {
23300
- className: " ant-dropdown-menu-item-divider"
23301
- }), r.map((c) => {
23299
+ className: "ant-dropdown-menu-item-divider"
23300
+ }), n.map((c) => {
23302
23301
  const d = c.link ? LinkOutlined : DownloadOutlined;
23303
23302
  return /* @__PURE__ */ jsxs(Row, {
23304
23303
  style: {
@@ -23316,13 +23315,13 @@ const AttachmentsButtonWrapper = (e) => {
23316
23315
  textAlign: "center"
23317
23316
  },
23318
23317
  children: (c.datas_fname || c.link) && /* @__PURE__ */ jsx(Tooltip$2, {
23319
- title: c.link ? l("openAttachmentLink") : l("download"),
23318
+ title: c.link ? tForLang("openAttachmentLink", r) : tForLang("download", r),
23320
23319
  children: /* @__PURE__ */ jsx(d, {
23321
23320
  style: {
23322
23321
  cursor: "pointer"
23323
23322
  },
23324
23323
  onClick: () => {
23325
- t(!1), o(c);
23324
+ t(!1), s(c);
23326
23325
  }
23327
23326
  })
23328
23327
  })
@@ -23332,13 +23331,13 @@ const AttachmentsButtonWrapper = (e) => {
23332
23331
  textAlign: "center"
23333
23332
  },
23334
23333
  children: /* @__PURE__ */ jsx(Tooltip$2, {
23335
- title: l("openAttachment"),
23334
+ title: tForLang("openAttachment", r),
23336
23335
  children: /* @__PURE__ */ jsx(FormOutlined, {
23337
23336
  style: {
23338
23337
  cursor: "pointer"
23339
23338
  },
23340
23339
  onClick: () => {
23341
- t(!1), s(c);
23340
+ t(!1), u(c);
23342
23341
  }
23343
23342
  })
23344
23343
  })