@gisce/react-ooui 1.1.63 → 1.1.64

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"}
@@ -13667,7 +13667,7 @@ async function getViewsAndInitialView({
13667
13667
  type: t.split(",")[0]
13668
13668
  };
13669
13669
  else {
13670
- const u = t.split(",")[0], [l] = e.find(([c, d]) => d === u);
13670
+ const u = t.split(",")[0], [l] = o.find(([c, d]) => d === u);
13671
13671
  s = {
13672
13672
  id: l,
13673
13673
  type: u
@@ -23205,8 +23205,9 @@ const AttachmentsButtonWrapper = (e) => {
23205
23205
  numberOfAttachments: t,
23206
23206
  disabled: r
23207
23207
  } = e, {
23208
- t: n
23209
- } = useContext(LocaleContext), [a, o] = useState(!1), s = /* @__PURE__ */ jsxs(Button$1, {
23208
+ t: n,
23209
+ lang: a
23210
+ } = useContext(LocaleContext), [o, s] = useState(!1), u = /* @__PURE__ */ jsxs(Button$1, {
23210
23211
  disabled: r,
23211
23212
  children: [/* @__PURE__ */ jsx(LinkOutlined, {}), `(${t})`, /* @__PURE__ */ jsx(DownOutlined, {
23212
23213
  style: {
@@ -23214,27 +23215,25 @@ const AttachmentsButtonWrapper = (e) => {
23214
23215
  }
23215
23216
  })]
23216
23217
  });
23217
- return r ? s : /* @__PURE__ */ jsx(Popover, {
23218
- onVisibleChange: (u) => o(u),
23219
- visible: a,
23218
+ return r ? u : /* @__PURE__ */ jsx(Popover, {
23219
+ onVisibleChange: (l) => s(l),
23220
+ visible: o,
23220
23221
  placement: "bottom",
23221
- content: Content$1(e, o),
23222
+ content: Content$1(e, s, a),
23222
23223
  title: n("attachments"),
23223
23224
  arrowContent: null,
23224
- children: s
23225
+ children: u
23225
23226
  });
23226
- }, Content$1 = (e, t) => {
23227
+ }, Content$1 = (e, t, r) => {
23227
23228
  const {
23228
- attachments: r = [],
23229
- loading: n,
23230
- onAddNewAttachment: a,
23231
- onopenAttachmentLink: o,
23232
- onOpenAttachmentDetail: s,
23233
- onListAllAttachments: u
23234
- } = e, {
23235
- t: l
23236
- } = useContext(LocaleContext);
23237
- return n ? /* @__PURE__ */ jsx(Spin, {
23229
+ attachments: n = [],
23230
+ loading: a,
23231
+ onAddNewAttachment: o,
23232
+ onopenAttachmentLink: s,
23233
+ onOpenAttachmentDetail: u,
23234
+ onListAllAttachments: l
23235
+ } = e;
23236
+ return a ? /* @__PURE__ */ jsx(Spin, {
23238
23237
  style: {
23239
23238
  padding: 20
23240
23239
  }
@@ -23246,22 +23245,22 @@ const AttachmentsButtonWrapper = (e) => {
23246
23245
  },
23247
23246
  href: "#",
23248
23247
  onClick: () => {
23249
- t(!1), u();
23248
+ t(!1), l();
23250
23249
  },
23251
- children: [/* @__PURE__ */ jsx(TableOutlined, {}), " ", l("listAllAttachments")]
23250
+ children: [/* @__PURE__ */ jsx(TableOutlined, {}), " ", tForLang("listAllAttachments", r)]
23252
23251
  }), /* @__PURE__ */ jsxs("a", {
23253
23252
  style: {
23254
23253
  display: "block"
23255
23254
  },
23256
23255
  href: "#",
23257
23256
  onClick: () => {
23258
- t(!1), a();
23257
+ t(!1), o();
23259
23258
  },
23260
- children: [/* @__PURE__ */ jsx(FileAddOutlined, {}), " ", l("addNewAttachment")]
23261
- }), r.length > 0 && /* @__PURE__ */ jsxs(Fragment, {
23259
+ children: [/* @__PURE__ */ jsx(FileAddOutlined, {}), " ", tForLang("addNewAttachment", r)]
23260
+ }), n.length > 0 && /* @__PURE__ */ jsxs(Fragment, {
23262
23261
  children: [/* @__PURE__ */ jsx("li", {
23263
- className: " ant-dropdown-menu-item-divider"
23264
- }), r.map((c) => {
23262
+ className: "ant-dropdown-menu-item-divider"
23263
+ }), n.map((c) => {
23265
23264
  const d = c.link ? LinkOutlined : DownloadOutlined;
23266
23265
  return /* @__PURE__ */ jsxs(Row, {
23267
23266
  style: {
@@ -23279,13 +23278,13 @@ const AttachmentsButtonWrapper = (e) => {
23279
23278
  textAlign: "center"
23280
23279
  },
23281
23280
  children: (c.datas_fname || c.link) && /* @__PURE__ */ jsx(Tooltip$2, {
23282
- title: c.link ? l("openAttachmentLink") : l("download"),
23281
+ title: c.link ? tForLang("openAttachmentLink", r) : tForLang("download", r),
23283
23282
  children: /* @__PURE__ */ jsx(d, {
23284
23283
  style: {
23285
23284
  cursor: "pointer"
23286
23285
  },
23287
23286
  onClick: () => {
23288
- t(!1), o(c);
23287
+ t(!1), s(c);
23289
23288
  }
23290
23289
  })
23291
23290
  })
@@ -23295,13 +23294,13 @@ const AttachmentsButtonWrapper = (e) => {
23295
23294
  textAlign: "center"
23296
23295
  },
23297
23296
  children: /* @__PURE__ */ jsx(Tooltip$2, {
23298
- title: l("openAttachment"),
23297
+ title: tForLang("openAttachment", r),
23299
23298
  children: /* @__PURE__ */ jsx(FormOutlined, {
23300
23299
  style: {
23301
23300
  cursor: "pointer"
23302
23301
  },
23303
23302
  onClick: () => {
23304
- t(!1), s(c);
23303
+ t(!1), u(c);
23305
23304
  }
23306
23305
  })
23307
23306
  })