@tesouro/embedded-components-react 0.11.141 → 0.11.168
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/NOTICE +24 -0
- package/README.md +15 -37
- package/dist/experimental/BalanceHistoryWidget.d.ts +0 -11
- package/dist/experimental/QuickViewWidget.d.ts +0 -11
- package/dist/experimental/RemoteCheckCapture.d.ts +0 -11
- package/dist/experimental/index.d.ts +0 -11
- package/dist/fixtures/index.d.ts +27 -1
- package/dist/index.css +6976 -6246
- package/dist/index.d.ts +67 -173
- package/dist/index.js +9 -10
- package/dist/lib/AcceptDisclosuresWidget.d.ts +0 -11
- package/dist/lib/BalancesWidget.d.ts +0 -11
- package/dist/lib/BankAccountOnboardingWidget.d.ts +0 -11
- package/dist/lib/BankAccountsWidget.d.ts +3 -11
- package/dist/lib/BankingComplianceBannerWidget.d.ts +0 -11
- package/dist/lib/BillPayWidget.d.ts +0 -11
- package/dist/lib/CardDetailsWidget.d.ts +0 -11
- package/dist/lib/CounterpartsWidget.d.ts +1 -12
- package/dist/lib/CounterpartsWidgetPublic.d.ts +1 -12
- package/dist/lib/CreditCardsWidget.d.ts +1 -11
- package/dist/lib/DebitCardsWidget.d.ts +1 -11
- package/dist/lib/ExpenseManagementWidget.d.ts +1 -12
- package/dist/lib/InsightsWidget.d.ts +0 -11
- package/dist/lib/LinkedAccountsWidget.d.ts +1 -11
- package/dist/lib/OfferWidget.d.ts +0 -11
- package/dist/lib/ReceivablesWidget.d.ts +60 -17
- package/dist/lib/ReceivablesWidget.js +3 -2
- package/dist/lib/SettingsWidget.d.ts +0 -11
- package/dist/lib/TransfersWidget.d.ts +0 -11
- package/dist/lib/WidgetProvider.d.ts +0 -11
- package/dist/lib/WidgetProviderPublic.d.ts +0 -11
- package/dist/lib/WidgetSuite.d.ts +63 -15
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index10.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index4.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index10.js +83 -82
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js +84 -79
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/BankAccountsWidget/BankAccountsWidget.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +122 -121
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +51 -46
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +63 -59
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useActivateCard.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useCardLock.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useEditCardNickname.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/testIds.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/useCardsWidget.js +161 -160
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +126 -122
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsActions.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsFeature.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +66 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +351 -318
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +126 -133
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +63 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilter.js +78 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilterLabels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +138 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +119 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js +37 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useInvoicesFilter.js +131 -81
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useLocalDayStart.js +15 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +46 -46
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +440 -438
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +62 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +47 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +78 -86
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +180 -158
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useRecurringSeriesTable.js +132 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/invoicing.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/receivables.js +153 -137
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +137 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +21 -46
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +143 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +193 -192
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +100 -96
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductDelete.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/mocks/products.js +3 -11
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/scenarios.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index2.js +36 -77
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/summarizeCardSpend.js +11 -13
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/useCardSpendSummary.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/useRemoteCheckCaptureWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index8.js +4 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +43 -43
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +233 -211
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -42
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/feature/dist/lib/ExpenseRequirementsWidget.js +5 -4
- 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/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/toasts.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmbeddedToaster.js +33 -32
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +9 -8
- package/dist/node_modules/sonner/dist/index.js +620 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +6072 -6062
- package/dist/scenarios/index.d.ts +1 -3
- package/dist/scenarios/index.js +17 -20
- package/package.json +17 -4
- package/dist/lib/CustomersWidget.d.ts +0 -993
- package/dist/lib/CustomersWidget.js +0 -2
- package/dist/lib/ProductsWidget.d.ts +0 -893
- package/dist/lib/ProductsWidget.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js +0 -41
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/analytics/events.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/scenarios.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useUtcDayStart.js +0 -15
|
@@ -3,137 +3,142 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r, Button as i, DescriptionList as a, Heading as o, TooltipProvider as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { MaskedAccountNumber as c } from "../../../../shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js";
|
|
7
|
+
import "../../../../shared/ui/dist/index.js";
|
|
8
|
+
import { IconActionButton as l } from "./index2.js";
|
|
9
|
+
import { AccountDetailsCopyField as u } from "./index3.js";
|
|
10
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
import { CheckIcon as p, CopyIcon as m, EyeIcon as h, EyeOffIcon as g } from "lucide-react";
|
|
10
12
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js
|
|
11
|
-
function
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
function _({ value: e, copyLabel: t, copiedLabel: n, isCopied: r = !1, onCopy: i, valueTestId: a, revealAction: o }) {
|
|
14
|
+
return /* @__PURE__ */ f("span", {
|
|
13
15
|
className: "ttw:-my-1.5 ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1",
|
|
14
16
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ d("span", {
|
|
16
18
|
"data-testid": a,
|
|
17
19
|
className: "ttw:tabular-nums",
|
|
18
20
|
children: e
|
|
19
21
|
}),
|
|
20
22
|
o,
|
|
21
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ d(l, {
|
|
22
24
|
label: r ? n : t,
|
|
23
25
|
onClick: i,
|
|
24
|
-
children:
|
|
26
|
+
children: d(r ? p : m, {})
|
|
25
27
|
})
|
|
26
28
|
]
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
|
-
var
|
|
30
|
-
function
|
|
31
|
-
let { copiedLabel:
|
|
32
|
-
copiedLabel:
|
|
33
|
-
isCopied:
|
|
34
|
-
onCopy: () =>
|
|
35
|
-
}),
|
|
31
|
+
var v = "domestic-wire";
|
|
32
|
+
function y({ labels: p, routingNumberLabel: m, accountNumberLabel: y, accountNumberLast4: b, accountNumberTestId: x, wireAccountNumberLabel: S, bankNameLabel: C, bankAddressLabel: w, domesticWireIntroLabel: T, domesticWireNoteLabel: E, thingsToKnowBodyLabel: D, supportTeamHref: O, isAccountNumberVisible: k, copiedField: A, isDomesticWireExpanded: j, onDomesticWireExpandedChange: M, onToggleAccountNumberVisibility: N, onCopy: P }) {
|
|
33
|
+
let { copiedLabel: F } = p, I = (e) => ({
|
|
34
|
+
copiedLabel: F,
|
|
35
|
+
isCopied: A === e,
|
|
36
|
+
onCopy: () => P(e)
|
|
37
|
+
}), L = [
|
|
36
38
|
{
|
|
37
|
-
label:
|
|
38
|
-
value: /* @__PURE__ */
|
|
39
|
-
value:
|
|
40
|
-
copyLabel:
|
|
41
|
-
...
|
|
39
|
+
label: p.accountNumberLabel,
|
|
40
|
+
value: /* @__PURE__ */ d(_, {
|
|
41
|
+
value: S,
|
|
42
|
+
copyLabel: p.copyAccountNumber,
|
|
43
|
+
...I(u.WireAccountNumber)
|
|
42
44
|
})
|
|
43
45
|
},
|
|
44
46
|
{
|
|
45
|
-
label:
|
|
46
|
-
value: /* @__PURE__ */
|
|
47
|
-
value:
|
|
48
|
-
copyLabel:
|
|
49
|
-
...
|
|
47
|
+
label: p.routingNumberLabel,
|
|
48
|
+
value: /* @__PURE__ */ d(_, {
|
|
49
|
+
value: m,
|
|
50
|
+
copyLabel: p.copyRoutingNumber,
|
|
51
|
+
...I(u.WireRoutingNumber)
|
|
50
52
|
})
|
|
51
53
|
},
|
|
52
54
|
{
|
|
53
|
-
label:
|
|
54
|
-
value: /* @__PURE__ */
|
|
55
|
-
value:
|
|
56
|
-
copyLabel:
|
|
57
|
-
...
|
|
55
|
+
label: p.bankNameLabel,
|
|
56
|
+
value: /* @__PURE__ */ d(_, {
|
|
57
|
+
value: C,
|
|
58
|
+
copyLabel: p.copyBankName,
|
|
59
|
+
...I(u.BankName)
|
|
58
60
|
})
|
|
59
61
|
},
|
|
60
|
-
...
|
|
61
|
-
label:
|
|
62
|
-
value: /* @__PURE__ */
|
|
63
|
-
value:
|
|
64
|
-
copyLabel:
|
|
65
|
-
...
|
|
62
|
+
...w ? [{
|
|
63
|
+
label: p.bankAddressLabel,
|
|
64
|
+
value: /* @__PURE__ */ d(_, {
|
|
65
|
+
value: w,
|
|
66
|
+
copyLabel: p.copyBankAddress,
|
|
67
|
+
...I(u.BankAddress)
|
|
66
68
|
})
|
|
67
69
|
}] : []
|
|
68
70
|
];
|
|
69
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ d(s, { children: /* @__PURE__ */ d("div", {
|
|
70
72
|
className: "ttw:flex ttw:max-w-180 ttw:flex-col ttw:gap-6",
|
|
71
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ f("section", {
|
|
72
74
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
73
75
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ d(o, {
|
|
75
77
|
variant: "section",
|
|
76
78
|
level: 3,
|
|
77
|
-
children:
|
|
79
|
+
children: p.detailsSectionTitle
|
|
78
80
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
label:
|
|
81
|
-
value: /* @__PURE__ */
|
|
82
|
-
value:
|
|
83
|
-
copyLabel:
|
|
84
|
-
...
|
|
81
|
+
/* @__PURE__ */ d(a, { items: [{
|
|
82
|
+
label: p.routingNumberLabel,
|
|
83
|
+
value: /* @__PURE__ */ d(_, {
|
|
84
|
+
value: m,
|
|
85
|
+
copyLabel: p.copyRoutingNumber,
|
|
86
|
+
...I(u.RoutingNumber)
|
|
85
87
|
})
|
|
86
88
|
}, {
|
|
87
|
-
label:
|
|
88
|
-
value: /* @__PURE__ */
|
|
89
|
-
value:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
label: p.accountNumberLabel,
|
|
90
|
+
value: /* @__PURE__ */ d(_, {
|
|
91
|
+
value: k ? y : /* @__PURE__ */ d(c, {
|
|
92
|
+
last4: b,
|
|
93
|
+
labels: { endingIn: p.accountNumberEndingIn }
|
|
94
|
+
}),
|
|
95
|
+
valueTestId: x,
|
|
96
|
+
copyLabel: p.copyAccountNumber,
|
|
97
|
+
...I(u.AccountNumber),
|
|
98
|
+
revealAction: /* @__PURE__ */ d(l, {
|
|
99
|
+
label: k ? p.hideAccountNumber : p.showAccountNumber,
|
|
100
|
+
onClick: N,
|
|
101
|
+
children: d(k ? g : h, {})
|
|
97
102
|
})
|
|
98
103
|
})
|
|
99
104
|
}] }),
|
|
100
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ d(e, {
|
|
101
106
|
type: "single",
|
|
102
107
|
collapsible: !0,
|
|
103
|
-
value:
|
|
104
|
-
onValueChange: (e) =>
|
|
108
|
+
value: j ? v : "",
|
|
109
|
+
onValueChange: (e) => M(e === v),
|
|
105
110
|
className: "ttw:border-t ttw:border-border",
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
value:
|
|
108
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ f(n, {
|
|
112
|
+
value: v,
|
|
113
|
+
children: [/* @__PURE__ */ d(r, {
|
|
109
114
|
className: "ttw:cursor-pointer ttw:py-2.5 ttw:text-foreground",
|
|
110
|
-
children:
|
|
111
|
-
}), /* @__PURE__ */
|
|
115
|
+
children: p.domesticWireTitle
|
|
116
|
+
}), /* @__PURE__ */ f(t, {
|
|
112
117
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:pb-4 ttw:text-sm ttw:text-foreground",
|
|
113
118
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ d("p", { children: T }),
|
|
120
|
+
/* @__PURE__ */ d(a, { items: L }),
|
|
121
|
+
/* @__PURE__ */ d("p", { children: E }),
|
|
122
|
+
/* @__PURE__ */ f("p", { children: [
|
|
123
|
+
/* @__PURE__ */ d("span", {
|
|
119
124
|
className: "ttw:font-semibold",
|
|
120
|
-
children:
|
|
125
|
+
children: p.thingsToKnowHeading
|
|
121
126
|
}),
|
|
122
127
|
" ",
|
|
123
|
-
|
|
128
|
+
D
|
|
124
129
|
] }),
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
O ? /* @__PURE__ */ f("p", { children: [
|
|
131
|
+
p.supportQuestionsPrefix,
|
|
127
132
|
" ",
|
|
128
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ d(i, {
|
|
129
134
|
variant: "link",
|
|
130
135
|
asChild: !0,
|
|
131
136
|
className: "ttw:h-auto ttw:p-0 ttw:text-sm ttw:font-normal",
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
href:
|
|
137
|
+
children: /* @__PURE__ */ d("a", {
|
|
138
|
+
href: O,
|
|
134
139
|
target: "_blank",
|
|
135
140
|
rel: "noopener noreferrer",
|
|
136
|
-
children:
|
|
141
|
+
children: p.supportTeamLink
|
|
137
142
|
})
|
|
138
143
|
}),
|
|
139
144
|
"."
|
|
@@ -146,4 +151,4 @@ function v({ labels: f, routingNumberLabel: p, accountNumberDisplayLabel: v, acc
|
|
|
146
151
|
})
|
|
147
152
|
}) });
|
|
148
153
|
}
|
|
149
|
-
export {
|
|
154
|
+
export { y as AccountDetailsPanel };
|
|
@@ -62,11 +62,12 @@ var e = {
|
|
|
62
62
|
supportTeamLink: "support team",
|
|
63
63
|
routingNumberLabel: "Routing number",
|
|
64
64
|
accountNumberLabel: "Account number",
|
|
65
|
-
copyAccountNumber: "Copy account number",
|
|
65
|
+
copyAccountNumber: "Copy full account number",
|
|
66
66
|
copyRoutingNumber: "Copy routing number",
|
|
67
67
|
copyBankName: "Copy bank name",
|
|
68
68
|
copyBankAddress: "Copy bank address",
|
|
69
69
|
copiedLabel: "Copied",
|
|
70
|
+
accountNumberEndingIn: "ending in {last4}",
|
|
70
71
|
showAccountNumber: "Show account number",
|
|
71
72
|
hideAccountNumber: "Hide account number",
|
|
72
73
|
loadingLabel: "Loading account details",
|
|
@@ -42,6 +42,7 @@ function l({ labels: e, accountDetailsLabels: r, featureLabels: l, isBankingTagl
|
|
|
42
42
|
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(t, {}), /* @__PURE__ */ s(n, {
|
|
43
43
|
labels: e,
|
|
44
44
|
accountCardTestId: "bank-accounts-widget-account-card",
|
|
45
|
+
accessRestrictedTestId: "bank-accounts-widget-access-restricted",
|
|
45
46
|
...C
|
|
46
47
|
})] });
|
|
47
48
|
}
|
|
@@ -19,8 +19,7 @@ function n(e) {
|
|
|
19
19
|
})).join(" + ");
|
|
20
20
|
}
|
|
21
21
|
function r(e) {
|
|
22
|
-
|
|
23
|
-
return t ? `••••••••${t.slice(-4)}` : "";
|
|
22
|
+
return e.trim().slice(-4);
|
|
24
23
|
}
|
|
25
24
|
async function i(e) {
|
|
26
25
|
if (!e.trim()) return !1;
|
|
@@ -30,4 +29,4 @@ async function i(e) {
|
|
|
30
29
|
return !1;
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
export { i as copyTextToClipboard, t as formatAmountLabel, n as formatTotalAvailableBalanceLabel
|
|
32
|
+
export { r as accountNumberLast4, i as copyTextToClipboard, t as formatAmountLabel, n as formatTotalAvailableBalanceLabel };
|
|
@@ -2,59 +2,59 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { toast as e } from "../../../../../../
|
|
5
|
+
import { toast as e } from "../../../../../../node_modules/sonner/dist/index.js";
|
|
6
6
|
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as t, emitWidgetDomEvent as n } from "../../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
7
7
|
import "../../../../shared/util/dist/index.js";
|
|
8
|
-
import { OrganizationStatus as
|
|
9
|
-
import { useEmbedApi as
|
|
10
|
-
import { Scope as
|
|
8
|
+
import { OrganizationStatus as ee, isOrganizationOnItsWay as te } from "../../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
9
|
+
import { useEmbedApi as ne } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
+
import { Scope as r } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
11
11
|
import { useAllBankAccountsQuery as re } from "../../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
12
12
|
import { useAllOrganizationRolesQuery as ie } from "../../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
13
13
|
import "../../../../shared/data-access/dist/index.js";
|
|
14
14
|
import { BankAccountsWidgetAnalyticsEvent as i } from "./BankAccountsWidget/analytics/events.js";
|
|
15
|
-
import {
|
|
16
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
17
|
-
import { getBankAccountsPermissions as
|
|
18
|
-
import { toAccessRows as
|
|
19
|
-
import { DEFAULT_LABELS as
|
|
15
|
+
import { accountNumberLast4 as ae, copyTextToClipboard as oe, formatAmountLabel as a, formatTotalAvailableBalanceLabel as se } from "./formatters.js";
|
|
16
|
+
import { DEFAULT_FEATURE_LABELS as ce } from "./labels.js";
|
|
17
|
+
import { getBankAccountsPermissions as le } from "./permissions.js";
|
|
18
|
+
import { toAccessRows as ue, toOrganizationRoleOptions as de, toTeamMembers as fe } from "./teamMembers.js";
|
|
19
|
+
import { DEFAULT_LABELS as pe } from "../../../ui/dist/lib/labels.js";
|
|
20
20
|
import "../../../../shared/ui/dist/index.js";
|
|
21
21
|
import "../../../ui/dist/index.js";
|
|
22
|
-
import { useAnalyticsTrack as
|
|
23
|
-
import { useRefetchWidget as
|
|
22
|
+
import { useAnalyticsTrack as me } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
23
|
+
import { useRefetchWidget as he, useWidgetConfig as ge, useWidgetError as _e, useWidgetInitStaleForToken as ve, useWidgetLoading as ye } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
24
24
|
import "../../../../shared/feature/dist/index.js";
|
|
25
|
-
import { useCreateBankAccountMutation as
|
|
26
|
-
import { useGrantBankAccountAccessMutation as
|
|
27
|
-
import { useAllOrganizationUsersQuery as
|
|
25
|
+
import { useCreateBankAccountMutation as be } from "../../../data-access/dist/index3.js";
|
|
26
|
+
import { useGrantBankAccountAccessMutation as xe } from "../../../data-access/dist/index4.js";
|
|
27
|
+
import { useAllOrganizationUsersQuery as Se } from "../../../data-access/dist/index5.js";
|
|
28
28
|
import "../../../data-access/dist/index.js";
|
|
29
|
-
import { filterRolesForOrganization as
|
|
30
|
-
import { useCallback as
|
|
31
|
-
import { useControllableState as
|
|
29
|
+
import { filterRolesForOrganization as Ce } from "../../../../../shared/util-validation/dist/index6.js";
|
|
30
|
+
import { useCallback as we, useEffect as o, useMemo as s, useRef as Te, useState as c } from "react";
|
|
31
|
+
import { useControllableState as Ee } from "@radix-ui/react-use-controllable-state";
|
|
32
32
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js
|
|
33
|
-
var l = { nickname: "" },
|
|
33
|
+
var l = { nickname: "" }, De = r.BankAccountWriteOrg;
|
|
34
34
|
function u(e, t) {
|
|
35
35
|
return e !== void 0 && t !== void 0 && e !== t;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
let
|
|
39
|
-
...
|
|
40
|
-
...
|
|
37
|
+
function Oe({ labels: r, featureLabels: ae, isBankingTaglineVisible: a = !0, bankLogoSrc: Oe, bankLogoAlt: Ae, depositAgreementUrl: je, selectedAccountId: Me, defaultSelectedAccountId: Ne, onSelectedAccountIdChange: Pe, "data-testid": Fe } = {}) {
|
|
38
|
+
let Ie = {
|
|
39
|
+
...pe,
|
|
40
|
+
...r
|
|
41
41
|
}, d = {
|
|
42
|
-
...
|
|
43
|
-
...
|
|
44
|
-
}, f =
|
|
45
|
-
p !== void 0 && p !== S &&
|
|
46
|
-
let [C,
|
|
47
|
-
x !== void 0 && x !== C &&
|
|
48
|
-
let [
|
|
49
|
-
prop:
|
|
50
|
-
defaultProp:
|
|
51
|
-
onChange:
|
|
42
|
+
...ce,
|
|
43
|
+
...ae
|
|
44
|
+
}, f = me(), { organizationId: p, widgetToken: Le, initResponse: m } = ge(), Re = ye(), h = ve(), { organizationStatus: g } = ne(), _ = te(g), v = !!_e(), ze = he(), y = !!(p && Le), Be = y || !!Le && g === ee.Rotating, b = s(() => le(m?.scopes), [m?.scopes]), Ve = Be && b.canRead && !!m, x = m?.userId ?? void 0, [S, He] = c(p);
|
|
45
|
+
p !== void 0 && p !== S && He(p);
|
|
46
|
+
let [C, Ue] = c(x);
|
|
47
|
+
x !== void 0 && x !== C && Ue(x);
|
|
48
|
+
let [We, w] = Ee({
|
|
49
|
+
prop: Me,
|
|
50
|
+
defaultProp: Ne ?? null,
|
|
51
|
+
onChange: Pe,
|
|
52
52
|
caller: "BankAccountsWidget"
|
|
53
|
-
}), T =
|
|
53
|
+
}), T = Te({
|
|
54
54
|
organizationId: S,
|
|
55
55
|
userId: C
|
|
56
|
-
}),
|
|
57
|
-
|
|
56
|
+
}), Ge = u(T.current.organizationId, S) || u(T.current.userId, C);
|
|
57
|
+
o(() => {
|
|
58
58
|
let e = T.current;
|
|
59
59
|
T.current = {
|
|
60
60
|
organizationId: S,
|
|
@@ -65,142 +65,143 @@ function De({ labels: ne, featureLabels: a, isBankingTaglineVisible: o = !0, ban
|
|
|
65
65
|
C,
|
|
66
66
|
w
|
|
67
67
|
]);
|
|
68
|
-
let E =
|
|
68
|
+
let Ke = h && !b.canRead, E = !v && !h && !!m && !b.canRead, qe = Ge || E ? null : We, D = Ve && !qe, O = we((e) => {
|
|
69
69
|
w(e);
|
|
70
|
-
}, [w]), [k, A] = c(!1), [j, M] = c(l), [
|
|
71
|
-
|
|
70
|
+
}, [w]), [k, A] = c(!1), [j, M] = c(l), [N, P] = c([]), [Je, F] = c(!1), [Ye, I] = c(!1), [Xe, L] = c(), [Ze, Qe] = c({}), [R, $e] = c({});
|
|
71
|
+
o(() => {
|
|
72
72
|
f(i.Mounted);
|
|
73
73
|
}, [f]);
|
|
74
|
-
let
|
|
75
|
-
enabled:
|
|
76
|
-
permissions: [
|
|
77
|
-
}),
|
|
78
|
-
let e =
|
|
74
|
+
let z = re({ enabled: D }), B = be(), V = xe(), H = k && !E, U = Se({ enabled: H }), W = ie({ enabled: H }), G = Se({
|
|
75
|
+
enabled: H,
|
|
76
|
+
permissions: [De]
|
|
77
|
+
}), et = s(() => new Set((G.data?.data ?? []).filter((e) => e.organizationId === p).map((e) => e.id)), [G.data?.data, p]), K = s(() => {
|
|
78
|
+
let e = W.data?.data ?? [], t = p ? Ce(e, {
|
|
79
79
|
organizationId: p,
|
|
80
|
-
organizationTypes:
|
|
80
|
+
organizationTypes: m?.organizationTypes ?? []
|
|
81
81
|
}) : e;
|
|
82
|
-
return
|
|
82
|
+
return fe(U.data?.data ?? [], de(t), et);
|
|
83
83
|
}, [
|
|
84
|
-
|
|
84
|
+
et,
|
|
85
|
+
W.data?.data,
|
|
85
86
|
U.data?.data,
|
|
86
|
-
H.data?.data,
|
|
87
87
|
p,
|
|
88
|
-
|
|
89
|
-
]),
|
|
88
|
+
m?.organizationTypes
|
|
89
|
+
]), tt = U.isError && U.isFetching, nt = G.isError && G.isFetching, q = U.isLoading || U.isFetchingNextPage || !!U.hasNextPage || tt || W.isResolving || G.isLoading || G.isFetchingNextPage || !!G.hasNextPage || nt, rt = U.isError && !tt || G.isError && !nt, it = !q && !rt, at = () => {
|
|
90
90
|
for (let e of [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
U,
|
|
92
|
+
G,
|
|
93
|
+
W
|
|
94
94
|
]) e.isError && e.refetch();
|
|
95
|
-
},
|
|
96
|
-
await
|
|
95
|
+
}, J = D ? z.data?.data ?? [] : [], ot = [.../* @__PURE__ */ new Set([...K.filter((e) => e.locked).map((e) => e.id), ...N])], Y = m?.bankName?.trim() ?? "", st = m?.vspName?.trim() ?? "", ct = je?.trim() || void 0, X = y && b.canWrite && !E, Z = !z.hasNextPage && !z.isFetchingNextPage, lt = s(() => Z ? se(J) : void 0, [J, Z]), ut = J.length > 1 && b.canRead && Z, Q = we(async (e, t, n) => {
|
|
96
|
+
await oe(n) && ($e((n) => ({
|
|
97
97
|
...n,
|
|
98
98
|
[e]: t
|
|
99
99
|
})), window.setTimeout(() => {
|
|
100
|
-
|
|
100
|
+
$e((t) => ({
|
|
101
101
|
...t,
|
|
102
102
|
[e]: void 0
|
|
103
103
|
}));
|
|
104
104
|
}, 2e3));
|
|
105
|
-
}, []),
|
|
106
|
-
isAccountNumberVisible:
|
|
107
|
-
isAccountNumberCopied:
|
|
108
|
-
isRoutingNumberCopied:
|
|
109
|
-
onToggleAccountNumberVisibility: () =>
|
|
105
|
+
}, []), dt = s(() => J.map((e) => ke(e, d, {
|
|
106
|
+
isAccountNumberVisible: Ze[e.id] ?? !1,
|
|
107
|
+
isAccountNumberCopied: R[e.id] === "account",
|
|
108
|
+
isRoutingNumberCopied: R[e.id] === "routing",
|
|
109
|
+
onToggleAccountNumberVisibility: () => Qe((t) => ({
|
|
110
110
|
...t,
|
|
111
111
|
[e.id]: !t[e.id]
|
|
112
112
|
})),
|
|
113
|
-
onCopyAccountNumber: () => void
|
|
114
|
-
onCopyRoutingNumber: () => void
|
|
113
|
+
onCopyAccountNumber: () => void Q(e.id, "account", e.accountNumber),
|
|
114
|
+
onCopyRoutingNumber: () => void Q(e.id, "routing", e.routingNumber),
|
|
115
115
|
onSelect: () => {
|
|
116
116
|
O(e.id), f(i.AccountSelected, { accountId: e.id });
|
|
117
117
|
}
|
|
118
118
|
})), [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
J,
|
|
120
|
+
Ze,
|
|
121
|
+
R,
|
|
122
122
|
d,
|
|
123
|
-
|
|
123
|
+
Q,
|
|
124
124
|
O,
|
|
125
125
|
f
|
|
126
|
-
]),
|
|
127
|
-
|
|
128
|
-
path: { id:
|
|
129
|
-
body: { userIds:
|
|
126
|
+
]), ft = (ee) => {
|
|
127
|
+
V.mutate({
|
|
128
|
+
path: { id: ee },
|
|
129
|
+
body: { userIds: ot }
|
|
130
130
|
}, { onSuccess: () => {
|
|
131
|
-
n(t), e.success(d.createSuccessToast), M(l),
|
|
131
|
+
n(t), e.success(d.createSuccessToast), M(l), P([]), L(void 0), F(!1), A(!1);
|
|
132
132
|
} });
|
|
133
|
-
},
|
|
134
|
-
if (!
|
|
135
|
-
if (!
|
|
136
|
-
|
|
133
|
+
}, pt = () => {
|
|
134
|
+
if (!X) return;
|
|
135
|
+
if (!it) {
|
|
136
|
+
q || at();
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
|
-
let e = j.nickname.trim() === "", t =
|
|
140
|
-
|
|
141
|
-
f(i.AccountCreated, { accountId: e?.id }), e?.id && (
|
|
139
|
+
let e = j.nickname.trim() === "", t = ot.length === 0;
|
|
140
|
+
F(e), I(t), !(e || t) && (Xe ? ft(Xe) : B.mutate({ body: { nickname: j.nickname.trim() } }, { onSuccess: (e) => {
|
|
141
|
+
f(i.AccountCreated, { accountId: e?.id }), e?.id && (L(e.id), ft(e.id));
|
|
142
142
|
} }));
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
(!e ||
|
|
147
|
-
},
|
|
148
|
-
$ !==
|
|
149
|
-
let
|
|
150
|
-
selectedUserIds:
|
|
151
|
-
disabled:
|
|
152
|
-
fallbackTooltip:
|
|
153
|
-
onUserToggle:
|
|
143
|
+
}, mt = (e, t) => {
|
|
144
|
+
K.find((t) => t.id === e)?.locked || (I(!1), P((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e)));
|
|
145
|
+
}, ht = (e) => {
|
|
146
|
+
(!e || X) && (e && (M(l), P([]), L(void 0), F(!1), I(!1), B.reset(), V.reset()), A(e));
|
|
147
|
+
}, gt = B.isPending || V.isPending, _t = !y && _, $ = !y && !_ || E, [vt, yt] = c($);
|
|
148
|
+
$ !== vt && (yt($), $ && A(!1));
|
|
149
|
+
let bt = ue(K, {
|
|
150
|
+
selectedUserIds: N,
|
|
151
|
+
disabled: gt || !b.canWrite,
|
|
152
|
+
fallbackTooltip: Ie.teamMemberAccessTooltip,
|
|
153
|
+
onUserToggle: mt
|
|
154
154
|
});
|
|
155
155
|
return {
|
|
156
|
-
"data-testid":
|
|
157
|
-
selectedAccountId:
|
|
158
|
-
bankDisplayName:
|
|
159
|
-
bankLogoSrc:
|
|
160
|
-
bankLogoAlt:
|
|
161
|
-
availableBalanceLabel:
|
|
162
|
-
shouldDisplayAvailableBalance:
|
|
163
|
-
isBankingTaglineVisible:
|
|
164
|
-
accountCards:
|
|
156
|
+
"data-testid": Fe,
|
|
157
|
+
selectedAccountId: qe,
|
|
158
|
+
bankDisplayName: Y,
|
|
159
|
+
bankLogoSrc: Oe,
|
|
160
|
+
bankLogoAlt: Ae,
|
|
161
|
+
availableBalanceLabel: lt,
|
|
162
|
+
shouldDisplayAvailableBalance: ut,
|
|
163
|
+
isBankingTaglineVisible: a,
|
|
164
|
+
accountCards: dt,
|
|
165
165
|
shouldDisplayAddAccountCard: b.canWrite,
|
|
166
|
-
isLoading: !v && (_ && !
|
|
167
|
-
isError: v || D &&
|
|
168
|
-
|
|
166
|
+
isLoading: !v && (Ke || _ && !z.data || Re && !m || D && (z.isLoading || z.isFetchingNextPage || z.hasNextPage)),
|
|
167
|
+
isError: v || D && z.isError,
|
|
168
|
+
isAccessRestricted: E,
|
|
169
|
+
onRetry: v ? ze : () => void z.refetch(),
|
|
169
170
|
isCreateOpen: k,
|
|
170
171
|
createForm: j,
|
|
171
172
|
legalCopy: {
|
|
172
|
-
bankName:
|
|
173
|
-
vspName:
|
|
174
|
-
agreementUrl:
|
|
173
|
+
bankName: Y,
|
|
174
|
+
vspName: st,
|
|
175
|
+
agreementUrl: ct
|
|
175
176
|
},
|
|
176
|
-
accessRows:
|
|
177
|
-
isTeamMembersLoading:
|
|
178
|
-
isTeamMembersError:
|
|
179
|
-
isCreateError:
|
|
180
|
-
hasNicknameError:
|
|
181
|
-
hasTeamAccessError:
|
|
182
|
-
isSubmitting:
|
|
183
|
-
isAuthPending:
|
|
184
|
-
isCreateDisabled: !
|
|
185
|
-
onCreateOpenChange:
|
|
177
|
+
accessRows: bt,
|
|
178
|
+
isTeamMembersLoading: q,
|
|
179
|
+
isTeamMembersError: rt,
|
|
180
|
+
isCreateError: B.isError || V.isError,
|
|
181
|
+
hasNicknameError: Je,
|
|
182
|
+
hasTeamAccessError: Ye,
|
|
183
|
+
isSubmitting: gt,
|
|
184
|
+
isAuthPending: _t,
|
|
185
|
+
isCreateDisabled: !X,
|
|
186
|
+
onCreateOpenChange: ht,
|
|
186
187
|
onCreateFormChange: (e) => {
|
|
187
|
-
|
|
188
|
+
F(!1), M(e);
|
|
188
189
|
},
|
|
189
|
-
onCreateSubmit:
|
|
190
|
-
onTeamMembersRetry:
|
|
191
|
-
onAddAccountClick: () =>
|
|
190
|
+
onCreateSubmit: pt,
|
|
191
|
+
onTeamMembersRetry: at,
|
|
192
|
+
onAddAccountClick: () => ht(!0),
|
|
192
193
|
onSelectAccount: O
|
|
193
194
|
};
|
|
194
195
|
}
|
|
195
|
-
function
|
|
196
|
+
function ke(e, t, n) {
|
|
196
197
|
return {
|
|
197
198
|
id: e.id,
|
|
198
199
|
name: e.nickname?.trim() || t.accountFallback,
|
|
199
200
|
balanceLabel: a(e.balance),
|
|
200
201
|
accountNumberLabel: e.accountNumber,
|
|
201
|
-
|
|
202
|
+
accountNumberLast4: ae(e.accountNumber),
|
|
202
203
|
routingNumberLabel: e.routingNumber,
|
|
203
204
|
...n
|
|
204
205
|
};
|
|
205
206
|
}
|
|
206
|
-
export {
|
|
207
|
+
export { Oe as useBankAccountsWidget };
|