@tesouro/embedded-components-react 0.11.187 → 0.11.189

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.
Files changed (28) hide show
  1. package/dist/fixtures/index.d.ts +13 -46
  2. package/dist/index.css +6 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/lib/BankAccountsWidget.d.ts +2 -0
  5. package/dist/lib/WidgetSuite.d.ts +2 -0
  6. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/BalanceHistoryWidgetFeature.js +2 -2
  7. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js +2 -2
  8. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +17 -14
  9. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +2 -0
  11. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +9 -3
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +76 -58
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +20 -20
  15. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +17 -17
  16. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +1 -0
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/layout/useAnchoredOverlayLayout.js +5 -0
  19. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +4 -0
  20. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyAddress/CopyAddress.js +30 -46
  21. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyButton/CopyButton.js +36 -0
  22. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyButton/labels.js +3 -0
  23. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadEmailOption/UploadEmailOption.js +2 -0
  24. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadPopover/UploadPopover.js +8 -0
  25. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +77 -77
  26. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +129 -122
  28. package/package.json +1 -1
@@ -19,4 +19,5 @@ import { CardProgram as w } from "./lib/card/cardProgram.js";
19
19
  import { CARD_STATUS_LABELS_EN as T, CARD_STATUS_TONE as E, CARD_TYPE_LABELS_EN as D } from "./lib/card/cardPresentation.js";
20
20
  import { deniedNoticeExpiresAt as O, selectBankAccountApplication as k } from "./lib/application/bankAccountApplication.js";
21
21
  import "./lib/analytics/index.js";
22
+ import "./lib/layout/useAnchoredOverlayLayout.js";
22
23
  export { T as CARD_STATUS_LABELS_EN, E as CARD_STATUS_TONE, D as CARD_TYPE_LABELS_EN, w as CardProgram, p as RefreshingRootWidgetProvider, o as RootWidgetProvider, l as WidgetProvider, u as WidgetTokenRefreshProvider, e as cloneEmbeddedClient, O as deniedNoticeExpiresAt, t as getGlobalWidgetConfig, i as getGlobalWidgetInitState, x as getNaicsOptions, k as selectBankAccountApplication, n as setGlobalWidgetConfig, a as subscribeToGlobalWidgetInitState, r as updateGlobalWidgetConfig, s as useAnalyticsCaptureException, c as useAnalyticsTrack, m as useDisclosuresAcceptanceSurface, C as useLocalCalendarDay, d as useOptionalWidgetToken, S as useOrganizationUserNames, h as useOwnWidgetConfig, g as useRefetchWidget, _ as useWidgetConfig, v as useWidgetError, y as useWidgetInitStaleForToken, b as useWidgetLoading, f as useWidgetToken };
@@ -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.187", n = "1c7050460680d26b88e8afd8c1c4b32001084683", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.189", n = "d37ca11d9eadf9053f52ee31b7a62f76e0d97a7e", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import "react";
@@ -36,6 +36,10 @@ import { AttentionStrip as A } from "./lib/AttentionStrip/AttentionStrip.js";
36
36
  import { AttentionViewBar as j } from "./lib/AttentionStrip/AttentionViewBar.js";
37
37
  import { ConsentBlock as M, ConsentLink as N } from "./lib/ConsentBlock/ConsentBlock.js";
38
38
  import { FileDropZone as P } from "./lib/FileDropZone/FileDropZone.js";
39
+ import "./lib/CopyButton/labels.js";
40
+ import "./lib/CopyButton/CopyButton.js";
39
41
  import { CopyAddress as F } from "./lib/CopyAddress/CopyAddress.js";
40
42
  import { UploadTray as I } from "./lib/UploadTray/UploadTray.js";
43
+ import "./lib/UploadEmailOption/UploadEmailOption.js";
44
+ import "./lib/UploadPopover/UploadPopover.js";
41
45
  export { m as AddTile, b as AmountInput, A as AttentionStrip, j as AttentionViewBar, M as ConsentBlock, N as ConsentLink, F as CopyAddress, O as DateDisclosure, k as DueDateText, _ as ERROR_STATE_ID, t as EmbeddedToaster, g as EmptyState, v as ErrorState, P as FileDropZone, u as HostIsolationScope, C as InlineErrorAlert, d as Link, x as LoadingRegion, S as MaskedAccountNumber, y as NoAccessState, E as OnboardingShell, w as PAGINATION_FOOTER_LABELS_EN, T as PaginationFooter, D as SectionHeading, h as StatePanel, n as ToastNameMessage, r as UIFramework, a as UIProvider, I as UploadTray, p as WidgetContainer, f as WidgetFrame, o as registerDesignSystemEnsurer, s as registerUIRenderers, i as resolveUIFramework, e as toast, c as useDesignSystemEnsurer, l as useFrameworkRenderer };
@@ -2,54 +2,38 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Button as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { InlineErrorAlert as a } from "../InlineErrorAlert/InlineErrorAlert.js";
7
- import { useEffect as o, useState as s } from "react";
8
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
- import { Check as u, Copy as d } from "lucide-react";
5
+ import { InlineErrorAlert as e } from "../InlineErrorAlert/InlineErrorAlert.js";
6
+ import { CopyButton as t } from "../CopyButton/CopyButton.js";
7
+ import { useEffect as n, useState as r } from "react";
8
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
10
9
  // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyAddress/CopyAddress.js
11
- function f({ address: f, copyLabel: p, copiedLabel: m, failedLabel: h }) {
12
- let [g, _] = s(!1), [v, y] = s(!1);
13
- o(() => {
14
- if (!g) return;
15
- let e = window.setTimeout(() => _(!1), 2e3);
10
+ function o({ address: o, copyLabel: s, copiedLabel: c, failedLabel: l }) {
11
+ let [u, d] = r(!1), [f, p] = r(!1);
12
+ return n(() => {
13
+ if (!u) return;
14
+ let e = window.setTimeout(() => d(!1), 2e3);
16
15
  return () => window.clearTimeout(e);
17
- }, [g]);
18
- let b = async () => {
19
- try {
20
- await navigator.clipboard.writeText(f), y(!1), _(!0);
21
- } catch {
22
- _(!1), y(!0);
23
- }
24
- };
25
- return /* @__PURE__ */ l("div", {
16
+ }, [u]), /* @__PURE__ */ a("div", {
26
17
  className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-2",
27
- children: [
28
- /* @__PURE__ */ l("div", {
29
- className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:p-3",
30
- children: [/* @__PURE__ */ c("span", {
31
- title: f,
32
- className: "ttw:min-w-0 ttw:flex-1 ttw:truncate ttw:text-sm",
33
- children: f
34
- }), /* @__PURE__ */ c(r, { children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(i, {
35
- asChild: !0,
36
- children: /* @__PURE__ */ c(e, {
37
- type: "button",
38
- variant: "ghost",
39
- size: "icon-sm",
40
- "aria-label": g ? m : p,
41
- onClick: () => void b(),
42
- children: c(g ? u : d, { className: "ttw:size-4" })
43
- })
44
- }), /* @__PURE__ */ c(n, { children: g ? m : p })] }) })]
45
- }),
46
- v && /* @__PURE__ */ c(a, { children: h }),
47
- /* @__PURE__ */ c("span", {
48
- role: "status",
49
- className: "ttw:sr-only",
50
- children: g ? m : ""
51
- })
52
- ]
18
+ children: [/* @__PURE__ */ a("div", {
19
+ className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:p-3",
20
+ children: [/* @__PURE__ */ i("span", {
21
+ title: o,
22
+ className: "ttw:min-w-0 ttw:flex-1 ttw:truncate ttw:text-sm",
23
+ children: o
24
+ }), /* @__PURE__ */ i(t, {
25
+ copied: u,
26
+ copyLabel: s,
27
+ labels: { copied: c },
28
+ onCopy: async () => {
29
+ try {
30
+ await navigator.clipboard.writeText(o), p(!1), d(!0);
31
+ } catch {
32
+ d(!1), p(!0);
33
+ }
34
+ }
35
+ })]
36
+ }), f && /* @__PURE__ */ i(e, { children: l })]
53
37
  });
54
38
  }
55
- export { f as CopyAddress };
39
+ export { o as CopyAddress };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Button as e, Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { COPY_BUTTON_LABELS_EN as a } from "./labels.js";
7
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ import { Check as l, Copy as u } from "lucide-react";
9
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyButton/CopyButton.js
10
+ function d({ copyLabel: d, onCopy: f, copied: p, disabled: m, labels: h }) {
11
+ let g = {
12
+ ...a,
13
+ ...h
14
+ }, _ = p ? g.copied : d;
15
+ return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(r, { children: /* @__PURE__ */ c(t, { children: [/* @__PURE__ */ s(i, {
16
+ asChild: !0,
17
+ children: /* @__PURE__ */ s(e, {
18
+ type: "button",
19
+ variant: "ghost",
20
+ size: "icon-sm",
21
+ className: "ttw:shrink-0",
22
+ disabled: m,
23
+ "aria-label": _,
24
+ onClick: () => f(),
25
+ children: s(p ? l : u, {
26
+ className: "ttw:size-4",
27
+ "aria-hidden": !0
28
+ })
29
+ })
30
+ }), /* @__PURE__ */ s(n, { children: _ })] }) }), /* @__PURE__ */ s("span", {
31
+ role: "status",
32
+ className: "ttw:sr-only",
33
+ children: p ? g.copied : ""
34
+ })] });
35
+ }
36
+ export { d as CopyButton };
@@ -0,0 +1,3 @@
1
+ // ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/CopyButton/labels.js
2
+ var e = { copied: "Copied" };
3
+ export { e as COPY_BUTTON_LABELS_EN };
@@ -0,0 +1,2 @@
1
+ import "../CopyAddress/CopyAddress.js";
2
+ import "react/jsx-runtime";
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import "../FileDropZone/FileDropZone.js";
7
+ import "../UploadEmailOption/UploadEmailOption.js";
8
+ import "react/jsx-runtime";
@@ -5,111 +5,111 @@
5
5
  import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as e, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as t } from "../../../../../shared/util/dist/lib/widgetDomEvents.js";
6
6
  import "../../../../../shared/util/dist/index.js";
7
7
  import { isOrganizationOnItsWay as ee } from "../../../../../shared/data-access/dist/lib/organizationStatus.js";
8
- import { useEmbedApi as n } from "../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
- import { Scope as r } from "../../../../../shared/data-access/dist/lib/scopes.js";
8
+ import { useEmbedApi as te } from "../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { Scope as n } from "../../../../../shared/data-access/dist/lib/scopes.js";
10
10
  import "../../../../../shared/data-access/dist/index.js";
11
- import { useAnalyticsTrack as te } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
12
- import { useWidgetConfig as ne } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
+ import { useAnalyticsTrack as r } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
12
+ import { useWidgetConfig as i } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
13
  import "../../../../../shared/feature/dist/index.js";
14
- import { DEFAULT_FEATURE_LABELS as i } from "./featureLabels.js";
15
- import { TRANSFERS_ANALYTICS_EVENTS as re } from "../analytics/events.js";
16
- import { isPaginatedAccountsQueryInFlight as a } from "../../../../data-access/dist/index2.js";
17
- import { useTransferBankAccountsQuery as ie } from "../../../../data-access/dist/index4.js";
18
- import { useTransferExternalAccountsQuery as ae } from "../../../../data-access/dist/index5.js";
19
- import { useOrganizationTransfersQuery as oe } from "../../../../data-access/dist/index6.js";
14
+ import { DEFAULT_FEATURE_LABELS as a } from "./featureLabels.js";
15
+ import { TRANSFERS_ANALYTICS_EVENTS as ne } from "../analytics/events.js";
16
+ import { isPaginatedAccountsQueryInFlight as o } from "../../../../data-access/dist/index2.js";
17
+ import { useTransferBankAccountsQuery as re } from "../../../../data-access/dist/index4.js";
18
+ import { useTransferExternalAccountsQuery as ie } from "../../../../data-access/dist/index5.js";
19
+ import { useOrganizationTransfersQuery as s } from "../../../../data-access/dist/index6.js";
20
20
  import "../../../../data-access/dist/index.js";
21
- import { useTransferMoneyModalController as se } from "./useTransferMoneyModalController.js";
22
- import { buildAccountDirectory as ce, mapTransferToDetailView as o, mapTransferToRowView as s } from "./transferViews.js";
21
+ import { useTransferMoneyModalController as ae } from "./useTransferMoneyModalController.js";
22
+ import { buildAccountDirectory as oe, mapTransferToDetailView as se, mapTransferToRowView as ce } from "./transferViews.js";
23
23
  import { transfersWidgetTestIds as c } from "./testIds.js";
24
24
  import { TRANSFERS_PAGE_SIZE_OPTIONS as le, useTransfersPageState as ue } from "./useTransfersPageState.js";
25
25
  import { TRANSFERS_WIDGET_LABELS_EN as de } from "../../../../ui/dist/lib/TransfersWidget/labels.js";
26
26
  import { TransfersWidget as fe } from "../../../../ui/dist/lib/TransfersWidget/TransfersWidget.js";
27
27
  import "../../../../ui/dist/index.js";
28
- import { useCallback as pe, useEffect as l, useMemo as u, useState as d } from "react";
29
- import { jsx as f } from "react/jsx-runtime";
28
+ import { useCallback as pe, useEffect as l, useMemo as me, useState as u } from "react";
29
+ import { jsx as he } from "react/jsx-runtime";
30
30
  // ../../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js
31
- var p = [r.TransferWriteOrg, r.BankAccountReadOrg], m = [t, e];
32
- function h({ labels: e, featureLabels: t, isTransferMoneyOpen: h, defaultIsTransferMoneyOpen: me, onTransferMoneyOpenChange: he, onLinkAccountClick: g }) {
33
- let _ = {
34
- ...i,
31
+ var d = [n.TransferWriteOrg, n.BankAccountReadOrg], f = [t, e];
32
+ function p({ labels: e, featureLabels: t, isTransferMoneyOpen: p, defaultIsTransferMoneyOpen: ge, onTransferMoneyOpenChange: m, onLinkAccountClick: h }) {
33
+ let g = {
34
+ ...a,
35
35
  ...t
36
- }, v = {
36
+ }, _ = {
37
37
  ...de,
38
38
  ...e,
39
39
  ...t?.routeSeparator === void 0 ? {} : { listAccountsSeparator: t.routeSeparator }
40
- }, y = te(), { initResponse: b } = ne(), { organizationId: ge, organizationStatus: _e } = n(), ve = ee(_e);
40
+ }, v = r(), { initResponse: y } = i(), { organizationId: _e, organizationStatus: ve } = te(), ye = ee(ve);
41
41
  l(() => {
42
- y(re.Mounted);
43
- }, [y]);
44
- let x = b?.scopes ?? [], S = x.includes(r.ExternalBankAccountReadOrg), ye = x.includes(r.PaymentRailAch), C = S && ye, w = p.every((e) => x.includes(e)), T = ue({
45
- organizationId: ge,
46
- userId: b?.userId
47
- }), { data: E, isLoading: D, isError: O, isPlaceholderData: k, refetch: A } = oe({
48
- limit: T.pageSize,
49
- pagination_token: T.paginationToken
50
- }), j = ie(), { data: M, isError: N, refetch: P } = j, F = ae({ enabled: S }), { data: I, isError: be, refetch: L } = F, R = M?.data ?? [], z = u(() => C ? (I?.data ?? []).filter((e) => e.verificationStatus === "VERIFIED" && e.accountStatus === "ACTIVE") : [], [C, I?.data]), xe = I?.data, B = ce(R, xe ?? [], v), V = E?.data, H = (V ?? []).map((e) => s(e, B, v, _)), [Se, U] = d(), W = `${T.pageSize}:${T.paginationToken ?? ""}`, [Ce, we] = d(W);
51
- W !== Ce && (we(W), U(void 0));
52
- let G = V?.find((e) => e.id === Se), Te = G ? o(G, B, v, _) : void 0, K = E?.nextPaginationToken ?? void 0, q = E?.prevPaginationToken ?? void 0, [J, Ee] = d(T);
53
- k || J.pageIndex === T.pageIndex && J.pageSize === T.pageSize || Ee(T);
54
- let Y = J.pageIndex * J.pageSize, De = {
55
- pageSize: T.pageSize,
42
+ v(ne.Mounted);
43
+ }, [v]);
44
+ let b = y?.scopes ?? [], x = b.includes(n.ExternalBankAccountReadOrg), be = b.includes(n.PaymentRailAch), S = x && be, C = d.every((e) => b.includes(e)), w = ue({
45
+ organizationId: _e,
46
+ userId: y?.userId
47
+ }), { data: T, isLoading: E, isError: D, isPlaceholderData: O, refetch: k } = s({
48
+ limit: w.pageSize,
49
+ pagination_token: w.paginationToken
50
+ }), A = re(), { data: j, isError: M, refetch: N } = A, P = ie({ enabled: x }), { data: F, isError: xe, refetch: I } = P, L = j?.data ?? [], R = me(() => S ? (F?.data ?? []).filter((e) => e.verificationStatus === "VERIFIED" && e.accountStatus === "ACTIVE") : [], [S, F?.data]), Se = F?.data, z = oe(L, Se ?? [], _), B = T?.data, V = (B ?? []).map((e) => ce(e, z, _, g)), [Ce, H] = u(), U = `${w.pageSize}:${w.paginationToken ?? ""}`, [we, Te] = u(U);
51
+ U !== we && (Te(U), H(void 0));
52
+ let W = B?.find((e) => e.id === Ce), Ee = W ? se(W, z, _, g) : void 0, G = T?.nextPaginationToken ?? void 0, K = T?.prevPaginationToken ?? void 0, [q, De] = u(w);
53
+ O || q.pageIndex === w.pageIndex && q.pageSize === w.pageSize || De(w);
54
+ let J = q.pageIndex * q.pageSize, Oe = {
55
+ pageSize: w.pageSize,
56
56
  pageSizeOptions: le,
57
- rangeLabel: `${_.viewingRangeLabel} ${H.length === 0 ? "0-0" : `${Y + 1}-${Y + H.length}`}`,
58
- isPreviousDisabled: !q,
59
- isNextDisabled: !K,
60
- isDisabled: k,
61
- onPageSizeChange: T.changePageSize,
57
+ rangeLabel: `${g.viewingRangeLabel} ${V.length === 0 ? "0-0" : `${J + 1}-${J + V.length}`}`,
58
+ isPreviousDisabled: !K,
59
+ isNextDisabled: !G,
60
+ isDisabled: O,
61
+ onPageSizeChange: w.changePageSize,
62
62
  onPreviousPageClick: () => {
63
- q && T.goToPreviousPage(q);
63
+ K && w.goToPreviousPage(K);
64
64
  },
65
65
  onNextPageClick: () => {
66
- K && T.goToNextPage(K);
66
+ G && w.goToNextPage(G);
67
67
  }
68
- }, X = pe(() => {
69
- A(), P(), S && L();
68
+ }, Y = pe(() => {
69
+ k(), N(), x && I();
70
70
  }, [
71
- S,
72
- P,
73
- L,
74
- A
71
+ x,
72
+ N,
73
+ I,
74
+ k
75
75
  ]);
76
76
  l(() => {
77
77
  let e = () => {
78
- X();
78
+ Y();
79
79
  };
80
- for (let t of m) window.addEventListener(t, e);
80
+ for (let t of f) window.addEventListener(t, e);
81
81
  return () => {
82
- for (let t of m) window.removeEventListener(t, e);
82
+ for (let t of f) window.removeEventListener(t, e);
83
83
  };
84
- }, [X]);
85
- let { modalProps: Z, openModal: Oe } = se({
86
- labels: v,
87
- featureLabels: _,
88
- embeddedBankAccounts: R,
89
- verifiedExternalBankAccounts: z,
90
- track: y,
91
- isTransferMoneyOpen: h,
92
- defaultIsTransferMoneyOpen: me,
93
- onTransferMoneyOpenChange: he
94
- }), ke = a(j), Ae = S && a(F), je = ve && !M || D || ke || Ae, Q = O || N || S && be, Me = R.length + z.length, $ = !(R.length > 0) || Me <= 1;
95
- return /* @__PURE__ */ f(fe, {
96
- transferRows: H,
97
- pagination: De,
98
- selectedRowKey: G?.id,
99
- onRowClick: U,
100
- transferDetail: Te,
101
- onTransferDetailClose: () => U(void 0),
102
- onLinkAccountClick: g ? () => {
103
- U(void 0), g();
84
+ }, [Y]);
85
+ let { modalProps: ke, openModal: Ae } = ae({
86
+ labels: _,
87
+ featureLabels: g,
88
+ embeddedBankAccounts: L,
89
+ verifiedExternalBankAccounts: R,
90
+ track: v,
91
+ isTransferMoneyOpen: p,
92
+ defaultIsTransferMoneyOpen: ge,
93
+ onTransferMoneyOpenChange: m
94
+ }), je = o(A), Me = x && o(P), X = ye && !j || E || je || Me, Z = D || M || x && xe, Q = L.filter((e) => e.status === "ACTIVE" && !!e.accountNumber), Ne = Q.length + R.length, $ = !(Q.length > 0) || Ne <= 1;
95
+ return /* @__PURE__ */ he(fe, {
96
+ transferRows: V,
97
+ pagination: Oe,
98
+ selectedRowKey: W?.id,
99
+ onRowClick: H,
100
+ transferDetail: Ee,
101
+ onTransferDetailClose: () => H(void 0),
102
+ onLinkAccountClick: h ? () => {
103
+ H(void 0), h();
104
104
  } : void 0,
105
- isLoading: je,
106
- isError: Q,
107
- onRetry: Q ? () => void X() : void 0,
108
- showTransferMoneyCta: w,
105
+ isLoading: X,
106
+ isError: Z,
107
+ onRetry: Z ? () => void Y() : void 0,
108
+ showTransferMoneyCta: C,
109
109
  isTransferMoneyCtaDisabled: $,
110
- onTransferMoneyClick: w && !$ ? () => Oe() : void 0,
110
+ onTransferMoneyClick: C && !$ ? () => Ae() : void 0,
111
111
  transferMoneyModal: {
112
- ...Z,
112
+ ...ke,
113
113
  testIds: {
114
114
  root: c.modal,
115
115
  closeButton: c.modalCloseButton,
@@ -141,4 +141,4 @@ function h({ labels: e, featureLabels: t, isTransferMoneyOpen: h, defaultIsTrans
141
141
  }
142
142
  });
143
143
  }
144
- export { h as TransfersWidgetInner };
144
+ export { p as TransfersWidgetInner };
@@ -8,7 +8,7 @@ function r(e, t, n) {
8
8
  for (let t of e) r.set(t.id, {
9
9
  kind: "internal",
10
10
  name: t.nickname?.trim() || n.accountFallbackName,
11
- last4: t.accountNumber.slice(-4)
11
+ last4: t.accountNumber?.slice(-4)
12
12
  });
13
13
  for (let e of t) r.set(e.id, {
14
14
  kind: "external",
@@ -23,7 +23,7 @@ function i(e, t, n) {
23
23
  kind: i,
24
24
  kindLabel: i === "internal" ? n.accountKindInternal : n.accountKindExternal,
25
25
  name: r?.name ?? (e.nickname?.trim() || n.externalAccountFallbackName),
26
- ...r && { number: { last4: r.last4 } }
26
+ ...r?.last4 && { number: { last4: r.last4 } }
27
27
  };
28
28
  }
29
29
  var a = (t, n) => t.number ? `${t.name} ${e(n.accountMaskTemplate, { last4: t.number.last4 })}` : t.name, o = {