@tesouro/embedded-components-react 0.2.254 → 0.2.256

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/dist/core.js +1 -1
  2. package/dist/index.css +15 -0
  3. package/dist/index.js +2 -2
  4. package/dist/lib/BillPayWidget.d.ts +151 -151
  5. package/dist/lib/BillPayWidget.js +1 -1
  6. package/dist/lib/InsightsWidget.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +4 -4
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +119 -121
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +10 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +40 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +36 -0
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +28 -0
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +22 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +7 -0
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +75 -0
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +166 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +17 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +30 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +15 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +9 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +99 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +4 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -0
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +43 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -0
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +50 -0
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +8 -0
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +7 -0
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +93 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +42 -2
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -0
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +8 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +9 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +85 -0
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +3 -0
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +8 -0
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +112 -0
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +25 -0
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +51 -35
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +235 -1
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +106 -7
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +35 -88
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +122 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +36 -22
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +74 -0
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +15 -8
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +24 -3
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index11.js +1 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +12 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +83 -3
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +1 -0
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +18 -0
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +205 -4
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +1 -0
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +10 -0
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +89 -4
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +1 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +10 -0
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +131 -4
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +1 -0
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +10 -0
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +45 -5
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +17 -1
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +149 -7
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +73 -4
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +14 -0
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +24 -2
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +1 -0
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +24 -1
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +145 -6
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +10 -0
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +8 -0
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +93 -4
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -0
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +7 -0
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +30 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -0
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +13 -0
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +88 -5
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +62 -5
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +7 -0
  85. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +2 -2
  86. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +13 -13
  87. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +58 -58
  88. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +19 -19
  89. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js +1 -1
  90. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +2 -2
  91. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +13 -62
  92. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +66 -0
  93. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +11 -109
  94. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +113 -21
  95. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +21 -15
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +1 -1
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +2 -2
  98. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index8.js +3 -3
  99. package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +1 -1
  100. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/policyViewModel.js +1 -1
  101. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +15 -15
  102. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +9 -9
  103. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +1 -1
  104. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +32 -29
  105. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useSubEntityForm.js +1 -1
  106. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +7 -7
  107. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +232 -220
  108. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +19 -19
  109. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +171 -138
  110. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/client/index.js +1 -0
  111. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/core/bodySerializer.gen.js +9 -2
  112. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +404 -293
  113. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +6 -4
  114. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js +1 -1
  116. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js +6 -3
  117. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  118. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +75 -45
  119. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +1 -1
  120. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +1 -1
  121. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useProductForm.js +1 -1
  122. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index3.js → lib/amountOutputToMajorUnits.js} +1 -1
  123. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index14.js → lib/apiErrors.js} +1 -1
  124. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index2.js → lib/coerceAmountValueToMinorUnits.js} +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js +13 -0
  126. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index4.js → lib/formatMoneyExact.js} +1 -1
  127. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index5.js → lib/formatPhoneDisplay.js} +1 -1
  128. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index6.js → lib/getInitials.js} +1 -1
  129. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index7.js → lib/normalizeAmountOutputCurrencyCode.js} +1 -1
  130. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index8.js → lib/parseAmountOutputMajorUnits.js} +1 -1
  131. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index9.js → lib/parseDecimalAmountToMinorUnits.js} +2 -2
  132. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index10.js → lib/sumAmountOutputsMajorUnits.js} +3 -3
  133. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index11.js → lib/usStates.js} +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index13.js → lib/widgetDomEvents.js} +1 -1
  135. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index12.js → lib/widgetTokenManager.js} +1 -1
  136. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index8.js +1 -1
  137. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +1 -1
  138. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index4.js +1 -1
  139. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js +4 -4
  140. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +1 -1
  141. package/dist/packages/shared-ui-shadcn/dist/index.js +3593 -3582
  142. package/package.json +1 -1
@@ -3,40 +3,38 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { Dialog as e, DialogContent as t, DialogTitle as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
- import "../../../shared/data-access/dist/index.js";
8
- import { OnboardingShell as i } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
6
+ import { OnboardingShell as r } from "../../../shared/ui/dist/lib/OnboardingShell/OnboardingShell.js";
9
7
  import "../../../shared/ui/dist/index.js";
10
- import { useAnalyticsTrack as a } from "../../../shared/feature/dist/lib/analytics/hooks.js";
11
- import { WidgetProvider as ee } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
- import { getStateOptions as o } from "../../../shared/util/dist/index11.js";
13
- import { extractApiErrorMessage as s } from "../../../shared/util/dist/index14.js";
14
- import { useRefetchWidget as te, useWidgetConfig as ne } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
15
- import { getNaicsOptions as c } from "../../../shared/feature/dist/lib/naicsCodeMap.js";
8
+ import { useAnalyticsTrack as i } from "../../../shared/feature/dist/lib/analytics/hooks.js";
9
+ import { WidgetProvider as a } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
10
+ import { getStateOptions as o } from "../../../shared/util/dist/lib/usStates.js";
11
+ import { extractApiErrorMessage as s } from "../../../shared/util/dist/lib/apiErrors.js";
12
+ import { useRefetchWidget as c, useWidgetConfig as l } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
+ import { getNaicsOptions as u } from "../../../shared/feature/dist/lib/naicsCodeMap.js";
16
14
  import "../../../shared/feature/dist/index.js";
17
- import { ADDITIONAL_OWNERS_LABELS_EN as l } from "../../ui/dist/index4.js";
18
- import { interpolateBankName as u } from "../../ui/dist/index6.js";
19
- import { ResultStep as re } from "../../ui/dist/index11.js";
20
- import { MarketingWidget as ie } from "../../ui/dist/index28.js";
15
+ import { ADDITIONAL_OWNERS_LABELS_EN as d } from "../../ui/dist/index4.js";
16
+ import { interpolateBankName as f } from "../../ui/dist/index6.js";
17
+ import { ResultStep as ee } from "../../ui/dist/index11.js";
18
+ import { MarketingWidget as te } from "../../ui/dist/index28.js";
21
19
  import "../../ui/dist/index.js";
22
- import { BusinessDetailsStep as ae } from "./index9.js";
23
- import { PersonalDetailsStep as oe } from "./index11.js";
24
- import { AdditionalOwnersStep as se } from "./index13.js";
25
- import { buildCreateApplicationBody as ce, buildUpdateApplicationBody as d } from "./index14.js";
26
- import { OnboardingAnalyticsEvent as f, WIDGET_NAME as p } from "./index15.js";
27
- import { DEFAULT_LABELS as m } from "./index16.js";
28
- import { ApplicationClientSecretProvider as h, useApplicationClientSecret as le } from "../../data-access/dist/index2.js";
29
- import { useCreateApplication as ue } from "../../data-access/dist/index4.js";
30
- import { useUpdateApplication as de } from "../../data-access/dist/index6.js";
31
- import { useSubmitApplication as fe } from "../../data-access/dist/index7.js";
32
- import { usePollApplicationCompletion as pe } from "../../data-access/dist/index8.js";
33
- import { OnboardingSuppressionReason as me } from "../../data-access/dist/index9.js";
34
- import { useOrganizationOnboardingSuppression as he } from "../../data-access/dist/index10.js";
20
+ import { BusinessDetailsStep as ne } from "./index9.js";
21
+ import { PersonalDetailsStep as re } from "./index11.js";
22
+ import { AdditionalOwnersStep as ie } from "./index13.js";
23
+ import { buildCreateApplicationBody as ae, buildUpdateApplicationBody as p } from "./index14.js";
24
+ import { OnboardingAnalyticsEvent as m, WIDGET_NAME as h } from "./index15.js";
25
+ import { DEFAULT_LABELS as g } from "./index16.js";
26
+ import { ApplicationClientSecretProvider as oe, useApplicationClientSecret as se } from "../../data-access/dist/index2.js";
27
+ import { useCreateApplication as ce } from "../../data-access/dist/index4.js";
28
+ import { useUpdateApplication as le } from "../../data-access/dist/index6.js";
29
+ import { useSubmitApplication as ue } from "../../data-access/dist/index7.js";
30
+ import { usePollApplicationCompletion as de } from "../../data-access/dist/index8.js";
31
+ import { OnboardingSuppressionReason as fe } from "../../data-access/dist/index9.js";
32
+ import { useOrganizationOnboardingSuppression as pe } from "../../data-access/dist/index10.js";
35
33
  import "../../data-access/dist/index.js";
36
- import { useCallback as g, useEffect as _, useMemo as v, useRef as ge, useState as y } from "react";
37
- import { Fragment as _e, jsx as b, jsxs as x } from "react/jsx-runtime";
34
+ import { useCallback as _, useEffect as v, useMemo as y, useRef as me, useState as b } from "react";
35
+ import { Fragment as he, jsx as x, jsxs as S } from "react/jsx-runtime";
38
36
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js
39
- var ve = {
37
+ var ge = {
40
38
  companyLegalName: "",
41
39
  companyDbaName: "",
42
40
  businessAddress: "",
@@ -50,7 +48,7 @@ var ve = {
50
48
  naicsCode: "",
51
49
  isAuthorized: null,
52
50
  isCheckboxChecked: !1
53
- }, ye = {
51
+ }, _e = {
54
52
  firstName: "",
55
53
  lastName: "",
56
54
  dateOfBirth: void 0,
@@ -64,7 +62,7 @@ var ve = {
64
62
  ownsOver25Percent: null,
65
63
  ownershipPercentage: null
66
64
  };
67
- function be(e, t) {
65
+ function ve(e, t) {
68
66
  if (e === 0) return {
69
67
  title: t.businessReviewTitle,
70
68
  subtitle: t.businessReviewSubtitle
@@ -74,7 +72,7 @@ function be(e, t) {
74
72
  subtitle: t.personalReviewSubtitle
75
73
  };
76
74
  let n = {
77
- ...l,
75
+ ...d,
78
76
  ...t.additionalOwners
79
77
  };
80
78
  return {
@@ -82,55 +80,55 @@ function be(e, t) {
82
80
  subtitle: n.subheading
83
81
  };
84
82
  }
85
- function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard: ee, labels: l, initialBusinessDetails: p, initialPersonalDetails: h, initialAdditionalOwners: S, bankLogoSrc: C, disclosureLinks: xe, marketingContent: w = null, open: Se, defaultOpen: Ce, onOpenChange: we }) {
86
- let T = a();
87
- _(() => {
88
- T(f.Mounted);
89
- }, [T]);
90
- let E = {
91
- ...m,
92
- ...l,
83
+ function ye({ onEmbeddedOnboardingCompletedSuccessfully: a, onNavigateToDashboard: d, labels: h, initialBusinessDetails: oe, initialPersonalDetails: ye, initialAdditionalOwners: C, bankLogoSrc: be, disclosureLinks: xe, marketingContent: w = null, open: Se, defaultOpen: T, onOpenChange: Ce }) {
84
+ let E = i();
85
+ v(() => {
86
+ E(m.Mounted);
87
+ }, [E]);
88
+ let D = {
89
+ ...g,
90
+ ...h,
93
91
  stepIndicator: {
94
- ...m.stepIndicator,
95
- ...l?.stepIndicator
92
+ ...g.stepIndicator,
93
+ ...h?.stepIndicator
96
94
  },
97
- businessDetails: l?.businessDetails ?? {},
98
- personalDetails: l?.personalDetails ?? {},
99
- additionalOwners: l?.additionalOwners ?? {},
95
+ businessDetails: h?.businessDetails ?? {},
96
+ personalDetails: h?.personalDetails ?? {},
97
+ additionalOwners: h?.additionalOwners ?? {},
100
98
  result: {
101
- ...m.result,
102
- ...l?.result
99
+ ...g.result,
100
+ ...h?.result
103
101
  }
104
- }, D = ne().initResponse, { termsHref: Te, privacyHref: Ee, electronicCommunicationHref: De, patriotActHref: Oe } = xe ?? {}, ke = w !== null, O = Se === void 0, [Ae, k] = y(!1), [je, Me] = y(!0), [Ne, Pe] = y(() => Ce ?? !1), Fe = C ?? w?.bankLogoSrc ?? void 0, A = O ? Ne : Se, Ie = Ce ?? !1, j = g((e) => {
105
- O && Pe(e), we?.(e);
106
- }, [we, O]), Le = g(() => {
107
- T(f.OpenMarketing), k(!0);
108
- }, [T]), Re = g(() => {
109
- k(!1);
110
- }, []), ze = g(() => {
111
- T(f.BeginOnboarding), k(!1), j(!0);
112
- }, [j, T]), Be = g(() => {
113
- Me(!1), r();
114
- }, [r]), Ve = te(), [M, N] = y(0), [He, Ue] = y(() => ({
115
- ...ve,
116
- ...p
117
- })), [P, We] = y(() => ({
118
- ...ye,
119
- ...h
120
- })), [Ge, Ke] = y(() => S ?? []), [F, qe] = y(null), [I, Je] = y(null), [L, Ye] = y(null), [R, Xe] = y(null), [Ze, z] = y(null), [B, V] = y(!1), [H, U] = y(null), W = ue(), G = de(), K = fe(), Qe = pe(), { setClientSecret: $e } = le(), q = he(), J = ge(null);
121
- _(() => () => J.current?.abort(), []);
122
- let et = v(() => c(E.businessDetails.naicsTitles), [E.businessDetails.naicsTitles]), tt = v(() => o(E.businessDetails.stateTitles), [E.businessDetails.stateTitles]), nt = v(() => o(E.personalDetails.stateTitles), [E.personalDetails.stateTitles]), rt = v(() => o(E.additionalOwners.stateTitles), [E.additionalOwners.stateTitles]), Y = B || H !== null, it = D?.status === "ACTIVE" || D?.status === "INACTIVE", X = D?.status === "INVITED", Z = !!D && !Y && (it || X || q.isSuppressed), Q = Z ? it ? me.UserAlreadyOnboarded : X ? me.UserInvitedToOrganization : q.reason : null;
123
- if (_(() => {
124
- !Z || !Q || (T(f.Suppressed, { reason: Q }), console.info(`[onboarding] not shown: ${Q}`));
102
+ }, O = l().initResponse, { termsHref: we, privacyHref: Te, electronicCommunicationHref: Ee, patriotActHref: De } = xe ?? {}, Oe = w !== null, k = Se === void 0, [ke, A] = b(!1), [Ae, je] = b(!0), [Me, Ne] = b(() => T ?? !1), Pe = be ?? w?.bankLogoSrc ?? void 0, Fe = k ? Me : Se, Ie = T ?? !1, j = _((e) => {
103
+ k && Ne(e), Ce?.(e);
104
+ }, [Ce, k]), Le = _(() => {
105
+ E(m.OpenMarketing), A(!0);
106
+ }, [E]), Re = _(() => {
107
+ A(!1);
108
+ }, []), ze = _(() => {
109
+ E(m.BeginOnboarding), A(!1), j(!0);
110
+ }, [j, E]), Be = _(() => {
111
+ je(!1), a();
112
+ }, [a]), Ve = c(), [M, N] = b(0), [He, Ue] = b(() => ({
113
+ ...ge,
114
+ ...oe
115
+ })), [P, We] = b(() => ({
116
+ ..._e,
117
+ ...ye
118
+ })), [Ge, Ke] = b(() => C ?? []), [F, qe] = b(null), [I, Je] = b(null), [L, Ye] = b(null), [R, Xe] = b(null), [Ze, z] = b(null), [B, V] = b(!1), [H, U] = b(null), W = ce(), G = le(), K = ue(), Qe = de(), { setClientSecret: $e } = se(), q = pe(), J = me(null);
119
+ v(() => () => J.current?.abort(), []);
120
+ let et = y(() => u(D.businessDetails.naicsTitles), [D.businessDetails.naicsTitles]), tt = y(() => o(D.businessDetails.stateTitles), [D.businessDetails.stateTitles]), nt = y(() => o(D.personalDetails.stateTitles), [D.personalDetails.stateTitles]), rt = y(() => o(D.additionalOwners.stateTitles), [D.additionalOwners.stateTitles]), Y = B || H !== null, X = O?.status === "ACTIVE" || O?.status === "INACTIVE", it = O?.status === "INVITED", Z = !!O && !Y && (X || it || q.isSuppressed), Q = Z ? X ? fe.UserAlreadyOnboarded : it ? fe.UserInvitedToOrganization : q.reason : null;
121
+ if (v(() => {
122
+ !Z || !Q || (E(m.Suppressed, { reason: Q }), console.info(`[onboarding] not shown: ${Q}`));
125
123
  }, [
126
124
  Z,
127
125
  Q,
128
- T
129
- ]), !D || !Y && (Z || !q.isResolved)) return null;
126
+ E
127
+ ]), !O || !Y && (Z || !q.isResolved)) return null;
130
128
  let at = F?.companyStructure === "SOLE_PROPRIETORSHIP", ot = [
131
- E.stepIndicator.business,
132
- E.stepIndicator.personal,
133
- E.stepIndicator.ownership
129
+ D.stepIndicator.business,
130
+ D.stepIndicator.personal,
131
+ D.stepIndicator.ownership
134
132
  ], st = M === 0 ? F : M === 1 ? I : M === 2 ? L : null, $ = W.isPending || G.isPending || K.isPending || B, ct = () => {
135
133
  z(null), N((e) => e === 0 ? 0 : e - 1);
136
134
  }, lt = () => {
@@ -143,7 +141,7 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
143
141
  try {
144
142
  let r = await K.mutateAsync({ path: { id: e } });
145
143
  if (t.signal.aborted) return;
146
- if (!r.id) throw Error(E.submitFailedError);
144
+ if (!r.id) throw Error(D.submitFailedError);
147
145
  n = !0, (await Qe(e, { signal: t.signal })).status === "complete" ? (U("success"), Ve(), Be()) : U("pending");
148
146
  } catch (e) {
149
147
  if (e instanceof DOMException && e.name === "AbortError") return;
@@ -159,7 +157,7 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
159
157
  if (!F) return;
160
158
  let e = R;
161
159
  if (!e) {
162
- let t = await W.mutateAsync({ body: ce(F) });
160
+ let t = await W.mutateAsync({ body: ae(F) });
163
161
  e = t.id, Xe(e), t.clientSecret && $e(t.clientSecret);
164
162
  }
165
163
  N(1);
@@ -167,7 +165,7 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
167
165
  if (!I || !F || !R) return;
168
166
  await G.mutateAsync({
169
167
  path: { id: R },
170
- body: d({
168
+ body: p({
171
169
  businessDetails: F,
172
170
  applicant: I
173
171
  })
@@ -176,28 +174,28 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
176
174
  if (!L || !R) return;
177
175
  await G.mutateAsync({
178
176
  path: { id: R },
179
- body: d({ businessOwners: L })
177
+ body: p({ businessOwners: L })
180
178
  }), await ut(R);
181
179
  }
182
180
  } catch (e) {
183
- let t = s(e) ?? (e instanceof Error ? e.message : void 0) ?? E.genericRetryError;
181
+ let t = s(e) ?? (e instanceof Error ? e.message : void 0) ?? D.genericRetryError;
184
182
  z(t);
185
183
  }
186
- }, ft = be(Math.min(M, 2), E), pt = D.bankName?.trim() || E.fallbackBankName, mt = u(E.shellFdicDisclaimer, pt);
184
+ }, ft = ve(Math.min(M, 2), D), pt = O.bankName?.trim() || D.fallbackBankName, mt = f(D.shellFdicDisclaimer, pt);
187
185
  if (Y) {
188
- let r = F?.companyLegalName ?? "", i = D.bankName?.trim() || E.fallbackBankName, a = H ?? "pending", o = a === "success", s = {
189
- ...m.result,
190
- ...E.result
186
+ let r = F?.companyLegalName ?? "", i = O.bankName?.trim() || D.fallbackBankName, a = H ?? "pending", o = a === "success", s = {
187
+ ...g.result,
188
+ ...D.result
191
189
  };
192
- return /* @__PURE__ */ b(e, {
193
- open: A,
190
+ return /* @__PURE__ */ x(e, {
191
+ open: Fe,
194
192
  onOpenChange: j,
195
- children: /* @__PURE__ */ x(t, {
193
+ children: /* @__PURE__ */ S(t, {
196
194
  className: "ttw:grid ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:grid-rows-[1fr] ttw:gap-0 ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
197
- children: [/* @__PURE__ */ b(n, {
195
+ children: [/* @__PURE__ */ x(n, {
198
196
  className: "ttw:sr-only",
199
- children: E.modalTitle
200
- }), /* @__PURE__ */ b(re, {
197
+ children: D.modalTitle
198
+ }), /* @__PURE__ */ x(ee, {
201
199
  status: a,
202
200
  isLoading: B,
203
201
  loadingMessage: s.loadingMessage,
@@ -207,17 +205,17 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
207
205
  followUpEmail: I?.workEmail ?? "",
208
206
  emailBoxLead: s.pendingEmailBoxLead,
209
207
  navigateToDashboardLabel: s.navigateToDashboard,
210
- bankLogoSrc: Fe,
211
- bankLogoAlt: u(s.bankLogoAlt, i),
212
- fdicDisclaimer: u(s.fdicDisclaimer, i),
213
- onNavigateToDashboard: ee
208
+ bankLogoSrc: Pe,
209
+ bankLogoAlt: f(s.bankLogoAlt, i),
210
+ fdicDisclaimer: f(s.fdicDisclaimer, i),
211
+ onNavigateToDashboard: d
214
212
  })]
215
213
  })
216
214
  });
217
215
  }
218
- let ht = M === 2 ? E.submit : E.next, gt = st === null || $;
219
- return /* @__PURE__ */ x(_e, { children: [ke && je && w ? /* @__PURE__ */ b(ie, {
220
- open: Ae,
216
+ let ht = M === 2 ? D.submit : D.next, gt = st === null || $;
217
+ return /* @__PURE__ */ S(he, { children: [Oe && Ae && w ? /* @__PURE__ */ x(te, {
218
+ open: ke,
221
219
  isVisible: !0,
222
220
  vspLogo: w.vspLogo,
223
221
  bankingText: w.bankingText,
@@ -231,8 +229,8 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
231
229
  onOpenMarketingModal: Le,
232
230
  onCloseMarketingModal: Re,
233
231
  onPrimaryCtaClick: ze
234
- }) : null, /* @__PURE__ */ x(i, {
235
- open: A,
232
+ }) : null, /* @__PURE__ */ S(r, {
233
+ open: Fe,
236
234
  defaultOpen: Ie,
237
235
  onOpenChange: j,
238
236
  title: ft.title,
@@ -250,33 +248,33 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
250
248
  nextIcon: null,
251
249
  errorMessage: Ze,
252
250
  labels: {
253
- backButton: M === 0 ? E.cancel : E.back,
254
- cancelButton: E.cancel
251
+ backButton: M === 0 ? D.cancel : D.back,
252
+ cancelButton: D.cancel
255
253
  },
256
254
  children: [
257
- M === 0 ? /* @__PURE__ */ b(ae, {
255
+ M === 0 ? /* @__PURE__ */ x(ne, {
258
256
  value: He,
259
257
  onValueChange: Ue,
260
258
  onSnapshotChange: qe,
261
259
  naicsOptions: et,
262
260
  stateOptions: tt,
263
261
  isSubmitting: $,
264
- labels: E.businessDetails,
262
+ labels: D.businessDetails,
265
263
  bankName: pt,
266
- termsHref: Te,
267
- privacyHref: Ee,
268
- electronicCommunicationHref: De,
269
- patriotActHref: Oe
264
+ termsHref: we,
265
+ privacyHref: Te,
266
+ electronicCommunicationHref: Ee,
267
+ patriotActHref: De
270
268
  }, "business") : null,
271
- M === 1 ? /* @__PURE__ */ b(oe, {
269
+ M === 1 ? /* @__PURE__ */ x(re, {
272
270
  value: P,
273
271
  onValueChange: We,
274
272
  onSnapshotChange: Je,
275
273
  stateOptions: nt,
276
274
  isSubmitting: $,
277
- labels: E.personalDetails
275
+ labels: D.personalDetails
278
276
  }, "personal") : null,
279
- M === 2 ? /* @__PURE__ */ b(se, {
277
+ M === 2 ? /* @__PURE__ */ x(ie, {
280
278
  owners: Ge,
281
279
  onOwnersChange: Ke,
282
280
  primaryOwnerName: `${P.firstName} ${P.lastName}`.trim(),
@@ -284,30 +282,30 @@ function S({ onEmbeddedOnboardingCompletedSuccessfully: r, onNavigateToDashboard
284
282
  stateOptions: rt,
285
283
  onSnapshotChange: Ye,
286
284
  isSubmitting: $,
287
- labels: E.additionalOwners
285
+ labels: D.additionalOwners
288
286
  }) : null
289
287
  ]
290
288
  })] });
291
289
  }
292
- function C({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, linkComponent: i, implementation: a, uiFramework: o, errorFallback: s, onError: te, analytics: ne, ...c }) {
293
- return /* @__PURE__ */ b(ee, {
290
+ function C({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, linkComponent: i, implementation: o, uiFramework: s, errorFallback: c, onError: l, analytics: u, ...d }) {
291
+ return /* @__PURE__ */ x(a, {
294
292
  baseUrl: e,
295
293
  widgetToken: t,
296
294
  organizationId: n,
297
295
  configClient: r,
298
296
  linkComponent: i,
299
- implementation: a,
300
- uiFramework: o,
301
- errorFallback: s,
302
- onError: te,
303
- analytics: ne,
304
- widgetName: p,
305
- children: /* @__PURE__ */ b(xe, { ...c })
297
+ implementation: o,
298
+ uiFramework: s,
299
+ errorFallback: c,
300
+ onError: l,
301
+ analytics: u,
302
+ widgetName: h,
303
+ children: /* @__PURE__ */ x(be, { ...d })
306
304
  });
307
305
  }
308
- function xe(e) {
309
- let { authEpoch: t } = r();
310
- return /* @__PURE__ */ b(h, { children: /* @__PURE__ */ b(S, { ...e }, t) }, t);
306
+ function be(e) {
307
+ let { initResponse: t } = l(), n = t?.userId ?? null, [r, i] = b(n), [a, o] = b(0);
308
+ return n !== r && (i(n), r !== null && n !== null && o((e) => e + 1)), /* @__PURE__ */ x(oe, { children: /* @__PURE__ */ x(ye, { ...e }, a) }, a);
311
309
  }
312
310
  //#endregion
313
311
  export { C as BankAccountOnboardingWidget, C as default };
@@ -7,7 +7,7 @@ import { useAllBankAccountsQuery as t } from "../../../shared/data-access/dist/l
7
7
  import { useAllOrganizationRolesQuery as n } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
8
8
  import "../../../shared/ui/dist/index.js";
9
9
  import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
10
- import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as ee, emitWidgetDomEvent as te } from "../../../shared/util/dist/index13.js";
10
+ import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as ee, emitWidgetDomEvent as te } from "../../../shared/util/dist/lib/widgetDomEvents.js";
11
11
  import { useWidgetConfig as ne, useWidgetError as re, useWidgetLoading as ie } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
12
  import "../../../shared/feature/dist/index.js";
13
13
  import { BankAccountsWidgetAnalyticsEvent as i } from "./index2.js";
@@ -0,0 +1,10 @@
1
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
2
+ import "../../../shared/data-access/dist/index.js";
3
+ import "./index3.js";
4
+ import "./index5.js";
5
+ import { useAllPayableLineItemsQuery as t, useReplacePayableLineItemsMutation as n } from "./index6.js";
6
+ import { useAttachPayableFileMutation as r, useCreatePayableMutation as i, useDeletePayableFileMutation as a, useSubmitPayableForApprovalMutation as o, useUpdatePayableMutation as s, useUploadPayableFromFileMutation as c, useValidatePayableMutation as l } from "./index7.js";
7
+ import { usePayableOcrQueries as u } from "./index9.js";
8
+ import { usePayableQuery as d, usePayablesQuery as f } from "./index10.js";
9
+ import { usePayableSuggestionsQuery as p } from "./index11.js";
10
+ export { t as useAllPayableLineItemsQuery, r as useAttachPayableFileMutation, i as useCreatePayableMutation, a as useDeletePayableFileMutation, e as useEmbedApi, u as usePayableOcrQueries, d as usePayableQuery, p as usePayableSuggestionsQuery, f as usePayablesQuery, n as useReplacePayableLineItemsMutation, o as useSubmitPayableForApprovalMutation, s as useUpdatePayableMutation, c as useUploadPayableFromFileMutation, l as useValidatePayableMutation };
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { getPayablesIdOptions as n, getPayablesOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
+ import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
9
+ import "../../../shared/data-access/dist/index.js";
10
+ import { payableOcrQueryOptions as a } from "./index8.js";
11
+ import { useQuery as o } from "@tanstack/react-query";
12
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js
13
+ function s({ enabled: n, ...a } = {}) {
14
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = e(), d = !!(c && l) && (n === !0 || n === void 0), f = r({
15
+ client: s,
16
+ headers: t(c),
17
+ query: a
18
+ });
19
+ return o({
20
+ ...i(f, u),
21
+ enabled: d
22
+ });
23
+ }
24
+ function c(r, { enabled: s = !0, pollWhileOcrProcessing: c = !1 } = {}) {
25
+ let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = !!(u && d && r) && s, m = c ? a({
26
+ client: l,
27
+ organizationId: u,
28
+ payableId: r ?? ""
29
+ }) : n({
30
+ client: l,
31
+ headers: t(u),
32
+ path: { payable_id: r ?? "" }
33
+ });
34
+ return o({
35
+ ...i(m, f),
36
+ enabled: p
37
+ });
38
+ }
39
+ //#endregion
40
+ export { c as usePayableQuery, s as usePayablesQuery };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
+ import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
9
+ import { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
10
+ import "../../../shared/data-access/dist/index.js";
11
+ import { useQuery as a } from "@tanstack/react-query";
12
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js
13
+ function o(o, { enabled: s = !0 } = {}) {
14
+ let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
15
+ client: c,
16
+ headers: t(l),
17
+ path: { payable_id: o ?? "" }
18
+ }), { queryKey: m, queryFn: h } = r(p, d);
19
+ return a({
20
+ queryKey: m,
21
+ enabled: f,
22
+ retry: !1,
23
+ queryFn: async (e) => {
24
+ try {
25
+ if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
26
+ return await h(e);
27
+ } catch (e) {
28
+ if (i(e)) return null;
29
+ throw e;
30
+ }
31
+ },
32
+ select: (e) => e ?? void 0
33
+ });
34
+ }
35
+ //#endregion
36
+ export { o as usePayableSuggestionsQuery };
@@ -0,0 +1,28 @@
1
+ import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
2
+ import { getApprovalRequestsQueryKey as t, getPayablesAnalyticsQueryKey as n, getPayablesIdHistoryQueryKey as r, getPayablesIdLineItemsQueryKey as i, getPayablesIdQueryKey as a, getPayablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
3
+ import "../../../shared/data-access/dist/index.js";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js
5
+ var s = ({ client: t, organizationId: n }) => o({
6
+ client: t,
7
+ headers: e(n)
8
+ }), c = ({ client: n, organizationId: r }) => t({
9
+ client: n,
10
+ headers: e(r)
11
+ }), l = ({ client: t, organizationId: r }) => n({
12
+ client: t,
13
+ headers: e(r)
14
+ }), u = ({ client: t, organizationId: n, payableId: r }) => a({
15
+ client: t,
16
+ headers: e(n),
17
+ path: { payable_id: r }
18
+ }), d = ({ client: t, organizationId: n, payableId: i }) => r({
19
+ client: t,
20
+ headers: e(n),
21
+ path: { payable_id: i }
22
+ }), f = ({ client: t, organizationId: n, payableId: r }) => i({
23
+ client: t,
24
+ headers: e(n),
25
+ path: { payable_id: r }
26
+ });
27
+ //#endregion
28
+ export { c as approvalRequestsInvalidationKey, d as payableHistoryInvalidationKey, u as payableInvalidationKey, f as payableLineItemsInvalidationKey, l as payablesAnalyticsInvalidationKey, s as payablesInvalidationKey };
@@ -0,0 +1,22 @@
1
+ import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
2
+ import "../../../shared/data-access/dist/index.js";
3
+ import { approvalRequestsInvalidationKey as t, payableHistoryInvalidationKey as n, payableInvalidationKey as r, payableLineItemsInvalidationKey as i, payablesAnalyticsInvalidationKey as a, payablesInvalidationKey as o } from "./index3.js";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js
5
+ async function s({ client: s, organizationId: c, payableId: l, includeLineItems: u, includeApprovalRequests: d }) {
6
+ let f = {
7
+ client: s,
8
+ organizationId: c
9
+ }, p = l ? {
10
+ ...f,
11
+ payableId: l
12
+ } : void 0, m = [
13
+ o(f),
14
+ a(f),
15
+ ...d ? [t(f)] : [],
16
+ ...p ? [r(p), n(p)] : [],
17
+ ...p && u ? [i(p)] : []
18
+ ];
19
+ await Promise.all(m.map((t) => e(t)));
20
+ }
21
+ //#endregion
22
+ export { s as invalidatePayableQueries };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import "../../../shared/data-access/dist/index.js";
6
+ import "./index4.js";
7
+ import "@tanstack/react-query";
@@ -0,0 +1,75 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { getPayablesIdLineItems as n, putPayablesIdLineItems as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
+ import { getPayablesIdLineItemsOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
+ import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
+ import { getAllPagesNextPaginationTokenParam as o, isAllPagesResolving as s, useAutoFetchNextPage as c } from "../../../shared/data-access/dist/lib/allPages.js";
11
+ import "../../../shared/data-access/dist/index.js";
12
+ import { invalidatePayableQueries as l } from "./index4.js";
13
+ import { useMemo as u } from "react";
14
+ import { useInfiniteQuery as d, useMutation as f } from "@tanstack/react-query";
15
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
16
+ var p = 100;
17
+ function m(r, { enabled: l } = {}) {
18
+ let { client: f, organizationId: m, widgetToken: h, authEpoch: g } = e(), _ = t(m), v = !!(m && h && r) && l !== !1, y = i({
19
+ client: f,
20
+ headers: _,
21
+ path: { payable_id: r ?? "" },
22
+ query: { limit: p }
23
+ }), b = d({
24
+ queryKey: [...a(y, g).queryKey, "all"],
25
+ enabled: v,
26
+ initialPageParam: void 0,
27
+ queryFn: async ({ signal: e, pageParam: t }) => {
28
+ let { data: i } = await n({
29
+ client: f,
30
+ headers: _,
31
+ path: { payable_id: r ?? "" },
32
+ query: {
33
+ limit: p,
34
+ ...t ? { pagination_token: t } : {}
35
+ },
36
+ signal: e,
37
+ throwOnError: !0
38
+ });
39
+ return i;
40
+ },
41
+ getNextPageParam: o
42
+ });
43
+ c(b, v);
44
+ let x = u(() => b.data?.pages.flatMap((e) => e.data ?? []) ?? [], [b.data]);
45
+ return {
46
+ ...b,
47
+ lineItems: x,
48
+ isResolving: s(b)
49
+ };
50
+ }
51
+ function h() {
52
+ let { client: n, organizationId: i } = e();
53
+ return f({
54
+ mutationFn: async ({ path: e, body: a }) => {
55
+ let { data: o } = await r({
56
+ client: n,
57
+ headers: t(i),
58
+ path: e,
59
+ body: a,
60
+ throwOnError: !0
61
+ });
62
+ return o;
63
+ },
64
+ onSuccess: async (e, t) => {
65
+ await l({
66
+ client: n,
67
+ organizationId: i,
68
+ payableId: t.path.payable_id,
69
+ includeLineItems: !0
70
+ });
71
+ }
72
+ });
73
+ }
74
+ //#endregion
75
+ export { m as useAllPayableLineItemsQuery, h as useReplacePayableLineItemsMutation };