@tesouro/embedded-components-react 0.11.141 → 0.11.167
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 +64 -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 +2 -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 +0 -11
- package/dist/lib/DebitCardsWidget.d.ts +0 -11
- package/dist/lib/ExpenseManagementWidget.d.ts +1 -12
- package/dist/lib/InsightsWidget.d.ts +0 -11
- package/dist/lib/LinkedAccountsWidget.d.ts +0 -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 +60 -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/formatters.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +4 -4
- 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/labels.js +2 -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/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 +1 -1
- 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
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { toast as e } from "../../../../../../../node_modules/sonner/dist/index.js";
|
|
6
|
+
import { Button as t, Separator as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
7
|
import { getStateOptions as r } from "../../../../../shared/util/dist/lib/usStates.js";
|
|
7
8
|
import "../../../../../shared/util/dist/index.js";
|
|
8
9
|
import { useEmbedApi as i } from "../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
@@ -288,15 +289,15 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
288
289
|
if (In && !J || Kn || !K) return null;
|
|
289
290
|
if (J) {
|
|
290
291
|
if (yn) return null;
|
|
291
|
-
let
|
|
292
|
-
...
|
|
292
|
+
let e = me(J, U, k.bankName?.trim() || O.fallbackBankName, O.applicationStatus), n = /* @__PURE__ */ C(le, {
|
|
293
|
+
...e,
|
|
293
294
|
className: "ttw:max-w-2xl",
|
|
294
295
|
focusTitleOnMount: E,
|
|
295
296
|
testIds: {
|
|
296
297
|
root: h.statusCard,
|
|
297
298
|
chip: h.statusCardChip
|
|
298
299
|
},
|
|
299
|
-
action: pt ? /* @__PURE__ */ C(
|
|
300
|
+
action: pt ? /* @__PURE__ */ C(t, {
|
|
300
301
|
variant: "outline",
|
|
301
302
|
onClick: Y ? () => Un("requested") : vn.refetch,
|
|
302
303
|
"data-testid": h.statusCardCheckAgain,
|
|
@@ -441,57 +442,57 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
441
442
|
B(null), nn(!0);
|
|
442
443
|
try {
|
|
443
444
|
if (await _r() === null) return;
|
|
444
|
-
pr({ evenWithoutMarker: !0 }), A >= T.business && (fr({ evenWithoutMarker: !0 }), mr({ evenWithoutMarker: !0 })),
|
|
445
|
+
pr({ evenWithoutMarker: !0 }), A >= T.business && (fr({ evenWithoutMarker: !0 }), mr({ evenWithoutMarker: !0 })), e.success(O.applicationSavedToast);
|
|
445
446
|
} catch {
|
|
446
|
-
|
|
447
|
+
e.error(O.genericRetryError);
|
|
447
448
|
} finally {
|
|
448
449
|
nn(!1);
|
|
449
450
|
}
|
|
450
451
|
}, br = async () => {
|
|
451
|
-
let
|
|
452
|
+
let t = tt(P, L), n = {
|
|
452
453
|
...$,
|
|
453
454
|
business: $.business || z !== null && !Vt.business,
|
|
454
455
|
owners: $.owners || z !== null && !Vt.owners
|
|
455
456
|
}, r = je({
|
|
456
457
|
businessDetails: M,
|
|
457
458
|
applicant: N,
|
|
458
|
-
businessOwners:
|
|
459
|
+
businessOwners: t,
|
|
459
460
|
savedBusinessDetails: I.business,
|
|
460
461
|
savedOwners: I.owners,
|
|
461
|
-
dirty:
|
|
462
|
+
dirty: n
|
|
462
463
|
});
|
|
463
464
|
Pt(!0);
|
|
464
465
|
try {
|
|
465
466
|
if (!r) {
|
|
466
467
|
if (!ur) {
|
|
467
|
-
|
|
468
|
+
e.success(O.applicationSavedToast);
|
|
468
469
|
return;
|
|
469
470
|
}
|
|
470
|
-
|
|
471
|
+
e.error(O.saveDraftNothingValidError);
|
|
471
472
|
return;
|
|
472
473
|
}
|
|
473
474
|
z ? await V.mutateAsync({
|
|
474
475
|
path: { id: z },
|
|
475
476
|
body: r
|
|
476
|
-
}) : await gr(Ae(r)), L && F(
|
|
477
|
+
}) : await gr(Ae(r)), L && F(t), e.success(O.applicationSavedToast);
|
|
477
478
|
let i = r;
|
|
478
479
|
Gt({
|
|
479
480
|
taxId: i.businessDetails?.taxId?.value,
|
|
480
481
|
taxIdStructure: M.companyStructure,
|
|
481
482
|
ssn: i.applicant?.personalIdentificationNumber?.value
|
|
482
|
-
}), i.businessDetails?.taxId !== void 0 && fr({ evenWithoutMarker: !0 }), i.applicant?.personalIdentificationNumber !== void 0 && pr({ evenWithoutMarker: !0 }), Array.isArray(i.businessOwners) && mr({ evenWithoutMarker: !0 }), i.businessOwners === null &&
|
|
483
|
+
}), i.businessDetails?.taxId !== void 0 && fr({ evenWithoutMarker: !0 }), i.applicant?.personalIdentificationNumber !== void 0 && pr({ evenWithoutMarker: !0 }), Array.isArray(i.businessOwners) && mr({ evenWithoutMarker: !0 }), i.businessOwners === null && t.length > 0 && hr(), Ht((e) => ({
|
|
483
484
|
business: e.business || i.businessDetails !== void 0,
|
|
484
485
|
owners: e.owners || i.businessOwners !== void 0
|
|
485
486
|
}));
|
|
486
487
|
let a = Array.isArray(i.businessOwners) ? "list" : i.businessOwners === null ? "cleared" : "none";
|
|
487
|
-
Et({ next: (e,
|
|
488
|
+
Et({ next: (e, t) => ke({
|
|
488
489
|
current: e,
|
|
489
|
-
saved:
|
|
490
|
-
dirty:
|
|
490
|
+
saved: t,
|
|
491
|
+
dirty: n,
|
|
491
492
|
ownersWrite: a
|
|
492
493
|
}) }), Ot(null), At((e) => e + 1);
|
|
493
494
|
} catch {
|
|
494
|
-
|
|
495
|
+
e.error(O.genericRetryError);
|
|
495
496
|
} finally {
|
|
496
497
|
Pt(!1);
|
|
497
498
|
}
|
|
@@ -499,7 +500,7 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
499
500
|
if (z !== null) try {
|
|
500
501
|
await fn.mutateAsync({ path: { id: z } });
|
|
501
502
|
} catch {
|
|
502
|
-
|
|
503
|
+
e.error(O.deleteFailedError);
|
|
503
504
|
return;
|
|
504
505
|
}
|
|
505
506
|
an(!1), ct?.();
|
|
@@ -600,7 +601,7 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
600
601
|
isSubmitting: Q,
|
|
601
602
|
showAllErrors: Or,
|
|
602
603
|
labels: O.businessDetails
|
|
603
|
-
}, "business"), er ? /* @__PURE__ */ w(qe, { children: [/* @__PURE__ */ C(
|
|
604
|
+
}, "business"), er ? /* @__PURE__ */ w(qe, { children: [/* @__PURE__ */ C(n, {}), /* @__PURE__ */ C(Ee, {
|
|
604
605
|
owners: Pr,
|
|
605
606
|
onOwnersChange: F,
|
|
606
607
|
primaryOwnerName: jr,
|
|
@@ -2,13 +2,13 @@
|
|
|
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 { isOrganizationOnItsWay as t } from "../../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
7
7
|
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import { isApiUnprocessableError as r } from "../../../../shared/data-access/dist/lib/isApiUnprocessableError.js";
|
|
9
9
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { DEFAULT_LABELS as i } from "../../ui/dist/index9.js";
|
|
11
10
|
import "../../../../shared/ui/dist/index.js";
|
|
11
|
+
import { DEFAULT_LABELS as i } from "../../ui/dist/index9.js";
|
|
12
12
|
import { AccountDetailsWidgetUi as a } from "../../ui/dist/index10.js";
|
|
13
13
|
import "../../ui/dist/index.js";
|
|
14
14
|
import { useAnalyticsTrack as ee } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
@@ -16,7 +16,7 @@ import { useRefetchWidget as te, useWidgetConfig as ne, useWidgetError as re, us
|
|
|
16
16
|
import "../../../../shared/feature/dist/index.js";
|
|
17
17
|
import { AccountDetailsWidgetAnalyticsEvent as o } from "./index2.js";
|
|
18
18
|
import { formatDateParam as ae, getDefaultExportDateRange as oe, isExportRangeValid as se, startOfLocalDay as s, triggerCsvDownload as ce, yesterdayLocal as c } from "./index3.js";
|
|
19
|
-
import {
|
|
19
|
+
import { accountNumberLast4 as le, copyTextToClipboard as ue, formatAmountLabel as l, formatSignedTransactionAmountLabel as de, formatStatementPeriodLabel as fe, formatTransactionDateLabel as pe } from "./index4.js";
|
|
20
20
|
import { DEFAULT_FEATURE_LABELS as me } from "./index5.js";
|
|
21
21
|
import { getBankAccountsPermissions as he } from "./index6.js";
|
|
22
22
|
import { getStatementsStartDate as ge } from "./index7.js";
|
|
@@ -96,8 +96,8 @@ function v({ accountId: d, onBack: h, labels: v, featureLabels: Ae, isBankingTag
|
|
|
96
96
|
}), et = Ce(), tt = xe(), nt = Se(), { mutate: rt, isPending: it, isError: G, reset: K } = et, { mutateAsync: q, isPending: at } = tt, { mutateAsync: J } = nt, Y = D ? H.data : void 0, X = S?.bankName?.trim() ?? "", ot = Pe?.trim() || void 0, Z = { bankName: X }, st = p(() => u(y.domesticWireIntro, Z), [y.domesticWireIntro, X]), ct = p(() => u(y.domesticWireNote, Z), [y.domesticWireNote, X]), lt = p(() => u(y.thingsToKnowBody, Z), [y.thingsToKnowBody, X]), ut = Y?.nickname?.trim() || b.accountFallback, dt = l(Y?.balance), Q = p(() => (U.data?.data ?? []).map((e, t) => ({
|
|
97
97
|
key: `${e.date}-${t}`,
|
|
98
98
|
descriptionLabel: e.description,
|
|
99
|
-
dateLabel:
|
|
100
|
-
amountLabel:
|
|
99
|
+
dateLabel: pe(e.date),
|
|
100
|
+
amountLabel: de(e.amount, e.direction),
|
|
101
101
|
balanceLabel: l(e.runningBalance)
|
|
102
102
|
})), [U.data?.data]), ft = E.canRead && Q.length > 0, pt = f((t) => {
|
|
103
103
|
if (!T || !E.canRead) return;
|
|
@@ -124,7 +124,7 @@ function v({ accountId: d, onBack: h, labels: v, featureLabels: Ae, isBankingTag
|
|
|
124
124
|
E.canRead,
|
|
125
125
|
J
|
|
126
126
|
]), mt = p(() => (W.data?.data ?? []).map((e) => {
|
|
127
|
-
let t =
|
|
127
|
+
let t = fe(e.statementDate);
|
|
128
128
|
return {
|
|
129
129
|
key: e.statementId,
|
|
130
130
|
label: t,
|
|
@@ -198,7 +198,7 @@ function v({ accountId: d, onBack: h, labels: v, featureLabels: Ae, isBankingTag
|
|
|
198
198
|
T,
|
|
199
199
|
E.canRead
|
|
200
200
|
]), Mt = f(async (e, t) => {
|
|
201
|
-
await
|
|
201
|
+
await ue(t) && (qe(e), window.setTimeout(() => qe((t) => t === e ? void 0 : t), 2e3));
|
|
202
202
|
}, []), Nt = (e) => {
|
|
203
203
|
e && (Ue({ nickname: Y?.nickname?.trim() ?? "" }), L(!1), K()), A(e);
|
|
204
204
|
}, Pt = (e) => {
|
|
@@ -242,7 +242,7 @@ function v({ accountId: d, onBack: h, labels: v, featureLabels: Ae, isBankingTag
|
|
|
242
242
|
disabledExportStartDates: Ot,
|
|
243
243
|
disabledExportEndDates: kt,
|
|
244
244
|
accountNumberLabel: Y?.accountNumber ?? "",
|
|
245
|
-
|
|
245
|
+
accountNumberLast4: le(Y?.accountNumber ?? ""),
|
|
246
246
|
accountNumberTestId: "bank-accounts-widget-detail-account-number",
|
|
247
247
|
wireAccountNumberLabel: Y?.accountNumber ?? "",
|
|
248
248
|
routingNumberLabel: Y?.routingNumber ?? "",
|
|
@@ -33,8 +33,7 @@ function o(t, n, r = "—") {
|
|
|
33
33
|
return n === "CREDIT" ? `+${a}` : `-${a}`;
|
|
34
34
|
}
|
|
35
35
|
function s(e) {
|
|
36
|
-
|
|
37
|
-
return t ? `••••••••${t.slice(-4)}` : "";
|
|
36
|
+
return e.trim().slice(-4);
|
|
38
37
|
}
|
|
39
38
|
async function c(e) {
|
|
40
39
|
if (!e.trim()) return !1;
|
|
@@ -44,4 +43,4 @@ async function c(e) {
|
|
|
44
43
|
return !1;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
export { c as copyTextToClipboard, a as formatAmountLabel, o as formatSignedTransactionAmountLabel, i as formatStatementPeriodLabel, r as formatTransactionDateLabel
|
|
46
|
+
export { s as accountNumberLast4, c as copyTextToClipboard, a as formatAmountLabel, o as formatSignedTransactionAmountLabel, i as formatStatementPeriodLabel, r as formatTransactionDateLabel };
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Button as e, DisplayAmount as ee, Heading as t, Skeleton as n, Tabs as r, TabsContent as i, TabsList as a, TabsTrigger as o, Tooltip as s, TooltipContent as c, TooltipProvider as l, TooltipTrigger as te } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { AccountActionsMenu as ie, EditAccountDialog as ae } from "./index5.js";
|
|
9
|
-
import { ExportTransactionsDialog as oe } from "./index6.js";
|
|
10
|
-
import { ErrorState as se } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
11
|
-
import { LoadingRegion as u } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
6
|
+
import { ErrorState as ne } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
|
+
import { LoadingRegion as re } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
12
8
|
import "../../../../shared/ui/dist/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
9
|
+
import { DEFAULT_LABELS as ie } from "./index9.js";
|
|
10
|
+
import { AccountDetailsPanel as ae } from "./index4.js";
|
|
11
|
+
import { AccountActionsMenu as oe, EditAccountDialog as u } from "./index5.js";
|
|
12
|
+
import { ExportTransactionsDialog as d } from "./index6.js";
|
|
13
|
+
import { StatementsPanel as f } from "./index7.js";
|
|
14
|
+
import { TransactionsTable as p } from "./index8.js";
|
|
15
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
16
|
+
import { ChevronLeftIcon as _, InfoIcon as v } from "lucide-react";
|
|
17
17
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index10.js
|
|
18
|
-
function
|
|
18
|
+
function y({ labels: y, title: b, bankDisplayName: x, bankLogoSrc: S, bankLogoAlt: C, balanceLabel: w, balanceTestId: T, isBankingTaglineVisible: E, activeTab: D, transactionRows: O, isTransactionsError: k, isTransactionsLoading: A, onTransactionsRetry: j, transactionsPagination: M, statementRows: N, isStatementsLoading: P, isStatementsError: F, onStatementsRetry: I, statementsPagination: L, showExport: R, isExportOpen: z, exportStartDate: B, exportEndDate: V, isExportDownloading: H, hasExportRangeError: U, disabledExportStartDates: W, disabledExportEndDates: G, accountNumberLabel: K, accountNumberLast4: q, accountNumberTestId: se, routingNumberLabel: ce, bankAddressLabel: le, wireAccountNumberLabel: ue, domesticWireIntroLabel: de, domesticWireNoteLabel: fe, thingsToKnowBodyLabel: pe, supportTeamHref: me, isAccountNumberVisible: he, copiedField: ge, isDomesticWireExpanded: _e, isLoading: J, isError: Y, onRetry: ve, isEditOpen: ye, isEditError: be, hasEditNicknameError: xe, isSubmitting: Se, isAuthPending: X = !1, editForm: Ce, canEdit: we, onBack: Te, onTabChange: Ee, onToggleAccountNumberVisibility: De, onCopy: Oe, onDomesticWireExpandedChange: ke, onEditOpenChange: Z, onEditFormChange: Ae, onEditSubmit: je, onEditNicknameClick: Me, onExportOpenChange: Q, onExportStartDateChange: Ne, onExportEndDateChange: Pe, onExportDownload: Fe }) {
|
|
19
19
|
let $ = {
|
|
20
|
-
...
|
|
21
|
-
...
|
|
20
|
+
...ie,
|
|
21
|
+
...y
|
|
22
22
|
};
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ g("section", {
|
|
24
24
|
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
|
|
25
25
|
children: [
|
|
26
|
-
!J && !Y ? /* @__PURE__ */
|
|
26
|
+
!J && !Y ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(u, {
|
|
27
27
|
labels: $,
|
|
28
28
|
open: ye,
|
|
29
29
|
form: Ce,
|
|
@@ -34,137 +34,138 @@ function v({ labels: v, title: y, bankDisplayName: b, bankLogoSrc: x, bankLogoAl
|
|
|
34
34
|
onOpenChange: Z,
|
|
35
35
|
onFormChange: Ae,
|
|
36
36
|
onSubmit: je
|
|
37
|
-
}), /* @__PURE__ */
|
|
37
|
+
}), /* @__PURE__ */ h(d, {
|
|
38
38
|
labels: $,
|
|
39
|
-
open:
|
|
40
|
-
startDate:
|
|
41
|
-
endDate:
|
|
42
|
-
isDownloading:
|
|
39
|
+
open: z,
|
|
40
|
+
startDate: B,
|
|
41
|
+
endDate: V,
|
|
42
|
+
isDownloading: H,
|
|
43
43
|
isAuthPending: X,
|
|
44
|
-
hasRangeError:
|
|
45
|
-
disabledStartDates:
|
|
46
|
-
disabledEndDates:
|
|
44
|
+
hasRangeError: U,
|
|
45
|
+
disabledStartDates: W,
|
|
46
|
+
disabledEndDates: G,
|
|
47
47
|
onOpenChange: Q,
|
|
48
48
|
onStartDateChange: Ne,
|
|
49
49
|
onEndDateChange: Pe,
|
|
50
50
|
onDownload: Fe
|
|
51
51
|
})] }) : null,
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ g("div", {
|
|
53
53
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ g(e, {
|
|
55
55
|
type: "button",
|
|
56
56
|
variant: "ghost",
|
|
57
57
|
size: "sm",
|
|
58
58
|
className: "ttw:-ml-2",
|
|
59
59
|
onClick: Te,
|
|
60
|
-
children: [/* @__PURE__ */
|
|
61
|
-
}), !J && !Y ? /* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ h(_, {}), $.backToAccounts]
|
|
61
|
+
}), !J && !Y ? /* @__PURE__ */ h(oe, {
|
|
62
62
|
labels: $,
|
|
63
63
|
canEdit: we,
|
|
64
64
|
onEditNickname: Me
|
|
65
65
|
}) : null]
|
|
66
66
|
}),
|
|
67
|
-
Y ? /* @__PURE__ */
|
|
67
|
+
Y ? /* @__PURE__ */ h(ne, {
|
|
68
68
|
title: $.errorTitle,
|
|
69
69
|
retryLabel: $.retryButton,
|
|
70
70
|
onRetry: ve
|
|
71
|
-
}) : J ? /* @__PURE__ */
|
|
71
|
+
}) : J ? /* @__PURE__ */ g(re, {
|
|
72
72
|
isLoading: !0,
|
|
73
73
|
loadingLabel: $.loadingLabel,
|
|
74
74
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
-
}) : /* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ h(n, { className: "ttw:h-10 ttw:w-64" }), /* @__PURE__ */ h(n, { className: "ttw:h-64 ttw:w-full ttw:rounded-lg" })]
|
|
76
|
+
}) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
|
|
77
77
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ g("div", {
|
|
79
79
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ h(t, {
|
|
81
81
|
variant: "page",
|
|
82
82
|
level: 2,
|
|
83
|
-
children:
|
|
84
|
-
}),
|
|
83
|
+
children: b
|
|
84
|
+
}), E && x ? /* @__PURE__ */ g("div", {
|
|
85
85
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
87
|
-
src:
|
|
88
|
-
alt:
|
|
86
|
+
children: [/* @__PURE__ */ h("span", { children: $.bankingTaglinePrefix }), S ? /* @__PURE__ */ h("img", {
|
|
87
|
+
src: S,
|
|
88
|
+
alt: C ?? x,
|
|
89
89
|
className: "ttw:block ttw:h-auto ttw:max-w-[120px]"
|
|
90
|
-
}) : /* @__PURE__ */
|
|
90
|
+
}) : /* @__PURE__ */ h("span", { children: x })]
|
|
91
91
|
}) : null]
|
|
92
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ g("div", {
|
|
93
93
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ g("div", {
|
|
95
95
|
className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-muted-foreground",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ h("span", { children: $.availableBalanceLabel }), /* @__PURE__ */ h(l, { children: /* @__PURE__ */ g(s, { children: [/* @__PURE__ */ h(te, {
|
|
97
97
|
type: "button",
|
|
98
98
|
className: "ttw:inline-flex ttw:cursor-pointer",
|
|
99
99
|
"aria-label": $.availableBalanceTooltip,
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
}), /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ h(v, { className: "ttw:size-4" })
|
|
101
|
+
}), /* @__PURE__ */ h(c, {
|
|
102
102
|
className: "ttw:max-w-xs",
|
|
103
103
|
children: $.availableBalanceTooltip
|
|
104
104
|
})] }) })]
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
"data-testid":
|
|
107
|
-
children:
|
|
105
|
+
}), /* @__PURE__ */ h(ee, {
|
|
106
|
+
"data-testid": T,
|
|
107
|
+
children: w
|
|
108
108
|
})]
|
|
109
109
|
})]
|
|
110
|
-
}), /* @__PURE__ */
|
|
111
|
-
value:
|
|
110
|
+
}), /* @__PURE__ */ g(r, {
|
|
111
|
+
value: D,
|
|
112
112
|
onValueChange: (e) => Ee(e),
|
|
113
113
|
className: "ttw:gap-4",
|
|
114
114
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ g(a, { children: [
|
|
116
|
+
/* @__PURE__ */ h(o, {
|
|
117
117
|
value: "transactions",
|
|
118
118
|
children: $.transactionsTab
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ h(o, {
|
|
121
121
|
value: "statements",
|
|
122
122
|
children: $.statementsTab
|
|
123
123
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ h(o, {
|
|
125
125
|
value: "details",
|
|
126
126
|
children: $.detailsTab
|
|
127
127
|
})
|
|
128
128
|
] }),
|
|
129
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ h(i, {
|
|
130
130
|
value: "transactions",
|
|
131
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ h(p, {
|
|
132
132
|
labels: $,
|
|
133
|
-
rows:
|
|
134
|
-
isLoading:
|
|
135
|
-
showExport:
|
|
133
|
+
rows: O,
|
|
134
|
+
isLoading: A,
|
|
135
|
+
showExport: R,
|
|
136
136
|
onExportClick: () => Q(!0),
|
|
137
|
-
pagination:
|
|
138
|
-
isError:
|
|
139
|
-
onRetry:
|
|
137
|
+
pagination: M,
|
|
138
|
+
isError: k,
|
|
139
|
+
onRetry: j
|
|
140
140
|
})
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ h(i, {
|
|
143
143
|
value: "statements",
|
|
144
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ h(f, {
|
|
145
145
|
labels: $,
|
|
146
|
-
rows:
|
|
147
|
-
isLoading:
|
|
148
|
-
isError:
|
|
149
|
-
onRetry:
|
|
150
|
-
pagination:
|
|
146
|
+
rows: N,
|
|
147
|
+
isLoading: P,
|
|
148
|
+
isError: F,
|
|
149
|
+
onRetry: I,
|
|
150
|
+
pagination: L
|
|
151
151
|
})
|
|
152
152
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ h(i, {
|
|
154
154
|
value: "details",
|
|
155
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ h(ae, {
|
|
156
156
|
labels: $,
|
|
157
|
-
routingNumberLabel:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
157
|
+
routingNumberLabel: ce,
|
|
158
|
+
accountNumberLabel: K,
|
|
159
|
+
accountNumberLast4: q,
|
|
160
|
+
accountNumberTestId: se,
|
|
161
|
+
wireAccountNumberLabel: ue,
|
|
162
|
+
bankNameLabel: x,
|
|
163
|
+
bankAddressLabel: le,
|
|
164
|
+
domesticWireIntroLabel: de,
|
|
165
|
+
domesticWireNoteLabel: fe,
|
|
166
|
+
thingsToKnowBodyLabel: pe,
|
|
167
|
+
supportTeamHref: me,
|
|
168
|
+
isAccountNumberVisible: he,
|
|
168
169
|
copiedField: ge,
|
|
169
170
|
isDomesticWireExpanded: _e,
|
|
170
171
|
onDomesticWireExpandedChange: ke,
|
|
@@ -177,4 +178,4 @@ function v({ labels: v, title: y, bankDisplayName: b, bankLogoSrc: x, bankLogoAl
|
|
|
177
178
|
]
|
|
178
179
|
});
|
|
179
180
|
}
|
|
180
|
-
export {
|
|
181
|
+
export { y as AccountDetailsWidgetUi };
|