@tesouro/embedded-components-react 0.5.225 → 0.5.227

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 (142) hide show
  1. package/README.md +21 -21
  2. package/dist/index.d.ts +23 -2
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +23 -2
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +41 -39
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index12.js +2 -2
  8. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +150 -147
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +46 -51
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +130 -128
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +31 -32
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +2 -2
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +2 -2
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +36 -37
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index2.js +2 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +2 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index2.js +6 -10
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index3.js +2 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index4.js +2 -2
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index5.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +2 -2
  29. package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +154 -150
  31. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +2 -2
  32. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +2 -2
  33. package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +2 -2
  34. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +151 -149
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +4 -4
  36. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +4 -4
  37. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +2 -2
  38. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +2 -2
  39. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +2 -2
  40. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +2 -2
  41. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +2 -2
  42. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +2 -2
  43. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +2 -2
  44. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +2 -2
  46. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +2 -2
  47. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +2 -2
  48. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +1 -0
  49. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +89 -87
  50. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +133 -130
  51. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +36 -34
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +50 -36
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +6 -6
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +2 -2
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +40 -39
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +51 -32
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +20 -1
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +17 -202
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +220 -31
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +32 -145
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +126 -44
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +145 -117
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +46 -58
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +113 -87
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +58 -116
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +98 -225
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +111 -27
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +225 -462
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +34 -41
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +627 -34
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +39 -77
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +34 -112
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +75 -310
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +124 -0
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +324 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +20 -15
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +56 -53
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +33 -29
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +184 -162
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +1 -3
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +78 -69
  84. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +2 -2
  85. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +209 -207
  86. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +10 -5
  87. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +10 -5
  88. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +11 -6
  89. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +2 -2
  90. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +2 -2
  91. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +2 -2
  92. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +2 -2
  93. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +2 -2
  94. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +30 -28
  95. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +28 -26
  96. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +37 -34
  97. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +28 -26
  98. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +37 -34
  99. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +294 -292
  100. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +58 -58
  101. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -48
  102. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +4 -4
  103. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +2 -2
  104. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +4 -4
  105. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +7 -6
  106. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +20 -19
  107. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -39
  108. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +14 -13
  109. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/allPages.js +1 -1
  110. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +16 -15
  111. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +7 -5
  112. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +7 -5
  113. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -2
  114. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -29
  116. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js +10 -0
  117. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +26 -27
  118. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +2 -2
  119. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +210 -199
  120. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +60 -52
  121. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -32
  122. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +2 -2
  123. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
  124. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +2 -2
  125. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js +2 -2
  126. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +2 -2
  127. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -34
  128. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +33 -22
  129. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +2 -2
  130. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +43 -32
  131. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +138 -127
  132. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js +6 -0
  133. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  135. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js +2 -2
  136. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +2 -2
  137. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +2 -2
  138. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +2 -2
  139. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +2 -2
  140. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
  141. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +60 -58
  142. package/package.json +1 -1
@@ -3,99 +3,102 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { isOrganizationOnItsWay as t } from "../../../../shared/data-access/dist/lib/organizationStatus.js";
7
+ import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
+ import "../../../../shared/data-access/dist/index.js";
6
9
  import "../../../../shared/ui/dist/index.js";
7
- import { useAnalyticsTrack as t } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
8
- import { useWidgetConfig as n, useWidgetError as r, useWidgetLoading as ee } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
+ import { useAnalyticsTrack as r } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
11
+ import { useWidgetConfig as ee, useWidgetError as te, useWidgetLoading as ne } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
9
12
  import "../../../../shared/feature/dist/index.js";
10
- import { AccountDetailsWidgetAnalyticsEvent as te } from "./index2.js";
11
- import { formatDateParam as i, getDefaultExportDateRange as ne, isExportRangeValid as a, startOfLocalDay as o, triggerCsvDownload as re, yesterdayLocal as s } from "./index3.js";
12
- import { copyTextToClipboard as ie, formatAmountLabel as c, formatSignedTransactionAmountLabel as ae, formatStatementPeriodLabel as oe, formatTransactionDateLabel as se, maskAccountNumber as ce } from "./index4.js";
13
- import { DEFAULT_FEATURE_LABELS as le } from "./index5.js";
14
- import { getBankAccountsPermissions as ue } from "./index6.js";
15
- import { getStatementsStartDate as de } from "./index7.js";
13
+ import { AccountDetailsWidgetAnalyticsEvent as i } from "./index2.js";
14
+ import { formatDateParam as re, getDefaultExportDateRange as ie, isExportRangeValid as a, startOfLocalDay as o, triggerCsvDownload as ae, yesterdayLocal as s } from "./index3.js";
15
+ import { copyTextToClipboard as oe, formatAmountLabel as c, formatSignedTransactionAmountLabel as se, formatStatementPeriodLabel as ce, formatTransactionDateLabel as le, maskAccountNumber as ue } from "./index4.js";
16
+ import { DEFAULT_FEATURE_LABELS as de } from "./index5.js";
17
+ import { getBankAccountsPermissions as fe } from "./index6.js";
18
+ import { getStatementsStartDate as pe } from "./index7.js";
16
19
  import { interpolateLabel as l } from "./index8.js";
17
- import { useBankAccountDetailsQuery as fe } from "../../data-access/dist/index2.js";
18
- import { useBankAccountStatementsQuery as pe } from "../../data-access/dist/index3.js";
19
- import { useBankAccountTransactionsQuery as me } from "../../data-access/dist/index4.js";
20
- import { useDownloadBankAccountTransactionsMutation as he } from "../../data-access/dist/index5.js";
21
- import { useRetrieveBankAccountStatementMutation as ge } from "../../data-access/dist/index6.js";
22
- import { useUpdateBankAccountMutation as _e } from "../../data-access/dist/index7.js";
20
+ import { useBankAccountDetailsQuery as me } from "../../data-access/dist/index2.js";
21
+ import { useBankAccountStatementsQuery as he } from "../../data-access/dist/index3.js";
22
+ import { useBankAccountTransactionsQuery as ge } from "../../data-access/dist/index4.js";
23
+ import { useDownloadBankAccountTransactionsMutation as _e } from "../../data-access/dist/index5.js";
24
+ import { useRetrieveBankAccountStatementMutation as ve } from "../../data-access/dist/index6.js";
25
+ import { useUpdateBankAccountMutation as ye } from "../../data-access/dist/index7.js";
23
26
  import "../../data-access/dist/index.js";
24
- import { DEFAULT_LABELS as ve } from "../../ui/dist/index7.js";
25
- import { AccountDetailsWidgetUi as ye } from "../../ui/dist/index8.js";
27
+ import { DEFAULT_LABELS as be } from "../../ui/dist/index7.js";
28
+ import { AccountDetailsWidgetUi as xe } from "../../ui/dist/index8.js";
26
29
  import "../../ui/dist/index.js";
27
- import { useCallback as u, useEffect as be, useMemo as d, useState as f } from "react";
28
- import { jsx as xe } from "react/jsx-runtime";
30
+ import { useCallback as u, useEffect as Se, useMemo as d, useState as f } from "react";
31
+ import { jsx as Ce } from "react/jsx-runtime";
29
32
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js
30
- var Se = 3e3, Ce = 5e3, we = [
33
+ var we = 3e3, Te = 5e3, Ee = [
31
34
  10,
32
35
  25,
33
36
  50
34
- ], Te = 10, Ee = 6e5, De = { nickname: "" };
35
- function p({ accountId: p, onBack: Oe, labels: ke, featureLabels: Ae, isBankingTaglineVisible: je = !0, bankLogoSrc: Me, bankLogoAlt: Ne, bankAddress: Pe, supportTeamUrl: Fe }) {
37
+ ], De = 10, Oe = 6e5, ke = { nickname: "" };
38
+ function p({ accountId: p, onBack: Ae, labels: je, featureLabels: Me, isBankingTaglineVisible: Ne = !0, bankLogoSrc: Pe, bankLogoAlt: Fe, bankAddress: Ie, supportTeamUrl: Le }) {
36
39
  let m = {
37
- ...ve,
38
- ...ke
40
+ ...be,
41
+ ...je
39
42
  }, h = {
40
- ...le,
41
- ...Ae
42
- }, g = t(), { organizationId: Ie, widgetToken: Le, initResponse: _ } = n(), Re = ee(), v = !!r(), y = !!(Ie && Le), b = d(() => ue(_?.scopes), [_?.scopes]), x = b.canRead && !!_, S = y && x, C = x && !y, [w, ze] = f("transactions"), [Be, T] = f(!1), [E, D] = f(De), [Ve, He] = f(!1), [Ue, O] = f(!1), [We, k] = f(!1), [Ge, Ke] = f(!1), [qe, A] = f(!1), [j, M] = f(), [N, P] = f(), [F, Je] = f(Te), [I, L] = f(() => ({
43
+ ...de,
44
+ ...Me
45
+ }, g = r(), { organizationId: Re, widgetToken: ze, initResponse: _ } = ee(), Be = ne(), Ve = t(n().organizationStatus), v = !!te(), y = !!(Re && ze), b = d(() => fe(_?.scopes), [_?.scopes]), x = b.canRead && !!_, S = y && x, C = x && !y, [w, He] = f("transactions"), [Ue, T] = f(!1), [E, D] = f(ke), [We, Ge] = f(!1), [Ke, qe] = f(!1), [Je, Ye] = f(!1), [Xe, Ze] = f(!1), [Qe, $e] = f(!1), [O, k] = f(), [A, j] = f(), [M, et] = f(De), [N, P] = f(() => ({
43
46
  accountId: p,
44
47
  token: void 0
45
48
  }));
46
- I.accountId !== p && L({
49
+ N.accountId !== p && P({
47
50
  accountId: p,
48
51
  token: void 0
49
52
  });
50
- let Ye = I.accountId === p ? I.token : void 0, R = u((e) => {
51
- L((t) => ({
53
+ let tt = N.accountId === p ? N.token : void 0, F = u((e) => {
54
+ P((t) => ({
52
55
  ...t,
53
56
  token: e
54
57
  }));
55
- }, []), [z, B] = f(() => /* @__PURE__ */ new Set());
56
- be(() => {
57
- g(te.Mounted);
58
+ }, []), [I, L] = f(() => /* @__PURE__ */ new Set());
59
+ Se(() => {
60
+ g(i.Mounted);
58
61
  }, [g]);
59
- let V = fe({
62
+ let R = me({
60
63
  id: p,
61
64
  enabled: S
62
- }), H = me({
65
+ }), z = ge({
63
66
  id: p,
64
67
  enabled: S && w === "transactions",
65
68
  limit: 25,
66
69
  sortBy: "DATE",
67
70
  sortOrder: "DESC"
68
- }), [Xe] = f(de), U = pe({
71
+ }), [nt] = f(pe), B = he({
69
72
  id: p,
70
- startDate: Xe,
73
+ startDate: nt,
71
74
  enabled: S && w === "statements",
72
- limit: F,
73
- pagination_token: Ye,
75
+ limit: M,
76
+ pagination_token: tt,
74
77
  category: "STATEMENTS"
75
- }), Ze = _e(), Qe = he(), $e = ge(), { mutate: et, isPending: tt, isError: W, reset: G } = Ze, { mutateAsync: K, isPending: nt } = Qe, { mutateAsync: q } = $e, J = x ? V.data : void 0, Y = _?.bankName?.trim() ?? "", rt = Pe?.trim() || void 0, X = { bankName: Y }, it = d(() => l(m.domesticWireIntro, X), [m.domesticWireIntro, Y]), at = d(() => l(m.domesticWireNote, X), [m.domesticWireNote, Y]), ot = d(() => l(m.thingsToKnowBody, X), [m.thingsToKnowBody, Y]), st = J?.nickname?.trim() || h.accountFallback, ct = c(J?.balance), lt = d(() => (H.data?.data ?? []).map((e, t) => ({
78
+ }), rt = ye(), it = _e(), at = ve(), { mutate: ot, isPending: st, isError: V, reset: H } = rt, { mutateAsync: U, isPending: ct } = it, { mutateAsync: W } = at, G = x ? R.data : void 0, K = _?.bankName?.trim() ?? "", q = Ie?.trim() || void 0, J = { bankName: K }, lt = d(() => l(m.domesticWireIntro, J), [m.domesticWireIntro, K]), ut = d(() => l(m.domesticWireNote, J), [m.domesticWireNote, K]), dt = d(() => l(m.thingsToKnowBody, J), [m.thingsToKnowBody, K]), ft = G?.nickname?.trim() || h.accountFallback, pt = c(G?.balance), Y = d(() => (z.data?.data ?? []).map((e, t) => ({
76
79
  key: `${e.date}-${t}`,
77
80
  descriptionLabel: e.description,
78
- dateLabel: se(e.date),
79
- amountLabel: ae(e.amount, e.direction),
81
+ dateLabel: le(e.date),
82
+ amountLabel: se(e.amount, e.direction),
80
83
  amountVariant: e.direction === "CREDIT" ? "positive" : "default",
81
84
  balanceLabel: c(e.runningBalance)
82
- })), [H.data?.data]), ut = b.canRead && lt.length > 0, dt = u((t) => {
85
+ })), [z.data?.data]), mt = b.canRead && Y.length > 0, X = u((t) => {
83
86
  if (!y || !b.canRead) return;
84
87
  let n = window.open("", "_blank");
85
88
  if (!n) {
86
89
  e.error(h.viewStatementErrorToast);
87
90
  return;
88
91
  }
89
- n.opener = null, B((e) => new Set(e).add(t)), q({
92
+ n.opener = null, L((e) => new Set(e).add(t)), W({
90
93
  id: p,
91
94
  statementId: t
92
95
  }).then((e) => {
93
96
  let t = URL.createObjectURL(e);
94
- n.location.href = t, window.setTimeout(() => URL.revokeObjectURL(t), Ee);
97
+ n.location.href = t, window.setTimeout(() => URL.revokeObjectURL(t), Oe);
95
98
  }).catch(() => {
96
99
  n.close(), e.error(h.viewStatementErrorToast);
97
100
  }).finally(() => {
98
- B((e) => {
101
+ L((e) => {
99
102
  if (!e.has(t)) return e;
100
103
  let n = new Set(e);
101
104
  return n.delete(t), n;
@@ -106,73 +109,73 @@ function p({ accountId: p, onBack: Oe, labels: ke, featureLabels: Ae, isBankingT
106
109
  h.viewStatementErrorToast,
107
110
  y,
108
111
  b.canRead,
109
- q
110
- ]), ft = d(() => (U.data?.data ?? []).map((e) => {
111
- let t = oe(e.statementDate);
112
+ W
113
+ ]), ht = d(() => (B.data?.data ?? []).map((e) => {
114
+ let t = ce(e.statementDate);
112
115
  return {
113
116
  key: e.statementId,
114
117
  label: t,
115
118
  viewButtonAriaLabel: l(m.viewStatementButtonAriaLabel, { date: t }),
116
- isViewDisabled: z.has(e.statementId),
117
- onView: () => dt(e.statementId)
119
+ isViewDisabled: I.has(e.statementId),
120
+ onView: () => X(e.statementId)
118
121
  };
119
122
  }), [
120
- U.data?.data,
123
+ B.data?.data,
121
124
  m.viewStatementButtonAriaLabel,
122
- z,
123
- dt
124
- ]), Z = U.data?.nextPaginationToken ?? void 0, Q = U.data?.prevPaginationToken ?? void 0, pt = S && w === "statements" && !!U.data && !U.isError, mt = S && w === "statements" && U.isLoading, ht = S && w === "statements" && U.isError, gt = u(() => {
125
- U.refetch();
126
- }, [U.refetch]), _t = u((e) => {
127
- Je(e), R(void 0);
128
- }, []), vt = u(() => {
129
- R(Q);
130
- }, [Q]), yt = u(() => {
131
- R(Z);
132
- }, [Z]), bt = C || !a(j, N), xt = d(() => {
125
+ I,
126
+ X
127
+ ]), Z = B.data?.nextPaginationToken ?? void 0, Q = B.data?.prevPaginationToken ?? void 0, gt = S && w === "statements" && !!B.data && !B.isError, _t = S && w === "statements" && B.isLoading, vt = S && w === "statements" && B.isError, yt = u(() => {
128
+ B.refetch();
129
+ }, [B.refetch]), bt = u((e) => {
130
+ et(e), F(void 0);
131
+ }, []), xt = u(() => {
132
+ F(Q);
133
+ }, [Q]), St = u(() => {
134
+ F(Z);
135
+ }, [Z]), Ct = C || !a(O, A), wt = d(() => {
133
136
  let e = [{ after: s() }];
134
- return N && e.push({ after: o(N) }), e;
135
- }, [N]), St = d(() => {
137
+ return A && e.push({ after: o(A) }), e;
138
+ }, [A]), Tt = d(() => {
136
139
  let e = [{ after: s() }];
137
- return j && e.push({ before: o(j) }), e;
138
- }, [j]), Ct = u((e) => {
140
+ return O && e.push({ before: o(O) }), e;
141
+ }, [O]), Et = u((e) => {
139
142
  if (e) {
140
- let { startDate: e, endDate: t } = ne();
141
- M(e), P(t);
143
+ let { startDate: e, endDate: t } = ie();
144
+ k(e), j(t);
142
145
  }
143
- A(e);
144
- }, []), wt = u(async () => {
145
- if (!y || !b.canRead || !j || !N || !a(j, N)) return;
146
- A(!1);
146
+ $e(e);
147
+ }, []), Dt = u(async () => {
148
+ if (!y || !b.canRead || !O || !A || !a(O, A)) return;
149
+ $e(!1);
147
150
  let t = e.loading(h.exportLoadingToast);
148
151
  try {
149
- let n = await K({
152
+ let n = await U({
150
153
  id: p,
151
- startDate: i(j),
152
- endDate: i(N)
154
+ startDate: re(O),
155
+ endDate: re(A)
153
156
  });
154
- re(n.csv, n.filename), e.success(h.exportSuccessToast, {
157
+ ae(n.csv, n.filename), e.success(h.exportSuccessToast, {
155
158
  id: t,
156
- duration: Se
159
+ duration: we
157
160
  });
158
161
  } catch {
159
162
  e.error(h.exportErrorToast, {
160
163
  id: t,
161
- duration: Ce
164
+ duration: Te
162
165
  });
163
166
  }
164
167
  }, [
165
168
  p,
166
- K,
167
- N,
168
- j,
169
+ U,
170
+ A,
171
+ O,
169
172
  h.exportErrorToast,
170
173
  h.exportLoadingToast,
171
174
  h.exportSuccessToast,
172
175
  y,
173
176
  b.canRead
174
177
  ]), $ = u(async (t, n) => {
175
- if (!await ie(t)) return;
178
+ if (!await oe(t)) return;
176
179
  let r = {
177
180
  account: h.copyAccountNumberToast,
178
181
  routing: h.copyRoutingNumberToast,
@@ -180,105 +183,105 @@ function p({ accountId: p, onBack: Oe, labels: ke, featureLabels: Ae, isBankingT
180
183
  bankAddress: h.copyBankAddressToast
181
184
  };
182
185
  if (e.success(r[n]), n === "account") {
183
- O(!0), window.setTimeout(() => O(!1), 2e3);
186
+ qe(!0), window.setTimeout(() => qe(!1), 2e3);
184
187
  return;
185
188
  }
186
- n === "routing" && (k(!0), window.setTimeout(() => k(!1), 2e3));
189
+ n === "routing" && (Ye(!0), window.setTimeout(() => Ye(!1), 2e3));
187
190
  }, [
188
191
  h.copyAccountNumberToast,
189
192
  h.copyBankAddressToast,
190
193
  h.copyBankNameToast,
191
194
  h.copyRoutingNumberToast
192
- ]), Tt = (e) => {
193
- e && (D({ nickname: J?.nickname?.trim() ?? "" }), G()), T(e);
195
+ ]), Ot = (e) => {
196
+ e && (D({ nickname: G?.nickname?.trim() ?? "" }), H()), T(e);
194
197
  };
195
- return /* @__PURE__ */ xe(ye, {
198
+ return /* @__PURE__ */ Ce(xe, {
196
199
  labels: m,
197
- title: st,
198
- bankDisplayName: Y,
199
- bankLogoSrc: Me,
200
- bankLogoAlt: Ne,
201
- balanceLabel: ct,
200
+ title: ft,
201
+ bankDisplayName: K,
202
+ bankLogoSrc: Pe,
203
+ bankLogoAlt: Fe,
204
+ balanceLabel: pt,
202
205
  balanceTestId: "bank-accounts-widget-detail-balance",
203
- isBankingTaglineVisible: je,
206
+ isBankingTaglineVisible: Ne,
204
207
  activeTab: w,
205
- transactionRows: lt,
206
- statementRows: ft,
207
- isStatementsLoading: mt,
208
- isStatementsError: ht,
209
- onStatementsRetry: gt,
210
- isStatementsPaginationVisible: pt,
211
- statementsPageSize: F,
212
- statementsPageSizeOptions: we,
208
+ transactionRows: Y,
209
+ statementRows: ht,
210
+ isStatementsLoading: _t,
211
+ isStatementsError: vt,
212
+ onStatementsRetry: yt,
213
+ isStatementsPaginationVisible: gt,
214
+ statementsPageSize: M,
215
+ statementsPageSizeOptions: Ee,
213
216
  isStatementsPreviousPageDisabled: !Q,
214
217
  isStatementsNextPageDisabled: !Z,
215
- onStatementsPageSizeChange: _t,
216
- onStatementsPreviousPageClick: vt,
217
- onStatementsNextPageClick: yt,
218
- showExport: ut,
219
- isExportOpen: qe,
220
- exportStartDate: j,
221
- exportEndDate: N,
222
- isExportDownloading: nt,
223
- isExportDownloadDisabled: bt,
224
- disabledExportStartDates: xt,
225
- disabledExportEndDates: St,
226
- accountNumberLabel: J?.accountNumber ?? "",
227
- maskedAccountNumberLabel: ce(J?.accountNumber ?? ""),
218
+ onStatementsPageSizeChange: bt,
219
+ onStatementsPreviousPageClick: xt,
220
+ onStatementsNextPageClick: St,
221
+ showExport: mt,
222
+ isExportOpen: Qe,
223
+ exportStartDate: O,
224
+ exportEndDate: A,
225
+ isExportDownloading: ct,
226
+ isExportDownloadDisabled: Ct,
227
+ disabledExportStartDates: wt,
228
+ disabledExportEndDates: Tt,
229
+ accountNumberLabel: G?.accountNumber ?? "",
230
+ maskedAccountNumberLabel: ue(G?.accountNumber ?? ""),
228
231
  accountNumberTestId: "bank-accounts-widget-detail-account-number",
229
- wireAccountNumberLabel: J?.accountNumber ?? "",
230
- routingNumberLabel: J?.routingNumber ?? "",
231
- bankAddressLabel: rt,
232
- domesticWireIntroLabel: it,
233
- domesticWireNoteLabel: at,
234
- thingsToKnowBodyLabel: ot,
235
- supportTeamHref: Fe,
236
- isAccountNumberVisible: Ve,
237
- isAccountNumberCopied: Ue,
238
- isRoutingNumberCopied: We,
239
- isDomesticWireExpanded: Ge,
240
- isLoading: !v && (!y && !J || Re && !_ || S && (V.isLoading || w === "transactions" && H.isLoading)),
241
- isError: v || S && (V.isError || w === "transactions" && H.isError),
242
- isEditOpen: Be,
232
+ wireAccountNumberLabel: G?.accountNumber ?? "",
233
+ routingNumberLabel: G?.routingNumber ?? "",
234
+ bankAddressLabel: q,
235
+ domesticWireIntroLabel: lt,
236
+ domesticWireNoteLabel: ut,
237
+ thingsToKnowBodyLabel: dt,
238
+ supportTeamHref: Le,
239
+ isAccountNumberVisible: We,
240
+ isAccountNumberCopied: Ke,
241
+ isRoutingNumberCopied: Je,
242
+ isDomesticWireExpanded: Xe,
243
+ isLoading: !v && (Ve && !G || Be && !_ || S && (R.isLoading || w === "transactions" && z.isLoading)),
244
+ isError: v || S && (R.isError || w === "transactions" && z.isError),
245
+ isEditOpen: Ue,
243
246
  isEditDisabled: !b.canWrite,
244
- isEditError: W,
245
- isSubmitting: tt,
247
+ isEditError: V,
248
+ isSubmitting: st,
246
249
  isEditSaveDisabled: C,
247
250
  editForm: E,
248
251
  canEdit: b.canWrite,
249
- onBack: Oe,
250
- onTabChange: ze,
251
- onToggleAccountNumberVisibility: () => He((e) => !e),
252
- onCopyAccountNumber: () => void $(J?.accountNumber ?? "", "account"),
253
- onCopyRoutingNumber: () => void $(J?.routingNumber ?? "", "routing"),
254
- onCopyBankName: () => void $(Y, "bankName"),
255
- onCopyBankAddress: () => void $(rt ?? "", "bankAddress"),
256
- onDomesticWireExpandedChange: Ke,
257
- onEditOpenChange: Tt,
252
+ onBack: Ae,
253
+ onTabChange: He,
254
+ onToggleAccountNumberVisibility: () => Ge((e) => !e),
255
+ onCopyAccountNumber: () => void $(G?.accountNumber ?? "", "account"),
256
+ onCopyRoutingNumber: () => void $(G?.routingNumber ?? "", "routing"),
257
+ onCopyBankName: () => void $(K, "bankName"),
258
+ onCopyBankAddress: () => void $(q ?? "", "bankAddress"),
259
+ onDomesticWireExpandedChange: Ze,
260
+ onEditOpenChange: Ot,
258
261
  onEditFormChange: (e) => {
259
- W && G(), D(e);
262
+ V && H(), D(e);
260
263
  },
261
264
  onEditSubmit: () => {
262
265
  if (!y || !b.canWrite) return;
263
266
  let t = E.nickname.trim();
264
- t && et({
267
+ t && ot({
265
268
  path: { id: p },
266
269
  body: { nickname: t }
267
270
  }, {
268
271
  onSuccess: () => {
269
- g(te.AccountUpdated, { accountId: p }), e.success(h.editSuccessToast), T(!1);
272
+ g(i.AccountUpdated, { accountId: p }), e.success(h.editSuccessToast), T(!1);
270
273
  },
271
274
  onError: () => {
272
275
  e.error(h.editErrorToast);
273
276
  }
274
277
  });
275
278
  },
276
- onEditNicknameClick: () => Tt(!0),
277
- onExportOpenChange: Ct,
278
- onExportStartDateChange: M,
279
- onExportEndDateChange: P,
279
+ onEditNicknameClick: () => Ot(!0),
280
+ onExportOpenChange: Et,
281
+ onExportStartDateChange: k,
282
+ onExportEndDateChange: j,
280
283
  onExportDownload: () => {
281
- wt();
284
+ Dt();
282
285
  }
283
286
  });
284
287
  }
@@ -4,43 +4,38 @@
4
4
  "use client";
5
5
  import { getUsers as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getUsersOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { authEpochPlaceholder as n, withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
- import { useEmbedApi as i } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
- import { organizationHeaders as a } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { withAuthEpochInfinite as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
+ import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
- import { useEffect as o, useMemo as s } from "react";
12
- import { useInfiniteQuery as c } from "@tanstack/react-query";
11
+ import { useEffect as a, useMemo as o } from "react";
12
+ import { useInfiniteQuery as s } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
14
- var l = 100, u = ["ACTIVE", "INVITED"];
15
- function d(u, d, f) {
16
- let { client: p, organizationId: m, authEpoch: h, organizationPending: g } = i(), _ = a(m), v = f?.length ? { Permissions: f } : {}, y = t({
17
- client: p,
18
- headers: _,
14
+ var c = 100, l = ["ACTIVE", "INVITED"];
15
+ function u(l, u, d) {
16
+ let { client: f, organizationId: p, authEpoch: m, organizationStatus: h } = r(), g = i(p), _ = d?.length ? { Permissions: d } : {}, v = t({
17
+ client: f,
18
+ headers: g,
19
19
  query: {
20
- Status: u,
21
- Limit: l,
22
- ...v
20
+ Status: l,
21
+ Limit: c,
22
+ ..._
23
23
  }
24
- }), b = c({
25
- queryKey: [
26
- ...r(y, {
27
- authEpoch: h,
28
- organizationPending: g
29
- }).queryKey,
30
- "all",
31
- u
32
- ],
33
- placeholderData: n(y.queryKey, g),
34
- enabled: d,
24
+ }), y = s({
25
+ ...n(v.queryKey, {
26
+ authEpoch: m,
27
+ organizationStatus: h
28
+ }, { suffix: ["all", l] }),
29
+ enabled: u,
35
30
  initialPageParam: void 0,
36
31
  queryFn: async ({ signal: t, pageParam: n }) => {
37
32
  let { data: r } = await e({
38
- client: p,
39
- headers: _,
33
+ client: f,
34
+ headers: g,
40
35
  query: {
41
- Status: u,
42
- Limit: l,
43
- ...v,
36
+ Status: l,
37
+ Limit: c,
38
+ ..._,
44
39
  ...n ? { PaginationToken: n } : {}
45
40
  },
46
41
  signal: t,
@@ -53,32 +48,32 @@ function d(u, d, f) {
53
48
  if (!(i === void 0 || r.includes(i))) return i;
54
49
  }
55
50
  });
56
- o(() => {
57
- d && b.hasNextPage && !b.isFetchingNextPage && !b.isError && b.fetchNextPage();
51
+ a(() => {
52
+ u && y.hasNextPage && !y.isFetchingNextPage && !y.isError && y.fetchNextPage();
58
53
  }, [
59
- d,
60
- b.hasNextPage,
61
- b.isFetchingNextPage,
62
- b.isError,
63
- b.fetchNextPage
54
+ u,
55
+ y.hasNextPage,
56
+ y.isFetchingNextPage,
57
+ y.isError,
58
+ y.fetchNextPage
64
59
  ]);
65
- let x = s(() => {
66
- if (b.data) return {
67
- data: b.data.pages.flatMap((e) => e.data ?? []),
60
+ let b = o(() => {
61
+ if (y.data) return {
62
+ data: y.data.pages.flatMap((e) => e.data ?? []),
68
63
  nextPaginationToken: null,
69
64
  prevPaginationToken: null
70
65
  };
71
- }, [b.data]);
66
+ }, [y.data]);
72
67
  return {
73
- ...b,
74
- data: x
68
+ ...y,
69
+ data: b
75
70
  };
76
71
  }
77
- function f({ enabled: e, permissions: t } = {}) {
78
- let { organizationId: n, widgetToken: r } = i(), a = !!(n && r) && (e === !0 || e === void 0), o = d("ACTIVE", a, t), c = d("INVITED", a, t), l = s(() => {
72
+ function d({ enabled: e, permissions: t } = {}) {
73
+ let { organizationId: n, widgetToken: i } = r(), a = !!(n && i) && (e === !0 || e === void 0), s = u("ACTIVE", a, t), c = u("INVITED", a, t), d = o(() => {
79
74
  let e = /* @__PURE__ */ new Map();
80
- for (let t of u) {
81
- let n = t === "ACTIVE" ? o.data?.data ?? [] : c.data?.data ?? [];
75
+ for (let t of l) {
76
+ let n = t === "ACTIVE" ? s.data?.data ?? [] : c.data?.data ?? [];
82
77
  for (let t of n) e.set(t.id, t);
83
78
  }
84
79
  return {
@@ -86,16 +81,16 @@ function f({ enabled: e, permissions: t } = {}) {
86
81
  nextPaginationToken: null,
87
82
  prevPaginationToken: null
88
83
  };
89
- }, [o.data, c.data]), f = o.isLoading || c.isLoading, p = o.isFetchingNextPage || c.isFetchingNextPage, m = o.hasNextPage || c.hasNextPage, h = o.isError || c.isError;
84
+ }, [s.data, c.data]), f = s.isLoading || c.isLoading, p = s.isFetchingNextPage || c.isFetchingNextPage, m = s.hasNextPage || c.hasNextPage, h = s.isError || c.isError;
90
85
  return {
91
- ...o,
92
- data: l,
86
+ ...s,
87
+ data: d,
93
88
  isLoading: f,
94
89
  isFetchingNextPage: p,
95
90
  hasNextPage: m,
96
91
  isError: h,
97
- isSuccess: o.isSuccess && c.isSuccess
92
+ isSuccess: s.isSuccess && c.isSuccess
98
93
  };
99
94
  }
100
95
  //#endregion
101
- export { f as useAllOrganizationUsersQuery };
96
+ export { d as useAllOrganizationUsersQuery };