@tesouro/embedded-components-react 0.3.15 → 0.3.17
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/data-access/dist/lib/rest/zod.gen.js +1206 -1201
- 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
|
@@ -3,23 +3,23 @@ import { Button as t, Checkbox as n } from "../../../../../../../packages/shared
|
|
|
3
3
|
import { useId as r } from "react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js
|
|
6
|
-
function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgreed: l, onAgreedChange: u, onAccept: d, isSubmitting: f = !1, isAccepted: p = !1, errorMessage: m, labels: h }) {
|
|
7
|
-
let
|
|
6
|
+
function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgreed: l, onAgreedChange: u, onAccept: d, isSubmitting: f = !1, isAccepted: p = !1, errorMessage: m, labels: h, testIds: g }) {
|
|
7
|
+
let _ = f || p, v = e(h), y = r(), b = `${y}-agree`, x = `${y}-agree-description`, S = `${y}-accept-error`;
|
|
8
8
|
return /* @__PURE__ */ a("div", {
|
|
9
|
-
"data-testid":
|
|
9
|
+
"data-testid": g?.root,
|
|
10
10
|
className: "ttw:block ttw:w-full ttw:rounded-lg ttw:border ttw:border-border ttw:bg-background ttw:p-6",
|
|
11
11
|
children: [
|
|
12
12
|
/* @__PURE__ */ i("h2", {
|
|
13
13
|
className: "ttw:mb-2 ttw:text-lg ttw:font-semibold ttw:text-foreground",
|
|
14
|
-
children:
|
|
14
|
+
children: v.title
|
|
15
15
|
}),
|
|
16
16
|
/* @__PURE__ */ i("p", {
|
|
17
|
-
"data-testid":
|
|
17
|
+
"data-testid": g?.providerAttribution,
|
|
18
18
|
className: "ttw:mb-4 ttw:text-sm ttw:text-foreground",
|
|
19
19
|
children: o
|
|
20
20
|
}),
|
|
21
21
|
c.length > 0 ? /* @__PURE__ */ i("ul", {
|
|
22
|
-
"data-testid":
|
|
22
|
+
"data-testid": g?.disclosureLinks,
|
|
23
23
|
className: "ttw:mb-4 ttw:list-disc ttw:space-y-2 ttw:pl-5",
|
|
24
24
|
children: c.map((e) => /* @__PURE__ */ i("li", {
|
|
25
25
|
className: "ttw:marker:text-primary",
|
|
@@ -35,33 +35,33 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
|
|
|
35
35
|
/* @__PURE__ */ a("div", {
|
|
36
36
|
className: "ttw:mb-4 ttw:flex ttw:items-start ttw:gap-3",
|
|
37
37
|
children: [/* @__PURE__ */ i(n, {
|
|
38
|
-
id:
|
|
39
|
-
"data-testid":
|
|
38
|
+
id: b,
|
|
39
|
+
"data-testid": g?.agreeCheckbox,
|
|
40
40
|
checked: l,
|
|
41
|
-
disabled:
|
|
41
|
+
disabled: _,
|
|
42
42
|
onCheckedChange: (e) => u(e === !0),
|
|
43
|
-
"aria-label":
|
|
44
|
-
"aria-describedby":
|
|
43
|
+
"aria-label": v.agreementCheckboxAriaLabel,
|
|
44
|
+
"aria-describedby": x,
|
|
45
45
|
className: "ttw:mt-1 ttw:shrink-0"
|
|
46
46
|
}), /* @__PURE__ */ i("p", {
|
|
47
|
-
id:
|
|
48
|
-
"data-testid":
|
|
47
|
+
id: x,
|
|
48
|
+
"data-testid": g?.agreementText,
|
|
49
49
|
className: "ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
|
|
50
50
|
children: s
|
|
51
51
|
})]
|
|
52
52
|
}),
|
|
53
53
|
/* @__PURE__ */ i(t, {
|
|
54
54
|
type: "button",
|
|
55
|
-
"data-testid":
|
|
56
|
-
disabled: !l ||
|
|
55
|
+
"data-testid": g?.acceptButton,
|
|
56
|
+
disabled: !l || _,
|
|
57
57
|
"aria-busy": f || void 0,
|
|
58
|
-
"aria-describedby": m ?
|
|
58
|
+
"aria-describedby": m ? S : void 0,
|
|
59
59
|
onClick: d,
|
|
60
|
-
children:
|
|
60
|
+
children: v.acceptButton
|
|
61
61
|
}),
|
|
62
62
|
m ? /* @__PURE__ */ i("p", {
|
|
63
|
-
id:
|
|
64
|
-
"data-testid":
|
|
63
|
+
id: S,
|
|
64
|
+
"data-testid": g?.error,
|
|
65
65
|
role: "alert",
|
|
66
66
|
className: "ttw:mt-3 ttw:text-sm ttw:text-destructive",
|
|
67
67
|
children: m
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BalancesWidget as e } from "./
|
|
1
|
+
import { BalancesWidget as e } from "./index6.js";
|
|
2
2
|
export { e as BalancesWidget };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { SingleBalance as e } from "../../ui/dist/lib/BalancesWidget/SingleBalance/SingleBalance.js";
|
|
2
|
-
import "../../ui/dist/index.js";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
4
1
|
//#region ../../libs/tesouro-embedded-components-react/balances-widget/feature/dist/index4.js
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
var e = {
|
|
3
|
+
skeleton: "balances-widget-skeleton",
|
|
4
|
+
error: "balances-widget-error",
|
|
5
|
+
retry: "balances-widget-retry",
|
|
6
|
+
totalBalanceInfo: "balances-widget-total-balance-info",
|
|
7
|
+
totalAvailableLabel: "balances-widget-total-available-label",
|
|
8
|
+
accountRow: "balances-widget-account-row",
|
|
9
|
+
accountNumber: "balances-widget-account-number"
|
|
10
|
+
};
|
|
12
11
|
//#endregion
|
|
13
|
-
export {
|
|
12
|
+
export { e as balancesWidgetTestIds };
|
|
@@ -1,67 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
-
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
-
import "../../../shared/feature/dist/index.js";
|
|
8
|
-
import { BalancesWidgetAnalyticsEvent as n, WIDGET_NAME as r } from "./index2.js";
|
|
9
|
-
import { BalancesWidgetContextProvider as i, useBalancesWidgetContext as a } from "./index3.js";
|
|
10
|
-
import { BalancesWidget as o } from "../../ui/dist/lib/BalancesWidget/BalancesWidget.js";
|
|
1
|
+
import { balancesWidgetTestIds as e } from "./index4.js";
|
|
2
|
+
import { SingleBalance as t } from "../../ui/dist/lib/BalancesWidget/SingleBalance/SingleBalance.js";
|
|
11
3
|
import "../../ui/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import { useEffect as c, useMemo as l } from "react";
|
|
14
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
15
5
|
//#region ../../libs/tesouro-embedded-components-react/balances-widget/feature/dist/index5.js
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onRetry: m ? () => void h() : void 0,
|
|
28
|
-
totalBalance: g,
|
|
29
|
-
shouldTotalBalanceDisplay: _,
|
|
30
|
-
shouldShowViewAllAccounts: v,
|
|
31
|
-
onViewAllAccountsClicked: b,
|
|
32
|
-
labels: r,
|
|
33
|
-
children: x.map((e) => /* @__PURE__ */ u(s, {
|
|
34
|
-
accountId: e.accountId,
|
|
35
|
-
row: e.view,
|
|
36
|
-
onBalanceRowClick: i,
|
|
37
|
-
isRowClickable: y
|
|
38
|
-
}, e.accountId))
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
var p = ({ maxAccounts: e = d, labels: t, onBalanceRowClick: n, onViewAllAccountsClick: r }) => {
|
|
42
|
-
let a = Math.max(0, e);
|
|
43
|
-
return /* @__PURE__ */ u(i, {
|
|
44
|
-
maxAccounts: a,
|
|
45
|
-
onBalanceRowClick: n,
|
|
46
|
-
onViewAllAccountsClick: r,
|
|
47
|
-
children: /* @__PURE__ */ u(f, {
|
|
48
|
-
maxAccounts: a,
|
|
49
|
-
labels: t,
|
|
50
|
-
onBalanceRowClick: n
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
function m({ maxAccounts: e, labels: n, onBalanceRowClick: i, onViewAllAccountsClick: a, ...o }) {
|
|
55
|
-
return /* @__PURE__ */ u(t, {
|
|
56
|
-
...o,
|
|
57
|
-
widgetName: r,
|
|
58
|
-
children: /* @__PURE__ */ u(p, {
|
|
59
|
-
maxAccounts: e,
|
|
60
|
-
labels: n,
|
|
61
|
-
onBalanceRowClick: i,
|
|
62
|
-
onViewAllAccountsClick: a
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
}
|
|
6
|
+
var r = ({ accountId: r, row: i, isRowClickable: a, onBalanceRowClick: o }) => /* @__PURE__ */ n(t, {
|
|
7
|
+
row: i,
|
|
8
|
+
isRowClickable: a,
|
|
9
|
+
testIds: {
|
|
10
|
+
root: e.accountRow,
|
|
11
|
+
accountNumber: e.accountNumber
|
|
12
|
+
},
|
|
13
|
+
onRowClick: o ? () => {
|
|
14
|
+
o(r);
|
|
15
|
+
} : void 0
|
|
16
|
+
});
|
|
66
17
|
//#endregion
|
|
67
|
-
export {
|
|
18
|
+
export { r as SingleBalance };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
+
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
+
import "../../../shared/feature/dist/index.js";
|
|
8
|
+
import { BalancesWidgetAnalyticsEvent as n, WIDGET_NAME as r } from "./index2.js";
|
|
9
|
+
import { BalancesWidgetContextProvider as i, useBalancesWidgetContext as a } from "./index3.js";
|
|
10
|
+
import { balancesWidgetTestIds as o } from "./index4.js";
|
|
11
|
+
import { BalancesWidget as s } from "../../ui/dist/lib/BalancesWidget/BalancesWidget.js";
|
|
12
|
+
import "../../ui/dist/index.js";
|
|
13
|
+
import { SingleBalance as c } from "./index5.js";
|
|
14
|
+
import { useEffect as l, useMemo as u } from "react";
|
|
15
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
16
|
+
//#region ../../libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js
|
|
17
|
+
var f = 5;
|
|
18
|
+
function p({ maxAccounts: t, labels: r, onBalanceRowClick: i }) {
|
|
19
|
+
let f = e();
|
|
20
|
+
l(() => {
|
|
21
|
+
f(n.Mounted);
|
|
22
|
+
}, [f]);
|
|
23
|
+
let { accountRows: p, isLoading: m, isError: h, refetch: g, totalBalance: _, shouldTotalBalanceDisplay: v, shouldShowViewAllAccounts: y, isRowClickable: b, onViewAllAccountsClicked: x } = a(), S = u(() => p.slice(0, t), [p, t]), C = u(() => p.map((e) => e.view), [p]);
|
|
24
|
+
return /* @__PURE__ */ d(s, {
|
|
25
|
+
accountRows: C,
|
|
26
|
+
isLoading: m,
|
|
27
|
+
isError: h,
|
|
28
|
+
onRetry: h ? () => void g() : void 0,
|
|
29
|
+
totalBalance: _,
|
|
30
|
+
shouldTotalBalanceDisplay: v,
|
|
31
|
+
shouldShowViewAllAccounts: y,
|
|
32
|
+
onViewAllAccountsClicked: x,
|
|
33
|
+
labels: r,
|
|
34
|
+
testIds: {
|
|
35
|
+
skeleton: o.skeleton,
|
|
36
|
+
error: o.error,
|
|
37
|
+
retry: o.retry,
|
|
38
|
+
totalBalanceInfo: o.totalBalanceInfo,
|
|
39
|
+
totalAvailableLabel: o.totalAvailableLabel
|
|
40
|
+
},
|
|
41
|
+
children: S.map((e) => /* @__PURE__ */ d(c, {
|
|
42
|
+
accountId: e.accountId,
|
|
43
|
+
row: e.view,
|
|
44
|
+
onBalanceRowClick: i,
|
|
45
|
+
isRowClickable: b
|
|
46
|
+
}, e.accountId))
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
var m = ({ maxAccounts: e = f, labels: t, onBalanceRowClick: n, onViewAllAccountsClick: r }) => {
|
|
50
|
+
let a = Math.max(0, e);
|
|
51
|
+
return /* @__PURE__ */ d(i, {
|
|
52
|
+
maxAccounts: a,
|
|
53
|
+
onBalanceRowClick: n,
|
|
54
|
+
onViewAllAccountsClick: r,
|
|
55
|
+
children: /* @__PURE__ */ d(p, {
|
|
56
|
+
maxAccounts: a,
|
|
57
|
+
labels: t,
|
|
58
|
+
onBalanceRowClick: n
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
function h({ maxAccounts: e, labels: n, onBalanceRowClick: i, onViewAllAccountsClick: a, ...o }) {
|
|
63
|
+
return /* @__PURE__ */ d(t, {
|
|
64
|
+
...o,
|
|
65
|
+
widgetName: r,
|
|
66
|
+
children: /* @__PURE__ */ d(m, {
|
|
67
|
+
maxAccounts: e,
|
|
68
|
+
labels: n,
|
|
69
|
+
onBalanceRowClick: i,
|
|
70
|
+
onViewAllAccountsClick: a
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { h as BalancesWidget, p as BalancesWidgetInternal, m as BalancesWidgetWithContext };
|
|
@@ -5,34 +5,34 @@ import { BALANCES_WIDGET_LABELS_EN as c } from "./labels.js";
|
|
|
5
5
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
6
|
import { ArrowRight as d, CircleHelp as f } from "lucide-react";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/BalancesWidget.js
|
|
8
|
-
var p = ({ accountRows: p, children: m, isLoading: h, isError: g, onRetry: _, totalBalance: v, shouldTotalBalanceDisplay: y, shouldShowViewAllAccounts: b, onViewAllAccountsClicked: x, labels: S }) => {
|
|
9
|
-
let
|
|
8
|
+
var p = ({ accountRows: p, children: m, isLoading: h, isError: g, onRetry: _, totalBalance: v, shouldTotalBalanceDisplay: y, shouldShowViewAllAccounts: b, onViewAllAccountsClicked: x, labels: S, testIds: C }) => {
|
|
9
|
+
let w = {
|
|
10
10
|
...c,
|
|
11
11
|
...S
|
|
12
12
|
};
|
|
13
13
|
return /* @__PURE__ */ l(s, {
|
|
14
|
-
title:
|
|
14
|
+
title: w.widgetTitle,
|
|
15
15
|
showHeaderDivider: !1,
|
|
16
16
|
children: h ? /* @__PURE__ */ l(t, {
|
|
17
|
-
"data-testid":
|
|
17
|
+
"data-testid": C?.skeleton,
|
|
18
18
|
height: 80,
|
|
19
19
|
width: "100%",
|
|
20
20
|
className: "ttw:rounded-md"
|
|
21
21
|
}) : g ? /* @__PURE__ */ u("div", {
|
|
22
22
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
23
|
-
"data-testid":
|
|
23
|
+
"data-testid": C?.error,
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ l(o, {
|
|
26
26
|
component: "p",
|
|
27
27
|
variant: "body1",
|
|
28
28
|
className: "ttw:font-semibold",
|
|
29
|
-
children:
|
|
29
|
+
children: w.loadErrorTitle
|
|
30
30
|
}),
|
|
31
31
|
/* @__PURE__ */ l(o, {
|
|
32
32
|
component: "p",
|
|
33
33
|
variant: "body2",
|
|
34
34
|
color: "muted",
|
|
35
|
-
children:
|
|
35
|
+
children: w.loadErrorDescription
|
|
36
36
|
}),
|
|
37
37
|
_ ? /* @__PURE__ */ l(e, {
|
|
38
38
|
type: "button",
|
|
@@ -40,8 +40,8 @@ var p = ({ accountRows: p, children: m, isLoading: h, isError: g, onRetry: _, to
|
|
|
40
40
|
size: "sm",
|
|
41
41
|
className: "ttw:self-start ttw:cursor-pointer",
|
|
42
42
|
onClick: _,
|
|
43
|
-
"data-testid":
|
|
44
|
-
children:
|
|
43
|
+
"data-testid": C?.retry,
|
|
44
|
+
children: w.loadErrorRetry
|
|
45
45
|
}) : null
|
|
46
46
|
]
|
|
47
47
|
}) : p.length > 0 ? /* @__PURE__ */ u("div", {
|
|
@@ -63,8 +63,8 @@ var p = ({ accountRows: p, children: m, isLoading: h, isError: g, onRetry: _, to
|
|
|
63
63
|
type: "button",
|
|
64
64
|
variant: "ghost",
|
|
65
65
|
size: "icon-sm",
|
|
66
|
-
"aria-label":
|
|
67
|
-
"data-testid":
|
|
66
|
+
"aria-label": w.totalAvailableBalanceInfoAriaLabel,
|
|
67
|
+
"data-testid": C?.totalBalanceInfo,
|
|
68
68
|
className: "ttw:size-8 ttw:shrink-0 ttw:text-muted-foreground",
|
|
69
69
|
children: /* @__PURE__ */ l(f, {
|
|
70
70
|
className: "ttw:size-[18px]",
|
|
@@ -74,15 +74,15 @@ var p = ({ accountRows: p, children: m, isLoading: h, isError: g, onRetry: _, to
|
|
|
74
74
|
}), /* @__PURE__ */ l(r, {
|
|
75
75
|
sideOffset: 4,
|
|
76
76
|
className: "ttw:max-w-sm ttw:text-left",
|
|
77
|
-
children:
|
|
77
|
+
children: w.totalAvailableBalanceTooltip
|
|
78
78
|
})] }) })]
|
|
79
79
|
}), /* @__PURE__ */ l(o, {
|
|
80
80
|
variant: "body2",
|
|
81
81
|
color: "muted",
|
|
82
82
|
component: "span",
|
|
83
|
-
"data-testid":
|
|
83
|
+
"data-testid": C?.totalAvailableLabel,
|
|
84
84
|
className: "ttw:block ttw:text-sm ttw:leading-tight",
|
|
85
|
-
children:
|
|
85
|
+
children: w.totalAvailableBalance
|
|
86
86
|
})]
|
|
87
87
|
}), /* @__PURE__ */ l("div", {
|
|
88
88
|
className: "ttw:flex ttw:min-w-0 ttw:flex-col",
|
|
@@ -93,14 +93,14 @@ var p = ({ accountRows: p, children: m, isLoading: h, isError: g, onRetry: _, to
|
|
|
93
93
|
variant: "link",
|
|
94
94
|
onClick: x,
|
|
95
95
|
className: "ttw:h-auto ttw:min-w-0 ttw:justify-start ttw:self-start ttw:border-none ttw:bg-transparent ttw:px-0 ttw:py-0 ttw:font-inherit ttw:normal-case ttw:text-primary ttw:shadow-none ttw:hover:bg-transparent ttw:hover:text-primary/90 ttw:hover:underline",
|
|
96
|
-
children: [
|
|
96
|
+
children: [w.viewAllAccounts, /* @__PURE__ */ l(d, {
|
|
97
97
|
className: "ttw:size-4 ttw:shrink-0",
|
|
98
98
|
"aria-hidden": !0
|
|
99
99
|
})]
|
|
100
100
|
})]
|
|
101
101
|
}) : /* @__PURE__ */ l(o, {
|
|
102
102
|
color: "muted",
|
|
103
|
-
children:
|
|
103
|
+
children: w.noBalancesFound
|
|
104
104
|
})
|
|
105
105
|
});
|
|
106
106
|
};
|
|
@@ -15,8 +15,8 @@ var o = (e) => [
|
|
|
15
15
|
"ttw:cursor-pointer!",
|
|
16
16
|
"ttw:focus-visible:outline-none ttw:focus-visible:ring-2 ttw:focus-visible:ring-primary ttw:focus-visible:ring-offset-0"
|
|
17
17
|
].join(" ") : "ttw:cursor-default"
|
|
18
|
-
].join(" "), s = ({ row: s, isRowClickable: c, onRowClick: l }) => {
|
|
19
|
-
let
|
|
18
|
+
].join(" "), s = ({ row: s, isRowClickable: c, onRowClick: l, testIds: u }) => {
|
|
19
|
+
let d = /* @__PURE__ */ r(t, { children: [
|
|
20
20
|
/* @__PURE__ */ n("span", {
|
|
21
21
|
className: "ttw:flex ttw:size-10 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-lg ttw:bg-primary/10",
|
|
22
22
|
"aria-hidden": !0,
|
|
@@ -32,7 +32,7 @@ var o = (e) => [
|
|
|
32
32
|
}), /* @__PURE__ */ n(e, {
|
|
33
33
|
component: "span",
|
|
34
34
|
variant: "body1",
|
|
35
|
-
"data-testid":
|
|
35
|
+
"data-testid": u?.accountNumber,
|
|
36
36
|
className: "ttw:shrink-0 ttw:font-normal ttw:text-[#667085]",
|
|
37
37
|
children: s.suffixLabel
|
|
38
38
|
})]
|
|
@@ -50,14 +50,14 @@ var o = (e) => [
|
|
|
50
50
|
] });
|
|
51
51
|
return c && l ? /* @__PURE__ */ n("button", {
|
|
52
52
|
type: "button",
|
|
53
|
-
"data-testid":
|
|
53
|
+
"data-testid": u?.root,
|
|
54
54
|
className: o(!0),
|
|
55
55
|
onClick: () => l(),
|
|
56
|
-
children:
|
|
56
|
+
children: d
|
|
57
57
|
}) : /* @__PURE__ */ n("div", {
|
|
58
|
-
"data-testid":
|
|
58
|
+
"data-testid": u?.root,
|
|
59
59
|
className: o(!1),
|
|
60
|
-
children:
|
|
60
|
+
children: d
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BankAccountOnboardingWidget as e } from "./
|
|
1
|
+
import { BankAccountOnboardingWidget as e } from "./index18.js";
|
|
2
2
|
export { e as BankAccountOnboardingWidget };
|