@tesouro/embedded-components-react 0.11.140 → 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.
Files changed (148) hide show
  1. package/NOTICE +24 -0
  2. package/README.md +15 -37
  3. package/dist/experimental/BalanceHistoryWidget.d.ts +0 -11
  4. package/dist/experimental/QuickViewWidget.d.ts +0 -11
  5. package/dist/experimental/RemoteCheckCapture.d.ts +0 -11
  6. package/dist/experimental/index.d.ts +0 -11
  7. package/dist/fixtures/index.d.ts +27 -1
  8. package/dist/index.css +6976 -6246
  9. package/dist/index.d.ts +64 -173
  10. package/dist/index.js +9 -10
  11. package/dist/lib/AcceptDisclosuresWidget.d.ts +0 -11
  12. package/dist/lib/BalancesWidget.d.ts +0 -11
  13. package/dist/lib/BankAccountOnboardingWidget.d.ts +0 -11
  14. package/dist/lib/BankAccountsWidget.d.ts +2 -11
  15. package/dist/lib/BankingComplianceBannerWidget.d.ts +0 -11
  16. package/dist/lib/BillPayWidget.d.ts +0 -11
  17. package/dist/lib/CardDetailsWidget.d.ts +0 -11
  18. package/dist/lib/CounterpartsWidget.d.ts +1 -12
  19. package/dist/lib/CounterpartsWidgetPublic.d.ts +1 -12
  20. package/dist/lib/CreditCardsWidget.d.ts +0 -11
  21. package/dist/lib/DebitCardsWidget.d.ts +0 -11
  22. package/dist/lib/ExpenseManagementWidget.d.ts +1 -12
  23. package/dist/lib/InsightsWidget.d.ts +0 -11
  24. package/dist/lib/LinkedAccountsWidget.d.ts +0 -11
  25. package/dist/lib/OfferWidget.d.ts +0 -11
  26. package/dist/lib/ReceivablesWidget.d.ts +60 -17
  27. package/dist/lib/ReceivablesWidget.js +3 -2
  28. package/dist/lib/SettingsWidget.d.ts +0 -11
  29. package/dist/lib/TransfersWidget.d.ts +0 -11
  30. package/dist/lib/WidgetProvider.d.ts +0 -11
  31. package/dist/lib/WidgetProviderPublic.d.ts +0 -11
  32. package/dist/lib/WidgetSuite.d.ts +60 -15
  33. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +20 -19
  35. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index10.js +8 -8
  36. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index4.js +2 -3
  37. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index10.js +83 -82
  38. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js +84 -79
  39. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +2 -1
  40. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +2 -3
  41. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +4 -4
  42. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +51 -46
  43. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +2 -1
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +1 -1
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +1 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +1 -1
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +1 -1
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +1 -1
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +1 -1
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +1 -1
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useActivateCard.js +1 -1
  56. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useCardLock.js +1 -1
  57. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useEditCardNickname.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsActions.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index7.js +1 -1
  61. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +10 -9
  62. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsFeature.js +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index2.js +1 -1
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +2 -2
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +66 -74
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +351 -318
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +126 -133
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +63 -56
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilter.js +78 -72
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilterLabels.js +2 -1
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +14 -1
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +138 -129
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +119 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js +37 -28
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +1 -2
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useInvoicesFilter.js +131 -81
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useLocalDayStart.js +15 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +46 -46
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +1 -1
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +13 -13
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +1 -1
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +440 -438
  84. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +7 -7
  85. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentTerms.js +1 -1
  86. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +62 -56
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +47 -16
  89. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +78 -86
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +180 -158
  91. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useRecurringSeriesTable.js +132 -0
  92. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/invoicing.js +4 -0
  93. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/receivables.js +153 -137
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -19
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +6 -4
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +1 -1
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -3
  98. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +137 -129
  99. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +21 -46
  100. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +143 -0
  101. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +2 -0
  102. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +47 -0
  103. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +25 -25
  104. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +1 -1
  105. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductDelete.js +1 -1
  106. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/mocks/products.js +3 -11
  107. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/scenarios.js +1 -1
  108. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index2.js +36 -77
  109. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/summarizeCardSpend.js +11 -13
  110. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/useCardSpendSummary.js +20 -17
  111. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/useRemoteCheckCaptureWidget.js +1 -1
  112. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +1 -1
  113. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +7 -0
  114. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -1
  115. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +1 -1
  116. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index8.js +4 -9
  117. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +1 -1
  118. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +2 -3
  119. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
  120. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +1 -1
  121. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +2 -2
  122. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +1 -1
  123. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +1 -1
  124. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +43 -43
  125. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +233 -211
  126. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -42
  127. package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +1 -1
  128. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/feature/dist/lib/ExpenseRequirementsWidget.js +5 -4
  129. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  130. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +1 -1
  131. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/toasts.js +1 -1
  132. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +28 -28
  133. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmbeddedToaster.js +33 -32
  134. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +9 -8
  135. package/dist/node_modules/sonner/dist/index.js +620 -0
  136. package/dist/packages/shared-ui-shadcn/dist/index.js +6072 -6062
  137. package/dist/scenarios/index.d.ts +1 -3
  138. package/dist/scenarios/index.js +17 -20
  139. package/package.json +17 -4
  140. package/dist/lib/CustomersWidget.d.ts +0 -993
  141. package/dist/lib/CustomersWidget.js +0 -2
  142. package/dist/lib/ProductsWidget.d.ts +0 -893
  143. package/dist/lib/ProductsWidget.js +0 -2
  144. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index.js +0 -1
  145. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js +0 -41
  146. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/analytics/events.js +0 -3
  147. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/scenarios.js +0 -2
  148. 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 { Button as e, Separator as t, toast as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
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 t = me(J, U, k.bankName?.trim() || O.fallbackBankName, O.applicationStatus), n = /* @__PURE__ */ C(le, {
292
- ...t,
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(e, {
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 })), n.success(O.applicationSavedToast);
445
+ pr({ evenWithoutMarker: !0 }), A >= T.business && (fr({ evenWithoutMarker: !0 }), mr({ evenWithoutMarker: !0 })), e.success(O.applicationSavedToast);
445
446
  } catch {
446
- n.error(O.genericRetryError);
447
+ e.error(O.genericRetryError);
447
448
  } finally {
448
449
  nn(!1);
449
450
  }
450
451
  }, br = async () => {
451
- let e = tt(P, L), t = {
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: e,
459
+ businessOwners: t,
459
460
  savedBusinessDetails: I.business,
460
461
  savedOwners: I.owners,
461
- dirty: t
462
+ dirty: n
462
463
  });
463
464
  Pt(!0);
464
465
  try {
465
466
  if (!r) {
466
467
  if (!ur) {
467
- n.success(O.applicationSavedToast);
468
+ e.success(O.applicationSavedToast);
468
469
  return;
469
470
  }
470
- n.error(O.saveDraftNothingValidError);
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(e), n.success(O.applicationSavedToast);
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 && e.length > 0 && hr(), Ht((e) => ({
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, n) => ke({
488
+ Et({ next: (e, t) => ke({
488
489
  current: e,
489
- saved: n,
490
- dirty: t,
490
+ saved: t,
491
+ dirty: n,
491
492
  ownersWrite: a
492
493
  }) }), Ot(null), At((e) => e + 1);
493
494
  } catch {
494
- n.error(O.genericRetryError);
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
- n.error(O.deleteFailedError);
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(t, {}), /* @__PURE__ */ C(Ee, {
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 "../../../../../../packages/shared-ui-shadcn/dist/index.js";
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 { copyTextToClipboard as le, formatAmountLabel as l, formatSignedTransactionAmountLabel as ue, formatStatementPeriodLabel as de, formatTransactionDateLabel as fe, maskAccountNumber as pe } from "./index4.js";
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: fe(e.date),
100
- amountLabel: ue(e.amount, e.direction),
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 = de(e.statementDate);
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 le(t) && (qe(e), window.setTimeout(() => qe((t) => t === e ? void 0 : t), 2e3));
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
- maskedAccountNumberLabel: pe(Y?.accountNumber ?? ""),
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
- let t = e.trim();
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, s as maskAccountNumber };
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 { DEFAULT_LABELS as ne } from "./index9.js";
7
- import { AccountDetailsPanel as re } from "./index4.js";
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 { StatementsPanel as d } from "./index7.js";
14
- import { TransactionsTable as f } from "./index8.js";
15
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
16
- import { ChevronLeftIcon as g, InfoIcon as _ } from "lucide-react";
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 v({ labels: v, title: y, bankDisplayName: b, bankLogoSrc: x, bankLogoAlt: S, balanceLabel: C, balanceTestId: w, isBankingTaglineVisible: T, activeTab: E, transactionRows: D, isTransactionsError: O, isTransactionsLoading: k, onTransactionsRetry: A, transactionsPagination: j, statementRows: M, isStatementsLoading: N, isStatementsError: P, onStatementsRetry: F, statementsPagination: I, showExport: L, isExportOpen: R, exportStartDate: z, exportEndDate: B, isExportDownloading: V, hasExportRangeError: H, disabledExportStartDates: U, disabledExportEndDates: W, accountNumberLabel: G, maskedAccountNumberLabel: K, accountNumberTestId: ce, routingNumberLabel: le, bankAddressLabel: ue, wireAccountNumberLabel: de, domesticWireIntroLabel: fe, domesticWireNoteLabel: pe, thingsToKnowBodyLabel: me, supportTeamHref: he, isAccountNumberVisible: q, 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 }) {
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
- ...ne,
21
- ...v
20
+ ...ie,
21
+ ...y
22
22
  };
23
- return /* @__PURE__ */ h("section", {
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__ */ h(p, { children: [/* @__PURE__ */ m(ae, {
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__ */ m(oe, {
37
+ }), /* @__PURE__ */ h(d, {
38
38
  labels: $,
39
- open: R,
40
- startDate: z,
41
- endDate: B,
42
- isDownloading: V,
39
+ open: z,
40
+ startDate: B,
41
+ endDate: V,
42
+ isDownloading: H,
43
43
  isAuthPending: X,
44
- hasRangeError: H,
45
- disabledStartDates: U,
46
- disabledEndDates: W,
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__ */ h("div", {
52
+ /* @__PURE__ */ g("div", {
53
53
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
54
- children: [/* @__PURE__ */ h(e, {
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__ */ m(g, {}), $.backToAccounts]
61
- }), !J && !Y ? /* @__PURE__ */ m(ie, {
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__ */ m(se, {
67
+ Y ? /* @__PURE__ */ h(ne, {
68
68
  title: $.errorTitle,
69
69
  retryLabel: $.retryButton,
70
70
  onRetry: ve
71
- }) : J ? /* @__PURE__ */ h(u, {
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__ */ m(n, { className: "ttw:h-10 ttw:w-64" }), /* @__PURE__ */ m(n, { className: "ttw:h-64 ttw:w-full ttw:rounded-lg" })]
76
- }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
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__ */ h("div", {
78
+ children: [/* @__PURE__ */ g("div", {
79
79
  className: "ttw:flex ttw:flex-col ttw:gap-1",
80
- children: [/* @__PURE__ */ m(t, {
80
+ children: [/* @__PURE__ */ h(t, {
81
81
  variant: "page",
82
82
  level: 2,
83
- children: y
84
- }), T && b ? /* @__PURE__ */ h("div", {
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__ */ m("span", { children: $.bankingTaglinePrefix }), x ? /* @__PURE__ */ m("img", {
87
- src: x,
88
- alt: S ?? b,
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__ */ m("span", { children: b })]
90
+ }) : /* @__PURE__ */ h("span", { children: x })]
91
91
  }) : null]
92
- }), /* @__PURE__ */ h("div", {
92
+ }), /* @__PURE__ */ g("div", {
93
93
  className: "ttw:flex ttw:flex-col ttw:gap-1",
94
- children: [/* @__PURE__ */ h("div", {
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__ */ m("span", { children: $.availableBalanceLabel }), /* @__PURE__ */ m(l, { children: /* @__PURE__ */ h(s, { children: [/* @__PURE__ */ m(te, {
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__ */ m(_, { className: "ttw:size-4" })
101
- }), /* @__PURE__ */ m(c, {
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__ */ m(ee, {
106
- "data-testid": w,
107
- children: C
105
+ }), /* @__PURE__ */ h(ee, {
106
+ "data-testid": T,
107
+ children: w
108
108
  })]
109
109
  })]
110
- }), /* @__PURE__ */ h(r, {
111
- value: E,
110
+ }), /* @__PURE__ */ g(r, {
111
+ value: D,
112
112
  onValueChange: (e) => Ee(e),
113
113
  className: "ttw:gap-4",
114
114
  children: [
115
- /* @__PURE__ */ h(a, { children: [
116
- /* @__PURE__ */ m(o, {
115
+ /* @__PURE__ */ g(a, { children: [
116
+ /* @__PURE__ */ h(o, {
117
117
  value: "transactions",
118
118
  children: $.transactionsTab
119
119
  }),
120
- /* @__PURE__ */ m(o, {
120
+ /* @__PURE__ */ h(o, {
121
121
  value: "statements",
122
122
  children: $.statementsTab
123
123
  }),
124
- /* @__PURE__ */ m(o, {
124
+ /* @__PURE__ */ h(o, {
125
125
  value: "details",
126
126
  children: $.detailsTab
127
127
  })
128
128
  ] }),
129
- /* @__PURE__ */ m(i, {
129
+ /* @__PURE__ */ h(i, {
130
130
  value: "transactions",
131
- children: /* @__PURE__ */ m(f, {
131
+ children: /* @__PURE__ */ h(p, {
132
132
  labels: $,
133
- rows: D,
134
- isLoading: k,
135
- showExport: L,
133
+ rows: O,
134
+ isLoading: A,
135
+ showExport: R,
136
136
  onExportClick: () => Q(!0),
137
- pagination: j,
138
- isError: O,
139
- onRetry: A
137
+ pagination: M,
138
+ isError: k,
139
+ onRetry: j
140
140
  })
141
141
  }),
142
- /* @__PURE__ */ m(i, {
142
+ /* @__PURE__ */ h(i, {
143
143
  value: "statements",
144
- children: /* @__PURE__ */ m(d, {
144
+ children: /* @__PURE__ */ h(f, {
145
145
  labels: $,
146
- rows: M,
147
- isLoading: N,
148
- isError: P,
149
- onRetry: F,
150
- pagination: I
146
+ rows: N,
147
+ isLoading: P,
148
+ isError: F,
149
+ onRetry: I,
150
+ pagination: L
151
151
  })
152
152
  }),
153
- /* @__PURE__ */ m(i, {
153
+ /* @__PURE__ */ h(i, {
154
154
  value: "details",
155
- children: /* @__PURE__ */ m(re, {
155
+ children: /* @__PURE__ */ h(ae, {
156
156
  labels: $,
157
- routingNumberLabel: le,
158
- accountNumberDisplayLabel: q ? G : K,
159
- accountNumberTestId: ce,
160
- wireAccountNumberLabel: de,
161
- bankNameLabel: b,
162
- bankAddressLabel: ue,
163
- domesticWireIntroLabel: fe,
164
- domesticWireNoteLabel: pe,
165
- thingsToKnowBodyLabel: me,
166
- supportTeamHref: he,
167
- isAccountNumberVisible: q,
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 { v as AccountDetailsWidgetUi };
181
+ export { y as AccountDetailsWidgetUi };