@tesouro/embedded-components-react 0.5.162 → 0.5.164

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.
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { getMailboxesOptions as e } from "./rest/@tanstack/react-query.gen.js";
6
+ import { withAuthEpoch as t } from "./withAuthEpoch.js";
7
+ import { useEmbedApi as n } from "./EmbedApiContext.js";
8
+ import { organizationHeaders as r } from "./organizationHeaders.js";
9
+ import { useQuery as i } from "@tanstack/react-query";
10
+ //#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js
11
+ function a({ relatedObjectType: a, enabled: o }) {
12
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l) && (o === !0 || o === void 0), p = i({
13
+ ...t(e({
14
+ client: s,
15
+ headers: r(c)
16
+ }), {
17
+ authEpoch: u,
18
+ organizationPending: d
19
+ }),
20
+ enabled: f
21
+ });
22
+ return {
23
+ mailboxAddress: p.isPlaceholderData ? void 0 : p.data?.data?.find((e) => e.related_object_type === a)?.mailbox_full_address,
24
+ isLoading: p.isLoading || p.isPlaceholderData,
25
+ isError: p.isError
26
+ };
27
+ }
28
+ //#endregion
29
+ export { a as useMailboxAddress };
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.162", n = "3ed58bb3461c09c7c74a12f5a7b10d7e0684a84a", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.164", n = "5463f4c3ff511567a3627b074bb915bd894d6dbe", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -25,7 +25,7 @@ function c() {
25
25
  })
26
26
  }), t(c, [n.DebitCardReadOrg]) && /* @__PURE__ */ o(a, {
27
27
  ...d.debitCards,
28
- cardArtSrc: u,
28
+ cardArtSrc: u ?? "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='190' viewBox='0 0 300 190'><rect width='300' height='190' rx='16' fill='%23334155'/><rect x='28' y='64' width='44' height='34' rx='6' fill='%2364748b'/></svg>",
29
29
  headerStart: /* @__PURE__ */ o(r, {
30
30
  className: "ttw:mb-0",
31
31
  children: d.debitCardsTitle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.162",
3
+ "version": "0.5.164",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {