@tesouro/embedded-components-react 0.3.16 → 0.3.18
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 +22 -1
- package/dist/index.js +10 -10
- package/dist/lib/AcceptDisclosuresWidget.d.ts +11 -1
- package/dist/lib/AcceptDisclosuresWidget.js +1 -1
- package/dist/lib/BalancesWidget.js +1 -1
- package/dist/lib/BankAccountOnboardingWidget.d.ts +21 -21
- package/dist/lib/BankAccountOnboardingWidget.js +1 -1
- package/dist/lib/CardsWidget.js +1 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.js +1 -1
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/lib/InsightsWidget.js +1 -1
- package/dist/lib/ReceiptMatchWidget.js +1 -1
- package/dist/lib/TransfersWidget.js +1 -1
- package/dist/lib/UploadReceiptWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +10 -140
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +152 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index4.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index5.js +15 -64
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js +75 -0
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/BalancesWidget.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/SingleBalance/SingleBalance.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +109 -169
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +170 -63
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +73 -81
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +77 -101
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +110 -83
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +91 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +7 -28
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +26 -320
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +341 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index9.js +29 -100
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +42 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +80 -77
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsHeader.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +23 -24
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js +24 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +28 -55
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +54 -209
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +206 -81
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +95 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +1 -255
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +253 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +2 -71
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +7 -218
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +219 -79
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +2 -47
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +49 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleCard.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleForm.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +12 -14
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +21 -62
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +67 -46
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/testIds.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +151 -135
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +17 -15
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index9.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +21 -20
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +18 -99
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +116 -19
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js +13 -11
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
|
@@ -7,21 +7,21 @@ import { createPortal as t } from "react-dom";
|
|
|
7
7
|
import { jsx as n } from "react/jsx-runtime";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js
|
|
9
9
|
var r = e.createContext(null);
|
|
10
|
-
function i({ children: i, expandContainer: a = !1 }) {
|
|
11
|
-
let
|
|
10
|
+
function i({ children: i, expandContainer: a = !1, testIds: o }) {
|
|
11
|
+
let s = e.useContext(r);
|
|
12
12
|
e.useEffect(() => {
|
|
13
|
-
if (!
|
|
14
|
-
let e =
|
|
15
|
-
return
|
|
16
|
-
|
|
13
|
+
if (!s || !a) return;
|
|
14
|
+
let e = s.style.minHeight;
|
|
15
|
+
return s.style.minHeight = "min(840px, 92vh)", () => {
|
|
16
|
+
s.style.minHeight = e;
|
|
17
17
|
};
|
|
18
|
-
}, [
|
|
19
|
-
let
|
|
18
|
+
}, [s, a]);
|
|
19
|
+
let c = /* @__PURE__ */ n("div", {
|
|
20
20
|
className: "ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-2xl ttw:bg-background",
|
|
21
|
-
"data-testid":
|
|
21
|
+
"data-testid": o?.root,
|
|
22
22
|
children: i
|
|
23
23
|
});
|
|
24
|
-
return
|
|
24
|
+
return s ? t(c, s) : c;
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
export { r as OnboardingShellOverlayContainerContext, i as OnboardingShellOverlayPortal };
|
|
@@ -21,41 +21,41 @@ function o(e) {
|
|
|
21
21
|
}, [e])
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
function s({ activeStep: s, scrollForMoreLabel: c, children: l }) {
|
|
25
|
-
let { containerRef:
|
|
24
|
+
function s({ activeStep: s, scrollForMoreLabel: c, children: l, testIds: u }) {
|
|
25
|
+
let { containerRef: d, showHint: f, hasOverflow: p, fadeVisible: m, fadeHeight: h, resetHint: g } = e(), { mounted: _, visible: v, onTransitionEnd: y } = o(m), { mounted: b, visible: x, onTransitionEnd: S } = o(f);
|
|
26
26
|
return t.useEffect(() => {
|
|
27
|
-
|
|
28
|
-
}, [s,
|
|
29
|
-
ref:
|
|
27
|
+
g();
|
|
28
|
+
}, [s, g]), /* @__PURE__ */ r("div", {
|
|
29
|
+
ref: d,
|
|
30
30
|
className: "ttw:relative ttw:min-h-0 ttw:overflow-y-auto ttw:px-8 ttw:pt-2",
|
|
31
|
-
"data-testid":
|
|
31
|
+
"data-testid": u?.root,
|
|
32
32
|
children: [
|
|
33
33
|
/* @__PURE__ */ n("div", {
|
|
34
34
|
className: "ttw:pb-4",
|
|
35
35
|
children: l
|
|
36
36
|
}),
|
|
37
|
-
|
|
37
|
+
p && _ ? /* @__PURE__ */ n("div", {
|
|
38
38
|
"aria-hidden": !0,
|
|
39
|
-
"data-testid":
|
|
40
|
-
onTransitionEnd:
|
|
39
|
+
"data-testid": u?.fade,
|
|
40
|
+
onTransitionEnd: y,
|
|
41
41
|
className: "ttw:pointer-events-none ttw:sticky ttw:bottom-0 ttw:left-0 ttw:right-0 ttw:z-[1] ttw:transition-opacity ttw:ease-in-out",
|
|
42
42
|
style: {
|
|
43
|
-
height:
|
|
44
|
-
marginTop: `-${
|
|
45
|
-
opacity: +!!
|
|
43
|
+
height: h,
|
|
44
|
+
marginTop: `-${h}px`,
|
|
45
|
+
opacity: +!!v,
|
|
46
46
|
transitionDuration: `${a}ms`,
|
|
47
47
|
background: "linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--ttw-background) 85%, var(--ttw-background) 100%)"
|
|
48
48
|
}
|
|
49
49
|
}) : null,
|
|
50
|
-
|
|
50
|
+
b ? /* @__PURE__ */ r("div", {
|
|
51
51
|
role: "status",
|
|
52
52
|
"aria-live": "polite",
|
|
53
|
-
"data-testid":
|
|
54
|
-
onTransitionEnd:
|
|
53
|
+
"data-testid": u?.hint,
|
|
54
|
+
onTransitionEnd: S,
|
|
55
55
|
className: "ttw:pointer-events-none ttw:absolute ttw:left-1/2 ttw:z-[2] ttw:flex ttw:-translate-x-1/2 ttw:items-center ttw:gap-1 ttw:rounded-full ttw:bg-primary ttw:px-3 ttw:py-1.5 ttw:text-[13px] ttw:font-medium ttw:text-primary-foreground ttw:shadow-md ttw:transition-opacity ttw:ease-in-out",
|
|
56
56
|
style: {
|
|
57
|
-
bottom:
|
|
58
|
-
opacity: +!!
|
|
57
|
+
bottom: h / 2,
|
|
58
|
+
opacity: +!!x,
|
|
59
59
|
transitionDuration: `${a}ms`
|
|
60
60
|
},
|
|
61
61
|
children: [c, /* @__PURE__ */ n(i, {
|
|
@@ -1,101 +1,20 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
6
|
-
import "../../../shared/data-access/dist/index.js";
|
|
7
|
-
import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
|
-
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as n, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as r } from "../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
9
|
-
import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
|
-
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import { DEFAULT_FEATURE_LABELS as a } from "./index3.js";
|
|
12
|
-
import { TRANSFERS_ANALYTICS_EVENTS as o } from "./index2.js";
|
|
13
|
-
import { isPaginatedAccountsQueryInFlight as s } from "../../data-access/dist/index2.js";
|
|
14
|
-
import { useTransferBankAccountsQuery as c } from "../../data-access/dist/index4.js";
|
|
15
|
-
import { useTransferExternalAccountsQuery as l } from "../../data-access/dist/index5.js";
|
|
16
|
-
import { useMergedRecentBankAccountTransfersQuery as u } from "../../data-access/dist/index6.js";
|
|
17
|
-
import "../../data-access/dist/index.js";
|
|
18
|
-
import { mapTransferToRowView as d, useTransferMoneyModalController as f } from "./index4.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
|
-
import "../../ui/dist/index.js";
|
|
22
|
-
import { useCallback as p, useEffect as m, useMemo as h } from "react";
|
|
23
|
-
import { jsx as g } from "react/jsx-runtime";
|
|
24
1
|
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
let e = /* @__PURE__ */ new Map();
|
|
43
|
-
for (let t of W) {
|
|
44
|
-
let n = y(t.accountNumber), r = t.nickname?.trim() || w.accountFallbackName;
|
|
45
|
-
e.set(t.id, `${r} ···${n}`);
|
|
46
|
-
}
|
|
47
|
-
for (let t of G) {
|
|
48
|
-
let n = y(t.accountNumber), r = t.nickname?.trim() || t.nameOnAccount;
|
|
49
|
-
e.set(t.id, `${r} ···${n}`);
|
|
50
|
-
}
|
|
51
|
-
return e;
|
|
52
|
-
}, [
|
|
53
|
-
W,
|
|
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
|
-
}, [
|
|
64
|
-
O,
|
|
65
|
-
z,
|
|
66
|
-
U,
|
|
67
|
-
F
|
|
68
|
-
]);
|
|
69
|
-
m(() => {
|
|
70
|
-
let e = () => {
|
|
71
|
-
J();
|
|
72
|
-
};
|
|
73
|
-
for (let t of v) window.addEventListener(t, e);
|
|
74
|
-
return () => {
|
|
75
|
-
for (let t of v) window.removeEventListener(t, e);
|
|
76
|
-
};
|
|
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,
|
|
91
|
-
isError: Q,
|
|
92
|
-
onRetry: Q ? () => void J() : void 0,
|
|
93
|
-
showTransferMoneyCta: j,
|
|
94
|
-
isTransferMoneyCtaDisabled: $,
|
|
95
|
-
onTransferMoneyClick: j && !$ ? () => X() : void 0,
|
|
96
|
-
transferMoneyModal: Y,
|
|
97
|
-
labels: n
|
|
98
|
-
});
|
|
99
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
skeleton: "transfers-widget-skeleton",
|
|
4
|
+
error: "transfers-widget-error",
|
|
5
|
+
retry: "transfers-widget-retry",
|
|
6
|
+
empty: "transfers-widget-empty",
|
|
7
|
+
transferRow: "embedded-banking-transfer-row",
|
|
8
|
+
transferMoneyButton: "embedded-banking-transfer-money-button",
|
|
9
|
+
modal: "embedded-banking-transfer-money-modal",
|
|
10
|
+
modalCloseButton: "embedded-banking-transfer-money-modal-close-button",
|
|
11
|
+
modalFromAccountTrigger: "embedded-banking-transfer-money-from-account-trigger",
|
|
12
|
+
modalToAccountTrigger: "embedded-banking-transfer-money-to-account-trigger",
|
|
13
|
+
modalAccountsConfirmButton: "embedded-banking-transfer-money-accounts-confirm-button",
|
|
14
|
+
modalAmountInput: "embedded-banking-transfer-money-amount-input",
|
|
15
|
+
modalConfirmTransferButton: "embedded-banking-transfer-money-confirm-transfer-button",
|
|
16
|
+
modalGoBackButton: "embedded-banking-transfer-money-go-back-button",
|
|
17
|
+
modalBackToTransfersButton: "embedded-banking-transfer-money-back-to-transfers-button"
|
|
18
|
+
};
|
|
100
19
|
//#endregion
|
|
101
|
-
export {
|
|
20
|
+
export { e as transfersWidgetTestIds };
|
|
@@ -2,27 +2,124 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import "../../../shared/
|
|
7
|
-
import {
|
|
5
|
+
import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
6
|
+
import "../../../shared/data-access/dist/index.js";
|
|
7
|
+
import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
|
+
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as n, TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as r } from "../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
9
|
+
import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
10
|
import "../../../shared/feature/dist/index.js";
|
|
9
|
-
import "./index3.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { DEFAULT_FEATURE_LABELS as a } from "./index3.js";
|
|
12
|
+
import { TRANSFERS_ANALYTICS_EVENTS as o } from "./index2.js";
|
|
13
|
+
import { isPaginatedAccountsQueryInFlight as s } from "../../data-access/dist/index2.js";
|
|
14
|
+
import { useTransferBankAccountsQuery as c } from "../../data-access/dist/index4.js";
|
|
15
|
+
import { useTransferExternalAccountsQuery as l } from "../../data-access/dist/index5.js";
|
|
16
|
+
import { useMergedRecentBankAccountTransfersQuery as u } from "../../data-access/dist/index6.js";
|
|
17
|
+
import "../../data-access/dist/index.js";
|
|
18
|
+
import { mapTransferToRowView as d, useTransferMoneyModalController as f } from "./index4.js";
|
|
19
|
+
import { transfersWidgetTestIds as p } from "./index5.js";
|
|
20
|
+
import { TRANSFERS_WIDGET_LABELS_EN as m } from "../../ui/dist/lib/TransfersWidget/labels.js";
|
|
21
|
+
import { TransfersWidget as h } from "../../ui/dist/lib/TransfersWidget/TransfersWidget.js";
|
|
22
|
+
import "../../ui/dist/index.js";
|
|
23
|
+
import { useCallback as g, useEffect as _, useMemo as v } from "react";
|
|
24
|
+
import { jsx as ee } from "react/jsx-runtime";
|
|
13
25
|
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
var y = [e.TransferWriteOrg, e.BankAccountReadOrg], b = [r, n];
|
|
27
|
+
function x(e) {
|
|
28
|
+
return e.slice(-4);
|
|
29
|
+
}
|
|
30
|
+
function S({ labels: n, featureLabels: r, isTransferMoneyOpen: S, defaultIsTransferMoneyOpen: C, onTransferMoneyOpenChange: w }) {
|
|
31
|
+
let T = {
|
|
32
|
+
...a,
|
|
33
|
+
...r
|
|
34
|
+
}, E = {
|
|
35
|
+
...m,
|
|
36
|
+
...n,
|
|
37
|
+
...r?.routeSeparator === void 0 ? {} : { listAccountsSeparator: r.routeSeparator }
|
|
38
|
+
}, D = t(), { initResponse: O } = i();
|
|
39
|
+
_(() => {
|
|
40
|
+
D(o.Mounted);
|
|
41
|
+
}, [D]);
|
|
42
|
+
let k = O?.scopes ?? [], A = k.includes(e.ExternalBankAccountReadOrg), te = k.includes(e.PaymentRailAch), j = A && te, M = y.every((e) => k.includes(e)), { mergedTransfers: N, isLoading: P, isError: F, refetch: I } = u(), L = c(), { data: R, isError: z, refetch: B } = L, V = l({ enabled: A }), { data: H, isError: U, refetch: W } = V, G = R?.data ?? [], K = v(() => j ? (H?.data ?? []).filter((e) => e.verificationStatus === "VERIFIED" && e.accountStatus === "ACTIVE") : [], [j, H?.data]), q = v(() => {
|
|
43
|
+
let e = /* @__PURE__ */ new Map();
|
|
44
|
+
for (let t of G) {
|
|
45
|
+
let n = x(t.accountNumber), r = t.nickname?.trim() || E.accountFallbackName;
|
|
46
|
+
e.set(t.id, `${r} ···${n}`);
|
|
47
|
+
}
|
|
48
|
+
for (let t of K) {
|
|
49
|
+
let n = x(t.accountNumber), r = t.nickname?.trim() || t.nameOnAccount;
|
|
50
|
+
e.set(t.id, `${r} ···${n}`);
|
|
51
|
+
}
|
|
52
|
+
return e;
|
|
53
|
+
}, [
|
|
54
|
+
G,
|
|
55
|
+
E.accountFallbackName,
|
|
56
|
+
K
|
|
57
|
+
]), J = v(() => N.map((e) => d(e, q, E, T)), [
|
|
58
|
+
q,
|
|
59
|
+
T,
|
|
60
|
+
E,
|
|
61
|
+
N
|
|
62
|
+
]), Y = g(() => {
|
|
63
|
+
I(), B(), A && W();
|
|
64
|
+
}, [
|
|
65
|
+
A,
|
|
66
|
+
B,
|
|
67
|
+
W,
|
|
68
|
+
I
|
|
69
|
+
]);
|
|
70
|
+
_(() => {
|
|
71
|
+
let e = () => {
|
|
72
|
+
Y();
|
|
73
|
+
};
|
|
74
|
+
for (let t of b) window.addEventListener(t, e);
|
|
75
|
+
return () => {
|
|
76
|
+
for (let t of b) window.removeEventListener(t, e);
|
|
77
|
+
};
|
|
78
|
+
}, [Y]);
|
|
79
|
+
let { modalProps: X, openModal: Z } = f({
|
|
80
|
+
labels: E,
|
|
81
|
+
featureLabels: T,
|
|
82
|
+
embeddedBankAccounts: G,
|
|
83
|
+
verifiedExternalBankAccounts: K,
|
|
84
|
+
track: D,
|
|
85
|
+
isTransferMoneyOpen: S,
|
|
86
|
+
defaultIsTransferMoneyOpen: C,
|
|
87
|
+
onTransferMoneyOpenChange: w
|
|
88
|
+
}), ne = s(L), re = A && s(V), ie = P || ne || re, Q = F || z || A && U, ae = G.length + K.length, $ = !(G.length > 0) || ae <= 1;
|
|
89
|
+
return /* @__PURE__ */ ee(h, {
|
|
90
|
+
transferRows: J,
|
|
91
|
+
isLoading: ie,
|
|
92
|
+
isError: Q,
|
|
93
|
+
onRetry: Q ? () => void Y() : void 0,
|
|
94
|
+
showTransferMoneyCta: M,
|
|
95
|
+
isTransferMoneyCtaDisabled: $,
|
|
96
|
+
onTransferMoneyClick: M && !$ ? () => Z() : void 0,
|
|
97
|
+
transferMoneyModal: {
|
|
98
|
+
...X,
|
|
99
|
+
testIds: {
|
|
100
|
+
root: p.modal,
|
|
101
|
+
closeButton: p.modalCloseButton,
|
|
102
|
+
fromAccountTrigger: p.modalFromAccountTrigger,
|
|
103
|
+
toAccountTrigger: p.modalToAccountTrigger,
|
|
104
|
+
accountsConfirm: p.modalAccountsConfirmButton,
|
|
105
|
+
amountInput: p.modalAmountInput,
|
|
106
|
+
reviewStep: {
|
|
107
|
+
confirm: p.modalConfirmTransferButton,
|
|
108
|
+
goBack: p.modalGoBackButton
|
|
109
|
+
},
|
|
110
|
+
resultStep: { backToTransfers: p.modalBackToTransfersButton }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
labels: n,
|
|
114
|
+
testIds: {
|
|
115
|
+
transferMoneyButton: p.transferMoneyButton,
|
|
116
|
+
skeleton: p.skeleton,
|
|
117
|
+
error: p.error,
|
|
118
|
+
retry: p.retry,
|
|
119
|
+
empty: p.empty,
|
|
120
|
+
transferRow: p.transferRow
|
|
121
|
+
}
|
|
25
122
|
});
|
|
26
123
|
}
|
|
27
124
|
//#endregion
|
|
28
|
-
export {
|
|
125
|
+
export { S as TransfersWidgetInner };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { EmbeddedToaster as e } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
6
|
+
import "../../../shared/ui/dist/index.js";
|
|
7
|
+
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
8
|
+
import "../../../shared/feature/dist/index.js";
|
|
9
|
+
import "./index3.js";
|
|
10
|
+
import { WIDGET_NAME as n } from "./index2.js";
|
|
11
|
+
import { TransfersWidgetInner as r } from "./index6.js";
|
|
12
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
13
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js
|
|
14
|
+
function o({ labels: o, featureLabels: s, isTransferMoneyOpen: c, defaultIsTransferMoneyOpen: l, onTransferMoneyOpenChange: u, ...d }) {
|
|
15
|
+
return /* @__PURE__ */ a(t, {
|
|
16
|
+
...d,
|
|
17
|
+
widgetName: n,
|
|
18
|
+
children: [/* @__PURE__ */ i(e, {}), /* @__PURE__ */ i(r, {
|
|
19
|
+
labels: o,
|
|
20
|
+
featureLabels: s,
|
|
21
|
+
isTransferMoneyOpen: c,
|
|
22
|
+
defaultIsTransferMoneyOpen: l,
|
|
23
|
+
onTransferMoneyOpenChange: u
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { o as TransfersWidget };
|
|
@@ -4,8 +4,8 @@ import { DEFAULT_REVIEW_TRANSFER_STEP_LABELS as i } from "./reviewTransferStepLa
|
|
|
4
4
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
5
|
import { ArrowLeft as c, ArrowRight as l } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js
|
|
7
|
-
function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onConfirm: m, onGoBack: h, labels: g }) {
|
|
8
|
-
let
|
|
7
|
+
function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onConfirm: m, onGoBack: h, labels: g, testIds: _ }) {
|
|
8
|
+
let v = {
|
|
9
9
|
...i,
|
|
10
10
|
...g
|
|
11
11
|
};
|
|
@@ -20,7 +20,7 @@ function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onCo
|
|
|
20
20
|
color: "muted",
|
|
21
21
|
component: "p",
|
|
22
22
|
className: "ttw:font-medium",
|
|
23
|
-
children:
|
|
23
|
+
children: v.fromAccountSection
|
|
24
24
|
}), /* @__PURE__ */ o(r, { account: u })]
|
|
25
25
|
}),
|
|
26
26
|
/* @__PURE__ */ o("div", {
|
|
@@ -39,7 +39,7 @@ function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onCo
|
|
|
39
39
|
color: "muted",
|
|
40
40
|
component: "p",
|
|
41
41
|
className: "ttw:font-medium",
|
|
42
|
-
children:
|
|
42
|
+
children: v.toAccountSection
|
|
43
43
|
}), /* @__PURE__ */ o(r, { account: d })]
|
|
44
44
|
}),
|
|
45
45
|
/* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o(n, {
|
|
@@ -47,7 +47,7 @@ function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onCo
|
|
|
47
47
|
color: "muted",
|
|
48
48
|
component: "p",
|
|
49
49
|
className: "ttw:font-medium",
|
|
50
|
-
children:
|
|
50
|
+
children: v.amountSection
|
|
51
51
|
}), /* @__PURE__ */ o(n, {
|
|
52
52
|
component: "p",
|
|
53
53
|
className: "ttw:text-2xl ttw:font-bold ttw:text-foreground",
|
|
@@ -69,8 +69,8 @@ function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onCo
|
|
|
69
69
|
className: "ttw:h-11 ttw:w-full ttw:cursor-pointer ttw:gap-2 ttw:rounded-lg ttw:font-medium",
|
|
70
70
|
disabled: p,
|
|
71
71
|
onClick: m,
|
|
72
|
-
"data-testid":
|
|
73
|
-
children: [
|
|
72
|
+
"data-testid": _?.confirm,
|
|
73
|
+
children: [v.confirmTransfer, /* @__PURE__ */ o(l, {
|
|
74
74
|
className: "ttw:size-4",
|
|
75
75
|
"aria-hidden": !0
|
|
76
76
|
})]
|
|
@@ -80,11 +80,11 @@ function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onCo
|
|
|
80
80
|
className: "ttw:h-auto ttw:cursor-pointer ttw:px-0 ttw:py-0 ttw:text-base ttw:font-medium",
|
|
81
81
|
disabled: p,
|
|
82
82
|
onClick: h,
|
|
83
|
-
"data-testid":
|
|
83
|
+
"data-testid": _?.goBack,
|
|
84
84
|
children: [/* @__PURE__ */ o(c, {
|
|
85
85
|
className: "ttw:size-4",
|
|
86
86
|
"aria-hidden": !0
|
|
87
|
-
}),
|
|
87
|
+
}), v.goBack]
|
|
88
88
|
})]
|
|
89
89
|
})
|
|
90
90
|
] });
|
|
@@ -59,8 +59,8 @@ function T(e, t, n) {
|
|
|
59
59
|
let r = t.find((t) => t.optionValue === e);
|
|
60
60
|
return r ? x(r) : n;
|
|
61
61
|
}
|
|
62
|
-
function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOptions: O, fromValue: k, toValue: A, onFromValueChange: j, onToValueChange: M, amountValue: N, onAmountValueChange: P, amountError: F, amountInputPrefix: I, reviewFromAccount: L, reviewToAccount: R, reviewAmountLabel: z, isSubmitting: B, isSuccess: V, canContinueFromAccounts: H, canContinueFromAmount: U, onContinueFromAccounts: W, onContinueFromAmount: G, onBack: K, onSubmit: q, onClearSelections: J }) {
|
|
63
|
-
let
|
|
62
|
+
function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOptions: O, fromValue: k, toValue: A, onFromValueChange: j, onToValueChange: M, amountValue: N, onAmountValueChange: P, amountError: F, amountInputPrefix: I, reviewFromAccount: L, reviewToAccount: R, reviewAmountLabel: z, isSubmitting: B, isSuccess: V, canContinueFromAccounts: H, canContinueFromAmount: U, onContinueFromAccounts: W, onContinueFromAmount: G, onBack: K, onSubmit: q, onClearSelections: J, testIds: Y }) {
|
|
63
|
+
let X = /* @__PURE__ */ g(u, {
|
|
64
64
|
decorative: !0,
|
|
65
65
|
orientation: "horizontal",
|
|
66
66
|
className: "ttw:-mx-6",
|
|
@@ -71,13 +71,13 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
71
71
|
onOpenChange: x,
|
|
72
72
|
children: /* @__PURE__ */ _(n, {
|
|
73
73
|
showCloseButton: !0,
|
|
74
|
-
closeButtonTestId:
|
|
74
|
+
closeButtonTestId: Y?.closeButton,
|
|
75
75
|
className: "ttw:max-w-md ttw:gap-0 ttw:p-6",
|
|
76
|
-
"data-testid":
|
|
76
|
+
"data-testid": Y?.root,
|
|
77
77
|
children: [S === "result" ? null : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(p, {
|
|
78
78
|
title: S === "review" ? E.modalReviewHeading : E.modalTitle,
|
|
79
79
|
subtitle: E.modalAccountsSubtitle
|
|
80
|
-
}),
|
|
80
|
+
}), X] }), S === "accounts" ? /* @__PURE__ */ _(h, { children: [
|
|
81
81
|
/* @__PURE__ */ _("div", {
|
|
82
82
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-5",
|
|
83
83
|
children: [
|
|
@@ -86,7 +86,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
86
86
|
onValueChange: j,
|
|
87
87
|
children: [/* @__PURE__ */ g(l, {
|
|
88
88
|
className: y,
|
|
89
|
-
"data-testid":
|
|
89
|
+
"data-testid": Y?.fromAccountTrigger,
|
|
90
90
|
"aria-label": T(k, D, E.modalFromAccountPlaceholder),
|
|
91
91
|
children: /* @__PURE__ */ g("span", {
|
|
92
92
|
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:justify-start ttw:text-left",
|
|
@@ -106,7 +106,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
106
106
|
onValueChange: M,
|
|
107
107
|
children: [/* @__PURE__ */ g(l, {
|
|
108
108
|
className: y,
|
|
109
|
-
"data-testid":
|
|
109
|
+
"data-testid": Y?.toAccountTrigger,
|
|
110
110
|
"aria-label": T(A, O, E.modalToAccountPlaceholder),
|
|
111
111
|
children: /* @__PURE__ */ g("span", {
|
|
112
112
|
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:justify-start ttw:text-left",
|
|
@@ -144,7 +144,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
144
144
|
onChange: (e) => P(e.target.value),
|
|
145
145
|
placeholder: E.modalAmountPlaceholder,
|
|
146
146
|
"aria-invalid": F ? !0 : void 0,
|
|
147
|
-
"data-testid":
|
|
147
|
+
"data-testid": Y?.amountInput
|
|
148
148
|
})]
|
|
149
149
|
}),
|
|
150
150
|
F ? /* @__PURE__ */ g(d, {
|
|
@@ -168,7 +168,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
168
168
|
}) : null
|
|
169
169
|
]
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
X,
|
|
172
172
|
/* @__PURE__ */ g("div", {
|
|
173
173
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:pt-4",
|
|
174
174
|
children: /* @__PURE__ */ _(e, {
|
|
@@ -177,7 +177,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
177
177
|
className: "ttw:h-11 ttw:w-full ttw:cursor-pointer ttw:gap-2 ttw:rounded-lg ttw:font-medium ttw:disabled:pointer-events-none ttw:disabled:cursor-not-allowed ttw:disabled:bg-muted ttw:disabled:text-muted-foreground ttw:disabled:opacity-100",
|
|
178
178
|
disabled: !H || !U || !!F,
|
|
179
179
|
onClick: W,
|
|
180
|
-
"data-testid":
|
|
180
|
+
"data-testid": Y?.accountsConfirm,
|
|
181
181
|
children: [E.modalAccountsConfirm, /* @__PURE__ */ g(v, {
|
|
182
182
|
className: "ttw:size-4",
|
|
183
183
|
"aria-hidden": !0
|
|
@@ -191,6 +191,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
191
191
|
isSubmitting: B,
|
|
192
192
|
onConfirm: q,
|
|
193
193
|
onGoBack: K,
|
|
194
|
+
testIds: Y?.reviewStep,
|
|
194
195
|
labels: {
|
|
195
196
|
fromAccountSection: E.modalReviewFromAccountLabel,
|
|
196
197
|
toAccountSection: E.modalReviewToAccountLabel,
|
|
@@ -202,6 +203,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
202
203
|
amountLabel: z,
|
|
203
204
|
isSuccess: V,
|
|
204
205
|
onBackToTransfers: () => x(!1),
|
|
206
|
+
testIds: Y?.resultStep,
|
|
205
207
|
labels: {
|
|
206
208
|
successTitle: E.modalResultSuccessTitle,
|
|
207
209
|
errorTitle: E.modalResultErrorTitle,
|
|
@@ -239,7 +241,7 @@ function E({ open: c, onOpenChange: x, step: S, labels: E, fromOptions: D, toOpt
|
|
|
239
241
|
]
|
|
240
242
|
})
|
|
241
243
|
}),
|
|
242
|
-
|
|
244
|
+
X,
|
|
243
245
|
/* @__PURE__ */ _(r, {
|
|
244
246
|
className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-2 ttw:pt-4 ttw:sm:justify-between",
|
|
245
247
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -3,8 +3,8 @@ import { DEFAULT_TRANSFER_RESULT_STEP_LABELS as n } from "./transferResultStepLa
|
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { ArrowLeft as a, CheckCircle2 as o, X as s } from "lucide-react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js
|
|
6
|
-
function c({ amountLabel: c, isSuccess: l, onBackToTransfers: u, labels: d }) {
|
|
7
|
-
let
|
|
6
|
+
function c({ amountLabel: c, isSuccess: l, onBackToTransfers: u, labels: d, testIds: f }) {
|
|
7
|
+
let p = {
|
|
8
8
|
...n,
|
|
9
9
|
...d
|
|
10
10
|
};
|
|
@@ -31,7 +31,7 @@ function c({ amountLabel: c, isSuccess: l, onBackToTransfers: u, labels: d }) {
|
|
|
31
31
|
component: "h2",
|
|
32
32
|
className: "ttw:mb-2 ttw:text-center ttw:text-lg ttw:font-bold ttw:text-foreground",
|
|
33
33
|
"data-testid": l ? "embedded-banking-transfer-money-result-success-title" : "embedded-banking-transfer-money-result-error-title",
|
|
34
|
-
children: l ?
|
|
34
|
+
children: l ? p.successTitle : p.errorTitle
|
|
35
35
|
}),
|
|
36
36
|
/* @__PURE__ */ i(t, {
|
|
37
37
|
variant: "body2",
|
|
@@ -39,13 +39,13 @@ function c({ amountLabel: c, isSuccess: l, onBackToTransfers: u, labels: d }) {
|
|
|
39
39
|
component: "p",
|
|
40
40
|
className: "ttw:mb-8 ttw:max-w-sm ttw:text-center",
|
|
41
41
|
children: [
|
|
42
|
-
|
|
42
|
+
p.transferMessagePrefix,
|
|
43
43
|
/* @__PURE__ */ r("span", {
|
|
44
44
|
className: "ttw:font-semibold ttw:text-foreground",
|
|
45
45
|
children: c
|
|
46
46
|
}),
|
|
47
47
|
" ",
|
|
48
|
-
l ?
|
|
48
|
+
l ? p.successMessageSuffix : p.errorMessageSuffix
|
|
49
49
|
]
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ i(e, {
|
|
@@ -53,11 +53,11 @@ function c({ amountLabel: c, isSuccess: l, onBackToTransfers: u, labels: d }) {
|
|
|
53
53
|
variant: "outline",
|
|
54
54
|
className: "ttw:h-11 ttw:w-full ttw:cursor-pointer ttw:gap-2 ttw:rounded-lg ttw:font-semibold",
|
|
55
55
|
onClick: u,
|
|
56
|
-
"data-testid":
|
|
56
|
+
"data-testid": f?.backToTransfers,
|
|
57
57
|
children: [/* @__PURE__ */ r(a, {
|
|
58
58
|
className: "ttw:size-4",
|
|
59
59
|
"aria-hidden": !0
|
|
60
|
-
}),
|
|
60
|
+
}), p.backToTransfers]
|
|
61
61
|
})
|
|
62
62
|
]
|
|
63
63
|
});
|