@tesouro/embedded-components-react 0.11.76 → 0.11.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.
package/dist/index.d.ts CHANGED
@@ -5366,7 +5366,7 @@ interface OfferWidgetLabels {
5366
5366
  applyNow: string;
5367
5367
  learnMore: string;
5368
5368
  primaryCta: string;
5369
- /** Small caption below the modal CTA, e.g. "Takes 5 minutes". */
5369
+ /** Small caption below the modal CTA, e.g. "Takes about 5 minutes". */
5370
5370
  primaryCtaSubtext: string;
5371
5371
  dismissModalAriaLabel: string;
5372
5372
  }
@@ -8,7 +8,7 @@ interface OfferWidgetLabels {
8
8
  applyNow: string;
9
9
  learnMore: string;
10
10
  primaryCta: string;
11
- /** Small caption below the modal CTA, e.g. "Takes 5 minutes". */
11
+ /** Small caption below the modal CTA, e.g. "Takes about 5 minutes". */
12
12
  primaryCtaSubtext: string;
13
13
  dismissModalAriaLabel: string;
14
14
  }
@@ -38,7 +38,7 @@ var g = ({ accountRows: g, children: _, isLoading: v, isError: y, onRetry: b, to
38
38
  className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:pb-4",
39
39
  children: [
40
40
  /* @__PURE__ */ f(t, {
41
- className: "ttw:min-w-0 ttw:truncate",
41
+ className: "ttw:min-w-0 ttw:break-words",
42
42
  "aria-hidden": S ? !0 : void 0,
43
43
  children: x
44
44
  }),
@@ -3,7 +3,7 @@ var e = {
3
3
  applyNow: "Apply now",
4
4
  learnMore: "Learn more",
5
5
  primaryCta: "Start application",
6
- primaryCtaSubtext: "Takes 5 minutes",
6
+ primaryCtaSubtext: "Takes about 5 minutes",
7
7
  dismissModalAriaLabel: "Close offer modal"
8
8
  };
9
9
  export { e as OFFER_WIDGET_LABELS_EN };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.76", n = "b94f4643bcb9aa507db17799b230a52ec31f25fc", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.79", n = "6ad025dd533f1d8b72e43c4024562f7eb7fba375", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -4,7 +4,8 @@ var e = /* @__PURE__ */ new Set([
4
4
  "GET /embedded-banking/v1/credit-cards/{cardId}",
5
5
  "GET /embedded-banking/v1/debit-cards/{cardId}",
6
6
  "GET /finops/v1/payables/{payable_id}/suggestions",
7
- "GET /identity/v1/financial_institution"
7
+ "GET /identity/v1/financial_institution",
8
+ "GET /finops/v1/entity-users/my-entity"
8
9
  ]);
9
10
  function t(t, n, r) {
10
11
  return t === 404 && n !== void 0 && r !== void 0 && e.has(`${n.toUpperCase()} ${r}`);
@@ -6,45 +6,45 @@ import { isExpectedApiNotFound as a } from "./expectedApiNotFound.js";
6
6
  import { isExpectedApiUnprocessable as o } from "./expectedApiUnprocessable.js";
7
7
  import { extractTraceIdFromHeaders as s, resolveTraceId as c } from "./traceId.js";
8
8
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/interceptor.js
9
- function l(l, h) {
10
- let g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new Set();
11
- return l.interceptors.request.use((e) => (g.set(e, p()), e)), l.interceptors.response.use((e, r, a) => {
9
+ function l(l, p) {
10
+ let _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Set();
11
+ return l.interceptors.request.use((e) => (_.set(e, h()), e)), l.interceptors.response.use((e, r, a) => {
12
12
  if (!e.ok || !n.has(r.method.toUpperCase())) return e;
13
13
  let o = s(e);
14
14
  return i(t.ApiRequestCompleted, {
15
15
  method: r.method,
16
16
  route: a.url,
17
17
  status: e.status,
18
- duration_ms: m(g.get(r)),
18
+ duration_ms: g(_.get(r)),
19
19
  ...o ? { trace_id: o } : {}
20
- }, h.current), e;
21
- }), l.interceptors.error.use((n, s, l, p) => {
20
+ }, p.current), e;
21
+ }), l.interceptors.error.use((n, s, l, h) => {
22
22
  if (f(n, l)) return n;
23
- let v = c(s, n);
23
+ let y = c(s, n);
24
24
  i(t.ApiRequestFailed, {
25
- method: l?.method ?? p.method,
26
- route: p.url,
25
+ method: l?.method ?? h.method,
26
+ route: h.url,
27
27
  status: s?.status,
28
- duration_ms: l ? m(g.get(l)) : void 0,
28
+ duration_ms: l ? g(_.get(l)) : void 0,
29
29
  error_kind: s ? "http" : "network",
30
30
  error_name: n instanceof Error ? n.name : "unknown",
31
- ...v ? { trace_id: v } : {}
32
- }, h.current);
33
- let y = l?.method ?? p.method;
34
- if (a(s?.status, y, p.url) || o(s?.status, y, p.url)) return n;
31
+ ...y ? { trace_id: y } : {}
32
+ }, p.current);
33
+ let b = l?.method ?? h.method;
34
+ if (a(s?.status, b, h.url) || o(s?.status, b, h.url) || m(n, s, l)) return n;
35
35
  if (s?.status === 401) {
36
36
  let t = e(d(l));
37
- if (_.has(t)) return n;
38
- _.add(t);
37
+ if (v.has(t)) return n;
38
+ v.add(t);
39
39
  }
40
- return r(u(s, p.url), {
41
- method: l?.method ?? p.method,
42
- route: p.url,
40
+ return r(u(s, h.url), {
41
+ method: l?.method ?? h.method,
42
+ route: h.url,
43
43
  status: s?.status,
44
44
  error_kind: s ? "http" : "network",
45
45
  error_name: n instanceof Error ? n.name : "unknown",
46
- ...v ? { trace_id: v } : {}
47
- }, h.current), n;
46
+ ...y ? { trace_id: y } : {}
47
+ }, p.current), n;
48
48
  }), l;
49
49
  }
50
50
  function u(e, t) {
@@ -60,10 +60,18 @@ function d(e) {
60
60
  function f(e, t) {
61
61
  return t?.signal.aborted ? !0 : e instanceof Error && e.name === "AbortError";
62
62
  }
63
- function p() {
63
+ var p = /* @__PURE__ */ new Set([
64
+ "Failed to fetch",
65
+ "Load failed",
66
+ "NetworkError when attempting to fetch resource."
67
+ ]);
68
+ function m(e, t, n) {
69
+ return !t && n !== void 0 && e instanceof TypeError && p.has(e.message) && typeof document < "u" && document.visibilityState === "hidden";
70
+ }
71
+ function h() {
64
72
  return typeof performance < "u" ? performance.now() : Date.now();
65
73
  }
66
- function m(e) {
67
- return e === void 0 ? void 0 : Math.round(p() - e);
74
+ function g(e) {
75
+ return e === void 0 ? void 0 : Math.round(h() - e);
68
76
  }
69
77
  export { l as attachAnalyticsInterceptors, d as tokenCarriedBy };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.76",
3
+ "version": "0.11.79",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [