@tesouro/embedded-components-react 0.5.226 → 0.5.228

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 (160) hide show
  1. package/README.md +21 -21
  2. package/dist/index.d.ts +54 -34
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +54 -34
  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 +33 -63
  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 +36 -141
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +26 -16
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +58 -37
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +228 -122
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +300 -147
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +34 -37
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +126 -122
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +150 -58
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +38 -91
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +113 -107
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +98 -231
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +111 -27
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +25 -624
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +631 -39
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +41 -40
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +35 -74
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +73 -115
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +115 -313
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +325 -0
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +15 -2
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +11 -12
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +42 -1
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +19 -3
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +73 -3
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -1
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +16 -1
  84. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +32 -4
  85. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +304 -11
  86. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +42 -258
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +62 -38
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +485 -61
  89. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +90 -480
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +2 -0
  91. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +3 -1
  92. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +0 -3
  93. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +100 -1
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +23 -95
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +231 -23
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +3 -236
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +249 -3
  98. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +78 -234
  99. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +53 -87
  100. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +343 -49
  101. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +29 -20
  102. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +2 -2
  103. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +209 -207
  104. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +10 -5
  105. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +10 -5
  106. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +11 -6
  107. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +2 -2
  108. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +2 -2
  109. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +2 -2
  110. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +2 -2
  111. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +2 -2
  112. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +30 -28
  113. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +28 -26
  114. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +37 -34
  115. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +28 -26
  116. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +37 -34
  117. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +294 -292
  118. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +58 -58
  119. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -48
  120. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +4 -4
  121. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +2 -2
  122. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +4 -4
  123. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +4 -3
  124. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +14 -13
  125. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/allPages.js +1 -1
  126. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +16 -15
  127. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +7 -5
  128. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +7 -5
  129. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -2
  130. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -5
  131. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -29
  132. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js +10 -0
  133. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +26 -27
  134. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +2 -2
  135. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +189 -211
  136. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +43 -59
  137. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -32
  138. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +2 -2
  139. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
  140. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +2 -2
  141. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js +2 -2
  142. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +2 -2
  143. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -34
  144. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +33 -22
  145. package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +2 -2
  146. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +43 -32
  147. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +138 -127
  148. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js +6 -0
  149. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +1 -1
  150. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  151. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index10.js +2 -2
  152. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +2 -2
  153. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +2 -2
  154. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +2 -2
  155. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +2 -2
  156. package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
  157. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +60 -58
  158. package/package.json +1 -1
  159. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +0 -106
  160. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +0 -353
@@ -4,281 +4,283 @@
4
4
  "use client";
5
5
  import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
6
  import { getInitials as t } from "../../../shared/util/dist/lib/getInitials.js";
7
- import { TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as n, emitWidgetDomEvent as ee } from "../../../shared/util/dist/lib/widgetDomEvents.js";
8
- import { extractApiErrorMessage as te } from "../../../shared/util/dist/lib/apiErrors.js";
9
- import { Scope as r } from "../../../shared/data-access/dist/lib/scopes.js";
10
- import { useAllOrganizationRolesQuery as ne } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
11
- import { useAllOrganizationUsersQuery as re } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
7
+ import { TESOURO_NEW_EXTERNAL_BANK_ACCOUNT_LINKED_SUCCESS_EVENT as n, emitWidgetDomEvent as r } from "../../../shared/util/dist/lib/widgetDomEvents.js";
8
+ import { extractApiErrorMessage as ee } from "../../../shared/util/dist/lib/apiErrors.js";
9
+ import { OrganizationStatus as te, isOrganizationOnItsWay as ne } from "../../../shared/data-access/dist/lib/organizationStatus.js";
10
+ import { useEmbedApi as re } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
11
+ import { Scope as i } from "../../../shared/data-access/dist/lib/scopes.js";
12
+ import { useAllOrganizationRolesQuery as ie } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
13
+ import { useAllOrganizationUsersQuery as ae } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
12
14
  import "../../../shared/data-access/dist/index.js";
13
15
  import "../../../shared/ui/dist/index.js";
14
- import { useAnalyticsTrack as ie } from "../../../shared/feature/dist/lib/analytics/hooks.js";
15
- import { useWidgetConfig as ae, useWidgetError as oe, useWidgetLoading as se } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
16
+ import { useAnalyticsTrack as oe } from "../../../shared/feature/dist/lib/analytics/hooks.js";
17
+ import { useWidgetConfig as se, useWidgetError as ce, useWidgetLoading as le } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
16
18
  import "../../../shared/feature/dist/index.js";
17
- import { filterRolesForOrganization as ce } from "../../../../shared/util-validation/dist/index6.js";
18
- import { filterUsersForOrganization as le } from "../../../../shared/util-validation/dist/index7.js";
19
- import { DEFAULT_FEATURE_LABELS as ue } from "./index4.js";
20
- import { LinkedAccountsWidgetAnalyticsEvent as i } from "./index2.js";
21
- import { EMPTY_CONNECT_FORM as de, EMPTY_EDIT_FORM as fe, EMPTY_VERIFY_FORM as pe, isConnectStep1Valid as me, isRoutingNumberValid as he, isVerifyAmountInRange as ge, isVerifyFormValid as a, parseVerifyAmountToMinorUnits as _e, sanitizeRoutingNumberInput as ve, toEditForm as ye, toUpdateBody as be } from "./index3.js";
22
- import { getLinkedAccountsPermissions as xe } from "./index5.js";
23
- import { toAccountRows as Se } from "./index6.js";
24
- import { useConnectExternalBankAccountMutation as Ce } from "../../data-access/dist/index3.js";
25
- import { useExternalBankAccountsQuery as we } from "../../data-access/dist/index4.js";
26
- import { useGrantExternalBankAccountAccessMutation as Te } from "../../data-access/dist/index5.js";
27
- import { useLinkExternalBankAccountMutation as Ee } from "../../data-access/dist/index6.js";
28
- import { useUnlinkExternalBankAccountMutation as De } from "../../data-access/dist/index9.js";
29
- import { useUpdateExternalBankAccountMutation as Oe } from "../../data-access/dist/index10.js";
30
- import { useValidateExternalBankAccountMutation as ke } from "../../data-access/dist/index11.js";
19
+ import { filterRolesForOrganization as ue } from "../../../../shared/util-validation/dist/index6.js";
20
+ import { filterUsersForOrganization as de } from "../../../../shared/util-validation/dist/index7.js";
21
+ import { DEFAULT_FEATURE_LABELS as fe } from "./index4.js";
22
+ import { LinkedAccountsWidgetAnalyticsEvent as a } from "./index2.js";
23
+ import { EMPTY_CONNECT_FORM as o, EMPTY_EDIT_FORM as pe, EMPTY_VERIFY_FORM as me, isConnectStep1Valid as he, isRoutingNumberValid as ge, isVerifyAmountInRange as _e, isVerifyFormValid as ve, parseVerifyAmountToMinorUnits as ye, sanitizeRoutingNumberInput as be, toEditForm as xe, toUpdateBody as Se } from "./index3.js";
24
+ import { getLinkedAccountsPermissions as Ce } from "./index5.js";
25
+ import { toAccountRows as we } from "./index6.js";
26
+ import { useConnectExternalBankAccountMutation as Te } from "../../data-access/dist/index3.js";
27
+ import { useExternalBankAccountsQuery as Ee } from "../../data-access/dist/index4.js";
28
+ import { useGrantExternalBankAccountAccessMutation as De } from "../../data-access/dist/index5.js";
29
+ import { useLinkExternalBankAccountMutation as Oe } from "../../data-access/dist/index6.js";
30
+ import { useUnlinkExternalBankAccountMutation as ke } from "../../data-access/dist/index9.js";
31
+ import { useUpdateExternalBankAccountMutation as Ae } from "../../data-access/dist/index10.js";
32
+ import { useValidateExternalBankAccountMutation as je } from "../../data-access/dist/index11.js";
31
33
  import "../../data-access/dist/index.js";
32
- import { useAdminEligibleUserIds as Ae } from "./index7.js";
33
- import { toAccessRows as je, toOrganizationRoleOptions as Me, toTeamMembers as Ne } from "./index8.js";
34
- import { DEFAULT_LABELS as Pe } from "../../ui/dist/index15.js";
34
+ import { useAdminEligibleUserIds as Me } from "./index7.js";
35
+ import { toAccessRows as Ne, toOrganizationRoleOptions as Pe, toTeamMembers as Fe } from "./index8.js";
36
+ import { DEFAULT_LABELS as Ie } from "../../ui/dist/index15.js";
35
37
  import "../../ui/dist/index.js";
36
- import { useCallback as Fe, useEffect as Ie, useMemo as o, useState as s } from "react";
38
+ import { useCallback as Le, useEffect as Re, useMemo as s, useState as c } from "react";
37
39
  //#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js
38
- function Le(e) {
40
+ function ze(e) {
39
41
  let t = e;
40
42
  return typeof e == "object" && !!e && "verificationStatus" in e && t.verificationStatus === "VERIFIED";
41
43
  }
42
- var c = "tesouro.linkedAccounts.locallySentMicroDepositAccountIds.v1";
43
- function Re() {
44
+ var l = "tesouro.linkedAccounts.locallySentMicroDepositAccountIds.v1";
45
+ function Be() {
44
46
  if (typeof window > "u") return /* @__PURE__ */ new Set();
45
47
  try {
46
- let e = window.sessionStorage.getItem(c), t = e ? JSON.parse(e) : [];
47
- return new Set(Array.isArray(t) ? t.filter(l) : []);
48
+ let e = window.sessionStorage.getItem(l), t = e ? JSON.parse(e) : [];
49
+ return new Set(Array.isArray(t) ? t.filter(u) : []);
48
50
  } catch {
49
51
  return /* @__PURE__ */ new Set();
50
52
  }
51
53
  }
52
- function l(e) {
54
+ function u(e) {
53
55
  return typeof e == "string";
54
56
  }
55
- function u(e) {
57
+ function d(e) {
56
58
  if (!(typeof window > "u")) try {
57
- window.sessionStorage.setItem(c, JSON.stringify([...e]));
59
+ window.sessionStorage.setItem(l, JSON.stringify([...e]));
58
60
  } catch {}
59
61
  }
60
- function ze(e, t) {
62
+ function f(e, t) {
61
63
  let n = new Set(e).add(t);
62
- return u(n), n;
64
+ return d(n), n;
63
65
  }
64
- var Be = r.ExternalBankAccountWriteOrg;
65
- function d({ labels: r, featureLabels: c }) {
66
- let l = {
67
- ...Pe,
68
- ...r
69
- }, u = {
70
- ...ue,
71
- ...c
72
- }, d = ie(), { organizationId: f, widgetToken: Ve, initResponse: p } = ae(), He = se(), m = !!oe(), h = !!(f && Ve), g = o(() => xe(p?.scopes), [p?.scopes]), _ = h && g.canRead && !!p, [v, y] = s(), [b, Ue] = s(!1), [x, S] = s(1), [C, We] = s([]), [w, T] = s(), [Ge, E] = s(), [D, O] = s(Re), [Ke, k] = s(!1), [qe, Je] = s(!1), [Ye, A] = s(!1), [Xe, j] = s(!1), [M, N] = s(), [P, F] = s(de), [I, L] = s(fe), [R, z] = s(pe);
73
- Ie(() => {
74
- d(i.Mounted);
75
- }, [d]);
76
- let B = we({
66
+ var Ve = i.ExternalBankAccountWriteOrg;
67
+ function p({ labels: i, featureLabels: l }) {
68
+ let u = {
69
+ ...Ie,
70
+ ...i
71
+ }, d = {
72
+ ...fe,
73
+ ...l
74
+ }, p = oe(), { organizationId: m, widgetToken: h, initResponse: g } = se(), He = le(), { organizationStatus: _ } = re(), Ue = ne(_), v = !!ce(), y = !!(m && h), We = y || !!h && _ === te.Rotating, b = s(() => Ce(g?.scopes), [g?.scopes]), x = We && b.canRead && !!g, [S, C] = c(), [w, Ge] = c(!1), [T, E] = c(1), [D, O] = c([]), [k, A] = c(), [Ke, j] = c(), [qe, Je] = c(Be), [Ye, M] = c(!1), [Xe, Ze] = c(!1), [Qe, N] = c(!1), [$e, P] = c(!1), [F, I] = c(), [L, et] = c(o), [tt, nt] = c(pe), [R, rt] = c(me);
75
+ Re(() => {
76
+ p(a.Mounted);
77
+ }, [p]);
78
+ let z = Ee({
77
79
  limit: 100,
78
- enabled: _
79
- }), V = Ce(), H = Te(), U = Oe(), W = De(), G = Ee(), K = ke(), q = b && x >= 2, J = re({ enabled: q }), Y = ne({ enabled: q }), { userIds: Ze, isResolving: Qe, isError: $e } = Ae({
80
- enabled: q,
81
- permissionKey: Be,
82
- organizationId: f
83
- }), X = o(() => {
84
- let e = Y.data?.data ?? [], t = f ? ce(e, {
85
- organizationId: f,
86
- organizationTypes: p?.organizationTypes ?? []
87
- }) : e, n = le(J.data?.data ?? [], f);
88
- return Ne(n, Me(t), Ze);
80
+ enabled: x
81
+ }), B = Te(), V = De(), H = Ae(), U = ke(), W = Oe(), G = je(), K = w && T >= 2, q = ae({ enabled: K }), J = ie({ enabled: K }), { userIds: it, isResolving: at, isError: ot } = Me({
82
+ enabled: K,
83
+ permissionKey: Ve,
84
+ organizationId: m
85
+ }), Y = s(() => {
86
+ let e = J.data?.data ?? [], t = m ? ue(e, {
87
+ organizationId: m,
88
+ organizationTypes: g?.organizationTypes ?? []
89
+ }) : e, n = de(q.data?.data ?? [], m);
90
+ return Fe(n, Pe(t), it);
89
91
  }, [
90
- Ze,
91
- Y.data?.data,
92
+ it,
92
93
  J.data?.data,
93
- f,
94
- p?.organizationTypes
95
- ]), et = J.isLoading || J.isFetchingNextPage || !!J.hasNextPage || Y.isResolving || Qe, tt = !et && !J.isError && !$e, Z = _ ? B.data?.data ?? [] : [], Q = o(() => Z.map((e) => e.verificationStatus === "UNVERIFIED" && D.has(e.id) ? {
94
+ q.data?.data,
95
+ m,
96
+ g?.organizationTypes
97
+ ]), st = q.isLoading || q.isFetchingNextPage || !!q.hasNextPage || J.isResolving || at, ct = !st && !q.isError && !ot, X = x ? z.data?.data ?? [] : [], Z = s(() => X.map((e) => e.verificationStatus === "UNVERIFIED" && qe.has(e.id) ? {
96
98
  ...e,
97
99
  verificationStatus: "VERIFICATION_SENT"
98
- } : e), [Z, D]), nt = [.../* @__PURE__ */ new Set([...X.filter((e) => e.locked).map((e) => e.id), ...C])], rt = Fe((e) => {
99
- V.reset(), H.reset(), G.reset(), F({
100
+ } : e), [X, qe]), lt = [.../* @__PURE__ */ new Set([...Y.filter((e) => e.locked).map((e) => e.id), ...D])], ut = Le((e) => {
101
+ B.reset(), V.reset(), W.reset(), et({
100
102
  ...e,
101
- routingNumber: ve(e.routingNumber)
103
+ routingNumber: be(e.routingNumber)
102
104
  });
103
105
  }, [
106
+ B,
104
107
  V,
105
- H,
106
- G
107
- ]), it = () => {
108
- S(3), ee(n);
109
- }, at = (e) => {
110
- if (!g.canMicroDeposit) {
111
- it();
108
+ W
109
+ ]), dt = () => {
110
+ E(3), r(n);
111
+ }, ft = (e) => {
112
+ if (!b.canMicroDeposit) {
113
+ dt();
112
114
  return;
113
115
  }
114
- E("connect"), G.mutate({ path: { id: e } }, { onSuccess: () => {
115
- E(void 0), O((t) => ze(t, e)), d(i.AccountLinked, { accountId: e }), it();
116
+ j("connect"), W.mutate({ path: { id: e } }, { onSuccess: () => {
117
+ j(void 0), Je((t) => f(t, e)), p(a.AccountLinked, { accountId: e }), dt();
116
118
  } });
117
- }, ot = (e) => {
118
- H.mutate({
119
+ }, pt = (e) => {
120
+ V.mutate({
119
121
  path: { id: e },
120
- body: { userIds: nt }
121
- }, { onSuccess: () => at(e) });
122
- }, st = () => {
123
- if (h && g.canWrite) {
124
- if (x === 1) {
125
- if (!me(P)) return;
126
- S(2);
122
+ body: { userIds: lt }
123
+ }, { onSuccess: () => ft(e) });
124
+ }, mt = () => {
125
+ if (y && b.canWrite) {
126
+ if (T === 1) {
127
+ if (!he(L)) return;
128
+ E(2);
127
129
  return;
128
130
  }
129
- if (x === 2 && tt) {
130
- if (w) {
131
- ot(w.id);
131
+ if (T === 2 && ct) {
132
+ if (k) {
133
+ pt(k.id);
132
134
  return;
133
135
  }
134
- V.mutate({ body: {
135
- nickname: P.nickname.trim(),
136
- accountNumber: P.accountNumber.trim(),
137
- routingNumber: P.routingNumber.trim(),
138
- nameOnAccount: P.nickname.trim(),
139
- type: P.type
136
+ B.mutate({ body: {
137
+ nickname: L.nickname.trim(),
138
+ accountNumber: L.accountNumber.trim(),
139
+ routingNumber: L.routingNumber.trim(),
140
+ nameOnAccount: L.nickname.trim(),
141
+ type: L.type
140
142
  } }, { onSuccess: (e) => {
141
- d(i.AccountConnected, { accountId: e?.id }), T(e), e?.id && ot(e.id);
143
+ p(a.AccountConnected, { accountId: e?.id }), A(e), e?.id && pt(e.id);
142
144
  } });
143
145
  }
144
146
  }
145
- }, ct = () => {
146
- x === 2 && S(1);
147
- }, lt = (e, t) => {
148
- X.find((t) => t.id === e)?.locked || We((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
149
- }, ut = (e) => {
150
- (!e || h) && (!e || g.canWrite) && (e && (S(1), F(de), We([]), T(void 0), E(void 0), V.reset(), H.reset(), G.reset()), Ue(e));
151
- }, dt = (e) => {
152
- if (!h || !g.canWrite) return;
153
- let t = Z.find((t) => t.id === e);
154
- y(e), L(ye(t)), k(!0);
155
- }, ft = (e) => {
156
- (!e || h) && (!e || g.canWrite) && k(e);
157
- }, pt = () => {
158
- if (!h || !g.canWrite || !v) return;
159
- let t = Z.find((e) => e.id === v), n = be(I, t);
160
- Object.keys(n).length !== 0 && U.mutate({
161
- path: { id: v },
147
+ }, ht = () => {
148
+ T === 2 && E(1);
149
+ }, gt = (e, t) => {
150
+ Y.find((t) => t.id === e)?.locked || O((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
151
+ }, _t = (e) => {
152
+ (!e || y) && (!e || b.canWrite) && (e && (E(1), et(o), O([]), A(void 0), j(void 0), B.reset(), V.reset(), W.reset()), Ge(e));
153
+ }, vt = (e) => {
154
+ if (!y || !b.canWrite) return;
155
+ let t = X.find((t) => t.id === e);
156
+ C(e), nt(xe(t)), M(!0);
157
+ }, yt = (e) => {
158
+ (!e || y) && (!e || b.canWrite) && M(e);
159
+ }, bt = () => {
160
+ if (!y || !b.canWrite || !S) return;
161
+ let t = X.find((e) => e.id === S), n = Se(tt, t);
162
+ Object.keys(n).length !== 0 && H.mutate({
163
+ path: { id: S },
162
164
  body: n
163
165
  }, { onSuccess: () => {
164
- d(i.AccountUpdated, { accountId: v }), e.success(u.editSuccessToast), k(!1);
166
+ p(a.AccountUpdated, { accountId: S }), e.success(d.editSuccessToast), M(!1);
165
167
  } });
166
- }, mt = (e) => {
167
- h && g.canWrite && (y(e), z(pe), j(!1), A(!1), Je(!0));
168
- }, ht = (e) => {
169
- (!e || h) && (!e || g.canWrite) && (e || (j(!1), A(!1)), Je(e));
170
- }, gt = (e) => {
171
- K.reset(), j(!1), z(e);
172
- }, _t = () => {
173
- if (!h || !g.canWrite || !v || !a(R)) return;
174
- let e = _e(R.firstAmount), t = _e(R.secondAmount);
175
- e !== null && t !== null && (j(!1), K.mutate({
176
- path: { id: v },
168
+ }, xt = (e) => {
169
+ y && b.canWrite && (C(e), rt(me), P(!1), N(!1), Ze(!0));
170
+ }, St = (e) => {
171
+ (!e || y) && (!e || b.canWrite) && (e || (P(!1), N(!1)), Ze(e));
172
+ }, Ct = (e) => {
173
+ G.reset(), P(!1), rt(e);
174
+ }, wt = () => {
175
+ if (!y || !b.canWrite || !S || !ve(R)) return;
176
+ let e = ye(R.firstAmount), t = ye(R.secondAmount);
177
+ e !== null && t !== null && (P(!1), G.mutate({
178
+ path: { id: S },
177
179
  body: {
178
180
  firstAmount: e,
179
181
  secondAmount: t
180
182
  }
181
183
  }, { onSuccess: (e) => {
182
- if (!Le(e)) {
183
- j(!0);
184
+ if (!ze(e)) {
185
+ P(!0);
184
186
  return;
185
187
  }
186
- d(i.AccountVerified, { accountId: v }), ee("tesouro-new-external-bank-account-linked-success"), A(!0);
188
+ p(a.AccountVerified, { accountId: S }), r("tesouro-new-external-bank-account-linked-success"), N(!0);
187
189
  } }));
188
- }, vt = (e) => {
189
- h && g.canMicroDeposit && (E("row"), G.mutate({ path: { id: e } }, { onSuccess: () => {
190
- E(void 0), O((t) => ze(t, e)), d(i.AccountLinked, { accountId: e });
190
+ }, Tt = (e) => {
191
+ y && b.canMicroDeposit && (j("row"), W.mutate({ path: { id: e } }, { onSuccess: () => {
192
+ j(void 0), Je((t) => f(t, e)), p(a.AccountLinked, { accountId: e });
191
193
  } }));
192
- }, yt = (e) => {
193
- h && g.canWrite && N(e);
194
- }, bt = (e) => {
195
- e || N(void 0);
196
- }, xt = () => {
197
- if (!h || !g.canWrite || !M) return;
198
- let t = M;
199
- W.mutate({ path: { id: t } }, { onSuccess: () => {
200
- d(i.AccountUnlinked, { accountId: t }), e.success(u.unlinkSuccessToast), N(void 0);
194
+ }, Et = (e) => {
195
+ y && b.canWrite && I(e);
196
+ }, Dt = (e) => {
197
+ e || I(void 0);
198
+ }, Ot = () => {
199
+ if (!y || !b.canWrite || !F) return;
200
+ let t = F;
201
+ U.mutate({ path: { id: t } }, { onSuccess: () => {
202
+ p(a.AccountUnlinked, { accountId: t }), e.success(d.unlinkSuccessToast), I(void 0);
201
203
  } });
202
- }, St = V.isPending || H.isPending || U.isPending || K.isPending || W.isPending || G.isPending, Ct = g.canWrite, wt = !h || St, $ = G.isError && Ge === "connect", Tt = je(X, {
203
- selectedUserIds: C,
204
- disabled: wt || !Ct,
205
- fallbackTooltip: l.teamMemberAccessTooltip,
206
- onUserToggle: lt
207
- }), Et = X.filter((e) => e.locked).length + C.length, Dt = X.filter((e) => e.locked || C.includes(e.id)), Ot = w ? {
208
- nickname: w.nickname || P.nickname.trim(),
209
- maskedAccountNumber: w.accountNumber,
210
- users: Dt.map((e) => ({
204
+ }, kt = B.isPending || V.isPending || H.isPending || G.isPending || U.isPending || W.isPending, At = b.canWrite, Q = !y || kt, $ = W.isError && Ke === "connect", jt = Ne(Y, {
205
+ selectedUserIds: D,
206
+ disabled: Q || !At,
207
+ fallbackTooltip: u.teamMemberAccessTooltip,
208
+ onUserToggle: gt
209
+ }), Mt = Y.filter((e) => e.locked).length + D.length, Nt = Y.filter((e) => e.locked || D.includes(e.id)), Pt = k ? {
210
+ nickname: k.nickname || L.nickname.trim(),
211
+ maskedAccountNumber: k.accountNumber,
212
+ users: Nt.map((e) => ({
211
213
  key: e.id,
212
214
  initials: t(e.name),
213
215
  name: e.name,
214
216
  role: e.role
215
217
  }))
216
- } : void 0, kt = Se(Q, u, g, {
217
- labels: l,
218
- onEditSelect: dt,
219
- onVerifySelect: mt,
220
- onLinkSelect: vt,
221
- onUnlinkSelect: yt
222
- }), At = o(() => {
223
- if (!V.isError && !H.isError && !$) return;
224
- let e = V.error ?? H.error ?? ($ ? G.error : void 0);
225
- return te(e) ?? l.actionErrorTitle;
218
+ } : void 0, Ft = we(Z, d, b, {
219
+ labels: u,
220
+ onEditSelect: vt,
221
+ onVerifySelect: xt,
222
+ onLinkSelect: Tt,
223
+ onUnlinkSelect: Et
224
+ }), It = s(() => {
225
+ if (!B.isError && !V.isError && !$) return;
226
+ let e = B.error ?? V.error ?? ($ ? W.error : void 0);
227
+ return ee(e) ?? u.actionErrorTitle;
226
228
  }, [
229
+ B.error,
230
+ B.isError,
227
231
  V.error,
228
232
  V.isError,
229
- H.error,
230
- H.isError,
231
233
  $,
232
- G.error,
233
- l.actionErrorTitle
234
+ W.error,
235
+ u.actionErrorTitle
234
236
  ]);
235
237
  return {
236
- rows: kt,
237
- isLoading: !m && (!h || He && !p || _ && B.isLoading),
238
- isError: m || _ && B.isError,
239
- isConnectOpen: b,
240
- isEditOpen: Ke,
241
- isVerifyOpen: qe,
242
- isVerifySuccess: Ye,
243
- verifyAccountName: Q.find((e) => e.id === v)?.nickname,
244
- verifyAccountNumber: Q.find((e) => e.id === v)?.accountNumber,
245
- isUnlinkOpen: !!M,
246
- unlinkAccountNumber: Q.find((e) => e.id === M)?.accountNumber,
247
- connectStep: x,
248
- accessRows: Tt,
249
- accessGrantedCount: Et,
250
- connectSummary: Ot,
251
- isTeamMembersLoading: et,
252
- isTeamMembersError: J.isError || $e,
253
- isConnectNextDisabled: x === 1 ? !me(P) : x === 2 && !tt,
254
- isConnectRoutingNumberInvalid: P.routingNumber.trim() !== "" && !he(P.routingNumber),
255
- connectErrorMessage: At,
256
- isVerifyFirstAmountInvalid: R.firstAmount.trim() !== "" && !ge(R.firstAmount),
257
- isVerifySecondAmountInvalid: R.secondAmount.trim() !== "" && !ge(R.secondAmount),
258
- isVerifySubmitDisabled: !a(R),
259
- isActionDisabled: wt,
260
- canConnect: Ct,
261
- isSubmitting: St,
262
- isActionError: G.isError || W.isError || V.isError || H.isError || U.isError || K.isError || Xe,
263
- isConnectError: V.isError || H.isError || $,
264
- isEditError: U.isError,
265
- isVerifyError: K.isError || Xe,
266
- connectForm: P,
267
- editForm: I,
238
+ rows: Ft,
239
+ isLoading: !v && (Ue && !z.data || He && !g || x && z.isLoading),
240
+ isError: v || x && z.isError,
241
+ isConnectOpen: w,
242
+ isEditOpen: Ye,
243
+ isVerifyOpen: Xe,
244
+ isVerifySuccess: Qe,
245
+ verifyAccountName: Z.find((e) => e.id === S)?.nickname,
246
+ verifyAccountNumber: Z.find((e) => e.id === S)?.accountNumber,
247
+ isUnlinkOpen: !!F,
248
+ unlinkAccountNumber: Z.find((e) => e.id === F)?.accountNumber,
249
+ connectStep: T,
250
+ accessRows: jt,
251
+ accessGrantedCount: Mt,
252
+ connectSummary: Pt,
253
+ isTeamMembersLoading: st,
254
+ isTeamMembersError: q.isError || ot,
255
+ isConnectNextDisabled: T === 1 ? !he(L) : T === 2 && !ct,
256
+ isConnectRoutingNumberInvalid: L.routingNumber.trim() !== "" && !ge(L.routingNumber),
257
+ connectErrorMessage: It,
258
+ isVerifyFirstAmountInvalid: R.firstAmount.trim() !== "" && !_e(R.firstAmount),
259
+ isVerifySecondAmountInvalid: R.secondAmount.trim() !== "" && !_e(R.secondAmount),
260
+ isVerifySubmitDisabled: !ve(R),
261
+ isActionDisabled: Q,
262
+ canConnect: At,
263
+ isSubmitting: kt,
264
+ isActionError: W.isError || U.isError || B.isError || V.isError || H.isError || G.isError || $e,
265
+ isConnectError: B.isError || V.isError || $,
266
+ isEditError: H.isError,
267
+ isVerifyError: G.isError || $e,
268
+ connectForm: L,
269
+ editForm: tt,
268
270
  verifyForm: R,
269
- onConnectOpenChange: ut,
270
- onEditOpenChange: ft,
271
- onVerifyOpenChange: ht,
272
- onUnlinkOpenChange: bt,
273
- onConnectFormChange: rt,
274
- onEditFormChange: L,
275
- onVerifyFormChange: gt,
276
- onConnectNext: st,
277
- onConnectBack: ct,
278
- onEditSubmit: pt,
279
- onVerifySubmit: _t,
280
- onUnlinkConfirm: xt
271
+ onConnectOpenChange: _t,
272
+ onEditOpenChange: yt,
273
+ onVerifyOpenChange: St,
274
+ onUnlinkOpenChange: Dt,
275
+ onConnectFormChange: ut,
276
+ onEditFormChange: nt,
277
+ onVerifyFormChange: Ct,
278
+ onConnectNext: mt,
279
+ onConnectBack: ht,
280
+ onEditSubmit: bt,
281
+ onVerifySubmit: wt,
282
+ onUnlinkConfirm: Ot
281
283
  };
282
284
  }
283
285
  //#endregion
284
- export { c as LOCALLY_SENT_MICRO_DEPOSIT_ACCOUNT_IDS_STORAGE_KEY, d as useLinkedAccountsWidget };
286
+ export { l as LOCALLY_SENT_MICRO_DEPOSIT_ACCOUNT_IDS_STORAGE_KEY, p as useLinkedAccountsWidget };
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { getCounterparts as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getCounterpartsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { authEpochPlaceholder as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
7
+ import { withAuthEpochInfinite as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
8
  import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
9
  import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
10
  import { getAllPagesNextPaginationTokenParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
@@ -13,17 +13,22 @@ import { useInfiniteQuery as s } from "@tanstack/react-query";
13
13
  //#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js
14
14
  var c = 100;
15
15
  function l({ enabled: l } = {}) {
16
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationPending: m } = r(), h = i(d), g = !!(d && f) && (l === !0 || l === void 0), _ = [...t({
16
+ let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationStatus: m } = r(), h = i(d), g = !!(d && f) && (l === !0 || l === void 0), _ = t({
17
17
  client: u,
18
18
  headers: h,
19
19
  query: {
20
20
  limit: c,
21
21
  is_customer: !0
22
22
  }
23
- }).queryKey, "all"], v = s({
24
- queryKey: [..._, { authEpoch: p }],
23
+ }), v = s({
24
+ ...n(_.queryKey, {
25
+ authEpoch: p,
26
+ organizationStatus: m
27
+ }, {
28
+ suffix: ["all"],
29
+ carryWhileRotating: !1
30
+ }),
25
31
  enabled: g,
26
- placeholderData: n(_, m),
27
32
  initialPageParam: void 0,
28
33
  queryFn: async ({ signal: t, pageParam: n }) => {
29
34
  let { data: r } = await e({
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { getDepositableBankAccounts as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getDepositableBankAccountsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { authEpochPlaceholder as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
7
+ import { withAuthEpochInfinite as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
8
  import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
9
  import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
10
  import { getAllPagesNextPageParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
@@ -14,13 +14,18 @@ import { useInfiniteQuery as c } from "@tanstack/react-query";
14
14
  //#region ../../libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js
15
15
  var l = 100;
16
16
  function u({ enabled: u } = {}) {
17
- let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationPending: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = [...t({
17
+ let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = r(), g = i(f), _ = !!(f && p) && (u === !0 || u === void 0), v = t({
18
18
  client: d,
19
19
  headers: g,
20
20
  query: { limit: l }
21
- }).queryKey, "all"], y = c({
22
- queryKey: [...v, { authEpoch: m }],
23
- placeholderData: n(v, h),
21
+ }), y = c({
22
+ ...n(v.queryKey, {
23
+ authEpoch: m,
24
+ organizationStatus: h
25
+ }, {
26
+ suffix: ["all"],
27
+ carryWhileRotating: !1
28
+ }),
24
29
  enabled: _,
25
30
  initialPageParam: void 0,
26
31
  queryFn: async ({ signal: t, pageParam: n }) => {
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { getReceivables as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
6
  import { getReceivablesOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { authEpochPlaceholder as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
7
+ import { withAuthEpochInfinite as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
8
  import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
9
9
  import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
10
10
  import { getAllPagesNextPaginationTokenParam as a, useAutoFetchNextPage as o } from "../../../shared/data-access/dist/lib/allPages.js";
@@ -17,20 +17,25 @@ var c = 100, l = [
17
17
  "overdue"
18
18
  ];
19
19
  function u({ counterpartId: u, enabled: d } = {}) {
20
- let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationPending: g } = r(), _ = i(p), v = !!(p && m && u) && (d === !0 || d === void 0), y = {
20
+ let { client: f, organizationId: p, widgetToken: m, authEpoch: h, organizationStatus: g } = r(), _ = i(p), v = !!(p && m && u) && (d === !0 || d === void 0), y = {
21
21
  type: "invoice",
22
22
  bank_account_type: "INTERNAL",
23
23
  limit: c,
24
24
  counterpart_id__in: u ? [u] : void 0,
25
25
  status__in: [...l]
26
- }, b = [...t({
26
+ }, b = t({
27
27
  client: f,
28
28
  headers: _,
29
29
  query: y
30
- }).queryKey, "all"], x = s({
31
- queryKey: [...b, { authEpoch: h }],
30
+ }), x = s({
31
+ ...n(b.queryKey, {
32
+ authEpoch: h,
33
+ organizationStatus: g
34
+ }, {
35
+ suffix: ["all"],
36
+ carryWhileRotating: !1
37
+ }),
32
38
  enabled: v,
33
- placeholderData: n(b, g),
34
39
  initialPageParam: void 0,
35
40
  queryFn: async ({ signal: t, pageParam: n }) => {
36
41
  let { data: r } = await e({
@@ -10,7 +10,7 @@ import "../../../../shared/data-access/dist/index.js";
10
10
  import { useQuery as i } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js
12
12
  function a(a) {
13
- let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c && a), f = e({
13
+ let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: u } = n(), d = !!(s && c && a), f = e({
14
14
  client: o,
15
15
  headers: r(s),
16
16
  path: { entity_id: a ?? "" }
@@ -18,7 +18,7 @@ function a(a) {
18
18
  return i({
19
19
  ...t(f, {
20
20
  authEpoch: l,
21
- organizationPending: u
21
+ organizationStatus: u
22
22
  }),
23
23
  enabled: d
24
24
  });