@tesouro/embedded-components-react 0.2.307 → 0.2.308

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/README.md CHANGED
@@ -599,10 +599,13 @@ A self-contained banking widget for creating book or ACH transfers and reviewing
599
599
 
600
600
  #### Props
601
601
 
602
- | Prop | Type | Default | Description |
603
- | --------------- | --------------------------------------- | ---------------- | --------------------------------------------------------------------- |
604
- | `labels` | `Partial<TransfersWidgetLabels>` | English labels | Override shell and modal copy. |
605
- | `featureLabels` | `Partial<TransfersWidgetFeatureLabels>` | English defaults | Override routing copy, fallbacks, default currency, and ACH SEC code. |
602
+ | Prop | Type | Default | Description |
603
+ | ---------------------------- | --------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
604
+ | `labels` | `Partial<TransfersWidgetLabels>` | English labels | Override shell and modal copy. |
605
+ | `featureLabels` | `Partial<TransfersWidgetFeatureLabels>` | English defaults | Override routing copy, fallbacks, default currency, and ACH SEC code. |
606
+ | `isTransferMoneyOpen` | `boolean` | Uncontrolled | Whether the transfer money modal is showing. Supplying it makes the modal controlled: the widget reports every open and close and changes nothing until you re-supply a new value. |
607
+ | `defaultIsTransferMoneyOpen` | `boolean` | `false` | The modal's state on first render, for a host that only wants to seed it. Ignored when `isTransferMoneyOpen` is supplied. |
608
+ | `onTransferMoneyOpenChange` | `(open: boolean) => void` | `undefined` | Called on every open and close — the **Transfer money** CTA, the modal's own dismissals (Esc, overlay, close), and the close after a completed transfer. |
606
609
 
607
610
  ### UploadReceiptWidget
608
611
 
package/dist/index.d.ts CHANGED
@@ -4709,10 +4709,25 @@ declare const DEFAULT_FEATURE_LABELS: FeatureLabels;
4709
4709
  interface TransfersWidgetPassthroughProps {
4710
4710
  labels?: Partial<TransfersWidgetLabels>;
4711
4711
  featureLabels?: Partial<FeatureLabels>;
4712
+ /**
4713
+ * Whether the transfer money modal is showing. Supplying it makes the modal
4714
+ * controlled: the widget reports every open and close through
4715
+ * `onTransferMoneyOpenChange` and changes nothing on screen until the host
4716
+ * supplies a new value. Omit to let the widget own it.
4717
+ */
4718
+ isTransferMoneyOpen?: boolean;
4719
+ /** The modal's state on first render, for a host that only wants to seed it. */
4720
+ defaultIsTransferMoneyOpen?: boolean;
4721
+ /**
4722
+ * Called on every open and close — the CTA, the modal's own dismissals, and
4723
+ * the close that follows a completed transfer — whether or not the modal is
4724
+ * controlled.
4725
+ */
4726
+ onTransferMoneyOpenChange?: (open: boolean) => void;
4712
4727
  }
4713
4728
  interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps {
4714
4729
  }
4715
- declare function TransfersWidget({ labels, featureLabels, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
4730
+ declare function TransfersWidget({ labels, featureLabels, isTransferMoneyOpen, defaultIsTransferMoneyOpen, onTransferMoneyOpenChange, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
4716
4731
 
4717
4732
  /**
4718
4733
  * Public {@link WidgetProvider} — the integrator-facing provider.
@@ -680,10 +680,25 @@ declare const DEFAULT_FEATURE_LABELS: FeatureLabels;
680
680
  interface TransfersWidgetPassthroughProps {
681
681
  labels?: Partial<TransfersWidgetLabels>;
682
682
  featureLabels?: Partial<FeatureLabels>;
683
+ /**
684
+ * Whether the transfer money modal is showing. Supplying it makes the modal
685
+ * controlled: the widget reports every open and close through
686
+ * `onTransferMoneyOpenChange` and changes nothing on screen until the host
687
+ * supplies a new value. Omit to let the widget own it.
688
+ */
689
+ isTransferMoneyOpen?: boolean;
690
+ /** The modal's state on first render, for a host that only wants to seed it. */
691
+ defaultIsTransferMoneyOpen?: boolean;
692
+ /**
693
+ * Called on every open and close — the CTA, the modal's own dismissals, and
694
+ * the close that follows a completed transfer — whether or not the modal is
695
+ * controlled.
696
+ */
697
+ onTransferMoneyOpenChange?: (open: boolean) => void;
683
698
  }
684
699
  interface TransfersWidgetProps extends WidgetProviderProps, TransfersWidgetPassthroughProps {
685
700
  }
686
- declare function TransfersWidget({ labels, featureLabels, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
701
+ declare function TransfersWidget({ labels, featureLabels, isTransferMoneyOpen, defaultIsTransferMoneyOpen, onTransferMoneyOpenChange, ...widgetProviderProps }: TransfersWidgetProps): React.JSX.Element;
687
702
 
688
703
  export { DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget };
689
704
  export type { FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps };
@@ -11,164 +11,186 @@ import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as ee, emitWidg
11
11
  import { useWidgetConfig as ne, useWidgetError as re, useWidgetLoading as ie } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
12
  import "../../../shared/feature/dist/index.js";
13
13
  import { BankAccountsWidgetAnalyticsEvent as i } from "./index2.js";
14
- import { copyTextToClipboard as ae, formatAmountLabel as a, formatTotalAvailableBalanceLabel as oe, maskAccountNumber as o } from "./index3.js";
15
- import { DEFAULT_FEATURE_LABELS as se } from "./index4.js";
16
- import { getBankAccountsPermissions as ce } from "./index5.js";
17
- import { toAccessRows as le, toOrganizationRoleOptions as ue, toTeamMembers as de } from "./index6.js";
18
- import { DEFAULT_LABELS as fe } from "../../ui/dist/lib/labels.js";
14
+ import { copyTextToClipboard as ae, formatAmountLabel as a, formatTotalAvailableBalanceLabel as oe, maskAccountNumber as se } from "./index3.js";
15
+ import { DEFAULT_FEATURE_LABELS as ce } from "./index4.js";
16
+ import { getBankAccountsPermissions as le } from "./index5.js";
17
+ import { toAccessRows as ue, toOrganizationRoleOptions as de, toTeamMembers as fe } from "./index6.js";
18
+ import { DEFAULT_LABELS as pe } from "../../ui/dist/lib/labels.js";
19
19
  import "../../ui/dist/index.js";
20
- import { useCreateBankAccountMutation as pe } from "../../data-access/dist/index3.js";
21
- import { useGrantBankAccountAccessMutation as me } from "../../data-access/dist/index4.js";
22
- import { useAllOrganizationUsersQuery as he } from "../../data-access/dist/index5.js";
20
+ import { useCreateBankAccountMutation as me } from "../../data-access/dist/index3.js";
21
+ import { useGrantBankAccountAccessMutation as he } from "../../data-access/dist/index4.js";
22
+ import { useAllOrganizationUsersQuery as ge } from "../../data-access/dist/index5.js";
23
23
  import "../../data-access/dist/index.js";
24
- import { filterRolesForOrganization as ge } from "../../../../shared/util-validation/dist/index6.js";
25
- import { useCallback as s, useEffect as _e, useMemo as c, useState as l } from "react";
26
- import { useControllableState as ve } from "@radix-ui/react-use-controllable-state";
24
+ import { filterRolesForOrganization as _e } from "../../../../shared/util-validation/dist/index6.js";
25
+ import { useCallback as o, useEffect as s, useMemo as c, useRef as ve, useState as l } from "react";
26
+ import { useControllableState as ye } from "@radix-ui/react-use-controllable-state";
27
27
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
28
28
  var u = { nickname: "" };
29
- function d({ labels: a, featureLabels: o, isBankingTaglineVisible: d = !0, bankLogoSrc: be, bankLogoAlt: xe, depositAgreementUrl: Se, selectedAccountId: Ce, defaultSelectedAccountId: we, onSelectedAccountIdChange: Te, "data-testid": Ee }) {
30
- let f = {
31
- ...fe,
29
+ function d(e, t) {
30
+ return e !== void 0 && t !== void 0 && e !== t;
31
+ }
32
+ function f({ labels: a, featureLabels: se, isBankingTaglineVisible: f = !0, bankLogoSrc: xe, bankLogoAlt: Se, depositAgreementUrl: Ce, selectedAccountId: we, defaultSelectedAccountId: Te, onSelectedAccountIdChange: Ee, "data-testid": De } = {}) {
33
+ let p = {
34
+ ...pe,
32
35
  ...a
33
- }, p = {
34
- ...se,
35
- ...o
36
- }, m = r(), { organizationId: h, widgetToken: De, initResponse: g } = ne(), Oe = ie(), _ = !!re(), v = !!(h && De), y = c(() => ce(g?.scopes), [g?.scopes]), ke = v && y.canRead && !!g, [b, x] = ve({
37
- prop: Ce,
38
- defaultProp: we ?? null,
39
- onChange: Te,
36
+ }, m = {
37
+ ...ce,
38
+ ...se
39
+ }, h = r(), { organizationId: g, widgetToken: Oe, initResponse: _ } = ne(), ke = ie(), v = !!re(), y = !!(g && Oe), b = c(() => le(_?.scopes), [_?.scopes]), Ae = y && b.canRead && !!_, x = _?.userId ?? void 0, [S, je] = l(g);
40
+ g !== void 0 && g !== S && je(g);
41
+ let [C, Me] = l(x);
42
+ x !== void 0 && x !== C && Me(x);
43
+ let [Ne, w] = ye({
44
+ prop: we,
45
+ defaultProp: Te ?? null,
46
+ onChange: Ee,
40
47
  caller: "BankAccountsWidget"
41
- }), S = ke && !b, C = s((e) => {
42
- x(e);
43
- }, [x]), [w, T] = l(!1), [E, D] = l(u), [O, k] = l([]), [Ae, A] = l(!1), [j, M] = l(), [N, je] = l({}), [P, F] = l({});
44
- _e(() => {
45
- m(i.Mounted);
46
- }, [m]);
47
- let I = t({ enabled: S }), L = pe(), R = me(), z = w, B = he({ enabled: z }), V = n({ enabled: z }), H = c(() => {
48
- let e = V.data?.data ?? [], t = h ? ge(e, {
49
- organizationId: h,
50
- organizationTypes: g?.organizationTypes ?? []
48
+ }), T = ve({
49
+ organizationId: S,
50
+ userId: C
51
+ }), Pe = d(T.current.organizationId, S) || d(T.current.userId, C);
52
+ s(() => {
53
+ let e = T.current;
54
+ T.current = {
55
+ organizationId: S,
56
+ userId: C
57
+ }, (d(e.organizationId, S) || d(e.userId, C)) && w(null);
58
+ }, [
59
+ S,
60
+ C,
61
+ w
62
+ ]);
63
+ let E = Pe ? null : Ne, D = Ae && !E, O = o((e) => {
64
+ w(e);
65
+ }, [w]), [k, Fe] = l(!1), [A, j] = l(u), [M, N] = l([]), [Ie, P] = l(!1), [F, I] = l(), [Le, Re] = l({}), [L, R] = l({});
66
+ s(() => {
67
+ h(i.Mounted);
68
+ }, [h]);
69
+ let z = t({ enabled: D }), B = me(), V = he(), H = k, U = ge({ enabled: H }), W = n({ enabled: H }), G = c(() => {
70
+ let e = W.data?.data ?? [], t = g ? _e(e, {
71
+ organizationId: g,
72
+ organizationTypes: _?.organizationTypes ?? []
51
73
  }) : e;
52
- return de(B.data?.data ?? [], ue(t));
74
+ return fe(U.data?.data ?? [], de(t));
53
75
  }, [
54
- V.data?.data,
55
- B.data?.data,
56
- h,
57
- g?.organizationTypes
58
- ]), U = B.isLoading || B.isFetchingNextPage || !!B.hasNextPage || V.isResolving, W = !U && !B.isError, G = S ? I.data?.data ?? [] : [], K = [.../* @__PURE__ */ new Set([...H.filter((e) => e.locked).map((e) => e.id), ...O])], q = g?.bankName?.trim() ?? "", Me = g?.vspName?.trim() ?? "", Ne = Se?.trim() || void 0, J = v && y.canWrite, Y = !I.hasNextPage && !I.isFetchingNextPage, Pe = c(() => Y ? oe(G) : void 0, [G, Y]), Fe = G.length > 1 && y.canRead && Y, X = s(async (t, n, r) => {
59
- await ae(r) && (e.success(n === "account" ? p.copyAccountNumberToast : p.copyRoutingNumberToast), F((e) => ({
76
+ W.data?.data,
77
+ U.data?.data,
78
+ g,
79
+ _?.organizationTypes
80
+ ]), K = U.isLoading || U.isFetchingNextPage || !!U.hasNextPage || W.isResolving, q = !K && !U.isError, J = D ? z.data?.data ?? [] : [], Y = [.../* @__PURE__ */ new Set([...G.filter((e) => e.locked).map((e) => e.id), ...M])], X = _?.bankName?.trim() ?? "", ze = _?.vspName?.trim() ?? "", Be = Ce?.trim() || void 0, Z = y && b.canWrite, Q = !z.hasNextPage && !z.isFetchingNextPage, Ve = c(() => Q ? oe(J) : void 0, [J, Q]), He = J.length > 1 && b.canRead && Q, $ = o(async (t, n, r) => {
81
+ await ae(r) && (e.success(n === "account" ? m.copyAccountNumberToast : m.copyRoutingNumberToast), R((e) => ({
60
82
  ...e,
61
83
  [t]: n
62
84
  })), window.setTimeout(() => {
63
- F((e) => ({
85
+ R((e) => ({
64
86
  ...e,
65
87
  [t]: void 0
66
88
  }));
67
89
  }, 2e3));
68
- }, [p.copyAccountNumberToast, p.copyRoutingNumberToast]), Ie = c(() => G.map((e) => ye(e, p, {
69
- isAccountNumberVisible: N[e.id] ?? !1,
70
- isAccountNumberCopied: P[e.id] === "account",
71
- isRoutingNumberCopied: P[e.id] === "routing",
72
- onToggleAccountNumberVisibility: () => je((t) => ({
90
+ }, [m.copyAccountNumberToast, m.copyRoutingNumberToast]), Ue = c(() => J.map((e) => be(e, m, {
91
+ isAccountNumberVisible: Le[e.id] ?? !1,
92
+ isAccountNumberCopied: L[e.id] === "account",
93
+ isRoutingNumberCopied: L[e.id] === "routing",
94
+ onToggleAccountNumberVisibility: () => Re((t) => ({
73
95
  ...t,
74
96
  [e.id]: !t[e.id]
75
97
  })),
76
- onCopyAccountNumber: () => void X(e.id, "account", e.accountNumber),
77
- onCopyRoutingNumber: () => void X(e.id, "routing", e.routingNumber),
98
+ onCopyAccountNumber: () => void $(e.id, "account", e.accountNumber),
99
+ onCopyRoutingNumber: () => void $(e.id, "routing", e.routingNumber),
78
100
  onSelect: () => {
79
- C(e.id), m(i.AccountSelected, { accountId: e.id });
101
+ O(e.id), h(i.AccountSelected, { accountId: e.id });
80
102
  }
81
103
  })), [
82
- G,
83
- N,
84
- P,
85
- p,
86
- X,
87
- C,
88
- m
89
- ]), Z = (t) => {
90
- R.mutate({
104
+ J,
105
+ Le,
106
+ L,
107
+ m,
108
+ $,
109
+ O,
110
+ h
111
+ ]), We = (t) => {
112
+ V.mutate({
91
113
  path: { id: t },
92
- body: { userIds: K }
114
+ body: { userIds: Y }
93
115
  }, { onSuccess: () => {
94
- te(ee), e.success(p.createSuccessToast), D(u), k([]), M(void 0), A(!1), T(!1);
116
+ te(ee), e.success(m.createSuccessToast), j(u), N([]), I(void 0), P(!1), Fe(!1);
95
117
  } });
96
- }, Le = () => {
97
- if (J && W) {
98
- if (E.nickname.trim() === "") {
99
- A(!0);
118
+ }, Ge = () => {
119
+ if (Z && q) {
120
+ if (A.nickname.trim() === "") {
121
+ P(!0);
100
122
  return;
101
123
  }
102
- if (K.length === 0) {
124
+ if (Y.length === 0) {
103
125
  console.warn("No team members selected on submit");
104
126
  return;
105
127
  }
106
- if (j) {
107
- Z(j);
128
+ if (F) {
129
+ We(F);
108
130
  return;
109
131
  }
110
- L.mutate({ body: { nickname: E.nickname.trim() } }, { onSuccess: (e) => {
111
- m(i.AccountCreated, { accountId: e?.id }), e?.id && (M(e.id), Z(e.id));
132
+ B.mutate({ body: { nickname: A.nickname.trim() } }, { onSuccess: (e) => {
133
+ h(i.AccountCreated, { accountId: e?.id }), e?.id && (I(e.id), We(e.id));
112
134
  } });
113
135
  }
114
- }, Re = (e, t) => {
115
- H.find((t) => t.id === e)?.locked || k((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
116
- }, Q = (e) => {
117
- e && !J || (e && (D(u), k([]), M(void 0), A(!1), L.reset(), R.reset()), T(e));
118
- }, $ = L.isPending || R.isPending, ze = le(H, {
119
- selectedUserIds: O,
120
- disabled: $ || !y.canWrite,
121
- fallbackTooltip: f.teamMemberAccessTooltip,
122
- onUserToggle: Re
136
+ }, Ke = (e, t) => {
137
+ G.find((t) => t.id === e)?.locked || N((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
138
+ }, qe = (e) => {
139
+ e && !Z || (e && (j(u), N([]), I(void 0), P(!1), B.reset(), V.reset()), Fe(e));
140
+ }, Je = B.isPending || V.isPending, Ye = ue(G, {
141
+ selectedUserIds: M,
142
+ disabled: Je || !b.canWrite,
143
+ fallbackTooltip: p.teamMemberAccessTooltip,
144
+ onUserToggle: Ke
123
145
  });
124
146
  return {
125
- "data-testid": Ee,
126
- selectedAccountId: b,
127
- title: f.title,
128
- bankDisplayName: q,
129
- bankLogoSrc: be,
130
- bankLogoAlt: xe,
131
- availableBalanceLabel: Pe,
132
- shouldDisplayAvailableBalance: Fe,
133
- isBankingTaglineVisible: d,
134
- accountCards: Ie,
135
- shouldDisplayAddAccountCard: y.canWrite,
136
- isLoading: !_ && (!v || Oe && !g || S && (I.isLoading || I.isFetchingNextPage || I.hasNextPage)),
137
- isError: _ || S && I.isError,
138
- isCreateOpen: w,
139
- createForm: E,
147
+ "data-testid": De,
148
+ selectedAccountId: E,
149
+ title: p.title,
150
+ bankDisplayName: X,
151
+ bankLogoSrc: xe,
152
+ bankLogoAlt: Se,
153
+ availableBalanceLabel: Ve,
154
+ shouldDisplayAvailableBalance: He,
155
+ isBankingTaglineVisible: f,
156
+ accountCards: Ue,
157
+ shouldDisplayAddAccountCard: b.canWrite,
158
+ isLoading: !v && (!y || ke && !_ || D && (z.isLoading || z.isFetchingNextPage || z.hasNextPage)),
159
+ isError: v || D && z.isError,
160
+ isCreateOpen: k,
161
+ createForm: A,
140
162
  legalCopy: {
141
- bankName: q,
142
- vspName: Me,
143
- agreementUrl: Ne
163
+ bankName: X,
164
+ vspName: ze,
165
+ agreementUrl: Be
144
166
  },
145
- accessRows: ze,
146
- isTeamMembersLoading: U,
147
- isTeamMembersError: B.isError,
148
- isCreateSubmitDisabled: !J || !W || E.nickname.trim() === "" || K.length === 0,
149
- isCreateError: L.isError || R.isError,
150
- hasNicknameError: Ae,
151
- isSubmitting: $,
152
- isCreateDisabled: !J,
153
- onCreateOpenChange: Q,
167
+ accessRows: Ye,
168
+ isTeamMembersLoading: K,
169
+ isTeamMembersError: U.isError,
170
+ isCreateSubmitDisabled: !Z || !q || A.nickname.trim() === "" || Y.length === 0,
171
+ isCreateError: B.isError || V.isError,
172
+ hasNicknameError: Ie,
173
+ isSubmitting: Je,
174
+ isCreateDisabled: !Z,
175
+ onCreateOpenChange: qe,
154
176
  onCreateFormChange: (e) => {
155
- A(!1), D(e);
177
+ P(!1), j(e);
156
178
  },
157
- onCreateSubmit: Le,
158
- onAddAccountClick: () => Q(!0),
159
- onSelectAccount: C
179
+ onCreateSubmit: Ge,
180
+ onAddAccountClick: () => qe(!0),
181
+ onSelectAccount: O
160
182
  };
161
183
  }
162
- function ye(e, t, n) {
184
+ function be(e, t, n) {
163
185
  return {
164
186
  id: e.id,
165
187
  name: e.nickname?.trim() || t.accountFallback,
166
188
  balanceLabel: a(e.balance),
167
189
  accountNumberLabel: e.accountNumber,
168
- maskedAccountNumberLabel: o(e.accountNumber),
190
+ maskedAccountNumberLabel: se(e.accountNumber),
169
191
  routingNumberLabel: e.routingNumber,
170
192
  ...n
171
193
  };
172
194
  }
173
195
  //#endregion
174
- export { d as useBankAccountsWidget };
196
+ export { f as useBankAccountsWidget };
@@ -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.2.307", n = "e6190e49468ca4e80ee98046dc93a991cb03537c", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.2.308", n = "23859351e9e0bc83c3468ea19507174c7848d694", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -12,12 +12,13 @@ import { TRANSFERS_ANALYTICS_EVENTS as s } from "./index2.js";
12
12
  import { useCreateBookTransferMutation as c } from "../../data-access/dist/index7.js";
13
13
  import { useCreateAchMoneyMovementMutation as l } from "../../data-access/dist/index8.js";
14
14
  import "../../data-access/dist/index.js";
15
- import { useCallback as u, useMemo as d, useState as f } from "react";
15
+ import { useCallback as u, useEffect as d, useMemo as f, useState as p } from "react";
16
+ import { useControllableState as m } from "@radix-ui/react-use-controllable-state";
16
17
  //#region ../../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js
17
- function p(e) {
18
+ function h(e) {
18
19
  return e.slice(-4);
19
20
  }
20
- function m(e, t) {
21
+ function g(e, t) {
21
22
  let r = e.balance;
22
23
  if (!r || r.value === void 0 || r.value === null) return;
23
24
  let i = r.currencyCode ?? t, o = n({
@@ -29,14 +30,14 @@ function m(e, t) {
29
30
  includeSpaceAfterCurrencySymbol: !1
30
31
  });
31
32
  }
32
- function h(e, t, n, r) {
33
+ function _(e, t, n, r) {
33
34
  let i = n.find((t) => t.id === e);
34
35
  if (i?.balance?.currencyCode) return i.balance.currencyCode;
35
36
  let a = n.find((e) => e.id === t);
36
37
  return a?.balance?.currencyCode ? a.balance.currencyCode : r;
37
38
  }
38
- function g(e, t, n) {
39
- let r = p(e.accountNumber), i = e.nickname?.trim() || t.accountFallbackName, a = m(e, n.defaultCurrencyCode);
39
+ function v(e, t, n) {
40
+ let r = h(e.accountNumber), i = e.nickname?.trim() || t.accountFallbackName, a = g(e, n.defaultCurrencyCode);
40
41
  return {
41
42
  optionValue: e.id,
42
43
  primaryLabel: i,
@@ -44,15 +45,15 @@ function g(e, t, n) {
44
45
  balanceLabel: a
45
46
  };
46
47
  }
47
- function _(e, t) {
48
- let n = p(e.accountNumber), r = e.nickname?.trim() || e.nameOnAccount;
48
+ function y(e, t) {
49
+ let n = h(e.accountNumber), r = e.nickname?.trim() || e.nameOnAccount;
49
50
  return {
50
51
  optionValue: e.id,
51
52
  primaryLabel: r,
52
53
  secondaryLabel: `${t.embeddedAccountMaskPrefix}${n}`
53
54
  };
54
55
  }
55
- function v(e, t, n, r, i) {
56
+ function b(e, t, n, r, i) {
56
57
  return {
57
58
  primaryLabel: e?.primaryLabel ?? "",
58
59
  accountDetailLabel: t ? `${i} ${t}` : e?.secondaryLabel ?? "",
@@ -61,238 +62,247 @@ function v(e, t, n, r, i) {
61
62
  showInstitutionIcon: n
62
63
  };
63
64
  }
64
- function y({ labels: n, featureLabels: p, embeddedBankAccounts: m, verifiedExternalBankAccounts: y, track: b }) {
65
- let x = c(), S = l(), C = d(() => new Set(m.map((e) => e.id)), [m]), w = d(() => m.map((e) => g(e, n, p)), [
66
- m,
67
- p,
65
+ function x({ labels: n, featureLabels: h, embeddedBankAccounts: g, verifiedExternalBankAccounts: x, track: S, isTransferMoneyOpen: C, defaultIsTransferMoneyOpen: ee, onTransferMoneyOpenChange: w }) {
66
+ let T = c(), E = l(), D = f(() => new Set(g.map((e) => e.id)), [g]), O = f(() => g.map((e) => v(e, n, h)), [
67
+ g,
68
+ h,
68
69
  n.accountFallbackName,
69
70
  n.embeddedAccountMaskPrefix
70
- ]), T = d(() => y.map((e) => _(e, n)), [n.embeddedAccountMaskPrefix, y]), E = d(() => [...w, ...T], [w, T]), [D, O] = f(!1), [k, A] = f("accounts"), [j, M] = f(""), [N, P] = f(""), [F, I] = f(""), [L, R] = f(null), [z, B] = f(!1), V = u(() => {
71
- A("accounts"), M(""), P(""), I(""), R(null), B(!1);
72
- }, []), H = u(() => {
73
- V(), O(!0), b(s.TransferMoneyOpened);
74
- }, [V, b]), U = C.has(j), W = C.has(N), G = d(() => h(j, N, m, p.defaultCurrencyCode), [
75
- m,
76
- p.defaultCurrencyCode,
77
- j,
78
- N
79
- ]), K = d(() => i(G), [G]), q = d(() => N ? W ? E.filter((e) => e.optionValue !== N) : w.filter((e) => e.optionValue !== N) : E, [
80
- E,
81
- w,
82
- N,
83
- W
84
- ]), J = d(() => j ? U ? E.filter((e) => e.optionValue !== j) : w.filter((e) => e.optionValue !== j) : E, [
85
- E,
86
- w,
87
- j,
88
- U
89
- ]), Y = !!(j && N && j !== N), X = d(() => o(F, G) !== null, [F, G]), Z = u((e, r, i) => {
71
+ ]), k = f(() => x.map((e) => y(e, n)), [n.embeddedAccountMaskPrefix, x]), A = f(() => [...O, ...k], [O, k]), [j, M] = m({
72
+ prop: C,
73
+ defaultProp: ee ?? !1,
74
+ onChange: w,
75
+ caller: "TransfersWidget"
76
+ }), [N, P] = p("accounts"), [F, I] = p(""), [L, R] = p(""), [z, B] = p(""), [te, V] = p(null), [ne, H] = p(!1), U = u(() => {
77
+ P("accounts"), I(""), R(""), B(""), V(null), H(!1);
78
+ }, []), [W, G] = p(j);
79
+ j !== W && (G(j), j && U()), d(() => {
80
+ j && S(s.TransferMoneyOpened);
81
+ }, [j, S]);
82
+ let K = u((e) => {
83
+ M(e);
84
+ }, [M]), q = u(() => {
85
+ M(!0);
86
+ }, [M]), J = D.has(F), Y = D.has(L), X = f(() => _(F, L, g, h.defaultCurrencyCode), [
87
+ g,
88
+ h.defaultCurrencyCode,
89
+ F,
90
+ L
91
+ ]), re = f(() => i(X), [X]), ie = f(() => L ? Y ? A.filter((e) => e.optionValue !== L) : O.filter((e) => e.optionValue !== L) : A, [
92
+ A,
93
+ O,
94
+ L,
95
+ Y
96
+ ]), ae = f(() => F ? J ? A.filter((e) => e.optionValue !== F) : O.filter((e) => e.optionValue !== F) : A, [
97
+ A,
98
+ O,
99
+ F,
100
+ J
101
+ ]), Z = !!(F && L && F !== L), oe = f(() => o(z, X) !== null, [z, X]), Q = u((e, r, i) => {
90
102
  let a = o(r, i);
91
103
  if (a === null) {
92
- R(null);
104
+ V(null);
93
105
  return;
94
106
  }
95
- if (!C.has(e)) {
96
- R(null);
107
+ if (!D.has(e)) {
108
+ V(null);
97
109
  return;
98
110
  }
99
- let s = m.find((t) => t.id === e);
111
+ let s = g.find((t) => t.id === e);
100
112
  if (!s) {
101
- R(null);
113
+ V(null);
102
114
  return;
103
115
  }
104
116
  let c = t(s.balance?.value);
105
- R(a > c ? n.modalInsufficientFundsError : null);
117
+ V(a > c ? n.modalInsufficientFundsError : null);
106
118
  }, [
107
- m,
108
- C,
119
+ g,
120
+ D,
109
121
  n.modalInsufficientFundsError
110
- ]), Q = u((e) => {
111
- M(e);
112
- let t = h(e, N, m, p.defaultCurrencyCode);
113
- Z(e, F, t);
122
+ ]), se = u((e) => {
123
+ I(e);
124
+ let t = _(e, L, g, h.defaultCurrencyCode);
125
+ Q(e, z, t);
126
+ }, [
127
+ z,
128
+ g,
129
+ h.defaultCurrencyCode,
130
+ Q,
131
+ L
132
+ ]), ce = u((e) => {
133
+ R(e);
134
+ let t = _(F, e, g, h.defaultCurrencyCode);
135
+ Q(F, z, t);
114
136
  }, [
137
+ z,
138
+ g,
139
+ h.defaultCurrencyCode,
115
140
  F,
116
- m,
117
- p.defaultCurrencyCode,
118
- Z,
119
- N
141
+ Q
120
142
  ]), $ = u((e) => {
121
- P(e);
122
- let t = h(j, e, m, p.defaultCurrencyCode);
123
- Z(j, F, t);
143
+ B(e), Q(F, e, X);
124
144
  }, [
125
145
  F,
126
- m,
127
- p.defaultCurrencyCode,
128
- j,
129
- Z
130
- ]), ee = u((e) => {
131
- I(e), Z(j, e, G);
132
- }, [
133
- j,
134
- Z,
135
- G
136
- ]), te = u(() => {
137
- M(""), P(""), I(""), R(null);
138
- }, []), ne = d(() => {
139
- let e = o(F, G);
146
+ Q,
147
+ X
148
+ ]), le = u(() => {
149
+ I(""), R(""), B(""), V(null);
150
+ }, []), ue = f(() => {
151
+ let e = o(z, X);
140
152
  if (e === null) return "";
141
- let t = r(G);
153
+ let t = r(X);
142
154
  return a(e / 10 ** t, {
143
- currencyCode: G,
155
+ currencyCode: X,
144
156
  includeSpaceAfterCurrencySymbol: !1
145
157
  });
146
- }, [F, G]), re = d(() => {
147
- let e = E.find((e) => e.optionValue === j), t = m.find((e) => e.id === j), r = y.find((e) => e.id === j);
148
- return v(e, t?.accountNumber ?? r?.accountNumber, !!r, n.modalAvailableBalanceCaption, n.modalReviewAccountNumberPrefix);
158
+ }, [z, X]), de = f(() => {
159
+ let e = A.find((e) => e.optionValue === F), t = g.find((e) => e.id === F), r = x.find((e) => e.id === F);
160
+ return b(e, t?.accountNumber ?? r?.accountNumber, !!r, n.modalAvailableBalanceCaption, n.modalReviewAccountNumberPrefix);
149
161
  }, [
150
- E,
151
- m,
152
- j,
162
+ A,
163
+ g,
164
+ F,
153
165
  n.modalAvailableBalanceCaption,
154
166
  n.modalReviewAccountNumberPrefix,
155
- y
156
- ]), ie = d(() => {
157
- let e = E.find((e) => e.optionValue === N), t = m.find((e) => e.id === N), r = y.find((e) => e.id === N);
158
- return v(e, t?.accountNumber ?? r?.accountNumber, !!r, n.modalAvailableBalanceCaption, n.modalReviewAccountNumberPrefix);
167
+ x
168
+ ]), fe = f(() => {
169
+ let e = A.find((e) => e.optionValue === L), t = g.find((e) => e.id === L), r = x.find((e) => e.id === L);
170
+ return b(e, t?.accountNumber ?? r?.accountNumber, !!r, n.modalAvailableBalanceCaption, n.modalReviewAccountNumberPrefix);
159
171
  }, [
160
- E,
161
- m,
172
+ A,
173
+ g,
162
174
  n.modalAvailableBalanceCaption,
163
175
  n.modalReviewAccountNumberPrefix,
164
- N,
165
- y
166
- ]), ae = u(() => {
167
- if (!Y) return;
168
- let e = o(F, G);
176
+ L,
177
+ x
178
+ ]), pe = u(() => {
179
+ if (!Z) return;
180
+ let e = o(z, X);
169
181
  if (e === null) {
170
- R(n.modalAmountInvalidError);
182
+ V(n.modalAmountInvalidError);
171
183
  return;
172
184
  }
173
- if (U) {
174
- let r = m.find((e) => e.id === j);
185
+ if (J) {
186
+ let r = g.find((e) => e.id === F);
175
187
  if (r && e > t(r.balance?.value)) {
176
- R(n.modalInsufficientFundsError);
188
+ V(n.modalInsufficientFundsError);
177
189
  return;
178
190
  }
179
191
  }
180
- R(null), A("review");
192
+ V(null), P("review");
181
193
  }, [
194
+ z,
195
+ Z,
196
+ g,
197
+ J,
182
198
  F,
183
- Y,
184
- m,
185
- U,
186
- j,
187
199
  n.modalAmountInvalidError,
188
200
  n.modalInsufficientFundsError,
189
- G
190
- ]), oe = u(() => {
191
- let e = o(F, G);
201
+ X
202
+ ]), me = u(() => {
203
+ let e = o(z, X);
192
204
  if (e === null) {
193
- R(n.modalAmountInvalidError);
205
+ V(n.modalAmountInvalidError);
194
206
  return;
195
207
  }
196
- if (U) {
197
- let r = m.find((e) => e.id === j);
208
+ if (J) {
209
+ let r = g.find((e) => e.id === F);
198
210
  if (r && e > t(r.balance?.value)) {
199
- R(n.modalInsufficientFundsError);
211
+ V(n.modalInsufficientFundsError);
200
212
  return;
201
213
  }
202
214
  }
203
- R(null), A("review");
215
+ V(null), P("review");
204
216
  }, [
217
+ z,
218
+ g,
219
+ J,
205
220
  F,
206
- m,
207
- U,
208
- j,
209
221
  n.modalAmountInvalidError,
210
222
  n.modalInsufficientFundsError,
211
- G
212
- ]), se = u(() => {
213
- if (k === "amount") {
214
- A("accounts");
223
+ X
224
+ ]), he = u(() => {
225
+ if (N === "amount") {
226
+ P("accounts");
215
227
  return;
216
228
  }
217
- k === "review" && A("accounts");
218
- }, [k]), ce = u(async () => {
219
- let t = o(F, G);
229
+ N === "review" && P("accounts");
230
+ }, [N]), ge = u(async () => {
231
+ let t = o(z, X);
220
232
  if (t === null) {
221
- R(n.modalAmountInvalidError);
233
+ V(n.modalAmountInvalidError);
222
234
  return;
223
235
  }
224
- if (!U && !W) {
236
+ if (!J && !Y) {
225
237
  e.error(n.modalUnsupportedPairError);
226
238
  return;
227
239
  }
228
240
  let r;
229
- r = U && W ? "INTERNAL_TO_INTERNAL" : U && !W ? "INTERNAL_TO_EXTERNAL" : "EXTERNAL_TO_INTERNAL";
241
+ r = J && Y ? "INTERNAL_TO_INTERNAL" : J && !Y ? "INTERNAL_TO_EXTERNAL" : "EXTERNAL_TO_INTERNAL";
230
242
  try {
231
- r === "INTERNAL_TO_INTERNAL" ? await x.mutateAsync({ body: {
232
- fromBankAccountId: j,
233
- toBankAccountId: N,
243
+ r === "INTERNAL_TO_INTERNAL" ? await T.mutateAsync({ body: {
244
+ fromBankAccountId: F,
245
+ toBankAccountId: L,
234
246
  amount: t,
235
- currencyCode: G
236
- } }) : await S.mutateAsync({ body: {
237
- fromBankAccountId: j,
238
- toBankAccountId: N,
247
+ currencyCode: X
248
+ } }) : await E.mutateAsync({ body: {
249
+ fromBankAccountId: F,
250
+ toBankAccountId: L,
239
251
  amount: t,
240
- currencyCode: G,
252
+ currencyCode: X,
241
253
  type: r,
242
- secCode: p.defaultSecCode
243
- } }), B(!0), A("result"), b(s.TransferSubmitted, { transferType: r });
254
+ secCode: h.defaultSecCode
255
+ } }), H(!0), P("result"), S(s.TransferSubmitted, { transferType: r });
244
256
  } catch {
245
257
  e.error(n.modalSubmitFailedError);
246
258
  }
247
259
  }, [
260
+ z,
261
+ E,
262
+ T,
263
+ J,
248
264
  F,
249
- S,
250
- x,
251
- U,
252
- j,
253
265
  n.modalSubmitFailedError,
254
266
  n.modalUnsupportedPairError,
255
267
  n.modalAmountInvalidError,
256
- W,
257
- N,
258
- b,
259
- G,
260
- p.defaultSecCode
268
+ Y,
269
+ L,
270
+ S,
271
+ X,
272
+ h.defaultSecCode
261
273
  ]);
262
274
  return {
263
275
  modalProps: {
264
- open: D,
265
- onOpenChange: (e) => {
266
- O(e), e || V();
267
- },
268
- step: k,
269
- fromOptions: q,
270
- toOptions: J,
271
- fromValue: j,
272
- toValue: N,
273
- onFromValueChange: Q,
274
- onToValueChange: $,
275
- amountValue: F,
276
- onAmountValueChange: ee,
277
- amountError: L,
278
- amountInputPrefix: K,
279
- reviewFromAccount: re,
280
- reviewToAccount: ie,
281
- reviewAmountLabel: ne,
282
- isSubmitting: x.isPending || S.isPending,
283
- isSuccess: z,
284
- canContinueFromAccounts: Y,
285
- canContinueFromAmount: X,
286
- onContinueFromAccounts: ae,
287
- onContinueFromAmount: oe,
288
- onBack: se,
289
- onSubmit: () => void ce(),
290
- onClearSelections: te
276
+ open: j,
277
+ onOpenChange: K,
278
+ step: N,
279
+ fromOptions: ie,
280
+ toOptions: ae,
281
+ fromValue: F,
282
+ toValue: L,
283
+ onFromValueChange: se,
284
+ onToValueChange: ce,
285
+ amountValue: z,
286
+ onAmountValueChange: $,
287
+ amountError: te,
288
+ amountInputPrefix: re,
289
+ reviewFromAccount: de,
290
+ reviewToAccount: fe,
291
+ reviewAmountLabel: ue,
292
+ isSubmitting: T.isPending || E.isPending,
293
+ isSuccess: ne,
294
+ canContinueFromAccounts: Z,
295
+ canContinueFromAmount: oe,
296
+ onContinueFromAccounts: pe,
297
+ onContinueFromAmount: me,
298
+ onBack: he,
299
+ onSubmit: () => void ge(),
300
+ onClearSelections: le
291
301
  },
292
- openModal: H
302
+ openModal: q
293
303
  };
294
304
  }
295
- function b(e, t, r, i) {
305
+ function S(e, t, r, i) {
296
306
  let o = t.get(e.fromAccount.id) ?? e.fromAccount.nickname ?? r.accountFallbackName, s = t.get(e.toAccount.id) ?? e.toAccount.nickname ?? r.accountFallbackName, c = new Date(e.date), l = Number.isNaN(c.getTime()) ? i.unavailableLabel : new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(c), u = e.amount?.value, d = u == null || !Number.isFinite(Number(u)) ? i.unavailableLabel : a(n(e.amount), {
297
307
  currencyCode: e.amount.currencyCode,
298
308
  includeSpaceAfterCurrencySymbol: !1
@@ -306,4 +316,4 @@ function b(e, t, r, i) {
306
316
  };
307
317
  }
308
318
  //#endregion
309
- export { b as mapTransferToRowView, y as useTransferMoneyModalController };
319
+ export { S as mapTransferToRowView, x as useTransferMoneyModalController };
@@ -16,83 +16,86 @@ import { useTransferExternalAccountsQuery as l } from "../../data-access/dist/in
16
16
  import { useMergedRecentBankAccountTransfersQuery as u } from "../../data-access/dist/index6.js";
17
17
  import "../../data-access/dist/index.js";
18
18
  import { mapTransferToRowView as d, useTransferMoneyModalController as f } from "./index4.js";
19
- import { TRANSFERS_WIDGET_LABELS_EN as p } from "../../ui/dist/lib/TransfersWidget/labels.js";
20
- import { TransfersWidget as ee } from "../../ui/dist/lib/TransfersWidget/TransfersWidget.js";
19
+ import { TRANSFERS_WIDGET_LABELS_EN as ee } from "../../ui/dist/lib/TransfersWidget/labels.js";
20
+ import { TransfersWidget as te } from "../../ui/dist/lib/TransfersWidget/TransfersWidget.js";
21
21
  import "../../ui/dist/index.js";
22
- import { useCallback as m, useEffect as h, useMemo as g } from "react";
23
- import { jsx as _ } from "react/jsx-runtime";
22
+ import { useCallback as p, useEffect as m, useMemo as h } from "react";
23
+ import { jsx as g } from "react/jsx-runtime";
24
24
  //#region ../../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js
25
- var v = [e.TransferWriteOrg, e.BankAccountReadOrg], y = [r, n];
26
- function b(e) {
25
+ var _ = [e.TransferWriteOrg, e.BankAccountReadOrg], v = [r, n];
26
+ function y(e) {
27
27
  return e.slice(-4);
28
28
  }
29
- function x({ labels: n, featureLabels: r }) {
30
- let x = {
29
+ function b({ labels: n, featureLabels: r, isTransferMoneyOpen: b, defaultIsTransferMoneyOpen: x, onTransferMoneyOpenChange: S }) {
30
+ let C = {
31
31
  ...a,
32
32
  ...r
33
- }, S = {
34
- ...p,
33
+ }, w = {
34
+ ...ee,
35
35
  ...n,
36
36
  ...r?.routeSeparator === void 0 ? {} : { listAccountsSeparator: r.routeSeparator }
37
- }, C = t(), { initResponse: w } = i();
38
- h(() => {
39
- C(o.Mounted);
40
- }, [C]);
41
- let T = w?.scopes ?? [], E = T.includes(e.ExternalBankAccountReadOrg), D = T.includes(e.PaymentRailAch), O = E && D, k = v.every((e) => T.includes(e)), { mergedTransfers: A, isLoading: j, isError: M, refetch: N } = u(), P = c(), { data: F, isError: I, refetch: L } = P, R = l({ enabled: E }), { data: z, isError: B, refetch: V } = R, H = F?.data ?? [], U = g(() => O ? (z?.data ?? []).filter((e) => e.verificationStatus === "VERIFIED" && e.accountStatus === "ACTIVE") : [], [O, z?.data]), W = g(() => {
37
+ }, T = t(), { initResponse: E } = i();
38
+ m(() => {
39
+ T(o.Mounted);
40
+ }, [T]);
41
+ let D = E?.scopes ?? [], O = D.includes(e.ExternalBankAccountReadOrg), k = D.includes(e.PaymentRailAch), A = O && k, j = _.every((e) => D.includes(e)), { mergedTransfers: M, isLoading: N, isError: P, refetch: F } = u(), I = c(), { data: L, isError: R, refetch: z } = I, B = l({ enabled: O }), { data: V, isError: H, refetch: U } = B, W = L?.data ?? [], G = h(() => A ? (V?.data ?? []).filter((e) => e.verificationStatus === "VERIFIED" && e.accountStatus === "ACTIVE") : [], [A, V?.data]), K = h(() => {
42
42
  let e = /* @__PURE__ */ new Map();
43
- for (let t of H) {
44
- let n = b(t.accountNumber), r = t.nickname?.trim() || S.accountFallbackName;
43
+ for (let t of W) {
44
+ let n = y(t.accountNumber), r = t.nickname?.trim() || w.accountFallbackName;
45
45
  e.set(t.id, `${r} ···${n}`);
46
46
  }
47
- for (let t of U) {
48
- let n = b(t.accountNumber), r = t.nickname?.trim() || t.nameOnAccount;
47
+ for (let t of G) {
48
+ let n = y(t.accountNumber), r = t.nickname?.trim() || t.nameOnAccount;
49
49
  e.set(t.id, `${r} ···${n}`);
50
50
  }
51
51
  return e;
52
52
  }, [
53
- H,
54
- S.accountFallbackName,
55
- U
56
- ]), G = g(() => A.map((e) => d(e, W, S, x)), [
57
53
  W,
58
- x,
59
- S,
60
- A
61
- ]), K = m(() => {
62
- N(), L(), E && V();
54
+ w.accountFallbackName,
55
+ G
56
+ ]), q = h(() => M.map((e) => d(e, K, w, C)), [
57
+ K,
58
+ C,
59
+ w,
60
+ M
61
+ ]), J = p(() => {
62
+ F(), z(), O && U();
63
63
  }, [
64
- E,
65
- L,
66
- V,
67
- N
64
+ O,
65
+ z,
66
+ U,
67
+ F
68
68
  ]);
69
- h(() => {
69
+ m(() => {
70
70
  let e = () => {
71
- K();
71
+ J();
72
72
  };
73
- for (let t of y) window.addEventListener(t, e);
73
+ for (let t of v) window.addEventListener(t, e);
74
74
  return () => {
75
- for (let t of y) window.removeEventListener(t, e);
75
+ for (let t of v) window.removeEventListener(t, e);
76
76
  };
77
- }, [K]);
78
- let { modalProps: q, openModal: J } = f({
79
- labels: S,
80
- featureLabels: x,
81
- embeddedBankAccounts: H,
82
- verifiedExternalBankAccounts: U,
83
- track: C
84
- }), Y = s(P), X = E && s(R), Z = j || Y || X, Q = M || I || E && B, te = H.length + U.length, $ = !(H.length > 0) || te <= 1;
85
- return /* @__PURE__ */ _(ee, {
86
- transferRows: G,
87
- isLoading: Z,
77
+ }, [J]);
78
+ let { modalProps: Y, openModal: X } = f({
79
+ labels: w,
80
+ featureLabels: C,
81
+ embeddedBankAccounts: W,
82
+ verifiedExternalBankAccounts: G,
83
+ track: T,
84
+ isTransferMoneyOpen: b,
85
+ defaultIsTransferMoneyOpen: x,
86
+ onTransferMoneyOpenChange: S
87
+ }), Z = s(I), ne = O && s(B), re = N || Z || ne, Q = P || R || O && H, ie = W.length + G.length, $ = !(W.length > 0) || ie <= 1;
88
+ return /* @__PURE__ */ g(te, {
89
+ transferRows: q,
90
+ isLoading: re,
88
91
  isError: Q,
89
- onRetry: Q ? () => void K() : void 0,
90
- showTransferMoneyCta: k,
92
+ onRetry: Q ? () => void J() : void 0,
93
+ showTransferMoneyCta: j,
91
94
  isTransferMoneyCtaDisabled: $,
92
- onTransferMoneyClick: k && !$ ? () => J() : void 0,
93
- transferMoneyModal: q,
95
+ onTransferMoneyClick: j && !$ ? () => X() : void 0,
96
+ transferMoneyModal: Y,
94
97
  labels: n
95
98
  });
96
99
  }
97
100
  //#endregion
98
- export { x as TransfersWidgetInner };
101
+ export { b as TransfersWidgetInner };
@@ -11,13 +11,16 @@ import { WIDGET_NAME as n } from "./index2.js";
11
11
  import { TransfersWidgetInner as r } from "./index5.js";
12
12
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
13
13
  //#region ../../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js
14
- function o({ labels: o, featureLabels: s, ...c }) {
14
+ function o({ labels: o, featureLabels: s, isTransferMoneyOpen: c, defaultIsTransferMoneyOpen: l, onTransferMoneyOpenChange: u, ...d }) {
15
15
  return /* @__PURE__ */ a(t, {
16
- ...c,
16
+ ...d,
17
17
  widgetName: n,
18
18
  children: [/* @__PURE__ */ i(e, {}), /* @__PURE__ */ i(r, {
19
19
  labels: o,
20
- featureLabels: s
20
+ featureLabels: s,
21
+ isTransferMoneyOpen: c,
22
+ defaultIsTransferMoneyOpen: l,
23
+ onTransferMoneyOpenChange: u
21
24
  })]
22
25
  });
23
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.2.307",
3
+ "version": "0.2.308",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {