@tesouro/embedded-components-react 0.11.0 → 0.11.2
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/experimental/QuickViewWidget.d.ts +11 -0
- package/dist/experimental/RemoteCheckCapture.d.ts +11 -0
- package/dist/experimental/index.d.ts +11 -0
- package/dist/index.css +509 -61
- package/dist/index.d.ts +54 -13
- package/dist/lib/AcceptDisclosuresWidget.d.ts +11 -0
- package/dist/lib/BalancesWidget.d.ts +11 -0
- package/dist/lib/BankAccountOnboardingWidget.d.ts +11 -0
- package/dist/lib/BankAccountsWidget.d.ts +11 -0
- package/dist/lib/BankingComplianceBannerWidget.d.ts +11 -0
- package/dist/lib/BillPayWidget.d.ts +11 -0
- package/dist/lib/CardDetailsWidget.d.ts +11 -0
- package/dist/lib/CounterpartsWidget.d.ts +11 -0
- package/dist/lib/CounterpartsWidgetPublic.d.ts +11 -0
- package/dist/lib/CreditCardsWidget.d.ts +11 -0
- package/dist/lib/CustomersWidget.d.ts +11 -0
- package/dist/lib/DebitCardsWidget.d.ts +11 -0
- package/dist/lib/ExpenseManagementWidget.d.ts +11 -0
- package/dist/lib/InsightsWidget.d.ts +11 -0
- package/dist/lib/LinkedAccountsWidget.d.ts +11 -0
- package/dist/lib/OfferWidget.d.ts +11 -0
- package/dist/lib/ProductsWidget.d.ts +11 -0
- package/dist/lib/ReceivablesWidget.d.ts +11 -0
- package/dist/lib/SettingsWidget.d.ts +11 -0
- package/dist/lib/TransfersWidget.d.ts +54 -13
- package/dist/lib/WidgetProvider.d.ts +11 -0
- package/dist/lib/WidgetProviderPublic.d.ts +11 -0
- package/dist/lib/WidgetSuite.d.ts +54 -13
- 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/index.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AmountInput/AmountInput.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js +57 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/labels.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/testIds.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +10 -17
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +159 -218
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js +37 -88
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js +184 -245
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js +43 -58
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/reviewTransferStepLabels.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/transferResultStepLabels.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/useFocusFirstInvalidField.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferAccountValue.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferDetailSheet.js +68 -101
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +155 -153
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js +20 -11
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/maskLabels.js +7 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +1850 -1607
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModalHeader.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferReviewAccountCard.js +0 -64
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferAccountTile.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferStatusBadge.js +0 -17
|
@@ -1,271 +1,210 @@
|
|
|
1
|
-
import { Button as e,
|
|
1
|
+
import { Button as e, FieldError as t, FieldRequirement as n, FlowDialog as r, Label as i, Select as a, SelectContent as o, SelectItem as s, SelectTrigger as c } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { AmountInput as l } from "../../../../../shared/ui/dist/lib/AmountInput/AmountInput.js";
|
|
3
|
+
import { MaskedAccountNumber as u } from "../../../../../shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js";
|
|
4
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
5
|
+
import { maskLabels as d } from "../TransfersWidget/maskLabels.js";
|
|
2
6
|
import { ReviewTransferStep as f } from "./ReviewTransferStep.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
+
import { TransferResultStep as p } from "./TransferResultStep.js";
|
|
8
|
+
import { useFocusFirstInvalidField as m } from "./useFocusFirstInvalidField.js";
|
|
9
|
+
import { useId as h } from "react";
|
|
10
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
7
11
|
// ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js
|
|
8
|
-
var
|
|
12
|
+
var v = {
|
|
9
13
|
position: "popper",
|
|
10
14
|
align: "start",
|
|
11
15
|
sideOffset: 4
|
|
12
16
|
};
|
|
13
|
-
function
|
|
17
|
+
function y(e) {
|
|
14
18
|
return [
|
|
15
19
|
e.primaryLabel,
|
|
16
|
-
e.
|
|
20
|
+
e.number?.last4,
|
|
17
21
|
e.balanceLabel
|
|
18
22
|
].filter(Boolean).join(" ");
|
|
19
23
|
}
|
|
20
|
-
function
|
|
21
|
-
return /* @__PURE__ */ _("
|
|
22
|
-
className: "ttw:
|
|
23
|
-
children: [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
className: "ttw:min-w-0 ttw:truncate ttw:rounded-full ttw:bg-primary/10 ttw:px-2.5 ttw:py-0.5 ttw:text-sm ttw:font-medium ttw:text-primary",
|
|
24
|
+
function b({ opt: e, numberLabels: t }) {
|
|
25
|
+
return /* @__PURE__ */ _("span", {
|
|
26
|
+
className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:gap-2",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ g("span", {
|
|
29
|
+
className: "ttw:min-w-0 ttw:truncate",
|
|
27
30
|
children: e.primaryLabel
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
}),
|
|
32
|
+
e.number ? /* @__PURE__ */ g("span", {
|
|
33
|
+
className: "ttw:shrink-0 ttw:text-muted-foreground",
|
|
34
|
+
children: /* @__PURE__ */ g(u, {
|
|
35
|
+
last4: e.number.last4,
|
|
36
|
+
labels: t
|
|
37
|
+
})
|
|
38
|
+
}) : null,
|
|
39
|
+
e.balanceLabel ? /* @__PURE__ */ g("span", {
|
|
40
|
+
className: "ttw:ml-auto ttw:shrink-0 ttw:pl-2 ttw:text-muted-foreground ttw:tabular-nums",
|
|
41
|
+
children: e.balanceLabel
|
|
42
|
+
}) : null
|
|
43
|
+
]
|
|
36
44
|
});
|
|
37
45
|
}
|
|
38
|
-
function
|
|
39
|
-
let
|
|
40
|
-
return
|
|
41
|
-
className: "ttw:
|
|
42
|
-
children:
|
|
46
|
+
function x({ label: e, placeholder: r, value: l, options: u, onValueChange: d, error: f, testId: p, numberLabels: m }) {
|
|
47
|
+
let x = h(), S = `${x}-label`, C = `${x}-value`, w = `${x}-error`, T = u.find((e) => e.optionValue === l);
|
|
48
|
+
return /* @__PURE__ */ _("div", {
|
|
49
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ g(i, {
|
|
52
|
+
id: S,
|
|
53
|
+
htmlFor: x,
|
|
54
|
+
requirement: n.Required,
|
|
55
|
+
children: e
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ _(a, {
|
|
58
|
+
value: l,
|
|
59
|
+
onValueChange: d,
|
|
60
|
+
children: [/* @__PURE__ */ g(c, {
|
|
61
|
+
id: x,
|
|
62
|
+
className: "ttw:w-full",
|
|
63
|
+
"data-testid": p,
|
|
64
|
+
"aria-labelledby": `${S} ${C}`,
|
|
65
|
+
"aria-required": !0,
|
|
66
|
+
"aria-invalid": f ? !0 : void 0,
|
|
67
|
+
"aria-describedby": f ? w : void 0,
|
|
68
|
+
children: /* @__PURE__ */ g("span", {
|
|
69
|
+
id: C,
|
|
70
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-1",
|
|
71
|
+
children: T ? /* @__PURE__ */ g(b, {
|
|
72
|
+
opt: T,
|
|
73
|
+
numberLabels: m
|
|
74
|
+
}) : /* @__PURE__ */ g("span", {
|
|
75
|
+
className: "ttw:text-muted-foreground",
|
|
76
|
+
children: r
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
}), /* @__PURE__ */ g(o, {
|
|
80
|
+
...v,
|
|
81
|
+
children: u.map((e) => /* @__PURE__ */ g(s, {
|
|
82
|
+
value: e.optionValue,
|
|
83
|
+
textValue: y(e),
|
|
84
|
+
className: "ttw:[&>span:last-of-type]:w-full ttw:[&>span:last-of-type]:min-w-0",
|
|
85
|
+
"data-testid": `embedded-banking-transfer-money-account-option-${e.optionValue}`,
|
|
86
|
+
children: /* @__PURE__ */ g(b, {
|
|
87
|
+
opt: e,
|
|
88
|
+
numberLabels: m
|
|
89
|
+
})
|
|
90
|
+
}, e.optionValue))
|
|
91
|
+
})]
|
|
92
|
+
}),
|
|
93
|
+
f ? /* @__PURE__ */ g(t, {
|
|
94
|
+
id: w,
|
|
95
|
+
children: f
|
|
96
|
+
}) : null
|
|
97
|
+
]
|
|
43
98
|
});
|
|
44
99
|
}
|
|
45
|
-
function w
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
100
|
+
function S({ open: a, onOpenChange: o, step: s, stepLabel: c, labels: u, fromOptions: v, toOptions: y, fromValue: b, toValue: S, onFromValueChange: C, onToValueChange: w, fromError: T, toError: E, amountValue: D, onAmountValueChange: O, amountError: k, amountInputPrefix: A, reviewFromAccount: j, reviewToAccount: M, reviewAmountLabel: N, isSubmitting: P, onContinueFromAccounts: F, onBack: I, onSubmit: L, onClearSelections: R, scrollToErrorToken: z, testIds: B }) {
|
|
101
|
+
let V = h(), H = `${V}-error`, U = s === "review", W = d(u), G = m(z);
|
|
102
|
+
return /* @__PURE__ */ g(r, {
|
|
103
|
+
open: a,
|
|
104
|
+
onOpenChange: o,
|
|
105
|
+
title: U ? u.modalReviewHeading : u.modalTitle,
|
|
106
|
+
stepLabel: c,
|
|
107
|
+
description: U ? void 0 : u.modalAccountsSubtitle,
|
|
108
|
+
onNext: U ? L : F,
|
|
109
|
+
onBack: U ? I : void 0,
|
|
110
|
+
nextLoading: P,
|
|
111
|
+
labels: {
|
|
112
|
+
back: u.modalBack,
|
|
113
|
+
next: U ? u.modalConfirmTransfer : u.modalContinue,
|
|
114
|
+
close: u.modalClose
|
|
115
|
+
},
|
|
116
|
+
testIds: {
|
|
117
|
+
content: B?.root,
|
|
118
|
+
close: B?.closeButton,
|
|
119
|
+
next: U ? B?.reviewStep?.confirm : B?.accountsConfirm,
|
|
120
|
+
back: B?.reviewStep?.goBack
|
|
121
|
+
},
|
|
122
|
+
result: s === "result" ? /* @__PURE__ */ g(p, {
|
|
123
|
+
fromAccount: j,
|
|
124
|
+
toAccount: M,
|
|
125
|
+
amountLabel: N,
|
|
126
|
+
onDone: () => o(!1),
|
|
127
|
+
testIds: B?.resultStep,
|
|
128
|
+
labels: {
|
|
129
|
+
title: u.modalResultSuccessTitle,
|
|
130
|
+
description: u.modalResultDescription,
|
|
131
|
+
from: u.modalFromLabel,
|
|
132
|
+
to: u.modalToLabel,
|
|
133
|
+
amount: u.modalAmountLabel,
|
|
134
|
+
endingIn: u.accountNumberEndingIn,
|
|
135
|
+
done: u.modalDone
|
|
136
|
+
}
|
|
137
|
+
}) : void 0,
|
|
138
|
+
children: U ? /* @__PURE__ */ g(f, {
|
|
139
|
+
fromAccount: j,
|
|
140
|
+
toAccount: M,
|
|
141
|
+
amountLabel: N,
|
|
142
|
+
labels: {
|
|
143
|
+
from: u.modalFromLabel,
|
|
144
|
+
to: u.modalToLabel,
|
|
145
|
+
amount: u.modalAmountLabel,
|
|
146
|
+
endingIn: u.accountNumberEndingIn,
|
|
147
|
+
showNumber: u.showAccountNumber,
|
|
148
|
+
hideNumber: u.hideAccountNumber
|
|
149
|
+
}
|
|
150
|
+
}) : /* @__PURE__ */ _("div", {
|
|
151
|
+
ref: G,
|
|
152
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:pb-1",
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ g(x, {
|
|
155
|
+
label: u.modalFromLabel,
|
|
156
|
+
placeholder: u.modalSelectPlaceholder,
|
|
157
|
+
value: b,
|
|
158
|
+
options: v,
|
|
159
|
+
onValueChange: C,
|
|
160
|
+
error: T,
|
|
161
|
+
numberLabels: W,
|
|
162
|
+
testId: B?.fromAccountTrigger
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ g(x, {
|
|
165
|
+
label: u.modalToLabel,
|
|
166
|
+
placeholder: u.modalSelectPlaceholder,
|
|
167
|
+
value: S,
|
|
168
|
+
options: y,
|
|
169
|
+
onValueChange: w,
|
|
170
|
+
error: E,
|
|
171
|
+
numberLabels: W,
|
|
172
|
+
testId: B?.toAccountTrigger
|
|
173
|
+
}),
|
|
82
174
|
/* @__PURE__ */ _("div", {
|
|
83
|
-
className: "ttw:flex ttw:flex-col ttw:gap-
|
|
175
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
84
176
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
children:
|
|
89
|
-
className: y,
|
|
90
|
-
"data-testid": Y?.fromAccountTrigger,
|
|
91
|
-
"aria-label": T(k, D, E.modalFromAccountPlaceholder),
|
|
92
|
-
children: /* @__PURE__ */ g("span", {
|
|
93
|
-
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:justify-start ttw:text-left",
|
|
94
|
-
children: /* @__PURE__ */ g(C, {
|
|
95
|
-
value: k,
|
|
96
|
-
options: D,
|
|
97
|
-
placeholder: E.modalFromAccountPlaceholder
|
|
98
|
-
})
|
|
99
|
-
})
|
|
100
|
-
}), /* @__PURE__ */ g(s, {
|
|
101
|
-
...b,
|
|
102
|
-
children: w(D)
|
|
103
|
-
})]
|
|
104
|
-
}),
|
|
105
|
-
/* @__PURE__ */ _(o, {
|
|
106
|
-
value: A,
|
|
107
|
-
onValueChange: M,
|
|
108
|
-
children: [/* @__PURE__ */ g(l, {
|
|
109
|
-
className: y,
|
|
110
|
-
"data-testid": Y?.toAccountTrigger,
|
|
111
|
-
"aria-label": T(A, O, E.modalToAccountPlaceholder),
|
|
112
|
-
children: /* @__PURE__ */ g("span", {
|
|
113
|
-
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:justify-start ttw:text-left",
|
|
114
|
-
children: /* @__PURE__ */ g(C, {
|
|
115
|
-
value: A,
|
|
116
|
-
options: O,
|
|
117
|
-
placeholder: E.modalToAccountPlaceholder
|
|
118
|
-
})
|
|
119
|
-
})
|
|
120
|
-
}), /* @__PURE__ */ g(s, {
|
|
121
|
-
...b,
|
|
122
|
-
children: w(O)
|
|
123
|
-
})]
|
|
177
|
+
/* @__PURE__ */ g(i, {
|
|
178
|
+
htmlFor: V,
|
|
179
|
+
requirement: n.Required,
|
|
180
|
+
children: u.modalAmountLabel
|
|
124
181
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
children: [/* @__PURE__ */ g("span", {
|
|
136
|
-
className: "ttw:shrink-0 ttw:text-base ttw:text-muted-foreground",
|
|
137
|
-
"aria-hidden": !0,
|
|
138
|
-
children: I
|
|
139
|
-
}), /* @__PURE__ */ g(i, {
|
|
140
|
-
id: "transfer-money-modal-amount",
|
|
141
|
-
className: "ttw:h-auto ttw:min-h-0 ttw:flex-1 ttw:border-0 ttw:bg-transparent ttw:px-0 ttw:py-0 ttw:text-base ttw:shadow-none ttw:focus-visible:ring-0",
|
|
142
|
-
inputMode: "decimal",
|
|
143
|
-
autoComplete: "off",
|
|
144
|
-
value: N,
|
|
145
|
-
onChange: (e) => P(e.target.value),
|
|
146
|
-
placeholder: E.modalAmountPlaceholder,
|
|
147
|
-
"aria-invalid": F ? !0 : void 0,
|
|
148
|
-
"data-testid": Y?.amountInput
|
|
149
|
-
})]
|
|
150
|
-
}),
|
|
151
|
-
F ? /* @__PURE__ */ g(d, {
|
|
152
|
-
variant: "body2",
|
|
153
|
-
color: "destructive",
|
|
154
|
-
component: "p",
|
|
155
|
-
className: "ttw:mt-0.5",
|
|
156
|
-
children: F
|
|
157
|
-
}) : null
|
|
158
|
-
]
|
|
182
|
+
/* @__PURE__ */ g(l, {
|
|
183
|
+
id: V,
|
|
184
|
+
required: !0,
|
|
185
|
+
currencySymbol: A,
|
|
186
|
+
value: D,
|
|
187
|
+
onValueChange: O,
|
|
188
|
+
placeholder: u.modalAmountPlaceholder,
|
|
189
|
+
"aria-invalid": k ? !0 : void 0,
|
|
190
|
+
"aria-describedby": k ? H : void 0,
|
|
191
|
+
"data-testid": B?.amountInput
|
|
159
192
|
}),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
children:
|
|
163
|
-
type: "button",
|
|
164
|
-
variant: "link",
|
|
165
|
-
className: "ttw:h-auto ttw:cursor-pointer ttw:px-0 ttw:py-0 ttw:text-base ttw:font-normal",
|
|
166
|
-
onClick: J,
|
|
167
|
-
children: E.modalClearSelections
|
|
168
|
-
})
|
|
193
|
+
k ? /* @__PURE__ */ g(t, {
|
|
194
|
+
id: H,
|
|
195
|
+
children: k
|
|
169
196
|
}) : null
|
|
170
197
|
]
|
|
171
198
|
}),
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
onClick: W,
|
|
181
|
-
"data-testid": Y?.accountsConfirm,
|
|
182
|
-
children: [E.modalAccountsConfirm, /* @__PURE__ */ g(v, {
|
|
183
|
-
className: "ttw:size-4",
|
|
184
|
-
"aria-hidden": !0
|
|
185
|
-
})]
|
|
186
|
-
})
|
|
187
|
-
})
|
|
188
|
-
] }) : S === "review" ? /* @__PURE__ */ g(f, {
|
|
189
|
-
fromAccount: L,
|
|
190
|
-
toAccount: R,
|
|
191
|
-
amountLabel: z,
|
|
192
|
-
isSubmitting: B,
|
|
193
|
-
onConfirm: q,
|
|
194
|
-
onGoBack: K,
|
|
195
|
-
testIds: Y?.reviewStep,
|
|
196
|
-
labels: {
|
|
197
|
-
fromAccountSection: E.modalReviewFromAccountLabel,
|
|
198
|
-
toAccountSection: E.modalReviewToAccountLabel,
|
|
199
|
-
amountSection: E.modalAmountLabel,
|
|
200
|
-
confirmTransfer: E.modalConfirmTransfer,
|
|
201
|
-
goBack: E.modalGoBack
|
|
202
|
-
}
|
|
203
|
-
}) : S === "result" ? /* @__PURE__ */ g(m, {
|
|
204
|
-
amountLabel: z,
|
|
205
|
-
isSuccess: V,
|
|
206
|
-
onBackToTransfers: () => x(!1),
|
|
207
|
-
testIds: Y?.resultStep,
|
|
208
|
-
labels: {
|
|
209
|
-
successTitle: E.modalResultSuccessTitle,
|
|
210
|
-
errorTitle: E.modalResultErrorTitle,
|
|
211
|
-
transferMessagePrefix: E.modalResultTransferMessagePrefix,
|
|
212
|
-
successMessageSuffix: E.modalResultSuccessMessageSuffix,
|
|
213
|
-
errorMessageSuffix: E.modalResultErrorMessageSuffix,
|
|
214
|
-
backToTransfers: E.modalBackToTransfers
|
|
215
|
-
}
|
|
216
|
-
}) : /* @__PURE__ */ _(h, { children: [
|
|
217
|
-
/* @__PURE__ */ g("div", {
|
|
218
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-5",
|
|
219
|
-
children: /* @__PURE__ */ _("div", {
|
|
220
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
221
|
-
children: [
|
|
222
|
-
/* @__PURE__ */ g(d, {
|
|
223
|
-
variant: "body2",
|
|
224
|
-
className: "ttw:font-medium",
|
|
225
|
-
children: E.modalAmountLabel
|
|
226
|
-
}),
|
|
227
|
-
/* @__PURE__ */ g(i, {
|
|
228
|
-
className: "ttw:h-11 ttw:px-4 ttw:py-3",
|
|
229
|
-
inputMode: "decimal",
|
|
230
|
-
autoComplete: "off",
|
|
231
|
-
value: N,
|
|
232
|
-
onChange: (e) => P(e.target.value),
|
|
233
|
-
placeholder: E.modalAmountPlaceholder,
|
|
234
|
-
"aria-invalid": F ? !0 : void 0
|
|
235
|
-
}),
|
|
236
|
-
F ? /* @__PURE__ */ g(d, {
|
|
237
|
-
variant: "body2",
|
|
238
|
-
color: "destructive",
|
|
239
|
-
component: "p",
|
|
240
|
-
children: F
|
|
241
|
-
}) : null
|
|
242
|
-
]
|
|
243
|
-
})
|
|
244
|
-
}),
|
|
245
|
-
X,
|
|
246
|
-
/* @__PURE__ */ _(r, {
|
|
247
|
-
className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-2 ttw:pt-4 ttw:sm:justify-between",
|
|
248
|
-
children: [/* @__PURE__ */ g("div", {
|
|
249
|
-
className: "ttw:flex ttw:flex-1 ttw:flex-wrap ttw:gap-2",
|
|
250
|
-
children: /* @__PURE__ */ g(e, {
|
|
251
|
-
type: "button",
|
|
252
|
-
variant: "outline",
|
|
253
|
-
onClick: K,
|
|
254
|
-
disabled: B,
|
|
255
|
-
children: E.modalBack
|
|
256
|
-
})
|
|
257
|
-
}), /* @__PURE__ */ g("div", {
|
|
258
|
-
className: "ttw:flex ttw:flex-wrap ttw:gap-2",
|
|
259
|
-
children: /* @__PURE__ */ g(e, {
|
|
260
|
-
type: "button",
|
|
261
|
-
onClick: G,
|
|
262
|
-
disabled: !U,
|
|
263
|
-
children: E.modalContinue
|
|
264
|
-
})
|
|
265
|
-
})]
|
|
266
|
-
})
|
|
267
|
-
] })]
|
|
199
|
+
R ? /* @__PURE__ */ g(e, {
|
|
200
|
+
type: "button",
|
|
201
|
+
variant: "link",
|
|
202
|
+
className: "ttw:h-auto ttw:self-start ttw:p-0",
|
|
203
|
+
onClick: R,
|
|
204
|
+
children: u.modalClearSelections
|
|
205
|
+
}) : null
|
|
206
|
+
]
|
|
268
207
|
})
|
|
269
208
|
});
|
|
270
209
|
}
|
|
271
|
-
export {
|
|
210
|
+
export { S as TransferMoneyModal };
|
|
@@ -1,65 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResultScreen as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { TransferAccountValue as t } from "../TransfersWidget/TransferAccountValue.js";
|
|
2
3
|
import { DEFAULT_TRANSFER_RESULT_STEP_LABELS as n } from "./transferResultStepLabels.js";
|
|
3
|
-
import { jsx as r
|
|
4
|
-
import {
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { CircleCheck as i } from "lucide-react";
|
|
5
6
|
// ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js
|
|
6
|
-
function
|
|
7
|
-
let
|
|
7
|
+
function a({ fromAccount: a, toAccount: o, amountLabel: s, onDone: c, labels: l, testIds: u }) {
|
|
8
|
+
let d = {
|
|
8
9
|
...n,
|
|
9
|
-
...
|
|
10
|
+
...l
|
|
10
11
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"aria-hidden": !0
|
|
27
|
-
})
|
|
12
|
+
return /* @__PURE__ */ r(e, {
|
|
13
|
+
icon: /* @__PURE__ */ r(i, {}),
|
|
14
|
+
tone: "success",
|
|
15
|
+
title: /* @__PURE__ */ r("span", {
|
|
16
|
+
"data-testid": u?.title,
|
|
17
|
+
children: d.title
|
|
18
|
+
}),
|
|
19
|
+
description: d.description,
|
|
20
|
+
details: [
|
|
21
|
+
{
|
|
22
|
+
label: d.from,
|
|
23
|
+
value: /* @__PURE__ */ r(t, {
|
|
24
|
+
name: a.name,
|
|
25
|
+
number: a.number && { last4: a.number.last4 },
|
|
26
|
+
numberLabels: { endingIn: d.endingIn }
|
|
28
27
|
})
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]
|
|
50
|
-
}),
|
|
51
|
-
/* @__PURE__ */ i(e, {
|
|
52
|
-
type: "button",
|
|
53
|
-
variant: "outline",
|
|
54
|
-
className: "ttw:h-11 ttw:w-full ttw:cursor-pointer ttw:gap-2 ttw:rounded-lg ttw:font-semibold",
|
|
55
|
-
onClick: u,
|
|
56
|
-
"data-testid": f?.backToTransfers,
|
|
57
|
-
children: [/* @__PURE__ */ r(a, {
|
|
58
|
-
className: "ttw:size-4",
|
|
59
|
-
"aria-hidden": !0
|
|
60
|
-
}), p.backToTransfers]
|
|
61
|
-
})
|
|
62
|
-
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: d.to,
|
|
31
|
+
value: /* @__PURE__ */ r(t, {
|
|
32
|
+
name: o.name,
|
|
33
|
+
number: o.number && { last4: o.number.last4 },
|
|
34
|
+
numberLabels: { endingIn: d.endingIn }
|
|
35
|
+
})
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: d.amount,
|
|
39
|
+
value: /* @__PURE__ */ r("span", {
|
|
40
|
+
className: "ttw:tabular-nums",
|
|
41
|
+
children: s
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
onDone: c,
|
|
46
|
+
labels: { done: d.done },
|
|
47
|
+
testIds: { done: u?.done }
|
|
63
48
|
});
|
|
64
49
|
}
|
|
65
|
-
export {
|
|
50
|
+
export { a as TransferResultStep };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/reviewTransferStepLabels.js
|
|
2
2
|
var e = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
from: "From",
|
|
4
|
+
to: "To",
|
|
5
|
+
amount: "Amount",
|
|
6
|
+
endingIn: "ending in {last4}",
|
|
7
|
+
showNumber: "Show number",
|
|
8
|
+
hideNumber: "Hide number"
|
|
8
9
|
};
|
|
9
10
|
export { e as DEFAULT_REVIEW_TRANSFER_STEP_LABELS };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/transferResultStepLabels.js
|
|
2
2
|
var e = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
title: "Transfer submitted",
|
|
4
|
+
description: "It can take 1–2 business days to arrive.",
|
|
5
|
+
from: "From",
|
|
6
|
+
to: "To",
|
|
7
|
+
amount: "Amount",
|
|
8
|
+
endingIn: "ending in {last4}",
|
|
9
|
+
done: "Done"
|
|
9
10
|
};
|
|
10
11
|
export { e as DEFAULT_TRANSFER_RESULT_STEP_LABELS };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t } from "react";
|
|
2
|
+
// ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/useFocusFirstInvalidField.js
|
|
3
|
+
function n(n) {
|
|
4
|
+
let r = t(null), i = t(n);
|
|
5
|
+
return e(() => {
|
|
6
|
+
n !== i.current && (i.current = n, r.current?.querySelector("[aria-invalid=\"true\"]")?.focus());
|
|
7
|
+
}, [n]), r;
|
|
8
|
+
}
|
|
9
|
+
export { n as useFocusFirstInvalidField };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MaskedAccountNumber as e } from "../../../../../shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js";
|
|
2
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
// ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransferAccountValue.js
|
|
5
|
+
function r({ name: r, number: i, secondaryLabel: a, numberLabels: o, singleLine: s = !1 }) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
8
|
+
children: [
|
|
9
|
+
s ? /* @__PURE__ */ t("span", {
|
|
10
|
+
className: "ttw:block ttw:max-w-50 ttw:truncate",
|
|
11
|
+
title: r,
|
|
12
|
+
children: r
|
|
13
|
+
}) : /* @__PURE__ */ t("span", {
|
|
14
|
+
className: "ttw:min-w-0 ttw:break-words",
|
|
15
|
+
children: r
|
|
16
|
+
}),
|
|
17
|
+
i ? /* @__PURE__ */ t("span", {
|
|
18
|
+
className: "ttw:font-normal ttw:text-muted-foreground",
|
|
19
|
+
children: /* @__PURE__ */ t(e, {
|
|
20
|
+
last4: i.last4,
|
|
21
|
+
fullNumber: i.fullNumber,
|
|
22
|
+
labels: o
|
|
23
|
+
})
|
|
24
|
+
}) : null,
|
|
25
|
+
a ? /* @__PURE__ */ t("span", {
|
|
26
|
+
className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground",
|
|
27
|
+
children: a
|
|
28
|
+
}) : null
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export { r as TransferAccountValue };
|